@livechat/developer-studio-api 5.7.0 → 5.10.1
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/{chunk-GND2D76F.mjs → chunk-BZVBB5BG.mjs} +80 -4
- package/dist/{events-yWjeW2vl.d.mts → events-00ZFjf-6.d.mts} +270 -46
- package/dist/{events-yWjeW2vl.d.ts → events-00ZFjf-6.d.ts} +270 -46
- package/dist/index.d.mts +332 -14
- package/dist/index.d.ts +332 -14
- package/dist/index.js +82 -4
- package/dist/index.mjs +5 -1
- package/dist/workflow-contracts.d.mts +1 -1
- package/dist/workflow-contracts.d.ts +1 -1
- package/dist/workflow-contracts.js +43 -2
- package/dist/workflow-contracts.mjs +3 -1
- package/package.json +3 -3
|
@@ -271,6 +271,12 @@ var WorkflowManualTriggerSubTypeName = {
|
|
|
271
271
|
[WorkflowManualTriggerSubType.forSelectedTicket]: "text-helpdesk-manual"
|
|
272
272
|
};
|
|
273
273
|
|
|
274
|
+
// src/apis/integrations/text/platform/workflow/workflows/_contracts/dtos/workflow.ts
|
|
275
|
+
var WorkflowInactivityReason = /* @__PURE__ */ ((WorkflowInactivityReason2) => {
|
|
276
|
+
WorkflowInactivityReason2["OwnerRemoved"] = "owner_removed";
|
|
277
|
+
return WorkflowInactivityReason2;
|
|
278
|
+
})(WorkflowInactivityReason || {});
|
|
279
|
+
|
|
274
280
|
// src/apis/integrations/text/platform/workflow/workflows/_contracts/dtos/workflowElement.ts
|
|
275
281
|
var TRIGGER_REFERENCE_NAME = "trigger";
|
|
276
282
|
|
|
@@ -3822,6 +3828,7 @@ var getUrl5 = (segments = [], version) => buildUrlFromSegments(
|
|
|
3822
3828
|
);
|
|
3823
3829
|
var urls7 = {
|
|
3824
3830
|
getWorkflows: (queryParams) => enrichUrlWithQueryParams(getUrl5([], "v1.0" /* V1 */), queryParams),
|
|
3831
|
+
getAiAgentSkillsSummary: () => getUrl5(["ai_agent", "skills", "summary"], "v1.0" /* V1 */),
|
|
3825
3832
|
createWorkflow: () => getUrl5(),
|
|
3826
3833
|
getWorkflow: (id) => getUrl5([id], "v1.0" /* V1 */),
|
|
3827
3834
|
updateWorkflow: (id) => getUrl5([id]),
|
|
@@ -3855,6 +3862,17 @@ var textPlatformWorkflowsApi = {
|
|
|
3855
3862
|
return workflows;
|
|
3856
3863
|
});
|
|
3857
3864
|
},
|
|
3865
|
+
getAiAgentSkillsSummary(authorization) {
|
|
3866
|
+
return __async(this, null, function* () {
|
|
3867
|
+
const { data } = yield textClientInstance.get(
|
|
3868
|
+
urls7.getAiAgentSkillsSummary(),
|
|
3869
|
+
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3870
|
+
ensureAuthorizationToken: true
|
|
3871
|
+
}))
|
|
3872
|
+
);
|
|
3873
|
+
return data;
|
|
3874
|
+
});
|
|
3875
|
+
},
|
|
3858
3876
|
getWorkflow(workflowId, version, authorization) {
|
|
3859
3877
|
return __async(this, null, function* () {
|
|
3860
3878
|
const searchParams = new URLSearchParams();
|
|
@@ -4051,6 +4069,25 @@ var textResourcerApi = {
|
|
|
4051
4069
|
});
|
|
4052
4070
|
});
|
|
4053
4071
|
},
|
|
4072
|
+
createResource(resource, credentialId, payload, authorization) {
|
|
4073
|
+
return __async(this, null, function* () {
|
|
4074
|
+
const config = getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
4075
|
+
ensureAuthorizationToken: true
|
|
4076
|
+
}));
|
|
4077
|
+
return textClientInstance.post(urls8.getResource(resource), payload, __spreadProps(__spreadValues({}, config), {
|
|
4078
|
+
headers: __spreadProps(__spreadValues({}, config.headers), {
|
|
4079
|
+
"X-Credential-ID": credentialId
|
|
4080
|
+
})
|
|
4081
|
+
})).catch((error) => {
|
|
4082
|
+
if (error instanceof TextApiError) {
|
|
4083
|
+
throw error.withCustomMessage(
|
|
4084
|
+
`Couldn't create resourcer resource. [${error.message}]`
|
|
4085
|
+
);
|
|
4086
|
+
}
|
|
4087
|
+
throw error;
|
|
4088
|
+
});
|
|
4089
|
+
});
|
|
4090
|
+
},
|
|
4054
4091
|
listSchema(credentialId, authorization) {
|
|
4055
4092
|
return __async(this, null, function* () {
|
|
4056
4093
|
const config = getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
@@ -7465,7 +7502,7 @@ var livechatBotsTemplatesApi = {
|
|
|
7465
7502
|
};
|
|
7466
7503
|
|
|
7467
7504
|
// src/apis/products/livechat/configuration/properties/api.ts
|
|
7468
|
-
var API_BASE_URL = "/v3.
|
|
7505
|
+
var API_BASE_URL = "/v3.6/configuration/action";
|
|
7469
7506
|
var livechatPropertyApi = {
|
|
7470
7507
|
getProperties(clientId, isAgent, authorization) {
|
|
7471
7508
|
return __async(this, null, function* () {
|
|
@@ -8472,6 +8509,8 @@ import { z } from "zod";
|
|
|
8472
8509
|
var CdpCustomerEventType = /* @__PURE__ */ ((CdpCustomerEventType2) => {
|
|
8473
8510
|
CdpCustomerEventType2["EmailSet"] = "customer_email_set";
|
|
8474
8511
|
CdpCustomerEventType2["PropertiesValuesUpdated"] = "customer_properties_values_updated";
|
|
8512
|
+
CdpCustomerEventType2["SegmentAdded"] = "segment_added";
|
|
8513
|
+
CdpCustomerEventType2["SegmentRemoved"] = "segment_removed";
|
|
8475
8514
|
return CdpCustomerEventType2;
|
|
8476
8515
|
})(CdpCustomerEventType || {});
|
|
8477
8516
|
var customerMetadataZod = z.object({
|
|
@@ -8479,6 +8518,11 @@ var customerMetadataZod = z.object({
|
|
|
8479
8518
|
customer_id: z.string(),
|
|
8480
8519
|
master_id: z.string()
|
|
8481
8520
|
});
|
|
8521
|
+
var segmentMembershipDataZod = customerMetadataZod.extend({
|
|
8522
|
+
segment_id: z.number(),
|
|
8523
|
+
segment_type: z.string(),
|
|
8524
|
+
membership_last_updated_at: z.string()
|
|
8525
|
+
}).passthrough();
|
|
8482
8526
|
var cdpCustomerEventMessageZod = z.discriminatedUnion("type", [
|
|
8483
8527
|
z.object({
|
|
8484
8528
|
id: z.string(),
|
|
@@ -8500,6 +8544,16 @@ var cdpCustomerEventMessageZod = z.discriminatedUnion("type", [
|
|
|
8500
8544
|
}).passthrough()
|
|
8501
8545
|
)
|
|
8502
8546
|
}).passthrough()
|
|
8547
|
+
}),
|
|
8548
|
+
z.object({
|
|
8549
|
+
id: z.string(),
|
|
8550
|
+
type: z.literal("segment_added" /* SegmentAdded */),
|
|
8551
|
+
data: segmentMembershipDataZod
|
|
8552
|
+
}),
|
|
8553
|
+
z.object({
|
|
8554
|
+
id: z.string(),
|
|
8555
|
+
type: z.literal("segment_removed" /* SegmentRemoved */),
|
|
8556
|
+
data: segmentMembershipDataZod
|
|
8503
8557
|
})
|
|
8504
8558
|
]);
|
|
8505
8559
|
|
|
@@ -9084,8 +9138,16 @@ import { z as z12 } from "zod";
|
|
|
9084
9138
|
var TextCustomerEventNames = /* @__PURE__ */ ((TextCustomerEventNames2) => {
|
|
9085
9139
|
TextCustomerEventNames2["EmailSet"] = "customer_email_set";
|
|
9086
9140
|
TextCustomerEventNames2["PropertiesValuesUpdated"] = "customer_properties_values_updated";
|
|
9141
|
+
TextCustomerEventNames2["SegmentAdded"] = "segment_added";
|
|
9142
|
+
TextCustomerEventNames2["SegmentRemoved"] = "segment_removed";
|
|
9087
9143
|
return TextCustomerEventNames2;
|
|
9088
9144
|
})(TextCustomerEventNames || {});
|
|
9145
|
+
var TextCustomerSegmentType = /* @__PURE__ */ ((TextCustomerSegmentType2) => {
|
|
9146
|
+
TextCustomerSegmentType2["Lead"] = "lead";
|
|
9147
|
+
TextCustomerSegmentType2["QualifiedLead"] = "qualified_lead";
|
|
9148
|
+
TextCustomerSegmentType2["Custom"] = "custom";
|
|
9149
|
+
return TextCustomerSegmentType2;
|
|
9150
|
+
})(TextCustomerSegmentType || {});
|
|
9089
9151
|
var textCustomerEventsZods = {
|
|
9090
9152
|
eventName: z12.nativeEnum(TextCustomerEventNames),
|
|
9091
9153
|
events: {
|
|
@@ -9101,12 +9163,22 @@ var textCustomerEventsZods = {
|
|
|
9101
9163
|
to: z12.union([z12.string(), z12.number(), z12.boolean()]).nullish()
|
|
9102
9164
|
})
|
|
9103
9165
|
).optional()
|
|
9166
|
+
}),
|
|
9167
|
+
segmentAdded: integrationEventBase.extend({
|
|
9168
|
+
name: z12.literal("segment_added" /* SegmentAdded */),
|
|
9169
|
+
segment_type: z12.nativeEnum(TextCustomerSegmentType)
|
|
9170
|
+
}),
|
|
9171
|
+
segmentRemoved: integrationEventBase.extend({
|
|
9172
|
+
name: z12.literal("segment_removed" /* SegmentRemoved */),
|
|
9173
|
+
segment_type: z12.nativeEnum(TextCustomerSegmentType)
|
|
9104
9174
|
})
|
|
9105
9175
|
},
|
|
9106
9176
|
get event() {
|
|
9107
9177
|
return z12.discriminatedUnion("name", [
|
|
9108
9178
|
this.events.emailSet,
|
|
9109
|
-
this.events.propertiesValuesUpdated
|
|
9179
|
+
this.events.propertiesValuesUpdated,
|
|
9180
|
+
this.events.segmentAdded,
|
|
9181
|
+
this.events.segmentRemoved
|
|
9110
9182
|
]);
|
|
9111
9183
|
},
|
|
9112
9184
|
get subscribe() {
|
|
@@ -9326,7 +9398,7 @@ var textLivechatEventsZods = {
|
|
|
9326
9398
|
}),
|
|
9327
9399
|
z14.object({
|
|
9328
9400
|
name: z14.literal("chat_message" /* ChatMessage */),
|
|
9329
|
-
version: z14.
|
|
9401
|
+
version: z14.enum(["v1", "v2"]),
|
|
9330
9402
|
filters: z14.array(z14.string()),
|
|
9331
9403
|
caseInsensitive: z14.boolean().optional(),
|
|
9332
9404
|
matchWholeWords: z14.boolean().optional()
|
|
@@ -9562,7 +9634,9 @@ function getIntegrationFlowUrl(name, flow, trigger, context, state, config) {
|
|
|
9562
9634
|
const serializedState = typeof state === "string" ? state : serializerBase64.serialize(state);
|
|
9563
9635
|
const serializedContext = serializerBase64.serialize(__spreadValues(__spreadValues({
|
|
9564
9636
|
state: serializedState,
|
|
9565
|
-
sessionId
|
|
9637
|
+
sessionId,
|
|
9638
|
+
ds: config.ds,
|
|
9639
|
+
theme: config.theme
|
|
9566
9640
|
}, trigger), context));
|
|
9567
9641
|
const isNotFullySupportedProvider = ["shopify" /* Shopify */].includes(
|
|
9568
9642
|
name
|
|
@@ -9766,6 +9840,7 @@ export {
|
|
|
9766
9840
|
SlackEventNames,
|
|
9767
9841
|
slackEventsZods,
|
|
9768
9842
|
TextCustomerEventNames,
|
|
9843
|
+
TextCustomerSegmentType,
|
|
9769
9844
|
textCustomerEventsZods,
|
|
9770
9845
|
TicketStatus,
|
|
9771
9846
|
TicketPriority,
|
|
@@ -9867,6 +9942,7 @@ export {
|
|
|
9867
9942
|
WorkflowTriggerType,
|
|
9868
9943
|
WorkflowManualTriggerSubType,
|
|
9869
9944
|
WorkflowManualTriggerSubTypeName,
|
|
9945
|
+
WorkflowInactivityReason,
|
|
9870
9946
|
TRIGGER_REFERENCE_NAME,
|
|
9871
9947
|
WorkflowExecutionStatus,
|
|
9872
9948
|
WorkflowExecutionDefinitionStatus,
|