From 6c6f7196666602e0e1dbb962ef0e37e29e562340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Marzec?= <2881004+eoln@users.noreply.github.com> Date: Mon, 22 Mar 2021 16:24:27 +0100 Subject: [PATCH] refactor: 2060 design change post thridpartyrequests transactions (#65) * fix: drop messed def for scheme outbound interface * refactor!: enforce to use THIRD_PARTY_LINK in thirdpartyRequests/transaction * chore: regenerate files * fix: dto unit test --- docs/thirdparty-openapi3-snippets.yaml | 571 +++-- src/thirdparty/index.ts | 12 + src/thirdparty/openapi.ts | 1953 +++++------------ tests/dto/thirdparty.test.ts | 21 +- .../InboundAuthorizationsPostRequest.yaml | 49 - .../components/schemas/PartyIdInfoTPLink.yaml | 17 + .../components/schemas/PartyIdTypeTPLink.yaml | 9 + .../components/schemas/PartyTPLink.yaml | 16 + ...dpartyRequestsTransactionsPostRequest.yaml | 14 +- thirdparty/openapi3/paths/authorizations.yaml | 4 +- .../thirdpartyRequests_transactions_tsa.yaml | 6 +- tsconfig.eslint.json | 4 +- 12 files changed, 924 insertions(+), 1752 deletions(-) delete mode 100644 thirdparty/openapi3/components/schemas/InboundAuthorizationsPostRequest.yaml create mode 100644 thirdparty/openapi3/components/schemas/PartyIdInfoTPLink.yaml create mode 100644 thirdparty/openapi3/components/schemas/PartyIdTypeTPLink.yaml create mode 100644 thirdparty/openapi3/components/schemas/PartyTPLink.yaml diff --git a/docs/thirdparty-openapi3-snippets.yaml b/docs/thirdparty-openapi3-snippets.yaml index 0446c9df..74183c34 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_65 + enum: &ref_68 - OTP - QRCODE - U2F @@ -54,14 +54,14 @@ paths: resend of the authentication value. type: string - enum: &ref_66 + enum: &ref_69 - ENTERED - REJECTED - RESEND - title: AuthorizationsPostRequest description: POST /authorizations request object. type: object - properties: &ref_69 + properties: &ref_46 authenticationType: title: AuthenticationType type: string @@ -318,7 +318,7 @@ paths: title: QuotesIDPutResponse type: object description: 'The object sent in the PUT /quotes/{ID} callback.' - properties: &ref_46 + properties: &ref_72 transferAmount: title: Money type: object @@ -424,7 +424,7 @@ paths: title: Extension type: object description: Data model for the complex type Extension. - properties: &ref_67 + properties: &ref_70 key: title: ExtensionKey type: string @@ -437,7 +437,7 @@ paths: minLength: 1 maxLength: 128 description: Extension value. - required: &ref_68 + required: &ref_71 - key - value minItems: 1 @@ -445,12 +445,12 @@ paths: description: Number of Extension elements. required: &ref_4 - extension - required: &ref_47 + required: &ref_73 - transferAmount - expiration - ilpPacket - condition - required: &ref_70 + required: &ref_47 - authenticationType - retriesLeft - amount @@ -464,7 +464,7 @@ paths: Sent to both the PISP and DFSP when a consent is revoked. type: object - properties: &ref_71 + properties: &ref_74 status: title: ConsentStatusType type: string @@ -493,7 +493,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_72 + required: &ref_75 - status - revokedAt - title: ConsentStatusType @@ -521,7 +521,7 @@ paths: - title: PartyResult type: object description: Data model for the complex type PartyResult. - properties: &ref_74 + properties: &ref_77 partyId: description: Data model for the complex type PartyIdInfo. title: PartyIdInfo @@ -530,7 +530,7 @@ paths: partyIdType: title: PartyIdType type: string - enum: &ref_73 + enum: &ref_76 - MSISDN - EMAIL - PERSONAL_ID @@ -721,12 +721,12 @@ paths: required: &ref_15 - errorCode - errorDescription - required: &ref_75 + required: &ref_78 - partyId - title: ParticipantsPostRequest type: object description: The object sent in the POST /participants request. - properties: &ref_76 + properties: &ref_79 requestId: title: CorrelationId type: string @@ -768,7 +768,7 @@ paths: minLength: 3 maxLength: 3 enum: *ref_7 - required: &ref_77 + required: &ref_80 - requestId - partyList - title: PartiesTypeIDPutResponse @@ -794,14 +794,14 @@ paths: title: AccountList type: object description: Data model for the complex type AccountList. - properties: &ref_80 + properties: &ref_58 account: type: array items: title: Account type: object description: Data model for the complex type Account. - properties: &ref_78 + properties: &ref_81 address: title: AccountAddress type: string @@ -854,12 +854,12 @@ paths: enabled. For example, if Java is used, the flag UNICODE_CHARACTER_CLASS must be enabled to allow Unicode characters. - required: &ref_79 + required: &ref_82 - currency minItems: 1 maxItems: 32 description: Accounts associated with the Party. - required: &ref_81 + required: &ref_59 - account partyIdInfo: title: PartyIdInfo @@ -888,14 +888,14 @@ paths: title: PartyPersonalInfo type: object description: Data model for the complex type PartyPersonalInfo. - properties: &ref_83 + properties: &ref_60 complexName: title: PartyComplexName type: object description: >- Data model for the complex type PartyComplexName. - properties: &ref_82 + properties: &ref_83 firstName: title: FirstName type: string @@ -955,7 +955,7 @@ paths: transactionRequestState: title: TransactionRequestState type: string - enum: &ref_62 + enum: &ref_65 - RECEIVED - PENDING - ACCEPTED @@ -1040,7 +1040,7 @@ paths: title: TransactionType type: object description: Data model for the complex type TransactionType. - properties: &ref_58 + properties: &ref_61 scenario: title: TransactionScenario type: string @@ -1172,7 +1172,7 @@ paths: digits only. Negative numbers are not allowed. A leading zero is not allowed. example: '123' - required: &ref_59 + required: &ref_62 - scenario - initiator - initiatorType @@ -1910,7 +1910,7 @@ paths: description: > The HTTP request `POST /authorizations` is used to request the Payer to enter the applicable credentials in the PISP system. - operationId: InboundAuthorizationsPostRequest + operationId: AuthorizationsPostRequest tags: - authorizations requestBody: @@ -1919,106 +1919,12 @@ paths: content: application/json: schema: + title: AuthorizationsPostRequest + description: POST /authorizations request object. type: object - title: InboundAuthorizationsRequest - description: POST /authorizations Request object - properties: &ref_96 - toParticipantId: - type: string - authenticationType: - title: AuthenticationType - type: string - enum: *ref_12 - description: >- - Below are the allowed values for the enumeration - AuthenticationType. - - - OTP - One-time password generated by the Payer FSP. - - - QRCODE - QR code used as One Time Password. - - - U2F - U2F is a new addition isolated to Thirdparty stream. - retriesLeft: - title: Integer - type: string - pattern: '^[1-9]\d*$' - description: >- - The API data type Integer is a JSON String consisting of - digits only. Negative numbers and leading zeroes are not - allowed. The data type is always limited to a specific - number of digits. - amount: - title: Money - type: object - description: Data model for the complex type Money. - properties: *ref_0 - required: *ref_1 - transactionId: - 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: >- - 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 - transactionRequestId: - 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: >- - 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 - quote: - title: QuotesIDPutResponse - type: object - description: 'The object sent in the PUT /quotes/{ID} callback.' - properties: *ref_46 - required: *ref_47 - required: &ref_97 - - authenticationType - - retriesLeft - - amount - - transactionId - - transactionRequestId - - quote + properties: *ref_46 + required: *ref_47 additionalProperties: false - example: &ref_98 - toParticipantId: dfspb - authenticationType: U2F - retriesLeft: '1' - amount: - currency: USD - amount: 123.45 - transactionId: b51ec534-ee48-4575-b6a9-ead2955b8069 - transactionRequestId: b51ec534-ee48-4575-b6a9-ead2955b8068 - quote: - expiration: '2016-05-24T08:38:08.699-04:00' - transferAmount: - currency: USD - amount: 123.45 - geoCode: - latitude: '+45.4215' - longitude: '+75.6972' - ilpPacket: >- - AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA - condition: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA - extensionList: - extension: - - key: sample-key - value: sample-value responses: '202': description: Accepted @@ -2082,12 +1988,12 @@ paths: title: AuthorizationsIDPutResponse type: object description: 'The object sent in the PUT /authorizations/{ID} callback.' - properties: &ref_105 + properties: &ref_102 authenticationInfo: title: AuthenticationInfo type: object description: Data model for the complex type AuthenticationInfo. - properties: &ref_102 + properties: &ref_99 authentication: title: AuthenticationType type: string @@ -2104,7 +2010,7 @@ paths: stream. authenticationValue: title: AuthenticationValue - anyOf: &ref_101 + anyOf: &ref_98 - title: OtpValue type: string pattern: '^\d{3,10}$' @@ -2124,7 +2030,7 @@ paths: U2F challenge-response, where payer FSP verifies if the response provided by end-user device matches the previously registered key. - properties: &ref_99 + properties: &ref_96 pinValue: allOf: - title: U2FPIN @@ -2152,7 +2058,7 @@ paths: description: >- Sequential counter used for cloning detection. Present only for U2F authentication. - required: &ref_100 + required: &ref_97 - pinValue - counter pattern: '^\d{3,10}$|^\S{1,64}$' @@ -2160,13 +2066,13 @@ paths: Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type. - required: &ref_103 + required: &ref_100 - authentication - authenticationValue responseType: title: AuthorizationResponse type: string - enum: &ref_104 + enum: &ref_101 - ENTERED - REJECTED - RESEND @@ -2180,7 +2086,7 @@ paths: - RESEND - Consumer requested to resend the authentication value. example: ENTERED - required: &ref_106 + required: &ref_103 - responseType '400': description: Bad Request @@ -2424,7 +2330,7 @@ paths: title: ConsentRequestsPostRequest type: object description: The object sent in a `POST /consentRequests` request. - properties: &ref_109 + properties: &ref_106 id: title: CorrelationId type: string @@ -2475,7 +2381,7 @@ paths: items: title: ConsentScopeType type: string - enum: &ref_107 + enum: &ref_104 - accounts.getBalance - accounts.transfer description: > @@ -2494,7 +2400,7 @@ paths: items: title: ConsentRequestChannelType type: string - enum: &ref_108 + enum: &ref_105 - WEB - OTP description: | @@ -2506,7 +2412,7 @@ paths: description: >- The callback uri that the user will be redirected to after completing the WEB auth channel. - required: &ref_110 + required: &ref_107 - id - initiatorId - scopes @@ -2702,7 +2608,7 @@ paths: place where the user can prove their identity (e.g., by logging in). - properties: &ref_111 + properties: &ref_108 initiatorId: type: string description: >- @@ -2741,7 +2647,7 @@ paths: description: >- The callback uri that the pisp app redirects to for user to complete their login. - required: &ref_112 + required: &ref_109 - initiatorId - scopes - authChannels @@ -2761,7 +2667,7 @@ paths: passing a OTP or secret to the PISP. - properties: &ref_113 + properties: &ref_110 initiatorId: type: string description: >- @@ -2802,7 +2708,7 @@ paths: authToken: type: string description: The Auth token from the OTP or redirect to pisp app. - required: &ref_114 + required: &ref_111 - initiatorId - scopes - authChannels @@ -2818,7 +2724,7 @@ paths: Schema used in the request consent phase of the account linking OTP/SMS flow. - properties: &ref_115 + properties: &ref_112 initiatorId: type: string description: >- @@ -2852,7 +2758,7 @@ paths: description: >- The callback uri that the user will be redirected to after completing the WEB auth channel. - required: &ref_116 + required: &ref_113 - initiatorId - scopes - authChannels @@ -2871,7 +2777,7 @@ paths: passing a OTP or secret to the PISP. - properties: &ref_117 + properties: &ref_114 initiatorId: type: string description: >- @@ -2907,7 +2813,7 @@ paths: authToken: type: string description: The Auth token from the OTP or redirect to pisp app. - required: &ref_118 + required: &ref_115 - initiatorId - scopes - authChannels @@ -2966,7 +2872,7 @@ paths: title: ConsentRequestsIDPatchRequest type: object description: 'The object sent in a `PATCH /consentRequests/{ID}` request.' - properties: &ref_119 + properties: &ref_116 authToken: title: OtpValue type: string @@ -2975,7 +2881,7 @@ paths: 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_120 + required: &ref_117 - authToken responses: '202': @@ -3294,7 +3200,7 @@ paths: title: ConsentPostRequest type: object description: The object sent in a `POST /consents` request. - properties: &ref_121 + properties: &ref_118 consentId: allOf: - title: CorrelationId @@ -3347,7 +3253,7 @@ paths: } properties: *ref_49 required: *ref_50 - required: &ref_122 + required: &ref_119 - consentId - consentRequestId - scopes @@ -3566,7 +3472,7 @@ paths: Called by a `PISP` to after signing a challenge. Sent to an `auth-service` for verification. - properties: &ref_125 + properties: &ref_122 requestId: allOf: - title: CorrelationId @@ -3633,7 +3539,7 @@ paths: ever be PENDING when updating a credential. - properties: &ref_123 + properties: &ref_120 id: type: string description: The id of a Credential. @@ -3676,14 +3582,14 @@ paths: description: >- Base64 encoded bytes - The public key of the Public/Private keypair. - required: &ref_124 + required: &ref_121 - id - type - status - challenge - payload additionalProperties: false - required: &ref_126 + required: &ref_123 - requestId - participantId - initiatorId @@ -3701,7 +3607,7 @@ paths: Called by a `auth-service` to request PISP to add the credential details. - properties: &ref_131 + properties: &ref_128 requestId: allOf: - title: CorrelationId @@ -3768,7 +3674,7 @@ paths: ever be PENDING when updating a credential. - properties: &ref_129 + properties: &ref_126 type: title: CredentialType type: string @@ -3789,21 +3695,21 @@ paths: description: > The challenge issued by a DFSP that must be answered by the PISP. - properties: &ref_127 + properties: &ref_124 payload: type: string description: >- Base64 encoded binary of the challenge that must be answered by the PISP. - required: &ref_128 + required: &ref_125 - payload additionalProperties: false - required: &ref_130 + required: &ref_127 - type - status - challenge additionalProperties: false - required: &ref_132 + required: &ref_129 - requestId - participantId - initiatorId @@ -3820,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_135 + properties: &ref_132 requestId: allOf: - title: CorrelationId @@ -3887,7 +3793,7 @@ paths: ever be VERIFIED when updating a credential. - properties: &ref_133 + properties: &ref_130 id: type: string description: The id of a Credential. @@ -3918,12 +3824,12 @@ paths: description: >- Base64 encoded bytes - The public key of the Public/Private keypair. - required: &ref_134 + required: &ref_131 - type - status - challenge additionalProperties: false - required: &ref_136 + required: &ref_133 - requestId - participantId - initiatorId @@ -4110,7 +4016,7 @@ paths: description: | A credential used to allow a user to prove their identity and access to an account with a DFSP. - properties: &ref_137 + properties: &ref_134 type: title: CredentialType type: string @@ -4118,7 +4024,7 @@ paths: description: | The type of the Credential. - "FIDO" - A FIDO public/private keypair. - required: &ref_138 + required: &ref_135 - type example: type: FIDO @@ -4422,7 +4328,7 @@ paths: description: >- The object sent in the POST /thirdpartyRequests/transactions request. - properties: &ref_60 + properties: &ref_63 transactionRequestId: allOf: - title: CorrelationId @@ -4444,42 +4350,6 @@ paths: object. The ID should be reused for resends of the same transaction request. A new ID should be generated for each new transaction request. - sourceAccountId: - allOf: - - title: AccountAddress - type: string - description: > - 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. - pattern: '^([0-9A-Za-z_~\-\.]+[0-9A-Za-z_~\-])$' - minLength: 1 - maxLength: 1023 - description: 'DFSP specific account identifiers, e.g. `dfspa.alice.1234`' - consentId: - allOf: - - 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: >- - 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 - description: > - Common ID between the PISP and FSP for the Consent object - This tells DFSP and auth-service which constent allows the - PISP to initiate transaction. payee: allOf: - title: Party @@ -4495,8 +4365,92 @@ paths: - title: Party type: object description: Data model for the complex type Party. - properties: *ref_8 - required: *ref_9 + properties: &ref_139 + accounts: + title: AccountList + type: object + description: Data model for the complex type AccountList. + properties: *ref_58 + required: *ref_59 + partyIdInfo: + title: PartyIdInfo + type: object + description: Data model for the complex type PartyIdInfo. + properties: &ref_137 + partyIdType: + title: PartyIdTypeTPLink + type: string + enum: &ref_136 + - THIRD_PARTY_LINK + description: > + This is a variant based on FSPIOP `PartyIdType` + specification. + + This validation interface should be use by `POST + /thirdpartyRequests/transactions` + + - THIRD_PARTY_LINK - is the DFSP's internal + reference which allows DFSP to find out the + corresponding consent + example: PERSONAL_ID + partyIdentifier: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + example: '16135551212' + partySubIdOrType: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or + a sub-type of the PartyIdType, normally a + PersonalIdentifierType. + fspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. + An optional list of extensions, specific to + deployment. + properties: *ref_3 + required: *ref_4 + required: &ref_138 + - partyIdType + - partyIdentifier + merchantClassificationCode: + title: MerchantClassificationCode + type: string + pattern: '^[\d]{1,4}$' + description: >- + A limited set of pre-defined numbers. This list + would be a limited set of numbers identifying a set + of popular merchant types like School Fees, Pubs and + Restaurants, Groceries, etc. + name: + title: PartyName + type: string + minLength: 1 + maxLength: 128 + description: >- + Name of the Party. Could be a real name or a + nickname. + personalInfo: + title: PartyPersonalInfo + type: object + description: Data model for the complex type PartyPersonalInfo. + properties: *ref_60 + required: &ref_140 + - partyIdInfo description: >- Information about the Payer in the proposed financial transaction. @@ -4504,7 +4458,7 @@ paths: allOf: - title: AmountType type: string - enum: &ref_139 + enum: &ref_141 - SEND - RECEIVE description: >- @@ -4533,8 +4487,8 @@ paths: - title: TransactionType type: object description: Data model for the complex type TransactionType. - properties: *ref_58 - required: *ref_59 + properties: *ref_61 + required: *ref_62 description: Type of transaction. expiration: type: string @@ -4543,10 +4497,8 @@ 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_64 - transactionRequestId - - sourceAccountId - - consentId - payee - payer - amountType @@ -4636,12 +4588,10 @@ paths: description: >- The object sent in the POST /thirdpartyRequests/transactions request. - properties: *ref_60 - required: *ref_61 + properties: *ref_63 + required: *ref_64 example: transactionRequestId: 8d34f91d-d078-4077-8263-2c047876fcf6 - sourceAccountId: dfspa.alice.1234 - consentId: '111' payee: partyIdInfo: partyIdType: MSISDN @@ -4653,8 +4603,8 @@ paths: firstName: Alice lastName: K partyIdInfo: - partyIdType: MSISDN - partyIdentifier: +44 8765 4321 + partyIdType: THIRD_PARTY_LINK + partyIdentifier: qwerty-567890 fspId: dfspa amountType: SEND amount: @@ -4887,7 +4837,7 @@ paths: description: >- The object sent in the PUT /thirdPartyRequests/transactions/{ID} request. - properties: &ref_63 + properties: &ref_66 transactionId: title: CorrelationId type: string @@ -4905,7 +4855,7 @@ paths: transactionRequestState: title: TransactionRequestState type: string - enum: *ref_62 + enum: *ref_65 description: >- Below are the allowed values for the enumeration. @@ -4919,7 +4869,7 @@ paths: - REJECTED - Payer has rejected the transaction. example: RECEIVED - required: &ref_64 + required: &ref_67 - transactionId - transactionRequestState responses: @@ -4999,8 +4949,8 @@ paths: description: >- The object sent in the PUT /thirdPartyRequests/transactions/{ID} request. - properties: *ref_63 - required: *ref_64 + properties: *ref_66 + required: *ref_67 responses: '200': description: OK @@ -5334,7 +5284,7 @@ paths: description: >- The object sent in the POST /thirdpartyRequests/transactions/{id}/authorizations request. - properties: &ref_142 + properties: &ref_144 challenge: type: string description: Base64 encoded binary string - the original challenge. @@ -5393,7 +5343,7 @@ paths: description: >- The status of the authorization. This MUST be PENDING for a POST request - required: &ref_143 + required: &ref_145 - challenge - value - consentId @@ -5466,7 +5416,7 @@ paths: description: >- The object sent in the PUT /thirdpartyRequests/transactions/{id}/authorizations request. - properties: &ref_140 + properties: &ref_142 challenge: type: string description: Base64 encoded binary string - the original challenge. @@ -5525,7 +5475,7 @@ paths: description: >- The status of the authorization. This value must be `VERIFIED` for a PUT request. - required: &ref_141 + required: &ref_143 - challenge - value - consentId @@ -5577,7 +5527,7 @@ components: AuthorizationChannelType: title: AuthorizationChannelType type: string - enum: *ref_65 + enum: *ref_68 description: > Below are the allowed values for the enumeration AuthorizationChannelType. @@ -5594,7 +5544,7 @@ components: authentication value, rejected the transaction, or requested a resend of the authentication value. type: string - enum: *ref_66 + enum: *ref_69 AuthenticationType: title: AuthenticationType type: string @@ -5726,8 +5676,8 @@ components: title: Extension type: object description: Data model for the complex type Extension. - properties: *ref_67 - required: *ref_68 + properties: *ref_70 + required: *ref_71 ExtensionList: title: ExtensionList type: object @@ -5740,14 +5690,14 @@ components: title: QuotesIDPutResponse type: object description: 'The object sent in the PUT /quotes/{ID} callback.' - properties: *ref_46 - required: *ref_47 + properties: *ref_72 + required: *ref_73 AuthorizationsPostRequest: title: AuthorizationsPostRequest description: POST /authorizations request object. type: object - properties: *ref_69 - required: *ref_70 + properties: *ref_46 + required: *ref_47 additionalProperties: false ConsentStatusType: title: ConsentStatusType @@ -5763,8 +5713,8 @@ components: Sent to both the PISP and DFSP when a consent is revoked. type: object - properties: *ref_71 - required: *ref_72 + properties: *ref_74 + required: *ref_75 IlpFulfilment: title: IlpFulfilment type: string @@ -5782,7 +5732,7 @@ components: PartyIdType: title: PartyIdType type: string - enum: *ref_73 + enum: *ref_76 description: > This is a variant based on FSPIOP `PartyIdType` specification. @@ -5936,14 +5886,14 @@ components: title: PartyResult type: object description: Data model for the complex type PartyResult. - properties: *ref_74 - required: *ref_75 + properties: *ref_77 + required: *ref_78 ParticipantsPostRequest: title: ParticipantsPostRequest type: object description: The object sent in the POST /participants request. - properties: *ref_76 - required: *ref_77 + properties: *ref_79 + required: *ref_80 AccountAddress: title: AccountAddress type: string @@ -5980,14 +5930,14 @@ components: title: Account type: object description: Data model for the complex type Account. - properties: *ref_78 - required: *ref_79 + properties: *ref_81 + required: *ref_82 AccountList: title: AccountList type: object description: Data model for the complex type AccountList. - properties: *ref_80 - required: *ref_81 + properties: *ref_58 + required: *ref_59 MerchantClassificationCode: title: MerchantClassificationCode type: string @@ -6030,7 +5980,7 @@ components: title: PartyComplexName type: object description: Data model for the complex type PartyComplexName. - properties: *ref_82 + properties: *ref_83 DateOfBirth: title: DateofBirth (type Date) type: string @@ -6042,7 +5992,7 @@ components: title: PartyPersonalInfo type: object description: Data model for the complex type PartyPersonalInfo. - properties: *ref_83 + properties: *ref_60 Party: title: Party type: object @@ -6067,7 +6017,7 @@ components: TransactionRequestState: title: TransactionRequestState type: string - enum: *ref_62 + enum: *ref_65 description: |- Below are the allowed values for the enumeration. - RECEIVED - Payer FSP has received the transaction from the Payee FSP. @@ -6184,8 +6134,8 @@ components: title: TransactionType type: object description: Data model for the complex type TransactionType. - properties: *ref_58 - required: *ref_59 + properties: *ref_61 + required: *ref_62 TransactionRequestsPostRequest: title: TransactionRequestsPostRequest type: object @@ -6209,14 +6159,6 @@ components: description: Data model for the complex type object that contains ErrorInformation. properties: *ref_53 required: *ref_54 - InboundAuthorizationsPostRequest: - type: object - title: InboundAuthorizationsRequest - description: POST /authorizations Request object - properties: *ref_96 - required: *ref_97 - additionalProperties: false - example: *ref_98 OtpValue: title: OtpValue type: string @@ -6246,11 +6188,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_99 - required: *ref_100 + properties: *ref_96 + required: *ref_97 AuthenticationValue: title: AuthenticationValue - anyOf: *ref_101 + anyOf: *ref_98 pattern: '^\d{3,10}$|^\S{1,64}$' description: >- Contains the authentication value. The format depends on the @@ -6259,12 +6201,12 @@ components: title: AuthenticationInfo type: object description: Data model for the complex type AuthenticationInfo. - properties: *ref_102 - required: *ref_103 + properties: *ref_99 + required: *ref_100 AuthorizationResponse: title: AuthorizationResponse type: string - enum: *ref_104 + enum: *ref_101 description: |- Below are the allowed values for the enumeration. - ENTERED - Consumer entered the authentication value. @@ -6275,12 +6217,12 @@ components: title: AuthorizationsIDPutResponse type: object description: 'The object sent in the PUT /authorizations/{ID} callback.' - properties: *ref_105 - required: *ref_106 + properties: *ref_102 + required: *ref_103 ConsentScopeType: title: ConsentScopeType type: string - enum: *ref_107 + enum: *ref_104 description: | The scopes requested for a ConsentRequest. - "accounts.getBalance" - Get the balance of a given account. @@ -6299,7 +6241,7 @@ components: ConsentRequestChannelType: title: ConsentRequestChannelType type: string - enum: *ref_108 + enum: *ref_105 description: | The auth channel being used for the consentRequest. - "WEB" - The Web auth channel. @@ -6308,8 +6250,8 @@ components: title: ConsentRequestsPostRequest type: object description: The object sent in a `POST /consentRequests` request. - properties: *ref_109 - required: *ref_110 + properties: *ref_106 + required: *ref_107 ConsentRequestChannelTypeWeb: title: ConsentRequestChannelTypeWeb type: string @@ -6331,8 +6273,8 @@ 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_111 - required: *ref_112 + properties: *ref_108 + required: *ref_109 additionalProperties: false ConsentRequestsIDPutResponseWebAuth: title: ConsentRequestsIDPutResponseWebAuth @@ -6347,8 +6289,8 @@ components: OTP or secret to the PISP. - properties: *ref_113 - required: *ref_114 + properties: *ref_110 + required: *ref_111 additionalProperties: false ConsentRequestChannelTypeOTP: title: ConsentRequestChannelTypeOTP @@ -6365,8 +6307,8 @@ components: Schema used in the request consent phase of the account linking OTP/SMS flow. - properties: *ref_115 - required: *ref_116 + properties: *ref_112 + required: *ref_113 additionalProperties: false ConsentRequestsIDPutResponseOTPAuth: title: ConsentRequestsIDPutResponseOTPAuth @@ -6381,21 +6323,21 @@ components: OTP or secret to the PISP. - properties: *ref_117 - required: *ref_118 + properties: *ref_114 + required: *ref_115 additionalProperties: false ConsentRequestsIDPatchRequest: title: ConsentRequestsIDPatchRequest type: object description: 'The object sent in a `PATCH /consentRequests/{ID}` request.' - properties: *ref_119 - required: *ref_120 + properties: *ref_116 + required: *ref_117 ConsentsPostRequest: title: ConsentPostRequest type: object description: The object sent in a `POST /consents` request. - properties: *ref_121 - required: *ref_122 + properties: *ref_118 + required: *ref_119 CredentialType: title: CredentialType type: string @@ -6427,8 +6369,8 @@ components: when updating a credential. - properties: *ref_123 - required: *ref_124 + properties: *ref_120 + required: *ref_121 additionalProperties: false ConsentsIDPutResponseSigned: title: ConsentsIDPutResponseSigned @@ -6442,15 +6384,15 @@ components: Called by a `PISP` to after signing a challenge. Sent to an `auth-service` for verification. - properties: *ref_125 - required: *ref_126 + properties: *ref_122 + required: *ref_123 CredentialChallengeUnsigned: title: CredentialChallengeSigned type: object description: | The challenge issued by a DFSP that must be answered by the PISP. - properties: *ref_127 - required: *ref_128 + properties: *ref_124 + required: *ref_125 additionalProperties: false UnsignedCredential: title: UnsignedCredential @@ -6468,8 +6410,8 @@ components: when updating a credential. - properties: *ref_129 - required: *ref_130 + properties: *ref_126 + required: *ref_127 additionalProperties: false ConsentsIDPutResponseUnsigned: title: ConsentsIDPutResponseUnsigned @@ -6484,8 +6426,8 @@ components: Called by a `auth-service` to request PISP to add the credential details. - properties: *ref_131 - required: *ref_132 + properties: *ref_128 + required: *ref_129 VerifiedCredential: title: VerifiedCredential type: object @@ -6502,8 +6444,8 @@ components: when updating a credential. - properties: *ref_133 - required: *ref_134 + properties: *ref_130 + required: *ref_131 additionalProperties: false ConsentsIDPutResponseVerified: title: ConsentsIDPutResponseVerified @@ -6517,20 +6459,45 @@ components: Called by a `auth-service` to notify a DFSP and PISP that a credential has been verified and registered. - properties: *ref_135 - required: *ref_136 + 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_134 + required: *ref_135 + PartyIdTypeTPLink: + title: PartyIdTypeTPLink + type: string + enum: *ref_136 + description: > + This is a variant based on FSPIOP `PartyIdType` specification. + + This validation interface should be use by `POST + /thirdpartyRequests/transactions` + + - THIRD_PARTY_LINK - is the DFSP's internal reference which allows DFSP + to find out the corresponding consent + example: PERSONAL_ID + PartyIdInfoTPLink: + title: PartyIdInfo + type: object + description: Data model for the complex type PartyIdInfo. properties: *ref_137 required: *ref_138 + PartyTPLink: + title: Party + type: object + description: Data model for the complex type Party. + properties: *ref_139 + required: *ref_140 AmountType: title: AmountType type: string - enum: *ref_139 + enum: *ref_141 description: >- Below are the allowed values for the enumeration AmountType. @@ -6544,16 +6511,16 @@ components: title: ThirdpartyRequestsTransactionsPostRequest type: object description: The object sent in the POST /thirdpartyRequests/transactions request. - properties: *ref_60 - required: *ref_61 + properties: *ref_63 + required: *ref_64 ThirdpartyRequestsTransactionsIDPutResponse: title: ThirdpartyRequestsTransactionsIDPutResponse type: object description: >- The object sent in the PUT /thirdPartyRequests/transactions/{ID} request. - properties: *ref_63 - required: *ref_64 + properties: *ref_66 + required: *ref_67 BinaryString: type: string pattern: '^[A-Za-z0-9-_]+[=]{0,2}$' @@ -6569,16 +6536,16 @@ components: description: >- The object sent in the PUT /thirdpartyRequests/transactions/{id}/authorizations request. - properties: *ref_140 - required: *ref_141 + properties: *ref_142 + required: *ref_143 ThirdpartyRequestsTransactionsIDAuthorizationsPostRequest: title: ThirdpartyRequestsTransactionsIDAuthorizationsPostRequest type: object description: >- The object sent in the POST /thirdpartyRequests/transactions/{id}/authorizations request. - properties: *ref_142 - required: *ref_143 + properties: *ref_144 + required: *ref_145 parameters: ID: name: ID diff --git a/src/thirdparty/index.ts b/src/thirdparty/index.ts index 4cf27c49..f877a385 100644 --- a/src/thirdparty/index.ts +++ b/src/thirdparty/index.ts @@ -14,11 +14,13 @@ export namespace Schemas { export type AuthorizationChannelType = components['schemas']['AuthorizationChannelType'] export type AuthorizationResponseType = components['schemas']['AuthorizationResponseType'] export type AuthorizationsPostRequest = components['schemas']['AuthorizationsPostRequest'] + export type BalanceOfPayments = components['schemas']['BalanceOfPayments'] export type BinaryString = components['schemas']['BinaryString'] export type ConsentRequestChannelType = components['schemas']['ConsentRequestChannelType'] export type ConsentRequestChannelTypeOTP = components['schemas']['ConsentRequestChannelTypeOTP'] export type ConsentRequestChannelTypeWeb = components['schemas']['ConsentRequestChannelTypeWeb'] 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'] @@ -42,6 +44,7 @@ export namespace Schemas { export type ErrorCode = components['schemas']['ErrorCode'] export type ErrorDescription = components['schemas']['ErrorDescription'] export type ErrorInformation = components['schemas']['ErrorInformation'] + export type ErrorInformationResponse = components['schemas']['ErrorInformationResponse'] export type Extension = components['schemas']['Extension'] export type ExtensionKey = components['schemas']['ExtensionKey'] export type ExtensionList = components['schemas']['ExtensionList'] @@ -64,15 +67,20 @@ export namespace Schemas { export type ParticipantsPostRequest = components['schemas']['ParticipantsPostRequest'] export type PartiesTypeIDPutResponse = components['schemas']['PartiesTypeIDPutResponse'] export type Party = components['schemas']['Party'] + export type PartyTPLink = components['schemas']['PartyTPLink'] export type PartyComplexName = components['schemas']['PartyComplexName'] export type PartyIdentifier = components['schemas']['PartyIdentifier'] export type PartyIdInfo = components['schemas']['PartyIdInfo'] + export type PartyIdInfoTPLink = components['schemas']['PartyIdInfoTPLink'] export type PartyIdType = components['schemas']['PartyIdType'] + export type PartyIdTypeTPLink = components['schemas']['PartyIdTypeTPLink'] export type PartyName = components['schemas']['PartyName'] export type PartyPersonalInfo = components['schemas']['PartyPersonalInfo'] export type PartyResult = components['schemas']['PartyResult'] export type PartySubIdOrType = components['schemas']['PartySubIdOrType'] export type QuotesIDPutResponse = components['schemas']['QuotesIDPutResponse'] + export type Refund = components['schemas']['Refund'] + export type RefundReason = components['schemas']['RefundReason'] export type Scope = components['schemas']['Scope'] export type SignedCredential = components['schemas']['SignedCredential'] export type ThirdpartyRequestsTransactionsIDAuthorizationsPostRequest = components['schemas']['ThirdpartyRequestsTransactionsIDAuthorizationsPostRequest'] @@ -80,9 +88,13 @@ export namespace Schemas { export type ThirdpartyRequestsTransactionsIDPatchResponse = components['schemas']['ThirdpartyRequestsTransactionsIDPatchResponse'] export type ThirdpartyRequestsTransactionsIDPutResponse = components['schemas']['ThirdpartyRequestsTransactionsIDPutResponse'] export type ThirdpartyRequestsTransactionsPostRequest = components['schemas']['ThirdpartyRequestsTransactionsPostRequest'] + export type TransactionInitiator = components['schemas']['TransactionInitiator'] + export type TransactionInitiatorType = components['schemas']['TransactionInitiatorType'] export type TransactionRequestsPostRequest = components['schemas']['TransactionRequestsPostRequest'] export type TransactionRequestState = components['schemas']['TransactionRequestState'] + export type TransactionScenario = components['schemas']['TransactionScenario'] export type TransactionState = components['schemas']['TransactionState'] + export type TransactionSubScenario = components['schemas']['TransactionSubScenario'] export type TransactionType = components['schemas']['TransactionType'] export type UnsignedCredential = components['schemas']['UnsignedCredential'] export type VerifiedCredential = components['schemas']['VerifiedCredential'] diff --git a/src/thirdparty/openapi.ts b/src/thirdparty/openapi.ts index ca80095d..471e3861 100644 --- a/src/thirdparty/openapi.ts +++ b/src/thirdparty/openapi.ts @@ -113,7 +113,7 @@ export interface paths { }; }; "/authorizations": { - post: operations["InboundAuthorizationsPostRequest"]; + post: operations["AuthorizationsPostRequest"]; }; "/authorizations/{ID}": { put: operations["InboundAuthorizationsIDPutResponse"]; @@ -3999,10 +3999,9 @@ export interface operations { /** * The HTTP request `POST /authorizations` is used to request the Payer to enter the applicable credentials in the PISP system. */ - InboundAuthorizationsPostRequest: { + AuthorizationsPostRequest: { requestBody: { "application/json": { - toParticipantId?: string; /** * Below are the allowed values for the enumeration AuthenticationType. * - OTP - One-time password generated by the Payer FSP. @@ -9779,14 +9778,6 @@ export interface operations { * Common ID between the FSPs for the transaction request object. The ID should be reused for resends of the same transaction request. A new ID should be generated for each new transaction request. */ transactionRequestId: string; - /** - * DFSP specific account identifiers, e.g. `dfspa.alice.1234` - */ - sourceAccountId: string; - /** - * Common ID between the PISP and FSP for the Consent object This tells DFSP and auth-service which constent allows the PISP to initiate transaction. - */ - consentId: string; /** * Information about the Payee in the proposed financial transaction. */ @@ -10304,57 +10295,10 @@ export interface operations { partyIdInfo: { /** * This is a variant based on FSPIOP `PartyIdType` specification. - * Main difference being the CONSENT and THIRD_PARTY_LINK enums. - * - * Below are the allowed values for the enumeration. - * - MSISDN - An MSISDN (Mobile Station International Subscriber Directory - * Number, that is, the phone number) is used as reference to a participant. - * The MSISDN identifier should be in international format according to the - * [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). - * Optionally, the MSISDN may be prefixed by a single plus sign, indicating the - * international prefix. - * - EMAIL - An email is used as reference to a - * participant. The format of the email should be according to the informational - * [RFC 3696](https://tools.ietf.org/html/rfc3696). - * - PERSONAL_ID - A personal identifier is used as reference to a participant. - * Examples of personal identification are passport number, birth certificate - * number, and national registration number. The identifier number is added in - * the PartyIdentifier element. The personal identifier type is added in the - * PartySubIdOrType element. - * - BUSINESS - A specific Business (for example, an organization or a company) - * is used as reference to a participant. The BUSINESS identifier can be in any - * format. To make a transaction connected to a specific username or bill number - * in a Business, the PartySubIdOrType element should be used. - * - DEVICE - A specific device (for example, a POS or ATM) ID connected to a - * specific business or organization is used as reference to a Party. - * For referencing a specific device under a specific business or organization, - * use the PartySubIdOrType element. - * - ACCOUNT_ID - A bank account number or FSP account ID should be used as - * reference to a participant. The ACCOUNT_ID identifier can be in any format, - * as formats can greatly differ depending on country and FSP. - * - IBAN - A bank account number or FSP account ID is used as reference to a - * participant. The IBAN identifier can consist of up to 34 alphanumeric - * characters and should be entered without whitespace. - * - ALIAS An alias is used as reference to a participant. The alias should be - * created in the FSP as an alternative reference to an account owner. - * Another example of an alias is a username in the FSP system. - * The ALIAS identifier can be in any format. It is also possible to use the - * PartySubIdOrType element for identifying an account under an Alias defined - * by the PartyIdentifier. - * - CONSENT - TBD - * - THIRD_PARTY_LINK - TBD + * This validation interface should be use by `POST /thirdpartyRequests/transactions` + * - THIRD_PARTY_LINK - is the DFSP's internal reference which allows DFSP to find out the corresponding consent */ - partyIdType: - | "MSISDN" - | "EMAIL" - | "PERSONAL_ID" - | "BUSINESS" - | "DEVICE" - | "ACCOUNT_ID" - | "IBAN" - | "ALIAS" - | "CONSENT" - | "THIRD_PARTY_LINK"; + partyIdType: "THIRD_PARTY_LINK"; /** * Identifier of the Party. */ @@ -10981,14 +10925,6 @@ export interface operations { * Common ID between the FSPs for the transaction request object. The ID should be reused for resends of the same transaction request. A new ID should be generated for each new transaction request. */ transactionRequestId: string; - /** - * DFSP specific account identifiers, e.g. `dfspa.alice.1234` - */ - sourceAccountId: string; - /** - * Common ID between the PISP and FSP for the Consent object This tells DFSP and auth-service which constent allows the PISP to initiate transaction. - */ - consentId: string; /** * Information about the Payee in the proposed financial transaction. */ @@ -11506,57 +11442,10 @@ export interface operations { partyIdInfo: { /** * This is a variant based on FSPIOP `PartyIdType` specification. - * Main difference being the CONSENT and THIRD_PARTY_LINK enums. - * - * Below are the allowed values for the enumeration. - * - MSISDN - An MSISDN (Mobile Station International Subscriber Directory - * Number, that is, the phone number) is used as reference to a participant. - * The MSISDN identifier should be in international format according to the - * [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). - * Optionally, the MSISDN may be prefixed by a single plus sign, indicating the - * international prefix. - * - EMAIL - An email is used as reference to a - * participant. The format of the email should be according to the informational - * [RFC 3696](https://tools.ietf.org/html/rfc3696). - * - PERSONAL_ID - A personal identifier is used as reference to a participant. - * Examples of personal identification are passport number, birth certificate - * number, and national registration number. The identifier number is added in - * the PartyIdentifier element. The personal identifier type is added in the - * PartySubIdOrType element. - * - BUSINESS - A specific Business (for example, an organization or a company) - * is used as reference to a participant. The BUSINESS identifier can be in any - * format. To make a transaction connected to a specific username or bill number - * in a Business, the PartySubIdOrType element should be used. - * - DEVICE - A specific device (for example, a POS or ATM) ID connected to a - * specific business or organization is used as reference to a Party. - * For referencing a specific device under a specific business or organization, - * use the PartySubIdOrType element. - * - ACCOUNT_ID - A bank account number or FSP account ID should be used as - * reference to a participant. The ACCOUNT_ID identifier can be in any format, - * as formats can greatly differ depending on country and FSP. - * - IBAN - A bank account number or FSP account ID is used as reference to a - * participant. The IBAN identifier can consist of up to 34 alphanumeric - * characters and should be entered without whitespace. - * - ALIAS An alias is used as reference to a participant. The alias should be - * created in the FSP as an alternative reference to an account owner. - * Another example of an alias is a username in the FSP system. - * The ALIAS identifier can be in any format. It is also possible to use the - * PartySubIdOrType element for identifying an account under an Alias defined - * by the PartyIdentifier. - * - CONSENT - TBD - * - THIRD_PARTY_LINK - TBD + * This validation interface should be use by `POST /thirdpartyRequests/transactions` + * - THIRD_PARTY_LINK - is the DFSP's internal reference which allows DFSP to find out the corresponding consent */ - partyIdType: - | "MSISDN" - | "EMAIL" - | "PERSONAL_ID" - | "BUSINESS" - | "DEVICE" - | "ACCOUNT_ID" - | "IBAN" - | "ALIAS" - | "CONSENT" - | "THIRD_PARTY_LINK"; + partyIdType: "THIRD_PARTY_LINK"; /** * Identifier of the Party. */ @@ -19272,1040 +19161,92 @@ export interface components { }; }; /** - * POST /authorizations Request object + * 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. + */ + OtpValue: string; + /** + * QR code used as a One Time Password. + */ + QRCODE: string; + /** + * U2F challenge-response, where payer FSP verifies if the response provided by end-user device matches the previously registered key. + */ + U2FPIN: string; + /** + * U2F challenge-response, where payer FSP verifies if the response provided by end-user device matches the previously registered key. + */ + U2FPinValue: { + /** + * U2F challenge-response. + */ + pinValue: string; + /** + * Sequential counter used for cloning detection. Present only for U2F authentication. + */ + counter: string; + }; + /** + * Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type. + */ + AuthenticationValue: Partial & + Partial & + Partial<{ + /** + * U2F challenge-response. + */ + pinValue: string; + /** + * Sequential counter used for cloning detection. Present only for U2F authentication. + */ + counter: string; + }>; + /** + * Data model for the complex type AuthenticationInfo. */ - InboundAuthorizationsPostRequest: { - toParticipantId?: string; + AuthenticationInfo: { /** * Below are the allowed values for the enumeration AuthenticationType. * - OTP - One-time password generated by the Payer FSP. * - QRCODE - QR code used as One Time Password. * - U2F - U2F is a new addition isolated to Thirdparty stream. */ - authenticationType: "OTP" | "QRCODE" | "U2F"; + authentication: "OTP" | "QRCODE" | "U2F"; /** - * The API data type Integer is a JSON String consisting of digits only. Negative numbers and leading zeroes are not allowed. The data type is always limited to a specific number of digits. + * Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type. */ - retriesLeft: string; + authenticationValue: Partial & + Partial & + Partial<{ + /** + * U2F challenge-response. + */ + pinValue: string; + /** + * Sequential counter used for cloning detection. Present only for U2F authentication. + */ + counter: string; + }>; + }; + /** + * Below are the allowed values for the enumeration. + * - ENTERED - Consumer entered the authentication value. + * - REJECTED - Consumer rejected the transaction. + * - RESEND - Consumer requested to resend the authentication value. + */ + AuthorizationResponse: "ENTERED" | "REJECTED" | "RESEND"; + /** + * The object sent in the PUT /authorizations/{ID} callback. + */ + AuthorizationsIDPutResponse: { /** - * Data model for the complex type Money. + * Data model for the complex type AuthenticationInfo. */ - amount: { + authenticationInfo?: { /** - * The currency codes defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter alphabetic codes are used as the standard naming representation for currencies. - */ - currency: - | "AED" - | "AFN" - | "ALL" - | "AMD" - | "ANG" - | "AOA" - | "ARS" - | "AUD" - | "AWG" - | "AZN" - | "BAM" - | "BBD" - | "BDT" - | "BGN" - | "BHD" - | "BIF" - | "BMD" - | "BND" - | "BOB" - | "BRL" - | "BSD" - | "BTN" - | "BWP" - | "BYN" - | "BZD" - | "CAD" - | "CDF" - | "CHF" - | "CLP" - | "CNY" - | "COP" - | "CRC" - | "CUC" - | "CUP" - | "CVE" - | "CZK" - | "DJF" - | "DKK" - | "DOP" - | "DZD" - | "EGP" - | "ERN" - | "ETB" - | "EUR" - | "FJD" - | "FKP" - | "GBP" - | "GEL" - | "GGP" - | "GHS" - | "GIP" - | "GMD" - | "GNF" - | "GTQ" - | "GYD" - | "HKD" - | "HNL" - | "HRK" - | "HTG" - | "HUF" - | "IDR" - | "ILS" - | "IMP" - | "INR" - | "IQD" - | "IRR" - | "ISK" - | "JEP" - | "JMD" - | "JOD" - | "JPY" - | "KES" - | "KGS" - | "KHR" - | "KMF" - | "KPW" - | "KRW" - | "KWD" - | "KYD" - | "KZT" - | "LAK" - | "LBP" - | "LKR" - | "LRD" - | "LSL" - | "LYD" - | "MAD" - | "MDL" - | "MGA" - | "MKD" - | "MMK" - | "MNT" - | "MOP" - | "MRO" - | "MUR" - | "MVR" - | "MWK" - | "MXN" - | "MYR" - | "MZN" - | "NAD" - | "NGN" - | "NIO" - | "NOK" - | "NPR" - | "NZD" - | "OMR" - | "PAB" - | "PEN" - | "PGK" - | "PHP" - | "PKR" - | "PLN" - | "PYG" - | "QAR" - | "RON" - | "RSD" - | "RUB" - | "RWF" - | "SAR" - | "SBD" - | "SCR" - | "SDG" - | "SEK" - | "SGD" - | "SHP" - | "SLL" - | "SOS" - | "SPL" - | "SRD" - | "STD" - | "SVC" - | "SYP" - | "SZL" - | "THB" - | "TJS" - | "TMT" - | "TND" - | "TOP" - | "TRY" - | "TTD" - | "TVD" - | "TWD" - | "TZS" - | "UAH" - | "UGX" - | "USD" - | "UYU" - | "UZS" - | "VEF" - | "VND" - | "VUV" - | "WST" - | "XAF" - | "XCD" - | "XDR" - | "XOF" - | "XPF" - | "YER" - | "ZAR" - | "ZMW" - | "ZWD"; - /** - * The API data type Amount is a JSON String in a canonical format that is restricted by a regular expression for interoperability reasons. This pattern does not allow any trailing zeroes at all, but allows an amount without a minor currency unit. It also only allows four digits in the minor currency unit; a negative value is not allowed. Using more than 18 digits in the major currency unit is not allowed. - */ - amount: string; - }; - /** - * 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 (‘-‘). - */ - transactionId: string; - /** - * 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 (‘-‘). - */ - transactionRequestId: string; - /** - * The object sent in the PUT /quotes/{ID} callback. - */ - quote: { - /** - * Data model for the complex type Money. - */ - transferAmount: { - /** - * The currency codes defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter alphabetic codes are used as the standard naming representation for currencies. - */ - currency: - | "AED" - | "AFN" - | "ALL" - | "AMD" - | "ANG" - | "AOA" - | "ARS" - | "AUD" - | "AWG" - | "AZN" - | "BAM" - | "BBD" - | "BDT" - | "BGN" - | "BHD" - | "BIF" - | "BMD" - | "BND" - | "BOB" - | "BRL" - | "BSD" - | "BTN" - | "BWP" - | "BYN" - | "BZD" - | "CAD" - | "CDF" - | "CHF" - | "CLP" - | "CNY" - | "COP" - | "CRC" - | "CUC" - | "CUP" - | "CVE" - | "CZK" - | "DJF" - | "DKK" - | "DOP" - | "DZD" - | "EGP" - | "ERN" - | "ETB" - | "EUR" - | "FJD" - | "FKP" - | "GBP" - | "GEL" - | "GGP" - | "GHS" - | "GIP" - | "GMD" - | "GNF" - | "GTQ" - | "GYD" - | "HKD" - | "HNL" - | "HRK" - | "HTG" - | "HUF" - | "IDR" - | "ILS" - | "IMP" - | "INR" - | "IQD" - | "IRR" - | "ISK" - | "JEP" - | "JMD" - | "JOD" - | "JPY" - | "KES" - | "KGS" - | "KHR" - | "KMF" - | "KPW" - | "KRW" - | "KWD" - | "KYD" - | "KZT" - | "LAK" - | "LBP" - | "LKR" - | "LRD" - | "LSL" - | "LYD" - | "MAD" - | "MDL" - | "MGA" - | "MKD" - | "MMK" - | "MNT" - | "MOP" - | "MRO" - | "MUR" - | "MVR" - | "MWK" - | "MXN" - | "MYR" - | "MZN" - | "NAD" - | "NGN" - | "NIO" - | "NOK" - | "NPR" - | "NZD" - | "OMR" - | "PAB" - | "PEN" - | "PGK" - | "PHP" - | "PKR" - | "PLN" - | "PYG" - | "QAR" - | "RON" - | "RSD" - | "RUB" - | "RWF" - | "SAR" - | "SBD" - | "SCR" - | "SDG" - | "SEK" - | "SGD" - | "SHP" - | "SLL" - | "SOS" - | "SPL" - | "SRD" - | "STD" - | "SVC" - | "SYP" - | "SZL" - | "THB" - | "TJS" - | "TMT" - | "TND" - | "TOP" - | "TRY" - | "TTD" - | "TVD" - | "TWD" - | "TZS" - | "UAH" - | "UGX" - | "USD" - | "UYU" - | "UZS" - | "VEF" - | "VND" - | "VUV" - | "WST" - | "XAF" - | "XCD" - | "XDR" - | "XOF" - | "XPF" - | "YER" - | "ZAR" - | "ZMW" - | "ZWD"; - /** - * The API data type Amount is a JSON String in a canonical format that is restricted by a regular expression for interoperability reasons. This pattern does not allow any trailing zeroes at all, but allows an amount without a minor currency unit. It also only allows four digits in the minor currency unit; a negative value is not allowed. Using more than 18 digits in the major currency unit is not allowed. - */ - amount: string; - }; - /** - * Data model for the complex type Money. - */ - payeeReceiveAmount?: { - /** - * The currency codes defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter alphabetic codes are used as the standard naming representation for currencies. - */ - currency: - | "AED" - | "AFN" - | "ALL" - | "AMD" - | "ANG" - | "AOA" - | "ARS" - | "AUD" - | "AWG" - | "AZN" - | "BAM" - | "BBD" - | "BDT" - | "BGN" - | "BHD" - | "BIF" - | "BMD" - | "BND" - | "BOB" - | "BRL" - | "BSD" - | "BTN" - | "BWP" - | "BYN" - | "BZD" - | "CAD" - | "CDF" - | "CHF" - | "CLP" - | "CNY" - | "COP" - | "CRC" - | "CUC" - | "CUP" - | "CVE" - | "CZK" - | "DJF" - | "DKK" - | "DOP" - | "DZD" - | "EGP" - | "ERN" - | "ETB" - | "EUR" - | "FJD" - | "FKP" - | "GBP" - | "GEL" - | "GGP" - | "GHS" - | "GIP" - | "GMD" - | "GNF" - | "GTQ" - | "GYD" - | "HKD" - | "HNL" - | "HRK" - | "HTG" - | "HUF" - | "IDR" - | "ILS" - | "IMP" - | "INR" - | "IQD" - | "IRR" - | "ISK" - | "JEP" - | "JMD" - | "JOD" - | "JPY" - | "KES" - | "KGS" - | "KHR" - | "KMF" - | "KPW" - | "KRW" - | "KWD" - | "KYD" - | "KZT" - | "LAK" - | "LBP" - | "LKR" - | "LRD" - | "LSL" - | "LYD" - | "MAD" - | "MDL" - | "MGA" - | "MKD" - | "MMK" - | "MNT" - | "MOP" - | "MRO" - | "MUR" - | "MVR" - | "MWK" - | "MXN" - | "MYR" - | "MZN" - | "NAD" - | "NGN" - | "NIO" - | "NOK" - | "NPR" - | "NZD" - | "OMR" - | "PAB" - | "PEN" - | "PGK" - | "PHP" - | "PKR" - | "PLN" - | "PYG" - | "QAR" - | "RON" - | "RSD" - | "RUB" - | "RWF" - | "SAR" - | "SBD" - | "SCR" - | "SDG" - | "SEK" - | "SGD" - | "SHP" - | "SLL" - | "SOS" - | "SPL" - | "SRD" - | "STD" - | "SVC" - | "SYP" - | "SZL" - | "THB" - | "TJS" - | "TMT" - | "TND" - | "TOP" - | "TRY" - | "TTD" - | "TVD" - | "TWD" - | "TZS" - | "UAH" - | "UGX" - | "USD" - | "UYU" - | "UZS" - | "VEF" - | "VND" - | "VUV" - | "WST" - | "XAF" - | "XCD" - | "XDR" - | "XOF" - | "XPF" - | "YER" - | "ZAR" - | "ZMW" - | "ZWD"; - /** - * The API data type Amount is a JSON String in a canonical format that is restricted by a regular expression for interoperability reasons. This pattern does not allow any trailing zeroes at all, but allows an amount without a minor currency unit. It also only allows four digits in the minor currency unit; a negative value is not allowed. Using more than 18 digits in the major currency unit is not allowed. - */ - amount: string; - }; - /** - * Data model for the complex type Money. - */ - payeeFspFee?: { - /** - * The currency codes defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter alphabetic codes are used as the standard naming representation for currencies. - */ - currency: - | "AED" - | "AFN" - | "ALL" - | "AMD" - | "ANG" - | "AOA" - | "ARS" - | "AUD" - | "AWG" - | "AZN" - | "BAM" - | "BBD" - | "BDT" - | "BGN" - | "BHD" - | "BIF" - | "BMD" - | "BND" - | "BOB" - | "BRL" - | "BSD" - | "BTN" - | "BWP" - | "BYN" - | "BZD" - | "CAD" - | "CDF" - | "CHF" - | "CLP" - | "CNY" - | "COP" - | "CRC" - | "CUC" - | "CUP" - | "CVE" - | "CZK" - | "DJF" - | "DKK" - | "DOP" - | "DZD" - | "EGP" - | "ERN" - | "ETB" - | "EUR" - | "FJD" - | "FKP" - | "GBP" - | "GEL" - | "GGP" - | "GHS" - | "GIP" - | "GMD" - | "GNF" - | "GTQ" - | "GYD" - | "HKD" - | "HNL" - | "HRK" - | "HTG" - | "HUF" - | "IDR" - | "ILS" - | "IMP" - | "INR" - | "IQD" - | "IRR" - | "ISK" - | "JEP" - | "JMD" - | "JOD" - | "JPY" - | "KES" - | "KGS" - | "KHR" - | "KMF" - | "KPW" - | "KRW" - | "KWD" - | "KYD" - | "KZT" - | "LAK" - | "LBP" - | "LKR" - | "LRD" - | "LSL" - | "LYD" - | "MAD" - | "MDL" - | "MGA" - | "MKD" - | "MMK" - | "MNT" - | "MOP" - | "MRO" - | "MUR" - | "MVR" - | "MWK" - | "MXN" - | "MYR" - | "MZN" - | "NAD" - | "NGN" - | "NIO" - | "NOK" - | "NPR" - | "NZD" - | "OMR" - | "PAB" - | "PEN" - | "PGK" - | "PHP" - | "PKR" - | "PLN" - | "PYG" - | "QAR" - | "RON" - | "RSD" - | "RUB" - | "RWF" - | "SAR" - | "SBD" - | "SCR" - | "SDG" - | "SEK" - | "SGD" - | "SHP" - | "SLL" - | "SOS" - | "SPL" - | "SRD" - | "STD" - | "SVC" - | "SYP" - | "SZL" - | "THB" - | "TJS" - | "TMT" - | "TND" - | "TOP" - | "TRY" - | "TTD" - | "TVD" - | "TWD" - | "TZS" - | "UAH" - | "UGX" - | "USD" - | "UYU" - | "UZS" - | "VEF" - | "VND" - | "VUV" - | "WST" - | "XAF" - | "XCD" - | "XDR" - | "XOF" - | "XPF" - | "YER" - | "ZAR" - | "ZMW" - | "ZWD"; - /** - * The API data type Amount is a JSON String in a canonical format that is restricted by a regular expression for interoperability reasons. This pattern does not allow any trailing zeroes at all, but allows an amount without a minor currency unit. It also only allows four digits in the minor currency unit; a negative value is not allowed. Using more than 18 digits in the major currency unit is not allowed. - */ - amount: string; - }; - /** - * Data model for the complex type Money. - */ - payeeFspCommission?: { - /** - * The currency codes defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter alphabetic codes are used as the standard naming representation for currencies. - */ - currency: - | "AED" - | "AFN" - | "ALL" - | "AMD" - | "ANG" - | "AOA" - | "ARS" - | "AUD" - | "AWG" - | "AZN" - | "BAM" - | "BBD" - | "BDT" - | "BGN" - | "BHD" - | "BIF" - | "BMD" - | "BND" - | "BOB" - | "BRL" - | "BSD" - | "BTN" - | "BWP" - | "BYN" - | "BZD" - | "CAD" - | "CDF" - | "CHF" - | "CLP" - | "CNY" - | "COP" - | "CRC" - | "CUC" - | "CUP" - | "CVE" - | "CZK" - | "DJF" - | "DKK" - | "DOP" - | "DZD" - | "EGP" - | "ERN" - | "ETB" - | "EUR" - | "FJD" - | "FKP" - | "GBP" - | "GEL" - | "GGP" - | "GHS" - | "GIP" - | "GMD" - | "GNF" - | "GTQ" - | "GYD" - | "HKD" - | "HNL" - | "HRK" - | "HTG" - | "HUF" - | "IDR" - | "ILS" - | "IMP" - | "INR" - | "IQD" - | "IRR" - | "ISK" - | "JEP" - | "JMD" - | "JOD" - | "JPY" - | "KES" - | "KGS" - | "KHR" - | "KMF" - | "KPW" - | "KRW" - | "KWD" - | "KYD" - | "KZT" - | "LAK" - | "LBP" - | "LKR" - | "LRD" - | "LSL" - | "LYD" - | "MAD" - | "MDL" - | "MGA" - | "MKD" - | "MMK" - | "MNT" - | "MOP" - | "MRO" - | "MUR" - | "MVR" - | "MWK" - | "MXN" - | "MYR" - | "MZN" - | "NAD" - | "NGN" - | "NIO" - | "NOK" - | "NPR" - | "NZD" - | "OMR" - | "PAB" - | "PEN" - | "PGK" - | "PHP" - | "PKR" - | "PLN" - | "PYG" - | "QAR" - | "RON" - | "RSD" - | "RUB" - | "RWF" - | "SAR" - | "SBD" - | "SCR" - | "SDG" - | "SEK" - | "SGD" - | "SHP" - | "SLL" - | "SOS" - | "SPL" - | "SRD" - | "STD" - | "SVC" - | "SYP" - | "SZL" - | "THB" - | "TJS" - | "TMT" - | "TND" - | "TOP" - | "TRY" - | "TTD" - | "TVD" - | "TWD" - | "TZS" - | "UAH" - | "UGX" - | "USD" - | "UYU" - | "UZS" - | "VEF" - | "VND" - | "VUV" - | "WST" - | "XAF" - | "XCD" - | "XDR" - | "XOF" - | "XPF" - | "YER" - | "ZAR" - | "ZMW" - | "ZWD"; - /** - * The API data type Amount is a JSON String in a canonical format that is restricted by a regular expression for interoperability reasons. This pattern does not allow any trailing zeroes at all, but allows an amount without a minor currency unit. It also only allows four digits in the minor currency unit; a negative value is not allowed. Using more than 18 digits in the major currency unit is not allowed. - */ - amount: string; - }; - /** - * The API data type DateTime is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. The format is according to [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html), expressed in a combined date, time and time zone format. A more readable version of the format is yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are "2016-05-24T08:38:08.699-04:00", "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time zone, same as UTC). - */ - expiration: string; - /** - * Data model for the complex type GeoCode. Indicates the geographic location from where the transaction was initiated. - */ - geoCode?: { - /** - * The API data type Latitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. - */ - latitude: string; - /** - * The API data type Longitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. - */ - longitude: string; - }; - /** - * Information for recipient (transport layer information). - */ - ilpPacket: string; - /** - * Condition that must be attached to the transfer by the Payer. - */ - condition: string; - /** - * Data model for the complex type ExtensionList. An optional list of extensions, specific to deployment. - */ - extensionList?: { - /** - * Number of Extension elements. - */ - extension: { - /** - * Extension key. - */ - key: string; - /** - * Extension value. - */ - value: string; - }[]; - }; - }; - }; - /** - * 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. - */ - OtpValue: string; - /** - * QR code used as a One Time Password. - */ - QRCODE: string; - /** - * U2F challenge-response, where payer FSP verifies if the response provided by end-user device matches the previously registered key. - */ - U2FPIN: string; - /** - * U2F challenge-response, where payer FSP verifies if the response provided by end-user device matches the previously registered key. - */ - U2FPinValue: { - /** - * U2F challenge-response. - */ - pinValue: string; - /** - * Sequential counter used for cloning detection. Present only for U2F authentication. - */ - counter: string; - }; - /** - * Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type. - */ - AuthenticationValue: Partial & - Partial & - Partial<{ - /** - * U2F challenge-response. - */ - pinValue: string; - /** - * Sequential counter used for cloning detection. Present only for U2F authentication. - */ - counter: string; - }>; - /** - * Data model for the complex type AuthenticationInfo. - */ - AuthenticationInfo: { - /** - * Below are the allowed values for the enumeration AuthenticationType. - * - OTP - One-time password generated by the Payer FSP. - * - QRCODE - QR code used as One Time Password. - * - U2F - U2F is a new addition isolated to Thirdparty stream. - */ - authentication: "OTP" | "QRCODE" | "U2F"; - /** - * Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type. - */ - authenticationValue: Partial & - Partial & - Partial<{ - /** - * U2F challenge-response. - */ - pinValue: string; - /** - * Sequential counter used for cloning detection. Present only for U2F authentication. - */ - counter: string; - }>; - }; - /** - * Below are the allowed values for the enumeration. - * - ENTERED - Consumer entered the authentication value. - * - REJECTED - Consumer rejected the transaction. - * - RESEND - Consumer requested to resend the authentication value. - */ - AuthorizationResponse: "ENTERED" | "REJECTED" | "RESEND"; - /** - * The object sent in the PUT /authorizations/{ID} callback. - */ - AuthorizationsIDPutResponse: { - /** - * Data model for the complex type AuthenticationInfo. - */ - authenticationInfo?: { - /** - * Below are the allowed values for the enumeration AuthenticationType. - * - OTP - One-time password generated by the Payer FSP. - * - QRCODE - QR code used as One Time Password. - * - U2F - U2F is a new addition isolated to Thirdparty stream. + * Below are the allowed values for the enumeration AuthenticationType. + * - OTP - One-time password generated by the Payer FSP. + * - QRCODE - QR code used as One Time Password. + * - U2F - U2F is a new addition isolated to Thirdparty stream. */ authentication: "OTP" | "QRCODE" | "U2F"; /** @@ -20647,16 +19588,221 @@ export interface components { /** * The id of a Credential. */ - id: string; + id: string; + /** + * The type of the Credential. + * - "FIDO" - A FIDO public/private keypair. + */ + type: "FIDO"; + /** + * The challenge has signed but not yet verified. + */ + status: "PENDING"; + /** + * The challenge that has been signed by a PISP. + */ + challenge: { + /** + * Base64 encoded binary of the challenge that must be answered by the PISP. + */ + payload: string; + /** + * Base64 encoded binary string or result of the payload signed by the PISP using the private key. + */ + signature: string; + }; + /** + * Base64 encoded bytes - The public key of the Public/Private keypair. + */ + payload: string; + }; + }; + /** + * The challenge issued by a DFSP that must be answered by the PISP. + */ + CredentialChallengeUnsigned: { + /** + * Base64 encoded binary of the challenge that must be answered by the PISP. + */ + payload: string; + }; + /** + * A credential used to allow a user to prove their identity and access + * to an account with a DFSP. + * + * UnsignedCredential is a special formatting of the credential to allow us to be + * more explicit about the `status` field - it should only ever be PENDING when updating + * a credential. + */ + UnsignedCredential: { + /** + * The type of the Credential. + * - "FIDO" - A FIDO public/private keypair. + */ + type: "FIDO"; + /** + * The challenge has initialized but not yet answered by the PISP. + */ + status: "PENDING"; + /** + * The challenge issued by a DFSP that must be answered by the PISP. + */ + challenge: { + /** + * Base64 encoded binary of the challenge that must be answered by the PISP. + */ + payload: string; + }; + }; + /** + * The HTTP request `PUT /consents/{ID}` is used to request a PISP to sign a challenge. + * The `{ID}` in the URI should contain the `{ID}` that was used in the `POST /consents`. + * + * Called by a `auth-service` to request PISP to add the credential details. + */ + ConsentsIDPutResponseUnsigned: { + /** + * The id of the ConsentRequest that was used to initiate the + * creation of this Consent. + */ + requestId: string; + /** + * FSP identifier. + */ + participantId: string; + /** + * PISP identifier who uses this Consent. + */ + 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")[]; + }[]; + /** + * A credential used to allow a user to prove their identity and access + * to an account with a DFSP. + * + * UnsignedCredential is a special formatting of the credential to allow us to be + * more explicit about the `status` field - it should only ever be PENDING when updating + * a credential. + */ + credential: { + /** + * The type of the Credential. + * - "FIDO" - A FIDO public/private keypair. + */ + type: "FIDO"; + /** + * The challenge has initialized but not yet answered by the PISP. + */ + status: "PENDING"; + /** + * The challenge issued by a DFSP that must be answered by the PISP. + */ + challenge: { + /** + * Base64 encoded binary of the challenge that must be answered by the PISP. + */ + payload: string; + }; + }; + }; + /** + * A credential used to allow a user to prove their identity and access + * to an account with a DFSP. + * + * VerifiedCredential is a special formatting of the credential to allow us to be + * more explicit about the `status` field - it should only ever be VERIFIED when updating + * a credential. + */ + VerifiedCredential: { + /** + * The id of a Credential. + */ + id?: string; + /** + * The type of the Credential. + * - "FIDO" - A FIDO public/private keypair. + */ + type: "FIDO"; + /** + * The Credential is valid, and ready to be used by the PISP. + */ + status: "VERIFIED"; + /** + * The challenge that has been signed by a PISP. + */ + challenge: { + /** + * Base64 encoded binary of the challenge that must be answered by the PISP. + */ + payload: string; + /** + * Base64 encoded binary string or result of the payload signed by the PISP using the private key. + */ + signature: string; + }; + /** + * Base64 encoded bytes - The public key of the Public/Private keypair. + */ + payload?: string; + }; + /** + * The HTTP request `PUT /consents/{ID}` is used by the DFSP or Auth-Service to + * update a Consent object once it has been Verified. + * + * Called by a `auth-service` to notify a DFSP and PISP that a credential has been verified and registered. + */ + ConsentsIDPutResponseVerified: { + /** + * The id of the ConsentRequest that was used to initiate the + * creation of this Consent. + */ + requestId: string; + /** + * FSP identifier. + */ + participantId: string; + /** + * PISP identifier who uses this Consent. + */ + 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")[]; + }[]; + /** + * A credential used to allow a user to prove their identity and access + * to an account with a DFSP. + * + * VerifiedCredential is a special formatting of the credential to allow us to be + * more explicit about the `status` field - it should only ever be VERIFIED when updating + * a credential. + */ + credential: { + /** + * The id of a Credential. + */ + id?: string; /** * The type of the Credential. * - "FIDO" - A FIDO public/private keypair. */ type: "FIDO"; /** - * The challenge has signed but not yet verified. + * The Credential is valid, and ready to be used by the PISP. */ - status: "PENDING"; + status: "VERIFIED"; /** * The challenge that has been signed by a PISP. */ @@ -20673,225 +19819,337 @@ export interface components { /** * Base64 encoded bytes - The public key of the Public/Private keypair. */ - payload: string; + payload?: string; }; }; /** - * The challenge issued by a DFSP that must be answered by the PISP. + * A credential used to allow a user to prove their identity + * and access to an account with a DFSP. */ - CredentialChallengeUnsigned: { + ConsentsIDGenerateChallengePostRequest: { /** - * Base64 encoded binary of the challenge that must be answered by the PISP. + * The type of the Credential. + * - "FIDO" - A FIDO public/private keypair. */ - payload: string; + type: "FIDO"; }; /** - * A credential used to allow a user to prove their identity and access - * to an account with a DFSP. - * - * UnsignedCredential is a special formatting of the credential to allow us to be - * more explicit about the `status` field - it should only ever be PENDING when updating - * a credential. + * This is a variant based on FSPIOP `PartyIdType` specification. + * This validation interface should be use by `POST /thirdpartyRequests/transactions` + * - THIRD_PARTY_LINK - is the DFSP's internal reference which allows DFSP to find out the corresponding consent */ - UnsignedCredential: { + PartyIdTypeTPLink: "THIRD_PARTY_LINK"; + /** + * Data model for the complex type PartyIdInfo. + */ + PartyIdInfoTPLink: { /** - * The type of the Credential. - * - "FIDO" - A FIDO public/private keypair. + * This is a variant based on FSPIOP `PartyIdType` specification. + * This validation interface should be use by `POST /thirdpartyRequests/transactions` + * - THIRD_PARTY_LINK - is the DFSP's internal reference which allows DFSP to find out the corresponding consent */ - type: "FIDO"; + partyIdType: "THIRD_PARTY_LINK"; /** - * The challenge has initialized but not yet answered by the PISP. + * Identifier of the Party. */ - status: "PENDING"; + partyIdentifier: string; + /** + * Either a sub-identifier of a PartyIdentifier, or a sub-type of the PartyIdType, normally a PersonalIdentifierType. + */ + partySubIdOrType?: string; + /** + * FSP identifier. + */ + fspId?: string; + /** + * Data model for the complex type ExtensionList. An optional list of extensions, specific to deployment. + */ + extensionList?: { + /** + * Number of Extension elements. + */ + extension: { + /** + * Extension key. + */ + key: string; + /** + * Extension value. + */ + value: string; + }[]; + }; + }; + /** + * Data model for the complex type Party. + */ + PartyTPLink: { + /** + * Data model for the complex type AccountList. + */ + accounts?: { + /** + * Accounts associated with the Party. + */ + account: { + /** + * 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. + */ + address?: string; + /** + * The currency codes defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter alphabetic codes are used as the standard naming representation for currencies. + */ + currency: + | "AED" + | "AFN" + | "ALL" + | "AMD" + | "ANG" + | "AOA" + | "ARS" + | "AUD" + | "AWG" + | "AZN" + | "BAM" + | "BBD" + | "BDT" + | "BGN" + | "BHD" + | "BIF" + | "BMD" + | "BND" + | "BOB" + | "BRL" + | "BSD" + | "BTN" + | "BWP" + | "BYN" + | "BZD" + | "CAD" + | "CDF" + | "CHF" + | "CLP" + | "CNY" + | "COP" + | "CRC" + | "CUC" + | "CUP" + | "CVE" + | "CZK" + | "DJF" + | "DKK" + | "DOP" + | "DZD" + | "EGP" + | "ERN" + | "ETB" + | "EUR" + | "FJD" + | "FKP" + | "GBP" + | "GEL" + | "GGP" + | "GHS" + | "GIP" + | "GMD" + | "GNF" + | "GTQ" + | "GYD" + | "HKD" + | "HNL" + | "HRK" + | "HTG" + | "HUF" + | "IDR" + | "ILS" + | "IMP" + | "INR" + | "IQD" + | "IRR" + | "ISK" + | "JEP" + | "JMD" + | "JOD" + | "JPY" + | "KES" + | "KGS" + | "KHR" + | "KMF" + | "KPW" + | "KRW" + | "KWD" + | "KYD" + | "KZT" + | "LAK" + | "LBP" + | "LKR" + | "LRD" + | "LSL" + | "LYD" + | "MAD" + | "MDL" + | "MGA" + | "MKD" + | "MMK" + | "MNT" + | "MOP" + | "MRO" + | "MUR" + | "MVR" + | "MWK" + | "MXN" + | "MYR" + | "MZN" + | "NAD" + | "NGN" + | "NIO" + | "NOK" + | "NPR" + | "NZD" + | "OMR" + | "PAB" + | "PEN" + | "PGK" + | "PHP" + | "PKR" + | "PLN" + | "PYG" + | "QAR" + | "RON" + | "RSD" + | "RUB" + | "RWF" + | "SAR" + | "SBD" + | "SCR" + | "SDG" + | "SEK" + | "SGD" + | "SHP" + | "SLL" + | "SOS" + | "SPL" + | "SRD" + | "STD" + | "SVC" + | "SYP" + | "SZL" + | "THB" + | "TJS" + | "TMT" + | "TND" + | "TOP" + | "TRY" + | "TTD" + | "TVD" + | "TWD" + | "TZS" + | "UAH" + | "UGX" + | "USD" + | "UYU" + | "UZS" + | "VEF" + | "VND" + | "VUV" + | "WST" + | "XAF" + | "XCD" + | "XDR" + | "XOF" + | "XPF" + | "YER" + | "ZAR" + | "ZMW" + | "ZWD"; + /** + * The API data type Name is a JSON String, restricted by a regular expression to avoid characters which are generally not used in a name. + * + * Regular Expression - The regular expression for restricting the Name type is "^(?!\s*$)[\w .,'-]{1,128}$". The restriction does not allow a string consisting of whitespace only, all Unicode characters are allowed, as well as the period (.) (apostrophe (‘), dash (-), comma (,) and space characters ( ). + * + * **Note:** In some programming languages, Unicode support must be specifically enabled. For example, if Java is used, the flag UNICODE_CHARACTER_CLASS must be enabled to allow Unicode characters. + */ + description?: string; + }[]; + }; /** - * The challenge issued by a DFSP that must be answered by the PISP. + * Data model for the complex type PartyIdInfo. */ - challenge: { + partyIdInfo: { /** - * Base64 encoded binary of the challenge that must be answered by the PISP. + * This is a variant based on FSPIOP `PartyIdType` specification. + * This validation interface should be use by `POST /thirdpartyRequests/transactions` + * - THIRD_PARTY_LINK - is the DFSP's internal reference which allows DFSP to find out the corresponding consent */ - payload: string; - }; - }; - /** - * The HTTP request `PUT /consents/{ID}` is used to request a PISP to sign a challenge. - * The `{ID}` in the URI should contain the `{ID}` that was used in the `POST /consents`. - * - * Called by a `auth-service` to request PISP to add the credential details. - */ - ConsentsIDPutResponseUnsigned: { - /** - * The id of the ConsentRequest that was used to initiate the - * creation of this Consent. - */ - requestId: string; - /** - * FSP identifier. - */ - participantId: string; - /** - * PISP identifier who uses this Consent. - */ - initiatorId: string; - scopes: { + partyIdType: "THIRD_PARTY_LINK"; /** - * 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. + * Identifier of the Party. */ - accountId: string; - actions: ("accounts.getBalance" | "accounts.transfer")[]; - }[]; - /** - * A credential used to allow a user to prove their identity and access - * to an account with a DFSP. - * - * UnsignedCredential is a special formatting of the credential to allow us to be - * more explicit about the `status` field - it should only ever be PENDING when updating - * a credential. - */ - credential: { + partyIdentifier: string; /** - * The type of the Credential. - * - "FIDO" - A FIDO public/private keypair. + * Either a sub-identifier of a PartyIdentifier, or a sub-type of the PartyIdType, normally a PersonalIdentifierType. */ - type: "FIDO"; + partySubIdOrType?: string; /** - * The challenge has initialized but not yet answered by the PISP. + * FSP identifier. */ - status: "PENDING"; + fspId?: string; /** - * The challenge issued by a DFSP that must be answered by the PISP. + * Data model for the complex type ExtensionList. An optional list of extensions, specific to deployment. */ - challenge: { + extensionList?: { /** - * Base64 encoded binary of the challenge that must be answered by the PISP. + * Number of Extension elements. */ - payload: string; + extension: { + /** + * Extension key. + */ + key: string; + /** + * Extension value. + */ + value: string; + }[]; }; }; - }; - /** - * A credential used to allow a user to prove their identity and access - * to an account with a DFSP. - * - * VerifiedCredential is a special formatting of the credential to allow us to be - * more explicit about the `status` field - it should only ever be VERIFIED when updating - * a credential. - */ - VerifiedCredential: { - /** - * The id of a Credential. - */ - id?: string; - /** - * The type of the Credential. - * - "FIDO" - A FIDO public/private keypair. - */ - type: "FIDO"; - /** - * The Credential is valid, and ready to be used by the PISP. - */ - status: "VERIFIED"; - /** - * The challenge that has been signed by a PISP. - */ - challenge: { - /** - * Base64 encoded binary of the challenge that must be answered by the PISP. - */ - payload: string; - /** - * Base64 encoded binary string or result of the payload signed by the PISP using the private key. - */ - signature: string; - }; - /** - * Base64 encoded bytes - The public key of the Public/Private keypair. - */ - payload?: string; - }; - /** - * The HTTP request `PUT /consents/{ID}` is used by the DFSP or Auth-Service to - * update a Consent object once it has been Verified. - * - * Called by a `auth-service` to notify a DFSP and PISP that a credential has been verified and registered. - */ - ConsentsIDPutResponseVerified: { - /** - * The id of the ConsentRequest that was used to initiate the - * creation of this Consent. - */ - requestId: string; /** - * FSP identifier. + * A limited set of pre-defined numbers. This list would be a limited set of numbers identifying a set of popular merchant types like School Fees, Pubs and Restaurants, Groceries, etc. */ - participantId: string; + merchantClassificationCode?: string; /** - * PISP identifier who uses this Consent. + * Name of the Party. Could be a real name or a nickname. */ - 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")[]; - }[]; + name?: string; /** - * A credential used to allow a user to prove their identity and access - * to an account with a DFSP. - * - * VerifiedCredential is a special formatting of the credential to allow us to be - * more explicit about the `status` field - it should only ever be VERIFIED when updating - * a credential. + * Data model for the complex type PartyPersonalInfo. */ - credential: { - /** - * The id of a Credential. - */ - id?: string; - /** - * The type of the Credential. - * - "FIDO" - A FIDO public/private keypair. - */ - type: "FIDO"; - /** - * The Credential is valid, and ready to be used by the PISP. - */ - status: "VERIFIED"; + personalInfo?: { /** - * The challenge that has been signed by a PISP. + * Data model for the complex type PartyComplexName. */ - challenge: { + complexName?: { /** - * Base64 encoded binary of the challenge that must be answered by the PISP. + * First name of the Party (Name Type). */ - payload: string; + firstName?: string; /** - * Base64 encoded binary string or result of the payload signed by the PISP using the private key. + * Middle name of the Party (Name Type). */ - signature: string; + middleName?: string; + /** + * Last name of the Party (Name Type). + */ + lastName?: string; }; /** - * Base64 encoded bytes - The public key of the Public/Private keypair. + * Date of Birth of the Party. */ - payload?: string; + dateOfBirth?: string; }; }; - /** - * A credential used to allow a user to prove their identity - * and access to an account with a DFSP. - */ - ConsentsIDGenerateChallengePostRequest: { - /** - * The type of the Credential. - * - "FIDO" - A FIDO public/private keypair. - */ - type: "FIDO"; - }; /** * Below are the allowed values for the enumeration AmountType. * - SEND - Amount the Payer would like to send, that is, the amount that should be withdrawn from the Payer account including any fees. @@ -20906,14 +20164,6 @@ export interface components { * Common ID between the FSPs for the transaction request object. The ID should be reused for resends of the same transaction request. A new ID should be generated for each new transaction request. */ transactionRequestId: string; - /** - * DFSP specific account identifiers, e.g. `dfspa.alice.1234` - */ - sourceAccountId: string; - /** - * Common ID between the PISP and FSP for the Consent object This tells DFSP and auth-service which constent allows the PISP to initiate transaction. - */ - consentId: string; /** * Information about the Payee in the proposed financial transaction. */ @@ -21431,57 +20681,10 @@ export interface components { partyIdInfo: { /** * This is a variant based on FSPIOP `PartyIdType` specification. - * Main difference being the CONSENT and THIRD_PARTY_LINK enums. - * - * Below are the allowed values for the enumeration. - * - MSISDN - An MSISDN (Mobile Station International Subscriber Directory - * Number, that is, the phone number) is used as reference to a participant. - * The MSISDN identifier should be in international format according to the - * [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). - * Optionally, the MSISDN may be prefixed by a single plus sign, indicating the - * international prefix. - * - EMAIL - An email is used as reference to a - * participant. The format of the email should be according to the informational - * [RFC 3696](https://tools.ietf.org/html/rfc3696). - * - PERSONAL_ID - A personal identifier is used as reference to a participant. - * Examples of personal identification are passport number, birth certificate - * number, and national registration number. The identifier number is added in - * the PartyIdentifier element. The personal identifier type is added in the - * PartySubIdOrType element. - * - BUSINESS - A specific Business (for example, an organization or a company) - * is used as reference to a participant. The BUSINESS identifier can be in any - * format. To make a transaction connected to a specific username or bill number - * in a Business, the PartySubIdOrType element should be used. - * - DEVICE - A specific device (for example, a POS or ATM) ID connected to a - * specific business or organization is used as reference to a Party. - * For referencing a specific device under a specific business or organization, - * use the PartySubIdOrType element. - * - ACCOUNT_ID - A bank account number or FSP account ID should be used as - * reference to a participant. The ACCOUNT_ID identifier can be in any format, - * as formats can greatly differ depending on country and FSP. - * - IBAN - A bank account number or FSP account ID is used as reference to a - * participant. The IBAN identifier can consist of up to 34 alphanumeric - * characters and should be entered without whitespace. - * - ALIAS An alias is used as reference to a participant. The alias should be - * created in the FSP as an alternative reference to an account owner. - * Another example of an alias is a username in the FSP system. - * The ALIAS identifier can be in any format. It is also possible to use the - * PartySubIdOrType element for identifying an account under an Alias defined - * by the PartyIdentifier. - * - CONSENT - TBD - * - THIRD_PARTY_LINK - TBD + * This validation interface should be use by `POST /thirdpartyRequests/transactions` + * - THIRD_PARTY_LINK - is the DFSP's internal reference which allows DFSP to find out the corresponding consent */ - partyIdType: - | "MSISDN" - | "EMAIL" - | "PERSONAL_ID" - | "BUSINESS" - | "DEVICE" - | "ACCOUNT_ID" - | "IBAN" - | "ALIAS" - | "CONSENT" - | "THIRD_PARTY_LINK"; + partyIdType: "THIRD_PARTY_LINK"; /** * Identifier of the Party. */ diff --git a/tests/dto/thirdparty.test.ts b/tests/dto/thirdparty.test.ts index 1c95c827..989e9841 100644 --- a/tests/dto/thirdparty.test.ts +++ b/tests/dto/thirdparty.test.ts @@ -91,6 +91,11 @@ describe('thirdparty', () => { partySubIdOrType: '456', fspId: fspId } + const partyIdInfoTPLink: Schemas.PartyIdInfoTPLink = { + partyIdType: 'THIRD_PARTY_LINK', + partyIdentifier: '123', + fspId: fspId + } const dateOfBirth: Schemas.DateOfBirth = '2021-01-01T00:00:0000' const partyPersonalInfo: Schemas.PartyPersonalInfo = { complexName: partyComplexName, @@ -102,6 +107,12 @@ describe('thirdparty', () => { name, personalInfo: partyPersonalInfo } + const partyTPLink: Schemas.PartyTPLink = { + partyIdInfo: partyIdInfoTPLink, + merchantClassificationCode, + name, + personalInfo: partyPersonalInfo + } const partyIdTypeEMAIL: Schemas.PartyIdType = 'EMAIL' const signedCredential: Schemas.SignedCredential = { id: 'credential-id', @@ -113,7 +124,7 @@ describe('thirdparty', () => { const unsignedCredential: Schemas.UnsignedCredential = { type: credentialTypeFIDO, status: 'PENDING', - challenge: credentialChallengeUnsigned, + challenge: credentialChallengeUnsigned } const verifiedCredential: Schemas.VerifiedCredential = { id: 'credential-id', @@ -127,7 +138,7 @@ describe('thirdparty', () => { scenario: 'TRANSFER', subScenario: 'sub-scenario', initiator: 'PAYER', - initiatorType: 'CONSUMER', + initiatorType: 'CONSUMER' } const partyResult: Schemas.PartyResult = { partyId: partyIdInfo, @@ -158,7 +169,7 @@ describe('thirdparty', () => { }) test('AuthorizationResponseType', () => { - expect(authorizationResponseTypeENTERED).toBeDefined + expect(authorizationResponseTypeENTERED).toBeDefined() }) test('AuthorizationsPostRequest', () => { @@ -499,10 +510,8 @@ describe('thirdparty', () => { test('ThirdpartyRequestsTransactionsPostRequest', () => { const thirdpartyRequestsTransactionsPostRequest: Schemas.ThirdpartyRequestsTransactionsPostRequest = { transactionRequestId: correlationId, - sourceAccountId: accountAddress, - consentId: correlationId, payee: party, - payer: party, + payer: partyTPLink, amountType: 'SEND', amount: money, transactionType, diff --git a/thirdparty/openapi3/components/schemas/InboundAuthorizationsPostRequest.yaml b/thirdparty/openapi3/components/schemas/InboundAuthorizationsPostRequest.yaml deleted file mode 100644 index 576f7557..00000000 --- a/thirdparty/openapi3/components/schemas/InboundAuthorizationsPostRequest.yaml +++ /dev/null @@ -1,49 +0,0 @@ -type: object -title: InboundAuthorizationsRequest -description: POST /authorizations Request object -properties: - toParticipantId: - type: string - authenticationType: - $ref: ./AuthenticationType.yaml - retriesLeft: - $ref: ./Integer.yaml - amount: - $ref: ./Money.yaml - transactionId: - $ref: ./CorrelationId.yaml - transactionRequestId: - $ref: ./CorrelationId.yaml - quote: - $ref: ./QuotesIDPutResponse.yaml -required: - - authenticationType - - retriesLeft - - amount - - transactionId - - transactionRequestId - - quote -additionalProperties: false -example: - toParticipantId: dfspb - authenticationType: U2F - retriesLeft: '1' - amount: - currency: USD - amount: 123.45 - transactionId: b51ec534-ee48-4575-b6a9-ead2955b8069 - transactionRequestId: b51ec534-ee48-4575-b6a9-ead2955b8068 - quote: - expiration: '2016-05-24T08:38:08.699-04:00' - transferAmount: - currency: USD - amount: 123.45 - geoCode: - latitude: "+45.4215" - longitude: "+75.6972" - ilpPacket: AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA - condition: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA - extensionList: - extension: - - key: sample-key - value: sample-value diff --git a/thirdparty/openapi3/components/schemas/PartyIdInfoTPLink.yaml b/thirdparty/openapi3/components/schemas/PartyIdInfoTPLink.yaml new file mode 100644 index 00000000..466c2f49 --- /dev/null +++ b/thirdparty/openapi3/components/schemas/PartyIdInfoTPLink.yaml @@ -0,0 +1,17 @@ +title: PartyIdInfo +type: object +description: Data model for the complex type PartyIdInfo. +properties: + partyIdType: + $ref: ./PartyIdTypeTPLink.yaml + partyIdentifier: + $ref: ./PartyIdentifier.yaml + partySubIdOrType: + $ref: ./PartySubIdOrType.yaml + fspId: + $ref: ./FspId.yaml + extensionList: + $ref: ./ExtensionList.yaml +required: + - partyIdType + - partyIdentifier diff --git a/thirdparty/openapi3/components/schemas/PartyIdTypeTPLink.yaml b/thirdparty/openapi3/components/schemas/PartyIdTypeTPLink.yaml new file mode 100644 index 00000000..9748066c --- /dev/null +++ b/thirdparty/openapi3/components/schemas/PartyIdTypeTPLink.yaml @@ -0,0 +1,9 @@ +title: PartyIdTypeTPLink +type: string +enum: + - THIRD_PARTY_LINK +description: | + This is a variant based on FSPIOP `PartyIdType` specification. + This validation interface should be use by `POST /thirdpartyRequests/transactions` + - THIRD_PARTY_LINK - is the DFSP's internal reference which allows DFSP to find out the corresponding consent +example: PERSONAL_ID diff --git a/thirdparty/openapi3/components/schemas/PartyTPLink.yaml b/thirdparty/openapi3/components/schemas/PartyTPLink.yaml new file mode 100644 index 00000000..cd054a22 --- /dev/null +++ b/thirdparty/openapi3/components/schemas/PartyTPLink.yaml @@ -0,0 +1,16 @@ +title: Party +type: object +description: Data model for the complex type Party. +properties: + accounts: + $ref: './AccountList.yaml' + partyIdInfo: + $ref: ./PartyIdInfoTPLink.yaml + merchantClassificationCode: + $ref: ./MerchantClassificationCode.yaml + name: + $ref: ./PartyName.yaml + personalInfo: + $ref: ./PartyPersonalInfo.yaml +required: + - partyIdInfo diff --git a/thirdparty/openapi3/components/schemas/ThirdpartyRequestsTransactionsPostRequest.yaml b/thirdparty/openapi3/components/schemas/ThirdpartyRequestsTransactionsPostRequest.yaml index c0301656..a87b6893 100644 --- a/thirdparty/openapi3/components/schemas/ThirdpartyRequestsTransactionsPostRequest.yaml +++ b/thirdparty/openapi3/components/schemas/ThirdpartyRequestsTransactionsPostRequest.yaml @@ -9,23 +9,13 @@ properties: Common ID between the FSPs for the transaction request object. The ID should be reused for resends of the same transaction request. A new ID should be generated for each new transaction request. - sourceAccountId: - allOf: - - $ref: ./AccountAddress.yaml - description: 'DFSP specific account identifiers, e.g. `dfspa.alice.1234`' - consentId: - allOf: - - $ref: ./CorrelationId.yaml - description: > - Common ID between the PISP and FSP for the Consent object This tells DFSP - and auth-service which constent allows the PISP to initiate transaction. payee: allOf: - $ref: ./Party.yaml description: Information about the Payee in the proposed financial transaction. payer: allOf: - - $ref: ./Party.yaml + - $ref: ./PartyTPLink.yaml description: Information about the Payer in the proposed financial transaction. amountType: allOf: @@ -47,8 +37,6 @@ properties: example: '2016-05-24T08:38:08.699-04:00' required: - transactionRequestId - - sourceAccountId - - consentId - payee - payer - amountType diff --git a/thirdparty/openapi3/paths/authorizations.yaml b/thirdparty/openapi3/paths/authorizations.yaml index abfccd13..6c5d113d 100644 --- a/thirdparty/openapi3/paths/authorizations.yaml +++ b/thirdparty/openapi3/paths/authorizations.yaml @@ -15,7 +15,7 @@ post: description: > The HTTP request `POST /authorizations` is used to request the Payer to enter the applicable credentials in the PISP system. - operationId: InboundAuthorizationsPostRequest + operationId: AuthorizationsPostRequest tags: - authorizations requestBody: @@ -24,7 +24,7 @@ post: content: application/json: schema: - $ref: ../components/schemas/InboundAuthorizationsPostRequest.yaml + $ref: ../components/schemas/AuthorizationsPostRequest.yaml responses: 202: $ref: ../components/responses/202.yaml diff --git a/thirdparty/openapi3/paths/thirdpartyRequests_transactions_tsa.yaml b/thirdparty/openapi3/paths/thirdpartyRequests_transactions_tsa.yaml index 1f656bea..a0cea7d7 100644 --- a/thirdparty/openapi3/paths/thirdpartyRequests_transactions_tsa.yaml +++ b/thirdparty/openapi3/paths/thirdpartyRequests_transactions_tsa.yaml @@ -21,8 +21,6 @@ post: $ref: ../components/schemas/ThirdpartyRequestsTransactionsPostRequest.yaml example: transactionRequestId: '8d34f91d-d078-4077-8263-2c047876fcf6' - sourceAccountId: 'dfspa.alice.1234' - consentId: '111' payee: partyIdInfo: partyIdType: 'MSISDN' @@ -34,8 +32,8 @@ post: firstName: 'Alice' lastName: 'K' partyIdInfo: - partyIdType: 'MSISDN' - partyIdentifier: '+44 8765 4321' + partyIdType: 'THIRD_PARTY_LINK' + partyIdentifier: 'qwerty-567890' fspId: 'dfspa' amountType: 'SEND' amount: diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 0154838b..aa8c249a 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -5,7 +5,9 @@ "commitlint.config.js", "jest.config.js", "src", - "tests/dto/v1_0.test.ts" + "tests/dto/v1_0.test.ts", + "tests/dto/v1_1.test.ts", + "tests/dto/thirdparty.test.ts" ], "exclude": [ "node_modules"