squarefi-bff-api-module 1.26.14 → 1.27.1

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.
@@ -0,0 +1,5 @@
1
+ node_modules/
2
+ dist/
3
+ *.min.js
4
+ *.min.css
5
+ package-lock.json
package/.prettierrc ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "bracketSpacing": true,
3
+ "printWidth": 120,
4
+ "singleQuote": true,
5
+ "tabWidth": 2,
6
+ "trailingComma": "all"
7
+ }
package/dist/api/auth.js CHANGED
@@ -26,14 +26,21 @@ exports.auth = {
26
26
  context: { bypassUnauthorizedHandler: true },
27
27
  }),
28
28
  phone: (phone, token) => apiClientFactory_1.apiClientV2.postRequest('/auth/verify/phone/otp', {
29
- data: { phone: (0, converters_1.convertPhoneToSupabaseFormat)(phone), token, type: 'sms' },
29
+ data: {
30
+ phone: (0, converters_1.convertPhoneToSupabaseFormat)(phone),
31
+ token,
32
+ type: 'sms',
33
+ },
30
34
  context: { bypassUnauthorizedHandler: true },
31
35
  }),
32
36
  },
33
37
  },
34
38
  signin: {
35
39
  omni: {
36
- email: (data) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-in/omni/email/otp', { data, context: { bypassUnauthorizedHandler: true } }),
40
+ email: (data) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-in/omni/email/otp', {
41
+ data,
42
+ context: { bypassUnauthorizedHandler: true },
43
+ }),
37
44
  phone: (_a) => {
38
45
  var { phone } = _a, data = __rest(_a, ["phone"]);
39
46
  return apiClientFactory_1.apiClientV2.postRequest('/auth/sign-in/omni/phone/otp', {
@@ -42,16 +49,21 @@ exports.auth = {
42
49
  });
43
50
  },
44
51
  },
45
- byType: (data) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-in', { data, context: { bypassUnauthorizedHandler: true } }),
52
+ byType: (data) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-in', {
53
+ data,
54
+ context: { bypassUnauthorizedHandler: true },
55
+ }),
46
56
  telegram: (data) => apiClientFactory_1.apiClientV2.postRequest(exports.telegramSignInPath, { data }),
47
- password: (email, password // check on backend V2
48
- ) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-in/password/email', {
57
+ password: (email, password) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-in/password/email', {
49
58
  data: { email, password },
50
59
  context: { bypassUnauthorizedHandler: true },
51
60
  }),
52
61
  },
53
62
  signup: {
54
- byType: (data) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-up', { data, context: { bypassUnauthorizedHandler: true } }),
63
+ byType: (data) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-up', {
64
+ data,
65
+ context: { bypassUnauthorizedHandler: true },
66
+ }),
55
67
  password: (email, password) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-up/password/email', {
56
68
  data: { email, password },
57
69
  context: { bypassUnauthorizedHandler: true },
@@ -4,9 +4,15 @@ exports.exchange = void 0;
4
4
  const apiClientFactory_1 = require("../utils/apiClientFactory");
5
5
  const constants_1 = require("../constants");
6
6
  const createOrderTypeMethods = (orderType) => ({
7
- getByFromCurrency: (from_uuid) => apiClientFactory_1.apiClientV1.getRequest('/exchange/', { params: { from_uuid, order_type: orderType } }),
8
- getByToCurrency: (to_uuid) => apiClientFactory_1.apiClientV1.getRequest('/exchange/', { params: { to_uuid, order_type: orderType } }),
9
- getByOrderType: () => apiClientFactory_1.apiClientV1.getRequest('/exchange/', { params: { order_type: orderType } }),
7
+ getByFromCurrency: (from_uuid) => apiClientFactory_1.apiClientV1.getRequest('/exchange/', {
8
+ params: { from_uuid, order_type: orderType },
9
+ }),
10
+ getByToCurrency: (to_uuid) => apiClientFactory_1.apiClientV1.getRequest('/exchange/', {
11
+ params: { to_uuid, order_type: orderType },
12
+ }),
13
+ getByOrderType: () => apiClientFactory_1.apiClientV1.getRequest('/exchange/', {
14
+ params: { order_type: orderType },
15
+ }),
10
16
  });
11
17
  const orderTypes = Object.values(constants_1.OrderType);
12
18
  exports.exchange = {
@@ -45,11 +45,15 @@ exports.issuing = {
45
45
  }),
46
46
  },
47
47
  byWalletUuid: {
48
- getAll: (params) => apiClientFactory_1.apiClientV1.getRequest('/issuing/cards', { params }),
48
+ getAll: (params) => apiClientFactory_1.apiClientV1.getRequest('/issuing/cards', {
49
+ params,
50
+ }),
49
51
  getBySubaccountType: (params) => apiClientFactory_1.apiClientV1.getRequest('/issuing/cards', {
50
52
  params,
51
53
  }),
52
- getBySubAccount: (params) => apiClientFactory_1.apiClientV1.getRequest('/issuing/cards', { params }),
54
+ getBySubAccount: (params) => apiClientFactory_1.apiClientV1.getRequest('/issuing/cards', {
55
+ params,
56
+ }),
53
57
  },
54
58
  // getById: (card_id: string) => apiClientV1.getRequest<API.Cards.IssuingCardDetailItem>(`/issuing/cards/${card_id}`),
