@tarkahq/sdk 0.0.0-stage → 0.3.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 (130) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +69 -0
  3. package/README.md +700 -2
  4. package/api-source.json +38 -0
  5. package/dist/cjs/client.d.ts +114 -0
  6. package/dist/cjs/client.js +174 -0
  7. package/dist/cjs/errors.d.ts +27 -0
  8. package/dist/cjs/errors.js +78 -0
  9. package/dist/cjs/generated/google/api/annotations.d.ts +1 -0
  10. package/dist/cjs/generated/google/api/annotations.js +10 -0
  11. package/dist/cjs/generated/google/api/http.d.ts +395 -0
  12. package/dist/cjs/generated/google/api/http.js +421 -0
  13. package/dist/cjs/generated/google/protobuf/descriptor.d.ts +873 -0
  14. package/dist/cjs/generated/google/protobuf/descriptor.js +3992 -0
  15. package/dist/cjs/generated/google/protobuf/empty.d.ts +35 -0
  16. package/dist/cjs/generated/google/protobuf/empty.js +58 -0
  17. package/dist/cjs/generated/google/protobuf/struct.d.ts +127 -0
  18. package/dist/cjs/generated/google/protobuf/struct.js +529 -0
  19. package/dist/cjs/generated/google/protobuf/timestamp.d.ts +128 -0
  20. package/dist/cjs/generated/google/protobuf/timestamp.js +95 -0
  21. package/dist/cjs/generated/protoc-gen-openapiv2/options/annotations.d.ts +1 -0
  22. package/dist/cjs/generated/protoc-gen-openapiv2/options/annotations.js +10 -0
  23. package/dist/cjs/generated/protoc-gen-openapiv2/options/openapiv2.d.ts +983 -0
  24. package/dist/cjs/generated/protoc-gen-openapiv2/options/openapiv2.js +4874 -0
  25. package/dist/cjs/generated/tarka/access/v1/access.d.ts +322 -0
  26. package/dist/cjs/generated/tarka/access/v1/access.js +2979 -0
  27. package/dist/cjs/generated/tarka/channels/v1/channels.d.ts +370 -0
  28. package/dist/cjs/generated/tarka/channels/v1/channels.js +3603 -0
  29. package/dist/cjs/generated/tarka/gateway/v1/gateway.d.ts +804 -0
  30. package/dist/cjs/generated/tarka/gateway/v1/gateway.js +8081 -0
  31. package/dist/cjs/generated/tarka/iam/v1/iam.d.ts +1291 -0
  32. package/dist/cjs/generated/tarka/iam/v1/iam.js +13207 -0
  33. package/dist/cjs/generated/tarka/inference/v1/inference.d.ts +699 -0
  34. package/dist/cjs/generated/tarka/inference/v1/inference.js +7058 -0
  35. package/dist/cjs/generated/tarka/provisioning/v1/agent_secrets.d.ts +70 -0
  36. package/dist/cjs/generated/tarka/provisioning/v1/agent_secrets.js +603 -0
  37. package/dist/cjs/generated/tarka/provisioning/v1/billing_quote.d.ts +171 -0
  38. package/dist/cjs/generated/tarka/provisioning/v1/billing_quote.js +1588 -0
  39. package/dist/cjs/generated/tarka/provisioning/v1/job.d.ts +168 -0
  40. package/dist/cjs/generated/tarka/provisioning/v1/job.js +1505 -0
  41. package/dist/cjs/generated/tarka/provisioning/v1/provisioning.d.ts +2644 -0
  42. package/dist/cjs/generated/tarka/provisioning/v1/provisioning.js +19501 -0
  43. package/dist/cjs/generated/tarka/provisioning/v1/registry_credentials.d.ts +89 -0
  44. package/dist/cjs/generated/tarka/provisioning/v1/registry_credentials.js +856 -0
  45. package/dist/cjs/generated/tarka/provisioning/v1/sandbox.d.ts +431 -0
  46. package/dist/cjs/generated/tarka/provisioning/v1/sandbox.js +3203 -0
  47. package/dist/cjs/generated/tarka/provisioning/v1/source_builds.d.ts +291 -0
  48. package/dist/cjs/generated/tarka/provisioning/v1/source_builds.js +3920 -0
  49. package/dist/cjs/grpc.d.ts +12 -0
  50. package/dist/cjs/grpc.js +55 -0
  51. package/dist/cjs/index.d.ts +6 -0
  52. package/dist/cjs/index.js +21 -0
  53. package/dist/cjs/package.json +1 -0
  54. package/dist/cjs/resources/inference.d.ts +293 -0
  55. package/dist/cjs/resources/inference.js +451 -0
  56. package/dist/cjs/resources/provisioning.d.ts +389 -0
  57. package/dist/cjs/resources/provisioning.js +552 -0
  58. package/dist/cjs/resources/sandboxes.d.ts +360 -0
  59. package/dist/cjs/resources/sandboxes.js +732 -0
  60. package/dist/cjs/rpc-types.d.ts +36 -0
  61. package/dist/cjs/rpc-types.js +29 -0
  62. package/dist/cjs/runtime.d.ts +99 -0
  63. package/dist/cjs/runtime.js +473 -0
  64. package/dist/cjs/transport.d.ts +60 -0
  65. package/dist/cjs/transport.js +114 -0
  66. package/dist/cjs/types.d.ts +309 -0
  67. package/dist/cjs/types.js +2 -0
  68. package/dist/esm/client.d.ts +114 -0
  69. package/dist/esm/client.js +169 -0
  70. package/dist/esm/errors.d.ts +27 -0
  71. package/dist/esm/errors.js +71 -0
  72. package/dist/esm/generated/google/api/annotations.d.ts +1 -0
  73. package/dist/esm/generated/google/api/annotations.js +7 -0
  74. package/dist/esm/generated/google/api/http.d.ts +395 -0
  75. package/dist/esm/generated/google/api/http.js +418 -0
  76. package/dist/esm/generated/google/protobuf/descriptor.d.ts +873 -0
  77. package/dist/esm/generated/google/protobuf/descriptor.js +3977 -0
  78. package/dist/esm/generated/google/protobuf/empty.d.ts +35 -0
  79. package/dist/esm/generated/google/protobuf/empty.js +55 -0
  80. package/dist/esm/generated/google/protobuf/struct.d.ts +127 -0
  81. package/dist/esm/generated/google/protobuf/struct.js +524 -0
  82. package/dist/esm/generated/google/protobuf/timestamp.d.ts +128 -0
  83. package/dist/esm/generated/google/protobuf/timestamp.js +92 -0
  84. package/dist/esm/generated/protoc-gen-openapiv2/options/annotations.d.ts +1 -0
  85. package/dist/esm/generated/protoc-gen-openapiv2/options/annotations.js +7 -0
  86. package/dist/esm/generated/protoc-gen-openapiv2/options/openapiv2.d.ts +983 -0
  87. package/dist/esm/generated/protoc-gen-openapiv2/options/openapiv2.js +4859 -0
  88. package/dist/esm/generated/tarka/access/v1/access.d.ts +322 -0
  89. package/dist/esm/generated/tarka/access/v1/access.js +2976 -0
  90. package/dist/esm/generated/tarka/channels/v1/channels.d.ts +370 -0
  91. package/dist/esm/generated/tarka/channels/v1/channels.js +3600 -0
  92. package/dist/esm/generated/tarka/gateway/v1/gateway.d.ts +804 -0
  93. package/dist/esm/generated/tarka/gateway/v1/gateway.js +8077 -0
  94. package/dist/esm/generated/tarka/iam/v1/iam.d.ts +1291 -0
  95. package/dist/esm/generated/tarka/iam/v1/iam.js +13203 -0
  96. package/dist/esm/generated/tarka/inference/v1/inference.d.ts +699 -0
  97. package/dist/esm/generated/tarka/inference/v1/inference.js +7055 -0
  98. package/dist/esm/generated/tarka/provisioning/v1/agent_secrets.d.ts +70 -0
  99. package/dist/esm/generated/tarka/provisioning/v1/agent_secrets.js +600 -0
  100. package/dist/esm/generated/tarka/provisioning/v1/billing_quote.d.ts +171 -0
  101. package/dist/esm/generated/tarka/provisioning/v1/billing_quote.js +1585 -0
  102. package/dist/esm/generated/tarka/provisioning/v1/job.d.ts +168 -0
  103. package/dist/esm/generated/tarka/provisioning/v1/job.js +1500 -0
  104. package/dist/esm/generated/tarka/provisioning/v1/provisioning.d.ts +2644 -0
  105. package/dist/esm/generated/tarka/provisioning/v1/provisioning.js +19496 -0
  106. package/dist/esm/generated/tarka/provisioning/v1/registry_credentials.d.ts +89 -0
  107. package/dist/esm/generated/tarka/provisioning/v1/registry_credentials.js +853 -0
  108. package/dist/esm/generated/tarka/provisioning/v1/sandbox.d.ts +431 -0
  109. package/dist/esm/generated/tarka/provisioning/v1/sandbox.js +3192 -0
  110. package/dist/esm/generated/tarka/provisioning/v1/source_builds.d.ts +291 -0
  111. package/dist/esm/generated/tarka/provisioning/v1/source_builds.js +3917 -0
  112. package/dist/esm/grpc.d.ts +12 -0
  113. package/dist/esm/grpc.js +11 -0
  114. package/dist/esm/index.d.ts +6 -0
  115. package/dist/esm/index.js +4 -0
  116. package/dist/esm/resources/inference.d.ts +293 -0
  117. package/dist/esm/resources/inference.js +437 -0
  118. package/dist/esm/resources/provisioning.d.ts +389 -0
  119. package/dist/esm/resources/provisioning.js +531 -0
  120. package/dist/esm/resources/sandboxes.d.ts +360 -0
  121. package/dist/esm/resources/sandboxes.js +718 -0
  122. package/dist/esm/rpc-types.d.ts +36 -0
  123. package/dist/esm/rpc-types.js +26 -0
  124. package/dist/esm/runtime.d.ts +99 -0
  125. package/dist/esm/runtime.js +466 -0
  126. package/dist/esm/transport.d.ts +60 -0
  127. package/dist/esm/transport.js +110 -0
  128. package/dist/esm/types.d.ts +309 -0
  129. package/dist/esm/types.js +1 -0
  130. package/package.json +155 -4
