@livechat/developer-studio-api 3.0.23 → 3.0.25
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -3
- package/dist/index.mjs +18 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2637,6 +2637,7 @@ declare const api: {
|
|
|
2637
2637
|
getEvents(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<AppEventDto[]>;
|
|
2638
2638
|
};
|
|
2639
2639
|
install: {
|
|
2640
|
+
getInstallations(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
2640
2641
|
install(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
2641
2642
|
uninstall(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
2642
2643
|
updateDirectInstallationUrl(appId: string, payload: UpdateApplicationDirectInstallUrlPayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2637,6 +2637,7 @@ declare const api: {
|
|
|
2637
2637
|
getEvents(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<AppEventDto[]>;
|
|
2638
2638
|
};
|
|
2639
2639
|
install: {
|
|
2640
|
+
getInstallations(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
2640
2641
|
install(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
2641
2642
|
uninstall(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
|
2642
2643
|
updateDirectInstallationUrl(appId: string, payload: UpdateApplicationDirectInstallUrlPayload, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -2389,10 +2389,11 @@ function getLiveChatClientAuthorization(req) {
|
|
|
2389
2389
|
};
|
|
2390
2390
|
}
|
|
2391
2391
|
function getLiveChatClientConfig(options = {}) {
|
|
2392
|
+
var _a;
|
|
2392
2393
|
const currentHeaders = livechatClientInstance.defaults.headers;
|
|
2393
2394
|
const defaultAuthorization = currentHeaders.Authorization;
|
|
2394
2395
|
const headers = {
|
|
2395
|
-
authorization:
|
|
2396
|
+
authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
|
|
2396
2397
|
};
|
|
2397
2398
|
return {
|
|
2398
2399
|
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
@@ -3276,10 +3277,11 @@ function getPlatformDpsAdminClientAuthorization() {
|
|
|
3276
3277
|
};
|
|
3277
3278
|
}
|
|
3278
3279
|
function getPlatformDpsClientConfig(options = {}) {
|
|
3280
|
+
var _a;
|
|
3279
3281
|
const currentHeaders = platformDpsClientInstance.defaults.headers;
|
|
3280
3282
|
const defaultAuthorization = currentHeaders.Authorization;
|
|
3281
3283
|
const headers = {
|
|
3282
|
-
authorization:
|
|
3284
|
+
authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
|
|
3283
3285
|
};
|
|
3284
3286
|
return {
|
|
3285
3287
|
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
@@ -3898,6 +3900,18 @@ var platformDpsApplicationInfrastructureApi = {
|
|
|
3898
3900
|
|
|
3899
3901
|
// src/apis/platform/dps/applications/application/install/api.ts
|
|
3900
3902
|
var platformDpsApplicationInstallApi = {
|
|
3903
|
+
getInstallations(appId, authorization) {
|
|
3904
|
+
return __async(this, null, function* () {
|
|
3905
|
+
yield platformDpsClientInstance.get(
|
|
3906
|
+
`/v2/applications/${appId}/installations`,
|
|
3907
|
+
getPlatformDpsClientConfig(authorization)
|
|
3908
|
+
).catch((error) => {
|
|
3909
|
+
throw error.withCustomMessage(
|
|
3910
|
+
`Couldn't get app installations. [${error.message}]`
|
|
3911
|
+
);
|
|
3912
|
+
});
|
|
3913
|
+
});
|
|
3914
|
+
},
|
|
3901
3915
|
install(appId, authorization) {
|
|
3902
3916
|
return __async(this, null, function* () {
|
|
3903
3917
|
yield platformDpsClientInstance.put(
|
|
@@ -5429,9 +5443,10 @@ function getPlatformBillingClientAuthorization(req) {
|
|
|
5429
5443
|
};
|
|
5430
5444
|
}
|
|
5431
5445
|
function getPlatformBillingClientConfig(options = {}) {
|
|
5446
|
+
var _a;
|
|
5432
5447
|
const defaultAuthorization = platformBillingClientInstance.defaults.headers.Authorization;
|
|
5433
5448
|
const headers = {
|
|
5434
|
-
authorization:
|
|
5449
|
+
authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
|
|
5435
5450
|
};
|
|
5436
5451
|
return {
|
|
5437
5452
|
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
package/dist/index.mjs
CHANGED
|
@@ -2287,10 +2287,11 @@ function getLiveChatClientAuthorization(req) {
|
|
|
2287
2287
|
};
|
|
2288
2288
|
}
|
|
2289
2289
|
function getLiveChatClientConfig(options = {}) {
|
|
2290
|
+
var _a;
|
|
2290
2291
|
const currentHeaders = livechatClientInstance.defaults.headers;
|
|
2291
2292
|
const defaultAuthorization = currentHeaders.Authorization;
|
|
2292
2293
|
const headers = {
|
|
2293
|
-
authorization:
|
|
2294
|
+
authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
|
|
2294
2295
|
};
|
|
2295
2296
|
return {
|
|
2296
2297
|
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
@@ -3174,10 +3175,11 @@ function getPlatformDpsAdminClientAuthorization() {
|
|
|
3174
3175
|
};
|
|
3175
3176
|
}
|
|
3176
3177
|
function getPlatformDpsClientConfig(options = {}) {
|
|
3178
|
+
var _a;
|
|
3177
3179
|
const currentHeaders = platformDpsClientInstance.defaults.headers;
|
|
3178
3180
|
const defaultAuthorization = currentHeaders.Authorization;
|
|
3179
3181
|
const headers = {
|
|
3180
|
-
authorization:
|
|
3182
|
+
authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
|
|
3181
3183
|
};
|
|
3182
3184
|
return {
|
|
3183
3185
|
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
@@ -3796,6 +3798,18 @@ var platformDpsApplicationInfrastructureApi = {
|
|
|
3796
3798
|
|
|
3797
3799
|
// src/apis/platform/dps/applications/application/install/api.ts
|
|
3798
3800
|
var platformDpsApplicationInstallApi = {
|
|
3801
|
+
getInstallations(appId, authorization) {
|
|
3802
|
+
return __async(this, null, function* () {
|
|
3803
|
+
yield platformDpsClientInstance.get(
|
|
3804
|
+
`/v2/applications/${appId}/installations`,
|
|
3805
|
+
getPlatformDpsClientConfig(authorization)
|
|
3806
|
+
).catch((error) => {
|
|
3807
|
+
throw error.withCustomMessage(
|
|
3808
|
+
`Couldn't get app installations. [${error.message}]`
|
|
3809
|
+
);
|
|
3810
|
+
});
|
|
3811
|
+
});
|
|
3812
|
+
},
|
|
3799
3813
|
install(appId, authorization) {
|
|
3800
3814
|
return __async(this, null, function* () {
|
|
3801
3815
|
yield platformDpsClientInstance.put(
|
|
@@ -5327,9 +5341,10 @@ function getPlatformBillingClientAuthorization(req) {
|
|
|
5327
5341
|
};
|
|
5328
5342
|
}
|
|
5329
5343
|
function getPlatformBillingClientConfig(options = {}) {
|
|
5344
|
+
var _a;
|
|
5330
5345
|
const defaultAuthorization = platformBillingClientInstance.defaults.headers.Authorization;
|
|
5331
5346
|
const headers = {
|
|
5332
|
-
authorization:
|
|
5347
|
+
authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
|
|
5333
5348
|
};
|
|
5334
5349
|
return {
|
|
5335
5350
|
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|