@engyalo/workflow-types 1.5.0 → 1.5.1-main-2330d81

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.
@@ -204,6 +204,142 @@ export interface CustomAgentV2 {
204
204
  audioTranscription?: ICustomAgentV2AudioTranscription;
205
205
  brandGuidelines?: string;
206
206
  }
207
+ interface IOrisTextCustomer {
208
+ id: string;
209
+ storefront: string;
210
+ }
211
+ interface IOrisTextLocale {
212
+ language: string;
213
+ region: string;
214
+ }
215
+ interface IOrisTextTransitionLogic {
216
+ type: 'menu' | 'human' | 'error' | 'custom';
217
+ description?: string;
218
+ redirectionStep: number;
219
+ redirectionStepUid?: string;
220
+ }
221
+ interface IOrisTextEnabledToggle {
222
+ enabled?: boolean;
223
+ }
224
+ interface IOrisTextAudioTranscription {
225
+ advancedLanguageModelEnabled?: boolean;
226
+ hints?: string;
227
+ }
228
+ interface IOrisTextOrderTakingTransitionLogic {
229
+ type: 'confirmation';
230
+ redirectionStep: number;
231
+ redirectionStepUid?: string;
232
+ }
233
+ interface IOrisTextClosingQuestions {
234
+ enabled?: boolean;
235
+ customInstructions?: string;
236
+ }
237
+ interface IOrisTextAutoAssumeProductGivenHistory {
238
+ enabled?: boolean;
239
+ minFrequency?: number;
240
+ }
241
+ interface IOrisTextOrderTakingData {
242
+ customGuidelines?: string;
243
+ closingQuestions?: IOrisTextClosingQuestions;
244
+ transitionLogics?: IOrisTextOrderTakingTransitionLogic[];
245
+ assumeQuantity?: boolean;
246
+ silenceFillerEnabled?: boolean;
247
+ autoAssumeProductGivenHistory?: IOrisTextAutoAssumeProductGivenHistory;
248
+ maxProductOptions?: number;
249
+ showImages?: IOrisTextEnabledToggle;
250
+ showLists?: IOrisTextEnabledToggle;
251
+ }
252
+ interface IOrisTextSuggestedOrderData {
253
+ customGuidelines?: string;
254
+ enabledSmartCartSuggestion?: boolean;
255
+ enableImage?: boolean;
256
+ showCatalogLink?: boolean;
257
+ suggestionMode?: 'active' | 'passive';
258
+ silenceFillerEnabled?: boolean;
259
+ }
260
+ interface IOrisTextCrossSellData {
261
+ customGuidelines?: string;
262
+ description?: string;
263
+ skus?: string[];
264
+ }
265
+ interface IOrisTextUpSellData {
266
+ customGuidelines?: string;
267
+ description?: string;
268
+ fallbackMinutes: number;
269
+ enableImage?: boolean;
270
+ type?: 'sku' | 'promotion';
271
+ skus?: string[];
272
+ enableSmartSuggestion?: boolean;
273
+ promotionIds?: string[];
274
+ sourcePriority?: ('smart' | 'cart_eligible' | 'gmv')[];
275
+ characterization?: IOrisTextEnabledToggle;
276
+ }
277
+ interface IOrisTextShowCatalogData {
278
+ customGuidelines?: string;
279
+ }
280
+ interface IOrisTextShowPastOrdersData {
281
+ customGuidelines?: string;
282
+ }
283
+ interface IOrisTextShowPromotionsData {
284
+ customGuidelines?: string;
285
+ presentationType?: 'text' | 'carousel';
286
+ }
287
+ interface IOrisTextCustomResponseData {
288
+ referenceId?: string;
289
+ name?: string;
290
+ triggerInstructions: string;
291
+ prompt: string;
292
+ }
293
+ interface IOrisTextFollowUpData {
294
+ referenceId: string;
295
+ customGuidelines: string;
296
+ firstFollowUp: number;
297
+ secondFollowUp: number;
298
+ schedule?: Record<string, string>;
299
+ timezone: string;
300
+ }
301
+ export type IOrisTextSkill = {
302
+ type: 'order_taking';
303
+ data: IOrisTextOrderTakingData;
304
+ } | {
305
+ type: 'suggested_order';
306
+ data: IOrisTextSuggestedOrderData;
307
+ } | {
308
+ type: 'cross_sell';
309
+ data: IOrisTextCrossSellData;
310
+ } | {
311
+ type: 'up_sell';
312
+ data: IOrisTextUpSellData;
313
+ } | {
314
+ type: 'show_catalog';
315
+ data: IOrisTextShowCatalogData;
316
+ } | {
317
+ type: 'show_past_orders';
318
+ data: IOrisTextShowPastOrdersData;
319
+ } | {
320
+ type: 'show_promotions';
321
+ data: IOrisTextShowPromotionsData;
322
+ } | {
323
+ type: 'custom_response';
324
+ data: IOrisTextCustomResponseData;
325
+ } | {
326
+ type: 'follow_up';
327
+ data: IOrisTextFollowUpData;
328
+ };
329
+ export type IOrisTextSource = 'mirror' | 'editor';
330
+ export interface OrisText {
331
+ source: IOrisTextSource;
332
+ objective?: string;
333
+ customer?: IOrisTextCustomer;
334
+ transitionLogics?: IOrisTextTransitionLogic[];
335
+ skills?: IOrisTextSkill[];
336
+ defaultLocale?: IOrisTextLocale;
337
+ enableQuickReply?: boolean;
338
+ showCatalogLink?: boolean;
339
+ showOutOfStock?: IOrisTextEnabledToggle;
340
+ largeCatalog?: IOrisTextEnabledToggle;
341
+ audioTranscription?: IOrisTextAudioTranscription;
342
+ }
207
343
  export interface FaqAgent {
208
344
  systemPrompt: string;
209
345
  fallbackMessage: string;
@@ -351,6 +487,7 @@ export interface IComponent {
351
487
  ai?: IAi;
352
488
  customAgent?: CustomAgent;
353
489
  customAgentV2?: CustomAgentV2;
490
+ orisText?: OrisText;
354
491
  voiceUpsellAgent?: VoiceUpsellAgent;
355
492
  AITrainer?: IAiTrainer;
356
493
  knowledgeGenie?: IKnowledgeGenie;
@@ -1 +1 @@
1
- {"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/models/components.ts"],"names":[],"mappings":";;;AAKA,oDAAoD;AACpD,IAAY,cAwBX;AAxBD,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;IACnB,6CAA2B,CAAA;IAC3B,iDAA+B,CAAA;IAC/B,uDAAqC,CAAA;IACrC,yCAAuB,CAAA;IACvB,uDAAqC,CAAA;IACrC,qCAAmB,CAAA;IACnB,uCAAqB,CAAA;AACtB,CAAC,EAxBW,cAAc,8BAAd,cAAc,QAwBzB;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;IACd,aAAa;IACb,eAAe;IACf,kBAAkB;IAClB,WAAW;IACX,kBAAkB;IAClB,SAAS;IACT,UAAU;CACV,CAAC;AA0mBF,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"}
1
+ {"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/models/components.ts"],"names":[],"mappings":";;;AAKA,oDAAoD;AACpD,IAAY,cAwBX;AAxBD,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;IACnB,6CAA2B,CAAA;IAC3B,iDAA+B,CAAA;IAC/B,uDAAqC,CAAA;IACrC,yCAAuB,CAAA;IACvB,uDAAqC,CAAA;IACrC,qCAAmB,CAAA;IACnB,uCAAqB,CAAA;AACtB,CAAC,EAxBW,cAAc,8BAAd,cAAc,QAwBzB;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;IACd,aAAa;IACb,eAAe;IACf,kBAAkB;IAClB,WAAW;IACX,kBAAkB;IAClB,SAAS;IACT,UAAU;CACV,CAAC;AAqwBF,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"}
@@ -3,7 +3,7 @@ export { IGeneralStatus } from './status';
3
3
  export { TriggerTypes, ITriggers } from './triggers';
