@skravets/eapi 0.0.60 → 0.0.62

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.
@@ -117,6 +117,20 @@ interface paths {
117
117
  /** Count active send tasks by filter */
118
118
  post: operations["sendTasks.count"];
119
119
  };
120
+ "/presence-chats": {
121
+ /** List presence chats with health stats */
122
+ get: operations["presenceChats.list"];
123
+ /** Declarative sync — replace all presence chats */
124
+ put: operations["presenceChats.sync"];
125
+ /** Add a chat for presence monitoring */
126
+ post: operations["presenceChats.create"];
127
+ };
128
+ "/presence-chats/{id}": {
129
+ /** Remove a chat from presence monitoring */
130
+ delete: operations["presenceChats.delete"];
131
+ /** Update presence chat settings */
132
+ patch: operations["presenceChats.update"];
133
+ };
120
134
  }
121
135
  /**
122
136
  * Сгенерированные из OpenAPI типы для `components`
@@ -129,7 +143,7 @@ interface components {
129
143
  channel_id: number;
130
144
  /**
131
145
  * Format: date-time
132
- * @example 2026-03-05T00:27:23.407Z
146
+ * @example 2026-03-11T15:54:23.757Z
133
147
  */
134
148
  message_created_at: string;
135
149
  /** @example 123 */
@@ -317,6 +331,11 @@ interface components {
317
331
  variables?: {
318
332
  [key: string]: string | undefined;
319
333
  };
334
+ /**
335
+ * @description Skip per-chat 24h send cooldown (e.g. for presence chat messages)
336
+ * @example false
337
+ */
338
+ skipChatCooldown?: boolean;
320
339
  };
321
340
  IDeleteMessage: {
322
341
  /**
@@ -947,6 +966,28 @@ interface components {
947
966
  */
948
967
  restoredCount: number;
949
968
  };
969
+ VariablesSetDto: {
970
+ /**
971
+ * @description Set variables (replace all)
972
+ * @example {
973
+ * "key": "value"
974
+ * }
975
+ */
976
+ set: {
977
+ [key: string]: string | undefined;
978
+ };
979
+ };
980
+ VariablesMergeDto: {
981
+ /**
982
+ * @description Merge variables (update existing, add new)
983
+ * @example {
984
+ * "key": "value"
985
+ * }
986
+ */
987
+ merge: {
988
+ [key: string]: string | undefined;
989
+ };
990
+ };
950
991
  TextReplaceDto: {
951
992
  /**
952
993
  * @description Text to replace
@@ -972,7 +1013,9 @@ interface components {
972
1013
  replaceMimicUrl?: components["schemas"]["MimicProductUrlDto"];
973
1014
  };
974
1015
  EditOperationDto: {
975
- text: components["schemas"]["EditTextDto"];
1016
+ text?: components["schemas"]["EditTextDto"];
1017
+ /** @description Set or merge variables */
1018
+ variables?: components["schemas"]["VariablesSetDto"] | components["schemas"]["VariablesMergeDto"];
976
1019
  };
