@voiceflow/utils-designer 1.7.11 → 1.8.1
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/build/cjs/entity.util.d.ts +4 -4
- package/build/cjs/entity.util.d.ts.map +1 -1
- package/build/cjs/entity.util.js +3 -3
- package/build/cjs/intent.util.d.ts +4 -4
- package/build/cjs/main.d.ts +1 -0
- package/build/cjs/main.d.ts.map +1 -1
- package/build/cjs/main.js +1 -0
- package/build/cjs/variable.util.d.ts +23 -0
- package/build/cjs/variable.util.d.ts.map +1 -0
- package/build/cjs/variable.util.js +12 -0
- package/build/esm/entity.util.d.ts +4 -4
- package/build/esm/entity.util.d.ts.map +1 -1
- package/build/esm/entity.util.js +3 -3
- package/build/esm/intent.util.d.ts +4 -4
- package/build/esm/main.d.ts +1 -0
- package/build/esm/main.d.ts.map +1 -1
- package/build/esm/main.js +1 -0
- package/build/esm/variable.util.d.ts +23 -0
- package/build/esm/variable.util.d.ts.map +1 -0
- package/build/esm/variable.util.js +8 -0
- package/package.json +3 -3
@@ -24,13 +24,13 @@ export declare const entityVariantsValidator: import("./main").IValidatorWithCon
|
|
24
24
|
value: string;
|
25
25
|
id: string;
|
26
26
|
createdAt: string;
|
27
|
-
updatedAt: string;
|
28
|
-
updatedByID: number | null;
|
29
|
-
assistantID: string;
|
30
|
-
environmentID: string;
|
31
27
|
entityID: string;
|
32
28
|
language: "en-us";
|
33
29
|
synonyms: string[];
|
30
|
+
updatedAt?: string | undefined;
|
31
|
+
updatedByID?: number | null | undefined;
|
32
|
+
assistantID?: string | undefined;
|
33
|
+
environmentID?: string | undefined;
|
34
34
|
}, "value" | "synonyms">[], {
|
35
35
|
classifier: string | null;
|
36
36
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"entity.util.d.ts","sourceRoot":"","sources":["../../src/entity.util.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK/E,eAAO,MAAM,mBAAmB,UAAW,MAAM,GAAG,IAAI,YAAqD,CAAC;AAE9G,eAAO,MAAM,wBAAwB,wBAAyB,KAAK,aAAa,EAAE,OAAO,GAAG,UAAU,CAAC,YACxC,CAAC;AAEhE,eAAO,MAAM,2BAA2B,8DAA4C,CAAC;AAErF,eAAO,MAAM,+BAA+B;cACS,MAAM,EAAE;cAAY,MAAM,GAAG,IAAI;EAGrF,CAAC;AAEF,eAAO,MAAM,gCAAgC;eACA,QAAQ,EAAE;
|
1
|
+
{"version":3,"file":"entity.util.d.ts","sourceRoot":"","sources":["../../src/entity.util.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK/E,eAAO,MAAM,mBAAmB,UAAW,MAAM,GAAG,IAAI,YAAqD,CAAC;AAE9G,eAAO,MAAM,wBAAwB,wBAAyB,KAAK,aAAa,EAAE,OAAO,GAAG,UAAU,CAAC,YACxC,CAAC;AAEhE,eAAO,MAAM,2BAA2B,8DAA4C,CAAC;AAErF,eAAO,MAAM,+BAA+B;cACS,MAAM,EAAE;cAAY,MAAM,GAAG,IAAI;EAGrF,CAAC;AAEF,eAAO,MAAM,gCAAgC;eACA,QAAQ,EAAE;EAEtD,CAAC;AAEF,eAAO,MAAM,8BAA8B;aACF,MAAM,EAAE;EAEhD,CAAC;AAEF,eAAO,MAAM,mBAAmB;cAfqB,MAAM,EAAE;cAAY,MAAM,GAAG,IAAI;;eAMzC,QAAQ,EAAE;;aAKd,MAAM,EAAE;EAShD,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;gBACoD,MAAM,GAAG,IAAI;EAGpG,CAAC"}
|
package/build/cjs/entity.util.js
CHANGED
@@ -9,8 +9,8 @@ exports.isDefaultEntityName = isDefaultEntityName;
|
|
9
9
|
const isEntityVariantLikeEmpty = ({ value, synonyms }) => !value.trim() && synonyms.every((synonym) => !synonym.trim());
|
10
10
|
exports.isEntityVariantLikeEmpty = isEntityVariantLikeEmpty;
|
11
11
|
exports.entityNameSpellingValidator = (0, validator_util_1.validatorZodFactory)(dtos_1.EntityDTO.shape.name);
|
12
|
-
exports.entityNameUniqEntitiesValidator = (0, validator_util_1.validatorFactory)((name, { entities, entityID }) => entities.every((entity) => entity.id === entityID || entity.name
|
13
|
-
exports.entityNameUniqVariablesValidator = (0, validator_util_1.validatorFactory)((name, { variables }) => variables.every((variable) => variable.name
|
14
|
-
exports.entityNameUniqIntentsValidator = (0, validator_util_1.validatorFactory)((name, { intents }) => intents.every((intent) => intent.name
|
12
|
+
exports.entityNameUniqEntitiesValidator = (0, validator_util_1.validatorFactory)((name, { entities, entityID }) => entities.every((entity) => entity.id === entityID || entity.name !== name), () => `Entity name already exists.`);
|
13
|
+
exports.entityNameUniqVariablesValidator = (0, validator_util_1.validatorFactory)((name, { variables }) => variables.every((variable) => variable.name !== name), () => `Variable name already exists.`);
|
14
|
+
exports.entityNameUniqIntentsValidator = (0, validator_util_1.validatorFactory)((name, { intents }) => intents.every((intent) => intent.name !== name), () => `Intent name already exists.`);
|
15
15
|
exports.entityNameValidator = (0, validator_util_1.composeValidators)(exports.entityNameSpellingValidator, exports.entityNameUniqEntitiesValidator, exports.entityNameUniqVariablesValidator, exports.entityNameUniqIntentsValidator);
|
16
16
|
exports.entityVariantsValidator = (0, validator_util_1.validatorFactory)((variants, { classifier }) => classifier !== common_1.CUSTOM_SLOT_TYPE || variants.some(({ value }) => value.trim().length), 'Custom entities require at least one value.');
|
@@ -22,13 +22,13 @@ export declare const intentNameValidator: import("./main").IValidatorWithContext
|
|
22
22
|
export declare const intentUtterancesValidator: import("./main").IValidatorWithContext<Pick<{
|
23
23
|
id: string;
|
24
24
|
createdAt: string;
|
25
|
-
updatedAt: string;
|
26
|
-
updatedByID: number | null;
|
27
|
-
assistantID: string;
|
28
|
-
environmentID: string;
|
29
25
|
text: import("@voiceflow/dtos").UtteranceText;
|
30
26
|
language: "en-us";
|
31
27
|
intentID: string;
|
28
|
+
updatedAt?: string | undefined;
|
29
|
+
updatedByID?: number | null | undefined;
|
30
|
+
assistantID?: string | undefined;
|
31
|
+
environmentID?: string | undefined;
|
32
32
|
}, "id" | "text">[], {
|
33
33
|
isBuiltInIntent?: boolean | undefined;
|
34
34
|
}>;
|
package/build/cjs/main.d.ts
CHANGED
package/build/cjs/main.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC"}
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC"}
|
package/build/cjs/main.js
CHANGED
@@ -20,3 +20,4 @@ __exportStar(require("./markup.util"), exports);
|
|
20
20
|
__exportStar(require("./request.util"), exports);
|
21
21
|
__exportStar(require("./validator/validator.interface"), exports);
|
22
22
|
__exportStar(require("./validator/validator.util"), exports);
|
23
|
+
__exportStar(require("./variable.util"), exports);
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import type { Entity, Intent, Variable } from '@voiceflow/dtos';
|
2
|
+
import { SystemVariable } from '@voiceflow/dtos';
|
3
|
+
export declare const isSystemVariableName: (variableName: string) => variableName is SystemVariable;
|
4
|
+
export declare const variableNameSpellingValidator: (value: string) => import("./main").IValidatorResult<string>;
|
5
|
+
export declare const variableNameUniqVariablesValidator: import("./main").IValidatorWithContext<string, {
|
6
|
+
variables: Variable[];
|
7
|
+
variableID: string | null;
|
8
|
+
}>;
|
9
|
+
export declare const variableNameUniqEntitiesValidator: import("./main").IValidatorWithContext<string, {
|
10
|
+
entities: Entity[];
|
11
|
+
}>;
|
12
|
+
export declare const variableNameUniqIntentsValidator: import("./main").IValidatorWithContext<string, {
|
13
|
+
intents: Intent[];
|
14
|
+
}>;
|
15
|
+
export declare const variableNameValidator: import("./main").IValidatorWithContext<string, {
|
16
|
+
variables: Variable[];
|
17
|
+
variableID: string | null;
|
18
|
+
} & {
|
19
|
+
entities: Entity[];
|
20
|
+
} & {
|
21
|
+
intents: Intent[];
|
22
|
+
}>;
|
23
|
+
//# sourceMappingURL=variable.util.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"variable.util.d.ts","sourceRoot":"","sources":["../../src/variable.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAe,MAAM,iBAAiB,CAAC;AAI9D,eAAO,MAAM,oBAAoB,iBAAkB,MAAM,mCACe,CAAC;AAEzE,eAAO,MAAM,6BAA6B,8DAA8C,CAAC;AAEzF,eAAO,MAAM,kCAAkC;eACU,QAAQ,EAAE;gBAAc,MAAM,GAAG,IAAI;EAG7F,CAAC;AAEF,eAAO,MAAM,iCAAiC;cACH,MAAM,EAAE;EAElD,CAAC;AAEF,eAAO,MAAM,gCAAgC;aACJ,MAAM,EAAE;EAEhD,CAAC;AAEF,eAAO,MAAM,qBAAqB;eAfuB,QAAQ,EAAE;gBAAc,MAAM,GAAG,IAAI;;cAMnD,MAAM,EAAE;;aAKV,MAAM,EAAE;EAShD,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.variableNameValidator = exports.variableNameUniqIntentsValidator = exports.variableNameUniqEntitiesValidator = exports.variableNameUniqVariablesValidator = exports.variableNameSpellingValidator = exports.isSystemVariableName = void 0;
|
4
|
+
const dtos_1 = require("@voiceflow/dtos");
|
5
|
+
const validator_util_1 = require("./validator/validator.util");
|
6
|
+
const isSystemVariableName = (variableName) => Object.values(dtos_1.SystemVariable).includes(variableName);
|
7
|
+
exports.isSystemVariableName = isSystemVariableName;
|
8
|
+
exports.variableNameSpellingValidator = (0, validator_util_1.validatorZodFactory)(dtos_1.VariableDTO.shape.name);
|
9
|
+
exports.variableNameUniqVariablesValidator = (0, validator_util_1.validatorFactory)((name, { variables, variableID }) => variables.every((variable) => variable.id === variableID || variable.name !== name), () => `Variable name already exists.`);
|
10
|
+
exports.variableNameUniqEntitiesValidator = (0, validator_util_1.validatorFactory)((name, { entities }) => entities.every((entity) => entity.name !== name), () => `Entity name already exists.`);
|
11
|
+
exports.variableNameUniqIntentsValidator = (0, validator_util_1.validatorFactory)((name, { intents }) => intents.every((intent) => intent.name !== name), () => `Intent name already exists.`);
|
12
|
+
exports.variableNameValidator = (0, validator_util_1.composeValidators)(exports.variableNameSpellingValidator, exports.variableNameUniqVariablesValidator, exports.variableNameUniqEntitiesValidator, exports.variableNameUniqIntentsValidator);
|
@@ -24,13 +24,13 @@ export declare const entityVariantsValidator: import("./main.js").IValidatorWith
|
|
24
24
|
value: string;
|
25
25
|
id: string;
|
26
26
|
createdAt: string;
|
27
|
-
updatedAt: string;
|
28
|
-
updatedByID: number | null;
|
29
|
-
assistantID: string;
|
30
|
-
environmentID: string;
|
31
27
|
entityID: string;
|
32
28
|
language: "en-us";
|
33
29
|
synonyms: string[];
|
30
|
+
updatedAt?: string | undefined;
|
31
|
+
updatedByID?: number | null | undefined;
|
32
|
+
assistantID?: string | undefined;
|
33
|
+
environmentID?: string | undefined;
|
34
34
|
}, "value" | "synonyms">[], {
|
35
35
|
classifier: string | null;
|
36
36
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"entity.util.d.ts","sourceRoot":"","sources":["../../src/entity.util.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK/E,eAAO,MAAM,mBAAmB,UAAW,MAAM,GAAG,IAAI,YAAqD,CAAC;AAE9G,eAAO,MAAM,wBAAwB,wBAAyB,KAAK,aAAa,EAAE,OAAO,GAAG,UAAU,CAAC,YACxC,CAAC;AAEhE,eAAO,MAAM,2BAA2B,8DAA4C,CAAC;AAErF,eAAO,MAAM,+BAA+B;cACS,MAAM,EAAE;cAAY,MAAM,GAAG,IAAI;EAGrF,CAAC;AAEF,eAAO,MAAM,gCAAgC;eACA,QAAQ,EAAE;
|
1
|
+
{"version":3,"file":"entity.util.d.ts","sourceRoot":"","sources":["../../src/entity.util.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK/E,eAAO,MAAM,mBAAmB,UAAW,MAAM,GAAG,IAAI,YAAqD,CAAC;AAE9G,eAAO,MAAM,wBAAwB,wBAAyB,KAAK,aAAa,EAAE,OAAO,GAAG,UAAU,CAAC,YACxC,CAAC;AAEhE,eAAO,MAAM,2BAA2B,8DAA4C,CAAC;AAErF,eAAO,MAAM,+BAA+B;cACS,MAAM,EAAE;cAAY,MAAM,GAAG,IAAI;EAGrF,CAAC;AAEF,eAAO,MAAM,gCAAgC;eACA,QAAQ,EAAE;EAEtD,CAAC;AAEF,eAAO,MAAM,8BAA8B;aACF,MAAM,EAAE;EAEhD,CAAC;AAEF,eAAO,MAAM,mBAAmB;cAfqB,MAAM,EAAE;cAAY,MAAM,GAAG,IAAI;;eAMzC,QAAQ,EAAE;;aAKd,MAAM,EAAE;EAShD,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;gBACoD,MAAM,GAAG,IAAI;EAGpG,CAAC"}
|
package/build/esm/entity.util.js
CHANGED
@@ -4,8 +4,8 @@ import { composeValidators, validatorFactory, validatorZodFactory } from './vali
|
|
4
4
|
export const isDefaultEntityName = (name) => !name || name.toLowerCase().startsWith('entity');
|
5
5
|
export const isEntityVariantLikeEmpty = ({ value, synonyms }) => !value.trim() && synonyms.every((synonym) => !synonym.trim());
|
6
6
|
export const entityNameSpellingValidator = validatorZodFactory(EntityDTO.shape.name);
|
7
|
-
export const entityNameUniqEntitiesValidator = validatorFactory((name, { entities, entityID }) => entities.every((entity) => entity.id === entityID || entity.name
|
8
|
-
export const entityNameUniqVariablesValidator = validatorFactory((name, { variables }) => variables.every((variable) => variable.name
|
9
|
-
export const entityNameUniqIntentsValidator = validatorFactory((name, { intents }) => intents.every((intent) => intent.name
|
7
|
+
export const entityNameUniqEntitiesValidator = validatorFactory((name, { entities, entityID }) => entities.every((entity) => entity.id === entityID || entity.name !== name), () => `Entity name already exists.`);
|
8
|
+
export const entityNameUniqVariablesValidator = validatorFactory((name, { variables }) => variables.every((variable) => variable.name !== name), () => `Variable name already exists.`);
|
9
|
+
export const entityNameUniqIntentsValidator = validatorFactory((name, { intents }) => intents.every((intent) => intent.name !== name), () => `Intent name already exists.`);
|
10
10
|
export const entityNameValidator = composeValidators(entityNameSpellingValidator, entityNameUniqEntitiesValidator, entityNameUniqVariablesValidator, entityNameUniqIntentsValidator);
|
11
11
|
export const entityVariantsValidator = validatorFactory((variants, { classifier }) => classifier !== CUSTOM_SLOT_TYPE || variants.some(({ value }) => value.trim().length), 'Custom entities require at least one value.');
|
@@ -22,13 +22,13 @@ export declare const intentNameValidator: import("./main.js").IValidatorWithCont
|
|
22
22
|
export declare const intentUtterancesValidator: import("./main.js").IValidatorWithContext<Pick<{
|
23
23
|
id: string;
|
24
24
|
createdAt: string;
|
25
|
-
updatedAt: string;
|
26
|
-
updatedByID: number | null;
|
27
|
-
assistantID: string;
|
28
|
-
environmentID: string;
|
29
25
|
text: import("@voiceflow/dtos").UtteranceText;
|
30
26
|
language: "en-us";
|
31
27
|
intentID: string;
|
28
|
+
updatedAt?: string | undefined;
|
29
|
+
updatedByID?: number | null | undefined;
|
30
|
+
assistantID?: string | undefined;
|
31
|
+
environmentID?: string | undefined;
|
32
32
|
}, "id" | "text">[], {
|
33
33
|
isBuiltInIntent?: boolean | undefined;
|
34
34
|
}>;
|
package/build/esm/main.d.ts
CHANGED
package/build/esm/main.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC"}
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC"}
|
package/build/esm/main.js
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
import type { Entity, Intent, Variable } from '@voiceflow/dtos';
|
2
|
+
import { SystemVariable } from '@voiceflow/dtos';
|
3
|
+
export declare const isSystemVariableName: (variableName: string) => variableName is SystemVariable;
|
4
|
+
export declare const variableNameSpellingValidator: (value: string) => import("./main.js").IValidatorResult<string>;
|
5
|
+
export declare const variableNameUniqVariablesValidator: import("./main.js").IValidatorWithContext<string, {
|
6
|
+
variables: Variable[];
|
7
|
+
variableID: string | null;
|
8
|
+
}>;
|
9
|
+
export declare const variableNameUniqEntitiesValidator: import("./main.js").IValidatorWithContext<string, {
|
10
|
+
entities: Entity[];
|
11
|
+
}>;
|
12
|
+
export declare const variableNameUniqIntentsValidator: import("./main.js").IValidatorWithContext<string, {
|
13
|
+
intents: Intent[];
|
14
|
+
}>;
|
15
|
+
export declare const variableNameValidator: import("./main.js").IValidatorWithContext<string, {
|
16
|
+
variables: Variable[];
|
17
|
+
variableID: string | null;
|
18
|
+
} & {
|
19
|
+
entities: Entity[];
|
20
|
+
} & {
|
21
|
+
intents: Intent[];
|
22
|
+
}>;
|
23
|
+
//# sourceMappingURL=variable.util.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"variable.util.d.ts","sourceRoot":"","sources":["../../src/variable.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAe,MAAM,iBAAiB,CAAC;AAI9D,eAAO,MAAM,oBAAoB,iBAAkB,MAAM,mCACe,CAAC;AAEzE,eAAO,MAAM,6BAA6B,8DAA8C,CAAC;AAEzF,eAAO,MAAM,kCAAkC;eACU,QAAQ,EAAE;gBAAc,MAAM,GAAG,IAAI;EAG7F,CAAC;AAEF,eAAO,MAAM,iCAAiC;cACH,MAAM,EAAE;EAElD,CAAC;AAEF,eAAO,MAAM,gCAAgC;aACJ,MAAM,EAAE;EAEhD,CAAC;AAEF,eAAO,MAAM,qBAAqB;eAfuB,QAAQ,EAAE;gBAAc,MAAM,GAAG,IAAI;;cAMnD,MAAM,EAAE;;aAKV,MAAM,EAAE;EAShD,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { SystemVariable, VariableDTO } from '@voiceflow/dtos';
|
2
|
+
import { composeValidators, validatorFactory, validatorZodFactory } from './validator/validator.util.js';
|
3
|
+
export const isSystemVariableName = (variableName) => Object.values(SystemVariable).includes(variableName);
|
4
|
+
export const variableNameSpellingValidator = validatorZodFactory(VariableDTO.shape.name);
|
5
|
+
export const variableNameUniqVariablesValidator = validatorFactory((name, { variables, variableID }) => variables.every((variable) => variable.id === variableID || variable.name !== name), () => `Variable name already exists.`);
|
6
|
+
export const variableNameUniqEntitiesValidator = validatorFactory((name, { entities }) => entities.every((entity) => entity.name !== name), () => `Entity name already exists.`);
|
7
|
+
export const variableNameUniqIntentsValidator = validatorFactory((name, { intents }) => intents.every((intent) => intent.name !== name), () => `Intent name already exists.`);
|
8
|
+
export const variableNameValidator = composeValidators(variableNameSpellingValidator, variableNameUniqVariablesValidator, variableNameUniqEntitiesValidator, variableNameUniqIntentsValidator);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@voiceflow/utils-designer",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.8.1",
|
4
4
|
"exports": {
|
5
5
|
".": {
|
6
6
|
"types": "./build/cjs/main.d.ts",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
38
|
"@voiceflow/common": "8.2.7",
|
39
|
-
"@voiceflow/dtos": "1.
|
39
|
+
"@voiceflow/dtos": "1.28.0",
|
40
40
|
"bidirectional-adapter": "1.2.1",
|
41
41
|
"ts-pattern": "^5.0.5",
|
42
42
|
"zod": "3.22.4"
|
@@ -49,5 +49,5 @@
|
|
49
49
|
"tsd": {
|
50
50
|
"directory": "src"
|
51
51
|
},
|
52
|
-
"gitHead": "
|
52
|
+
"gitHead": "e1d6eebef60087add1d9feb97f65e1b0208172fb"
|
53
53
|
}
|