@skravets/eapi 0.0.57 → 0.0.58

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.
@@ -109,6 +109,14 @@ interface paths {
109
109
  /** Restore cancelled send tasks by filter */
110
110
  post: operations["sendTasks.restore"];
111
111
  };
112
+ "/send-tasks/edit": {
113
+ /** Edit send tasks text by filter */
114
+ post: operations["sendTasks.edit"];
115
+ };
116
+ "/send-tasks/count": {
117
+ /** Count active send tasks by filter */
118
+ post: operations["sendTasks.count"];
119
+ };
112
120
  }
113
121
  /**
114
122
  * Сгенерированные из OpenAPI типы для `components`
@@ -121,7 +129,7 @@ interface components {
121
129
  channel_id: number;
122
130
  /**
123
131
  * Format: date-time
124
- * @example 2026-02-20T14:57:50.630Z
132
+ * @example 2026-03-03T13:11:09.496Z
125
133
  */
126
134
  message_created_at: string;
127
135
  /** @example 123 */
@@ -929,6 +937,56 @@ interface components {
929
937
  */
930
938
  restoredCount: number;
931
939
  };
940
+ TextReplaceDto: {
941
+ /**
942
+ * @description Text to replace
943
+ * @example old text
944
+ */
945
+ from: string;
946
+ /**
947
+ * @description Replacement text
948
+ * @example new text
949
+ */
950
+ to: string;
951
+ };
952
+ EditTextDto: {
953
+ replace: components["schemas"]["TextReplaceDto"];
954
+ };
955
+ EditOperationDto: {
956
+ text: components["schemas"]["EditTextDto"];
957
+ };
958
+ EditSendTasksRequestDto: {
959
+ filter: components["schemas"]["SendTaskFilterDto"];
960
+ edit: components["schemas"]["EditOperationDto"];
961
+ /**
962
+ * @description Dry run — only count matched tasks without updating
963
+ * @default false
964
+ * @example false
965
+ */
966
+ dryRun: boolean;
967
+ };
968
+ EditSendTasksResponseDto: {
969
+ /**
970
+ * @description Number of updated (or matched in dry-run) tasks
971
+ * @example 7
972
+ */
973
+ updatedCount: number;
974
+ };
975
+ CountSendTasksRequestDto: {
976
+ filter: components["schemas"]["SendTaskFilterDto"];
977
+ /**
978
+ * @description Filter by message text substring
979
+ * @example promo
980
+ */
981
+ messageContains?: string;
982
+ };
983
+ CountSendTasksResponseDto: {
984
+ /**
985
+ * @description Count of matching active tasks
986
+ * @example 42
987
+ */
988
+ count: number;
989
+ };
932
990
  };
933
991
  }
934
992
  type $defs = Record<string, never>;
@@ -1755,6 +1813,78 @@ interface operations {
1755
1813
  };
1756
1814
  };
1757
1815
  };
1816
+ "sendTasks.edit": {
1817
+ parameters: {
1818
+ header: {
1819
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1820
+ Authorization: string;
1821
+ };
1822
+ };
1823
+ requestBody: {
1824
+ content: {
1825
+ "application/json": components["schemas"]["EditSendTasksRequestDto"];
1826
+ };
1827
+ };
1828
+ responses: {
1829
+ /** @description Tasks updated (or matched in dry-run mode) */
1830
+ 200: {
1831
+ headers: {
1832
+ [name: string]: unknown;
1833
+ };
1834
+ content: {
1835
+ "application/json": components["schemas"]["EditSendTasksResponseDto"];
1836
+ };
1837
+ };
1838
+ /** @description At least one filter field must be provided */
1839
+ 400: {
1840
+ headers: {
1841
+ [name: string]: unknown;
1842
+ };
1843
+ };
1844
+ /** @description Unauthorized */
1845
+ 401: {
1846
+ headers: {
1847
+ [name: string]: unknown;
1848
+ };
1849
+ };
1850
+ };
1851
+ };
1852
+ "sendTasks.count": {
1853
+ parameters: {
1854
+ header: {
1855
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1856
+ Authorization: string;
1857
+ };
1858
+ };
1859
+ requestBody: {
1860
+ content: {
1861
+ "application/json": components["schemas"]["CountSendTasksRequestDto"];
1862
+ };
1863
+ };
1864
+ responses: {
1865
+ /** @description Count of matching active tasks */
1866
+ 200: {
1867
+ headers: {
1868
+ [name: string]: unknown;
1869
+ };
1870
+ content: {
1871
+ "application/json": components["schemas"]["CountSendTasksResponseDto"];
1872
+ };
1873
+ };
1874
+ /** @description At least one filter field must be provided */
1875
+ 400: {
1876
+ headers: {
1877
+ [name: string]: unknown;
1878
+ };
1879
+ };
1880
+ /** @description Unauthorized */
1881
+ 401: {
1882
+ headers: {
1883
+ [name: string]: unknown;
1884
+ };
1885
+ };
1886
+ };
1887
+ };
1758
1888
  }
