@livechat/platform-workflows 0.0.66 → 0.0.68

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.js CHANGED
@@ -1842,7 +1842,7 @@ var import_react_router_dom27 = require("react-router-dom");
1842
1842
  // src/views/Flows/Definitions/index.tsx
1843
1843
  var import_react108 = require("react");
1844
1844
  var import_react_router_dom25 = require("react-router-dom");
1845
- var import_developer_studio_ui_react44 = require("@livechat/developer-studio-ui-react");
1845
+ var import_developer_studio_ui_react45 = require("@livechat/developer-studio-ui-react");
1846
1846
 
1847
1847
  // src/hooks/state/apps/apps.ts
1848
1848
  var import_react4 = require("react");
@@ -3318,7 +3318,7 @@ var bigcommerceTriggerTemplates = () => ({
3318
3318
 
3319
3319
  // src/views/Flows/Definitions/Mocks/HelpDesk/index.ts
3320
3320
  var import_developer_studio_api4 = require("@livechat/developer-studio-api");
3321
- var helpdeskTicketResponse = WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
3321
+ var helpdeskTicketResponse = {
3322
3322
  type: "object",
3323
3323
  properties: {
3324
3324
  ID: {
@@ -3396,7 +3396,7 @@ var helpdeskTicketResponse = WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
3396
3396
  }
3397
3397
  }
3398
3398
  }
3399
- });
3399
+ };
3400
3400
  var helpdeskTicketInput = {
3401
3401
  subject: {
3402
3402
  type: "string",
@@ -3533,26 +3533,34 @@ var helpdeskTaskConfigs = () => ({
3533
3533
  description: "Adds followers to an existing ticket."
3534
3534
  },
3535
3535
  specification: {
3536
- input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA({
3537
- type: "object",
3538
- required: ["id", "followers"],
3539
- properties: {
3540
- id: {
3541
- type: "string",
3542
- title: "Ticket ID",
3543
- description: `Ticket ID is the unique ID of a specific ticket. Use the Ticket ID variable or point to a specific ticket ID. You'll find the ID of a specific ticket in the "Ticket details" section of a ticket.`
3544
- },
3545
- followers: {
3546
- type: "array",
3547
- title: "Followers",
3548
- description: "The email of an agent who will be assigned as a ticket follower.",
3549
- items: {
3550
- type: "string"
3536
+ input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA(
3537
+ {
3538
+ type: "object",
3539
+ required: ["followers"],
3540
+ properties: {
3541
+ followers: {
3542
+ type: "array",
3543
+ title: "Followers",
3544
+ description: "The email of an agent who will be assigned as a ticket follower.",
3545
+ items: {
3546
+ type: "string"
3547
+ }
3548
+ }
3549
+ }
3550
+ },
3551
+ {
3552
+ type: "object",
3553
+ required: ["id"],
3554
+ properties: {
3555
+ id: {
3556
+ type: "string",
3557
+ title: "Ticket ID",
3558
+ description: `Ticket ID is the unique ID of a specific ticket. Use the Ticket ID variable or point to a specific ticket ID. You'll find the ID of a specific ticket in the "Ticket details" section of a ticket.`
3551
3559
  }
3552
3560
  }
3553
3561
  }
3554
- }),
3555
- output: helpdeskTicketResponse
3562
+ ),
3563
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA(helpdeskTicketResponse)
3556
3564
  }
3557
3565
  },
3558
3566
  ["HELPDESK_ADD_TAGS_TO_TICKET" /* AddTagsToTicket */]: {
@@ -3570,25 +3578,33 @@ var helpdeskTaskConfigs = () => ({
3570
3578
  description: "Adds tags to an existing ticket."
3571
3579
  },
3572
3580
  specification: {
3573
- input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA({
3574
- type: "object",
3575
- required: ["id", "tag_ids"],
3576
- properties: {
3577
- id: {
3578
- type: "string",
3579
- title: "Ticket ID",
3580
- description: `Ticket ID is the unique ID of a specific ticket. Use the Ticket ID variable or point to a specific ticket ID. You'll find the ID of a specific ticket in the "Ticket details" section of a ticket.`
3581
- },
3582
- tag_ids: {
3583
- type: "array",
3584
- title: "Tag IDs",
3585
- items: {
3586
- type: "string"
3581
+ input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA(
3582
+ {
3583
+ type: "object",
3584
+ required: ["tag_ids"],
3585
+ properties: {
3586
+ tag_ids: {
3587
+ type: "array",
3588
+ title: "Tag IDs",
3589
+ items: {
3590
+ type: "string"
3591
+ }
3592
+ }
3593
+ }
3594
+ },
3595
+ {
3596
+ type: "object",
3597
+ required: ["id"],
3598
+ properties: {
3599
+ id: {
3600
+ type: "string",
3601
+ title: "Ticket ID",
3602
+ description: `Ticket ID is the unique ID of a specific ticket. Use the Ticket ID variable or point to a specific ticket ID. You'll find the ID of a specific ticket in the "Ticket details" section of a ticket.`
3587
3603
  }
3588
3604
  }
3589
3605
  }
3590
- }),
3591
- output: helpdeskTicketResponse
3606
+ ),
3607
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA(helpdeskTicketResponse)
3592
3608
  }
3593
3609
  },
3594
3610
  ["HELPDESK_CREATE_TICKET" /* CreateTicket */]: {
@@ -3611,7 +3627,7 @@ var helpdeskTaskConfigs = () => ({
3611
3627
  required: ["subject", "requester", "message"],
3612
3628
  properties: helpdeskTicketInput
3613
3629
  }),
3614
- output: helpdeskTicketResponse
3630
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA(helpdeskTicketResponse)
3615
3631
  }
3616
3632
  },
3617
3633
  ["HELPDESK_CREATE_TRANSACTION" /* CreateTransaction */]: {
@@ -3727,7 +3743,7 @@ var helpdeskTaskConfigs = () => ({
3727
3743
  }
3728
3744
  }
3729
3745
  }),
3730
- output: helpdeskTicketResponse
3746
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA(helpdeskTicketResponse)
3731
3747
  }
3732
3748
  },
3733
3749
  ["HELPDESK_UPDATE_TICKET" /* UpdateTicket */]: {
@@ -3763,7 +3779,7 @@ var helpdeskTaskConfigs = () => ({
3763
3779
  }
3764
3780
  }
3765
3781
  ),
3766
- output: helpdeskTicketResponse
3782
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA(helpdeskTicketResponse)
3767
3783
  }
3768
3784
  }
3769
3785
  });
@@ -3794,6 +3810,22 @@ var helpdeskTaskTemplates = () => ({
3794
3810
  })
3795
3811
  })
