@vm0/cli 9.134.1 → 9.135.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-2MZO4LKL.js → chunk-7C3QXZRH.js} +85 -3
- package/{chunk-2MZO4LKL.js.map → chunk-7C3QXZRH.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +118 -9
- 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.135.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.135.0",
|
|
66739
66739
|
command: process.argv.slice(2).join(" ")
|
|
66740
66740
|
});
|
|
66741
66741
|
setContext("runtime", {
|
|
@@ -96769,6 +96769,68 @@ var integrationsSlackUploadInitContract = c21.router({
|
|
|
96769
96769
|
summary: "Get a pre-signed Slack upload URL via org bot token"
|
|
96770
96770
|
}
|
|
96771
96771
|
});
|
|
96772
|
+
var telegramUploadInitBodySchema = external_exports.object({
|
|
96773
|
+
filename: external_exports.string().min(1, "Filename is required").max(255),
|
|
96774
|
+
contentType: external_exports.string().min(1, "Content type is required").max(200),
|
|
96775
|
+
length: external_exports.number().int().positive("File length must be a positive integer")
|
|
96776
|
+
});
|
|
96777
|
+
var telegramUploadInitResponseSchema = external_exports.object({
|
|
96778
|
+
uploadId: external_exports.string().uuid(),
|
|
96779
|
+
uploadUrl: external_exports.string(),
|
|
96780
|
+
fileUrl: external_exports.string(),
|
|
96781
|
+
filename: external_exports.string(),
|
|
96782
|
+
contentType: external_exports.string(),
|
|
96783
|
+
size: external_exports.number().int().nonnegative()
|
|
96784
|
+
});
|
|
96785
|
+
var integrationsTelegramUploadInitContract = c21.router({
|
|
96786
|
+
init: {
|
|
96787
|
+
method: "POST",
|
|
96788
|
+
path: "/api/zero/integrations/telegram/upload-file/init",
|
|
96789
|
+
headers: authHeadersSchema,
|
|
96790
|
+
body: telegramUploadInitBodySchema,
|
|
96791
|
+
responses: {
|
|
96792
|
+
200: telegramUploadInitResponseSchema,
|
|
96793
|
+
400: apiErrorSchema,
|
|
96794
|
+
401: apiErrorSchema,
|
|
96795
|
+
403: apiErrorSchema
|
|
96796
|
+
},
|
|
96797
|
+
summary: "Get a pre-signed upload URL for Telegram file delivery"
|
|
96798
|
+
}
|
|
96799
|
+
});
|
|
96800
|
+
var telegramUploadCompleteBodySchema = external_exports.object({
|
|
96801
|
+
uploadId: external_exports.string().uuid("Upload ID must be a UUID"),
|
|
96802
|
+
botId: external_exports.string().min(1, "Bot ID is required"),
|
|
96803
|
+
chatId: external_exports.string().min(1, "Chat ID is required"),
|
|
96804
|
+
contentType: external_exports.string().min(1).max(200).optional(),
|
|
96805
|
+
caption: external_exports.string().max(1024).optional(),
|
|
96806
|
+
messageThreadId: external_exports.number().int().positive().optional()
|
|
96807
|
+
});
|
|
96808
|
+
var telegramUploadCompleteResponseSchema = external_exports.object({
|
|
96809
|
+
messageId: external_exports.number().int(),
|
|
96810
|
+
chatId: external_exports.string(),
|
|
96811
|
+
fileId: external_exports.string().optional(),
|
|
96812
|
+
filename: external_exports.string(),
|
|
96813
|
+
mimetype: external_exports.string(),
|
|
96814
|
+
size: external_exports.number().int().nonnegative(),
|
|
96815
|
+
url: external_exports.string()
|
|
96816
|
+
});
|
|
96817
|
+
var integrationsTelegramUploadCompleteContract = c21.router({
|
|
96818
|
+
complete: {
|
|
96819
|
+
method: "POST",
|
|
96820
|
+
path: "/api/zero/integrations/telegram/upload-file/complete",
|
|
96821
|
+
headers: authHeadersSchema,
|
|
96822
|
+
body: telegramUploadCompleteBodySchema,
|
|
96823
|
+
responses: {
|
|
96824
|
+
200: telegramUploadCompleteResponseSchema,
|
|
96825
|
+
400: apiErrorSchema,
|
|
96826
|
+
401: apiErrorSchema,
|
|
96827
|
+
403: apiErrorSchema,
|
|
96828
|
+
404: apiErrorSchema,
|
|
96829
|
+
502: apiErrorSchema
|
|
96830
|
+
},
|
|
96831
|
+
summary: "Finalize Telegram file upload and send it to a chat"
|
|
96832
|
+
}
|
|
96833
|
+
});
|
|
96772
96834
|
var slackUploadCompleteBodySchema = external_exports.object({
|
|
96773
96835
|
fileId: external_exports.string().min(1, "File ID is required"),
|
|
96774
96836
|
channel: external_exports.string().min(1, "Channel ID is required"),
|
|
@@ -96906,6 +96968,24 @@ init_esm_shims();
|
|
|
96906
96968
|
import { createWriteStream as createWriteStream2 } from "fs";
|
|
96907
96969
|
import { Readable as Readable3 } from "stream";
|
|
96908
96970
|
import { pipeline as pipeline2 } from "stream/promises";
|
|
96971
|
+
async function initTelegramFileUpload(body) {
|
|
96972
|
+
const config4 = await getClientConfig();
|
|
96973
|
+
const client = initClient(integrationsTelegramUploadInitContract, config4);
|
|
96974
|
+
const result = await client.init({ body, headers: {} });
|
|
96975
|
+
if (result.status === 200) {
|
|
96976
|
+
return result.body;
|
|
96977
|
+
}
|
|
96978
|
+
handleError(result, "Failed to initialize Telegram file upload");
|
|
96979
|
+
}
|
|
96980
|
+
async function completeTelegramFileUpload(body) {
|
|
96981
|
+
const config4 = await getClientConfig();
|
|
96982
|
+
const client = initClient(integrationsTelegramUploadCompleteContract, config4);
|
|
96983
|
+
const result = await client.complete({ body, headers: {} });
|
|
96984
|
+
if (result.status === 200) {
|
|
96985
|
+
return result.body;
|
|
96986
|
+
}
|
|
96987
|
+
handleError(result, "Failed to complete Telegram file upload");
|
|
96988
|
+
}
|
|
96909
96989
|
async function downloadTelegramFile(fileId, botId, outPath) {
|
|
96910
96990
|
const baseUrl = await getBaseUrl();
|
|
96911
96991
|
const token = await getActiveToken();
|
|
@@ -98643,6 +98723,8 @@ export {
|
|
|
98643
98723
|
initSlackFileUpload,
|
|
98644
98724
|
completeSlackFileUpload,
|
|
98645
98725
|
downloadSlackFile,
|
|
98726
|
+
initTelegramFileUpload,
|
|
98727
|
+
completeTelegramFileUpload,
|
|
98646
98728
|
downloadTelegramFile,
|
|
98647
98729
|
sendChatMessage,
|
|
98648
98730
|
deployZeroSchedule,
|
|
@@ -98704,4 +98786,4 @@ undici/lib/web/fetch/body.js:
|
|
|
98704
98786
|
undici/lib/web/websocket/frame.js:
|
|
98705
98787
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
98706
98788
|
*/
|
|
98707
|
-
//# sourceMappingURL=chunk-
|
|
98789
|
+
//# sourceMappingURL=chunk-7C3QXZRH.js.map
|