Skip to content

Commit a8204f7

Browse files
authored
feat(csi-1244): add sdk outbound DELETE /accounts/{Type}/{ID}/{SubId} endpoint (#195)
1 parent daf5185 commit a8204f7

18 files changed

+1445
-824
lines changed

.ncurc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ module.exports = {
99
// Updating eslint breaks the build
1010
'eslint',
1111
// Breaks peer dependencies with v7+
12-
'eslint-plugin-promise',
12+
'eslint-plugin-promise'
1313
]
1414
}

audit-ci.jsonc

-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55
"moderate": true,
66
"allowlist": [
77
"GHSA-r7jx-5m6m-cpg9" // https://github.com/advisories/GHSA-r7jx-5m6m-cpg9
8-
98
]
109
}

docs/sdk-scheme-adapter-outbound-v2_1_0-openapi3-snippets.yaml

+125-27
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,43 @@ paths:
4848
$ref: '#/components/responses/accountsCreationError'
4949
'504':
5050
$ref: '#/components/responses/accountsCreationTimeout'
51+
/accounts/{Type}/{ID}:
52+
delete:
53+
summary: Delete account on the Account Lookup Service
54+
description: The HTTP request `DELETE /accounts/{Type}/{ID}` is used to account account information on the Account Lookup Service (ALS) by Type and ID.
55+
tags:
56+
- Accounts
57+
parameters:
58+
- $ref: '#/components/parameters/Type'
59+
- $ref: '#/components/parameters/ID'
60+
responses:
61+
'200':
62+
$ref: '#/components/responses/accountDeletionCompleted'
63+
'400':
64+
$ref: '#/components/responses/accountDeletionError'
65+
'500':
66+
$ref: '#/components/responses/accountDeletionError'
67+
'504':
68+
$ref: '#/components/responses/accountDeletionTimeout'
69+
/accounts/{Type}/{ID}/{SubId}:
70+
delete:
71+
summary: Delete account on the Account Lookup Service
72+
description: The HTTP request `DELETE /accounts/{Type}/{ID}/{SubId}` is used to account account information on the Account Lookup Service (ALS) by Type, ID, and SubId.
73+
tags:
74+
- Accounts
75+
parameters:
76+
- $ref: '#/components/parameters/Type'
77+
- $ref: '#/components/parameters/ID'
78+
- $ref: '#/components/parameters/SubId'
79+
responses:
80+
'200':
81+
$ref: '#/components/responses/accountDeletionCompleted'
82+
'400':
83+
$ref: '#/components/responses/accountDeletionError'
84+
'500':
85+
$ref: '#/components/responses/accountDeletionError'
86+
'504':
87+
$ref: '#/components/responses/accountDeletionTimeout'
5188
/bulkQuotes:
5289
post:
5390
summary: Request bulk quotes for the provided financial transactions
@@ -908,6 +945,55 @@ components:
908945
properties:
909946
executionState:
910947
$ref: '#/components/schemas/accountsResponse'
948+
FspId:
949+
title: FspId
950+
type: string
951+
minLength: 1
952+
maxLength: 32
953+
description: FSP identifier.
954+
accountDeletionStatus:
955+
type: array
956+
items:
957+
type: object
958+
required:
959+
- fspId
960+
properties:
961+
fspId:
962+
$ref: '#/components/schemas/FspId'
963+
error:
964+
$ref: '#/components/schemas/errorResponse'
965+
accountDeletionState:
966+
type: string
967+
enum:
968+
- ERROR_OCCURRED
969+
- COMPLETED
970+
accountDeletionResponse:
971+
type: object
972+
required:
973+
- idType
974+
- idValue
975+
properties:
976+
idType:
977+
$ref: '#/components/schemas/PartyIdType'
978+
idValue:
979+
$ref: '#/components/schemas/PartyIdentifier'
980+
subIdOrType:
981+
$ref: '#/components/schemas/PartySubIdOrType'
982+
response:
983+
$ref: '#/components/schemas/accountDeletionStatus'
984+
currentState:
985+
$ref: '#/components/schemas/accountDeletionState'
986+
lastError:
987+
$ref: '#/components/schemas/transferError'
988+
deleteAccountResponse:
989+
type: object
990+
required:
991+
- body
992+
properties:
993+
body:
994+
type: object
995+
headers:
996+
type: object
911997
TransactionInitiatorType:
912998
title: TransactionInitiatorType
913999
type: string
@@ -968,12 +1054,6 @@ components:
9681054
type: string
9691055
pattern: ^[\d]{1,4}$
9701056
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.
971-
FspId:
972-
title: FspId
973-
type: string
974-
minLength: 1
975-
maxLength: 32
976-
description: FSP identifier.
9771057
KYCInformation:
9781058
title: KYCInformation
9791059
type: string
@@ -2834,6 +2914,24 @@ components:
28342914
application/json:
28352915
schema:
28362916
$ref: '#/components/schemas/errorAccountsResponse'
2917+
accountDeletionCompleted:
2918+
description: Account deletion completed
2919+
content:
2920+
application/json:
2921+
schema:
2922+
$ref: '#/components/schemas/accountDeletionResponse'
2923+
accountDeletionError:
2924+
description: An error occurred while deleting an account
2925+
content:
2926+
application/json:
2927+
schema:
2928+
$ref: '#/components/schemas/errorAccountsResponse'
2929+
accountDeletionTimeout:
2930+
description: Timeout occurred while deleting an account
2931+
content:
2932+
application/json:
2933+
schema:
2934+
$ref: '#/components/schemas/errorAccountsResponse'
28372935
bulkQuoteSuccess:
28382936
description: Bulk quote completed successfully
28392937
content:
@@ -2974,27 +3072,6 @@ components:
29743072
schema:
29753073
$ref: '#/components/schemas/ServicesFXPPutResponse'
29763074
parameters:
2977-
bulkQuoteId:
2978-
name: bulkQuoteId
2979-
in: path
2980-
required: true
2981-
schema:
2982-
$ref: '#/components/schemas/CorrelationId'
2983-
description: Identifier of the bulk transfer to continue as returned in the response to a `POST /bulkTransfers` request.
2984-
bulkTransactionId:
2985-
name: bulkTransactionId
2986-
in: path
2987-
required: true
2988-
schema:
2989-
$ref: '#/components/schemas/CorrelationId'
2990-
description: Identifier of the bulk transaction to continue as returned in the response to a `POST /bulkTransaction` request.
2991-
bulkTransferId:
2992-
name: bulkTransferId
2993-
in: path
2994-
required: true
2995-
schema:
2996-
$ref: '#/components/schemas/CorrelationId'
2997-
description: Identifier of the bulk transfer to continue as returned in the response to a `POST /bulkTransfers` request.
29983075
Type:
29993076
name: Type
30003077
in: path
@@ -3016,6 +3093,27 @@ components:
30163093
schema:
30173094
type: string
30183095
description: A sub-identifier of the party identifier, or a sub-type of the party identifier's type. For example, `PASSPORT`, `DRIVING_LICENSE`.
3096+
bulkQuoteId:
3097+
name: bulkQuoteId
3098+
in: path
3099+
required: true
3100+
schema:
3101+
$ref: '#/components/schemas/CorrelationId'
3102+
description: Identifier of the bulk transfer to continue as returned in the response to a `POST /bulkTransfers` request.
3103+
bulkTransactionId:
3104+
name: bulkTransactionId
3105+
in: path
3106+
required: true
3107+
schema:
3108+
$ref: '#/components/schemas/CorrelationId'
3109+
description: Identifier of the bulk transaction to continue as returned in the response to a `POST /bulkTransaction` request.
3110+
bulkTransferId:
3111+
name: bulkTransferId
3112+
in: path
3113+
required: true
3114+
schema:
3115+
$ref: '#/components/schemas/CorrelationId'
3116+
description: Identifier of the bulk transfer to continue as returned in the response to a `POST /bulkTransfers` request.
30193117
transactionRequestId:
30203118
name: transactionRequestId
30213119
in: path

0 commit comments

Comments
 (0)