4
4
  export { IWorkflow, IWorkflowCreatePayload, IWorkflowCreateRespose, IWorkflowUpdatePayload, IWorkflowUpdateResponse, IWorkflowDeletePayload, IWorkflowDeleteResponse } from './workflows';
5
5
  export { IActivity, IActivityRelease, IActivityEvent } from './activities';
6
- export { IComponent, IComponentLight, IComponentConfig, IActionUI, IReactionUI, IReminderUI, ITriggersUI, ISourceUI, IContentUI, IContentThenUI, ComponentTypeEnum, IComponentType, LinkComponent, LinkItem, IEventUI, CustomVoiceAgent, OrisVoice, CustomAgent, CustomAgentV2, VoiceUpsellAgent, FaqAgent, } from './components';
6
+ export { IComponent, IComponentLight, IComponentConfig, IActionUI, IReactionUI, IReminderUI, ITriggersUI, ISourceUI, IContentUI, IContentThenUI, ComponentTypeEnum, IComponentType, LinkComponent, LinkItem, IEventUI, CustomVoiceAgent, OrisVoice, CustomAgent, CustomAgentV2, OrisText, IOrisTextSkill, IOrisTextSource, VoiceUpsellAgent, FaqAgent, } from './components';
7
7
  export { IChannel, IFacebookChannel, IWhatsAppChannel } from './channel';
