Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions docs/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ components:
description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
type: string
transferState:
$ref: '#/components/schemas/transferState'
$ref: '#/components/schemas/TransferStateFromBackend'
required:
- homeTransactionId
type: object
Expand Down Expand Up @@ -2293,6 +2293,18 @@ components:
- QRCODE - QR code used as One Time Password.
- U2F - U2F is a new addition isolated to Thirdparty stream.
example: OTP
TransferStateFromBackend:
title: TransferStateFromBackend
type: string
enum:
- RESERVED
- COMMITTED
description: |-
Below are the allowed values for the enumeration.
- RESERVED - Next ledger has reserved the transfer.
- COMMITTED - Next ledger has successfully performed the transfer.
Note: There is no ABORTED state, http error response with proper mojaloop error code should be used to abort / reject a transfer.
example: COMMITTED
TransfersIDPutResponse:
title: TransfersIDPutResponse
type: object
Expand Down Expand Up @@ -2681,10 +2693,6 @@ components:
allOf:
- $ref: '#/components/schemas/DateTime'
- description: Time and date when the conversion was executed.
conversionState:
allOf:
- $ref: '#/components/schemas/TransferState'
- description: The current status of the conversion request.
FxTransfersPostBackendResponse:
title: FxTransfersPostBackendResponse
type: object
Expand All @@ -2698,11 +2706,15 @@ components:
completedTimestamp:
$ref: '#/components/schemas/completedTimestamp'
conversionState:
$ref: '#/components/schemas/conversionState'
$ref: '#/components/schemas/TransferStateFromBackend'
extensionList:
$ref: '#/components/schemas/ExtensionList_v2_1_0'
required:
- conversionState
conversionState:
allOf:
- $ref: '#/components/schemas/TransferState'
- description: The current status of the conversion request.
FxTransfersPutBackendRequest:
title: FxTransfersPutBackendRequest
type: object
Expand Down
673 changes: 387 additions & 286 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,30 +101,30 @@
"@redocly/cli": "^1.5.0",
"@types/jest": "^29.5.14",
"@types/js-yaml": "^4.0.9",
"@typescript-eslint/eslint-plugin": "^8.27.0",
"@typescript-eslint/parser": "^8.27.0",
"@typescript-eslint/eslint-plugin": "^8.28.0",
"@typescript-eslint/parser": "^8.28.0",
"audit-ci": "^7.1.0",
"browser-sync": "^3.0.3",
"diff": "^7.0.0",
"eslint": "^8.55.0",
"eslint-config-prettier": "^10.1.1",
"eslint-config-standard": "^17.1.0",
"eslint-import-resolver-typescript": "^4.2.2",
"eslint-import-resolver-typescript": "^4.2.5",
"eslint-plugin-cucumber": "^2.0.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-prettier": "^5.2.5",
"eslint-plugin-promise": "^6.2.0",
"eslint-plugin-standard": "^5.0.0",
"husky": "9.1.7",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"lint-staged": "^15.5.0",
"npm-check-updates": "^17.1.15",
"npm-check-updates": "^17.1.16",
"prettier": "^3.5.3",
"standard-version": "^9.5.0",
"swagger-cli": "^4.0.4",
"ts-jest": "^29.2.6",
"ts-jest": "^29.3.0",
"ts-node": "^10.9.2",
"ts-patch": "^3.3.0",
"tslib": "^2.8.1",
Expand Down
2 changes: 1 addition & 1 deletion sdk-scheme-adapter/v2_1_0/backend/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ components:
description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
type: string
transferState:
$ref: '#/components/schemas/transferState'
$ref: '../components/schemas/TransferStateFromBackend.yaml'
required:
- homeTransactionId
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ properties:
completedTimestamp:
$ref: "../../../../fspiop/v2_0/openapi3/components/schemas/FxTransfersIDPutResponse.yaml#/properties/completedTimestamp"
conversionState:
$ref: "../../../../fspiop/v2_0/openapi3/components/schemas/FxTransfersIDPutResponse.yaml#/properties/conversionState"
$ref: ./TransferStateFromBackend.yaml
extensionList:
$ref: "./ExtensionList_v2_1_0.yaml"
required:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
title: TransferStateFromBackend
type: string
enum:
- RESERVED
- COMMITTED
description: >-
Below are the allowed values for the enumeration.

- RESERVED - Next ledger has reserved the transfer.

- COMMITTED - Next ledger has successfully performed the transfer.

Note: There is no ABORTED state, http error response with proper mojaloop error code should be used to abort / reject a transfer.

