From ee172c784eeef9befb66973b40acf3f4d8ae3d68 Mon Sep 17 00:00:00 2001 From: Kevin Leyow Date: Fri, 21 May 2021 06:25:17 -0500 Subject: [PATCH] chore: update POST /consentRequests and PUT /consentRequests/{ID} (#83) * chore: update POST /consentRequests and PUT /consentREquests/{ID} * chore: rebuild files --- docs/thirdparty-openapi3-snippets.yaml | 698 +++++++----------- src/thirdparty/index.ts | 2 - src/thirdparty/openapi.ts | 160 +--- tests/dto/thirdparty.test.ts | 31 +- .../ConsentRequestsIDPatchRequest.yaml | 2 +- .../ConsentRequestsIDPutResponseOTP.yaml | 7 +- .../ConsentRequestsIDPutResponseOTPAuth.yaml | 35 - .../ConsentRequestsIDPutResponseWeb.yaml | 7 +- .../ConsentRequestsIDPutResponseWebAuth.yaml | 41 - .../schemas/ConsentRequestsPostRequest.yaml | 10 +- .../openapi3/components/schemas/index.yaml | 4 - .../openapi3/paths/consentRequests_ID.yaml | 2 - 12 files changed, 312 insertions(+), 687 deletions(-) delete mode 100644 thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseOTPAuth.yaml delete mode 100644 thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseWebAuth.yaml diff --git a/docs/thirdparty-openapi3-snippets.yaml b/docs/thirdparty-openapi3-snippets.yaml index e302293f..b24bda81 100644 --- a/docs/thirdparty-openapi3-snippets.yaml +++ b/docs/thirdparty-openapi3-snippets.yaml @@ -31,7 +31,7 @@ paths: oneOf: - title: AuthorizationChannelType type: string - enum: &ref_70 + enum: &ref_68 - OTP - QRCODE - U2F @@ -54,7 +54,7 @@ paths: resend of the authentication value. type: string - enum: &ref_71 + enum: &ref_69 - ENTERED - REJECTED - RESEND @@ -318,7 +318,7 @@ paths: title: QuotesIDPutResponse type: object description: 'The object sent in the PUT /quotes/{ID} callback.' - properties: &ref_65 + properties: &ref_63 transferAmount: title: Money type: object @@ -424,7 +424,7 @@ paths: title: Extension type: object description: Data model for the complex type Extension. - properties: &ref_72 + properties: &ref_70 key: title: ExtensionKey type: string @@ -437,7 +437,7 @@ paths: minLength: 1 maxLength: 128 description: Extension value. - required: &ref_73 + required: &ref_71 - key - value minItems: 1 @@ -445,7 +445,7 @@ paths: description: Number of Extension elements. required: &ref_3 - extension - required: &ref_66 + required: &ref_64 - transferAmount - expiration - ilpPacket @@ -475,7 +475,7 @@ paths: - title: PartyResult type: object description: Data model for the complex type PartyResult. - properties: &ref_75 + properties: &ref_73 partyId: description: Data model for the complex type PartyIdInfo. title: PartyIdInfo @@ -484,7 +484,7 @@ paths: partyIdType: title: PartyIdType type: string - enum: &ref_74 + enum: &ref_72 - MSISDN - EMAIL - PERSONAL_ID @@ -675,12 +675,12 @@ paths: required: &ref_14 - errorCode - errorDescription - required: &ref_76 + required: &ref_74 - partyId - title: ParticipantsPostRequest type: object description: The object sent in the POST /participants request. - properties: &ref_77 + properties: &ref_75 requestId: title: CorrelationId type: string @@ -722,7 +722,7 @@ paths: minLength: 3 maxLength: 3 enum: *ref_6 - required: &ref_78 + required: &ref_76 - requestId - partyList - title: PartiesTypeIDPutResponse @@ -738,7 +738,7 @@ paths: newly added `accounts` property. - properties: &ref_85 + properties: &ref_83 party: title: Party type: object @@ -748,14 +748,14 @@ paths: title: AccountList type: object description: Data model for the complex type AccountList. - properties: &ref_81 + properties: &ref_79 account: type: array items: title: Account type: object description: Data model for the complex type Account. - properties: &ref_79 + properties: &ref_77 address: title: AccountAddress type: string @@ -808,12 +808,12 @@ paths: enabled. For example, if Java is used, the flag UNICODE_CHARACTER_CLASS must be enabled to allow Unicode characters. - required: &ref_80 + required: &ref_78 - currency minItems: 1 maxItems: 32 description: Accounts associated with the Party. - required: &ref_82 + required: &ref_80 - account partyIdInfo: title: PartyIdInfo @@ -842,14 +842,14 @@ paths: title: PartyPersonalInfo type: object description: Data model for the complex type PartyPersonalInfo. - properties: &ref_84 + properties: &ref_82 complexName: title: PartyComplexName type: object description: >- Data model for the complex type PartyComplexName. - properties: &ref_83 + properties: &ref_81 firstName: title: FirstName type: string @@ -883,11 +883,11 @@ paths: example: '1966-06-16' required: &ref_8 - partyIdInfo - required: &ref_86 + required: &ref_84 - party - title: ServiceType type: string - enum: &ref_87 + enum: &ref_85 - THIRD_PARTY_DFSP description: >- Below are the allowed values for the enumeration ServiceType @@ -899,7 +899,7 @@ paths: description: >- The object sent in the PATCH /thirdpartyRequests/transactions/{ID} callback. - properties: &ref_63 + properties: &ref_61 transactionId: title: CorrelationId type: string @@ -918,7 +918,7 @@ paths: transactionRequestState: title: TransactionRequestState type: string - enum: &ref_62 + enum: &ref_60 - RECEIVED - PENDING - ACCEPTED @@ -958,14 +958,14 @@ paths: - REJECTED - Payee FSP has failed to perform the transaction. example: RECEIVED - required: &ref_64 + required: &ref_62 - transactionId - transactionRequestState - transactionState - title: TransactionRequestsPostRequest type: object description: The object sent in the POST /transactionRequests request. - properties: &ref_93 + properties: &ref_91 transactionRequestId: title: CorrelationId type: string @@ -1003,11 +1003,11 @@ paths: title: TransactionType type: object description: Data model for the complex type TransactionType. - properties: &ref_58 + properties: &ref_56 scenario: title: TransactionScenario type: string - enum: &ref_88 + enum: &ref_86 - DEPOSIT - WITHDRAWAL - TRANSFER @@ -1054,7 +1054,7 @@ paths: initiator: title: TransactionInitiator type: string - enum: &ref_89 + enum: &ref_87 - PAYER - PAYEE description: >- @@ -1075,7 +1075,7 @@ paths: initiatorType: title: TransactionInitiatorType type: string - enum: &ref_90 + enum: &ref_88 - CONSUMER - AGENT - BUSINESS @@ -1098,7 +1098,7 @@ paths: title: Refund type: object description: Data model for the complex type Refund. - properties: &ref_91 + properties: &ref_89 originalTransactionId: title: CorrelationId type: string @@ -1122,7 +1122,7 @@ paths: maxLength: 128 description: Reason for the refund. example: Free text indicating reason for the refund. - required: &ref_92 + required: &ref_90 - originalTransactionId balanceOfPayments: title: BalanceOfPayments @@ -1135,7 +1135,7 @@ paths: digits only. Negative numbers are not allowed. A leading zero is not allowed. example: '123' - required: &ref_59 + required: &ref_57 - scenario - initiator - initiatorType @@ -1195,7 +1195,7 @@ paths: optional list of extensions, specific to deployment. properties: *ref_2 required: *ref_3 - required: &ref_94 + required: &ref_92 - transactionRequestId - payee - payer @@ -1613,7 +1613,7 @@ paths: title: AccountsIDPutResponse type: object description: 'The object sent in a `PUT /accounts/{ID}` request.' - properties: &ref_95 + properties: &ref_93 accounts: type: array items: @@ -1664,7 +1664,7 @@ paths: - accountNickname - id - currency - required: &ref_96 + required: &ref_94 - accounts example: - accountNickname: dfspa.user.nickname1 @@ -1830,14 +1830,14 @@ paths: description: >- Data model for the complex type object that contains ErrorInformation. - properties: &ref_52 + properties: &ref_50 errorInformation: title: ErrorInformation type: object description: Data model for the complex type ErrorInformation. properties: *ref_13 required: *ref_14 - required: &ref_53 + required: &ref_51 - errorInformation responses: '200': @@ -1957,12 +1957,12 @@ paths: title: AuthorizationsIDPutResponse type: object description: 'The object sent in the PUT /authorizations/{ID} callback.' - properties: &ref_100 + properties: &ref_98 authenticationInfo: title: AuthenticationInfo type: object description: Data model for the complex type AuthenticationInfo. - properties: &ref_67 + properties: &ref_65 authentication: title: AuthenticationType type: string @@ -1979,7 +1979,7 @@ paths: stream. authenticationValue: title: AuthenticationValue - anyOf: &ref_99 + anyOf: &ref_97 - title: OtpValue type: string pattern: '^\d{3,10}$' @@ -1999,7 +1999,7 @@ paths: U2F challenge-response, where payer FSP verifies if the response provided by end-user device matches the previously registered key. - properties: &ref_97 + properties: &ref_95 pinValue: allOf: - title: U2FPIN @@ -2027,20 +2027,20 @@ paths: description: >- Sequential counter used for cloning detection. Present only for U2F authentication. - required: &ref_98 + required: &ref_96 - pinValue - counter description: >- Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type. - required: &ref_68 + required: &ref_66 - authentication - authenticationValue responseType: title: AuthorizationResponse type: string - enum: &ref_69 + enum: &ref_67 - ENTERED - REJECTED - RESEND @@ -2054,7 +2054,7 @@ paths: - RESEND - Consumer requested to resend the authentication value. example: ENTERED - required: &ref_101 + required: &ref_99 - responseType '400': description: Bad Request @@ -2298,8 +2298,8 @@ paths: title: ConsentRequestsPostRequest type: object description: The object sent in a `POST /consentRequests` request. - properties: &ref_104 - id: + properties: &ref_102 + consentRequestId: title: CorrelationId type: string pattern: >- @@ -2313,11 +2313,9 @@ paths: reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). example: b51ec534-ee48-4575-b6a9-ead2955b8069 - initiatorId: + userId: type: string - description: >- - The id of the PISP who will initiate transactions on a - user's behalf. + description: ID used to associate request with GET /accounts request. scopes: type: array items: @@ -2349,7 +2347,7 @@ paths: items: title: ConsentScopeType type: string - enum: &ref_102 + enum: &ref_100 - accounts.getBalance - accounts.transfer description: > @@ -2368,7 +2366,7 @@ paths: items: title: ConsentRequestChannelType type: string - enum: &ref_103 + enum: &ref_101 - WEB - OTP description: | @@ -2380,9 +2378,9 @@ paths: description: >- The callback uri that the user will be redirected to after completing the WEB auth channel. - required: &ref_105 - - id - - initiatorId + required: &ref_103 + - consentRequestId + - userId - scopes - authChannels - callbackUri @@ -2576,12 +2574,22 @@ paths: place where the user can prove their identity (e.g., by logging in). - properties: &ref_106 - initiatorId: + properties: &ref_105 + consentRequestId: + title: CorrelationId type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: >- - The id of the PISP who will initiate transactions on a - user's behalf. + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 scopes: type: array items: @@ -2600,7 +2608,7 @@ paths: items: title: ConsentRequestChannelTypeWeb type: string - enum: &ref_50 + enum: &ref_104 - WEB description: > The web auth channel being used for PUT @@ -2615,75 +2623,13 @@ paths: description: >- The callback uri that the pisp app redirects to for user to complete their login. - required: &ref_107 - - initiatorId + required: &ref_106 + - consentRequestId - scopes - authChannels - callbackUri - authUri additionalProperties: false - - title: ConsentRequestsIDPutResponseWebAuth - type: object - description: > - The object sent in a `PUT /consentRequests/{ID}` request. - - - Schema used in the authentication phase of the account - linking flow, - - the user is expected to prove their identity to the DFSP by - passing a OTP - - or secret to the PISP. - properties: &ref_108 - initiatorId: - type: string - description: >- - The id of the PISP who will initiate transactions on a - user's behalf. - scopes: - type: array - items: - title: Scope - type: object - description: Scope + Account Identifier mapping for a Consent. - example: | - { - accountId: "dfsp.username.5678", - actions: [ "accounts.transfer", "accounts.getBalance" ] - } - properties: *ref_48 - required: *ref_49 - authChannels: - type: array - items: - title: ConsentRequestChannelTypeWeb - type: string - enum: *ref_50 - description: > - The web auth channel being used for PUT - consentRequest/{ID} request. - callbackUri: - type: string - description: >- - The callback uri that the user will be redirected to - after completing the WEB auth channel. - authUri: - type: string - description: >- - The callback uri that the pisp app redirects to for user - to complete their login. - authToken: - type: string - description: The Auth token from the OTP or redirect to pisp app. - required: &ref_109 - - initiatorId - - scopes - - authChannels - - callbackUri - - authUri - - authToken - additionalProperties: false - title: ConsentRequestsIDPutResponseOTP type: object description: > @@ -2692,12 +2638,22 @@ paths: Schema used in the request consent phase of the account linking OTP/SMS flow. - properties: &ref_110 - initiatorId: + properties: &ref_108 + consentRequestId: + title: CorrelationId type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: >- - The id of the PISP who will initiate transactions on a - user's behalf. + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 scopes: type: array items: @@ -2716,7 +2672,7 @@ paths: items: title: ConsentRequestChannelTypeOTP type: string - enum: &ref_51 + enum: &ref_107 - OTP description: > The OTP auth channel being used for PUT @@ -2726,67 +2682,11 @@ paths: description: >- The callback uri that the user will be redirected to after completing the WEB auth channel. - required: &ref_111 - - initiatorId - - scopes - - authChannels - - callbackUri - additionalProperties: false - - title: ConsentRequestsIDPutResponseOTPAuth - type: object - description: > - The object sent in a `PUT /consentRequests/{ID}` request. - - - Schema used in the authentication phase of the account - linking flow, - - the user is expected to prove their identity to the DFSP by - passing a OTP - - or secret to the PISP. - properties: &ref_112 - initiatorId: - type: string - description: >- - The id of the PISP who will initiate transactions on a - user's behalf. - scopes: - type: array - items: - title: Scope - type: object - description: Scope + Account Identifier mapping for a Consent. - example: | - { - accountId: "dfsp.username.5678", - actions: [ "accounts.transfer", "accounts.getBalance" ] - } - properties: *ref_48 - required: *ref_49 - authChannels: - type: array - items: - title: ConsentRequestChannelTypeOTP - type: string - enum: *ref_51 - description: > - The OTP auth channel being used for PUT - consentRequest/{ID} request. - callbackUri: - type: string - description: >- - The callback uri that the user will be redirected to - after completing the WEB auth channel. - authToken: - type: string - description: The Auth token from the OTP or redirect to pisp app. - required: &ref_113 - - initiatorId + required: &ref_109 + - consentRequestId - scopes - authChannels - callbackUri - - authToken additionalProperties: false responses: '202': @@ -2840,16 +2740,10 @@ paths: title: ConsentRequestsIDPatchRequest type: object description: 'The object sent in a `PATCH /consentRequests/{ID}` request.' - properties: &ref_114 + properties: &ref_110 authToken: - title: OtpValue type: string - pattern: '^\d{3,10}$' - description: >- - The API data type OtpValue is a JSON String of 3 to 10 - characters, consisting of digits only. Negative numbers are - not allowed. One or more leading zeros are allowed. - required: &ref_115 + required: &ref_111 - authToken responses: '202': @@ -3009,8 +2903,8 @@ paths: description: >- Data model for the complex type object that contains ErrorInformation. - properties: *ref_52 - required: *ref_53 + properties: *ref_50 + required: *ref_51 responses: '200': description: OK @@ -3168,7 +3062,7 @@ paths: title: ConsentPostRequest type: object description: The object sent in a `POST /consents` request. - properties: &ref_116 + properties: &ref_112 consentId: allOf: - title: CorrelationId @@ -3221,7 +3115,7 @@ paths: } properties: *ref_48 required: *ref_49 - required: &ref_117 + required: &ref_113 - consentId - consentRequestId - scopes @@ -3440,21 +3334,21 @@ paths: Used in the "Register Credential" part of the Account linking flow. type: object - properties: &ref_133 + properties: &ref_129 credential: type: object properties: status: title: ConsentStatusType type: string - enum: &ref_132 + enum: &ref_128 - VERIFIED description: | The status of the Consent. - "VERIFIED" - The Consent is valid and verified. required: - status - required: &ref_134 + required: &ref_130 - credential - title: ConsentsIDPatchResponseRevoked description: | @@ -3463,11 +3357,11 @@ paths: Sent to both the PISP and DFSP when a consent is revoked. Used in the "Unlinking" part of the Account Unlinking flow. type: object - properties: &ref_136 + properties: &ref_132 status: title: ConsentStatusType type: string - enum: &ref_135 + enum: &ref_131 - REVOKED description: > The status of the Consent. @@ -3492,7 +3386,7 @@ paths: "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time zone, same as UTC). example: '2016-05-24T08:38:08.699-04:00' - required: &ref_137 + required: &ref_133 - status - revokedAt parameters: @@ -3578,7 +3472,7 @@ paths: Called by a `PISP` to after signing a challenge. Sent to an `auth-service` for verification. - properties: &ref_120 + properties: &ref_116 requestId: allOf: - title: CorrelationId @@ -3645,14 +3539,14 @@ paths: ever be PENDING when updating a credential. - properties: &ref_118 + properties: &ref_114 id: type: string description: The id of a Credential. type: title: CredentialType type: string - enum: &ref_54 + enum: &ref_52 - FIDO description: | The type of the Credential. @@ -3667,7 +3561,7 @@ paths: type: object description: | The challenge that has been signed by a PISP. - properties: &ref_55 + properties: &ref_53 payload: type: string description: >- @@ -3679,7 +3573,7 @@ paths: Base64 encoded binary string or result of the payload signed by the PISP using the private key. - required: &ref_56 + required: &ref_54 - payload - signature additionalProperties: false @@ -3688,14 +3582,14 @@ paths: description: >- Base64 encoded bytes - The public key of the Public/Private keypair. - required: &ref_119 + required: &ref_115 - id - type - status - challenge - payload additionalProperties: false - required: &ref_121 + required: &ref_117 - requestId - participantId - initiatorId @@ -3713,7 +3607,7 @@ paths: Called by a `auth-service` to request PISP to add the credential details. - properties: &ref_126 + properties: &ref_122 requestId: allOf: - title: CorrelationId @@ -3780,11 +3674,11 @@ paths: ever be PENDING when updating a credential. - properties: &ref_124 + properties: &ref_120 type: title: CredentialType type: string - enum: *ref_54 + enum: *ref_52 description: | The type of the Credential. - "FIDO" - A FIDO public/private keypair. @@ -3801,21 +3695,21 @@ paths: description: > The challenge issued by a DFSP that must be answered by the PISP. - properties: &ref_122 + properties: &ref_118 payload: type: string description: >- Base64 encoded binary of the challenge that must be answered by the PISP. - required: &ref_123 + required: &ref_119 - payload additionalProperties: false - required: &ref_125 + required: &ref_121 - type - status - challenge additionalProperties: false - required: &ref_127 + required: &ref_123 - requestId - participantId - initiatorId @@ -3832,7 +3726,7 @@ paths: Called by a `auth-service` to notify a DFSP and PISP that a credential has been verified and registered. - properties: &ref_130 + properties: &ref_126 requestId: allOf: - title: CorrelationId @@ -3899,14 +3793,14 @@ paths: ever be VERIFIED when updating a credential. - properties: &ref_128 + properties: &ref_124 id: type: string description: The id of a Credential. type: title: CredentialType type: string - enum: *ref_54 + enum: *ref_52 description: | The type of the Credential. - "FIDO" - A FIDO public/private keypair. @@ -3922,20 +3816,20 @@ paths: type: object description: | The challenge that has been signed by a PISP. - properties: *ref_55 - required: *ref_56 + properties: *ref_53 + required: *ref_54 additionalProperties: false payload: type: string description: >- Base64 encoded bytes - The public key of the Public/Private keypair. - required: &ref_129 + required: &ref_125 - type - status - challenge additionalProperties: false - required: &ref_131 + required: &ref_127 - requestId - participantId - initiatorId @@ -4158,8 +4052,8 @@ paths: description: >- Data model for the complex type object that contains ErrorInformation. - properties: *ref_52 - required: *ref_53 + properties: *ref_50 + required: *ref_51 responses: '200': description: OK @@ -4327,15 +4221,15 @@ paths: description: | A credential used to allow a user to prove their identity and access to an account with a DFSP. - properties: &ref_138 + properties: &ref_134 type: title: CredentialType type: string - enum: *ref_54 + enum: *ref_52 description: | The type of the Credential. - "FIDO" - A FIDO public/private keypair. - required: &ref_139 + required: &ref_135 - type example: type: FIDO @@ -4379,7 +4273,7 @@ paths: - name: ServiceType in: path required: true - schema: &ref_57 + schema: &ref_55 type: string description: 'The type of the service identifier. For example, `THIRD_PARTY_DFSP`' - name: Date @@ -4551,7 +4445,7 @@ paths: title: ServicesServiceTypePutResponse type: object description: 'The object sent in a `PUT /services/{ServiceType}` request.' - properties: &ref_140 + properties: &ref_136 providers: type: array items: @@ -4560,7 +4454,7 @@ paths: minLength: 1 maxLength: 32 description: FSP identifier. - required: &ref_141 + required: &ref_137 - providers responses: '200': @@ -4602,7 +4496,7 @@ paths: - name: ServiceType in: path required: true - schema: *ref_57 + schema: *ref_55 description: 'The type of the service identifier. For example, `THIRD_PARTY_DFSP`' - name: Content-Length in: header @@ -4719,8 +4613,8 @@ paths: description: >- Data model for the complex type object that contains ErrorInformation. - properties: *ref_52 - required: *ref_53 + properties: *ref_50 + required: *ref_51 responses: '200': description: OK @@ -4872,7 +4766,7 @@ paths: description: >- The object sent in the POST /thirdpartyRequests/transactions request. - properties: &ref_60 + properties: &ref_58 transactionRequestId: allOf: - title: CorrelationId @@ -4909,11 +4803,11 @@ paths: - title: PartyIdInfo type: object description: Data model for the complex type PartyIdInfo. - properties: &ref_143 + properties: &ref_139 partyIdType: title: PartyIdTypeTPLink type: string - enum: &ref_142 + enum: &ref_138 - THIRD_PARTY_LINK description: > This is a variant based on FSPIOP `PartyIdType` @@ -4956,7 +4850,7 @@ paths: optional list of extensions, specific to deployment. properties: *ref_2 required: *ref_3 - required: &ref_144 + required: &ref_140 - partyIdType - partyIdentifier description: >- @@ -4966,7 +4860,7 @@ paths: allOf: - title: AmountType type: string - enum: &ref_145 + enum: &ref_141 - SEND - RECEIVE description: >- @@ -4995,8 +4889,8 @@ paths: - title: TransactionType type: object description: Data model for the complex type TransactionType. - properties: *ref_58 - required: *ref_59 + properties: *ref_56 + required: *ref_57 description: Type of transaction. expiration: type: string @@ -5005,7 +4899,7 @@ paths: It can be set to get a quick failure in case the peer FSP takes too long to respond. example: '2016-05-24T08:38:08.699-04:00' - required: &ref_61 + required: &ref_59 - transactionRequestId - payee - payer @@ -5089,8 +4983,8 @@ paths: description: >- The object sent in the POST /thirdpartyRequests/transactions request. - properties: *ref_60 - required: *ref_61 + properties: *ref_58 + required: *ref_59 example: transactionRequestId: 8d34f91d-d078-4077-8263-2c047876fcf6 payee: @@ -5338,7 +5232,7 @@ paths: description: >- The object sent in the PUT /thirdPartyRequests/transactions/{ID} request. - properties: &ref_146 + properties: &ref_142 transactionId: title: CorrelationId type: string @@ -5356,7 +5250,7 @@ paths: transactionRequestState: title: TransactionRequestState type: string - enum: *ref_62 + enum: *ref_60 description: >- Below are the allowed values for the enumeration. @@ -5370,7 +5264,7 @@ paths: - REJECTED - Payer has rejected the transaction. example: RECEIVED - required: &ref_147 + required: &ref_143 - transactionId - transactionRequestState example: @@ -5453,8 +5347,8 @@ paths: description: >- The object sent in the PATCH /thirdpartyRequests/transactions/{ID} callback. - properties: *ref_63 - required: *ref_64 + properties: *ref_61 + required: *ref_62 example: transactionId: 11111111-0000-0000-0000-000000000000 transactionRequestState: ACCEPTED @@ -5626,8 +5520,8 @@ paths: description: >- Data model for the complex type object that contains ErrorInformation. - properties: *ref_52 - required: *ref_53 + properties: *ref_50 + required: *ref_51 responses: '200': description: OK @@ -5794,7 +5688,7 @@ paths: description: >- The object sent in the POST /thirdpartyRequests/transactions/{id}/authorizations request. - properties: &ref_150 + properties: &ref_146 challenge: type: string description: Base64 encoded binary string - the original challenge. @@ -5853,7 +5747,7 @@ paths: description: >- The status of the authorization. This MUST be PENDING for a POST request - required: &ref_151 + required: &ref_147 - challenge - value - consentId @@ -5926,7 +5820,7 @@ paths: description: >- The object sent in the PUT /thirdpartyRequests/transactions/{id}/authorizations request. - properties: &ref_148 + properties: &ref_144 challenge: type: string description: Base64 encoded binary string - the original challenge. @@ -5985,7 +5879,7 @@ paths: description: >- The status of the authorization. This value must be `VERIFIED` for a PUT request. - required: &ref_149 + required: &ref_145 - challenge - value - consentId @@ -6051,7 +5945,7 @@ paths: title: ThirdpartyRequestsAuthorizationsPostRequest description: POST /thirdpartyRequests/authorizations request object. type: object - properties: &ref_152 + properties: &ref_148 authorizationRequestId: title: CorrelationId type: string @@ -6087,15 +5981,15 @@ paths: title: QuotesIDPutResponse type: object description: 'The object sent in the PUT /quotes/{ID} callback.' - properties: *ref_65 - required: *ref_66 + properties: *ref_63 + required: *ref_64 transactionType: title: TransactionType type: object description: Data model for the complex type TransactionType. - properties: *ref_58 - required: *ref_59 - required: &ref_153 + properties: *ref_56 + required: *ref_57 + required: &ref_149 - authorizationRequestId - transactionRequestId - challenge @@ -6190,17 +6084,17 @@ paths: description: >- The object sent in the PUT /thirdpartyRequests/authorizations/{ID} callback. - properties: &ref_154 + properties: &ref_150 authenticationInfo: title: AuthenticationInfo type: object description: Data model for the complex type AuthenticationInfo. - properties: *ref_67 - required: *ref_68 + properties: *ref_65 + required: *ref_66 responseType: title: AuthorizationResponse type: string - enum: *ref_69 + enum: *ref_67 description: >- Below are the allowed values for the enumeration. @@ -6211,7 +6105,7 @@ paths: - RESEND - Consumer requested to resend the authentication value. example: ENTERED - required: &ref_155 + required: &ref_151 - authenticationInfo - responseType example: @@ -6398,8 +6292,8 @@ paths: description: >- Data model for the complex type object that contains ErrorInformation. - properties: *ref_52 - required: *ref_53 + properties: *ref_50 + required: *ref_51 responses: '200': description: OK @@ -6565,7 +6459,7 @@ paths: description: >- The object sent in the POST /thirdpartyRequests/verifications request. - properties: &ref_156 + properties: &ref_152 verificationRequestId: allOf: - title: CorrelationId @@ -6592,12 +6486,12 @@ paths: title: AuthenticationInfo type: object description: Data model for the complex type AuthenticationInfo. - properties: *ref_67 - required: *ref_68 + properties: *ref_65 + required: *ref_66 responseType: title: AuthorizationResponse type: string - enum: *ref_69 + enum: *ref_67 description: >- Below are the allowed values for the enumeration. @@ -6629,7 +6523,7 @@ paths: credential with which to verify the signed challenge against. - required: &ref_157 + required: &ref_153 - verificationRequestId - challenge - value @@ -6819,13 +6713,13 @@ paths: description: >- The object sent in the PUT /thirdpartyRequests/verifications/{ID} request. - properties: &ref_158 + properties: &ref_154 authenticationResponse: type: string enum: - VERIFIED description: The verification passed - required: &ref_159 + required: &ref_155 - authenticationResponse example: authenticationResponse: VERIFIED @@ -6997,8 +6891,8 @@ paths: description: >- Data model for the complex type object that contains ErrorInformation. - properties: *ref_52 - required: *ref_53 + properties: *ref_50 + required: *ref_51 responses: '200': description: OK @@ -7039,7 +6933,7 @@ components: AuthorizationChannelType: title: AuthorizationChannelType type: string - enum: *ref_70 + enum: *ref_68 description: > Below are the allowed values for the enumeration AuthorizationChannelType. @@ -7056,7 +6950,7 @@ components: authentication value, rejected the transaction, or requested a resend of the authentication value. type: string - enum: *ref_71 + enum: *ref_69 AuthenticationType: title: AuthenticationType type: string @@ -7188,8 +7082,8 @@ components: title: Extension type: object description: Data model for the complex type Extension. - properties: *ref_72 - required: *ref_73 + properties: *ref_70 + required: *ref_71 ExtensionList: title: ExtensionList type: object @@ -7202,8 +7096,8 @@ components: title: QuotesIDPutResponse type: object description: 'The object sent in the PUT /quotes/{ID} callback.' - properties: *ref_65 - required: *ref_66 + properties: *ref_63 + required: *ref_64 AuthorizationsPostRequest: title: AuthorizationsPostRequest description: POST /authorizations request object. @@ -7228,7 +7122,7 @@ components: PartyIdType: title: PartyIdType type: string - enum: *ref_74 + enum: *ref_72 description: > This is a variant based on FSPIOP `PartyIdType` specification. @@ -7382,14 +7276,14 @@ components: title: PartyResult type: object description: Data model for the complex type PartyResult. - properties: *ref_75 - required: *ref_76 + properties: *ref_73 + required: *ref_74 ParticipantsPostRequest: title: ParticipantsPostRequest type: object description: The object sent in the POST /participants request. - properties: *ref_77 - required: *ref_78 + properties: *ref_75 + required: *ref_76 AccountAddress: title: AccountAddress type: string @@ -7426,14 +7320,14 @@ components: title: Account type: object description: Data model for the complex type Account. - properties: *ref_79 - required: *ref_80 + properties: *ref_77 + required: *ref_78 AccountList: title: AccountList type: object description: Data model for the complex type AccountList. - properties: *ref_81 - required: *ref_82 + properties: *ref_79 + required: *ref_80 MerchantClassificationCode: title: MerchantClassificationCode type: string @@ -7476,7 +7370,7 @@ components: title: PartyComplexName type: object description: Data model for the complex type PartyComplexName. - properties: *ref_83 + properties: *ref_81 DateOfBirth: title: DateofBirth (type Date) type: string @@ -7488,7 +7382,7 @@ components: title: PartyPersonalInfo type: object description: Data model for the complex type PartyPersonalInfo. - properties: *ref_84 + properties: *ref_82 Party: title: Party type: object @@ -7508,12 +7402,12 @@ components: Main difference being that it returns a `Party` with the newly added `accounts` property. - properties: *ref_85 - required: *ref_86 + properties: *ref_83 + required: *ref_84 ServiceType: title: ServiceType type: string - enum: *ref_87 + enum: *ref_85 description: >- Below are the allowed values for the enumeration ServiceType @@ -7522,7 +7416,7 @@ components: TransactionRequestState: title: TransactionRequestState type: string - enum: *ref_62 + enum: *ref_60 description: |- Below are the allowed values for the enumeration. - RECEIVED - Payer FSP has received the transaction from the Payee FSP. @@ -7547,12 +7441,12 @@ components: description: >- The object sent in the PATCH /thirdpartyRequests/transactions/{ID} callback. - properties: *ref_63 - required: *ref_64 + properties: *ref_61 + required: *ref_62 TransactionScenario: title: TransactionScenario type: string - enum: *ref_88 + enum: *ref_86 description: >- Below are the allowed values for the enumeration. @@ -7588,7 +7482,7 @@ components: TransactionInitiator: title: TransactionInitiator type: string - enum: *ref_89 + enum: *ref_87 description: >- Below are the allowed values for the enumeration. @@ -7604,7 +7498,7 @@ components: TransactionInitiatorType: title: TransactionInitiatorType type: string - enum: *ref_90 + enum: *ref_88 description: |- Below are the allowed values for the enumeration. - CONSUMER - Consumer is the initiator of the transaction. @@ -7623,8 +7517,8 @@ components: title: Refund type: object description: Data model for the complex type Refund. - properties: *ref_91 - required: *ref_92 + properties: *ref_89 + required: *ref_90 BalanceOfPayments: title: BalanceOfPayments type: string @@ -7639,14 +7533,14 @@ components: title: TransactionType type: object description: Data model for the complex type TransactionType. - properties: *ref_58 - required: *ref_59 + properties: *ref_56 + required: *ref_57 TransactionRequestsPostRequest: title: TransactionRequestsPostRequest type: object description: The object sent in the POST /transactionRequests request. - properties: *ref_93 - required: *ref_94 + properties: *ref_91 + required: *ref_92 ErrorInformationResponse: title: ErrorInformationResponse type: object @@ -7658,14 +7552,14 @@ components: title: AccountsIDPutResponse type: object description: 'The object sent in a `PUT /accounts/{ID}` request.' - properties: *ref_95 - required: *ref_96 + properties: *ref_93 + required: *ref_94 ErrorInformationObject: title: ErrorInformationObject type: object description: Data model for the complex type object that contains ErrorInformation. - properties: *ref_52 - required: *ref_53 + properties: *ref_50 + required: *ref_51 OtpValue: title: OtpValue type: string @@ -7695,11 +7589,11 @@ components: description: > U2F challenge-response, where payer FSP verifies if the response provided by end-user device matches the previously registered key. - properties: *ref_97 - required: *ref_98 + properties: *ref_95 + required: *ref_96 AuthenticationValue: title: AuthenticationValue - anyOf: *ref_99 + anyOf: *ref_97 description: >- Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type. @@ -7707,12 +7601,12 @@ components: title: AuthenticationInfo type: object description: Data model for the complex type AuthenticationInfo. - properties: *ref_67 - required: *ref_68 + properties: *ref_65 + required: *ref_66 AuthorizationResponse: title: AuthorizationResponse type: string - enum: *ref_69 + enum: *ref_67 description: |- Below are the allowed values for the enumeration. - ENTERED - Consumer entered the authentication value. @@ -7723,12 +7617,12 @@ components: title: AuthorizationsIDPutResponse type: object description: 'The object sent in the PUT /authorizations/{ID} callback.' - properties: *ref_100 - required: *ref_101 + properties: *ref_98 + required: *ref_99 ConsentScopeType: title: ConsentScopeType type: string - enum: *ref_102 + enum: *ref_100 description: | The scopes requested for a ConsentRequest. - "accounts.getBalance" - Get the balance of a given account. @@ -7747,7 +7641,7 @@ components: ConsentRequestChannelType: title: ConsentRequestChannelType type: string - enum: *ref_103 + enum: *ref_101 description: | The auth channel being used for the consentRequest. - "WEB" - The Web auth channel. @@ -7756,12 +7650,12 @@ components: title: ConsentRequestsPostRequest type: object description: The object sent in a `POST /consentRequests` request. - properties: *ref_104 - required: *ref_105 + properties: *ref_102 + required: *ref_103 ConsentRequestChannelTypeWeb: title: ConsentRequestChannelTypeWeb type: string - enum: *ref_50 + enum: *ref_104 description: | The web auth channel being used for PUT consentRequest/{ID} request. ConsentRequestsIDPutResponseWeb: @@ -7779,29 +7673,13 @@ components: supposed user should be redirected. This URL should be a place where the user can prove their identity (e.g., by logging in). - properties: *ref_106 - required: *ref_107 - additionalProperties: false - ConsentRequestsIDPutResponseWebAuth: - title: ConsentRequestsIDPutResponseWebAuth - type: object - description: > - The object sent in a `PUT /consentRequests/{ID}` request. - - - Schema used in the authentication phase of the account linking flow, - - the user is expected to prove their identity to the DFSP by passing a - OTP - - or secret to the PISP. - properties: *ref_108 - required: *ref_109 + properties: *ref_105 + required: *ref_106 additionalProperties: false ConsentRequestChannelTypeOTP: title: ConsentRequestChannelTypeOTP type: string - enum: *ref_51 + enum: *ref_107 description: | The OTP auth channel being used for PUT consentRequest/{ID} request. ConsentRequestsIDPutResponseOTP: @@ -7813,41 +7691,25 @@ components: Schema used in the request consent phase of the account linking OTP/SMS flow. - properties: *ref_110 - required: *ref_111 - additionalProperties: false - ConsentRequestsIDPutResponseOTPAuth: - title: ConsentRequestsIDPutResponseOTPAuth - type: object - description: > - The object sent in a `PUT /consentRequests/{ID}` request. - - - Schema used in the authentication phase of the account linking flow, - - the user is expected to prove their identity to the DFSP by passing a - OTP - - or secret to the PISP. - properties: *ref_112 - required: *ref_113 + properties: *ref_108 + required: *ref_109 additionalProperties: false ConsentRequestsIDPatchRequest: title: ConsentRequestsIDPatchRequest type: object description: 'The object sent in a `PATCH /consentRequests/{ID}` request.' - properties: *ref_114 - required: *ref_115 + properties: *ref_110 + required: *ref_111 ConsentsPostRequest: title: ConsentPostRequest type: object description: The object sent in a `POST /consents` request. - properties: *ref_116 - required: *ref_117 + properties: *ref_112 + required: *ref_113 CredentialType: title: CredentialType type: string - enum: *ref_54 + enum: *ref_52 description: | The type of the Credential. - "FIDO" - A FIDO public/private keypair. @@ -7856,8 +7718,8 @@ components: type: object description: | The challenge that has been signed by a PISP. - properties: *ref_55 - required: *ref_56 + properties: *ref_53 + required: *ref_54 additionalProperties: false SignedCredential: title: SignedCredential @@ -7875,8 +7737,8 @@ components: when updating a credential. - properties: *ref_118 - required: *ref_119 + properties: *ref_114 + required: *ref_115 additionalProperties: false ConsentsIDPutResponseSigned: title: ConsentsIDPutResponseSigned @@ -7890,15 +7752,15 @@ components: Called by a `PISP` to after signing a challenge. Sent to an `auth-service` for verification. - properties: *ref_120 - required: *ref_121 + properties: *ref_116 + required: *ref_117 CredentialChallengeUnsigned: title: CredentialChallengeSigned type: object description: | The challenge issued by a DFSP that must be answered by the PISP. - properties: *ref_122 - required: *ref_123 + properties: *ref_118 + required: *ref_119 additionalProperties: false UnsignedCredential: title: UnsignedCredential @@ -7916,8 +7778,8 @@ components: when updating a credential. - properties: *ref_124 - required: *ref_125 + properties: *ref_120 + required: *ref_121 additionalProperties: false ConsentsIDPutResponseUnsigned: title: ConsentsIDPutResponseUnsigned @@ -7932,8 +7794,8 @@ components: Called by a `auth-service` to request PISP to add the credential details. - properties: *ref_126 - required: *ref_127 + properties: *ref_122 + required: *ref_123 VerifiedCredential: title: VerifiedCredential type: object @@ -7950,8 +7812,8 @@ components: when updating a credential. - properties: *ref_128 - required: *ref_129 + properties: *ref_124 + required: *ref_125 additionalProperties: false ConsentsIDPutResponseVerified: title: ConsentsIDPutResponseVerified @@ -7965,12 +7827,12 @@ components: Called by a `auth-service` to notify a DFSP and PISP that a credential has been verified and registered. - properties: *ref_130 - required: *ref_131 + properties: *ref_126 + required: *ref_127 ConsentStatusTypeVerified: title: ConsentStatusType type: string - enum: *ref_132 + enum: *ref_128 description: | The status of the Consent. - "VERIFIED" - The Consent is valid and verified. @@ -7982,12 +7844,12 @@ components: Sent by the DFSP to the PISP when a consent is verified. Used in the "Register Credential" part of the Account linking flow. type: object - properties: *ref_133 - required: *ref_134 + properties: *ref_129 + required: *ref_130 ConsentStatusTypeRevoked: title: ConsentStatusType type: string - enum: *ref_135 + enum: *ref_131 description: | The status of the Consent. - "REVOKED" - The Consent is no longer valid and has been revoked. @@ -7999,26 +7861,26 @@ components: Sent to both the PISP and DFSP when a consent is revoked. Used in the "Unlinking" part of the Account Unlinking flow. type: object - properties: *ref_136 - required: *ref_137 + properties: *ref_132 + required: *ref_133 ConsentsIDGenerateChallengePostRequest: title: ConsentsIDGenerateChallengePostRequest type: object description: | A credential used to allow a user to prove their identity and access to an account with a DFSP. - properties: *ref_138 - required: *ref_139 + properties: *ref_134 + required: *ref_135 ServicesServiceTypePutResponse: title: ServicesServiceTypePutResponse type: object description: 'The object sent in a `PUT /services/{ServiceType}` request.' - properties: *ref_140 - required: *ref_141 + properties: *ref_136 + required: *ref_137 PartyIdTypeTPLink: title: PartyIdTypeTPLink type: string - enum: *ref_142 + enum: *ref_138 description: > This is a variant based on FSPIOP `PartyIdType` specification. @@ -8032,12 +7894,12 @@ components: title: PartyIdInfo type: object description: Data model for the complex type PartyIdInfo. - properties: *ref_143 - required: *ref_144 + properties: *ref_139 + required: *ref_140 AmountType: title: AmountType type: string - enum: *ref_145 + enum: *ref_141 description: >- Below are the allowed values for the enumeration AmountType. @@ -8051,16 +7913,16 @@ components: title: ThirdpartyRequestsTransactionsPostRequest type: object description: The object sent in the POST /thirdpartyRequests/transactions request. - properties: *ref_60 - required: *ref_61 + properties: *ref_58 + required: *ref_59 ThirdpartyRequestsTransactionsIDPutResponse: title: ThirdpartyRequestsTransactionsIDPutResponse type: object description: >- The object sent in the PUT /thirdPartyRequests/transactions/{ID} request. - properties: *ref_146 - required: *ref_147 + properties: *ref_142 + required: *ref_143 BinaryString: type: string pattern: '^[A-Za-z0-9-_]+[=]{0,2}$' @@ -8076,22 +7938,22 @@ components: description: >- The object sent in the PUT /thirdpartyRequests/transactions/{id}/authorizations request. - properties: *ref_148 - required: *ref_149 + properties: *ref_144 + required: *ref_145 ThirdpartyRequestsTransactionsIDAuthorizationsPostRequest: title: ThirdpartyRequestsTransactionsIDAuthorizationsPostRequest type: object description: >- The object sent in the POST /thirdpartyRequests/transactions/{id}/authorizations request. - properties: *ref_150 - required: *ref_151 + properties: *ref_146 + required: *ref_147 ThirdpartyRequestsAuthorizationsPostRequest: title: ThirdpartyRequestsAuthorizationsPostRequest description: POST /thirdpartyRequests/authorizations request object. type: object - properties: *ref_152 - required: *ref_153 + properties: *ref_148 + required: *ref_149 additionalProperties: false ThirdpartyRequestsAuthorizationsIDPutResponse: title: ThirdpartyRequestsAuthorizationsIDPutResponse @@ -8099,22 +7961,22 @@ components: description: >- The object sent in the PUT /thirdpartyRequests/authorizations/{ID} callback. - properties: *ref_154 - required: *ref_155 + properties: *ref_150 + required: *ref_151 ThirdpartyRequestsVerificationsPostRequest: title: ThirdpartyRequestsVerificationsPostRequest type: object description: The object sent in the POST /thirdpartyRequests/verifications request. - properties: *ref_156 - required: *ref_157 + properties: *ref_152 + required: *ref_153 ThirdpartyRequestsVerificationsIDPutResponse: title: ThirdpartyRequestsVerificationsIDPutResponse type: object description: >- The object sent in the PUT /thirdpartyRequests/verifications/{ID} request. - properties: *ref_158 - required: *ref_159 + properties: *ref_154 + required: *ref_155 parameters: ID: name: ID @@ -8238,7 +8100,7 @@ components: name: ServiceType in: path required: true - schema: *ref_57 + schema: *ref_55 description: 'The type of the service identifier. For example, `THIRD_PARTY_DFSP`' responses: '200': diff --git a/src/thirdparty/index.ts b/src/thirdparty/index.ts index 829c93df..0446da15 100644 --- a/src/thirdparty/index.ts +++ b/src/thirdparty/index.ts @@ -22,9 +22,7 @@ export namespace Schemas { export type ConsentRequestsIDPatchRequest = components['schemas']['ConsentRequestsIDPatchRequest'] export type AuthorizationsIDPutResponse = components['schemas']['AuthorizationsIDPutResponse'] export type ConsentRequestsIDPutResponseOTP = components['schemas']['ConsentRequestsIDPutResponseOTP'] - export type ConsentRequestsIDPutResponseOTPAuth = components['schemas']['ConsentRequestsIDPutResponseOTPAuth'] export type ConsentRequestsIDPutResponseWeb = components['schemas']['ConsentRequestsIDPutResponseWeb'] - export type ConsentRequestsIDPutResponseWebAuth = components['schemas']['ConsentRequestsIDPutResponseWebAuth'] export type ConsentRequestsPostRequest = components['schemas']['ConsentRequestsPostRequest'] export type ConsentScopeType = components['schemas']['ConsentScopeType'] export type ConsentsIDGenerateChallengePostRequest = components['schemas']['ConsentsIDGenerateChallengePostRequest'] diff --git a/src/thirdparty/openapi.ts b/src/thirdparty/openapi.ts index 644d576c..e41ee56f 100644 --- a/src/thirdparty/openapi.ts +++ b/src/thirdparty/openapi.ts @@ -6639,11 +6639,11 @@ export interface operations { /** * Identifier that correlates all messages of the same sequence. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a regular expression for interoperability reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). */ - id: string; + consentRequestId: string; /** - * The id of the PISP who will initiate transactions on a user's behalf. + * ID used to associate request with GET /accounts request. */ - initiatorId: string; + userId: string; scopes: { /** * A long-lived unique account identifier provided by the DFSP. This MUST NOT @@ -6982,33 +6982,9 @@ export interface operations { "application/json": | { /** - * The id of the PISP who will initiate transactions on a user's behalf. - */ - initiatorId: string; - scopes: { - /** - * A long-lived unique account identifier provided by the DFSP. This MUST NOT - * be Bank Account Number or anything that may expose a User's private bank - * account information. - */ - accountId: string; - actions: ("accounts.getBalance" | "accounts.transfer")[]; - }[]; - authChannels: "WEB"[]; - /** - * The callback uri that the user will be redirected to after completing the WEB auth channel. - */ - callbackUri: string; - /** - * The callback uri that the pisp app redirects to for user to complete their login. - */ - authUri: string; - } - | { - /** - * The id of the PISP who will initiate transactions on a user's behalf. + * Identifier that correlates all messages of the same sequence. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a regular expression for interoperability reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). */ - initiatorId: string; + consentRequestId: string; scopes: { /** * A long-lived unique account identifier provided by the DFSP. This MUST NOT @@ -7027,36 +7003,12 @@ export interface operations { * The callback uri that the pisp app redirects to for user to complete their login. */ authUri: string; - /** - * The Auth token from the OTP or redirect to pisp app. - */ - authToken: string; } | { /** - * The id of the PISP who will initiate transactions on a user's behalf. - */ - initiatorId: string; - scopes: { - /** - * A long-lived unique account identifier provided by the DFSP. This MUST NOT - * be Bank Account Number or anything that may expose a User's private bank - * account information. - */ - accountId: string; - actions: ("accounts.getBalance" | "accounts.transfer")[]; - }[]; - authChannels: "OTP"[]; - /** - * The callback uri that the user will be redirected to after completing the WEB auth channel. - */ - callbackUri: string; - } - | { - /** - * The id of the PISP who will initiate transactions on a user's behalf. + * Identifier that correlates all messages of the same sequence. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a regular expression for interoperability reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). */ - initiatorId: string; + consentRequestId: string; scopes: { /** * A long-lived unique account identifier provided by the DFSP. This MUST NOT @@ -7071,10 +7023,6 @@ export interface operations { * The callback uri that the user will be redirected to after completing the WEB auth channel. */ callbackUri: string; - /** - * The Auth token from the OTP or redirect to pisp app. - */ - authToken: string; }; }; responses: { @@ -7393,12 +7341,7 @@ export interface operations { */ PatchConsentRequest: { requestBody: { - "application/json": { - /** - * The API data type OtpValue is a JSON String of 3 to 10 characters, consisting of digits only. Negative numbers are not allowed. One or more leading zeros are allowed. - */ - authToken: string; - }; + "application/json": { authToken: string }; }; responses: { /** @@ -23819,11 +23762,11 @@ export interface components { /** * Identifier that correlates all messages of the same sequence. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a regular expression for interoperability reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). */ - id: string; + consentRequestId: string; /** - * The id of the PISP who will initiate transactions on a user's behalf. + * ID used to associate request with GET /accounts request. */ - initiatorId: string; + userId: string; scopes: { /** * A long-lived unique account identifier provided by the DFSP. This MUST NOT @@ -23853,40 +23796,9 @@ export interface components { */ ConsentRequestsIDPutResponseWeb: { /** - * The id of the PISP who will initiate transactions on a user's behalf. - */ - initiatorId: string; - scopes: { - /** - * A long-lived unique account identifier provided by the DFSP. This MUST NOT - * be Bank Account Number or anything that may expose a User's private bank - * account information. - */ - accountId: string; - actions: ("accounts.getBalance" | "accounts.transfer")[]; - }[]; - authChannels: "WEB"[]; - /** - * The callback uri that the user will be redirected to after completing the WEB auth channel. - */ - callbackUri: string; - /** - * The callback uri that the pisp app redirects to for user to complete their login. - */ - authUri: string; - }; - /** - * The object sent in a `PUT /consentRequests/{ID}` request. - * - * Schema used in the authentication phase of the account linking flow, - * the user is expected to prove their identity to the DFSP by passing a OTP - * or secret to the PISP. - */ - ConsentRequestsIDPutResponseWebAuth: { - /** - * The id of the PISP who will initiate transactions on a user's behalf. + * Identifier that correlates all messages of the same sequence. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a regular expression for interoperability reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). */ - initiatorId: string; + consentRequestId: string; scopes: { /** * A long-lived unique account identifier provided by the DFSP. This MUST NOT @@ -23905,10 +23817,6 @@ export interface components { * The callback uri that the pisp app redirects to for user to complete their login. */ authUri: string; - /** - * The Auth token from the OTP or redirect to pisp app. - */ - authToken: string; }; /** * The OTP auth channel being used for PUT consentRequest/{ID} request. @@ -23921,36 +23829,9 @@ export interface components { */ ConsentRequestsIDPutResponseOTP: { /** - * The id of the PISP who will initiate transactions on a user's behalf. - */ - initiatorId: string; - scopes: { - /** - * A long-lived unique account identifier provided by the DFSP. This MUST NOT - * be Bank Account Number or anything that may expose a User's private bank - * account information. - */ - accountId: string; - actions: ("accounts.getBalance" | "accounts.transfer")[]; - }[]; - authChannels: "OTP"[]; - /** - * The callback uri that the user will be redirected to after completing the WEB auth channel. - */ - callbackUri: string; - }; - /** - * The object sent in a `PUT /consentRequests/{ID}` request. - * - * Schema used in the authentication phase of the account linking flow, - * the user is expected to prove their identity to the DFSP by passing a OTP - * or secret to the PISP. - */ - ConsentRequestsIDPutResponseOTPAuth: { - /** - * The id of the PISP who will initiate transactions on a user's behalf. + * Identifier that correlates all messages of the same sequence. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a regular expression for interoperability reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). */ - initiatorId: string; + consentRequestId: string; scopes: { /** * A long-lived unique account identifier provided by the DFSP. This MUST NOT @@ -23965,20 +23846,11 @@ export interface components { * The callback uri that the user will be redirected to after completing the WEB auth channel. */ callbackUri: string; - /** - * The Auth token from the OTP or redirect to pisp app. - */ - authToken: string; }; /** * The object sent in a `PATCH /consentRequests/{ID}` request. */ - ConsentRequestsIDPatchRequest: { - /** - * The API data type OtpValue is a JSON String of 3 to 10 characters, consisting of digits only. Negative numbers are not allowed. One or more leading zeros are allowed. - */ - authToken: string; - }; + ConsentRequestsIDPatchRequest: { authToken: string }; /** * The object sent in a `POST /consents` request. */ diff --git a/tests/dto/thirdparty.test.ts b/tests/dto/thirdparty.test.ts index 91dab59b..8c54f71e 100644 --- a/tests/dto/thirdparty.test.ts +++ b/tests/dto/thirdparty.test.ts @@ -200,7 +200,7 @@ describe('thirdparty', () => { test('ConsentRequestsIDPutResponseOTP', () => { const consentRequestsIDPutResponseOTP: Schemas.ConsentRequestsIDPutResponseOTP = { - initiatorId: 'pisp-id', + consentRequestId: 'pisp-id', scopes: [scope], authChannels: [consentRequestChannelTypeOTP], callbackUri: 'https://fspiId/callback' @@ -208,20 +208,9 @@ describe('thirdparty', () => { expect(consentRequestsIDPutResponseOTP).toBeDefined() }) - test('ConsentRequestsIDPutResponseOTPAuth', () => { - const consentRequestsIDPutResponseOTPAuth: Schemas.ConsentRequestsIDPutResponseOTPAuth = { - initiatorId: 'pisp-id', - scopes: [scope], - authChannels: [consentRequestChannelTypeOTP], - callbackUri: 'https://fspiId/callback', - authToken: 'abcdefghijklmnopqrstuvxyz' - } - expect(consentRequestsIDPutResponseOTPAuth).toBeDefined() - }) - test('ConsentRequestsIDPutResponseWeb', () => { const consentRequestsIDPutResponseWeb: Schemas.ConsentRequestsIDPutResponseWeb = { - initiatorId: 'pisp-id', + consentRequestId: 'pisp-id', scopes: [scope], authChannels: [consentRequestChannelTypeWeb], callbackUri: 'https://fspiId/callback', @@ -230,22 +219,10 @@ describe('thirdparty', () => { expect(consentRequestsIDPutResponseWeb).toBeDefined() }) - test('ConsentRequestsIDPutResponseWebAuth', () => { - const consentRequestsIDPutResponseWebAuth: Schemas.ConsentRequestsIDPutResponseWebAuth = { - initiatorId: 'pisp-id', - scopes: [scope], - authChannels: [consentRequestChannelTypeWeb], - callbackUri: 'https://fspiId/callback', - authUri: 'https://fspId/auth', - authToken: 'abcdefghijklmnopqrstuvxyz' - } - expect(consentRequestsIDPutResponseWebAuth).toBeDefined() - }) - test('ConsentRequestsPostRequest', () => { const consentRequestsPostRequest: Schemas.ConsentRequestsPostRequest = { - id: correlationId, - initiatorId: 'pisp-id', + consentRequestId: 'pisp-id', + userId: 'pisp-id-user', scopes: [scope], authChannels: [consentRequestChannelType], callbackUri: 'https://fspiId/callback' diff --git a/thirdparty/openapi3/components/schemas/ConsentRequestsIDPatchRequest.yaml b/thirdparty/openapi3/components/schemas/ConsentRequestsIDPatchRequest.yaml index 019b4bd5..2bb4689c 100644 --- a/thirdparty/openapi3/components/schemas/ConsentRequestsIDPatchRequest.yaml +++ b/thirdparty/openapi3/components/schemas/ConsentRequestsIDPatchRequest.yaml @@ -3,6 +3,6 @@ type: object description: The object sent in a `PATCH /consentRequests/{ID}` request. properties: authToken: - $ref: '../../../../fspiop/v1_1/openapi3/components/schemas/OtpValue.yaml' + type: string required: - authToken diff --git a/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseOTP.yaml b/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseOTP.yaml index f0b510cc..58d02003 100644 --- a/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseOTP.yaml +++ b/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseOTP.yaml @@ -5,9 +5,8 @@ description: | Schema used in the request consent phase of the account linking OTP/SMS flow. properties: - initiatorId: - type: string - description: The id of the PISP who will initiate transactions on a user's behalf. + consentRequestId: + $ref: ./CorrelationId.yaml scopes: type: array items: @@ -22,7 +21,7 @@ properties: The callback uri that the user will be redirected to after completing the WEB auth channel. required: - - initiatorId + - consentRequestId - scopes - authChannels - callbackUri diff --git a/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseOTPAuth.yaml b/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseOTPAuth.yaml deleted file mode 100644 index 1a19bde4..00000000 --- a/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseOTPAuth.yaml +++ /dev/null @@ -1,35 +0,0 @@ -title: ConsentRequestsIDPutResponseOTPAuth -type: object -description: | - The object sent in a `PUT /consentRequests/{ID}` request. - - Schema used in the authentication phase of the account linking flow, - the user is expected to prove their identity to the DFSP by passing a OTP - or secret to the PISP. -properties: - initiatorId: - type: string - description: The id of the PISP who will initiate transactions on a user's behalf. - scopes: - type: array - items: - $ref: ./Scope.yaml - authChannels: - type: array - items: - $ref: ./ConsentRequestChannelTypeOTP.yaml - callbackUri: - type: string - description: >- - The callback uri that the user will be redirected to after completing the - WEB auth channel. - authToken: - type: string - description: The Auth token from the OTP or redirect to pisp app. -required: - - initiatorId - - scopes - - authChannels - - callbackUri - - authToken -additionalProperties: false diff --git a/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseWeb.yaml b/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseWeb.yaml index d30d0a33..5721fac6 100644 --- a/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseWeb.yaml +++ b/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseWeb.yaml @@ -8,9 +8,8 @@ description: | supposed user should be redirected. This URL should be a place where the user can prove their identity (e.g., by logging in). properties: - initiatorId: - type: string - description: The id of the PISP who will initiate transactions on a user's behalf. + consentRequestId: + $ref: ./CorrelationId.yaml scopes: type: array items: @@ -30,7 +29,7 @@ properties: The callback uri that the pisp app redirects to for user to complete their login. required: - - initiatorId + - consentRequestId - scopes - authChannels - callbackUri diff --git a/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseWebAuth.yaml b/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseWebAuth.yaml deleted file mode 100644 index 37a87687..00000000 --- a/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseWebAuth.yaml +++ /dev/null @@ -1,41 +0,0 @@ -title: ConsentRequestsIDPutResponseWebAuth -type: object -description: | - The object sent in a `PUT /consentRequests/{ID}` request. - - Schema used in the authentication phase of the account linking flow, - the user is expected to prove their identity to the DFSP by passing a OTP - or secret to the PISP. -properties: - initiatorId: - type: string - description: The id of the PISP who will initiate transactions on a user's behalf. - scopes: - type: array - items: - $ref: ./Scope.yaml - authChannels: - type: array - items: - $ref: ./ConsentRequestChannelTypeWeb.yaml - callbackUri: - type: string - description: >- - The callback uri that the user will be redirected to after completing the - WEB auth channel. - authUri: - type: string - description: >- - The callback uri that the pisp app redirects to for user to complete their - login. - authToken: - type: string - description: The Auth token from the OTP or redirect to pisp app. -required: - - initiatorId - - scopes - - authChannels - - callbackUri - - authUri - - authToken -additionalProperties: false diff --git a/thirdparty/openapi3/components/schemas/ConsentRequestsPostRequest.yaml b/thirdparty/openapi3/components/schemas/ConsentRequestsPostRequest.yaml index 282e8387..0aa00ef4 100644 --- a/thirdparty/openapi3/components/schemas/ConsentRequestsPostRequest.yaml +++ b/thirdparty/openapi3/components/schemas/ConsentRequestsPostRequest.yaml @@ -2,11 +2,11 @@ title: ConsentRequestsPostRequest type: object description: The object sent in a `POST /consentRequests` request. properties: - id: + consentRequestId: $ref: ./CorrelationId.yaml - initiatorId: + userId: type: string - description: The id of the PISP who will initiate transactions on a user's behalf. + description: ID used to associate request with GET /accounts request. scopes: type: array items: @@ -21,8 +21,8 @@ properties: The callback uri that the user will be redirected to after completing the WEB auth channel. required: - - id - - initiatorId + - consentRequestId + - userId - scopes - authChannels - callbackUri diff --git a/thirdparty/openapi3/components/schemas/index.yaml b/thirdparty/openapi3/components/schemas/index.yaml index 9b4c245d..f21876fd 100644 --- a/thirdparty/openapi3/components/schemas/index.yaml +++ b/thirdparty/openapi3/components/schemas/index.yaml @@ -34,12 +34,8 @@ ConsentRequestsIDPatchRequest: $ref: ./ConsentRequestsIDPatchRequest.yaml ConsentRequestsIDPutResponseOTP: $ref: ./ConsentRequestsIDPutResponseOTP.yaml -ConsentRequestsIDPutResponseOTPAuth: - $ref: ./ConsentRequestsIDPutResponseOTPAuth.yaml ConsentRequestsIDPutResponseWeb: $ref: ./ConsentRequestsIDPutResponseWeb.yaml -ConsentRequestsIDPutResponseWebAuth: - $ref: ./ConsentRequestsIDPutResponseWebAuth.yaml ConsentRequestsPostRequest: $ref: ./ConsentRequestsPostRequest.yaml ConsentScopeType: diff --git a/thirdparty/openapi3/paths/consentRequests_ID.yaml b/thirdparty/openapi3/paths/consentRequests_ID.yaml index e54a64fe..aed4392f 100644 --- a/thirdparty/openapi3/paths/consentRequests_ID.yaml +++ b/thirdparty/openapi3/paths/consentRequests_ID.yaml @@ -30,9 +30,7 @@ put: schema: oneOf: - $ref: ../components/schemas/ConsentRequestsIDPutResponseWeb.yaml - - $ref: ../components/schemas/ConsentRequestsIDPutResponseWebAuth.yaml - $ref: ../components/schemas/ConsentRequestsIDPutResponseOTP.yaml - - $ref: ../components/schemas/ConsentRequestsIDPutResponseOTPAuth.yaml responses: 202: $ref: ../components/responses/202.yaml