@skravets/eapi 0.0.18 → 0.0.20
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.
- package/dist/api-types.d.cts +1 -1
- package/dist/api-types.d.ts +1 -1
- package/dist/index.d.cts +39 -1
- package/dist/index.d.ts +39 -1
- package/package.json +1 -1
package/dist/api-types.d.cts
CHANGED
package/dist/api-types.d.ts
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -33,6 +33,7 @@ interface ChatStored {
|
|
|
33
33
|
last_offset_id: number;
|
|
34
34
|
last_parsed_date: string;
|
|
35
35
|
is_locked: boolean;
|
|
36
|
+
linked_chat_id: number | null;
|
|
36
37
|
}
|
|
37
38
|
interface MessageStored {
|
|
38
39
|
channel_id: number;
|
|
@@ -161,6 +162,42 @@ interface PublishersStatusQueueParsingError {
|
|
|
161
162
|
interface PublishersStatusQueueParsingErrorResult extends PublishersStatusQueueParsingError {
|
|
162
163
|
type: "parsing_error";
|
|
163
164
|
}
|
|
165
|
+
interface PublishersStatusQueueAccountUpdated {
|
|
166
|
+
id: number;
|
|
167
|
+
changes: AccountUpdateChanges;
|
|
168
|
+
}
|
|
169
|
+
interface PublishersStatusQueueAccountUpdatedResult extends PublishersStatusQueueAccountUpdated {
|
|
170
|
+
type: "account_updated";
|
|
171
|
+
}
|
|
172
|
+
type AccountUpdateChanges = AccountUnavailableUpdate | AccountProfileUpdate | AccountSpamBlockUpdate;
|
|
173
|
+
interface AccountUnavailableUpdate {
|
|
174
|
+
type: "unavailable";
|
|
175
|
+
updates: {
|
|
176
|
+
isBanned?: boolean;
|
|
177
|
+
isDisabled?: boolean;
|
|
178
|
+
isAccountFrozen?: boolean;
|
|
179
|
+
isAuthKeyDuplicated?: boolean;
|
|
180
|
+
isSessionRevoked?: boolean;
|
|
181
|
+
isAuthKeyUnregistered?: boolean;
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
interface AccountProfileUpdate {
|
|
185
|
+
type: "profile";
|
|
186
|
+
updates: {
|
|
187
|
+
tgId?: number;
|
|
188
|
+
firstName?: string;
|
|
189
|
+
lastName?: string;
|
|
190
|
+
username?: string;
|
|
191
|
+
bio?: string;
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
interface AccountSpamBlockUpdate {
|
|
195
|
+
type: "spam_block";
|
|
196
|
+
updates: {
|
|
197
|
+
spamBlockUntil?: string | null;
|
|
198
|
+
spamBlockReason?: string;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
164
201
|
interface EventByType {
|
|
165
202
|
chat_parsed: ChatParsedTyped;
|
|
166
203
|
messages_parsed: MessagesParsedTyped;
|
|
@@ -168,8 +205,9 @@ interface EventByType {
|
|
|
168
205
|
chat_send_result: PublishersStatusQueueInputSendResult;
|
|
169
206
|
agent_private_message: PublishersStatusQueueInputAgentPrivateMessageResult;
|
|
170
207
|
parsing_error: PublishersStatusQueueParsingErrorResult;
|
|
208
|
+
account_updated: PublishersStatusQueueAccountUpdatedResult;
|
|
171
209
|
}
|
|
172
|
-
type WebhookBody = ChatParsedTyped | MessagesParsedTyped | PublishersStatusQueueInputJoinResult | PublishersStatusQueueInputSendResult | PublishersStatusQueueInputAgentPrivateMessageResult | PublishersStatusQueueParsingErrorResult;
|
|
210
|
+
type WebhookBody = ChatParsedTyped | MessagesParsedTyped | PublishersStatusQueueInputJoinResult | PublishersStatusQueueInputSendResult | PublishersStatusQueueInputAgentPrivateMessageResult | PublishersStatusQueueParsingErrorResult | PublishersStatusQueueAccountUpdatedResult;
|
|
173
211
|
type WebhookBodyTypes = keyof EventByType;
|
|
174
212
|
|
|
175
213
|
declare const frameworks: {
|
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ interface ChatStored {
|
|
|
33
33
|
last_offset_id: number;
|
|
34
34
|
last_parsed_date: string;
|
|
35
35
|
is_locked: boolean;
|
|
36
|
+
linked_chat_id: number | null;
|
|
36
37
|
}
|
|
37
38
|
interface MessageStored {
|
|
38
39
|
channel_id: number;
|
|
@@ -161,6 +162,42 @@ interface PublishersStatusQueueParsingError {
|
|
|
161
162
|
interface PublishersStatusQueueParsingErrorResult extends PublishersStatusQueueParsingError {
|
|
162
163
|
type: "parsing_error";
|
|
163
164
|
}
|
|
165
|
+
interface PublishersStatusQueueAccountUpdated {
|
|
166
|
+
id: number;
|
|
167
|
+
changes: AccountUpdateChanges;
|
|
168
|
+
}
|
|
169
|
+
interface PublishersStatusQueueAccountUpdatedResult extends PublishersStatusQueueAccountUpdated {
|
|
170
|
+
type: "account_updated";
|
|
171
|
+
}
|
|
172
|
+
type AccountUpdateChanges = AccountUnavailableUpdate | AccountProfileUpdate | AccountSpamBlockUpdate;
|
|
173
|
+
interface AccountUnavailableUpdate {
|
|
174
|
+
type: "unavailable";
|
|
175
|
+
updates: {
|
|
176
|
+
isBanned?: boolean;
|
|
177
|
+
isDisabled?: boolean;
|
|
178
|
+
isAccountFrozen?: boolean;
|
|
179
|
+
isAuthKeyDuplicated?: boolean;
|
|
180
|
+
isSessionRevoked?: boolean;
|
|
181
|
+
isAuthKeyUnregistered?: boolean;
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
interface AccountProfileUpdate {
|
|
185
|
+
type: "profile";
|
|
186
|
+
updates: {
|
|
187
|
+
tgId?: number;
|
|
188
|
+
firstName?: string;
|
|
189
|
+
lastName?: string;
|
|
190
|
+
username?: string;
|
|
191
|
+
bio?: string;
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
interface AccountSpamBlockUpdate {
|
|
195
|
+
type: "spam_block";
|
|
196
|
+
updates: {
|
|
197
|
+
spamBlockUntil?: string | null;
|
|
198
|
+
spamBlockReason?: string;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
164
201
|
interface EventByType {
|
|
165
202
|
chat_parsed: ChatParsedTyped;
|
|
166
203
|
messages_parsed: MessagesParsedTyped;
|
|
@@ -168,8 +205,9 @@ interface EventByType {
|
|
|
168
205
|
chat_send_result: PublishersStatusQueueInputSendResult;
|
|
169
206
|
agent_private_message: PublishersStatusQueueInputAgentPrivateMessageResult;
|
|
170
207
|
parsing_error: PublishersStatusQueueParsingErrorResult;
|
|
208
|
+
account_updated: PublishersStatusQueueAccountUpdatedResult;
|
|
171
209
|
}
|
|
172
|
-
type WebhookBody = ChatParsedTyped | MessagesParsedTyped | PublishersStatusQueueInputJoinResult | PublishersStatusQueueInputSendResult | PublishersStatusQueueInputAgentPrivateMessageResult | PublishersStatusQueueParsingErrorResult;
|
|
210
|
+
type WebhookBody = ChatParsedTyped | MessagesParsedTyped | PublishersStatusQueueInputJoinResult | PublishersStatusQueueInputSendResult | PublishersStatusQueueInputAgentPrivateMessageResult | PublishersStatusQueueParsingErrorResult | PublishersStatusQueueAccountUpdatedResult;
|
|
173
211
|
type WebhookBodyTypes = keyof EventByType;
|
|
174
212
|
|
|
175
213
|
declare const frameworks: {
|