@based/schema 2.2.2 → 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 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,11 +145,11 @@ export type BasedSchemaFields = {
145
145
  text: BasedSchemaFieldText;
146
146
  cardinality: BasedSchemaFieldCardinality;
147
147
  };
148
- export type BasedSchemaField = BasedSchemaFields[keyof BasedSchemaFields] | ({
149
- type?: BasedSchemaFieldType;
148
+ export type BasedSchemaField = BasedSchemaFields[keyof BasedSchemaFields] | {
149
+ type?: '';
150
150
  isRequired?: boolean;
151
151
  $ref: string;
152
- } & BasedSchemaFieldShared);
152
+ };
153
153
  export type BasedSchemaType = {
154
154
  fields: {
155
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) => {
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@based/schema",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {