@vobase/core 0.6.1 → 0.7.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/app.d.ts +5 -88
- package/dist/app.d.ts.map +1 -1
- package/dist/contracts/auth.d.ts +33 -0
- package/dist/contracts/auth.d.ts.map +1 -0
- package/dist/contracts/module.d.ts +17 -0
- package/dist/contracts/module.d.ts.map +1 -0
- package/dist/contracts/notify.d.ts +46 -0
- package/dist/contracts/notify.d.ts.map +1 -0
- package/dist/contracts/storage.d.ts +54 -0
- package/dist/contracts/storage.d.ts.map +1 -0
- package/dist/db/index.d.ts +0 -3
- package/dist/db/index.d.ts.map +1 -1
- package/dist/index.d.ts +17 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1791 -1782
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.d.ts.map +1 -1
- package/dist/module.d.ts +9 -0
- package/dist/module.d.ts.map +1 -1
- package/dist/modules/audit/index.d.ts +5 -0
- package/dist/modules/audit/index.d.ts.map +1 -0
- package/dist/{middleware/audit.d.ts → modules/audit/middleware.d.ts} +2 -2
- package/dist/modules/audit/middleware.d.ts.map +1 -0
- package/dist/{db/system-schema.d.ts → modules/audit/schema.d.ts} +1 -76
- package/dist/modules/audit/schema.d.ts.map +1 -0
- package/dist/{audit.d.ts → modules/audit/track-changes.d.ts} +2 -2
- package/dist/modules/audit/track-changes.d.ts.map +1 -0
- package/dist/{credentials.d.ts → modules/credentials/encrypt.d.ts} +2 -8
- package/dist/modules/credentials/encrypt.d.ts.map +1 -0
- package/dist/modules/credentials/index.d.ts +4 -0
- package/dist/modules/credentials/index.d.ts.map +1 -0
- package/dist/{db/credentials-schema.d.ts → modules/credentials/schema.d.ts} +1 -5
- package/dist/modules/credentials/schema.d.ts.map +1 -0
- package/dist/modules/sequences/index.d.ts +4 -0
- package/dist/modules/sequences/index.d.ts.map +1 -0
- package/dist/{sequence.d.ts → modules/sequences/next-sequence.d.ts} +2 -2
- package/dist/modules/sequences/next-sequence.d.ts.map +1 -0
- package/dist/modules/sequences/schema.d.ts +72 -0
- package/dist/modules/sequences/schema.d.ts.map +1 -0
- package/dist/schemas.d.ts +17 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/throw-proxy.d.ts +7 -0
- package/dist/throw-proxy.d.ts.map +1 -0
- package/dist/webhooks-schema.d.ts +60 -0
- package/dist/webhooks-schema.d.ts.map +1 -0
- package/dist/webhooks.d.ts +5 -12
- package/dist/webhooks.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/audit.d.ts.map +0 -1
- package/dist/credentials.d.ts.map +0 -1
- package/dist/db/credentials-schema.d.ts.map +0 -1
- package/dist/db/ensure-core-tables.d.ts +0 -12
- package/dist/db/ensure-core-tables.d.ts.map +0 -1
- package/dist/db/migrator.d.ts +0 -3
- package/dist/db/migrator.d.ts.map +0 -1
- package/dist/db/system-schema.d.ts.map +0 -1
- package/dist/middleware/audit.d.ts.map +0 -1
- package/dist/sequence.d.ts.map +0 -1
- package/dist/system/handlers.d.ts +0 -90
- package/dist/system/handlers.d.ts.map +0 -1
- package/dist/system/index.d.ts +0 -8
- package/dist/system/index.d.ts.map +0 -1
- package/dist/system/schema.d.ts +0 -2
- package/dist/system/schema.d.ts.map +0 -1
package/dist/app.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ export interface CreateAppConfig {
|
|
|
15
15
|
};
|
|
16
16
|
trustedOrigins?: string[];
|
|
17
17
|
auth?: Omit<CreateAuthOptions, 'baseURL' | 'trustedOrigins'>;
|
|
18
|
+
/** Enable the credentials module (encrypted credential store). Default: false */
|
|
19
|
+
credentials?: {
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
};
|
|
18
22
|
}
|
|
19
23
|
export declare function createApp(config: CreateAppConfig): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, {
|
|
20
24
|
"/health": {
|
|
@@ -28,92 +32,5 @@ export declare function createApp(config: CreateAppConfig): import("hono/hono-ba
|
|
|
28
32
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
29
33
|
};
|
|
30
34
|
};
|
|
31
|
-
}
|
|
32
|
-
"/": {
|
|
33
|
-
$get: {
|
|
34
|
-
input: {};
|
|
35
|
-
output: {
|
|
36
|
-
version: string;
|
|
37
|
-
uptime: number;
|
|
38
|
-
modules: string[];
|
|
39
|
-
};
|
|
40
|
-
outputFormat: "json";
|
|
41
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
} & {
|
|
45
|
-
"/health": {
|
|
46
|
-
$get: {
|
|
47
|
-
input: {};
|
|
48
|
-
output: {
|
|
49
|
-
status: string;
|
|
50
|
-
db: string;
|
|
51
|
-
uptime: number;
|
|
52
|
-
};
|
|
53
|
-
outputFormat: "json";
|
|
54
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
} & {
|
|
58
|
-
"/audit-log": {
|
|
59
|
-
$get: {
|
|
60
|
-
input: {};
|
|
61
|
-
output: {
|
|
62
|
-
entries: {
|
|
63
|
-
id: string;
|
|
64
|
-
event: string;
|
|
65
|
-
actorId: string | null;
|
|
66
|
-
actorEmail: string | null;
|
|
67
|
-
ip: string | null;
|
|
68
|
-
details: string | null;
|
|
69
|
-
createdAt: string;
|
|
70
|
-
}[];
|
|
71
|
-
nextCursor: string | null;
|
|
72
|
-
};
|
|
73
|
-
outputFormat: "json";
|
|
74
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
} & {
|
|
78
|
-
"/sequences": {
|
|
79
|
-
$get: {
|
|
80
|
-
input: {};
|
|
81
|
-
output: {
|
|
82
|
-
sequences: {
|
|
83
|
-
id: string;
|
|
84
|
-
prefix: string;
|
|
85
|
-
currentValue: number;
|
|
86
|
-
updatedAt: string;
|
|
87
|
-
}[];
|
|
88
|
-
};
|
|
89
|
-
outputFormat: "json";
|
|
90
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
} & {
|
|
94
|
-
"/record-audits/:table/:id": {
|
|
95
|
-
$get: {
|
|
96
|
-
input: {
|
|
97
|
-
param: {
|
|
98
|
-
table: string;
|
|
99
|
-
} & {
|
|
100
|
-
id: string;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
output: {
|
|
104
|
-
entries: {
|
|
105
|
-
id: string;
|
|
106
|
-
tableName: string;
|
|
107
|
-
recordId: string;
|
|
108
|
-
oldData: string | null;
|
|
109
|
-
newData: string | null;
|
|
110
|
-
changedBy: string | null;
|
|
111
|
-
createdAt: string;
|
|
112
|
-
}[];
|
|
113
|
-
};
|
|
114
|
-
outputFormat: "json";
|
|
115
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
}, "/api/system">, "/", "/health">;
|
|
35
|
+
}, "/", "/health">;
|
|
119
36
|
//# sourceMappingURL=app.d.ts.map
|
package/dist/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAG5D,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AASzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAuCrE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACzC,GAAG,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,gBAAgB,CAAC,CAAC;IAC7D,iFAAiF;IACjF,WAAW,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;CACpC;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe;;;;;;;;;;;;mBAwEhD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core contract for authentication. The auth adapter translates an incoming
|
|
3
|
+
* request into a user identity. Core uses this in the session middleware
|
|
4
|
+
* to populate ctx.user. The built-in auth module implements this via
|
|
5
|
+
* better-auth; users can swap in their own implementation.
|
|
6
|
+
*/
|
|
7
|
+
export interface AuthAdapter {
|
|
8
|
+
/**
|
|
9
|
+
* Extract user identity from a request. Returns null if unauthenticated.
|
|
10
|
+
* Must not throw — return null for invalid/expired sessions.
|
|
11
|
+
*/
|
|
12
|
+
getSession(headers: Headers): Promise<AuthSession | null>;
|
|
13
|
+
/**
|
|
14
|
+
* The raw request handler for auth routes (sign-in, sign-up, etc.)
|
|
15
|
+
* Mounted at /api/auth/* by the auth module.
|
|
16
|
+
*/
|
|
17
|
+
handler: (request: Request) => Promise<Response>;
|
|
18
|
+
}
|
|
19
|
+
export interface AuthSession {
|
|
20
|
+
user: AuthUser;
|
|
21
|
+
session: {
|
|
22
|
+
id: string;
|
|
23
|
+
expiresAt: Date;
|
|
24
|
+
token: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface AuthUser {
|
|
28
|
+
id: string;
|
|
29
|
+
email: string;
|
|
30
|
+
name: string;
|
|
31
|
+
role: string;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/contracts/auth.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAE1D;;;OAGG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,SAAS,EAAE,IAAI,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { VobaseDb } from '../db/client';
|
|
2
|
+
import type { HttpClient } from '../http-client';
|
|
3
|
+
import type { EmailProvider } from './notify';
|
|
4
|
+
import type { StorageProvider } from './storage';
|
|
5
|
+
import type { Scheduler } from '../queue';
|
|
6
|
+
/**
|
|
7
|
+
* Context passed to a module's `init` hook during app boot.
|
|
8
|
+
* Provides access to core infrastructure services.
|
|
9
|
+
*/
|
|
10
|
+
export interface ModuleInitContext {
|
|
11
|
+
db: VobaseDb;
|
|
12
|
+
scheduler: Scheduler;
|
|
13
|
+
storage: StorageProvider;
|
|
14
|
+
http: HttpClient;
|
|
15
|
+
notify: EmailProvider;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/contracts/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,QAAQ,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,eAAe,CAAC;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC;CACvB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider interfaces for the notify module. Each channel (email, WhatsApp)
|
|
3
|
+
* has its own provider interface with channel-specific options.
|
|
4
|
+
*/
|
|
5
|
+
export interface EmailProvider {
|
|
6
|
+
send(message: EmailMessage): Promise<EmailResult>;
|
|
7
|
+
}
|
|
8
|
+
export interface EmailMessage {
|
|
9
|
+
to: string | string[];
|
|
10
|
+
subject: string;
|
|
11
|
+
html?: string;
|
|
12
|
+
text?: string;
|
|
13
|
+
from?: string;
|
|
14
|
+
cc?: string[];
|
|
15
|
+
bcc?: string[];
|
|
16
|
+
replyTo?: string;
|
|
17
|
+
attachments?: EmailAttachment[];
|
|
18
|
+
}
|
|
19
|
+
export interface EmailAttachment {
|
|
20
|
+
filename: string;
|
|
21
|
+
content: Buffer | Uint8Array;
|
|
22
|
+
contentType?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface EmailResult {
|
|
25
|
+
success: boolean;
|
|
26
|
+
messageId?: string;
|
|
27
|
+
error?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface WhatsAppProvider {
|
|
30
|
+
send(message: WhatsAppMessage): Promise<WhatsAppResult>;
|
|
31
|
+
}
|
|
32
|
+
export interface WhatsAppMessage {
|
|
33
|
+
to: string;
|
|
34
|
+
template?: {
|
|
35
|
+
name: string;
|
|
36
|
+
language: string;
|
|
37
|
+
parameters?: string[];
|
|
38
|
+
};
|
|
39
|
+
text?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface WhatsAppResult {
|
|
42
|
+
success: boolean;
|
|
43
|
+
messageId?: string;
|
|
44
|
+
error?: string;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=notify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../src/contracts/notify.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CACnD;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider interface for storage backends. Each provider implements
|
|
3
|
+
* the physical operations; the storage module handles bucket resolution,
|
|
4
|
+
* metadata tracking, and access control on top.
|
|
5
|
+
*/
|
|
6
|
+
export interface StorageProvider {
|
|
7
|
+
upload(fullKey: string, data: Buffer | Uint8Array, opts?: UploadOptions): Promise<void>;
|
|
8
|
+
download(fullKey: string): Promise<Uint8Array>;
|
|
9
|
+
delete(fullKey: string): Promise<void>;
|
|
10
|
+
exists(fullKey: string): Promise<boolean>;
|
|
11
|
+
presign(fullKey: string, opts: PresignOptions): string;
|
|
12
|
+
list(prefix: string, opts?: ListOptions): Promise<StorageListResult>;
|
|
13
|
+
}
|
|
14
|
+
export interface UploadOptions {
|
|
15
|
+
contentType?: string;
|
|
16
|
+
metadata?: Record<string, string>;
|
|
17
|
+
/** Max upload size in bytes. Enforced server-side for direct uploads. */
|
|
18
|
+
maxSize?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface PresignOptions {
|
|
21
|
+
expiresIn?: number;
|
|
22
|
+
method?: 'GET' | 'PUT';
|
|
23
|
+
}
|
|
24
|
+
export interface ListOptions {
|
|
25
|
+
cursor?: string;
|
|
26
|
+
limit?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface StorageListResult {
|
|
29
|
+
objects: StorageObjectInfo[];
|
|
30
|
+
cursor?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface StorageObjectInfo {
|
|
33
|
+
key: string;
|
|
34
|
+
size: number;
|
|
35
|
+
contentType: string;
|
|
36
|
+
lastModified: Date;
|
|
37
|
+
}
|
|
38
|
+
/** Local filesystem provider */
|
|
39
|
+
export interface LocalProviderConfig {
|
|
40
|
+
type: 'local';
|
|
41
|
+
basePath: string;
|
|
42
|
+
baseUrl?: string;
|
|
43
|
+
}
|
|
44
|
+
/** S3-compatible provider (AWS, R2, MinIO) using Bun native S3 */
|
|
45
|
+
export interface S3ProviderConfig {
|
|
46
|
+
type: 's3';
|
|
47
|
+
bucket: string;
|
|
48
|
+
region?: string;
|
|
49
|
+
endpoint?: string;
|
|
50
|
+
accessKeyId: string;
|
|
51
|
+
secretAccessKey: string;
|
|
52
|
+
}
|
|
53
|
+
export type StorageProviderConfig = LocalProviderConfig | S3ProviderConfig;
|
|
54
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/contracts/storage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxF,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,CAAC,OAAO,EAAE,MAAM,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B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,GAAG,gBAAgB,CAAC"}
|
package/dist/db/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
export { createDatabase, type VobaseDb } from './client';
|
|
2
2
|
export { createNanoid, DEFAULT_COLUMNS, NANOID_ALPHABET, NANOID_LENGTH, nanoidPrimaryKey, } from './helpers';
|
|
3
|
-
export { runMigrations } from './migrator';
|
|
4
|
-
export { ensureCoreTables } from './ensure-core-tables';
|
|
5
|
-
export * from './system-schema';
|
|
6
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/db/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,EACf,aAAa,EACb,gBAAgB,GACjB,MAAM,WAAW,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,EACf,aAAa,EACb,gBAAgB,GACjB,MAAM,WAAW,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export { type CreateAppConfig, createApp } from './app';
|
|
2
2
|
export { type Auth, type CreateAuthOptions, createAuth } from './auth';
|
|
3
|
+
export type { AuthAdapter, AuthSession, AuthUser } from './contracts/auth';
|
|
4
|
+
export type { StorageProvider, UploadOptions, PresignOptions, ListOptions, StorageListResult, StorageObjectInfo, LocalProviderConfig, S3ProviderConfig, StorageProviderConfig, } from './contracts/storage';
|
|
5
|
+
export type { EmailProvider, EmailMessage, EmailAttachment, EmailResult, WhatsAppProvider, WhatsAppMessage, WhatsAppResult, } from './contracts/notify';
|
|
6
|
+
export type { ModuleInitContext } from './contracts/module';
|
|
3
7
|
export type { VobaseCtx, VobaseUser } from './ctx';
|
|
4
|
-
export { CircuitBreaker, type CircuitBreakerOptions } from './circuit-breaker';
|
|
5
8
|
export { contextMiddleware, getCtx } from './ctx';
|
|
9
|
+
export { CircuitBreaker, type CircuitBreakerOptions } from './circuit-breaker';
|
|
6
10
|
export { createHttpClient, type HttpClient, type HttpClientOptions, type HttpResponse, type RequestOptions, } from './http-client';
|
|
7
|
-
export {
|
|
8
|
-
export { credentialsTable } from './db/credentials-schema';
|
|
9
|
-
export { createDatabase, runMigrations, type VobaseDb } from './db';
|
|
10
|
-
export { ensureCoreTables } from './db/ensure-core-tables';
|
|
11
|
-
export { auditLog, sequences, recordAudits } from './db/system-schema';
|
|
11
|
+
export { createDatabase, type VobaseDb } from './db';
|
|
12
12
|
export { createNanoid, DEFAULT_COLUMNS, NANOID_ALPHABET, NANOID_LENGTH, nanoidPrimaryKey, } from './db/helpers';
|
|
13
13
|
export { conflict, dbBusy, ERROR_CODES, type ErrorCode, errorHandler, forbidden, notFound, unauthorized, VobaseError, validation, } from './errors';
|
|
14
14
|
export type { JobDefinition, JobHandler, WorkerOptions } from './job';
|
|
@@ -19,7 +19,15 @@ export type { DefineModuleConfig, VobaseModule } from './module';
|
|
|
19
19
|
export { defineModule } from './module';
|
|
20
20
|
export { registerModules } from './module-registry';
|
|
21
21
|
export { createScheduler, type JobOptions, type Scheduler } from './queue';
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
22
|
+
export { createAuditModule, auditLog, recordAudits } from './modules/audit';
|
|
23
|
+
export { trackChanges } from './modules/audit/track-changes';
|
|
24
|
+
export { requestAuditMiddleware, createAuthAuditHooks } from './modules/audit/middleware';
|
|
25
|
+
export { createSequencesModule, sequences } from './modules/sequences';
|
|
26
|
+
export { nextSequence, type SequenceOptions } from './modules/sequences/next-sequence';
|
|
27
|
+
export { createCredentialsModule, credentialsTable } from './modules/credentials';
|
|
28
|
+
export { encrypt, decrypt, getCredential, setCredential, deleteCredential } from './modules/credentials/encrypt';
|
|
29
|
+
export { getActiveSchemas, type SchemaConfig } from './schemas';
|
|
30
|
+
export { createThrowProxy } from './throw-proxy';
|
|
31
|
+
export { createStorage, type Storage } from './storage';
|
|
32
|
+
export { type WebhookConfig, verifyHmacSignature, createWebhookRoutes, webhookDedup } from './webhooks';
|
|
25
33
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxD,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,iBAAiB,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGvE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC3E,YAAY,EACV,eAAe,EACf,aAAa,EACb,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,cAAc,GACf,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,YAAY,EAAE,SAAS,EAAE,UAA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