@skravets/eapi 0.0.59 → 0.0.61

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-03T15:52:02.744Z
146
+ * @example 2026-03-11T01:57:02.609Z
133
147
  */
134
148
  message_created_at: string;
135
149
  /** @example 123 */
@@ -307,6 +321,16 @@ interface components {
307
321
  metadata?: {
308
322
  [key: string]: unknown;
309
323
  };
324
+ /**
325
+ * @description Template variables for {{placeholder}} substitution in message text. Fallback: empty string.
326
+ * @example {
327
+ * "name": "John",
328
+ * "promo": "SALE20"
329
+ * }
330
+ */
331
+ variables?: {
332
+ [key: string]: string | undefined;
333
+ };
310
334
  };
311
335
  IDeleteMessage: {
312
336
  /**
@@ -937,6 +961,28 @@ interface components {
937
961
  */
938
962
  restoredCount: number;
939
963
  };
964
+ VariablesSetDto: {
965
+ /**
966
+ * @description Set variables (replace all)
967
+ * @example {
968
+ * "key": "value"
969
+ * }
970
+ */
971
+ set: {
972
+ [key: string]: string | undefined;
973
+ };
974
+ };
975
+ VariablesMergeDto: {
976
+ /**
977
+ * @description Merge variables (update existing, add new)
978
+ * @example {
979
+ * "key": "value"
980
+ * }
981
+ */
982
+ merge: {
983
+ [key: string]: string | undefined;
984
+ };
985
+ };
940
986
  TextReplaceDto: {
941
987
  /**
942
988
  * @description Text to replace
@@ -962,7 +1008,9 @@ interface components {
962
1008
  replaceMimicUrl?: components["schemas"]["MimicProductUrlDto"];
963
1009
  };
964
1010
  EditOperationDto: {
965
- text: components["schemas"]["EditTextDto"];
1011
+ text?: components["schemas"]["EditTextDto"];
1012
+ /** @description Set or merge variables */
1013
+ variables?: components["schemas"]["VariablesSetDto"] | components["schemas"]["VariablesMergeDto"];
966
1014
  };
967
1015
  EditSendTasksRequestDto: {
968
1016
  filter: components["schemas"]["SendTaskFilterDto"];
@@ -996,6 +1044,110 @@ interface components {
996
1044
  */
997
1045
  count: number;
998
1046
  };
1047
+ PresenceChatDto: {
1048
+ /** @example 1 */
1049
+ id: number;
1050
+ /**
1051
+ * @description Chat username without @
1052
+ * @example somechat
1053
+ */
1054
+ chatUsername: string;
1055
+ /**
1056
+ * @description Desired number of healthy accounts in chat
1057
+ * @example 3
1058
+ */
1059
+ desiredMemberCount: number;
1060
+ /**
1061
+ * @description Telegram peer ID, null until resolved
1062
+ * @example 1234567890
1063
+ */
1064
+ peerId: null | number;
1065
+ /**
1066
+ * @description Normalized (always positive) peer ID
1067
+ * @example 1234567890
1068
+ */
1069
+ normalizedPeerId: null | number;
1070
+ /** @example true */
1071
+ isEnabled: boolean;
1072
+ /**
1073
+ * @description Current count of healthy accounts in chat
1074
+ * @example 2
1075
+ */
1076
+ healthyMemberCount: number;
1077
+ /** @example 2026-03-11T10:00:00.000Z */
1078
+ createdAt: string;
1079
+ /** @example 2026-03-11T10:05:00.000Z */
1080
+ updatedAt: string;
1081
+ };
1082
+ ListPresenceChatsResponseDto: {
1083
+ count: number;
1084
+ presenceChats: components["schemas"]["PresenceChatDto"][];
1085
+ };
1086
+ SyncPresenceChatItemDto: {
1087
+ /**
1088
+ * @description Chat username without @
1089
+ * @example somechat
1090
+ */
1091
+ chatUsername: string;
1092
+ /**
1093
+ * @description Desired healthy account count (>= 1)
1094
+ * @default 1
1095
+ * @example 3
1096
+ */
1097
+ desiredMemberCount: number;
1098
+ };
1099
+ SyncPresenceChatsDto: {
1100
+ /** @description Desired list of presence chats (replaces all existing) */
1101
+ chats: components["schemas"]["SyncPresenceChatItemDto"][];
1102
+ };
1103
+ SyncPresenceChatsResponseDto: {
1104
+ count: number;
1105
+ presenceChats: components["schemas"]["PresenceChatDto"][];
1106
+ /**
1107
+ * @description Number of chats added
1108
+ * @example 1
1109
+ */
1110
+ added: number;
1111
+ /**
1112
+ * @description Number of chats updated
1113
+ * @example 1
1114
+ */
1115
+ updated: number;
1116
+ /**
1117
+ * @description Number of chats deleted
1118
+ * @example 2
1119
+ */
1120
+ deleted: number;
1121
+ };
1122
+ CreatePresenceChatDto: {
1123
+ /**
1124
+ * @description Chat username without @
1125
+ * @example somechat
1126
+ */
1127
+ chatUsername: string;
1128
+ /**
1129
+ * @description Desired healthy account count (>= 1)
1130
+ * @default 1
1131
+ * @example 3
1132
+ */
1133
+ desiredMemberCount: number;
1134
+ };
1135
+ UpdatePresenceChatDto: {
1136
+ /**
1137
+ * @description Desired healthy account count (>= 1)
1138
+ * @example 5
1139
+ */
1140
+ desiredMemberCount?: number;
1141
+ /**
1142
+ * @description Enable/disable presence monitoring
1143
+ * @example false
1144
+ */
1145
+ isEnabled?: boolean;
1146
+ };
1147
+ DeletePresenceChatResponseDto: {
1148
+ /** @example true */
1149
+ deleted: boolean;
1150
+ };
999
1151
  };
