@devvit/protos 0.12.4-next-2025-11-17-17-50-43-ac0b9e66a.0 → 0.12.4-next-2025-11-17-18-52-58-702bd4c00.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/gateway/app_info/v1alpha/app_info.d.ts +44 -0
- package/json/devvit/gateway/app_info/v1alpha/app_info.d.ts.map +1 -0
- package/json/devvit/gateway/app_info/v1alpha/app_info.js +8 -0
- package/package.json +4 -4
- package/schema/devvit/gateway/app_info/v1alpha/app_info.proto +52 -0
- package/schema/snootobuf.lock +0 -0
- package/schema/snootobuf.redditapi.lock +0 -0
- package/types/devvit/gateway/app_info/v1alpha/app_info.d.ts +128 -0
- package/types/devvit/gateway/app_info/v1alpha/app_info.d.ts.map +1 -0
- package/types/devvit/gateway/app_info/v1alpha/app_info.js +417 -0
- package/types/devvit/gateway/app_info/v1alpha/app_info.twirp-client.d.ts +19 -0
- package/types/devvit/gateway/app_info/v1alpha/app_info.twirp-client.d.ts.map +1 -0
- package/types/devvit/gateway/app_info/v1alpha/app_info.twirp-client.js +23 -0
- package/types/devvit/gateway/app_info/v1alpha/app_info.twirp.d.ts +11 -0
- package/types/devvit/gateway/app_info/v1alpha/app_info.twirp.d.ts.map +1 -0
- package/types/devvit/gateway/app_info/v1alpha/app_info.twirp.js +88 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #app_info.ts
|
|
3
|
+
*
|
|
4
|
+
* Code generated by ts-proto. DO NOT EDIT.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
export type GetAppInfoBySlugRequest = {
|
|
8
|
+
/** app slug */
|
|
9
|
+
slug: string;
|
|
10
|
+
};
|
|
11
|
+
export type GetAppInfoBySlugResponse = {
|
|
12
|
+
app?: AppInfo | undefined;
|
|
13
|
+
};
|
|
14
|
+
export type AppInfo = {
|
|
15
|
+
/** UUID of the app */
|
|
16
|
+
id: string;
|
|
17
|
+
/** App account T2 ID */
|
|
18
|
+
appAccountId?: string | undefined;
|
|
19
|
+
/** Base part of the slug before uniquifying */
|
|
20
|
+
slugBase: string;
|
|
21
|
+
/** Unique app slug */
|
|
22
|
+
slug: string;
|
|
23
|
+
/** Human-readable name */
|
|
24
|
+
name: string;
|
|
25
|
+
/** App description */
|
|
26
|
+
description: string;
|
|
27
|
+
/** NSFW flag */
|
|
28
|
+
isNsfw: boolean;
|
|
29
|
+
/** Delisted flag */
|
|
30
|
+
isDelisted: boolean;
|
|
31
|
+
/** Archived flag */
|
|
32
|
+
isArchived: boolean;
|
|
33
|
+
/** First-party flag */
|
|
34
|
+
isFirstParty: boolean;
|
|
35
|
+
/** Moderation/flagged status */
|
|
36
|
+
isFlagged: boolean;
|
|
37
|
+
/** Created at */
|
|
38
|
+
createdAt?: string | undefined;
|
|
39
|
+
/** Owner ID */
|
|
40
|
+
ownerId: string;
|
|
41
|
+
/** Disabled flag */
|
|
42
|
+
isDisabled: boolean;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=app_info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app_info.d.ts","sourceRoot":"","sources":["../../../../../../src/json/devvit/gateway/app_info/v1alpha/app_info.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,MAAM,uBAAuB,GAAG;IACpC,eAAe;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC3B,CAAA;AAED,MAAM,MAAM,OAAO,GAAG;IACpB,sBAAsB;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,wBAAwB;IACxB,YAAY,CAAC,EACT,MAAM,GACN,SAAS,CAAC;IACd,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,oBAAoB;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,uBAAuB;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,gCAAgC;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB;IACjB,SAAS,CAAC,EACN,MAAM,GACN,SAAS,CAAC;IACd,eAAe;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/protos",
|
|
3
|
-
"version": "0.12.4-next-2025-11-17-
|
|
3
|
+
"version": "0.12.4-next-2025-11-17-18-52-58-702bd4c00.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@ampproject/filesize": "4.3.0",
|
|
68
|
-
"@devvit/repo-tools": "0.12.4-next-2025-11-17-
|
|
69
|
-
"@devvit/tsconfig": "0.12.4-next-2025-11-17-
|
|
68
|
+
"@devvit/repo-tools": "0.12.4-next-2025-11-17-18-52-58-702bd4c00.0",
|
|
69
|
+
"@devvit/tsconfig": "0.12.4-next-2025-11-17-18-52-58-702bd4c00.0",
|
|
70
70
|
"@protobuf-ts/plugin": "2.9.3",
|
|
71
71
|
"chokidar-cli": "3.0.0",
|
|
72
72
|
"esbuild": "0.25.9",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
]
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "fd98a602da395d015f4235dc19dea8548b4ede1c"
|
|
100
100
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package devvit.gateway.app_info.v1alpha;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/timestamp.proto";
|
|
6
|
+
|
|
7
|
+
option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/gateway/appinfo";
|
|
8
|
+
|
|
9
|
+
// AppInfoService provides read-only information about apps, fetched by slug.
|
|
10
|
+
service AppInfoService {
|
|
11
|
+
// GetAppInfoBySlug returns minimal information about an app identified by slug.
|
|
12
|
+
rpc GetAppInfoBySlug(GetAppInfoBySlugRequest) returns (GetAppInfoBySlugResponse);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message GetAppInfoBySlugRequest {
|
|
16
|
+
string slug = 1; // app slug
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message GetAppInfoBySlugResponse {
|
|
20
|
+
AppInfo app = 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message AppInfo {
|
|
24
|
+
// UUID of the app
|
|
25
|
+
string id = 1;
|
|
26
|
+
// App account T2 ID
|
|
27
|
+
optional string app_account_id = 2;
|
|
28
|
+
// Base part of the slug before uniquifying
|
|
29
|
+
string slug_base = 3;
|
|
30
|
+
// Unique app slug
|
|
31
|
+
string slug = 4;
|
|
32
|
+
// Human-readable name
|
|
33
|
+
string name = 5;
|
|
34
|
+
// App description
|
|
35
|
+
string description = 6;
|
|
36
|
+
// NSFW flag
|
|
37
|
+
bool is_nsfw = 7;
|
|
38
|
+
// Delisted flag
|
|
39
|
+
bool is_delisted = 8;
|
|
40
|
+
// Archived flag
|
|
41
|
+
bool is_archived = 9;
|
|
42
|
+
// First-party flag
|
|
43
|
+
bool is_first_party = 10;
|
|
44
|
+
// Moderation/flagged status
|
|
45
|
+
bool is_flagged = 11;
|
|
46
|
+
// Created at
|
|
47
|
+
google.protobuf.Timestamp created_at = 12;
|
|
48
|
+
// Owner ID
|
|
49
|
+
string owner_id = 13;
|
|
50
|
+
// Disabled flag
|
|
51
|
+
bool is_disabled = 14;
|
|
52
|
+
}
|
package/schema/snootobuf.lock
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #app_info.ts
|
|
3
|
+
*
|
|
4
|
+
* Code generated by ts-proto. DO NOT EDIT.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import _m0 from "protobufjs/minimal.js";
|
|
8
|
+
import { Metadata } from "../../../../../lib/Types.js";
|
|
9
|
+
export interface GetAppInfoBySlugRequest {
|
|
10
|
+
/** app slug */
|
|
11
|
+
slug: string;
|
|
12
|
+
}
|
|
13
|
+
export interface GetAppInfoBySlugResponse {
|
|
14
|
+
app?: AppInfo | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface AppInfo {
|
|
17
|
+
/** UUID of the app */
|
|
18
|
+
id: string;
|
|
19
|
+
/** App account T2 ID */
|
|
20
|
+
appAccountId?: string | undefined;
|
|
21
|
+
/** Base part of the slug before uniquifying */
|
|
22
|
+
slugBase: string;
|
|
23
|
+
/** Unique app slug */
|
|
24
|
+
slug: string;
|
|
25
|
+
/** Human-readable name */
|
|
26
|
+
name: string;
|
|
27
|
+
/** App description */
|
|
28
|
+
description: string;
|
|
29
|
+
/** NSFW flag */
|
|
30
|
+
isNsfw: boolean;
|
|
31
|
+
/** Delisted flag */
|
|
32
|
+
isDelisted: boolean;
|
|
33
|
+
/** Archived flag */
|
|
34
|
+
isArchived: boolean;
|
|
35
|
+
/** First-party flag */
|
|
36
|
+
isFirstParty: boolean;
|
|
37
|
+
/** Moderation/flagged status */
|
|
38
|
+
isFlagged: boolean;
|
|
39
|
+
/** Created at */
|
|
40
|
+
createdAt?: Date | undefined;
|
|
41
|
+
/** Owner ID */
|
|
42
|
+
ownerId: string;
|
|
43
|
+
/** Disabled flag */
|
|
44
|
+
isDisabled: boolean;
|
|
45
|
+
}
|
|
46
|
+
export declare const GetAppInfoBySlugRequest: {
|
|
47
|
+
$type: "devvit.gateway.app_info.v1alpha.GetAppInfoBySlugRequest";
|
|
48
|
+
encode(message: GetAppInfoBySlugRequest, writer?: _m0.Writer): _m0.Writer;
|
|
49
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GetAppInfoBySlugRequest;
|
|
50
|
+
fromJSON(object: any): GetAppInfoBySlugRequest;
|
|
51
|
+
toJSON(message: GetAppInfoBySlugRequest): unknown;
|
|
52
|
+
create(base?: DeepPartial<GetAppInfoBySlugRequest>): GetAppInfoBySlugRequest;
|
|
53
|
+
fromPartial(object: DeepPartial<GetAppInfoBySlugRequest>): GetAppInfoBySlugRequest;
|
|
54
|
+
};
|
|
55
|
+
export declare const GetAppInfoBySlugResponse: {
|
|
56
|
+
$type: "devvit.gateway.app_info.v1alpha.GetAppInfoBySlugResponse";
|
|
57
|
+
encode(message: GetAppInfoBySlugResponse, writer?: _m0.Writer): _m0.Writer;
|
|
58
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GetAppInfoBySlugResponse;
|
|
59
|
+
fromJSON(object: any): GetAppInfoBySlugResponse;
|
|
60
|
+
toJSON(message: GetAppInfoBySlugResponse): unknown;
|
|
61
|
+
create(base?: DeepPartial<GetAppInfoBySlugResponse>): GetAppInfoBySlugResponse;
|
|
62
|
+
fromPartial(object: DeepPartial<GetAppInfoBySlugResponse>): GetAppInfoBySlugResponse;
|
|
63
|
+
};
|
|
64
|
+
export declare const AppInfo: {
|
|
65
|
+
$type: "devvit.gateway.app_info.v1alpha.AppInfo";
|
|
66
|
+
encode(message: AppInfo, writer?: _m0.Writer): _m0.Writer;
|
|
67
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): AppInfo;
|
|
68
|
+
fromJSON(object: any): AppInfo;
|
|
69
|
+
toJSON(message: AppInfo): unknown;
|
|
70
|
+
create(base?: DeepPartial<AppInfo>): AppInfo;
|
|
71
|
+
fromPartial(object: DeepPartial<AppInfo>): AppInfo;
|
|
72
|
+
};
|
|
73
|
+
/** AppInfoService provides read-only information about apps, fetched by slug. */
|
|
74
|
+
export interface AppInfoService {
|
|
75
|
+
/** GetAppInfoBySlug returns minimal information about an app identified by slug. */
|
|
76
|
+
GetAppInfoBySlug(request: GetAppInfoBySlugRequest, metadata?: Metadata): Promise<GetAppInfoBySlugResponse>;
|
|
77
|
+
}
|
|
78
|
+
export declare const AppInfoServiceServiceName = "devvit.gateway.app_info.v1alpha.AppInfoService";
|
|
79
|
+
export declare class AppInfoServiceClientImpl implements AppInfoService {
|
|
80
|
+
private readonly rpc;
|
|
81
|
+
private readonly service;
|
|
82
|
+
constructor(rpc: Rpc, opts?: {
|
|
83
|
+
service?: string;
|
|
84
|
+
});
|
|
85
|
+
GetAppInfoBySlug(request: GetAppInfoBySlugRequest, metadata?: Metadata): Promise<GetAppInfoBySlugResponse>;
|
|
86
|
+
}
|
|
87
|
+
/** AppInfoService provides read-only information about apps, fetched by slug. */
|
|
88
|
+
export type AppInfoServiceDefinition = typeof AppInfoServiceDefinition;
|
|
89
|
+
export declare const AppInfoServiceDefinition: {
|
|
90
|
+
readonly name: "AppInfoService";
|
|
91
|
+
readonly fullName: "devvit.gateway.app_info.v1alpha.AppInfoService";
|
|
92
|
+
readonly methods: {
|
|
93
|
+
/** GetAppInfoBySlug returns minimal information about an app identified by slug. */
|
|
94
|
+
readonly getAppInfoBySlug: {
|
|
95
|
+
readonly name: "GetAppInfoBySlug";
|
|
96
|
+
readonly requestType: {
|
|
97
|
+
$type: "devvit.gateway.app_info.v1alpha.GetAppInfoBySlugRequest";
|
|
98
|
+
encode(message: GetAppInfoBySlugRequest, writer?: _m0.Writer): _m0.Writer;
|
|
99
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GetAppInfoBySlugRequest;
|
|
100
|
+
fromJSON(object: any): GetAppInfoBySlugRequest;
|
|
101
|
+
toJSON(message: GetAppInfoBySlugRequest): unknown;
|
|
102
|
+
create(base?: DeepPartial<GetAppInfoBySlugRequest>): GetAppInfoBySlugRequest;
|
|
103
|
+
fromPartial(object: DeepPartial<GetAppInfoBySlugRequest>): GetAppInfoBySlugRequest;
|
|
104
|
+
};
|
|
105
|
+
readonly requestStream: false;
|
|
106
|
+
readonly responseType: {
|
|
107
|
+
$type: "devvit.gateway.app_info.v1alpha.GetAppInfoBySlugResponse";
|
|
108
|
+
encode(message: GetAppInfoBySlugResponse, writer?: _m0.Writer): _m0.Writer;
|
|
109
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GetAppInfoBySlugResponse;
|
|
110
|
+
fromJSON(object: any): GetAppInfoBySlugResponse;
|
|
111
|
+
toJSON(message: GetAppInfoBySlugResponse): unknown;
|
|
112
|
+
create(base?: DeepPartial<GetAppInfoBySlugResponse>): GetAppInfoBySlugResponse;
|
|
113
|
+
fromPartial(object: DeepPartial<GetAppInfoBySlugResponse>): GetAppInfoBySlugResponse;
|
|
114
|
+
};
|
|
115
|
+
readonly responseStream: false;
|
|
116
|
+
readonly options: {};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
interface Rpc {
|
|
121
|
+
request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
|
|
122
|
+
}
|
|
123
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
124
|
+
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 {} ? {
|
|
125
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
126
|
+
} : Partial<T>;
|
|
127
|
+
export {};
|
|
128
|
+
//# sourceMappingURL=app_info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app_info.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/g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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"}
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #app_info.ts
|
|
3
|
+
*
|
|
4
|
+
* Code generated by ts-proto. DO NOT EDIT.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import _m0 from "protobufjs/minimal.js";
|
|
9
|
+
import { Timestamp } from "../../../../google/protobuf/timestamp.js";
|
|
10
|
+
import { messageTypeRegistry } from "../../../../typeRegistry.js";
|
|
11
|
+
function createBaseGetAppInfoBySlugRequest() {
|
|
12
|
+
return { slug: "" };
|
|
13
|
+
}
|
|
14
|
+
export const GetAppInfoBySlugRequest = {
|
|
15
|
+
$type: "devvit.gateway.app_info.v1alpha.GetAppInfoBySlugRequest",
|
|
16
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
17
|
+
if (message.slug !== "") {
|
|
18
|
+
writer.uint32(10).string(message.slug);
|
|
19
|
+
}
|
|
20
|
+
return writer;
|
|
21
|
+
},
|
|
22
|
+
decode(input, length) {
|
|
23
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
24
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
25
|
+
const message = createBaseGetAppInfoBySlugRequest();
|
|
26
|
+
while (reader.pos < end) {
|
|
27
|
+
const tag = reader.uint32();
|
|
28
|
+
switch (tag >>> 3) {
|
|
29
|
+
case 1:
|
|
30
|
+
if (tag !== 10) {
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
message.slug = reader.string();
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
reader.skipType(tag & 7);
|
|
40
|
+
}
|
|
41
|
+
return message;
|
|
42
|
+
},
|
|
43
|
+
fromJSON(object) {
|
|
44
|
+
return { slug: isSet(object.slug) ? globalThis.String(object.slug) : "" };
|
|
45
|
+
},
|
|
46
|
+
toJSON(message) {
|
|
47
|
+
const obj = {};
|
|
48
|
+
if (message.slug !== "") {
|
|
49
|
+
obj.slug = message.slug;
|
|
50
|
+
}
|
|
51
|
+
return obj;
|
|
52
|
+
},
|
|
53
|
+
create(base) {
|
|
54
|
+
return GetAppInfoBySlugRequest.fromPartial(base ?? {});
|
|
55
|
+
},
|
|
56
|
+
fromPartial(object) {
|
|
57
|
+
const message = createBaseGetAppInfoBySlugRequest();
|
|
58
|
+
message.slug = object.slug ?? "";
|
|
59
|
+
return message;
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
messageTypeRegistry.set(GetAppInfoBySlugRequest.$type, GetAppInfoBySlugRequest);
|
|
63
|
+
function createBaseGetAppInfoBySlugResponse() {
|
|
64
|
+
return { app: undefined };
|
|
65
|
+
}
|
|
66
|
+
export const GetAppInfoBySlugResponse = {
|
|
67
|
+
$type: "devvit.gateway.app_info.v1alpha.GetAppInfoBySlugResponse",
|
|
68
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
69
|
+
if (message.app !== undefined) {
|
|
70
|
+
AppInfo.encode(message.app, writer.uint32(10).fork()).ldelim();
|
|
71
|
+
}
|
|
72
|
+
return writer;
|
|
73
|
+
},
|
|
74
|
+
decode(input, length) {
|
|
75
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
76
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
77
|
+
const message = createBaseGetAppInfoBySlugResponse();
|
|
78
|
+
while (reader.pos < end) {
|
|
79
|
+
const tag = reader.uint32();
|
|
80
|
+
switch (tag >>> 3) {
|
|
81
|
+
case 1:
|
|
82
|
+
if (tag !== 10) {
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
message.app = AppInfo.decode(reader, reader.uint32());
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
reader.skipType(tag & 7);
|
|
92
|
+
}
|
|
93
|
+
return message;
|
|
94
|
+
},
|
|
95
|
+
fromJSON(object) {
|
|
96
|
+
return { app: isSet(object.app) ? AppInfo.fromJSON(object.app) : undefined };
|
|
97
|
+
},
|
|
98
|
+
toJSON(message) {
|
|
99
|
+
const obj = {};
|
|
100
|
+
if (message.app !== undefined) {
|
|
101
|
+
obj.app = AppInfo.toJSON(message.app);
|
|
102
|
+
}
|
|
103
|
+
return obj;
|
|
104
|
+
},
|
|
105
|
+
create(base) {
|
|
106
|
+
return GetAppInfoBySlugResponse.fromPartial(base ?? {});
|
|
107
|
+
},
|
|
108
|
+
fromPartial(object) {
|
|
109
|
+
const message = createBaseGetAppInfoBySlugResponse();
|
|
110
|
+
message.app = (object.app !== undefined && object.app !== null) ? AppInfo.fromPartial(object.app) : undefined;
|
|
111
|
+
return message;
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
messageTypeRegistry.set(GetAppInfoBySlugResponse.$type, GetAppInfoBySlugResponse);
|
|
115
|
+
function createBaseAppInfo() {
|
|
116
|
+
return {
|
|
117
|
+
id: "",
|
|
118
|
+
appAccountId: undefined,
|
|
119
|
+
slugBase: "",
|
|
120
|
+
slug: "",
|
|
121
|
+
name: "",
|
|
122
|
+
description: "",
|
|
123
|
+
isNsfw: false,
|
|
124
|
+
isDelisted: false,
|
|
125
|
+
isArchived: false,
|
|
126
|
+
isFirstParty: false,
|
|
127
|
+
isFlagged: false,
|
|
128
|
+
createdAt: undefined,
|
|
129
|
+
ownerId: "",
|
|
130
|
+
isDisabled: false,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
export const AppInfo = {
|
|
134
|
+
$type: "devvit.gateway.app_info.v1alpha.AppInfo",
|
|
135
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
136
|
+
if (message.id !== "") {
|
|
137
|
+
writer.uint32(10).string(message.id);
|
|
138
|
+
}
|
|
139
|
+
if (message.appAccountId !== undefined) {
|
|
140
|
+
writer.uint32(18).string(message.appAccountId);
|
|
141
|
+
}
|
|
142
|
+
if (message.slugBase !== "") {
|
|
143
|
+
writer.uint32(26).string(message.slugBase);
|
|
144
|
+
}
|
|
145
|
+
if (message.slug !== "") {
|
|
146
|
+
writer.uint32(34).string(message.slug);
|
|
147
|
+
}
|
|
148
|
+
if (message.name !== "") {
|
|
149
|
+
writer.uint32(42).string(message.name);
|
|
150
|
+
}
|
|
151
|
+
if (message.description !== "") {
|
|
152
|
+
writer.uint32(50).string(message.description);
|
|
153
|
+
}
|
|
154
|
+
if (message.isNsfw !== false) {
|
|
155
|
+
writer.uint32(56).bool(message.isNsfw);
|
|
156
|
+
}
|
|
157
|
+
if (message.isDelisted !== false) {
|
|
158
|
+
writer.uint32(64).bool(message.isDelisted);
|
|
159
|
+
}
|
|
160
|
+
if (message.isArchived !== false) {
|
|
161
|
+
writer.uint32(72).bool(message.isArchived);
|
|
162
|
+
}
|
|
163
|
+
if (message.isFirstParty !== false) {
|
|
164
|
+
writer.uint32(80).bool(message.isFirstParty);
|
|
165
|
+
}
|
|
166
|
+
if (message.isFlagged !== false) {
|
|
167
|
+
writer.uint32(88).bool(message.isFlagged);
|
|
168
|
+
}
|
|
169
|
+
if (message.createdAt !== undefined) {
|
|
170
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(98).fork()).ldelim();
|
|
171
|
+
}
|
|
172
|
+
if (message.ownerId !== "") {
|
|
173
|
+
writer.uint32(106).string(message.ownerId);
|
|
174
|
+
}
|
|
175
|
+
if (message.isDisabled !== false) {
|
|
176
|
+
writer.uint32(112).bool(message.isDisabled);
|
|
177
|
+
}
|
|
178
|
+
return writer;
|
|
179
|
+
},
|
|
180
|
+
decode(input, length) {
|
|
181
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
182
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
183
|
+
const message = createBaseAppInfo();
|
|
184
|
+
while (reader.pos < end) {
|
|
185
|
+
const tag = reader.uint32();
|
|
186
|
+
switch (tag >>> 3) {
|
|
187
|
+
case 1:
|
|
188
|
+
if (tag !== 10) {
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
message.id = reader.string();
|
|
192
|
+
continue;
|
|
193
|
+
case 2:
|
|
194
|
+
if (tag !== 18) {
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
message.appAccountId = reader.string();
|
|
198
|
+
continue;
|
|
199
|
+
case 3:
|
|
200
|
+
if (tag !== 26) {
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
message.slugBase = reader.string();
|
|
204
|
+
continue;
|
|
205
|
+
case 4:
|
|
206
|
+
if (tag !== 34) {
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
message.slug = reader.string();
|
|
210
|
+
continue;
|
|
211
|
+
case 5:
|
|
212
|
+
if (tag !== 42) {
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
message.name = reader.string();
|
|
216
|
+
continue;
|
|
217
|
+
case 6:
|
|
218
|
+
if (tag !== 50) {
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
message.description = reader.string();
|
|
222
|
+
continue;
|
|
223
|
+
case 7:
|
|
224
|
+
if (tag !== 56) {
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
message.isNsfw = reader.bool();
|
|
228
|
+
continue;
|
|
229
|
+
case 8:
|
|
230
|
+
if (tag !== 64) {
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
message.isDelisted = reader.bool();
|
|
234
|
+
continue;
|
|
235
|
+
case 9:
|
|
236
|
+
if (tag !== 72) {
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
message.isArchived = reader.bool();
|
|
240
|
+
continue;
|
|
241
|
+
case 10:
|
|
242
|
+
if (tag !== 80) {
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
message.isFirstParty = reader.bool();
|
|
246
|
+
continue;
|
|
247
|
+
case 11:
|
|
248
|
+
if (tag !== 88) {
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
message.isFlagged = reader.bool();
|
|
252
|
+
continue;
|
|
253
|
+
case 12:
|
|
254
|
+
if (tag !== 98) {
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
258
|
+
continue;
|
|
259
|
+
case 13:
|
|
260
|
+
if (tag !== 106) {
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
message.ownerId = reader.string();
|
|
264
|
+
continue;
|
|
265
|
+
case 14:
|
|
266
|
+
if (tag !== 112) {
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
message.isDisabled = reader.bool();
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
reader.skipType(tag & 7);
|
|
276
|
+
}
|
|
277
|
+
return message;
|
|
278
|
+
},
|
|
279
|
+
fromJSON(object) {
|
|
280
|
+
return {
|
|
281
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
282
|
+
appAccountId: isSet(object.appAccountId) ? globalThis.String(object.appAccountId) : undefined,
|
|
283
|
+
slugBase: isSet(object.slugBase) ? globalThis.String(object.slugBase) : "",
|
|
284
|
+
slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
|
|
285
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
286
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
287
|
+
isNsfw: isSet(object.isNsfw) ? globalThis.Boolean(object.isNsfw) : false,
|
|
288
|
+
isDelisted: isSet(object.isDelisted) ? globalThis.Boolean(object.isDelisted) : false,
|
|
289
|
+
isArchived: isSet(object.isArchived) ? globalThis.Boolean(object.isArchived) : false,
|
|
290
|
+
isFirstParty: isSet(object.isFirstParty) ? globalThis.Boolean(object.isFirstParty) : false,
|
|
291
|
+
isFlagged: isSet(object.isFlagged) ? globalThis.Boolean(object.isFlagged) : false,
|
|
292
|
+
createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
|
|
293
|
+
ownerId: isSet(object.ownerId) ? globalThis.String(object.ownerId) : "",
|
|
294
|
+
isDisabled: isSet(object.isDisabled) ? globalThis.Boolean(object.isDisabled) : false,
|
|
295
|
+
};
|
|
296
|
+
},
|
|
297
|
+
toJSON(message) {
|
|
298
|
+
const obj = {};
|
|
299
|
+
if (message.id !== "") {
|
|
300
|
+
obj.id = message.id;
|
|
301
|
+
}
|
|
302
|
+
if (message.appAccountId !== undefined) {
|
|
303
|
+
obj.appAccountId = message.appAccountId;
|
|
304
|
+
}
|
|
305
|
+
if (message.slugBase !== "") {
|
|
306
|
+
obj.slugBase = message.slugBase;
|
|
307
|
+
}
|
|
308
|
+
if (message.slug !== "") {
|
|
309
|
+
obj.slug = message.slug;
|
|
310
|
+
}
|
|
311
|
+
if (message.name !== "") {
|
|
312
|
+
obj.name = message.name;
|
|
313
|
+
}
|
|
314
|
+
if (message.description !== "") {
|
|
315
|
+
obj.description = message.description;
|
|
316
|
+
}
|
|
317
|
+
if (message.isNsfw !== false) {
|
|
318
|
+
obj.isNsfw = message.isNsfw;
|
|
319
|
+
}
|
|
320
|
+
if (message.isDelisted !== false) {
|
|
321
|
+
obj.isDelisted = message.isDelisted;
|
|
322
|
+
}
|
|
323
|
+
if (message.isArchived !== false) {
|
|
324
|
+
obj.isArchived = message.isArchived;
|
|
325
|
+
}
|
|
326
|
+
if (message.isFirstParty !== false) {
|
|
327
|
+
obj.isFirstParty = message.isFirstParty;
|
|
328
|
+
}
|
|
329
|
+
if (message.isFlagged !== false) {
|
|
330
|
+
obj.isFlagged = message.isFlagged;
|
|
331
|
+
}
|
|
332
|
+
if (message.createdAt !== undefined) {
|
|
333
|
+
obj.createdAt = message.createdAt.toISOString();
|
|
334
|
+
}
|
|
335
|
+
if (message.ownerId !== "") {
|
|
336
|
+
obj.ownerId = message.ownerId;
|
|
337
|
+
}
|
|
338
|
+
if (message.isDisabled !== false) {
|
|
339
|
+
obj.isDisabled = message.isDisabled;
|
|
340
|
+
}
|
|
341
|
+
return obj;
|
|
342
|
+
},
|
|
343
|
+
create(base) {
|
|
344
|
+
return AppInfo.fromPartial(base ?? {});
|
|
345
|
+
},
|
|
346
|
+
fromPartial(object) {
|
|
347
|
+
const message = createBaseAppInfo();
|
|
348
|
+
message.id = object.id ?? "";
|
|
349
|
+
message.appAccountId = object.appAccountId ?? undefined;
|
|
350
|
+
message.slugBase = object.slugBase ?? "";
|
|
351
|
+
message.slug = object.slug ?? "";
|
|
352
|
+
message.name = object.name ?? "";
|
|
353
|
+
message.description = object.description ?? "";
|
|
354
|
+
message.isNsfw = object.isNsfw ?? false;
|
|
355
|
+
message.isDelisted = object.isDelisted ?? false;
|
|
356
|
+
message.isArchived = object.isArchived ?? false;
|
|
357
|
+
message.isFirstParty = object.isFirstParty ?? false;
|
|
358
|
+
message.isFlagged = object.isFlagged ?? false;
|
|
359
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
360
|
+
message.ownerId = object.ownerId ?? "";
|
|
361
|
+
message.isDisabled = object.isDisabled ?? false;
|
|
362
|
+
return message;
|
|
363
|
+
},
|
|
364
|
+
};
|
|
365
|
+
messageTypeRegistry.set(AppInfo.$type, AppInfo);
|
|
366
|
+
export const AppInfoServiceServiceName = "devvit.gateway.app_info.v1alpha.AppInfoService";
|
|
367
|
+
export class AppInfoServiceClientImpl {
|
|
368
|
+
constructor(rpc, opts) {
|
|
369
|
+
this.service = opts?.service || AppInfoServiceServiceName;
|
|
370
|
+
this.rpc = rpc;
|
|
371
|
+
this.GetAppInfoBySlug = this.GetAppInfoBySlug.bind(this);
|
|
372
|
+
}
|
|
373
|
+
GetAppInfoBySlug(request, metadata) {
|
|
374
|
+
const data = GetAppInfoBySlugRequest.encode(request).finish();
|
|
375
|
+
const promise = this.rpc.request(this.service, "GetAppInfoBySlug", data, metadata);
|
|
376
|
+
return promise.then((data) => GetAppInfoBySlugResponse.decode(_m0.Reader.create(data)));
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
export const AppInfoServiceDefinition = {
|
|
380
|
+
name: "AppInfoService",
|
|
381
|
+
fullName: "devvit.gateway.app_info.v1alpha.AppInfoService",
|
|
382
|
+
methods: {
|
|
383
|
+
/** GetAppInfoBySlug returns minimal information about an app identified by slug. */
|
|
384
|
+
getAppInfoBySlug: {
|
|
385
|
+
name: "GetAppInfoBySlug",
|
|
386
|
+
requestType: GetAppInfoBySlugRequest,
|
|
387
|
+
requestStream: false,
|
|
388
|
+
responseType: GetAppInfoBySlugResponse,
|
|
389
|
+
responseStream: false,
|
|
390
|
+
options: {},
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
};
|
|
394
|
+
function toTimestamp(date) {
|
|
395
|
+
const seconds = Math.trunc(date.getTime() / 1000);
|
|
396
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
397
|
+
return { seconds, nanos };
|
|
398
|
+
}
|
|
399
|
+
function fromTimestamp(t) {
|
|
400
|
+
let millis = (t.seconds || 0) * 1000;
|
|
401
|
+
millis += (t.nanos || 0) / 1000000;
|
|
402
|
+
return new globalThis.Date(millis);
|
|
403
|
+
}
|
|
404
|
+
function fromJsonTimestamp(o) {
|
|
405
|
+
if (o instanceof globalThis.Date) {
|
|
406
|
+
return o;
|
|
407
|
+
}
|
|
408
|
+
else if (typeof o === "string") {
|
|
409
|
+
return new globalThis.Date(o);
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
return fromTimestamp(Timestamp.fromJSON(o));
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
function isSet(value) {
|
|
416
|
+
return value !== null && value !== undefined;
|
|
417
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GetAppInfoBySlugRequest, GetAppInfoBySlugResponse } from './app_info.js';
|
|
2
|
+
interface Rpc {
|
|
3
|
+
request(service: string, method: string, contentType: 'application/json' | 'application/protobuf', data: object | Uint8Array): Promise<object | Uint8Array>;
|
|
4
|
+
}
|
|
5
|
+
export interface AppInfoServiceClient {
|
|
6
|
+
GetAppInfoBySlug(request: GetAppInfoBySlugRequest): Promise<GetAppInfoBySlugResponse>;
|
|
7
|
+
}
|
|
8
|
+
export declare class AppInfoServiceClientJSON implements AppInfoServiceClient {
|
|
9
|
+
private readonly rpc;
|
|
10
|
+
constructor(rpc: Rpc);
|
|
11
|
+
GetAppInfoBySlug(request: GetAppInfoBySlugRequest): Promise<GetAppInfoBySlugResponse>;
|
|
12
|
+
}
|
|
13
|
+
export declare class AppInfoServiceClientProtobuf implements AppInfoServiceClient {
|
|
14
|
+
private readonly rpc;
|
|
15
|
+
constructor(rpc: Rpc);
|
|
16
|
+
GetAppInfoBySlug(request: GetAppInfoBySlugRequest): Promise<GetAppInfoBySlugResponse>;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=app_info.twirp-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app_info.twirp-client.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/gateway/app_info/v1alpha/app_info.twirp-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAMlF,UAAU,GAAG;IACX,OAAO,CACL,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,kBAAkB,GAAG,sBAAsB,EACxD,IAAI,EAAE,MAAM,GAAG,UAAU,GACxB,OAAO,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,CACd,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACtC;AAED,qBAAa,wBAAyB,YAAW,oBAAoB;IACnE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;gBACd,GAAG,EAAE,GAAG;IAIpB,gBAAgB,CACd,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,wBAAwB,CAAC;CAYrC;AAED,qBAAa,4BAA6B,YAAW,oBAAoB;IACvE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;gBACd,GAAG,EAAE,GAAG;IAIpB,gBAAgB,CACd,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,wBAAwB,CAAC;CAYrC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GetAppInfoBySlugRequest, GetAppInfoBySlugResponse } from './app_info.js';
|
|
2
|
+
export class AppInfoServiceClientJSON {
|
|
3
|
+
constructor(rpc) {
|
|
4
|
+
this.rpc = rpc;
|
|
5
|
+
this.GetAppInfoBySlug.bind(this);
|
|
6
|
+
}
|
|
7
|
+
GetAppInfoBySlug(request) {
|
|
8
|
+
const data = GetAppInfoBySlugRequest.toJSON(request);
|
|
9
|
+
const promise = this.rpc.request('devvit.gateway.app_info.v1alpha.AppInfoService', 'GetAppInfoBySlug', 'application/json', data);
|
|
10
|
+
return promise.then((data) => GetAppInfoBySlugResponse.fromJSON(data));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class AppInfoServiceClientProtobuf {
|
|
14
|
+
constructor(rpc) {
|
|
15
|
+
this.rpc = rpc;
|
|
16
|
+
this.GetAppInfoBySlug.bind(this);
|
|
17
|
+
}
|
|
18
|
+
GetAppInfoBySlug(request) {
|
|
19
|
+
const data = GetAppInfoBySlugRequest.encode(request).finish();
|
|
20
|
+
const promise = this.rpc.request('devvit.gateway.app_info.v1alpha.AppInfoService', 'GetAppInfoBySlug', 'application/protobuf', data);
|
|
21
|
+
return promise.then((data) => GetAppInfoBySlugResponse.decode(data));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TwirpContext, TwirpServer } from 'twirp-ts';
|
|
2
|
+
import { GetAppInfoBySlugRequest, GetAppInfoBySlugResponse } from './app_info.js';
|
|
3
|
+
export interface AppInfoServiceTwirp<T extends TwirpContext = TwirpContext> {
|
|
4
|
+
GetAppInfoBySlug(ctx: T, request: GetAppInfoBySlugRequest): Promise<GetAppInfoBySlugResponse>;
|
|
5
|
+
}
|
|
6
|
+
export declare enum AppInfoServiceMethod {
|
|
7
|
+
GetAppInfoBySlug = "GetAppInfoBySlug"
|
|
8
|
+
}
|
|
9
|
+
export declare const AppInfoServiceMethodList: AppInfoServiceMethod[];
|
|
10
|
+
export declare function createAppInfoServiceServer<T extends TwirpContext = TwirpContext>(service: AppInfoServiceTwirp<T>): TwirpServer<AppInfoServiceTwirp<TwirpContext<import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>>>, T>;
|
|
11
|
+
//# sourceMappingURL=app_info.twirp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app_info.twirp.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/gateway/app_info/v1alpha/app_info.twirp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,WAAW,EAOZ,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAMlF,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY;IACxE,gBAAgB,CACd,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACtC;AAED,oBAAY,oBAAoB;IAC9B,gBAAgB,qBAAqB;CACtC;AAED,eAAO,MAAM,wBAAwB,wBAA0C,CAAC;AAEhF,wBAAgB,0BAA0B,CACxC,CAAC,SAAS,YAAY,GAAG,YAAY,EACrC,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,oJAQhC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { TwirpServer, TwirpError, TwirpErrorCode, TwirpContentType, chainInterceptors, } from 'twirp-ts';
|
|
2
|
+
import { GetAppInfoBySlugRequest, GetAppInfoBySlugResponse } from './app_info.js';
|
|
3
|
+
export var AppInfoServiceMethod;
|
|
4
|
+
(function (AppInfoServiceMethod) {
|
|
5
|
+
AppInfoServiceMethod["GetAppInfoBySlug"] = "GetAppInfoBySlug";
|
|
6
|
+
})(AppInfoServiceMethod || (AppInfoServiceMethod = {}));
|
|
7
|
+
export const AppInfoServiceMethodList = [AppInfoServiceMethod.GetAppInfoBySlug];
|
|
8
|
+
export function createAppInfoServiceServer(service) {
|
|
9
|
+
return new TwirpServer({
|
|
10
|
+
service,
|
|
11
|
+
packageName: 'devvit.gateway.app_info.v1alpha',
|
|
12
|
+
serviceName: 'AppInfoService',
|
|
13
|
+
methodList: AppInfoServiceMethodList,
|
|
14
|
+
matchRoute: matchAppInfoServiceRoute,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function matchAppInfoServiceRoute(method, events) {
|
|
18
|
+
switch (method) {
|
|
19
|
+
case 'GetAppInfoBySlug':
|
|
20
|
+
return async (ctx, service, data, interceptors) => {
|
|
21
|
+
ctx = { ...ctx, methodName: 'GetAppInfoBySlug' };
|
|
22
|
+
await events.onMatch(ctx);
|
|
23
|
+
return handleAppInfoServiceGetAppInfoBySlugRequest(ctx, service, data, interceptors);
|
|
24
|
+
};
|
|
25
|
+
default:
|
|
26
|
+
events.onNotFound();
|
|
27
|
+
const msg = `no handler found`;
|
|
28
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function handleAppInfoServiceGetAppInfoBySlugRequest(ctx, service, data, interceptors) {
|
|
32
|
+
switch (ctx.contentType) {
|
|
33
|
+
case TwirpContentType.JSON:
|
|
34
|
+
return handleAppInfoServiceGetAppInfoBySlugJSON(ctx, service, data, interceptors);
|
|
35
|
+
case TwirpContentType.Protobuf:
|
|
36
|
+
return handleAppInfoServiceGetAppInfoBySlugProtobuf(ctx, service, data, interceptors);
|
|
37
|
+
default:
|
|
38
|
+
const msg = 'unexpected Content-Type';
|
|
39
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
async function handleAppInfoServiceGetAppInfoBySlugJSON(ctx, service, data, interceptors) {
|
|
43
|
+
let request;
|
|
44
|
+
let response;
|
|
45
|
+
try {
|
|
46
|
+
const body = JSON.parse(data.toString() || '{}');
|
|
47
|
+
request = GetAppInfoBySlugRequest.fromJSON(body);
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
if (e instanceof Error) {
|
|
51
|
+
const msg = 'the json request could not be decoded';
|
|
52
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (interceptors && interceptors.length > 0) {
|
|
56
|
+
const interceptor = chainInterceptors(...interceptors);
|
|
57
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
|
58
|
+
return service.GetAppInfoBySlug(ctx, inputReq);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
response = await service.GetAppInfoBySlug(ctx, request);
|
|
63
|
+
}
|
|
64
|
+
return JSON.stringify(GetAppInfoBySlugResponse.toJSON(response));
|
|
65
|
+
}
|
|
66
|
+
async function handleAppInfoServiceGetAppInfoBySlugProtobuf(ctx, service, data, interceptors) {
|
|
67
|
+
let request;
|
|
68
|
+
let response;
|
|
69
|
+
try {
|
|
70
|
+
request = GetAppInfoBySlugRequest.decode(data);
|
|
71
|
+
}
|
|
72
|
+
catch (e) {
|
|
73
|
+
if (e instanceof Error) {
|
|
74
|
+
const msg = 'the protobuf request could not be decoded';
|
|
75
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (interceptors && interceptors.length > 0) {
|
|
79
|
+
const interceptor = chainInterceptors(...interceptors);
|
|
80
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
|
81
|
+
return service.GetAppInfoBySlug(ctx, inputReq);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
response = await service.GetAppInfoBySlug(ctx, request);
|
|
86
|
+
}
|
|
87
|
+
return Buffer.from(GetAppInfoBySlugResponse.encode(response).finish());
|
|
88
|
+
}
|