@vm0/cli 9.251.1 → 9.252.1
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-BNFNLNHG.js → agent-6DLY56R2.js} +7 -7
- package/{banking-TCGIBAP6.js → banking-22B7QVCY.js} +5 -5
- package/{chat-YPDUENU7.js → chat-2QVQ3MLT.js} +6 -6
- package/{chunk-CV7MCB2U.js → chunk-7DGYI4QB.js} +4 -8
- package/chunk-7DGYI4QB.js.map +1 -0
- package/{chunk-4GD76EQ4.js → chunk-7NPYHUEQ.js} +3 -3
- package/{chunk-6AKLTZUH.js → chunk-7QTOTACG.js} +2 -2
- package/{chunk-U3VV27JW.js → chunk-CPJVE3HV.js} +2 -2
- package/{chunk-B7MK54AY.js → chunk-CUAL7MH6.js} +2 -2
- package/{chunk-4CCCO3QU.js → chunk-DK3C2ME6.js} +13 -1
- package/chunk-DK3C2ME6.js.map +1 -0
- package/{chunk-PP2JWZSG.js → chunk-FBISVSTZ.js} +357 -25
- package/chunk-FBISVSTZ.js.map +1 -0
- package/{chunk-DLKSV2HZ.js → chunk-KBUXPDDX.js} +4 -4
- package/{chunk-KHZ4LMY2.js → chunk-MFNEXCZL.js} +2 -2
- package/{chunk-BRSUIBNM.js → chunk-OAESJHRL.js} +5 -4
- package/chunk-OAESJHRL.js.map +1 -0
- package/{chunk-GO2ZC4S5.js → chunk-Z6BXUYYX.js} +2 -2
- package/{computer-use-VXYMW7DO.js → computer-use-TWN6NBIN.js} +5 -5
- package/{connector-UIBA5P4Z.js → connector-DEKQFV2G.js} +8 -8
- package/{credit-GWNSOZOX.js → credit-SGN2CQ4F.js} +7 -7
- package/{developer-support-QOTFHN2S.js → developer-support-7DKJHHFR.js} +5 -5
- package/{doctor-G4UUSU3R.js → doctor-PINI2CXE.js} +7 -7
- package/feishu-RVNSCNUY.js +277 -0
- package/feishu-RVNSCNUY.js.map +1 -0
- package/{finance-QEB2AYB4.js → finance-IL3LEHYM.js} +5 -5
- package/{generate-Y2GBOZ4T.js → generate-DVB7CDWO.js} +7 -7
- package/{github-JX5PFWTW.js → github-HECK3WC6.js} +5 -5
- package/{goal-ETVDARSU.js → goal-RJ4KHBJZ.js} +5 -5
- package/{host-OTBNOMJO.js → host-UAVQ4BZY.js} +5 -5
- package/{logs-MK4VKYGE.js → logs-PFZVJGHK.js} +6 -6
- package/{mail-4WPLYKL5.js → mail-SJOUFJDK.js} +7 -7
- package/{maps-7YWGDMU4.js → maps-JCB6I264.js} +5 -5
- package/{model-P5TLS3KD.js → model-GI5HI3B5.js} +6 -6
- package/{model-provider-YUQ65CGB.js → model-provider-YVF7DWLL.js} +6 -6
- package/{org-BO46UGHP.js → org-SPWQ25RJ.js} +5 -5
- package/package.json +1 -1
- package/{people-search-6JZNG46F.js → people-search-24TMMWRS.js} +5 -5
- package/{phone-OLPRI3UD.js → phone-3XXRREOH.js} +5 -5
- package/{preference-OSLWFBAT.js → preference-SSKGMIHI.js} +5 -5
- package/{resource-6IX3QB3W.js → resource-HJBJYOZW.js} +5 -5
- package/{scrape-T6XHTU6J.js → scrape-LCD2CT5P.js} +5 -5
- package/{search-KYW4WRMQ.js → search-IU6AXAPL.js} +6 -6
- package/{secret-ORODPPSX.js → secret-4GZ5YF55.js} +5 -5
- package/{slack-CXZCQ5HU.js → slack-TLBZUY27.js} +174 -47
- package/slack-TLBZUY27.js.map +1 -0
- package/{teams-CGDBFXQ2.js → teams-ZKQMACHI.js} +5 -5
- package/{telegram-SCGQFOYI.js → telegram-J4ZWDUEB.js} +5 -5
- package/{upgrade-3LEF7WD7.js → upgrade-UBEBOHV6.js} +4 -4
- package/{variable-G6WZKJJG.js → variable-4K5GUB4B.js} +5 -5
- package/{video-JKYPCENK.js → video-5LENA5YA.js} +4 -4
- package/{weather-3WQV3JMX.js → weather-UL4D4T3L.js} +5 -5
- package/{web-3FRUHVEN.js → web-6452PFF7.js} +5 -5
- package/{web-search-H6WV4RFE.js → web-search-D5HGEWU5.js} +5 -5
- package/{whoami-BMNW6CH3.js → whoami-HYDZ6YSH.js} +7 -7
- package/{workflow-O6CVNJWM.js → workflow-W2HNGAVJ.js} +5 -5
- package/zero.js +42 -42
- package/chunk-4CCCO3QU.js.map +0 -1
- package/chunk-BRSUIBNM.js.map +0 -1
- package/chunk-CV7MCB2U.js.map +0 -1
- package/chunk-PP2JWZSG.js.map +0 -1
- package/feishu-GQEAUNH3.js +0 -119
- package/feishu-GQEAUNH3.js.map +0 -1
- package/slack-CXZCQ5HU.js.map +0 -1
- /package/{agent-BNFNLNHG.js.map → agent-6DLY56R2.js.map} +0 -0
- /package/{banking-TCGIBAP6.js.map → banking-22B7QVCY.js.map} +0 -0
- /package/{chat-YPDUENU7.js.map → chat-2QVQ3MLT.js.map} +0 -0
- /package/{chunk-4GD76EQ4.js.map → chunk-7NPYHUEQ.js.map} +0 -0
- /package/{chunk-6AKLTZUH.js.map → chunk-7QTOTACG.js.map} +0 -0
- /package/{chunk-U3VV27JW.js.map → chunk-CPJVE3HV.js.map} +0 -0
- /package/{chunk-B7MK54AY.js.map → chunk-CUAL7MH6.js.map} +0 -0
- /package/{chunk-DLKSV2HZ.js.map → chunk-KBUXPDDX.js.map} +0 -0
- /package/{chunk-KHZ4LMY2.js.map → chunk-MFNEXCZL.js.map} +0 -0
- /package/{chunk-GO2ZC4S5.js.map → chunk-Z6BXUYYX.js.map} +0 -0
- /package/{computer-use-VXYMW7DO.js.map → computer-use-TWN6NBIN.js.map} +0 -0
- /package/{connector-UIBA5P4Z.js.map → connector-DEKQFV2G.js.map} +0 -0
- /package/{credit-GWNSOZOX.js.map → credit-SGN2CQ4F.js.map} +0 -0
- /package/{developer-support-QOTFHN2S.js.map → developer-support-7DKJHHFR.js.map} +0 -0
- /package/{doctor-G4UUSU3R.js.map → doctor-PINI2CXE.js.map} +0 -0
- /package/{finance-QEB2AYB4.js.map → finance-IL3LEHYM.js.map} +0 -0
- /package/{generate-Y2GBOZ4T.js.map → generate-DVB7CDWO.js.map} +0 -0
- /package/{github-JX5PFWTW.js.map → github-HECK3WC6.js.map} +0 -0
- /package/{goal-ETVDARSU.js.map → goal-RJ4KHBJZ.js.map} +0 -0
- /package/{host-OTBNOMJO.js.map → host-UAVQ4BZY.js.map} +0 -0
- /package/{logs-MK4VKYGE.js.map → logs-PFZVJGHK.js.map} +0 -0
- /package/{mail-4WPLYKL5.js.map → mail-SJOUFJDK.js.map} +0 -0
- /package/{maps-7YWGDMU4.js.map → maps-JCB6I264.js.map} +0 -0
- /package/{model-P5TLS3KD.js.map → model-GI5HI3B5.js.map} +0 -0
- /package/{model-provider-YUQ65CGB.js.map → model-provider-YVF7DWLL.js.map} +0 -0
- /package/{org-BO46UGHP.js.map → org-SPWQ25RJ.js.map} +0 -0
- /package/{people-search-6JZNG46F.js.map → people-search-24TMMWRS.js.map} +0 -0
- /package/{phone-OLPRI3UD.js.map → phone-3XXRREOH.js.map} +0 -0
- /package/{preference-OSLWFBAT.js.map → preference-SSKGMIHI.js.map} +0 -0
- /package/{resource-6IX3QB3W.js.map → resource-HJBJYOZW.js.map} +0 -0
- /package/{scrape-T6XHTU6J.js.map → scrape-LCD2CT5P.js.map} +0 -0
- /package/{search-KYW4WRMQ.js.map → search-IU6AXAPL.js.map} +0 -0
- /package/{secret-ORODPPSX.js.map → secret-4GZ5YF55.js.map} +0 -0
- /package/{teams-CGDBFXQ2.js.map → teams-ZKQMACHI.js.map} +0 -0
- /package/{telegram-SCGQFOYI.js.map → telegram-J4ZWDUEB.js.map} +0 -0
- /package/{upgrade-3LEF7WD7.js.map → upgrade-UBEBOHV6.js.map} +0 -0
- /package/{variable-G6WZKJJG.js.map → variable-4K5GUB4B.js.map} +0 -0
- /package/{video-JKYPCENK.js.map → video-5LENA5YA.js.map} +0 -0
- /package/{weather-3WQV3JMX.js.map → weather-UL4D4T3L.js.map} +0 -0
- /package/{web-3FRUHVEN.js.map → web-6452PFF7.js.map} +0 -0
- /package/{web-search-H6WV4RFE.js.map → web-search-D5HGEWU5.js.map} +0 -0
- /package/{whoami-BMNW6CH3.js.map → whoami-HYDZ6YSH.js.map} +0 -0
- /package/{workflow-O6CVNJWM.js.map → workflow-W2HNGAVJ.js.map} +0 -0
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
updateOrgModelPoliciesRequestSchema,
|
|
22
22
|
upsertModelProviderRequestSchema,
|
|
23
23
|
upsertModelProviderResponseSchema
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7NPYHUEQ.js";
|
|
25
25
|
import {
|
|
26
26
|
__commonJS,
|
|
27
27
|
__esm,
|
|
@@ -3367,8 +3367,30 @@ var attachFileSchema = external_exports.object({
|
|
|
3367
3367
|
contentType: external_exports.string(),
|
|
3368
3368
|
size: external_exports.number()
|
|
3369
3369
|
});
|
|
3370
|
+
var assetMaterializationSchema = external_exports.discriminatedUnion("status", [
|
|
3371
|
+
external_exports.object({ status: external_exports.literal("ready") }),
|
|
3372
|
+
external_exports.object({ status: external_exports.literal("pending") }),
|
|
3373
|
+
external_exports.object({
|
|
3374
|
+
status: external_exports.literal("failed"),
|
|
3375
|
+
error: external_exports.object({
|
|
3376
|
+
code: external_exports.string(),
|
|
3377
|
+
message: external_exports.string(),
|
|
3378
|
+
retryable: external_exports.boolean()
|
|
3379
|
+
})
|
|
3380
|
+
})
|
|
3381
|
+
]);
|
|
3382
|
+
var assetRefSchema = external_exports.object({
|
|
3383
|
+
id: external_exports.string().uuid(),
|
|
3384
|
+
classification: external_exports.enum(["input", "published-output"]),
|
|
3385
|
+
access: external_exports.enum(["private", "published"]),
|
|
3386
|
+
materialization: assetMaterializationSchema,
|
|
3387
|
+
provenance: external_exports.object({
|
|
3388
|
+
provider: external_exports.string()
|
|
3389
|
+
}).optional()
|
|
3390
|
+
});
|
|
3370
3391
|
var resolvedAttachFileSchema = attachFileSchema.extend({
|
|
3371
|
-
url: external_exports.string()
|
|
3392
|
+
url: external_exports.string(),
|
|
3393
|
+
assetRef: assetRefSchema.optional()
|
|
3372
3394
|
});
|
|
3373
3395
|
var chatThreadArtifactGoogleDriveSyncSchema = external_exports.discriminatedUnion("status", [
|
|
3374
3396
|
external_exports.object({
|
|
@@ -3403,6 +3425,7 @@ var artifactItemSchema = external_exports.object({
|
|
|
3403
3425
|
contentType: external_exports.string(),
|
|
3404
3426
|
size: external_exports.number().default(0),
|
|
3405
3427
|
url: external_exports.string(),
|
|
3428
|
+
assetRef: assetRefSchema.optional(),
|
|
3406
3429
|
previewImageUrl: external_exports.string().optional(),
|
|
3407
3430
|
createdAt: external_exports.string(),
|
|
3408
3431
|
updatedAt: external_exports.string(),
|
|
@@ -3492,6 +3515,7 @@ var chatThreadUnreadAgentsSchema = external_exports.object({
|
|
|
3492
3515
|
});
|
|
3493
3516
|
var chatThreadEventIdSchema = external_exports.string().uuid();
|
|
3494
3517
|
var codexServiceTierSchema = external_exports.enum(["fast"]);
|
|
3518
|
+
var chatThreadServiceTierSchema = external_exports.enum(["priority"]);
|
|
3495
3519
|
var chatThreadSnapshotProjectionSchema = external_exports.object({
|
|
3496
3520
|
id: external_exports.string().uuid(),
|
|
3497
3521
|
agentId: external_exports.string().uuid(),
|
|
@@ -3501,7 +3525,9 @@ var chatThreadSnapshotProjectionSchema = external_exports.object({
|
|
|
3501
3525
|
updatedAt: external_exports.string(),
|
|
3502
3526
|
pinnedAt: external_exports.string().nullable(),
|
|
3503
3527
|
renamedAt: external_exports.string().nullable(),
|
|
3504
|
-
selectedModel: external_exports.string().nullable().default(null)
|
|
3528
|
+
selectedModel: external_exports.string().nullable().default(null),
|
|
3529
|
+
serviceTier: chatThreadServiceTierSchema.nullable().default(null),
|
|
3530
|
+
computerUseHostId: external_exports.string().uuid().nullable().default(null)
|
|
3505
3531
|
});
|
|
3506
3532
|
var chatThreadEventSchema = external_exports.object({
|
|
3507
3533
|
id: chatThreadEventIdSchema,
|
|
@@ -3512,12 +3538,16 @@ var chatThreadEventSchema = external_exports.object({
|
|
|
3512
3538
|
"pinned",
|
|
3513
3539
|
"unpinned",
|
|
3514
3540
|
"model_selection_updated",
|
|
3541
|
+
"service_tier_updated",
|
|
3542
|
+
"computer_use_host_updated",
|
|
3515
3543
|
"sort_touched"
|
|
3516
3544
|
]),
|
|
3517
3545
|
chatThreadId: external_exports.string().uuid(),
|
|
3518
3546
|
agentId: external_exports.string().uuid(),
|
|
3519
3547
|
title: external_exports.string().nullable(),
|
|
3520
3548
|
selectedModel: external_exports.string().nullable().default(null),
|
|
3549
|
+
serviceTier: chatThreadServiceTierSchema.nullable().default(null),
|
|
3550
|
+
computerUseHostId: external_exports.string().uuid().nullable().default(null),
|
|
3521
3551
|
createdAt: external_exports.string()
|
|
3522
3552
|
});
|
|
3523
3553
|
var chatMessageUsageProviderBreakdownSchema = external_exports.object({
|
|
@@ -3743,7 +3773,8 @@ var chatThreadModelSelectionUpdateBodySchema = external_exports.preprocess(
|
|
|
3743
3773
|
*/
|
|
3744
3774
|
model: selectedModelRequestSchema.nullable(),
|
|
3745
3775
|
codexServiceTier: codexServiceTierSchema.nullable().optional(),
|
|
3746
|
-
eventId: chatThreadEventIdSchema.optional()
|
|
3776
|
+
eventId: chatThreadEventIdSchema.optional(),
|
|
3777
|
+
serviceTierEventId: chatThreadEventIdSchema.optional()
|
|
3747
3778
|
})
|
|
3748
3779
|
);
|
|
3749
3780
|
var chatRunOptionsRequestSchema = external_exports.object({
|
|
@@ -4100,7 +4131,8 @@ var chatThreadComputerUseHostContract = c14.router({
|
|
|
4100
4131
|
headers: authHeadersSchema,
|
|
4101
4132
|
pathParams: chatThreadIdPathParamsSchema,
|
|
4102
4133
|
body: external_exports.object({
|
|
4103
|
-
computerUseHostId: external_exports.string().uuid().nullable()
|
|
4134
|
+
computerUseHostId: external_exports.string().uuid().nullable(),
|
|
4135
|
+
eventId: chatThreadEventIdSchema.optional()
|
|
4104
4136
|
}),
|
|
4105
4137
|
responses: {
|
|
4106
4138
|
204: c14.noBody(),
|
|
@@ -4245,6 +4277,9 @@ var chatThreadMessagesContract = c14.router({
|
|
|
4245
4277
|
},
|
|
4246
4278
|
summary: "Get paginated chat messages for a thread"
|
|
4247
4279
|
},
|
|
4280
|
+
// Compatibility for already-open app-v0.627.3 browser clients. The next app
|
|
4281
|
+
// no longer calls this route; remove it only after those clients can no
|
|
4282
|
+
// longer reasonably remain active against the current backend.
|
|
4248
4283
|
get: {
|
|
4249
4284
|
method: "GET",
|
|
4250
4285
|
path: "/api/zero/chat-threads/:threadId/messages/:messageId",
|
|
@@ -7222,8 +7257,8 @@ var webhookCheckpointsContract = c25.router({
|
|
|
7222
7257
|
cliAgentType: external_exports.string().min(1, "cliAgentType is required"),
|
|
7223
7258
|
cliAgentSessionId: external_exports.string().min(1, "cliAgentSessionId is required"),
|
|
7224
7259
|
cliAgentSessionHistoryHash: sha256HexSchema,
|
|
7225
|
-
// Multi-artifact snapshots
|
|
7226
|
-
//
|
|
7260
|
+
// Multi-artifact snapshots are folded into canonical checkpoint mounts
|
|
7261
|
+
// and projected back into the legacy response shape.
|
|
7227
7262
|
artifactSnapshots: artifactSnapshotsSchema.optional(),
|
|
7228
7263
|
volumeVersionsSnapshot: volumeVersionsSnapshotSchema.optional()
|
|
7229
7264
|
}).strict(),
|
|
@@ -11035,7 +11070,13 @@ var zeroMailDraftStatusSchema = external_exports.enum(["draft", "sent", "deleted
|
|
|
11035
11070
|
var zeroMailAttachmentSchema = external_exports.object({
|
|
11036
11071
|
filename: external_exports.string(),
|
|
11037
11072
|
contentType: external_exports.string(),
|
|
11038
|
-
size: external_exports.number().int().nonnegative()
|
|
11073
|
+
size: external_exports.number().int().nonnegative(),
|
|
11074
|
+
partId: external_exports.string().optional()
|
|
11075
|
+
});
|
|
11076
|
+
var zeroMailInlineImageSchema = external_exports.object({
|
|
11077
|
+
contentId: external_exports.string().min(1),
|
|
11078
|
+
partId: external_exports.string().min(1),
|
|
11079
|
+
alt: external_exports.string()
|
|
11039
11080
|
});
|
|
11040
11081
|
var zeroMailDraftBaseSchema = external_exports.object({
|
|
11041
11082
|
provider: external_exports.literal("gmail"),
|
|
@@ -11046,6 +11087,9 @@ var zeroMailDraftBaseSchema = external_exports.object({
|
|
|
11046
11087
|
bcc: external_exports.array(external_exports.email()),
|
|
11047
11088
|
subject: external_exports.string(),
|
|
11048
11089
|
body: external_exports.string(),
|
|
11090
|
+
bodyHtml: external_exports.string().optional(),
|
|
11091
|
+
inlineImages: external_exports.array(zeroMailInlineImageSchema).optional(),
|
|
11092
|
+
accessStatus: external_exports.enum(["ready", "reconnect"]).optional(),
|
|
11049
11093
|
replyTo: external_exports.string().optional(),
|
|
11050
11094
|
inReplyTo: external_exports.string().optional(),
|
|
11051
11095
|
references: external_exports.array(external_exports.string()),
|
|
@@ -11075,6 +11119,9 @@ var zeroMailLinkResponseSchema = zeroMailDraftResponseSchema.pick({
|
|
|
11075
11119
|
var zeroMailDraftPathParamsSchema = external_exports.object({
|
|
11076
11120
|
mailDraftId: external_exports.string().uuid()
|
|
11077
11121
|
});
|
|
11122
|
+
var zeroMailDraftAttachmentPathParamsSchema = zeroMailDraftPathParamsSchema.extend({
|
|
11123
|
+
partId: external_exports.string().min(1)
|
|
11124
|
+
});
|
|
11078
11125
|
var zeroMailContract = c36.router({
|
|
11079
11126
|
linkDraft: {
|
|
11080
11127
|
method: "POST",
|
|
@@ -11108,6 +11155,23 @@ var zeroMailContract = c36.router({
|
|
|
11108
11155
|
},
|
|
11109
11156
|
summary: "Get an email draft by ID"
|
|
11110
11157
|
},
|
|
11158
|
+
getAttachment: {
|
|
11159
|
+
method: "GET",
|
|
11160
|
+
path: "/api/zero/mail/drafts/:mailDraftId/attachments/:partId",
|
|
11161
|
+
headers: authHeadersSchema,
|
|
11162
|
+
pathParams: zeroMailDraftAttachmentPathParamsSchema,
|
|
11163
|
+
responses: {
|
|
11164
|
+
200: c36.otherResponse({
|
|
11165
|
+
contentType: "application/octet-stream",
|
|
11166
|
+
body: c36.type()
|
|
11167
|
+
}),
|
|
11168
|
+
401: apiErrorSchema,
|
|
11169
|
+
403: apiErrorSchema,
|
|
11170
|
+
404: apiErrorSchema,
|
|
11171
|
+
409: apiErrorSchema
|
|
11172
|
+
},
|
|
11173
|
+
summary: "Get a Gmail draft attachment"
|
|
11174
|
+
},
|
|
11111
11175
|
deleteDraft: {
|
|
11112
11176
|
method: "DELETE",
|
|
11113
11177
|
path: "/api/zero/mail/drafts/:mailDraftId",
|
|
@@ -11256,6 +11320,117 @@ var integrationsFeishuMessageContract = c37.router({
|
|
|
11256
11320
|
summary: "Send a Feishu message via an organization custom app"
|
|
11257
11321
|
}
|
|
11258
11322
|
});
|
|
11323
|
+
var FEISHU_FILE_UPLOAD_MAX_BYTES = 30 * 1024 * 1024;
|
|
11324
|
+
var feishuResourceTypeSchema = external_exports.enum(["file", "image"]);
|
|
11325
|
+
var integrationsFeishuDownloadFileContract = c37.router({
|
|
11326
|
+
download: {
|
|
11327
|
+
method: "GET",
|
|
11328
|
+
path: "/api/zero/integrations/feishu/download-file",
|
|
11329
|
+
headers: authHeadersSchema,
|
|
11330
|
+
query: external_exports.object({
|
|
11331
|
+
installation_id: external_exports.string().uuid().optional(),
|
|
11332
|
+
message_id: external_exports.string().min(1, "Message ID is required"),
|
|
11333
|
+
file_key: external_exports.string().min(1, "File key is required"),
|
|
11334
|
+
type: feishuResourceTypeSchema
|
|
11335
|
+
}),
|
|
11336
|
+
responses: {
|
|
11337
|
+
200: c37.otherResponse({
|
|
11338
|
+
contentType: "application/octet-stream",
|
|
11339
|
+
body: external_exports.unknown()
|
|
11340
|
+
}),
|
|
11341
|
+
400: apiErrorSchema,
|
|
11342
|
+
401: apiErrorSchema,
|
|
11343
|
+
403: apiErrorSchema,
|
|
11344
|
+
404: apiErrorSchema,
|
|
11345
|
+
413: apiErrorSchema,
|
|
11346
|
+
502: apiErrorSchema
|
|
11347
|
+
},
|
|
11348
|
+
summary: "Download a file from a Feishu message"
|
|
11349
|
+
}
|
|
11350
|
+
});
|
|
11351
|
+
var feishuUploadInitBodySchema = external_exports.object({
|
|
11352
|
+
filename: external_exports.string().min(1, "Filename is required").max(255),
|
|
11353
|
+
contentType: external_exports.string().min(1, "Content type is required").max(200),
|
|
11354
|
+
length: external_exports.number().int().positive("File length must be a positive integer").max(
|
|
11355
|
+
FEISHU_FILE_UPLOAD_MAX_BYTES,
|
|
11356
|
+
`File must not exceed ${FEISHU_FILE_UPLOAD_MAX_BYTES} bytes`
|
|
11357
|
+
)
|
|
11358
|
+
});
|
|
11359
|
+
var feishuUploadInitResponseSchema = external_exports.object({
|
|
11360
|
+
uploadId: external_exports.string().uuid(),
|
|
11361
|
+
uploadUrl: external_exports.string(),
|
|
11362
|
+
fileUrl: external_exports.string(),
|
|
11363
|
+
filename: external_exports.string(),
|
|
11364
|
+
contentType: external_exports.string(),
|
|
11365
|
+
size: external_exports.number().int().nonnegative()
|
|
11366
|
+
});
|
|
11367
|
+
var integrationsFeishuUploadInitContract = c37.router({
|
|
11368
|
+
init: {
|
|
11369
|
+
method: "POST",
|
|
11370
|
+
path: "/api/zero/integrations/feishu/upload-file/init",
|
|
11371
|
+
headers: authHeadersSchema,
|
|
11372
|
+
body: feishuUploadInitBodySchema,
|
|
11373
|
+
responses: {
|
|
11374
|
+
200: feishuUploadInitResponseSchema,
|
|
11375
|
+
400: apiErrorSchema,
|
|
11376
|
+
401: apiErrorSchema,
|
|
11377
|
+
403: apiErrorSchema
|
|
11378
|
+
},
|
|
11379
|
+
summary: "Get a pre-signed upload URL for Feishu file delivery"
|
|
11380
|
+
}
|
|
11381
|
+
});
|
|
11382
|
+
var feishuUploadCompleteBodySchema = external_exports.object({
|
|
11383
|
+
uploadId: external_exports.string().uuid("Upload ID must be a UUID"),
|
|
11384
|
+
installationId: external_exports.string().uuid().optional(),
|
|
11385
|
+
chat: external_exports.string().min(1, "Chat ID is required").optional(),
|
|
11386
|
+
user: external_exports.string().min(1, "Feishu open ID is required").optional(),
|
|
11387
|
+
replyToMessageId: external_exports.string().min(1, "Message ID is required").optional(),
|
|
11388
|
+
replyInThread: external_exports.boolean().optional(),
|
|
11389
|
+
contentType: external_exports.string().min(1).max(200).optional()
|
|
11390
|
+
}).refine(
|
|
11391
|
+
(body) => {
|
|
11392
|
+
return [body.chat, body.user, body.replyToMessageId].filter(Boolean).length === 1;
|
|
11393
|
+
},
|
|
11394
|
+
{
|
|
11395
|
+
message: "Exactly one of chat, user, or replyToMessageId is required",
|
|
11396
|
+
path: ["chat"]
|
|
11397
|
+
}
|
|
11398
|
+
).refine(
|
|
11399
|
+
(body) => {
|
|
11400
|
+
return !body.replyInThread || Boolean(body.replyToMessageId);
|
|
11401
|
+
},
|
|
11402
|
+
{
|
|
11403
|
+
message: "replyInThread requires replyToMessageId",
|
|
11404
|
+
path: ["replyInThread"]
|
|
11405
|
+
}
|
|
11406
|
+
);
|
|
11407
|
+
var feishuUploadCompleteResponseSchema = external_exports.object({
|
|
11408
|
+
messageId: external_exports.string(),
|
|
11409
|
+
chatId: external_exports.string().nullable(),
|
|
11410
|
+
fileKey: external_exports.string(),
|
|
11411
|
+
filename: external_exports.string(),
|
|
11412
|
+
mimetype: external_exports.string(),
|
|
11413
|
+
size: external_exports.number().int().nonnegative(),
|
|
11414
|
+
url: external_exports.string()
|
|
11415
|
+
});
|
|
11416
|
+
var integrationsFeishuUploadCompleteContract = c37.router({
|
|
11417
|
+
complete: {
|
|
11418
|
+
method: "POST",
|
|
11419
|
+
path: "/api/zero/integrations/feishu/upload-file/complete",
|
|
11420
|
+
headers: authHeadersSchema,
|
|
11421
|
+
body: feishuUploadCompleteBodySchema,
|
|
11422
|
+
responses: {
|
|
11423
|
+
200: feishuUploadCompleteResponseSchema,
|
|
11424
|
+
400: apiErrorSchema,
|
|
11425
|
+
401: apiErrorSchema,
|
|
11426
|
+
403: apiErrorSchema,
|
|
11427
|
+
404: apiErrorSchema,
|
|
11428
|
+
413: apiErrorSchema,
|
|
11429
|
+
502: apiErrorSchema
|
|
11430
|
+
},
|
|
11431
|
+
summary: "Finalize Feishu file upload and send it to a conversation"
|
|
11432
|
+
}
|
|
11433
|
+
});
|
|
11259
11434
|
var sendTelegramMessageBodySchema = external_exports.object({
|
|
11260
11435
|
botId: external_exports.string().min(1, "Bot ID is required"),
|
|
11261
11436
|
chatId: external_exports.string().min(1, "Chat ID is required"),
|
|
@@ -11432,12 +11607,32 @@ var integrationsTelegramBotListContract = c37.router({
|
|
|
11432
11607
|
});
|
|
11433
11608
|
var slackUploadInitBodySchema = external_exports.object({
|
|
11434
11609
|
filename: external_exports.string().min(1, "Filename is required"),
|
|
11435
|
-
length: external_exports.number().int().positive("File length must be a positive integer")
|
|
11610
|
+
length: external_exports.number().int().positive("File length must be a positive integer"),
|
|
11611
|
+
canonical: external_exports.object({
|
|
11612
|
+
operationId: external_exports.string().uuid(),
|
|
11613
|
+
contentType: external_exports.string().min(1).max(200),
|
|
11614
|
+
checksumSha256: external_exports.string().regex(/^[a-f0-9]{64}$/),
|
|
11615
|
+
channel: external_exports.string().min(1, "Channel ID is required"),
|
|
11616
|
+
threadTs: external_exports.string().optional(),
|
|
11617
|
+
title: external_exports.string().optional(),
|
|
11618
|
+
initialComment: external_exports.string().optional()
|
|
11619
|
+
}).optional()
|
|
11436
11620
|
});
|
|
11437
|
-
var
|
|
11621
|
+
var directSlackUploadInitResponseSchema = external_exports.object({
|
|
11438
11622
|
uploadUrl: external_exports.string(),
|
|
11439
11623
|
fileId: external_exports.string()
|
|
11440
11624
|
});
|
|
11625
|
+
var canonicalSlackUploadInitResponseSchema = external_exports.object({
|
|
11626
|
+
kind: external_exports.literal("canonical"),
|
|
11627
|
+
assetId: external_exports.string().uuid(),
|
|
11628
|
+
operationId: external_exports.string().uuid(),
|
|
11629
|
+
uploadUrl: external_exports.string().url().optional(),
|
|
11630
|
+
url: external_exports.string().url()
|
|
11631
|
+
});
|
|
11632
|
+
var slackUploadInitResponseSchema = external_exports.union([
|
|
11633
|
+
directSlackUploadInitResponseSchema,
|
|
11634
|
+
canonicalSlackUploadInitResponseSchema
|
|
11635
|
+
]);
|
|
11441
11636
|
var integrationsSlackUploadInitContract = c37.router({
|
|
11442
11637
|
init: {
|
|
11443
11638
|
method: "POST",
|
|
@@ -11454,6 +11649,47 @@ var integrationsSlackUploadInitContract = c37.router({
|
|
|
11454
11649
|
summary: "Get a pre-signed Slack upload URL via org bot token"
|
|
11455
11650
|
}
|
|
11456
11651
|
});
|
|
11652
|
+
var slackUploadMaterializeBodySchema = external_exports.object({
|
|
11653
|
+
assetId: external_exports.string().uuid(),
|
|
11654
|
+
operationId: external_exports.string().uuid()
|
|
11655
|
+
});
|
|
11656
|
+
var slackUploadMaterializeResponseSchema = external_exports.object({
|
|
11657
|
+
assetId: external_exports.string().uuid(),
|
|
11658
|
+
url: external_exports.string().url(),
|
|
11659
|
+
delivery: external_exports.discriminatedUnion("status", [
|
|
11660
|
+
external_exports.object({
|
|
11661
|
+
status: external_exports.literal("pending"),
|
|
11662
|
+
uploadUrl: external_exports.string(),
|
|
11663
|
+
fileId: external_exports.string()
|
|
11664
|
+
}),
|
|
11665
|
+
external_exports.object({
|
|
11666
|
+
status: external_exports.literal("delivered"),
|
|
11667
|
+
fileId: external_exports.string(),
|
|
11668
|
+
permalink: external_exports.string()
|
|
11669
|
+
}),
|
|
11670
|
+
external_exports.object({
|
|
11671
|
+
status: external_exports.literal("failed"),
|
|
11672
|
+
message: external_exports.string(),
|
|
11673
|
+
retryable: external_exports.boolean()
|
|
11674
|
+
})
|
|
11675
|
+
])
|
|
11676
|
+
});
|
|
11677
|
+
var integrationsSlackUploadMaterializeContract = c37.router({
|
|
11678
|
+
materialize: {
|
|
11679
|
+
method: "POST",
|
|
11680
|
+
path: "/api/zero/integrations/slack/upload-file/materialize",
|
|
11681
|
+
headers: authHeadersSchema,
|
|
11682
|
+
body: slackUploadMaterializeBodySchema,
|
|
11683
|
+
responses: {
|
|
11684
|
+
200: slackUploadMaterializeResponseSchema,
|
|
11685
|
+
400: apiErrorSchema,
|
|
11686
|
+
401: apiErrorSchema,
|
|
11687
|
+
403: apiErrorSchema,
|
|
11688
|
+
404: apiErrorSchema
|
|
11689
|
+
},
|
|
11690
|
+
summary: "Materialize a canonical Slack publication before delivery"
|
|
11691
|
+
}
|
|
11692
|
+
});
|
|
11457
11693
|
var telegramUploadInitBodySchema = external_exports.object({
|
|
11458
11694
|
filename: external_exports.string().min(1, "Filename is required").max(255),
|
|
11459
11695
|
contentType: external_exports.string().min(1, "Content type is required").max(200),
|
|
@@ -11707,11 +11943,18 @@ var slackUploadCompleteBodySchema = external_exports.object({
|
|
|
11707
11943
|
channel: external_exports.string().min(1, "Channel ID is required"),
|
|
11708
11944
|
threadTs: external_exports.string().optional(),
|
|
11709
11945
|
title: external_exports.string().optional(),
|
|
11710
|
-
initialComment: external_exports.string().optional()
|
|
11946
|
+
initialComment: external_exports.string().optional(),
|
|
11947
|
+
canonicalAssetId: external_exports.string().uuid().optional(),
|
|
11948
|
+
operationId: external_exports.string().uuid().optional(),
|
|
11949
|
+
uploadError: external_exports.string().max(2e3).optional()
|
|
11711
11950
|
});
|
|
11712
11951
|
var slackUploadCompleteResponseSchema = external_exports.object({
|
|
11713
11952
|
fileId: external_exports.string(),
|
|
11714
|
-
permalink: external_exports.string()
|
|
11953
|
+
permalink: external_exports.string(),
|
|
11954
|
+
assetId: external_exports.string().uuid().optional(),
|
|
11955
|
+
assetUrl: external_exports.string().url().optional(),
|
|
11956
|
+
deliveryStatus: external_exports.enum(["delivered", "failed"]).optional(),
|
|
11957
|
+
deliveryError: external_exports.string().optional()
|
|
11715
11958
|
});
|
|
11716
11959
|
var integrationsSlackUploadCompleteContract = c37.router({
|
|
11717
11960
|
complete: {
|
|
@@ -11758,6 +12001,15 @@ async function completeSlackFileUpload(body) {
|
|
|
11758
12001
|
}
|
|
11759
12002
|
handleError(result, "Failed to complete Slack file upload");
|
|
11760
12003
|
}
|
|
12004
|
+
async function materializeSlackFileUpload(body) {
|
|
12005
|
+
const config = await getClientConfig();
|
|
12006
|
+
const client = initClient(integrationsSlackUploadMaterializeContract, config);
|
|
12007
|
+
const result = await client.materialize({ body, headers: {} });
|
|
12008
|
+
if (result.status === 200) {
|
|
12009
|
+
return result.body;
|
|
12010
|
+
}
|
|
12011
|
+
handleError(result, "Failed to materialize Slack file upload");
|
|
12012
|
+
}
|
|
11761
12013
|
async function downloadSlackFile(fileId, outPath) {
|
|
11762
12014
|
const baseUrl = await getBaseUrl();
|
|
11763
12015
|
const token = await getActiveToken();
|
|
@@ -11972,6 +12224,9 @@ async function downloadTeamsFile(fileId, outPath) {
|
|
|
11972
12224
|
|
|
11973
12225
|
// src/lib/api/domains/integrations-feishu.ts
|
|
11974
12226
|
init_esm_shims();
|
|
12227
|
+
import { createWriteStream as createWriteStream4 } from "fs";
|
|
12228
|
+
import { Readable as Readable4 } from "stream";
|
|
12229
|
+
import { pipeline as pipeline4 } from "stream/promises";
|
|
11975
12230
|
async function sendFeishuMessage(body) {
|
|
11976
12231
|
const config = await getClientConfig();
|
|
11977
12232
|
const client = initClient(integrationsFeishuMessageContract, config);
|
|
@@ -11981,12 +12236,84 @@ async function sendFeishuMessage(body) {
|
|
|
11981
12236
|
}
|
|
11982
12237
|
handleError(result, "Failed to send Feishu message");
|
|
11983
12238
|
}
|
|
12239
|
+
async function initFeishuFileUpload(body) {
|
|
12240
|
+
const config = await getClientConfig();
|
|
12241
|
+
const client = initClient(integrationsFeishuUploadInitContract, config);
|
|
12242
|
+
const result = await client.init({ body, headers: {} });
|
|
12243
|
+
if (result.status === 200) {
|
|
12244
|
+
return result.body;
|
|
12245
|
+
}
|
|
12246
|
+
handleError(result, "Failed to initialize Feishu file upload");
|
|
12247
|
+
}
|
|
12248
|
+
async function completeFeishuFileUpload(body) {
|
|
12249
|
+
const config = await getClientConfig();
|
|
12250
|
+
const client = initClient(integrationsFeishuUploadCompleteContract, config);
|
|
12251
|
+
const result = await client.complete({ body, headers: {} });
|
|
12252
|
+
if (result.status === 200) {
|
|
12253
|
+
return result.body;
|
|
12254
|
+
}
|
|
12255
|
+
handleError(result, "Failed to complete Feishu file upload");
|
|
12256
|
+
}
|
|
12257
|
+
async function downloadFeishuFile(messageId, fileKey, resourceType, installationId, outPath) {
|
|
12258
|
+
const baseUrl = await getBaseUrl();
|
|
12259
|
+
const token = await getActiveToken();
|
|
12260
|
+
if (!token) {
|
|
12261
|
+
throw new ApiRequestError("Not authenticated", "UNAUTHORIZED", 401);
|
|
12262
|
+
}
|
|
12263
|
+
const url = new URL("/api/zero/integrations/feishu/download-file", baseUrl);
|
|
12264
|
+
url.searchParams.set("message_id", messageId);
|
|
12265
|
+
url.searchParams.set("file_key", fileKey);
|
|
12266
|
+
url.searchParams.set("type", resourceType);
|
|
12267
|
+
if (installationId) {
|
|
12268
|
+
url.searchParams.set("installation_id", installationId);
|
|
12269
|
+
}
|
|
12270
|
+
const headers = {
|
|
12271
|
+
Authorization: `Bearer ${token}`
|
|
12272
|
+
};
|
|
12273
|
+
const bypassSecret = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;
|
|
12274
|
+
if (bypassSecret) {
|
|
12275
|
+
headers["x-vercel-protection-bypass"] = bypassSecret;
|
|
12276
|
+
}
|
|
12277
|
+
const response = await fetch(url, {
|
|
12278
|
+
headers: headersWithCliClientHeaders(headers)
|
|
12279
|
+
});
|
|
12280
|
+
if (!response.ok) {
|
|
12281
|
+
let message = `Failed to download Feishu file (HTTP ${response.status})`;
|
|
12282
|
+
let code = "UNKNOWN";
|
|
12283
|
+
try {
|
|
12284
|
+
const body = await response.json();
|
|
12285
|
+
if (body.error?.message) {
|
|
12286
|
+
message = body.error.message;
|
|
12287
|
+
}
|
|
12288
|
+
if (body.error?.code) {
|
|
12289
|
+
code = body.error.code;
|
|
12290
|
+
}
|
|
12291
|
+
} catch {
|
|
12292
|
+
}
|
|
12293
|
+
throw new ApiRequestError(message, code, response.status);
|
|
12294
|
+
}
|
|
12295
|
+
if (!response.body) {
|
|
12296
|
+
throw new ApiRequestError(
|
|
12297
|
+
"Feishu download response has no body",
|
|
12298
|
+
"EMPTY_BODY",
|
|
12299
|
+
502
|
|
12300
|
+
);
|
|
12301
|
+
}
|
|
12302
|
+
const mimetype = response.headers.get("x-file-mimetype") ?? response.headers.get("content-type") ?? "application/octet-stream";
|
|
12303
|
+
await pipeline4(
|
|
12304
|
+
Readable4.fromWeb(response.body),
|
|
12305
|
+
createWriteStream4(outPath)
|
|
12306
|
+
);
|
|
12307
|
+
const contentLength = response.headers.get("content-length");
|
|
12308
|
+
const size = contentLength ? Number(contentLength) : 0;
|
|
12309
|
+
return { path: outPath, mimetype, size };
|
|
12310
|
+
}
|
|
11984
12311
|
|
|
11985
12312
|
// src/lib/api/domains/integrations-github.ts
|
|
11986
12313
|
init_esm_shims();
|
|
11987
|
-
import { createWriteStream as
|
|
11988
|
-
import { Readable as
|
|
11989
|
-
import { pipeline as
|
|
12314
|
+
import { createWriteStream as createWriteStream5 } from "fs";
|
|
12315
|
+
import { Readable as Readable5 } from "stream";
|
|
12316
|
+
import { pipeline as pipeline5 } from "stream/promises";
|
|
11990
12317
|
async function initGithubFileUpload(body) {
|
|
11991
12318
|
const config = await getClientConfig();
|
|
11992
12319
|
const client = initClient(integrationsGithubUploadInitContract, config);
|
|
@@ -12045,9 +12372,9 @@ async function downloadGithubFile(fileUrl, outPath, filename) {
|
|
|
12045
12372
|
);
|
|
12046
12373
|
}
|
|
12047
12374
|
const mimetype = response.headers.get("x-file-mimetype") ?? response.headers.get("content-type") ?? "application/octet-stream";
|
|
12048
|
-
await
|
|
12049
|
-
|
|
12050
|
-
|
|
12375
|
+
await pipeline5(
|
|
12376
|
+
Readable5.fromWeb(response.body),
|
|
12377
|
+
createWriteStream5(outPath)
|
|
12051
12378
|
);
|
|
12052
12379
|
const contentLengthHeader = response.headers.get("content-length");
|
|
12053
12380
|
const size = contentLengthHeader ? Number(contentLengthHeader) : 0;
|
|
@@ -12056,9 +12383,9 @@ async function downloadGithubFile(fileUrl, outPath, filename) {
|
|
|
12056
12383
|
|
|
12057
12384
|
// src/lib/api/domains/integrations-phone.ts
|
|
12058
12385
|
init_esm_shims();
|
|
12059
|
-
import { createWriteStream as
|
|
12060
|
-
import { Readable as
|
|
12061
|
-
import { pipeline as
|
|
12386
|
+
import { createWriteStream as createWriteStream6 } from "fs";
|
|
12387
|
+
import { Readable as Readable6 } from "stream";
|
|
12388
|
+
import { pipeline as pipeline6 } from "stream/promises";
|
|
12062
12389
|
async function sendPhoneMessage(body) {
|
|
12063
12390
|
const config = await getClientConfig();
|
|
12064
12391
|
const client = initClient(integrationsPhoneMessageContract, config);
|
|
@@ -12123,9 +12450,9 @@ async function downloadPhoneFile(fileId, outPath) {
|
|
|
12123
12450
|
);
|
|
12124
12451
|
}
|
|
12125
12452
|
const mimetype = response.headers.get("x-file-mimetype") ?? response.headers.get("content-type") ?? "application/octet-stream";
|
|
12126
|
-
await
|
|
12127
|
-
|
|
12128
|
-
|
|
12453
|
+
await pipeline6(
|
|
12454
|
+
Readable6.fromWeb(response.body),
|
|
12455
|
+
createWriteStream6(outPath)
|
|
12129
12456
|
);
|
|
12130
12457
|
const contentLengthHeader = response.headers.get("content-length");
|
|
12131
12458
|
const size = contentLengthHeader ? Number(contentLengthHeader) : 0;
|
|
@@ -12365,9 +12692,11 @@ export {
|
|
|
12365
12692
|
listZeroCustomConnectors,
|
|
12366
12693
|
getZeroCustomConnector,
|
|
12367
12694
|
linkZeroMailDraft,
|
|
12695
|
+
FEISHU_FILE_UPLOAD_MAX_BYTES,
|
|
12368
12696
|
sendSlackMessage,
|
|
12369
12697
|
initSlackFileUpload,
|
|
12370
12698
|
completeSlackFileUpload,
|
|
12699
|
+
materializeSlackFileUpload,
|
|
12371
12700
|
downloadSlackFile,
|
|
12372
12701
|
listTelegramBots,
|
|
12373
12702
|
sendTelegramMessage,
|
|
@@ -12379,6 +12708,9 @@ export {
|
|
|
12379
12708
|
completeTeamsFileUpload,
|
|
12380
12709
|
downloadTeamsFile,
|
|
12381
12710
|
sendFeishuMessage,
|
|
12711
|
+
initFeishuFileUpload,
|
|
12712
|
+
completeFeishuFileUpload,
|
|
12713
|
+
downloadFeishuFile,
|
|
12382
12714
|
initGithubFileUpload,
|
|
12383
12715
|
completeGithubFileUpload,
|
|
12384
12716
|
downloadGithubFile,
|
|
@@ -12441,4 +12773,4 @@ export {
|
|
|
12441
12773
|
getHostedSiteFiles,
|
|
12442
12774
|
getHostedSiteDeployments
|
|
12443
12775
|
};
|
|
12444
|
-
//# sourceMappingURL=chunk-
|
|
12776
|
+
//# sourceMappingURL=chunk-FBISVSTZ.js.map
|