3796
3812
  }),
3813
+ ["HELPDESK_UPDATE_TICKET" /* UpdateTicket */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
3814
+ name: "HELPDESK_UPDATE_TICKET" /* UpdateTicket */,
3815
+ taskReferenceName: "helpdesk_update_ticket",
3816
+ inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
3817
+ http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
3818
+ uri: `${getWorkflowsEnv(
3819
+ "workflowsApiUr"
3820
+ )}/functions/update-helpdesk-ticket?id=#{ticket_id}`,
3821
+ method: "PATCH",
3822
+ headers: {
3823
+ Accept: "application/json",
3824
+ "x-cred-access-token": "${workflow.credentials.text.access_token}"
3825
+ }
3826
+ })
3827
+ })
3828
+ }),
3797
3829
  ["HELPDESK_ADD_FOLLOWERS_TO_TICKET" /* AddFollowersToTicket */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
3798
3830
  name: "HELPDESK_ADD_FOLLOWERS_TO_TICKET" /* AddFollowersToTicket */,
3799
3831
  taskReferenceName: "helpdesk_add_followers_to_ticket",
@@ -3801,10 +3833,9 @@ var helpdeskTaskTemplates = () => ({
3801
3833
  http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
3802
3834
  uri: `${getWorkflowsEnv(
3803
3835
  "workflowsApiUr"
3804
- )}/functions/add-followers-to-helpdesk-ticket`,
3836
+ )}/functions/add-followers-to-helpdesk-ticket?id=#{ticket_id}`,
3805
3837
  method: "POST",
3806
3838
  body: {
3807
- id: "#{id}",
3808
3839
  followers: ["#{user_id}"]
3809
3840
  },
3810
3841
  headers: {
@@ -3821,10 +3852,9 @@ var helpdeskTaskTemplates = () => ({
3821
3852
  http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
3822
3853
  uri: `${getWorkflowsEnv(
3823
3854
  "workflowsApiUr"
3824
- )}/functions/add-tags-to-helpdesk-ticket`,
3855
+ )}/functions/add-tags-to-helpdesk-ticket?id=#{ticket_id}`,
3825
3856
  method: "POST",
3826
3857
  body: {
3827
- id: "#{id}",
3828
3858
  tag_ids: ["#{tag_id}"]
3829
3859
  },
3830
3860
  headers: {
@@ -3869,22 +3899,6 @@ var helpdeskTaskTemplates = () => ({
3869
3899
  }
3870
3900
  })
3871
3901
  })
