alepha 0.13.3 → 0.13.4

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.
@@ -1,6 +1,6 @@
1
1
  import * as alepha1 from "alepha";
2
2
  import { InstantiableClass, KIND, Primitive } from "alepha";
3
- import * as alepha_logger0 from "alepha/logger";
3
+ import * as alepha_logger1 from "alepha/logger";
4
4
  import { Transporter } from "nodemailer";
5
5
 
6
6
  //#region src/email/providers/EmailProvider.d.ts
@@ -73,7 +73,7 @@ interface LocalEmailProviderOptions {
73
73
  directory?: string;
74
74
  }
75
75
  declare class LocalEmailProvider implements EmailProvider {
76
- protected readonly log: alepha_logger0.Logger;
76
+ protected readonly log: alepha_logger1.Logger;
77
77
  protected readonly directory: string;
78
78
  constructor(options?: LocalEmailProviderOptions);
79
79
  send(options: EmailSendOptions): Promise<void>;
@@ -93,7 +93,7 @@ interface EmailRecord {
93
93
  sentAt: Date;
94
94
  }
95
95
  declare class MemoryEmailProvider implements EmailProvider {
96
- protected readonly log: alepha_logger0.Logger;
96
+ protected readonly log: alepha_logger1.Logger;
97
97
  records: EmailRecord[];
98
98
  send(options: EmailSendOptions): Promise<void>;
99
99
  /**
@@ -134,7 +134,7 @@ declare class NodemailerEmailProvider implements EmailProvider {
134
134
  EMAIL_FROM: string;
135
135
  EMAIL_SECURE: boolean;
136
136
  };
137
- protected readonly log: alepha_logger0.Logger;
137
+ protected readonly log: alepha_logger1.Logger;
138
138
  protected transporter: Transporter;
139
139
  protected fromAddress: string;
140
140
  readonly options: NodemailerEmailProviderOptions;
@@ -1,4 +1,4 @@
1
- import * as alepha1 from "alepha";
1
+ import * as alepha6 from "alepha";
2
2
  import { Alepha, AlephaError, KIND, Page, Page as Page$1, PageQuery, PageQuery as PageQuery$1, Primitive, Service, Static, StaticEncode, TBigInt, TInteger, TNull, TNumber, TNumberOptions, TObject, TObjectOptions, TOptional, TPage, TSchema, TString, TStringOptions, TUnion, TUnsafe, pageQuerySchema, pageSchema } from "alepha";
3
3
  import { DateTime, DateTimeProvider } from "alepha/datetime";
4
4
  import * as drizzle_orm0 from "drizzle-orm";
@@ -1061,11 +1061,11 @@ declare class DrizzleKitProvider {
1061
1061
  */
1062
1062
  importDrizzleKit(): typeof DrizzleKit;
1063
1063
  }
1064
- declare const devMigrationsSchema: alepha1.TObject<{
1065
- id: alepha1.TNumber;
1066
- name: alepha1.TString;
1067
- snapshot: alepha1.TString;
1068
- created_at: alepha1.TString;
1064
+ declare const devMigrationsSchema: alepha6.TObject<{
1065
+ id: alepha6.TNumber;
1066
+ name: alepha6.TString;
1067
+ snapshot: alepha6.TString;
1068
+ created_at: alepha6.TString;
1069
1069
  }>;
1070
1070
  type DevMigrations = Static<typeof devMigrationsSchema>;
1071
1071
  //#endregion
@@ -1262,7 +1262,7 @@ declare class QueryManager {
1262
1262
  createPagination<T>(entities: T[], limit?: number, offset?: number, sort?: Array<{
1263
1263
  column: string;
1264
1264
  direction: "asc" | "desc";
1265
- }>): alepha1.Page<T>;
1265
+ }>): alepha6.Page<T>;
1266
1266
  }
