@mojaloop/api-snippets 17.0.2-snapshot.1 → 17.0.3-snapshot.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/api-snippets",
3
- "version": "17.0.2-snapshot.1",
3
+ "version": "17.0.3-snapshot.0",
4
4
  "description": "Mojaloop API specification reusable snippets",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -22,11 +22,11 @@
22
22
  "build:openapi": "npm run build:v1.0; npm run build:v1.1; npm run build:thirdparty; npm run build:sdk-scheme-adapter:backend; npm run build:sdk-scheme-adapter:outbound;",
23
23
  "build:v1.0": "openapi bundle --output docs/fspiop-rest-v1.0-openapi3-snippets.yaml --ext yaml fspiop/v1_0/openapi3/openapi.yaml && swagger-cli validate docs/fspiop-rest-v1.0-openapi3-snippets.yaml",
24
24
  "build:v1.1": "openapi bundle --output docs/fspiop-rest-v1.1-openapi3-snippets.yaml --ext yaml fspiop/v1_1/openapi3/openapi.yaml && swagger-cli validate docs/fspiop-rest-v1.1-openapi3-snippets.yaml",
25
- "build:thirdparty": "openapi bundle --dereferenced --output docs/thirdparty-openapi3-snippets.yaml --ext yaml thirdparty/v1_0/openapi3/openapi.yaml && swagger-cli validate docs/thirdparty-openapi3-snippets.yaml",
25
+ "build:thirdparty": "openapi bundle --output docs/thirdparty-openapi3-snippets.yaml --ext yaml thirdparty/v1_0/openapi3/openapi.yaml && swagger-cli validate docs/thirdparty-openapi3-snippets.yaml",
26
26
  "build:thirdparty-dfsp": "swagger-cli bundle -o ./thirdparty/v1_0/openapi3/thirdparty-dfsp-api.yaml -t yaml ./thirdparty/v1_0/openapi3/thirdparty-dfsp-api.template.yaml",
27
27
  "build:thirdparty-pisp": "swagger-cli bundle -o ./thirdparty/v1_0/openapi3/thirdparty-pisp-api.yaml -t yaml ./thirdparty/v1_0/openapi3/thirdparty-pisp-api.template.yaml",
28
- "build:sdk-scheme-adapter:backend": "openapi bundle --dereferenced --output docs/sdk-scheme-adapter-backend-v2_0_0-openapi3-snippets.yaml --ext yaml sdk-scheme-adapter/v2_0_0/backend/openapi.yaml && swagger-cli validate docs/sdk-scheme-adapter-backend-v2_0_0-openapi3-snippets.yaml",
29
- "build:sdk-scheme-adapter:outbound": "openapi bundle --dereferenced --output docs/sdk-scheme-adapter-outbound-v2_0_0-openapi3-snippets.yaml --ext yaml sdk-scheme-adapter/v2_0_0/outbound/openapi.yaml && swagger-cli validate docs/sdk-scheme-adapter-outbound-v2_0_0-openapi3-snippets.yaml",
28
+ "build:sdk-scheme-adapter:backend": "openapi bundle --output docs/sdk-scheme-adapter-backend-v2_0_0-openapi3-snippets.yaml --ext yaml sdk-scheme-adapter/v2_0_0/backend/openapi.yaml && swagger-cli validate docs/sdk-scheme-adapter-backend-v2_0_0-openapi3-snippets.yaml",
29
+ "build:sdk-scheme-adapter:outbound": "openapi bundle --output docs/sdk-scheme-adapter-outbound-v2_0_0-openapi3-snippets.yaml --ext yaml sdk-scheme-adapter/v2_0_0/outbound/openapi.yaml && swagger-cli validate docs/sdk-scheme-adapter-outbound-v2_0_0-openapi3-snippets.yaml",
30
30
  "build:schemas:sdk-scheme-adapter:backend": "npx ts-node --transpile-only src/scripts/json-schema-generator.ts docs/sdk-scheme-adapter-backend-v2_0_0-openapi3-snippets.yaml src/sdk-scheme-adapter/v2_0_0/backend",
