@skravets/eapi 0.0.57 → 0.0.59

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-03T15:52:02.744Z
125
133
  */
126
134
  message_created_at: string;
127
135
  /** @example 123 */
@@ -929,6 +937,65 @@ 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
+ MimicProductUrlDto: {
953
+ /** @example https://example.com/product/123 */
954
+ productUrl: string;
955
+ };
956
+ EditTextDto: {
957
+ /** @description Replace text substring */
958
+ replace?: components["schemas"]["TextReplaceDto"];
959
+ /** @description Assign mimic links by product URL */
960
+ assignMimicLinks?: components["schemas"]["MimicProductUrlDto"];
961
+ /** @description Replace mimic URL by product URL */
962
+ replaceMimicUrl?: components["schemas"]["MimicProductUrlDto"];
963
+ };
964
+ EditOperationDto: {
965
+ text: components["schemas"]["EditTextDto"];
966
+ };
967
+ EditSendTasksRequestDto: {
968
+ filter: components["schemas"]["SendTaskFilterDto"];
969
+ edit: components["schemas"]["EditOperationDto"];
970
+ /**
971
+ * @description Dry run — only count matched tasks without updating
972
+ * @default false
973
+ * @example false
974
+ */
975
+ dryRun: boolean;
976
+ };
977
+ EditSendTasksResponseDto: {
978
+ /**
979
+ * @description Number of updated (or matched in dry-run) tasks
980
+ * @example 7
981
+ */
982
+ updatedCount: number;
983
+ };
984
+ CountSendTasksRequestDto: {
985
+ filter: components["schemas"]["SendTaskFilterDto"];
986
+ /**
987
+ * @description Filter by message text substring
988
+ * @example promo
989
+ */
990
+ messageContains?: string;
991
+ };
992
+ CountSendTasksResponseDto: {
993
+ /**
994
+ * @description Count of matching active tasks
995
+ * @example 42
996
+ */
997
+ count: number;
998
+ };
932
999
  };
933
1000
  }
934
1001
  type $defs = Record<string, never>;
@@ -1755,6 +1822,78 @@ interface operations {
1755
1822
  };
1756
1823
  };
1757
1824
  };
1825
+ "sendTasks.edit": {
1826
+ parameters: {
1827
+ header: {
1828
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1829
+ Authorization: string;
1830
+ };
1831
+ };
1832
+ requestBody: {
1833
+ content: {
1834
+ "application/json": components["schemas"]["EditSendTasksRequestDto"];
1835
+ };
1836
+ };
1837
+ responses: {
1838
+ /** @description Tasks updated (or matched in dry-run mode) */
1839
+ 200: {
1840
+ headers: {
1841
+ [name: string]: unknown;
1842
+ };
1843
+ content: {
1844
+ "application/json": components["schemas"]["EditSendTasksResponseDto"];
1845
+ };
1846
+ };
1847
+ /** @description At least one filter field must be provided */
1848
+ 400: {
1849
+ headers: {
1850
+ [name: string]: unknown;
1851
+ };
1852
+ };
1853
+ /** @description Unauthorized */
1854
+ 401: {
1855
+ headers: {
1856
+ [name: string]: unknown;
1857
+ };
1858
+ };
1859
+ };
1860
+ };
1861
+ "sendTasks.count": {
1862
+ parameters: {
1863
+ header: {
1864
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1865
+ Authorization: string;
1866
+ };
1867
+ };
1868
+ requestBody: {
1869
+ content: {
1870
+ "application/json": components["schemas"]["CountSendTasksRequestDto"];
1871
+ };
1872
+ };
1873
+ responses: {
1874
+ /** @description Count of matching active tasks */
1875
+ 200: {
1876
+ headers: {
1877
+ [name: string]: unknown;
1878
+ };
1879
+ content: {
1880
+ "application/json": components["schemas"]["CountSendTasksResponseDto"];
1881
+ };
1882
+ };
1883
+ /** @description At least one filter field must be provided */
1884
+ 400: {
1885
+ headers: {
1886
+ [name: string]: unknown;
1887
+ };
1888
+ };
1889
+ /** @description Unauthorized */
1890
+ 401: {
1891
+ headers: {
1892
+ [name: string]: unknown;
1893
+ };
1894
+ };
1895
+ };
1896
+ };
1758
1897
  }
1759
1898
 
