@livechat/developer-studio-api 2.3.26 → 2.3.27
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 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -3
- package/dist/index.mjs +14 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2102,7 +2102,7 @@ declare const api: {
|
|
|
2102
2102
|
readonly deleteSessions: (authorization?: PlatformAccountsClientInstanceAuthorization | undefined) => Promise<axios.AxiosResponse<void>>;
|
|
2103
2103
|
};
|
|
2104
2104
|
token: {
|
|
2105
|
-
exchangeCode(): Promise<axios.AxiosResponse<AuthorizeData>>;
|
|
2105
|
+
exchangeCode(code: string, clientId: string, clientSecret: string, redirectUrl: string): Promise<axios.AxiosResponse<AuthorizeData>>;
|
|
2106
2106
|
};
|
|
2107
2107
|
};
|
|
2108
2108
|
billing: {
|
package/dist/index.d.ts
CHANGED
|
@@ -2102,7 +2102,7 @@ declare const api: {
|
|
|
2102
2102
|
readonly deleteSessions: (authorization?: PlatformAccountsClientInstanceAuthorization | undefined) => Promise<axios.AxiosResponse<void>>;
|
|
2103
2103
|
};
|
|
2104
2104
|
token: {
|
|
2105
|
-
exchangeCode(): Promise<axios.AxiosResponse<AuthorizeData>>;
|
|
2105
|
+
exchangeCode(code: string, clientId: string, clientSecret: string, redirectUrl: string): Promise<axios.AxiosResponse<AuthorizeData>>;
|
|
2106
2106
|
};
|
|
2107
2107
|
};
|
|
2108
2108
|
billing: {
|
package/dist/index.js
CHANGED
|
@@ -3378,12 +3378,23 @@ var platformAccountsSessionsApi = {
|
|
|
3378
3378
|
|
|
3379
3379
|
// src/apis/platform/accounts/token/api.ts
|
|
3380
3380
|
var platformAccountsTokenApi = {
|
|
3381
|
-
exchangeCode() {
|
|
3381
|
+
exchangeCode(code, clientId, clientSecret, redirectUrl) {
|
|
3382
3382
|
return __async(this, null, function* () {
|
|
3383
|
+
const data = new URLSearchParams({
|
|
3384
|
+
code,
|
|
3385
|
+
client_id: clientId,
|
|
3386
|
+
client_secret: clientSecret,
|
|
3387
|
+
redirect_uri: redirectUrl
|
|
3388
|
+
});
|
|
3383
3389
|
try {
|
|
3384
|
-
return yield platformAccountsClientInstance.
|
|
3390
|
+
return yield platformAccountsClientInstance.post(
|
|
3385
3391
|
`/v2/token`,
|
|
3386
|
-
|
|
3392
|
+
data,
|
|
3393
|
+
{
|
|
3394
|
+
headers: {
|
|
3395
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
3396
|
+
}
|
|
3397
|
+
}
|
|
3387
3398
|
);
|
|
3388
3399
|
} catch (error) {
|
|
3389
3400
|
if (error instanceof Error) {
|
package/dist/index.mjs
CHANGED
|
@@ -3287,12 +3287,23 @@ var platformAccountsSessionsApi = {
|
|
|
3287
3287
|
|
|
3288
3288
|
// src/apis/platform/accounts/token/api.ts
|
|
3289
3289
|
var platformAccountsTokenApi = {
|
|
3290
|
-
exchangeCode() {
|
|
3290
|
+
exchangeCode(code, clientId, clientSecret, redirectUrl) {
|
|
3291
3291
|
return __async(this, null, function* () {
|
|
3292
|
+
const data = new URLSearchParams({
|
|
3293
|
+
code,
|
|
3294
|
+
client_id: clientId,
|
|
3295
|
+
client_secret: clientSecret,
|
|
3296
|
+
redirect_uri: redirectUrl
|
|
3297
|
+
});
|
|
3292
3298
|
try {
|
|
3293
|
-
return yield platformAccountsClientInstance.
|
|
3299
|
+
return yield platformAccountsClientInstance.post(
|
|
3294
3300
|
`/v2/token`,
|
|
3295
|
-
|
|
3301
|
+
data,
|
|
3302
|
+
{
|
|
3303
|
+
headers: {
|
|
3304
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
3305
|
+
}
|
|
3306
|
+
}
|
|
3296
3307
|
);
|
|
3297
3308
|
} catch (error) {
|
|
3298
3309
|
if (error instanceof Error) {
|