1000
1152
  }
1001
1153
  type $defs = Record<string, never>;
@@ -1894,6 +2046,170 @@ interface operations {
1894
2046
  };
1895
2047
  };
1896
2048
  };
2049
+ "presenceChats.list": {
2050
+ parameters: {
2051
+ header: {
2052
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2053
+ Authorization: string;
2054
+ };
2055
+ };
2056
+ responses: {
2057
+ /** @description List of presence chats with healthy member counts */
2058
+ 200: {
2059
+ headers: {
2060
+ [name: string]: unknown;
2061
+ };
2062
+ content: {
2063
+ "application/json": components["schemas"]["ListPresenceChatsResponseDto"];
2064
+ };
2065
+ };
2066
+ /** @description Unauthorized */
2067
+ 401: {
2068
+ headers: {
2069
+ [name: string]: unknown;
2070
+ };
2071
+ };
2072
+ };
2073
+ };
2074
+ "presenceChats.sync": {
2075
+ parameters: {
2076
+ header: {
2077
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2078
+ Authorization: string;
2079
+ };
2080
+ };
2081
+ requestBody: {
2082
+ content: {
2083
+ "application/json": components["schemas"]["SyncPresenceChatsDto"];
2084
+ };
2085
+ };
2086
+ responses: {
2087
+ /** @description Sync result with added/updated/deleted counts */
2088
+ 200: {
2089
+ headers: {
2090
+ [name: string]: unknown;
2091
+ };
2092
+ content: {
2093
+ "application/json": components["schemas"]["SyncPresenceChatsResponseDto"];
2094
+ };
2095
+ };
2096
+ /** @description Unauthorized */
2097
+ 401: {
2098
+ headers: {
2099
+ [name: string]: unknown;
2100
+ };
2101
+ };
2102
+ };
2103
+ };
2104
+ "presenceChats.create": {
2105
+ parameters: {
2106
+ header: {
2107
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2108
+ Authorization: string;
2109
+ };
2110
+ };
2111
+ requestBody: {
2112
+ content: {
2113
+ "application/json": components["schemas"]["CreatePresenceChatDto"];
2114
+ };
2115
+ };
2116
+ responses: {
2117
+ /** @description Presence chat created */
2118
+ 201: {
2119
+ headers: {
2120
+ [name: string]: unknown;
2121
+ };
2122
+ content: {
2123
+ "application/json": components["schemas"]["PresenceChatDto"];
2124
+ };
2125
+ };
2126
+ /** @description Unauthorized */
2127
+ 401: {
2128
+ headers: {
2129
+ [name: string]: unknown;
2130
+ };
2131
+ };
2132
+ /** @description Chat username already exists */
2133
+ 409: {
2134
+ headers: {
2135
+ [name: string]: unknown;
2136
+ };
2137
+ };
2138
+ };
2139
+ };
2140
+ "presenceChats.delete": {
2141
+ parameters: {
2142
+ header: {
2143
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2144
+ Authorization: string;
2145
+ };
2146
+ path: {
2147
+ id: number;
2148
+ };
2149
+ };
2150
+ responses: {
2151
+ /** @description Presence chat deleted */
2152
+ 200: {
2153
+ headers: {
2154
+ [name: string]: unknown;
2155
+ };
2156
+ content: {
2157
+ "application/json": components["schemas"]["DeletePresenceChatResponseDto"];
2158
+ };
2159
+ };
2160
+ /** @description Unauthorized */
2161
+ 401: {
2162
+ headers: {
2163
+ [name: string]: unknown;
2164
+ };
2165
+ };
2166
+ /** @description Presence chat not found */
2167
+ 404: {
2168
+ headers: {
2169
+ [name: string]: unknown;
2170
+ };
2171
+ };
2172
+ };
2173
+ };
2174
+ "presenceChats.update": {
2175
+ parameters: {
2176
+ header: {
2177
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2178
+ Authorization: string;
2179
+ };
2180
+ path: {
2181
+ id: number;
2182
+ };
2183
+ };
2184
+ requestBody: {
2185
+ content: {
2186
+ "application/json": components["schemas"]["UpdatePresenceChatDto"];
2187
+ };
2188
+ };
2189
+ responses: {
2190
+ /** @description Presence chat updated */
2191
+ 200: {
2192
+ headers: {
2193
+ [name: string]: unknown;
2194
+ };
2195
+ content: {
2196
+ "application/json": components["schemas"]["PresenceChatDto"];
2197
+ };
2198
+ };
2199
+ /** @description Unauthorized */
2200
+ 401: {
2201
+ headers: {
2202
+ [name: string]: unknown;
2203
+ };
2204
+ };
2205
+ /** @description Presence chat not found */
2206
+ 404: {
2207
+ headers: {
2208
+ [name: string]: unknown;
2209
+ };
2210
+ };
2211
+ };
2212
+ };
1897
2213
  }
