@infuro/cms-core 1.0.7 → 1.0.9
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/admin.cjs +270 -41
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.d.cts +3 -1
- package/dist/admin.d.ts +3 -1
- package/dist/admin.js +304 -75
- package/dist/admin.js.map +1 -1
- package/dist/api.cjs +131 -1
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.cts +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +131 -1
- package/dist/api.js.map +1 -1
- package/dist/{index-BPnATEXW.d.cts → index-P5ajDo8-.d.cts} +9 -0
- package/dist/{index-BPnATEXW.d.ts → index-P5ajDo8-.d.ts} +9 -0
- package/dist/index.cjs +699 -263
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +91 -3
- package/dist/index.d.ts +91 -3
- package/dist/index.js +682 -252
- package/dist/index.js.map +1 -1
- package/dist/migrations/1772178563555-ChatAndKnowledgeBase.ts +39 -0
- package/dist/migrations/1772178563556-KnowledgeBaseVector.ts +16 -0
- package/package.json +1 -1
|
@@ -213,6 +213,13 @@ declare function createSettingsApiHandlers(config: SettingsApiConfig): {
|
|
|
213
213
|
GET(req: Request, group: string): Promise<Response>;
|
|
214
214
|
PUT(req: Request, group: string): Promise<Response>;
|
|
215
215
|
};
|
|
216
|
+
interface ChatApiConfig extends CmsHandlersBase {
|
|
217
|
+
dataSource: DataSource;
|
|
218
|
+
entityMap: EntityMap;
|
|
219
|
+
getCms: () => Promise<{
|
|
220
|
+
getPlugin: (name: string) => unknown;
|
|
221
|
+
}>;
|
|
222
|
+
}
|
|
216
223
|
|
|
217
224
|
/**
|
|
218
225
|
* Single CMS API handler: dashboard, analytics, upload, blog/form by slug, users API, user auth, CRUD. Mount once (e.g. app/api/[[...path]]/route.ts).
|
|
@@ -258,6 +265,8 @@ interface CmsApiHandlerConfig {
|
|
|
258
265
|
userProfile?: UserProfileConfig;
|
|
259
266
|
/** GET/PUT /api/settings/:group */
|
|
260
267
|
settings?: SettingsApiConfig;
|
|
268
|
+
/** POST /api/chat/identify, GET /api/chat/conversations/:id/messages, POST /api/chat/messages */
|
|
269
|
+
chat?: ChatApiConfig;
|
|
261
270
|
}
|
|
262
271
|
declare function createCmsApiHandler(config: CmsApiHandlerConfig): {
|
|
263
272
|
handle(method: string, path: string[], req: Request): Promise<Response>;
|
|
@@ -213,6 +213,13 @@ declare function createSettingsApiHandlers(config: SettingsApiConfig): {
|
|
|
213
213
|
GET(req: Request, group: string): Promise<Response>;
|
|
214
214
|
PUT(req: Request, group: string): Promise<Response>;
|
|
215
215
|
};
|
|
216
|
+
interface ChatApiConfig extends CmsHandlersBase {
|
|
217
|
+
dataSource: DataSource;
|
|
218
|
+
entityMap: EntityMap;
|
|
219
|
+
getCms: () => Promise<{
|
|
220
|
+
getPlugin: (name: string) => unknown;
|
|
221
|
+
}>;
|
|
222
|
+
}
|
|
216
223
|
|
|
217
224
|
/**
|
|
218
225
|
* Single CMS API handler: dashboard, analytics, upload, blog/form by slug, users API, user auth, CRUD. Mount once (e.g. app/api/[[...path]]/route.ts).
|
|
@@ -258,6 +265,8 @@ interface CmsApiHandlerConfig {
|
|
|
258
265
|
userProfile?: UserProfileConfig;
|
|
259
266
|
/** GET/PUT /api/settings/:group */
|
|
260
267
|
settings?: SettingsApiConfig;
|
|
268
|
+
/** POST /api/chat/identify, GET /api/chat/conversations/:id/messages, POST /api/chat/messages */
|
|
269
|
+
chat?: ChatApiConfig;
|
|
261
270
|
}
|
|
262
271
|
declare function createCmsApiHandler(config: CmsApiHandlerConfig): {
|
|
263
272
|
handle(method: string, path: string[], req: Request): Promise<Response>;
|