geniebox-shared-lib 1.0.74 → 2.0.0

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.
Files changed (39) hide show
  1. package/dist/ai/ai.interface.d.ts +1 -1
  2. package/dist/ai/ai.interface.js +7 -1
  3. package/dist/ai.client.d.ts +12 -0
  4. package/dist/ai.client.js +42 -0
  5. package/dist/ai.interface.d.ts +133 -0
  6. package/dist/ai.interface.js +526 -0
  7. package/dist/auth.client.d.ts +11 -0
  8. package/dist/auth.client.js +44 -0
  9. package/dist/auth.interface.d.ts +248 -0
  10. package/dist/auth.interface.js +974 -0
  11. package/dist/event.client.d.ts +13 -0
  12. package/dist/event.client.js +48 -0
  13. package/dist/event.interface.d.ts +42 -0
  14. package/dist/event.interface.js +126 -0
  15. package/dist/file.interface.d.ts +90 -0
  16. package/dist/file.interface.js +332 -0
  17. package/dist/google/protobuf/empty.interface.d.ts +19 -0
  18. package/dist/google/protobuf/empty.interface.js +35 -0
  19. package/dist/index.d.ts +14 -14
  20. package/dist/index.js +25 -25
  21. package/dist/key.client.d.ts +12 -0
  22. package/dist/key.client.js +42 -0
  23. package/dist/key.interface.d.ts +134 -0
  24. package/dist/key.interface.js +430 -0
  25. package/dist/openai.client.d.ts +12 -0
  26. package/dist/openai.client.js +43 -0
  27. package/dist/openai.interface.d.ts +41 -0
  28. package/dist/openai.interface.js +116 -0
  29. package/dist/shared.module.d.ts +1 -1
  30. package/dist/shared.module.js +19 -19
  31. package/dist/storage.client.d.ts +12 -0
  32. package/dist/storage.client.js +43 -0
  33. package/dist/storage.interface.d.ts +90 -0
  34. package/dist/storage.interface.js +332 -0
  35. package/dist/user.client.d.ts +12 -0
  36. package/dist/user.client.js +42 -0
  37. package/dist/user.interface.d.ts +289 -0
  38. package/dist/user.interface.js +1264 -0
  39. package/package.json +2 -9
