geniebox-shared-lib 2.0.0 → 2.0.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.
Files changed (56) hide show
  1. package/README.md +636 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +4 -3
  4. package/dist/user.interface.d.ts +23 -7
  5. package/dist/user.interface.js +49 -6
  6. package/package.json +1 -1
  7. package/dist/account/account.client.d.ts +0 -11
  8. package/dist/account/account.client.js +0 -41
  9. package/dist/account/account.interface.d.ts +0 -184
  10. package/dist/account/account.interface.js +0 -625
  11. package/dist/ai/ai.client.d.ts +0 -12
  12. package/dist/ai/ai.client.js +0 -42
  13. package/dist/ai/ai.interface.d.ts +0 -138
  14. package/dist/ai/ai.interface.js +0 -532
  15. package/dist/ai/google/protobuf/empty.interface.d.ts +0 -19
  16. package/dist/ai/google/protobuf/empty.interface.js +0 -35
  17. package/dist/ai/google/protobuf/struct.interface.d.ts +0 -91
  18. package/dist/ai/google/protobuf/struct.interface.js +0 -300
  19. package/dist/auth/auth.client.d.ts +0 -11
  20. package/dist/auth/auth.client.js +0 -44
  21. package/dist/auth/auth.interface.d.ts +0 -248
  22. package/dist/auth/auth.interface.js +0 -974
  23. package/dist/auth/google/protobuf/empty.interface.d.ts +0 -19
  24. package/dist/auth/google/protobuf/empty.interface.js +0 -35
  25. package/dist/event/event.client.d.ts +0 -13
  26. package/dist/event/event.client.js +0 -48
  27. package/dist/event/event.interface.d.ts +0 -42
  28. package/dist/event/event.interface.js +0 -126
  29. package/dist/file/file.client.d.ts +0 -12
  30. package/dist/file/file.client.js +0 -42
  31. package/dist/file/file.interface.d.ts +0 -90
  32. package/dist/file/file.interface.js +0 -332
  33. package/dist/file.interface.d.ts +0 -90
  34. package/dist/file.interface.js +0 -332
  35. package/dist/key/google/protobuf/empty.interface.d.ts +0 -19
  36. package/dist/key/google/protobuf/empty.interface.js +0 -35
  37. package/dist/key/key.client.d.ts +0 -12
  38. package/dist/key/key.client.js +0 -42
  39. package/dist/key/key.interface.d.ts +0 -134
  40. package/dist/key/key.interface.js +0 -430
  41. package/dist/openai/google/protobuf/struct.interface.d.ts +0 -91
  42. package/dist/openai/google/protobuf/struct.interface.js +0 -300
  43. package/dist/openai/openai.client.d.ts +0 -12
  44. package/dist/openai/openai.client.js +0 -43
  45. package/dist/openai/openai.interface.d.ts +0 -41
  46. package/dist/openai/openai.interface.js +0 -116
  47. package/dist/user/account.interface.d.ts +0 -184
  48. package/dist/user/account.interface.js +0 -625
  49. package/dist/user/google/protobuf/empty.interface.d.ts +0 -19
  50. package/dist/user/google/protobuf/empty.interface.js +0 -35
  51. package/dist/user/google/protobuf/timestamp.interface.d.ts +0 -114
  52. package/dist/user/google/protobuf/timestamp.interface.js +0 -65
  53. package/dist/user/user.client.d.ts +0 -12
  54. package/dist/user/user.client.js +0 -42
  55. package/dist/user/user.interface.d.ts +0 -289
  56. package/dist/user/user.interface.js +0 -1264
