@devvit/protos 0.11.0-next-2024-07-09-09c743af9.0 → 0.11.0-next-2024-07-09-907b3322a.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/meta.min.json +46 -38
- package/package.json +6 -6
- package/protos.min.js +2 -2
- package/protos.min.js.map +4 -4
- package/schema/devvit/dev_portal/app_publish_request/app_publish_request.proto +79 -0
- package/schema/devvit/dev_portal/app_publish_request/note/app_publish_request_note.proto +24 -0
- package/schema/devvit/dev_portal/app_publish_request/review/app_publish_request_review.proto +30 -0
- package/schema/devvit/dev_portal/dev_portal.proto +19 -2
- package/schema/devvit/plugin/buildpack/buildpack_common.proto +12 -0
- package/schema/devvit/runtime/bundle.proto +2 -1
- package/types/devvit/dev_portal/app_publish_request/app_publish_request.d.ts +141 -0
- package/types/devvit/dev_portal/app_publish_request/app_publish_request.d.ts.map +1 -0
- package/types/devvit/dev_portal/app_publish_request/app_publish_request.js +804 -0
- package/types/devvit/dev_portal/app_publish_request/note/app_publish_request_note.d.ts +55 -0
- package/types/devvit/dev_portal/app_publish_request/note/app_publish_request_note.d.ts.map +1 -0
- package/types/devvit/dev_portal/app_publish_request/note/app_publish_request_note.js +284 -0
- package/types/devvit/dev_portal/app_publish_request/review/app_publish_request_review.d.ts +63 -0
- package/types/devvit/dev_portal/app_publish_request/review/app_publish_request_review.d.ts.map +1 -0
- package/types/devvit/dev_portal/app_publish_request/review/app_publish_request_review.js +321 -0
- package/types/devvit/dev_portal/dev_portal.d.ts +714 -0
- package/types/devvit/dev_portal/dev_portal.d.ts.map +1 -1
- package/types/devvit/dev_portal/dev_portal.js +156 -0
- package/types/devvit/dev_portal/dev_portal.twirp-client.d.ts +46 -0
- package/types/devvit/dev_portal/dev_portal.twirp-client.d.ts.map +1 -1
- package/types/devvit/dev_portal/dev_portal.twirp-client.js +133 -0
- package/types/devvit/dev_portal/dev_portal.twirp.d.ts +29 -0
- package/types/devvit/dev_portal/dev_portal.twirp.d.ts.map +1 -1
- package/types/devvit/dev_portal/dev_portal.twirp.js +685 -0
- package/types/devvit/gateway/resolvers.d.ts +6 -0
- package/types/devvit/gateway/resolvers.d.ts.map +1 -1
- package/types/devvit/plugin/buildpack/buildpack.d.ts +60 -0
- package/types/devvit/plugin/buildpack/buildpack.d.ts.map +1 -1
- package/types/devvit/plugin/buildpack/buildpack_common.d.ts +34 -0
- package/types/devvit/plugin/buildpack/buildpack_common.d.ts.map +1 -1
- package/types/devvit/plugin/buildpack/buildpack_common.js +161 -0
- package/types/devvit/plugin/linker/linker.d.ts +30 -0
- package/types/devvit/plugin/linker/linker.d.ts.map +1 -1
- package/types/devvit/plugin/linker/resolver.d.ts +30 -0
- package/types/devvit/plugin/linker/resolver.d.ts.map +1 -1
- package/types/devvit/runtime/actor/bootstrap.d.ts +6 -0
- package/types/devvit/runtime/actor/bootstrap.d.ts.map +1 -1
- package/types/devvit/runtime/actor/runtime.d.ts +6 -0
- package/types/devvit/runtime/actor/runtime.d.ts.map +1 -1
- package/types/devvit/runtime/actor/supervisor.d.ts +6 -0
- package/types/devvit/runtime/actor/supervisor.d.ts.map +1 -1
- package/types/devvit/runtime/bundle.d.ts +17 -0
- package/types/devvit/runtime/bundle.d.ts.map +1 -1
- package/types/devvit/runtime/bundle.js +102 -0
- package/types/devvit/service/bundle_service.d.ts +12 -0
- package/types/devvit/service/bundle_service.d.ts.map +1 -1
@@ -15,6 +15,9 @@ import { GetAuditLogEventsRequest, GetAuditLogEventsResponse, } from './data_api
|
|
15
15
|
import { Value } from '../../google/protobuf/struct.js';
|
16
16
|
import { GetInstallationSettingsFormRequest, GetInstallationSettingsFormResponse, ValidateInstallationSettingsFormRequest, ValidateInstallationSettingsFormResponse, GetInstallationSettingsRequest, GetInstallationSettingsResponse, UpdateInstallationSettingsRequest, UpdateInstallationSettingsResponse, } from './installation_settings/installation_settings.js';
|
17
17
|
import { GetAppSettingsFormRequest, GetAppSettingsFormResponse, ValidateAppSettingsFormRequest, ValidateAppSettingsFormResponse, GetAppSettingsRequest, GetAppSettingsResponse, UpdateAppSettingsRequest, UpdateAppSettingsResponse, } from './app_settings/app_settings.js';
|
18
|
+
import { AppPRCreateRequest, AppPRUpdateRequest, AppPRGetRequest, FullPublishRequestInfo, AppPRGetByAppRequest, MultiplePublishRequestInfos, } from './app_publish_request/app_publish_request.js';
|
19
|
+
import { AppPRAddReviewRequest, AppPRUpdateReviewRequest, } from './app_publish_request/review/app_publish_request_review.js';
|
20
|
+
import { AppPRAddNoteRequest, AppPRUpdateNoteRequest, } from './app_publish_request/note/app_publish_request_note.js';
|
18
21
|
export var AppMethod;
|
19
22
|
(function (AppMethod) {
|
20
23
|
AppMethod["Create"] = "Create";
|
@@ -4081,3 +4084,685 @@ async function handleDevPortalAppSettingsUpdateSettingsProtobuf(ctx, service, da
|
|
4081
4084
|
}
|
4082
4085
|
return Buffer.from(UpdateAppSettingsResponse.encode(response).finish());
|
4083
4086
|
}
|
4087
|
+
export var DevPortalAppPublishRequestMethod;
|
4088
|
+
(function (DevPortalAppPublishRequestMethod) {
|
4089
|
+
DevPortalAppPublishRequestMethod["Submit"] = "Submit";
|
4090
|
+
DevPortalAppPublishRequestMethod["Update"] = "Update";
|
4091
|
+
DevPortalAppPublishRequestMethod["Get"] = "Get";
|
4092
|
+
DevPortalAppPublishRequestMethod["GetAllRequestsByApp"] = "GetAllRequestsByApp";
|
4093
|
+
DevPortalAppPublishRequestMethod["AddReview"] = "AddReview";
|
4094
|
+
DevPortalAppPublishRequestMethod["UpdateReview"] = "UpdateReview";
|
4095
|
+
DevPortalAppPublishRequestMethod["RemoveReview"] = "RemoveReview";
|
4096
|
+
DevPortalAppPublishRequestMethod["AddNote"] = "AddNote";
|
4097
|
+
DevPortalAppPublishRequestMethod["UpdateNote"] = "UpdateNote";
|
4098
|
+
DevPortalAppPublishRequestMethod["RemoveNote"] = "RemoveNote";
|
4099
|
+
})(DevPortalAppPublishRequestMethod || (DevPortalAppPublishRequestMethod = {}));
|
4100
|
+
export const DevPortalAppPublishRequestMethodList = [
|
4101
|
+
DevPortalAppPublishRequestMethod.Submit,
|
4102
|
+
DevPortalAppPublishRequestMethod.Update,
|
4103
|
+
DevPortalAppPublishRequestMethod.Get,
|
4104
|
+
DevPortalAppPublishRequestMethod.GetAllRequestsByApp,
|
4105
|
+
DevPortalAppPublishRequestMethod.AddReview,
|
4106
|
+
DevPortalAppPublishRequestMethod.UpdateReview,
|
4107
|
+
DevPortalAppPublishRequestMethod.RemoveReview,
|
4108
|
+
DevPortalAppPublishRequestMethod.AddNote,
|
4109
|
+
DevPortalAppPublishRequestMethod.UpdateNote,
|
4110
|
+
DevPortalAppPublishRequestMethod.RemoveNote,
|
4111
|
+
];
|
4112
|
+
export function createDevPortalAppPublishRequestServer(service) {
|
4113
|
+
return new TwirpServer({
|
4114
|
+
service,
|
4115
|
+
packageName: 'devvit.dev_portal',
|
4116
|
+
serviceName: 'DevPortalAppPublishRequest',
|
4117
|
+
methodList: DevPortalAppPublishRequestMethodList,
|
4118
|
+
matchRoute: matchDevPortalAppPublishRequestRoute,
|
4119
|
+
});
|
4120
|
+
}
|
4121
|
+
function matchDevPortalAppPublishRequestRoute(method, events) {
|
4122
|
+
switch (method) {
|
4123
|
+
case 'Submit':
|
4124
|
+
return async (ctx, service, data, interceptors) => {
|
4125
|
+
ctx = { ...ctx, methodName: 'Submit' };
|
4126
|
+
await events.onMatch(ctx);
|
4127
|
+
return handleDevPortalAppPublishRequestSubmitRequest(ctx, service, data, interceptors);
|
4128
|
+
};
|
4129
|
+
case 'Update':
|
4130
|
+
return async (ctx, service, data, interceptors) => {
|
4131
|
+
ctx = { ...ctx, methodName: 'Update' };
|
4132
|
+
await events.onMatch(ctx);
|
4133
|
+
return handleDevPortalAppPublishRequestUpdateRequest(ctx, service, data, interceptors);
|
4134
|
+
};
|
4135
|
+
case 'Get':
|
4136
|
+
return async (ctx, service, data, interceptors) => {
|
4137
|
+
ctx = { ...ctx, methodName: 'Get' };
|
4138
|
+
await events.onMatch(ctx);
|
4139
|
+
return handleDevPortalAppPublishRequestGetRequest(ctx, service, data, interceptors);
|
4140
|
+
};
|
4141
|
+
case 'GetAllRequestsByApp':
|
4142
|
+
return async (ctx, service, data, interceptors) => {
|
4143
|
+
ctx = { ...ctx, methodName: 'GetAllRequestsByApp' };
|
4144
|
+
await events.onMatch(ctx);
|
4145
|
+
return handleDevPortalAppPublishRequestGetAllRequestsByAppRequest(ctx, service, data, interceptors);
|
4146
|
+
};
|
4147
|
+
case 'AddReview':
|
4148
|
+
return async (ctx, service, data, interceptors) => {
|
4149
|
+
ctx = { ...ctx, methodName: 'AddReview' };
|
4150
|
+
await events.onMatch(ctx);
|
4151
|
+
return handleDevPortalAppPublishRequestAddReviewRequest(ctx, service, data, interceptors);
|
4152
|
+
};
|
4153
|
+
case 'UpdateReview':
|
4154
|
+
return async (ctx, service, data, interceptors) => {
|
4155
|
+
ctx = { ...ctx, methodName: 'UpdateReview' };
|
4156
|
+
await events.onMatch(ctx);
|
4157
|
+
return handleDevPortalAppPublishRequestUpdateReviewRequest(ctx, service, data, interceptors);
|
4158
|
+
};
|
4159
|
+
case 'RemoveReview':
|
4160
|
+
return async (ctx, service, data, interceptors) => {
|
4161
|
+
ctx = { ...ctx, methodName: 'RemoveReview' };
|
4162
|
+
await events.onMatch(ctx);
|
4163
|
+
return handleDevPortalAppPublishRequestRemoveReviewRequest(ctx, service, data, interceptors);
|
4164
|
+
};
|
4165
|
+
case 'AddNote':
|
4166
|
+
return async (ctx, service, data, interceptors) => {
|
4167
|
+
ctx = { ...ctx, methodName: 'AddNote' };
|
4168
|
+
await events.onMatch(ctx);
|
4169
|
+
return handleDevPortalAppPublishRequestAddNoteRequest(ctx, service, data, interceptors);
|
4170
|
+
};
|
4171
|
+
case 'UpdateNote':
|
4172
|
+
return async (ctx, service, data, interceptors) => {
|
4173
|
+
ctx = { ...ctx, methodName: 'UpdateNote' };
|
4174
|
+
await events.onMatch(ctx);
|
4175
|
+
return handleDevPortalAppPublishRequestUpdateNoteRequest(ctx, service, data, interceptors);
|
4176
|
+
};
|
4177
|
+
case 'RemoveNote':
|
4178
|
+
return async (ctx, service, data, interceptors) => {
|
4179
|
+
ctx = { ...ctx, methodName: 'RemoveNote' };
|
4180
|
+
await events.onMatch(ctx);
|
4181
|
+
return handleDevPortalAppPublishRequestRemoveNoteRequest(ctx, service, data, interceptors);
|
4182
|
+
};
|
4183
|
+
default:
|
4184
|
+
events.onNotFound();
|
4185
|
+
const msg = `no handler found`;
|
4186
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
4187
|
+
}
|
4188
|
+
}
|
4189
|
+
function handleDevPortalAppPublishRequestSubmitRequest(ctx, service, data, interceptors) {
|
4190
|
+
switch (ctx.contentType) {
|
4191
|
+
case TwirpContentType.JSON:
|
4192
|
+
return handleDevPortalAppPublishRequestSubmitJSON(ctx, service, data, interceptors);
|
4193
|
+
case TwirpContentType.Protobuf:
|
4194
|
+
return handleDevPortalAppPublishRequestSubmitProtobuf(ctx, service, data, interceptors);
|
4195
|
+
default:
|
4196
|
+
const msg = 'unexpected Content-Type';
|
4197
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
4198
|
+
}
|
4199
|
+
}
|
4200
|
+
function handleDevPortalAppPublishRequestUpdateRequest(ctx, service, data, interceptors) {
|
4201
|
+
switch (ctx.contentType) {
|
4202
|
+
case TwirpContentType.JSON:
|
4203
|
+
return handleDevPortalAppPublishRequestUpdateJSON(ctx, service, data, interceptors);
|
4204
|
+
case TwirpContentType.Protobuf:
|
4205
|
+
return handleDevPortalAppPublishRequestUpdateProtobuf(ctx, service, data, interceptors);
|
4206
|
+
default:
|
4207
|
+
const msg = 'unexpected Content-Type';
|
4208
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
4209
|
+
}
|
4210
|
+
}
|
4211
|
+
function handleDevPortalAppPublishRequestGetRequest(ctx, service, data, interceptors) {
|
4212
|
+
switch (ctx.contentType) {
|
4213
|
+
case TwirpContentType.JSON:
|
4214
|
+
return handleDevPortalAppPublishRequestGetJSON(ctx, service, data, interceptors);
|
4215
|
+
case TwirpContentType.Protobuf:
|
4216
|
+
return handleDevPortalAppPublishRequestGetProtobuf(ctx, service, data, interceptors);
|
4217
|
+
default:
|
4218
|
+
const msg = 'unexpected Content-Type';
|
4219
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
4220
|
+
}
|
4221
|
+
}
|
4222
|
+
function handleDevPortalAppPublishRequestGetAllRequestsByAppRequest(ctx, service, data, interceptors) {
|
4223
|
+
switch (ctx.contentType) {
|
4224
|
+
case TwirpContentType.JSON:
|
4225
|
+
return handleDevPortalAppPublishRequestGetAllRequestsByAppJSON(ctx, service, data, interceptors);
|
4226
|
+
case TwirpContentType.Protobuf:
|
4227
|
+
return handleDevPortalAppPublishRequestGetAllRequestsByAppProtobuf(ctx, service, data, interceptors);
|
4228
|
+
default:
|
4229
|
+
const msg = 'unexpected Content-Type';
|
4230
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
4231
|
+
}
|
4232
|
+
}
|
4233
|
+
function handleDevPortalAppPublishRequestAddReviewRequest(ctx, service, data, interceptors) {
|
4234
|
+
switch (ctx.contentType) {
|
4235
|
+
case TwirpContentType.JSON:
|
4236
|
+
return handleDevPortalAppPublishRequestAddReviewJSON(ctx, service, data, interceptors);
|
4237
|
+
case TwirpContentType.Protobuf:
|
4238
|
+
return handleDevPortalAppPublishRequestAddReviewProtobuf(ctx, service, data, interceptors);
|
4239
|
+
default:
|
4240
|
+
const msg = 'unexpected Content-Type';
|
4241
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
4242
|
+
}
|
4243
|
+
}
|
4244
|
+
function handleDevPortalAppPublishRequestUpdateReviewRequest(ctx, service, data, interceptors) {
|
4245
|
+
switch (ctx.contentType) {
|
4246
|
+
case TwirpContentType.JSON:
|
4247
|
+
return handleDevPortalAppPublishRequestUpdateReviewJSON(ctx, service, data, interceptors);
|
4248
|
+
case TwirpContentType.Protobuf:
|
4249
|
+
return handleDevPortalAppPublishRequestUpdateReviewProtobuf(ctx, service, data, interceptors);
|
4250
|
+
default:
|
4251
|
+
const msg = 'unexpected Content-Type';
|
4252
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
4253
|
+
}
|
4254
|
+
}
|
4255
|
+
function handleDevPortalAppPublishRequestRemoveReviewRequest(ctx, service, data, interceptors) {
|
4256
|
+
switch (ctx.contentType) {
|
4257
|
+
case TwirpContentType.JSON:
|
4258
|
+
return handleDevPortalAppPublishRequestRemoveReviewJSON(ctx, service, data, interceptors);
|
4259
|
+
case TwirpContentType.Protobuf:
|
4260
|
+
return handleDevPortalAppPublishRequestRemoveReviewProtobuf(ctx, service, data, interceptors);
|
4261
|
+
default:
|
4262
|
+
const msg = 'unexpected Content-Type';
|
4263
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
4264
|
+
}
|
4265
|
+
}
|
4266
|
+
function handleDevPortalAppPublishRequestAddNoteRequest(ctx, service, data, interceptors) {
|
4267
|
+
switch (ctx.contentType) {
|
4268
|
+
case TwirpContentType.JSON:
|
4269
|
+
return handleDevPortalAppPublishRequestAddNoteJSON(ctx, service, data, interceptors);
|
4270
|
+
case TwirpContentType.Protobuf:
|
4271
|
+
return handleDevPortalAppPublishRequestAddNoteProtobuf(ctx, service, data, interceptors);
|
4272
|
+
default:
|
4273
|
+
const msg = 'unexpected Content-Type';
|
4274
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
4275
|
+
}
|
4276
|
+
}
|
4277
|
+
function handleDevPortalAppPublishRequestUpdateNoteRequest(ctx, service, data, interceptors) {
|
4278
|
+
switch (ctx.contentType) {
|
4279
|
+
case TwirpContentType.JSON:
|
4280
|
+
return handleDevPortalAppPublishRequestUpdateNoteJSON(ctx, service, data, interceptors);
|
4281
|
+
case TwirpContentType.Protobuf:
|
4282
|
+
return handleDevPortalAppPublishRequestUpdateNoteProtobuf(ctx, service, data, interceptors);
|
4283
|
+
default:
|
4284
|
+
const msg = 'unexpected Content-Type';
|
4285
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
4286
|
+
}
|
4287
|
+
}
|
4288
|
+
function handleDevPortalAppPublishRequestRemoveNoteRequest(ctx, service, data, interceptors) {
|
4289
|
+
switch (ctx.contentType) {
|
4290
|
+
case TwirpContentType.JSON:
|
4291
|
+
return handleDevPortalAppPublishRequestRemoveNoteJSON(ctx, service, data, interceptors);
|
4292
|
+
case TwirpContentType.Protobuf:
|
4293
|
+
return handleDevPortalAppPublishRequestRemoveNoteProtobuf(ctx, service, data, interceptors);
|
4294
|
+
default:
|
4295
|
+
const msg = 'unexpected Content-Type';
|
4296
|
+
throw new TwirpError(TwirpErrorCode.BadRoute, msg);
|
4297
|
+
}
|
4298
|
+
}
|
4299
|
+
async function handleDevPortalAppPublishRequestSubmitJSON(ctx, service, data, interceptors) {
|
4300
|
+
let request;
|
4301
|
+
let response;
|
4302
|
+
try {
|
4303
|
+
const body = JSON.parse(data.toString() || '{}');
|
4304
|
+
request = AppPRCreateRequest.fromJSON(body);
|
4305
|
+
}
|
4306
|
+
catch (e) {
|
4307
|
+
if (e instanceof Error) {
|
4308
|
+
const msg = 'the json request could not be decoded';
|
4309
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4310
|
+
}
|
4311
|
+
}
|
4312
|
+
if (interceptors && interceptors.length > 0) {
|
4313
|
+
const interceptor = chainInterceptors(...interceptors);
|
4314
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4315
|
+
return service.Submit(ctx, inputReq);
|
4316
|
+
});
|
4317
|
+
}
|
4318
|
+
else {
|
4319
|
+
response = await service.Submit(ctx, request);
|
4320
|
+
}
|
4321
|
+
return JSON.stringify(UUID.toJSON(response));
|
4322
|
+
}
|
4323
|
+
async function handleDevPortalAppPublishRequestUpdateJSON(ctx, service, data, interceptors) {
|
4324
|
+
let request;
|
4325
|
+
let response;
|
4326
|
+
try {
|
4327
|
+
const body = JSON.parse(data.toString() || '{}');
|
4328
|
+
request = AppPRUpdateRequest.fromJSON(body);
|
4329
|
+
}
|
4330
|
+
catch (e) {
|
4331
|
+
if (e instanceof Error) {
|
4332
|
+
const msg = 'the json request could not be decoded';
|
4333
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4334
|
+
}
|
4335
|
+
}
|
4336
|
+
if (interceptors && interceptors.length > 0) {
|
4337
|
+
const interceptor = chainInterceptors(...interceptors);
|
4338
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4339
|
+
return service.Update(ctx, inputReq);
|
4340
|
+
});
|
4341
|
+
}
|
4342
|
+
else {
|
4343
|
+
response = await service.Update(ctx, request);
|
4344
|
+
}
|
4345
|
+
return JSON.stringify(Empty.toJSON(response));
|
4346
|
+
}
|
4347
|
+
async function handleDevPortalAppPublishRequestGetJSON(ctx, service, data, interceptors) {
|
4348
|
+
let request;
|
4349
|
+
let response;
|
4350
|
+
try {
|
4351
|
+
const body = JSON.parse(data.toString() || '{}');
|
4352
|
+
request = AppPRGetRequest.fromJSON(body);
|
4353
|
+
}
|
4354
|
+
catch (e) {
|
4355
|
+
if (e instanceof Error) {
|
4356
|
+
const msg = 'the json request could not be decoded';
|
4357
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4358
|
+
}
|
4359
|
+
}
|
4360
|
+
if (interceptors && interceptors.length > 0) {
|
4361
|
+
const interceptor = chainInterceptors(...interceptors);
|
4362
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4363
|
+
return service.Get(ctx, inputReq);
|
4364
|
+
});
|
4365
|
+
}
|
4366
|
+
else {
|
4367
|
+
response = await service.Get(ctx, request);
|
4368
|
+
}
|
4369
|
+
return JSON.stringify(FullPublishRequestInfo.toJSON(response));
|
4370
|
+
}
|
4371
|
+
async function handleDevPortalAppPublishRequestGetAllRequestsByAppJSON(ctx, service, data, interceptors) {
|
4372
|
+
let request;
|
4373
|
+
let response;
|
4374
|
+
try {
|
4375
|
+
const body = JSON.parse(data.toString() || '{}');
|
4376
|
+
request = AppPRGetByAppRequest.fromJSON(body);
|
4377
|
+
}
|
4378
|
+
catch (e) {
|
4379
|
+
if (e instanceof Error) {
|
4380
|
+
const msg = 'the json request could not be decoded';
|
4381
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4382
|
+
}
|
4383
|
+
}
|
4384
|
+
if (interceptors && interceptors.length > 0) {
|
4385
|
+
const interceptor = chainInterceptors(...interceptors);
|
4386
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4387
|
+
return service.GetAllRequestsByApp(ctx, inputReq);
|
4388
|
+
});
|
4389
|
+
}
|
4390
|
+
else {
|
4391
|
+
response = await service.GetAllRequestsByApp(ctx, request);
|
4392
|
+
}
|
4393
|
+
return JSON.stringify(MultiplePublishRequestInfos.toJSON(response));
|
4394
|
+
}
|
4395
|
+
async function handleDevPortalAppPublishRequestAddReviewJSON(ctx, service, data, interceptors) {
|
4396
|
+
let request;
|
4397
|
+
let response;
|
4398
|
+
try {
|
4399
|
+
const body = JSON.parse(data.toString() || '{}');
|
4400
|
+
request = AppPRAddReviewRequest.fromJSON(body);
|
4401
|
+
}
|
4402
|
+
catch (e) {
|
4403
|
+
if (e instanceof Error) {
|
4404
|
+
const msg = 'the json request could not be decoded';
|
4405
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4406
|
+
}
|
4407
|
+
}
|
4408
|
+
if (interceptors && interceptors.length > 0) {
|
4409
|
+
const interceptor = chainInterceptors(...interceptors);
|
4410
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4411
|
+
return service.AddReview(ctx, inputReq);
|
4412
|
+
});
|
4413
|
+
}
|
4414
|
+
else {
|
4415
|
+
response = await service.AddReview(ctx, request);
|
4416
|
+
}
|
4417
|
+
return JSON.stringify(UUID.toJSON(response));
|
4418
|
+
}
|
4419
|
+
async function handleDevPortalAppPublishRequestUpdateReviewJSON(ctx, service, data, interceptors) {
|
4420
|
+
let request;
|
4421
|
+
let response;
|
4422
|
+
try {
|
4423
|
+
const body = JSON.parse(data.toString() || '{}');
|
4424
|
+
request = AppPRUpdateReviewRequest.fromJSON(body);
|
4425
|
+
}
|
4426
|
+
catch (e) {
|
4427
|
+
if (e instanceof Error) {
|
4428
|
+
const msg = 'the json request could not be decoded';
|
4429
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4430
|
+
}
|
4431
|
+
}
|
4432
|
+
if (interceptors && interceptors.length > 0) {
|
4433
|
+
const interceptor = chainInterceptors(...interceptors);
|
4434
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4435
|
+
return service.UpdateReview(ctx, inputReq);
|
4436
|
+
});
|
4437
|
+
}
|
4438
|
+
else {
|
4439
|
+
response = await service.UpdateReview(ctx, request);
|
4440
|
+
}
|
4441
|
+
return JSON.stringify(Empty.toJSON(response));
|
4442
|
+
}
|
4443
|
+
async function handleDevPortalAppPublishRequestRemoveReviewJSON(ctx, service, data, interceptors) {
|
4444
|
+
let request;
|
4445
|
+
let response;
|
4446
|
+
try {
|
4447
|
+
const body = JSON.parse(data.toString() || '{}');
|
4448
|
+
request = UUID.fromJSON(body);
|
4449
|
+
}
|
4450
|
+
catch (e) {
|
4451
|
+
if (e instanceof Error) {
|
4452
|
+
const msg = 'the json request could not be decoded';
|
4453
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4454
|
+
}
|
4455
|
+
}
|
4456
|
+
if (interceptors && interceptors.length > 0) {
|
4457
|
+
const interceptor = chainInterceptors(...interceptors);
|
4458
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4459
|
+
return service.RemoveReview(ctx, inputReq);
|
4460
|
+
});
|
4461
|
+
}
|
4462
|
+
else {
|
4463
|
+
response = await service.RemoveReview(ctx, request);
|
4464
|
+
}
|
4465
|
+
return JSON.stringify(Empty.toJSON(response));
|
4466
|
+
}
|
4467
|
+
async function handleDevPortalAppPublishRequestAddNoteJSON(ctx, service, data, interceptors) {
|
4468
|
+
let request;
|
4469
|
+
let response;
|
4470
|
+
try {
|
4471
|
+
const body = JSON.parse(data.toString() || '{}');
|
4472
|
+
request = AppPRAddNoteRequest.fromJSON(body);
|
4473
|
+
}
|
4474
|
+
catch (e) {
|
4475
|
+
if (e instanceof Error) {
|
4476
|
+
const msg = 'the json request could not be decoded';
|
4477
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4478
|
+
}
|
4479
|
+
}
|
4480
|
+
if (interceptors && interceptors.length > 0) {
|
4481
|
+
const interceptor = chainInterceptors(...interceptors);
|
4482
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4483
|
+
return service.AddNote(ctx, inputReq);
|
4484
|
+
});
|
4485
|
+
}
|
4486
|
+
else {
|
4487
|
+
response = await service.AddNote(ctx, request);
|
4488
|
+
}
|
4489
|
+
return JSON.stringify(UUID.toJSON(response));
|
4490
|
+
}
|
4491
|
+
async function handleDevPortalAppPublishRequestUpdateNoteJSON(ctx, service, data, interceptors) {
|
4492
|
+
let request;
|
4493
|
+
let response;
|
4494
|
+
try {
|
4495
|
+
const body = JSON.parse(data.toString() || '{}');
|
4496
|
+
request = AppPRUpdateNoteRequest.fromJSON(body);
|
4497
|
+
}
|
4498
|
+
catch (e) {
|
4499
|
+
if (e instanceof Error) {
|
4500
|
+
const msg = 'the json request could not be decoded';
|
4501
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4502
|
+
}
|
4503
|
+
}
|
4504
|
+
if (interceptors && interceptors.length > 0) {
|
4505
|
+
const interceptor = chainInterceptors(...interceptors);
|
4506
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4507
|
+
return service.UpdateNote(ctx, inputReq);
|
4508
|
+
});
|
4509
|
+
}
|
4510
|
+
else {
|
4511
|
+
response = await service.UpdateNote(ctx, request);
|
4512
|
+
}
|
4513
|
+
return JSON.stringify(Empty.toJSON(response));
|
4514
|
+
}
|
4515
|
+
async function handleDevPortalAppPublishRequestRemoveNoteJSON(ctx, service, data, interceptors) {
|
4516
|
+
let request;
|
4517
|
+
let response;
|
4518
|
+
try {
|
4519
|
+
const body = JSON.parse(data.toString() || '{}');
|
4520
|
+
request = UUID.fromJSON(body);
|
4521
|
+
}
|
4522
|
+
catch (e) {
|
4523
|
+
if (e instanceof Error) {
|
4524
|
+
const msg = 'the json request could not be decoded';
|
4525
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4526
|
+
}
|
4527
|
+
}
|
4528
|
+
if (interceptors && interceptors.length > 0) {
|
4529
|
+
const interceptor = chainInterceptors(...interceptors);
|
4530
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4531
|
+
return service.RemoveNote(ctx, inputReq);
|
4532
|
+
});
|
4533
|
+
}
|
4534
|
+
else {
|
4535
|
+
response = await service.RemoveNote(ctx, request);
|
4536
|
+
}
|
4537
|
+
return JSON.stringify(Empty.toJSON(response));
|
4538
|
+
}
|
4539
|
+
async function handleDevPortalAppPublishRequestSubmitProtobuf(ctx, service, data, interceptors) {
|
4540
|
+
let request;
|
4541
|
+
let response;
|
4542
|
+
try {
|
4543
|
+
request = AppPRCreateRequest.decode(data);
|
4544
|
+
}
|
4545
|
+
catch (e) {
|
4546
|
+
if (e instanceof Error) {
|
4547
|
+
const msg = 'the protobuf request could not be decoded';
|
4548
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4549
|
+
}
|
4550
|
+
}
|
4551
|
+
if (interceptors && interceptors.length > 0) {
|
4552
|
+
const interceptor = chainInterceptors(...interceptors);
|
4553
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4554
|
+
return service.Submit(ctx, inputReq);
|
4555
|
+
});
|
4556
|
+
}
|
4557
|
+
else {
|
4558
|
+
response = await service.Submit(ctx, request);
|
4559
|
+
}
|
4560
|
+
return Buffer.from(UUID.encode(response).finish());
|
4561
|
+
}
|
4562
|
+
async function handleDevPortalAppPublishRequestUpdateProtobuf(ctx, service, data, interceptors) {
|
4563
|
+
let request;
|
4564
|
+
let response;
|
4565
|
+
try {
|
4566
|
+
request = AppPRUpdateRequest.decode(data);
|
4567
|
+
}
|
4568
|
+
catch (e) {
|
4569
|
+
if (e instanceof Error) {
|
4570
|
+
const msg = 'the protobuf request could not be decoded';
|
4571
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4572
|
+
}
|
4573
|
+
}
|
4574
|
+
if (interceptors && interceptors.length > 0) {
|
4575
|
+
const interceptor = chainInterceptors(...interceptors);
|
4576
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4577
|
+
return service.Update(ctx, inputReq);
|
4578
|
+
});
|
4579
|
+
}
|
4580
|
+
else {
|
4581
|
+
response = await service.Update(ctx, request);
|
4582
|
+
}
|
4583
|
+
return Buffer.from(Empty.encode(response).finish());
|
4584
|
+
}
|
4585
|
+
async function handleDevPortalAppPublishRequestGetProtobuf(ctx, service, data, interceptors) {
|
4586
|
+
let request;
|
4587
|
+
let response;
|
4588
|
+
try {
|
4589
|
+
request = AppPRGetRequest.decode(data);
|
4590
|
+
}
|
4591
|
+
catch (e) {
|
4592
|
+
if (e instanceof Error) {
|
4593
|
+
const msg = 'the protobuf request could not be decoded';
|
4594
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4595
|
+
}
|
4596
|
+
}
|
4597
|
+
if (interceptors && interceptors.length > 0) {
|
4598
|
+
const interceptor = chainInterceptors(...interceptors);
|
4599
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4600
|
+
return service.Get(ctx, inputReq);
|
4601
|
+
});
|
4602
|
+
}
|
4603
|
+
else {
|
4604
|
+
response = await service.Get(ctx, request);
|
4605
|
+
}
|
4606
|
+
return Buffer.from(FullPublishRequestInfo.encode(response).finish());
|
4607
|
+
}
|
4608
|
+
async function handleDevPortalAppPublishRequestGetAllRequestsByAppProtobuf(ctx, service, data, interceptors) {
|
4609
|
+
let request;
|
4610
|
+
let response;
|
4611
|
+
try {
|
4612
|
+
request = AppPRGetByAppRequest.decode(data);
|
4613
|
+
}
|
4614
|
+
catch (e) {
|
4615
|
+
if (e instanceof Error) {
|
4616
|
+
const msg = 'the protobuf request could not be decoded';
|
4617
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4618
|
+
}
|
4619
|
+
}
|
4620
|
+
if (interceptors && interceptors.length > 0) {
|
4621
|
+
const interceptor = chainInterceptors(...interceptors);
|
4622
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4623
|
+
return service.GetAllRequestsByApp(ctx, inputReq);
|
4624
|
+
});
|
4625
|
+
}
|
4626
|
+
else {
|
4627
|
+
response = await service.GetAllRequestsByApp(ctx, request);
|
4628
|
+
}
|
4629
|
+
return Buffer.from(MultiplePublishRequestInfos.encode(response).finish());
|
4630
|
+
}
|
4631
|
+
async function handleDevPortalAppPublishRequestAddReviewProtobuf(ctx, service, data, interceptors) {
|
4632
|
+
let request;
|
4633
|
+
let response;
|
4634
|
+
try {
|
4635
|
+
request = AppPRAddReviewRequest.decode(data);
|
4636
|
+
}
|
4637
|
+
catch (e) {
|
4638
|
+
if (e instanceof Error) {
|
4639
|
+
const msg = 'the protobuf request could not be decoded';
|
4640
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4641
|
+
}
|
4642
|
+
}
|
4643
|
+
if (interceptors && interceptors.length > 0) {
|
4644
|
+
const interceptor = chainInterceptors(...interceptors);
|
4645
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4646
|
+
return service.AddReview(ctx, inputReq);
|
4647
|
+
});
|
4648
|
+
}
|
4649
|
+
else {
|
4650
|
+
response = await service.AddReview(ctx, request);
|
4651
|
+
}
|
4652
|
+
return Buffer.from(UUID.encode(response).finish());
|
4653
|
+
}
|
4654
|
+
async function handleDevPortalAppPublishRequestUpdateReviewProtobuf(ctx, service, data, interceptors) {
|
4655
|
+
let request;
|
4656
|
+
let response;
|
4657
|
+
try {
|
4658
|
+
request = AppPRUpdateReviewRequest.decode(data);
|
4659
|
+
}
|
4660
|
+
catch (e) {
|
4661
|
+
if (e instanceof Error) {
|
4662
|
+
const msg = 'the protobuf request could not be decoded';
|
4663
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4664
|
+
}
|
4665
|
+
}
|
4666
|
+
if (interceptors && interceptors.length > 0) {
|
4667
|
+
const interceptor = chainInterceptors(...interceptors);
|
4668
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4669
|
+
return service.UpdateReview(ctx, inputReq);
|
4670
|
+
});
|
4671
|
+
}
|
4672
|
+
else {
|
4673
|
+
response = await service.UpdateReview(ctx, request);
|
4674
|
+
}
|
4675
|
+
return Buffer.from(Empty.encode(response).finish());
|
4676
|
+
}
|
4677
|
+
async function handleDevPortalAppPublishRequestRemoveReviewProtobuf(ctx, service, data, interceptors) {
|
4678
|
+
let request;
|
4679
|
+
let response;
|
4680
|
+
try {
|
4681
|
+
request = UUID.decode(data);
|
4682
|
+
}
|
4683
|
+
catch (e) {
|
4684
|
+
if (e instanceof Error) {
|
4685
|
+
const msg = 'the protobuf request could not be decoded';
|
4686
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4687
|
+
}
|
4688
|
+
}
|
4689
|
+
if (interceptors && interceptors.length > 0) {
|
4690
|
+
const interceptor = chainInterceptors(...interceptors);
|
4691
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4692
|
+
return service.RemoveReview(ctx, inputReq);
|
4693
|
+
});
|
4694
|
+
}
|
4695
|
+
else {
|
4696
|
+
response = await service.RemoveReview(ctx, request);
|
4697
|
+
}
|
4698
|
+
return Buffer.from(Empty.encode(response).finish());
|
4699
|
+
}
|
4700
|
+
async function handleDevPortalAppPublishRequestAddNoteProtobuf(ctx, service, data, interceptors) {
|
4701
|
+
let request;
|
4702
|
+
let response;
|
4703
|
+
try {
|
4704
|
+
request = AppPRAddNoteRequest.decode(data);
|
4705
|
+
}
|
4706
|
+
catch (e) {
|
4707
|
+
if (e instanceof Error) {
|
4708
|
+
const msg = 'the protobuf request could not be decoded';
|
4709
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4710
|
+
}
|
4711
|
+
}
|
4712
|
+
if (interceptors && interceptors.length > 0) {
|
4713
|
+
const interceptor = chainInterceptors(...interceptors);
|
4714
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4715
|
+
return service.AddNote(ctx, inputReq);
|
4716
|
+
});
|
4717
|
+
}
|
4718
|
+
else {
|
4719
|
+
response = await service.AddNote(ctx, request);
|
4720
|
+
}
|
4721
|
+
return Buffer.from(UUID.encode(response).finish());
|
4722
|
+
}
|
4723
|
+
async function handleDevPortalAppPublishRequestUpdateNoteProtobuf(ctx, service, data, interceptors) {
|
4724
|
+
let request;
|
4725
|
+
let response;
|
4726
|
+
try {
|
4727
|
+
request = AppPRUpdateNoteRequest.decode(data);
|
4728
|
+
}
|
4729
|
+
catch (e) {
|
4730
|
+
if (e instanceof Error) {
|
4731
|
+
const msg = 'the protobuf request could not be decoded';
|
4732
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4733
|
+
}
|
4734
|
+
}
|
4735
|
+
if (interceptors && interceptors.length > 0) {
|
4736
|
+
const interceptor = chainInterceptors(...interceptors);
|
4737
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4738
|
+
return service.UpdateNote(ctx, inputReq);
|
4739
|
+
});
|
4740
|
+
}
|
4741
|
+
else {
|
4742
|
+
response = await service.UpdateNote(ctx, request);
|
4743
|
+
}
|
4744
|
+
return Buffer.from(Empty.encode(response).finish());
|
4745
|
+
}
|
4746
|
+
async function handleDevPortalAppPublishRequestRemoveNoteProtobuf(ctx, service, data, interceptors) {
|
4747
|
+
let request;
|
4748
|
+
let response;
|
4749
|
+
try {
|
4750
|
+
request = UUID.decode(data);
|
4751
|
+
}
|
4752
|
+
catch (e) {
|
4753
|
+
if (e instanceof Error) {
|
4754
|
+
const msg = 'the protobuf request could not be decoded';
|
4755
|
+
throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
|
4756
|
+
}
|
4757
|
+
}
|
4758
|
+
if (interceptors && interceptors.length > 0) {
|
4759
|
+
const interceptor = chainInterceptors(...interceptors);
|
4760
|
+
response = await interceptor(ctx, request, (ctx, inputReq) => {
|
4761
|
+
return service.RemoveNote(ctx, inputReq);
|
4762
|
+
});
|
4763
|
+
}
|
4764
|
+
else {
|
4765
|
+
response = await service.RemoveNote(ctx, request);
|
4766
|
+
}
|
4767
|
+
return Buffer.from(Empty.encode(response).finish());
|
4768
|
+
}
|