@nhtio/lucid-resourceful 0.1.0-master-29dd5a13 → 0.1.0-master-641df8fc
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/adonis-env.d.ts +17 -0
- package/bundled_liqe.d.ts +6 -5
- package/bundled_xml_js.d.ts +5 -4
- package/definitions.d.ts +1 -1
- package/encoding.d.ts +6 -6
- package/errors.d.ts +23 -8
- package/{index-Bsyx9Sty.js → index-B-5JiNqG.js} +76 -221
- package/index-B-5JiNqG.js.map +1 -0
- package/{index-B6dIMDux.cjs → index-BrGbuAtt.cjs} +76 -221
- package/index-BrGbuAtt.cjs.map +1 -0
- package/index-C9zyi90j.js.map +1 -1
- package/{index-CpyTnwZV.cjs → index-CQApAM0M.cjs} +298 -353
- package/index-CQApAM0M.cjs.map +1 -0
- package/index-CxRBayw6.cjs.map +1 -1
- package/{index-C8mGEf4P.js → index-DLVvkVxI.js} +295 -350
- package/index-DLVvkVxI.js.map +1 -0
- package/index-DsojAcQ4.js.map +1 -1
- package/index-DuzIXu31.cjs.map +1 -1
- package/index.cjs +1 -1
- package/index.d.ts +7 -7
- package/index.mjs +1 -1
- package/integration/middlewares/odata_error.cjs +1 -1
- package/integration/middlewares/odata_error.d.ts +1 -1
- package/integration/middlewares/odata_error.mjs +1 -1
- package/integration/middlewares/resourceful_encoded_request.cjs +100 -12
- package/integration/middlewares/resourceful_encoded_request.cjs.map +1 -1
- package/integration/middlewares/resourceful_encoded_request.d.ts +1 -1
- package/integration/middlewares/resourceful_encoded_request.mjs +98 -10
- package/integration/middlewares/resourceful_encoded_request.mjs.map +1 -1
- package/integration/middlewares/resourceful_error.cjs +1 -1
- package/integration/middlewares/resourceful_error.d.ts +1 -1
- package/integration/middlewares/resourceful_error.mjs +1 -1
- package/integration/provider.cjs +1 -1
- package/integration/provider.mjs +1 -1
- package/joi.d.ts +1 -1
- package/{manager-OLS5T3G7-CJHhMwR7.cjs → manager-OLS5T3G7-BPVI59Zw.cjs} +2 -2
- package/{manager-OLS5T3G7-CJHhMwR7.cjs.map → manager-OLS5T3G7-BPVI59Zw.cjs.map} +1 -1
- package/{manager-OLS5T3G7-C-NS6lhx.js → manager-OLS5T3G7-DzVckqOB.js} +2 -2
- package/{manager-OLS5T3G7-C-NS6lhx.js.map → manager-OLS5T3G7-DzVckqOB.js.map} +1 -1
- package/odata/context.d.ts +1 -1
- package/odata/macro.d.ts +1 -1
- package/{odata_error_middleware-BWfOpQZV.cjs → odata_error_middleware-DhLzccN7.cjs} +4 -4
- package/{odata_error_middleware-BWfOpQZV.cjs.map → odata_error_middleware-DhLzccN7.cjs.map} +1 -1
- package/{odata_error_middleware-CWYqZMez.js → odata_error_middleware-Dspi8bct.js} +4 -4
- package/{odata_error_middleware-CWYqZMez.js.map → odata_error_middleware-Dspi8bct.js.map} +1 -1
- package/package.json +1 -1
- package/private/data_type_schemas.d.ts +12 -12
- package/private/data_types.d.ts +1 -1
- package/private/decorator_schemas.d.ts +1 -1
- package/private/decorator_utils.d.ts +1 -1
- package/private/decorators.d.ts +14 -11
- package/private/encoding.d.ts +3 -3
- package/private/joi/index.d.ts +3 -3
- package/private/lucene_to_lucid_translator.d.ts +1 -1
- package/private/mixin.d.ts +25 -8
- package/private/odata_macro/controllers/resourceful_model_controller.d.ts +4 -4
- package/private/odata_macro/index.d.ts +1 -1
- package/private/odata_macro/middlewares/odata_error_middleware.d.ts +22 -10
- package/private/odata_macro/services/odata_context_service.d.ts +1 -1
- package/private/odata_macro/services/odata_metadata_service.d.ts +3 -3
- package/private/odata_macro/utils/odata.d.ts +2 -2
- package/private/odata_to_lucid_translator.d.ts +1 -1
- package/private/open_api_schema_service.d.ts +3 -3
- package/private/router_macro/controllers/resourceful_model_controller.d.ts +5 -5
- package/private/router_macro/index.d.ts +3 -3
- package/private/router_macro/middlewares/resourceful_error_middleware.d.ts +22 -10
- package/private/router_macro/services/resourceful_router_choices_service.d.ts +3 -3
- package/private/router_macro/services/resourceful_router_context_service.d.ts +1 -1
- package/private/router_macro/services/resourceful_router_model_options_service.d.ts +1 -1
- package/private/router_macro/services/resourceful_router_model_resolver_service.d.ts +3 -3
- package/private/router_macro/services/resourceful_router_openapi_document_service.d.ts +4 -4
- package/private/router_macro/services/resourceful_router_options_service.d.ts +3 -3
- package/private/router_macro/types.d.ts +15 -8
- package/private/router_macro/utils/errors.d.ts +1 -1
- package/private/router_macro/utils/http.d.ts +1 -1
- package/private/router_macro/utils/openapi_validation_schemas.d.ts +2 -2
- package/private/router_macro/utils/relationships.d.ts +1 -1
- package/private/router_macro/utils/type_guards.d.ts +1 -1
- package/private/schema_types.d.ts +1 -1
- package/private/type_guards.d.ts +5 -5
- package/private/types.d.ts +5 -5
- package/private/utils/casters.d.ts +1 -1
- package/private/utils/consumers.d.ts +1 -1
- package/private/utils/preparers.d.ts +1 -1
- package/private/utils.d.ts +1 -1
- package/{resourceful_error_middleware-CMSZGdoG.js → resourceful_error_middleware-Cb_eTzST.js} +4 -4
- package/{resourceful_error_middleware-CMSZGdoG.js.map → resourceful_error_middleware-Cb_eTzST.js.map} +1 -1
- package/{resourceful_error_middleware-lXgefPIC.cjs → resourceful_error_middleware-CnjbNoev.cjs} +4 -4
- package/{resourceful_error_middleware-lXgefPIC.cjs.map → resourceful_error_middleware-CnjbNoev.cjs.map} +1 -1
- package/router/context.d.ts +1 -1
- package/router/utils.cjs +1 -1
- package/router/utils.d.ts +1 -1
- package/router/utils.mjs +1 -1
- package/router.cjs +1 -1
- package/router.d.ts +2 -2
- package/router.mjs +1 -1
- package/types.d.ts +13 -13
- package/utils.d.ts +4 -4
- package/vite-env.d.ts +3 -0
- package/index-B6dIMDux.cjs.map +0 -1
- package/index-Bsyx9Sty.js.map +0 -1
- package/index-C8mGEf4P.js.map +0 -1
- package/index-CpIq4gOr.js +0 -93
- package/index-CpIq4gOr.js.map +0 -1
- package/index-CpyTnwZV.cjs.map +0 -1
- package/index-DqbJXpcT.cjs +0 -92
- package/index-DqbJXpcT.cjs.map +0 -1
- package/private/controller_factory.d.ts +0 -1
- package/private/utils/function_serializer.d.ts +0 -32
package/adonis-env.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { odataRouterMacro } from "./private/odata_macro/index";
|
|
2
|
+
import type { resourcefulRouterMacro } from "./private/router_macro/index";
|
|
3
|
+
import type { odataXmlResponseMacro } from "./odata/macro";
|
|
4
|
+
declare module '@adonisjs/core/http' {
|
|
5
|
+
export interface Router {
|
|
6
|
+
resourceful: typeof resourcefulRouterMacro;
|
|
7
|
+
resourcefulOdata: typeof odataRouterMacro;
|
|
8
|
+
}
|
|
9
|
+
export interface Response {
|
|
10
|
+
oXml: typeof odataXmlResponseMacro;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
declare module '@adonisjs/http-server' {
|
|
14
|
+
export interface Request {
|
|
15
|
+
bodyType: 'unknown' | 'urlencoded' | 'multipart' | 'json' | 'raw' | 'resourceful-encoded';
|
|
16
|
+
}
|
|
17
|
+
}
|
package/bundled_liqe.d.ts
CHANGED
|
@@ -39,12 +39,13 @@ export declare type FieldToken = {
|
|
|
39
39
|
|
|
40
40
|
export declare const filter: <T extends Object>(ast: LiqeQuery, data: readonly T[]) => readonly T[];
|
|
41
41
|
|
|
42
|
-
export declare
|
|
42
|
+
export declare const highlight: <T extends Object>(ast: LiqeQuery, data: T) => Highlight_2[];
|
|
43
|
+
|
|
44
|
+
declare type Highlight_2 = {
|
|
43
45
|
path: string;
|
|
44
46
|
query?: RegExp;
|
|
45
47
|
};
|
|
46
|
-
|
|
47
|
-
export declare const highlight: <T extends Object>(ast: LiqeQuery, data: T) => Highlight[];
|
|
48
|
+
export { Highlight_2 as Highlight }
|
|
48
49
|
|
|
49
50
|
export declare type ImplicitBooleanOperatorToken = {
|
|
50
51
|
operator: 'AND';
|
|
@@ -99,7 +100,7 @@ export declare const parse: (query: string) => LiqeQuery;
|
|
|
99
100
|
|
|
100
101
|
export declare type ParserAst = EmptyExpression | LogicalExpressionToken | ParenthesizedExpressionToken | TagToken | UnaryOperatorToken;
|
|
101
102
|
|
|
102
|
-
declare type
|
|
103
|
+
declare type Range_2 = {
|
|
103
104
|
max: number;
|
|
104
105
|
maxInclusive: boolean;
|
|
105
106
|
min: number;
|
|
@@ -108,7 +109,7 @@ declare type Range = {
|
|
|
108
109
|
|
|
109
110
|
export declare type RangeExpressionToken = {
|
|
110
111
|
location: TokenLocation;
|
|
111
|
-
range:
|
|
112
|
+
range: Range_2;
|
|
112
113
|
type: 'RangeExpression';
|
|
113
114
|
};
|
|
114
115
|
|
package/bundled_xml_js.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare interface DeclarationAttributes {
|
|
|
8
8
|
standalone?: 'yes' | 'no'
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
declare interface Element_2 {
|
|
12
12
|
declaration?: {
|
|
13
13
|
attributes?: DeclarationAttributes
|
|
14
14
|
}
|
|
@@ -20,8 +20,9 @@ export declare interface Element {
|
|
|
20
20
|
text?: string | number | boolean
|
|
21
21
|
type?: string
|
|
22
22
|
name?: string
|
|
23
|
-
elements?: Array<
|
|
23
|
+
elements?: Array<Element_2>
|
|
24
24
|
}
|
|
25
|
+
export { Element_2 as Element }
|
|
25
26
|
|
|
26
27
|
export declare interface ElementCompact {
|
|
27
28
|
[key: string]: any
|
|
@@ -38,7 +39,7 @@ export declare interface ElementCompact {
|
|
|
38
39
|
_text?: string | number
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
export declare function js2xml(obj:
|
|
42
|
+
export declare function js2xml(obj: Element_2 | ElementCompact, options?: Options.JS2XML): string;
|
|
42
43
|
|
|
43
44
|
export declare function json2xml(json: string, options?: Options.JS2XML): string;
|
|
44
45
|
|
|
@@ -152,7 +153,7 @@ export declare namespace Options {
|
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
|
|
155
|
-
export declare function xml2js(xml: string, options?: Options.XML2JS):
|
|
156
|
+
export declare function xml2js(xml: string, options?: Options.XML2JS): Element_2 | ElementCompact;
|
|
156
157
|
|
|
157
158
|
export declare function xml2json(xml: string, options?: Options.XML2JSON): string;
|
|
158
159
|
|
package/definitions.d.ts
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Column Data Type Definition Helpers for Resourceful Lucid Models
|
|
3
3
|
* @module @nhtio/lucid-resourceful/definitions
|
|
4
4
|
*/
|
|
5
|
-
export { ResourcefulStringType, ResourcefulDateType, ResourcefulDateTimeType, ResourcefulBinaryType, ResourcefulNumberType, ResourcefulIntegerType, ResourcefulBigintType, ResourcefulUnsignedIntegerType, ResourcefulBooleanType, ResourcefulObjectType, ResourcefulArrayType, } from
|
|
5
|
+
export { ResourcefulStringType, ResourcefulDateType, ResourcefulDateTimeType, ResourcefulBinaryType, ResourcefulNumberType, ResourcefulIntegerType, ResourcefulBigintType, ResourcefulUnsignedIntegerType, ResourcefulBooleanType, ResourcefulObjectType, ResourcefulArrayType, } from "./private/data_types";
|
package/encoding.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Portable cross-environment encoding and decoding of structured data.
|
|
3
3
|
* @module @nhtio/lucid-resourceful/encoding
|
|
4
4
|
*/
|
|
5
|
-
export { encode, decode, version } from
|
|
6
|
-
export { E_UNENCODABLE_VALUE, E_CIRCULAR_REFERENCE, E_UNDECODABLE_VALUE, E_NOT_AN_ENCODED_VALUE, E_INVALID_VERSION, E_INCOMPATIBLE_VERSION, } from
|
|
7
|
-
export { FunctionSerializer } from
|
|
8
|
-
export type { Encodable } from
|
|
9
|
-
export type { BaseException } from
|
|
10
|
-
export type { DehydratedFunctionValue } from
|
|
5
|
+
export { encode, decode, version } from "./bundled_nhtio_encoder";
|
|
6
|
+
export { E_UNENCODABLE_VALUE, E_CIRCULAR_REFERENCE, E_UNDECODABLE_VALUE, E_NOT_AN_ENCODED_VALUE, E_INVALID_VERSION, E_INCOMPATIBLE_VERSION, } from "./bundled_nhtio_encoder_exceptions";
|
|
7
|
+
export { FunctionSerializer } from "./bundled_nhtio_encoder_function_serializer";
|
|
8
|
+
export type { Encodable } from "./bundled_nhtio_encoder";
|
|
9
|
+
export type { BaseException } from "./bundled_nhtio_encoder_exceptions";
|
|
10
|
+
export type { DehydratedFunctionValue } from "./bundled_nhtio_encoder_function_serializer";
|
package/errors.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @module @nhtio/lucid-resourceful/errors
|
|
4
4
|
*/
|
|
5
5
|
import { Exception } from '@poppinss/utils';
|
|
6
|
-
import type { SyntaxError } from
|
|
7
|
-
import type { ValidationError } from
|
|
6
|
+
import type { SyntaxError } from "./bundled_liqe";
|
|
7
|
+
import type { ValidationError } from "./joi";
|
|
8
8
|
export declare class E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS extends Exception {
|
|
9
9
|
static status: number;
|
|
10
10
|
static code: string;
|
|
@@ -17,9 +17,18 @@ export declare class E_INVALID_RESOURCEFUL_MIXIN_OPTIONS extends Exception {
|
|
|
17
17
|
readonly details?: ValidationError['details'];
|
|
18
18
|
constructor(name: string, reason?: ValidationError);
|
|
19
19
|
}
|
|
20
|
-
export declare const E_INVALID_PREPARED_VALUE: new (args: [
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
export declare const E_INVALID_PREPARED_VALUE: new (args: [
|
|
21
|
+
string,
|
|
22
|
+
string
|
|
23
|
+
], options?: globalThis.ErrorOptions) => Exception;
|
|
24
|
+
export declare const E_INVALID_CONSUMED_VALUE: new (args: [
|
|
25
|
+
string,
|
|
26
|
+
any,
|
|
27
|
+
string
|
|
28
|
+
], options?: globalThis.ErrorOptions) => Exception;
|
|
29
|
+
export declare const E_UNCASTABLE: new (args: [
|
|
30
|
+
string
|
|
31
|
+
], options?: globalThis.ErrorOptions) => Exception;
|
|
23
32
|
export declare class E_INVALID_RESOURCEFUL_DECORATOR_OPTIONS extends Exception {
|
|
24
33
|
static status: number;
|
|
25
34
|
static code: string;
|
|
@@ -193,14 +202,20 @@ export declare class E_RESOURCEFUL_ROUTER_MISCONFIGURED extends Exception {
|
|
|
193
202
|
static code: string;
|
|
194
203
|
constructor(reason?: unknown);
|
|
195
204
|
}
|
|
196
|
-
export declare const E_ROUTE_NOT_FOUND: new (args: [
|
|
205
|
+
export declare const E_ROUTE_NOT_FOUND: new (args: [
|
|
206
|
+
method: string,
|
|
207
|
+
url: string
|
|
208
|
+
], options?: globalThis.ErrorOptions) => Exception;
|
|
197
209
|
export declare class E_NOT_IN_MODEL_CONTEXT extends Exception {
|
|
198
210
|
static status: number;
|
|
199
211
|
static code: string;
|
|
200
212
|
constructor(reason?: unknown);
|
|
201
213
|
}
|
|
202
|
-
export declare const E_INVALID_HTTP_METHOD_EXCEPTION: new (args: [
|
|
203
|
-
|
|
214
|
+
export declare const E_INVALID_HTTP_METHOD_EXCEPTION: new (args: [
|
|
215
|
+
method: string,
|
|
216
|
+
path: string
|
|
217
|
+
], options?: globalThis.ErrorOptions) => Exception;
|
|
218
|
+
export { UNIQUE_CONSTRAINT_VIOLATION, FOREIGN_KEY_VIOLATION, NOT_NULL_VIOLATION, CHECK_CONSTRAINT_VIOLATION, DATA_VALIDATION_ERROR, INVALID_DATA_TYPE, DEADLOCK, LOCK_TIMEOUT, SCHEMA_ERROR, DATABASE_CONNECTION_ERROR, PERMISSION_DENIED, SERIALIZATION_FAILURE, QUERY_SYNTAX_ERROR, DIVISION_BY_ZERO, } from "./private/router_macro/utils/errors";
|
|
204
219
|
export declare class E_NOT_IN_ODATA_CONTEXT extends Exception {
|
|
205
220
|
static status: number;
|
|
206
221
|
static code: string;
|