squarefi-bff-api-module 1.24.12 → 1.24.14

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.
@@ -4,9 +4,9 @@ export declare const issuing: {
4
4
  create: {
5
5
  standAloneCard: {
6
6
  prepaid: (data: API.Cards.Create.StandAloneRequest) => Promise<API.Cards.Create.StandAloneResponse>;
7
- balance: (data: API.Cards.Create.StandAloneRequest) => Promise<API.Cards.Create.SubAccountResponse>;
7
+ balance: (data: API.Cards.Create.StandAloneRequest) => Promise<API.Cards.Create.ExtendedSubAccountResponse>;
8
8
  };
9
- subAccountCard: (data: API.Cards.Create.SubAccountRequest) => Promise<API.Cards.Create.SubAccountResponse>;
9
+ subAccountCard: (data: API.Cards.Create.SubAccountRequest) => Promise<API.Cards.Create.ExtendedSubAccountResponse>;
10
10
  };
11
11
  byWalletUuid: {
12
12
  getAll: (params: API.Cards.CardsList.Request.ByWalletUuid) => Promise<API.Cards.CardsList.Response>;
@@ -31,12 +31,18 @@ exports.issuing = {
31
31
  prepaid: (data) => apiClientFactory_1.apiClientV1.postRequest('/issuing/cards/create', { data }),
32
32
  balance: (data) => __awaiter(void 0, void 0, void 0, function* () {
33
33
  const { id: sub_account_id } = yield exports.issuing.sub_accounts.create(data.wallet_id, data.program_id);
34
- return apiClientFactory_1.apiClientV1.postRequest('/issuing/cards/balance', {
34
+ const response = yield apiClientFactory_1.apiClientV1.postRequest('/issuing/cards/balance', {
35
35
  data: Object.assign(Object.assign({}, data), { sub_account_id }),
36
36
  });
37
+ return Object.assign(Object.assign({}, response), { sub_account_id });
37
38
  }),
38
39
  },
39
- subAccountCard: (data) => apiClientFactory_1.apiClientV1.postRequest('/issuing/cards/balance', { data }),
40
+ subAccountCard: (data) => __awaiter(void 0, void 0, void 0, function* () {
41
+ const response = yield apiClientFactory_1.apiClientV1.postRequest('/issuing/cards/balance', {
42
+ data,
43
+ });
44
+ return Object.assign(Object.assign({}, response), { sub_account_id: data.sub_account_id });
45
+ }),
40
46
  },
41
47
  byWalletUuid: {
42
48
  getAll: (params) => apiClientFactory_1.apiClientV1.getRequest('/issuing/cards', { params }),
@@ -1052,7 +1052,7 @@ export interface components {
1052
1052
  * @default UNVERIFIED
1053
1053
  * @enum {string|null}
1054
1054
  */
1055
- kyc_status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS" | null;
1055
+ kyc_status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS" | "WAITING_ON_REVIEW" | null;
1056
1056
  referral_name: string | null;
1057
1057
  tenant_id: string;
1058
1058
  user_id: string;
@@ -1696,7 +1696,7 @@ export interface components {
1696
1696
  * @default UNVERIFIED
1697
1697
  * @enum {string}
1698
1698
  */
1699
- status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS";
1699
+ status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS" | "WAITING_ON_REVIEW";
1700
1700
  address?: components["schemas"]["KycAddressDto"] | null;
1701
1701
  beneficial_owners?: components["schemas"]["KycBeneficialOwnerDto"][] | null;
1702
1702
  };
@@ -1800,7 +1800,7 @@ export interface components {
1800
1800
  WalletKycRailDto: {
1801
1801
  message: string | null;
1802
1802
  /** @enum {string} */
1803
- readonly status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS";
1803
+ readonly status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS" | "WAITING_ON_REVIEW";
1804
1804
  /** @default false */
1805
1805
  terms_confirmed: boolean;
1806
1806
  extra_actions?: components["schemas"]["WalletKycRailExtraActionDto"][];
@@ -321,7 +321,13 @@ export declare namespace API {
321
321
  sub_account_id: string;
322
322
  }
323
323
  type StandAloneResponse = IssuingCardDetailItem;
324
- type SubAccountResponse = IssuingCardDetailItem;
324
+ type SubAccountResponse = {
325
+ card_id: string;
326
+ status: string;
327
+ };
328
+ type ExtendedSubAccountResponse = SubAccountResponse & {
329
+ sub_account_id: string;
330
+ };
325
331
  }
326
332
  }
327
333
  namespace Chains {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.24.12",
3
+ "version": "1.24.14",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,19 +9,38 @@ export const issuing = {
9
9
  standAloneCard: {
10
10
  prepaid: (data: API.Cards.Create.StandAloneRequest): Promise<API.Cards.Create.StandAloneResponse> =>
11
11
  apiClientV1.postRequest<API.Cards.Create.StandAloneResponse>('/issuing/cards/create', { data }),
12
- balance: async (data: API.Cards.Create.StandAloneRequest): Promise<API.Cards.Create.SubAccountResponse> => {
12
+ balance: async (
13
+ data: API.Cards.Create.StandAloneRequest
14
+ ): Promise<API.Cards.Create.ExtendedSubAccountResponse> => {
13
15
  const { id: sub_account_id } = await issuing.sub_accounts.create(data.wallet_id, data.program_id);
14
16
 
15
- return apiClientV1.postRequest<API.Cards.Create.SubAccountResponse>('/issuing/cards/balance', {
16
- data: {
17
- ...data,
18
- sub_account_id,
19
- },
20
- });
17
+ const response = await apiClientV1.postRequest<API.Cards.Create.SubAccountResponse>(
18
+ '/issuing/cards/balance',
19
+ {
20
+ data: {
21
+ ...data,
22
+ sub_account_id,
23
+ },
24
+ }
25
+ );
26
+
27
+ return {
28
+ ...response,
29
+ sub_account_id,
30
+ };
21
31
  },
22
32
  },
23
- subAccountCard: (data: API.Cards.Create.SubAccountRequest): Promise<API.Cards.Create.SubAccountResponse> =>
24
- apiClientV1.postRequest<API.Cards.Create.SubAccountResponse>('/issuing/cards/balance', { data }),
33
+ subAccountCard: async (
34
+ data: API.Cards.Create.SubAccountRequest
35
+ ): Promise<API.Cards.Create.ExtendedSubAccountResponse> => {
36
+ const response = await apiClientV1.postRequest<API.Cards.Create.SubAccountResponse>('/issuing/cards/balance', {
37
+ data,
38
+ });
39
+ return {
40
+ ...response,
41
+ sub_account_id: data.sub_account_id,
42
+ };
43
+ },
25
44
  },
26
45
  byWalletUuid: {
27
46
  getAll: (params: API.Cards.CardsList.Request.ByWalletUuid): Promise<API.Cards.CardsList.Response> =>
@@ -1053,7 +1053,7 @@ export interface components {
1053
1053
  * @default UNVERIFIED
1054
1054
  * @enum {string|null}
1055
1055
  */
1056
- kyc_status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS" | null;
1056
+ kyc_status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS" | "WAITING_ON_REVIEW" | null;
1057
1057
  referral_name: string | null;
1058
1058
  tenant_id: string;
1059
1059
  user_id: string;
@@ -1697,7 +1697,7 @@ export interface components {
1697
1697
  * @default UNVERIFIED
1698
1698
  * @enum {string}
1699
1699
  */
1700
- status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS";
1700
+ status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS" | "WAITING_ON_REVIEW";
1701
1701
  address?: components["schemas"]["KycAddressDto"] | null;
1702
1702
  beneficial_owners?: components["schemas"]["KycBeneficialOwnerDto"][] | null;
1703
1703
  };
@@ -1801,7 +1801,7 @@ export interface components {
1801
1801
  WalletKycRailDto: {
1802
1802
  message: string | null;
1803
1803
  /** @enum {string} */
1804
- readonly status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS";
1804
+ readonly status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS" | "WAITING_ON_REVIEW";
1805
1805
  /** @default false */
1806
1806
  terms_confirmed: boolean;
1807
1807
  extra_actions?: components["schemas"]["WalletKycRailExtraActionDto"][];
@@ -377,7 +377,14 @@ export namespace API {
377
377
  }
378
378
 
379
379
  export type StandAloneResponse = IssuingCardDetailItem;
380
- export type SubAccountResponse = IssuingCardDetailItem;
380
+ export type SubAccountResponse = {
381
+ card_id: string;
382
+ status: string;
383
+ };
384
+
385
+ export type ExtendedSubAccountResponse = SubAccountResponse & {
386
+ sub_account_id: string;
387
+ };
381
388
  }
382
389
  }
383
390