@nhtio/lucid-resourceful 1.20250718.0

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 (68) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +5 -0
  3. package/decorator_utils-1yWqd_Gg.cjs +6792 -0
  4. package/decorator_utils-1yWqd_Gg.cjs.map +1 -0
  5. package/decorator_utils-BUuBwQYK.js +6793 -0
  6. package/decorator_utils-BUuBwQYK.js.map +1 -0
  7. package/definitions-B66EPk0H.js +381 -0
  8. package/definitions-B66EPk0H.js.map +1 -0
  9. package/definitions-BrN-oCRI.cjs +380 -0
  10. package/definitions-BrN-oCRI.cjs.map +1 -0
  11. package/definitions.cjs +15 -0
  12. package/definitions.cjs.map +1 -0
  13. package/definitions.d.ts +5 -0
  14. package/definitions.mjs +15 -0
  15. package/definitions.mjs.map +1 -0
  16. package/errors-B1rr67uM.js +3004 -0
  17. package/errors-B1rr67uM.js.map +1 -0
  18. package/errors-D8jb9VxY.cjs +3000 -0
  19. package/errors-D8jb9VxY.cjs.map +1 -0
  20. package/errors.cjs +22 -0
  21. package/errors.cjs.map +1 -0
  22. package/errors.d.ts +94 -0
  23. package/errors.mjs +22 -0
  24. package/errors.mjs.map +1 -0
  25. package/index-Cv6KC1rC.cjs +670 -0
  26. package/index-Cv6KC1rC.cjs.map +1 -0
  27. package/index-DDaZ2qr2.js +671 -0
  28. package/index-DDaZ2qr2.js.map +1 -0
  29. package/index.cjs +12706 -0
  30. package/index.cjs.map +1 -0
  31. package/index.d.ts +14 -0
  32. package/index.mjs +12708 -0
  33. package/index.mjs.map +1 -0
  34. package/joi.cjs +5 -0
  35. package/joi.cjs.map +1 -0
  36. package/joi.d.ts +5 -0
  37. package/joi.mjs +5 -0
  38. package/joi.mjs.map +1 -0
  39. package/package.json +65 -0
  40. package/private/constants.d.ts +11 -0
  41. package/private/controller_factory.d.ts +1 -0
  42. package/private/data_type_schemas.d.ts +12 -0
  43. package/private/data_types.d.ts +437 -0
  44. package/private/decorator_schemas.d.ts +34 -0
  45. package/private/decorator_utils.d.ts +305 -0
  46. package/private/decorators.d.ts +209 -0
  47. package/private/helpers.d.ts +34 -0
  48. package/private/joi/bigint.d.ts +85 -0
  49. package/private/joi/index.d.ts +65 -0
  50. package/private/lucene_to_lucid_translator.d.ts +201 -0
  51. package/private/mixin.d.ts +563 -0
  52. package/private/schema_types.d.ts +157 -0
  53. package/private/type_guards.d.ts +42 -0
  54. package/private/types.d.ts +102 -0
  55. package/private/utils.d.ts +10 -0
  56. package/types.cjs +2 -0
  57. package/types.cjs.map +1 -0
  58. package/types.d.ts +28 -0
  59. package/types.mjs +2 -0
  60. package/types.mjs.map +1 -0
  61. package/utils/casters.d.ts +1 -0
  62. package/utils/consumers.d.ts +1 -0
  63. package/utils/preparers.d.ts +1 -0
  64. package/utils.cjs +50 -0
  65. package/utils.cjs.map +1 -0
  66. package/utils.d.ts +20 -0
  67. package/utils.mjs +51 -0
  68. package/utils.mjs.map +1 -0
