@skravets/eapi 0.0.56 → 0.0.57

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.
@@ -101,6 +101,14 @@ interface paths {
101
101
  /** Get common chats between account and user (async with webhook) */
102
102
  post: operations["accounts.getCommonChats"];
103
103
  };
104
+ "/send-tasks/cancel": {
105
+ /** Cancel send tasks by filter */
106
+ post: operations["sendTasks.cancel"];
107
+ };
108
+ "/send-tasks/restore": {
109
+ /** Restore cancelled send tasks by filter */
110
+ post: operations["sendTasks.restore"];
111
+ };
104
112
  }
105
113
  /**
106
114
  * Сгенерированные из OpenAPI типы для `components`
@@ -113,7 +121,7 @@ interface components {
113
121
  channel_id: number;
114
122
  /**
115
123
  * Format: date-time
116
- * @example 2026-02-20T13:43:55.470Z
124
+ * @example 2026-02-20T14:57:50.630Z
117
125
  */
118
126
  message_created_at: string;
119
127
  /** @example 123 */
@@ -877,6 +885,50 @@ interface components {
877
885
  */
878
886
  webhookUrl: string;
879
887
  };
888
+ SendTaskFilterDto: {
889
+ /**
890
+ * @description Filter by metadata key-value pairs
891
+ * @example {
892
+ * "agentId": 20
893
+ * }
894
+ */
895
+ metadata?: {
896
+ [key: string]: unknown;
897
+ };
898
+ /**
899
+ * @description Filter by chat ID
900
+ * @example -1001234567890
901
+ */
902
+ chatId?: number;
903
+ /**
904
+ * @description Filter by username
905
+ * @example somechannel
906
+ */
907
+ username?: string;
908
+ /**
909
+ * @description Filter by external ID
910
+ * @example ext-123
911
+ */
912
+ externalId?: string;
913
+ };
914
+ SendTaskFilterRequestDto: {
915
+ /** @description Send task filter */
916
+ filter: components["schemas"]["SendTaskFilterDto"];
917
+ };
918
+ CancelSendTasksResponseDto: {
919
+ /**
920
+ * @description Number of cancelled tasks
921
+ * @example 5
922
+ */
923
+ cancelledCount: number;
924
+ };
925
+ RestoreSendTasksResponseDto: {
926
+ /**
927
+ * @description Number of restored tasks
928
+ * @example 3
929
+ */
930
+ restoredCount: number;
931
+ };
880
932
  };
881
933
  }
882
934
  type $defs = Record<string, never>;
@@ -1619,6 +1671,90 @@ interface operations {
1619
1671
  };
1620
1672
  };
1621
1673
  };
1674
+ "sendTasks.cancel": {
1675
+ parameters: {
1676
+ header: {
1677
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1678
+ Authorization: string;
1679
+ };
1680
+ };
1681
+ requestBody: {
1682
+ content: {
1683
+ "application/json": components["schemas"]["SendTaskFilterRequestDto"];
1684
+ };
1685
+ };
1686
+ responses: {
1687
+ /** @description Tasks cancelled successfully */
1688
+ 200: {
1689
+ headers: {
1690
+ [name: string]: unknown;
1691
+ };
1692
+ content: {
1693
+ "application/json": components["schemas"]["CancelSendTasksResponseDto"];
1694
+ };
1695
+ };
1696
+ /** @description At least one filter field must be provided */
1697
+ 400: {
1698
+ headers: {
1699
+ [name: string]: unknown;
1700
+ };
1701
+ };
1702
+ /** @description Unauthorized */
1703
+ 401: {
1704
+ headers: {
1705
+ [name: string]: unknown;
1706
+ };
1707
+ };
1708
+ /** @description Farm processor not running */
1709
+ 503: {
1710
+ headers: {
1711
+ [name: string]: unknown;
1712
+ };
1713
+ };
1714
+ };
1715
+ };
1716
+ "sendTasks.restore": {
1717
+ parameters: {
1718
+ header: {
1719
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1720
+ Authorization: string;
1721
+ };
1722
+ };
1723
+ requestBody: {
1724
+ content: {
1725
+ "application/json": components["schemas"]["SendTaskFilterRequestDto"];
1726
+ };
1727
+ };
1728
+ responses: {
1729
+ /** @description Tasks restored successfully */
1730
+ 200: {
1731
+ headers: {
1732
+ [name: string]: unknown;
1733
+ };
1734
+ content: {
1735
+ "application/json": components["schemas"]["RestoreSendTasksResponseDto"];
1736
+ };
1737
+ };
1738
+ /** @description At least one filter field must be provided */
1739
+ 400: {
1740
+ headers: {
1741
+ [name: string]: unknown;
1742
+ };
1743
+ };
1744
+ /** @description Unauthorized */
1745
+ 401: {
1746
+ headers: {
1747
+ [name: string]: unknown;
1748
+ };
1749
+ };
1750
+ /** @description Farm processor not running */
1751
+ 503: {
1752
+ headers: {
1753
+ [name: string]: unknown;
1754
+ };
1755
+ };
1756
+ };
1757
+ };
1622
1758
  }
