alepha 0.11.5 → 0.11.6
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/api/files.d.ts +167 -167
- package/api/jobs.d.ts +226 -154
- package/api/notifications.d.ts +100 -100
- package/api/users.d.ts +477 -477
- package/batch.d.ts +59 -493
- package/bucket.d.ts +20 -11
- package/cache/redis.d.ts +1 -1
- package/cache.d.ts +1 -1
- package/command.d.ts +24 -7
- package/core.d.ts +219 -169
- package/datetime.d.ts +1 -1
- package/devtools.d.ts +292 -254
- package/email.d.ts +45 -2
- package/fake.d.ts +1 -1
- package/file.d.ts +1 -1
- package/lock/redis.d.ts +1 -1
- package/lock.d.ts +1 -1
- package/logger.d.ts +6 -3
- package/package.json +51 -51
- package/postgres.d.ts +473 -188
- package/queue/redis.d.ts +1 -1
- package/queue.d.ts +1 -1
- package/react/auth.d.ts +7 -2
- package/react/form.d.ts +35 -15
- package/react/head.d.ts +1 -1
- package/react/i18n.d.ts +2 -2
- package/react.d.ts +58 -35
- package/redis.d.ts +10 -10
- package/retry.d.ts +84 -21
- package/scheduler.d.ts +1 -1
- package/security.d.ts +29 -29
- package/server/cache.d.ts +1 -1
- package/server/compress.d.ts +9 -3
- package/server/cookies.d.ts +1 -1
- package/server/cors.d.ts +28 -10
- package/server/health.d.ts +1 -1
- package/server/helmet.d.ts +44 -15
- package/server/links.d.ts +8 -2
- package/server/metrics.d.ts +1 -1
- package/server/multipart.d.ts +1 -1
- package/server/proxy.d.ts +1 -1
- package/server/security.d.ts +8 -3
- package/server/static.d.ts +1 -1
- package/server/swagger.d.ts +19 -6
- package/server.d.ts +20 -20
- package/topic/redis.d.ts +1 -1
- package/topic.d.ts +1 -1
- package/ui.d.ts +127 -24
package/security.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import * as _alepha_core1 from "alepha";
|
|
2
2
|
import { Alepha, Descriptor, KIND, Static } from "alepha";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _alepha_logger1 from "alepha/logger";
|
|
4
4
|
import { DateTimeProvider, Duration, DurationLike } from "alepha/datetime";
|
|
5
5
|
import { CryptoKey, FlattenedJWSInput, JSONWebKeySet, JWSHeaderParameters, JWTHeaderParameters, JWTPayload, JWTVerifyResult, KeyObject } from "jose";
|
|
6
|
-
import * as
|
|
6
|
+
import * as typebox0 from "typebox";
|
|
7
7
|
import { JWTVerifyOptions } from "jose/jwt/verify";
|
|
8
8
|
|
|
9
9
|
//#region src/schemas/userAccountInfoSchema.d.ts
|
|
10
|
-
declare const userAccountInfoSchema:
|
|
11
|
-
id:
|
|
12
|
-
name:
|
|
13
|
-
email:
|
|
14
|
-
username:
|
|
15
|
-
picture:
|
|
16
|
-
sessionId:
|
|
17
|
-
organizations:
|
|
18
|
-
roles:
|
|
10
|
+
declare const userAccountInfoSchema: typebox0.TObject<{
|
|
11
|
+
id: typebox0.TString;
|
|
12
|
+
name: typebox0.TOptional<typebox0.TString>;
|
|
13
|
+
email: typebox0.TOptional<typebox0.TString>;
|
|
14
|
+
username: typebox0.TOptional<typebox0.TString>;
|
|
15
|
+
picture: typebox0.TOptional<typebox0.TString>;
|
|
16
|
+
sessionId: typebox0.TOptional<typebox0.TString>;
|
|
17
|
+
organizations: typebox0.TOptional<typebox0.TArray<typebox0.TString>>;
|
|
18
|
+
roles: typebox0.TOptional<typebox0.TArray<typebox0.TString>>;
|
|
19
19
|
}>;
|
|
20
20
|
type UserAccount = Static<typeof userAccountInfoSchema>;
|
|
21
21
|
//#endregion
|
|
@@ -41,24 +41,24 @@ interface UserAccountToken extends UserAccount {
|
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/schemas/permissionSchema.d.ts
|
|
44
|
-
declare const permissionSchema:
|
|
45
|
-
name:
|
|
46
|
-
group:
|
|
47
|
-
description:
|
|
48
|
-
method:
|
|
49
|
-
path:
|
|
44
|
+
declare const permissionSchema: typebox0.TObject<{
|
|
45
|
+
name: typebox0.TString;
|
|
46
|
+
group: typebox0.TOptional<typebox0.TString>;
|
|
47
|
+
description: typebox0.TOptional<typebox0.TString>;
|
|
48
|
+
method: typebox0.TOptional<typebox0.TString>;
|
|
49
|
+
path: typebox0.TOptional<typebox0.TString>;
|
|
50
50
|
}>;
|
|
51
51
|
type Permission = Static<typeof permissionSchema>;
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region src/schemas/roleSchema.d.ts
|
|
54
|
-
declare const roleSchema:
|
|
55
|
-
name:
|
|
56
|
-
description:
|
|
57
|
-
default:
|
|
58
|
-
permissions:
|
|
59
|
-
name:
|
|
60
|
-
ownership:
|
|
61
|
-
exclude:
|
|
54
|
+
declare const roleSchema: typebox0.TObject<{
|
|
55
|
+
name: typebox0.TString;
|
|
56
|
+
description: typebox0.TOptional<typebox0.TString>;
|
|
57
|
+
default: typebox0.TOptional<typebox0.TBoolean>;
|
|
58
|
+
permissions: typebox0.TArray<typebox0.TObject<{
|
|
59
|
+
name: typebox0.TString;
|
|
60
|
+
ownership: typebox0.TOptional<typebox0.TBoolean>;
|
|
61
|
+
exclude: typebox0.TOptional<typebox0.TArray<typebox0.TString>>;
|
|
62
62
|
}>>;
|
|
63
63
|
}>;
|
|
64
64
|
type Role = Static<typeof roleSchema>;
|
|
@@ -68,7 +68,7 @@ type Role = Static<typeof roleSchema>;
|
|
|
68
68
|
* Provides utilities for working with JSON Web Tokens (JWT).
|
|
69
69
|
*/
|
|
70
70
|
declare class JwtProvider {
|
|
71
|
-
protected readonly log:
|
|
71
|
+
protected readonly log: _alepha_logger1.Logger;
|
|
72
72
|
protected readonly keystore: KeyLoaderHolder[];
|
|
73
73
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
74
74
|
protected readonly encoder: TextEncoder;
|
|
@@ -141,7 +141,7 @@ declare class SecurityProvider {
|
|
|
141
141
|
protected readonly UNKNOWN_USER_NAME = "Anonymous User";
|
|
142
142
|
protected readonly PERMISSION_REGEXP: RegExp;
|
|
143
143
|
protected readonly PERMISSION_REGEXP_WILDCARD: RegExp;
|
|
144
|
-
protected readonly log:
|
|
144
|
+
protected readonly log: _alepha_logger1.Logger;
|
|
145
145
|
protected readonly jwt: JwtProvider;
|
|
146
146
|
protected readonly env: {
|
|
147
147
|
APP_SECRET: string;
|
|
@@ -400,7 +400,7 @@ declare class RealmDescriptor extends Descriptor<RealmDescriptorOptions> {
|
|
|
400
400
|
protected readonly securityProvider: SecurityProvider;
|
|
401
401
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
402
402
|
protected readonly jwt: JwtProvider;
|
|
403
|
-
protected readonly log:
|
|
403
|
+
protected readonly log: _alepha_logger1.Logger;
|
|
404
404
|
get name(): string;
|
|
405
405
|
get accessTokenExpiration(): Duration;
|
|
406
406
|
get refreshTokenExpiration(): Duration;
|
|
@@ -580,7 +580,7 @@ declare module "alepha" {
|
|
|
580
580
|
* @see {@link $permission}
|
|
581
581
|
* @module alepha.security
|
|
582
582
|
*/
|
|
583
|
-
declare const AlephaSecurity: _alepha_core1.Service<_alepha_core1.Module
|
|
583
|
+
declare const AlephaSecurity: _alepha_core1.Service<_alepha_core1.Module>;
|
|
584
584
|
//#endregion
|
|
585
585
|
export { $permission, $realm, $role, $serviceAccount, AccessTokenResponse, AlephaSecurity, CreateTokenOptions, CryptoProvider, DEFAULT_APP_SECRET, ExtendedJWTPayload, InvalidPermissionError, JwtParseResult, JwtProvider, JwtSignOptions, KeyLoader, KeyLoaderHolder, Oauth2ServiceAccountDescriptorOptions, Permission, PermissionDescriptor, PermissionDescriptorOptions, Realm, RealmDescriptor, RealmDescriptorOptions, RealmExternal, RealmInternal, RealmSettings, Role, RoleDescriptor, RoleDescriptorOptions, SecurityCheckResult, SecurityError, SecurityProvider, ServiceAccountDescriptor, ServiceAccountDescriptorOptions, ServiceAccountStore, UserAccount, UserAccountToken, permissionSchema, roleSchema, userAccountInfoSchema };
|
|
586
586
|
//# sourceMappingURL=index.d.ts.map
|
package/server/cache.d.ts
CHANGED
|
@@ -157,7 +157,7 @@ interface RouteCacheEntry {
|
|
|
157
157
|
* @see {@link ServerCacheProvider}
|
|
158
158
|
* @module alepha.server.cache
|
|
159
159
|
*/
|
|
160
|
-
declare const AlephaServerCache: _alepha_core1.Service<_alepha_core1.Module
|
|
160
|
+
declare const AlephaServerCache: _alepha_core1.Service<_alepha_core1.Module>;
|
|
161
161
|
//#endregion
|
|
162
162
|
export { AlephaServerCache, ServerCacheProvider, ServerRouteCache };
|
|
163
163
|
//# sourceMappingURL=index.d.ts.map
|
package/server/compress.d.ts
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import * as _alepha_core0 from "alepha";
|
|
2
|
-
import { HookDescriptor } from "alepha";
|
|
2
|
+
import { Alepha, HookDescriptor } from "alepha";
|
|
3
3
|
import { ServerResponse } from "alepha/server";
|
|
4
4
|
import { Transform } from "node:stream";
|
|
5
5
|
|
|
6
6
|
//#region src/providers/ServerCompressProvider.d.ts
|
|
7
|
+
declare module "alepha" {
|
|
8
|
+
interface State {
|
|
9
|
+
"alepha.server.compress.options"?: ServerCompressProviderOptions;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
7
12
|
declare class ServerCompressProvider {
|
|
8
13
|
static compressors: Record<string, {
|
|
9
14
|
compress: (...args: any[]) => Promise<Buffer>;
|
|
10
15
|
stream: (options?: any) => Transform;
|
|
11
16
|
} | undefined>;
|
|
12
|
-
|
|
17
|
+
protected readonly alepha: Alepha;
|
|
18
|
+
protected get options(): ServerCompressProviderOptions;
|
|
13
19
|
readonly onResponse: HookDescriptor<"server:onResponse">;
|
|
14
20
|
protected isAllowedContentType(contentType: string | undefined): boolean;
|
|
15
21
|
protected compress(encoding: keyof typeof ServerCompressProvider.compressors, response: ServerResponse): Promise<void>;
|
|
@@ -26,7 +32,7 @@ interface ServerCompressProviderOptions {
|
|
|
26
32
|
*
|
|
27
33
|
* Compresses responses using gzip, brotli, or zstd based on the `Accept-Encoding` header.
|
|
28
34
|
*/
|
|
29
|
-
declare const AlephaServerCompress: _alepha_core0.Service<_alepha_core0.Module
|
|
35
|
+
declare const AlephaServerCompress: _alepha_core0.Service<_alepha_core0.Module>;
|
|
30
36
|
//#endregion
|
|
31
37
|
export { AlephaServerCompress, ServerCompressProvider, ServerCompressProviderOptions };
|
|
32
38
|
//# sourceMappingURL=index.d.ts.map
|
package/server/cookies.d.ts
CHANGED
|
@@ -138,7 +138,7 @@ declare module "alepha/server" {
|
|
|
138
138
|
* @see {@link $cookie}
|
|
139
139
|
* @module alepha.server.cookies
|
|
140
140
|
*/
|
|
141
|
-
declare const AlephaServerCookies: _alepha_core1.Service<_alepha_core1.Module
|
|
141
|
+
declare const AlephaServerCookies: _alepha_core1.Service<_alepha_core1.Module>;
|
|
142
142
|
//#endregion
|
|
143
143
|
export { $cookie, AbstractCookieDescriptor, AlephaServerCookies, Cookie, CookieDescriptor, CookieDescriptorOptions, Cookies, ServerCookiesProvider };
|
|
144
144
|
//# sourceMappingURL=index.d.ts.map
|
package/server/cors.d.ts
CHANGED
|
@@ -1,27 +1,45 @@
|
|
|
1
1
|
import * as _alepha_core1 from "alepha";
|
|
2
|
+
import { Static } from "alepha";
|
|
2
3
|
import { ServerRouterProvider } from "alepha/server";
|
|
4
|
+
import * as typebox0 from "typebox";
|
|
3
5
|
|
|
4
6
|
//#region src/providers/ServerCorsProvider.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* CORS configuration atom
|
|
9
|
+
*/
|
|
10
|
+
declare const corsOptions: _alepha_core1.Atom<typebox0.TObject<{
|
|
11
|
+
origin: typebox0.TOptional<typebox0.TString>;
|
|
12
|
+
methods: typebox0.TArray<typebox0.TString>;
|
|
13
|
+
headers: typebox0.TArray<typebox0.TString>;
|
|
14
|
+
credentials: typebox0.TOptional<typebox0.TBoolean>;
|
|
15
|
+
maxAge: typebox0.TOptional<typebox0.TNumber>;
|
|
16
|
+
}>, "alepha.server.cors.options">;
|
|
17
|
+
type CorsOptions = Static<typeof corsOptions.schema>;
|
|
18
|
+
declare module "alepha" {
|
|
19
|
+
interface State {
|
|
20
|
+
[corsOptions.key]: CorsOptions;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
5
23
|
declare class ServerCorsProvider {
|
|
6
24
|
protected readonly serverRouterProvider: ServerRouterProvider;
|
|
7
|
-
options:
|
|
25
|
+
protected readonly options: Readonly<{
|
|
26
|
+
origin?: string | undefined;
|
|
27
|
+
credentials?: boolean | undefined;
|
|
28
|
+
maxAge?: number | undefined;
|
|
29
|
+
methods: string[];
|
|
30
|
+
headers: string[];
|
|
31
|
+
}>;
|
|
8
32
|
protected readonly configure: _alepha_core1.HookDescriptor<"configure">;
|
|
9
33
|
protected readonly onRequest: _alepha_core1.HookDescriptor<"server:onRequest">;
|
|
10
34
|
isOriginAllowed(origin: string | undefined, allowed: ServerCorsProviderOptions["origin"]): boolean;
|
|
11
35
|
}
|
|
12
|
-
|
|
13
|
-
origin?: string | string[] | ((origin: string | undefined) => boolean);
|
|
14
|
-
methods: string[];
|
|
15
|
-
headers: string[];
|
|
16
|
-
credentials?: boolean;
|
|
17
|
-
maxAge?: number;
|
|
18
|
-
}
|
|
36
|
+
type ServerCorsProviderOptions = CorsOptions;
|
|
19
37
|
//#endregion
|
|
20
38
|
//#region src/index.d.ts
|
|
21
39
|
/**
|
|
22
40
|
* Plugin for configuring CORS on the Alepha server.
|
|
23
41
|
*/
|
|
24
|
-
declare const AlephaServerCors: _alepha_core1.Service<_alepha_core1.Module
|
|
42
|
+
declare const AlephaServerCors: _alepha_core1.Service<_alepha_core1.Module>;
|
|
25
43
|
//#endregion
|
|
26
|
-
export { AlephaServerCors, ServerCorsProvider, ServerCorsProviderOptions };
|
|
44
|
+
export { AlephaServerCors, CorsOptions, ServerCorsProvider, ServerCorsProviderOptions, corsOptions };
|
|
27
45
|
//# sourceMappingURL=index.d.ts.map
|
package/server/health.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ declare const healthSchema: typebox5.TObject<{
|
|
|
53
53
|
* @see {@link ServerHealthProvider}
|
|
54
54
|
* @module alepha.server.health
|
|
55
55
|
*/
|
|
56
|
-
declare const AlephaServerHealth: _alepha_core0.Service<_alepha_core0.Module
|
|
56
|
+
declare const AlephaServerHealth: _alepha_core0.Service<_alepha_core0.Module>;
|
|
57
57
|
//#endregion
|
|
58
58
|
export { AlephaServerHealth, ServerHealthProvider, healthSchema };
|
|
59
59
|
//# sourceMappingURL=index.d.ts.map
|
package/server/helmet.d.ts
CHANGED
|
@@ -1,7 +1,32 @@
|
|
|
1
1
|
import * as _alepha_core1 from "alepha";
|
|
2
|
-
import { Alepha } from "alepha";
|
|
2
|
+
import { Alepha, Static } from "alepha";
|
|
3
|
+
import * as typebox0 from "typebox";
|
|
3
4
|
|
|
4
5
|
//#region src/providers/ServerHelmetProvider.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Helmet security headers configuration atom
|
|
8
|
+
*/
|
|
9
|
+
declare const helmetOptions: _alepha_core1.Atom<typebox0.TObject<{
|
|
10
|
+
isSecure: typebox0.TOptional<typebox0.TBoolean>;
|
|
11
|
+
strictTransportSecurity: typebox0.TOptional<typebox0.TObject<{
|
|
12
|
+
maxAge: typebox0.TOptional<typebox0.TNumber>;
|
|
13
|
+
includeSubDomains: typebox0.TOptional<typebox0.TBoolean>;
|
|
14
|
+
preload: typebox0.TOptional<typebox0.TBoolean>;
|
|
15
|
+
}>>;
|
|
16
|
+
xContentTypeOptions: typebox0.TOptional<typebox0.TBoolean>;
|
|
17
|
+
xFrameOptions: typebox0.TOptional<typebox0.TUnsafe<"DENY" | "SAMEORIGIN">>;
|
|
18
|
+
xXssProtection: typebox0.TOptional<typebox0.TBoolean>;
|
|
19
|
+
contentSecurityPolicy: typebox0.TOptional<typebox0.TObject<{
|
|
20
|
+
directives: typebox0.TRecord<"^.*$", typebox0.TAny>;
|
|
21
|
+
}>>;
|
|
22
|
+
referrerPolicy: typebox0.TOptional<typebox0.TUnsafe<"no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url">>;
|
|
23
|
+
}>, "alepha.server.helmet.options">;
|
|
24
|
+
type HelmetOptions = Static<typeof helmetOptions.schema>;
|
|
25
|
+
declare module "alepha" {
|
|
26
|
+
interface State {
|
|
27
|
+
[helmetOptions.key]: HelmetOptions;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
5
30
|
type CspDirective = string | string[];
|
|
6
31
|
interface CspDirectives {
|
|
7
32
|
"default-src"?: CspDirective;
|
|
@@ -30,15 +55,6 @@ interface HstsOptions {
|
|
|
30
55
|
includeSubDomains?: boolean;
|
|
31
56
|
preload?: boolean;
|
|
32
57
|
}
|
|
33
|
-
interface HelmetOptions {
|
|
34
|
-
isSecure?: boolean;
|
|
35
|
-
strictTransportSecurity?: HstsOptions | false;
|
|
36
|
-
xContentTypeOptions?: false;
|
|
37
|
-
xFrameOptions?: "DENY" | "SAMEORIGIN" | false;
|
|
38
|
-
xXssProtection?: false;
|
|
39
|
-
contentSecurityPolicy?: CspOptions | false | "default";
|
|
40
|
-
referrerPolicy?: "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url" | false;
|
|
41
|
-
}
|
|
42
58
|
/**
|
|
43
59
|
* Provides a configurable way to apply essential HTTP security headers
|
|
44
60
|
* to every server response, without external dependencies.
|
|
@@ -46,10 +62,23 @@ interface HelmetOptions {
|
|
|
46
62
|
declare class ServerHelmetProvider {
|
|
47
63
|
protected readonly alepha: Alepha;
|
|
48
64
|
/**
|
|
49
|
-
* The configuration options
|
|
50
|
-
* the application's configuration phase using `alepha.configure()`.
|
|
65
|
+
* The configuration options loaded from the atom.
|
|
51
66
|
*/
|
|
52
|
-
options:
|
|
67
|
+
protected readonly options: Readonly<{
|
|
68
|
+
isSecure?: boolean | undefined;
|
|
69
|
+
strictTransportSecurity?: {
|
|
70
|
+
maxAge?: number | undefined;
|
|
71
|
+
includeSubDomains?: boolean | undefined;
|
|
72
|
+
preload?: boolean | undefined;
|
|
73
|
+
} | undefined;
|
|
74
|
+
xContentTypeOptions?: boolean | undefined;
|
|
75
|
+
xFrameOptions?: "DENY" | "SAMEORIGIN" | undefined;
|
|
76
|
+
xXssProtection?: boolean | undefined;
|
|
77
|
+
contentSecurityPolicy?: {
|
|
78
|
+
directives: Record<string, any>;
|
|
79
|
+
} | undefined;
|
|
80
|
+
referrerPolicy?: "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url" | undefined;
|
|
81
|
+
}>;
|
|
53
82
|
protected defaultCspDirectives(): CspDirectives;
|
|
54
83
|
protected buildHeaders(): Record<string, string>;
|
|
55
84
|
protected readonly onResponse: _alepha_core1.HookDescriptor<"server:onResponse">;
|
|
@@ -63,7 +92,7 @@ declare class ServerHelmetProvider {
|
|
|
63
92
|
* @see {@link ServerHelmetProvider}
|
|
64
93
|
* @module alepha.server.helmet
|
|
65
94
|
*/
|
|
66
|
-
declare const AlephaServerHelmet: _alepha_core1.Service<_alepha_core1.Module
|
|
95
|
+
declare const AlephaServerHelmet: _alepha_core1.Service<_alepha_core1.Module>;
|
|
67
96
|
//#endregion
|
|
68
|
-
export { AlephaServerHelmet, CspDirectives, CspOptions, HelmetOptions, HstsOptions, ServerHelmetProvider };
|
|
97
|
+
export { AlephaServerHelmet, CspDirectives, CspOptions, HelmetOptions, HstsOptions, ServerHelmetProvider, helmetOptions };
|
|
69
98
|
//# sourceMappingURL=index.d.ts.map
|
package/server/links.d.ts
CHANGED
|
@@ -296,7 +296,13 @@ interface GetApiLinksOptions {
|
|
|
296
296
|
//#region src/index.d.ts
|
|
297
297
|
declare module "alepha" {
|
|
298
298
|
interface State {
|
|
299
|
-
|
|
299
|
+
/**
|
|
300
|
+
* API links attached to the server request state.
|
|
301
|
+
*
|
|
302
|
+
* @see {@link ApiLinksResponse}
|
|
303
|
+
* @internal
|
|
304
|
+
*/
|
|
305
|
+
"alepha.server.request.apiLinks"?: ApiLinksResponse;
|
|
300
306
|
}
|
|
301
307
|
}
|
|
302
308
|
/**
|
|
@@ -310,7 +316,7 @@ declare module "alepha" {
|
|
|
310
316
|
* @see {@link $client}
|
|
311
317
|
* @module alepha.server.links
|
|
312
318
|
*/
|
|
313
|
-
declare const AlephaServerLinks: _alepha_core2.Service<_alepha_core2.Module
|
|
319
|
+
declare const AlephaServerLinks: _alepha_core2.Service<_alepha_core2.Module>;
|
|
314
320
|
//#endregion
|
|
315
321
|
export { $client, $remote, AlephaServerLinks, ApiLink, ApiLinksResponse, ClientScope, FetchLinksOptions, GetApiLinksOptions, HttpClientLink, HttpVirtualClient, LinkProvider, RemoteDescriptor, RemoteDescriptorOptions, RemoteDescriptorProvider, ServerLinksProvider, ServerRemote, VirtualAction, apiLinkSchema, apiLinksResponseSchema };
|
|
316
322
|
//# sourceMappingURL=index.d.ts.map
|
package/server/metrics.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ interface ServerMetricsProviderOptions {
|
|
|
29
29
|
* @see {@link ServerMetricsProvider}
|
|
30
30
|
* @module alepha.server.metrics
|
|
31
31
|
*/
|
|
32
|
-
declare const AlephaServerMetrics: _alepha_core1.Service<_alepha_core1.Module
|
|
32
|
+
declare const AlephaServerMetrics: _alepha_core1.Service<_alepha_core1.Module>;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { AlephaServerMetrics, ServerMetricsProvider, ServerMetricsProviderOptions };
|
|
35
35
|
//# sourceMappingURL=index.d.ts.map
|
package/server/multipart.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ interface HybridFile extends FileLike {
|
|
|
36
36
|
* @see {@link ServerMultipartProvider}
|
|
37
37
|
* @module alepha.server.multipart
|
|
38
38
|
*/
|
|
39
|
-
declare const AlephaServerMultipart: _alepha_core0.Service<_alepha_core0.Module
|
|
39
|
+
declare const AlephaServerMultipart: _alepha_core0.Service<_alepha_core0.Module>;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { AlephaServerMultipart, ServerMultipartProvider };
|
|
42
42
|
//# sourceMappingURL=index.d.ts.map
|
package/server/proxy.d.ts
CHANGED
|
@@ -228,7 +228,7 @@ declare class ServerProxyProvider {
|
|
|
228
228
|
* @see {@link $proxy}
|
|
229
229
|
* @module alepha.server.proxy
|
|
230
230
|
*/
|
|
231
|
-
declare const AlephaServerProxy: _alepha_core1.Service<_alepha_core1.Module
|
|
231
|
+
declare const AlephaServerProxy: _alepha_core1.Service<_alepha_core1.Module>;
|
|
232
232
|
//#endregion
|
|
233
233
|
export { $proxy, AlephaServerProxy, ProxyDescriptor, ProxyDescriptorOptions, ServerProxyProvider };
|
|
234
234
|
//# sourceMappingURL=index.d.ts.map
|
package/server/security.d.ts
CHANGED
|
@@ -44,8 +44,13 @@ declare module "alepha" {
|
|
|
44
44
|
* If you define this, you assume that all actions are executed by this user by default.
|
|
45
45
|
* > To force a different user, you need to pass it explicitly in the options.
|
|
46
46
|
*/
|
|
47
|
-
"server.security.system.user"?: UserAccountToken;
|
|
48
|
-
|
|
47
|
+
"alepha.server.security.system.user"?: UserAccountToken;
|
|
48
|
+
/**
|
|
49
|
+
* The authenticated user account attached to the server request state.
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
"alepha.server.request.user"?: UserAccount;
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
56
|
declare module "alepha/server" {
|
|
@@ -81,7 +86,7 @@ declare module "alepha/server" {
|
|
|
81
86
|
* @see {@link ServerSecurityProvider}
|
|
82
87
|
* @module alepha.server.security
|
|
83
88
|
*/
|
|
84
|
-
declare const AlephaServerSecurity: _alepha_core1.Service<_alepha_core1.Module
|
|
89
|
+
declare const AlephaServerSecurity: _alepha_core1.Service<_alepha_core1.Module>;
|
|
85
90
|
//#endregion
|
|
86
91
|
export { AlephaServerSecurity, ServerRouteSecure, ServerSecurityProvider };
|
|
87
92
|
//# sourceMappingURL=index.d.ts.map
|
package/server/static.d.ts
CHANGED
|
@@ -113,7 +113,7 @@ interface ServeDirectory {
|
|
|
113
113
|
* @see {@link ServerStaticProvider}
|
|
114
114
|
* @module alepha.server.static
|
|
115
115
|
*/
|
|
116
|
-
declare const AlephaServerStatic: _alepha_core1.Service<_alepha_core1.Module
|
|
116
|
+
declare const AlephaServerStatic: _alepha_core1.Service<_alepha_core1.Module>;
|
|
117
117
|
//#endregion
|
|
118
118
|
export { $serve, AlephaServerStatic, CacheControlOptions, ServeDescriptor, ServeDescriptorOptions, ServeDirectory, ServerStaticProvider };
|
|
119
119
|
//# sourceMappingURL=index.d.ts.map
|
package/server/swagger.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import "alepha/server/security";
|
|
2
2
|
import * as _alepha_core1 from "alepha";
|
|
3
|
-
import { Alepha, Descriptor, KIND, TObject } from "alepha";
|
|
3
|
+
import { Alepha, Descriptor, KIND, Static, TObject } from "alepha";
|
|
4
4
|
import { ActionDescriptor, RequestConfigSchema, ServerProvider, ServerRouterProvider } from "alepha/server";
|
|
5
5
|
import { ServerStaticProvider } from "alepha/server/static";
|
|
6
6
|
import * as _alepha_logger0 from "alepha/logger";
|
|
7
7
|
import { OpenAPIV3 } from "openapi-types";
|
|
8
|
+
import * as typebox0 from "typebox";
|
|
8
9
|
|
|
9
10
|
//#region src/descriptors/$swagger.d.ts
|
|
10
11
|
/**
|
|
@@ -96,16 +97,28 @@ interface SwaggerUiOptions {
|
|
|
96
97
|
declare class SwaggerDescriptor extends Descriptor<SwaggerDescriptorOptions> {}
|
|
97
98
|
//#endregion
|
|
98
99
|
//#region src/ServerSwaggerProvider.d.ts
|
|
100
|
+
/**
|
|
101
|
+
* Swagger provider configuration atom
|
|
102
|
+
*/
|
|
103
|
+
declare const swaggerOptions: _alepha_core1.Atom<TObject<{
|
|
104
|
+
excludeKeys: typebox0.TOptional<typebox0.TArray<typebox0.TString>>;
|
|
105
|
+
}>, "alepha.server.swagger.options">;
|
|
106
|
+
type ServerSwaggerProviderOptions = Static<typeof swaggerOptions.schema>;
|
|
107
|
+
declare module "alepha" {
|
|
108
|
+
interface State {
|
|
109
|
+
[swaggerOptions.key]: ServerSwaggerProviderOptions;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
99
112
|
declare class ServerSwaggerProvider {
|
|
100
113
|
protected readonly serverStaticProvider: ServerStaticProvider;
|
|
101
114
|
protected readonly serverRouterProvider: ServerRouterProvider;
|
|
102
115
|
protected readonly serverProvider: ServerProvider;
|
|
103
116
|
protected readonly alepha: Alepha;
|
|
104
117
|
protected readonly log: _alepha_logger0.Logger;
|
|
118
|
+
protected readonly options: Readonly<{
|
|
119
|
+
excludeKeys?: string[] | undefined;
|
|
120
|
+
}>;
|
|
105
121
|
json?: OpenAPIV3.Document;
|
|
106
|
-
options: {
|
|
107
|
-
excludeKeys: string[];
|
|
108
|
-
};
|
|
109
122
|
protected readonly configure: _alepha_core1.HookDescriptor<"configure">;
|
|
110
123
|
createSwagger(options: SwaggerDescriptorOptions): Promise<OpenAPIV3.Document | undefined>;
|
|
111
124
|
protected configureOpenApi(actions: ActionDescriptor<RequestConfigSchema>[], doc: SwaggerDescriptorOptions): OpenAPIV3.Document;
|
|
@@ -142,7 +155,7 @@ declare module "alepha/server" {
|
|
|
142
155
|
* @see {@link ServerSwaggerProvider}
|
|
143
156
|
* @module alepha.server.swagger
|
|
144
157
|
*/
|
|
145
|
-
declare const AlephaServerSwagger: _alepha_core1.Service<_alepha_core1.Module
|
|
158
|
+
declare const AlephaServerSwagger: _alepha_core1.Service<_alepha_core1.Module>;
|
|
146
159
|
//#endregion
|
|
147
|
-
export { $swagger, AlephaServerSwagger, ServerSwaggerProvider, SwaggerDescriptor, SwaggerDescriptorOptions, SwaggerUiOptions };
|
|
160
|
+
export { $swagger, AlephaServerSwagger, ServerSwaggerProvider, ServerSwaggerProviderOptions, SwaggerDescriptor, SwaggerDescriptorOptions, SwaggerUiOptions, swaggerOptions };
|
|
148
161
|
//# sourceMappingURL=index.d.ts.map
|
package/server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alepha_core4 from "alepha";
|
|
2
2
|
import { Alepha, AlephaError, Async, Descriptor, FileLike, KIND, Static, StreamLike, TArray, TFile, TObject, TRecord, TSchema, TStream, TString, TVoid } from "alepha";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _alepha_logger2 from "alepha/logger";
|
|
4
4
|
import { Readable } from "node:stream";
|
|
5
5
|
import { ReadableStream } from "node:stream/web";
|
|
6
6
|
import { Route, RouterProvider } from "alepha/router";
|
|
@@ -186,14 +186,14 @@ declare class ServerRequestParser {
|
|
|
186
186
|
//#region src/providers/ServerTimingProvider.d.ts
|
|
187
187
|
type TimingMap = Record<string, [number, number]>;
|
|
188
188
|
declare class ServerTimingProvider {
|
|
189
|
-
protected readonly log:
|
|
189
|
+
protected readonly log: _alepha_logger2.Logger;
|
|
190
190
|
protected readonly alepha: Alepha;
|
|
191
191
|
options: {
|
|
192
192
|
prefix: string;
|
|
193
193
|
disabled: boolean;
|
|
194
194
|
};
|
|
195
|
-
readonly onRequest:
|
|
196
|
-
readonly onResponse:
|
|
195
|
+
readonly onRequest: _alepha_core4.HookDescriptor<"server:onRequest">;
|
|
196
|
+
readonly onResponse: _alepha_core4.HookDescriptor<"server:onResponse">;
|
|
197
197
|
protected get handlerName(): string;
|
|
198
198
|
beginTiming(name: string): void;
|
|
199
199
|
endTiming(name: string): void;
|
|
@@ -234,7 +234,7 @@ declare class ServerRouterProvider extends RouterProvider<ServerRouteMatcher> {
|
|
|
234
234
|
//#endregion
|
|
235
235
|
//#region src/services/HttpClient.d.ts
|
|
236
236
|
declare class HttpClient {
|
|
237
|
-
protected readonly log:
|
|
237
|
+
protected readonly log: _alepha_logger2.Logger;
|
|
238
238
|
protected readonly alepha: Alepha;
|
|
239
239
|
readonly cache: _alepha_cache0.CacheDescriptorFn<HttpClientCache, any[]>;
|
|
240
240
|
protected readonly pendingRequests: HttpClientPendingRequests;
|
|
@@ -554,7 +554,7 @@ interface ActionDescriptorOptions<TConfig extends RequestConfigSchema> extends O
|
|
|
554
554
|
handler: ServerActionHandler<TConfig>;
|
|
555
555
|
}
|
|
556
556
|
declare class ActionDescriptor<TConfig extends RequestConfigSchema> extends Descriptor<ActionDescriptorOptions<TConfig>> {
|
|
557
|
-
protected readonly log:
|
|
557
|
+
protected readonly log: _alepha_logger2.Logger;
|
|
558
558
|
protected readonly env: {
|
|
559
559
|
SERVER_API_PREFIX: string;
|
|
560
560
|
};
|
|
@@ -726,9 +726,9 @@ declare const okSchema: typebox0.TObject<{
|
|
|
726
726
|
type Ok = Static<typeof okSchema>;
|
|
727
727
|
//#endregion
|
|
728
728
|
//#region src/providers/NodeHttpServerProvider.d.ts
|
|
729
|
-
declare const envSchema:
|
|
730
|
-
SERVER_PORT:
|
|
731
|
-
SERVER_HOST:
|
|
729
|
+
declare const envSchema: _alepha_core4.TObject<{
|
|
730
|
+
SERVER_PORT: _alepha_core4.TInteger;
|
|
731
|
+
SERVER_HOST: _alepha_core4.TString;
|
|
732
732
|
}>;
|
|
733
733
|
declare module "alepha" {
|
|
734
734
|
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
@@ -736,29 +736,29 @@ declare module "alepha" {
|
|
|
736
736
|
declare class NodeHttpServerProvider extends ServerProvider {
|
|
737
737
|
protected readonly alepha: Alepha;
|
|
738
738
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
739
|
-
protected readonly log:
|
|
739
|
+
protected readonly log: _alepha_logger2.Logger;
|
|
740
740
|
protected readonly env: {
|
|
741
741
|
SERVER_PORT: number;
|
|
742
742
|
SERVER_HOST: string;
|
|
743
743
|
};
|
|
744
744
|
protected readonly router: ServerRouterProvider;
|
|
745
745
|
protected readonly server: http0.Server<typeof IncomingMessage, typeof ServerResponse$1>;
|
|
746
|
-
protected readonly onNodeRequest:
|
|
746
|
+
protected readonly onNodeRequest: _alepha_core4.HookDescriptor<"node:request">;
|
|
747
747
|
handle(req: IncomingMessage, res: ServerResponse$1): Promise<void>;
|
|
748
748
|
get hostname(): string;
|
|
749
|
-
readonly start:
|
|
750
|
-
protected readonly stop:
|
|
749
|
+
readonly start: _alepha_core4.HookDescriptor<"start">;
|
|
750
|
+
protected readonly stop: _alepha_core4.HookDescriptor<"stop">;
|
|
751
751
|
protected listen(): Promise<void>;
|
|
752
752
|
protected close(): Promise<void>;
|
|
753
753
|
}
|
|
754
754
|
//#endregion
|
|
755
755
|
//#region src/providers/ServerLoggerProvider.d.ts
|
|
756
756
|
declare class ServerLoggerProvider {
|
|
757
|
-
protected readonly log:
|
|
757
|
+
protected readonly log: _alepha_logger2.Logger;
|
|
758
758
|
protected readonly alepha: Alepha;
|
|
759
|
-
readonly onRequest:
|
|
760
|
-
readonly onError:
|
|
761
|
-
readonly onResponse:
|
|
759
|
+
readonly onRequest: _alepha_core4.HookDescriptor<"server:onRequest">;
|
|
760
|
+
readonly onError: _alepha_core4.HookDescriptor<"server:onError">;
|
|
761
|
+
readonly onResponse: _alepha_core4.HookDescriptor<"server:onResponse">;
|
|
762
762
|
}
|
|
763
763
|
//#endregion
|
|
764
764
|
//#region src/providers/ServerNotReadyProvider.d.ts
|
|
@@ -771,7 +771,7 @@ declare class ServerLoggerProvider {
|
|
|
771
771
|
*/
|
|
772
772
|
declare class ServerNotReadyProvider {
|
|
773
773
|
protected readonly alepha: Alepha;
|
|
774
|
-
readonly onRequest:
|
|
774
|
+
readonly onRequest: _alepha_core4.HookDescriptor<"server:onRequest">;
|
|
775
775
|
}
|
|
776
776
|
//#endregion
|
|
777
777
|
//#region src/index.d.ts
|
|
@@ -843,7 +843,7 @@ declare module "alepha" {
|
|
|
843
843
|
* @see {@link $action}
|
|
844
844
|
* @module alepha.server
|
|
845
845
|
*/
|
|
846
|
-
declare const AlephaServer:
|
|
846
|
+
declare const AlephaServer: _alepha_core4.Service<_alepha_core4.Module>;
|
|
847
847
|
//#endregion
|
|
848
848
|
export { $action, $route, ActionDescriptor, ActionDescriptorFn, ActionDescriptorOptions, AlephaServer, BadRequestError, ClientRequestEntry, ClientRequestEntryContainer, ClientRequestOptions, ClientRequestResponse, ConflictError, ErrorSchema, FetchActionArgs, FetchOptions, FetchResponse, ForbiddenError, HttpAction, HttpClient, HttpClientPendingRequests, HttpError, HttpErrorLike, NodeHttpServerProvider, NotFoundError, Ok, RequestConfigSchema, RequestInitWithOptions, ResponseBodyType, ResponseKind, RouteDescriptor, RouteDescriptorOptions, RouteMethod, ServerActionHandler, ServerActionRequest, ServerHandler, ServerLoggerProvider, ServerNotReadyProvider, ServerProvider, ServerRawRequest, ServerReply, ServerRequest, ServerRequestConfig, ServerRequestConfigEntry, ServerResponse, ServerResponseBody, ServerRoute, ServerRouteMatcher, ServerRouteRequestHandler, ServerRouterProvider, ServerTimingProvider, TRequestBody, TResponseBody, UnauthorizedError, ValidationError, errorNameByStatus, errorSchema, isHttpError, isMultipart, okSchema, routeMethods };
|
|
849
849
|
//# sourceMappingURL=index.d.ts.map
|
package/topic/redis.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ declare class RedisTopicProvider extends TopicProvider {
|
|
|
36
36
|
* @see {@link RedisTopicProvider}
|
|
37
37
|
* @module alepha.topic.redis
|
|
38
38
|
*/
|
|
39
|
-
declare const AlephaTopicRedis: _alepha_core1.Service<_alepha_core1.Module
|
|
39
|
+
declare const AlephaTopicRedis: _alepha_core1.Service<_alepha_core1.Module>;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { AlephaTopicRedis, RedisTopicProvider };
|
|
42
42
|
//# sourceMappingURL=index.d.ts.map
|
package/topic.d.ts
CHANGED
|
@@ -813,7 +813,7 @@ declare class MemoryTopicProvider extends TopicProvider {
|
|
|
813
813
|
* @see {@link $subscriber}
|
|
814
814
|
* @module alepha.topic
|
|
815
815
|
*/
|
|
816
|
-
declare const AlephaTopic: _alepha_core1.Service<_alepha_core1.Module
|
|
816
|
+
declare const AlephaTopic: _alepha_core1.Service<_alepha_core1.Module>;
|
|
817
817
|
//#endregion
|
|
818
818
|
export { $subscriber, $topic, AlephaTopic, MemoryTopicProvider, SubscribeCallback, SubscriberDescriptor, SubscriberDescriptorOptions, TopicDescriptor, TopicDescriptorOptions, TopicHandler, TopicMessage, TopicMessageSchema, TopicProvider, TopicTimeoutError, TopicWaitOptions, UnSubscribeFn };
|
|
819
819
|
//# sourceMappingURL=index.d.ts.map
|