@ssoeasy-dev/proto 1.1.1-beta.1 → 1.1.1-beta.10

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.

Potentially problematic release.


This version of @ssoeasy-dev/proto might be problematic. Click here for more details.

Files changed (50) hide show
  1. package/README.md +107 -164
  2. package/gen/ts/auth/v1/auth.ts +1088 -310
  3. package/gen/ts/auth/v1/common.ts +120 -0
  4. package/gen/ts/{companies/v1/models/employee_company.ts → auth/v1/permission.ts} +63 -35
  5. package/gen/ts/auth/v1/user_policy.ts +454 -0
  6. package/gen/ts/auth/v1/verification.ts +390 -103
  7. package/gen/ts/common/v1/types.ts +25 -67
  8. package/gen/ts/companies/v1/employee.ts +418 -0
  9. package/gen/ts/companies/v1/owner.ts +43 -286
  10. package/gen/ts/companies/v1/service.ts +150 -0
  11. package/gen/ts/companies/v1/{models/subscription.ts → subscription.ts} +64 -70
  12. package/gen/ts/index.auth.ts +1 -1
  13. package/gen/ts/index.auth.v1.ts +4 -1
  14. package/gen/ts/index.common.ts +1 -1
  15. package/gen/ts/index.common.v1.ts +1 -1
  16. package/gen/ts/index.companies.ts +1 -1
  17. package/gen/ts/index.companies.v1.ts +4 -2
  18. package/gen/ts/index.ts +1 -6
  19. package/package.json +1 -9
  20. package/proto/auth/v1/auth.proto +68 -19
  21. package/proto/auth/v1/common.proto +8 -0
  22. package/proto/auth/v1/permission.proto +15 -0
  23. package/proto/auth/v1/user_policy.proto +30 -0
  24. package/proto/auth/v1/verification.proto +32 -9
  25. package/proto/common/v1/types.proto +2 -5
  26. package/proto/companies/v1/employee.proto +26 -0
  27. package/proto/companies/v1/owner.proto +4 -19
  28. package/proto/companies/v1/service.proto +14 -0
  29. package/proto/companies/v1/subscription.proto +15 -0
  30. package/gen/ts/abac/v1/employee_attribute.ts +0 -501
  31. package/gen/ts/abac/v1/models/employee_attribute.ts +0 -190
  32. package/gen/ts/companies/v1/models/company.ts +0 -204
  33. package/gen/ts/companies/v1/models/employee.ts +0 -175
  34. package/gen/ts/google/protobuf/timestamp.ts +0 -233
  35. package/gen/ts/index.abac.ts +0 -8
  36. package/gen/ts/index.abac.v1.models.ts +0 -8
  37. package/gen/ts/index.abac.v1.ts +0 -9
  38. package/gen/ts/index.companies.v1.models.ts +0 -11
  39. package/gen/ts/index.google.protobuf.ts +0 -8
  40. package/gen/ts/index.google.ts +0 -8
  41. package/gen/ts/index.services.ts +0 -8
  42. package/gen/ts/index.services.v1.ts +0 -8
  43. package/gen/ts/services/v1/services.ts +0 -293
  44. package/proto/abac/v1/employee_attribute.proto +0 -31
  45. package/proto/abac/v1/models/employee_attribute.proto +0 -11
  46. package/proto/companies/v1/models/company.proto +0 -12
  47. package/proto/companies/v1/models/employee.proto +0 -11
  48. package/proto/companies/v1/models/employee_company.proto +0 -9
  49. package/proto/companies/v1/models/subscription.proto +0 -10
  50. package/proto/services/v1/services.proto +0 -19
@@ -1,57 +1,44 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.2
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
  // source: common/v1/types.proto
6
6
 
7
7
  /* eslint-disable */
8
8
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
9
- import { Timestamp } from "../../google/protobuf/timestamp";
10
9
 