@@ -0,0 +1,289 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import type { handleUnaryCall, Metadata, UntypedServiceImplementation } from "@grpc/grpc-js";
3
+ import { Observable } from "rxjs";
4
+ import { Empty } from "./google/protobuf/empty.interface";
5
+ export declare const protobufPackage = "user";
6
+ export interface UserPersonal {
7
+ uuid: string;
8
+ userId: string;
9
+ photoUrl: string;
10
+ firstName: string;
11
+ lastName: string;
12
+ birthday: string;
13
+ /** "male" | "female" */
14
+ gender: string;
15
+ email: string;
16
+ emailVerified: boolean;
17
+ phoneNumber: string;
18
+ createdAt: string;
19
+ updatedAt: string;
20
+ }
21
+ export interface UserAuthentication {
22
+ uuid: string;
23
+ userId: string;
24
+ password?: string | undefined;
25
+ passwordHash: string;
26
+ }
27
+ export interface User {
28
+ uuid: string;
29
+ personal?: UserPersonal | undefined;
30
+ authentication?: UserAuthentication | undefined;
31
+ }
32
+ export interface CreateUserPersonal {
33
+ photoUrl?: string | undefined;
34
+ firstName: string;
35
+ lastName?: string | undefined;
36
+ birthday?: string | undefined;
37
+ /** "male" | "female" */
38
+ gender?: string | undefined;
39
+ email?: string | undefined;
40
+ phoneNumber?: string | undefined;
41
+ }
42
+ export interface CreateUserAuthentication {
43
+ password?: string | undefined;
44
+ }
45
+ export interface CreateUserRequest {
46
+ personal?: CreateUserPersonal | undefined;
47
+ authentication?: CreateUserAuthentication | undefined;
48
+ }
49
+ export interface GetByIdRequest {
50
+ uuid: string;
51
+ }
52
+ export interface FindByEmailRequest {
53
+ email: string;
54
+ }
55
+ export interface FindByPhoneRequest {
56
+ phoneNumber: string;
57
+ }
58
+ export interface UpdateUserRequest {
59
+ uuid: string;
60
+ personal?: UpdateUserPersonal | undefined;
61
+ authentication?: UserAuthentication | undefined;
62
+ }
63
+ export interface UpdateUserPersonal {
64
+ uuid?: string | undefined;
65
+ photoUrl?: string | undefined;
66
+ firstName: string;
67
+ lastName?: string | undefined;
68
+ birthday?: string | undefined;
69
+ gender?: string | undefined;
70
+ email?: string | undefined;
71
+ phoneNumber?: string | undefined;
72
+ }
73
+ export interface UpdatePasswordRequest {
74
+ uuid?: string | undefined;
75
+ oldPassword: string;
76
+ newPassword: string;
77
+ }
78
+ export interface ResetPasswordData {
79
+ uuid: string;
80
+ password: string;
81
+ }
82
+ export interface RemoveUserRequest {
83
+ uuid: string;
84
+ }
85
+ export interface UpdateEmailVerificationRequest {
86
+ userId: string;
87
+ verified: boolean;
88
+ }
89
+ export interface GetEmailVerificationStatusRequest {
90
+ uuid: string;
91
+ }
92
+ export interface UserResponse {
93
+ uuid: string;
94
+ photoUrl: string;
95
+ firstName: string;
96
+ lastName: string;
97
+ birthday: string;
98
+ gender: string;
99
+ phoneNumber: string;
100
+ email: string;
101
+ createdAt: string;
102
+ updatedAt: string;
103
+ }
104
+ export interface UsersResponse {
105
+ users: UserResponse[];
106
+ }
107
+ export interface EmailVerificationStatusResponse {
108
+ userId: string;
109
+ emailVerified: boolean;
110
+ }
111
+ export declare const USER_PACKAGE_NAME = "user";
112
+ export declare const UserPersonal: MessageFns<UserPersonal>;
113
+ export declare const UserAuthentication: MessageFns<UserAuthentication>;
114
+ export declare const User: MessageFns<User>;
115
+ export declare const CreateUserPersonal: MessageFns<CreateUserPersonal>;
116
+ export declare const CreateUserAuthentication: MessageFns<CreateUserAuthentication>;
117
+ export declare const CreateUserRequest: MessageFns<CreateUserRequest>;
118
+ export declare const GetByIdRequest: MessageFns<GetByIdRequest>;
119
+ export declare const FindByEmailRequest: MessageFns<FindByEmailRequest>;
120
+ export declare const FindByPhoneRequest: MessageFns<FindByPhoneRequest>;
121
+ export declare const UpdateUserRequest: MessageFns<UpdateUserRequest>;
122
+ export declare const UpdateUserPersonal: MessageFns<UpdateUserPersonal>;
123
+ export declare const UpdatePasswordRequest: MessageFns<UpdatePasswordRequest>;
124
+ export declare const ResetPasswordData: MessageFns<ResetPasswordData>;
125
+ export declare const RemoveUserRequest: MessageFns<RemoveUserRequest>;
126
+ export declare const UpdateEmailVerificationRequest: MessageFns<UpdateEmailVerificationRequest>;
127
+ export declare const GetEmailVerificationStatusRequest: MessageFns<GetEmailVerificationStatusRequest>;
128
+ export declare const UserResponse: MessageFns<UserResponse>;
129
+ export declare const UsersResponse: MessageFns<UsersResponse>;
130
+ export declare const EmailVerificationStatusResponse: MessageFns<EmailVerificationStatusResponse>;
131
+ export interface UserServiceClient {
132
+ create(request: CreateUserRequest, metadata?: Metadata): Observable<UserResponse>;
133
+ findOne(request: GetByIdRequest, metadata?: Metadata): Observable<UserResponse>;
134
+ findByEmail(request: FindByEmailRequest, metadata?: Metadata): Observable<User>;
135
+ findByPhone(request: FindByPhoneRequest, metadata?: Metadata): Observable<User>;
136
+ findAll(request: Empty, metadata?: Metadata): Observable<UsersResponse>;
137
+ update(request: UpdateUserRequest, metadata?: Metadata): Observable<UserResponse>;
138
+ updatePersonal(request: UpdateUserPersonal, metadata?: Metadata): Observable<UserResponse>;
139
+ updatePassword(request: UpdatePasswordRequest, metadata?: Metadata): Observable<Empty>;
140
+ resetPassword(request: ResetPasswordData, metadata?: Metadata): Observable<Empty>;
141
+ remove(request: RemoveUserRequest, metadata?: Metadata): Observable<Empty>;
142
+ updateEmailVerification(request: UpdateEmailVerificationRequest, metadata?: Metadata): Observable<EmailVerificationStatusResponse>;
143
+ getEmailVerificationStatus(request: GetEmailVerificationStatusRequest, metadata?: Metadata): Observable<EmailVerificationStatusResponse>;
144
+ }
145
+ export interface UserServiceController {
146
+ create(request: CreateUserRequest, metadata?: Metadata): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
147
+ findOne(request: GetByIdRequest, metadata?: Metadata): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
148
+ findByEmail(request: FindByEmailRequest, metadata?: Metadata): Promise<User> | Observable<User> | User;
149
+ findByPhone(request: FindByPhoneRequest, metadata?: Metadata): Promise<User> | Observable<User> | User;
150
+ findAll(request: Empty, metadata?: Metadata): Promise<UsersResponse> | Observable<UsersResponse> | UsersResponse;
151
+ update(request: UpdateUserRequest, metadata?: Metadata): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
152
+ updatePersonal(request: UpdateUserPersonal, metadata?: Metadata): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
153
+ updatePassword(request: UpdatePasswordRequest, metadata?: Metadata): void;
154
+ resetPassword(request: ResetPasswordData, metadata?: Metadata): void;
155
+ remove(request: RemoveUserRequest, metadata?: Metadata): void;
156
+ updateEmailVerification(request: UpdateEmailVerificationRequest, metadata?: Metadata): Promise<EmailVerificationStatusResponse> | Observable<EmailVerificationStatusResponse> | EmailVerificationStatusResponse;
157
+ getEmailVerificationStatus(request: GetEmailVerificationStatusRequest, metadata?: Metadata): Promise<EmailVerificationStatusResponse> | Observable<EmailVerificationStatusResponse> | EmailVerificationStatusResponse;
158
+ }
159
+ export declare function UserServiceControllerMethods(): (constructor: Function) => void;
160
+ export declare const USER_SERVICE_NAME = "UserService";
161
+ export type UserServiceService = typeof UserServiceService;
162
+ export declare const UserServiceService: {
163
+ readonly create: {
164
+ readonly path: "/user.UserService/create";
165
+ readonly requestStream: false;
166
+ readonly responseStream: false;
167
+ readonly requestSerialize: (value: CreateUserRequest) => Buffer;
168
+ readonly requestDeserialize: (value: Buffer) => CreateUserRequest;
169
+ readonly responseSerialize: (value: UserResponse) => Buffer;
170
+ readonly responseDeserialize: (value: Buffer) => UserResponse;
171
+ };
172
+ readonly findOne: {
173
+ readonly path: "/user.UserService/findOne";
174
+ readonly requestStream: false;
175
+ readonly responseStream: false;
176
+ readonly requestSerialize: (value: GetByIdRequest) => Buffer;
177
+ readonly requestDeserialize: (value: Buffer) => GetByIdRequest;
178
+ readonly responseSerialize: (value: UserResponse) => Buffer;
179
+ readonly responseDeserialize: (value: Buffer) => UserResponse;
180
+ };
181
+ readonly findByEmail: {
182
+ readonly path: "/user.UserService/findByEmail";
183
+ readonly requestStream: false;
184
+ readonly responseStream: false;
185
+ readonly requestSerialize: (value: FindByEmailRequest) => Buffer;
186
+ readonly requestDeserialize: (value: Buffer) => FindByEmailRequest;
187
+ readonly responseSerialize: (value: User) => Buffer;
188
+ readonly responseDeserialize: (value: Buffer) => User;
189
+ };
190
+ readonly findByPhone: {
191
+ readonly path: "/user.UserService/findByPhone";
192
+ readonly requestStream: false;
193
+ readonly responseStream: false;
194
+ readonly requestSerialize: (value: FindByPhoneRequest) => Buffer;
195
+ readonly requestDeserialize: (value: Buffer) => FindByPhoneRequest;
196
+ readonly responseSerialize: (value: User) => Buffer;
197
+ readonly responseDeserialize: (value: Buffer) => User;
198
+ };
199
+ readonly findAll: {
200
+ readonly path: "/user.UserService/findAll";
201
+ readonly requestStream: false;
202
+ readonly responseStream: false;
203
+ readonly requestSerialize: (value: Empty) => Buffer;
204
+ readonly requestDeserialize: (value: Buffer) => Empty;
205
+ readonly responseSerialize: (value: UsersResponse) => Buffer;
206
+ readonly responseDeserialize: (value: Buffer) => UsersResponse;
207
+ };
208
+ readonly update: {
209
+ readonly path: "/user.UserService/update";
210
+ readonly requestStream: false;
211
+ readonly responseStream: false;
212
+ readonly requestSerialize: (value: UpdateUserRequest) => Buffer;
213
+ readonly requestDeserialize: (value: Buffer) => UpdateUserRequest;
214
+ readonly responseSerialize: (value: UserResponse) => Buffer;
215
+ readonly responseDeserialize: (value: Buffer) => UserResponse;
216
+ };
217
+ readonly updatePersonal: {
218
+ readonly path: "/user.UserService/updatePersonal";
219
+ readonly requestStream: false;
220
+ readonly responseStream: false;
221
+ readonly requestSerialize: (value: UpdateUserPersonal) => Buffer;
222
+ readonly requestDeserialize: (value: Buffer) => UpdateUserPersonal;
223
+ readonly responseSerialize: (value: UserResponse) => Buffer;
224
+ readonly responseDeserialize: (value: Buffer) => UserResponse;
225
+ };
226
+ readonly updatePassword: {
227
+ readonly path: "/user.UserService/updatePassword";
228
+ readonly requestStream: false;
229
+ readonly responseStream: false;
230
+ readonly requestSerialize: (value: UpdatePasswordRequest) => Buffer;
231
+ readonly requestDeserialize: (value: Buffer) => UpdatePasswordRequest;
232
+ readonly responseSerialize: (value: Empty) => Buffer;
233
+ readonly responseDeserialize: (value: Buffer) => Empty;
234
+ };
235
+ readonly resetPassword: {
236
+ readonly path: "/user.UserService/resetPassword";
237
+ readonly requestStream: false;
238
+ readonly responseStream: false;
239
+ readonly requestSerialize: (value: ResetPasswordData) => Buffer;
240
+ readonly requestDeserialize: (value: Buffer) => ResetPasswordData;
241
+ readonly responseSerialize: (value: Empty) => Buffer;
242
+ readonly responseDeserialize: (value: Buffer) => Empty;
243
+ };
244
+ readonly remove: {
245
+ readonly path: "/user.UserService/remove";
246
+ readonly requestStream: false;
247
+ readonly responseStream: false;
248
+ readonly requestSerialize: (value: RemoveUserRequest) => Buffer;
249
+ readonly requestDeserialize: (value: Buffer) => RemoveUserRequest;
250
+ readonly responseSerialize: (value: Empty) => Buffer;
251
+ readonly responseDeserialize: (value: Buffer) => Empty;
252
+ };
253
+ readonly updateEmailVerification: {
254
+ readonly path: "/user.UserService/updateEmailVerification";
255
+ readonly requestStream: false;
256
+ readonly responseStream: false;
257
+ readonly requestSerialize: (value: UpdateEmailVerificationRequest) => Buffer;
258
+ readonly requestDeserialize: (value: Buffer) => UpdateEmailVerificationRequest;
259
+ readonly responseSerialize: (value: EmailVerificationStatusResponse) => Buffer;
260
+ readonly responseDeserialize: (value: Buffer) => EmailVerificationStatusResponse;
261
+ };
262
+ readonly getEmailVerificationStatus: {
263
+ readonly path: "/user.UserService/getEmailVerificationStatus";
264
+ readonly requestStream: false;
265
+ readonly responseStream: false;
266
+ readonly requestSerialize: (value: GetEmailVerificationStatusRequest) => Buffer;
267
+ readonly requestDeserialize: (value: Buffer) => GetEmailVerificationStatusRequest;
268
+ readonly responseSerialize: (value: EmailVerificationStatusResponse) => Buffer;
269
+ readonly responseDeserialize: (value: Buffer) => EmailVerificationStatusResponse;
270
+ };
271
+ };
272
+ export interface UserServiceServer extends UntypedServiceImplementation {
273
+ create: handleUnaryCall<CreateUserRequest, UserResponse>;
274
+ findOne: handleUnaryCall<GetByIdRequest, UserResponse>;
275
+ findByEmail: handleUnaryCall<FindByEmailRequest, User>;
276
+ findByPhone: handleUnaryCall<FindByPhoneRequest, User>;
277
+ findAll: handleUnaryCall<Empty, UsersResponse>;
278
+ update: handleUnaryCall<UpdateUserRequest, UserResponse>;
279
+ updatePersonal: handleUnaryCall<UpdateUserPersonal, UserResponse>;
280
+ updatePassword: handleUnaryCall<UpdatePasswordRequest, Empty>;
281
+ resetPassword: handleUnaryCall<ResetPasswordData, Empty>;
282
+ remove: handleUnaryCall<RemoveUserRequest, Empty>;
283
+ updateEmailVerification: handleUnaryCall<UpdateEmailVerificationRequest, EmailVerificationStatusResponse>;
284
+ getEmailVerificationStatus: handleUnaryCall<GetEmailVerificationStatusRequest, EmailVerificationStatusResponse>;
285
+ }
286
+ export interface MessageFns<T> {
287
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
288
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
289
+ }