@miradorlabs/web-grpc 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +5 -0
  2. package/google/protobuf/timestamp.ts +229 -0
  3. package/package.json +11 -0
  4. package/proto/gateway/common/v1/status.ts +179 -0
  5. package/proto/gateway/common/v1/status_grpc_pb.js +1 -0
  6. package/proto/gateway/common/v1/status_pb.js +237 -0
  7. package/proto/gateway/common/v1/types.ts +176 -0
  8. package/proto/gateway/common/v1/types_grpc_pb.js +1 -0
  9. package/proto/gateway/common/v1/types_pb.js +216 -0
  10. package/proto/gateway/web/v1/account_gateway.ts +7037 -0
  11. package/proto/gateway/web/v1/account_gateway_grpc_pb.js +813 -0
  12. package/proto/gateway/web/v1/account_gateway_pb.js +14338 -0
  13. package/proto/gateway/web/v1/automation_gateway.ts +5605 -0
  14. package/proto/gateway/web/v1/automation_gateway_grpc_pb.js +485 -0
  15. package/proto/gateway/web/v1/automation_gateway_pb.js +11618 -0
  16. package/proto/gateway/web/v1/chain_gateway.ts +3805 -0
  17. package/proto/gateway/web/v1/chain_gateway_grpc_pb.js +115 -0
  18. package/proto/gateway/web/v1/chain_gateway_pb.js +7049 -0
  19. package/proto/gateway/web/v1/market_gateway.ts +492 -0
  20. package/proto/gateway/web/v1/market_gateway_grpc_pb.js +45 -0
  21. package/proto/gateway/web/v1/market_gateway_pb.js +1063 -0
  22. package/proto/gateway/web/v1/oauth_gateway.ts +1163 -0
  23. package/proto/gateway/web/v1/oauth_gateway_grpc_pb.js +150 -0
  24. package/proto/gateway/web/v1/oauth_gateway_pb.js +2316 -0
  25. package/proto/gateway/web/v1/plan_gateway.ts +2463 -0
  26. package/proto/gateway/web/v1/plan_gateway_grpc_pb.js +152 -0
  27. package/proto/gateway/web/v1/plan_gateway_pb.js +4840 -0
  28. package/proto/gateway/web/v1/stream_gateway.ts +2354 -0
  29. package/proto/gateway/web/v1/stream_gateway_grpc_pb.js +145 -0
  30. package/proto/gateway/web/v1/stream_gateway_pb.js +4593 -0
  31. package/proto/gateway/web/v1/trace_gateway.ts +16320 -0
  32. package/proto/gateway/web/v1/trace_gateway_grpc_pb.js +280 -0
  33. package/proto/gateway/web/v1/trace_gateway_pb.js +28667 -0