31
31
  "build:schemas:sdk-scheme-adapter:outbound": "npx ts-node --transpile-only src/scripts/json-schema-generator.ts docs/sdk-scheme-adapter-outbound-v2_0_0-openapi3-snippets.yaml src/sdk-scheme-adapter/v2_0_0/outbound",
32
32
  "lint": "eslint --ext ts --ext js test src",
@@ -68,7 +68,7 @@
68
68
  "license": "Apache-2.0",
69
69
  "dependencies": {
70
70
  "@apidevtools/json-schema-ref-parser": "^9.1.0",
71
- "commander": "^9.4.1",
71
+ "commander": "^9.5.0",
72
72
  "jest-ts-auto-mock": "^2.1.0",
73
73
  "js-yaml": "^4.1.0",
74
74
  "json-refs": "^3.0.15",
@@ -82,12 +82,12 @@
82
82
  "@types/responselike": "^1.0.0"
83
83
  },
84
84
  "devDependencies": {
85
- "@commitlint/cli": "^17.4.0",
85
+ "@commitlint/cli": "^17.4.1",
86
86
  "@commitlint/config-conventional": "^17.4.0",
87
87
  "@redocly/openapi-cli": "^1.0.0-beta.94",
88
88
  "@types/jest": "^29.2.5",
89
- "@typescript-eslint/eslint-plugin": "^5.48.0",
90
- "@typescript-eslint/parser": "^5.48.0",
89
+ "@typescript-eslint/eslint-plugin": "^5.48.1",
90
+ "@typescript-eslint/parser": "^5.48.1",
91
91
  "diff": "^5.1.0",
92
92
  "eslint": "^8.31.0",
93
93
  "eslint-config-prettier": "^8.6.0",
@@ -105,7 +105,7 @@
105
105
  "lint-staged": "^13.1.0",
106
106
  "npm-audit-resolver": "^3.0.0-7",
107
107
  "npm-check-updates": "^16.6.2",
108
- "prettier": "^2.8.1",
108
+ "prettier": "^2.8.2",
109
109
  "standard-version": "^9.5.0",
110
110
  "swagger-cli": "^4.0.4",
111
111
  "ts-jest": "^29.0.3",
@@ -454,7 +454,7 @@ components:
454
454
  quoteId:
455
455
  $ref: '#/components/schemas/quoteId'
456
456
  subScenario:
457
- $ref: '#/components/schemas/transactionSubScenario'
457
+ $ref: '../components/schemas/TransactionSubScenario.yaml'
458
458
  to:
459
459
  $ref: '#/components/schemas/transferParty'
460
460
  transactionId:
@@ -530,7 +530,7 @@ components:
530
530
  minLength: 1
531
531
  type: string
532
532
  subScenario:
533
- $ref: '#/components/schemas/transactionSubScenario'
533
+ $ref: '../components/schemas/TransactionSubScenario.yaml'
534
534
  to:
535
535
  $ref: '#/components/schemas/transferParty'
536
536
  transactionType:
@@ -865,13 +865,10 @@ components:
865
865
  properties:
866
866
  errorCode:
867
867
  $ref: '#/components/schemas/errorCode'
868
- description: Specific error number.
869
868
  errorDescription:
870
869
  $ref: '#/components/schemas/errorDescription'
871
- description: Error description string.
872
870
  extensionList:
873
871
  $ref: '#/components/schemas/extensionListComplex'
874
- description: Optional list of extensions, specific to deployment.
875
872
  required:
876
873
  - errorCode
877
874
  - errorDescription
@@ -936,15 +933,10 @@ components:
936
933
  properties:
937
934
  completedTimestamp:
938
935
  $ref: '#/components/schemas/timestamp'
939
- description: Time and date when the transaction was completed.
940
- example: '2020-05-19T08:38:08.699-04:00'
941
936
  extensionList:
942
937
  $ref: '#/components/schemas/extensionList'
943
- description: Optional extension, specific to deployment.
944
938
  transferState:
945
939
  $ref: '#/components/schemas/transferState'
946
- description: State of the transfer.
947
- example: COMMITTED
948
940
  required:
949
941
  - completedTimestamp
950
942
  - transferState
@@ -1038,21 +1030,16 @@ components:
1038
1030
  properties:
1039
1031
  amount:
1040
1032
  $ref: '#/components/schemas/amountCurrency'
1041
- description: Amount and currency of the transaction
1042
1033
  payee:
1043
1034
  $ref: '../components/schemas/Party.yaml'
1044
- description: Information about the Payee in the proposed financial transaction.
1045
1035
  payer:
1046
1036
  $ref: '../components/schemas/Party.yaml'
1047
- description: Information about the Payer in the proposed financial transaction.
1048
1037
  quoteId:
1049
1038
  $ref: '#/components/schemas/quoteId'
1050
1039
  transactionId:
1051
1040
  $ref: '#/components/schemas/transactionId'
1052
- description: Identifier for the transaction, decided by the Payer FSP during the creation of the quote.
1053
1041
  transactionType:
1054
1042
  $ref: '#/components/schemas/transactionTypeObject'
1055
- description: Information about type of transaction and initiator.
1056
1043
  required:
1057
1044
  - quoteId
1058
1045
  - transactionId
@@ -1113,34 +1100,26 @@ components:
1113
1100
  properties:
1114
1101
  amount:
1115
1102
  $ref: '#/components/schemas/money'
1116
- 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.
1117
1103
  amountType:
1118
1104
  $ref: '#/components/schemas/amountType'
1119
- description: SEND for send amount, RECEIVE for receive amount.
1120
1105
  currency:
1121
1106
  $ref: '#/components/schemas/currency'
1122
1107
  expiration:
1123
1108
  $ref: '#/components/schemas/timestamp'
1124
- description: An optional deadline for responding to the quote request.
1125
1109
  extensionList:
1126
1110
  $ref: '#/components/schemas/extensionList'
1127
1111
  feesAmount:
1128
1112
  $ref: '#/components/schemas/money'
1129
- 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.
1130
1113
  feesCurrency:
1131
1114
  $ref: '#/components/schemas/currency'
1132
1115
  from:
1133
1116
  $ref: '#/components/schemas/transferParty'
1134
- description: Information about the Payer in the proposed financial transaction.
1135
1117
  geoCode:
1136
1118
  $ref: '#/components/schemas/geoCode'
1137
- description: Longitude and Latitude of the initiating party. Can be used to detect fraud.
1138
1119
  initiator:
1139
1120
  $ref: '#/components/schemas/initiator'
1140
- description: Specifies if the initiator of the transfer is the Payer or Payee.
1141
1121
  initiatorType:
1142
1122
  $ref: '#/components/schemas/initiatorType'
1143
- description: Specifies the type of the transaction initiator.
1144
1123
  note:
1145
1124
  description: An optional note associated with the requested transfer.
1146
1125
  maxLength: 128
@@ -1149,16 +1128,13 @@ components:
1149
1128
  quoteId:
1150
1129
  $ref: '#/components/schemas/quoteId'
1151
1130
  subScenario:
1152
- $ref: '#/components/schemas/transactionSubScenario'
1131
+ $ref: '../components/schemas/TransactionSubScenario.yaml'
1153
1132
  to:
1154
1133
  $ref: '#/components/schemas/transferParty'
1155
- description: Information about the Payee in the proposed financial transaction.
1156
1134
  transactionId:
1157
1135
  $ref: '#/components/schemas/transactionId'
1158
- description: Identifier for the transaction, decided by the Payer FSP during the creation of the quote.
1159
1136
  transactionType:
1160
1137
  $ref: '#/components/schemas/transactionType'
1161
- description: Type of transaction for which the quote is requested.
1162
1138
  required:
1163
1139
  - quoteId
1164
1140
  - transactionId
@@ -1176,42 +1152,30 @@ components:
1176
1152
  properties:
1177
1153
  expiration:
1178
1154
  $ref: '#/components/schemas/timestamp'
1179
- description: Timestamp specifying the validity period of the quotation.
1180
1155
  extensionList:
1181
1156
  $ref: '#/components/schemas/extensionList'
1182
1157
  geoCode:
1183
1158
  $ref: '#/components/schemas/geoCode'
1184
- description: Longitude and Latitude of the Payee. Can be used to detect fraud.
1185
1159
  payeeFspCommissionAmount:
1186
1160
  $ref: '#/components/schemas/money'
1187
- description: Transaction commission from the Payee FSP.
1188
1161
  payeeFspCommissionAmountCurrency:
1189
1162
  $ref: '#/components/schemas/currency'
1190
- description: Currency of the `payeeFspCommissionAmount`.
1191
1163
  payeeFspFeeAmount:
1192
1164
  $ref: '#/components/schemas/money'
1193
- description: Payee FSP’s part of the transaction fee.
1194
1165
  payeeFspFeeAmountCurrency:
1195
1166
  $ref: '#/components/schemas/currency'
1196
- description: The currency of the `payeeFspFeeAmount`.
1197
1167
  payeeReceiveAmount:
1198
1168
  $ref: '#/components/schemas/money'
1199
- description: The 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.
1200
1169
  payeeReceiveAmountCurrency:
1201
1170
  $ref: '#/components/schemas/currency'
1202
- description: The currency of the `payeeReceiveAmount`.
1203
1171
  quoteId:
1204
1172
  $ref: '#/components/schemas/quoteId'
1205
- description: ID of the quote that this response relates to.
1206
1173
  transactionId:
1207
1174
  $ref: '#/components/schemas/transactionId'
1208
- description: Identifier for the transaction, decided by the Payer FSP during the creation of the quote.
1209
1175
  transferAmount:
1210
1176
  $ref: '#/components/schemas/money'
1211
- description: The amount of money that the Payer FSP should transfer to the Payee FSP.
1212
1177
  transferAmountCurrency:
1213
1178
  $ref: '#/components/schemas/currency'
1214
- description: The currency of the `transferAmount`.
1215
1179
  required:
1216
1180
  - quoteId
1217
1181
  - transactionId
@@ -1259,7 +1223,7 @@ components:
1259
1223
  transactionType:
1260
1224
  $ref: '#/components/schemas/transactionType'
1261
1225
  subScenario:
1262
- $ref: '#/components/schemas/transactionSubScenario'
1226
+ $ref: '../components/schemas/TransactionSubScenario.yaml'
1263
1227
  required:
1264
1228
  - transactionRequestId
1265
1229
  - to
@@ -1311,11 +1275,10 @@ components:
1311
1275
  $ref: '#/components/schemas/initiator'
1312
1276
  initiatorType:
1313
1277
  $ref: '#/components/schemas/initiatorType'
1314
- description: Specifies the type of the transaction initiator.
1315
1278
  scenario:
1316
1279
  $ref: '#/components/schemas/scenario'
1317
1280
  subScenario:
1318
- $ref: '#/components/schemas/transactionSubScenario'
1281
+ $ref: '../components/schemas/TransactionSubScenario.yaml'
1319
1282
  required:
1320
1283
  - scenario
1321
1284
  - initiator
@@ -1340,7 +1303,7 @@ components:
1340
1303
  maxLength: 128
1341
1304
  type: string
1342
1305
  subScenario:
1343
- $ref: '#/components/schemas/transactionSubScenario'
1306
+ $ref: '../components/schemas/TransactionSubScenario.yaml'
1344
1307
  timestamp:
1345
1308
  $ref: '#/components/schemas/timestamp'
1346
1309
  to:
@@ -1426,7 +1389,7 @@ components:
1426
1389
  quoteRequestExtensions:
1427
1390
  $ref: '#/components/schemas/extensionList'
1428
1391
  subScenario:
1429
- $ref: '#/components/schemas/transactionSubScenario'
1392
+ $ref: '../components/schemas/TransactionSubScenario.yaml'
1430
1393
  to:
1431
1394
  $ref: '#/components/schemas/transferParty'
1432
1395
  transactionType:
@@ -1448,18 +1411,13 @@ components:
1448
1411
  properties:
1449
1412
  completedTimestamp:
1450
1413
  $ref: '#/components/schemas/timestamp'
1451
- description: Completed timestamp from the DFSP backend, used for testing purposes to inject a given completed timestamp via a rule.
1452
- example: '2020-05-19T08:38:08.699-04:00'
1453
1414
  fulfilment:
1454
1415
  $ref: '../components/schemas/IlpFulfilment.yaml'
1455
- description: Fulfilment from the DFSP backend, used for testing purposes to inject an invalid fulfilment via a rule.
1456
1416
  homeTransactionId:
1457
1417
  description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
1458
1418
  type: string
1459
1419
  transferState:
1460
1420
  $ref: '#/components/schemas/transferState'
1461
- description: Transfer state from the DFSP backend, used for testing purposes to inject an desired transfer state via a rule.
1462
- example: ABORTED
1463
1421
  required:
1464
1422
  - homeTransactionId
1465
1423
  type: object
@@ -1,11 +1,6 @@
1
1
  type: object
2
2
  required:
3
3
  - homeTransactionId
4
- - transferId
5
- - to
6
- - amountType
7
- - currency
8
- - amount
9
4
  properties:
10
5
  transferId:
11
6
  $ref: ./CorrelationId.yaml
@@ -32,9 +27,9 @@ properties:
32
27
  quoteId:
33
28
  $ref: ./CorrelationId.yaml
34
29
  quoteResponse:
35
- $ref: ./QuotesIDPutResponse.yaml
30
+ $ref: ./individualQuoteResult.yaml
36
31
  fulfil:
37
- $ref: ./TransfersIDPutResponse.yaml
32
+ $ref: ./individualTransferResult.yaml
38
33
  quoteExtensions:
39
34
  $ref: ./ExtensionList.yaml
40
35
  transferExtensions:
@@ -22,10 +22,12 @@ info:
22
22
  paths:
23
23
  /:
24
24
  $ref: paths.yaml
25
- /transfers:
26
- $ref: paths/transfers.yaml
27
- /transfers/{transferId}:
28
- $ref: paths/transfers_transferId.yaml
25
+ /accounts:
26
+ $ref: paths/accounts.yaml
27
+ /bulkQuotes:
28
+ $ref: paths/bulkQuotes.yaml
29
+ /bulkQuotes/{bulkQuoteId}:
30
+ $ref: paths/bulkQuotes_bulkQuoteId.yaml
29
31
  /bulkTransactions:
30
32
  $ref: paths/bulkTransactions.yaml
31
33
  /bulkTransactions/{bulkTransactionId}:
@@ -34,23 +36,21 @@ paths:
34
36
  $ref: paths/bulkTransfers.yaml
35
37
  /bulkTransfers/{bulkTransferId}:
36
38
  $ref: paths/bulkTransfers_bulkTransferId.yaml
37
- /bulkQuotes:
38
- $ref: paths/bulkQuotes.yaml
39
- /bulkQuotes/{bulkQuoteId}:
40
- $ref: paths/bulkQuotes_bulkQuoteId.yaml
41
- /requestToPay:
42
- $ref: paths/requestToPay.yaml
43
- /requestToPayTransfer:
44
- $ref: paths/requestToPayTransfer.yaml
45
- /requestToPayTransfer/{requestToPayTransactionId}:
46
- $ref: paths/requestToPayTransfer_requestToPayTransactionId.yaml
47
- /accounts:
48
- $ref: paths/accounts.yaml
49
39
  /parties/{Type}/{ID}:
50
40
  $ref: paths/parties_Type_ID.yaml
51
41
  /parties/{Type}/{ID}/{SubId}:
52
42
  $ref: paths/parties_Type_ID_SubId.yaml
53
43
  /quotes:
54
44
  $ref: paths/quotes.yaml
45
+ /requestToPay:
46
+ $ref: paths/requestToPay.yaml
47
+ /requestToPayTransfer:
48
+ $ref: paths/requestToPayTransfer.yaml
49
+ /requestToPayTransfer/{requestToPayTransactionId}:
50
+ $ref: paths/requestToPayTransfer_requestToPayTransactionId.yaml
55
51
  /simpleTransfers:
56
52
  $ref: paths/simpleTransfers.yaml
53
+ /transfers:
54
+ $ref: paths/transfers.yaml
55
+ /transfers/{transferId}:
56
+ $ref: paths/transfers_transferId.yaml