@livechat/developer-studio-api 3.0.2 → 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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +449 -672
- package/dist/index.mjs +449 -672
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3246,151 +3246,6 @@ function initPlatformDpsClientInstance(baseUrl, token) {
|
|
|
3246
3246
|
}
|
|
3247
3247
|
}
|
|
3248
3248
|
|
|
3249
|
-
// src/apis/platform/dps/applications/application/authorization/api.ts
|
|
3250
|
-
var platformDpsApplicationAuthorizationApi = {
|
|
3251
|
-
createAuth(appId, payload, authorization) {
|
|
3252
|
-
return __async(this, null, function* () {
|
|
3253
|
-
try {
|
|
3254
|
-
yield platformDpsClientInstance.post(
|
|
3255
|
-
`/v2/applications/${appId}/authorization`,
|
|
3256
|
-
payload,
|
|
3257
|
-
getPlatformDpsClientConfig(authorization)
|
|
3258
|
-
);
|
|
3259
|
-
} catch (error) {
|
|
3260
|
-
if (error instanceof Error) {
|
|
3261
|
-
throw new Error(
|
|
3262
|
-
`Authorization couldn't be created. [${error.message}]`
|
|
3263
|
-
);
|
|
3264
|
-
}
|
|
3265
|
-
throw error;
|
|
3266
|
-
}
|
|
3267
|
-
});
|
|
3268
|
-
},
|
|
3269
|
-
deleteAuth(appId, authorization) {
|
|
3270
|
-
return __async(this, null, function* () {
|
|
3271
|
-
try {
|
|
3272
|
-
yield platformDpsClientInstance.delete(
|
|
3273
|
-
`/v2/applications/${appId}/authorization`,
|
|
3274
|
-
getPlatformDpsClientConfig(authorization)
|
|
3275
|
-
);
|
|
3276
|
-
} catch (error) {
|
|
3277
|
-
if (error instanceof Error) {
|
|
3278
|
-
throw new Error(
|
|
3279
|
-
`Authorization couldn't be created. [${error.message}]`
|
|
3280
|
-
);
|
|
3281
|
-
}
|
|
3282
|
-
throw error;
|
|
3283
|
-
}
|
|
3284
|
-
});
|
|
3285
|
-
}
|
|
3286
|
-
};
|
|
3287
|
-
|
|
3288
|
-
// src/apis/platform/dps/applications/application/autoReview/_contracts/dtos/autoReview.ts
|
|
3289
|
-
var getEmptyAppAutoReview = () => ({
|
|
3290
|
-
isReviewed: false,
|
|
3291
|
-
recommendations: {
|
|
3292
|
-
listingDetails: {
|
|
3293
|
-
appName: "",
|
|
3294
|
-
shortDescription: "",
|
|
3295
|
-
longDescription: "",
|
|
3296
|
-
features: "",
|
|
3297
|
-
benefits: ""
|
|
3298
|
-
},
|
|
3299
|
-
auth: {
|
|
3300
|
-
hasZeroScopes: false
|
|
3301
|
-
}
|
|
3302
|
-
},
|
|
3303
|
-
errors: {
|
|
3304
|
-
listingDetails: {
|
|
3305
|
-
appName: "",
|
|
3306
|
-
shortDescription: "",
|
|
3307
|
-
longDescription: "",
|
|
3308
|
-
features: "",
|
|
3309
|
-
benefits: ""
|
|
3310
|
-
},
|
|
3311
|
-
auth: {
|
|
3312
|
-
hasAllScopes: false,
|
|
3313
|
-
isRedirectUriSafe: false
|
|
3314
|
-
},
|
|
3315
|
-
links: {
|
|
3316
|
-
tutorial: {
|
|
3317
|
-
returns200: false,
|
|
3318
|
-
isValid: false
|
|
3319
|
-
},
|
|
3320
|
-
privacyPolicy: {
|
|
3321
|
-
returns200: false,
|
|
3322
|
-
isValid: false
|
|
3323
|
-
}
|
|
3324
|
-
},
|
|
3325
|
-
images: {
|
|
3326
|
-
icon: {
|
|
3327
|
-
isNsfw: false,
|
|
3328
|
-
isRatioValid: false
|
|
3329
|
-
},
|
|
3330
|
-
screenshots: {
|
|
3331
|
-
areNsfw: false,
|
|
3332
|
-
areRatiosValid: false
|
|
3333
|
-
}
|
|
3334
|
-
}
|
|
3335
|
-
}
|
|
3336
|
-
});
|
|
3337
|
-
|
|
3338
|
-
// src/apis/platform/dps/applications/application/autoReview/_contracts/payloads/autoReview.ts
|
|
3339
|
-
var getAppAutoReviewPayload = (value) => {
|
|
3340
|
-
return {
|
|
3341
|
-
appName: value,
|
|
3342
|
-
shortDescription: value,
|
|
3343
|
-
longDescription: value,
|
|
3344
|
-
features: value,
|
|
3345
|
-
benefits: value,
|
|
3346
|
-
scopes: value,
|
|
3347
|
-
redirect: value,
|
|
3348
|
-
tutorial: value,
|
|
3349
|
-
privacyPolicy: value,
|
|
3350
|
-
icons: value,
|
|
3351
|
-
screenshots: value
|
|
3352
|
-
};
|
|
3353
|
-
};
|
|
3354
|
-
|
|
3355
|
-
// src/apis/platform/dps/applications/application/autoReview/api.ts
|
|
3356
|
-
var platformDpsApplicationAutoReviewApi = {
|
|
3357
|
-
getAutoReview(appId, authorization) {
|
|
3358
|
-
return __async(this, null, function* () {
|
|
3359
|
-
try {
|
|
3360
|
-
const response = yield platformDpsClientInstance.get(
|
|
3361
|
-
`/v2/applications/${appId}/auto-review`,
|
|
3362
|
-
getPlatformDpsClientConfig(authorization)
|
|
3363
|
-
);
|
|
3364
|
-
if (response.status === 204) {
|
|
3365
|
-
return getEmptyAppAutoReview();
|
|
3366
|
-
}
|
|
3367
|
-
return response.data;
|
|
3368
|
-
} catch (error) {
|
|
3369
|
-
if (error instanceof Error) {
|
|
3370
|
-
throw new Error(`The review couldn\u2019t be completed. [${error.message}]`);
|
|
3371
|
-
}
|
|
3372
|
-
throw error;
|
|
3373
|
-
}
|
|
3374
|
-
});
|
|
3375
|
-
},
|
|
3376
|
-
submitAutoReview(appId, payload, authorization) {
|
|
3377
|
-
return __async(this, null, function* () {
|
|
3378
|
-
try {
|
|
3379
|
-
yield platformDpsClientInstance.post(
|
|
3380
|
-
`/v2/applications/${appId}/auto-review`,
|
|
3381
|
-
payload,
|
|
3382
|
-
getPlatformDpsClientConfig(authorization)
|
|
3383
|
-
);
|
|
3384
|
-
} catch (error) {
|
|
3385
|
-
if (error instanceof Error) {
|
|
3386
|
-
throw new Error(`The review couldn\u2019t be requested. [${error.message}]`);
|
|
3387
|
-
}
|
|
3388
|
-
throw error;
|
|
3389
|
-
}
|
|
3390
|
-
});
|
|
3391
|
-
}
|
|
3392
|
-
};
|
|
3393
|
-
|
|
3394
3249
|
// src/constants/app/templates/repository.ts
|
|
3395
3250
|
var appRepositoryTemplatesMap = {
|
|
3396
3251
|
"livechat/developer-app-template-nextjs": "nextjs",
|
|
@@ -3594,59 +3449,176 @@ var appTemplates = {
|
|
|
3594
3449
|
};
|
|
3595
3450
|
var allAppTemplates = __spreadValues(__spreadValues(__spreadValues({}, appRepositoryTemplates), appBaseTemplates), appTemplates);
|
|
3596
3451
|
|
|
3597
|
-
// src/apis/platform/dps/applications/application/
|
|
3598
|
-
var
|
|
3599
|
-
|
|
3452
|
+
// src/apis/platform/dps/applications/application/authorization/api.ts
|
|
3453
|
+
var platformDpsApplicationAuthorizationApi = {
|
|
3454
|
+
createAuth(appId, payload, authorization) {
|
|
3600
3455
|
return __async(this, null, function* () {
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3456
|
+
yield platformDpsClientInstance.post(
|
|
3457
|
+
`/v2/applications/${appId}/authorization`,
|
|
3458
|
+
payload,
|
|
3459
|
+
getPlatformDpsClientConfig(authorization)
|
|
3460
|
+
).catch((error) => {
|
|
3461
|
+
throw error.withCustomMessage(
|
|
3462
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
3606
3463
|
);
|
|
3607
|
-
}
|
|
3608
|
-
if (error instanceof Error) {
|
|
3609
|
-
throw new Error(
|
|
3610
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
3611
|
-
);
|
|
3612
|
-
}
|
|
3613
|
-
throw error;
|
|
3614
|
-
}
|
|
3464
|
+
});
|
|
3615
3465
|
});
|
|
3616
3466
|
},
|
|
3617
|
-
|
|
3467
|
+
deleteAuth(appId, authorization) {
|
|
3468
|
+
return __async(this, null, function* () {
|
|
3469
|
+
yield platformDpsClientInstance.delete(
|
|
3470
|
+
`/v2/applications/${appId}/authorization`,
|
|
3471
|
+
getPlatformDpsClientConfig(authorization)
|
|
3472
|
+
).catch((error) => {
|
|
3473
|
+
throw error.withCustomMessage(
|
|
3474
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
3475
|
+
);
|
|
3476
|
+
});
|
|
3477
|
+
});
|
|
3478
|
+
}
|
|
3479
|
+
};
|
|
3480
|
+
|
|
3481
|
+
// src/apis/platform/dps/applications/application/autoReview/_contracts/dtos/autoReview.ts
|
|
3482
|
+
var getEmptyAppAutoReview = () => ({
|
|
3483
|
+
isReviewed: false,
|
|
3484
|
+
recommendations: {
|
|
3485
|
+
listingDetails: {
|
|
3486
|
+
appName: "",
|
|
3487
|
+
shortDescription: "",
|
|
3488
|
+
longDescription: "",
|
|
3489
|
+
features: "",
|
|
3490
|
+
benefits: ""
|
|
3491
|
+
},
|
|
3492
|
+
auth: {
|
|
3493
|
+
hasZeroScopes: false
|
|
3494
|
+
}
|
|
3495
|
+
},
|
|
3496
|
+
errors: {
|
|
3497
|
+
listingDetails: {
|
|
3498
|
+
appName: "",
|
|
3499
|
+
shortDescription: "",
|
|
3500
|
+
longDescription: "",
|
|
3501
|
+
features: "",
|
|
3502
|
+
benefits: ""
|
|
3503
|
+
},
|
|
3504
|
+
auth: {
|
|
3505
|
+
hasAllScopes: false,
|
|
3506
|
+
isRedirectUriSafe: false
|
|
3507
|
+
},
|
|
3508
|
+
links: {
|
|
3509
|
+
tutorial: {
|
|
3510
|
+
returns200: false,
|
|
3511
|
+
isValid: false
|
|
3512
|
+
},
|
|
3513
|
+
privacyPolicy: {
|
|
3514
|
+
returns200: false,
|
|
3515
|
+
isValid: false
|
|
3516
|
+
}
|
|
3517
|
+
},
|
|
3518
|
+
images: {
|
|
3519
|
+
icon: {
|
|
3520
|
+
isNsfw: false,
|
|
3521
|
+
isRatioValid: false
|
|
3522
|
+
},
|
|
3523
|
+
screenshots: {
|
|
3524
|
+
areNsfw: false,
|
|
3525
|
+
areRatiosValid: false
|
|
3526
|
+
}
|
|
3527
|
+
}
|
|
3528
|
+
}
|
|
3529
|
+
});
|
|
3530
|
+
|
|
3531
|
+
// src/apis/platform/dps/applications/application/autoReview/_contracts/payloads/autoReview.ts
|
|
3532
|
+
var getAppAutoReviewPayload = (value) => {
|
|
3533
|
+
return {
|
|
3534
|
+
appName: value,
|
|
3535
|
+
shortDescription: value,
|
|
3536
|
+
longDescription: value,
|
|
3537
|
+
features: value,
|
|
3538
|
+
benefits: value,
|
|
3539
|
+
scopes: value,
|
|
3540
|
+
redirect: value,
|
|
3541
|
+
tutorial: value,
|
|
3542
|
+
privacyPolicy: value,
|
|
3543
|
+
icons: value,
|
|
3544
|
+
screenshots: value
|
|
3545
|
+
};
|
|
3546
|
+
};
|
|
3547
|
+
|
|
3548
|
+
// src/apis/platform/dps/applications/application/autoReview/api.ts
|
|
3549
|
+
var platformDpsApplicationAutoReviewApi = {
|
|
3550
|
+
getAutoReview(appId, authorization) {
|
|
3618
3551
|
return __async(this, null, function* () {
|
|
3619
3552
|
try {
|
|
3620
|
-
yield platformDpsClientInstance.
|
|
3621
|
-
`/v2/applications/${appId}/
|
|
3622
|
-
payload,
|
|
3553
|
+
const response = yield platformDpsClientInstance.get(
|
|
3554
|
+
`/v2/applications/${appId}/auto-review`,
|
|
3623
3555
|
getPlatformDpsClientConfig(authorization)
|
|
3624
3556
|
);
|
|
3557
|
+
if (response.status === 204) {
|
|
3558
|
+
return getEmptyAppAutoReview();
|
|
3559
|
+
}
|
|
3560
|
+
return response.data;
|
|
3625
3561
|
} catch (error) {
|
|
3626
3562
|
if (error instanceof Error) {
|
|
3627
|
-
throw new Error(
|
|
3628
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
3629
|
-
);
|
|
3563
|
+
throw new Error(`The review couldn\u2019t be completed. [${error.message}]`);
|
|
3630
3564
|
}
|
|
3631
3565
|
throw error;
|
|
3632
3566
|
}
|
|
3633
3567
|
});
|
|
3634
3568
|
},
|
|
3635
|
-
|
|
3569
|
+
submitAutoReview(appId, payload, authorization) {
|
|
3636
3570
|
return __async(this, null, function* () {
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3571
|
+
yield platformDpsClientInstance.post(
|
|
3572
|
+
`/v2/applications/${appId}/auto-review`,
|
|
3573
|
+
payload,
|
|
3574
|
+
getPlatformDpsClientConfig(authorization)
|
|
3575
|
+
).catch((error) => {
|
|
3576
|
+
throw error.withCustomMessage(
|
|
3577
|
+
`The review couldn\u2019t be requested. [${error.message}]`
|
|
3641
3578
|
);
|
|
3642
|
-
}
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3579
|
+
});
|
|
3580
|
+
});
|
|
3581
|
+
}
|
|
3582
|
+
};
|
|
3583
|
+
|
|
3584
|
+
// src/apis/platform/dps/applications/application/chatActions/api.ts
|
|
3585
|
+
var platformDpsApplicationChatActionsApi = {
|
|
3586
|
+
createChatAction(appId, payload, authorization) {
|
|
3587
|
+
return __async(this, null, function* () {
|
|
3588
|
+
yield platformDpsClientInstance.put(
|
|
3589
|
+
`/v2/applications/${appId}/chat-actions/${payload.id}`,
|
|
3590
|
+
payload,
|
|
3591
|
+
getPlatformDpsClientConfig(authorization)
|
|
3592
|
+
).catch((error) => {
|
|
3593
|
+
throw error.withCustomMessage(
|
|
3594
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
3595
|
+
);
|
|
3596
|
+
});
|
|
3597
|
+
});
|
|
3598
|
+
},
|
|
3599
|
+
updateChatAction(appId, payload, authorization) {
|
|
3600
|
+
return __async(this, null, function* () {
|
|
3601
|
+
yield platformDpsClientInstance.patch(
|
|
3602
|
+
`/v2/applications/${appId}/chat-actions/${payload.id}`,
|
|
3603
|
+
payload,
|
|
3604
|
+
getPlatformDpsClientConfig(authorization)
|
|
3605
|
+
).catch((error) => {
|
|
3606
|
+
throw error.withCustomMessage(
|
|
3607
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
3608
|
+
);
|
|
3609
|
+
});
|
|
3610
|
+
});
|
|
3611
|
+
},
|
|
3612
|
+
deleteChatAction(appId, chatActionId, authorization) {
|
|
3613
|
+
return __async(this, null, function* () {
|
|
3614
|
+
yield platformDpsClientInstance.delete(
|
|
3615
|
+
`/v2/applications/${appId}/chat-actions/${chatActionId}`,
|
|
3616
|
+
__spreadValues({}, getPlatformDpsClientConfig(authorization))
|
|
3617
|
+
).catch((error) => {
|
|
3618
|
+
throw error.withCustomMessage(
|
|
3619
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
3620
|
+
);
|
|
3621
|
+
});
|
|
3650
3622
|
});
|
|
3651
3623
|
}
|
|
3652
3624
|
};
|
|
@@ -3654,48 +3626,39 @@ var platformDpsApplicationChatActionsApi = {
|
|
|
3654
3626
|
// src/apis/platform/dps/applications/application/chatBoosters/api.ts
|
|
3655
3627
|
var platformDpsApplicationChatBoostersApi = {
|
|
3656
3628
|
createChatBooster(appId, chatBoosterId, payload, authorization) {
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3629
|
+
return platformDpsClientInstance.put(
|
|
3630
|
+
`/v2/applications/${appId}/chat-boosters/${chatBoosterId}`,
|
|
3631
|
+
payload,
|
|
3632
|
+
getPlatformDpsClientConfig(authorization)
|
|
3633
|
+
).catch((error) => {
|
|
3634
|
+
throw error.withCustomMessage(
|
|
3635
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
3662
3636
|
);
|
|
3663
|
-
}
|
|
3664
|
-
if (error instanceof Error) {
|
|
3665
|
-
throw new Error(`Chat Booster couldn't be created. [${error.message}]`);
|
|
3666
|
-
}
|
|
3667
|
-
throw error;
|
|
3668
|
-
}
|
|
3637
|
+
});
|
|
3669
3638
|
},
|
|
3670
3639
|
updateChatBooster(appId, chatBoosterId, payload, authorization) {
|
|
3671
3640
|
return __async(this, null, function* () {
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3641
|
+
return platformDpsClientInstance.put(
|
|
3642
|
+
`/v2/applications/${appId}/chat-boosters/${chatBoosterId}`,
|
|
3643
|
+
payload,
|
|
3644
|
+
getPlatformDpsClientConfig(authorization)
|
|
3645
|
+
).catch((error) => {
|
|
3646
|
+
throw error.withCustomMessage(
|
|
3647
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
3677
3648
|
);
|
|
3678
|
-
}
|
|
3679
|
-
if (error instanceof Error) {
|
|
3680
|
-
throw new Error(`Chat Booster couldn't be updated. [${error.message}]`);
|
|
3681
|
-
}
|
|
3682
|
-
throw error;
|
|
3683
|
-
}
|
|
3649
|
+
});
|
|
3684
3650
|
});
|
|
3685
3651
|
},
|
|
3686
3652
|
deleteChatBooster(appId, chatBoosterId, authorization) {
|
|
3687
3653
|
return __async(this, null, function* () {
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3654
|
+
return platformDpsClientInstance.delete(
|
|
3655
|
+
`/v2/applications/${appId}/chat-boosters/${chatBoosterId}`,
|
|
3656
|
+
getPlatformDpsClientConfig(authorization)
|
|
3657
|
+
).catch((error) => {
|
|
3658
|
+
throw error.withCustomMessage(
|
|
3659
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
3692
3660
|
);
|
|
3693
|
-
}
|
|
3694
|
-
if (error instanceof Error) {
|
|
3695
|
-
throw new Error(`Chat Booster couldn't be deleted. [${error.message}]`);
|
|
3696
|
-
}
|
|
3697
|
-
throw error;
|
|
3698
|
-
}
|
|
3661
|
+
});
|
|
3699
3662
|
});
|
|
3700
3663
|
}
|
|
3701
3664
|
};
|
|
@@ -3704,165 +3667,119 @@ var platformDpsApplicationChatBoostersApi = {
|
|
|
3704
3667
|
var platformDpsApplicationDisplayApi = {
|
|
3705
3668
|
updateVersionHistory(appId, payload, authorization) {
|
|
3706
3669
|
return __async(this, null, function* () {
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3670
|
+
yield platformDpsClientInstance.put(
|
|
3671
|
+
`/v2/applications/${appId}/display/changelog`,
|
|
3672
|
+
payload,
|
|
3673
|
+
getPlatformDpsClientConfig(authorization)
|
|
3674
|
+
).catch((error) => {
|
|
3675
|
+
throw error.withCustomMessage(
|
|
3676
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3712
3677
|
);
|
|
3713
|
-
|
|
3714
|
-
} catch (error) {
|
|
3715
|
-
if (error instanceof Error) {
|
|
3716
|
-
throw new Error(
|
|
3717
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3718
|
-
);
|
|
3719
|
-
}
|
|
3720
|
-
throw error;
|
|
3721
|
-
}
|
|
3678
|
+
});
|
|
3722
3679
|
});
|
|
3723
3680
|
},
|
|
3724
3681
|
updateBasicDetails(appId, basicDetails, authorization) {
|
|
3725
3682
|
return __async(this, null, function* () {
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3683
|
+
yield platformDpsClientInstance.put(
|
|
3684
|
+
`/v2/applications/${appId}/display`,
|
|
3685
|
+
basicDetails,
|
|
3686
|
+
getPlatformDpsClientConfig(authorization)
|
|
3687
|
+
).catch((error) => {
|
|
3688
|
+
throw error.withCustomMessage(
|
|
3689
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3731
3690
|
);
|
|
3732
|
-
}
|
|
3733
|
-
if (error instanceof Error) {
|
|
3734
|
-
throw new Error(
|
|
3735
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3736
|
-
);
|
|
3737
|
-
}
|
|
3738
|
-
throw error;
|
|
3739
|
-
}
|
|
3691
|
+
});
|
|
3740
3692
|
});
|
|
3741
3693
|
},
|
|
3742
3694
|
patchBasicDetails(appId, basicDetails, authorization) {
|
|
3743
3695
|
return __async(this, null, function* () {
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3696
|
+
yield platformDpsClientInstance.patch(
|
|
3697
|
+
`/v2/applications/${appId}/display`,
|
|
3698
|
+
basicDetails,
|
|
3699
|
+
getPlatformDpsClientConfig(authorization)
|
|
3700
|
+
).catch((error) => {
|
|
3701
|
+
throw error.withCustomMessage(
|
|
3702
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3749
3703
|
);
|
|
3750
|
-
}
|
|
3751
|
-
if (error instanceof Error) {
|
|
3752
|
-
throw new Error(
|
|
3753
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3754
|
-
);
|
|
3755
|
-
}
|
|
3756
|
-
throw error;
|
|
3757
|
-
}
|
|
3704
|
+
});
|
|
3758
3705
|
});
|
|
3759
3706
|
},
|
|
3760
3707
|
updateOverview(appId, data, authorization) {
|
|
3761
3708
|
return __async(this, null, function* () {
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3709
|
+
yield platformDpsClientInstance.put(
|
|
3710
|
+
`/v2/applications/${appId}/listing/overview`,
|
|
3711
|
+
data,
|
|
3712
|
+
getPlatformDpsClientConfig(authorization)
|
|
3713
|
+
).catch((error) => {
|
|
3714
|
+
throw error.withCustomMessage(
|
|
3715
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3767
3716
|
);
|
|
3768
|
-
}
|
|
3769
|
-
if (error instanceof Error) {
|
|
3770
|
-
throw new Error(
|
|
3771
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3772
|
-
);
|
|
3773
|
-
}
|
|
3774
|
-
throw error;
|
|
3775
|
-
}
|
|
3717
|
+
});
|
|
3776
3718
|
});
|
|
3777
3719
|
},
|
|
3778
3720
|
updateTutorialAndSupport(appId, data, authorization) {
|
|
3779
3721
|
return __async(this, null, function* () {
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3722
|
+
yield platformDpsClientInstance.put(
|
|
3723
|
+
`/v2/applications/${appId}/listing/support`,
|
|
3724
|
+
data,
|
|
3725
|
+
getPlatformDpsClientConfig(authorization)
|
|
3726
|
+
).catch((error) => {
|
|
3727
|
+
throw error.withCustomMessage(
|
|
3728
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3785
3729
|
);
|
|
3786
|
-
}
|
|
3787
|
-
if (error instanceof Error) {
|
|
3788
|
-
throw new Error(
|
|
3789
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3790
|
-
);
|
|
3791
|
-
}
|
|
3792
|
-
throw error;
|
|
3793
|
-
}
|
|
3730
|
+
});
|
|
3794
3731
|
});
|
|
3795
3732
|
},
|
|
3796
3733
|
updateAppIcon(appId, payload, authorization) {
|
|
3797
3734
|
return __async(this, null, function* () {
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3735
|
+
yield platformDpsClientInstance.put(
|
|
3736
|
+
`/v2/applications/${appId}/display/icons`,
|
|
3737
|
+
payload,
|
|
3738
|
+
getPlatformDpsClientConfig(authorization)
|
|
3739
|
+
).catch((error) => {
|
|
3740
|
+
throw error.withCustomMessage(
|
|
3741
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3803
3742
|
);
|
|
3804
|
-
}
|
|
3805
|
-
if (error instanceof Error) {
|
|
3806
|
-
throw new Error(
|
|
3807
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3808
|
-
);
|
|
3809
|
-
}
|
|
3810
|
-
throw error;
|
|
3811
|
-
}
|
|
3743
|
+
});
|
|
3812
3744
|
});
|
|
3813
3745
|
},
|
|
3814
3746
|
updateDisplayImages(appId, screenshots, authorization) {
|
|
3815
3747
|
return __async(this, null, function* () {
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3748
|
+
yield platformDpsClientInstance.put(
|
|
3749
|
+
`/v2/applications/${appId}/screenshots/commit`,
|
|
3750
|
+
screenshots,
|
|
3751
|
+
getPlatformDpsClientConfig(authorization)
|
|
3752
|
+
).catch((error) => {
|
|
3753
|
+
throw error.withCustomMessage(
|
|
3754
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3821
3755
|
);
|
|
3822
|
-
}
|
|
3823
|
-
if (error instanceof Error) {
|
|
3824
|
-
throw new Error(
|
|
3825
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3826
|
-
);
|
|
3827
|
-
}
|
|
3828
|
-
throw error;
|
|
3829
|
-
}
|
|
3756
|
+
});
|
|
3830
3757
|
});
|
|
3831
3758
|
},
|
|
3832
3759
|
updateDisplayFeatures(appId, features, authorization) {
|
|
3833
3760
|
return __async(this, null, function* () {
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3761
|
+
yield platformDpsClientInstance.put(
|
|
3762
|
+
`/v2/applications/${appId}/features`,
|
|
3763
|
+
features,
|
|
3764
|
+
getPlatformDpsClientConfig(authorization)
|
|
3765
|
+
).catch((error) => {
|
|
3766
|
+
throw error.withCustomMessage(
|
|
3767
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3839
3768
|
);
|
|
3840
|
-
}
|
|
3841
|
-
if (error instanceof Error) {
|
|
3842
|
-
throw new Error(
|
|
3843
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3844
|
-
);
|
|
3845
|
-
}
|
|
3846
|
-
throw error;
|
|
3847
|
-
}
|
|
3769
|
+
});
|
|
3848
3770
|
});
|
|
3849
3771
|
},
|
|
3850
3772
|
updateDisplayBenefits(appId, benefits, authorization) {
|
|
3851
3773
|
return __async(this, null, function* () {
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3774
|
+
yield platformDpsClientInstance.put(
|
|
3775
|
+
`/v2/applications/${appId}/benefits`,
|
|
3776
|
+
benefits,
|
|
3777
|
+
getPlatformDpsClientConfig(authorization)
|
|
3778
|
+
).catch((error) => {
|
|
3779
|
+
throw error.withCustomMessage(
|
|
3780
|
+
`Listing details couldn't be updated. [${error.message}]`
|
|
3857
3781
|
);
|
|
3858
|
-
}
|
|
3859
|
-
if (error instanceof Error) {
|
|
3860
|
-
throw new Error(
|
|
3861
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
3862
|
-
);
|
|
3863
|
-
}
|
|
3864
|
-
throw error;
|
|
3865
|
-
}
|
|
3782
|
+
});
|
|
3866
3783
|
});
|
|
3867
3784
|
}
|
|
3868
3785
|
};
|
|
@@ -3871,18 +3788,14 @@ var platformDpsApplicationDisplayApi = {
|
|
|
3871
3788
|
var platformDpsApplicationEventApi = {
|
|
3872
3789
|
getEvents(appId, authorization) {
|
|
3873
3790
|
return __async(this, null, function* () {
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3791
|
+
return platformDpsClientInstance.get(
|
|
3792
|
+
`/v2/applications/${appId}/events?limit=300`,
|
|
3793
|
+
getPlatformDpsClientConfig(authorization)
|
|
3794
|
+
).then(({ data }) => data).catch((error) => {
|
|
3795
|
+
throw error.withCustomMessage(
|
|
3796
|
+
`App Events couldn't be fetched. [${error.message}]`
|
|
3878
3797
|
);
|
|
3879
|
-
|
|
3880
|
-
} catch (error) {
|
|
3881
|
-
if (error instanceof Error) {
|
|
3882
|
-
throw new Error(`App Events couldn't be fetched. [${error.message}]`);
|
|
3883
|
-
}
|
|
3884
|
-
throw error;
|
|
3885
|
-
}
|
|
3798
|
+
});
|
|
3886
3799
|
});
|
|
3887
3800
|
}
|
|
3888
3801
|
};
|
|
@@ -3938,7 +3851,6 @@ var platformDpsApplicationInfrastructureBlocksApi = {
|
|
|
3938
3851
|
{
|
|
3939
3852
|
appId,
|
|
3940
3853
|
deployment: {
|
|
3941
|
-
mode: payload.mode,
|
|
3942
3854
|
provider: payload.provider,
|
|
3943
3855
|
config
|
|
3944
3856
|
}
|
|
@@ -3972,51 +3884,40 @@ var platformDpsApplicationInfrastructureApi = {
|
|
|
3972
3884
|
var platformDpsApplicationInstallApi = {
|
|
3973
3885
|
install(appId, authorization) {
|
|
3974
3886
|
return __async(this, null, function* () {
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3887
|
+
yield platformDpsClientInstance.put(
|
|
3888
|
+
`/v2/applications/${appId}/install`,
|
|
3889
|
+
{},
|
|
3890
|
+
getPlatformDpsClientConfig(authorization)
|
|
3891
|
+
).catch((error) => {
|
|
3892
|
+
throw error.withCustomMessage(
|
|
3893
|
+
`App couldn't be installed. [${error.message}]`
|
|
3980
3894
|
);
|
|
3981
|
-
}
|
|
3982
|
-
if (error instanceof Error) {
|
|
3983
|
-
throw new Error(`App couldn't be installed. [${error.message}]`);
|
|
3984
|
-
}
|
|
3985
|
-
throw error;
|
|
3986
|
-
}
|
|
3895
|
+
});
|
|
3987
3896
|
});
|
|
3988
3897
|
},
|
|
3989
3898
|
uninstall(appId, authorization) {
|
|
3990
3899
|
return __async(this, null, function* () {
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3900
|
+
yield platformDpsClientInstance.delete(
|
|
3901
|
+
`/v2/applications/${appId}/install`,
|
|
3902
|
+
getPlatformDpsClientConfig(authorization)
|
|
3903
|
+
).catch((error) => {
|
|
3904
|
+
throw error.withCustomMessage(
|
|
3905
|
+
`App couldn't be uninstalled. [${error.message}]`
|
|
3995
3906
|
);
|
|
3996
|
-
}
|
|
3997
|
-
if (error instanceof Error) {
|
|
3998
|
-
throw new Error(`App couldn't be uninstalled. [${error.message}]`);
|
|
3999
|
-
}
|
|
4000
|
-
throw error;
|
|
4001
|
-
}
|
|
3907
|
+
});
|
|
4002
3908
|
});
|
|
4003
3909
|
},
|
|
4004
3910
|
updateDirectInstallationUrl(appId, payload, authorization) {
|
|
4005
3911
|
return __async(this, null, function* () {
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
3912
|
+
yield platformDpsClientInstance.put(
|
|
3913
|
+
`/v2/applications/${appId}/install/direct`,
|
|
3914
|
+
payload,
|
|
3915
|
+
getPlatformDpsClientConfig(authorization)
|
|
3916
|
+
).catch((error) => {
|
|
3917
|
+
throw error.withCustomMessage(
|
|
3918
|
+
`Direct installation URL couldn't be updated. [${error.message}]`
|
|
4011
3919
|
);
|
|
4012
|
-
}
|
|
4013
|
-
if (error instanceof Error) {
|
|
4014
|
-
throw new Error(
|
|
4015
|
-
`Direct installation URL couldn't be updated. [${error.message}]`
|
|
4016
|
-
);
|
|
4017
|
-
}
|
|
4018
|
-
throw error;
|
|
4019
|
-
}
|
|
3920
|
+
});
|
|
4020
3921
|
});
|
|
4021
3922
|
}
|
|
4022
3923
|
};
|
|
@@ -4025,37 +3926,24 @@ var platformDpsApplicationInstallApi = {
|
|
|
4025
3926
|
var platformDpsApplicationOnboardingApi = {
|
|
4026
3927
|
updateOnboarding(appId, payload, authorization) {
|
|
4027
3928
|
return __async(this, null, function* () {
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
3929
|
+
yield platformDpsClientInstance.put(
|
|
3930
|
+
`/v2/applications/${appId}/onboarding`,
|
|
3931
|
+
payload,
|
|
3932
|
+
getPlatformDpsClientConfig(authorization)
|
|
3933
|
+
).catch((error) => {
|
|
3934
|
+
throw error.withCustomMessage(
|
|
3935
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4033
3936
|
);
|
|
4034
|
-
}
|
|
4035
|
-
if (error instanceof Error) {
|
|
4036
|
-
throw new Error(
|
|
4037
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4038
|
-
);
|
|
4039
|
-
}
|
|
4040
|
-
throw error;
|
|
4041
|
-
}
|
|
3937
|
+
});
|
|
4042
3938
|
});
|
|
4043
3939
|
},
|
|
4044
3940
|
deleteOnboarding(appId, authorization) {
|
|
4045
3941
|
return __async(this, null, function* () {
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
__spreadValues({}, getPlatformDpsClientConfig(authorization))
|
|
3942
|
+
yield platformDpsClientInstance.delete(`/v2/applications/${appId}/onboarding`, __spreadValues({}, getPlatformDpsClientConfig(authorization))).catch((error) => {
|
|
3943
|
+
throw error.withCustomMessage(
|
|
3944
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4050
3945
|
);
|
|
4051
|
-
}
|
|
4052
|
-
if (error instanceof Error) {
|
|
4053
|
-
throw new Error(
|
|
4054
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4055
|
-
);
|
|
4056
|
-
}
|
|
4057
|
-
throw error;
|
|
4058
|
-
}
|
|
3946
|
+
});
|
|
4059
3947
|
});
|
|
4060
3948
|
}
|
|
4061
3949
|
};
|
|
@@ -4064,37 +3952,27 @@ var platformDpsApplicationOnboardingApi = {
|
|
|
4064
3952
|
var platformDpsApplicationPaymentApi = {
|
|
4065
3953
|
updatePaymentBlock(appId, payment, authorization) {
|
|
4066
3954
|
return __async(this, null, function* () {
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
3955
|
+
yield platformDpsClientInstance.put(
|
|
3956
|
+
`/v2/applications/${appId}/payment`,
|
|
3957
|
+
payment,
|
|
3958
|
+
getPlatformDpsClientConfig(authorization)
|
|
3959
|
+
).catch((error) => {
|
|
3960
|
+
throw error.withCustomMessage(
|
|
3961
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4072
3962
|
);
|
|
4073
|
-
}
|
|
4074
|
-
if (error instanceof Error) {
|
|
4075
|
-
throw new Error(
|
|
4076
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4077
|
-
);
|
|
4078
|
-
}
|
|
4079
|
-
throw error;
|
|
4080
|
-
}
|
|
3963
|
+
});
|
|
4081
3964
|
});
|
|
4082
3965
|
},
|
|
4083
3966
|
deletePaymentBlock(appId, authorization) {
|
|
4084
3967
|
return __async(this, null, function* () {
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
3968
|
+
yield platformDpsClientInstance.delete(
|
|
3969
|
+
`/v2/applications/${appId}/payment`,
|
|
3970
|
+
getPlatformDpsClientConfig(authorization)
|
|
3971
|
+
).catch((error) => {
|
|
3972
|
+
throw error.withCustomMessage(
|
|
3973
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4089
3974
|
);
|
|
4090
|
-
}
|
|
4091
|
-
if (error instanceof Error) {
|
|
4092
|
-
throw new Error(
|
|
4093
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4094
|
-
);
|
|
4095
|
-
}
|
|
4096
|
-
throw error;
|
|
4097
|
-
}
|
|
3975
|
+
});
|
|
4098
3976
|
});
|
|
4099
3977
|
}
|
|
4100
3978
|
};
|
|
@@ -4103,20 +3981,15 @@ var platformDpsApplicationPaymentApi = {
|
|
|
4103
3981
|
var platformDpsApplicationProductApi = {
|
|
4104
3982
|
updateProduct(appId, payload, authorization) {
|
|
4105
3983
|
return __async(this, null, function* () {
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
3984
|
+
yield platformDpsClientInstance.put(
|
|
3985
|
+
`/v2/applications/${appId}/product`,
|
|
3986
|
+
payload,
|
|
3987
|
+
getPlatformDpsClientConfig(authorization)
|
|
3988
|
+
).catch((error) => {
|
|
3989
|
+
throw error.withCustomMessage(
|
|
3990
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4111
3991
|
);
|
|
4112
|
-
}
|
|
4113
|
-
if (error instanceof Error) {
|
|
4114
|
-
throw new Error(
|
|
4115
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4116
|
-
);
|
|
4117
|
-
}
|
|
4118
|
-
throw error;
|
|
4119
|
-
}
|
|
3992
|
+
});
|
|
4120
3993
|
});
|
|
4121
3994
|
}
|
|
4122
3995
|
};
|
|
@@ -4125,58 +3998,39 @@ var platformDpsApplicationProductApi = {
|
|
|
4125
3998
|
var platformDpsApplicationCustomPropsApi = {
|
|
4126
3999
|
createCustomProps(appId, property, authorization) {
|
|
4127
4000
|
return __async(this, null, function* () {
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4001
|
+
return platformDpsClientInstance.post(
|
|
4002
|
+
`/v2/applications/${appId}/property`,
|
|
4003
|
+
property,
|
|
4004
|
+
getPlatformDpsClientConfig(authorization)
|
|
4005
|
+
).then(({ data }) => data).catch((error) => {
|
|
4006
|
+
throw error.withCustomMessage(
|
|
4007
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
4133
4008
|
);
|
|
4134
|
-
|
|
4135
|
-
} catch (error) {
|
|
4136
|
-
if (error instanceof Error) {
|
|
4137
|
-
throw new Error(
|
|
4138
|
-
`Listing details couldn't be created. [${error.message}]`
|
|
4139
|
-
);
|
|
4140
|
-
}
|
|
4141
|
-
throw error;
|
|
4142
|
-
}
|
|
4009
|
+
});
|
|
4143
4010
|
});
|
|
4144
4011
|
},
|
|
4145
4012
|
updateCustomProps(appId, property, authorization) {
|
|
4146
4013
|
return __async(this, null, function* () {
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4014
|
+
return platformDpsClientInstance.put(
|
|
4015
|
+
`/v2/applications/${appId}/property`,
|
|
4016
|
+
property,
|
|
4017
|
+
getPlatformDpsClientConfig(authorization)
|
|
4018
|
+
).then(({ data }) => data).catch((error) => {
|
|
4019
|
+
throw error.withCustomMessage(
|
|
4020
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4152
4021
|
);
|
|
4153
|
-
|
|
4154
|
-
} catch (error) {
|
|
4155
|
-
if (error instanceof Error) {
|
|
4156
|
-
throw new Error(
|
|
4157
|
-
`Listing details couldn't be updated. [${error.message}]`
|
|
4158
|
-
);
|
|
4159
|
-
}
|
|
4160
|
-
throw error;
|
|
4161
|
-
}
|
|
4022
|
+
});
|
|
4162
4023
|
});
|
|
4163
4024
|
},
|
|
4164
4025
|
deleteCustomProps(appId, property, authorization) {
|
|
4165
4026
|
return __async(this, null, function* () {
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4027
|
+
return platformDpsClientInstance.delete(`/v2/applications/${appId}/property`, __spreadValues({
|
|
4028
|
+
data: property
|
|
4029
|
+
}, getPlatformDpsClientConfig(authorization))).then(({ data }) => data).catch((error) => {
|
|
4030
|
+
throw error.withCustomMessage(
|
|
4031
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4170
4032
|
);
|
|
4171
|
-
|
|
4172
|
-
} catch (error) {
|
|
4173
|
-
if (error instanceof Error) {
|
|
4174
|
-
throw new Error(
|
|
4175
|
-
`Listing details couldn't be deleted. [${error.message}]`
|
|
4176
|
-
);
|
|
4177
|
-
}
|
|
4178
|
-
throw error;
|
|
4179
|
-
}
|
|
4033
|
+
});
|
|
4180
4034
|
});
|
|
4181
4035
|
}
|
|
4182
4036
|
};
|
|
@@ -4185,84 +4039,65 @@ var platformDpsApplicationCustomPropsApi = {
|
|
|
4185
4039
|
var platformDpsApplicationResourcesApi = {
|
|
4186
4040
|
getAppUpgrades(appId, authorization) {
|
|
4187
4041
|
return __async(this, null, function* () {
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4042
|
+
return platformDpsClientInstance.get(
|
|
4043
|
+
`/v2/applications/${appId}/resources`,
|
|
4044
|
+
getPlatformDpsClientConfig(authorization)
|
|
4045
|
+
).catch((error) => {
|
|
4046
|
+
throw error.withCustomMessage(
|
|
4047
|
+
`App Resources couldn't be loaded. [${error.message}]`
|
|
4192
4048
|
);
|
|
4193
|
-
}
|
|
4194
|
-
if (error instanceof Error) {
|
|
4195
|
-
throw new Error(`App Resources couldn't be loaded. [${error.message}]`);
|
|
4196
|
-
}
|
|
4197
|
-
throw error;
|
|
4198
|
-
}
|
|
4049
|
+
});
|
|
4199
4050
|
});
|
|
4200
4051
|
},
|
|
4201
4052
|
createAppUpgrade(appId, body, authorization) {
|
|
4202
4053
|
return __async(this, null, function* () {
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4054
|
+
return platformDpsClientInstance.put(
|
|
4055
|
+
`/v2/applications/${appId}/resources`,
|
|
4056
|
+
body,
|
|
4057
|
+
getPlatformDpsClientConfig(authorization)
|
|
4058
|
+
).catch((error) => {
|
|
4059
|
+
throw error.withCustomMessage(
|
|
4060
|
+
`App Resources couldn't be created. [${error.message}]`
|
|
4208
4061
|
);
|
|
4209
|
-
}
|
|
4210
|
-
if (error instanceof Error) {
|
|
4211
|
-
throw new Error(
|
|
4212
|
-
`App Resources couldn't be created. [${error.message}]`
|
|
4213
|
-
);
|
|
4214
|
-
}
|
|
4215
|
-
throw error;
|
|
4216
|
-
}
|
|
4062
|
+
});
|
|
4217
4063
|
});
|
|
4218
4064
|
},
|
|
4219
4065
|
updateAppUpgrade(appId, body, authorization) {
|
|
4220
4066
|
return __async(this, null, function* () {
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4067
|
+
return platformDpsClientInstance.put(
|
|
4068
|
+
`/v2/applications/${appId}/resources`,
|
|
4069
|
+
body,
|
|
4070
|
+
getPlatformDpsClientConfig(authorization)
|
|
4071
|
+
).catch((error) => {
|
|
4072
|
+
throw error.withCustomMessage(
|
|
4073
|
+
`App Resources couldn't be updated. [${error.message}]`
|
|
4226
4074
|
);
|
|
4227
|
-
}
|
|
4228
|
-
if (error instanceof Error) {
|
|
4229
|
-
throw new Error(
|
|
4230
|
-
`App Resources couldn't be updated. [${error.message}]`
|
|
4231
|
-
);
|
|
4232
|
-
}
|
|
4233
|
-
throw error;
|
|
4234
|
-
}
|
|
4075
|
+
});
|
|
4235
4076
|
});
|
|
4236
4077
|
},
|
|
4237
4078
|
deleteAppUpgrade(appId, resourceId, authorization) {
|
|
4238
4079
|
return __async(this, null, function* () {
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4080
|
+
return platformDpsClientInstance.delete(
|
|
4081
|
+
`/v2/applications/${appId}/resources/${resourceId}`,
|
|
4082
|
+
getPlatformDpsClientConfig(authorization)
|
|
4083
|
+
).catch((error) => {
|
|
4084
|
+
throw error.withCustomMessage(
|
|
4085
|
+
`App Resource couldn't be delete. [${error.message}]`
|
|
4243
4086
|
);
|
|
4244
|
-
}
|
|
4245
|
-
if (error instanceof Error) {
|
|
4246
|
-
throw new Error(`App Resource couldn't be delete. [${error.message}]`);
|
|
4247
|
-
}
|
|
4248
|
-
throw error;
|
|
4249
|
-
}
|
|
4087
|
+
});
|
|
4250
4088
|
});
|
|
4251
4089
|
},
|
|
4252
4090
|
copyUpgrade(sourceAppId, destinationAppId, authorization) {
|
|
4253
4091
|
return __async(this, null, function* () {
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4092
|
+
return platformDpsClientInstance.put(
|
|
4093
|
+
`/v2/applications/${sourceAppId}/resources/copy?application=${destinationAppId}`,
|
|
4094
|
+
{},
|
|
4095
|
+
getPlatformDpsClientConfig(authorization)
|
|
4096
|
+
).catch((error) => {
|
|
4097
|
+
throw error.withCustomMessage(
|
|
4098
|
+
`App Resources couldn't be copied. [${error.message}]`
|
|
4259
4099
|
);
|
|
4260
|
-
}
|
|
4261
|
-
if (error instanceof Error) {
|
|
4262
|
-
throw new Error(`App Resources couldn't be copied. [${error.message}]`);
|
|
4263
|
-
}
|
|
4264
|
-
throw error;
|
|
4265
|
-
}
|
|
4100
|
+
});
|
|
4266
4101
|
});
|
|
4267
4102
|
}
|
|
4268
4103
|
};
|
|
@@ -4271,37 +4106,27 @@ var platformDpsApplicationResourcesApi = {
|
|
|
4271
4106
|
var platformDpsApplicationReviewApi = {
|
|
4272
4107
|
createSubmission(appId, payload, authorization) {
|
|
4273
4108
|
return __async(this, null, function* () {
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4109
|
+
return platformDpsClientInstance.put(
|
|
4110
|
+
`/v2/applications/${appId}/review/submit`,
|
|
4111
|
+
payload,
|
|
4112
|
+
getPlatformDpsClientConfig(authorization)
|
|
4113
|
+
).then(({ data }) => data).catch((error) => {
|
|
4114
|
+
throw error.withCustomMessage(
|
|
4115
|
+
`App couldn't be submitted for review. [${error.message}]`
|
|
4279
4116
|
);
|
|
4280
|
-
|
|
4281
|
-
} catch (error) {
|
|
4282
|
-
if (error instanceof Error) {
|
|
4283
|
-
throw new Error(
|
|
4284
|
-
`App couldn't be submitted for review. [${error.message}]`
|
|
4285
|
-
);
|
|
4286
|
-
}
|
|
4287
|
-
throw error;
|
|
4288
|
-
}
|
|
4117
|
+
});
|
|
4289
4118
|
});
|
|
4290
4119
|
},
|
|
4291
4120
|
cancelSubmission(appId, authorization) {
|
|
4292
4121
|
return __async(this, null, function* () {
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4122
|
+
return platformDpsClientInstance.put(
|
|
4123
|
+
`/v2/applications/${appId}/review/cancel`,
|
|
4124
|
+
getPlatformDpsClientConfig(authorization)
|
|
4125
|
+
).then(({ data }) => data).catch((error) => {
|
|
4126
|
+
throw error.withCustomMessage(
|
|
4127
|
+
`App review couldn't be cancelled. [${error.message}]`
|
|
4297
4128
|
);
|
|
4298
|
-
|
|
4299
|
-
} catch (error) {
|
|
4300
|
-
if (error instanceof Error) {
|
|
4301
|
-
throw new Error(`App review couldn't be cancelled. [${error.message}]`);
|
|
4302
|
-
}
|
|
4303
|
-
throw error;
|
|
4304
|
-
}
|
|
4129
|
+
});
|
|
4305
4130
|
});
|
|
4306
4131
|
}
|
|
4307
4132
|
};
|
|
@@ -4310,18 +4135,14 @@ var platformDpsApplicationReviewApi = {
|
|
|
4310
4135
|
var platformDpsApplicationStatsApi = {
|
|
4311
4136
|
getStats(appId, authorization) {
|
|
4312
4137
|
return __async(this, null, function* () {
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4138
|
+
yield platformDpsClientInstance.get(
|
|
4139
|
+
`/v2/applications/${appId}/stats`,
|
|
4140
|
+
getPlatformDpsClientConfig(authorization)
|
|
4141
|
+
).catch((error) => {
|
|
4142
|
+
throw error.withCustomMessage(
|
|
4143
|
+
`App Stats couldn't be fetched. [${error.message}]`
|
|
4317
4144
|
);
|
|
4318
|
-
|
|
4319
|
-
} catch (error) {
|
|
4320
|
-
if (error instanceof Error) {
|
|
4321
|
-
throw new Error(`App Stats couldn't be fetched. [${error.message}]`);
|
|
4322
|
-
}
|
|
4323
|
-
throw error;
|
|
4324
|
-
}
|
|
4145
|
+
});
|
|
4325
4146
|
});
|
|
4326
4147
|
}
|
|
4327
4148
|
};
|
|
@@ -4330,87 +4151,61 @@ var platformDpsApplicationStatsApi = {
|
|
|
4330
4151
|
var platformDpsApplicationWebhooksApi = {
|
|
4331
4152
|
updateAppWebhooks(appId, payload, authorization) {
|
|
4332
4153
|
return __async(this, null, function* () {
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4154
|
+
yield platformDpsClientInstance.put(
|
|
4155
|
+
`/v2/applications/${appId}/webhook`,
|
|
4156
|
+
payload,
|
|
4157
|
+
getPlatformDpsClientConfig(authorization)
|
|
4158
|
+
).catch((error) => {
|
|
4159
|
+
throw error.withCustomMessage(
|
|
4160
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4338
4161
|
);
|
|
4339
|
-
}
|
|
4340
|
-
if (error instanceof Error) {
|
|
4341
|
-
throw new Error(
|
|
4342
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4343
|
-
);
|
|
4344
|
-
}
|
|
4345
|
-
throw error;
|
|
4346
|
-
}
|
|
4162
|
+
});
|
|
4347
4163
|
});
|
|
4348
4164
|
},
|
|
4349
4165
|
deleteAppWebhooks(appId, authorization) {
|
|
4350
4166
|
return __async(this, null, function* () {
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4167
|
+
yield platformDpsClientInstance.delete(
|
|
4168
|
+
`/v2/applications/${appId}/webhook`,
|
|
4169
|
+
getPlatformDpsClientConfig(authorization)
|
|
4170
|
+
).catch((error) => {
|
|
4171
|
+
throw error.withCustomMessage(
|
|
4172
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4355
4173
|
);
|
|
4356
|
-
}
|
|
4357
|
-
if (error instanceof Error) {
|
|
4358
|
-
throw new Error(
|
|
4359
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4360
|
-
);
|
|
4361
|
-
}
|
|
4362
|
-
throw error;
|
|
4363
|
-
}
|
|
4174
|
+
});
|
|
4364
4175
|
});
|
|
4365
4176
|
},
|
|
4366
4177
|
getChatWebhook(appId, authorization) {
|
|
4367
4178
|
return __async(this, null, function* () {
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4179
|
+
return platformDpsClientInstance.get(
|
|
4180
|
+
`/v2/applications/${appId}/chat-webhooks`,
|
|
4181
|
+
getPlatformDpsClientConfig(authorization)
|
|
4182
|
+
).catch((error) => {
|
|
4183
|
+
throw error.withCustomMessage(
|
|
4184
|
+
`Couldn't get the chat webhook. [${error.message}]`
|
|
4372
4185
|
);
|
|
4373
|
-
}
|
|
4374
|
-
if (error instanceof Error) {
|
|
4375
|
-
throw new Error(`Couldn't get the chat webhook. [${error.message}]`);
|
|
4376
|
-
}
|
|
4377
|
-
throw error;
|
|
4378
|
-
}
|
|
4186
|
+
});
|
|
4379
4187
|
});
|
|
4380
4188
|
},
|
|
4381
4189
|
updateChatWebhook(appId, payload, authorization) {
|
|
4382
4190
|
return __async(this, null, function* () {
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4191
|
+
yield platformDpsClientInstance.post(
|
|
4192
|
+
`/v2/applications/${appId}/chat-webhooks`,
|
|
4193
|
+
payload,
|
|
4194
|
+
getPlatformDpsClientConfig(authorization)
|
|
4195
|
+
).catch((error) => {
|
|
4196
|
+
throw error.withCustomMessage(
|
|
4197
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4388
4198
|
);
|
|
4389
|
-
}
|
|
4390
|
-
if (error instanceof Error) {
|
|
4391
|
-
throw new Error(
|
|
4392
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4393
|
-
);
|
|
4394
|
-
}
|
|
4395
|
-
throw error;
|
|
4396
|
-
}
|
|
4199
|
+
});
|
|
4397
4200
|
});
|
|
4398
4201
|
},
|
|
4399
4202
|
deleteChatWebhook(appId, authorization) {
|
|
4400
4203
|
return __async(this, null, function* () {
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
__spreadValues({}, getPlatformDpsClientConfig(authorization))
|
|
4204
|
+
yield platformDpsClientInstance.delete(`/v2/applications/${appId}/chat-webhooks`, __spreadValues({}, getPlatformDpsClientConfig(authorization))).catch((error) => {
|
|
4205
|
+
throw error.withCustomMessage(
|
|
4206
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4405
4207
|
);
|
|
4406
|
-
}
|
|
4407
|
-
if (error instanceof Error) {
|
|
4408
|
-
throw new Error(
|
|
4409
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4410
|
-
);
|
|
4411
|
-
}
|
|
4412
|
-
throw error;
|
|
4413
|
-
}
|
|
4208
|
+
});
|
|
4414
4209
|
});
|
|
4415
4210
|
}
|
|
4416
4211
|
};
|
|
@@ -4419,55 +4214,37 @@ var platformDpsApplicationWebhooksApi = {
|
|
|
4419
4214
|
var platformDpsApplicationWidgetsApi = {
|
|
4420
4215
|
createWidget(appId, widgetId, widget, authorization) {
|
|
4421
4216
|
return __async(this, null, function* () {
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4217
|
+
yield platformDpsClientInstance.put(
|
|
4218
|
+
`/v2/applications/${appId}/widgets/${widgetId}`,
|
|
4219
|
+
widget,
|
|
4220
|
+
getPlatformDpsClientConfig(authorization)
|
|
4221
|
+
).catch((error) => {
|
|
4222
|
+
throw error.withCustomMessage(
|
|
4223
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
4427
4224
|
);
|
|
4428
|
-
}
|
|
4429
|
-
if (error instanceof Error) {
|
|
4430
|
-
throw new Error(
|
|
4431
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
4432
|
-
);
|
|
4433
|
-
}
|
|
4434
|
-
throw error;
|
|
4435
|
-
}
|
|
4225
|
+
});
|
|
4436
4226
|
});
|
|
4437
4227
|
},
|
|
4438
4228
|
updateWidget(appId, widgetId, widget, authorization) {
|
|
4439
4229
|
return __async(this, null, function* () {
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4230
|
+
yield platformDpsClientInstance.patch(
|
|
4231
|
+
`/v2/applications/${appId}/widgets/${widgetId}`,
|
|
4232
|
+
widget,
|
|
4233
|
+
getPlatformDpsClientConfig(authorization)
|
|
4234
|
+
).catch((error) => {
|
|
4235
|
+
throw error.withCustomMessage(
|
|
4236
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4445
4237
|
);
|
|
4446
|
-
}
|
|
4447
|
-
if (error instanceof Error) {
|
|
4448
|
-
throw new Error(
|
|
4449
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
4450
|
-
);
|
|
4451
|
-
}
|
|
4452
|
-
throw error;
|
|
4453
|
-
}
|
|
4238
|
+
});
|
|
4454
4239
|
});
|
|
4455
4240
|
},
|
|
4456
4241
|
deleteWidget(appId, widgetId, authorization) {
|
|
4457
4242
|
return __async(this, null, function* () {
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
__spreadValues({}, getPlatformDpsClientConfig(authorization))
|
|
4243
|
+
yield platformDpsClientInstance.delete(`/v2/applications/${appId}/widgets/${widgetId}`, __spreadValues({}, getPlatformDpsClientConfig(authorization))).catch((error) => {
|
|
4244
|
+
throw error.withCustomMessage(
|
|
4245
|
+
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4462
4246
|
);
|
|
4463
|
-
}
|
|
4464
|
-
if (error instanceof Error) {
|
|
4465
|
-
throw new Error(
|
|
4466
|
-
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
4467
|
-
);
|
|
4468
|
-
}
|
|
4469
|
-
throw error;
|
|
4470
|
-
}
|
|
4247
|
+
});
|
|
4471
4248
|
});
|
|
4472
4249
|
}
|
|
4473
4250
|
};
|