1623
1759
 
1624
1760
  export type { $defs, components, operations, paths };
@@ -101,6 +101,14 @@ interface paths {
101
101
  /** Get common chats between account and user (async with webhook) */
102
102
  post: operations["accounts.getCommonChats"];
103
103
  };
104
+ "/send-tasks/cancel": {
105
+ /** Cancel send tasks by filter */
106
+ post: operations["sendTasks.cancel"];
107
+ };
108
+ "/send-tasks/restore": {
109
+ /** Restore cancelled send tasks by filter */
110
+ post: operations["sendTasks.restore"];
111
+ };
104
112
  }
105
113
  /**
106
114
  * Сгенерированные из OpenAPI типы для `components`
@@ -113,7 +121,7 @@ interface components {
113
121
  channel_id: number;
114
122
  /**
115
123
  * Format: date-time
116
- * @example 2026-02-20T13:43:55.470Z
124
+ * @example 2026-02-20T14:57:50.630Z
117
125
  */
118
126
  message_created_at: string;
119
127
  /** @example 123 */
@@ -877,6 +885,50 @@ interface components {
877
885
  */
878
886
  webhookUrl: string;
879
887
  };
888
+ SendTaskFilterDto: {
889
+ /**
890
+ * @description Filter by metadata key-value pairs
891
+ * @example {
892
+ * "agentId": 20
893
+ * }
894
+ */
895
+ metadata?: {
896
+ [key: string]: unknown;
897
+ };
898
+ /**
899
+ * @description Filter by chat ID
900
+ * @example -1001234567890
901
+ */
902
+ chatId?: number;
903
+ /**
904
+ * @description Filter by username
905
+ * @example somechannel
906
+ */
907
+ username?: string;
908
+ /**
909
+ * @description Filter by external ID
910
+ * @example ext-123
911
+ */
912
+ externalId?: string;
913
+ };
914
+ SendTaskFilterRequestDto: {
915
+ /** @description Send task filter */
916
+ filter: components["schemas"]["SendTaskFilterDto"];
917
+ };
918
+ CancelSendTasksResponseDto: {
919
+ /**
920
+ * @description Number of cancelled tasks
921
+ * @example 5
922
+ */
923
+ cancelledCount: number;
924
+ };
925
+ RestoreSendTasksResponseDto: {
926
+ /**
927
+ * @description Number of restored tasks
928
+ * @example 3
929
+ */
930
+ restoredCount: number;
931
+ };
880
932
  };
881
933
  }
882
934
  type $defs = Record<string, never>;
@@ -1619,6 +1671,90 @@ interface operations {
1619
1671
  };
1620
1672
  };
1621
1673
  };