example: 'COMMITTED'
83 changes: 42 additions & 41 deletions src/sdk-scheme-adapter/v2_1_0/backend/json-schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -22101,14 +22101,14 @@
"type": "string"
},
"transferState": {
"description": "Below are the allowed values for the enumeration - RECEIVED DFSP has received the transfer. - RESERVED DFSP has reserved the transfer. - COMMITTED DFSP has successfully performed the transfer. - ABORTED DFSP has aborted the transfer due a rejection or failure to perform the transfer.\n",
"title": "TransferStateFromBackend",
"type": "string",
"enum": [
"RECEIVED",
"RESERVED",
"COMMITTED",
"ABORTED"
"COMMITTED"
],
"type": "string"
"description": "Below are the allowed values for the enumeration.\n- RESERVED - Next ledger has reserved the transfer.\n- COMMITTED - Next ledger has successfully performed the transfer.\nNote: There is no ABORTED state, http error response with proper mojaloop error code should be used to abort / reject a transfer.",
"example": "COMMITTED"
}
},
"required": [
Expand Down Expand Up @@ -29817,6 +29817,16 @@
"description": "Below are the allowed values for the enumeration AuthenticationType.\n- OTP - One-time password generated by the Payer FSP.\n- QRCODE - QR code used as One Time Password.\n- U2F - U2F is a new addition isolated to Thirdparty stream.",
"example": "OTP"
},
"TransferStateFromBackend": {
"title": "TransferStateFromBackend",
"type": "string",
"enum": [
"RESERVED",
"COMMITTED"
],
"description": "Below are the allowed values for the enumeration.\n- RESERVED - Next ledger has reserved the transfer.\n- COMMITTED - Next ledger has successfully performed the transfer.\nNote: There is no ABORTED state, http error response with proper mojaloop error code should be used to abort / reject a transfer.",
"example": "COMMITTED"
},
"TransfersIDPutResponse": {
"title": "TransfersIDPutResponse",
"type": "object",
Expand Down Expand Up @@ -37448,25 +37458,6 @@
}
]
},
"conversionState": {
"allOf": [
{
"title": "TransferState",
"type": "string",
"enum": [
"RECEIVED",
"RESERVED",
"COMMITTED",
"ABORTED"
],
"description": "Below are the allowed values for the enumeration.\n- RECEIVED - Next ledger has received the transfer.\n- RESERVED - Next ledger has reserved the transfer.\n- COMMITTED - Next ledger has successfully performed the transfer.\n- ABORTED - Next ledger has aborted the transfer due to a rejection or failure to perform the transfer.",
"example": "RESERVED"
},
{
"description": "The current status of the conversion request."
}
]
},
"FxTransfersPostBackendResponse": {
"title": "FxTransfersPostBackendResponse",
"type": "object",
Expand Down Expand Up @@ -37506,23 +37497,14 @@
]
},
"conversionState": {
"allOf": [
{
"title": "TransferState",
"type": "string",
"enum": [
"RECEIVED",
"RESERVED",
"COMMITTED",
"ABORTED"
],
"description": "Below are the allowed values for the enumeration.\n- RECEIVED - Next ledger has received the transfer.\n- RESERVED - Next ledger has reserved the transfer.\n- COMMITTED - Next ledger has successfully performed the transfer.\n- ABORTED - Next ledger has aborted the transfer due to a rejection or failure to perform the transfer.",
"example": "RESERVED"
},
{
"description": "The current status of the conversion request."
}
]
"title": "TransferStateFromBackend",
"type": "string",
"enum": [
"RESERVED",
"COMMITTED"
],
"description": "Below are the allowed values for the enumeration.\n- RESERVED - Next ledger has reserved the transfer.\n- COMMITTED - Next ledger has successfully performed the transfer.\nNote: There is no ABORTED state, http error response with proper mojaloop error code should be used to abort / reject a transfer.",
"example": "COMMITTED"
},
"extensionList": {
"title": "ExtensionList",
Expand Down Expand Up @@ -37569,6 +37551,25 @@
"conversionState"
]
},
"conversionState": {
"allOf": [
{
"title": "TransferState",
"type": "string",
"enum": [
"RECEIVED",
"RESERVED",
"COMMITTED",
"ABORTED"
],
"description": "Below are the allowed values for the enumeration.\n- RECEIVED - Next ledger has received the transfer.\n- RESERVED - Next ledger has reserved the transfer.\n- COMMITTED - Next ledger has successfully performed the transfer.\n- ABORTED - Next ledger has aborted the transfer due to a rejection or failure to perform the transfer.",
"example": "RESERVED"
},
{
"description": "The current status of the conversion request."
}
]
},
"FxTransfersPutBackendRequest": {
"title": "FxTransfersPutBackendRequest",
"type": "object",
Expand Down
16 changes: 13 additions & 3 deletions src/sdk-scheme-adapter/v2_1_0/backend/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ export interface components {
fulfilment?: components["schemas"]["IlpFulfilment"];
/** @description Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems. */
homeTransactionId: string;
transferState?: components["schemas"]["transferState"];
transferState?: components["schemas"]["TransferStateFromBackend"];
};
/**
* @description Below are the allowed values for the enumeration - RECEIVED DFSP has received the transfer. - RESERVED DFSP has reserved the transfer. - COMMITTED DFSP has successfully performed the transfer. - ABORTED DFSP has aborted the transfer due a rejection or failure to perform the transfer.
Expand Down Expand Up @@ -1165,6 +1165,16 @@ export interface components {
* @enum {string}
*/
AuthenticationType: "OTP" | "QRCODE" | "U2F";
/**
* TransferStateFromBackend
* @description Below are the allowed values for the enumeration.
* - RESERVED - Next ledger has reserved the transfer.
* - COMMITTED - Next ledger has successfully performed the transfer.
* Note: There is no ABORTED state, http error response with proper mojaloop error code should be used to abort / reject a transfer.
* @example COMMITTED
* @enum {string}
*/
TransferStateFromBackend: "RESERVED" | "COMMITTED";
/**
* TransfersIDPutResponse
* @description The object sent in the PUT /transfers/{ID} callback.
Expand Down Expand Up @@ -1365,7 +1375,6 @@ export interface components {
};
fulfilment: components["schemas"]["IlpFulfilment"] & unknown;
completedTimestamp: components["schemas"]["DateTime"] & unknown;
conversionState: components["schemas"]["TransferState"] & unknown;
/**
* FxTransfersPostBackendResponse
* @description The object sent as a response for the POST /fxTransfers request.
Expand All @@ -1375,9 +1384,10 @@ export interface components {
homeTransactionId?: string;
fulfilment?: components["schemas"]["fulfilment"];
completedTimestamp?: components["schemas"]["completedTimestamp"];
conversionState: components["schemas"]["conversionState"];
conversionState: components["schemas"]["TransferStateFromBackend"];
extensionList?: components["schemas"]["ExtensionList_v2_1_0"];
};
conversionState: components["schemas"]["TransferState"] & unknown;
/**
* FxTransfersPutBackendRequest
* @description PUT /fxTransfers/{commitRequestId} object
Expand Down
3 changes: 2 additions & 1 deletion src/sdk-scheme-adapter/v2_1_0/backend/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export namespace Schemas {
export const CurrencyConverter = JsonSchemas["CurrencyConverter"]
export const FxRate = JsonSchemas["FxRate"]
export const AuthenticationType = JsonSchemas["AuthenticationType"]
export const TransferStateFromBackend = JsonSchemas["TransferStateFromBackend"]
export const TransfersIDPutResponse = JsonSchemas["TransfersIDPutResponse"]
export const TransfersPostRequest = JsonSchemas["TransfersPostRequest"]
export const QuotesIDPutResponse = JsonSchemas["QuotesIDPutResponse"]
Expand All @@ -142,8 +143,8 @@ export namespace Schemas {
export const FxTransfersPostBackendRequest = JsonSchemas["FxTransfersPostBackendRequest"]
export const fulfilment = JsonSchemas["fulfilment"]
export const completedTimestamp = JsonSchemas["completedTimestamp"]
export const conversionState = JsonSchemas["conversionState"]
export const FxTransfersPostBackendResponse = JsonSchemas["FxTransfersPostBackendResponse"]
export const conversionState = JsonSchemas["conversionState"]
export const FxTransfersPutBackendRequest = JsonSchemas["FxTransfersPutBackendRequest"]
export const FxTransfersPatchBackendRequest = JsonSchemas["FxTransfersPatchBackendRequest"]
}
3 changes: 2 additions & 1 deletion src/sdk-scheme-adapter/v2_1_0/backend/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export namespace Types {
export type CurrencyConverter = components['schemas']['CurrencyConverter']
export type FxRate = components['schemas']['FxRate']
export type AuthenticationType = components['schemas']['AuthenticationType']
export type TransferStateFromBackend = components['schemas']['TransferStateFromBackend']
export type TransfersIDPutResponse = components['schemas']['TransfersIDPutResponse']
export type TransfersPostRequest = components['schemas']['TransfersPostRequest']
export type QuotesIDPutResponse = components['schemas']['QuotesIDPutResponse']
Expand All @@ -142,8 +143,8 @@ export namespace Types {
export type FxTransfersPostBackendRequest = components['schemas']['FxTransfersPostBackendRequest']
export type fulfilment = components['schemas']['fulfilment']
export type completedTimestamp = components['schemas']['completedTimestamp']
export type conversionState = components['schemas']['conversionState']
export type FxTransfersPostBackendResponse = components['schemas']['FxTransfersPostBackendResponse']
export type conversionState = components['schemas']['conversionState']
export type FxTransfersPutBackendRequest = components['schemas']['FxTransfersPutBackendRequest']
export type FxTransfersPatchBackendRequest = components['schemas']['FxTransfersPatchBackendRequest']
}