@based/schema 2.2.3 → 2.2.4
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/types.d.ts +4 -3
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type AllowedTypes = (string | {
|
|
|
9
9
|
type?: string;
|
|
10
10
|
$filter: any | any[];
|
|
11
11
|
})[];
|
|
12
|
-
export declare const basedSchemaFieldTypes: readonly ["array", "object", "record", "set", "string", "boolean", "number", "json", "integer", "timestamp", "reference", "references", "text", "cardinality"];
|
|
12
|
+
export declare const basedSchemaFieldTypes: readonly ["array", "object", "record", "set", "string", "boolean", "number", "json", "integer", "timestamp", "reference", "references", "text", "enum", "cardinality"];
|
|
13
13
|
export type BasedSchemaFieldType = (typeof basedSchemaFieldTypes)[number];
|
|
14
14
|
export declare const isCollection: (type: string) => boolean;
|
|
15
15
|
export type BasedSchemaPattern = string;
|
|
@@ -145,10 +145,11 @@ export type BasedSchemaFields = {
|
|
|
145
145
|
text: BasedSchemaFieldText;
|
|
146
146
|
cardinality: BasedSchemaFieldCardinality;
|
|
147
147
|
};
|
|
148
|
-
export type BasedSchemaField = BasedSchemaFields[keyof BasedSchemaFields] |
|
|
148
|
+
export type BasedSchemaField = BasedSchemaFields[keyof BasedSchemaFields] | {
|
|
149
|
+
type?: '';
|
|
149
150
|
isRequired?: boolean;
|
|
150
151
|
$ref: string;
|
|
151
|
-
}
|
|
152
|
+
};
|
|
152
153
|
export type BasedSchemaType = {
|
|
153
154
|
fields: {
|
|
154
155
|
[name: string]: BasedSchemaField;
|
package/dist/types.js
CHANGED
|
@@ -16,6 +16,7 @@ exports.basedSchemaFieldTypes = [
|
|
|
16
16
|
'reference',
|
|
17
17
|
'references',
|
|
18
18
|
'text',
|
|
19
|
+
'enum',
|
|
19
20
|
'cardinality',
|
|
20
21
|
];
|
|
21
22
|
const isCollection = (type) => {
|
|
@@ -23,5 +24,4 @@ const isCollection = (type) => {
|
|
|
23
24
|
};
|
|
24
25
|
exports.isCollection = isCollection;
|
|
25
26
|
exports.languages = Object.keys(languages_1.languages);
|
|
26
|
-
let x;
|
|
27
27
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AACA,2CAAuD;AA2B1C,QAAA,qBAAqB,GAAG;IACnC,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,MAAM;IACN,SAAS;IACT,WAAW;IACX,WAAW;IACX,YAAY;IACZ,MAAM;IACN,aAAa;CACL,CAAA;AAIH,MAAM,YAAY,GAAG,CAAC,IAAY,EAAW,EAAE;IACpD,OAAO,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,QAAQ,CAAA;AACnE,CAAC,CAAA;AAFY,QAAA,YAAY,gBAExB;AAKY,QAAA,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,qBAAY,CAAC,CAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AACA,2CAAuD;AA2B1C,QAAA,qBAAqB,GAAG;IACnC,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,MAAM;IACN,SAAS;IACT,WAAW;IACX,WAAW;IACX,YAAY;IACZ,MAAM;IACN,MAAM;IACN,aAAa;CACL,CAAA;AAIH,MAAM,YAAY,GAAG,CAAC,IAAY,EAAW,EAAE;IACpD,OAAO,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,QAAQ,CAAA;AACnE,CAAC,CAAA;AAFY,QAAA,YAAY,gBAExB;AAKY,QAAA,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,qBAAY,CAAC,CAAA"}
|