diff --git a/package-lock.json b/package-lock.json index 23467d2d..1e710e04 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "account-lookup-service", - "version": "10.3.1", + "version": "10.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2023,11 +2023,12 @@ } }, "@mojaloop/sdk-standard-components": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-10.3.0.tgz", - "integrity": "sha512-y+y/w4FA6mbo5AZldZ8O5XpM0bSdPjoyEcNW06Gx/czOHaHwBn2rjt3FhQlZztioyclO1pBnczwSix5f+U+ViQ==", + "version": "10.3.2", + "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-10.3.2.tgz", + "integrity": "sha512-O5DqUL+ncS718nFDFUMx8QO0pmTmg+/CNYuaXPrFfHDgf8c05mgSjg6Z8wt69Auwph6WXWaNjKTQRqZG2/BDdQ==", "requires": { "base64url": "3.0.1", + "fast-safe-stringify": "^2.0.7", "ilp-packet": "2.2.0", "jsonwebtoken": "8.5.1", "jws": "4.0.0" @@ -4377,9 +4378,9 @@ } }, "eslint": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.1.0.tgz", - "integrity": "sha512-DfS3b8iHMK5z/YLSme8K5cge168I8j8o1uiVmFCgnnjxZQbCGyraF8bMl7Ju4yfBmCuxD7shOF7eqGkcuIHfsA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.2.0.tgz", + "integrity": "sha512-B3BtEyaDKC5MlfDa2Ha8/D6DsS4fju95zs0hjS3HdGazw+LNayai38A25qMppK37wWGWNYSPOR6oYzlz5MHsRQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -4388,10 +4389,10 @@ "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", + "eslint-scope": "^5.1.0", "eslint-utils": "^2.0.0", - "eslint-visitor-keys": "^1.1.0", - "espree": "^7.0.0", + "eslint-visitor-keys": "^1.2.0", + "espree": "^7.1.0", "esquery": "^1.2.0", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", @@ -4472,6 +4473,22 @@ "which": "^2.0.1" } }, + "eslint-scope": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", + "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.2.0.tgz", + "integrity": "sha512-WFb4ihckKil6hu3Dp798xdzSfddwKKU3+nGniKF6HfeW6OLd2OUDEPP7TcHtB5+QXOKg2s6B2DaMPE1Nn/kxKQ==", + "dev": true + }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -4939,14 +4956,22 @@ "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==" }, "espree": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.0.0.tgz", - "integrity": "sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.1.0.tgz", + "integrity": "sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw==", "dev": true, "requires": { - "acorn": "^7.1.1", + "acorn": "^7.2.0", "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "eslint-visitor-keys": "^1.2.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.2.0.tgz", + "integrity": "sha512-WFb4ihckKil6hu3Dp798xdzSfddwKKU3+nGniKF6HfeW6OLd2OUDEPP7TcHtB5+QXOKg2s6B2DaMPE1Nn/kxKQ==", + "dev": true + } } }, "esprima": { diff --git a/package.json b/package.json index bf2720e8..57be54ad 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "account-lookup-service", "description": "Account Lookup Service is used to validate Party and Participant lookups.", - "version": "10.3.1", + "version": "10.4.0", "license": "Apache-2.0", "author": "ModusBox", "contributors": [ @@ -77,7 +77,7 @@ "@mojaloop/central-services-logger": "9.5.1", "@mojaloop/central-services-metrics": "9.5.0", "@mojaloop/central-services-shared": "10.2.1", - "@mojaloop/sdk-standard-components": "10.3.0", + "@mojaloop/sdk-standard-components": "10.3.2", "@mojaloop/event-sdk": "9.5.2", "@now-ims/hapi-now-auth": "2.0.2", "blipp": "4.0.1", @@ -95,7 +95,7 @@ }, "devDependencies": { "@types/jest": "25.2.3", - "eslint": "7.1.0", + "eslint": "7.2.0", "eslint-plugin-jest": "23.13.2", "get-port": "5.1.1", "jest": "26.0.1", diff --git a/src/interface/api_swagger.json b/src/interface/api_swagger.json index dfa78c26..9a3b5336 100644 --- a/src/interface/api_swagger.json +++ b/src/interface/api_swagger.json @@ -1,9 +1,9 @@ { "swagger": "2.0", "info": { - "version": "1.0.1", + "version": "1.1", "title": "Open API for FSP Interoperability (FSPIOP) (Implementation Friendly Version)", - "description": "Based on API Definition.docx updated on 2018-03-13 Version 1.0. Note - The API supports a maximum size of 65536 bytes (64 Kilobytes) in the HTTP header.", + "description": "Based on API Definition.docx Version 1.1 that was confirmed on 2020-05-19. Note - The API supports a maximum size of 65536 bytes (64 Kilobytes) in the HTTP header.", "license": { "name": "Open API for FSP Interoperability (FSPIOP) (Implementation Friendly Version)" } @@ -2141,81 +2141,6 @@ } }, "definitions": { - "Amount": { - "title": "Amount", - "type": "string", - "pattern": "^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$", - "description": "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." - }, - "AmountType": { - "title": "AmountType", - "type": "string", - "enum": [ - "SEND", - "RECEIVE" - ], - "description": "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. - RECEIVE Amount the Payer would like the Payee to receive, that is, the amount that should be sent to the receiver exclusive fees." - }, - "AuthenticationType": { - "title": "AuthenticationTypeEnum", - "type": "string", - "enum": [ - "OTP", - "QRCODE" - ], - "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." - }, - "AuthenticationValue": { - "title": "AuthenticationValue", - "type": "string", - "pattern": "^\\d{3,10}$|^\\S{1,64}$", - "description": "Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type." - }, - "AuthorizationResponse": { - "title": "AuthorizationResponse", - "type": "string", - "enum": [ - "ENTERED", - "REJECTED", - "RESEND" - ], - "description": "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." - }, - "BalanceOfPayments": { - "title": "BalanceOfPayments", - "type": "string", - "pattern": "^[1-9]\\d{2}$", - "description": "(BopCode) The API data type BopCode is a JSON String of 3 characters, consisting of digits only. Negative numbers are not allowed. A leading zero is not allowed. https://www.imf.org/external/np/sta/bopcode/" - }, - "BinaryString": { - "type": "string", - "pattern": "^[A-Za-z0-9-_]+[=]{0,2}$", - "description": "The API data type BinaryString is a JSON String. The string is a base64url encoding of a string of raw bytes, where padding (character ‘=’) is added at the end of the data if needed to ensure that the string is a multiple of 4 characters. The length restriction indicates the allowed number of characters." - }, - "BinaryString32": { - "type": "string", - "pattern": "^[A-Za-z0-9-_]{43}$", - "description": "The API data type BinaryString32 is a fixed size version of the API data type BinaryString, where the raw underlying data is always of 32 bytes. The data type BinaryString32 should not use a padding character as the size of the underlying data is fixed." - }, - "BulkTransferState": { - "title": "BulkTransactionStateEnum", - "type": "string", - "enum": [ - "RECEIVED", - "PENDING", - "ACCEPTED", - "PROCESSING", - "COMPLETED", - "REJECTED" - ], - "description": "Below are the allowed values for the enumeration - RECEIVED Payee FSP has received the bulk transfer from the Payer FSP. - PENDING Payee FSP has validated the bulk transfer. - ACCEPTED Payee FSP has accepted to process the bulk transfer. - PROCESSING Payee FSP has started to transfer fund to the Payees. - COMPLETED Payee FSP has completed transfer of funds to the Payees. - REJECTED Payee FSP has rejected to process the bulk transfer." - }, - "Code": { - "title": "Code", - "type": "string", - "pattern": "^[0-9a-zA-Z]{4,32}$", - "description": "Any code/token returned by the Payee FSP (TokenCode Type)." - }, "CorrelationId": { "title": "CorrelationId", "type": "string", @@ -2405,12 +2330,6 @@ "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$", "description": "Date of Birth of the Party." }, - "DateTime": { - "title": "DateTime", - "type": "string", - "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:(\\.\\d{3}))(?:Z|[+-][01]\\d:[0-5]\\d)$", - "description": "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, 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 - \"2016-05-24T08:38:08.699-04:00\", \"2016-05-24T08:38:08.699Z\" (where Z indicates Zulu time zone, same as UTC)." - }, "ErrorCode": { "title": "ErrorCode", "type": "string", @@ -2438,14 +2357,6 @@ "maxLength": 128, "description": "Extension value." }, - "FirstName": { - "title": "FirstName", - "type": "string", - "minLength": 1, - "maxLength": 128, - "pattern": "^(?!\\s*$)[\\w .,'-]{1,128}$", - "description": "First name of the Party (Name Type)." - }, "FspId": { "title": "FspId", "type": "string", @@ -2462,94 +2373,12 @@ ], "description": "Below are the allowed values for the enumeration HealthStatusType - OK - DOWN" }, - "IlpCondition": { - "title": "IlpCondition", - "type": "string", - "pattern": "^[A-Za-z0-9-_]{43}$", - "maxLength": 48, - "description": "Condition that must be attached to the transfer by the Payer." - }, - "IlpFulfilment": { - "title": "IlpFulfilment", - "type": "string", - "pattern": "^[A-Za-z0-9-_]{43}$", - "maxLength": 48, - "description": "Fulfilment that must be attached to the transfer by the Payee." - }, - "IlpPacket": { - "title": "IlpPacket", - "type": "string", - "pattern": "^[A-Za-z0-9-_]+[=]{0,2}$", - "minLength": 1, - "maxLength": 32768, - "description": "Information for recipient (transport layer information)." - }, - "Integer": { - "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." - }, - "LastName": { - "title": "LastName", - "type": "string", - "minLength": 1, - "maxLength": 128, - "pattern": "^(?!\\s*$)[\\w .,'-]{1,128}$", - "description": "Last name of the Party (Name Type)." - }, - "Latitude": { - "title": "Latitude", - "type": "string", - "pattern": "^(\\+|-)?(?:90(?:(?:\\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\\.[0-9]{1,6})?))$", - "description": "The API data type Latitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons." - }, - "Longitude": { - "title": "Longitude", - "type": "string", - "pattern": "^(\\+|-)?(?:180(?:(?:\\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\\.[0-9]{1,6})?))$", - "description": "The API data type Longitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons." - }, "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." }, - "MiddleName": { - "title": "MiddleName", - "type": "string", - "minLength": 1, - "maxLength": 128, - "pattern": "^(?!\\s*$)[\\w .,'-]{1,128}$", - "description": "Middle name of the Party (Name Type)." - }, - "Name": { - "title": "Name", - "type": "string", - "pattern": "^(?!\\s*$)[\\w .,'-]{1,128}$", - "description": "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." - }, - "Note": { - "title": "Note", - "type": "string", - "minLength": 1, - "maxLength": 128, - "description": "Memo assigned to transaction" - }, - "OtpValue": { - "title": "OtpValue", - "type": "string", - "pattern": "^\\d{3,10}$", - "description": "The API data type OtpValue is a JSON String of 3 to 10 characters, consisting of digits only. Negative numbers are not allowed. One or more leading zeros are allowed." - }, - "PartyIdentifier": { - "title": "PartyIdentifier", - "type": "string", - "minLength": 1, - "maxLength": 128, - "description": "Identifier of the Party." - }, "PartyIdType": { "title": "PartyIdTypeEnum", "type": "string", @@ -2565,329 +2394,17 @@ ], "description": "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. 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. - 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." }, - "PartyName": { - "title": "PartyName", - "type": "string", - "minLength": 1, - "maxLength": 128, - "description": "Name of the Party. Could be a real name or a nickname." - }, - "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." - }, - "PersonalIdentifierType": { - "title": "PersonalIdentifierType", - "type": "string", - "enum": [ - "PASSPORT", - "NATIONAL_REGISTRATION", - "DRIVING_LICENSE", - "ALIEN_REGISTRATION", - "NATIONAL_ID_CARD", - "EMPLOYER_ID", - "TAX_ID_NUMBER", - "SENIOR_CITIZENS_CARD", - "MARRIAGE_CERTIFICATE", - "HEALTH_CARD", - "VOTERS_ID", - "UNITED_NATIONS", - "OTHER_ID" - ], - "description": "Below are the allowed values for the enumeration - PASSPORT A passport number is used as reference to a Party. - NATIONAL_REGISTRATION A national registration number is used as reference to a Party. - DRIVING_LICENSE A driving license is used as reference to a Party. - ALIEN_REGISTRATION An alien registration number is used as reference to a Party. - NATIONAL_ID_CARD A national ID card number is used as reference to a Party. - EMPLOYER_ID A tax identification number is used as reference to a Party. - TAX_ID_NUMBER A tax identification number is used as reference to a Party. - SENIOR_CITIZENS_CARD A senior citizens card number is used as reference to a Party. - MARRIAGE_CERTIFICATE A marriage certificate number is used as reference to a Party. - HEALTH_CARD A health card number is used as reference to a Party. - VOTERS_ID A voter’s identification number is used as reference to a Party. - UNITED_NATIONS An UN (United Nations) number is used as reference to a Party. - OTHER_ID Any other type of identification type number is used as reference to a Party." - }, - "QRCODE": { - "title": "QRCODE", - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "QR code used as One Time Password." - }, - "RefundReason": { - "title": "RefundReason", - "type": "string", - "minLength": 1, - "maxLength": 128, - "description": "Reason for the refund." - }, - "TokenCode": { - "title": "TokenCode", - "type": "string", - "pattern": "^[0-9a-zA-Z]{4,32}$", - "description": "The API data type TokenCode is a JSON String between 4 and 32 characters, consisting of digits or upper or lowercase characters from a to z." - }, - "TransactionInitiator": { - "title": "TransactionInitiatorEnum", - "type": "string", - "enum": [ - "PAYER", - "PAYEE" - ], - "description": "Below are the allowed values for the enumeration - PAYER Sender of funds is initiating the transaction. The account to send from is either owned by the Payer or is connected to the Payer in some way. - PAYEE Recipient of the funds is initiating the transaction by sending a transaction request. The Payer must approve the transaction, either automatically by a pre-generated OTP or by pre-approval of the Payee, or by manually approving in his or her own Device." - }, - "TransactionInitiatorType": { - "title": "TransactionInitiatorTypeEnum", - "type": "string", - "enum": [ - "CONSUMER", - "AGENT", - "BUSINESS", - "DEVICE" - ], - "description": "Below are the allowed values for the enumeration - CONSUMER Consumer is the initiator of the transaction. - AGENT Agent is the initiator of the transaction. - BUSINESS Business is the initiator of the transaction. - DEVICE Device is the initiator of the transaction." - }, - "TransactionRequestState": { - "title": "TransactionRequestStateEnum", - "type": "string", - "enum": [ - "RECEIVED", - "PENDING", - "ACCEPTED", - "REJECTED" - ], - "description": "Below are the allowed values for the enumeration - RECEIVED Payer FSP has received the transaction from the Payee FSP. - PENDING Payer FSP has sent the transaction request to the Payer. - ACCEPTED Payer has approved the transaction. - REJECTED Payer has rejected the transaction." - }, - "TransactionScenario": { - "title": "TransactionScenarioEnum", - "type": "string", - "enum": [ - "DEPOSIT", - "WITHDRAWAL", - "TRANSFER", - "PAYMENT", - "REFUND" - ], - "description": "Below are the allowed values for the enumeration - DEPOSIT Used for performing a Cash-In (deposit) transaction. In a normal scenario, electronic funds are transferred from a Business account to a Consumer account, and physical cash is given from the Consumer to the Business User. - WITHDRAWAL Used for performing a Cash-Out (withdrawal) transaction. In a normal scenario, electronic funds are transferred from a Consumer’s account to a Business account, and physical cash is given from the Business User to the Consumer. - TRANSFER Used for performing a P2P (Peer to Peer, or Consumer to Consumer) transaction. - PAYMENT Usually used for performing a transaction from a Consumer to a Merchant or Organization, but could also be for a B2B (Business to Business) payment. The transaction could be online for a purchase in an Internet store, in a physical store where both the Consumer and Business User are present, a bill payment, a donation, and so on. - REFUND Used for performing a refund of transaction." - }, - "TransactionState": { - "title": "TransactionStateEnum", - "type": "string", - "enum": [ - "RECEIVED", - "PENDING", - "COMPLETED", - "REJECTED" - ], - "description": "Below are the allowed values for the enumeration - RECEIVED Payee FSP has received the transaction from the Payer FSP. - PENDING Payee FSP has validated the transaction. - COMPLETED Payee FSP has successfully performed the transaction. - REJECTED Payee FSP has failed to perform the transaction." - }, - "TransactionSubScenario": { - "title": "TransactionSubScenario", - "type": "string", - "pattern": "^[A-Z_]{1,32}$", - "description": "Possible sub-scenario, defined locally within the scheme (UndefinedEnum Type)." - }, - "TransferState": { - "title": "TransferStateEnum", - "type": "string", - "enum": [ - "RECEIVED", - "RESERVED", - "COMMITTED", - "ABORTED" - ], - "description": "Below are the allowed values for the enumeration - RECEIVED Next ledger has received the transfer. - RESERVED Next ledger has reserved the transfer. - COMMITTED Next ledger has successfully performed the transfer. - ABORTED Next ledger has aborted the transfer due a rejection or failure to perform the transfer." - }, - "UndefinedEnum": { - "title": "UndefinedEnum", - "type": "string", - "pattern": "^[A-Z_]{1,32}$", - "description": "The API data type UndefinedEnum is a JSON String consisting of 1 to 32 uppercase characters including an underscore character (_)." - }, - "AuthenticationInfo": { - "title": "AuthenticationInfo", - "type": "object", - "description": "Data model for the complex type AuthenticationInfo", - "properties": { - "authentication": { - "type": "string" - }, - "authenticationValue": { - "type": "string" - } - }, - "required": [ - "authentication", - "authenticationValue" - ] - }, - "AuthorizationsIDPutResponse": { - "title": "AuthorizationsIDPutResponse", - "type": "object", - "description": "PUT /authorizations/{ID} object", - "properties": { - "authenticationInfo": { - "type": "string", - "description": "OTP or QR Code if entered, otherwise empty." - }, - "responseType": { - "type": "string", - "description": "Enum containing response information; if the customer entered the authentication value, rejected the transaction, or requested a resend of the authentication value." - } - }, - "required": [ - "responseType" - ] - }, - "BulkQuotesPostRequest": { - "title": "BulkQuotesPostRequest", - "type": "object", - "description": "POST /bulkQuotes object", - "properties": { - "bulkQuoteId": { - "type": "string", - "description": "Common ID between the FSPs for the bulk quote object, decided by the Payer FSP. The ID should be reused for resends of the same bulk quote. A new ID should be generated for each new bulk quote." - }, - "payer": { - "$ref": "#/definitions/Party", - "description": "Information about the Payer in the proposed financial transaction." - }, - "geoCode": { - "$ref": "#/definitions/GeoCode", - "description": "Longitude and Latitude of the initiating Party. Can be used to detect fraud." - }, - "expiration": { - "type": "string", - "description": "Expiration is optional to let the Payee FSP know when a quote no longer needs to be returned." - }, - "individualQuotes": { - "type": "array", - "minItems": 1, - "maxItems": 1000, - "items": { - "$ref": "#/definitions/IndividualQuote" - }, - "description": "List of quotes elements." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "bulkQuoteId", - "payer", - "individualQuotes" - ] - }, - "BulkQuotesIDPutResponse": { - "title": "BulkQuotesIDPutResponse", - "type": "object", - "description": "PUT /bulkQuotes/{ID} object", - "properties": { - "individualQuoteResults": { - "type": "array", - "maxItems": 1000, - "items": { - "$ref": "#/definitions/IndividualQuoteResult" - }, - "description": "Fees for each individual transaction, if any of them are charged per transaction." - }, - "expiration": { - "type": "string", - "description": "Date and time until when the quotation is valid and can be honored when used in the subsequent transaction request." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "expiration" - ] - }, - "BulkTransfersPostRequest": { - "title": "BulkTransfersPostRequest", - "type": "object", - "description": "POST /bulkTransfers object", - "properties": { - "bulkTransferId": { - "type": "string", - "description": "Common ID between the FSPs and the optional Switch for the bulk transfer object, decided by the Payer FSP. The ID should be reused for resends of the same bulk transfer. A new ID should be generated for each new bulk transfer." - }, - "bulkQuoteId": { - "type": "string", - "description": "ID of the related bulk quote." - }, - "payerFsp": { - "type": "string", - "description": "Payer FSP identifier." - }, - "payeeFsp": { - "type": "string", - "description": "Payee FSP identifier." - }, - "individualTransfers": { - "type": "array", - "minItems": 1, - "maxItems": 1000, - "items": { - "$ref": "#/definitions/IndividualTransfer" - }, - "description": "List of IndividualTransfer elements." - }, - "expiration": { - "type": "string", - "description": "Expiration time of the transfers." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "bulkTransferId", - "bulkQuoteId", - "payerFsp", - "payeeFsp", - "individualTransfers", - "expiration" - ] - }, - "BulkTransfersIDPutResponse": { - "title": "BulkTransfersIDPutResponse", - "type": "object", - "description": "PUT /bulkTransfers/{ID} object", - "properties": { - "completedTimestamp": { - "type": "string", - "description": "Time and date when the bulk transaction was completed." - }, - "individualTransferResults": { - "type": "array", - "maxItems": 1000, - "items": { - "$ref": "#/definitions/IndividualTransferResult" - }, - "description": "List of IndividualTransferResult elements." - }, - "bulkTransferState": { - "type": "string", - "description": "The state of the bulk transfer." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "bulkTransferState" - ] - }, "ErrorInformation": { "title": "ErrorInformation", "type": "object", "description": "Data model for the complex type ErrorInformation.", "properties": { "errorCode": { - "type": "string", - "description": "Specific error number.", - "pattern": "^(10|20|3[0-4]|4[0-4]|5[0-4])[0-9]{2}$" + "$ref": "#/definitions/ErrorCode", + "description": "Specific error number." }, "errorDescription": { - "type": "string", + "$ref": "#/definitions/ErrorDescription", "description": "Error description string." }, "extensionList": { @@ -2929,11 +2446,11 @@ "description": "Data model for the complex type Extension", "properties": { "key": { - "type": "string", + "$ref": "#/definitions/ExtensionKey", "description": "Extension key." }, "value": { - "type": "string", + "$ref": "#/definitions/ExtensionValue", "description": "Extension value." } }, @@ -2961,29 +2478,18 @@ "extension" ] }, - "GeoCode": { - "title": "GeoCode", + "FirstName": { + "title": "FirstName", + "type": "string", + "minLength": 1, + "maxLength": 128, + "pattern": "^(?!\\s*$)[\\w .,'-]{1,128}$", + "description": "First name of the Party (Name Type)." + }, + "HealthServicesType":{ + "title": "HealthServicesType", "type": "object", - "description": "Data model for the complex type GeoCode. Indicates the geographic location from where the transaction was initiated.", - "properties": { - "latitude": { - "type": "string", - "description": "Latitude of the Party." - }, - "longitude": { - "type": "string", - "description": "Longitude of the Party." - } - }, - "required": [ - "latitude", - "longitude" - ] - }, - "HealthServicesType":{ - "title": "HealthServicesType", - "type": "object", - "description": "Data model for the complex type HealthServicesType. Contains health services information.", + "description": "Data model for the complex type HealthServicesType. Contains health services information.", "properties": { "name": { "type": "string" @@ -2993,185 +2499,21 @@ } } }, - "IndividualQuote": { - "title": "IndividualQuote", - "type": "object", - "description": "Data model for the complex type IndividualQuote.", - "properties": { - "quoteId": { - "type": "string", - "description": "Identifies quote message." - }, - "transactionId": { - "type": "string", - "description": "Identifies transaction message." - }, - "payee": { - "$ref": "#/definitions/Party", - "description": "Information about the Payee in the proposed financial transaction." - }, - "amountType": { - "type": "string", - "description": "SEND for sendAmount, RECEIVE for receiveAmount." - }, - "amount": { - "$ref": "#/definitions/Money", - "description": "Depending on amountType - If SEND - The amount the Payer would like to send, that is, the amount that should be withdrawn from the Payer account including any fees. The amount is updated by each participating entity in the transaction. If RECEIVE - The amount the Payee should receive, that is, the amount that should be sent to the receiver exclusive any fees. The amount is not updated by any of the participating entities." - }, - "fees": { - "$ref": "#/definitions/Money", - "description": "The fees in the transaction. The fees element should be empty if fees should be non-disclosed. The fees element should be non-empty if fees should be disclosed." - }, - "transactionType": { - "$ref": "#/definitions/TransactionType", - "description": "Type of transaction that the quote is requested for." - }, - "note": { - "type": "string", - "description": "Memo that will be attached to the transaction." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "quoteId", - "transactionId", - "payee", - "amountType", - "amount", - "transactionType" - ] - }, - "IndividualQuoteResult": { - "title": "IndividualQuoteResult", - "type": "object", - "description": "Data model for the complex type IndividualQuoteResult.", - "properties": { - "quoteId": { - "type": "string", - "description": "Identifies quote message." - }, - "payee": { - "$ref": "#/definitions/Party", - "description": "Information about the Payee in the proposed financial transaction." - }, - "transferAmount": { - "$ref": "#/definitions/Money", - "description": "Amount that the Payee FSP should receive." - }, - "payeeReceiveAmount": { - "$ref": "#/definitions/Money", - "description": "Amount that the Payee should receive in the end-to-end transaction. Optional as the Payee FSP might not want to disclose any optional Payee fees." - }, - "payeeFspFee": { - "$ref": "#/definitions/Money", - "description": "Payee FSP’s part of the transaction fee." - }, - "payeeFspCommission": { - "$ref": "#/definitions/Money", - "description": "Transaction commission from the Payee FSP" - }, - "ilpPacket": { - "type": "string", - "description": "The ILP Packet that must be attached to the transfer by the Payer." - }, - "condition": { - "type": "string", - "description": "The condition that must be attached to the transfer by the Payer." - }, - "errorInformation": { - "$ref": "#/definitions/ErrorInformation", - "description": "Error code, category description. Note - receiveAmount, payeeFspFee, payeeFspCommission, expiration, ilpPacket, condition should not be set if errorInformation is set." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "quoteId" - ] - }, - "IndividualTransfer": { - "title": "IndividualTransfer", - "type": "object", - "description": "Data model for the complex type IndividualTransfer.", - "properties": { - "transferId": { - "type": "string", - "description": "Identifies messages related to the same /transfers sequence." - }, - "transferAmount": { - "$ref": "#/definitions/Money", - "description": "Transaction amount to be sent." - }, - "ilpPacket": { - "type": "string", - "description": "ILP Packet containing the amount delivered to the Payee and the ILP Address of the Payee and any other end-to-end data." - }, - "condition": { - "type": "string", - "description": "Condition that must be fulfilled to commit the transfer." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "transferId", - "transferAmount", - "ilpPacket", - "condition" - ] - }, - "IndividualTransferResult": { - "title": "IndividualTransferResult", - "type": "object", - "description": "Data model for the complex type IndividualTransferResult.", - "properties": { - "transferId": { - "type": "string", - "description": "Identifies messages related to the same /transfers sequence." - }, - "fulfilment": { - "type": "string", - "description": "Fulfilment of the condition specified with the transaction. Note - Either fulfilment or errorInformation should be set, not both." - }, - "errorInformation": { - "$ref": "#/definitions/ErrorInformation", - "description": "If transfer is REJECTED, error information may be provided. Note - Either fulfilment or errorInformation should be set, not both." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "transferId" - ] + "LastName": { + "title": "LastName", + "type": "string", + "minLength": 1, + "maxLength": 128, + "pattern": "^(?!\\s*$)[\\w .,'-]{1,128}$", + "description": "Last name of the Party (Name Type)." }, - "Money": { - "title": "Money", - "type": "object", - "description": "Data model for the complex type Money.", - "properties": { - "currency": { - "$ref": "#/definitions/Currency", - "type": "string", - "description": "Currency of the amount." - }, - "amount": { - "type": "string", - "description": "Amount of Money." - } - }, - "required": [ - "currency", - "amount" - ] + "MiddleName": { + "title": "MiddleName", + "type": "string", + "minLength": 1, + "maxLength": 128, + "pattern": "^(?!\\s*$)[\\w .,'-]{1,128}$", + "description": "Middle name of the Party (Name Type)." }, "ParticipantsTypeIDSubIDPostRequest": { "title": "ParticipantsTypeIDSubIDPostRequest", @@ -3179,15 +2521,16 @@ "description": "POST /participants/{Type}/{ID}/{SubId}, /participants/{Type}/{ID} object", "properties": { "fspId": { - "type": "string", - "description": "FSP Identifier that the Party belongs to.", - "minLength": 1, - "maxLength": 32 + "$ref": "#/definitions/FspId", + "description": "FSP Identifier that the Party belongs to." }, "currency": { "$ref": "#/definitions/Currency", - "type": "string", "description": "Indicate that the provided Currency is supported by the Party." + }, + "extensionList": { + "$ref": "#/definitions/ExtensionList", + "description": "Optional extension, specific to deployment." } }, "required": [ @@ -3200,10 +2543,8 @@ "description": "PUT /participants/{Type}/{ID}/{SubId}, /participants/{Type}/{ID} object", "properties": { "fspId": { - "type": "string", - "description": "FSP Identifier that the Party belongs to.", - "minLength": 1, - "maxLength": 32 + "$ref": "#/definitions/FspId", + "description": "FSP Identifier that the Party belongs to." } } }, @@ -3237,7 +2578,7 @@ "description": "POST /participants object", "properties": { "requestId": { - "type": "string", + "$ref": "#/definitions/CorrelationId", "description": "The ID of the request, decided by the client. Used for identification of the callback from the server." }, "partyList": { @@ -3251,7 +2592,6 @@ }, "currency": { "$ref": "#/definitions/Currency", - "type": "string", "description": "Indicate that the provided Currency is supported by each PartyIdInfo in the list." } }, @@ -3270,11 +2610,11 @@ "description": "Party Id type, id, sub ID or type, and FSP Id." }, "merchantClassificationCode": { - "type": "string", + "$ref": "#/definitions/MerchantClassificationCode", "description": "Used in the context of Payee Information, where the Payee happens to be a merchant accepting merchant payments." }, "name": { - "type": "string", + "$ref": "#/definitions/PartyName", "description": "Display name of the Party, could be a real name or a nick name." }, "personalInfo": { @@ -3293,14 +2633,15 @@ "properties": { "firstName": { "type": "string", + "$ref": "#/definitions/FirstName", "description": "Party’s first name." }, "middleName": { - "type": "string", + "$ref": "#/definitions/MiddleName", "description": "Party’s middle name." }, "lastName": { - "type": "string", + "$ref": "#/definitions/LastName", "description": "Party’s last name." } } @@ -3311,22 +2652,20 @@ "description": "Data model for the complex type PartyIdInfo.", "properties": { "partyIdType": { - "type": "string", + "$ref": "#/definitions/PartyIdType", "description": "Type of the identifier." }, "partyIdentifier": { - "type": "string", + "$ref": "#/definitions/PartyIdentifier", "description": "An identifier for the Party." }, "partySubIdOrType": { - "type": "string", + "$ref": "#/definitions/PartySubIdOrType", "description": "A sub-identifier or sub-type for the Party." }, "fspId": { - "type": "string", - "description": "FSP ID (if known)", - "minLength": 1, - "maxLength": 32 + "$ref": "#/definitions/FspId", + "description": "FSP ID (if known)" }, "extensionList": { "$ref": "#/definitions/ExtensionList", @@ -3338,6 +2677,27 @@ "partyIdentifier" ] }, + "PartyIdentifier": { + "title": "PartyIdentifier", + "type": "string", + "minLength": 1, + "maxLength": 128, + "description": "Identifier of the Party." + }, + "PartyName": { + "title": "PartyName", + "type": "string", + "minLength": 1, + "maxLength": 128, + "description": "Name of the Party. Could be a real name or a nickname." + }, + "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." + }, "PartiesTypeIDPutResponse": { "title": "PartiesTypeIDPutResponse", "type": "object", @@ -3362,7 +2722,7 @@ "description": "First, middle and last name for the Party." }, "dateOfBirth": { - "type": "string", + "$ref": "#/definitions/DateOfBirth", "description": "Date of birth for the Party." } } @@ -3385,400 +2745,6 @@ "partyId" ] }, - "QuotesPostRequest": { - "title": "QuotesPostRequest", - "type": "object", - "description": "POST /quotes object", - "properties": { - "quoteId": { - "type": "string", - "description": "Common ID between the FSPs for the quote object, decided by the Payer FSP. The ID should be reused for resends of the same quote for a transaction. A new ID should be generated for each new quote for a transaction." - }, - "transactionId": { - "type": "string", - "description": "Common ID (decided by the Payer FSP) between the FSPs for the future transaction object. The actual transaction will be created as part of a successful transfer process. The ID should be reused for resends of the same quote for a transaction. A new ID should be generated for each new quote for a transaction." - }, - "transactionRequestId": { - "type": "string", - "description": "Identifies an optional previously-sent transaction request." - }, - "payee": { - "$ref": "#/definitions/Party", - "description": "Information about the Payee in the proposed financial transaction." - }, - "payer": { - "$ref": "#/definitions/Party", - "description": "Information about the Payer in the proposed financial transaction." - }, - "amountType": { - "type": "string", - "description": "SEND for send amount, RECEIVE for receive amount." - }, - "amount": { - "$ref": "#/definitions/Money", - "description": "Depending on amountType. If SEND - The amount the Payer would like to send, that is, the amount that should be withdrawn from the Payer account including any fees. The amount is updated by each participating entity in the transaction. If RECEIVE - The amount the Payee should receive, that is, the amount that should be sent to the receiver exclusive any fees. The amount is not updated by any of the participating entities." - }, - "fees": { - "$ref": "#/definitions/Money", - "description": "The fees in the transaction. The fees element should be empty if fees should be non-disclosed. The fees element should be non-empty if fees should be disclosed." - }, - "transactionType": { - "$ref": "#/definitions/TransactionType", - "description": "Type of transaction for which the quote is requested." - }, - "geoCode": { - "$ref": "#/definitions/GeoCode", - "description": "Longitude and Latitude of the initiating Party. Can be used to detect fraud." - }, - "note": { - "type": "string", - "description": "A memo that will be attached to the transaction." - }, - "expiration": { - "type": "string", - "description": "Expiration is optional. It can be set to get a quick failure in case the peer FSP takes too long to respond. Also, it may be beneficial for Consumer, Agent, and Merchant to know that their request has a time limit." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "quoteId", - "transactionId", - "payee", - "payer", - "amountType", - "amount", - "transactionType" - ] - }, - "QuotesIDPutResponse": { - "title": "QuotesIDPutResponse", - "type": "object", - "description": "PUT /quotes/{ID} object", - "properties": { - "transferAmount": { - "$ref": "#/definitions/Money", - "description": "The amount of money that the Payee FSP should receive." - }, - "payeeReceiveAmount": { - "$ref": "#/definitions/Money", - "description": "The amount of Money that the Payee should receive in the end-to-end transaction. Optional as the Payee FSP might not want to disclose any optional Payee fees." - }, - "payeeFspFee": { - "$ref": "#/definitions/Money", - "description": "Payee FSP’s part of the transaction fee." - }, - "payeeFspCommission": { - "$ref": "#/definitions/Money", - "description": "Transaction commission from the Payee FSP." - }, - "expiration": { - "type": "string", - "description": "Date and time until when the quotation is valid and can be honored when used in the subsequent transaction." - }, - "geoCode": { - "$ref": "#/definitions/GeoCode", - "description": "Longitude and Latitude of the Payee. Can be used to detect fraud." - }, - "ilpPacket": { - "type": "string", - "description": "The ILP Packet that must be attached to the transfer by the Payer." - }, - "condition": { - "type": "string", - "description": "The condition that must be attached to the transfer by the Payer." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "transferAmount", - "expiration", - "ilpPacket", - "condition" - ] - }, - "Refund": { - "title": "Refund", - "type": "object", - "description": "Data model for the complex type Refund.", - "properties": { - "originalTransactionId": { - "type": "string", - "description": "Reference to the original transaction ID that is requested to be refunded." - }, - "refundReason": { - "type": "string", - "description": "Free text indicating the reason for the refund." - } - }, - "required": [ - "originalTransactionId" - ] - }, - "Transaction": { - "title": "Transaction", - "type": "object", - "description": "Data model for the complex type Transaction. The Transaction type is used to carry end-to-end data between the Payer FSP and the Payee FSP in the ILP Packet. Both the transactionId and the quoteId in the data model are decided by the Payer FSP in the POST /quotes.", - "properties": { - "transactionId": { - "type": "string", - "description": "ID of the transaction, the ID is decided by the Payer FSP during the creation of the quote." - }, - "quoteId": { - "type": "string", - "description": "ID of the quote, the ID is decided by the Payer FSP during the creation of the quote." - }, - "payee": { - "$ref": "#/definitions/Party", - "description": "Information about the Payee in the proposed financial transaction." - }, - "payer": { - "$ref": "#/definitions/Party", - "description": "Information about the Payer in the proposed financial transaction." - }, - "amount": { - "$ref": "#/definitions/Money", - "description": "Transaction amount to be sent." - }, - "transactionType": { - "$ref": "#/definitions/TransactionType", - "description": "Type of the transaction." - }, - "note": { - "type": "string", - "description": "Memo associated to the transaction, intended to the Payee." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "transactionId", - "quoteId", - "payee", - "payer", - "amount", - "transactionType" - ] - }, - "TransactionRequestsIDPutResponse": { - "title": "TransactionRequestsIDPutResponse", - "type": "object", - "description": "PUT /transactionRequests/{ID} object", - "properties": { - "transactionId": { - "type": "string", - "description": "Identifies a related transaction (if a transaction has been created)." - }, - "transactionRequestState": { - "type": "string", - "description": "State of the transaction request." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "transactionRequestState" - ] - }, - "TransactionsIDPutResponse": { - "title": "TransactionsIDPutResponse", - "type": "object", - "description": "PUT /transactions/{ID} object", - "properties": { - "completedTimestamp": { - "type": "string", - "description": "Time and date when the transaction was completed." - }, - "transactionState": { - "type": "string", - "description": "State of the transaction." - }, - "code": { - "type": "string", - "description": "Optional redemption information provided to Payer after transaction has been completed." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "transactionState" - ] - }, - "TransactionType": { - "title": "TransactionType", - "type": "object", - "description": "Data model for the complex type TransactionType.", - "properties": { - "scenario": { - "type": "string", - "description": "Deposit, withdrawal, refund, …" - }, - "subScenario": { - "type": "string", - "description": "Possible sub-scenario, defined locally within the scheme." - }, - "initiator": { - "type": "string", - "description": "Who is initiating the transaction - Payer or Payee" - }, - "initiatorType": { - "type": "string", - "description": "Consumer, agent, business, …" - }, - "refundInfo": { - "$ref": "#/definitions/Refund", - "description": "Extra information specific to a refund scenario. Should only be populated if scenario is REFUND" - }, - "balanceOfPayments": { - "type": "string", - "description": "Balance of Payments code." - } - }, - "required": [ - "scenario", - "initiator", - "initiatorType" - ] - }, - "TransfersPostRequest": { - "title": "TransfersPostRequest", - "type": "object", - "description": "POST /transfers Request object", - "properties": { - "transferId": { - "type": "string", - "description": "The common ID between the FSPs and the optional Switch for the transfer object, decided by the Payer FSP. The ID should be reused for resends of the same transfer. A new ID should be generated for each new transfer." - }, - "payeeFsp": { - "type": "string", - "description": "Payee FSP in the proposed financial transaction." - }, - "payerFsp": { - "type": "string", - "description": "Payer FSP in the proposed financial transaction." - }, - "amount": { - "$ref": "#/definitions/Money", - "description": "The transfer amount to be sent." - }, - "ilpPacket": { - "type": "string", - "description": "The ILP Packet containing the amount delivered to the Payee and the ILP Address of the Payee and any other end-to-end data." - }, - "condition": { - "type": "string", - "description": "The condition that must be fulfilled to commit the transfer." - }, - "expiration": { - "type": "string", - "description": "Expiration can be set to get a quick failure expiration of the transfer. The transfer should be rolled back if no fulfilment is delivered before this time." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "transferId", - "payeeFsp", - "payerFsp", - "amount", - "ilpPacket", - "condition", - "expiration" - ] - }, - "TransactionRequestsPostRequest": { - "title": "TransactionRequestsPostRequest", - "type": "object", - "description": "POST /transactionRequests object", - "properties": { - "transactionRequestId": { - "type": "string", - "description": "Common ID between the FSPs for the transaction request object, decided by the Payee FSP. The ID should be reused for resends of the same transaction request. A new ID should be generated for each new transaction request." - }, - "payee": { - "$ref": "#/definitions/Party", - "description": "Information about the Payee in the proposed financial transaction." - }, - "payer": { - "$ref": "#/definitions/PartyIdInfo", - "description": "Information about the Payer type, id, sub-type/id, FSP Id in the proposed financial transaction." - }, - "amount": { - "$ref": "#/definitions/Money", - "description": "Requested amount to be transferred from the Payer to Payee." - }, - "transactionType": { - "$ref": "#/definitions/TransactionType", - "description": "Type of transaction." - }, - "note": { - "type": "string", - "description": "Reason for the transaction request, intended to the Payer." - }, - "geoCode": { - "$ref": "#/definitions/GeoCode", - "description": "Longitude and Latitude of the initiating Party. Can be used to detect fraud." - }, - "authenticationType": { - "type": "string", - "description": "OTP or QR Code, otherwise empty." - }, - "expiration": { - "type": "string", - "description": "Can be set to get a quick failure in case the peer FSP takes too long to respond. Also, it may be beneficial for Consumer, Agent, Merchant to know that their request has a time limit." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "transactionRequestId", - "payee", - "payer", - "amount", - "transactionType" - ] - }, - "TransfersIDPutResponse": { - "title": "TransfersIDPutResponse", - "type": "object", - "description": "PUT /transfers/{ID} object", - "properties": { - "fulfilment": { - "type": "string", - "description": "Fulfilment of the condition specified with the transaction. Mandatory if transfer has completed successfully." - }, - "completedTimestamp": { - "type": "string", - "description": "Time and date when the transaction was completed." - }, - "transferState": { - "type": "string", - "description": "State of the transfer." - }, - "extensionList": { - "$ref": "#/definitions/ExtensionList", - "description": "Optional extension, specific to deployment." - } - }, - "required": [ - "transferState" - ] - }, "Status": { "title": "Status", "type": "object", @@ -4075,4 +3041,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/test/unit/handlers/participants/participants.test.js b/test/unit/handlers/participants/participants.test.js index 313fcb9f..867dd0d3 100644 --- a/test/unit/handlers/participants/participants.test.js +++ b/test/unit/handlers/participants/participants.test.js @@ -51,21 +51,21 @@ describe('/participants', () => { sandbox.restore() }) const mock = { - requestId: 'HNNnJ', + requestId: '3ede3c17-36aa-42f4-b6db-b0df2e42f31e', partyList: [{ - partyIdType: 'LnlWooyQk', + partyIdType: 'MSISDN', partyIdentifier: 'MIYCVaNdsLD', partySubIdOrType: 'GNYKQO', fspId: 'ohidNUSaZRGCUViMhXOwyiPKq' }, { - partyIdType: 'QGijB', + partyIdType: 'MSISDN', partyIdentifier: 'eEmRAczAyz', partySubIdOrType: 'ki', fspId: 'sYhkSmfUW' }, { - partyIdType: 'nxRgD', + partyIdType: 'MSISDN', partyIdentifier: 'SNLwBJVZ', partySubIdOrType: 'fBcEvS', fspId: 'lgfJVXYOpsNfY' diff --git a/test/unit/handlers/parties/parties.test.js b/test/unit/handlers/parties/parties.test.js index e3a36f2e..f88b0485 100644 --- a/test/unit/handlers/parties/parties.test.js +++ b/test/unit/handlers/parties/parties.test.js @@ -54,21 +54,21 @@ describe('/parties', () => { it('postParticipantsBatch returns 200', async () => { // Arrange const mock = { - requestId: 'HNNnJ', + requestId: 'f3c6a35e-dd36-4186-9363-ec5accf3338a', partyList: [{ - partyIdType: 'LnlWooyQk', + partyIdType: 'MSISDN', partyIdentifier: 'MIYCVaNdsLD', partySubIdOrType: 'GNYKQO', fspId: 'ohidNUSaZRGCUViMhXOwyiPKq' }, { - partyIdType: 'QGijB', + partyIdType: 'MSISDN', partyIdentifier: 'eEmRAczAyz', partySubIdOrType: 'ki', fspId: 'sYhkSmfUW' }, { - partyIdType: 'nxRgD', + partyIdType: 'MSISDN', partyIdentifier: 'SNLwBJVZ', partySubIdOrType: 'fBcEvS', fspId: 'lgfJVXYOpsNfY'