squarefi-bff-api-module 1.11.1 → 1.11.3

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/dist/api/auth.js CHANGED
@@ -14,7 +14,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.auth = exports.refreshTokenPath = exports.telegramSignUpPath = exports.telegramSignInPath = void 0;
15
15
  const apiClientFactory_1 = require("../utils/apiClientFactory");
16
16
  const converters_1 = require("../utils/converters");
17
- exports.telegramSignInPath = '/auth/sign-in/telegram';
17
+ exports.telegramSignInPath = '/auth/sign-in/telegram'; // V2 path
18
+ // export const telegramSignInPath = '/auth/signin/telegram'; // V1 path
18
19
  exports.telegramSignUpPath = '/auth/sign-up/telegram';
19
20
  exports.refreshTokenPath = '/auth/refresh/refresh-token';
20
21
  exports.auth = {
@@ -38,7 +39,7 @@ exports.auth = {
38
39
  });
39
40
  },
40
41
  },
41
- telegram: (data) => apiClientFactory_1.apiClientV1.postRequest(exports.telegramSignInPath, { data }),
42
+ telegram: (data) => apiClientFactory_1.apiClientV2.postRequest(exports.telegramSignInPath, { data }),
42
43
  password: (email, password // check on backend V2
43
44
  ) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-in/password/email', {
44
45
  data: { email, password },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.11.1",
3
+ "version": "1.11.3",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/api/auth.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import { API } from './types';
2
2
 
3
- import { apiClientV1, apiClientV2 } from '../utils/apiClientFactory';
3
+ import { apiClientV2 } from '../utils/apiClientFactory';
4
4
  import { convertPhoneToSupabaseFormat } from '../utils/converters';
5
5
 
6
- export const telegramSignInPath = '/auth/sign-in/telegram';
6
+ export const telegramSignInPath = '/auth/sign-in/telegram'; // V2 path
7
+ // export const telegramSignInPath = '/auth/signin/telegram'; // V1 path
8
+
7
9
  export const telegramSignUpPath = '/auth/sign-up/telegram';
8
10
  export const refreshTokenPath = '/auth/refresh/refresh-token';
9
11
 
@@ -30,7 +32,7 @@ export const auth = {
30
32
  }),
31
33
  },
32
34
  telegram: (data: API.Auth.Telegram.Signin) =>
33
- apiClientV1.postRequest<API.Auth.Tokens>(telegramSignInPath, { data }),
35
+ apiClientV2.postRequest<API.Auth.Tokens>(telegramSignInPath, { data }),
34
36
  password: (
35
37
  email: string,
36
38
  password: string // check on backend V2