@ez4/gateway 0.35.1 → 0.37.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.
- package/README.md +120 -2
- package/dist/client/authorization.d.ts +1 -1
- package/dist/client/operations.d.ts +1 -2
- package/dist/errors/auth/authorizer.d.ts +4 -0
- package/dist/errors/{identity.d.ts → auth/identity.d.ts} +4 -2
- package/dist/errors/body.d.ts +4 -2
- package/dist/errors/defaults.d.ts +4 -2
- package/dist/errors/headers.d.ts +4 -2
- package/dist/errors/{authorization.d.ts → http/authorization.d.ts} +4 -2
- package/dist/errors/{cache.d.ts → http/cache.d.ts} +4 -2
- package/dist/errors/{cors.d.ts → http/cors.d.ts} +5 -3
- package/dist/errors/parameters.d.ts +9 -3
- package/dist/errors/preferences.d.ts +4 -2
- package/dist/errors/query.d.ts +4 -2
- package/dist/errors/ws/event.d.ts +10 -0
- package/dist/errors/{authorizer.d.ts → ws/target.d.ts} +1 -1
- package/dist/library.cjs +464 -310
- package/dist/library.d.ts +17 -14
- package/dist/library.mjs +445 -293
- package/dist/main.cjs +15 -14
- package/dist/main.d.ts +5 -3
- package/dist/main.mjs +8 -6
- package/dist/metadata/auth/handler.d.ts +4 -0
- package/dist/metadata/auth/identity.d.ts +6 -0
- package/dist/metadata/auth/request.d.ts +4 -0
- package/dist/metadata/auth/response.d.ts +4 -0
- package/dist/metadata/auth/types.d.ts +20 -0
- package/dist/metadata/body.d.ts +4 -3
- package/dist/metadata/headers.d.ts +3 -2
- package/dist/metadata/http/access.d.ts +4 -0
- package/dist/metadata/http/authorization.d.ts +4 -0
- package/dist/metadata/http/cache.d.ts +4 -0
- package/dist/metadata/http/cors.d.ts +4 -0
- package/dist/metadata/http/defaults.d.ts +4 -0
- package/dist/metadata/http/errors.d.ts +4 -0
- package/dist/metadata/http/handler.d.ts +4 -0
- package/dist/metadata/http/import.d.ts +7 -0
- package/dist/metadata/http/request.d.ts +4 -0
- package/dist/metadata/http/response.d.ts +4 -0
- package/dist/metadata/http/routes.d.ts +5 -0
- package/dist/metadata/http/service.d.ts +7 -0
- package/dist/metadata/http/types.d.ts +117 -0
- package/dist/metadata/parameters.d.ts +3 -2
- package/dist/metadata/preferences.d.ts +4 -3
- package/dist/metadata/provider.d.ts +4 -3
- package/dist/metadata/query.d.ts +3 -2
- package/dist/metadata/types.d.ts +4 -0
- package/dist/metadata/utils/name.d.ts +2 -0
- package/dist/metadata/utils/path.d.ts +2 -0
- package/dist/metadata/utils/provider.d.ts +4 -0
- package/dist/metadata/utils/schema.d.ts +3 -0
- package/dist/metadata/utils/validator.d.ts +5 -0
- package/dist/metadata/ws/connection.d.ts +4 -0
- package/dist/metadata/ws/defaults.d.ts +5 -0
- package/dist/metadata/ws/event.d.ts +4 -0
- package/dist/metadata/ws/handlers.d.ts +4 -0
- package/dist/metadata/ws/message.d.ts +4 -0
- package/dist/metadata/ws/request.d.ts +4 -0
- package/dist/metadata/ws/response.d.ts +4 -0
- package/dist/metadata/ws/service.d.ts +7 -0
- package/dist/metadata/ws/types.d.ts +83 -0
- package/dist/services/auth/cache.d.ts +9 -0
- package/dist/services/auth/handler.d.ts +9 -0
- package/dist/services/auth/identity.d.ts +5 -0
- package/dist/services/auth/incoming.d.ts +22 -0
- package/dist/services/auth/provider.d.ts +11 -0
- package/dist/services/auth/request.d.ts +20 -0
- package/dist/services/auth/response.d.ts +10 -0
- package/dist/services/body.d.ts +13 -0
- package/dist/services/defaults.d.ts +7 -16
- package/dist/services/errors.d.ts +6 -0
- package/dist/services/headers.d.ts +10 -0
- package/dist/services/{client.d.ts → http/client.d.ts} +3 -3
- package/dist/services/{contract.d.ts → http/contract.d.ts} +45 -31
- package/dist/services/http/defaults.d.ts +17 -0
- package/dist/services/http/errors.d.ts +6 -0
- package/dist/services/http/handler.d.ts +10 -0
- package/dist/services/http/incoming.d.ts +30 -0
- package/dist/services/http/listener.d.ts +9 -0
- package/dist/services/http/path.d.ts +2 -0
- package/dist/services/http/request.d.ts +30 -0
- package/dist/services/http/response.d.ts +19 -0
- package/dist/services/http/route.d.ts +45 -0
- package/dist/services/{utils.d.ts → http/utils.d.ts} +13 -5
- package/dist/services/parameters.d.ts +5 -0
- package/dist/services/preferences.d.ts +2 -2
- package/dist/services/query.d.ts +5 -0
- package/dist/services/target.d.ts +27 -0
- package/dist/services/ws/client.d.ts +19 -0
- package/dist/services/ws/connect.d.ts +23 -0
- package/dist/services/ws/contract.d.ts +110 -0
- package/dist/services/ws/defaults.d.ts +13 -0
- package/dist/services/ws/disconnect.d.ts +17 -0
- package/dist/services/ws/event.d.ts +20 -0
- package/dist/services/ws/handler.d.ts +10 -0
- package/dist/services/ws/incoming.d.ts +19 -0
- package/dist/services/ws/listener.d.ts +9 -0
- package/dist/services/ws/message.d.ts +17 -0
- package/dist/services/ws/request.d.ts +15 -0
- package/dist/services/ws/response.d.ts +10 -0
- package/dist/services/ws/utils.d.ts +11 -0
- package/dist/utils/body.d.ts +4 -3
- package/dist/utils/client.d.ts +4 -4
- package/dist/utils/errors.d.ts +1 -0
- package/dist/utils/headers.d.ts +3 -2
- package/dist/utils/identity.d.ts +3 -2
- package/dist/utils/parameters.d.ts +3 -2
- package/dist/utils/query.d.ts +3 -2
- package/dist/utils/validation.d.ts +2 -0
- package/dist/utils.cjs +62 -55
- package/dist/utils.d.ts +2 -1
- package/dist/utils.mjs +54 -52
- package/package.json +8 -8
- package/dist/metadata/access.d.ts +0 -3
- package/dist/metadata/authorization.d.ts +0 -3
- package/dist/metadata/authorizer.d.ts +0 -3
- package/dist/metadata/cache.d.ts +0 -3
- package/dist/metadata/cors.d.ts +0 -3
- package/dist/metadata/defaults.d.ts +0 -3
- package/dist/metadata/errors.d.ts +0 -4
- package/dist/metadata/handler.d.ts +0 -3
- package/dist/metadata/identity.d.ts +0 -5
- package/dist/metadata/import.d.ts +0 -6
- package/dist/metadata/request.d.ts +0 -4
- package/dist/metadata/response.d.ts +0 -4
- package/dist/metadata/route.d.ts +0 -4
- package/dist/metadata/schema.d.ts +0 -3
- package/dist/metadata/service.d.ts +0 -6
- package/dist/metadata/utils.d.ts +0 -24
- package/dist/services/cache.d.ts +0 -9
- package/dist/services/common.d.ts +0 -147
- package/dist/services/route.d.ts +0 -56
- package/dist/types/common.d.ts +0 -95
- package/dist/types/import.d.ts +0 -14
- package/dist/types/service.d.ts +0 -14
- /package/dist/errors/{access.d.ts → http/access.d.ts} +0 -0
- /package/dist/errors/{provider.d.ts → http/provider.d.ts} +0 -0
- /package/dist/errors/{route.d.ts → http/route.d.ts} +0 -0
- /package/dist/services/{access.d.ts → http/access.d.ts} +0 -0
- /package/dist/services/{authorization.d.ts → http/authorization.d.ts} +0 -0
- /package/dist/services/{cors.d.ts → http/cors.d.ts} +0 -0
- /package/dist/services/{provider.d.ts → http/provider.d.ts} +0 -0
package/dist/main.cjs
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var
|
|
2
|
-
typeof e=="object"||typeof e=="function")for(let p of
|
|
3
|
-
a(r,p,{get:()=>e[p],enumerable:!(n=
|
|
4
|
-
|
|
5
|
-
HttpUnprocessableEntityError:()=>
|
|
6
|
-
exports=
|
|
1
|
+
"use strict";var a=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var W=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var o=(r,e)=>a(r,"name",{value:e,configurable:!0});var g=(r,e)=>{for(var t in e)a(r,t,{get:e[t],enumerable:!0})},H=(r,e,t,n)=>{if(e&&
|
|
2
|
+
typeof e=="object"||typeof e=="function")for(let p of W(e))!A.call(r,p)&&p!==t&&
|
|
3
|
+
a(r,p,{get:()=>e[p],enumerable:!(n=v(e,p))||n.enumerable});return r};var q=r=>H(a({},"__esModule",{value:!0}),r);var b={};g(b,{AuthorizationType:()=>y,Http:()=>h,HttpBadRequestError:()=>i,HttpConflictError:()=>d,
|
|
4
|
+
HttpError:()=>s,HttpForbiddenError:()=>c,HttpInternalServerError:()=>f,HttpNotFoundError:()=>m,
|
|
5
|
+
HttpUnauthorizedError:()=>u,HttpUnprocessableEntityError:()=>l,HttpUnsupportedMediaTypeError:()=>x,
|
|
6
|
+
Ws:()=>R});module.exports=q(b);var y=(e=>(e.Bearer="bearer",e))(y||{});var R;(r=>{})(R||={});var h;(r=>{})(h||={});var T=require("@ez4/common");var s=class extends T.ServiceError{constructor(t,n,p){super(n,p);this.status=t}static{
|
|
7
7
|
o(this,"HttpError")}},i=class extends s{static{o(this,"HttpBadRequestError")}constructor(e,t){
|
|
8
8
|
super(400,e||"Bad request",t)}},u=class extends s{static{o(this,"HttpUnauthorize\
|
|
9
|
-
dError")}constructor(e,t){super(401,e||"Unauthorized",t)}},
|
|
10
|
-
o(this,"HttpForbiddenError")}constructor(e,t){super(403,e||"Forbidden",t)}},
|
|
11
|
-
o(this,"HttpNotFoundError")}constructor(e,t){super(404,e||"Not found",t)}},
|
|
9
|
+
dError")}constructor(e,t){super(401,e||"Unauthorized",t)}},c=class extends s{static{
|
|
10
|
+
o(this,"HttpForbiddenError")}constructor(e,t){super(403,e||"Forbidden",t)}},m=class extends s{static{
|
|
11
|
+
o(this,"HttpNotFoundError")}constructor(e,t){super(404,e||"Not found",t)}},d=class extends s{static{
|
|
12
|
+
o(this,"HttpConflictError")}constructor(e,t){super(409,e||"Conflict",t)}},x=class extends s{static{
|
|
12
13
|
o(this,"HttpUnsupportedMediaTypeError")}constructor(e,t){super(415,e||"Unsupport\
|
|
13
|
-
ed media type",t)}},
|
|
14
|
-
r")}constructor(e,t){super(422,e||"Unprocessable entity",t)}},
|
|
14
|
+
ed media type",t)}},l=class extends s{static{o(this,"HttpUnprocessableEntityErro\
|
|
15
|
+
r")}constructor(e,t){super(422,e||"Unprocessable entity",t)}},f=class extends s{static{
|
|
15
16
|
o(this,"HttpInternalServerError")}constructor(e,t){super(500,e||"Internal server\
|
|
16
|
-
error",t)}};0&&(module.exports={AuthorizationType,Http,HttpBadRequestError,
|
|
17
|
-
HttpInternalServerError,HttpNotFoundError,HttpUnauthorizedError,
|
|
18
|
-
HttpUnsupportedMediaTypeError});
|
|
17
|
+
error",t)}};0&&(module.exports={AuthorizationType,Http,HttpBadRequestError,HttpConflictError,
|
|
18
|
+
HttpError,HttpForbiddenError,HttpInternalServerError,HttpNotFoundError,HttpUnauthorizedError,
|
|
19
|
+
HttpUnprocessableEntityError,HttpUnsupportedMediaTypeError,Ws});
|
|
19
20
|
//# sourceMappingURL=main.cjs.map
|
package/dist/main.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export
|
|
1
|
+
export { AuthorizationType } from './services/http/authorization';
|
|
2
|
+
export { HttpClient, HttpClientRequest, HttpClientResponse } from './services/http/client';
|
|
3
|
+
export { WsClient } from './services/ws/client';
|
|
4
|
+
export * from './services/ws/contract';
|
|
5
|
+
export * from './services/http/contract';
|
|
4
6
|
export * from './services/errors';
|
package/dist/main.mjs
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
var
|
|
1
|
+
var f=Object.defineProperty;var s=(r,e)=>f(r,"name",{value:e,configurable:!0});var p=(e=>(e.Bearer="bearer",e))(p||{});var R;(r=>{})(R||={});var h;(r=>{})(h||={});import{ServiceError as T}from"@ez4/common";var o=class extends T{constructor(t,x,l){super(x,l);this.status=t}static{s(this,
|
|
2
2
|
"HttpError")}},n=class extends o{static{s(this,"HttpBadRequestError")}constructor(e,t){
|
|
3
3
|
super(400,e||"Bad request",t)}},a=class extends o{static{s(this,"HttpUnauthorize\
|
|
4
|
-
dError")}constructor(e,t){super(401,e||"Unauthorized",t)}},
|
|
4
|
+
dError")}constructor(e,t){super(401,e||"Unauthorized",t)}},y=class extends o{static{
|
|
5
5
|
s(this,"HttpForbiddenError")}constructor(e,t){super(403,e||"Forbidden",t)}},i=class extends o{static{
|
|
6
6
|
s(this,"HttpNotFoundError")}constructor(e,t){super(404,e||"Not found",t)}},u=class extends o{static{
|
|
7
|
+
s(this,"HttpConflictError")}constructor(e,t){super(409,e||"Conflict",t)}},c=class extends o{static{
|
|
7
8
|
s(this,"HttpUnsupportedMediaTypeError")}constructor(e,t){super(415,e||"Unsupport\
|
|
8
|
-
ed media type",t)}},
|
|
9
|
+
ed media type",t)}},m=class extends o{static{s(this,"HttpUnprocessableEntityErro\
|
|
9
10
|
r")}constructor(e,t){super(422,e||"Unprocessable entity",t)}},d=class extends o{static{
|
|
10
11
|
s(this,"HttpInternalServerError")}constructor(e,t){super(500,e||"Internal server\
|
|
11
|
-
error",t)}};export{p as AuthorizationType,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
error",t)}};export{p as AuthorizationType,h as Http,n as HttpBadRequestError,u as HttpConflictError,
|
|
13
|
+
o as HttpError,y as HttpForbiddenError,d as HttpInternalServerError,i as HttpNotFoundError,
|
|
14
|
+
a as HttpUnauthorizedError,m as HttpUnprocessableEntityError,c as HttpUnsupportedMediaTypeError,
|
|
15
|
+
R as Ws};
|
|
14
16
|
//# sourceMappingURL=main.mjs.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeCallback, TypeFunction, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { AuthHandler } from './types';
|
|
3
|
+
export declare const isAuthHandlerDeclaration: (type: AllType) => type is TypeCallback | TypeFunction;
|
|
4
|
+
export declare const getAuthHandlerMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[], namespace: string) => AuthHandler | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeIntersection, TypeModel, TypeObject } from '@ez4/reflection';
|
|
2
|
+
import type { ObjectSchema, UnionSchema } from '@ez4/schema';
|
|
3
|
+
type TypeParent = TypeObject | TypeModel | TypeIntersection;
|
|
4
|
+
export declare const isAuthIdentityDeclaration: (type: TypeModel, namespace: string) => boolean;
|
|
5
|
+
export declare const getAuthIdentityMetadata: (type: AllType, parent: TypeParent, reflection: ReflectionTypes, errorList: Error[], namespace: string) => ObjectSchema | UnionSchema | undefined;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { AuthRequest } from '../auth/types';
|
|
3
|
+
export declare const isAuthRequestDeclaration: (type: TypeModel, namespace: string) => boolean;
|
|
4
|
+
export declare const getAuthRequestMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[], namespace: string) => AuthRequest | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { AuthResponse } from '../auth/types';
|
|
3
|
+
export declare const isAuthResponseDeclaration: (type: TypeModel, namespace: string) => boolean;
|
|
4
|
+
export declare const getAuthResponseMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[], namespace: string) => AuthResponse | undefined;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { LinkedServices, LinkedVariables } from '@ez4/project/library';
|
|
2
|
+
import type { FunctionSignature } from '@ez4/common/library';
|
|
3
|
+
import type { ObjectSchema, UnionSchema } from '@ez4/schema';
|
|
4
|
+
export type AuthHandler = FunctionSignature & {
|
|
5
|
+
provider?: AuthProvider;
|
|
6
|
+
response?: AuthResponse;
|
|
7
|
+
request?: AuthRequest;
|
|
8
|
+
};
|
|
9
|
+
export type AuthResponse = {
|
|
10
|
+
identity?: ObjectSchema | UnionSchema;
|
|
11
|
+
};
|
|
12
|
+
export type AuthRequest = {
|
|
13
|
+
headers?: ObjectSchema;
|
|
14
|
+
parameters?: ObjectSchema;
|
|
15
|
+
query?: ObjectSchema;
|
|
16
|
+
};
|
|
17
|
+
export type AuthProvider = {
|
|
18
|
+
variables?: LinkedVariables;
|
|
19
|
+
services?: LinkedServices;
|
|
20
|
+
};
|
package/dist/metadata/body.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { AllType,
|
|
2
|
-
import type { ArraySchema, ObjectSchema, UnionSchema } from '@ez4/schema
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeIntersection, TypeModel, TypeObject } from '@ez4/reflection';
|
|
2
|
+
import type { ArraySchema, ObjectSchema, UnionSchema } from '@ez4/schema';
|
|
3
3
|
type TypeParent = TypeObject | TypeModel | TypeIntersection;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const isWebBodyDeclaration: (type: TypeModel, namespace: string) => boolean;
|
|
5
|
+
export declare const getWebBodyMetadata: (type: AllType, parent: TypeParent, reflection: ReflectionTypes, errorList: Error[], namespace: string) => ObjectSchema | UnionSchema | ArraySchema | import("@ez4/schema").BooleanSchema | import("@ez4/schema").NumberSchema | import("@ez4/schema").StringSchema | undefined;
|
|
5
6
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { AllType,
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeIntersection, TypeModel, TypeObject } from '@ez4/reflection';
|
|
2
2
|
type TypeParent = TypeObject | TypeModel | TypeIntersection;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const isWebHeadersDeclaration: (type: TypeModel, namespace: string) => boolean;
|
|
4
|
+
export declare const getWebHeadersMetadata: (type: AllType, parent: TypeParent, reflection: ReflectionTypes, errorList: Error[], namespace: string) => import("@ez4/schema").ObjectSchema | undefined;
|
|
4
5
|
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { HttpAccess } from './types';
|
|
3
|
+
export declare const isHttpAccessDeclaration: (type: TypeModel) => boolean;
|
|
4
|
+
export declare const getHttpAccessMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => HttpAccess | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { HttpAuthorization } from './types';
|
|
3
|
+
export declare const isHttpAuthorizationDeclaration: (type: TypeModel) => boolean;
|
|
4
|
+
export declare const getHttpAuthorizationMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => HttpAuthorization | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { HttpCache } from './types';
|
|
3
|
+
export declare const isHttpCacheDeclaration: (type: TypeModel) => boolean;
|
|
4
|
+
export declare const getHttpCacheMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => HttpCache | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { HttpCors } from './types';
|
|
3
|
+
export declare const isHttpCorsDeclaration: (type: TypeModel) => boolean;
|
|
4
|
+
export declare const getHttpCorsMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => HttpCors | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import { type HttpDefaults } from './types';
|
|
3
|
+
export declare const isHttpDefaultsDeclaration: (type: TypeModel) => boolean;
|
|
4
|
+
export declare const getHttpDefaultsMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => HttpDefaults | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ModelProperty, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { HttpErrors } from './types';
|
|
3
|
+
export declare const getHttpErrorsMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => HttpErrors | undefined;
|
|
4
|
+
export declare const getErrorClasses: (member: ModelProperty, errorCode: number, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => HttpErrors;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeCallback, TypeFunction, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { HttpHandler } from './types';
|
|
3
|
+
export declare const isHttpHandlerDeclaration: (type: AllType) => type is TypeCallback | TypeFunction;
|
|
4
|
+
export declare const getHttpHandlerMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[], external: boolean) => HttpHandler | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeClass } from '@ez4/reflection';
|
|
2
|
+
import type { HttpImport } from './types';
|
|
3
|
+
export declare const isHttpImportDeclaration: (type: AllType) => type is TypeClass;
|
|
4
|
+
export declare const getHttpImportsMetadata: (reflection: ReflectionTypes) => {
|
|
5
|
+
services: Record<string, HttpImport>;
|
|
6
|
+
errors: Error[];
|
|
7
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { HttpRequest } from './types';
|
|
3
|
+
export declare const isHttpRequestDeclaration: (type: TypeModel) => boolean;
|
|
4
|
+
export declare const getHttpRequestMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => HttpRequest | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { HttpResponse } from './types';
|
|
3
|
+
export declare const isHttpResponseDeclaration: (type: TypeModel) => boolean;
|
|
4
|
+
export declare const getHttpResponseMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => HttpResponse | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AllType, ModelProperty, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { HttpRoute } from './types';
|
|
3
|
+
export declare const isHttpRouteDeclaration: (type: AllType) => type is TypeModel;
|
|
4
|
+
export declare const getHttpLocalRoutes: (parent: TypeModel, member: ModelProperty, reflection: ReflectionTypes, errorList: Error[]) => HttpRoute[] | undefined;
|
|
5
|
+
export declare const getHttpRemoteRoutes: (parent: TypeModel, member: ModelProperty, reflection: ReflectionTypes, errorList: Error[]) => HttpRoute[] | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeClass } from '@ez4/reflection';
|
|
2
|
+
import type { HttpService } from './types';
|
|
3
|
+
export declare const isHttpServiceDeclaration: (type: AllType) => type is TypeClass;
|
|
4
|
+
export declare const getHttpServicesMetadata: (reflection: ReflectionTypes) => {
|
|
5
|
+
services: Record<string, HttpService>;
|
|
6
|
+
errors: Error[];
|
|
7
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { ArraySchema, NamingStyle, ObjectSchema, ScalarSchema, UnionSchema } from '@ez4/schema';
|
|
2
|
+
import type { FunctionSignature, ServiceListener } from '@ez4/common/library';
|
|
3
|
+
import type { LinkedServices, LinkedVariables } from '@ez4/project/library';
|
|
4
|
+
import type { ServiceMetadata } from '@ez4/project/library';
|
|
5
|
+
import type { AuthorizationType } from '../../services/http/authorization';
|
|
6
|
+
import type { HttpPath } from '../../services/http/path';
|
|
7
|
+
import type { AuthHandler } from '../auth/types';
|
|
8
|
+
export declare const HttpServiceType = "@ez4/http";
|
|
9
|
+
export declare const HttpImportType = "@ez4/import:http";
|
|
10
|
+
export declare const HttpNamespaceType = "Http";
|
|
11
|
+
export type HttpDataSchema = ObjectSchema | UnionSchema | ArraySchema | ScalarSchema;
|
|
12
|
+
export type HttpService = Omit<ServiceMetadata, 'variables' | 'services'> & Required<Pick<ServiceMetadata, 'variables' | 'services'>> & {
|
|
13
|
+
type: typeof HttpServiceType;
|
|
14
|
+
displayName?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
defaults?: HttpDefaults;
|
|
17
|
+
routes: HttpRoute[];
|
|
18
|
+
cache?: HttpCache;
|
|
19
|
+
access?: HttpAccess;
|
|
20
|
+
cors?: HttpCors;
|
|
21
|
+
};
|
|
22
|
+
export type HttpImport = ServiceMetadata & {
|
|
23
|
+
type: typeof HttpImportType;
|
|
24
|
+
reference: string;
|
|
25
|
+
project: string;
|
|
26
|
+
displayName?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
defaults?: HttpDefaults;
|
|
29
|
+
authorization?: HttpAuthorization;
|
|
30
|
+
routes: HttpRoute[];
|
|
31
|
+
};
|
|
32
|
+
export type HttpPreferences = {
|
|
33
|
+
namingStyle?: NamingStyle;
|
|
34
|
+
};
|
|
35
|
+
export type HttpAuthorization = {
|
|
36
|
+
type: AuthorizationType;
|
|
37
|
+
header: string;
|
|
38
|
+
value: string;
|
|
39
|
+
};
|
|
40
|
+
export type HttpRequest = {
|
|
41
|
+
identity?: ObjectSchema | UnionSchema;
|
|
42
|
+
headers?: ObjectSchema;
|
|
43
|
+
parameters?: ObjectSchema;
|
|
44
|
+
query?: ObjectSchema;
|
|
45
|
+
body?: HttpDataSchema;
|
|
46
|
+
};
|
|
47
|
+
export type HttpResponse = {
|
|
48
|
+
status: number | number[];
|
|
49
|
+
headers?: ObjectSchema;
|
|
50
|
+
body?: HttpDataSchema;
|
|
51
|
+
};
|
|
52
|
+
export type HttpHandler = FunctionSignature & {
|
|
53
|
+
provider?: HttpProvider;
|
|
54
|
+
response: HttpResponse;
|
|
55
|
+
request?: HttpRequest;
|
|
56
|
+
};
|
|
57
|
+
export type HttpErrors = {
|
|
58
|
+
[name: string]: number;
|
|
59
|
+
};
|
|
60
|
+
export type HttpRoute = {
|
|
61
|
+
name?: string;
|
|
62
|
+
path: HttpPath;
|
|
63
|
+
handler: HttpHandler;
|
|
64
|
+
listener?: ServiceListener;
|
|
65
|
+
authorizer?: AuthHandler;
|
|
66
|
+
variables?: LinkedVariables;
|
|
67
|
+
httpErrors?: HttpErrors;
|
|
68
|
+
preferences?: HttpPreferences;
|
|
69
|
+
logRetention?: number;
|
|
70
|
+
timeout?: number;
|
|
71
|
+
memory?: number;
|
|
72
|
+
cors?: boolean;
|
|
73
|
+
disabled?: boolean;
|
|
74
|
+
};
|
|
75
|
+
export type HttpDefaults = {
|
|
76
|
+
listener?: ServiceListener;
|
|
77
|
+
httpErrors?: HttpErrors;
|
|
78
|
+
preferences?: HttpPreferences;
|
|
79
|
+
logRetention?: number;
|
|
80
|
+
timeout?: number;
|
|
81
|
+
memory?: number;
|
|
82
|
+
};
|
|
83
|
+
export type HttpCache = {
|
|
84
|
+
authorizerTTL?: number;
|
|
85
|
+
};
|
|
86
|
+
export type HttpAccess = {
|
|
87
|
+
logRetention: number;
|
|
88
|
+
};
|
|
89
|
+
export type HttpCors = {
|
|
90
|
+
allowOrigins: string[];
|
|
91
|
+
allowMethods?: string[];
|
|
92
|
+
allowCredentials?: boolean;
|
|
93
|
+
exposeHeaders?: string[];
|
|
94
|
+
allowHeaders?: string[];
|
|
95
|
+
maxAge?: number;
|
|
96
|
+
};
|
|
97
|
+
export type HttpProvider = {
|
|
98
|
+
variables?: LinkedVariables;
|
|
99
|
+
services?: LinkedServices;
|
|
100
|
+
};
|
|
101
|
+
export declare const isHttpService: (service: ServiceMetadata) => service is HttpService;
|
|
102
|
+
export declare const createHttpService: (name: string) => {
|
|
103
|
+
variables: {};
|
|
104
|
+
services: {};
|
|
105
|
+
type: "@ez4/http";
|
|
106
|
+
name: string;
|
|
107
|
+
context: Record<string, import("@ez4/project/library").LinkedContext>;
|
|
108
|
+
displayName?: string | null | undefined;
|
|
109
|
+
description?: string | null | undefined;
|
|
110
|
+
defaults?: HttpDefaults | null | undefined;
|
|
111
|
+
routes?: HttpRoute[] | null | undefined;
|
|
112
|
+
cache?: HttpCache | null | undefined;
|
|
113
|
+
access?: HttpAccess | null | undefined;
|
|
114
|
+
cors?: HttpCors | null | undefined;
|
|
115
|
+
};
|
|
116
|
+
export declare const isHttpImport: (service: ServiceMetadata) => service is HttpImport;
|
|
117
|
+
export declare const createHttpImport: (name: string) => ServiceMetadata & import("@ez4/utils").Incomplete<HttpImport>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { AllType,
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeIntersection, TypeModel, TypeObject } from '@ez4/reflection';
|
|
2
2
|
type TypeParent = TypeObject | TypeModel | TypeIntersection;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const isWebParametersDeclaration: (type: TypeModel, namespace: string) => boolean;
|
|
4
|
+
export declare const getWebParametersMetadata: (type: AllType, parent: TypeParent, reflection: ReflectionTypes, errorList: Error[], namespace: string) => import("@ez4/schema").ObjectSchema | undefined;
|
|
4
5
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { AllType,
|
|
2
|
-
import type {
|
|
3
|
-
export declare const
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { WebPreferences } from './types';
|
|
3
|
+
export declare const isWebPreferencesDeclaration: (type: TypeModel, namespace: string) => boolean;
|
|
4
|
+
export declare const getWebPreferencesMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[], namespace: string) => WebPreferences | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { AllType,
|
|
2
|
-
import type { HttpProvider } from '
|
|
3
|
-
export declare const
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { HttpProvider } from './http/types';
|
|
3
|
+
export declare const isWebProviderDeclaration: (type: AllType, namespace: string) => type is TypeModel;
|
|
4
|
+
export declare const getWebProviderMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[], namespace: string) => HttpProvider | undefined;
|
package/dist/metadata/query.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { AllType,
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeIntersection, TypeModel, TypeObject } from '@ez4/reflection';
|
|
2
2
|
type TypeParent = TypeObject | TypeModel | TypeIntersection;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const isWebQueryDeclaration: (type: TypeModel, namespace: string) => boolean;
|
|
4
|
+
export declare const getWebQueryMetadata: (type: AllType, parent: TypeParent, reflection: ReflectionTypes, errorList: Error[], namespace: string) => import("@ez4/schema").ObjectSchema | undefined;
|
|
4
5
|
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { LinkedServices } from '@ez4/project/library';
|
|
2
|
+
import type { AuthHandler } from '../auth/types';
|
|
3
|
+
import type { HttpHandler } from '../http/types';
|
|
4
|
+
export declare const attachProviderLinkedServices: (handler: HttpHandler | AuthHandler, services: LinkedServices, errorList: Error[], fileName?: string) => void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ReflectionTypes, TypeIntersection, TypeModel, TypeObject } from '@ez4/reflection';
|
|
2
|
+
export declare const getSchemaFromIntersection: (type: TypeObject | TypeModel | TypeIntersection, reflection: ReflectionTypes) => import("@ez4/schema").ObjectSchema | undefined;
|
|
3
|
+
export declare const getSchemaFromObject: (type: TypeObject | TypeModel | TypeIntersection, reflection: ReflectionTypes) => import("@ez4/schema").ObjectSchema | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LinkedServices } from '@ez4/project/library';
|
|
2
|
+
import type { AuthHandler } from '../auth/types';
|
|
3
|
+
import type { HttpHandler } from '../http/types';
|
|
4
|
+
import type { WsHandler } from '../ws/types';
|
|
5
|
+
export declare const attachValidatorLinkedServices: (handler: HttpHandler | AuthHandler | WsHandler, services: LinkedServices) => void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeClass, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { WsConnection } from './types';
|
|
3
|
+
export declare const isWsConnectionDeclaration: (type: AllType) => type is TypeClass;
|
|
4
|
+
export declare const getWsConnectionMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => WsConnection | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { WsDefaults } from './types';
|
|
3
|
+
export declare const FULL_BASE_TYPE: string;
|
|
4
|
+
export declare const isWsDefaultsDeclaration: (type: TypeModel) => boolean;
|
|
5
|
+
export declare const getWsDefaultsMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => WsDefaults | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { WsEvent } from './types';
|
|
3
|
+
export declare const isWsEventDeclaration: (type: TypeModel) => boolean;
|
|
4
|
+
export declare const getWsEventMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => WsEvent | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, TypeCallback, TypeFunction, TypeModel, ReflectionTypes } from '@ez4/reflection';
|
|
2
|
+
export declare const isWsHandlerDeclaration: (type: AllType) => type is TypeCallback | TypeFunction;
|
|
3
|
+
export declare const getWsConnectionHandler: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => import("@ez4/common/library").FunctionSignature | undefined;
|
|
4
|
+
export declare const getWsMessageHandler: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => import("@ez4/common/library").FunctionSignature | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeClass, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { WsMessage } from './types';
|
|
3
|
+
export declare const isWsMessageDeclaration: (type: AllType) => type is TypeClass;
|
|
4
|
+
export declare const getWsMessageMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => WsMessage | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { WsRequest } from './types';
|
|
3
|
+
export declare const isWsRequestDeclaration: (type: TypeModel) => boolean;
|
|
4
|
+
export declare const getWsRequestMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => WsRequest | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeModel } from '@ez4/reflection';
|
|
2
|
+
import type { WsResponse } from './types';
|
|
3
|
+
export declare const isWsResponseDeclaration: (type: TypeModel) => boolean;
|
|
4
|
+
export declare const getWsResponseMetadata: (type: AllType, parent: TypeModel, reflection: ReflectionTypes, errorList: Error[]) => WsResponse | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AllType, ReflectionTypes, TypeClass } from '@ez4/reflection';
|
|
2
|
+
import type { WsService } from './types';
|
|
3
|
+
export declare const isWsServiceDeclaration: (type: AllType) => type is TypeClass;
|
|
4
|
+
export declare const getWsServicesMetadata: (reflection: ReflectionTypes) => {
|
|
5
|
+
services: Record<string, WsService>;
|
|
6
|
+
errors: Error[];
|
|
7
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { ArraySchema, NamingStyle, ObjectSchema, ScalarSchema, UnionSchema } from '@ez4/schema';
|
|
2
|
+
import type { LinkedVariables, ServiceMetadata } from '@ez4/project/library';
|
|
3
|
+
import type { FunctionSignature, ServiceListener } from '@ez4/common/library';
|
|
4
|
+
import type { AuthHandler } from '../auth/types';
|
|
5
|
+
export declare const WsServiceType = "@ez4/ws";
|
|
6
|
+
export declare const WsNamespaceType = "Ws";
|
|
7
|
+
export type WsDataSchema = ObjectSchema | UnionSchema | ArraySchema | ScalarSchema;
|
|
8
|
+
export type WsService = Omit<ServiceMetadata, 'variables' | 'services'> & Required<Pick<ServiceMetadata, 'variables' | 'services'>> & {
|
|
9
|
+
type: typeof WsServiceType;
|
|
10
|
+
displayName?: string;
|
|
11
|
+
stageName?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
defaults?: WsDefaults;
|
|
14
|
+
schema: WsDataSchema;
|
|
15
|
+
connect: WsConnection;
|
|
16
|
+
disconnect: WsConnection;
|
|
17
|
+
message: WsMessage;
|
|
18
|
+
};
|
|
19
|
+
export type WsConnection = {
|
|
20
|
+
handler: WsHandler;
|
|
21
|
+
listener?: ServiceListener;
|
|
22
|
+
authorizer?: AuthHandler;
|
|
23
|
+
variables?: LinkedVariables;
|
|
24
|
+
preferences?: WsPreferences;
|
|
25
|
+
logRetention?: number;
|
|
26
|
+
timeout?: number;
|
|
27
|
+
memory?: number;
|
|
28
|
+
};
|
|
29
|
+
export type WsMessage = {
|
|
30
|
+
handler: WsHandler;
|
|
31
|
+
listener?: ServiceListener;
|
|
32
|
+
variables?: LinkedVariables;
|
|
33
|
+
preferences?: WsPreferences;
|
|
34
|
+
logRetention?: number;
|
|
35
|
+
timeout?: number;
|
|
36
|
+
memory?: number;
|
|
37
|
+
};
|
|
38
|
+
export type WsHandler = FunctionSignature & {
|
|
39
|
+
request?: WsRequest | WsEvent;
|
|
40
|
+
response?: WsResponse;
|
|
41
|
+
};
|
|
42
|
+
export type WsEvent = {
|
|
43
|
+
identity?: ObjectSchema | UnionSchema;
|
|
44
|
+
headers?: ObjectSchema;
|
|
45
|
+
query?: ObjectSchema;
|
|
46
|
+
body?: WsDataSchema;
|
|
47
|
+
};
|
|
48
|
+
export type WsRequest = {
|
|
49
|
+
identity?: ObjectSchema | UnionSchema;
|
|
50
|
+
body?: WsDataSchema;
|
|
51
|
+
};
|
|
52
|
+
export type WsResponse = {
|
|
53
|
+
body?: WsDataSchema;
|
|
54
|
+
};
|
|
55
|
+
export type WsPreferences = {
|
|
56
|
+
namingStyle?: NamingStyle;
|
|
57
|
+
};
|
|
58
|
+
export type WsDefaults = {
|
|
59
|
+
listener?: ServiceListener;
|
|
60
|
+
preferences?: WsPreferences;
|
|
61
|
+
logRetention?: number;
|
|
62
|
+
timeout?: number;
|
|
63
|
+
memory?: number;
|
|
64
|
+
};
|
|
65
|
+
export type WsCache = {
|
|
66
|
+
authorizerTTL?: number;
|
|
67
|
+
};
|
|
68
|
+
export declare const isWsService: (service: ServiceMetadata) => service is WsService;
|
|
69
|
+
export declare const createWsService: (name: string) => {
|
|
70
|
+
variables: {};
|
|
71
|
+
services: {};
|
|
72
|
+
type: "@ez4/ws";
|
|
73
|
+
name: string;
|
|
74
|
+
context: Record<string, import("@ez4/project/library").LinkedContext>;
|
|
75
|
+
displayName?: string | null | undefined;
|
|
76
|
+
stageName?: string | null | undefined;
|
|
77
|
+
description?: string | null | undefined;
|
|
78
|
+
defaults?: WsDefaults | null | undefined;
|
|
79
|
+
schema?: WsDataSchema | null | undefined;
|
|
80
|
+
connect?: WsConnection | null | undefined;
|
|
81
|
+
disconnect?: WsConnection | null | undefined;
|
|
82
|
+
message?: WsMessage | null | undefined;
|
|
83
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Service } from '@ez4/common';
|
|
2
|
+
import type { AuthIncoming } from './incoming';
|
|
3
|
+
import type { AuthResponse } from './response';
|
|
4
|
+
import type { AuthRequest } from './request';
|
|
5
|
+
import type { AuthProvider } from './provider';
|
|
6
|
+
/**
|
|
7
|
+
* Authorization handler.
|
|
8
|
+
*/
|
|
9
|
+
export type AuthHandler<T extends AuthRequest> = (request: AuthIncoming<T> | T, context: Service.Context<AuthProvider>) => Promise<AuthResponse> | AuthResponse;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AuthRequest } from './request';
|
|
2
|
+
/**
|
|
3
|
+
* Incoming authorization.
|
|
4
|
+
*/
|
|
5
|
+
export type AuthIncoming<T extends AuthRequest> = T & {
|
|
6
|
+
/**
|
|
7
|
+
* Request tracking Id.
|
|
8
|
+
*/
|
|
9
|
+
readonly requestId: string;
|
|
10
|
+
/**
|
|
11
|
+
* Request timestamp.
|
|
12
|
+
*/
|
|
13
|
+
readonly timestamp: Date;
|
|
14
|
+
/**
|
|
15
|
+
* Request method.
|
|
16
|
+
*/
|
|
17
|
+
readonly method?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Request path.
|
|
20
|
+
*/
|
|
21
|
+
readonly path?: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LinkedVariables } from '@ez4/project/library';
|
|
2
|
+
export interface AuthProvider {
|
|
3
|
+
/**
|
|
4
|
+
* Variables associated to the provider.
|
|
5
|
+
*/
|
|
6
|
+
readonly variables?: LinkedVariables;
|
|
7
|
+
/**
|
|
8
|
+
* All services associated to the provider.
|
|
9
|
+
*/
|
|
10
|
+
readonly services: Record<string, unknown>;
|
|
11
|
+
}
|