@vobase/core 0.9.0 → 0.11.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/package.json +9 -10
- package/src/__tests__/drizzle-introspection.test.ts +77 -0
- package/src/__tests__/e2e.test.ts +225 -0
- package/src/__tests__/permissions.test.ts +157 -0
- package/src/__tests__/rpc-types.test.ts +92 -0
- package/src/app.test.ts +99 -0
- package/src/app.ts +178 -0
- package/src/audit.test.ts +126 -0
- package/src/auth.test.ts +74 -0
- package/src/contracts/auth.ts +37 -0
- package/{dist/contracts/module.d.ts → src/contracts/module.ts} +6 -6
- package/src/contracts/notify.ts +47 -0
- package/src/contracts/permissions.ts +10 -0
- package/src/contracts/storage.ts +61 -0
- package/src/ctx.test.ts +162 -0
- package/src/ctx.ts +64 -0
- package/src/db/client.test.ts +75 -0
- package/src/db/client.ts +15 -0
- package/src/db/helpers.test.ts +147 -0
- package/src/db/helpers.ts +51 -0
- package/src/db/index.ts +8 -0
- package/{dist/index.d.ts → src/index.ts} +105 -6
- package/src/infra/circuit-breaker.test.ts +74 -0
- package/src/infra/circuit-breaker.ts +57 -0
- package/src/infra/errors.test.ts +175 -0
- package/src/infra/errors.ts +64 -0
- package/src/infra/http-client.test.ts +482 -0
- package/src/infra/http-client.ts +221 -0
- package/src/infra/index.ts +35 -0
- package/src/infra/job.test.ts +85 -0
- package/src/infra/job.ts +94 -0
- package/src/infra/logger.test.ts +65 -0
- package/src/infra/logger.ts +18 -0
- package/src/infra/queue.test.ts +46 -0
- package/src/infra/queue.ts +147 -0
- package/src/infra/throw-proxy.test.ts +34 -0
- package/src/infra/throw-proxy.ts +17 -0
- package/src/infra/webhooks-schema.ts +17 -0
- package/src/infra/webhooks.test.ts +364 -0
- package/src/infra/webhooks.ts +146 -0
- package/src/mcp/auth.test.ts +129 -0
- package/src/mcp/crud.test.ts +128 -0
- package/src/mcp/crud.ts +171 -0
- package/{dist/mcp/index.d.ts → src/mcp/index.ts} +0 -1
- package/src/mcp/server.test.ts +153 -0
- package/src/mcp/server.ts +178 -0
- package/src/middleware/audit.test.ts +169 -0
- package/src/module-registry.ts +18 -0
- package/src/module.test.ts +168 -0
- package/src/module.ts +111 -0
- package/src/modules/audit/index.ts +18 -0
- package/src/modules/audit/middleware.ts +33 -0
- package/src/modules/audit/schema.ts +35 -0
- package/src/modules/audit/track-changes.ts +70 -0
- package/src/modules/auth/audit-hooks.ts +74 -0
- package/src/modules/auth/index.ts +101 -0
- package/src/modules/auth/middleware.ts +51 -0
- package/src/modules/auth/permissions.ts +46 -0
- package/src/modules/auth/schema.ts +184 -0
- package/src/modules/credentials/encrypt.ts +95 -0
- package/src/modules/credentials/index.ts +15 -0
- package/src/modules/credentials/schema.ts +10 -0
- package/src/modules/notify/index.ts +90 -0
- package/src/modules/notify/notify.test.ts +145 -0
- package/src/modules/notify/providers/resend.ts +47 -0
- package/src/modules/notify/providers/smtp.ts +117 -0
- package/src/modules/notify/providers/waba.ts +82 -0
- package/src/modules/notify/schema.ts +27 -0
- package/src/modules/notify/service.ts +93 -0
- package/src/modules/sequences/index.ts +15 -0
- package/src/modules/sequences/next-sequence.ts +48 -0
- package/src/modules/sequences/schema.ts +12 -0
- package/src/modules/storage/index.ts +44 -0
- package/src/modules/storage/providers/local.ts +124 -0
- package/src/modules/storage/providers/s3.ts +83 -0
- package/src/modules/storage/routes.ts +76 -0
- package/src/modules/storage/schema.ts +26 -0
- package/src/modules/storage/service.ts +202 -0
- package/src/modules/storage/storage.test.ts +225 -0
- package/src/schemas.test.ts +44 -0
- package/src/schemas.ts +63 -0
- package/src/sequence.test.ts +56 -0
- package/dist/app.d.ts +0 -37
- package/dist/app.d.ts.map +0 -1
- package/dist/contracts/auth.d.ts +0 -35
- package/dist/contracts/auth.d.ts.map +0 -1
- package/dist/contracts/module.d.ts.map +0 -1
- package/dist/contracts/notify.d.ts +0 -46
- package/dist/contracts/notify.d.ts.map +0 -1
- package/dist/contracts/permissions.d.ts +0 -10
- package/dist/contracts/permissions.d.ts.map +0 -1
- package/dist/contracts/storage.d.ts +0 -54
- package/dist/contracts/storage.d.ts.map +0 -1
- package/dist/ctx.d.ts +0 -40
- package/dist/ctx.d.ts.map +0 -1
- package/dist/db/client.d.ts +0 -4
- package/dist/db/client.d.ts.map +0 -1
- package/dist/db/helpers.d.ts +0 -26
- package/dist/db/helpers.d.ts.map +0 -1
- package/dist/db/index.d.ts +0 -3
- package/dist/db/index.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -89026
- package/dist/infra/circuit-breaker.d.ts +0 -17
- package/dist/infra/circuit-breaker.d.ts.map +0 -1
- package/dist/infra/errors.d.ts +0 -26
- package/dist/infra/errors.d.ts.map +0 -1
- package/dist/infra/http-client.d.ts +0 -31
- package/dist/infra/http-client.d.ts.map +0 -1
- package/dist/infra/index.d.ts +0 -11
- package/dist/infra/index.d.ts.map +0 -1
- package/dist/infra/job.d.ts +0 -14
- package/dist/infra/job.d.ts.map +0 -1
- package/dist/infra/logger.d.ts +0 -7
- package/dist/infra/logger.d.ts.map +0 -1
- package/dist/infra/queue.d.ts +0 -18
- package/dist/infra/queue.d.ts.map +0 -1
- package/dist/infra/throw-proxy.d.ts +0 -7
- package/dist/infra/throw-proxy.d.ts.map +0 -1
- package/dist/infra/webhooks-schema.d.ts +0 -60
- package/dist/infra/webhooks-schema.d.ts.map +0 -1
- package/dist/infra/webhooks.d.ts +0 -46
- package/dist/infra/webhooks.d.ts.map +0 -1
- package/dist/mcp/crud.d.ts +0 -12
- package/dist/mcp/crud.d.ts.map +0 -1
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/server.d.ts +0 -10
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/module-registry.d.ts +0 -3
- package/dist/module-registry.d.ts.map +0 -1
- package/dist/module.d.ts +0 -29
- package/dist/module.d.ts.map +0 -1
- package/dist/modules/audit/index.d.ts +0 -5
- package/dist/modules/audit/index.d.ts.map +0 -1
- package/dist/modules/audit/middleware.d.ts +0 -3
- package/dist/modules/audit/middleware.d.ts.map +0 -1
- package/dist/modules/audit/schema.d.ts +0 -247
- package/dist/modules/audit/schema.d.ts.map +0 -1
- package/dist/modules/audit/track-changes.d.ts +0 -3
- package/dist/modules/audit/track-changes.d.ts.map +0 -1
- package/dist/modules/auth/audit-hooks.d.ts +0 -6
- package/dist/modules/auth/audit-hooks.d.ts.map +0 -1
- package/dist/modules/auth/index.d.ts +0 -17
- package/dist/modules/auth/index.d.ts.map +0 -1
- package/dist/modules/auth/middleware.d.ts +0 -15
- package/dist/modules/auth/middleware.d.ts.map +0 -1
- package/dist/modules/auth/permissions.d.ts +0 -5
- package/dist/modules/auth/permissions.d.ts.map +0 -1
- package/dist/modules/auth/schema.d.ts +0 -2519
- package/dist/modules/auth/schema.d.ts.map +0 -1
- package/dist/modules/credentials/encrypt.d.ts +0 -12
- package/dist/modules/credentials/encrypt.d.ts.map +0 -1
- package/dist/modules/credentials/index.d.ts +0 -4
- package/dist/modules/credentials/index.d.ts.map +0 -1
- package/dist/modules/credentials/schema.d.ts +0 -56
- package/dist/modules/credentials/schema.d.ts.map +0 -1
- package/dist/modules/notify/index.d.ts +0 -36
- package/dist/modules/notify/index.d.ts.map +0 -1
- package/dist/modules/notify/providers/resend.d.ts +0 -7
- package/dist/modules/notify/providers/resend.d.ts.map +0 -1
- package/dist/modules/notify/providers/smtp.d.ts +0 -18
- package/dist/modules/notify/providers/smtp.d.ts.map +0 -1
- package/dist/modules/notify/providers/waba.d.ts +0 -12
- package/dist/modules/notify/providers/waba.d.ts.map +0 -1
- package/dist/modules/notify/schema.d.ts +0 -337
- package/dist/modules/notify/schema.d.ts.map +0 -1
- package/dist/modules/notify/service.d.ts +0 -22
- package/dist/modules/notify/service.d.ts.map +0 -1
- package/dist/modules/sequences/index.d.ts +0 -4
- package/dist/modules/sequences/index.d.ts.map +0 -1
- package/dist/modules/sequences/next-sequence.d.ts +0 -8
- package/dist/modules/sequences/next-sequence.d.ts.map +0 -1
- package/dist/modules/sequences/schema.d.ts +0 -72
- package/dist/modules/sequences/schema.d.ts.map +0 -1
- package/dist/modules/storage/index.d.ts +0 -24
- package/dist/modules/storage/index.d.ts.map +0 -1
- package/dist/modules/storage/providers/local.d.ts +0 -3
- package/dist/modules/storage/providers/local.d.ts.map +0 -1
- package/dist/modules/storage/providers/s3.d.ts +0 -3
- package/dist/modules/storage/providers/s3.d.ts.map +0 -1
- package/dist/modules/storage/routes.d.ts +0 -4
- package/dist/modules/storage/routes.d.ts.map +0 -1
- package/dist/modules/storage/schema.d.ts +0 -273
- package/dist/modules/storage/schema.d.ts.map +0 -1
- package/dist/modules/storage/service.d.ts +0 -35
- package/dist/modules/storage/service.d.ts.map +0 -1
- package/dist/schemas.d.ts +0 -19
- package/dist/schemas.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBnB,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBvB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI9B,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { VobaseDb } from '../../db/client';
|
|
2
|
-
/** Encrypt a plaintext string using AES-256-GCM. Returns base64-encoded ciphertext. */
|
|
3
|
-
export declare function encrypt(plaintext: string): string;
|
|
4
|
-
/** Decrypt a base64-encoded ciphertext using AES-256-GCM. */
|
|
5
|
-
export declare function decrypt(encoded: string): string;
|
|
6
|
-
/** Get a single credential value (decrypted). Returns null if not found or decryption fails. */
|
|
7
|
-
export declare function getCredential(db: VobaseDb, key: string): Promise<string | null>;
|
|
8
|
-
/** Set a single credential value (encrypted). Upserts on conflict. */
|
|
9
|
-
export declare function setCredential(db: VobaseDb, key: string, value: string): Promise<void>;
|
|
10
|
-
/** Delete a single credential. */
|
|
11
|
-
export declare function deleteCredential(db: VobaseDb, key: string): Promise<void>;
|
|
12
|
-
//# sourceMappingURL=encrypt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encrypt.d.ts","sourceRoot":"","sources":["../../../src/modules/credentials/encrypt.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAkBhD,uFAAuF;AACvF,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAUjD;AAED,6DAA6D;AAC7D,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAe/C;AAED,gGAAgG;AAChG,wBAAsB,aAAa,CACjC,EAAE,EAAE,QAAQ,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAYxB;AAED,sEAAsE;AACtE,wBAAsB,aAAa,CACjC,EAAE,EAAE,QAAQ,EACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CASf;AAED,kCAAkC;AAClC,wBAAsB,gBAAgB,CACpC,EAAE,EAAE,QAAQ,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/credentials/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7F,wBAAgB,uBAAuB,iCAOtC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export declare const credentialsTable: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
-
name: "_credentials";
|
|
3
|
-
schema: undefined;
|
|
4
|
-
columns: {
|
|
5
|
-
key: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
-
name: string;
|
|
7
|
-
tableName: "_credentials";
|
|
8
|
-
dataType: "string";
|
|
9
|
-
data: string;
|
|
10
|
-
driverParam: string;
|
|
11
|
-
notNull: true;
|
|
12
|
-
hasDefault: false;
|
|
13
|
-
isPrimaryKey: true;
|
|
14
|
-
isAutoincrement: false;
|
|
15
|
-
hasRuntimeDefault: false;
|
|
16
|
-
enumValues: [string, ...string[]];
|
|
17
|
-
baseColumn: never;
|
|
18
|
-
identity: undefined;
|
|
19
|
-
generated: undefined;
|
|
20
|
-
}, {}>;
|
|
21
|
-
value: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
22
|
-
name: string;
|
|
23
|
-
tableName: "_credentials";
|
|
24
|
-
dataType: "string";
|
|
25
|
-
data: string;
|
|
26
|
-
driverParam: string;
|
|
27
|
-
notNull: true;
|
|
28
|
-
hasDefault: false;
|
|
29
|
-
isPrimaryKey: false;
|
|
30
|
-
isAutoincrement: false;
|
|
31
|
-
hasRuntimeDefault: false;
|
|
32
|
-
enumValues: [string, ...string[]];
|
|
33
|
-
baseColumn: never;
|
|
34
|
-
identity: undefined;
|
|
35
|
-
generated: undefined;
|
|
36
|
-
}, {}>;
|
|
37
|
-
updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
38
|
-
name: string;
|
|
39
|
-
tableName: "_credentials";
|
|
40
|
-
dataType: "object date";
|
|
41
|
-
data: Date;
|
|
42
|
-
driverParam: number;
|
|
43
|
-
notNull: true;
|
|
44
|
-
hasDefault: true;
|
|
45
|
-
isPrimaryKey: false;
|
|
46
|
-
isAutoincrement: false;
|
|
47
|
-
hasRuntimeDefault: true;
|
|
48
|
-
enumValues: undefined;
|
|
49
|
-
baseColumn: never;
|
|
50
|
-
identity: undefined;
|
|
51
|
-
generated: undefined;
|
|
52
|
-
}, {}>;
|
|
53
|
-
};
|
|
54
|
-
dialect: "sqlite";
|
|
55
|
-
}>;
|
|
56
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/credentials/schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO3B,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Hono } from 'hono';
|
|
2
|
-
import { type ResendConfig } from './providers/resend';
|
|
3
|
-
import { type SmtpConfig } from './providers/smtp';
|
|
4
|
-
import type { VobaseDb } from '../../db/client';
|
|
5
|
-
export interface EmailNotifyConfig {
|
|
6
|
-
provider: 'resend' | 'smtp';
|
|
7
|
-
from: string;
|
|
8
|
-
resend?: Omit<ResendConfig, 'from'>;
|
|
9
|
-
smtp?: Omit<SmtpConfig, 'from'>;
|
|
10
|
-
}
|
|
11
|
-
export interface WhatsAppNotifyConfig {
|
|
12
|
-
phoneNumberId: string;
|
|
13
|
-
accessToken: string;
|
|
14
|
-
apiVersion?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface NotifyModuleConfig {
|
|
17
|
-
email?: EmailNotifyConfig;
|
|
18
|
-
whatsapp?: WhatsAppNotifyConfig;
|
|
19
|
-
}
|
|
20
|
-
export declare function createNotifyModule(db: VobaseDb, config: NotifyModuleConfig): {
|
|
21
|
-
service: import("./service").NotifyService;
|
|
22
|
-
name: string;
|
|
23
|
-
schema: Record<string, unknown>;
|
|
24
|
-
routes: Hono;
|
|
25
|
-
jobs?: import("../..").JobDefinition[];
|
|
26
|
-
pages?: Record<string, string>;
|
|
27
|
-
seed?: () => Promise<void>;
|
|
28
|
-
init?: (ctx: import("../..").ModuleInitContext) => Promise<void> | void;
|
|
29
|
-
};
|
|
30
|
-
export { notifyLog, notifySchema } from './schema';
|
|
31
|
-
export { createNotifyService } from './service';
|
|
32
|
-
export type { NotifyService, EmailChannel, WhatsAppChannel } from './service';
|
|
33
|
-
export { createResendProvider, type ResendConfig } from './providers/resend';
|
|
34
|
-
export { createSmtpProvider, type SmtpConfig } from './providers/smtp';
|
|
35
|
-
export { createWabaProvider, type WabaConfig } from './providers/waba';
|
|
36
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/notify/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAI5B,OAAO,EAAwB,KAAK,YAAY,EAAE,MAAM,oBAAo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,aAAa,EAA6B,MAAM,2BAA2B,CAAC;AAE1F,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,aAAa,CAuCxE"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { EmailProvider } from '../../../contracts/notify';
|
|
2
|
-
export interface SmtpConfig {
|
|
3
|
-
host: string;
|
|
4
|
-
port: number;
|
|
5
|
-
secure?: boolean;
|
|
6
|
-
auth?: {
|
|
7
|
-
user: string;
|
|
8
|
-
pass: string;
|
|
9
|
-
};
|
|
10
|
-
from: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Minimal SMTP email provider using Bun's TCP socket.
|
|
14
|
-
* Handles basic SMTP conversation (EHLO, AUTH, MAIL FROM, RCPT TO, DATA, QUIT).
|
|
15
|
-
* For production use with complex SMTP requirements, consider a dedicated library.
|
|
16
|
-
*/
|
|
17
|
-
export declare function createSmtpProvider(config: SmtpConfig): EmailProvider;
|
|
18
|
-
//# sourceMappingURL=smtp.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"smtp.d.ts","sourceRoot":"","sources":["../../../../src/modules/notify/providers/smtp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAA6B,MAAM,2BAA2B,CAAC;AAE1F,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,aAAa,CAqGpE"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { WhatsAppProvider } from '../../../contracts/notify';
|
|
2
|
-
export interface WabaConfig {
|
|
3
|
-
phoneNumberId: string;
|
|
4
|
-
accessToken: string;
|
|
5
|
-
apiVersion?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* WhatsApp Business API (WABA) provider.
|
|
9
|
-
* Uses the Graph API to send template and text messages.
|
|
10
|
-
*/
|
|
11
|
-
export declare function createWabaProvider(config: WabaConfig): WhatsAppProvider;
|
|
12
|
-
//# sourceMappingURL=waba.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"waba.d.ts","sourceRoot":"","sources":["../../../../src/modules/notify/providers/waba.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAmC,MAAM,2BAA2B,CAAC;AAEnG,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,gBAAgB,CAqEvE"}
|
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
export declare const notifyLog: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
-
name: "_notify_log";
|
|
3
|
-
schema: undefined;
|
|
4
|
-
columns: {
|
|
5
|
-
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
-
name: string;
|
|
7
|
-
tableName: "_notify_log";
|
|
8
|
-
dataType: "string";
|
|
9
|
-
data: string;
|
|
10
|
-
driverParam: string;
|
|
11
|
-
notNull: true;
|
|
12
|
-
hasDefault: true;
|
|
13
|
-
isPrimaryKey: true;
|
|
14
|
-
isAutoincrement: false;
|
|
15
|
-
hasRuntimeDefault: true;
|
|
16
|
-
enumValues: [string, ...string[]];
|
|
17
|
-
baseColumn: never;
|
|
18
|
-
identity: undefined;
|
|
19
|
-
generated: undefined;
|
|
20
|
-
}, {}>;
|
|
21
|
-
channel: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
22
|
-
name: string;
|
|
23
|
-
tableName: "_notify_log";
|
|
24
|
-
dataType: "string";
|
|
25
|
-
data: string;
|
|
26
|
-
driverParam: string;
|
|
27
|
-
notNull: true;
|
|
28
|
-
hasDefault: false;
|
|
29
|
-
isPrimaryKey: false;
|
|
30
|
-
isAutoincrement: false;
|
|
31
|
-
hasRuntimeDefault: false;
|
|
32
|
-
enumValues: [string, ...string[]];
|
|
33
|
-
baseColumn: never;
|
|
34
|
-
identity: undefined;
|
|
35
|
-
generated: undefined;
|
|
36
|
-
}, {}>;
|
|
37
|
-
provider: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
38
|
-
name: string;
|
|
39
|
-
tableName: "_notify_log";
|
|
40
|
-
dataType: "string";
|
|
41
|
-
data: string;
|
|
42
|
-
driverParam: string;
|
|
43
|
-
notNull: true;
|
|
44
|
-
hasDefault: false;
|
|
45
|
-
isPrimaryKey: false;
|
|
46
|
-
isAutoincrement: false;
|
|
47
|
-
hasRuntimeDefault: false;
|
|
48
|
-
enumValues: [string, ...string[]];
|
|
49
|
-
baseColumn: never;
|
|
50
|
-
identity: undefined;
|
|
51
|
-
generated: undefined;
|
|
52
|
-
}, {}>;
|
|
53
|
-
to: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
54
|
-
name: string;
|
|
55
|
-
tableName: "_notify_log";
|
|
56
|
-
dataType: "string";
|
|
57
|
-
data: string;
|
|
58
|
-
driverParam: string;
|
|
59
|
-
notNull: true;
|
|
60
|
-
hasDefault: false;
|
|
61
|
-
isPrimaryKey: false;
|
|
62
|
-
isAutoincrement: false;
|
|
63
|
-
hasRuntimeDefault: false;
|
|
64
|
-
enumValues: [string, ...string[]];
|
|
65
|
-
baseColumn: never;
|
|
66
|
-
identity: undefined;
|
|
67
|
-
generated: undefined;
|
|
68
|
-
}, {}>;
|
|
69
|
-
subject: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
70
|
-
name: string;
|
|
71
|
-
tableName: "_notify_log";
|
|
72
|
-
dataType: "string";
|
|
73
|
-
data: string;
|
|
74
|
-
driverParam: string;
|
|
75
|
-
notNull: false;
|
|
76
|
-
hasDefault: false;
|
|
77
|
-
isPrimaryKey: false;
|
|
78
|
-
isAutoincrement: false;
|
|
79
|
-
hasRuntimeDefault: false;
|
|
80
|
-
enumValues: [string, ...string[]];
|
|
81
|
-
baseColumn: never;
|
|
82
|
-
identity: undefined;
|
|
83
|
-
generated: undefined;
|
|
84
|
-
}, {}>;
|
|
85
|
-
template: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
86
|
-
name: string;
|
|
87
|
-
tableName: "_notify_log";
|
|
88
|
-
dataType: "string";
|
|
89
|
-
data: string;
|
|
90
|
-
driverParam: string;
|
|
91
|
-
notNull: false;
|
|
92
|
-
hasDefault: false;
|
|
93
|
-
isPrimaryKey: false;
|
|
94
|
-
isAutoincrement: false;
|
|
95
|
-
hasRuntimeDefault: false;
|
|
96
|
-
enumValues: [string, ...string[]];
|
|
97
|
-
baseColumn: never;
|
|
98
|
-
identity: undefined;
|
|
99
|
-
generated: undefined;
|
|
100
|
-
}, {}>;
|
|
101
|
-
providerMessageId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
102
|
-
name: string;
|
|
103
|
-
tableName: "_notify_log";
|
|
104
|
-
dataType: "string";
|
|
105
|
-
data: string;
|
|
106
|
-
driverParam: string;
|
|
107
|
-
notNull: false;
|
|
108
|
-
hasDefault: false;
|
|
109
|
-
isPrimaryKey: false;
|
|
110
|
-
isAutoincrement: false;
|
|
111
|
-
hasRuntimeDefault: false;
|
|
112
|
-
enumValues: [string, ...string[]];
|
|
113
|
-
baseColumn: never;
|
|
114
|
-
identity: undefined;
|
|
115
|
-
generated: undefined;
|
|
116
|
-
}, {}>;
|
|
117
|
-
status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
118
|
-
name: string;
|
|
119
|
-
tableName: "_notify_log";
|
|
120
|
-
dataType: "string";
|
|
121
|
-
data: string;
|
|
122
|
-
driverParam: string;
|
|
123
|
-
notNull: true;
|
|
124
|
-
hasDefault: true;
|
|
125
|
-
isPrimaryKey: false;
|
|
126
|
-
isAutoincrement: false;
|
|
127
|
-
hasRuntimeDefault: false;
|
|
128
|
-
enumValues: [string, ...string[]];
|
|
129
|
-
baseColumn: never;
|
|
130
|
-
identity: undefined;
|
|
131
|
-
generated: undefined;
|
|
132
|
-
}, {}>;
|
|
133
|
-
error: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
134
|
-
name: string;
|
|
135
|
-
tableName: "_notify_log";
|
|
136
|
-
dataType: "string";
|
|
137
|
-
data: string;
|
|
138
|
-
driverParam: string;
|
|
139
|
-
notNull: false;
|
|
140
|
-
hasDefault: false;
|
|
141
|
-
isPrimaryKey: false;
|
|
142
|
-
isAutoincrement: false;
|
|
143
|
-
hasRuntimeDefault: false;
|
|
144
|
-
enumValues: [string, ...string[]];
|
|
145
|
-
baseColumn: never;
|
|
146
|
-
identity: undefined;
|
|
147
|
-
generated: undefined;
|
|
148
|
-
}, {}>;
|
|
149
|
-
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
150
|
-
name: string;
|
|
151
|
-
tableName: "_notify_log";
|
|
152
|
-
dataType: "object date";
|
|
153
|
-
data: Date;
|
|
154
|
-
driverParam: number;
|
|
155
|
-
notNull: true;
|
|
156
|
-
hasDefault: true;
|
|
157
|
-
isPrimaryKey: false;
|
|
158
|
-
isAutoincrement: false;
|
|
159
|
-
hasRuntimeDefault: true;
|
|
160
|
-
enumValues: undefined;
|
|
161
|
-
baseColumn: never;
|
|
162
|
-
identity: undefined;
|
|
163
|
-
generated: undefined;
|
|
164
|
-
}, {}>;
|
|
165
|
-
};
|
|
166
|
-
dialect: "sqlite";
|
|
167
|
-
}>;
|
|
168
|
-
export declare const notifySchema: {
|
|
169
|
-
notifyLog: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
170
|
-
name: "_notify_log";
|
|
171
|
-
schema: undefined;
|
|
172
|
-
columns: {
|
|
173
|
-
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
174
|
-
name: string;
|
|
175
|
-
tableName: "_notify_log";
|
|
176
|
-
dataType: "string";
|
|
177
|
-
data: string;
|
|
178
|
-
driverParam: string;
|
|
179
|
-
notNull: true;
|
|
180
|
-
hasDefault: true;
|
|
181
|
-
isPrimaryKey: true;
|
|
182
|
-
isAutoincrement: false;
|
|
183
|
-
hasRuntimeDefault: true;
|
|
184
|
-
enumValues: [string, ...string[]];
|
|
185
|
-
baseColumn: never;
|
|
186
|
-
identity: undefined;
|
|
187
|
-
generated: undefined;
|
|
188
|
-
}, {}>;
|
|
189
|
-
channel: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
190
|
-
name: string;
|
|
191
|
-
tableName: "_notify_log";
|
|
192
|
-
dataType: "string";
|
|
193
|
-
data: string;
|
|
194
|
-
driverParam: string;
|
|
195
|
-
notNull: true;
|
|
196
|
-
hasDefault: false;
|
|
197
|
-
isPrimaryKey: false;
|
|
198
|
-
isAutoincrement: false;
|
|
199
|
-
hasRuntimeDefault: false;
|
|
200
|
-
enumValues: [string, ...string[]];
|
|
201
|
-
baseColumn: never;
|
|
202
|
-
identity: undefined;
|
|
203
|
-
generated: undefined;
|
|
204
|
-
}, {}>;
|
|
205
|
-
provider: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
206
|
-
name: string;
|
|
207
|
-
tableName: "_notify_log";
|
|
208
|
-
dataType: "string";
|
|
209
|
-
data: string;
|
|
210
|
-
driverParam: string;
|
|
211
|
-
notNull: true;
|
|
212
|
-
hasDefault: false;
|
|
213
|
-
isPrimaryKey: false;
|
|
214
|
-
isAutoincrement: false;
|
|
215
|
-
hasRuntimeDefault: false;
|
|
216
|
-
enumValues: [string, ...string[]];
|
|
217
|
-
baseColumn: never;
|
|
218
|
-
identity: undefined;
|
|
219
|
-
generated: undefined;
|
|
220
|
-
}, {}>;
|
|
221
|
-
to: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
222
|
-
name: string;
|
|
223
|
-
tableName: "_notify_log";
|
|
224
|
-
dataType: "string";
|
|
225
|
-
data: string;
|
|
226
|
-
driverParam: string;
|
|
227
|
-
notNull: true;
|
|
228
|
-
hasDefault: false;
|
|
229
|
-
isPrimaryKey: false;
|
|
230
|
-
isAutoincrement: false;
|
|
231
|
-
hasRuntimeDefault: false;
|
|
232
|
-
enumValues: [string, ...string[]];
|
|
233
|
-
baseColumn: never;
|
|
234
|
-
identity: undefined;
|
|
235
|
-
generated: undefined;
|
|
236
|
-
}, {}>;
|
|
237
|
-
subject: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
238
|
-
name: string;
|
|
239
|
-
tableName: "_notify_log";
|
|
240
|
-
dataType: "string";
|
|
241
|
-
data: string;
|
|
242
|
-
driverParam: string;
|
|
243
|
-
notNull: false;
|
|
244
|
-
hasDefault: false;
|
|
245
|
-
isPrimaryKey: false;
|
|
246
|
-
isAutoincrement: false;
|
|
247
|
-
hasRuntimeDefault: false;
|
|
248
|
-
enumValues: [string, ...string[]];
|
|
249
|
-
baseColumn: never;
|
|
250
|
-
identity: undefined;
|
|
251
|
-
generated: undefined;
|
|
252
|
-
}, {}>;
|
|
253
|
-
template: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
254
|
-
name: string;
|
|
255
|
-
tableName: "_notify_log";
|
|
256
|
-
dataType: "string";
|
|
257
|
-
data: string;
|
|
258
|
-
driverParam: string;
|
|
259
|
-
notNull: false;
|
|
260
|
-
hasDefault: false;
|
|
261
|
-
isPrimaryKey: false;
|
|
262
|
-
isAutoincrement: false;
|
|
263
|
-
hasRuntimeDefault: false;
|
|
264
|
-
enumValues: [string, ...string[]];
|
|
265
|
-
baseColumn: never;
|
|
266
|
-
identity: undefined;
|
|
267
|
-
generated: undefined;
|
|
268
|
-
}, {}>;
|
|
269
|
-
providerMessageId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
270
|
-
name: string;
|
|
271
|
-
tableName: "_notify_log";
|
|
272
|
-
dataType: "string";
|
|
273
|
-
data: string;
|
|
274
|
-
driverParam: string;
|
|
275
|
-
notNull: false;
|
|
276
|
-
hasDefault: false;
|
|
277
|
-
isPrimaryKey: false;
|
|
278
|
-
isAutoincrement: false;
|
|
279
|
-
hasRuntimeDefault: false;
|
|
280
|
-
enumValues: [string, ...string[]];
|
|
281
|
-
baseColumn: never;
|
|
282
|
-
identity: undefined;
|
|
283
|
-
generated: undefined;
|
|
284
|
-
}, {}>;
|
|
285
|
-
status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
286
|
-
name: string;
|
|
287
|
-
tableName: "_notify_log";
|
|
288
|
-
dataType: "string";
|
|
289
|
-
data: string;
|
|
290
|
-
driverParam: string;
|
|
291
|
-
notNull: true;
|
|
292
|
-
hasDefault: true;
|
|
293
|
-
isPrimaryKey: false;
|
|
294
|
-
isAutoincrement: false;
|
|
295
|
-
hasRuntimeDefault: false;
|
|
296
|
-
enumValues: [string, ...string[]];
|
|
297
|
-
baseColumn: never;
|
|
298
|
-
identity: undefined;
|
|
299
|
-
generated: undefined;
|
|
300
|
-
}, {}>;
|
|
301
|
-
error: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
302
|
-
name: string;
|
|
303
|
-
tableName: "_notify_log";
|
|
304
|
-
dataType: "string";
|
|
305
|
-
data: string;
|
|
306
|
-
driverParam: string;
|
|
307
|
-
notNull: false;
|
|
308
|
-
hasDefault: false;
|
|
309
|
-
isPrimaryKey: false;
|
|
310
|
-
isAutoincrement: false;
|
|
311
|
-
hasRuntimeDefault: false;
|
|
312
|
-
enumValues: [string, ...string[]];
|
|
313
|
-
baseColumn: never;
|
|
314
|
-
identity: undefined;
|
|
315
|
-
generated: undefined;
|
|
316
|
-
}, {}>;
|
|
317
|
-
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
318
|
-
name: string;
|
|
319
|
-
tableName: "_notify_log";
|
|
320
|
-
dataType: "object date";
|
|
321
|
-
data: Date;
|
|
322
|
-
driverParam: number;
|
|
323
|
-
notNull: true;
|
|
324
|
-
hasDefault: true;
|
|
325
|
-
isPrimaryKey: false;
|
|
326
|
-
isAutoincrement: false;
|
|
327
|
-
hasRuntimeDefault: true;
|
|
328
|
-
enumValues: undefined;
|
|
329
|
-
baseColumn: never;
|
|
330
|
-
identity: undefined;
|
|
331
|
-
generated: undefined;
|
|
332
|
-
}, {}>;
|
|
333
|
-
};
|
|
334
|
-
dialect: "sqlite";
|
|
335
|
-
}>;
|
|
336
|
-
};
|
|
337
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/notify/schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBrB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { VobaseDb } from '../../db/client';
|
|
2
|
-
import type { EmailProvider, EmailMessage, EmailResult, WhatsAppProvider, WhatsAppMessage, WhatsAppResult } from '../../contracts/notify';
|
|
3
|
-
export interface EmailChannel {
|
|
4
|
-
send(message: EmailMessage): Promise<EmailResult>;
|
|
5
|
-
}
|
|
6
|
-
export interface WhatsAppChannel {
|
|
7
|
-
send(message: WhatsAppMessage): Promise<WhatsAppResult>;
|
|
8
|
-
}
|
|
9
|
-
export interface NotifyService {
|
|
10
|
-
email: EmailChannel;
|
|
11
|
-
whatsapp: WhatsAppChannel;
|
|
12
|
-
}
|
|
13
|
-
interface NotifyServiceDeps {
|
|
14
|
-
db: VobaseDb;
|
|
15
|
-
emailProvider?: EmailProvider;
|
|
16
|
-
emailProviderName?: string;
|
|
17
|
-
whatsappProvider?: WhatsAppProvider;
|
|
18
|
-
whatsappProviderName?: string;
|
|
19
|
-
}
|
|
20
|
-
export declare function createNotifyService(deps: NotifyServiceDeps): NotifyService;
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/modules/notify/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,MAAM,wBAAwB,CAAC;AAIhC,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CACnD;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,UAAU,iBAAiB;IACzB,EAAE,EAAE,QAAQ,CAAC;IACb,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAwBD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,aAAa,CAqC1E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/sequences/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAErE,wBAAgB,qBAAqB,iCAOpC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { VobaseDb } from '../../db/client';
|
|
2
|
-
export interface SequenceOptions {
|
|
3
|
-
padLength?: number;
|
|
4
|
-
separator?: string;
|
|
5
|
-
yearPrefix?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare function nextSequence(db: VobaseDb, prefix: string, options?: SequenceOptions): string;
|
|
8
|
-
//# sourceMappingURL=next-sequence.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next-sequence.d.ts","sourceRoot":"","sources":["../../../src/modules/sequences/next-sequence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAQD,wBAAgB,YAAY,CAC1B,EAAE,EAAE,QAAQ,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,eAAe,GACxB,MAAM,CA4BR"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
export declare const sequences: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
-
name: "_sequences";
|
|
3
|
-
schema: undefined;
|
|
4
|
-
columns: {
|
|
5
|
-
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
-
name: string;
|
|
7
|
-
tableName: "_sequences";
|
|
8
|
-
dataType: "string";
|
|
9
|
-
data: string;
|
|
10
|
-
driverParam: string;
|
|
11
|
-
notNull: true;
|
|
12
|
-
hasDefault: true;
|
|
13
|
-
isPrimaryKey: true;
|
|
14
|
-
isAutoincrement: false;
|
|
15
|
-
hasRuntimeDefault: true;
|
|
16
|
-
enumValues: [string, ...string[]];
|
|
17
|
-
baseColumn: never;
|
|
18
|
-
identity: undefined;
|
|
19
|
-
generated: undefined;
|
|
20
|
-
}, {}>;
|
|
21
|
-
prefix: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
22
|
-
name: string;
|
|
23
|
-
tableName: "_sequences";
|
|
24
|
-
dataType: "string";
|
|
25
|
-
data: string;
|
|
26
|
-
driverParam: string;
|
|
27
|
-
notNull: true;
|
|
28
|
-
hasDefault: false;
|
|
29
|
-
isPrimaryKey: false;
|
|
30
|
-
isAutoincrement: false;
|
|
31
|
-
hasRuntimeDefault: false;
|
|
32
|
-
enumValues: [string, ...string[]];
|
|
33
|
-
baseColumn: never;
|
|
34
|
-
identity: undefined;
|
|
35
|
-
generated: undefined;
|
|
36
|
-
}, {}>;
|
|
37
|
-
currentValue: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
38
|
-
name: string;
|
|
39
|
-
tableName: "_sequences";
|
|
40
|
-
dataType: "number int53";
|
|
41
|
-
data: number;
|
|
42
|
-
driverParam: number;
|
|
43
|
-
notNull: true;
|
|
44
|
-
hasDefault: true;
|
|
45
|
-
isPrimaryKey: false;
|
|
46
|
-
isAutoincrement: false;
|
|
47
|
-
hasRuntimeDefault: false;
|
|
48
|
-
enumValues: undefined;
|
|
49
|
-
baseColumn: never;
|
|
50
|
-
identity: undefined;
|
|
51
|
-
generated: undefined;
|
|
52
|
-
}, {}>;
|
|
53
|
-
updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
54
|
-
name: string;
|
|
55
|
-
tableName: "_sequences";
|
|
56
|
-
dataType: "object date";
|
|
57
|
-
data: Date;
|
|
58
|
-
driverParam: number;
|
|
59
|
-
notNull: true;
|
|
60
|
-
hasDefault: true;
|
|
61
|
-
isPrimaryKey: false;
|
|
62
|
-
isAutoincrement: false;
|
|
63
|
-
hasRuntimeDefault: true;
|
|
64
|
-
enumValues: undefined;
|
|
65
|
-
baseColumn: never;
|
|
66
|
-
identity: undefined;
|
|
67
|
-
generated: undefined;
|
|
68
|
-
}, {}>;
|
|
69
|
-
};
|
|
70
|
-
dialect: "sqlite";
|
|
71
|
-
}>;
|
|
72
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/sequences/schema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQpB,CAAC"}
|