@@ -0,0 +1,3600 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.12.4
4
+ // protoc v3.19.1
5
+ // source: tarka/channels/v1/channels.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ import { Empty } from "../../../google/protobuf/empty.js";
9
+ import { Struct } from "../../../google/protobuf/struct.js";
10
+ import { Timestamp } from "../../../google/protobuf/timestamp.js";
11
+ export const protobufPackage = "tarka.channels.v1";
12
+ function createBaseChannel() {
13
+ return {
14
+ id: "",
15
+ orgId: "",
16
+ realmId: "",
17
+ status: "",
18
+ version: 0n,
19
+ createdAt: undefined,
20
+ updatedAt: undefined,
21
+ provider: "",
22
+ name: "",
23
+ connectionId: "",
24
+ agentId: "",
25
+ configuration: undefined,
26
+ };
27
+ }
28
+ export const Channel = {
29
+ encode(message, writer = new BinaryWriter()) {
30
+ if (message.id !== "") {
31
+ writer.uint32(10).string(message.id);
32
+ }
33
+ if (message.orgId !== "") {
34
+ writer.uint32(18).string(message.orgId);
35
+ }
36
+ if (message.realmId !== "") {
37
+ writer.uint32(26).string(message.realmId);
38
+ }
39
+ if (message.status !== "") {
40
+ writer.uint32(34).string(message.status);
41
+ }
42
+ if (message.version !== 0n) {
43
+ if (BigInt.asIntN(64, message.version) !== message.version) {
44
+ throw new globalThis.Error("value provided for field message.version of type int64 too large");
45
+ }
46
+ writer.uint32(40).int64(message.version);
47
+ }
48
+ if (message.createdAt !== undefined) {
49
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(50).fork()).join();
50
+ }
51
+ if (message.updatedAt !== undefined) {
52
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(58).fork()).join();
53
+ }
54
+ if (message.provider !== "") {
55
+ writer.uint32(82).string(message.provider);
56
+ }
57
+ if (message.name !== "") {
58
+ writer.uint32(90).string(message.name);
59
+ }
60
+ if (message.connectionId !== "") {
61
+ writer.uint32(98).string(message.connectionId);
62
+ }
63
+ if (message.agentId !== "") {
64
+ writer.uint32(106).string(message.agentId);
65
+ }
66
+ if (message.configuration !== undefined) {
67
+ Struct.encode(Struct.wrap(message.configuration), writer.uint32(114).fork()).join();
68
+ }
69
+ return writer;
70
+ },
71
+ decode(input, length) {
72
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
73
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
74
+ if (previousRecursionDepth >= 100) {
75
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
76
+ }
77
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
78
+ try {
79
+ const end = length === undefined ? reader.len : reader.pos + length;
80
+ const message = createBaseChannel();
81
+ while (reader.pos < end) {
82
+ const tag = reader.uint32();
83
+ switch (tag >>> 3) {
84
+ case 1: {
85
+ if (tag !== 10) {
86
+ break;
87
+ }
88
+ message.id = reader.string();
89
+ continue;
90
+ }
91
+ case 2: {
92
+ if (tag !== 18) {
93
+ break;
94
+ }
95
+ message.orgId = reader.string();
96
+ continue;
97
+ }
98
+ case 3: {
99
+ if (tag !== 26) {
100
+ break;
101
+ }
102
+ message.realmId = reader.string();
103
+ continue;
104
+ }
105
+ case 4: {
106
+ if (tag !== 34) {
107
+ break;
108
+ }
109
+ message.status = reader.string();
110
+ continue;
111
+ }
112
+ case 5: {
113
+ if (tag !== 40) {
114
+ break;
115
+ }
116
+ message.version = reader.int64();
117
+ continue;
118
+ }
119
+ case 6: {
120
+ if (tag !== 50) {
121
+ break;
122
+ }
123
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
124
+ continue;
125
+ }
126
+ case 7: {
127
+ if (tag !== 58) {
128
+ break;
129
+ }
130
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
131
+ continue;
132
+ }
133
+ case 10: {
134
+ if (tag !== 82) {
135
+ break;
136
+ }
137
+ message.provider = reader.string();
138
+ continue;
139
+ }
140
+ case 11: {
141
+ if (tag !== 90) {
142
+ break;
143
+ }
144
+ message.name = reader.string();
145
+ continue;
146
+ }
147
+ case 12: {
148
+ if (tag !== 98) {
149
+ break;
150
+ }
151
+ message.connectionId = reader.string();
152
+ continue;
153
+ }
154
+ case 13: {
155
+ if (tag !== 106) {
156
+ break;
157
+ }
158
+ message.agentId = reader.string();
159
+ continue;
160
+ }
161
+ case 14: {
162
+ if (tag !== 114) {
163
+ break;
164
+ }
165
+ message.configuration = Struct.unwrap(Struct.decode(reader, reader.uint32()));
166
+ continue;
167
+ }
168
+ }
169
+ if ((tag & 7) === 4 || tag === 0) {
170
+ break;
171
+ }
172
+ reader.skip(tag & 7);
173
+ }
174
+ return message;
175
+ }
176
+ finally {
177
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
178
+ }
179
+ },
180
+ fromJSON(object) {
181
+ return {
182
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
183
+ orgId: isSet(object.orgId)
184
+ ? globalThis.String(object.orgId)
185
+ : isSet(object.org_id)
186
+ ? globalThis.String(object.org_id)
187
+ : "",
188
+ realmId: isSet(object.realmId)
189
+ ? globalThis.String(object.realmId)
190
+ : isSet(object.realm_id)
191
+ ? globalThis.String(object.realm_id)
192
+ : "",
193
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
194
+ version: isSet(object.version) ? BigInt(object.version) : 0n,
195
+ createdAt: isSet(object.createdAt)
196
+ ? fromJsonTimestamp(object.createdAt)
197
+ : isSet(object.created_at)
198
+ ? fromJsonTimestamp(object.created_at)
199
+ : undefined,
200
+ updatedAt: isSet(object.updatedAt)
201
+ ? fromJsonTimestamp(object.updatedAt)
202
+ : isSet(object.updated_at)
203
+ ? fromJsonTimestamp(object.updated_at)
204
+ : undefined,
205
+ provider: isSet(object.provider) ? globalThis.String(object.provider) : "",
206
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
207
+ connectionId: isSet(object.connectionId)
208
+ ? globalThis.String(object.connectionId)
209
+ : isSet(object.connection_id)
210
+ ? globalThis.String(object.connection_id)
211
+ : "",
212
+ agentId: isSet(object.agentId)
213
+ ? globalThis.String(object.agentId)
214
+ : isSet(object.agent_id)
215
+ ? globalThis.String(object.agent_id)
216
+ : "",
217
+ configuration: isObject(object.configuration) ? object.configuration : undefined,
218
+ };
219
+ },
220
+ toJSON(message) {
221
+ const obj = {};
222
+ if (message.id !== "") {
223
+ obj.id = message.id;
224
+ }
225
+ if (message.orgId !== "") {
226
+ obj.orgId = message.orgId;
227
+ }
228
+ if (message.realmId !== "") {
229
+ obj.realmId = message.realmId;
230
+ }
231
+ if (message.status !== "") {
232
+ obj.status = message.status;
233
+ }
234
+ if (message.version !== 0n) {
235
+ obj.version = message.version.toString();
236
+ }
237
+ if (message.createdAt !== undefined) {
238
+ obj.createdAt = message.createdAt.toISOString();
239
+ }
240
+ if (message.updatedAt !== undefined) {
241
+ obj.updatedAt = message.updatedAt.toISOString();
242
+ }
243
+ if (message.provider !== "") {
244
+ obj.provider = message.provider;
245
+ }
246
+ if (message.name !== "") {
247
+ obj.name = message.name;
248
+ }
249
+ if (message.connectionId !== "") {
250
+ obj.connectionId = message.connectionId;
251
+ }
252
+ if (message.agentId !== "") {
253
+ obj.agentId = message.agentId;
254
+ }
255
+ if (message.configuration !== undefined) {
256
+ obj.configuration = message.configuration;
257
+ }
258
+ return obj;
259
+ },
260
+ create(base) {
261
+ return Channel.fromPartial(base ?? {});
262
+ },
263
+ fromPartial(object) {
264
+ const message = createBaseChannel();
265
+ message.id = object.id ?? "";
266
+ message.orgId = object.orgId ?? "";
267
+ message.realmId = object.realmId ?? "";
268
+ message.status = object.status ?? "";
269
+ message.version = (object.version !== undefined && object.version !== null) ? BigInt(object.version) : 0n;
270
+ message.createdAt = object.createdAt ?? undefined;
271
+ message.updatedAt = object.updatedAt ?? undefined;
272
+ message.provider = object.provider ?? "";
273
+ message.name = object.name ?? "";
274
+ message.connectionId = object.connectionId ?? "";
275
+ message.agentId = object.agentId ?? "";
276
+ message.configuration = object.configuration ?? undefined;
277
+ return message;
278
+ },
279
+ };
280
+ function createBaseChannelInstallation() {
281
+ return {
282
+ channelId: "",
283
+ channelVersion: 0n,
284
+ credentialGeneration: 0n,
285
+ status: "",
286
+ provider: "",
287
+ workspaceId: "",
288
+ applicationId: "",
289
+ botId: "",
290
+ webhookUrl: "",
291
+ verifiedAt: undefined,
292
+ setupCode: "",
293
+ };
294
+ }
295
+ export const ChannelInstallation = {
296
+ encode(message, writer = new BinaryWriter()) {
297
+ if (message.channelId !== "") {
298
+ writer.uint32(10).string(message.channelId);
299
+ }
300
+ if (message.channelVersion !== 0n) {
301
+ if (BigInt.asIntN(64, message.channelVersion) !== message.channelVersion) {
302
+ throw new globalThis.Error("value provided for field message.channelVersion of type int64 too large");
303
+ }
304
+ writer.uint32(16).int64(message.channelVersion);
305
+ }
306
+ if (message.credentialGeneration !== 0n) {
307
+ if (BigInt.asIntN(64, message.credentialGeneration) !== message.credentialGeneration) {
308
+ throw new globalThis.Error("value provided for field message.credentialGeneration of type int64 too large");
309
+ }
310
+ writer.uint32(24).int64(message.credentialGeneration);
311
+ }
312
+ if (message.status !== "") {
313
+ writer.uint32(34).string(message.status);
314
+ }
315
+ if (message.provider !== "") {
316
+ writer.uint32(42).string(message.provider);
317
+ }
318
+ if (message.workspaceId !== "") {
319
+ writer.uint32(50).string(message.workspaceId);
320
+ }
321
+ if (message.applicationId !== "") {
322
+ writer.uint32(58).string(message.applicationId);
323
+ }
324
+ if (message.botId !== "") {
325
+ writer.uint32(66).string(message.botId);
326
+ }
327
+ if (message.webhookUrl !== "") {
328
+ writer.uint32(74).string(message.webhookUrl);
329
+ }
330
+ if (message.verifiedAt !== undefined) {
331
+ Timestamp.encode(toTimestamp(message.verifiedAt), writer.uint32(82).fork()).join();
332
+ }
333
+ if (message.setupCode !== "") {
334
+ writer.uint32(90).string(message.setupCode);
335
+ }
336
+ return writer;
337
+ },
338
+ decode(input, length) {
339
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
340
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
341
+ if (previousRecursionDepth >= 100) {
342
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
343
+ }
344
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
345
+ try {
346
+ const end = length === undefined ? reader.len : reader.pos + length;
347
+ const message = createBaseChannelInstallation();
348
+ while (reader.pos < end) {
349
+ const tag = reader.uint32();
350
+ switch (tag >>> 3) {
351
+ case 1: {
352
+ if (tag !== 10) {
353
+ break;
354
+ }
355
+ message.channelId = reader.string();
356
+ continue;
357
+ }
358
+ case 2: {
359
+ if (tag !== 16) {
360
+ break;
361
+ }
362
+ message.channelVersion = reader.int64();
363
+ continue;
364
+ }
365
+ case 3: {
366
+ if (tag !== 24) {
367
+ break;
368
+ }
369
+ message.credentialGeneration = reader.int64();
370
+ continue;
371
+ }
372
+ case 4: {
373
+ if (tag !== 34) {
374
+ break;
375
+ }
376
+ message.status = reader.string();
377
+ continue;
378
+ }
379
+ case 5: {
380
+ if (tag !== 42) {
381
+ break;
382
+ }
383
+ message.provider = reader.string();
384
+ continue;
385
+ }
386
+ case 6: {
387
+ if (tag !== 50) {
388
+ break;
389
+ }
390
+ message.workspaceId = reader.string();
391
+ continue;
392
+ }
393
+ case 7: {
394
+ if (tag !== 58) {
395
+ break;
396
+ }
397
+ message.applicationId = reader.string();
398
+ continue;
399
+ }
400
+ case 8: {
401
+ if (tag !== 66) {
402
+ break;
403
+ }
404
+ message.botId = reader.string();
405
+ continue;
406
+ }
407
+ case 9: {
408
+ if (tag !== 74) {
409
+ break;
410
+ }
411
+ message.webhookUrl = reader.string();
412
+ continue;
413
+ }
414
+ case 10: {
415
+ if (tag !== 82) {
416
+ break;
417
+ }
418
+ message.verifiedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
419
+ continue;
420
+ }
421
+ case 11: {
422
+ if (tag !== 90) {
423
+ break;
424
+ }
425
+ message.setupCode = reader.string();
426
+ continue;
427
+ }
428
+ }
429
+ if ((tag & 7) === 4 || tag === 0) {
430
+ break;
431
+ }
432
+ reader.skip(tag & 7);
433
+ }
434
+ return message;
435
+ }
436
+ finally {
437
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
438
+ }
439
+ },
440
+ fromJSON(object) {
441
+ return {
442
+ channelId: isSet(object.channelId)
443
+ ? globalThis.String(object.channelId)
444
+ : isSet(object.channel_id)
445
+ ? globalThis.String(object.channel_id)
446
+ : "",
447
+ channelVersion: isSet(object.channelVersion)
448
+ ? BigInt(object.channelVersion)
449
+ : isSet(object.channel_version)
450
+ ? BigInt(object.channel_version)
451
+ : 0n,
452
+ credentialGeneration: isSet(object.credentialGeneration)
453
+ ? BigInt(object.credentialGeneration)
454
+ : isSet(object.credential_generation)
455
+ ? BigInt(object.credential_generation)
456
+ : 0n,
457
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
458
+ provider: isSet(object.provider) ? globalThis.String(object.provider) : "",
459
+ workspaceId: isSet(object.workspaceId)
460
+ ? globalThis.String(object.workspaceId)
461
+ : isSet(object.workspace_id)
462
+ ? globalThis.String(object.workspace_id)
463
+ : "",
464
+ applicationId: isSet(object.applicationId)
465
+ ? globalThis.String(object.applicationId)
466
+ : isSet(object.application_id)
467
+ ? globalThis.String(object.application_id)
468
+ : "",
469
+ botId: isSet(object.botId)
470
+ ? globalThis.String(object.botId)
471
+ : isSet(object.bot_id)
472
+ ? globalThis.String(object.bot_id)
473
+ : "",
474
+ webhookUrl: isSet(object.webhookUrl)
475
+ ? globalThis.String(object.webhookUrl)
476
+ : isSet(object.webhook_url)
477
+ ? globalThis.String(object.webhook_url)
478
+ : "",
479
+ verifiedAt: isSet(object.verifiedAt)
480
+ ? fromJsonTimestamp(object.verifiedAt)
481
+ : isSet(object.verified_at)
482
+ ? fromJsonTimestamp(object.verified_at)
483
+ : undefined,
484
+ setupCode: isSet(object.setupCode)
485
+ ? globalThis.String(object.setupCode)
486
+ : isSet(object.setup_code)
487
+ ? globalThis.String(object.setup_code)
488
+ : "",
489
+ };
490
+ },
491
+ toJSON(message) {
492
+ const obj = {};
493
+ if (message.channelId !== "") {
494
+ obj.channelId = message.channelId;
495
+ }
496
+ if (message.channelVersion !== 0n) {
497
+ obj.channelVersion = message.channelVersion.toString();
498
+ }
499
+ if (message.credentialGeneration !== 0n) {
500
+ obj.credentialGeneration = message.credentialGeneration.toString();
501
+ }
502
+ if (message.status !== "") {
503
+ obj.status = message.status;
504
+ }
505
+ if (message.provider !== "") {
506
+ obj.provider = message.provider;
507
+ }
508
+ if (message.workspaceId !== "") {
509
+ obj.workspaceId = message.workspaceId;
510
+ }
511
+ if (message.applicationId !== "") {
512
+ obj.applicationId = message.applicationId;
513
+ }
514
+ if (message.botId !== "") {
515
+ obj.botId = message.botId;
516
+ }
517
+ if (message.webhookUrl !== "") {
518
+ obj.webhookUrl = message.webhookUrl;
519
+ }
520
+ if (message.verifiedAt !== undefined) {
521
+ obj.verifiedAt = message.verifiedAt.toISOString();
522
+ }
523
+ if (message.setupCode !== "") {
524
+ obj.setupCode = message.setupCode;
525
+ }
526
+ return obj;
527
+ },
528
+ create(base) {
529
+ return ChannelInstallation.fromPartial(base ?? {});
530
+ },
531
+ fromPartial(object) {
532
+ const message = createBaseChannelInstallation();
533
+ message.channelId = object.channelId ?? "";
534
+ message.channelVersion = (object.channelVersion !== undefined && object.channelVersion !== null)
535
+ ? BigInt(object.channelVersion)
536
+ : 0n;
537
+ message.credentialGeneration = (object.credentialGeneration !== undefined && object.credentialGeneration !== null)
538
+ ? BigInt(object.credentialGeneration)
539
+ : 0n;
540
+ message.status = object.status ?? "";
541
+ message.provider = object.provider ?? "";
542
+ message.workspaceId = object.workspaceId ?? "";
543
+ message.applicationId = object.applicationId ?? "";
544
+ message.botId = object.botId ?? "";
545
+ message.webhookUrl = object.webhookUrl ?? "";
546
+ message.verifiedAt = object.verifiedAt ?? undefined;
547
+ message.setupCode = object.setupCode ?? "";
548
+ return message;
549
+ },
550
+ };
551
+ function createBaseGetChannelInstallationRequest() {
552
+ return { orgId: "", realmId: "", channelId: "" };
553
+ }
554
+ export const GetChannelInstallationRequest = {
555
+ encode(message, writer = new BinaryWriter()) {
556
+ if (message.orgId !== "") {
557
+ writer.uint32(10).string(message.orgId);
558
+ }
559
+ if (message.realmId !== "") {
560
+ writer.uint32(18).string(message.realmId);
561
+ }
562
+ if (message.channelId !== "") {
563
+ writer.uint32(26).string(message.channelId);
564
+ }
565
+ return writer;
566
+ },
567
+ decode(input, length) {
568
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
569
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
570
+ if (previousRecursionDepth >= 100) {
571
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
572
+ }
573
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
574
+ try {
575
+ const end = length === undefined ? reader.len : reader.pos + length;
576
+ const message = createBaseGetChannelInstallationRequest();
577
+ while (reader.pos < end) {
578
+ const tag = reader.uint32();
579
+ switch (tag >>> 3) {
580
+ case 1: {
581
+ if (tag !== 10) {
582
+ break;
583
+ }
584
+ message.orgId = reader.string();
585
+ continue;
586
+ }
587
+ case 2: {
588
+ if (tag !== 18) {
589
+ break;
590
+ }
591
+ message.realmId = reader.string();
592
+ continue;
593
+ }
594
+ case 3: {
595
+ if (tag !== 26) {
596
+ break;
597
+ }
598
+ message.channelId = reader.string();
599
+ continue;
600
+ }
601
+ }
602
+ if ((tag & 7) === 4 || tag === 0) {
603
+ break;
604
+ }
605
+ reader.skip(tag & 7);
606
+ }
607
+ return message;
608
+ }
609
+ finally {
610
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
611
+ }
612
+ },
613
+ fromJSON(object) {
614
+ return {
615
+ orgId: isSet(object.orgId)
616
+ ? globalThis.String(object.orgId)
617
+ : isSet(object.org_id)
618
+ ? globalThis.String(object.org_id)
619
+ : "",
620
+ realmId: isSet(object.realmId)
621
+ ? globalThis.String(object.realmId)
622
+ : isSet(object.realm_id)
623
+ ? globalThis.String(object.realm_id)
624
+ : "",
625
+ channelId: isSet(object.channelId)
626
+ ? globalThis.String(object.channelId)
627
+ : isSet(object.channel_id)
628
+ ? globalThis.String(object.channel_id)
629
+ : "",
630
+ };
631
+ },
632
+ toJSON(message) {
633
+ const obj = {};
634
+ if (message.orgId !== "") {
635
+ obj.orgId = message.orgId;
636
+ }
637
+ if (message.realmId !== "") {
638
+ obj.realmId = message.realmId;
639
+ }
640
+ if (message.channelId !== "") {
641
+ obj.channelId = message.channelId;
642
+ }
643
+ return obj;
644
+ },
645
+ create(base) {
646
+ return GetChannelInstallationRequest.fromPartial(base ?? {});
647
+ },
648
+ fromPartial(object) {
649
+ const message = createBaseGetChannelInstallationRequest();
650
+ message.orgId = object.orgId ?? "";
651
+ message.realmId = object.realmId ?? "";
652
+ message.channelId = object.channelId ?? "";
653
+ return message;
654
+ },
655
+ };
656
+ function createBaseConfigureChannelInstallationRequest() {
657
+ return {
658
+ orgId: "",
659
+ realmId: "",
660
+ channelId: "",
661
+ expectedVersion: 0n,
662
+ expectedCredentialGeneration: 0n,
663
+ credentials: {},
664
+ };
665
+ }
666
+ export const ConfigureChannelInstallationRequest = {
667
+ encode(message, writer = new BinaryWriter()) {
668
+ if (message.orgId !== "") {
669
+ writer.uint32(10).string(message.orgId);
670
+ }
671
+ if (message.realmId !== "") {
672
+ writer.uint32(18).string(message.realmId);
673
+ }
674
+ if (message.channelId !== "") {
675
+ writer.uint32(26).string(message.channelId);
676
+ }
677
+ if (message.expectedVersion !== 0n) {
678
+ if (BigInt.asIntN(64, message.expectedVersion) !== message.expectedVersion) {
679
+ throw new globalThis.Error("value provided for field message.expectedVersion of type int64 too large");
680
+ }
681
+ writer.uint32(32).int64(message.expectedVersion);
682
+ }
683
+ if (message.expectedCredentialGeneration !== 0n) {
684
+ if (BigInt.asIntN(64, message.expectedCredentialGeneration) !== message.expectedCredentialGeneration) {
685
+ throw new globalThis.Error("value provided for field message.expectedCredentialGeneration of type int64 too large");
686
+ }
687
+ writer.uint32(40).int64(message.expectedCredentialGeneration);
688
+ }
689
+ globalThis.Object.entries(message.credentials).forEach(([key, value]) => {
690
+ ConfigureChannelInstallationRequest_CredentialsEntry.encode({ key: key, value }, writer.uint32(50).fork())
691
+ .join();
692
+ });
693
+ return writer;
694
+ },
695
+ decode(input, length) {
696
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
697
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
698
+ if (previousRecursionDepth >= 100) {
699
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
700
+ }
701
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
702
+ try {
703
+ const end = length === undefined ? reader.len : reader.pos + length;
704
+ const message = createBaseConfigureChannelInstallationRequest();
705
+ while (reader.pos < end) {
706
+ const tag = reader.uint32();
707
+ switch (tag >>> 3) {
708
+ case 1: {
709
+ if (tag !== 10) {
710
+ break;
711
+ }
712
+ message.orgId = reader.string();
713
+ continue;
714
+ }
715
+ case 2: {
716
+ if (tag !== 18) {
717
+ break;
718
+ }
719
+ message.realmId = reader.string();
720
+ continue;
721
+ }
722
+ case 3: {
723
+ if (tag !== 26) {
724
+ break;
725
+ }
726
+ message.channelId = reader.string();
727
+ continue;
728
+ }
729
+ case 4: {
730
+ if (tag !== 32) {
731
+ break;
732
+ }
733
+ message.expectedVersion = reader.int64();
734
+ continue;
735
+ }
736
+ case 5: {
737
+ if (tag !== 40) {
738
+ break;
739
+ }
740
+ message.expectedCredentialGeneration = reader.int64();
741
+ continue;
742
+ }
743
+ case 6: {
744
+ if (tag !== 50) {
745
+ break;
746
+ }
747
+ const entry6 = ConfigureChannelInstallationRequest_CredentialsEntry.decode(reader, reader.uint32());
748
+ if (entry6.value !== undefined) {
749
+ message.credentials[entry6.key] = entry6.value;
750
+ }
751
+ continue;
752
+ }
753
+ }
754
+ if ((tag & 7) === 4 || tag === 0) {
755
+ break;
756
+ }
757
+ reader.skip(tag & 7);
758
+ }
759
+ return message;
760
+ }
761
+ finally {
762
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
763
+ }
764
+ },
765
+ fromJSON(object) {
766
+ return {
767
+ orgId: isSet(object.orgId)
768
+ ? globalThis.String(object.orgId)
769
+ : isSet(object.org_id)
770
+ ? globalThis.String(object.org_id)
771
+ : "",
772
+ realmId: isSet(object.realmId)
773
+ ? globalThis.String(object.realmId)
774
+ : isSet(object.realm_id)
775
+ ? globalThis.String(object.realm_id)
776
+ : "",
777
+ channelId: isSet(object.channelId)
778
+ ? globalThis.String(object.channelId)
779
+ : isSet(object.channel_id)
780
+ ? globalThis.String(object.channel_id)
781
+ : "",
782
+ expectedVersion: isSet(object.expectedVersion)
783
+ ? BigInt(object.expectedVersion)
784
+ : isSet(object.expected_version)
785
+ ? BigInt(object.expected_version)
786
+ : 0n,
787
+ expectedCredentialGeneration: isSet(object.expectedCredentialGeneration)
788
+ ? BigInt(object.expectedCredentialGeneration)
789
+ : isSet(object.expected_credential_generation)
790
+ ? BigInt(object.expected_credential_generation)
791
+ : 0n,
792
+ credentials: isObject(object.credentials)
793
+ ? globalThis.Object.entries(object.credentials).reduce((acc, [key, value]) => {
794
+ globalThis.Object.defineProperty(acc, key, {
795
+ value: globalThis.String(value),
796
+ enumerable: true,
797
+ configurable: true,
798
+ writable: true,
799
+ });
800
+ return acc;
801
+ }, {})
802
+ : {},
803
+ };
804
+ },
805
+ toJSON(message) {
806
+ const obj = {};
807
+ if (message.orgId !== "") {
808
+ obj.orgId = message.orgId;
809
+ }
810
+ if (message.realmId !== "") {
811
+ obj.realmId = message.realmId;
812
+ }
813
+ if (message.channelId !== "") {
814
+ obj.channelId = message.channelId;
815
+ }
816
+ if (message.expectedVersion !== 0n) {
817
+ obj.expectedVersion = message.expectedVersion.toString();
818
+ }
819
+ if (message.expectedCredentialGeneration !== 0n) {
820
+ obj.expectedCredentialGeneration = message.expectedCredentialGeneration.toString();
821
+ }
822
+ if (message.credentials) {
823
+ const entries = globalThis.Object.entries(message.credentials);
824
+ if (entries.length > 0) {
825
+ obj.credentials = {};
826
+ entries.forEach(([k, v]) => {
827
+ obj.credentials[k] = v;
828
+ });
829
+ }
830
+ }
831
+ return obj;
832
+ },
833
+ create(base) {
834
+ return ConfigureChannelInstallationRequest.fromPartial(base ?? {});
835
+ },
836
+ fromPartial(object) {
837
+ const message = createBaseConfigureChannelInstallationRequest();
838
+ message.orgId = object.orgId ?? "";
839
+ message.realmId = object.realmId ?? "";
840
+ message.channelId = object.channelId ?? "";
841
+ message.expectedVersion = (object.expectedVersion !== undefined && object.expectedVersion !== null)
842
+ ? BigInt(object.expectedVersion)
843
+ : 0n;
844
+ message.expectedCredentialGeneration =
845
+ (object.expectedCredentialGeneration !== undefined && object.expectedCredentialGeneration !== null)
846
+ ? BigInt(object.expectedCredentialGeneration)
847
+ : 0n;
848
+ message.credentials = globalThis.Object.entries(object.credentials ?? {}).reduce((acc, [key, value]) => {
849
+ if (value !== undefined) {
850
+ acc[key] = globalThis.String(value);
851
+ }
852
+ return acc;
853
+ }, {});
854
+ return message;
855
+ },
856
+ };
857
+ function createBaseConfigureChannelInstallationRequest_CredentialsEntry() {
858
+ return { key: "", value: "" };
859
+ }
860
+ export const ConfigureChannelInstallationRequest_CredentialsEntry = {
861
+ encode(message, writer = new BinaryWriter()) {
862
+ if (message.key !== "") {
863
+ writer.uint32(10).string(message.key);
864
+ }
865
+ if (message.value !== "") {
866
+ writer.uint32(18).string(message.value);
867
+ }
868
+ return writer;
869
+ },
870
+ decode(input, length) {
871
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
872
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
873
+ if (previousRecursionDepth >= 100) {
874
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
875
+ }
876
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
877
+ try {
878
+ const end = length === undefined ? reader.len : reader.pos + length;
879
+ const message = createBaseConfigureChannelInstallationRequest_CredentialsEntry();
880
+ while (reader.pos < end) {
881
+ const tag = reader.uint32();
882
+ switch (tag >>> 3) {
883
+ case 1: {
884
+ if (tag !== 10) {
885
+ break;
886
+ }
887
+ message.key = reader.string();
888
+ continue;
889
+ }
890
+ case 2: {
891
+ if (tag !== 18) {
892
+ break;
893
+ }
894
+ message.value = reader.string();
895
+ continue;
896
+ }
897
+ }
898
+ if ((tag & 7) === 4 || tag === 0) {
899
+ break;
900
+ }
901
+ reader.skip(tag & 7);
902
+ }
903
+ return message;
904
+ }
905
+ finally {
906
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
907
+ }
908
+ },
909
+ fromJSON(object) {
910
+ return {
911
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
912
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
913
+ };
914
+ },
915
+ toJSON(message) {
916
+ const obj = {};
917
+ if (message.key !== "") {
918
+ obj.key = message.key;
919
+ }
920
+ if (message.value !== "") {
921
+ obj.value = message.value;
922
+ }
923
+ return obj;
924
+ },
925
+ create(base) {
926
+ return ConfigureChannelInstallationRequest_CredentialsEntry.fromPartial(base ?? {});
927
+ },
928
+ fromPartial(object) {
929
+ const message = createBaseConfigureChannelInstallationRequest_CredentialsEntry();
930
+ message.key = object.key ?? "";
931
+ message.value = object.value ?? "";
932
+ return message;
933
+ },
934
+ };
935
+ function createBaseRevokeChannelInstallationRequest() {
936
+ return { orgId: "", realmId: "", channelId: "", expectedVersion: 0n, expectedCredentialGeneration: 0n };
937
+ }
938
+ export const RevokeChannelInstallationRequest = {
939
+ encode(message, writer = new BinaryWriter()) {
940
+ if (message.orgId !== "") {
941
+ writer.uint32(10).string(message.orgId);
942
+ }
943
+ if (message.realmId !== "") {
944
+ writer.uint32(18).string(message.realmId);
945
+ }
946
+ if (message.channelId !== "") {
947
+ writer.uint32(26).string(message.channelId);
948
+ }
949
+ if (message.expectedVersion !== 0n) {
950
+ if (BigInt.asIntN(64, message.expectedVersion) !== message.expectedVersion) {
951
+ throw new globalThis.Error("value provided for field message.expectedVersion of type int64 too large");
952
+ }
953
+ writer.uint32(32).int64(message.expectedVersion);
954
+ }
955
+ if (message.expectedCredentialGeneration !== 0n) {
956
+ if (BigInt.asIntN(64, message.expectedCredentialGeneration) !== message.expectedCredentialGeneration) {
957
+ throw new globalThis.Error("value provided for field message.expectedCredentialGeneration of type int64 too large");
958
+ }
959
+ writer.uint32(40).int64(message.expectedCredentialGeneration);
960
+ }
961
+ return writer;
962
+ },
963
+ decode(input, length) {
964
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
965
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
966
+ if (previousRecursionDepth >= 100) {
967
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
968
+ }
969
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
970
+ try {
971
+ const end = length === undefined ? reader.len : reader.pos + length;
972
+ const message = createBaseRevokeChannelInstallationRequest();
973
+ while (reader.pos < end) {
974
+ const tag = reader.uint32();
975
+ switch (tag >>> 3) {
976
+ case 1: {
977
+ if (tag !== 10) {
978
+ break;
979
+ }
980
+ message.orgId = reader.string();
981
+ continue;
982
+ }
983
+ case 2: {
984
+ if (tag !== 18) {
985
+ break;
986
+ }
987
+ message.realmId = reader.string();
988
+ continue;
989
+ }
990
+ case 3: {
991
+ if (tag !== 26) {
992
+ break;
993
+ }
994
+ message.channelId = reader.string();
995
+ continue;
996
+ }
997
+ case 4: {
998
+ if (tag !== 32) {
999
+ break;
1000
+ }
1001
+ message.expectedVersion = reader.int64();
1002
+ continue;
1003
+ }
1004
+ case 5: {
1005
+ if (tag !== 40) {
1006
+ break;
1007
+ }
1008
+ message.expectedCredentialGeneration = reader.int64();
1009
+ continue;
1010
+ }
1011
+ }
1012
+ if ((tag & 7) === 4 || tag === 0) {
1013
+ break;
1014
+ }
1015
+ reader.skip(tag & 7);
1016
+ }
1017
+ return message;
1018
+ }
1019
+ finally {
1020
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1021
+ }
1022
+ },
1023
+ fromJSON(object) {
1024
+ return {
1025
+ orgId: isSet(object.orgId)
1026
+ ? globalThis.String(object.orgId)
1027
+ : isSet(object.org_id)
1028
+ ? globalThis.String(object.org_id)
1029
+ : "",
1030
+ realmId: isSet(object.realmId)
1031
+ ? globalThis.String(object.realmId)
1032
+ : isSet(object.realm_id)
1033
+ ? globalThis.String(object.realm_id)
1034
+ : "",
1035
+ channelId: isSet(object.channelId)
1036
+ ? globalThis.String(object.channelId)
1037
+ : isSet(object.channel_id)
1038
+ ? globalThis.String(object.channel_id)
1039
+ : "",
1040
+ expectedVersion: isSet(object.expectedVersion)
1041
+ ? BigInt(object.expectedVersion)
1042
+ : isSet(object.expected_version)
1043
+ ? BigInt(object.expected_version)
1044
+ : 0n,
1045
+ expectedCredentialGeneration: isSet(object.expectedCredentialGeneration)
1046
+ ? BigInt(object.expectedCredentialGeneration)
1047
+ : isSet(object.expected_credential_generation)
1048
+ ? BigInt(object.expected_credential_generation)
1049
+ : 0n,
1050
+ };
1051
+ },
1052
+ toJSON(message) {
1053
+ const obj = {};
1054
+ if (message.orgId !== "") {
1055
+ obj.orgId = message.orgId;
1056
+ }
1057
+ if (message.realmId !== "") {
1058
+ obj.realmId = message.realmId;
1059
+ }
1060
+ if (message.channelId !== "") {
1061
+ obj.channelId = message.channelId;
1062
+ }
1063
+ if (message.expectedVersion !== 0n) {
1064
+ obj.expectedVersion = message.expectedVersion.toString();
1065
+ }
1066
+ if (message.expectedCredentialGeneration !== 0n) {
1067
+ obj.expectedCredentialGeneration = message.expectedCredentialGeneration.toString();
1068
+ }
1069
+ return obj;
1070
+ },
1071
+ create(base) {
1072
+ return RevokeChannelInstallationRequest.fromPartial(base ?? {});
1073
+ },
1074
+ fromPartial(object) {
1075
+ const message = createBaseRevokeChannelInstallationRequest();
1076
+ message.orgId = object.orgId ?? "";
1077
+ message.realmId = object.realmId ?? "";
1078
+ message.channelId = object.channelId ?? "";
1079
+ message.expectedVersion = (object.expectedVersion !== undefined && object.expectedVersion !== null)
1080
+ ? BigInt(object.expectedVersion)
1081
+ : 0n;
1082
+ message.expectedCredentialGeneration =
1083
+ (object.expectedCredentialGeneration !== undefined && object.expectedCredentialGeneration !== null)
1084
+ ? BigInt(object.expectedCredentialGeneration)
1085
+ : 0n;
1086
+ return message;
1087
+ },
1088
+ };
1089
+ function createBaseCreateChannelRequest() {
1090
+ return { orgId: "", realmId: "", channel: undefined };
1091
+ }
1092
+ export const CreateChannelRequest = {
1093
+ encode(message, writer = new BinaryWriter()) {
1094
+ if (message.orgId !== "") {
1095
+ writer.uint32(10).string(message.orgId);
1096
+ }
1097
+ if (message.realmId !== "") {
1098
+ writer.uint32(18).string(message.realmId);
1099
+ }
1100
+ if (message.channel !== undefined) {
1101
+ Channel.encode(message.channel, writer.uint32(26).fork()).join();
1102
+ }
1103
+ return writer;
1104
+ },
1105
+ decode(input, length) {
1106
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1107
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1108
+ if (previousRecursionDepth >= 100) {
1109
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1110
+ }
1111
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1112
+ try {
1113
+ const end = length === undefined ? reader.len : reader.pos + length;
1114
+ const message = createBaseCreateChannelRequest();
1115
+ while (reader.pos < end) {
1116
+ const tag = reader.uint32();
1117
+ switch (tag >>> 3) {
1118
+ case 1: {
1119
+ if (tag !== 10) {
1120
+ break;
1121
+ }
1122
+ message.orgId = reader.string();
1123
+ continue;
1124
+ }
1125
+ case 2: {
1126
+ if (tag !== 18) {
1127
+ break;
1128
+ }
1129
+ message.realmId = reader.string();
1130
+ continue;
1131
+ }
1132
+ case 3: {
1133
+ if (tag !== 26) {
1134
+ break;
1135
+ }
1136
+ message.channel = Channel.decode(reader, reader.uint32());
1137
+ continue;
1138
+ }
1139
+ }
1140
+ if ((tag & 7) === 4 || tag === 0) {
1141
+ break;
1142
+ }
1143
+ reader.skip(tag & 7);
1144
+ }
1145
+ return message;
1146
+ }
1147
+ finally {
1148
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1149
+ }
1150
+ },
1151
+ fromJSON(object) {
1152
+ return {
1153
+ orgId: isSet(object.orgId)
1154
+ ? globalThis.String(object.orgId)
1155
+ : isSet(object.org_id)
1156
+ ? globalThis.String(object.org_id)
1157
+ : "",
1158
+ realmId: isSet(object.realmId)
1159
+ ? globalThis.String(object.realmId)
1160
+ : isSet(object.realm_id)
1161
+ ? globalThis.String(object.realm_id)
1162
+ : "",
1163
+ channel: isSet(object.channel) ? Channel.fromJSON(object.channel) : undefined,
1164
+ };
1165
+ },
1166
+ toJSON(message) {
1167
+ const obj = {};
1168
+ if (message.orgId !== "") {
1169
+ obj.orgId = message.orgId;
1170
+ }
1171
+ if (message.realmId !== "") {
1172
+ obj.realmId = message.realmId;
1173
+ }
1174
+ if (message.channel !== undefined) {
1175
+ obj.channel = Channel.toJSON(message.channel);
1176
+ }
1177
+ return obj;
1178
+ },
1179
+ create(base) {
1180
+ return CreateChannelRequest.fromPartial(base ?? {});
1181
+ },
1182
+ fromPartial(object) {
1183
+ const message = createBaseCreateChannelRequest();
1184
+ message.orgId = object.orgId ?? "";
1185
+ message.realmId = object.realmId ?? "";
1186
+ message.channel = (object.channel !== undefined && object.channel !== null)
1187
+ ? Channel.fromPartial(object.channel)
1188
+ : undefined;
1189
+ return message;
1190
+ },
1191
+ };
1192
+ function createBaseUpdateChannelRequest() {
1193
+ return { orgId: "", realmId: "", id: "", channel: undefined, expectedVersion: 0n };
1194
+ }
1195
+ export const UpdateChannelRequest = {
1196
+ encode(message, writer = new BinaryWriter()) {
1197
+ if (message.orgId !== "") {
1198
+ writer.uint32(10).string(message.orgId);
1199
+ }
1200
+ if (message.realmId !== "") {
1201
+ writer.uint32(18).string(message.realmId);
1202
+ }
1203
+ if (message.id !== "") {
1204
+ writer.uint32(26).string(message.id);
1205
+ }
1206
+ if (message.channel !== undefined) {
1207
+ Channel.encode(message.channel, writer.uint32(34).fork()).join();
1208
+ }
1209
+ if (message.expectedVersion !== 0n) {
1210
+ if (BigInt.asIntN(64, message.expectedVersion) !== message.expectedVersion) {
1211
+ throw new globalThis.Error("value provided for field message.expectedVersion of type int64 too large");
1212
+ }
1213
+ writer.uint32(40).int64(message.expectedVersion);
1214
+ }
1215
+ return writer;
1216
+ },
1217
+ decode(input, length) {
1218
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1219
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1220
+ if (previousRecursionDepth >= 100) {
1221
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1222
+ }
1223
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1224
+ try {
1225
+ const end = length === undefined ? reader.len : reader.pos + length;
1226
+ const message = createBaseUpdateChannelRequest();
1227
+ while (reader.pos < end) {
1228
+ const tag = reader.uint32();
1229
+ switch (tag >>> 3) {
1230
+ case 1: {
1231
+ if (tag !== 10) {
1232
+ break;
1233
+ }
1234
+ message.orgId = reader.string();
1235
+ continue;
1236
+ }
1237
+ case 2: {
1238
+ if (tag !== 18) {
1239
+ break;
1240
+ }
1241
+ message.realmId = reader.string();
1242
+ continue;
1243
+ }
1244
+ case 3: {
1245
+ if (tag !== 26) {
1246
+ break;
1247
+ }
1248
+ message.id = reader.string();
1249
+ continue;
1250
+ }
1251
+ case 4: {
1252
+ if (tag !== 34) {
1253
+ break;
1254
+ }
1255
+ message.channel = Channel.decode(reader, reader.uint32());
1256
+ continue;
1257
+ }
1258
+ case 5: {
1259
+ if (tag !== 40) {
1260
+ break;
1261
+ }
1262
+ message.expectedVersion = reader.int64();
1263
+ continue;
1264
+ }
1265
+ }
1266
+ if ((tag & 7) === 4 || tag === 0) {
1267
+ break;
1268
+ }
1269
+ reader.skip(tag & 7);
1270
+ }
1271
+ return message;
1272
+ }
1273
+ finally {
1274
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1275
+ }
1276
+ },
1277
+ fromJSON(object) {
1278
+ return {
1279
+ orgId: isSet(object.orgId)
1280
+ ? globalThis.String(object.orgId)
1281
+ : isSet(object.org_id)
1282
+ ? globalThis.String(object.org_id)
1283
+ : "",
1284
+ realmId: isSet(object.realmId)
1285
+ ? globalThis.String(object.realmId)
1286
+ : isSet(object.realm_id)
1287
+ ? globalThis.String(object.realm_id)
1288
+ : "",
1289
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1290
+ channel: isSet(object.channel) ? Channel.fromJSON(object.channel) : undefined,
1291
+ expectedVersion: isSet(object.expectedVersion)
1292
+ ? BigInt(object.expectedVersion)
1293
+ : isSet(object.expected_version)
1294
+ ? BigInt(object.expected_version)
1295
+ : 0n,
1296
+ };
1297
+ },
1298
+ toJSON(message) {
1299
+ const obj = {};
1300
+ if (message.orgId !== "") {
1301
+ obj.orgId = message.orgId;
1302
+ }
1303
+ if (message.realmId !== "") {
1304
+ obj.realmId = message.realmId;
1305
+ }
1306
+ if (message.id !== "") {
1307
+ obj.id = message.id;
1308
+ }
1309
+ if (message.channel !== undefined) {
1310
+ obj.channel = Channel.toJSON(message.channel);
1311
+ }
1312
+ if (message.expectedVersion !== 0n) {
1313
+ obj.expectedVersion = message.expectedVersion.toString();
1314
+ }
1315
+ return obj;
1316
+ },
1317
+ create(base) {
1318
+ return UpdateChannelRequest.fromPartial(base ?? {});
1319
+ },
1320
+ fromPartial(object) {
1321
+ const message = createBaseUpdateChannelRequest();
1322
+ message.orgId = object.orgId ?? "";
1323
+ message.realmId = object.realmId ?? "";
1324
+ message.id = object.id ?? "";
1325
+ message.channel = (object.channel !== undefined && object.channel !== null)
1326
+ ? Channel.fromPartial(object.channel)
1327
+ : undefined;
1328
+ message.expectedVersion = (object.expectedVersion !== undefined && object.expectedVersion !== null)
1329
+ ? BigInt(object.expectedVersion)
1330
+ : 0n;
1331
+ return message;
1332
+ },
1333
+ };
1334
+ function createBaseGetChannelRequest() {
1335
+ return { orgId: "", realmId: "", id: "" };
1336
+ }
1337
+ export const GetChannelRequest = {
1338
+ encode(message, writer = new BinaryWriter()) {
1339
+ if (message.orgId !== "") {
1340
+ writer.uint32(10).string(message.orgId);
1341
+ }
1342
+ if (message.realmId !== "") {
1343
+ writer.uint32(18).string(message.realmId);
1344
+ }
1345
+ if (message.id !== "") {
1346
+ writer.uint32(26).string(message.id);
1347
+ }
1348
+ return writer;
1349
+ },
1350
+ decode(input, length) {
1351
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1352
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1353
+ if (previousRecursionDepth >= 100) {
1354
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1355
+ }
1356
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1357
+ try {
1358
+ const end = length === undefined ? reader.len : reader.pos + length;
1359
+ const message = createBaseGetChannelRequest();
1360
+ while (reader.pos < end) {
1361
+ const tag = reader.uint32();
1362
+ switch (tag >>> 3) {
1363
+ case 1: {
1364
+ if (tag !== 10) {
1365
+ break;
1366
+ }
1367
+ message.orgId = reader.string();
1368
+ continue;
1369
+ }
1370
+ case 2: {
1371
+ if (tag !== 18) {
1372
+ break;
1373
+ }
1374
+ message.realmId = reader.string();
1375
+ continue;
1376
+ }
1377
+ case 3: {
1378
+ if (tag !== 26) {
1379
+ break;
1380
+ }
1381
+ message.id = reader.string();
1382
+ continue;
1383
+ }
1384
+ }
1385
+ if ((tag & 7) === 4 || tag === 0) {
1386
+ break;
1387
+ }
1388
+ reader.skip(tag & 7);
1389
+ }
1390
+ return message;
1391
+ }
1392
+ finally {
1393
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1394
+ }
1395
+ },
1396
+ fromJSON(object) {
1397
+ return {
1398
+ orgId: isSet(object.orgId)
1399
+ ? globalThis.String(object.orgId)
1400
+ : isSet(object.org_id)
1401
+ ? globalThis.String(object.org_id)
1402
+ : "",
1403
+ realmId: isSet(object.realmId)
1404
+ ? globalThis.String(object.realmId)
1405
+ : isSet(object.realm_id)
1406
+ ? globalThis.String(object.realm_id)
1407
+ : "",
1408
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1409
+ };
1410
+ },
1411
+ toJSON(message) {
1412
+ const obj = {};
1413
+ if (message.orgId !== "") {
1414
+ obj.orgId = message.orgId;
1415
+ }
1416
+ if (message.realmId !== "") {
1417
+ obj.realmId = message.realmId;
1418
+ }
1419
+ if (message.id !== "") {
1420
+ obj.id = message.id;
1421
+ }
1422
+ return obj;
1423
+ },
1424
+ create(base) {
1425
+ return GetChannelRequest.fromPartial(base ?? {});
1426
+ },
1427
+ fromPartial(object) {
1428
+ const message = createBaseGetChannelRequest();
1429
+ message.orgId = object.orgId ?? "";
1430
+ message.realmId = object.realmId ?? "";
1431
+ message.id = object.id ?? "";
1432
+ return message;
1433
+ },
1434
+ };
1435
+ function createBaseDeleteChannelRequest() {
1436
+ return { orgId: "", realmId: "", id: "", expectedVersion: 0n };
1437
+ }
1438
+ export const DeleteChannelRequest = {
1439
+ encode(message, writer = new BinaryWriter()) {
1440
+ if (message.orgId !== "") {
1441
+ writer.uint32(10).string(message.orgId);
1442
+ }
1443
+ if (message.realmId !== "") {
1444
+ writer.uint32(18).string(message.realmId);
1445
+ }
1446
+ if (message.id !== "") {
1447
+ writer.uint32(26).string(message.id);
1448
+ }
1449
+ if (message.expectedVersion !== 0n) {
1450
+ if (BigInt.asIntN(64, message.expectedVersion) !== message.expectedVersion) {
1451
+ throw new globalThis.Error("value provided for field message.expectedVersion of type int64 too large");
1452
+ }
1453
+ writer.uint32(32).int64(message.expectedVersion);
1454
+ }
1455
+ return writer;
1456
+ },
1457
+ decode(input, length) {
1458
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1459
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1460
+ if (previousRecursionDepth >= 100) {
1461
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1462
+ }
1463
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1464
+ try {
1465
+ const end = length === undefined ? reader.len : reader.pos + length;
1466
+ const message = createBaseDeleteChannelRequest();
1467
+ while (reader.pos < end) {
1468
+ const tag = reader.uint32();
1469
+ switch (tag >>> 3) {
1470
+ case 1: {
1471
+ if (tag !== 10) {
1472
+ break;
1473
+ }
1474
+ message.orgId = reader.string();
1475
+ continue;
1476
+ }
1477
+ case 2: {
1478
+ if (tag !== 18) {
1479
+ break;
1480
+ }
1481
+ message.realmId = reader.string();
1482
+ continue;
1483
+ }
1484
+ case 3: {
1485
+ if (tag !== 26) {
1486
+ break;
1487
+ }
1488
+ message.id = reader.string();
1489
+ continue;
1490
+ }
1491
+ case 4: {
1492
+ if (tag !== 32) {
1493
+ break;
1494
+ }
1495
+ message.expectedVersion = reader.int64();
1496
+ continue;
1497
+ }
1498
+ }
1499
+ if ((tag & 7) === 4 || tag === 0) {
1500
+ break;
1501
+ }
1502
+ reader.skip(tag & 7);
1503
+ }
1504
+ return message;
1505
+ }
1506
+ finally {
1507
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1508
+ }
1509
+ },
1510
+ fromJSON(object) {
1511
+ return {
1512
+ orgId: isSet(object.orgId)
1513
+ ? globalThis.String(object.orgId)
1514
+ : isSet(object.org_id)
1515
+ ? globalThis.String(object.org_id)
1516
+ : "",
1517
+ realmId: isSet(object.realmId)
1518
+ ? globalThis.String(object.realmId)
1519
+ : isSet(object.realm_id)
1520
+ ? globalThis.String(object.realm_id)
1521
+ : "",
1522
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1523
+ expectedVersion: isSet(object.expectedVersion)
1524
+ ? BigInt(object.expectedVersion)
1525
+ : isSet(object.expected_version)
1526
+ ? BigInt(object.expected_version)
1527
+ : 0n,
1528
+ };
1529
+ },
1530
+ toJSON(message) {
1531
+ const obj = {};
1532
+ if (message.orgId !== "") {
1533
+ obj.orgId = message.orgId;
1534
+ }
1535
+ if (message.realmId !== "") {
1536
+ obj.realmId = message.realmId;
1537
+ }
1538
+ if (message.id !== "") {
1539
+ obj.id = message.id;
1540
+ }
1541
+ if (message.expectedVersion !== 0n) {
1542
+ obj.expectedVersion = message.expectedVersion.toString();
1543
+ }
1544
+ return obj;
1545
+ },
1546
+ create(base) {
1547
+ return DeleteChannelRequest.fromPartial(base ?? {});
1548
+ },
1549
+ fromPartial(object) {
1550
+ const message = createBaseDeleteChannelRequest();
1551
+ message.orgId = object.orgId ?? "";
1552
+ message.realmId = object.realmId ?? "";
1553
+ message.id = object.id ?? "";
1554
+ message.expectedVersion = (object.expectedVersion !== undefined && object.expectedVersion !== null)
1555
+ ? BigInt(object.expectedVersion)
1556
+ : 0n;
1557
+ return message;
1558
+ },
1559
+ };
1560
+ function createBaseListChannelsRequest() {
1561
+ return { orgId: "", realmId: "", pageSize: 0, pageToken: "" };
1562
+ }
1563
+ export const ListChannelsRequest = {
1564
+ encode(message, writer = new BinaryWriter()) {
1565
+ if (message.orgId !== "") {
1566
+ writer.uint32(10).string(message.orgId);
1567
+ }
1568
+ if (message.realmId !== "") {
1569
+ writer.uint32(18).string(message.realmId);
1570
+ }
1571
+ if (message.pageSize !== 0) {
1572
+ writer.uint32(24).int32(message.pageSize);
1573
+ }
1574
+ if (message.pageToken !== "") {
1575
+ writer.uint32(34).string(message.pageToken);
1576
+ }
1577
+ return writer;
1578
+ },
1579
+ decode(input, length) {
1580
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1581
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1582
+ if (previousRecursionDepth >= 100) {
1583
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1584
+ }
1585
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1586
+ try {
1587
+ const end = length === undefined ? reader.len : reader.pos + length;
1588
+ const message = createBaseListChannelsRequest();
1589
+ while (reader.pos < end) {
1590
+ const tag = reader.uint32();
1591
+ switch (tag >>> 3) {
1592
+ case 1: {
1593
+ if (tag !== 10) {
1594
+ break;
1595
+ }
1596
+ message.orgId = reader.string();
1597
+ continue;
1598
+ }
1599
+ case 2: {
1600
+ if (tag !== 18) {
1601
+ break;
1602
+ }
1603
+ message.realmId = reader.string();
1604
+ continue;
1605
+ }
1606
+ case 3: {
1607
+ if (tag !== 24) {
1608
+ break;
1609
+ }
1610
+ message.pageSize = reader.int32();
1611
+ continue;
1612
+ }
1613
+ case 4: {
1614
+ if (tag !== 34) {
1615
+ break;
1616
+ }
1617
+ message.pageToken = reader.string();
1618
+ continue;
1619
+ }
1620
+ }
1621
+ if ((tag & 7) === 4 || tag === 0) {
1622
+ break;
1623
+ }
1624
+ reader.skip(tag & 7);
1625
+ }
1626
+ return message;
1627
+ }
1628
+ finally {
1629
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1630
+ }
1631
+ },
1632
+ fromJSON(object) {
1633
+ return {
1634
+ orgId: isSet(object.orgId)
1635
+ ? globalThis.String(object.orgId)
1636
+ : isSet(object.org_id)
1637
+ ? globalThis.String(object.org_id)
1638
+ : "",
1639
+ realmId: isSet(object.realmId)
1640
+ ? globalThis.String(object.realmId)
1641
+ : isSet(object.realm_id)
1642
+ ? globalThis.String(object.realm_id)
1643
+ : "",
1644
+ pageSize: isSet(object.pageSize)
1645
+ ? globalThis.Number(object.pageSize)
1646
+ : isSet(object.page_size)
1647
+ ? globalThis.Number(object.page_size)
1648
+ : 0,
1649
+ pageToken: isSet(object.pageToken)
1650
+ ? globalThis.String(object.pageToken)
1651
+ : isSet(object.page_token)
1652
+ ? globalThis.String(object.page_token)
1653
+ : "",
1654
+ };
1655
+ },
1656
+ toJSON(message) {
1657
+ const obj = {};
1658
+ if (message.orgId !== "") {
1659
+ obj.orgId = message.orgId;
1660
+ }
1661
+ if (message.realmId !== "") {
1662
+ obj.realmId = message.realmId;
1663
+ }
1664
+ if (message.pageSize !== 0) {
1665
+ obj.pageSize = Math.round(message.pageSize);
1666
+ }
1667
+ if (message.pageToken !== "") {
1668
+ obj.pageToken = message.pageToken;
1669
+ }
1670
+ return obj;
1671
+ },
1672
+ create(base) {
1673
+ return ListChannelsRequest.fromPartial(base ?? {});
1674
+ },
1675
+ fromPartial(object) {
1676
+ const message = createBaseListChannelsRequest();
1677
+ message.orgId = object.orgId ?? "";
1678
+ message.realmId = object.realmId ?? "";
1679
+ message.pageSize = object.pageSize ?? 0;
1680
+ message.pageToken = object.pageToken ?? "";
1681
+ return message;
1682
+ },
1683
+ };
1684
+ function createBaseListChannelsResponse() {
1685
+ return { items: [], nextPageToken: "" };
1686
+ }
1687
+ export const ListChannelsResponse = {
1688
+ encode(message, writer = new BinaryWriter()) {
1689
+ for (const v of message.items) {
1690
+ Channel.encode(v, writer.uint32(10).fork()).join();
1691
+ }
1692
+ if (message.nextPageToken !== "") {
1693
+ writer.uint32(18).string(message.nextPageToken);
1694
+ }
1695
+ return writer;
1696
+ },
1697
+ decode(input, length) {
1698
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1699
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1700
+ if (previousRecursionDepth >= 100) {
1701
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1702
+ }
1703
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1704
+ try {
1705
+ const end = length === undefined ? reader.len : reader.pos + length;
1706
+ const message = createBaseListChannelsResponse();
1707
+ while (reader.pos < end) {
1708
+ const tag = reader.uint32();
1709
+ switch (tag >>> 3) {
1710
+ case 1: {
1711
+ if (tag !== 10) {
1712
+ break;
1713
+ }
1714
+ message.items.push(Channel.decode(reader, reader.uint32()));
1715
+ continue;
1716
+ }
1717
+ case 2: {
1718
+ if (tag !== 18) {
1719
+ break;
1720
+ }
1721
+ message.nextPageToken = reader.string();
1722
+ continue;
1723
+ }
1724
+ }
1725
+ if ((tag & 7) === 4 || tag === 0) {
1726
+ break;
1727
+ }
1728
+ reader.skip(tag & 7);
1729
+ }
1730
+ return message;
1731
+ }
1732
+ finally {
1733
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1734
+ }
1735
+ },
1736
+ fromJSON(object) {
1737
+ return {
1738
+ items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => Channel.fromJSON(e)) : [],
1739
+ nextPageToken: isSet(object.nextPageToken)
1740
+ ? globalThis.String(object.nextPageToken)
1741
+ : isSet(object.next_page_token)
1742
+ ? globalThis.String(object.next_page_token)
1743
+ : "",
1744
+ };
1745
+ },
1746
+ toJSON(message) {
1747
+ const obj = {};
1748
+ if (message.items?.length) {
1749
+ obj.items = message.items.map((e) => Channel.toJSON(e));
1750
+ }
1751
+ if (message.nextPageToken !== "") {
1752
+ obj.nextPageToken = message.nextPageToken;
1753
+ }
1754
+ return obj;
1755
+ },
1756
+ create(base) {
1757
+ return ListChannelsResponse.fromPartial(base ?? {});
1758
+ },
1759
+ fromPartial(object) {
1760
+ const message = createBaseListChannelsResponse();
1761
+ message.items = object.items?.map((e) => Channel.fromPartial(e)) || [];
1762
+ message.nextPageToken = object.nextPageToken ?? "";
1763
+ return message;
1764
+ },
1765
+ };
1766
+ function createBaseConversationBinding() {
1767
+ return {
1768
+ id: "",
1769
+ orgId: "",
1770
+ realmId: "",
1771
+ status: "",
1772
+ version: 0n,
1773
+ createdAt: undefined,
1774
+ updatedAt: undefined,
1775
+ channelId: "",
1776
+ providerWorkspaceId: "",
1777
+ providerConversationId: "",
1778
+ subjectId: "",
1779
+ agentId: "",
1780
+ kind: "",
1781
+ };
1782
+ }
1783
+ export const ConversationBinding = {
1784
+ encode(message, writer = new BinaryWriter()) {
1785
+ if (message.id !== "") {
1786
+ writer.uint32(10).string(message.id);
1787
+ }
1788
+ if (message.orgId !== "") {
1789
+ writer.uint32(18).string(message.orgId);
1790
+ }
1791
+ if (message.realmId !== "") {
1792
+ writer.uint32(26).string(message.realmId);
1793
+ }
1794
+ if (message.status !== "") {
1795
+ writer.uint32(34).string(message.status);
1796
+ }
1797
+ if (message.version !== 0n) {
1798
+ if (BigInt.asIntN(64, message.version) !== message.version) {
1799
+ throw new globalThis.Error("value provided for field message.version of type int64 too large");
1800
+ }
1801
+ writer.uint32(40).int64(message.version);
1802
+ }
1803
+ if (message.createdAt !== undefined) {
1804
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(50).fork()).join();
1805
+ }
1806
+ if (message.updatedAt !== undefined) {
1807
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(58).fork()).join();
1808
+ }
1809
+ if (message.channelId !== "") {
1810
+ writer.uint32(82).string(message.channelId);
1811
+ }
1812
+ if (message.providerWorkspaceId !== "") {
1813
+ writer.uint32(90).string(message.providerWorkspaceId);
1814
+ }
1815
+ if (message.providerConversationId !== "") {
1816
+ writer.uint32(98).string(message.providerConversationId);
1817
+ }
1818
+ if (message.subjectId !== "") {
1819
+ writer.uint32(106).string(message.subjectId);
1820
+ }
1821
+ if (message.agentId !== "") {
1822
+ writer.uint32(114).string(message.agentId);
1823
+ }
1824
+ if (message.kind !== "") {
1825
+ writer.uint32(122).string(message.kind);
1826
+ }
1827
+ return writer;
1828
+ },
1829
+ decode(input, length) {
1830
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1831
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1832
+ if (previousRecursionDepth >= 100) {
1833
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1834
+ }
1835
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1836
+ try {
1837
+ const end = length === undefined ? reader.len : reader.pos + length;
1838
+ const message = createBaseConversationBinding();
1839
+ while (reader.pos < end) {
1840
+ const tag = reader.uint32();
1841
+ switch (tag >>> 3) {
1842
+ case 1: {
1843
+ if (tag !== 10) {
1844
+ break;
1845
+ }
1846
+ message.id = reader.string();
1847
+ continue;
1848
+ }
1849
+ case 2: {
1850
+ if (tag !== 18) {
1851
+ break;
1852
+ }
1853
+ message.orgId = reader.string();
1854
+ continue;
1855
+ }
1856
+ case 3: {
1857
+ if (tag !== 26) {
1858
+ break;
1859
+ }
1860
+ message.realmId = reader.string();
1861
+ continue;
1862
+ }
1863
+ case 4: {
1864
+ if (tag !== 34) {
1865
+ break;
1866
+ }
1867
+ message.status = reader.string();
1868
+ continue;
1869
+ }
1870
+ case 5: {
1871
+ if (tag !== 40) {
1872
+ break;
1873
+ }
1874
+ message.version = reader.int64();
1875
+ continue;
1876
+ }
1877
+ case 6: {
1878
+ if (tag !== 50) {
1879
+ break;
1880
+ }
1881
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1882
+ continue;
1883
+ }
1884
+ case 7: {
1885
+ if (tag !== 58) {
1886
+ break;
1887
+ }
1888
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1889
+ continue;
1890
+ }
1891
+ case 10: {
1892
+ if (tag !== 82) {
1893
+ break;
1894
+ }
1895
+ message.channelId = reader.string();
1896
+ continue;
1897
+ }
1898
+ case 11: {
1899
+ if (tag !== 90) {
1900
+ break;
1901
+ }
1902
+ message.providerWorkspaceId = reader.string();
1903
+ continue;
1904
+ }
1905
+ case 12: {
1906
+ if (tag !== 98) {
1907
+ break;
1908
+ }
1909
+ message.providerConversationId = reader.string();
1910
+ continue;
1911
+ }
1912
+ case 13: {
1913
+ if (tag !== 106) {
1914
+ break;
1915
+ }
1916
+ message.subjectId = reader.string();
1917
+ continue;
1918
+ }
1919
+ case 14: {
1920
+ if (tag !== 114) {
1921
+ break;
1922
+ }
1923
+ message.agentId = reader.string();
1924
+ continue;
1925
+ }
1926
+ case 15: {
1927
+ if (tag !== 122) {
1928
+ break;
1929
+ }
1930
+ message.kind = reader.string();
1931
+ continue;
1932
+ }
1933
+ }
1934
+ if ((tag & 7) === 4 || tag === 0) {
1935
+ break;
1936
+ }
1937
+ reader.skip(tag & 7);
1938
+ }
1939
+ return message;
1940
+ }
1941
+ finally {
1942
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1943
+ }
1944
+ },
1945
+ fromJSON(object) {
1946
+ return {
1947
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1948
+ orgId: isSet(object.orgId)
1949
+ ? globalThis.String(object.orgId)
1950
+ : isSet(object.org_id)
1951
+ ? globalThis.String(object.org_id)
1952
+ : "",
1953
+ realmId: isSet(object.realmId)
1954
+ ? globalThis.String(object.realmId)
1955
+ : isSet(object.realm_id)
1956
+ ? globalThis.String(object.realm_id)
1957
+ : "",
1958
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
1959
+ version: isSet(object.version) ? BigInt(object.version) : 0n,
1960
+ createdAt: isSet(object.createdAt)
1961
+ ? fromJsonTimestamp(object.createdAt)
1962
+ : isSet(object.created_at)
1963
+ ? fromJsonTimestamp(object.created_at)
1964
+ : undefined,
1965
+ updatedAt: isSet(object.updatedAt)
1966
+ ? fromJsonTimestamp(object.updatedAt)
1967
+ : isSet(object.updated_at)
1968
+ ? fromJsonTimestamp(object.updated_at)
1969
+ : undefined,
1970
+ channelId: isSet(object.channelId)
1971
+ ? globalThis.String(object.channelId)
1972
+ : isSet(object.channel_id)
1973
+ ? globalThis.String(object.channel_id)
1974
+ : "",
1975
+ providerWorkspaceId: isSet(object.providerWorkspaceId)
1976
+ ? globalThis.String(object.providerWorkspaceId)
1977
+ : isSet(object.provider_workspace_id)
1978
+ ? globalThis.String(object.provider_workspace_id)
1979
+ : "",
1980
+ providerConversationId: isSet(object.providerConversationId)
1981
+ ? globalThis.String(object.providerConversationId)
1982
+ : isSet(object.provider_conversation_id)
1983
+ ? globalThis.String(object.provider_conversation_id)
1984
+ : "",
1985
+ subjectId: isSet(object.subjectId)
1986
+ ? globalThis.String(object.subjectId)
1987
+ : isSet(object.subject_id)
1988
+ ? globalThis.String(object.subject_id)
1989
+ : "",
1990
+ agentId: isSet(object.agentId)
1991
+ ? globalThis.String(object.agentId)
1992
+ : isSet(object.agent_id)
1993
+ ? globalThis.String(object.agent_id)
1994
+ : "",
1995
+ kind: isSet(object.kind) ? globalThis.String(object.kind) : "",
1996
+ };
1997
+ },
1998
+ toJSON(message) {
1999
+ const obj = {};
2000
+ if (message.id !== "") {
2001
+ obj.id = message.id;
2002
+ }
2003
+ if (message.orgId !== "") {
2004
+ obj.orgId = message.orgId;
2005
+ }
2006
+ if (message.realmId !== "") {
2007
+ obj.realmId = message.realmId;
2008
+ }
2009
+ if (message.status !== "") {
2010
+ obj.status = message.status;
2011
+ }
2012
+ if (message.version !== 0n) {
2013
+ obj.version = message.version.toString();
2014
+ }
2015
+ if (message.createdAt !== undefined) {
2016
+ obj.createdAt = message.createdAt.toISOString();
2017
+ }
2018
+ if (message.updatedAt !== undefined) {
2019
+ obj.updatedAt = message.updatedAt.toISOString();
2020
+ }
2021
+ if (message.channelId !== "") {
2022
+ obj.channelId = message.channelId;
2023
+ }
2024
+ if (message.providerWorkspaceId !== "") {
2025
+ obj.providerWorkspaceId = message.providerWorkspaceId;
2026
+ }
2027
+ if (message.providerConversationId !== "") {
2028
+ obj.providerConversationId = message.providerConversationId;
2029
+ }
2030
+ if (message.subjectId !== "") {
2031
+ obj.subjectId = message.subjectId;
2032
+ }
2033
+ if (message.agentId !== "") {
2034
+ obj.agentId = message.agentId;
2035
+ }
2036
+ if (message.kind !== "") {
2037
+ obj.kind = message.kind;
2038
+ }
2039
+ return obj;
2040
+ },
2041
+ create(base) {
2042
+ return ConversationBinding.fromPartial(base ?? {});
2043
+ },
2044
+ fromPartial(object) {
2045
+ const message = createBaseConversationBinding();
2046
+ message.id = object.id ?? "";
2047
+ message.orgId = object.orgId ?? "";
2048
+ message.realmId = object.realmId ?? "";
2049
+ message.status = object.status ?? "";
2050
+ message.version = (object.version !== undefined && object.version !== null) ? BigInt(object.version) : 0n;
2051
+ message.createdAt = object.createdAt ?? undefined;
2052
+ message.updatedAt = object.updatedAt ?? undefined;
2053
+ message.channelId = object.channelId ?? "";
2054
+ message.providerWorkspaceId = object.providerWorkspaceId ?? "";
2055
+ message.providerConversationId = object.providerConversationId ?? "";
2056
+ message.subjectId = object.subjectId ?? "";
2057
+ message.agentId = object.agentId ?? "";
2058
+ message.kind = object.kind ?? "";
2059
+ return message;
2060
+ },
2061
+ };
2062
+ function createBaseCreateConversationBindingRequest() {
2063
+ return { orgId: "", realmId: "", conversationBinding: undefined };
2064
+ }
2065
+ export const CreateConversationBindingRequest = {
2066
+ encode(message, writer = new BinaryWriter()) {
2067
+ if (message.orgId !== "") {
2068
+ writer.uint32(10).string(message.orgId);
2069
+ }
2070
+ if (message.realmId !== "") {
2071
+ writer.uint32(18).string(message.realmId);
2072
+ }
2073
+ if (message.conversationBinding !== undefined) {
2074
+ ConversationBinding.encode(message.conversationBinding, writer.uint32(26).fork()).join();
2075
+ }
2076
+ return writer;
2077
+ },
2078
+ decode(input, length) {
2079
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2080
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2081
+ if (previousRecursionDepth >= 100) {
2082
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2083
+ }
2084
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2085
+ try {
2086
+ const end = length === undefined ? reader.len : reader.pos + length;
2087
+ const message = createBaseCreateConversationBindingRequest();
2088
+ while (reader.pos < end) {
2089
+ const tag = reader.uint32();
2090
+ switch (tag >>> 3) {
2091
+ case 1: {
2092
+ if (tag !== 10) {
2093
+ break;
2094
+ }
2095
+ message.orgId = reader.string();
2096
+ continue;
2097
+ }
2098
+ case 2: {
2099
+ if (tag !== 18) {
2100
+ break;
2101
+ }
2102
+ message.realmId = reader.string();
2103
+ continue;
2104
+ }
2105
+ case 3: {
2106
+ if (tag !== 26) {
2107
+ break;
2108
+ }
2109
+ message.conversationBinding = ConversationBinding.decode(reader, reader.uint32());
2110
+ continue;
2111
+ }
2112
+ }
2113
+ if ((tag & 7) === 4 || tag === 0) {
2114
+ break;
2115
+ }
2116
+ reader.skip(tag & 7);
2117
+ }
2118
+ return message;
2119
+ }
2120
+ finally {
2121
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2122
+ }
2123
+ },
2124
+ fromJSON(object) {
2125
+ return {
2126
+ orgId: isSet(object.orgId)
2127
+ ? globalThis.String(object.orgId)
2128
+ : isSet(object.org_id)
2129
+ ? globalThis.String(object.org_id)
2130
+ : "",
2131
+ realmId: isSet(object.realmId)
2132
+ ? globalThis.String(object.realmId)
2133
+ : isSet(object.realm_id)
2134
+ ? globalThis.String(object.realm_id)
2135
+ : "",
2136
+ conversationBinding: isSet(object.conversationBinding)
2137
+ ? ConversationBinding.fromJSON(object.conversationBinding)
2138
+ : isSet(object.conversation_binding)
2139
+ ? ConversationBinding.fromJSON(object.conversation_binding)
2140
+ : undefined,
2141
+ };
2142
+ },
2143
+ toJSON(message) {
2144
+ const obj = {};
2145
+ if (message.orgId !== "") {
2146
+ obj.orgId = message.orgId;
2147
+ }
2148
+ if (message.realmId !== "") {
2149
+ obj.realmId = message.realmId;
2150
+ }
2151
+ if (message.conversationBinding !== undefined) {
2152
+ obj.conversationBinding = ConversationBinding.toJSON(message.conversationBinding);
2153
+ }
2154
+ return obj;
2155
+ },
2156
+ create(base) {
2157
+ return CreateConversationBindingRequest.fromPartial(base ?? {});
2158
+ },
2159
+ fromPartial(object) {
2160
+ const message = createBaseCreateConversationBindingRequest();
2161
+ message.orgId = object.orgId ?? "";
2162
+ message.realmId = object.realmId ?? "";
2163
+ message.conversationBinding = (object.conversationBinding !== undefined && object.conversationBinding !== null)
2164
+ ? ConversationBinding.fromPartial(object.conversationBinding)
2165
+ : undefined;
2166
+ return message;
2167
+ },
2168
+ };
2169
+ function createBaseUpdateConversationBindingRequest() {
2170
+ return { orgId: "", realmId: "", id: "", conversationBinding: undefined, expectedVersion: 0n };
2171
+ }
2172
+ export const UpdateConversationBindingRequest = {
2173
+ encode(message, writer = new BinaryWriter()) {
2174
+ if (message.orgId !== "") {
2175
+ writer.uint32(10).string(message.orgId);
2176
+ }
2177
+ if (message.realmId !== "") {
2178
+ writer.uint32(18).string(message.realmId);
2179
+ }
2180
+ if (message.id !== "") {
2181
+ writer.uint32(26).string(message.id);
2182
+ }
2183
+ if (message.conversationBinding !== undefined) {
2184
+ ConversationBinding.encode(message.conversationBinding, writer.uint32(34).fork()).join();
2185
+ }
2186
+ if (message.expectedVersion !== 0n) {
2187
+ if (BigInt.asIntN(64, message.expectedVersion) !== message.expectedVersion) {
2188
+ throw new globalThis.Error("value provided for field message.expectedVersion of type int64 too large");
2189
+ }
2190
+ writer.uint32(40).int64(message.expectedVersion);
2191
+ }
2192
+ return writer;
2193
+ },
2194
+ decode(input, length) {
2195
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2196
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2197
+ if (previousRecursionDepth >= 100) {
2198
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2199
+ }
2200
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2201
+ try {
2202
+ const end = length === undefined ? reader.len : reader.pos + length;
2203
+ const message = createBaseUpdateConversationBindingRequest();
2204
+ while (reader.pos < end) {
2205
+ const tag = reader.uint32();
2206
+ switch (tag >>> 3) {
2207
+ case 1: {
2208
+ if (tag !== 10) {
2209
+ break;
2210
+ }
2211
+ message.orgId = reader.string();
2212
+ continue;
2213
+ }
2214
+ case 2: {
2215
+ if (tag !== 18) {
2216
+ break;
2217
+ }
2218
+ message.realmId = reader.string();
2219
+ continue;
2220
+ }
2221
+ case 3: {
2222
+ if (tag !== 26) {
2223
+ break;
2224
+ }
2225
+ message.id = reader.string();
2226
+ continue;
2227
+ }
2228
+ case 4: {
2229
+ if (tag !== 34) {
2230
+ break;
2231
+ }
2232
+ message.conversationBinding = ConversationBinding.decode(reader, reader.uint32());
2233
+ continue;
2234
+ }
2235
+ case 5: {
2236
+ if (tag !== 40) {
2237
+ break;
2238
+ }
2239
+ message.expectedVersion = reader.int64();
2240
+ continue;
2241
+ }
2242
+ }
2243
+ if ((tag & 7) === 4 || tag === 0) {
2244
+ break;
2245
+ }
2246
+ reader.skip(tag & 7);
2247
+ }
2248
+ return message;
2249
+ }
2250
+ finally {
2251
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2252
+ }
2253
+ },
2254
+ fromJSON(object) {
2255
+ return {
2256
+ orgId: isSet(object.orgId)
2257
+ ? globalThis.String(object.orgId)
2258
+ : isSet(object.org_id)
2259
+ ? globalThis.String(object.org_id)
2260
+ : "",
2261
+ realmId: isSet(object.realmId)
2262
+ ? globalThis.String(object.realmId)
2263
+ : isSet(object.realm_id)
2264
+ ? globalThis.String(object.realm_id)
2265
+ : "",
2266
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
2267
+ conversationBinding: isSet(object.conversationBinding)
2268
+ ? ConversationBinding.fromJSON(object.conversationBinding)
2269
+ : isSet(object.conversation_binding)
2270
+ ? ConversationBinding.fromJSON(object.conversation_binding)
2271
+ : undefined,
2272
+ expectedVersion: isSet(object.expectedVersion)
2273
+ ? BigInt(object.expectedVersion)
2274
+ : isSet(object.expected_version)
2275
+ ? BigInt(object.expected_version)
2276
+ : 0n,
2277
+ };
2278
+ },
2279
+ toJSON(message) {
2280
+ const obj = {};
2281
+ if (message.orgId !== "") {
2282
+ obj.orgId = message.orgId;
2283
+ }
2284
+ if (message.realmId !== "") {
2285
+ obj.realmId = message.realmId;
2286
+ }
2287
+ if (message.id !== "") {
2288
+ obj.id = message.id;
2289
+ }
2290
+ if (message.conversationBinding !== undefined) {
2291
+ obj.conversationBinding = ConversationBinding.toJSON(message.conversationBinding);
2292
+ }
2293
+ if (message.expectedVersion !== 0n) {
2294
+ obj.expectedVersion = message.expectedVersion.toString();
2295
+ }
2296
+ return obj;
2297
+ },
2298
+ create(base) {
2299
+ return UpdateConversationBindingRequest.fromPartial(base ?? {});
2300
+ },
2301
+ fromPartial(object) {
2302
+ const message = createBaseUpdateConversationBindingRequest();
2303
+ message.orgId = object.orgId ?? "";
2304
+ message.realmId = object.realmId ?? "";
2305
+ message.id = object.id ?? "";
2306
+ message.conversationBinding = (object.conversationBinding !== undefined && object.conversationBinding !== null)
2307
+ ? ConversationBinding.fromPartial(object.conversationBinding)
2308
+ : undefined;
2309
+ message.expectedVersion = (object.expectedVersion !== undefined && object.expectedVersion !== null)
2310
+ ? BigInt(object.expectedVersion)
2311
+ : 0n;
2312
+ return message;
2313
+ },
2314
+ };
2315
+ function createBaseGetConversationBindingRequest() {
2316
+ return { orgId: "", realmId: "", id: "" };
2317
+ }
2318
+ export const GetConversationBindingRequest = {
2319
+ encode(message, writer = new BinaryWriter()) {
2320
+ if (message.orgId !== "") {
2321
+ writer.uint32(10).string(message.orgId);
2322
+ }
2323
+ if (message.realmId !== "") {
2324
+ writer.uint32(18).string(message.realmId);
2325
+ }
2326
+ if (message.id !== "") {
2327
+ writer.uint32(26).string(message.id);
2328
+ }
2329
+ return writer;
2330
+ },
2331
+ decode(input, length) {
2332
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2333
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2334
+ if (previousRecursionDepth >= 100) {
2335
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2336
+ }
2337
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2338
+ try {
2339
+ const end = length === undefined ? reader.len : reader.pos + length;
2340
+ const message = createBaseGetConversationBindingRequest();
2341
+ while (reader.pos < end) {
2342
+ const tag = reader.uint32();
2343
+ switch (tag >>> 3) {
2344
+ case 1: {
2345
+ if (tag !== 10) {
2346
+ break;
2347
+ }
2348
+ message.orgId = reader.string();
2349
+ continue;
2350
+ }
2351
+ case 2: {
2352
+ if (tag !== 18) {
2353
+ break;
2354
+ }
2355
+ message.realmId = reader.string();
2356
+ continue;
2357
+ }
2358
+ case 3: {
2359
+ if (tag !== 26) {
2360
+ break;
2361
+ }
2362
+ message.id = reader.string();
2363
+ continue;
2364
+ }
2365
+ }
2366
+ if ((tag & 7) === 4 || tag === 0) {
2367
+ break;
2368
+ }
2369
+ reader.skip(tag & 7);
2370
+ }
2371
+ return message;
2372
+ }
2373
+ finally {
2374
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2375
+ }
2376
+ },
2377
+ fromJSON(object) {
2378
+ return {
2379
+ orgId: isSet(object.orgId)
2380
+ ? globalThis.String(object.orgId)
2381
+ : isSet(object.org_id)
2382
+ ? globalThis.String(object.org_id)
2383
+ : "",
2384
+ realmId: isSet(object.realmId)
2385
+ ? globalThis.String(object.realmId)
2386
+ : isSet(object.realm_id)
2387
+ ? globalThis.String(object.realm_id)
2388
+ : "",
2389
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
2390
+ };
2391
+ },
2392
+ toJSON(message) {
2393
+ const obj = {};
2394
+ if (message.orgId !== "") {
2395
+ obj.orgId = message.orgId;
2396
+ }
2397
+ if (message.realmId !== "") {
2398
+ obj.realmId = message.realmId;
2399
+ }
2400
+ if (message.id !== "") {
2401
+ obj.id = message.id;
2402
+ }
2403
+ return obj;
2404
+ },
2405
+ create(base) {
2406
+ return GetConversationBindingRequest.fromPartial(base ?? {});
2407
+ },
2408
+ fromPartial(object) {
2409
+ const message = createBaseGetConversationBindingRequest();
2410
+ message.orgId = object.orgId ?? "";
2411
+ message.realmId = object.realmId ?? "";
2412
+ message.id = object.id ?? "";
2413
+ return message;
2414
+ },
2415
+ };
2416
+ function createBaseDeleteConversationBindingRequest() {
2417
+ return { orgId: "", realmId: "", id: "", expectedVersion: 0n };
2418
+ }
2419
+ export const DeleteConversationBindingRequest = {
2420
+ encode(message, writer = new BinaryWriter()) {
2421
+ if (message.orgId !== "") {
2422
+ writer.uint32(10).string(message.orgId);
2423
+ }
2424
+ if (message.realmId !== "") {
2425
+ writer.uint32(18).string(message.realmId);
2426
+ }
2427
+ if (message.id !== "") {
2428
+ writer.uint32(26).string(message.id);
2429
+ }
2430
+ if (message.expectedVersion !== 0n) {
2431
+ if (BigInt.asIntN(64, message.expectedVersion) !== message.expectedVersion) {
2432
+ throw new globalThis.Error("value provided for field message.expectedVersion of type int64 too large");
2433
+ }
2434
+ writer.uint32(32).int64(message.expectedVersion);
2435
+ }
2436
+ return writer;
2437
+ },
2438
+ decode(input, length) {
2439
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2440
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2441
+ if (previousRecursionDepth >= 100) {
2442
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2443
+ }
2444
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2445
+ try {
2446
+ const end = length === undefined ? reader.len : reader.pos + length;
2447
+ const message = createBaseDeleteConversationBindingRequest();
2448
+ while (reader.pos < end) {
2449
+ const tag = reader.uint32();
2450
+ switch (tag >>> 3) {
2451
+ case 1: {
2452
+ if (tag !== 10) {
2453
+ break;
2454
+ }
2455
+ message.orgId = reader.string();
2456
+ continue;
2457
+ }
2458
+ case 2: {
2459
+ if (tag !== 18) {
2460
+ break;
2461
+ }
2462
+ message.realmId = reader.string();
2463
+ continue;
2464
+ }
2465
+ case 3: {
2466
+ if (tag !== 26) {
2467
+ break;
2468
+ }
2469
+ message.id = reader.string();
2470
+ continue;
2471
+ }
2472
+ case 4: {
2473
+ if (tag !== 32) {
2474
+ break;
2475
+ }
2476
+ message.expectedVersion = reader.int64();
2477
+ continue;
2478
+ }
2479
+ }
2480
+ if ((tag & 7) === 4 || tag === 0) {
2481
+ break;
2482
+ }
2483
+ reader.skip(tag & 7);
2484
+ }
2485
+ return message;
2486
+ }
2487
+ finally {
2488
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2489
+ }
2490
+ },
2491
+ fromJSON(object) {
2492
+ return {
2493
+ orgId: isSet(object.orgId)
2494
+ ? globalThis.String(object.orgId)
2495
+ : isSet(object.org_id)
2496
+ ? globalThis.String(object.org_id)
2497
+ : "",
2498
+ realmId: isSet(object.realmId)
2499
+ ? globalThis.String(object.realmId)
2500
+ : isSet(object.realm_id)
2501
+ ? globalThis.String(object.realm_id)
2502
+ : "",
2503
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
2504
+ expectedVersion: isSet(object.expectedVersion)
2505
+ ? BigInt(object.expectedVersion)
2506
+ : isSet(object.expected_version)
2507
+ ? BigInt(object.expected_version)
2508
+ : 0n,
2509
+ };
2510
+ },
2511
+ toJSON(message) {
2512
+ const obj = {};
2513
+ if (message.orgId !== "") {
2514
+ obj.orgId = message.orgId;
2515
+ }
2516
+ if (message.realmId !== "") {
2517
+ obj.realmId = message.realmId;
2518
+ }
2519
+ if (message.id !== "") {
2520
+ obj.id = message.id;
2521
+ }
2522
+ if (message.expectedVersion !== 0n) {
2523
+ obj.expectedVersion = message.expectedVersion.toString();
2524
+ }
2525
+ return obj;
2526
+ },
2527
+ create(base) {
2528
+ return DeleteConversationBindingRequest.fromPartial(base ?? {});
2529
+ },
2530
+ fromPartial(object) {
2531
+ const message = createBaseDeleteConversationBindingRequest();
2532
+ message.orgId = object.orgId ?? "";
2533
+ message.realmId = object.realmId ?? "";
2534
+ message.id = object.id ?? "";
2535
+ message.expectedVersion = (object.expectedVersion !== undefined && object.expectedVersion !== null)
2536
+ ? BigInt(object.expectedVersion)
2537
+ : 0n;
2538
+ return message;
2539
+ },
2540
+ };
2541
+ function createBaseListConversationBindingsRequest() {
2542
+ return { orgId: "", realmId: "", pageSize: 0, pageToken: "" };
2543
+ }
2544
+ export const ListConversationBindingsRequest = {
2545
+ encode(message, writer = new BinaryWriter()) {
2546
+ if (message.orgId !== "") {
2547
+ writer.uint32(10).string(message.orgId);
2548
+ }
2549
+ if (message.realmId !== "") {
2550
+ writer.uint32(18).string(message.realmId);
2551
+ }
2552
+ if (message.pageSize !== 0) {
2553
+ writer.uint32(24).int32(message.pageSize);
2554
+ }
2555
+ if (message.pageToken !== "") {
2556
+ writer.uint32(34).string(message.pageToken);
2557
+ }
2558
+ return writer;
2559
+ },
2560
+ decode(input, length) {
2561
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2562
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2563
+ if (previousRecursionDepth >= 100) {
2564
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2565
+ }
2566
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2567
+ try {
2568
+ const end = length === undefined ? reader.len : reader.pos + length;
2569
+ const message = createBaseListConversationBindingsRequest();
2570
+ while (reader.pos < end) {
2571
+ const tag = reader.uint32();
2572
+ switch (tag >>> 3) {
2573
+ case 1: {
2574
+ if (tag !== 10) {
2575
+ break;
2576
+ }
2577
+ message.orgId = reader.string();
2578
+ continue;
2579
+ }
2580
+ case 2: {
2581
+ if (tag !== 18) {
2582
+ break;
2583
+ }
2584
+ message.realmId = reader.string();
2585
+ continue;
2586
+ }
2587
+ case 3: {
2588
+ if (tag !== 24) {
2589
+ break;
2590
+ }
2591
+ message.pageSize = reader.int32();
2592
+ continue;
2593
+ }
2594
+ case 4: {
2595
+ if (tag !== 34) {
2596
+ break;
2597
+ }
2598
+ message.pageToken = reader.string();
2599
+ continue;
2600
+ }
2601
+ }
2602
+ if ((tag & 7) === 4 || tag === 0) {
2603
+ break;
2604
+ }
2605
+ reader.skip(tag & 7);
2606
+ }
2607
+ return message;
2608
+ }
2609
+ finally {
2610
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2611
+ }
2612
+ },
2613
+ fromJSON(object) {
2614
+ return {
2615
+ orgId: isSet(object.orgId)
2616
+ ? globalThis.String(object.orgId)
2617
+ : isSet(object.org_id)
2618
+ ? globalThis.String(object.org_id)
2619
+ : "",
2620
+ realmId: isSet(object.realmId)
2621
+ ? globalThis.String(object.realmId)
2622
+ : isSet(object.realm_id)
2623
+ ? globalThis.String(object.realm_id)
2624
+ : "",
2625
+ pageSize: isSet(object.pageSize)
2626
+ ? globalThis.Number(object.pageSize)
2627
+ : isSet(object.page_size)
2628
+ ? globalThis.Number(object.page_size)
2629
+ : 0,
2630
+ pageToken: isSet(object.pageToken)
2631
+ ? globalThis.String(object.pageToken)
2632
+ : isSet(object.page_token)
2633
+ ? globalThis.String(object.page_token)
2634
+ : "",
2635
+ };
2636
+ },
2637
+ toJSON(message) {
2638
+ const obj = {};
2639
+ if (message.orgId !== "") {
2640
+ obj.orgId = message.orgId;
2641
+ }
2642
+ if (message.realmId !== "") {
2643
+ obj.realmId = message.realmId;
2644
+ }
2645
+ if (message.pageSize !== 0) {
2646
+ obj.pageSize = Math.round(message.pageSize);
2647
+ }
2648
+ if (message.pageToken !== "") {
2649
+ obj.pageToken = message.pageToken;
2650
+ }
2651
+ return obj;
2652
+ },
2653
+ create(base) {
2654
+ return ListConversationBindingsRequest.fromPartial(base ?? {});
2655
+ },
2656
+ fromPartial(object) {
2657
+ const message = createBaseListConversationBindingsRequest();
2658
+ message.orgId = object.orgId ?? "";
2659
+ message.realmId = object.realmId ?? "";
2660
+ message.pageSize = object.pageSize ?? 0;
2661
+ message.pageToken = object.pageToken ?? "";
2662
+ return message;
2663
+ },
2664
+ };
2665
+ function createBaseListConversationBindingsResponse() {
2666
+ return { items: [], nextPageToken: "" };
2667
+ }
2668
+ export const ListConversationBindingsResponse = {
2669
+ encode(message, writer = new BinaryWriter()) {
2670
+ for (const v of message.items) {
2671
+ ConversationBinding.encode(v, writer.uint32(10).fork()).join();
2672
+ }
2673
+ if (message.nextPageToken !== "") {
2674
+ writer.uint32(18).string(message.nextPageToken);
2675
+ }
2676
+ return writer;
2677
+ },
2678
+ decode(input, length) {
2679
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2680
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2681
+ if (previousRecursionDepth >= 100) {
2682
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2683
+ }
2684
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2685
+ try {
2686
+ const end = length === undefined ? reader.len : reader.pos + length;
2687
+ const message = createBaseListConversationBindingsResponse();
2688
+ while (reader.pos < end) {
2689
+ const tag = reader.uint32();
2690
+ switch (tag >>> 3) {
2691
+ case 1: {
2692
+ if (tag !== 10) {
2693
+ break;
2694
+ }
2695
+ message.items.push(ConversationBinding.decode(reader, reader.uint32()));
2696
+ continue;
2697
+ }
2698
+ case 2: {
2699
+ if (tag !== 18) {
2700
+ break;
2701
+ }
2702
+ message.nextPageToken = reader.string();
2703
+ continue;
2704
+ }
2705
+ }
2706
+ if ((tag & 7) === 4 || tag === 0) {
2707
+ break;
2708
+ }
2709
+ reader.skip(tag & 7);
2710
+ }
2711
+ return message;
2712
+ }
2713
+ finally {
2714
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2715
+ }
2716
+ },
2717
+ fromJSON(object) {
2718
+ return {
2719
+ items: globalThis.Array.isArray(object?.items)
2720
+ ? object.items.map((e) => ConversationBinding.fromJSON(e))
2721
+ : [],
2722
+ nextPageToken: isSet(object.nextPageToken)
2723
+ ? globalThis.String(object.nextPageToken)
2724
+ : isSet(object.next_page_token)
2725
+ ? globalThis.String(object.next_page_token)
2726
+ : "",
2727
+ };
2728
+ },
2729
+ toJSON(message) {
2730
+ const obj = {};
2731
+ if (message.items?.length) {
2732
+ obj.items = message.items.map((e) => ConversationBinding.toJSON(e));
2733
+ }
2734
+ if (message.nextPageToken !== "") {
2735
+ obj.nextPageToken = message.nextPageToken;
2736
+ }
2737
+ return obj;
2738
+ },
2739
+ create(base) {
2740
+ return ListConversationBindingsResponse.fromPartial(base ?? {});
2741
+ },
2742
+ fromPartial(object) {
2743
+ const message = createBaseListConversationBindingsResponse();
2744
+ message.items = object.items?.map((e) => ConversationBinding.fromPartial(e)) || [];
2745
+ message.nextPageToken = object.nextPageToken ?? "";
2746
+ return message;
2747
+ },
2748
+ };
2749
+ export const ChannelsServiceDefinition = {
2750
+ name: "ChannelsService",
2751
+ fullName: "tarka.channels.v1.ChannelsService",
2752
+ methods: {
2753
+ getChannelInstallation: {
2754
+ name: "GetChannelInstallation",
2755
+ requestType: GetChannelInstallationRequest,
2756
+ requestStream: false,
2757
+ responseType: ChannelInstallation,
2758
+ responseStream: false,
2759
+ options: {
2760
+ _unknownFields: {
2761
+ 578365826: [
2762
+ Buffer.from([
2763
+ 57,
2764
+ 18,
2765
+ 55,
2766
+ 47,
2767
+ 99,
2768
+ 111,
2769
+ 110,
2770
+ 116,
2771
+ 114,
2772
+ 111,
2773
+ 108,
2774
+ 47,
2775
+ 118,
2776
+ 49,
2777
+ 47,
2778
+ 99,
2779
+ 104,
2780
+ 97,
2781
+ 110,
2782
+ 110,
2783
+ 101,
2784
+ 108,
2785
+ 115,
2786
+ 47,
2787
+ 99,
2788
+ 104,
2789
+ 97,
2790
+ 110,
2791
+ 110,
2792
+ 101,
2793
+ 108,
2794
+ 115,
2795
+ 47,
2796
+ 123,
2797
+ 99,
2798
+ 104,
2799
+ 97,
2800
+ 110,
2801
+ 110,
2802
+ 101,
2803
+ 108,
2804
+ 95,
2805
+ 105,
2806
+ 100,
2807
+ 125,
2808
+ 47,
2809
+ 105,
2810
+ 110,
2811
+ 115,
2812
+ 116,
2813
+ 97,
2814
+ 108,
2815
+ 108,
2816
+ 97,
2817
+ 116,
2818
+ 105,
2819
+ 111,
2820
+ 110,
2821
+ ]),
2822
+ ],
2823
+ },
2824
+ },
2825
+ },
2826
+ configureChannelInstallation: {
2827
+ name: "ConfigureChannelInstallation",
2828
+ requestType: ConfigureChannelInstallationRequest,
2829
+ requestStream: false,
2830
+ responseType: ChannelInstallation,
2831
+ responseStream: false,
2832
+ options: {
2833
+ _unknownFields: {
2834
+ 578365826: [
2835
+ Buffer.from([
2836
+ 70,
2837
+ 34,
2838
+ 65,
2839
+ 47,
2840
+ 99,
2841
+ 111,
2842
+ 110,
2843
+ 116,
2844
+ 114,
2845
+ 111,
2846
+ 108,
2847
+ 47,
2848
+ 118,
2849
+ 49,
2850
+ 47,
2851
+ 99,
2852
+ 104,
2853
+ 97,
2854
+ 110,
2855
+ 110,
2856
+ 101,
2857
+ 108,
2858
+ 115,
2859
+ 47,
2860
+ 99,
2861
+ 104,
2862
+ 97,
2863
+ 110,
2864
+ 110,
2865
+ 101,
2866
+ 108,
2867
+ 115,
2868
+ 47,
2869
+ 123,
2870
+ 99,
2871
+ 104,
2872
+ 97,
2873
+ 110,
2874
+ 110,
2875
+ 101,
2876
+ 108,
2877
+ 95,
2878
+ 105,
2879
+ 100,
2880
+ 125,
2881
+ 47,
2882
+ 105,
2883
+ 110,
2884
+ 115,
2885
+ 116,
2886
+ 97,
2887
+ 108,
2888
+ 108,
2889
+ 97,
2890
+ 116,
2891
+ 105,
2892
+ 111,
2893
+ 110,
2894
+ 58,
2895
+ 99,
2896
+ 111,
2897
+ 110,
2898
+ 102,
2899
+ 105,
2900
+ 103,
2901
+ 117,
2902
+ 114,
2903
+ 101,
2904
+ 58,
2905
+ 1,
2906
+ 42,
2907
+ ]),
2908
+ ],
2909
+ },
2910
+ },
2911
+ },
2912
+ revokeChannelInstallation: {
2913
+ name: "RevokeChannelInstallation",
2914
+ requestType: RevokeChannelInstallationRequest,
2915
+ requestStream: false,
2916
+ responseType: ChannelInstallation,
2917
+ responseStream: false,
2918
+ options: {
2919
+ _unknownFields: {
2920
+ 578365826: [
2921
+ Buffer.from([
2922
+ 67,
2923
+ 34,
2924
+ 62,
2925
+ 47,
2926
+ 99,
2927
+ 111,
2928
+ 110,
2929
+ 116,
2930
+ 114,
2931
+ 111,
2932
+ 108,
2933
+ 47,
2934
+ 118,
2935
+ 49,
2936
+ 47,
2937
+ 99,
2938
+ 104,
2939
+ 97,
2940
+ 110,
2941
+ 110,
2942
+ 101,
2943
+ 108,
2944
+ 115,
2945
+ 47,
2946
+ 99,
2947
+ 104,
2948
+ 97,
2949
+ 110,
2950
+ 110,
2951
+ 101,
2952
+ 108,
2953
+ 115,
2954
+ 47,
2955
+ 123,
2956
+ 99,
2957
+ 104,
2958
+ 97,
2959
+ 110,
2960
+ 110,
2961
+ 101,
2962
+ 108,
2963
+ 95,
2964
+ 105,
2965
+ 100,
2966
+ 125,
2967
+ 47,
2968
+ 105,
2969
+ 110,
2970
+ 115,
2971
+ 116,
2972
+ 97,
2973
+ 108,
2974
+ 108,
2975
+ 97,
2976
+ 116,
2977
+ 105,
2978
+ 111,
2979
+ 110,
2980
+ 58,
2981
+ 114,
2982
+ 101,
2983
+ 118,
2984
+ 111,
2985
+ 107,
2986
+ 101,
2987
+ 58,
2988
+ 1,
2989
+ 42,
2990
+ ]),
2991
+ ],
2992
+ },
2993
+ },
2994
+ },
2995
+ createChannel: {
2996
+ name: "CreateChannel",
2997
+ requestType: CreateChannelRequest,
2998
+ requestStream: false,
2999
+ responseType: Channel,
3000
+ responseStream: false,
3001
+ options: {
3002
+ _unknownFields: {
3003
+ 578365826: [
3004
+ Buffer.from([
3005
+ 34,
3006
+ 34,
3007
+ 29,
3008
+ 47,
3009
+ 99,
3010
+ 111,
3011
+ 110,
3012
+ 116,
3013
+ 114,
3014
+ 111,
3015
+ 108,
3016
+ 47,
3017
+ 118,
3018
+ 49,
3019
+ 47,
3020
+ 99,
3021
+ 104,
3022
+ 97,
3023
+ 110,
3024
+ 110,
3025
+ 101,
3026
+ 108,
3027
+ 115,
3028
+ 47,
3029
+ 99,
3030
+ 104,
3031
+ 97,
3032
+ 110,
3033
+ 110,
3034
+ 101,
3035
+ 108,
3036
+ 115,
3037
+ 58,
3038
+ 1,
3039
+ 42,
3040
+ ]),
3041
+ ],
3042
+ },
3043
+ },
3044
+ },
3045
+ updateChannel: {
3046
+ name: "UpdateChannel",
3047
+ requestType: UpdateChannelRequest,
3048
+ requestStream: false,
3049
+ responseType: Channel,
3050
+ responseStream: false,
3051
+ options: {
3052
+ _unknownFields: {
3053
+ 578365826: [
3054
+ Buffer.from([
3055
+ 39,
3056
+ 26,
3057
+ 34,
3058
+ 47,
3059
+ 99,
3060
+ 111,
3061
+ 110,
3062
+ 116,
3063
+ 114,
3064
+ 111,
3065
+ 108,
3066
+ 47,
3067
+ 118,
3068
+ 49,
3069
+ 47,
3070
+ 99,
3071
+ 104,
3072
+ 97,
3073
+ 110,
3074
+ 110,
3075
+ 101,
3076
+ 108,
3077
+ 115,
3078
+ 47,
3079
+ 99,
3080
+ 104,
3081
+ 97,
3082
+ 110,
3083
+ 110,
3084
+ 101,
3085
+ 108,
3086
+ 115,
3087
+ 47,
3088
+ 123,
3089
+ 105,
3090
+ 100,
3091
+ 125,
3092
+ 58,
3093
+ 1,
3094
+ 42,
3095
+ ]),
3096
+ ],
3097
+ },
3098
+ },
3099
+ },
3100
+ getChannel: {
3101
+ name: "GetChannel",
3102
+ requestType: GetChannelRequest,
3103
+ requestStream: false,
3104
+ responseType: Channel,
3105
+ responseStream: false,
3106
+ options: {
3107
+ _unknownFields: {
3108
+ 578365826: [
3109
+ Buffer.from([
3110
+ 36,
3111
+ 18,
3112
+ 34,
3113
+ 47,
3114
+ 99,
3115
+ 111,
3116
+ 110,
3117
+ 116,
3118
+ 114,
3119
+ 111,
3120
+ 108,
3121
+ 47,
3122
+ 118,
3123
+ 49,
3124
+ 47,
3125
+ 99,
3126
+ 104,
3127
+ 97,
3128
+ 110,
3129
+ 110,
3130
+ 101,
3131
+ 108,
3132
+ 115,
3133
+ 47,
3134
+ 99,
3135
+ 104,
3136
+ 97,
3137
+ 110,
3138
+ 110,
3139
+ 101,
3140
+ 108,
3141
+ 115,
3142
+ 47,
3143
+ 123,
3144
+ 105,
3145
+ 100,
3146
+ 125,
3147
+ ]),
3148
+ ],
3149
+ },
3150
+ },
3151
+ },
3152
+ deleteChannel: {
3153
+ name: "DeleteChannel",
3154
+ requestType: DeleteChannelRequest,
3155
+ requestStream: false,
3156
+ responseType: Empty,
3157
+ responseStream: false,
3158
+ options: {
3159
+ _unknownFields: {
3160
+ 578365826: [
3161
+ Buffer.from([
3162
+ 36,
3163
+ 42,
3164
+ 34,
3165
+ 47,
3166
+ 99,
3167
+ 111,
3168
+ 110,
3169
+ 116,
3170
+ 114,
3171
+ 111,
3172
+ 108,
3173
+ 47,
3174
+ 118,
3175
+ 49,
3176
+ 47,
3177
+ 99,
3178
+ 104,
3179
+ 97,
3180
+ 110,
3181
+ 110,
3182
+ 101,
3183
+ 108,
3184
+ 115,
3185
+ 47,
3186
+ 99,
3187
+ 104,
3188
+ 97,
3189
+ 110,
3190
+ 110,
3191
+ 101,
3192
+ 108,
3193
+ 115,
3194
+ 47,
3195
+ 123,
3196
+ 105,
3197
+ 100,
3198
+ 125,
3199
+ ]),
3200
+ ],
3201
+ },
3202
+ },
3203
+ },
3204
+ listChannels: {
3205
+ name: "ListChannels",
3206
+ requestType: ListChannelsRequest,
3207
+ requestStream: false,
3208
+ responseType: ListChannelsResponse,
3209
+ responseStream: false,
3210
+ options: {
3211
+ _unknownFields: {
3212
+ 578365826: [
3213
+ Buffer.from([
3214
+ 31,
3215
+ 18,
3216
+ 29,
3217
+ 47,
3218
+ 99,
3219
+ 111,
3220
+ 110,
3221
+ 116,
3222
+ 114,
3223
+ 111,
3224
+ 108,
3225
+ 47,
3226
+ 118,
3227
+ 49,
3228
+ 47,
3229
+ 99,
3230
+ 104,
3231
+ 97,
3232
+ 110,
3233
+ 110,
3234
+ 101,
3235
+ 108,
3236
+ 115,
3237
+ 47,
3238
+ 99,
3239
+ 104,
3240
+ 97,
3241
+ 110,
3242
+ 110,
3243
+ 101,
3244
+ 108,
3245
+ 115,
3246
+ ]),
3247
+ ],
3248
+ },
3249
+ },
3250
+ },
3251
+ createConversationBinding: {
3252
+ name: "CreateConversationBinding",
3253
+ requestType: CreateConversationBindingRequest,
3254
+ requestStream: false,
3255
+ responseType: ConversationBinding,
3256
+ responseStream: false,
3257
+ options: {
3258
+ _unknownFields: {
3259
+ 578365826: [
3260
+ Buffer.from([
3261
+ 47,
3262
+ 34,
3263
+ 42,
3264
+ 47,
3265
+ 99,
3266
+ 111,
3267
+ 110,
3268
+ 116,
3269
+ 114,
3270
+ 111,
3271
+ 108,
3272
+ 47,
3273
+ 118,
3274
+ 49,
3275
+ 47,
3276
+ 99,
3277
+ 104,
3278
+ 97,
3279
+ 110,
3280
+ 110,
3281
+ 101,
3282
+ 108,
3283
+ 115,
3284
+ 47,
3285
+ 99,
3286
+ 111,
3287
+ 110,
3288
+ 118,
3289
+ 101,
3290
+ 114,
3291
+ 115,
3292
+ 97,
3293
+ 116,
3294
+ 105,
3295
+ 111,
3296
+ 110,
3297
+ 45,
3298
+ 98,
3299
+ 105,
3300
+ 110,
3301
+ 100,
3302
+ 105,
3303
+ 110,
3304
+ 103,
3305
+ 115,
3306
+ 58,
3307
+ 1,
3308
+ 42,
3309
+ ]),
3310
+ ],
3311
+ },
3312
+ },
3313
+ },
3314
+ updateConversationBinding: {
3315
+ name: "UpdateConversationBinding",
3316
+ requestType: UpdateConversationBindingRequest,
3317
+ requestStream: false,
3318
+ responseType: ConversationBinding,
3319
+ responseStream: false,
3320
+ options: {
3321
+ _unknownFields: {
3322
+ 578365826: [
3323
+ Buffer.from([
3324
+ 52,
3325
+ 26,
3326
+ 47,
3327
+ 47,
3328
+ 99,
3329
+ 111,
3330
+ 110,
3331
+ 116,
3332
+ 114,
3333
+ 111,
3334
+ 108,
3335
+ 47,
3336
+ 118,
3337
+ 49,
3338
+ 47,
3339
+ 99,
3340
+ 104,
3341
+ 97,
3342
+ 110,
3343
+ 110,
3344
+ 101,
3345
+ 108,
3346
+ 115,
3347
+ 47,
3348
+ 99,
3349
+ 111,
3350
+ 110,
3351
+ 118,
3352
+ 101,
3353
+ 114,
3354
+ 115,
3355
+ 97,
3356
+ 116,
3357
+ 105,
3358
+ 111,
3359
+ 110,
3360
+ 45,
3361
+ 98,
3362
+ 105,
3363
+ 110,
3364
+ 100,
3365
+ 105,
3366
+ 110,
3367
+ 103,
3368
+ 115,
3369
+ 47,
3370
+ 123,
3371
+ 105,
3372
+ 100,
3373
+ 125,
3374
+ 58,
3375
+ 1,
3376
+ 42,
3377
+ ]),
3378
+ ],
3379
+ },
3380
+ },
3381
+ },
3382
+ getConversationBinding: {
3383
+ name: "GetConversationBinding",
3384
+ requestType: GetConversationBindingRequest,
3385
+ requestStream: false,
3386
+ responseType: ConversationBinding,
3387
+ responseStream: false,
3388
+ options: {
3389
+ _unknownFields: {
3390
+ 578365826: [
3391
+ Buffer.from([
3392
+ 49,
3393
+ 18,
3394
+ 47,
3395
+ 47,
3396
+ 99,
3397
+ 111,
3398
+ 110,
3399
+ 116,
3400
+ 114,
3401
+ 111,
3402
+ 108,
3403
+ 47,
3404
+ 118,
3405
+ 49,
3406
+ 47,
3407
+ 99,
3408
+ 104,
3409
+ 97,
3410
+ 110,
3411
+ 110,
3412
+ 101,
3413
+ 108,
3414
+ 115,
3415
+ 47,
3416
+ 99,
3417
+ 111,
3418
+ 110,
3419
+ 118,
3420
+ 101,
3421
+ 114,
3422
+ 115,
3423
+ 97,
3424
+ 116,
3425
+ 105,
3426
+ 111,
3427
+ 110,
3428
+ 45,
3429
+ 98,
3430
+ 105,
3431
+ 110,
3432
+ 100,
3433
+ 105,
3434
+ 110,
3435
+ 103,
3436
+ 115,
3437
+ 47,
3438
+ 123,
3439
+ 105,
3440
+ 100,
3441
+ 125,
3442
+ ]),
3443
+ ],
3444
+ },
3445
+ },
3446
+ },
3447
+ deleteConversationBinding: {
3448
+ name: "DeleteConversationBinding",
3449
+ requestType: DeleteConversationBindingRequest,
3450
+ requestStream: false,
3451
+ responseType: Empty,
3452
+ responseStream: false,
3453
+ options: {
3454
+ _unknownFields: {
3455
+ 578365826: [
3456
+ Buffer.from([
3457
+ 49,
3458
+ 42,
3459
+ 47,
3460
+ 47,
3461
+ 99,
3462
+ 111,
3463
+ 110,
3464
+ 116,
3465
+ 114,
3466
+ 111,
3467
+ 108,
3468
+ 47,
3469
+ 118,
3470
+ 49,
3471
+ 47,
3472
+ 99,
3473
+ 104,
3474
+ 97,
3475
+ 110,
3476
+ 110,
3477
+ 101,
3478
+ 108,
3479
+ 115,
3480
+ 47,
3481
+ 99,
3482
+ 111,
3483
+ 110,
3484
+ 118,
3485
+ 101,
3486
+ 114,
3487
+ 115,
3488
+ 97,
3489
+ 116,
3490
+ 105,
3491
+ 111,
3492
+ 110,
3493
+ 45,
3494
+ 98,
3495
+ 105,
3496
+ 110,
3497
+ 100,
3498
+ 105,
3499
+ 110,
3500
+ 103,
3501
+ 115,
3502
+ 47,
3503
+ 123,
3504
+ 105,
3505
+ 100,
3506
+ 125,
3507
+ ]),
3508
+ ],
3509
+ },
3510
+ },
3511
+ },
3512
+ listConversationBindings: {
3513
+ name: "ListConversationBindings",
3514
+ requestType: ListConversationBindingsRequest,
3515
+ requestStream: false,
3516
+ responseType: ListConversationBindingsResponse,
3517
+ responseStream: false,
3518
+ options: {
3519
+ _unknownFields: {
3520
+ 578365826: [
3521
+ Buffer.from([
3522
+ 44,
3523
+ 18,
3524
+ 42,
3525
+ 47,
3526
+ 99,
3527
+ 111,
3528
+ 110,
3529
+ 116,
3530
+ 114,
3531
+ 111,
3532
+ 108,
3533
+ 47,
3534
+ 118,
3535
+ 49,
3536
+ 47,
3537
+ 99,
3538
+ 104,
3539
+ 97,
3540
+ 110,
3541
+ 110,
3542
+ 101,
3543
+ 108,
3544
+ 115,
3545
+ 47,
3546
+ 99,
3547
+ 111,
3548
+ 110,
3549
+ 118,
3550
+ 101,
3551
+ 114,
3552
+ 115,
3553
+ 97,
3554
+ 116,
3555
+ 105,
3556
+ 111,
3557
+ 110,
3558
+ 45,
3559
+ 98,
3560
+ 105,
3561
+ 110,
3562
+ 100,
3563
+ 105,
3564
+ 110,
3565
+ 103,
3566
+ 115,
3567
+ ]),
3568
+ ],
3569
+ },
3570
+ },
3571
+ },
3572
+ },
3573
+ };
3574
+ function toTimestamp(date) {
3575
+ const seconds = BigInt(Math.trunc(date.getTime() / 1_000));
3576
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
3577
+ return { seconds, nanos };
3578
+ }
3579
+ function fromTimestamp(t) {
3580
+ let millis = (globalThis.Number(t.seconds.toString()) || 0) * 1_000;
3581
+ millis += (t.nanos || 0) / 1_000_000;
3582
+ return new globalThis.Date(millis);
3583
+ }
3584
+ function fromJsonTimestamp(o) {
3585
+ if (o instanceof globalThis.Date) {
3586
+ return o;
3587
+ }
3588
+ else if (typeof o === "string") {
3589
+ return new globalThis.Date(o);
3590
+ }
3591
+ else {
3592
+ return fromTimestamp(Timestamp.fromJSON(o));
3593
+ }
3594
+ }
3595
+ function isObject(value) {
3596
+ return typeof value === "object" && value !== null;
3597
+ }
3598
+ function isSet(value) {
3599
+ return value !== null && value !== undefined;
3600
+ }