977
1020
  EditSendTasksRequestDto: {
978
1021
  filter: components["schemas"]["SendTaskFilterDto"];
@@ -1006,6 +1049,110 @@ interface components {
1006
1049
  */
1007
1050
  count: number;
1008
1051
  };
1052
+ PresenceChatDto: {
1053
+ /** @example 1 */
1054
+ id: number;
1055
+ /**
1056
+ * @description Chat username without @
1057
+ * @example somechat
1058
+ */
1059
+ chatUsername: string;
1060
+ /**
1061
+ * @description Desired number of healthy accounts in chat
1062
+ * @example 3
1063
+ */
1064
+ desiredMemberCount: number;
1065
+ /**
1066
+ * @description Telegram peer ID, null until resolved
1067
+ * @example 1234567890
1068
+ */
1069
+ peerId: null | number;
1070
+ /**
1071
+ * @description Normalized (always positive) peer ID
1072
+ * @example 1234567890
1073
+ */
1074
+ normalizedPeerId: null | number;
1075
+ /** @example true */
1076
+ isEnabled: boolean;
1077
+ /**
1078
+ * @description Current count of healthy accounts in chat
1079
+ * @example 2
1080
+ */
1081
+ healthyMemberCount: number;
1082
+ /** @example 2026-03-11T10:00:00.000Z */
1083
+ createdAt: string;
1084
+ /** @example 2026-03-11T10:05:00.000Z */
1085
+ updatedAt: string;
1086
+ };
1087
+ ListPresenceChatsResponseDto: {
1088
+ count: number;
1089
+ presenceChats: components["schemas"]["PresenceChatDto"][];
1090
+ };
1091
+ SyncPresenceChatItemDto: {
1092
+ /**
1093
+ * @description Chat username without @
1094
+ * @example somechat
1095
+ */
1096
+ chatUsername: string;
1097
+ /**
1098
+ * @description Desired healthy account count (>= 1)
1099
+ * @default 1
1100
+ * @example 3
1101
+ */
1102
+ desiredMemberCount: number;
1103
+ };
1104
+ SyncPresenceChatsDto: {
1105
+ /** @description Desired list of presence chats (replaces all existing) */
1106
+ chats: components["schemas"]["SyncPresenceChatItemDto"][];
1107
+ };
1108
+ SyncPresenceChatsResponseDto: {
1109
+ count: number;
1110
+ presenceChats: components["schemas"]["PresenceChatDto"][];
1111
+ /**
1112
+ * @description Number of chats added
1113
+ * @example 1
1114
+ */
1115
+ added: number;
1116
+ /**
1117
+ * @description Number of chats updated
1118
+ * @example 1
1119
+ */
1120
+ updated: number;
1121
+ /**
1122
+ * @description Number of chats deleted
1123
+ * @example 2
1124
+ */
1125
+ deleted: number;
1126
+ };
1127
+ CreatePresenceChatDto: {
1128
+ /**
1129
+ * @description Chat username without @
1130
+ * @example somechat
1131
+ */
1132
+ chatUsername: string;
1133
+ /**
1134
+ * @description Desired healthy account count (>= 1)
1135
+ * @default 1
1136
+ * @example 3
1137
+ */
1138
+ desiredMemberCount: number;
1139
+ };
1140
+ UpdatePresenceChatDto: {
1141
+ /**
1142
+ * @description Desired healthy account count (>= 1)
1143
+ * @example 5
1144
+ */
1145
+ desiredMemberCount?: number;
1146
+ /**
1147
+ * @description Enable/disable presence monitoring
1148
+ * @example false
1149
+ */
1150
+ isEnabled?: boolean;
1151
+ };
1152
+ DeletePresenceChatResponseDto: {
1153
+ /** @example true */
1154
+ deleted: boolean;
1155
+ };
1009
1156
  };
1010
1157
  }
1011
1158
  type $defs = Record<string, never>;
@@ -1904,6 +2051,170 @@ interface operations {
1904
2051
  };
1905
2052
  };
1906
2053
  };