package/errors.d.ts ADDED
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Errors thrown by the Lucid Resourceful Library
3
+ * @module @nhtio/lucid-resourceful/errors
4
+ */
5
+ import { Exception } from '@poppinss/utils';
6
+ import type { SyntaxError } from 'liqe';
7
+ import type { ValidationError } from 'joi';
8
+ export declare class E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS extends Exception {
9
+ static status: number;
10
+ static code: string;
11
+ readonly details?: ValidationError['details'];
12
+ constructor(name: string, reason?: ValidationError);
13
+ }
14
+ export declare class E_INVALID_RESOURCEFUL_MIXIN_OPTIONS extends Exception {
15
+ static status: number;
16
+ static code: string;
17
+ readonly details?: ValidationError['details'];
18
+ constructor(name: string, reason?: ValidationError);
19
+ }
20
+ export declare const E_INVALID_PREPARED_VALUE: new (args: [string, string], options?: ErrorOptions) => Exception;
21
+ export declare const E_INVALID_CONSUMED_VALUE: new (args: [string, string], options?: ErrorOptions) => Exception;
22
+ export declare const E_UNCASTABLE: new (args: [string], options?: ErrorOptions) => Exception;
23
+ export declare class E_INVALID_RESOURCEFUL_DECORATOR_OPTIONS extends Exception {
24
+ static status: number;
25
+ static code: string;
26
+ readonly details?: ValidationError['details'];
27
+ constructor(decoratorName: string, fieldName: string, reason?: ValidationError);
28
+ }
29
+ export declare class E_FORBIDDEN extends Exception {
30
+ static status: number;
31
+ static code: string;
32
+ constructor(message: string);
33
+ }
34
+ export declare class E_INVALID_LUCENE_QUERY extends Exception {
35
+ static status: number;
36
+ static code: string;
37
+ constructor(message: string);
38
+ }
39
+ export declare class E_INVALID_COLUMN_ACCESS extends Exception {
40
+ static status: number;
41
+ static code: string;
42
+ constructor(columnName: string);
43
+ }
44
+ export declare class E_UNEXPECTED_COLUMN_IN_QUERY extends Exception {
45
+ static status: number;
46
+ static code: string;
47
+ constructor(columnName: string);
48
+ }
49
+ export declare class E_LUCENE_SYNTAX_EXCEPTION extends Exception {
50
+ static status: number;
51
+ static code: string;
52
+ readonly offset: number;
53
+ readonly line: number;
54
+ readonly column: number;
55
+ constructor(original: SyntaxError);
56
+ }
57
+ export declare class E_LUCENE_UNEXPECTED_EXCEPTION extends Exception {
58
+ static status: number;
59
+ static code: string;
60
+ constructor(original: unknown);
61
+ }
62
+ export declare class E_LUCENE_INVALID_TYPE extends Exception {
63
+ static status: number;
64
+ static code: string;
65
+ constructor(type: string);
66
+ }
67
+ export declare class E_INVALID_RESOUREFUL_INDEX_REQUEST_EXCEPTION extends Exception {
68
+ static status: number;
69
+ static code: string;
70
+ readonly details?: ValidationError['details'];
71
+ constructor(reason?: ValidationError);
72
+ }
73
+ export declare class E_MISSING_PRIMARY_KEY_EXCEPTION extends Exception {
74
+ static status: number;
75
+ static code: string;
76
+ constructor(type: string);
77
+ }
78
+ export declare class E_RECORD_NOT_FOUND_EXCEPTION extends Exception {
79
+ static status: number;
80
+ static code: string;
81
+ constructor();
82
+ }
83
+ export declare class E_INVALID_PAYLOAD_EXCEPTION extends Exception {
84
+ static status: number;
85
+ static code: string;
86
+ readonly details?: ValidationError['details'];
87
+ constructor(reason?: ValidationError);
88
+ }
89
+ export declare class E_FORBIDDEN_PAYLOAD_EXCEPTION extends Exception {
90
+ static status: number;
91
+ static code: string;
92
+ readonly details?: ValidationError['details'];
93
+ constructor(reason?: ValidationError);
94
+ }
package/errors.mjs ADDED
@@ -0,0 +1,22 @@
1
+ import { i, n, j, c, x, m, b, E, v, g, k, f, d, e, h, l, a, y } from "./errors-B1rr67uM.js";
2
+ export {
3
+ i as E_FORBIDDEN,
4
+ n as E_FORBIDDEN_PAYLOAD_EXCEPTION,
5
+ j as E_INVALID_COLUMN_ACCESS,
6
+ c as E_INVALID_CONSUMED_VALUE,
7
+ x as E_INVALID_LUCENE_QUERY,
8
+ m as E_INVALID_PAYLOAD_EXCEPTION,
9
+ b as E_INVALID_PREPARED_VALUE,
10
+ E as E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS,
11
+ v as E_INVALID_RESOURCEFUL_DECORATOR_OPTIONS,
12
+ g as E_INVALID_RESOURCEFUL_MIXIN_OPTIONS,
13
+ k as E_INVALID_RESOUREFUL_INDEX_REQUEST_EXCEPTION,
14
+ f as E_LUCENE_INVALID_TYPE,
15
+ d as E_LUCENE_SYNTAX_EXCEPTION,
16
+ e as E_LUCENE_UNEXPECTED_EXCEPTION,
17
+ h as E_MISSING_PRIMARY_KEY_EXCEPTION,
18
+ l as E_RECORD_NOT_FOUND_EXCEPTION,
19
+ a as E_UNCASTABLE,
20
+ y as E_UNEXPECTED_COLUMN_IN_QUERY
21
+ };
22
+ //# sourceMappingURL=errors.mjs.map
package/errors.mjs.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}