@livechat/developer-studio-api 3.3.7 → 3.3.8
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 +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -45
- package/dist/index.mjs +1 -45
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -6527,7 +6527,6 @@ declare const api: {
|
|
|
6527
6527
|
unregisterWebhooks(clientId?: string | undefined, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
6528
6528
|
registerWebhook(webhook: LivechatWebhook, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
6529
6529
|
registerWebhooks(webhooks: LivechatWebhook[], authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
6530
|
-
migrateWebhooks(webhooks: LivechatWebhook[], clientId: string, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
6531
6530
|
getLicenseWebhooksList(isAgent: boolean, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<LivechatWebhookDto[], any> | {
|
|
6532
6531
|
data: LivechatWebhookDto[];
|
|
6533
6532
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -6527,7 +6527,6 @@ declare const api: {
|
|
|
6527
6527
|
unregisterWebhooks(clientId?: string | undefined, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
6528
6528
|
registerWebhook(webhook: LivechatWebhook, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
6529
6529
|
registerWebhooks(webhooks: LivechatWebhook[], authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
6530
|
-
migrateWebhooks(webhooks: LivechatWebhook[], clientId: string, authorization?: PlatformClientAuthorization | undefined): Promise<void>;
|
|
6531
6530
|
getLicenseWebhooksList(isAgent: boolean, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<LivechatWebhookDto[], any> | {
|
|
6532
6531
|
data: LivechatWebhookDto[];
|
|
6533
6532
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -4966,7 +4966,7 @@ var appTemplates = {
|
|
|
4966
4966
|
name: "Nextjs SaaS boilerplate",
|
|
4967
4967
|
category: { name: "Agent App Widget" },
|
|
4968
4968
|
description: "CRM-like app with key-value storage and simple UI. Authorization and payments fully set up.",
|
|
4969
|
-
tags: ["UI", "Auth", "
|
|
4969
|
+
tags: ["UI", "Auth", "Payments", "Analytics"],
|
|
4970
4970
|
template: true,
|
|
4971
4971
|
manifest: {
|
|
4972
4972
|
name: "Nextjs SaaS boilerplate",
|
|
@@ -4982,11 +4982,6 @@ var appTemplates = {
|
|
|
4982
4982
|
provider: "vercel",
|
|
4983
4983
|
url: ""
|
|
4984
4984
|
},
|
|
4985
|
-
storage: {
|
|
4986
|
-
provider: "neon",
|
|
4987
|
-
databaseName: "",
|
|
4988
|
-
isSeeded: true
|
|
4989
|
-
},
|
|
4990
4985
|
authorization: {
|
|
4991
4986
|
type: "javascript_app",
|
|
4992
4987
|
redirectUri: ""
|
|
@@ -5537,45 +5532,6 @@ var livechatWebhookApi = {
|
|
|
5537
5532
|
}
|
|
5538
5533
|
});
|
|
5539
5534
|
},
|
|
5540
|
-
migrateWebhooks(webhooks, clientId, authorization) {
|
|
5541
|
-
return __async(this, null, function* () {
|
|
5542
|
-
try {
|
|
5543
|
-
const webhooksToCheck = webhooks.map((webhook) => {
|
|
5544
|
-
return {
|
|
5545
|
-
api_version: "3.2",
|
|
5546
|
-
action: webhook.action,
|
|
5547
|
-
filters: webhook.filters
|
|
5548
|
-
};
|
|
5549
|
-
});
|
|
5550
|
-
const { data: verifiedWebhooks } = yield livechatClientInstance.post(
|
|
5551
|
-
`/v3.3/configuration/action/check_webhooks_migration`,
|
|
5552
|
-
[...webhooksToCheck],
|
|
5553
|
-
getLiveChatClientConfig(authorization)
|
|
5554
|
-
);
|
|
5555
|
-
const updatedWebhooks = webhooks.map((webhook, index) => {
|
|
5556
|
-
return __spreadProps(__spreadValues({}, webhook), {
|
|
5557
|
-
action: verifiedWebhooks[index].action
|
|
5558
|
-
});
|
|
5559
|
-
});
|
|
5560
|
-
yield livechatClientInstance.post(
|
|
5561
|
-
`/v3.3/configuration/action/migrate_webhooks`,
|
|
5562
|
-
{
|
|
5563
|
-
owner_client_id: clientId,
|
|
5564
|
-
webhooks: updatedWebhooks
|
|
5565
|
-
},
|
|
5566
|
-
getLiveChatClientConfig(authorization)
|
|
5567
|
-
);
|
|
5568
|
-
} catch (error) {
|
|
5569
|
-
if (error instanceof LivechatApiError) {
|
|
5570
|
-
throw error.withCustomMessage(
|
|
5571
|
-
`Migration failed. It looks like one of the webhooks you're trying to migrate doesn't exist in the new version or exists under a different name. Migrate the webhook manually via the Configuration API.`
|
|
5572
|
-
);
|
|
5573
|
-
} else {
|
|
5574
|
-
throw error;
|
|
5575
|
-
}
|
|
5576
|
-
}
|
|
5577
|
-
});
|
|
5578
|
-
},
|
|
5579
5535
|
getLicenseWebhooksList(isAgent, authorization) {
|
|
5580
5536
|
return __async(this, null, function* () {
|
|
5581
5537
|
if (isAgent) {
|
package/dist/index.mjs
CHANGED
|
@@ -4811,7 +4811,7 @@ var appTemplates = {
|
|
|
4811
4811
|
name: "Nextjs SaaS boilerplate",
|
|
4812
4812
|
category: { name: "Agent App Widget" },
|
|
4813
4813
|
description: "CRM-like app with key-value storage and simple UI. Authorization and payments fully set up.",
|
|
4814
|
-
tags: ["UI", "Auth", "
|
|
4814
|
+
tags: ["UI", "Auth", "Payments", "Analytics"],
|
|
4815
4815
|
template: true,
|
|
4816
4816
|
manifest: {
|
|
4817
4817
|
name: "Nextjs SaaS boilerplate",
|
|
@@ -4827,11 +4827,6 @@ var appTemplates = {
|
|
|
4827
4827
|
provider: "vercel",
|
|
4828
4828
|
url: ""
|
|
4829
4829
|
},
|
|
4830
|
-
storage: {
|
|
4831
|
-
provider: "neon",
|
|
4832
|
-
databaseName: "",
|
|
4833
|
-
isSeeded: true
|
|
4834
|
-
},
|
|
4835
4830
|
authorization: {
|
|
4836
4831
|
type: "javascript_app",
|
|
4837
4832
|
redirectUri: ""
|
|
@@ -5382,45 +5377,6 @@ var livechatWebhookApi = {
|
|
|
5382
5377
|
}
|
|
5383
5378
|
});
|
|
5384
5379
|
},
|
|
5385
|
-
migrateWebhooks(webhooks, clientId, authorization) {
|
|
5386
|
-
return __async(this, null, function* () {
|
|
5387
|
-
try {
|
|
5388
|
-
const webhooksToCheck = webhooks.map((webhook) => {
|
|
5389
|
-
return {
|
|
5390
|
-
api_version: "3.2",
|
|
5391
|
-
action: webhook.action,
|
|
5392
|
-
filters: webhook.filters
|
|
5393
|
-
};
|
|
5394
|
-
});
|
|
5395
|
-
const { data: verifiedWebhooks } = yield livechatClientInstance.post(
|
|
5396
|
-
`/v3.3/configuration/action/check_webhooks_migration`,
|
|
5397
|
-
[...webhooksToCheck],
|
|
5398
|
-
getLiveChatClientConfig(authorization)
|
|
5399
|
-
);
|
|
5400
|
-
const updatedWebhooks = webhooks.map((webhook, index) => {
|
|
5401
|
-
return __spreadProps(__spreadValues({}, webhook), {
|
|
5402
|
-
action: verifiedWebhooks[index].action
|
|
5403
|
-
});
|
|
5404
|
-
});
|
|
5405
|
-
yield livechatClientInstance.post(
|
|
5406
|
-
`/v3.3/configuration/action/migrate_webhooks`,
|
|
5407
|
-
{
|
|
5408
|
-
owner_client_id: clientId,
|
|
5409
|
-
webhooks: updatedWebhooks
|
|
5410
|
-
},
|
|
5411
|
-
getLiveChatClientConfig(authorization)
|
|
5412
|
-
);
|
|
5413
|
-
} catch (error) {
|
|
5414
|
-
if (error instanceof LivechatApiError) {
|
|
5415
|
-
throw error.withCustomMessage(
|
|
5416
|
-
`Migration failed. It looks like one of the webhooks you're trying to migrate doesn't exist in the new version or exists under a different name. Migrate the webhook manually via the Configuration API.`
|
|
5417
|
-
);
|
|
5418
|
-
} else {
|
|
5419
|
-
throw error;
|
|
5420
|
-
}
|
|
5421
|
-
}
|
|
5422
|
-
});
|
|
5423
|
-
},
|
|
5424
5380
|
getLicenseWebhooksList(isAgent, authorization) {
|
|
5425
5381
|
return __async(this, null, function* () {
|
|
5426
5382
|
if (isAgent) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/developer-studio-api",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.8",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"tsup": "^7.1.0",
|
|
22
22
|
"typescript": "^5.1.6",
|
|
23
23
|
"eslint-config-custom": "0.0.10",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"tsconfig": "0.0.1",
|
|
25
|
+
"utils": "0.0.4"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "tsup",
|