@puq/type 0.0.25 → 0.0.26

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/index.d.ts CHANGED
@@ -15,13 +15,17 @@ export * from './lib/property/database-type.js';
15
15
  export * from './lib/property/date.js';
16
16
  export * from './lib/property/integer-format.js';
17
17
  export * from './lib/property/integer.js';
18
+ export * from './lib/property/model.js';
18
19
  export * from './lib/property/number-format.js';
19
20
  export * from './lib/property/number.js';
20
21
  export * from './lib/property/object.js';
21
22
  export * from './lib/property/property-type.js';
22
23
  export * from './lib/property/property.js';
24
+ export * from './lib/property/relation-options.js';
23
25
  export * from './lib/property/string-format.js';
24
26
  export * from './lib/property/string.js';
27
+ export * from './lib/ui/icon.js';
28
+ export * from './lib/ui/input-type.js';
25
29
  export * from './lib/utils/key-of.js';
26
30
  export * from './lib/utils/keys.js';
27
31
  export * from './lib/utils/pick-optional.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -16,13 +16,17 @@ export * from './lib/property/database-type.js';
16
16
  export * from './lib/property/date.js';
17
17
  export * from './lib/property/integer-format.js';
18
18
  export * from './lib/property/integer.js';
19
+ export * from './lib/property/model.js';
19
20
  export * from './lib/property/number-format.js';
20
21
  export * from './lib/property/number.js';
21
22
  export * from './lib/property/object.js';
22
23
  export * from './lib/property/property-type.js';
23
24
  export * from './lib/property/property.js';
25
+ export * from './lib/property/relation-options.js';
24
26
  export * from './lib/property/string-format.js';
25
27
  export * from './lib/property/string.js';
28
+ export * from './lib/ui/icon.js';
29
+ export * from './lib/ui/input-type.js';
26
30
  export * from './lib/utils/key-of.js';
27
31
  export * from './lib/utils/keys.js';
28
32
  export * from './lib/utils/pick-optional.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// @index('./**/*.ts', f => `export * from '${f.path}.js'`)\nexport * from './lib/common/package-json.js';\nexport * from './lib/dto/count-result.js';\nexport * from './lib/dto/delete-result.js';\nexport * from './lib/dto/relation-param.js';\nexport * from './lib/dto/update-result.js';\nexport * from './lib/model/base.js';\nexport * from './lib/model/id.js';\nexport * from './lib/model/timestamp.js';\nexport * from './lib/property/array.js';\nexport * from './lib/property/big-integer.js';\nexport * from './lib/property/boolean.js';\nexport * from './lib/property/common-number.js';\nexport * from './lib/property/common.js';\nexport * from './lib/property/database-type.js';\nexport * from './lib/property/date.js';\nexport * from './lib/property/integer-format.js';\nexport * from './lib/property/integer.js';\nexport * from './lib/property/number-format.js';\nexport * from './lib/property/number.js';\nexport * from './lib/property/object.js';\nexport * from './lib/property/property-type.js';\nexport * from './lib/property/property.js';\nexport * from './lib/property/string-format.js';\nexport * from './lib/property/string.js';\nexport * from './lib/utils/key-of.js';\nexport * from './lib/utils/keys.js';\nexport * from './lib/utils/pick-optional.js';\nexport * from './lib/utils/pick-required.js';\nexport * from './lib/utils/type.js';\n"],"names":[],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,2DAA2D;AAC3D,cAAc,+BAA+B;AAC7C,cAAc,4BAA4B;AAC1C,cAAc,6BAA6B;AAC3C,cAAc,8BAA8B;AAC5C,cAAc,6BAA6B;AAC3C,cAAc,sBAAsB;AACpC,cAAc,oBAAoB;AAClC,cAAc,2BAA2B;AACzC,cAAc,0BAA0B;AACxC,cAAc,gCAAgC;AAC9C,cAAc,4BAA4B;AAC1C,cAAc,kCAAkC;AAChD,cAAc,2BAA2B;AACzC,cAAc,kCAAkC;AAChD,cAAc,yBAAyB;AACvC,cAAc,mCAAmC;AACjD,cAAc,4BAA4B;AAC1C,cAAc,kCAAkC;AAChD,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,kCAAkC;AAChD,cAAc,6BAA6B;AAC3C,cAAc,kCAAkC;AAChD,cAAc,2BAA2B;AACzC,cAAc,wBAAwB;AACtC,cAAc,sBAAsB;AACpC,cAAc,+BAA+B;AAC7C,cAAc,+BAA+B;AAC7C,cAAc,sBAAsB"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// @index('./**/*.ts', f => `export * from '${f.path}.js'`)\nexport * from './lib/common/package-json.js';\nexport * from './lib/dto/count-result.js';\nexport * from './lib/dto/delete-result.js';\nexport * from './lib/dto/relation-param.js';\nexport * from './lib/dto/update-result.js';\nexport * from './lib/model/base.js';\nexport * from './lib/model/id.js';\nexport * from './lib/model/timestamp.js';\nexport * from './lib/property/array.js';\nexport * from './lib/property/big-integer.js';\nexport * from './lib/property/boolean.js';\nexport * from './lib/property/common-number.js';\nexport * from './lib/property/common.js';\nexport * from './lib/property/database-type.js';\nexport * from './lib/property/date.js';\nexport * from './lib/property/integer-format.js';\nexport * from './lib/property/integer.js';\nexport * from './lib/property/model.js';\nexport * from './lib/property/number-format.js';\nexport * from './lib/property/number.js';\nexport * from './lib/property/object.js';\nexport * from './lib/property/property-type.js';\nexport * from './lib/property/property.js';\nexport * from './lib/property/relation-options.js';\nexport * from './lib/property/string-format.js';\nexport * from './lib/property/string.js';\nexport * from './lib/ui/icon.js';\nexport * from './lib/ui/input-type.js';\nexport * from './lib/utils/key-of.js';\nexport * from './lib/utils/keys.js';\nexport * from './lib/utils/pick-optional.js';\nexport * from './lib/utils/pick-required.js';\nexport * from './lib/utils/type.js';\n"],"names":[],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,2DAA2D;AAC3D,cAAc,+BAA+B;AAC7C,cAAc,4BAA4B;AAC1C,cAAc,6BAA6B;AAC3C,cAAc,8BAA8B;AAC5C,cAAc,6BAA6B;AAC3C,cAAc,sBAAsB;AACpC,cAAc,oBAAoB;AAClC,cAAc,2BAA2B;AACzC,cAAc,0BAA0B;AACxC,cAAc,gCAAgC;AAC9C,cAAc,4BAA4B;AAC1C,cAAc,kCAAkC;AAChD,cAAc,2BAA2B;AACzC,cAAc,kCAAkC;AAChD,cAAc,yBAAyB;AACvC,cAAc,mCAAmC;AACjD,cAAc,4BAA4B;AAC1C,cAAc,0BAA0B;AACxC,cAAc,kCAAkC;AAChD,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,kCAAkC;AAChD,cAAc,6BAA6B;AAC3C,cAAc,qCAAqC;AACnD,cAAc,kCAAkC;AAChD,cAAc,2BAA2B;AACzC,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,wBAAwB;AACtC,cAAc,sBAAsB;AACpC,cAAc,+BAA+B;AAC7C,cAAc,+BAA+B;AAC7C,cAAc,sBAAsB"}