@@ -1,35 +0,0 @@
1
- "use strict";
2
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
- // versions:
4
- // protoc-gen-ts_proto v2.7.7
5
- // protoc v5.28.2
6
- // source: google/protobuf/empty.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.Empty = exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.protobufPackage = void 0;
9
- /* eslint-disable */
10
- const wire_1 = require("@bufbuild/protobuf/wire");
11
- exports.protobufPackage = "google.protobuf";
12
- exports.GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
13
- function createBaseEmpty() {
14
- return {};
15
- }
16
- exports.Empty = {
17
- encode(_, writer = new wire_1.BinaryWriter()) {
18
- return writer;
19
- },
20
- decode(input, length) {
21
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
22
- const end = length === undefined ? reader.len : reader.pos + length;
23
- const message = createBaseEmpty();
24
- while (reader.pos < end) {
25
- const tag = reader.uint32();
26
- switch (tag >>> 3) {
27
- }
28
- if ((tag & 7) === 4 || tag === 0) {
29
- break;
30
- }
31
- reader.skip(tag & 7);
32
- }
33
- return message;
34
- },
35
- };
@@ -1,91 +0,0 @@
1
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
- export declare const protobufPackage = "google.protobuf";
3
- /**
4
- * `NullValue` is a singleton enumeration to represent the null value for the
5
- * `Value` type union.
6
- *
7
- * The JSON representation for `NullValue` is JSON `null`.
8
- */
9
- export declare enum NullValue {
10
- /** NULL_VALUE - Null value. */
11
- NULL_VALUE = 0,
12
- UNRECOGNIZED = -1
13
- }
14
- /**
15
- * `Struct` represents a structured data value, consisting of fields
16
- * which map to dynamically typed values. In some languages, `Struct`
17
- * might be supported by a native representation. For example, in
18
- * scripting languages like JS a struct is represented as an
19
- * object. The details of that representation are described together
20
- * with the proto support for the language.
21
- *
22
- * The JSON representation for `Struct` is JSON object.
23
- */
24
- export interface Struct {
25
- /** Unordered map of dynamically typed values. */
26
- fields: {
27
- [key: string]: any | undefined;
28
- };
29
- }
30
- export interface Struct_FieldsEntry {
31
- key: string;
32
- value?: any | undefined;
33
- }
34
- /**
35
- * `Value` represents a dynamically typed value which can be either
36
- * null, a number, a string, a boolean, a recursive struct value, or a
37
- * list of values. A producer of value is expected to set one of these
38
- * variants. Absence of any variant indicates an error.
39
- *
40
- * The JSON representation for `Value` is JSON value.
41
- */
42
- export interface Value {
43
- /** Represents a null value. */
44
- nullValue?: NullValue | undefined;
45
- /** Represents a double value. */
46
- numberValue?: number | undefined;
47
- /** Represents a string value. */
48
- stringValue?: string | undefined;
49
- /** Represents a boolean value. */
50
- boolValue?: boolean | undefined;
51
- /** Represents a structured value. */
52
- structValue?: {
53
- [key: string]: any;
54
- } | undefined;
55
- /** Represents a repeated `Value`. */
56
- listValue?: Array<any> | undefined;
57
- }
58
- /**
59
- * `ListValue` is a wrapper around a repeated field of values.
60
- *
61
- * The JSON representation for `ListValue` is JSON array.
62
- */
63
- export interface ListValue {
64
- /** Repeated field of dynamically typed values. */
65
- values: any[];
66
- }
67
- export declare const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
68
- export declare const Struct: MessageFns<Struct> & StructWrapperFns;
69
- export declare const Struct_FieldsEntry: MessageFns<Struct_FieldsEntry>;
70
- export declare const Value: MessageFns<Value> & AnyValueWrapperFns;
71
- export declare const ListValue: MessageFns<ListValue> & ListValueWrapperFns;
72
- export interface MessageFns<T> {
73
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
74
- decode(input: BinaryReader | Uint8Array, length?: number): T;
75
- }
76
- export interface StructWrapperFns {
77
- wrap(object: {
78
- [key: string]: any;
79
- } | undefined): Struct;
80
- unwrap(message: Struct): {
81
- [key: string]: any;
82
- };
83
- }
84
- export interface AnyValueWrapperFns {
85
- wrap(value: any): Value;
86
- unwrap(message: any): string | number | boolean | Object | null | Array<any> | undefined;
87
- }
88
- export interface ListValueWrapperFns {
89
- wrap(array: Array<any> | undefined): ListValue;
90
- unwrap(message: ListValue): Array<any>;
91
- }
@@ -1,300 +0,0 @@
1
- "use strict";
2
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
- // versions:
4
- // protoc-gen-ts_proto v2.7.7
5
- // protoc v5.28.2
6
- // source: google/protobuf/struct.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ListValue = exports.Value = exports.Struct_FieldsEntry = exports.Struct = exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.NullValue = exports.protobufPackage = void 0;
9
- /* eslint-disable */
10
- const wire_1 = require("@bufbuild/protobuf/wire");
11
- const protobufjs_1 = require("protobufjs");
12
- exports.protobufPackage = "google.protobuf";
13
- /**
14
- * `NullValue` is a singleton enumeration to represent the null value for the
15
- * `Value` type union.
16
- *
17
- * The JSON representation for `NullValue` is JSON `null`.
18
- */
19
- var NullValue;
20
- (function (NullValue) {
21
- /** NULL_VALUE - Null value. */
22
- NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE";
23
- NullValue[NullValue["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
24
- })(NullValue || (exports.NullValue = NullValue = {}));
25
- exports.GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
26
- function createBaseStruct() {
27
- return { fields: {} };
28
- }
29
- exports.Struct = {
30
- encode(message, writer = new wire_1.BinaryWriter()) {
31
- Object.entries(message.fields).forEach(([key, value]) => {
32
- if (value !== undefined) {
33
- exports.Struct_FieldsEntry.encode({ key: key, value }, writer.uint32(10).fork()).join();
34
- }
35
- });
36
- return writer;
37
- },
38
- decode(input, length) {
39
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
40
- const end = length === undefined ? reader.len : reader.pos + length;
41
- const message = createBaseStruct();
42
- while (reader.pos < end) {
43
- const tag = reader.uint32();
44
- switch (tag >>> 3) {
45
- case 1: {
46
- if (tag !== 10) {
47
- break;
48
- }
49
- const entry1 = exports.Struct_FieldsEntry.decode(reader, reader.uint32());
50
- if (entry1.value !== undefined) {
51
- message.fields[entry1.key] = entry1.value;
52
- }
53
- continue;
54
- }
55
- }
56
- if ((tag & 7) === 4 || tag === 0) {
57
- break;
58
- }
59
- reader.skip(tag & 7);
60
- }
61
- return message;
62
- },
63
- wrap(object) {
64
- const struct = createBaseStruct();
65
- if (object !== undefined) {
66
- for (const key of Object.keys(object)) {
67
- struct.fields[key] = exports.Value.wrap(object[key]);
68
- }
69
- }
70
- return struct;
71
- },
72
- unwrap(message) {
73
- const object = {};
74
- if (message.fields) {
75
- for (const key of Object.keys(message.fields)) {
76
- object[key] = exports.Value.unwrap(message.fields[key]);
77
- }
78
- }
79
- return object;
80
- },
81
- };
82
- function createBaseStruct_FieldsEntry() {
83
- return { key: "" };
84
- }
85
- exports.Struct_FieldsEntry = {
86
- encode(message, writer = new wire_1.BinaryWriter()) {
87
- if (message.key !== "") {
88
- writer.uint32(10).string(message.key);
89
- }
90
- if (message.value !== undefined) {
91
- exports.Value.encode(exports.Value.wrap(message.value), writer.uint32(18).fork()).join();
92
- }
93
- return writer;
94
- },
95
- decode(input, length) {
96
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
97
- const end = length === undefined ? reader.len : reader.pos + length;
98
- const message = createBaseStruct_FieldsEntry();
99
- while (reader.pos < end) {
100
- const tag = reader.uint32();
101
- switch (tag >>> 3) {
102
- case 1: {
103
- if (tag !== 10) {
104
- break;
105
- }
106
- message.key = reader.string();
107
- continue;
108
- }
109
- case 2: {
110
- if (tag !== 18) {
111
- break;
112
- }
113
- message.value = exports.Value.unwrap(exports.Value.decode(reader, reader.uint32()));
114
- continue;
115
- }
116
- }
117
- if ((tag & 7) === 4 || tag === 0) {
118
- break;
119
- }
120
- reader.skip(tag & 7);
121
- }
122
- return message;
123
- },
124
- };
125
- function createBaseValue() {
126
- return {};
127
- }
128
- exports.Value = {
129
- encode(message, writer = new wire_1.BinaryWriter()) {
130
- if (message.nullValue !== undefined) {
131
- writer.uint32(8).int32(message.nullValue);
132
- }
133
- if (message.numberValue !== undefined) {
134
- writer.uint32(17).double(message.numberValue);
135
- }
136
- if (message.stringValue !== undefined) {
137
- writer.uint32(26).string(message.stringValue);
138
- }
139
- if (message.boolValue !== undefined) {
140
- writer.uint32(32).bool(message.boolValue);
141
- }
142
- if (message.structValue !== undefined) {
143
- exports.Struct.encode(exports.Struct.wrap(message.structValue), writer.uint32(42).fork()).join();
144
- }
145
- if (message.listValue !== undefined) {
146
- exports.ListValue.encode(exports.ListValue.wrap(message.listValue), writer.uint32(50).fork()).join();
147
- }
148
- return writer;
149
- },
150
- decode(input, length) {
151
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
152
- const end = length === undefined ? reader.len : reader.pos + length;
153
- const message = createBaseValue();
154
- while (reader.pos < end) {
155
- const tag = reader.uint32();
156
- switch (tag >>> 3) {
157
- case 1: {
158
- if (tag !== 8) {
159
- break;
160
- }
161
- message.nullValue = reader.int32();
162
- continue;
163
- }
164
- case 2: {
165
- if (tag !== 17) {
166
- break;
167
- }
168
- message.numberValue = reader.double();
169
- continue;
170
- }
171
- case 3: {
172
- if (tag !== 26) {
173
- break;
174
- }
175
- message.stringValue = reader.string();
176
- continue;
177
- }
178
- case 4: {
179
- if (tag !== 32) {
180
- break;
181
- }
182
- message.boolValue = reader.bool();
183
- continue;
184
- }
185
- case 5: {
186
- if (tag !== 42) {
187
- break;
188
- }
189
- message.structValue = exports.Struct.unwrap(exports.Struct.decode(reader, reader.uint32()));
190
- continue;
191
- }
192
- case 6: {
193
- if (tag !== 50) {
194
- break;
195
- }
196
- message.listValue = exports.ListValue.unwrap(exports.ListValue.decode(reader, reader.uint32()));
197
- continue;
198
- }
199
- }
200
- if ((tag & 7) === 4 || tag === 0) {
201
- break;
202
- }
203
- reader.skip(tag & 7);
204
- }
205
- return message;
206
- },
207
- wrap(value) {
208
- const result = {};
209
- if (value === null) {
210
- result.nullValue = NullValue.NULL_VALUE;
211
- }
212
- else if (typeof value === "boolean") {
213
- result.boolValue = value;
214
- }
215
- else if (typeof value === "number") {
216
- result.numberValue = value;
217
- }
218
- else if (typeof value === "string") {
219
- result.stringValue = value;
220
- }
221
- else if (globalThis.Array.isArray(value)) {
222
- result.listValue = exports.ListValue.wrap(value);
223
- }
224
- else if (typeof value === "object") {
225
- result.structValue = exports.Struct.wrap(value);
226
- }
227
- else if (typeof value !== "undefined") {
228
- throw new globalThis.Error("Unsupported any value type: " + typeof value);
229
- }
230
- return result;
231
- },
232
- unwrap(message) {
233
- if (message?.hasOwnProperty("stringValue") && message.stringValue !== undefined) {
234
- return message.stringValue;
235
- }
236
- else if (message?.hasOwnProperty("numberValue") && message?.numberValue !== undefined) {
237
- return message.numberValue;
238
- }
239
- else if (message?.hasOwnProperty("boolValue") && message?.boolValue !== undefined) {
240
- return message.boolValue;
241
- }
242
- else if (message?.hasOwnProperty("structValue") && message?.structValue !== undefined) {
243
- return exports.Struct.unwrap(message.structValue);
244
- }
245
- else if (message?.hasOwnProperty("listValue") && message?.listValue !== undefined) {
246
- return exports.ListValue.unwrap(message.listValue);
247
- }
248
- else if (message?.hasOwnProperty("nullValue") && message?.nullValue !== undefined) {
249
- return null;
250
- }
251
- return undefined;
252
- },
253
- };
254
- function createBaseListValue() {
255
- return { values: [] };
256
- }
257
- exports.ListValue = {
258
- encode(message, writer = new wire_1.BinaryWriter()) {
259
- for (const v of message.values) {
260
- exports.Value.encode(exports.Value.wrap(v), writer.uint32(10).fork()).join();
261
- }
262
- return writer;
263
- },
264
- decode(input, length) {
265
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
266
- const end = length === undefined ? reader.len : reader.pos + length;
267
- const message = createBaseListValue();
268
- while (reader.pos < end) {
269
- const tag = reader.uint32();
270
- switch (tag >>> 3) {
271
- case 1: {
272
- if (tag !== 10) {
273
- break;
274
- }
275
- message.values.push(exports.Value.unwrap(exports.Value.decode(reader, reader.uint32())));
276
- continue;
277
- }
278
- }
279
- if ((tag & 7) === 4 || tag === 0) {
280
- break;
281
- }
282
- reader.skip(tag & 7);
283
- }
284
- return message;
285
- },
286
- wrap(array) {
287
- const result = createBaseListValue();
288
- result.values = (array ?? []).map(exports.Value.wrap);
289
- return result;
290
- },
291
- unwrap(message) {
292
- if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) {
293
- return message.values.map(exports.Value.unwrap);
294
- }
295
- else {
296
- return message;
297
- }
298
- },
299
- };
300
- protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: exports.Struct.wrap, toObject: exports.Struct.unwrap };
@@ -1,11 +0,0 @@
1
- import { OnModuleInit } from "@nestjs/common";
2
- import { ClientGrpc } from "@nestjs/microservices";
3
- import { AuthServiceClient } from "./auth.interface";
4
- export declare class AuthClient implements OnModuleInit {
5
- private readonly client;
6
- private readonly logger;
7
- private authClient?;
8
- constructor(client: ClientGrpc);
9
- onModuleInit(): void;
10
- get service(): AuthServiceClient;
11
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var AuthClient_1;
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.AuthClient = void 0;
17
- const common_1 = require("@nestjs/common");
18
- let AuthClient = AuthClient_1 = class AuthClient {
19
- constructor(client) {
20
- this.client = client;
21
- this.logger = new common_1.Logger(AuthClient_1.name);
22
- }
23
- onModuleInit() {
24
- this.authClient = this.client.getService("AuthService");
25
- if (!this.authClient) {
26
- this.logger.error("Failed to initialize AuthServiceClient");
27
- throw new Error("AuthServiceClient initialization failed");
28
- }
29
- this.logger.log("AuthServiceClient initialized successfully");
30
- }
31
- get service() {
32
- if (!this.authClient) {
33
- this.logger.error("Tried to access AuthService before initialization");
34
- throw new Error("AuthServiceClient not initialized yet");
35
- }
36
- return this.authClient;
37
- }
38
- };
39
- exports.AuthClient = AuthClient;
40
- exports.AuthClient = AuthClient = AuthClient_1 = __decorate([
41
- (0, common_1.Injectable)(),
42
- __param(0, (0, common_1.Inject)("AUTH_PACKAGE")),
43
- __metadata("design:paramtypes", [Object])
44
- ], AuthClient);