@ssoeasy-dev/proto 1.1.0-dev-feat-auth.7 → 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.
- package/README.md +107 -164
- package/gen/ts/auth/v1/auth.ts +375 -12
- package/gen/ts/auth/v1/common.ts +1 -1
- package/gen/ts/auth/v1/permission.ts +3 -3
- package/gen/ts/auth/v1/user_policy.ts +1 -1
- package/gen/ts/auth/v1/verification.ts +7 -7
- package/gen/ts/common/v1/types.ts +1 -1
- package/gen/ts/companies/v1/employee.ts +418 -0
- package/gen/ts/companies/v1/owner.ts +5 -5
- package/gen/ts/companies/v1/service.ts +3 -3
- package/gen/ts/companies/v1/subscription.ts +160 -0
- package/gen/ts/index.auth.ts +1 -1
- package/gen/ts/index.auth.v1.ts +1 -1
- package/gen/ts/index.common.ts +1 -1
- package/gen/ts/index.common.v1.ts +1 -1
- package/gen/ts/index.companies.ts +1 -1
- package/gen/ts/index.companies.v1.ts +3 -1
- package/gen/ts/index.ts +1 -3
- package/package.json +1 -9
- package/proto/auth/v1/auth.proto +21 -0
- package/proto/companies/v1/employee.proto +26 -0
- package/proto/companies/v1/subscription.proto +15 -0
|
@@ -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
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.
|
|
3
|
+
// protoc-gen-ts_proto v2.11.5
|
|
4
4
|
// protoc unknown
|
|
5
5
|
// source: companies/v1/owner.proto
|
|
6
6
|
|
|
@@ -259,17 +259,17 @@ export const OwnerServiceDefinition = {
|
|
|
259
259
|
methods: {
|
|
260
260
|
registerOwner: {
|
|
261
261
|
name: "RegisterOwner",
|
|
262
|
-
requestType: RegisterOwnerRequest,
|
|
262
|
+
requestType: RegisterOwnerRequest as typeof RegisterOwnerRequest,
|
|
263
263
|
requestStream: false,
|
|
264
|
-
responseType: RegisterOwnerResponse,
|
|
264
|
+
responseType: RegisterOwnerResponse as typeof RegisterOwnerResponse,
|
|
265
265
|
responseStream: false,
|
|
266
266
|
options: {},
|
|
267
267
|
},
|
|
268
268
|
registerOwnerCompensate: {
|
|
269
269
|
name: "RegisterOwnerCompensate",
|
|
270
|
-
requestType: RegisterOwnerResponse,
|
|
270
|
+
requestType: RegisterOwnerResponse as typeof RegisterOwnerResponse,
|
|
271
271
|
requestStream: false,
|
|
272
|
-
responseType: StatusResponse,
|
|
272
|
+
responseType: StatusResponse as typeof StatusResponse,
|
|
273
273
|
responseStream: false,
|
|
274
274
|
options: {},
|
|
275
275
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.
|
|
3
|
+
// protoc-gen-ts_proto v2.11.5
|
|
4
4
|
// protoc unknown
|
|
5
5
|
// source: companies/v1/service.proto
|
|
6
6
|
|
|
@@ -105,9 +105,9 @@ export const ServiceServiceDefinition = {
|
|
|
105
105
|
methods: {
|
|
106
106
|
checkUri: {
|
|
107
107
|
name: "CheckUri",
|
|
108
|
-
requestType: CheckUriRequest,
|
|
108
|
+
requestType: CheckUriRequest as typeof CheckUriRequest,
|
|
109
109
|
requestStream: false,
|
|
110
|
-
responseType: StatusResponse,
|
|
110
|
+
responseType: StatusResponse as typeof StatusResponse,
|
|
111
111
|
responseStream: false,
|
|
112
112
|
options: {},
|
|
113
113
|
},
|
|
@@ -0,0 +1,160 @@
|
|
|
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/subscription.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import type { CallContext, CallOptions } from "nice-grpc-common";
|
|
10
|
+
import { StatusResponse } from "../../common/v1/types";
|
|
11
|
+
|
|
12
|
+
export interface CheckSubscriptionRequest {
|
|
13
|
+
$type: "companies.v1.CheckSubscriptionRequest";
|
|
14
|
+
companyId: string;
|
|
15
|
+
serviceId: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function createBaseCheckSubscriptionRequest(): CheckSubscriptionRequest {
|
|
19
|
+
return { $type: "companies.v1.CheckSubscriptionRequest", companyId: "", serviceId: "" };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const CheckSubscriptionRequest: MessageFns<CheckSubscriptionRequest, "companies.v1.CheckSubscriptionRequest"> = {
|
|
23
|
+
$type: "companies.v1.CheckSubscriptionRequest" as const,
|
|
24
|
+
|
|
25
|
+
encode(message: CheckSubscriptionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
26
|
+
if (message.companyId !== "") {
|
|
27
|
+
writer.uint32(10).string(message.companyId);
|
|
28
|
+
}
|
|
29
|
+
if (message.serviceId !== "") {
|
|
30
|
+
writer.uint32(18).string(message.serviceId);
|
|
31
|
+
}
|
|
32
|
+
return writer;
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CheckSubscriptionRequest {
|
|
36
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
37
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
38
|
+
const message = createBaseCheckSubscriptionRequest();
|
|
39
|
+
while (reader.pos < end) {
|
|
40
|
+
const tag = reader.uint32();
|
|
41
|
+
switch (tag >>> 3) {
|
|
42
|
+
case 1: {
|
|
43
|
+
if (tag !== 10) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message.companyId = reader.string();
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
case 2: {
|
|
51
|
+
if (tag !== 18) {
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
message.serviceId = reader.string();
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
reader.skip(tag & 7);
|
|
63
|
+
}
|
|
64
|
+
return message;
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
fromJSON(object: any): CheckSubscriptionRequest {
|
|
68
|
+
return {
|
|
69
|
+
$type: CheckSubscriptionRequest.$type,
|
|
70
|
+
companyId: isSet(object.companyId)
|
|
71
|
+
? globalThis.String(object.companyId)
|
|
72
|
+
: isSet(object.company_id)
|
|
73
|
+
? globalThis.String(object.company_id)
|
|
74
|
+
: "",
|
|
75
|
+
serviceId: isSet(object.serviceId)
|
|
76
|
+
? globalThis.String(object.serviceId)
|
|
77
|
+
: isSet(object.service_id)
|
|
78
|
+
? globalThis.String(object.service_id)
|
|
79
|
+
: "",
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
toJSON(message: CheckSubscriptionRequest): unknown {
|
|
84
|
+
const obj: any = {};
|
|
85
|
+
if (message.companyId !== "") {
|
|
86
|
+
obj.companyId = message.companyId;
|
|
87
|
+
}
|
|
88
|
+
if (message.serviceId !== "") {
|
|
89
|
+
obj.serviceId = message.serviceId;
|
|
90
|
+
}
|
|
91
|
+
return obj;
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
create<I extends Exact<DeepPartial<CheckSubscriptionRequest>, I>>(base?: I): CheckSubscriptionRequest {
|
|
95
|
+
return CheckSubscriptionRequest.fromPartial(base ?? ({} as any));
|
|
96
|
+
},
|
|
97
|
+
fromPartial<I extends Exact<DeepPartial<CheckSubscriptionRequest>, I>>(object: I): CheckSubscriptionRequest {
|
|
98
|
+
const message = createBaseCheckSubscriptionRequest();
|
|
99
|
+
message.companyId = object.companyId ?? "";
|
|
100
|
+
message.serviceId = object.serviceId ?? "";
|
|
101
|
+
return message;
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export type SubscriptionServiceDefinition = typeof SubscriptionServiceDefinition;
|
|
106
|
+
export const SubscriptionServiceDefinition = {
|
|
107
|
+
name: "SubscriptionService",
|
|
108
|
+
fullName: "companies.v1.SubscriptionService",
|
|
109
|
+
methods: {
|
|
110
|
+
checkSubscription: {
|
|
111
|
+
name: "CheckSubscription",
|
|
112
|
+
requestType: CheckSubscriptionRequest as typeof CheckSubscriptionRequest,
|
|
113
|
+
requestStream: false,
|
|
114
|
+
responseType: StatusResponse as typeof StatusResponse,
|
|
115
|
+
responseStream: false,
|
|
116
|
+
options: {},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
} as const;
|
|
120
|
+
|
|
121
|
+
export interface SubscriptionServiceImplementation<CallContextExt = {}> {
|
|
122
|
+
checkSubscription(
|
|
123
|
+
request: CheckSubscriptionRequest,
|
|
124
|
+
context: CallContext & CallContextExt,
|
|
125
|
+
): Promise<DeepPartial<StatusResponse>>;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface SubscriptionServiceClient<CallOptionsExt = {}> {
|
|
129
|
+
checkSubscription(
|
|
130
|
+
request: DeepPartial<CheckSubscriptionRequest>,
|
|
131
|
+
options?: CallOptions & CallOptionsExt,
|
|
132
|
+
): Promise<StatusResponse>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
136
|
+
|
|
137
|
+
type DeepPartial<T> = T extends Builtin ? T
|
|
138
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
139
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
140
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
141
|
+
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
|
|
142
|
+
: Partial<T>;
|
|
143
|
+
|
|
144
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
145
|
+
type Exact<P, I extends P> = P extends Builtin ? P
|
|
146
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
|
|
147
|
+
|
|
148
|
+
function isSet(value: any): boolean {
|
|
149
|
+
return value !== null && value !== undefined;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
interface MessageFns<T, V extends string> {
|
|
153
|
+
readonly $type: V;
|
|
154
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
155
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
156
|
+
fromJSON(object: any): T;
|
|
157
|
+
toJSON(message: T): unknown;
|
|
158
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
159
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
160
|
+
}
|
package/gen/ts/index.auth.ts
CHANGED
package/gen/ts/index.auth.v1.ts
CHANGED
package/gen/ts/index.common.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.
|
|
3
|
+
// protoc-gen-ts_proto v2.11.5
|
|
4
4
|
// protoc unknown
|
|
5
5
|
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
|
|
8
|
+
export * from "./companies/v1/employee";
|
|
8
9
|
export * from "./companies/v1/owner";
|
|
9
10
|
export * from "./companies/v1/service";
|
|
11
|
+
export * from "./companies/v1/subscription";
|
package/gen/ts/index.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.
|
|
3
|
+
// protoc-gen-ts_proto v2.11.5
|
|
4
4
|
// protoc unknown
|
|
5
5
|
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
|
|
8
8
|
export * as common from "./index.common";
|
|
9
|
-
export * as auth from "./index.auth";
|
|
10
|
-
export * as companies from "./index.companies";
|