@skravets/eapi 0.0.22 → 0.0.24
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/api-types.d.cts +53 -1
- package/dist/api-types.d.ts +53 -1
- package/dist/index.cjs +14 -0
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +14 -0
- package/package.json +1 -1
package/dist/api-types.d.cts
CHANGED
|
@@ -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
|
+
/** Get rank chats */
|
|
52
|
+
post: operations["chats.rankChats"];
|
|
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-
|
|
136
|
+
* @example 2025-10-23T19:43:32.038Z
|
|
133
137
|
*/
|
|
134
138
|
message_created_at: string;
|
|
135
139
|
/** @example 123 */
|
|
@@ -164,6 +168,16 @@ interface components {
|
|
|
164
168
|
* }
|
|
165
169
|
*/
|
|
166
170
|
cursor?: components["schemas"]["ICursor"];
|
|
171
|
+
/**
|
|
172
|
+
* @description Year to get messages from
|
|
173
|
+
* @example 2025
|
|
174
|
+
*/
|
|
175
|
+
year?: number;
|
|
176
|
+
/**
|
|
177
|
+
* @description Month to get messages from
|
|
178
|
+
* @example 1
|
|
179
|
+
*/
|
|
180
|
+
month?: number;
|
|
167
181
|
};
|
|
168
182
|
IJoin: {
|
|
169
183
|
/**
|
|
@@ -236,6 +250,15 @@ interface components {
|
|
|
236
250
|
*/
|
|
237
251
|
accountId: number;
|
|
238
252
|
};
|
|
253
|
+
IRankChatsReq: {
|
|
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>;
|
|
239
262
|
/** @description Which fields of chat to return */
|
|
240
263
|
ChatData: {
|
|
241
264
|
/** @default false */
|
|
@@ -644,6 +667,35 @@ interface operations {
|
|
|
644
667
|
};
|
|
645
668
|
};
|
|
646
669
|
};
|
|
670
|
+
"chats.rankChats": {
|
|
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"]["IRankChatsReq"];
|
|
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
|
+
};
|
|
647
699
|
"subscriptions.upsert": {
|
|
648
700
|
parameters: {
|
|
649
701
|
header: {
|
package/dist/api-types.d.ts
CHANGED
|
@@ -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
|
+
/** Get rank chats */
|
|
52
|
+
post: operations["chats.rankChats"];
|
|
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-
|
|
136
|
+
* @example 2025-10-23T19:43:32.038Z
|
|
133
137
|
*/
|
|
134
138
|
message_created_at: string;
|
|
135
139
|
/** @example 123 */
|
|
@@ -164,6 +168,16 @@ interface components {
|
|
|
164
168
|
* }
|
|
165
169
|
*/
|
|
166
170
|
cursor?: components["schemas"]["ICursor"];
|
|
171
|
+
/**
|
|
172
|
+
* @description Year to get messages from
|
|
173
|
+
* @example 2025
|
|
174
|
+
*/
|
|
175
|
+
year?: number;
|
|
176
|
+
/**
|
|
177
|
+
* @description Month to get messages from
|
|
178
|
+
* @example 1
|
|
179
|
+
*/
|
|
180
|
+
month?: number;
|
|
167
181
|
};
|
|
168
182
|
IJoin: {
|
|
169
183
|
/**
|
|
@@ -236,6 +250,15 @@ interface components {
|
|
|
236
250
|
*/
|
|
237
251
|
accountId: number;
|
|
238
252
|
};
|
|
253
|
+
IRankChatsReq: {
|
|
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>;
|
|
239
262
|
/** @description Which fields of chat to return */
|
|
240
263
|
ChatData: {
|
|
241
264
|
/** @default false */
|
|
@@ -644,6 +667,35 @@ interface operations {
|
|
|
644
667
|
};
|
|
645
668
|
};
|
|
646
669
|
};
|
|
670
|
+
"chats.rankChats": {
|
|
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"]["IRankChatsReq"];
|
|
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
|
+
};
|
|
647
699
|
"subscriptions.upsert": {
|
|
648
700
|
parameters: {
|
|
649
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 Get rank chats
|
|
248
|
+
*
|
|
249
|
+
* [Documentation](.../chats/operation/chats.rankChats)
|
|
250
|
+
*/
|
|
251
|
+
rankChats: (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 Get rank chats
|
|
383
|
+
*
|
|
384
|
+
* [Documentation](.../chats/operation/chats.rankChats)
|
|
385
|
+
*/
|
|
386
|
+
rankChats: (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 Get rank chats
|
|
383
|
+
*
|
|
384
|
+
* [Documentation](.../chats/operation/chats.rankChats)
|
|
385
|
+
*/
|
|
386
|
+
rankChats: (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 Get rank chats
|
|
246
|
+
*
|
|
247
|
+
* [Documentation](.../chats/operation/chats.rankChats)
|
|
248
|
+
*/
|
|
249
|
+
rankChats: (body, options) => {
|
|
250
|
+
return this.request("/chats/search", body, {
|
|
251
|
+
method: "POST",
|
|
252
|
+
...options
|
|
253
|
+
});
|
|
240
254
|
}
|
|
241
255
|
};
|
|
242
256
|
/**
|