@engyalo/workflow-types 1.0.112 → 1.0.113-refactor-notification-step-type-4a8adf1

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.
@@ -237,27 +237,48 @@ export interface ICampaignAutomation {
237
237
  variables: IVariable[];
238
238
  }
239
239
  export interface ISchedulerConfig {
240
+ daysOfWeek?: string[];
240
241
  endDate?: string;
241
242
  name: string;
242
243
  runOn: string;
243
244
  schedule: string;
245
+ specificDate?: string;
244
246
  startDate?: string;
245
247
  timeUnit: string;
246
248
  timezone: string;
247
249
  }
250
+ export declare enum DaysOfWeek {
251
+ sunday = 0,
252
+ monday = 1,
253
+ tuesday = 2,
254
+ wednesday = 3,
255
+ thursday = 4,
256
+ friday = 5,
257
+ saturday = 6
258
+ }
259
+ export declare enum RunOnOptions {
260
+ everyDay = "everyDay",
261
+ specificDays = "specificDays",
262
+ specifyDate = "specifyDate"
263
+ }
248
264
  export interface IAudience {
249
265
  audienceId: string;
250
266
  callbackUrl: string;
251
267
  nextStepId?: number;
252
268
  schedulerConfig: ISchedulerConfig;
253
269
  }
270
+ interface INotificationParam {
271
+ name: string;
272
+ value?: string;
273
+ }
254
274
  export interface INotification {
255
275
  account: string;
256
276
  bot: string;
257
277
  template: string;
258
- templateVariables: IVariable[];
259
- hiddenTemplateVariables: IVariable[];
278
+ templateId: string;
279
+ templateParams: INotificationParam[];
280
+ hiddenTemplateParams: INotificationParam[];
260
281
  campaignStarter?: string;
261
- campaignStarterVariables?: IVariable[];
282
+ campaignStarterParams: INotificationParam[];
262
283
  }
263
284
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ComponentTypeEnum = exports.IComponentType = void 0;
3
+ exports.RunOnOptions = exports.DaysOfWeek = exports.ComponentTypeEnum = exports.IComponentType = void 0;
4
4
  // TODO: Move this enums to const with proper types.
5
5
  var IComponentType;
6
6
  (function (IComponentType) {
@@ -21,21 +21,21 @@ var IComponentType;
21
21
  IComponentType["step"] = "step";
22
22
  IComponentType["webhook"] = "webhook";
23
23
  })(IComponentType || (exports.IComponentType = IComponentType = {}));
24
- exports.ComponentTypeEnum = [
25
- 'start',
26
- 'step',
27
- 'scope',
28
- 'campaign',
29
- 'webhook',
30
- 'aistep',
31
- 'extension',
32
- 'genieTrainer',
33
- 'salesDesk',
34
- 'flow',
35
- 'knowledgeGenie',
36
- 'agent',
37
- 'campaignAutomation',
38
- 'audience',
39
- 'notification',
40
- ];
24
+ exports.ComponentTypeEnum = ['start', 'step', 'scope', 'campaign', 'webhook', 'aistep', 'extension', 'genieTrainer', 'salesDesk', 'flow', 'knowledgeGenie', 'agent', 'campaignAutomation', 'audience', 'notification'];
25
+ var DaysOfWeek;
26
+ (function (DaysOfWeek) {
27
+ DaysOfWeek[DaysOfWeek["sunday"] = 0] = "sunday";
28
+ DaysOfWeek[DaysOfWeek["monday"] = 1] = "monday";
29
+ DaysOfWeek[DaysOfWeek["tuesday"] = 2] = "tuesday";
30
+ DaysOfWeek[DaysOfWeek["wednesday"] = 3] = "wednesday";
31
+ DaysOfWeek[DaysOfWeek["thursday"] = 4] = "thursday";
32
+ DaysOfWeek[DaysOfWeek["friday"] = 5] = "friday";
33
+ DaysOfWeek[DaysOfWeek["saturday"] = 6] = "saturday";
34
+ })(DaysOfWeek || (exports.DaysOfWeek = DaysOfWeek = {}));
35
+ var RunOnOptions;
36
+ (function (RunOnOptions) {
37
+ RunOnOptions["everyDay"] = "everyDay";
38
+ RunOnOptions["specificDays"] = "specificDays";
39
+ RunOnOptions["specifyDate"] = "specifyDate";
40
+ })(RunOnOptions || (exports.RunOnOptions = RunOnOptions = {}));
41
41
  //# sourceMappingURL=components.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/models/components.ts"],"names":[],"mappings":";;;AAIA,oDAAoD;AACpD,IAAY,cAiBX;AAjBD,WAAY,cAAc;IACzB,uCAAqB,CAAA;IACrB,iCAAe,CAAA;IACf,mCAAiB,CAAA;IACjB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;IACrB,2DAAyC,CAAA;IACzC,yCAAuB,CAAA;IACvB,+BAAa,CAAA;IACb,+CAA6B,CAAA;IAC7B,mDAAiC,CAAA;IACjC,+CAA6B,CAAA;IAC7B,yCAAuB,CAAA;IACvB,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,+BAAa,CAAA;IACb,qCAAmB,CAAA;AACpB,CAAC,EAjBW,cAAc,8BAAd,cAAc,QAiBzB;AAEY,QAAA,iBAAiB,GAAG;IAChC,OAAO;IACP,MAAM;IACN,OAAO;IACP,UAAU;IACV,SAAS;IACT,QAAQ;IACR,WAAW;IACX,cAAc;IACd,WAAW;IACX,MAAM;IACN,gBAAgB;IAChB,OAAO;IACP,oBAAoB;IACpB,UAAU;IACV,cAAc;CACd,CAAC"}
