Debian Codegraph @

js/svc/user/v1/service_pb.ts

raw symbols SCIP
1 // @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=none"
2 // @generated from file svc/user/v1/service.proto (package svc.user.v1, syntax proto3)
3 /* eslint-disable */
4 // @ts-nocheck
5
6 import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
7 import { Message, proto3, Timestamp } from "@bufbuild/protobuf";
8 import { User } from "../../../types/v1/user_pb";
9 import { Organization } from "../../../types/v1/organization_pb";
10 import { Cursor } from "../../../types/v1/cursor_pb";
11
12 /**
13 * @generated from message svc.user.v1.WhoamiRequest
14 */
15 export class WhoamiRequest extends Message<WhoamiRequest> {
16 constructor(data?: PartialMessage<WhoamiRequest>) {
17 super();
18 proto3.util.initPartial(data, this);
19 }
20
21 static readonly runtime: typeof proto3 = proto3;
22 static readonly typeName = "svc.user.v1.WhoamiRequest";
23 static readonly fields: FieldList = proto3.util.newFieldList(() => [
24 ]);
25
26 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WhoamiRequest {
27 return new WhoamiRequest().fromBinary(bytes, options);
28 }
29
30 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WhoamiRequest {
31 return new WhoamiRequest().fromJson(jsonValue, options);
32 }
33
34 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WhoamiRequest {
35 return new WhoamiRequest().fromJsonString(jsonString, options);
36 }
37
38 static equals(a: WhoamiRequest | PlainMessage<WhoamiRequest> | undefined, b: WhoamiRequest | PlainMessage<WhoamiRequest> | undefined): boolean {
39 return proto3.util.equals(WhoamiRequest, a, b);
40 }
41 }
42
43 /**
44 * @generated from message svc.user.v1.WhoamiResponse
45 */
46 export class WhoamiResponse extends Message<WhoamiResponse> {
47 /**
48 * @generated from field: types.v1.User user = 1;
49 */
50 user?: User;
51
52 /**
53 * @generated from field: types.v1.Organization current_organization = 2;
54 */
55 currentOrganization?: Organization;
56
57 /**
58 * @generated from field: types.v1.Organization default_organization = 3;
59 */
60 defaultOrganization?: Organization;
61
62 constructor(data?: PartialMessage<WhoamiResponse>) {
63 super();
64 proto3.util.initPartial(data, this);
65 }
66
67 static readonly runtime: typeof proto3 = proto3;
68 static readonly typeName = "svc.user.v1.WhoamiResponse";
69 static readonly fields: FieldList = proto3.util.newFieldList(() => [
70 { no: 1, name: "user", kind: "message", T: User },
71 { no: 2, name: "current_organization", kind: "message", T: Organization },
72 { no: 3, name: "default_organization", kind: "message", T: Organization },
73 ]);
74
75 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WhoamiResponse {
76 return new WhoamiResponse().fromBinary(bytes, options);
77 }
78
79 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WhoamiResponse {
80 return new WhoamiResponse().fromJson(jsonValue, options);
81 }
82
83 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WhoamiResponse {
84 return new WhoamiResponse().fromJsonString(jsonString, options);
85 }
86
87 static equals(a: WhoamiResponse | PlainMessage<WhoamiResponse> | undefined, b: WhoamiResponse | PlainMessage<WhoamiResponse> | undefined): boolean {
88 return proto3.util.equals(WhoamiResponse, a, b);
89 }
90 }
91
92 /**
93 * @generated from message svc.user.v1.GetLogoutURLRequest
94 */
95 export class GetLogoutURLRequest extends Message<GetLogoutURLRequest> {
96 /**
97 * @generated from field: string return_to = 1;
98 */
99 returnTo = "";
100
101 constructor(data?: PartialMessage<GetLogoutURLRequest>) {
102 super();
103 proto3.util.initPartial(data, this);
104 }
105
106 static readonly runtime: typeof proto3 = proto3;
107 static readonly typeName = "svc.user.v1.GetLogoutURLRequest";
108 static readonly fields: FieldList = proto3.util.newFieldList(() => [
109 { no: 1, name: "return_to", kind: "scalar", T: 9 /* ScalarType.STRING */ },
110 ]);
111
112 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetLogoutURLRequest {
113 return new GetLogoutURLRequest().fromBinary(bytes, options);
114 }
115
116 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetLogoutURLRequest {
117 return new GetLogoutURLRequest().fromJson(jsonValue, options);
118 }
119
120 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetLogoutURLRequest {
121 return new GetLogoutURLRequest().fromJsonString(jsonString, options);
122 }
123
124 static equals(a: GetLogoutURLRequest | PlainMessage<GetLogoutURLRequest> | undefined, b: GetLogoutURLRequest | PlainMessage<GetLogoutURLRequest> | undefined): boolean {
125 return proto3.util.equals(GetLogoutURLRequest, a, b);
126 }
127 }
128
129 /**
130 * @generated from message svc.user.v1.GetLogoutURLResponse
131 */
132 export class GetLogoutURLResponse extends Message<GetLogoutURLResponse> {
133 /**
134 * @generated from field: string logout_url = 1;
135 */
136 logoutUrl = "";
137
138 constructor(data?: PartialMessage<GetLogoutURLResponse>) {
139 super();
140 proto3.util.initPartial(data, this);
141 }
142
143 static readonly runtime: typeof proto3 = proto3;
144 static readonly typeName = "svc.user.v1.GetLogoutURLResponse";
145 static readonly fields: FieldList = proto3.util.newFieldList(() => [
146 { no: 1, name: "logout_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
147 ]);
148
149 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetLogoutURLResponse {
150 return new GetLogoutURLResponse().fromBinary(bytes, options);
151 }
152
153 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetLogoutURLResponse {
154 return new GetLogoutURLResponse().fromJson(jsonValue, options);
155 }
156
157 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetLogoutURLResponse {
158 return new GetLogoutURLResponse().fromJsonString(jsonString, options);
159 }
160
161 static equals(a: GetLogoutURLResponse | PlainMessage<GetLogoutURLResponse> | undefined, b: GetLogoutURLResponse | PlainMessage<GetLogoutURLResponse> | undefined): boolean {
162 return proto3.util.equals(GetLogoutURLResponse, a, b);
163 }
164 }
165
166 /**
167 * @generated from message svc.user.v1.RefreshUserTokenRequest
168 */
169 export class RefreshUserTokenRequest extends Message<RefreshUserTokenRequest> {
170 constructor(data?: PartialMessage<RefreshUserTokenRequest>) {
171 super();
172 proto3.util.initPartial(data, this);
173 }
174
175 static readonly runtime: typeof proto3 = proto3;
176 static readonly typeName = "svc.user.v1.RefreshUserTokenRequest";
177 static readonly fields: FieldList = proto3.util.newFieldList(() => [
178 ]);
179
180 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RefreshUserTokenRequest {
181 return new RefreshUserTokenRequest().fromBinary(bytes, options);
182 }
183
184 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RefreshUserTokenRequest {
185 return new RefreshUserTokenRequest().fromJson(jsonValue, options);
186 }
187
188 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RefreshUserTokenRequest {
189 return new RefreshUserTokenRequest().fromJsonString(jsonString, options);
190 }
191
192 static equals(a: RefreshUserTokenRequest | PlainMessage<RefreshUserTokenRequest> | undefined, b: RefreshUserTokenRequest | PlainMessage<RefreshUserTokenRequest> | undefined): boolean {
193 return proto3.util.equals(RefreshUserTokenRequest, a, b);
194 }
195 }
196
197 /**
198 * @generated from message svc.user.v1.RefreshUserTokenResponse
199 */
200 export class RefreshUserTokenResponse extends Message<RefreshUserTokenResponse> {
201 /**
202 * @generated from field: string token = 1;
203 */
204 token = "";
205
206 /**
207 * @generated from field: google.protobuf.Timestamp refresh_at = 2;
208 */
209 refreshAt?: Timestamp;
210
211 /**
212 * @generated from field: google.protobuf.Timestamp expires_at = 3;
213 */
214 expiresAt?: Timestamp;
215
216 constructor(data?: PartialMessage<RefreshUserTokenResponse>) {
217 super();
218 proto3.util.initPartial(data, this);
219 }
220
221 static readonly runtime: typeof proto3 = proto3;
222 static readonly typeName = "svc.user.v1.RefreshUserTokenResponse";
223 static readonly fields: FieldList = proto3.util.newFieldList(() => [
224 { no: 1, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
225 { no: 2, name: "refresh_at", kind: "message", T: Timestamp },
226 { no: 3, name: "expires_at", kind: "message", T: Timestamp },
227 ]);
228
229 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RefreshUserTokenResponse {
230 return new RefreshUserTokenResponse().fromBinary(bytes, options);
231 }
232
233 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RefreshUserTokenResponse {
234 return new RefreshUserTokenResponse().fromJson(jsonValue, options);
235 }
236
237 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RefreshUserTokenResponse {
238 return new RefreshUserTokenResponse().fromJsonString(jsonString, options);
239 }
240
241 static equals(a: RefreshUserTokenResponse | PlainMessage<RefreshUserTokenResponse> | undefined, b: RefreshUserTokenResponse | PlainMessage<RefreshUserTokenResponse> | undefined): boolean {
242 return proto3.util.equals(RefreshUserTokenResponse, a, b);
243 }
244 }
245
246 /**
247 * @generated from message svc.user.v1.UpdateUserRequest
248 */
249 export class UpdateUserRequest extends Message<UpdateUserRequest> {
250 /**
251 * @generated from field: optional string first_name = 1;
252 */
253 firstName?: string;
254
255 /**
256 * @generated from field: optional string last_name = 2;
257 */
258 lastName?: string;
259
260 constructor(data?: PartialMessage<UpdateUserRequest>) {
261 super();
262 proto3.util.initPartial(data, this);
263 }
264
265 static readonly runtime: typeof proto3 = proto3;
266 static readonly typeName = "svc.user.v1.UpdateUserRequest";
267 static readonly fields: FieldList = proto3.util.newFieldList(() => [
268 { no: 1, name: "first_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
269 { no: 2, name: "last_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
270 ]);
271
272 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateUserRequest {
273 return new UpdateUserRequest().fromBinary(bytes, options);
274 }
275
276 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateUserRequest {
277 return new UpdateUserRequest().fromJson(jsonValue, options);
278 }
279
280 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateUserRequest {
281 return new UpdateUserRequest().fromJsonString(jsonString, options);
282 }
283
284 static equals(a: UpdateUserRequest | PlainMessage<UpdateUserRequest> | undefined, b: UpdateUserRequest | PlainMessage<UpdateUserRequest> | undefined): boolean {
285 return proto3.util.equals(UpdateUserRequest, a, b);
286 }
287 }
288
289 /**
290 * @generated from message svc.user.v1.UpdateUserResponse
291 */
292 export class UpdateUserResponse extends Message<UpdateUserResponse> {
293 /**
294 * @generated from field: types.v1.User user = 1;
295 */
296 user?: User;
297
298 constructor(data?: PartialMessage<UpdateUserResponse>) {
299 super();
300 proto3.util.initPartial(data, this);
301 }
302
303 static readonly runtime: typeof proto3 = proto3;
304 static readonly typeName = "svc.user.v1.UpdateUserResponse";
305 static readonly fields: FieldList = proto3.util.newFieldList(() => [
306 { no: 1, name: "user", kind: "message", T: User },
307 ]);
308
309 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateUserResponse {
310 return new UpdateUserResponse().fromBinary(bytes, options);
311 }
312
313 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateUserResponse {
314 return new UpdateUserResponse().fromJson(jsonValue, options);
315 }
316
317 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateUserResponse {
318 return new UpdateUserResponse().fromJsonString(jsonString, options);
319 }
320
321 static equals(a: UpdateUserResponse | PlainMessage<UpdateUserResponse> | undefined, b: UpdateUserResponse | PlainMessage<UpdateUserResponse> | undefined): boolean {
322 return proto3.util.equals(UpdateUserResponse, a, b);
323 }
324 }
325
326 /**
327 * @generated from message svc.user.v1.CreateOrganizationRequest
328 */
329 export class CreateOrganizationRequest extends Message<CreateOrganizationRequest> {
330 /**
331 * @generated from field: string name = 1;
332 */
333 name = "";
334
335 constructor(data?: PartialMessage<CreateOrganizationRequest>) {
336 super();
337 proto3.util.initPartial(data, this);
338 }
339
340 static readonly runtime: typeof proto3 = proto3;
341 static readonly typeName = "svc.user.v1.CreateOrganizationRequest";
342 static readonly fields: FieldList = proto3.util.newFieldList(() => [
343 { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
344 ]);
345
346 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateOrganizationRequest {
347 return new CreateOrganizationRequest().fromBinary(bytes, options);
348 }
349
350 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateOrganizationRequest {
351 return new CreateOrganizationRequest().fromJson(jsonValue, options);
352 }
353
354 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateOrganizationRequest {
355 return new CreateOrganizationRequest().fromJsonString(jsonString, options);
356 }
357
358 static equals(a: CreateOrganizationRequest | PlainMessage<CreateOrganizationRequest> | undefined, b: CreateOrganizationRequest | PlainMessage<CreateOrganizationRequest> | undefined): boolean {
359 return proto3.util.equals(CreateOrganizationRequest, a, b);
360 }
361 }
362
363 /**
364 * @generated from message svc.user.v1.CreateOrganizationResponse
365 */
366 export class CreateOrganizationResponse extends Message<CreateOrganizationResponse> {
367 /**
368 * @generated from field: types.v1.Organization organization = 1;
369 */
370 organization?: Organization;
371
372 constructor(data?: PartialMessage<CreateOrganizationResponse>) {
373 super();
374 proto3.util.initPartial(data, this);
375 }
376
377 static readonly runtime: typeof proto3 = proto3;
378 static readonly typeName = "svc.user.v1.CreateOrganizationResponse";
379 static readonly fields: FieldList = proto3.util.newFieldList(() => [
380 { no: 1, name: "organization", kind: "message", T: Organization },
381 ]);
382
383 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateOrganizationResponse {
384 return new CreateOrganizationResponse().fromBinary(bytes, options);
385 }
386
387 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateOrganizationResponse {
388 return new CreateOrganizationResponse().fromJson(jsonValue, options);
389 }
390
391 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateOrganizationResponse {
392 return new CreateOrganizationResponse().fromJsonString(jsonString, options);
393 }
394
395 static equals(a: CreateOrganizationResponse | PlainMessage<CreateOrganizationResponse> | undefined, b: CreateOrganizationResponse | PlainMessage<CreateOrganizationResponse> | undefined): boolean {
396 return proto3.util.equals(CreateOrganizationResponse, a, b);
397 }
398 }
399
400 /**
401 * @generated from message svc.user.v1.ListOrganizationRequest
402 */
403 export class ListOrganizationRequest extends Message<ListOrganizationRequest> {
404 /**
405 * @generated from field: types.v1.Cursor cursor = 1;
406 */
407 cursor?: Cursor;
408
409 /**
410 * @generated from field: int32 limit = 2;
411 */
412 limit = 0;
413
414 constructor(data?: PartialMessage<ListOrganizationRequest>) {
415 super();
416 proto3.util.initPartial(data, this);
417 }
418
419 static readonly runtime: typeof proto3 = proto3;
420 static readonly typeName = "svc.user.v1.ListOrganizationRequest";
421 static readonly fields: FieldList = proto3.util.newFieldList(() => [
422 { no: 1, name: "cursor", kind: "message", T: Cursor },
423 { no: 2, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
424 ]);
425
426 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListOrganizationRequest {
427 return new ListOrganizationRequest().fromBinary(bytes, options);
428 }
429
430 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListOrganizationRequest {
431 return new ListOrganizationRequest().fromJson(jsonValue, options);
432 }
433
434 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListOrganizationRequest {
435 return new ListOrganizationRequest().fromJsonString(jsonString, options);
436 }
437
438 static equals(a: ListOrganizationRequest | PlainMessage<ListOrganizationRequest> | undefined, b: ListOrganizationRequest | PlainMessage<ListOrganizationRequest> | undefined): boolean {
439 return proto3.util.equals(ListOrganizationRequest, a, b);
440 }
441 }
442
443 /**
444 * @generated from message svc.user.v1.ListOrganizationResponse
445 */
446 export class ListOrganizationResponse extends Message<ListOrganizationResponse> {
447 /**
448 * @generated from field: types.v1.Cursor next = 1;
449 */
450 next?: Cursor;
451
452 /**
453 * @generated from field: repeated svc.user.v1.ListOrganizationResponse.ListItem items = 2;
454 */
455 items: ListOrganizationResponse_ListItem[] = [];
456
457 /**
458 * @generated from field: types.v1.Organization default_organization = 3;
459 */
460 defaultOrganization?: Organization;
461
462 constructor(data?: PartialMessage<ListOrganizationResponse>) {
463 super();
464 proto3.util.initPartial(data, this);
465 }
466
467 static readonly runtime: typeof proto3 = proto3;
468 static readonly typeName = "svc.user.v1.ListOrganizationResponse";
469 static readonly fields: FieldList = proto3.util.newFieldList(() => [
470 { no: 1, name: "next", kind: "message", T: Cursor },
471 { no: 2, name: "items", kind: "message", T: ListOrganizationResponse_ListItem, repeated: true },
472 { no: 3, name: "default_organization", kind: "message", T: Organization },
473 ]);
474
475 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListOrganizationResponse {
476 return new ListOrganizationResponse().fromBinary(bytes, options);
477 }
478
479 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListOrganizationResponse {
480 return new ListOrganizationResponse().fromJson(jsonValue, options);
481 }
482
483 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListOrganizationResponse {
484 return new ListOrganizationResponse().fromJsonString(jsonString, options);
485 }
486
487 static equals(a: ListOrganizationResponse | PlainMessage<ListOrganizationResponse> | undefined, b: ListOrganizationResponse | PlainMessage<ListOrganizationResponse> | undefined): boolean {
488 return proto3.util.equals(ListOrganizationResponse, a, b);
489 }
490 }
491
492 /**
493 * @generated from message svc.user.v1.ListOrganizationResponse.ListItem
494 */
495 export class ListOrganizationResponse_ListItem extends Message<ListOrganizationResponse_ListItem> {
496 /**
497 * @generated from field: types.v1.Organization organization = 1;
498 */
499 organization?: Organization;
500
501 constructor(data?: PartialMessage<ListOrganizationResponse_ListItem>) {
502 super();
503 proto3.util.initPartial(data, this);
504 }
505
506 static readonly runtime: typeof proto3 = proto3;
507 static readonly typeName = "svc.user.v1.ListOrganizationResponse.ListItem";
508 static readonly fields: FieldList = proto3.util.newFieldList(() => [
509 { no: 1, name: "organization", kind: "message", T: Organization },
510 ]);
511
512 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListOrganizationResponse_ListItem {
513 return new ListOrganizationResponse_ListItem().fromBinary(bytes, options);
514 }
515
516 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListOrganizationResponse_ListItem {
517 return new ListOrganizationResponse_ListItem().fromJson(jsonValue, options);
518 }
519
520 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListOrganizationResponse_ListItem {
521 return new ListOrganizationResponse_ListItem().fromJsonString(jsonString, options);
522 }
523
524 static equals(a: ListOrganizationResponse_ListItem | PlainMessage<ListOrganizationResponse_ListItem> | undefined, b: ListOrganizationResponse_ListItem | PlainMessage<ListOrganizationResponse_ListItem> | undefined): boolean {
525 return proto3.util.equals(ListOrganizationResponse_ListItem, a, b);
526 }
527 }
528