1898
2214
 
1899
2215
  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-03T15:52:02.744Z
146
+ * @example 2026-03-11T01:57:02.609Z
133
147
  */
134
148
  message_created_at: string;
135
149
  /** @example 123 */
@@ -307,6 +321,16 @@ interface components {
307
321
  metadata?: {
308
322
  [key: string]: unknown;
309
323
  };
324
+ /**
325
+ * @description Template variables for {{placeholder}} substitution in message text. Fallback: empty string.
326
+ * @example {
327
+ * "name": "John",
328
+ * "promo": "SALE20"
329
+ * }
330
+ */
331
+ variables?: {
332
+ [key: string]: string | undefined;
333
+ };
310
334
  };
311
335
  IDeleteMessage: {
312
336
  /**
@@ -937,6 +961,28 @@ interface components {
937
961
  */
938
962
  restoredCount: number;
939
963
  };
964
+ VariablesSetDto: {
965
+ /**
966
+ * @description Set variables (replace all)
967
+ * @example {
968
+ * "key": "value"
969
+ * }
970
+ */
971
+ set: {
972
+ [key: string]: string | undefined;
973
+ };
974
+ };
975
+ VariablesMergeDto: {
976
+ /**
977
+ * @description Merge variables (update existing, add new)
978
+ * @example {
979
+ * "key": "value"
980
+ * }
981
+ */
982
+ merge: {
983
+ [key: string]: string | undefined;
984
+ };
985
+ };
940
986
  TextReplaceDto: {
941
987
  /**
942
988
  * @description Text to replace
@@ -962,7 +1008,9 @@ interface components {
962
1008
  replaceMimicUrl?: components["schemas"]["MimicProductUrlDto"];
963
1009
  };
964
1010
  EditOperationDto: {
965
- text: components["schemas"]["EditTextDto"];
1011
+ text?: components["schemas"]["EditTextDto"];
1012
+ /** @description Set or merge variables */
1013
+ variables?: components["schemas"]["VariablesSetDto"] | components["schemas"]["VariablesMergeDto"];
966
1014
  };