1267
1267
  interface PgJoin {
1268
1268
  table: string;
@@ -1732,7 +1732,7 @@ declare class PostgresModelBuilder extends ModelBuilder {
1732
1732
  declare module "alepha" {
1733
1733
  interface Env extends Partial<Static<typeof envSchema>> {}
1734
1734
  }
1735
- declare const envSchema: alepha1.TObject<{
1735
+ declare const envSchema: alepha6.TObject<{
1736
1736
  /**
1737
1737
  * Main configuration for database connection.
1738
1738
  * Accept a string in the format of a Postgres connection URL.
@@ -1740,13 +1740,13 @@ declare const envSchema: alepha1.TObject<{
1740
1740
  * or
1741
1741
  * Example: postgres://user:password@localhost:5432/database?sslmode=require
1742
1742
  */
1743
- DATABASE_URL: alepha1.TOptional<alepha1.TString>;
1743
+ DATABASE_URL: alepha6.TOptional<alepha6.TString>;
1744
1744
  /**
1745
1745
  * In addition to the DATABASE_URL, you can specify the postgres schema name.
1746
1746
  *
1747
1747
  * It will monkey patch drizzle tables.
1748
1748
  */
1749
- POSTGRES_SCHEMA: alepha1.TOptional<alepha1.TString>;
1749
+ POSTGRES_SCHEMA: alepha6.TOptional<alepha6.TString>;
1750
1750
  }>;
1751
1751
  declare class NodePostgresProvider extends DatabaseProvider {
1752
1752
  static readonly SSL_MODES: readonly ["require", "allow", "prefer", "verify-full"];
@@ -1779,8 +1779,8 @@ declare class NodePostgresProvider extends DatabaseProvider {
1779
1779
  */
1780
1780
  get db(): PostgresJsDatabase;
1781
1781
  protected executeMigrations(migrationsFolder: string): Promise<void>;
1782
- protected readonly onStart: alepha1.HookPrimitive<"start">;
1783
- protected readonly onStop: alepha1.HookPrimitive<"stop">;
1782
+ protected readonly onStart: alepha6.HookPrimitive<"start">;
1783
+ protected readonly onStop: alepha6.HookPrimitive<"stop">;
1784
1784
  connect(): Promise<void>;
1785
1785
  close(): Promise<void>;
1786
1786
  protected migrate: alepha_lock0.LockPrimitive<() => Promise<void>>;
@@ -1955,8 +1955,8 @@ type SchemaToSqliteBuilder<T extends TObject> = { [key in keyof T["properties"]]
1955
1955
  /**
1956
1956
  * Configuration options for the Node.js SQLite database provider.
1957
1957
  */
1958
- declare const nodeSqliteOptions: alepha1.Atom<alepha1.TObject<{
1959
- path: alepha1.TOptional<alepha1.TString>;
1958
+ declare const nodeSqliteOptions: alepha6.Atom<alepha6.TObject<{
1959
+ path: alepha6.TOptional<alepha6.TString>;
1960
1960
  }>, "alepha.postgres.node-sqlite.options">;
1961
1961
  type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
1962
1962
  declare module "alepha" {
@@ -1986,7 +1986,7 @@ declare class NodeSqliteProvider extends DatabaseProvider {
1986
1986
  get url(): string;
1987
1987
  execute(query: SQLLike): Promise<Array<Record<string, unknown>>>;
1988
1988
  readonly db: PgDatabase<any>;
1989
- protected readonly onStart: alepha1.HookPrimitive<"start">;
1989
+ protected readonly onStart: alepha6.HookPrimitive<"start">;
1990
1990
  protected executeMigrations(migrationsFolder: string): Promise<void>;
1991
1991
  }
1992
1992
  //#endregion
@@ -2045,7 +2045,7 @@ declare class PostgresTypeProvider {
2045
2045
  * This is used to mark rows as deleted without actually removing them from the database.
2046
2046
  * The column is nullable - NULL means not deleted, timestamp means deleted.
2047
2047
  */
2048
- readonly deletedAt: (options?: TStringOptions) => PgAttr<alepha1.TOptional<TString>, typeof PG_DELETED_AT>;
2048
+ readonly deletedAt: (options?: TStringOptions) => PgAttr<alepha6.TOptional<TString>, typeof PG_DELETED_AT>;
2049
2049
  /**
2050
2050
  * Creates a Postgres ENUM type.
2051
2051
  *
@@ -2077,7 +2077,7 @@ declare const pg: PostgresTypeProvider;
2077
2077
  declare class RepositoryProvider {
2078
2078
  protected readonly alepha: Alepha;
2079
2079
  protected readonly registry: Map<EntityPrimitive<any>, Service<Repository<any>>>;
2080
- getRepositories(provider?: DatabaseProvider): Repository<TObject<alepha1.TProperties>>[];
2080
+ getRepositories(provider?: DatabaseProvider): Repository<TObject<alepha6.TProperties>>[];
2081
2081
  getRepository<T extends TObject>(entity: EntityPrimitive<T>): Repository<T>;
2082
2082
  createClassRepository<T extends TObject>(entity: EntityPrimitive<T>): Service<Repository<T>>;
2083
2083
  }
@@ -2086,7 +2086,7 @@ declare class RepositoryProvider {
2086
2086
  /**
2087
2087
  * @deprecated Use `pg.primaryKey()` instead.
2088
2088
  */
2089
- declare const legacyIdSchema: PgAttr<PgAttr<PgAttr<alepha1.TInteger, typeof PG_PRIMARY_KEY>, typeof PG_SERIAL>, typeof PG_DEFAULT>;
2089
+ declare const legacyIdSchema: PgAttr<PgAttr<PgAttr<alepha6.TInteger, typeof PG_PRIMARY_KEY>, typeof PG_SERIAL>, typeof PG_DEFAULT>;
2090
2090
  //#endregion
2091
2091
  //#region src/orm/types/schema.d.ts
2092
2092
  /**
@@ -2207,7 +2207,7 @@ declare module "alepha" {
2207
2207
  * @see {@link $transaction}
2208
2208
  * @module alepha.postgres
2209
2209
  */
2210
- declare const AlephaPostgres: alepha1.Service<alepha1.Module>;
2210
+ declare const AlephaPostgres: alepha6.Service<alepha6.Module>;
2211
2211
  //#endregion
2212
2212
  export { $entity, $repository, $sequence, $transaction, AlephaPostgres, DatabaseProvider, DbConflictError, DbEntityNotFoundError, DbError, DbMigrationError, DbVersionMismatchError, DrizzleKitProvider, EntityColumn, EntityColumns, EntityPrimitive, EntityPrimitiveOptions, FilterOperators, FromSchema, NodePostgresProvider, NodeSqliteProvider, NodeSqliteProviderOptions, OrderBy, OrderByClause, OrderDirection, PG_CREATED_AT, PG_DEFAULT, PG_DELETED_AT, PG_ENUM, PG_IDENTITY, PG_PRIMARY_KEY, PG_REF, PG_SERIAL, PG_UPDATED_AT, PG_VERSION, type Page, type PageQuery, PgAttr, PgAttrField, PgDefault, PgEnumOptions, PgIdentityOptions, PgPrimaryKey, PgQuery, PgQueryRelations, PgQueryWhere, PgQueryWhereOrSQL, PgRef, PgRefOptions, PgRelation, PgRelationMap, PgStatic, PgSymbolKeys, PgSymbols, PostgresTypeProvider, Repository, RepositoryProvider, SQLLike, SchemaToTableConfig, SequencePrimitive, SequencePrimitiveOptions, StatementOptions, TObjectInsert, TObjectUpdate, TransactionContext, TransactionPrimitiveOptions, buildQueryString, drizzle_orm0 as drizzle, getAttrFields, insertSchema, legacyIdSchema, nodeSqliteOptions, pageQuerySchema, pageSchema, parseQueryString, pg, pgAttr, schema, sql, updateSchema };
2213
2213
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as alepha147 from "alepha";
1
+ import * as alepha182 from "alepha";
2
2
  import { Alepha, Async, KIND, Primitive, Static } from "alepha";
3
3
  import * as alepha_server_cookies0 from "alepha/server/cookies";
4
4
  import { Cookies, ServerCookiesProvider } from "alepha/server/cookies";
@@ -20,82 +20,82 @@ declare const alephaServerAuthRoutes: {
20
20
  };
21
21
  //#endregion
22
22
  //#region src/server-auth/schemas/authenticationProviderSchema.d.ts
23
- declare const authenticationProviderSchema: alepha147.TObject<{
24
- name: alepha147.TString;
25
- type: alepha147.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
23
+ declare const authenticationProviderSchema: alepha182.TObject<{
24
+ name: alepha182.TString;
25
+ type: alepha182.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
26
26
  }>;
27
27
  type AuthenticationProvider = Static<typeof authenticationProviderSchema>;
28
28
  //#endregion
29
29
  //#region src/server-auth/schemas/tokenResponseSchema.d.ts
30
- declare const tokenResponseSchema: alepha147.TObject<{
31
- provider: alepha147.TString;
32
- access_token: alepha147.TString;
33
- issued_at: alepha147.TNumber;
34
- expires_in: alepha147.TOptional<alepha147.TNumber>;
35
- refresh_token: alepha147.TOptional<alepha147.TString>;
36
- refresh_token_expires_in: alepha147.TOptional<alepha147.TNumber>;
37
- refresh_expires_in: alepha147.TOptional<alepha147.TNumber>;
38
- id_token: alepha147.TOptional<alepha147.TString>;
39
- scope: alepha147.TOptional<alepha147.TString>;
40
- user: alepha147.TObject<{
41
- id: alepha147.TString;
42
- name: alepha147.TOptional<alepha147.TString>;
43
- email: alepha147.TOptional<alepha147.TString>;
44
- username: alepha147.TOptional<alepha147.TString>;
45
- picture: alepha147.TOptional<alepha147.TString>;
46
- sessionId: alepha147.TOptional<alepha147.TString>;
47
- organizations: alepha147.TOptional<alepha147.TArray<alepha147.TString>>;
48
- roles: alepha147.TOptional<alepha147.TArray<alepha147.TString>>;
30
+ declare const tokenResponseSchema: alepha182.TObject<{
31
+ provider: alepha182.TString;
32
+ access_token: alepha182.TString;
33
+ issued_at: alepha182.TNumber;
34
+ expires_in: alepha182.TOptional<alepha182.TNumber>;
35
+ refresh_token: alepha182.TOptional<alepha182.TString>;
36
+ refresh_token_expires_in: alepha182.TOptional<alepha182.TNumber>;
37
+ refresh_expires_in: alepha182.TOptional<alepha182.TNumber>;
38
+ id_token: alepha182.TOptional<alepha182.TString>;
39
+ scope: alepha182.TOptional<alepha182.TString>;
40
+ user: alepha182.TObject<{
41
+ id: alepha182.TString;
42
+ name: alepha182.TOptional<alepha182.TString>;
43
+ email: alepha182.TOptional<alepha182.TString>;
44
+ username: alepha182.TOptional<alepha182.TString>;
45
+ picture: alepha182.TOptional<alepha182.TString>;
46
+ sessionId: alepha182.TOptional<alepha182.TString>;
47
+ organizations: alepha182.TOptional<alepha182.TArray<alepha182.TString>>;
48
+ roles: alepha182.TOptional<alepha182.TArray<alepha182.TString>>;
49
49
  }>;
50
- api: alepha147.TObject<{
51
- prefix: alepha147.TOptional<alepha147.TString>;
52
- links: alepha147.TArray<alepha147.TObject<{
53
- name: alepha147.TString;
54
- group: alepha147.TOptional<alepha147.TString>;
55
- path: alepha147.TString;
56
- method: alepha147.TOptional<alepha147.TString>;
57
- requestBodyType: alepha147.TOptional<alepha147.TString>;
58
- service: alepha147.TOptional<alepha147.TString>;
50
+ api: alepha182.TObject<{
51
+ prefix: alepha182.TOptional<alepha182.TString>;
52
+ links: alepha182.TArray<alepha182.TObject<{
53
+ name: alepha182.TString;
54
+ group: alepha182.TOptional<alepha182.TString>;
55
+ path: alepha182.TString;
56
+ method: alepha182.TOptional<alepha182.TString>;
57
+ requestBodyType: alepha182.TOptional<alepha182.TString>;
58
+ service: alepha182.TOptional<alepha182.TString>;
59
59
  }>>;
60
60
  }>;
61
61
  }>;
62
62
  type TokenResponse = Static<typeof tokenResponseSchema>;
63
63
  //#endregion
64
64
  //#region src/server-auth/schemas/tokensSchema.d.ts
65
- declare const tokensSchema: alepha147.TObject<{
66
- provider: alepha147.TString;
67
- access_token: alepha147.TString;
68
- issued_at: alepha147.TNumber;
69
- expires_in: alepha147.TOptional<alepha147.TNumber>;
70
- refresh_token: alepha147.TOptional<alepha147.TString>;
71
- refresh_token_expires_in: alepha147.TOptional<alepha147.TNumber>;
72
- refresh_expires_in: alepha147.TOptional<alepha147.TNumber>;
73
- id_token: alepha147.TOptional<alepha147.TString>;
74
- scope: alepha147.TOptional<alepha147.TString>;
65
+ declare const tokensSchema: alepha182.TObject<{
66
+ provider: alepha182.TString;
67
+ access_token: alepha182.TString;
68
+ issued_at: alepha182.TNumber;
69
+ expires_in: alepha182.TOptional<alepha182.TNumber>;
70
+ refresh_token: alepha182.TOptional<alepha182.TString>;
71
+ refresh_token_expires_in: alepha182.TOptional<alepha182.TNumber>;
72
+ refresh_expires_in: alepha182.TOptional<alepha182.TNumber>;
73
+ id_token: alepha182.TOptional<alepha182.TString>;
74
+ scope: alepha182.TOptional<alepha182.TString>;
75
75
  }>;
76
76
  type Tokens = Static<typeof tokensSchema>;
77
77
  //#endregion
78
78
  //#region src/server-auth/schemas/userinfoResponseSchema.d.ts
79
- declare const userinfoResponseSchema: alepha147.TObject<{
80
- user: alepha147.TOptional<alepha147.TObject<{
81
- id: alepha147.TString;
82
- name: alepha147.TOptional<alepha147.TString>;
83
- email: alepha147.TOptional<alepha147.TString>;
84
- username: alepha147.TOptional<alepha147.TString>;
85
- picture: alepha147.TOptional<alepha147.TString>;
86
- sessionId: alepha147.TOptional<alepha147.TString>;
87
- organizations: alepha147.TOptional<alepha147.TArray<alepha147.TString>>;
88
- roles: alepha147.TOptional<alepha147.TArray<alepha147.TString>>;
79
+ declare const userinfoResponseSchema: alepha182.TObject<{
80
+ user: alepha182.TOptional<alepha182.TObject<{
81
+ id: alepha182.TString;
82
+ name: alepha182.TOptional<alepha182.TString>;
83
+ email: alepha182.TOptional<alepha182.TString>;
84
+ username: alepha182.TOptional<alepha182.TString>;
85
+ picture: alepha182.TOptional<alepha182.TString>;
86
+ sessionId: alepha182.TOptional<alepha182.TString>;
87
+ organizations: alepha182.TOptional<alepha182.TArray<alepha182.TString>>;
88
+ roles: alepha182.TOptional<alepha182.TArray<alepha182.TString>>;
89
89
  }>>;
90
- api: alepha147.TObject<{
91
- prefix: alepha147.TOptional<alepha147.TString>;
92
- links: alepha147.TArray<alepha147.TObject<{
93
- name: alepha147.TString;
94
- group: alepha147.TOptional<alepha147.TString>;
95
- path: alepha147.TString;
96
- method: alepha147.TOptional<alepha147.TString>;
97
- requestBodyType: alepha147.TOptional<alepha147.TString>;
98
- service: alepha147.TOptional<alepha147.TString>;
90
+ api: alepha182.TObject<{
91
+ prefix: alepha182.TOptional<alepha182.TString>;
92
+ links: alepha182.TArray<alepha182.TObject<{
93
+ name: alepha182.TString;
94
+ group: alepha182.TOptional<alepha182.TString>;
95
+ path: alepha182.TString;
96
+ method: alepha182.TOptional<alepha182.TString>;
97
+ requestBodyType: alepha182.TOptional<alepha182.TString>;
98
+ service: alepha182.TOptional<alepha182.TString>;
99
99
  }>>;
100
100
  }>;
101
101
  }>;
@@ -108,34 +108,34 @@ declare class ServerAuthProvider {
108
108
  protected readonly serverCookiesProvider: ServerCookiesProvider;
109
109
  protected readonly dateTimeProvider: DateTimeProvider;
110
110
  protected readonly serverLinksProvider: ServerLinksProvider;
111
- protected readonly authorizationCode: alepha_server_cookies0.AbstractCookiePrimitive<alepha147.TObject<{
112
- provider: alepha147.TString;
113
- codeVerifier: alepha147.TOptional<alepha147.TString>;
114
- redirectUri: alepha147.TOptional<alepha147.TString>;
115
- state: alepha147.TOptional<alepha147.TString>;
116
- nonce: alepha147.TOptional<alepha147.TString>;
111
+ protected readonly authorizationCode: alepha_server_cookies0.AbstractCookiePrimitive<alepha182.TObject<{
112
+ provider: alepha182.TString;
113
+ codeVerifier: alepha182.TOptional<alepha182.TString>;
114
+ redirectUri: alepha182.TOptional<alepha182.TString>;
115
+ state: alepha182.TOptional<alepha182.TString>;
116
+ nonce: alepha182.TOptional<alepha182.TString>;
117
117
  }>>;
118
- readonly tokens: alepha_server_cookies0.AbstractCookiePrimitive<alepha147.TObject<{
119
- provider: alepha147.TString;
120
- access_token: alepha147.TString;
121
- issued_at: alepha147.TNumber;
122
- expires_in: alepha147.TOptional<alepha147.TNumber>;
123
- refresh_token: alepha147.TOptional<alepha147.TString>;
124
- refresh_token_expires_in: alepha147.TOptional<alepha147.TNumber>;
125
- refresh_expires_in: alepha147.TOptional<alepha147.TNumber>;
126
- id_token: alepha147.TOptional<alepha147.TString>;
127
- scope: alepha147.TOptional<alepha147.TString>;
118
+ readonly tokens: alepha_server_cookies0.AbstractCookiePrimitive<alepha182.TObject<{
119
+ provider: alepha182.TString;
120
+ access_token: alepha182.TString;
121
+ issued_at: alepha182.TNumber;
122
+ expires_in: alepha182.TOptional<alepha182.TNumber>;
123
+ refresh_token: alepha182.TOptional<alepha182.TString>;
124
+ refresh_token_expires_in: alepha182.TOptional<alepha182.TNumber>;
125
+ refresh_expires_in: alepha182.TOptional<alepha182.TNumber>;
126
+ id_token: alepha182.TOptional<alepha182.TString>;
127
+ scope: alepha182.TOptional<alepha182.TString>;
128
128
  }>>;
129
129
  get identities(): Array<AuthPrimitive>;
130
130
  getAuthenticationProviders(filters?: {
131
131
  realmName?: string;
132
132
  }): AuthenticationProvider[];
133
- protected readonly configure: alepha147.HookPrimitive<"configure">;
133
+ protected readonly configure: alepha182.HookPrimitive<"configure">;
134
134
  protected getAccessTokens(tokens: Tokens): string | undefined;
135
135
  /**
136
136
  * Fill request headers with access token from cookies or fallback to provider's fallback function.
137
137
  */
138
- protected readonly onRequest: alepha147.HookPrimitive<"server:onRequest">;
138
+ protected readonly onRequest: alepha182.HookPrimitive<"server:onRequest">;
139
139
  /**
140
140
  * Convert cookies to tokens.
141
141
  * If the tokens are expired, try to refresh them using the refresh token.
@@ -146,26 +146,26 @@ declare class ServerAuthProvider {
146
146
  * Get user information.
147
147
  */
148
148
  readonly userinfo: alepha_server0.RoutePrimitive<{
149
- response: alepha147.TObject<{
150
- user: alepha147.TOptional<alepha147.TObject<{
151
- id: alepha147.TString;
152
- name: alepha147.TOptional<alepha147.TString>;
153
- email: alepha147.TOptional<alepha147.TString>;
154
- username: alepha147.TOptional<alepha147.TString>;
155
- picture: alepha147.TOptional<alepha147.TString>;
156
- sessionId: alepha147.TOptional<alepha147.TString>;
157
- organizations: alepha147.TOptional<alepha147.TArray<alepha147.TString>>;
158
- roles: alepha147.TOptional<alepha147.TArray<alepha147.TString>>;
149
+ response: alepha182.TObject<{
150
+ user: alepha182.TOptional<alepha182.TObject<{
151
+ id: alepha182.TString;
152
+ name: alepha182.TOptional<alepha182.TString>;
153
+ email: alepha182.TOptional<alepha182.TString>;
154
+ username: alepha182.TOptional<alepha182.TString>;
155
+ picture: alepha182.TOptional<alepha182.TString>;
156
+ sessionId: alepha182.TOptional<alepha182.TString>;
157
+ organizations: alepha182.TOptional<alepha182.TArray<alepha182.TString>>;
158
+ roles: alepha182.TOptional<alepha182.TArray<alepha182.TString>>;
159
159
  }>>;
160
- api: alepha147.TObject<{
161
- prefix: alepha147.TOptional<alepha147.TString>;
162
- links: alepha147.TArray<alepha147.TObject<{
163
- name: alepha147.TString;
164
- group: alepha147.TOptional<alepha147.TString>;
165
- path: alepha147.TString;
166
- method: alepha147.TOptional<alepha147.TString>;
167
- requestBodyType: alepha147.TOptional<alepha147.TString>;
168
- service: alepha147.TOptional<alepha147.TString>;
160
+ api: alepha182.TObject<{
161
+ prefix: alepha182.TOptional<alepha182.TString>;
162
+ links: alepha182.TArray<alepha182.TObject<{
163
+ name: alepha182.TString;
164
+ group: alepha182.TOptional<alepha182.TString>;
165
+ path: alepha182.TString;
166
+ method: alepha182.TOptional<alepha182.TString>;
167
+ requestBodyType: alepha182.TOptional<alepha182.TString>;
168
+ service: alepha182.TOptional<alepha182.TString>;
169
169
  }>>;
170
170
  }>;
171
171
  }>;
@@ -174,65 +174,65 @@ declare class ServerAuthProvider {
174
174
  * Refresh a token for internal providers.
175
175
  */
176
176
  readonly refresh: alepha_server0.RoutePrimitive<{
177
- query: alepha147.TObject<{
178
- provider: alepha147.TString;
177
+ query: alepha182.TObject<{
178
+ provider: alepha182.TString;
179
179
  }>;
180
- body: alepha147.TObject<{
181
- refresh_token: alepha147.TString;
182
- access_token: alepha147.TOptional<alepha147.TString>;
180
+ body: alepha182.TObject<{
181
+ refresh_token: alepha182.TString;
182
+ access_token: alepha182.TOptional<alepha182.TString>;
183
183
  }>;
184
- response: alepha147.TObject<{
185
- provider: alepha147.TString;
186
- access_token: alepha147.TString;
187
- issued_at: alepha147.TNumber;
188
- expires_in: alepha147.TOptional<alepha147.TNumber>;
189
- refresh_token: alepha147.TOptional<alepha147.TString>;
190
- refresh_token_expires_in: alepha147.TOptional<alepha147.TNumber>;
191
- refresh_expires_in: alepha147.TOptional<alepha147.TNumber>;
192
- id_token: alepha147.TOptional<alepha147.TString>;
193
- scope: alepha147.TOptional<alepha147.TString>;
184
+ response: alepha182.TObject<{
185
+ provider: alepha182.TString;
186
+ access_token: alepha182.TString;
187
+ issued_at: alepha182.TNumber;
188
+ expires_in: alepha182.TOptional<alepha182.TNumber>;
189
+ refresh_token: alepha182.TOptional<alepha182.TString>;
190
+ refresh_token_expires_in: alepha182.TOptional<alepha182.TNumber>;
191
+ refresh_expires_in: alepha182.TOptional<alepha182.TNumber>;
192
+ id_token: alepha182.TOptional<alepha182.TString>;
193
+ scope: alepha182.TOptional<alepha182.TString>;
194
194
  }>;
195
195
  }>;
196
196
  /**
197
197
  * Login for local password-based authentication.
198
198
  */
199
199
  readonly token: alepha_server0.RoutePrimitive<{
200
- query: alepha147.TObject<{
201
- provider: alepha147.TString;
200
+ query: alepha182.TObject<{
201
+ provider: alepha182.TString;
202
202
  }>;
203
- body: alepha147.TObject<{
204
- username: alepha147.TString;
205
- password: alepha147.TString;
203
+ body: alepha182.TObject<{
204
+ username: alepha182.TString;
205
+ password: alepha182.TString;
206
206
  }>;
207
- response: alepha147.TObject<{
208
- provider: alepha147.TString;
209
- access_token: alepha147.TString;
210
- issued_at: alepha147.TNumber;
211
- expires_in: alepha147.TOptional<alepha147.TNumber>;
212
- refresh_token: alepha147.TOptional<alepha147.TString>;
213
- refresh_token_expires_in: alepha147.TOptional<alepha147.TNumber>;
214
- refresh_expires_in: alepha147.TOptional<alepha147.TNumber>;
215
- id_token: alepha147.TOptional<alepha147.TString>;
216
- scope: alepha147.TOptional<alepha147.TString>;
217
- user: alepha147.TObject<{
218
- id: alepha147.TString;
219
- name: alepha147.TOptional<alepha147.TString>;
220
- email: alepha147.TOptional<alepha147.TString>;
221
- username: alepha147.TOptional<alepha147.TString>;
222
- picture: alepha147.TOptional<alepha147.TString>;
223
- sessionId: alepha147.TOptional<alepha147.TString>;
224
- organizations: alepha147.TOptional<alepha147.TArray<alepha147.TString>>;
225
- roles: alepha147.TOptional<alepha147.TArray<alepha147.TString>>;
207
+ response: alepha182.TObject<{
208
+ provider: alepha182.TString;
209
+ access_token: alepha182.TString;
210
+ issued_at: alepha182.TNumber;
211
+ expires_in: alepha182.TOptional<alepha182.TNumber>;
212
+ refresh_token: alepha182.TOptional<alepha182.TString>;
213
+ refresh_token_expires_in: alepha182.TOptional<alepha182.TNumber>;
214
+ refresh_expires_in: alepha182.TOptional<alepha182.TNumber>;
215
+ id_token: alepha182.TOptional<alepha182.TString>;
216
+ scope: alepha182.TOptional<alepha182.TString>;
217
+ user: alepha182.TObject<{
218
+ id: alepha182.TString;
219
+ name: alepha182.TOptional<alepha182.TString>;
220
+ email: alepha182.TOptional<alepha182.TString>;
221
+ username: alepha182.TOptional<alepha182.TString>;
222
+ picture: alepha182.TOptional<alepha182.TString>;
223
+ sessionId: alepha182.TOptional<alepha182.TString>;
224
+ organizations: alepha182.TOptional<alepha182.TArray<alepha182.TString>>;
225
+ roles: alepha182.TOptional<alepha182.TArray<alepha182.TString>>;
226
226
  }>;
227
- api: alepha147.TObject<{
228
- prefix: alepha147.TOptional<alepha147.TString>;
229
- links: alepha147.TArray<alepha147.TObject<{
230
- name: alepha147.TString;
231
- group: alepha147.TOptional<alepha147.TString>;
232
- path: alepha147.TString;
233
- method: alepha147.TOptional<alepha147.TString>;
234
- requestBodyType: alepha147.TOptional<alepha147.TString>;
235
- service: alepha147.TOptional<alepha147.TString>;
227
+ api: alepha182.TObject<{
228
+ prefix: alepha182.TOptional<alepha182.TString>;
229
+ links: alepha182.TArray<alepha182.TObject<{
230
+ name: alepha182.TString;
231
+ group: alepha182.TOptional<alepha182.TString>;
232
+ path: alepha182.TString;
233
+ method: alepha182.TOptional<alepha182.TString>;
234
+ requestBodyType: alepha182.TOptional<alepha182.TString>;
235
+ service: alepha182.TOptional<alepha182.TString>;
236
236
  }>>;
237
237
  }>;
238
238
  }>;
@@ -241,9 +241,9 @@ declare class ServerAuthProvider {
241
241
  * Oauth2/OIDC login route.
242
242
  */
243
243
  readonly login: alepha_server0.RoutePrimitive<{
244
- query: alepha147.TObject<{
245
- provider: alepha147.TString;
246
- redirect_uri: alepha147.TOptional<alepha147.TString>;
244
+ query: alepha182.TObject<{
245
+ provider: alepha182.TString;
246
+ redirect_uri: alepha182.TOptional<alepha182.TString>;
247
247
  }>;
248
248
  }>;
249
249
  /**
@@ -255,8 +255,8 @@ declare class ServerAuthProvider {
255
255
  * Logout route for OAuth2/OIDC providers.
256
256
  */
257
257
  readonly logout: alepha_server0.RoutePrimitive<{
258
- query: alepha147.TObject<{
259
- post_logout_redirect_uri: alepha147.TOptional<alepha147.TString>;
258
+ query: alepha182.TObject<{
259
+ post_logout_redirect_uri: alepha182.TOptional<alepha182.TString>;
260
260
  }>;
261
261
  }>;
262
262
  protected provider(opts: string | {
@@ -577,7 +577,7 @@ declare module "alepha" {
577
577
  * @see {@link ServerAuthProvider}
578
578
  * @module alepha.server.auth
579
579
  */
580
- declare const AlephaServerAuth: alepha147.Service<alepha147.Module>;
580
+ declare const AlephaServerAuth: alepha182.Service<alepha182.Module>;
581
581
  //#endregion
582
582
  export { $auth, $authCredentials, $authGithub, $authGoogle, AccessToken, AlephaServerAuth, AuthExternal, AuthInternal, AuthPrimitive, AuthPrimitiveOptions, AuthenticationProvider, Credentials, CredentialsFn, CredentialsOptions, LinkAccountFn, LinkAccountOptions, OAuth2Options, OAuth2Profile, OidcOptions, ServerAuthProvider, TokenResponse, Tokens, UserinfoResponse, WithLinkFn, WithLoginFn, alephaServerAuthRoutes, authenticationProviderSchema, tokenResponseSchema, tokensSchema, userinfoResponseSchema };
583
583
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as alepha5 from "alepha";
1
+ import * as alepha1 from "alepha";
2
2
  import { Alepha, KIND, Primitive } from "alepha";
3
3
  import { JwtProvider, Permission, SecurityProvider, UserAccount, UserAccountToken } from "alepha/security";
4
4
  import { FetchOptions, ServerRequest, ServerRouterProvider } from "alepha/server";
@@ -28,15 +28,15 @@ declare class ServerBasicAuthProvider {
28
28
  * Register a basic auth configuration (called by primitives)
29
29
  */
30
30
  registerAuth(config: BasicAuthPrimitiveConfig): void;
31
- readonly onStart: alepha5.HookPrimitive<"start">;
31
+ readonly onStart: alepha1.HookPrimitive<"start">;
32
32
  /**
33
33
  * Hook into server:onRequest to check basic auth
34
34
  */
35
- readonly onRequest: alepha5.HookPrimitive<"server:onRequest">;
35
+ readonly onRequest: alepha1.HookPrimitive<"server:onRequest">;
36
36
  /**
37
37
  * Hook into action:onRequest to check basic auth for actions
38
38
  */
39
- readonly onActionRequest: alepha5.HookPrimitive<"action:onRequest">;
39
+ readonly onActionRequest: alepha1.HookPrimitive<"action:onRequest">;
40
40
  /**
41
41
  * Check basic authentication
42
42
  */
@@ -66,9 +66,9 @@ declare class ServerSecurityProvider {
66
66
  protected readonly securityProvider: SecurityProvider;
67
67
  protected readonly jwtProvider: JwtProvider;
68
68
  protected readonly alepha: Alepha;
69
- protected readonly onConfigure: alepha5.HookPrimitive<"configure">;
70
- protected readonly onActionRequest: alepha5.HookPrimitive<"action:onRequest">;
71
- protected readonly onRequest: alepha5.HookPrimitive<"server:onRequest">;
69
+ protected readonly onConfigure: alepha1.HookPrimitive<"configure">;
70
+ protected readonly onActionRequest: alepha1.HookPrimitive<"action:onRequest">;
71
+ protected readonly onRequest: alepha1.HookPrimitive<"server:onRequest">;
72
72
  protected check(user: UserAccountToken, secure: ServerRouteSecure): void;
73
73
  /**
74
74
  * Get the user account token for a local action call.
@@ -85,7 +85,7 @@ declare class ServerSecurityProvider {
85
85
  user?: UserAccountToken | "system" | "context";
86
86
  }, permission?: Permission): UserAccountToken;
87
87
  protected createTestUser(): UserAccountToken;
88
- protected readonly onClientRequest: alepha5.HookPrimitive<"client:onRequest">;
88
+ protected readonly onClientRequest: alepha1.HookPrimitive<"client:onRequest">;
89
89
  }
90
90
  type ServerRouteSecure = {
91
91
  realm?: string;
@@ -167,7 +167,7 @@ declare module "alepha/server" {
167
167
  * @see {@link ServerSecurityProvider}
168
168
  * @module alepha.server.security
169
169
  */
170
- declare const AlephaServerSecurity: alepha5.Service<alepha5.Module>;
170
+ declare const AlephaServerSecurity: alepha1.Service<alepha1.Module>;
171
171
  //#endregion
172
172
  export { $basicAuth, AbstractBasicAuthPrimitive, AlephaServerSecurity, BasicAuthOptions, BasicAuthPrimitive, BasicAuthPrimitiveConfig, ServerBasicAuthProvider, ServerRouteSecure, ServerSecurityProvider, isBasicAuth };
173
173
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "alepha",
3
3
  "description": "Easy-to-use modern TypeScript framework for building many kind of applications.",
4
4
  "author": "Nicolas Foures",
5
- "version": "0.13.3",
5
+ "version": "0.13.4",
6
6
  "type": "module",
7
7
  "engines": {
8
8
  "node": ">=22.0.0"