@devvit/protos 0.12.9-next-2026-01-14-17-20-12-caa9e267a.0 → 0.12.9-next-2026-01-14-17-50-38-19ca36734.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/platform/v1/request_context.d.ts +12 -2
- package/json/devvit/platform/v1/request_context.d.ts.map +1 -1
- package/json/reddit/devvit/common/v1/app.d.ts +8 -0
- package/json/reddit/devvit/common/v1/app.d.ts.map +1 -1
- package/meta.min.json +4 -4
- package/package.json +6 -6
- package/protos.min.js +1 -1
- package/protos.min.js.map +3 -3
- package/schema/.snootobuf/deps/devvit/platform/v1/request_context.proto +5 -3
- package/schema/.snootobuf/deps/reddit/devvit/common/v1/app.proto +9 -0
- package/schema/.snootobuf/deps/reddit/devvit/post/v1/post.proto +9 -0
- package/schema/snootobuf.lock +0 -0
- package/schema/snootobuf.redditapi.lock +0 -0
- package/schema/snootobuf.yaml +2 -2
- package/types/devvit/platform/v1/request_context.d.ts +12 -2
- package/types/devvit/platform/v1/request_context.d.ts.map +1 -1
- package/types/devvit/platform/v1/request_context.js +15 -1
- package/types/reddit/devvit/common/v1/app.d.ts +17 -0
- package/types/reddit/devvit/common/v1/app.d.ts.map +1 -1
- package/types/reddit/devvit/common/v1/app.js +99 -0
- package/schema/.snootobuf/deps/devvit/platform/request_context.proto +0 -77
|
@@ -37,13 +37,15 @@ enum AppStatus {
|
|
|
37
37
|
// AppContext contains information about the Devvit app
|
|
38
38
|
message AppContext {
|
|
39
39
|
// App ID in UUID format (e.g., "550e8400-e29b-41d4-a716-446655440000")
|
|
40
|
-
string id = 1;
|
|
41
|
-
//
|
|
42
|
-
string name = 2;
|
|
40
|
+
string id = 1 [deprecated = true];
|
|
41
|
+
// Name of the app (e.g., "My Funky App" (not a slug)
|
|
42
|
+
string name = 2 [deprecated = true];
|
|
43
43
|
// Semantic version number with 4 parts (e.g., "1.2.3.4")
|
|
44
44
|
string version = 3;
|
|
45
45
|
// Current publishing status of the app
|
|
46
46
|
AppStatus status = 4;
|
|
47
|
+
// App unique identifier, also known as the slug (e.g., "my-funky-app")
|
|
48
|
+
string slug = 5;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
// PostContext contains information about a Reddit post
|
|
@@ -31,6 +31,8 @@ message App {
|
|
|
31
31
|
// A `RenderVersion` value. An integer is used over an enum to avoid GraphQL
|
|
32
32
|
// implementation for new values.
|
|
33
33
|
optional int32 render_version = 11;
|
|
34
|
+
// List of app categories
|
|
35
|
+
repeated AppCategory categories = 12;
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
message AppOwner {
|
|
@@ -65,3 +67,10 @@ message AppConfig {
|
|
|
65
67
|
// Map of the app's Post entrypoints mapping entryname to entrypointUrl. Example: "leaderboard" maps to "https://{{slug}}-{{location}}-{{version}}-webview.devvit.net/leaderboard.html">
|
|
66
68
|
map<string, string> entrypoints = 1;
|
|
67
69
|
}
|
|
70
|
+
|
|
71
|
+
// Corresponds to AppCategory in the ecosystem database
|
|
72
|
+
message AppCategory {
|
|
73
|
+
int32 id = 1;
|
|
74
|
+
string name = 2;
|
|
75
|
+
optional int32 parent_id = 3;
|
|
76
|
+
}
|
|
@@ -53,6 +53,15 @@ message DevvitPost {
|
|
|
53
53
|
google.protobuf.Struct web_view_client_data = 11;
|
|
54
54
|
// The signed RequestContext JWT string. This is different from webbit_token and contains different fields.
|
|
55
55
|
string signed_request_context = 12;
|
|
56
|
+
// The height of the Post entrypoint.
|
|
57
|
+
EntrypointHeight entrypoint_height = 13;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// The height of the Post entrypoint. This is not expected to change often.
|
|
61
|
+
enum EntrypointHeight {
|
|
62
|
+
HEIGHT_UNSPECIFIED = 0;
|
|
63
|
+
REGULAR = 1;
|
|
64
|
+
TALL = 2;
|
|
56
65
|
}
|
|
57
66
|
|
|
58
67
|
// Deprecated. In AppConfig, entrypoints are now represented as a map of <entryname, entrypointUrl>
|
package/schema/snootobuf.lock
CHANGED
|
Binary file
|
|
Binary file
|
package/schema/snootobuf.yaml
CHANGED
|
@@ -25,12 +25,12 @@ checks:
|
|
|
25
25
|
remote_sources:
|
|
26
26
|
- git: github.snooguts.net/reddit/cloudroutines/proto@v0.28.8
|
|
27
27
|
|
|
28
|
-
- git: github.snooguts.net/reddit/devplatform-api/api/proto/devvit/dev_portal@v1.9.
|
|
28
|
+
- git: github.snooguts.net/reddit/devplatform-api/api/proto/devvit/dev_portal@v1.9.32 # for local development
|
|
29
29
|
|
|
30
30
|
dependencies:
|
|
31
31
|
# production; this should probably be kept in sync with the identical
|
|
32
32
|
# dependency in remote sources above?
|
|
33
|
-
- git: github.snooguts.net/reddit/devplatform-api/api/proto@v1.9.
|
|
33
|
+
- git: github.snooguts.net/reddit/devplatform-api/api/proto@v1.9.32
|
|
34
34
|
|
|
35
35
|
# for local development
|
|
36
36
|
# - local_path: ../../../../../devplatform-api/api/proto
|
|
@@ -39,14 +39,24 @@ export interface InstallationContext {
|
|
|
39
39
|
}
|
|
40
40
|
/** AppContext contains information about the Devvit app */
|
|
41
41
|
export interface AppContext {
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* App ID in UUID format (e.g., "550e8400-e29b-41d4-a716-446655440000")
|
|
44
|
+
*
|
|
45
|
+
* @deprecated
|
|
46
|
+
*/
|
|
43
47
|
id: string;
|
|
44
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Name of the app (e.g., "My Funky App" (not a slug)
|
|
50
|
+
*
|
|
51
|
+
* @deprecated
|
|
52
|
+
*/
|
|
45
53
|
name: string;
|
|
46
54
|
/** Semantic version number with 4 parts (e.g., "1.2.3.4") */
|
|
47
55
|
version: string;
|
|
48
56
|
/** Current publishing status of the app */
|
|
49
57
|
status: AppStatus;
|
|
58
|
+
/** App unique identifier, also known as the slug (e.g., "my-funky-app") */
|
|
59
|
+
slug: string;
|
|
50
60
|
}
|
|
51
61
|
/** PostContext contains information about a Reddit post */
|
|
52
62
|
export interface PostContext {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request_context.d.ts","sourceRoot":"","sources":["../../../../../src/types/devvit/platform/v1/request_context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAGxC,oBAAY,SAAS;IACnB,+EAA+E;IAC/E,sBAAsB,IAAI;IAC1B,8CAA8C;IAC9C,UAAU,IAAI;IACd,iDAAiD;IACjD,SAAS,IAAI;IACb,YAAY,KAAK;CAClB;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,GAAG,SAAS,CAgBxD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAYzD;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,YAAY,CAAC,EACT,mBAAmB,GACnB,SAAS,CAAC;IACd,8DAA8D;IAC9D,GAAG,CAAC,EACA,UAAU,GACV,SAAS,CAAC;IACd,oEAAoE;IACpE,IAAI,CAAC,EACD,WAAW,GACX,SAAS,CAAC;IACd,8EAA8E;IAC9E,SAAS,CAAC,EACN,gBAAgB,GAChB,SAAS,CAAC;IACd,uEAAuE;IACvE,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CAChC;AAED,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB;IAClC,oFAAoF;IACpF,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,2DAA2D;AAC3D,MAAM,WAAW,UAAU;IACzB
|
|
1
|
+
{"version":3,"file":"request_context.d.ts","sourceRoot":"","sources":["../../../../../src/types/devvit/platform/v1/request_context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAGxC,oBAAY,SAAS;IACnB,+EAA+E;IAC/E,sBAAsB,IAAI;IAC1B,8CAA8C;IAC9C,UAAU,IAAI;IACd,iDAAiD;IACjD,SAAS,IAAI;IACb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AAC,CAAC;CAAE,GACrD,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -218,7 +218,7 @@ export const InstallationContext = {
|
|
|
218
218
|
};
|
|
219
219
|
messageTypeRegistry.set(InstallationContext.$type, InstallationContext);
|
|
220
220
|
function createBaseAppContext() {
|
|
221
|
-
return { id: "", name: "", version: "", status: 0 };
|
|
221
|
+
return { id: "", name: "", version: "", status: 0, slug: "" };
|
|
222
222
|
}
|
|
223
223
|
export const AppContext = {
|
|
224
224
|
$type: "devvit.platform.v1.AppContext",
|
|
@@ -235,6 +235,9 @@ export const AppContext = {
|
|
|
235
235
|
if (message.status !== 0) {
|
|
236
236
|
writer.uint32(32).int32(message.status);
|
|
237
237
|
}
|
|
238
|
+
if (message.slug !== "") {
|
|
239
|
+
writer.uint32(42).string(message.slug);
|
|
240
|
+
}
|
|
238
241
|
return writer;
|
|
239
242
|
},
|
|
240
243
|
decode(input, length) {
|
|
@@ -268,6 +271,12 @@ export const AppContext = {
|
|
|
268
271
|
}
|
|
269
272
|
message.status = reader.int32();
|
|
270
273
|
continue;
|
|
274
|
+
case 5:
|
|
275
|
+
if (tag !== 42) {
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
message.slug = reader.string();
|
|
279
|
+
continue;
|
|
271
280
|
}
|
|
272
281
|
if ((tag & 7) === 4 || tag === 0) {
|
|
273
282
|
break;
|
|
@@ -282,6 +291,7 @@ export const AppContext = {
|
|
|
282
291
|
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
283
292
|
version: isSet(object.version) ? globalThis.String(object.version) : "",
|
|
284
293
|
status: isSet(object.status) ? appStatusFromJSON(object.status) : 0,
|
|
294
|
+
slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
|
|
285
295
|
};
|
|
286
296
|
},
|
|
287
297
|
toJSON(message) {
|
|
@@ -298,6 +308,9 @@ export const AppContext = {
|
|
|
298
308
|
if (message.status !== 0) {
|
|
299
309
|
obj.status = appStatusToJSON(message.status);
|
|
300
310
|
}
|
|
311
|
+
if (message.slug !== "") {
|
|
312
|
+
obj.slug = message.slug;
|
|
313
|
+
}
|
|
301
314
|
return obj;
|
|
302
315
|
},
|
|
303
316
|
create(base) {
|
|
@@ -309,6 +322,7 @@ export const AppContext = {
|
|
|
309
322
|
message.name = object.name ?? "";
|
|
310
323
|
message.version = object.version ?? "";
|
|
311
324
|
message.status = object.status ?? 0;
|
|
325
|
+
message.slug = object.slug ?? "";
|
|
312
326
|
return message;
|
|
313
327
|
},
|
|
314
328
|
};
|
|
@@ -57,6 +57,8 @@ export interface App {
|
|
|
57
57
|
* implementation for new values.
|
|
58
58
|
*/
|
|
59
59
|
renderVersion?: number | undefined;
|
|
60
|
+
/** List of app categories */
|
|
61
|
+
categories: AppCategory[];
|
|
60
62
|
}
|
|
61
63
|
export interface AppOwner {
|
|
62
64
|
/** t2_ userId of the app owner, eg 't2_11t51216bu' */
|
|
@@ -75,6 +77,12 @@ export interface AppConfig_EntrypointsEntry {
|
|
|
75
77
|
key: string;
|
|
76
78
|
value: string;
|
|
77
79
|
}
|
|
80
|
+
/** Corresponds to AppCategory in the ecosystem database */
|
|
81
|
+
export interface AppCategory {
|
|
82
|
+
id: number;
|
|
83
|
+
name: string;
|
|
84
|
+
parentId?: number | undefined;
|
|
85
|
+
}
|
|
78
86
|
export declare const App: {
|
|
79
87
|
$type: "reddit.devvit.common.v1.App";
|
|
80
88
|
encode(message: App, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -111,6 +119,15 @@ export declare const AppConfig_EntrypointsEntry: {
|
|
|
111
119
|
create(base?: DeepPartial<AppConfig_EntrypointsEntry>): AppConfig_EntrypointsEntry;
|
|
112
120
|
fromPartial(object: DeepPartial<AppConfig_EntrypointsEntry>): AppConfig_EntrypointsEntry;
|
|
113
121
|
};
|
|
122
|
+
export declare const AppCategory: {
|
|
123
|
+
$type: "reddit.devvit.common.v1.AppCategory";
|
|
124
|
+
encode(message: AppCategory, writer?: _m0.Writer): _m0.Writer;
|
|
125
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): AppCategory;
|
|
126
|
+
fromJSON(object: any): AppCategory;
|
|
127
|
+
toJSON(message: AppCategory): unknown;
|
|
128
|
+
create(base?: DeepPartial<AppCategory>): AppCategory;
|
|
129
|
+
fromPartial(object: DeepPartial<AppCategory>): AppCategory;
|
|
130
|
+
};
|
|
114
131
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
115
132
|
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
116
133
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../../../src/types/reddit/devvit/common/v1/app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,KAAK,EAA8B,MAAM,2CAA2C,CAAC;AAE9F,oBAAY,aAAa;IACvB,MAAM,IAAI;IACV,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,YAAY,KAAK;CAClB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,GAAG,aAAa,CAgBhE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAYjE;AAED,8BAA8B;AAC9B,oBAAY,aAAa;IACvB,0BAA0B,IAAI;IAC9B,iDAAiD;IACjD,cAAc,MAAM;IACpB,oDAAoD;IACpD,aAAa,MAAM;IACnB,yBAAyB,OAAO;IAChC,wEAAwE;IACxE,qBAAqB,OAAO;IAC5B,kEAAkE;IAClE,kBAAkB,OAAO;IACzB,YAAY,KAAK;CAClB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,GAAG,aAAa,CAyBhE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAkBjE;AAED,MAAM,WAAW,GAAG;IAClB,uEAAuE;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,UAAU,EAAE,aAAa,CAAC;IAC1B,sCAAsC;IACtC,KAAK,CAAC,EACF,QAAQ,GACR,SAAS,CAAC;IACd,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,SAAS,CAAC,EACN,SAAS,GACT,SAAS,CAAC;IACd,4CAA4C;IAC5C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,sCAAsC;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,yDAAyD;IACzD,yBAAyB,EAAE,KAAK,EAAE,CAAC;IACnC;;;OAGG;IACH,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../../../src/types/reddit/devvit/common/v1/app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,KAAK,EAA8B,MAAM,2CAA2C,CAAC;AAE9F,oBAAY,aAAa;IACvB,MAAM,IAAI;IACV,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,YAAY,KAAK;CAClB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,GAAG,aAAa,CAgBhE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAYjE;AAED,8BAA8B;AAC9B,oBAAY,aAAa;IACvB,0BAA0B,IAAI;IAC9B,iDAAiD;IACjD,cAAc,MAAM;IACpB,oDAAoD;IACpD,aAAa,M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0BAA0B;qBA8BlE,GAAG,GAAG,0BAA0B;oBAOjC,0BAA0B,GAAG,OAAO;kBAWtC,WAAW,CAAC,0BAA0B,CAAC,GAAG,0BAA0B;wBAG9D,WAAW,CAAC,0BAA0B,CAAC,GAAG,0BAA0B;CAMzF,CAAC;AAQF,eAAO,MAAM,WAAW;;oBAGN,WAAW,WAAU,GAAG,CAAC,MAAM,GAAyB,GAAG,CAAC,MAAM;kBAapE,GAAG,CAAC,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,WAAW;qBAqCnD,GAAG,GAAG,WAAW;oBAQlB,WAAW,GAAG,OAAO;kBAcvB,WAAW,CAAC,WAAW,CAAC,GAAG,WAAW;wBAGhC,WAAW,CAAC,WAAW,CAAC,GAAG,WAAW;CAO3D,CAAC;AAIF,KAAK,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpF,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GACvC,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACtE,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAChE,CAAC,SAAS,EAAE,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACrD,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -119,6 +119,7 @@ function createBaseApp() {
|
|
|
119
119
|
privacyPolicy: "",
|
|
120
120
|
requestedPermissionScopes: [],
|
|
121
121
|
renderVersion: undefined,
|
|
122
|
+
categories: [],
|
|
122
123
|
};
|
|
123
124
|
}
|
|
124
125
|
export const App = {
|
|
@@ -159,6 +160,9 @@ export const App = {
|
|
|
159
160
|
if (message.renderVersion !== undefined) {
|
|
160
161
|
writer.uint32(88).int32(message.renderVersion);
|
|
161
162
|
}
|
|
163
|
+
for (const v of message.categories) {
|
|
164
|
+
AppCategory.encode(v, writer.uint32(98).fork()).ldelim();
|
|
165
|
+
}
|
|
162
166
|
return writer;
|
|
163
167
|
},
|
|
164
168
|
decode(input, length) {
|
|
@@ -241,6 +245,12 @@ export const App = {
|
|
|
241
245
|
}
|
|
242
246
|
message.renderVersion = reader.int32();
|
|
243
247
|
continue;
|
|
248
|
+
case 12:
|
|
249
|
+
if (tag !== 98) {
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
message.categories.push(AppCategory.decode(reader, reader.uint32()));
|
|
253
|
+
continue;
|
|
244
254
|
}
|
|
245
255
|
if ((tag & 7) === 4 || tag === 0) {
|
|
246
256
|
break;
|
|
@@ -264,6 +274,9 @@ export const App = {
|
|
|
264
274
|
? object.requestedPermissionScopes.map((e) => scopeFromJSON(e))
|
|
265
275
|
: [],
|
|
266
276
|
renderVersion: isSet(object.renderVersion) ? globalThis.Number(object.renderVersion) : undefined,
|
|
277
|
+
categories: globalThis.Array.isArray(object?.categories)
|
|
278
|
+
? object.categories.map((e) => AppCategory.fromJSON(e))
|
|
279
|
+
: [],
|
|
267
280
|
};
|
|
268
281
|
},
|
|
269
282
|
toJSON(message) {
|
|
@@ -301,6 +314,9 @@ export const App = {
|
|
|
301
314
|
if (message.renderVersion !== undefined) {
|
|
302
315
|
obj.renderVersion = Math.round(message.renderVersion);
|
|
303
316
|
}
|
|
317
|
+
if (message.categories?.length) {
|
|
318
|
+
obj.categories = message.categories.map((e) => AppCategory.toJSON(e));
|
|
319
|
+
}
|
|
304
320
|
return obj;
|
|
305
321
|
},
|
|
306
322
|
create(base) {
|
|
@@ -323,6 +339,7 @@ export const App = {
|
|
|
323
339
|
message.privacyPolicy = object.privacyPolicy ?? "";
|
|
324
340
|
message.requestedPermissionScopes = object.requestedPermissionScopes?.map((e) => e) || [];
|
|
325
341
|
message.renderVersion = object.renderVersion ?? undefined;
|
|
342
|
+
message.categories = object.categories?.map((e) => AppCategory.fromPartial(e)) || [];
|
|
326
343
|
return message;
|
|
327
344
|
},
|
|
328
345
|
};
|
|
@@ -536,6 +553,88 @@ export const AppConfig_EntrypointsEntry = {
|
|
|
536
553
|
},
|
|
537
554
|
};
|
|
538
555
|
messageTypeRegistry.set(AppConfig_EntrypointsEntry.$type, AppConfig_EntrypointsEntry);
|
|
556
|
+
function createBaseAppCategory() {
|
|
557
|
+
return { id: 0, name: "", parentId: undefined };
|
|
558
|
+
}
|
|
559
|
+
export const AppCategory = {
|
|
560
|
+
$type: "reddit.devvit.common.v1.AppCategory",
|
|
561
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
562
|
+
if (message.id !== 0) {
|
|
563
|
+
writer.uint32(8).int32(message.id);
|
|
564
|
+
}
|
|
565
|
+
if (message.name !== "") {
|
|
566
|
+
writer.uint32(18).string(message.name);
|
|
567
|
+
}
|
|
568
|
+
if (message.parentId !== undefined) {
|
|
569
|
+
writer.uint32(24).int32(message.parentId);
|
|
570
|
+
}
|
|
571
|
+
return writer;
|
|
572
|
+
},
|
|
573
|
+
decode(input, length) {
|
|
574
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
575
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
576
|
+
const message = createBaseAppCategory();
|
|
577
|
+
while (reader.pos < end) {
|
|
578
|
+
const tag = reader.uint32();
|
|
579
|
+
switch (tag >>> 3) {
|
|
580
|
+
case 1:
|
|
581
|
+
if (tag !== 8) {
|
|
582
|
+
break;
|
|
583
|
+
}
|
|
584
|
+
message.id = reader.int32();
|
|
585
|
+
continue;
|
|
586
|
+
case 2:
|
|
587
|
+
if (tag !== 18) {
|
|
588
|
+
break;
|
|
589
|
+
}
|
|
590
|
+
message.name = reader.string();
|
|
591
|
+
continue;
|
|
592
|
+
case 3:
|
|
593
|
+
if (tag !== 24) {
|
|
594
|
+
break;
|
|
595
|
+
}
|
|
596
|
+
message.parentId = reader.int32();
|
|
597
|
+
continue;
|
|
598
|
+
}
|
|
599
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
600
|
+
break;
|
|
601
|
+
}
|
|
602
|
+
reader.skipType(tag & 7);
|
|
603
|
+
}
|
|
604
|
+
return message;
|
|
605
|
+
},
|
|
606
|
+
fromJSON(object) {
|
|
607
|
+
return {
|
|
608
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
609
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
610
|
+
parentId: isSet(object.parentId) ? globalThis.Number(object.parentId) : undefined,
|
|
611
|
+
};
|
|
612
|
+
},
|
|
613
|
+
toJSON(message) {
|
|
614
|
+
const obj = {};
|
|
615
|
+
if (message.id !== 0) {
|
|
616
|
+
obj.id = Math.round(message.id);
|
|
617
|
+
}
|
|
618
|
+
if (message.name !== "") {
|
|
619
|
+
obj.name = message.name;
|
|
620
|
+
}
|
|
621
|
+
if (message.parentId !== undefined) {
|
|
622
|
+
obj.parentId = Math.round(message.parentId);
|
|
623
|
+
}
|
|
624
|
+
return obj;
|
|
625
|
+
},
|
|
626
|
+
create(base) {
|
|
627
|
+
return AppCategory.fromPartial(base ?? {});
|
|
628
|
+
},
|
|
629
|
+
fromPartial(object) {
|
|
630
|
+
const message = createBaseAppCategory();
|
|
631
|
+
message.id = object.id ?? 0;
|
|
632
|
+
message.name = object.name ?? "";
|
|
633
|
+
message.parentId = object.parentId ?? undefined;
|
|
634
|
+
return message;
|
|
635
|
+
},
|
|
636
|
+
};
|
|
637
|
+
messageTypeRegistry.set(AppCategory.$type, AppCategory);
|
|
539
638
|
function isObject(value) {
|
|
540
639
|
return typeof value === "object" && value !== null;
|
|
541
640
|
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package devvit.platform;
|
|
4
|
-
|
|
5
|
-
option go_package = "github.snooguts.net/reddit/devplatform-api/go/grpc/devvit/platform";
|
|
6
|
-
|
|
7
|
-
// RequestContext contains all the contextual information about a request
|
|
8
|
-
// This context is signed as a JWT token and passed between services
|
|
9
|
-
//
|
|
10
|
-
// Deprecated. Use devvit.platform.v1.RequestContext instead.
|
|
11
|
-
message RequestContext {
|
|
12
|
-
option deprecated = true;
|
|
13
|
-
// Installation information for the app installation
|
|
14
|
-
InstallationContext installation = 1;
|
|
15
|
-
// App information including ID, name, version, and status
|
|
16
|
-
AppContext app = 2;
|
|
17
|
-
// Post information if the request is related to a specific post
|
|
18
|
-
PostContext post = 3;
|
|
19
|
-
// Subreddit information if the request is related to a specific subreddit
|
|
20
|
-
SubredditContext subreddit = 4;
|
|
21
|
-
// User information if the request is made by an authenticated user
|
|
22
|
-
UserContext user = 5;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// InstallationContext contains information about the app installation
|
|
26
|
-
message InstallationContext {
|
|
27
|
-
// Installation ID in UUID format (e.g., "8b8ae08b-3645-49c7-b425-bd989e09bea3")
|
|
28
|
-
string id = 1;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
enum AppStatus {
|
|
32
|
-
// Default value. Should not be used for requests.
|
|
33
|
-
APP_STATUS_UNSPECIFIED = 0;
|
|
34
|
-
// App is in prerelease state
|
|
35
|
-
PRERELEASE = 1;
|
|
36
|
-
// App is published and available
|
|
37
|
-
PUBLISHED = 2;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// AppContext contains information about the Devvit app
|
|
41
|
-
message AppContext {
|
|
42
|
-
// App ID in UUID format (e.g., "550e8400-e29b-41d4-a716-446655440000")
|
|
43
|
-
string id = 1;
|
|
44
|
-
// App name also known as the slug (e.g., "my-funky-app")
|
|
45
|
-
string name = 2;
|
|
46
|
-
// Semantic version number with 4 parts (e.g., "1.2.3.4")
|
|
47
|
-
string version = 3;
|
|
48
|
-
// Current publishing status of the app
|
|
49
|
-
AppStatus status = 4;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// PostContext contains information about a Reddit post
|
|
53
|
-
message PostContext {
|
|
54
|
-
// Post ID (e.g., "t3_15bfi0")
|
|
55
|
-
string id = 1;
|
|
56
|
-
// Author's account ID (e.g., "t2_1a2b3c4d")
|
|
57
|
-
string author = 2;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// SubredditContext contains information about a Reddit subreddit
|
|
61
|
-
message SubredditContext {
|
|
62
|
-
// Subreddit name without the r/ (e.g., "testsubreddit123456")
|
|
63
|
-
string name = 1;
|
|
64
|
-
// Subreddit ID (e.g., "t5_1a2b3c")
|
|
65
|
-
string id = 2;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// UserContext contains information about a Reddit user
|
|
69
|
-
message UserContext {
|
|
70
|
-
// Reddit username, maximum 20 characters (e.g., "spez")
|
|
71
|
-
string name = 1;
|
|
72
|
-
// User's account ID (e.g., "t2_15bfi0")
|
|
73
|
-
string id = 2;
|
|
74
|
-
// Snoovatar image URL with Reddit's preview domain and query parameters
|
|
75
|
-
// (e.g., "https://preview.redd.it/snoovatar/avatars/5e7b8e37-8189-4b33-b001-250bb8bdb730-headshot.png")
|
|
76
|
-
string snoovatar = 3;
|
|
77
|
-
}
|