@skravets/eapi 0.0.23 → 0.0.25

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.
@@ -47,6 +47,10 @@ interface paths {
47
47
  /** Add task to delete messages */
48
48
  post: operations["chats.deleteMessages"];
49
49
  };
50
+ "/chats/search": {
51
+ /** search chats */
52
+ post: operations["chats.search"];
53
+ };
50
54
  "/subscriptions": {
51
55
  /** Upsert subscription */
52
56
  put: operations["subscriptions.upsert"];
@@ -129,7 +133,7 @@ interface components {
129
133
  channel_id: number;
130
134
  /**
131
135
  * Format: date-time
132
- * @example 2025-10-22T18:13:48.155Z
136
+ * @example 2025-10-23T19:53:25.898Z
133
137
  */
134
138
  message_created_at: string;
135
139
  /** @example 123 */
@@ -246,6 +250,15 @@ interface components {
246
250
  */
247
251
  accountId: number;
248
252
  };
253
+ ISearchChatsReq: {
254
+ /** @description chats usernames to rank */
255
+ chats?: string[];
256
+ /** @description search query */
257
+ query?: string;
258
+ /** @description search embedding */
259
+ embedding?: number[];
260
+ };
261
+ SearchResult: Record<string, never>;
249
262
  /** @description Which fields of chat to return */
250
263
  ChatData: {
251
264
  /** @default false */
@@ -654,6 +667,35 @@ interface operations {
654
667
  };
655
668
  };
656
669
  };
670
+ "chats.search": {
671
+ parameters: {
672
+ header: {
673
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
674
+ Authorization: string;
675
+ };
676
+ };
677
+ requestBody: {
678
+ content: {
679
+ "application/json": components["schemas"]["ISearchChatsReq"];
680
+ };
681
+ };
682
+ responses: {
683
+ 200: {
684
+ headers: {
685
+ [name: string]: unknown;
686
+ };
687
+ content: {
688
+ "application/json": components["schemas"]["SearchResult"][];
689
+ };
690
+ };
691
+ /** @description Unauthorized */
692
+ 401: {
693
+ headers: {
694
+ [name: string]: unknown;
695
+ };
696
+ };
697
+ };
698
+ };
657
699
  "subscriptions.upsert": {
658
700
  parameters: {
659
701
  header: {
@@ -47,6 +47,10 @@ interface paths {
47
47
  /** Add task to delete messages */
48
48
  post: operations["chats.deleteMessages"];
49
49
  };
50
+ "/chats/search": {
51
+ /** search chats */
52
+ post: operations["chats.search"];
53
+ };
50
54
  "/subscriptions": {
51
55
  /** Upsert subscription */
52
56
  put: operations["subscriptions.upsert"];
@@ -129,7 +133,7 @@ interface components {
129
133
  channel_id: number;
130
134
  /**
131
135
  * Format: date-time
132
- * @example 2025-10-22T18:13:48.155Z
136
+ * @example 2025-10-23T19:53:25.898Z
133
137
  */
134
138
  message_created_at: string;
135
139
  /** @example 123 */
@@ -246,6 +250,15 @@ interface components {
246
250
  */
247
251
  accountId: number;
248
252
  };
253
+ ISearchChatsReq: {
254
+ /** @description chats usernames to rank */
255
+ chats?: string[];
256
+ /** @description search query */
257
+ query?: string;
258
+ /** @description search embedding */
259
+ embedding?: number[];
260
+ };
261
+ SearchResult: Record<string, never>;
249
262
  /** @description Which fields of chat to return */
250
263
  ChatData: {
251
264
  /** @default false */
@@ -654,6 +667,35 @@ interface operations {
654
667
  };
655
668
  };
656
669
  };
670
+ "chats.search": {
671
+ parameters: {
672
+ header: {
673
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
674
+ Authorization: string;
675
+ };
676
+ };
677
+ requestBody: {
678
+ content: {
679
+ "application/json": components["schemas"]["ISearchChatsReq"];
680
+ };
681
+ };
682
+ responses: {
683
+ 200: {
684
+ headers: {
685
+ [name: string]: unknown;
686
+ };
687
+ content: {
688
+ "application/json": components["schemas"]["SearchResult"][];
689
+ };
690
+ };
691
+ /** @description Unauthorized */
692
+ 401: {
693
+ headers: {
694
+ [name: string]: unknown;
695
+ };
696
+ };
697
+ };
698
+ };
657
699
  "subscriptions.upsert": {
658
700
  parameters: {
659
701
  header: {
package/dist/index.cjs CHANGED
@@ -239,6 +239,20 @@ class EApi {
239
239
  method: "POST",
240
240
  ...options
241
241
  });
242
+ },
243
+ /**
244
+ *
245
+ *
246
+ * @tags chats
247
+ * @summary search chats
248
+ *
249
+ * [Documentation](.../chats/operation/chats.search)
250
+ */
251
+ search: (body, options) => {
252
+ return this.request("/chats/search", body, {
253
+ method: "POST",
254
+ ...options
255
+ });
242
256
  }
243
257
  };
244
258
  /**
package/dist/index.d.cts CHANGED
@@ -375,6 +375,15 @@ declare class EApi {
375
375
  * [Documentation](.../chats/operation/chats.deleteMessages)
376
376
  */
377
377
  deleteMessages: (externalId: paths["/chats/{chat}/delete/{externalId}"]["post"]["parameters"]["path"]["externalId"], chat: paths["/chats/{chat}/delete/{externalId}"]["post"]["parameters"]["path"]["chat"], body: GetRequestBody<"/chats/{chat}/delete/{externalId}", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/{chat}/delete/{externalId}", "post">>;
378
+ /**
379
+ *
380
+ *
381
+ * @tags chats
382
+ * @summary search chats
383
+ *
384
+ * [Documentation](.../chats/operation/chats.search)
385
+ */
386
+ search: (body: GetRequestBody<"/chats/search", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/search", "post">>;
378
387
  };
379
388
  /**
380
389
  * @tags subscriptions
package/dist/index.d.ts CHANGED
@@ -375,6 +375,15 @@ declare class EApi {
375
375
  * [Documentation](.../chats/operation/chats.deleteMessages)
376
376
  */
377
377
  deleteMessages: (externalId: paths["/chats/{chat}/delete/{externalId}"]["post"]["parameters"]["path"]["externalId"], chat: paths["/chats/{chat}/delete/{externalId}"]["post"]["parameters"]["path"]["chat"], body: GetRequestBody<"/chats/{chat}/delete/{externalId}", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/{chat}/delete/{externalId}", "post">>;
378
+ /**
379
+ *
380
+ *
381
+ * @tags chats
382
+ * @summary search chats
383
+ *
384
+ * [Documentation](.../chats/operation/chats.search)
385
+ */
386
+ search: (body: GetRequestBody<"/chats/search", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/search", "post">>;
378
387
  };
379
388
  /**
380
389
  * @tags subscriptions
package/dist/index.js CHANGED
@@ -237,6 +237,20 @@ class EApi {
237
237
  method: "POST",
238
238
  ...options
239
239
  });
240
+ },
241
+ /**
242
+ *
243
+ *
244
+ * @tags chats
245
+ * @summary search chats
246
+ *
247
+ * [Documentation](.../chats/operation/chats.search)
248
+ */
249
+ search: (body, options) => {
250
+ return this.request("/chats/search", body, {
251
+ method: "POST",
252
+ ...options
253
+ });
240
254
  }
241
255
  };
242
256
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skravets/eapi",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",