From f70b627b6c440bf12cb737f4ef6ed5078f8e38b6 Mon Sep 17 00:00:00 2001 From: Brandon Wilson Date: Wed, 23 Nov 2022 07:34:42 -0600 Subject: [PATCH 1/2] chore(auth): update OpenAPI specs --- packages/auth/scripts/get-op-schema.sh | 4 +- packages/open-payments/src/config.ts | 4 +- .../src/generated/auth-server-types.ts | 28 ++++----- .../src/generated/resource-server-types.ts | 58 +++++++++---------- 4 files changed, 47 insertions(+), 47 deletions(-) diff --git a/packages/auth/scripts/get-op-schema.sh b/packages/auth/scripts/get-op-schema.sh index 0fd925f39d..3e9938578d 100755 --- a/packages/auth/scripts/get-op-schema.sh +++ b/packages/auth/scripts/get-op-schema.sh @@ -9,5 +9,5 @@ while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli done OUTDIR=$( cd -P "$( dirname "$SOURCE" )/../src/openapi" >/dev/null 2>&1 && pwd ) -curl -o "$OUTDIR/schemas.yaml" https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml -curl -o "$OUTDIR/auth-server.yaml" https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/auth-server.yaml +curl -o "$OUTDIR/schemas.yaml" https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml +curl -o "$OUTDIR/auth-server.yaml" https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/auth-server.yaml diff --git a/packages/open-payments/src/config.ts b/packages/open-payments/src/config.ts index 4f8df12b59..3de5d5736b 100644 --- a/packages/open-payments/src/config.ts +++ b/packages/open-payments/src/config.ts @@ -1,7 +1,7 @@ export default { OPEN_PAYMENTS_RS_OPEN_API_URL: - 'https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/resource-server.yaml', + 'https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/resource-server.yaml', OPEN_PAYMENTS_AS_OPEN_API_URL: - 'https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/auth-server.yaml', + 'https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/auth-server.yaml', DEFAULT_REQUEST_TIMEOUT_MS: 5_000 } diff --git a/packages/open-payments/src/generated/auth-server-types.ts b/packages/open-payments/src/generated/auth-server-types.ts index ca0afe62f6..f9c05e6218 100644 --- a/packages/open-payments/src/generated/auth-server-types.ts +++ b/packages/open-payments/src/generated/auth-server-types.ts @@ -107,7 +107,7 @@ export interface components { manage: string; /** @description The number of seconds in which the access will expire. The client instance MUST NOT use the access token past this time. An RS MUST NOT accept an access token past this time. */ expires_in?: number; - access: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["access"]; + access: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["access"]; }; }; } @@ -138,7 +138,7 @@ export interface operations { content: { "application/json": { access_token: { - access: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["access"]; + access: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["access"]; }; client: components["schemas"]["client"]; interact?: components["schemas"]["interact-request"]; @@ -235,17 +235,17 @@ export interface operations { } export interface external { - "https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml": { + "https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml": { paths: {}; components: { schemas: { /** @description A description of the rights associated with this access token. */ - access: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["access-item"][]; + access: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["access-item"][]; /** @description The access associated with the access token is described using objects that each contain multiple dimensions of access. */ "access-item": - | external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["access-incoming"] - | external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["access-outgoing"] - | external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["access-quote"]; + | external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["access-incoming"] + | external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["access-outgoing"] + | external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["access-quote"]; /** access-incoming */ "access-incoming": { /** @description The type of resource request as a string. This field defines which other fields are allowed in the request object. */ @@ -276,7 +276,7 @@ export interface external { * @description A string identifier indicating a specific resource at the RS. */ identifier: string; - limits?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["limits-outgoing"]; + limits?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["limits-outgoing"]; }; /** access-quote */ "access-quote": { @@ -295,8 +295,8 @@ export interface external { * @description The value is an unsigned 64-bit integer amount, represented as a string. */ value: string; - assetCode: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["assetCode"]; - assetScale: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["assetScale"]; + assetCode: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["assetCode"]; + assetScale: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["assetScale"]; }; /** * Asset code @@ -318,10 +318,10 @@ export interface external { * @description Open Payments specific property that defines the limits under which outgoing payments can be created. */ "limits-outgoing": Partial & { - receiver?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["receiver"]; - sendAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; - receiveAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; - interval?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["interval"]; + receiver?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["receiver"]; + sendAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + receiveAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + interval?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["interval"]; }; "list-actions": "list" | "list-all"; "read-actions": "read" | "read-all"; diff --git a/packages/open-payments/src/generated/resource-server-types.ts b/packages/open-payments/src/generated/resource-server-types.ts index 2271ac1262..821760272a 100644 --- a/packages/open-payments/src/generated/resource-server-types.ts +++ b/packages/open-payments/src/generated/resource-server-types.ts @@ -118,8 +118,8 @@ export interface components { id: string; /** @description A public name for the account. This should be set by the account holder with their provider to provide a hint to counterparties as to the identity of the account holder. */ publicName?: string; - assetCode: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["assetCode"]; - assetScale: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["assetScale"]; + assetCode: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["assetCode"]; + assetScale: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["assetScale"]; /** * Format: uri * @description The URL of the authorization server endpoint for getting grants and access tokens for this payment pointer. @@ -147,8 +147,8 @@ export interface components { ilpAddress: string; /** @description The base64 url-encoded shared secret to use when establishing a STREAM connection. */ sharedSecret: string; - assetCode: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["assetCode"]; - assetScale: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["assetScale"]; + assetCode: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["assetCode"]; + assetScale: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["assetScale"]; }; /** * Incoming Payment @@ -168,9 +168,9 @@ export interface components { /** @description Describes whether the incoming payment has completed receiving fund. */ completed: boolean; /** @description The maximum amount that should be paid into the payment pointer under this incoming payment. */ - incomingAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + incomingAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; /** @description The total amount that has been paid into the payment pointer under this incoming payment. */ - receivedAmount: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + receivedAmount: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; /** * Format: date-time * @description The date and time when payments under this incoming payment will no longer be accepted. @@ -232,13 +232,13 @@ export interface components { /** @description Describes whether the payment failed to send its full amount. */ failed?: boolean; /** @description The URL of the incoming payment or ILP STREAM Connection that is being paid. */ - receiver: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["receiver"]; + receiver: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["receiver"]; /** @description The total amount that should be received by the receiver when this outgoing payment has been paid. */ - receiveAmount: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + receiveAmount: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; /** @description The total amount that should be sent when this outgoing payment has been paid. */ - sendAmount: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + sendAmount: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; /** @description The total amount that has been sent under this outgoing payment. */ - sentAmount: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + sentAmount: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; /** @description Human readable description of the outgoing payment that will be visible to the account holder and shared with the receiver. */ description?: string; /** @description A reference that can be used by external systems to reconcile this payment with their systems. E.g. An invoice number. (Optional) */ @@ -269,9 +269,9 @@ export interface components { * @description The URL of the payment pointer from which this quote's payment would be sent. */ paymentPointer: string; - receiver: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["receiver"]; - receiveAmount: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; - sendAmount: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + receiver: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["receiver"]; + receiveAmount: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + sendAmount: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; /** @description The date and time when the calculated `sendAmount` is no longer valid. */ expiresAt?: string; /** @@ -460,7 +460,7 @@ export interface operations { content: { "application/json": { /** @description The maximum amount that should be paid into the payment pointer under this incoming payment. */ - incomingAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + incomingAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; /** * Format: date-time * @description The date and time when payments into the incoming payment must no longer be accepted. @@ -573,9 +573,9 @@ export interface operations { requestBody: { content: { "application/json": { - receiver: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["receiver"]; - receiveAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; - sendAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + receiver: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["receiver"]; + receiveAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + sendAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; }; }; }; @@ -695,17 +695,17 @@ export interface operations { } export interface external { - "https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml": { + "https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml": { paths: {}; components: { schemas: { /** @description A description of the rights associated with this access token. */ - access: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["access-item"][]; + access: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["access-item"][]; /** @description The access associated with the access token is described using objects that each contain multiple dimensions of access. */ "access-item": - | external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["access-incoming"] - | external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["access-outgoing"] - | external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["access-quote"]; + | external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["access-incoming"] + | external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["access-outgoing"] + | external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["access-quote"]; /** access-incoming */ "access-incoming": { /** @description The type of resource request as a string. This field defines which other fields are allowed in the request object. */ @@ -736,7 +736,7 @@ export interface external { * @description A string identifier indicating a specific resource at the RS. */ identifier: string; - limits?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["limits-outgoing"]; + limits?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["limits-outgoing"]; }; /** access-quote */ "access-quote": { @@ -755,8 +755,8 @@ export interface external { * @description The value is an unsigned 64-bit integer amount, represented as a string. */ value: string; - assetCode: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["assetCode"]; - assetScale: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["assetScale"]; + assetCode: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["assetCode"]; + assetScale: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["assetScale"]; }; /** * Asset code @@ -778,10 +778,10 @@ export interface external { * @description Open Payments specific property that defines the limits under which outgoing payments can be created. */ "limits-outgoing": Partial & { - receiver?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["receiver"]; - sendAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; - receiveAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; - interval?: external["https://raw.githubusercontent.com/interledger/open-payments/56d441fe7f1d44f9111ae1a37de536e72407038d/openapi/schemas.yaml"]["components"]["schemas"]["interval"]; + receiver?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["receiver"]; + sendAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + receiveAmount?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["amount"]; + interval?: external["https://raw.githubusercontent.com/interledger/open-payments/b363d33038fe789e5388f04f80ddd06a4fa97093/openapi/schemas.yaml"]["components"]["schemas"]["interval"]; }; "list-actions": "list" | "list-all"; "read-actions": "read" | "read-all"; From 1f67dddf4822973a445c884babdd81dc0f852eee Mon Sep 17 00:00:00 2001 From: Brandon Wilson Date: Wed, 23 Nov 2022 07:37:04 -0600 Subject: [PATCH 2/2] fix(auth): use expires_in in grant initiation response body --- packages/auth/src/grant/routes.test.ts | 4 ++-- packages/auth/src/grant/routes.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/auth/src/grant/routes.test.ts b/packages/auth/src/grant/routes.test.ts index fd7d89ee4c..2e1fd6ca12 100644 --- a/packages/auth/src/grant/routes.test.ts +++ b/packages/auth/src/grant/routes.test.ts @@ -275,7 +275,7 @@ describe('Grant Routes', (): void => { value: expect.any(String), manage: expect.any(String), access: body.access_token.access, - expiresIn: 600 + expires_in: 600 }, continue: { access_token: { @@ -865,7 +865,7 @@ describe('Grant Routes', (): void => { type: 'incoming-payment' } ]), - expiresIn: 600 + expires_in: 600 }, continue: { access_token: { diff --git a/packages/auth/src/grant/routes.ts b/packages/auth/src/grant/routes.ts index a402ddfd84..a44c9a6bb1 100644 --- a/packages/auth/src/grant/routes.ts +++ b/packages/auth/src/grant/routes.ts @@ -427,7 +427,7 @@ function createGrantBody({ value: accessToken.value, manage: domain + `/token/${accessToken.managementId}`, access: access.map((a: Access) => accessToBody(a)), - expiresIn: accessToken.expiresIn + expires_in: accessToken.expiresIn }, continue: { access_token: {