8
8
  export { IReaction, ITrigger, IAction } from './step';
9
9
  export { IUser, IAccessUserLog } from './users';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;AAAA,mCAAmH;AAAjG,+FAAA,KAAK,OAAA;AAAmC,oGAAA,UAAU,OAAA;AAAc,wGAAA,cAAc,OAAA;AAChG,mCAA0C;AAAjC,wGAAA,cAAc,OAAA;AACvB,uCAAqD;AAA5C,wGAAA,YAAY,OAAA;AAGrB,2CAsBsB;AAXrB,+GAAA,iBAAiB,OAAA;AACjB,4GAAA,cAAc,OAAA;AAiBf,uCAeoB;AAXnB,2GAAA,eAAe,OAAA;AACf,kHAAA,sBAAsB,OAAA;AACtB,kHAAA,sBAAsB,OAAA;AACtB,yHAAA,6BAA6B,OAAA;AAC7B,kHAAA,sBAAsB,OAAA;AACtB,8GAAA,kBAAkB,OAAA;AAClB,gHAAA,oBAAoB,OAAA;AACpB,gHAAA,oBAAoB,OAAA;AACpB,mHAAA,uBAAuB,OAAA;AACvB,+GAAA,mBAAmB,OAAA;AACnB,gHAAA,oBAAoB,OAAA;AAGrB,mCAA+E;AAA/C,sGAAA,YAAY,OAAA;AAC5C,2DAAgK;AAAvJ,2HAAA,qBAAqB,OAAA;AAE9B,mDAAsE;AAA9C,qHAAA,mBAAmB,OAAA;AAE3C,mDAA0I;AAAjI,mHAAA,iBAAiB,OAAA;AAAsB,kHAAA,gBAAgB,OAAA;AAAqB,qHAAA,mBAAmB,OAAA;AAGxG,qDAAmK;AAAlF,mHAAA,gBAAgB,OAAA;AAAoB,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,yBAAyB,OAAA"}
package/package.json CHANGED
@@ -1,106 +1,106 @@
1
1
  {
2
- "name": "@engyalo/workflow-types",
3
- "version": "1.5.0",
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": "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.14",
85
- "@types/jest-json-schema": "6.1.5",
86
- "@types/node": "16.18.126",
87
- "@typescript-eslint/eslint-plugin": "6.10.0",
88
- "@typescript-eslint/parser": "6.10.0",
89
- "eslint": "8.57.1",
90
- "eslint-config-prettier": "10.1.8",
91
- "eslint-plugin-import": "2.32.0",
92
- "eslint-plugin-prettier": "5.5.5",
93
- "jest": "29.7.0",
94
- "jest-json-schema": "6.1.0",
95
- "prettier": "3.8.3",
96
- "ts-jest": "29.4.11",
97
- "typescript": "5.2.2",
98
- "typescript-json-schema": "0.62.0"
99
- },
100
- "dependencies": {
101
- "zod": "3.22.4"
102
- },
103
- "overrides": {
104
- "cross-spawn": "7.0.6"
105
- }
106
- }
2
+ "name": "@engyalo/workflow-types",
3
+ "version": "1.5.1-main-2330d81",
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": "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.14",
85
+ "@types/jest-json-schema": "6.1.5",
86
+ "@types/node": "16.18.126",
87
+ "@typescript-eslint/eslint-plugin": "6.10.0",
88
+ "@typescript-eslint/parser": "6.10.0",
89
+ "eslint": "8.57.1",
90
+ "eslint-config-prettier": "10.1.8",
91
+ "eslint-plugin-import": "2.32.0",
92
+ "eslint-plugin-prettier": "5.5.5",
93
+ "jest": "29.7.0",
94
+ "jest-json-schema": "6.1.0",
95
+ "prettier": "3.8.3",
96
+ "ts-jest": "29.4.11",
97
+ "typescript": "5.2.2",
98
+ "typescript-json-schema": "0.62.0"
99
+ },
100
+ "dependencies": {
101
+ "zod": "3.22.4"
102
+ },
103
+ "overrides": {
104
+ "cross-spawn": "7.0.6"
105
+ }
106
+ }