@devvit/protos 0.11.0-next-2024-07-09-09c743af9.0 → 0.11.0-next-2024-07-09-907b3322a.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/meta.min.json +46 -38
  2. package/package.json +6 -6
  3. package/protos.min.js +2 -2
  4. package/protos.min.js.map +4 -4
  5. package/schema/devvit/dev_portal/app_publish_request/app_publish_request.proto +79 -0
  6. package/schema/devvit/dev_portal/app_publish_request/note/app_publish_request_note.proto +24 -0
  7. package/schema/devvit/dev_portal/app_publish_request/review/app_publish_request_review.proto +30 -0
  8. package/schema/devvit/dev_portal/dev_portal.proto +19 -2
  9. package/schema/devvit/plugin/buildpack/buildpack_common.proto +12 -0
  10. package/schema/devvit/runtime/bundle.proto +2 -1
  11. package/types/devvit/dev_portal/app_publish_request/app_publish_request.d.ts +141 -0
  12. package/types/devvit/dev_portal/app_publish_request/app_publish_request.d.ts.map +1 -0
  13. package/types/devvit/dev_portal/app_publish_request/app_publish_request.js +804 -0
  14. package/types/devvit/dev_portal/app_publish_request/note/app_publish_request_note.d.ts +55 -0
  15. package/types/devvit/dev_portal/app_publish_request/note/app_publish_request_note.d.ts.map +1 -0
  16. package/types/devvit/dev_portal/app_publish_request/note/app_publish_request_note.js +284 -0
  17. package/types/devvit/dev_portal/app_publish_request/review/app_publish_request_review.d.ts +63 -0
  18. package/types/devvit/dev_portal/app_publish_request/review/app_publish_request_review.d.ts.map +1 -0
  19. package/types/devvit/dev_portal/app_publish_request/review/app_publish_request_review.js +321 -0
  20. package/types/devvit/dev_portal/dev_portal.d.ts +714 -0
  21. package/types/devvit/dev_portal/dev_portal.d.ts.map +1 -1
  22. package/types/devvit/dev_portal/dev_portal.js +156 -0
  23. package/types/devvit/dev_portal/dev_portal.twirp-client.d.ts +46 -0
  24. package/types/devvit/dev_portal/dev_portal.twirp-client.d.ts.map +1 -1
  25. package/types/devvit/dev_portal/dev_portal.twirp-client.js +133 -0
  26. package/types/devvit/dev_portal/dev_portal.twirp.d.ts +29 -0
  27. package/types/devvit/dev_portal/dev_portal.twirp.d.ts.map +1 -1
  28. package/types/devvit/dev_portal/dev_portal.twirp.js +685 -0
  29. package/types/devvit/gateway/resolvers.d.ts +6 -0
  30. package/types/devvit/gateway/resolvers.d.ts.map +1 -1
  31. package/types/devvit/plugin/buildpack/buildpack.d.ts +60 -0
  32. package/types/devvit/plugin/buildpack/buildpack.d.ts.map +1 -1
  33. package/types/devvit/plugin/buildpack/buildpack_common.d.ts +34 -0
  34. package/types/devvit/plugin/buildpack/buildpack_common.d.ts.map +1 -1
  35. package/types/devvit/plugin/buildpack/buildpack_common.js +161 -0
  36. package/types/devvit/plugin/linker/linker.d.ts +30 -0
  37. package/types/devvit/plugin/linker/linker.d.ts.map +1 -1
  38. package/types/devvit/plugin/linker/resolver.d.ts +30 -0
  39. package/types/devvit/plugin/linker/resolver.d.ts.map +1 -1
  40. package/types/devvit/runtime/actor/bootstrap.d.ts +6 -0
  41. package/types/devvit/runtime/actor/bootstrap.d.ts.map +1 -1
  42. package/types/devvit/runtime/actor/runtime.d.ts +6 -0
  43. package/types/devvit/runtime/actor/runtime.d.ts.map +1 -1
  44. package/types/devvit/runtime/actor/supervisor.d.ts +6 -0
  45. package/types/devvit/runtime/actor/supervisor.d.ts.map +1 -1
  46. package/types/devvit/runtime/bundle.d.ts +17 -0
  47. package/types/devvit/runtime/bundle.d.ts.map +1 -1
  48. package/types/devvit/runtime/bundle.js +102 -0
  49. package/types/devvit/service/bundle_service.d.ts +12 -0
  50. package/types/devvit/service/bundle_service.d.ts.map +1 -1
