@devvit/protos 0.11.17-next-2025-05-29-a6864e710.0 → 0.11.17-next-2025-05-29-484d6c484.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.
@@ -0,0 +1,678 @@
1
+ /**
2
+ * #organization.ts
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ /* eslint-disable */
7
+ import _m0 from "protobufjs/minimal.js";
8
+ import { Timestamp } from "../../../../../google/protobuf/timestamp.js";
9
+ import { messageTypeRegistry } from "../../../../../typeRegistry.js";
10
+ function createBaseOrganization() {
11
+ return { id: "", name: "", isInternal: false, contractEndDate: undefined };
12
+ }
13
+ export const Organization = {
14
+ $type: "devvit.data.api.admin.v1alpha.Organization",
15
+ encode(message, writer = _m0.Writer.create()) {
16
+ if (message.id !== "") {
17
+ writer.uint32(10).string(message.id);
18
+ }
19
+ if (message.name !== "") {
20
+ writer.uint32(18).string(message.name);
21
+ }
22
+ if (message.isInternal !== false) {
23
+ writer.uint32(24).bool(message.isInternal);
24
+ }
25
+ if (message.contractEndDate !== undefined) {
26
+ Timestamp.encode(toTimestamp(message.contractEndDate), writer.uint32(34).fork()).ldelim();
27
+ }
28
+ return writer;
29
+ },
30
+ decode(input, length) {
31
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
32
+ let end = length === undefined ? reader.len : reader.pos + length;
33
+ const message = createBaseOrganization();
34
+ while (reader.pos < end) {
35
+ const tag = reader.uint32();
36
+ switch (tag >>> 3) {
37
+ case 1:
38
+ if (tag !== 10) {
39
+ break;
40
+ }
41
+ message.id = reader.string();
42
+ continue;
43
+ case 2:
44
+ if (tag !== 18) {
45
+ break;
46
+ }
47
+ message.name = reader.string();
48
+ continue;
49
+ case 3:
50
+ if (tag !== 24) {
51
+ break;
52
+ }
53
+ message.isInternal = reader.bool();
54
+ continue;
55
+ case 4:
56
+ if (tag !== 34) {
57
+ break;
58
+ }
59
+ message.contractEndDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
60
+ continue;
61
+ }
62
+ if ((tag & 7) === 4 || tag === 0) {
63
+ break;
64
+ }
65
+ reader.skipType(tag & 7);
66
+ }
67
+ return message;
68
+ },
69
+ fromJSON(object) {
70
+ return {
71
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
72
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
73
+ isInternal: isSet(object.isInternal) ? globalThis.Boolean(object.isInternal) : false,
74
+ contractEndDate: isSet(object.contractEndDate) ? fromJsonTimestamp(object.contractEndDate) : undefined,
75
+ };
76
+ },
77
+ toJSON(message) {
78
+ const obj = {};
79
+ if (message.id !== "") {
80
+ obj.id = message.id;
81
+ }
82
+ if (message.name !== "") {
83
+ obj.name = message.name;
84
+ }
85
+ if (message.isInternal !== false) {
86
+ obj.isInternal = message.isInternal;
87
+ }
88
+ if (message.contractEndDate !== undefined) {
89
+ obj.contractEndDate = message.contractEndDate.toISOString();
90
+ }
91
+ return obj;
92
+ },
93
+ create(base) {
94
+ return Organization.fromPartial(base ?? {});
95
+ },
96
+ fromPartial(object) {
97
+ const message = createBaseOrganization();
98
+ message.id = object.id ?? "";
99
+ message.name = object.name ?? "";
100
+ message.isInternal = object.isInternal ?? false;
101
+ message.contractEndDate = object.contractEndDate ?? undefined;
102
+ return message;
103
+ },
104
+ };
105
+ messageTypeRegistry.set(Organization.$type, Organization);
106
+ function createBaseCreateOrganizationRequest() {
107
+ return { name: "", isInternal: false, contractEndDate: undefined };
108
+ }
109
+ export const CreateOrganizationRequest = {
110
+ $type: "devvit.data.api.admin.v1alpha.CreateOrganizationRequest",
111
+ encode(message, writer = _m0.Writer.create()) {
112
+ if (message.name !== "") {
113
+ writer.uint32(10).string(message.name);
114
+ }
115
+ if (message.isInternal !== false) {
116
+ writer.uint32(16).bool(message.isInternal);
117
+ }
118
+ if (message.contractEndDate !== undefined) {
119
+ Timestamp.encode(toTimestamp(message.contractEndDate), writer.uint32(26).fork()).ldelim();
120
+ }
121
+ return writer;
122
+ },
123
+ decode(input, length) {
124
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
125
+ let end = length === undefined ? reader.len : reader.pos + length;
126
+ const message = createBaseCreateOrganizationRequest();
127
+ while (reader.pos < end) {
128
+ const tag = reader.uint32();
129
+ switch (tag >>> 3) {
130
+ case 1:
131
+ if (tag !== 10) {
132
+ break;
133
+ }
134
+ message.name = reader.string();
135
+ continue;
136
+ case 2:
137
+ if (tag !== 16) {
138
+ break;
139
+ }
140
+ message.isInternal = reader.bool();
141
+ continue;
142
+ case 3:
143
+ if (tag !== 26) {
144
+ break;
145
+ }
146
+ message.contractEndDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
147
+ continue;
148
+ }
149
+ if ((tag & 7) === 4 || tag === 0) {
150
+ break;
151
+ }
152
+ reader.skipType(tag & 7);
153
+ }
154
+ return message;
155
+ },
156
+ fromJSON(object) {
157
+ return {
158
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
159
+ isInternal: isSet(object.isInternal) ? globalThis.Boolean(object.isInternal) : false,
160
+ contractEndDate: isSet(object.contractEndDate) ? fromJsonTimestamp(object.contractEndDate) : undefined,
161
+ };
162
+ },
163
+ toJSON(message) {
164
+ const obj = {};
165
+ if (message.name !== "") {
166
+ obj.name = message.name;
167
+ }
168
+ if (message.isInternal !== false) {
169
+ obj.isInternal = message.isInternal;
170
+ }
171
+ if (message.contractEndDate !== undefined) {
172
+ obj.contractEndDate = message.contractEndDate.toISOString();
173
+ }
174
+ return obj;
175
+ },
176
+ create(base) {
177
+ return CreateOrganizationRequest.fromPartial(base ?? {});
178
+ },
179
+ fromPartial(object) {
180
+ const message = createBaseCreateOrganizationRequest();
181
+ message.name = object.name ?? "";
182
+ message.isInternal = object.isInternal ?? false;
183
+ message.contractEndDate = object.contractEndDate ?? undefined;
184
+ return message;
185
+ },
186
+ };
187
+ messageTypeRegistry.set(CreateOrganizationRequest.$type, CreateOrganizationRequest);
188
+ function createBaseCreateOrganizationResponse() {
189
+ return { organization: undefined };
190
+ }
191
+ export const CreateOrganizationResponse = {
192
+ $type: "devvit.data.api.admin.v1alpha.CreateOrganizationResponse",
193
+ encode(message, writer = _m0.Writer.create()) {
194
+ if (message.organization !== undefined) {
195
+ Organization.encode(message.organization, writer.uint32(10).fork()).ldelim();
196
+ }
197
+ return writer;
198
+ },
199
+ decode(input, length) {
200
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
201
+ let end = length === undefined ? reader.len : reader.pos + length;
202
+ const message = createBaseCreateOrganizationResponse();
203
+ while (reader.pos < end) {
204
+ const tag = reader.uint32();
205
+ switch (tag >>> 3) {
206
+ case 1:
207
+ if (tag !== 10) {
208
+ break;
209
+ }
210
+ message.organization = Organization.decode(reader, reader.uint32());
211
+ continue;
212
+ }
213
+ if ((tag & 7) === 4 || tag === 0) {
214
+ break;
215
+ }
216
+ reader.skipType(tag & 7);
217
+ }
218
+ return message;
219
+ },
220
+ fromJSON(object) {
221
+ return { organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined };
222
+ },
223
+ toJSON(message) {
224
+ const obj = {};
225
+ if (message.organization !== undefined) {
226
+ obj.organization = Organization.toJSON(message.organization);
227
+ }
228
+ return obj;
229
+ },
230
+ create(base) {
231
+ return CreateOrganizationResponse.fromPartial(base ?? {});
232
+ },
233
+ fromPartial(object) {
234
+ const message = createBaseCreateOrganizationResponse();
235
+ message.organization = (object.organization !== undefined && object.organization !== null)
236
+ ? Organization.fromPartial(object.organization)
237
+ : undefined;
238
+ return message;
239
+ },
240
+ };
241
+ messageTypeRegistry.set(CreateOrganizationResponse.$type, CreateOrganizationResponse);
242
+ function createBaseDeleteOrganizationRequest() {
243
+ return { id: "" };
244
+ }
245
+ export const DeleteOrganizationRequest = {
246
+ $type: "devvit.data.api.admin.v1alpha.DeleteOrganizationRequest",
247
+ encode(message, writer = _m0.Writer.create()) {
248
+ if (message.id !== "") {
249
+ writer.uint32(10).string(message.id);
250
+ }
251
+ return writer;
252
+ },
253
+ decode(input, length) {
254
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
255
+ let end = length === undefined ? reader.len : reader.pos + length;
256
+ const message = createBaseDeleteOrganizationRequest();
257
+ while (reader.pos < end) {
258
+ const tag = reader.uint32();
259
+ switch (tag >>> 3) {
260
+ case 1:
261
+ if (tag !== 10) {
262
+ break;
263
+ }
264
+ message.id = reader.string();
265
+ continue;
266
+ }
267
+ if ((tag & 7) === 4 || tag === 0) {
268
+ break;
269
+ }
270
+ reader.skipType(tag & 7);
271
+ }
272
+ return message;
273
+ },
274
+ fromJSON(object) {
275
+ return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
276
+ },
277
+ toJSON(message) {
278
+ const obj = {};
279
+ if (message.id !== "") {
280
+ obj.id = message.id;
281
+ }
282
+ return obj;
283
+ },
284
+ create(base) {
285
+ return DeleteOrganizationRequest.fromPartial(base ?? {});
286
+ },
287
+ fromPartial(object) {
288
+ const message = createBaseDeleteOrganizationRequest();
289
+ message.id = object.id ?? "";
290
+ return message;
291
+ },
292
+ };
293
+ messageTypeRegistry.set(DeleteOrganizationRequest.$type, DeleteOrganizationRequest);
294
+ function createBaseDeleteOrganizationResponse() {
295
+ return { organization: undefined };
296
+ }
297
+ export const DeleteOrganizationResponse = {
298
+ $type: "devvit.data.api.admin.v1alpha.DeleteOrganizationResponse",
299
+ encode(message, writer = _m0.Writer.create()) {
300
+ if (message.organization !== undefined) {
301
+ Organization.encode(message.organization, writer.uint32(10).fork()).ldelim();
302
+ }
303
+ return writer;
304
+ },
305
+ decode(input, length) {
306
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
307
+ let end = length === undefined ? reader.len : reader.pos + length;
308
+ const message = createBaseDeleteOrganizationResponse();
309
+ while (reader.pos < end) {
310
+ const tag = reader.uint32();
311
+ switch (tag >>> 3) {
312
+ case 1:
313
+ if (tag !== 10) {
314
+ break;
315
+ }
316
+ message.organization = Organization.decode(reader, reader.uint32());
317
+ continue;
318
+ }
319
+ if ((tag & 7) === 4 || tag === 0) {
320
+ break;
321
+ }
322
+ reader.skipType(tag & 7);
323
+ }
324
+ return message;
325
+ },
326
+ fromJSON(object) {
327
+ return { organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined };
328
+ },
329
+ toJSON(message) {
330
+ const obj = {};
331
+ if (message.organization !== undefined) {
332
+ obj.organization = Organization.toJSON(message.organization);
333
+ }
334
+ return obj;
335
+ },
336
+ create(base) {
337
+ return DeleteOrganizationResponse.fromPartial(base ?? {});
338
+ },
339
+ fromPartial(object) {
340
+ const message = createBaseDeleteOrganizationResponse();
341
+ message.organization = (object.organization !== undefined && object.organization !== null)
342
+ ? Organization.fromPartial(object.organization)
343
+ : undefined;
344
+ return message;
345
+ },
346
+ };
347
+ messageTypeRegistry.set(DeleteOrganizationResponse.$type, DeleteOrganizationResponse);
348
+ function createBaseGetOrganizationByNameRequest() {
349
+ return { name: "" };
350
+ }
351
+ export const GetOrganizationByNameRequest = {
352
+ $type: "devvit.data.api.admin.v1alpha.GetOrganizationByNameRequest",
353
+ encode(message, writer = _m0.Writer.create()) {
354
+ if (message.name !== "") {
355
+ writer.uint32(10).string(message.name);
356
+ }
357
+ return writer;
358
+ },
359
+ decode(input, length) {
360
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
361
+ let end = length === undefined ? reader.len : reader.pos + length;
362
+ const message = createBaseGetOrganizationByNameRequest();
363
+ while (reader.pos < end) {
364
+ const tag = reader.uint32();
365
+ switch (tag >>> 3) {
366
+ case 1:
367
+ if (tag !== 10) {
368
+ break;
369
+ }
370
+ message.name = reader.string();
371
+ continue;
372
+ }
373
+ if ((tag & 7) === 4 || tag === 0) {
374
+ break;
375
+ }
376
+ reader.skipType(tag & 7);
377
+ }
378
+ return message;
379
+ },
380
+ fromJSON(object) {
381
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
382
+ },
383
+ toJSON(message) {
384
+ const obj = {};
385
+ if (message.name !== "") {
386
+ obj.name = message.name;
387
+ }
388
+ return obj;
389
+ },
390
+ create(base) {
391
+ return GetOrganizationByNameRequest.fromPartial(base ?? {});
392
+ },
393
+ fromPartial(object) {
394
+ const message = createBaseGetOrganizationByNameRequest();
395
+ message.name = object.name ?? "";
396
+ return message;
397
+ },
398
+ };
399
+ messageTypeRegistry.set(GetOrganizationByNameRequest.$type, GetOrganizationByNameRequest);
400
+ function createBaseGetOrganizationByNameResponse() {
401
+ return { organization: undefined };
402
+ }
403
+ export const GetOrganizationByNameResponse = {
404
+ $type: "devvit.data.api.admin.v1alpha.GetOrganizationByNameResponse",
405
+ encode(message, writer = _m0.Writer.create()) {
406
+ if (message.organization !== undefined) {
407
+ Organization.encode(message.organization, writer.uint32(10).fork()).ldelim();
408
+ }
409
+ return writer;
410
+ },
411
+ decode(input, length) {
412
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
413
+ let end = length === undefined ? reader.len : reader.pos + length;
414
+ const message = createBaseGetOrganizationByNameResponse();
415
+ while (reader.pos < end) {
416
+ const tag = reader.uint32();
417
+ switch (tag >>> 3) {
418
+ case 1:
419
+ if (tag !== 10) {
420
+ break;
421
+ }
422
+ message.organization = Organization.decode(reader, reader.uint32());
423
+ continue;
424
+ }
425
+ if ((tag & 7) === 4 || tag === 0) {
426
+ break;
427
+ }
428
+ reader.skipType(tag & 7);
429
+ }
430
+ return message;
431
+ },
432
+ fromJSON(object) {
433
+ return { organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined };
434
+ },
435
+ toJSON(message) {
436
+ const obj = {};
437
+ if (message.organization !== undefined) {
438
+ obj.organization = Organization.toJSON(message.organization);
439
+ }
440
+ return obj;
441
+ },
442
+ create(base) {
443
+ return GetOrganizationByNameResponse.fromPartial(base ?? {});
444
+ },
445
+ fromPartial(object) {
446
+ const message = createBaseGetOrganizationByNameResponse();
447
+ message.organization = (object.organization !== undefined && object.organization !== null)
448
+ ? Organization.fromPartial(object.organization)
449
+ : undefined;
450
+ return message;
451
+ },
452
+ };
453
+ messageTypeRegistry.set(GetOrganizationByNameResponse.$type, GetOrganizationByNameResponse);
454
+ function createBaseGetOrganizationByIdRequest() {
455
+ return { id: "" };
456
+ }
457
+ export const GetOrganizationByIdRequest = {
458
+ $type: "devvit.data.api.admin.v1alpha.GetOrganizationByIdRequest",
459
+ encode(message, writer = _m0.Writer.create()) {
460
+ if (message.id !== "") {
461
+ writer.uint32(10).string(message.id);
462
+ }
463
+ return writer;
464
+ },
465
+ decode(input, length) {
466
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
467
+ let end = length === undefined ? reader.len : reader.pos + length;
468
+ const message = createBaseGetOrganizationByIdRequest();
469
+ while (reader.pos < end) {
470
+ const tag = reader.uint32();
471
+ switch (tag >>> 3) {
472
+ case 1:
473
+ if (tag !== 10) {
474
+ break;
475
+ }
476
+ message.id = reader.string();
477
+ continue;
478
+ }
479
+ if ((tag & 7) === 4 || tag === 0) {
480
+ break;
481
+ }
482
+ reader.skipType(tag & 7);
483
+ }
484
+ return message;
485
+ },
486
+ fromJSON(object) {
487
+ return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
488
+ },
489
+ toJSON(message) {
490
+ const obj = {};
491
+ if (message.id !== "") {
492
+ obj.id = message.id;
493
+ }
494
+ return obj;
495
+ },
496
+ create(base) {
497
+ return GetOrganizationByIdRequest.fromPartial(base ?? {});
498
+ },
499
+ fromPartial(object) {
500
+ const message = createBaseGetOrganizationByIdRequest();
501
+ message.id = object.id ?? "";
502
+ return message;
503
+ },
504
+ };
505
+ messageTypeRegistry.set(GetOrganizationByIdRequest.$type, GetOrganizationByIdRequest);
506
+ function createBaseGetOrganizationByIdResponse() {
507
+ return { organization: undefined };
508
+ }
509
+ export const GetOrganizationByIdResponse = {
510
+ $type: "devvit.data.api.admin.v1alpha.GetOrganizationByIdResponse",
511
+ encode(message, writer = _m0.Writer.create()) {
512
+ if (message.organization !== undefined) {
513
+ Organization.encode(message.organization, writer.uint32(10).fork()).ldelim();
514
+ }
515
+ return writer;
516
+ },
517
+ decode(input, length) {
518
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
519
+ let end = length === undefined ? reader.len : reader.pos + length;
520
+ const message = createBaseGetOrganizationByIdResponse();
521
+ while (reader.pos < end) {
522
+ const tag = reader.uint32();
523
+ switch (tag >>> 3) {
524
+ case 1:
525
+ if (tag !== 10) {
526
+ break;
527
+ }
528
+ message.organization = Organization.decode(reader, reader.uint32());
529
+ continue;
530
+ }
531
+ if ((tag & 7) === 4 || tag === 0) {
532
+ break;
533
+ }
534
+ reader.skipType(tag & 7);
535
+ }
536
+ return message;
537
+ },
538
+ fromJSON(object) {
539
+ return { organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined };
540
+ },
541
+ toJSON(message) {
542
+ const obj = {};
543
+ if (message.organization !== undefined) {
544
+ obj.organization = Organization.toJSON(message.organization);
545
+ }
546
+ return obj;
547
+ },
548
+ create(base) {
549
+ return GetOrganizationByIdResponse.fromPartial(base ?? {});
550
+ },
551
+ fromPartial(object) {
552
+ const message = createBaseGetOrganizationByIdResponse();
553
+ message.organization = (object.organization !== undefined && object.organization !== null)
554
+ ? Organization.fromPartial(object.organization)
555
+ : undefined;
556
+ return message;
557
+ },
558
+ };
559
+ messageTypeRegistry.set(GetOrganizationByIdResponse.$type, GetOrganizationByIdResponse);
560
+ function createBaseGetOrganizationsRequest() {
561
+ return {};
562
+ }
563
+ export const GetOrganizationsRequest = {
564
+ $type: "devvit.data.api.admin.v1alpha.GetOrganizationsRequest",
565
+ encode(_, writer = _m0.Writer.create()) {
566
+ return writer;
567
+ },
568
+ decode(input, length) {
569
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
570
+ let end = length === undefined ? reader.len : reader.pos + length;
571
+ const message = createBaseGetOrganizationsRequest();
572
+ while (reader.pos < end) {
573
+ const tag = reader.uint32();
574
+ switch (tag >>> 3) {
575
+ }
576
+ if ((tag & 7) === 4 || tag === 0) {
577
+ break;
578
+ }
579
+ reader.skipType(tag & 7);
580
+ }
581
+ return message;
582
+ },
583
+ fromJSON(_) {
584
+ return {};
585
+ },
586
+ toJSON(_) {
587
+ const obj = {};
588
+ return obj;
589
+ },
590
+ create(base) {
591
+ return GetOrganizationsRequest.fromPartial(base ?? {});
592
+ },
593
+ fromPartial(_) {
594
+ const message = createBaseGetOrganizationsRequest();
595
+ return message;
596
+ },
597
+ };
598
+ messageTypeRegistry.set(GetOrganizationsRequest.$type, GetOrganizationsRequest);
599
+ function createBaseGetOrganizationsResponse() {
600
+ return { organizations: [] };
601
+ }
602
+ export const GetOrganizationsResponse = {
603
+ $type: "devvit.data.api.admin.v1alpha.GetOrganizationsResponse",
604
+ encode(message, writer = _m0.Writer.create()) {
605
+ for (const v of message.organizations) {
606
+ Organization.encode(v, writer.uint32(10).fork()).ldelim();
607
+ }
608
+ return writer;
609
+ },
610
+ decode(input, length) {
611
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
612
+ let end = length === undefined ? reader.len : reader.pos + length;
613
+ const message = createBaseGetOrganizationsResponse();
614
+ while (reader.pos < end) {
615
+ const tag = reader.uint32();
616
+ switch (tag >>> 3) {
617
+ case 1:
618
+ if (tag !== 10) {
619
+ break;
620
+ }
621
+ message.organizations.push(Organization.decode(reader, reader.uint32()));
622
+ continue;
623
+ }
624
+ if ((tag & 7) === 4 || tag === 0) {
625
+ break;
626
+ }
627
+ reader.skipType(tag & 7);
628
+ }
629
+ return message;
630
+ },
631
+ fromJSON(object) {
632
+ return {
633
+ organizations: globalThis.Array.isArray(object?.organizations)
634
+ ? object.organizations.map((e) => Organization.fromJSON(e))
635
+ : [],
636
+ };
637
+ },
638
+ toJSON(message) {
639
+ const obj = {};
640
+ if (message.organizations?.length) {
641
+ obj.organizations = message.organizations.map((e) => Organization.toJSON(e));
642
+ }
643
+ return obj;
644
+ },
645
+ create(base) {
646
+ return GetOrganizationsResponse.fromPartial(base ?? {});
647
+ },
648
+ fromPartial(object) {
649
+ const message = createBaseGetOrganizationsResponse();
650
+ message.organizations = object.organizations?.map((e) => Organization.fromPartial(e)) || [];
651
+ return message;
652
+ },
653
+ };
654
+ messageTypeRegistry.set(GetOrganizationsResponse.$type, GetOrganizationsResponse);
655
+ function toTimestamp(date) {
656
+ const seconds = Math.trunc(date.getTime() / 1000);
657
+ const nanos = (date.getTime() % 1000) * 1000000;
658
+ return { seconds, nanos };
659
+ }
660
+ function fromTimestamp(t) {
661
+ let millis = (t.seconds || 0) * 1000;
662
+ millis += (t.nanos || 0) / 1000000;
663
+ return new globalThis.Date(millis);
664
+ }
665
+ function fromJsonTimestamp(o) {
666
+ if (o instanceof globalThis.Date) {
667
+ return o;
668
+ }
669
+ else if (typeof o === "string") {
670
+ return new globalThis.Date(o);
671
+ }
672
+ else {
673
+ return fromTimestamp(Timestamp.fromJSON(o));
674
+ }
675
+ }
676
+ function isSet(value) {
677
+ return value !== null && value !== undefined;
678
+ }