@vm0/cli 9.236.0 → 9.237.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/{agent-H37ZBBFD.js → agent-RRS3TTOU.js} +5 -5
- package/{banking-IRMYJKNC.js → banking-I4BCPPVG.js} +3 -3
- package/{chat-NZ6TRVR5.js → chat-ACIYWOSN.js} +4 -4
- package/{chunk-W4AAAM2I.js → chunk-5UMUENEP.js} +2 -2
- package/{chunk-MGWKM7UC.js → chunk-6AIUNS4S.js} +2 -2
- package/{chunk-RQQ7SG5F.js → chunk-ADMLSLX7.js} +14 -4
- package/{chunk-RQQ7SG5F.js.map → chunk-ADMLSLX7.js.map} +1 -1
- package/{chunk-26HAGVMF.js → chunk-C7SG4M3U.js} +2 -2
- package/{chunk-RTJRFBZ4.js → chunk-ENXG6A22.js} +2 -2
- package/{chunk-73CTMK6P.js → chunk-JHGYCBTX.js} +2 -2
- package/{chunk-64IW3URY.js → chunk-L2DRZBUB.js} +3 -3
- package/{chunk-COXWIO7D.js → chunk-QFJ7HT7H.js} +213 -12
- package/chunk-QFJ7HT7H.js.map +1 -0
- package/{chunk-C62RB4M2.js → chunk-RF4LGH7T.js} +4 -4
- package/{chunk-VM5QYVD6.js → chunk-TXIQWRHR.js} +2 -2
- package/{chunk-76G34YAK.js → chunk-YDEV2745.js} +2 -2
- package/{computer-use-PHPLG6PO.js → computer-use-IBNXMTVO.js} +3 -3
- package/{connector-37AVV3HQ.js → connector-MGCFISWY.js} +4 -4
- package/{credit-IOSI7BHB.js → credit-SYRT3YQ5.js} +4 -4
- package/{developer-support-CVZDCWUJ.js → developer-support-MHSW7WNO.js} +3 -3
- package/{doctor-2NROVNEM.js → doctor-ULS7D66O.js} +7 -7
- package/{generate-NA2R3CE4.js → generate-46G4JOFE.js} +4 -4
- package/{github-U7ICR34Q.js → github-DQDV6GRT.js} +3 -3
- package/{goal-LVH3SPUN.js → goal-RVTQ6AQC.js} +3 -3
- package/{host-NFZIDNFL.js → host-7MBGV4SY.js} +3 -3
- package/index.js +14 -14
- package/{logs-EANNRUOI.js → logs-XNOI64E7.js} +7 -7
- package/{maps-CWNOZN4X.js → maps-XN6MWZP2.js} +3 -3
- package/{memory-2W5HCDIM.js → memory-TLVRNXZJ.js} +3 -3
- package/{model-7QO2KBZU.js → model-GBVVKTL3.js} +4 -4
- package/{model-provider-HFNCG657.js → model-provider-2R4XZAAP.js} +4 -4
- package/{org-TTJVCI6O.js → org-G4PEHM3C.js} +3 -3
- package/package.json +1 -1
- package/{phone-R6ZBFTQQ.js → phone-STPPLY7L.js} +3 -3
- package/{preference-JACH7UCD.js → preference-2LO4O52L.js} +3 -3
- package/{relationship-D4RXZL2F.js → relationship-XG6NPTCL.js} +3 -3
- package/{resource-53GNP4BE.js → resource-RLT6ZIKK.js} +3 -3
- package/{search-CSNF5OZC.js → search-MHS5BNGU.js} +7 -7
- package/{secret-M5GRCTGE.js → secret-4HMBDDCS.js} +4 -4
- package/{slack-QBSJ5CLK.js → slack-DY3YIJVS.js} +3 -3
- package/teams-QAZPCP3O.js +284 -0
- package/teams-QAZPCP3O.js.map +1 -0
- package/{telegram-2P2ZZYU4.js → telegram-RMDZ32HF.js} +3 -3
- package/{variable-JM7W3UQJ.js → variable-43ATWSAS.js} +3 -3
- package/{video-HONK7KHI.js → video-LPJ3KMF4.js} +2 -2
- package/{web-3NQFBVFX.js → web-6HA2CSGF.js} +3 -3
- package/{whoami-WYOS2RAK.js → whoami-N2YAEEPT.js} +5 -5
- package/{workflow-AYPDFQOY.js → workflow-2KYNDY3X.js} +3 -3
- package/zero.js +44 -33
- package/zero.js.map +1 -1
- package/chunk-COXWIO7D.js.map +0 -1
- /package/{agent-H37ZBBFD.js.map → agent-RRS3TTOU.js.map} +0 -0
- /package/{banking-IRMYJKNC.js.map → banking-I4BCPPVG.js.map} +0 -0
- /package/{chat-NZ6TRVR5.js.map → chat-ACIYWOSN.js.map} +0 -0
- /package/{chunk-W4AAAM2I.js.map → chunk-5UMUENEP.js.map} +0 -0
- /package/{chunk-MGWKM7UC.js.map → chunk-6AIUNS4S.js.map} +0 -0
- /package/{chunk-26HAGVMF.js.map → chunk-C7SG4M3U.js.map} +0 -0
- /package/{chunk-RTJRFBZ4.js.map → chunk-ENXG6A22.js.map} +0 -0
- /package/{chunk-73CTMK6P.js.map → chunk-JHGYCBTX.js.map} +0 -0
- /package/{chunk-64IW3URY.js.map → chunk-L2DRZBUB.js.map} +0 -0
- /package/{chunk-C62RB4M2.js.map → chunk-RF4LGH7T.js.map} +0 -0
- /package/{chunk-VM5QYVD6.js.map → chunk-TXIQWRHR.js.map} +0 -0
- /package/{chunk-76G34YAK.js.map → chunk-YDEV2745.js.map} +0 -0
- /package/{computer-use-PHPLG6PO.js.map → computer-use-IBNXMTVO.js.map} +0 -0
- /package/{connector-37AVV3HQ.js.map → connector-MGCFISWY.js.map} +0 -0
- /package/{credit-IOSI7BHB.js.map → credit-SYRT3YQ5.js.map} +0 -0
- /package/{developer-support-CVZDCWUJ.js.map → developer-support-MHSW7WNO.js.map} +0 -0
- /package/{doctor-2NROVNEM.js.map → doctor-ULS7D66O.js.map} +0 -0
- /package/{generate-NA2R3CE4.js.map → generate-46G4JOFE.js.map} +0 -0
- /package/{github-U7ICR34Q.js.map → github-DQDV6GRT.js.map} +0 -0
- /package/{goal-LVH3SPUN.js.map → goal-RVTQ6AQC.js.map} +0 -0
- /package/{host-NFZIDNFL.js.map → host-7MBGV4SY.js.map} +0 -0
- /package/{logs-EANNRUOI.js.map → logs-XNOI64E7.js.map} +0 -0
- /package/{maps-CWNOZN4X.js.map → maps-XN6MWZP2.js.map} +0 -0
- /package/{memory-2W5HCDIM.js.map → memory-TLVRNXZJ.js.map} +0 -0
- /package/{model-7QO2KBZU.js.map → model-GBVVKTL3.js.map} +0 -0
- /package/{model-provider-HFNCG657.js.map → model-provider-2R4XZAAP.js.map} +0 -0
- /package/{org-TTJVCI6O.js.map → org-G4PEHM3C.js.map} +0 -0
- /package/{phone-R6ZBFTQQ.js.map → phone-STPPLY7L.js.map} +0 -0
- /package/{preference-JACH7UCD.js.map → preference-2LO4O52L.js.map} +0 -0
- /package/{relationship-D4RXZL2F.js.map → relationship-XG6NPTCL.js.map} +0 -0
- /package/{resource-53GNP4BE.js.map → resource-RLT6ZIKK.js.map} +0 -0
- /package/{search-CSNF5OZC.js.map → search-MHS5BNGU.js.map} +0 -0
- /package/{secret-M5GRCTGE.js.map → secret-4HMBDDCS.js.map} +0 -0
- /package/{slack-QBSJ5CLK.js.map → slack-DY3YIJVS.js.map} +0 -0
- /package/{telegram-2P2ZZYU4.js.map → telegram-RMDZ32HF.js.map} +0 -0
- /package/{variable-JM7W3UQJ.js.map → variable-43ATWSAS.js.map} +0 -0
- /package/{video-HONK7KHI.js.map → video-LPJ3KMF4.js.map} +0 -0
- /package/{web-3NQFBVFX.js.map → web-6HA2CSGF.js.map} +0 -0
- /package/{whoami-WYOS2RAK.js.map → whoami-N2YAEEPT.js.map} +0 -0
- /package/{workflow-AYPDFQOY.js.map → workflow-2KYNDY3X.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
MODEL_PROVIDER_TYPES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QFJ7HT7H.js";
|
|
7
7
|
import {
|
|
8
8
|
init_esm_shims
|
|
9
9
|
} from "./chunk-DIRAZ3YX.js";
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
formatModelProviderRoute,
|
|
41
41
|
formatModelPolicyStatus
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-C7SG4M3U.js.map
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
getApiUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6AIUNS4S.js";
|
|
7
7
|
import {
|
|
8
8
|
init_esm_shims
|
|
9
9
|
} from "./chunk-DIRAZ3YX.js";
|
|
@@ -32,4 +32,4 @@ export {
|
|
|
32
32
|
toPlatformUrl,
|
|
33
33
|
getPlatformOrigin
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-ENXG6A22.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
CONNECTOR_TYPES,
|
|
6
6
|
CONNECTOR_TYPE_KEYS,
|
|
7
7
|
connectorAuthMethodIdSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QFJ7HT7H.js";
|
|
9
9
|
import {
|
|
10
10
|
init_esm_shims
|
|
11
11
|
} from "./chunk-DIRAZ3YX.js";
|
|
@@ -121,4 +121,4 @@ export {
|
|
|
121
121
|
getConnectorStoredSecretDisplayInfo,
|
|
122
122
|
getDiagnosticConnectorTypeForRuntimeEnvName
|
|
123
123
|
};
|
|
124
|
-
//# sourceMappingURL=chunk-
|
|
124
|
+
//# sourceMappingURL=chunk-JHGYCBTX.js.map
|
|
@@ -50,7 +50,7 @@ if (DSN) {
|
|
|
50
50
|
Sentry.init({
|
|
51
51
|
dsn: DSN,
|
|
52
52
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
53
|
-
release: "9.
|
|
53
|
+
release: "9.237.0",
|
|
54
54
|
sendDefaultPii: false,
|
|
55
55
|
tracesSampleRate: 0,
|
|
56
56
|
shutdownTimeout: 500,
|
|
@@ -69,7 +69,7 @@ if (DSN) {
|
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
Sentry.setContext("cli", {
|
|
72
|
-
version: "9.
|
|
72
|
+
version: "9.237.0",
|
|
73
73
|
command: process.argv.slice(2).join(" ")
|
|
74
74
|
});
|
|
75
75
|
Sentry.setContext("runtime", {
|
|
@@ -146,4 +146,4 @@ async function configureGlobalProxyFromEnv() {
|
|
|
146
146
|
export {
|
|
147
147
|
configureGlobalProxyFromEnv
|
|
148
148
|
};
|
|
149
|
-
//# sourceMappingURL=chunk-
|
|
149
|
+
//# sourceMappingURL=chunk-L2DRZBUB.js.map
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
headersWithCliClientHeaders,
|
|
15
15
|
initClient,
|
|
16
16
|
initContract
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6AIUNS4S.js";
|
|
18
18
|
import {
|
|
19
19
|
init_esm_shims
|
|
20
20
|
} from "./chunk-DIRAZ3YX.js";
|
|
@@ -26988,6 +26988,65 @@ var integrationsTelegramMessageContract = c34.router({
|
|
|
26988
26988
|
summary: "Send a Telegram message via org bot token"
|
|
26989
26989
|
}
|
|
26990
26990
|
});
|
|
26991
|
+
var teamsAdaptiveCardSchema = external_exports.object({
|
|
26992
|
+
type: external_exports.literal("AdaptiveCard"),
|
|
26993
|
+
version: external_exports.string().min(1),
|
|
26994
|
+
body: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).optional(),
|
|
26995
|
+
actions: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).optional()
|
|
26996
|
+
}).passthrough();
|
|
26997
|
+
var sendTeamsMessageBodySchema = external_exports.object({
|
|
26998
|
+
conversationId: external_exports.string().min(1, "Conversation ID is required").optional(),
|
|
26999
|
+
user: external_exports.string().min(1, "Teams user ID is required").optional(),
|
|
27000
|
+
text: external_exports.string().min(1, "Message text is required").optional(),
|
|
27001
|
+
activityId: external_exports.string().min(1, "Activity ID is required").optional(),
|
|
27002
|
+
card: teamsAdaptiveCardSchema.optional()
|
|
27003
|
+
}).refine(
|
|
27004
|
+
(body) => {
|
|
27005
|
+
return Boolean(body.conversationId) !== Boolean(body.user);
|
|
27006
|
+
},
|
|
27007
|
+
{
|
|
27008
|
+
message: "Exactly one of conversationId or user is required",
|
|
27009
|
+
path: ["conversationId"]
|
|
27010
|
+
}
|
|
27011
|
+
).refine(
|
|
27012
|
+
(body) => {
|
|
27013
|
+
return Boolean(body.text) || Boolean(body.card);
|
|
27014
|
+
},
|
|
27015
|
+
{
|
|
27016
|
+
message: "Message text or card is required",
|
|
27017
|
+
path: ["text"]
|
|
27018
|
+
}
|
|
27019
|
+
).refine(
|
|
27020
|
+
(body) => {
|
|
27021
|
+
return !(body.user && body.activityId);
|
|
27022
|
+
},
|
|
27023
|
+
{
|
|
27024
|
+
message: "activityId can only be used with conversationId",
|
|
27025
|
+
path: ["activityId"]
|
|
27026
|
+
}
|
|
27027
|
+
);
|
|
27028
|
+
var sendTeamsMessageResponseSchema = external_exports.object({
|
|
27029
|
+
ok: external_exports.literal(true),
|
|
27030
|
+
activityId: external_exports.string().optional(),
|
|
27031
|
+
conversationId: external_exports.string()
|
|
27032
|
+
});
|
|
27033
|
+
var integrationsTeamsMessageContract = c34.router({
|
|
27034
|
+
sendMessage: {
|
|
27035
|
+
method: "POST",
|
|
27036
|
+
path: "/api/zero/integrations/teams/message",
|
|
27037
|
+
headers: authHeadersSchema,
|
|
27038
|
+
body: sendTeamsMessageBodySchema,
|
|
27039
|
+
responses: {
|
|
27040
|
+
200: sendTeamsMessageResponseSchema,
|
|
27041
|
+
400: apiErrorSchema,
|
|
27042
|
+
401: apiErrorSchema,
|
|
27043
|
+
403: apiErrorSchema,
|
|
27044
|
+
404: apiErrorSchema,
|
|
27045
|
+
502: apiErrorSchema
|
|
27046
|
+
},
|
|
27047
|
+
summary: "Send a Microsoft Teams message via org bot"
|
|
27048
|
+
}
|
|
27049
|
+
});
|
|
26991
27050
|
var sendPhoneMessageBodySchema = external_exports.object({
|
|
26992
27051
|
agentphoneAgentId: external_exports.string().min(1, "AgentPhone agent ID is required").optional(),
|
|
26993
27052
|
toNumber: external_exports.string().min(1, "Phone number is required"),
|
|
@@ -27126,6 +27185,34 @@ var integrationsTelegramUploadInitContract = c34.router({
|
|
|
27126
27185
|
summary: "Get a pre-signed upload URL for Telegram file delivery"
|
|
27127
27186
|
}
|
|
27128
27187
|
});
|
|
27188
|
+
var teamsUploadInitBodySchema = external_exports.object({
|
|
27189
|
+
filename: external_exports.string().min(1, "Filename is required").max(255),
|
|
27190
|
+
contentType: external_exports.string().min(1, "Content type is required").max(200),
|
|
27191
|
+
length: external_exports.number().int().positive("File length must be a positive integer")
|
|
27192
|
+
});
|
|
27193
|
+
var teamsUploadInitResponseSchema = external_exports.object({
|
|
27194
|
+
uploadId: external_exports.string().uuid(),
|
|
27195
|
+
uploadUrl: external_exports.string(),
|
|
27196
|
+
fileUrl: external_exports.string(),
|
|
27197
|
+
filename: external_exports.string(),
|
|
27198
|
+
contentType: external_exports.string(),
|
|
27199
|
+
size: external_exports.number().int().nonnegative()
|
|
27200
|
+
});
|
|
27201
|
+
var integrationsTeamsUploadInitContract = c34.router({
|
|
27202
|
+
init: {
|
|
27203
|
+
method: "POST",
|
|
27204
|
+
path: "/api/zero/integrations/teams/upload-file/init",
|
|
27205
|
+
headers: authHeadersSchema,
|
|
27206
|
+
body: teamsUploadInitBodySchema,
|
|
27207
|
+
responses: {
|
|
27208
|
+
200: teamsUploadInitResponseSchema,
|
|
27209
|
+
400: apiErrorSchema,
|
|
27210
|
+
401: apiErrorSchema,
|
|
27211
|
+
403: apiErrorSchema
|
|
27212
|
+
},
|
|
27213
|
+
summary: "Get a pre-signed upload URL for Microsoft Teams file delivery"
|
|
27214
|
+
}
|
|
27215
|
+
});
|
|
27129
27216
|
var telegramUploadCompleteBodySchema = external_exports.object({
|
|
27130
27217
|
uploadId: external_exports.string().uuid("Upload ID must be a UUID"),
|
|
27131
27218
|
botId: external_exports.string().min(1, "Bot ID is required"),
|
|
@@ -27160,6 +27247,38 @@ var integrationsTelegramUploadCompleteContract = c34.router({
|
|
|
27160
27247
|
summary: "Finalize Telegram file upload and send it to a chat"
|
|
27161
27248
|
}
|
|
27162
27249
|
});
|
|
27250
|
+
var teamsUploadCompleteBodySchema = external_exports.object({
|
|
27251
|
+
uploadId: external_exports.string().uuid("Upload ID must be a UUID"),
|
|
27252
|
+
conversationId: external_exports.string().min(1, "Conversation ID is required"),
|
|
27253
|
+
activityId: external_exports.string().min(1, "Activity ID is required").optional(),
|
|
27254
|
+
contentType: external_exports.string().min(1).max(200).optional(),
|
|
27255
|
+
text: external_exports.string().max(4e3).optional()
|
|
27256
|
+
});
|
|
27257
|
+
var teamsUploadCompleteResponseSchema = external_exports.object({
|
|
27258
|
+
activityId: external_exports.string().optional(),
|
|
27259
|
+
conversationId: external_exports.string(),
|
|
27260
|
+
filename: external_exports.string(),
|
|
27261
|
+
mimetype: external_exports.string(),
|
|
27262
|
+
size: external_exports.number().int().nonnegative(),
|
|
27263
|
+
url: external_exports.string()
|
|
27264
|
+
});
|
|
27265
|
+
var integrationsTeamsUploadCompleteContract = c34.router({
|
|
27266
|
+
complete: {
|
|
27267
|
+
method: "POST",
|
|
27268
|
+
path: "/api/zero/integrations/teams/upload-file/complete",
|
|
27269
|
+
headers: authHeadersSchema,
|
|
27270
|
+
body: teamsUploadCompleteBodySchema,
|
|
27271
|
+
responses: {
|
|
27272
|
+
200: teamsUploadCompleteResponseSchema,
|
|
27273
|
+
400: apiErrorSchema,
|
|
27274
|
+
401: apiErrorSchema,
|
|
27275
|
+
403: apiErrorSchema,
|
|
27276
|
+
404: apiErrorSchema,
|
|
27277
|
+
502: apiErrorSchema
|
|
27278
|
+
},
|
|
27279
|
+
summary: "Finalize Microsoft Teams file upload and send it to a conversation"
|
|
27280
|
+
}
|
|
27281
|
+
});
|
|
27163
27282
|
var githubUploadInitBodySchema = external_exports.object({
|
|
27164
27283
|
filename: external_exports.string().min(1, "Filename is required").max(255),
|
|
27165
27284
|
contentType: external_exports.string().min(1, "Content type is required").max(200),
|
|
@@ -27476,11 +27595,89 @@ async function downloadTelegramFile(fileId, botId, outPath) {
|
|
|
27476
27595
|
return { path: outPath, mimetype, size };
|
|
27477
27596
|
}
|
|
27478
27597
|
|
|
27479
|
-
// src/lib/api/domains/integrations-
|
|
27598
|
+
// src/lib/api/domains/integrations-teams.ts
|
|
27480
27599
|
init_esm_shims();
|
|
27481
27600
|
import { createWriteStream as createWriteStream3 } from "fs";
|
|
27482
27601
|
import { Readable as Readable3 } from "stream";
|
|
27483
27602
|
import { pipeline as pipeline3 } from "stream/promises";
|
|
27603
|
+
async function sendTeamsMessage(body) {
|
|
27604
|
+
const config = await getClientConfig();
|
|
27605
|
+
const client = initClient(integrationsTeamsMessageContract, config);
|
|
27606
|
+
const result = await client.sendMessage({ body, headers: {} });
|
|
27607
|
+
if (result.status === 200) {
|
|
27608
|
+
return result.body;
|
|
27609
|
+
}
|
|
27610
|
+
handleError(result, "Failed to send Microsoft Teams message");
|
|
27611
|
+
}
|
|
27612
|
+
async function initTeamsFileUpload(body) {
|
|
27613
|
+
const config = await getClientConfig();
|
|
27614
|
+
const client = initClient(integrationsTeamsUploadInitContract, config);
|
|
27615
|
+
const result = await client.init({ body, headers: {} });
|
|
27616
|
+
if (result.status === 200) {
|
|
27617
|
+
return result.body;
|
|
27618
|
+
}
|
|
27619
|
+
handleError(result, "Failed to initialize Microsoft Teams file upload");
|
|
27620
|
+
}
|
|
27621
|
+
async function completeTeamsFileUpload(body) {
|
|
27622
|
+
const config = await getClientConfig();
|
|
27623
|
+
const client = initClient(integrationsTeamsUploadCompleteContract, config);
|
|
27624
|
+
const result = await client.complete({ body, headers: {} });
|
|
27625
|
+
if (result.status === 200) {
|
|
27626
|
+
return result.body;
|
|
27627
|
+
}
|
|
27628
|
+
handleError(result, "Failed to complete Microsoft Teams file upload");
|
|
27629
|
+
}
|
|
27630
|
+
async function downloadTeamsFile(fileId, outPath) {
|
|
27631
|
+
const baseUrl = await getBaseUrl();
|
|
27632
|
+
const token = await getActiveToken();
|
|
27633
|
+
if (!token) {
|
|
27634
|
+
throw new ApiRequestError("Not authenticated", "UNAUTHORIZED", 401);
|
|
27635
|
+
}
|
|
27636
|
+
const url = new URL("/api/zero/integrations/teams/download-file", baseUrl);
|
|
27637
|
+
url.searchParams.set("file_id", fileId);
|
|
27638
|
+
const headers = {
|
|
27639
|
+
Authorization: `Bearer ${token}`
|
|
27640
|
+
};
|
|
27641
|
+
const bypassSecret = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;
|
|
27642
|
+
if (bypassSecret) {
|
|
27643
|
+
headers["x-vercel-protection-bypass"] = bypassSecret;
|
|
27644
|
+
}
|
|
27645
|
+
const response = await fetch(url, {
|
|
27646
|
+
headers: headersWithCliClientHeaders(headers)
|
|
27647
|
+
});
|
|
27648
|
+
if (!response.ok) {
|
|
27649
|
+
let message = `Failed to download Microsoft Teams file (HTTP ${response.status})`;
|
|
27650
|
+
let code = "UNKNOWN";
|
|
27651
|
+
try {
|
|
27652
|
+
const body = await response.json();
|
|
27653
|
+
if (body.error?.message) message = body.error.message;
|
|
27654
|
+
if (body.error?.code) code = body.error.code;
|
|
27655
|
+
} catch {
|
|
27656
|
+
}
|
|
27657
|
+
throw new ApiRequestError(message, code, response.status);
|
|
27658
|
+
}
|
|
27659
|
+
if (!response.body) {
|
|
27660
|
+
throw new ApiRequestError(
|
|
27661
|
+
"Microsoft Teams download response has no body",
|
|
27662
|
+
"EMPTY_BODY",
|
|
27663
|
+
502
|
|
27664
|
+
);
|
|
27665
|
+
}
|
|
27666
|
+
const mimetype = response.headers.get("x-file-mimetype") ?? response.headers.get("content-type") ?? "application/octet-stream";
|
|
27667
|
+
await pipeline3(
|
|
27668
|
+
Readable3.fromWeb(response.body),
|
|
27669
|
+
createWriteStream3(outPath)
|
|
27670
|
+
);
|
|
27671
|
+
const contentLengthHeader = response.headers.get("content-length");
|
|
27672
|
+
const size = contentLengthHeader ? Number(contentLengthHeader) : 0;
|
|
27673
|
+
return { path: outPath, mimetype, size };
|
|
27674
|
+
}
|
|
27675
|
+
|
|
27676
|
+
// src/lib/api/domains/integrations-github.ts
|
|
27677
|
+
init_esm_shims();
|
|
27678
|
+
import { createWriteStream as createWriteStream4 } from "fs";
|
|
27679
|
+
import { Readable as Readable4 } from "stream";
|
|
27680
|
+
import { pipeline as pipeline4 } from "stream/promises";
|
|
27484
27681
|
async function initGithubFileUpload(body) {
|
|
27485
27682
|
const config = await getClientConfig();
|
|
27486
27683
|
const client = initClient(integrationsGithubUploadInitContract, config);
|
|
@@ -27539,9 +27736,9 @@ async function downloadGithubFile(fileUrl, outPath, filename) {
|
|
|
27539
27736
|
);
|
|
27540
27737
|
}
|
|
27541
27738
|
const mimetype = response.headers.get("x-file-mimetype") ?? response.headers.get("content-type") ?? "application/octet-stream";
|
|
27542
|
-
await
|
|
27543
|
-
|
|
27544
|
-
|
|
27739
|
+
await pipeline4(
|
|
27740
|
+
Readable4.fromWeb(response.body),
|
|
27741
|
+
createWriteStream4(outPath)
|
|
27545
27742
|
);
|
|
27546
27743
|
const contentLengthHeader = response.headers.get("content-length");
|
|
27547
27744
|
const size = contentLengthHeader ? Number(contentLengthHeader) : 0;
|
|
@@ -27550,9 +27747,9 @@ async function downloadGithubFile(fileUrl, outPath, filename) {
|
|
|
27550
27747
|
|
|
27551
27748
|
// src/lib/api/domains/integrations-phone.ts
|
|
27552
27749
|
init_esm_shims();
|
|
27553
|
-
import { createWriteStream as
|
|
27554
|
-
import { Readable as
|
|
27555
|
-
import { pipeline as
|
|
27750
|
+
import { createWriteStream as createWriteStream5 } from "fs";
|
|
27751
|
+
import { Readable as Readable5 } from "stream";
|
|
27752
|
+
import { pipeline as pipeline5 } from "stream/promises";
|
|
27556
27753
|
async function sendPhoneMessage(body) {
|
|
27557
27754
|
const config = await getClientConfig();
|
|
27558
27755
|
const client = initClient(integrationsPhoneMessageContract, config);
|
|
@@ -27617,9 +27814,9 @@ async function downloadPhoneFile(fileId, outPath) {
|
|
|
27617
27814
|
);
|
|
27618
27815
|
}
|
|
27619
27816
|
const mimetype = response.headers.get("x-file-mimetype") ?? response.headers.get("content-type") ?? "application/octet-stream";
|
|
27620
|
-
await
|
|
27621
|
-
|
|
27622
|
-
|
|
27817
|
+
await pipeline5(
|
|
27818
|
+
Readable5.fromWeb(response.body),
|
|
27819
|
+
createWriteStream5(outPath)
|
|
27623
27820
|
);
|
|
27624
27821
|
const contentLengthHeader = response.headers.get("content-length");
|
|
27625
27822
|
const size = contentLengthHeader ? Number(contentLengthHeader) : 0;
|
|
@@ -29376,6 +29573,10 @@ export {
|
|
|
29376
29573
|
initTelegramFileUpload,
|
|
29377
29574
|
completeTelegramFileUpload,
|
|
29378
29575
|
downloadTelegramFile,
|
|
29576
|
+
sendTeamsMessage,
|
|
29577
|
+
initTeamsFileUpload,
|
|
29578
|
+
completeTeamsFileUpload,
|
|
29579
|
+
downloadTeamsFile,
|
|
29379
29580
|
initGithubFileUpload,
|
|
29380
29581
|
completeGithubFileUpload,
|
|
29381
29582
|
downloadGithubFile,
|
|
@@ -29428,4 +29629,4 @@ export {
|
|
|
29428
29629
|
completeHostedSite,
|
|
29429
29630
|
getHostedSiteFiles
|
|
29430
29631
|
};
|
|
29431
|
-
//# sourceMappingURL=chunk-
|
|
29632
|
+
//# sourceMappingURL=chunk-QFJ7HT7H.js.map
|