squarefi-bff-api-module 1.34.4 → 1.34.5

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.
@@ -1,6 +1,7 @@
1
1
  import { API } from './types/types';
2
2
  export declare const telegramSignInPath = "/auth/sign-in/telegram";
3
3
  export declare const telegramSignUpPath = "/auth/sign-up/telegram";
4
+ export declare const telegramLinkPath = "/auth/telegram/link";
4
5
  export declare const refreshTokenPath = "/auth/refresh/refresh-token";
5
6
  export declare const auth: {
6
7
  otp: {
@@ -23,6 +24,9 @@ export declare const auth: {
23
24
  password: (email: string, password: string, captcha: string) => Promise<API.Auth.Tokens>;
24
25
  telegram: (data: API.Auth.Telegram.Signup.Request) => Promise<API.Auth.Telegram.Signup.Response>;
25
26
  };
27
+ telegram: {
28
+ link: (data: API.Auth.Telegram.Link.Request) => Promise<void>;
29
+ };
26
30
  refresh: {
27
31
  refresh_token: (data: API.Auth.RefreshToken.Request) => Promise<API.Auth.RefreshToken.Response>;
28
32
  };
package/dist/api/auth.js CHANGED
@@ -3,6 +3,7 @@ import { convertPhoneToSupabaseFormat } from '../utils/converters';
3
3
  export const telegramSignInPath = '/auth/sign-in/telegram'; // V2 path
4
4
  // export const telegramSignInPath = '/auth/signin/telegram'; // V1 path
5
5
  export const telegramSignUpPath = '/auth/sign-up/telegram';
6
+ export const telegramLinkPath = '/auth/telegram/link';
6
7
  export const refreshTokenPath = '/auth/refresh/refresh-token';
7
8
  export const auth = {
8
9
  otp: {
@@ -61,6 +62,9 @@ export const auth = {
61
62
  }),
62
63
  telegram: (data) => apiClientV2.postRequest(telegramSignUpPath, { data }),
63
64
  },
65
+ telegram: {
66
+ link: (data) => apiClientV2.postRequest(telegramLinkPath, { data }),
67
+ },
64
68
  refresh: {
65
69
  refresh_token: (data) => apiClientV2.postRequest(refreshTokenPath, { data }),
66
70
  },
@@ -139,6 +139,23 @@ export interface paths {
139
139
  patch?: never;
140
140
  trace?: never;
141
141
  };
142
+ "/auth/telegram/link": {
143
+ parameters: {
144
+ query?: never;
145
+ header?: never;
146
+ path?: never;
147
+ cookie?: never;
148
+ };
149
+ get?: never;
150
+ put?: never;
151
+ /** Link Telegram account to existing user via OTP-verified phone */
152
+ post: operations["AuthTelegramController_linkTelegramAccount"];
153
+ delete?: never;
154
+ options?: never;
155
+ head?: never;
156
+ patch?: never;
157
+ trace?: never;
158
+ };
142
159
  "/auth/sign-in/telegram": {
143
160
  parameters: {
144
161
  query?: never;
@@ -1287,6 +1304,10 @@ export interface components {
1287
1304
  token_type: string;
1288
1305
  refresh_token?: string | null;
1289
1306
  };
1307
+ TelegramLinkDto: {
1308
+ init_data_raw: string;
1309
+ hash: string;
1310
+ };
1290
1311
  TelegramSignInByTgIdDto: {
1291
1312
  hash: string;
1292
1313
  init_data_raw: string;
@@ -2646,6 +2667,28 @@ export interface operations {
2646
2667
  };
2647
2668
  };
2648
2669
  };
2670
+ AuthTelegramController_linkTelegramAccount: {
2671
+ parameters: {
2672
+ query?: never;
2673
+ header?: never;
2674
+ path?: never;
2675
+ cookie?: never;
2676
+ };
2677
+ requestBody: {
2678
+ content: {
2679
+ "application/json": components["schemas"]["TelegramLinkDto"];
2680
+ };
2681
+ };
2682
+ responses: {
2683
+ /** @description Unauthorized */
2684
+ 401: {
2685
+ headers: {
2686
+ [name: string]: unknown;
2687
+ };
2688
+ content?: never;
2689
+ };
2690
+ };
2691
+ };
2649
2692
  AuthTelegramController_signIn: {
2650
2693
  parameters: {
2651
2694
  query?: never;
@@ -15,6 +15,9 @@ export declare namespace API {
15
15
  type Request = operations['AuthTelegramController_signUp']['requestBody']['content']['application/json'];
16
16
  type Response = operations['AuthTelegramController_signUp']['responses']['200']['content']['application/json'];
17
17
  }
18
+ namespace Link {
19
+ type Request = operations['AuthTelegramController_linkTelegramAccount']['requestBody']['content']['application/json'];
20
+ }
18
21
  }
19
22
  interface Tokens {
20
23
  access_token: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.34.4",
3
+ "version": "1.34.5",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",