967
1015
  EditSendTasksRequestDto: {
968
1016
  filter: components["schemas"]["SendTaskFilterDto"];
@@ -996,6 +1044,110 @@ interface components {
996
1044
  */
997
1045
  count: number;
998
1046
  };
1047
+ PresenceChatDto: {
1048
+ /** @example 1 */
1049
+ id: number;
1050
+ /**
1051
+ * @description Chat username without @
1052
+ * @example somechat
1053
+ */
1054
+ chatUsername: string;
1055
+ /**
1056
+ * @description Desired number of healthy accounts in chat
1057
+ * @example 3
1058
+ */
1059
+ desiredMemberCount: number;
1060
+ /**
1061
+ * @description Telegram peer ID, null until resolved
1062
+ * @example 1234567890
1063
+ */
1064
+ peerId: null | number;
1065
+ /**
1066
+ * @description Normalized (always positive) peer ID
1067
+ * @example 1234567890
1068
+ */
1069
+ normalizedPeerId: null | number;
1070
+ /** @example true */
1071
+ isEnabled: boolean;
1072
+ /**
1073
+ * @description Current count of healthy accounts in chat
1074
+ * @example 2
1075
+ */
1076
+ healthyMemberCount: number;
1077
+ /** @example 2026-03-11T10:00:00.000Z */
1078
+ createdAt: string;
1079
+ /** @example 2026-03-11T10:05:00.000Z */
1080
+ updatedAt: string;
1081
+ };
1082
+ ListPresenceChatsResponseDto: {
1083
+ count: number;
1084
+ presenceChats: components["schemas"]["PresenceChatDto"][];
1085
+ };
1086
+ SyncPresenceChatItemDto: {
1087
+ /**
1088
+ * @description Chat username without @
1089
+ * @example somechat
1090
+ */
1091
+ chatUsername: string;
1092
+ /**
1093
+ * @description Desired healthy account count (>= 1)
1094
+ * @default 1
1095
+ * @example 3
1096
+ */
1097
+ desiredMemberCount: number;
1098
+ };
1099
+ SyncPresenceChatsDto: {
1100
+ /** @description Desired list of presence chats (replaces all existing) */
1101
+ chats: components["schemas"]["SyncPresenceChatItemDto"][];
1102
+ };
1103
+ SyncPresenceChatsResponseDto: {
1104
+ count: number;
1105
+ presenceChats: components["schemas"]["PresenceChatDto"][];
1106
+ /**
1107
+ * @description Number of chats added
1108
+ * @example 1
1109
+ */
1110
+ added: number;
1111
+ /**
1112
+ * @description Number of chats updated
1113
+ * @example 1
1114
+ */
1115
+ updated: number;
1116
+ /**
1117
+ * @description Number of chats deleted
1118
+ * @example 2
1119
+ */
1120
+ deleted: number;
1121
+ };
1122
+ CreatePresenceChatDto: {
1123
+ /**
1124
+ * @description Chat username without @
1125
+ * @example somechat
1126
+ */
1127
+ chatUsername: string;
1128
+ /**
1129
+ * @description Desired healthy account count (>= 1)
1130
+ * @default 1
1131
+ * @example 3
1132
+ */
1133
+ desiredMemberCount: number;
1134
+ };
1135
+ UpdatePresenceChatDto: {
1136
+ /**
1137
+ * @description Desired healthy account count (>= 1)
1138
+ * @example 5
1139
+ */
1140
+ desiredMemberCount?: number;
1141
+ /**
1142
+ * @description Enable/disable presence monitoring
1143
+ * @example false
1144
+ */
1145
+ isEnabled?: boolean;
1146
+ };
1147
+ DeletePresenceChatResponseDto: {
1148
+ /** @example true */
1149
+ deleted: boolean;
1150
+ };
999
1151
  };
1000
1152
  }
1001
1153
  type $defs = Record<string, never>;
@@ -1894,6 +2046,170 @@ interface operations {
1894
2046
  };
1895
2047
  };
1896
2048
  };
