@vm0/cli 9.254.2 → 9.255.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-NSQIRPVB.js → agent-YXVPOZDT.js} +7 -7
- package/{banking-IQ7MX2B4.js → banking-K734DGW4.js} +5 -5
- package/browser-GMLGBTV7.js +186 -0
- package/browser-GMLGBTV7.js.map +1 -0
- package/{chat-SC5PGHDZ.js → chat-I2URW23Z.js} +6 -6
- package/{chunk-F6JKPYD2.js → chunk-24QJ7H5R.js} +2 -2
- package/{chunk-X6PT2M2I.js → chunk-45FQJCB2.js} +2 -2
- package/{chunk-SXD7ESWU.js → chunk-7PFY5Y77.js} +82 -151
- package/chunk-7PFY5Y77.js.map +1 -0
- package/{chunk-UUKFGXX5.js → chunk-BKR7J5QP.js} +2 -2
- package/{chunk-MNHYBPQB.js → chunk-BYD553JQ.js} +4 -4
- package/{chunk-TV6RSLOX.js → chunk-DQB537B5.js} +3 -3
- package/{chunk-D4OTAABD.js → chunk-H4LRAOOF.js} +6 -1
- package/chunk-H4LRAOOF.js.map +1 -0
- package/{chunk-7OBI7V4O.js → chunk-MDKQRZ7S.js} +581 -511
- package/chunk-MDKQRZ7S.js.map +1 -0
- package/{chunk-4MPNBXFO.js → chunk-RKXDWJW5.js} +2 -2
- package/{chunk-BSFDG7MC.js → chunk-UKQRMBLJ.js} +2 -2
- package/{chunk-OTH23BP4.js → chunk-ZLP3TODB.js} +84 -2
- package/chunk-ZLP3TODB.js.map +1 -0
- package/{computer-use-C7D4GLBU.js → computer-use-OVYDVFLM.js} +5 -5
- package/{connector-FW3TFVAJ.js → connector-ZJ4GNXOR.js} +15 -83
- package/connector-ZJ4GNXOR.js.map +1 -0
- package/{credit-YDQVARRO.js → credit-5F56FMHI.js} +7 -7
- package/{developer-support-NPRGXXF2.js → developer-support-DMN7JGPX.js} +5 -5
- package/{doctor-D7DAFSV3.js → doctor-Y724BLON.js} +7 -7
- package/{feishu-UDSN4AVE.js → feishu-T5ZIWV53.js} +5 -5
- package/{finance-O7WTSZ7W.js → finance-4ZRCXMFS.js} +5 -5
- package/{generate-ERHBA3S5.js → generate-JFRB6NBZ.js} +7 -7
- package/{github-LFJ6JXXJ.js → github-ZXWGL5Q6.js} +5 -5
- package/{goal-GFUDKA42.js → goal-22N3CH3F.js} +5 -5
- package/{host-4NPMKE4M.js → host-I7S5PYUY.js} +5 -5
- package/{logs-IAMPNPZU.js → logs-4HV44EMA.js} +6 -6
- package/{mail-KZJLXDSP.js → mail-U5LPAC7X.js} +67 -17
- package/mail-U5LPAC7X.js.map +1 -0
- package/{maps-QC6LW3XN.js → maps-PF5WHYEC.js} +5 -5
- package/{model-ZCBZUROI.js → model-JMQSUUFJ.js} +6 -6
- package/{model-provider-KHT4TJAD.js → model-provider-AJCWCCNB.js} +6 -6
- package/{org-PGERW5HL.js → org-7Q3J66NB.js} +5 -5
- package/package.json +1 -1
- package/{people-search-KOWVJQ7J.js → people-search-GUIJICYT.js} +5 -5
- package/{phone-UDZRVU4K.js → phone-6U27VFNC.js} +5 -5
- package/{preference-CW4D6H22.js → preference-BFLHPME6.js} +5 -5
- package/{resource-UTBKHQYI.js → resource-C3PAGM7Y.js} +5 -5
- package/{scrape-HSJGZHJP.js → scrape-5XL47HZY.js} +5 -5
- package/{search-E3XYG3EQ.js → search-B2V6NTUP.js} +6 -6
- package/{secret-FHYLUY5C.js → secret-QORKNSMC.js} +5 -5
- package/{slack-KNNFCXQL.js → slack-MD6HYUDE.js} +5 -5
- package/{teams-SE2UBCFO.js → teams-LO3PPNA2.js} +5 -5
- package/{telegram-MBCYOZOW.js → telegram-BZUBR4QS.js} +5 -5
- package/{upgrade-HCODAAIE.js → upgrade-63B4TM4E.js} +4 -4
- package/{variable-VK42DTQ3.js → variable-FW7F63SB.js} +5 -5
- package/{video-5HT4OTPO.js → video-RWCQZ4XP.js} +4 -4
- package/{weather-JYVT7MJV.js → weather-ST6CIHV4.js} +5 -5
- package/{web-4ZYLQGTN.js → web-GBSYVVYF.js} +5 -5
- package/{web-search-BUSZ7LN5.js → web-search-AZXILILB.js} +5 -5
- package/{whoami-DD32L4F2.js → whoami-UI67766P.js} +7 -7
- package/{workflow-SW7Q4HHX.js → workflow-CXWRSWUP.js} +5 -5
- package/zero.js +54 -44
- package/zero.js.map +1 -1
- package/chunk-7OBI7V4O.js.map +0 -1
- package/chunk-D4OTAABD.js.map +0 -1
- package/chunk-OTH23BP4.js.map +0 -1
- package/chunk-SXD7ESWU.js.map +0 -1
- package/connector-FW3TFVAJ.js.map +0 -1
- package/mail-KZJLXDSP.js.map +0 -1
- /package/{agent-NSQIRPVB.js.map → agent-YXVPOZDT.js.map} +0 -0
- /package/{banking-IQ7MX2B4.js.map → banking-K734DGW4.js.map} +0 -0
- /package/{chat-SC5PGHDZ.js.map → chat-I2URW23Z.js.map} +0 -0
- /package/{chunk-F6JKPYD2.js.map → chunk-24QJ7H5R.js.map} +0 -0
- /package/{chunk-X6PT2M2I.js.map → chunk-45FQJCB2.js.map} +0 -0
- /package/{chunk-UUKFGXX5.js.map → chunk-BKR7J5QP.js.map} +0 -0
- /package/{chunk-MNHYBPQB.js.map → chunk-BYD553JQ.js.map} +0 -0
- /package/{chunk-TV6RSLOX.js.map → chunk-DQB537B5.js.map} +0 -0
- /package/{chunk-4MPNBXFO.js.map → chunk-RKXDWJW5.js.map} +0 -0
- /package/{chunk-BSFDG7MC.js.map → chunk-UKQRMBLJ.js.map} +0 -0
- /package/{computer-use-C7D4GLBU.js.map → computer-use-OVYDVFLM.js.map} +0 -0
- /package/{credit-YDQVARRO.js.map → credit-5F56FMHI.js.map} +0 -0
- /package/{developer-support-NPRGXXF2.js.map → developer-support-DMN7JGPX.js.map} +0 -0
- /package/{doctor-D7DAFSV3.js.map → doctor-Y724BLON.js.map} +0 -0
- /package/{feishu-UDSN4AVE.js.map → feishu-T5ZIWV53.js.map} +0 -0
- /package/{finance-O7WTSZ7W.js.map → finance-4ZRCXMFS.js.map} +0 -0
- /package/{generate-ERHBA3S5.js.map → generate-JFRB6NBZ.js.map} +0 -0
- /package/{github-LFJ6JXXJ.js.map → github-ZXWGL5Q6.js.map} +0 -0
- /package/{goal-GFUDKA42.js.map → goal-22N3CH3F.js.map} +0 -0
- /package/{host-4NPMKE4M.js.map → host-I7S5PYUY.js.map} +0 -0
- /package/{logs-IAMPNPZU.js.map → logs-4HV44EMA.js.map} +0 -0
- /package/{maps-QC6LW3XN.js.map → maps-PF5WHYEC.js.map} +0 -0
- /package/{model-ZCBZUROI.js.map → model-JMQSUUFJ.js.map} +0 -0
- /package/{model-provider-KHT4TJAD.js.map → model-provider-AJCWCCNB.js.map} +0 -0
- /package/{org-PGERW5HL.js.map → org-7Q3J66NB.js.map} +0 -0
- /package/{people-search-KOWVJQ7J.js.map → people-search-GUIJICYT.js.map} +0 -0
- /package/{phone-UDZRVU4K.js.map → phone-6U27VFNC.js.map} +0 -0
- /package/{preference-CW4D6H22.js.map → preference-BFLHPME6.js.map} +0 -0
- /package/{resource-UTBKHQYI.js.map → resource-C3PAGM7Y.js.map} +0 -0
- /package/{scrape-HSJGZHJP.js.map → scrape-5XL47HZY.js.map} +0 -0
- /package/{search-E3XYG3EQ.js.map → search-B2V6NTUP.js.map} +0 -0
- /package/{secret-FHYLUY5C.js.map → secret-QORKNSMC.js.map} +0 -0
- /package/{slack-KNNFCXQL.js.map → slack-MD6HYUDE.js.map} +0 -0
- /package/{teams-SE2UBCFO.js.map → teams-LO3PPNA2.js.map} +0 -0
- /package/{telegram-MBCYOZOW.js.map → telegram-BZUBR4QS.js.map} +0 -0
- /package/{upgrade-HCODAAIE.js.map → upgrade-63B4TM4E.js.map} +0 -0
- /package/{variable-VK42DTQ3.js.map → variable-FW7F63SB.js.map} +0 -0
- /package/{video-5HT4OTPO.js.map → video-RWCQZ4XP.js.map} +0 -0
- /package/{weather-JYVT7MJV.js.map → weather-ST6CIHV4.js.map} +0 -0
- /package/{web-4ZYLQGTN.js.map → web-GBSYVVYF.js.map} +0 -0
- /package/{web-search-BUSZ7LN5.js.map → web-search-AZXILILB.js.map} +0 -0
- /package/{whoami-DD32L4F2.js.map → whoami-UI67766P.js.map} +0 -0
- /package/{workflow-SW7Q4HHX.js.map → workflow-CXWRSWUP.js.map} +0 -0
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
updateOrgModelPoliciesRequestSchema,
|
|
22
22
|
upsertModelProviderRequestSchema,
|
|
23
23
|
upsertModelProviderResponseSchema
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-DQB537B5.js";
|
|
25
25
|
import {
|
|
26
26
|
__commonJS,
|
|
27
27
|
__esm,
|
|
@@ -682,8 +682,8 @@ var registryResourceDownloadContract = c.router({
|
|
|
682
682
|
// src/lib/api/domains/registry-resources.ts
|
|
683
683
|
async function getRegistryResourceDownload(query) {
|
|
684
684
|
const config = await getClientConfig();
|
|
685
|
-
const
|
|
686
|
-
const result = await
|
|
685
|
+
const client2 = initClient(registryResourceDownloadContract, config);
|
|
686
|
+
const result = await client2.download({ query });
|
|
687
687
|
if (result.status === 200) {
|
|
688
688
|
return result.body;
|
|
689
689
|
}
|
|
@@ -756,8 +756,8 @@ var zeroUserPreferencesContract = c2.router({
|
|
|
756
756
|
// src/lib/api/domains/zero-user-preferences.ts
|
|
757
757
|
async function getZeroUserPreferences() {
|
|
758
758
|
const config = await getClientConfig();
|
|
759
|
-
const
|
|
760
|
-
const result = await
|
|
759
|
+
const client2 = initClient(zeroUserPreferencesContract, config);
|
|
760
|
+
const result = await client2.get({ headers: {} });
|
|
761
761
|
if (result.status === 200) {
|
|
762
762
|
return result.body;
|
|
763
763
|
}
|
|
@@ -765,8 +765,8 @@ async function getZeroUserPreferences() {
|
|
|
765
765
|
}
|
|
766
766
|
async function updateZeroUserPreferences(body) {
|
|
767
767
|
const config = await getClientConfig();
|
|
768
|
-
const
|
|
769
|
-
const result = await
|
|
768
|
+
const client2 = initClient(zeroUserPreferencesContract, config);
|
|
769
|
+
const result = await client2.update({ body });
|
|
770
770
|
if (result.status === 200) {
|
|
771
771
|
return result.body;
|
|
772
772
|
}
|
|
@@ -839,7 +839,6 @@ var orgMessageResponseSchema = external_exports.object({
|
|
|
839
839
|
});
|
|
840
840
|
|
|
841
841
|
// ../../packages/api-contracts/src/contracts/orgs.ts
|
|
842
|
-
var c3 = initContract();
|
|
843
842
|
var orgTierSchema = external_exports.enum([
|
|
844
843
|
"free",
|
|
845
844
|
"limited-free-1",
|
|
@@ -868,38 +867,10 @@ var updateOrgRequestSchema = external_exports.object({
|
|
|
868
867
|
name: external_exports.string().min(1).max(128).optional(),
|
|
869
868
|
force: external_exports.boolean().optional().default(false)
|
|
870
869
|
});
|
|
871
|
-
var orgDefaultAgentContract = c3.router({
|
|
872
|
-
/**
|
|
873
|
-
* PUT /api/zero/default-agent
|
|
874
|
-
* Set or unset the default agent for an org.
|
|
875
|
-
* Only org admins can perform this action.
|
|
876
|
-
* The agent must belong to the same org.
|
|
877
|
-
*/
|
|
878
|
-
setDefaultAgent: {
|
|
879
|
-
method: "PUT",
|
|
880
|
-
path: "/api/zero/default-agent",
|
|
881
|
-
headers: authHeadersSchema,
|
|
882
|
-
query: external_exports.object({}),
|
|
883
|
-
body: external_exports.object({
|
|
884
|
-
agentId: external_exports.uuid().nullable()
|
|
885
|
-
}),
|
|
886
|
-
responses: {
|
|
887
|
-
200: external_exports.object({
|
|
888
|
-
agentId: external_exports.uuid().nullable()
|
|
889
|
-
}),
|
|
890
|
-
400: apiErrorSchema,
|
|
891
|
-
401: apiErrorSchema,
|
|
892
|
-
403: apiErrorSchema,
|
|
893
|
-
404: apiErrorSchema,
|
|
894
|
-
409: apiErrorSchema
|
|
895
|
-
},
|
|
896
|
-
summary: "Set or unset the default agent for an org"
|
|
897
|
-
}
|
|
898
|
-
});
|
|
899
870
|
|
|
900
871
|
// ../../packages/api-contracts/src/contracts/zero-org.ts
|
|
901
|
-
var
|
|
902
|
-
var zeroOrgContract =
|
|
872
|
+
var c3 = initContract();
|
|
873
|
+
var zeroOrgContract = c3.router({
|
|
903
874
|
get: {
|
|
904
875
|
method: "GET",
|
|
905
876
|
path: "/api/zero/org",
|
|
@@ -929,7 +900,7 @@ var zeroOrgContract = c4.router({
|
|
|
929
900
|
summary: "Update org slug (zero proxy)"
|
|
930
901
|
}
|
|
931
902
|
});
|
|
932
|
-
var zeroOrgLeaveContract =
|
|
903
|
+
var zeroOrgLeaveContract = c3.router({
|
|
933
904
|
leave: {
|
|
934
905
|
method: "POST",
|
|
935
906
|
path: "/api/zero/org/leave",
|
|
@@ -945,7 +916,7 @@ var zeroOrgLeaveContract = c4.router({
|
|
|
945
916
|
summary: "Leave the current org (zero proxy)"
|
|
946
917
|
}
|
|
947
918
|
});
|
|
948
|
-
var zeroOrgDeleteContract =
|
|
919
|
+
var zeroOrgDeleteContract = c3.router({
|
|
949
920
|
delete: {
|
|
950
921
|
method: "POST",
|
|
951
922
|
path: "/api/zero/org/delete",
|
|
@@ -978,8 +949,8 @@ var orgListResponseSchema = external_exports.object({
|
|
|
978
949
|
});
|
|
979
950
|
|
|
980
951
|
// ../../packages/api-contracts/src/contracts/zero-org-list.ts
|
|
981
|
-
var
|
|
982
|
-
var zeroOrgListContract =
|
|
952
|
+
var c4 = initContract();
|
|
953
|
+
var zeroOrgListContract = c4.router({
|
|
983
954
|
list: {
|
|
984
955
|
method: "GET",
|
|
985
956
|
path: "/api/zero/org/list",
|
|
@@ -995,8 +966,8 @@ var zeroOrgListContract = c5.router({
|
|
|
995
966
|
|
|
996
967
|
// ../../packages/api-contracts/src/contracts/zero-org-members.ts
|
|
997
968
|
init_esm_shims();
|
|
998
|
-
var
|
|
999
|
-
var zeroOrgMembersContract =
|
|
969
|
+
var c5 = initContract();
|
|
970
|
+
var zeroOrgMembersContract = c5.router({
|
|
1000
971
|
members: {
|
|
1001
972
|
method: "GET",
|
|
1002
973
|
path: "/api/zero/org/members",
|
|
@@ -1042,7 +1013,7 @@ var zeroOrgMembersContract = c6.router({
|
|
|
1042
1013
|
summary: "Remove a member from the org (zero proxy)"
|
|
1043
1014
|
}
|
|
1044
1015
|
});
|
|
1045
|
-
var zeroOrgInviteContract =
|
|
1016
|
+
var zeroOrgInviteContract = c5.router({
|
|
1046
1017
|
invite: {
|
|
1047
1018
|
method: "POST",
|
|
1048
1019
|
path: "/api/zero/org/invite",
|
|
@@ -1072,7 +1043,7 @@ var zeroOrgInviteContract = c6.router({
|
|
|
1072
1043
|
summary: "Revoke a pending invitation (zero proxy)"
|
|
1073
1044
|
}
|
|
1074
1045
|
});
|
|
1075
|
-
var zeroOrgMembershipRequestsContract =
|
|
1046
|
+
var zeroOrgMembershipRequestsContract = c5.router({
|
|
1076
1047
|
accept: {
|
|
1077
1048
|
method: "POST",
|
|
1078
1049
|
path: "/api/zero/org/membership-requests",
|
|
@@ -1106,8 +1077,8 @@ var zeroOrgMembershipRequestsContract = c6.router({
|
|
|
1106
1077
|
// src/lib/api/domains/zero-orgs.ts
|
|
1107
1078
|
async function getZeroOrg() {
|
|
1108
1079
|
const config = await getClientConfig();
|
|
1109
|
-
const
|
|
1110
|
-
const result = await
|
|
1080
|
+
const client2 = initClient(zeroOrgContract, config);
|
|
1081
|
+
const result = await client2.get({ headers: {} });
|
|
1111
1082
|
if (result.status === 200) {
|
|
1112
1083
|
return result.body;
|
|
1113
1084
|
}
|
|
@@ -1115,8 +1086,8 @@ async function getZeroOrg() {
|
|
|
1115
1086
|
}
|
|
1116
1087
|
async function updateZeroOrg(body) {
|
|
1117
1088
|
const config = await getClientConfig();
|
|
1118
|
-
const
|
|
1119
|
-
const result = await
|
|
1089
|
+
const client2 = initClient(zeroOrgContract, config);
|
|
1090
|
+
const result = await client2.update({ body });
|
|
1120
1091
|
if (result.status === 200) {
|
|
1121
1092
|
return result.body;
|
|
1122
1093
|
}
|
|
@@ -1124,8 +1095,8 @@ async function updateZeroOrg(body) {
|
|
|
1124
1095
|
}
|
|
1125
1096
|
async function listZeroOrgs() {
|
|
1126
1097
|
const config = await getClientConfig();
|
|
1127
|
-
const
|
|
1128
|
-
const result = await
|
|
1098
|
+
const client2 = initClient(zeroOrgListContract, config);
|
|
1099
|
+
const result = await client2.list({ headers: {} });
|
|
1129
1100
|
if (result.status === 200) {
|
|
1130
1101
|
return result.body;
|
|
1131
1102
|
}
|
|
@@ -1133,8 +1104,8 @@ async function listZeroOrgs() {
|
|
|
1133
1104
|
}
|
|
1134
1105
|
async function getZeroOrgMembers() {
|
|
1135
1106
|
const config = await getClientConfig();
|
|
1136
|
-
const
|
|
1137
|
-
const result = await
|
|
1107
|
+
const client2 = initClient(zeroOrgMembersContract, config);
|
|
1108
|
+
const result = await client2.members({ headers: {} });
|
|
1138
1109
|
if (result.status === 200) {
|
|
1139
1110
|
return result.body;
|
|
1140
1111
|
}
|
|
@@ -1142,8 +1113,8 @@ async function getZeroOrgMembers() {
|
|
|
1142
1113
|
}
|
|
1143
1114
|
async function inviteZeroOrgMember(email, role = "member") {
|
|
1144
1115
|
const config = await getClientConfig();
|
|
1145
|
-
const
|
|
1146
|
-
const result = await
|
|
1116
|
+
const client2 = initClient(zeroOrgInviteContract, config);
|
|
1117
|
+
const result = await client2.invite({
|
|
1147
1118
|
body: { email, role }
|
|
1148
1119
|
});
|
|
1149
1120
|
if (result.status === 200) {
|
|
@@ -1153,8 +1124,8 @@ async function inviteZeroOrgMember(email, role = "member") {
|
|
|
1153
1124
|
}
|
|
1154
1125
|
async function removeZeroOrgMember(email) {
|
|
1155
1126
|
const config = await getClientConfig();
|
|
1156
|
-
const
|
|
1157
|
-
const result = await
|
|
1127
|
+
const client2 = initClient(zeroOrgMembersContract, config);
|
|
1128
|
+
const result = await client2.removeMember({
|
|
1158
1129
|
body: { email }
|
|
1159
1130
|
});
|
|
1160
1131
|
if (result.status === 200) {
|
|
@@ -1164,8 +1135,8 @@ async function removeZeroOrgMember(email) {
|
|
|
1164
1135
|
}
|
|
1165
1136
|
async function leaveZeroOrg() {
|
|
1166
1137
|
const config = await getClientConfig();
|
|
1167
|
-
const
|
|
1168
|
-
const result = await
|
|
1138
|
+
const client2 = initClient(zeroOrgLeaveContract, config);
|
|
1139
|
+
const result = await client2.leave({
|
|
1169
1140
|
body: {}
|
|
1170
1141
|
});
|
|
1171
1142
|
if (result.status === 200) {
|
|
@@ -1175,8 +1146,8 @@ async function leaveZeroOrg() {
|
|
|
1175
1146
|
}
|
|
1176
1147
|
async function deleteZeroOrg(slug) {
|
|
1177
1148
|
const config = await getClientConfig();
|
|
1178
|
-
const
|
|
1179
|
-
const result = await
|
|
1149
|
+
const client2 = initClient(zeroOrgDeleteContract, config);
|
|
1150
|
+
const result = await client2.delete({
|
|
1180
1151
|
body: { slug }
|
|
1181
1152
|
});
|
|
1182
1153
|
if (result.status === 200) {
|
|
@@ -1193,7 +1164,7 @@ init_esm_shims();
|
|
|
1193
1164
|
|
|
1194
1165
|
// ../../packages/api-contracts/src/contracts/zero-attribution.ts
|
|
1195
1166
|
init_esm_shims();
|
|
1196
|
-
var
|
|
1167
|
+
var c6 = initContract();
|
|
1197
1168
|
var SOURCE_TYPES = [
|
|
1198
1169
|
"paid",
|
|
1199
1170
|
"organic_search",
|
|
@@ -1229,7 +1200,7 @@ var recordSignupAttributionRequestSchema = external_exports.object({
|
|
|
1229
1200
|
var recordSignupAttributionResponseSchema = external_exports.object({
|
|
1230
1201
|
recorded: external_exports.boolean()
|
|
1231
1202
|
});
|
|
1232
|
-
var zeroAttributionContract =
|
|
1203
|
+
var zeroAttributionContract = c6.router({
|
|
1233
1204
|
recordSignup: {
|
|
1234
1205
|
method: "POST",
|
|
1235
1206
|
path: "/api/zero/attribution/signup",
|
|
@@ -1246,7 +1217,7 @@ var zeroAttributionContract = c7.router({
|
|
|
1246
1217
|
});
|
|
1247
1218
|
|
|
1248
1219
|
// ../../packages/api-contracts/src/contracts/zero-billing.ts
|
|
1249
|
-
var
|
|
1220
|
+
var c7 = initContract();
|
|
1250
1221
|
var autoRechargeSchema = external_exports.object({
|
|
1251
1222
|
enabled: external_exports.boolean(),
|
|
1252
1223
|
threshold: external_exports.number().nullable(),
|
|
@@ -1416,7 +1387,7 @@ var redeemRequestSchema = external_exports.object({
|
|
|
1416
1387
|
var redeemCodeRequestSchema = external_exports.object({
|
|
1417
1388
|
code: external_exports.string().trim().min(1)
|
|
1418
1389
|
});
|
|
1419
|
-
var zeroBillingStatusContract =
|
|
1390
|
+
var zeroBillingStatusContract = c7.router({
|
|
1420
1391
|
get: {
|
|
1421
1392
|
method: "GET",
|
|
1422
1393
|
path: "/api/zero/billing/status",
|
|
@@ -1430,7 +1401,7 @@ var zeroBillingStatusContract = c8.router({
|
|
|
1430
1401
|
summary: "Get billing status for current org"
|
|
1431
1402
|
}
|
|
1432
1403
|
});
|
|
1433
|
-
var zeroBillingCheckoutContract =
|
|
1404
|
+
var zeroBillingCheckoutContract = c7.router({
|
|
1434
1405
|
create: {
|
|
1435
1406
|
method: "POST",
|
|
1436
1407
|
path: "/api/zero/billing/checkout",
|
|
@@ -1462,7 +1433,7 @@ var zeroBillingCheckoutContract = c8.router({
|
|
|
1462
1433
|
summary: "Complete Stripe checkout session"
|
|
1463
1434
|
}
|
|
1464
1435
|
});
|
|
1465
|
-
var zeroBillingConcurrencyCheckoutContract =
|
|
1436
|
+
var zeroBillingConcurrencyCheckoutContract = c7.router({
|
|
1466
1437
|
create: {
|
|
1467
1438
|
method: "POST",
|
|
1468
1439
|
path: "/api/zero/billing/concurrency-checkout",
|
|
@@ -1479,7 +1450,7 @@ var zeroBillingConcurrencyCheckoutContract = c8.router({
|
|
|
1479
1450
|
summary: "Create Stripe checkout session for concurrency add-on"
|
|
1480
1451
|
}
|
|
1481
1452
|
});
|
|
1482
|
-
var zeroBillingConcurrencySubscriptionContract =
|
|
1453
|
+
var zeroBillingConcurrencySubscriptionContract = c7.router({
|
|
1483
1454
|
cancel: {
|
|
1484
1455
|
method: "POST",
|
|
1485
1456
|
path: "/api/zero/billing/concurrency-subscriptions/:subscriptionId/cancel",
|
|
@@ -1517,7 +1488,7 @@ var zeroBillingConcurrencySubscriptionContract = c8.router({
|
|
|
1517
1488
|
summary: "Restore a concurrency add-on subscription"
|
|
1518
1489
|
}
|
|
1519
1490
|
});
|
|
1520
|
-
var zeroBillingCreditCheckoutContract =
|
|
1491
|
+
var zeroBillingCreditCheckoutContract = c7.router({
|
|
1521
1492
|
create: {
|
|
1522
1493
|
method: "POST",
|
|
1523
1494
|
path: "/api/zero/billing/credit-checkout",
|
|
@@ -1534,7 +1505,7 @@ var zeroBillingCreditCheckoutContract = c8.router({
|
|
|
1534
1505
|
summary: "Create Stripe checkout session for credits"
|
|
1535
1506
|
}
|
|
1536
1507
|
});
|
|
1537
|
-
var zeroBillingPortalContract =
|
|
1508
|
+
var zeroBillingPortalContract = c7.router({
|
|
1538
1509
|
create: {
|
|
1539
1510
|
method: "POST",
|
|
1540
1511
|
path: "/api/zero/billing/portal",
|
|
@@ -1551,7 +1522,7 @@ var zeroBillingPortalContract = c8.router({
|
|
|
1551
1522
|
summary: "Create Stripe billing portal session"
|
|
1552
1523
|
}
|
|
1553
1524
|
});
|
|
1554
|
-
var zeroBillingAutoRechargeContract =
|
|
1525
|
+
var zeroBillingAutoRechargeContract = c7.router({
|
|
1555
1526
|
get: {
|
|
1556
1527
|
method: "GET",
|
|
1557
1528
|
path: "/api/zero/billing/auto-recharge",
|
|
@@ -1589,7 +1560,7 @@ var invoiceSchema = external_exports.object({
|
|
|
1589
1560
|
var billingInvoicesResponseSchema = external_exports.object({
|
|
1590
1561
|
invoices: external_exports.array(invoiceSchema)
|
|
1591
1562
|
});
|
|
1592
|
-
var zeroBillingInvoicesContract =
|
|
1563
|
+
var zeroBillingInvoicesContract = c7.router({
|
|
1593
1564
|
get: {
|
|
1594
1565
|
method: "GET",
|
|
1595
1566
|
path: "/api/zero/billing/invoices",
|
|
@@ -1629,7 +1600,7 @@ var restoreResponseSchema = external_exports.discriminatedUnion("status", [
|
|
|
1629
1600
|
checkoutUrl: external_exports.string().url()
|
|
1630
1601
|
})
|
|
1631
1602
|
]);
|
|
1632
|
-
var zeroBillingDowngradeContract =
|
|
1603
|
+
var zeroBillingDowngradeContract = c7.router({
|
|
1633
1604
|
create: {
|
|
1634
1605
|
method: "POST",
|
|
1635
1606
|
path: "/api/zero/billing/downgrade",
|
|
@@ -1647,7 +1618,7 @@ var zeroBillingDowngradeContract = c8.router({
|
|
|
1647
1618
|
summary: "Downgrade subscription to a lower tier"
|
|
1648
1619
|
}
|
|
1649
1620
|
});
|
|
1650
|
-
var zeroBillingRestoreContract =
|
|
1621
|
+
var zeroBillingRestoreContract = c7.router({
|
|
1651
1622
|
create: {
|
|
1652
1623
|
method: "POST",
|
|
1653
1624
|
path: "/api/zero/billing/restore",
|
|
@@ -1664,7 +1635,7 @@ var zeroBillingRestoreContract = c8.router({
|
|
|
1664
1635
|
summary: "Restore a subscription scheduled for cancellation"
|
|
1665
1636
|
}
|
|
1666
1637
|
});
|
|
1667
|
-
var zeroBillingRedeemContract =
|
|
1638
|
+
var zeroBillingRedeemContract = c7.router({
|
|
1668
1639
|
create: {
|
|
1669
1640
|
method: "POST",
|
|
1670
1641
|
path: "/api/zero/billing/redeem/:campaign",
|
|
@@ -1682,7 +1653,7 @@ var zeroBillingRedeemContract = c8.router({
|
|
|
1682
1653
|
summary: "Redeem a one-time campaign"
|
|
1683
1654
|
}
|
|
1684
1655
|
});
|
|
1685
|
-
var zeroBillingRedeemCodeContract =
|
|
1656
|
+
var zeroBillingRedeemCodeContract = c7.router({
|
|
1686
1657
|
create: {
|
|
1687
1658
|
method: "POST",
|
|
1688
1659
|
path: "/api/zero/billing/redeem-code",
|
|
@@ -1703,8 +1674,8 @@ var zeroBillingRedeemCodeContract = c8.router({
|
|
|
1703
1674
|
// src/lib/api/domains/zero-billing.ts
|
|
1704
1675
|
async function getZeroBillingStatus() {
|
|
1705
1676
|
const config = await getClientConfig();
|
|
1706
|
-
const
|
|
1707
|
-
const result = await
|
|
1677
|
+
const client2 = initClient(zeroBillingStatusContract, config);
|
|
1678
|
+
const result = await client2.get({ headers: {} });
|
|
1708
1679
|
if (result.status === 200) {
|
|
1709
1680
|
return result.body;
|
|
1710
1681
|
}
|
|
@@ -1712,8 +1683,8 @@ async function getZeroBillingStatus() {
|
|
|
1712
1683
|
}
|
|
1713
1684
|
async function createZeroCreditCheckout(body) {
|
|
1714
1685
|
const config = await getClientConfig();
|
|
1715
|
-
const
|
|
1716
|
-
const result = await
|
|
1686
|
+
const client2 = initClient(zeroBillingCreditCheckoutContract, config);
|
|
1687
|
+
const result = await client2.create({ body });
|
|
1717
1688
|
if (result.status === 200) {
|
|
1718
1689
|
return result.body;
|
|
1719
1690
|
}
|
|
@@ -1725,8 +1696,8 @@ init_esm_shims();
|
|
|
1725
1696
|
|
|
1726
1697
|
// ../../packages/api-contracts/src/contracts/zero-model-policies.ts
|
|
1727
1698
|
init_esm_shims();
|
|
1728
|
-
var
|
|
1729
|
-
var zeroModelPoliciesMainContract =
|
|
1699
|
+
var c8 = initContract();
|
|
1700
|
+
var zeroModelPoliciesMainContract = c8.router({
|
|
1730
1701
|
list: {
|
|
1731
1702
|
method: "GET",
|
|
1732
1703
|
path: "/api/zero/model-policies",
|
|
@@ -1761,8 +1732,8 @@ var zeroModelPoliciesMainContract = c9.router({
|
|
|
1761
1732
|
// src/lib/api/domains/zero-model-policies.ts
|
|
1762
1733
|
async function listZeroModelPolicies() {
|
|
1763
1734
|
const config = await getClientConfig();
|
|
1764
|
-
const
|
|
1765
|
-
const result = await
|
|
1735
|
+
const client2 = initClient(zeroModelPoliciesMainContract, config);
|
|
1736
|
+
const result = await client2.list({ headers: {} });
|
|
1766
1737
|
if (result.status === 200) {
|
|
1767
1738
|
return result.body;
|
|
1768
1739
|
}
|
|
@@ -1771,7 +1742,7 @@ async function listZeroModelPolicies() {
|
|
|
1771
1742
|
|
|
1772
1743
|
// ../../packages/api-contracts/src/contracts/zero-host.ts
|
|
1773
1744
|
init_esm_shims();
|
|
1774
|
-
var
|
|
1745
|
+
var c9 = initContract();
|
|
1775
1746
|
var ORG_SLUG_HASH_LENGTH = 8;
|
|
1776
1747
|
var RANDOM_SLUG_SUFFIX_LENGTH = 8;
|
|
1777
1748
|
var PUBLIC_SLUG_SEPARATOR_LENGTH = 2;
|
|
@@ -1920,7 +1891,7 @@ var hostedSiteDeploymentsResponseSchema = external_exports.object({
|
|
|
1920
1891
|
activeDeploymentVersion: external_exports.number().int().positive().nullable(),
|
|
1921
1892
|
deployments: external_exports.array(hostedSiteDeploymentSummarySchema)
|
|
1922
1893
|
});
|
|
1923
|
-
var zeroHostContract =
|
|
1894
|
+
var zeroHostContract = c9.router({
|
|
1924
1895
|
prepare: {
|
|
1925
1896
|
method: "POST",
|
|
1926
1897
|
path: "/api/zero/host/deployments/prepare",
|
|
@@ -2402,7 +2373,7 @@ var listQuerySchema = external_exports.object({
|
|
|
2402
2373
|
cursor: external_exports.string().optional(),
|
|
2403
2374
|
limit: external_exports.coerce.number().int().min(1).max(100).default(20)
|
|
2404
2375
|
});
|
|
2405
|
-
var
|
|
2376
|
+
var c10 = initContract();
|
|
2406
2377
|
var logStatusSchema = external_exports.enum([
|
|
2407
2378
|
"queued",
|
|
2408
2379
|
"pending",
|
|
@@ -2475,7 +2446,7 @@ var logDetailSchema = external_exports.object({
|
|
|
2475
2446
|
completedAt: external_exports.string().nullable(),
|
|
2476
2447
|
artifact: artifactSchema
|
|
2477
2448
|
});
|
|
2478
|
-
var logsListContract =
|
|
2449
|
+
var logsListContract = c10.router({
|
|
2479
2450
|
list: {
|
|
2480
2451
|
method: "GET",
|
|
2481
2452
|
path: "/api/zero/logs",
|
|
@@ -2497,7 +2468,7 @@ var logsListContract = c11.router({
|
|
|
2497
2468
|
summary: "List agent run logs with pagination"
|
|
2498
2469
|
}
|
|
2499
2470
|
});
|
|
2500
|
-
var logsByIdContract =
|
|
2471
|
+
var logsByIdContract = c10.router({
|
|
2501
2472
|
getById: {
|
|
2502
2473
|
method: "GET",
|
|
2503
2474
|
path: "/api/zero/logs/:id",
|
|
@@ -2516,7 +2487,7 @@ var logsByIdContract = c11.router({
|
|
|
2516
2487
|
});
|
|
2517
2488
|
|
|
2518
2489
|
// ../../packages/api-contracts/src/contracts/runs.ts
|
|
2519
|
-
var
|
|
2490
|
+
var c11 = initContract();
|
|
2520
2491
|
var directRunModelProviderTypeSchema = modelProviderTypeSchema.refine(
|
|
2521
2492
|
(type) => {
|
|
2522
2493
|
return type !== "vm0";
|
|
@@ -2680,7 +2651,7 @@ var runListItemSchema = external_exports.object({
|
|
|
2680
2651
|
var runsListResponseSchema = external_exports.object({
|
|
2681
2652
|
runs: external_exports.array(runListItemSchema)
|
|
2682
2653
|
});
|
|
2683
|
-
var runsMainContract =
|
|
2654
|
+
var runsMainContract = c11.router({
|
|
2684
2655
|
/**
|
|
2685
2656
|
* GET /api/agent/runs
|
|
2686
2657
|
* List agent runs (pending and running by default)
|
|
@@ -2731,7 +2702,7 @@ var runsMainContract = c12.router({
|
|
|
2731
2702
|
summary: "Create and execute agent run"
|
|
2732
2703
|
}
|
|
2733
2704
|
});
|
|
2734
|
-
var runsByIdContract =
|
|
2705
|
+
var runsByIdContract = c11.router({
|
|
2735
2706
|
/**
|
|
2736
2707
|
* GET /api/agent/runs/:id
|
|
2737
2708
|
* Get agent run status and results
|
|
@@ -2757,7 +2728,7 @@ var cancelRunResponseSchema = external_exports.object({
|
|
|
2757
2728
|
status: external_exports.literal("cancelled"),
|
|
2758
2729
|
message: external_exports.string()
|
|
2759
2730
|
});
|
|
2760
|
-
var runsCancelContract =
|
|
2731
|
+
var runsCancelContract = c11.router({
|
|
2761
2732
|
/**
|
|
2762
2733
|
* POST /api/agent/runs/:id/cancel
|
|
2763
2734
|
* Cancel a pending or running run
|
|
@@ -2780,7 +2751,7 @@ var runsCancelContract = c12.router({
|
|
|
2780
2751
|
summary: "Cancel a pending or running run"
|
|
2781
2752
|
}
|
|
2782
2753
|
});
|
|
2783
|
-
var runEventsContract =
|
|
2754
|
+
var runEventsContract = c11.router({
|
|
2784
2755
|
/**
|
|
2785
2756
|
* GET /api/agent/runs/:id/events
|
|
2786
2757
|
* Poll for agent run events with pagination
|
|
@@ -3066,7 +3037,7 @@ var networkLogsResponseSchema = external_exports.object({
|
|
|
3066
3037
|
hasMore: external_exports.boolean(),
|
|
3067
3038
|
nextCursor: external_exports.string().nullable().optional()
|
|
3068
3039
|
});
|
|
3069
|
-
var runSystemLogContract =
|
|
3040
|
+
var runSystemLogContract = c11.router({
|
|
3070
3041
|
/**
|
|
3071
3042
|
* GET /api/agent/runs/:id/telemetry/system-log
|
|
3072
3043
|
* Get system log with pagination
|
|
@@ -3088,7 +3059,7 @@ var runSystemLogContract = c12.router({
|
|
|
3088
3059
|
summary: "Get system log with pagination"
|
|
3089
3060
|
}
|
|
3090
3061
|
});
|
|
3091
|
-
var runMetricsContract =
|
|
3062
|
+
var runMetricsContract = c11.router({
|
|
3092
3063
|
/**
|
|
3093
3064
|
* GET /api/agent/runs/:id/telemetry/metrics
|
|
3094
3065
|
* Get metrics with pagination
|
|
@@ -3163,27 +3134,10 @@ var queueResponseSchema = external_exports.object({
|
|
|
3163
3134
|
runningTasks: external_exports.array(runningTaskSchema),
|
|
3164
3135
|
estimatedTimePerRun: external_exports.number().nullable()
|
|
3165
3136
|
});
|
|
3166
|
-
var runsQueueContract = c12.router({
|
|
3167
|
-
/**
|
|
3168
|
-
* GET /api/agent/runs/queue
|
|
3169
|
-
* Get org run queue status including concurrency context and queued entries
|
|
3170
|
-
*/
|
|
3171
|
-
getQueue: {
|
|
3172
|
-
method: "GET",
|
|
3173
|
-
path: "/api/agent/runs/queue",
|
|
3174
|
-
headers: authHeadersSchema,
|
|
3175
|
-
responses: {
|
|
3176
|
-
200: queueResponseSchema,
|
|
3177
|
-
401: apiErrorSchema,
|
|
3178
|
-
403: apiErrorSchema
|
|
3179
|
-
},
|
|
3180
|
-
summary: "Get org run queue status"
|
|
3181
|
-
}
|
|
3182
|
-
});
|
|
3183
3137
|
|
|
3184
3138
|
// ../../packages/api-contracts/src/contracts/zero-goals.ts
|
|
3185
3139
|
init_esm_shims();
|
|
3186
|
-
var
|
|
3140
|
+
var c12 = initContract();
|
|
3187
3141
|
var zeroGoalStatusSchema = external_exports.enum([
|
|
3188
3142
|
"active",
|
|
3189
3143
|
"paused",
|
|
@@ -3216,7 +3170,7 @@ var zeroGoalResponseSchema = external_exports.object({
|
|
|
3216
3170
|
var chatThreadGoalParamsSchema = external_exports.object({
|
|
3217
3171
|
threadId: external_exports.string().min(1)
|
|
3218
3172
|
});
|
|
3219
|
-
var zeroGoalsContract =
|
|
3173
|
+
var zeroGoalsContract = c12.router({
|
|
3220
3174
|
create: {
|
|
3221
3175
|
method: "POST",
|
|
3222
3176
|
path: "/api/zero/goal",
|
|
@@ -3277,7 +3231,7 @@ var zeroGoalsContract = c13.router({
|
|
|
3277
3231
|
method: "POST",
|
|
3278
3232
|
path: "/api/zero/goal/complete",
|
|
3279
3233
|
headers: authHeadersSchema,
|
|
3280
|
-
body:
|
|
3234
|
+
body: c12.noBody(),
|
|
3281
3235
|
responses: {
|
|
3282
3236
|
200: zeroGoalResponseSchema,
|
|
3283
3237
|
401: apiErrorSchema,
|
|
@@ -3291,7 +3245,7 @@ var zeroGoalsContract = c13.router({
|
|
|
3291
3245
|
method: "POST",
|
|
3292
3246
|
path: "/api/zero/goal/block",
|
|
3293
3247
|
headers: authHeadersSchema,
|
|
3294
|
-
body:
|
|
3248
|
+
body: c12.noBody(),
|
|
3295
3249
|
responses: {
|
|
3296
3250
|
200: zeroGoalResponseSchema,
|
|
3297
3251
|
401: apiErrorSchema,
|
|
@@ -3305,7 +3259,7 @@ var zeroGoalsContract = c13.router({
|
|
|
3305
3259
|
method: "POST",
|
|
3306
3260
|
path: "/api/zero/goal/pause",
|
|
3307
3261
|
headers: authHeadersSchema,
|
|
3308
|
-
body:
|
|
3262
|
+
body: c12.noBody(),
|
|
3309
3263
|
responses: {
|
|
3310
3264
|
200: zeroGoalResponseSchema,
|
|
3311
3265
|
401: apiErrorSchema,
|
|
@@ -3320,7 +3274,7 @@ var zeroGoalsContract = c13.router({
|
|
|
3320
3274
|
path: "/api/zero/chat-threads/:threadId/goal/pause",
|
|
3321
3275
|
headers: authHeadersSchema,
|
|
3322
3276
|
pathParams: chatThreadGoalParamsSchema,
|
|
3323
|
-
body:
|
|
3277
|
+
body: c12.noBody(),
|
|
3324
3278
|
responses: {
|
|
3325
3279
|
200: zeroGoalResponseSchema,
|
|
3326
3280
|
401: apiErrorSchema,
|
|
@@ -3334,7 +3288,7 @@ var zeroGoalsContract = c13.router({
|
|
|
3334
3288
|
method: "POST",
|
|
3335
3289
|
path: "/api/zero/goal/resume",
|
|
3336
3290
|
headers: authHeadersSchema,
|
|
3337
|
-
body:
|
|
3291
|
+
body: c12.noBody(),
|
|
3338
3292
|
responses: {
|
|
3339
3293
|
200: zeroGoalResponseSchema,
|
|
3340
3294
|
401: apiErrorSchema,
|
|
@@ -3348,7 +3302,7 @@ var zeroGoalsContract = c13.router({
|
|
|
3348
3302
|
method: "DELETE",
|
|
3349
3303
|
path: "/api/zero/goal",
|
|
3350
3304
|
headers: authHeadersSchema,
|
|
3351
|
-
body:
|
|
3305
|
+
body: c12.noBody(),
|
|
3352
3306
|
responses: {
|
|
3353
3307
|
200: external_exports.object({ cleared: external_exports.literal(true) }),
|
|
3354
3308
|
401: apiErrorSchema,
|
|
@@ -3360,7 +3314,7 @@ var zeroGoalsContract = c13.router({
|
|
|
3360
3314
|
});
|
|
3361
3315
|
|
|
3362
3316
|
// ../../packages/api-contracts/src/contracts/chat-threads.ts
|
|
3363
|
-
var
|
|
3317
|
+
var c13 = initContract();
|
|
3364
3318
|
var attachFileSchema = external_exports.object({
|
|
3365
3319
|
id: external_exports.string(),
|
|
3366
3320
|
filename: external_exports.string(),
|
|
@@ -3817,7 +3771,7 @@ var chatMessageNormalSendBodySchema = external_exports.preprocess(
|
|
|
3817
3771
|
interruptsRunId: external_exports.undefined().optional()
|
|
3818
3772
|
})
|
|
3819
3773
|
);
|
|
3820
|
-
var chatThreadsContract =
|
|
3774
|
+
var chatThreadsContract = c13.router({
|
|
3821
3775
|
snapshot: {
|
|
3822
3776
|
method: "GET",
|
|
3823
3777
|
path: "/api/zero/chat-threads/snapshot",
|
|
@@ -3932,7 +3886,7 @@ var chatThreadThreadIdPathParamsSchema = external_exports.object({
|
|
|
3932
3886
|
var chatThreadMessagePathParamsSchema = chatThreadThreadIdPathParamsSchema.extend({
|
|
3933
3887
|
messageId: external_exports.string().uuid()
|
|
3934
3888
|
});
|
|
3935
|
-
var chatThreadByIdContract =
|
|
3889
|
+
var chatThreadByIdContract = c13.router({
|
|
3936
3890
|
get: {
|
|
3937
3891
|
method: "GET",
|
|
3938
3892
|
path: "/api/zero/chat-threads/:id",
|
|
@@ -3957,7 +3911,7 @@ var chatThreadByIdContract = c14.router({
|
|
|
3957
3911
|
draftAttachments: external_exports.array(persistedAttachmentSchema).nullable().optional()
|
|
3958
3912
|
}),
|
|
3959
3913
|
responses: {
|
|
3960
|
-
204:
|
|
3914
|
+
204: c13.noBody(),
|
|
3961
3915
|
400: apiErrorSchema,
|
|
3962
3916
|
401: apiErrorSchema,
|
|
3963
3917
|
404: apiErrorSchema
|
|
@@ -3971,17 +3925,17 @@ var chatThreadByIdContract = c14.router({
|
|
|
3971
3925
|
pathParams: chatThreadIdPathParamsSchema,
|
|
3972
3926
|
query: external_exports.object({ eventId: chatThreadEventIdSchema.optional() }).optional(),
|
|
3973
3927
|
responses: {
|
|
3974
|
-
204:
|
|
3928
|
+
204: c13.noBody(),
|
|
3975
3929
|
400: apiErrorSchema,
|
|
3976
3930
|
401: apiErrorSchema,
|
|
3977
3931
|
402: apiErrorSchema,
|
|
3978
3932
|
404: apiErrorSchema
|
|
3979
3933
|
},
|
|
3980
3934
|
summary: "Delete a chat thread",
|
|
3981
|
-
body:
|
|
3935
|
+
body: c13.noBody()
|
|
3982
3936
|
}
|
|
3983
3937
|
});
|
|
3984
|
-
var chatThreadDraftContract =
|
|
3938
|
+
var chatThreadDraftContract = c13.router({
|
|
3985
3939
|
get: {
|
|
3986
3940
|
method: "GET",
|
|
3987
3941
|
path: "/api/zero/chat-threads/:id/draft",
|
|
@@ -3996,13 +3950,13 @@ var chatThreadDraftContract = c14.router({
|
|
|
3996
3950
|
summary: "Get chat thread draft content and attachments"
|
|
3997
3951
|
}
|
|
3998
3952
|
});
|
|
3999
|
-
var chatThreadMarkReadContract =
|
|
3953
|
+
var chatThreadMarkReadContract = c13.router({
|
|
4000
3954
|
markRead: {
|
|
4001
3955
|
method: "POST",
|
|
4002
3956
|
path: "/api/zero/chat-threads/:id/mark-read",
|
|
4003
3957
|
headers: authHeadersSchema,
|
|
4004
3958
|
pathParams: chatThreadIdPathParamsSchema,
|
|
4005
|
-
body:
|
|
3959
|
+
body: c13.noBody(),
|
|
4006
3960
|
responses: {
|
|
4007
3961
|
200: external_exports.object({
|
|
4008
3962
|
lastReadAt: external_exports.string().nullable(),
|
|
@@ -4020,7 +3974,7 @@ var chatThreadMarkReadContract = c14.router({
|
|
|
4020
3974
|
summary: "Mark a chat thread as read up to the latest run-finish marker"
|
|
4021
3975
|
}
|
|
4022
3976
|
});
|
|
4023
|
-
var chatThreadMarkAgentReadContract =
|
|
3977
|
+
var chatThreadMarkAgentReadContract = c13.router({
|
|
4024
3978
|
markAgentRead: {
|
|
4025
3979
|
method: "POST",
|
|
4026
3980
|
path: "/api/zero/chat-thread-unreads/mark-read",
|
|
@@ -4029,7 +3983,7 @@ var chatThreadMarkAgentReadContract = c14.router({
|
|
|
4029
3983
|
agentId: external_exports.string().min(1)
|
|
4030
3984
|
}),
|
|
4031
3985
|
responses: {
|
|
4032
|
-
204:
|
|
3986
|
+
204: c13.noBody(),
|
|
4033
3987
|
400: apiErrorSchema,
|
|
4034
3988
|
401: apiErrorSchema,
|
|
4035
3989
|
403: apiErrorSchema
|
|
@@ -4037,16 +3991,16 @@ var chatThreadMarkAgentReadContract = c14.router({
|
|
|
4037
3991
|
summary: "Mark all unread chat threads under an agent as read"
|
|
4038
3992
|
}
|
|
4039
3993
|
});
|
|
4040
|
-
var chatThreadPinContract =
|
|
3994
|
+
var chatThreadPinContract = c13.router({
|
|
4041
3995
|
pin: {
|
|
4042
3996
|
method: "POST",
|
|
4043
3997
|
path: "/api/zero/chat-threads/:id/pin",
|
|
4044
3998
|
headers: authHeadersSchema,
|
|
4045
3999
|
pathParams: chatThreadIdPathParamsSchema,
|
|
4046
4000
|
query: external_exports.object({ eventId: chatThreadEventIdSchema.optional() }).optional(),
|
|
4047
|
-
body:
|
|
4001
|
+
body: c13.noBody(),
|
|
4048
4002
|
responses: {
|
|
4049
|
-
204:
|
|
4003
|
+
204: c13.noBody(),
|
|
4050
4004
|
400: apiErrorSchema,
|
|
4051
4005
|
401: apiErrorSchema,
|
|
4052
4006
|
404: apiErrorSchema
|
|
@@ -4054,16 +4008,16 @@ var chatThreadPinContract = c14.router({
|
|
|
4054
4008
|
summary: "Pin a chat thread to the top of the sidebar"
|
|
4055
4009
|
}
|
|
4056
4010
|
});
|
|
4057
|
-
var chatThreadUnpinContract =
|
|
4011
|
+
var chatThreadUnpinContract = c13.router({
|
|
4058
4012
|
unpin: {
|
|
4059
4013
|
method: "POST",
|
|
4060
4014
|
path: "/api/zero/chat-threads/:id/unpin",
|
|
4061
4015
|
headers: authHeadersSchema,
|
|
4062
4016
|
pathParams: chatThreadIdPathParamsSchema,
|
|
4063
4017
|
query: external_exports.object({ eventId: chatThreadEventIdSchema.optional() }).optional(),
|
|
4064
|
-
body:
|
|
4018
|
+
body: c13.noBody(),
|
|
4065
4019
|
responses: {
|
|
4066
|
-
204:
|
|
4020
|
+
204: c13.noBody(),
|
|
4067
4021
|
400: apiErrorSchema,
|
|
4068
4022
|
401: apiErrorSchema,
|
|
4069
4023
|
404: apiErrorSchema
|
|
@@ -4071,7 +4025,7 @@ var chatThreadUnpinContract = c14.router({
|
|
|
4071
4025
|
summary: "Remove the pin from a chat thread"
|
|
4072
4026
|
}
|
|
4073
4027
|
});
|
|
4074
|
-
var chatThreadRenameContract =
|
|
4028
|
+
var chatThreadRenameContract = c13.router({
|
|
4075
4029
|
rename: {
|
|
4076
4030
|
method: "POST",
|
|
4077
4031
|
path: "/api/zero/chat-threads/:id/rename",
|
|
@@ -4082,7 +4036,7 @@ var chatThreadRenameContract = c14.router({
|
|
|
4082
4036
|
eventId: chatThreadEventIdSchema.optional()
|
|
4083
4037
|
}),
|
|
4084
4038
|
responses: {
|
|
4085
|
-
204:
|
|
4039
|
+
204: c13.noBody(),
|
|
4086
4040
|
400: apiErrorSchema,
|
|
4087
4041
|
401: apiErrorSchema,
|
|
4088
4042
|
403: apiErrorSchema,
|
|
@@ -4091,7 +4045,7 @@ var chatThreadRenameContract = c14.router({
|
|
|
4091
4045
|
summary: "Rename a chat thread (suppresses automated title generation)"
|
|
4092
4046
|
}
|
|
4093
4047
|
});
|
|
4094
|
-
var chatThreadMetadataContract =
|
|
4048
|
+
var chatThreadMetadataContract = c13.router({
|
|
4095
4049
|
get: {
|
|
4096
4050
|
method: "GET",
|
|
4097
4051
|
path: "/api/zero/chat-threads/:id/metadata",
|
|
@@ -4107,7 +4061,7 @@ var chatThreadMetadataContract = c14.router({
|
|
|
4107
4061
|
summary: "Get chat thread metadata"
|
|
4108
4062
|
}
|
|
4109
4063
|
});
|
|
4110
|
-
var chatThreadModelSelectionContract =
|
|
4064
|
+
var chatThreadModelSelectionContract = c13.router({
|
|
4111
4065
|
update: {
|
|
4112
4066
|
method: "POST",
|
|
4113
4067
|
path: "/api/zero/chat-threads/:id/model-selection",
|
|
@@ -4115,7 +4069,7 @@ var chatThreadModelSelectionContract = c14.router({
|
|
|
4115
4069
|
pathParams: chatThreadIdPathParamsSchema,
|
|
4116
4070
|
body: chatThreadModelSelectionUpdateBodySchema,
|
|
4117
4071
|
responses: {
|
|
4118
|
-
204:
|
|
4072
|
+
204: c13.noBody(),
|
|
4119
4073
|
400: apiErrorSchema,
|
|
4120
4074
|
401: apiErrorSchema,
|
|
4121
4075
|
402: apiErrorSchema,
|
|
@@ -4125,7 +4079,7 @@ var chatThreadModelSelectionContract = c14.router({
|
|
|
4125
4079
|
summary: "Update a chat thread model selection"
|
|
4126
4080
|
}
|
|
4127
4081
|
});
|
|
4128
|
-
var chatThreadComputerUseHostContract =
|
|
4082
|
+
var chatThreadComputerUseHostContract = c13.router({
|
|
4129
4083
|
update: {
|
|
4130
4084
|
method: "POST",
|
|
4131
4085
|
path: "/api/zero/chat-threads/:id/computer-use-host",
|
|
@@ -4136,7 +4090,7 @@ var chatThreadComputerUseHostContract = c14.router({
|
|
|
4136
4090
|
eventId: chatThreadEventIdSchema.optional()
|
|
4137
4091
|
}),
|
|
4138
4092
|
responses: {
|
|
4139
|
-
204:
|
|
4093
|
+
204: c13.noBody(),
|
|
4140
4094
|
400: apiErrorSchema,
|
|
4141
4095
|
401: apiErrorSchema,
|
|
4142
4096
|
403: apiErrorSchema,
|
|
@@ -4145,7 +4099,7 @@ var chatThreadComputerUseHostContract = c14.router({
|
|
|
4145
4099
|
summary: "Update a chat thread Computer Use host binding"
|
|
4146
4100
|
}
|
|
4147
4101
|
});
|
|
4148
|
-
var chatMessagesContract =
|
|
4102
|
+
var chatMessagesContract = c13.router({
|
|
4149
4103
|
send: {
|
|
4150
4104
|
method: "POST",
|
|
4151
4105
|
path: "/api/zero/chat/messages",
|
|
@@ -4230,7 +4184,7 @@ var chatSearchResponseSchema = external_exports.object({
|
|
|
4230
4184
|
results: external_exports.array(chatSearchResultSchema),
|
|
4231
4185
|
hasMore: external_exports.boolean()
|
|
4232
4186
|
});
|
|
4233
|
-
var chatSearchContract =
|
|
4187
|
+
var chatSearchContract = c13.router({
|
|
4234
4188
|
search: {
|
|
4235
4189
|
method: "GET",
|
|
4236
4190
|
path: "/api/zero/chat/search",
|
|
@@ -4252,7 +4206,7 @@ var chatSearchContract = c14.router({
|
|
|
4252
4206
|
summary: "Search chat messages within caller's org (zero proxy)"
|
|
4253
4207
|
}
|
|
4254
4208
|
});
|
|
4255
|
-
var chatThreadMessagesContract =
|
|
4209
|
+
var chatThreadMessagesContract = c13.router({
|
|
4256
4210
|
list: {
|
|
4257
4211
|
method: "GET",
|
|
4258
4212
|
path: "/api/zero/chat-threads/:threadId/messages",
|
|
@@ -4294,7 +4248,7 @@ var chatThreadMessagesContract = c14.router({
|
|
|
4294
4248
|
summary: "Get a chat message by id for a thread"
|
|
4295
4249
|
}
|
|
4296
4250
|
});
|
|
4297
|
-
var chatThreadArtifactsContract =
|
|
4251
|
+
var chatThreadArtifactsContract = c13.router({
|
|
4298
4252
|
list: {
|
|
4299
4253
|
method: "GET",
|
|
4300
4254
|
path: "/api/zero/chat-threads/:threadId/artifacts",
|
|
@@ -4348,7 +4302,7 @@ var chatThreadArtifactsContract = c14.router({
|
|
|
4348
4302
|
pathParams: chatThreadThreadIdPathParamsSchema,
|
|
4349
4303
|
query: htmlArtifactEditSnapshotQuerySchema,
|
|
4350
4304
|
responses: {
|
|
4351
|
-
204:
|
|
4305
|
+
204: c13.noBody(),
|
|
4352
4306
|
400: apiErrorSchema,
|
|
4353
4307
|
401: apiErrorSchema,
|
|
4354
4308
|
404: apiErrorSchema
|
|
@@ -4384,7 +4338,7 @@ var chatThreadArtifactsContract = c14.router({
|
|
|
4384
4338
|
headers: authHeadersSchema,
|
|
4385
4339
|
pathParams: chatThreadThreadIdPathParamsSchema,
|
|
4386
4340
|
contentType: "multipart/form-data",
|
|
4387
|
-
body:
|
|
4341
|
+
body: c13.type(),
|
|
4388
4342
|
responses: {
|
|
4389
4343
|
200: external_exports.object({
|
|
4390
4344
|
id: external_exports.string(),
|
|
@@ -4400,7 +4354,7 @@ var chatThreadArtifactsContract = c14.router({
|
|
|
4400
4354
|
summary: "Upload a presentation artifact to the user's Google Drive as a native Google Slides deck"
|
|
4401
4355
|
}
|
|
4402
4356
|
});
|
|
4403
|
-
var artifactsContract =
|
|
4357
|
+
var artifactsContract = c13.router({
|
|
4404
4358
|
list: {
|
|
4405
4359
|
method: "GET",
|
|
4406
4360
|
path: "/api/zero/artifacts",
|
|
@@ -4430,7 +4384,7 @@ var artifactsContract = c14.router({
|
|
|
4430
4384
|
headers: authHeadersSchema,
|
|
4431
4385
|
body: artifactFavoriteBodySchema,
|
|
4432
4386
|
responses: {
|
|
4433
|
-
204:
|
|
4387
|
+
204: c13.noBody(),
|
|
4434
4388
|
400: apiErrorSchema,
|
|
4435
4389
|
401: apiErrorSchema,
|
|
4436
4390
|
403: apiErrorSchema,
|
|
@@ -4444,7 +4398,7 @@ var artifactsContract = c14.router({
|
|
|
4444
4398
|
headers: authHeadersSchema,
|
|
4445
4399
|
body: artifactFavoriteBodySchema,
|
|
4446
4400
|
responses: {
|
|
4447
|
-
204:
|
|
4401
|
+
204: c13.noBody(),
|
|
4448
4402
|
400: apiErrorSchema,
|
|
4449
4403
|
401: apiErrorSchema,
|
|
4450
4404
|
403: apiErrorSchema,
|
|
@@ -4473,7 +4427,7 @@ var artifactsContract = c14.router({
|
|
|
4473
4427
|
body: imageArtifactEditSnapshotUpsertSchema,
|
|
4474
4428
|
responses: {
|
|
4475
4429
|
200: imageArtifactEditSnapshotSchema,
|
|
4476
|
-
204:
|
|
4430
|
+
204: c13.noBody(),
|
|
4477
4431
|
400: apiErrorSchema,
|
|
4478
4432
|
401: apiErrorSchema,
|
|
4479
4433
|
403: apiErrorSchema,
|
|
@@ -4487,7 +4441,7 @@ var artifactsContract = c14.router({
|
|
|
4487
4441
|
headers: authHeadersSchema,
|
|
4488
4442
|
query: imageArtifactEditSnapshotQuerySchema,
|
|
4489
4443
|
responses: {
|
|
4490
|
-
204:
|
|
4444
|
+
204: c13.noBody(),
|
|
4491
4445
|
400: apiErrorSchema,
|
|
4492
4446
|
401: apiErrorSchema,
|
|
4493
4447
|
403: apiErrorSchema,
|
|
@@ -4498,7 +4452,7 @@ var artifactsContract = c14.router({
|
|
|
4498
4452
|
});
|
|
4499
4453
|
|
|
4500
4454
|
// ../../packages/api-contracts/src/contracts/zero-agents.ts
|
|
4501
|
-
var
|
|
4455
|
+
var c14 = initContract();
|
|
4502
4456
|
var zeroAgentVisibilitySchema = external_exports.enum(["public", "private"]);
|
|
4503
4457
|
var zeroAgentResponseSchema = external_exports.object({
|
|
4504
4458
|
agentId: external_exports.string(),
|
|
@@ -4543,7 +4497,7 @@ var zeroAgentDraftRequestSchema = external_exports.object({
|
|
|
4543
4497
|
draftStructuredPrompt: userMessageDocumentSchema.nullable().optional(),
|
|
4544
4498
|
draftAttachments: external_exports.array(persistedAttachmentSchema).nullable().optional()
|
|
4545
4499
|
});
|
|
4546
|
-
var zeroAgentsMainContract =
|
|
4500
|
+
var zeroAgentsMainContract = c14.router({
|
|
4547
4501
|
create: {
|
|
4548
4502
|
method: "POST",
|
|
4549
4503
|
path: "/api/zero/agents",
|
|
@@ -4571,7 +4525,7 @@ var zeroAgentsMainContract = c15.router({
|
|
|
4571
4525
|
summary: "List zero agents"
|
|
4572
4526
|
}
|
|
4573
4527
|
});
|
|
4574
|
-
var zeroAgentsByIdContract =
|
|
4528
|
+
var zeroAgentsByIdContract = c14.router({
|
|
4575
4529
|
get: {
|
|
4576
4530
|
method: "GET",
|
|
4577
4531
|
path: "/api/zero/agents/:id",
|
|
@@ -4624,9 +4578,9 @@ var zeroAgentsByIdContract = c15.router({
|
|
|
4624
4578
|
path: "/api/zero/agents/:id",
|
|
4625
4579
|
headers: authHeadersSchema,
|
|
4626
4580
|
pathParams: external_exports.object({ id: external_exports.string().uuid() }),
|
|
4627
|
-
body:
|
|
4581
|
+
body: c14.noBody(),
|
|
4628
4582
|
responses: {
|
|
4629
|
-
204:
|
|
4583
|
+
204: c14.noBody(),
|
|
4630
4584
|
400: apiErrorSchema,
|
|
4631
4585
|
401: apiErrorSchema,
|
|
4632
4586
|
403: apiErrorSchema,
|
|
@@ -4636,7 +4590,7 @@ var zeroAgentsByIdContract = c15.router({
|
|
|
4636
4590
|
summary: "Delete zero agent by id"
|
|
4637
4591
|
}
|
|
4638
4592
|
});
|
|
4639
|
-
var zeroAgentInstructionsContract =
|
|
4593
|
+
var zeroAgentInstructionsContract = c14.router({
|
|
4640
4594
|
get: {
|
|
4641
4595
|
method: "GET",
|
|
4642
4596
|
path: "/api/zero/agents/:id/instructions",
|
|
@@ -4668,7 +4622,7 @@ var zeroAgentInstructionsContract = c15.router({
|
|
|
4668
4622
|
summary: "Update zero agent instructions"
|
|
4669
4623
|
}
|
|
4670
4624
|
});
|
|
4671
|
-
var zeroAgentDraftContract =
|
|
4625
|
+
var zeroAgentDraftContract = c14.router({
|
|
4672
4626
|
get: {
|
|
4673
4627
|
method: "GET",
|
|
4674
4628
|
path: "/api/zero/agents/:id/draft",
|
|
@@ -4690,7 +4644,7 @@ var zeroAgentDraftContract = c15.router({
|
|
|
4690
4644
|
pathParams: external_exports.object({ id: external_exports.string().uuid() }),
|
|
4691
4645
|
body: zeroAgentDraftRequestSchema,
|
|
4692
4646
|
responses: {
|
|
4693
|
-
204:
|
|
4647
|
+
204: c14.noBody(),
|
|
4694
4648
|
400: apiErrorSchema,
|
|
4695
4649
|
401: apiErrorSchema,
|
|
4696
4650
|
403: apiErrorSchema,
|
|
@@ -4712,7 +4666,7 @@ var connectorRefSchema = external_exports.string().min(1).max(CONNECTOR_REF_MAX_
|
|
|
4712
4666
|
var connectorAuthMethodIdSchema = external_exports.string().min(1).max(CONNECTOR_AUTH_METHOD_ID_MAX_LENGTH).regex(connectorIdentityPattern);
|
|
4713
4667
|
|
|
4714
4668
|
// ../../packages/api-contracts/src/contracts/zero-user-permission-grants.ts
|
|
4715
|
-
var
|
|
4669
|
+
var c15 = initContract();
|
|
4716
4670
|
var agentIdSchema = external_exports.string().uuid();
|
|
4717
4671
|
var permissionSchema = external_exports.string().min(1).max(128);
|
|
4718
4672
|
var userPermissionGrantActionSchema = external_exports.enum(["allow", "deny"]);
|
|
@@ -4759,7 +4713,7 @@ var applyUserPermissionGrantsRequestSchema = userPermissionGrantScopeSchema.and(
|
|
|
4759
4713
|
grants: external_exports.array(applyUserPermissionGrantSchema)
|
|
4760
4714
|
})
|
|
4761
4715
|
);
|
|
4762
|
-
var zeroUserPermissionGrantsContract =
|
|
4716
|
+
var zeroUserPermissionGrantsContract = c15.router({
|
|
4763
4717
|
list: {
|
|
4764
4718
|
method: "GET",
|
|
4765
4719
|
path: "/api/zero/user-permission-grants",
|
|
@@ -4793,7 +4747,7 @@ var zeroUserPermissionGrantsContract = c16.router({
|
|
|
4793
4747
|
|
|
4794
4748
|
// ../../packages/api-contracts/src/contracts/user-connectors.ts
|
|
4795
4749
|
init_esm_shims();
|
|
4796
|
-
var
|
|
4750
|
+
var c16 = initContract();
|
|
4797
4751
|
var userConnectorEnabledTypesSchema = external_exports.object({
|
|
4798
4752
|
enabledTypes: external_exports.array(connectorRefSchema)
|
|
4799
4753
|
});
|
|
@@ -4802,7 +4756,7 @@ var userConnectorUpdateSchema = userConnectorEnabledTypesSchema.extend(
|
|
|
4802
4756
|
operation: external_exports.enum(["replace", "add", "remove"]).optional()
|
|
4803
4757
|
}
|
|
4804
4758
|
);
|
|
4805
|
-
var zeroUserConnectorsContract =
|
|
4759
|
+
var zeroUserConnectorsContract = c16.router({
|
|
4806
4760
|
get: {
|
|
4807
4761
|
method: "GET",
|
|
4808
4762
|
path: "/api/zero/agents/:id/user-connectors",
|
|
@@ -4835,14 +4789,14 @@ var zeroUserConnectorsContract = c17.router({
|
|
|
4835
4789
|
|
|
4836
4790
|
// ../../packages/api-contracts/src/contracts/zero-agent-custom-connectors.ts
|
|
4837
4791
|
init_esm_shims();
|
|
4838
|
-
var
|
|
4792
|
+
var c17 = initContract();
|
|
4839
4793
|
var agentCustomConnectorEnabledIdsSchema = external_exports.object({
|
|
4840
4794
|
enabledIds: external_exports.array(external_exports.string().uuid())
|
|
4841
4795
|
});
|
|
4842
4796
|
var agentCustomConnectorUpdateSchema = agentCustomConnectorEnabledIdsSchema.extend({
|
|
4843
4797
|
operation: external_exports.enum(["replace", "add", "remove"]).optional()
|
|
4844
4798
|
});
|
|
4845
|
-
var zeroAgentCustomConnectorsContract =
|
|
4799
|
+
var zeroAgentCustomConnectorsContract = c17.router({
|
|
4846
4800
|
get: {
|
|
4847
4801
|
method: "GET",
|
|
4848
4802
|
path: "/api/zero/agents/:id/custom-connectors",
|
|
@@ -4876,50 +4830,50 @@ var zeroAgentCustomConnectorsContract = c18.router({
|
|
|
4876
4830
|
// src/lib/api/domains/zero-agents.ts
|
|
4877
4831
|
async function createZeroAgent(body) {
|
|
4878
4832
|
const config = await getClientConfig();
|
|
4879
|
-
const
|
|
4880
|
-
const result = await
|
|
4833
|
+
const client2 = initClient(zeroAgentsMainContract, config);
|
|
4834
|
+
const result = await client2.create({ body });
|
|
4881
4835
|
if (result.status === 201) return result.body;
|
|
4882
4836
|
handleError(result, "Failed to create zero agent");
|
|
4883
4837
|
}
|
|
4884
4838
|
async function listZeroAgents() {
|
|
4885
4839
|
const config = await getClientConfig();
|
|
4886
|
-
const
|
|
4887
|
-
const result = await
|
|
4840
|
+
const client2 = initClient(zeroAgentsMainContract, config);
|
|
4841
|
+
const result = await client2.list({ headers: {} });
|
|
4888
4842
|
if (result.status === 200) return result.body;
|
|
4889
4843
|
handleError(result, "Failed to list zero agents");
|
|
4890
4844
|
}
|
|
4891
4845
|
async function getZeroAgent(id) {
|
|
4892
4846
|
const config = await getClientConfig();
|
|
4893
|
-
const
|
|
4894
|
-
const result = await
|
|
4847
|
+
const client2 = initClient(zeroAgentsByIdContract, config);
|
|
4848
|
+
const result = await client2.get({ params: { id } });
|
|
4895
4849
|
if (result.status === 200) return result.body;
|
|
4896
4850
|
handleError(result, `Zero agent "${id}" not found`);
|
|
4897
4851
|
}
|
|
4898
4852
|
async function updateZeroAgent(id, body) {
|
|
4899
4853
|
const config = await getClientConfig();
|
|
4900
|
-
const
|
|
4901
|
-
const result = await
|
|
4854
|
+
const client2 = initClient(zeroAgentsByIdContract, config);
|
|
4855
|
+
const result = await client2.update({ params: { id }, body });
|
|
4902
4856
|
if (result.status === 200) return result.body;
|
|
4903
4857
|
handleError(result, `Failed to update zero agent "${id}"`);
|
|
4904
4858
|
}
|
|
4905
4859
|
async function deleteZeroAgent(id) {
|
|
4906
4860
|
const config = await getClientConfig();
|
|
4907
|
-
const
|
|
4908
|
-
const result = await
|
|
4861
|
+
const client2 = initClient(zeroAgentsByIdContract, config);
|
|
4862
|
+
const result = await client2.delete({ params: { id } });
|
|
4909
4863
|
if (result.status === 204) return;
|
|
4910
4864
|
handleError(result, `Zero agent "${id}" not found`);
|
|
4911
4865
|
}
|
|
4912
4866
|
async function getZeroAgentInstructions(id) {
|
|
4913
4867
|
const config = await getClientConfig();
|
|
4914
|
-
const
|
|
4915
|
-
const result = await
|
|
4868
|
+
const client2 = initClient(zeroAgentInstructionsContract, config);
|
|
4869
|
+
const result = await client2.get({ params: { id } });
|
|
4916
4870
|
if (result.status === 200) return result.body;
|
|
4917
4871
|
handleError(result, `Failed to get instructions for zero agent "${id}"`);
|
|
4918
4872
|
}
|
|
4919
4873
|
async function getZeroAgentUserConnectors(id) {
|
|
4920
4874
|
const config = await getClientConfig();
|
|
4921
|
-
const
|
|
4922
|
-
const result = await
|
|
4875
|
+
const client2 = initClient(zeroUserConnectorsContract, config);
|
|
4876
|
+
const result = await client2.get({ params: { id } });
|
|
4923
4877
|
if (result.status === 200) return result.body.enabledTypes;
|
|
4924
4878
|
handleError(
|
|
4925
4879
|
result,
|
|
@@ -4928,8 +4882,8 @@ async function getZeroAgentUserConnectors(id) {
|
|
|
4928
4882
|
}
|
|
4929
4883
|
async function getZeroAgentCustomConnectors(id) {
|
|
4930
4884
|
const config = await getClientConfig();
|
|
4931
|
-
const
|
|
4932
|
-
const result = await
|
|
4885
|
+
const client2 = initClient(zeroAgentCustomConnectorsContract, config);
|
|
4886
|
+
const result = await client2.get({ params: { id } });
|
|
4933
4887
|
if (result.status === 200) return result.body.enabledIds;
|
|
4934
4888
|
handleError(
|
|
4935
4889
|
result,
|
|
@@ -4938,8 +4892,8 @@ async function getZeroAgentCustomConnectors(id) {
|
|
|
4938
4892
|
}
|
|
4939
4893
|
async function listZeroUserPermissionGrants(agentId) {
|
|
4940
4894
|
const config = await getClientConfig();
|
|
4941
|
-
const
|
|
4942
|
-
const result = await
|
|
4895
|
+
const client2 = initClient(zeroUserPermissionGrantsContract, config);
|
|
4896
|
+
const result = await client2.list({ query: { agentId } });
|
|
4943
4897
|
if (result.status === 200) return result.body;
|
|
4944
4898
|
handleError(
|
|
4945
4899
|
result,
|
|
@@ -4948,8 +4902,8 @@ async function listZeroUserPermissionGrants(agentId) {
|
|
|
4948
4902
|
}
|
|
4949
4903
|
async function updateZeroAgentInstructions(id, content) {
|
|
4950
4904
|
const config = await getClientConfig();
|
|
4951
|
-
const
|
|
4952
|
-
const result = await
|
|
4905
|
+
const client2 = initClient(zeroAgentInstructionsContract, config);
|
|
4906
|
+
const result = await client2.update({
|
|
4953
4907
|
params: { id },
|
|
4954
4908
|
body: { content }
|
|
4955
4909
|
});
|
|
@@ -4961,57 +4915,57 @@ async function updateZeroAgentInstructions(id, content) {
|
|
|
4961
4915
|
init_esm_shims();
|
|
4962
4916
|
async function createGoal(body) {
|
|
4963
4917
|
const config = await getClientConfig();
|
|
4964
|
-
const
|
|
4965
|
-
const result = await
|
|
4918
|
+
const client2 = initClient(zeroGoalsContract, config);
|
|
4919
|
+
const result = await client2.create({ body });
|
|
4966
4920
|
if (result.status === 201) return result.body;
|
|
4967
4921
|
handleError(result, "Failed to create goal");
|
|
4968
4922
|
}
|
|
4969
4923
|
async function editGoal(body) {
|
|
4970
4924
|
const config = await getClientConfig();
|
|
4971
|
-
const
|
|
4972
|
-
const result = await
|
|
4925
|
+
const client2 = initClient(zeroGoalsContract, config);
|
|
4926
|
+
const result = await client2.edit({ body });
|
|
4973
4927
|
if (result.status === 200) return result.body;
|
|
4974
4928
|
handleError(result, "Failed to edit goal");
|
|
4975
4929
|
}
|
|
4976
4930
|
async function getGoal() {
|
|
4977
4931
|
const config = await getClientConfig();
|
|
4978
|
-
const
|
|
4979
|
-
const result = await
|
|
4932
|
+
const client2 = initClient(zeroGoalsContract, config);
|
|
4933
|
+
const result = await client2.get({ headers: {} });
|
|
4980
4934
|
if (result.status === 200) return result.body;
|
|
4981
4935
|
handleError(result, "Goal not found");
|
|
4982
4936
|
}
|
|
4983
4937
|
async function completeGoal() {
|
|
4984
4938
|
const config = await getClientConfig();
|
|
4985
|
-
const
|
|
4986
|
-
const result = await
|
|
4939
|
+
const client2 = initClient(zeroGoalsContract, config);
|
|
4940
|
+
const result = await client2.complete({});
|
|
4987
4941
|
if (result.status === 200) return result.body;
|
|
4988
4942
|
handleError(result, "Failed to complete goal");
|
|
4989
4943
|
}
|
|
4990
4944
|
async function blockGoal() {
|
|
4991
4945
|
const config = await getClientConfig();
|
|
4992
|
-
const
|
|
4993
|
-
const result = await
|
|
4946
|
+
const client2 = initClient(zeroGoalsContract, config);
|
|
4947
|
+
const result = await client2.block({});
|
|
4994
4948
|
if (result.status === 200) return result.body;
|
|
4995
4949
|
handleError(result, "Failed to block goal");
|
|
4996
4950
|
}
|
|
4997
4951
|
async function pauseGoal() {
|
|
4998
4952
|
const config = await getClientConfig();
|
|
4999
|
-
const
|
|
5000
|
-
const result = await
|
|
4953
|
+
const client2 = initClient(zeroGoalsContract, config);
|
|
4954
|
+
const result = await client2.pause({});
|
|
5001
4955
|
if (result.status === 200) return result.body;
|
|
5002
4956
|
handleError(result, "Failed to pause goal");
|
|
5003
4957
|
}
|
|
5004
4958
|
async function resumeGoal() {
|
|
5005
4959
|
const config = await getClientConfig();
|
|
5006
|
-
const
|
|
5007
|
-
const result = await
|
|
4960
|
+
const client2 = initClient(zeroGoalsContract, config);
|
|
4961
|
+
const result = await client2.resume({});
|
|
5008
4962
|
if (result.status === 200) return result.body;
|
|
5009
4963
|
handleError(result, "Failed to resume goal");
|
|
5010
4964
|
}
|
|
5011
4965
|
async function clearGoal() {
|
|
5012
4966
|
const config = await getClientConfig();
|
|
5013
|
-
const
|
|
5014
|
-
const result = await
|
|
4967
|
+
const client2 = initClient(zeroGoalsContract, config);
|
|
4968
|
+
const result = await client2.clear({});
|
|
5015
4969
|
if (result.status === 200) return result.body;
|
|
5016
4970
|
handleError(result, "Failed to clear goal");
|
|
5017
4971
|
}
|
|
@@ -5143,8 +5097,8 @@ var connectorExternalCodeSessionCompleteResponseSchema = external_exports.object
|
|
|
5143
5097
|
});
|
|
5144
5098
|
|
|
5145
5099
|
// ../../packages/api-contracts/src/contracts/zero-connectors.ts
|
|
5146
|
-
var
|
|
5147
|
-
var zeroConnectorsMainContract =
|
|
5100
|
+
var c18 = initContract();
|
|
5101
|
+
var zeroConnectorsMainContract = c18.router({
|
|
5148
5102
|
list: {
|
|
5149
5103
|
method: "GET",
|
|
5150
5104
|
path: "/api/zero/connectors",
|
|
@@ -5158,7 +5112,7 @@ var zeroConnectorsMainContract = c19.router({
|
|
|
5158
5112
|
summary: "List all connectors (zero proxy)"
|
|
5159
5113
|
}
|
|
5160
5114
|
});
|
|
5161
|
-
var zeroConnectorsByTypeContract =
|
|
5115
|
+
var zeroConnectorsByTypeContract = c18.router({
|
|
5162
5116
|
get: {
|
|
5163
5117
|
method: "GET",
|
|
5164
5118
|
path: "/api/zero/connectors/:type",
|
|
@@ -5178,14 +5132,14 @@ var zeroConnectorsByTypeContract = c19.router({
|
|
|
5178
5132
|
headers: authHeadersSchema,
|
|
5179
5133
|
pathParams: external_exports.object({ type: connectorRefSchema }),
|
|
5180
5134
|
responses: {
|
|
5181
|
-
204:
|
|
5135
|
+
204: c18.noBody(),
|
|
5182
5136
|
401: apiErrorSchema,
|
|
5183
5137
|
404: apiErrorSchema
|
|
5184
5138
|
},
|
|
5185
5139
|
summary: "Disconnect a connector (zero proxy)"
|
|
5186
5140
|
}
|
|
5187
5141
|
});
|
|
5188
|
-
var zeroConnectorScopeDiffContract =
|
|
5142
|
+
var zeroConnectorScopeDiffContract = c18.router({
|
|
5189
5143
|
getScopeDiff: {
|
|
5190
5144
|
method: "GET",
|
|
5191
5145
|
path: "/api/zero/connectors/:type/scope-diff",
|
|
@@ -5200,7 +5154,7 @@ var zeroConnectorScopeDiffContract = c19.router({
|
|
|
5200
5154
|
summary: "Get scope diff for a connector"
|
|
5201
5155
|
}
|
|
5202
5156
|
});
|
|
5203
|
-
var zeroConnectorOauthStartContract =
|
|
5157
|
+
var zeroConnectorOauthStartContract = c18.router({
|
|
5204
5158
|
start: {
|
|
5205
5159
|
method: "POST",
|
|
5206
5160
|
path: "/api/zero/connectors/:type/oauth/start",
|
|
@@ -5222,21 +5176,21 @@ var zeroConnectorOauthStartContract = c19.router({
|
|
|
5222
5176
|
summary: "Create connector OAuth authorization URL"
|
|
5223
5177
|
}
|
|
5224
5178
|
});
|
|
5225
|
-
var zeroConnectorOauthContinueContract =
|
|
5179
|
+
var zeroConnectorOauthContinueContract = c18.router({
|
|
5226
5180
|
continue: {
|
|
5227
5181
|
method: "GET",
|
|
5228
5182
|
path: "/api/zero/connectors/:type/oauth/continue",
|
|
5229
5183
|
pathParams: external_exports.object({ type: connectorRefSchema }),
|
|
5230
5184
|
query: external_exports.object({ state: external_exports.string().regex(/^[0-9a-f]{64}$/) }),
|
|
5231
5185
|
responses: {
|
|
5232
|
-
307:
|
|
5186
|
+
307: c18.noBody(),
|
|
5233
5187
|
400: apiErrorSchema,
|
|
5234
5188
|
404: apiErrorSchema
|
|
5235
5189
|
},
|
|
5236
5190
|
summary: "Continue connector OAuth in the browser"
|
|
5237
5191
|
}
|
|
5238
5192
|
});
|
|
5239
|
-
var zeroConnectorOpenIdStartContract =
|
|
5193
|
+
var zeroConnectorOpenIdStartContract = c18.router({
|
|
5240
5194
|
start: {
|
|
5241
5195
|
method: "POST",
|
|
5242
5196
|
path: "/api/zero/connectors/:type/openid/start",
|
|
@@ -5257,7 +5211,7 @@ var zeroConnectorOpenIdStartContract = c19.router({
|
|
|
5257
5211
|
summary: "Create connector OpenID handoff and authorization URL"
|
|
5258
5212
|
}
|
|
5259
5213
|
});
|
|
5260
|
-
var zeroConnectorManualGrantContract =
|
|
5214
|
+
var zeroConnectorManualGrantContract = c18.router({
|
|
5261
5215
|
connect: {
|
|
5262
5216
|
method: "POST",
|
|
5263
5217
|
path: "/api/zero/connectors/:type/manual-grant",
|
|
@@ -5280,7 +5234,7 @@ var zeroConnectorManualGrantContract = c19.router({
|
|
|
5280
5234
|
summary: "Connect a connector with a manual grant"
|
|
5281
5235
|
}
|
|
5282
5236
|
});
|
|
5283
|
-
var zeroConnectorNoAuthGrantContract =
|
|
5237
|
+
var zeroConnectorNoAuthGrantContract = c18.router({
|
|
5284
5238
|
connect: {
|
|
5285
5239
|
method: "POST",
|
|
5286
5240
|
path: "/api/zero/connectors/:type/no-auth",
|
|
@@ -5302,7 +5256,7 @@ var zeroConnectorNoAuthGrantContract = c19.router({
|
|
|
5302
5256
|
summary: "Enable a connector with a no-auth grant"
|
|
5303
5257
|
}
|
|
5304
5258
|
});
|
|
5305
|
-
var zeroConnectorOauthDeviceAuthSessionContract =
|
|
5259
|
+
var zeroConnectorOauthDeviceAuthSessionContract = c18.router({
|
|
5306
5260
|
create: {
|
|
5307
5261
|
method: "POST",
|
|
5308
5262
|
path: "/api/zero/connectors/:type/oauth/device/sessions",
|
|
@@ -5343,7 +5297,7 @@ var zeroConnectorOauthDeviceAuthSessionContract = c19.router({
|
|
|
5343
5297
|
summary: "Poll connector OAuth device authorization session"
|
|
5344
5298
|
}
|
|
5345
5299
|
});
|
|
5346
|
-
var zeroConnectorExternalCodeSessionContract =
|
|
5300
|
+
var zeroConnectorExternalCodeSessionContract = c18.router({
|
|
5347
5301
|
create: {
|
|
5348
5302
|
method: "POST",
|
|
5349
5303
|
path: "/api/zero/connectors/:type/external-code/sessions",
|
|
@@ -5392,7 +5346,7 @@ var connectorSearchItemSchema = external_exports.object({
|
|
|
5392
5346
|
var connectorSearchResponseSchema = external_exports.object({
|
|
5393
5347
|
connectors: external_exports.array(connectorSearchItemSchema)
|
|
5394
5348
|
});
|
|
5395
|
-
var zeroConnectorsSearchContract =
|
|
5349
|
+
var zeroConnectorsSearchContract = c18.router({
|
|
5396
5350
|
search: {
|
|
5397
5351
|
method: "GET",
|
|
5398
5352
|
path: "/api/zero/connectors/search",
|
|
@@ -5471,7 +5425,7 @@ var connectorCatalogDiagnosticsSchema = external_exports.object({
|
|
|
5471
5425
|
});
|
|
5472
5426
|
|
|
5473
5427
|
// ../../packages/api-contracts/src/contracts/zero-connector-catalog.ts
|
|
5474
|
-
var
|
|
5428
|
+
var c19 = initContract();
|
|
5475
5429
|
var publicConnectorCatalogAuthMethodSummarySchema = external_exports.object({
|
|
5476
5430
|
id: connectorAuthMethodIdSchema,
|
|
5477
5431
|
label: external_exports.string(),
|
|
@@ -5611,7 +5565,7 @@ var publicConnectorCatalogPermissionDetailResponseSchema = external_exports.obje
|
|
|
5611
5565
|
var connectorCatalogPathParamsSchema = external_exports.object({
|
|
5612
5566
|
connectorRef: connectorRefSchema
|
|
5613
5567
|
});
|
|
5614
|
-
var zeroConnectorCatalogContract =
|
|
5568
|
+
var zeroConnectorCatalogContract = c19.router({
|
|
5615
5569
|
list: {
|
|
5616
5570
|
method: "GET",
|
|
5617
5571
|
path: "/api/zero/connector-catalog",
|
|
@@ -5682,7 +5636,7 @@ var zeroConnectorCatalogContract = c20.router({
|
|
|
5682
5636
|
|
|
5683
5637
|
// ../../packages/api-contracts/src/contracts/zero-connector-check.ts
|
|
5684
5638
|
init_esm_shims();
|
|
5685
|
-
var
|
|
5639
|
+
var c20 = initContract();
|
|
5686
5640
|
var boundedNameSchema = external_exports.string().min(1).max(255);
|
|
5687
5641
|
var connectorCheckUrlRequestSchema = external_exports.object({
|
|
5688
5642
|
mode: external_exports.literal("url"),
|
|
@@ -5828,7 +5782,7 @@ var connectorCheckDiagnosticResultSchema = external_exports.union([
|
|
|
5828
5782
|
connectorCheckUnresolvedDynamicBaseSchema,
|
|
5829
5783
|
connectorCheckRunContextUnavailableSchema
|
|
5830
5784
|
]);
|
|
5831
|
-
var zeroConnectorCheckContract =
|
|
5785
|
+
var zeroConnectorCheckContract = c20.router({
|
|
5832
5786
|
check: {
|
|
5833
5787
|
method: "POST",
|
|
5834
5788
|
path: "/api/zero/connectors/diagnostics/check",
|
|
@@ -5848,7 +5802,7 @@ var zeroConnectorCheckContract = c21.router({
|
|
|
5848
5802
|
|
|
5849
5803
|
// ../../packages/api-contracts/src/contracts/zero-custom-connectors.ts
|
|
5850
5804
|
init_esm_shims();
|
|
5851
|
-
var
|
|
5805
|
+
var c21 = initContract();
|
|
5852
5806
|
var customConnectorFieldKindSchema = external_exports.enum(["secret", "variable"]);
|
|
5853
5807
|
var customConnectorFieldSchema = external_exports.object({
|
|
5854
5808
|
key: external_exports.string().min(1).max(64),
|
|
@@ -5934,7 +5888,7 @@ var saveCustomConnectorProposalResponseSchema = external_exports.object({
|
|
|
5934
5888
|
connector: customConnectorResponseSchema,
|
|
5935
5889
|
authorizedAgentId: external_exports.string().uuid().optional()
|
|
5936
5890
|
});
|
|
5937
|
-
var zeroCustomConnectorsContract =
|
|
5891
|
+
var zeroCustomConnectorsContract = c21.router({
|
|
5938
5892
|
list: {
|
|
5939
5893
|
method: "GET",
|
|
5940
5894
|
path: "/api/zero/custom-connectors",
|
|
@@ -5961,7 +5915,7 @@ var zeroCustomConnectorsContract = c22.router({
|
|
|
5961
5915
|
summary: "Create an org custom connector"
|
|
5962
5916
|
}
|
|
5963
5917
|
});
|
|
5964
|
-
var zeroCustomConnectorByIdContract =
|
|
5918
|
+
var zeroCustomConnectorByIdContract = c21.router({
|
|
5965
5919
|
get: {
|
|
5966
5920
|
method: "GET",
|
|
5967
5921
|
path: "/api/zero/custom-connectors/:id",
|
|
@@ -5982,7 +5936,7 @@ var zeroCustomConnectorByIdContract = c22.router({
|
|
|
5982
5936
|
headers: authHeadersSchema,
|
|
5983
5937
|
pathParams: external_exports.object({ id: external_exports.string().uuid() }),
|
|
5984
5938
|
responses: {
|
|
5985
|
-
204:
|
|
5939
|
+
204: c21.noBody(),
|
|
5986
5940
|
401: apiErrorSchema,
|
|
5987
5941
|
403: apiErrorSchema,
|
|
5988
5942
|
404: apiErrorSchema,
|
|
@@ -6007,7 +5961,7 @@ var zeroCustomConnectorByIdContract = c22.router({
|
|
|
6007
5961
|
summary: "Rename an org custom connector"
|
|
6008
5962
|
}
|
|
6009
5963
|
});
|
|
6010
|
-
var zeroCustomConnectorSecretContract =
|
|
5964
|
+
var zeroCustomConnectorSecretContract = c21.router({
|
|
6011
5965
|
set: {
|
|
6012
5966
|
method: "PUT",
|
|
6013
5967
|
path: "/api/zero/custom-connectors/:id/secret",
|
|
@@ -6015,7 +5969,7 @@ var zeroCustomConnectorSecretContract = c22.router({
|
|
|
6015
5969
|
pathParams: external_exports.object({ id: external_exports.string().uuid() }),
|
|
6016
5970
|
body: setCustomConnectorSecretBodySchema,
|
|
6017
5971
|
responses: {
|
|
6018
|
-
204:
|
|
5972
|
+
204: c21.noBody(),
|
|
6019
5973
|
400: apiErrorSchema,
|
|
6020
5974
|
401: apiErrorSchema,
|
|
6021
5975
|
404: apiErrorSchema,
|
|
@@ -6029,7 +5983,7 @@ var zeroCustomConnectorSecretContract = c22.router({
|
|
|
6029
5983
|
headers: authHeadersSchema,
|
|
6030
5984
|
pathParams: external_exports.object({ id: external_exports.string().uuid() }),
|
|
6031
5985
|
responses: {
|
|
6032
|
-
204:
|
|
5986
|
+
204: c21.noBody(),
|
|
6033
5987
|
401: apiErrorSchema,
|
|
6034
5988
|
404: apiErrorSchema,
|
|
6035
5989
|
500: apiErrorSchema
|
|
@@ -6037,7 +5991,7 @@ var zeroCustomConnectorSecretContract = c22.router({
|
|
|
6037
5991
|
summary: "Clear the calling user's secret for a custom connector"
|
|
6038
5992
|
}
|
|
6039
5993
|
});
|
|
6040
|
-
var zeroCustomConnectorProposalContract =
|
|
5994
|
+
var zeroCustomConnectorProposalContract = c21.router({
|
|
6041
5995
|
save: {
|
|
6042
5996
|
method: "POST",
|
|
6043
5997
|
path: "/api/zero/custom-connectors/proposals/save",
|
|
@@ -6058,8 +6012,8 @@ var zeroCustomConnectorProposalContract = c22.router({
|
|
|
6058
6012
|
// src/lib/api/domains/zero-connectors.ts
|
|
6059
6013
|
async function listZeroConnectors() {
|
|
6060
6014
|
const config = await getClientConfig();
|
|
6061
|
-
const
|
|
6062
|
-
const result = await
|
|
6015
|
+
const client2 = initClient(zeroConnectorsMainContract, config);
|
|
6016
|
+
const result = await client2.list({ headers: {} });
|
|
6063
6017
|
if (result.status === 200) {
|
|
6064
6018
|
return result.body;
|
|
6065
6019
|
}
|
|
@@ -6067,8 +6021,8 @@ async function listZeroConnectors() {
|
|
|
6067
6021
|
}
|
|
6068
6022
|
async function listZeroConnectorCatalog() {
|
|
6069
6023
|
const config = await getClientConfig();
|
|
6070
|
-
const
|
|
6071
|
-
const result = await
|
|
6024
|
+
const client2 = initClient(zeroConnectorCatalogContract, config);
|
|
6025
|
+
const result = await client2.list({ headers: {} });
|
|
6072
6026
|
if (result.status === 200) {
|
|
6073
6027
|
return result.body;
|
|
6074
6028
|
}
|
|
@@ -6076,8 +6030,8 @@ async function listZeroConnectorCatalog() {
|
|
|
6076
6030
|
}
|
|
6077
6031
|
async function listZeroConnectorCatalogStatus() {
|
|
6078
6032
|
const config = await getClientConfig();
|
|
6079
|
-
const
|
|
6080
|
-
const result = await
|
|
6033
|
+
const client2 = initClient(zeroConnectorCatalogContract, config);
|
|
6034
|
+
const result = await client2.status({ headers: {} });
|
|
6081
6035
|
if (result.status === 200) {
|
|
6082
6036
|
return result.body;
|
|
6083
6037
|
}
|
|
@@ -6085,8 +6039,8 @@ async function listZeroConnectorCatalogStatus() {
|
|
|
6085
6039
|
}
|
|
6086
6040
|
async function getZeroConnectorCatalogPermissions(connectorRef) {
|
|
6087
6041
|
const config = await getClientConfig();
|
|
6088
|
-
const
|
|
6089
|
-
const result = await
|
|
6042
|
+
const client2 = initClient(zeroConnectorCatalogContract, config);
|
|
6043
|
+
const result = await client2.permissions({
|
|
6090
6044
|
params: { connectorRef }
|
|
6091
6045
|
});
|
|
6092
6046
|
if (result.status === 200) {
|
|
@@ -6107,11 +6061,11 @@ async function getZeroConnectorCatalogPermissions(connectorRef) {
|
|
|
6107
6061
|
}
|
|
6108
6062
|
async function diagnoseZeroConnectorCheck(request) {
|
|
6109
6063
|
const config = await getClientConfig();
|
|
6110
|
-
const
|
|
6064
|
+
const client2 = initClient(zeroConnectorCheckContract, {
|
|
6111
6065
|
...config,
|
|
6112
6066
|
validateResponse: true
|
|
6113
6067
|
});
|
|
6114
|
-
const result = await
|
|
6068
|
+
const result = await client2.check({ body: request });
|
|
6115
6069
|
if (result.status === 200) {
|
|
6116
6070
|
return result.body;
|
|
6117
6071
|
}
|
|
@@ -6119,8 +6073,8 @@ async function diagnoseZeroConnectorCheck(request) {
|
|
|
6119
6073
|
}
|
|
6120
6074
|
async function getZeroConnector(type) {
|
|
6121
6075
|
const config = await getClientConfig();
|
|
6122
|
-
const
|
|
6123
|
-
const result = await
|
|
6076
|
+
const client2 = initClient(zeroConnectorsByTypeContract, config);
|
|
6077
|
+
const result = await client2.get({
|
|
6124
6078
|
params: { type }
|
|
6125
6079
|
});
|
|
6126
6080
|
if (result.status === 200) {
|
|
@@ -6133,8 +6087,8 @@ async function getZeroConnector(type) {
|
|
|
6133
6087
|
}
|
|
6134
6088
|
async function connectZeroConnectorManualGrant(type, authMethod, values) {
|
|
6135
6089
|
const config = await getClientConfig();
|
|
6136
|
-
const
|
|
6137
|
-
const result = await
|
|
6090
|
+
const client2 = initClient(zeroConnectorManualGrantContract, config);
|
|
6091
|
+
const result = await client2.connect({
|
|
6138
6092
|
params: { type },
|
|
6139
6093
|
body: { authMethod, values }
|
|
6140
6094
|
});
|
|
@@ -6145,8 +6099,8 @@ async function connectZeroConnectorManualGrant(type, authMethod, values) {
|
|
|
6145
6099
|
}
|
|
6146
6100
|
async function listZeroCustomConnectors() {
|
|
6147
6101
|
const config = await getClientConfig();
|
|
6148
|
-
const
|
|
6149
|
-
const result = await
|
|
6102
|
+
const client2 = initClient(zeroCustomConnectorsContract, config);
|
|
6103
|
+
const result = await client2.list({ headers: {} });
|
|
6150
6104
|
if (result.status === 200) {
|
|
6151
6105
|
return result.body.connectors;
|
|
6152
6106
|
}
|
|
@@ -6154,8 +6108,8 @@ async function listZeroCustomConnectors() {
|
|
|
6154
6108
|
}
|
|
6155
6109
|
async function getZeroCustomConnector(id) {
|
|
6156
6110
|
const config = await getClientConfig();
|
|
6157
|
-
const
|
|
6158
|
-
const result = await
|
|
6111
|
+
const client2 = initClient(zeroCustomConnectorByIdContract, config);
|
|
6112
|
+
const result = await client2.get({ params: { id }, headers: {} });
|
|
6159
6113
|
if (result.status === 200) {
|
|
6160
6114
|
return result.body;
|
|
6161
6115
|
}
|
|
@@ -6176,7 +6130,7 @@ init_esm_shims();
|
|
|
6176
6130
|
|
|
6177
6131
|
// ../../packages/api-contracts/src/contracts/runners.ts
|
|
6178
6132
|
init_esm_shims();
|
|
6179
|
-
var
|
|
6133
|
+
var c22 = initContract();
|
|
6180
6134
|
var MIN_EPOCH_MS_TIMESTAMP = 1e12;
|
|
6181
6135
|
var apiStartTimeSchema = external_exports.number().int().min(MIN_EPOCH_MS_TIMESTAMP);
|
|
6182
6136
|
var CANONICAL_GUEST_HOME_DIR = "/home/user";
|
|
@@ -6300,7 +6254,7 @@ var heldSessionStateSchema = external_exports.object({
|
|
|
6300
6254
|
})
|
|
6301
6255
|
).max(8).optional()
|
|
6302
6256
|
});
|
|
6303
|
-
var runnersPollContract =
|
|
6257
|
+
var runnersPollContract = c22.router({
|
|
6304
6258
|
poll: {
|
|
6305
6259
|
method: "POST",
|
|
6306
6260
|
path: "/api/runners/poll",
|
|
@@ -6623,7 +6577,7 @@ var executionContextSchema = external_exports.object({
|
|
|
6623
6577
|
// API-owned Codex provider/runtime metadata forwarded through the runner.
|
|
6624
6578
|
codexRuntimeConfig: modelProviderCodexRuntimeConfigSchema.nullable().optional()
|
|
6625
6579
|
});
|
|
6626
|
-
var runnersJobClaimContract =
|
|
6580
|
+
var runnersJobClaimContract = c22.router({
|
|
6627
6581
|
claim: {
|
|
6628
6582
|
method: "POST",
|
|
6629
6583
|
path: "/api/runners/jobs/:id/claim",
|
|
@@ -6647,7 +6601,7 @@ var runnersJobClaimContract = c23.router({
|
|
|
6647
6601
|
summary: "Claim a pending job for execution"
|
|
6648
6602
|
}
|
|
6649
6603
|
});
|
|
6650
|
-
var runnersNetworkPolicyRefreshContract =
|
|
6604
|
+
var runnersNetworkPolicyRefreshContract = c22.router({
|
|
6651
6605
|
refresh: {
|
|
6652
6606
|
method: "POST",
|
|
6653
6607
|
path: "/api/runners/runs/:runId/network-policy-refresh",
|
|
@@ -6677,7 +6631,7 @@ var runnersNetworkPolicyRefreshContract = c23.router({
|
|
|
6677
6631
|
summary: "Refresh active run network policies"
|
|
6678
6632
|
}
|
|
6679
6633
|
});
|
|
6680
|
-
var runnersBuiltinFirewallsResolveContract =
|
|
6634
|
+
var runnersBuiltinFirewallsResolveContract = c22.router({
|
|
6681
6635
|
resolve: {
|
|
6682
6636
|
method: "POST",
|
|
6683
6637
|
path: "/api/runners/builtin-firewalls/resolve",
|
|
@@ -6723,7 +6677,7 @@ var heartbeatBodySchema = external_exports.object({
|
|
|
6723
6677
|
message: "heldSessionStates may contain at most 1024 workspace caches"
|
|
6724
6678
|
});
|
|
6725
6679
|
});
|
|
6726
|
-
var runnersHeartbeatContract =
|
|
6680
|
+
var runnersHeartbeatContract = c22.router({
|
|
6727
6681
|
heartbeat: {
|
|
6728
6682
|
method: "POST",
|
|
6729
6683
|
path: "/api/runners/heartbeat",
|
|
@@ -6741,7 +6695,7 @@ var runnersHeartbeatContract = c23.router({
|
|
|
6741
6695
|
|
|
6742
6696
|
// ../../packages/api-contracts/src/contracts/storages.ts
|
|
6743
6697
|
init_esm_shims();
|
|
6744
|
-
var
|
|
6698
|
+
var c23 = initContract();
|
|
6745
6699
|
var storageTypeSchema = external_exports.enum(["volume", "artifact"]);
|
|
6746
6700
|
var versionQuerySchema = external_exports.string().regex(/^[a-f0-9]{8,64}$/i, "Version must be 8-64 hex characters").optional();
|
|
6747
6701
|
var uploadStorageResponseSchema = external_exports.object({
|
|
@@ -6752,7 +6706,7 @@ var uploadStorageResponseSchema = external_exports.object({
|
|
|
6752
6706
|
type: storageTypeSchema,
|
|
6753
6707
|
deduplicated: external_exports.boolean()
|
|
6754
6708
|
});
|
|
6755
|
-
var storagesContract =
|
|
6709
|
+
var storagesContract = c23.router({
|
|
6756
6710
|
/**
|
|
6757
6711
|
* POST /api/storages
|
|
6758
6712
|
* Upload a storage (tar.gz file)
|
|
@@ -6769,7 +6723,7 @@ var storagesContract = c24.router({
|
|
|
6769
6723
|
path: "/api/storages",
|
|
6770
6724
|
headers: authHeadersSchema,
|
|
6771
6725
|
contentType: "multipart/form-data",
|
|
6772
|
-
body:
|
|
6726
|
+
body: c23.type(),
|
|
6773
6727
|
responses: {
|
|
6774
6728
|
200: uploadStorageResponseSchema,
|
|
6775
6729
|
400: apiErrorSchema,
|
|
@@ -6798,9 +6752,9 @@ var storagesContract = c24.router({
|
|
|
6798
6752
|
}),
|
|
6799
6753
|
responses: {
|
|
6800
6754
|
// Binary response - actual handling done at route level
|
|
6801
|
-
200:
|
|
6755
|
+
200: c23.otherResponse({
|
|
6802
6756
|
contentType: "application/gzip",
|
|
6803
|
-
body:
|
|
6757
|
+
body: c23.type()
|
|
6804
6758
|
}),
|
|
6805
6759
|
400: apiErrorSchema,
|
|
6806
6760
|
401: apiErrorSchema,
|
|
@@ -6825,7 +6779,7 @@ var presignedUploadSchema = external_exports.object({
|
|
|
6825
6779
|
key: external_exports.string(),
|
|
6826
6780
|
presignedUrl: external_exports.url()
|
|
6827
6781
|
});
|
|
6828
|
-
var storagesPrepareContract =
|
|
6782
|
+
var storagesPrepareContract = c23.router({
|
|
6829
6783
|
prepare: {
|
|
6830
6784
|
method: "POST",
|
|
6831
6785
|
path: "/api/storages/prepare",
|
|
@@ -6860,7 +6814,7 @@ var storagesPrepareContract = c24.router({
|
|
|
6860
6814
|
summary: "Prepare for direct S3 upload"
|
|
6861
6815
|
}
|
|
6862
6816
|
});
|
|
6863
|
-
var storagesCommitContract =
|
|
6817
|
+
var storagesCommitContract = c23.router({
|
|
6864
6818
|
commit: {
|
|
6865
6819
|
method: "POST",
|
|
6866
6820
|
path: "/api/storages/commit",
|
|
@@ -6894,7 +6848,7 @@ var storagesCommitContract = c24.router({
|
|
|
6894
6848
|
summary: "Commit uploaded storage"
|
|
6895
6849
|
}
|
|
6896
6850
|
});
|
|
6897
|
-
var storagesDownloadContract =
|
|
6851
|
+
var storagesDownloadContract = c23.router({
|
|
6898
6852
|
download: {
|
|
6899
6853
|
method: "GET",
|
|
6900
6854
|
path: "/api/storages/download",
|
|
@@ -6930,7 +6884,7 @@ var storagesDownloadContract = c24.router({
|
|
|
6930
6884
|
summary: "Get presigned download URL"
|
|
6931
6885
|
}
|
|
6932
6886
|
});
|
|
6933
|
-
var storagesListContract =
|
|
6887
|
+
var storagesListContract = c23.router({
|
|
6934
6888
|
list: {
|
|
6935
6889
|
method: "GET",
|
|
6936
6890
|
path: "/api/storages/list",
|
|
@@ -6958,7 +6912,7 @@ var storagesListContract = c24.router({
|
|
|
6958
6912
|
});
|
|
6959
6913
|
|
|
6960
6914
|
// ../../packages/api-contracts/src/contracts/webhooks.ts
|
|
6961
|
-
var
|
|
6915
|
+
var c24 = initContract();
|
|
6962
6916
|
var sha256HexSchema = external_exports.string().regex(
|
|
6963
6917
|
/^[a-f0-9]{64}$/,
|
|
6964
6918
|
"hash must be a lowercase 64-character SHA-256 hex string"
|
|
@@ -6968,11 +6922,11 @@ var thirdPartyWebhookOkSchema = external_exports.union([
|
|
|
6968
6922
|
external_exports.string(),
|
|
6969
6923
|
external_exports.object({ message: external_exports.literal("pong") })
|
|
6970
6924
|
]);
|
|
6971
|
-
var webhookClerkContract =
|
|
6925
|
+
var webhookClerkContract = c24.router({
|
|
6972
6926
|
post: {
|
|
6973
6927
|
method: "POST",
|
|
6974
6928
|
path: "/api/webhooks/clerk",
|
|
6975
|
-
body:
|
|
6929
|
+
body: c24.type(),
|
|
6976
6930
|
responses: {
|
|
6977
6931
|
200: thirdPartyWebhookOkSchema,
|
|
6978
6932
|
401: thirdPartyWebhookErrorSchema
|
|
@@ -6980,11 +6934,11 @@ var webhookClerkContract = c25.router({
|
|
|
6980
6934
|
summary: "Handle Clerk organization and user webhooks"
|
|
6981
6935
|
}
|
|
6982
6936
|
});
|
|
6983
|
-
var webhookGithubContract =
|
|
6937
|
+
var webhookGithubContract = c24.router({
|
|
6984
6938
|
post: {
|
|
6985
6939
|
method: "POST",
|
|
6986
6940
|
path: "/api/webhooks/github",
|
|
6987
|
-
body:
|
|
6941
|
+
body: c24.type(),
|
|
6988
6942
|
responses: {
|
|
6989
6943
|
200: thirdPartyWebhookOkSchema,
|
|
6990
6944
|
400: thirdPartyWebhookErrorSchema,
|
|
@@ -6994,11 +6948,11 @@ var webhookGithubContract = c25.router({
|
|
|
6994
6948
|
summary: "Handle GitHub App webhooks"
|
|
6995
6949
|
}
|
|
6996
6950
|
});
|
|
6997
|
-
var webhookStripeContract =
|
|
6951
|
+
var webhookStripeContract = c24.router({
|
|
6998
6952
|
post: {
|
|
6999
6953
|
method: "POST",
|
|
7000
6954
|
path: "/api/webhooks/stripe",
|
|
7001
|
-
body:
|
|
6955
|
+
body: c24.type(),
|
|
7002
6956
|
responses: {
|
|
7003
6957
|
200: thirdPartyWebhookOkSchema,
|
|
7004
6958
|
401: thirdPartyWebhookErrorSchema,
|
|
@@ -7037,11 +6991,11 @@ var workflowAutomationWebhookResponseSchema = external_exports.object({
|
|
|
7037
6991
|
duplicate: external_exports.boolean(),
|
|
7038
6992
|
runId: external_exports.string().uuid().optional()
|
|
7039
6993
|
});
|
|
7040
|
-
var webhookGmailContract =
|
|
6994
|
+
var webhookGmailContract = c24.router({
|
|
7041
6995
|
post: {
|
|
7042
6996
|
method: "POST",
|
|
7043
6997
|
path: "/api/webhooks/gmail",
|
|
7044
|
-
body:
|
|
6998
|
+
body: c24.type(),
|
|
7045
6999
|
responses: {
|
|
7046
7000
|
200: gmailWebhookResponseSchema,
|
|
7047
7001
|
400: thirdPartyWebhookErrorSchema,
|
|
@@ -7052,11 +7006,11 @@ var webhookGmailContract = c25.router({
|
|
|
7052
7006
|
summary: "Handle Gmail Pub/Sub push notifications"
|
|
7053
7007
|
}
|
|
7054
7008
|
});
|
|
7055
|
-
var webhookGoogleCalendarContract =
|
|
7009
|
+
var webhookGoogleCalendarContract = c24.router({
|
|
7056
7010
|
post: {
|
|
7057
7011
|
method: "POST",
|
|
7058
7012
|
path: "/api/webhooks/google-calendar",
|
|
7059
|
-
body:
|
|
7013
|
+
body: c24.type(),
|
|
7060
7014
|
responses: {
|
|
7061
7015
|
200: googleCalendarWebhookResponseSchema,
|
|
7062
7016
|
400: thirdPartyWebhookErrorSchema,
|
|
@@ -7067,11 +7021,11 @@ var webhookGoogleCalendarContract = c25.router({
|
|
|
7067
7021
|
summary: "Handle Google Calendar push notifications"
|
|
7068
7022
|
}
|
|
7069
7023
|
});
|
|
7070
|
-
var webhookGoogleWorkspaceEventsContract =
|
|
7024
|
+
var webhookGoogleWorkspaceEventsContract = c24.router({
|
|
7071
7025
|
post: {
|
|
7072
7026
|
method: "POST",
|
|
7073
7027
|
path: "/api/webhooks/google-workspace-events",
|
|
7074
|
-
body:
|
|
7028
|
+
body: c24.type(),
|
|
7075
7029
|
responses: {
|
|
7076
7030
|
200: googleWorkspaceEventsWebhookResponseSchema,
|
|
7077
7031
|
400: thirdPartyWebhookErrorSchema,
|
|
@@ -7082,11 +7036,11 @@ var webhookGoogleWorkspaceEventsContract = c25.router({
|
|
|
7082
7036
|
summary: "Handle Google Workspace Events Pub/Sub push notifications"
|
|
7083
7037
|
}
|
|
7084
7038
|
});
|
|
7085
|
-
var webhookNotionContract =
|
|
7039
|
+
var webhookNotionContract = c24.router({
|
|
7086
7040
|
post: {
|
|
7087
7041
|
method: "POST",
|
|
7088
7042
|
path: "/api/webhooks/notion",
|
|
7089
|
-
body:
|
|
7043
|
+
body: c24.type(),
|
|
7090
7044
|
responses: {
|
|
7091
7045
|
200: notionWebhookResponseSchema,
|
|
7092
7046
|
400: thirdPartyWebhookErrorSchema,
|
|
@@ -7101,7 +7055,7 @@ var workflowAutomationWebhookPostRoute = {
|
|
|
7101
7055
|
pathParams: external_exports.object({
|
|
7102
7056
|
token: external_exports.string().min(1)
|
|
7103
7057
|
}),
|
|
7104
|
-
body:
|
|
7058
|
+
body: c24.type(),
|
|
7105
7059
|
responses: {
|
|
7106
7060
|
200: workflowAutomationWebhookResponseSchema,
|
|
7107
7061
|
400: thirdPartyWebhookErrorSchema,
|
|
@@ -7112,14 +7066,14 @@ var workflowAutomationWebhookPostRoute = {
|
|
|
7112
7066
|
500: thirdPartyWebhookErrorSchema
|
|
7113
7067
|
}
|
|
7114
7068
|
};
|
|
7115
|
-
var webhookWorkflowAutomationContract =
|
|
7069
|
+
var webhookWorkflowAutomationContract = c24.router({
|
|
7116
7070
|
post: {
|
|
7117
7071
|
...workflowAutomationWebhookPostRoute,
|
|
7118
7072
|
path: "/api/webhooks/workflow-automations/:token",
|
|
7119
7073
|
summary: "Handle inbound workflow automation webhooks"
|
|
7120
7074
|
}
|
|
7121
7075
|
});
|
|
7122
|
-
var webhookBuiltInGenerationFalContract =
|
|
7076
|
+
var webhookBuiltInGenerationFalContract = c24.router({
|
|
7123
7077
|
post: {
|
|
7124
7078
|
method: "POST",
|
|
7125
7079
|
path: "/api/webhooks/built-in-generations/fal/:generationId",
|
|
@@ -7130,7 +7084,7 @@ var webhookBuiltInGenerationFalContract = c25.router({
|
|
|
7130
7084
|
token: external_exports.string().min(1),
|
|
7131
7085
|
visualKey: external_exports.string().min(1).optional()
|
|
7132
7086
|
}),
|
|
7133
|
-
body:
|
|
7087
|
+
body: c24.type(),
|
|
7134
7088
|
responses: {
|
|
7135
7089
|
200: thirdPartyWebhookOkSchema,
|
|
7136
7090
|
400: thirdPartyWebhookErrorSchema,
|
|
@@ -7140,7 +7094,7 @@ var webhookBuiltInGenerationFalContract = c25.router({
|
|
|
7140
7094
|
summary: "Handle fal built-in generation webhooks"
|
|
7141
7095
|
}
|
|
7142
7096
|
});
|
|
7143
|
-
var webhookBuiltInGenerationBytePlusContract =
|
|
7097
|
+
var webhookBuiltInGenerationBytePlusContract = c24.router({
|
|
7144
7098
|
post: {
|
|
7145
7099
|
method: "POST",
|
|
7146
7100
|
path: "/api/webhooks/built-in-generations/byteplus/:generationId",
|
|
@@ -7151,7 +7105,7 @@ var webhookBuiltInGenerationBytePlusContract = c25.router({
|
|
|
7151
7105
|
token: external_exports.string().min(1),
|
|
7152
7106
|
visualKey: external_exports.string().min(1).optional()
|
|
7153
7107
|
}),
|
|
7154
|
-
body:
|
|
7108
|
+
body: c24.type(),
|
|
7155
7109
|
responses: {
|
|
7156
7110
|
200: thirdPartyWebhookOkSchema,
|
|
7157
7111
|
400: thirdPartyWebhookErrorSchema,
|
|
@@ -7211,7 +7165,7 @@ var firewallAuthResponseSchema = external_exports.object({
|
|
|
7211
7165
|
refreshedConnectors: external_exports.array(external_exports.string()),
|
|
7212
7166
|
refreshedSecrets: external_exports.array(external_exports.string())
|
|
7213
7167
|
});
|
|
7214
|
-
var webhookFirewallAuthContract =
|
|
7168
|
+
var webhookFirewallAuthContract = c24.router({
|
|
7215
7169
|
/**
|
|
7216
7170
|
* POST /api/webhooks/agent/firewall/auth
|
|
7217
7171
|
* Resolve firewall auth templates and refresh access tokens on demand.
|
|
@@ -7253,7 +7207,7 @@ var webhookFirewallAuthContract = c25.router({
|
|
|
7253
7207
|
summary: "Resolve firewall auth templates"
|
|
7254
7208
|
}
|
|
7255
7209
|
});
|
|
7256
|
-
var webhookEventsContract =
|
|
7210
|
+
var webhookEventsContract = c24.router({
|
|
7257
7211
|
/**
|
|
7258
7212
|
* POST /api/webhooks/agent/events
|
|
7259
7213
|
* Receive agent events from sandbox
|
|
@@ -7280,7 +7234,7 @@ var webhookEventsContract = c25.router({
|
|
|
7280
7234
|
summary: "Receive agent events from sandbox"
|
|
7281
7235
|
}
|
|
7282
7236
|
});
|
|
7283
|
-
var webhookCompleteContract =
|
|
7237
|
+
var webhookCompleteContract = c24.router({
|
|
7284
7238
|
/**
|
|
7285
7239
|
* POST /api/webhooks/agent/complete
|
|
7286
7240
|
* Handle agent run completion (success or failure)
|
|
@@ -7317,7 +7271,7 @@ var webhookCompleteContract = c25.router({
|
|
|
7317
7271
|
summary: "Handle agent run completion"
|
|
7318
7272
|
}
|
|
7319
7273
|
});
|
|
7320
|
-
var webhookCheckpointsContract =
|
|
7274
|
+
var webhookCheckpointsContract = c24.router({
|
|
7321
7275
|
/**
|
|
7322
7276
|
* POST /api/webhooks/agent/checkpoints
|
|
7323
7277
|
* Create a recoverable checkpoint for an agent run.
|
|
@@ -7352,7 +7306,7 @@ var webhookCheckpointsContract = c25.router({
|
|
|
7352
7306
|
summary: "Create checkpoint for agent run"
|
|
7353
7307
|
}
|
|
7354
7308
|
});
|
|
7355
|
-
var webhookCheckpointsPrepareHistoryContract =
|
|
7309
|
+
var webhookCheckpointsPrepareHistoryContract = c24.router({
|
|
7356
7310
|
prepare: {
|
|
7357
7311
|
method: "POST",
|
|
7358
7312
|
path: "/api/webhooks/agent/checkpoints/prepare-history",
|
|
@@ -7378,7 +7332,7 @@ var webhookCheckpointsPrepareHistoryContract = c25.router({
|
|
|
7378
7332
|
summary: "Get presigned URL for uploading session history to S3"
|
|
7379
7333
|
}
|
|
7380
7334
|
});
|
|
7381
|
-
var webhookHeartbeatContract =
|
|
7335
|
+
var webhookHeartbeatContract = c24.router({
|
|
7382
7336
|
/**
|
|
7383
7337
|
* POST /api/webhooks/agent/heartbeat
|
|
7384
7338
|
* Receive heartbeat signals from sandbox
|
|
@@ -7402,7 +7356,7 @@ var webhookHeartbeatContract = c25.router({
|
|
|
7402
7356
|
summary: "Receive heartbeat from sandbox"
|
|
7403
7357
|
}
|
|
7404
7358
|
});
|
|
7405
|
-
var webhookStoragesContract =
|
|
7359
|
+
var webhookStoragesContract = c24.router({
|
|
7406
7360
|
/**
|
|
7407
7361
|
* POST /api/webhooks/agent/storages
|
|
7408
7362
|
* Create a new version of a storage from sandbox
|
|
@@ -7418,7 +7372,7 @@ var webhookStoragesContract = c25.router({
|
|
|
7418
7372
|
path: "/api/webhooks/agent/storages",
|
|
7419
7373
|
headers: authHeadersSchema,
|
|
7420
7374
|
contentType: "multipart/form-data",
|
|
7421
|
-
body:
|
|
7375
|
+
body: c24.type(),
|
|
7422
7376
|
responses: {
|
|
7423
7377
|
200: external_exports.object({
|
|
7424
7378
|
versionId: external_exports.string(),
|
|
@@ -7434,7 +7388,7 @@ var webhookStoragesContract = c25.router({
|
|
|
7434
7388
|
summary: "Upload storage version from sandbox"
|
|
7435
7389
|
}
|
|
7436
7390
|
});
|
|
7437
|
-
var webhookStoragesIncrementalContract =
|
|
7391
|
+
var webhookStoragesIncrementalContract = c24.router({
|
|
7438
7392
|
/**
|
|
7439
7393
|
* POST /api/webhooks/agent/storages/incremental
|
|
7440
7394
|
* Create a new version using incremental upload
|
|
@@ -7452,7 +7406,7 @@ var webhookStoragesIncrementalContract = c25.router({
|
|
|
7452
7406
|
path: "/api/webhooks/agent/storages/incremental",
|
|
7453
7407
|
headers: authHeadersSchema,
|
|
7454
7408
|
contentType: "multipart/form-data",
|
|
7455
|
-
body:
|
|
7409
|
+
body: c24.type(),
|
|
7456
7410
|
responses: {
|
|
7457
7411
|
200: external_exports.object({
|
|
7458
7412
|
versionId: external_exports.string(),
|
|
@@ -7537,7 +7491,7 @@ var sandboxOperationSchema = external_exports.object({
|
|
|
7537
7491
|
session_history_transfer_encoding_state: sessionHistoryTransferEncodingStateSchema.optional(),
|
|
7538
7492
|
session_history_download_source: sandboxOperationDownloadSourceSchema
|
|
7539
7493
|
});
|
|
7540
|
-
var webhookTelemetryContract =
|
|
7494
|
+
var webhookTelemetryContract = c24.router({
|
|
7541
7495
|
/**
|
|
7542
7496
|
* POST /api/webhooks/agent/telemetry
|
|
7543
7497
|
* Receive telemetry data (system log, metrics, network logs, and sandbox operations) from sandbox
|
|
@@ -7566,7 +7520,7 @@ var webhookTelemetryContract = c25.router({
|
|
|
7566
7520
|
summary: "Receive telemetry data from sandbox"
|
|
7567
7521
|
}
|
|
7568
7522
|
});
|
|
7569
|
-
var webhookStoragesPrepareContract =
|
|
7523
|
+
var webhookStoragesPrepareContract = c24.router({
|
|
7570
7524
|
prepare: {
|
|
7571
7525
|
method: "POST",
|
|
7572
7526
|
path: "/api/webhooks/agent/storages/prepare",
|
|
@@ -7600,7 +7554,7 @@ var webhookStoragesPrepareContract = c25.router({
|
|
|
7600
7554
|
summary: "Prepare for direct S3 upload from sandbox"
|
|
7601
7555
|
}
|
|
7602
7556
|
});
|
|
7603
|
-
var webhookStoragesCommitContract =
|
|
7557
|
+
var webhookStoragesCommitContract = c24.router({
|
|
7604
7558
|
commit: {
|
|
7605
7559
|
method: "POST",
|
|
7606
7560
|
path: "/api/webhooks/agent/storages/commit",
|
|
@@ -7643,7 +7597,7 @@ var webhookUsageEventItemSchema = external_exports.object({
|
|
|
7643
7597
|
quantity: external_exports.number().int().min(0),
|
|
7644
7598
|
grossCredits: external_exports.number().int().min(0).optional()
|
|
7645
7599
|
}).strict();
|
|
7646
|
-
var webhookUsageEventContract =
|
|
7600
|
+
var webhookUsageEventContract = c24.router({
|
|
7647
7601
|
send: {
|
|
7648
7602
|
method: "POST",
|
|
7649
7603
|
path: "/api/webhooks/agent/usage-event",
|
|
@@ -7664,7 +7618,7 @@ var webhookUsageEventContract = c25.router({
|
|
|
7664
7618
|
summary: "Receive billing usage event data from sandbox"
|
|
7665
7619
|
}
|
|
7666
7620
|
});
|
|
7667
|
-
var
|
|
7621
|
+
var webhookModelUsageObservationItemSchema = external_exports.object({
|
|
7668
7622
|
idempotencyKey: external_exports.uuid(),
|
|
7669
7623
|
model: external_exports.string().min(1).max(255),
|
|
7670
7624
|
inputTokens: external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
|
|
@@ -7677,9 +7631,9 @@ var webhookModelUsageObservationV2ItemSchema = external_exports.object({
|
|
|
7677
7631
|
},
|
|
7678
7632
|
{ message: "At least one token counter must be positive" }
|
|
7679
7633
|
);
|
|
7680
|
-
var
|
|
7634
|
+
var webhookModelUsageObservationBodySchema = external_exports.object({
|
|
7681
7635
|
runId: external_exports.string().min(1, "runId is required"),
|
|
7682
|
-
events: external_exports.array(
|
|
7636
|
+
events: external_exports.array(webhookModelUsageObservationItemSchema).min(1).max(100)
|
|
7683
7637
|
}).strict().superRefine((body, ctx) => {
|
|
7684
7638
|
const idempotencyKeys = /* @__PURE__ */ new Set();
|
|
7685
7639
|
body.events.forEach((event, index) => {
|
|
@@ -7693,30 +7647,12 @@ var webhookModelUsageObservationV2BodySchema = external_exports.object({
|
|
|
7693
7647
|
idempotencyKeys.add(event.idempotencyKey);
|
|
7694
7648
|
});
|
|
7695
7649
|
});
|
|
7696
|
-
var webhookModelUsageObservationContract =
|
|
7650
|
+
var webhookModelUsageObservationContract = c24.router({
|
|
7697
7651
|
send: {
|
|
7698
7652
|
method: "POST",
|
|
7699
7653
|
path: "/api/webhooks/agent/model-usage-observation",
|
|
7700
7654
|
headers: authHeadersSchema,
|
|
7701
|
-
body:
|
|
7702
|
-
responses: {
|
|
7703
|
-
200: external_exports.object({
|
|
7704
|
-
success: external_exports.boolean()
|
|
7705
|
-
}),
|
|
7706
|
-
400: apiErrorSchema,
|
|
7707
|
-
401: apiErrorSchema,
|
|
7708
|
-
404: apiErrorSchema,
|
|
7709
|
-
500: apiErrorSchema
|
|
7710
|
-
},
|
|
7711
|
-
summary: "Receive compact model usage observation data from sandbox"
|
|
7712
|
-
}
|
|
7713
|
-
});
|
|
7714
|
-
var webhookModelUsageObservationV2Contract = c25.router({
|
|
7715
|
-
send: {
|
|
7716
|
-
method: "POST",
|
|
7717
|
-
path: "/api/webhooks/agent/model-usage-observation-v2",
|
|
7718
|
-
headers: authHeadersSchema,
|
|
7719
|
-
body: webhookModelUsageObservationV2BodySchema,
|
|
7655
|
+
body: webhookModelUsageObservationBodySchema,
|
|
7720
7656
|
responses: {
|
|
7721
7657
|
200: external_exports.object({
|
|
7722
7658
|
success: external_exports.boolean()
|
|
@@ -7746,7 +7682,7 @@ var zeroRunRequestSchema = unifiedRunRequestSchema.omit({
|
|
|
7746
7682
|
agentId: external_exports.string().optional(),
|
|
7747
7683
|
modelProvider: external_exports.string().optional()
|
|
7748
7684
|
});
|
|
7749
|
-
var
|
|
7685
|
+
var c25 = initContract();
|
|
7750
7686
|
var zeroLogPaginationQuerySchema = createLogPaginationQuerySchema({
|
|
7751
7687
|
cursorKind: "sequence"
|
|
7752
7688
|
});
|
|
@@ -7756,7 +7692,7 @@ var zeroNetworkLogPaginationQuerySchema = createLogPaginationQuerySchema({
|
|
|
7756
7692
|
defaultLimit: 500,
|
|
7757
7693
|
defaultOrder: "asc"
|
|
7758
7694
|
});
|
|
7759
|
-
var zeroRunsMainContract =
|
|
7695
|
+
var zeroRunsMainContract = c25.router({
|
|
7760
7696
|
create: {
|
|
7761
7697
|
method: "POST",
|
|
7762
7698
|
path: "/api/zero/runs",
|
|
@@ -7775,7 +7711,7 @@ var zeroRunsMainContract = c26.router({
|
|
|
7775
7711
|
summary: "Create and execute agent run (zero proxy)"
|
|
7776
7712
|
}
|
|
7777
7713
|
});
|
|
7778
|
-
var zeroRunsByIdContract =
|
|
7714
|
+
var zeroRunsByIdContract = c25.router({
|
|
7779
7715
|
getById: {
|
|
7780
7716
|
method: "GET",
|
|
7781
7717
|
path: "/api/zero/runs/:id",
|
|
@@ -7793,7 +7729,7 @@ var zeroRunsByIdContract = c26.router({
|
|
|
7793
7729
|
summary: "Get agent run by ID (zero proxy)"
|
|
7794
7730
|
}
|
|
7795
7731
|
});
|
|
7796
|
-
var zeroRunsCancelContract =
|
|
7732
|
+
var zeroRunsCancelContract = c25.router({
|
|
7797
7733
|
cancel: {
|
|
7798
7734
|
method: "POST",
|
|
7799
7735
|
path: "/api/zero/runs/:id/cancel",
|
|
@@ -7812,7 +7748,7 @@ var zeroRunsCancelContract = c26.router({
|
|
|
7812
7748
|
summary: "Cancel a pending or running run (zero proxy)"
|
|
7813
7749
|
}
|
|
7814
7750
|
});
|
|
7815
|
-
var zeroRunsQueueContract =
|
|
7751
|
+
var zeroRunsQueueContract = c25.router({
|
|
7816
7752
|
getQueue: {
|
|
7817
7753
|
method: "GET",
|
|
7818
7754
|
path: "/api/zero/runs/queue",
|
|
@@ -7825,7 +7761,7 @@ var zeroRunsQueueContract = c26.router({
|
|
|
7825
7761
|
summary: "Get org run queue status (zero proxy)"
|
|
7826
7762
|
}
|
|
7827
7763
|
});
|
|
7828
|
-
var zeroRunAgentEventsContract =
|
|
7764
|
+
var zeroRunAgentEventsContract = c25.router({
|
|
7829
7765
|
getAgentEvents: {
|
|
7830
7766
|
method: "GET",
|
|
7831
7767
|
path: "/api/zero/runs/:id/telemetry/agent",
|
|
@@ -7889,7 +7825,7 @@ var runContextResponseSchema = external_exports.object({
|
|
|
7889
7825
|
artifact: runContextArtifactSchema.nullable(),
|
|
7890
7826
|
featureFlags: external_exports.record(external_exports.string(), external_exports.boolean()).nullable()
|
|
7891
7827
|
});
|
|
7892
|
-
var zeroRunContextContract =
|
|
7828
|
+
var zeroRunContextContract = c25.router({
|
|
7893
7829
|
getContext: {
|
|
7894
7830
|
method: "GET",
|
|
7895
7831
|
path: "/api/zero/runs/:id/context",
|
|
@@ -7907,7 +7843,7 @@ var zeroRunContextContract = c26.router({
|
|
|
7907
7843
|
summary: "Get run execution context snapshot for debugging"
|
|
7908
7844
|
}
|
|
7909
7845
|
});
|
|
7910
|
-
var zeroRunNetworkLogsContract =
|
|
7846
|
+
var zeroRunNetworkLogsContract = c25.router({
|
|
7911
7847
|
getNetworkLogs: {
|
|
7912
7848
|
method: "GET",
|
|
7913
7849
|
path: "/api/zero/runs/:id/network",
|
|
@@ -7929,7 +7865,7 @@ var zeroRunNetworkLogsContract = c26.router({
|
|
|
7929
7865
|
var runRunnerResponseSchema = external_exports.object({
|
|
7930
7866
|
sandboxReuseResult: sandboxReuseResultSchema.nullable()
|
|
7931
7867
|
});
|
|
7932
|
-
var zeroRunRunnerContract =
|
|
7868
|
+
var zeroRunRunnerContract = c25.router({
|
|
7933
7869
|
getRunner: {
|
|
7934
7870
|
method: "GET",
|
|
7935
7871
|
path: "/api/zero/runs/:id/runner",
|
|
@@ -7947,7 +7883,7 @@ var zeroRunRunnerContract = c26.router({
|
|
|
7947
7883
|
summary: "Get runner-level metadata for a run"
|
|
7948
7884
|
}
|
|
7949
7885
|
});
|
|
7950
|
-
var zeroLogsSearchContract =
|
|
7886
|
+
var zeroLogsSearchContract = c25.router({
|
|
7951
7887
|
searchLogs: {
|
|
7952
7888
|
method: "GET",
|
|
7953
7889
|
path: "/api/zero/logs/search",
|
|
@@ -7966,8 +7902,8 @@ var zeroLogsSearchContract = c26.router({
|
|
|
7966
7902
|
// src/lib/api/domains/zero-runs.ts
|
|
7967
7903
|
async function getZeroRunAgentEvents(id, options) {
|
|
7968
7904
|
const config = await getClientConfig();
|
|
7969
|
-
const
|
|
7970
|
-
const result = await
|
|
7905
|
+
const client2 = initClient(zeroRunAgentEventsContract, config);
|
|
7906
|
+
const result = await client2.getAgentEvents({
|
|
7971
7907
|
params: { id },
|
|
7972
7908
|
query: {
|
|
7973
7909
|
since: options?.since,
|
|
@@ -7985,8 +7921,8 @@ async function getZeroRunAgentEvents(id, options) {
|
|
|
7985
7921
|
init_esm_shims();
|
|
7986
7922
|
async function searchZeroChat(options) {
|
|
7987
7923
|
const config = await getClientConfig();
|
|
7988
|
-
const
|
|
7989
|
-
const result = await
|
|
7924
|
+
const client2 = initClient(chatSearchContract, config);
|
|
7925
|
+
const result = await client2.search({
|
|
7990
7926
|
query: {
|
|
7991
7927
|
keyword: options.keyword,
|
|
7992
7928
|
agentId: options.agentId,
|
|
@@ -8001,8 +7937,8 @@ async function searchZeroChat(options) {
|
|
|
8001
7937
|
}
|
|
8002
7938
|
async function getZeroChatThreadSnapshot() {
|
|
8003
7939
|
const config = await getClientConfig();
|
|
8004
|
-
const
|
|
8005
|
-
const result = await
|
|
7940
|
+
const client2 = initClient(chatThreadsContract, config);
|
|
7941
|
+
const result = await client2.snapshot();
|
|
8006
7942
|
if (result.status === 200) {
|
|
8007
7943
|
return result.body;
|
|
8008
7944
|
}
|
|
@@ -8010,8 +7946,8 @@ async function getZeroChatThreadSnapshot() {
|
|
|
8010
7946
|
}
|
|
8011
7947
|
async function listZeroChatThreadEvents(options) {
|
|
8012
7948
|
const config = await getClientConfig();
|
|
8013
|
-
const
|
|
8014
|
-
const result = await
|
|
7949
|
+
const client2 = initClient(chatThreadsContract, config);
|
|
7950
|
+
const result = await client2.events({
|
|
8015
7951
|
query: options.sinceEventId ? { sinceEventId: options.sinceEventId } : {}
|
|
8016
7952
|
});
|
|
8017
7953
|
if (result.status === 200) {
|
|
@@ -8028,8 +7964,8 @@ async function listZeroChatThreadEvents(options) {
|
|
|
8028
7964
|
}
|
|
8029
7965
|
async function renameZeroChatThread(options) {
|
|
8030
7966
|
const config = await getClientConfig();
|
|
8031
|
-
const
|
|
8032
|
-
const result = await
|
|
7967
|
+
const client2 = initClient(chatThreadRenameContract, config);
|
|
7968
|
+
const result = await client2.rename({
|
|
8033
7969
|
params: { id: options.threadId },
|
|
8034
7970
|
body: { title: options.title }
|
|
8035
7971
|
});
|
|
@@ -8040,8 +7976,8 @@ async function renameZeroChatThread(options) {
|
|
|
8040
7976
|
}
|
|
8041
7977
|
async function getZeroChatThread(options) {
|
|
8042
7978
|
const config = await getClientConfig();
|
|
8043
|
-
const
|
|
8044
|
-
const result = await
|
|
7979
|
+
const client2 = initClient(chatThreadMetadataContract, config);
|
|
7980
|
+
const result = await client2.get({
|
|
8045
7981
|
params: { id: options.threadId }
|
|
8046
7982
|
});
|
|
8047
7983
|
if (result.status === 200) {
|
|
@@ -8051,8 +7987,8 @@ async function getZeroChatThread(options) {
|
|
|
8051
7987
|
}
|
|
8052
7988
|
async function updateZeroChatThreadModelSelection(options) {
|
|
8053
7989
|
const config = await getClientConfig();
|
|
8054
|
-
const
|
|
8055
|
-
const result = await
|
|
7990
|
+
const client2 = initClient(chatThreadModelSelectionContract, config);
|
|
7991
|
+
const result = await client2.update({
|
|
8056
7992
|
params: { id: options.threadId },
|
|
8057
7993
|
body: { model: options.model }
|
|
8058
7994
|
});
|
|
@@ -8070,7 +8006,7 @@ init_esm_shims();
|
|
|
8070
8006
|
|
|
8071
8007
|
// ../../packages/api-contracts/src/contracts/zero-developer-support.ts
|
|
8072
8008
|
init_esm_shims();
|
|
8073
|
-
var
|
|
8009
|
+
var c26 = initContract();
|
|
8074
8010
|
var developerSupportBodySchema = external_exports.object({
|
|
8075
8011
|
title: external_exports.string().min(1, "Title is required"),
|
|
8076
8012
|
description: external_exports.string().min(1, "Description is required"),
|
|
@@ -8082,7 +8018,7 @@ var consentCodeResponseSchema = external_exports.object({
|
|
|
8082
8018
|
var submitResponseSchema = external_exports.object({
|
|
8083
8019
|
reference: external_exports.string()
|
|
8084
8020
|
});
|
|
8085
|
-
var zeroDeveloperSupportContract =
|
|
8021
|
+
var zeroDeveloperSupportContract = c26.router({
|
|
8086
8022
|
submit: {
|
|
8087
8023
|
method: "POST",
|
|
8088
8024
|
path: "/api/zero/developer-support",
|
|
@@ -8101,15 +8037,15 @@ var zeroDeveloperSupportContract = c27.router({
|
|
|
8101
8037
|
// src/lib/api/domains/zero-developer-support.ts
|
|
8102
8038
|
async function requestDeveloperSupportConsent(body) {
|
|
8103
8039
|
const config = await getClientConfig();
|
|
8104
|
-
const
|
|
8105
|
-
const result = await
|
|
8040
|
+
const client2 = initClient(zeroDeveloperSupportContract, config);
|
|
8041
|
+
const result = await client2.submit({ body, headers: {} });
|
|
8106
8042
|
if (result.status === 200) return result.body;
|
|
8107
8043
|
handleError(result, "Failed to request developer support consent");
|
|
8108
8044
|
}
|
|
8109
8045
|
async function submitDeveloperSupport(body) {
|
|
8110
8046
|
const config = await getClientConfig();
|
|
8111
|
-
const
|
|
8112
|
-
const result = await
|
|
8047
|
+
const client2 = initClient(zeroDeveloperSupportContract, config);
|
|
8048
|
+
const result = await client2.submit({ body, headers: {} });
|
|
8113
8049
|
if (result.status === 200) return result.body;
|
|
8114
8050
|
handleError(result, "Failed to submit developer support request");
|
|
8115
8051
|
}
|
|
@@ -8278,7 +8214,7 @@ init_esm_shims();
|
|
|
8278
8214
|
|
|
8279
8215
|
// ../../packages/api-contracts/src/contracts/zero-computer-use.ts
|
|
8280
8216
|
init_esm_shims();
|
|
8281
|
-
var
|
|
8217
|
+
var c27 = initContract();
|
|
8282
8218
|
var computerUseHostStatusSchema = external_exports.enum(["online", "offline"]);
|
|
8283
8219
|
var computerUseReadCommandKindSchema = external_exports.enum([
|
|
8284
8220
|
"apps.list",
|
|
@@ -8337,9 +8273,6 @@ var hostNameSchema = external_exports.string().trim().min(1).max(253);
|
|
|
8337
8273
|
var hostInstallationIdSchema = external_exports.string().trim().uuid();
|
|
8338
8274
|
var hostVersionSchema = external_exports.string().trim().min(1).max(64);
|
|
8339
8275
|
var hostOsVersionSchema = external_exports.string().trim().min(1).max(128);
|
|
8340
|
-
var hostIdPathParamsSchema = external_exports.object({
|
|
8341
|
-
hostId: external_exports.string().min(1)
|
|
8342
|
-
});
|
|
8343
8276
|
var authorizationRequestTokenPathParamsSchema = external_exports.object({
|
|
8344
8277
|
requestToken: external_exports.string().min(1)
|
|
8345
8278
|
});
|
|
@@ -8562,9 +8495,6 @@ var computerUseHostStopResponseSchema = external_exports.object({
|
|
|
8562
8495
|
var computerUseHostListResponseSchema = external_exports.object({
|
|
8563
8496
|
hosts: external_exports.array(computerUseHostSchema)
|
|
8564
8497
|
});
|
|
8565
|
-
var computerUseHostDeleteResponseSchema = external_exports.object({
|
|
8566
|
-
ok: external_exports.literal(true)
|
|
8567
|
-
});
|
|
8568
8498
|
var computerUseAuthorizationSourceSchema = external_exports.enum([
|
|
8569
8499
|
"chat",
|
|
8570
8500
|
"slack",
|
|
@@ -8653,7 +8583,7 @@ var computerUseAuditEventSchema = external_exports.object({
|
|
|
8653
8583
|
var computerUseAuditEventListResponseSchema = external_exports.object({
|
|
8654
8584
|
auditEvents: external_exports.array(computerUseAuditEventSchema)
|
|
8655
8585
|
});
|
|
8656
|
-
var zeroComputerUseHostsContract =
|
|
8586
|
+
var zeroComputerUseHostsContract = c27.router({
|
|
8657
8587
|
start: {
|
|
8658
8588
|
method: "POST",
|
|
8659
8589
|
path: "/api/zero/computer-use/hosts/start",
|
|
@@ -8677,22 +8607,9 @@ var zeroComputerUseHostsContract = c28.router({
|
|
|
8677
8607
|
403: apiErrorSchema
|
|
8678
8608
|
},
|
|
8679
8609
|
summary: "List linked desktop computer-use hosts"
|
|
8680
|
-
},
|
|
8681
|
-
delete: {
|
|
8682
|
-
method: "DELETE",
|
|
8683
|
-
path: "/api/zero/computer-use/hosts/:hostId",
|
|
8684
|
-
headers: authHeadersSchema,
|
|
8685
|
-
pathParams: hostIdPathParamsSchema,
|
|
8686
|
-
responses: {
|
|
8687
|
-
200: computerUseHostDeleteResponseSchema,
|
|
8688
|
-
401: apiErrorSchema,
|
|
8689
|
-
403: apiErrorSchema,
|
|
8690
|
-
404: apiErrorSchema
|
|
8691
|
-
},
|
|
8692
|
-
summary: "Delete a desktop computer-use host"
|
|
8693
8610
|
}
|
|
8694
8611
|
});
|
|
8695
|
-
var zeroComputerUseHeartbeatContract =
|
|
8612
|
+
var zeroComputerUseHeartbeatContract = c27.router({
|
|
8696
8613
|
heartbeat: {
|
|
8697
8614
|
method: "POST",
|
|
8698
8615
|
path: "/api/zero/computer-use/heartbeat",
|
|
@@ -8717,7 +8634,7 @@ var zeroComputerUseHeartbeatContract = c28.router({
|
|
|
8717
8634
|
summary: "Stop a desktop computer-use host"
|
|
8718
8635
|
}
|
|
8719
8636
|
});
|
|
8720
|
-
var zeroComputerUseAuthorizationRequestsContract =
|
|
8637
|
+
var zeroComputerUseAuthorizationRequestsContract = c27.router({
|
|
8721
8638
|
create: {
|
|
8722
8639
|
method: "POST",
|
|
8723
8640
|
path: "/api/zero/computer-use/authorization-requests",
|
|
@@ -8764,7 +8681,7 @@ var zeroComputerUseAuthorizationRequestsContract = c28.router({
|
|
|
8764
8681
|
summary: "Bind a Computer Use host for a delegated authorization request"
|
|
8765
8682
|
}
|
|
8766
8683
|
});
|
|
8767
|
-
var zeroComputerUseCommandContract =
|
|
8684
|
+
var zeroComputerUseCommandContract = c27.router({
|
|
8768
8685
|
create: {
|
|
8769
8686
|
method: "POST",
|
|
8770
8687
|
path: "/api/zero/computer-use/commands",
|
|
@@ -8799,7 +8716,7 @@ var zeroComputerUseCommandContract = c28.router({
|
|
|
8799
8716
|
headers: authHeadersSchema,
|
|
8800
8717
|
pathParams: commandIdPathParamsSchema,
|
|
8801
8718
|
responses: {
|
|
8802
|
-
200:
|
|
8719
|
+
200: c27.type(),
|
|
8803
8720
|
401: apiErrorSchema,
|
|
8804
8721
|
403: apiErrorSchema,
|
|
8805
8722
|
404: apiErrorSchema
|
|
@@ -8812,7 +8729,7 @@ var zeroComputerUseCommandContract = c28.router({
|
|
|
8812
8729
|
headers: authHeadersSchema,
|
|
8813
8730
|
pathParams: commandIdPathParamsSchema,
|
|
8814
8731
|
responses: {
|
|
8815
|
-
200:
|
|
8732
|
+
200: c27.type(),
|
|
8816
8733
|
401: apiErrorSchema,
|
|
8817
8734
|
403: apiErrorSchema,
|
|
8818
8735
|
404: apiErrorSchema
|
|
@@ -8820,7 +8737,7 @@ var zeroComputerUseCommandContract = c28.router({
|
|
|
8820
8737
|
summary: "Download offloaded desktop computer-use plugin content"
|
|
8821
8738
|
}
|
|
8822
8739
|
});
|
|
8823
|
-
var zeroComputerUseWriteCommandContract =
|
|
8740
|
+
var zeroComputerUseWriteCommandContract = c27.router({
|
|
8824
8741
|
create: {
|
|
8825
8742
|
method: "POST",
|
|
8826
8743
|
path: "/api/zero/computer-use/write-commands",
|
|
@@ -8837,7 +8754,7 @@ var zeroComputerUseWriteCommandContract = c28.router({
|
|
|
8837
8754
|
summary: "Create a desktop computer-use write command"
|
|
8838
8755
|
}
|
|
8839
8756
|
});
|
|
8840
|
-
var zeroComputerUsePluginCommandContract =
|
|
8757
|
+
var zeroComputerUsePluginCommandContract = c27.router({
|
|
8841
8758
|
create: {
|
|
8842
8759
|
method: "POST",
|
|
8843
8760
|
path: "/api/zero/computer-use/plugin-commands",
|
|
@@ -8854,7 +8771,7 @@ var zeroComputerUsePluginCommandContract = c28.router({
|
|
|
8854
8771
|
summary: "Create a desktop computer-use plugin command"
|
|
8855
8772
|
}
|
|
8856
8773
|
});
|
|
8857
|
-
var zeroComputerUseHostCommandsContract =
|
|
8774
|
+
var zeroComputerUseHostCommandsContract = c27.router({
|
|
8858
8775
|
next: {
|
|
8859
8776
|
method: "POST",
|
|
8860
8777
|
path: "/api/zero/computer-use/host/commands/next",
|
|
@@ -8882,7 +8799,7 @@ var zeroComputerUseHostCommandsContract = c28.router({
|
|
|
8882
8799
|
summary: "Complete a desktop computer-use command"
|
|
8883
8800
|
}
|
|
8884
8801
|
});
|
|
8885
|
-
var zeroComputerUseAuditEventsContract =
|
|
8802
|
+
var zeroComputerUseAuditEventsContract = c27.router({
|
|
8886
8803
|
list: {
|
|
8887
8804
|
method: "GET",
|
|
8888
8805
|
path: "/api/zero/computer-use/audit-events",
|
|
@@ -8963,8 +8880,8 @@ function commandBody(params) {
|
|
|
8963
8880
|
}
|
|
8964
8881
|
async function createComputerUseReadCommand(params) {
|
|
8965
8882
|
const config = await getComputerUseClientConfig();
|
|
8966
|
-
const
|
|
8967
|
-
const result = await
|
|
8883
|
+
const client2 = initClient(zeroComputerUseCommandContract, config);
|
|
8884
|
+
const result = await client2.create({ body: commandBody(params) });
|
|
8968
8885
|
if (result.status === 200) {
|
|
8969
8886
|
return result.body;
|
|
8970
8887
|
}
|
|
@@ -8972,8 +8889,8 @@ async function createComputerUseReadCommand(params) {
|
|
|
8972
8889
|
}
|
|
8973
8890
|
async function createComputerUseWriteCommand(params) {
|
|
8974
8891
|
const config = await getComputerUseClientConfig();
|
|
8975
|
-
const
|
|
8976
|
-
const result = await
|
|
8892
|
+
const client2 = initClient(zeroComputerUseWriteCommandContract, config);
|
|
8893
|
+
const result = await client2.create({ body: commandBody(params) });
|
|
8977
8894
|
if (result.status === 200) {
|
|
8978
8895
|
return result.body;
|
|
8979
8896
|
}
|
|
@@ -8981,8 +8898,8 @@ async function createComputerUseWriteCommand(params) {
|
|
|
8981
8898
|
}
|
|
8982
8899
|
async function createComputerUsePluginCommand(params) {
|
|
8983
8900
|
const config = await getComputerUseClientConfig();
|
|
8984
|
-
const
|
|
8985
|
-
const result = await
|
|
8901
|
+
const client2 = initClient(zeroComputerUsePluginCommandContract, config);
|
|
8902
|
+
const result = await client2.create({ body: params });
|
|
8986
8903
|
if (result.status === 200) {
|
|
8987
8904
|
return result.body;
|
|
8988
8905
|
}
|
|
@@ -8990,8 +8907,8 @@ async function createComputerUsePluginCommand(params) {
|
|
|
8990
8907
|
}
|
|
8991
8908
|
async function listComputerUseHosts() {
|
|
8992
8909
|
const config = await getComputerUseClientConfig();
|
|
8993
|
-
const
|
|
8994
|
-
const result = await
|
|
8910
|
+
const client2 = initClient(zeroComputerUseHostsContract, config);
|
|
8911
|
+
const result = await client2.list({});
|
|
8995
8912
|
if (result.status === 200) {
|
|
8996
8913
|
return result.body.hosts;
|
|
8997
8914
|
}
|
|
@@ -8999,8 +8916,8 @@ async function listComputerUseHosts() {
|
|
|
8999
8916
|
}
|
|
9000
8917
|
async function getComputerUseCommand(commandId) {
|
|
9001
8918
|
const config = await getComputerUseClientConfig();
|
|
9002
|
-
const
|
|
9003
|
-
const result = await
|
|
8919
|
+
const client2 = initClient(zeroComputerUseCommandContract, config);
|
|
8920
|
+
const result = await client2.get({ params: { commandId } });
|
|
9004
8921
|
if (result.status === 200) {
|
|
9005
8922
|
return result.body;
|
|
9006
8923
|
}
|
|
@@ -9008,11 +8925,11 @@ async function getComputerUseCommand(commandId) {
|
|
|
9008
8925
|
}
|
|
9009
8926
|
async function createComputerUseAuthorizationRequest() {
|
|
9010
8927
|
const config = await getComputerUseClientConfig();
|
|
9011
|
-
const
|
|
8928
|
+
const client2 = initClient(
|
|
9012
8929
|
zeroComputerUseAuthorizationRequestsContract,
|
|
9013
8930
|
config
|
|
9014
8931
|
);
|
|
9015
|
-
const result = await
|
|
8932
|
+
const result = await client2.create({ body: {} });
|
|
9016
8933
|
if (result.status === 200) {
|
|
9017
8934
|
return result.body;
|
|
9018
8935
|
}
|
|
@@ -9059,6 +8976,151 @@ async function fetchComputerUsePluginContent(commandId) {
|
|
|
9059
8976
|
return { buffer: Buffer.from(arrayBuffer), mimeType, fileName };
|
|
9060
8977
|
}
|
|
9061
8978
|
|
|
8979
|
+
// ../../packages/api-contracts/src/contracts/zero-browser.ts
|
|
8980
|
+
init_esm_shims();
|
|
8981
|
+
var c28 = initContract();
|
|
8982
|
+
var ZERO_BROWSER_DEFAULT_TIMEOUT_MINUTES = 30;
|
|
8983
|
+
var ZERO_BROWSER_MAX_TIMEOUT_MINUTES = 240;
|
|
8984
|
+
var ZERO_BROWSER_DEFAULT_MAX_CREDITS = 500;
|
|
8985
|
+
var ZERO_BROWSER_MAX_CREDITS = 1e5;
|
|
8986
|
+
var zeroBrowserStatusSchema = external_exports.enum([
|
|
8987
|
+
"creating",
|
|
8988
|
+
"active",
|
|
8989
|
+
"resuming",
|
|
8990
|
+
"stopping",
|
|
8991
|
+
"suspended",
|
|
8992
|
+
"error"
|
|
8993
|
+
]);
|
|
8994
|
+
var zeroBrowserSuspensionReasonSchema = external_exports.enum([
|
|
8995
|
+
"run_end",
|
|
8996
|
+
"timeout",
|
|
8997
|
+
"budget",
|
|
8998
|
+
"provider",
|
|
8999
|
+
"reconcile"
|
|
9000
|
+
]);
|
|
9001
|
+
var zeroBrowserSessionSchema = external_exports.object({
|
|
9002
|
+
id: external_exports.uuid(),
|
|
9003
|
+
name: external_exports.string().min(1).max(64),
|
|
9004
|
+
status: zeroBrowserStatusSchema,
|
|
9005
|
+
viewerUrl: external_exports.url(),
|
|
9006
|
+
liveUrl: external_exports.url().nullable(),
|
|
9007
|
+
proxyCountryCode: external_exports.string().length(2).nullable(),
|
|
9008
|
+
timeoutMinutes: external_exports.number().int().positive(),
|
|
9009
|
+
maxCredits: external_exports.number().int().positive(),
|
|
9010
|
+
grossCredits: external_exports.number().int().nonnegative(),
|
|
9011
|
+
creditsCharged: external_exports.number().int().nonnegative(),
|
|
9012
|
+
suspendedAt: external_exports.iso.datetime().nullable(),
|
|
9013
|
+
suspensionReason: zeroBrowserSuspensionReasonSchema.nullable(),
|
|
9014
|
+
createdAt: external_exports.iso.datetime(),
|
|
9015
|
+
updatedAt: external_exports.iso.datetime()
|
|
9016
|
+
});
|
|
9017
|
+
var zeroBrowserCreateRequestSchema = external_exports.object({
|
|
9018
|
+
name: external_exports.string().trim().min(1).max(64).default("browser"),
|
|
9019
|
+
proxyCountryCode: external_exports.string().trim().length(2).transform((value) => {
|
|
9020
|
+
return value.toLowerCase();
|
|
9021
|
+
}).nullable().default(null),
|
|
9022
|
+
timeoutMinutes: external_exports.number().int().min(1).max(ZERO_BROWSER_MAX_TIMEOUT_MINUTES).default(ZERO_BROWSER_DEFAULT_TIMEOUT_MINUTES),
|
|
9023
|
+
maxCredits: external_exports.number().int().min(1).max(ZERO_BROWSER_MAX_CREDITS).default(ZERO_BROWSER_DEFAULT_MAX_CREDITS)
|
|
9024
|
+
});
|
|
9025
|
+
var browserIdParamsSchema = external_exports.object({
|
|
9026
|
+
browserId: external_exports.uuid()
|
|
9027
|
+
});
|
|
9028
|
+
var browserGetQuerySchema = external_exports.object({
|
|
9029
|
+
chatThreadId: external_exports.uuid().optional()
|
|
9030
|
+
});
|
|
9031
|
+
var browserResponseSchema = external_exports.object({
|
|
9032
|
+
browser: zeroBrowserSessionSchema
|
|
9033
|
+
});
|
|
9034
|
+
var browserConnectionResponseSchema = browserResponseSchema.extend({
|
|
9035
|
+
cdpUrl: external_exports.url()
|
|
9036
|
+
});
|
|
9037
|
+
var commonErrorResponses = {
|
|
9038
|
+
400: apiErrorSchema,
|
|
9039
|
+
401: apiErrorSchema,
|
|
9040
|
+
402: apiErrorSchema,
|
|
9041
|
+
403: apiErrorSchema,
|
|
9042
|
+
404: apiErrorSchema,
|
|
9043
|
+
409: apiErrorSchema,
|
|
9044
|
+
502: apiErrorSchema,
|
|
9045
|
+
503: apiErrorSchema
|
|
9046
|
+
};
|
|
9047
|
+
var zeroBrowserContract = c28.router({
|
|
9048
|
+
create: {
|
|
9049
|
+
method: "POST",
|
|
9050
|
+
path: "/api/zero/browsers",
|
|
9051
|
+
headers: authHeadersSchema,
|
|
9052
|
+
body: zeroBrowserCreateRequestSchema,
|
|
9053
|
+
responses: {
|
|
9054
|
+
201: browserConnectionResponseSchema,
|
|
9055
|
+
...commonErrorResponses
|
|
9056
|
+
},
|
|
9057
|
+
summary: "Create a new managed browser for the current chat thread using the user's shared profile"
|
|
9058
|
+
},
|
|
9059
|
+
resume: {
|
|
9060
|
+
method: "POST",
|
|
9061
|
+
path: "/api/zero/browsers/resume",
|
|
9062
|
+
headers: authHeadersSchema,
|
|
9063
|
+
body: external_exports.object({}),
|
|
9064
|
+
responses: {
|
|
9065
|
+
200: browserConnectionResponseSchema,
|
|
9066
|
+
...commonErrorResponses
|
|
9067
|
+
},
|
|
9068
|
+
summary: "Resume the current chat thread's managed browser"
|
|
9069
|
+
},
|
|
9070
|
+
current: {
|
|
9071
|
+
method: "GET",
|
|
9072
|
+
path: "/api/zero/browsers/current",
|
|
9073
|
+
headers: authHeadersSchema,
|
|
9074
|
+
responses: {
|
|
9075
|
+
200: browserResponseSchema,
|
|
9076
|
+
...commonErrorResponses
|
|
9077
|
+
},
|
|
9078
|
+
summary: "Get the current chat thread's managed browser"
|
|
9079
|
+
},
|
|
9080
|
+
get: {
|
|
9081
|
+
method: "GET",
|
|
9082
|
+
path: "/api/zero/browsers/:browserId",
|
|
9083
|
+
headers: authHeadersSchema,
|
|
9084
|
+
pathParams: browserIdParamsSchema,
|
|
9085
|
+
query: browserGetQuerySchema,
|
|
9086
|
+
responses: {
|
|
9087
|
+
200: browserResponseSchema,
|
|
9088
|
+
...commonErrorResponses
|
|
9089
|
+
},
|
|
9090
|
+
summary: "Get a managed browser by universal-link ID"
|
|
9091
|
+
}
|
|
9092
|
+
});
|
|
9093
|
+
|
|
9094
|
+
// src/lib/api/domains/zero-browser.ts
|
|
9095
|
+
init_esm_shims();
|
|
9096
|
+
async function client() {
|
|
9097
|
+
return initClient(zeroBrowserContract, await getClientConfig());
|
|
9098
|
+
}
|
|
9099
|
+
async function createZeroBrowser(body) {
|
|
9100
|
+
const result = await (await client()).create({ headers: {}, body });
|
|
9101
|
+
if (result.status === 201) {
|
|
9102
|
+
return result.body;
|
|
9103
|
+
}
|
|
9104
|
+
handleError(result, "Failed to create a new managed browser");
|
|
9105
|
+
}
|
|
9106
|
+
async function resumeZeroBrowser() {
|
|
9107
|
+
const result = await (await client()).resume({
|
|
9108
|
+
headers: {},
|
|
9109
|
+
body: {}
|
|
9110
|
+
});
|
|
9111
|
+
if (result.status === 200) {
|
|
9112
|
+
return result.body;
|
|
9113
|
+
}
|
|
9114
|
+
handleError(result, "Failed to resume the managed browser");
|
|
9115
|
+
}
|
|
9116
|
+
async function getCurrentZeroBrowser() {
|
|
9117
|
+
const result = await (await client()).current({ headers: {} });
|
|
9118
|
+
if (result.status === 200) {
|
|
9119
|
+
return result.body.browser;
|
|
9120
|
+
}
|
|
9121
|
+
handleError(result, "Failed to get the current managed browser");
|
|
9122
|
+
}
|
|
9123
|
+
|
|
9062
9124
|
// src/lib/api/domains/zero-maps.ts
|
|
9063
9125
|
init_esm_shims();
|
|
9064
9126
|
function authenticatedJsonHeaders(token) {
|
|
@@ -9270,8 +9332,8 @@ var zeroScrapeContract = c29.router({
|
|
|
9270
9332
|
init_esm_shims();
|
|
9271
9333
|
async function callZeroScrape(body) {
|
|
9272
9334
|
const config = await getClientConfig();
|
|
9273
|
-
const
|
|
9274
|
-
const result = await
|
|
9335
|
+
const client2 = initClient(zeroScrapeContract, config);
|
|
9336
|
+
const result = await client2.scrape({ headers: {}, body });
|
|
9275
9337
|
if (result.status === 200) {
|
|
9276
9338
|
return result.body;
|
|
9277
9339
|
}
|
|
@@ -9341,8 +9403,8 @@ var zeroPeopleSearchContract = c30.router({
|
|
|
9341
9403
|
init_esm_shims();
|
|
9342
9404
|
async function callZeroPeopleSearch(body) {
|
|
9343
9405
|
const config = await getClientConfig();
|
|
9344
|
-
const
|
|
9345
|
-
const result = await
|
|
9406
|
+
const client2 = initClient(zeroPeopleSearchContract, config);
|
|
9407
|
+
const result = await client2.search({ headers: {}, body });
|
|
9346
9408
|
if (result.status === 200) {
|
|
9347
9409
|
return result.body;
|
|
9348
9410
|
}
|
|
@@ -9433,8 +9495,8 @@ var zeroWebSearchContract = c31.router({
|
|
|
9433
9495
|
init_esm_shims();
|
|
9434
9496
|
async function callZeroWebSearch(body) {
|
|
9435
9497
|
const config = await getClientConfig();
|
|
9436
|
-
const
|
|
9437
|
-
const result = await
|
|
9498
|
+
const client2 = initClient(zeroWebSearchContract, config);
|
|
9499
|
+
const result = await client2.search({ headers: {}, body });
|
|
9438
9500
|
if (result.status === 200) {
|
|
9439
9501
|
return result.body;
|
|
9440
9502
|
}
|
|
@@ -9549,8 +9611,8 @@ var zeroFinanceContract = c32.router({
|
|
|
9549
9611
|
init_esm_shims();
|
|
9550
9612
|
async function callZeroFinanceSearch(body) {
|
|
9551
9613
|
const config = await getClientConfig();
|
|
9552
|
-
const
|
|
9553
|
-
const result = await
|
|
9614
|
+
const client2 = initClient(zeroFinanceContract, config);
|
|
9615
|
+
const result = await client2.search({ headers: {}, body });
|
|
9554
9616
|
if (result.status === 200) {
|
|
9555
9617
|
return result.body;
|
|
9556
9618
|
}
|
|
@@ -9558,8 +9620,8 @@ async function callZeroFinanceSearch(body) {
|
|
|
9558
9620
|
}
|
|
9559
9621
|
async function callZeroFinanceProfile(body) {
|
|
9560
9622
|
const config = await getClientConfig();
|
|
9561
|
-
const
|
|
9562
|
-
const result = await
|
|
9623
|
+
const client2 = initClient(zeroFinanceContract, config);
|
|
9624
|
+
const result = await client2.profile({ headers: {}, body });
|
|
9563
9625
|
if (result.status === 200) {
|
|
9564
9626
|
return result.body;
|
|
9565
9627
|
}
|
|
@@ -9567,8 +9629,8 @@ async function callZeroFinanceProfile(body) {
|
|
|
9567
9629
|
}
|
|
9568
9630
|
async function callZeroFinanceQuote(body) {
|
|
9569
9631
|
const config = await getClientConfig();
|
|
9570
|
-
const
|
|
9571
|
-
const result = await
|
|
9632
|
+
const client2 = initClient(zeroFinanceContract, config);
|
|
9633
|
+
const result = await client2.quote({ headers: {}, body });
|
|
9572
9634
|
if (result.status === 200) {
|
|
9573
9635
|
return result.body;
|
|
9574
9636
|
}
|
|
@@ -9576,8 +9638,8 @@ async function callZeroFinanceQuote(body) {
|
|
|
9576
9638
|
}
|
|
9577
9639
|
async function callZeroFinanceChart(body) {
|
|
9578
9640
|
const config = await getClientConfig();
|
|
9579
|
-
const
|
|
9580
|
-
const result = await
|
|
9641
|
+
const client2 = initClient(zeroFinanceContract, config);
|
|
9642
|
+
const result = await client2.chart({ headers: {}, body });
|
|
9581
9643
|
if (result.status === 200) {
|
|
9582
9644
|
return result.body;
|
|
9583
9645
|
}
|
|
@@ -9797,8 +9859,8 @@ var zeroVariablesByNameContract = c33.router({
|
|
|
9797
9859
|
// src/lib/api/domains/zero-secrets.ts
|
|
9798
9860
|
async function listZeroSecrets() {
|
|
9799
9861
|
const config = await getClientConfig();
|
|
9800
|
-
const
|
|
9801
|
-
const result = await
|
|
9862
|
+
const client2 = initClient(zeroSecretsContract, config);
|
|
9863
|
+
const result = await client2.list({ headers: {} });
|
|
9802
9864
|
if (result.status === 200) {
|
|
9803
9865
|
return result.body;
|
|
9804
9866
|
}
|
|
@@ -9806,8 +9868,8 @@ async function listZeroSecrets() {
|
|
|
9806
9868
|
}
|
|
9807
9869
|
async function setZeroSecret(body) {
|
|
9808
9870
|
const config = await getClientConfig();
|
|
9809
|
-
const
|
|
9810
|
-
const result = await
|
|
9871
|
+
const client2 = initClient(zeroSecretsContract, config);
|
|
9872
|
+
const result = await client2.set({ body });
|
|
9811
9873
|
if (result.status === 200 || result.status === 201) {
|
|
9812
9874
|
return result.body;
|
|
9813
9875
|
}
|
|
@@ -9815,8 +9877,8 @@ async function setZeroSecret(body) {
|
|
|
9815
9877
|
}
|
|
9816
9878
|
async function deleteZeroSecret(name) {
|
|
9817
9879
|
const config = await getClientConfig();
|
|
9818
|
-
const
|
|
9819
|
-
const result = await
|
|
9880
|
+
const client2 = initClient(zeroSecretsByNameContract, config);
|
|
9881
|
+
const result = await client2.delete({
|
|
9820
9882
|
params: { name }
|
|
9821
9883
|
});
|
|
9822
9884
|
if (result.status === 204) {
|
|
@@ -9829,8 +9891,8 @@ async function deleteZeroSecret(name) {
|
|
|
9829
9891
|
init_esm_shims();
|
|
9830
9892
|
async function listZeroVariables() {
|
|
9831
9893
|
const config = await getClientConfig();
|
|
9832
|
-
const
|
|
9833
|
-
const result = await
|
|
9894
|
+
const client2 = initClient(zeroVariablesContract, config);
|
|
9895
|
+
const result = await client2.list({ headers: {} });
|
|
9834
9896
|
if (result.status === 200) {
|
|
9835
9897
|
return result.body;
|
|
9836
9898
|
}
|
|
@@ -9838,8 +9900,8 @@ async function listZeroVariables() {
|
|
|
9838
9900
|
}
|
|
9839
9901
|
async function setZeroVariable(body) {
|
|
9840
9902
|
const config = await getClientConfig();
|
|
9841
|
-
const
|
|
9842
|
-
const result = await
|
|
9903
|
+
const client2 = initClient(zeroVariablesContract, config);
|
|
9904
|
+
const result = await client2.set({ body });
|
|
9843
9905
|
if (result.status === 200 || result.status === 201) {
|
|
9844
9906
|
return result.body;
|
|
9845
9907
|
}
|
|
@@ -9847,8 +9909,8 @@ async function setZeroVariable(body) {
|
|
|
9847
9909
|
}
|
|
9848
9910
|
async function deleteZeroVariable(name) {
|
|
9849
9911
|
const config = await getClientConfig();
|
|
9850
|
-
const
|
|
9851
|
-
const result = await
|
|
9912
|
+
const client2 = initClient(zeroVariablesByNameContract, config);
|
|
9913
|
+
const result = await client2.delete({
|
|
9852
9914
|
params: { name }
|
|
9853
9915
|
});
|
|
9854
9916
|
if (result.status === 204) {
|
|
@@ -9861,8 +9923,8 @@ async function deleteZeroVariable(name) {
|
|
|
9861
9923
|
init_esm_shims();
|
|
9862
9924
|
async function listZeroOrgSecrets() {
|
|
9863
9925
|
const config = await getClientConfig();
|
|
9864
|
-
const
|
|
9865
|
-
const result = await
|
|
9926
|
+
const client2 = initClient(zeroSecretsContract, config);
|
|
9927
|
+
const result = await client2.list({ headers: {} });
|
|
9866
9928
|
if (result.status === 200) {
|
|
9867
9929
|
return result.body;
|
|
9868
9930
|
}
|
|
@@ -9870,8 +9932,8 @@ async function listZeroOrgSecrets() {
|
|
|
9870
9932
|
}
|
|
9871
9933
|
async function setZeroOrgSecret(body) {
|
|
9872
9934
|
const config = await getClientConfig();
|
|
9873
|
-
const
|
|
9874
|
-
const result = await
|
|
9935
|
+
const client2 = initClient(zeroSecretsContract, config);
|
|
9936
|
+
const result = await client2.set({ body });
|
|
9875
9937
|
if (result.status === 200 || result.status === 201) {
|
|
9876
9938
|
return result.body;
|
|
9877
9939
|
}
|
|
@@ -9879,8 +9941,8 @@ async function setZeroOrgSecret(body) {
|
|
|
9879
9941
|
}
|
|
9880
9942
|
async function deleteZeroOrgSecret(name) {
|
|
9881
9943
|
const config = await getClientConfig();
|
|
9882
|
-
const
|
|
9883
|
-
const result = await
|
|
9944
|
+
const client2 = initClient(zeroSecretsByNameContract, config);
|
|
9945
|
+
const result = await client2.delete({
|
|
9884
9946
|
params: { name }
|
|
9885
9947
|
});
|
|
9886
9948
|
if (result.status === 204) {
|
|
@@ -9893,8 +9955,8 @@ async function deleteZeroOrgSecret(name) {
|
|
|
9893
9955
|
init_esm_shims();
|
|
9894
9956
|
async function listZeroOrgVariables() {
|
|
9895
9957
|
const config = await getClientConfig();
|
|
9896
|
-
const
|
|
9897
|
-
const result = await
|
|
9958
|
+
const client2 = initClient(zeroVariablesContract, config);
|
|
9959
|
+
const result = await client2.list({ headers: {} });
|
|
9898
9960
|
if (result.status === 200) {
|
|
9899
9961
|
return result.body;
|
|
9900
9962
|
}
|
|
@@ -9902,8 +9964,8 @@ async function listZeroOrgVariables() {
|
|
|
9902
9964
|
}
|
|
9903
9965
|
async function setZeroOrgVariable(body) {
|
|
9904
9966
|
const config = await getClientConfig();
|
|
9905
|
-
const
|
|
9906
|
-
const result = await
|
|
9967
|
+
const client2 = initClient(zeroVariablesContract, config);
|
|
9968
|
+
const result = await client2.set({ body });
|
|
9907
9969
|
if (result.status === 200 || result.status === 201) {
|
|
9908
9970
|
return result.body;
|
|
9909
9971
|
}
|
|
@@ -9911,8 +9973,8 @@ async function setZeroOrgVariable(body) {
|
|
|
9911
9973
|
}
|
|
9912
9974
|
async function deleteZeroOrgVariable(name) {
|
|
9913
9975
|
const config = await getClientConfig();
|
|
9914
|
-
const
|
|
9915
|
-
const result = await
|
|
9976
|
+
const client2 = initClient(zeroVariablesByNameContract, config);
|
|
9977
|
+
const result = await client2.delete({
|
|
9916
9978
|
params: { name }
|
|
9917
9979
|
});
|
|
9918
9980
|
if (result.status === 204) {
|
|
@@ -9979,8 +10041,8 @@ var zeroModelProvidersByTypeContract = c34.router({
|
|
|
9979
10041
|
// src/lib/api/domains/zero-org-model-providers.ts
|
|
9980
10042
|
async function listZeroOrgModelProviders() {
|
|
9981
10043
|
const config = await getClientConfig();
|
|
9982
|
-
const
|
|
9983
|
-
const result = await
|
|
10044
|
+
const client2 = initClient(zeroModelProvidersMainContract, config);
|
|
10045
|
+
const result = await client2.list({ headers: {} });
|
|
9984
10046
|
if (result.status === 200) {
|
|
9985
10047
|
return result.body;
|
|
9986
10048
|
}
|
|
@@ -9988,8 +10050,8 @@ async function listZeroOrgModelProviders() {
|
|
|
9988
10050
|
}
|
|
9989
10051
|
async function upsertZeroOrgModelProvider(body) {
|
|
9990
10052
|
const config = await getClientConfig();
|
|
9991
|
-
const
|
|
9992
|
-
const result = await
|
|
10053
|
+
const client2 = initClient(zeroModelProvidersMainContract, config);
|
|
10054
|
+
const result = await client2.upsert({ body });
|
|
9993
10055
|
if (result.status === 200 || result.status === 201) {
|
|
9994
10056
|
return result.body;
|
|
9995
10057
|
}
|
|
@@ -9997,8 +10059,8 @@ async function upsertZeroOrgModelProvider(body) {
|
|
|
9997
10059
|
}
|
|
9998
10060
|
async function deleteZeroOrgModelProvider(type) {
|
|
9999
10061
|
const config = await getClientConfig();
|
|
10000
|
-
const
|
|
10001
|
-
const result = await
|
|
10062
|
+
const client2 = initClient(zeroModelProvidersByTypeContract, config);
|
|
10063
|
+
const result = await client2.delete({
|
|
10002
10064
|
params: { type }
|
|
10003
10065
|
});
|
|
10004
10066
|
if (result.status === 204) {
|
|
@@ -11218,43 +11280,43 @@ var zeroWorkflowAutomationsContract = c35.router({
|
|
|
11218
11280
|
// src/lib/api/domains/zero-workflows.ts
|
|
11219
11281
|
async function listWorkflows(query) {
|
|
11220
11282
|
const config = await getClientConfig();
|
|
11221
|
-
const
|
|
11222
|
-
const result = await
|
|
11283
|
+
const client2 = initClient(zeroWorkflowsCollectionContract, config);
|
|
11284
|
+
const result = await client2.list({ query });
|
|
11223
11285
|
if (result.status === 200) return result.body;
|
|
11224
11286
|
handleError(result, "Failed to list workflows");
|
|
11225
11287
|
}
|
|
11226
11288
|
async function createWorkflow(body) {
|
|
11227
11289
|
const config = await getClientConfig();
|
|
11228
|
-
const
|
|
11229
|
-
const result = await
|
|
11290
|
+
const client2 = initClient(zeroWorkflowsCollectionContract, config);
|
|
11291
|
+
const result = await client2.create({ body });
|
|
11230
11292
|
if (result.status === 201) return result.body;
|
|
11231
11293
|
handleError(result, `Failed to create workflow "${body.name}"`);
|
|
11232
11294
|
}
|
|
11233
11295
|
async function getWorkflow(workflowId) {
|
|
11234
11296
|
const config = await getClientConfig();
|
|
11235
|
-
const
|
|
11236
|
-
const result = await
|
|
11297
|
+
const client2 = initClient(zeroWorkflowsDetailContract, config);
|
|
11298
|
+
const result = await client2.get({ params: { workflowId } });
|
|
11237
11299
|
if (result.status === 200) return result.body;
|
|
11238
11300
|
handleError(result, `Workflow "${workflowId}" not found`);
|
|
11239
11301
|
}
|
|
11240
11302
|
async function updateWorkflow(workflowId, body) {
|
|
11241
11303
|
const config = await getClientConfig();
|
|
11242
|
-
const
|
|
11243
|
-
const result = await
|
|
11304
|
+
const client2 = initClient(zeroWorkflowsDetailContract, config);
|
|
11305
|
+
const result = await client2.update({ params: { workflowId }, body });
|
|
11244
11306
|
if (result.status === 200) return result.body;
|
|
11245
11307
|
handleError(result, `Failed to update workflow "${workflowId}"`);
|
|
11246
11308
|
}
|
|
11247
11309
|
async function deleteWorkflow(workflowId) {
|
|
11248
11310
|
const config = await getClientConfig();
|
|
11249
|
-
const
|
|
11250
|
-
const result = await
|
|
11311
|
+
const client2 = initClient(zeroWorkflowsDetailContract, config);
|
|
11312
|
+
const result = await client2.delete({ params: { workflowId } });
|
|
11251
11313
|
if (result.status === 204) return;
|
|
11252
11314
|
handleError(result, `Workflow "${workflowId}" not found`);
|
|
11253
11315
|
}
|
|
11254
11316
|
async function copyWorkflow(workflowId, toAgentId) {
|
|
11255
11317
|
const config = await getClientConfig();
|
|
11256
|
-
const
|
|
11257
|
-
const result = await
|
|
11318
|
+
const client2 = initClient(zeroWorkflowsDetailContract, config);
|
|
11319
|
+
const result = await client2.copy({
|
|
11258
11320
|
params: { workflowId },
|
|
11259
11321
|
body: { toAgentId }
|
|
11260
11322
|
});
|
|
@@ -11263,8 +11325,8 @@ async function copyWorkflow(workflowId, toAgentId) {
|
|
|
11263
11325
|
}
|
|
11264
11326
|
async function listWorkflowAutomations(workflowId) {
|
|
11265
11327
|
const config = await getClientConfig();
|
|
11266
|
-
const
|
|
11267
|
-
const result = await
|
|
11328
|
+
const client2 = initClient(zeroWorkflowAutomationsContract, config);
|
|
11329
|
+
const result = await client2.list({ params: { workflowId } });
|
|
11268
11330
|
if (result.status === 200) return result.body;
|
|
11269
11331
|
handleError(
|
|
11270
11332
|
result,
|
|
@@ -11273,43 +11335,43 @@ async function listWorkflowAutomations(workflowId) {
|
|
|
11273
11335
|
}
|
|
11274
11336
|
async function createWorkflowAutomation(workflowId, body) {
|
|
11275
11337
|
const config = await getClientConfig();
|
|
11276
|
-
const
|
|
11277
|
-
const result = await
|
|
11338
|
+
const client2 = initClient(zeroWorkflowAutomationsContract, config);
|
|
11339
|
+
const result = await client2.create({ params: { workflowId }, body });
|
|
11278
11340
|
if (result.status === 201) return result.body;
|
|
11279
11341
|
handleError(result, `Failed to add automation to workflow "${workflowId}"`);
|
|
11280
11342
|
}
|
|
11281
11343
|
async function getWorkflowAutomation(id) {
|
|
11282
11344
|
const config = await getClientConfig();
|
|
11283
|
-
const
|
|
11284
|
-
const result = await
|
|
11345
|
+
const client2 = initClient(zeroWorkflowAutomationsContract, config);
|
|
11346
|
+
const result = await client2.get({ params: { id } });
|
|
11285
11347
|
if (result.status === 200) return result.body;
|
|
11286
11348
|
handleError(result, `Workflow automation "${id}" not found`);
|
|
11287
11349
|
}
|
|
11288
11350
|
async function updateWorkflowAutomation(id, body) {
|
|
11289
11351
|
const config = await getClientConfig();
|
|
11290
|
-
const
|
|
11291
|
-
const result = await
|
|
11352
|
+
const client2 = initClient(zeroWorkflowAutomationsContract, config);
|
|
11353
|
+
const result = await client2.update({ params: { id }, body });
|
|
11292
11354
|
if (result.status === 200) return result.body;
|
|
11293
11355
|
handleError(result, `Failed to update workflow automation "${id}"`);
|
|
11294
11356
|
}
|
|
11295
11357
|
async function deleteWorkflowAutomation(id) {
|
|
11296
11358
|
const config = await getClientConfig();
|
|
11297
|
-
const
|
|
11298
|
-
const result = await
|
|
11359
|
+
const client2 = initClient(zeroWorkflowAutomationsContract, config);
|
|
11360
|
+
const result = await client2.delete({ params: { id } });
|
|
11299
11361
|
if (result.status === 204) return;
|
|
11300
11362
|
handleError(result, `Workflow automation "${id}" not found`);
|
|
11301
11363
|
}
|
|
11302
11364
|
async function enableWorkflowAutomation(id) {
|
|
11303
11365
|
const config = await getClientConfig();
|
|
11304
|
-
const
|
|
11305
|
-
const result = await
|
|
11366
|
+
const client2 = initClient(zeroWorkflowAutomationsContract, config);
|
|
11367
|
+
const result = await client2.enable({ params: { id } });
|
|
11306
11368
|
if (result.status === 200) return result.body;
|
|
11307
11369
|
handleError(result, `Failed to enable workflow automation "${id}"`);
|
|
11308
11370
|
}
|
|
11309
11371
|
async function disableWorkflowAutomation(id) {
|
|
11310
11372
|
const config = await getClientConfig();
|
|
11311
|
-
const
|
|
11312
|
-
const result = await
|
|
11373
|
+
const client2 = initClient(zeroWorkflowAutomationsContract, config);
|
|
11374
|
+
const result = await client2.disable({ params: { id } });
|
|
11313
11375
|
if (result.status === 200) return result.body;
|
|
11314
11376
|
handleError(result, `Failed to disable workflow automation "${id}"`);
|
|
11315
11377
|
}
|
|
@@ -11463,8 +11525,8 @@ var zeroMailContract = c36.router({
|
|
|
11463
11525
|
// src/lib/api/domains/zero-mail.ts
|
|
11464
11526
|
async function linkZeroMailDraft(args) {
|
|
11465
11527
|
const config = await getClientConfig();
|
|
11466
|
-
const
|
|
11467
|
-
const result = await
|
|
11528
|
+
const client2 = initClient(zeroMailContract, config);
|
|
11529
|
+
const result = await client2.linkDraft({
|
|
11468
11530
|
body: {
|
|
11469
11531
|
threadId: args.threadId,
|
|
11470
11532
|
agentId: args.agentId,
|
|
@@ -12231,8 +12293,8 @@ var integrationsSlackUploadCompleteContract = c37.router({
|
|
|
12231
12293
|
// src/lib/api/domains/integrations-slack.ts
|
|
12232
12294
|
async function sendSlackMessage(body) {
|
|
12233
12295
|
const config = await getClientConfig();
|
|
12234
|
-
const
|
|
12235
|
-
const result = await
|
|
12296
|
+
const client2 = initClient(integrationsSlackMessageContract, config);
|
|
12297
|
+
const result = await client2.sendMessage({ body, headers: {} });
|
|
12236
12298
|
if (result.status === 200) {
|
|
12237
12299
|
return result.body;
|
|
12238
12300
|
}
|
|
@@ -12240,8 +12302,8 @@ async function sendSlackMessage(body) {
|
|
|
12240
12302
|
}
|
|
12241
12303
|
async function initSlackFileUpload(body) {
|
|
12242
12304
|
const config = await getClientConfig();
|
|
12243
|
-
const
|
|
12244
|
-
const result = await
|
|
12305
|
+
const client2 = initClient(integrationsSlackUploadInitContract, config);
|
|
12306
|
+
const result = await client2.init({ body, headers: {} });
|
|
12245
12307
|
if (result.status === 200) {
|
|
12246
12308
|
return result.body;
|
|
12247
12309
|
}
|
|
@@ -12249,8 +12311,8 @@ async function initSlackFileUpload(body) {
|
|
|
12249
12311
|
}
|
|
12250
12312
|
async function completeSlackFileUpload(body) {
|
|
12251
12313
|
const config = await getClientConfig();
|
|
12252
|
-
const
|
|
12253
|
-
const result = await
|
|
12314
|
+
const client2 = initClient(integrationsSlackUploadCompleteContract, config);
|
|
12315
|
+
const result = await client2.complete({ body, headers: {} });
|
|
12254
12316
|
if (result.status === 200) {
|
|
12255
12317
|
return result.body;
|
|
12256
12318
|
}
|
|
@@ -12258,8 +12320,8 @@ async function completeSlackFileUpload(body) {
|
|
|
12258
12320
|
}
|
|
12259
12321
|
async function materializeSlackFileUpload(body) {
|
|
12260
12322
|
const config = await getClientConfig();
|
|
12261
|
-
const
|
|
12262
|
-
const result = await
|
|
12323
|
+
const client2 = initClient(integrationsSlackUploadMaterializeContract, config);
|
|
12324
|
+
const result = await client2.materialize({ body, headers: {} });
|
|
12263
12325
|
if (result.status === 200) {
|
|
12264
12326
|
return result.body;
|
|
12265
12327
|
}
|
|
@@ -12318,8 +12380,8 @@ import { Readable as Readable2 } from "stream";
|
|
|
12318
12380
|
import { pipeline as pipeline2 } from "stream/promises";
|
|
12319
12381
|
async function listTelegramBots() {
|
|
12320
12382
|
const config = await getClientConfig();
|
|
12321
|
-
const
|
|
12322
|
-
const result = await
|
|
12383
|
+
const client2 = initClient(integrationsTelegramBotListContract, config);
|
|
12384
|
+
const result = await client2.listBots({ headers: {} });
|
|
12323
12385
|
if (result.status === 200) {
|
|
12324
12386
|
return result.body;
|
|
12325
12387
|
}
|
|
@@ -12327,8 +12389,8 @@ async function listTelegramBots() {
|
|
|
12327
12389
|
}
|
|
12328
12390
|
async function sendTelegramMessage(body) {
|
|
12329
12391
|
const config = await getClientConfig();
|
|
12330
|
-
const
|
|
12331
|
-
const result = await
|
|
12392
|
+
const client2 = initClient(integrationsTelegramMessageContract, config);
|
|
12393
|
+
const result = await client2.sendMessage({ body, headers: {} });
|
|
12332
12394
|
if (result.status === 200) {
|
|
12333
12395
|
return result.body;
|
|
12334
12396
|
}
|
|
@@ -12336,8 +12398,8 @@ async function sendTelegramMessage(body) {
|
|
|
12336
12398
|
}
|
|
12337
12399
|
async function initTelegramFileUpload(body) {
|
|
12338
12400
|
const config = await getClientConfig();
|
|
12339
|
-
const
|
|
12340
|
-
const result = await
|
|
12401
|
+
const client2 = initClient(integrationsTelegramUploadInitContract, config);
|
|
12402
|
+
const result = await client2.init({ body, headers: {} });
|
|
12341
12403
|
if (result.status === 200) {
|
|
12342
12404
|
return result.body;
|
|
12343
12405
|
}
|
|
@@ -12345,8 +12407,8 @@ async function initTelegramFileUpload(body) {
|
|
|
12345
12407
|
}
|
|
12346
12408
|
async function completeTelegramFileUpload(body) {
|
|
12347
12409
|
const config = await getClientConfig();
|
|
12348
|
-
const
|
|
12349
|
-
const result = await
|
|
12410
|
+
const client2 = initClient(integrationsTelegramUploadCompleteContract, config);
|
|
12411
|
+
const result = await client2.complete({ body, headers: {} });
|
|
12350
12412
|
if (result.status === 200) {
|
|
12351
12413
|
return result.body;
|
|
12352
12414
|
}
|
|
@@ -12406,8 +12468,8 @@ import { Readable as Readable3 } from "stream";
|
|
|
12406
12468
|
import { pipeline as pipeline3 } from "stream/promises";
|
|
12407
12469
|
async function sendTeamsMessage(body) {
|
|
12408
12470
|
const config = await getClientConfig();
|
|
12409
|
-
const
|
|
12410
|
-
const result = await
|
|
12471
|
+
const client2 = initClient(integrationsTeamsMessageContract, config);
|
|
12472
|
+
const result = await client2.sendMessage({ body, headers: {} });
|
|
12411
12473
|
if (result.status === 200) {
|
|
12412
12474
|
return result.body;
|
|
12413
12475
|
}
|
|
@@ -12415,8 +12477,8 @@ async function sendTeamsMessage(body) {
|
|
|
12415
12477
|
}
|
|
12416
12478
|
async function initTeamsFileUpload(body) {
|
|
12417
12479
|
const config = await getClientConfig();
|
|
12418
|
-
const
|
|
12419
|
-
const result = await
|
|
12480
|
+
const client2 = initClient(integrationsTeamsUploadInitContract, config);
|
|
12481
|
+
const result = await client2.init({ body, headers: {} });
|
|
12420
12482
|
if (result.status === 200) {
|
|
12421
12483
|
return result.body;
|
|
12422
12484
|
}
|
|
@@ -12424,8 +12486,8 @@ async function initTeamsFileUpload(body) {
|
|
|
12424
12486
|
}
|
|
12425
12487
|
async function completeTeamsFileUpload(body) {
|
|
12426
12488
|
const config = await getClientConfig();
|
|
12427
|
-
const
|
|
12428
|
-
const result = await
|
|
12489
|
+
const client2 = initClient(integrationsTeamsUploadCompleteContract, config);
|
|
12490
|
+
const result = await client2.complete({ body, headers: {} });
|
|
12429
12491
|
if (result.status === 200) {
|
|
12430
12492
|
return result.body;
|
|
12431
12493
|
}
|
|
@@ -12484,8 +12546,8 @@ import { Readable as Readable4 } from "stream";
|
|
|
12484
12546
|
import { pipeline as pipeline4 } from "stream/promises";
|
|
12485
12547
|
async function sendFeishuMessage(body) {
|
|
12486
12548
|
const config = await getClientConfig();
|
|
12487
|
-
const
|
|
12488
|
-
const result = await
|
|
12549
|
+
const client2 = initClient(integrationsFeishuMessageContract, config);
|
|
12550
|
+
const result = await client2.sendMessage({ body, headers: {} });
|
|
12489
12551
|
if (result.status === 200) {
|
|
12490
12552
|
return result.body;
|
|
12491
12553
|
}
|
|
@@ -12493,8 +12555,8 @@ async function sendFeishuMessage(body) {
|
|
|
12493
12555
|
}
|
|
12494
12556
|
async function initFeishuFileUpload(body) {
|
|
12495
12557
|
const config = await getClientConfig();
|
|
12496
|
-
const
|
|
12497
|
-
const result = await
|
|
12558
|
+
const client2 = initClient(integrationsFeishuUploadInitContract, config);
|
|
12559
|
+
const result = await client2.init({ body, headers: {} });
|
|
12498
12560
|
if (result.status === 200) {
|
|
12499
12561
|
return result.body;
|
|
12500
12562
|
}
|
|
@@ -12502,8 +12564,8 @@ async function initFeishuFileUpload(body) {
|
|
|
12502
12564
|
}
|
|
12503
12565
|
async function completeFeishuFileUpload(body) {
|
|
12504
12566
|
const config = await getClientConfig();
|
|
12505
|
-
const
|
|
12506
|
-
const result = await
|
|
12567
|
+
const client2 = initClient(integrationsFeishuUploadCompleteContract, config);
|
|
12568
|
+
const result = await client2.complete({ body, headers: {} });
|
|
12507
12569
|
if (result.status === 200) {
|
|
12508
12570
|
return result.body;
|
|
12509
12571
|
}
|
|
@@ -12571,8 +12633,8 @@ import { Readable as Readable5 } from "stream";
|
|
|
12571
12633
|
import { pipeline as pipeline5 } from "stream/promises";
|
|
12572
12634
|
async function initGithubFileUpload(body) {
|
|
12573
12635
|
const config = await getClientConfig();
|
|
12574
|
-
const
|
|
12575
|
-
const result = await
|
|
12636
|
+
const client2 = initClient(integrationsGithubUploadInitContract, config);
|
|
12637
|
+
const result = await client2.init({ body, headers: {} });
|
|
12576
12638
|
if (result.status === 200) {
|
|
12577
12639
|
return result.body;
|
|
12578
12640
|
}
|
|
@@ -12580,8 +12642,8 @@ async function initGithubFileUpload(body) {
|
|
|
12580
12642
|
}
|
|
12581
12643
|
async function completeGithubFileUpload(body) {
|
|
12582
12644
|
const config = await getClientConfig();
|
|
12583
|
-
const
|
|
12584
|
-
const result = await
|
|
12645
|
+
const client2 = initClient(integrationsGithubUploadCompleteContract, config);
|
|
12646
|
+
const result = await client2.complete({ body, headers: {} });
|
|
12585
12647
|
if (result.status === 200) {
|
|
12586
12648
|
return result.body;
|
|
12587
12649
|
}
|
|
@@ -12643,8 +12705,8 @@ import { Readable as Readable6 } from "stream";
|
|
|
12643
12705
|
import { pipeline as pipeline6 } from "stream/promises";
|
|
12644
12706
|
async function sendPhoneMessage(body) {
|
|
12645
12707
|
const config = await getClientConfig();
|
|
12646
|
-
const
|
|
12647
|
-
const result = await
|
|
12708
|
+
const client2 = initClient(integrationsPhoneMessageContract, config);
|
|
12709
|
+
const result = await client2.sendMessage({ body, headers: {} });
|
|
12648
12710
|
if (result.status === 200) {
|
|
12649
12711
|
return result.body;
|
|
12650
12712
|
}
|
|
@@ -12652,8 +12714,8 @@ async function sendPhoneMessage(body) {
|
|
|
12652
12714
|
}
|
|
12653
12715
|
async function initPhoneFileUpload(body) {
|
|
12654
12716
|
const config = await getClientConfig();
|
|
12655
|
-
const
|
|
12656
|
-
const result = await
|
|
12717
|
+
const client2 = initClient(integrationsPhoneUploadInitContract, config);
|
|
12718
|
+
const result = await client2.init({ body, headers: {} });
|
|
12657
12719
|
if (result.status === 200) {
|
|
12658
12720
|
return result.body;
|
|
12659
12721
|
}
|
|
@@ -12661,8 +12723,8 @@ async function initPhoneFileUpload(body) {
|
|
|
12661
12723
|
}
|
|
12662
12724
|
async function completePhoneFileUpload(body) {
|
|
12663
12725
|
const config = await getClientConfig();
|
|
12664
|
-
const
|
|
12665
|
-
const result = await
|
|
12726
|
+
const client2 = initClient(integrationsPhoneUploadCompleteContract, config);
|
|
12727
|
+
const result = await client2.complete({ body, headers: {} });
|
|
12666
12728
|
if (result.status === 200) {
|
|
12667
12729
|
return result.body;
|
|
12668
12730
|
}
|
|
@@ -12718,8 +12780,8 @@ async function downloadPhoneFile(fileId, outPath) {
|
|
|
12718
12780
|
init_esm_shims();
|
|
12719
12781
|
async function listZeroLogs(options) {
|
|
12720
12782
|
const config = await getClientConfig();
|
|
12721
|
-
const
|
|
12722
|
-
const result = await
|
|
12783
|
+
const client2 = initClient(logsListContract, config);
|
|
12784
|
+
const result = await client2.list({
|
|
12723
12785
|
query: {
|
|
12724
12786
|
agentId: options?.agentId,
|
|
12725
12787
|
status: options?.status,
|
|
@@ -12733,8 +12795,8 @@ async function listZeroLogs(options) {
|
|
|
12733
12795
|
}
|
|
12734
12796
|
async function searchZeroLogs(options) {
|
|
12735
12797
|
const config = await getClientConfig();
|
|
12736
|
-
const
|
|
12737
|
-
const result = await
|
|
12798
|
+
const client2 = initClient(zeroLogsSearchContract, config);
|
|
12799
|
+
const result = await client2.searchLogs({
|
|
12738
12800
|
query: {
|
|
12739
12801
|
keyword: options.keyword,
|
|
12740
12802
|
agentId: options.agentId,
|
|
@@ -12998,6 +13060,14 @@ export {
|
|
|
12998
13060
|
createComputerUseAuthorizationRequest,
|
|
12999
13061
|
fetchComputerUseScreenshot,
|
|
13000
13062
|
fetchComputerUsePluginContent,
|
|
13063
|
+
ZERO_BROWSER_DEFAULT_TIMEOUT_MINUTES,
|
|
13064
|
+
ZERO_BROWSER_MAX_TIMEOUT_MINUTES,
|
|
13065
|
+
ZERO_BROWSER_DEFAULT_MAX_CREDITS,
|
|
13066
|
+
ZERO_BROWSER_MAX_CREDITS,
|
|
13067
|
+
zeroBrowserCreateRequestSchema,
|
|
13068
|
+
createZeroBrowser,
|
|
13069
|
+
resumeZeroBrowser,
|
|
13070
|
+
getCurrentZeroBrowser,
|
|
13001
13071
|
callZeroMaps,
|
|
13002
13072
|
callZeroWeather,
|
|
13003
13073
|
zeroScrapeFormatSchema,
|
|
@@ -13032,4 +13102,4 @@ export {
|
|
|
13032
13102
|
getHostedSiteFiles,
|
|
13033
13103
|
getHostedSiteDeployments
|
|
13034
13104
|
};
|
|
13035
|
-
//# sourceMappingURL=chunk-
|
|
13105
|
+
//# sourceMappingURL=chunk-MDKQRZ7S.js.map
|