@apify/input_schema 3.18.4 → 3.19.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/cjs/index.cjs +2 -2
- package/cjs/index.cjs.map +1 -1
- package/cjs/index.d.ts +5 -2
- package/esm/index.d.mts +5 -2
- package/esm/index.mjs +2 -2
- package/esm/index.mjs.map +1 -1
- package/package.json +3 -3
package/cjs/index.d.ts
CHANGED
|
@@ -2986,15 +2986,18 @@ type IntegerFieldDefinition = CommonFieldDefinition<number> & {
|
|
|
2986
2986
|
};
|
|
2987
2987
|
type ObjectFieldDefinition = CommonFieldDefinition<object> & {
|
|
2988
2988
|
type: 'object';
|
|
2989
|
-
editor: 'json' | 'proxy' | 'hidden';
|
|
2989
|
+
editor: 'json' | 'proxy' | 'schemaBased' | 'hidden';
|
|
2990
2990
|
patternKey?: string;
|
|
2991
2991
|
patternValue?: string;
|
|
2992
2992
|
maxProperties?: number;
|
|
2993
2993
|
minProperties?: number;
|
|
2994
|
+
properties?: Record<string, unknown>;
|
|
2995
|
+
required?: string[];
|
|
2996
|
+
additionalProperties?: boolean;
|
|
2994
2997
|
};
|
|
2995
2998
|
type ArrayFieldDefinition = CommonFieldDefinition<unknown[]> & {
|
|
2996
2999
|
type: 'array';
|
|
2997
|
-
editor: 'json' | 'requestListSources' | 'pseudoUrls' | 'globs' | 'keyValue' | 'stringList' | 'select' | 'hidden';
|
|
3000
|
+
editor: 'json' | 'requestListSources' | 'pseudoUrls' | 'globs' | 'keyValue' | 'stringList' | 'select' | 'schemaBased' | 'hidden';
|
|
2998
3001
|
placeholderKey?: string;
|
|
2999
3002
|
placeholderValue?: string;
|
|
3000
3003
|
patternKey?: string;
|
package/esm/index.d.mts
CHANGED
|
@@ -2986,15 +2986,18 @@ type IntegerFieldDefinition = CommonFieldDefinition<number> & {
|
|
|
2986
2986
|
};
|
|
2987
2987
|
type ObjectFieldDefinition = CommonFieldDefinition<object> & {
|
|
2988
2988
|
type: 'object';
|
|
2989
|
-
editor: 'json' | 'proxy' | 'hidden';
|
|
2989
|
+
editor: 'json' | 'proxy' | 'schemaBased' | 'hidden';
|
|
2990
2990
|
patternKey?: string;
|
|
2991
2991
|
patternValue?: string;
|
|
2992
2992
|
maxProperties?: number;
|
|
2993
2993
|
minProperties?: number;
|
|
2994
|
+
properties?: Record<string, unknown>;
|
|
2995
|
+
required?: string[];
|
|
2996
|
+
additionalProperties?: boolean;
|
|
2994
2997
|
};
|
|
2995
2998
|
type ArrayFieldDefinition = CommonFieldDefinition<unknown[]> & {
|
|
2996
2999
|
type: 'array';
|
|
2997
|
-
editor: 'json' | 'requestListSources' | 'pseudoUrls' | 'globs' | 'keyValue' | 'stringList' | 'select' | 'hidden';
|
|
3000
|
+
editor: 'json' | 'requestListSources' | 'pseudoUrls' | 'globs' | 'keyValue' | 'stringList' | 'select' | 'schemaBased' | 'hidden';
|
|
2998
3001
|
placeholderKey?: string;
|
|
2999
3002
|
placeholderValue?: string;
|
|
3000
3003
|
patternKey?: string;
|
package/esm/index.mjs
CHANGED
|
@@ -1648,7 +1648,7 @@ function parseAjvError(error, rootName, properties = {}, input = {}) {
|
|
|
1648
1648
|
return name.replace(/^\/|\/$/g, "").replace(/\//g, ".");
|
|
1649
1649
|
}, "cleanPropertyName");
|
|
1650
1650
|
if (error.keyword === "type") {
|
|
1651
|
-
fieldKey = error.instancePath
|
|
1651
|
+
fieldKey = cleanPropertyName(error.instancePath);
|
|
1652
1652
|
if (properties[fieldKey] && properties[fieldKey].nullable && input[fieldKey] === null) {
|
|
1653
1653
|
return null;
|
|
1654
1654
|
}
|
|
@@ -1711,7 +1711,7 @@ function validateField(validator, fieldSchema, fieldKey, isSubField = false) {
|
|
|
1711
1711
|
if (fieldSchema.enum) {
|
|
1712
1712
|
const definition2 = matchingDefinitions.filter((item) => !!item.properties.enum).pop();
|
|
1713
1713
|
if (!definition2) throw new Error('Input schema validation failed to find "enum property" definition');
|
|
1714
|
-
validateAgainstSchemaOrThrow(validator, fieldSchema, enhanceDefinition(definition2), `schema.properties.${fieldKey}
|
|
1714
|
+
validateAgainstSchemaOrThrow(validator, fieldSchema, enhanceDefinition(definition2), `schema.properties.${fieldKey}`);
|
|
1715
1715
|
return;
|
|
1716
1716
|
}
|
|
1717
1717
|
if (fieldSchema.resourceType) {
|