alepha 0.11.3 → 0.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/files.d.ts +1 -1
- package/api/jobs.d.ts +140 -140
- package/api/users.d.ts +496 -496
- package/batch.d.ts +3 -0
- package/bucket.d.ts +4 -0
- package/command.d.ts +14 -0
- package/core.d.ts +274 -11
- package/datetime.d.ts +2 -1
- package/devtools.d.ts +261 -259
- package/fake.cjs +8 -0
- package/fake.d.ts +73 -0
- package/fake.js +1 -0
- package/file.d.ts +476 -1
- package/logger.d.ts +2 -1
- package/package.json +63 -49
- package/postgres.d.ts +34 -104
- package/react/i18n.d.ts +26 -1
- package/react.d.ts +373 -64
- package/security.d.ts +28 -28
- package/server/swagger.d.ts +3 -3
- package/server.d.ts +20 -20
- package/ui.cjs +8 -0
- package/ui.d.ts +683 -0
- package/ui.js +1 -0
- package/vite.d.ts +18 -29
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_logger0 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 typebox13 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: typebox13.TObject<{
|
|
11
|
+
id: typebox13.TString;
|
|
12
|
+
name: typebox13.TOptional<typebox13.TString>;
|
|
13
|
+
email: typebox13.TOptional<typebox13.TString>;
|
|
14
|
+
username: typebox13.TOptional<typebox13.TString>;
|
|
15
|
+
picture: typebox13.TOptional<typebox13.TString>;
|
|
16
|
+
sessionId: typebox13.TOptional<typebox13.TString>;
|
|
17
|
+
organizations: typebox13.TOptional<typebox13.TArray<typebox13.TString>>;
|
|
18
|
+
roles: typebox13.TOptional<typebox13.TArray<typebox13.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: typebox13.TObject<{
|
|
45
|
+
name: typebox13.TString;
|
|
46
|
+
group: typebox13.TOptional<typebox13.TString>;
|
|
47
|
+
description: typebox13.TOptional<typebox13.TString>;
|
|
48
|
+
method: typebox13.TOptional<typebox13.TString>;
|
|
49
|
+
path: typebox13.TOptional<typebox13.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: typebox13.TObject<{
|
|
55
|
+
name: typebox13.TString;
|
|
56
|
+
description: typebox13.TOptional<typebox13.TString>;
|
|
57
|
+
default: typebox13.TOptional<typebox13.TBoolean>;
|
|
58
|
+
permissions: typebox13.TArray<typebox13.TObject<{
|
|
59
|
+
name: typebox13.TString;
|
|
60
|
+
ownership: typebox13.TOptional<typebox13.TBoolean>;
|
|
61
|
+
exclude: typebox13.TOptional<typebox13.TArray<typebox13.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_logger0.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_logger0.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_logger0.Logger;
|
|
404
404
|
get name(): string;
|
|
405
405
|
get accessTokenExpiration(): Duration;
|
|
406
406
|
get refreshTokenExpiration(): Duration;
|
package/server/swagger.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import "alepha/server/security";
|
|
|
2
2
|
import * as _alepha_core1 from "alepha";
|
|
3
3
|
import { Alepha, Descriptor, KIND, TObject } from "alepha";
|
|
4
4
|
import { ActionDescriptor, RequestConfigSchema, ServerProvider, ServerRouterProvider } from "alepha/server";
|
|
5
|
-
import * as _alepha_logger0 from "alepha/logger";
|
|
6
5
|
import { ServerStaticProvider } from "alepha/server/static";
|
|
6
|
+
import * as _alepha_logger0 from "alepha/logger";
|
|
7
7
|
import { OpenAPIV3 } from "openapi-types";
|
|
8
8
|
|
|
9
9
|
//#region src/descriptors/$swagger.d.ts
|
|
@@ -11,11 +11,11 @@ import { OpenAPIV3 } from "openapi-types";
|
|
|
11
11
|
* Create a new OpenAPI.
|
|
12
12
|
*/
|
|
13
13
|
declare const $swagger: {
|
|
14
|
-
(options
|
|
14
|
+
(options?: SwaggerDescriptorOptions): SwaggerDescriptor;
|
|
15
15
|
[KIND]: typeof SwaggerDescriptor;
|
|
16
16
|
};
|
|
17
17
|
interface SwaggerDescriptorOptions {
|
|
18
|
-
info
|
|
18
|
+
info?: OpenAPIV3.InfoObject;
|
|
19
19
|
/**
|
|
20
20
|
* @default: "/docs"
|
|
21
21
|
*/
|
package/server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alepha_core11 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_logger3 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_logger3.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_core11.HookDescriptor<"server:onRequest">;
|
|
196
|
+
readonly onResponse: _alepha_core11.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_logger3.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_logger3.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_core11.TObject<{
|
|
730
|
+
SERVER_PORT: _alepha_core11.TInteger;
|
|
731
|
+
SERVER_HOST: _alepha_core11.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_logger3.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_core11.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_core11.HookDescriptor<"start">;
|
|
750
|
+
protected readonly stop: _alepha_core11.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_logger3.Logger;
|
|
758
758
|
protected readonly alepha: Alepha;
|
|
759
|
-
readonly onRequest:
|
|
760
|
-
readonly onError:
|
|
761
|
-
readonly onResponse:
|
|
759
|
+
readonly onRequest: _alepha_core11.HookDescriptor<"server:onRequest">;
|
|
760
|
+
readonly onError: _alepha_core11.HookDescriptor<"server:onError">;
|
|
761
|
+
readonly onResponse: _alepha_core11.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_core11.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_core11.Service<_alepha_core11.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/ui.cjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var m = require('@alepha/ui');
|
|
3
|
+
Object.keys(m).forEach(function (k) {
|
|
4
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: function () { return m[k]; }
|
|
7
|
+
});
|
|
8
|
+
});
|