@@ -0,0 +1,12 @@
1
+ import { DatabaseType } from './database-type.js';
2
+ import { PropertyOptions } from './property.js';
3
+ import { RelationOptions } from './relation-options.js';
4
+ export type Model = {
5
+ databaseType?: DatabaseType;
6
+ description?: string;
7
+ properties?: Record<string, PropertyOptions>;
8
+ relations?: Record<string, RelationOptions>;
9
+ uniques?: string[];
10
+ required?: string[];
11
+ };
12
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/lib/property/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,MAAM,KAAK,GAAG;IAClB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/property/model.ts"],"sourcesContent":["import { DatabaseType } from './database-type.js';\r\nimport { PropertyOptions } from './property.js';\r\nimport { RelationOptions } from './relation-options.js';\r\n\r\nexport type Model = {\r\n databaseType?: DatabaseType;\r\n description?: string;\r\n properties?: Record<string, PropertyOptions>;\r\n relations?: Record<string, RelationOptions>;\r\n uniques?: string[];\r\n required?: string[];\r\n};\r\n"],"names":[],"rangeMappings":"","mappings":"AAIA,WAOE"}
@@ -0,0 +1,16 @@
1
+ export type RelationType = 'many-to-many' | 'many-to-one' | 'one-to-one' | 'one-to-many';
2
+ export type OnDelete = 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'DEFAULT' | 'NO ACTION';
3
+ export type OnUpdate = OnDelete;
4
+ export type Cascade = boolean | ('insert' | 'update' | 'remove' | 'soft-remove' | 'recover')[];
5
+ export type RelationOptions = {
6
+ type: RelationType;
7
+ description?: string;
8
+ target: string;
9
+ nullable?: boolean;
10
+ eager?: boolean;
11
+ join?: boolean;
12
+ cascade?: Cascade;
13
+ onDelete?: OnDelete;
14
+ onUpdate?: OnUpdate;
15
+ };
16
+ //# sourceMappingURL=relation-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relation-options.d.ts","sourceRoot":"","sources":["../../../src/lib/property/relation-options.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,cAAc,GACd,aAAa,GACb,YAAY,GACZ,aAAa,CAAC;AAElB,MAAM,MAAM,QAAQ,GAChB,UAAU,GACV,SAAS,GACT,UAAU,GACV,SAAS,GACT,WAAW,CAAC;AAChB,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAEhC,MAAM,MAAM,OAAO,GACf,OAAO,GACP,CAAC,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC;AAEnE,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=relation-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/property/relation-options.ts"],"sourcesContent":["export type RelationType =\r\n | 'many-to-many'\r\n | 'many-to-one'\r\n | 'one-to-one'\r\n | 'one-to-many';\r\n\r\nexport type OnDelete =\r\n | 'RESTRICT'\r\n | 'CASCADE'\r\n | 'SET NULL'\r\n | 'DEFAULT'\r\n | 'NO ACTION';\r\nexport type OnUpdate = OnDelete;\r\n\r\nexport type Cascade =\r\n | boolean\r\n | ('insert' | 'update' | 'remove' | 'soft-remove' | 'recover')[];\r\n\r\nexport type RelationOptions = {\r\n type: RelationType;\r\n description?: string;\r\n target: string;\r\n nullable?: boolean;\r\n eager?: boolean;\r\n join?: boolean;\r\n cascade?: Cascade;\r\n onDelete?: OnDelete;\r\n onUpdate?: OnUpdate;\r\n};\r\n"],"names":[],"rangeMappings":"","mappings":"AAkBA,WAUE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puq/type",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public",