@livechat/developer-studio-api 3.3.10 → 3.3.12
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 +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +21 -3
- package/dist/index.mjs +21 -3
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -6775,6 +6775,9 @@ declare const api: {
|
|
|
6775
6775
|
update(appId: string, payload: UpsertHubSpotWebhookSettingsPayload, authorization?: (HubspotClientAuthorization & {
|
|
6776
6776
|
apiKey?: string | undefined;
|
|
6777
6777
|
}) | undefined): Promise<axios.AxiosResponse<void, any>>;
|
|
6778
|
+
delete(appId: string, authorization?: (HubspotClientAuthorization & {
|
|
6779
|
+
apiKey?: string | undefined;
|
|
6780
|
+
}) | undefined): Promise<axios.AxiosResponse<void, any>>;
|
|
6778
6781
|
};
|
|
6779
6782
|
subscriptions: {
|
|
6780
6783
|
list(appId: string, authorization?: (HubspotClientAuthorization & {
|
|
@@ -6803,7 +6806,7 @@ declare const api: {
|
|
|
6803
6806
|
hub_domain: string;
|
|
6804
6807
|
}>;
|
|
6805
6808
|
};
|
|
6806
|
-
|
|
6809
|
+
bigcommerce: {
|
|
6807
6810
|
webhooks: {
|
|
6808
6811
|
list(authorization?: BigCommerceClientAuthorization | undefined): Promise<{
|
|
6809
6812
|
data: BigCommerceWebhook[];
|
package/dist/index.d.ts
CHANGED
|
@@ -6775,6 +6775,9 @@ declare const api: {
|
|
|
6775
6775
|
update(appId: string, payload: UpsertHubSpotWebhookSettingsPayload, authorization?: (HubspotClientAuthorization & {
|
|
6776
6776
|
apiKey?: string | undefined;
|
|
6777
6777
|
}) | undefined): Promise<axios.AxiosResponse<void, any>>;
|
|
6778
|
+
delete(appId: string, authorization?: (HubspotClientAuthorization & {
|
|
6779
|
+
apiKey?: string | undefined;
|
|
6780
|
+
}) | undefined): Promise<axios.AxiosResponse<void, any>>;
|
|
6778
6781
|
};
|
|
6779
6782
|
subscriptions: {
|
|
6780
6783
|
list(appId: string, authorization?: (HubspotClientAuthorization & {
|
|
@@ -6803,7 +6806,7 @@ declare const api: {
|
|
|
6803
6806
|
hub_domain: string;
|
|
6804
6807
|
}>;
|
|
6805
6808
|
};
|
|
6806
|
-
|
|
6809
|
+
bigcommerce: {
|
|
6807
6810
|
webhooks: {
|
|
6808
6811
|
list(authorization?: BigCommerceClientAuthorization | undefined): Promise<{
|
|
6809
6812
|
data: BigCommerceWebhook[];
|
package/dist/index.js
CHANGED
|
@@ -4615,6 +4615,24 @@ var hubspotWebhooksApi = {
|
|
|
4615
4615
|
// })
|
|
4616
4616
|
);
|
|
4617
4617
|
});
|
|
4618
|
+
},
|
|
4619
|
+
delete(appId, authorization) {
|
|
4620
|
+
return __async(this, null, function* () {
|
|
4621
|
+
const params = new URLSearchParams(
|
|
4622
|
+
(authorization == null ? void 0 : authorization.apiKey) ? {
|
|
4623
|
+
hapikey: authorization.apiKey
|
|
4624
|
+
} : {}
|
|
4625
|
+
);
|
|
4626
|
+
return hubspotClientInstance.delete(
|
|
4627
|
+
`/webhooks/v1/${encodeURIComponent(
|
|
4628
|
+
appId
|
|
4629
|
+
)}/settings?${params.toString()}`
|
|
4630
|
+
// getHubspotClientConfig({
|
|
4631
|
+
// ...authorization,
|
|
4632
|
+
// ensureAuthorizationToken: true,
|
|
4633
|
+
// })
|
|
4634
|
+
);
|
|
4635
|
+
});
|
|
4618
4636
|
}
|
|
4619
4637
|
},
|
|
4620
4638
|
subscriptions: {
|
|
@@ -4815,7 +4833,7 @@ var integrationsApi = {
|
|
|
4815
4833
|
neon: neonApi,
|
|
4816
4834
|
planetscale: planetscaleApi,
|
|
4817
4835
|
hubspot: hubspotApi,
|
|
4818
|
-
|
|
4836
|
+
bigcommerce: bigcommerceApi,
|
|
4819
4837
|
openai: openaiApi,
|
|
4820
4838
|
text: textApi
|
|
4821
4839
|
};
|
|
@@ -8105,7 +8123,7 @@ function getIntegrationFlowUrl(name, flow, trigger, context, state, config) {
|
|
|
8105
8123
|
const serializedContext = serializerBase64.serialize(__spreadValues(__spreadValues({
|
|
8106
8124
|
state: serializedState
|
|
8107
8125
|
}, trigger), context));
|
|
8108
|
-
const url = `${config.urls.adapterUrl}/integrations/${name}/
|
|
8126
|
+
const url = `${config.urls.adapterUrl}/integrations/${name}/flows/${flow}/flow?context=${serializedContext}`;
|
|
8109
8127
|
if (trigger.mode === "modal" /* Modal */) {
|
|
8110
8128
|
const newWindow = window.open(
|
|
8111
8129
|
url,
|
|
@@ -8125,7 +8143,7 @@ function getIntegrationFlowUrl(name, flow, trigger, context, state, config) {
|
|
|
8125
8143
|
"message",
|
|
8126
8144
|
(event) => {
|
|
8127
8145
|
var _a;
|
|
8128
|
-
if (((_a = event.data) == null ? void 0 : _a.type) === "
|
|
8146
|
+
if (((_a = event.data) == null ? void 0 : _a.type) === "internal" && event.data.output) {
|
|
8129
8147
|
newWindow == null ? void 0 : newWindow.close();
|
|
8130
8148
|
clearInterval(observer);
|
|
8131
8149
|
resolve(event.data.output);
|
package/dist/index.mjs
CHANGED
|
@@ -4460,6 +4460,24 @@ var hubspotWebhooksApi = {
|
|
|
4460
4460
|
// })
|
|
4461
4461
|
);
|
|
4462
4462
|
});
|
|
4463
|
+
},
|
|
4464
|
+
delete(appId, authorization) {
|
|
4465
|
+
return __async(this, null, function* () {
|
|
4466
|
+
const params = new URLSearchParams(
|
|
4467
|
+
(authorization == null ? void 0 : authorization.apiKey) ? {
|
|
4468
|
+
hapikey: authorization.apiKey
|
|
4469
|
+
} : {}
|
|
4470
|
+
);
|
|
4471
|
+
return hubspotClientInstance.delete(
|
|
4472
|
+
`/webhooks/v1/${encodeURIComponent(
|
|
4473
|
+
appId
|
|
4474
|
+
)}/settings?${params.toString()}`
|
|
4475
|
+
// getHubspotClientConfig({
|
|
4476
|
+
// ...authorization,
|
|
4477
|
+
// ensureAuthorizationToken: true,
|
|
4478
|
+
// })
|
|
4479
|
+
);
|
|
4480
|
+
});
|
|
4463
4481
|
}
|
|
4464
4482
|
},
|
|
4465
4483
|
subscriptions: {
|
|
@@ -4660,7 +4678,7 @@ var integrationsApi = {
|
|
|
4660
4678
|
neon: neonApi,
|
|
4661
4679
|
planetscale: planetscaleApi,
|
|
4662
4680
|
hubspot: hubspotApi,
|
|
4663
|
-
|
|
4681
|
+
bigcommerce: bigcommerceApi,
|
|
4664
4682
|
openai: openaiApi,
|
|
4665
4683
|
text: textApi
|
|
4666
4684
|
};
|
|
@@ -7950,7 +7968,7 @@ function getIntegrationFlowUrl(name, flow, trigger, context, state, config) {
|
|
|
7950
7968
|
const serializedContext = serializerBase64.serialize(__spreadValues(__spreadValues({
|
|
7951
7969
|
state: serializedState
|
|
7952
7970
|
}, trigger), context));
|
|
7953
|
-
const url = `${config.urls.adapterUrl}/integrations/${name}/
|
|
7971
|
+
const url = `${config.urls.adapterUrl}/integrations/${name}/flows/${flow}/flow?context=${serializedContext}`;
|
|
7954
7972
|
if (trigger.mode === "modal" /* Modal */) {
|
|
7955
7973
|
const newWindow = window.open(
|
|
7956
7974
|
url,
|
|
@@ -7970,7 +7988,7 @@ function getIntegrationFlowUrl(name, flow, trigger, context, state, config) {
|
|
|
7970
7988
|
"message",
|
|
7971
7989
|
(event) => {
|
|
7972
7990
|
var _a;
|
|
7973
|
-
if (((_a = event.data) == null ? void 0 : _a.type) === "
|
|
7991
|
+
if (((_a = event.data) == null ? void 0 : _a.type) === "internal" && event.data.output) {
|
|
7974
7992
|
newWindow == null ? void 0 : newWindow.close();
|
|
7975
7993
|
clearInterval(observer);
|
|
7976
7994
|
resolve(event.data.output);
|
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.12",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"@types/node": "^17.0.12",
|
|
21
21
|
"tsup": "^7.1.0",
|
|
22
22
|
"typescript": "^5.1.6",
|
|
23
|
+
"utils": "0.0.4",
|
|
23
24
|
"eslint-config-custom": "0.0.10",
|
|
24
|
-
"tsconfig": "0.0.1"
|
|
25
|
-
"utils": "0.0.4"
|
|
25
|
+
"tsconfig": "0.0.1"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "tsup",
|