2054
+ "presenceChats.list": {
2055
+ parameters: {
2056
+ header: {
2057
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2058
+ Authorization: string;
2059
+ };
2060
+ };
2061
+ responses: {
2062
+ /** @description List of presence chats with healthy member counts */
2063
+ 200: {
2064
+ headers: {
2065
+ [name: string]: unknown;
2066
+ };
2067
+ content: {
2068
+ "application/json": components["schemas"]["ListPresenceChatsResponseDto"];
2069
+ };
2070
+ };
2071
+ /** @description Unauthorized */
2072
+ 401: {
2073
+ headers: {
2074
+ [name: string]: unknown;
2075
+ };
2076
+ };
2077
+ };
2078
+ };
2079
+ "presenceChats.sync": {
2080
+ parameters: {
2081
+ header: {
2082
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2083
+ Authorization: string;
2084
+ };
2085
+ };
2086
+ requestBody: {
2087
+ content: {
2088
+ "application/json": components["schemas"]["SyncPresenceChatsDto"];
2089
+ };
2090
+ };
2091
+ responses: {
2092
+ /** @description Sync result with added/updated/deleted counts */
2093
+ 200: {
2094
+ headers: {
2095
+ [name: string]: unknown;
2096
+ };
2097
+ content: {
2098
+ "application/json": components["schemas"]["SyncPresenceChatsResponseDto"];
2099
+ };
2100
+ };
2101
+ /** @description Unauthorized */
2102
+ 401: {
2103
+ headers: {
2104
+ [name: string]: unknown;
2105
+ };
2106
+ };
2107
+ };
2108
+ };
2109
+ "presenceChats.create": {
2110
+ parameters: {
2111
+ header: {
2112
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2113
+ Authorization: string;
2114
+ };
2115
+ };
2116
+ requestBody: {
2117
+ content: {
2118
+ "application/json": components["schemas"]["CreatePresenceChatDto"];
2119
+ };
2120
+ };
2121
+ responses: {
2122
+ /** @description Presence chat created */
2123
+ 201: {
2124
+ headers: {
2125
+ [name: string]: unknown;
2126
+ };
2127
+ content: {
2128
+ "application/json": components["schemas"]["PresenceChatDto"];
2129
+ };
2130
+ };
2131
+ /** @description Unauthorized */
2132
+ 401: {
2133
+ headers: {
2134
+ [name: string]: unknown;
2135
+ };
2136
+ };
2137
+ /** @description Chat username already exists */
2138
+ 409: {
2139
+ headers: {
2140
+ [name: string]: unknown;
2141
+ };
2142
+ };
2143
+ };
2144
+ };
2145
+ "presenceChats.delete": {
2146
+ parameters: {
2147
+ header: {
2148
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2149
+ Authorization: string;
2150
+ };
2151
+ path: {
2152
+ id: number;
2153
+ };
2154
+ };
2155
+ responses: {
2156
+ /** @description Presence chat deleted */
2157
+ 200: {
2158
+ headers: {
2159
+ [name: string]: unknown;
2160
+ };
2161
+ content: {
2162
+ "application/json": components["schemas"]["DeletePresenceChatResponseDto"];
2163
+ };
2164
+ };
2165
+ /** @description Unauthorized */
2166
+ 401: {
2167
+ headers: {
2168
+ [name: string]: unknown;
2169
+ };
2170
+ };
2171
+ /** @description Presence chat not found */
2172
+ 404: {
2173
+ headers: {
2174
+ [name: string]: unknown;
2175
+ };
2176
+ };
2177
+ };
2178
+ };
2179
+ "presenceChats.update": {
2180
+ parameters: {
2181
+ header: {
2182
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2183
+ Authorization: string;
2184
+ };
2185
+ path: {
2186
+ id: number;
2187
+ };
2188
+ };
2189
+ requestBody: {
2190
+ content: {
2191
+ "application/json": components["schemas"]["UpdatePresenceChatDto"];
2192
+ };
2193
+ };
2194
+ responses: {
2195
+ /** @description Presence chat updated */
2196
+ 200: {
2197
+ headers: {
2198
+ [name: string]: unknown;
2199
+ };
2200
+ content: {
2201
+ "application/json": components["schemas"]["PresenceChatDto"];
2202
+ };
2203
+ };
2204
+ /** @description Unauthorized */
2205
+ 401: {
2206
+ headers: {
2207
+ [name: string]: unknown;
2208
+ };
2209
+ };
2210
+ /** @description Presence chat not found */
2211
+ 404: {
2212
+ headers: {
2213
+ [name: string]: unknown;
2214
+ };
2215
+ };
2216
+ };
2217
+ };
1907
2218
  }
1908
2219
 
1909
2220
  export type { $defs, components, operations, paths };
@@ -117,6 +117,20 @@ interface paths {
117
117
  /** Count active send tasks by filter */
118
118
  post: operations["sendTasks.count"];
119
119
  };
120
+ "/presence-chats": {
121
+ /** List presence chats with health stats */
122
+ get: operations["presenceChats.list"];
123
+ /** Declarative sync — replace all presence chats */
124
+ put: operations["presenceChats.sync"];
125
+ /** Add a chat for presence monitoring */
126
+ post: operations["presenceChats.create"];
127
+ };
128
+ "/presence-chats/{id}": {
129
+ /** Remove a chat from presence monitoring */
130
+ delete: operations["presenceChats.delete"];
131
+ /** Update presence chat settings */
132
+ patch: operations["presenceChats.update"];
133
+ };
120
134
  }
121
135
  /**
122
136
  * Сгенерированные из OpenAPI типы для `components`
@@ -129,7 +143,7 @@ interface components {
129
143
  channel_id: number;
130
144
  /**
131
145
  * Format: date-time
132
- * @example 2026-03-05T00:27:23.407Z
146
+ * @example 2026-03-11T15:54:23.757Z
133
147
  */
134
148
  message_created_at: string;
135
149
  /** @example 123 */
@@ -317,6 +331,11 @@ interface components {
317
331
  variables?: {
318
332
  [key: string]: string | undefined;
319
333
  };
334
+ /**
335
+ * @description Skip per-chat 24h send cooldown (e.g. for presence chat messages)
336
+ * @example false
337
+ */
338
+ skipChatCooldown?: boolean;
320
339
  };
321
340
  IDeleteMessage: {
322
341
  /**
@@ -947,6 +966,28 @@ interface components {
947
966
  */
948
967
  restoredCount: number;
949
968
  };
