squarefi-bff-api-module 1.19.1 → 1.19.2

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/CHANGELOG.md CHANGED
@@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
17
17
 
18
18
  - Integrated Time-based One-Time Password (TOTP) functionality with new types and API client methods
19
19
 
20
+ ## [1.19.2] - 2025-06-17
21
+
22
+ ### Added
23
+
24
+ - Added OTP request functionality with updated types to improve verification process
25
+
20
26
  ## [1.18.9] - 2025-05-24
21
27
 
22
28
  ### Added
@@ -2,6 +2,7 @@ import { API } from './types/types';
2
2
  export declare const totp: {
3
3
  otp_verification: {
4
4
  create: (data: API.TOTP.OTPVerification.Create.Request) => Promise<API.TOTP.OTPVerification.Create.Response>;
5
+ request: (data: API.TOTP.OTPVerification.RequestOtp.Request) => Promise<API.TOTP.OTPVerification.RequestOtp.Response>;
5
6
  verify: (data: API.TOTP.OTPVerification.Verify.Request) => Promise<API.TOTP.OTPVerification.Verify.Response>;
6
7
  get: (id: string) => Promise<API.TOTP.OTPVerification.OTPVerificationInfo>;
7
8
  };
package/dist/api/totp.js CHANGED
@@ -7,6 +7,11 @@ exports.totp = {
7
7
  create: (data) => {
8
8
  return apiClientFactory_1.apiClientTOTP.postRequest('/api/otp-verification', { data });
9
9
  },
10
+ request: (data) => {
11
+ return apiClientFactory_1.apiClientTOTP.postRequest('/api/otp-verification/request', {
12
+ data,
13
+ });
14
+ },
10
15
  verify: (data) => {
11
16
  return apiClientFactory_1.apiClientTOTP.postRequest('/api/otp-verification/verify', {
12
17
  data,
@@ -1104,7 +1104,7 @@ export interface components {
1104
1104
  * @default UNVERIFIED
1105
1105
  * @enum {string|null}
1106
1106
  */
1107
- kyc_status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | null;
1107
+ kyc_status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS" | null;
1108
1108
  referral_name: string | null;
1109
1109
  tenant_id: string;
1110
1110
  turnover_limit: number;
@@ -1746,7 +1746,7 @@ export interface components {
1746
1746
  * @default UNVERIFIED
1747
1747
  * @enum {string}
1748
1748
  */
1749
- status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED";
1749
+ status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS";
1750
1750
  address?: components["schemas"]["KycAddressDto"] | null;
1751
1751
  beneficial_owners?: components["schemas"]["KycBeneficialOwnerDto"][] | null;
1752
1752
  };
@@ -1850,7 +1850,7 @@ export interface components {
1850
1850
  WalletKycRailDto: {
1851
1851
  message: string | null;
1852
1852
  /** @enum {string} */
1853
- readonly status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED";
1853
+ readonly status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS";
1854
1854
  extra_actions?: components["schemas"]["WalletKycRailExtraActionDto"][];
1855
1855
  /** @description Accepted terms and conditions data */
1856
1856
  terms_and_conditions: components["schemas"]["WalletKycRailTermsAndConditionsDto"][];
@@ -1403,32 +1403,49 @@ export declare namespace API {
1403
1403
  type OTPVerificationChannelInfo = {
1404
1404
  channel: OTPVerificationChannelType;
1405
1405
  validity: number;
1406
+ max_requests: number;
1406
1407
  };
1407
1408
  type OTPVerificationInfo = {
1408
- id: string;
1409
+ request_id: string;
1409
1410
  status: OTPVerificationStatus;
1410
1411
  created_at: string;
1411
1412
  updated_at: string;
1412
1413
  };
1413
1414
  namespace Create {
1414
1415
  type Request = {
1415
- id: string;
1416
+ request_id: string;
1416
1417
  amount: number;
1417
1418
  order_type: string;
1418
1419
  wallet_id: string;
1419
- meta: {
1420
- description: string;
1420
+ meta?: {
1421
+ currency?: string;
1422
+ description?: string;
1421
1423
  };
1422
1424
  };
1423
1425
  type Response = {
1424
- id: string;
1426
+ request_id: string;
1425
1427
  status: OTPVerificationStatus;
1426
1428
  channels: OTPVerificationChannelInfo[];
1427
1429
  };
1428
1430
  }
1431
+ namespace RequestOtp {
1432
+ type Request = {
1433
+ request_id: string;
1434
+ channel: OTPVerificationChannelType;
1435
+ };
1436
+ type Response = {
1437
+ success?: boolean;
1438
+ error?: boolean;
1439
+ message?: string;
1440
+ details?: string;
1441
+ validity?: number;
1442
+ request_made?: number;
1443
+ max_requests?: number;
1444
+ };
1445
+ }
1429
1446
  namespace Verify {
1430
1447
  type Request = {
1431
- id: string;
1448
+ request_id: string;
1432
1449
  channel: OTPVerificationChannelType;
1433
1450
  otp: string;
1434
1451
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.19.1",
3
+ "version": "1.19.2",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/api/totp.ts CHANGED
@@ -6,6 +6,13 @@ export const totp = {
6
6
  create: (data: API.TOTP.OTPVerification.Create.Request): Promise<API.TOTP.OTPVerification.Create.Response> => {
7
7
  return apiClientTOTP.postRequest<API.TOTP.OTPVerification.Create.Response>('/api/otp-verification', { data });
8
8
  },
9
+ request: (
10
+ data: API.TOTP.OTPVerification.RequestOtp.Request
11
+ ): Promise<API.TOTP.OTPVerification.RequestOtp.Response> => {
12
+ return apiClientTOTP.postRequest<API.TOTP.OTPVerification.RequestOtp.Response>('/api/otp-verification/request', {
13
+ data,
14
+ });
15
+ },
9
16
  verify: (data: API.TOTP.OTPVerification.Verify.Request): Promise<API.TOTP.OTPVerification.Verify.Response> => {
10
17
  return apiClientTOTP.postRequest<API.TOTP.OTPVerification.Verify.Response>('/api/otp-verification/verify', {
11
18
  data,
@@ -1105,7 +1105,7 @@ export interface components {
1105
1105
  * @default UNVERIFIED
1106
1106
  * @enum {string|null}
1107
1107
  */
1108
- kyc_status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | null;
1108
+ kyc_status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS" | null;
1109
1109
  referral_name: string | null;
1110
1110
  tenant_id: string;
1111
1111
  turnover_limit: number;
@@ -1747,7 +1747,7 @@ export interface components {
1747
1747
  * @default UNVERIFIED
1748
1748
  * @enum {string}
1749
1749
  */
1750
- status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED";
1750
+ status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS";
1751
1751
  address?: components["schemas"]["KycAddressDto"] | null;
1752
1752
  beneficial_owners?: components["schemas"]["KycBeneficialOwnerDto"][] | null;
1753
1753
  };
@@ -1851,7 +1851,7 @@ export interface components {
1851
1851
  WalletKycRailDto: {
1852
1852
  message: string | null;
1853
1853
  /** @enum {string} */
1854
- readonly status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED";
1854
+ readonly status: "APPROVED" | "DECLINED" | "PENDING" | "HOLD" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS";
1855
1855
  extra_actions?: components["schemas"]["WalletKycRailExtraActionDto"][];
1856
1856
  /** @description Accepted terms and conditions data */
1857
1857
  terms_and_conditions: components["schemas"]["WalletKycRailTermsAndConditionsDto"][];
@@ -1702,9 +1702,10 @@ export namespace API {
1702
1702
  export type OTPVerificationChannelInfo = {
1703
1703
  channel: OTPVerificationChannelType;
1704
1704
  validity: number;
1705
+ max_requests: number;
1705
1706
  };
1706
1707
  export type OTPVerificationInfo = {
1707
- id: string;
1708
+ request_id: string;
1708
1709
  status: OTPVerificationStatus;
1709
1710
  created_at: string;
1710
1711
  updated_at: string;
@@ -1712,25 +1713,43 @@ export namespace API {
1712
1713
 
1713
1714
  export namespace Create {
1714
1715
  export type Request = {
1715
- id: string;
1716
+ request_id: string;
1716
1717
  amount: number;
1717
1718
  order_type: string;
1718
1719
  wallet_id: string;
1719
- meta: {
1720
- description: string;
1720
+ meta?: {
1721
+ currency?: string;
1722
+ description?: string;
1721
1723
  };
1722
1724
  };
1723
1725
 
1724
1726
  export type Response = {
1725
- id: string;
1727
+ request_id: string;
1726
1728
  status: OTPVerificationStatus;
1727
1729
  channels: OTPVerificationChannelInfo[];
1728
1730
  };
1729
1731
  }
1730
1732
 
1733
+ export namespace RequestOtp {
1734
+ export type Request = {
1735
+ request_id: string;
1736
+ channel: OTPVerificationChannelType;
1737
+ };
1738
+
1739
+ export type Response = {
1740
+ success?: boolean;
1741
+ error?: boolean;
1742
+ message?: string;
1743
+ details?: string;
1744
+ validity?: number;
1745
+ request_made?: number;
1746
+ max_requests?: number;
1747
+ };
1748
+ }
1749
+
1731
1750
  export namespace Verify {
1732
1751
  export type Request = {
1733
- id: string;
1752
+ request_id: string;
1734
1753
  channel: OTPVerificationChannelType;
1735
1754
  otp: string;
1736
1755
  };