@based/schema 2.2.3 → 2.2.5

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;
@@ -67,6 +67,7 @@ export type BasedSchemaFieldString = {
67
67
  } & BasedSchemaFieldShared & BasedSchemaStringShared;
68
68
  export type BasedSchemaFieldEnum = {
69
69
  enum: any[];
70
+ type?: '';
70
71
  } & BasedSchemaFieldShared;
71
72
  export type BasedSchemaFieldCardinality = {
72
73
  type: 'cardinality';
@@ -145,10 +146,11 @@ export type BasedSchemaFields = {
145
146
  text: BasedSchemaFieldText;
146
147
  cardinality: BasedSchemaFieldCardinality;
147
148
  };
148
- export type BasedSchemaField = BasedSchemaFields[keyof BasedSchemaFields] | ({
149
+ export type BasedSchemaField = BasedSchemaFields[keyof BasedSchemaFields] | {
150
+ type?: '';
149
151
  isRequired?: boolean;
150
152
  $ref: string;
151
- } & BasedSchemaFieldShared);
153
+ };
152
154
  export type BasedSchemaType = {
153
155
  fields: {
154
156
  [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;AAmQlD,IAAI,CAAmB,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.3",
3
+ "version": "2.2.5",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {