geniebox-shared-lib 1.0.54 → 1.0.56

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,12 @@ export interface AuthResponse {
28
28
  sessionId: string;
29
29
  tokens?: Tokens | undefined;
30
30
  }
31
+ export interface RegisterResponse {
32
+ userId: string;
33
+ sessionId: string;
34
+ tokens?: Tokens | undefined;
35
+ emailVerification: boolean;
36
+ }
31
37
  export interface UserResponse {
32
38
  uuid: string;
33
39
  firstName: string;
@@ -59,6 +65,9 @@ export interface RefreshTokenResponse {
59
65
  export interface ConfirmEmailRequest {
60
66
  token: string;
61
67
  }
68
+ export interface ConfirmEmailByCodeRequest {
69
+ token: string;
70
+ }
62
71
  export interface ConfirmEmailResponse {
63
72
  userId: string;
64
73
  emailVerified: boolean;
@@ -78,6 +87,7 @@ export declare const RegisterCredentials: MessageFns<RegisterCredentials>;
78
87
  export declare const LoginCredentials: MessageFns<LoginCredentials>;
79
88
  export declare const Tokens: MessageFns<Tokens>;
80
89
  export declare const AuthResponse: MessageFns<AuthResponse>;
90
+ export declare const RegisterResponse: MessageFns<RegisterResponse>;
81
91
  export declare const UserResponse: MessageFns<UserResponse>;
82
92
  export declare const LogoutRequest: MessageFns<LogoutRequest>;
83
93
  export declare const RecoverRequest: MessageFns<RecoverRequest>;
@@ -85,6 +95,7 @@ export declare const ResetPasswordRequest: MessageFns<ResetPasswordRequest>;
85
95
  export declare const RefreshRequest: MessageFns<RefreshRequest>;
86
96
  export declare const RefreshTokenResponse: MessageFns<RefreshTokenResponse>;
87
97
  export declare const ConfirmEmailRequest: MessageFns<ConfirmEmailRequest>;
98
+ export declare const ConfirmEmailByCodeRequest: MessageFns<ConfirmEmailByCodeRequest>;
88
99
  export declare const ConfirmEmailResponse: MessageFns<ConfirmEmailResponse>;
89
100
  export declare const CheckEmailVerifiedRequest: MessageFns<CheckEmailVerifiedRequest>;
90
101
  export declare const CheckEmailVerifiedResponse: MessageFns<CheckEmailVerifiedResponse>;
@@ -92,23 +103,25 @@ export declare const GetByIdRequest: MessageFns<GetByIdRequest>;
92
103
  export interface AuthServiceClient {
93
104
  profile(request: GetByIdRequest, metadata?: Metadata): Observable<UserResponse>;
94
105
  login(request: LoginCredentials, metadata?: Metadata): Observable<AuthResponse>;
95
- register(request: RegisterCredentials, metadata?: Metadata): Observable<AuthResponse>;
106
+ register(request: RegisterCredentials, metadata?: Metadata): Observable<RegisterResponse>;
96
107
  refresh(request: RefreshRequest, metadata?: Metadata): Observable<AuthResponse>;
97
108
  logout(request: LogoutRequest, metadata?: Metadata): Observable<Empty>;
98
109
  recover(request: RecoverRequest, metadata?: Metadata): Observable<Empty>;
99
110
  resetPassword(request: ResetPasswordRequest, metadata?: Metadata): Observable<Empty>;
100
111
  confirmEmail(request: ConfirmEmailRequest, metadata?: Metadata): Observable<ConfirmEmailResponse>;
112
+ confirmEmailByCode(request: ConfirmEmailByCodeRequest, metadata?: Metadata): Observable<ConfirmEmailResponse>;
101
113
  checkEmailVerified(request: CheckEmailVerifiedRequest, metadata?: Metadata): Observable<CheckEmailVerifiedResponse>;
102
114
  }
103
115
  export interface AuthServiceController {
104
116
  profile(request: GetByIdRequest, metadata?: Metadata): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
105
117
  login(request: LoginCredentials, metadata?: Metadata): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
106
- register(request: RegisterCredentials, metadata?: Metadata): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
118
+ register(request: RegisterCredentials, metadata?: Metadata): Promise<RegisterResponse> | Observable<RegisterResponse> | RegisterResponse;
107
119
  refresh(request: RefreshRequest, metadata?: Metadata): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
108
120
  logout(request: LogoutRequest, metadata?: Metadata): void;
109
121
  recover(request: RecoverRequest, metadata?: Metadata): void;
110
122
  resetPassword(request: ResetPasswordRequest, metadata?: Metadata): void;
111
123
  confirmEmail(request: ConfirmEmailRequest, metadata?: Metadata): Promise<ConfirmEmailResponse> | Observable<ConfirmEmailResponse> | ConfirmEmailResponse;
124
+ confirmEmailByCode(request: ConfirmEmailByCodeRequest, metadata?: Metadata): Promise<ConfirmEmailResponse> | Observable<ConfirmEmailResponse> | ConfirmEmailResponse;
112
125
  checkEmailVerified(request: CheckEmailVerifiedRequest, metadata?: Metadata): Promise<CheckEmailVerifiedResponse> | Observable<CheckEmailVerifiedResponse> | CheckEmailVerifiedResponse;
113
126
  }
114
127
  export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
@@ -139,8 +152,8 @@ export declare const AuthServiceService: {
139
152
  readonly responseStream: false;
140
153
  readonly requestSerialize: (value: RegisterCredentials) => Buffer;
141
154
  readonly requestDeserialize: (value: Buffer) => RegisterCredentials;
142
- readonly responseSerialize: (value: AuthResponse) => Buffer;
143
- readonly responseDeserialize: (value: Buffer) => AuthResponse;
155
+ readonly responseSerialize: (value: RegisterResponse) => Buffer;
156
+ readonly responseDeserialize: (value: Buffer) => RegisterResponse;
144
157
  };
145
158
  readonly refresh: {
146
159
  readonly path: "/auth.AuthService/refresh";
@@ -187,6 +200,15 @@ export declare const AuthServiceService: {
187
200
  readonly responseSerialize: (value: ConfirmEmailResponse) => Buffer;
188
201
  readonly responseDeserialize: (value: Buffer) => ConfirmEmailResponse;
189
202
  };
203
+ readonly confirmEmailByCode: {
204
+ readonly path: "/auth.AuthService/confirmEmailByCode";
205
+ readonly requestStream: false;
206
+ readonly responseStream: false;
207
+ readonly requestSerialize: (value: ConfirmEmailByCodeRequest) => Buffer;
208
+ readonly requestDeserialize: (value: Buffer) => ConfirmEmailByCodeRequest;
209
+ readonly responseSerialize: (value: ConfirmEmailResponse) => Buffer;
210
+ readonly responseDeserialize: (value: Buffer) => ConfirmEmailResponse;
211
+ };
190
212
  readonly checkEmailVerified: {
191
213
  readonly path: "/auth.AuthService/checkEmailVerified";
192
214
  readonly requestStream: false;
@@ -200,12 +222,13 @@ export declare const AuthServiceService: {
200
222
  export interface AuthServiceServer extends UntypedServiceImplementation {
201
223
  profile: handleUnaryCall<GetByIdRequest, UserResponse>;
202
224
  login: handleUnaryCall<LoginCredentials, AuthResponse>;
203
- register: handleUnaryCall<RegisterCredentials, AuthResponse>;
225
+ register: handleUnaryCall<RegisterCredentials, RegisterResponse>;
204
226
  refresh: handleUnaryCall<RefreshRequest, AuthResponse>;
205
227
  logout: handleUnaryCall<LogoutRequest, Empty>;
206
228
  recover: handleUnaryCall<RecoverRequest, Empty>;
207
229
  resetPassword: handleUnaryCall<ResetPasswordRequest, Empty>;
208
230
  confirmEmail: handleUnaryCall<ConfirmEmailRequest, ConfirmEmailResponse>;
231
+ confirmEmailByCode: handleUnaryCall<ConfirmEmailByCodeRequest, ConfirmEmailResponse>;
209
232
  checkEmailVerified: handleUnaryCall<CheckEmailVerifiedRequest, CheckEmailVerifiedResponse>;
210
233
  }
211
234
  export interface MessageFns<T> {
@@ -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.GetByIdRequest = 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;
8
+ exports.AuthServiceService = exports.AUTH_SERVICE_NAME = exports.GetByIdRequest = exports.CheckEmailVerifiedResponse = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailResponse = exports.ConfirmEmailByCodeRequest = exports.ConfirmEmailRequest = exports.RefreshTokenResponse = exports.RefreshRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.LogoutRequest = exports.UserResponse = exports.RegisterResponse = 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");
@@ -275,6 +275,69 @@ exports.AuthResponse = {
275
275
  return message;
276
276
  },
277
277
  };
278
+ function createBaseRegisterResponse() {
279
+ return { userId: "", sessionId: "", emailVerification: false };
280
+ }
281
+ exports.RegisterResponse = {
282
+ encode(message, writer = new wire_1.BinaryWriter()) {
283
+ if (message.userId !== "") {
284
+ writer.uint32(10).string(message.userId);
285
+ }
286
+ if (message.sessionId !== "") {
287
+ writer.uint32(18).string(message.sessionId);
288
+ }
289
+ if (message.tokens !== undefined) {
290
+ exports.Tokens.encode(message.tokens, writer.uint32(26).fork()).join();
291
+ }
292
+ if (message.emailVerification !== false) {
293
+ writer.uint32(32).bool(message.emailVerification);
294
+ }
295
+ return writer;
296
+ },
297
+ decode(input, length) {
298
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
299
+ const end = length === undefined ? reader.len : reader.pos + length;
300
+ const message = createBaseRegisterResponse();
301
+ while (reader.pos < end) {
302
+ const tag = reader.uint32();
303
+ switch (tag >>> 3) {
304
+ case 1: {
305
+ if (tag !== 10) {
306
+ break;
307
+ }
308
+ message.userId = reader.string();
309
+ continue;
310
+ }
311
+ case 2: {
312
+ if (tag !== 18) {
313
+ break;
314
+ }
315
+ message.sessionId = reader.string();
316
+ continue;
317
+ }
318
+ case 3: {
319
+ if (tag !== 26) {
320
+ break;
321
+ }
322
+ message.tokens = exports.Tokens.decode(reader, reader.uint32());
323
+ continue;
324
+ }
325
+ case 4: {
326
+ if (tag !== 32) {
327
+ break;
328
+ }
329
+ message.emailVerification = reader.bool();
330
+ continue;
331
+ }
332
+ }
333
+ if ((tag & 7) === 4 || tag === 0) {
334
+ break;
335
+ }
336
+ reader.skip(tag & 7);
337
+ }
338
+ return message;
339
+ },
340
+ };
278
341
  function createBaseUserResponse() {
279
342
  return { uuid: "", firstName: "", lastName: "", email: "", phoneNumber: "", photoUrl: "", birthday: "", gender: "" };
280
343
  }
@@ -606,6 +669,39 @@ exports.ConfirmEmailRequest = {
606
669
  return message;
607
670
  },
608
671
  };
672
+ function createBaseConfirmEmailByCodeRequest() {
673
+ return { token: "" };
674
+ }
675
+ exports.ConfirmEmailByCodeRequest = {
676
+ encode(message, writer = new wire_1.BinaryWriter()) {
677
+ if (message.token !== "") {
678
+ writer.uint32(10).string(message.token);
679
+ }
680
+ return writer;
681
+ },
682
+ decode(input, length) {
683
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
684
+ const end = length === undefined ? reader.len : reader.pos + length;
685
+ const message = createBaseConfirmEmailByCodeRequest();
686
+ while (reader.pos < end) {
687
+ const tag = reader.uint32();
688
+ switch (tag >>> 3) {
689
+ case 1: {
690
+ if (tag !== 10) {
691
+ break;
692
+ }
693
+ message.token = reader.string();
694
+ continue;
695
+ }
696
+ }
697
+ if ((tag & 7) === 4 || tag === 0) {
698
+ break;
699
+ }
700
+ reader.skip(tag & 7);
701
+ }
702
+ return message;
703
+ },
704
+ };
609
705
  function createBaseConfirmEmailResponse() {
610
706
  return { userId: "", emailVerified: false };
611
707
  }
@@ -769,6 +865,7 @@ function AuthServiceControllerMethods() {
769
865
  "recover",
770
866
  "resetPassword",
771
867
  "confirmEmail",
868
+ "confirmEmailByCode",
772
869
  "checkEmailVerified",
773
870
  ];
774
871
  for (const method of grpcMethods) {
@@ -808,8 +905,8 @@ exports.AuthServiceService = {
808
905
  responseStream: false,
809
906
  requestSerialize: (value) => Buffer.from(exports.RegisterCredentials.encode(value).finish()),
810
907
  requestDeserialize: (value) => exports.RegisterCredentials.decode(value),
811
- responseSerialize: (value) => Buffer.from(exports.AuthResponse.encode(value).finish()),
812
- responseDeserialize: (value) => exports.AuthResponse.decode(value),
908
+ responseSerialize: (value) => Buffer.from(exports.RegisterResponse.encode(value).finish()),
909
+ responseDeserialize: (value) => exports.RegisterResponse.decode(value),
813
910
  },
814
911
  refresh: {
815
912
  path: "/auth.AuthService/refresh",
@@ -856,6 +953,15 @@ exports.AuthServiceService = {
856
953
  responseSerialize: (value) => Buffer.from(exports.ConfirmEmailResponse.encode(value).finish()),
857
954
  responseDeserialize: (value) => exports.ConfirmEmailResponse.decode(value),
858
955
  },
956
+ confirmEmailByCode: {
957
+ path: "/auth.AuthService/confirmEmailByCode",
958
+ requestStream: false,
959
+ responseStream: false,
960
+ requestSerialize: (value) => Buffer.from(exports.ConfirmEmailByCodeRequest.encode(value).finish()),
961
+ requestDeserialize: (value) => exports.ConfirmEmailByCodeRequest.decode(value),
962
+ responseSerialize: (value) => Buffer.from(exports.ConfirmEmailResponse.encode(value).finish()),
963
+ responseDeserialize: (value) => exports.ConfirmEmailResponse.decode(value),
964
+ },
859
965
  checkEmailVerified: {
860
966
  path: "/auth.AuthService/checkEmailVerified",
861
967
  requestStream: false,
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { AIClient } from "./ai/ai.client";
5
5
  export { OpenAIClient } from "./openai/openai.client";
6
6
  export { FileClient } from "./file/file.client";
7
7
  export { MessageFns as UserMessageFns, protobufPackage as UserProtobufPackage, User, CreateUserRequest, CreateUserPersonal, UpdateUserRequest, GetByIdRequest, UserResponse, UsersResponse, FindByEmailRequest, FindByPhoneRequest, UpdateUserPersonal, UpdatePasswordRequest, UpdateEmailVerificationRequest, ResetPasswordData, GetEmailVerificationStatusRequest, EmailVerificationStatusResponse, UserServiceService as UserService, } from "./user/user.interface";
8
- export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage, LoginCredentials, RegisterCredentials, LogoutRequest, RefreshRequest, AuthResponse, RefreshTokenResponse, RecoverRequest, ResetPasswordRequest, ConfirmEmailRequest, ConfirmEmailResponse, CheckEmailVerifiedRequest, CheckEmailVerifiedResponse, } from "./auth/auth.interface";
8
+ export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage, LoginCredentials, RegisterCredentials, LogoutRequest, RefreshRequest, AuthResponse, RegisterResponse, RefreshTokenResponse, RecoverRequest, ResetPasswordRequest, ConfirmEmailRequest, ConfirmEmailByCodeRequest, ConfirmEmailResponse, CheckEmailVerifiedRequest, CheckEmailVerifiedResponse, } from "./auth/auth.interface";
9
9
  export { MessageFns as AIMessageFns, protobufPackage as AIProtobufPackage, AIRequest, AIResponse, AIServiceService as AIService, } from "./ai/ai.interface";
10
10
  export { MessageFns as OpenAIMessageFns, protobufPackage as OpenAIProtobufPackage, CreateRequest as OpenAICreateRequest, CreateResponse as OpenAICreateResponse, OpenAIServiceService as OpenAIService, } from "./openai/openai.interface";
11
11
  export { UploadRequest, UploadResponse, DownloadRequest, DownloadResponse, DeleteRequest, DeleteResponse, FileServiceService as FileService, protobufPackage as FileProtobufPackage, } from "./file/file.interface";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeleteResponse = exports.DeleteRequest = exports.DownloadResponse = exports.DownloadRequest = exports.UploadResponse = exports.UploadRequest = exports.OpenAIService = exports.OpenAICreateResponse = exports.OpenAICreateRequest = exports.OpenAIProtobufPackage = exports.AIService = exports.AIResponse = exports.AIRequest = exports.AIProtobufPackage = 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.ResetPasswordData = exports.UpdateEmailVerificationRequest = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.UsersResponse = exports.UserResponse = exports.GetByIdRequest = exports.UpdateUserRequest = exports.CreateUserPersonal = exports.CreateUserRequest = exports.User = exports.UserProtobufPackage = exports.FileClient = exports.OpenAIClient = exports.AIClient = exports.AuthClient = exports.UsersClient = exports.SharedModule = void 0;
4
- exports.FileProtobufPackage = exports.FileService = void 0;
3
+ exports.DownloadResponse = exports.DownloadRequest = exports.UploadResponse = exports.UploadRequest = exports.OpenAIService = exports.OpenAICreateResponse = exports.OpenAICreateRequest = exports.OpenAIProtobufPackage = exports.AIService = exports.AIResponse = exports.AIRequest = exports.AIProtobufPackage = exports.CheckEmailVerifiedResponse = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailResponse = exports.ConfirmEmailByCodeRequest = exports.ConfirmEmailRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.RefreshTokenResponse = exports.RegisterResponse = exports.AuthResponse = exports.RefreshRequest = exports.LogoutRequest = exports.RegisterCredentials = exports.LoginCredentials = exports.AuthProtobufPackage = exports.UserService = exports.EmailVerificationStatusResponse = exports.GetEmailVerificationStatusRequest = exports.ResetPasswordData = exports.UpdateEmailVerificationRequest = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.UsersResponse = exports.UserResponse = exports.GetByIdRequest = exports.UpdateUserRequest = exports.CreateUserPersonal = exports.CreateUserRequest = exports.User = exports.UserProtobufPackage = exports.FileClient = exports.OpenAIClient = exports.AIClient = exports.AuthClient = exports.UsersClient = exports.SharedModule = void 0;
4
+ exports.FileProtobufPackage = exports.FileService = exports.DeleteResponse = exports.DeleteRequest = void 0;
5
5
  var shared_module_1 = require("./shared.module");
6
6
  Object.defineProperty(exports, "SharedModule", { enumerable: true, get: function () { return shared_module_1.SharedModule; } });
7
7
  var user_client_1 = require("./user/user.client");
@@ -45,10 +45,12 @@ Object.defineProperty(exports, "RegisterCredentials", { enumerable: true, get: f
45
45
  Object.defineProperty(exports, "LogoutRequest", { enumerable: true, get: function () { return auth_interface_1.LogoutRequest; } });
46
46
  Object.defineProperty(exports, "RefreshRequest", { enumerable: true, get: function () { return auth_interface_1.RefreshRequest; } });
47
47
  Object.defineProperty(exports, "AuthResponse", { enumerable: true, get: function () { return auth_interface_1.AuthResponse; } });
48
+ Object.defineProperty(exports, "RegisterResponse", { enumerable: true, get: function () { return auth_interface_1.RegisterResponse; } });
48
49
  Object.defineProperty(exports, "RefreshTokenResponse", { enumerable: true, get: function () { return auth_interface_1.RefreshTokenResponse; } });
49
50
  Object.defineProperty(exports, "RecoverRequest", { enumerable: true, get: function () { return auth_interface_1.RecoverRequest; } });
50
51
  Object.defineProperty(exports, "ResetPasswordRequest", { enumerable: true, get: function () { return auth_interface_1.ResetPasswordRequest; } });
51
52
  Object.defineProperty(exports, "ConfirmEmailRequest", { enumerable: true, get: function () { return auth_interface_1.ConfirmEmailRequest; } });
53
+ Object.defineProperty(exports, "ConfirmEmailByCodeRequest", { enumerable: true, get: function () { return auth_interface_1.ConfirmEmailByCodeRequest; } });
52
54
  Object.defineProperty(exports, "ConfirmEmailResponse", { enumerable: true, get: function () { return auth_interface_1.ConfirmEmailResponse; } });
53
55
  Object.defineProperty(exports, "CheckEmailVerifiedRequest", { enumerable: true, get: function () { return auth_interface_1.CheckEmailVerifiedRequest; } });
54
56
  Object.defineProperty(exports, "CheckEmailVerifiedResponse", { enumerable: true, get: function () { return auth_interface_1.CheckEmailVerifiedResponse; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geniebox-shared-lib",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "description": "Shared NestJS library with gRPC clients",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",