3872
- }),
3873
- ["HELPDESK_UPDATE_TICKET" /* UpdateTicket */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
3874
- name: "HELPDESK_UPDATE_TICKET" /* UpdateTicket */,
3875
- taskReferenceName: "helpdesk_update_ticket",
3876
- inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
3877
- http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
3878
- uri: `${getWorkflowsEnv(
3879
- "workflowsApiUr"
3880
- )}/functions/update-helpdesk-ticket?id=#{ticket_id}`,
3881
- method: "PATCH",
3882
- headers: {
3883
- Accept: "application/json",
3884
- "x-cred-access-token": "${workflow.credentials.text.access_token}"
3885
- }
3886
- })
3887
- })
3888
3902
  })
3889
3903
  });
3890
3904
  var TextHelpDeskTriggerNames = {
@@ -20413,6 +20427,7 @@ var Edit_default2 = EditWorkflow;
20413
20427
 
20414
20428
  // src/views/Flows/Definitions/List/index.tsx
20415
20429
  var import_react_router_dom24 = require("react-router-dom");
20430
+ var import_developer_studio_ui_react44 = require("@livechat/developer-studio-ui-react");
20416
20431
 
20417
20432
  // src/views/Flows/Templates/Common/Modals/Preview/index.tsx
20418
20433
  var import_react96 = require("react");
@@ -23114,17 +23129,11 @@ var View_default2 = WorkflowListView;
23114
23129
 
23115
23130
  // src/views/Flows/Definitions/List/index.tsx
23116
23131
  function WorkflowList() {
23117
- return /* @__PURE__ */ jsxs2(Fragment4, { children: [
23132
+ return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react44.Row, { noMaxWidth: true, noWrap: true, notPadded: true, stretch: true, children: [
23118
23133
  /* @__PURE__ */ jsx2(View_default2, {}),
23119
23134
  /* @__PURE__ */ jsxs2(import_react_router_dom24.Routes, { children: [
23120
23135
  /* @__PURE__ */ jsx2(import_react_router_dom24.Route, { element: /* @__PURE__ */ jsx2(Preview_default2, {}), path: "preview/:template" }),
23121
- /* @__PURE__ */ jsx2(
23122
- import_react_router_dom24.Route,
23123
- {
23124
- element: /* @__PURE__ */ jsx2(Create_default, {}),
23125
- path: "create/*"
23126
- }
23127
- ),
23136
+ /* @__PURE__ */ jsx2(import_react_router_dom24.Route, { element: /* @__PURE__ */ jsx2(Create_default, {}), path: "create/*" }),
23128
23137
  /* @__PURE__ */ jsx2(import_react_router_dom24.Route, { element: /* @__PURE__ */ jsx2(Details_default, {}), path: ":id/*" })
23129
23138
  ] })
23130
23139
  ] });
@@ -23135,7 +23144,7 @@ var List_default2 = WorkflowList;
23135
23144
  var import_jsx_runtime117 = require("react/jsx-runtime");
23136
23145
  function Workflows() {
23137
23146
  const navigate = (0, import_react_router_dom25.useNavigate)();
23138
- const { user, isUserFetching } = (0, import_developer_studio_ui_react44.useUserContext)();
23147
+ const { user, isUserFetching } = (0, import_developer_studio_ui_react45.useUserContext)();
23139
23148
  const { data: userHasInstalledWorkflows, isLoading: isWorkflowAppLoading } = useFetchUserInstalledWorkflows(user);
23140
23149
  (0, import_react108.useEffect)(() => {
23141
23150
  if (isUserFetching || isWorkflowAppLoading) {
@@ -23151,7 +23160,7 @@ function Workflows() {
23151
23160
  userHasInstalledWorkflows
23152
23161
  ]);
23153
23162
  if (isUserFetching || isWorkflowAppLoading) {
23154
- return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_developer_studio_ui_react44.Loader, { stretch: true });
23163
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_developer_studio_ui_react45.Loader, { stretch: true });
23155
23164
  }
23156
23165
  return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_react_router_dom25.Routes, { children: [
23157
23166
  /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react_router_dom25.Route, { element: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react_router_dom25.Navigate, { replace: true, to: "list" }), path: "" }),
@@ -23166,7 +23175,7 @@ var import_react109 = require("react");
23166
23175
  var import_react_router_dom26 = require("react-router-dom");
23167
23176
  var import_design_system_icons40 = require("@livechat/design-system-icons");
23168
23177
  var import_design_system_react_components82 = require("@livechat/design-system-react-components");
23169
- var import_developer_studio_ui_react45 = require("@livechat/developer-studio-ui-react");
23178
+ var import_developer_studio_ui_react46 = require("@livechat/developer-studio-ui-react");
23170
23179
  var infoCss = css`
23171
23180
  display: flex;
23172
23181
  gap: var(${import_design_system_react_components82.SpacingToken.Spacing2});
@@ -23192,7 +23201,7 @@ var imgContainerCss2 = css`
23192
23201
  }
23193
23202
  `;
23194
23203
  function Waitlist({ image }) {
23195
- const { user, isUserFetching } = (0, import_developer_studio_ui_react45.useUserContext)();
23204
+ const { user, isUserFetching } = (0, import_developer_studio_ui_react46.useUserContext)();
23196
23205
  const { data: userHasInstalledWorkflows, isLoading: isWorkflowsAppLoading } = useFetchUserInstalledWorkflows(user);
23197
23206
  const navigate = (0, import_react_router_dom26.useNavigate)();
23198
23207
  (0, import_react109.useEffect)(() => {
@@ -23201,16 +23210,16 @@ function Waitlist({ image }) {
23201
23210
  }
23202
23211
  }, [userHasInstalledWorkflows, navigate]);
23203
23212
  if (isUserFetching || isWorkflowsAppLoading) {
23204
- return /* @__PURE__ */ jsx2(import_developer_studio_ui_react45.Loader, { stretch: true });
23213
+ return /* @__PURE__ */ jsx2(import_developer_studio_ui_react46.Loader, { stretch: true });
23205
23214
  }
23206
- return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react45.View, { children: [
23207
- /* @__PURE__ */ jsx2(import_developer_studio_ui_react45.Row, { noMaxWidth: true, topMargin: true, verticalCenter: true, children: /* @__PURE__ */ jsx2(import_developer_studio_ui_react45.Column, { center: true, children: /* @__PURE__ */ jsx2(
23208
- import_developer_studio_ui_react45.Intro,
23215
+ return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react46.View, { children: [
23216
+ /* @__PURE__ */ jsx2(import_developer_studio_ui_react46.Row, { noMaxWidth: true, topMargin: true, verticalCenter: true, children: /* @__PURE__ */ jsx2(import_developer_studio_ui_react46.Column, { center: true, children: /* @__PURE__ */ jsx2(
23217
+ import_developer_studio_ui_react46.Intro,
23209
23218
  {
23210
23219
  body: "No-code setup to streamline tasks you would otherwise do manually",
23211
23220
  center: true,
23212
- header: /* @__PURE__ */ jsx2(import_developer_studio_ui_react45.Column, { notPadded: true, stretch: true, width: 4, children: /* @__PURE__ */ jsx2(
23213
- import_developer_studio_ui_react45.Row,
23221
+ header: /* @__PURE__ */ jsx2(import_developer_studio_ui_react46.Column, { notPadded: true, stretch: true, width: 4, children: /* @__PURE__ */ jsx2(
23222
+ import_developer_studio_ui_react46.Row,
23214
23223
  {
23215
23224
  center: true,
23216
23225
  gap: `var(${import_design_system_react_components82.SpacingToken.Spacing2})`,
@@ -23222,7 +23231,7 @@ function Waitlist({ image }) {
23222
23231
  noMaxWidth: true
23223
23232
  }
23224
23233
  ) }) }),
23225
- /* @__PURE__ */ jsxs2(import_developer_studio_ui_react45.Row, { gap: 8, noMaxWidth: true, topMargin: true, verticalCenter: true, children: [
23234
+ /* @__PURE__ */ jsxs2(import_developer_studio_ui_react46.Row, { gap: 8, noMaxWidth: true, topMargin: true, verticalCenter: true, children: [
23226
23235
  /* @__PURE__ */ jsx2(
23227
23236
  import_design_system_react_components82.Button,
23228
23237
  {
@@ -23249,7 +23258,7 @@ function Waitlist({ image }) {
23249
23258
  }
23250
23259
  )
23251
23260
  ] }),
23252
- /* @__PURE__ */ jsxs2(import_developer_studio_ui_react45.Row, { gap: 8, lowMargin: true, noMaxWidth: true, topMargin: true, verticalCenter: true, children: [
23261
+ /* @__PURE__ */ jsxs2(import_developer_studio_ui_react46.Row, { gap: 8, lowMargin: true, noMaxWidth: true, topMargin: true, verticalCenter: true, children: [
23253
23262
  /* @__PURE__ */ jsxs2(import_design_system_react_components82.Text, { css: infoCss, size: "lg", children: [
23254
23263
  /* @__PURE__ */ jsx2(import_design_system_react_components82.Icon, { source: import_design_system_icons40.CheckCircle }),
23255
23264
  "integrated with popular platforms"
@@ -23263,7 +23272,7 @@ function Waitlist({ image }) {
23263
23272
  "build with ready-made blocks"
23264
23273
  ] })
23265
23274
  ] }),
23266
- /* @__PURE__ */ jsx2(import_developer_studio_ui_react45.Row, { center: true, noMaxWidth: true, verticalCenter: true, children: /* @__PURE__ */ jsx2("div", { css: imgContainerCss2, children: image }) })
23275
+ /* @__PURE__ */ jsx2(import_developer_studio_ui_react46.Row, { center: true, noMaxWidth: true, verticalCenter: true, children: /* @__PURE__ */ jsx2("div", { css: imgContainerCss2, children: image }) })
23267
23276
  ] });
23268
23277
  }
23269
23278
  var Waitlist_default = Waitlist;
package/dist/index.mjs CHANGED
@@ -3323,7 +3323,7 @@ import {
3323
3323
  TextHelpDeskEventNames,
3324
3324
  WorkflowDefinitionTaskType as WorkflowDefinitionTaskType3
3325
3325
  } from "@livechat/developer-studio-api";
3326
- var helpdeskTicketResponse = WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
3326
+ var helpdeskTicketResponse = {
3327
3327
  type: "object",
3328
3328
  properties: {
3329
3329
  ID: {
@@ -3401,7 +3401,7 @@ var helpdeskTicketResponse = WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
3401
3401
  }
3402
3402
  }
3403
3403
  }
3404
- });
3404
+ };
3405
3405
  var helpdeskTicketInput = {
3406
3406
  subject: {
3407
3407
  type: "string",
@@ -3538,26 +3538,34 @@ var helpdeskTaskConfigs = () => ({
3538
3538
  description: "Adds followers to an existing ticket."
3539
3539
  },
3540
3540
  specification: {
3541
- input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA({
3542
- type: "object",
3543
- required: ["id", "followers"],
3544
- properties: {
3545
- id: {
3546
- type: "string",
3547
- title: "Ticket ID",
3548
- description: `Ticket ID is the unique ID of a specific ticket. Use the Ticket ID variable or point to a specific ticket ID. You'll find the ID of a specific ticket in the "Ticket details" section of a ticket.`
3549
- },
3550
- followers: {
3551
- type: "array",
3552
- title: "Followers",
3553
- description: "The email of an agent who will be assigned as a ticket follower.",
3554
- items: {
3555
- type: "string"
3541
+ input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA(
3542
+ {
3543
+ type: "object",
3544
+ required: ["followers"],
3545
+ properties: {
3546
+ followers: {
3547
+ type: "array",
3548
+ title: "Followers",
3549
+ description: "The email of an agent who will be assigned as a ticket follower.",
3550
+ items: {
3551
+ type: "string"
3552
+ }
3553
+ }
3554
+ }
3555
+ },
3556
+ {
3557
+ type: "object",
3558
+ required: ["id"],
3559
+ properties: {
3560
+ id: {
3561
+ type: "string",
3562
+ title: "Ticket ID",
3563
+ description: `Ticket ID is the unique ID of a specific ticket. Use the Ticket ID variable or point to a specific ticket ID. You'll find the ID of a specific ticket in the "Ticket details" section of a ticket.`
3556
3564
  }
3557
3565
  }
3558
3566
  }
3559
- }),
3560
- output: helpdeskTicketResponse
3567
+ ),
3568
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA(helpdeskTicketResponse)
3561
3569
  }
3562
3570
  },
3563
3571
  ["HELPDESK_ADD_TAGS_TO_TICKET" /* AddTagsToTicket */]: {
@@ -3575,25 +3583,33 @@ var helpdeskTaskConfigs = () => ({
3575
3583
  description: "Adds tags to an existing ticket."
3576
3584
  },
3577
3585
  specification: {
3578
- input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA({
3579
- type: "object",
3580
- required: ["id", "tag_ids"],
3581
- properties: {
3582
- id: {
3583
- type: "string",
3584
- title: "Ticket ID",
3585
- description: `Ticket ID is the unique ID of a specific ticket. Use the Ticket ID variable or point to a specific ticket ID. You'll find the ID of a specific ticket in the "Ticket details" section of a ticket.`
3586
- },
3587
- tag_ids: {
3588
- type: "array",
3589
- title: "Tag IDs",
3590
- items: {
3591
- type: "string"
3586
+ input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA(
3587
+ {
3588
+ type: "object",
3589
+ required: ["tag_ids"],
3590
+ properties: {
3591
+ tag_ids: {
3592
+ type: "array",
3593
+ title: "Tag IDs",
3594
+ items: {
3595
+ type: "string"
3596
+ }
3597
+ }
3598
+ }
3599
+ },
3600
+ {
3601
+ type: "object",
3602
+ required: ["id"],
3603
+ properties: {
3604
+ id: {
3605
+ type: "string",
3606
+ title: "Ticket ID",
3607
+ description: `Ticket ID is the unique ID of a specific ticket. Use the Ticket ID variable or point to a specific ticket ID. You'll find the ID of a specific ticket in the "Ticket details" section of a ticket.`
3592
3608
  }
3593
3609
  }
3594
3610
  }
3595
- }),
3596
- output: helpdeskTicketResponse
3611
+ ),
3612
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA(helpdeskTicketResponse)
3597
3613
  }
3598
3614
  },
3599
3615
  ["HELPDESK_CREATE_TICKET" /* CreateTicket */]: {
@@ -3616,7 +3632,7 @@ var helpdeskTaskConfigs = () => ({
3616
3632
  required: ["subject", "requester", "message"],
3617
3633
  properties: helpdeskTicketInput
3618
3634
  }),
3619
- output: helpdeskTicketResponse
3635
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA(helpdeskTicketResponse)
3620
3636
  }
3621
3637
  },
3622
3638
  ["HELPDESK_CREATE_TRANSACTION" /* CreateTransaction */]: {
@@ -3732,7 +3748,7 @@ var helpdeskTaskConfigs = () => ({
3732
3748
  }
3733
3749
  }
3734
3750
  }),
3735
- output: helpdeskTicketResponse
3751
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA(helpdeskTicketResponse)
3736
3752
  }
3737
3753
  },
3738
3754
  ["HELPDESK_UPDATE_TICKET" /* UpdateTicket */]: {
@@ -3768,7 +3784,7 @@ var helpdeskTaskConfigs = () => ({
3768
3784
  }
3769
3785
  }
3770
3786
  ),
3771
- output: helpdeskTicketResponse
3787
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA(helpdeskTicketResponse)
3772
3788
  }
