alepha 0.7.7 → 0.8.1

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.
Files changed (55) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +7 -34
  3. package/batch.cjs +8 -0
  4. package/batch.d.ts +147 -0
  5. package/batch.js +1 -0
  6. package/cache/redis.d.ts +13 -18
  7. package/cache.d.ts +183 -119
  8. package/command.cjs +8 -0
  9. package/command.d.ts +152 -0
  10. package/command.js +1 -0
  11. package/core.d.ts +846 -838
  12. package/datetime.d.ts +78 -78
  13. package/file.cjs +8 -0
  14. package/file.d.ts +46 -0
  15. package/file.js +1 -0
  16. package/lock/redis.d.ts +10 -12
  17. package/lock.d.ts +73 -80
  18. package/package.json +86 -34
  19. package/postgres.d.ts +348 -170
  20. package/queue/redis.d.ts +13 -13
  21. package/queue.d.ts +107 -18
  22. package/react/auth.d.ts +22 -16
  23. package/react/head.d.ts +10 -4
  24. package/react.d.ts +206 -49
  25. package/redis.d.ts +23 -27
  26. package/retry.d.ts +75 -54
  27. package/router.cjs +8 -0
  28. package/router.d.ts +45 -0
  29. package/router.js +1 -0
  30. package/scheduler.d.ts +15 -16
  31. package/security.d.ts +229 -40
  32. package/server/cache.d.ts +7 -8
  33. package/server/compress.cjs +8 -0
  34. package/server/compress.d.ts +26 -0
  35. package/server/compress.js +1 -0
  36. package/server/cookies.d.ts +249 -18
  37. package/server/cors.d.ts +7 -3
  38. package/server/health.d.ts +21 -24
  39. package/server/helmet.cjs +8 -0
  40. package/server/helmet.d.ts +70 -0
  41. package/server/helmet.js +1 -0
  42. package/server/links.d.ts +87 -93
  43. package/server/metrics.cjs +8 -0
  44. package/server/metrics.d.ts +35 -0
  45. package/server/metrics.js +1 -0
  46. package/server/multipart.cjs +8 -0
  47. package/server/multipart.d.ts +46 -0
  48. package/server/multipart.js +1 -0
  49. package/server/proxy.d.ts +11 -11
  50. package/server/static.d.ts +70 -55
  51. package/server/swagger.d.ts +55 -54
  52. package/server.d.ts +273 -123
  53. package/topic/redis.d.ts +22 -23
  54. package/topic.d.ts +26 -19
  55. package/vite.d.ts +59 -36
@@ -1,19 +1,25 @@
1
- import * as _alepha_core0 from "@alepha/core";
2
- import { Alepha, KIND, Module, OPTIONS, TObject } from "@alepha/core";
3
- import { ServerActionDescriptorProvider, ServerRouteAction, ServerRouterProvider } from "@alepha/server";
4
- import { ServerStaticProvider } from "@alepha/server-static";
1
+ import { Alepha, HookDescriptor, KIND, Module, OPTIONS, TObject } from "alepha";
2
+ import { ServerActionDescriptorProvider, ServerRouteAction, ServerRouterProvider } from "alepha/server";
3
+ import { ServerStaticProvider } from "alepha/server/static";
5
4
  import { OpenAPIV3 } from "openapi-types";
6
5
 
7
6
  //#region src/descriptors/$swagger.d.ts
