From cc4cab4539bc4d4a63dc41ca5672fb06c6208cdc Mon Sep 17 00:00:00 2001 From: Peter Argue <89119817+peterargue@users.noreply.github.com> Date: Sat, 21 Feb 2026 12:00:56 -0800 Subject: [PATCH 1/6] Add scheduled transaction experimental endpoints --- .../go-client-generated/README.md | 9 + .../go-client-generated/api/swagger.yaml | 1502 +++++++++++++---- .../go-client-generated/api_accounts.go | 187 +- .../api_scheduled_transactions.go | 495 ++++++ .../go-client-generated/client.go | 3 + .../go-client-generated/docs/AccountsApi.md | 47 + .../docs/ScheduledTransaction.md | 17 + .../docs/ScheduledTransactionPriority.md | 8 + .../docs/ScheduledTransactionStatus.md | 8 + .../docs/ScheduledTransactionsApi.md | 137 ++ .../docs/ScheduledTransactionsResponse.md | 10 + .../docs/TransactionHandler.md | 11 + .../model_scheduled_transaction.go | 25 + .../model_scheduled_transaction_priority.go | 18 + .../model_scheduled_transaction_status.go | 19 + .../model_scheduled_transactions_response.go | 14 + .../model_transaction_handler.go | 18 + openapi/experimental/openapi.yaml | 293 +++- 18 files changed, 2417 insertions(+), 404 deletions(-) create mode 100644 openapi/experimental/go-client-generated/api_scheduled_transactions.go create mode 100644 openapi/experimental/go-client-generated/docs/ScheduledTransaction.md create mode 100644 openapi/experimental/go-client-generated/docs/ScheduledTransactionPriority.md create mode 100644 openapi/experimental/go-client-generated/docs/ScheduledTransactionStatus.md create mode 100644 openapi/experimental/go-client-generated/docs/ScheduledTransactionsApi.md create mode 100644 openapi/experimental/go-client-generated/docs/ScheduledTransactionsResponse.md create mode 100644 openapi/experimental/go-client-generated/docs/TransactionHandler.md create mode 100644 openapi/experimental/go-client-generated/model_scheduled_transaction.go create mode 100644 openapi/experimental/go-client-generated/model_scheduled_transaction_priority.go create mode 100644 openapi/experimental/go-client-generated/model_scheduled_transaction_status.go create mode 100644 openapi/experimental/go-client-generated/model_scheduled_transactions_response.go create mode 100644 openapi/experimental/go-client-generated/model_transaction_handler.go diff --git a/openapi/experimental/go-client-generated/README.md b/openapi/experimental/go-client-generated/README.md index 8978e2305..931f7051e 100644 --- a/openapi/experimental/go-client-generated/README.md +++ b/openapi/experimental/go-client-generated/README.md @@ -24,6 +24,10 @@ Class | Method | HTTP request | Description *AccountsApi* | [**GetAccountFungibleTransfers**](docs/AccountsApi.md#getaccountfungibletransfers) | **Get** /experimental/v1/accounts/{address}/ft/transfers | Get account fungible token transfers *AccountsApi* | [**GetAccountNonFungibleTransfers**](docs/AccountsApi.md#getaccountnonfungibletransfers) | **Get** /experimental/v1/accounts/{address}/nft/transfers | Get account non-fungible token transfers *AccountsApi* | [**GetAccountTransactions**](docs/AccountsApi.md#getaccounttransactions) | **Get** /experimental/v1/accounts/{address}/transactions | Get account transactions +*AccountsApi* | [**GetScheduledTransactionsByAccount**](docs/AccountsApi.md#getscheduledtransactionsbyaccount) | **Get** /experimental/v1/scheduled/account/{address} | List scheduled transactions for an account +*ScheduledTransactionsApi* | [**GetScheduledTransactionByID**](docs/ScheduledTransactionsApi.md#getscheduledtransactionbyid) | **Get** /experimental/v1/scheduled/transaction/{id} | Get scheduled transaction by ID +*ScheduledTransactionsApi* | [**GetScheduledTransactions**](docs/ScheduledTransactionsApi.md#getscheduledtransactions) | **Get** /experimental/v1/scheduled | List scheduled transactions +*ScheduledTransactionsApi* | [**GetScheduledTransactionsByAccount**](docs/ScheduledTransactionsApi.md#getscheduledtransactionsbyaccount) | **Get** /experimental/v1/scheduled/account/{address} | List scheduled transactions for an account ## Documentation For Models @@ -39,9 +43,14 @@ Class | Method | HTTP request | Description - [NonFungibleTokenTransfer](docs/NonFungibleTokenTransfer.md) - [ProposalKey](docs/ProposalKey.md) - [Role](docs/Role.md) + - [ScheduledTransaction](docs/ScheduledTransaction.md) + - [ScheduledTransactionPriority](docs/ScheduledTransactionPriority.md) + - [ScheduledTransactionStatus](docs/ScheduledTransactionStatus.md) + - [ScheduledTransactionsResponse](docs/ScheduledTransactionsResponse.md) - [Transaction](docs/Transaction.md) - [TransactionExecution](docs/TransactionExecution.md) - [TransactionExpandable](docs/TransactionExpandable.md) + - [TransactionHandler](docs/TransactionHandler.md) - [TransactionResult](docs/TransactionResult.md) - [TransactionSignature](docs/TransactionSignature.md) - [TransactionStatus](docs/TransactionStatus.md) diff --git a/openapi/experimental/go-client-generated/api/swagger.yaml b/openapi/experimental/go-client-generated/api/swagger.yaml index 87c3096b6..d093d81bc 100644 --- a/openapi/experimental/go-client-generated/api/swagger.yaml +++ b/openapi/experimental/go-client-generated/api/swagger.yaml @@ -13,6 +13,8 @@ servers: tags: - name: Accounts description: Endpoints for querying account-related data. +- name: ScheduledTransactions + description: Endpoints for querying scheduled transaction data. paths: /experimental/v1/accounts/{address}/transactions: get: @@ -105,12 +107,6 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - "412": - description: Precondition failed (account transaction index not initialized). - content: - application/json: - schema: - $ref: "#/components/schemas/Error" "429": description: Too many requests. content: @@ -233,12 +229,6 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - "412": - description: Precondition failed (account transfer index not initialized). - content: - application/json: - schema: - $ref: "#/components/schemas/Error" "429": description: Too many requests. content: @@ -361,196 +351,560 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - "412": - description: Precondition failed (account transfer index not initialized). - content: - application/json: - schema: - $ref: "#/components/schemas/Error" "429": description: Too many requests. content: application/json: schema: $ref: "#/components/schemas/Error" -components: - schemas: - AccountTransactionsResponse: - required: - - transactions - type: object - properties: - transactions: + /experimental/v1/scheduled: + get: + tags: + - ScheduledTransactions + summary: List scheduled transactions + description: | + Returns a paginated list of scheduled transactions, ordered descending by scheduled transaction identifier (newest first). + Results can be filtered by status, priority, time range, and transaction handler properties. + operationId: getScheduledTransactions + parameters: + - name: cursor + in: query + description: Opaque pagination cursor from a previous response's `next_cursor` + field. + required: false + style: form + explode: true + schema: + $ref: "#/components/schemas/Cursor" + - name: limit + in: query + description: The maximum number of results to return. + required: false + style: form + explode: true + schema: + maximum: 200 + minimum: 1 + type: integer + default: 50 + - name: statuses + in: query + description: A comma-separated list of scheduled transaction statuses to filter + by. + required: false + style: form + explode: false + schema: + minItems: 1 + uniqueItems: true type: array items: - $ref: "#/components/schemas/AccountTransaction" - next_cursor: - $ref: "#/components/schemas/Cursor" - example: - next_cursor: next_cursor - transactions: - - transaction_id: transaction_id - result: null - _links: null - roles: - - authorizer - - authorizer - block_height: block_height - transaction_index: transaction_index - _expandable: - result: http://example.com/aeiou - transaction: http://example.com/aeiou - transaction: - _links: null - reference_block_id: null - payer: payer - script: script - result: - collection_id: null - error_message: error_message - execution: Pending - status_code: 0 - _links: - _self: _self - block_id: null - computation_used: computation_used - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - status: Pending - envelope_signatures: - - null - - null - gas_limit: gas_limit - payload_signatures: - - address: null - signature: "" - key_index: key_index - - address: null - signature: "" - key_index: key_index - arguments: - - "" - - "" - id: null - authorizers: - - null - - null - _expandable: - result: http://example.com/aeiou - proposal_key: - sequence_number: sequence_number - address: null - key_index: key_index - timestamp: 2000-01-23T04:56:07.000+00:00 - - transaction_id: transaction_id - result: null - _links: null - roles: - - authorizer - - authorizer - block_height: block_height - transaction_index: transaction_index - _expandable: - result: http://example.com/aeiou - transaction: http://example.com/aeiou - transaction: - _links: null - reference_block_id: null - payer: payer - script: script - result: - collection_id: null - error_message: error_message - execution: Pending - status_code: 0 - _links: - _self: _self - block_id: null - computation_used: computation_used - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - status: Pending - envelope_signatures: - - null - - null - gas_limit: gas_limit - payload_signatures: - - address: null - signature: "" - key_index: key_index - - address: null - signature: "" - key_index: key_index - arguments: - - "" - - "" - id: null - authorizers: - - null - - null - _expandable: - result: http://example.com/aeiou - proposal_key: - sequence_number: sequence_number - address: null - key_index: key_index - timestamp: 2000-01-23T04:56:07.000+00:00 - AccountTransaction: - required: - - _expandable - - block_height - - roles - - timestamp - - transaction_id - - transaction_index - type: object - properties: - block_height: + $ref: "#/components/schemas/ScheduledTransactionStatus" + - name: priority + in: query + description: Filter by scheduled transaction priority. + required: false + style: form + explode: true + schema: + $ref: "#/components/schemas/ScheduledTransactionPriority" + - name: start_time + in: query + description: "Filter to include only scheduled transactions with a scheduled\ + \ time at or after this value (inclusive, RFC 3339)." + required: false + style: form + explode: true + schema: type: string - description: Block height where the transaction was included. - format: uint64 - timestamp: + format: date-time + - name: end_time + in: query + description: "Filter to include only scheduled transactions with a scheduled\ + \ time at or before this value (inclusive, RFC 3339)." + required: false + style: form + explode: true + schema: type: string - description: Timestamp of the block where the transaction was included. format: date-time - transaction_id: - $ref: "#/components/schemas/Identifier" - transaction_index: + - name: handler_owner + in: query + description: Filter by the address of the account that owns the transaction + handler. + required: false + style: form + explode: true + schema: + $ref: "#/components/schemas/Address" + - name: handler_type_identifier + in: query + description: Filter by the Cadence type identifier of the transaction handler + (e.g. `A.1654653399040a61.MyScheduler.Handler`). + required: false + style: form + explode: true + schema: type: string - description: Index of the transaction within the block. - format: uint32 - roles: + - name: handler_uuid + in: query + description: Filter by the UUID of the transaction handler resource. + required: false + style: form + explode: true + schema: + type: string + format: uint64 + - name: expand + in: query + description: A comma-separated list indicating which properties of the content + to expand. + required: false + style: form + explode: false + schema: + minItems: 1 + uniqueItems: true type: array items: type: string - enum: - - authorizer - - payer - - proposer - - interacted - transaction: - $ref: "#/components/schemas/Transaction" - result: - $ref: "#/components/schemas/TransactionResult" - _expandable: + - name: select + in: query + description: A comma-separated list indicating which properties of the content + to return. + required: false + style: form + explode: false + schema: + minItems: 1 + uniqueItems: true + type: array + items: + type: string + responses: + "200": + description: A page of scheduled transactions. + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledTransactionsResponse" + "400": + description: "Bad request (invalid filter parameters, cursor, or limit)." + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "429": + description: Too many requests. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /experimental/v1/scheduled/transaction/{id}: + get: + tags: + - ScheduledTransactions + summary: Get scheduled transaction by ID + description: Returns the scheduled transaction with the given ID. + operationId: getScheduledTransactionByID + parameters: + - name: id + in: path + description: The scheduled transaction identifier (hex-encoded). + required: true + style: simple + explode: false + schema: + $ref: "#/components/schemas/Identifier" + - name: expand + in: query + description: A comma-separated list indicating which properties of the content + to expand. + required: false + style: form + explode: false + schema: + minItems: 1 + uniqueItems: true + type: array + items: + type: string + - name: select + in: query + description: A comma-separated list indicating which properties of the content + to return. + required: false + style: form + explode: false + schema: + minItems: 1 + uniqueItems: true + type: array + items: + type: string + responses: + "200": + description: The scheduled transaction. + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledTransaction" + "400": + description: Bad request (invalid transaction ID). + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "404": + description: No scheduled transaction found for the given ID. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "429": + description: Too many requests. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /experimental/v1/scheduled/account/{address}: + get: + tags: + - ScheduledTransactions + - Accounts + summary: List scheduled transactions for an account + description: | + Returns a paginated list of scheduled transactions associated with the given account address, + ordered descending by scheduled time (newest first). + Results can be filtered by status, priority, time range, and transaction handler properties. + operationId: getScheduledTransactionsByAccount + parameters: + - name: address + in: path + description: The account address (hex-encoded without 0x prefix). + required: true + style: simple + explode: false + schema: + $ref: "#/components/schemas/Address" + - name: cursor + in: query + description: Opaque pagination cursor from a previous response's `next_cursor` + field. + required: false + style: form + explode: true + schema: + $ref: "#/components/schemas/Cursor" + - name: limit + in: query + description: The maximum number of results to return. + required: false + style: form + explode: true + schema: + maximum: 200 + minimum: 1 + type: integer + default: 50 + - name: statuses + in: query + description: A comma-separated list of scheduled transaction statuses to filter + by. + required: false + style: form + explode: false + schema: + minItems: 1 + uniqueItems: true + type: array + items: + $ref: "#/components/schemas/ScheduledTransactionStatus" + - name: priority + in: query + description: Filter by scheduled transaction priority. + required: false + style: form + explode: true + schema: + $ref: "#/components/schemas/ScheduledTransactionPriority" + - name: start_time + in: query + description: "Filter to include only scheduled transactions with a scheduled\ + \ time at or after this value (inclusive, RFC 3339)." + required: false + style: form + explode: true + schema: + type: string + format: date-time + - name: end_time + in: query + description: "Filter to include only scheduled transactions with a scheduled\ + \ time at or before this value (inclusive, RFC 3339)." + required: false + style: form + explode: true + schema: + type: string + format: date-time + - name: handler_owner + in: query + description: Filter by the address of the account that owns the transaction + handler. + required: false + style: form + explode: true + schema: + $ref: "#/components/schemas/Address" + - name: handler_type_identifier + in: query + description: Filter by the Cadence type identifier of the transaction handler + (e.g. `A.1654653399040a61.MyScheduler.Handler`). + required: false + style: form + explode: true + schema: + type: string + - name: handler_uuid + in: query + description: Filter by the UUID of the transaction handler resource. + required: false + style: form + explode: true + schema: + type: string + format: uint64 + - name: expand + in: query + description: A comma-separated list indicating which properties of the content + to expand. + required: false + style: form + explode: false + schema: + minItems: 1 + uniqueItems: true + type: array + items: + type: string + - name: select + in: query + description: A comma-separated list indicating which properties of the content + to return. + required: false + style: form + explode: false + schema: + minItems: 1 + uniqueItems: true + type: array + items: + type: string + responses: + "200": + description: A page of scheduled transactions. + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledTransactionsResponse" + "400": + description: "Bad request (invalid address, filter parameters, cursor, or\ + \ limit)." + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "404": + description: No account found for the given address. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "429": + description: Too many requests. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" +components: + schemas: + AccountTransactionsResponse: + required: + - transactions + type: object + properties: + transactions: + type: array + items: + $ref: "#/components/schemas/AccountTransaction" + next_cursor: + $ref: "#/components/schemas/Cursor" + example: + next_cursor: next_cursor + transactions: + - transaction_id: transaction_id + result: null + _links: null + roles: + - authorizer + - authorizer + block_height: block_height + transaction_index: transaction_index + _expandable: + result: http://example.com/aeiou + transaction: http://example.com/aeiou + transaction: + _links: null + reference_block_id: null + payer: payer + script: script + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending + envelope_signatures: + - null + - null + gas_limit: gas_limit + payload_signatures: + - address: null + signature: "" + key_index: key_index + - address: null + signature: "" + key_index: key_index + arguments: + - "" + - "" + id: null + authorizers: + - null + - null + _expandable: + result: http://example.com/aeiou + proposal_key: + sequence_number: sequence_number + address: null + key_index: key_index + timestamp: 2000-01-23T04:56:07.000+00:00 + - transaction_id: transaction_id + result: null + _links: null + roles: + - authorizer + - authorizer + block_height: block_height + transaction_index: transaction_index + _expandable: + result: http://example.com/aeiou + transaction: http://example.com/aeiou + transaction: + _links: null + reference_block_id: null + payer: payer + script: script + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending + envelope_signatures: + - null + - null + gas_limit: gas_limit + payload_signatures: + - address: null + signature: "" + key_index: key_index + - address: null + signature: "" + key_index: key_index + arguments: + - "" + - "" + id: null + authorizers: + - null + - null + _expandable: + result: http://example.com/aeiou + proposal_key: + sequence_number: sequence_number + address: null + key_index: key_index + timestamp: 2000-01-23T04:56:07.000+00:00 + AccountTransaction: + required: + - _expandable + - block_height + - roles + - timestamp + - transaction_id + - transaction_index + type: object + properties: + block_height: + type: string + description: Block height where the transaction was included. + format: uint64 + timestamp: + type: string + description: Timestamp of the block where the transaction was included. + format: date-time + transaction_id: + $ref: "#/components/schemas/Identifier" + transaction_index: + type: string + description: Index of the transaction within the block. + format: uint32 + roles: + type: array + items: + type: string + enum: + - authorizer + - payer + - proposer + - interacted + transaction: + $ref: "#/components/schemas/Transaction" + result: + $ref: "#/components/schemas/TransactionResult" + _expandable: $ref: "#/components/schemas/AccountTransaction__expandable" _links: $ref: "#/components/schemas/Links" @@ -1251,79 +1605,235 @@ components: type: type event_index: event_index status: Pending - nft_id: nft_id - source_address: source_address + nft_id: nft_id + source_address: source_address + _expandable: + result: http://example.com/aeiou + transaction: http://example.com/aeiou + transaction: + _links: null + reference_block_id: null + payer: payer + script: script + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending + envelope_signatures: + - null + - null + gas_limit: gas_limit + payload_signatures: + - address: null + signature: "" + key_index: key_index + - address: null + signature: "" + key_index: key_index + arguments: + - "" + - "" + id: null + authorizers: + - null + - null + _expandable: + result: http://example.com/aeiou + proposal_key: + sequence_number: sequence_number + address: null + key_index: key_index + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + timestamp: 2000-01-23T04:56:07.000+00:00 + FungibleTokenTransfer: + required: + - _expandable + - amount + - block_height + - event_indices + - recipient_address + - source_address + - timestamp + - token_type + - transaction_id + - transaction_index + type: object + properties: + transaction_id: + $ref: "#/components/schemas/Identifier" + block_height: + type: string + description: Block height where the transfer was included. + format: uint64 + timestamp: + type: string + description: Timestamp of the block where the transfer was included. + format: date-time + transaction_index: + type: string + description: Index of the transaction within the block. + format: uint32 + event_indices: + type: array + description: Indices of the events within the transaction that represent + this transfer. + items: + type: string + format: uint32 + token_type: + type: string + description: Fully qualified token type identifier (e.g. `A.1654653399040a61.FlowToken`). + amount: + type: string + description: "Amount of tokens transferred, as a decimal string." + source_address: + $ref: "#/components/schemas/Address" + recipient_address: + $ref: "#/components/schemas/Address" + transaction: + $ref: "#/components/schemas/Transaction" + result: + $ref: "#/components/schemas/TransactionResult" + events: + type: array + items: + $ref: "#/components/schemas/Event" + _expandable: + $ref: "#/components/schemas/AccountTransaction__expandable" + _links: + $ref: "#/components/schemas/Links" + example: + transaction_id: transaction_id + amount: amount + _links: + _self: _self + event_indices: + - event_indices + - event_indices + block_height: block_height + transaction_index: transaction_index + recipient_address: null + token_type: token_type + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending + source_address: source_address + _expandable: + result: http://example.com/aeiou + transaction: http://example.com/aeiou + transaction: + _links: null + reference_block_id: null + payer: payer + script: script + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending + envelope_signatures: + - null + - null + gas_limit: gas_limit + payload_signatures: + - address: null + signature: "" + key_index: key_index + - address: null + signature: "" + key_index: key_index + arguments: + - "" + - "" + id: null + authorizers: + - null + - null _expandable: result: http://example.com/aeiou - transaction: http://example.com/aeiou - transaction: - _links: null - reference_block_id: null - payer: payer - script: script - result: - collection_id: null - error_message: error_message - execution: Pending - status_code: 0 - _links: - _self: _self - block_id: null - computation_used: computation_used - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - status: Pending - envelope_signatures: - - null - - null - gas_limit: gas_limit - payload_signatures: - - address: null - signature: "" - key_index: key_index - - address: null - signature: "" - key_index: key_index - arguments: - - "" - - "" - id: null - authorizers: - - null - - null - _expandable: - result: http://example.com/aeiou - proposal_key: - sequence_number: sequence_number - address: null - key_index: key_index - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - timestamp: 2000-01-23T04:56:07.000+00:00 - FungibleTokenTransfer: + proposal_key: + sequence_number: sequence_number + address: null + key_index: key_index + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + timestamp: 2000-01-23T04:56:07.000+00:00 + NonFungibleTokenTransfer: required: - _expandable - - amount - block_height - event_indices + - nft_id - recipient_address - source_address - timestamp @@ -1355,10 +1865,11 @@ components: format: uint32 token_type: type: string - description: Fully qualified token type identifier (e.g. `A.1654653399040a61.FlowToken`). - amount: + description: Fully qualified NFT collection type (e.g. `A.1654653399040a61.MyNFT`). + nft_id: type: string - description: "Amount of tokens transferred, as a decimal string." + description: Unique identifier of the NFT within its collection. + format: uint64 source_address: $ref: "#/components/schemas/Address" recipient_address: @@ -1377,7 +1888,6 @@ components: $ref: "#/components/schemas/Links" example: transaction_id: transaction_id - amount: amount _links: _self: _self event_indices: @@ -1408,16 +1918,177 @@ components: type: type event_index: event_index status: Pending - source_address: source_address - _expandable: - result: http://example.com/aeiou - transaction: http://example.com/aeiou - transaction: - _links: null - reference_block_id: null - payer: payer - script: script - result: + nft_id: nft_id + source_address: source_address + _expandable: + result: http://example.com/aeiou + transaction: http://example.com/aeiou + transaction: + _links: null + reference_block_id: null + payer: payer + script: script + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending + envelope_signatures: + - null + - null + gas_limit: gas_limit + payload_signatures: + - address: null + signature: "" + key_index: key_index + - address: null + signature: "" + key_index: key_index + arguments: + - "" + - "" + id: null + authorizers: + - null + - null + _expandable: + result: http://example.com/aeiou + proposal_key: + sequence_number: sequence_number + address: null + key_index: key_index + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + timestamp: 2000-01-23T04:56:07.000+00:00 + TransferRole: + type: string + enum: + - sender + - recipient + ScheduledTransactionsResponse: + required: + - transactions + type: object + properties: + transactions: + type: array + items: + $ref: "#/components/schemas/ScheduledTransaction" + next_cursor: + $ref: "#/components/schemas/Cursor" + example: + next_cursor: next_cursor + transactions: + - result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending + handler: + owner: owner + uuid: uuid + type_identifier: type_identifier + _links: + _self: _self + id: id + priority: Low + _expandable: + result: http://example.com/aeiou + transaction: http://example.com/aeiou + transaction: + _links: null + reference_block_id: null + payer: payer + script: script + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending + envelope_signatures: + - null + - null + gas_limit: gas_limit + payload_signatures: + - address: null + signature: "" + key_index: key_index + - address: null + signature: "" + key_index: key_index + arguments: + - "" + - "" + id: null + authorizers: + - null + - null + _expandable: + result: http://example.com/aeiou + proposal_key: + sequence_number: sequence_number + address: null + key_index: key_index + status: Pending + timestamp: 2000-01-23T04:56:07.000+00:00 + - result: collection_id: null error_message: error_message execution: Pending @@ -1438,111 +2109,100 @@ components: type: type event_index: event_index status: Pending - envelope_signatures: - - null - - null - gas_limit: gas_limit - payload_signatures: - - address: null - signature: "" - key_index: key_index - - address: null - signature: "" - key_index: key_index - arguments: - - "" - - "" - id: null - authorizers: - - null - - null + handler: + owner: owner + uuid: uuid + type_identifier: type_identifier + _links: + _self: _self + id: id + priority: Low _expandable: result: http://example.com/aeiou - proposal_key: - sequence_number: sequence_number - address: null - key_index: key_index - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - timestamp: 2000-01-23T04:56:07.000+00:00 - NonFungibleTokenTransfer: + transaction: http://example.com/aeiou + transaction: + _links: null + reference_block_id: null + payer: payer + script: script + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending + envelope_signatures: + - null + - null + gas_limit: gas_limit + payload_signatures: + - address: null + signature: "" + key_index: key_index + - address: null + signature: "" + key_index: key_index + arguments: + - "" + - "" + id: null + authorizers: + - null + - null + _expandable: + result: http://example.com/aeiou + proposal_key: + sequence_number: sequence_number + address: null + key_index: key_index + status: Pending + timestamp: 2000-01-23T04:56:07.000+00:00 + ScheduledTransaction: required: - _expandable - - block_height - - event_indices - - nft_id - - recipient_address - - source_address + - handler + - id + - priority + - status - timestamp - - token_type - - transaction_id - - transaction_index type: object properties: - transaction_id: + id: $ref: "#/components/schemas/Identifier" - block_height: - type: string - description: Block height where the transfer was included. - format: uint64 + status: + $ref: "#/components/schemas/ScheduledTransactionStatus" + priority: + $ref: "#/components/schemas/ScheduledTransactionPriority" timestamp: type: string - description: Timestamp of the block where the transfer was included. + description: The time at which the transaction is scheduled to execute. format: date-time - transaction_index: - type: string - description: Index of the transaction within the block. - format: uint32 - event_indices: - type: array - description: Indices of the events within the transaction that represent - this transfer. - items: - type: string - format: uint32 - token_type: - type: string - description: Fully qualified NFT collection type (e.g. `A.1654653399040a61.MyNFT`). - nft_id: - type: string - description: Unique identifier of the NFT within its collection. - format: uint64 - source_address: - $ref: "#/components/schemas/Address" - recipient_address: - $ref: "#/components/schemas/Address" + handler: + $ref: "#/components/schemas/TransactionHandler" transaction: $ref: "#/components/schemas/Transaction" result: $ref: "#/components/schemas/TransactionResult" - events: - type: array - items: - $ref: "#/components/schemas/Event" _expandable: $ref: "#/components/schemas/AccountTransaction__expandable" _links: $ref: "#/components/schemas/Links" example: - transaction_id: transaction_id - _links: - _self: _self - event_indices: - - event_indices - - event_indices - block_height: block_height - transaction_index: transaction_index - recipient_address: null - token_type: token_type result: collection_id: null error_message: error_message @@ -1564,8 +2224,14 @@ components: type: type event_index: event_index status: Pending - nft_id: nft_id - source_address: source_address + handler: + owner: owner + uuid: uuid + type_identifier: type_identifier + _links: + _self: _self + id: id + priority: Low _expandable: result: http://example.com/aeiou transaction: http://example.com/aeiou @@ -1619,23 +2285,46 @@ components: sequence_number: sequence_number address: null key_index: key_index - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index + status: Pending timestamp: 2000-01-23T04:56:07.000+00:00 - TransferRole: + TransactionHandler: + required: + - owner + - type_identifier + - uuid + type: object + properties: + owner: + $ref: "#/components/schemas/Address" + type_identifier: + type: string + description: Fully qualified Cadence type identifier of the transaction + handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). + uuid: + type: string + description: UUID of the transaction handler resource. + format: uint64 + description: Identifies the Cadence resource responsible for handling the scheduled + transaction. + example: + owner: owner + uuid: uuid + type_identifier: type_identifier + ScheduledTransactionStatus: type: string + description: The current lifecycle status of a scheduled transaction. enum: - - sender - - recipient + - Pending + - Executed + - Failed + - Cancelled + ScheduledTransactionPriority: + type: string + description: The execution priority of a scheduled transaction. + enum: + - Low + - Medium + - High Error: required: - code @@ -1768,3 +2457,78 @@ components: explode: true schema: $ref: "#/components/schemas/TransferRole" + scheduledStatusesParam: + name: statuses + in: query + description: A comma-separated list of scheduled transaction statuses to filter + by. + required: false + style: form + explode: false + schema: + minItems: 1 + uniqueItems: true + type: array + items: + $ref: "#/components/schemas/ScheduledTransactionStatus" + priorityParam: + name: priority + in: query + description: Filter by scheduled transaction priority. + required: false + style: form + explode: true + schema: + $ref: "#/components/schemas/ScheduledTransactionPriority" + startTimeParam: + name: start_time + in: query + description: "Filter to include only scheduled transactions with a scheduled\ + \ time at or after this value (inclusive, RFC 3339)." + required: false + style: form + explode: true + schema: + type: string + format: date-time + endTimeParam: + name: end_time + in: query + description: "Filter to include only scheduled transactions with a scheduled\ + \ time at or before this value (inclusive, RFC 3339)." + required: false + style: form + explode: true + schema: + type: string + format: date-time + handlerOwnerParam: + name: handler_owner + in: query + description: Filter by the address of the account that owns the transaction + handler. + required: false + style: form + explode: true + schema: + $ref: "#/components/schemas/Address" + handlerTypeIdentifierParam: + name: handler_type_identifier + in: query + description: Filter by the Cadence type identifier of the transaction handler + (e.g. `A.1654653399040a61.MyScheduler.Handler`). + required: false + style: form + explode: true + schema: + type: string + handlerUuidParam: + name: handler_uuid + in: query + description: Filter by the UUID of the transaction handler resource. + required: false + style: form + explode: true + schema: + type: string + format: uint64 diff --git a/openapi/experimental/go-client-generated/api_accounts.go b/openapi/experimental/go-client-generated/api_accounts.go index 4c3ea672b..67f812056 100644 --- a/openapi/experimental/go-client-generated/api_accounts.go +++ b/openapi/experimental/go-client-generated/api_accounts.go @@ -170,16 +170,6 @@ func (a *AccountsApiService) GetAccountFungibleTransfers(ctx context.Context, ad newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } - if localVarHttpResponse.StatusCode == 412 { - var v ModelError - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } if localVarHttpResponse.StatusCode == 429 { var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); @@ -340,16 +330,6 @@ func (a *AccountsApiService) GetAccountNonFungibleTransfers(ctx context.Context, newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } - if localVarHttpResponse.StatusCode == 412 { - var v ModelError - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } if localVarHttpResponse.StatusCode == 429 { var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); @@ -495,7 +475,172 @@ func (a *AccountsApiService) GetAccountTransactions(ctx context.Context, address newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } - if localVarHttpResponse.StatusCode == 412 { + if localVarHttpResponse.StatusCode == 429 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +AccountsApiService List scheduled transactions for an account +Returns a paginated list of scheduled transactions associated with the given account address, ordered descending by scheduled time (newest first). Results can be filtered by status, priority, time range, and transaction handler properties. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param address The account address (hex-encoded without 0x prefix). + * @param optional nil or *AccountsApiGetScheduledTransactionsByAccountOpts - Optional Parameters: + * @param "Cursor" (optional.Interface of string) - Opaque pagination cursor from a previous response's `next_cursor` field. + * @param "Limit" (optional.Int32) - The maximum number of results to return. + * @param "Statuses" (optional.Interface of []ScheduledTransactionStatus) - A comma-separated list of scheduled transaction statuses to filter by. + * @param "Priority" (optional.Interface of ScheduledTransactionPriority) - Filter by scheduled transaction priority. + * @param "StartTime" (optional.Time) - Filter to include only scheduled transactions with a scheduled time at or after this value (inclusive, RFC 3339). + * @param "EndTime" (optional.Time) - Filter to include only scheduled transactions with a scheduled time at or before this value (inclusive, RFC 3339). + * @param "HandlerOwner" (optional.Interface of string) - Filter by the address of the account that owns the transaction handler. + * @param "HandlerTypeIdentifier" (optional.String) - Filter by the Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). + * @param "HandlerUuid" (optional.String) - Filter by the UUID of the transaction handler resource. + * @param "Expand" (optional.Interface of []string) - A comma-separated list indicating which properties of the content to expand. + * @param "Select_" (optional.Interface of []string) - A comma-separated list indicating which properties of the content to return. +@return ScheduledTransactionsResponse +*/ + +type AccountsApiGetScheduledTransactionsByAccountOpts struct { + Cursor optional.Interface + Limit optional.Int32 + Statuses optional.Interface + Priority optional.Interface + StartTime optional.Time + EndTime optional.Time + HandlerOwner optional.Interface + HandlerTypeIdentifier optional.String + HandlerUuid optional.String + Expand optional.Interface + Select_ optional.Interface +} + +func (a *AccountsApiService) GetScheduledTransactionsByAccount(ctx context.Context, address string, localVarOptionals *AccountsApiGetScheduledTransactionsByAccountOpts) (ScheduledTransactionsResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ScheduledTransactionsResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/experimental/v1/scheduled/account/{address}" + localVarPath = strings.Replace(localVarPath, "{"+"address"+"}", fmt.Sprintf("%v", address), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Cursor.IsSet() { + localVarQueryParams.Add("cursor", parameterToString(localVarOptionals.Cursor.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Statuses.IsSet() { + localVarQueryParams.Add("statuses", parameterToString(localVarOptionals.Statuses.Value(), "csv")) + } + if localVarOptionals != nil && localVarOptionals.Priority.IsSet() { + localVarQueryParams.Add("priority", parameterToString(localVarOptionals.Priority.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.StartTime.IsSet() { + localVarQueryParams.Add("start_time", parameterToString(localVarOptionals.StartTime.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EndTime.IsSet() { + localVarQueryParams.Add("end_time", parameterToString(localVarOptionals.EndTime.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.HandlerOwner.IsSet() { + localVarQueryParams.Add("handler_owner", parameterToString(localVarOptionals.HandlerOwner.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.HandlerTypeIdentifier.IsSet() { + localVarQueryParams.Add("handler_type_identifier", parameterToString(localVarOptionals.HandlerTypeIdentifier.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.HandlerUuid.IsSet() { + localVarQueryParams.Add("handler_uuid", parameterToString(localVarOptionals.HandlerUuid.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Expand.IsSet() { + localVarQueryParams.Add("expand", parameterToString(localVarOptionals.Expand.Value(), "csv")) + } + if localVarOptionals != nil && localVarOptionals.Select_.IsSet() { + localVarQueryParams.Add("select", parameterToString(localVarOptionals.Select_.Value(), "csv")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ScheduledTransactionsResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { var v ModelError err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); if err != nil { diff --git a/openapi/experimental/go-client-generated/api_scheduled_transactions.go b/openapi/experimental/go-client-generated/api_scheduled_transactions.go new file mode 100644 index 000000000..550abe3a5 --- /dev/null +++ b/openapi/experimental/go-client-generated/api_scheduled_transactions.go @@ -0,0 +1,495 @@ + +/* + * Flow Experimental API + * + * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. + * + * API version: 0.1.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package swagger + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" + "fmt" + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type ScheduledTransactionsApiService service +/* +ScheduledTransactionsApiService Get scheduled transaction by ID +Returns the scheduled transaction with the given ID. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id The scheduled transaction identifier (hex-encoded). + * @param optional nil or *ScheduledTransactionsApiGetScheduledTransactionByIDOpts - Optional Parameters: + * @param "Expand" (optional.Interface of []string) - A comma-separated list indicating which properties of the content to expand. + * @param "Select_" (optional.Interface of []string) - A comma-separated list indicating which properties of the content to return. +@return ScheduledTransaction +*/ + +type ScheduledTransactionsApiGetScheduledTransactionByIDOpts struct { + Expand optional.Interface + Select_ optional.Interface +} + +func (a *ScheduledTransactionsApiService) GetScheduledTransactionByID(ctx context.Context, id string, localVarOptionals *ScheduledTransactionsApiGetScheduledTransactionByIDOpts) (ScheduledTransaction, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ScheduledTransaction + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/experimental/v1/scheduled/transaction/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Expand.IsSet() { + localVarQueryParams.Add("expand", parameterToString(localVarOptionals.Expand.Value(), "csv")) + } + if localVarOptionals != nil && localVarOptionals.Select_.IsSet() { + localVarQueryParams.Add("select", parameterToString(localVarOptionals.Select_.Value(), "csv")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ScheduledTransaction + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 429 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +ScheduledTransactionsApiService List scheduled transactions +Returns a paginated list of scheduled transactions, ordered descending by scheduled transaction identifier (newest first). Results can be filtered by status, priority, time range, and transaction handler properties. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *ScheduledTransactionsApiGetScheduledTransactionsOpts - Optional Parameters: + * @param "Cursor" (optional.Interface of string) - Opaque pagination cursor from a previous response's `next_cursor` field. + * @param "Limit" (optional.Int32) - The maximum number of results to return. + * @param "Statuses" (optional.Interface of []ScheduledTransactionStatus) - A comma-separated list of scheduled transaction statuses to filter by. + * @param "Priority" (optional.Interface of ScheduledTransactionPriority) - Filter by scheduled transaction priority. + * @param "StartTime" (optional.Time) - Filter to include only scheduled transactions with a scheduled time at or after this value (inclusive, RFC 3339). + * @param "EndTime" (optional.Time) - Filter to include only scheduled transactions with a scheduled time at or before this value (inclusive, RFC 3339). + * @param "HandlerOwner" (optional.Interface of string) - Filter by the address of the account that owns the transaction handler. + * @param "HandlerTypeIdentifier" (optional.String) - Filter by the Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). + * @param "HandlerUuid" (optional.String) - Filter by the UUID of the transaction handler resource. + * @param "Expand" (optional.Interface of []string) - A comma-separated list indicating which properties of the content to expand. + * @param "Select_" (optional.Interface of []string) - A comma-separated list indicating which properties of the content to return. +@return ScheduledTransactionsResponse +*/ + +type ScheduledTransactionsApiGetScheduledTransactionsOpts struct { + Cursor optional.Interface + Limit optional.Int32 + Statuses optional.Interface + Priority optional.Interface + StartTime optional.Time + EndTime optional.Time + HandlerOwner optional.Interface + HandlerTypeIdentifier optional.String + HandlerUuid optional.String + Expand optional.Interface + Select_ optional.Interface +} + +func (a *ScheduledTransactionsApiService) GetScheduledTransactions(ctx context.Context, localVarOptionals *ScheduledTransactionsApiGetScheduledTransactionsOpts) (ScheduledTransactionsResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ScheduledTransactionsResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/experimental/v1/scheduled" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Cursor.IsSet() { + localVarQueryParams.Add("cursor", parameterToString(localVarOptionals.Cursor.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Statuses.IsSet() { + localVarQueryParams.Add("statuses", parameterToString(localVarOptionals.Statuses.Value(), "csv")) + } + if localVarOptionals != nil && localVarOptionals.Priority.IsSet() { + localVarQueryParams.Add("priority", parameterToString(localVarOptionals.Priority.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.StartTime.IsSet() { + localVarQueryParams.Add("start_time", parameterToString(localVarOptionals.StartTime.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EndTime.IsSet() { + localVarQueryParams.Add("end_time", parameterToString(localVarOptionals.EndTime.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.HandlerOwner.IsSet() { + localVarQueryParams.Add("handler_owner", parameterToString(localVarOptionals.HandlerOwner.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.HandlerTypeIdentifier.IsSet() { + localVarQueryParams.Add("handler_type_identifier", parameterToString(localVarOptionals.HandlerTypeIdentifier.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.HandlerUuid.IsSet() { + localVarQueryParams.Add("handler_uuid", parameterToString(localVarOptionals.HandlerUuid.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Expand.IsSet() { + localVarQueryParams.Add("expand", parameterToString(localVarOptionals.Expand.Value(), "csv")) + } + if localVarOptionals != nil && localVarOptionals.Select_.IsSet() { + localVarQueryParams.Add("select", parameterToString(localVarOptionals.Select_.Value(), "csv")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ScheduledTransactionsResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 429 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +ScheduledTransactionsApiService List scheduled transactions for an account +Returns a paginated list of scheduled transactions associated with the given account address, ordered descending by scheduled time (newest first). Results can be filtered by status, priority, time range, and transaction handler properties. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param address The account address (hex-encoded without 0x prefix). + * @param optional nil or *ScheduledTransactionsApiGetScheduledTransactionsByAccountOpts - Optional Parameters: + * @param "Cursor" (optional.Interface of string) - Opaque pagination cursor from a previous response's `next_cursor` field. + * @param "Limit" (optional.Int32) - The maximum number of results to return. + * @param "Statuses" (optional.Interface of []ScheduledTransactionStatus) - A comma-separated list of scheduled transaction statuses to filter by. + * @param "Priority" (optional.Interface of ScheduledTransactionPriority) - Filter by scheduled transaction priority. + * @param "StartTime" (optional.Time) - Filter to include only scheduled transactions with a scheduled time at or after this value (inclusive, RFC 3339). + * @param "EndTime" (optional.Time) - Filter to include only scheduled transactions with a scheduled time at or before this value (inclusive, RFC 3339). + * @param "HandlerOwner" (optional.Interface of string) - Filter by the address of the account that owns the transaction handler. + * @param "HandlerTypeIdentifier" (optional.String) - Filter by the Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). + * @param "HandlerUuid" (optional.String) - Filter by the UUID of the transaction handler resource. + * @param "Expand" (optional.Interface of []string) - A comma-separated list indicating which properties of the content to expand. + * @param "Select_" (optional.Interface of []string) - A comma-separated list indicating which properties of the content to return. +@return ScheduledTransactionsResponse +*/ + +type ScheduledTransactionsApiGetScheduledTransactionsByAccountOpts struct { + Cursor optional.Interface + Limit optional.Int32 + Statuses optional.Interface + Priority optional.Interface + StartTime optional.Time + EndTime optional.Time + HandlerOwner optional.Interface + HandlerTypeIdentifier optional.String + HandlerUuid optional.String + Expand optional.Interface + Select_ optional.Interface +} + +func (a *ScheduledTransactionsApiService) GetScheduledTransactionsByAccount(ctx context.Context, address string, localVarOptionals *ScheduledTransactionsApiGetScheduledTransactionsByAccountOpts) (ScheduledTransactionsResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ScheduledTransactionsResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/experimental/v1/scheduled/account/{address}" + localVarPath = strings.Replace(localVarPath, "{"+"address"+"}", fmt.Sprintf("%v", address), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Cursor.IsSet() { + localVarQueryParams.Add("cursor", parameterToString(localVarOptionals.Cursor.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Statuses.IsSet() { + localVarQueryParams.Add("statuses", parameterToString(localVarOptionals.Statuses.Value(), "csv")) + } + if localVarOptionals != nil && localVarOptionals.Priority.IsSet() { + localVarQueryParams.Add("priority", parameterToString(localVarOptionals.Priority.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.StartTime.IsSet() { + localVarQueryParams.Add("start_time", parameterToString(localVarOptionals.StartTime.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EndTime.IsSet() { + localVarQueryParams.Add("end_time", parameterToString(localVarOptionals.EndTime.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.HandlerOwner.IsSet() { + localVarQueryParams.Add("handler_owner", parameterToString(localVarOptionals.HandlerOwner.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.HandlerTypeIdentifier.IsSet() { + localVarQueryParams.Add("handler_type_identifier", parameterToString(localVarOptionals.HandlerTypeIdentifier.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.HandlerUuid.IsSet() { + localVarQueryParams.Add("handler_uuid", parameterToString(localVarOptionals.HandlerUuid.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Expand.IsSet() { + localVarQueryParams.Add("expand", parameterToString(localVarOptionals.Expand.Value(), "csv")) + } + if localVarOptionals != nil && localVarOptionals.Select_.IsSet() { + localVarQueryParams.Add("select", parameterToString(localVarOptionals.Select_.Value(), "csv")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ScheduledTransactionsResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 429 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/openapi/experimental/go-client-generated/client.go b/openapi/experimental/go-client-generated/client.go index a934bf8c6..3438a1190 100644 --- a/openapi/experimental/go-client-generated/client.go +++ b/openapi/experimental/go-client-generated/client.go @@ -45,6 +45,8 @@ type APIClient struct { // API Services AccountsApi *AccountsApiService + + ScheduledTransactionsApi *ScheduledTransactionsApiService } type service struct { @@ -64,6 +66,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { // API Services c.AccountsApi = (*AccountsApiService)(&c.common) + c.ScheduledTransactionsApi = (*ScheduledTransactionsApiService)(&c.common) return c } diff --git a/openapi/experimental/go-client-generated/docs/AccountsApi.md b/openapi/experimental/go-client-generated/docs/AccountsApi.md index 67cb870b0..1003307dd 100644 --- a/openapi/experimental/go-client-generated/docs/AccountsApi.md +++ b/openapi/experimental/go-client-generated/docs/AccountsApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**GetAccountFungibleTransfers**](AccountsApi.md#GetAccountFungibleTransfers) | **Get** /experimental/v1/accounts/{address}/ft/transfers | Get account fungible token transfers [**GetAccountNonFungibleTransfers**](AccountsApi.md#GetAccountNonFungibleTransfers) | **Get** /experimental/v1/accounts/{address}/nft/transfers | Get account non-fungible token transfers [**GetAccountTransactions**](AccountsApi.md#GetAccountTransactions) | **Get** /experimental/v1/accounts/{address}/transactions | Get account transactions +[**GetScheduledTransactionsByAccount**](AccountsApi.md#GetScheduledTransactionsByAccount) | **Get** /experimental/v1/scheduled/account/{address} | List scheduled transactions for an account # **GetAccountFungibleTransfers** > AccountFungibleTransfersResponse GetAccountFungibleTransfers(ctx, address, optional) @@ -134,3 +135,49 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **GetScheduledTransactionsByAccount** +> ScheduledTransactionsResponse GetScheduledTransactionsByAccount(ctx, address, optional) +List scheduled transactions for an account + +Returns a paginated list of scheduled transactions associated with the given account address, ordered descending by scheduled time (newest first). Results can be filtered by status, priority, time range, and transaction handler properties. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **address** | [**string**](.md)| The account address (hex-encoded without 0x prefix). | + **optional** | ***AccountsApiGetScheduledTransactionsByAccountOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a AccountsApiGetScheduledTransactionsByAccountOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **cursor** | [**optional.Interface of string**](.md)| Opaque pagination cursor from a previous response's `next_cursor` field. | + **limit** | **optional.Int32**| The maximum number of results to return. | [default to 50] + **statuses** | [**optional.Interface of []ScheduledTransactionStatus**](ScheduledTransactionStatus.md)| A comma-separated list of scheduled transaction statuses to filter by. | + **priority** | [**optional.Interface of ScheduledTransactionPriority**](.md)| Filter by scheduled transaction priority. | + **startTime** | **optional.Time**| Filter to include only scheduled transactions with a scheduled time at or after this value (inclusive, RFC 3339). | + **endTime** | **optional.Time**| Filter to include only scheduled transactions with a scheduled time at or before this value (inclusive, RFC 3339). | + **handlerOwner** | [**optional.Interface of string**](.md)| Filter by the address of the account that owns the transaction handler. | + **handlerTypeIdentifier** | **optional.String**| Filter by the Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). | + **handlerUuid** | **optional.String**| Filter by the UUID of the transaction handler resource. | + **expand** | [**optional.Interface of []string**](string.md)| A comma-separated list indicating which properties of the content to expand. | + **select_** | [**optional.Interface of []string**](string.md)| A comma-separated list indicating which properties of the content to return. | + +### Return type + +[**ScheduledTransactionsResponse**](ScheduledTransactionsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md b/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md new file mode 100644 index 000000000..e330d9d6b --- /dev/null +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md @@ -0,0 +1,17 @@ +# ScheduledTransaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [default to null] +**Status** | [***ScheduledTransactionStatus**](ScheduledTransactionStatus.md) | | [default to null] +**Priority** | [***ScheduledTransactionPriority**](ScheduledTransactionPriority.md) | | [default to null] +**Timestamp** | [**time.Time**](time.Time.md) | The time at which the transaction is scheduled to execute. | [default to null] +**Handler** | [***TransactionHandler**](TransactionHandler.md) | | [default to null] +**Transaction** | [***Transaction**](Transaction.md) | | [optional] [default to null] +**Result** | [***TransactionResult**](TransactionResult.md) | | [optional] [default to null] +**Expandable** | [***AccountTransactionExpandable**](AccountTransaction__expandable.md) | | [default to null] +**Links** | [***Links**](Links.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransactionPriority.md b/openapi/experimental/go-client-generated/docs/ScheduledTransactionPriority.md new file mode 100644 index 000000000..cfd9695ea --- /dev/null +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransactionPriority.md @@ -0,0 +1,8 @@ +# ScheduledTransactionPriority + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransactionStatus.md b/openapi/experimental/go-client-generated/docs/ScheduledTransactionStatus.md new file mode 100644 index 000000000..b4aa41dd1 --- /dev/null +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransactionStatus.md @@ -0,0 +1,8 @@ +# ScheduledTransactionStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransactionsApi.md b/openapi/experimental/go-client-generated/docs/ScheduledTransactionsApi.md new file mode 100644 index 000000000..2c7796200 --- /dev/null +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransactionsApi.md @@ -0,0 +1,137 @@ +# {{classname}} + +All URIs are relative to *https://rest-testnet.onflow.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetScheduledTransactionByID**](ScheduledTransactionsApi.md#GetScheduledTransactionByID) | **Get** /experimental/v1/scheduled/transaction/{id} | Get scheduled transaction by ID +[**GetScheduledTransactions**](ScheduledTransactionsApi.md#GetScheduledTransactions) | **Get** /experimental/v1/scheduled | List scheduled transactions +[**GetScheduledTransactionsByAccount**](ScheduledTransactionsApi.md#GetScheduledTransactionsByAccount) | **Get** /experimental/v1/scheduled/account/{address} | List scheduled transactions for an account + +# **GetScheduledTransactionByID** +> ScheduledTransaction GetScheduledTransactionByID(ctx, id, optional) +Get scheduled transaction by ID + +Returns the scheduled transaction with the given ID. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | [**string**](.md)| The scheduled transaction identifier (hex-encoded). | + **optional** | ***ScheduledTransactionsApiGetScheduledTransactionByIDOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ScheduledTransactionsApiGetScheduledTransactionByIDOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **expand** | [**optional.Interface of []string**](string.md)| A comma-separated list indicating which properties of the content to expand. | + **select_** | [**optional.Interface of []string**](string.md)| A comma-separated list indicating which properties of the content to return. | + +### Return type + +[**ScheduledTransaction**](ScheduledTransaction.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetScheduledTransactions** +> ScheduledTransactionsResponse GetScheduledTransactions(ctx, optional) +List scheduled transactions + +Returns a paginated list of scheduled transactions, ordered descending by scheduled transaction identifier (newest first). Results can be filtered by status, priority, time range, and transaction handler properties. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ScheduledTransactionsApiGetScheduledTransactionsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ScheduledTransactionsApiGetScheduledTransactionsOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cursor** | [**optional.Interface of string**](.md)| Opaque pagination cursor from a previous response's `next_cursor` field. | + **limit** | **optional.Int32**| The maximum number of results to return. | [default to 50] + **statuses** | [**optional.Interface of []ScheduledTransactionStatus**](ScheduledTransactionStatus.md)| A comma-separated list of scheduled transaction statuses to filter by. | + **priority** | [**optional.Interface of ScheduledTransactionPriority**](.md)| Filter by scheduled transaction priority. | + **startTime** | **optional.Time**| Filter to include only scheduled transactions with a scheduled time at or after this value (inclusive, RFC 3339). | + **endTime** | **optional.Time**| Filter to include only scheduled transactions with a scheduled time at or before this value (inclusive, RFC 3339). | + **handlerOwner** | [**optional.Interface of string**](.md)| Filter by the address of the account that owns the transaction handler. | + **handlerTypeIdentifier** | **optional.String**| Filter by the Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). | + **handlerUuid** | **optional.String**| Filter by the UUID of the transaction handler resource. | + **expand** | [**optional.Interface of []string**](string.md)| A comma-separated list indicating which properties of the content to expand. | + **select_** | [**optional.Interface of []string**](string.md)| A comma-separated list indicating which properties of the content to return. | + +### Return type + +[**ScheduledTransactionsResponse**](ScheduledTransactionsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetScheduledTransactionsByAccount** +> ScheduledTransactionsResponse GetScheduledTransactionsByAccount(ctx, address, optional) +List scheduled transactions for an account + +Returns a paginated list of scheduled transactions associated with the given account address, ordered descending by scheduled time (newest first). Results can be filtered by status, priority, time range, and transaction handler properties. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **address** | [**string**](.md)| The account address (hex-encoded without 0x prefix). | + **optional** | ***ScheduledTransactionsApiGetScheduledTransactionsByAccountOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a ScheduledTransactionsApiGetScheduledTransactionsByAccountOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **cursor** | [**optional.Interface of string**](.md)| Opaque pagination cursor from a previous response's `next_cursor` field. | + **limit** | **optional.Int32**| The maximum number of results to return. | [default to 50] + **statuses** | [**optional.Interface of []ScheduledTransactionStatus**](ScheduledTransactionStatus.md)| A comma-separated list of scheduled transaction statuses to filter by. | + **priority** | [**optional.Interface of ScheduledTransactionPriority**](.md)| Filter by scheduled transaction priority. | + **startTime** | **optional.Time**| Filter to include only scheduled transactions with a scheduled time at or after this value (inclusive, RFC 3339). | + **endTime** | **optional.Time**| Filter to include only scheduled transactions with a scheduled time at or before this value (inclusive, RFC 3339). | + **handlerOwner** | [**optional.Interface of string**](.md)| Filter by the address of the account that owns the transaction handler. | + **handlerTypeIdentifier** | **optional.String**| Filter by the Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). | + **handlerUuid** | **optional.String**| Filter by the UUID of the transaction handler resource. | + **expand** | [**optional.Interface of []string**](string.md)| A comma-separated list indicating which properties of the content to expand. | + **select_** | [**optional.Interface of []string**](string.md)| A comma-separated list indicating which properties of the content to return. | + +### Return type + +[**ScheduledTransactionsResponse**](ScheduledTransactionsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransactionsResponse.md b/openapi/experimental/go-client-generated/docs/ScheduledTransactionsResponse.md new file mode 100644 index 000000000..f018712c8 --- /dev/null +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransactionsResponse.md @@ -0,0 +1,10 @@ +# ScheduledTransactionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Transactions** | [**[]ScheduledTransaction**](ScheduledTransaction.md) | | [default to null] +**NextCursor** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/openapi/experimental/go-client-generated/docs/TransactionHandler.md b/openapi/experimental/go-client-generated/docs/TransactionHandler.md new file mode 100644 index 000000000..421902fc1 --- /dev/null +++ b/openapi/experimental/go-client-generated/docs/TransactionHandler.md @@ -0,0 +1,11 @@ +# TransactionHandler + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Owner** | **string** | | [default to null] +**TypeIdentifier** | **string** | Fully qualified Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). | [default to null] +**Uuid** | **string** | UUID of the transaction handler resource. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/openapi/experimental/go-client-generated/model_scheduled_transaction.go b/openapi/experimental/go-client-generated/model_scheduled_transaction.go new file mode 100644 index 000000000..62d4c4c36 --- /dev/null +++ b/openapi/experimental/go-client-generated/model_scheduled_transaction.go @@ -0,0 +1,25 @@ +/* + * Flow Experimental API + * + * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. + * + * API version: 0.1.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package swagger +import ( + "time" +) + +type ScheduledTransaction struct { + Id string `json:"id"` + Status *ScheduledTransactionStatus `json:"status"` + Priority *ScheduledTransactionPriority `json:"priority"` + // The time at which the transaction is scheduled to execute. + Timestamp time.Time `json:"timestamp"` + Handler *TransactionHandler `json:"handler"` + Transaction *Transaction `json:"transaction,omitempty"` + Result *TransactionResult `json:"result,omitempty"` + Expandable *AccountTransactionExpandable `json:"_expandable"` + Links *Links `json:"_links,omitempty"` +} diff --git a/openapi/experimental/go-client-generated/model_scheduled_transaction_priority.go b/openapi/experimental/go-client-generated/model_scheduled_transaction_priority.go new file mode 100644 index 000000000..5a0aba6b9 --- /dev/null +++ b/openapi/experimental/go-client-generated/model_scheduled_transaction_priority.go @@ -0,0 +1,18 @@ +/* + * Flow Experimental API + * + * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. + * + * API version: 0.1.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package swagger +// ScheduledTransactionPriority : The execution priority of a scheduled transaction. +type ScheduledTransactionPriority string + +// List of ScheduledTransactionPriority +const ( + LOW_ScheduledTransactionPriority ScheduledTransactionPriority = "Low" + MEDIUM_ScheduledTransactionPriority ScheduledTransactionPriority = "Medium" + HIGH_ScheduledTransactionPriority ScheduledTransactionPriority = "High" +) diff --git a/openapi/experimental/go-client-generated/model_scheduled_transaction_status.go b/openapi/experimental/go-client-generated/model_scheduled_transaction_status.go new file mode 100644 index 000000000..b577e2375 --- /dev/null +++ b/openapi/experimental/go-client-generated/model_scheduled_transaction_status.go @@ -0,0 +1,19 @@ +/* + * Flow Experimental API + * + * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. + * + * API version: 0.1.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package swagger +// ScheduledTransactionStatus : The current lifecycle status of a scheduled transaction. +type ScheduledTransactionStatus string + +// List of ScheduledTransactionStatus +const ( + PENDING_ScheduledTransactionStatus ScheduledTransactionStatus = "Pending" + EXECUTED_ScheduledTransactionStatus ScheduledTransactionStatus = "Executed" + FAILED_ScheduledTransactionStatus ScheduledTransactionStatus = "Failed" + CANCELLED_ScheduledTransactionStatus ScheduledTransactionStatus = "Cancelled" +) diff --git a/openapi/experimental/go-client-generated/model_scheduled_transactions_response.go b/openapi/experimental/go-client-generated/model_scheduled_transactions_response.go new file mode 100644 index 000000000..1e2b80a17 --- /dev/null +++ b/openapi/experimental/go-client-generated/model_scheduled_transactions_response.go @@ -0,0 +1,14 @@ +/* + * Flow Experimental API + * + * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. + * + * API version: 0.1.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package swagger + +type ScheduledTransactionsResponse struct { + Transactions []ScheduledTransaction `json:"transactions"` + NextCursor string `json:"next_cursor,omitempty"` +} diff --git a/openapi/experimental/go-client-generated/model_transaction_handler.go b/openapi/experimental/go-client-generated/model_transaction_handler.go new file mode 100644 index 000000000..9a619ba1a --- /dev/null +++ b/openapi/experimental/go-client-generated/model_transaction_handler.go @@ -0,0 +1,18 @@ +/* + * Flow Experimental API + * + * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. + * + * API version: 0.1.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package swagger + +// Identifies the Cadence resource responsible for handling the scheduled transaction. +type TransactionHandler struct { + Owner string `json:"owner"` + // Fully qualified Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). + TypeIdentifier string `json:"type_identifier"` + // UUID of the transaction handler resource. + Uuid string `json:"uuid"` +} diff --git a/openapi/experimental/openapi.yaml b/openapi/experimental/openapi.yaml index a8d33426b..dc84eae03 100644 --- a/openapi/experimental/openapi.yaml +++ b/openapi/experimental/openapi.yaml @@ -17,6 +17,8 @@ security: [] tags: - name: Accounts description: Endpoints for querying account-related data. + - name: ScheduledTransactions + description: Endpoints for querying scheduled transaction data. paths: /experimental/v1/accounts/{address}/transactions: @@ -59,12 +61,6 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - "412": - description: Precondition failed (account transaction index not initialized). - content: - application/json: - schema: - $ref: "#/components/schemas/Error" "429": description: Too many requests. content: @@ -115,12 +111,6 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - "412": - description: Precondition failed (account transfer index not initialized). - content: - application/json: - schema: - $ref: "#/components/schemas/Error" "429": description: Too many requests. content: @@ -171,8 +161,140 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - "412": - description: Precondition failed (account transfer index not initialized). + "429": + description: Too many requests. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + + /experimental/v1/scheduled: + get: + summary: List scheduled transactions + description: | + Returns a paginated list of scheduled transactions, ordered descending by scheduled transaction identifier (newest first). + Results can be filtered by status, priority, time range, and transaction handler properties. + operationId: getScheduledTransactions + tags: + - ScheduledTransactions + parameters: + - $ref: '#/components/parameters/cursorParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/scheduledStatusesParam' + - $ref: '#/components/parameters/priorityParam' + - $ref: '#/components/parameters/startTimeParam' + - $ref: '#/components/parameters/endTimeParam' + - $ref: '#/components/parameters/handlerOwnerParam' + - $ref: '#/components/parameters/handlerTypeIdentifierParam' + - $ref: '#/components/parameters/handlerUuidParam' + - $ref: '#/components/parameters/expandParam' + - $ref: '#/components/parameters/selectParam' + responses: + "200": + description: A page of scheduled transactions. + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledTransactionsResponse" + "400": + description: Bad request (invalid filter parameters, cursor, or limit). + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "429": + description: Too many requests. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + + /experimental/v1/scheduled/transaction/{id}: + get: + summary: Get scheduled transaction by ID + description: Returns the scheduled transaction with the given ID. + operationId: getScheduledTransactionByID + tags: + - ScheduledTransactions + parameters: + - name: id + in: path + required: true + description: The scheduled transaction identifier (hex-encoded). + schema: + $ref: '#/components/schemas/Identifier' + - $ref: '#/components/parameters/expandParam' + - $ref: '#/components/parameters/selectParam' + responses: + "200": + description: The scheduled transaction. + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledTransaction" + "400": + description: Bad request (invalid transaction ID). + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "404": + description: No scheduled transaction found for the given ID. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "429": + description: Too many requests. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + + /experimental/v1/scheduled/account/{address}: + get: + summary: List scheduled transactions for an account + description: | + Returns a paginated list of scheduled transactions associated with the given account address, + ordered descending by scheduled time (newest first). + Results can be filtered by status, priority, time range, and transaction handler properties. + operationId: getScheduledTransactionsByAccount + tags: + - ScheduledTransactions + - Accounts + parameters: + - name: address + in: path + required: true + description: The account address (hex-encoded without 0x prefix). + schema: + $ref: '#/components/schemas/Address' + - $ref: '#/components/parameters/cursorParam' + - $ref: '#/components/parameters/limitParam' + - $ref: '#/components/parameters/scheduledStatusesParam' + - $ref: '#/components/parameters/priorityParam' + - $ref: '#/components/parameters/startTimeParam' + - $ref: '#/components/parameters/endTimeParam' + - $ref: '#/components/parameters/handlerOwnerParam' + - $ref: '#/components/parameters/handlerTypeIdentifierParam' + - $ref: '#/components/parameters/handlerUuidParam' + - $ref: '#/components/parameters/expandParam' + - $ref: '#/components/parameters/selectParam' + responses: + "200": + description: A page of scheduled transactions. + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledTransactionsResponse" + "400": + description: Bad request (invalid address, filter parameters, cursor, or limit). + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "404": + description: No account found for the given address. content: application/json: schema: @@ -268,6 +390,64 @@ components: schema: $ref: '#/components/schemas/TransferRole' required: false + scheduledStatusesParam: + description: A comma-separated list of scheduled transaction statuses to filter by. + name: statuses + in: query + schema: + type: array + items: + $ref: '#/components/schemas/ScheduledTransactionStatus' + minItems: 1 + uniqueItems: true + explode: false + style: form + required: false + priorityParam: + description: Filter by scheduled transaction priority. + name: priority + in: query + schema: + $ref: '#/components/schemas/ScheduledTransactionPriority' + required: false + startTimeParam: + description: Filter to include only scheduled transactions with a scheduled time at or after this value (inclusive, RFC 3339). + name: start_time + in: query + schema: + type: string + format: date-time + required: false + endTimeParam: + description: Filter to include only scheduled transactions with a scheduled time at or before this value (inclusive, RFC 3339). + name: end_time + in: query + schema: + type: string + format: date-time + required: false + handlerOwnerParam: + description: Filter by the address of the account that owns the transaction handler. + name: handler_owner + in: query + schema: + $ref: '#/components/schemas/Address' + required: false + handlerTypeIdentifierParam: + description: Filter by the Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). + name: handler_type_identifier + in: query + schema: + type: string + required: false + handlerUuidParam: + description: Filter by the UUID of the transaction handler resource. + name: handler_uuid + in: query + schema: + type: string + format: uint64 + required: false schemas: AccountTransactionsResponse: @@ -687,6 +867,91 @@ components: - sender - recipient + ScheduledTransactionsResponse: + type: object + required: + - transactions + properties: + transactions: + type: array + items: + $ref: "#/components/schemas/ScheduledTransaction" + next_cursor: + $ref: '#/components/schemas/Cursor' + ScheduledTransaction: + type: object + required: + - id + - status + - priority + - timestamp + - handler + - _expandable + properties: + id: + $ref: '#/components/schemas/Identifier' + status: + $ref: '#/components/schemas/ScheduledTransactionStatus' + priority: + $ref: '#/components/schemas/ScheduledTransactionPriority' + timestamp: + description: The time at which the transaction is scheduled to execute. + type: string + format: date-time + handler: + $ref: '#/components/schemas/TransactionHandler' + transaction: + $ref: '#/components/schemas/Transaction' + result: + $ref: '#/components/schemas/TransactionResult' + _expandable: + type: object + description: Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`. + properties: + transaction: + type: string + format: uri + description: Link to fetch the full transaction body. + result: + type: string + format: uri + description: Link to fetch the transaction result. + _links: + $ref: '#/components/schemas/Links' + TransactionHandler: + type: object + description: Identifies the Cadence resource responsible for handling the scheduled transaction. + required: + - owner + - type_identifier + - uuid + properties: + owner: + description: Address of the account that owns the transaction handler resource. + $ref: '#/components/schemas/Address' + type_identifier: + description: Fully qualified Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). + type: string + uuid: + description: UUID of the transaction handler resource. + type: string + format: uint64 + ScheduledTransactionStatus: + type: string + description: The current lifecycle status of a scheduled transaction. + enum: + - Pending + - Executed + - Failed + - Cancelled + ScheduledTransactionPriority: + type: string + description: The execution priority of a scheduled transaction. + enum: + - Low + - Medium + - High + Error: type: object required: From 4b3763103a5df100fd618a2332ebd9463d628c89 Mon Sep 17 00:00:00 2001 From: Peter Argue <89119817+peterargue@users.noreply.github.com> Date: Sat, 21 Feb 2026 12:53:53 -0800 Subject: [PATCH 2/6] add more fields --- .../go-client-generated/README.md | 1 - .../go-client-generated/api/swagger.yaml | 386 +++++------------- .../docs/ScheduledTransaction.md | 20 +- .../docs/ScheduledTransactionsResponse.md | 2 +- .../docs/TransactionHandler.md | 11 - .../model_scheduled_transaction.go | 31 +- .../model_scheduled_transaction_priority.go | 6 +- .../model_scheduled_transaction_status.go | 8 +- .../model_scheduled_transactions_response.go | 2 +- .../model_transaction_handler.go | 18 - openapi/experimental/openapi.yaml | 99 ++--- 11 files changed, 194 insertions(+), 390 deletions(-) delete mode 100644 openapi/experimental/go-client-generated/docs/TransactionHandler.md delete mode 100644 openapi/experimental/go-client-generated/model_transaction_handler.go diff --git a/openapi/experimental/go-client-generated/README.md b/openapi/experimental/go-client-generated/README.md index 931f7051e..aedc1896f 100644 --- a/openapi/experimental/go-client-generated/README.md +++ b/openapi/experimental/go-client-generated/README.md @@ -50,7 +50,6 @@ Class | Method | HTTP request | Description - [Transaction](docs/Transaction.md) - [TransactionExecution](docs/TransactionExecution.md) - [TransactionExpandable](docs/TransactionExpandable.md) - - [TransactionHandler](docs/TransactionHandler.md) - [TransactionResult](docs/TransactionResult.md) - [TransactionSignature](docs/TransactionSignature.md) - [TransactionStatus](docs/TransactionStatus.md) diff --git a/openapi/experimental/go-client-generated/api/swagger.yaml b/openapi/experimental/go-client-generated/api/swagger.yaml index d093d81bc..7fa376df9 100644 --- a/openapi/experimental/go-client-generated/api/swagger.yaml +++ b/openapi/experimental/go-client-generated/api/swagger.yaml @@ -1992,339 +1992,147 @@ components: - recipient ScheduledTransactionsResponse: required: - - transactions + - scheduled_transactions type: object properties: - transactions: + scheduled_transactions: type: array items: $ref: "#/components/schemas/ScheduledTransaction" next_cursor: $ref: "#/components/schemas/Cursor" example: - next_cursor: next_cursor - transactions: - - result: - collection_id: null - error_message: error_message - execution: Pending - status_code: 0 - _links: - _self: _self - block_id: null - computation_used: computation_used - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - status: Pending - handler: - owner: owner - uuid: uuid - type_identifier: type_identifier + scheduled_transactions: + - fees: fees + fees_deducted: fees_deducted + transaction_handler_public_path: transaction_handler_public_path _links: _self: _self + failed_transaction_id: null + priority: low + transaction_handler_type_identifier: transaction_handler_type_identifier + execution_effort: execution_effort + transaction_handler_owner: transaction_handler_owner + transaction_handler_uuid: transaction_handler_uuid + scheduled_transaction_id: scheduled_transaction_id + cancelled_transaction_id: null id: id - priority: Low - _expandable: - result: http://example.com/aeiou - transaction: http://example.com/aeiou - transaction: - _links: null - reference_block_id: null - payer: payer - script: script - result: - collection_id: null - error_message: error_message - execution: Pending - status_code: 0 - _links: - _self: _self - block_id: null - computation_used: computation_used - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - status: Pending - envelope_signatures: - - null - - null - gas_limit: gas_limit - payload_signatures: - - address: null - signature: "" - key_index: key_index - - address: null - signature: "" - key_index: key_index - arguments: - - "" - - "" - id: null - authorizers: - - null - - null - _expandable: - result: http://example.com/aeiou - proposal_key: - sequence_number: sequence_number - address: null - key_index: key_index - status: Pending - timestamp: 2000-01-23T04:56:07.000+00:00 - - result: - collection_id: null - error_message: error_message - execution: Pending - status_code: 0 - _links: - _self: _self - block_id: null - computation_used: computation_used - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - status: Pending - handler: - owner: owner - uuid: uuid - type_identifier: type_identifier + executed_transaction_id: null + fees_returned: fees_returned + status: scheduled + timestamp: timestamp + - fees: fees + fees_deducted: fees_deducted + transaction_handler_public_path: transaction_handler_public_path _links: _self: _self + failed_transaction_id: null + priority: low + transaction_handler_type_identifier: transaction_handler_type_identifier + execution_effort: execution_effort + transaction_handler_owner: transaction_handler_owner + transaction_handler_uuid: transaction_handler_uuid + scheduled_transaction_id: scheduled_transaction_id + cancelled_transaction_id: null id: id - priority: Low - _expandable: - result: http://example.com/aeiou - transaction: http://example.com/aeiou - transaction: - _links: null - reference_block_id: null - payer: payer - script: script - result: - collection_id: null - error_message: error_message - execution: Pending - status_code: 0 - _links: - _self: _self - block_id: null - computation_used: computation_used - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - status: Pending - envelope_signatures: - - null - - null - gas_limit: gas_limit - payload_signatures: - - address: null - signature: "" - key_index: key_index - - address: null - signature: "" - key_index: key_index - arguments: - - "" - - "" - id: null - authorizers: - - null - - null - _expandable: - result: http://example.com/aeiou - proposal_key: - sequence_number: sequence_number - address: null - key_index: key_index - status: Pending - timestamp: 2000-01-23T04:56:07.000+00:00 + executed_transaction_id: null + fees_returned: fees_returned + status: scheduled + timestamp: timestamp + next_cursor: next_cursor ScheduledTransaction: required: - - _expandable - - handler + - execution_effort + - fees - id - priority - status - timestamp + - transaction_handler_owner + - transaction_handler_type_identifier + - transaction_handler_uuid type: object properties: id: - $ref: "#/components/schemas/Identifier" + type: string + description: Scheduler-assigned uint64 identifier. + format: uint64 status: $ref: "#/components/schemas/ScheduledTransactionStatus" priority: $ref: "#/components/schemas/ScheduledTransactionPriority" timestamp: type: string - description: The time at which the transaction is scheduled to execute. - format: date-time - handler: - $ref: "#/components/schemas/TransactionHandler" - transaction: - $ref: "#/components/schemas/Transaction" - result: - $ref: "#/components/schemas/TransactionResult" - _expandable: - $ref: "#/components/schemas/AccountTransaction__expandable" - _links: - $ref: "#/components/schemas/Links" - example: - result: - collection_id: null - error_message: error_message - execution: Pending - status_code: 0 - _links: - _self: _self - block_id: null - computation_used: computation_used - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - status: Pending - handler: - owner: owner - uuid: uuid - type_identifier: type_identifier - _links: - _self: _self - id: id - priority: Low - _expandable: - result: http://example.com/aeiou - transaction: http://example.com/aeiou - transaction: - _links: null - reference_block_id: null - payer: payer - script: script - result: - collection_id: null - error_message: error_message - execution: Pending - status_code: 0 - _links: - _self: _self - block_id: null - computation_used: computation_used - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - status: Pending - envelope_signatures: - - null - - null - gas_limit: gas_limit - payload_signatures: - - address: null - signature: "" - key_index: key_index - - address: null - signature: "" - key_index: key_index - arguments: - - "" - - "" - id: null - authorizers: - - null - - null - _expandable: - result: http://example.com/aeiou - proposal_key: - sequence_number: sequence_number - address: null - key_index: key_index - status: Pending - timestamp: 2000-01-23T04:56:07.000+00:00 - TransactionHandler: - required: - - owner - - type_identifier - - uuid - type: object - properties: - owner: + description: Scheduled execution timestamp as a UFix64 decimal string. + execution_effort: + type: string + description: Execution effort estimate as a UFix64 decimal string. + fees: + type: string + description: Scheduled fee as a UFix64 decimal string. + transaction_handler_owner: $ref: "#/components/schemas/Address" - type_identifier: + transaction_handler_type_identifier: type: string description: Fully qualified Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). - uuid: + transaction_handler_uuid: type: string - description: UUID of the transaction handler resource. + description: Resource UUID of the transaction handler. format: uint64 - description: Identifies the Cadence resource responsible for handling the scheduled - transaction. + transaction_handler_public_path: + type: string + description: "Public path of the transaction handler, if set." + fees_returned: + type: string + description: "Fees returned on cancellation, as a UFix64 decimal string." + fees_deducted: + type: string + description: "Fees deducted on cancellation, as a UFix64 decimal string." + scheduled_transaction_id: + $ref: "#/components/schemas/Identifier" + executed_transaction_id: + $ref: "#/components/schemas/Identifier" + cancelled_transaction_id: + $ref: "#/components/schemas/Identifier" + failed_transaction_id: + $ref: "#/components/schemas/Identifier" + _links: + $ref: "#/components/schemas/Links" example: - owner: owner - uuid: uuid - type_identifier: type_identifier + fees: fees + fees_deducted: fees_deducted + transaction_handler_public_path: transaction_handler_public_path + _links: + _self: _self + failed_transaction_id: null + priority: low + transaction_handler_type_identifier: transaction_handler_type_identifier + execution_effort: execution_effort + transaction_handler_owner: transaction_handler_owner + transaction_handler_uuid: transaction_handler_uuid + scheduled_transaction_id: scheduled_transaction_id + cancelled_transaction_id: null + id: id + executed_transaction_id: null + fees_returned: fees_returned + status: scheduled + timestamp: timestamp ScheduledTransactionStatus: type: string description: The current lifecycle status of a scheduled transaction. enum: - - Pending - - Executed - - Failed - - Cancelled + - scheduled + - executed + - cancelled + - failed ScheduledTransactionPriority: type: string description: The execution priority of a scheduled transaction. enum: - - Low - - Medium - - High + - low + - medium + - high Error: required: - code diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md b/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md index e330d9d6b..7666d6632 100644 --- a/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md @@ -3,14 +3,22 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | | [default to null] +**Id** | **string** | Scheduler-assigned uint64 identifier. | [default to null] **Status** | [***ScheduledTransactionStatus**](ScheduledTransactionStatus.md) | | [default to null] **Priority** | [***ScheduledTransactionPriority**](ScheduledTransactionPriority.md) | | [default to null] -**Timestamp** | [**time.Time**](time.Time.md) | The time at which the transaction is scheduled to execute. | [default to null] -**Handler** | [***TransactionHandler**](TransactionHandler.md) | | [default to null] -**Transaction** | [***Transaction**](Transaction.md) | | [optional] [default to null] -**Result** | [***TransactionResult**](TransactionResult.md) | | [optional] [default to null] -**Expandable** | [***AccountTransactionExpandable**](AccountTransaction__expandable.md) | | [default to null] +**Timestamp** | **string** | Scheduled execution timestamp as a UFix64 decimal string. | [default to null] +**ExecutionEffort** | **string** | Execution effort estimate as a UFix64 decimal string. | [default to null] +**Fees** | **string** | Scheduled fee as a UFix64 decimal string. | [default to null] +**TransactionHandlerOwner** | **string** | | [default to null] +**TransactionHandlerTypeIdentifier** | **string** | Fully qualified Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). | [default to null] +**TransactionHandlerUuid** | **string** | Resource UUID of the transaction handler. | [default to null] +**TransactionHandlerPublicPath** | **string** | Public path of the transaction handler, if set. | [optional] [default to null] +**FeesReturned** | **string** | Fees returned on cancellation, as a UFix64 decimal string. | [optional] [default to null] +**FeesDeducted** | **string** | Fees deducted on cancellation, as a UFix64 decimal string. | [optional] [default to null] +**ScheduledTransactionId** | **string** | | [optional] [default to null] +**ExecutedTransactionId** | **string** | | [optional] [default to null] +**CancelledTransactionId** | **string** | | [optional] [default to null] +**FailedTransactionId** | **string** | | [optional] [default to null] **Links** | [***Links**](Links.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransactionsResponse.md b/openapi/experimental/go-client-generated/docs/ScheduledTransactionsResponse.md index f018712c8..488560d21 100644 --- a/openapi/experimental/go-client-generated/docs/ScheduledTransactionsResponse.md +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransactionsResponse.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Transactions** | [**[]ScheduledTransaction**](ScheduledTransaction.md) | | [default to null] +**ScheduledTransactions** | [**[]ScheduledTransaction**](ScheduledTransaction.md) | | [default to null] **NextCursor** | **string** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/openapi/experimental/go-client-generated/docs/TransactionHandler.md b/openapi/experimental/go-client-generated/docs/TransactionHandler.md deleted file mode 100644 index 421902fc1..000000000 --- a/openapi/experimental/go-client-generated/docs/TransactionHandler.md +++ /dev/null @@ -1,11 +0,0 @@ -# TransactionHandler - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Owner** | **string** | | [default to null] -**TypeIdentifier** | **string** | Fully qualified Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). | [default to null] -**Uuid** | **string** | UUID of the transaction handler resource. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/openapi/experimental/go-client-generated/model_scheduled_transaction.go b/openapi/experimental/go-client-generated/model_scheduled_transaction.go index 62d4c4c36..b80a0f91b 100644 --- a/openapi/experimental/go-client-generated/model_scheduled_transaction.go +++ b/openapi/experimental/go-client-generated/model_scheduled_transaction.go @@ -7,19 +7,32 @@ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package swagger -import ( - "time" -) type ScheduledTransaction struct { + // Scheduler-assigned uint64 identifier. Id string `json:"id"` Status *ScheduledTransactionStatus `json:"status"` Priority *ScheduledTransactionPriority `json:"priority"` - // The time at which the transaction is scheduled to execute. - Timestamp time.Time `json:"timestamp"` - Handler *TransactionHandler `json:"handler"` - Transaction *Transaction `json:"transaction,omitempty"` - Result *TransactionResult `json:"result,omitempty"` - Expandable *AccountTransactionExpandable `json:"_expandable"` + // Scheduled execution timestamp as a UFix64 decimal string. + Timestamp string `json:"timestamp"` + // Execution effort estimate as a UFix64 decimal string. + ExecutionEffort string `json:"execution_effort"` + // Scheduled fee as a UFix64 decimal string. + Fees string `json:"fees"` + TransactionHandlerOwner string `json:"transaction_handler_owner"` + // Fully qualified Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). + TransactionHandlerTypeIdentifier string `json:"transaction_handler_type_identifier"` + // Resource UUID of the transaction handler. + TransactionHandlerUuid string `json:"transaction_handler_uuid"` + // Public path of the transaction handler, if set. + TransactionHandlerPublicPath string `json:"transaction_handler_public_path,omitempty"` + // Fees returned on cancellation, as a UFix64 decimal string. + FeesReturned string `json:"fees_returned,omitempty"` + // Fees deducted on cancellation, as a UFix64 decimal string. + FeesDeducted string `json:"fees_deducted,omitempty"` + ScheduledTransactionId string `json:"scheduled_transaction_id,omitempty"` + ExecutedTransactionId string `json:"executed_transaction_id,omitempty"` + CancelledTransactionId string `json:"cancelled_transaction_id,omitempty"` + FailedTransactionId string `json:"failed_transaction_id,omitempty"` Links *Links `json:"_links,omitempty"` } diff --git a/openapi/experimental/go-client-generated/model_scheduled_transaction_priority.go b/openapi/experimental/go-client-generated/model_scheduled_transaction_priority.go index 5a0aba6b9..2719643d2 100644 --- a/openapi/experimental/go-client-generated/model_scheduled_transaction_priority.go +++ b/openapi/experimental/go-client-generated/model_scheduled_transaction_priority.go @@ -12,7 +12,7 @@ type ScheduledTransactionPriority string // List of ScheduledTransactionPriority const ( - LOW_ScheduledTransactionPriority ScheduledTransactionPriority = "Low" - MEDIUM_ScheduledTransactionPriority ScheduledTransactionPriority = "Medium" - HIGH_ScheduledTransactionPriority ScheduledTransactionPriority = "High" + LOW_ScheduledTransactionPriority ScheduledTransactionPriority = "low" + MEDIUM_ScheduledTransactionPriority ScheduledTransactionPriority = "medium" + HIGH_ScheduledTransactionPriority ScheduledTransactionPriority = "high" ) diff --git a/openapi/experimental/go-client-generated/model_scheduled_transaction_status.go b/openapi/experimental/go-client-generated/model_scheduled_transaction_status.go index b577e2375..3526ba525 100644 --- a/openapi/experimental/go-client-generated/model_scheduled_transaction_status.go +++ b/openapi/experimental/go-client-generated/model_scheduled_transaction_status.go @@ -12,8 +12,8 @@ type ScheduledTransactionStatus string // List of ScheduledTransactionStatus const ( - PENDING_ScheduledTransactionStatus ScheduledTransactionStatus = "Pending" - EXECUTED_ScheduledTransactionStatus ScheduledTransactionStatus = "Executed" - FAILED_ScheduledTransactionStatus ScheduledTransactionStatus = "Failed" - CANCELLED_ScheduledTransactionStatus ScheduledTransactionStatus = "Cancelled" + SCHEDULED_ScheduledTransactionStatus ScheduledTransactionStatus = "scheduled" + EXECUTED_ScheduledTransactionStatus ScheduledTransactionStatus = "executed" + CANCELLED_ScheduledTransactionStatus ScheduledTransactionStatus = "cancelled" + FAILED_ScheduledTransactionStatus ScheduledTransactionStatus = "failed" ) diff --git a/openapi/experimental/go-client-generated/model_scheduled_transactions_response.go b/openapi/experimental/go-client-generated/model_scheduled_transactions_response.go index 1e2b80a17..32422ac66 100644 --- a/openapi/experimental/go-client-generated/model_scheduled_transactions_response.go +++ b/openapi/experimental/go-client-generated/model_scheduled_transactions_response.go @@ -9,6 +9,6 @@ package swagger type ScheduledTransactionsResponse struct { - Transactions []ScheduledTransaction `json:"transactions"` + ScheduledTransactions []ScheduledTransaction `json:"scheduled_transactions"` NextCursor string `json:"next_cursor,omitempty"` } diff --git a/openapi/experimental/go-client-generated/model_transaction_handler.go b/openapi/experimental/go-client-generated/model_transaction_handler.go deleted file mode 100644 index 9a619ba1a..000000000 --- a/openapi/experimental/go-client-generated/model_transaction_handler.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Flow Experimental API - * - * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. - * - * API version: 0.1.0 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package swagger - -// Identifies the Cadence resource responsible for handling the scheduled transaction. -type TransactionHandler struct { - Owner string `json:"owner"` - // Fully qualified Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). - TypeIdentifier string `json:"type_identifier"` - // UUID of the transaction handler resource. - Uuid string `json:"uuid"` -} diff --git a/openapi/experimental/openapi.yaml b/openapi/experimental/openapi.yaml index dc84eae03..ffe7e1c45 100644 --- a/openapi/experimental/openapi.yaml +++ b/openapi/experimental/openapi.yaml @@ -870,9 +870,9 @@ components: ScheduledTransactionsResponse: type: object required: - - transactions + - scheduled_transactions properties: - transactions: + scheduled_transactions: type: array items: $ref: "#/components/schemas/ScheduledTransaction" @@ -885,72 +885,77 @@ components: - status - priority - timestamp - - handler - - _expandable + - execution_effort + - fees + - transaction_handler_owner + - transaction_handler_type_identifier + - transaction_handler_uuid properties: id: - $ref: '#/components/schemas/Identifier' + description: Scheduler-assigned uint64 identifier. + type: string + format: uint64 status: $ref: '#/components/schemas/ScheduledTransactionStatus' priority: $ref: '#/components/schemas/ScheduledTransactionPriority' timestamp: - description: The time at which the transaction is scheduled to execute. + description: Scheduled execution timestamp as a UFix64 decimal string. type: string - format: date-time - handler: - $ref: '#/components/schemas/TransactionHandler' - transaction: - $ref: '#/components/schemas/Transaction' - result: - $ref: '#/components/schemas/TransactionResult' - _expandable: - type: object - description: Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`. - properties: - transaction: - type: string - format: uri - description: Link to fetch the full transaction body. - result: - type: string - format: uri - description: Link to fetch the transaction result. - _links: - $ref: '#/components/schemas/Links' - TransactionHandler: - type: object - description: Identifies the Cadence resource responsible for handling the scheduled transaction. - required: - - owner - - type_identifier - - uuid - properties: - owner: - description: Address of the account that owns the transaction handler resource. + execution_effort: + description: Execution effort estimate as a UFix64 decimal string. + type: string + fees: + description: Scheduled fee as a UFix64 decimal string. + type: string + transaction_handler_owner: + description: Address of the account that owns the transaction handler. $ref: '#/components/schemas/Address' - type_identifier: + transaction_handler_type_identifier: description: Fully qualified Cadence type identifier of the transaction handler (e.g. `A.1654653399040a61.MyScheduler.Handler`). type: string - uuid: - description: UUID of the transaction handler resource. + transaction_handler_uuid: + description: Resource UUID of the transaction handler. type: string format: uint64 + transaction_handler_public_path: + description: Public path of the transaction handler, if set. + type: string + fees_returned: + description: Fees returned on cancellation, as a UFix64 decimal string. + type: string + fees_deducted: + description: Fees deducted on cancellation, as a UFix64 decimal string. + type: string + scheduled_transaction_id: + description: Flow transaction ID of the scheduling transaction. + $ref: '#/components/schemas/Identifier' + executed_transaction_id: + description: Flow transaction ID of the execution transaction. + $ref: '#/components/schemas/Identifier' + cancelled_transaction_id: + description: Flow transaction ID of the cancellation transaction. + $ref: '#/components/schemas/Identifier' + failed_transaction_id: + description: Flow transaction ID of the failure transaction. + $ref: '#/components/schemas/Identifier' + _links: + $ref: '#/components/schemas/Links' ScheduledTransactionStatus: type: string description: The current lifecycle status of a scheduled transaction. enum: - - Pending - - Executed - - Failed - - Cancelled + - scheduled + - executed + - cancelled + - failed ScheduledTransactionPriority: type: string description: The execution priority of a scheduled transaction. enum: - - Low - - Medium - - High + - low + - medium + - high Error: type: object From 722ffcc80d7aa12410a97044f0e8ec3da9aded5e Mon Sep 17 00:00:00 2001 From: Peter Argue <89119817+peterargue@users.noreply.github.com> Date: Sat, 21 Feb 2026 13:20:24 -0800 Subject: [PATCH 3/6] add expandable --- .../go-client-generated/api/swagger.yaml | 86 +++---------------- .../docs/FungibleTokenTransfer.md | 1 - .../docs/NonFungibleTokenTransfer.md | 1 - .../docs/ScheduledTransaction.md | 1 + .../model_fungible_token_transfer.go | 1 - .../model_non_fungible_token_transfer.go | 1 - .../model_scheduled_transaction.go | 1 + openapi/experimental/openapi.yaml | 21 +++-- 8 files changed, 27 insertions(+), 86 deletions(-) diff --git a/openapi/experimental/go-client-generated/api/swagger.yaml b/openapi/experimental/go-client-generated/api/swagger.yaml index 7fa376df9..4f2c6ed03 100644 --- a/openapi/experimental/go-client-generated/api/swagger.yaml +++ b/openapi/experimental/go-client-generated/api/swagger.yaml @@ -1352,17 +1352,6 @@ components: sequence_number: sequence_number address: null key_index: key_index - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index timestamp: 2000-01-23T04:56:07.000+00:00 - transaction_id: transaction_id amount: amount @@ -1450,17 +1439,6 @@ components: sequence_number: sequence_number address: null key_index: key_index - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index timestamp: 2000-01-23T04:56:07.000+00:00 AccountNonFungibleTransfersResponse: required: @@ -1562,17 +1540,6 @@ components: sequence_number: sequence_number address: null key_index: key_index - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index timestamp: 2000-01-23T04:56:07.000+00:00 - transaction_id: transaction_id _links: @@ -1660,17 +1627,6 @@ components: sequence_number: sequence_number address: null key_index: key_index - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index timestamp: 2000-01-23T04:56:07.000+00:00 FungibleTokenTransfer: required: @@ -1721,10 +1677,6 @@ components: $ref: "#/components/schemas/Transaction" result: $ref: "#/components/schemas/TransactionResult" - events: - type: array - items: - $ref: "#/components/schemas/Event" _expandable: $ref: "#/components/schemas/AccountTransaction__expandable" _links: @@ -1816,17 +1768,6 @@ components: sequence_number: sequence_number address: null key_index: key_index - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index timestamp: 2000-01-23T04:56:07.000+00:00 NonFungibleTokenTransfer: required: @@ -1878,10 +1819,6 @@ components: $ref: "#/components/schemas/Transaction" result: $ref: "#/components/schemas/TransactionResult" - events: - type: array - items: - $ref: "#/components/schemas/Event" _expandable: $ref: "#/components/schemas/AccountTransaction__expandable" _links: @@ -1973,17 +1910,6 @@ components: sequence_number: sequence_number address: null key_index: key_index - events: - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index - - transaction_id: null - payload: "" - transaction_index: transaction_index - type: type - event_index: event_index timestamp: 2000-01-23T04:56:07.000+00:00 TransferRole: type: string @@ -2018,6 +1944,9 @@ components: cancelled_transaction_id: null id: id executed_transaction_id: null + _expandable: + result: http://example.com/aeiou + transaction: http://example.com/aeiou fees_returned: fees_returned status: scheduled timestamp: timestamp @@ -2036,12 +1965,16 @@ components: cancelled_transaction_id: null id: id executed_transaction_id: null + _expandable: + result: http://example.com/aeiou + transaction: http://example.com/aeiou fees_returned: fees_returned status: scheduled timestamp: timestamp next_cursor: next_cursor ScheduledTransaction: required: + - _expandable - execution_effort - fees - id @@ -2097,6 +2030,8 @@ components: $ref: "#/components/schemas/Identifier" failed_transaction_id: $ref: "#/components/schemas/Identifier" + _expandable: + $ref: "#/components/schemas/AccountTransaction__expandable" _links: $ref: "#/components/schemas/Links" example: @@ -2115,6 +2050,9 @@ components: cancelled_transaction_id: null id: id executed_transaction_id: null + _expandable: + result: http://example.com/aeiou + transaction: http://example.com/aeiou fees_returned: fees_returned status: scheduled timestamp: timestamp diff --git a/openapi/experimental/go-client-generated/docs/FungibleTokenTransfer.md b/openapi/experimental/go-client-generated/docs/FungibleTokenTransfer.md index 754c73734..64faaff45 100644 --- a/openapi/experimental/go-client-generated/docs/FungibleTokenTransfer.md +++ b/openapi/experimental/go-client-generated/docs/FungibleTokenTransfer.md @@ -14,7 +14,6 @@ Name | Type | Description | Notes **RecipientAddress** | **string** | | [default to null] **Transaction** | [***Transaction**](Transaction.md) | | [optional] [default to null] **Result** | [***TransactionResult**](TransactionResult.md) | | [optional] [default to null] -**Events** | [**[]Event**](Event.md) | | [optional] [default to null] **Expandable** | [***AccountTransactionExpandable**](AccountTransaction__expandable.md) | | [default to null] **Links** | [***Links**](Links.md) | | [optional] [default to null] diff --git a/openapi/experimental/go-client-generated/docs/NonFungibleTokenTransfer.md b/openapi/experimental/go-client-generated/docs/NonFungibleTokenTransfer.md index 24cdef1d4..84c3216aa 100644 --- a/openapi/experimental/go-client-generated/docs/NonFungibleTokenTransfer.md +++ b/openapi/experimental/go-client-generated/docs/NonFungibleTokenTransfer.md @@ -14,7 +14,6 @@ Name | Type | Description | Notes **RecipientAddress** | **string** | | [default to null] **Transaction** | [***Transaction**](Transaction.md) | | [optional] [default to null] **Result** | [***TransactionResult**](TransactionResult.md) | | [optional] [default to null] -**Events** | [**[]Event**](Event.md) | | [optional] [default to null] **Expandable** | [***AccountTransactionExpandable**](AccountTransaction__expandable.md) | | [default to null] **Links** | [***Links**](Links.md) | | [optional] [default to null] diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md b/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md index 7666d6632..b15bdcaec 100644 --- a/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md @@ -19,6 +19,7 @@ Name | Type | Description | Notes **ExecutedTransactionId** | **string** | | [optional] [default to null] **CancelledTransactionId** | **string** | | [optional] [default to null] **FailedTransactionId** | **string** | | [optional] [default to null] +**Expandable** | [***AccountTransactionExpandable**](AccountTransaction__expandable.md) | | [default to null] **Links** | [***Links**](Links.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/openapi/experimental/go-client-generated/model_fungible_token_transfer.go b/openapi/experimental/go-client-generated/model_fungible_token_transfer.go index 843b6eab7..68118aec1 100644 --- a/openapi/experimental/go-client-generated/model_fungible_token_transfer.go +++ b/openapi/experimental/go-client-generated/model_fungible_token_transfer.go @@ -29,7 +29,6 @@ type FungibleTokenTransfer struct { RecipientAddress string `json:"recipient_address"` Transaction *Transaction `json:"transaction,omitempty"` Result *TransactionResult `json:"result,omitempty"` - Events []Event `json:"events,omitempty"` Expandable *AccountTransactionExpandable `json:"_expandable"` Links *Links `json:"_links,omitempty"` } diff --git a/openapi/experimental/go-client-generated/model_non_fungible_token_transfer.go b/openapi/experimental/go-client-generated/model_non_fungible_token_transfer.go index ce53a7bbf..1c70934ca 100644 --- a/openapi/experimental/go-client-generated/model_non_fungible_token_transfer.go +++ b/openapi/experimental/go-client-generated/model_non_fungible_token_transfer.go @@ -29,7 +29,6 @@ type NonFungibleTokenTransfer struct { RecipientAddress string `json:"recipient_address"` Transaction *Transaction `json:"transaction,omitempty"` Result *TransactionResult `json:"result,omitempty"` - Events []Event `json:"events,omitempty"` Expandable *AccountTransactionExpandable `json:"_expandable"` Links *Links `json:"_links,omitempty"` } diff --git a/openapi/experimental/go-client-generated/model_scheduled_transaction.go b/openapi/experimental/go-client-generated/model_scheduled_transaction.go index b80a0f91b..86b158358 100644 --- a/openapi/experimental/go-client-generated/model_scheduled_transaction.go +++ b/openapi/experimental/go-client-generated/model_scheduled_transaction.go @@ -34,5 +34,6 @@ type ScheduledTransaction struct { ExecutedTransactionId string `json:"executed_transaction_id,omitempty"` CancelledTransactionId string `json:"cancelled_transaction_id,omitempty"` FailedTransactionId string `json:"failed_transaction_id,omitempty"` + Expandable *AccountTransactionExpandable `json:"_expandable"` Links *Links `json:"_links,omitempty"` } diff --git a/openapi/experimental/openapi.yaml b/openapi/experimental/openapi.yaml index ffe7e1c45..c0bf8f2ac 100644 --- a/openapi/experimental/openapi.yaml +++ b/openapi/experimental/openapi.yaml @@ -776,10 +776,6 @@ components: $ref: '#/components/schemas/Transaction' result: $ref: '#/components/schemas/TransactionResult' - events: - type: array - items: - $ref: '#/components/schemas/Event' _expandable: type: object description: Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`. @@ -843,10 +839,6 @@ components: $ref: '#/components/schemas/Transaction' result: $ref: '#/components/schemas/TransactionResult' - events: - type: array - items: - $ref: '#/components/schemas/Event' _expandable: type: object description: Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`. @@ -890,6 +882,7 @@ components: - transaction_handler_owner - transaction_handler_type_identifier - transaction_handler_uuid + - _expandable properties: id: description: Scheduler-assigned uint64 identifier. @@ -939,6 +932,18 @@ components: failed_transaction_id: description: Flow transaction ID of the failure transaction. $ref: '#/components/schemas/Identifier' + _expandable: + type: object + description: Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`. + properties: + transaction: + type: string + format: uri + description: Link to fetch the full transaction body. + result: + type: string + format: uri + description: Link to fetch the transaction result. _links: $ref: '#/components/schemas/Links' ScheduledTransactionStatus: From ee065fc5105c092ff1aeb569c9ba2c2a632f29c4 Mon Sep 17 00:00:00 2001 From: Peter Argue <89119817+peterargue@users.noreply.github.com> Date: Sat, 21 Feb 2026 13:31:35 -0800 Subject: [PATCH 4/6] add contract expandable --- .../go-client-generated/README.md | 2 + .../go-client-generated/api/swagger.yaml | 271 +++++++++++++++++- .../go-client-generated/docs/Contract.md | 10 + .../docs/ScheduledTransaction.md | 5 +- .../docs/ScheduledTransactionExpandable.md | 11 + .../go-client-generated/model_contract.go | 16 ++ .../model_scheduled_transaction.go | 5 +- ...model_scheduled_transaction__expandable.go | 19 ++ openapi/experimental/openapi.yaml | 22 ++ 9 files changed, 358 insertions(+), 3 deletions(-) create mode 100644 openapi/experimental/go-client-generated/docs/Contract.md create mode 100644 openapi/experimental/go-client-generated/docs/ScheduledTransactionExpandable.md create mode 100644 openapi/experimental/go-client-generated/model_contract.go create mode 100644 openapi/experimental/go-client-generated/model_scheduled_transaction__expandable.go diff --git a/openapi/experimental/go-client-generated/README.md b/openapi/experimental/go-client-generated/README.md index aedc1896f..036b69ea1 100644 --- a/openapi/experimental/go-client-generated/README.md +++ b/openapi/experimental/go-client-generated/README.md @@ -36,6 +36,7 @@ Class | Method | HTTP request | Description - [AccountTransaction](docs/AccountTransaction.md) - [AccountTransactionExpandable](docs/AccountTransactionExpandable.md) - [AccountTransactionsResponse](docs/AccountTransactionsResponse.md) + - [Contract](docs/Contract.md) - [Event](docs/Event.md) - [FungibleTokenTransfer](docs/FungibleTokenTransfer.md) - [Links](docs/Links.md) @@ -44,6 +45,7 @@ Class | Method | HTTP request | Description - [ProposalKey](docs/ProposalKey.md) - [Role](docs/Role.md) - [ScheduledTransaction](docs/ScheduledTransaction.md) + - [ScheduledTransactionExpandable](docs/ScheduledTransactionExpandable.md) - [ScheduledTransactionPriority](docs/ScheduledTransactionPriority.md) - [ScheduledTransactionStatus](docs/ScheduledTransactionStatus.md) - [ScheduledTransactionsResponse](docs/ScheduledTransactionsResponse.md) diff --git a/openapi/experimental/go-client-generated/api/swagger.yaml b/openapi/experimental/go-client-generated/api/swagger.yaml index 4f2c6ed03..75943a9eb 100644 --- a/openapi/experimental/go-client-generated/api/swagger.yaml +++ b/openapi/experimental/go-client-generated/api/swagger.yaml @@ -1936,6 +1936,27 @@ components: _self: _self failed_transaction_id: null priority: low + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending transaction_handler_type_identifier: transaction_handler_type_identifier execution_effort: execution_effort transaction_handler_owner: transaction_handler_owner @@ -1944,10 +1965,64 @@ components: cancelled_transaction_id: null id: id executed_transaction_id: null + handler_contract: + identifier: identifier + body: body _expandable: result: http://example.com/aeiou + handler_contract: http://example.com/aeiou transaction: http://example.com/aeiou fees_returned: fees_returned + transaction: + _links: null + reference_block_id: null + payer: payer + script: script + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending + envelope_signatures: + - null + - null + gas_limit: gas_limit + payload_signatures: + - address: null + signature: "" + key_index: key_index + - address: null + signature: "" + key_index: key_index + arguments: + - "" + - "" + id: null + authorizers: + - null + - null + _expandable: + result: http://example.com/aeiou + proposal_key: + sequence_number: sequence_number + address: null + key_index: key_index status: scheduled timestamp: timestamp - fees: fees @@ -1957,6 +2032,27 @@ components: _self: _self failed_transaction_id: null priority: low + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending transaction_handler_type_identifier: transaction_handler_type_identifier execution_effort: execution_effort transaction_handler_owner: transaction_handler_owner @@ -1965,10 +2061,64 @@ components: cancelled_transaction_id: null id: id executed_transaction_id: null + handler_contract: + identifier: identifier + body: body _expandable: result: http://example.com/aeiou + handler_contract: http://example.com/aeiou transaction: http://example.com/aeiou fees_returned: fees_returned + transaction: + _links: null + reference_block_id: null + payer: payer + script: script + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending + envelope_signatures: + - null + - null + gas_limit: gas_limit + payload_signatures: + - address: null + signature: "" + key_index: key_index + - address: null + signature: "" + key_index: key_index + arguments: + - "" + - "" + id: null + authorizers: + - null + - null + _expandable: + result: http://example.com/aeiou + proposal_key: + sequence_number: sequence_number + address: null + key_index: key_index status: scheduled timestamp: timestamp next_cursor: next_cursor @@ -2030,8 +2180,14 @@ components: $ref: "#/components/schemas/Identifier" failed_transaction_id: $ref: "#/components/schemas/Identifier" + transaction: + $ref: "#/components/schemas/Transaction" + result: + $ref: "#/components/schemas/TransactionResult" + handler_contract: + $ref: "#/components/schemas/Contract" _expandable: - $ref: "#/components/schemas/AccountTransaction__expandable" + $ref: "#/components/schemas/ScheduledTransaction__expandable" _links: $ref: "#/components/schemas/Links" example: @@ -2042,6 +2198,27 @@ components: _self: _self failed_transaction_id: null priority: low + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending transaction_handler_type_identifier: transaction_handler_type_identifier execution_effort: execution_effort transaction_handler_owner: transaction_handler_owner @@ -2050,12 +2227,81 @@ components: cancelled_transaction_id: null id: id executed_transaction_id: null + handler_contract: + identifier: identifier + body: body _expandable: result: http://example.com/aeiou + handler_contract: http://example.com/aeiou transaction: http://example.com/aeiou fees_returned: fees_returned + transaction: + _links: null + reference_block_id: null + payer: payer + script: script + result: + collection_id: null + error_message: error_message + execution: Pending + status_code: 0 + _links: + _self: _self + block_id: null + computation_used: computation_used + events: + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + - transaction_id: null + payload: "" + transaction_index: transaction_index + type: type + event_index: event_index + status: Pending + envelope_signatures: + - null + - null + gas_limit: gas_limit + payload_signatures: + - address: null + signature: "" + key_index: key_index + - address: null + signature: "" + key_index: key_index + arguments: + - "" + - "" + id: null + authorizers: + - null + - null + _expandable: + result: http://example.com/aeiou + proposal_key: + sequence_number: sequence_number + address: null + key_index: key_index status: scheduled timestamp: timestamp + Contract: + required: + - body + - identifier + type: object + properties: + identifier: + type: string + description: Unique identifier for the contract (e.g. `A.1654653399040a61.MyContract`). + body: + type: string + description: Full source code of the contract. + example: + identifier: identifier + body: body ScheduledTransactionStatus: type: string description: The current lifecycle status of a scheduled transaction. @@ -2106,6 +2352,29 @@ components: format: uri example: result: http://example.com/aeiou + ScheduledTransaction__expandable: + type: object + properties: + transaction: + type: string + description: Link to fetch the full transaction body. + format: uri + result: + type: string + description: Link to fetch the transaction result. + format: uri + handler_contract: + type: string + description: Link to fetch the Cadence contract that implements the transaction + handler. + format: uri + description: "Contains URI links for fields not included in the response. When\ + \ a field is expanded via the `expand` query parameter, it appears inline\ + \ and is removed from `_expandable`." + example: + result: http://example.com/aeiou + handler_contract: http://example.com/aeiou + transaction: http://example.com/aeiou parameters: cursorParam: name: cursor diff --git a/openapi/experimental/go-client-generated/docs/Contract.md b/openapi/experimental/go-client-generated/docs/Contract.md new file mode 100644 index 000000000..d33638375 --- /dev/null +++ b/openapi/experimental/go-client-generated/docs/Contract.md @@ -0,0 +1,10 @@ +# Contract + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identifier** | **string** | Unique identifier for the contract (e.g. `A.1654653399040a61.MyContract`). | [default to null] +**Body** | **string** | Full source code of the contract. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md b/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md index b15bdcaec..3326d14a2 100644 --- a/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md @@ -19,7 +19,10 @@ Name | Type | Description | Notes **ExecutedTransactionId** | **string** | | [optional] [default to null] **CancelledTransactionId** | **string** | | [optional] [default to null] **FailedTransactionId** | **string** | | [optional] [default to null] -**Expandable** | [***AccountTransactionExpandable**](AccountTransaction__expandable.md) | | [default to null] +**Transaction** | [***Transaction**](Transaction.md) | | [optional] [default to null] +**Result** | [***TransactionResult**](TransactionResult.md) | | [optional] [default to null] +**HandlerContract** | [***Contract**](Contract.md) | | [optional] [default to null] +**Expandable** | [***ScheduledTransactionExpandable**](ScheduledTransaction__expandable.md) | | [default to null] **Links** | [***Links**](Links.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransactionExpandable.md b/openapi/experimental/go-client-generated/docs/ScheduledTransactionExpandable.md new file mode 100644 index 000000000..24211fefe --- /dev/null +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransactionExpandable.md @@ -0,0 +1,11 @@ +# ScheduledTransactionExpandable + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Transaction** | **string** | Link to fetch the full transaction body. | [optional] [default to null] +**Result** | **string** | Link to fetch the transaction result. | [optional] [default to null] +**HandlerContract** | **string** | Link to fetch the Cadence contract that implements the transaction handler. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/openapi/experimental/go-client-generated/model_contract.go b/openapi/experimental/go-client-generated/model_contract.go new file mode 100644 index 000000000..9e181507a --- /dev/null +++ b/openapi/experimental/go-client-generated/model_contract.go @@ -0,0 +1,16 @@ +/* + * Flow Experimental API + * + * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. + * + * API version: 0.1.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package swagger + +type Contract struct { + // Unique identifier for the contract (e.g. `A.1654653399040a61.MyContract`). + Identifier string `json:"identifier"` + // Full source code of the contract. + Body string `json:"body"` +} diff --git a/openapi/experimental/go-client-generated/model_scheduled_transaction.go b/openapi/experimental/go-client-generated/model_scheduled_transaction.go index 86b158358..97904559b 100644 --- a/openapi/experimental/go-client-generated/model_scheduled_transaction.go +++ b/openapi/experimental/go-client-generated/model_scheduled_transaction.go @@ -34,6 +34,9 @@ type ScheduledTransaction struct { ExecutedTransactionId string `json:"executed_transaction_id,omitempty"` CancelledTransactionId string `json:"cancelled_transaction_id,omitempty"` FailedTransactionId string `json:"failed_transaction_id,omitempty"` - Expandable *AccountTransactionExpandable `json:"_expandable"` + Transaction *Transaction `json:"transaction,omitempty"` + Result *TransactionResult `json:"result,omitempty"` + HandlerContract *Contract `json:"handler_contract,omitempty"` + Expandable *ScheduledTransactionExpandable `json:"_expandable"` Links *Links `json:"_links,omitempty"` } diff --git a/openapi/experimental/go-client-generated/model_scheduled_transaction__expandable.go b/openapi/experimental/go-client-generated/model_scheduled_transaction__expandable.go new file mode 100644 index 000000000..065ebdcc0 --- /dev/null +++ b/openapi/experimental/go-client-generated/model_scheduled_transaction__expandable.go @@ -0,0 +1,19 @@ +/* + * Flow Experimental API + * + * Experimental API endpoints for the Flow Access Node. These endpoints are subject to change without notice. Endpoints may be moved to a permanent API once they are stable. + * + * API version: 0.1.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package swagger + +// Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`. +type ScheduledTransactionExpandable struct { + // Link to fetch the full transaction body. + Transaction string `json:"transaction,omitempty"` + // Link to fetch the transaction result. + Result string `json:"result,omitempty"` + // Link to fetch the Cadence contract that implements the transaction handler. + HandlerContract string `json:"handler_contract,omitempty"` +} diff --git a/openapi/experimental/openapi.yaml b/openapi/experimental/openapi.yaml index c0bf8f2ac..89ab5f0d0 100644 --- a/openapi/experimental/openapi.yaml +++ b/openapi/experimental/openapi.yaml @@ -932,6 +932,12 @@ components: failed_transaction_id: description: Flow transaction ID of the failure transaction. $ref: '#/components/schemas/Identifier' + transaction: + $ref: '#/components/schemas/Transaction' + result: + $ref: '#/components/schemas/TransactionResult' + handler_contract: + $ref: '#/components/schemas/Contract' _expandable: type: object description: Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`. @@ -944,8 +950,24 @@ components: type: string format: uri description: Link to fetch the transaction result. + handler_contract: + type: string + format: uri + description: Link to fetch the Cadence contract that implements the transaction handler. _links: $ref: '#/components/schemas/Links' + Contract: + type: object + required: + - identifier + - body + properties: + identifier: + description: Unique identifier for the contract (e.g. `A.1654653399040a61.MyContract`). + type: string + body: + description: Full source code of the contract. + type: string ScheduledTransactionStatus: type: string description: The current lifecycle status of a scheduled transaction. From 444fc15794ae51301b5240276c560583f53efbdb Mon Sep 17 00:00:00 2001 From: Peter Argue <89119817+peterargue@users.noreply.github.com> Date: Tue, 24 Feb 2026 11:00:53 -0800 Subject: [PATCH 5/6] cleanup fields --- .../go-client-generated/.swagger-codegen/VERSION | 2 +- .../go-client-generated/api/swagger.yaml | 14 +++++--------- .../docs/ScheduledTransaction.md | 3 +-- .../model_scheduled_transaction.go | 3 +-- openapi/experimental/openapi.yaml | 8 +++----- 5 files changed, 11 insertions(+), 19 deletions(-) diff --git a/openapi/experimental/go-client-generated/.swagger-codegen/VERSION b/openapi/experimental/go-client-generated/.swagger-codegen/VERSION index c6e7ea918..caa50679b 100644 --- a/openapi/experimental/go-client-generated/.swagger-codegen/VERSION +++ b/openapi/experimental/go-client-generated/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.75 \ No newline at end of file +3.0.78 \ No newline at end of file diff --git a/openapi/experimental/go-client-generated/api/swagger.yaml b/openapi/experimental/go-client-generated/api/swagger.yaml index 75943a9eb..a3d411bd5 100644 --- a/openapi/experimental/go-client-generated/api/swagger.yaml +++ b/openapi/experimental/go-client-generated/api/swagger.yaml @@ -1934,8 +1934,8 @@ components: transaction_handler_public_path: transaction_handler_public_path _links: _self: _self - failed_transaction_id: null priority: low + created_transaction_id: created_transaction_id result: collection_id: null error_message: error_message @@ -1961,7 +1961,6 @@ components: execution_effort: execution_effort transaction_handler_owner: transaction_handler_owner transaction_handler_uuid: transaction_handler_uuid - scheduled_transaction_id: scheduled_transaction_id cancelled_transaction_id: null id: id executed_transaction_id: null @@ -2030,8 +2029,8 @@ components: transaction_handler_public_path: transaction_handler_public_path _links: _self: _self - failed_transaction_id: null priority: low + created_transaction_id: created_transaction_id result: collection_id: null error_message: error_message @@ -2057,7 +2056,6 @@ components: execution_effort: execution_effort transaction_handler_owner: transaction_handler_owner transaction_handler_uuid: transaction_handler_uuid - scheduled_transaction_id: scheduled_transaction_id cancelled_transaction_id: null id: id executed_transaction_id: null @@ -2125,6 +2123,7 @@ components: ScheduledTransaction: required: - _expandable + - created_transaction_id - execution_effort - fees - id @@ -2172,14 +2171,12 @@ components: fees_deducted: type: string description: "Fees deducted on cancellation, as a UFix64 decimal string." - scheduled_transaction_id: + created_transaction_id: $ref: "#/components/schemas/Identifier" executed_transaction_id: $ref: "#/components/schemas/Identifier" cancelled_transaction_id: $ref: "#/components/schemas/Identifier" - failed_transaction_id: - $ref: "#/components/schemas/Identifier" transaction: $ref: "#/components/schemas/Transaction" result: @@ -2196,8 +2193,8 @@ components: transaction_handler_public_path: transaction_handler_public_path _links: _self: _self - failed_transaction_id: null priority: low + created_transaction_id: created_transaction_id result: collection_id: null error_message: error_message @@ -2223,7 +2220,6 @@ components: execution_effort: execution_effort transaction_handler_owner: transaction_handler_owner transaction_handler_uuid: transaction_handler_uuid - scheduled_transaction_id: scheduled_transaction_id cancelled_transaction_id: null id: id executed_transaction_id: null diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md b/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md index 3326d14a2..7570b8388 100644 --- a/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md @@ -15,10 +15,9 @@ Name | Type | Description | Notes **TransactionHandlerPublicPath** | **string** | Public path of the transaction handler, if set. | [optional] [default to null] **FeesReturned** | **string** | Fees returned on cancellation, as a UFix64 decimal string. | [optional] [default to null] **FeesDeducted** | **string** | Fees deducted on cancellation, as a UFix64 decimal string. | [optional] [default to null] -**ScheduledTransactionId** | **string** | | [optional] [default to null] +**CreatedTransactionId** | **string** | | [default to null] **ExecutedTransactionId** | **string** | | [optional] [default to null] **CancelledTransactionId** | **string** | | [optional] [default to null] -**FailedTransactionId** | **string** | | [optional] [default to null] **Transaction** | [***Transaction**](Transaction.md) | | [optional] [default to null] **Result** | [***TransactionResult**](TransactionResult.md) | | [optional] [default to null] **HandlerContract** | [***Contract**](Contract.md) | | [optional] [default to null] diff --git a/openapi/experimental/go-client-generated/model_scheduled_transaction.go b/openapi/experimental/go-client-generated/model_scheduled_transaction.go index 97904559b..e2266ddd5 100644 --- a/openapi/experimental/go-client-generated/model_scheduled_transaction.go +++ b/openapi/experimental/go-client-generated/model_scheduled_transaction.go @@ -30,10 +30,9 @@ type ScheduledTransaction struct { FeesReturned string `json:"fees_returned,omitempty"` // Fees deducted on cancellation, as a UFix64 decimal string. FeesDeducted string `json:"fees_deducted,omitempty"` - ScheduledTransactionId string `json:"scheduled_transaction_id,omitempty"` + CreatedTransactionId string `json:"created_transaction_id"` ExecutedTransactionId string `json:"executed_transaction_id,omitempty"` CancelledTransactionId string `json:"cancelled_transaction_id,omitempty"` - FailedTransactionId string `json:"failed_transaction_id,omitempty"` Transaction *Transaction `json:"transaction,omitempty"` Result *TransactionResult `json:"result,omitempty"` HandlerContract *Contract `json:"handler_contract,omitempty"` diff --git a/openapi/experimental/openapi.yaml b/openapi/experimental/openapi.yaml index 89ab5f0d0..1f3cd8e3e 100644 --- a/openapi/experimental/openapi.yaml +++ b/openapi/experimental/openapi.yaml @@ -882,6 +882,7 @@ components: - transaction_handler_owner - transaction_handler_type_identifier - transaction_handler_uuid + - created_transaction_id - _expandable properties: id: @@ -920,8 +921,8 @@ components: fees_deducted: description: Fees deducted on cancellation, as a UFix64 decimal string. type: string - scheduled_transaction_id: - description: Flow transaction ID of the scheduling transaction. + created_transaction_id: + description: Flow transaction ID of the transaction in which the scheduled transaction was created. $ref: '#/components/schemas/Identifier' executed_transaction_id: description: Flow transaction ID of the execution transaction. @@ -929,9 +930,6 @@ components: cancelled_transaction_id: description: Flow transaction ID of the cancellation transaction. $ref: '#/components/schemas/Identifier' - failed_transaction_id: - description: Flow transaction ID of the failure transaction. - $ref: '#/components/schemas/Identifier' transaction: $ref: '#/components/schemas/Transaction' result: From 4addd664bd8b878c496f4ca83374adf90127d45a Mon Sep 17 00:00:00 2001 From: Peter Argue <89119817+peterargue@users.noreply.github.com> Date: Fri, 27 Feb 2026 06:23:01 -0800 Subject: [PATCH 6/6] move scheduled/accounts to accounts/scheduled --- openapi/experimental/go-client-generated/README.md | 4 ++-- openapi/experimental/go-client-generated/api/swagger.yaml | 2 +- openapi/experimental/go-client-generated/api_accounts.go | 2 +- .../go-client-generated/api_scheduled_transactions.go | 2 +- openapi/experimental/go-client-generated/docs/AccountsApi.md | 2 +- .../go-client-generated/docs/ScheduledTransactionsApi.md | 2 +- openapi/experimental/openapi.yaml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openapi/experimental/go-client-generated/README.md b/openapi/experimental/go-client-generated/README.md index 036b69ea1..bcb9facad 100644 --- a/openapi/experimental/go-client-generated/README.md +++ b/openapi/experimental/go-client-generated/README.md @@ -24,10 +24,10 @@ Class | Method | HTTP request | Description *AccountsApi* | [**GetAccountFungibleTransfers**](docs/AccountsApi.md#getaccountfungibletransfers) | **Get** /experimental/v1/accounts/{address}/ft/transfers | Get account fungible token transfers *AccountsApi* | [**GetAccountNonFungibleTransfers**](docs/AccountsApi.md#getaccountnonfungibletransfers) | **Get** /experimental/v1/accounts/{address}/nft/transfers | Get account non-fungible token transfers *AccountsApi* | [**GetAccountTransactions**](docs/AccountsApi.md#getaccounttransactions) | **Get** /experimental/v1/accounts/{address}/transactions | Get account transactions -*AccountsApi* | [**GetScheduledTransactionsByAccount**](docs/AccountsApi.md#getscheduledtransactionsbyaccount) | **Get** /experimental/v1/scheduled/account/{address} | List scheduled transactions for an account +*AccountsApi* | [**GetScheduledTransactionsByAccount**](docs/AccountsApi.md#getscheduledtransactionsbyaccount) | **Get** /experimental/v1/accounts/{address}/scheduled | List scheduled transactions for an account *ScheduledTransactionsApi* | [**GetScheduledTransactionByID**](docs/ScheduledTransactionsApi.md#getscheduledtransactionbyid) | **Get** /experimental/v1/scheduled/transaction/{id} | Get scheduled transaction by ID *ScheduledTransactionsApi* | [**GetScheduledTransactions**](docs/ScheduledTransactionsApi.md#getscheduledtransactions) | **Get** /experimental/v1/scheduled | List scheduled transactions -*ScheduledTransactionsApi* | [**GetScheduledTransactionsByAccount**](docs/ScheduledTransactionsApi.md#getscheduledtransactionsbyaccount) | **Get** /experimental/v1/scheduled/account/{address} | List scheduled transactions for an account +*ScheduledTransactionsApi* | [**GetScheduledTransactionsByAccount**](docs/ScheduledTransactionsApi.md#getscheduledtransactionsbyaccount) | **Get** /experimental/v1/accounts/{address}/scheduled | List scheduled transactions for an account ## Documentation For Models diff --git a/openapi/experimental/go-client-generated/api/swagger.yaml b/openapi/experimental/go-client-generated/api/swagger.yaml index a3d411bd5..a61c68bec 100644 --- a/openapi/experimental/go-client-generated/api/swagger.yaml +++ b/openapi/experimental/go-client-generated/api/swagger.yaml @@ -567,7 +567,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - /experimental/v1/scheduled/account/{address}: + /experimental/v1/accounts/{address}/scheduled: get: tags: - ScheduledTransactions diff --git a/openapi/experimental/go-client-generated/api_accounts.go b/openapi/experimental/go-client-generated/api_accounts.go index 67f812056..a9f651cea 100644 --- a/openapi/experimental/go-client-generated/api_accounts.go +++ b/openapi/experimental/go-client-generated/api_accounts.go @@ -534,7 +534,7 @@ func (a *AccountsApiService) GetScheduledTransactionsByAccount(ctx context.Conte ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/experimental/v1/scheduled/account/{address}" + localVarPath := a.client.cfg.BasePath + "/experimental/v1/accounts/{address}/scheduled" localVarPath = strings.Replace(localVarPath, "{"+"address"+"}", fmt.Sprintf("%v", address), -1) localVarHeaderParams := make(map[string]string) diff --git a/openapi/experimental/go-client-generated/api_scheduled_transactions.go b/openapi/experimental/go-client-generated/api_scheduled_transactions.go index 550abe3a5..1e016ffb2 100644 --- a/openapi/experimental/go-client-generated/api_scheduled_transactions.go +++ b/openapi/experimental/go-client-generated/api_scheduled_transactions.go @@ -362,7 +362,7 @@ func (a *ScheduledTransactionsApiService) GetScheduledTransactionsByAccount(ctx ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/experimental/v1/scheduled/account/{address}" + localVarPath := a.client.cfg.BasePath + "/experimental/v1/accounts/{address}/scheduled" localVarPath = strings.Replace(localVarPath, "{"+"address"+"}", fmt.Sprintf("%v", address), -1) localVarHeaderParams := make(map[string]string) diff --git a/openapi/experimental/go-client-generated/docs/AccountsApi.md b/openapi/experimental/go-client-generated/docs/AccountsApi.md index 1003307dd..34b6a9e3b 100644 --- a/openapi/experimental/go-client-generated/docs/AccountsApi.md +++ b/openapi/experimental/go-client-generated/docs/AccountsApi.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**GetAccountFungibleTransfers**](AccountsApi.md#GetAccountFungibleTransfers) | **Get** /experimental/v1/accounts/{address}/ft/transfers | Get account fungible token transfers [**GetAccountNonFungibleTransfers**](AccountsApi.md#GetAccountNonFungibleTransfers) | **Get** /experimental/v1/accounts/{address}/nft/transfers | Get account non-fungible token transfers [**GetAccountTransactions**](AccountsApi.md#GetAccountTransactions) | **Get** /experimental/v1/accounts/{address}/transactions | Get account transactions -[**GetScheduledTransactionsByAccount**](AccountsApi.md#GetScheduledTransactionsByAccount) | **Get** /experimental/v1/scheduled/account/{address} | List scheduled transactions for an account +[**GetScheduledTransactionsByAccount**](AccountsApi.md#GetScheduledTransactionsByAccount) | **Get** /experimental/v1/accounts/{address}/scheduled | List scheduled transactions for an account # **GetAccountFungibleTransfers** > AccountFungibleTransfersResponse GetAccountFungibleTransfers(ctx, address, optional) diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransactionsApi.md b/openapi/experimental/go-client-generated/docs/ScheduledTransactionsApi.md index 2c7796200..6a1af7078 100644 --- a/openapi/experimental/go-client-generated/docs/ScheduledTransactionsApi.md +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransactionsApi.md @@ -6,7 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**GetScheduledTransactionByID**](ScheduledTransactionsApi.md#GetScheduledTransactionByID) | **Get** /experimental/v1/scheduled/transaction/{id} | Get scheduled transaction by ID [**GetScheduledTransactions**](ScheduledTransactionsApi.md#GetScheduledTransactions) | **Get** /experimental/v1/scheduled | List scheduled transactions -[**GetScheduledTransactionsByAccount**](ScheduledTransactionsApi.md#GetScheduledTransactionsByAccount) | **Get** /experimental/v1/scheduled/account/{address} | List scheduled transactions for an account +[**GetScheduledTransactionsByAccount**](ScheduledTransactionsApi.md#GetScheduledTransactionsByAccount) | **Get** /experimental/v1/accounts/{address}/scheduled | List scheduled transactions for an account # **GetScheduledTransactionByID** > ScheduledTransaction GetScheduledTransactionByID(ctx, id, optional) diff --git a/openapi/experimental/openapi.yaml b/openapi/experimental/openapi.yaml index 1f3cd8e3e..e0464ff64 100644 --- a/openapi/experimental/openapi.yaml +++ b/openapi/experimental/openapi.yaml @@ -251,7 +251,7 @@ paths: schema: $ref: "#/components/schemas/Error" - /experimental/v1/scheduled/account/{address}: + /experimental/v1/accounts/{address}/scheduled: get: summary: List scheduled transactions for an account description: |