3773
3789
  }
3774
3790
  });
@@ -3799,6 +3815,22 @@ var helpdeskTaskTemplates = () => ({
3799
3815
  })
3800
3816
  })
3801
3817
  }),
3818
+ ["HELPDESK_UPDATE_TICKET" /* UpdateTicket */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
3819
+ name: "HELPDESK_UPDATE_TICKET" /* UpdateTicket */,
3820
+ taskReferenceName: "helpdesk_update_ticket",
3821
+ inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
3822
+ http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
3823
+ uri: `${getWorkflowsEnv(
3824
+ "workflowsApiUr"
3825
+ )}/functions/update-helpdesk-ticket?id=#{ticket_id}`,
3826
+ method: "PATCH",
3827
+ headers: {
3828
+ Accept: "application/json",
3829
+ "x-cred-access-token": "${workflow.credentials.text.access_token}"
3830
+ }
3831
+ })
3832
+ })
3833
+ }),
3802
3834
  ["HELPDESK_ADD_FOLLOWERS_TO_TICKET" /* AddFollowersToTicket */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
3803
3835
  name: "HELPDESK_ADD_FOLLOWERS_TO_TICKET" /* AddFollowersToTicket */,
3804
3836
  taskReferenceName: "helpdesk_add_followers_to_ticket",
@@ -3806,10 +3838,9 @@ var helpdeskTaskTemplates = () => ({
3806
3838
  http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
3807
3839
  uri: `${getWorkflowsEnv(
3808
3840
  "workflowsApiUr"
3809
- )}/functions/add-followers-to-helpdesk-ticket`,
3841
+ )}/functions/add-followers-to-helpdesk-ticket?id=#{ticket_id}`,
3810
3842
  method: "POST",
3811
3843
  body: {
3812
- id: "#{id}",
3813
3844
  followers: ["#{user_id}"]
3814
3845
  },
3815
3846
  headers: {
@@ -3826,10 +3857,9 @@ var helpdeskTaskTemplates = () => ({
3826
3857
  http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
3827
3858
  uri: `${getWorkflowsEnv(
3828
3859
  "workflowsApiUr"
3829
- )}/functions/add-tags-to-helpdesk-ticket`,
3860
+ )}/functions/add-tags-to-helpdesk-ticket?id=#{ticket_id}`,
3830
3861
  method: "POST",
3831
3862
  body: {
3832
- id: "#{id}",
3833
3863
  tag_ids: ["#{tag_id}"]
3834
3864
  },
3835
3865
  headers: {
@@ -3874,22 +3904,6 @@ var helpdeskTaskTemplates = () => ({
3874
3904
  }
3875
3905
  })
3876
3906
  })
