@mojaloop/api-snippets 17.2.0-snapshot.0 → 17.2.0-snapshot.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/sdk-scheme-adapter-outbound-v2_0_0-openapi3-snippets.yaml +12 -17
- package/lib/sdk-scheme-adapter/v2_0_0/outbound/json-schemas.json +27 -86
- package/lib/sdk-scheme-adapter/v2_0_0/outbound/openapi.d.ts +8 -8
- package/lib/sdk-scheme-adapter/v2_0_0/outbound/schemas.d.ts +17 -62
- package/package.json +1 -1
- package/sdk-scheme-adapter/v2_0_0/components/schemas/requestToPayTransferRequest.yaml +3 -1
- package/sdk-scheme-adapter/v2_0_0/components/schemas/requestToPayTransferResponse.yaml +4 -2
- package/sdk-scheme-adapter/v2_0_0/outbound/openapi.yaml +2 -2
- package/sdk-scheme-adapter/v2_0_0/outbound/paths/{requestToPayTransfer_requestToPayTransactionId.yaml → requestToPayTransfer_transactionRequestId.yaml} +4 -4
- package/sdk-scheme-adapter/v2_0_0/components/parameters/requestToPayTransactionId.yaml +0 -8
@@ -383,15 +383,15 @@ paths:
|
|
383
383
|
$ref: '#/components/responses/transferServerError'
|
384
384
|
'504':
|
385
385
|
$ref: '#/components/responses/transferTimeout'
|
386
|
-
/requestToPayTransfer/{
|
386
|
+
/requestToPayTransfer/{transactionRequestId}:
|
387
387
|
put:
|
388
388
|
summary: >-
|
389
389
|
Continues a transfer that has paused at the otp stage in order to accept
|
390
390
|
or reject quote
|
391
391
|
description: >
|
392
|
-
|
393
|
-
|
394
|
-
|
392
|
+
This request is used to continue a requestToPayTransfer initiated via
|
393
|
+
the `POST /requestToPayTransfer` method that has halted after quotation
|
394
|
+
stage and/or otp stage.
|
395
395
|
|
396
396
|
|
397
397
|
The request body should contain either the "acceptOTP" or "acceptQuote"
|
@@ -410,7 +410,7 @@ paths:
|
|
410
410
|
- $ref: '#/components/schemas/transferContinuationAcceptQuote'
|
411
411
|
- $ref: '#/components/schemas/transferContinuationAcceptOTP'
|
412
412
|
parameters:
|
413
|
-
- $ref: '#/components/parameters/
|
413
|
+
- $ref: '#/components/parameters/transactionRequestId'
|
414
414
|
responses:
|
415
415
|
'200':
|
416
416
|
$ref: '#/components/responses/transferSuccess'
|
@@ -2399,7 +2399,9 @@ components:
|
|
2399
2399
|
amount:
|
2400
2400
|
$ref: '#/components/schemas/Amount'
|
2401
2401
|
scenario:
|
2402
|
-
$ref: '#/components/schemas/
|
2402
|
+
$ref: '#/components/schemas/TransactionScenario'
|
2403
|
+
subScenario:
|
2404
|
+
$ref: '#/components/schemas/TransactionSubScenario'
|
2403
2405
|
initiator:
|
2404
2406
|
$ref: '#/components/schemas/TransactionInitiator'
|
2405
2407
|
initiatorType:
|
@@ -2411,7 +2413,7 @@ components:
|
|
2411
2413
|
requestToPayTransferResponse:
|
2412
2414
|
type: object
|
2413
2415
|
required:
|
2414
|
-
-
|
2416
|
+
- transactionRequestId
|
2415
2417
|
- from
|
2416
2418
|
- to
|
2417
2419
|
- amountType
|
@@ -2421,11 +2423,13 @@ components:
|
|
2421
2423
|
properties:
|
2422
2424
|
transferId:
|
2423
2425
|
$ref: '#/components/schemas/CorrelationId'
|
2424
|
-
|
2426
|
+
homeR2PTransactionId:
|
2425
2427
|
type: string
|
2426
2428
|
description: >-
|
2427
2429
|
Transaction ID from the DFSP backend, used to reconcile transactions
|
2428
2430
|
between the Switch and DFSP backend systems.
|
2431
|
+
transactionRequestId:
|
2432
|
+
$ref: '#/components/schemas/CorrelationId'
|
2429
2433
|
from:
|
2430
2434
|
$ref: '#/components/schemas/transferParty'
|
2431
2435
|
to:
|
@@ -2808,15 +2812,6 @@ components:
|
|
2808
2812
|
description: >-
|
2809
2813
|
Identifier of the merchant request to pay to continue as returned in the
|
2810
2814
|
response to a `POST /requestToPay` request.
|
2811
|
-
requestToPayTransactionId:
|
2812
|
-
name: requestToPayTransactionId
|
2813
|
-
in: path
|
2814
|
-
required: true
|
2815
|
-
schema:
|
2816
|
-
$ref: '#/components/schemas/CorrelationId'
|
2817
|
-
description: >-
|
2818
|
-
Identifier of the merchant request to pay transfer to continue as
|
2819
|
-
returned in the response to a `POST /requestToPayTransfer` request.
|
2820
2815
|
transferId:
|
2821
2816
|
name: transferId
|
2822
2817
|
in: path
|
@@ -21144,90 +21144,24 @@
|
|
21144
21144
|
"example": "123.45"
|
21145
21145
|
},
|
21146
21146
|
"scenario": {
|
21147
|
-
"title": "
|
21148
|
-
"type": "
|
21149
|
-
"
|
21150
|
-
|
21151
|
-
"
|
21152
|
-
|
21153
|
-
|
21154
|
-
|
21155
|
-
|
21156
|
-
|
21157
|
-
|
21158
|
-
|
21159
|
-
|
21160
|
-
|
21161
|
-
|
21162
|
-
|
21163
|
-
|
21164
|
-
|
21165
|
-
"title": "TransactionSubScenario",
|
21166
|
-
"type": "string",
|
21167
|
-
"pattern": "^[A-Z_]{1,32}$",
|
21168
|
-
"description": "Possible sub-scenario, defined locally within the scheme (UndefinedEnum Type).",
|
21169
|
-
"example": "LOCALLY_DEFINED_SUBSCENARIO"
|
21170
|
-
},
|
21171
|
-
"initiator": {
|
21172
|
-
"title": "TransactionInitiator",
|
21173
|
-
"type": "string",
|
21174
|
-
"enum": [
|
21175
|
-
"PAYER",
|
21176
|
-
"PAYEE"
|
21177
|
-
],
|
21178
|
-
"description": "Below are the allowed values for the enumeration.\n- 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.\n- 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.",
|
21179
|
-
"example": "PAYEE"
|
21180
|
-
},
|
21181
|
-
"initiatorType": {
|
21182
|
-
"title": "TransactionInitiatorType",
|
21183
|
-
"type": "string",
|
21184
|
-
"enum": [
|
21185
|
-
"CONSUMER",
|
21186
|
-
"AGENT",
|
21187
|
-
"BUSINESS",
|
21188
|
-
"DEVICE"
|
21189
|
-
],
|
21190
|
-
"description": "Below are the allowed values for the enumeration.\n- CONSUMER - Consumer is the initiator of the transaction.\n- AGENT - Agent is the initiator of the transaction.\n- BUSINESS - Business is the initiator of the transaction.\n- DEVICE - Device is the initiator of the transaction.",
|
21191
|
-
"example": "CONSUMER"
|
21192
|
-
},
|
21193
|
-
"refundInfo": {
|
21194
|
-
"title": "Refund",
|
21195
|
-
"type": "object",
|
21196
|
-
"description": "Data model for the complex type Refund.",
|
21197
|
-
"properties": {
|
21198
|
-
"originalTransactionId": {
|
21199
|
-
"title": "CorrelationId",
|
21200
|
-
"type": "string",
|
21201
|
-
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
|
21202
|
-
"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 (‘-‘).",
|
21203
|
-
"example": "b51ec534-ee48-4575-b6a9-ead2955b8069"
|
21204
|
-
},
|
21205
|
-
"refundReason": {
|
21206
|
-
"title": "RefundReason",
|
21207
|
-
"type": "string",
|
21208
|
-
"minLength": 1,
|
21209
|
-
"maxLength": 128,
|
21210
|
-
"description": "Reason for the refund.",
|
21211
|
-
"example": "Free text indicating reason for the refund."
|
21212
|
-
}
|
21213
|
-
},
|
21214
|
-
"required": [
|
21215
|
-
"originalTransactionId"
|
21216
|
-
]
|
21217
|
-
},
|
21218
|
-
"balanceOfPayments": {
|
21219
|
-
"title": "BalanceOfPayments",
|
21220
|
-
"type": "string",
|
21221
|
-
"pattern": "^[1-9]\\d{2}$",
|
21222
|
-
"description": "(BopCode) The API data type [BopCode](https://www.imf.org/external/np/sta/bopcode/) is a JSON String of 3 characters, consisting of digits only. Negative numbers are not allowed. A leading zero is not allowed.",
|
21223
|
-
"example": "123"
|
21224
|
-
}
|
21225
|
-
},
|
21226
|
-
"required": [
|
21227
|
-
"scenario",
|
21228
|
-
"initiator",
|
21229
|
-
"initiatorType"
|
21230
|
-
]
|
21147
|
+
"title": "TransactionScenario",
|
21148
|
+
"type": "string",
|
21149
|
+
"enum": [
|
21150
|
+
"DEPOSIT",
|
21151
|
+
"WITHDRAWAL",
|
21152
|
+
"TRANSFER",
|
21153
|
+
"PAYMENT",
|
21154
|
+
"REFUND"
|
21155
|
+
],
|
21156
|
+
"description": "Below are the allowed values for the enumeration.\n- 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.\n- 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.\n- TRANSFER - Used for performing a P2P (Peer to Peer, or Consumer to Consumer) transaction.\n- 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.\n- REFUND - Used for performing a refund of transaction.",
|
21157
|
+
"example": "DEPOSIT"
|
21158
|
+
},
|
21159
|
+
"subScenario": {
|
21160
|
+
"title": "TransactionSubScenario",
|
21161
|
+
"type": "string",
|
21162
|
+
"pattern": "^[A-Z_]{1,32}$",
|
21163
|
+
"description": "Possible sub-scenario, defined locally within the scheme (UndefinedEnum Type).",
|
21164
|
+
"example": "LOCALLY_DEFINED_SUBSCENARIO"
|
21231
21165
|
},
|
21232
21166
|
"initiator": {
|
21233
21167
|
"title": "TransactionInitiator",
|
@@ -21275,7 +21209,7 @@
|
|
21275
21209
|
"requestToPayTransferResponse": {
|
21276
21210
|
"type": "object",
|
21277
21211
|
"required": [
|
21278
|
-
"
|
21212
|
+
"transactionRequestId",
|
21279
21213
|
"from",
|
21280
21214
|
"to",
|
21281
21215
|
"amountType",
|
@@ -21291,10 +21225,17 @@
|
|
21291
21225
|
"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 (‘-‘).",
|
21292
21226
|
"example": "b51ec534-ee48-4575-b6a9-ead2955b8069"
|
21293
21227
|
},
|
21294
|
-
"
|
21228
|
+
"homeR2PTransactionId": {
|
21295
21229
|
"type": "string",
|
21296
21230
|
"description": "Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems."
|
21297
21231
|
},
|
21232
|
+
"transactionRequestId": {
|
21233
|
+
"title": "CorrelationId",
|
21234
|
+
"type": "string",
|
21235
|
+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
|
21236
|
+
"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 (‘-‘).",
|
21237
|
+
"example": "b51ec534-ee48-4575-b6a9-ead2955b8069"
|
21238
|
+
},
|
21298
21239
|
"from": {
|
21299
21240
|
"type": "object",
|
21300
21241
|
"required": [
|
@@ -272,9 +272,9 @@ export interface paths {
|
|
272
272
|
};
|
273
273
|
};
|
274
274
|
};
|
275
|
-
"/requestToPayTransfer/{
|
275
|
+
"/requestToPayTransfer/{transactionRequestId}": {
|
276
276
|
/**
|
277
|
-
*
|
277
|
+
* This request is used to continue a requestToPayTransfer initiated via the `POST /requestToPayTransfer` method that has halted after quotation stage and/or otp stage.
|
278
278
|
*
|
279
279
|
* The request body should contain either the "acceptOTP" or "acceptQuote" property set to `true` as required to continue the transfer.
|
280
280
|
*
|
@@ -283,8 +283,8 @@ export interface paths {
|
|
283
283
|
put: {
|
284
284
|
parameters: {
|
285
285
|
path: {
|
286
|
-
/** Identifier of the merchant request to pay
|
287
|
-
|
286
|
+
/** Identifier of the merchant request to pay to continue as returned in the response to a `POST /requestToPay` request. */
|
287
|
+
transactionRequestId: components["parameters"]["transactionRequestId"];
|
288
288
|
};
|
289
289
|
};
|
290
290
|
responses: {
|
@@ -1222,7 +1222,8 @@ export interface components {
|
|
1222
1222
|
amountType: components["schemas"]["AmountType"];
|
1223
1223
|
currency: components["schemas"]["Currency"];
|
1224
1224
|
amount: components["schemas"]["Amount"];
|
1225
|
-
scenario: components["schemas"]["
|
1225
|
+
scenario: components["schemas"]["TransactionScenario"];
|
1226
|
+
subScenario?: components["schemas"]["TransactionSubScenario"];
|
1226
1227
|
initiator: components["schemas"]["TransactionInitiator"];
|
1227
1228
|
initiatorType: components["schemas"]["TransactionInitiatorType"];
|
1228
1229
|
note?: components["schemas"]["Note"];
|
@@ -1231,7 +1232,8 @@ export interface components {
|
|
1231
1232
|
requestToPayTransferResponse: {
|
1232
1233
|
transferId?: components["schemas"]["CorrelationId"];
|
1233
1234
|
/** @description Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems. */
|
1234
|
-
|
1235
|
+
homeR2PTransactionId?: string;
|
1236
|
+
transactionRequestId: components["schemas"]["CorrelationId"];
|
1235
1237
|
from: components["schemas"]["transferParty"];
|
1236
1238
|
to: components["schemas"]["transferParty"];
|
1237
1239
|
amountType: components["schemas"]["AmountType"];
|
@@ -1476,8 +1478,6 @@ export interface components {
|
|
1476
1478
|
SubId: string;
|
1477
1479
|
/** @description Identifier of the merchant request to pay to continue as returned in the response to a `POST /requestToPay` request. */
|
1478
1480
|
transactionRequestId: components["schemas"]["CorrelationId"];
|
1479
|
-
/** @description Identifier of the merchant request to pay transfer to continue as returned in the response to a `POST /requestToPayTransfer` request. */
|
1480
|
-
requestToPayTransactionId: components["schemas"]["CorrelationId"];
|
1481
1481
|
/** @description Identifier of the transfer to continue as returned in the response to a `POST /transfers` request. */
|
1482
1482
|
transferId: components["schemas"]["CorrelationId"];
|
1483
1483
|
};
|
@@ -10623,68 +10623,16 @@ export declare namespace Schemas {
|
|
10623
10623
|
scenario: {
|
10624
10624
|
title: string;
|
10625
10625
|
type: string;
|
10626
|
+
enum: string[];
|
10626
10627
|
description: string;
|
10627
|
-
|
10628
|
-
|
10629
|
-
|
10630
|
-
|
10631
|
-
|
10632
|
-
|
10633
|
-
|
10634
|
-
|
10635
|
-
subScenario: {
|
10636
|
-
title: string;
|
10637
|
-
type: string;
|
10638
|
-
pattern: string;
|
10639
|
-
description: string;
|
10640
|
-
example: string;
|
10641
|
-
};
|
10642
|
-
initiator: {
|
10643
|
-
title: string;
|
10644
|
-
type: string;
|
10645
|
-
enum: string[];
|
10646
|
-
description: string;
|
10647
|
-
example: string;
|
10648
|
-
};
|
10649
|
-
initiatorType: {
|
10650
|
-
title: string;
|
10651
|
-
type: string;
|
10652
|
-
enum: string[];
|
10653
|
-
description: string;
|
10654
|
-
example: string;
|
10655
|
-
};
|
10656
|
-
refundInfo: {
|
10657
|
-
title: string;
|
10658
|
-
type: string;
|
10659
|
-
description: string;
|
10660
|
-
properties: {
|
10661
|
-
originalTransactionId: {
|
10662
|
-
title: string;
|
10663
|
-
type: string;
|
10664
|
-
pattern: string;
|
10665
|
-
description: string;
|
10666
|
-
example: string;
|
10667
|
-
};
|
10668
|
-
refundReason: {
|
10669
|
-
title: string;
|
10670
|
-
type: string;
|
10671
|
-
minLength: number;
|
10672
|
-
maxLength: number;
|
10673
|
-
description: string;
|
10674
|
-
example: string;
|
10675
|
-
};
|
10676
|
-
};
|
10677
|
-
required: string[];
|
10678
|
-
};
|
10679
|
-
balanceOfPayments: {
|
10680
|
-
title: string;
|
10681
|
-
type: string;
|
10682
|
-
pattern: string;
|
10683
|
-
description: string;
|
10684
|
-
example: string;
|
10685
|
-
};
|
10686
|
-
};
|
10687
|
-
required: string[];
|
10628
|
+
example: string;
|
10629
|
+
};
|
10630
|
+
subScenario: {
|
10631
|
+
title: string;
|
10632
|
+
type: string;
|
10633
|
+
pattern: string;
|
10634
|
+
description: string;
|
10635
|
+
example: string;
|
10688
10636
|
};
|
10689
10637
|
initiator: {
|
10690
10638
|
title: string;
|
@@ -10728,10 +10676,17 @@ export declare namespace Schemas {
|
|
10728
10676
|
description: string;
|
10729
10677
|
example: string;
|
10730
10678
|
};
|
10731
|
-
|
10679
|
+
homeR2PTransactionId: {
|
10732
10680
|
type: string;
|
10733
10681
|
description: string;
|
10734
10682
|
};
|
10683
|
+
transactionRequestId: {
|
10684
|
+
title: string;
|
10685
|
+
type: string;
|
10686
|
+
pattern: string;
|
10687
|
+
description: string;
|
10688
|
+
example: string;
|
10689
|
+
};
|
10735
10690
|
from: {
|
10736
10691
|
type: string;
|
10737
10692
|
required: string[];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
type: object
|
2
2
|
required:
|
3
|
-
-
|
3
|
+
- transactionRequestId
|
4
4
|
- from
|
5
5
|
- to
|
6
6
|
- amountType
|
@@ -10,11 +10,13 @@ required:
|
|
10
10
|
properties:
|
11
11
|
transferId:
|
12
12
|
$ref: ./CorrelationId.yaml
|
13
|
-
|
13
|
+
homeR2PTransactionId:
|
14
14
|
type: string
|
15
15
|
description: >-
|
16
16
|
Transaction ID from the DFSP backend, used to reconcile transactions
|
17
17
|
between the Switch and DFSP backend systems.
|
18
|
+
transactionRequestId:
|
19
|
+
$ref: ./CorrelationId.yaml
|
18
20
|
from:
|
19
21
|
$ref: ./transferParty.yaml
|
20
22
|
to:
|
@@ -48,8 +48,8 @@ paths:
|
|
48
48
|
$ref: paths/requestToPay_transactionRequestId.yaml
|
49
49
|
/requestToPayTransfer:
|
50
50
|
$ref: paths/requestToPayTransfer.yaml
|
51
|
-
/requestToPayTransfer/{
|
52
|
-
$ref: paths/
|
51
|
+
/requestToPayTransfer/{transactionRequestId}:
|
52
|
+
$ref: paths/requestToPayTransfer_transactionRequestId.yaml
|
53
53
|
/simpleTransfers:
|
54
54
|
$ref: paths/simpleTransfers.yaml
|
55
55
|
/transfers:
|
@@ -3,9 +3,9 @@ put:
|
|
3
3
|
Continues a transfer that has paused at the otp stage in order to accept or
|
4
4
|
reject quote
|
5
5
|
description: >
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
This request is used to continue a
|
7
|
+
requestToPayTransfer initiated via the `POST /requestToPayTransfer` method that has halted after
|
8
|
+
quotation stage and/or otp stage.
|
9
9
|
|
10
10
|
|
11
11
|
The request body should contain either the "acceptOTP" or "acceptQuote"
|
@@ -24,7 +24,7 @@ put:
|
|
24
24
|
- $ref: ../../components/schemas/transferContinuationAcceptQuote.yaml
|
25
25
|
- $ref: ../../components/schemas/transferContinuationAcceptOTP.yaml
|
26
26
|
parameters:
|
27
|
-
- $ref: ../../components/parameters/
|
27
|
+
- $ref: ../../components/parameters/transactionRequestId.yaml
|
28
28
|
responses:
|
29
29
|
'200':
|
30
30
|
$ref: ../../components/responses/transferSuccess.yaml
|