@mbanq/core-sdk-js 0.26.0 → 0.28.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/README.md +46 -57
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/commands/index.d.mts +235 -2
- package/dist/commands/index.d.ts +235 -2
- package/dist/commands/index.js +2 -2
- package/dist/commands/index.mjs +2 -2
- package/dist/{config.d-BSoFrdxi.d.mts → config.d-BvqzFkbH.d.mts} +0 -4
- package/dist/{config.d-BSoFrdxi.d.ts → config.d-BvqzFkbH.d.ts} +0 -4
- package/dist/{error.d-aUq9Boe9.d.mts → error.d-8Btuol2n.d.mts} +1 -1
- package/dist/{error.d-Cn1_ZmBN.d.ts → error.d-ktr-yO7C.d.ts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/types/types.d.mts +2 -2
- package/dist/types/types.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,12 +44,20 @@ npm install @mbanq/core-sdk-js
|
|
|
44
44
|
import { createInstance, CreatePayment, GetTransfers } from '@mbanq/core-sdk-js';
|
|
45
45
|
|
|
46
46
|
const client = createInstance({
|
|
47
|
-
secret: 'your-jwt-secret',
|
|
48
|
-
signee: 'YOUR-SIGNEE',
|
|
49
47
|
baseUrl: 'https://api.cloud.mbanq.com',
|
|
50
48
|
tenantId: 'your-tenant-id'
|
|
51
49
|
});
|
|
52
50
|
|
|
51
|
+
await client.connect({
|
|
52
|
+
credential: {
|
|
53
|
+
client_id: 'your-client-id',
|
|
54
|
+
client_secret: 'your-client-secret',
|
|
55
|
+
username: 'your-username',
|
|
56
|
+
password: 'your-password',
|
|
57
|
+
grant_type: 'password'
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
53
61
|
// Create payment
|
|
54
62
|
const payment = await client.request(CreatePayment({
|
|
55
63
|
amount: 100.00,
|
|
@@ -84,77 +92,35 @@ const transfers = await client.request(GetTransfers({
|
|
|
84
92
|
|
|
85
93
|
## Setup
|
|
86
94
|
|
|
87
|
-
### Authentication
|
|
95
|
+
### Authentication
|
|
88
96
|
|
|
89
|
-
The SDK
|
|
90
|
-
|
|
91
|
-
#### 1. JWT Token Authentication (Recommended)
|
|
92
|
-
Use your API secret and signee for JWT-based authentication:
|
|
97
|
+
The SDK uses OAuth 2.0 password grant flow for authentication:
|
|
93
98
|
|
|
94
99
|
```javascript
|
|
95
100
|
const client = createInstance({
|
|
96
|
-
secret: 'your-jwt-secret',
|
|
97
|
-
signee: 'YOUR-SIGNEE',
|
|
98
101
|
baseUrl: 'https://api.cloud.mbanq.com',
|
|
99
102
|
tenantId: 'your-tenant-id'
|
|
100
103
|
});
|
|
101
|
-
```
|
|
102
104
|
|
|
103
|
-
|
|
104
|
-
If you already have a valid access token:
|
|
105
|
-
|
|
106
|
-
```javascript
|
|
107
|
-
// With "Bearer " prefix (recommended)
|
|
108
|
-
const client = createInstance({
|
|
109
|
-
bearerToken: 'Bearer your-access-token',
|
|
110
|
-
baseUrl: 'https://api.cloud.mbanq.com',
|
|
111
|
-
tenantId: 'your-tenant-id'
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
// Without "Bearer " prefix (automatically added)
|
|
115
|
-
const client = createInstance({
|
|
116
|
-
bearerToken: 'your-access-token', // "Bearer " will be added automatically
|
|
117
|
-
baseUrl: 'https://api.cloud.mbanq.com',
|
|
118
|
-
tenantId: 'your-tenant-id'
|
|
119
|
-
});
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
#### 3. OAuth Credential Authentication
|
|
123
|
-
For OAuth 2.0 password grant flow:
|
|
124
|
-
|
|
125
|
-
```javascript
|
|
126
|
-
const client = createInstance({
|
|
105
|
+
await client.connect({
|
|
127
106
|
credential: {
|
|
128
107
|
client_id: 'your-client-id',
|
|
129
108
|
client_secret: 'your-client-secret',
|
|
130
109
|
username: 'your-username',
|
|
131
110
|
password: 'your-password',
|
|
132
111
|
grant_type: 'password'
|
|
133
|
-
}
|
|
134
|
-
baseUrl: 'https://api.cloud.mbanq.com',
|
|
135
|
-
tenantId: 'your-tenant-id'
|
|
112
|
+
}
|
|
136
113
|
});
|
|
137
114
|
```
|
|
138
115
|
|
|
139
|
-
#### Authentication Priority
|
|
140
|
-
When multiple authentication methods are provided, the SDK uses them in this order:
|
|
141
|
-
1. **`bearerToken`** - Takes highest priority if provided
|
|
142
|
-
2. **`credential`** - OAuth flow is used if no bearerToken
|
|
143
|
-
3. **`secret` + `signee`** - JWT authentication used as fallback
|
|
144
|
-
|
|
145
116
|
#### Additional Configuration Options
|
|
146
117
|
```javascript
|
|
147
118
|
const client = createInstance({
|
|
148
|
-
// Choose one authentication method from above
|
|
149
|
-
secret: 'your-jwt-secret',
|
|
150
|
-
signee: 'YOUR-SIGNEE',
|
|
151
|
-
|
|
152
119
|
// Required configuration
|
|
153
120
|
baseUrl: 'https://api.cloud.mbanq.com',
|
|
154
121
|
tenantId: 'your-tenant-id',
|
|
155
122
|
|
|
156
123
|
// Optional configuration
|
|
157
|
-
traceId: 'custom-trace-id', // Custom request tracing identifier
|
|
158
124
|
axiosConfig: {
|
|
159
125
|
timeout: 30000, // Request timeout in milliseconds (default: 29000)
|
|
160
126
|
keepAlive: true, // HTTP keep-alive for connection reuse
|
|
@@ -163,6 +129,17 @@ const client = createInstance({
|
|
|
163
129
|
}
|
|
164
130
|
}
|
|
165
131
|
});
|
|
132
|
+
|
|
133
|
+
// Authenticate with OAuth credentials
|
|
134
|
+
await client.connect({
|
|
135
|
+
credential: {
|
|
136
|
+
client_id: 'your-client-id',
|
|
137
|
+
client_secret: 'your-client-secret',
|
|
138
|
+
username: 'your-username',
|
|
139
|
+
password: 'your-password',
|
|
140
|
+
grant_type: 'password'
|
|
141
|
+
}
|
|
142
|
+
});
|
|
166
143
|
```
|
|
167
144
|
|
|
168
145
|
### Security Best Practices
|
|
@@ -176,11 +153,19 @@ const client = createInstance({
|
|
|
176
153
|
#### Environment Variables Example
|
|
177
154
|
```javascript
|
|
178
155
|
const client = createInstance({
|
|
179
|
-
secret: process.env.MBANQ_API_SECRET,
|
|
180
|
-
signee: process.env.MBANQ_API_SIGNEE,
|
|
181
156
|
baseUrl: process.env.MBANQ_API_URL,
|
|
182
157
|
tenantId: process.env.MBANQ_TENANT_ID
|
|
183
158
|
});
|
|
159
|
+
|
|
160
|
+
await client.connect({
|
|
161
|
+
credential: {
|
|
162
|
+
client_id: process.env.MBANQ_CLIENT_ID,
|
|
163
|
+
client_secret: process.env.MBANQ_CLIENT_SECRET,
|
|
164
|
+
username: process.env.MBANQ_USERNAME,
|
|
165
|
+
password: process.env.MBANQ_PASSWORD,
|
|
166
|
+
grant_type: 'password'
|
|
167
|
+
}
|
|
168
|
+
});
|
|
184
169
|
```
|
|
185
170
|
|
|
186
171
|
#### Production Considerations
|
|
@@ -811,7 +796,7 @@ For detailed information about specific features and APIs, refer to the followin
|
|
|
811
796
|
- **[Mbanq API Reference](https://apidocs.cloud.mbanq.com/reference)** - Official API documentation with detailed endpoint information, request/response schemas, and examples
|
|
812
797
|
|
|
813
798
|
### Quick Links
|
|
814
|
-
- [Authentication
|
|
799
|
+
- [Authentication](#authentication) - OAuth credential configuration
|
|
815
800
|
- [Middleware Configuration](#middleware) - Logging, metrics, and custom middleware
|
|
816
801
|
- [Error Handling Patterns](#error-handling) - Error types and handling strategies
|
|
817
802
|
- [Type Definitions](#type-safety--validation) - Complete schema and type reference
|
|
@@ -846,8 +831,6 @@ The library uses a consistent error handling pattern. All API calls may throw th
|
|
|
846
831
|
### Error Types
|
|
847
832
|
- **`CommandError`**: Base error type with `code`, `message`, `statusCode`, and optional `requestId`
|
|
848
833
|
- **Authentication Errors**: Invalid or missing API credentials
|
|
849
|
-
- Invalid JWT secret/signee combination
|
|
850
|
-
- Expired or invalid bearer token
|
|
851
834
|
- OAuth credential authentication failure
|
|
852
835
|
- **Validation Errors**: Invalid parameters provided (uses Zod validation)
|
|
853
836
|
- **API Errors**: Server-side errors with specific error codes
|
|
@@ -855,8 +838,6 @@ The library uses a consistent error handling pattern. All API calls may throw th
|
|
|
855
838
|
|
|
856
839
|
### Common Authentication Error Scenarios
|
|
857
840
|
- **Missing credentials**: No authentication method provided
|
|
858
|
-
- **Invalid JWT**: Incorrect secret or signee values
|
|
859
|
-
- **Expired token**: Bearer token has expired and needs refresh
|
|
860
841
|
- **OAuth failure**: Invalid username/password or client credentials
|
|
861
842
|
|
|
862
843
|
## Examples
|
|
@@ -868,12 +849,20 @@ import { createInstance, CreateTransfer, GetTransfer, MarkAsSuccess } from '@mba
|
|
|
868
849
|
|
|
869
850
|
// Initialize the client
|
|
870
851
|
const client = createInstance({
|
|
871
|
-
secret: 'your-secret',
|
|
872
|
-
signee: 'YOUR-SIGNEE',
|
|
873
852
|
baseUrl: 'https://api.cloud.mbanq.com',
|
|
874
853
|
tenantId: 'your-tenant-id'
|
|
875
854
|
});
|
|
876
855
|
|
|
856
|
+
await client.connect({
|
|
857
|
+
credential: {
|
|
858
|
+
client_id: 'your-client-id',
|
|
859
|
+
client_secret: 'your-client-secret',
|
|
860
|
+
username: 'your-username',
|
|
861
|
+
password: 'your-password',
|
|
862
|
+
grant_type: 'password'
|
|
863
|
+
}
|
|
864
|
+
});
|
|
865
|
+
|
|
877
866
|
// Create an ACH transfer
|
|
878
867
|
const achTransfer = await client.request(CreateTransfer({
|
|
879
868
|
amount: 1500,
|
package/dist/client/index.d.mts
CHANGED
package/dist/client/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z$1, { z } from 'zod';
|
|
2
|
-
import { a as Command, G as GraphQLRequest } from '../config.d-
|
|
2
|
+
import { a as Command, G as GraphQLRequest } from '../config.d-BvqzFkbH.mjs';
|
|
3
3
|
import * as buffer from 'buffer';
|
|
4
4
|
import { e as ProcessOutput, G as GetTransferInput, T as Transfer, b as CreateTransferInput, ai as CreateTransferOutput, P as Payment, aj as PaymentFilters, a as PaymentResponse, C as CreatePaymentInput, ak as ProcessOutput$1, U as UpdatePaymentInput, u as SavingAccount, al as ListAccountsOfClientRequest, y as UpdateAccountRequest, am as CreateAndActivateAccountRequest, an as CreateAndActivateAccountResponse, ao as CloseAccountRequest, ap as CloseAccountResponse, aq as BlockAccountRequest, ar as BlockAccountResponse, as as HoldAmountRequest, at as HoldAmountResponse, au as UpdateRecipientRequest, R as Recipient, g as CreateRecipientRequest, h as RecipientRequest, av as Recipients, B as UserDetail, aw as EnableSelfServiceAccessRequest, ax as EnableSelfServiceAccessResponse, ay as UpdateSelfServiceUserRequest, az as UpdateSelfServiceUserResponse, aA as DeleteSelfServiceUserResponse } from '../recipient-i5k7edaA.mjs';
|
|
5
5
|
import 'graphql';
|
|
@@ -9040,6 +9040,70 @@ type CardSettlement = z.infer<typeof CardSettlementSchema>;
|
|
|
9040
9040
|
type GetCardSettlementsRequest = z.infer<typeof GetCardSettlementsRequestSchema>;
|
|
9041
9041
|
type GetCardSettlementsResponse = z.infer<typeof GetCardSettlementsResponseSchema>;
|
|
9042
9042
|
type GetCardSettlementByIdRequest = z.infer<typeof GetCardSettlementByIdRequestSchema>;
|
|
9043
|
+
declare const AcquiredCard: z.ZodObject<{
|
|
9044
|
+
id: z.ZodNumber;
|
|
9045
|
+
lastDigits: z.ZodString;
|
|
9046
|
+
expiryDate: z.ZodString;
|
|
9047
|
+
network: z.ZodString;
|
|
9048
|
+
pushEnabled: z.ZodBoolean;
|
|
9049
|
+
pullEnabled: z.ZodBoolean;
|
|
9050
|
+
isRegulated: z.ZodBoolean;
|
|
9051
|
+
avsVerified: z.ZodBoolean;
|
|
9052
|
+
pushFundAvailability: z.ZodString;
|
|
9053
|
+
countryCode: z.ZodString;
|
|
9054
|
+
currencyCode: z.ZodString;
|
|
9055
|
+
cardType: z.ZodString;
|
|
9056
|
+
fullName: z.ZodString;
|
|
9057
|
+
referenceId: z.ZodString;
|
|
9058
|
+
externalId: z.ZodString;
|
|
9059
|
+
deleted: z.ZodBoolean;
|
|
9060
|
+
status: z.ZodString;
|
|
9061
|
+
financialInstitution: z.ZodString;
|
|
9062
|
+
createdAt: z.ZodString;
|
|
9063
|
+
updatedAt: z.ZodString;
|
|
9064
|
+
}, "strip", z.ZodTypeAny, {
|
|
9065
|
+
status: string;
|
|
9066
|
+
id: number;
|
|
9067
|
+
externalId: string;
|
|
9068
|
+
createdAt: string;
|
|
9069
|
+
countryCode: string;
|
|
9070
|
+
financialInstitution: string;
|
|
9071
|
+
network: string;
|
|
9072
|
+
cardType: string;
|
|
9073
|
+
expiryDate: string;
|
|
9074
|
+
lastDigits: string;
|
|
9075
|
+
pushEnabled: boolean;
|
|
9076
|
+
pullEnabled: boolean;
|
|
9077
|
+
isRegulated: boolean;
|
|
9078
|
+
avsVerified: boolean;
|
|
9079
|
+
pushFundAvailability: string;
|
|
9080
|
+
currencyCode: string;
|
|
9081
|
+
fullName: string;
|
|
9082
|
+
referenceId: string;
|
|
9083
|
+
deleted: boolean;
|
|
9084
|
+
updatedAt: string;
|
|
9085
|
+
}, {
|
|
9086
|
+
status: string;
|
|
9087
|
+
id: number;
|
|
9088
|
+
externalId: string;
|
|
9089
|
+
createdAt: string;
|
|
9090
|
+
countryCode: string;
|
|
9091
|
+
financialInstitution: string;
|
|
9092
|
+
network: string;
|
|
9093
|
+
cardType: string;
|
|
9094
|
+
expiryDate: string;
|
|
9095
|
+
lastDigits: string;
|
|
9096
|
+
pushEnabled: boolean;
|
|
9097
|
+
pullEnabled: boolean;
|
|
9098
|
+
isRegulated: boolean;
|
|
9099
|
+
avsVerified: boolean;
|
|
9100
|
+
pushFundAvailability: string;
|
|
9101
|
+
currencyCode: string;
|
|
9102
|
+
fullName: string;
|
|
9103
|
+
referenceId: string;
|
|
9104
|
+
deleted: boolean;
|
|
9105
|
+
updatedAt: string;
|
|
9106
|
+
}>;
|
|
9043
9107
|
declare const AcquiredCardsList: z.ZodArray<z.ZodObject<{
|
|
9044
9108
|
id: z.ZodNumber;
|
|
9045
9109
|
lastDigits: z.ZodString;
|
|
@@ -9104,6 +9168,7 @@ declare const AcquiredCardsList: z.ZodArray<z.ZodObject<{
|
|
|
9104
9168
|
deleted: boolean;
|
|
9105
9169
|
updatedAt: string;
|
|
9106
9170
|
}>, "many">;
|
|
9171
|
+
type AcquiredCardResponse = z.infer<typeof AcquiredCard>;
|
|
9107
9172
|
type AcquiredCardsResponse = z.infer<typeof AcquiredCardsList>;
|
|
9108
9173
|
|
|
9109
9174
|
declare const CreatePrepaidCardRequestSchema: z.ZodObject<{
|
|
@@ -11494,6 +11559,22 @@ declare const GetCardSettlements: (params: GetCardSettlementsRequest) => Command
|
|
|
11494
11559
|
declare const GetCardSettlementById: (params: GetCardSettlementByIdRequest) => Command<{
|
|
11495
11560
|
params: GetCardSettlementByIdRequest;
|
|
11496
11561
|
}, CardSettlement>;
|
|
11562
|
+
/**
|
|
11563
|
+
* Terminate a card
|
|
11564
|
+
*
|
|
11565
|
+
* Permanently terminates a card, making it unusable for any transactions.
|
|
11566
|
+
* This action is irreversible and the card cannot be reactivated after termination.
|
|
11567
|
+
* Use this when a card should be completely removed from service.
|
|
11568
|
+
*
|
|
11569
|
+
* @param cardId - The unique identifier of the card to terminate
|
|
11570
|
+
* @returns Command object that executes the API request and returns termination details
|
|
11571
|
+
*
|
|
11572
|
+
* @example
|
|
11573
|
+
* ```typescript
|
|
11574
|
+
* const command = TerminateCard(67890);
|
|
11575
|
+
* const result = await client.request(command);
|
|
11576
|
+
* ```
|
|
11577
|
+
*/
|
|
11497
11578
|
declare const TerminateCard: (cardId: number) => Command<{
|
|
11498
11579
|
cardId: number;
|
|
11499
11580
|
command: string;
|
|
@@ -11503,6 +11584,22 @@ declare const TerminateCard: (cardId: number) => Command<{
|
|
|
11503
11584
|
clientId: number;
|
|
11504
11585
|
cardToken: string;
|
|
11505
11586
|
}>;
|
|
11587
|
+
/**
|
|
11588
|
+
* Suspend a card
|
|
11589
|
+
*
|
|
11590
|
+
* Temporarily suspends a card, preventing it from being used for transactions.
|
|
11591
|
+
* The card can be reactivated later using ReactivateCard or ActivateCard.
|
|
11592
|
+
* Use this for temporary card holds or when investigating suspicious activity.
|
|
11593
|
+
*
|
|
11594
|
+
* @param cardId - The unique identifier of the card to suspend
|
|
11595
|
+
* @returns Command object that executes the API request and returns suspension details
|
|
11596
|
+
*
|
|
11597
|
+
* @example
|
|
11598
|
+
* ```typescript
|
|
11599
|
+
* const command = SuspendCard(67890);
|
|
11600
|
+
* const result = await client.request(command);
|
|
11601
|
+
* ```
|
|
11602
|
+
*/
|
|
11506
11603
|
declare const SuspendCard: (cardId: number) => Command<{
|
|
11507
11604
|
cardId: number;
|
|
11508
11605
|
command: string;
|
|
@@ -11512,6 +11609,22 @@ declare const SuspendCard: (cardId: number) => Command<{
|
|
|
11512
11609
|
clientId: number;
|
|
11513
11610
|
cardToken: string;
|
|
11514
11611
|
}>;
|
|
11612
|
+
/**
|
|
11613
|
+
* Activate a card
|
|
11614
|
+
*
|
|
11615
|
+
* Activates a card that has been issued but not yet activated.
|
|
11616
|
+
* This is typically required for new cards or cards that were previously suspended.
|
|
11617
|
+
* Activation enables the card for transactions according to its configured features.
|
|
11618
|
+
*
|
|
11619
|
+
* @param cardId - The unique identifier of the card to activate
|
|
11620
|
+
* @returns Command object that executes the API request and returns activation details
|
|
11621
|
+
*
|
|
11622
|
+
* @example
|
|
11623
|
+
* ```typescript
|
|
11624
|
+
* const command = ActivateCard(67890);
|
|
11625
|
+
* const result = await client.request(command);
|
|
11626
|
+
* ```
|
|
11627
|
+
*/
|
|
11515
11628
|
declare const ActivateCard: (cardId: number) => Command<{
|
|
11516
11629
|
cardId: number;
|
|
11517
11630
|
command: string;
|
|
@@ -11521,6 +11634,23 @@ declare const ActivateCard: (cardId: number) => Command<{
|
|
|
11521
11634
|
clientId: number;
|
|
11522
11635
|
cardToken: string;
|
|
11523
11636
|
}>;
|
|
11637
|
+
/**
|
|
11638
|
+
* Reactivate a suspended card
|
|
11639
|
+
*
|
|
11640
|
+
* Reactivates a card that was previously suspended. This restores the card's
|
|
11641
|
+
* ability to process transactions according to its configuration.
|
|
11642
|
+
* Use this to restore a suspended card back to active status.
|
|
11643
|
+
*
|
|
11644
|
+
* @param cardId - The unique identifier of the card to reactivate
|
|
11645
|
+
* @returns Command object that executes the API request and returns reactivation details
|
|
11646
|
+
*
|
|
11647
|
+
* @example
|
|
11648
|
+
* ```typescript
|
|
11649
|
+
* const command = ReactivateCard(67890);
|
|
11650
|
+
* const result = await client.request(command);
|
|
11651
|
+
* console.log(`Card ${result.id} has been reactivated`);
|
|
11652
|
+
* ```
|
|
11653
|
+
*/
|
|
11524
11654
|
declare const ReactivateCard: (cardId: number) => Command<{
|
|
11525
11655
|
cardId: number;
|
|
11526
11656
|
command: string;
|
|
@@ -11530,6 +11660,24 @@ declare const ReactivateCard: (cardId: number) => Command<{
|
|
|
11530
11660
|
clientId: number;
|
|
11531
11661
|
cardToken: string;
|
|
11532
11662
|
}>;
|
|
11663
|
+
/**
|
|
11664
|
+
* Replace a card
|
|
11665
|
+
*
|
|
11666
|
+
* Requests a replacement for an existing card due to loss, theft, damage, or non-receipt.
|
|
11667
|
+
* This action terminates the current card and issues a new card with a new number and details.
|
|
11668
|
+
* The replacement card will inherit the same configuration and features as the original card.
|
|
11669
|
+
*
|
|
11670
|
+
* @param cardId - The unique identifier of the card to replace
|
|
11671
|
+
* @param reason - The reason for replacement (LOST, STOLEN, DAMAGED, or CARD_NOT_RECEIVED)
|
|
11672
|
+
* @returns Command object that executes the API request and returns replacement card details
|
|
11673
|
+
*
|
|
11674
|
+
* @example
|
|
11675
|
+
* ```typescript
|
|
11676
|
+
* // Replace a lost card
|
|
11677
|
+
* const command = ReplaceCard(67890, 'LOST');
|
|
11678
|
+
* const result = await client.request(command);
|
|
11679
|
+
* ```
|
|
11680
|
+
*/
|
|
11533
11681
|
declare const ReplaceCard: (cardId: number, reason: "LOST" | "STOLEN" | "DAMAGED" | "CARD_NOT_RECEIVED") => Command<{
|
|
11534
11682
|
cardId: number;
|
|
11535
11683
|
reason: string;
|
|
@@ -11538,6 +11686,25 @@ declare const ReplaceCard: (cardId: number, reason: "LOST" | "STOLEN" | "DAMAGED
|
|
|
11538
11686
|
resourceId: number;
|
|
11539
11687
|
clientId: number;
|
|
11540
11688
|
}>;
|
|
11689
|
+
/**
|
|
11690
|
+
* Renew a card
|
|
11691
|
+
*
|
|
11692
|
+
* Renews an expiring card by issuing a new card with the same product type.
|
|
11693
|
+
* This is typically used when a card is approaching its expiration date and needs
|
|
11694
|
+
* to be renewed with a new expiration date. The new card will maintain the same
|
|
11695
|
+
* product configuration and features as the original card.
|
|
11696
|
+
*
|
|
11697
|
+
* @param cardId - The unique identifier of the card to renew
|
|
11698
|
+
* @param productId - The product ID for the renewed card (can be the same or different from original)
|
|
11699
|
+
* @returns Command object that executes the API request and returns renewed card details
|
|
11700
|
+
*
|
|
11701
|
+
* @example
|
|
11702
|
+
* ```typescript
|
|
11703
|
+
* // Renew a card with the same product
|
|
11704
|
+
* const command = RenewCard(67890, 12345);
|
|
11705
|
+
* const result = await client.request(command);
|
|
11706
|
+
* ```
|
|
11707
|
+
*/
|
|
11541
11708
|
declare const RenewCard: (cardId: number, productId: number) => Command<{
|
|
11542
11709
|
cardId: number;
|
|
11543
11710
|
productId: number;
|
|
@@ -11546,9 +11713,75 @@ declare const RenewCard: (cardId: number, productId: number) => Command<{
|
|
|
11546
11713
|
resourceId: number;
|
|
11547
11714
|
clientId: number;
|
|
11548
11715
|
}>;
|
|
11716
|
+
/**
|
|
11717
|
+
* Get all acquired cards for a client
|
|
11718
|
+
*
|
|
11719
|
+
* Retrieves a list of all acquired/external cards associated with a specific client ID.
|
|
11720
|
+
* Acquired cards are cards that were obtained from external sources or integrated systems.
|
|
11721
|
+
* Returns comprehensive card details including status, type, network, and configuration.
|
|
11722
|
+
*
|
|
11723
|
+
* @param clientId - The unique identifier of the client
|
|
11724
|
+
* @returns Command object that executes the API request and returns list of acquired cards
|
|
11725
|
+
*
|
|
11726
|
+
* @example
|
|
11727
|
+
* ```typescript
|
|
11728
|
+
* const command = GetAcquiredCards(12345);
|
|
11729
|
+
* const acquiredCards = await client.request(command);
|
|
11730
|
+
* ```
|
|
11731
|
+
*/
|
|
11549
11732
|
declare const GetAcquiredCards: (clientId: number) => Command<{
|
|
11550
11733
|
clientId: number;
|
|
11551
11734
|
}, AcquiredCardsResponse>;
|
|
11735
|
+
/**
|
|
11736
|
+
* Get acquired card by ID
|
|
11737
|
+
*
|
|
11738
|
+
* Retrieves detailed information for a specific acquired/external card using its unique identifier.
|
|
11739
|
+
* This endpoint allows you to fetch specific information related to an acquired card based on the
|
|
11740
|
+
* card ID, including all card details such as network, type, status, and configuration settings.
|
|
11741
|
+
*
|
|
11742
|
+
* @param clientId - The unique identifier of the client who owns the acquired card
|
|
11743
|
+
* @param acquiredCardId - The unique identifier of the acquired card to retrieve
|
|
11744
|
+
* @returns Command object that executes the API request and returns acquired card details
|
|
11745
|
+
*
|
|
11746
|
+
* @example
|
|
11747
|
+
* ```typescript
|
|
11748
|
+
* const command = getAcquiredCardById(12345, 67890);
|
|
11749
|
+
* const acquiredCard = await client.request(command);
|
|
11750
|
+
* ```
|
|
11751
|
+
*/
|
|
11752
|
+
declare const getAcquiredCardById: (clientId: number, acquiredCardId: number) => Command<{
|
|
11753
|
+
clientId: number;
|
|
11754
|
+
acquiredCardId: number;
|
|
11755
|
+
}, AcquiredCardResponse>;
|
|
11756
|
+
/**
|
|
11757
|
+
* Adds an acquired card to a client
|
|
11758
|
+
*
|
|
11759
|
+
* Adds an acquired card to a client by storing the card information in the client's
|
|
11760
|
+
* external cards list. This endpoint allows you to add a card that was obtained from an
|
|
11761
|
+
* external source or integrated system to a client's list of acquired cards.
|
|
11762
|
+
*
|
|
11763
|
+
* @param clientId - The unique identifier of the client
|
|
11764
|
+
* @param params - Object containing the card data to add
|
|
11765
|
+
* @returns Command object that executes the API request and returns the added acquired card details
|
|
11766
|
+
* ```typescript
|
|
11767
|
+
* const command = AddAcquiredCard(12345, {
|
|
11768
|
+
* cardData: 'cardData'
|
|
11769
|
+
* });
|
|
11770
|
+
* ```
|
|
11771
|
+
*/
|
|
11772
|
+
declare const AddAcquiredCard: (clientId: number, params: {
|
|
11773
|
+
cardData: string;
|
|
11774
|
+
}) => Command<{
|
|
11775
|
+
clientId: number;
|
|
11776
|
+
params: {
|
|
11777
|
+
cardData: string;
|
|
11778
|
+
};
|
|
11779
|
+
}, {
|
|
11780
|
+
id: number;
|
|
11781
|
+
officeId: number;
|
|
11782
|
+
clientId: number;
|
|
11783
|
+
resourceId: number;
|
|
11784
|
+
}>;
|
|
11552
11785
|
|
|
11553
11786
|
/**
|
|
11554
11787
|
* Create Prepaid Card
|
|
@@ -17031,4 +17264,4 @@ declare const DeleteFixedDepositAccount: (accountId: number) => Command<{
|
|
|
17031
17264
|
accountId: number;
|
|
17032
17265
|
}, DeleteFixedDepositAccountResponse>;
|
|
17033
17266
|
|
|
17034
|
-
export { ActivateCard, ActivatePhysicalCard, AddCardToMobileWallet, ApproveRejectClientDocument, BlockAccount, ChangeCardType, CloseAccount, CreateAccountProduct, CreateAndActivateAccount, CreateCard, CreateCardProduct, CreateClient, CreateClientAddress, CreateClientIdentifier, CreateFixedDepositAccount, CreatePayment, CreatePrepaidCard, CreateRecipient, CreateTransfer, CustomCreate, CustomGet, CustomUpdate, DeactivatePrepaidCard, DeleteAccount, DeleteClient, DeleteClientDocument, DeleteFixedDepositAccount, DeletePayment, DeleteRecipient, DeleteSelfServiceUser, DownloadAccountStatement, EnableDisableConfiguration, EnableSelfServiceAccess, GenerateAccountStatement, GetAccount, GetAccountDocumentsDetails, GetAccountProductById, GetAccountsOfClient, GetAcquiredCards, GetAllAccountProducts, GetBankDetailsFromRoutingCode, GetCardAuthorizationById, GetCardAuthorizations, GetCardById, GetCardImageUrl, GetCardProduct, GetCardSettlementById, GetCardSettlements, GetCards, GetClient, GetClientAddress, GetClientClassification, GetClients, GetCompletedTransactions, GetConfigurationByName, GetConfigurations, GetFixedDepositAccount, GetPayment, GetPayments, GetPendingTransactions, GetPermittedDocumentTypes, GetPrepaidCardById, GetPrepaidCardsByAccountId, GetRecentTransactions, GetRecipient, GetRecipients, GetStatusOfVerifyClient, GetTransactionById, GetTransfer, GetTransfers, GetUserDetail, GraphQL, HoldAmount, ListCardProduct, ListClientDocument, OrderPhysicalCard, ReactivateCard, RenewCard, ReplaceCard, ScheduleAccountClosure, SetClientAddressStatus, SetPIN, SuspendCard, SwitchClientClassification, TerminateCard, UpdateAccount, UpdateAccountProduct, UpdateCardFeature, UpdateCardLimit, UpdateCardProduct, UpdateClient, UpdateClientAddress, UpdateClientIdentifier, UpdateFixedDepositAccount, UpdatePayment, UpdateRecipientGQL as UpdateRecipient, UpdateSelfServiceUser, UploadClientIdentifierDocument, VerifyWithActivateClients };
|
|
17267
|
+
export { ActivateCard, ActivatePhysicalCard, AddAcquiredCard, AddCardToMobileWallet, ApproveRejectClientDocument, BlockAccount, ChangeCardType, CloseAccount, CreateAccountProduct, CreateAndActivateAccount, CreateCard, CreateCardProduct, CreateClient, CreateClientAddress, CreateClientIdentifier, CreateFixedDepositAccount, CreatePayment, CreatePrepaidCard, CreateRecipient, CreateTransfer, CustomCreate, CustomGet, CustomUpdate, DeactivatePrepaidCard, DeleteAccount, DeleteClient, DeleteClientDocument, DeleteFixedDepositAccount, DeletePayment, DeleteRecipient, DeleteSelfServiceUser, DownloadAccountStatement, EnableDisableConfiguration, EnableSelfServiceAccess, GenerateAccountStatement, GetAccount, GetAccountDocumentsDetails, GetAccountProductById, GetAccountsOfClient, GetAcquiredCards, GetAllAccountProducts, GetBankDetailsFromRoutingCode, GetCardAuthorizationById, GetCardAuthorizations, GetCardById, GetCardImageUrl, GetCardProduct, GetCardSettlementById, GetCardSettlements, GetCards, GetClient, GetClientAddress, GetClientClassification, GetClients, GetCompletedTransactions, GetConfigurationByName, GetConfigurations, GetFixedDepositAccount, GetPayment, GetPayments, GetPendingTransactions, GetPermittedDocumentTypes, GetPrepaidCardById, GetPrepaidCardsByAccountId, GetRecentTransactions, GetRecipient, GetRecipients, GetStatusOfVerifyClient, GetTransactionById, GetTransfer, GetTransfers, GetUserDetail, GraphQL, HoldAmount, ListCardProduct, ListClientDocument, OrderPhysicalCard, ReactivateCard, RenewCard, ReplaceCard, ScheduleAccountClosure, SetClientAddressStatus, SetPIN, SuspendCard, SwitchClientClassification, TerminateCard, UpdateAccount, UpdateAccountProduct, UpdateCardFeature, UpdateCardLimit, UpdateCardProduct, UpdateClient, UpdateClientAddress, UpdateClientIdentifier, UpdateFixedDepositAccount, UpdatePayment, UpdateRecipientGQL as UpdateRecipient, UpdateSelfServiceUser, UploadClientIdentifierDocument, VerifyWithActivateClients, getAcquiredCardById };
|