7
+ /**
8
+ * Create a new OpenAPI.
9
+ */
10
+ declare const $swagger: {
11
+ (options: SwaggerDescriptorOptions): SwaggerDescriptor;
12
+ [KIND]: string;
13
+ };
8
14
  interface SwaggerDescriptorOptions {
9
15
  info: OpenAPIV3.InfoObject;
10
16
  /**
11
- * @default: "/docs"
12
- */
17
+ * @default: "/docs"
18
+ */
13
19
  prefix?: string;
14
20
  /**
15
- * If true, docs will be disabled.
16
- */
21
+ * If true, docs will be disabled.
22
+ */
17
23
  disabled?: boolean;
18
24
  excludeTags?: string[];
19
25
  ui?: boolean | SwaggerUiOptions;
@@ -23,53 +29,53 @@ interface SwaggerUiOptions {
23
29
  root?: string;
24
30
  initOAuth?: {
25
31
  /**
26
- * Default clientId.
27
- */
32
+ * Default clientId.
33
+ */
28
34
  clientId?: string;
29
35
  /**
30
- * realm query parameter (for oauth1) added to authorizationUrl and tokenUrl.
31
- */
36
+ * realm query parameter (for oauth1) added to authorizationUrl and tokenUrl.
37
+ */
32
38
  realm?: string;
33
39
  /**
34
- * application name, displayed in authorization popup.
35
- */
40
+ * application name, displayed in authorization popup.
41
+ */
36
42
  appName?: string;
37
43
  /**
38
- * scope separator for passing scopes, encoded before calling, default
39
- * value is a space (encoded value %20).
40
- *
41
- * @default ' '
42
- */
44
+ * scope separator for passing scopes, encoded before calling, default
45
+ * value is a space (encoded value %20).
46
+ *
47
+ * @default ' '
48
+ */
43
49
  scopeSeparator?: string;
44
50
  /**
45
- * string array or scope separator (i.e. space) separated string of
46
- * initially selected oauth scopes
47
- *
48
- * @default []
49
- */
51
+ * string array or scope separator (i.e. space) separated string of
52
+ * initially selected oauth scopes
53
+ *
54
+ * @default []
55
+ */
50
56
  scopes?: string | string[];
51
57
  /**
52
- * Additional query parameters added to authorizationUrl and tokenUrl.
53
- * MUST be an object
54
- */
58
+ * Additional query parameters added to authorizationUrl and tokenUrl.
59
+ * MUST be an object
60
+ */
55
61
  additionalQueryStringParams?: {
56
62
  [key: string]: any;
57
63
  };
58
64
  /**
59
- * Only activated for the accessCode flow. During the authorization_code
60
- * request to the tokenUrl, pass the Client Password using the HTTP Basic
61
- * Authentication scheme (Authorization header with Basic
62
- * base64encode(client_id + client_secret)).
63
- *
64
- * @default false
65
- */
65
+ * Only activated for the accessCode flow. During the authorization_code
66
+ * request to the tokenUrl, pass the Client Password using the HTTP Basic
67
+ * Authentication scheme (Authorization header with Basic
68
+ * base64encode(client_id + client_secret)).
69
+ *
70
+ * @default false
71
+ */
66
72
  useBasicAuthenticationWithAccessCodeGrant?: boolean;
67
73
  /**
68
- * Only applies to Authorization Code flows. Proof Key for Code Exchange
69
- * brings enhanced security for OAuth public clients.
70
- *
71
- * @default false
72
- */
74
+ * Only applies to Authorization Code flows. Proof Key for Code Exchange
75
+ * brings enhanced security for OAuth public clients.
76
+ *
77
+ * @default false
78
+ */
73
79
  usePkceWithAuthorizationCodeGrant?: boolean;
74
80
  };
75
81
  }
@@ -78,10 +84,6 @@ interface SwaggerDescriptor {
78
84
  [OPTIONS]: SwaggerDescriptorOptions;
79
85
  json(): OpenAPIV3.Document;
80
86
  }
81
- declare const $swagger: {
82
- (options: SwaggerDescriptorOptions): SwaggerDescriptor;
83
- [KIND]: string;
84
- };
85
87
  //#endregion
86
88
  //#region src/ServerSwaggerProvider.d.ts
87
89
  declare class ServerSwaggerProvider {
@@ -89,8 +91,8 @@ declare class ServerSwaggerProvider {
89
91
  protected readonly serverStaticProvider: ServerStaticProvider;
90
92
  protected readonly serverRouterProvider: ServerRouterProvider;
91
93
  protected readonly alepha: Alepha;
92
- protected readonly configure: _alepha_core0.HookDescriptor<"configure">;
93
- protected configureOpenApi(doc: SwaggerDescriptorOptions): any;
94
+ protected readonly configure: HookDescriptor<"configure">;
95
+ protected configureOpenApi(doc: SwaggerDescriptorOptions): OpenAPIV3.Document;
94
96
  isBodyMultipart(schema: TObject): boolean;
95
97
  replacePathParams(url: string): string;
96
98
  getResponseSchema(route: ServerRouteAction): {
@@ -103,16 +105,15 @@ declare class ServerSwaggerProvider {
103
105
  }
104
106
  //#endregion
105
107
  //#region src/index.d.ts
108
+ // ---------------------------------------------------------------------------------------------------------------------
106
109
  /**
107
- * Alepha Server Swagger Module
108
- *
109
- * Plugin for Alepha Server that provides Swagger documentation capabilities.
110
- * It generates OpenAPI v3 documentation for the server's endpoints ($action).
111
- * It also provides a Swagger UI for interactive API documentation.
112
- *
113
- * @see {@link ServerSwaggerProvider}
114
- * @module alepha.server.swagger
115
- */
110
+ * Plugin for Alepha Server that provides Swagger documentation capabilities.
111
+ * It generates OpenAPI v3 documentation for the server's endpoints ($action).
112
+ * It also provides a Swagger UI for interactive API documentation.
113
+ *
114
+ * @see {@link ServerSwaggerProvider}
115
+ * @module alepha.server.swagger
116
+ */
116
117
  declare class AlephaServerSwagger implements Module {
117
118
  readonly name = "alepha.server.swagger";
118
119
  readonly $services: (alepha: Alepha) => Alepha;