1759
1889
 
1760
1890
  export type { $defs, components, operations, paths };
@@ -109,6 +109,14 @@ interface paths {
109
109
  /** Restore cancelled send tasks by filter */
110
110
  post: operations["sendTasks.restore"];
111
111
  };
112
+ "/send-tasks/edit": {
113
+ /** Edit send tasks text by filter */
114
+ post: operations["sendTasks.edit"];
115
+ };
116
+ "/send-tasks/count": {
117
+ /** Count active send tasks by filter */
118
+ post: operations["sendTasks.count"];
119
+ };
112
120
  }
113
121
  /**
114
122
  * Сгенерированные из OpenAPI типы для `components`
@@ -121,7 +129,7 @@ interface components {
121
129
  channel_id: number;
122
130
  /**
123
131
  * Format: date-time
124
- * @example 2026-02-20T14:57:50.630Z
132
+ * @example 2026-03-03T13:11:09.496Z
125
133
  */
126
134
  message_created_at: string;
127
135
  /** @example 123 */
@@ -929,6 +937,56 @@ interface components {
929
937
  */
930
938
  restoredCount: number;
931
939
  };
940
+ TextReplaceDto: {
941
+ /**
942
+ * @description Text to replace
943
+ * @example old text
944
+ */
945
+ from: string;
946
+ /**
947
+ * @description Replacement text
948
+ * @example new text
949
+ */
950
+ to: string;
951
+ };
952
+ EditTextDto: {
953
+ replace: components["schemas"]["TextReplaceDto"];
954
+ };
955
+ EditOperationDto: {
956
+ text: components["schemas"]["EditTextDto"];
957
+ };
958
+ EditSendTasksRequestDto: {
959
+ filter: components["schemas"]["SendTaskFilterDto"];
960
+ edit: components["schemas"]["EditOperationDto"];
961
+ /**
962
+ * @description Dry run — only count matched tasks without updating
963
+ * @default false
964
+ * @example false
965
+ */
966
+ dryRun: boolean;
967
+ };
968
+ EditSendTasksResponseDto: {
969
+ /**
970
+ * @description Number of updated (or matched in dry-run) tasks
971
+ * @example 7
972
+ */
973
+ updatedCount: number;
974
+ };
975
+ CountSendTasksRequestDto: {
976
+ filter: components["schemas"]["SendTaskFilterDto"];
977
+ /**
978
+ * @description Filter by message text substring
979
+ * @example promo
980
+ */
981
+ messageContains?: string;
982
+ };
983
+ CountSendTasksResponseDto: {
984
+ /**
985
+ * @description Count of matching active tasks
986
+ * @example 42
987
+ */
988
+ count: number;
989
+ };
932
990
  };
933
991
  }
934
992
  type $defs = Record<string, never>;
@@ -1755,6 +1813,78 @@ interface operations {
1755
1813
  };
1756
1814
  };
1757
1815
  };
1816
+ "sendTasks.edit": {
1817
+ parameters: {
1818
+ header: {
1819
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1820
+ Authorization: string;
1821
+ };
1822
+ };
1823
+ requestBody: {
1824
+ content: {
1825
+ "application/json": components["schemas"]["EditSendTasksRequestDto"];
1826
+ };
1827
+ };
1828
+ responses: {
1829
+ /** @description Tasks updated (or matched in dry-run mode) */
1830
+ 200: {
1831
+ headers: {
1832
+ [name: string]: unknown;
1833
+ };
1834
+ content: {
1835
+ "application/json": components["schemas"]["EditSendTasksResponseDto"];
1836
+ };
1837
+ };
1838
+ /** @description At least one filter field must be provided */
1839
+ 400: {
1840
+ headers: {
1841
+ [name: string]: unknown;
1842
+ };
1843
+ };
1844
+ /** @description Unauthorized */
1845
+ 401: {
1846
+ headers: {
1847
+ [name: string]: unknown;
1848
+ };
1849
+ };
1850
+ };
1851
+ };
1852
+ "sendTasks.count": {
1853
+ parameters: {
1854
+ header: {
1855
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1856
+ Authorization: string;
1857
+ };
1858
+ };
1859
+ requestBody: {
1860
+ content: {
1861
+ "application/json": components["schemas"]["CountSendTasksRequestDto"];
1862
+ };
1863
+ };
1864
+ responses: {
1865
+ /** @description Count of matching active tasks */
1866
+ 200: {
1867
+ headers: {
1868
+ [name: string]: unknown;
1869
+ };
1870
+ content: {
1871
+ "application/json": components["schemas"]["CountSendTasksResponseDto"];
1872
+ };
1873
+ };
1874
+ /** @description At least one filter field must be provided */
1875
+ 400: {
1876
+ headers: {
1877
+ [name: string]: unknown;
1878
+ };
1879
+ };
1880
+ /** @description Unauthorized */
1881
+ 401: {
1882
+ headers: {
1883
+ [name: string]: unknown;
1884
+ };
1885
+ };
1886
+ };
1887
+ };
1758
1888
  }