969
+ VariablesSetDto: {
970
+ /**
971
+ * @description Set variables (replace all)
972
+ * @example {
973
+ * "key": "value"
974
+ * }
975
+ */
976
+ set: {
977
+ [key: string]: string | undefined;
978
+ };
979
+ };
980
+ VariablesMergeDto: {
981
+ /**
982
+ * @description Merge variables (update existing, add new)
983
+ * @example {
984
+ * "key": "value"
985
+ * }
986
+ */
987
+ merge: {
988
+ [key: string]: string | undefined;
989
+ };
990
+ };
950
991
  TextReplaceDto: {
951
992
  /**
952
993
  * @description Text to replace
@@ -972,7 +1013,9 @@ interface components {
972
1013
  replaceMimicUrl?: components["schemas"]["MimicProductUrlDto"];
973
1014
  };
974
1015
  EditOperationDto: {
975
- text: components["schemas"]["EditTextDto"];
1016
+ text?: components["schemas"]["EditTextDto"];
1017
+ /** @description Set or merge variables */
1018
+ variables?: components["schemas"]["VariablesSetDto"] | components["schemas"]["VariablesMergeDto"];
976
1019
  };
977
1020
  EditSendTasksRequestDto: {
978
1021
  filter: components["schemas"]["SendTaskFilterDto"];
@@ -1006,6 +1049,110 @@ interface components {
1006
1049
  */
1007
1050
  count: number;
1008
1051
  };
1052
+ PresenceChatDto: {
1053
+ /** @example 1 */
1054
+ id: number;
1055
+ /**
1056
+ * @description Chat username without @
1057
+ * @example somechat
1058
+ */
1059
+ chatUsername: string;
1060
+ /**
1061
+ * @description Desired number of healthy accounts in chat
1062
+ * @example 3
1063
+ */
1064
+ desiredMemberCount: number;
1065
+ /**
1066
+ * @description Telegram peer ID, null until resolved
1067
+ * @example 1234567890
1068
+ */
1069
+ peerId: null | number;
1070
+ /**
1071
+ * @description Normalized (always positive) peer ID
1072
+ * @example 1234567890
1073
+ */
1074
+ normalizedPeerId: null | number;
1075
+ /** @example true */
1076
+ isEnabled: boolean;
1077
+ /**
1078
+ * @description Current count of healthy accounts in chat
1079
+ * @example 2
1080
+ */
1081
+ healthyMemberCount: number;
1082
+ /** @example 2026-03-11T10:00:00.000Z */
1083
+ createdAt: string;
1084
+ /** @example 2026-03-11T10:05:00.000Z */
1085
+ updatedAt: string;
1086
+ };
1087
+ ListPresenceChatsResponseDto: {
1088
+ count: number;
1089
+ presenceChats: components["schemas"]["PresenceChatDto"][];
1090
+ };
1091
+ SyncPresenceChatItemDto: {
1092
+ /**
1093
+ * @description Chat username without @
1094
+ * @example somechat
1095
+ */
1096
+ chatUsername: string;
1097
+ /**
1098
+ * @description Desired healthy account count (>= 1)
1099
+ * @default 1
1100
+ * @example 3
1101
+ */
1102
+ desiredMemberCount: number;
1103
+ };
1104
+ SyncPresenceChatsDto: {
1105
+ /** @description Desired list of presence chats (replaces all existing) */
1106
+ chats: components["schemas"]["SyncPresenceChatItemDto"][];
1107
+ };
1108
+ SyncPresenceChatsResponseDto: {
1109
+ count: number;
1110
+ presenceChats: components["schemas"]["PresenceChatDto"][];
1111
+ /**
1112
+ * @description Number of chats added
1113
+ * @example 1
1114
+ */
1115
+ added: number;
1116
+ /**
1117
+ * @description Number of chats updated
1118
+ * @example 1
1119
+ */
1120
+ updated: number;
1121
+ /**
1122
+ * @description Number of chats deleted
1123
+ * @example 2
1124
+ */
1125
+ deleted: number;
1126
+ };
1127
+ CreatePresenceChatDto: {
1128
+ /**
1129
+ * @description Chat username without @
1130
+ * @example somechat
1131
+ */
1132
+ chatUsername: string;
1133
+ /**
1134
+ * @description Desired healthy account count (>= 1)
1135
+ * @default 1
1136
+ * @example 3
1137
+ */
1138
+ desiredMemberCount: number;
1139
+ };
1140
+ UpdatePresenceChatDto: {
1141
+ /**
1142
+ * @description Desired healthy account count (>= 1)
1143
+ * @example 5
1144
+ */
1145
+ desiredMemberCount?: number;
1146
+ /**
1147
+ * @description Enable/disable presence monitoring
1148
+ * @example false
1149
+ */
1150
+ isEnabled?: boolean;
1151
+ };
1152
+ DeletePresenceChatResponseDto: {
1153
+ /** @example true */
1154
+ deleted: boolean;
1155
+ };
1009
1156
  };
