@livechat/developer-studio-api 3.0.2 → 3.0.4
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/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +449 -672
- package/dist/index.mjs +449 -672
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3145,151 +3145,6 @@ function initPlatformDpsClientInstance(baseUrl, token) {
|
|
|
3145
3145
|
}
|
|
3146
3146
|
}
|
|
3147
3147
|
|
|
3148
|
-
// src/apis/platform/dps/applications/application/authorization/api.ts
|
|
3149
|
-
var platformDpsApplicationAuthorizationApi = {
|
|
3150
|
-
createAuth(appId, payload, authorization) {
|
|
3151
|
-
return __async(this, null, function* () {
|
|
3152
|
-
try {
|
|
3153
|
-
yield platformDpsClientInstance.post(
|
|
3154
|
-
`/v2/applications/${appId}/authorization`,
|
|
3155
|
-
payload,
|
|
3156
|
-
getPlatformDpsClientConfig(authorization)
|
|
3157
|
-
);
|
|
3158
|
-
} catch (error) {
|
|
3159
|
-
if (error instanceof Error) {
|
|
3160
|
-
throw new Error(
|
|
3161
|
-
`Authorization couldn't be created. [${error.message}]`
|
|
3162
|
-
);
|
|
3163
|
-
}
|
|
3164
|
-
throw error;
|
|
3165
|
-
}
|
|
3166
|
-
});
|
|
3167
|
-
},
|
|
3168
|
-
deleteAuth(appId, authorization) {
|
|
3169
|
-
return __async(this, null, function* () {
|
|
3170
|
-
try {
|
|
3171
|
-
yield platformDpsClientInstance.delete(
|
|
3172
|
-
`/v2/applications/${appId}/authorization`,
|
|
3173
|
-
getPlatformDpsClientConfig(authorization)
|
|
3174
|
-
);
|
|
3175
|
-
} catch (error) {
|
|
3176
|
-
if (error instanceof Error) {
|
|
3177
|
-
throw new Error(
|
|
3178
|
-
`Authorization couldn't be created. [${error.message}]`
|
|
3179
|
-
);
|
|
3180
|
-
}
|
|
3181
|
-
throw error;
|
|
3182
|
-
}
|
|
3183
|
-
});
|
|
3184
|
-
}
|
|
3185
|
-
};
|
|
3186
|
-
|
|
3187
|
-
// src/apis/platform/dps/applications/application/autoReview/_contracts/dtos/autoReview.ts
|
|
3188
|
-
var getEmptyAppAutoReview = () => ({
|
|
3189
|
-
isReviewed: false,
|
|
3190
|
-
recommendations: {
|
|
3191
|
-
listingDetails: {
|
|
3192
|
-
appName: "",
|
|
3193
|
-
shortDescription: "",
|
|
3194
|
-
longDescription: "",
|
|
3195
|
-
features: "",
|
|
3196
|
-
benefits: ""
|
|
3197
|
-
},
|
|
3198
|
-
auth: {
|
|
3199
|
-
hasZeroScopes: false
|
|
3200
|
-
}
|
|
3201
|
-
},
|
|
3202
|
-
errors: {
|
|
3203
|
-
listingDetails: {
|
|
3204
|
-
appName: "",
|
|
3205
|
-
shortDescription: "",
|
|
3206
|
-
longDescription: "",
|
|
3207
|
-
features: "",
|
|
3208
|
-
benefits: ""
|
|
3209
|
-
},
|
|
3210
|
-
auth: {
|
|
3211
|
-
hasAllScopes: false,
|
|
3212
|
-
isRedirectUriSafe: false
|
|
3213
|
-
},
|
|
3214
|
-
links: {
|
|
3215
|
-
tutorial: {
|
|
3216
|
-
returns200: false,
|
|
3217
|
-
isValid: false
|
|
3218
|
-
},
|
|
3219
|
-
privacyPolicy: {
|
|
3220
|
-
returns200: false,
|
|
3221
|
-
isValid: false
|
|
3222
|
-
}
|
|
3223
|
-
},
|
|
3224
|
-
images: {
|
|
3225
|
-
icon: {
|
|
3226
|
-
isNsfw: false,
|
|
3227
|
-
isRatioValid: false
|
|
3228
|
-
},
|
|
3229
|
-
screenshots: {
|
|
3230
|
-
areNsfw: false,
|
|
3231
|
-
areRatiosValid: false
|
|
3232
|
-
}
|
|
3233
|
-
}
|
|
3234
|
-
}
|
|
3235
|
-
});
|
|
3236
|
-
|
|
3237
|
-
// src/apis/platform/dps/applications/application/autoReview/_contracts/payloads/autoReview.ts
|
|
3238
|
-
var getAppAutoReviewPayload = (value) => {
|
|
3239
|
-
return {
|
|
3240
|
-
appName: value,
|
|
3241
|
-
shortDescription: value,
|
|
3242
|
-
longDescription: value,
|
|
3243
|
-
features: value,
|
|
3244
|
-
benefits: value,
|
|
3245
|
-
scopes: value,
|
|
3246
|
-
redirect: value,
|
|
3247
|
-
tutorial: value,
|
|
3248
|
-
privacyPolicy: value,
|
|
3249
|
-
icons: value,
|
|
3250
|
-
screenshots: value
|
|
3251
|
-
};
|
|
3252
|
-
};
|
|
3253
|
-
|
|
3254
|
-
// src/apis/platform/dps/applications/application/autoReview/api.ts
|
|
3255
|
-
var platformDpsApplicationAutoReviewApi = {
|
|
3256
|
-
getAutoReview(appId, authorization) {
|
|
3257
|
-
return __async(this, null, function* () {
|
|
3258
|
-
try {
|
|
3259
|
-
const response = yield platformDpsClientInstance.get(
|
|
3260
|
-
`/v2/applications/${appId}/auto-review`,
|
|
3261
|
-
getPlatformDpsClientConfig(authorization)
|
|
3262
|
-
);
|
|
3263
|
-
if (response.status === 204) {
|
|
3264
|
-
return getEmptyAppAutoReview();
|
|
3265
|
-
}
|
|
3266
|
-
return response.data;
|
|
3267
|
-
} catch (error) {
|
|
3268
|
-
if (error instanceof Error) {
|
|
3269
|
-
throw new Error(`The review couldn\u2019t be completed. [${error.message}]`);
|
|
3270
|
-
}
|
|
3271
|
-
throw error;
|
|
3272
|
-
}
|
|
3273
|
-
});
|
|
3274
|
-
},
|
|
3275
|
-
submitAutoReview(appId, payload, authorization) {
|
|
3276
|
-
return __async(this, null, function* () {
|
|
3277
|
-
try {
|
|
3278
|
-
yield platformDpsClientInstance.post(
|
|
3279
|
-
`/v2/applications/${appId}/auto-review`,
|
|
3280
|
-
payload,
|
|
3281
|
-
getPlatformDpsClientConfig(authorization)
|
|
3282
|
-
);
|
|
3283
|
-
} catch (error) {
|
|
3284
|
-
if (error instanceof Error) {
|
|
3285
|
-
throw new Error(`The review couldn\u2019t be requested. [${error.message}]`);
|
|
3286
|
-
}
|
|
3287
|
-
throw error;
|
|
3288
|
-
}
|
|
3289
|
-
});
|
|
3290
|
-
}
|
|
3291
|
-
};
|
|
3292
|
-
|
|
3293
3148
|
// src/constants/app/templates/repository.ts
|
|
3294
3149
|
var appRepositoryTemplatesMap = {
|
|
3295
3150
|
"livechat/developer-app-template-nextjs": "nextjs",
|
|
@@ -3493,59 +3348,176 @@ var appTemplates = {
|
|
|
3493
3348
|
};
|
|
3494
3349
|
var allAppTemplates = __spreadValues(__spreadValues(__spreadValues({}, appRepositoryTemplates), appBaseTemplates), appTemplates);
|
|
3495
3350
|
|
|
3496
|
-
// src/apis/platform/dps/applications/application/
|
|
3497
|
-
var
|
|
3498
|
-
|
|
3351
|
+
// src/apis/platform/dps/applications/application/authorization/api.ts
|
|
3352
|
+
var platformDpsApplicationAuthorizationApi = {
|
|
3353
|
+
createAuth(appId, payload, authorization) {
|
|
3499
3354
|
return __async(this, null, function* () {
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3355
|
+
yield platformDpsClientInstance.post(
|
|
3356
|
+
`/v2/applications/${appId}/authorization`,
|
|
3357
|
+
payload,
|
|
3358
|
+
getPlatformDpsClientConfig(authorization)
|
|
3359
|
+
).catch((error) => {
|
|
3360
|
+
throw error.withCustomMessage(
|
|
3361
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
3505
3362
|
);
|
|
3506
|
-
}
|
|
3507
|
-
if (error instanceof Error) {
|
|
3508
|
-
throw new Error(
|
|
3509
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
3510
|
-
);
|
|
3511
|
-
}
|
|
3512
|
-
throw error;
|
|
3513
|
-
}
|
|
3363
|
+
});
|
|
3514
3364
|
});
|
|
3515
3365
|
},
|
|
3516
|
-
|
|
3366
|
+
deleteAuth(appId, authorization) {
|
|
3367
|
+
return __async(this, null, function* () {
|
|
3368
|
+
yield platformDpsClientInstance.delete(
|
|
3369
|
+
`/v2/applications/${appId}/authorization`,
|
|
3370
|
+
getPlatformDpsClientConfig(authorization)
|
|
3371
|
+
).catch((error) => {
|
|
3372
|
+
throw error.withCustomMessage(
|
|
3373
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
3374
|
+
);
|
|
3375
|
+
});
|
|
3376
|
+
});
|
|
3377
|
+
}
|
|
3378
|
+
};
|
|
3379
|
+
|
|
3380
|
+
// src/apis/platform/dps/applications/application/autoReview/_contracts/dtos/autoReview.ts
|
|
3381
|
+
var getEmptyAppAutoReview = () => ({
|
|
3382
|
+
isReviewed: false,
|
|
3383
|
+
recommendations: {
|
|
3384
|
+
listingDetails: {
|
|
3385
|
+
appName: "",
|
|
3386
|
+
shortDescription: "",
|
|
3387
|
+
longDescription: "",
|
|
3388
|
+
features: "",
|
|
3389
|
+
benefits: ""
|
|
3390
|
+
},
|
|
3391
|
+
auth: {
|
|
3392
|
+
hasZeroScopes: false
|
|
3393
|
+
}
|
|
3394
|
+
},
|
|
3395
|
+
errors: {
|
|
3396
|
+
listingDetails: {
|
|
3397
|
+
appName: "",
|
|
3398
|
+
shortDescription: "",
|
|
3399
|
+
longDescription: "",
|
|
3400
|
+
features: "",
|
|
3401
|
+
benefits: ""
|
|
3402
|
+
},
|
|
3403
|
+
auth: {
|
|
3404
|
+
hasAllScopes: false,
|
|
3405
|
+
isRedirectUriSafe: false
|
|
3406
|
+
},
|
|
3407
|
+
links: {
|
|
3408
|
+
tutorial: {
|
|
3409
|
+
returns200: false,
|
|
3410
|
+
isValid: false
|
|
3411
|
+
},
|
|
3412
|
+
privacyPolicy: {
|
|
3413
|
+
returns200: false,
|
|
3414
|
+
isValid: false
|
|
3415
|
+
}
|
|
3416
|
+
},
|
|
3417
|
+
images: {
|
|
3418
|
+
icon: {
|
|
3419
|
+
isNsfw: false,
|
|
3420
|
+
isRatioValid: false
|
|
3421
|
+
},
|
|
3422
|
+
screenshots: {
|
|
3423
|
+
areNsfw: false,
|
|
3424
|
+
areRatiosValid: false
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3427
|
+
}
|
|
3428
|
+
});
|
|
3429
|
+
|
|
3430
|
+
// src/apis/platform/dps/applications/application/autoReview/_contracts/payloads/autoReview.ts
|
|
3431
|
+
var getAppAutoReviewPayload = (value) => {
|
|
3432
|
+
return {
|
|
3433
|
+
appName: value,
|
|
3434
|
+
shortDescription: value,
|
|
3435
|
+
longDescription: value,
|
|
3436
|
+
features: value,
|
|
3437
|
+
benefits: value,
|
|
3438
|
+
scopes: value,
|
|
3439
|
+
redirect: value,
|
|
3440
|
+
tutorial: value,
|
|
3441
|
+
privacyPolicy: value,
|
|
3442
|
+
icons: value,
|
|
3443
|
+
screenshots: value
|
|
3444
|
+
};
|
|
3445
|
+
};
|
|
3446
|
+
|
|
3447
|
+
// src/apis/platform/dps/applications/application/autoReview/api.ts
|
|
3448
|
+
var platformDpsApplicationAutoReviewApi = {
|
|
3449
|
+
getAutoReview(appId, authorization) {
|
|
3517
3450
|
return __async(this, null, function* () {
|
|
3518
3451
|
try {
|
|
3519
|
-
yield platformDpsClientInstance.
|
|
3520
|
-
`/v2/applications/${appId}/
|
|
3521
|
-
payload,
|
|
3452
|
+
const response = yield platformDpsClientInstance.get(
|
|
3453
|
+
`/v2/applications/${appId}/auto-review`,
|
|
3522
3454
|
getPlatformDpsClientConfig(authorization)
|
|
3523
3455
|
);
|
|
3456
|
+
if (response.status === 204) {
|
|
3457
|
+
return getEmptyAppAutoReview();
|
|
3458
|
+
}
|
|
3459
|
+
return response.data;
|
|
3524
3460
|
} catch (error) {
|
|
3525
3461
|
if (error instanceof Error) {
|
|
3526
|
-
throw new Error(
|
|
3527
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
3528
|
-
);
|
|
3462
|
+
throw new Error(`The review couldn\u2019t be completed. [${error.message}]`);
|
|
3529
3463
|
}
|
|
3530
3464
|
throw error;
|
|
3531
3465
|
}
|
|
3532
3466
|
});
|
|
3533
3467
|
},
|
|
3534
|
-
|
|
3468
|
+
submitAutoReview(appId, payload, authorization) {
|
|
3535
3469
|
return __async(this, null, function* () {
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3470
|
+
yield platformDpsClientInstance.post(
|
|
3471
|
+
`/v2/applications/${appId}/auto-review`,
|
|
3472
|
+
payload,
|
|
3473
|
+
getPlatformDpsClientConfig(authorization)
|
|
3474
|
+
).catch((error) => {
|
|
3475
|
+
throw error.withCustomMessage(
|
|
3476
|
+
`The review couldn\u2019t be requested. [${error.message}]`
|
|
3540
3477
|
);
|
|
3541
|
-
}
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3478
|
+
});
|
|
3479
|
+
});
|
|
3480
|
+
}
|
|
3481
|
+
};
|
|
3482
|
+
|
|
3483
|
+
// src/apis/platform/dps/applications/application/chatActions/api.ts
|
|
3484
|
+
var platformDpsApplicationChatActionsApi = {
|
|
3485
|
+
createChatAction(appId, payload, authorization) {
|
|
3486
|
+
return __async(this, null, function* () {
|
|
3487
|
+
yield platformDpsClientInstance.put(
|
|
3488
|
+
`/v2/applications/${appId}/chat-actions/${payload.id}`,
|
|
3489
|
+
payload,
|
|
3490
|
+
getPlatformDpsClientConfig(authorization)
|
|
3491
|
+
).catch((error) => {
|
|
3492
|
+
throw error.withCustomMessage(
|
|
3493
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
3494
|
+
);
|
|
3495
|
+
});
|
|
3496
|
+
});
|
|
3497
|
+
},
|
|
3498
|
+
updateChatAction(appId, payload, authorization) {
|
|
3499
|
+
return __async(this, null, function* () {
|
|
3500
|
+
yield platformDpsClientInstance.patch(
|
|
3501
|
+
`/v2/applications/${appId}/chat-actions/${payload.id}`,
|
|
3502
|
+
payload,
|
|
3503
|
+
getPlatformDpsClientConfig(authorization)
|
|
3504
|
+
).catch((error) => {
|
|
3505
|
+
throw error.withCustomMessage(
|
|
3506
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
3507
|
+
);
|
|
3508
|
+
});
|
|
3509
|
+
});
|
|
3510
|
+
},
|
|
3511
|
+
deleteChatAction(appId, chatActionId, authorization) {
|
|
3512
|
+
return __async(this, null, function* () {
|
|
3513
|
+
yield platformDpsClientInstance.delete(
|
|
3514
|
+
`/v2/applications/${appId}/chat-actions/${chatActionId}`,
|
|
3515
|
+
__spreadValues({}, getPlatformDpsClientConfig(authorization))
|
|
3516
|
+
).catch((error) => {
|
|
3517
|
+
throw error.withCustomMessage(
|
|
3518
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
3519
|
+
);
|
|
3520
|
+
});
|
|
3549
3521
|
});
|
|
3550
3522
|
}
|
|
3551
3523
|
};
|
|
@@ -3553,48 +3525,39 @@ var platformDpsApplicationChatActionsApi = {
|
|
|
3553
3525
|
// src/apis/platform/dps/applications/application/chatBoosters/api.ts
|
|
3554
3526
|
var platformDpsApplicationChatBoostersApi = {
|
|
3555
3527
|
createChatBooster(appId, chatBoosterId, payload, authorization) {
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3528
|
+
return platformDpsClientInstance.put(
|
|
3529
|
+
`/v2/applications/${appId}/chat-boosters/${chatBoosterId}`,
|
|
3530
|
+
payload,
|
|
3531
|
+
getPlatformDpsClientConfig(authorization)
|
|
3532
|
+
).catch((error) => {
|
|
3533
|
+
throw error.withCustomMessage(
|
|
3534
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
3561
3535
|
);
|
|
3562
|
-
}
|
|
3563
|
-
if (error instanceof Error) {
|
|
3564
|
-
throw new Error(`Chat Booster couldn't be created. [${error.message}]`);
|
|
3565
|
-
}
|
|
3566
|
-
throw error;
|
|
3567
|
-
}
|
|
3536
|
+
});
|
|
3568
3537
|
},
|
|
3569
3538
|
updateChatBooster(appId, chatBoosterId, payload, authorization) {
|
|
3570
3539
|
return __async(this, null, function* () {
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3540
|
+
return platformDpsClientInstance.put(
|
|
3541
|
+
`/v2/applications/${appId}/chat-boosters/${chatBoosterId}`,
|
|
3542
|
+
payload,
|
|
3543
|
+
getPlatformDpsClientConfig(authorization)
|
|
3544
|
+
).catch((error) => {
|
|
3545
|
+
throw error.withCustomMessage(
|
|
3546
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
3576
3547
|
);
|
|
3577
|
-
}
|
|
3578
|
-
if (error instanceof Error) {
|
|
3579
|
-
throw new Error(`Chat Booster couldn't be updated. [${error.message}]`);
|
|
3580
|
-
}
|
|
3581
|
-
throw error;
|
|
3582
|
-
}
|
|
3548
|
+
});
|
|
3583
3549
|
});
|
|
3584
3550
|
},
|
|
3585
3551
|
deleteChatBooster(appId, chatBoosterId, authorization) {
|
|
3586
3552
|
return __async(this, null, function* () {
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3553
|
+
return platformDpsClientInstance.delete(
|
|
3554
|
+
`/v2/applications/${appId}/chat-boosters/${chatBoosterId}`,
|
|
3555
|
+
getPlatformDpsClientConfig(authorization)
|
|
3556
|
+
).catch((error) => {
|
|
3557
|
+
throw error.withCustomMessage(
|
|
3558
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
3591
3559
|
);
|
|
3592
|
-
}
|
|
3593
|
-
if (error instanceof Error) {
|
|
3594
|
-
throw new Error(`Chat Booster couldn't be deleted. [${error.message}]`);
|
|
3595
|
-
}
|
|
3596
|
-
throw error;
|
|
3597
|
-
}
|
|
3560
|
+
});
|
|
3598
3561
|
});
|
|
3599
3562
|
}
|
|
3600
3563
|
};
|
|
@@ -3603,165 +3566,119 @@ var platformDpsApplicationChatBoostersApi = {
|
|
|
3603
3566
|
var platformDpsApplicationDisplayApi = {
|
|
3604
3567
|
updateVersionHistory(appId, payload, authorization) {
|
|
3605
3568
|
return __async(this, null, function* () {
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3569
|
+
yield platformDpsClientInstance.put(
|
|
3570
|
+
`/v2/applications/${appId}/display/changelog`,
|
|
3571
|
+
payload,
|
|
3572
|
+
getPlatformDpsClientConfig(authorization)
|
|
3573
|
+
).catch((error) => {
|
|
3574
|
+
throw error.withCustomMessage(
|
|
3575
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3611
3576
|
);
|
|
3612
|
-
|
|
3613
|
-
} catch (error) {
|
|
3614
|
-
if (error instanceof Error) {
|
|
3615
|
-
throw new Error(
|
|
3616
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3617
|
-
);
|
|
3618
|
-
}
|
|
3619
|
-
throw error;
|
|
3620
|
-
}
|
|
3577
|
+
});
|
|
3621
3578
|
});
|
|
3622
3579
|
},
|
|
3623
3580
|
updateBasicDetails(appId, basicDetails, authorization) {
|
|
3624
3581
|
return __async(this, null, function* () {
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3582
|
+
yield platformDpsClientInstance.put(
|
|
3583
|
+
`/v2/applications/${appId}/display`,
|
|
3584
|
+
basicDetails,
|
|
3585
|
+
getPlatformDpsClientConfig(authorization)
|
|
3586
|
+
).catch((error) => {
|
|
3587
|
+
throw error.withCustomMessage(
|
|
3588
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3630
3589
|
);
|
|
3631
|
-
}
|
|
3632
|
-
if (error instanceof Error) {
|
|
3633
|
-
throw new Error(
|
|
3634
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3635
|
-
);
|
|
3636
|
-
}
|
|
3637
|
-
throw error;
|
|
3638
|
-
}
|
|
3590
|
+
});
|
|
3639
3591
|
});
|
|
3640
3592
|
},
|
|
3641
3593
|
patchBasicDetails(appId, basicDetails, authorization) {
|
|
3642
3594
|
return __async(this, null, function* () {
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3595
|
+
yield platformDpsClientInstance.patch(
|
|
3596
|
+
`/v2/applications/${appId}/display`,
|
|
3597
|
+
basicDetails,
|
|
3598
|
+
getPlatformDpsClientConfig(authorization)
|
|
3599
|
+
).catch((error) => {
|
|
3600
|
+
throw error.withCustomMessage(
|
|
3601
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3648
3602
|
);
|
|
3649
|
-
}
|
|
3650
|
-
if (error instanceof Error) {
|
|
3651
|
-
throw new Error(
|
|
3652
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3653
|
-
);
|
|
3654
|
-
}
|
|
3655
|
-
throw error;
|
|
3656
|
-
}
|
|
3603
|
+
});
|
|
3657
3604
|
});
|
|
3658
3605
|
},
|
|
3659
3606
|
updateOverview(appId, data, authorization) {
|
|
3660
3607
|
return __async(this, null, function* () {
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3608
|
+
yield platformDpsClientInstance.put(
|
|
3609
|
+
`/v2/applications/${appId}/listing/overview`,
|
|
3610
|
+
data,
|
|
3611
|
+
getPlatformDpsClientConfig(authorization)
|
|
3612
|
+
).catch((error) => {
|
|
3613
|
+
throw error.withCustomMessage(
|
|
3614
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3666
3615
|
);
|
|
3667
|
-
}
|
|
3668
|
-
if (error instanceof Error) {
|
|
3669
|
-
throw new Error(
|
|
3670
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3671
|
-
);
|
|
3672
|
-
}
|
|
3673
|
-
throw error;
|
|
3674
|
-
}
|
|
3616
|
+
});
|
|
3675
3617
|
});
|
|
3676
3618
|
},
|
|
3677
3619
|
updateTutorialAndSupport(appId, data, authorization) {
|
|
3678
3620
|
return __async(this, null, function* () {
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3621
|
+
yield platformDpsClientInstance.put(
|
|
3622
|
+
`/v2/applications/${appId}/listing/support`,
|
|
3623
|
+
data,
|
|
3624
|
+
getPlatformDpsClientConfig(authorization)
|
|
3625
|
+
).catch((error) => {
|
|
3626
|
+
throw error.withCustomMessage(
|
|
3627
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3684
3628
|
);
|
|
3685
|
-
}
|
|
3686
|
-
if (error instanceof Error) {
|
|
3687
|
-
throw new Error(
|
|
3688
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3689
|
-
);
|
|
3690
|
-
}
|
|
3691
|
-
throw error;
|
|
3692
|
-
}
|
|
3629
|
+
});
|
|
3693
3630
|
});
|
|
3694
3631
|
},
|
|
3695
3632
|
updateAppIcon(appId, payload, authorization) {
|
|
3696
3633
|
return __async(this, null, function* () {
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3634
|
+
yield platformDpsClientInstance.put(
|
|
3635
|
+
`/v2/applications/${appId}/display/icons`,
|
|
3636
|
+
payload,
|
|
3637
|
+
getPlatformDpsClientConfig(authorization)
|
|
3638
|
+
).catch((error) => {
|
|
3639
|
+
throw error.withCustomMessage(
|
|
3640
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3702
3641
|
);
|
|
3703
|
-
}
|
|
3704
|
-
if (error instanceof Error) {
|
|
3705
|
-
throw new Error(
|
|
3706
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3707
|
-
);
|
|
3708
|
-
}
|
|
3709
|
-
throw error;
|
|
3710
|
-
}
|
|
3642
|
+
});
|
|
3711
3643
|
});
|
|
3712
3644
|
},
|
|
3713
3645
|
updateDisplayImages(appId, screenshots, authorization) {
|
|
3714
3646
|
return __async(this, null, function* () {
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3647
|
+
yield platformDpsClientInstance.put(
|
|
3648
|
+
`/v2/applications/${appId}/screenshots/commit`,
|
|
3649
|
+
screenshots,
|
|
3650
|
+
getPlatformDpsClientConfig(authorization)
|
|
3651
|
+
).catch((error) => {
|
|
3652
|
+
throw error.withCustomMessage(
|
|
3653
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3720
3654
|
);
|
|
3721
|
-
}
|
|
3722
|
-
if (error instanceof Error) {
|
|
3723
|
-
throw new Error(
|
|
3724
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3725
|
-
);
|
|
3726
|
-
}
|
|
3727
|
-
throw error;
|
|
3728
|
-
}
|
|
3655
|
+
});
|
|
3729
3656
|
});
|
|
3730
3657
|
},
|
|
3731
3658
|
updateDisplayFeatures(appId, features, authorization) {
|
|
3732
3659
|
return __async(this, null, function* () {
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3660
|
+
yield platformDpsClientInstance.put(
|
|
3661
|
+
`/v2/applications/${appId}/features`,
|
|
3662
|
+
features,
|
|
3663
|
+
getPlatformDpsClientConfig(authorization)
|
|
3664
|
+
).catch((error) => {
|
|
3665
|
+
throw error.withCustomMessage(
|
|
3666
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3738
3667
|
);
|
|
3739
|
-
}
|
|
3740
|
-
if (error instanceof Error) {
|
|
3741
|
-
throw new Error(
|
|
3742
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3743
|
-
);
|
|
3744
|
-
}
|
|
3745
|
-
throw error;
|
|
3746
|
-
}
|
|
3668
|
+
});
|
|
3747
3669
|
});
|
|
3748
3670
|
},
|
|
3749
3671
|
updateDisplayBenefits(appId, benefits, authorization) {
|
|
3750
3672
|
return __async(this, null, function* () {
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3673
|
+
yield platformDpsClientInstance.put(
|
|
3674
|
+
`/v2/applications/${appId}/benefits`,
|
|
3675
|
+
benefits,
|
|
3676
|
+
getPlatformDpsClientConfig(authorization)
|
|
3677
|
+
).catch((error) => {
|
|
3678
|
+
throw error.withCustomMessage(
|
|
3679
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3756
3680
|
);
|
|
3757
|
-
}
|
|
3758
|
-
if (error instanceof Error) {
|
|
3759
|
-
throw new Error(
|
|
3760
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3761
|
-
);
|
|
3762
|
-
}
|
|
3763
|
-
throw error;
|
|
3764
|
-
}
|
|
3681
|
+
});
|
|
3765
3682
|
});
|
|
3766
3683
|
}
|
|
3767
3684
|
};
|
|
@@ -3770,18 +3687,14 @@ var platformDpsApplicationDisplayApi = {
|
|
|
3770
3687
|
var platformDpsApplicationEventApi = {
|
|
3771
3688
|
getEvents(appId, authorization) {
|
|
3772
3689
|
return __async(this, null, function* () {
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3690
|
+
return platformDpsClientInstance.get(
|
|
3691
|
+
`/v2/applications/${appId}/events?limit=300`,
|
|
3692
|
+
getPlatformDpsClientConfig(authorization)
|
|
3693
|
+
).then(({ data }) => data).catch((error) => {
|
|
3694
|
+
throw error.withCustomMessage(
|
|
3695
|
+
`App Events couldn't be fetched. [${error.message}]`
|
|
3777
3696
|
);
|
|
3778
|
-
|
|
3779
|
-
} catch (error) {
|
|
3780
|
-
if (error instanceof Error) {
|
|
3781
|
-
throw new Error(`App Events couldn't be fetched. [${error.message}]`);
|
|
3782
|
-
}
|
|
3783
|
-
throw error;
|
|
3784
|
-
}
|
|
3697
|
+
});
|
|
3785
3698
|
});
|
|
3786
3699
|
}
|
|
3787
3700
|
};
|
|
@@ -3837,7 +3750,6 @@ var platformDpsApplicationInfrastructureBlocksApi = {
|
|
|
3837
3750
|
{
|
|
3838
3751
|
appId,
|
|
3839
3752
|
deployment: {
|
|
3840
|
-
mode: payload.mode,
|
|
3841
3753
|
provider: payload.provider,
|
|
3842
3754
|
config
|
|
3843
3755
|
}
|
|
@@ -3871,51 +3783,40 @@ var platformDpsApplicationInfrastructureApi = {
|
|
|
3871
3783
|
var platformDpsApplicationInstallApi = {
|
|
3872
3784
|
install(appId, authorization) {
|
|
3873
3785
|
return __async(this, null, function* () {
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3786
|
+
yield platformDpsClientInstance.put(
|
|
3787
|
+
`/v2/applications/${appId}/install`,
|
|
3788
|
+
{},
|
|
3789
|
+
getPlatformDpsClientConfig(authorization)
|
|
3790
|
+
).catch((error) => {
|
|
3791
|
+
throw error.withCustomMessage(
|
|
3792
|
+
`App couldn't be installed. [${error.message}]`
|
|
3879
3793
|
);
|
|
3880
|
-
}
|
|
3881
|
-
if (error instanceof Error) {
|
|
3882
|
-
throw new Error(`App couldn't be installed. [${error.message}]`);
|
|
3883
|
-
}
|
|
3884
|
-
throw error;
|
|
3885
|
-
}
|
|
3794
|
+
});
|
|
3886
3795
|
});
|
|
3887
3796
|
},
|
|
3888
3797
|
uninstall(appId, authorization) {
|
|
3889
3798
|
return __async(this, null, function* () {
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3799
|
+
yield platformDpsClientInstance.delete(
|
|
3800
|
+
`/v2/applications/${appId}/install`,
|
|
3801
|
+
getPlatformDpsClientConfig(authorization)
|
|
3802
|
+
).catch((error) => {
|
|
3803
|
+
throw error.withCustomMessage(
|
|
3804
|
+
`App couldn't be uninstalled. [${error.message}]`
|
|
3894
3805
|
);
|
|
3895
|
-
}
|
|
3896
|
-
if (error instanceof Error) {
|
|
3897
|
-
throw new Error(`App couldn't be uninstalled. [${error.message}]`);
|
|
3898
|
-
}
|
|
3899
|
-
throw error;
|
|
3900
|
-
}
|
|
3806
|
+
});
|
|
3901
3807
|
});
|
|
3902
3808
|
},
|
|
3903
3809
|
updateDirectInstallationUrl(appId, payload, authorization) {
|
|
3904
3810
|
return __async(this, null, function* () {
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3811
|
+
yield platformDpsClientInstance.put(
|
|
3812
|
+
`/v2/applications/${appId}/install/direct`,
|
|
3813
|
+
payload,
|
|
3814
|
+
getPlatformDpsClientConfig(authorization)
|
|
3815
|
+
).catch((error) => {
|
|
3816
|
+
throw error.withCustomMessage(
|
|
3817
|
+
`Direct installation URL couldn't be updated. [${error.message}]`
|
|
3910
3818
|
);
|
|
3911
|
-
}
|
|
3912
|
-
if (error instanceof Error) {
|
|
3913
|
-
throw new Error(
|
|
3914
|
-
`Direct installation URL couldn't be updated. [${error.message}]`
|
|
3915
|
-
);
|
|
3916
|
-
}
|
|
3917
|
-
throw error;
|
|
3918
|
-
}
|
|
3819
|
+
});
|
|
3919
3820
|
});
|
|
3920
3821
|
}
|
|
3921
3822
|
};
|
|
@@ -3924,37 +3825,24 @@ var platformDpsApplicationInstallApi = {
|
|
|
3924
3825
|
var platformDpsApplicationOnboardingApi = {
|
|
3925
3826
|
updateOnboarding(appId, payload, authorization) {
|
|
3926
3827
|
return __async(this, null, function* () {
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3828
|
+
yield platformDpsClientInstance.put(
|
|
3829
|
+
`/v2/applications/${appId}/onboarding`,
|
|
3830
|
+
payload,
|
|
3831
|
+
getPlatformDpsClientConfig(authorization)
|
|
3832
|
+
).catch((error) => {
|
|
3833
|
+
throw error.withCustomMessage(
|
|
3834
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
3932
3835
|
);
|
|
3933
|
-
}
|
|
3934
|
-
if (error instanceof Error) {
|
|
3935
|
-
throw new Error(
|
|
3936
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
3937
|
-
);
|
|
3938
|
-
}
|
|
3939
|
-
throw error;
|
|
3940
|
-
}
|
|
3836
|
+
});
|
|
3941
3837
|
});
|
|
3942
3838
|
},
|
|
3943
3839
|
deleteOnboarding(appId, authorization) {
|
|
3944
3840
|
return __async(this, null, function* () {
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
__spreadValues({}, getPlatformDpsClientConfig(authorization))
|
|
3841
|
+
yield platformDpsClientInstance.delete(`/v2/applications/${appId}/onboarding`, __spreadValues({}, getPlatformDpsClientConfig(authorization))).catch((error) => {
|
|
3842
|
+
throw error.withCustomMessage(
|
|
3843
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
3949
3844
|
);
|
|
3950
|
-
}
|
|
3951
|
-
if (error instanceof Error) {
|
|
3952
|
-
throw new Error(
|
|
3953
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
3954
|
-
);
|
|
3955
|
-
}
|
|
3956
|
-
throw error;
|
|
3957
|
-
}
|
|
3845
|
+
});
|
|
3958
3846
|
});
|
|
3959
3847
|
}
|
|
3960
3848
|
};
|
|
@@ -3963,37 +3851,27 @@ var platformDpsApplicationOnboardingApi = {
|
|
|
3963
3851
|
var platformDpsApplicationPaymentApi = {
|
|
3964
3852
|
updatePaymentBlock(appId, payment, authorization) {
|
|
3965
3853
|
return __async(this, null, function* () {
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3854
|
+
yield platformDpsClientInstance.put(
|
|
3855
|
+
`/v2/applications/${appId}/payment`,
|
|
3856
|
+
payment,
|
|
3857
|
+
getPlatformDpsClientConfig(authorization)
|
|
3858
|
+
).catch((error) => {
|
|
3859
|
+
throw error.withCustomMessage(
|
|
3860
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
3971
3861
|
);
|
|
3972
|
-
}
|
|
3973
|
-
if (error instanceof Error) {
|
|
3974
|
-
throw new Error(
|
|
3975
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
3976
|
-
);
|
|
3977
|
-
}
|
|
3978
|
-
throw error;
|
|
3979
|
-
}
|
|
3862
|
+
});
|
|
3980
3863
|
});
|
|
3981
3864
|
},
|
|
3982
3865
|
deletePaymentBlock(appId, authorization) {
|
|
3983
3866
|
return __async(this, null, function* () {
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3867
|
+
yield platformDpsClientInstance.delete(
|
|
3868
|
+
`/v2/applications/${appId}/payment`,
|
|
3869
|
+
getPlatformDpsClientConfig(authorization)
|
|
3870
|
+
).catch((error) => {
|
|
3871
|
+
throw error.withCustomMessage(
|
|
3872
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
3988
3873
|
);
|
|
3989
|
-
}
|
|
3990
|
-
if (error instanceof Error) {
|
|
3991
|
-
throw new Error(
|
|
3992
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
3993
|
-
);
|
|
3994
|
-
}
|
|
3995
|
-
throw error;
|
|
3996
|
-
}
|
|
3874
|
+
});
|
|
3997
3875
|
});
|
|
3998
3876
|
}
|
|
3999
3877
|
};
|
|
@@ -4002,20 +3880,15 @@ var platformDpsApplicationPaymentApi = {
|
|
|
4002
3880
|
var platformDpsApplicationProductApi = {
|
|
4003
3881
|
updateProduct(appId, payload, authorization) {
|
|
4004
3882
|
return __async(this, null, function* () {
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
3883
|
+
yield platformDpsClientInstance.put(
|
|
3884
|
+
`/v2/applications/${appId}/product`,
|
|
3885
|
+
payload,
|
|
3886
|
+
getPlatformDpsClientConfig(authorization)
|
|
3887
|
+
).catch((error) => {
|
|
3888
|
+
throw error.withCustomMessage(
|
|
3889
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4010
3890
|
);
|
|
4011
|
-
}
|
|
4012
|
-
if (error instanceof Error) {
|
|
4013
|
-
throw new Error(
|
|
4014
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4015
|
-
);
|
|
4016
|
-
}
|
|
4017
|
-
throw error;
|
|
4018
|
-
}
|
|
3891
|
+
});
|
|
4019
3892
|
});
|
|
4020
3893
|
}
|
|
4021
3894
|
};
|
|
@@ -4024,58 +3897,39 @@ var platformDpsApplicationProductApi = {
|
|
|
4024
3897
|
var platformDpsApplicationCustomPropsApi = {
|
|
4025
3898
|
createCustomProps(appId, property, authorization) {
|
|
4026
3899
|
return __async(this, null, function* () {
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
3900
|
+
return platformDpsClientInstance.post(
|
|
3901
|
+
`/v2/applications/${appId}/property`,
|
|
3902
|
+
property,
|
|
3903
|
+
getPlatformDpsClientConfig(authorization)
|
|
3904
|
+
).then(({ data }) => data).catch((error) => {
|
|
3905
|
+
throw error.withCustomMessage(
|
|
3906
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
4032
3907
|
);
|
|
4033
|
-
|
|
4034
|
-
} catch (error) {
|
|
4035
|
-
if (error instanceof Error) {
|
|
4036
|
-
throw new Error(
|
|
4037
|
-
`Listing details couldn't be created. [${error.message}]`
|
|
4038
|
-
);
|
|
4039
|
-
}
|
|
4040
|
-
throw error;
|
|
4041
|
-
}
|
|
3908
|
+
});
|
|
4042
3909
|
});
|
|
4043
3910
|
},
|
|
4044
3911
|
updateCustomProps(appId, property, authorization) {
|
|
4045
3912
|
return __async(this, null, function* () {
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
3913
|
+
return platformDpsClientInstance.put(
|
|
3914
|
+
`/v2/applications/${appId}/property`,
|
|
3915
|
+
property,
|
|
3916
|
+
getPlatformDpsClientConfig(authorization)
|
|
3917
|
+
).then(({ data }) => data).catch((error) => {
|
|
3918
|
+
throw error.withCustomMessage(
|
|
3919
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4051
3920
|
);
|
|
4052
|
-
|
|
4053
|
-
} catch (error) {
|
|
4054
|
-
if (error instanceof Error) {
|
|
4055
|
-
throw new Error(
|
|
4056
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
4057
|
-
);
|
|
4058
|
-
}
|
|
4059
|
-
throw error;
|
|
4060
|
-
}
|
|
3921
|
+
});
|
|
4061
3922
|
});
|
|
4062
3923
|
},
|
|
4063
3924
|
deleteCustomProps(appId, property, authorization) {
|
|
4064
3925
|
return __async(this, null, function* () {
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
3926
|
+
return platformDpsClientInstance.delete(`/v2/applications/${appId}/property`, __spreadValues({
|
|
3927
|
+
data: property
|
|
3928
|
+
}, getPlatformDpsClientConfig(authorization))).then(({ data }) => data).catch((error) => {
|
|
3929
|
+
throw error.withCustomMessage(
|
|
3930
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4069
3931
|
);
|
|
4070
|
-
|
|
4071
|
-
} catch (error) {
|
|
4072
|
-
if (error instanceof Error) {
|
|
4073
|
-
throw new Error(
|
|
4074
|
-
`Listing details couldn't be deleted. [${error.message}]`
|
|
4075
|
-
);
|
|
4076
|
-
}
|
|
4077
|
-
throw error;
|
|
4078
|
-
}
|
|
3932
|
+
});
|
|
4079
3933
|
});
|
|
4080
3934
|
}
|
|
4081
3935
|
};
|
|
@@ -4084,84 +3938,65 @@ var platformDpsApplicationCustomPropsApi = {
|
|
|
4084
3938
|
var platformDpsApplicationResourcesApi = {
|
|
4085
3939
|
getAppUpgrades(appId, authorization) {
|
|
4086
3940
|
return __async(this, null, function* () {
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
3941
|
+
return platformDpsClientInstance.get(
|
|
3942
|
+
`/v2/applications/${appId}/resources`,
|
|
3943
|
+
getPlatformDpsClientConfig(authorization)
|
|
3944
|
+
).catch((error) => {
|
|
3945
|
+
throw error.withCustomMessage(
|
|
3946
|
+
`App Resources couldn't be loaded. [${error.message}]`
|
|
4091
3947
|
);
|
|
4092
|
-
}
|
|
4093
|
-
if (error instanceof Error) {
|
|
4094
|
-
throw new Error(`App Resources couldn't be loaded. [${error.message}]`);
|
|
4095
|
-
}
|
|
4096
|
-
throw error;
|
|
4097
|
-
}
|
|
3948
|
+
});
|
|
4098
3949
|
});
|
|
4099
3950
|
},
|
|
4100
3951
|
createAppUpgrade(appId, body, authorization) {
|
|
4101
3952
|
return __async(this, null, function* () {
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
3953
|
+
return platformDpsClientInstance.put(
|
|
3954
|
+
`/v2/applications/${appId}/resources`,
|
|
3955
|
+
body,
|
|
3956
|
+
getPlatformDpsClientConfig(authorization)
|
|
3957
|
+
).catch((error) => {
|
|
3958
|
+
throw error.withCustomMessage(
|
|
3959
|
+
`App Resources couldn't be created. [${error.message}]`
|
|
4107
3960
|
);
|
|
4108
|
-
}
|
|
4109
|
-
if (error instanceof Error) {
|
|
4110
|
-
throw new Error(
|
|
4111
|
-
`App Resources couldn't be created. [${error.message}]`
|
|
4112
|
-
);
|
|
4113
|
-
}
|
|
4114
|
-
throw error;
|
|
4115
|
-
}
|
|
3961
|
+
});
|
|
4116
3962
|
});
|
|
4117
3963
|
},
|
|
4118
3964
|
updateAppUpgrade(appId, body, authorization) {
|
|
4119
3965
|
return __async(this, null, function* () {
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
3966
|
+
return platformDpsClientInstance.put(
|
|
3967
|
+
`/v2/applications/${appId}/resources`,
|
|
3968
|
+
body,
|
|
3969
|
+
getPlatformDpsClientConfig(authorization)
|
|
3970
|
+
).catch((error) => {
|
|
3971
|
+
throw error.withCustomMessage(
|
|
3972
|
+
`App Resources couldn't be updated. [${error.message}]`
|
|
4125
3973
|
);
|
|
4126
|
-
}
|
|
4127
|
-
if (error instanceof Error) {
|
|
4128
|
-
throw new Error(
|
|
4129
|
-
`App Resources couldn't be updated. [${error.message}]`
|
|
4130
|
-
);
|
|
4131
|
-
}
|
|
4132
|
-
throw error;
|
|
4133
|
-
}
|
|
3974
|
+
});
|
|
4134
3975
|
});
|
|
4135
3976
|
},
|
|
4136
3977
|
deleteAppUpgrade(appId, resourceId, authorization) {
|
|
4137
3978
|
return __async(this, null, function* () {
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
3979
|
+
return platformDpsClientInstance.delete(
|
|
3980
|
+
`/v2/applications/${appId}/resources/${resourceId}`,
|
|
3981
|
+
getPlatformDpsClientConfig(authorization)
|
|
3982
|
+
).catch((error) => {
|
|
3983
|
+
throw error.withCustomMessage(
|
|
3984
|
+
`App Resource couldn't be delete. [${error.message}]`
|
|
4142
3985
|
);
|
|
4143
|
-
}
|
|
4144
|
-
if (error instanceof Error) {
|
|
4145
|
-
throw new Error(`App Resource couldn't be delete. [${error.message}]`);
|
|
4146
|
-
}
|
|
4147
|
-
throw error;
|
|
4148
|
-
}
|
|
3986
|
+
});
|
|
4149
3987
|
});
|
|
4150
3988
|
},
|
|
4151
3989
|
copyUpgrade(sourceAppId, destinationAppId, authorization) {
|
|
4152
3990
|
return __async(this, null, function* () {
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
3991
|
+
return platformDpsClientInstance.put(
|
|
3992
|
+
`/v2/applications/${sourceAppId}/resources/copy?application=${destinationAppId}`,
|
|
3993
|
+
{},
|
|
3994
|
+
getPlatformDpsClientConfig(authorization)
|
|
3995
|
+
).catch((error) => {
|
|
3996
|
+
throw error.withCustomMessage(
|
|
3997
|
+
`App Resources couldn't be copied. [${error.message}]`
|
|
4158
3998
|
);
|
|
4159
|
-
}
|
|
4160
|
-
if (error instanceof Error) {
|
|
4161
|
-
throw new Error(`App Resources couldn't be copied. [${error.message}]`);
|
|
4162
|
-
}
|
|
4163
|
-
throw error;
|
|
4164
|
-
}
|
|
3999
|
+
});
|
|
4165
4000
|
});
|
|
4166
4001
|
}
|
|
4167
4002
|
};
|
|
@@ -4170,37 +4005,27 @@ var platformDpsApplicationResourcesApi = {
|
|
|
4170
4005
|
var platformDpsApplicationReviewApi = {
|
|
4171
4006
|
createSubmission(appId, payload, authorization) {
|
|
4172
4007
|
return __async(this, null, function* () {
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4008
|
+
return platformDpsClientInstance.put(
|
|
4009
|
+
`/v2/applications/${appId}/review/submit`,
|
|
4010
|
+
payload,
|
|
4011
|
+
getPlatformDpsClientConfig(authorization)
|
|
4012
|
+
).then(({ data }) => data).catch((error) => {
|
|
4013
|
+
throw error.withCustomMessage(
|
|
4014
|
+
`App couldn't be submitted for review. [${error.message}]`
|
|
4178
4015
|
);
|
|
4179
|
-
|
|
4180
|
-
} catch (error) {
|
|
4181
|
-
if (error instanceof Error) {
|
|
4182
|
-
throw new Error(
|
|
4183
|
-
`App couldn't be submitted for review. [${error.message}]`
|
|
4184
|
-
);
|
|
4185
|
-
}
|
|
4186
|
-
throw error;
|
|
4187
|
-
}
|
|
4016
|
+
});
|
|
4188
4017
|
});
|
|
4189
4018
|
},
|
|
4190
4019
|
cancelSubmission(appId, authorization) {
|
|
4191
4020
|
return __async(this, null, function* () {
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4021
|
+
return platformDpsClientInstance.put(
|
|
4022
|
+
`/v2/applications/${appId}/review/cancel`,
|
|
4023
|
+
getPlatformDpsClientConfig(authorization)
|
|
4024
|
+
).then(({ data }) => data).catch((error) => {
|
|
4025
|
+
throw error.withCustomMessage(
|
|
4026
|
+
`App review couldn't be cancelled. [${error.message}]`
|
|
4196
4027
|
);
|
|
4197
|
-
|
|
4198
|
-
} catch (error) {
|
|
4199
|
-
if (error instanceof Error) {
|
|
4200
|
-
throw new Error(`App review couldn't be cancelled. [${error.message}]`);
|
|
4201
|
-
}
|
|
4202
|
-
throw error;
|
|
4203
|
-
}
|
|
4028
|
+
});
|
|
4204
4029
|
});
|
|
4205
4030
|
}
|
|
4206
4031
|
};
|
|
@@ -4209,18 +4034,14 @@ var platformDpsApplicationReviewApi = {
|
|
|
4209
4034
|
var platformDpsApplicationStatsApi = {
|
|
4210
4035
|
getStats(appId, authorization) {
|
|
4211
4036
|
return __async(this, null, function* () {
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4037
|
+
return platformDpsClientInstance.get(
|
|
4038
|
+
`/v2/applications/${appId}/stats`,
|
|
4039
|
+
getPlatformDpsClientConfig(authorization)
|
|
4040
|
+
).catch((error) => {
|
|
4041
|
+
throw error.withCustomMessage(
|
|
4042
|
+
`App Stats couldn't be fetched. [${error.message}]`
|
|
4216
4043
|
);
|
|
4217
|
-
|
|
4218
|
-
} catch (error) {
|
|
4219
|
-
if (error instanceof Error) {
|
|
4220
|
-
throw new Error(`App Stats couldn't be fetched. [${error.message}]`);
|
|
4221
|
-
}
|
|
4222
|
-
throw error;
|
|
4223
|
-
}
|
|
4044
|
+
});
|
|
4224
4045
|
});
|
|
4225
4046
|
}
|
|
4226
4047
|
};
|
|
@@ -4229,87 +4050,61 @@ var platformDpsApplicationStatsApi = {
|
|
|
4229
4050
|
var platformDpsApplicationWebhooksApi = {
|
|
4230
4051
|
updateAppWebhooks(appId, payload, authorization) {
|
|
4231
4052
|
return __async(this, null, function* () {
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4053
|
+
yield platformDpsClientInstance.put(
|
|
4054
|
+
`/v2/applications/${appId}/webhook`,
|
|
4055
|
+
payload,
|
|
4056
|
+
getPlatformDpsClientConfig(authorization)
|
|
4057
|
+
).catch((error) => {
|
|
4058
|
+
throw error.withCustomMessage(
|
|
4059
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4237
4060
|
);
|
|
4238
|
-
}
|
|
4239
|
-
if (error instanceof Error) {
|
|
4240
|
-
throw new Error(
|
|
4241
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4242
|
-
);
|
|
4243
|
-
}
|
|
4244
|
-
throw error;
|
|
4245
|
-
}
|
|
4061
|
+
});
|
|
4246
4062
|
});
|
|
4247
4063
|
},
|
|
4248
4064
|
deleteAppWebhooks(appId, authorization) {
|
|
4249
4065
|
return __async(this, null, function* () {
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4066
|
+
yield platformDpsClientInstance.delete(
|
|
4067
|
+
`/v2/applications/${appId}/webhook`,
|
|
4068
|
+
getPlatformDpsClientConfig(authorization)
|
|
4069
|
+
).catch((error) => {
|
|
4070
|
+
throw error.withCustomMessage(
|
|
4071
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4254
4072
|
);
|
|
4255
|
-
}
|
|
4256
|
-
if (error instanceof Error) {
|
|
4257
|
-
throw new Error(
|
|
4258
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4259
|
-
);
|
|
4260
|
-
}
|
|
4261
|
-
throw error;
|
|
4262
|
-
}
|
|
4073
|
+
});
|
|
4263
4074
|
});
|
|
4264
4075
|
},
|
|
4265
4076
|
getChatWebhook(appId, authorization) {
|
|
4266
4077
|
return __async(this, null, function* () {
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4078
|
+
return platformDpsClientInstance.get(
|
|
4079
|
+
`/v2/applications/${appId}/chat-webhooks`,
|
|
4080
|
+
getPlatformDpsClientConfig(authorization)
|
|
4081
|
+
).catch((error) => {
|
|
4082
|
+
throw error.withCustomMessage(
|
|
4083
|
+
`Couldn't get the chat webhook. [${error.message}]`
|
|
4271
4084
|
);
|
|
4272
|
-
}
|
|
4273
|
-
if (error instanceof Error) {
|
|
4274
|
-
throw new Error(`Couldn't get the chat webhook. [${error.message}]`);
|
|
4275
|
-
}
|
|
4276
|
-
throw error;
|
|
4277
|
-
}
|
|
4085
|
+
});
|
|
4278
4086
|
});
|
|
4279
4087
|
},
|
|
4280
4088
|
updateChatWebhook(appId, payload, authorization) {
|
|
4281
4089
|
return __async(this, null, function* () {
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4090
|
+
yield platformDpsClientInstance.post(
|
|
4091
|
+
`/v2/applications/${appId}/chat-webhooks`,
|
|
4092
|
+
payload,
|
|
4093
|
+
getPlatformDpsClientConfig(authorization)
|
|
4094
|
+
).catch((error) => {
|
|
4095
|
+
throw error.withCustomMessage(
|
|
4096
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4287
4097
|
);
|
|
4288
|
-
}
|
|
4289
|
-
if (error instanceof Error) {
|
|
4290
|
-
throw new Error(
|
|
4291
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4292
|
-
);
|
|
4293
|
-
}
|
|
4294
|
-
throw error;
|
|
4295
|
-
}
|
|
4098
|
+
});
|
|
4296
4099
|
});
|
|
4297
4100
|
},
|
|
4298
4101
|
deleteChatWebhook(appId, authorization) {
|
|
4299
4102
|
return __async(this, null, function* () {
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
__spreadValues({}, getPlatformDpsClientConfig(authorization))
|
|
4103
|
+
yield platformDpsClientInstance.delete(`/v2/applications/${appId}/chat-webhooks`, __spreadValues({}, getPlatformDpsClientConfig(authorization))).catch((error) => {
|
|
4104
|
+
throw error.withCustomMessage(
|
|
4105
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4304
4106
|
);
|
|
4305
|
-
}
|
|
4306
|
-
if (error instanceof Error) {
|
|
4307
|
-
throw new Error(
|
|
4308
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4309
|
-
);
|
|
4310
|
-
}
|
|
4311
|
-
throw error;
|
|
4312
|
-
}
|
|
4107
|
+
});
|
|
4313
4108
|
});
|
|
4314
4109
|
}
|
|
4315
4110
|
};
|
|
@@ -4318,55 +4113,37 @@ var platformDpsApplicationWebhooksApi = {
|
|
|
4318
4113
|
var platformDpsApplicationWidgetsApi = {
|
|
4319
4114
|
createWidget(appId, widgetId, widget, authorization) {
|
|
4320
4115
|
return __async(this, null, function* () {
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4116
|
+
yield platformDpsClientInstance.put(
|
|
4117
|
+
`/v2/applications/${appId}/widgets/${widgetId}`,
|
|
4118
|
+
widget,
|
|
4119
|
+
getPlatformDpsClientConfig(authorization)
|
|
4120
|
+
).catch((error) => {
|
|
4121
|
+
throw error.withCustomMessage(
|
|
4122
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
4326
4123
|
);
|
|
4327
|
-
}
|
|
4328
|
-
if (error instanceof Error) {
|
|
4329
|
-
throw new Error(
|
|
4330
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
4331
|
-
);
|
|
4332
|
-
}
|
|
4333
|
-
throw error;
|
|
4334
|
-
}
|
|
4124
|
+
});
|
|
4335
4125
|
});
|
|
4336
4126
|
},
|
|
4337
4127
|
updateWidget(appId, widgetId, widget, authorization) {
|
|
4338
4128
|
return __async(this, null, function* () {
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4129
|
+
yield platformDpsClientInstance.patch(
|
|
4130
|
+
`/v2/applications/${appId}/widgets/${widgetId}`,
|
|
4131
|
+
widget,
|
|
4132
|
+
getPlatformDpsClientConfig(authorization)
|
|
4133
|
+
).catch((error) => {
|
|
4134
|
+
throw error.withCustomMessage(
|
|
4135
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4344
4136
|
);
|
|
4345
|
-
}
|
|
4346
|
-
if (error instanceof Error) {
|
|
4347
|
-
throw new Error(
|
|
4348
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4349
|
-
);
|
|
4350
|
-
}
|
|
4351
|
-
throw error;
|
|
4352
|
-
}
|
|
4137
|
+
});
|
|
4353
4138
|
});
|
|
4354
4139
|
},
|
|
4355
4140
|
deleteWidget(appId, widgetId, authorization) {
|
|
4356
4141
|
return __async(this, null, function* () {
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
__spreadValues({}, getPlatformDpsClientConfig(authorization))
|
|
4142
|
+
yield platformDpsClientInstance.delete(`/v2/applications/${appId}/widgets/${widgetId}`, __spreadValues({}, getPlatformDpsClientConfig(authorization))).catch((error) => {
|
|
4143
|
+
throw error.withCustomMessage(
|
|
4144
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4361
4145
|
);
|
|
4362
|
-
}
|
|
4363
|
-
if (error instanceof Error) {
|
|
4364
|
-
throw new Error(
|
|
4365
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4366
|
-
);
|
|
4367
|
-
}
|
|
4368
|
-
throw error;
|
|
4369
|
-
}
|
|
4146
|
+
});
|
|
4370
4147
|
});
|
|
4371
4148
|
}
|
|
4372
4149
|
};
|