1760
1899
  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-03T15:52:02.744Z
125
133
  */
126
134
  message_created_at: string;
127
135
  /** @example 123 */
@@ -929,6 +937,65 @@ 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
+ MimicProductUrlDto: {
953
+ /** @example https://example.com/product/123 */
954
+ productUrl: string;
955
+ };
956
+ EditTextDto: {
957
+ /** @description Replace text substring */
958
+ replace?: components["schemas"]["TextReplaceDto"];
959
+ /** @description Assign mimic links by product URL */
960
+ assignMimicLinks?: components["schemas"]["MimicProductUrlDto"];
961
+ /** @description Replace mimic URL by product URL */
962
+ replaceMimicUrl?: components["schemas"]["MimicProductUrlDto"];
963
+ };
964
+ EditOperationDto: {
965
+ text: components["schemas"]["EditTextDto"];
966
+ };
967
+ EditSendTasksRequestDto: {
968
+ filter: components["schemas"]["SendTaskFilterDto"];
969
+ edit: components["schemas"]["EditOperationDto"];
970
+ /**
971
+ * @description Dry run — only count matched tasks without updating
972
+ * @default false
973
+ * @example false
974
+ */
975
+ dryRun: boolean;
976
+ };
977
+ EditSendTasksResponseDto: {
978
+ /**
979
+ * @description Number of updated (or matched in dry-run) tasks
980
+ * @example 7
981
+ */
982
+ updatedCount: number;
983
+ };
984
+ CountSendTasksRequestDto: {
985
+ filter: components["schemas"]["SendTaskFilterDto"];
986
+ /**
987
+ * @description Filter by message text substring
988
+ * @example promo
989
+ */
990
+ messageContains?: string;
991
+ };
992
+ CountSendTasksResponseDto: {
993
+ /**
994
+ * @description Count of matching active tasks
995
+ * @example 42
996
+ */
997
+ count: number;
998
+ };
932
999
  };
933
1000
  }
934
1001
  type $defs = Record<string, never>;
@@ -1755,6 +1822,78 @@ interface operations {
1755
1822
  };
1756
1823
  };
1757
1824
  };
1825
+ "sendTasks.edit": {
1826
+ parameters: {
1827
+ header: {
1828
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1829
+ Authorization: string;
1830
+ };
1831
+ };
1832
+ requestBody: {
1833
+ content: {
1834
+ "application/json": components["schemas"]["EditSendTasksRequestDto"];
1835
+ };
1836
+ };
1837
+ responses: {
1838
+ /** @description Tasks updated (or matched in dry-run mode) */
1839
+ 200: {
1840
+ headers: {
1841
+ [name: string]: unknown;
1842
+ };
1843
+ content: {
1844
+ "application/json": components["schemas"]["EditSendTasksResponseDto"];
1845
+ };
1846
+ };
1847
+ /** @description At least one filter field must be provided */
1848
+ 400: {
1849
+ headers: {
1850
+ [name: string]: unknown;
1851
+ };
1852
+ };
1853
+ /** @description Unauthorized */
1854
+ 401: {
1855
+ headers: {
1856
+ [name: string]: unknown;
1857
+ };
1858
+ };
1859
+ };
1860
+ };
1861
+ "sendTasks.count": {
1862
+ parameters: {
1863
+ header: {
1864
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
1865
+ Authorization: string;
1866
+ };
1867
+ };
1868
+ requestBody: {
1869
+ content: {
1870
+ "application/json": components["schemas"]["CountSendTasksRequestDto"];
1871
+ };
1872
+ };
1873
+ responses: {
1874
+ /** @description Count of matching active tasks */
1875
+ 200: {
1876
+ headers: {
1877
+ [name: string]: unknown;
1878
+ };
1879
+ content: {
1880
+ "application/json": components["schemas"]["CountSendTasksResponseDto"];
1881
+ };
1882
+ };
1883
+ /** @description At least one filter field must be provided */
1884
+ 400: {
1885
+ headers: {
1886
+ [name: string]: unknown;
1887
+ };
1888
+ };
1889
+ /** @description Unauthorized */
1890
+ 401: {
1891
+ headers: {
1892
+ [name: string]: unknown;
1893
+ };
1894
+ };
1895
+ };
1896
+ };
1758
1897
  }
1759
1898
 
1760
1899
  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.59",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",