1010
1157
  }
1011
1158
  type $defs = Record<string, never>;
@@ -1904,6 +2051,170 @@ interface operations {
1904
2051
  };
1905
2052
  };
1906
2053
  };
2054
+ "presenceChats.list": {
2055
+ parameters: {
2056
+ header: {
2057
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2058
+ Authorization: string;
2059
+ };
2060
+ };
2061
+ responses: {
2062
+ /** @description List of presence chats with healthy member counts */
2063
+ 200: {
2064
+ headers: {
2065
+ [name: string]: unknown;
2066
+ };
2067
+ content: {
2068
+ "application/json": components["schemas"]["ListPresenceChatsResponseDto"];
2069
+ };
2070
+ };
2071
+ /** @description Unauthorized */
2072
+ 401: {
2073
+ headers: {
2074
+ [name: string]: unknown;
2075
+ };
2076
+ };
2077
+ };
2078
+ };
2079
+ "presenceChats.sync": {
2080
+ parameters: {
2081
+ header: {
2082
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2083
+ Authorization: string;
2084
+ };
2085
+ };
2086
+ requestBody: {
2087
+ content: {
2088
+ "application/json": components["schemas"]["SyncPresenceChatsDto"];
2089
+ };
2090
+ };
2091
+ responses: {
2092
+ /** @description Sync result with added/updated/deleted counts */
2093
+ 200: {
2094
+ headers: {
2095
+ [name: string]: unknown;
2096
+ };
2097
+ content: {
2098
+ "application/json": components["schemas"]["SyncPresenceChatsResponseDto"];
2099
+ };
2100
+ };
2101
+ /** @description Unauthorized */
2102
+ 401: {
2103
+ headers: {
2104
+ [name: string]: unknown;
2105
+ };
2106
+ };
2107
+ };
2108
+ };
2109
+ "presenceChats.create": {
2110
+ parameters: {
2111
+ header: {
2112
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2113
+ Authorization: string;
2114
+ };
2115
+ };
2116
+ requestBody: {
2117
+ content: {
2118
+ "application/json": components["schemas"]["CreatePresenceChatDto"];
2119
+ };
2120
+ };
2121
+ responses: {
2122
+ /** @description Presence chat created */
2123
+ 201: {
2124
+ headers: {
2125
+ [name: string]: unknown;
2126
+ };
2127
+ content: {
2128
+ "application/json": components["schemas"]["PresenceChatDto"];
2129
+ };
2130
+ };
2131
+ /** @description Unauthorized */
2132
+ 401: {
2133
+ headers: {
2134
+ [name: string]: unknown;
2135
+ };
2136
+ };
2137
+ /** @description Chat username already exists */
2138
+ 409: {
2139
+ headers: {
2140
+ [name: string]: unknown;
2141
+ };
2142
+ };
2143
+ };
2144
+ };
2145
+ "presenceChats.delete": {
2146
+ parameters: {
2147
+ header: {
2148
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2149
+ Authorization: string;
2150
+ };
2151
+ path: {
2152
+ id: number;
2153
+ };
2154
+ };
2155
+ responses: {
2156
+ /** @description Presence chat deleted */
2157
+ 200: {
2158
+ headers: {
2159
+ [name: string]: unknown;
2160
+ };
2161
+ content: {
2162
+ "application/json": components["schemas"]["DeletePresenceChatResponseDto"];
2163
+ };
2164
+ };
2165
+ /** @description Unauthorized */
2166
+ 401: {
2167
+ headers: {
2168
+ [name: string]: unknown;
2169
+ };
2170
+ };
2171
+ /** @description Presence chat not found */
2172
+ 404: {
2173
+ headers: {
2174
+ [name: string]: unknown;
2175
+ };
2176
+ };
2177
+ };
2178
+ };
2179
+ "presenceChats.update": {
2180
+ parameters: {
2181
+ header: {
2182
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2183
+ Authorization: string;
2184
+ };
2185
+ path: {
2186
+ id: number;
2187
+ };
2188
+ };
2189
+ requestBody: {
2190
+ content: {
2191
+ "application/json": components["schemas"]["UpdatePresenceChatDto"];
2192
+ };
2193
+ };
2194
+ responses: {
2195
+ /** @description Presence chat updated */
2196
+ 200: {
2197
+ headers: {
2198
+ [name: string]: unknown;
2199
+ };
2200
+ content: {
2201
+ "application/json": components["schemas"]["PresenceChatDto"];
2202
+ };
2203
+ };
2204
+ /** @description Unauthorized */
2205
+ 401: {
2206
+ headers: {
2207
+ [name: string]: unknown;
2208
+ };
2209
+ };
2210
+ /** @description Presence chat not found */
2211
+ 404: {
2212
+ headers: {
2213
+ [name: string]: unknown;
2214
+ };
2215
+ };
2216
+ };
2217
+ };
1907
2218
  }
