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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alepha",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|
|
@@ -15,54 +15,56 @@
|
|
|
15
15
|
"main": "./core.js",
|
|
16
16
|
"types": "./core.d.ts",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@alepha/api-files": "0.11.
|
|
19
|
-
"@alepha/api-jobs": "0.11.
|
|
20
|
-
"@alepha/api-notifications": "0.11.
|
|
21
|
-
"@alepha/api-users": "0.11.
|
|
22
|
-
"@alepha/api-verifications": "0.11.
|
|
23
|
-
"@alepha/batch": "0.11.
|
|
24
|
-
"@alepha/bucket": "0.11.
|
|
25
|
-
"@alepha/cache": "0.11.
|
|
26
|
-
"@alepha/cache-redis": "0.11.
|
|
27
|
-
"@alepha/command": "0.11.
|
|
28
|
-
"@alepha/core": "0.11.
|
|
29
|
-
"@alepha/datetime": "0.11.
|
|
30
|
-
"@alepha/devtools": "0.11.
|
|
31
|
-
"@alepha/email": "0.11.
|
|
32
|
-
"@alepha/
|
|
33
|
-
"@alepha/
|
|
34
|
-
"@alepha/lock
|
|
35
|
-
"@alepha/
|
|
36
|
-
"@alepha/
|
|
37
|
-
"@alepha/
|
|
38
|
-
"@alepha/queue
|
|
39
|
-
"@alepha/
|
|
40
|
-
"@alepha/react
|
|
41
|
-
"@alepha/react-
|
|
42
|
-
"@alepha/react-
|
|
43
|
-
"@alepha/react-
|
|
44
|
-
"@alepha/
|
|
45
|
-
"@alepha/
|
|
46
|
-
"@alepha/
|
|
47
|
-
"@alepha/
|
|
48
|
-
"@alepha/
|
|
49
|
-
"@alepha/
|
|
50
|
-
"@alepha/server
|
|
51
|
-
"@alepha/server-
|
|
52
|
-
"@alepha/server-
|
|
53
|
-
"@alepha/server-
|
|
54
|
-
"@alepha/server-
|
|
55
|
-
"@alepha/server-
|
|
56
|
-
"@alepha/server-
|
|
57
|
-
"@alepha/server-
|
|
58
|
-
"@alepha/server-
|
|
59
|
-
"@alepha/server-
|
|
60
|
-
"@alepha/server-
|
|
61
|
-
"@alepha/server-
|
|
62
|
-
"@alepha/server-
|
|
63
|
-
"@alepha/
|
|
64
|
-
"@alepha/topic
|
|
65
|
-
"@alepha/
|
|
18
|
+
"@alepha/api-files": "0.11.5",
|
|
19
|
+
"@alepha/api-jobs": "0.11.5",
|
|
20
|
+
"@alepha/api-notifications": "0.11.5",
|
|
21
|
+
"@alepha/api-users": "0.11.5",
|
|
22
|
+
"@alepha/api-verifications": "0.11.5",
|
|
23
|
+
"@alepha/batch": "0.11.5",
|
|
24
|
+
"@alepha/bucket": "0.11.5",
|
|
25
|
+
"@alepha/cache": "0.11.5",
|
|
26
|
+
"@alepha/cache-redis": "0.11.5",
|
|
27
|
+
"@alepha/command": "0.11.5",
|
|
28
|
+
"@alepha/core": "0.11.5",
|
|
29
|
+
"@alepha/datetime": "0.11.5",
|
|
30
|
+
"@alepha/devtools": "0.11.5",
|
|
31
|
+
"@alepha/email": "0.11.5",
|
|
32
|
+
"@alepha/fake": "0.11.5",
|
|
33
|
+
"@alepha/file": "0.11.5",
|
|
34
|
+
"@alepha/lock": "0.11.5",
|
|
35
|
+
"@alepha/lock-redis": "0.11.5",
|
|
36
|
+
"@alepha/logger": "0.11.5",
|
|
37
|
+
"@alepha/postgres": "0.11.5",
|
|
38
|
+
"@alepha/queue": "0.11.5",
|
|
39
|
+
"@alepha/queue-redis": "0.11.5",
|
|
40
|
+
"@alepha/react": "0.11.5",
|
|
41
|
+
"@alepha/react-auth": "0.11.5",
|
|
42
|
+
"@alepha/react-form": "0.11.5",
|
|
43
|
+
"@alepha/react-head": "0.11.5",
|
|
44
|
+
"@alepha/react-i18n": "0.11.5",
|
|
45
|
+
"@alepha/redis": "0.11.5",
|
|
46
|
+
"@alepha/retry": "0.11.5",
|
|
47
|
+
"@alepha/router": "0.11.5",
|
|
48
|
+
"@alepha/scheduler": "0.11.5",
|
|
49
|
+
"@alepha/security": "0.11.5",
|
|
50
|
+
"@alepha/server": "0.11.5",
|
|
51
|
+
"@alepha/server-cache": "0.11.5",
|
|
52
|
+
"@alepha/server-compress": "0.11.5",
|
|
53
|
+
"@alepha/server-cookies": "0.11.5",
|
|
54
|
+
"@alepha/server-cors": "0.11.5",
|
|
55
|
+
"@alepha/server-health": "0.11.5",
|
|
56
|
+
"@alepha/server-helmet": "0.11.5",
|
|
57
|
+
"@alepha/server-links": "0.11.5",
|
|
58
|
+
"@alepha/server-metrics": "0.11.5",
|
|
59
|
+
"@alepha/server-multipart": "0.11.5",
|
|
60
|
+
"@alepha/server-proxy": "0.11.5",
|
|
61
|
+
"@alepha/server-security": "0.11.5",
|
|
62
|
+
"@alepha/server-static": "0.11.5",
|
|
63
|
+
"@alepha/server-swagger": "0.11.5",
|
|
64
|
+
"@alepha/topic": "0.11.5",
|
|
65
|
+
"@alepha/topic-redis": "0.11.5",
|
|
66
|
+
"@alepha/ui": "0.11.5",
|
|
67
|
+
"@alepha/vite": "0.11.5",
|
|
66
68
|
"react": "^19.2.0",
|
|
67
69
|
"react-dom": "^19.2.0"
|
|
68
70
|
},
|
|
@@ -150,6 +152,11 @@
|
|
|
150
152
|
"require": "./email.cjs",
|
|
151
153
|
"types": "./email.d.ts"
|
|
152
154
|
},
|
|
155
|
+
"./fake": {
|
|
156
|
+
"import": "./fake.js",
|
|
157
|
+
"require": "./fake.cjs",
|
|
158
|
+
"types": "./fake.d.ts"
|
|
159
|
+
},
|
|
153
160
|
"./file": {
|
|
154
161
|
"import": "./file.js",
|
|
155
162
|
"require": "./file.cjs",
|
|
@@ -315,6 +322,11 @@
|
|
|
315
322
|
"require": "./topic/redis.cjs",
|
|
316
323
|
"types": "./topic/redis.d.ts"
|
|
317
324
|
},
|
|
325
|
+
"./ui": {
|
|
326
|
+
"import": "./ui.js",
|
|
327
|
+
"require": "./ui.cjs",
|
|
328
|
+
"types": "./ui.d.ts"
|
|
329
|
+
},
|
|
318
330
|
"./vite": {
|
|
319
331
|
"import": "./vite.js",
|
|
320
332
|
"require": "./vite.cjs",
|
|
@@ -337,6 +349,7 @@
|
|
|
337
349
|
"datetime",
|
|
338
350
|
"devtools",
|
|
339
351
|
"email",
|
|
352
|
+
"fake",
|
|
340
353
|
"file",
|
|
341
354
|
"lock",
|
|
342
355
|
"lock-redis",
|
|
@@ -370,6 +383,7 @@
|
|
|
370
383
|
"server-swagger",
|
|
371
384
|
"topic",
|
|
372
385
|
"topic-redis",
|
|
386
|
+
"ui",
|
|
373
387
|
"vite"
|
|
374
388
|
]
|
|
375
389
|
}
|
package/postgres.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Alepha, AlephaError, Descriptor, DescriptorArgs, KIND, Static, StaticEncode,
|
|
1
|
+
import * as _alepha_core10 from "alepha";
|
|
2
|
+
import { Alepha, AlephaError, Descriptor, DescriptorArgs, KIND, Page, Static, StaticEncode, TBigInt, TInteger, TNull, TNumber, TNumberOptions, TObject, TObjectOptions, TOptional, TPage, TSchema, TString, TStringOptions, TUnion, TUnsafe, pageSchema } from "alepha";
|
|
3
3
|
import { DateTime, DateTimeProvider } from "alepha/datetime";
|
|
4
4
|
import * as drizzle_orm0 from "drizzle-orm";
|
|
5
5
|
import { BuildExtraConfigColumns, SQL, SQLWrapper, sql } from "drizzle-orm";
|
|
@@ -10,7 +10,7 @@ import * as _alepha_lock0 from "alepha/lock";
|
|
|
10
10
|
import { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
11
11
|
import postgres from "postgres";
|
|
12
12
|
import * as _alepha_retry0 from "alepha/retry";
|
|
13
|
-
import * as
|
|
13
|
+
import * as typebox11 from "typebox";
|
|
14
14
|
import { PgTransactionConfig as PgTransactionConfig$1 } from "drizzle-orm/pg-core/session";
|
|
15
15
|
import * as DrizzleKit from "drizzle-kit/api";
|
|
16
16
|
import { MigrationConfig } from "drizzle-orm/migrator";
|
|
@@ -883,90 +883,13 @@ declare abstract class DatabaseProvider {
|
|
|
883
883
|
}
|
|
884
884
|
//#endregion
|
|
885
885
|
//#region src/schemas/pageQuerySchema.d.ts
|
|
886
|
-
declare const pageQuerySchema:
|
|
887
|
-
page:
|
|
888
|
-
size:
|
|
889
|
-
sort:
|
|
886
|
+
declare const pageQuerySchema: typebox11.TObject<{
|
|
887
|
+
page: typebox11.TOptional<typebox11.TInteger>;
|
|
888
|
+
size: typebox11.TOptional<typebox11.TInteger>;
|
|
889
|
+
sort: typebox11.TOptional<typebox11.TString>;
|
|
890
890
|
}>;
|
|
891
891
|
type PageQuery = Static<typeof pageQuerySchema>;
|
|
892
892
|
//#endregion
|
|
893
|
-
//#region src/schemas/pageSchema.d.ts
|
|
894
|
-
/**
|
|
895
|
-
* Create a pagination schema for the given object schema.
|
|
896
|
-
*
|
|
897
|
-
* > use `pg.page` directly.
|
|
898
|
-
*
|
|
899
|
-
* @example
|
|
900
|
-
* ```ts
|
|
901
|
-
* const userSchema = t.object({ id: t.int(), name: t.text() });
|
|
902
|
-
* const userPageSchema = pageSchema(userSchema);
|
|
903
|
-
* ```
|
|
904
|
-
*
|
|
905
|
-
* @see {@link $repository#paginate}
|
|
906
|
-
*/
|
|
907
|
-
declare const pageSchema: <T extends TObject | TRecord>(objectSchema: T, options?: TObjectOptions) => TPage<T>;
|
|
908
|
-
type TPage<T extends TObject | TRecord> = TObject<{
|
|
909
|
-
content: TArray<T>;
|
|
910
|
-
can: TObject<{
|
|
911
|
-
next: TBoolean;
|
|
912
|
-
previous: TBoolean;
|
|
913
|
-
}>;
|
|
914
|
-
page: TObject<{
|
|
915
|
-
number: TInteger;
|
|
916
|
-
size: TInteger;
|
|
917
|
-
totalElements: TOptionalAdd<TInteger>;
|
|
918
|
-
}>;
|
|
919
|
-
}>;
|
|
920
|
-
/**
|
|
921
|
-
* Opinionated type definition for a paginated response.
|
|
922
|
-
*
|
|
923
|
-
* @example
|
|
924
|
-
* ```ts
|
|
925
|
-
* const page = {
|
|
926
|
-
* content: [ ... ]
|
|
927
|
-
* can: {
|
|
928
|
-
* next: true,
|
|
929
|
-
* previous: false
|
|
930
|
-
* },
|
|
931
|
-
* page: {
|
|
932
|
-
* number: 0,
|
|
933
|
-
* size: 10,
|
|
934
|
-
* totalElements: 1200
|
|
935
|
-
* }
|
|
936
|
-
* }
|
|
937
|
-
* ```
|
|
938
|
-
*/
|
|
939
|
-
type Page<T> = {
|
|
940
|
-
/**
|
|
941
|
-
* Array of items on the current page.
|
|
942
|
-
*/
|
|
943
|
-
content: T[];
|
|
944
|
-
can: {
|
|
945
|
-
/**
|
|
946
|
-
* Indicates if there is a next page.
|
|
947
|
-
*/
|
|
948
|
-
next: boolean;
|
|
949
|
-
/**
|
|
950
|
-
* Indicates if there is a previous page.
|
|
951
|
-
*/
|
|
952
|
-
previous: boolean;
|
|
953
|
-
};
|
|
954
|
-
page: {
|
|
955
|
-
/**
|
|
956
|
-
* Page number, starting from 0.
|
|
957
|
-
*/
|
|
958
|
-
number: number;
|
|
959
|
-
/**
|
|
960
|
-
* Number of items per page.
|
|
961
|
-
*/
|
|
962
|
-
size: number;
|
|
963
|
-
/**
|
|
964
|
-
* Requires `count: true` in the paginate options.
|
|
965
|
-
*/
|
|
966
|
-
totalElements?: number;
|
|
967
|
-
};
|
|
968
|
-
};
|
|
969
|
-
//#endregion
|
|
970
893
|
//#region src/services/PgJsonQueryManager.d.ts
|
|
971
894
|
/**
|
|
972
895
|
* Manages JSONB query generation for nested object and array queries in PostgreSQL.
|
|
@@ -1081,11 +1004,18 @@ declare class PgQueryManager {
|
|
|
1081
1004
|
/**
|
|
1082
1005
|
* Create a pagination object.
|
|
1083
1006
|
*
|
|
1007
|
+
* @deprecated Use `createPagination` from @alepha/core instead.
|
|
1008
|
+
* This method now delegates to the framework-level helper.
|
|
1009
|
+
*
|
|
1084
1010
|
* @param entities The entities to paginate.
|
|
1085
1011
|
* @param limit The limit of the pagination.
|
|
1086
1012
|
* @param offset The offset of the pagination.
|
|
1013
|
+
* @param sort Optional sort metadata to include in response.
|
|
1087
1014
|
*/
|
|
1088
|
-
createPagination<T>(entities: T[], limit?: number, offset?: number
|
|
1015
|
+
createPagination<T>(entities: T[], limit?: number, offset?: number, sort?: Array<{
|
|
1016
|
+
column: string;
|
|
1017
|
+
direction: "asc" | "desc";
|
|
1018
|
+
}>): _alepha_core10.Page<T>;
|
|
1089
1019
|
}
|
|
1090
1020
|
interface PgJoin {
|
|
1091
1021
|
table: string;
|
|
@@ -1661,11 +1591,11 @@ declare class DrizzleKitProvider {
|
|
|
1661
1591
|
*/
|
|
1662
1592
|
protected importDrizzleKit(): typeof DrizzleKit;
|
|
1663
1593
|
}
|
|
1664
|
-
declare const devMigrationsSchema:
|
|
1665
|
-
id:
|
|
1666
|
-
name:
|
|
1667
|
-
snapshot:
|
|
1668
|
-
created_at:
|
|
1594
|
+
declare const devMigrationsSchema: typebox11.TObject<{
|
|
1595
|
+
id: typebox11.TNumber;
|
|
1596
|
+
name: typebox11.TString;
|
|
1597
|
+
snapshot: typebox11.TString;
|
|
1598
|
+
created_at: typebox11.TString;
|
|
1669
1599
|
}>;
|
|
1670
1600
|
type DevMigrations = Static<typeof devMigrationsSchema>;
|
|
1671
1601
|
//#endregion
|
|
@@ -1708,7 +1638,7 @@ declare class PostgresModelBuilder extends ModelBuilder {
|
|
|
1708
1638
|
declare module "alepha" {
|
|
1709
1639
|
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
1710
1640
|
}
|
|
1711
|
-
declare const envSchema:
|
|
1641
|
+
declare const envSchema: _alepha_core10.TObject<{
|
|
1712
1642
|
/**
|
|
1713
1643
|
* Main configuration for database connection.
|
|
1714
1644
|
* Accept a string in the format of a Postgres connection URL.
|
|
@@ -1716,13 +1646,13 @@ declare const envSchema: _alepha_core1.TObject<{
|
|
|
1716
1646
|
* or
|
|
1717
1647
|
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
1718
1648
|
*/
|
|
1719
|
-
DATABASE_URL:
|
|
1649
|
+
DATABASE_URL: _alepha_core10.TOptional<_alepha_core10.TString>;
|
|
1720
1650
|
/**
|
|
1721
1651
|
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
1722
1652
|
*
|
|
1723
1653
|
* It will monkey patch drizzle tables.
|
|
1724
1654
|
*/
|
|
1725
|
-
POSTGRES_SCHEMA:
|
|
1655
|
+
POSTGRES_SCHEMA: _alepha_core10.TOptional<_alepha_core10.TString>;
|
|
1726
1656
|
/**
|
|
1727
1657
|
* Synchronize the database schema with the models.
|
|
1728
1658
|
* It uses a custom implementation, it's not related to `drizzle-kit push` command.
|
|
@@ -1730,7 +1660,7 @@ declare const envSchema: _alepha_core1.TObject<{
|
|
|
1730
1660
|
*
|
|
1731
1661
|
* This is recommended for development and testing purposes only.
|
|
1732
1662
|
*/
|
|
1733
|
-
POSTGRES_SYNCHRONIZE:
|
|
1663
|
+
POSTGRES_SYNCHRONIZE: _alepha_core10.TOptional<_alepha_core10.TBoolean>;
|
|
1734
1664
|
}>;
|
|
1735
1665
|
interface NodePostgresProviderOptions {
|
|
1736
1666
|
migrations: MigrationConfig;
|
|
@@ -1761,8 +1691,8 @@ declare class NodePostgresProvider extends DatabaseProvider {
|
|
|
1761
1691
|
*/
|
|
1762
1692
|
get schema(): string;
|
|
1763
1693
|
get db(): PostgresJsDatabase;
|
|
1764
|
-
protected readonly onStart:
|
|
1765
|
-
protected readonly onStop:
|
|
1694
|
+
protected readonly onStart: _alepha_core10.HookDescriptor<"start">;
|
|
1695
|
+
protected readonly onStop: _alepha_core10.HookDescriptor<"stop">;
|
|
1766
1696
|
connect(): Promise<void>;
|
|
1767
1697
|
close(): Promise<void>;
|
|
1768
1698
|
protected migrate: _alepha_lock0.LockDescriptor<() => Promise<void>>;
|
|
@@ -1828,17 +1758,17 @@ declare class PostgresTypeProvider {
|
|
|
1828
1758
|
/**
|
|
1829
1759
|
* Creates a column Created At. So just a datetime column with a default value of the current timestamp.
|
|
1830
1760
|
*/
|
|
1831
|
-
readonly createdAt: (options?: TStringOptions) => PgAttr<PgAttr<
|
|
1761
|
+
readonly createdAt: (options?: TStringOptions) => PgAttr<PgAttr<typebox11.TCodec<TString, dayjs0.Dayjs>, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1832
1762
|
/**
|
|
1833
1763
|
* Creates a column Updated At. Like createdAt, but it is updated on every update of the row.
|
|
1834
1764
|
*/
|
|
1835
|
-
readonly updatedAt: (options?: TStringOptions) => PgAttr<PgAttr<
|
|
1765
|
+
readonly updatedAt: (options?: TStringOptions) => PgAttr<PgAttr<typebox11.TCodec<TString, dayjs0.Dayjs>, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
1836
1766
|
/**
|
|
1837
1767
|
* Creates a column Deleted At for soft delete functionality.
|
|
1838
1768
|
* This is used to mark rows as deleted without actually removing them from the database.
|
|
1839
1769
|
* The column is nullable - NULL means not deleted, timestamp means deleted.
|
|
1840
1770
|
*/
|
|
1841
|
-
readonly deletedAt: (options?: TStringOptions) => PgAttr<
|
|
1771
|
+
readonly deletedAt: (options?: TStringOptions) => PgAttr<typebox11.TOptional<typebox11.TCodec<TString, dayjs0.Dayjs>>, typeof PG_DELETED_AT>;
|
|
1842
1772
|
/**
|
|
1843
1773
|
* Creates a Postgres ENUM type.
|
|
1844
1774
|
*
|
|
@@ -1870,7 +1800,7 @@ declare const pg: PostgresTypeProvider;
|
|
|
1870
1800
|
/**
|
|
1871
1801
|
* @deprecated Use `pg.primaryKey()` instead.
|
|
1872
1802
|
*/
|
|
1873
|
-
declare const legacyIdSchema: PgAttr<PgAttr<PgAttr<
|
|
1803
|
+
declare const legacyIdSchema: PgAttr<PgAttr<PgAttr<typebox11.TInteger, typeof PG_PRIMARY_KEY>, typeof PG_SERIAL>, typeof PG_DEFAULT>;
|
|
1874
1804
|
//#endregion
|
|
1875
1805
|
//#region src/types/schema.d.ts
|
|
1876
1806
|
/**
|
|
@@ -1880,10 +1810,10 @@ declare const schema: <TDocument extends TSchema>(name: string, document: TDocum
|
|
|
1880
1810
|
name: string;
|
|
1881
1811
|
dataType: "custom";
|
|
1882
1812
|
columnType: "PgCustomColumn";
|
|
1883
|
-
data:
|
|
1813
|
+
data: typebox11.StaticType<[], "Decode", {}, {}, TDocument>;
|
|
1884
1814
|
driverParam: string;
|
|
1885
1815
|
enumValues: undefined;
|
|
1886
|
-
}>,
|
|
1816
|
+
}>, typebox11.StaticType<[], "Decode", {}, {}, TDocument>>;
|
|
1887
1817
|
//#endregion
|
|
1888
1818
|
//#region src/index.d.ts
|
|
1889
1819
|
/**
|
|
@@ -1925,7 +1855,7 @@ declare const schema: <TDocument extends TSchema>(name: string, document: TDocum
|
|
|
1925
1855
|
* @see {@link $transaction}
|
|
1926
1856
|
* @module alepha.postgres
|
|
1927
1857
|
*/
|
|
1928
|
-
declare const AlephaPostgres:
|
|
1858
|
+
declare const AlephaPostgres: _alepha_core10.Service<_alepha_core10.Module<{}>>;
|
|
1929
1859
|
//#endregion
|
|
1930
|
-
export { $entity, $repository, $sequence, $transaction, AlephaPostgres, DatabaseProvider, DrizzleKitProvider, EntityColumn, EntityColumns, EntityDescriptor, EntityDescriptorOptions, FilterOperators, FromSchema, NodePostgresProvider, NodePostgresProviderOptions, 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, Page, PageQuery, PgAttr, PgAttrField, PgConflictError, PgDefault, PgEntityNotFoundError, PgEnumOptions, PgError, PgIdentityOptions, PgMigrationError, PgPrimaryKey, PgQuery, PgQueryRelations, PgQueryWhere, PgQueryWhereOrSQL, PgRef, PgRefOptions, PgRelation, PgRelationMap, PgStatic, PgSymbolKeys, PgSymbols, PgVersionMismatchError, PostgresTypeProvider, RepositoryDescriptor, RepositoryDescriptorOptions, SQLLike, SchemaToTableConfig, SequenceDescriptor, SequenceDescriptorOptions, StatementOptions, TObjectInsert, TObjectUpdate, TPage, TransactionContext, TransactionDescriptorOptions, drizzle_orm0 as drizzle, getAttrFields, insertSchema, legacyIdSchema, pageQuerySchema, pageSchema, pg, pgAttr, schema, sql, updateSchema };
|
|
1860
|
+
export { $entity, $repository, $sequence, $transaction, AlephaPostgres, DatabaseProvider, DrizzleKitProvider, EntityColumn, EntityColumns, EntityDescriptor, EntityDescriptorOptions, FilterOperators, FromSchema, NodePostgresProvider, NodePostgresProviderOptions, 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, PageQuery, PgAttr, PgAttrField, PgConflictError, PgDefault, PgEntityNotFoundError, PgEnumOptions, PgError, PgIdentityOptions, PgMigrationError, PgPrimaryKey, PgQuery, PgQueryRelations, PgQueryWhere, PgQueryWhereOrSQL, PgRef, PgRefOptions, PgRelation, PgRelationMap, PgStatic, PgSymbolKeys, PgSymbols, PgVersionMismatchError, PostgresTypeProvider, RepositoryDescriptor, RepositoryDescriptorOptions, SQLLike, SchemaToTableConfig, SequenceDescriptor, SequenceDescriptorOptions, StatementOptions, TObjectInsert, TObjectUpdate, type TPage, TransactionContext, TransactionDescriptorOptions, drizzle_orm0 as drizzle, getAttrFields, insertSchema, legacyIdSchema, pageQuerySchema, pageSchema, pg, pgAttr, schema, sql, updateSchema };
|
|
1931
1861
|
//# sourceMappingURL=index.d.ts.map
|
package/react/i18n.d.ts
CHANGED
|
@@ -69,12 +69,37 @@ declare class I18nProvider<S extends object, K$1 extends keyof ServiceDictionary
|
|
|
69
69
|
protected readonly mutate: _alepha_core1.HookDescriptor<"state:mutate">;
|
|
70
70
|
get lang(): string;
|
|
71
71
|
translate: (key: string, args?: string[]) => string;
|
|
72
|
+
readonly l: (value: I18nLocalizeType, options?: I18nLocalizeOptions) => string;
|
|
72
73
|
readonly tr: (key: keyof ServiceDictionary<S>[K$1], options?: {
|
|
73
74
|
args?: string[];
|
|
74
75
|
default?: string;
|
|
75
76
|
}) => string;
|
|
76
77
|
protected render(item: string, args: string[]): string;
|
|
77
78
|
}
|
|
79
|
+
type I18nLocalizeType = string | number | Date | DateTime | TypeBoxError;
|
|
80
|
+
interface I18nLocalizeOptions {
|
|
81
|
+
/**
|
|
82
|
+
* Options for number formatting (when value is a number)
|
|
83
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat
|
|
84
|
+
*/
|
|
85
|
+
number?: Intl.NumberFormatOptions;
|
|
86
|
+
/**
|
|
87
|
+
* Options for date formatting (when value is a Date or DateTime)
|
|
88
|
+
* Can be:
|
|
89
|
+
* - A dayjs format string (e.g., "LLL", "YYYY-MM-DD", "dddd, MMMM D YYYY")
|
|
90
|
+
* - "fromNow" for relative time (e.g., "2 hours ago")
|
|
91
|
+
* - Intl.DateTimeFormatOptions for native formatting
|
|
92
|
+
* @see https://day.js.org/docs/en/display/format
|
|
93
|
+
* @see https://day.js.org/docs/en/display/from-now
|
|
94
|
+
*/
|
|
95
|
+
date?: string | "fromNow" | Intl.DateTimeFormatOptions;
|
|
96
|
+
/**
|
|
97
|
+
* Timezone to display dates in (when value is a Date or DateTime)
|
|
98
|
+
* Uses IANA timezone names (e.g., "America/New_York", "Europe/Paris", "Asia/Tokyo")
|
|
99
|
+
* @see https://day.js.org/docs/en/timezone/timezone
|
|
100
|
+
*/
|
|
101
|
+
timezone?: string;
|
|
102
|
+
}
|
|
78
103
|
//#endregion
|
|
79
104
|
//#region src/descriptors/$dictionary.d.ts
|
|
80
105
|
/**
|
|
@@ -139,5 +164,5 @@ declare module "alepha" {
|
|
|
139
164
|
*/
|
|
140
165
|
declare const AlephaReactI18n: _alepha_core1.Service<_alepha_core1.Module<{}>>;
|
|
141
166
|
//#endregion
|
|
142
|
-
export { $dictionary, AlephaReactI18n, DictionaryDescriptor, DictionaryDescriptorOptions, I18nProvider, Localize, type LocalizeProps, ServiceDictionary, useI18n };
|
|
167
|
+
export { $dictionary, AlephaReactI18n, DictionaryDescriptor, DictionaryDescriptorOptions, I18nLocalizeOptions, I18nLocalizeType, I18nProvider, Localize, type LocalizeProps, ServiceDictionary, useI18n };
|
|
143
168
|
//# sourceMappingURL=index.d.ts.map
|