1
+ {"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/models/components.ts"],"names":[],"mappings":";;;AAIA,oDAAoD;AACpD,IAAY,cAiBX;AAjBD,WAAY,cAAc;IACzB,uCAAqB,CAAA;IACrB,iCAAe,CAAA;IACf,mCAAiB,CAAA;IACjB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;IACrB,2DAAyC,CAAA;IACzC,yCAAuB,CAAA;IACvB,+BAAa,CAAA;IACb,+CAA6B,CAAA;IAC7B,mDAAiC,CAAA;IACjC,+CAA6B,CAAA;IAC7B,yCAAuB,CAAA;IACvB,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,+BAAa,CAAA;IACb,qCAAmB,CAAA;AACpB,CAAC,EAjBW,cAAc,8BAAd,cAAc,QAiBzB;AAEY,QAAA,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;AA4P5N,IAAY,UAQX;AARD,WAAY,UAAU;IACrB,+CAAU,CAAA;IACV,+CAAU,CAAA;IACV,iDAAW,CAAA;IACX,qDAAa,CAAA;IACb,mDAAY,CAAA;IACZ,+CAAU,CAAA;IACV,mDAAY,CAAA;AACb,CAAC,EARW,UAAU,0BAAV,UAAU,QAQrB;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACvB,qCAAqB,CAAA;IACrB,6CAA6B,CAAA;IAC7B,2CAA2B,CAAA;AAC5B,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB"}
package/package.json CHANGED
@@ -1,105 +1,105 @@
1
1
  {
2
- "name": "@engyalo/workflow-types",
3
- "version": "1.0.112",
4
- "description": "",
5
- "main": "./lib/index.js",
6
- "types": "./lib/index.d.ts",
7
- "scripts": {
8
- "lint": "eslint . --ext ts --fix",
9
- "tsc": "tsc --build",
10
- "clearjs": "npx rimraf ./lib",
11
- "pretest": "npx typescript-json-schema src/models/workflows.ts \"*\" --strictNullChecks --noExtraProps --required --id workflowsSchema -o tests/schemas/workflows.schema.json",
12
- "test": "jest",
13
- "prebuild": "npm run clearjs",
14
- "build": "npm run tsc"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "git@github.com:yalochat/worfklows-types.git"
19
- },
20
- "directories": {
21
- "lib": "lib"
22
- },
23
- "files": [
24
- "lib"
25
- ],
26
- "keywords": [
27
- "workflow",
28
- "types"
29
- ],
30
- "author": "Engineering @ Yalo",
31
- "license": "MIT",
32
- "eslintConfig": {
33
- "extends": [
34
- "plugin:@typescript-eslint/recommended",
35
- "plugin:prettier/recommended"
36
- ],
37
- "parser": "@typescript-eslint/parser",
38
- "rules": {
39
- "quotes": [
40
- 2,
41
- "single",
42
- "avoid-escape"
43
- ],
44
- "no-debugger": "error",
45
- "no-process-env": "off",
46
- "import/prefer-default-export": "off",
47
- "@typescript-eslint/explicit-function-return-type": "off",
48
- "@typescript-eslint/no-unused-vars": [
49
- "error",
50
- {
51
- "vars": "all",
52
- "args": "after-used",
53
- "ignoreRestSiblings": true
54
- }
55
- ],
56
- "new-cap": [
57
- "error",
58
- {
59
- "capIsNewExceptions": [
60
- "Injectable",
61
- "Inject"
62
- ]
63
- }
64
- ],
65
- "prefer-destructuring": [
66
- "error",
67
- {
68
- "VariableDeclarator": {
69
- "array": false,
70
- "object": true
71
- },
72
- "AssignmentExpression": {
73
- "array": true,
74
- "object": false
75
- }
76
- },
77
- {
78
- "enforceForRenamedProperties": false
79
- }
80
- ]
81
- }
82
- },
83
- "devDependencies": {
84
- "@types/jest": "29.5.8",
85
- "@types/jest-json-schema": "6.1.4",
86
- "@types/node": "^16.18.114",
87
- "@typescript-eslint/eslint-plugin": "6.10.0",
88
- "@typescript-eslint/parser": "6.10.0",
89
- "eslint": "8.53.0",
90
- "eslint-config-prettier": "9.0.0",
91
- "eslint-plugin-import": "2.29.0",
92
- "eslint-plugin-prettier": "5.0.1",
93
- "jest": "29.7.0",
94
- "jest-json-schema": "6.1.0",
95
- "prettier": "3.0.3",
96
- "ts-jest": "29.1.1",
97
- "typescript": "5.2.2"
98
- },
99
- "dependencies": {
100
- "zod": "3.22.4"
101
- },
102
- "overrides": {
103
- "cross-spawn": "7.0.6"
104
- }
105
- }
2
+ "name": "@engyalo/workflow-types",
3
+ "version": "1.0.113-refactor-notification-step-type-4a8adf1",
4
+ "description": "",
5
+ "main": "./lib/index.js",
6
+ "types": "./lib/index.d.ts",
7
+ "scripts": {
8
+ "lint": "eslint . --ext ts --fix",
9
+ "tsc": "tsc --build",
10
+ "clearjs": "npx rimraf ./lib",
11
+ "pretest": "npx typescript-json-schema src/models/workflows.ts \"*\" --strictNullChecks --noExtraProps --required --id workflowsSchema -o tests/schemas/workflows.schema.json",
12
+ "test": "jest",
13
+ "prebuild": "npm run clearjs",
14
+ "build": "npm run tsc"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git@github.com:yalochat/worfklows-types.git"
19
+ },
20
+ "directories": {
21
+ "lib": "lib"
22
+ },
23
+ "files": [
24
+ "lib"
25
+ ],
26
+ "keywords": [
27
+ "workflow",
28
+ "types"
29
+ ],
30
+ "author": "Engineering @ Yalo",
31
+ "license": "MIT",
32
+ "eslintConfig": {
33
+ "extends": [
34
+ "plugin:@typescript-eslint/recommended",
35
+ "plugin:prettier/recommended"
36
+ ],
37
+ "parser": "@typescript-eslint/parser",
38
+ "rules": {
39
+ "quotes": [
40
+ 2,
41
+ "single",
42
+ "avoid-escape"
43
+ ],
44
+ "no-debugger": "error",
45
+ "no-process-env": "off",
46
+ "import/prefer-default-export": "off",
47
+ "@typescript-eslint/explicit-function-return-type": "off",
48
+ "@typescript-eslint/no-unused-vars": [
49
+ "error",
50
+ {
51
+ "vars": "all",
52
+ "args": "after-used",
53
+ "ignoreRestSiblings": true
54
+ }
55
+ ],
56
+ "new-cap": [
57
+ "error",
58
+ {
59
+ "capIsNewExceptions": [
60
+ "Injectable",
61
+ "Inject"
62
+ ]
63
+ }
64
+ ],
65
+ "prefer-destructuring": [
66
+ "error",
67
+ {
68
+ "VariableDeclarator": {
69
+ "array": false,
70
+ "object": true
71
+ },
72
+ "AssignmentExpression": {
73
+ "array": true,
74
+ "object": false
75
+ }
76
+ },
77
+ {
78
+ "enforceForRenamedProperties": false
79
+ }
80
+ ]
81
+ }
82
+ },
83
+ "devDependencies": {
84
+ "@types/jest": "29.5.8",
85
+ "@types/jest-json-schema": "6.1.4",
86
+ "@types/node": "^16.18.114",
87
+ "@typescript-eslint/eslint-plugin": "6.10.0",
88
+ "@typescript-eslint/parser": "6.10.0",
89
+ "eslint": "8.53.0",
90
+ "eslint-config-prettier": "9.0.0",
91
+ "eslint-plugin-import": "2.29.0",
92
+ "eslint-plugin-prettier": "5.0.1",
93
+ "jest": "29.7.0",
94
+ "jest-json-schema": "6.1.0",
95
+ "prettier": "3.0.3",
96
+ "ts-jest": "29.1.1",
97
+ "typescript": "5.2.2"
98
+ },
99
+ "dependencies": {
100
+ "zod": "3.22.4"
101
+ },
102
+ "overrides": {
103
+ "cross-spawn": "7.0.6"
104
+ }
105
+ }