3877
- }),
3878
- ["HELPDESK_UPDATE_TICKET" /* UpdateTicket */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
3879
- name: "HELPDESK_UPDATE_TICKET" /* UpdateTicket */,
3880
- taskReferenceName: "helpdesk_update_ticket",
3881
- inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
3882
- http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
3883
- uri: `${getWorkflowsEnv(
3884
- "workflowsApiUr"
3885
- )}/functions/update-helpdesk-ticket?id=#{ticket_id}`,
3886
- method: "PATCH",
3887
- headers: {
3888
- Accept: "application/json",
3889
- "x-cred-access-token": "${workflow.credentials.text.access_token}"
3890
- }
3891
- })
3892
- })
3893
3907
  })
3894
3908
  });
3895
3909
  var TextHelpDeskTriggerNames = {
@@ -20794,6 +20808,7 @@ var Edit_default2 = EditWorkflow;
20794
20808
 
20795
20809
  // src/views/Flows/Definitions/List/index.tsx
20796
20810
  import { Route as Route4, Routes as Routes4 } from "react-router-dom";
20811
+ import { Row as Row24 } from "@livechat/developer-studio-ui-react";
20797
20812
 
20798
20813
  // src/views/Flows/Templates/Common/Modals/Preview/index.tsx
20799
20814
  import { useMemo as useMemo7 } from "react";
@@ -23159,9 +23174,7 @@ import {
23159
23174
  DesignToken as DesignToken43,
23160
23175
  SpacingToken as SpacingToken46
23161
23176
  } from "@livechat/design-system-react-components";
23162
- import {
23163
- mergeDeep as mergeDeep2
23164
- } from "@livechat/developer-studio-api";
23177
+ import { mergeDeep as mergeDeep2 } from "@livechat/developer-studio-api";
23165
23178
  import {
23166
23179
  Column as Column19,
23167
23180
  Intro as Intro4,
@@ -23611,17 +23624,11 @@ var View_default2 = WorkflowListView;
23611
23624
 
23612
23625
  // src/views/Flows/Definitions/List/index.tsx
23613
23626
  function WorkflowList() {
23614
- return /* @__PURE__ */ jsxs2(Fragment4, { children: [
23627
+ return /* @__PURE__ */ jsxs2(Row24, { noMaxWidth: true, noWrap: true, notPadded: true, stretch: true, children: [
23615
23628
  /* @__PURE__ */ jsx2(View_default2, {}),
23616
23629
  /* @__PURE__ */ jsxs2(Routes4, { children: [
23617
23630
  /* @__PURE__ */ jsx2(Route4, { element: /* @__PURE__ */ jsx2(Preview_default2, {}), path: "preview/:template" }),
23618
- /* @__PURE__ */ jsx2(
23619
- Route4,
23620
- {
23621
- element: /* @__PURE__ */ jsx2(Create_default, {}),
23622
- path: "create/*"
23623
- }
23624
- ),
23631
+ /* @__PURE__ */ jsx2(Route4, { element: /* @__PURE__ */ jsx2(Create_default, {}), path: "create/*" }),
23625
23632
  /* @__PURE__ */ jsx2(Route4, { element: /* @__PURE__ */ jsx2(Details_default, {}), path: ":id/*" })
23626
23633
  ] })
23627
23634
  ] });
@@ -23673,7 +23680,7 @@ import {
23673
23680
  Column as Column20,
23674
23681
  Intro as Intro5,
23675
23682
  Loader as Loader6,
23676
- Row as Row24,
23683
+ Row as Row25,
23677
23684
  useUserContext as useUserContext13,
23678
23685
  View as View3
23679
23686
  } from "@livechat/developer-studio-ui-react";
@@ -23714,13 +23721,13 @@ function Waitlist({ image }) {
23714
23721
  return /* @__PURE__ */ jsx2(Loader6, { stretch: true });
23715
23722
  }
23716
23723
  return /* @__PURE__ */ jsxs2(View3, { children: [
23717
- /* @__PURE__ */ jsx2(Row24, { noMaxWidth: true, topMargin: true, verticalCenter: true, children: /* @__PURE__ */ jsx2(Column20, { center: true, children: /* @__PURE__ */ jsx2(
23724
+ /* @__PURE__ */ jsx2(Row25, { noMaxWidth: true, topMargin: true, verticalCenter: true, children: /* @__PURE__ */ jsx2(Column20, { center: true, children: /* @__PURE__ */ jsx2(
23718
23725
  Intro5,
23719
23726
  {
23720
23727
  body: "No-code setup to streamline tasks you would otherwise do manually",
23721
23728
  center: true,
23722
23729
  header: /* @__PURE__ */ jsx2(Column20, { notPadded: true, stretch: true, width: 4, children: /* @__PURE__ */ jsx2(
23723
- Row24,
23730
+ Row25,
23724
23731
  {
23725
23732
  center: true,
23726
23733
  gap: `var(${SpacingToken47.Spacing2})`,
@@ -23732,7 +23739,7 @@ function Waitlist({ image }) {
23732
23739
  noMaxWidth: true
23733
23740
  }
23734
23741
  ) }) }),
23735
- /* @__PURE__ */ jsxs2(Row24, { gap: 8, noMaxWidth: true, topMargin: true, verticalCenter: true, children: [
23742
+ /* @__PURE__ */ jsxs2(Row25, { gap: 8, noMaxWidth: true, topMargin: true, verticalCenter: true, children: [
23736
23743
  /* @__PURE__ */ jsx2(
23737
23744
  Button35,
23738
23745
  {
@@ -23759,7 +23766,7 @@ function Waitlist({ image }) {
23759
23766
  }
23760
23767
  )
23761
23768
  ] }),
23762
- /* @__PURE__ */ jsxs2(Row24, { gap: 8, lowMargin: true, noMaxWidth: true, topMargin: true, verticalCenter: true, children: [
23769
+ /* @__PURE__ */ jsxs2(Row25, { gap: 8, lowMargin: true, noMaxWidth: true, topMargin: true, verticalCenter: true, children: [
23763
23770
  /* @__PURE__ */ jsxs2(Text23, { css: infoCss, size: "lg", children: [
23764
23771
  /* @__PURE__ */ jsx2(Icon39, { source: CheckCircle2 }),
23765
23772
  "integrated with popular platforms"
@@ -23773,7 +23780,7 @@ function Waitlist({ image }) {
23773
23780
  "build with ready-made blocks"
23774
23781
  ] })
23775
23782
  ] }),
23776
- /* @__PURE__ */ jsx2(Row24, { center: true, noMaxWidth: true, verticalCenter: true, children: /* @__PURE__ */ jsx2("div", { css: imgContainerCss2, children: image }) })
23783
+ /* @__PURE__ */ jsx2(Row25, { center: true, noMaxWidth: true, verticalCenter: true, children: /* @__PURE__ */ jsx2("div", { css: imgContainerCss2, children: image }) })
23777
23784
  ] });
23778
23785
  }
23779
23786
  var Waitlist_default = Waitlist;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/platform-workflows",
3
- "version": "0.0.66",
3
+ "version": "0.0.68",
4
4
  "description": "Text Platform | Workflows",
5
5
  "author": "Wojciech Dudek",
6
6
  "license": "MIT",
@@ -48,8 +48,8 @@
48
48
  "esbuild-sass-plugin": "^3.2.0",
49
49
  "tsup": "^8.0.0",
50
50
  "typescript": "^5.1.6",
51
- "tsconfig": "0.0.1",
52
- "eslint-config-custom": "0.0.10"
51
+ "eslint-config-custom": "0.0.10",
52
+ "tsconfig": "0.0.1"
53
53
  },
54
54
  "dependencies": {
55
55
  "@amplitude/analytics-browser": "^2.11.9",