@@ -0,0 +1,321 @@
1
+ /**
2
+ * #app_publish_request_review.ts
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ /* eslint-disable */
7
+ import _m0 from 'protobufjs/minimal.js';
8
+ import { Timestamp } from '../../../../google/protobuf/timestamp.js';
9
+ import { messageTypeRegistry } from '../../../../typeRegistry.js';
10
+ import { Redditor } from '../../reddit/redditor.js';
11
+ export var AppPublishRequestReviewDecision;
12
+ (function (AppPublishRequestReviewDecision) {
13
+ AppPublishRequestReviewDecision[AppPublishRequestReviewDecision["APPROVED"] = 0] = "APPROVED";
14
+ AppPublishRequestReviewDecision[AppPublishRequestReviewDecision["DENIED"] = 1] = "DENIED";
15
+ AppPublishRequestReviewDecision[AppPublishRequestReviewDecision["OBSOLETE"] = 2] = "OBSOLETE";
16
+ AppPublishRequestReviewDecision[AppPublishRequestReviewDecision["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
17
+ })(AppPublishRequestReviewDecision || (AppPublishRequestReviewDecision = {}));
18
+ export function appPublishRequestReviewDecisionFromJSON(object) {
19
+ switch (object) {
20
+ case 0:
21
+ case "APPROVED":
22
+ return AppPublishRequestReviewDecision.APPROVED;
23
+ case 1:
24
+ case "DENIED":
25
+ return AppPublishRequestReviewDecision.DENIED;
26
+ case 2:
27
+ case "OBSOLETE":
28
+ return AppPublishRequestReviewDecision.OBSOLETE;
29
+ case -1:
30
+ case "UNRECOGNIZED":
31
+ default:
32
+ return AppPublishRequestReviewDecision.UNRECOGNIZED;
33
+ }
34
+ }
35
+ export function appPublishRequestReviewDecisionToJSON(object) {
36
+ switch (object) {
37
+ case AppPublishRequestReviewDecision.APPROVED:
38
+ return 0;
39
+ case AppPublishRequestReviewDecision.DENIED:
40
+ return 1;
41
+ case AppPublishRequestReviewDecision.OBSOLETE:
42
+ return 2;
43
+ case AppPublishRequestReviewDecision.UNRECOGNIZED:
44
+ default:
45
+ return -1;
46
+ }
47
+ }
48
+ function createBaseAppPublishRequestReview() {
49
+ return { id: "", createdAt: undefined, updatedAt: undefined, reviewer: undefined, decision: 0 };
50
+ }
51
+ export const AppPublishRequestReview = {
52
+ $type: "devvit.dev_portal.app_publish_request.review.AppPublishRequestReview",
53
+ encode(message, writer = _m0.Writer.create()) {
54
+ if (message.id !== "") {
55
+ writer.uint32(10).string(message.id);
56
+ }
57
+ if (message.createdAt !== undefined) {
58
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(18).fork()).ldelim();
59
+ }
60
+ if (message.updatedAt !== undefined) {
61
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(26).fork()).ldelim();
62
+ }
63
+ if (message.reviewer !== undefined) {
64
+ Redditor.encode(message.reviewer, writer.uint32(34).fork()).ldelim();
65
+ }
66
+ if (message.decision !== 0) {
67
+ writer.uint32(40).int32(message.decision);
68
+ }
69
+ return writer;
70
+ },
71
+ decode(input, length) {
72
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
73
+ let end = length === undefined ? reader.len : reader.pos + length;
74
+ const message = createBaseAppPublishRequestReview();
75
+ while (reader.pos < end) {
76
+ const tag = reader.uint32();
77
+ switch (tag >>> 3) {
78
+ case 1:
79
+ if (tag !== 10) {
80
+ break;
81
+ }
82
+ message.id = reader.string();
83
+ continue;
84
+ case 2:
85
+ if (tag !== 18) {
86
+ break;
87
+ }
88
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
89
+ continue;
90
+ case 3:
91
+ if (tag !== 26) {
92
+ break;
93
+ }
94
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
95
+ continue;
96
+ case 4:
97
+ if (tag !== 34) {
98
+ break;
99
+ }
100
+ message.reviewer = Redditor.decode(reader, reader.uint32());
101
+ continue;
102
+ case 5:
103
+ if (tag !== 40) {
104
+ break;
105
+ }
106
+ message.decision = reader.int32();
107
+ continue;
108
+ }
109
+ if ((tag & 7) === 4 || tag === 0) {
110
+ break;
111
+ }
112
+ reader.skipType(tag & 7);
113
+ }
114
+ return message;
115
+ },
116
+ fromJSON(object) {
117
+ return {
118
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
119
+ createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
120
+ updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
121
+ reviewer: isSet(object.reviewer) ? Redditor.fromJSON(object.reviewer) : undefined,
122
+ decision: isSet(object.decision) ? appPublishRequestReviewDecisionFromJSON(object.decision) : 0,
123
+ };
124
+ },
125
+ toJSON(message) {
126
+ const obj = {};
127
+ if (message.id !== "") {
128
+ obj.id = message.id;
129
+ }
130
+ if (message.createdAt !== undefined) {
131
+ obj.createdAt = message.createdAt.toISOString();
132
+ }
133
+ if (message.updatedAt !== undefined) {
134
+ obj.updatedAt = message.updatedAt.toISOString();
135
+ }
136
+ if (message.reviewer !== undefined) {
137
+ obj.reviewer = Redditor.toJSON(message.reviewer);
138
+ }
139
+ if (message.decision !== 0) {
140
+ obj.decision = appPublishRequestReviewDecisionToJSON(message.decision);
141
+ }
142
+ return obj;
143
+ },
144
+ create(base) {
145
+ return AppPublishRequestReview.fromPartial(base ?? {});
146
+ },
147
+ fromPartial(object) {
148
+ const message = createBaseAppPublishRequestReview();
149
+ message.id = object.id ?? "";
150
+ message.createdAt = object.createdAt ?? undefined;
151
+ message.updatedAt = object.updatedAt ?? undefined;
152
+ message.reviewer = (object.reviewer !== undefined && object.reviewer !== null)
153
+ ? Redditor.fromPartial(object.reviewer)
154
+ : undefined;
155
+ message.decision = object.decision ?? 0;
156
+ return message;
157
+ },
158
+ };
159
+ messageTypeRegistry.set(AppPublishRequestReview.$type, AppPublishRequestReview);
160
+ function createBaseAppPRAddReviewRequest() {
161
+ return { appPublishRequestId: "", decision: 0 };
162
+ }
163
+ export const AppPRAddReviewRequest = {
164
+ $type: "devvit.dev_portal.app_publish_request.review.AppPRAddReviewRequest",
165
+ encode(message, writer = _m0.Writer.create()) {
166
+ if (message.appPublishRequestId !== "") {
167
+ writer.uint32(10).string(message.appPublishRequestId);
168
+ }
169
+ if (message.decision !== 0) {
170
+ writer.uint32(16).int32(message.decision);
171
+ }
172
+ return writer;
173
+ },
174
+ decode(input, length) {
175
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
176
+ let end = length === undefined ? reader.len : reader.pos + length;
177
+ const message = createBaseAppPRAddReviewRequest();
178
+ while (reader.pos < end) {
179
+ const tag = reader.uint32();
180
+ switch (tag >>> 3) {
181
+ case 1:
182
+ if (tag !== 10) {
183
+ break;
184
+ }
185
+ message.appPublishRequestId = reader.string();
186
+ continue;
187
+ case 2:
188
+ if (tag !== 16) {
189
+ break;
190
+ }
191
+ message.decision = reader.int32();
192
+ continue;
193
+ }
194
+ if ((tag & 7) === 4 || tag === 0) {
195
+ break;
196
+ }
197
+ reader.skipType(tag & 7);
198
+ }
199
+ return message;
200
+ },
201
+ fromJSON(object) {
202
+ return {
203
+ appPublishRequestId: isSet(object.appPublishRequestId) ? globalThis.String(object.appPublishRequestId) : "",
204
+ decision: isSet(object.decision) ? appPublishRequestReviewDecisionFromJSON(object.decision) : 0,
205
+ };
206
+ },
207
+ toJSON(message) {
208
+ const obj = {};
209
+ if (message.appPublishRequestId !== "") {
210
+ obj.appPublishRequestId = message.appPublishRequestId;
211
+ }
212
+ if (message.decision !== 0) {
213
+ obj.decision = appPublishRequestReviewDecisionToJSON(message.decision);
214
+ }
215
+ return obj;
216
+ },
217
+ create(base) {
218
+ return AppPRAddReviewRequest.fromPartial(base ?? {});
219
+ },
220
+ fromPartial(object) {
221
+ const message = createBaseAppPRAddReviewRequest();
222
+ message.appPublishRequestId = object.appPublishRequestId ?? "";
223
+ message.decision = object.decision ?? 0;
224
+ return message;
225
+ },
226
+ };
227
+ messageTypeRegistry.set(AppPRAddReviewRequest.$type, AppPRAddReviewRequest);
228
+ function createBaseAppPRUpdateReviewRequest() {
229
+ return { appPublishRequestReviewId: "", decision: 0 };
230
+ }
231
+ export const AppPRUpdateReviewRequest = {
232
+ $type: "devvit.dev_portal.app_publish_request.review.AppPRUpdateReviewRequest",
233
+ encode(message, writer = _m0.Writer.create()) {
234
+ if (message.appPublishRequestReviewId !== "") {
235
+ writer.uint32(10).string(message.appPublishRequestReviewId);
236
+ }
237
+ if (message.decision !== 0) {
238
+ writer.uint32(16).int32(message.decision);
239
+ }
240
+ return writer;
241
+ },
242
+ decode(input, length) {
243
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
244
+ let end = length === undefined ? reader.len : reader.pos + length;
245
+ const message = createBaseAppPRUpdateReviewRequest();
246
+ while (reader.pos < end) {
247
+ const tag = reader.uint32();
248
+ switch (tag >>> 3) {
249
+ case 1:
250
+ if (tag !== 10) {
251
+ break;
252
+ }
253
+ message.appPublishRequestReviewId = reader.string();
254
+ continue;
255
+ case 2:
256
+ if (tag !== 16) {
257
+ break;
258
+ }
259
+ message.decision = reader.int32();
260
+ continue;
261
+ }
262
+ if ((tag & 7) === 4 || tag === 0) {
263
+ break;
264
+ }
265
+ reader.skipType(tag & 7);
266
+ }
267
+ return message;
268
+ },
269
+ fromJSON(object) {
270
+ return {
271
+ appPublishRequestReviewId: isSet(object.appPublishRequestReviewId)
272
+ ? globalThis.String(object.appPublishRequestReviewId)
273
+ : "",
274
+ decision: isSet(object.decision) ? appPublishRequestReviewDecisionFromJSON(object.decision) : 0,
275
+ };
276
+ },
277
+ toJSON(message) {
278
+ const obj = {};
279
+ if (message.appPublishRequestReviewId !== "") {
280
+ obj.appPublishRequestReviewId = message.appPublishRequestReviewId;
281
+ }
282
+ if (message.decision !== 0) {
283
+ obj.decision = appPublishRequestReviewDecisionToJSON(message.decision);
284
+ }
285
+ return obj;
286
+ },
287
+ create(base) {
288
+ return AppPRUpdateReviewRequest.fromPartial(base ?? {});
289
+ },
290
+ fromPartial(object) {
291
+ const message = createBaseAppPRUpdateReviewRequest();
292
+ message.appPublishRequestReviewId = object.appPublishRequestReviewId ?? "";
293
+ message.decision = object.decision ?? 0;
294
+ return message;
295
+ },
296
+ };
297
+ messageTypeRegistry.set(AppPRUpdateReviewRequest.$type, AppPRUpdateReviewRequest);
298
+ function toTimestamp(date) {
299
+ const seconds = Math.trunc(date.getTime() / 1000);
300
+ const nanos = (date.getTime() % 1000) * 1000000;
301
+ return { seconds, nanos };
302
+ }
303
+ function fromTimestamp(t) {
304
+ let millis = (t.seconds || 0) * 1000;
305
+ millis += (t.nanos || 0) / 1000000;
306
+ return new globalThis.Date(millis);
307
+ }
308
+ function fromJsonTimestamp(o) {
309
+ if (o instanceof globalThis.Date) {
310
+ return o;
311
+ }
312
+ else if (typeof o === "string") {
313
+ return new globalThis.Date(o);
314
+ }
315
+ else {
316
+ return fromTimestamp(Timestamp.fromJSON(o));
317
+ }
318
+ }
319
+ function isSet(value) {
320
+ return value !== null && value !== undefined;
321
+ }