@livechat/developer-studio-api 5.8.0 → 5.11.0
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-H3W6SG7M.mjs → chunk-QGX7NFQO.mjs} +81 -7
- package/dist/{events-yWjeW2vl.d.mts → events-N02veirY.d.mts} +681 -68
- package/dist/{events-yWjeW2vl.d.ts → events-N02veirY.d.ts} +681 -68
- package/dist/index.d.mts +419 -17
- package/dist/index.d.ts +419 -17
- package/dist/index.js +83 -7
- 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 +66 -6
- package/dist/workflow-contracts.mjs +3 -1
- package/package.json +2 -2
|
@@ -147,7 +147,8 @@ var WorkflowCustomTaskName = {
|
|
|
147
147
|
script: `${WorkflowTaskType.inline}_SCRIPT`,
|
|
148
148
|
// JQ TRANSFORM
|
|
149
149
|
convert: `${WorkflowTaskType.transform}_CONVERT`,
|
|
150
|
-
construct: `${WorkflowTaskType.transform}_CONSTRUCT
|
|
150
|
+
construct: `${WorkflowTaskType.transform}_CONSTRUCT`,
|
|
151
|
+
lookup: `${WorkflowTaskType.transform}_LOOKUP`
|
|
151
152
|
};
|
|
152
153
|
var WorkflowExecutionTaskStatus = /* @__PURE__ */ ((WorkflowExecutionTaskStatus2) => {
|
|
153
154
|
WorkflowExecutionTaskStatus2["Completed"] = "COMPLETED";
|
|
@@ -264,13 +265,21 @@ var WorkflowTriggerType = {
|
|
|
264
265
|
// src/apis/integrations/text/platform/workflow/workflows/_contracts/dtos/triggers/manual.ts
|
|
265
266
|
var WorkflowManualTriggerSubType = {
|
|
266
267
|
forSelectedChat: "for_selected_chat",
|
|
267
|
-
forSelectedTicket: "for_selected_ticket"
|
|
268
|
+
forSelectedTicket: "for_selected_ticket",
|
|
269
|
+
forSelectedCustomer: "for_selected_customer"
|
|
268
270
|
};
|
|
269
271
|
var WorkflowManualTriggerSubTypeName = {
|
|
270
272
|
[WorkflowManualTriggerSubType.forSelectedChat]: "text-livechat-manual",
|
|
271
|
-
[WorkflowManualTriggerSubType.forSelectedTicket]: "text-helpdesk-manual"
|
|
273
|
+
[WorkflowManualTriggerSubType.forSelectedTicket]: "text-helpdesk-manual",
|
|
274
|
+
[WorkflowManualTriggerSubType.forSelectedCustomer]: "text-manual"
|
|
272
275
|
};
|
|
273
276
|
|
|
277
|
+
// src/apis/integrations/text/platform/workflow/workflows/_contracts/dtos/workflow.ts
|
|
278
|
+
var WorkflowInactivityReason = /* @__PURE__ */ ((WorkflowInactivityReason2) => {
|
|
279
|
+
WorkflowInactivityReason2["OwnerRemoved"] = "owner_removed";
|
|
280
|
+
return WorkflowInactivityReason2;
|
|
281
|
+
})(WorkflowInactivityReason || {});
|
|
282
|
+
|
|
274
283
|
// src/apis/integrations/text/platform/workflow/workflows/_contracts/dtos/workflowElement.ts
|
|
275
284
|
var TRIGGER_REFERENCE_NAME = "trigger";
|
|
276
285
|
|
|
@@ -3822,6 +3831,7 @@ var getUrl5 = (segments = [], version) => buildUrlFromSegments(
|
|
|
3822
3831
|
);
|
|
3823
3832
|
var urls7 = {
|
|
3824
3833
|
getWorkflows: (queryParams) => enrichUrlWithQueryParams(getUrl5([], "v1.0" /* V1 */), queryParams),
|
|
3834
|
+
getAiAgentSkillsSummary: () => getUrl5(["ai_agent", "skills", "summary"], "v1.0" /* V1 */),
|
|
3825
3835
|
createWorkflow: () => getUrl5(),
|
|
3826
3836
|
getWorkflow: (id) => getUrl5([id], "v1.0" /* V1 */),
|
|
3827
3837
|
updateWorkflow: (id) => getUrl5([id]),
|
|
@@ -3855,6 +3865,17 @@ var textPlatformWorkflowsApi = {
|
|
|
3855
3865
|
return workflows;
|
|
3856
3866
|
});
|
|
3857
3867
|
},
|
|
3868
|
+
getAiAgentSkillsSummary(authorization) {
|
|
3869
|
+
return __async(this, null, function* () {
|
|
3870
|
+
const { data } = yield textClientInstance.get(
|
|
3871
|
+
urls7.getAiAgentSkillsSummary(),
|
|
3872
|
+
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3873
|
+
ensureAuthorizationToken: true
|
|
3874
|
+
}))
|
|
3875
|
+
);
|
|
3876
|
+
return data;
|
|
3877
|
+
});
|
|
3878
|
+
},
|
|
3858
3879
|
getWorkflow(workflowId, version, authorization) {
|
|
3859
3880
|
return __async(this, null, function* () {
|
|
3860
3881
|
const searchParams = new URLSearchParams();
|
|
@@ -7484,7 +7505,7 @@ var livechatBotsTemplatesApi = {
|
|
|
7484
7505
|
};
|
|
7485
7506
|
|
|
7486
7507
|
// src/apis/products/livechat/configuration/properties/api.ts
|
|
7487
|
-
var API_BASE_URL = "/v3.
|
|
7508
|
+
var API_BASE_URL = "/v3.6/configuration/action";
|
|
7488
7509
|
var livechatPropertyApi = {
|
|
7489
7510
|
getProperties(clientId, isAgent, authorization) {
|
|
7490
7511
|
return __async(this, null, function* () {
|
|
@@ -8491,6 +8512,8 @@ import { z } from "zod";
|
|
|
8491
8512
|
var CdpCustomerEventType = /* @__PURE__ */ ((CdpCustomerEventType2) => {
|
|
8492
8513
|
CdpCustomerEventType2["EmailSet"] = "customer_email_set";
|
|
8493
8514
|
CdpCustomerEventType2["PropertiesValuesUpdated"] = "customer_properties_values_updated";
|
|
8515
|
+
CdpCustomerEventType2["SegmentAdded"] = "segment_added";
|
|
8516
|
+
CdpCustomerEventType2["SegmentRemoved"] = "segment_removed";
|
|
8494
8517
|
return CdpCustomerEventType2;
|
|
8495
8518
|
})(CdpCustomerEventType || {});
|
|
8496
8519
|
var customerMetadataZod = z.object({
|
|
@@ -8498,6 +8521,15 @@ var customerMetadataZod = z.object({
|
|
|
8498
8521
|
customer_id: z.string(),
|
|
8499
8522
|
master_id: z.string()
|
|
8500
8523
|
});
|
|
8524
|
+
var segmentMembershipDataZod = customerMetadataZod.extend({
|
|
8525
|
+
segment_id: z.number(),
|
|
8526
|
+
segment_type: z.string(),
|
|
8527
|
+
membership_last_updated_at: z.string(),
|
|
8528
|
+
segment_fields: z.object({
|
|
8529
|
+
email: z.string().optional(),
|
|
8530
|
+
customer_properties: z.record(z.unknown()).optional()
|
|
8531
|
+
}).passthrough().optional()
|
|
8532
|
+
}).passthrough();
|
|
8501
8533
|
var cdpCustomerEventMessageZod = z.discriminatedUnion("type", [
|
|
8502
8534
|
z.object({
|
|
8503
8535
|
id: z.string(),
|
|
@@ -8519,6 +8551,16 @@ var cdpCustomerEventMessageZod = z.discriminatedUnion("type", [
|
|
|
8519
8551
|
}).passthrough()
|
|
8520
8552
|
)
|
|
8521
8553
|
}).passthrough()
|
|
8554
|
+
}),
|
|
8555
|
+
z.object({
|
|
8556
|
+
id: z.string(),
|
|
8557
|
+
type: z.literal("segment_added" /* SegmentAdded */),
|
|
8558
|
+
data: segmentMembershipDataZod
|
|
8559
|
+
}),
|
|
8560
|
+
z.object({
|
|
8561
|
+
id: z.string(),
|
|
8562
|
+
type: z.literal("segment_removed" /* SegmentRemoved */),
|
|
8563
|
+
data: segmentMembershipDataZod
|
|
8522
8564
|
})
|
|
8523
8565
|
]);
|
|
8524
8566
|
|
|
@@ -9103,8 +9145,16 @@ import { z as z12 } from "zod";
|
|
|
9103
9145
|
var TextCustomerEventNames = /* @__PURE__ */ ((TextCustomerEventNames2) => {
|
|
9104
9146
|
TextCustomerEventNames2["EmailSet"] = "customer_email_set";
|
|
9105
9147
|
TextCustomerEventNames2["PropertiesValuesUpdated"] = "customer_properties_values_updated";
|
|
9148
|
+
TextCustomerEventNames2["SegmentAdded"] = "segment_added";
|
|
9149
|
+
TextCustomerEventNames2["SegmentRemoved"] = "segment_removed";
|
|
9106
9150
|
return TextCustomerEventNames2;
|
|
9107
9151
|
})(TextCustomerEventNames || {});
|
|
9152
|
+
var TextCustomerSegmentType = /* @__PURE__ */ ((TextCustomerSegmentType2) => {
|
|
9153
|
+
TextCustomerSegmentType2["Lead"] = "lead";
|
|
9154
|
+
TextCustomerSegmentType2["QualifiedLead"] = "qualified_lead";
|
|
9155
|
+
TextCustomerSegmentType2["Custom"] = "custom";
|
|
9156
|
+
return TextCustomerSegmentType2;
|
|
9157
|
+
})(TextCustomerSegmentType || {});
|
|
9108
9158
|
var textCustomerEventsZods = {
|
|
9109
9159
|
eventName: z12.nativeEnum(TextCustomerEventNames),
|
|
9110
9160
|
events: {
|
|
@@ -9120,12 +9170,22 @@ var textCustomerEventsZods = {
|
|
|
9120
9170
|
to: z12.union([z12.string(), z12.number(), z12.boolean()]).nullish()
|
|
9121
9171
|
})
|
|
9122
9172
|
).optional()
|
|
9173
|
+
}),
|
|
9174
|
+
segmentAdded: integrationEventBase.extend({
|
|
9175
|
+
name: z12.literal("segment_added" /* SegmentAdded */),
|
|
9176
|
+
segment_type: z12.nativeEnum(TextCustomerSegmentType)
|
|
9177
|
+
}),
|
|
9178
|
+
segmentRemoved: integrationEventBase.extend({
|
|
9179
|
+
name: z12.literal("segment_removed" /* SegmentRemoved */),
|
|
9180
|
+
segment_type: z12.nativeEnum(TextCustomerSegmentType)
|
|
9123
9181
|
})
|
|
9124
9182
|
},
|
|
9125
9183
|
get event() {
|
|
9126
9184
|
return z12.discriminatedUnion("name", [
|
|
9127
9185
|
this.events.emailSet,
|
|
9128
|
-
this.events.propertiesValuesUpdated
|
|
9186
|
+
this.events.propertiesValuesUpdated,
|
|
9187
|
+
this.events.segmentAdded,
|
|
9188
|
+
this.events.segmentRemoved
|
|
9129
9189
|
]);
|
|
9130
9190
|
},
|
|
9131
9191
|
get subscribe() {
|
|
@@ -9294,6 +9354,8 @@ var TextLivechatEventNames = /* @__PURE__ */ ((TextLivechatEventNames2) => {
|
|
|
9294
9354
|
TextLivechatEventNames2["CustomerLeftChat"] = "customer_left_chat";
|
|
9295
9355
|
TextLivechatEventNames2["ChatIdle"] = "chat_idle";
|
|
9296
9356
|
TextLivechatEventNames2["ProductCardEvent"] = "product_card_event";
|
|
9357
|
+
TextLivechatEventNames2["FormFilled"] = "form_filled";
|
|
9358
|
+
TextLivechatEventNames2["CustomFormFilled"] = "custom_form_filled";
|
|
9297
9359
|
return TextLivechatEventNames2;
|
|
9298
9360
|
})(TextLivechatEventNames || {});
|
|
9299
9361
|
var CustomerLeftChatReason = /* @__PURE__ */ ((CustomerLeftChatReason2) => {
|
|
@@ -9345,7 +9407,7 @@ var textLivechatEventsZods = {
|
|
|
9345
9407
|
}),
|
|
9346
9408
|
z14.object({
|
|
9347
9409
|
name: z14.literal("chat_message" /* ChatMessage */),
|
|
9348
|
-
version: z14.
|
|
9410
|
+
version: z14.enum(["v1", "v2"]),
|
|
9349
9411
|
filters: z14.array(z14.string()),
|
|
9350
9412
|
caseInsensitive: z14.boolean().optional(),
|
|
9351
9413
|
matchWholeWords: z14.boolean().optional()
|
|
@@ -9370,6 +9432,14 @@ var textLivechatEventsZods = {
|
|
|
9370
9432
|
name: z14.literal("product_card_event" /* ProductCardEvent */),
|
|
9371
9433
|
type: z14.nativeEnum(TextLivechatProductCardEventType),
|
|
9372
9434
|
product_id: z14.string().optional()
|
|
9435
|
+
}),
|
|
9436
|
+
formFilled: integrationEventBase.extend({
|
|
9437
|
+
name: z14.literal("form_filled" /* FormFilled */),
|
|
9438
|
+
form_id: z14.string().optional()
|
|
9439
|
+
}),
|
|
9440
|
+
customFormFilled: integrationEventBase.extend({
|
|
9441
|
+
name: z14.literal("custom_form_filled" /* CustomFormFilled */),
|
|
9442
|
+
form_id: z14.string().optional()
|
|
9373
9443
|
})
|
|
9374
9444
|
},
|
|
9375
9445
|
get event() {
|
|
@@ -9385,7 +9455,9 @@ var textLivechatEventsZods = {
|
|
|
9385
9455
|
this.events.userRemovedFromChat,
|
|
9386
9456
|
this.events.customerLeftChat,
|
|
9387
9457
|
this.events.chatIdle,
|
|
9388
|
-
this.events.productCardEvent
|
|
9458
|
+
this.events.productCardEvent,
|
|
9459
|
+
this.events.formFilled,
|
|
9460
|
+
this.events.customFormFilled
|
|
9389
9461
|
]);
|
|
9390
9462
|
},
|
|
9391
9463
|
get subscribe() {
|
|
@@ -9787,6 +9859,7 @@ export {
|
|
|
9787
9859
|
SlackEventNames,
|
|
9788
9860
|
slackEventsZods,
|
|
9789
9861
|
TextCustomerEventNames,
|
|
9862
|
+
TextCustomerSegmentType,
|
|
9790
9863
|
textCustomerEventsZods,
|
|
9791
9864
|
TicketStatus,
|
|
9792
9865
|
TicketPriority,
|
|
@@ -9888,6 +9961,7 @@ export {
|
|
|
9888
9961
|
WorkflowTriggerType,
|
|
9889
9962
|
WorkflowManualTriggerSubType,
|
|
9890
9963
|
WorkflowManualTriggerSubTypeName,
|
|
9964
|
+
WorkflowInactivityReason,
|
|
9891
9965
|
TRIGGER_REFERENCE_NAME,
|
|
9892
9966
|
WorkflowExecutionStatus,
|
|
9893
9967
|
WorkflowExecutionDefinitionStatus,
|