@livechat/developer-studio-api 3.1.63 → 3.2.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/index.d.mts CHANGED
@@ -399,24 +399,28 @@ interface GetTextPlatformDashboardReportParams {
399
399
 
400
400
  interface WorkflowsDto {
401
401
  id: string;
402
- version: number;
402
+ related_workflow_id?: string;
403
+ version?: number;
404
+ draft?: boolean;
403
405
  name: string;
404
406
  description: string;
405
- active: boolean;
407
+ active?: boolean;
406
408
  trigger_type: WorkflowTriggerType;
407
409
  created_by: string;
408
- tags: string[];
410
+ tags?: string[];
409
411
  }
410
412
  interface WorkflowDto {
411
413
  id: string;
412
- version: number;
414
+ version?: number;
415
+ draft?: boolean;
413
416
  name: string;
414
417
  description: string;
415
- active: boolean;
418
+ active?: boolean;
416
419
  created_at: string;
417
420
  updated_at: string;
418
421
  created_by: string;
419
- tags: string[];
422
+ related_workflow_id?: string;
423
+ tags?: string[];
420
424
  definition: WorkflowDefinitionDto;
421
425
  trigger?: WorkflowTriggerDto;
422
426
  }
@@ -519,6 +523,7 @@ interface WorkflowDefinitionsQueryParams {
519
523
  }
520
524
  interface UpsertWorkflowPayload {
521
525
  name: string;
526
+ draft?: boolean;
522
527
  description: string;
523
528
  trigger?: WorkflowTriggerDto;
524
529
  definition: WorkflowDefinitionDto;
@@ -6806,6 +6811,12 @@ declare const api: {
6806
6811
  version: number;
6807
6812
  }, any>>;
6808
6813
  deleteWorkflow(workflowId: string, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<void, any>>;
6814
+ createWorkflowDraft(workflowId: string, payload: UpsertWorkflowPayload, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<{
6815
+ id: string;
6816
+ }, any>>;
6817
+ publishWorkflowDraft(workflowId: string, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<{
6818
+ version: number;
6819
+ }, any>>;
6809
6820
  toggleWorkflowActivation(workflowId: string, isActive: boolean, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<void, any>>;
6810
6821
  executeWorkflow(workflowId: string, input: unknown, authorization?: PlatformClientAuthorization | undefined): Promise<{
6811
6822
  execution_id: string;
package/dist/index.d.ts CHANGED
@@ -399,24 +399,28 @@ interface GetTextPlatformDashboardReportParams {
399
399
 
400
400
  interface WorkflowsDto {
401
401
  id: string;
402
- version: number;
402
+ related_workflow_id?: string;
403
+ version?: number;
404
+ draft?: boolean;
403
405
  name: string;
404
406
  description: string;
405
- active: boolean;
407
+ active?: boolean;
406
408
  trigger_type: WorkflowTriggerType;
407
409
  created_by: string;
408
- tags: string[];
410
+ tags?: string[];
409
411
  }
410
412
  interface WorkflowDto {
411
413
  id: string;
412
- version: number;
414
+ version?: number;
415
+ draft?: boolean;
413
416
  name: string;
414
417
  description: string;
415
- active: boolean;
418
+ active?: boolean;
416
419
  created_at: string;
417
420
  updated_at: string;
418
421
  created_by: string;
419
- tags: string[];
422
+ related_workflow_id?: string;
423
+ tags?: string[];
420
424
  definition: WorkflowDefinitionDto;
421
425
  trigger?: WorkflowTriggerDto;
422
426
  }
@@ -519,6 +523,7 @@ interface WorkflowDefinitionsQueryParams {
519
523
  }
520
524
  interface UpsertWorkflowPayload {
521
525
  name: string;
526
+ draft?: boolean;
522
527
  description: string;
523
528
  trigger?: WorkflowTriggerDto;
524
529
  definition: WorkflowDefinitionDto;
@@ -6806,6 +6811,12 @@ declare const api: {
6806
6811
  version: number;
6807
6812
  }, any>>;
6808
6813
  deleteWorkflow(workflowId: string, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<void, any>>;
6814
+ createWorkflowDraft(workflowId: string, payload: UpsertWorkflowPayload, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<{
6815
+ id: string;
6816
+ }, any>>;
6817
+ publishWorkflowDraft(workflowId: string, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<{
6818
+ version: number;
6819
+ }, any>>;
6809
6820
  toggleWorkflowActivation(workflowId: string, isActive: boolean, authorization?: PlatformClientAuthorization | undefined): Promise<axios.AxiosResponse<void, any>>;
6810
6821
  executeWorkflow(workflowId: string, input: unknown, authorization?: PlatformClientAuthorization | undefined): Promise<{
6811
6822
  execution_id: string;
package/dist/index.js CHANGED
@@ -3702,6 +3702,27 @@ var textPlatformWorkflowsApi = {
3702
3702
  );
3703
3703
  });
3704
3704
  },
3705
+ createWorkflowDraft(workflowId, payload, authorization) {
3706
+ return __async(this, null, function* () {
3707
+ return textClientInstance.post(
3708
+ `/workflow_platform/workflows/${encodeURIComponent(workflowId)}/draft`,
3709
+ payload,
3710
+ getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
3711
+ ensureAuthorizationToken: true
3712
+ }))
3713
+ );
3714
+ });
3715
+ },
3716
+ publishWorkflowDraft(workflowId, authorization) {
3717
+ return __async(this, null, function* () {
3718
+ return textClientInstance.post(
3719
+ `/workflow_platform/workflows/${encodeURIComponent(workflowId)}/publish`,
3720
+ getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
3721
+ ensureAuthorizationToken: true
3722
+ }))
3723
+ );
3724
+ });
3725
+ },
3705
3726
  toggleWorkflowActivation(workflowId, isActive, authorization) {
3706
3727
  return __async(this, null, function* () {
3707
3728
  return textClientInstance.put(
package/dist/index.mjs CHANGED
@@ -3549,6 +3549,27 @@ var textPlatformWorkflowsApi = {
3549
3549
  );
3550
3550
  });
3551
3551
  },
3552
+ createWorkflowDraft(workflowId, payload, authorization) {
3553
+ return __async(this, null, function* () {
3554
+ return textClientInstance.post(
3555
+ `/workflow_platform/workflows/${encodeURIComponent(workflowId)}/draft`,
3556
+ payload,
3557
+ getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
3558
+ ensureAuthorizationToken: true
3559
+ }))
3560
+ );
3561
+ });
3562
+ },
3563
+ publishWorkflowDraft(workflowId, authorization) {
3564
+ return __async(this, null, function* () {
3565
+ return textClientInstance.post(
3566
+ `/workflow_platform/workflows/${encodeURIComponent(workflowId)}/publish`,
3567
+ getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
3568
+ ensureAuthorizationToken: true
3569
+ }))
3570
+ );
3571
+ });
3572
+ },
3552
3573
  toggleWorkflowActivation(workflowId, isActive, authorization) {
3553
3574
  return __async(this, null, function* () {
3554
3575
  return textClientInstance.put(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/developer-studio-api",
3
- "version": "3.1.63",
3
+ "version": "3.2.0",
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.8",
24
- "utils": "0.0.4",
25
- "tsconfig": "0.0.1"
24
+ "tsconfig": "0.0.1",
25
+ "utils": "0.0.4"
26
26
  },
27
27
  "scripts": {
28
28
  "build": "tsup",