1674
+ "sendTasks.cancel": {
1675
+ parameters: {
1676
+ header: {
1677
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1678
+ Authorization: string;
1679
+ };
1680
+ };
1681
+ requestBody: {
1682
+ content: {
1683
+ "application/json": components["schemas"]["SendTaskFilterRequestDto"];
1684
+ };
1685
+ };
1686
+ responses: {
1687
+ /** @description Tasks cancelled successfully */
1688
+ 200: {
1689
+ headers: {
1690
+ [name: string]: unknown;
1691
+ };
1692
+ content: {
1693
+ "application/json": components["schemas"]["CancelSendTasksResponseDto"];
1694
+ };
1695
+ };
1696
+ /** @description At least one filter field must be provided */
1697
+ 400: {
1698
+ headers: {
1699
+ [name: string]: unknown;
1700
+ };
1701
+ };
1702
+ /** @description Unauthorized */
1703
+ 401: {
1704
+ headers: {
1705
+ [name: string]: unknown;
1706
+ };
1707
+ };
1708
+ /** @description Farm processor not running */
1709
+ 503: {
1710
+ headers: {
1711
+ [name: string]: unknown;
1712
+ };
1713
+ };
1714
+ };
1715
+ };
1716
+ "sendTasks.restore": {
1717
+ parameters: {
1718
+ header: {
1719
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1720
+ Authorization: string;
1721
+ };
1722
+ };
1723
+ requestBody: {
1724
+ content: {
1725
+ "application/json": components["schemas"]["SendTaskFilterRequestDto"];
1726
+ };
1727
+ };
1728
+ responses: {
1729
+ /** @description Tasks restored successfully */
1730
+ 200: {
1731
+ headers: {
1732
+ [name: string]: unknown;
1733
+ };
1734
+ content: {
1735
+ "application/json": components["schemas"]["RestoreSendTasksResponseDto"];
1736
+ };
1737
+ };
1738
+ /** @description At least one filter field must be provided */
1739
+ 400: {
1740
+ headers: {
1741
+ [name: string]: unknown;
1742
+ };
1743
+ };
1744
+ /** @description Unauthorized */
1745
+ 401: {
1746
+ headers: {
1747
+ [name: string]: unknown;
1748
+ };
1749
+ };
1750
+ /** @description Farm processor not running */
1751
+ 503: {
1752
+ headers: {
1753
+ [name: string]: unknown;
1754
+ };
1755
+ };
1756
+ };
1757
+ };
1622
1758
  }
1623
1759
 
1624
1760
  export type { $defs, components, operations, paths };
package/dist/index.cjs CHANGED
@@ -461,6 +461,39 @@ class EApi {
461
461
  });
462
462
  }
463
463
  };
464
+ /**
465
+ * @tags send-tasks
466
+ */
467
+ sendTasks = {
468
+ /**
469
+ *
470
+ *
471
+ * @tags send-tasks
472
+ * @summary Cancel send tasks by filter
473
+ *
474
+ * [Documentation](.../send-tasks/operation/sendTasks.cancel)
475
+ */
476
+ cancel: (body, options) => {
477
+ return this.request("/send-tasks/cancel", body, {
478
+ method: "POST",
479
+ ...options
480
+ });
481
+ },
482
+ /**
483
+ *
484
+ *
485
+ * @tags send-tasks
486
+ * @summary Restore cancelled send tasks by filter
487
+ *
488
+ * [Documentation](.../send-tasks/operation/sendTasks.restore)
489
+ */
490
+ restore: (body, options) => {
491
+ return this.request("/send-tasks/restore", body, {
492
+ method: "POST",
493
+ ...options
494
+ });
495
+ }
496
+ };
464
497
  /** @generated stop-generate-methods */
465
498
  }
466
499
 
package/dist/index.d.cts CHANGED
@@ -691,6 +691,29 @@ declare class EApi {
691
691
  */
692
692
  getCommonChats: (externalId: paths["/accounts/common-chats/{externalId}"]["post"]["parameters"]["path"]["externalId"], body: GetRequestBody<"/accounts/common-chats/{externalId}", "post">, options?: RequestOptions) => Promise<GetResponse<"/accounts/common-chats/{externalId}", "post">>;
693
693
  };
