weave-typescript 0.51.2 → 0.52.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 (185) hide show
  1. package/dist/google/protobuf/duration.pb.d.ts +99 -0
  2. package/dist/google/protobuf/duration.pb.js +93 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +2 -1
  5. package/dist/weave/authz/v1/index.d.ts +1 -0
  6. package/dist/weave/authz/v1/index.js +38 -0
  7. package/dist/weave/authz/v1/options.pb.d.ts +52 -0
  8. package/dist/weave/authz/v1/options.pb.js +403 -0
  9. package/dist/weave/filter/v1/index.d.ts +1 -0
  10. package/dist/weave/filter/v1/index.js +38 -0
  11. package/dist/{weaveapi/atc/v1/message.pb.d.ts → weave/filter/v1/options.pb.d.ts} +33 -21
  12. package/dist/weave/filter/v1/options.pb.js +417 -0
  13. package/dist/weave/index.d.ts +2 -0
  14. package/dist/weave/index.js +39 -0
  15. package/dist/weaveapi/agent/v1/agent.pb.d.ts +137 -188
  16. package/dist/weaveapi/agent/v1/agent.pb.js +891 -2151
  17. package/dist/weaveapi/agent/v1/index.d.ts +1 -1
  18. package/dist/weaveapi/agent/v1/index.js +2 -2
  19. package/dist/weaveapi/agent/v1/run.pb.d.ts +289 -0
  20. package/dist/weaveapi/agent/v1/run.pb.js +2763 -0
  21. package/dist/weaveapi/auth/v1/auth.pb.d.ts +67 -14
  22. package/dist/weaveapi/auth/v1/auth.pb.js +829 -89
  23. package/dist/weaveapi/auth/v1/index.d.ts +4 -1
  24. package/dist/weaveapi/auth/v1/index.js +5 -2
  25. package/dist/weaveapi/auth/v1/{service.pb.d.ts → organization_admin.pb.d.ts} +39 -530
  26. package/dist/weaveapi/auth/v1/{service.pb.js → organization_admin.pb.js} +2978 -5812
  27. package/dist/weaveapi/auth/v1/personal_access_token.pb.d.ts +114 -0
  28. package/dist/weaveapi/auth/v1/personal_access_token.pb.js +750 -0
  29. package/dist/weaveapi/auth/v1/profile.pb.d.ts +161 -0
  30. package/dist/weaveapi/auth/v1/profile.pb.js +1007 -0
  31. package/dist/weaveapi/auth/v1/session.pb.d.ts +460 -0
  32. package/dist/weaveapi/auth/v1/session.pb.js +3544 -0
  33. package/dist/weaveapi/chat/v1/chat.pb.d.ts +377 -149
  34. package/dist/weaveapi/chat/v1/chat.pb.js +3492 -1614
  35. package/dist/weaveapi/chat/v1/index.d.ts +0 -1
  36. package/dist/weaveapi/chat/v1/index.js +1 -2
  37. package/dist/weaveapi/consolidation/v1/consolidation.pb.d.ts +95 -0
  38. package/dist/weaveapi/consolidation/v1/consolidation.pb.js +770 -1
  39. package/dist/weaveapi/consolidation/v1/index.d.ts +0 -1
  40. package/dist/weaveapi/consolidation/v1/index.js +1 -2
  41. package/dist/weaveapi/content/v1/content.pb.d.ts +63 -0
  42. package/dist/weaveapi/content/v1/content.pb.js +470 -0
  43. package/dist/weaveapi/content/v1/index.d.ts +1 -0
  44. package/dist/weaveapi/content/v1/index.js +38 -0
  45. package/dist/weaveapi/gateway/v1/gateway.pb.d.ts +247 -523
  46. package/dist/weaveapi/gateway/v1/gateway.pb.js +1648 -5783
  47. package/dist/weaveapi/gateway/v1/index.d.ts +0 -1
  48. package/dist/weaveapi/gateway/v1/index.js +1 -2
  49. package/dist/weaveapi/index.d.ts +5 -5
  50. package/dist/weaveapi/index.js +6 -6
  51. package/dist/weaveapi/inference/v1/generate.pb.d.ts +120 -0
  52. package/dist/weaveapi/inference/v1/generate.pb.js +1159 -0
  53. package/dist/weaveapi/inference/v1/index.d.ts +4 -0
  54. package/dist/weaveapi/{provider → inference}/v1/index.js +4 -2
  55. package/dist/weaveapi/{model → inference}/v1/model.pb.d.ts +52 -15
  56. package/dist/weaveapi/{model → inference}/v1/model.pb.js +529 -116
  57. package/dist/weaveapi/{model/v1/service.pb.d.ts → inference/v1/model_route.pb.d.ts} +182 -110
  58. package/dist/weaveapi/{model/v1/service.pb.js → inference/v1/model_route.pb.js} +2197 -1061
  59. package/dist/weaveapi/inference/v1/provider.pb.d.ts +264 -0
  60. package/dist/weaveapi/inference/v1/provider.pb.js +2590 -0
  61. package/dist/weaveapi/ingestion/v1/index.d.ts +0 -2
  62. package/dist/weaveapi/ingestion/v1/index.js +1 -3
  63. package/dist/weaveapi/ingestion/v1/ingestion.pb.d.ts +543 -0
  64. package/dist/weaveapi/ingestion/v1/ingestion.pb.js +5550 -16
  65. package/dist/weaveapi/initialization/v1/index.d.ts +1 -0
  66. package/dist/weaveapi/initialization/v1/index.js +38 -0
  67. package/dist/weaveapi/initialization/v1/initialization.pb.d.ts +99 -0
  68. package/dist/weaveapi/initialization/v1/initialization.pb.js +510 -0
  69. package/dist/weaveapi/organization/v1/index.d.ts +0 -1
  70. package/dist/weaveapi/organization/v1/index.js +1 -2
  71. package/dist/weaveapi/organization/v1/organization.pb.d.ts +241 -0
  72. package/dist/weaveapi/organization/v1/organization.pb.js +1838 -1
  73. package/dist/weaveapi/reporting/index.d.ts +1 -0
  74. package/dist/weaveapi/reporting/index.js +38 -0
  75. package/dist/weaveapi/{task → reporting}/v1/index.d.ts +1 -1
  76. package/dist/weaveapi/{model → reporting}/v1/index.js +2 -2
  77. package/dist/weaveapi/reporting/v1/service.pb.d.ts +38 -0
  78. package/dist/weaveapi/reporting/v1/service.pb.js +167 -0
  79. package/dist/weaveapi/reporting/v1/usage.pb.d.ts +150 -0
  80. package/dist/weaveapi/reporting/v1/usage.pb.js +1837 -0
  81. package/dist/weaveapi/retrieval/v1/index.d.ts +0 -1
  82. package/dist/weaveapi/retrieval/v1/index.js +1 -2
  83. package/dist/weaveapi/retrieval/v1/retrieval.pb.d.ts +96 -2
  84. package/dist/weaveapi/retrieval/v1/retrieval.pb.js +690 -10
  85. package/dist/weaveapi/tool/index.d.ts +1 -0
  86. package/dist/weaveapi/tool/index.js +38 -0
  87. package/dist/weaveapi/tool/v1/index.d.ts +1 -0
  88. package/dist/weaveapi/tool/v1/index.js +38 -0
  89. package/dist/weaveapi/tool/v1/tool.pb.d.ts +370 -0
  90. package/dist/weaveapi/tool/v1/tool.pb.js +2717 -0
  91. package/dist/weaveapi/workflow/v1/index.d.ts +1 -1
  92. package/dist/weaveapi/workflow/v1/index.js +2 -2
  93. package/dist/weaveapi/workflow/v1/run.pb.d.ts +244 -0
  94. package/dist/weaveapi/workflow/v1/run.pb.js +2084 -0
  95. package/dist/weaveapi/workflow/v1/workflow.pb.d.ts +122 -275
  96. package/dist/weaveapi/workflow/v1/workflow.pb.js +790 -3261
  97. package/dist/weavesql/weavedb/agent_sql.d.ts +173 -477
  98. package/dist/weavesql/weavedb/agent_sql.js +281 -758
  99. package/dist/weavesql/weavedb/authorization_outbox_sql.d.ts +261 -0
  100. package/dist/weavesql/weavedb/authorization_outbox_sql.js +445 -0
  101. package/dist/weavesql/weavedb/chat_sql.d.ts +103 -345
  102. package/dist/weavesql/weavedb/chat_sql.js +312 -597
  103. package/dist/weavesql/weavedb/document_consolidation_sql.d.ts +217 -0
  104. package/dist/weavesql/weavedb/document_consolidation_sql.js +486 -0
  105. package/dist/weavesql/weavedb/document_ingestion_sql.d.ts +1433 -0
  106. package/dist/weavesql/weavedb/document_ingestion_sql.js +3488 -0
  107. package/dist/weavesql/weavedb/document_retrieval_sql.d.ts +314 -0
  108. package/dist/weavesql/weavedb/document_retrieval_sql.js +965 -0
  109. package/dist/weavesql/weavedb/document_table_sql.d.ts +6 -6
  110. package/dist/weavesql/weavedb/document_table_sql.js +12 -12
  111. package/dist/weavesql/weavedb/identity_sql.d.ts +1014 -0
  112. package/dist/weavesql/weavedb/identity_sql.js +1811 -0
  113. package/dist/weavesql/weavedb/inference_model_route_sql.d.ts +161 -0
  114. package/dist/weavesql/weavedb/inference_model_route_sql.js +408 -0
  115. package/dist/weavesql/weavedb/inference_provider_sql.d.ts +125 -0
  116. package/dist/weavesql/weavedb/inference_provider_sql.js +228 -0
  117. package/dist/weavesql/weavedb/initialization_sql.d.ts +15 -0
  118. package/dist/weavesql/weavedb/initialization_sql.js +33 -0
  119. package/dist/weavesql/weavedb/model_catalog_sql.d.ts +6 -6
  120. package/dist/weavesql/weavedb/model_catalog_sql.js +6 -6
  121. package/dist/weavesql/weavedb/organization_sql.d.ts +22 -102
  122. package/dist/weavesql/weavedb/organization_sql.js +54 -262
  123. package/dist/weavesql/weavedb/tool_sql.d.ts +209 -0
  124. package/dist/weavesql/weavedb/tool_sql.js +407 -0
  125. package/dist/weavesql/weavedb/usage_sql.d.ts +356 -0
  126. package/dist/weavesql/weavedb/usage_sql.js +568 -0
  127. package/dist/weavesql/weavedb/workflow_sql.d.ts +159 -546
  128. package/dist/weavesql/weavedb/workflow_sql.js +281 -909
  129. package/package.json +2 -2
  130. package/dist/weaveapi/agent/v1/service.pb.d.ts +0 -397
  131. package/dist/weaveapi/agent/v1/service.pb.js +0 -3152
  132. package/dist/weaveapi/atc/v1/event.pb.d.ts +0 -134
  133. package/dist/weaveapi/atc/v1/event.pb.js +0 -1124
  134. package/dist/weaveapi/atc/v1/index.d.ts +0 -5
  135. package/dist/weaveapi/atc/v1/index.js +0 -42
  136. package/dist/weaveapi/atc/v1/message.pb.js +0 -287
  137. package/dist/weaveapi/atc/v1/process.pb.d.ts +0 -91
  138. package/dist/weaveapi/atc/v1/process.pb.js +0 -658
  139. package/dist/weaveapi/atc/v1/run.pb.d.ts +0 -71
  140. package/dist/weaveapi/atc/v1/run.pb.js +0 -525
  141. package/dist/weaveapi/atc/v1/service.pb.d.ts +0 -472
  142. package/dist/weaveapi/atc/v1/service.pb.js +0 -3093
  143. package/dist/weaveapi/chat/v1/service.pb.d.ts +0 -345
  144. package/dist/weaveapi/chat/v1/service.pb.js +0 -2545
  145. package/dist/weaveapi/consolidation/v1/service.pb.d.ts +0 -93
  146. package/dist/weaveapi/consolidation/v1/service.pb.js +0 -427
  147. package/dist/weaveapi/gateway/v1/service.pb.d.ts +0 -235
  148. package/dist/weaveapi/gateway/v1/service.pb.js +0 -651
  149. package/dist/weaveapi/ingestion/v1/service.pb.d.ts +0 -420
  150. package/dist/weaveapi/ingestion/v1/service.pb.js +0 -2311
  151. package/dist/weaveapi/ingestion/v1/table.pb.d.ts +0 -121
  152. package/dist/weaveapi/ingestion/v1/table.pb.js +0 -1478
  153. package/dist/weaveapi/model/v1/index.d.ts +0 -2
  154. package/dist/weaveapi/organization/v1/service.pb.d.ts +0 -261
  155. package/dist/weaveapi/organization/v1/service.pb.js +0 -1561
  156. package/dist/weaveapi/project/v1/index.d.ts +0 -2
  157. package/dist/weaveapi/project/v1/index.js +0 -39
  158. package/dist/weaveapi/project/v1/project.pb.d.ts +0 -105
  159. package/dist/weaveapi/project/v1/project.pb.js +0 -1004
  160. package/dist/weaveapi/project/v1/service.pb.d.ts +0 -247
  161. package/dist/weaveapi/project/v1/service.pb.js +0 -1994
  162. package/dist/weaveapi/provider/v1/index.d.ts +0 -2
  163. package/dist/weaveapi/provider/v1/provider.pb.d.ts +0 -137
  164. package/dist/weaveapi/provider/v1/provider.pb.js +0 -1000
  165. package/dist/weaveapi/provider/v1/service.pb.d.ts +0 -223
  166. package/dist/weaveapi/provider/v1/service.pb.js +0 -1888
  167. package/dist/weaveapi/retrieval/v1/service.pb.d.ts +0 -93
  168. package/dist/weaveapi/retrieval/v1/service.pb.js +0 -385
  169. package/dist/weaveapi/task/v1/index.js +0 -39
  170. package/dist/weaveapi/task/v1/service.pb.d.ts +0 -172
  171. package/dist/weaveapi/task/v1/service.pb.js +0 -1436
  172. package/dist/weaveapi/task/v1/task.pb.d.ts +0 -85
  173. package/dist/weaveapi/task/v1/task.pb.js +0 -802
  174. package/dist/weaveapi/workflow/v1/service.pb.d.ts +0 -392
  175. package/dist/weaveapi/workflow/v1/service.pb.js +0 -3146
  176. /package/dist/{weaveapi/atc → weave/authz}/index.d.ts +0 -0
  177. /package/dist/{weaveapi/atc → weave/authz}/index.js +0 -0
  178. /package/dist/{weaveapi/model → weave/filter}/index.d.ts +0 -0
  179. /package/dist/{weaveapi/model → weave/filter}/index.js +0 -0
  180. /package/dist/weaveapi/{project → content}/index.d.ts +0 -0
  181. /package/dist/weaveapi/{project → content}/index.js +0 -0
  182. /package/dist/weaveapi/{provider → inference}/index.d.ts +0 -0
  183. /package/dist/weaveapi/{provider → inference}/index.js +0 -0
  184. /package/dist/weaveapi/{task → initialization}/index.d.ts +0 -0
  185. /package/dist/weaveapi/{task → initialization}/index.js +0 -0
