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