diff --git a/Earthfile b/Earthfile index f883f478fa..113a711019 100644 --- a/Earthfile +++ b/Earthfile @@ -52,16 +52,9 @@ build-final-spec: SAVE ARTIFACT build/latest.json openapi: - FROM core+base-image - COPY . /src - WORKDIR /src - FOR component IN $(cd ./components && ls -d */) - COPY (./components/$component+openapi/src/components/$component) /src/components/$component - END - FOR component IN $(cd ./ee && ls -d */) - COPY (./ee/$component+openapi/src/ee/$component) /src/ee/$component - END - SAVE ARTIFACT /src + LOCALLY + BUILD ./components+run --TARGET=openapi + BUILD ./ee+run --TARGET=openapi goreleaser: FROM core+builder-image @@ -101,12 +94,8 @@ all-ci-goreleaser: build-all: LOCALLY - FOR component IN $(cd ./components && ls -d */) - BUILD --pass-args ./components/${component}+build-image - END - FOR component IN $(cd ./ee && ls -d */) - BUILD --pass-args ./ee/${component}+build-image - END + BUILD ./components+run --TARGET=build-image + BUILD ./ee+run --TARGET=build-image deploy-all: LOCALLY @@ -118,9 +107,7 @@ deploy-all: BUILD --pass-args ./components/+deploy --components=$component END END - FOR component IN $(cd ./ee && ls -d */) - BUILD --pass-args ./ee/+deploy --components=$component - END + BUILD ./ee+run --TARGET=build-image deployer-module: FROM --pass-args core+base-image diff --git a/components/ledger/openapi.yaml b/components/ledger/openapi.yaml index 3d5f5855bc..cc58c90725 100644 --- a/components/ledger/openapi.yaml +++ b/components/ledger/openapi.yaml @@ -25,6 +25,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read /{ledger}/_info: get: summary: Get information about a ledger @@ -52,6 +55,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read /{ledger}/accounts: head: summary: Count the accounts from a ledger @@ -96,6 +102,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read get: summary: List accounts from a ledger description: List accounts from a ledger, sorted by address in descending order. @@ -236,6 +245,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read /{ledger}/accounts/{address}: get: summary: Get account by its address @@ -274,6 +286,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read /{ledger}/accounts/{address}/metadata: post: summary: Add metadata to an account @@ -316,6 +331,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:write /{ledger}/mapping: get: tags: @@ -343,6 +361,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read put: tags: - ledger.v1 @@ -375,6 +396,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:write /{ledger}/script: post: deprecated: true @@ -417,6 +441,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ScriptResponse' + security: + - Authorization: + - ledger:write /{ledger}/stats: get: tags: @@ -446,6 +473,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read /{ledger}/transactions: head: tags: @@ -546,6 +576,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read get: tags: - ledger.v1 @@ -697,6 +730,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read post: tags: - ledger.v1 @@ -739,6 +775,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:write /{ledger}/transactions/{txid}: get: tags: @@ -775,6 +814,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read /{ledger}/transactions/{txid}/metadata: post: tags: @@ -814,6 +856,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:write /{ledger}/transactions/{txid}/revert: post: tags: @@ -856,6 +901,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:write /{ledger}/transactions/batch: post: tags: @@ -889,6 +937,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:write /{ledger}/balances: get: tags: @@ -960,6 +1011,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read /{ledger}/aggregate/balances: get: tags: @@ -999,6 +1053,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read /{ledger}/logs: get: tags: @@ -1119,6 +1176,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - ledger:read /v2/_info: get: tags: @@ -1145,6 +1205,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read /v2: get: summary: List ledgers @@ -1186,6 +1249,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read /v2/{ledger}: parameters: - name: ledger @@ -1214,6 +1280,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read post: summary: Create a ledger operationId: v2CreateLedger @@ -1234,6 +1303,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:write /v2/{ledger}/metadata: parameters: - name: ledger @@ -1269,6 +1341,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:write /v2/{ledger}/metadata/{key}: parameters: - name: ledger @@ -1300,6 +1375,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:write /v2/{ledger}/_info: get: summary: Get information about a ledger @@ -1328,6 +1406,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read /v2/{ledger}/_bulk: post: summary: Bulk request @@ -1367,6 +1448,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:write /v2/{ledger}/accounts: head: summary: Count the accounts from a ledger @@ -1409,6 +1493,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read get: summary: List accounts from a ledger description: List accounts from a ledger, sorted by address in descending order. @@ -1475,6 +1562,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read /v2/{ledger}/accounts/{address}: get: summary: Get account by its address @@ -1526,6 +1616,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read /v2/{ledger}/accounts/{address}/metadata: post: summary: Add metadata to an account @@ -1580,6 +1673,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:write /v2/{ledger}/accounts/{address}/metadata/{key}: delete: description: Delete metadata by key @@ -1619,6 +1715,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:write /v2/{ledger}/stats: get: tags: @@ -1649,6 +1748,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read /v2/{ledger}/transactions: head: tags: @@ -1691,6 +1793,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read get: tags: - ledger.v2 @@ -1769,6 +1874,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read post: tags: - ledger.v2 @@ -1817,6 +1925,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:write /v2/{ledger}/transactions/{id}: get: tags: @@ -1866,6 +1977,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read /v2/{ledger}/transactions/{id}/metadata: post: tags: @@ -1917,6 +2031,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:write /v2/{ledger}/transactions/{id}/metadata/{key}: delete: description: Delete metadata by key @@ -1959,6 +2076,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:write /v2/{ledger}/transactions/{id}/revert: post: tags: @@ -2008,6 +2128,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:write /v2/{ledger}/aggregate/balances: get: tags: @@ -2054,6 +2177,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read /v2/{ledger}/volumes: get: tags: @@ -2135,6 +2261,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read /v2/{ledger}/logs: get: tags: @@ -2196,6 +2325,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read /v2/{ledger}/logs/import: post: tags: @@ -2224,6 +2356,9 @@ paths: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:write /v2/{ledger}/logs/export: post: summary: Export logs @@ -2250,6 +2385,9 @@ paths: title: bytes type: string format: binary + security: + - Authorization: + - ledger:write components: schemas: AccountsCursorResponse: @@ -2879,37 +3017,6 @@ components: type: array items: $ref: '#/components/schemas/V2Account' - V2BalancesCursorResponse: - type: object - required: - - cursor - properties: - cursor: - type: object - required: - - pageSize - - hasMore - - data - properties: - pageSize: - type: integer - format: int64 - minimum: 1 - maximum: 1000 - example: 15 - hasMore: - type: boolean - example: false - previous: - type: string - example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= - next: - type: string - example: "" - data: - type: array - items: - $ref: '#/components/schemas/V2AccountsBalances' V2TransactionsCursorResponse: type: object required: @@ -3076,17 +3183,6 @@ components: $ref: '#/components/schemas/V2Volumes' effectiveVolumes: $ref: '#/components/schemas/V2Volumes' - V2AccountsBalances: - type: object - additionalProperties: - $ref: '#/components/schemas/V2AssetsBalances' - example: - account1: - USD: 100 - EUR: 23 - account2: - CAD: 20 - JPY: 21 V2AssetsBalances: type: object additionalProperties: @@ -3117,33 +3213,6 @@ components: - asset - destination - source - V2Script: - type: object - properties: - plain: - type: string - example: | - vars { - account $user - } - send [COIN 10] ( - source = @world - destination = $user - ) - vars: - type: object - properties: {} - additionalProperties: true - example: - user: users:042 - reference: - type: string - example: order_1234 - description: Reference to attach to the generated transaction - metadata: - $ref: '#/components/schemas/V2Metadata' - required: - - plain V2Transaction: type: object properties: diff --git a/components/ledger/openapi/v1.yaml b/components/ledger/openapi/v1.yaml index 02d5da083c..319d35c2eb 100644 --- a/components/ledger/openapi/v1.yaml +++ b/components/ledger/openapi/v1.yaml @@ -2,8 +2,7 @@ openapi: 3.0.3 info: title: Ledger API contact: {} - version: "LEDGER_VERSION" - + version: LEDGER_VERSION paths: /_info: get: @@ -12,7 +11,7 @@ paths: summary: Show server information operationId: getInfo responses: - "200": + '200': description: OK content: application/json: @@ -24,7 +23,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read /{ledger}/_info: get: summary: Get information about a ledger @@ -40,7 +41,7 @@ paths: type: string example: ledger001 responses: - "200": + '200': description: OK content: application/json: @@ -52,7 +53,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read /{ledger}/accounts: head: summary: Count the accounts from a ledger @@ -69,13 +72,17 @@ paths: example: ledger001 - name: address in: query - description: Filter accounts by address pattern (regular expression placed between ^ and $). + description: >- + Filter accounts by address pattern (regular expression placed + between ^ and $). schema: type: string example: users:.+ - name: metadata in: query - description: Filter accounts by metadata key value pairs. The filter can be used like this metadata[key]=value1&metadata[a.nested.key]=value2 + description: >- + Filter accounts by metadata key value pairs. The filter can be used + like this metadata[key]=value1&metadata[a.nested.key]=value2 style: deepObject explode: true schema: @@ -83,7 +90,7 @@ paths: additionalProperties: true example: metadata[key]=value1&metadata[a.nested.key]=value2 responses: - "200": + '200': description: OK headers: Count: @@ -97,7 +104,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read get: summary: List accounts from a ledger description: List accounts from a ledger, sorted by address in descending order. @@ -139,19 +148,25 @@ paths: deprecated: true - name: after in: query - description: Pagination cursor, will return accounts after given address, in descending order. + description: >- + Pagination cursor, will return accounts after given address, in + descending order. schema: type: string example: users:003 - name: address in: query - description: Filter accounts by address pattern (regular expression placed between ^ and $). + description: >- + Filter accounts by address pattern (regular expression placed + between ^ and $). schema: type: string example: users:.+ - name: metadata in: query - description: Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. + description: >- + Filter accounts by metadata key value pairs. Nested objects can be + used as seen in the example below. style: deepObject explode: true schema: @@ -168,53 +183,77 @@ paths: - name: balanceOperator x-speakeasy-ignore: true in: query - description: | - Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. + description: > + Operator used for the filtering of balances can be greater + than/equal, less than/equal, greater than, less than, equal or not. schema: type: string - enum: [gte, lte, gt, lt, e, ne] + enum: + - gte + - lte + - gt + - lt + - e + - ne example: gte - name: balance_operator x-speakeasy-ignore: true in: query - description: | - Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. + description: > + Operator used for the filtering of balances can be greater + than/equal, less than/equal, greater than, less than, equal or not. + Deprecated, please use `balanceOperator` instead. schema: type: string - enum: [gte, lte, gt, lt, e, ne] + enum: + - gte + - lte + - gt + - lt + - e + - ne example: gte deprecated: true - name: cursor in: query - description: | - Parameter used in pagination requests. Maximum page size is set to 1000. + description: > + Parameter used in pagination requests. Maximum page size is set to + 1000. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when this parameter is set. schema: type: string example: aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== - name: pagination_token in: query - description: | - Parameter used in pagination requests. Maximum page size is set to 1000. + description: > + Parameter used in pagination requests. Maximum page size is set to + 1000. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when this parameter is set. + Deprecated, please use `cursor` instead. schema: type: string example: aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== deprecated: true responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AccountsCursorResponse' - "404": + '404': description: Not found content: application/json: @@ -226,7 +265,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read /{ledger}/accounts/{address}: get: summary: Get account by its address @@ -243,17 +284,21 @@ paths: example: ledger001 - name: address in: path - description: | - Exact address of the account. It must match the following regular expressions pattern: + description: > + Exact address of the account. It must match the following regular + expressions pattern: + ``` + ^\w+(:\w+)*$ + ``` required: true schema: type: string example: users:001 responses: - "200": + '200': description: OK content: application/json: @@ -265,7 +310,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read /{ledger}/accounts/{address}/metadata: post: summary: Add metadata to an account @@ -282,10 +329,14 @@ paths: example: ledger001 - name: address in: path - description: | - Exact address of the account. It must match the following regular expressions pattern: + description: > + Exact address of the account. It must match the following regular + expressions pattern: + ``` + ^\w+(:\w+)*$ + ``` required: true schema: @@ -299,17 +350,18 @@ paths: $ref: '#/components/schemas/Metadata' required: true responses: - "204": + '204': description: No Content content: {} - default: description: Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:write /{ledger}/mapping: get: tags: @@ -325,7 +377,7 @@ paths: type: string example: ledger001 responses: - "200": + '200': description: OK content: application/json: @@ -337,7 +389,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read put: tags: - ledger.v1 @@ -358,7 +412,7 @@ paths: $ref: '#/components/schemas/Mapping' required: true responses: - "200": + '200': description: OK content: application/json: @@ -370,7 +424,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:write /{ledger}/script: post: deprecated: true @@ -379,7 +435,8 @@ paths: operationId: runScript summary: Execute a Numscript description: > - This route is deprecated, and has been merged into `POST /{ledger}/transactions`. + This route is deprecated, and has been merged into `POST + /{ledger}/transactions`. parameters: - name: ledger in: path @@ -390,7 +447,9 @@ paths: example: ledger001 - name: preview in: query - description: Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. + description: >- + Set the preview mode. Preview mode doesn't add the logs to the + database or publish a message to the message broker. schema: type: boolean example: true @@ -401,12 +460,14 @@ paths: schema: $ref: '#/components/schemas/Script' responses: - "200": + '200': description: > - On success, it will return a 200 status code, and the resulting transaction under the `transaction` field. + On success, it will return a 200 status code, and the resulting + transaction under the `transaction` field. - On failure, it will also return a 200 status code, and the following fields: + On failure, it will also return a 200 status code, and the following + fields: - `details`: contains a URL. When there is an error parsing Numscript, the result can be difficult to read—the provided URL will render the error in an easy-to-read format. - `errorCode` and `error_code` (deprecated): contains the string code of the error - `errorMessage` and `error_message` (deprecated): contains a human-readable indication of what went wrong, for example that an account had insufficient funds, or that there was an error in the provided Numscript. @@ -414,15 +475,18 @@ paths: application/json: schema: $ref: '#/components/schemas/ScriptResponse' - + security: + - Authorization: + - ledger:write /{ledger}/stats: get: tags: - ledger.v1 operationId: readStats summary: Get statistics from a ledger - description: | - Get statistics from a ledger. (aggregate metrics on accounts and transactions) + description: > + Get statistics from a ledger. (aggregate metrics on accounts and + transactions) parameters: - name: ledger in: path @@ -432,7 +496,7 @@ paths: type: string example: ledger001 responses: - "200": + '200': description: OK content: application/json: @@ -444,7 +508,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read /{ledger}/transactions: head: tags: @@ -467,37 +533,47 @@ paths: example: ref:001 - name: account in: query - description: Filter transactions with postings involving given account, either - as source or destination (regular expression placed between ^ and $). + description: >- + Filter transactions with postings involving given account, either as + source or destination (regular expression placed between ^ and $). schema: type: string example: users:001 - name: source in: query - description: Filter transactions with postings involving given account at source (regular expression placed between ^ and $). + description: >- + Filter transactions with postings involving given account at source + (regular expression placed between ^ and $). schema: type: string example: users:001 - name: destination in: query - description: Filter transactions with postings involving given account at destination (regular expression placed between ^ and $). + description: >- + Filter transactions with postings involving given account at + destination (regular expression placed between ^ and $). schema: type: string example: users:001 - name: startTime in: query - description: | + description: > Filter transactions that occurred after this timestamp. - The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). + + The format is RFC3339 and is inclusive (for example, + "2023-01-02T15:04:01Z" includes the first second of 4th minute). schema: type: string format: date-time - name: start_time x-speakeasy-ignore: true in: query - description: | + description: > Filter transactions that occurred after this timestamp. - The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). + + The format is RFC3339 and is inclusive (for example, + "2023-01-02T15:04:01Z" includes the first second of 4th minute). + Deprecated, please use `startTime` instead. schema: type: string @@ -505,18 +581,23 @@ paths: deprecated: true - name: endTime in: query - description: | + description: > Filter transactions that occurred before this timestamp. - The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + + The format is RFC3339 and is exclusive (for example, + "2023-01-02T15:04:01Z" excludes the first second of 4th minute). schema: type: string format: date-time - name: end_time x-speakeasy-ignore: true in: query - description: | + description: > Filter transactions that occurred before this timestamp. - The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + + The format is RFC3339 and is exclusive (for example, + "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + Deprecated, please use `endTime` instead. schema: type: string @@ -524,15 +605,17 @@ paths: deprecated: true - name: metadata in: query - description: Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. + description: >- + Filter transactions by metadata key value pairs. Nested objects can + be used as seen in the example below. style: deepObject explode: true schema: type: object - properties: { } + properties: {} example: metadata[key]=value1&metadata[a.nested.key]=value2 responses: - "200": + '200': description: OK headers: Count: @@ -546,7 +629,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read get: tags: - ledger.v1 @@ -588,8 +673,9 @@ paths: deprecated: true - name: after in: query - description: Pagination cursor, will return transactions after given txid - (in descending order). + description: >- + Pagination cursor, will return transactions after given txid (in + descending order). schema: type: string example: 1234 @@ -601,37 +687,47 @@ paths: example: ref:001 - name: account in: query - description: Filter transactions with postings involving given account, either - as source or destination (regular expression placed between ^ and $). + description: >- + Filter transactions with postings involving given account, either as + source or destination (regular expression placed between ^ and $). schema: type: string example: users:001 - name: source in: query - description: Filter transactions with postings involving given account at source (regular expression placed between ^ and $). + description: >- + Filter transactions with postings involving given account at source + (regular expression placed between ^ and $). schema: type: string example: users:001 - name: destination in: query - description: Filter transactions with postings involving given account at destination (regular expression placed between ^ and $). + description: >- + Filter transactions with postings involving given account at + destination (regular expression placed between ^ and $). schema: type: string example: users:001 - name: startTime in: query - description: | + description: > Filter transactions that occurred after this timestamp. - The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). + + The format is RFC3339 and is inclusive (for example, + "2023-01-02T15:04:01Z" includes the first second of 4th minute). schema: type: string format: date-time - name: start_time x-speakeasy-ignore: true in: query - description: | + description: > Filter transactions that occurred after this timestamp. - The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). + + The format is RFC3339 and is inclusive (for example, + "2023-01-02T15:04:01Z" includes the first second of 4th minute). + Deprecated, please use `startTime` instead. schema: type: string @@ -639,18 +735,23 @@ paths: deprecated: true - name: endTime in: query - description: | + description: > Filter transactions that occurred before this timestamp. - The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + + The format is RFC3339 and is exclusive (for example, + "2023-01-02T15:04:01Z" excludes the first second of 4th minute). schema: type: string format: date-time - name: end_time x-speakeasy-ignore: true in: query - description: | + description: > Filter transactions that occurred before this timestamp. - The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + + The format is RFC3339 and is exclusive (for example, + "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + Deprecated, please use `endTime` instead. schema: type: string @@ -658,10 +759,14 @@ paths: deprecated: true - name: cursor in: query - description: | - Parameter used in pagination requests. Maximum page size is set to 1000. + description: > + Parameter used in pagination requests. Maximum page size is set to + 1000. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when this parameter is set. schema: type: string @@ -669,11 +774,16 @@ paths: - name: pagination_token x-speakeasy-ignore: true in: query - description: | - Parameter used in pagination requests. Maximum page size is set to 1000. + description: > + Parameter used in pagination requests. Maximum page size is set to + 1000. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when this parameter is set. + Deprecated, please use `cursor` instead. schema: type: string @@ -681,14 +791,16 @@ paths: deprecated: true - name: metadata in: query - description: Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. + description: >- + Filter transactions by metadata key value pairs. Nested objects can + be used as seen in the example below. style: deepObject explode: true schema: type: object additionalProperties: true responses: - "200": + '200': description: OK content: application/json: @@ -700,7 +812,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read post: tags: - ledger.v1 @@ -716,13 +830,15 @@ paths: example: ledger001 - name: preview in: query - description: Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. + description: >- + Set the preview mode. Preview mode doesn't add the logs to the + database or publish a message to the message broker. schema: type: boolean example: true requestBody: required: true - description: > + description: | The request body must contain at least one of the following objects: - `postings`: suitable for simple transactions - `script`: enabling more complex transactions with Numscript @@ -731,20 +847,21 @@ paths: schema: $ref: '#/components/schemas/PostTransaction' responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/TransactionsResponse' - default: description: Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:write /{ledger}/transactions/{txid}: get: tags: @@ -769,7 +886,7 @@ paths: minimum: 0 example: 1234 responses: - "200": + '200': description: OK content: application/json: @@ -781,7 +898,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read /{ledger}/transactions/{txid}/metadata: post: tags: @@ -812,7 +931,7 @@ paths: schema: $ref: '#/components/schemas/Metadata' responses: - "204": + '204': description: No Content content: {} default: @@ -821,7 +940,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:write /{ledger}/transactions/{txid}/revert: post: tags: @@ -852,7 +973,7 @@ paths: schema: type: boolean responses: - "201": + '201': description: OK content: application/json: @@ -864,7 +985,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:write /{ledger}/transactions/batch: post: tags: @@ -886,7 +1009,7 @@ paths: $ref: '#/components/schemas/Transactions' required: true responses: - "200": + '200': description: OK content: application/json: @@ -898,7 +1021,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:write /{ledger}/balances: get: tags: @@ -915,8 +1040,9 @@ paths: example: ledger001 - name: address in: query - description: Filter balances involving given account, either - as source or destination. + description: >- + Filter balances involving given account, either as source or + destination. schema: type: string example: users:001 @@ -932,16 +1058,22 @@ paths: default: 15 - name: after in: query - description: Pagination cursor, will return accounts after given address, in descending order. + description: >- + Pagination cursor, will return accounts after given address, in + descending order. schema: type: string example: users:003 - name: cursor in: query - description: | - Parameter used in pagination requests. Maximum page size is set to 1000. + description: > + Parameter used in pagination requests. Maximum page size is set to + 1000. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when this parameter is set. schema: type: string @@ -959,7 +1091,7 @@ paths: example: aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== deprecated: true responses: - "200": + '200': description: OK content: application/json: @@ -971,7 +1103,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read /{ledger}/aggregate/balances: get: tags: @@ -988,8 +1122,9 @@ paths: example: ledger001 - name: address in: query - description: Filter balances involving given account, either - as source or destination. + description: >- + Filter balances involving given account, either as source or + destination. schema: type: string example: users:001 @@ -1000,7 +1135,7 @@ paths: schema: type: boolean responses: - "200": + '200': description: OK content: application/json: @@ -1012,7 +1147,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read /{ledger}/logs: get: tags: @@ -1055,25 +1192,31 @@ paths: deprecated: true - name: after in: query - description: Pagination cursor, will return the logs after a given ID. - (in descending order). + description: >- + Pagination cursor, will return the logs after a given ID. (in + descending order). schema: type: string example: 1234 - name: startTime in: query - description: | + description: > Filter transactions that occurred after this timestamp. - The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). + + The format is RFC3339 and is inclusive (for example, + "2023-01-02T15:04:01Z" includes the first second of 4th minute). schema: type: string format: date-time - name: start_time x-speakeasy-ignore: true in: query - description: | + description: > Filter transactions that occurred after this timestamp. - The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). + + The format is RFC3339 and is inclusive (for example, + "2023-01-02T15:04:01Z" includes the first second of 4th minute). + Deprecated, please use `startTime` instead. schema: type: string @@ -1081,18 +1224,23 @@ paths: deprecated: true - name: endTime in: query - description: | + description: > Filter transactions that occurred before this timestamp. - The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + + The format is RFC3339 and is exclusive (for example, + "2023-01-02T15:04:01Z" excludes the first second of 4th minute). schema: type: string format: date-time - name: end_time x-speakeasy-ignore: true in: query - description: | + description: > Filter transactions that occurred before this timestamp. - The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + + The format is RFC3339 and is exclusive (for example, + "2023-01-02T15:04:01Z" excludes the first second of 4th minute). + Deprecated, please use `endTime` instead. schema: type: string @@ -1100,10 +1248,14 @@ paths: deprecated: true - name: cursor in: query - description: | - Parameter used in pagination requests. Maximum page size is set to 1000. + description: > + Parameter used in pagination requests. Maximum page size is set to + 1000. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when this parameter is set. schema: type: string @@ -1111,18 +1263,23 @@ paths: - name: pagination_token x-speakeasy-ignore: true in: query - description: | - Parameter used in pagination requests. Maximum page size is set to 1000. + description: > + Parameter used in pagination requests. Maximum page size is set to + 1000. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when this parameter is set. + Deprecated, please use `cursor` instead. schema: type: string example: aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== deprecated: true responses: - "200": + '200': description: OK content: application/json: @@ -1134,7 +1291,9 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - ledger:read components: schemas: AccountsCursorResponse: @@ -1160,15 +1319,14 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: $ref: '#/components/schemas/Account' - BalancesCursorResponse: type: object required: @@ -1192,15 +1350,14 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: $ref: '#/components/schemas/AccountsBalances' - TransactionsCursorResponse: type: object required: @@ -1224,15 +1381,14 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: $ref: '#/components/schemas/Transaction' - LogsCursorResponse: type: object required: @@ -1256,15 +1412,14 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: $ref: '#/components/schemas/Log' - AccountResponse: type: object required: @@ -1272,7 +1427,6 @@ components: properties: data: $ref: '#/components/schemas/AccountWithVolumesAndBalances' - AggregateBalancesResponse: type: object required: @@ -1280,7 +1434,6 @@ components: properties: data: $ref: '#/components/schemas/AssetsBalances' - Config: type: object properties: @@ -1288,7 +1441,6 @@ components: $ref: '#/components/schemas/LedgerStorage' required: - storage - LedgerStorage: type: object properties: @@ -1301,12 +1453,10 @@ components: required: - driver - ledgers - Metadata: type: object nullable: true additionalProperties: {} - ConfigInfo: type: object properties: @@ -1320,7 +1470,6 @@ components: - config - server - version - ScriptResponse: type: object properties: @@ -1328,13 +1477,13 @@ components: $ref: '#/components/schemas/ErrorsEnum' errorMessage: type: string - example: "account had insufficient funds" + example: account had insufficient funds details: type: string - example: "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" + example: >- + https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 transaction: $ref: '#/components/schemas/Transaction' - Account: type: object required: @@ -1349,8 +1498,11 @@ components: metadata: type: object additionalProperties: true - example: { admin: true, a: { nested: { key: value}} } - + example: + admin: true + a: + nested: + key: value AccountWithVolumesAndBalances: type: object required: @@ -1365,7 +1517,11 @@ components: metadata: type: object additionalProperties: true - example: { admin: true, a: { nested: { key: value}} } + example: + admin: true + a: + nested: + key: value volumes: $ref: '#/components/schemas/Volumes' balances: @@ -1375,7 +1531,6 @@ components: format: bigint example: COIN: 100 - AccountsBalances: type: object additionalProperties: @@ -1387,7 +1542,6 @@ components: account2: CAD: 20 JPY: 21 - AssetsBalances: type: object additionalProperties: @@ -1396,7 +1550,6 @@ components: example: USD: 100 EUR: 12 - Contract: type: object properties: @@ -1408,7 +1561,6 @@ components: required: - accounts - expr - Mapping: type: object nullable: true @@ -1419,7 +1571,6 @@ components: type: array items: $ref: '#/components/schemas/Contract' - Posting: type: object properties: @@ -1442,7 +1593,6 @@ components: - asset - destination - source - Script: type: object properties: @@ -1452,9 +1602,8 @@ components: vars: type: object additionalProperties: true - example: { - "user": "users:042" - } + example: + user: users:042 reference: type: string example: order_1234 @@ -1463,7 +1612,6 @@ components: $ref: '#/components/schemas/Metadata' required: - plain - Transaction: type: object properties: @@ -1491,7 +1639,6 @@ components: - postings - timestamp - txid - TransactionData: type: object required: @@ -1509,7 +1656,6 @@ components: timestamp: type: string format: date-time - Transactions: required: - transactions @@ -1519,7 +1665,6 @@ components: type: array items: $ref: '#/components/schemas/TransactionData' - PostTransaction: type: object properties: @@ -1539,9 +1684,8 @@ components: vars: type: object additionalProperties: true - example: { - "user": "users:042" - } + example: + user: users:042 required: - plain reference: @@ -1549,7 +1693,6 @@ components: example: ref:001 metadata: $ref: '#/components/schemas/Metadata' - Stats: type: object properties: @@ -1564,7 +1707,6 @@ components: required: - accounts - transactions - Log: type: object properties: @@ -1583,7 +1725,7 @@ components: additionalProperties: true hash: type: string - example: "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e" + example: 9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e date: type: string format: date-time @@ -1593,7 +1735,6 @@ components: - data - hash - date - TransactionsResponse: type: object properties: @@ -1603,7 +1744,6 @@ components: type: array required: - data - TransactionResponse: properties: data: @@ -1611,7 +1751,6 @@ components: type: object required: - data - StatsResponse: properties: data: @@ -1619,13 +1758,11 @@ components: type: object required: - data - MappingResponse: properties: data: $ref: '#/components/schemas/Mapping' type: object - ConfigInfoResponse: properties: data: @@ -1633,7 +1770,6 @@ components: type: object required: - data - Volume: type: object properties: @@ -1653,7 +1789,6 @@ components: input: 100 output: 20 balance: 80 - Volumes: type: object additionalProperties: @@ -1667,23 +1802,21 @@ components: input: 100 output: 10 balance: 90 - AggregatedVolumes: type: object additionalProperties: $ref: '#/components/schemas/Volumes' example: - "orders:1": - "USD": + orders:1: + USD: input: 100 output: 10 balance: 90 - "orders:2": - "USD": + orders:2: + USD: input: 100 output: 10 balance: 90 - ErrorResponse: type: object required: @@ -1694,11 +1827,11 @@ components: $ref: '#/components/schemas/ErrorsEnum' errorMessage: type: string - example: "[INSUFFICIENT_FUND] account had insufficient funds" + example: '[INSUFFICIENT_FUND] account had insufficient funds' details: type: string - example: "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" - + example: >- + https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 ErrorsEnum: type: string enum: @@ -1711,12 +1844,10 @@ components: - METADATA_OVERRIDE - NOT_FOUND example: INSUFFICIENT_FUND - LedgerInfoResponse: properties: data: $ref: '#/components/schemas/LedgerInfo' - LedgerInfo: type: object properties: @@ -1730,7 +1861,6 @@ components: type: array items: $ref: '#/components/schemas/MigrationInfo' - MigrationInfo: type: object properties: @@ -1748,5 +1878,5 @@ components: state: type: string enum: - - "TO DO" - - "DONE" + - TO DO + - DONE diff --git a/components/ledger/openapi/v2.yaml b/components/ledger/openapi/v2.yaml index 9e2c22f107..1ecc4a9afd 100644 --- a/components/ledger/openapi/v2.yaml +++ b/components/ledger/openapi/v2.yaml @@ -2,15 +2,13 @@ openapi: 3.0.3 info: title: Ledger API contact: {} - version: "LEDGER_VERSION" - + version: LEDGER_VERSION servers: - url: http://localhost:8080/ - paths: x-speakeasy-errors: statusCodes: - - "default" + - default /v2/_info: get: tags: @@ -19,24 +17,27 @@ paths: operationId: v2GetInfo x-speakeasy-name-override: GetInfo responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2ConfigInfoResponse' - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - "5XX": + 5XX: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' + security: + - Authorization: + - ledger:read /v2: get: summary: List ledgers @@ -57,28 +58,34 @@ paths: maximum: 1000 - name: cursor in: query - description: | - Parameter used in pagination requests. Maximum page size is set to 15. + description: > + Parameter used in pagination requests. Maximum page size is set to + 15. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when this parameter is set. schema: type: string example: aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2LedgerListResponse' - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read /v2/{ledger}: parameters: - name: ledger @@ -88,7 +95,6 @@ paths: schema: type: string example: ledger001 - get: summary: Get a ledger operationId: v2GetLedger @@ -96,19 +102,21 @@ paths: tags: - ledger.v2 responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2GetLedgerResponse' - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read post: summary: Create a ledger operationId: v2CreateLedger @@ -121,16 +129,17 @@ paths: schema: $ref: '#/components/schemas/V2CreateLedgerRequest' responses: - "204": + '204': description: OK - - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:write /v2/{ledger}/metadata: parameters: - name: ledger @@ -140,7 +149,6 @@ paths: schema: type: string example: ledger001 - put: summary: Update ledger metadata operationId: v2UpdateLedgerMetadata @@ -153,22 +161,23 @@ paths: schema: $ref: '#/components/schemas/V2UpdateLedgerMetadataRequest' responses: - "204": + '204': description: OK - - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - "5XX": + 5XX: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:write /v2/{ledger}/metadata/{key}: parameters: - name: ledger @@ -185,7 +194,6 @@ paths: schema: type: string example: foo - delete: summary: Delete ledger metadata by key operationId: v2DeleteLedgerMetadata @@ -193,16 +201,17 @@ paths: tags: - ledger.v2 responses: - "204": + '204': description: OK - - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:write /v2/{ledger}/_info: get: summary: Get information about a ledger @@ -219,19 +228,21 @@ paths: type: string example: ledger001 responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2LedgerInfoResponse' - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read /v2/{ledger}/_bulk: post: summary: Bulk request @@ -240,40 +251,40 @@ paths: tags: - ledger.v2 parameters: - - name: ledger - in: path - description: Name of the ledger. - required: true - schema: - type: string - example: ledger001 + - name: ledger + in: path + description: Name of the ledger. + required: true + schema: + type: string + example: ledger001 requestBody: content: application/json: schema: $ref: '#/components/schemas/V2Bulk' responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2BulkResponse' - - "400": + '400': description: OK content: application/json: schema: $ref: '#/components/schemas/V2BulkResponse' - - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:write /v2/{ledger}/accounts: head: summary: Count the accounts from a ledger @@ -302,7 +313,7 @@ paths: type: object additionalProperties: true responses: - "204": + '204': description: OK headers: Count: @@ -310,13 +321,15 @@ paths: type: integer format: bigint minimum: 0 - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read get: summary: List accounts from a ledger description: List accounts from a ledger, sorted by address in descending order. @@ -344,10 +357,14 @@ paths: maximum: 1000 - name: cursor in: query - description: | - Parameter used in pagination requests. Maximum page size is set to 15. + description: > + Parameter used in pagination requests. Maximum page size is set to + 15. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when this parameter is set. schema: type: string @@ -371,20 +388,21 @@ paths: type: object additionalProperties: true responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2AccountsCursorResponse' - - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read /v2/{ledger}/accounts/{address}: get: summary: Get account by its address @@ -402,10 +420,14 @@ paths: example: ledger001 - name: address in: path - description: | - Exact address of the account. It must match the following regular expressions pattern: + description: > + Exact address of the account. It must match the following regular + expressions pattern: + ``` + ^\w+(:\w+)*$ + ``` required: true schema: @@ -424,19 +446,21 @@ paths: type: string format: date-time responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2AccountResponse' - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read /v2/{ledger}/accounts/{address}/metadata: post: summary: Add metadata to an account @@ -454,10 +478,14 @@ paths: example: ledger001 - name: address in: path - description: | - Exact address of the account. It must match the following regular expressions pattern: + description: > + Exact address of the account. It must match the following regular + expressions pattern: + ``` + ^\w+(:\w+)*$ + ``` required: true schema: @@ -465,7 +493,9 @@ paths: example: users:001 - name: dryRun in: query - description: Set the dry run mode. Dry run mode doesn't add the logs to the database or publish a message to the message broker. + description: >- + Set the dry run mode. Dry run mode doesn't add the logs to the + database or publish a message to the message broker. schema: type: boolean example: true @@ -482,17 +512,18 @@ paths: $ref: '#/components/schemas/V2Metadata' required: true responses: - "204": + '204': description: No Content content: {} - - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:write /v2/{ledger}/accounts/{address}/metadata/{key}: delete: description: Delete metadata by key @@ -526,13 +557,15 @@ paths: 2XX: description: Key deleted content: {} - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:write /v2/{ledger}/stats: get: tags: @@ -540,8 +573,9 @@ paths: operationId: v2ReadStats x-speakeasy-name-override: ReadStats summary: Get statistics from a ledger - description: | - Get statistics from a ledger. (aggregate metrics on accounts and transactions) + description: > + Get statistics from a ledger. (aggregate metrics on accounts and + transactions) parameters: - name: ledger in: path @@ -551,19 +585,21 @@ paths: type: string example: ledger001 responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2StatsResponse' - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read /v2/{ledger}/transactions: head: tags: @@ -592,7 +628,7 @@ paths: type: object additionalProperties: true responses: - "204": + '204': description: OK headers: Count: @@ -600,13 +636,15 @@ paths: type: integer format: int64 minimum: 0 - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read get: tags: - ledger.v2 @@ -634,10 +672,14 @@ paths: maximum: 1000 - name: cursor in: query - description: | - Parameter used in pagination requests. Maximum page size is set to 15. + description: > + Parameter used in pagination requests. Maximum page size is set to + 15. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when this parameter is set. schema: type: string @@ -673,20 +715,21 @@ paths: type: object additionalProperties: true responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2TransactionsCursorResponse' - - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read post: tags: - ledger.v2 @@ -703,7 +746,9 @@ paths: example: ledger001 - name: dryRun in: query - description: Set the dryRun mode. dry run mode doesn't add the logs to the database or publish a message to the message broker. + description: >- + Set the dryRun mode. dry run mode doesn't add the logs to the + database or publish a message to the message broker. schema: type: boolean example: true @@ -714,7 +759,7 @@ paths: type: string requestBody: required: true - description: > + description: | The request body must contain at least one of the following objects: - `postings`: suitable for simple transactions - `script`: enabling more complex transactions with Numscript @@ -723,20 +768,21 @@ paths: schema: $ref: '#/components/schemas/V2PostTransaction' responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2CreateTransactionResponse' - - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:write /v2/{ledger}/transactions/{id}: get: tags: @@ -774,20 +820,21 @@ paths: type: string format: date-time responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2GetTransactionResponse' - - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read /v2/{ledger}/transactions/{id}/metadata: post: tags: @@ -814,7 +861,9 @@ paths: example: 1234 - name: dryRun in: query - description: Set the dryRun mode. Dry run mode doesn't add the logs to the database or publish a message to the message broker. + description: >- + Set the dryRun mode. Dry run mode doesn't add the logs to the + database or publish a message to the message broker. schema: type: boolean example: true @@ -830,17 +879,18 @@ paths: schema: $ref: '#/components/schemas/V2Metadata' responses: - "204": + '204': description: No Content content: {} - - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:write /v2/{ledger}/transactions/{id}/metadata/{key}: delete: description: Delete metadata by key @@ -876,15 +926,16 @@ paths: responses: 2XX: description: Key deleted - content: { } - - "default": + content: {} + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:write /v2/{ledger}/transactions/{id}/revert: post: tags: @@ -922,20 +973,21 @@ paths: schema: type: boolean responses: - "201": + '201': description: OK content: application/json: schema: $ref: '#/components/schemas/V2RevertTransactionResponse' - - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:write /v2/{ledger}/aggregate/balances: get: tags: @@ -970,19 +1022,21 @@ paths: type: object additionalProperties: true responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2AggregateBalancesResponse' - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read /v2/{ledger}/volumes: get: tags: @@ -1003,10 +1057,14 @@ paths: maximum: 1000 - name: cursor in: query - description: | - Parameter used in pagination requests. Maximum page size is set to 15. + description: > + Parameter used in pagination requests. Maximum page size is set to + 15. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when this parameter is set. schema: type: string @@ -1052,19 +1110,21 @@ paths: type: object additionalProperties: true responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2VolumesWithBalanceCursorResponse' - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read /v2/{ledger}/logs: get: tags: @@ -1093,10 +1153,14 @@ paths: maximum: 1000 - name: cursor in: query - description: | - Parameter used in pagination requests. Maximum page size is set to 15. + description: > + Parameter used in pagination requests. Maximum page size is set to + 15. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when this parameter is set. schema: type: string @@ -1114,19 +1178,21 @@ paths: type: object additionalProperties: true responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/V2LogsCursorResponse' - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:read /v2/{ledger}/logs/import: post: tags: @@ -1147,15 +1213,17 @@ paths: schema: type: string responses: - 204: + '204': description: Import OK - "default": + default: description: Error content: application/json: schema: $ref: '#/components/schemas/V2ErrorResponse' - + security: + - Authorization: + - ledger:write /v2/{ledger}/logs/export: post: summary: Export logs @@ -1172,9 +1240,9 @@ paths: type: string example: ledger001 responses: - 200: + '200': description: Import OK - "default": + default: description: Error content: application/octet-stream: @@ -1182,7 +1250,9 @@ paths: title: bytes type: string format: binary - + security: + - Authorization: + - ledger:write components: schemas: V2AccountsCursorResponse: @@ -1208,47 +1278,14 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: $ref: '#/components/schemas/V2Account' - - V2BalancesCursorResponse: - type: object - required: - - cursor - properties: - cursor: - type: object - required: - - pageSize - - hasMore - - data - properties: - pageSize: - type: integer - format: int64 - minimum: 1 - maximum: 1000 - example: 15 - hasMore: - type: boolean - example: false - previous: - type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" - next: - type: string - example: "" - data: - type: array - items: - $ref: '#/components/schemas/V2AccountsBalances' - V2TransactionsCursorResponse: type: object required: @@ -1272,15 +1309,14 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: $ref: '#/components/schemas/V2ExpandedTransaction' - V2LogsCursorResponse: type: object required: @@ -1304,15 +1340,14 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: $ref: '#/components/schemas/V2Log' - V2AccountResponse: type: object required: @@ -1320,7 +1355,6 @@ components: properties: data: $ref: '#/components/schemas/V2Account' - V2AggregateBalancesResponse: type: object required: @@ -1328,7 +1362,6 @@ components: properties: data: $ref: '#/components/schemas/V2AssetsBalances' - V2VolumesWithBalanceCursorResponse: type: object required: @@ -1352,15 +1385,14 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: $ref: '#/components/schemas/V2VolumesWithBalance' - V2VolumesWithBalance: type: object properties: @@ -1383,13 +1415,12 @@ components: - input - output - balance - V2Metadata: type: object additionalProperties: type: string - example: { admin: "true" } - + example: + admin: 'true' V2ConfigInfo: type: object properties: @@ -1401,7 +1432,6 @@ components: - config - server - version - V2Account: type: object required: @@ -1416,24 +1446,12 @@ components: properties: {} additionalProperties: type: string - example: { admin: "true" } + example: + admin: 'true' volumes: $ref: '#/components/schemas/V2Volumes' effectiveVolumes: $ref: '#/components/schemas/V2Volumes' - - V2AccountsBalances: - type: object - additionalProperties: - $ref: '#/components/schemas/V2AssetsBalances' - example: - account1: - USD: 100 - EUR: 23 - account2: - CAD: 20 - JPY: 21 - V2AssetsBalances: type: object additionalProperties: @@ -1442,9 +1460,6 @@ components: example: USD: 100 EUR: 12 - - - V2Posting: type: object properties: @@ -1467,29 +1482,6 @@ components: - asset - destination - source - - V2Script: - type: object - properties: - plain: - type: string - example: "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n" - vars: - type: object - properties: {} - additionalProperties: true - example: { - "user": "users:042" - } - reference: - type: string - example: order_1234 - description: Reference to attach to the generated transaction - metadata: - $ref: '#/components/schemas/V2Metadata' - required: - - plain - V2Transaction: type: object properties: @@ -1512,26 +1504,24 @@ components: reverted: type: boolean required: - - postings - - timestamp - - id - - metadata - - reverted - + - postings + - timestamp + - id + - metadata + - reverted V2ExpandedTransaction: allOf: - - $ref: '#/components/schemas/V2Transaction' - - type: object - properties: - preCommitVolumes: - $ref: '#/components/schemas/V2AggregatedVolumes' - postCommitVolumes: - $ref: '#/components/schemas/V2AggregatedVolumes' - + - $ref: '#/components/schemas/V2Transaction' + - type: object + properties: + preCommitVolumes: + $ref: '#/components/schemas/V2AggregatedVolumes' + postCommitVolumes: + $ref: '#/components/schemas/V2AggregatedVolumes' V2PostTransaction: type: object required: - - metadata + - metadata properties: timestamp: type: string @@ -1550,9 +1540,8 @@ components: type: object properties: {} additionalProperties: true - example: { - "user": "users:042" - } + example: + user: users:042 required: - plain reference: @@ -1560,7 +1549,6 @@ components: example: ref:001 metadata: $ref: '#/components/schemas/V2Metadata' - V2Stats: type: object properties: @@ -1575,7 +1563,6 @@ components: required: - accounts - transactions - V2Log: type: object properties: @@ -1596,7 +1583,7 @@ components: additionalProperties: true hash: type: string - example: "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e" + example: 9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e date: type: string format: date-time @@ -1606,7 +1593,6 @@ components: - data - hash - date - V2CreateTransactionResponse: properties: data: @@ -1614,18 +1600,15 @@ components: type: object required: - data - V2RevertTransactionResponse: $ref: '#/components/schemas/V2CreateTransactionResponse' - V2GetTransactionResponse: properties: data: $ref: '#/components/schemas/V2ExpandedTransaction' type: object required: - - data - + - data V2StatsResponse: properties: data: @@ -1633,10 +1616,8 @@ components: type: object required: - data - V2ConfigInfoResponse: $ref: '#/components/schemas/V2ConfigInfo' - V2Volume: type: object properties: @@ -1656,7 +1637,6 @@ components: input: 100 output: 20 balance: 80 - V2Volumes: type: object additionalProperties: @@ -1670,23 +1650,21 @@ components: input: 100 output: 10 balance: 90 - V2AggregatedVolumes: type: object additionalProperties: $ref: '#/components/schemas/V2Volumes' example: - "orders:1": - "USD": + orders:1: + USD: input: 100 output: 10 balance: 90 - "orders:2": - "USD": + orders:2: + USD: input: 100 output: 10 balance: 90 - V2ErrorResponse: type: object required: @@ -1697,11 +1675,11 @@ components: $ref: '#/components/schemas/V2ErrorsEnum' errorMessage: type: string - example: "[VALIDATION] invalid 'cursor' query param" + example: '[VALIDATION] invalid ''cursor'' query param' details: type: string - example: "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" - + example: >- + https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 V2ErrorsEnum: type: string enum: @@ -1718,13 +1696,11 @@ components: - LEDGER_NOT_FOUND - IMPORT example: VALIDATION - V2LedgerInfoResponse: type: object properties: data: $ref: '#/components/schemas/V2LedgerInfo' - V2LedgerInfo: type: object properties: @@ -1738,7 +1714,6 @@ components: type: array items: $ref: '#/components/schemas/V2MigrationInfo' - V2MigrationInfo: type: object properties: @@ -1756,14 +1731,12 @@ components: state: type: string enum: - - "TO DO" - - "DONE" - + - TO DO + - DONE V2Bulk: type: array items: $ref: '#/components/schemas/V2BulkElement' - V2BaseBulkElement: type: object required: @@ -1773,7 +1746,6 @@ components: type: string ik: type: string - V2BulkElement: type: object oneOf: @@ -1788,69 +1760,63 @@ components: ADD_METADATA: '#/components/schemas/V2BulkElementAddMetadata' REVERT_TRANSACTION: '#/components/schemas/V2BulkElementRevertTransaction' DELETE_METADATA: '#/components/schemas/V2BulkElementDeleteMetadata' - V2BulkElementCreateTransaction: type: object allOf: - - $ref: '#/components/schemas/V2BaseBulkElement' - - type: object - properties: - data: - $ref: '#/components/schemas/V2PostTransaction' - + - $ref: '#/components/schemas/V2BaseBulkElement' + - type: object + properties: + data: + $ref: '#/components/schemas/V2PostTransaction' V2TargetId: oneOf: - type: string - type: integer format: bigint - V2TargetType: type: string enum: - TRANSACTION - ACCOUNT - V2BulkElementAddMetadata: type: object allOf: - - $ref: '#/components/schemas/V2BaseBulkElement' - - type: object - properties: - data: - type: object - properties: - targetId: - $ref: '#/components/schemas/V2TargetId' - targetType: - $ref: '#/components/schemas/V2TargetType' - metadata: - type: object - additionalProperties: - type: string - required: - - targetId - - targetType - - metadata - + - $ref: '#/components/schemas/V2BaseBulkElement' + - type: object + properties: + data: + type: object + properties: + targetId: + $ref: '#/components/schemas/V2TargetId' + targetType: + $ref: '#/components/schemas/V2TargetType' + metadata: + type: object + additionalProperties: + type: string + required: + - targetId + - targetType + - metadata V2BulkElementRevertTransaction: type: object allOf: - - $ref: '#/components/schemas/V2BaseBulkElement' - - type: object - properties: - data: - type: object - properties: - id: - type: integer - format: bigint - force: - type: boolean - atEffectiveDate: - type: boolean - required: - - id - + - $ref: '#/components/schemas/V2BaseBulkElement' + - type: object + properties: + data: + type: object + properties: + id: + type: integer + format: bigint + force: + type: boolean + atEffectiveDate: + type: boolean + required: + - id V2BulkElementDeleteMetadata: type: object allOf: @@ -1870,7 +1836,6 @@ components: - targetId - targetType - key - V2BulkResponse: properties: data: @@ -1880,7 +1845,6 @@ components: type: object required: - data - V2BulkElementResult: type: object oneOf: @@ -1897,7 +1861,6 @@ components: REVERT_TRANSACTION: '#/components/schemas/V2BulkElementResultRevertTransaction' DELETE_METADATA: '#/components/schemas/V2BulkElementResultDeleteMetadata' ERROR: '#/components/schemas/V2BulkElementResultError' - V2BaseBulkElementResult: type: object properties: @@ -1905,7 +1868,6 @@ components: type: string required: - responseType - V2BulkElementResultCreateTransaction: allOf: - $ref: '#/components/schemas/V2BaseBulkElementResult' @@ -1915,11 +1877,9 @@ components: $ref: '#/components/schemas/V2Transaction' required: - data - V2BulkElementResultAddMetadata: allOf: - $ref: '#/components/schemas/V2BaseBulkElementResult' - V2BulkElementResultRevertTransaction: allOf: - $ref: '#/components/schemas/V2BaseBulkElementResult' @@ -1929,11 +1889,9 @@ components: $ref: '#/components/schemas/V2Transaction' required: - data - V2BulkElementResultDeleteMetadata: allOf: - $ref: '#/components/schemas/V2BaseBulkElementResult' - V2BulkElementResultError: allOf: - $ref: '#/components/schemas/V2BaseBulkElementResult' @@ -1948,7 +1906,6 @@ components: required: - errorCode - errorDescription - V2CreateLedgerRequest: type: object properties: @@ -1956,7 +1913,6 @@ components: type: string metadata: $ref: '#/components/schemas/V2Metadata' - V2Ledger: type: object properties: @@ -1973,7 +1929,6 @@ components: - name - addedAt - bucket - V2LedgerListResponse: type: object required: @@ -1997,22 +1952,20 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: $ref: '#/components/schemas/V2Ledger' - V2UpdateLedgerMetadataRequest: $ref: '#/components/schemas/V2Metadata' - V2GetLedgerResponse: type: object required: - data properties: data: - $ref: '#/components/schemas/V2Ledger' \ No newline at end of file + $ref: '#/components/schemas/V2Ledger' diff --git a/components/payments/openapi.yaml b/components/payments/openapi.yaml index 003df4bd95..7788a4579b 100644 --- a/components/payments/openapi.yaml +++ b/components/payments/openapi.yaml @@ -1,9 +1,7 @@ openapi: 3.0.3 info: title: Payments API - version: "PAYMENTS_VERSION" - -# ---------------------- PATHS ---------------------- + version: PAYMENTS_VERSION paths: /_info: get: @@ -11,32 +9,34 @@ paths: operationId: getServerInfo tags: - payments.v1 - responses: - "200": + '200': $ref: '#/components/responses/ServerInfo' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /payments: post: summary: Create a payment tags: - payments.v1 - operationId: createPayment description: Create a payment requestBody: $ref: '#/components/requestBodies/Payment' responses: - "200": + '200': $ref: '#/components/responses/Payment' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:write get: summary: List payments operationId: listPayments - tags: - payments.v1 parameters: @@ -45,48 +45,51 @@ paths: - $ref: '#/components/parameters/Sort' - $ref: '#/components/parameters/Query' responses: - "200": + '200': $ref: '#/components/responses/Payments' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /payments/{paymentId}: get: summary: Get a payment tags: - payments.v1 operationId: getPayment - parameters: - $ref: '#/components/parameters/PaymentId' responses: - "200": + '200': $ref: '#/components/responses/Payment' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /payments/{paymentId}/metadata: patch: summary: Update metadata tags: - payments.v1 operationId: updateMetadata - parameters: - $ref: '#/components/parameters/PaymentId' requestBody: $ref: '#/components/requestBodies/UpdateMetadata' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:write /transfer-initiations: get: summary: List Transfer Initiations operationId: listTransferInitiations - tags: - payments.v1 parameters: @@ -95,111 +98,120 @@ paths: - $ref: '#/components/parameters/Sort' - $ref: '#/components/parameters/Query' responses: - "200": + '200': $ref: '#/components/responses/TransferInitiations' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:read post: summary: Create a TransferInitiation tags: - payments.v1 operationId: createTransferInitiation - description: Create a transfer initiation requestBody: $ref: '#/components/requestBodies/TransferInitiation' responses: - "200": + '200': $ref: '#/components/responses/TransferInitiation' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:write /transfer-initiations/{transferId}: get: summary: Get a transfer initiation tags: - payments.v1 operationId: getTransferInitiation - parameters: - $ref: '#/components/parameters/TransferId' responses: - "200": + '200': $ref: '#/components/responses/TransferInitiation' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:read delete: summary: Delete a transfer initiation operationId: deleteTransferInitiation - tags: - payments.v1 description: Delete a transfer initiation by its id. parameters: - $ref: '#/components/parameters/TransferId' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:write /transfer-initiations/{transferId}/status: post: summary: Update the status of a transfer initiation tags: - payments.v1 operationId: udpateTransferInitiationStatus - description: Update a transfer initiation status parameters: - $ref: '#/components/parameters/TransferId' requestBody: $ref: '#/components/requestBodies/UpdateTransferInitiationStatus' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:write /transfer-initiations/{transferId}/reverse: post: summary: Reverse a transfer initiation tags: - payments.v1 operationId: reverseTransferInitiation - description: Reverse transfer initiation parameters: - $ref: '#/components/parameters/TransferId' requestBody: $ref: '#/components/requestBodies/ReverseTransferInitiation' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:write /transfer-initiations/{transferId}/retry: post: summary: Retry a failed transfer initiation tags: - payments.v1 operationId: retryTransferInitiation - description: Retry a failed transfer initiation parameters: - $ref: '#/components/parameters/TransferId' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:write /pools: get: summary: List Pools operationId: listPools - tags: - payments.v1 parameters: @@ -208,74 +220,84 @@ paths: - $ref: '#/components/parameters/Sort' - $ref: '#/components/parameters/Query' responses: - "200": + '200': $ref: '#/components/responses/Pools' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:read post: summary: Create a Pool tags: - payments.v1 operationId: createPool - description: Create a Pool requestBody: $ref: '#/components/requestBodies/Pool' responses: - "200": + '200': $ref: '#/components/responses/Pool' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:write /pools/{poolId}: get: summary: Get a Pool tags: - payments.v1 operationId: getPool - parameters: - $ref: '#/components/parameters/PoolId' responses: - "200": + '200': $ref: '#/components/responses/Pool' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:read delete: summary: Delete a Pool operationId: deletePool - tags: - payments.v1 description: Delete a pool by its id. parameters: - $ref: '#/components/parameters/PoolId' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:write /pools/{poolId}/accounts: post: summary: Add an account to a pool tags: - payments.v1 operationId: addAccountToPool - description: Add an account to a pool parameters: - $ref: '#/components/parameters/PoolId' requestBody: $ref: '#/components/requestBodies/AddAccountToPool' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:write /pools/{poolId}/accounts/{accountId}: delete: summary: Remove an account from a pool operationId: removeAccountFromPool - tags: - payments.v1 description: Remove an account from a pool by its id. @@ -283,15 +305,17 @@ paths: - $ref: '#/components/parameters/PoolId' - $ref: '#/components/parameters/AccountId' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:write /pools/{poolId}/balances: get: summary: Get pool balances operationId: getPoolBalances - tags: - payments.v1 parameters: @@ -305,30 +329,33 @@ paths: type: string format: date-time responses: - "200": + '200': $ref: '#/components/responses/PoolBalances' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /accounts: post: summary: Create an account tags: - payments.v1 operationId: createAccount - description: Create an account requestBody: $ref: '#/components/requestBodies/Account' responses: - "200": + '200': $ref: '#/components/responses/Account' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:write get: summary: List accounts operationId: listAccounts - tags: - payments.v1 parameters: @@ -343,31 +370,33 @@ paths: type: object additionalProperties: true responses: - "200": + '200': $ref: '#/components/responses/Accounts' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /accounts/{accountId}: get: summary: Get an account tags: - payments.v1 operationId: getAccount - parameters: - $ref: '#/components/parameters/AccountId' responses: - "200": + '200': $ref: '#/components/responses/Account' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /accounts/{accountId}/balances: get: summary: Get account balances operationId: getAccountBalances - tags: - payments.v1 parameters: @@ -409,30 +438,33 @@ paths: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/Sort' responses: - "200": + '200': $ref: '#/components/responses/AccountBalances' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /bank-accounts: post: summary: Create a BankAccount in Payments and on the PSP tags: - payments.v1 operationId: createBankAccount - description: Create a bank account in Payments and on the PSP. requestBody: $ref: '#/components/requestBodies/BankAccount' responses: - "200": + '200': $ref: '#/components/responses/BankAccount' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:write get: summary: List bank accounts created by user on Formance operationId: listBankAccounts - tags: - payments.v1 parameters: @@ -441,125 +473,135 @@ paths: - $ref: '#/components/parameters/Sort' description: List all bank accounts created by user on Formance. responses: - "200": + '200': $ref: '#/components/responses/BankAccounts' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /bank-accounts/{bankAccountId}: get: summary: Get a bank account created by user on Formance tags: - payments.v1 operationId: getBankAccount - parameters: - $ref: '#/components/parameters/BankAccountId' responses: - "200": + '200': $ref: '#/components/responses/BankAccount' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /bank-accounts/{bankAccountId}/forward: post: summary: Forward a bank account to a connector tags: - payments.v1 operationId: forwardBankAccount - parameters: - $ref: '#/components/parameters/BankAccountId' requestBody: $ref: '#/components/requestBodies/ForwardBankAccount' responses: - "200": + '200': $ref: '#/components/responses/BankAccount' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:write /bank-accounts/{bankAccountId}/metadata: patch: summary: Update metadata of a bank account tags: - payments.v1 operationId: updateBankAccountMetadata - parameters: - $ref: '#/components/parameters/BankAccountId' requestBody: $ref: '#/components/requestBodies/UpdateBankAccountMetadata' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:write /connectors: get: summary: List all installed connectors operationId: listAllConnectors - tags: - payments.v1 description: List all installed connectors. responses: - "200": + '200': $ref: '#/components/responses/Connectors' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /connectors/configs: get: summary: List the configs of each available connector operationId: listConfigsAvailableConnectors - tags: - payments.v1 description: List the configs of each available connector. responses: - "200": + '200': $ref: '#/components/responses/ConnectorsConfigs' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /connectors/{connector}: post: summary: Install a connector tags: - payments.v1 operationId: installConnector - description: Install a connector by its name and config. parameters: - $ref: '#/components/parameters/Connector' requestBody: $ref: '#/components/requestBodies/ConnectorConfig' responses: - "201": + '201': $ref: '#/components/responses/ConnectorInstalled' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:write delete: summary: Uninstall a connector deprecated: true operationId: uninstallConnector - tags: - payments.v1 description: Uninstall a connector by its name. parameters: - $ref: '#/components/parameters/Connector' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:write /connectors/{connector}/{connectorId}: delete: summary: Uninstall a connector operationId: uninstallConnectorV1 - tags: - payments.v1 description: Uninstall a connector by its name. @@ -567,33 +609,35 @@ paths: - $ref: '#/components/parameters/Connector' - $ref: '#/components/parameters/ConnectorID' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:write /connectors/{connector}/config: get: summary: Read the config of a connector deprecated: true operationId: readConnectorConfig - tags: - payments.v1 description: Read connector config parameters: - $ref: '#/components/parameters/Connector' responses: - "200": + '200': $ref: '#/components/responses/ConnectorConfig' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /connectors/{connector}/{connectorId}/config: post: summary: Update the config of a connector operationId: updateConnectorConfigV1 - tags: - payments.v1 description: Update connector config @@ -603,14 +647,16 @@ paths: requestBody: $ref: '#/components/requestBodies/ConnectorConfig' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:write get: summary: Read the config of a connector operationId: readConnectorConfigV1 - tags: - payments.v1 description: Read connector config @@ -618,17 +664,18 @@ paths: - $ref: '#/components/parameters/Connector' - $ref: '#/components/parameters/ConnectorID' responses: - "200": + '200': $ref: '#/components/responses/ConnectorConfig' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /connectors/{connector}/reset: post: summary: Reset a connector deprecated: true operationId: resetConnector - tags: - payments.v1 description: | @@ -637,15 +684,17 @@ paths: parameters: - $ref: '#/components/parameters/Connector' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' + security: + - Authorization: + - payments:write /connectors/{connector}/{connectorId}/reset: post: summary: Reset a connector operationId: resetConnectorV1 - tags: - payments.v1 description: | @@ -655,11 +704,13 @@ paths: - $ref: '#/components/parameters/Connector' - $ref: '#/components/parameters/ConnectorID' responses: - "204": + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:write /connectors/{connector}/tasks: get: summary: List tasks from a connector @@ -667,25 +718,25 @@ paths: tags: - payments.v1 operationId: listConnectorTasks - description: List all tasks associated with this connector. parameters: - $ref: '#/components/parameters/Connector' - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/Cursor' responses: - "200": + '200': $ref: '#/components/responses/Tasks' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /connectors/{connector}/{connectorId}/tasks: get: summary: List tasks from a connector tags: - payments.v1 operationId: listConnectorTasksV1 - description: List all tasks associated with this connector. parameters: - $ref: '#/components/parameters/Connector' @@ -693,11 +744,13 @@ paths: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/Cursor' responses: - "200": + '200': $ref: '#/components/responses/Tasks' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /connectors/{connector}/tasks/{taskId}: get: summary: Read a specific task of the connector @@ -705,56 +758,57 @@ paths: tags: - payments.v1 operationId: getConnectorTask - description: Get a specific task associated to the connector. parameters: - $ref: '#/components/parameters/Connector' - $ref: '#/components/parameters/TaskId' responses: - "200": + '200': $ref: '#/components/responses/Task' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /connectors/{connector}/{connectorId}/tasks/{taskId}: get: summary: Read a specific task of the connector tags: - payments.v1 operationId: getConnectorTaskV1 - description: Get a specific task associated to the connector. parameters: - $ref: '#/components/parameters/Connector' - $ref: '#/components/parameters/ConnectorID' - $ref: '#/components/parameters/TaskId' responses: - "200": + '200': $ref: '#/components/responses/Task' default: $ref: '#/components/responses/PaymentsErrorResponse' - + security: + - Authorization: + - payments:read /connectors/{connector}/transfers: post: summary: Transfer funds between Connector accounts tags: - payments.v1 operationId: connectorsTransfer - description: Execute a transfer between two accounts. parameters: - $ref: '#/components/parameters/Connector' requestBody: $ref: '#/components/requestBodies/Transfer' responses: - "200": + '200': $ref: '#/components/responses/Transfer' default: $ref: '#/components/responses/PaymentsErrorResponse' - -# ---------------------- COMPONENTS ---------------------- + security: + - Authorization: + - payments:write components: - # ---------------------- PARAMETERS ---------------------- parameters: Query: name: query @@ -796,8 +850,8 @@ components: type: string description: Fields used to sort payments (default is date:desc). example: - - date:asc - - status:desc + - date:asc + - status:desc PaymentId: name: paymentId in: path @@ -861,8 +915,6 @@ components: schema: type: string required: true - - # ---------------------- RESPONSES ---------------------- responses: NoContent: description: No content @@ -992,13 +1044,6 @@ components: application/json: schema: $ref: '#/components/schemas/TransferResponse' - Transfers: - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/TransfersResponse' - # ---------------------- REQUESTS ---------------------- requestBodies: ConnectorConfig: required: true @@ -1077,11 +1122,8 @@ components: content: application/json: schema: - $ref: '#/components/schemas/TransferRequest' - - # ---------------------- SCHEMAS ---------------------- + $ref: '#/components/schemas/TransferRequest' schemas: - # ---------------------- CURSORS ---------------------- CursorBase: type: object required: @@ -1100,10 +1142,10 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' PaymentsCursor: type: object required: @@ -1224,8 +1266,6 @@ components: - $ref: '#/components/schemas/TaskBankingCircle' - $ref: '#/components/schemas/TaskMangoPay' - $ref: '#/components/schemas/TaskMoneycorp' - - # ---------------------- RESPONSES ---------------------- ConnectorConfigResponse: type: object required: @@ -1337,7 +1377,7 @@ components: TaskResponse: type: object required: - - data + - data properties: data: oneOf: @@ -1354,33 +1394,6 @@ components: properties: id: type: string - TransfersResponse: - type: object - properties: - data: - type: array - items: - type: object - properties: - id: - type: string - amount: - type: integer - format: bigint - minimum: 0 - asset: - type: string - destination: - type: string - source: - type: string - currency: - type: string - status: - type: string - error: - type: string - # ---------------------- DATA MODELS ---------------------- Connector: type: string enum: @@ -1431,13 +1444,14 @@ components: properties: name: type: string - example: 'My Stripe Account' + example: My Stripe Account pollingPeriod: type: string - example: '60s' - description: | - The frequency at which the connector will try to fetch new BalanceTransaction objects from Stripe API. - default: '120s' + example: 60s + description: > + The frequency at which the connector will try to fetch new + BalanceTransaction objects from Stripe API. + default: 120s apiKey: type: string example: XXX @@ -1457,15 +1471,17 @@ components: properties: name: type: string - example: 'My DummyPay Account' + example: My DummyPay Account filePollingPeriod: type: string - example: '60s' - description: The frequency at which the connector will try to fetch new payment objects from the directory - default: '10s' + example: 60s + description: >- + The frequency at which the connector will try to fetch new payment + objects from the directory + default: 10s directory: type: string - example: '/tmp/dummypay' + example: /tmp/dummypay prefixFileToIngest: type: string numberOfAccountsPreGenerated: @@ -1482,41 +1498,43 @@ components: properties: name: type: string - example: 'My Wise Account' + example: My Wise Account apiKey: type: string - example: 'XXX' + example: XXX pollingPeriod: type: string - example: '60s' - description: | - The frequency at which the connector will try to fetch new BalanceTransaction objects from Wise API. - default: '120s' + example: 60s + description: > + The frequency at which the connector will try to fetch new + BalanceTransaction objects from Wise API. + default: 120s ModulrConfig: type: object required: - - name - - apiKey - - apiSecret + - name + - apiKey + - apiSecret properties: name: type: string - example: 'My Modulr Account' + example: My Modulr Account apiKey: type: string - example: 'XXX' + example: XXX apiSecret: type: string - example: 'XXX' + example: XXX endpoint: type: string - example: 'XXX' + example: XXX pollingPeriod: type: string - example: '60s' - description: | - The frequency at which the connector will try to fetch new BalanceTransaction objects from Modulr API. - default: '120s' + example: 60s + description: > + The frequency at which the connector will try to fetch new + BalanceTransaction objects from Modulr API. + default: 120s BankingCircleConfig: type: object required: @@ -1530,31 +1548,32 @@ components: properties: name: type: string - example: 'My Banking Circle Account' + example: My Banking Circle Account username: type: string - example: 'XXX' + example: XXX password: type: string - example: 'XXX' + example: XXX endpoint: type: string - example: 'XXX' + example: XXX authorizationEndpoint: type: string - example: 'XXX' + example: XXX userCertificate: type: string - example: 'XXX' + example: XXX userCertificateKey: type: string - example: 'XXX' + example: XXX pollingPeriod: type: string - example: '60s' - description: | - The frequency at which the connector will try to fetch new BalanceTransaction objects from Banking Circle API. - default: '120s' + example: 60s + description: > + The frequency at which the connector will try to fetch new + BalanceTransaction objects from Banking Circle API. + default: 120s GenericConfig: type: object required: @@ -1564,19 +1583,20 @@ components: properties: name: type: string - example: 'My Generic Account' + example: My Generic Account apiKey: type: string - example: 'XXX' + example: XXX endpoint: type: string - example: 'XXX' + example: XXX pollingPeriod: type: string - example: '60s' - description: | - The frequency at which the connector will try to fetch new BalanceTransaction objects from the API. - default: '120s' + example: 60s + description: > + The frequency at which the connector will try to fetch new + BalanceTransaction objects from the API. + default: 120s MangoPayConfig: type: object required: @@ -1587,22 +1607,23 @@ components: properties: name: type: string - example: 'My MangoPay Account' + example: My MangoPay Account pollingPeriod: type: string - example: '60s' - description: | - The frequency at which the connector will try to fetch new BalanceTransaction objects from MangoPay API. - default: '120s' + example: 60s + description: > + The frequency at which the connector will try to fetch new + BalanceTransaction objects from MangoPay API. + default: 120s clientID: type: string - example: 'XXX' + example: XXX apiKey: type: string - example: 'XXX' + example: XXX endpoint: type: string - example: 'XXX' + example: XXX MoneycorpConfig: type: object required: @@ -1613,22 +1634,23 @@ components: properties: name: type: string - example: 'My Moneycorp Account' + example: My Moneycorp Account clientID: type: string - example: 'XXX' + example: XXX apiKey: type: string - example: 'XXX' + example: XXX endpoint: type: string - example: 'XXX' + example: XXX pollingPeriod: type: string - example: '60s' - description: | - The frequency at which the connector will try to fetch new BalanceTransaction objects from MoneyCorp API. - default: '120s' + example: 60s + description: > + The frequency at which the connector will try to fetch new + BalanceTransaction objects from MoneyCorp API. + default: 120s CurrencyCloudConfig: type: object required: @@ -1638,23 +1660,25 @@ components: properties: name: type: string - example: 'My CurrencyCloud Account' + example: My CurrencyCloud Account apiKey: type: string - example: 'XXX' + example: XXX loginID: type: string - example: 'XXX' - description: 'Username of the API Key holder' + example: XXX + description: Username of the API Key holder pollingPeriod: type: string - example: '60s' + example: 60s description: The frequency at which the connector will fetch transactions - default: '120s' + default: 120s endpoint: type: string - example: 'XXX' - description: 'The endpoint to use for the API. Defaults to https://devapi.currencycloud.com' + example: XXX + description: >- + The endpoint to use for the API. Defaults to + https://devapi.currencycloud.com AdyenConfig: type: object required: @@ -1664,22 +1688,23 @@ components: properties: name: type: string - example: 'My Adyen Account' + example: My Adyen Account apiKey: type: string - example: 'XXX' + example: XXX hmacKey: type: string - example: 'XXX' + example: XXX liveEndpointPrefix: type: string - example: 'XXX' + example: XXX pollingPeriod: type: string - example: '60s' - description: | - The frequency at which the connector will try to fetch new BalanceTransaction objects from Adyen API. - default: '120s' + example: 60s + description: > + The frequency at which the connector will try to fetch new + BalanceTransaction objects from Adyen API. + default: 120s AtlarConfig: type: object required: @@ -1689,37 +1714,46 @@ components: properties: name: type: string - example: 'My Atlar Account' + example: My Atlar Account baseUrl: type: string example: https://api.example.com default: https://api.atlar.com - description: | - The base URL the client uses for making requests towards the Atlar API. + description: > + The base URL the client uses for making requests towards the Atlar + API. pollingPeriod: type: string - example: '60s' - description: | - The frequency at which the connector tries to fetch new Transaction objects from the Atlar API. - default: '120s' + example: 60s + description: > + The frequency at which the connector tries to fetch new Transaction + objects from the Atlar API. + default: 120s transferInitiationStatusPollingPeriod: type: string - example: '60s' - description: | - The frequency at which the connector tries to fetch the status of payment initiations from the Atlar API. - default: '120s' + example: 60s + description: > + The frequency at which the connector tries to fetch the status of + payment initiations from the Atlar API. + default: 120s accessKey: type: string example: XXX - description: | - The access key used by the connector for authorizing requests to the Atlar API. - You can obtain it along with the associated secret from the Atlar dashboard. + description: > + The access key used by the connector for authorizing requests to the + Atlar API. + + You can obtain it along with the associated secret from the Atlar + dashboard. secret: type: string example: XXX - description: | - The secret used by the connector for authorizing requests to the Atlar API. - You can obtain it along with the associated access key from the Atlar dashboard. + description: > + The secret used by the connector for authorizing requests to the + Atlar API. + + You can obtain it along with the associated access key from the + Atlar dashboard. pageSize: type: integer format: int64 @@ -1960,28 +1994,28 @@ components: metadata: $ref: '#/components/schemas/PaymentMetadata' PaymentAdjustment: - type: object - required: - - reference - - createdAt - - amount - - status - - raw - properties: - reference: - type: string - createdAt: - type: string - format: date-time - status: - $ref: '#/components/schemas/PaymentStatus' - amount: - type: integer - format: bigint - minimum: 0 - example: 100 - raw: - type: object + type: object + required: + - reference + - createdAt + - amount + - status + - raw + properties: + reference: + type: string + createdAt: + type: string + format: date-time + status: + $ref: '#/components/schemas/PaymentStatus' + amount: + type: integer + format: bigint + minimum: 0 + example: 100 + raw: + type: object PaymentMetadata: type: object additionalProperties: @@ -2303,7 +2337,7 @@ components: type: string name: type: string - example: 'My account' + example: My account accountNumber: type: string iban: @@ -2534,7 +2568,7 @@ components: ServerInfo: type: object required: - - version + - version properties: version: type: string @@ -2548,7 +2582,7 @@ components: $ref: '#/components/schemas/PaymentsErrorsEnum' errorMessage: type: string - example: "[VALIDATION] missing reference" + example: '[VALIDATION] missing reference' PaymentsErrorsEnum: type: string enum: diff --git a/ee/auth/openapi.yaml b/ee/auth/openapi.yaml index 09685ade16..9d6090af13 100644 --- a/ee/auth/openapi.yaml +++ b/ee/auth/openapi.yaml @@ -2,8 +2,7 @@ openapi: 3.0.3 info: title: Auth API contact: {} - version: "AUTH_VERSION" - + version: AUTH_VERSION paths: /.well-known/openid-configuration: get: @@ -12,11 +11,16 @@ paths: tags: - auth.v1 responses: - 200: - description: | + '200': + description: > OpenID provider configuration. - See https://swagger.io/docs/specification/authentication/openid-connect-discovery/ for details + See + https://swagger.io/docs/specification/authentication/openid-connect-discovery/ + for details + security: + - Authorization: + - auth:read /_info: get: summary: Get server info @@ -24,12 +28,15 @@ paths: tags: - auth.v1 responses: - 200: + '200': description: Server information content: application/json: schema: $ref: '#/components/schemas/ServerInfo' + security: + - Authorization: + - auth:read /clients: get: summary: List clients @@ -37,12 +44,15 @@ paths: - auth.v1 operationId: listClients responses: - "200": + '200': description: List of clients content: application/json: schema: $ref: '#/components/schemas/ListClientsResponse' + security: + - Authorization: + - auth:read post: summary: Create client tags: @@ -54,12 +64,15 @@ paths: schema: $ref: '#/components/schemas/CreateClientRequest' responses: - "201": + '201': description: Client created content: application/json: schema: $ref: '#/components/schemas/CreateClientResponse' + security: + - Authorization: + - auth:write /clients/{clientId}: get: summary: Read client @@ -74,12 +87,15 @@ paths: schema: type: string responses: - "200": + '200': description: Retrieved client content: application/json: schema: $ref: '#/components/schemas/ReadClientResponse' + security: + - Authorization: + - auth:read put: summary: Update client tags: @@ -98,12 +114,15 @@ paths: schema: type: string responses: - "200": + '200': description: Updated client content: application/json: schema: $ref: '#/components/schemas/UpdateClientResponse' + security: + - Authorization: + - auth:write delete: summary: Delete client tags: @@ -117,8 +136,11 @@ paths: schema: type: string responses: - "204": + '204': description: Client deleted + security: + - Authorization: + - auth:write /clients/{clientId}/secrets: post: summary: Add a secret to a client @@ -138,12 +160,15 @@ paths: schema: $ref: '#/components/schemas/CreateSecretRequest' responses: - 200: + '200': description: Created secret content: application/json: schema: $ref: '#/components/schemas/CreateSecretResponse' + security: + - Authorization: + - auth:write /clients/{clientId}/secrets/{secretId}: delete: summary: Delete a secret from a client @@ -164,8 +189,11 @@ paths: schema: type: string responses: - 204: + '204': description: Secret deleted + security: + - Authorization: + - auth:write /users: get: summary: List users @@ -174,12 +202,15 @@ paths: description: List users operationId: listUsers responses: - 200: + '200': description: List of users content: application/json: schema: $ref: '#/components/schemas/ListUsersResponse' + security: + - Authorization: + - auth:read /users/{userId}: get: summary: Read user @@ -195,12 +226,15 @@ paths: schema: type: string responses: - 200: + '200': description: Retrieved user content: application/json: schema: $ref: '#/components/schemas/ReadUserResponse' + security: + - Authorization: + - auth:read components: schemas: Metadata: @@ -342,26 +376,6 @@ components: properties: data: $ref: '#/components/schemas/Client' - ListScopesResponse: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Scope' - CreateScopeRequest: - $ref: '#/components/schemas/ScopeOptions' - CreateScopeResponse: - type: object - properties: - data: - $ref: '#/components/schemas/Scope' - ReadScopeResponse: - $ref: '#/components/schemas/CreateScopeResponse' - UpdateScopeRequest: - $ref: '#/components/schemas/ScopeOptions' - UpdateScopeResponse: - $ref: '#/components/schemas/CreateScopeResponse' CreateSecretRequest: $ref: '#/components/schemas/SecretOptions' CreateSecretResponse: @@ -384,7 +398,7 @@ components: ServerInfo: type: object required: - - version + - version properties: version: type: string diff --git a/ee/orchestration/openapi.yaml b/ee/orchestration/openapi.yaml index 6585e8e17e..0431574f4e 100644 --- a/ee/orchestration/openapi.yaml +++ b/ee/orchestration/openapi.yaml @@ -18,6 +18,9 @@ paths: $ref: '#/components/schemas/ServerInfo' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read /triggers: get: summary: List triggers @@ -41,6 +44,9 @@ paths: $ref: '#/components/schemas/ListTriggersResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read post: summary: Create trigger operationId: createTrigger @@ -61,6 +67,9 @@ paths: $ref: '#/components/schemas/CreateTriggerResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:write /triggers/{triggerID}: parameters: - name: triggerID @@ -84,6 +93,9 @@ paths: $ref: '#/components/schemas/ReadTriggerResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read delete: summary: Delete trigger operationId: deleteTrigger @@ -95,6 +107,9 @@ paths: description: Trigger deleted default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:write /triggers/{triggerID}/occurrences: parameters: - name: triggerID @@ -118,6 +133,9 @@ paths: $ref: '#/components/schemas/ListTriggersOccurrencesResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read /workflows: get: summary: List registered workflows @@ -134,6 +152,9 @@ paths: $ref: '#/components/schemas/ListWorkflowsResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read post: summary: Create workflow operationId: createWorkflow @@ -154,6 +175,9 @@ paths: $ref: '#/components/schemas/CreateWorkflowResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:write /workflows/{flowId}: parameters: - in: path @@ -178,6 +202,9 @@ paths: $ref: '#/components/schemas/GetWorkflowResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read delete: summary: Delete a flow by id tags: @@ -189,6 +216,9 @@ paths: description: No content default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:write /workflows/{workflowID}/instances: parameters: - in: path @@ -225,6 +255,9 @@ paths: $ref: '#/components/schemas/RunWorkflowResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:write /instances: get: description: List instances of a workflow @@ -256,6 +289,9 @@ paths: $ref: '#/components/schemas/ListRunsResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read /instances/{instanceID}: parameters: - in: path @@ -280,6 +316,9 @@ paths: $ref: '#/components/schemas/GetWorkflowInstanceResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read /instances/{instanceID}/events: parameters: - in: path @@ -310,6 +349,9 @@ paths: description: No content default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:write /instances/{instanceID}/abort: parameters: - in: path @@ -330,6 +372,9 @@ paths: description: No content default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:write /instances/{instanceID}/history: parameters: - in: path @@ -354,6 +399,9 @@ paths: $ref: '#/components/schemas/GetWorkflowInstanceHistoryResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read /instances/{instanceID}/stages/{number}/history: parameters: - in: path @@ -385,6 +433,9 @@ paths: $ref: '#/components/schemas/GetWorkflowInstanceHistoryStageResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read /v2/_info: get: summary: Get server info @@ -401,6 +452,9 @@ paths: $ref: '#/components/schemas/V2ServerInfo' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read /v2/triggers: get: summary: List triggers @@ -427,6 +481,9 @@ paths: $ref: '#/components/schemas/V2ListTriggersResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read post: summary: Create trigger operationId: v2CreateTrigger @@ -448,6 +505,9 @@ paths: $ref: '#/components/schemas/V2CreateTriggerResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:write /v2/triggers/{triggerID}: parameters: - name: triggerID @@ -472,6 +532,9 @@ paths: $ref: '#/components/schemas/V2ReadTriggerResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read delete: summary: Delete trigger operationId: v2DeleteTrigger @@ -484,6 +547,9 @@ paths: description: Trigger deleted default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:write /v2/triggers/{triggerID}/test: parameters: - name: triggerID @@ -514,6 +580,9 @@ paths: $ref: '#/components/schemas/V2TestTriggerResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:write /v2/triggers/{triggerID}/occurrences: parameters: - name: triggerID @@ -541,6 +610,9 @@ paths: $ref: '#/components/schemas/V2ListTriggersOccurrencesResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read /v2/workflows: get: summary: List registered workflows @@ -561,6 +633,9 @@ paths: $ref: '#/components/schemas/V2ListWorkflowsResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read post: summary: Create workflow operationId: v2CreateWorkflow @@ -582,6 +657,9 @@ paths: $ref: '#/components/schemas/V2CreateWorkflowResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:write /v2/workflows/{flowId}: parameters: - in: path @@ -607,6 +685,9 @@ paths: $ref: '#/components/schemas/V2GetWorkflowResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read delete: summary: Delete a flow by id tags: @@ -619,6 +700,9 @@ paths: description: No content default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:write /v2/workflows/{workflowID}/instances: parameters: - in: path @@ -656,6 +740,9 @@ paths: $ref: '#/components/schemas/V2RunWorkflowResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:write /v2/instances: get: description: List instances of a workflow @@ -690,6 +777,9 @@ paths: $ref: '#/components/schemas/V2ListRunsResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read /v2/instances/{instanceID}: parameters: - in: path @@ -715,6 +805,9 @@ paths: $ref: '#/components/schemas/V2GetWorkflowInstanceResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read /v2/instances/{instanceID}/events: parameters: - in: path @@ -746,6 +839,9 @@ paths: description: No content default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:write /v2/instances/{instanceID}/abort: parameters: - in: path @@ -767,6 +863,9 @@ paths: description: No content default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:write /v2/instances/{instanceID}/history: parameters: - in: path @@ -792,6 +891,9 @@ paths: $ref: '#/components/schemas/V2GetWorkflowInstanceHistoryResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read /v2/instances/{instanceID}/stages/{number}/history: parameters: - in: path @@ -824,6 +926,9 @@ paths: $ref: '#/components/schemas/V2GetWorkflowInstanceHistoryStageResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read components: schemas: ServerInfo: @@ -1066,13 +1171,6 @@ components: type: array required: - data - ReadWorkflowResponse: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Workflow' CreateWorkflowRequest: $ref: '#/components/schemas/WorkflowConfig' CreateWorkflowResponse: @@ -1281,8 +1379,6 @@ components: properties: name: type: string - ActivityListWalletsOutput: - $ref: '#/components/schemas/ListWalletsResponse' ListWalletsResponse: type: object required: @@ -2289,13 +2385,6 @@ components: $ref: '#/components/schemas/V2Trigger' required: - cursor - V2ReadWorkflowResponse: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/V2Workflow' V2CreateWorkflowRequest: $ref: '#/components/schemas/V2WorkflowConfig' V2CreateWorkflowResponse: @@ -2527,8 +2616,6 @@ components: properties: name: type: string - V2ActivityListWalletsOutput: - $ref: '#/components/schemas/V2ListWalletsResponse' V2ListWalletsResponse: type: object required: diff --git a/ee/orchestration/openapi/v1.yaml b/ee/orchestration/openapi/v1.yaml index c0c20424ef..9f1aa06e76 100644 --- a/ee/orchestration/openapi/v1.yaml +++ b/ee/orchestration/openapi/v1.yaml @@ -1,18 +1,16 @@ openapi: 3.0.3 - info: title: Formance Simple orchestration Service API version: 0.1.0 - paths: /_info: get: summary: Get server info operationId: getServerInfo tags: - - orchestration.v1 + - orchestration.v1 responses: - 200: + '200': description: Server information content: application/json: @@ -20,13 +18,16 @@ paths: $ref: '#/components/schemas/ServerInfo' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read /triggers: get: summary: List triggers operationId: listTriggers description: List triggers tags: - - orchestration.v1 + - orchestration.v1 parameters: - name: name in: query @@ -35,7 +36,7 @@ paths: schema: type: string responses: - 200: + '200': description: List of triggers content: application/json: @@ -43,19 +44,22 @@ paths: $ref: '#/components/schemas/ListTriggersResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read post: summary: Create trigger operationId: createTrigger description: Create trigger tags: - - orchestration.v1 + - orchestration.v1 requestBody: content: application/json: schema: $ref: '#/components/schemas/TriggerData' responses: - 201: + '201': description: Created trigger content: application/json: @@ -63,6 +67,9 @@ paths: $ref: '#/components/schemas/CreateTriggerResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:write /triggers/{triggerID}: parameters: - name: triggerID @@ -78,7 +85,7 @@ paths: tags: - orchestration.v1 responses: - 200: + '200': description: A specific trigger content: application/json: @@ -86,17 +93,23 @@ paths: $ref: '#/components/schemas/ReadTriggerResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read delete: summary: Delete trigger operationId: deleteTrigger description: Read trigger tags: - - orchestration.v1 + - orchestration.v1 responses: - 204: + '204': description: Trigger deleted default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:write /triggers/{triggerID}/occurrences: parameters: - name: triggerID @@ -112,7 +125,7 @@ paths: tags: - orchestration.v1 responses: - 200: + '200': description: List of triggers occurrences content: application/json: @@ -120,15 +133,18 @@ paths: $ref: '#/components/schemas/ListTriggersOccurrencesResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read /workflows: get: summary: List registered workflows operationId: listWorkflows description: List registered workflows tags: - - orchestration.v1 + - orchestration.v1 responses: - 200: + '200': description: List of workflows content: application/json: @@ -136,19 +152,22 @@ paths: $ref: '#/components/schemas/ListWorkflowsResponse' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read post: summary: Create workflow operationId: createWorkflow description: Create a workflow tags: - - orchestration.v1 + - orchestration.v1 requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateWorkflowRequest' responses: - 201: + '201': description: Created workflow content: application/json: @@ -156,104 +175,113 @@ paths: $ref: '#/components/schemas/CreateWorkflowResponse' default: $ref: '#/components/responses/ErrorResponse' - + security: + - Authorization: + - orchestration:write /workflows/{flowId}: parameters: - - in: path - description: The flow id - name: flowId - schema: - type: string - example: xxx - required: true + - in: path + description: The flow id + name: flowId + schema: + type: string + example: xxx + required: true get: summary: Get a flow by id tags: - - orchestration.v1 + - orchestration.v1 description: Get a flow by id operationId: getWorkflow responses: - default: - $ref: '#/components/responses/ErrorResponse' - 200: + '200': description: The workflow content: application/json: schema: $ref: '#/components/schemas/GetWorkflowResponse' + default: + $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read delete: summary: Delete a flow by id tags: - - orchestration.v1 + - orchestration.v1 description: Delete a flow by id operationId: deleteWorkflow responses: + '204': + description: No content default: $ref: '#/components/responses/ErrorResponse' - 204: - description: No content - + security: + - Authorization: + - orchestration:write /workflows/{workflowID}/instances: parameters: - - in: path - description: The flow id - name: workflowID - schema: - type: string - example: xxx - required: true + - in: path + description: The flow id + name: workflowID + schema: + type: string + example: xxx + required: true post: description: Run workflow summary: Run workflow operationId: runWorkflow parameters: - - in: query - name: wait - required: false - description: Wait end of the workflow before return - schema: - type: boolean + - in: query + name: wait + required: false + description: Wait end of the workflow before return + schema: + type: boolean tags: - - orchestration.v1 + - orchestration.v1 requestBody: content: application/json: schema: $ref: '#/components/schemas/RunWorkflowRequest' responses: - default: - $ref: '#/components/responses/ErrorResponse' - 201: + '201': description: The workflow instance content: application/json: schema: $ref: '#/components/schemas/RunWorkflowResponse' - + default: + $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:write /instances: get: description: List instances of a workflow summary: List instances of a workflow operationId: listInstances parameters: - - in: query - description: A workflow id - name: workflowID - schema: - type: string - example: xxx - required: false - - in: query - description: Filter running instances - name: running - schema: - type: boolean - example: true - required: false + - in: query + description: A workflow id + name: workflowID + schema: + type: string + example: xxx + required: false + - in: query + description: Filter running instances + name: running + schema: + type: boolean + example: true + required: false tags: - - orchestration.v1 + - orchestration.v1 responses: - 200: + '200': description: List of workflow instances content: application/json: @@ -261,168 +289,180 @@ paths: $ref: '#/components/schemas/ListRunsResponse' default: $ref: '#/components/responses/ErrorResponse' - + security: + - Authorization: + - orchestration:read /instances/{instanceID}: parameters: - - in: path - description: The instance id - name: instanceID - schema: - type: string - example: xxx - required: true + - in: path + description: The instance id + name: instanceID + schema: + type: string + example: xxx + required: true get: summary: Get a workflow instance by id description: Get a workflow instance by id operationId: getInstance tags: - - orchestration.v1 + - orchestration.v1 responses: - default: - $ref: '#/components/responses/ErrorResponse' - 200: + '200': description: The workflow instance content: application/json: schema: $ref: '#/components/schemas/GetWorkflowInstanceResponse' - + default: + $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read /instances/{instanceID}/events: parameters: - - in: path - description: The instance id - name: instanceID - schema: - type: string - example: xxx - required: true + - in: path + description: The instance id + name: instanceID + schema: + type: string + example: xxx + required: true post: summary: Send an event to a running workflow description: Send an event to a running workflow operationId: sendEvent tags: - - orchestration.v1 + - orchestration.v1 requestBody: content: application/json: schema: type: object required: - - name + - name properties: name: type: string responses: + '204': + description: No content default: $ref: '#/components/responses/ErrorResponse' - 204: - description: No content - + security: + - Authorization: + - orchestration:write /instances/{instanceID}/abort: parameters: - - in: path - description: The instance id - name: instanceID - schema: - type: string - example: xxx - required: true + - in: path + description: The instance id + name: instanceID + schema: + type: string + example: xxx + required: true put: summary: Cancel a running workflow description: Cancel a running workflow operationId: cancelEvent tags: - - orchestration.v1 + - orchestration.v1 responses: + '204': + description: No content default: $ref: '#/components/responses/ErrorResponse' - 204: - description: No content - + security: + - Authorization: + - orchestration:write /instances/{instanceID}/history: parameters: - - in: path - description: The instance id - name: instanceID - schema: - type: string - example: xxx - required: true + - in: path + description: The instance id + name: instanceID + schema: + type: string + example: xxx + required: true get: summary: Get a workflow instance history by id description: Get a workflow instance history by id operationId: getInstanceHistory tags: - - orchestration.v1 + - orchestration.v1 responses: - default: - $ref: '#/components/responses/ErrorResponse' - 200: + '200': description: The workflow instance history content: application/json: schema: $ref: '#/components/schemas/GetWorkflowInstanceHistoryResponse' - + default: + $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read /instances/{instanceID}/stages/{number}/history: parameters: - - in: path - description: The instance id - name: instanceID - schema: - type: string - example: xxx - required: true - - in: path - description: The stage number - name: number - schema: - type: integer - example: 0 - required: true + - in: path + description: The instance id + name: instanceID + schema: + type: string + example: xxx + required: true + - in: path + description: The stage number + name: number + schema: + type: integer + example: 0 + required: true get: summary: Get a workflow instance stage history description: Get a workflow instance stage history operationId: getInstanceStageHistory tags: - - orchestration.v1 + - orchestration.v1 responses: - default: - $ref: '#/components/responses/ErrorResponse' - 200: + '200': description: The workflow instance stage history content: application/json: schema: $ref: '#/components/schemas/GetWorkflowInstanceHistoryStageResponse' - + default: + $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - orchestration:read components: schemas: ServerInfo: type: object required: - - version + - version properties: version: type: string Error: type: object required: - - errorCode - - errorMessage + - errorCode + - errorMessage properties: errorCode: type: string enum: - - VALIDATION - - NOT_FOUND - - INTERNAL + - VALIDATION + - NOT_FOUND + - INTERNAL errorMessage: type: string WorkflowConfig: type: object required: - - stages + - stages properties: name: type: string @@ -430,14 +470,14 @@ components: type: array items: type: object - additionalProperties: { } + additionalProperties: {} Workflow: type: object required: - - config - - createdAt - - updatedAt - - id + - config + - createdAt + - updatedAt + - id properties: config: $ref: '#/components/schemas/WorkflowConfig' @@ -452,9 +492,9 @@ components: StageStatus: type: object required: - - stage - - instanceID - - startedAt + - stage + - instanceID + - startedAt properties: stage: type: number @@ -471,11 +511,11 @@ components: WorkflowInstance: type: object required: - - workflowID - - id - - createdAt - - updatedAt - - terminated + - workflowID + - id + - createdAt + - updatedAt + - terminated properties: workflowID: type: string @@ -501,11 +541,11 @@ components: WorkflowInstanceHistoryStage: type: object required: - - name - - input - - startedAt - - terminated - - attempt + - name + - input + - startedAt + - terminated + - attempt properties: name: type: string @@ -533,10 +573,10 @@ components: WorkflowInstanceHistory: type: object required: - - name - - input - - terminated - - startedAt + - name + - input + - terminated + - startedAt properties: name: type: string @@ -568,7 +608,7 @@ components: $ref: '#/components/schemas/Workflow' type: array required: - - data + - data TriggerData: type: object required: @@ -588,17 +628,17 @@ components: type: string Trigger: allOf: - - $ref: '#/components/schemas/TriggerData' - - type: object - required: - - id - - createdAt - properties: - id: - type: string - createdAt: - type: string - format: date-time + - $ref: '#/components/schemas/TriggerData' + - type: object + required: + - id + - createdAt + properties: + id: + type: string + createdAt: + type: string + format: date-time TriggerOccurrence: type: object required: @@ -638,19 +678,12 @@ components: type: array required: - data - ReadWorkflowResponse: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/Workflow' CreateWorkflowRequest: $ref: '#/components/schemas/WorkflowConfig' CreateWorkflowResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/Workflow' @@ -668,13 +701,13 @@ components: RunWorkflowResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/WorkflowInstance' ListRunsResponse: required: - - data + - data properties: data: items: @@ -683,35 +716,35 @@ components: GetWorkflowResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/Workflow' GetWorkflowInstanceResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/WorkflowInstance' GetWorkflowInstanceHistoryResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/WorkflowInstanceHistoryList' GetWorkflowInstanceHistoryStageResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/WorkflowInstanceHistoryStageList' StageSendSourceWallet: type: object required: - - id + - id properties: id: type: string @@ -722,7 +755,7 @@ components: StageSendSourceAccount: type: object required: - - id + - id properties: id: type: string @@ -733,14 +766,14 @@ components: StageSendSourcePayment: type: object required: - - id + - id properties: id: type: string StageSendDestinationPayment: type: object required: - - psp + - psp properties: psp: type: string @@ -789,7 +822,7 @@ components: StageWaitEvent: type: object required: - - event + - event properties: event: type: string @@ -815,10 +848,10 @@ components: $ref: '#/components/schemas/UpdateAccount' Stage: anyOf: - - $ref: '#/components/schemas/StageSend' - - $ref: '#/components/schemas/StageDelay' - - $ref: '#/components/schemas/StageWaitEvent' - - $ref: '#/components/schemas/Update' + - $ref: '#/components/schemas/StageSend' + - $ref: '#/components/schemas/StageDelay' + - $ref: '#/components/schemas/StageWaitEvent' + - $ref: '#/components/schemas/Update' StripeTransferRequest: type: object properties: @@ -841,9 +874,11 @@ components: default: false metadata: type: object - description: | + description: > A set of key/value pairs that you can attach to a transfer object. - It can be useful for storing additional information about the transfer in a structured format. + + It can be useful for storing additional information about the + transfer in a structured format. example: order_id: '6735' ActivityStripeTransfer: @@ -853,8 +888,6 @@ components: properties: name: type: string - ActivityListWalletsOutput: - $ref: '#/components/schemas/ListWalletsResponse' ListWalletsResponse: type: object required: @@ -912,15 +945,15 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' ActivityGetAccount: type: object required: - - id - - ledger + - id + - ledger properties: id: type: string @@ -951,8 +984,8 @@ components: ActivityRevertTransaction: type: object required: - - id - - ledger + - id + - ledger properties: ledger: type: string @@ -961,14 +994,14 @@ components: ActivityGetPayment: type: object required: - - id + - id properties: id: type: string ActivityConfirmHold: type: object required: - - id + - id properties: id: type: string @@ -979,7 +1012,6 @@ components: type: string data: $ref: '#/components/schemas/CreditWalletRequest' - CreditWalletRequest: type: object required: @@ -1011,8 +1043,8 @@ components: asset: USD/2 amount: 100 metadata: - key: "" - sources: [ ] + key: '' + sources: [] LedgerAccountSubject: type: object required: @@ -1044,7 +1076,6 @@ components: oneOf: - $ref: '#/components/schemas/LedgerAccountSubject' - $ref: '#/components/schemas/WalletSubject' - ActivityDebitWallet: type: object properties: @@ -1052,7 +1083,6 @@ components: type: string data: $ref: '#/components/schemas/DebitWalletRequest' - DebitWalletRequest: type: object required: @@ -1063,7 +1093,9 @@ components: $ref: '#/components/schemas/Monetary' pending: type: boolean - description: Set to true to create a pending hold. If false, the wallet will be debited immediately. + description: >- + Set to true to create a pending hold. If false, the wallet will be + debited immediately. metadata: type: object additionalProperties: @@ -1087,20 +1119,19 @@ components: asset: USD/2 amount: 100 metadata: - key: "" + key: '' pending: true - ActivityGetWallet: type: object required: - - id + - id properties: id: type: string ActivityVoidHold: type: object required: - - id + - id properties: id: type: string @@ -1108,7 +1139,6 @@ components: $ref: '#/components/schemas/AccountResponse' ActivityCreateTransactionOutput: $ref: '#/components/schemas/CreateTransactionResponse' - CreateTransactionResponse: properties: data: @@ -1116,7 +1146,6 @@ components: type: object required: - data - Transaction: type: object properties: @@ -1144,16 +1173,12 @@ components: - id - metadata - reverted - ActivityRevertTransactionOutput: $ref: '#/components/schemas/RevertTransactionResponse' - RevertTransactionResponse: $ref: '#/components/schemas/CreateTransactionResponse' - ActivityGetPaymentOutput: $ref: '#/components/schemas/PaymentResponse' - PaymentResponse: type: object required: @@ -1242,7 +1267,6 @@ components: $ref: '#/components/schemas/PaymentAdjustment' metadata: $ref: '#/components/schemas/PaymentMetadata' - Connector: type: string enum: @@ -1254,7 +1278,6 @@ components: - BANKING-CIRCLE - MANGOPAY - MONEYCORP - PaymentAdjustment: type: object required: @@ -1278,7 +1301,6 @@ components: type: object absolute: type: boolean - PaymentStatus: type: string enum: @@ -1288,17 +1310,14 @@ components: - FAILED - SUCCEEDED - CANCELLED - PaymentMetadata: type: object properties: key: type: string nullable: true - ActivityDebitWalletOutput: $ref: '#/components/schemas/DebitWalletResponse' - DebitWalletResponse: type: object required: @@ -1306,7 +1325,6 @@ components: properties: data: $ref: '#/components/schemas/Hold' - Hold: type: object required: @@ -1331,10 +1349,8 @@ components: type: string destination: $ref: '#/components/schemas/Subject' - ActivityGetWalletOutput: $ref: '#/components/schemas/GetWalletResponse' - GetWalletResponse: type: object required: @@ -1342,7 +1358,6 @@ components: properties: data: $ref: '#/components/schemas/WalletWithBalances' - WalletWithBalances: type: object required: @@ -1376,7 +1391,6 @@ components: $ref: '#/components/schemas/AssetHolder' ledger: type: string - AssetHolder: type: object required: @@ -1387,7 +1401,6 @@ components: additionalProperties: type: integer format: bigint - WorkflowInstanceHistoryStageInput: type: object properties: @@ -1432,7 +1445,6 @@ components: $ref: '#/components/schemas/ActivityGetWalletOutput' ListWallets: $ref: '#/components/schemas/ListWalletsResponse' - Monetary: type: object required: @@ -1446,7 +1458,6 @@ components: type: integer format: bigint description: The amount of the monetary value. - PostTransaction: type: object required: @@ -1467,11 +1478,10 @@ components: example: "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n" vars: type: object - properties: { } + properties: {} additionalProperties: true - example: { - "user": "users:042" - } + example: + user: users:042 required: - plain reference: @@ -1479,13 +1489,12 @@ components: example: ref:001 metadata: $ref: '#/components/schemas/Metadata' - Metadata: type: object additionalProperties: type: string - example: { admin: "true" } - + example: + admin: 'true' Posting: type: object properties: @@ -1508,7 +1517,6 @@ components: - asset - destination - source - AccountResponse: type: object required: @@ -1516,7 +1524,6 @@ components: properties: data: $ref: '#/components/schemas/Account' - ReadTriggerResponse: type: object required: @@ -1524,7 +1531,6 @@ components: properties: data: $ref: '#/components/schemas/Trigger' - Account: type: object required: @@ -1536,15 +1542,15 @@ components: example: users:001 metadata: type: object - properties: { } + properties: {} additionalProperties: type: string - example: { admin: "true" } + example: + admin: 'true' volumes: $ref: '#/components/schemas/Volumes' effectiveVolumes: $ref: '#/components/schemas/Volumes' - Volume: type: object properties: @@ -1564,7 +1570,6 @@ components: input: 100 output: 20 balance: 80 - Volumes: type: object additionalProperties: @@ -1578,7 +1583,6 @@ components: input: 100 output: 10 balance: 90 - responses: ErrorResponse: description: General error diff --git a/ee/orchestration/openapi/v2.yaml b/ee/orchestration/openapi/v2.yaml index 014cf41578..f5949fbb51 100644 --- a/ee/orchestration/openapi/v2.yaml +++ b/ee/orchestration/openapi/v2.yaml @@ -1,9 +1,7 @@ openapi: 3.0.3 - info: title: Formance Simple orchestration Service API version: 0.1.0 - paths: /v2/_info: get: @@ -11,9 +9,9 @@ paths: operationId: v2GetServerInfo x-speakeasy-name-override: GetServerInfo tags: - - orchestration.v2 + - orchestration.v2 responses: - 200: + '200': description: Server information content: application/json: @@ -21,6 +19,9 @@ paths: $ref: '#/components/schemas/V2ServerInfo' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read /v2/triggers: get: summary: List triggers @@ -28,7 +29,7 @@ paths: description: List triggers x-speakeasy-name-override: ListTriggers tags: - - orchestration.v2 + - orchestration.v2 parameters: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/PageSize' @@ -39,7 +40,7 @@ paths: schema: type: string responses: - 200: + '200': description: List of triggers content: application/json: @@ -47,20 +48,23 @@ paths: $ref: '#/components/schemas/V2ListTriggersResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read post: summary: Create trigger operationId: v2CreateTrigger description: Create trigger x-speakeasy-name-override: CreateTrigger tags: - - orchestration.v2 + - orchestration.v2 requestBody: content: application/json: schema: $ref: '#/components/schemas/V2TriggerData' responses: - 201: + '201': description: Created trigger content: application/json: @@ -68,7 +72,9 @@ paths: $ref: '#/components/schemas/V2CreateTriggerResponse' default: $ref: '#/components/responses/V2ErrorResponse' - + security: + - Authorization: + - orchestration:write /v2/triggers/{triggerID}: parameters: - name: triggerID @@ -85,7 +91,7 @@ paths: tags: - orchestration.v2 responses: - 200: + '200': description: A specific trigger content: application/json: @@ -93,20 +99,24 @@ paths: $ref: '#/components/schemas/V2ReadTriggerResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read delete: summary: Delete trigger operationId: v2DeleteTrigger description: Read trigger x-speakeasy-name-override: DeleteTrigger tags: - - orchestration.v2 + - orchestration.v2 responses: - 204: + '204': description: Trigger deleted - default: $ref: '#/components/responses/V2ErrorResponse' - + security: + - Authorization: + - orchestration:write /v2/triggers/{triggerID}/test: parameters: - name: triggerID @@ -129,7 +139,7 @@ paths: type: object additionalProperties: true responses: - "200": + '200': description: Test a trigger content: application/json: @@ -137,7 +147,9 @@ paths: $ref: '#/components/schemas/V2TestTriggerResponse' default: $ref: '#/components/responses/V2ErrorResponse' - + security: + - Authorization: + - orchestration:write /v2/triggers/{triggerID}/occurrences: parameters: - name: triggerID @@ -157,7 +169,7 @@ paths: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/PageSize' responses: - 200: + '200': description: List of triggers occurrences content: application/json: @@ -165,6 +177,9 @@ paths: $ref: '#/components/schemas/V2ListTriggersOccurrencesResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read /v2/workflows: get: summary: List registered workflows @@ -172,12 +187,12 @@ paths: description: List registered workflows x-speakeasy-name-override: ListWorkflows tags: - - orchestration.v2 + - orchestration.v2 parameters: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/PageSize' responses: - 200: + '200': description: List of workflows content: application/json: @@ -185,20 +200,23 @@ paths: $ref: '#/components/schemas/V2ListWorkflowsResponse' default: $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read post: summary: Create workflow operationId: v2CreateWorkflow description: Create a workflow x-speakeasy-name-override: CreateWorkflow tags: - - orchestration.v2 + - orchestration.v2 requestBody: content: application/json: schema: $ref: '#/components/schemas/V2CreateWorkflowRequest' responses: - 201: + '201': description: Created workflow content: application/json: @@ -206,84 +224,92 @@ paths: $ref: '#/components/schemas/V2CreateWorkflowResponse' default: $ref: '#/components/responses/V2ErrorResponse' - + security: + - Authorization: + - orchestration:write /v2/workflows/{flowId}: parameters: - - in: path - description: The flow id - name: flowId - schema: - type: string - example: xxx - required: true + - in: path + description: The flow id + name: flowId + schema: + type: string + example: xxx + required: true get: summary: Get a flow by id tags: - - orchestration.v2 + - orchestration.v2 description: Get a flow by id operationId: v2GetWorkflow x-speakeasy-name-override: GetWorkflow responses: - default: - $ref: '#/components/responses/V2ErrorResponse' - 200: + '200': description: The workflow content: application/json: schema: $ref: '#/components/schemas/V2GetWorkflowResponse' + default: + $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read delete: summary: Delete a flow by id tags: - - orchestration.v2 + - orchestration.v2 description: Delete a flow by id operationId: v2DeleteWorkflow x-speakeasy-name-override: DeleteWorkflow responses: + '204': + description: No content default: $ref: '#/components/responses/V2ErrorResponse' - - 204: - description: No content - + security: + - Authorization: + - orchestration:write /v2/workflows/{workflowID}/instances: parameters: - - in: path - description: The flow id - name: workflowID - schema: - type: string - example: xxx - required: true + - in: path + description: The flow id + name: workflowID + schema: + type: string + example: xxx + required: true post: description: Run workflow summary: Run workflow operationId: v2RunWorkflow x-speakeasy-name-override: RunWorkflow parameters: - - in: query - name: wait - required: false - description: Wait end of the workflow before return - schema: - type: boolean + - in: query + name: wait + required: false + description: Wait end of the workflow before return + schema: + type: boolean tags: - - orchestration.v2 + - orchestration.v2 requestBody: content: application/json: schema: $ref: '#/components/schemas/V2RunWorkflowRequest' responses: - default: - $ref: '#/components/responses/V2ErrorResponse' - 201: + '201': description: The workflow instance content: application/json: schema: $ref: '#/components/schemas/V2RunWorkflowResponse' - + default: + $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:write /v2/instances: get: description: List instances of a workflow @@ -291,26 +317,26 @@ paths: operationId: v2ListInstances x-speakeasy-name-override: ListInstances parameters: - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/PageSize' - - in: query - description: A workflow id - name: workflowID - schema: - type: string - example: xxx - required: false - - in: query - description: Filter running instances - name: running - schema: - type: boolean - example: true - required: false + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/PageSize' + - in: query + description: A workflow id + name: workflowID + schema: + type: string + example: xxx + required: false + - in: query + description: Filter running instances + name: running + schema: + type: boolean + example: true + required: false tags: - - orchestration.v2 + - orchestration.v2 responses: - 200: + '200': description: List of workflow instances content: application/json: @@ -318,146 +344,158 @@ paths: $ref: '#/components/schemas/V2ListRunsResponse' default: $ref: '#/components/responses/V2ErrorResponse' - + security: + - Authorization: + - orchestration:read /v2/instances/{instanceID}: parameters: - - in: path - description: The instance id - name: instanceID - schema: - type: string - example: xxx - required: true + - in: path + description: The instance id + name: instanceID + schema: + type: string + example: xxx + required: true get: summary: Get a workflow instance by id description: Get a workflow instance by id operationId: v2GetInstance x-speakeasy-name-override: GetInstance tags: - - orchestration.v2 + - orchestration.v2 responses: - default: - $ref: '#/components/responses/V2ErrorResponse' - 200: + '200': description: The workflow instance content: application/json: schema: $ref: '#/components/schemas/V2GetWorkflowInstanceResponse' - + default: + $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read /v2/instances/{instanceID}/events: parameters: - - in: path - description: The instance id - name: instanceID - schema: - type: string - example: xxx - required: true + - in: path + description: The instance id + name: instanceID + schema: + type: string + example: xxx + required: true post: summary: Send an event to a running workflow description: Send an event to a running workflow operationId: v2SendEvent x-speakeasy-name-override: SendEvent tags: - - orchestration.v2 + - orchestration.v2 requestBody: content: application/json: schema: type: object required: - - name + - name properties: name: type: string responses: + '204': + description: No content default: $ref: '#/components/responses/V2ErrorResponse' - 204: - description: No content - + security: + - Authorization: + - orchestration:write /v2/instances/{instanceID}/abort: parameters: - - in: path - description: The instance id - name: instanceID - schema: - type: string - example: xxx - required: true + - in: path + description: The instance id + name: instanceID + schema: + type: string + example: xxx + required: true put: summary: Cancel a running workflow description: Cancel a running workflow operationId: v2CancelEvent x-speakeasy-name-override: CancelEvent tags: - - orchestration.v2 + - orchestration.v2 responses: + '204': + description: No content default: $ref: '#/components/responses/V2ErrorResponse' - 204: - description: No content - + security: + - Authorization: + - orchestration:write /v2/instances/{instanceID}/history: parameters: - - in: path - description: The instance id - name: instanceID - schema: - type: string - example: xxx - required: true + - in: path + description: The instance id + name: instanceID + schema: + type: string + example: xxx + required: true get: summary: Get a workflow instance history by id description: Get a workflow instance history by id operationId: v2GetInstanceHistory x-speakeasy-name-override: GetInstanceHistory tags: - - orchestration.v2 + - orchestration.v2 responses: - default: - $ref: '#/components/responses/V2ErrorResponse' - 200: + '200': description: The workflow instance history content: application/json: schema: $ref: '#/components/schemas/V2GetWorkflowInstanceHistoryResponse' - + default: + $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read /v2/instances/{instanceID}/stages/{number}/history: parameters: - - in: path - description: The instance id - name: instanceID - schema: - type: string - example: xxx - required: true - - in: path - description: The stage number - name: number - schema: - type: integer - example: 0 - required: true + - in: path + description: The instance id + name: instanceID + schema: + type: string + example: xxx + required: true + - in: path + description: The stage number + name: number + schema: + type: integer + example: 0 + required: true get: summary: Get a workflow instance stage history description: Get a workflow instance stage history operationId: v2GetInstanceStageHistory x-speakeasy-name-override: GetInstanceStageHistory tags: - - orchestration.v2 + - orchestration.v2 responses: - default: - $ref: '#/components/responses/V2ErrorResponse' - 200: + '200': description: The workflow instance stage history content: application/json: schema: $ref: '#/components/schemas/V2GetWorkflowInstanceHistoryStageResponse' - + default: + $ref: '#/components/responses/V2ErrorResponse' + security: + - Authorization: + - orchestration:read components: parameters: Cursor: @@ -486,28 +524,28 @@ components: V2ServerInfo: type: object required: - - version + - version properties: version: type: string V2Error: type: object required: - - errorCode - - errorMessage + - errorCode + - errorMessage properties: errorCode: type: string enum: - - VALIDATION - - NOT_FOUND - - INTERNAL + - VALIDATION + - NOT_FOUND + - INTERNAL errorMessage: type: string V2WorkflowConfig: type: object required: - - stages + - stages properties: name: type: string @@ -515,14 +553,14 @@ components: type: array items: type: object - additionalProperties: { } + additionalProperties: {} V2Workflow: type: object required: - - config - - createdAt - - updatedAt - - id + - config + - createdAt + - updatedAt + - id properties: config: $ref: '#/components/schemas/V2WorkflowConfig' @@ -537,9 +575,9 @@ components: V2StageStatus: type: object required: - - stage - - instanceID - - startedAt + - stage + - instanceID + - startedAt properties: stage: type: number @@ -556,11 +594,11 @@ components: V2WorkflowInstance: type: object required: - - workflowID - - id - - createdAt - - updatedAt - - terminated + - workflowID + - id + - createdAt + - updatedAt + - terminated properties: workflowID: type: string @@ -586,11 +624,11 @@ components: V2WorkflowInstanceHistoryStage: type: object required: - - name - - input - - startedAt - - terminated - - attempt + - name + - input + - startedAt + - terminated + - attempt properties: name: type: string @@ -618,10 +656,10 @@ components: V2WorkflowInstanceHistory: type: object required: - - name - - input - - terminated - - startedAt + - name + - input + - terminated + - startedAt properties: name: type: string @@ -666,10 +704,10 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: @@ -695,17 +733,17 @@ components: type: string V2Trigger: allOf: - - $ref: '#/components/schemas/V2TriggerData' - - type: object - required: - - id - - createdAt - properties: - id: - type: string - createdAt: - type: string - format: date-time + - $ref: '#/components/schemas/V2TriggerData' + - type: object + required: + - id + - createdAt + properties: + id: + type: string + createdAt: + type: string + format: date-time V2TriggerOccurrence: type: object required: @@ -748,10 +786,10 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: @@ -779,29 +817,22 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: $ref: '#/components/schemas/V2Trigger' required: - cursor - V2ReadWorkflowResponse: - type: object - required: - - data - properties: - data: - $ref: '#/components/schemas/V2Workflow' V2CreateWorkflowRequest: $ref: '#/components/schemas/V2WorkflowConfig' V2CreateWorkflowResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/V2Workflow' @@ -819,7 +850,7 @@ components: V2RunWorkflowResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/V2WorkflowInstance' @@ -844,10 +875,10 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: @@ -857,35 +888,35 @@ components: V2GetWorkflowResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/V2Workflow' V2GetWorkflowInstanceResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/V2WorkflowInstance' V2GetWorkflowInstanceHistoryResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/V2WorkflowInstanceHistoryList' V2GetWorkflowInstanceHistoryStageResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/V2WorkflowInstanceHistoryStageList' V2StageSendSourceWallet: type: object required: - - id + - id properties: id: type: string @@ -896,7 +927,7 @@ components: V2StageSendSourceAccount: type: object required: - - id + - id properties: id: type: string @@ -907,14 +938,14 @@ components: V2StageSendSourcePayment: type: object required: - - id + - id properties: id: type: string V2StageSendDestinationPayment: type: object required: - - psp + - psp properties: psp: type: string @@ -963,7 +994,7 @@ components: V2StageWaitEvent: type: object required: - - event + - event properties: event: type: string @@ -989,10 +1020,10 @@ components: $ref: '#/components/schemas/V2UpdateAccount' V2Stage: anyOf: - - $ref: '#/components/schemas/V2StageSend' - - $ref: '#/components/schemas/V2StageDelay' - - $ref: '#/components/schemas/V2StageWaitEvent' - - $ref: '#/components/schemas/V2Update' + - $ref: '#/components/schemas/V2StageSend' + - $ref: '#/components/schemas/V2StageDelay' + - $ref: '#/components/schemas/V2StageWaitEvent' + - $ref: '#/components/schemas/V2Update' V2StripeTransferRequest: type: object properties: @@ -1015,9 +1046,11 @@ components: default: false metadata: type: object - description: | + description: > A set of key/value pairs that you can attach to a transfer object. - It can be useful for storing additional information about the transfer in a structured format. + + It can be useful for storing additional information about the + transfer in a structured format. example: order_id: '6735' V2ActivityStripeTransfer: @@ -1027,8 +1060,6 @@ components: properties: name: type: string - V2ActivityListWalletsOutput: - $ref: '#/components/schemas/V2ListWalletsResponse' V2ListWalletsResponse: type: object required: @@ -1086,15 +1117,15 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' V2ActivityGetAccount: type: object required: - - id - - ledger + - id + - ledger properties: id: type: string @@ -1125,14 +1156,14 @@ components: V2ActivityGetPayment: type: object required: - - id + - id properties: id: type: string V2ActivityConfirmHold: type: object required: - - id + - id properties: id: type: string @@ -1143,7 +1174,6 @@ components: type: string data: $ref: '#/components/schemas/V2CreditWalletRequest' - V2CreditWalletRequest: type: object required: @@ -1175,8 +1205,8 @@ components: asset: USD/2 amount: 100 metadata: - key: "" - sources: [ ] + key: '' + sources: [] V2LedgerAccountSubject: type: object required: @@ -1208,7 +1238,6 @@ components: oneOf: - $ref: '#/components/schemas/V2LedgerAccountSubject' - $ref: '#/components/schemas/V2WalletSubject' - V2ActivityDebitWallet: type: object properties: @@ -1216,7 +1245,6 @@ components: type: string data: $ref: '#/components/schemas/V2DebitWalletRequest' - V2DebitWalletRequest: type: object required: @@ -1227,7 +1255,9 @@ components: $ref: '#/components/schemas/V2Monetary' pending: type: boolean - description: Set to true to create a pending hold. If false, the wallet will be debited immediately. + description: >- + Set to true to create a pending hold. If false, the wallet will be + debited immediately. metadata: type: object additionalProperties: @@ -1251,20 +1281,19 @@ components: asset: USD/2 amount: 100 metadata: - key: "" + key: '' pending: true - V2ActivityGetWallet: type: object required: - - id + - id properties: id: type: string V2ActivityVoidHold: type: object required: - - id + - id properties: id: type: string @@ -1272,7 +1301,6 @@ components: $ref: '#/components/schemas/V2AccountResponse' V2ActivityCreateTransactionOutput: $ref: '#/components/schemas/V2CreateTransactionResponse' - V2CreateTransactionResponse: properties: data: @@ -1282,7 +1310,6 @@ components: type: object required: - data - V2Transaction: type: object properties: @@ -1307,10 +1334,8 @@ components: - timestamp - txid - metadata - V2ActivityGetPaymentOutput: $ref: '#/components/schemas/V2PaymentResponse' - V2PaymentResponse: type: object required: @@ -1399,7 +1424,6 @@ components: $ref: '#/components/schemas/V2PaymentAdjustment' metadata: $ref: '#/components/schemas/V2PaymentMetadata' - V2Connector: type: string enum: @@ -1411,7 +1435,6 @@ components: - BANKING-CIRCLE - MANGOPAY - MONEYCORP - V2PaymentAdjustment: type: object required: @@ -1435,7 +1458,6 @@ components: type: object absolute: type: boolean - V2PaymentStatus: type: string enum: @@ -1445,17 +1467,14 @@ components: - FAILED - SUCCEEDED - CANCELLED - V2PaymentMetadata: type: object properties: key: type: string nullable: true - V2ActivityDebitWalletOutput: $ref: '#/components/schemas/V2DebitWalletResponse' - V2DebitWalletResponse: type: object required: @@ -1463,7 +1482,6 @@ components: properties: data: $ref: '#/components/schemas/V2Hold' - V2Hold: type: object required: @@ -1488,10 +1506,8 @@ components: type: string destination: $ref: '#/components/schemas/V2Subject' - V2ActivityGetWalletOutput: $ref: '#/components/schemas/V2GetWalletResponse' - V2GetWalletResponse: type: object required: @@ -1499,7 +1515,6 @@ components: properties: data: $ref: '#/components/schemas/V2WalletWithBalances' - V2WalletWithBalances: type: object required: @@ -1533,7 +1548,6 @@ components: $ref: '#/components/schemas/V2AssetHolder' ledger: type: string - V2AssetHolder: type: object required: @@ -1544,7 +1558,6 @@ components: additionalProperties: type: integer format: bigint - V2WorkflowInstanceHistoryStageInput: type: object properties: @@ -1585,7 +1598,6 @@ components: $ref: '#/components/schemas/V2ActivityGetWalletOutput' ListWallets: $ref: '#/components/schemas/V2ListWalletsResponse' - V2Monetary: type: object required: @@ -1599,7 +1611,6 @@ components: type: integer format: bigint description: The amount of the monetary value. - V2PostTransaction: type: object required: @@ -1620,11 +1631,10 @@ components: example: "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n" vars: type: object - properties: { } + properties: {} additionalProperties: true - example: { - "user": "users:042" - } + example: + user: users:042 required: - plain reference: @@ -1632,13 +1642,12 @@ components: example: ref:001 metadata: $ref: '#/components/schemas/V2Metadata' - V2Metadata: type: object additionalProperties: type: string - example: { admin: "true" } - + example: + admin: 'true' V2Posting: type: object properties: @@ -1661,7 +1670,6 @@ components: - asset - destination - source - V2AccountResponse: type: object required: @@ -1669,7 +1677,6 @@ components: properties: data: $ref: '#/components/schemas/V2Account' - V2ReadTriggerResponse: type: object required: @@ -1677,7 +1684,6 @@ components: properties: data: $ref: '#/components/schemas/V2Trigger' - V2Account: type: object required: @@ -1689,15 +1695,15 @@ components: example: users:001 metadata: type: object - properties: { } + properties: {} additionalProperties: type: string - example: { admin: "true" } + example: + admin: 'true' volumes: $ref: '#/components/schemas/V2Volumes' effectiveVolumes: $ref: '#/components/schemas/V2Volumes' - V2Volume: type: object properties: @@ -1717,7 +1723,6 @@ components: input: 100 output: 20 balance: 80 - V2Volumes: type: object additionalProperties: @@ -1731,7 +1736,6 @@ components: input: 100 output: 10 balance: 90 - V2TestTriggerResponse: type: object required: @@ -1739,7 +1743,6 @@ components: properties: data: $ref: '#/components/schemas/V2TriggerTest' - V2TriggerTest: type: object properties: @@ -1759,7 +1762,6 @@ components: type: string error: type: string - responses: V2ErrorResponse: description: General error diff --git a/ee/reconciliation/openapi.yaml b/ee/reconciliation/openapi.yaml index 8c757e2236..498fc6d4df 100644 --- a/ee/reconciliation/openapi.yaml +++ b/ee/reconciliation/openapi.yaml @@ -1,9 +1,7 @@ openapi: 3.0.3 info: title: Reconciliation API - version: "RECONCILIATION_VERSION" - -# ---------------------- PATHS ---------------------- + version: RECONCILIATION_VERSION paths: /_info: get: @@ -12,11 +10,13 @@ paths: tags: - reconciliation.v1 responses: - 200: + '200': $ref: '#/components/responses/ServerInfo' default: $ref: '#/components/responses/ErrorResponse' - + security: + - Authorization: + - reconciliation:read /policies: post: summary: Create a policy @@ -27,10 +27,13 @@ paths: requestBody: $ref: '#/components/requestBodies/Policy' responses: - 201: + '201': $ref: '#/components/responses/Policy' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - reconciliation:write get: summary: List policies operationId: listPolicies @@ -40,11 +43,13 @@ paths: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/Cursor' responses: - 200: + '200': $ref: '#/components/responses/Policies' default: $ref: '#/components/responses/ErrorResponse' - + security: + - Authorization: + - reconciliation:read /policies/{policyID}: delete: summary: Delete a policy @@ -55,10 +60,13 @@ paths: parameters: - $ref: '#/components/parameters/PolicyID' responses: - 204: + '204': $ref: '#/components/responses/NoContent' default: $ref: '#/components/responses/ErrorResponse' + security: + - Authorization: + - reconciliation:write get: summary: Get a policy tags: @@ -67,11 +75,13 @@ paths: parameters: - $ref: '#/components/parameters/PolicyID' responses: - 200: + '200': $ref: '#/components/responses/Policy' default: $ref: '#/components/responses/ErrorResponse' - + security: + - Authorization: + - reconciliation:read /policies/{policyID}/reconciliation: post: summary: Reconcile using a policy @@ -84,11 +94,13 @@ paths: requestBody: $ref: '#/components/requestBodies/Reconciliation' responses: - 200: + '200': $ref: '#/components/responses/Reconciliation' default: $ref: '#/components/responses/ErrorResponse' - + security: + - Authorization: + - reconciliation:write /reconciliations: get: summary: List reconciliations @@ -99,11 +111,13 @@ paths: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/Cursor' responses: - 200: + '200': $ref: '#/components/responses/Reconciliations' default: $ref: '#/components/responses/ErrorResponse' - + security: + - Authorization: + - reconciliation:read /reconciliations/{reconciliationID}: get: summary: Get a reconciliation @@ -113,20 +127,20 @@ paths: parameters: - $ref: '#/components/parameters/ReconciliationID' responses: - 200: + '200': $ref: '#/components/responses/Reconciliation' default: $ref: '#/components/responses/ErrorResponse' - -# ---------------------- COMPONENTS ---------------------- + security: + - Authorization: + - reconciliation:read components: - # ---------------------- PARAMETERS ---------------------- parameters: PageSize: name: pageSize in: query description: | - The maximum number of results to return per page. + The maximum number of results to return per page. example: 100 schema: type: integer @@ -160,8 +174,6 @@ components: description: The reconciliation ID. example: XXX required: true - - # ---------------------- RESPONSES ---------------------- responses: NoContent: description: No content @@ -201,7 +213,6 @@ components: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - # ---------------------- REQUESTS ---------------------- requestBodies: Policy: required: true @@ -215,10 +226,7 @@ components: application/json: schema: $ref: '#/components/schemas/ReconciliationRequest' - - # ---------------------- SCHEMAS ---------------------- schemas: - # ---------------------- CURSORS ---------------------- PoliciesCursorResponse: type: object required: @@ -242,10 +250,10 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: @@ -273,19 +281,18 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' data: type: array items: $ref: '#/components/schemas/Reconciliation' - # ---------------------- RESPONSES ---------------------- ServerInfo: type: object required: - - version + - version properties: version: type: string @@ -299,16 +306,16 @@ components: properties: name: type: string - example: "XXX" + example: XXX ledgerName: type: string - example: "default" + example: default ledgerQuery: type: object additionalProperties: true paymentsPoolID: type: string - example: "XXX" + example: XXX PolicyResponse: type: object required: @@ -325,11 +332,11 @@ components: reconciledAtLedger: type: string format: date-time - example: "2021-01-01T00:00:00.000Z" + example: '2021-01-01T00:00:00.000Z' reconciledAtPayments: type: string format: date-time - example: "2021-01-01T00:00:00.000Z" + example: '2021-01-01T00:00:00.000Z' ReconciliationResponse: type: object required: @@ -349,23 +356,23 @@ components: properties: id: type: string - example: "XXX" + example: XXX name: type: string - example: "XXX" + example: XXX createdAt: type: string format: date-time - example: "2021-01-01T00:00:00.000Z" + example: '2021-01-01T00:00:00.000Z' ledgerName: type: string - example: "default" + example: default ledgerQuery: type: object additionalProperties: true paymentsPoolID: type: string - example: "XXX" + example: XXX Reconciliation: type: object required: @@ -381,25 +388,25 @@ components: properties: id: type: string - example: "XXX" + example: XXX policyID: type: string - example: "XXX" + example: XXX createdAt: type: string format: date-time - example: "2021-01-01T00:00:00.000Z" + example: '2021-01-01T00:00:00.000Z' reconciledAtLedger: type: string format: date-time - example: "2021-01-01T00:00:00.000Z" + example: '2021-01-01T00:00:00.000Z' reconciledAtPayments: type: string format: date-time - example: "2021-01-01T00:00:00.000Z" + example: '2021-01-01T00:00:00.000Z' status: type: string - example: "COMPLETED" + example: COMPLETED paymentsBalances: type: object additionalProperties: @@ -425,8 +432,8 @@ components: properties: errorCode: type: string - example: "VALIDATION" + example: VALIDATION errorMessage: type: string details: - type: string \ No newline at end of file + type: string diff --git a/ee/search/openapi.yaml b/ee/search/openapi.yaml index ca7badae0f..89b5bdb816 100644 --- a/ee/search/openapi.yaml +++ b/ee/search/openapi.yaml @@ -2,7 +2,6 @@ openapi: 3.0.3 info: title: Search API version: latest - paths: /_info: get: @@ -11,12 +10,15 @@ paths: tags: - search.v1 responses: - "200": + '200': description: Server information content: application/json: schema: $ref: '#/components/schemas/ServerInfo' + security: + - Authorization: + - search:read /: post: summary: search.v1 @@ -31,7 +33,7 @@ paths: schema: $ref: '#/components/schemas/Query' responses: - "200": + '200': description: Success content: application/json: @@ -40,7 +42,9 @@ paths: default: description: Error content: {} - + security: + - Authorization: + - search:write components: schemas: ServerInfo: @@ -50,7 +54,6 @@ components: properties: version: type: string - Query: type: object properties: @@ -58,12 +61,12 @@ components: type: array items: type: string - example: "quickstart" + example: quickstart after: type: array items: type: string - example: "users:002" + example: users:002 pageSize: type: integer format: int64 @@ -72,22 +75,23 @@ components: type: array items: type: string - example: "destination=central_bank1" + example: destination=central_bank1 sort: type: string - example: "id:asc" + example: id:asc policy: type: string - example: "OR" + example: OR target: type: string cursor: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= raw: type: object - example: {"query": {"match_all": {}}} - + example: + query: + match_all: {} Response: type: object properties: @@ -116,16 +120,16 @@ components: example: 1 relation: type: string - example: "eq" + example: eq next: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= data: type: array items: allOf: - - type: object - additionalProperties: true + - type: object + additionalProperties: true diff --git a/ee/wallets/openapi.yaml b/ee/wallets/openapi.yaml index 25f52b6baf..c5169bd5b1 100644 --- a/ee/wallets/openapi.yaml +++ b/ee/wallets/openapi.yaml @@ -1,18 +1,16 @@ openapi: 3.0.3 - info: title: Formance Simple Wallets Service API version: 0.1.0 - paths: /_info: get: summary: Get server info operationId: getServerInfo tags: - - wallets.v1 + - wallets.v1 responses: - 200: + '200': description: Server information content: application/json: @@ -24,38 +22,40 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:read /transactions: get: operationId: getTransactions parameters: - - name: pageSize - in: query - description: 'The maximum number of results to return per page' - example: 100 - schema: - type: integer - maximum: 1000 - minimum: 1 - default: 15 - - name: walletID - in: query - description: "A wallet ID to filter on" - example: "wallet1" - schema: - type: string - - name: cursor - in: query - description: | - Parameter used in pagination requests. - Set to the value of next for the next page of results. - Set to the value of previous for the previous page of results. - No other parameters can be set when the cursor is set. - schema: - type: string - example: aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== + - name: pageSize + in: query + description: The maximum number of results to return per page + example: 100 + schema: + type: integer + maximum: 1000 + minimum: 1 + default: 15 + - name: walletID + in: query + description: A wallet ID to filter on + example: wallet1 + schema: + type: string + - name: cursor + in: query + description: | + Parameter used in pagination requests. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when the cursor is set. + schema: + type: string + example: aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== tags: - - wallets.v1 + - wallets.v1 responses: '200': description: OK @@ -69,57 +69,62 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:read /wallets: get: summary: List all wallets operationId: listWallets parameters: - - name: name - in: query - description: 'Filter on wallet name' - example: wallet1 - schema: - type: string - - name: metadata - in: query - description: Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. - style: deepObject - explode: true - schema: - type: object - properties: { } - additionalProperties: + - name: name + in: query + description: Filter on wallet name + example: wallet1 + schema: type: string - example: { admin: "true" } - - name: pageSize - in: query - description: 'The maximum number of results to return per page' - example: 100 - schema: - type: integer - maximum: 1000 - minimum: 1 - default: 15 - - name: cursor - in: query - description: | - Parameter used in pagination requests. - Set to the value of next for the next page of results. - Set to the value of previous for the previous page of results. - No other parameters can be set when the pagination token is set. - schema: - type: string - example: aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== - - name: expand - in: query - example: "balances" - schema: - type: string - items: + - name: metadata + in: query + description: >- + Filter wallets by metadata key value pairs. Nested objects can be + used as seen in the example below. + style: deepObject + explode: true + schema: + type: object + properties: {} + additionalProperties: + type: string + example: + admin: 'true' + - name: pageSize + in: query + description: The maximum number of results to return per page + example: 100 + schema: + type: integer + maximum: 1000 + minimum: 1 + default: 15 + - name: cursor + in: query + description: | + Parameter used in pagination requests. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when the pagination token is set. + schema: type: string + example: aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== + - name: expand + in: query + example: balances + schema: + type: string + items: + type: string tags: - - wallets.v1 + - wallets.v1 responses: '200': description: OK @@ -127,18 +132,20 @@ paths: application/json: schema: $ref: '#/components/schemas/ListWalletsResponse' - default: description: OK content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + security: + - Authorization: + - wallets:read post: summary: Create a new wallet operationId: createWallet tags: - - wallets.v1 + - wallets.v1 parameters: - name: Idempotency-Key in: header @@ -151,7 +158,7 @@ paths: schema: $ref: '#/components/schemas/CreateWalletRequest' responses: - 201: + '201': description: Wallet created content: application/json: @@ -163,27 +170,29 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:write /wallets/{id}: parameters: - - name: id - in: path - required: true - schema: - type: string + - name: id + in: path + required: true + schema: + type: string get: summary: Get a wallet operationId: getWallet tags: - - wallets.v1 + - wallets.v1 responses: - 200: + '200': description: Wallet content: application/json: schema: $ref: '#/components/schemas/GetWalletResponse' - 404: + '404': description: Wallet not found default: description: Error @@ -191,12 +200,14 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:read patch: summary: Update a wallet operationId: updateWallet tags: - - wallets.v1 + - wallets.v1 parameters: - name: Idempotency-Key in: header @@ -209,7 +220,7 @@ paths: schema: type: object required: - - metadata + - metadata properties: metadata: type: object @@ -217,7 +228,7 @@ paths: additionalProperties: type: string responses: - 204: + '204': description: Wallet successfully updated default: description: Error @@ -225,27 +236,29 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:write /wallets/{id}/summary: parameters: - - name: id - in: path - required: true - schema: - type: string + - name: id + in: path + required: true + schema: + type: string get: summary: Get wallet summary operationId: getWalletSummary tags: - - wallets.v1 + - wallets.v1 responses: - 200: + '200': description: Wallet summary content: application/json: schema: $ref: '#/components/schemas/GetWalletSummaryResponse' - 404: + '404': description: Wallet not found default: description: Error @@ -253,26 +266,31 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:read /wallets/{id}/balances: parameters: - - name: id - in: path - required: true - schema: - type: string + - name: id + in: path + required: true + schema: + type: string get: summary: List balances of a wallet operationId: listBalances tags: - - wallets.v1 + - wallets.v1 responses: - 200: + '200': description: Balances list content: application/json: schema: $ref: '#/components/schemas/ListBalancesResponse' + security: + - Authorization: + - wallets:read post: summary: Create a balance operationId: createBalance @@ -290,7 +308,7 @@ paths: schema: $ref: '#/components/schemas/CreateBalanceRequest' responses: - 201: + '201': description: Created balance content: application/json: @@ -302,26 +320,28 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:write /wallets/{id}/balances/{balanceName}: get: parameters: - - name: id - in: path - required: true - schema: - type: string - - name: balanceName - in: path - required: true - schema: - type: string + - name: id + in: path + required: true + schema: + type: string + - name: balanceName + in: path + required: true + schema: + type: string summary: Get detailed balance operationId: getBalance tags: - - wallets.v1 + - wallets.v1 responses: - 200: + '200': description: Balance summary content: application/json: @@ -333,19 +353,21 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:read /wallets/{id}/debit: parameters: - - name: id - in: path - required: true - schema: - type: string - - name: Idempotency-Key - in: header - description: Use an idempotency key - schema: - type: string + - name: id + in: path + required: true + schema: + type: string + - name: Idempotency-Key + in: header + description: Use an idempotency key + schema: + type: string post: summary: Debit a wallet operationId: debitWallet @@ -356,20 +378,20 @@ paths: schema: type: string tags: - - wallets.v1 + - wallets.v1 requestBody: content: application/json: schema: $ref: '#/components/schemas/DebitWalletRequest' responses: - 201: + '201': description: Wallet successfully debited as a pending hold content: application/json: schema: $ref: '#/components/schemas/DebitWalletResponse' - 204: + '204': description: Wallet successfully debited default: description: Error @@ -377,19 +399,21 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:write /wallets/{id}/credit: parameters: - - name: id - in: path - required: true - schema: - type: string - - name: Idempotency-Key - in: header - description: Use an idempotency key - schema: - type: string + - name: id + in: path + required: true + schema: + type: string + - name: Idempotency-Key + in: header + description: Use an idempotency key + schema: + type: string post: summary: Credit a wallet operationId: creditWallet @@ -400,14 +424,14 @@ paths: schema: type: string tags: - - wallets.v1 + - wallets.v1 requestBody: content: application/json: schema: $ref: '#/components/schemas/CreditWalletRequest' responses: - 204: + '204': description: Wallet successfully credited default: description: Error @@ -415,51 +439,56 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:write /holds: get: summary: Get all holds for a wallet tags: - - wallets.v1 + - wallets.v1 operationId: getHolds parameters: - - name: pageSize - in: query - description: 'The maximum number of results to return per page' - example: 100 - schema: - type: integer - maximum: 1000 - minimum: 1 - default: 15 - - name: walletID - in: query - description: 'The wallet to filter on' - example: wallet1 - schema: - type: string - - name: metadata - in: query - description: Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. - style: deepObject - schema: - type: object - properties: { } - additionalProperties: + - name: pageSize + in: query + description: The maximum number of results to return per page + example: 100 + schema: + type: integer + maximum: 1000 + minimum: 1 + default: 15 + - name: walletID + in: query + description: The wallet to filter on + example: wallet1 + schema: type: string - example: { admin: "true" } - - name: cursor - in: query - description: | - Parameter used in pagination requests. - Set to the value of next for the next page of results. - Set to the value of previous for the previous page of results. - No other parameters can be set when the pagination token is set. - schema: - type: string - example: aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== + - name: metadata + in: query + description: >- + Filter holds by metadata key value pairs. Nested objects can be used + as seen in the example below. + style: deepObject + schema: + type: object + properties: {} + additionalProperties: + type: string + example: + admin: 'true' + - name: cursor + in: query + description: | + Parameter used in pagination requests. + Set to the value of next for the next page of results. + Set to the value of previous for the previous page of results. + No other parameters can be set when the pagination token is set. + schema: + type: string + example: aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== responses: - 200: + '200': description: Holds content: application/json: @@ -471,22 +500,24 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:read /holds/{holdID}: get: summary: Get a hold tags: - - wallets.v1 + - wallets.v1 operationId: getHold parameters: - - name: holdID - in: path - schema: - type: string - required: true - description: The hold ID + - name: holdID + in: path + schema: + type: string + required: true + description: The hold ID responses: - 200: + '200': description: Holds content: application/json: @@ -498,20 +529,22 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:read /holds/{hold_id}/confirm: post: parameters: - - name: hold_id - in: path - required: true - schema: - type: string - - name: Idempotency-Key - in: header - description: Use an idempotency key - schema: - type: string + - name: hold_id + in: path + required: true + schema: + type: string + - name: Idempotency-Key + in: header + description: Use an idempotency key + schema: + type: string requestBody: content: application/json: @@ -519,10 +552,10 @@ paths: $ref: '#/components/schemas/ConfirmHoldRequest' summary: Confirm a hold tags: - - wallets.v1 + - wallets.v1 operationId: confirmHold responses: - 204: + '204': description: Hold successfully confirmed, funds moved back to initial destination default: description: Error @@ -530,24 +563,26 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:write /holds/{hold_id}/void: parameters: - - name: hold_id - in: path - required: true - schema: - type: string - - name: Idempotency-Key - in: header - description: Use an idempotency key - schema: - type: string + - name: hold_id + in: path + required: true + schema: + type: string + - name: Idempotency-Key + in: header + description: Use an idempotency key + schema: + type: string post: summary: Cancel a hold operationId: voidHold tags: - - wallets.v1 + - wallets.v1 parameters: - name: Idempotency-Key in: header @@ -555,7 +590,7 @@ paths: schema: type: string responses: - 204: + '204': description: Hold successfully cancelled, funds returned to wallet default: description: Error @@ -563,14 +598,16 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - wallets:write components: schemas: Monetary: type: object required: - - asset - - amount + - asset + - amount properties: asset: type: string @@ -582,11 +619,11 @@ components: Wallet: type: object required: - - name - - id - - metadata - - createdAt - - ledger + - name + - id + - metadata + - createdAt + - ledger properties: id: type: string @@ -614,12 +651,12 @@ components: WalletWithBalances: type: object required: - - name - - id - - metadata - - createdAt - - balances - - ledger + - name + - id + - metadata + - createdAt + - balances + - ledger properties: id: type: string @@ -638,7 +675,7 @@ components: balances: type: object required: - - main + - main properties: main: $ref: '#/components/schemas/AssetHolder' @@ -647,10 +684,10 @@ components: Hold: type: object required: - - id - - walletID - - metadata - - description + - id + - walletID + - metadata + - description properties: id: type: string @@ -670,56 +707,56 @@ components: $ref: '#/components/schemas/Subject' ExpandedDebitHold: allOf: - - $ref: '#/components/schemas/Hold' - - type: object - required: - - remaining - - originalAmount - properties: - remaining: - type: integer - description: Remaining amount on hold - example: 10 - format: bigint - originalAmount: - type: integer - description: Original amount on hold - example: 100 - format: bigint + - $ref: '#/components/schemas/Hold' + - type: object + required: + - remaining + - originalAmount + properties: + remaining: + type: integer + description: Remaining amount on hold + example: 10 + format: bigint + originalAmount: + type: integer + description: Original amount on hold + example: 100 + format: bigint ListWalletsResponse: type: object required: - - cursor + - cursor properties: cursor: allOf: - - $ref: '#/components/schemas/Cursor' - - properties: - data: - items: - $ref: '#/components/schemas/Wallet' - type: array - type: object - required: - - data + - $ref: '#/components/schemas/Cursor' + - properties: + data: + items: + $ref: '#/components/schemas/Wallet' + type: array + type: object + required: + - data CreateWalletResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/Wallet' GetWalletResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/WalletWithBalances' DebitWalletResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/Hold' @@ -747,10 +784,10 @@ components: type: string example: users:001 required: - - amount - - asset - - destination - - source + - amount + - asset + - destination + - source Transaction: type: object properties: @@ -780,14 +817,14 @@ components: postCommitVolumes: $ref: '#/components/schemas/AggregatedVolumes' required: - - postings - - timestamp - - id - - metadata + - postings + - timestamp + - id + - metadata Cursor: type: object required: - - pageSize + - pageSize properties: pageSize: type: integer @@ -800,54 +837,54 @@ components: example: false previous: type: string - example: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=" + example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= next: type: string - example: "" + example: '' GetTransactionsResponse: type: object required: - - cursor + - cursor properties: cursor: allOf: - - $ref: '#/components/schemas/Cursor' - - properties: - data: - items: - $ref: '#/components/schemas/Transaction' - type: array - type: object - required: - - data + - $ref: '#/components/schemas/Cursor' + - properties: + data: + items: + $ref: '#/components/schemas/Transaction' + type: array + type: object + required: + - data GetHoldsResponse: type: object required: - - cursor + - cursor properties: cursor: allOf: - - $ref: '#/components/schemas/Cursor' - - properties: - data: - items: - $ref: '#/components/schemas/Hold' - type: array - type: object - required: - - data + - $ref: '#/components/schemas/Cursor' + - properties: + data: + items: + $ref: '#/components/schemas/Hold' + type: array + type: object + required: + - data GetHoldResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/ExpandedDebitHold' CreateWalletRequest: type: object required: - - name - - metadata + - name + - metadata properties: metadata: type: object @@ -869,9 +906,9 @@ components: type: integer format: bigint required: - - input - - output - - balance + - input + - output + - balance example: input: 100 output: 20 @@ -900,12 +937,14 @@ components: final: type: boolean example: true - description: Define a final confirmation. Remaining funds will be returned to the wallet. + description: >- + Define a final confirmation. Remaining funds will be returned to the + wallet. LedgerAccountSubject: type: object required: - - type - - identifier + - type + - identifier properties: type: type: string @@ -914,8 +953,8 @@ components: WalletSubject: type: object required: - - type - - identifier + - type + - identifier properties: type: type: string @@ -930,12 +969,12 @@ components: ACCOUNT: '#/components/schemas/LedgerAccountSubject' WALLET: '#/components/schemas/WalletSubject' oneOf: - - $ref: '#/components/schemas/LedgerAccountSubject' - - $ref: '#/components/schemas/WalletSubject' + - $ref: '#/components/schemas/LedgerAccountSubject' + - $ref: '#/components/schemas/WalletSubject' CreditWalletRequest: type: object required: - - amount + - amount properties: amount: $ref: '#/components/schemas/Monetary' @@ -963,20 +1002,21 @@ components: asset: USD/2 amount: 100 metadata: - key: "" + key: '' sources: [] - DebitWalletRequest: type: object required: - - amount - - metadata + - amount + - metadata properties: amount: $ref: '#/components/schemas/Monetary' pending: type: boolean - description: Set to true to create a pending hold. If false, the wallet will be debited immediately. + description: >- + Set to true to create a pending hold. If false, the wallet will be + debited immediately. metadata: type: object additionalProperties: @@ -1000,20 +1040,19 @@ components: asset: USD/2 amount: 100 metadata: - key: "" + key: '' pending: true - ServerInfo: type: object required: - - version + - version properties: version: type: string AssetHolder: type: object required: - - assets + - assets properties: assets: type: object @@ -1023,7 +1062,7 @@ components: Balance: type: object required: - - name + - name properties: name: type: string @@ -1036,16 +1075,16 @@ components: format: bigint BalanceWithAssets: allOf: - - $ref: '#/components/schemas/Balance' - - $ref: '#/components/schemas/AssetHolder' + - $ref: '#/components/schemas/Balance' + - $ref: '#/components/schemas/AssetHolder' GetWalletSummaryResponse: type: object required: - - balances - - availableFunds - - expiredFunds - - expirableFunds - - holdFunds + - balances + - availableFunds + - expiredFunds + - expirableFunds + - holdFunds properties: balances: type: array @@ -1074,48 +1113,47 @@ components: ListBalancesResponse: type: object required: - - cursor + - cursor properties: cursor: allOf: - - $ref: '#/components/schemas/Cursor' - - properties: - data: - items: - $ref: '#/components/schemas/Balance' - type: array - type: object - required: - - data + - $ref: '#/components/schemas/Cursor' + - properties: + data: + items: + $ref: '#/components/schemas/Balance' + type: array + type: object + required: + - data GetBalanceResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/BalanceWithAssets' CreateBalanceRequest: $ref: '#/components/schemas/Balance' - CreateBalanceResponse: type: object required: - - data + - data properties: data: $ref: '#/components/schemas/Balance' ErrorResponse: type: object required: - - errorCode - - errorMessage + - errorCode + - errorMessage properties: errorCode: type: string enum: - - VALIDATION - - INTERNAL_ERROR - - INSUFFICIENT_FUND - - HOLD_CLOSED + - VALIDATION + - INTERNAL_ERROR + - INSUFFICIENT_FUND + - HOLD_CLOSED errorMessage: type: string diff --git a/ee/webhooks/openapi.yaml b/ee/webhooks/openapi.yaml index 0d8f79175f..ea4b40ba6f 100644 --- a/ee/webhooks/openapi.yaml +++ b/ee/webhooks/openapi.yaml @@ -1,8 +1,7 @@ openapi: 3.0.3 info: title: Webhooks - version: "WEBHOOKS_VERSION" - + version: WEBHOOKS_VERSION paths: /configs: get: @@ -27,30 +26,37 @@ paths: type: string example: https://example.com responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ConfigsResponse' - default: description: Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - webhooks:read post: summary: Insert a new config - description: | + description: > Insert a new webhooks config. + The endpoint should be a valid https URL and be unique. + The secret is the endpoint's verification secret. + If not passed or empty, a secret is automatically generated. - The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) + + The format is a random string of bytes of size 24, base64 encoded. + (larger size after encoding) + All eventTypes are converted to lower-case when inserted. operationId: insertConfig @@ -63,20 +69,21 @@ paths: $ref: '#/components/schemas/ConfigUser' required: true responses: - "200": + '200': description: Config created successfully. content: application/json: schema: $ref: '#/components/schemas/ConfigResponse' - default: description: Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - webhooks:write /configs/{id}: delete: summary: Delete one config @@ -93,16 +100,17 @@ paths: type: string example: 4997257d-dfb6-445b-929c-cbe2ab182818 responses: - "200": + '200': description: Config successfully deleted. - default: description: Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - webhooks:write /configs/{id}/test: get: summary: Test one config @@ -119,24 +127,27 @@ paths: type: string example: 4997257d-dfb6-445b-929c-cbe2ab182818 responses: - "200": + '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AttemptResponse' - default: description: Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - webhooks:read /configs/{id}/activate: put: summary: Activate one config - description: Activate a webhooks config by ID, to start receiving webhooks to its endpoint. + description: >- + Activate a webhooks config by ID, to start receiving webhooks to its + endpoint. operationId: activateConfig tags: - webhooks.v1 @@ -149,24 +160,27 @@ paths: type: string example: 4997257d-dfb6-445b-929c-cbe2ab182818 responses: - "200": + '200': description: Config successfully activated. content: application/json: schema: $ref: '#/components/schemas/ConfigResponse' - default: description: Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - webhooks:write /configs/{id}/deactivate: put: summary: Deactivate one config - description: Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint. + description: >- + Deactivate a webhooks config by ID, to stop receiving webhooks to its + endpoint. operationId: deactivateConfig tags: - webhooks.v1 @@ -179,28 +193,32 @@ paths: type: string example: 4997257d-dfb6-445b-929c-cbe2ab182818 responses: - "200": + '200': description: Config successfully deactivated. content: application/json: schema: $ref: '#/components/schemas/ConfigResponse' - default: description: Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - webhooks:write /configs/{id}/secret/change: put: summary: Change the signing secret of a config - description: | + description: > Change the signing secret of the endpoint of a webhooks config. + If not passed or empty, a secret is automatically generated. - The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) + + The format is a random string of bytes of size 24, base64 encoded. + (larger size after encoding) operationId: changeConfigSecret tags: - webhooks.v1 @@ -218,20 +236,21 @@ paths: type: string example: 4997257d-dfb6-445b-929c-cbe2ab182818 responses: - "200": + '200': description: Secret successfully changed. content: application/json: schema: $ref: '#/components/schemas/ConfigResponse' - default: description: Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' - + security: + - Authorization: + - webhooks:write components: schemas: ConfigUser: @@ -242,20 +261,21 @@ components: properties: name: type: string - example: "customer_payment" + example: customer_payment endpoint: type: string - example: "https://example.com" + example: https://example.com secret: type: string - example: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3" + example: V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3 eventTypes: type: array items: type: string - example: "TYPE1" - example: ["TYPE1", "TYPE2"] - + example: TYPE1 + example: + - TYPE1 + - TYPE2 ConfigsResponse: type: object required: @@ -272,7 +292,6 @@ components: type: object required: - data - Cursor: type: object required: @@ -286,7 +305,6 @@ components: type: array items: $ref: '#/components/schemas/WebhooksConfig' - ConfigResponse: type: object required: @@ -294,7 +312,6 @@ components: properties: data: $ref: '#/components/schemas/WebhooksConfig' - WebhooksConfig: properties: id: @@ -302,16 +319,18 @@ components: format: uuid endpoint: type: string - example: "https://example.com" + example: https://example.com secret: type: string - example: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3" + example: V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3 eventTypes: type: array items: type: string - example: "TYPE1" - example: ["TYPE1", "TYPE2"] + example: TYPE1 + example: + - TYPE1 + - TYPE2 active: type: boolean example: true @@ -329,16 +348,14 @@ components: - active - createdAt - updatedAt - ConfigChangeSecret: type: object properties: secret: type: string - example: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3" + example: V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3 required: - secret - AttemptResponse: type: object required: @@ -346,7 +363,6 @@ components: properties: data: $ref: '#/components/schemas/Attempt' - Attempt: properties: id: @@ -388,7 +404,6 @@ components: - statusCode - retryAttempt - status - ErrorResponse: type: object required: @@ -399,11 +414,11 @@ components: $ref: '#/components/schemas/ErrorsEnum' errorMessage: type: string - example: "[VALIDATION] invalid 'cursor' query param" + example: '[VALIDATION] invalid ''cursor'' query param' details: type: string - example: "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" - + example: >- + https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9 ErrorsEnum: type: string enum: diff --git a/releases/base.yaml b/releases/base.yaml index f45e617a6b..10932d2e2b 100644 --- a/releases/base.yaml +++ b/releases/base.yaml @@ -25,9 +25,23 @@ info: servers: - url: http://localhost description: local server +- url: https://{stack}.sandbox.formance.cloud + description: sandbox server -security: - - Authorization: [] +#security: {} +# - Authorization: [] + +tags: + - name: ledger.v1 + - name: ledger.v2 + - name: payments.v1 + - name: auth.v1 + - name: orchestration.v1 + - name: orchestration.v2 + - name: reconciliation.v1 + - name: search.v1 + - name: webhooks.v1 + - name: wallets.v1 components: securitySchemes: diff --git a/releases/sdks/go/.speakeasy/gen.lock b/releases/sdks/go/.speakeasy/gen.lock old mode 100755 new mode 100644 index 197a44e524..a1e51e3d17 --- a/releases/sdks/go/.speakeasy/gen.lock +++ b/releases/sdks/go/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 -id: 7eac0a45-60a2-40bb-9e85-26bd77ec2a6d +id: 8cc5b996-ee96-49ac-9b4e-0cc5e3bfbe2f management: - docChecksum: 0565b0e11806fc861715659cc13d103e + docChecksum: e92196089dd1f79fdb19e88fc5e39117 docVersion: v0.0.0 speakeasyVersion: 1.346.0 generationVersion: 2.379.3 releaseVersion: v0.0.0 - configChecksum: 86fb0b4c762641bbbe6b4f59e9dd3989 + configChecksum: f2202d55313914a857427cd0c614fbb1 features: go: additionalDependencies: 0.1.0 @@ -25,6 +25,7 @@ features: intellisenseMarkdownSupport: 0.1.0 nameOverrides: 2.81.2 nullables: 0.1.0 + oauth2ClientCredentials: 0.1.1 responseFormat: 0.1.2 retries: 2.83.0 sdkHooks: 0.1.0 @@ -1375,4 +1376,5 @@ generatedFiles: - pkg/models/operations/options.go - .gitattributes - internal/hooks/hooks.go + - internal/hooks/clientcredentials.go - CONTRIBUTING.md diff --git a/releases/sdks/go/README.md b/releases/sdks/go/README.md index bdd7006bf6..8c82504225 100644 --- a/releases/sdks/go/README.md +++ b/releases/sdks/go/README.md @@ -1,7 +1,7 @@ # github.com/formancehq/formance-sdk-go/v2