@@ -0,0 +1,1163 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc v3.21.12
5
+ // source: proto/gateway/web/v1/oauth_gateway.proto
6
+
7
+ /* eslint-disable */
8
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
9
+ import type { Metadata } from "@grpc/grpc-js";
10
+ import { Timestamp } from "../../../../google/protobuf/timestamp";
11
+ import { ResponseStatus } from "../../common/v1/status";
12
+
13
+ export const protobufPackage = "gateway.web.v1";
14
+
15
+ export interface OAuthConnection {
16
+ id: string;
17
+ organizationId: string;
18
+ provider: string;
19
+ providerTeamId: string;
20
+ providerTeamName: string;
21
+ installedBy: string;
22
+ createdAt: Date | undefined;
23
+ updatedAt: Date | undefined;
24
+ }
25
+
26
+ export interface InitiateSlackOAuthRequest {
27
+ organizationId: string;
28
+ redirectUri: string;
29
+ }
30
+
31
+ export interface InitiateSlackOAuthResponse {
32
+ status: ResponseStatus | undefined;
33
+ oauthUrl: string;
34
+ state: string;
35
+ }
36
+
37
+ export interface CompleteSlackOAuthRequest {
38
+ organizationId: string;
39
+ code: string;
40
+ redirectUri: string;
41
+ state: string;
42
+ }
43
+
44
+ export interface CompleteSlackOAuthResponse {
45
+ status: ResponseStatus | undefined;
46
+ oauthConnection: OAuthConnection | undefined;
47
+ }
48
+
49
+ export interface GetOAuthConnectionRequest {
50
+ organizationId: string;
51
+ provider: string;
52
+ }
53
+
54
+ export interface GetOAuthConnectionResponse {
55
+ status: ResponseStatus | undefined;
56
+ oauthConnection: OAuthConnection | undefined;
57
+ }
58
+
59
+ export interface ListSlackChannelsRequest {
60
+ organizationId: string;
61
+ }
62
+
63
+ export interface ListSlackChannelsResponse {
64
+ status: ResponseStatus | undefined;
65
+ channels: SlackChannel[];
66
+ }
67
+
68
+ export interface SlackChannel {
69
+ id: string;
70
+ name: string;
71
+ isPrivate: boolean;
72
+ }
73
+
74
+ function createBaseOAuthConnection(): OAuthConnection {
75
+ return {
76
+ id: "",
77
+ organizationId: "",
78
+ provider: "",
79
+ providerTeamId: "",
80
+ providerTeamName: "",
81
+ installedBy: "",
82
+ createdAt: undefined,
83
+ updatedAt: undefined,
84
+ };
85
+ }
86
+
87
+ export const OAuthConnection: MessageFns<OAuthConnection> = {
88
+ encode(message: OAuthConnection, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
89
+ if (message.id !== "") {
90
+ writer.uint32(10).string(message.id);
91
+ }
92
+ if (message.organizationId !== "") {
93
+ writer.uint32(18).string(message.organizationId);
94
+ }
95
+ if (message.provider !== "") {
96
+ writer.uint32(26).string(message.provider);
97
+ }
98
+ if (message.providerTeamId !== "") {
99
+ writer.uint32(34).string(message.providerTeamId);
100
+ }
101
+ if (message.providerTeamName !== "") {
102
+ writer.uint32(42).string(message.providerTeamName);
103
+ }
104
+ if (message.installedBy !== "") {
105
+ writer.uint32(50).string(message.installedBy);
106
+ }
107
+ if (message.createdAt !== undefined) {
108
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(58).fork()).join();
109
+ }
110
+ if (message.updatedAt !== undefined) {
111
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(66).fork()).join();
112
+ }
113
+ return writer;
114
+ },
115
+
116
+ decode(input: BinaryReader | Uint8Array, length?: number): OAuthConnection {
117
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
118
+ const end = length === undefined ? reader.len : reader.pos + length;
119
+ const message = createBaseOAuthConnection();
120
+ while (reader.pos < end) {
121
+ const tag = reader.uint32();
122
+ switch (tag >>> 3) {
123
+ case 1: {
124
+ if (tag !== 10) {
125
+ break;
126
+ }
127
+
128
+ message.id = reader.string();
129
+ continue;
130
+ }
131
+ case 2: {
132
+ if (tag !== 18) {
133
+ break;
134
+ }
135
+
136
+ message.organizationId = reader.string();
137
+ continue;
138
+ }
139
+ case 3: {
140
+ if (tag !== 26) {
141
+ break;
142
+ }
143
+
144
+ message.provider = reader.string();
145
+ continue;
146
+ }
147
+ case 4: {
148
+ if (tag !== 34) {
149
+ break;
150
+ }
151
+
152
+ message.providerTeamId = reader.string();
153
+ continue;
154
+ }
155
+ case 5: {
156
+ if (tag !== 42) {
157
+ break;
158
+ }
159
+
160
+ message.providerTeamName = reader.string();
161
+ continue;
162
+ }
163
+ case 6: {
164
+ if (tag !== 50) {
165
+ break;
166
+ }
167
+
168
+ message.installedBy = reader.string();
169
+ continue;
170
+ }
171
+ case 7: {
172
+ if (tag !== 58) {
173
+ break;
174
+ }
175
+
176
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
177
+ continue;
178
+ }
179
+ case 8: {
180
+ if (tag !== 66) {
181
+ break;
182
+ }
183
+
184
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
185
+ continue;
186
+ }
187
+ }
188
+ if ((tag & 7) === 4 || tag === 0) {
189
+ break;
190
+ }
191
+ reader.skip(tag & 7);
192
+ }
193
+ return message;
194
+ },
195
+
196
+ fromJSON(object: any): OAuthConnection {
197
+ return {
198
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
199
+ organizationId: isSet(object.organizationId)
200
+ ? globalThis.String(object.organizationId)
201
+ : isSet(object.organization_id)
202
+ ? globalThis.String(object.organization_id)
203
+ : "",
204
+ provider: isSet(object.provider) ? globalThis.String(object.provider) : "",
205
+ providerTeamId: isSet(object.providerTeamId)
206
+ ? globalThis.String(object.providerTeamId)
207
+ : isSet(object.provider_team_id)
208
+ ? globalThis.String(object.provider_team_id)
209
+ : "",
210
+ providerTeamName: isSet(object.providerTeamName)
211
+ ? globalThis.String(object.providerTeamName)
212
+ : isSet(object.provider_team_name)
213
+ ? globalThis.String(object.provider_team_name)
214
+ : "",
215
+ installedBy: isSet(object.installedBy)
216
+ ? globalThis.String(object.installedBy)
217
+ : isSet(object.installed_by)
218
+ ? globalThis.String(object.installed_by)
219
+ : "",
220
+ createdAt: isSet(object.createdAt)
221
+ ? fromJsonTimestamp(object.createdAt)
222
+ : isSet(object.created_at)
223
+ ? fromJsonTimestamp(object.created_at)
224
+ : undefined,
225
+ updatedAt: isSet(object.updatedAt)
226
+ ? fromJsonTimestamp(object.updatedAt)
227
+ : isSet(object.updated_at)
228
+ ? fromJsonTimestamp(object.updated_at)
229
+ : undefined,
230
+ };
231
+ },
232
+
233
+ toJSON(message: OAuthConnection): unknown {
234
+ const obj: any = {};
235
+ if (message.id !== "") {
236
+ obj.id = message.id;
237
+ }
238
+ if (message.organizationId !== "") {
239
+ obj.organizationId = message.organizationId;
240
+ }
241
+ if (message.provider !== "") {
242
+ obj.provider = message.provider;
243
+ }
244
+ if (message.providerTeamId !== "") {
245
+ obj.providerTeamId = message.providerTeamId;
246
+ }
247
+ if (message.providerTeamName !== "") {
248
+ obj.providerTeamName = message.providerTeamName;
249
+ }
250
+ if (message.installedBy !== "") {
251
+ obj.installedBy = message.installedBy;
252
+ }
253
+ if (message.createdAt !== undefined) {
254
+ obj.createdAt = message.createdAt.toISOString();
255
+ }
256
+ if (message.updatedAt !== undefined) {
257
+ obj.updatedAt = message.updatedAt.toISOString();
258
+ }
259
+ return obj;
260
+ },
261
+
262
+ create<I extends Exact<DeepPartial<OAuthConnection>, I>>(base?: I): OAuthConnection {
263
+ return OAuthConnection.fromPartial(base ?? ({} as any));
264
+ },
265
+ fromPartial<I extends Exact<DeepPartial<OAuthConnection>, I>>(object: I): OAuthConnection {
266
+ const message = createBaseOAuthConnection();
267
+ message.id = object.id ?? "";
268
+ message.organizationId = object.organizationId ?? "";
269
+ message.provider = object.provider ?? "";
270
+ message.providerTeamId = object.providerTeamId ?? "";
271
+ message.providerTeamName = object.providerTeamName ?? "";
272
+ message.installedBy = object.installedBy ?? "";
273
+ message.createdAt = object.createdAt ?? undefined;
274
+ message.updatedAt = object.updatedAt ?? undefined;
275
+ return message;
276
+ },
277
+ };
278
+
279
+ function createBaseInitiateSlackOAuthRequest(): InitiateSlackOAuthRequest {
280
+ return { organizationId: "", redirectUri: "" };
281
+ }
282
+
283
+ export const InitiateSlackOAuthRequest: MessageFns<InitiateSlackOAuthRequest> = {
284
+ encode(message: InitiateSlackOAuthRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
285
+ if (message.organizationId !== "") {
286
+ writer.uint32(10).string(message.organizationId);
287
+ }
288
+ if (message.redirectUri !== "") {
289
+ writer.uint32(18).string(message.redirectUri);
290
+ }
291
+ return writer;
292
+ },
293
+
294
+ decode(input: BinaryReader | Uint8Array, length?: number): InitiateSlackOAuthRequest {
295
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
296
+ const end = length === undefined ? reader.len : reader.pos + length;
297
+ const message = createBaseInitiateSlackOAuthRequest();
298
+ while (reader.pos < end) {
299
+ const tag = reader.uint32();
300
+ switch (tag >>> 3) {
301
+ case 1: {
302
+ if (tag !== 10) {
303
+ break;
304
+ }
305
+
306
+ message.organizationId = reader.string();
307
+ continue;
308
+ }
309
+ case 2: {
310
+ if (tag !== 18) {
311
+ break;
312
+ }
313
+
314
+ message.redirectUri = reader.string();
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): InitiateSlackOAuthRequest {
327
+ return {
328
+ organizationId: isSet(object.organizationId)
329
+ ? globalThis.String(object.organizationId)
330
+ : isSet(object.organization_id)
331
+ ? globalThis.String(object.organization_id)
332
+ : "",
333
+ redirectUri: isSet(object.redirectUri)
334
+ ? globalThis.String(object.redirectUri)
335
+ : isSet(object.redirect_uri)
336
+ ? globalThis.String(object.redirect_uri)
337
+ : "",
338
+ };
339
+ },
340
+
341
+ toJSON(message: InitiateSlackOAuthRequest): unknown {
342
+ const obj: any = {};
343
+ if (message.organizationId !== "") {
344
+ obj.organizationId = message.organizationId;
345
+ }
346
+ if (message.redirectUri !== "") {
347
+ obj.redirectUri = message.redirectUri;
348
+ }
349
+ return obj;
350
+ },
351
+
352
+ create<I extends Exact<DeepPartial<InitiateSlackOAuthRequest>, I>>(base?: I): InitiateSlackOAuthRequest {
353
+ return InitiateSlackOAuthRequest.fromPartial(base ?? ({} as any));
354
+ },
355
+ fromPartial<I extends Exact<DeepPartial<InitiateSlackOAuthRequest>, I>>(object: I): InitiateSlackOAuthRequest {
356
+ const message = createBaseInitiateSlackOAuthRequest();
357
+ message.organizationId = object.organizationId ?? "";
358
+ message.redirectUri = object.redirectUri ?? "";
359
+ return message;
360
+ },
361
+ };
362
+
363
+ function createBaseInitiateSlackOAuthResponse(): InitiateSlackOAuthResponse {
364
+ return { status: undefined, oauthUrl: "", state: "" };
365
+ }
366
+
367
+ export const InitiateSlackOAuthResponse: MessageFns<InitiateSlackOAuthResponse> = {
368
+ encode(message: InitiateSlackOAuthResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
369
+ if (message.status !== undefined) {
370
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
371
+ }
372
+ if (message.oauthUrl !== "") {
373
+ writer.uint32(18).string(message.oauthUrl);
374
+ }
375
+ if (message.state !== "") {
376
+ writer.uint32(26).string(message.state);
377
+ }
378
+ return writer;
379
+ },
380
+
381
+ decode(input: BinaryReader | Uint8Array, length?: number): InitiateSlackOAuthResponse {
382
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
383
+ const end = length === undefined ? reader.len : reader.pos + length;
384
+ const message = createBaseInitiateSlackOAuthResponse();
385
+ while (reader.pos < end) {
386
+ const tag = reader.uint32();
387
+ switch (tag >>> 3) {
388
+ case 1: {
389
+ if (tag !== 10) {
390
+ break;
391
+ }
392
+
393
+ message.status = ResponseStatus.decode(reader, reader.uint32());
394
+ continue;
395
+ }
396
+ case 2: {
397
+ if (tag !== 18) {
398
+ break;
399
+ }
400
+
401
+ message.oauthUrl = reader.string();
402
+ continue;
403
+ }
404
+ case 3: {
405
+ if (tag !== 26) {
406
+ break;
407
+ }
408
+
409
+ message.state = reader.string();
410
+ continue;
411
+ }
412
+ }
413
+ if ((tag & 7) === 4 || tag === 0) {
414
+ break;
415
+ }
416
+ reader.skip(tag & 7);
417
+ }
418
+ return message;
419
+ },
420
+
421
+ fromJSON(object: any): InitiateSlackOAuthResponse {
422
+ return {
423
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
424
+ oauthUrl: isSet(object.oauthUrl)
425
+ ? globalThis.String(object.oauthUrl)
426
+ : isSet(object.oauth_url)
427
+ ? globalThis.String(object.oauth_url)
428
+ : "",
429
+ state: isSet(object.state) ? globalThis.String(object.state) : "",
430
+ };
431
+ },
432
+
433
+ toJSON(message: InitiateSlackOAuthResponse): unknown {
434
+ const obj: any = {};
435
+ if (message.status !== undefined) {
436
+ obj.status = ResponseStatus.toJSON(message.status);
437
+ }
438
+ if (message.oauthUrl !== "") {
439
+ obj.oauthUrl = message.oauthUrl;
440
+ }
441
+ if (message.state !== "") {
442
+ obj.state = message.state;
443
+ }
444
+ return obj;
445
+ },
446
+
447
+ create<I extends Exact<DeepPartial<InitiateSlackOAuthResponse>, I>>(base?: I): InitiateSlackOAuthResponse {
448
+ return InitiateSlackOAuthResponse.fromPartial(base ?? ({} as any));
449
+ },
450
+ fromPartial<I extends Exact<DeepPartial<InitiateSlackOAuthResponse>, I>>(object: I): InitiateSlackOAuthResponse {
451
+ const message = createBaseInitiateSlackOAuthResponse();
452
+ message.status = (object.status !== undefined && object.status !== null)
453
+ ? ResponseStatus.fromPartial(object.status)
454
+ : undefined;
455
+ message.oauthUrl = object.oauthUrl ?? "";
456
+ message.state = object.state ?? "";
457
+ return message;
458
+ },
459
+ };
460
+
461
+ function createBaseCompleteSlackOAuthRequest(): CompleteSlackOAuthRequest {
462
+ return { organizationId: "", code: "", redirectUri: "", state: "" };
463
+ }
464
+
465
+ export const CompleteSlackOAuthRequest: MessageFns<CompleteSlackOAuthRequest> = {
466
+ encode(message: CompleteSlackOAuthRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
467
+ if (message.organizationId !== "") {
468
+ writer.uint32(10).string(message.organizationId);
469
+ }
470
+ if (message.code !== "") {
471
+ writer.uint32(18).string(message.code);
472
+ }
473
+ if (message.redirectUri !== "") {
474
+ writer.uint32(26).string(message.redirectUri);
475
+ }
476
+ if (message.state !== "") {
477
+ writer.uint32(34).string(message.state);
478
+ }
479
+ return writer;
480
+ },
481
+
482
+ decode(input: BinaryReader | Uint8Array, length?: number): CompleteSlackOAuthRequest {
483
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
484
+ const end = length === undefined ? reader.len : reader.pos + length;
485
+ const message = createBaseCompleteSlackOAuthRequest();
486
+ while (reader.pos < end) {
487
+ const tag = reader.uint32();
488
+ switch (tag >>> 3) {
489
+ case 1: {
490
+ if (tag !== 10) {
491
+ break;
492
+ }
493
+
494
+ message.organizationId = reader.string();
495
+ continue;
496
+ }
497
+ case 2: {
498
+ if (tag !== 18) {
499
+ break;
500
+ }
501
+
502
+ message.code = reader.string();
503
+ continue;
504
+ }
505
+ case 3: {
506
+ if (tag !== 26) {
507
+ break;
508
+ }
509
+
510
+ message.redirectUri = reader.string();
511
+ continue;
512
+ }
513
+ case 4: {
514
+ if (tag !== 34) {
515
+ break;
516
+ }
517
+
518
+ message.state = reader.string();
519
+ continue;
520
+ }
521
+ }
522
+ if ((tag & 7) === 4 || tag === 0) {
523
+ break;
524
+ }
525
+ reader.skip(tag & 7);
526
+ }
527
+ return message;
528
+ },
529
+
530
+ fromJSON(object: any): CompleteSlackOAuthRequest {
531
+ return {
532
+ organizationId: isSet(object.organizationId)
533
+ ? globalThis.String(object.organizationId)
534
+ : isSet(object.organization_id)
535
+ ? globalThis.String(object.organization_id)
536
+ : "",
537
+ code: isSet(object.code) ? globalThis.String(object.code) : "",
538
+ redirectUri: isSet(object.redirectUri)
539
+ ? globalThis.String(object.redirectUri)
540
+ : isSet(object.redirect_uri)
541
+ ? globalThis.String(object.redirect_uri)
542
+ : "",
543
+ state: isSet(object.state) ? globalThis.String(object.state) : "",
544
+ };
545
+ },
546
+
547
+ toJSON(message: CompleteSlackOAuthRequest): unknown {
548
+ const obj: any = {};
549
+ if (message.organizationId !== "") {
550
+ obj.organizationId = message.organizationId;
551
+ }
552
+ if (message.code !== "") {
553
+ obj.code = message.code;
554
+ }
555
+ if (message.redirectUri !== "") {
556
+ obj.redirectUri = message.redirectUri;
557
+ }
558
+ if (message.state !== "") {
559
+ obj.state = message.state;
560
+ }
561
+ return obj;
562
+ },
563
+
564
+ create<I extends Exact<DeepPartial<CompleteSlackOAuthRequest>, I>>(base?: I): CompleteSlackOAuthRequest {
565
+ return CompleteSlackOAuthRequest.fromPartial(base ?? ({} as any));
566
+ },
567
+ fromPartial<I extends Exact<DeepPartial<CompleteSlackOAuthRequest>, I>>(object: I): CompleteSlackOAuthRequest {
568
+ const message = createBaseCompleteSlackOAuthRequest();
569
+ message.organizationId = object.organizationId ?? "";
570
+ message.code = object.code ?? "";
571
+ message.redirectUri = object.redirectUri ?? "";
572
+ message.state = object.state ?? "";
573
+ return message;
574
+ },
575
+ };
576
+
577
+ function createBaseCompleteSlackOAuthResponse(): CompleteSlackOAuthResponse {
578
+ return { status: undefined, oauthConnection: undefined };
579
+ }
580
+
581
+ export const CompleteSlackOAuthResponse: MessageFns<CompleteSlackOAuthResponse> = {
582
+ encode(message: CompleteSlackOAuthResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
583
+ if (message.status !== undefined) {
584
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
585
+ }
586
+ if (message.oauthConnection !== undefined) {
587
+ OAuthConnection.encode(message.oauthConnection, writer.uint32(18).fork()).join();
588
+ }
589
+ return writer;
590
+ },
591
+
592
+ decode(input: BinaryReader | Uint8Array, length?: number): CompleteSlackOAuthResponse {
593
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
594
+ const end = length === undefined ? reader.len : reader.pos + length;
595
+ const message = createBaseCompleteSlackOAuthResponse();
596
+ while (reader.pos < end) {
597
+ const tag = reader.uint32();
598
+ switch (tag >>> 3) {
599
+ case 1: {
600
+ if (tag !== 10) {
601
+ break;
602
+ }
603
+
604
+ message.status = ResponseStatus.decode(reader, reader.uint32());
605
+ continue;
606
+ }
607
+ case 2: {
608
+ if (tag !== 18) {
609
+ break;
610
+ }
611
+
612
+ message.oauthConnection = OAuthConnection.decode(reader, reader.uint32());
613
+ continue;
614
+ }
615
+ }
616
+ if ((tag & 7) === 4 || tag === 0) {
617
+ break;
618
+ }
619
+ reader.skip(tag & 7);
620
+ }
621
+ return message;
622
+ },
623
+
624
+ fromJSON(object: any): CompleteSlackOAuthResponse {
625
+ return {
626
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
627
+ oauthConnection: isSet(object.oauthConnection)
628
+ ? OAuthConnection.fromJSON(object.oauthConnection)
629
+ : isSet(object.oauth_connection)
630
+ ? OAuthConnection.fromJSON(object.oauth_connection)
631
+ : undefined,
632
+ };
633
+ },
634
+
635
+ toJSON(message: CompleteSlackOAuthResponse): unknown {
636
+ const obj: any = {};
637
+ if (message.status !== undefined) {
638
+ obj.status = ResponseStatus.toJSON(message.status);
639
+ }
640
+ if (message.oauthConnection !== undefined) {
641
+ obj.oauthConnection = OAuthConnection.toJSON(message.oauthConnection);
642
+ }
643
+ return obj;
644
+ },
645
+
646
+ create<I extends Exact<DeepPartial<CompleteSlackOAuthResponse>, I>>(base?: I): CompleteSlackOAuthResponse {
647
+ return CompleteSlackOAuthResponse.fromPartial(base ?? ({} as any));
648
+ },
649
+ fromPartial<I extends Exact<DeepPartial<CompleteSlackOAuthResponse>, I>>(object: I): CompleteSlackOAuthResponse {
650
+ const message = createBaseCompleteSlackOAuthResponse();
651
+ message.status = (object.status !== undefined && object.status !== null)
652
+ ? ResponseStatus.fromPartial(object.status)
653
+ : undefined;
654
+ message.oauthConnection = (object.oauthConnection !== undefined && object.oauthConnection !== null)
655
+ ? OAuthConnection.fromPartial(object.oauthConnection)
656
+ : undefined;
657
+ return message;
658
+ },
659
+ };
660
+
661
+ function createBaseGetOAuthConnectionRequest(): GetOAuthConnectionRequest {
662
+ return { organizationId: "", provider: "" };
663
+ }
664
+
665
+ export const GetOAuthConnectionRequest: MessageFns<GetOAuthConnectionRequest> = {
666
+ encode(message: GetOAuthConnectionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
667
+ if (message.organizationId !== "") {
668
+ writer.uint32(10).string(message.organizationId);
669
+ }
670
+ if (message.provider !== "") {
671
+ writer.uint32(18).string(message.provider);
672
+ }
673
+ return writer;
674
+ },
675
+
676
+ decode(input: BinaryReader | Uint8Array, length?: number): GetOAuthConnectionRequest {
677
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
678
+ const end = length === undefined ? reader.len : reader.pos + length;
679
+ const message = createBaseGetOAuthConnectionRequest();
680
+ while (reader.pos < end) {
681
+ const tag = reader.uint32();
682
+ switch (tag >>> 3) {
683
+ case 1: {
684
+ if (tag !== 10) {
685
+ break;
686
+ }
687
+
688
+ message.organizationId = reader.string();
689
+ continue;
690
+ }
691
+ case 2: {
692
+ if (tag !== 18) {
693
+ break;
694
+ }
695
+
696
+ message.provider = reader.string();
697
+ continue;
698
+ }
699
+ }
700
+ if ((tag & 7) === 4 || tag === 0) {
701
+ break;
702
+ }
703
+ reader.skip(tag & 7);
704
+ }
705
+ return message;
706
+ },
707
+
708
+ fromJSON(object: any): GetOAuthConnectionRequest {
709
+ return {
710
+ organizationId: isSet(object.organizationId)
711
+ ? globalThis.String(object.organizationId)
712
+ : isSet(object.organization_id)
713
+ ? globalThis.String(object.organization_id)
714
+ : "",
715
+ provider: isSet(object.provider) ? globalThis.String(object.provider) : "",
716
+ };
717
+ },
718
+
719
+ toJSON(message: GetOAuthConnectionRequest): unknown {
720
+ const obj: any = {};
721
+ if (message.organizationId !== "") {
722
+ obj.organizationId = message.organizationId;
723
+ }
724
+ if (message.provider !== "") {
725
+ obj.provider = message.provider;
726
+ }
727
+ return obj;
728
+ },
729
+
730
+ create<I extends Exact<DeepPartial<GetOAuthConnectionRequest>, I>>(base?: I): GetOAuthConnectionRequest {
731
+ return GetOAuthConnectionRequest.fromPartial(base ?? ({} as any));
732
+ },
733
+ fromPartial<I extends Exact<DeepPartial<GetOAuthConnectionRequest>, I>>(object: I): GetOAuthConnectionRequest {
734
+ const message = createBaseGetOAuthConnectionRequest();
735
+ message.organizationId = object.organizationId ?? "";
736
+ message.provider = object.provider ?? "";
737
+ return message;
738
+ },
739
+ };
740
+
741
+ function createBaseGetOAuthConnectionResponse(): GetOAuthConnectionResponse {
742
+ return { status: undefined, oauthConnection: undefined };
743
+ }
744
+
745
+ export const GetOAuthConnectionResponse: MessageFns<GetOAuthConnectionResponse> = {
746
+ encode(message: GetOAuthConnectionResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
747
+ if (message.status !== undefined) {
748
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
749
+ }
750
+ if (message.oauthConnection !== undefined) {
751
+ OAuthConnection.encode(message.oauthConnection, writer.uint32(18).fork()).join();
752
+ }
753
+ return writer;
754
+ },
755
+
756
+ decode(input: BinaryReader | Uint8Array, length?: number): GetOAuthConnectionResponse {
757
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
758
+ const end = length === undefined ? reader.len : reader.pos + length;
759
+ const message = createBaseGetOAuthConnectionResponse();
760
+ while (reader.pos < end) {
761
+ const tag = reader.uint32();
762
+ switch (tag >>> 3) {
763
+ case 1: {
764
+ if (tag !== 10) {
765
+ break;
766
+ }
767
+
768
+ message.status = ResponseStatus.decode(reader, reader.uint32());
769
+ continue;
770
+ }
771
+ case 2: {
772
+ if (tag !== 18) {
773
+ break;
774
+ }
775
+
776
+ message.oauthConnection = OAuthConnection.decode(reader, reader.uint32());
777
+ continue;
778
+ }
779
+ }
780
+ if ((tag & 7) === 4 || tag === 0) {
781
+ break;
782
+ }
783
+ reader.skip(tag & 7);
784
+ }
785
+ return message;
786
+ },
787
+
788
+ fromJSON(object: any): GetOAuthConnectionResponse {
789
+ return {
790
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
791
+ oauthConnection: isSet(object.oauthConnection)
792
+ ? OAuthConnection.fromJSON(object.oauthConnection)
793
+ : isSet(object.oauth_connection)
794
+ ? OAuthConnection.fromJSON(object.oauth_connection)
795
+ : undefined,
796
+ };
797
+ },
798
+
799
+ toJSON(message: GetOAuthConnectionResponse): unknown {
800
+ const obj: any = {};
801
+ if (message.status !== undefined) {
802
+ obj.status = ResponseStatus.toJSON(message.status);
803
+ }
804
+ if (message.oauthConnection !== undefined) {
805
+ obj.oauthConnection = OAuthConnection.toJSON(message.oauthConnection);
806
+ }
807
+ return obj;
808
+ },
809
+
810
+ create<I extends Exact<DeepPartial<GetOAuthConnectionResponse>, I>>(base?: I): GetOAuthConnectionResponse {
811
+ return GetOAuthConnectionResponse.fromPartial(base ?? ({} as any));
812
+ },
813
+ fromPartial<I extends Exact<DeepPartial<GetOAuthConnectionResponse>, I>>(object: I): GetOAuthConnectionResponse {
814
+ const message = createBaseGetOAuthConnectionResponse();
815
+ message.status = (object.status !== undefined && object.status !== null)
816
+ ? ResponseStatus.fromPartial(object.status)
817
+ : undefined;
818
+ message.oauthConnection = (object.oauthConnection !== undefined && object.oauthConnection !== null)
819
+ ? OAuthConnection.fromPartial(object.oauthConnection)
820
+ : undefined;
821
+ return message;
822
+ },
823
+ };
824
+
825
+ function createBaseListSlackChannelsRequest(): ListSlackChannelsRequest {
826
+ return { organizationId: "" };
827
+ }
828
+
829
+ export const ListSlackChannelsRequest: MessageFns<ListSlackChannelsRequest> = {
830
+ encode(message: ListSlackChannelsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
831
+ if (message.organizationId !== "") {
832
+ writer.uint32(10).string(message.organizationId);
833
+ }
834
+ return writer;
835
+ },
836
+
837
+ decode(input: BinaryReader | Uint8Array, length?: number): ListSlackChannelsRequest {
838
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
839
+ const end = length === undefined ? reader.len : reader.pos + length;
840
+ const message = createBaseListSlackChannelsRequest();
841
+ while (reader.pos < end) {
842
+ const tag = reader.uint32();
843
+ switch (tag >>> 3) {
844
+ case 1: {
845
+ if (tag !== 10) {
846
+ break;
847
+ }
848
+
849
+ message.organizationId = reader.string();
850
+ continue;
851
+ }
852
+ }
853
+ if ((tag & 7) === 4 || tag === 0) {
854
+ break;
855
+ }
856
+ reader.skip(tag & 7);
857
+ }
858
+ return message;
859
+ },
860
+
861
+ fromJSON(object: any): ListSlackChannelsRequest {
862
+ return {
863
+ organizationId: isSet(object.organizationId)
864
+ ? globalThis.String(object.organizationId)
865
+ : isSet(object.organization_id)
866
+ ? globalThis.String(object.organization_id)
867
+ : "",
868
+ };
869
+ },
870
+
871
+ toJSON(message: ListSlackChannelsRequest): unknown {
872
+ const obj: any = {};
873
+ if (message.organizationId !== "") {
874
+ obj.organizationId = message.organizationId;
875
+ }
876
+ return obj;
877
+ },
878
+
879
+ create<I extends Exact<DeepPartial<ListSlackChannelsRequest>, I>>(base?: I): ListSlackChannelsRequest {
880
+ return ListSlackChannelsRequest.fromPartial(base ?? ({} as any));
881
+ },
882
+ fromPartial<I extends Exact<DeepPartial<ListSlackChannelsRequest>, I>>(object: I): ListSlackChannelsRequest {
883
+ const message = createBaseListSlackChannelsRequest();
884
+ message.organizationId = object.organizationId ?? "";
885
+ return message;
886
+ },
887
+ };
888
+
889
+ function createBaseListSlackChannelsResponse(): ListSlackChannelsResponse {
890
+ return { status: undefined, channels: [] };
891
+ }
892
+
893
+ export const ListSlackChannelsResponse: MessageFns<ListSlackChannelsResponse> = {
894
+ encode(message: ListSlackChannelsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
895
+ if (message.status !== undefined) {
896
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
897
+ }
898
+ for (const v of message.channels) {
899
+ SlackChannel.encode(v!, writer.uint32(18).fork()).join();
900
+ }
901
+ return writer;
902
+ },
903
+
904
+ decode(input: BinaryReader | Uint8Array, length?: number): ListSlackChannelsResponse {
905
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
906
+ const end = length === undefined ? reader.len : reader.pos + length;
907
+ const message = createBaseListSlackChannelsResponse();
908
+ while (reader.pos < end) {
909
+ const tag = reader.uint32();
910
+ switch (tag >>> 3) {
911
+ case 1: {
912
+ if (tag !== 10) {
913
+ break;
914
+ }
915
+
916
+ message.status = ResponseStatus.decode(reader, reader.uint32());
917
+ continue;
918
+ }
919
+ case 2: {
920
+ if (tag !== 18) {
921
+ break;
922
+ }
923
+
924
+ message.channels.push(SlackChannel.decode(reader, reader.uint32()));
925
+ continue;
926
+ }
927
+ }
928
+ if ((tag & 7) === 4 || tag === 0) {
929
+ break;
930
+ }
931
+ reader.skip(tag & 7);
932
+ }
933
+ return message;
934
+ },
935
+
936
+ fromJSON(object: any): ListSlackChannelsResponse {
937
+ return {
938
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
939
+ channels: globalThis.Array.isArray(object?.channels)
940
+ ? object.channels.map((e: any) => SlackChannel.fromJSON(e))
941
+ : [],
942
+ };
943
+ },
944
+
945
+ toJSON(message: ListSlackChannelsResponse): unknown {
946
+ const obj: any = {};
947
+ if (message.status !== undefined) {
948
+ obj.status = ResponseStatus.toJSON(message.status);
949
+ }
950
+ if (message.channels?.length) {
951
+ obj.channels = message.channels.map((e) => SlackChannel.toJSON(e));
952
+ }
953
+ return obj;
954
+ },
955
+
956
+ create<I extends Exact<DeepPartial<ListSlackChannelsResponse>, I>>(base?: I): ListSlackChannelsResponse {
957
+ return ListSlackChannelsResponse.fromPartial(base ?? ({} as any));
958
+ },
959
+ fromPartial<I extends Exact<DeepPartial<ListSlackChannelsResponse>, I>>(object: I): ListSlackChannelsResponse {
960
+ const message = createBaseListSlackChannelsResponse();
961
+ message.status = (object.status !== undefined && object.status !== null)
962
+ ? ResponseStatus.fromPartial(object.status)
963
+ : undefined;
964
+ message.channels = object.channels?.map((e) => SlackChannel.fromPartial(e)) || [];
965
+ return message;
966
+ },
967
+ };
968
+
969
+ function createBaseSlackChannel(): SlackChannel {
970
+ return { id: "", name: "", isPrivate: false };
971
+ }
972
+
973
+ export const SlackChannel: MessageFns<SlackChannel> = {
974
+ encode(message: SlackChannel, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
975
+ if (message.id !== "") {
976
+ writer.uint32(10).string(message.id);
977
+ }
978
+ if (message.name !== "") {
979
+ writer.uint32(18).string(message.name);
980
+ }
981
+ if (message.isPrivate !== false) {
982
+ writer.uint32(24).bool(message.isPrivate);
983
+ }
984
+ return writer;
985
+ },
986
+
987
+ decode(input: BinaryReader | Uint8Array, length?: number): SlackChannel {
988
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
989
+ const end = length === undefined ? reader.len : reader.pos + length;
990
+ const message = createBaseSlackChannel();
991
+ while (reader.pos < end) {
992
+ const tag = reader.uint32();
993
+ switch (tag >>> 3) {
994
+ case 1: {
995
+ if (tag !== 10) {
996
+ break;
997
+ }
998
+
999
+ message.id = reader.string();
1000
+ continue;
1001
+ }
1002
+ case 2: {
1003
+ if (tag !== 18) {
1004
+ break;
1005
+ }
1006
+
1007
+ message.name = reader.string();
1008
+ continue;
1009
+ }
1010
+ case 3: {
1011
+ if (tag !== 24) {
1012
+ break;
1013
+ }
1014
+
1015
+ message.isPrivate = reader.bool();
1016
+ continue;
1017
+ }
1018
+ }
1019
+ if ((tag & 7) === 4 || tag === 0) {
1020
+ break;
1021
+ }
1022
+ reader.skip(tag & 7);
1023
+ }
1024
+ return message;
1025
+ },
1026
+
1027
+ fromJSON(object: any): SlackChannel {
1028
+ return {
1029
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1030
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
1031
+ isPrivate: isSet(object.isPrivate)
1032
+ ? globalThis.Boolean(object.isPrivate)
1033
+ : isSet(object.is_private)
1034
+ ? globalThis.Boolean(object.is_private)
1035
+ : false,
1036
+ };
1037
+ },
1038
+
1039
+ toJSON(message: SlackChannel): unknown {
1040
+ const obj: any = {};
1041
+ if (message.id !== "") {
1042
+ obj.id = message.id;
1043
+ }
1044
+ if (message.name !== "") {
1045
+ obj.name = message.name;
1046
+ }
1047
+ if (message.isPrivate !== false) {
1048
+ obj.isPrivate = message.isPrivate;
1049
+ }
1050
+ return obj;
1051
+ },
1052
+
1053
+ create<I extends Exact<DeepPartial<SlackChannel>, I>>(base?: I): SlackChannel {
1054
+ return SlackChannel.fromPartial(base ?? ({} as any));
1055
+ },
1056
+ fromPartial<I extends Exact<DeepPartial<SlackChannel>, I>>(object: I): SlackChannel {
1057
+ const message = createBaseSlackChannel();
1058
+ message.id = object.id ?? "";
1059
+ message.name = object.name ?? "";
1060
+ message.isPrivate = object.isPrivate ?? false;
1061
+ return message;
1062
+ },
1063
+ };
1064
+
1065
+ /** OAuthGatewayService provides web client access to OAuth connection management */
1066
+ export interface OAuthGatewayService {
1067
+ /** InitiateSlackOAuth returns the Slack OAuth URL for the user to authorize */
1068
+ InitiateSlackOAuth(request: InitiateSlackOAuthRequest, metadata?: Metadata): Promise<InitiateSlackOAuthResponse>;
1069
+ /** CompleteSlackOAuth exchanges the authorization code for a bot token */
1070
+ CompleteSlackOAuth(request: CompleteSlackOAuthRequest, metadata?: Metadata): Promise<CompleteSlackOAuthResponse>;
1071
+ /** GetOAuthConnection returns an existing OAuth connection for an organization and provider */
1072
+ GetOAuthConnection(request: GetOAuthConnectionRequest, metadata?: Metadata): Promise<GetOAuthConnectionResponse>;
1073
+ /** ListSlackChannels lists available Slack channels using the stored bot token */
1074
+ ListSlackChannels(request: ListSlackChannelsRequest, metadata?: Metadata): Promise<ListSlackChannelsResponse>;
1075
+ }
1076
+
1077
+ export const OAuthGatewayServiceServiceName = "gateway.web.v1.OAuthGatewayService";
1078
+ export class OAuthGatewayServiceClientImpl implements OAuthGatewayService {
1079
+ private readonly rpc: Rpc;
1080
+ private readonly service: string;
1081
+ constructor(rpc: Rpc, opts?: { service?: string }) {
1082
+ this.service = opts?.service || OAuthGatewayServiceServiceName;
1083
+ this.rpc = rpc;
1084
+ this.InitiateSlackOAuth = this.InitiateSlackOAuth.bind(this);
1085
+ this.CompleteSlackOAuth = this.CompleteSlackOAuth.bind(this);
1086
+ this.GetOAuthConnection = this.GetOAuthConnection.bind(this);
1087
+ this.ListSlackChannels = this.ListSlackChannels.bind(this);
1088
+ }
1089
+ InitiateSlackOAuth(request: InitiateSlackOAuthRequest, metadata?: Metadata): Promise<InitiateSlackOAuthResponse> {
1090
+ const data = InitiateSlackOAuthRequest.encode(request).finish();
1091
+ const promise = this.rpc.request(this.service, "InitiateSlackOAuth", data, metadata);
1092
+ return promise.then((data) => InitiateSlackOAuthResponse.decode(new BinaryReader(data)));
1093
+ }
1094
+
1095
+ CompleteSlackOAuth(request: CompleteSlackOAuthRequest, metadata?: Metadata): Promise<CompleteSlackOAuthResponse> {
1096
+ const data = CompleteSlackOAuthRequest.encode(request).finish();
1097
+ const promise = this.rpc.request(this.service, "CompleteSlackOAuth", data, metadata);
1098
+ return promise.then((data) => CompleteSlackOAuthResponse.decode(new BinaryReader(data)));
1099
+ }
1100
+
1101
+ GetOAuthConnection(request: GetOAuthConnectionRequest, metadata?: Metadata): Promise<GetOAuthConnectionResponse> {
1102
+ const data = GetOAuthConnectionRequest.encode(request).finish();
1103
+ const promise = this.rpc.request(this.service, "GetOAuthConnection", data, metadata);
1104
+ return promise.then((data) => GetOAuthConnectionResponse.decode(new BinaryReader(data)));
1105
+ }
1106
+
1107
+ ListSlackChannels(request: ListSlackChannelsRequest, metadata?: Metadata): Promise<ListSlackChannelsResponse> {
1108
+ const data = ListSlackChannelsRequest.encode(request).finish();
1109
+ const promise = this.rpc.request(this.service, "ListSlackChannels", data, metadata);
1110
+ return promise.then((data) => ListSlackChannelsResponse.decode(new BinaryReader(data)));
1111
+ }
1112
+ }
1113
+
1114
+ interface Rpc {
1115
+ request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
1116
+ }
1117
+
1118
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
1119
+
1120
+ export type DeepPartial<T> = T extends Builtin ? T
1121
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
1122
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
1123
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
1124
+ : Partial<T>;
1125
+
1126
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
1127
+ export type Exact<P, I extends P> = P extends Builtin ? P
1128
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
1129
+
1130
+ function toTimestamp(date: Date): Timestamp {
1131
+ const seconds = Math.trunc(date.getTime() / 1_000);
1132
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
1133
+ return { seconds, nanos };
1134
+ }
1135
+
1136
+ function fromTimestamp(t: Timestamp): Date {
1137
+ let millis = (t.seconds || 0) * 1_000;
1138
+ millis += (t.nanos || 0) / 1_000_000;
1139
+ return new globalThis.Date(millis);
1140
+ }
1141
+
1142
+ function fromJsonTimestamp(o: any): Date {
1143
+ if (o instanceof globalThis.Date) {
1144
+ return o;
1145
+ } else if (typeof o === "string") {
1146
+ return new globalThis.Date(o);
1147
+ } else {
1148
+ return fromTimestamp(Timestamp.fromJSON(o));
1149
+ }
1150
+ }
1151
+
1152
+ function isSet(value: any): boolean {
1153
+ return value !== null && value !== undefined;
1154
+ }
1155
+
1156
+ export interface MessageFns<T> {
1157
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
1158
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
1159
+ fromJSON(object: any): T;
1160
+ toJSON(message: T): unknown;
1161
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
1162
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
1163
+ }