@puq/type 0.3.3 → 0.3.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.
Files changed (76) hide show
  1. package/dist/index.d.ts +37 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/lib/common/object-literal.d.ts +4 -0
  4. package/dist/lib/common/object-literal.d.ts.map +1 -0
  5. package/dist/lib/common/package-json.d.ts +74 -0
  6. package/dist/lib/common/package-json.d.ts.map +1 -0
  7. package/dist/lib/common/puq-options.d.ts +31 -0
  8. package/dist/lib/common/puq-options.d.ts.map +1 -0
  9. package/dist/lib/dto/count-result.d.ts +4 -0
  10. package/dist/lib/dto/count-result.d.ts.map +1 -0
  11. package/dist/lib/dto/delete-result.d.ts +4 -0
  12. package/dist/lib/dto/delete-result.d.ts.map +1 -0
  13. package/dist/lib/dto/relation-param.d.ts +10 -0
  14. package/dist/lib/dto/relation-param.d.ts.map +1 -0
  15. package/dist/lib/dto/update-result.d.ts +4 -0
  16. package/dist/lib/dto/update-result.d.ts.map +1 -0
  17. package/dist/lib/dto/validation-error.d.ts +22 -0
  18. package/dist/lib/dto/validation-error.d.ts.map +1 -0
  19. package/dist/lib/model/base.d.ts +4 -0
  20. package/dist/lib/model/base.d.ts.map +1 -0
  21. package/dist/lib/model/id.d.ts +4 -0
  22. package/dist/lib/model/id.d.ts.map +1 -0
  23. package/dist/lib/model/timestamp.d.ts +6 -0
  24. package/dist/lib/model/timestamp.d.ts.map +1 -0
  25. package/dist/lib/property/array.d.ts +22 -0
  26. package/dist/lib/property/array.d.ts.map +1 -0
  27. package/dist/lib/property/big-integer.d.ts +6 -0
  28. package/dist/lib/property/big-integer.d.ts.map +1 -0
  29. package/dist/lib/property/boolean.d.ts +6 -0
  30. package/dist/lib/property/boolean.d.ts.map +1 -0
  31. package/dist/lib/property/common-number.d.ts +27 -0
  32. package/dist/lib/property/common-number.d.ts.map +1 -0
  33. package/dist/lib/property/common.d.ts +106 -0
  34. package/dist/lib/property/common.d.ts.map +1 -0
  35. package/dist/lib/property/database-type.d.ts +6 -0
  36. package/dist/lib/property/database-type.d.ts.map +1 -0
  37. package/dist/lib/property/date.d.ts +54 -0
  38. package/dist/lib/property/date.d.ts.map +1 -0
  39. package/dist/lib/property/integer-format.d.ts +2 -0
  40. package/dist/lib/property/integer-format.d.ts.map +1 -0
  41. package/dist/lib/property/integer.d.ts +12 -0
  42. package/dist/lib/property/integer.d.ts.map +1 -0
  43. package/dist/lib/property/model.d.ts +12 -0
  44. package/dist/lib/property/model.d.ts.map +1 -0
  45. package/dist/lib/property/number-format.d.ts +2 -0
  46. package/dist/lib/property/number-format.d.ts.map +1 -0
  47. package/dist/lib/property/number.d.ts +16 -0
  48. package/dist/lib/property/number.d.ts.map +1 -0
  49. package/dist/lib/property/object.d.ts +12 -0
  50. package/dist/lib/property/object.d.ts.map +1 -0
  51. package/dist/lib/property/property-type.d.ts +2 -0
  52. package/dist/lib/property/property-type.d.ts.map +1 -0
  53. package/dist/lib/property/property.d.ts +11 -0
  54. package/dist/lib/property/property.d.ts.map +1 -0
  55. package/dist/lib/property/relation-options.d.ts +52 -0
  56. package/dist/lib/property/relation-options.d.ts.map +1 -0
  57. package/dist/lib/property/string-format.d.ts +2 -0
  58. package/dist/lib/property/string-format.d.ts.map +1 -0
  59. package/dist/lib/property/string.d.ts +43 -0
  60. package/dist/lib/property/string.d.ts.map +1 -0
  61. package/dist/lib/ui/icon.d.ts +2 -0
  62. package/dist/lib/ui/icon.d.ts.map +1 -0
  63. package/dist/lib/ui/input-type.d.ts +2 -0
  64. package/dist/lib/ui/input-type.d.ts.map +1 -0
  65. package/dist/lib/utils/key-of.d.ts +6 -0
  66. package/dist/lib/utils/key-of.d.ts.map +1 -0
  67. package/dist/lib/utils/optional.d.ts +6 -0
  68. package/dist/lib/utils/optional.d.ts.map +1 -0
  69. package/dist/lib/utils/pick-optional.d.ts +3 -0
  70. package/dist/lib/utils/pick-optional.d.ts.map +1 -0
  71. package/dist/lib/utils/pick-required.d.ts +3 -0
  72. package/dist/lib/utils/pick-required.d.ts.map +1 -0
  73. package/dist/lib/utils/type.d.ts +4 -0
  74. package/dist/lib/utils/type.d.ts.map +1 -0
  75. package/dist/package.json +2 -2
  76. package/package.json +2 -2