694
+ /**
695
+ * @tags send-tasks
696
+ */
697
+ sendTasks: {
698
+ /**
699
+ *
700
+ *
701
+ * @tags send-tasks
702
+ * @summary Cancel send tasks by filter
703
+ *
704
+ * [Documentation](.../send-tasks/operation/sendTasks.cancel)
705
+ */
706
+ cancel: (body: GetRequestBody<"/send-tasks/cancel", "post">, options?: RequestOptions) => Promise<GetResponse<"/send-tasks/cancel", "post">>;
707
+ /**
708
+ *
709
+ *
710
+ * @tags send-tasks
711
+ * @summary Restore cancelled send tasks by filter
712
+ *
713
+ * [Documentation](.../send-tasks/operation/sendTasks.restore)
714
+ */
715
+ restore: (body: GetRequestBody<"/send-tasks/restore", "post">, options?: RequestOptions) => Promise<GetResponse<"/send-tasks/restore", "post">>;
716
+ };
694
717
  }
695
718
 
696
719
  export { EApi, type EApiOptions, webhookHandler };
package/dist/index.d.ts CHANGED
@@ -691,6 +691,29 @@ declare class EApi {
691
691
  */
692
692
  getCommonChats: (externalId: paths["/accounts/common-chats/{externalId}"]["post"]["parameters"]["path"]["externalId"], body: GetRequestBody<"/accounts/common-chats/{externalId}", "post">, options?: RequestOptions) => Promise<GetResponse<"/accounts/common-chats/{externalId}", "post">>;
693
693
  };
694
+ /**
695
+ * @tags send-tasks
696
+ */
697
+ sendTasks: {
698
+ /**
699
+ *
700
+ *
701
+ * @tags send-tasks
702
+ * @summary Cancel send tasks by filter
703
+ *
704
+ * [Documentation](.../send-tasks/operation/sendTasks.cancel)
705
+ */
706
+ cancel: (body: GetRequestBody<"/send-tasks/cancel", "post">, options?: RequestOptions) => Promise<GetResponse<"/send-tasks/cancel", "post">>;
707
+ /**
708
+ *
709
+ *
710
+ * @tags send-tasks
711
+ * @summary Restore cancelled send tasks by filter
712
+ *
713
+ * [Documentation](.../send-tasks/operation/sendTasks.restore)
714
+ */
715
+ restore: (body: GetRequestBody<"/send-tasks/restore", "post">, options?: RequestOptions) => Promise<GetResponse<"/send-tasks/restore", "post">>;
716
+ };
694
717
  }
695
718
 
696
719
  export { EApi, type EApiOptions, webhookHandler };
package/dist/index.js CHANGED
@@ -459,6 +459,39 @@ class EApi {
459
459
  });
460
460
  }
461
461
  };
462
+ /**
463
+ * @tags send-tasks
464
+ */
465
+ sendTasks = {
466
+ /**
467
+ *
468
+ *
469
+ * @tags send-tasks
470
+ * @summary Cancel send tasks by filter
471
+ *
472
+ * [Documentation](.../send-tasks/operation/sendTasks.cancel)
473
+ */
474
+ cancel: (body, options) => {
475
+ return this.request("/send-tasks/cancel", body, {
476
+ method: "POST",
477
+ ...options
478
+ });
479
+ },
480
+ /**
481
+ *
482
+ *
483
+ * @tags send-tasks
484
+ * @summary Restore cancelled send tasks by filter
485
+ *
486
+ * [Documentation](.../send-tasks/operation/sendTasks.restore)
487
+ */
488
+ restore: (body, options) => {
489
+ return this.request("/send-tasks/restore", body, {
490
+ method: "POST",
491
+ ...options
492
+ });
493
+ }
494
+ };
462
495
  /** @generated stop-generate-methods */
463
496
  }
464
497
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skravets/eapi",
3
- "version": "0.0.56",
3
+ "version": "0.0.57",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",