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