squarefi-bff-api-module 1.25.5 → 1.25.6
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.d.ts +4 -2
- package/dist/api/auth.js +2 -0
- package/dist/api/types/autogen/apiV2.types.d.ts +1 -0
- package/dist/api/types/types.d.ts +22 -14
- package/package.json +1 -1
- package/src/api/auth.ts +8 -4
- package/src/api/types/autogen/apiV2.types.ts +1 -0
- package/src/api/types/types.ts +24 -14
package/dist/api/auth.d.ts
CHANGED
|
@@ -11,13 +11,15 @@ export declare const auth: {
|
|
|
11
11
|
};
|
|
12
12
|
signin: {
|
|
13
13
|
omni: {
|
|
14
|
-
email: (data: API.Auth.SignIn.Email.OTP.Request) => Promise<API.Auth.Tokens>;
|
|
15
|
-
phone: ({ phone, ...data }: API.Auth.SignIn.Phone.OTP.Request) => Promise<API.Auth.Tokens>;
|
|
14
|
+
email: (data: API.Auth.SignIn.Omni.Email.OTP.Request) => Promise<API.Auth.Tokens>;
|
|
15
|
+
phone: ({ phone, ...data }: API.Auth.SignIn.Omni.Phone.OTP.Request) => Promise<API.Auth.Tokens>;
|
|
16
16
|
};
|
|
17
|
+
byType: (data: API.Auth.SignIn.ByType.Request) => Promise<API.Auth.Tokens>;
|
|
17
18
|
telegram: (data: API.Auth.Telegram.Signin.Request) => Promise<API.Auth.Telegram.Signin.Response>;
|
|
18
19
|
password: (email: string, password: string) => Promise<API.Auth.Tokens>;
|
|
19
20
|
};
|
|
20
21
|
signup: {
|
|
22
|
+
byType: (data: API.Auth.SignUp.ByType.Request) => Promise<API.Auth.Tokens>;
|
|
21
23
|
password: (email: string, password: string) => Promise<API.Auth.Tokens>;
|
|
22
24
|
telegram: (data: API.Auth.Telegram.Signup.Request) => Promise<API.Auth.Telegram.Signup.Response>;
|
|
23
25
|
};
|
package/dist/api/auth.js
CHANGED
|
@@ -39,6 +39,7 @@ exports.auth = {
|
|
|
39
39
|
});
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
|
+
byType: (data) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-in', { data }),
|
|
42
43
|
telegram: (data) => apiClientFactory_1.apiClientV2.postRequest(exports.telegramSignInPath, { data }),
|
|
43
44
|
password: (email, password // check on backend V2
|
|
44
45
|
) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-in/password/email', {
|
|
@@ -46,6 +47,7 @@ exports.auth = {
|
|
|
46
47
|
}),
|
|
47
48
|
},
|
|
48
49
|
signup: {
|
|
50
|
+
byType: (data) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-up', { data }),
|
|
49
51
|
password: (email, password) => apiClientFactory_1.apiClientV2.postRequest('/auth/sign-up/password/email', {
|
|
50
52
|
data: { email, password },
|
|
51
53
|
}),
|
|
@@ -29,27 +29,35 @@ export declare namespace API {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
namespace SignIn {
|
|
32
|
-
namespace
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
namespace ByType {
|
|
33
|
+
type Request = operations['AuthController_signIn']['requestBody']['content']['application/json'];
|
|
34
|
+
}
|
|
35
|
+
namespace Omni {
|
|
36
|
+
namespace Email {
|
|
37
|
+
namespace OTP {
|
|
38
|
+
interface Request {
|
|
39
|
+
email: string;
|
|
40
|
+
invite_code?: string;
|
|
41
|
+
referrer?: string;
|
|
42
|
+
redirect_url?: string;
|
|
43
|
+
}
|
|
39
44
|
}
|
|
40
45
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
namespace Phone {
|
|
47
|
+
namespace OTP {
|
|
48
|
+
interface Request {
|
|
49
|
+
phone: string;
|
|
50
|
+
invite_code?: string;
|
|
51
|
+
referrer?: string;
|
|
52
|
+
}
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
namespace SignUp {
|
|
58
|
+
namespace ByType {
|
|
59
|
+
type Request = operations['AuthController_signUp']['requestBody']['content']['application/json'];
|
|
60
|
+
}
|
|
53
61
|
namespace Password {
|
|
54
62
|
interface Request {
|
|
55
63
|
email: string;
|
package/package.json
CHANGED
package/src/api/auth.ts
CHANGED
|
@@ -24,13 +24,15 @@ export const auth = {
|
|
|
24
24
|
},
|
|
25
25
|
signin: {
|
|
26
26
|
omni: {
|
|
27
|
-
email: (data: API.Auth.SignIn.Email.OTP.Request): Promise<API.Auth.Tokens> =>
|
|
28
|
-
apiClientV2.postRequest
|
|
29
|
-
phone: ({ phone, ...data }: API.Auth.SignIn.Phone.OTP.Request): Promise<API.Auth.Tokens> =>
|
|
30
|
-
apiClientV2.postRequest
|
|
27
|
+
email: (data: API.Auth.SignIn.Omni.Email.OTP.Request): Promise<API.Auth.Tokens> =>
|
|
28
|
+
apiClientV2.postRequest('/auth/sign-in/omni/email/otp', { data }),
|
|
29
|
+
phone: ({ phone, ...data }: API.Auth.SignIn.Omni.Phone.OTP.Request): Promise<API.Auth.Tokens> =>
|
|
30
|
+
apiClientV2.postRequest('/auth/sign-in/omni/phone/otp', {
|
|
31
31
|
data: { phone: convertPhoneToSupabaseFormat(phone), ...data },
|
|
32
32
|
}),
|
|
33
33
|
},
|
|
34
|
+
byType: (data: API.Auth.SignIn.ByType.Request): Promise<API.Auth.Tokens> =>
|
|
35
|
+
apiClientV2.postRequest('/auth/sign-in', { data }),
|
|
34
36
|
telegram: (data: API.Auth.Telegram.Signin.Request): Promise<API.Auth.Telegram.Signin.Response> =>
|
|
35
37
|
apiClientV2.postRequest<API.Auth.Telegram.Signin.Response>(telegramSignInPath, { data }),
|
|
36
38
|
password: (
|
|
@@ -42,6 +44,8 @@ export const auth = {
|
|
|
42
44
|
}),
|
|
43
45
|
},
|
|
44
46
|
signup: {
|
|
47
|
+
byType: (data: API.Auth.SignUp.ByType.Request): Promise<API.Auth.Tokens> =>
|
|
48
|
+
apiClientV2.postRequest('/auth/sign-up', { data }),
|
|
45
49
|
password: (email: string, password: string): Promise<API.Auth.Tokens> =>
|
|
46
50
|
apiClientV2.postRequest<API.Auth.Tokens>('/auth/sign-up/password/email', {
|
|
47
51
|
data: { email, password },
|
package/src/api/types/types.ts
CHANGED
|
@@ -55,29 +55,39 @@ export namespace API {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export namespace SignIn {
|
|
58
|
-
export namespace
|
|
59
|
-
export
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
export namespace ByType {
|
|
59
|
+
export type Request = operations['AuthController_signIn']['requestBody']['content']['application/json'];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export namespace Omni {
|
|
63
|
+
export namespace Email {
|
|
64
|
+
export namespace OTP {
|
|
65
|
+
export interface Request {
|
|
66
|
+
email: string;
|
|
67
|
+
invite_code?: string;
|
|
68
|
+
referrer?: string;
|
|
69
|
+
redirect_url?: string;
|
|
70
|
+
}
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
|
-
}
|
|
68
73
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
export namespace Phone {
|
|
75
|
+
export namespace OTP {
|
|
76
|
+
export interface Request {
|
|
77
|
+
phone: string;
|
|
78
|
+
invite_code?: string;
|
|
79
|
+
referrer?: string;
|
|
80
|
+
}
|
|
75
81
|
}
|
|
76
82
|
}
|
|
77
83
|
}
|
|
78
84
|
}
|
|
79
85
|
|
|
80
86
|
export namespace SignUp {
|
|
87
|
+
export namespace ByType {
|
|
88
|
+
export type Request = operations['AuthController_signUp']['requestBody']['content']['application/json'];
|
|
89
|
+
}
|
|
90
|
+
|
|
81
91
|
export namespace Password {
|
|
82
92
|
export interface Request {
|
|
83
93
|
email: string;
|