@@ -0,0 +1,37 @@
1
+ export * from './lib/common/object-literal.js';
2
+ export * from './lib/common/package-json.js';
3
+ export * from './lib/common/puq-options.js';
4
+ export * from './lib/dto/count-result.js';
5
+ export * from './lib/dto/delete-result.js';
6
+ export * from './lib/dto/relation-param.js';
7
+ export * from './lib/dto/update-result.js';
8
+ export * from './lib/dto/validation-error.js';
9
+ export * from './lib/model/base.js';
10
+ export * from './lib/model/id.js';
11
+ export * from './lib/model/timestamp.js';
12
+ export * from './lib/property/array.js';
13
+ export * from './lib/property/big-integer.js';
14
+ export * from './lib/property/boolean.js';
15
+ export * from './lib/property/common-number.js';
16
+ export * from './lib/property/common.js';
17
+ export * from './lib/property/database-type.js';
18
+ export * from './lib/property/date.js';
19
+ export * from './lib/property/integer-format.js';
20
+ export * from './lib/property/integer.js';
21
+ export * from './lib/property/model.js';
22
+ export * from './lib/property/number-format.js';
23
+ export * from './lib/property/number.js';
24
+ export * from './lib/property/object.js';
25
+ export * from './lib/property/property-type.js';
26
+ export * from './lib/property/property.js';
27
+ export * from './lib/property/relation-options.js';
28
+ export * from './lib/property/string-format.js';
29
+ export * from './lib/property/string.js';
30
+ export * from './lib/ui/icon.js';
31
+ export * from './lib/ui/input-type.js';
32
+ export * from './lib/utils/key-of.js';
33
+ export * from './lib/utils/optional.js';
34
+ export * from './lib/utils/pick-optional.js';
35
+ export * from './lib/utils/pick-required.js';
36
+ export * from './lib/utils/type.js';
37
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gCAAgC,CAAA;AAC9C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA;AACzC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oCAAoC,CAAA;AAClD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,qBAAqB,CAAA"}
@@ -0,0 +1,4 @@
1
+ export type ObjectLiteral<V = unknown> = {
2
+ [key: string | number | symbol]: V;
3
+ };
4
+ //# sourceMappingURL=object-literal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object-literal.d.ts","sourceRoot":"","sources":["../../../src/lib/common/object-literal.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC;CACpC,CAAC"}
@@ -0,0 +1,74 @@
1
+ import type { PuqOptions } from './puq-options.js';
2
+ export type PackageJSON = {
3
+ name: string;
4
+ version: string;
5
+ license: string;
6
+ description: string;
7
+ keywords: string[];
8
+ homepage: string;
9
+ categories: string[];
10
+ funding: string[];
11
+ icon: string;
12
+ type: string;
13
+ main: string;
14
+ module: string;
15
+ types: string;
16
+ author: {
17
+ email: string;
18
+ name: string;
19
+ url: string;
20
+ };
21
+ repository: {
22
+ directory: string;
23
+ url: string;
24
+ type: string;
25
+ };
26
+ bugs: {
27
+ email: string;
28
+ url: string;
29
+ };
30
+ publishConfig: {
31
+ access: string;
32
+ tag: string;
33
+ };
34
+ files: string[];
35
+ contributors: [
36
+ {
37
+ email: string;
38
+ name: string;
39
+ url: string;
40
+ }
41
+ ];
42
+ exports: {
43
+ './package.json': string;
44
+ '.': {
45
+ types: string;
46
+ import: string;
47
+ default: string;
48
+ };
49
+ };
50
+ nx: {
51
+ sourceRoot: string;
52
+ targets: {
53
+ build: {
54
+ executor: string;
55
+ outputs: string[];
56
+ options: {
57
+ outputPath: string;
58
+ main: string;
59
+ tsConfig: string;
60
+ skipTypeCheck: true;
61
+ stripLeadingPaths: true;
62
+ };
63
+ };
64
+ doc: {
65
+ command: string;
66
+ };
67
+ };
68
+ };
69
+ dependencies: Record<string, string>;
70
+ devDependencies: Record<string, string>;
71
+ peerDependencies: Record<string, string>;
72
+ puq: PuqOptions;
73
+ };
74
+ //# sourceMappingURL=package-json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-json.d.ts","sourceRoot":"","sources":["../../../src/lib/common/package-json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,UAAU,EAAE;QACV,SAAS,EAAE,MAAM,CAAC;QAClB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,aAAa,EAAE;QACb,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,YAAY,EAAE;QACZ;YACE,KAAK,EAAE,MAAM,CAAC;YACd,IAAI,EAAE,MAAM,CAAC;YACb,GAAG,EAAE,MAAM,CAAC;SACb;KACF,CAAC;IACF,OAAO,EAAE;QACP,gBAAgB,EAAE,MAAM,CAAC;QACzB,GAAG,EAAE;YACH,KAAK,EAAE,MAAM,CAAC;YACd,MAAM,EAAE,MAAM,CAAC;YACf,OAAO,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,CAAC;IACF,EAAE,EAAE;QACF,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE;YACP,KAAK,EAAE;gBACL,QAAQ,EAAE,MAAM,CAAC;gBACjB,OAAO,EAAE,MAAM,EAAE,CAAC;gBAClB,OAAO,EAAE;oBACP,UAAU,EAAE,MAAM,CAAC;oBACnB,IAAI,EAAE,MAAM,CAAC;oBACb,QAAQ,EAAE,MAAM,CAAC;oBACjB,aAAa,EAAE,IAAI,CAAC;oBACpB,iBAAiB,EAAE,IAAI,CAAC;iBACzB,CAAC;aACH,CAAC;YACF,GAAG,EAAE;gBACH,OAAO,EAAE,MAAM,CAAC;aACjB,CAAC;SACH,CAAC;KACH,CAAC;IACF,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,GAAG,EAAE,UAAU,CAAC;CACjB,CAAC"}
@@ -0,0 +1,31 @@
1
+ export type PuqOptions = {
2
+ /**
3
+ * Library directory such as `./libs`, `./packages`
4
+ */
5
+ libsRoot: string;
6
+ /**
7
+ * Servce directory such as `./services`, `./apis`, `./apps`
8
+ */
9
+ servicesRoot: string;
10
+ /**
11
+ * Model library name such as `model`
12
+ */
13
+ modelLibrary: string;
14
+ /**
15
+ * Entity library name such as `entity`, `tables`, `database`
16
+ */
17
+ entityLibrary: string;
18
+ /**
19
+ * Resource library name such as `resource`, `controllers`, `modules`
20
+ */
21
+ resourceLibrary: string;
22
+ /**
23
+ * Metadata files directory that contains the `.model.yaml` model metadata files
24
+ */
25
+ metadataRoot: string;
26
+ /**
27
+ * The content is a directory that provides projects metadata for documentation and marketing purposes in JSON format
28
+ */
29
+ contentRoot: string;
30
+ };
31
+ //# sourceMappingURL=puq-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"puq-options.d.ts","sourceRoot":"","sources":["../../../src/lib/common/puq-options.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export type CountResult = {
2
+ count: number;
3
+ };
4
+ //# sourceMappingURL=count-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count-result.d.ts","sourceRoot":"","sources":["../../../src/lib/dto/count-result.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -0,0 +1,4 @@
1
+ export type DeleteResult = {
2
+ affected: number;
3
+ };
4
+ //# sourceMappingURL=delete-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-result.d.ts","sourceRoot":"","sources":["../../../src/lib/dto/delete-result.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,10 @@
1
+ export type RelationParam = {
2
+ rid: number;
3
+ rn: string;
4
+ id: number;
5
+ };
6
+ export type UnsetRelationParam = {
7
+ id: number;
8
+ rn: string;
9
+ };
10
+ //# sourceMappingURL=relation-param.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relation-param.d.ts","sourceRoot":"","sources":["../../../src/lib/dto/relation-param.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export type UpdateResult = {
2
+ affected: number;
3
+ };
4
+ //# sourceMappingURL=update-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-result.d.ts","sourceRoot":"","sources":["../../../src/lib/dto/update-result.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,22 @@
1
+ export type ValidationConstraints = {
2
+ min?: string;
3
+ max?: string;
4
+ minLength?: string;
5
+ maxLength?: string;
6
+ isString?: string;
7
+ isNumber?: string;
8
+ isInt?: string;
9
+ isBoolean?: string;
10
+ isObject?: string;
11
+ isArray?: string;
12
+ arrayMinSize?: string;
13
+ arrayMaxSize?: string;
14
+ };
15
+ export type SingleValidationError = {
16
+ property?: string;
17
+ constraints?: ValidationConstraints;
18
+ };
19
+ export type ValidationErrorResult = {
20
+ errors?: SingleValidationError[];
21
+ };
22
+ //# sourceMappingURL=validation-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation-error.d.ts","sourceRoot":"","sources":["../../../src/lib/dto/validation-error.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,qBAAqB,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAClC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { IDModel } from './id.js';
2
+ import type { TimestampModel } from './timestamp.js';
3
+ export type BaseModel = IDModel & TimestampModel;
4
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/lib/model/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ export type IDModel = {
2
+ id: number;
3
+ };
4
+ //# sourceMappingURL=id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../src/lib/model/id.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC"}
@@ -0,0 +1,6 @@
1
+ export type TimestampModel = {
2
+ createdAt: Date;
3
+ updatedAt: Date;
4
+ deletedAt: Date;
5
+ };
6
+ //# sourceMappingURL=timestamp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timestamp.d.ts","sourceRoot":"","sources":["../../../src/lib/model/timestamp.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { CommonOptions } from './common.js';
2
+ export type __ArrayOptions<P> = {
3
+ type: 'array';
4
+ /**
5
+ * Items options
6
+ */
7
+ items: Readonly<P>;
8
+ /**
9
+ * Maximumm allowed size of the array
10
+ */
11
+ minSize?: number;
12
+ /**
13
+ * Minimum allowed size of the array
14
+ */
15
+ maxSize?: number;
16
+ /**
17
+ * Check the array has unique items
18
+ */
19
+ uniqueItems?: boolean;
20
+ };
21
+ export type ArrayOptions<P> = Readonly<CommonOptions<any[]> & __ArrayOptions<P>>;
22
+ //# sourceMappingURL=array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../src/lib/property/array.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,QAAQ,CACpC,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CACzC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { CommonOptions } from './common.js';
2
+ export type __BigIntegerOptions = {
3
+ type: 'bigint';
4
+ };
5
+ export type BigIntegerOptions = Readonly<CommonOptions<bigint> & __BigIntegerOptions>;
6
+ //# sourceMappingURL=big-integer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"big-integer.d.ts","sourceRoot":"","sources":["../../../src/lib/property/big-integer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CACtC,aAAa,CAAC,MAAM,CAAC,GAAG,mBAAmB,CAC5C,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { CommonOptions } from './common.js';
2
+ export type __BooleanOptions = {
3
+ type: 'boolean';
4
+ };
5
+ export type BooleanOptions = Readonly<CommonOptions<boolean> & __BooleanOptions>;
6
+ //# sourceMappingURL=boolean.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../../src/lib/property/boolean.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,QAAQ,CACnC,aAAa,CAAC,OAAO,CAAC,GAAG,gBAAgB,CAC1C,CAAC"}
@@ -0,0 +1,27 @@
1
+ export type CommonNumberOptions = {
2
+ /**
3
+ * Minimum allowed number
4
+ */
5
+ minimum?: number;
6
+ /**
7
+ * Maximum allowed number
8
+ */
9
+ maximum?: number;
10
+ /**
11
+ * Allowed numbers
12
+ */
13
+ enum?: Readonly<number[] | Record<string, unknown>>;
14
+ /**
15
+ * Not allowed numbers
16
+ */
17
+ notIn?: Readonly<number[]>;
18
+ /**
19
+ * Check the value is more than the property's value
20
+ */
21
+ moreThanProperty?: string;
22
+ /**
23
+ * Check the value is less than the property's value
24
+ */
25
+ lessThanProperty?: string;
26
+ };
27
+ //# sourceMappingURL=common-number.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common-number.d.ts","sourceRoot":"","sources":["../../../src/lib/property/common-number.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEpD;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAE3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC"}
@@ -0,0 +1,106 @@
1
+ import type { Icon } from '../ui/icon.js';
2
+ import type { InputType } from '../ui/input-type.js';
3
+ import type { DatabaseType } from './database-type.js';
4
+ import type { PropertyType } from './property-type.js';
5
+ /**
6
+ * Common property options
7
+ */
8
+ export type CommonOptions<T> = {
9
+ /**
10
+ * Property type
11
+ */
12
+ type: PropertyType;
13
+ /**
14
+ * Property name
15
+ */
16
+ name?: string;
17
+ /**
18
+ * Check the value is not undefined
19
+ */
20
+ required?: boolean;
21
+ /**
22
+ * Check the property is unique or not
23
+ */
24
+ unique?: boolean;
25
+ /**
26
+ *
27
+ */
28
+ readonly?: boolean;
29
+ /**
30
+ * Property description
31
+ */
32
+ description?: string;
33
+ /**
34
+ * If set false, the property is excluded.
35
+ */
36
+ expose?: boolean;
37
+ /**
38
+ * Default value in case the input is undefined
39
+ */
40
+ default?: T;
41
+ /**
42
+ * Example value
43
+ */
44
+ example?: T;
45
+ /**
46
+ * Example values
47
+ */
48
+ examples?: Readonly<T[]>;
49
+ /**
50
+ * If ture, the string values are accepted and transformed
51
+ */
52
+ acceptString?: boolean;
53
+ /**
54
+ * Check the value is equal to property
55
+ */
56
+ equalToProperty?: string;
57
+ /**
58
+ * Check the value is not equal to property
59
+ */
60
+ notEqualToProperty?: string;
61
+ /**
62
+ * If set, the value is ignored unless the target property is set
63
+ */
64
+ dependOnProperty?: string;
65
+ /**
66
+ * If set, the property only exist if the provided property does not
67
+ */
68
+ notWithProperty?: string;
69
+ /**
70
+ * Hash the data
71
+ */
72
+ hash?: boolean;
73
+ /**
74
+ * Encrypt the data
75
+ */
76
+ encrypt?: boolean;
77
+ /**
78
+ * Allows us to pick the right column type for the data
79
+ */
80
+ databaseType?: DatabaseType;
81
+ /**
82
+ * Google icons
83
+ */
84
+ icon?: Icon;
85
+ /**
86
+ * Inputt type
87
+ */
88
+ inputType?: InputType;
89
+ /**
90
+ * Input label
91
+ */
92
+ label?: string;
93
+ /**
94
+ * Input hint
95
+ */
96
+ hint?: string;
97
+ /**
98
+ * Disabled input
99
+ */
100
+ disabled?: boolean;
101
+ /**
102
+ * Hidden input
103
+ */
104
+ hidden?: boolean;
105
+ };
106
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/lib/property/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;IAC7B;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC;IAEZ;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC;IAEZ;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IAEzB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Represents the database driver types supported by TypeORM.
3
+ * Used in the `type` field of a TypeORM connection configuration.
4
+ */
5
+ export type DatabaseType = 'postgres' | 'mysql' | 'mariadb' | 'sqlite' | 'better-sqlite3' | 'oracle' | 'mssql' | 'cockroachdb' | 'mongodb' | 'sqljs' | 'cordova' | 'react-native' | 'expo' | 'aurora-data-api' | 'aurora-data-api-pg' | 'sap' | 'spanner';
6
+ //# sourceMappingURL=database-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database-type.d.ts","sourceRoot":"","sources":["../../../src/lib/property/database-type.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,YAAY,GAEpB,UAAU,GACV,OAAO,GACP,SAAS,GACT,QAAQ,GACR,gBAAgB,GAChB,QAAQ,GACR,OAAO,GACP,aAAa,GAGb,SAAS,GAGT,OAAO,GACP,SAAS,GACT,cAAc,GACd,MAAM,GACN,iBAAiB,GACjB,oBAAoB,GACpB,KAAK,GACL,SAAS,CAAC"}
@@ -0,0 +1,54 @@
1
+ import type { CommonOptions } from './common.js';
2
+ export type __DateOptions = {
3
+ type: 'date';
4
+ /**
5
+ * Check the date is after the date
6
+ */
7
+ minDate?: Date;
8
+ /**
9
+ * Check the date is before the date
10
+ */
11
+ maxDate?: Date;
12
+ /**
13
+ * Check the date is future date
14
+ */
15
+ future?: boolean;
16
+ /**
17
+ * Check the date is past date
18
+ */
19
+ past?: boolean;
20
+ /**
21
+ * Check the property comes before the target property
22
+ */
23
+ beforeProperty?: string;
24
+ /**
25
+ * Check the property comes after the target property
26
+ */
27
+ afterProperty?: string;
28
+ /**
29
+ * Check the property and targer property are in the same month
30
+ */
31
+ sameMonthAsProperty?: string;
32
+ /**
33
+ * Check the property and targer property are in the same year
34
+ */
35
+ sameWeekAsProperty?: string;
36
+ /**
37
+ * Check the date's year value is the same as the named property's year value
38
+ */
39
+ sameYearAsProperty?: string;
40
+ /**
41
+ * Check the property and targer property are on the same day
42
+ */
43
+ sameDayAsProperty?: string;
44
+ /**
45
+ * Check the property and the target property are weekend or week day
46
+ */
47
+ sameDayTypeAsProperty?: string;
48
+ /**
49
+ * Check the property and targer property are in the same hour
50
+ */
51
+ sameHourAsProperty?: string;
52
+ };
53
+ export type DateOptions = Readonly<CommonOptions<string> & __DateOptions>;
54
+ //# sourceMappingURL=date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../src/lib/property/date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export type IntegerFormat = 'positive' | 'percent' | 'rate' | 'digit';
2
+ //# sourceMappingURL=integer-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integer-format.d.ts","sourceRoot":"","sources":["../../../src/lib/property/integer-format.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { CommonNumberOptions } from './common-number.js';
2
+ import type { CommonOptions } from './common.js';
3
+ import type { IntegerFormat } from './integer-format.js';
4
+ export type __IntegerOptions = {
5
+ type: 'integer';
6
+ /**
7
+ * Special integer format
8
+ */
9
+ integerFormat?: IntegerFormat;
10
+ };
11
+ export type IntegerOptions = Readonly<CommonOptions<number> & __IntegerOptions & CommonNumberOptions>;
12
+ //# sourceMappingURL=integer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["../../../src/lib/property/integer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,SAAS,CAAC;IAEhB;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,QAAQ,CACnC,aAAa,CAAC,MAAM,CAAC,GAAG,gBAAgB,GAAG,mBAAmB,CAC/D,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { DatabaseType } from './database-type.js';
2
+ import type { PropertyOptions } from './property.js';
3
+ import type { 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,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,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,2 @@
1
+ export type NumberFormat = 'positive' | 'percent' | 'rate' | 'digit' | 'fraction';
2
+ //# sourceMappingURL=number-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-format.d.ts","sourceRoot":"","sources":["../../../src/lib/property/number-format.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,UAAU,GACV,SAAS,GACT,MAAM,GACN,OAAO,GACP,UAAU,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { CommonNumberOptions } from './common-number.js';
2
+ import type { CommonOptions } from './common.js';
3
+ import type { NumberFormat } from './number-format.js';
4
+ export type __NumberOptions = {
5
+ type: 'number';
6
+ /**
7
+ * Maximum allowed decimals
8
+ */
9
+ maxDecimals?: number;
10
+ /**
11
+ * Special number format
12
+ */
13
+ numberFormat?: NumberFormat;
14
+ };
15
+ export type NumberOptions = Readonly<CommonOptions<number> & __NumberOptions & CommonNumberOptions>;
16
+ //# sourceMappingURL=number.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../../src/lib/property/number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,QAAQ,CAClC,aAAa,CAAC,MAAM,CAAC,GAAG,eAAe,GAAG,mBAAmB,CAC9D,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Type } from '../utils/type.js';
2
+ import type { CommonOptions } from './common.js';
3
+ export type __ObjectOptions = {
4
+ type: 'object';
5
+ /**
6
+ * Target DTO class
7
+ * @returns
8
+ */
9
+ target: () => Type;
10
+ };
11
+ export type ObjectOptions<T = any> = Readonly<CommonOptions<T> & __ObjectOptions>;
12
+ //# sourceMappingURL=object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/lib/property/object.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,QAAQ,CAAC;IAEf;;;OAGG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,GAAG,IAAI,QAAQ,CAC3C,aAAa,CAAC,CAAC,CAAC,GAAG,eAAe,CACnC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export type PropertyType = 'string' | 'number' | 'integer' | 'bigint' | 'date' | 'boolean' | 'array' | 'object';
2
+ //# sourceMappingURL=property-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"property-type.d.ts","sourceRoot":"","sources":["../../../src/lib/property/property-type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,MAAM,GACN,SAAS,GACT,OAAO,GACP,QAAQ,CAAC"}