@mamindom/contracts 1.0.158 → 1.0.160

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.
@@ -28,6 +28,20 @@ export interface RegisterRequest {
28
28
  lastName: string;
29
29
  email: string;
30
30
  password: string;
31
+ phone?: string | undefined;
32
+ }
33
+ export interface RequestPasswordResetRequest {
34
+ identifier: string;
35
+ type: string;
36
+ }
37
+ export interface RequestPasswordResetResponse {
38
+ ok: boolean;
39
+ }
40
+ export interface ResetPasswordRequest {
41
+ identifier: string;
42
+ type: string;
43
+ code: string;
44
+ newPassword: string;
31
45
  }
32
46
  export interface AuthResponse {
33
47
  accessToken: string;
@@ -48,6 +62,8 @@ export interface AuthServiceClient {
48
62
  login(request: LoginRequest): Observable<AuthResponse>;
49
63
  register(request: RegisterRequest): Observable<AuthResponse>;
50
64
  logout(request: LogoutRequest): Observable<LogoutResponse>;
65
+ requestPasswordReset(request: RequestPasswordResetRequest): Observable<RequestPasswordResetResponse>;
66
+ resetPassword(request: ResetPasswordRequest): Observable<AuthResponse>;
51
67
  }
52
68
  export interface AuthServiceController {
53
69
  sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
@@ -56,6 +72,8 @@ export interface AuthServiceController {
56
72
  login(request: LoginRequest): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
57
73
  register(request: RegisterRequest): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
58
74
  logout(request: LogoutRequest): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
75
+ requestPasswordReset(request: RequestPasswordResetRequest): Promise<RequestPasswordResetResponse> | Observable<RequestPasswordResetResponse> | RequestPasswordResetResponse;
76
+ resetPassword(request: ResetPasswordRequest): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
59
77
  }
60
78
  export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
61
79
  export declare const AUTH_SERVICE_NAME = "AuthService";
package/dist/gen/auth.js CHANGED
@@ -13,7 +13,16 @@ exports.protobufPackage = "auth.v1";
13
13
  exports.AUTH_V1_PACKAGE_NAME = "auth.v1";
14
14
  function AuthServiceControllerMethods() {
15
15
  return function (constructor) {
16
- const grpcMethods = ["sendOtp", "verifyOtp", "refresh", "login", "register", "logout"];
16
+ const grpcMethods = [
17
+ "sendOtp",
18
+ "verifyOtp",
19
+ "refresh",
20
+ "login",
21
+ "register",
22
+ "logout",
23
+ "requestPasswordReset",
24
+ "resetPassword",
25
+ ];
17
26
  for (const method of grpcMethods) {
18
27
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
28
  (0, microservices_1.GrpcMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
@@ -103,6 +103,7 @@ export interface ProductListItemResponse {
103
103
  stickers: ProductStickerResponse[];
104
104
  activePromo?: ProductPromoInfo | undefined;
105
105
  weightKg: number;
106
+ updatedAt: string;
106
107
  }
107
108
  export interface ProductListItemResponse_NameEntry {
108
109
  key: string;
@@ -10,6 +10,8 @@ service AuthService {
10
10
  rpc Login (LoginRequest) returns (AuthResponse);
11
11
  rpc Register (RegisterRequest) returns (AuthResponse);
12
12
  rpc Logout (LogoutRequest) returns (LogoutResponse);
13
+ rpc RequestPasswordReset (RequestPasswordResetRequest) returns (RequestPasswordResetResponse);
14
+ rpc ResetPassword (ResetPasswordRequest) returns (AuthResponse);
13
15
  }
14
16
 
15
17
  message LogoutRequest {
@@ -50,6 +52,23 @@ message RegisterRequest {
50
52
  string last_name = 2;
51
53
  string email = 3;
52
54
  string password = 4;
55
+ optional string phone = 5;
56
+ }
57
+
58
+ message RequestPasswordResetRequest {
59
+ string identifier = 1;
60
+ string type = 2;
61
+ }
62
+
63
+ message RequestPasswordResetResponse {
64
+ bool ok = 1;
65
+ }
66
+
67
+ message ResetPasswordRequest {
68
+ string identifier = 1;
69
+ string type = 2;
70
+ string code = 3;
71
+ string new_password = 4;
53
72
  }
54
73
 
55
74
 
@@ -180,8 +180,10 @@ message ProductListItemResponse {
180
180
  int32 review_count = 21;
181
181
  repeated ProductStickerResponse stickers = 22;
182
182
  optional ProductPromoInfo active_promo = 23;
183
-
183
+
184
184
  double weight_kg = 24;
185
+
186
+ string updated_at = 25;
185
187
  }
186
188
 
187
189
 
package/gen/auth.ts CHANGED
@@ -44,6 +44,23 @@ export interface RegisterRequest {
44
44
  lastName: string;
45
45
  email: string;
46
46
  password: string;
47
+ phone?: string | undefined;
48
+ }
49
+
50
+ export interface RequestPasswordResetRequest {
51
+ identifier: string;
52
+ type: string;
53
+ }
54
+
55
+ export interface RequestPasswordResetResponse {
56
+ ok: boolean;
57
+ }
58
+
59
+ export interface ResetPasswordRequest {
60
+ identifier: string;
61
+ type: string;
62
+ code: string;
63
+ newPassword: string;
47
64
  }
48
65
 
49
66
  export interface AuthResponse {
@@ -74,6 +91,10 @@ export interface AuthServiceClient {
74
91
  register(request: RegisterRequest): Observable<AuthResponse>;
75
92
 
76
93
  logout(request: LogoutRequest): Observable<LogoutResponse>;
94
+
95
+ requestPasswordReset(request: RequestPasswordResetRequest): Observable<RequestPasswordResetResponse>;
96
+
97
+ resetPassword(request: ResetPasswordRequest): Observable<AuthResponse>;
77
98
  }
78
99
 
79
100
  export interface AuthServiceController {
@@ -88,11 +109,26 @@ export interface AuthServiceController {
88
109
  register(request: RegisterRequest): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
89
110
 
90
111
  logout(request: LogoutRequest): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
112
+
113
+ requestPasswordReset(
114
+ request: RequestPasswordResetRequest,
115
+ ): Promise<RequestPasswordResetResponse> | Observable<RequestPasswordResetResponse> | RequestPasswordResetResponse;
116
+
117
+ resetPassword(request: ResetPasswordRequest): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
91
118
  }
92
119
 
93
120
  export function AuthServiceControllerMethods() {
94
121
  return function (constructor: Function) {
95
- const grpcMethods: string[] = ["sendOtp", "verifyOtp", "refresh", "login", "register", "logout"];
122
+ const grpcMethods: string[] = [
123
+ "sendOtp",
124
+ "verifyOtp",
125
+ "refresh",
126
+ "login",
127
+ "register",
128
+ "logout",
129
+ "requestPasswordReset",
130
+ "resetPassword",
131
+ ];
96
132
  for (const method of grpcMethods) {
97
133
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
98
134
  GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
package/gen/product.ts CHANGED
@@ -124,6 +124,7 @@ export interface ProductListItemResponse {
124
124
  stickers: ProductStickerResponse[];
125
125
  activePromo?: ProductPromoInfo | undefined;
126
126
  weightKg: number;
127
+ updatedAt: string;
127
128
  }
128
129
 
129
130
  export interface ProductListItemResponse_NameEntry {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.158",
4
+ "version": "1.0.160",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
package/proto/auth.proto CHANGED
@@ -10,6 +10,8 @@ service AuthService {
10
10
  rpc Login (LoginRequest) returns (AuthResponse);
11
11
  rpc Register (RegisterRequest) returns (AuthResponse);
12
12
  rpc Logout (LogoutRequest) returns (LogoutResponse);
13
+ rpc RequestPasswordReset (RequestPasswordResetRequest) returns (RequestPasswordResetResponse);
14
+ rpc ResetPassword (ResetPasswordRequest) returns (AuthResponse);
13
15
  }
14
16
 
15
17
  message LogoutRequest {
@@ -50,6 +52,23 @@ message RegisterRequest {
50
52
  string last_name = 2;
51
53
  string email = 3;
52
54
  string password = 4;
55
+ optional string phone = 5;
56
+ }
57
+
58
+ message RequestPasswordResetRequest {
59
+ string identifier = 1;
60
+ string type = 2;
61
+ }
62
+
63
+ message RequestPasswordResetResponse {
64
+ bool ok = 1;
65
+ }
66
+
67
+ message ResetPasswordRequest {
68
+ string identifier = 1;
69
+ string type = 2;
70
+ string code = 3;
71
+ string new_password = 4;
53
72
  }
54
73
 
55
74
 
@@ -180,8 +180,10 @@ message ProductListItemResponse {
180
180
  int32 review_count = 21;
181
181
  repeated ProductStickerResponse stickers = 22;
182
182
  optional ProductPromoInfo active_promo = 23;
183
-
183
+
184
184
  double weight_kg = 24;
185
+
186
+ string updated_at = 25;
185
187
  }
186
188
 
187
189