@infuro/cms-core 1.0.7 → 1.0.8

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.
@@ -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>;