@kyro-cms/core 0.3.5 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/api-handler.cjs +5 -5
- package/dist/api-handler.js +4 -4
- package/dist/{chunk-X3CU27OO.cjs → chunk-3FW6WVVP.cjs} +2 -17
- package/dist/chunk-3FW6WVVP.cjs.map +1 -0
- package/dist/{chunk-R4C4O4SE.cjs → chunk-3ZZPZYCM.cjs} +36 -61
- package/dist/chunk-3ZZPZYCM.cjs.map +1 -0
- package/dist/{chunk-Y3TM7WH7.js → chunk-C4JJEE42.js} +36 -61
- package/dist/chunk-C4JJEE42.js.map +1 -0
- package/dist/{chunk-2UOI5MUC.cjs → chunk-FWGHXRRI.cjs} +4 -4
- package/dist/{chunk-2UOI5MUC.cjs.map → chunk-FWGHXRRI.cjs.map} +1 -1
- package/dist/{chunk-DE7OQOMD.cjs → chunk-M4GFA2UQ.cjs} +19 -19
- package/dist/chunk-M4GFA2UQ.cjs.map +1 -0
- package/dist/{chunk-4UD44U4Z.js → chunk-OJBK3JYF.js} +18 -18
- package/dist/chunk-OJBK3JYF.js.map +1 -0
- package/dist/{chunk-5FTY2DLG.js → chunk-SAMZQVC2.js} +3 -3
- package/dist/{chunk-5FTY2DLG.js.map → chunk-SAMZQVC2.js.map} +1 -1
- package/dist/{chunk-RGIQKTZ7.js → chunk-YMG55RSX.js} +4 -18
- package/dist/chunk-YMG55RSX.js.map +1 -0
- package/dist/drizzle/index.cjs +10 -10
- package/dist/drizzle/index.js +2 -2
- package/dist/index.cjs +48 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -13
- package/dist/index.js.map +1 -1
- package/dist/rest/index.cjs +4 -4
- package/dist/rest/index.js +2 -2
- package/package.json +2 -14
- package/dist/WebhookService-118ZTFis.d.ts +0 -112
- package/dist/WebhookService-AefJfqX0.d.cts +0 -112
- package/dist/api-handler.d.cts +0 -9
- package/dist/api-handler.d.ts +0 -9
- package/dist/base-DvvNqnM-.d.cts +0 -73
- package/dist/base-eVegJ_Pr.d.ts +0 -73
- package/dist/chunk-4UD44U4Z.js.map +0 -1
- package/dist/chunk-DE7OQOMD.cjs.map +0 -1
- package/dist/chunk-R4C4O4SE.cjs.map +0 -1
- package/dist/chunk-RGIQKTZ7.js.map +0 -1
- package/dist/chunk-X3CU27OO.cjs.map +0 -1
- package/dist/chunk-Y3TM7WH7.js.map +0 -1
- package/dist/cli/index.d.cts +0 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/client.d.cts +0 -12
- package/dist/client.d.ts +0 -12
- package/dist/drizzle/index.d.cts +0 -135
- package/dist/drizzle/index.d.ts +0 -135
- package/dist/fields/index.d.cts +0 -27
- package/dist/fields/index.d.ts +0 -27
- package/dist/graphql/index.d.cts +0 -22
- package/dist/graphql/index.d.ts +0 -22
- package/dist/index-Bz9JqRGI.d.cts +0 -86
- package/dist/index-Bz9JqRGI.d.ts +0 -86
- package/dist/index-CLp-DRKA.d.ts +0 -64
- package/dist/index-DfO7G4kN.d.cts +0 -64
- package/dist/index.d.cts +0 -1363
- package/dist/index.d.ts +0 -1363
- package/dist/integration.d.cts +0 -27
- package/dist/integration.d.ts +0 -27
- package/dist/mongodb/index.d.cts +0 -63
- package/dist/mongodb/index.d.ts +0 -63
- package/dist/mysql-media-AI6YK767.cjs +0 -48
- package/dist/mysql-media-AI6YK767.cjs.map +0 -1
- package/dist/mysql-media-CDZUS7YX.js +0 -45
- package/dist/mysql-media-CDZUS7YX.js.map +0 -1
- package/dist/rest/index.d.cts +0 -57
- package/dist/rest/index.d.ts +0 -57
- package/dist/templates/index.d.cts +0 -59
- package/dist/templates/index.d.ts +0 -59
- package/dist/trpc/index.d.cts +0 -136
- package/dist/trpc/index.d.ts +0 -136
- package/dist/types-BnTm7oJG.d.cts +0 -130
- package/dist/types-BnTm7oJG.d.ts +0 -130
- package/dist/types-Bs1up4yP.d.ts +0 -461
- package/dist/types-J3R9nVsZ.d.cts +0 -461
- package/dist/types-VtjUxIMp.d.cts +0 -246
- package/dist/types-VtjUxIMp.d.ts +0 -246
- package/dist/ws/index.d.cts +0 -88
- package/dist/ws/index.d.ts +0 -88
package/dist/integration.d.cts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { AstroIntegration } from 'astro';
|
|
2
|
-
|
|
3
|
-
interface KyroIntegrationOptions {
|
|
4
|
-
/**
|
|
5
|
-
* Path to the kyro configuration file relative to the project root.
|
|
6
|
-
* Default: './kyro.config.ts'
|
|
7
|
-
*/
|
|
8
|
-
configPath?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Base path where the API should be mounted.
|
|
11
|
-
* Default: '/api/kyro'
|
|
12
|
-
*/
|
|
13
|
-
apiPath?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Base path where the admin UI should be mounted.
|
|
16
|
-
* Default: '/admin'
|
|
17
|
-
*/
|
|
18
|
-
adminPath?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Whether to mount the admin UI.
|
|
21
|
-
* Default: true
|
|
22
|
-
*/
|
|
23
|
-
admin?: boolean;
|
|
24
|
-
}
|
|
25
|
-
declare function kyro(options?: KyroIntegrationOptions): AstroIntegration;
|
|
26
|
-
|
|
27
|
-
export { type KyroIntegrationOptions, kyro as default };
|
package/dist/integration.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { AstroIntegration } from 'astro';
|
|
2
|
-
|
|
3
|
-
interface KyroIntegrationOptions {
|
|
4
|
-
/**
|
|
5
|
-
* Path to the kyro configuration file relative to the project root.
|
|
6
|
-
* Default: './kyro.config.ts'
|
|
7
|
-
*/
|
|
8
|
-
configPath?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Base path where the API should be mounted.
|
|
11
|
-
* Default: '/api/kyro'
|
|
12
|
-
*/
|
|
13
|
-
apiPath?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Base path where the admin UI should be mounted.
|
|
16
|
-
* Default: '/admin'
|
|
17
|
-
*/
|
|
18
|
-
adminPath?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Whether to mount the admin UI.
|
|
21
|
-
* Default: true
|
|
22
|
-
*/
|
|
23
|
-
admin?: boolean;
|
|
24
|
-
}
|
|
25
|
-
declare function kyro(options?: KyroIntegrationOptions): AstroIntegration;
|
|
26
|
-
|
|
27
|
-
export { type KyroIntegrationOptions, kyro as default };
|
package/dist/mongodb/index.d.cts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { A as AbstractBaseAdapter } from '../base-DvvNqnM-.cjs';
|
|
2
|
-
import { F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, e as UpdateArgs, D as DeleteArgs, f as FindVersionsArgs, g as VersionRecord, h as CreateVersionArgs, i as DraftFindArgs, j as DraftSnapshot, k as DraftUpsertArgs, l as DraftDeleteArgs } from '../types-J3R9nVsZ.cjs';
|
|
3
|
-
import '../types-VtjUxIMp.cjs';
|
|
4
|
-
|
|
5
|
-
declare class MongoDBAdapter extends AbstractBaseAdapter {
|
|
6
|
-
private client;
|
|
7
|
-
private db;
|
|
8
|
-
private database;
|
|
9
|
-
private readonly draftsCollectionName;
|
|
10
|
-
constructor(options: {
|
|
11
|
-
client: any;
|
|
12
|
-
database: string;
|
|
13
|
-
});
|
|
14
|
-
connect(): Promise<void>;
|
|
15
|
-
disconnect(): Promise<void>;
|
|
16
|
-
private getMongoCollection;
|
|
17
|
-
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
18
|
-
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
19
|
-
create<T>(args: CreateArgs): Promise<T>;
|
|
20
|
-
update<T>(args: UpdateArgs): Promise<T>;
|
|
21
|
-
delete<T>(args: DeleteArgs): Promise<T>;
|
|
22
|
-
count(args: {
|
|
23
|
-
collection: string;
|
|
24
|
-
where?: Record<string, any>;
|
|
25
|
-
tenantID?: string;
|
|
26
|
-
}): Promise<number>;
|
|
27
|
-
findOne(args: {
|
|
28
|
-
collection: string;
|
|
29
|
-
where: Record<string, any>;
|
|
30
|
-
tenantID?: string;
|
|
31
|
-
draft?: boolean;
|
|
32
|
-
}): Promise<any>;
|
|
33
|
-
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
34
|
-
findVersionByID(args: {
|
|
35
|
-
collection: string;
|
|
36
|
-
versionId: string;
|
|
37
|
-
tenantID?: string;
|
|
38
|
-
}): Promise<VersionRecord | null>;
|
|
39
|
-
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
40
|
-
deleteVersions(args: {
|
|
41
|
-
collection: string;
|
|
42
|
-
documentId: string;
|
|
43
|
-
keepLatest?: number;
|
|
44
|
-
tenantID?: string;
|
|
45
|
-
}): Promise<void>;
|
|
46
|
-
findDraft<T>(args: DraftFindArgs): Promise<DraftSnapshot<T> | null>;
|
|
47
|
-
upsertDraft<T>(args: DraftUpsertArgs<T>): Promise<DraftSnapshot<T>>;
|
|
48
|
-
deleteDraft(args: DraftDeleteArgs): Promise<void>;
|
|
49
|
-
migrate?(): Promise<void>;
|
|
50
|
-
private getCollectionConfig;
|
|
51
|
-
private buildFilter;
|
|
52
|
-
private getDraftId;
|
|
53
|
-
private docToDraft;
|
|
54
|
-
private buildProjection;
|
|
55
|
-
private processResult;
|
|
56
|
-
private generateId;
|
|
57
|
-
}
|
|
58
|
-
declare function createMongoDBAdapter(options: {
|
|
59
|
-
client: any;
|
|
60
|
-
database: string;
|
|
61
|
-
}): MongoDBAdapter;
|
|
62
|
-
|
|
63
|
-
export { MongoDBAdapter, createMongoDBAdapter };
|
package/dist/mongodb/index.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { A as AbstractBaseAdapter } from '../base-eVegJ_Pr.js';
|
|
2
|
-
import { F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, e as UpdateArgs, D as DeleteArgs, f as FindVersionsArgs, g as VersionRecord, h as CreateVersionArgs, i as DraftFindArgs, j as DraftSnapshot, k as DraftUpsertArgs, l as DraftDeleteArgs } from '../types-Bs1up4yP.js';
|
|
3
|
-
import '../types-VtjUxIMp.js';
|
|
4
|
-
|
|
5
|
-
declare class MongoDBAdapter extends AbstractBaseAdapter {
|
|
6
|
-
private client;
|
|
7
|
-
private db;
|
|
8
|
-
private database;
|
|
9
|
-
private readonly draftsCollectionName;
|
|
10
|
-
constructor(options: {
|
|
11
|
-
client: any;
|
|
12
|
-
database: string;
|
|
13
|
-
});
|
|
14
|
-
connect(): Promise<void>;
|
|
15
|
-
disconnect(): Promise<void>;
|
|
16
|
-
private getMongoCollection;
|
|
17
|
-
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
18
|
-
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
19
|
-
create<T>(args: CreateArgs): Promise<T>;
|
|
20
|
-
update<T>(args: UpdateArgs): Promise<T>;
|
|
21
|
-
delete<T>(args: DeleteArgs): Promise<T>;
|
|
22
|
-
count(args: {
|
|
23
|
-
collection: string;
|
|
24
|
-
where?: Record<string, any>;
|
|
25
|
-
tenantID?: string;
|
|
26
|
-
}): Promise<number>;
|
|
27
|
-
findOne(args: {
|
|
28
|
-
collection: string;
|
|
29
|
-
where: Record<string, any>;
|
|
30
|
-
tenantID?: string;
|
|
31
|
-
draft?: boolean;
|
|
32
|
-
}): Promise<any>;
|
|
33
|
-
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
34
|
-
findVersionByID(args: {
|
|
35
|
-
collection: string;
|
|
36
|
-
versionId: string;
|
|
37
|
-
tenantID?: string;
|
|
38
|
-
}): Promise<VersionRecord | null>;
|
|
39
|
-
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
40
|
-
deleteVersions(args: {
|
|
41
|
-
collection: string;
|
|
42
|
-
documentId: string;
|
|
43
|
-
keepLatest?: number;
|
|
44
|
-
tenantID?: string;
|
|
45
|
-
}): Promise<void>;
|
|
46
|
-
findDraft<T>(args: DraftFindArgs): Promise<DraftSnapshot<T> | null>;
|
|
47
|
-
upsertDraft<T>(args: DraftUpsertArgs<T>): Promise<DraftSnapshot<T>>;
|
|
48
|
-
deleteDraft(args: DraftDeleteArgs): Promise<void>;
|
|
49
|
-
migrate?(): Promise<void>;
|
|
50
|
-
private getCollectionConfig;
|
|
51
|
-
private buildFilter;
|
|
52
|
-
private getDraftId;
|
|
53
|
-
private docToDraft;
|
|
54
|
-
private buildProjection;
|
|
55
|
-
private processResult;
|
|
56
|
-
private generateId;
|
|
57
|
-
}
|
|
58
|
-
declare function createMongoDBAdapter(options: {
|
|
59
|
-
client: any;
|
|
60
|
-
database: string;
|
|
61
|
-
}): MongoDBAdapter;
|
|
62
|
-
|
|
63
|
-
export { MongoDBAdapter, createMongoDBAdapter };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('./chunk-G7VZBCD6.cjs');
|
|
4
|
-
var mysqlCore = require('drizzle-orm/mysql-core');
|
|
5
|
-
var drizzleOrm = require('drizzle-orm');
|
|
6
|
-
|
|
7
|
-
var media = mysqlCore.mysqlTable(
|
|
8
|
-
"media",
|
|
9
|
-
{
|
|
10
|
-
id: mysqlCore.varchar("id", { length: 64 }).primaryKey(),
|
|
11
|
-
filename: mysqlCore.varchar("filename", { length: 255 }).notNull().unique(),
|
|
12
|
-
title: mysqlCore.varchar("title", { length: 255 }),
|
|
13
|
-
originalName: mysqlCore.varchar("original_name", { length: 255 }).notNull(),
|
|
14
|
-
mimeType: mysqlCore.varchar("mime_type", { length: 100 }).notNull(),
|
|
15
|
-
fileSize: mysqlCore.int("file_size").notNull(),
|
|
16
|
-
width: mysqlCore.int("width"),
|
|
17
|
-
height: mysqlCore.int("height"),
|
|
18
|
-
url: mysqlCore.text("url").notNull().unique(),
|
|
19
|
-
thumbnailUrl: mysqlCore.text("thumbnail_url"),
|
|
20
|
-
folder: mysqlCore.varchar("folder", { length: 255 }),
|
|
21
|
-
provider: mysqlCore.varchar("provider", { length: 50 }).notNull(),
|
|
22
|
-
alt: mysqlCore.text("alt"),
|
|
23
|
-
caption: mysqlCore.text("caption"),
|
|
24
|
-
metadata: mysqlCore.text("metadata"),
|
|
25
|
-
createdAt: mysqlCore.datetime("created_at").notNull().default(drizzleOrm.sql`(CURRENT_TIMESTAMP)`),
|
|
26
|
-
updatedAt: mysqlCore.datetime("updated_at").notNull().default(drizzleOrm.sql`(CURRENT_TIMESTAMP)`)
|
|
27
|
-
},
|
|
28
|
-
(table) => [
|
|
29
|
-
mysqlCore.index("media_folder_idx").on(table.folder),
|
|
30
|
-
mysqlCore.index("media_provider_idx").on(table.provider),
|
|
31
|
-
mysqlCore.index("media_filename_idx").on(table.filename)
|
|
32
|
-
]
|
|
33
|
-
);
|
|
34
|
-
var mediaFolders = mysqlCore.mysqlTable(
|
|
35
|
-
"media_folders",
|
|
36
|
-
{
|
|
37
|
-
path: mysqlCore.varchar("path", { length: 500 }).primaryKey(),
|
|
38
|
-
name: mysqlCore.varchar("name", { length: 255 }).notNull(),
|
|
39
|
-
parentPath: mysqlCore.varchar("parent_path", { length: 500 }),
|
|
40
|
-
createdAt: mysqlCore.datetime("created_at").notNull().default(drizzleOrm.sql`(CURRENT_TIMESTAMP)`)
|
|
41
|
-
},
|
|
42
|
-
(table) => [mysqlCore.index("media_folders_parent_idx").on(table.parentPath)]
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
exports.media = media;
|
|
46
|
-
exports.mediaFolders = mediaFolders;
|
|
47
|
-
//# sourceMappingURL=mysql-media-AI6YK767.cjs.map
|
|
48
|
-
//# sourceMappingURL=mysql-media-AI6YK767.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/database/drizzle/schema/mysql-media.ts"],"names":["mysqlTable","varchar","int","text","datetime","sql","index"],"mappings":";;;;;;AAUO,IAAM,KAAA,GAAQA,oBAAA;AAAA,EACnB,OAAA;AAAA,EACA;AAAA,IACE,EAAA,EAAIC,kBAAQ,IAAA,EAAM,EAAE,QAAQ,EAAA,EAAI,EAAE,UAAA,EAAW;AAAA,IAC7C,QAAA,EAAUA,iBAAA,CAAQ,UAAA,EAAY,EAAE,MAAA,EAAQ,KAAK,CAAA,CAAE,OAAA,EAAQ,CAAE,MAAA,EAAO;AAAA,IAChE,OAAOA,iBAAA,CAAQ,OAAA,EAAS,EAAE,MAAA,EAAQ,KAAK,CAAA;AAAA,IACvC,YAAA,EAAcA,kBAAQ,eAAA,EAAiB,EAAE,QAAQ,GAAA,EAAK,EAAE,OAAA,EAAQ;AAAA,IAChE,QAAA,EAAUA,kBAAQ,WAAA,EAAa,EAAE,QAAQ,GAAA,EAAK,EAAE,OAAA,EAAQ;AAAA,IACxD,QAAA,EAAUC,aAAA,CAAI,WAAW,CAAA,CAAE,OAAA,EAAQ;AAAA,IACnC,KAAA,EAAOA,cAAI,OAAO,CAAA;AAAA,IAClB,MAAA,EAAQA,cAAI,QAAQ,CAAA;AAAA,IACpB,KAAKC,cAAA,CAAK,KAAK,CAAA,CAAE,OAAA,GAAU,MAAA,EAAO;AAAA,IAClC,YAAA,EAAcA,eAAK,eAAe,CAAA;AAAA,IAClC,QAAQF,iBAAA,CAAQ,QAAA,EAAU,EAAE,MAAA,EAAQ,KAAK,CAAA;AAAA,IACzC,QAAA,EAAUA,kBAAQ,UAAA,EAAY,EAAE,QAAQ,EAAA,EAAI,EAAE,OAAA,EAAQ;AAAA,IACtD,GAAA,EAAKE,eAAK,KAAK,CAAA;AAAA,IACf,OAAA,EAASA,eAAK,SAAS,CAAA;AAAA,IACvB,QAAA,EAAUA,eAAK,UAAU,CAAA;AAAA,IACzB,WAAWC,kBAAA,CAAS,YAAY,EAC7B,OAAA,EAAQ,CACR,QAAQC,cAAA,CAAA,mBAAA,CAAwB,CAAA;AAAA,IACnC,WAAWD,kBAAA,CAAS,YAAY,EAC7B,OAAA,EAAQ,CACR,QAAQC,cAAA,CAAA,mBAAA,CAAwB;AAAA,GACrC;AAAA,EACA,CAAC,KAAA,KAAU;AAAA,IACTC,eAAA,CAAM,kBAAkB,CAAA,CAAE,EAAA,CAAG,MAAM,MAAM,CAAA;AAAA,IACzCA,eAAA,CAAM,oBAAoB,CAAA,CAAE,EAAA,CAAG,MAAM,QAAQ,CAAA;AAAA,IAC7CA,eAAA,CAAM,oBAAoB,CAAA,CAAE,EAAA,CAAG,MAAM,QAAQ;AAAA;AAEjD;AAEO,IAAM,YAAA,GAAeN,oBAAA;AAAA,EAC1B,eAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAMC,kBAAQ,MAAA,EAAQ,EAAE,QAAQ,GAAA,EAAK,EAAE,UAAA,EAAW;AAAA,IAClD,IAAA,EAAMA,kBAAQ,MAAA,EAAQ,EAAE,QAAQ,GAAA,EAAK,EAAE,OAAA,EAAQ;AAAA,IAC/C,YAAYA,iBAAA,CAAQ,aAAA,EAAe,EAAE,MAAA,EAAQ,KAAK,CAAA;AAAA,IAClD,WAAWG,kBAAA,CAAS,YAAY,EAC7B,OAAA,EAAQ,CACR,QAAQC,cAAA,CAAA,mBAAA,CAAwB;AAAA,GACrC;AAAA,EACA,CAAC,UAAU,CAACC,eAAA,CAAM,0BAA0B,CAAA,CAAE,EAAA,CAAG,KAAA,CAAM,UAAU,CAAC;AACpE","file":"mysql-media-AI6YK767.cjs","sourcesContent":["import {\n mysqlTable,\n varchar,\n text,\n int,\n datetime,\n index,\n} from \"drizzle-orm/mysql-core\";\nimport { sql } from \"drizzle-orm\";\n\nexport const media = mysqlTable(\n \"media\",\n {\n id: varchar(\"id\", { length: 64 }).primaryKey(),\n filename: varchar(\"filename\", { length: 255 }).notNull().unique(),\n title: varchar(\"title\", { length: 255 }),\n originalName: varchar(\"original_name\", { length: 255 }).notNull(),\n mimeType: varchar(\"mime_type\", { length: 100 }).notNull(),\n fileSize: int(\"file_size\").notNull(),\n width: int(\"width\"),\n height: int(\"height\"),\n url: text(\"url\").notNull().unique(),\n thumbnailUrl: text(\"thumbnail_url\"),\n folder: varchar(\"folder\", { length: 255 }),\n provider: varchar(\"provider\", { length: 50 }).notNull(),\n alt: text(\"alt\"),\n caption: text(\"caption\"),\n metadata: text(\"metadata\"),\n createdAt: datetime(\"created_at\")\n .notNull()\n .default(sql`(CURRENT_TIMESTAMP)`),\n updatedAt: datetime(\"updated_at\")\n .notNull()\n .default(sql`(CURRENT_TIMESTAMP)`),\n },\n (table) => [\n index(\"media_folder_idx\").on(table.folder),\n index(\"media_provider_idx\").on(table.provider),\n index(\"media_filename_idx\").on(table.filename),\n ],\n);\n\nexport const mediaFolders = mysqlTable(\n \"media_folders\",\n {\n path: varchar(\"path\", { length: 500 }).primaryKey(),\n name: varchar(\"name\", { length: 255 }).notNull(),\n parentPath: varchar(\"parent_path\", { length: 500 }),\n createdAt: datetime(\"created_at\")\n .notNull()\n .default(sql`(CURRENT_TIMESTAMP)`),\n },\n (table) => [index(\"media_folders_parent_idx\").on(table.parentPath)],\n);\n\nexport type Media = typeof media.$inferSelect;\nexport type NewMedia = typeof media.$inferInsert;\n"]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import './chunk-Z6ZWNWWR.js';
|
|
2
|
-
import { mysqlTable, datetime, text, varchar, int, index } from 'drizzle-orm/mysql-core';
|
|
3
|
-
import { sql } from 'drizzle-orm';
|
|
4
|
-
|
|
5
|
-
var media = mysqlTable(
|
|
6
|
-
"media",
|
|
7
|
-
{
|
|
8
|
-
id: varchar("id", { length: 64 }).primaryKey(),
|
|
9
|
-
filename: varchar("filename", { length: 255 }).notNull().unique(),
|
|
10
|
-
title: varchar("title", { length: 255 }),
|
|
11
|
-
originalName: varchar("original_name", { length: 255 }).notNull(),
|
|
12
|
-
mimeType: varchar("mime_type", { length: 100 }).notNull(),
|
|
13
|
-
fileSize: int("file_size").notNull(),
|
|
14
|
-
width: int("width"),
|
|
15
|
-
height: int("height"),
|
|
16
|
-
url: text("url").notNull().unique(),
|
|
17
|
-
thumbnailUrl: text("thumbnail_url"),
|
|
18
|
-
folder: varchar("folder", { length: 255 }),
|
|
19
|
-
provider: varchar("provider", { length: 50 }).notNull(),
|
|
20
|
-
alt: text("alt"),
|
|
21
|
-
caption: text("caption"),
|
|
22
|
-
metadata: text("metadata"),
|
|
23
|
-
createdAt: datetime("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
|
|
24
|
-
updatedAt: datetime("updated_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
|
|
25
|
-
},
|
|
26
|
-
(table) => [
|
|
27
|
-
index("media_folder_idx").on(table.folder),
|
|
28
|
-
index("media_provider_idx").on(table.provider),
|
|
29
|
-
index("media_filename_idx").on(table.filename)
|
|
30
|
-
]
|
|
31
|
-
);
|
|
32
|
-
var mediaFolders = mysqlTable(
|
|
33
|
-
"media_folders",
|
|
34
|
-
{
|
|
35
|
-
path: varchar("path", { length: 500 }).primaryKey(),
|
|
36
|
-
name: varchar("name", { length: 255 }).notNull(),
|
|
37
|
-
parentPath: varchar("parent_path", { length: 500 }),
|
|
38
|
-
createdAt: datetime("created_at").notNull().default(sql`(CURRENT_TIMESTAMP)`)
|
|
39
|
-
},
|
|
40
|
-
(table) => [index("media_folders_parent_idx").on(table.parentPath)]
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
export { media, mediaFolders };
|
|
44
|
-
//# sourceMappingURL=mysql-media-CDZUS7YX.js.map
|
|
45
|
-
//# sourceMappingURL=mysql-media-CDZUS7YX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/database/drizzle/schema/mysql-media.ts"],"names":[],"mappings":";;;;AAUO,IAAM,KAAA,GAAQ,UAAA;AAAA,EACnB,OAAA;AAAA,EACA;AAAA,IACE,EAAA,EAAI,QAAQ,IAAA,EAAM,EAAE,QAAQ,EAAA,EAAI,EAAE,UAAA,EAAW;AAAA,IAC7C,QAAA,EAAU,OAAA,CAAQ,UAAA,EAAY,EAAE,MAAA,EAAQ,KAAK,CAAA,CAAE,OAAA,EAAQ,CAAE,MAAA,EAAO;AAAA,IAChE,OAAO,OAAA,CAAQ,OAAA,EAAS,EAAE,MAAA,EAAQ,KAAK,CAAA;AAAA,IACvC,YAAA,EAAc,QAAQ,eAAA,EAAiB,EAAE,QAAQ,GAAA,EAAK,EAAE,OAAA,EAAQ;AAAA,IAChE,QAAA,EAAU,QAAQ,WAAA,EAAa,EAAE,QAAQ,GAAA,EAAK,EAAE,OAAA,EAAQ;AAAA,IACxD,QAAA,EAAU,GAAA,CAAI,WAAW,CAAA,CAAE,OAAA,EAAQ;AAAA,IACnC,KAAA,EAAO,IAAI,OAAO,CAAA;AAAA,IAClB,MAAA,EAAQ,IAAI,QAAQ,CAAA;AAAA,IACpB,KAAK,IAAA,CAAK,KAAK,CAAA,CAAE,OAAA,GAAU,MAAA,EAAO;AAAA,IAClC,YAAA,EAAc,KAAK,eAAe,CAAA;AAAA,IAClC,QAAQ,OAAA,CAAQ,QAAA,EAAU,EAAE,MAAA,EAAQ,KAAK,CAAA;AAAA,IACzC,QAAA,EAAU,QAAQ,UAAA,EAAY,EAAE,QAAQ,EAAA,EAAI,EAAE,OAAA,EAAQ;AAAA,IACtD,GAAA,EAAK,KAAK,KAAK,CAAA;AAAA,IACf,OAAA,EAAS,KAAK,SAAS,CAAA;AAAA,IACvB,QAAA,EAAU,KAAK,UAAU,CAAA;AAAA,IACzB,WAAW,QAAA,CAAS,YAAY,EAC7B,OAAA,EAAQ,CACR,QAAQ,GAAA,CAAA,mBAAA,CAAwB,CAAA;AAAA,IACnC,WAAW,QAAA,CAAS,YAAY,EAC7B,OAAA,EAAQ,CACR,QAAQ,GAAA,CAAA,mBAAA,CAAwB;AAAA,GACrC;AAAA,EACA,CAAC,KAAA,KAAU;AAAA,IACT,KAAA,CAAM,kBAAkB,CAAA,CAAE,EAAA,CAAG,MAAM,MAAM,CAAA;AAAA,IACzC,KAAA,CAAM,oBAAoB,CAAA,CAAE,EAAA,CAAG,MAAM,QAAQ,CAAA;AAAA,IAC7C,KAAA,CAAM,oBAAoB,CAAA,CAAE,EAAA,CAAG,MAAM,QAAQ;AAAA;AAEjD;AAEO,IAAM,YAAA,GAAe,UAAA;AAAA,EAC1B,eAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM,QAAQ,MAAA,EAAQ,EAAE,QAAQ,GAAA,EAAK,EAAE,UAAA,EAAW;AAAA,IAClD,IAAA,EAAM,QAAQ,MAAA,EAAQ,EAAE,QAAQ,GAAA,EAAK,EAAE,OAAA,EAAQ;AAAA,IAC/C,YAAY,OAAA,CAAQ,aAAA,EAAe,EAAE,MAAA,EAAQ,KAAK,CAAA;AAAA,IAClD,WAAW,QAAA,CAAS,YAAY,EAC7B,OAAA,EAAQ,CACR,QAAQ,GAAA,CAAA,mBAAA,CAAwB;AAAA,GACrC;AAAA,EACA,CAAC,UAAU,CAAC,KAAA,CAAM,0BAA0B,CAAA,CAAE,EAAA,CAAG,KAAA,CAAM,UAAU,CAAC;AACpE","file":"mysql-media-CDZUS7YX.js","sourcesContent":["import {\n mysqlTable,\n varchar,\n text,\n int,\n datetime,\n index,\n} from \"drizzle-orm/mysql-core\";\nimport { sql } from \"drizzle-orm\";\n\nexport const media = mysqlTable(\n \"media\",\n {\n id: varchar(\"id\", { length: 64 }).primaryKey(),\n filename: varchar(\"filename\", { length: 255 }).notNull().unique(),\n title: varchar(\"title\", { length: 255 }),\n originalName: varchar(\"original_name\", { length: 255 }).notNull(),\n mimeType: varchar(\"mime_type\", { length: 100 }).notNull(),\n fileSize: int(\"file_size\").notNull(),\n width: int(\"width\"),\n height: int(\"height\"),\n url: text(\"url\").notNull().unique(),\n thumbnailUrl: text(\"thumbnail_url\"),\n folder: varchar(\"folder\", { length: 255 }),\n provider: varchar(\"provider\", { length: 50 }).notNull(),\n alt: text(\"alt\"),\n caption: text(\"caption\"),\n metadata: text(\"metadata\"),\n createdAt: datetime(\"created_at\")\n .notNull()\n .default(sql`(CURRENT_TIMESTAMP)`),\n updatedAt: datetime(\"updated_at\")\n .notNull()\n .default(sql`(CURRENT_TIMESTAMP)`),\n },\n (table) => [\n index(\"media_folder_idx\").on(table.folder),\n index(\"media_provider_idx\").on(table.provider),\n index(\"media_filename_idx\").on(table.filename),\n ],\n);\n\nexport const mediaFolders = mysqlTable(\n \"media_folders\",\n {\n path: varchar(\"path\", { length: 500 }).primaryKey(),\n name: varchar(\"name\", { length: 255 }).notNull(),\n parentPath: varchar(\"parent_path\", { length: 500 }),\n createdAt: datetime(\"created_at\")\n .notNull()\n .default(sql`(CURRENT_TIMESTAMP)`),\n },\n (table) => [index(\"media_folders_parent_idx\").on(table.parentPath)],\n);\n\nexport type Media = typeof media.$inferSelect;\nexport type NewMedia = typeof media.$inferInsert;\n"]}
|
package/dist/rest/index.d.cts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Hono } from 'hono';
|
|
2
|
-
import { B as BaseAdapter, m as User } from '../types-J3R9nVsZ.cjs';
|
|
3
|
-
import { R as Registry } from '../index-DfO7G4kN.cjs';
|
|
4
|
-
import { i as createWebhookService } from '../WebhookService-AefJfqX0.cjs';
|
|
5
|
-
import '../types-VtjUxIMp.cjs';
|
|
6
|
-
import 'zod';
|
|
7
|
-
|
|
8
|
-
interface HonoAppOptions {
|
|
9
|
-
registry: Registry;
|
|
10
|
-
db: BaseAdapter;
|
|
11
|
-
authSecret?: string;
|
|
12
|
-
authAdapter?: any;
|
|
13
|
-
checkSession?: boolean;
|
|
14
|
-
user?: User;
|
|
15
|
-
req?: any;
|
|
16
|
-
tenantID?: string;
|
|
17
|
-
cors?: {
|
|
18
|
-
origins?: string[];
|
|
19
|
-
credentials?: boolean;
|
|
20
|
-
};
|
|
21
|
-
webhookService?: ReturnType<typeof createWebhookService>;
|
|
22
|
-
settings?: {
|
|
23
|
-
access?: {
|
|
24
|
-
enablePublicAccess?: boolean;
|
|
25
|
-
defaultCollectionAccess?: string;
|
|
26
|
-
apiAccess?: {
|
|
27
|
-
restEnabled?: boolean;
|
|
28
|
-
graphqlEnabled?: boolean;
|
|
29
|
-
trpcEnabled?: boolean;
|
|
30
|
-
websocketEnabled?: boolean;
|
|
31
|
-
requireAuth?: boolean;
|
|
32
|
-
cors?: {
|
|
33
|
-
allowedOrigins?: string[] | string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
rateLimiting?: {
|
|
37
|
-
enabled?: boolean;
|
|
38
|
-
maxRequests?: number;
|
|
39
|
-
windowMs?: number;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
declare function createHonoApp(options: HonoAppOptions): Hono;
|
|
45
|
-
declare function createRESTAPI(registry: Registry, db: BaseAdapter, options?: {
|
|
46
|
-
authSecret?: string;
|
|
47
|
-
user?: User;
|
|
48
|
-
req?: Request;
|
|
49
|
-
tenantID?: string;
|
|
50
|
-
cors?: {
|
|
51
|
-
origins?: string[];
|
|
52
|
-
credentials?: boolean;
|
|
53
|
-
};
|
|
54
|
-
webhookService?: ReturnType<typeof createWebhookService>;
|
|
55
|
-
}): Hono;
|
|
56
|
-
|
|
57
|
-
export { type HonoAppOptions, createHonoApp, createRESTAPI };
|
package/dist/rest/index.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Hono } from 'hono';
|
|
2
|
-
import { B as BaseAdapter, m as User } from '../types-Bs1up4yP.js';
|
|
3
|
-
import { R as Registry } from '../index-CLp-DRKA.js';
|
|
4
|
-
import { i as createWebhookService } from '../WebhookService-118ZTFis.js';
|
|
5
|
-
import '../types-VtjUxIMp.js';
|
|
6
|
-
import 'zod';
|
|
7
|
-
|
|
8
|
-
interface HonoAppOptions {
|
|
9
|
-
registry: Registry;
|
|
10
|
-
db: BaseAdapter;
|
|
11
|
-
authSecret?: string;
|
|
12
|
-
authAdapter?: any;
|
|
13
|
-
checkSession?: boolean;
|
|
14
|
-
user?: User;
|
|
15
|
-
req?: any;
|
|
16
|
-
tenantID?: string;
|
|
17
|
-
cors?: {
|
|
18
|
-
origins?: string[];
|
|
19
|
-
credentials?: boolean;
|
|
20
|
-
};
|
|
21
|
-
webhookService?: ReturnType<typeof createWebhookService>;
|
|
22
|
-
settings?: {
|
|
23
|
-
access?: {
|
|
24
|
-
enablePublicAccess?: boolean;
|
|
25
|
-
defaultCollectionAccess?: string;
|
|
26
|
-
apiAccess?: {
|
|
27
|
-
restEnabled?: boolean;
|
|
28
|
-
graphqlEnabled?: boolean;
|
|
29
|
-
trpcEnabled?: boolean;
|
|
30
|
-
websocketEnabled?: boolean;
|
|
31
|
-
requireAuth?: boolean;
|
|
32
|
-
cors?: {
|
|
33
|
-
allowedOrigins?: string[] | string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
rateLimiting?: {
|
|
37
|
-
enabled?: boolean;
|
|
38
|
-
maxRequests?: number;
|
|
39
|
-
windowMs?: number;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
declare function createHonoApp(options: HonoAppOptions): Hono;
|
|
45
|
-
declare function createRESTAPI(registry: Registry, db: BaseAdapter, options?: {
|
|
46
|
-
authSecret?: string;
|
|
47
|
-
user?: User;
|
|
48
|
-
req?: Request;
|
|
49
|
-
tenantID?: string;
|
|
50
|
-
cors?: {
|
|
51
|
-
origins?: string[];
|
|
52
|
-
credentials?: boolean;
|
|
53
|
-
};
|
|
54
|
-
webhookService?: ReturnType<typeof createWebhookService>;
|
|
55
|
-
}): Hono;
|
|
56
|
-
|
|
57
|
-
export { type HonoAppOptions, createHonoApp, createRESTAPI };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { C as CollectionConfig, G as GlobalConfig } from '../types-J3R9nVsZ.cjs';
|
|
2
|
-
import '../types-VtjUxIMp.cjs';
|
|
3
|
-
|
|
4
|
-
declare const minimalCollections: Record<string, CollectionConfig>;
|
|
5
|
-
|
|
6
|
-
declare const blogCollections: Record<string, CollectionConfig>;
|
|
7
|
-
declare const blogGlobals: GlobalConfig[];
|
|
8
|
-
|
|
9
|
-
declare const ecommerceCollections: Record<string, CollectionConfig>;
|
|
10
|
-
declare const ecommerceGlobals: GlobalConfig[];
|
|
11
|
-
|
|
12
|
-
declare const kitchenSinkCollections: Record<string, CollectionConfig>;
|
|
13
|
-
|
|
14
|
-
declare const authCollections: {
|
|
15
|
-
users: CollectionConfig;
|
|
16
|
-
audit_logs: CollectionConfig;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
declare const mediaCollection: CollectionConfig;
|
|
20
|
-
declare const mediaCollections: CollectionConfig[];
|
|
21
|
-
|
|
22
|
-
declare const siteSettingsGlobal: GlobalConfig;
|
|
23
|
-
|
|
24
|
-
declare const seoSettingsGlobal: GlobalConfig;
|
|
25
|
-
|
|
26
|
-
declare const socialSettingsGlobal: GlobalConfig;
|
|
27
|
-
|
|
28
|
-
declare const emailSettingsGlobal: GlobalConfig;
|
|
29
|
-
|
|
30
|
-
declare const storageSettingsGlobal: GlobalConfig;
|
|
31
|
-
|
|
32
|
-
declare const accessSettingsGlobal: GlobalConfig;
|
|
33
|
-
|
|
34
|
-
declare const storeSettingsGlobal: GlobalConfig;
|
|
35
|
-
|
|
36
|
-
declare const paymentSettingsGlobal: GlobalConfig;
|
|
37
|
-
|
|
38
|
-
declare const allSettingsGlobals: GlobalConfig[];
|
|
39
|
-
declare const coreSettingsGlobals: GlobalConfig[];
|
|
40
|
-
declare const ecommerceSettingsGlobals: GlobalConfig[];
|
|
41
|
-
declare const settingsBySlug: Record<string, GlobalConfig>;
|
|
42
|
-
declare function getSettingsForTemplate(template: "minimal" | "blog" | "ecommerce" | "kitchen-sink"): GlobalConfig[];
|
|
43
|
-
|
|
44
|
-
interface TemplateConfig {
|
|
45
|
-
collections?: CollectionConfig[];
|
|
46
|
-
globals?: GlobalConfig[];
|
|
47
|
-
}
|
|
48
|
-
type TemplateType = "minimal" | "blog" | "ecommerce" | "kitchen-sink";
|
|
49
|
-
interface CreateTemplateConfigOptions extends TemplateConfig {
|
|
50
|
-
template?: TemplateType;
|
|
51
|
-
collections?: CollectionConfig[];
|
|
52
|
-
globals?: GlobalConfig[];
|
|
53
|
-
includeMedia?: boolean;
|
|
54
|
-
includeSettings?: "all" | "core" | "ecommerce" | "site" | "seo" | "social" | "email" | "storage" | "access" | "store" | "payments" | string[];
|
|
55
|
-
excludeSettings?: string[];
|
|
56
|
-
}
|
|
57
|
-
declare function createTemplateConfig(options: CreateTemplateConfigOptions): TemplateConfig;
|
|
58
|
-
|
|
59
|
-
export { type CreateTemplateConfigOptions, type TemplateConfig, type TemplateType, accessSettingsGlobal, allSettingsGlobals, authCollections, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, ecommerceSettingsGlobals, emailSettingsGlobal, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, minimalCollections, paymentSettingsGlobal, seoSettingsGlobal, settingsBySlug, siteSettingsGlobal, socialSettingsGlobal, storageSettingsGlobal, storeSettingsGlobal };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { C as CollectionConfig, G as GlobalConfig } from '../types-Bs1up4yP.js';
|
|
2
|
-
import '../types-VtjUxIMp.js';
|
|
3
|
-
|
|
4
|
-
declare const minimalCollections: Record<string, CollectionConfig>;
|
|
5
|
-
|
|
6
|
-
declare const blogCollections: Record<string, CollectionConfig>;
|
|
7
|
-
declare const blogGlobals: GlobalConfig[];
|
|
8
|
-
|
|
9
|
-
declare const ecommerceCollections: Record<string, CollectionConfig>;
|
|
10
|
-
declare const ecommerceGlobals: GlobalConfig[];
|
|
11
|
-
|
|
12
|
-
declare const kitchenSinkCollections: Record<string, CollectionConfig>;
|
|
13
|
-
|
|
14
|
-
declare const authCollections: {
|
|
15
|
-
users: CollectionConfig;
|
|
16
|
-
audit_logs: CollectionConfig;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
declare const mediaCollection: CollectionConfig;
|
|
20
|
-
declare const mediaCollections: CollectionConfig[];
|
|
21
|
-
|
|
22
|
-
declare const siteSettingsGlobal: GlobalConfig;
|
|
23
|
-
|
|
24
|
-
declare const seoSettingsGlobal: GlobalConfig;
|
|
25
|
-
|
|
26
|
-
declare const socialSettingsGlobal: GlobalConfig;
|
|
27
|
-
|
|
28
|
-
declare const emailSettingsGlobal: GlobalConfig;
|
|
29
|
-
|
|
30
|
-
declare const storageSettingsGlobal: GlobalConfig;
|
|
31
|
-
|
|
32
|
-
declare const accessSettingsGlobal: GlobalConfig;
|
|
33
|
-
|
|
34
|
-
declare const storeSettingsGlobal: GlobalConfig;
|
|
35
|
-
|
|
36
|
-
declare const paymentSettingsGlobal: GlobalConfig;
|
|
37
|
-
|
|
38
|
-
declare const allSettingsGlobals: GlobalConfig[];
|
|
39
|
-
declare const coreSettingsGlobals: GlobalConfig[];
|
|
40
|
-
declare const ecommerceSettingsGlobals: GlobalConfig[];
|
|
41
|
-
declare const settingsBySlug: Record<string, GlobalConfig>;
|
|
42
|
-
declare function getSettingsForTemplate(template: "minimal" | "blog" | "ecommerce" | "kitchen-sink"): GlobalConfig[];
|
|
43
|
-
|
|
44
|
-
interface TemplateConfig {
|
|
45
|
-
collections?: CollectionConfig[];
|
|
46
|
-
globals?: GlobalConfig[];
|
|
47
|
-
}
|
|
48
|
-
type TemplateType = "minimal" | "blog" | "ecommerce" | "kitchen-sink";
|
|
49
|
-
interface CreateTemplateConfigOptions extends TemplateConfig {
|
|
50
|
-
template?: TemplateType;
|
|
51
|
-
collections?: CollectionConfig[];
|
|
52
|
-
globals?: GlobalConfig[];
|
|
53
|
-
includeMedia?: boolean;
|
|
54
|
-
includeSettings?: "all" | "core" | "ecommerce" | "site" | "seo" | "social" | "email" | "storage" | "access" | "store" | "payments" | string[];
|
|
55
|
-
excludeSettings?: string[];
|
|
56
|
-
}
|
|
57
|
-
declare function createTemplateConfig(options: CreateTemplateConfigOptions): TemplateConfig;
|
|
58
|
-
|
|
59
|
-
export { type CreateTemplateConfigOptions, type TemplateConfig, type TemplateType, accessSettingsGlobal, allSettingsGlobals, authCollections, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, ecommerceSettingsGlobals, emailSettingsGlobal, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, minimalCollections, paymentSettingsGlobal, seoSettingsGlobal, settingsBySlug, siteSettingsGlobal, socialSettingsGlobal, storageSettingsGlobal, storeSettingsGlobal };
|
package/dist/trpc/index.d.cts
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { B as BaseAdapter, R as Request, m as User, b as FindResult } from '../types-J3R9nVsZ.cjs';
|
|
2
|
-
import { i as createWebhookService } from '../WebhookService-AefJfqX0.cjs';
|
|
3
|
-
import '../types-VtjUxIMp.cjs';
|
|
4
|
-
|
|
5
|
-
interface ApiKeyContext {
|
|
6
|
-
userId: string;
|
|
7
|
-
user: Partial<User>;
|
|
8
|
-
permissions: string[];
|
|
9
|
-
apiKeyId: string;
|
|
10
|
-
tenantId?: string;
|
|
11
|
-
role?: string;
|
|
12
|
-
}
|
|
13
|
-
interface KyroContext {
|
|
14
|
-
db: BaseAdapter;
|
|
15
|
-
registry: any;
|
|
16
|
-
user?: User;
|
|
17
|
-
tenantID?: string;
|
|
18
|
-
req: Request;
|
|
19
|
-
apiKey?: ApiKeyContext;
|
|
20
|
-
webhookService?: ReturnType<typeof createWebhookService>;
|
|
21
|
-
settings?: Record<string, any>;
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
}
|
|
24
|
-
declare function createContext(options: {
|
|
25
|
-
db: BaseAdapter;
|
|
26
|
-
registry: any;
|
|
27
|
-
req: Request;
|
|
28
|
-
user?: User;
|
|
29
|
-
tenantID?: string;
|
|
30
|
-
settings?: Record<string, any>;
|
|
31
|
-
}): Promise<KyroContext>;
|
|
32
|
-
|
|
33
|
-
declare function createDynamicRouter(ctx: KyroContext): Record<string, any>;
|
|
34
|
-
interface KyroRouter {
|
|
35
|
-
[collectionSlug: string]: {
|
|
36
|
-
find: (input: {
|
|
37
|
-
where?: Record<string, any>;
|
|
38
|
-
sort?: string;
|
|
39
|
-
limit?: number;
|
|
40
|
-
page?: number;
|
|
41
|
-
depth?: number;
|
|
42
|
-
select?: string[];
|
|
43
|
-
}) => Promise<{
|
|
44
|
-
docs: any[];
|
|
45
|
-
totalDocs: number;
|
|
46
|
-
limit: number;
|
|
47
|
-
totalPages: number;
|
|
48
|
-
page: number;
|
|
49
|
-
pagingCounter: number;
|
|
50
|
-
hasPrevPage: boolean;
|
|
51
|
-
hasNextPage: boolean;
|
|
52
|
-
prevPage: number | null;
|
|
53
|
-
nextPage: number | null;
|
|
54
|
-
}>;
|
|
55
|
-
findByID: (input: {
|
|
56
|
-
id: string;
|
|
57
|
-
depth?: number;
|
|
58
|
-
select?: string[];
|
|
59
|
-
}) => Promise<any>;
|
|
60
|
-
create: (input: {
|
|
61
|
-
data: Record<string, any>;
|
|
62
|
-
depth?: number;
|
|
63
|
-
select?: string[];
|
|
64
|
-
}) => Promise<{
|
|
65
|
-
doc: any;
|
|
66
|
-
}>;
|
|
67
|
-
update: (input: {
|
|
68
|
-
id: string;
|
|
69
|
-
data: Record<string, any>;
|
|
70
|
-
depth?: number;
|
|
71
|
-
select?: string[];
|
|
72
|
-
}) => Promise<{
|
|
73
|
-
doc: any;
|
|
74
|
-
}>;
|
|
75
|
-
delete: (input: {
|
|
76
|
-
id: string;
|
|
77
|
-
}) => Promise<{
|
|
78
|
-
doc: any;
|
|
79
|
-
message: string;
|
|
80
|
-
}>;
|
|
81
|
-
count: (input: {
|
|
82
|
-
where?: Record<string, any>;
|
|
83
|
-
}) => Promise<{
|
|
84
|
-
totalDocs: number;
|
|
85
|
-
}>;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
declare function createKyroServer(ctx: KyroContext): KyroRouter;
|
|
89
|
-
|
|
90
|
-
declare function createFindProcedure(ctx: KyroContext): (input: {
|
|
91
|
-
collection: string;
|
|
92
|
-
where?: Record<string, any>;
|
|
93
|
-
sort?: string;
|
|
94
|
-
limit?: number;
|
|
95
|
-
page?: number;
|
|
96
|
-
depth?: number;
|
|
97
|
-
select?: string[];
|
|
98
|
-
}) => Promise<FindResult<unknown>>;
|
|
99
|
-
declare function createFindByIDProcedure(ctx: KyroContext): (input: {
|
|
100
|
-
collection: string;
|
|
101
|
-
id: string;
|
|
102
|
-
depth?: number;
|
|
103
|
-
select?: string[];
|
|
104
|
-
}) => Promise<{}>;
|
|
105
|
-
declare function createCreateProcedure(ctx: KyroContext): (input: {
|
|
106
|
-
collection: string;
|
|
107
|
-
data: Record<string, any>;
|
|
108
|
-
depth?: number;
|
|
109
|
-
select?: string[];
|
|
110
|
-
}) => Promise<{
|
|
111
|
-
doc: unknown;
|
|
112
|
-
}>;
|
|
113
|
-
declare function createUpdateProcedure(ctx: KyroContext): (input: {
|
|
114
|
-
collection: string;
|
|
115
|
-
id: string;
|
|
116
|
-
data: Record<string, any>;
|
|
117
|
-
depth?: number;
|
|
118
|
-
select?: string[];
|
|
119
|
-
}) => Promise<{
|
|
120
|
-
doc: unknown;
|
|
121
|
-
}>;
|
|
122
|
-
declare function createDeleteProcedure(ctx: KyroContext): (input: {
|
|
123
|
-
collection: string;
|
|
124
|
-
id: string;
|
|
125
|
-
}) => Promise<{
|
|
126
|
-
doc: unknown;
|
|
127
|
-
message: string;
|
|
128
|
-
}>;
|
|
129
|
-
declare function createCountProcedure(ctx: KyroContext): (input: {
|
|
130
|
-
collection: string;
|
|
131
|
-
where?: Record<string, any>;
|
|
132
|
-
}) => Promise<{
|
|
133
|
-
totalDocs: number;
|
|
134
|
-
}>;
|
|
135
|
-
|
|
136
|
-
export { type KyroContext, type KyroRouter, createContext, createCountProcedure, createCreateProcedure, createDeleteProcedure, createDynamicRouter, createFindByIDProcedure, createFindProcedure, createKyroServer, createUpdateProcedure };
|