11
- export interface AuditMetadata {
12
- $type: "common.v1.AuditMetadata";
13
- createdAt?: string | undefined;
14
- updatedAt?: string | undefined;
10
+ export interface StatusResponse {
11
+ $type: "common.v1.StatusResponse";
12
+ success: boolean;
15
13
  }
16
14
 
17
- function createBaseAuditMetadata(): AuditMetadata {
18
- return { $type: "common.v1.AuditMetadata", createdAt: undefined, updatedAt: undefined };
15
+ function createBaseStatusResponse(): StatusResponse {
16
+ return { $type: "common.v1.StatusResponse", success: false };
19
17
  }
20
18
 
21
- export const AuditMetadata: MessageFns<AuditMetadata, "common.v1.AuditMetadata"> = {
22
- $type: "common.v1.AuditMetadata" as const,
19
+ export const StatusResponse: MessageFns<StatusResponse, "common.v1.StatusResponse"> = {
20
+ $type: "common.v1.StatusResponse" as const,
23
21
 
24
- encode(message: AuditMetadata, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
25
- if (message.createdAt !== undefined) {
26
- Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(10).fork()).join();
27
- }
28
- if (message.updatedAt !== undefined) {
29
- Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(18).fork()).join();
22
+ encode(message: StatusResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
23
+ if (message.success !== false) {
24
+ writer.uint32(8).bool(message.success);
30
25
  }
31
26
  return writer;
32
27
  },
33
28
 
34
- decode(input: BinaryReader | Uint8Array, length?: number): AuditMetadata {
29
+ decode(input: BinaryReader | Uint8Array, length?: number): StatusResponse {
35
30
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
36
31
  const end = length === undefined ? reader.len : reader.pos + length;
37
- const message = createBaseAuditMetadata();
32
+ const message = createBaseStatusResponse();
38
33
  while (reader.pos < end) {
39
34
  const tag = reader.uint32();
40
35
  switch (tag >>> 3) {
41
36
  case 1: {
42
- if (tag !== 10) {
43
- break;
44
- }
45
-
46
- message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
47
- continue;
48
- }
49
- case 2: {
50
- if (tag !== 18) {
37
+ if (tag !== 8) {
51
38
  break;
52
39
  }
53
40
 
54
- message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
41
+ message.success = reader.bool();
55
42
  continue;
56
43
  }
57
44
  }
@@ -63,40 +50,24 @@ export const AuditMetadata: MessageFns<AuditMetadata, "common.v1.AuditMetadata">
63
50
  return message;
64
51
  },
65
52
 
66
- fromJSON(object: any): AuditMetadata {
67
- return {
68
- $type: AuditMetadata.$type,
69
- createdAt: isSet(object.createdAt)
70
- ? globalThis.String(object.createdAt)
71
- : isSet(object.created_at)
72
- ? globalThis.String(object.created_at)
73
- : undefined,
74
- updatedAt: isSet(object.updatedAt)
75
- ? globalThis.String(object.updatedAt)
76
- : isSet(object.updated_at)
77
- ? globalThis.String(object.updated_at)
78
- : undefined,
79
- };
53
+ fromJSON(object: any): StatusResponse {
54
+ return { $type: StatusResponse.$type, success: isSet(object.success) ? globalThis.Boolean(object.success) : false };
80
55
  },
81
56
 
82
- toJSON(message: AuditMetadata): unknown {
57
+ toJSON(message: StatusResponse): unknown {
83
58
  const obj: any = {};
84
- if (message.createdAt !== undefined) {
85
- obj.createdAt = message.createdAt;
86
- }
87
- if (message.updatedAt !== undefined) {
88
- obj.updatedAt = message.updatedAt;
59
+ if (message.success !== false) {
60
+ obj.success = message.success;
89
61
  }
90
62
  return obj;
91
63
  },
92
64
 
93
- create<I extends Exact<DeepPartial<AuditMetadata>, I>>(base?: I): AuditMetadata {
94
- return AuditMetadata.fromPartial(base ?? ({} as any));
65
+ create<I extends Exact<DeepPartial<StatusResponse>, I>>(base?: I): StatusResponse {
66
+ return StatusResponse.fromPartial(base ?? ({} as any));
95
67
  },
96
- fromPartial<I extends Exact<DeepPartial<AuditMetadata>, I>>(object: I): AuditMetadata {
97
- const message = createBaseAuditMetadata();
98
- message.createdAt = object.createdAt ?? undefined;
99
- message.updatedAt = object.updatedAt ?? undefined;
68
+ fromPartial<I extends Exact<DeepPartial<StatusResponse>, I>>(object: I): StatusResponse {
69
+ const message = createBaseStatusResponse();
70
+ message.success = object.success ?? false;
100
71
  return message;
101
72
  },
102
73
  };
@@ -114,19 +85,6 @@ type KeysOfUnion<T> = T extends T ? keyof T : never;
114
85
  type Exact<P, I extends P> = P extends Builtin ? P
115
86
  : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
116
87
 
117
- function toTimestamp(dateStr: string): Timestamp {
118
- const date = new globalThis.Date(dateStr);
119
- const seconds = Math.trunc(date.getTime() / 1_000);
120
- const nanos = (date.getTime() % 1_000) * 1_000_000;
121
- return { $type: "google.protobuf.Timestamp", seconds, nanos };
122
- }
123
-
124
- function fromTimestamp(t: Timestamp): string {
125
- let millis = (t.seconds || 0) * 1_000;
126
- millis += (t.nanos || 0) / 1_000_000;
127
- return new globalThis.Date(millis).toISOString();
128
- }
129
-
130
88
  function isSet(value: any): boolean {
131
89
  return value !== null && value !== undefined;
132
90
  }
@@ -0,0 +1,418 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.5
4
+ // protoc unknown
5
+ // source: companies/v1/employee.proto
6
+
7
+ /* eslint-disable */
8
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
9
+ import type { CallContext, CallOptions } from "nice-grpc-common";
10
+
11
+ export interface GetByUserIdRequest {
12
+ $type: "companies.v1.GetByUserIdRequest";
13
+ userId: string;
14
+ serviceId?: string | undefined;
15
+ }
16
+
17
+ export interface EmployeeCompany {
18
+ $type: "companies.v1.EmployeeCompany";
19
+ id: string;
20
+ name: string;
21
+ serviceName?: string | undefined;
22
+ subscriptionId?: string | undefined;
23
+ subscriptionIsActive?: boolean | undefined;
24
+ }
25
+
26
+ export interface GetByUserIdResponse {
27
+ $type: "companies.v1.GetByUserIdResponse";
28
+ firstname: string;
29
+ lastname: string;
30
+ companies: EmployeeCompany[];
31
+ }
32
+
33
+ function createBaseGetByUserIdRequest(): GetByUserIdRequest {
34
+ return { $type: "companies.v1.GetByUserIdRequest", userId: "", serviceId: undefined };
35
+ }
36
+
37
+ export const GetByUserIdRequest: MessageFns<GetByUserIdRequest, "companies.v1.GetByUserIdRequest"> = {
38
+ $type: "companies.v1.GetByUserIdRequest" as const,
39
+
40
+ encode(message: GetByUserIdRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
41
+ if (message.userId !== "") {
42
+ writer.uint32(10).string(message.userId);
43
+ }
44
+ if (message.serviceId !== undefined) {
45
+ writer.uint32(18).string(message.serviceId);
46
+ }
47
+ return writer;
48
+ },
49
+
50
+ decode(input: BinaryReader | Uint8Array, length?: number): GetByUserIdRequest {
51
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
52
+ const end = length === undefined ? reader.len : reader.pos + length;
53
+ const message = createBaseGetByUserIdRequest();
54
+ while (reader.pos < end) {
55
+ const tag = reader.uint32();
56
+ switch (tag >>> 3) {
57
+ case 1: {
58
+ if (tag !== 10) {
59
+ break;
60
+ }
61
+
62
+ message.userId = reader.string();
63
+ continue;
64
+ }
65
+ case 2: {
66
+ if (tag !== 18) {
67
+ break;
68
+ }
69
+
70
+ message.serviceId = reader.string();
71
+ continue;
72
+ }
73
+ }
74
+ if ((tag & 7) === 4 || tag === 0) {
75
+ break;
76
+ }
77
+ reader.skip(tag & 7);
78
+ }
79
+ return message;
80
+ },
81
+
82
+ fromJSON(object: any): GetByUserIdRequest {
83
+ return {
84
+ $type: GetByUserIdRequest.$type,
85
+ userId: isSet(object.userId)
86
+ ? globalThis.String(object.userId)
87
+ : isSet(object.user_id)
88
+ ? globalThis.String(object.user_id)
89
+ : "",
90
+ serviceId: isSet(object.serviceId)
91
+ ? globalThis.String(object.serviceId)
92
+ : isSet(object.service_id)
93
+ ? globalThis.String(object.service_id)
94
+ : undefined,
95
+ };
96
+ },
97
+
98
+ toJSON(message: GetByUserIdRequest): unknown {
99
+ const obj: any = {};
100
+ if (message.userId !== "") {
101
+ obj.userId = message.userId;
102
+ }
103
+ if (message.serviceId !== undefined) {
104
+ obj.serviceId = message.serviceId;
105
+ }
106
+ return obj;
107
+ },
108
+
109
+ create<I extends Exact<DeepPartial<GetByUserIdRequest>, I>>(base?: I): GetByUserIdRequest {
110
+ return GetByUserIdRequest.fromPartial(base ?? ({} as any));
111
+ },
112
+ fromPartial<I extends Exact<DeepPartial<GetByUserIdRequest>, I>>(object: I): GetByUserIdRequest {
113
+ const message = createBaseGetByUserIdRequest();
114
+ message.userId = object.userId ?? "";
115
+ message.serviceId = object.serviceId ?? undefined;
116
+ return message;
117
+ },
118
+ };
119
+
120
+ function createBaseEmployeeCompany(): EmployeeCompany {
121
+ return {
122
+ $type: "companies.v1.EmployeeCompany",
123
+ id: "",
124
+ name: "",
125
+ serviceName: undefined,
126
+ subscriptionId: undefined,
127
+ subscriptionIsActive: undefined,
128
+ };
129
+ }
130
+
131
+ export const EmployeeCompany: MessageFns<EmployeeCompany, "companies.v1.EmployeeCompany"> = {
132
+ $type: "companies.v1.EmployeeCompany" as const,
133
+
134
+ encode(message: EmployeeCompany, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
135
+ if (message.id !== "") {
136
+ writer.uint32(10).string(message.id);
137
+ }
138
+ if (message.name !== "") {
139
+ writer.uint32(18).string(message.name);
140
+ }
141
+ if (message.serviceName !== undefined) {
142
+ writer.uint32(26).string(message.serviceName);
143
+ }
144
+ if (message.subscriptionId !== undefined) {
145
+ writer.uint32(34).string(message.subscriptionId);
146
+ }
147
+ if (message.subscriptionIsActive !== undefined) {
148
+ writer.uint32(40).bool(message.subscriptionIsActive);
149
+ }
150
+ return writer;
151
+ },
152
+
153
+ decode(input: BinaryReader | Uint8Array, length?: number): EmployeeCompany {
154
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
155
+ const end = length === undefined ? reader.len : reader.pos + length;
156
+ const message = createBaseEmployeeCompany();
157
+ while (reader.pos < end) {
158
+ const tag = reader.uint32();
159
+ switch (tag >>> 3) {
160
+ case 1: {
161
+ if (tag !== 10) {
162
+ break;
163
+ }
164
+
165
+ message.id = reader.string();
166
+ continue;
167
+ }
168
+ case 2: {
169
+ if (tag !== 18) {
170
+ break;
171
+ }
172
+
173
+ message.name = reader.string();
174
+ continue;
175
+ }
176
+ case 3: {
177
+ if (tag !== 26) {
178
+ break;
179
+ }
180
+
181
+ message.serviceName = reader.string();
182
+ continue;
183
+ }
184
+ case 4: {
185
+ if (tag !== 34) {
186
+ break;
187
+ }
188
+
189
+ message.subscriptionId = reader.string();
190
+ continue;
191
+ }
192
+ case 5: {
193
+ if (tag !== 40) {
194
+ break;
195
+ }
196
+
197
+ message.subscriptionIsActive = reader.bool();
198
+ continue;
199
+ }
200
+ }
201
+ if ((tag & 7) === 4 || tag === 0) {
202
+ break;
203
+ }
204
+ reader.skip(tag & 7);
205
+ }
206
+ return message;
207
+ },
208
+
209
+ fromJSON(object: any): EmployeeCompany {
210
+ return {
211
+ $type: EmployeeCompany.$type,
212
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
213
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
214
+ serviceName: isSet(object.serviceName)
215
+ ? globalThis.String(object.serviceName)
216
+ : isSet(object.service_name)
217
+ ? globalThis.String(object.service_name)
218
+ : undefined,
219
+ subscriptionId: isSet(object.subscriptionId)
220
+ ? globalThis.String(object.subscriptionId)
221
+ : isSet(object.subscription_id)
222
+ ? globalThis.String(object.subscription_id)
223
+ : undefined,
224
+ subscriptionIsActive: isSet(object.subscriptionIsActive)
225
+ ? globalThis.Boolean(object.subscriptionIsActive)
226
+ : isSet(object.subscription_is_active)
227
+ ? globalThis.Boolean(object.subscription_is_active)
228
+ : undefined,
229
+ };
230
+ },
231
+
232
+ toJSON(message: EmployeeCompany): unknown {
233
+ const obj: any = {};
234
+ if (message.id !== "") {
235
+ obj.id = message.id;
236
+ }
237
+ if (message.name !== "") {
238
+ obj.name = message.name;
239
+ }
240
+ if (message.serviceName !== undefined) {
241
+ obj.serviceName = message.serviceName;
242
+ }
243
+ if (message.subscriptionId !== undefined) {
244
+ obj.subscriptionId = message.subscriptionId;
245
+ }
246
+ if (message.subscriptionIsActive !== undefined) {
247
+ obj.subscriptionIsActive = message.subscriptionIsActive;
248
+ }
249
+ return obj;
250
+ },
251
+
252
+ create<I extends Exact<DeepPartial<EmployeeCompany>, I>>(base?: I): EmployeeCompany {
253
+ return EmployeeCompany.fromPartial(base ?? ({} as any));
254
+ },
255
+ fromPartial<I extends Exact<DeepPartial<EmployeeCompany>, I>>(object: I): EmployeeCompany {
256
+ const message = createBaseEmployeeCompany();
257
+ message.id = object.id ?? "";
258
+ message.name = object.name ?? "";
259
+ message.serviceName = object.serviceName ?? undefined;
260
+ message.subscriptionId = object.subscriptionId ?? undefined;
261
+ message.subscriptionIsActive = object.subscriptionIsActive ?? undefined;
262
+ return message;
263
+ },
264
+ };
265
+
266
+ function createBaseGetByUserIdResponse(): GetByUserIdResponse {
267
+ return { $type: "companies.v1.GetByUserIdResponse", firstname: "", lastname: "", companies: [] };
268
+ }
269
+
270
+ export const GetByUserIdResponse: MessageFns<GetByUserIdResponse, "companies.v1.GetByUserIdResponse"> = {
271
+ $type: "companies.v1.GetByUserIdResponse" as const,
272
+
273
+ encode(message: GetByUserIdResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
274
+ if (message.firstname !== "") {
275
+ writer.uint32(10).string(message.firstname);
276
+ }
277
+ if (message.lastname !== "") {
278
+ writer.uint32(18).string(message.lastname);
279
+ }
280
+ for (const v of message.companies) {
281
+ EmployeeCompany.encode(v!, writer.uint32(26).fork()).join();
282
+ }
283
+ return writer;
284
+ },
285
+
286
+ decode(input: BinaryReader | Uint8Array, length?: number): GetByUserIdResponse {
287
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
288
+ const end = length === undefined ? reader.len : reader.pos + length;
289
+ const message = createBaseGetByUserIdResponse();
290
+ while (reader.pos < end) {
291
+ const tag = reader.uint32();
292
+ switch (tag >>> 3) {
293
+ case 1: {
294
+ if (tag !== 10) {
295
+ break;
296
+ }
297
+
298
+ message.firstname = reader.string();
299
+ continue;
300
+ }
301
+ case 2: {
302
+ if (tag !== 18) {
303
+ break;
304
+ }
305
+
306
+ message.lastname = reader.string();
307
+ continue;
308
+ }
309
+ case 3: {
310
+ if (tag !== 26) {
311
+ break;
312
+ }
313
+
314
+ message.companies.push(EmployeeCompany.decode(reader, reader.uint32()));
315
+ continue;
316
+ }
317
+ }
318
+ if ((tag & 7) === 4 || tag === 0) {
319
+ break;
320
+ }
321
+ reader.skip(tag & 7);
322
+ }
323
+ return message;
324
+ },
325
+
326
+ fromJSON(object: any): GetByUserIdResponse {
327
+ return {
328
+ $type: GetByUserIdResponse.$type,
329
+ firstname: isSet(object.firstname) ? globalThis.String(object.firstname) : "",
330
+ lastname: isSet(object.lastname) ? globalThis.String(object.lastname) : "",
331
+ companies: globalThis.Array.isArray(object?.companies)
332
+ ? object.companies.map((e: any) => EmployeeCompany.fromJSON(e))
333
+ : [],
334
+ };
335
+ },
336
+
337
+ toJSON(message: GetByUserIdResponse): unknown {
338
+ const obj: any = {};
339
+ if (message.firstname !== "") {
340
+ obj.firstname = message.firstname;
341
+ }
342
+ if (message.lastname !== "") {
343
+ obj.lastname = message.lastname;
344
+ }
345
+ if (message.companies?.length) {
346
+ obj.companies = message.companies.map((e) => EmployeeCompany.toJSON(e));
347
+ }
348
+ return obj;
349
+ },
350
+
351
+ create<I extends Exact<DeepPartial<GetByUserIdResponse>, I>>(base?: I): GetByUserIdResponse {
352
+ return GetByUserIdResponse.fromPartial(base ?? ({} as any));
353
+ },
354
+ fromPartial<I extends Exact<DeepPartial<GetByUserIdResponse>, I>>(object: I): GetByUserIdResponse {
355
+ const message = createBaseGetByUserIdResponse();
356
+ message.firstname = object.firstname ?? "";
357
+ message.lastname = object.lastname ?? "";
358
+ message.companies = object.companies?.map((e) => EmployeeCompany.fromPartial(e)) || [];
359
+ return message;
360
+ },
361
+ };
362
+
363
+ export type EmployeeServiceDefinition = typeof EmployeeServiceDefinition;
364
+ export const EmployeeServiceDefinition = {
365
+ name: "EmployeeService",
366
+ fullName: "companies.v1.EmployeeService",
367
+ methods: {
368
+ getByUserId: {
369
+ name: "GetByUserId",
370
+ requestType: GetByUserIdRequest as typeof GetByUserIdRequest,
371
+ requestStream: false,
372
+ responseType: GetByUserIdResponse as typeof GetByUserIdResponse,
373
+ responseStream: false,
374
+ options: {},
375
+ },
376
+ },
377
+ } as const;
378
+
379
+ export interface EmployeeServiceImplementation<CallContextExt = {}> {
380
+ getByUserId(
381
+ request: GetByUserIdRequest,
382
+ context: CallContext & CallContextExt,
383
+ ): Promise<DeepPartial<GetByUserIdResponse>>;
384
+ }
385
+
386
+ export interface EmployeeServiceClient<CallOptionsExt = {}> {
387
+ getByUserId(
388
+ request: DeepPartial<GetByUserIdRequest>,
389
+ options?: CallOptions & CallOptionsExt,
390
+ ): Promise<GetByUserIdResponse>;
391
+ }
392
+
393
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
394
+
395
+ type DeepPartial<T> = T extends Builtin ? T
396
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
397
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
398
+ : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
399
+ : T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
400
+ : Partial<T>;
401
+
402
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
403
+ type Exact<P, I extends P> = P extends Builtin ? P
404
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
405
+
406
+ function isSet(value: any): boolean {
407
+ return value !== null && value !== undefined;
408
+ }
409
+
410
+ interface MessageFns<T, V extends string> {
411
+ readonly $type: V;
412
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
413
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
414
+ fromJSON(object: any): T;
415
+ toJSON(message: T): unknown;
416
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
417
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
418
+ }