@livechat/developer-studio-api 2.3.25 → 2.3.26
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 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +22 -1
- package/dist/index.mjs +22 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -2101,6 +2101,9 @@ declare const api: {
|
|
|
2101
2101
|
sessions: {
|
|
2102
2102
|
readonly deleteSessions: (authorization?: PlatformAccountsClientInstanceAuthorization | undefined) => Promise<axios.AxiosResponse<void>>;
|
|
2103
2103
|
};
|
|
2104
|
+
token: {
|
|
2105
|
+
exchangeCode(): Promise<axios.AxiosResponse<AuthorizeData>>;
|
|
2106
|
+
};
|
|
2104
2107
|
};
|
|
2105
2108
|
billing: {
|
|
2106
2109
|
account: {
|
package/dist/index.d.ts
CHANGED
|
@@ -2101,6 +2101,9 @@ declare const api: {
|
|
|
2101
2101
|
sessions: {
|
|
2102
2102
|
readonly deleteSessions: (authorization?: PlatformAccountsClientInstanceAuthorization | undefined) => Promise<axios.AxiosResponse<void>>;
|
|
2103
2103
|
};
|
|
2104
|
+
token: {
|
|
2105
|
+
exchangeCode(): Promise<axios.AxiosResponse<AuthorizeData>>;
|
|
2106
|
+
};
|
|
2104
2107
|
};
|
|
2105
2108
|
billing: {
|
|
2106
2109
|
account: {
|
package/dist/index.js
CHANGED
|
@@ -3376,6 +3376,26 @@ var platformAccountsSessionsApi = {
|
|
|
3376
3376
|
}
|
|
3377
3377
|
};
|
|
3378
3378
|
|
|
3379
|
+
// src/apis/platform/accounts/token/api.ts
|
|
3380
|
+
var platformAccountsTokenApi = {
|
|
3381
|
+
exchangeCode() {
|
|
3382
|
+
return __async(this, null, function* () {
|
|
3383
|
+
try {
|
|
3384
|
+
return yield platformAccountsClientInstance.get(
|
|
3385
|
+
`/v2/token`,
|
|
3386
|
+
getPlatformAccountsClientConfig()
|
|
3387
|
+
);
|
|
3388
|
+
} catch (error) {
|
|
3389
|
+
if (error instanceof Error) {
|
|
3390
|
+
throw new Error(`Couldn't exchange code for token. [${error.message}]`);
|
|
3391
|
+
} else {
|
|
3392
|
+
throw error;
|
|
3393
|
+
}
|
|
3394
|
+
}
|
|
3395
|
+
});
|
|
3396
|
+
}
|
|
3397
|
+
};
|
|
3398
|
+
|
|
3379
3399
|
// src/apis/platform/accounts/api.ts
|
|
3380
3400
|
var platformAccountsApi = {
|
|
3381
3401
|
account: platformAccountsAccountApi,
|
|
@@ -3384,7 +3404,8 @@ var platformAccountsApi = {
|
|
|
3384
3404
|
organization: platformAccountsOrganizationApi,
|
|
3385
3405
|
products: platformAccountsProductsApi,
|
|
3386
3406
|
scopes: platformAccountsScopesApi,
|
|
3387
|
-
sessions: platformAccountsSessionsApi
|
|
3407
|
+
sessions: platformAccountsSessionsApi,
|
|
3408
|
+
token: platformAccountsTokenApi
|
|
3388
3409
|
};
|
|
3389
3410
|
|
|
3390
3411
|
// src/apis/platform/dps/instance.ts
|
package/dist/index.mjs
CHANGED
|
@@ -3285,6 +3285,26 @@ var platformAccountsSessionsApi = {
|
|
|
3285
3285
|
}
|
|
3286
3286
|
};
|
|
3287
3287
|
|
|
3288
|
+
// src/apis/platform/accounts/token/api.ts
|
|
3289
|
+
var platformAccountsTokenApi = {
|
|
3290
|
+
exchangeCode() {
|
|
3291
|
+
return __async(this, null, function* () {
|
|
3292
|
+
try {
|
|
3293
|
+
return yield platformAccountsClientInstance.get(
|
|
3294
|
+
`/v2/token`,
|
|
3295
|
+
getPlatformAccountsClientConfig()
|
|
3296
|
+
);
|
|
3297
|
+
} catch (error) {
|
|
3298
|
+
if (error instanceof Error) {
|
|
3299
|
+
throw new Error(`Couldn't exchange code for token. [${error.message}]`);
|
|
3300
|
+
} else {
|
|
3301
|
+
throw error;
|
|
3302
|
+
}
|
|
3303
|
+
}
|
|
3304
|
+
});
|
|
3305
|
+
}
|
|
3306
|
+
};
|
|
3307
|
+
|
|
3288
3308
|
// src/apis/platform/accounts/api.ts
|
|
3289
3309
|
var platformAccountsApi = {
|
|
3290
3310
|
account: platformAccountsAccountApi,
|
|
@@ -3293,7 +3313,8 @@ var platformAccountsApi = {
|
|
|
3293
3313
|
organization: platformAccountsOrganizationApi,
|
|
3294
3314
|
products: platformAccountsProductsApi,
|
|
3295
3315
|
scopes: platformAccountsScopesApi,
|
|
3296
|
-
sessions: platformAccountsSessionsApi
|
|
3316
|
+
sessions: platformAccountsSessionsApi,
|
|
3317
|
+
token: platformAccountsTokenApi
|
|
3297
3318
|
};
|
|
3298
3319
|
|
|
3299
3320
|
// src/apis/platform/dps/instance.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/developer-studio-api",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.26",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"@types/node": "^17.0.12",
|
|
18
18
|
"tsup": "^7.1.0",
|
|
19
19
|
"typescript": "^5.1.6",
|
|
20
|
-
"
|
|
20
|
+
"config": "0.0.1",
|
|
21
21
|
"tsconfig": "0.0.1",
|
|
22
|
-
"config": "0.0.
|
|
22
|
+
"eslint-config-custom": "0.0.2"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|