@vm0/cli 9.136.0 → 9.137.0
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/{chunk-5F6QHYHS.js → chunk-HH2HTGSA.js} +77 -3
- package/{chunk-5F6QHYHS.js.map → chunk-HH2HTGSA.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +165 -15
- package/zero.js.map +1 -1
|
@@ -66716,7 +66716,7 @@ if (DSN) {
|
|
|
66716
66716
|
init2({
|
|
66717
66717
|
dsn: DSN,
|
|
66718
66718
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
66719
|
-
release: "9.
|
|
66719
|
+
release: "9.137.0",
|
|
66720
66720
|
sendDefaultPii: false,
|
|
66721
66721
|
tracesSampleRate: 0,
|
|
66722
66722
|
shutdownTimeout: 500,
|
|
@@ -66735,7 +66735,7 @@ if (DSN) {
|
|
|
66735
66735
|
}
|
|
66736
66736
|
});
|
|
66737
66737
|
setContext("cli", {
|
|
66738
|
-
version: "9.
|
|
66738
|
+
version: "9.137.0",
|
|
66739
66739
|
command: process.argv.slice(2).join(" ")
|
|
66740
66740
|
});
|
|
66741
66741
|
setContext("runtime", {
|
|
@@ -96749,6 +96749,60 @@ var integrationsSlackMessageContract = c21.router({
|
|
|
96749
96749
|
summary: "Send a Slack message via org bot token"
|
|
96750
96750
|
}
|
|
96751
96751
|
});
|
|
96752
|
+
var sendTelegramMessageBodySchema = external_exports.object({
|
|
96753
|
+
botId: external_exports.string().min(1, "Bot ID is required"),
|
|
96754
|
+
chatId: external_exports.string().min(1, "Chat ID is required"),
|
|
96755
|
+
text: external_exports.string().min(1, "Message text is required"),
|
|
96756
|
+
replyToMessageId: external_exports.number().int().positive().optional(),
|
|
96757
|
+
messageThreadId: external_exports.number().int().positive().optional()
|
|
96758
|
+
});
|
|
96759
|
+
var sendTelegramMessageResponseSchema = external_exports.object({
|
|
96760
|
+
ok: external_exports.literal(true),
|
|
96761
|
+
messageId: external_exports.number().int(),
|
|
96762
|
+
chatId: external_exports.string()
|
|
96763
|
+
});
|
|
96764
|
+
var integrationsTelegramMessageContract = c21.router({
|
|
96765
|
+
sendMessage: {
|
|
96766
|
+
method: "POST",
|
|
96767
|
+
path: "/api/zero/integrations/telegram/message",
|
|
96768
|
+
headers: authHeadersSchema,
|
|
96769
|
+
body: sendTelegramMessageBodySchema,
|
|
96770
|
+
responses: {
|
|
96771
|
+
200: sendTelegramMessageResponseSchema,
|
|
96772
|
+
400: apiErrorSchema,
|
|
96773
|
+
401: apiErrorSchema,
|
|
96774
|
+
403: apiErrorSchema,
|
|
96775
|
+
404: apiErrorSchema,
|
|
96776
|
+
502: apiErrorSchema
|
|
96777
|
+
},
|
|
96778
|
+
summary: "Send a Telegram message via org bot token"
|
|
96779
|
+
}
|
|
96780
|
+
});
|
|
96781
|
+
var telegramBotTokenStatusSchema = external_exports.enum(["valid", "invalid", "unknown"]);
|
|
96782
|
+
var telegramBotListItemSchema = external_exports.object({
|
|
96783
|
+
id: external_exports.string(),
|
|
96784
|
+
username: external_exports.string().nullable(),
|
|
96785
|
+
agent: external_exports.object({ id: external_exports.string(), name: external_exports.string() }).nullable(),
|
|
96786
|
+
isOwner: external_exports.boolean(),
|
|
96787
|
+
isConnected: external_exports.boolean(),
|
|
96788
|
+
tokenStatus: telegramBotTokenStatusSchema
|
|
96789
|
+
});
|
|
96790
|
+
var listTelegramBotsResponseSchema = external_exports.object({
|
|
96791
|
+
bots: external_exports.array(telegramBotListItemSchema)
|
|
96792
|
+
});
|
|
96793
|
+
var integrationsTelegramBotListContract = c21.router({
|
|
96794
|
+
listBots: {
|
|
96795
|
+
method: "GET",
|
|
96796
|
+
path: "/api/zero/integrations/telegram/bots",
|
|
96797
|
+
headers: authHeadersSchema,
|
|
96798
|
+
responses: {
|
|
96799
|
+
200: listTelegramBotsResponseSchema,
|
|
96800
|
+
401: apiErrorSchema,
|
|
96801
|
+
403: apiErrorSchema
|
|
96802
|
+
},
|
|
96803
|
+
summary: "List Telegram bots available in the authenticated user's org"
|
|
96804
|
+
}
|
|
96805
|
+
});
|
|
96752
96806
|
var slackUploadInitBodySchema = external_exports.object({
|
|
96753
96807
|
filename: external_exports.string().min(1, "Filename is required"),
|
|
96754
96808
|
length: external_exports.number().int().positive("File length must be a positive integer")
|
|
@@ -96972,6 +97026,24 @@ init_esm_shims();
|
|
|
96972
97026
|
import { createWriteStream as createWriteStream2 } from "fs";
|
|
96973
97027
|
import { Readable as Readable3 } from "stream";
|
|
96974
97028
|
import { pipeline as pipeline2 } from "stream/promises";
|
|
97029
|
+
async function listTelegramBots() {
|
|
97030
|
+
const config4 = await getClientConfig();
|
|
97031
|
+
const client = initClient(integrationsTelegramBotListContract, config4);
|
|
97032
|
+
const result = await client.listBots({ headers: {} });
|
|
97033
|
+
if (result.status === 200) {
|
|
97034
|
+
return result.body;
|
|
97035
|
+
}
|
|
97036
|
+
handleError(result, "Failed to list Telegram bots");
|
|
97037
|
+
}
|
|
97038
|
+
async function sendTelegramMessage(body) {
|
|
97039
|
+
const config4 = await getClientConfig();
|
|
97040
|
+
const client = initClient(integrationsTelegramMessageContract, config4);
|
|
97041
|
+
const result = await client.sendMessage({ body, headers: {} });
|
|
97042
|
+
if (result.status === 200) {
|
|
97043
|
+
return result.body;
|
|
97044
|
+
}
|
|
97045
|
+
handleError(result, "Failed to send Telegram message");
|
|
97046
|
+
}
|
|
96975
97047
|
async function initTelegramFileUpload(body) {
|
|
96976
97048
|
const config4 = await getClientConfig();
|
|
96977
97049
|
const client = initClient(integrationsTelegramUploadInitContract, config4);
|
|
@@ -98727,6 +98799,8 @@ export {
|
|
|
98727
98799
|
initSlackFileUpload,
|
|
98728
98800
|
completeSlackFileUpload,
|
|
98729
98801
|
downloadSlackFile,
|
|
98802
|
+
listTelegramBots,
|
|
98803
|
+
sendTelegramMessage,
|
|
98730
98804
|
initTelegramFileUpload,
|
|
98731
98805
|
completeTelegramFileUpload,
|
|
98732
98806
|
downloadTelegramFile,
|
|
@@ -98790,4 +98864,4 @@ undici/lib/web/fetch/body.js:
|
|
|
98790
98864
|
undici/lib/web/websocket/frame.js:
|
|
98791
98865
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
98792
98866
|
*/
|
|
98793
|
-
//# sourceMappingURL=chunk-
|
|
98867
|
+
//# sourceMappingURL=chunk-HH2HTGSA.js.map
|