1908
2219
 
1909
2220
  export type { $defs, components, operations, paths };
package/dist/index.cjs CHANGED
@@ -522,6 +522,81 @@ class EApi {
522
522
  });
523
523
  }
524
524
  };
525
+ /**
526
+ * @tags presence-chats
527
+ */
528
+ presenceChats = {
529
+ /**
530
+ *
531
+ *
532
+ * @tags presence-chats
533
+ * @summary List presence chats with health stats
534
+ *
535
+ * [Documentation](.../presence-chats/operation/presenceChats.list)
536
+ */
537
+ list: (options) => {
538
+ return this.request("/presence-chats", void 0, {
539
+ method: "GET",
540
+ ...options
541
+ });
542
+ },
543
+ /**
544
+ *
545
+ *
546
+ * @tags presence-chats
547
+ * @summary Declarative sync — replace all presence chats
548
+ *
549
+ * [Documentation](.../presence-chats/operation/presenceChats.sync)
550
+ */
551
+ sync: (body, options) => {
552
+ return this.request("/presence-chats", body, {
553
+ method: "PUT",
554
+ ...options
555
+ });
556
+ },
557
+ /**
558
+ *
559
+ *
560
+ * @tags presence-chats
561
+ * @summary Add a chat for presence monitoring
562
+ *
563
+ * [Documentation](.../presence-chats/operation/presenceChats.create)
564
+ */
565
+ create: (body, options) => {
566
+ return this.request("/presence-chats", body, {
567
+ method: "POST",
568
+ ...options
569
+ });
570
+ },
571
+ /**
572
+ *
573
+ *
574
+ * @tags presence-chats
575
+ * @summary Update presence chat settings
576
+ *
577
+ * [Documentation](.../presence-chats/operation/presenceChats.update)
578
+ */
579
+ update: (id, body, options) => {
580
+ return this.request(`/presence-chats/${id}`, body, {
581
+ method: "PATCH",
582
+ ...options
583
+ });
584
+ },
585
+ /**
586
+ *
587
+ *
588
+ * @tags presence-chats
589
+ * @summary Remove a chat from presence monitoring
590
+ *
591
+ * [Documentation](.../presence-chats/operation/presenceChats.delete)
592
+ */
593
+ delete: (id, options) => {
594
+ return this.request(`/presence-chats/${id}`, void 0, {
595
+ method: "DELETE",
596
+ ...options
597
+ });
598
+ }
599
+ };
525
600
  /** @generated stop-generate-methods */
526
601
  }
527
602
 
package/dist/index.d.cts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { paths } from './api-types.cjs';
2
2
 
