@ssoeasy-dev/proto 1.1.0-beta.2
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/LICENSE +22 -0
- package/README.md +228 -0
- package/gen/ts/abac/v1/employee_attribute.ts +501 -0
- package/gen/ts/abac/v1/models/employee_attribute.ts +190 -0
- package/gen/ts/auth/v1/auth.ts +663 -0
- package/gen/ts/auth/v1/verification.ts +340 -0
- package/gen/ts/common/v1/types.ts +142 -0
- package/gen/ts/companies/v1/models/company.ts +204 -0
- package/gen/ts/companies/v1/models/employee.ts +175 -0
- package/gen/ts/companies/v1/models/employee_company.ts +145 -0
- package/gen/ts/companies/v1/models/subscription.ts +166 -0
- package/gen/ts/companies/v1/owner.ts +569 -0
- package/gen/ts/google/protobuf/timestamp.ts +233 -0
- package/gen/ts/index.abac.ts +8 -0
- package/gen/ts/index.abac.v1.models.ts +8 -0
- package/gen/ts/index.abac.v1.ts +9 -0
- package/gen/ts/index.auth.ts +8 -0
- package/gen/ts/index.auth.v1.ts +9 -0
- package/gen/ts/index.common.ts +8 -0
- package/gen/ts/index.common.v1.ts +8 -0
- package/gen/ts/index.companies.ts +8 -0
- package/gen/ts/index.companies.v1.models.ts +11 -0
- package/gen/ts/index.companies.v1.ts +9 -0
- package/gen/ts/index.google.protobuf.ts +8 -0
- package/gen/ts/index.google.ts +8 -0
- package/gen/ts/index.services.ts +8 -0
- package/gen/ts/index.services.v1.ts +8 -0
- package/gen/ts/index.ts +13 -0
- package/gen/ts/services/v1/services.ts +293 -0
- package/package.json +69 -0
- package/proto/abac/v1/employee_attribute.proto +31 -0
- package/proto/abac/v1/models/employee_attribute.proto +11 -0
- package/proto/auth/v1/auth.proto +39 -0
- package/proto/auth/v1/verification.proto +25 -0
- package/proto/common/v1/types.proto +10 -0
- package/proto/companies/v1/models/company.proto +12 -0
- package/proto/companies/v1/models/employee.proto +11 -0
- package/proto/companies/v1/models/employee_company.proto +9 -0
- package/proto/companies/v1/models/subscription.proto +10 -0
- package/proto/companies/v1/owner.proto +38 -0
- package/proto/services/v1/services.proto +19 -0
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.2
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: auth/v1/auth.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import type { CallContext, CallOptions } from "nice-grpc-common";
|
|
10
|
+
import {
|
|
11
|
+
VerificationType,
|
|
12
|
+
verificationTypeFromJSON,
|
|
13
|
+
verificationTypeToJSON,
|
|
14
|
+
verificationTypeToNumber,
|
|
15
|
+
} from "./verification";
|
|
16
|
+
|
|
17
|
+
export interface RegistrationRequest {
|
|
18
|
+
$type: "auth.v1.RegistrationRequest";
|
|
19
|
+
userId: string;
|
|
20
|
+
serviceId: string;
|
|
21
|
+
companyId: string;
|
|
22
|
+
attributeName: string;
|
|
23
|
+
attributeValue: string;
|
|
24
|
+
contact: string;
|
|
25
|
+
verificationType: VerificationType;
|
|
26
|
+
password: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface RegistrationResponse {
|
|
30
|
+
$type: "auth.v1.RegistrationResponse";
|
|
31
|
+
credentialId: string;
|
|
32
|
+
attributeId: string;
|
|
33
|
+
verificationId: string;
|
|
34
|
+
value: string;
|
|
35
|
+
expiresAt: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface RegistrationCompensateRequest {
|
|
39
|
+
$type: "auth.v1.RegistrationCompensateRequest";
|
|
40
|
+
credentialId: string;
|
|
41
|
+
verificationId: string;
|
|
42
|
+
userAttributeId: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface StatusResponse {
|
|
46
|
+
$type: "auth.v1.StatusResponse";
|
|
47
|
+
success: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function createBaseRegistrationRequest(): RegistrationRequest {
|
|
51
|
+
return {
|
|
52
|
+
$type: "auth.v1.RegistrationRequest",
|
|
53
|
+
userId: "",
|
|
54
|
+
serviceId: "",
|
|
55
|
+
companyId: "",
|
|
56
|
+
attributeName: "",
|
|
57
|
+
attributeValue: "",
|
|
58
|
+
contact: "",
|
|
59
|
+
verificationType: VerificationType.email_code,
|
|
60
|
+
password: "",
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const RegistrationRequest: MessageFns<RegistrationRequest, "auth.v1.RegistrationRequest"> = {
|
|
65
|
+
$type: "auth.v1.RegistrationRequest" as const,
|
|
66
|
+
|
|
67
|
+
encode(message: RegistrationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
68
|
+
if (message.userId !== "") {
|
|
69
|
+
writer.uint32(10).string(message.userId);
|
|
70
|
+
}
|
|
71
|
+
if (message.serviceId !== "") {
|
|
72
|
+
writer.uint32(18).string(message.serviceId);
|
|
73
|
+
}
|
|
74
|
+
if (message.companyId !== "") {
|
|
75
|
+
writer.uint32(26).string(message.companyId);
|
|
76
|
+
}
|
|
77
|
+
if (message.attributeName !== "") {
|
|
78
|
+
writer.uint32(34).string(message.attributeName);
|
|
79
|
+
}
|
|
80
|
+
if (message.attributeValue !== "") {
|
|
81
|
+
writer.uint32(42).string(message.attributeValue);
|
|
82
|
+
}
|
|
83
|
+
if (message.contact !== "") {
|
|
84
|
+
writer.uint32(50).string(message.contact);
|
|
85
|
+
}
|
|
86
|
+
if (message.verificationType !== VerificationType.email_code) {
|
|
87
|
+
writer.uint32(56).int32(verificationTypeToNumber(message.verificationType));
|
|
88
|
+
}
|
|
89
|
+
if (message.password !== "") {
|
|
90
|
+
writer.uint32(66).string(message.password);
|
|
91
|
+
}
|
|
92
|
+
return writer;
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
decode(input: BinaryReader | Uint8Array, length?: number): RegistrationRequest {
|
|
96
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
97
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
98
|
+
const message = createBaseRegistrationRequest();
|
|
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
|
+
|
|
107
|
+
message.userId = reader.string();
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
case 2: {
|
|
111
|
+
if (tag !== 18) {
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
message.serviceId = reader.string();
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
case 3: {
|
|
119
|
+
if (tag !== 26) {
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message.companyId = reader.string();
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
case 4: {
|
|
127
|
+
if (tag !== 34) {
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
message.attributeName = reader.string();
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
case 5: {
|
|
135
|
+
if (tag !== 42) {
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
message.attributeValue = reader.string();
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
case 6: {
|
|
143
|
+
if (tag !== 50) {
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
message.contact = reader.string();
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
case 7: {
|
|
151
|
+
if (tag !== 56) {
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
message.verificationType = verificationTypeFromJSON(reader.int32());
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
case 8: {
|
|
159
|
+
if (tag !== 66) {
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
message.password = reader.string();
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
reader.skip(tag & 7);
|
|
171
|
+
}
|
|
172
|
+
return message;
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
fromJSON(object: any): RegistrationRequest {
|
|
176
|
+
return {
|
|
177
|
+
$type: RegistrationRequest.$type,
|
|
178
|
+
userId: isSet(object.userId)
|
|
179
|
+
? globalThis.String(object.userId)
|
|
180
|
+
: isSet(object.user_id)
|
|
181
|
+
? globalThis.String(object.user_id)
|
|
182
|
+
: "",
|
|
183
|
+
serviceId: isSet(object.serviceId)
|
|
184
|
+
? globalThis.String(object.serviceId)
|
|
185
|
+
: isSet(object.service_id)
|
|
186
|
+
? globalThis.String(object.service_id)
|
|
187
|
+
: "",
|
|
188
|
+
companyId: isSet(object.companyId)
|
|
189
|
+
? globalThis.String(object.companyId)
|
|
190
|
+
: isSet(object.company_id)
|
|
191
|
+
? globalThis.String(object.company_id)
|
|
192
|
+
: "",
|
|
193
|
+
attributeName: isSet(object.attributeName)
|
|
194
|
+
? globalThis.String(object.attributeName)
|
|
195
|
+
: isSet(object.attribute_name)
|
|
196
|
+
? globalThis.String(object.attribute_name)
|
|
197
|
+
: "",
|
|
198
|
+
attributeValue: isSet(object.attributeValue)
|
|
199
|
+
? globalThis.String(object.attributeValue)
|
|
200
|
+
: isSet(object.attribute_value)
|
|
201
|
+
? globalThis.String(object.attribute_value)
|
|
202
|
+
: "",
|
|
203
|
+
contact: isSet(object.contact) ? globalThis.String(object.contact) : "",
|
|
204
|
+
verificationType: isSet(object.verificationType)
|
|
205
|
+
? verificationTypeFromJSON(object.verificationType)
|
|
206
|
+
: isSet(object.verification_type)
|
|
207
|
+
? verificationTypeFromJSON(object.verification_type)
|
|
208
|
+
: VerificationType.email_code,
|
|
209
|
+
password: isSet(object.password) ? globalThis.String(object.password) : "",
|
|
210
|
+
};
|
|
211
|
+
},
|
|
212
|
+
|
|
213
|
+
toJSON(message: RegistrationRequest): unknown {
|
|
214
|
+
const obj: any = {};
|
|
215
|
+
if (message.userId !== "") {
|
|
216
|
+
obj.userId = message.userId;
|
|
217
|
+
}
|
|
218
|
+
if (message.serviceId !== "") {
|
|
219
|
+
obj.serviceId = message.serviceId;
|
|
220
|
+
}
|
|
221
|
+
if (message.companyId !== "") {
|
|
222
|
+
obj.companyId = message.companyId;
|
|
223
|
+
}
|
|
224
|
+
if (message.attributeName !== "") {
|
|
225
|
+
obj.attributeName = message.attributeName;
|
|
226
|
+
}
|
|
227
|
+
if (message.attributeValue !== "") {
|
|
228
|
+
obj.attributeValue = message.attributeValue;
|
|
229
|
+
}
|
|
230
|
+
if (message.contact !== "") {
|
|
231
|
+
obj.contact = message.contact;
|
|
232
|
+
}
|
|
233
|
+
if (message.verificationType !== VerificationType.email_code) {
|
|
234
|
+
obj.verificationType = verificationTypeToJSON(message.verificationType);
|
|
235
|
+
}
|
|
236
|
+
if (message.password !== "") {
|
|
237
|
+
obj.password = message.password;
|
|
238
|
+
}
|
|
239
|
+
return obj;
|
|
240
|
+
},
|
|
241
|
+
|
|
242
|
+
create<I extends Exact<DeepPartial<RegistrationRequest>, I>>(base?: I): RegistrationRequest {
|
|
243
|
+
return RegistrationRequest.fromPartial(base ?? ({} as any));
|
|
244
|
+
},
|
|
245
|
+
fromPartial<I extends Exact<DeepPartial<RegistrationRequest>, I>>(object: I): RegistrationRequest {
|
|
246
|
+
const message = createBaseRegistrationRequest();
|
|
247
|
+
message.userId = object.userId ?? "";
|
|
248
|
+
message.serviceId = object.serviceId ?? "";
|
|
249
|
+
message.companyId = object.companyId ?? "";
|
|
250
|
+
message.attributeName = object.attributeName ?? "";
|
|
251
|
+
message.attributeValue = object.attributeValue ?? "";
|
|
252
|
+
message.contact = object.contact ?? "";
|
|
253
|
+
message.verificationType = object.verificationType ?? VerificationType.email_code;
|
|
254
|
+
message.password = object.password ?? "";
|
|
255
|
+
return message;
|
|
256
|
+
},
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
function createBaseRegistrationResponse(): RegistrationResponse {
|
|
260
|
+
return {
|
|
261
|
+
$type: "auth.v1.RegistrationResponse",
|
|
262
|
+
credentialId: "",
|
|
263
|
+
attributeId: "",
|
|
264
|
+
verificationId: "",
|
|
265
|
+
value: "",
|
|
266
|
+
expiresAt: 0,
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export const RegistrationResponse: MessageFns<RegistrationResponse, "auth.v1.RegistrationResponse"> = {
|
|
271
|
+
$type: "auth.v1.RegistrationResponse" as const,
|
|
272
|
+
|
|
273
|
+
encode(message: RegistrationResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
274
|
+
if (message.credentialId !== "") {
|
|
275
|
+
writer.uint32(10).string(message.credentialId);
|
|
276
|
+
}
|
|
277
|
+
if (message.attributeId !== "") {
|
|
278
|
+
writer.uint32(18).string(message.attributeId);
|
|
279
|
+
}
|
|
280
|
+
if (message.verificationId !== "") {
|
|
281
|
+
writer.uint32(26).string(message.verificationId);
|
|
282
|
+
}
|
|
283
|
+
if (message.value !== "") {
|
|
284
|
+
writer.uint32(34).string(message.value);
|
|
285
|
+
}
|
|
286
|
+
if (message.expiresAt !== 0) {
|
|
287
|
+
writer.uint32(40).int64(message.expiresAt);
|
|
288
|
+
}
|
|
289
|
+
return writer;
|
|
290
|
+
},
|
|
291
|
+
|
|
292
|
+
decode(input: BinaryReader | Uint8Array, length?: number): RegistrationResponse {
|
|
293
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
294
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
295
|
+
const message = createBaseRegistrationResponse();
|
|
296
|
+
while (reader.pos < end) {
|
|
297
|
+
const tag = reader.uint32();
|
|
298
|
+
switch (tag >>> 3) {
|
|
299
|
+
case 1: {
|
|
300
|
+
if (tag !== 10) {
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
message.credentialId = reader.string();
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
case 2: {
|
|
308
|
+
if (tag !== 18) {
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
message.attributeId = reader.string();
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
case 3: {
|
|
316
|
+
if (tag !== 26) {
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
message.verificationId = reader.string();
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
case 4: {
|
|
324
|
+
if (tag !== 34) {
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
message.value = reader.string();
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
case 5: {
|
|
332
|
+
if (tag !== 40) {
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
message.expiresAt = longToNumber(reader.int64());
|
|
337
|
+
continue;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
reader.skip(tag & 7);
|
|
344
|
+
}
|
|
345
|
+
return message;
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
fromJSON(object: any): RegistrationResponse {
|
|
349
|
+
return {
|
|
350
|
+
$type: RegistrationResponse.$type,
|
|
351
|
+
credentialId: isSet(object.credentialId)
|
|
352
|
+
? globalThis.String(object.credentialId)
|
|
353
|
+
: isSet(object.credential_id)
|
|
354
|
+
? globalThis.String(object.credential_id)
|
|
355
|
+
: "",
|
|
356
|
+
attributeId: isSet(object.attributeId)
|
|
357
|
+
? globalThis.String(object.attributeId)
|
|
358
|
+
: isSet(object.attribute_id)
|
|
359
|
+
? globalThis.String(object.attribute_id)
|
|
360
|
+
: "",
|
|
361
|
+
verificationId: isSet(object.verificationId)
|
|
362
|
+
? globalThis.String(object.verificationId)
|
|
363
|
+
: isSet(object.verification_id)
|
|
364
|
+
? globalThis.String(object.verification_id)
|
|
365
|
+
: "",
|
|
366
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
367
|
+
expiresAt: isSet(object.expiresAt)
|
|
368
|
+
? globalThis.Number(object.expiresAt)
|
|
369
|
+
: isSet(object.expires_at)
|
|
370
|
+
? globalThis.Number(object.expires_at)
|
|
371
|
+
: 0,
|
|
372
|
+
};
|
|
373
|
+
},
|
|
374
|
+
|
|
375
|
+
toJSON(message: RegistrationResponse): unknown {
|
|
376
|
+
const obj: any = {};
|
|
377
|
+
if (message.credentialId !== "") {
|
|
378
|
+
obj.credentialId = message.credentialId;
|
|
379
|
+
}
|
|
380
|
+
if (message.attributeId !== "") {
|
|
381
|
+
obj.attributeId = message.attributeId;
|
|
382
|
+
}
|
|
383
|
+
if (message.verificationId !== "") {
|
|
384
|
+
obj.verificationId = message.verificationId;
|
|
385
|
+
}
|
|
386
|
+
if (message.value !== "") {
|
|
387
|
+
obj.value = message.value;
|
|
388
|
+
}
|
|
389
|
+
if (message.expiresAt !== 0) {
|
|
390
|
+
obj.expiresAt = Math.round(message.expiresAt);
|
|
391
|
+
}
|
|
392
|
+
return obj;
|
|
393
|
+
},
|
|
394
|
+
|
|
395
|
+
create<I extends Exact<DeepPartial<RegistrationResponse>, I>>(base?: I): RegistrationResponse {
|
|
396
|
+
return RegistrationResponse.fromPartial(base ?? ({} as any));
|
|
397
|
+
},
|
|
398
|
+
fromPartial<I extends Exact<DeepPartial<RegistrationResponse>, I>>(object: I): RegistrationResponse {
|
|
399
|
+
const message = createBaseRegistrationResponse();
|
|
400
|
+
message.credentialId = object.credentialId ?? "";
|
|
401
|
+
message.attributeId = object.attributeId ?? "";
|
|
402
|
+
message.verificationId = object.verificationId ?? "";
|
|
403
|
+
message.value = object.value ?? "";
|
|
404
|
+
message.expiresAt = object.expiresAt ?? 0;
|
|
405
|
+
return message;
|
|
406
|
+
},
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
function createBaseRegistrationCompensateRequest(): RegistrationCompensateRequest {
|
|
410
|
+
return { $type: "auth.v1.RegistrationCompensateRequest", credentialId: "", verificationId: "", userAttributeId: "" };
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export const RegistrationCompensateRequest: MessageFns<
|
|
414
|
+
RegistrationCompensateRequest,
|
|
415
|
+
"auth.v1.RegistrationCompensateRequest"
|
|
416
|
+
> = {
|
|
417
|
+
$type: "auth.v1.RegistrationCompensateRequest" as const,
|
|
418
|
+
|
|
419
|
+
encode(message: RegistrationCompensateRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
420
|
+
if (message.credentialId !== "") {
|
|
421
|
+
writer.uint32(10).string(message.credentialId);
|
|
422
|
+
}
|
|
423
|
+
if (message.verificationId !== "") {
|
|
424
|
+
writer.uint32(18).string(message.verificationId);
|
|
425
|
+
}
|
|
426
|
+
if (message.userAttributeId !== "") {
|
|
427
|
+
writer.uint32(26).string(message.userAttributeId);
|
|
428
|
+
}
|
|
429
|
+
return writer;
|
|
430
|
+
},
|
|
431
|
+
|
|
432
|
+
decode(input: BinaryReader | Uint8Array, length?: number): RegistrationCompensateRequest {
|
|
433
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
434
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
435
|
+
const message = createBaseRegistrationCompensateRequest();
|
|
436
|
+
while (reader.pos < end) {
|
|
437
|
+
const tag = reader.uint32();
|
|
438
|
+
switch (tag >>> 3) {
|
|
439
|
+
case 1: {
|
|
440
|
+
if (tag !== 10) {
|
|
441
|
+
break;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
message.credentialId = reader.string();
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
case 2: {
|
|
448
|
+
if (tag !== 18) {
|
|
449
|
+
break;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
message.verificationId = reader.string();
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
case 3: {
|
|
456
|
+
if (tag !== 26) {
|
|
457
|
+
break;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
message.userAttributeId = 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
|
+
fromJSON(object: any): RegistrationCompensateRequest {
|
|
473
|
+
return {
|
|
474
|
+
$type: RegistrationCompensateRequest.$type,
|
|
475
|
+
credentialId: isSet(object.credentialId)
|
|
476
|
+
? globalThis.String(object.credentialId)
|
|
477
|
+
: isSet(object.credential_id)
|
|
478
|
+
? globalThis.String(object.credential_id)
|
|
479
|
+
: "",
|
|
480
|
+
verificationId: isSet(object.verificationId)
|
|
481
|
+
? globalThis.String(object.verificationId)
|
|
482
|
+
: isSet(object.verification_id)
|
|
483
|
+
? globalThis.String(object.verification_id)
|
|
484
|
+
: "",
|
|
485
|
+
userAttributeId: isSet(object.userAttributeId)
|
|
486
|
+
? globalThis.String(object.userAttributeId)
|
|
487
|
+
: isSet(object.user_attribute_id)
|
|
488
|
+
? globalThis.String(object.user_attribute_id)
|
|
489
|
+
: "",
|
|
490
|
+
};
|
|
491
|
+
},
|
|
492
|
+
|
|
493
|
+
toJSON(message: RegistrationCompensateRequest): unknown {
|
|
494
|
+
const obj: any = {};
|
|
495
|
+
if (message.credentialId !== "") {
|
|
496
|
+
obj.credentialId = message.credentialId;
|
|
497
|
+
}
|
|
498
|
+
if (message.verificationId !== "") {
|
|
499
|
+
obj.verificationId = message.verificationId;
|
|
500
|
+
}
|
|
501
|
+
if (message.userAttributeId !== "") {
|
|
502
|
+
obj.userAttributeId = message.userAttributeId;
|
|
503
|
+
}
|
|
504
|
+
return obj;
|
|
505
|
+
},
|
|
506
|
+
|
|
507
|
+
create<I extends Exact<DeepPartial<RegistrationCompensateRequest>, I>>(base?: I): RegistrationCompensateRequest {
|
|
508
|
+
return RegistrationCompensateRequest.fromPartial(base ?? ({} as any));
|
|
509
|
+
},
|
|
510
|
+
fromPartial<I extends Exact<DeepPartial<RegistrationCompensateRequest>, I>>(
|
|
511
|
+
object: I,
|
|
512
|
+
): RegistrationCompensateRequest {
|
|
513
|
+
const message = createBaseRegistrationCompensateRequest();
|
|
514
|
+
message.credentialId = object.credentialId ?? "";
|
|
515
|
+
message.verificationId = object.verificationId ?? "";
|
|
516
|
+
message.userAttributeId = object.userAttributeId ?? "";
|
|
517
|
+
return message;
|
|
518
|
+
},
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
function createBaseStatusResponse(): StatusResponse {
|
|
522
|
+
return { $type: "auth.v1.StatusResponse", success: false };
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export const StatusResponse: MessageFns<StatusResponse, "auth.v1.StatusResponse"> = {
|
|
526
|
+
$type: "auth.v1.StatusResponse" as const,
|
|
527
|
+
|
|
528
|
+
encode(message: StatusResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
529
|
+
if (message.success !== false) {
|
|
530
|
+
writer.uint32(8).bool(message.success);
|
|
531
|
+
}
|
|
532
|
+
return writer;
|
|
533
|
+
},
|
|
534
|
+
|
|
535
|
+
decode(input: BinaryReader | Uint8Array, length?: number): StatusResponse {
|
|
536
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
537
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
538
|
+
const message = createBaseStatusResponse();
|
|
539
|
+
while (reader.pos < end) {
|
|
540
|
+
const tag = reader.uint32();
|
|
541
|
+
switch (tag >>> 3) {
|
|
542
|
+
case 1: {
|
|
543
|
+
if (tag !== 8) {
|
|
544
|
+
break;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
message.success = reader.bool();
|
|
548
|
+
continue;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
reader.skip(tag & 7);
|
|
555
|
+
}
|
|
556
|
+
return message;
|
|
557
|
+
},
|
|
558
|
+
|
|
559
|
+
fromJSON(object: any): StatusResponse {
|
|
560
|
+
return { $type: StatusResponse.$type, success: isSet(object.success) ? globalThis.Boolean(object.success) : false };
|
|
561
|
+
},
|
|
562
|
+
|
|
563
|
+
toJSON(message: StatusResponse): unknown {
|
|
564
|
+
const obj: any = {};
|
|
565
|
+
if (message.success !== false) {
|
|
566
|
+
obj.success = message.success;
|
|
567
|
+
}
|
|
568
|
+
return obj;
|
|
569
|
+
},
|
|
570
|
+
|
|
571
|
+
create<I extends Exact<DeepPartial<StatusResponse>, I>>(base?: I): StatusResponse {
|
|
572
|
+
return StatusResponse.fromPartial(base ?? ({} as any));
|
|
573
|
+
},
|
|
574
|
+
fromPartial<I extends Exact<DeepPartial<StatusResponse>, I>>(object: I): StatusResponse {
|
|
575
|
+
const message = createBaseStatusResponse();
|
|
576
|
+
message.success = object.success ?? false;
|
|
577
|
+
return message;
|
|
578
|
+
},
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
export type AuthServiceDefinition = typeof AuthServiceDefinition;
|
|
582
|
+
export const AuthServiceDefinition = {
|
|
583
|
+
name: "AuthService",
|
|
584
|
+
fullName: "auth.v1.AuthService",
|
|
585
|
+
methods: {
|
|
586
|
+
registration: {
|
|
587
|
+
name: "Registration",
|
|
588
|
+
requestType: RegistrationRequest,
|
|
589
|
+
requestStream: false,
|
|
590
|
+
responseType: RegistrationResponse,
|
|
591
|
+
responseStream: false,
|
|
592
|
+
options: {},
|
|
593
|
+
},
|
|
594
|
+
registrationCompensate: {
|
|
595
|
+
name: "RegistrationCompensate",
|
|
596
|
+
requestType: RegistrationCompensateRequest,
|
|
597
|
+
requestStream: false,
|
|
598
|
+
responseType: StatusResponse,
|
|
599
|
+
responseStream: false,
|
|
600
|
+
options: {},
|
|
601
|
+
},
|
|
602
|
+
},
|
|
603
|
+
} as const;
|
|
604
|
+
|
|
605
|
+
export interface AuthServiceImplementation<CallContextExt = {}> {
|
|
606
|
+
registration(
|
|
607
|
+
request: RegistrationRequest,
|
|
608
|
+
context: CallContext & CallContextExt,
|
|
609
|
+
): Promise<DeepPartial<RegistrationResponse>>;
|
|
610
|
+
registrationCompensate(
|
|
611
|
+
request: RegistrationCompensateRequest,
|
|
612
|
+
context: CallContext & CallContextExt,
|
|
613
|
+
): Promise<DeepPartial<StatusResponse>>;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
export interface AuthServiceClient<CallOptionsExt = {}> {
|
|
617
|
+
registration(
|
|
618
|
+
request: DeepPartial<RegistrationRequest>,
|
|
619
|
+
options?: CallOptions & CallOptionsExt,
|
|
620
|
+
): Promise<RegistrationResponse>;
|
|
621
|
+
registrationCompensate(
|
|
622
|
+
request: DeepPartial<RegistrationCompensateRequest>,
|
|
623
|
+
options?: CallOptions & CallOptionsExt,
|
|
624
|
+
): Promise<StatusResponse>;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
628
|
+
|
|
629
|
+
type DeepPartial<T> = T extends Builtin ? T
|
|
630
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
631
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
632
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
633
|
+
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
|
|
634
|
+
: Partial<T>;
|
|
635
|
+
|
|
636
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
637
|
+
type Exact<P, I extends P> = P extends Builtin ? P
|
|
638
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
|
|
639
|
+
|
|
640
|
+
function longToNumber(int64: { toString(): string }): number {
|
|
641
|
+
const num = globalThis.Number(int64.toString());
|
|
642
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
643
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
644
|
+
}
|
|
645
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
646
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
647
|
+
}
|
|
648
|
+
return num;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
function isSet(value: any): boolean {
|
|
652
|
+
return value !== null && value !== undefined;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
interface MessageFns<T, V extends string> {
|
|
656
|
+
readonly $type: V;
|
|
657
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
658
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
659
|
+
fromJSON(object: any): T;
|
|
660
|
+
toJSON(message: T): unknown;
|
|
661
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
662
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
663
|
+
}
|