geniebox-shared-lib 1.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.
- package/README.md +0 -0
- package/dist/account/account.client.d.ts +11 -0
- package/dist/account/account.client.js +41 -0
- package/dist/account/account.interface.d.ts +184 -0
- package/dist/account/account.interface.js +625 -0
- package/dist/auth/auth.client.d.ts +11 -0
- package/dist/auth/auth.client.js +40 -0
- package/dist/auth/auth.interface.d.ts +90 -0
- package/dist/auth/auth.interface.js +486 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +19 -0
- package/dist/shared.module.d.ts +18 -0
- package/dist/shared.module.js +52 -0
- package/dist/user/account.interface.d.ts +184 -0
- package/dist/user/account.interface.js +625 -0
- package/dist/user/google/protobuf/empty.interface.d.ts +19 -0
- package/dist/user/google/protobuf/empty.interface.js +35 -0
- package/dist/user/google/protobuf/timestamp.interface.d.ts +114 -0
- package/dist/user/google/protobuf/timestamp.interface.js +65 -0
- package/dist/user/user.client.d.ts +11 -0
- package/dist/user/user.client.js +40 -0
- package/dist/user/user.interface.d.ts +145 -0
- package/dist/user/user.interface.js +658 -0
- package/package.json +35 -0
|
@@ -0,0 +1,625 @@
|
|
|
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: account.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.AccountServiceService = exports.ACCOUNT_SERVICE_NAME = exports.Empty = exports.AccountResponse = exports.DeleteAccountRequest = exports.UpdateAccountRequest = exports.GetAccountWithUsersRequest = exports.GetAccountRequest = exports.AddUserRequest = exports.CreateAccountWithUsersRequest = exports.CreateAccountRequest = exports.Account = exports.User = exports.ACCOUNT_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.AccountServiceControllerMethods = AccountServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
12
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
13
|
+
exports.protobufPackage = "account";
|
|
14
|
+
exports.ACCOUNT_PACKAGE_NAME = "account";
|
|
15
|
+
function createBaseUser() {
|
|
16
|
+
return { uuid: "", firstName: "", lastName: "", email: "", phoneNumber: "", photoUrl: "", gender: "", birthday: "" };
|
|
17
|
+
}
|
|
18
|
+
exports.User = {
|
|
19
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
20
|
+
if (message.uuid !== "") {
|
|
21
|
+
writer.uint32(10).string(message.uuid);
|
|
22
|
+
}
|
|
23
|
+
if (message.firstName !== "") {
|
|
24
|
+
writer.uint32(18).string(message.firstName);
|
|
25
|
+
}
|
|
26
|
+
if (message.lastName !== "") {
|
|
27
|
+
writer.uint32(26).string(message.lastName);
|
|
28
|
+
}
|
|
29
|
+
if (message.email !== "") {
|
|
30
|
+
writer.uint32(34).string(message.email);
|
|
31
|
+
}
|
|
32
|
+
if (message.phoneNumber !== "") {
|
|
33
|
+
writer.uint32(42).string(message.phoneNumber);
|
|
34
|
+
}
|
|
35
|
+
if (message.photoUrl !== "") {
|
|
36
|
+
writer.uint32(50).string(message.photoUrl);
|
|
37
|
+
}
|
|
38
|
+
if (message.gender !== "") {
|
|
39
|
+
writer.uint32(58).string(message.gender);
|
|
40
|
+
}
|
|
41
|
+
if (message.birthday !== "") {
|
|
42
|
+
writer.uint32(66).string(message.birthday);
|
|
43
|
+
}
|
|
44
|
+
return writer;
|
|
45
|
+
},
|
|
46
|
+
decode(input, length) {
|
|
47
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
48
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
49
|
+
const message = createBaseUser();
|
|
50
|
+
while (reader.pos < end) {
|
|
51
|
+
const tag = reader.uint32();
|
|
52
|
+
switch (tag >>> 3) {
|
|
53
|
+
case 1: {
|
|
54
|
+
if (tag !== 10) {
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
message.uuid = reader.string();
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
case 2: {
|
|
61
|
+
if (tag !== 18) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
message.firstName = reader.string();
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
case 3: {
|
|
68
|
+
if (tag !== 26) {
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
message.lastName = reader.string();
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
case 4: {
|
|
75
|
+
if (tag !== 34) {
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
message.email = reader.string();
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
case 5: {
|
|
82
|
+
if (tag !== 42) {
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
message.phoneNumber = reader.string();
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
case 6: {
|
|
89
|
+
if (tag !== 50) {
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
message.photoUrl = reader.string();
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
case 7: {
|
|
96
|
+
if (tag !== 58) {
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
message.gender = reader.string();
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
case 8: {
|
|
103
|
+
if (tag !== 66) {
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
message.birthday = reader.string();
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
reader.skip(tag & 7);
|
|
114
|
+
}
|
|
115
|
+
return message;
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
function createBaseAccount() {
|
|
119
|
+
return { uuid: "", name: "", users: [] };
|
|
120
|
+
}
|
|
121
|
+
exports.Account = {
|
|
122
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
123
|
+
if (message.uuid !== "") {
|
|
124
|
+
writer.uint32(10).string(message.uuid);
|
|
125
|
+
}
|
|
126
|
+
if (message.name !== "") {
|
|
127
|
+
writer.uint32(18).string(message.name);
|
|
128
|
+
}
|
|
129
|
+
if (message.imageUrl !== undefined) {
|
|
130
|
+
writer.uint32(26).string(message.imageUrl);
|
|
131
|
+
}
|
|
132
|
+
for (const v of message.users) {
|
|
133
|
+
exports.User.encode(v, writer.uint32(34).fork()).join();
|
|
134
|
+
}
|
|
135
|
+
return writer;
|
|
136
|
+
},
|
|
137
|
+
decode(input, length) {
|
|
138
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
139
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
140
|
+
const message = createBaseAccount();
|
|
141
|
+
while (reader.pos < end) {
|
|
142
|
+
const tag = reader.uint32();
|
|
143
|
+
switch (tag >>> 3) {
|
|
144
|
+
case 1: {
|
|
145
|
+
if (tag !== 10) {
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
message.uuid = reader.string();
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
case 2: {
|
|
152
|
+
if (tag !== 18) {
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
message.name = reader.string();
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
case 3: {
|
|
159
|
+
if (tag !== 26) {
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
message.imageUrl = reader.string();
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
case 4: {
|
|
166
|
+
if (tag !== 34) {
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
message.users.push(exports.User.decode(reader, reader.uint32()));
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
reader.skip(tag & 7);
|
|
177
|
+
}
|
|
178
|
+
return message;
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
function createBaseCreateAccountRequest() {
|
|
182
|
+
return { name: "" };
|
|
183
|
+
}
|
|
184
|
+
exports.CreateAccountRequest = {
|
|
185
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
186
|
+
if (message.name !== "") {
|
|
187
|
+
writer.uint32(10).string(message.name);
|
|
188
|
+
}
|
|
189
|
+
if (message.imageUrl !== undefined) {
|
|
190
|
+
writer.uint32(18).string(message.imageUrl);
|
|
191
|
+
}
|
|
192
|
+
return writer;
|
|
193
|
+
},
|
|
194
|
+
decode(input, length) {
|
|
195
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
196
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
197
|
+
const message = createBaseCreateAccountRequest();
|
|
198
|
+
while (reader.pos < end) {
|
|
199
|
+
const tag = reader.uint32();
|
|
200
|
+
switch (tag >>> 3) {
|
|
201
|
+
case 1: {
|
|
202
|
+
if (tag !== 10) {
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
message.name = reader.string();
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
case 2: {
|
|
209
|
+
if (tag !== 18) {
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
message.imageUrl = reader.string();
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
reader.skip(tag & 7);
|
|
220
|
+
}
|
|
221
|
+
return message;
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
function createBaseCreateAccountWithUsersRequest() {
|
|
225
|
+
return { name: "", userIds: [] };
|
|
226
|
+
}
|
|
227
|
+
exports.CreateAccountWithUsersRequest = {
|
|
228
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
229
|
+
if (message.name !== "") {
|
|
230
|
+
writer.uint32(10).string(message.name);
|
|
231
|
+
}
|
|
232
|
+
if (message.imageUrl !== undefined) {
|
|
233
|
+
writer.uint32(18).string(message.imageUrl);
|
|
234
|
+
}
|
|
235
|
+
for (const v of message.userIds) {
|
|
236
|
+
writer.uint32(26).string(v);
|
|
237
|
+
}
|
|
238
|
+
return writer;
|
|
239
|
+
},
|
|
240
|
+
decode(input, length) {
|
|
241
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
242
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
243
|
+
const message = createBaseCreateAccountWithUsersRequest();
|
|
244
|
+
while (reader.pos < end) {
|
|
245
|
+
const tag = reader.uint32();
|
|
246
|
+
switch (tag >>> 3) {
|
|
247
|
+
case 1: {
|
|
248
|
+
if (tag !== 10) {
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
message.name = reader.string();
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
case 2: {
|
|
255
|
+
if (tag !== 18) {
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
message.imageUrl = reader.string();
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
case 3: {
|
|
262
|
+
if (tag !== 26) {
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
message.userIds.push(reader.string());
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
reader.skip(tag & 7);
|
|
273
|
+
}
|
|
274
|
+
return message;
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
function createBaseAddUserRequest() {
|
|
278
|
+
return { accountId: "", userId: "" };
|
|
279
|
+
}
|
|
280
|
+
exports.AddUserRequest = {
|
|
281
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
282
|
+
if (message.accountId !== "") {
|
|
283
|
+
writer.uint32(10).string(message.accountId);
|
|
284
|
+
}
|
|
285
|
+
if (message.userId !== "") {
|
|
286
|
+
writer.uint32(18).string(message.userId);
|
|
287
|
+
}
|
|
288
|
+
return writer;
|
|
289
|
+
},
|
|
290
|
+
decode(input, length) {
|
|
291
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
292
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
293
|
+
const message = createBaseAddUserRequest();
|
|
294
|
+
while (reader.pos < end) {
|
|
295
|
+
const tag = reader.uint32();
|
|
296
|
+
switch (tag >>> 3) {
|
|
297
|
+
case 1: {
|
|
298
|
+
if (tag !== 10) {
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
301
|
+
message.accountId = reader.string();
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
case 2: {
|
|
305
|
+
if (tag !== 18) {
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
message.userId = reader.string();
|
|
309
|
+
continue;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
reader.skip(tag & 7);
|
|
316
|
+
}
|
|
317
|
+
return message;
|
|
318
|
+
},
|
|
319
|
+
};
|
|
320
|
+
function createBaseGetAccountRequest() {
|
|
321
|
+
return { uuid: "" };
|
|
322
|
+
}
|
|
323
|
+
exports.GetAccountRequest = {
|
|
324
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
325
|
+
if (message.uuid !== "") {
|
|
326
|
+
writer.uint32(10).string(message.uuid);
|
|
327
|
+
}
|
|
328
|
+
return writer;
|
|
329
|
+
},
|
|
330
|
+
decode(input, length) {
|
|
331
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
332
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
333
|
+
const message = createBaseGetAccountRequest();
|
|
334
|
+
while (reader.pos < end) {
|
|
335
|
+
const tag = reader.uint32();
|
|
336
|
+
switch (tag >>> 3) {
|
|
337
|
+
case 1: {
|
|
338
|
+
if (tag !== 10) {
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
message.uuid = reader.string();
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
346
|
+
break;
|
|
347
|
+
}
|
|
348
|
+
reader.skip(tag & 7);
|
|
349
|
+
}
|
|
350
|
+
return message;
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
function createBaseGetAccountWithUsersRequest() {
|
|
354
|
+
return { uuid: "" };
|
|
355
|
+
}
|
|
356
|
+
exports.GetAccountWithUsersRequest = {
|
|
357
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
358
|
+
if (message.uuid !== "") {
|
|
359
|
+
writer.uint32(10).string(message.uuid);
|
|
360
|
+
}
|
|
361
|
+
return writer;
|
|
362
|
+
},
|
|
363
|
+
decode(input, length) {
|
|
364
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
365
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
366
|
+
const message = createBaseGetAccountWithUsersRequest();
|
|
367
|
+
while (reader.pos < end) {
|
|
368
|
+
const tag = reader.uint32();
|
|
369
|
+
switch (tag >>> 3) {
|
|
370
|
+
case 1: {
|
|
371
|
+
if (tag !== 10) {
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
message.uuid = reader.string();
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
reader.skip(tag & 7);
|
|
382
|
+
}
|
|
383
|
+
return message;
|
|
384
|
+
},
|
|
385
|
+
};
|
|
386
|
+
function createBaseUpdateAccountRequest() {
|
|
387
|
+
return { uuid: "", name: "" };
|
|
388
|
+
}
|
|
389
|
+
exports.UpdateAccountRequest = {
|
|
390
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
391
|
+
if (message.uuid !== "") {
|
|
392
|
+
writer.uint32(10).string(message.uuid);
|
|
393
|
+
}
|
|
394
|
+
if (message.name !== "") {
|
|
395
|
+
writer.uint32(18).string(message.name);
|
|
396
|
+
}
|
|
397
|
+
if (message.imageUrl !== undefined) {
|
|
398
|
+
writer.uint32(26).string(message.imageUrl);
|
|
399
|
+
}
|
|
400
|
+
return writer;
|
|
401
|
+
},
|
|
402
|
+
decode(input, length) {
|
|
403
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
404
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
405
|
+
const message = createBaseUpdateAccountRequest();
|
|
406
|
+
while (reader.pos < end) {
|
|
407
|
+
const tag = reader.uint32();
|
|
408
|
+
switch (tag >>> 3) {
|
|
409
|
+
case 1: {
|
|
410
|
+
if (tag !== 10) {
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
message.uuid = reader.string();
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
case 2: {
|
|
417
|
+
if (tag !== 18) {
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
message.name = reader.string();
|
|
421
|
+
continue;
|
|
422
|
+
}
|
|
423
|
+
case 3: {
|
|
424
|
+
if (tag !== 26) {
|
|
425
|
+
break;
|
|
426
|
+
}
|
|
427
|
+
message.imageUrl = reader.string();
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
reader.skip(tag & 7);
|
|
435
|
+
}
|
|
436
|
+
return message;
|
|
437
|
+
},
|
|
438
|
+
};
|
|
439
|
+
function createBaseDeleteAccountRequest() {
|
|
440
|
+
return { uuid: "" };
|
|
441
|
+
}
|
|
442
|
+
exports.DeleteAccountRequest = {
|
|
443
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
444
|
+
if (message.uuid !== "") {
|
|
445
|
+
writer.uint32(10).string(message.uuid);
|
|
446
|
+
}
|
|
447
|
+
return writer;
|
|
448
|
+
},
|
|
449
|
+
decode(input, length) {
|
|
450
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
451
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
452
|
+
const message = createBaseDeleteAccountRequest();
|
|
453
|
+
while (reader.pos < end) {
|
|
454
|
+
const tag = reader.uint32();
|
|
455
|
+
switch (tag >>> 3) {
|
|
456
|
+
case 1: {
|
|
457
|
+
if (tag !== 10) {
|
|
458
|
+
break;
|
|
459
|
+
}
|
|
460
|
+
message.uuid = reader.string();
|
|
461
|
+
continue;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
465
|
+
break;
|
|
466
|
+
}
|
|
467
|
+
reader.skip(tag & 7);
|
|
468
|
+
}
|
|
469
|
+
return message;
|
|
470
|
+
},
|
|
471
|
+
};
|
|
472
|
+
function createBaseAccountResponse() {
|
|
473
|
+
return { account: undefined };
|
|
474
|
+
}
|
|
475
|
+
exports.AccountResponse = {
|
|
476
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
477
|
+
if (message.account !== undefined) {
|
|
478
|
+
exports.Account.encode(message.account, writer.uint32(10).fork()).join();
|
|
479
|
+
}
|
|
480
|
+
return writer;
|
|
481
|
+
},
|
|
482
|
+
decode(input, length) {
|
|
483
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
484
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
485
|
+
const message = createBaseAccountResponse();
|
|
486
|
+
while (reader.pos < end) {
|
|
487
|
+
const tag = reader.uint32();
|
|
488
|
+
switch (tag >>> 3) {
|
|
489
|
+
case 1: {
|
|
490
|
+
if (tag !== 10) {
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
message.account = exports.Account.decode(reader, reader.uint32());
|
|
494
|
+
continue;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
reader.skip(tag & 7);
|
|
501
|
+
}
|
|
502
|
+
return message;
|
|
503
|
+
},
|
|
504
|
+
};
|
|
505
|
+
function createBaseEmpty() {
|
|
506
|
+
return {};
|
|
507
|
+
}
|
|
508
|
+
exports.Empty = {
|
|
509
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
510
|
+
return writer;
|
|
511
|
+
},
|
|
512
|
+
decode(input, length) {
|
|
513
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
514
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
515
|
+
const message = createBaseEmpty();
|
|
516
|
+
while (reader.pos < end) {
|
|
517
|
+
const tag = reader.uint32();
|
|
518
|
+
switch (tag >>> 3) {
|
|
519
|
+
}
|
|
520
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
521
|
+
break;
|
|
522
|
+
}
|
|
523
|
+
reader.skip(tag & 7);
|
|
524
|
+
}
|
|
525
|
+
return message;
|
|
526
|
+
},
|
|
527
|
+
};
|
|
528
|
+
function AccountServiceControllerMethods() {
|
|
529
|
+
return function (constructor) {
|
|
530
|
+
const grpcMethods = [
|
|
531
|
+
"createAccount",
|
|
532
|
+
"createAccountWithUsers",
|
|
533
|
+
"addUser",
|
|
534
|
+
"getAccount",
|
|
535
|
+
"getAccountWithUsers",
|
|
536
|
+
"updateAccount",
|
|
537
|
+
"deleteAccount",
|
|
538
|
+
"findAllAccounts",
|
|
539
|
+
];
|
|
540
|
+
for (const method of grpcMethods) {
|
|
541
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
542
|
+
(0, microservices_1.GrpcMethod)("AccountService", method)(constructor.prototype[method], method, descriptor);
|
|
543
|
+
}
|
|
544
|
+
const grpcStreamMethods = [];
|
|
545
|
+
for (const method of grpcStreamMethods) {
|
|
546
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
547
|
+
(0, microservices_1.GrpcStreamMethod)("AccountService", method)(constructor.prototype[method], method, descriptor);
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
exports.ACCOUNT_SERVICE_NAME = "AccountService";
|
|
552
|
+
exports.AccountServiceService = {
|
|
553
|
+
createAccount: {
|
|
554
|
+
path: "/account.AccountService/CreateAccount",
|
|
555
|
+
requestStream: false,
|
|
556
|
+
responseStream: false,
|
|
557
|
+
requestSerialize: (value) => Buffer.from(exports.CreateAccountRequest.encode(value).finish()),
|
|
558
|
+
requestDeserialize: (value) => exports.CreateAccountRequest.decode(value),
|
|
559
|
+
responseSerialize: (value) => Buffer.from(exports.AccountResponse.encode(value).finish()),
|
|
560
|
+
responseDeserialize: (value) => exports.AccountResponse.decode(value),
|
|
561
|
+
},
|
|
562
|
+
createAccountWithUsers: {
|
|
563
|
+
path: "/account.AccountService/CreateAccountWithUsers",
|
|
564
|
+
requestStream: false,
|
|
565
|
+
responseStream: false,
|
|
566
|
+
requestSerialize: (value) => Buffer.from(exports.CreateAccountWithUsersRequest.encode(value).finish()),
|
|
567
|
+
requestDeserialize: (value) => exports.CreateAccountWithUsersRequest.decode(value),
|
|
568
|
+
responseSerialize: (value) => Buffer.from(exports.AccountResponse.encode(value).finish()),
|
|
569
|
+
responseDeserialize: (value) => exports.AccountResponse.decode(value),
|
|
570
|
+
},
|
|
571
|
+
addUser: {
|
|
572
|
+
path: "/account.AccountService/AddUser",
|
|
573
|
+
requestStream: false,
|
|
574
|
+
responseStream: false,
|
|
575
|
+
requestSerialize: (value) => Buffer.from(exports.AddUserRequest.encode(value).finish()),
|
|
576
|
+
requestDeserialize: (value) => exports.AddUserRequest.decode(value),
|
|
577
|
+
responseSerialize: (value) => Buffer.from(exports.Empty.encode(value).finish()),
|
|
578
|
+
responseDeserialize: (value) => exports.Empty.decode(value),
|
|
579
|
+
},
|
|
580
|
+
getAccount: {
|
|
581
|
+
path: "/account.AccountService/GetAccount",
|
|
582
|
+
requestStream: false,
|
|
583
|
+
responseStream: false,
|
|
584
|
+
requestSerialize: (value) => Buffer.from(exports.GetAccountRequest.encode(value).finish()),
|
|
585
|
+
requestDeserialize: (value) => exports.GetAccountRequest.decode(value),
|
|
586
|
+
responseSerialize: (value) => Buffer.from(exports.AccountResponse.encode(value).finish()),
|
|
587
|
+
responseDeserialize: (value) => exports.AccountResponse.decode(value),
|
|
588
|
+
},
|
|
589
|
+
getAccountWithUsers: {
|
|
590
|
+
path: "/account.AccountService/GetAccountWithUsers",
|
|
591
|
+
requestStream: false,
|
|
592
|
+
responseStream: false,
|
|
593
|
+
requestSerialize: (value) => Buffer.from(exports.GetAccountWithUsersRequest.encode(value).finish()),
|
|
594
|
+
requestDeserialize: (value) => exports.GetAccountWithUsersRequest.decode(value),
|
|
595
|
+
responseSerialize: (value) => Buffer.from(exports.AccountResponse.encode(value).finish()),
|
|
596
|
+
responseDeserialize: (value) => exports.AccountResponse.decode(value),
|
|
597
|
+
},
|
|
598
|
+
updateAccount: {
|
|
599
|
+
path: "/account.AccountService/UpdateAccount",
|
|
600
|
+
requestStream: false,
|
|
601
|
+
responseStream: false,
|
|
602
|
+
requestSerialize: (value) => Buffer.from(exports.UpdateAccountRequest.encode(value).finish()),
|
|
603
|
+
requestDeserialize: (value) => exports.UpdateAccountRequest.decode(value),
|
|
604
|
+
responseSerialize: (value) => Buffer.from(exports.AccountResponse.encode(value).finish()),
|
|
605
|
+
responseDeserialize: (value) => exports.AccountResponse.decode(value),
|
|
606
|
+
},
|
|
607
|
+
deleteAccount: {
|
|
608
|
+
path: "/account.AccountService/DeleteAccount",
|
|
609
|
+
requestStream: false,
|
|
610
|
+
responseStream: false,
|
|
611
|
+
requestSerialize: (value) => Buffer.from(exports.DeleteAccountRequest.encode(value).finish()),
|
|
612
|
+
requestDeserialize: (value) => exports.DeleteAccountRequest.decode(value),
|
|
613
|
+
responseSerialize: (value) => Buffer.from(exports.Empty.encode(value).finish()),
|
|
614
|
+
responseDeserialize: (value) => exports.Empty.decode(value),
|
|
615
|
+
},
|
|
616
|
+
findAllAccounts: {
|
|
617
|
+
path: "/account.AccountService/FindAllAccounts",
|
|
618
|
+
requestStream: false,
|
|
619
|
+
responseStream: true,
|
|
620
|
+
requestSerialize: (value) => Buffer.from(exports.Empty.encode(value).finish()),
|
|
621
|
+
requestDeserialize: (value) => exports.Empty.decode(value),
|
|
622
|
+
responseSerialize: (value) => Buffer.from(exports.AccountResponse.encode(value).finish()),
|
|
623
|
+
responseDeserialize: (value) => exports.AccountResponse.decode(value),
|
|
624
|
+
},
|
|
625
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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 client;
|
|
6
|
+
private readonly logger;
|
|
7
|
+
private authClient;
|
|
8
|
+
constructor(client: ClientGrpc);
|
|
9
|
+
onModuleInit(): void;
|
|
10
|
+
get service(): AuthServiceClient;
|
|
11
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
this.authClient = null;
|
|
23
|
+
}
|
|
24
|
+
onModuleInit() {
|
|
25
|
+
this.authClient = this.client.getService("AuthService");
|
|
26
|
+
this.logger.log("AuthServiceClient initialized");
|
|
27
|
+
}
|
|
28
|
+
get service() {
|
|
29
|
+
if (!this.authClient) {
|
|
30
|
+
throw new Error("AuthService not initialized yet");
|
|
31
|
+
}
|
|
32
|
+
return this.authClient;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.AuthClient = AuthClient;
|
|
36
|
+
exports.AuthClient = AuthClient = AuthClient_1 = __decorate([
|
|
37
|
+
(0, common_1.Injectable)(),
|
|
38
|
+
__param(0, (0, common_1.Inject)("AUTH_PACKAGE")),
|
|
39
|
+
__metadata("design:paramtypes", [Object])
|
|
40
|
+
], AuthClient);
|