alepha 0.12.1 → 0.13.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/dist/api-jobs/index.d.ts +26 -26
- package/dist/api-notifications/index.d.ts +111 -111
- package/dist/api-users/index.d.cts +1221 -1221
- package/dist/api-users/index.d.ts +1239 -1239
- package/dist/api-verifications/index.d.ts +94 -94
- package/dist/redis/index.d.ts +10 -10
- package/dist/security/index.d.cts +32 -32
- package/dist/security/index.d.ts +28 -28
- package/dist/server-auth/index.d.cts +193 -193
- package/dist/server-auth/index.d.ts +193 -193
- package/dist/server-links/index.d.cts +34 -34
- package/dist/server-links/index.d.ts +34 -34
- package/dist/websocket/index.d.cts +7 -7
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as alepha21 from "alepha";
|
|
2
2
|
import { Alepha, Async, Descriptor, KIND, Static } from "alepha";
|
|
3
3
|
import { ServiceAccountDescriptor, UserAccount, UserAccountToken } from "alepha/security";
|
|
4
4
|
import * as alepha_server0 from "alepha/server";
|
|
@@ -72,23 +72,23 @@ declare module "alepha/server" {
|
|
|
72
72
|
*/
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region src/server-links/schemas/apiLinksResponseSchema.d.ts
|
|
75
|
-
declare const apiLinkSchema:
|
|
76
|
-
name:
|
|
77
|
-
group:
|
|
78
|
-
path:
|
|
79
|
-
method:
|
|
80
|
-
requestBodyType:
|
|
81
|
-
service:
|
|
75
|
+
declare const apiLinkSchema: alepha21.TObject<{
|
|
76
|
+
name: alepha21.TString;
|
|
77
|
+
group: alepha21.TOptional<alepha21.TString>;
|
|
78
|
+
path: alepha21.TString;
|
|
79
|
+
method: alepha21.TOptional<alepha21.TString>;
|
|
80
|
+
requestBodyType: alepha21.TOptional<alepha21.TString>;
|
|
81
|
+
service: alepha21.TOptional<alepha21.TString>;
|
|
82
82
|
}>;
|
|
83
|
-
declare const apiLinksResponseSchema:
|
|
84
|
-
prefix:
|
|
85
|
-
links:
|
|
86
|
-
name:
|
|
87
|
-
group:
|
|
88
|
-
path:
|
|
89
|
-
method:
|
|
90
|
-
requestBodyType:
|
|
91
|
-
service:
|
|
83
|
+
declare const apiLinksResponseSchema: alepha21.TObject<{
|
|
84
|
+
prefix: alepha21.TOptional<alepha21.TString>;
|
|
85
|
+
links: alepha21.TArray<alepha21.TObject<{
|
|
86
|
+
name: alepha21.TString;
|
|
87
|
+
group: alepha21.TOptional<alepha21.TString>;
|
|
88
|
+
path: alepha21.TString;
|
|
89
|
+
method: alepha21.TOptional<alepha21.TString>;
|
|
90
|
+
requestBodyType: alepha21.TOptional<alepha21.TString>;
|
|
91
|
+
service: alepha21.TOptional<alepha21.TString>;
|
|
92
92
|
}>>;
|
|
93
93
|
}>;
|
|
94
94
|
type ApiLinksResponse = Static<typeof apiLinksResponseSchema>;
|
|
@@ -293,7 +293,7 @@ declare class ServerProxyProvider {
|
|
|
293
293
|
protected readonly log: alepha_logger0.Logger;
|
|
294
294
|
protected readonly routerProvider: ServerRouterProvider;
|
|
295
295
|
protected readonly alepha: Alepha;
|
|
296
|
-
protected readonly configure:
|
|
296
|
+
protected readonly configure: alepha21.HookDescriptor<"configure">;
|
|
297
297
|
createProxy(options: ProxyDescriptorOptions): void;
|
|
298
298
|
createProxyHandler(target: string, options: Omit<ProxyDescriptorOptions, "path">): ServerHandler;
|
|
299
299
|
private getRawRequestBody;
|
|
@@ -372,8 +372,8 @@ declare class RemoteDescriptorProvider {
|
|
|
372
372
|
protected readonly remotes: Array<ServerRemote>;
|
|
373
373
|
protected readonly log: alepha_logger0.Logger;
|
|
374
374
|
getRemotes(): ServerRemote[];
|
|
375
|
-
readonly configure:
|
|
376
|
-
readonly start:
|
|
375
|
+
readonly configure: alepha21.HookDescriptor<"configure">;
|
|
376
|
+
readonly start: alepha21.HookDescriptor<"start">;
|
|
377
377
|
registerRemote(value: RemoteDescriptor): Promise<void>;
|
|
378
378
|
protected readonly fetchLinks: alepha_retry0.RetryDescriptorFn<(opts: FetchLinksOptions) => Promise<ApiLinksResponse>>;
|
|
379
379
|
}
|
|
@@ -441,22 +441,22 @@ declare class ServerLinksProvider {
|
|
|
441
441
|
protected readonly remoteProvider: RemoteDescriptorProvider;
|
|
442
442
|
protected readonly serverTimingProvider: ServerTimingProvider;
|
|
443
443
|
get prefix(): string;
|
|
444
|
-
readonly onRoute:
|
|
444
|
+
readonly onRoute: alepha21.HookDescriptor<"configure">;
|
|
445
445
|
/**
|
|
446
446
|
* First API - Get all API links for the user.
|
|
447
447
|
*
|
|
448
448
|
* This is based on the user's permissions.
|
|
449
449
|
*/
|
|
450
450
|
readonly links: alepha_server0.RouteDescriptor<{
|
|
451
|
-
response:
|
|
452
|
-
prefix:
|
|
453
|
-
links:
|
|
454
|
-
name:
|
|
455
|
-
group:
|
|
456
|
-
path:
|
|
457
|
-
method:
|
|
458
|
-
requestBodyType:
|
|
459
|
-
service:
|
|
451
|
+
response: alepha21.TObject<{
|
|
452
|
+
prefix: alepha21.TOptional<alepha21.TString>;
|
|
453
|
+
links: alepha21.TArray<alepha21.TObject<{
|
|
454
|
+
name: alepha21.TString;
|
|
455
|
+
group: alepha21.TOptional<alepha21.TString>;
|
|
456
|
+
path: alepha21.TString;
|
|
457
|
+
method: alepha21.TOptional<alepha21.TString>;
|
|
458
|
+
requestBodyType: alepha21.TOptional<alepha21.TString>;
|
|
459
|
+
service: alepha21.TOptional<alepha21.TString>;
|
|
460
460
|
}>>;
|
|
461
461
|
}>;
|
|
462
462
|
}>;
|
|
@@ -467,10 +467,10 @@ declare class ServerLinksProvider {
|
|
|
467
467
|
* I mean for 150+ links, you got 50ms of serialization time.
|
|
468
468
|
*/
|
|
469
469
|
readonly schema: alepha_server0.RouteDescriptor<{
|
|
470
|
-
params:
|
|
471
|
-
name:
|
|
470
|
+
params: alepha21.TObject<{
|
|
471
|
+
name: alepha21.TString;
|
|
472
472
|
}>;
|
|
473
|
-
response:
|
|
473
|
+
response: alepha21.TRecord<string, alepha21.TAny>;
|
|
474
474
|
}>;
|
|
475
475
|
getSchemaByName(name: string, options?: GetApiLinksOptions): Promise<RequestConfigSchema>;
|
|
476
476
|
/**
|
|
@@ -507,7 +507,7 @@ declare module "alepha" {
|
|
|
507
507
|
* @see {@link $client}
|
|
508
508
|
* @module alepha.server.links
|
|
509
509
|
*/
|
|
510
|
-
declare const AlephaServerLinks:
|
|
510
|
+
declare const AlephaServerLinks: alepha21.Service<alepha21.Module>;
|
|
511
511
|
//#endregion
|
|
512
512
|
export { $client, $remote, AlephaServerLinks, ApiLink, ApiLinksResponse, ClientScope, FetchLinksOptions, GetApiLinksOptions, HttpClientLink, HttpVirtualClient, LinkProvider, RemoteDescriptor, RemoteDescriptorOptions, RemoteDescriptorProvider, ServerLinksProvider, ServerRemote, VirtualAction, apiLinkSchema, apiLinksResponseSchema };
|
|
513
513
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as alepha23 from "alepha";
|
|
2
2
|
import { Alepha, Async, Descriptor, KIND, Static } from "alepha";
|
|
3
3
|
import { JwtProvider, SecurityProvider, ServiceAccountDescriptor, UserAccount, UserAccountToken } from "alepha/security";
|
|
4
4
|
import * as alepha_server0 from "alepha/server";
|
|
@@ -72,23 +72,23 @@ declare module "alepha/server" {
|
|
|
72
72
|
*/
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region src/server-links/schemas/apiLinksResponseSchema.d.ts
|
|
75
|
-
declare const apiLinkSchema:
|
|
76
|
-
name:
|
|
77
|
-
group:
|
|
78
|
-
path:
|
|
79
|
-
method:
|
|
80
|
-
requestBodyType:
|
|
81
|
-
service:
|
|
75
|
+
declare const apiLinkSchema: alepha23.TObject<{
|
|
76
|
+
name: alepha23.TString;
|
|
77
|
+
group: alepha23.TOptional<alepha23.TString>;
|
|
78
|
+
path: alepha23.TString;
|
|
79
|
+
method: alepha23.TOptional<alepha23.TString>;
|
|
80
|
+
requestBodyType: alepha23.TOptional<alepha23.TString>;
|
|
81
|
+
service: alepha23.TOptional<alepha23.TString>;
|
|
82
82
|
}>;
|
|
83
|
-
declare const apiLinksResponseSchema:
|
|
84
|
-
prefix:
|
|
85
|
-
links:
|
|
86
|
-
name:
|
|
87
|
-
group:
|
|
88
|
-
path:
|
|
89
|
-
method:
|
|
90
|
-
requestBodyType:
|
|
91
|
-
service:
|
|
83
|
+
declare const apiLinksResponseSchema: alepha23.TObject<{
|
|
84
|
+
prefix: alepha23.TOptional<alepha23.TString>;
|
|
85
|
+
links: alepha23.TArray<alepha23.TObject<{
|
|
86
|
+
name: alepha23.TString;
|
|
87
|
+
group: alepha23.TOptional<alepha23.TString>;
|
|
88
|
+
path: alepha23.TString;
|
|
89
|
+
method: alepha23.TOptional<alepha23.TString>;
|
|
90
|
+
requestBodyType: alepha23.TOptional<alepha23.TString>;
|
|
91
|
+
service: alepha23.TOptional<alepha23.TString>;
|
|
92
92
|
}>>;
|
|
93
93
|
}>;
|
|
94
94
|
type ApiLinksResponse = Static<typeof apiLinksResponseSchema>;
|
|
@@ -293,7 +293,7 @@ declare class ServerProxyProvider {
|
|
|
293
293
|
protected readonly log: alepha_logger0.Logger;
|
|
294
294
|
protected readonly routerProvider: ServerRouterProvider;
|
|
295
295
|
protected readonly alepha: Alepha;
|
|
296
|
-
protected readonly configure:
|
|
296
|
+
protected readonly configure: alepha23.HookDescriptor<"configure">;
|
|
297
297
|
createProxy(options: ProxyDescriptorOptions): void;
|
|
298
298
|
createProxyHandler(target: string, options: Omit<ProxyDescriptorOptions, "path">): ServerHandler;
|
|
299
299
|
private getRawRequestBody;
|
|
@@ -372,8 +372,8 @@ declare class RemoteDescriptorProvider {
|
|
|
372
372
|
protected readonly remotes: Array<ServerRemote>;
|
|
373
373
|
protected readonly log: alepha_logger0.Logger;
|
|
374
374
|
getRemotes(): ServerRemote[];
|
|
375
|
-
readonly configure:
|
|
376
|
-
readonly start:
|
|
375
|
+
readonly configure: alepha23.HookDescriptor<"configure">;
|
|
376
|
+
readonly start: alepha23.HookDescriptor<"start">;
|
|
377
377
|
registerRemote(value: RemoteDescriptor): Promise<void>;
|
|
378
378
|
protected readonly fetchLinks: alepha_retry0.RetryDescriptorFn<(opts: FetchLinksOptions) => Promise<ApiLinksResponse>>;
|
|
379
379
|
}
|
|
@@ -441,22 +441,22 @@ declare class ServerLinksProvider {
|
|
|
441
441
|
protected readonly remoteProvider: RemoteDescriptorProvider;
|
|
442
442
|
protected readonly serverTimingProvider: ServerTimingProvider;
|
|
443
443
|
get prefix(): string;
|
|
444
|
-
readonly onRoute:
|
|
444
|
+
readonly onRoute: alepha23.HookDescriptor<"configure">;
|
|
445
445
|
/**
|
|
446
446
|
* First API - Get all API links for the user.
|
|
447
447
|
*
|
|
448
448
|
* This is based on the user's permissions.
|
|
449
449
|
*/
|
|
450
450
|
readonly links: alepha_server0.RouteDescriptor<{
|
|
451
|
-
response:
|
|
452
|
-
prefix:
|
|
453
|
-
links:
|
|
454
|
-
name:
|
|
455
|
-
group:
|
|
456
|
-
path:
|
|
457
|
-
method:
|
|
458
|
-
requestBodyType:
|
|
459
|
-
service:
|
|
451
|
+
response: alepha23.TObject<{
|
|
452
|
+
prefix: alepha23.TOptional<alepha23.TString>;
|
|
453
|
+
links: alepha23.TArray<alepha23.TObject<{
|
|
454
|
+
name: alepha23.TString;
|
|
455
|
+
group: alepha23.TOptional<alepha23.TString>;
|
|
456
|
+
path: alepha23.TString;
|
|
457
|
+
method: alepha23.TOptional<alepha23.TString>;
|
|
458
|
+
requestBodyType: alepha23.TOptional<alepha23.TString>;
|
|
459
|
+
service: alepha23.TOptional<alepha23.TString>;
|
|
460
460
|
}>>;
|
|
461
461
|
}>;
|
|
462
462
|
}>;
|
|
@@ -467,10 +467,10 @@ declare class ServerLinksProvider {
|
|
|
467
467
|
* I mean for 150+ links, you got 50ms of serialization time.
|
|
468
468
|
*/
|
|
469
469
|
readonly schema: alepha_server0.RouteDescriptor<{
|
|
470
|
-
params:
|
|
471
|
-
name:
|
|
470
|
+
params: alepha23.TObject<{
|
|
471
|
+
name: alepha23.TString;
|
|
472
472
|
}>;
|
|
473
|
-
response:
|
|
473
|
+
response: alepha23.TRecord<string, alepha23.TAny>;
|
|
474
474
|
}>;
|
|
475
475
|
getSchemaByName(name: string, options?: GetApiLinksOptions): Promise<RequestConfigSchema>;
|
|
476
476
|
/**
|
|
@@ -507,7 +507,7 @@ declare module "alepha" {
|
|
|
507
507
|
* @see {@link $client}
|
|
508
508
|
* @module alepha.server.links
|
|
509
509
|
*/
|
|
510
|
-
declare const AlephaServerLinks:
|
|
510
|
+
declare const AlephaServerLinks: alepha23.Service<alepha23.Module>;
|
|
511
511
|
//#endregion
|
|
512
512
|
export { $client, $remote, AlephaServerLinks, ApiLink, ApiLinksResponse, ClientScope, FetchLinksOptions, GetApiLinksOptions, HttpClientLink, HttpVirtualClient, LinkProvider, RemoteDescriptor, RemoteDescriptorOptions, RemoteDescriptorProvider, ServerLinksProvider, ServerRemote, VirtualAction, apiLinkSchema, apiLinksResponseSchema };
|
|
513
513
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as alepha42 from "alepha";
|
|
2
2
|
import { Alepha, Descriptor, KIND, Static, TObject, TString, TUnion } from "alepha";
|
|
3
|
-
import * as
|
|
3
|
+
import * as alepha_logger1 from "alepha/logger";
|
|
4
4
|
import * as alepha_topic0 from "alepha/topic";
|
|
5
5
|
import { IncomingMessage } from "node:http";
|
|
6
6
|
import { WebSocket as WebSocket$1, WebSocketServer } from "ws";
|
|
@@ -452,7 +452,7 @@ declare class WebSocketValidationError extends WebSocketError {
|
|
|
452
452
|
* and messages can be targeted to specific rooms.
|
|
453
453
|
*/
|
|
454
454
|
declare class RoomManager {
|
|
455
|
-
protected readonly log:
|
|
455
|
+
protected readonly log: alepha_logger1.Logger;
|
|
456
456
|
/**
|
|
457
457
|
* Maps roomId → Set<connectionId>
|
|
458
458
|
*/
|
|
@@ -533,7 +533,7 @@ declare class WebSocketChannelConnection<TClient extends TWSObject, TServer exte
|
|
|
533
533
|
};
|
|
534
534
|
protected readonly env: Static<typeof envSchema$1>;
|
|
535
535
|
protected readonly alepha: Alepha;
|
|
536
|
-
protected readonly log:
|
|
536
|
+
protected readonly log: alepha_logger1.Logger;
|
|
537
537
|
protected ws?: WebSocket;
|
|
538
538
|
protected reconnectAttempts: number;
|
|
539
539
|
protected reconnectTimer?: number;
|
|
@@ -607,7 +607,7 @@ declare class WebSocketChannelConnection<TClient extends TWSObject, TServer exte
|
|
|
607
607
|
* One connection per channel, multiple rooms per connection.
|
|
608
608
|
*/
|
|
609
609
|
declare class WebSocketClient {
|
|
610
|
-
protected readonly log:
|
|
610
|
+
protected readonly log: alepha_logger1.Logger;
|
|
611
611
|
protected readonly alepha: Alepha;
|
|
612
612
|
protected readonly env: {
|
|
613
613
|
WEBSOCKET_URL: string;
|
|
@@ -694,7 +694,7 @@ declare const webSocketMessageSchema: {
|
|
|
694
694
|
* - Horizontal scaling without losing messages
|
|
695
695
|
*/
|
|
696
696
|
declare class WebSocketTopicService {
|
|
697
|
-
protected readonly log:
|
|
697
|
+
protected readonly log: alepha_logger1.Logger;
|
|
698
698
|
/**
|
|
699
699
|
* Handler function to be called when a message is received from the topic
|
|
700
700
|
* This is set by the WebSocket provider during initialization
|
|
@@ -756,7 +756,7 @@ declare class NodeWebSocketServerProvider extends WebSocketServerProvider {
|
|
|
756
756
|
protected readonly alepha: Alepha;
|
|
757
757
|
protected readonly roomManager: RoomManager;
|
|
758
758
|
protected readonly topicService: WebSocketTopicService;
|
|
759
|
-
protected readonly log:
|
|
759
|
+
protected readonly log: alepha_logger1.Logger;
|
|
760
760
|
protected readonly env: {
|
|
761
761
|
WEBSOCKET_PATH: string;
|
|
762
762
|
};
|
|
@@ -796,7 +796,7 @@ declare class NodeWebSocketConnection implements WebSocketConnection {
|
|
|
796
796
|
protected readonly ws: WebSocket$1;
|
|
797
797
|
protected readonly provider: NodeWebSocketServerProvider;
|
|
798
798
|
protected readonly endpoint: WebSocketDescriptorOptions<any, any>;
|
|
799
|
-
protected readonly log:
|
|
799
|
+
protected readonly log: alepha_logger1.Logger;
|
|
800
800
|
metadata?: Record<string, any>;
|
|
801
801
|
constructor(id: string, userId: string | undefined, roomIds: string[], ws: WebSocket$1, provider: NodeWebSocketServerProvider, endpoint: WebSocketDescriptorOptions<any, any>);
|
|
802
802
|
get readyState(): WebSocketState;
|
package/package.json
CHANGED