@skravets/eapi 0.0.11 → 0.0.12
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
|
@@ -35,6 +35,10 @@ interface paths {
|
|
|
35
35
|
/** Add task to send message */
|
|
36
36
|
post: operations["chats.send"];
|
|
37
37
|
};
|
|
38
|
+
"/chats/{chat}/delete/{externalId}": {
|
|
39
|
+
/** Add task to delete messages */
|
|
40
|
+
post: operations["chats.deleteMessages"];
|
|
41
|
+
};
|
|
38
42
|
"/subscriptions": {
|
|
39
43
|
/** Upsert subscription */
|
|
40
44
|
put: operations["subscriptions.upsert"];
|
|
@@ -61,7 +65,7 @@ interface components {
|
|
|
61
65
|
channel_id: number;
|
|
62
66
|
/**
|
|
63
67
|
* Format: date-time
|
|
64
|
-
* @example 2025-08-
|
|
68
|
+
* @example 2025-08-25T12:12:30.286Z
|
|
65
69
|
*/
|
|
66
70
|
message_created_at: string;
|
|
67
71
|
/** @example 123 */
|
|
@@ -146,6 +150,22 @@ interface components {
|
|
|
146
150
|
*/
|
|
147
151
|
webhookUrl: string;
|
|
148
152
|
};
|
|
153
|
+
IDeleteMessage: {
|
|
154
|
+
/**
|
|
155
|
+
* @description Message ids to delete
|
|
156
|
+
* @example [
|
|
157
|
+
* 1,
|
|
158
|
+
* 2,
|
|
159
|
+
* 3
|
|
160
|
+
* ]
|
|
161
|
+
*/
|
|
162
|
+
messageIds: number[];
|
|
163
|
+
/**
|
|
164
|
+
* @description Account id
|
|
165
|
+
* @example 1
|
|
166
|
+
*/
|
|
167
|
+
accountId: number;
|
|
168
|
+
};
|
|
149
169
|
/** @description Which fields of chat to return */
|
|
150
170
|
ChatData: {
|
|
151
171
|
/** @default false */
|
|
@@ -476,6 +496,38 @@ interface operations {
|
|
|
476
496
|
};
|
|
477
497
|
};
|
|
478
498
|
};
|
|
499
|
+
"chats.deleteMessages": {
|
|
500
|
+
parameters: {
|
|
501
|
+
header: {
|
|
502
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
503
|
+
Authorization: string;
|
|
504
|
+
};
|
|
505
|
+
path: {
|
|
506
|
+
/** @description External id of the task */
|
|
507
|
+
externalId: string;
|
|
508
|
+
/** @description `Chat id` or `username` */
|
|
509
|
+
chat: number | string;
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
requestBody: {
|
|
513
|
+
content: {
|
|
514
|
+
"application/json": components["schemas"]["IDeleteMessage"];
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
responses: {
|
|
518
|
+
200: {
|
|
519
|
+
headers: {
|
|
520
|
+
[name: string]: unknown;
|
|
521
|
+
};
|
|
522
|
+
};
|
|
523
|
+
/** @description Unauthorized */
|
|
524
|
+
401: {
|
|
525
|
+
headers: {
|
|
526
|
+
[name: string]: unknown;
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
};
|
|
530
|
+
};
|
|
479
531
|
"subscriptions.upsert": {
|
|
480
532
|
parameters: {
|
|
481
533
|
header: {
|
package/dist/api-types.d.ts
CHANGED
|
@@ -35,6 +35,10 @@ interface paths {
|
|
|
35
35
|
/** Add task to send message */
|
|
36
36
|
post: operations["chats.send"];
|
|
37
37
|
};
|
|
38
|
+
"/chats/{chat}/delete/{externalId}": {
|
|
39
|
+
/** Add task to delete messages */
|
|
40
|
+
post: operations["chats.deleteMessages"];
|
|
41
|
+
};
|
|
38
42
|
"/subscriptions": {
|
|
39
43
|
/** Upsert subscription */
|
|
40
44
|
put: operations["subscriptions.upsert"];
|
|
@@ -61,7 +65,7 @@ interface components {
|
|
|
61
65
|
channel_id: number;
|
|
62
66
|
/**
|
|
63
67
|
* Format: date-time
|
|
64
|
-
* @example 2025-08-
|
|
68
|
+
* @example 2025-08-25T12:12:30.286Z
|
|
65
69
|
*/
|
|
66
70
|
message_created_at: string;
|
|
67
71
|
/** @example 123 */
|
|
@@ -146,6 +150,22 @@ interface components {
|
|
|
146
150
|
*/
|
|
147
151
|
webhookUrl: string;
|
|
148
152
|
};
|
|
153
|
+
IDeleteMessage: {
|
|
154
|
+
/**
|
|
155
|
+
* @description Message ids to delete
|
|
156
|
+
* @example [
|
|
157
|
+
* 1,
|
|
158
|
+
* 2,
|
|
159
|
+
* 3
|
|
160
|
+
* ]
|
|
161
|
+
*/
|
|
162
|
+
messageIds: number[];
|
|
163
|
+
/**
|
|
164
|
+
* @description Account id
|
|
165
|
+
* @example 1
|
|
166
|
+
*/
|
|
167
|
+
accountId: number;
|
|
168
|
+
};
|
|
149
169
|
/** @description Which fields of chat to return */
|
|
150
170
|
ChatData: {
|
|
151
171
|
/** @default false */
|
|
@@ -476,6 +496,38 @@ interface operations {
|
|
|
476
496
|
};
|
|
477
497
|
};
|
|
478
498
|
};
|
|
499
|
+
"chats.deleteMessages": {
|
|
500
|
+
parameters: {
|
|
501
|
+
header: {
|
|
502
|
+
/** @description `Basic token`, where token is `id:secret` base64 encoded */
|
|
503
|
+
Authorization: string;
|
|
504
|
+
};
|
|
505
|
+
path: {
|
|
506
|
+
/** @description External id of the task */
|
|
507
|
+
externalId: string;
|
|
508
|
+
/** @description `Chat id` or `username` */
|
|
509
|
+
chat: number | string;
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
requestBody: {
|
|
513
|
+
content: {
|
|
514
|
+
"application/json": components["schemas"]["IDeleteMessage"];
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
responses: {
|
|
518
|
+
200: {
|
|
519
|
+
headers: {
|
|
520
|
+
[name: string]: unknown;
|
|
521
|
+
};
|
|
522
|
+
};
|
|
523
|
+
/** @description Unauthorized */
|
|
524
|
+
401: {
|
|
525
|
+
headers: {
|
|
526
|
+
[name: string]: unknown;
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
};
|
|
530
|
+
};
|
|
479
531
|
"subscriptions.upsert": {
|
|
480
532
|
parameters: {
|
|
481
533
|
header: {
|
package/dist/index.cjs
CHANGED
|
@@ -192,6 +192,20 @@ class EApi {
|
|
|
192
192
|
method: "POST",
|
|
193
193
|
...options
|
|
194
194
|
});
|
|
195
|
+
},
|
|
196
|
+
/**
|
|
197
|
+
*
|
|
198
|
+
*
|
|
199
|
+
* @tags chats
|
|
200
|
+
* @summary Add task to delete messages
|
|
201
|
+
*
|
|
202
|
+
* [Documentation](.../chats/operation/chats.deleteMessages)
|
|
203
|
+
*/
|
|
204
|
+
deleteMessages: (externalId, chat, body, options) => {
|
|
205
|
+
return this.request(`/chats/${chat}/delete/${externalId}`, body, {
|
|
206
|
+
method: "POST",
|
|
207
|
+
...options
|
|
208
|
+
});
|
|
195
209
|
}
|
|
196
210
|
};
|
|
197
211
|
/**
|
package/dist/index.d.cts
CHANGED
|
@@ -253,6 +253,15 @@ declare class EApi {
|
|
|
253
253
|
* [Documentation](.../chats/operation/chats.send)
|
|
254
254
|
*/
|
|
255
255
|
send: (externalId: paths["/chats/{chat}/send/{externalId}"]["post"]["parameters"]["path"]["externalId"], chat: paths["/chats/{chat}/send/{externalId}"]["post"]["parameters"]["path"]["chat"], body: GetRequestBody<"/chats/{chat}/send/{externalId}", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/{chat}/send/{externalId}", "post">>;
|
|
256
|
+
/**
|
|
257
|
+
*
|
|
258
|
+
*
|
|
259
|
+
* @tags chats
|
|
260
|
+
* @summary Add task to delete messages
|
|
261
|
+
*
|
|
262
|
+
* [Documentation](.../chats/operation/chats.deleteMessages)
|
|
263
|
+
*/
|
|
264
|
+
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">>;
|
|
256
265
|
};
|
|
257
266
|
/**
|
|
258
267
|
* @tags subscriptions
|
package/dist/index.d.ts
CHANGED
|
@@ -253,6 +253,15 @@ declare class EApi {
|
|
|
253
253
|
* [Documentation](.../chats/operation/chats.send)
|
|
254
254
|
*/
|
|
255
255
|
send: (externalId: paths["/chats/{chat}/send/{externalId}"]["post"]["parameters"]["path"]["externalId"], chat: paths["/chats/{chat}/send/{externalId}"]["post"]["parameters"]["path"]["chat"], body: GetRequestBody<"/chats/{chat}/send/{externalId}", "post">, options?: RequestOptions) => Promise<GetResponse<"/chats/{chat}/send/{externalId}", "post">>;
|
|
256
|
+
/**
|
|
257
|
+
*
|
|
258
|
+
*
|
|
259
|
+
* @tags chats
|
|
260
|
+
* @summary Add task to delete messages
|
|
261
|
+
*
|
|
262
|
+
* [Documentation](.../chats/operation/chats.deleteMessages)
|
|
263
|
+
*/
|
|
264
|
+
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">>;
|
|
256
265
|
};
|
|
257
266
|
/**
|
|
258
267
|
* @tags subscriptions
|
package/dist/index.js
CHANGED
|
@@ -190,6 +190,20 @@ class EApi {
|
|
|
190
190
|
method: "POST",
|
|
191
191
|
...options
|
|
192
192
|
});
|
|
193
|
+
},
|
|
194
|
+
/**
|
|
195
|
+
*
|
|
196
|
+
*
|
|
197
|
+
* @tags chats
|
|
198
|
+
* @summary Add task to delete messages
|
|
199
|
+
*
|
|
200
|
+
* [Documentation](.../chats/operation/chats.deleteMessages)
|
|
201
|
+
*/
|
|
202
|
+
deleteMessages: (externalId, chat, body, options) => {
|
|
203
|
+
return this.request(`/chats/${chat}/delete/${externalId}`, body, {
|
|
204
|
+
method: "POST",
|
|
205
|
+
...options
|
|
206
|
+
});
|
|
193
207
|
}
|
|
194
208
|
};
|
|
195
209
|
/**
|