geniebox-shared-lib 1.0.35 → 1.0.37

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.
@@ -56,6 +56,20 @@ export interface RefreshRequest {
56
56
  export interface RefreshTokenResponse {
57
57
  tokens?: Tokens | undefined;
58
58
  }
59
+ export interface ConfirmEmailRequest {
60
+ token: string;
61
+ }
62
+ export interface ConfirmEmailResponse {
63
+ userId: string;
64
+ emailVerified: boolean;
65
+ }
66
+ export interface CheckEmailVerifiedRequest {
67
+ userId: string;
68
+ }
69
+ export interface CheckEmailVerifiedResponse {
70
+ userId: string;
71
+ emailVerified: boolean;
72
+ }
59
73
  export declare const AUTH_PACKAGE_NAME = "auth";
60
74
  export declare const RegisterCredentials: MessageFns<RegisterCredentials>;
61
75
  export declare const LoginCredentials: MessageFns<LoginCredentials>;
@@ -67,6 +81,10 @@ export declare const RecoverRequest: MessageFns<RecoverRequest>;
67
81
  export declare const ResetPasswordRequest: MessageFns<ResetPasswordRequest>;
68
82
  export declare const RefreshRequest: MessageFns<RefreshRequest>;
69
83
  export declare const RefreshTokenResponse: MessageFns<RefreshTokenResponse>;
84
+ export declare const ConfirmEmailRequest: MessageFns<ConfirmEmailRequest>;
85
+ export declare const ConfirmEmailResponse: MessageFns<ConfirmEmailResponse>;
86
+ export declare const CheckEmailVerifiedRequest: MessageFns<CheckEmailVerifiedRequest>;
87
+ export declare const CheckEmailVerifiedResponse: MessageFns<CheckEmailVerifiedResponse>;
70
88
  export interface AuthServiceClient {
71
89
  login(request: LoginCredentials, metadata?: Metadata): Observable<AuthResponse>;
72
90
  register(request: RegisterCredentials, metadata?: Metadata): Observable<AuthResponse>;
@@ -74,6 +92,8 @@ export interface AuthServiceClient {
74
92
  logout(request: LogoutRequest, metadata?: Metadata): Observable<Empty>;
75
93
  recover(request: RecoverRequest, metadata?: Metadata): Observable<Empty>;
76
94
  resetPassword(request: ResetPasswordRequest, metadata?: Metadata): Observable<Empty>;
95
+ confirmEmail(request: ConfirmEmailRequest, metadata?: Metadata): Observable<ConfirmEmailResponse>;
96
+ checkEmailVerified(request: CheckEmailVerifiedRequest, metadata?: Metadata): Observable<CheckEmailVerifiedResponse>;
77
97
  }
78
98
  export interface AuthServiceController {
79
99
  login(request: LoginCredentials, metadata?: Metadata): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
@@ -82,6 +102,8 @@ export interface AuthServiceController {
82
102
  logout(request: LogoutRequest, metadata?: Metadata): void;
83
103
  recover(request: RecoverRequest, metadata?: Metadata): void;
84
104
  resetPassword(request: ResetPasswordRequest, metadata?: Metadata): void;
105
+ confirmEmail(request: ConfirmEmailRequest, metadata?: Metadata): Promise<ConfirmEmailResponse> | Observable<ConfirmEmailResponse> | ConfirmEmailResponse;
106
+ checkEmailVerified(request: CheckEmailVerifiedRequest, metadata?: Metadata): Promise<CheckEmailVerifiedResponse> | Observable<CheckEmailVerifiedResponse> | CheckEmailVerifiedResponse;
85
107
  }
86
108
  export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
87
109
  export declare const AUTH_SERVICE_NAME = "AuthService";
@@ -141,6 +163,24 @@ export declare const AuthServiceService: {
141
163
  readonly responseSerialize: (value: Empty) => Buffer;
142
164
  readonly responseDeserialize: (value: Buffer) => Empty;
143
165
  };
166
+ readonly confirmEmail: {
167
+ readonly path: "/auth.AuthService/confirmEmail";
168
+ readonly requestStream: false;
169
+ readonly responseStream: false;
170
+ readonly requestSerialize: (value: ConfirmEmailRequest) => Buffer;
171
+ readonly requestDeserialize: (value: Buffer) => ConfirmEmailRequest;
172
+ readonly responseSerialize: (value: ConfirmEmailResponse) => Buffer;
173
+ readonly responseDeserialize: (value: Buffer) => ConfirmEmailResponse;
174
+ };
175
+ readonly checkEmailVerified: {
176
+ readonly path: "/auth.AuthService/checkEmailVerified";
177
+ readonly requestStream: false;
178
+ readonly responseStream: false;
179
+ readonly requestSerialize: (value: CheckEmailVerifiedRequest) => Buffer;
180
+ readonly requestDeserialize: (value: Buffer) => CheckEmailVerifiedRequest;
181
+ readonly responseSerialize: (value: CheckEmailVerifiedResponse) => Buffer;
182
+ readonly responseDeserialize: (value: Buffer) => CheckEmailVerifiedResponse;
183
+ };
144
184
  };
145
185
  export interface AuthServiceServer extends UntypedServiceImplementation {
146
186
  login: handleUnaryCall<LoginCredentials, AuthResponse>;
@@ -149,6 +189,8 @@ export interface AuthServiceServer extends UntypedServiceImplementation {
149
189
  logout: handleUnaryCall<LogoutRequest, Empty>;
150
190
  recover: handleUnaryCall<RecoverRequest, Empty>;
151
191
  resetPassword: handleUnaryCall<ResetPasswordRequest, Empty>;
192
+ confirmEmail: handleUnaryCall<ConfirmEmailRequest, ConfirmEmailResponse>;
193
+ checkEmailVerified: handleUnaryCall<CheckEmailVerifiedRequest, CheckEmailVerifiedResponse>;
152
194
  }
153
195
  export interface MessageFns<T> {
154
196
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
@@ -5,7 +5,7 @@
5
5
  // protoc v5.28.2
6
6
  // source: auth.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.AuthServiceService = exports.AUTH_SERVICE_NAME = exports.RefreshTokenResponse = exports.RefreshRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.LogoutRequest = exports.UserResponse = exports.AuthResponse = exports.Tokens = exports.LoginCredentials = exports.RegisterCredentials = exports.AUTH_PACKAGE_NAME = exports.protobufPackage = void 0;
8
+ exports.AuthServiceService = exports.AUTH_SERVICE_NAME = exports.CheckEmailVerifiedResponse = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailResponse = exports.ConfirmEmailRequest = exports.RefreshTokenResponse = exports.RefreshRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.LogoutRequest = exports.UserResponse = exports.AuthResponse = exports.Tokens = exports.LoginCredentials = exports.RegisterCredentials = exports.AUTH_PACKAGE_NAME = exports.protobufPackage = void 0;
9
9
  exports.AuthServiceControllerMethods = AuthServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const wire_1 = require("@bufbuild/protobuf/wire");
@@ -573,9 +573,170 @@ exports.RefreshTokenResponse = {
573
573
  return message;
574
574
  },
575
575
  };
576
+ function createBaseConfirmEmailRequest() {
577
+ return { token: "" };
578
+ }
579
+ exports.ConfirmEmailRequest = {
580
+ encode(message, writer = new wire_1.BinaryWriter()) {
581
+ if (message.token !== "") {
582
+ writer.uint32(10).string(message.token);
583
+ }
584
+ return writer;
585
+ },
586
+ decode(input, length) {
587
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
588
+ const end = length === undefined ? reader.len : reader.pos + length;
589
+ const message = createBaseConfirmEmailRequest();
590
+ while (reader.pos < end) {
591
+ const tag = reader.uint32();
592
+ switch (tag >>> 3) {
593
+ case 1: {
594
+ if (tag !== 10) {
595
+ break;
596
+ }
597
+ message.token = reader.string();
598
+ continue;
599
+ }
600
+ }
601
+ if ((tag & 7) === 4 || tag === 0) {
602
+ break;
603
+ }
604
+ reader.skip(tag & 7);
605
+ }
606
+ return message;
607
+ },
608
+ };
609
+ function createBaseConfirmEmailResponse() {
610
+ return { userId: "", emailVerified: false };
611
+ }
612
+ exports.ConfirmEmailResponse = {
613
+ encode(message, writer = new wire_1.BinaryWriter()) {
614
+ if (message.userId !== "") {
615
+ writer.uint32(10).string(message.userId);
616
+ }
617
+ if (message.emailVerified !== false) {
618
+ writer.uint32(16).bool(message.emailVerified);
619
+ }
620
+ return writer;
621
+ },
622
+ decode(input, length) {
623
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
624
+ const end = length === undefined ? reader.len : reader.pos + length;
625
+ const message = createBaseConfirmEmailResponse();
626
+ while (reader.pos < end) {
627
+ const tag = reader.uint32();
628
+ switch (tag >>> 3) {
629
+ case 1: {
630
+ if (tag !== 10) {
631
+ break;
632
+ }
633
+ message.userId = reader.string();
634
+ continue;
635
+ }
636
+ case 2: {
637
+ if (tag !== 16) {
638
+ break;
639
+ }
640
+ message.emailVerified = reader.bool();
641
+ continue;
642
+ }
643
+ }
644
+ if ((tag & 7) === 4 || tag === 0) {
645
+ break;
646
+ }
647
+ reader.skip(tag & 7);
648
+ }
649
+ return message;
650
+ },
651
+ };
652
+ function createBaseCheckEmailVerifiedRequest() {
653
+ return { userId: "" };
654
+ }
655
+ exports.CheckEmailVerifiedRequest = {
656
+ encode(message, writer = new wire_1.BinaryWriter()) {
657
+ if (message.userId !== "") {
658
+ writer.uint32(10).string(message.userId);
659
+ }
660
+ return writer;
661
+ },
662
+ decode(input, length) {
663
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
664
+ const end = length === undefined ? reader.len : reader.pos + length;
665
+ const message = createBaseCheckEmailVerifiedRequest();
666
+ while (reader.pos < end) {
667
+ const tag = reader.uint32();
668
+ switch (tag >>> 3) {
669
+ case 1: {
670
+ if (tag !== 10) {
671
+ break;
672
+ }
673
+ message.userId = reader.string();
674
+ continue;
675
+ }
676
+ }
677
+ if ((tag & 7) === 4 || tag === 0) {
678
+ break;
679
+ }
680
+ reader.skip(tag & 7);
681
+ }
682
+ return message;
683
+ },
684
+ };
685
+ function createBaseCheckEmailVerifiedResponse() {
686
+ return { userId: "", emailVerified: false };
687
+ }
688
+ exports.CheckEmailVerifiedResponse = {
689
+ encode(message, writer = new wire_1.BinaryWriter()) {
690
+ if (message.userId !== "") {
691
+ writer.uint32(10).string(message.userId);
692
+ }
693
+ if (message.emailVerified !== false) {
694
+ writer.uint32(16).bool(message.emailVerified);
695
+ }
696
+ return writer;
697
+ },
698
+ decode(input, length) {
699
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
700
+ const end = length === undefined ? reader.len : reader.pos + length;
701
+ const message = createBaseCheckEmailVerifiedResponse();
702
+ while (reader.pos < end) {
703
+ const tag = reader.uint32();
704
+ switch (tag >>> 3) {
705
+ case 1: {
706
+ if (tag !== 10) {
707
+ break;
708
+ }
709
+ message.userId = reader.string();
710
+ continue;
711
+ }
712
+ case 2: {
713
+ if (tag !== 16) {
714
+ break;
715
+ }
716
+ message.emailVerified = reader.bool();
717
+ continue;
718
+ }
719
+ }
720
+ if ((tag & 7) === 4 || tag === 0) {
721
+ break;
722
+ }
723
+ reader.skip(tag & 7);
724
+ }
725
+ return message;
726
+ },
727
+ };
576
728
  function AuthServiceControllerMethods() {
577
729
  return function (constructor) {
578
- const grpcMethods = ["login", "register", "refresh", "logout", "recover", "resetPassword"];
730
+ const grpcMethods = [
731
+ "login",
732
+ "register",
733
+ "refresh",
734
+ "logout",
735
+ "recover",
736
+ "resetPassword",
737
+ "confirmEmail",
738
+ "checkEmailVerified",
739
+ ];
579
740
  for (const method of grpcMethods) {
580
741
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
581
742
  (0, microservices_1.GrpcMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
@@ -643,4 +804,22 @@ exports.AuthServiceService = {
643
804
  responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
644
805
  responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
645
806
  },
807
+ confirmEmail: {
808
+ path: "/auth.AuthService/confirmEmail",
809
+ requestStream: false,
810
+ responseStream: false,
811
+ requestSerialize: (value) => Buffer.from(exports.ConfirmEmailRequest.encode(value).finish()),
812
+ requestDeserialize: (value) => exports.ConfirmEmailRequest.decode(value),
813
+ responseSerialize: (value) => Buffer.from(exports.ConfirmEmailResponse.encode(value).finish()),
814
+ responseDeserialize: (value) => exports.ConfirmEmailResponse.decode(value),
815
+ },
816
+ checkEmailVerified: {
817
+ path: "/auth.AuthService/checkEmailVerified",
818
+ requestStream: false,
819
+ responseStream: false,
820
+ requestSerialize: (value) => Buffer.from(exports.CheckEmailVerifiedRequest.encode(value).finish()),
821
+ requestDeserialize: (value) => exports.CheckEmailVerifiedRequest.decode(value),
822
+ responseSerialize: (value) => Buffer.from(exports.CheckEmailVerifiedResponse.encode(value).finish()),
823
+ responseDeserialize: (value) => exports.CheckEmailVerifiedResponse.decode(value),
824
+ },
646
825
  };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { SharedModule } from "./shared.module";
2
2
  export { UsersClient } from "./user/user.client";
3
3
  export { AuthClient } from "./auth/auth.client";
4
- export { MessageFns as UserMessageFns, protobufPackage as UserProtobufPackage, User, CreateUserRequest, CreateUserPersonal, UpdateUserRequest, GetByIdRequest, UserResponse, UsersResponse, FindByEmailRequest, FindByPhoneRequest, UpdatePasswordRequest, UserServiceService as UserService, } from "./user/user.interface";
5
- export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage, LoginCredentials, RegisterCredentials, LogoutRequest, RefreshRequest, AuthResponse, RefreshTokenResponse, RecoverRequest, ResetPasswordRequest, } from "./auth/auth.interface";
4
+ export { MessageFns as UserMessageFns, protobufPackage as UserProtobufPackage, User, CreateUserRequest, CreateUserPersonal, UpdateUserRequest, GetByIdRequest, UserResponse, UsersResponse, FindByEmailRequest, FindByPhoneRequest, UpdatePasswordRequest, UpdateEmailVerificationRequest, GetEmailVerificationStatusRequest, EmailVerificationStatusResponse, UserServiceService as UserService, } from "./user/user.interface";
5
+ export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage, LoginCredentials, RegisterCredentials, LogoutRequest, RefreshRequest, AuthResponse, RefreshTokenResponse, RecoverRequest, ResetPasswordRequest, ConfirmEmailRequest, ConfirmEmailResponse, CheckEmailVerifiedRequest, CheckEmailVerifiedResponse, } from "./auth/auth.interface";
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ResetPasswordRequest = exports.RecoverRequest = exports.RefreshTokenResponse = exports.AuthResponse = exports.RefreshRequest = exports.LogoutRequest = exports.RegisterCredentials = exports.LoginCredentials = exports.AuthProtobufPackage = exports.UserService = exports.UpdatePasswordRequest = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.UsersResponse = exports.UserResponse = exports.GetByIdRequest = exports.UpdateUserRequest = exports.CreateUserPersonal = exports.CreateUserRequest = exports.User = exports.UserProtobufPackage = exports.AuthClient = exports.UsersClient = exports.SharedModule = void 0;
3
+ exports.CheckEmailVerifiedResponse = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailResponse = exports.ConfirmEmailRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.RefreshTokenResponse = exports.AuthResponse = exports.RefreshRequest = exports.LogoutRequest = exports.RegisterCredentials = exports.LoginCredentials = exports.AuthProtobufPackage = exports.UserService = exports.EmailVerificationStatusResponse = exports.GetEmailVerificationStatusRequest = exports.UpdateEmailVerificationRequest = exports.UpdatePasswordRequest = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.UsersResponse = exports.UserResponse = exports.GetByIdRequest = exports.UpdateUserRequest = exports.CreateUserPersonal = exports.CreateUserRequest = exports.User = exports.UserProtobufPackage = exports.AuthClient = exports.UsersClient = exports.SharedModule = void 0;
4
4
  var shared_module_1 = require("./shared.module");
5
5
  Object.defineProperty(exports, "SharedModule", { enumerable: true, get: function () { return shared_module_1.SharedModule; } });
6
6
  var user_client_1 = require("./user/user.client");
@@ -19,6 +19,9 @@ Object.defineProperty(exports, "UsersResponse", { enumerable: true, get: functio
19
19
  Object.defineProperty(exports, "FindByEmailRequest", { enumerable: true, get: function () { return user_interface_1.FindByEmailRequest; } });
20
20
  Object.defineProperty(exports, "FindByPhoneRequest", { enumerable: true, get: function () { return user_interface_1.FindByPhoneRequest; } });
21
21
  Object.defineProperty(exports, "UpdatePasswordRequest", { enumerable: true, get: function () { return user_interface_1.UpdatePasswordRequest; } });
22
+ Object.defineProperty(exports, "UpdateEmailVerificationRequest", { enumerable: true, get: function () { return user_interface_1.UpdateEmailVerificationRequest; } });
23
+ Object.defineProperty(exports, "GetEmailVerificationStatusRequest", { enumerable: true, get: function () { return user_interface_1.GetEmailVerificationStatusRequest; } });
24
+ Object.defineProperty(exports, "EmailVerificationStatusResponse", { enumerable: true, get: function () { return user_interface_1.EmailVerificationStatusResponse; } });
22
25
  Object.defineProperty(exports, "UserService", { enumerable: true, get: function () { return user_interface_1.UserServiceService; } });
23
26
  var auth_interface_1 = require("./auth/auth.interface");
24
27
  Object.defineProperty(exports, "AuthProtobufPackage", { enumerable: true, get: function () { return auth_interface_1.protobufPackage; } });
@@ -30,3 +33,7 @@ Object.defineProperty(exports, "AuthResponse", { enumerable: true, get: function
30
33
  Object.defineProperty(exports, "RefreshTokenResponse", { enumerable: true, get: function () { return auth_interface_1.RefreshTokenResponse; } });
31
34
  Object.defineProperty(exports, "RecoverRequest", { enumerable: true, get: function () { return auth_interface_1.RecoverRequest; } });
32
35
  Object.defineProperty(exports, "ResetPasswordRequest", { enumerable: true, get: function () { return auth_interface_1.ResetPasswordRequest; } });
36
+ Object.defineProperty(exports, "ConfirmEmailRequest", { enumerable: true, get: function () { return auth_interface_1.ConfirmEmailRequest; } });
37
+ Object.defineProperty(exports, "ConfirmEmailResponse", { enumerable: true, get: function () { return auth_interface_1.ConfirmEmailResponse; } });
38
+ Object.defineProperty(exports, "CheckEmailVerifiedRequest", { enumerable: true, get: function () { return auth_interface_1.CheckEmailVerifiedRequest; } });
39
+ Object.defineProperty(exports, "CheckEmailVerifiedResponse", { enumerable: true, get: function () { return auth_interface_1.CheckEmailVerifiedResponse; } });
@@ -13,6 +13,7 @@ export interface UserPersonal {
13
13
  /** "male" | "female" */
14
14
  gender: string;
15
15
  email: string;
16
+ emailVerified: boolean;
16
17
  phoneNumber: string;
17
18
  createdAt: string;
18
19
  updatedAt: string;
@@ -66,6 +67,13 @@ export interface UpdatePasswordRequest {
66
67
  export interface RemoveUserRequest {
67
68
  uuid: string;
68
69
  }
70
+ export interface UpdateEmailVerificationRequest {
71
+ userId: string;
72
+ verified: boolean;
73
+ }
74
+ export interface GetEmailVerificationStatusRequest {
75
+ uuid: string;
76
+ }
69
77
  export interface UserResponse {
70
78
  uuid: string;
71
79
  photoUrl: string;
@@ -81,6 +89,10 @@ export interface UserResponse {
81
89
  export interface UsersResponse {
82
90
  users: UserResponse[];
83
91
  }
92
+ export interface EmailVerificationStatusResponse {
93
+ userId: string;
94
+ emailVerified: boolean;
95
+ }
84
96
  export declare const USER_PACKAGE_NAME = "user";
85
97
  export declare const UserPersonal: MessageFns<UserPersonal>;
86
98
  export declare const UserAuthentication: MessageFns<UserAuthentication>;
@@ -94,8 +106,11 @@ export declare const FindByPhoneRequest: MessageFns<FindByPhoneRequest>;
94
106
  export declare const UpdateUserRequest: MessageFns<UpdateUserRequest>;
95
107
  export declare const UpdatePasswordRequest: MessageFns<UpdatePasswordRequest>;
96
108
  export declare const RemoveUserRequest: MessageFns<RemoveUserRequest>;
109
+ export declare const UpdateEmailVerificationRequest: MessageFns<UpdateEmailVerificationRequest>;
110
+ export declare const GetEmailVerificationStatusRequest: MessageFns<GetEmailVerificationStatusRequest>;
97
111
  export declare const UserResponse: MessageFns<UserResponse>;
98
112
  export declare const UsersResponse: MessageFns<UsersResponse>;
113
+ export declare const EmailVerificationStatusResponse: MessageFns<EmailVerificationStatusResponse>;
99
114
  export interface UserServiceClient {
100
115
  create(request: CreateUserRequest, metadata?: Metadata): Observable<UserResponse>;
101
116
  findOne(request: GetByIdRequest, metadata?: Metadata): Observable<UserResponse>;
@@ -105,6 +120,8 @@ export interface UserServiceClient {
105
120
  update(request: UpdateUserRequest, metadata?: Metadata): Observable<UserResponse>;
106
121
  updatePassword(request: UpdatePasswordRequest, metadata?: Metadata): Observable<Empty>;
107
122
  remove(request: RemoveUserRequest, metadata?: Metadata): Observable<Empty>;
123
+ updateEmailVerification(request: UpdateEmailVerificationRequest, metadata?: Metadata): Observable<EmailVerificationStatusResponse>;
124
+ getEmailVerificationStatus(request: GetEmailVerificationStatusRequest, metadata?: Metadata): Observable<EmailVerificationStatusResponse>;
108
125
  }
109
126
  export interface UserServiceController {
110
127
  create(request: CreateUserRequest, metadata?: Metadata): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
@@ -115,6 +132,8 @@ export interface UserServiceController {
115
132
  update(request: UpdateUserRequest, metadata?: Metadata): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
116
133
  updatePassword(request: UpdatePasswordRequest, metadata?: Metadata): void;
117
134
  remove(request: RemoveUserRequest, metadata?: Metadata): void;
135
+ updateEmailVerification(request: UpdateEmailVerificationRequest, metadata?: Metadata): Promise<EmailVerificationStatusResponse> | Observable<EmailVerificationStatusResponse> | EmailVerificationStatusResponse;
136
+ getEmailVerificationStatus(request: GetEmailVerificationStatusRequest, metadata?: Metadata): Promise<EmailVerificationStatusResponse> | Observable<EmailVerificationStatusResponse> | EmailVerificationStatusResponse;
118
137
  }
119
138
  export declare function UserServiceControllerMethods(): (constructor: Function) => void;
120
139
  export declare const USER_SERVICE_NAME = "UserService";
@@ -192,6 +211,24 @@ export declare const UserServiceService: {
192
211
  readonly responseSerialize: (value: Empty) => Buffer;
193
212
  readonly responseDeserialize: (value: Buffer) => Empty;
194
213
  };
214
+ readonly updateEmailVerification: {
215
+ readonly path: "/user.UserService/updateEmailVerification";
216
+ readonly requestStream: false;
217
+ readonly responseStream: false;
218
+ readonly requestSerialize: (value: UpdateEmailVerificationRequest) => Buffer;
219
+ readonly requestDeserialize: (value: Buffer) => UpdateEmailVerificationRequest;
220
+ readonly responseSerialize: (value: EmailVerificationStatusResponse) => Buffer;
221
+ readonly responseDeserialize: (value: Buffer) => EmailVerificationStatusResponse;
222
+ };
223
+ readonly getEmailVerificationStatus: {
224
+ readonly path: "/user.UserService/getEmailVerificationStatus";
225
+ readonly requestStream: false;
226
+ readonly responseStream: false;
227
+ readonly requestSerialize: (value: GetEmailVerificationStatusRequest) => Buffer;
228
+ readonly requestDeserialize: (value: Buffer) => GetEmailVerificationStatusRequest;
229
+ readonly responseSerialize: (value: EmailVerificationStatusResponse) => Buffer;
230
+ readonly responseDeserialize: (value: Buffer) => EmailVerificationStatusResponse;
231
+ };
195
232
  };
196
233
  export interface UserServiceServer extends UntypedServiceImplementation {
197
234
  create: handleUnaryCall<CreateUserRequest, UserResponse>;
@@ -202,6 +239,8 @@ export interface UserServiceServer extends UntypedServiceImplementation {
202
239
  update: handleUnaryCall<UpdateUserRequest, UserResponse>;
203
240
  updatePassword: handleUnaryCall<UpdatePasswordRequest, Empty>;
204
241
  remove: handleUnaryCall<RemoveUserRequest, Empty>;
242
+ updateEmailVerification: handleUnaryCall<UpdateEmailVerificationRequest, EmailVerificationStatusResponse>;
243
+ getEmailVerificationStatus: handleUnaryCall<GetEmailVerificationStatusRequest, EmailVerificationStatusResponse>;
205
244
  }
206
245
  export interface MessageFns<T> {
207
246
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
@@ -5,7 +5,7 @@
5
5
  // protoc v5.28.2
6
6
  // source: user.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.UserServiceService = exports.USER_SERVICE_NAME = exports.UsersResponse = exports.UserResponse = exports.RemoveUserRequest = exports.UpdatePasswordRequest = exports.UpdateUserRequest = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.GetByIdRequest = exports.CreateUserRequest = exports.CreateUserAuthentication = exports.CreateUserPersonal = exports.User = exports.UserAuthentication = exports.UserPersonal = exports.USER_PACKAGE_NAME = exports.protobufPackage = void 0;
8
+ exports.UserServiceService = exports.USER_SERVICE_NAME = exports.EmailVerificationStatusResponse = exports.UsersResponse = exports.UserResponse = exports.GetEmailVerificationStatusRequest = exports.UpdateEmailVerificationRequest = exports.RemoveUserRequest = exports.UpdatePasswordRequest = exports.UpdateUserRequest = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.GetByIdRequest = exports.CreateUserRequest = exports.CreateUserAuthentication = exports.CreateUserPersonal = exports.User = exports.UserAuthentication = exports.UserPersonal = exports.USER_PACKAGE_NAME = exports.protobufPackage = void 0;
9
9
  exports.UserServiceControllerMethods = UserServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const wire_1 = require("@bufbuild/protobuf/wire");
@@ -23,6 +23,7 @@ function createBaseUserPersonal() {
23
23
  birthday: "",
24
24
  gender: "",
25
25
  email: "",
26
+ emailVerified: false,
26
27
  phoneNumber: "",
27
28
  createdAt: "",
28
29
  updatedAt: "",
@@ -54,14 +55,17 @@ exports.UserPersonal = {
54
55
  if (message.email !== "") {
55
56
  writer.uint32(66).string(message.email);
56
57
  }
58
+ if (message.emailVerified !== false) {
59
+ writer.uint32(72).bool(message.emailVerified);
60
+ }
57
61
  if (message.phoneNumber !== "") {
58
- writer.uint32(74).string(message.phoneNumber);
62
+ writer.uint32(82).string(message.phoneNumber);
59
63
  }
60
64
  if (message.createdAt !== "") {
61
- writer.uint32(82).string(message.createdAt);
65
+ writer.uint32(90).string(message.createdAt);
62
66
  }
63
67
  if (message.updatedAt !== "") {
64
- writer.uint32(90).string(message.updatedAt);
68
+ writer.uint32(98).string(message.updatedAt);
65
69
  }
66
70
  return writer;
67
71
  },
@@ -129,23 +133,30 @@ exports.UserPersonal = {
129
133
  continue;
130
134
  }
131
135
  case 9: {
132
- if (tag !== 74) {
136
+ if (tag !== 72) {
133
137
  break;
134
138
  }
135
- message.phoneNumber = reader.string();
139
+ message.emailVerified = reader.bool();
136
140
  continue;
137
141
  }
138
142
  case 10: {
139
143
  if (tag !== 82) {
140
144
  break;
141
145
  }
142
- message.createdAt = reader.string();
146
+ message.phoneNumber = reader.string();
143
147
  continue;
144
148
  }
145
149
  case 11: {
146
150
  if (tag !== 90) {
147
151
  break;
148
152
  }
153
+ message.createdAt = reader.string();
154
+ continue;
155
+ }
156
+ case 12: {
157
+ if (tag !== 98) {
158
+ break;
159
+ }
149
160
  message.updatedAt = reader.string();
150
161
  continue;
151
162
  }
@@ -671,6 +682,82 @@ exports.RemoveUserRequest = {
671
682
  return message;
672
683
  },
673
684
  };
685
+ function createBaseUpdateEmailVerificationRequest() {
686
+ return { userId: "", verified: false };
687
+ }
688
+ exports.UpdateEmailVerificationRequest = {
689
+ encode(message, writer = new wire_1.BinaryWriter()) {
690
+ if (message.userId !== "") {
691
+ writer.uint32(10).string(message.userId);
692
+ }
693
+ if (message.verified !== false) {
694
+ writer.uint32(16).bool(message.verified);
695
+ }
696
+ return writer;
697
+ },
698
+ decode(input, length) {
699
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
700
+ const end = length === undefined ? reader.len : reader.pos + length;
701
+ const message = createBaseUpdateEmailVerificationRequest();
702
+ while (reader.pos < end) {
703
+ const tag = reader.uint32();
704
+ switch (tag >>> 3) {
705
+ case 1: {
706
+ if (tag !== 10) {
707
+ break;
708
+ }
709
+ message.userId = reader.string();
710
+ continue;
711
+ }
712
+ case 2: {
713
+ if (tag !== 16) {
714
+ break;
715
+ }
716
+ message.verified = reader.bool();
717
+ continue;
718
+ }
719
+ }
720
+ if ((tag & 7) === 4 || tag === 0) {
721
+ break;
722
+ }
723
+ reader.skip(tag & 7);
724
+ }
725
+ return message;
726
+ },
727
+ };
728
+ function createBaseGetEmailVerificationStatusRequest() {
729
+ return { uuid: "" };
730
+ }
731
+ exports.GetEmailVerificationStatusRequest = {
732
+ encode(message, writer = new wire_1.BinaryWriter()) {
733
+ if (message.uuid !== "") {
734
+ writer.uint32(10).string(message.uuid);
735
+ }
736
+ return writer;
737
+ },
738
+ decode(input, length) {
739
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
740
+ const end = length === undefined ? reader.len : reader.pos + length;
741
+ const message = createBaseGetEmailVerificationStatusRequest();
742
+ while (reader.pos < end) {
743
+ const tag = reader.uint32();
744
+ switch (tag >>> 3) {
745
+ case 1: {
746
+ if (tag !== 10) {
747
+ break;
748
+ }
749
+ message.uuid = reader.string();
750
+ continue;
751
+ }
752
+ }
753
+ if ((tag & 7) === 4 || tag === 0) {
754
+ break;
755
+ }
756
+ reader.skip(tag & 7);
757
+ }
758
+ return message;
759
+ },
760
+ };
674
761
  function createBaseUserResponse() {
675
762
  return {
676
763
  uuid: "",
@@ -838,6 +925,49 @@ exports.UsersResponse = {
838
925
  return message;
839
926
  },
840
927
  };
928
+ function createBaseEmailVerificationStatusResponse() {
929
+ return { userId: "", emailVerified: false };
930
+ }
931
+ exports.EmailVerificationStatusResponse = {
932
+ encode(message, writer = new wire_1.BinaryWriter()) {
933
+ if (message.userId !== "") {
934
+ writer.uint32(10).string(message.userId);
935
+ }
936
+ if (message.emailVerified !== false) {
937
+ writer.uint32(16).bool(message.emailVerified);
938
+ }
939
+ return writer;
940
+ },
941
+ decode(input, length) {
942
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
943
+ const end = length === undefined ? reader.len : reader.pos + length;
944
+ const message = createBaseEmailVerificationStatusResponse();
945
+ while (reader.pos < end) {
946
+ const tag = reader.uint32();
947
+ switch (tag >>> 3) {
948
+ case 1: {
949
+ if (tag !== 10) {
950
+ break;
951
+ }
952
+ message.userId = reader.string();
953
+ continue;
954
+ }
955
+ case 2: {
956
+ if (tag !== 16) {
957
+ break;
958
+ }
959
+ message.emailVerified = reader.bool();
960
+ continue;
961
+ }
962
+ }
963
+ if ((tag & 7) === 4 || tag === 0) {
964
+ break;
965
+ }
966
+ reader.skip(tag & 7);
967
+ }
968
+ return message;
969
+ },
970
+ };
841
971
  function UserServiceControllerMethods() {
842
972
  return function (constructor) {
843
973
  const grpcMethods = [
@@ -849,6 +979,8 @@ function UserServiceControllerMethods() {
849
979
  "update",
850
980
  "updatePassword",
851
981
  "remove",
982
+ "updateEmailVerification",
983
+ "getEmailVerificationStatus",
852
984
  ];
853
985
  for (const method of grpcMethods) {
854
986
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -935,4 +1067,22 @@ exports.UserServiceService = {
935
1067
  responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
936
1068
  responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
937
1069
  },
1070
+ updateEmailVerification: {
1071
+ path: "/user.UserService/updateEmailVerification",
1072
+ requestStream: false,
1073
+ responseStream: false,
1074
+ requestSerialize: (value) => Buffer.from(exports.UpdateEmailVerificationRequest.encode(value).finish()),
1075
+ requestDeserialize: (value) => exports.UpdateEmailVerificationRequest.decode(value),
1076
+ responseSerialize: (value) => Buffer.from(exports.EmailVerificationStatusResponse.encode(value).finish()),
1077
+ responseDeserialize: (value) => exports.EmailVerificationStatusResponse.decode(value),
1078
+ },
1079
+ getEmailVerificationStatus: {
1080
+ path: "/user.UserService/getEmailVerificationStatus",
1081
+ requestStream: false,
1082
+ responseStream: false,
1083
+ requestSerialize: (value) => Buffer.from(exports.GetEmailVerificationStatusRequest.encode(value).finish()),
1084
+ requestDeserialize: (value) => exports.GetEmailVerificationStatusRequest.decode(value),
1085
+ responseSerialize: (value) => Buffer.from(exports.EmailVerificationStatusResponse.encode(value).finish()),
1086
+ responseDeserialize: (value) => exports.EmailVerificationStatusResponse.decode(value),
1087
+ },
938
1088
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geniebox-shared-lib",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "Shared NestJS library with gRPC clients",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",