3
- type GetRequestBody<Path extends keyof paths, Method extends "get" | "post" | "put" | "delete", ContentType extends string = "application/json"> = paths[Path] extends {
3
+ type GetRequestBody<Path extends keyof paths, Method extends "get" | "post" | "put" | "patch" | "delete", ContentType extends string = "application/json"> = paths[Path] extends {
4
4
  [K in Method]: any;
5
5
  } ? paths[Path][Method] extends {
6
6
  requestBody?: {
7
7
  content: any;
8
8
  };
9
9
  } ? NonNullable<paths[Path][Method]["requestBody"]>["content"][ContentType] : never : never;
10
- type GetResponse<Path extends keyof paths, Method extends "get" | "post" | "put" | "delete"> = paths[Path] extends {
10
+ type GetResponse<Path extends keyof paths, Method extends "get" | "post" | "put" | "patch" | "delete"> = paths[Path] extends {
11
11
  [K in Method]: any;
12
12
  } ? paths[Path][Method] extends {
13
13
  responses: {
@@ -732,6 +732,56 @@ declare class EApi {
732
732
  */
733
733
  count: (body: GetRequestBody<"/send-tasks/count", "post">, options?: RequestOptions) => Promise<GetResponse<"/send-tasks/count", "post">>;
734
734
  };
735
+ /**
736
+ * @tags presence-chats
737
+ */
738
+ presenceChats: {
739
+ /**
740
+ *
741
+ *
742
+ * @tags presence-chats
743
+ * @summary List presence chats with health stats
744
+ *
745
+ * [Documentation](.../presence-chats/operation/presenceChats.list)
746
+ */
747
+ list: (options?: RequestOptions) => Promise<GetResponse<"/presence-chats", "get">>;
748
+ /**
749
+ *
750
+ *
751
+ * @tags presence-chats
752
+ * @summary Declarative sync — replace all presence chats
753
+ *
754
+ * [Documentation](.../presence-chats/operation/presenceChats.sync)
755
+ */
756
+ sync: (body: GetRequestBody<"/presence-chats", "put">, options?: RequestOptions) => Promise<GetResponse<"/presence-chats", "put">>;
757
+ /**
758
+ *
759
+ *
760
+ * @tags presence-chats
761
+ * @summary Add a chat for presence monitoring
762
+ *
763
+ * [Documentation](.../presence-chats/operation/presenceChats.create)
764
+ */
765
+ create: (body: GetRequestBody<"/presence-chats", "post">, options?: RequestOptions) => Promise<GetResponse<"/presence-chats", "post">>;
766
+ /**
767
+ *
768
+ *
769
+ * @tags presence-chats
770
+ * @summary Update presence chat settings
771
+ *
772
+ * [Documentation](.../presence-chats/operation/presenceChats.update)
773
+ */
774
+ update: (id: paths["/presence-chats/{id}"]["patch"]["parameters"]["path"]["id"], body: GetRequestBody<"/presence-chats/{id}", "patch">, options?: RequestOptions) => Promise<GetResponse<"/presence-chats/{id}", "patch">>;
775
+ /**
776
+ *
777
+ *
778
+ * @tags presence-chats
779
+ * @summary Remove a chat from presence monitoring
780
+ *
781
+ * [Documentation](.../presence-chats/operation/presenceChats.delete)
782
+ */
783
+ delete: (id: paths["/presence-chats/{id}"]["delete"]["parameters"]["path"]["id"], options?: RequestOptions) => Promise<GetResponse<"/presence-chats/{id}", "delete">>;
784
+ };
735
785
  }
736
786
 
737
787
  export { EApi, type EApiOptions, webhookHandler };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { paths } from './api-types.js';
2
2
 
3
- type GetRequestBody<Path extends keyof paths, Method extends "get" | "post" | "put" | "delete", ContentType extends string = "application/json"> = paths[Path] extends {
3
+ type GetRequestBody<Path extends keyof paths, Method extends "get" | "post" | "put" | "patch" | "delete", ContentType extends string = "application/json"> = paths[Path] extends {
4
4
  [K in Method]: any;
5
5
  } ? paths[Path][Method] extends {
6
6
  requestBody?: {
7
7
  content: any;
8
8
  };
9
9
  } ? NonNullable<paths[Path][Method]["requestBody"]>["content"][ContentType] : never : never;
10
- type GetResponse<Path extends keyof paths, Method extends "get" | "post" | "put" | "delete"> = paths[Path] extends {
10
+ type GetResponse<Path extends keyof paths, Method extends "get" | "post" | "put" | "patch" | "delete"> = paths[Path] extends {
11
11
  [K in Method]: any;
12
12
  } ? paths[Path][Method] extends {
13
13
  responses: {
@@ -732,6 +732,56 @@ declare class EApi {
732
732
  */
733
733
  count: (body: GetRequestBody<"/send-tasks/count", "post">, options?: RequestOptions) => Promise<GetResponse<"/send-tasks/count", "post">>;
734
734
  };
735
+ /**
736
+ * @tags presence-chats
737
+ */
738
+ presenceChats: {
739
+ /**
740
+ *
741
+ *
742
+ * @tags presence-chats
743
+ * @summary List presence chats with health stats
744
+ *
745
+ * [Documentation](.../presence-chats/operation/presenceChats.list)
746
+ */
747
+ list: (options?: RequestOptions) => Promise<GetResponse<"/presence-chats", "get">>;
748
+ /**
749
+ *
750
+ *
751
+ * @tags presence-chats
752
+ * @summary Declarative sync — replace all presence chats
753
+ *
754
+ * [Documentation](.../presence-chats/operation/presenceChats.sync)
755
+ */
756
+ sync: (body: GetRequestBody<"/presence-chats", "put">, options?: RequestOptions) => Promise<GetResponse<"/presence-chats", "put">>;
757
+ /**
758
+ *
759
+ *
760
+ * @tags presence-chats
761
+ * @summary Add a chat for presence monitoring
762
+ *
763
+ * [Documentation](.../presence-chats/operation/presenceChats.create)
764
+ */
765
+ create: (body: GetRequestBody<"/presence-chats", "post">, options?: RequestOptions) => Promise<GetResponse<"/presence-chats", "post">>;
766
+ /**
767
+ *
768
+ *
769
+ * @tags presence-chats
770
+ * @summary Update presence chat settings
771
+ *
772
+ * [Documentation](.../presence-chats/operation/presenceChats.update)
773
+ */
774
+ update: (id: paths["/presence-chats/{id}"]["patch"]["parameters"]["path"]["id"], body: GetRequestBody<"/presence-chats/{id}", "patch">, options?: RequestOptions) => Promise<GetResponse<"/presence-chats/{id}", "patch">>;
775
+ /**
776
+ *
777
+ *
778
+ * @tags presence-chats
779
+ * @summary Remove a chat from presence monitoring
780
+ *
781
+ * [Documentation](.../presence-chats/operation/presenceChats.delete)
782
+ */
783
+ delete: (id: paths["/presence-chats/{id}"]["delete"]["parameters"]["path"]["id"], options?: RequestOptions) => Promise<GetResponse<"/presence-chats/{id}", "delete">>;
784
+ };
735
785
  }
736
786
 
737
787
  export { EApi, type EApiOptions, webhookHandler };
package/dist/index.js CHANGED
@@ -520,6 +520,81 @@ class EApi {
520
520
  });
521
521
  }
522
522
  };
523
+ /**
524
+ * @tags presence-chats
525
+ */
526
+ presenceChats = {
527
+ /**
528
+ *
529
+ *
530
+ * @tags presence-chats
531
+ * @summary List presence chats with health stats
532
+ *
533
+ * [Documentation](.../presence-chats/operation/presenceChats.list)
534
+ */
535
+ list: (options) => {
536
+ return this.request("/presence-chats", void 0, {
537
+ method: "GET",
538
+ ...options
539
+ });
540
+ },
541
+ /**
542
+ *
543
+ *
544
+ * @tags presence-chats
545
+ * @summary Declarative sync — replace all presence chats
546
+ *
547
+ * [Documentation](.../presence-chats/operation/presenceChats.sync)
548
+ */
549
+ sync: (body, options) => {
550
+ return this.request("/presence-chats", body, {
551
+ method: "PUT",
552
+ ...options
553
+ });
554
+ },
555
+ /**
556
+ *
557
+ *
558
+ * @tags presence-chats
559
+ * @summary Add a chat for presence monitoring
560
+ *
561
+ * [Documentation](.../presence-chats/operation/presenceChats.create)
562
+ */
563
+ create: (body, options) => {
564
+ return this.request("/presence-chats", body, {
565
+ method: "POST",
566
+ ...options
567
+ });
568
+ },
569
+ /**
570
+ *
571
+ *
572
+ * @tags presence-chats
573
+ * @summary Update presence chat settings
574
+ *
575
+ * [Documentation](.../presence-chats/operation/presenceChats.update)
576
+ */
577
+ update: (id, body, options) => {
578
+ return this.request(`/presence-chats/${id}`, body, {
579
+ method: "PATCH",
580
+ ...options
581
+ });
582
+ },
583
+ /**
584
+ *
585
+ *
586
+ * @tags presence-chats
587
+ * @summary Remove a chat from presence monitoring
588
+ *
589
+ * [Documentation](.../presence-chats/operation/presenceChats.delete)
590
+ */
591
+ delete: (id, options) => {
592
+ return this.request(`/presence-chats/${id}`, void 0, {
593
+ method: "DELETE",
594
+ ...options
595
+ });
596
+ }
597
+ };
523
598
  /** @generated stop-generate-methods */
524
599
  }
525
600
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skravets/eapi",
3
- "version": "0.0.60",
3
+ "version": "0.0.62",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",