weave-typescript 0.22.0 → 0.24.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,1112 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.11.6
5
+ // protoc unknown
6
+ // source: weaveapi/organization/v1/service.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.OrganizationServiceDefinition = exports.OrganizationServiceClientImpl = exports.OrganizationServiceServiceName = exports.DeleteOrganizationResponse = exports.DeleteOrganizationRequest = exports.UpdateOrganizationResponse = exports.UpdateOrganizationRequest = exports.GetOrganizationByIdResponse = exports.GetOrganizationByIdRequest = exports.GetOrganizationBySlugResponse = exports.GetOrganizationBySlugRequest = exports.CreateOrganizationResponse = exports.CreateOrganizationRequest = exports.ListOrganizationsResponse = exports.ListOrganizationsRequest = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const organization_pb_1 = require("./organization.pb");
12
+ exports.protobufPackage = "weaveapi.organization.v1";
13
+ function createBaseListOrganizationsRequest() {
14
+ return {};
15
+ }
16
+ exports.ListOrganizationsRequest = {
17
+ encode(_, writer = new wire_1.BinaryWriter()) {
18
+ return writer;
19
+ },
20
+ decode(input, length) {
21
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
22
+ const end = length === undefined ? reader.len : reader.pos + length;
23
+ const message = createBaseListOrganizationsRequest();
24
+ while (reader.pos < end) {
25
+ const tag = reader.uint32();
26
+ switch (tag >>> 3) {
27
+ }
28
+ if ((tag & 7) === 4 || tag === 0) {
29
+ break;
30
+ }
31
+ reader.skip(tag & 7);
32
+ }
33
+ return message;
34
+ },
35
+ fromJSON(_) {
36
+ return {};
37
+ },
38
+ toJSON(_) {
39
+ const obj = {};
40
+ return obj;
41
+ },
42
+ create(base) {
43
+ return exports.ListOrganizationsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
44
+ },
45
+ fromPartial(_) {
46
+ const message = createBaseListOrganizationsRequest();
47
+ return message;
48
+ },
49
+ };
50
+ function createBaseListOrganizationsResponse() {
51
+ return { organizations: [] };
52
+ }
53
+ exports.ListOrganizationsResponse = {
54
+ encode(message, writer = new wire_1.BinaryWriter()) {
55
+ for (const v of message.organizations) {
56
+ organization_pb_1.Organization.encode(v, writer.uint32(10).fork()).join();
57
+ }
58
+ return writer;
59
+ },
60
+ decode(input, length) {
61
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
62
+ const end = length === undefined ? reader.len : reader.pos + length;
63
+ const message = createBaseListOrganizationsResponse();
64
+ while (reader.pos < end) {
65
+ const tag = reader.uint32();
66
+ switch (tag >>> 3) {
67
+ case 1: {
68
+ if (tag !== 10) {
69
+ break;
70
+ }
71
+ message.organizations.push(organization_pb_1.Organization.decode(reader, reader.uint32()));
72
+ continue;
73
+ }
74
+ }
75
+ if ((tag & 7) === 4 || tag === 0) {
76
+ break;
77
+ }
78
+ reader.skip(tag & 7);
79
+ }
80
+ return message;
81
+ },
82
+ fromJSON(object) {
83
+ return {
84
+ organizations: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.organizations)
85
+ ? object.organizations.map((e) => organization_pb_1.Organization.fromJSON(e))
86
+ : [],
87
+ };
88
+ },
89
+ toJSON(message) {
90
+ var _a;
91
+ const obj = {};
92
+ if ((_a = message.organizations) === null || _a === void 0 ? void 0 : _a.length) {
93
+ obj.organizations = message.organizations.map((e) => organization_pb_1.Organization.toJSON(e));
94
+ }
95
+ return obj;
96
+ },
97
+ create(base) {
98
+ return exports.ListOrganizationsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
99
+ },
100
+ fromPartial(object) {
101
+ var _a;
102
+ const message = createBaseListOrganizationsResponse();
103
+ message.organizations = ((_a = object.organizations) === null || _a === void 0 ? void 0 : _a.map((e) => organization_pb_1.Organization.fromPartial(e))) || [];
104
+ return message;
105
+ },
106
+ };
107
+ function createBaseCreateOrganizationRequest() {
108
+ return { slug: "", name: "", description: "", primaryColor: "", timezone: "", location: "" };
109
+ }
110
+ exports.CreateOrganizationRequest = {
111
+ encode(message, writer = new wire_1.BinaryWriter()) {
112
+ if (message.slug !== "") {
113
+ writer.uint32(10).string(message.slug);
114
+ }
115
+ if (message.name !== "") {
116
+ writer.uint32(18).string(message.name);
117
+ }
118
+ if (message.description !== "") {
119
+ writer.uint32(26).string(message.description);
120
+ }
121
+ if (message.primaryColor !== "") {
122
+ writer.uint32(34).string(message.primaryColor);
123
+ }
124
+ if (message.timezone !== "") {
125
+ writer.uint32(42).string(message.timezone);
126
+ }
127
+ if (message.location !== "") {
128
+ writer.uint32(50).string(message.location);
129
+ }
130
+ return writer;
131
+ },
132
+ decode(input, length) {
133
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
134
+ const end = length === undefined ? reader.len : reader.pos + length;
135
+ const message = createBaseCreateOrganizationRequest();
136
+ while (reader.pos < end) {
137
+ const tag = reader.uint32();
138
+ switch (tag >>> 3) {
139
+ case 1: {
140
+ if (tag !== 10) {
141
+ break;
142
+ }
143
+ message.slug = reader.string();
144
+ continue;
145
+ }
146
+ case 2: {
147
+ if (tag !== 18) {
148
+ break;
149
+ }
150
+ message.name = reader.string();
151
+ continue;
152
+ }
153
+ case 3: {
154
+ if (tag !== 26) {
155
+ break;
156
+ }
157
+ message.description = reader.string();
158
+ continue;
159
+ }
160
+ case 4: {
161
+ if (tag !== 34) {
162
+ break;
163
+ }
164
+ message.primaryColor = reader.string();
165
+ continue;
166
+ }
167
+ case 5: {
168
+ if (tag !== 42) {
169
+ break;
170
+ }
171
+ message.timezone = reader.string();
172
+ continue;
173
+ }
174
+ case 6: {
175
+ if (tag !== 50) {
176
+ break;
177
+ }
178
+ message.location = reader.string();
179
+ continue;
180
+ }
181
+ }
182
+ if ((tag & 7) === 4 || tag === 0) {
183
+ break;
184
+ }
185
+ reader.skip(tag & 7);
186
+ }
187
+ return message;
188
+ },
189
+ fromJSON(object) {
190
+ return {
191
+ slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
192
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
193
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
194
+ primaryColor: isSet(object.primaryColor)
195
+ ? globalThis.String(object.primaryColor)
196
+ : isSet(object.primary_color)
197
+ ? globalThis.String(object.primary_color)
198
+ : "",
199
+ timezone: isSet(object.timezone) ? globalThis.String(object.timezone) : "",
200
+ location: isSet(object.location) ? globalThis.String(object.location) : "",
201
+ };
202
+ },
203
+ toJSON(message) {
204
+ const obj = {};
205
+ if (message.slug !== "") {
206
+ obj.slug = message.slug;
207
+ }
208
+ if (message.name !== "") {
209
+ obj.name = message.name;
210
+ }
211
+ if (message.description !== "") {
212
+ obj.description = message.description;
213
+ }
214
+ if (message.primaryColor !== "") {
215
+ obj.primaryColor = message.primaryColor;
216
+ }
217
+ if (message.timezone !== "") {
218
+ obj.timezone = message.timezone;
219
+ }
220
+ if (message.location !== "") {
221
+ obj.location = message.location;
222
+ }
223
+ return obj;
224
+ },
225
+ create(base) {
226
+ return exports.CreateOrganizationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
227
+ },
228
+ fromPartial(object) {
229
+ var _a, _b, _c, _d, _e, _f;
230
+ const message = createBaseCreateOrganizationRequest();
231
+ message.slug = (_a = object.slug) !== null && _a !== void 0 ? _a : "";
232
+ message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
233
+ message.description = (_c = object.description) !== null && _c !== void 0 ? _c : "";
234
+ message.primaryColor = (_d = object.primaryColor) !== null && _d !== void 0 ? _d : "";
235
+ message.timezone = (_e = object.timezone) !== null && _e !== void 0 ? _e : "";
236
+ message.location = (_f = object.location) !== null && _f !== void 0 ? _f : "";
237
+ return message;
238
+ },
239
+ };
240
+ function createBaseCreateOrganizationResponse() {
241
+ return { organization: undefined };
242
+ }
243
+ exports.CreateOrganizationResponse = {
244
+ encode(message, writer = new wire_1.BinaryWriter()) {
245
+ if (message.organization !== undefined) {
246
+ organization_pb_1.Organization.encode(message.organization, writer.uint32(10).fork()).join();
247
+ }
248
+ return writer;
249
+ },
250
+ decode(input, length) {
251
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
252
+ const end = length === undefined ? reader.len : reader.pos + length;
253
+ const message = createBaseCreateOrganizationResponse();
254
+ while (reader.pos < end) {
255
+ const tag = reader.uint32();
256
+ switch (tag >>> 3) {
257
+ case 1: {
258
+ if (tag !== 10) {
259
+ break;
260
+ }
261
+ message.organization = organization_pb_1.Organization.decode(reader, reader.uint32());
262
+ continue;
263
+ }
264
+ }
265
+ if ((tag & 7) === 4 || tag === 0) {
266
+ break;
267
+ }
268
+ reader.skip(tag & 7);
269
+ }
270
+ return message;
271
+ },
272
+ fromJSON(object) {
273
+ return { organization: isSet(object.organization) ? organization_pb_1.Organization.fromJSON(object.organization) : undefined };
274
+ },
275
+ toJSON(message) {
276
+ const obj = {};
277
+ if (message.organization !== undefined) {
278
+ obj.organization = organization_pb_1.Organization.toJSON(message.organization);
279
+ }
280
+ return obj;
281
+ },
282
+ create(base) {
283
+ return exports.CreateOrganizationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
284
+ },
285
+ fromPartial(object) {
286
+ const message = createBaseCreateOrganizationResponse();
287
+ message.organization = (object.organization !== undefined && object.organization !== null)
288
+ ? organization_pb_1.Organization.fromPartial(object.organization)
289
+ : undefined;
290
+ return message;
291
+ },
292
+ };
293
+ function createBaseGetOrganizationBySlugRequest() {
294
+ return { slug: "" };
295
+ }
296
+ exports.GetOrganizationBySlugRequest = {
297
+ encode(message, writer = new wire_1.BinaryWriter()) {
298
+ if (message.slug !== "") {
299
+ writer.uint32(10).string(message.slug);
300
+ }
301
+ return writer;
302
+ },
303
+ decode(input, length) {
304
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
305
+ const end = length === undefined ? reader.len : reader.pos + length;
306
+ const message = createBaseGetOrganizationBySlugRequest();
307
+ while (reader.pos < end) {
308
+ const tag = reader.uint32();
309
+ switch (tag >>> 3) {
310
+ case 1: {
311
+ if (tag !== 10) {
312
+ break;
313
+ }
314
+ message.slug = reader.string();
315
+ continue;
316
+ }
317
+ }
318
+ if ((tag & 7) === 4 || tag === 0) {
319
+ break;
320
+ }
321
+ reader.skip(tag & 7);
322
+ }
323
+ return message;
324
+ },
325
+ fromJSON(object) {
326
+ return { slug: isSet(object.slug) ? globalThis.String(object.slug) : "" };
327
+ },
328
+ toJSON(message) {
329
+ const obj = {};
330
+ if (message.slug !== "") {
331
+ obj.slug = message.slug;
332
+ }
333
+ return obj;
334
+ },
335
+ create(base) {
336
+ return exports.GetOrganizationBySlugRequest.fromPartial(base !== null && base !== void 0 ? base : {});
337
+ },
338
+ fromPartial(object) {
339
+ var _a;
340
+ const message = createBaseGetOrganizationBySlugRequest();
341
+ message.slug = (_a = object.slug) !== null && _a !== void 0 ? _a : "";
342
+ return message;
343
+ },
344
+ };
345
+ function createBaseGetOrganizationBySlugResponse() {
346
+ return { organization: undefined };
347
+ }
348
+ exports.GetOrganizationBySlugResponse = {
349
+ encode(message, writer = new wire_1.BinaryWriter()) {
350
+ if (message.organization !== undefined) {
351
+ organization_pb_1.Organization.encode(message.organization, writer.uint32(10).fork()).join();
352
+ }
353
+ return writer;
354
+ },
355
+ decode(input, length) {
356
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
357
+ const end = length === undefined ? reader.len : reader.pos + length;
358
+ const message = createBaseGetOrganizationBySlugResponse();
359
+ while (reader.pos < end) {
360
+ const tag = reader.uint32();
361
+ switch (tag >>> 3) {
362
+ case 1: {
363
+ if (tag !== 10) {
364
+ break;
365
+ }
366
+ message.organization = organization_pb_1.Organization.decode(reader, reader.uint32());
367
+ continue;
368
+ }
369
+ }
370
+ if ((tag & 7) === 4 || tag === 0) {
371
+ break;
372
+ }
373
+ reader.skip(tag & 7);
374
+ }
375
+ return message;
376
+ },
377
+ fromJSON(object) {
378
+ return { organization: isSet(object.organization) ? organization_pb_1.Organization.fromJSON(object.organization) : undefined };
379
+ },
380
+ toJSON(message) {
381
+ const obj = {};
382
+ if (message.organization !== undefined) {
383
+ obj.organization = organization_pb_1.Organization.toJSON(message.organization);
384
+ }
385
+ return obj;
386
+ },
387
+ create(base) {
388
+ return exports.GetOrganizationBySlugResponse.fromPartial(base !== null && base !== void 0 ? base : {});
389
+ },
390
+ fromPartial(object) {
391
+ const message = createBaseGetOrganizationBySlugResponse();
392
+ message.organization = (object.organization !== undefined && object.organization !== null)
393
+ ? organization_pb_1.Organization.fromPartial(object.organization)
394
+ : undefined;
395
+ return message;
396
+ },
397
+ };
398
+ function createBaseGetOrganizationByIdRequest() {
399
+ return { id: "" };
400
+ }
401
+ exports.GetOrganizationByIdRequest = {
402
+ encode(message, writer = new wire_1.BinaryWriter()) {
403
+ if (message.id !== "") {
404
+ writer.uint32(10).string(message.id);
405
+ }
406
+ return writer;
407
+ },
408
+ decode(input, length) {
409
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
410
+ const end = length === undefined ? reader.len : reader.pos + length;
411
+ const message = createBaseGetOrganizationByIdRequest();
412
+ while (reader.pos < end) {
413
+ const tag = reader.uint32();
414
+ switch (tag >>> 3) {
415
+ case 1: {
416
+ if (tag !== 10) {
417
+ break;
418
+ }
419
+ message.id = reader.string();
420
+ continue;
421
+ }
422
+ }
423
+ if ((tag & 7) === 4 || tag === 0) {
424
+ break;
425
+ }
426
+ reader.skip(tag & 7);
427
+ }
428
+ return message;
429
+ },
430
+ fromJSON(object) {
431
+ return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
432
+ },
433
+ toJSON(message) {
434
+ const obj = {};
435
+ if (message.id !== "") {
436
+ obj.id = message.id;
437
+ }
438
+ return obj;
439
+ },
440
+ create(base) {
441
+ return exports.GetOrganizationByIdRequest.fromPartial(base !== null && base !== void 0 ? base : {});
442
+ },
443
+ fromPartial(object) {
444
+ var _a;
445
+ const message = createBaseGetOrganizationByIdRequest();
446
+ message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
447
+ return message;
448
+ },
449
+ };
450
+ function createBaseGetOrganizationByIdResponse() {
451
+ return { organization: undefined };
452
+ }
453
+ exports.GetOrganizationByIdResponse = {
454
+ encode(message, writer = new wire_1.BinaryWriter()) {
455
+ if (message.organization !== undefined) {
456
+ organization_pb_1.Organization.encode(message.organization, writer.uint32(10).fork()).join();
457
+ }
458
+ return writer;
459
+ },
460
+ decode(input, length) {
461
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
462
+ const end = length === undefined ? reader.len : reader.pos + length;
463
+ const message = createBaseGetOrganizationByIdResponse();
464
+ while (reader.pos < end) {
465
+ const tag = reader.uint32();
466
+ switch (tag >>> 3) {
467
+ case 1: {
468
+ if (tag !== 10) {
469
+ break;
470
+ }
471
+ message.organization = organization_pb_1.Organization.decode(reader, reader.uint32());
472
+ continue;
473
+ }
474
+ }
475
+ if ((tag & 7) === 4 || tag === 0) {
476
+ break;
477
+ }
478
+ reader.skip(tag & 7);
479
+ }
480
+ return message;
481
+ },
482
+ fromJSON(object) {
483
+ return { organization: isSet(object.organization) ? organization_pb_1.Organization.fromJSON(object.organization) : undefined };
484
+ },
485
+ toJSON(message) {
486
+ const obj = {};
487
+ if (message.organization !== undefined) {
488
+ obj.organization = organization_pb_1.Organization.toJSON(message.organization);
489
+ }
490
+ return obj;
491
+ },
492
+ create(base) {
493
+ return exports.GetOrganizationByIdResponse.fromPartial(base !== null && base !== void 0 ? base : {});
494
+ },
495
+ fromPartial(object) {
496
+ const message = createBaseGetOrganizationByIdResponse();
497
+ message.organization = (object.organization !== undefined && object.organization !== null)
498
+ ? organization_pb_1.Organization.fromPartial(object.organization)
499
+ : undefined;
500
+ return message;
501
+ },
502
+ };
503
+ function createBaseUpdateOrganizationRequest() {
504
+ return { slug: "", newSlug: "", name: "", description: "", primaryColor: "", timezone: "", location: "" };
505
+ }
506
+ exports.UpdateOrganizationRequest = {
507
+ encode(message, writer = new wire_1.BinaryWriter()) {
508
+ if (message.slug !== "") {
509
+ writer.uint32(10).string(message.slug);
510
+ }
511
+ if (message.newSlug !== "") {
512
+ writer.uint32(18).string(message.newSlug);
513
+ }
514
+ if (message.name !== "") {
515
+ writer.uint32(26).string(message.name);
516
+ }
517
+ if (message.description !== "") {
518
+ writer.uint32(34).string(message.description);
519
+ }
520
+ if (message.primaryColor !== "") {
521
+ writer.uint32(42).string(message.primaryColor);
522
+ }
523
+ if (message.timezone !== "") {
524
+ writer.uint32(50).string(message.timezone);
525
+ }
526
+ if (message.location !== "") {
527
+ writer.uint32(58).string(message.location);
528
+ }
529
+ return writer;
530
+ },
531
+ decode(input, length) {
532
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
533
+ const end = length === undefined ? reader.len : reader.pos + length;
534
+ const message = createBaseUpdateOrganizationRequest();
535
+ while (reader.pos < end) {
536
+ const tag = reader.uint32();
537
+ switch (tag >>> 3) {
538
+ case 1: {
539
+ if (tag !== 10) {
540
+ break;
541
+ }
542
+ message.slug = reader.string();
543
+ continue;
544
+ }
545
+ case 2: {
546
+ if (tag !== 18) {
547
+ break;
548
+ }
549
+ message.newSlug = reader.string();
550
+ continue;
551
+ }
552
+ case 3: {
553
+ if (tag !== 26) {
554
+ break;
555
+ }
556
+ message.name = reader.string();
557
+ continue;
558
+ }
559
+ case 4: {
560
+ if (tag !== 34) {
561
+ break;
562
+ }
563
+ message.description = reader.string();
564
+ continue;
565
+ }
566
+ case 5: {
567
+ if (tag !== 42) {
568
+ break;
569
+ }
570
+ message.primaryColor = reader.string();
571
+ continue;
572
+ }
573
+ case 6: {
574
+ if (tag !== 50) {
575
+ break;
576
+ }
577
+ message.timezone = reader.string();
578
+ continue;
579
+ }
580
+ case 7: {
581
+ if (tag !== 58) {
582
+ break;
583
+ }
584
+ message.location = reader.string();
585
+ continue;
586
+ }
587
+ }
588
+ if ((tag & 7) === 4 || tag === 0) {
589
+ break;
590
+ }
591
+ reader.skip(tag & 7);
592
+ }
593
+ return message;
594
+ },
595
+ fromJSON(object) {
596
+ return {
597
+ slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
598
+ newSlug: isSet(object.newSlug)
599
+ ? globalThis.String(object.newSlug)
600
+ : isSet(object.new_slug)
601
+ ? globalThis.String(object.new_slug)
602
+ : "",
603
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
604
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
605
+ primaryColor: isSet(object.primaryColor)
606
+ ? globalThis.String(object.primaryColor)
607
+ : isSet(object.primary_color)
608
+ ? globalThis.String(object.primary_color)
609
+ : "",
610
+ timezone: isSet(object.timezone) ? globalThis.String(object.timezone) : "",
611
+ location: isSet(object.location) ? globalThis.String(object.location) : "",
612
+ };
613
+ },
614
+ toJSON(message) {
615
+ const obj = {};
616
+ if (message.slug !== "") {
617
+ obj.slug = message.slug;
618
+ }
619
+ if (message.newSlug !== "") {
620
+ obj.newSlug = message.newSlug;
621
+ }
622
+ if (message.name !== "") {
623
+ obj.name = message.name;
624
+ }
625
+ if (message.description !== "") {
626
+ obj.description = message.description;
627
+ }
628
+ if (message.primaryColor !== "") {
629
+ obj.primaryColor = message.primaryColor;
630
+ }
631
+ if (message.timezone !== "") {
632
+ obj.timezone = message.timezone;
633
+ }
634
+ if (message.location !== "") {
635
+ obj.location = message.location;
636
+ }
637
+ return obj;
638
+ },
639
+ create(base) {
640
+ return exports.UpdateOrganizationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
641
+ },
642
+ fromPartial(object) {
643
+ var _a, _b, _c, _d, _e, _f, _g;
644
+ const message = createBaseUpdateOrganizationRequest();
645
+ message.slug = (_a = object.slug) !== null && _a !== void 0 ? _a : "";
646
+ message.newSlug = (_b = object.newSlug) !== null && _b !== void 0 ? _b : "";
647
+ message.name = (_c = object.name) !== null && _c !== void 0 ? _c : "";
648
+ message.description = (_d = object.description) !== null && _d !== void 0 ? _d : "";
649
+ message.primaryColor = (_e = object.primaryColor) !== null && _e !== void 0 ? _e : "";
650
+ message.timezone = (_f = object.timezone) !== null && _f !== void 0 ? _f : "";
651
+ message.location = (_g = object.location) !== null && _g !== void 0 ? _g : "";
652
+ return message;
653
+ },
654
+ };
655
+ function createBaseUpdateOrganizationResponse() {
656
+ return { organization: undefined };
657
+ }
658
+ exports.UpdateOrganizationResponse = {
659
+ encode(message, writer = new wire_1.BinaryWriter()) {
660
+ if (message.organization !== undefined) {
661
+ organization_pb_1.Organization.encode(message.organization, writer.uint32(10).fork()).join();
662
+ }
663
+ return writer;
664
+ },
665
+ decode(input, length) {
666
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
667
+ const end = length === undefined ? reader.len : reader.pos + length;
668
+ const message = createBaseUpdateOrganizationResponse();
669
+ while (reader.pos < end) {
670
+ const tag = reader.uint32();
671
+ switch (tag >>> 3) {
672
+ case 1: {
673
+ if (tag !== 10) {
674
+ break;
675
+ }
676
+ message.organization = organization_pb_1.Organization.decode(reader, reader.uint32());
677
+ continue;
678
+ }
679
+ }
680
+ if ((tag & 7) === 4 || tag === 0) {
681
+ break;
682
+ }
683
+ reader.skip(tag & 7);
684
+ }
685
+ return message;
686
+ },
687
+ fromJSON(object) {
688
+ return { organization: isSet(object.organization) ? organization_pb_1.Organization.fromJSON(object.organization) : undefined };
689
+ },
690
+ toJSON(message) {
691
+ const obj = {};
692
+ if (message.organization !== undefined) {
693
+ obj.organization = organization_pb_1.Organization.toJSON(message.organization);
694
+ }
695
+ return obj;
696
+ },
697
+ create(base) {
698
+ return exports.UpdateOrganizationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
699
+ },
700
+ fromPartial(object) {
701
+ const message = createBaseUpdateOrganizationResponse();
702
+ message.organization = (object.organization !== undefined && object.organization !== null)
703
+ ? organization_pb_1.Organization.fromPartial(object.organization)
704
+ : undefined;
705
+ return message;
706
+ },
707
+ };
708
+ function createBaseDeleteOrganizationRequest() {
709
+ return { slug: "" };
710
+ }
711
+ exports.DeleteOrganizationRequest = {
712
+ encode(message, writer = new wire_1.BinaryWriter()) {
713
+ if (message.slug !== "") {
714
+ writer.uint32(10).string(message.slug);
715
+ }
716
+ return writer;
717
+ },
718
+ decode(input, length) {
719
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
720
+ const end = length === undefined ? reader.len : reader.pos + length;
721
+ const message = createBaseDeleteOrganizationRequest();
722
+ while (reader.pos < end) {
723
+ const tag = reader.uint32();
724
+ switch (tag >>> 3) {
725
+ case 1: {
726
+ if (tag !== 10) {
727
+ break;
728
+ }
729
+ message.slug = reader.string();
730
+ continue;
731
+ }
732
+ }
733
+ if ((tag & 7) === 4 || tag === 0) {
734
+ break;
735
+ }
736
+ reader.skip(tag & 7);
737
+ }
738
+ return message;
739
+ },
740
+ fromJSON(object) {
741
+ return { slug: isSet(object.slug) ? globalThis.String(object.slug) : "" };
742
+ },
743
+ toJSON(message) {
744
+ const obj = {};
745
+ if (message.slug !== "") {
746
+ obj.slug = message.slug;
747
+ }
748
+ return obj;
749
+ },
750
+ create(base) {
751
+ return exports.DeleteOrganizationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
752
+ },
753
+ fromPartial(object) {
754
+ var _a;
755
+ const message = createBaseDeleteOrganizationRequest();
756
+ message.slug = (_a = object.slug) !== null && _a !== void 0 ? _a : "";
757
+ return message;
758
+ },
759
+ };
760
+ function createBaseDeleteOrganizationResponse() {
761
+ return { deleted: false };
762
+ }
763
+ exports.DeleteOrganizationResponse = {
764
+ encode(message, writer = new wire_1.BinaryWriter()) {
765
+ if (message.deleted !== false) {
766
+ writer.uint32(8).bool(message.deleted);
767
+ }
768
+ return writer;
769
+ },
770
+ decode(input, length) {
771
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
772
+ const end = length === undefined ? reader.len : reader.pos + length;
773
+ const message = createBaseDeleteOrganizationResponse();
774
+ while (reader.pos < end) {
775
+ const tag = reader.uint32();
776
+ switch (tag >>> 3) {
777
+ case 1: {
778
+ if (tag !== 8) {
779
+ break;
780
+ }
781
+ message.deleted = reader.bool();
782
+ continue;
783
+ }
784
+ }
785
+ if ((tag & 7) === 4 || tag === 0) {
786
+ break;
787
+ }
788
+ reader.skip(tag & 7);
789
+ }
790
+ return message;
791
+ },
792
+ fromJSON(object) {
793
+ return { deleted: isSet(object.deleted) ? globalThis.Boolean(object.deleted) : false };
794
+ },
795
+ toJSON(message) {
796
+ const obj = {};
797
+ if (message.deleted !== false) {
798
+ obj.deleted = message.deleted;
799
+ }
800
+ return obj;
801
+ },
802
+ create(base) {
803
+ return exports.DeleteOrganizationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
804
+ },
805
+ fromPartial(object) {
806
+ var _a;
807
+ const message = createBaseDeleteOrganizationResponse();
808
+ message.deleted = (_a = object.deleted) !== null && _a !== void 0 ? _a : false;
809
+ return message;
810
+ },
811
+ };
812
+ exports.OrganizationServiceServiceName = "weaveapi.organization.v1.OrganizationService";
813
+ class OrganizationServiceClientImpl {
814
+ constructor(rpc, opts) {
815
+ this.service = (opts === null || opts === void 0 ? void 0 : opts.service) || exports.OrganizationServiceServiceName;
816
+ this.rpc = rpc;
817
+ this.ListOrganizations = this.ListOrganizations.bind(this);
818
+ this.CreateOrganization = this.CreateOrganization.bind(this);
819
+ this.GetOrganizationBySlug = this.GetOrganizationBySlug.bind(this);
820
+ this.GetOrganizationById = this.GetOrganizationById.bind(this);
821
+ this.UpdateOrganization = this.UpdateOrganization.bind(this);
822
+ this.DeleteOrganization = this.DeleteOrganization.bind(this);
823
+ }
824
+ ListOrganizations(request) {
825
+ const data = exports.ListOrganizationsRequest.encode(request).finish();
826
+ const promise = this.rpc.request(this.service, "ListOrganizations", data);
827
+ return promise.then((data) => exports.ListOrganizationsResponse.decode(new wire_1.BinaryReader(data)));
828
+ }
829
+ CreateOrganization(request) {
830
+ const data = exports.CreateOrganizationRequest.encode(request).finish();
831
+ const promise = this.rpc.request(this.service, "CreateOrganization", data);
832
+ return promise.then((data) => exports.CreateOrganizationResponse.decode(new wire_1.BinaryReader(data)));
833
+ }
834
+ GetOrganizationBySlug(request) {
835
+ const data = exports.GetOrganizationBySlugRequest.encode(request).finish();
836
+ const promise = this.rpc.request(this.service, "GetOrganizationBySlug", data);
837
+ return promise.then((data) => exports.GetOrganizationBySlugResponse.decode(new wire_1.BinaryReader(data)));
838
+ }
839
+ GetOrganizationById(request) {
840
+ const data = exports.GetOrganizationByIdRequest.encode(request).finish();
841
+ const promise = this.rpc.request(this.service, "GetOrganizationById", data);
842
+ return promise.then((data) => exports.GetOrganizationByIdResponse.decode(new wire_1.BinaryReader(data)));
843
+ }
844
+ UpdateOrganization(request) {
845
+ const data = exports.UpdateOrganizationRequest.encode(request).finish();
846
+ const promise = this.rpc.request(this.service, "UpdateOrganization", data);
847
+ return promise.then((data) => exports.UpdateOrganizationResponse.decode(new wire_1.BinaryReader(data)));
848
+ }
849
+ DeleteOrganization(request) {
850
+ const data = exports.DeleteOrganizationRequest.encode(request).finish();
851
+ const promise = this.rpc.request(this.service, "DeleteOrganization", data);
852
+ return promise.then((data) => exports.DeleteOrganizationResponse.decode(new wire_1.BinaryReader(data)));
853
+ }
854
+ }
855
+ exports.OrganizationServiceClientImpl = OrganizationServiceClientImpl;
856
+ exports.OrganizationServiceDefinition = {
857
+ name: "OrganizationService",
858
+ fullName: "weaveapi.organization.v1.OrganizationService",
859
+ methods: {
860
+ listOrganizations: {
861
+ name: "ListOrganizations",
862
+ requestType: exports.ListOrganizationsRequest,
863
+ requestStream: false,
864
+ responseType: exports.ListOrganizationsResponse,
865
+ responseStream: false,
866
+ options: {
867
+ _unknownFields: {
868
+ 578365826: [
869
+ new Uint8Array([
870
+ 19,
871
+ 18,
872
+ 17,
873
+ 47,
874
+ 118,
875
+ 49,
876
+ 47,
877
+ 111,
878
+ 114,
879
+ 103,
880
+ 97,
881
+ 110,
882
+ 105,
883
+ 122,
884
+ 97,
885
+ 116,
886
+ 105,
887
+ 111,
888
+ 110,
889
+ 115,
890
+ ]),
891
+ ],
892
+ },
893
+ },
894
+ },
895
+ createOrganization: {
896
+ name: "CreateOrganization",
897
+ requestType: exports.CreateOrganizationRequest,
898
+ requestStream: false,
899
+ responseType: exports.CreateOrganizationResponse,
900
+ responseStream: false,
901
+ options: {
902
+ _unknownFields: {
903
+ 578365826: [
904
+ new Uint8Array([
905
+ 22,
906
+ 58,
907
+ 1,
908
+ 42,
909
+ 34,
910
+ 17,
911
+ 47,
912
+ 118,
913
+ 49,
914
+ 47,
915
+ 111,
916
+ 114,
917
+ 103,
918
+ 97,
919
+ 110,
920
+ 105,
921
+ 122,
922
+ 97,
923
+ 116,
924
+ 105,
925
+ 111,
926
+ 110,
927
+ 115,
928
+ ]),
929
+ ],
930
+ },
931
+ },
932
+ },
933
+ getOrganizationBySlug: {
934
+ name: "GetOrganizationBySlug",
935
+ requestType: exports.GetOrganizationBySlugRequest,
936
+ requestStream: false,
937
+ responseType: exports.GetOrganizationBySlugResponse,
938
+ responseStream: false,
939
+ options: {
940
+ _unknownFields: {
941
+ 578365826: [
942
+ new Uint8Array([
943
+ 26,
944
+ 18,
945
+ 24,
946
+ 47,
947
+ 118,
948
+ 49,
949
+ 47,
950
+ 111,
951
+ 114,
952
+ 103,
953
+ 97,
954
+ 110,
955
+ 105,
956
+ 122,
957
+ 97,
958
+ 116,
959
+ 105,
960
+ 111,
961
+ 110,
962
+ 115,
963
+ 47,
964
+ 123,
965
+ 115,
966
+ 108,
967
+ 117,
968
+ 103,
969
+ 125,
970
+ ]),
971
+ ],
972
+ },
973
+ },
974
+ },
975
+ getOrganizationById: {
976
+ name: "GetOrganizationById",
977
+ requestType: exports.GetOrganizationByIdRequest,
978
+ requestStream: false,
979
+ responseType: exports.GetOrganizationByIdResponse,
980
+ responseStream: false,
981
+ options: {
982
+ _unknownFields: {
983
+ 578365826: [
984
+ new Uint8Array([
985
+ 30,
986
+ 18,
987
+ 28,
988
+ 47,
989
+ 118,
990
+ 49,
991
+ 47,
992
+ 111,
993
+ 114,
994
+ 103,
995
+ 97,
996
+ 110,
997
+ 105,
998
+ 122,
999
+ 97,
1000
+ 116,
1001
+ 105,
1002
+ 111,
1003
+ 110,
1004
+ 115,
1005
+ 47,
1006
+ 98,
1007
+ 121,
1008
+ 45,
1009
+ 105,
1010
+ 100,
1011
+ 47,
1012
+ 123,
1013
+ 105,
1014
+ 100,
1015
+ 125,
1016
+ ]),
1017
+ ],
1018
+ },
1019
+ },
1020
+ },
1021
+ updateOrganization: {
1022
+ name: "UpdateOrganization",
1023
+ requestType: exports.UpdateOrganizationRequest,
1024
+ requestStream: false,
1025
+ responseType: exports.UpdateOrganizationResponse,
1026
+ responseStream: false,
1027
+ options: {
1028
+ _unknownFields: {
1029
+ 578365826: [
1030
+ new Uint8Array([
1031
+ 29,
1032
+ 58,
1033
+ 1,
1034
+ 42,
1035
+ 50,
1036
+ 24,
1037
+ 47,
1038
+ 118,
1039
+ 49,
1040
+ 47,
1041
+ 111,
1042
+ 114,
1043
+ 103,
1044
+ 97,
1045
+ 110,
1046
+ 105,
1047
+ 122,
1048
+ 97,
1049
+ 116,
1050
+ 105,
1051
+ 111,
1052
+ 110,
1053
+ 115,
1054
+ 47,
1055
+ 123,
1056
+ 115,
1057
+ 108,
1058
+ 117,
1059
+ 103,
1060
+ 125,
1061
+ ]),
1062
+ ],
1063
+ },
1064
+ },
1065
+ },
1066
+ deleteOrganization: {
1067
+ name: "DeleteOrganization",
1068
+ requestType: exports.DeleteOrganizationRequest,
1069
+ requestStream: false,
1070
+ responseType: exports.DeleteOrganizationResponse,
1071
+ responseStream: false,
1072
+ options: {
1073
+ _unknownFields: {
1074
+ 578365826: [
1075
+ new Uint8Array([
1076
+ 26,
1077
+ 42,
1078
+ 24,
1079
+ 47,
1080
+ 118,
1081
+ 49,
1082
+ 47,
1083
+ 111,
1084
+ 114,
1085
+ 103,
1086
+ 97,
1087
+ 110,
1088
+ 105,
1089
+ 122,
1090
+ 97,
1091
+ 116,
1092
+ 105,
1093
+ 111,
1094
+ 110,
1095
+ 115,
1096
+ 47,
1097
+ 123,
1098
+ 115,
1099
+ 108,
1100
+ 117,
1101
+ 103,
1102
+ 125,
1103
+ ]),
1104
+ ],
1105
+ },
1106
+ },
1107
+ },
1108
+ },
1109
+ };
1110
+ function isSet(value) {
1111
+ return value !== null && value !== undefined;
1112
+ }