@@ -1,1561 +0,0 @@
1
- "use strict";
2
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
- // versions:
4
- // protoc-gen-ts_proto v2.11.8
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.DeleteOrganizationLogoResponse = exports.DeleteOrganizationLogoRequest = exports.PutOrganizationLogoResponse = exports.PutOrganizationLogoRequest = exports.GetOrganizationLogoResponse = exports.GetOrganizationLogoRequest = 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 {
109
- slug: "",
110
- name: "",
111
- description: "",
112
- primaryColor: "",
113
- timezone: "",
114
- location: "",
115
- logo: new Uint8Array(0),
116
- logoContentType: "",
117
- };
118
- }
119
- exports.CreateOrganizationRequest = {
120
- encode(message, writer = new wire_1.BinaryWriter()) {
121
- if (message.slug !== "") {
122
- writer.uint32(10).string(message.slug);
123
- }
124
- if (message.name !== "") {
125
- writer.uint32(18).string(message.name);
126
- }
127
- if (message.description !== "") {
128
- writer.uint32(26).string(message.description);
129
- }
130
- if (message.primaryColor !== "") {
131
- writer.uint32(34).string(message.primaryColor);
132
- }
133
- if (message.timezone !== "") {
134
- writer.uint32(42).string(message.timezone);
135
- }
136
- if (message.location !== "") {
137
- writer.uint32(50).string(message.location);
138
- }
139
- if (message.logo.length !== 0) {
140
- writer.uint32(58).bytes(message.logo);
141
- }
142
- if (message.logoContentType !== "") {
143
- writer.uint32(66).string(message.logoContentType);
144
- }
145
- return writer;
146
- },
147
- decode(input, length) {
148
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
149
- const end = length === undefined ? reader.len : reader.pos + length;
150
- const message = createBaseCreateOrganizationRequest();
151
- while (reader.pos < end) {
152
- const tag = reader.uint32();
153
- switch (tag >>> 3) {
154
- case 1: {
155
- if (tag !== 10) {
156
- break;
157
- }
158
- message.slug = reader.string();
159
- continue;
160
- }
161
- case 2: {
162
- if (tag !== 18) {
163
- break;
164
- }
165
- message.name = reader.string();
166
- continue;
167
- }
168
- case 3: {
169
- if (tag !== 26) {
170
- break;
171
- }
172
- message.description = reader.string();
173
- continue;
174
- }
175
- case 4: {
176
- if (tag !== 34) {
177
- break;
178
- }
179
- message.primaryColor = reader.string();
180
- continue;
181
- }
182
- case 5: {
183
- if (tag !== 42) {
184
- break;
185
- }
186
- message.timezone = reader.string();
187
- continue;
188
- }
189
- case 6: {
190
- if (tag !== 50) {
191
- break;
192
- }
193
- message.location = reader.string();
194
- continue;
195
- }
196
- case 7: {
197
- if (tag !== 58) {
198
- break;
199
- }
200
- message.logo = reader.bytes();
201
- continue;
202
- }
203
- case 8: {
204
- if (tag !== 66) {
205
- break;
206
- }
207
- message.logoContentType = reader.string();
208
- continue;
209
- }
210
- }
211
- if ((tag & 7) === 4 || tag === 0) {
212
- break;
213
- }
214
- reader.skip(tag & 7);
215
- }
216
- return message;
217
- },
218
- fromJSON(object) {
219
- return {
220
- slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
221
- name: isSet(object.name) ? globalThis.String(object.name) : "",
222
- description: isSet(object.description) ? globalThis.String(object.description) : "",
223
- primaryColor: isSet(object.primaryColor)
224
- ? globalThis.String(object.primaryColor)
225
- : isSet(object.primary_color)
226
- ? globalThis.String(object.primary_color)
227
- : "",
228
- timezone: isSet(object.timezone) ? globalThis.String(object.timezone) : "",
229
- location: isSet(object.location) ? globalThis.String(object.location) : "",
230
- logo: isSet(object.logo) ? bytesFromBase64(object.logo) : new Uint8Array(0),
231
- logoContentType: isSet(object.logoContentType)
232
- ? globalThis.String(object.logoContentType)
233
- : isSet(object.logo_content_type)
234
- ? globalThis.String(object.logo_content_type)
235
- : "",
236
- };
237
- },
238
- toJSON(message) {
239
- const obj = {};
240
- if (message.slug !== "") {
241
- obj.slug = message.slug;
242
- }
243
- if (message.name !== "") {
244
- obj.name = message.name;
245
- }
246
- if (message.description !== "") {
247
- obj.description = message.description;
248
- }
249
- if (message.primaryColor !== "") {
250
- obj.primaryColor = message.primaryColor;
251
- }
252
- if (message.timezone !== "") {
253
- obj.timezone = message.timezone;
254
- }
255
- if (message.location !== "") {
256
- obj.location = message.location;
257
- }
258
- if (message.logo.length !== 0) {
259
- obj.logo = base64FromBytes(message.logo);
260
- }
261
- if (message.logoContentType !== "") {
262
- obj.logoContentType = message.logoContentType;
263
- }
264
- return obj;
265
- },
266
- create(base) {
267
- return exports.CreateOrganizationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
268
- },
269
- fromPartial(object) {
270
- var _a, _b, _c, _d, _e, _f, _g, _h;
271
- const message = createBaseCreateOrganizationRequest();
272
- message.slug = (_a = object.slug) !== null && _a !== void 0 ? _a : "";
273
- message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
274
- message.description = (_c = object.description) !== null && _c !== void 0 ? _c : "";
275
- message.primaryColor = (_d = object.primaryColor) !== null && _d !== void 0 ? _d : "";
276
- message.timezone = (_e = object.timezone) !== null && _e !== void 0 ? _e : "";
277
- message.location = (_f = object.location) !== null && _f !== void 0 ? _f : "";
278
- message.logo = (_g = object.logo) !== null && _g !== void 0 ? _g : new Uint8Array(0);
279
- message.logoContentType = (_h = object.logoContentType) !== null && _h !== void 0 ? _h : "";
280
- return message;
281
- },
282
- };
283
- function createBaseCreateOrganizationResponse() {
284
- return { organization: undefined };
285
- }
286
- exports.CreateOrganizationResponse = {
287
- encode(message, writer = new wire_1.BinaryWriter()) {
288
- if (message.organization !== undefined) {
289
- organization_pb_1.Organization.encode(message.organization, writer.uint32(10).fork()).join();
290
- }
291
- return writer;
292
- },
293
- decode(input, length) {
294
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
295
- const end = length === undefined ? reader.len : reader.pos + length;
296
- const message = createBaseCreateOrganizationResponse();
297
- while (reader.pos < end) {
298
- const tag = reader.uint32();
299
- switch (tag >>> 3) {
300
- case 1: {
301
- if (tag !== 10) {
302
- break;
303
- }
304
- message.organization = organization_pb_1.Organization.decode(reader, reader.uint32());
305
- continue;
306
- }
307
- }
308
- if ((tag & 7) === 4 || tag === 0) {
309
- break;
310
- }
311
- reader.skip(tag & 7);
312
- }
313
- return message;
314
- },
315
- fromJSON(object) {
316
- return { organization: isSet(object.organization) ? organization_pb_1.Organization.fromJSON(object.organization) : undefined };
317
- },
318
- toJSON(message) {
319
- const obj = {};
320
- if (message.organization !== undefined) {
321
- obj.organization = organization_pb_1.Organization.toJSON(message.organization);
322
- }
323
- return obj;
324
- },
325
- create(base) {
326
- return exports.CreateOrganizationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
327
- },
328
- fromPartial(object) {
329
- const message = createBaseCreateOrganizationResponse();
330
- message.organization = (object.organization !== undefined && object.organization !== null)
331
- ? organization_pb_1.Organization.fromPartial(object.organization)
332
- : undefined;
333
- return message;
334
- },
335
- };
336
- function createBaseGetOrganizationBySlugRequest() {
337
- return { slug: "" };
338
- }
339
- exports.GetOrganizationBySlugRequest = {
340
- encode(message, writer = new wire_1.BinaryWriter()) {
341
- if (message.slug !== "") {
342
- writer.uint32(10).string(message.slug);
343
- }
344
- return writer;
345
- },
346
- decode(input, length) {
347
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
348
- const end = length === undefined ? reader.len : reader.pos + length;
349
- const message = createBaseGetOrganizationBySlugRequest();
350
- while (reader.pos < end) {
351
- const tag = reader.uint32();
352
- switch (tag >>> 3) {
353
- case 1: {
354
- if (tag !== 10) {
355
- break;
356
- }
357
- message.slug = reader.string();
358
- continue;
359
- }
360
- }
361
- if ((tag & 7) === 4 || tag === 0) {
362
- break;
363
- }
364
- reader.skip(tag & 7);
365
- }
366
- return message;
367
- },
368
- fromJSON(object) {
369
- return { slug: isSet(object.slug) ? globalThis.String(object.slug) : "" };
370
- },
371
- toJSON(message) {
372
- const obj = {};
373
- if (message.slug !== "") {
374
- obj.slug = message.slug;
375
- }
376
- return obj;
377
- },
378
- create(base) {
379
- return exports.GetOrganizationBySlugRequest.fromPartial(base !== null && base !== void 0 ? base : {});
380
- },
381
- fromPartial(object) {
382
- var _a;
383
- const message = createBaseGetOrganizationBySlugRequest();
384
- message.slug = (_a = object.slug) !== null && _a !== void 0 ? _a : "";
385
- return message;
386
- },
387
- };
388
- function createBaseGetOrganizationBySlugResponse() {
389
- return { organization: undefined };
390
- }
391
- exports.GetOrganizationBySlugResponse = {
392
- encode(message, writer = new wire_1.BinaryWriter()) {
393
- if (message.organization !== undefined) {
394
- organization_pb_1.Organization.encode(message.organization, writer.uint32(10).fork()).join();
395
- }
396
- return writer;
397
- },
398
- decode(input, length) {
399
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
400
- const end = length === undefined ? reader.len : reader.pos + length;
401
- const message = createBaseGetOrganizationBySlugResponse();
402
- while (reader.pos < end) {
403
- const tag = reader.uint32();
404
- switch (tag >>> 3) {
405
- case 1: {
406
- if (tag !== 10) {
407
- break;
408
- }
409
- message.organization = organization_pb_1.Organization.decode(reader, reader.uint32());
410
- continue;
411
- }
412
- }
413
- if ((tag & 7) === 4 || tag === 0) {
414
- break;
415
- }
416
- reader.skip(tag & 7);
417
- }
418
- return message;
419
- },
420
- fromJSON(object) {
421
- return { organization: isSet(object.organization) ? organization_pb_1.Organization.fromJSON(object.organization) : undefined };
422
- },
423
- toJSON(message) {
424
- const obj = {};
425
- if (message.organization !== undefined) {
426
- obj.organization = organization_pb_1.Organization.toJSON(message.organization);
427
- }
428
- return obj;
429
- },
430
- create(base) {
431
- return exports.GetOrganizationBySlugResponse.fromPartial(base !== null && base !== void 0 ? base : {});
432
- },
433
- fromPartial(object) {
434
- const message = createBaseGetOrganizationBySlugResponse();
435
- message.organization = (object.organization !== undefined && object.organization !== null)
436
- ? organization_pb_1.Organization.fromPartial(object.organization)
437
- : undefined;
438
- return message;
439
- },
440
- };
441
- function createBaseGetOrganizationByIdRequest() {
442
- return { id: "" };
443
- }
444
- exports.GetOrganizationByIdRequest = {
445
- encode(message, writer = new wire_1.BinaryWriter()) {
446
- if (message.id !== "") {
447
- writer.uint32(10).string(message.id);
448
- }
449
- return writer;
450
- },
451
- decode(input, length) {
452
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
453
- const end = length === undefined ? reader.len : reader.pos + length;
454
- const message = createBaseGetOrganizationByIdRequest();
455
- while (reader.pos < end) {
456
- const tag = reader.uint32();
457
- switch (tag >>> 3) {
458
- case 1: {
459
- if (tag !== 10) {
460
- break;
461
- }
462
- message.id = reader.string();
463
- continue;
464
- }
465
- }
466
- if ((tag & 7) === 4 || tag === 0) {
467
- break;
468
- }
469
- reader.skip(tag & 7);
470
- }
471
- return message;
472
- },
473
- fromJSON(object) {
474
- return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
475
- },
476
- toJSON(message) {
477
- const obj = {};
478
- if (message.id !== "") {
479
- obj.id = message.id;
480
- }
481
- return obj;
482
- },
483
- create(base) {
484
- return exports.GetOrganizationByIdRequest.fromPartial(base !== null && base !== void 0 ? base : {});
485
- },
486
- fromPartial(object) {
487
- var _a;
488
- const message = createBaseGetOrganizationByIdRequest();
489
- message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
490
- return message;
491
- },
492
- };
493
- function createBaseGetOrganizationByIdResponse() {
494
- return { organization: undefined };
495
- }
496
- exports.GetOrganizationByIdResponse = {
497
- encode(message, writer = new wire_1.BinaryWriter()) {
498
- if (message.organization !== undefined) {
499
- organization_pb_1.Organization.encode(message.organization, writer.uint32(10).fork()).join();
500
- }
501
- return writer;
502
- },
503
- decode(input, length) {
504
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
505
- const end = length === undefined ? reader.len : reader.pos + length;
506
- const message = createBaseGetOrganizationByIdResponse();
507
- while (reader.pos < end) {
508
- const tag = reader.uint32();
509
- switch (tag >>> 3) {
510
- case 1: {
511
- if (tag !== 10) {
512
- break;
513
- }
514
- message.organization = organization_pb_1.Organization.decode(reader, reader.uint32());
515
- continue;
516
- }
517
- }
518
- if ((tag & 7) === 4 || tag === 0) {
519
- break;
520
- }
521
- reader.skip(tag & 7);
522
- }
523
- return message;
524
- },
525
- fromJSON(object) {
526
- return { organization: isSet(object.organization) ? organization_pb_1.Organization.fromJSON(object.organization) : undefined };
527
- },
528
- toJSON(message) {
529
- const obj = {};
530
- if (message.organization !== undefined) {
531
- obj.organization = organization_pb_1.Organization.toJSON(message.organization);
532
- }
533
- return obj;
534
- },
535
- create(base) {
536
- return exports.GetOrganizationByIdResponse.fromPartial(base !== null && base !== void 0 ? base : {});
537
- },
538
- fromPartial(object) {
539
- const message = createBaseGetOrganizationByIdResponse();
540
- message.organization = (object.organization !== undefined && object.organization !== null)
541
- ? organization_pb_1.Organization.fromPartial(object.organization)
542
- : undefined;
543
- return message;
544
- },
545
- };
546
- function createBaseUpdateOrganizationRequest() {
547
- return { slug: "", newSlug: "", name: "", description: "", primaryColor: "", timezone: "", location: "" };
548
- }
549
- exports.UpdateOrganizationRequest = {
550
- encode(message, writer = new wire_1.BinaryWriter()) {
551
- if (message.slug !== "") {
552
- writer.uint32(10).string(message.slug);
553
- }
554
- if (message.newSlug !== "") {
555
- writer.uint32(18).string(message.newSlug);
556
- }
557
- if (message.name !== "") {
558
- writer.uint32(26).string(message.name);
559
- }
560
- if (message.description !== "") {
561
- writer.uint32(34).string(message.description);
562
- }
563
- if (message.primaryColor !== "") {
564
- writer.uint32(42).string(message.primaryColor);
565
- }
566
- if (message.timezone !== "") {
567
- writer.uint32(50).string(message.timezone);
568
- }
569
- if (message.location !== "") {
570
- writer.uint32(58).string(message.location);
571
- }
572
- return writer;
573
- },
574
- decode(input, length) {
575
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
576
- const end = length === undefined ? reader.len : reader.pos + length;
577
- const message = createBaseUpdateOrganizationRequest();
578
- while (reader.pos < end) {
579
- const tag = reader.uint32();
580
- switch (tag >>> 3) {
581
- case 1: {
582
- if (tag !== 10) {
583
- break;
584
- }
585
- message.slug = reader.string();
586
- continue;
587
- }
588
- case 2: {
589
- if (tag !== 18) {
590
- break;
591
- }
592
- message.newSlug = reader.string();
593
- continue;
594
- }
595
- case 3: {
596
- if (tag !== 26) {
597
- break;
598
- }
599
- message.name = reader.string();
600
- continue;
601
- }
602
- case 4: {
603
- if (tag !== 34) {
604
- break;
605
- }
606
- message.description = reader.string();
607
- continue;
608
- }
609
- case 5: {
610
- if (tag !== 42) {
611
- break;
612
- }
613
- message.primaryColor = reader.string();
614
- continue;
615
- }
616
- case 6: {
617
- if (tag !== 50) {
618
- break;
619
- }
620
- message.timezone = reader.string();
621
- continue;
622
- }
623
- case 7: {
624
- if (tag !== 58) {
625
- break;
626
- }
627
- message.location = reader.string();
628
- continue;
629
- }
630
- }
631
- if ((tag & 7) === 4 || tag === 0) {
632
- break;
633
- }
634
- reader.skip(tag & 7);
635
- }
636
- return message;
637
- },
638
- fromJSON(object) {
639
- return {
640
- slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
641
- newSlug: isSet(object.newSlug)
642
- ? globalThis.String(object.newSlug)
643
- : isSet(object.new_slug)
644
- ? globalThis.String(object.new_slug)
645
- : "",
646
- name: isSet(object.name) ? globalThis.String(object.name) : "",
647
- description: isSet(object.description) ? globalThis.String(object.description) : "",
648
- primaryColor: isSet(object.primaryColor)
649
- ? globalThis.String(object.primaryColor)
650
- : isSet(object.primary_color)
651
- ? globalThis.String(object.primary_color)
652
- : "",
653
- timezone: isSet(object.timezone) ? globalThis.String(object.timezone) : "",
654
- location: isSet(object.location) ? globalThis.String(object.location) : "",
655
- };
656
- },
657
- toJSON(message) {
658
- const obj = {};
659
- if (message.slug !== "") {
660
- obj.slug = message.slug;
661
- }
662
- if (message.newSlug !== "") {
663
- obj.newSlug = message.newSlug;
664
- }
665
- if (message.name !== "") {
666
- obj.name = message.name;
667
- }
668
- if (message.description !== "") {
669
- obj.description = message.description;
670
- }
671
- if (message.primaryColor !== "") {
672
- obj.primaryColor = message.primaryColor;
673
- }
674
- if (message.timezone !== "") {
675
- obj.timezone = message.timezone;
676
- }
677
- if (message.location !== "") {
678
- obj.location = message.location;
679
- }
680
- return obj;
681
- },
682
- create(base) {
683
- return exports.UpdateOrganizationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
684
- },
685
- fromPartial(object) {
686
- var _a, _b, _c, _d, _e, _f, _g;
687
- const message = createBaseUpdateOrganizationRequest();
688
- message.slug = (_a = object.slug) !== null && _a !== void 0 ? _a : "";
689
- message.newSlug = (_b = object.newSlug) !== null && _b !== void 0 ? _b : "";
690
- message.name = (_c = object.name) !== null && _c !== void 0 ? _c : "";
691
- message.description = (_d = object.description) !== null && _d !== void 0 ? _d : "";
692
- message.primaryColor = (_e = object.primaryColor) !== null && _e !== void 0 ? _e : "";
693
- message.timezone = (_f = object.timezone) !== null && _f !== void 0 ? _f : "";
694
- message.location = (_g = object.location) !== null && _g !== void 0 ? _g : "";
695
- return message;
696
- },
697
- };
698
- function createBaseUpdateOrganizationResponse() {
699
- return { organization: undefined };
700
- }
701
- exports.UpdateOrganizationResponse = {
702
- encode(message, writer = new wire_1.BinaryWriter()) {
703
- if (message.organization !== undefined) {
704
- organization_pb_1.Organization.encode(message.organization, writer.uint32(10).fork()).join();
705
- }
706
- return writer;
707
- },
708
- decode(input, length) {
709
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
710
- const end = length === undefined ? reader.len : reader.pos + length;
711
- const message = createBaseUpdateOrganizationResponse();
712
- while (reader.pos < end) {
713
- const tag = reader.uint32();
714
- switch (tag >>> 3) {
715
- case 1: {
716
- if (tag !== 10) {
717
- break;
718
- }
719
- message.organization = organization_pb_1.Organization.decode(reader, reader.uint32());
720
- continue;
721
- }
722
- }
723
- if ((tag & 7) === 4 || tag === 0) {
724
- break;
725
- }
726
- reader.skip(tag & 7);
727
- }
728
- return message;
729
- },
730
- fromJSON(object) {
731
- return { organization: isSet(object.organization) ? organization_pb_1.Organization.fromJSON(object.organization) : undefined };
732
- },
733
- toJSON(message) {
734
- const obj = {};
735
- if (message.organization !== undefined) {
736
- obj.organization = organization_pb_1.Organization.toJSON(message.organization);
737
- }
738
- return obj;
739
- },
740
- create(base) {
741
- return exports.UpdateOrganizationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
742
- },
743
- fromPartial(object) {
744
- const message = createBaseUpdateOrganizationResponse();
745
- message.organization = (object.organization !== undefined && object.organization !== null)
746
- ? organization_pb_1.Organization.fromPartial(object.organization)
747
- : undefined;
748
- return message;
749
- },
750
- };
751
- function createBaseDeleteOrganizationRequest() {
752
- return { slug: "" };
753
- }
754
- exports.DeleteOrganizationRequest = {
755
- encode(message, writer = new wire_1.BinaryWriter()) {
756
- if (message.slug !== "") {
757
- writer.uint32(10).string(message.slug);
758
- }
759
- return writer;
760
- },
761
- decode(input, length) {
762
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
763
- const end = length === undefined ? reader.len : reader.pos + length;
764
- const message = createBaseDeleteOrganizationRequest();
765
- while (reader.pos < end) {
766
- const tag = reader.uint32();
767
- switch (tag >>> 3) {
768
- case 1: {
769
- if (tag !== 10) {
770
- break;
771
- }
772
- message.slug = reader.string();
773
- continue;
774
- }
775
- }
776
- if ((tag & 7) === 4 || tag === 0) {
777
- break;
778
- }
779
- reader.skip(tag & 7);
780
- }
781
- return message;
782
- },
783
- fromJSON(object) {
784
- return { slug: isSet(object.slug) ? globalThis.String(object.slug) : "" };
785
- },
786
- toJSON(message) {
787
- const obj = {};
788
- if (message.slug !== "") {
789
- obj.slug = message.slug;
790
- }
791
- return obj;
792
- },
793
- create(base) {
794
- return exports.DeleteOrganizationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
795
- },
796
- fromPartial(object) {
797
- var _a;
798
- const message = createBaseDeleteOrganizationRequest();
799
- message.slug = (_a = object.slug) !== null && _a !== void 0 ? _a : "";
800
- return message;
801
- },
802
- };
803
- function createBaseDeleteOrganizationResponse() {
804
- return { deleted: false };
805
- }
806
- exports.DeleteOrganizationResponse = {
807
- encode(message, writer = new wire_1.BinaryWriter()) {
808
- if (message.deleted !== false) {
809
- writer.uint32(8).bool(message.deleted);
810
- }
811
- return writer;
812
- },
813
- decode(input, length) {
814
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
815
- const end = length === undefined ? reader.len : reader.pos + length;
816
- const message = createBaseDeleteOrganizationResponse();
817
- while (reader.pos < end) {
818
- const tag = reader.uint32();
819
- switch (tag >>> 3) {
820
- case 1: {
821
- if (tag !== 8) {
822
- break;
823
- }
824
- message.deleted = reader.bool();
825
- continue;
826
- }
827
- }
828
- if ((tag & 7) === 4 || tag === 0) {
829
- break;
830
- }
831
- reader.skip(tag & 7);
832
- }
833
- return message;
834
- },
835
- fromJSON(object) {
836
- return { deleted: isSet(object.deleted) ? globalThis.Boolean(object.deleted) : false };
837
- },
838
- toJSON(message) {
839
- const obj = {};
840
- if (message.deleted !== false) {
841
- obj.deleted = message.deleted;
842
- }
843
- return obj;
844
- },
845
- create(base) {
846
- return exports.DeleteOrganizationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
847
- },
848
- fromPartial(object) {
849
- var _a;
850
- const message = createBaseDeleteOrganizationResponse();
851
- message.deleted = (_a = object.deleted) !== null && _a !== void 0 ? _a : false;
852
- return message;
853
- },
854
- };
855
- function createBaseGetOrganizationLogoRequest() {
856
- return { slug: "" };
857
- }
858
- exports.GetOrganizationLogoRequest = {
859
- encode(message, writer = new wire_1.BinaryWriter()) {
860
- if (message.slug !== "") {
861
- writer.uint32(10).string(message.slug);
862
- }
863
- return writer;
864
- },
865
- decode(input, length) {
866
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
867
- const end = length === undefined ? reader.len : reader.pos + length;
868
- const message = createBaseGetOrganizationLogoRequest();
869
- while (reader.pos < end) {
870
- const tag = reader.uint32();
871
- switch (tag >>> 3) {
872
- case 1: {
873
- if (tag !== 10) {
874
- break;
875
- }
876
- message.slug = reader.string();
877
- continue;
878
- }
879
- }
880
- if ((tag & 7) === 4 || tag === 0) {
881
- break;
882
- }
883
- reader.skip(tag & 7);
884
- }
885
- return message;
886
- },
887
- fromJSON(object) {
888
- return { slug: isSet(object.slug) ? globalThis.String(object.slug) : "" };
889
- },
890
- toJSON(message) {
891
- const obj = {};
892
- if (message.slug !== "") {
893
- obj.slug = message.slug;
894
- }
895
- return obj;
896
- },
897
- create(base) {
898
- return exports.GetOrganizationLogoRequest.fromPartial(base !== null && base !== void 0 ? base : {});
899
- },
900
- fromPartial(object) {
901
- var _a;
902
- const message = createBaseGetOrganizationLogoRequest();
903
- message.slug = (_a = object.slug) !== null && _a !== void 0 ? _a : "";
904
- return message;
905
- },
906
- };
907
- function createBaseGetOrganizationLogoResponse() {
908
- return { logo: new Uint8Array(0), logoContentType: "" };
909
- }
910
- exports.GetOrganizationLogoResponse = {
911
- encode(message, writer = new wire_1.BinaryWriter()) {
912
- if (message.logo.length !== 0) {
913
- writer.uint32(10).bytes(message.logo);
914
- }
915
- if (message.logoContentType !== "") {
916
- writer.uint32(18).string(message.logoContentType);
917
- }
918
- return writer;
919
- },
920
- decode(input, length) {
921
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
922
- const end = length === undefined ? reader.len : reader.pos + length;
923
- const message = createBaseGetOrganizationLogoResponse();
924
- while (reader.pos < end) {
925
- const tag = reader.uint32();
926
- switch (tag >>> 3) {
927
- case 1: {
928
- if (tag !== 10) {
929
- break;
930
- }
931
- message.logo = reader.bytes();
932
- continue;
933
- }
934
- case 2: {
935
- if (tag !== 18) {
936
- break;
937
- }
938
- message.logoContentType = reader.string();
939
- continue;
940
- }
941
- }
942
- if ((tag & 7) === 4 || tag === 0) {
943
- break;
944
- }
945
- reader.skip(tag & 7);
946
- }
947
- return message;
948
- },
949
- fromJSON(object) {
950
- return {
951
- logo: isSet(object.logo) ? bytesFromBase64(object.logo) : new Uint8Array(0),
952
- logoContentType: isSet(object.logoContentType)
953
- ? globalThis.String(object.logoContentType)
954
- : isSet(object.logo_content_type)
955
- ? globalThis.String(object.logo_content_type)
956
- : "",
957
- };
958
- },
959
- toJSON(message) {
960
- const obj = {};
961
- if (message.logo.length !== 0) {
962
- obj.logo = base64FromBytes(message.logo);
963
- }
964
- if (message.logoContentType !== "") {
965
- obj.logoContentType = message.logoContentType;
966
- }
967
- return obj;
968
- },
969
- create(base) {
970
- return exports.GetOrganizationLogoResponse.fromPartial(base !== null && base !== void 0 ? base : {});
971
- },
972
- fromPartial(object) {
973
- var _a, _b;
974
- const message = createBaseGetOrganizationLogoResponse();
975
- message.logo = (_a = object.logo) !== null && _a !== void 0 ? _a : new Uint8Array(0);
976
- message.logoContentType = (_b = object.logoContentType) !== null && _b !== void 0 ? _b : "";
977
- return message;
978
- },
979
- };
980
- function createBasePutOrganizationLogoRequest() {
981
- return { slug: "", logo: new Uint8Array(0), logoContentType: "" };
982
- }
983
- exports.PutOrganizationLogoRequest = {
984
- encode(message, writer = new wire_1.BinaryWriter()) {
985
- if (message.slug !== "") {
986
- writer.uint32(10).string(message.slug);
987
- }
988
- if (message.logo.length !== 0) {
989
- writer.uint32(18).bytes(message.logo);
990
- }
991
- if (message.logoContentType !== "") {
992
- writer.uint32(26).string(message.logoContentType);
993
- }
994
- return writer;
995
- },
996
- decode(input, length) {
997
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
998
- const end = length === undefined ? reader.len : reader.pos + length;
999
- const message = createBasePutOrganizationLogoRequest();
1000
- while (reader.pos < end) {
1001
- const tag = reader.uint32();
1002
- switch (tag >>> 3) {
1003
- case 1: {
1004
- if (tag !== 10) {
1005
- break;
1006
- }
1007
- message.slug = reader.string();
1008
- continue;
1009
- }
1010
- case 2: {
1011
- if (tag !== 18) {
1012
- break;
1013
- }
1014
- message.logo = reader.bytes();
1015
- continue;
1016
- }
1017
- case 3: {
1018
- if (tag !== 26) {
1019
- break;
1020
- }
1021
- message.logoContentType = reader.string();
1022
- continue;
1023
- }
1024
- }
1025
- if ((tag & 7) === 4 || tag === 0) {
1026
- break;
1027
- }
1028
- reader.skip(tag & 7);
1029
- }
1030
- return message;
1031
- },
1032
- fromJSON(object) {
1033
- return {
1034
- slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
1035
- logo: isSet(object.logo) ? bytesFromBase64(object.logo) : new Uint8Array(0),
1036
- logoContentType: isSet(object.logoContentType)
1037
- ? globalThis.String(object.logoContentType)
1038
- : isSet(object.logo_content_type)
1039
- ? globalThis.String(object.logo_content_type)
1040
- : "",
1041
- };
1042
- },
1043
- toJSON(message) {
1044
- const obj = {};
1045
- if (message.slug !== "") {
1046
- obj.slug = message.slug;
1047
- }
1048
- if (message.logo.length !== 0) {
1049
- obj.logo = base64FromBytes(message.logo);
1050
- }
1051
- if (message.logoContentType !== "") {
1052
- obj.logoContentType = message.logoContentType;
1053
- }
1054
- return obj;
1055
- },
1056
- create(base) {
1057
- return exports.PutOrganizationLogoRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1058
- },
1059
- fromPartial(object) {
1060
- var _a, _b, _c;
1061
- const message = createBasePutOrganizationLogoRequest();
1062
- message.slug = (_a = object.slug) !== null && _a !== void 0 ? _a : "";
1063
- message.logo = (_b = object.logo) !== null && _b !== void 0 ? _b : new Uint8Array(0);
1064
- message.logoContentType = (_c = object.logoContentType) !== null && _c !== void 0 ? _c : "";
1065
- return message;
1066
- },
1067
- };
1068
- function createBasePutOrganizationLogoResponse() {
1069
- return {};
1070
- }
1071
- exports.PutOrganizationLogoResponse = {
1072
- encode(_, writer = new wire_1.BinaryWriter()) {
1073
- return writer;
1074
- },
1075
- decode(input, length) {
1076
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1077
- const end = length === undefined ? reader.len : reader.pos + length;
1078
- const message = createBasePutOrganizationLogoResponse();
1079
- while (reader.pos < end) {
1080
- const tag = reader.uint32();
1081
- switch (tag >>> 3) {
1082
- }
1083
- if ((tag & 7) === 4 || tag === 0) {
1084
- break;
1085
- }
1086
- reader.skip(tag & 7);
1087
- }
1088
- return message;
1089
- },
1090
- fromJSON(_) {
1091
- return {};
1092
- },
1093
- toJSON(_) {
1094
- const obj = {};
1095
- return obj;
1096
- },
1097
- create(base) {
1098
- return exports.PutOrganizationLogoResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1099
- },
1100
- fromPartial(_) {
1101
- const message = createBasePutOrganizationLogoResponse();
1102
- return message;
1103
- },
1104
- };
1105
- function createBaseDeleteOrganizationLogoRequest() {
1106
- return { slug: "" };
1107
- }
1108
- exports.DeleteOrganizationLogoRequest = {
1109
- encode(message, writer = new wire_1.BinaryWriter()) {
1110
- if (message.slug !== "") {
1111
- writer.uint32(10).string(message.slug);
1112
- }
1113
- return writer;
1114
- },
1115
- decode(input, length) {
1116
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1117
- const end = length === undefined ? reader.len : reader.pos + length;
1118
- const message = createBaseDeleteOrganizationLogoRequest();
1119
- while (reader.pos < end) {
1120
- const tag = reader.uint32();
1121
- switch (tag >>> 3) {
1122
- case 1: {
1123
- if (tag !== 10) {
1124
- break;
1125
- }
1126
- message.slug = reader.string();
1127
- continue;
1128
- }
1129
- }
1130
- if ((tag & 7) === 4 || tag === 0) {
1131
- break;
1132
- }
1133
- reader.skip(tag & 7);
1134
- }
1135
- return message;
1136
- },
1137
- fromJSON(object) {
1138
- return { slug: isSet(object.slug) ? globalThis.String(object.slug) : "" };
1139
- },
1140
- toJSON(message) {
1141
- const obj = {};
1142
- if (message.slug !== "") {
1143
- obj.slug = message.slug;
1144
- }
1145
- return obj;
1146
- },
1147
- create(base) {
1148
- return exports.DeleteOrganizationLogoRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1149
- },
1150
- fromPartial(object) {
1151
- var _a;
1152
- const message = createBaseDeleteOrganizationLogoRequest();
1153
- message.slug = (_a = object.slug) !== null && _a !== void 0 ? _a : "";
1154
- return message;
1155
- },
1156
- };
1157
- function createBaseDeleteOrganizationLogoResponse() {
1158
- return {};
1159
- }
1160
- exports.DeleteOrganizationLogoResponse = {
1161
- encode(_, writer = new wire_1.BinaryWriter()) {
1162
- return writer;
1163
- },
1164
- decode(input, length) {
1165
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1166
- const end = length === undefined ? reader.len : reader.pos + length;
1167
- const message = createBaseDeleteOrganizationLogoResponse();
1168
- while (reader.pos < end) {
1169
- const tag = reader.uint32();
1170
- switch (tag >>> 3) {
1171
- }
1172
- if ((tag & 7) === 4 || tag === 0) {
1173
- break;
1174
- }
1175
- reader.skip(tag & 7);
1176
- }
1177
- return message;
1178
- },
1179
- fromJSON(_) {
1180
- return {};
1181
- },
1182
- toJSON(_) {
1183
- const obj = {};
1184
- return obj;
1185
- },
1186
- create(base) {
1187
- return exports.DeleteOrganizationLogoResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1188
- },
1189
- fromPartial(_) {
1190
- const message = createBaseDeleteOrganizationLogoResponse();
1191
- return message;
1192
- },
1193
- };
1194
- exports.OrganizationServiceServiceName = "weaveapi.organization.v1.OrganizationService";
1195
- class OrganizationServiceClientImpl {
1196
- constructor(rpc, opts) {
1197
- this.service = (opts === null || opts === void 0 ? void 0 : opts.service) || exports.OrganizationServiceServiceName;
1198
- this.rpc = rpc;
1199
- this.ListOrganizations = this.ListOrganizations.bind(this);
1200
- this.CreateOrganization = this.CreateOrganization.bind(this);
1201
- this.GetOrganizationBySlug = this.GetOrganizationBySlug.bind(this);
1202
- this.GetOrganizationById = this.GetOrganizationById.bind(this);
1203
- this.UpdateOrganization = this.UpdateOrganization.bind(this);
1204
- this.DeleteOrganization = this.DeleteOrganization.bind(this);
1205
- this.GetOrganizationLogo = this.GetOrganizationLogo.bind(this);
1206
- this.PutOrganizationLogo = this.PutOrganizationLogo.bind(this);
1207
- this.DeleteOrganizationLogo = this.DeleteOrganizationLogo.bind(this);
1208
- }
1209
- ListOrganizations(request) {
1210
- const data = exports.ListOrganizationsRequest.encode(request).finish();
1211
- const promise = this.rpc.request(this.service, "ListOrganizations", data);
1212
- return promise.then((data) => exports.ListOrganizationsResponse.decode(new wire_1.BinaryReader(data)));
1213
- }
1214
- CreateOrganization(request) {
1215
- const data = exports.CreateOrganizationRequest.encode(request).finish();
1216
- const promise = this.rpc.request(this.service, "CreateOrganization", data);
1217
- return promise.then((data) => exports.CreateOrganizationResponse.decode(new wire_1.BinaryReader(data)));
1218
- }
1219
- GetOrganizationBySlug(request) {
1220
- const data = exports.GetOrganizationBySlugRequest.encode(request).finish();
1221
- const promise = this.rpc.request(this.service, "GetOrganizationBySlug", data);
1222
- return promise.then((data) => exports.GetOrganizationBySlugResponse.decode(new wire_1.BinaryReader(data)));
1223
- }
1224
- GetOrganizationById(request) {
1225
- const data = exports.GetOrganizationByIdRequest.encode(request).finish();
1226
- const promise = this.rpc.request(this.service, "GetOrganizationById", data);
1227
- return promise.then((data) => exports.GetOrganizationByIdResponse.decode(new wire_1.BinaryReader(data)));
1228
- }
1229
- UpdateOrganization(request) {
1230
- const data = exports.UpdateOrganizationRequest.encode(request).finish();
1231
- const promise = this.rpc.request(this.service, "UpdateOrganization", data);
1232
- return promise.then((data) => exports.UpdateOrganizationResponse.decode(new wire_1.BinaryReader(data)));
1233
- }
1234
- DeleteOrganization(request) {
1235
- const data = exports.DeleteOrganizationRequest.encode(request).finish();
1236
- const promise = this.rpc.request(this.service, "DeleteOrganization", data);
1237
- return promise.then((data) => exports.DeleteOrganizationResponse.decode(new wire_1.BinaryReader(data)));
1238
- }
1239
- GetOrganizationLogo(request) {
1240
- const data = exports.GetOrganizationLogoRequest.encode(request).finish();
1241
- const promise = this.rpc.request(this.service, "GetOrganizationLogo", data);
1242
- return promise.then((data) => exports.GetOrganizationLogoResponse.decode(new wire_1.BinaryReader(data)));
1243
- }
1244
- PutOrganizationLogo(request) {
1245
- const data = exports.PutOrganizationLogoRequest.encode(request).finish();
1246
- const promise = this.rpc.request(this.service, "PutOrganizationLogo", data);
1247
- return promise.then((data) => exports.PutOrganizationLogoResponse.decode(new wire_1.BinaryReader(data)));
1248
- }
1249
- DeleteOrganizationLogo(request) {
1250
- const data = exports.DeleteOrganizationLogoRequest.encode(request).finish();
1251
- const promise = this.rpc.request(this.service, "DeleteOrganizationLogo", data);
1252
- return promise.then((data) => exports.DeleteOrganizationLogoResponse.decode(new wire_1.BinaryReader(data)));
1253
- }
1254
- }
1255
- exports.OrganizationServiceClientImpl = OrganizationServiceClientImpl;
1256
- exports.OrganizationServiceDefinition = {
1257
- name: "OrganizationService",
1258
- fullName: "weaveapi.organization.v1.OrganizationService",
1259
- methods: {
1260
- listOrganizations: {
1261
- name: "ListOrganizations",
1262
- requestType: exports.ListOrganizationsRequest,
1263
- requestStream: false,
1264
- responseType: exports.ListOrganizationsResponse,
1265
- responseStream: false,
1266
- options: {
1267
- _unknownFields: {
1268
- 578365826: [
1269
- new Uint8Array([
1270
- 19,
1271
- 18,
1272
- 17,
1273
- 47,
1274
- 118,
1275
- 49,
1276
- 47,
1277
- 111,
1278
- 114,
1279
- 103,
1280
- 97,
1281
- 110,
1282
- 105,
1283
- 122,
1284
- 97,
1285
- 116,
1286
- 105,
1287
- 111,
1288
- 110,
1289
- 115,
1290
- ]),
1291
- ],
1292
- },
1293
- },
1294
- },
1295
- createOrganization: {
1296
- name: "CreateOrganization",
1297
- requestType: exports.CreateOrganizationRequest,
1298
- requestStream: false,
1299
- responseType: exports.CreateOrganizationResponse,
1300
- responseStream: false,
1301
- options: {
1302
- _unknownFields: {
1303
- 578365826: [
1304
- new Uint8Array([
1305
- 22,
1306
- 58,
1307
- 1,
1308
- 42,
1309
- 34,
1310
- 17,
1311
- 47,
1312
- 118,
1313
- 49,
1314
- 47,
1315
- 111,
1316
- 114,
1317
- 103,
1318
- 97,
1319
- 110,
1320
- 105,
1321
- 122,
1322
- 97,
1323
- 116,
1324
- 105,
1325
- 111,
1326
- 110,
1327
- 115,
1328
- ]),
1329
- ],
1330
- },
1331
- },
1332
- },
1333
- getOrganizationBySlug: {
1334
- name: "GetOrganizationBySlug",
1335
- requestType: exports.GetOrganizationBySlugRequest,
1336
- requestStream: false,
1337
- responseType: exports.GetOrganizationBySlugResponse,
1338
- responseStream: false,
1339
- options: {
1340
- _unknownFields: {
1341
- 578365826: [
1342
- new Uint8Array([
1343
- 26,
1344
- 18,
1345
- 24,
1346
- 47,
1347
- 118,
1348
- 49,
1349
- 47,
1350
- 111,
1351
- 114,
1352
- 103,
1353
- 97,
1354
- 110,
1355
- 105,
1356
- 122,
1357
- 97,
1358
- 116,
1359
- 105,
1360
- 111,
1361
- 110,
1362
- 115,
1363
- 47,
1364
- 123,
1365
- 115,
1366
- 108,
1367
- 117,
1368
- 103,
1369
- 125,
1370
- ]),
1371
- ],
1372
- },
1373
- },
1374
- },
1375
- getOrganizationById: {
1376
- name: "GetOrganizationById",
1377
- requestType: exports.GetOrganizationByIdRequest,
1378
- requestStream: false,
1379
- responseType: exports.GetOrganizationByIdResponse,
1380
- responseStream: false,
1381
- options: {
1382
- _unknownFields: {
1383
- 578365826: [
1384
- new Uint8Array([
1385
- 30,
1386
- 18,
1387
- 28,
1388
- 47,
1389
- 118,
1390
- 49,
1391
- 47,
1392
- 111,
1393
- 114,
1394
- 103,
1395
- 97,
1396
- 110,
1397
- 105,
1398
- 122,
1399
- 97,
1400
- 116,
1401
- 105,
1402
- 111,
1403
- 110,
1404
- 115,
1405
- 47,
1406
- 98,
1407
- 121,
1408
- 45,
1409
- 105,
1410
- 100,
1411
- 47,
1412
- 123,
1413
- 105,
1414
- 100,
1415
- 125,
1416
- ]),
1417
- ],
1418
- },
1419
- },
1420
- },
1421
- updateOrganization: {
1422
- name: "UpdateOrganization",
1423
- requestType: exports.UpdateOrganizationRequest,
1424
- requestStream: false,
1425
- responseType: exports.UpdateOrganizationResponse,
1426
- responseStream: false,
1427
- options: {
1428
- _unknownFields: {
1429
- 578365826: [
1430
- new Uint8Array([
1431
- 29,
1432
- 58,
1433
- 1,
1434
- 42,
1435
- 50,
1436
- 24,
1437
- 47,
1438
- 118,
1439
- 49,
1440
- 47,
1441
- 111,
1442
- 114,
1443
- 103,
1444
- 97,
1445
- 110,
1446
- 105,
1447
- 122,
1448
- 97,
1449
- 116,
1450
- 105,
1451
- 111,
1452
- 110,
1453
- 115,
1454
- 47,
1455
- 123,
1456
- 115,
1457
- 108,
1458
- 117,
1459
- 103,
1460
- 125,
1461
- ]),
1462
- ],
1463
- },
1464
- },
1465
- },
1466
- deleteOrganization: {
1467
- name: "DeleteOrganization",
1468
- requestType: exports.DeleteOrganizationRequest,
1469
- requestStream: false,
1470
- responseType: exports.DeleteOrganizationResponse,
1471
- responseStream: false,
1472
- options: {
1473
- _unknownFields: {
1474
- 578365826: [
1475
- new Uint8Array([
1476
- 26,
1477
- 42,
1478
- 24,
1479
- 47,
1480
- 118,
1481
- 49,
1482
- 47,
1483
- 111,
1484
- 114,
1485
- 103,
1486
- 97,
1487
- 110,
1488
- 105,
1489
- 122,
1490
- 97,
1491
- 116,
1492
- 105,
1493
- 111,
1494
- 110,
1495
- 115,
1496
- 47,
1497
- 123,
1498
- 115,
1499
- 108,
1500
- 117,
1501
- 103,
1502
- 125,
1503
- ]),
1504
- ],
1505
- },
1506
- },
1507
- },
1508
- getOrganizationLogo: {
1509
- name: "GetOrganizationLogo",
1510
- requestType: exports.GetOrganizationLogoRequest,
1511
- requestStream: false,
1512
- responseType: exports.GetOrganizationLogoResponse,
1513
- responseStream: false,
1514
- options: {},
1515
- },
1516
- putOrganizationLogo: {
1517
- name: "PutOrganizationLogo",
1518
- requestType: exports.PutOrganizationLogoRequest,
1519
- requestStream: false,
1520
- responseType: exports.PutOrganizationLogoResponse,
1521
- responseStream: false,
1522
- options: {},
1523
- },
1524
- deleteOrganizationLogo: {
1525
- name: "DeleteOrganizationLogo",
1526
- requestType: exports.DeleteOrganizationLogoRequest,
1527
- requestStream: false,
1528
- responseType: exports.DeleteOrganizationLogoResponse,
1529
- responseStream: false,
1530
- options: {},
1531
- },
1532
- },
1533
- };
1534
- function bytesFromBase64(b64) {
1535
- if (globalThis.Buffer) {
1536
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
1537
- }
1538
- else {
1539
- const bin = globalThis.atob(b64);
1540
- const arr = new Uint8Array(bin.length);
1541
- for (let i = 0; i < bin.length; ++i) {
1542
- arr[i] = bin.charCodeAt(i);
1543
- }
1544
- return arr;
1545
- }
1546
- }
1547
- function base64FromBytes(arr) {
1548
- if (globalThis.Buffer) {
1549
- return globalThis.Buffer.from(arr).toString("base64");
1550
- }
1551
- else {
1552
- const bin = [];
1553
- arr.forEach((byte) => {
1554
- bin.push(globalThis.String.fromCharCode(byte));
1555
- });
1556
- return globalThis.btoa(bin.join(""));
1557
- }
1558
- }
1559
- function isSet(value) {
1560
- return value !== null && value !== undefined;
1561
- }