2049
+ "presenceChats.list": {
2050
+ parameters: {
2051
+ header: {
2052
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2053
+ Authorization: string;
2054
+ };
2055
+ };
2056
+ responses: {
2057
+ /** @description List of presence chats with healthy member counts */
2058
+ 200: {
2059
+ headers: {
2060
+ [name: string]: unknown;
2061
+ };
2062
+ content: {
2063
+ "application/json": components["schemas"]["ListPresenceChatsResponseDto"];
2064
+ };
2065
+ };
2066
+ /** @description Unauthorized */
2067
+ 401: {
2068
+ headers: {
2069
+ [name: string]: unknown;
2070
+ };
2071
+ };
2072
+ };
2073
+ };
2074
+ "presenceChats.sync": {
2075
+ parameters: {
2076
+ header: {
2077
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2078
+ Authorization: string;
2079
+ };
2080
+ };
2081
+ requestBody: {
2082
+ content: {
2083
+ "application/json": components["schemas"]["SyncPresenceChatsDto"];
2084
+ };
2085
+ };
2086
+ responses: {
2087
+ /** @description Sync result with added/updated/deleted counts */
2088
+ 200: {
2089
+ headers: {
2090
+ [name: string]: unknown;
2091
+ };
2092
+ content: {
2093
+ "application/json": components["schemas"]["SyncPresenceChatsResponseDto"];
2094
+ };
2095
+ };
2096
+ /** @description Unauthorized */
2097
+ 401: {
2098
+ headers: {
2099
+ [name: string]: unknown;
2100
+ };
2101
+ };
2102
+ };
2103
+ };
2104
+ "presenceChats.create": {
2105
+ parameters: {
2106
+ header: {
2107
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2108
+ Authorization: string;
2109
+ };
2110
+ };
2111
+ requestBody: {
2112
+ content: {
2113
+ "application/json": components["schemas"]["CreatePresenceChatDto"];
2114
+ };
2115
+ };
2116
+ responses: {
2117
+ /** @description Presence chat created */
2118
+ 201: {
2119
+ headers: {
2120
+ [name: string]: unknown;
2121
+ };
2122
+ content: {
2123
+ "application/json": components["schemas"]["PresenceChatDto"];
2124
+ };
2125
+ };
2126
+ /** @description Unauthorized */
2127
+ 401: {
2128
+ headers: {
2129
+ [name: string]: unknown;
2130
+ };
2131
+ };
2132
+ /** @description Chat username already exists */
2133
+ 409: {
2134
+ headers: {
2135
+ [name: string]: unknown;
2136
+ };
2137
+ };
2138
+ };
2139
+ };
2140
+ "presenceChats.delete": {
2141
+ parameters: {
2142
+ header: {
2143
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2144
+ Authorization: string;
2145
+ };
2146
+ path: {
2147
+ id: number;
2148
+ };
2149
+ };
2150
+ responses: {
2151
+ /** @description Presence chat deleted */
2152
+ 200: {
2153
+ headers: {
2154
+ [name: string]: unknown;
2155
+ };
2156
+ content: {
2157
+ "application/json": components["schemas"]["DeletePresenceChatResponseDto"];
2158
+ };
2159
+ };
2160
+ /** @description Unauthorized */
2161
+ 401: {
2162
+ headers: {
2163
+ [name: string]: unknown;
2164
+ };
2165
+ };
2166
+ /** @description Presence chat not found */
2167
+ 404: {
2168
+ headers: {
2169
+ [name: string]: unknown;
2170
+ };
2171
+ };
2172
+ };
2173
+ };
2174
+ "presenceChats.update": {
2175
+ parameters: {
2176
+ header: {
2177
+ /** @description `Basic token`, where token is `id:secret` base64 encoded */
2178
+ Authorization: string;
2179
+ };
2180
+ path: {
2181
+ id: number;
2182
+ };
2183
+ };
2184
+ requestBody: {
2185
+ content: {
2186
+ "application/json": components["schemas"]["UpdatePresenceChatDto"];
2187
+ };
2188
+ };
2189
+ responses: {
2190
+ /** @description Presence chat updated */
2191
+ 200: {
2192
+ headers: {
2193
+ [name: string]: unknown;
2194
+ };
2195
+ content: {
2196
+ "application/json": components["schemas"]["PresenceChatDto"];
2197
+ };
2198
+ };
2199
+ /** @description Unauthorized */
2200
+ 401: {
2201
+ headers: {
2202
+ [name: string]: unknown;
2203
+ };
2204
+ };
2205
+ /** @description Presence chat not found */
2206
+ 404: {
2207
+ headers: {
2208
+ [name: string]: unknown;
2209
+ };
2210
+ };
2211
+ };
2212
+ };
1897
2213
  }
1898
2214
 
1899
2215
  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.59",
3
+ "version": "0.0.61",
4
4
  "module": "./dist/index.js",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",