@platfformx/proto-contracts 1.0.23 → 1.1.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.
|
@@ -47,20 +47,12 @@ export interface TokenRefreshResponse {
|
|
|
47
47
|
accessToken: string;
|
|
48
48
|
refreshToken: string;
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
export interface SendOtpRequest {
|
|
50
|
+
export interface ConfirmAccountRequest {
|
|
52
51
|
identifier: string;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
export interface SendOtpResponse {
|
|
56
|
-
ok: boolean;
|
|
57
|
-
}
|
|
58
|
-
export interface VerifyOtpRequest {
|
|
59
|
-
identifier: string;
|
|
60
|
-
type: string;
|
|
61
|
-
code: string;
|
|
52
|
+
token?: string | undefined;
|
|
53
|
+
code?: string | undefined;
|
|
62
54
|
}
|
|
63
|
-
export interface
|
|
55
|
+
export interface ConfirmAccountResponse {
|
|
64
56
|
verified: boolean;
|
|
65
57
|
}
|
|
66
58
|
export interface AddIdentifierRequest {
|
|
@@ -89,7 +81,7 @@ export interface ForgotPasswordResponse {
|
|
|
89
81
|
}
|
|
90
82
|
export interface SmsCredentialsReset {
|
|
91
83
|
phone: string;
|
|
92
|
-
|
|
84
|
+
otp: string;
|
|
93
85
|
}
|
|
94
86
|
export interface UserCredentials {
|
|
95
87
|
email?: string | undefined;
|
|
@@ -114,22 +106,20 @@ export interface AuthServiceClient {
|
|
|
114
106
|
authenticate(request: AuthenticationRequest): Observable<AuthenticationResponse>;
|
|
115
107
|
authenticateWithOAuth(request: OAuthSessionRequest): Observable<OAuthSessionResponse>;
|
|
116
108
|
refreshTokens(request: TokenRefreshRequest): Observable<TokenRefreshResponse>;
|
|
117
|
-
|
|
118
|
-
verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
|
|
119
|
-
addIdentifier(request: AddIdentifierRequest): Observable<AddIdentifierResponse>;
|
|
109
|
+
confirmAccount(request: ConfirmAccountRequest): Observable<ConfirmAccountResponse>;
|
|
120
110
|
resetPassword(request: ResetPasswordRequest): Observable<ResetPasswordResponse>;
|
|
121
111
|
forgotPassword(request: ForgotPasswordRequest): Observable<ForgotPasswordResponse>;
|
|
112
|
+
addIdentifier(request: AddIdentifierRequest): Observable<AddIdentifierResponse>;
|
|
122
113
|
}
|
|
123
114
|
export interface AuthServiceController {
|
|
124
115
|
createAccount(request: CreateAccountRequest): Promise<CreateAccountResponse> | Observable<CreateAccountResponse> | CreateAccountResponse;
|
|
125
116
|
authenticate(request: AuthenticationRequest): Promise<AuthenticationResponse> | Observable<AuthenticationResponse> | AuthenticationResponse;
|
|
126
117
|
authenticateWithOAuth(request: OAuthSessionRequest): Promise<OAuthSessionResponse> | Observable<OAuthSessionResponse> | OAuthSessionResponse;
|
|
127
118
|
refreshTokens(request: TokenRefreshRequest): Promise<TokenRefreshResponse> | Observable<TokenRefreshResponse> | TokenRefreshResponse;
|
|
128
|
-
|
|
129
|
-
verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
|
|
130
|
-
addIdentifier(request: AddIdentifierRequest): Promise<AddIdentifierResponse> | Observable<AddIdentifierResponse> | AddIdentifierResponse;
|
|
119
|
+
confirmAccount(request: ConfirmAccountRequest): Promise<ConfirmAccountResponse> | Observable<ConfirmAccountResponse> | ConfirmAccountResponse;
|
|
131
120
|
resetPassword(request: ResetPasswordRequest): Promise<ResetPasswordResponse> | Observable<ResetPasswordResponse> | ResetPasswordResponse;
|
|
132
121
|
forgotPassword(request: ForgotPasswordRequest): Promise<ForgotPasswordResponse> | Observable<ForgotPasswordResponse> | ForgotPasswordResponse;
|
|
122
|
+
addIdentifier(request: AddIdentifierRequest): Promise<AddIdentifierResponse> | Observable<AddIdentifierResponse> | AddIdentifierResponse;
|
|
133
123
|
}
|
|
134
124
|
export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
|
|
135
125
|
export declare const AUTH_SERVICE_NAME = "AuthService";
|
|
@@ -26,11 +26,10 @@ function AuthServiceControllerMethods() {
|
|
|
26
26
|
"authenticate",
|
|
27
27
|
"authenticateWithOAuth",
|
|
28
28
|
"refreshTokens",
|
|
29
|
-
"
|
|
30
|
-
"verifyOtp",
|
|
31
|
-
"addIdentifier",
|
|
29
|
+
"confirmAccount",
|
|
32
30
|
"resetPassword",
|
|
33
31
|
"forgotPassword",
|
|
32
|
+
"addIdentifier",
|
|
34
33
|
];
|
|
35
34
|
for (const method of grpcMethods) {
|
|
36
35
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
|
@@ -8,13 +8,13 @@ service AuthService {
|
|
|
8
8
|
rpc AuthenticateWithOAuth (OAuthSessionRequest) returns (OAuthSessionResponse);
|
|
9
9
|
rpc RefreshTokens (TokenRefreshRequest) returns (TokenRefreshResponse);
|
|
10
10
|
|
|
11
|
-
rpc
|
|
12
|
-
|
|
13
|
-
rpc VerifyOtp (VerifyOtpRequest) returns (VerifyOtpResponse);
|
|
14
|
-
rpc AddIdentifier (AddIdentifierRequest) returns (AddIdentifierResponse);
|
|
15
|
-
|
|
11
|
+
rpc ConfirmAccount (ConfirmAccountRequest) returns (ConfirmAccountResponse);
|
|
12
|
+
|
|
16
13
|
rpc ResetPassword (ResetPasswordRequest) returns (ResetPasswordResponse);
|
|
17
14
|
rpc ForgotPassword (ForgotPasswordRequest) returns (ForgotPasswordResponse);
|
|
15
|
+
|
|
16
|
+
rpc AddIdentifier (AddIdentifierRequest) returns (AddIdentifierResponse);
|
|
17
|
+
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
// Create account
|
|
@@ -63,21 +63,14 @@ message TokenRefreshResponse {
|
|
|
63
63
|
string refresh_token = 2;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
message SendOtpRequest {
|
|
66
|
+
message ConfirmAccountRequest {
|
|
68
67
|
string identifier = 1;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
message VerifyOtpRequest {
|
|
76
|
-
string identifier = 1;
|
|
77
|
-
string type = 2;
|
|
78
|
-
string code = 3;
|
|
68
|
+
oneof confirm_method {
|
|
69
|
+
string token = 2;
|
|
70
|
+
string code = 3;
|
|
71
|
+
}
|
|
79
72
|
}
|
|
80
|
-
message
|
|
73
|
+
message ConfirmAccountResponse {
|
|
81
74
|
bool verified = 1;
|
|
82
75
|
}
|
|
83
76
|
|
|
@@ -118,7 +111,7 @@ message ForgotPasswordResponse {
|
|
|
118
111
|
|
|
119
112
|
message SmsCredentialsReset {
|
|
120
113
|
string phone = 1;
|
|
121
|
-
string
|
|
114
|
+
string otp = 2;
|
|
122
115
|
}
|
|
123
116
|
enum OAuthProvider {
|
|
124
117
|
OAUTH_PROVIDER_UNSPECIFIED = 0;
|