1759
1889
 
1760
1890
  export type { $defs, components, operations, paths };
package/dist/index.cjs CHANGED
@@ -492,6 +492,34 @@ class EApi {
492
492
  method: "POST",
493
493
  ...options
494
494
  });
495
+ },
496
+ /**
497
+ *
498
+ *
499
+ * @tags send-tasks
500
+ * @summary Edit send tasks text by filter
501
+ *
502
+ * [Documentation](.../send-tasks/operation/sendTasks.edit)
503
+ */
504
+ edit: (body, options) => {
505
+ return this.request("/send-tasks/edit", body, {
506
+ method: "POST",
507
+ ...options
508
+ });
509
+ },
510
+ /**
511
+ *
512
+ *
513
+ * @tags send-tasks
514
+ * @summary Count active send tasks by filter
515
+ *
516
+ * [Documentation](.../send-tasks/operation/sendTasks.count)
517
+ */
518
+ count: (body, options) => {
519
+ return this.request("/send-tasks/count", body, {
520
+ method: "POST",
521
+ ...options
522
+ });
495
523
  }
496
524
  };
497
525
  /** @generated stop-generate-methods */
package/dist/index.d.cts CHANGED
@@ -713,6 +713,24 @@ declare class EApi {
713
713
  * [Documentation](.../send-tasks/operation/sendTasks.restore)
714
714
  */
715
715
  restore: (body: GetRequestBody<"/send-tasks/restore", "post">, options?: RequestOptions) => Promise<GetResponse<"/send-tasks/restore", "post">>;
716
+ /**
717
+ *
718
+ *
719
+ * @tags send-tasks
720
+ * @summary Edit send tasks text by filter
721
+ *
722
+ * [Documentation](.../send-tasks/operation/sendTasks.edit)
723
+ */
724
+ edit: (body: GetRequestBody<"/send-tasks/edit", "post">, options?: RequestOptions) => Promise<GetResponse<"/send-tasks/edit", "post">>;
725
+ /**
726
+ *
727
+ *
728
+ * @tags send-tasks
729
+ * @summary Count active send tasks by filter
730
+ *
731
+ * [Documentation](.../send-tasks/operation/sendTasks.count)
732
+ */
733
+ count: (body: GetRequestBody<"/send-tasks/count", "post">, options?: RequestOptions) => Promise<GetResponse<"/send-tasks/count", "post">>;
716
734
  };
717
735
  }
718
736
 
package/dist/index.d.ts CHANGED
@@ -713,6 +713,24 @@ declare class EApi {
713
713
  * [Documentation](.../send-tasks/operation/sendTasks.restore)
714
714
  */
715
715
  restore: (body: GetRequestBody<"/send-tasks/restore", "post">, options?: RequestOptions) => Promise<GetResponse<"/send-tasks/restore", "post">>;
716
+ /**
717
+ *
718
+ *
719
+ * @tags send-tasks
720
+ * @summary Edit send tasks text by filter
721
+ *
722
+ * [Documentation](.../send-tasks/operation/sendTasks.edit)
723
+ */
724
+ edit: (body: GetRequestBody<"/send-tasks/edit", "post">, options?: RequestOptions) => Promise<GetResponse<"/send-tasks/edit", "post">>;
725
+ /**
726
+ *
727
+ *
728
+ * @tags send-tasks
729
+ * @summary Count active send tasks by filter
730
+ *
731
+ * [Documentation](.../send-tasks/operation/sendTasks.count)
732
+ */
733
+ count: (body: GetRequestBody<"/send-tasks/count", "post">, options?: RequestOptions) => Promise<GetResponse<"/send-tasks/count", "post">>;
716
734
  };
717
735
  }
718
736
 
package/dist/index.js CHANGED
@@ -490,6 +490,34 @@ class EApi {
490
490
  method: "POST",
491
491
  ...options
492
492
  });
493
+ },
494
+ /**
495
+ *
496
+ *
497
+ * @tags send-tasks
498
+ * @summary Edit send tasks text by filter
499
+ *
500
+ * [Documentation](.../send-tasks/operation/sendTasks.edit)
501
+ */
502
+ edit: (body, options) => {
503
+ return this.request("/send-tasks/edit", body, {
504
+ method: "POST",
505
+ ...options
506
+ });
507
+ },
508
+ /**
509
+ *
510
+ *
511
+ * @tags send-tasks
512
+ * @summary Count active send tasks by filter
513
+ *
514
+ * [Documentation](.../send-tasks/operation/sendTasks.count)
515
+ */
516
+ count: (body, options) => {
517
+ return this.request("/send-tasks/count", body, {
518
+ method: "POST",
519
+ ...options
520
+ });
493
521
  }
494
522
  };
495
523
  /** @generated stop-generate-methods */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skravets/eapi",
3
- "version": "0.0.57",
3
+ "version": "0.0.58",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",