55
59
  getById: (card_id) => __awaiter(void 0, void 0, void 0, function* () {
@@ -110,7 +114,14 @@ exports.issuing = {
110
114
  list: {
111
115
  withCards: {
112
116
  getSinglecards: (wallet_uuid, limit, offset) => apiClientFactory_1.apiClientV1.getRequest(`/issuing/sub_account/list/${wallet_uuid}`, {
113
- params: { limit, offset, lt_cards_limit: 2, gt_cards_limit: 0, show_cards: true, pagination: true },
117
+ params: {
118
+ limit,
119
+ offset,
120
+ lt_cards_limit: 2,
121
+ gt_cards_limit: 0,
122
+ show_cards: true,
123
+ pagination: true,
124
+ },
114
125
  }),
115
126
  getAll: (wallet_uuid, limit, offset) => apiClientFactory_1.apiClientV1.getRequest(`/issuing/sub_account/list/${wallet_uuid}`, {
116
127
  params: { limit, offset, show_cards: true, pagination: true },
@@ -36,10 +36,13 @@ export declare const orders: {
36
36
  HIFI_ACH_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.HIFI_ACH_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.HIFI_ACH_OFFRAMP.Response>;
37
37
  HIFI_SEPA_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.HIFI_SEPA_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.HIFI_SEPA_OFFRAMP.Response>;
38
38
  OMNIBUS_CRYPTO_TRANSFER: (data: API.Orders.V2.Create.ByOrderType.OMNIBUS_CRYPTO_TRANSFER.Request) => Promise<API.Orders.V2.Create.ByOrderType.OMNIBUS_CRYPTO_TRANSFER.Response>;
39
- HIFI_CRYPTO_TRANSFER: (data: API.Orders.V2.Create.ByOrderType.HIFI_CRYPTO_TRANSFER.Request) => Promise<API.Orders.V2.Create.ByOrderType.HIFI_CRYPTO_TRANSFER.Response>;
40
39
  SEGREGATED_CRYPTO_TRANSFER: (data: API.Orders.V2.Create.ByOrderType.SEGREGATED_CRYPTO_TRANSFER.Request) => Promise<API.Orders.V2.Create.ByOrderType.SEGREGATED_CRYPTO_TRANSFER.Response>;
41
40
  RN_CARDS_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.RN_CARDS_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.RN_CARDS_OFFRAMP.Response>;
42
41
  TBD_SWIFT_WITHDRAWAL: (data: API.Orders.V2.Create.ByOrderType.TBD_SWIFT_WITHDRAWAL.Request) => Promise<API.Orders.V2.Create.ByOrderType.TBD_SWIFT_WITHDRAWAL.Response>;
42
+ L2F_SEPA_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.L2F_SEPA_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.L2F_SEPA_OFFRAMP.Response>;
43
+ L2F_SWIFT_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.L2F_SWIFT_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.L2F_SWIFT_OFFRAMP.Response>;
44
+ L2F_ACH_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.L2F_ACH_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.L2F_ACH_OFFRAMP.Response>;
45
+ L2F_WIRE_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.L2F_WIRE_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.L2F_WIRE_OFFRAMP.Response>;
43
46
  };
44
47
  };
45
48
  };
@@ -17,7 +17,10 @@ const constants_1 = require("../constants");
17
17
  exports.orders = {
18
18
  calc: (_a) => {
19
19
  var { signal } = _a, params = __rest(_a, ["signal"]);
20
- return apiClientFactory_1.apiClientV1.getRequest('/orders/calc', { params, signal });
20
+ return apiClientFactory_1.apiClientV1.getRequest('/orders/calc', {
21
+ params,
22
+ signal,
23
+ });
21
24
  },
22
25
  orderTypes: {
23
26
  list: () => apiClientFactory_1.apiClientV1.getRequest('/orders/order_types'),
@@ -66,7 +69,10 @@ exports.orders = {
66
69
  v2: {
67
70
  calc: (_a) => {
68
71
  var { signal } = _a, params = __rest(_a, ["signal"]);
69
- return apiClientFactory_1.apiClientV1.getRequest('/v2/orders/calc', { params, signal });
72
+ return apiClientFactory_1.apiClientV1.getRequest('/v2/orders/calc', {
73
+ params,
74
+ signal,
75
+ });
70
76
  },
71
77
  orderTypes: {
72
78
  list: () => apiClientFactory_1.apiClientV1.getRequest('/v2/orders/order_types'),
@@ -93,12 +99,15 @@ exports.orders = {
93
99
  }),
94
100
  [constants_1.OrderType.HIFI_SEPA_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/HIFI_SEPA_OFFRAMP', { data }),
95
101
  [constants_1.OrderType.OMNIBUS_CRYPTO_TRANSFER]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/OMNIBUS_CRYPTO_TRANSFER', { data }),
96
- [constants_1.OrderType.HIFI_CRYPTO_TRANSFER]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/HIFI_CRYPTO_TRANSFER', { data }),
97
102
  [constants_1.OrderType.SEGREGATED_CRYPTO_TRANSFER]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/SEGREGATED_CRYPTO_TRANSFER', { data }),
98
103
  [constants_1.OrderType.RN_CARDS_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/RN_CARDS_OFFRAMP', { data }),
99
104
  [constants_1.OrderType.TBD_SWIFT_WITHDRAWAL]: (
100
105
  // TODO: ITS MOCK ORDER TYPE
101
106
  data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/TBD_SWIFT_WITHDRAWAL', { data }),
107
+ [constants_1.OrderType.L2F_SEPA_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/L2F_SEPA_OFFRAMP', { data }),
108
+ [constants_1.OrderType.L2F_SWIFT_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/L2F_SWIFT_OFFRAMP', { data }),
109
+ [constants_1.OrderType.L2F_ACH_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/L2F_ACH_OFFRAMP', { data }),
110
+ [constants_1.OrderType.L2F_WIRE_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/L2F_WIRE_OFFRAMP', { data }),
102
111
  },
103
112
  },
104
113
  },