@devvit/protos 0.12.1-next-2025-08-26-20-17-33-ee7279a56.0 → 0.12.1-next-2025-08-26-20-49-52-a45a26f69.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/community.d.ts +1 -0
- package/community.d.ts.map +1 -1
- package/community.js +1 -0
- package/json/api/proto/devvit/dev_portal/v1/installation.d.ts +8 -0
- package/json/api/proto/devvit/dev_portal/v1/installation.d.ts.map +1 -0
- package/json/api/proto/devvit/dev_portal/v1/installation.js +8 -0
- package/package.json +4 -4
- package/schema/.snootobuf/deps/api/proto/devvit/dev_portal/v1/installation.proto +12 -0
- package/schema/.snootobuf/remoteSrcs/api/proto/devvit/dev_portal/v1/installation.proto +12 -0
- package/schema/snootobuf.lock +0 -0
- package/schema/snootobuf.yaml +2 -0
- package/types/api/proto/devvit/dev_portal/v1/installation.d.ts +429 -0
- package/types/api/proto/devvit/dev_portal/v1/installation.d.ts.map +1 -0
- package/types/api/proto/devvit/dev_portal/v1/installation.js +50 -0
- package/types/api/proto/devvit/dev_portal/v1/installation.twirp-client.d.ts +22 -0
- package/types/api/proto/devvit/dev_portal/v1/installation.twirp-client.d.ts.map +1 -0
- package/types/api/proto/devvit/dev_portal/v1/installation.twirp-client.js +35 -0
- package/types/api/proto/devvit/dev_portal/v1/installation.twirp.d.ts +13 -0
- package/types/api/proto/devvit/dev_portal/v1/installation.twirp.d.ts.map +1 -0
- package/types/api/proto/devvit/dev_portal/v1/installation.twirp.js +156 -0
package/community.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export * from './lib/Types.js';
|
2
|
+
export * from './types/api/proto/devvit/dev_portal/v1/installation.js';
|
2
3
|
export * from './types/devvit/actor/settings/v1alpha/shared.js';
|
3
4
|
export * from './types/devvit/dev_portal/actor/actor_type.js';
|
4
5
|
export * from './types/devvit/dev_portal/admin/waitlist_admin.js';
|
package/community.d.ts.map
CHANGED
@@ -1 +1 @@
|
|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,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AAGpD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wDAAwD,CAAC"}
|
package/community.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
// Community schemas.
|
2
2
|
export * from './lib/Types.js';
|
3
|
+
export * from './types/api/proto/devvit/dev_portal/v1/installation.js';
|
3
4
|
export * from './types/devvit/actor/settings/v1alpha/shared.js';
|
4
5
|
export * from './types/devvit/dev_portal/actor/actor_type.js';
|
5
6
|
export * from './types/devvit/dev_portal/admin/waitlist_admin.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"installation.d.ts","sourceRoot":"","sources":["../../../../../../../src/json/api/proto/devvit/dev_portal/v1/installation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@devvit/protos",
|
3
|
-
"version": "0.12.1-next-2025-08-26-20-
|
3
|
+
"version": "0.12.1-next-2025-08-26-20-49-52-a45a26f69.0",
|
4
4
|
"license": "BSD-3-Clause",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -64,8 +64,8 @@
|
|
64
64
|
},
|
65
65
|
"devDependencies": {
|
66
66
|
"@ampproject/filesize": "4.3.0",
|
67
|
-
"@devvit/repo-tools": "0.12.1-next-2025-08-26-20-
|
68
|
-
"@devvit/tsconfig": "0.12.1-next-2025-08-26-20-
|
67
|
+
"@devvit/repo-tools": "0.12.1-next-2025-08-26-20-49-52-a45a26f69.0",
|
68
|
+
"@devvit/tsconfig": "0.12.1-next-2025-08-26-20-49-52-a45a26f69.0",
|
69
69
|
"@protobuf-ts/plugin": "2.9.3",
|
70
70
|
"@types/long": "4.0.2",
|
71
71
|
"chokidar-cli": "3.0.0",
|
@@ -96,5 +96,5 @@
|
|
96
96
|
]
|
97
97
|
}
|
98
98
|
},
|
99
|
-
"gitHead": "
|
99
|
+
"gitHead": "bfb76259072461cc072eec6e7ad98a3461d88c88"
|
100
100
|
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
package devvit.dev_portal.v1;
|
4
|
+
|
5
|
+
import "devvit/dev_portal/installation/installation.proto";
|
6
|
+
|
7
|
+
option go_package = "github.snooguts.net/reddit/devplatform-api/go/grpc/devvit/devportal/v1";
|
8
|
+
|
9
|
+
service InstallationService {
|
10
|
+
rpc Create(devvit.dev_portal.installation.InstallationCreationRequest) returns (devvit.dev_portal.installation.FullInstallationInfo);
|
11
|
+
rpc GetByAppNameAndInstallLocation(devvit.dev_portal.installation.GetByAppNameAndInstallLocationRequest) returns (devvit.dev_portal.installation.FullInstallationInfo);
|
12
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
package devvit.dev_portal.v1;
|
4
|
+
|
5
|
+
import "devvit/dev_portal/installation/installation.proto";
|
6
|
+
|
7
|
+
option go_package = "github.snooguts.net/reddit/devplatform-api/go/grpc/devvit/devportal/v1";
|
8
|
+
|
9
|
+
service InstallationService {
|
10
|
+
rpc Create(devvit.dev_portal.installation.InstallationCreationRequest) returns (devvit.dev_portal.installation.FullInstallationInfo);
|
11
|
+
rpc GetByAppNameAndInstallLocation(devvit.dev_portal.installation.GetByAppNameAndInstallLocationRequest) returns (devvit.dev_portal.installation.FullInstallationInfo);
|
12
|
+
}
|
package/schema/snootobuf.lock
CHANGED
Binary file
|
package/schema/snootobuf.yaml
CHANGED
@@ -25,6 +25,8 @@ checks:
|
|
25
25
|
|
26
26
|
remote_sources:
|
27
27
|
- git: github.snooguts.net/reddit/cloudroutines/proto@v0.28.8
|
28
|
+
|
29
|
+
- git: github.snooguts.net/reddit/devplatform-api/api/proto/devvit/dev_portal@v1.8.5 # for local development
|
28
30
|
|
29
31
|
dependencies:
|
30
32
|
- git: github.snooguts.net/reddit/data-api-firehose/protos@97f1e06
|
@@ -0,0 +1,429 @@
|
|
1
|
+
/**
|
2
|
+
* #installation.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
|
+
import { FullInstallationInfo, GetByAppNameAndInstallLocationRequest, InstallationCreationRequest } from "../../../../../devvit/dev_portal/installation/installation.js";
|
10
|
+
export interface InstallationService {
|
11
|
+
Create(request: InstallationCreationRequest, metadata?: Metadata): Promise<FullInstallationInfo>;
|
12
|
+
GetByAppNameAndInstallLocation(request: GetByAppNameAndInstallLocationRequest, metadata?: Metadata): Promise<FullInstallationInfo>;
|
13
|
+
}
|
14
|
+
export declare const InstallationServiceServiceName = "devvit.dev_portal.v1.InstallationService";
|
15
|
+
export declare class InstallationServiceClientImpl implements InstallationService {
|
16
|
+
private readonly rpc;
|
17
|
+
private readonly service;
|
18
|
+
constructor(rpc: Rpc, opts?: {
|
19
|
+
service?: string;
|
20
|
+
});
|
21
|
+
Create(request: InstallationCreationRequest, metadata?: Metadata): Promise<FullInstallationInfo>;
|
22
|
+
GetByAppNameAndInstallLocation(request: GetByAppNameAndInstallLocationRequest, metadata?: Metadata): Promise<FullInstallationInfo>;
|
23
|
+
}
|
24
|
+
export type InstallationServiceDefinition = typeof InstallationServiceDefinition;
|
25
|
+
export declare const InstallationServiceDefinition: {
|
26
|
+
readonly name: "InstallationService";
|
27
|
+
readonly fullName: "devvit.dev_portal.v1.InstallationService";
|
28
|
+
readonly methods: {
|
29
|
+
readonly create: {
|
30
|
+
readonly name: "Create";
|
31
|
+
readonly requestType: {
|
32
|
+
$type: "devvit.dev_portal.installation.InstallationCreationRequest";
|
33
|
+
encode(message: InstallationCreationRequest, writer?: _m0.Writer): _m0.Writer;
|
34
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): InstallationCreationRequest;
|
35
|
+
fromJSON(object: any): InstallationCreationRequest;
|
36
|
+
toJSON(message: InstallationCreationRequest): unknown;
|
37
|
+
create(base?: {
|
38
|
+
appVersionId?: string;
|
39
|
+
runAs?: string | undefined | undefined;
|
40
|
+
type?: import("../../../../../../community.js").InstallationType;
|
41
|
+
location?: string;
|
42
|
+
upgradeStrategy?: import("../../../../../devvit/dev_portal/installation/installation.js").UpgradeStrategy;
|
43
|
+
upgradeStrategyConfig?: {
|
44
|
+
[x: string]: any;
|
45
|
+
} | undefined;
|
46
|
+
}): InstallationCreationRequest;
|
47
|
+
fromPartial(object: {
|
48
|
+
appVersionId?: string;
|
49
|
+
runAs?: string | undefined | undefined;
|
50
|
+
type?: import("../../../../../../community.js").InstallationType;
|
51
|
+
location?: string;
|
52
|
+
upgradeStrategy?: import("../../../../../devvit/dev_portal/installation/installation.js").UpgradeStrategy;
|
53
|
+
upgradeStrategyConfig?: {
|
54
|
+
[x: string]: any;
|
55
|
+
} | undefined;
|
56
|
+
}): InstallationCreationRequest;
|
57
|
+
};
|
58
|
+
readonly requestStream: false;
|
59
|
+
readonly responseType: {
|
60
|
+
$type: "devvit.dev_portal.installation.FullInstallationInfo";
|
61
|
+
encode(message: FullInstallationInfo, writer?: _m0.Writer): _m0.Writer;
|
62
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): FullInstallationInfo;
|
63
|
+
fromJSON(object: any): FullInstallationInfo;
|
64
|
+
toJSON(message: FullInstallationInfo): unknown;
|
65
|
+
create(base?: {
|
66
|
+
installation?: {
|
67
|
+
id?: string;
|
68
|
+
upgradeStrategy?: import("../../../../../devvit/dev_portal/installation/installation.js").UpgradeStrategy;
|
69
|
+
upgradeStrategyConfig?: {
|
70
|
+
[x: string]: any;
|
71
|
+
} | undefined;
|
72
|
+
runAs?: string | undefined | undefined;
|
73
|
+
type?: import("../../../../../../community.js").InstallationType;
|
74
|
+
location?: {
|
75
|
+
id?: string;
|
76
|
+
name?: string;
|
77
|
+
type?: import("../../../../../../community.js").ThingType;
|
78
|
+
icon?: string | undefined | undefined;
|
79
|
+
isNsfw?: boolean;
|
80
|
+
isUnavailable?: boolean;
|
81
|
+
} | undefined;
|
82
|
+
isEnabled?: boolean;
|
83
|
+
} | undefined;
|
84
|
+
appVersion?: {
|
85
|
+
id?: string;
|
86
|
+
visibility?: import("../../../../../../community.js").VersionVisibility;
|
87
|
+
validInstallTypes?: import("../../../../../../community.js").InstallationType[];
|
88
|
+
majorVersion?: number;
|
89
|
+
minorVersion?: number;
|
90
|
+
patchVersion?: number;
|
91
|
+
prereleaseVersion?: number | undefined | undefined;
|
92
|
+
uploadedAt?: Date | undefined;
|
93
|
+
buildStatus?: import("../../../../../../community.js").BuildStatus;
|
94
|
+
builtAt?: Date | undefined;
|
95
|
+
about?: string;
|
96
|
+
hasCustomSettings?: boolean;
|
97
|
+
pool?: import("../../../../../../community.js").ComputePool;
|
98
|
+
appCapabilities?: import("../../../../../../community.js").NutritionCategory[];
|
99
|
+
publicApiVersion?: string | undefined | undefined;
|
100
|
+
marketingInfo?: {
|
101
|
+
icon?: string | undefined | undefined;
|
102
|
+
} | undefined;
|
103
|
+
hasDevvitJson?: boolean;
|
104
|
+
} | undefined;
|
105
|
+
app?: {
|
106
|
+
id?: string;
|
107
|
+
slug?: string;
|
108
|
+
name?: string;
|
109
|
+
description?: string;
|
110
|
+
appAccount?: {
|
111
|
+
id?: string;
|
112
|
+
displayName?: string;
|
113
|
+
snoovatarIconUrl?: string;
|
114
|
+
} | undefined;
|
115
|
+
isNsfw?: boolean;
|
116
|
+
isDelisted?: boolean;
|
117
|
+
isFirstParty?: boolean;
|
118
|
+
isArchived?: boolean;
|
119
|
+
isWebviewEnabled?: boolean;
|
120
|
+
createdAt?: Date | undefined;
|
121
|
+
owner?: {
|
122
|
+
id?: string;
|
123
|
+
displayName?: string;
|
124
|
+
snoovatarIconUrl?: string;
|
125
|
+
} | undefined;
|
126
|
+
categories?: import("../../../../../../community.js").Categories[];
|
127
|
+
stats?: {
|
128
|
+
installCount?: number;
|
129
|
+
versionsCount?: number;
|
130
|
+
} | undefined;
|
131
|
+
termsAndConditions?: string;
|
132
|
+
privacyPolicy?: string;
|
133
|
+
defaultPool?: import("../../../../../../community.js").ComputePool;
|
134
|
+
isDisabled?: boolean;
|
135
|
+
minSubredditSizeRestrictionEnabled?: boolean;
|
136
|
+
defaultPlaytestSubredditId?: string;
|
137
|
+
promoStatus?: import("../../../../../../community.js").AppPromoStatus;
|
138
|
+
appIconUrl?: string | undefined | undefined;
|
139
|
+
categoriesV2?: {
|
140
|
+
id?: number;
|
141
|
+
name?: string;
|
142
|
+
parentId?: number | undefined | undefined;
|
143
|
+
}[];
|
144
|
+
} | undefined;
|
145
|
+
}): FullInstallationInfo;
|
146
|
+
fromPartial(object: {
|
147
|
+
installation?: {
|
148
|
+
id?: string;
|
149
|
+
upgradeStrategy?: import("../../../../../devvit/dev_portal/installation/installation.js").UpgradeStrategy;
|
150
|
+
upgradeStrategyConfig?: {
|
151
|
+
[x: string]: any;
|
152
|
+
} | undefined;
|
153
|
+
runAs?: string | undefined | undefined;
|
154
|
+
type?: import("../../../../../../community.js").InstallationType;
|
155
|
+
location?: {
|
156
|
+
id?: string;
|
157
|
+
name?: string;
|
158
|
+
type?: import("../../../../../../community.js").ThingType;
|
159
|
+
icon?: string | undefined | undefined;
|
160
|
+
isNsfw?: boolean;
|
161
|
+
isUnavailable?: boolean;
|
162
|
+
} | undefined;
|
163
|
+
isEnabled?: boolean;
|
164
|
+
} | undefined;
|
165
|
+
appVersion?: {
|
166
|
+
id?: string;
|
167
|
+
visibility?: import("../../../../../../community.js").VersionVisibility;
|
168
|
+
validInstallTypes?: import("../../../../../../community.js").InstallationType[];
|
169
|
+
majorVersion?: number;
|
170
|
+
minorVersion?: number;
|
171
|
+
patchVersion?: number;
|
172
|
+
prereleaseVersion?: number | undefined | undefined;
|
173
|
+
uploadedAt?: Date | undefined;
|
174
|
+
buildStatus?: import("../../../../../../community.js").BuildStatus;
|
175
|
+
builtAt?: Date | undefined;
|
176
|
+
about?: string;
|
177
|
+
hasCustomSettings?: boolean;
|
178
|
+
pool?: import("../../../../../../community.js").ComputePool;
|
179
|
+
appCapabilities?: import("../../../../../../community.js").NutritionCategory[];
|
180
|
+
publicApiVersion?: string | undefined | undefined;
|
181
|
+
marketingInfo?: {
|
182
|
+
icon?: string | undefined | undefined;
|
183
|
+
} | undefined;
|
184
|
+
hasDevvitJson?: boolean;
|
185
|
+
} | undefined;
|
186
|
+
app?: {
|
187
|
+
id?: string;
|
188
|
+
slug?: string;
|
189
|
+
name?: string;
|
190
|
+
description?: string;
|
191
|
+
appAccount?: {
|
192
|
+
id?: string;
|
193
|
+
displayName?: string;
|
194
|
+
snoovatarIconUrl?: string;
|
195
|
+
} | undefined;
|
196
|
+
isNsfw?: boolean;
|
197
|
+
isDelisted?: boolean;
|
198
|
+
isFirstParty?: boolean;
|
199
|
+
isArchived?: boolean;
|
200
|
+
isWebviewEnabled?: boolean;
|
201
|
+
createdAt?: Date | undefined;
|
202
|
+
owner?: {
|
203
|
+
id?: string;
|
204
|
+
displayName?: string;
|
205
|
+
snoovatarIconUrl?: string;
|
206
|
+
} | undefined;
|
207
|
+
categories?: import("../../../../../../community.js").Categories[];
|
208
|
+
stats?: {
|
209
|
+
installCount?: number;
|
210
|
+
versionsCount?: number;
|
211
|
+
} | undefined;
|
212
|
+
termsAndConditions?: string;
|
213
|
+
privacyPolicy?: string;
|
214
|
+
defaultPool?: import("../../../../../../community.js").ComputePool;
|
215
|
+
isDisabled?: boolean;
|
216
|
+
minSubredditSizeRestrictionEnabled?: boolean;
|
217
|
+
defaultPlaytestSubredditId?: string;
|
218
|
+
promoStatus?: import("../../../../../../community.js").AppPromoStatus;
|
219
|
+
appIconUrl?: string | undefined | undefined;
|
220
|
+
categoriesV2?: {
|
221
|
+
id?: number;
|
222
|
+
name?: string;
|
223
|
+
parentId?: number | undefined | undefined;
|
224
|
+
}[];
|
225
|
+
} | undefined;
|
226
|
+
}): FullInstallationInfo;
|
227
|
+
};
|
228
|
+
readonly responseStream: false;
|
229
|
+
readonly options: {};
|
230
|
+
};
|
231
|
+
readonly getByAppNameAndInstallLocation: {
|
232
|
+
readonly name: "GetByAppNameAndInstallLocation";
|
233
|
+
readonly requestType: {
|
234
|
+
$type: "devvit.dev_portal.installation.GetByAppNameAndInstallLocationRequest";
|
235
|
+
encode(message: GetByAppNameAndInstallLocationRequest, writer?: _m0.Writer): _m0.Writer;
|
236
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GetByAppNameAndInstallLocationRequest;
|
237
|
+
fromJSON(object: any): GetByAppNameAndInstallLocationRequest;
|
238
|
+
toJSON(message: GetByAppNameAndInstallLocationRequest): unknown;
|
239
|
+
create(base?: {
|
240
|
+
slug?: string;
|
241
|
+
type?: import("../../../../../../community.js").InstallationType;
|
242
|
+
location?: string;
|
243
|
+
}): GetByAppNameAndInstallLocationRequest;
|
244
|
+
fromPartial(object: {
|
245
|
+
slug?: string;
|
246
|
+
type?: import("../../../../../../community.js").InstallationType;
|
247
|
+
location?: string;
|
248
|
+
}): GetByAppNameAndInstallLocationRequest;
|
249
|
+
};
|
250
|
+
readonly requestStream: false;
|
251
|
+
readonly responseType: {
|
252
|
+
$type: "devvit.dev_portal.installation.FullInstallationInfo";
|
253
|
+
encode(message: FullInstallationInfo, writer?: _m0.Writer): _m0.Writer;
|
254
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): FullInstallationInfo;
|
255
|
+
fromJSON(object: any): FullInstallationInfo;
|
256
|
+
toJSON(message: FullInstallationInfo): unknown;
|
257
|
+
create(base?: {
|
258
|
+
installation?: {
|
259
|
+
id?: string;
|
260
|
+
upgradeStrategy?: import("../../../../../devvit/dev_portal/installation/installation.js").UpgradeStrategy;
|
261
|
+
upgradeStrategyConfig?: {
|
262
|
+
[x: string]: any;
|
263
|
+
} | undefined;
|
264
|
+
runAs?: string | undefined | undefined;
|
265
|
+
type?: import("../../../../../../community.js").InstallationType;
|
266
|
+
location?: {
|
267
|
+
id?: string;
|
268
|
+
name?: string;
|
269
|
+
type?: import("../../../../../../community.js").ThingType;
|
270
|
+
icon?: string | undefined | undefined;
|
271
|
+
isNsfw?: boolean;
|
272
|
+
isUnavailable?: boolean;
|
273
|
+
} | undefined;
|
274
|
+
isEnabled?: boolean;
|
275
|
+
} | undefined;
|
276
|
+
appVersion?: {
|
277
|
+
id?: string;
|
278
|
+
visibility?: import("../../../../../../community.js").VersionVisibility;
|
279
|
+
validInstallTypes?: import("../../../../../../community.js").InstallationType[];
|
280
|
+
majorVersion?: number;
|
281
|
+
minorVersion?: number;
|
282
|
+
patchVersion?: number;
|
283
|
+
prereleaseVersion?: number | undefined | undefined;
|
284
|
+
uploadedAt?: Date | undefined;
|
285
|
+
buildStatus?: import("../../../../../../community.js").BuildStatus;
|
286
|
+
builtAt?: Date | undefined;
|
287
|
+
about?: string;
|
288
|
+
hasCustomSettings?: boolean;
|
289
|
+
pool?: import("../../../../../../community.js").ComputePool;
|
290
|
+
appCapabilities?: import("../../../../../../community.js").NutritionCategory[];
|
291
|
+
publicApiVersion?: string | undefined | undefined;
|
292
|
+
marketingInfo?: {
|
293
|
+
icon?: string | undefined | undefined;
|
294
|
+
} | undefined;
|
295
|
+
hasDevvitJson?: boolean;
|
296
|
+
} | undefined;
|
297
|
+
app?: {
|
298
|
+
id?: string;
|
299
|
+
slug?: string;
|
300
|
+
name?: string;
|
301
|
+
description?: string;
|
302
|
+
appAccount?: {
|
303
|
+
id?: string;
|
304
|
+
displayName?: string;
|
305
|
+
snoovatarIconUrl?: string;
|
306
|
+
} | undefined;
|
307
|
+
isNsfw?: boolean;
|
308
|
+
isDelisted?: boolean;
|
309
|
+
isFirstParty?: boolean;
|
310
|
+
isArchived?: boolean;
|
311
|
+
isWebviewEnabled?: boolean;
|
312
|
+
createdAt?: Date | undefined;
|
313
|
+
owner?: {
|
314
|
+
id?: string;
|
315
|
+
displayName?: string;
|
316
|
+
snoovatarIconUrl?: string;
|
317
|
+
} | undefined;
|
318
|
+
categories?: import("../../../../../../community.js").Categories[];
|
319
|
+
stats?: {
|
320
|
+
installCount?: number;
|
321
|
+
versionsCount?: number;
|
322
|
+
} | undefined;
|
323
|
+
termsAndConditions?: string;
|
324
|
+
privacyPolicy?: string;
|
325
|
+
defaultPool?: import("../../../../../../community.js").ComputePool;
|
326
|
+
isDisabled?: boolean;
|
327
|
+
minSubredditSizeRestrictionEnabled?: boolean;
|
328
|
+
defaultPlaytestSubredditId?: string;
|
329
|
+
promoStatus?: import("../../../../../../community.js").AppPromoStatus;
|
330
|
+
appIconUrl?: string | undefined | undefined;
|
331
|
+
categoriesV2?: {
|
332
|
+
id?: number;
|
333
|
+
name?: string;
|
334
|
+
parentId?: number | undefined | undefined;
|
335
|
+
}[];
|
336
|
+
} | undefined;
|
337
|
+
}): FullInstallationInfo;
|
338
|
+
fromPartial(object: {
|
339
|
+
installation?: {
|
340
|
+
id?: string;
|
341
|
+
upgradeStrategy?: import("../../../../../devvit/dev_portal/installation/installation.js").UpgradeStrategy;
|
342
|
+
upgradeStrategyConfig?: {
|
343
|
+
[x: string]: any;
|
344
|
+
} | undefined;
|
345
|
+
runAs?: string | undefined | undefined;
|
346
|
+
type?: import("../../../../../../community.js").InstallationType;
|
347
|
+
location?: {
|
348
|
+
id?: string;
|
349
|
+
name?: string;
|
350
|
+
type?: import("../../../../../../community.js").ThingType;
|
351
|
+
icon?: string | undefined | undefined;
|
352
|
+
isNsfw?: boolean;
|
353
|
+
isUnavailable?: boolean;
|
354
|
+
} | undefined;
|
355
|
+
isEnabled?: boolean;
|
356
|
+
} | undefined;
|
357
|
+
appVersion?: {
|
358
|
+
id?: string;
|
359
|
+
visibility?: import("../../../../../../community.js").VersionVisibility;
|
360
|
+
validInstallTypes?: import("../../../../../../community.js").InstallationType[];
|
361
|
+
majorVersion?: number;
|
362
|
+
minorVersion?: number;
|
363
|
+
patchVersion?: number;
|
364
|
+
prereleaseVersion?: number | undefined | undefined;
|
365
|
+
uploadedAt?: Date | undefined;
|
366
|
+
buildStatus?: import("../../../../../../community.js").BuildStatus;
|
367
|
+
builtAt?: Date | undefined;
|
368
|
+
about?: string;
|
369
|
+
hasCustomSettings?: boolean;
|
370
|
+
pool?: import("../../../../../../community.js").ComputePool;
|
371
|
+
appCapabilities?: import("../../../../../../community.js").NutritionCategory[];
|
372
|
+
publicApiVersion?: string | undefined | undefined;
|
373
|
+
marketingInfo?: {
|
374
|
+
icon?: string | undefined | undefined;
|
375
|
+
} | undefined;
|
376
|
+
hasDevvitJson?: boolean;
|
377
|
+
} | undefined;
|
378
|
+
app?: {
|
379
|
+
id?: string;
|
380
|
+
slug?: string;
|
381
|
+
name?: string;
|
382
|
+
description?: string;
|
383
|
+
appAccount?: {
|
384
|
+
id?: string;
|
385
|
+
displayName?: string;
|
386
|
+
snoovatarIconUrl?: string;
|
387
|
+
} | undefined;
|
388
|
+
isNsfw?: boolean;
|
389
|
+
isDelisted?: boolean;
|
390
|
+
isFirstParty?: boolean;
|
391
|
+
isArchived?: boolean;
|
392
|
+
isWebviewEnabled?: boolean;
|
393
|
+
createdAt?: Date | undefined;
|
394
|
+
owner?: {
|
395
|
+
id?: string;
|
396
|
+
displayName?: string;
|
397
|
+
snoovatarIconUrl?: string;
|
398
|
+
} | undefined;
|
399
|
+
categories?: import("../../../../../../community.js").Categories[];
|
400
|
+
stats?: {
|
401
|
+
installCount?: number;
|
402
|
+
versionsCount?: number;
|
403
|
+
} | undefined;
|
404
|
+
termsAndConditions?: string;
|
405
|
+
privacyPolicy?: string;
|
406
|
+
defaultPool?: import("../../../../../../community.js").ComputePool;
|
407
|
+
isDisabled?: boolean;
|
408
|
+
minSubredditSizeRestrictionEnabled?: boolean;
|
409
|
+
defaultPlaytestSubredditId?: string;
|
410
|
+
promoStatus?: import("../../../../../../community.js").AppPromoStatus;
|
411
|
+
appIconUrl?: string | undefined | undefined;
|
412
|
+
categoriesV2?: {
|
413
|
+
id?: number;
|
414
|
+
name?: string;
|
415
|
+
parentId?: number | undefined | undefined;
|
416
|
+
}[];
|
417
|
+
} | undefined;
|
418
|
+
}): FullInstallationInfo;
|
419
|
+
};
|
420
|
+
readonly responseStream: false;
|
421
|
+
readonly options: {};
|
422
|
+
};
|
423
|
+
};
|
424
|
+
};
|
425
|
+
interface Rpc {
|
426
|
+
request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
|
427
|
+
}
|
428
|
+
export {};
|
429
|
+
//# sourceMappingURL=installation.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"installation.d.ts","sourceRoot":"","sources":["../../../../../../../src/types/api/proto/devvit/dev_portal/v1/installation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EACL,oBAAoB,EACpB,qCAAqC,EACrC,2BAA2B,EAC5B,MAAM,+DAA+D,CAAC;AAEvE,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,OAAO,EAAE,2BAA2B,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACjG,8BAA8B,CAC5B,OAAO,EAAE,qCAAqC,EAC9C,QAAQ,CAAC,EAAE,QAAQ,GAClB,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,8BAA8B,6CAA6C,CAAC;AACzF,qBAAa,6BAA8B,YAAW,mBAAmB;IACvE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBACrB,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAMjD,MAAM,CAAC,OAAO,EAAE,2BAA2B,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAMhG,8BAA8B,CAC5B,OAAO,EAAE,qCAAqC,EAC9C,QAAQ,CAAC,EAAE,QAAQ,GAClB,OAAO,CAAC,oBAAoB,CAAC;CAKjC;AAED,MAAM,MAAM,6BAA6B,GAAG,OAAO,6BAA6B,CAAC;AACjF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBhC,CAAC;AAEX,UAAU,GAAG;IACX,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACtG"}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
/**
|
2
|
+
* #installation.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 { FullInstallationInfo, GetByAppNameAndInstallLocationRequest, InstallationCreationRequest, } from "../../../../../devvit/dev_portal/installation/installation.js";
|
10
|
+
export const InstallationServiceServiceName = "devvit.dev_portal.v1.InstallationService";
|
11
|
+
export class InstallationServiceClientImpl {
|
12
|
+
constructor(rpc, opts) {
|
13
|
+
this.service = opts?.service || InstallationServiceServiceName;
|
14
|
+
this.rpc = rpc;
|
15
|
+
this.Create = this.Create.bind(this);
|
16
|
+
this.GetByAppNameAndInstallLocation = this.GetByAppNameAndInstallLocation.bind(this);
|
17
|
+
}
|
18
|
+
Create(request, metadata) {
|
19
|
+
const data = InstallationCreationRequest.encode(request).finish();
|
20
|
+
const promise = this.rpc.request(this.service, "Create", data, metadata);
|
21
|
+
return promise.then((data) => FullInstallationInfo.decode(_m0.Reader.create(data)));
|
22
|
+
}
|
23
|
+
GetByAppNameAndInstallLocation(request, metadata) {
|
24
|
+
const data = GetByAppNameAndInstallLocationRequest.encode(request).finish();
|
25
|
+
const promise = this.rpc.request(this.service, "GetByAppNameAndInstallLocation", data, metadata);
|
26
|
+
return promise.then((data) => FullInstallationInfo.decode(_m0.Reader.create(data)));
|
27
|
+
}
|
28
|
+
}
|
29
|
+
export const InstallationServiceDefinition = {
|
30
|
+
name: "InstallationService",
|
31
|
+
fullName: "devvit.dev_portal.v1.InstallationService",
|
32
|
+
methods: {
|
33
|
+
create: {
|
34
|
+
name: "Create",
|
35
|
+
requestType: InstallationCreationRequest,
|
36
|
+
requestStream: false,
|
37
|
+
responseType: FullInstallationInfo,
|
38
|
+
responseStream: false,
|
39
|
+
options: {},
|
40
|
+
},
|
41
|
+
getByAppNameAndInstallLocation: {
|
42
|
+
name: "GetByAppNameAndInstallLocation",
|
43
|
+
requestType: GetByAppNameAndInstallLocationRequest,
|
44
|
+
requestStream: false,
|
45
|
+
responseType: FullInstallationInfo,
|
46
|
+
responseStream: false,
|
47
|
+
options: {},
|
48
|
+
},
|
49
|
+
},
|
50
|
+
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { InstallationCreationRequest, FullInstallationInfo, GetByAppNameAndInstallLocationRequest } from '../../../../../devvit/dev_portal/installation/installation.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 InstallationServiceClient {
|
6
|
+
Create(request: InstallationCreationRequest): Promise<FullInstallationInfo>;
|
7
|
+
GetByAppNameAndInstallLocation(request: GetByAppNameAndInstallLocationRequest): Promise<FullInstallationInfo>;
|
8
|
+
}
|
9
|
+
export declare class InstallationServiceClientJSON implements InstallationServiceClient {
|
10
|
+
private readonly rpc;
|
11
|
+
constructor(rpc: Rpc);
|
12
|
+
Create(request: InstallationCreationRequest): Promise<FullInstallationInfo>;
|
13
|
+
GetByAppNameAndInstallLocation(request: GetByAppNameAndInstallLocationRequest): Promise<FullInstallationInfo>;
|
14
|
+
}
|
15
|
+
export declare class InstallationServiceClientProtobuf implements InstallationServiceClient {
|
16
|
+
private readonly rpc;
|
17
|
+
constructor(rpc: Rpc);
|
18
|
+
Create(request: InstallationCreationRequest): Promise<FullInstallationInfo>;
|
19
|
+
GetByAppNameAndInstallLocation(request: GetByAppNameAndInstallLocationRequest): Promise<FullInstallationInfo>;
|
20
|
+
}
|
21
|
+
export {};
|
22
|
+
//# sourceMappingURL=installation.twirp-client.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"installation.twirp-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/types/api/proto/devvit/dev_portal/v1/installation.twirp-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,qCAAqC,EACtC,MAAM,+DAA+D,CAAC;AAMvE,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,yBAAyB;IACxC,MAAM,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC5E,8BAA8B,CAC5B,OAAO,EAAE,qCAAqC,GAC7C,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAClC;AAED,qBAAa,6BACX,YAAW,yBAAyB;IAEpC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;gBACd,GAAG,EAAE,GAAG;IAKpB,MAAM,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAW3E,8BAA8B,CAC5B,OAAO,EAAE,qCAAqC,GAC7C,OAAO,CAAC,oBAAoB,CAAC;CAUjC;AAED,qBAAa,iCACX,YAAW,yBAAyB;IAEpC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;gBACd,GAAG,EAAE,GAAG;IAKpB,MAAM,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAa3E,8BAA8B,CAC5B,OAAO,EAAE,qCAAqC,GAC7C,OAAO,CAAC,oBAAoB,CAAC;CAYjC"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { InstallationCreationRequest, FullInstallationInfo, GetByAppNameAndInstallLocationRequest, } from '../../../../../devvit/dev_portal/installation/installation.js';
|
2
|
+
export class InstallationServiceClientJSON {
|
3
|
+
constructor(rpc) {
|
4
|
+
this.rpc = rpc;
|
5
|
+
this.Create.bind(this);
|
6
|
+
this.GetByAppNameAndInstallLocation.bind(this);
|
7
|
+
}
|
8
|
+
Create(request) {
|
9
|
+
const data = InstallationCreationRequest.toJSON(request);
|
10
|
+
const promise = this.rpc.request('devvit.dev_portal.v1.InstallationService', 'Create', 'application/json', data);
|
11
|
+
return promise.then((data) => FullInstallationInfo.fromJSON(data));
|
12
|
+
}
|
13
|
+
GetByAppNameAndInstallLocation(request) {
|
14
|
+
const data = GetByAppNameAndInstallLocationRequest.toJSON(request);
|
15
|
+
const promise = this.rpc.request('devvit.dev_portal.v1.InstallationService', 'GetByAppNameAndInstallLocation', 'application/json', data);
|
16
|
+
return promise.then((data) => FullInstallationInfo.fromJSON(data));
|
17
|
+
}
|
18
|
+
}
|
19
|
+
export class InstallationServiceClientProtobuf {
|
20
|
+
constructor(rpc) {
|
21
|
+
this.rpc = rpc;
|
22
|
+
this.Create.bind(this);
|
23
|
+
this.GetByAppNameAndInstallLocation.bind(this);
|
24
|
+
}
|
25
|
+
Create(request) {
|
26
|
+
const data = InstallationCreationRequest.encode(request).finish();
|
27
|
+
const promise = this.rpc.request('devvit.dev_portal.v1.InstallationService', 'Create', 'application/protobuf', data);
|
28
|
+
return promise.then((data) => FullInstallationInfo.decode(data));
|
29
|
+
}
|
30
|
+
GetByAppNameAndInstallLocation(request) {
|
31
|
+
const data = GetByAppNameAndInstallLocationRequest.encode(request).finish();
|
32
|
+
const promise = this.rpc.request('devvit.dev_portal.v1.InstallationService', 'GetByAppNameAndInstallLocation', 'application/protobuf', data);
|
33
|
+
return promise.then((data) => FullInstallationInfo.decode(data));
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { TwirpContext, TwirpServer } from 'twirp-ts';
|
2
|
+
import { InstallationCreationRequest, FullInstallationInfo, GetByAppNameAndInstallLocationRequest } from '../../../../../devvit/dev_portal/installation/installation.js';
|
3
|
+
export interface InstallationServiceTwirp<T extends TwirpContext = TwirpContext> {
|
4
|
+
Create(ctx: T, request: InstallationCreationRequest): Promise<FullInstallationInfo>;
|
5
|
+
GetByAppNameAndInstallLocation(ctx: T, request: GetByAppNameAndInstallLocationRequest): Promise<FullInstallationInfo>;
|
6
|
+
}
|
7
|
+
export declare enum InstallationServiceMethod {
|
8
|
+
Create = "Create",
|
9
|
+
GetByAppNameAndInstallLocation = "GetByAppNameAndInstallLocation"
|
10
|
+
}
|
11
|
+
export declare const InstallationServiceMethodList: InstallationServiceMethod[];
|
12
|
+
export declare function createInstallationServiceServer<T extends TwirpContext = TwirpContext>(service: InstallationServiceTwirp<T>): TwirpServer<InstallationServiceTwirp<TwirpContext<import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>>>, T>;
|
13
|
+
//# sourceMappingURL=installation.twirp.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"installation.twirp.d.ts","sourceRoot":"","sources":["../../../../../../../src/types/api/proto/devvit/dev_portal/v1/installation.twirp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,WAAW,EAOZ,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,qCAAqC,EACtC,MAAM,+DAA+D,CAAC;AAMvE,MAAM,WAAW,wBAAwB,CACvC,CAAC,SAAS,YAAY,GAAG,YAAY;IAErC,MAAM,CACJ,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACjC,8BAA8B,CAC5B,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,qCAAqC,GAC7C,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAClC;AAED,oBAAY,yBAAyB;IACnC,MAAM,WAAW;IACjB,8BAA8B,mCAAmC;CAClE;AAED,eAAO,MAAM,6BAA6B,6BAGzC,CAAC;AAEF,wBAAgB,+BAA+B,CAC7C,CAAC,SAAS,YAAY,GAAG,YAAY,EACrC,OAAO,EAAE,wBAAwB,CAAC,CAAC,CAAC,yJAQrC"}
|
@@ -0,0 +1,156 @@
|
|
1
|
+
import { TwirpServer, TwirpError, TwirpErrorCode, TwirpContentType, chainInterceptors, } from 'twirp-ts';
|
2
|
+
import { InstallationCreationRequest, FullInstallationInfo, GetByAppNameAndInstallLocationRequest, } from '../../../../../devvit/dev_portal/installation/installation.js';
|
3
|
+
export var InstallationServiceMethod;
|
4
|
+
(function (InstallationServiceMethod) {
|
5
|
+
InstallationServiceMethod["Create"] = "Create";
|
6
|
+
InstallationServiceMethod["GetByAppNameAndInstallLocation"] = "GetByAppNameAndInstallLocation";
|
7
|
+
})(InstallationServiceMethod || (InstallationServiceMethod = {}));
|
8
|
+
export const InstallationServiceMethodList = [
|
9
|
+
InstallationServiceMethod.Create,
|
10
|
+
InstallationServiceMethod.GetByAppNameAndInstallLocation,
|
11
|
+
];
|
12
|
+
export function createInstallationServiceServer(service) {
|
13
|
+
return new TwirpServer({
|
14
|
+
service,
|
15
|
+
packageName: 'devvit.dev_portal.v1',
|
16
|
+
serviceName: 'InstallationService',
|
17
|
+
methodList: InstallationServiceMethodList,
|
18
|
+
matchRoute: matchInstallationServiceRoute,
|
19
|
+
});
|
20
|
+
}
|
21
|
+
function matchInstallationServiceRoute(method, events) {
|
22
|
+
switch (method) {
|
23
|
+
case 'Create':
|
24
|
+
return async (ctx, service, data, interceptors) => {
|
25
|
+
ctx = { ...ctx, methodName: 'Create' };
|
26
|
+
await events.onMatch(ctx);
|
27
|
+
return handleInstallationServiceCreateRequest(ctx, service, data, interceptors);
|
28
|
+
};
|
29
|
+
case 'GetByAppNameAndInstallLocation':
|
30
|
+
return async (ctx, service, data, interceptors) => {
|
31
|
+
ctx = { ...ctx, methodName: 'GetByAppNameAndInstallLocation' };
|
32
|
+
await events.onMatch(ctx);
|
33
|
+
return handleInstallationServiceGetByAppNameAndInstallLocationRequest(ctx, service, data, interceptors);
|
34
|
+
};
|
35
|
+
default:
|
36
|
+
events.onNotFound();
|
37
|
+
const msg = `no handler found`;
|
38
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
39
|
+
}
|
40
|
+
}
|
41
|
+
function handleInstallationServiceCreateRequest(ctx, service, data, interceptors) {
|
42
|
+
switch (ctx.contentType) {
|
43
|
+
case TwirpContentType.JSON:
|
44
|
+
return handleInstallationServiceCreateJSON(ctx, service, data, interceptors);
|
45
|
+
case TwirpContentType.Protobuf:
|
46
|
+
return handleInstallationServiceCreateProtobuf(ctx, service, data, interceptors);
|
47
|
+
default:
|
48
|
+
const msg = 'unexpected Content-Type';
|
49
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
function handleInstallationServiceGetByAppNameAndInstallLocationRequest(ctx, service, data, interceptors) {
|
53
|
+
switch (ctx.contentType) {
|
54
|
+
case TwirpContentType.JSON:
|
55
|
+
return handleInstallationServiceGetByAppNameAndInstallLocationJSON(ctx, service, data, interceptors);
|
56
|
+
case TwirpContentType.Protobuf:
|
57
|
+
return handleInstallationServiceGetByAppNameAndInstallLocationProtobuf(ctx, service, data, interceptors);
|
58
|
+
default:
|
59
|
+
const msg = 'unexpected Content-Type';
|
60
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
async function handleInstallationServiceCreateJSON(ctx, service, data, interceptors) {
|
64
|
+
let request;
|
65
|
+
let response;
|
66
|
+
try {
|
67
|
+
const body = JSON.parse(data.toString() || '{}');
|
68
|
+
request = InstallationCreationRequest.fromJSON(body);
|
69
|
+
}
|
70
|
+
catch (e) {
|
71
|
+
if (e instanceof Error) {
|
72
|
+
const msg = 'the json request could not be decoded';
|
73
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
74
|
+
}
|
75
|
+
}
|
76
|
+
if (interceptors && interceptors.length > 0) {
|
77
|
+
const interceptor = chainInterceptors(...interceptors);
|
78
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
79
|
+
return service.Create(ctx, inputReq);
|
80
|
+
});
|
81
|
+
}
|
82
|
+
else {
|
83
|
+
response = await service.Create(ctx, request);
|
84
|
+
}
|
85
|
+
return JSON.stringify(FullInstallationInfo.toJSON(response));
|
86
|
+
}
|
87
|
+
async function handleInstallationServiceGetByAppNameAndInstallLocationJSON(ctx, service, data, interceptors) {
|
88
|
+
let request;
|
89
|
+
let response;
|
90
|
+
try {
|
91
|
+
const body = JSON.parse(data.toString() || '{}');
|
92
|
+
request = GetByAppNameAndInstallLocationRequest.fromJSON(body);
|
93
|
+
}
|
94
|
+
catch (e) {
|
95
|
+
if (e instanceof Error) {
|
96
|
+
const msg = 'the json request could not be decoded';
|
97
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
98
|
+
}
|
99
|
+
}
|
100
|
+
if (interceptors && interceptors.length > 0) {
|
101
|
+
const interceptor = chainInterceptors(...interceptors);
|
102
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
103
|
+
return service.GetByAppNameAndInstallLocation(ctx, inputReq);
|
104
|
+
});
|
105
|
+
}
|
106
|
+
else {
|
107
|
+
response = await service.GetByAppNameAndInstallLocation(ctx, request);
|
108
|
+
}
|
109
|
+
return JSON.stringify(FullInstallationInfo.toJSON(response));
|
110
|
+
}
|
111
|
+
async function handleInstallationServiceCreateProtobuf(ctx, service, data, interceptors) {
|
112
|
+
let request;
|
113
|
+
let response;
|
114
|
+
try {
|
115
|
+
request = InstallationCreationRequest.decode(data);
|
116
|
+
}
|
117
|
+
catch (e) {
|
118
|
+
if (e instanceof Error) {
|
119
|
+
const msg = 'the protobuf request could not be decoded';
|
120
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
121
|
+
}
|
122
|
+
}
|
123
|
+
if (interceptors && interceptors.length > 0) {
|
124
|
+
const interceptor = chainInterceptors(...interceptors);
|
125
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
126
|
+
return service.Create(ctx, inputReq);
|
127
|
+
});
|
128
|
+
}
|
129
|
+
else {
|
130
|
+
response = await service.Create(ctx, request);
|
131
|
+
}
|
132
|
+
return Buffer.from(FullInstallationInfo.encode(response).finish());
|
133
|
+
}
|
134
|
+
async function handleInstallationServiceGetByAppNameAndInstallLocationProtobuf(ctx, service, data, interceptors) {
|
135
|
+
let request;
|
136
|
+
let response;
|
137
|
+
try {
|
138
|
+
request = GetByAppNameAndInstallLocationRequest.decode(data);
|
139
|
+
}
|
140
|
+
catch (e) {
|
141
|
+
if (e instanceof Error) {
|
142
|
+
const msg = 'the protobuf request could not be decoded';
|
143
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
144
|
+
}
|
145
|
+
}
|
146
|
+
if (interceptors && interceptors.length > 0) {
|
147
|
+
const interceptor = chainInterceptors(...interceptors);
|
148
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
149
|
+
return service.GetByAppNameAndInstallLocation(ctx, inputReq);
|
150
|
+
});
|
151
|
+
}
|
152
|
+
else {
|
153
|
+
response = await service.GetByAppNameAndInstallLocation(ctx, request);
|
154
|
+
}
|
155
|
+
return Buffer.from(FullInstallationInfo.encode(response).finish());
|
156
|
+
}
|