deepline 0.3.466 → 0.3.467
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/dist/bundling-sources/sdk/src/client-core.ts +41 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +325 -44
- package/dist/bundling-sources/shared_libs/plays/field-catalog.ts +15 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +51 -6
- package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +37 -1
- package/dist/cli/{auth-HYIPYSKK.mjs → auth-7H62VDZD.mjs} +5 -5
- package/dist/cli/auth-EXW5E3DI.js +41 -0
- package/dist/cli/{billing-5S6SGBUP.mjs → billing-6TM3ZXDR.mjs} +44 -6
- package/dist/cli/{billing-NG62QGPT.js → billing-N5BNGGYN.js} +115 -77
- package/dist/cli/{chunk-7YDN6AEK.mjs → chunk-3RGWTKK3.mjs} +10 -0
- package/dist/cli/{chunk-A7MWUG5H.js → chunk-3ZGSR6X7.js} +1 -1
- package/dist/cli/{chunk-7IWYO475.js → chunk-42AW4SQR.js} +21 -21
- package/dist/cli/{chunk-7QITO7XO.mjs → chunk-4LTQYDZG.mjs} +4 -4
- package/dist/cli/{chunk-SQFBLBYC.mjs → chunk-5RXKAXFD.mjs} +2 -2
- package/dist/cli/{chunk-WKOWXTDR.mjs → chunk-6UZ4MRWN.mjs} +2 -2
- package/dist/cli/{chunk-RGRSUMN6.js → chunk-7Y53LJLE.js} +5 -5
- package/dist/cli/{chunk-B7BNWOG6.js → chunk-7ZZWOJTM.js} +3 -3
- package/dist/cli/{chunk-EOKUL6XS.js → chunk-AD5BZUAP.js} +5 -5
- package/dist/cli/{chunk-YHPUJI7G.mjs → chunk-AU4BWQTT.mjs} +5 -5
- package/dist/cli/{chunk-IEQPOBTK.mjs → chunk-AUVEQ3JX.mjs} +1 -1
- package/dist/cli/{chunk-QWMXP2IP.mjs → chunk-C4GBOGTW.mjs} +2 -2
- package/dist/cli/{chunk-3DVJ2IPG.js → chunk-C6EGT3LO.js} +183 -173
- package/dist/cli/{chunk-W4XWGNW4.mjs → chunk-CER3XHT3.mjs} +3 -3
- package/dist/cli/{chunk-VSEKVRAP.mjs → chunk-DCDTCG2D.mjs} +2 -2
- package/dist/cli/{chunk-R2SQN2CD.js → chunk-FFOAOQ77.js} +6 -6
- package/dist/cli/{chunk-6R36QIG4.mjs → chunk-FP3DH46P.mjs} +4 -4
- package/dist/cli/{chunk-RCMT6AZ5.mjs → chunk-FQIGRZ52.mjs} +1 -1
- package/dist/cli/{chunk-4QJ63YHC.js → chunk-FRY76AFK.js} +8 -8
- package/dist/cli/{chunk-VVCMP45C.js → chunk-FS55YDCW.js} +3 -3
- package/dist/cli/{chunk-HOFXQYRF.js → chunk-FVA6XLRA.js} +7 -7
- package/dist/cli/{chunk-OGCAGZXO.mjs → chunk-FVYAEBGO.mjs} +23 -2
- package/dist/cli/{chunk-RSXOGXGX.mjs → chunk-G35HNL6P.mjs} +1 -1
- package/dist/cli/{chunk-MTH7WIE3.js → chunk-H3QDLCRT.js} +53 -53
- package/dist/cli/{chunk-HIMV32ZX.js → chunk-HNP5V5BN.js} +23 -2
- package/dist/cli/{chunk-UHAKSLL2.mjs → chunk-HTXQUA3V.mjs} +11 -1
- package/dist/cli/{chunk-QTTYIPFY.mjs → chunk-I3LWDZRN.mjs} +1 -1
- package/dist/cli/{chunk-22BKA2QL.js → chunk-KMYCHMZF.js} +26 -26
- package/dist/cli/{chunk-F6H74EFB.mjs → chunk-KUCUHRLC.mjs} +2 -2
- package/dist/cli/{chunk-LDEJ4NUP.js → chunk-LAMHSZ74.js} +13 -13
- package/dist/cli/{chunk-CMXFOZVG.js → chunk-LKVOV7PX.js} +258 -258
- package/dist/cli/{chunk-OB5NON4G.js → chunk-MGUQGKHE.js} +8 -8
- package/dist/cli/{chunk-JLE5UYZV.mjs → chunk-MRBDFPJ7.mjs} +2 -2
- package/dist/cli/{chunk-JLZKF7EY.js → chunk-NPZBE64X.js} +11 -1
- package/dist/cli/{chunk-NJ6KQLMO.mjs → chunk-NU64F53H.mjs} +11 -11
- package/dist/cli/{chunk-V27TVT7P.mjs → chunk-OSKGEBE7.mjs} +1 -1
- package/dist/cli/{chunk-H5MYPDO2.mjs → chunk-R5ZJICJA.mjs} +1 -1
- package/dist/cli/{chunk-6CYRIFZ3.mjs → chunk-RH6DVPGW.mjs} +2 -2
- package/dist/cli/{chunk-NQH7E3F2.js → chunk-SHGBHP6J.js} +3 -3
- package/dist/cli/{chunk-5EUJKY3G.mjs → chunk-SYLR33PS.mjs} +3 -3
- package/dist/cli/{chunk-L3U44YVO.js → chunk-T5GRG37B.js} +5 -5
- package/dist/cli/{chunk-FWHRCZET.mjs → chunk-TNAXVJEG.mjs} +5 -5
- package/dist/cli/{chunk-6P4OYABU.js → chunk-V6OMS7E2.js} +6 -6
- package/dist/cli/{chunk-QMHBWFU5.mjs → chunk-VGWH3BFC.mjs} +1 -1
- package/dist/cli/{chunk-5BEKJUOK.js → chunk-VOPKDTJT.js} +2 -2
- package/dist/cli/{chunk-ZBWKWMSH.js → chunk-WBYC7AYC.js} +16 -16
- package/dist/cli/{chunk-RRCVAVM7.js → chunk-WGMNXDRZ.js} +2 -2
- package/dist/cli/{chunk-46YQQOTC.mjs → chunk-WISHPL5Q.mjs} +5 -5
- package/dist/cli/{chunk-QZKSG7XZ.js → chunk-WS2BY2ST.js} +36 -36
- package/dist/cli/{chunk-PEUWKPY4.js → chunk-WTVTCSPY.js} +4 -4
- package/dist/cli/{chunk-MUQAKLBP.mjs → chunk-X3RAGNNZ.mjs} +1 -1
- package/dist/cli/{chunk-I2TCWIW2.mjs → chunk-XSX6TJUA.mjs} +1 -1
- package/dist/cli/{chunk-NYNNNOJW.js → chunk-YIJS7ET7.js} +51 -51
- package/dist/cli/{chunk-SWUSDFG2.js → chunk-ZTA4JIAB.js} +9 -9
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-ZGZX2IIP.mjs → csv-435JAJ45.mjs} +4 -4
- package/dist/cli/{csv-AD2DLLLL.js → csv-BPZ4VLR6.js} +13 -13
- package/dist/cli/{db-NBY4LHAY.js → db-EBR2UQK3.js} +27 -27
- package/dist/cli/{db-LUFEKPEK.mjs → db-IEUTNOOC.mjs} +6 -6
- package/dist/cli/describe-EPT52IUE.js +48 -0
- package/dist/cli/{describe-MLXMC47U.mjs → describe-GM233O75.mjs} +20 -20
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-HDJMKNBR.js → executions-5SWPQTLB.js} +8 -8
- package/dist/cli/{executions-JKVWM3P4.mjs → executions-LDPBVSKZ.mjs} +6 -6
- package/dist/cli/{feedback-7E5Z4ZO5.mjs → feedback-JB7BBF64.mjs} +4 -4
- package/dist/cli/{feedback-VXMP7HDF.js → feedback-YFW5KT36.js} +8 -8
- package/dist/cli/git-7L7LKOKW.js +25 -0
- package/dist/cli/{git-UFMRAGMY.mjs → git-MCGUPO2W.mjs} +5 -5
- package/dist/cli/index.js +139 -139
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-BDULCVGD.mjs → legacy-noops-EHNXHQL7.mjs} +5 -5
- package/dist/cli/{legacy-noops-4QKREY4K.js → legacy-noops-LMGSIBWM.js} +8 -8
- package/dist/cli/{monitors-S6TDJYCK.mjs → monitors-355EWLGN.mjs} +7 -7
- package/dist/cli/{monitors-LNNSTELC.js → monitors-VRQ32EAA.js} +91 -91
- package/dist/cli/{org-EEEMWKQ2.mjs → org-MJ6XMAI4.mjs} +51 -10
- package/dist/cli/{org-OWM3IGOK.js → org-W3YZN65W.js} +113 -72
- package/dist/cli/{pages-ZYYMQUDX.mjs → pages-62QNUXV2.mjs} +6 -6
- package/dist/cli/{pages-7JF6AKDI.js → pages-JPK6UVMV.js} +17 -17
- package/dist/cli/{play-5Z3E7KL6.mjs → play-CKBPES6Q.mjs} +18 -18
- package/dist/cli/{play-WLAFXAHR.js → play-WPPJQBBS.js} +305 -305
- package/dist/cli/{providers-TTDFQQU2.js → providers-DH5JJ5HN.js} +9 -9
- package/dist/cli/{providers-JUT7IYD3.mjs → providers-LLPKHVXL.mjs} +6 -6
- package/dist/cli/{quickstart-P4TL4NWJ.mjs → quickstart-K5HVPO2L.mjs} +4 -4
- package/dist/cli/{quickstart-OZYEGICI.js → quickstart-NNEF37EG.js} +6 -6
- package/dist/cli/{run-BYGE4LUB.js → run-N2KY2VNQ.js} +40 -40
- package/dist/cli/{run-CM6OZUBR.mjs → run-SKIZFJ5O.mjs} +25 -25
- package/dist/cli/{search-RZRJ73YL.mjs → search-2WXJ3GID.mjs} +7 -7
- package/dist/cli/search-HO7ARG3H.js +32 -0
- package/dist/cli/{secrets-XLTN3SCL.js → secrets-5YVX7LK7.js} +15 -15
- package/dist/cli/{secrets-DHI6ZMKE.mjs → secrets-6GEQ75OU.mjs} +6 -6
- package/dist/cli/{sessions-MZD5WZBT.mjs → sessions-GOPZ3YRN.mjs} +5 -5
- package/dist/cli/{sessions-6NCQQXVK.js → sessions-H3QES7C2.js} +6 -6
- package/dist/cli/{settings-JJH72W5V.js → settings-62SU5ROV.js} +78 -78
- package/dist/cli/{settings-S6GQ4XFZ.mjs → settings-IP47HYC6.mjs} +11 -11
- package/dist/cli/{setup-ZJ4G54XN.mjs → setup-LCKXUSW5.mjs} +9 -9
- package/dist/cli/{setup-3BIOG6N2.js → setup-YCCU7TU4.js} +44 -44
- package/dist/cli/{skills-FBH4REPB.mjs → skills-3QAQI6X7.mjs} +7 -7
- package/dist/cli/skills-UVAIKQNC.js +31 -0
- package/dist/cli/{tools-J6YGZTD5.mjs → tools-HKD4G6HA.mjs} +18 -18
- package/dist/cli/tools-KAIUUBTD.js +55 -0
- package/dist/cli/{update-6CSRALIQ.mjs → update-2VYSBSDD.mjs} +9 -9
- package/dist/cli/update-Q3AMECAG.js +33 -0
- package/dist/cli/{workflow-3ATSB7HQ.mjs → workflow-EFRGY6JD.mjs} +7 -7
- package/dist/cli/{workflow-2ETKYSJV.js → workflow-MMWGUSGY.js} +17 -17
- package/dist/{client-BClp2yrq.d.ts → client-BOEAXwJj.d.ts} +1 -1
- package/dist/{client-ADFHNtFM.d.mts → client-DL0koOaP.d.mts} +1 -1
- package/dist/{client-core-BFU73Ttw.d.ts → client-core-BX_8khUY.d.ts} +23 -1
- package/dist/{client-core-DWLmmJWo.d.mts → client-core-CowyuxKu.d.mts} +23 -1
- package/dist/{compiler-manifest-Cs17yO-H.d.ts → compiler-manifest-D5dARg3M.d.mts} +64 -10
- package/dist/{compiler-manifest-Cs17yO-H.d.mts → compiler-manifest-D5dARg3M.d.ts} +64 -10
- package/dist/{errors-Dee-QpVS.d.ts → errors-BtHHzWL8.d.ts} +1 -1
- package/dist/{errors-qNfvQuRB.d.mts → errors-BveMVPwA.d.mts} +1 -1
- package/dist/{index-BTqNNXmC.d.mts → index-BboApDGD.d.mts} +1 -1
- package/dist/{index-DXTh1Lxe.d.ts → index-C6sovoYP.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +277 -76
- package/dist/index.mjs +239 -38
- package/dist/install-integrity.json +114 -114
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-Y3UTWD3W.js +0 -41
- package/dist/cli/describe-Z66CQESH.js +0 -48
- package/dist/cli/git-NNSJKW3V.js +0 -25
- package/dist/cli/search-RIG4LTCS.js +0 -32
- package/dist/cli/skills-ODISCL7S.js +0 -31
- package/dist/cli/tools-IHBHDI4P.js +0 -55
- package/dist/cli/update-5O3HDR5O.js +0 -33
|
@@ -26,7 +26,7 @@ var _chunkNMU3VR5Ujs = require('./chunk-NMU3VR5U.js');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkWTVTCSPYjs = require('./chunk-WTVTCSPY.js');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
|
|
@@ -647,7 +647,7 @@ var ToolCalls = class {
|
|
|
647
647
|
idempotencyKey,
|
|
648
648
|
onResponse: (response2) => {
|
|
649
649
|
lastResponse = null;
|
|
650
|
-
atomicToolsSupported = response2.headers.get(
|
|
650
|
+
atomicToolsSupported = response2.headers.get(_chunkWTVTCSPYjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
651
651
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
652
652
|
if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
|
|
653
653
|
try {
|
|
@@ -1026,8 +1026,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
const receivers = _optionalChain([env, 'access', _52 => _52.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]);
|
|
1028
1028
|
return {
|
|
1029
|
-
[
|
|
1030
|
-
...receivers ? { [
|
|
1029
|
+
[_chunkWTVTCSPYjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1030
|
+
...receivers ? { [_chunkWTVTCSPYjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1031
1031
|
};
|
|
1032
1032
|
}
|
|
1033
1033
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1098,7 +1098,7 @@ var PlayClient = class {
|
|
|
1098
1098
|
return _chunkJKVRBCZLjs.startPlayRun.call(void 0,
|
|
1099
1099
|
this.http,
|
|
1100
1100
|
resolved.request,
|
|
1101
|
-
_optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1101
|
+
_optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkWTVTCSPYjs.SDK_API_MAJOR) } : headers,
|
|
1102
1102
|
options
|
|
1103
1103
|
);
|
|
1104
1104
|
}
|
|
@@ -3175,7 +3175,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3175
3175
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3176
3176
|
);
|
|
3177
3177
|
}
|
|
3178
|
-
return { [
|
|
3178
|
+
return { [_chunkWTVTCSPYjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3179
3179
|
}
|
|
3180
3180
|
function sleep(ms) {
|
|
3181
3181
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -3462,6 +3462,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3462
3462
|
this.billing = {
|
|
3463
3463
|
quote: (input) => this.http.post("/api/v2/billing/quote", input),
|
|
3464
3464
|
entitlements: () => this.http.get("/api/v2/billing/entitlements"),
|
|
3465
|
+
includedCompute: () => this.http.get("/api/v2/billing/included-compute"),
|
|
3466
|
+
enableIncludedCompute: () => this.http.post("/api/v2/billing/included-compute", {}),
|
|
3465
3467
|
topUp: (options) => this.topUpBillingBalance(options),
|
|
3466
3468
|
topUpWithReceipt: (options) => this.topUpBillingBalanceWithReceipt(options),
|
|
3467
3469
|
plans: () => this.getBillingPlans(),
|
|
@@ -3496,6 +3498,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3496
3498
|
portalSession: (options) => this.createTargetBillingPortalSession(options)
|
|
3497
3499
|
};
|
|
3498
3500
|
this.workspaces = {
|
|
3501
|
+
members: (options) => {
|
|
3502
|
+
const query = _optionalChain([options, 'optionalAccess', _152 => _152.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
|
|
3503
|
+
return this.http.get(`/api/v2/auth/workspace/members${query}`);
|
|
3504
|
+
},
|
|
3505
|
+
setMemberGrants: (memberId, grants) => this.http.patch(
|
|
3506
|
+
`/api/v2/auth/workspace/members/${encodeURIComponent(memberId)}/role`,
|
|
3507
|
+
{ role: grants.join(",") }
|
|
3508
|
+
),
|
|
3499
3509
|
create: (options) => this.createWorkspace(options)
|
|
3500
3510
|
};
|
|
3501
3511
|
this.monitors = {
|
|
@@ -3504,7 +3514,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3504
3514
|
check: (definition) => this.checkMonitor(definition),
|
|
3505
3515
|
preview: (definition, options) => this.previewMonitor(definition, options),
|
|
3506
3516
|
deploy: (definition, options) => this.deployMonitor(definition, options),
|
|
3507
|
-
sync: (definition, options) => _optionalChain([options, 'optionalAccess',
|
|
3517
|
+
sync: (definition, options) => _optionalChain([options, 'optionalAccess', _153 => _153.dryRun]) ? this.deployMonitor(definition, { dryRun: true }) : this.syncScalarMonitor(definition, options),
|
|
3508
3518
|
list: (options) => this.listMonitors(options),
|
|
3509
3519
|
get: (key) => this.getMonitor(key),
|
|
3510
3520
|
test: (key, payload, options) => this.testMonitorWebhook(key, payload, options),
|
|
@@ -3513,13 +3523,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3513
3523
|
update: (key, patch) => this.updateMonitor(key, patch),
|
|
3514
3524
|
delete: (key, options) => this.deleteMonitor(key, options),
|
|
3515
3525
|
reactivate: (key, options) => this.reactivateMonitor(key, options),
|
|
3516
|
-
start: (key, options) => _optionalChain([options, 'optionalAccess',
|
|
3526
|
+
start: (key, options) => _optionalChain([options, 'optionalAccess', _154 => _154.dryRun]) ? this.submitMonitorBatch({
|
|
3517
3527
|
kind: "reactivate",
|
|
3518
3528
|
scope: { kind: "keys", monitorKeys: [key] },
|
|
3519
3529
|
dryRun: true,
|
|
3520
3530
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( this.monitorJobIdempotencyKey(`start-${key}`)))
|
|
3521
3531
|
}) : this.submitScalarMonitorLifecycle(key, "start", options),
|
|
3522
|
-
stop: (key, options) => _optionalChain([options, 'optionalAccess',
|
|
3532
|
+
stop: (key, options) => _optionalChain([options, 'optionalAccess', _155 => _155.dryRun]) ? this.submitMonitorBatch({
|
|
3523
3533
|
kind: "deactivate",
|
|
3524
3534
|
scope: { kind: "keys", monitorKeys: [key] },
|
|
3525
3535
|
dryRun: true,
|
|
@@ -3568,8 +3578,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3568
3578
|
/** List this workspace's hosted pages, newest update first. */
|
|
3569
3579
|
async listPages(input) {
|
|
3570
3580
|
const params = new URLSearchParams();
|
|
3571
|
-
if (_optionalChain([input, 'optionalAccess',
|
|
3572
|
-
if (_optionalChain([input, 'optionalAccess',
|
|
3581
|
+
if (_optionalChain([input, 'optionalAccess', _156 => _156.cursor])) params.set("cursor", input.cursor);
|
|
3582
|
+
if (_optionalChain([input, 'optionalAccess', _157 => _157.limit])) params.set("limit", String(input.limit));
|
|
3573
3583
|
const query = params.size > 0 ? `?${params}` : "";
|
|
3574
3584
|
return await this.http.get(`/api/v2/pages${query}`);
|
|
3575
3585
|
}
|
|
@@ -3685,17 +3695,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3685
3695
|
*/
|
|
3686
3696
|
async listTools(options) {
|
|
3687
3697
|
const params = new URLSearchParams();
|
|
3688
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3698
|
+
if (_optionalChain([options, 'optionalAccess', _158 => _158.categories, 'optionalAccess', _159 => _159.trim, 'call', _160 => _160()])) {
|
|
3689
3699
|
params.set("categories", options.categories.trim());
|
|
3690
3700
|
}
|
|
3691
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3701
|
+
if (_optionalChain([options, 'optionalAccess', _161 => _161.tags, 'optionalAccess', _162 => _162.trim, 'call', _163 => _163()])) {
|
|
3692
3702
|
params.set("tags", options.tags.trim());
|
|
3693
3703
|
}
|
|
3694
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3704
|
+
if (_optionalChain([options, 'optionalAccess', _164 => _164.grep, 'optionalAccess', _165 => _165.trim, 'call', _166 => _166()])) {
|
|
3695
3705
|
params.set("grep", options.grep.trim());
|
|
3696
3706
|
params.set("grep_mode", _nullishCoalesce(options.grepMode, () => ( "all")));
|
|
3697
3707
|
}
|
|
3698
|
-
params.set("compact", _optionalChain([options, 'optionalAccess',
|
|
3708
|
+
params.set("compact", _optionalChain([options, 'optionalAccess', _167 => _167.compact]) === true ? "true" : "false");
|
|
3699
3709
|
const suffix = params.toString() ? `?${params.toString()}` : "";
|
|
3700
3710
|
const res = await this.http.get(
|
|
3701
3711
|
`/api/v2/tools${suffix}`
|
|
@@ -3728,7 +3738,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3728
3738
|
const params = new URLSearchParams({
|
|
3729
3739
|
view: "category",
|
|
3730
3740
|
categories: normalizedCategory,
|
|
3731
|
-
compact: _optionalChain([options, 'optionalAccess',
|
|
3741
|
+
compact: _optionalChain([options, 'optionalAccess', _168 => _168.compact]) === true ? "true" : "false"
|
|
3732
3742
|
});
|
|
3733
3743
|
const response = await this.http.get(
|
|
3734
3744
|
`/api/v2/tools?${params}`
|
|
@@ -3743,7 +3753,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3743
3753
|
}
|
|
3744
3754
|
/** List discoverable providers without requiring a local plugin catalog. */
|
|
3745
3755
|
async listProviders(options) {
|
|
3746
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
3756
|
+
const suffix = _optionalChain([options, 'optionalAccess', _169 => _169.changed]) ? "?changed=true" : "";
|
|
3747
3757
|
const res = await this.http.get(
|
|
3748
3758
|
`/api/v2/tools/providers${suffix}`
|
|
3749
3759
|
);
|
|
@@ -3774,8 +3784,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3774
3784
|
*/
|
|
3775
3785
|
async search(options = {}) {
|
|
3776
3786
|
const params = searchParams(options);
|
|
3777
|
-
if (_optionalChain([options, 'access',
|
|
3778
|
-
if (_optionalChain([options, 'access',
|
|
3787
|
+
if (_optionalChain([options, 'access', _170 => _170.types, 'optionalAccess', _171 => _171.length])) params.set("types", options.types.join(","));
|
|
3788
|
+
if (_optionalChain([options, 'access', _172 => _172.exclude, 'optionalAccess', _173 => _173.length])) {
|
|
3779
3789
|
params.set("exclude", options.exclude.join(","));
|
|
3780
3790
|
}
|
|
3781
3791
|
return this.http.get(`/api/v2/search?${params.toString()}`);
|
|
@@ -3797,7 +3807,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3797
3807
|
* ```
|
|
3798
3808
|
*/
|
|
3799
3809
|
async getTool(toolId, options) {
|
|
3800
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3810
|
+
if (_optionalChain([options, 'optionalAccess', _174 => _174.cliInvocationId]) !== void 0) {
|
|
3801
3811
|
validateCliInvocationId(options.cliInvocationId);
|
|
3802
3812
|
}
|
|
3803
3813
|
return this.http.request(
|
|
@@ -3810,7 +3820,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3810
3820
|
retryApiErrors: true,
|
|
3811
3821
|
headers: {
|
|
3812
3822
|
"x-deepline-tool-meta-only": "1",
|
|
3813
|
-
..._optionalChain([options, 'optionalAccess',
|
|
3823
|
+
..._optionalChain([options, 'optionalAccess', _175 => _175.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
|
|
3814
3824
|
}
|
|
3815
3825
|
}
|
|
3816
3826
|
);
|
|
@@ -3901,7 +3911,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3901
3911
|
return this.http.post(
|
|
3902
3912
|
"/api/v2/ingestion/repair",
|
|
3903
3913
|
{
|
|
3904
|
-
..._optionalChain([input, 'optionalAccess',
|
|
3914
|
+
..._optionalChain([input, 'optionalAccess', _176 => _176.provider]) ? { provider: input.provider } : {}
|
|
3905
3915
|
}
|
|
3906
3916
|
);
|
|
3907
3917
|
}
|
|
@@ -3956,7 +3966,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3956
3966
|
const prepared = await _chunkJKVRBCZLjs.preparePlayRunAdmission.call(void 0,
|
|
3957
3967
|
this.http,
|
|
3958
3968
|
resolved.request,
|
|
3959
|
-
_optionalChain([options, 'optionalAccess',
|
|
3969
|
+
_optionalChain([options, 'optionalAccess', _177 => _177.onSubmission])
|
|
3960
3970
|
);
|
|
3961
3971
|
const bodyJson = JSON.stringify(prepared.body);
|
|
3962
3972
|
const headers = runtimeSelectionHeaders(resolved.runtime, this.environment);
|
|
@@ -3979,19 +3989,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3979
3989
|
);
|
|
3980
3990
|
}
|
|
3981
3991
|
submitted = true;
|
|
3982
|
-
const streamPath = _optionalChain([options, 'optionalAccess',
|
|
3992
|
+
const streamPath = _optionalChain([options, 'optionalAccess', _178 => _178.cliAdmission]) ? _chunkJKVRBCZLjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkJKVRBCZLjs.PLAY_RUN_START_STREAM_PATH;
|
|
3983
3993
|
try {
|
|
3984
3994
|
for await (const event of http.streamSse(streamPath, {
|
|
3985
3995
|
method: "POST",
|
|
3986
3996
|
body: JSON.parse(bodyJson),
|
|
3987
3997
|
headers,
|
|
3988
|
-
signal: _optionalChain([streamOptions, 'optionalAccess',
|
|
3998
|
+
signal: _optionalChain([streamOptions, 'optionalAccess', _179 => _179.signal]),
|
|
3989
3999
|
exactUrlOnly: true
|
|
3990
4000
|
})) {
|
|
3991
4001
|
if (event.scope === "play") yield event;
|
|
3992
4002
|
}
|
|
3993
4003
|
} catch (error) {
|
|
3994
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4004
|
+
if (_optionalChain([options, 'optionalAccess', _180 => _180.cliAdmission]) && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
3995
4005
|
throw new (0, _chunkJKVRBCZLjs.CliPlayAdmissionUnsupportedError)(error.statusCode);
|
|
3996
4006
|
}
|
|
3997
4007
|
throw error;
|
|
@@ -4014,7 +4024,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4014
4024
|
*/
|
|
4015
4025
|
async *startPlayRunStream(request, options) {
|
|
4016
4026
|
const prepared = await this.preparePlayRunAdmission(request, options);
|
|
4017
|
-
yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess',
|
|
4027
|
+
yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess', _181 => _181.signal]) });
|
|
4018
4028
|
}
|
|
4019
4029
|
/**
|
|
4020
4030
|
* Register a bundled play artifact.
|
|
@@ -4167,7 +4177,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4167
4177
|
compilerManifest,
|
|
4168
4178
|
...input.input ? { input: input.input } : {},
|
|
4169
4179
|
...input.inputFile ? { inputFile: input.inputFile } : {},
|
|
4170
|
-
..._optionalChain([input, 'access',
|
|
4180
|
+
..._optionalChain([input, 'access', _182 => _182.packagedFiles, 'optionalAccess', _183 => _183.length]) ? { packagedFiles: input.packagedFiles } : {},
|
|
4171
4181
|
...input.force ? { force: true } : {},
|
|
4172
4182
|
...input.forceToolRefresh ? { forceToolRefresh: true } : {}
|
|
4173
4183
|
});
|
|
@@ -4197,29 +4207,29 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4197
4207
|
* ```
|
|
4198
4208
|
*/
|
|
4199
4209
|
async submitPlay(code, csvPath, name, options) {
|
|
4200
|
-
const runtimeInput = _optionalChain([options, 'optionalAccess',
|
|
4210
|
+
const runtimeInput = _optionalChain([options, 'optionalAccess', _184 => _184.input]) ? { ...options.input } : {};
|
|
4201
4211
|
if (csvPath) {
|
|
4202
4212
|
runtimeInput.file = csvPath;
|
|
4203
4213
|
}
|
|
4204
|
-
const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4205
|
-
const artifact = _optionalChain([options, 'optionalAccess',
|
|
4206
|
-
if (!_optionalChain([name, 'optionalAccess',
|
|
4214
|
+
const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _185 => _185.sourceCode]), () => ( code));
|
|
4215
|
+
const artifact = _optionalChain([options, 'optionalAccess', _186 => _186.artifact]);
|
|
4216
|
+
if (!_optionalChain([name, 'optionalAccess', _187 => _187.trim, 'call', _188 => _188()])) {
|
|
4207
4217
|
throw new Error("submitPlay requires a play name.");
|
|
4208
4218
|
}
|
|
4209
4219
|
if (!artifact) {
|
|
4210
4220
|
throw new Error("submitPlay requires a bundled play artifact.");
|
|
4211
4221
|
}
|
|
4212
|
-
const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async
|
|
4222
|
+
const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _189 => _189.compilerManifest]), async () => ( await this.compilePlayManifest({
|
|
4213
4223
|
name,
|
|
4214
4224
|
sourceCode,
|
|
4215
|
-
sourceFiles: _optionalChain([options, 'optionalAccess',
|
|
4225
|
+
sourceFiles: _optionalChain([options, 'optionalAccess', _190 => _190.sourceFiles]),
|
|
4216
4226
|
artifact
|
|
4217
4227
|
})));
|
|
4218
4228
|
const registeredArtifact = await this.registerPlayArtifact({
|
|
4219
4229
|
name,
|
|
4220
4230
|
sourceCode,
|
|
4221
|
-
sourceFiles: _optionalChain([options, 'optionalAccess',
|
|
4222
|
-
description: _optionalChain([options, 'optionalAccess',
|
|
4231
|
+
sourceFiles: _optionalChain([options, 'optionalAccess', _191 => _191.sourceFiles]),
|
|
4232
|
+
description: _optionalChain([options, 'optionalAccess', _192 => _192.description]),
|
|
4223
4233
|
artifact,
|
|
4224
4234
|
compilerManifest,
|
|
4225
4235
|
publish: false
|
|
@@ -4233,17 +4243,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4233
4243
|
name,
|
|
4234
4244
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
4235
4245
|
sourceCode,
|
|
4236
|
-
description: _optionalChain([options, 'optionalAccess',
|
|
4246
|
+
description: _optionalChain([options, 'optionalAccess', _193 => _193.description]),
|
|
4237
4247
|
staticPipeline: _nullishCoalesce(registeredArtifact.staticPipeline, () => ( null)),
|
|
4238
4248
|
artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
|
|
4239
4249
|
graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
|
|
4240
4250
|
runtimeArtifact: artifact,
|
|
4241
4251
|
compilerManifest,
|
|
4242
4252
|
...Object.keys(runtimeInput).length > 0 ? { input: runtimeInput } : {},
|
|
4243
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4244
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4245
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4246
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4253
|
+
..._optionalChain([options, 'optionalAccess', _194 => _194.inputFile]) ? { inputFile: options.inputFile } : {},
|
|
4254
|
+
..._optionalChain([options, 'optionalAccess', _195 => _195.packagedFiles, 'optionalAccess', _196 => _196.length]) ? { packagedFiles: options.packagedFiles } : {},
|
|
4255
|
+
..._optionalChain([options, 'optionalAccess', _197 => _197.force]) ? { force: true } : {},
|
|
4256
|
+
..._optionalChain([options, 'optionalAccess', _198 => _198.forceToolRefresh]) ? { forceToolRefresh: true } : {}
|
|
4247
4257
|
});
|
|
4248
4258
|
}
|
|
4249
4259
|
/**
|
|
@@ -4319,13 +4329,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4319
4329
|
for await (const event of watchRunEvents({
|
|
4320
4330
|
http: this.http,
|
|
4321
4331
|
runId: workflowId,
|
|
4322
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4323
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4324
|
-
onRetry: _optionalChain([options, 'optionalAccess',
|
|
4325
|
-
deferLogs: _optionalChain([options, 'optionalAccess',
|
|
4326
|
-
omitTerminalLogs: _optionalChain([options, 'optionalAccess',
|
|
4327
|
-
onPoll: _optionalChain([options, 'optionalAccess',
|
|
4328
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4332
|
+
signal: _optionalChain([options, 'optionalAccess', _199 => _199.signal]),
|
|
4333
|
+
onNotice: _optionalChain([options, 'optionalAccess', _200 => _200.onNotice]),
|
|
4334
|
+
onRetry: _optionalChain([options, 'optionalAccess', _201 => _201.onRetry]),
|
|
4335
|
+
deferLogs: _optionalChain([options, 'optionalAccess', _202 => _202.deferLogs]),
|
|
4336
|
+
omitTerminalLogs: _optionalChain([options, 'optionalAccess', _203 => _203.omitTerminalLogs]),
|
|
4337
|
+
onPoll: _optionalChain([options, 'optionalAccess', _204 => _204.onPoll]),
|
|
4338
|
+
..._optionalChain([options, 'optionalAccess', _205 => _205.terminalStatus]) ? {
|
|
4329
4339
|
terminalStatus: {
|
|
4330
4340
|
...options.terminalStatus,
|
|
4331
4341
|
onStatus: async (raw, expectedStatus) => {
|
|
@@ -4335,7 +4345,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4335
4345
|
`Run watch returned a mismatched terminal status for ${workflowId}.`
|
|
4336
4346
|
);
|
|
4337
4347
|
}
|
|
4338
|
-
await _optionalChain([options, 'access',
|
|
4348
|
+
await _optionalChain([options, 'access', _206 => _206.terminalStatus, 'optionalAccess', _207 => _207.onStatus, 'call', _208 => _208(status)]);
|
|
4339
4349
|
}
|
|
4340
4350
|
}
|
|
4341
4351
|
} : {}
|
|
@@ -4350,12 +4360,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4350
4360
|
* @deprecated Use `watchRunEvents` for ordinary run watching.
|
|
4351
4361
|
*/
|
|
4352
4362
|
async *streamPlayRunEvents(workflowId, options) {
|
|
4353
|
-
const headers = _optionalChain([options, 'optionalAccess',
|
|
4363
|
+
const headers = _optionalChain([options, 'optionalAccess', _209 => _209.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
4354
4364
|
const params = new URLSearchParams();
|
|
4355
|
-
params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4365
|
+
params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _210 => _210.mode]), () => ( "cli")));
|
|
4356
4366
|
for await (const event of this.http.streamSse(
|
|
4357
4367
|
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
4358
|
-
{ signal: _optionalChain([options, 'optionalAccess',
|
|
4368
|
+
{ signal: _optionalChain([options, 'optionalAccess', _211 => _211.signal]), headers }
|
|
4359
4369
|
)) {
|
|
4360
4370
|
if (event.scope === "play") {
|
|
4361
4371
|
yield event;
|
|
@@ -4371,8 +4381,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4371
4381
|
*/
|
|
4372
4382
|
async *observeRunEvents(runId, options) {
|
|
4373
4383
|
yield* this.watchRunEvents(runId, {
|
|
4374
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4375
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4384
|
+
signal: _optionalChain([options, 'optionalAccess', _212 => _212.signal]),
|
|
4385
|
+
onNotice: _optionalChain([options, 'optionalAccess', _213 => _213.onNotice])
|
|
4376
4386
|
});
|
|
4377
4387
|
}
|
|
4378
4388
|
/** Poll snapshots to terminal status and return the durable package. */
|
|
@@ -4380,9 +4390,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4380
4390
|
let terminalObserved = false;
|
|
4381
4391
|
let terminalStatus = null;
|
|
4382
4392
|
for await (const event of this.watchRunEvents(runId, {
|
|
4383
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4384
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4385
|
-
onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4393
|
+
signal: _optionalChain([options, 'optionalAccess', _214 => _214.signal]),
|
|
4394
|
+
onNotice: _optionalChain([options, 'optionalAccess', _215 => _215.onNotice]),
|
|
4395
|
+
onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _216 => _216.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _217 => _217.onReconnect]))),
|
|
4386
4396
|
terminalStatus: {
|
|
4387
4397
|
runStatus: true,
|
|
4388
4398
|
onStatus: (status) => {
|
|
@@ -4390,12 +4400,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4390
4400
|
}
|
|
4391
4401
|
}
|
|
4392
4402
|
})) {
|
|
4393
|
-
_optionalChain([options, 'optionalAccess',
|
|
4403
|
+
_optionalChain([options, 'optionalAccess', _218 => _218.onEvent, 'optionalCall', _219 => _219(event)]);
|
|
4394
4404
|
if (_chunkJKVRBCZLjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
|
|
4395
4405
|
terminalObserved = true;
|
|
4396
4406
|
}
|
|
4397
4407
|
}
|
|
4398
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4408
|
+
if (_optionalChain([options, 'optionalAccess', _220 => _220.signal, 'optionalAccess', _221 => _221.aborted])) {
|
|
4399
4409
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
|
|
4400
4410
|
}
|
|
4401
4411
|
const refreshed = await _asyncNullishCoalesce(terminalStatus, async () => ( await this.getRunStatus(runId)));
|
|
@@ -4475,7 +4485,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4475
4485
|
/** List the org's workflows. `GET /api/v2/workflows`. */
|
|
4476
4486
|
async listWorkflows(options) {
|
|
4477
4487
|
const params = new URLSearchParams();
|
|
4478
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
4488
|
+
if (typeof _optionalChain([options, 'optionalAccess', _222 => _222.limit]) === "number") {
|
|
4479
4489
|
params.set("limit", String(options.limit));
|
|
4480
4490
|
}
|
|
4481
4491
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4528,7 +4538,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4528
4538
|
/** List a workflow's runs. `GET /api/v2/workflows/:id/runs`. */
|
|
4529
4539
|
async listWorkflowRuns(id, options) {
|
|
4530
4540
|
const params = new URLSearchParams();
|
|
4531
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
4541
|
+
if (typeof _optionalChain([options, 'optionalAccess', _223 => _223.limit]) === "number") {
|
|
4532
4542
|
params.set("limit", String(options.limit));
|
|
4533
4543
|
}
|
|
4534
4544
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4564,10 +4574,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4564
4574
|
*/
|
|
4565
4575
|
async getRunStatus(runId, options) {
|
|
4566
4576
|
const params = new URLSearchParams();
|
|
4567
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4577
|
+
if (_optionalChain([options, 'optionalAccess', _224 => _224.full]) === true) {
|
|
4568
4578
|
params.set("full", "true");
|
|
4569
4579
|
}
|
|
4570
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4580
|
+
if (_optionalChain([options, 'optionalAccess', _225 => _225.configuration]) === true) {
|
|
4571
4581
|
params.set("include", "configuration");
|
|
4572
4582
|
}
|
|
4573
4583
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4575,7 +4585,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4575
4585
|
`/api/v2/runs/${encodeURIComponent(runId)}${query}`,
|
|
4576
4586
|
{ headers: { "x-deepline-run-status": "1" } }
|
|
4577
4587
|
);
|
|
4578
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4588
|
+
if (_optionalChain([options, 'optionalAccess', _226 => _226.configuration]) === true && !Object.hasOwn(response, "contract")) {
|
|
4579
4589
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4580
4590
|
"This server does not support recorded configuration reads.",
|
|
4581
4591
|
void 0,
|
|
@@ -4583,7 +4593,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4583
4593
|
);
|
|
4584
4594
|
}
|
|
4585
4595
|
const status = normalizePlayStatus(response);
|
|
4586
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4596
|
+
if (_optionalChain([options, 'optionalAccess', _227 => _227.failedLogs]) !== true || status.status !== "failed") {
|
|
4587
4597
|
return status;
|
|
4588
4598
|
}
|
|
4589
4599
|
const requestedFailedLogLimit = typeof options.failedLogLimit === "number" && Number.isFinite(options.failedLogLimit) ? Math.max(1, Math.floor(options.failedLogLimit)) : RUNS_FAILED_LOG_LIMIT;
|
|
@@ -4672,7 +4682,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4672
4682
|
/** The same tenant-scoped run history searched by the dashboard and CLI. */
|
|
4673
4683
|
async getRunsHistory(options = {}) {
|
|
4674
4684
|
const params = new URLSearchParams();
|
|
4675
|
-
const search = _optionalChain([options, 'access',
|
|
4685
|
+
const search = _optionalChain([options, 'access', _228 => _228.search, 'optionalAccess', _229 => _229.trim, 'call', _230 => _230()]);
|
|
4676
4686
|
if (search && search.length > 200) {
|
|
4677
4687
|
throw new Error("Run search must be at most 200 characters.");
|
|
4678
4688
|
}
|
|
@@ -4698,16 +4708,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4698
4708
|
}
|
|
4699
4709
|
/** Read one run page without discarding server pagination metadata. */
|
|
4700
4710
|
async listRunsPage(options) {
|
|
4701
|
-
const playName = _optionalChain([options, 'access',
|
|
4711
|
+
const playName = _optionalChain([options, 'access', _231 => _231.play, 'optionalAccess', _232 => _232.trim, 'call', _233 => _233()]);
|
|
4702
4712
|
const params = new URLSearchParams();
|
|
4703
4713
|
if (playName) {
|
|
4704
4714
|
params.set("play", playName);
|
|
4705
4715
|
}
|
|
4706
|
-
const status = _optionalChain([options, 'access',
|
|
4716
|
+
const status = _optionalChain([options, 'access', _234 => _234.status, 'optionalAccess', _235 => _235.trim, 'call', _236 => _236()]);
|
|
4707
4717
|
if (status) {
|
|
4708
4718
|
params.set("status", status);
|
|
4709
4719
|
}
|
|
4710
|
-
const node = _optionalChain([options, 'access',
|
|
4720
|
+
const node = _optionalChain([options, 'access', _237 => _237.node, 'optionalAccess', _238 => _238.trim, 'call', _239 => _239()]);
|
|
4711
4721
|
if (node) {
|
|
4712
4722
|
if (!playName)
|
|
4713
4723
|
throw new Error("runs.list options.node requires options.play.");
|
|
@@ -4781,8 +4791,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4781
4791
|
* A different key starts another rerun.
|
|
4782
4792
|
*/
|
|
4783
4793
|
async rerun(runId, options) {
|
|
4784
|
-
const idempotencyKey = _optionalChain([options, 'optionalAccess',
|
|
4785
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4794
|
+
const idempotencyKey = _optionalChain([options, 'optionalAccess', _240 => _240.idempotencyKey, 'optionalAccess', _241 => _241.trim, 'call', _242 => _242()]);
|
|
4795
|
+
if (_optionalChain([options, 'optionalAccess', _243 => _243.idempotencyKey]) !== void 0 && !idempotencyKey) {
|
|
4786
4796
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4787
4797
|
"runs.rerun idempotencyKey must not be empty.",
|
|
4788
4798
|
void 0,
|
|
@@ -4791,7 +4801,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4791
4801
|
}
|
|
4792
4802
|
return this.http.post(
|
|
4793
4803
|
`/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
|
|
4794
|
-
_optionalChain([options, 'optionalAccess',
|
|
4804
|
+
_optionalChain([options, 'optionalAccess', _244 => _244.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
|
|
4795
4805
|
{ "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
|
|
4796
4806
|
);
|
|
4797
4807
|
}
|
|
@@ -4805,21 +4815,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4805
4815
|
* ```
|
|
4806
4816
|
*/
|
|
4807
4817
|
async getRunLogs(runId, options) {
|
|
4808
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4818
|
+
if (_optionalChain([options, 'optionalAccess', _245 => _245.all]) === true && options.failed === true) {
|
|
4809
4819
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4810
4820
|
"runs.logs cannot combine all and failed views.",
|
|
4811
4821
|
void 0,
|
|
4812
4822
|
"INVALID_RUN_LOG_VIEW"
|
|
4813
4823
|
);
|
|
4814
4824
|
}
|
|
4815
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4825
|
+
if (_optionalChain([options, 'optionalAccess', _246 => _246.cursor]) !== void 0 && options.failed === true) {
|
|
4816
4826
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4817
4827
|
"runs.logs cannot combine failed with cursor.",
|
|
4818
4828
|
void 0,
|
|
4819
4829
|
"INVALID_RUN_LOG_VIEW"
|
|
4820
4830
|
);
|
|
4821
4831
|
}
|
|
4822
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4832
|
+
if (_optionalChain([options, 'optionalAccess', _247 => _247.failed]) === true) {
|
|
4823
4833
|
const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
|
|
4824
4834
|
const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
|
|
4825
4835
|
const page = await this.http.get(
|
|
@@ -4844,18 +4854,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4844
4854
|
...page.logsTruncated ? { logsTruncated: true } : {}
|
|
4845
4855
|
};
|
|
4846
4856
|
}
|
|
4847
|
-
const beforeSequence = _optionalChain([options, 'optionalAccess',
|
|
4848
|
-
const limit = _optionalChain([options, 'optionalAccess',
|
|
4857
|
+
const beforeSequence = _optionalChain([options, 'optionalAccess', _248 => _248.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
|
|
4858
|
+
const limit = _optionalChain([options, 'optionalAccess', _249 => _249.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _250 => _250.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
|
|
4849
4859
|
const fetchPage = (afterSeq2, pageLimit) => this.http.get(
|
|
4850
4860
|
`/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
|
|
4851
4861
|
{ retryApiErrors: true }
|
|
4852
4862
|
);
|
|
4853
4863
|
const probe = await fetchPage(0, 1);
|
|
4854
4864
|
const lastStoredSeq = probe.lastStoredSeq;
|
|
4855
|
-
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access',
|
|
4865
|
+
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _251 => _251.entries, 'access', _252 => _252[0], 'optionalAccess', _253 => _253.seq]), () => ( null));
|
|
4856
4866
|
const upperSeq = beforeSequence === null ? lastStoredSeq : Math.min(beforeSequence - 1, lastStoredSeq);
|
|
4857
4867
|
const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
|
|
4858
|
-
let afterSeq = _optionalChain([options, 'optionalAccess',
|
|
4868
|
+
let afterSeq = _optionalChain([options, 'optionalAccess', _254 => _254.all]) ? 0 : Math.max(0, windowEndSeq - limit);
|
|
4859
4869
|
const entries = [];
|
|
4860
4870
|
while (entries.length < limit && afterSeq < upperSeq) {
|
|
4861
4871
|
const page = await fetchPage(
|
|
@@ -4889,7 +4899,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4889
4899
|
hasMore: olderLinesExist,
|
|
4890
4900
|
nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
|
|
4891
4901
|
entries: entries.map((entry) => entry.line),
|
|
4892
|
-
view: _optionalChain([options, 'optionalAccess',
|
|
4902
|
+
view: _optionalChain([options, 'optionalAccess', _255 => _255.all]) ? "all" : "tail",
|
|
4893
4903
|
...probe.logsTruncated ? { logsTruncated: true } : {}
|
|
4894
4904
|
};
|
|
4895
4905
|
}
|
|
@@ -5065,7 +5075,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5065
5075
|
limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
|
|
5066
5076
|
offset: String(_nullishCoalesce(input.offset, () => ( 0)))
|
|
5067
5077
|
});
|
|
5068
|
-
if (_optionalChain([input, 'access',
|
|
5078
|
+
if (_optionalChain([input, 'access', _256 => _256.runId, 'optionalAccess', _257 => _257.trim, 'call', _258 => _258()])) {
|
|
5069
5079
|
params.set("runId", input.runId.trim());
|
|
5070
5080
|
}
|
|
5071
5081
|
if (input.rowMode === "all" || input.rowMode === "live") {
|
|
@@ -5078,9 +5088,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5078
5088
|
`/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
|
|
5079
5089
|
{ signal: input.signal }
|
|
5080
5090
|
);
|
|
5081
|
-
const requestedRunId = _optionalChain([input, 'access',
|
|
5091
|
+
const requestedRunId = _optionalChain([input, 'access', _259 => _259.runId, 'optionalAccess', _260 => _260.trim, 'call', _261 => _261()]) || "";
|
|
5082
5092
|
if (requestedRunId) {
|
|
5083
|
-
const confirmedRunId = _optionalChain([result, 'access',
|
|
5093
|
+
const confirmedRunId = _optionalChain([result, 'access', _262 => _262.scope, 'optionalAccess', _263 => _263.kind]) === "run" ? result.scope.runId.trim() : "";
|
|
5084
5094
|
const foreignRowRunIds = [
|
|
5085
5095
|
...new Set(
|
|
5086
5096
|
result.rows.map(
|
|
@@ -5088,7 +5098,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5088
5098
|
).filter((runId) => runId && runId !== requestedRunId)
|
|
5089
5099
|
)
|
|
5090
5100
|
];
|
|
5091
|
-
if (_optionalChain([result, 'access',
|
|
5101
|
+
if (_optionalChain([result, 'access', _264 => _264.scope, 'optionalAccess', _265 => _265.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
|
|
5092
5102
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
5093
5103
|
`Run-scoped dataset export was not confirmed for ${requestedRunId}; no rows were returned to the caller. Update Deepline, then retry the same export command. Do not rerun the play.`,
|
|
5094
5104
|
void 0,
|
|
@@ -5117,7 +5127,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5117
5127
|
async stopRun(runId, options) {
|
|
5118
5128
|
return this.http.post(
|
|
5119
5129
|
`/api/v2/runs/${encodeURIComponent(runId)}/stop`,
|
|
5120
|
-
_optionalChain([options, 'optionalAccess',
|
|
5130
|
+
_optionalChain([options, 'optionalAccess', _266 => _266.reason]) ? { reason: options.reason } : {}
|
|
5121
5131
|
);
|
|
5122
5132
|
}
|
|
5123
5133
|
/**
|
|
@@ -5135,11 +5145,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5135
5145
|
* The method clears workspace run-slot state without requiring each run ID.
|
|
5136
5146
|
*/
|
|
5137
5147
|
async stopAllRuns(options) {
|
|
5138
|
-
const dryRun = _optionalChain([options, 'optionalAccess',
|
|
5148
|
+
const dryRun = _optionalChain([options, 'optionalAccess', _267 => _267.dryRun]) === true;
|
|
5139
5149
|
const result = await this.http.post(
|
|
5140
5150
|
"/api/v2/runs/stop-all",
|
|
5141
5151
|
{
|
|
5142
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5152
|
+
..._optionalChain([options, 'optionalAccess', _268 => _268.reason]) ? { reason: options.reason } : {},
|
|
5143
5153
|
...dryRun ? { dryRun: true } : {}
|
|
5144
5154
|
}
|
|
5145
5155
|
);
|
|
@@ -5160,7 +5170,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5160
5170
|
* `origin: "owned"` for org-owned plays.
|
|
5161
5171
|
*/
|
|
5162
5172
|
async listPlays(options) {
|
|
5163
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
5173
|
+
if (!_optionalChain([options, 'optionalAccess', _269 => _269.grep, 'optionalAccess', _270 => _270.trim, 'call', _271 => _271()])) {
|
|
5164
5174
|
return (await this.requestPlaysPage(options, false)).plays;
|
|
5165
5175
|
}
|
|
5166
5176
|
const plays = [];
|
|
@@ -5182,45 +5192,45 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5182
5192
|
}
|
|
5183
5193
|
async requestPlaysPage(options, paginateInventory = true) {
|
|
5184
5194
|
const params = new URLSearchParams();
|
|
5185
|
-
if (paginateInventory && !_optionalChain([options, 'optionalAccess',
|
|
5195
|
+
if (paginateInventory && !_optionalChain([options, 'optionalAccess', _272 => _272.grep, 'optionalAccess', _273 => _273.trim, 'call', _274 => _274()]))
|
|
5186
5196
|
params.set("inventory_paginated", "1");
|
|
5187
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5188
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5197
|
+
if (_optionalChain([options, 'optionalAccess', _275 => _275.origin])) params.set("origin", options.origin);
|
|
5198
|
+
if (_optionalChain([options, 'optionalAccess', _276 => _276.categories])) {
|
|
5189
5199
|
params.set(
|
|
5190
5200
|
"categories",
|
|
5191
5201
|
Array.isArray(options.categories) ? options.categories.join(",") : options.categories
|
|
5192
5202
|
);
|
|
5193
5203
|
}
|
|
5194
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5204
|
+
if (_optionalChain([options, 'optionalAccess', _277 => _277.categories]) || _optionalChain([options, 'optionalAccess', _278 => _278.includeToolCategories])) {
|
|
5195
5205
|
params.set("include_tool_categories", "1");
|
|
5196
5206
|
}
|
|
5197
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5207
|
+
if (_optionalChain([options, 'optionalAccess', _279 => _279.tags])) {
|
|
5198
5208
|
params.set(
|
|
5199
5209
|
"tags",
|
|
5200
5210
|
Array.isArray(options.tags) ? options.tags.join(",") : options.tags
|
|
5201
5211
|
);
|
|
5202
5212
|
}
|
|
5203
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5204
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5213
|
+
if (_optionalChain([options, 'optionalAccess', _280 => _280.includeArchived])) params.set("include_archived", "1");
|
|
5214
|
+
if (_optionalChain([options, 'optionalAccess', _281 => _281.includeCostEstimates])) {
|
|
5205
5215
|
params.set("include_cost_estimates", "1");
|
|
5206
5216
|
}
|
|
5207
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5217
|
+
if (_optionalChain([options, 'optionalAccess', _282 => _282.grep, 'optionalAccess', _283 => _283.trim, 'call', _284 => _284()])) {
|
|
5208
5218
|
params.set("grep", options.grep.trim());
|
|
5209
5219
|
params.set("limit", "60");
|
|
5210
5220
|
}
|
|
5211
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5221
|
+
if (_optionalChain([options, 'optionalAccess', _285 => _285.limit]) !== void 0) {
|
|
5212
5222
|
if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
|
|
5213
5223
|
throw new Error("Play page limit must be a positive integer");
|
|
5214
5224
|
}
|
|
5215
5225
|
params.set("limit", String(options.limit));
|
|
5216
5226
|
}
|
|
5217
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5227
|
+
if (_optionalChain([options, 'optionalAccess', _286 => _286.cursor])) params.set("cursor", options.cursor);
|
|
5218
5228
|
const suffix = params.size ? `?${params.toString()}` : "";
|
|
5219
5229
|
const response = await this.http.get(`/api/v2/plays${suffix}`);
|
|
5220
5230
|
return {
|
|
5221
5231
|
plays: _nullishCoalesce(response.plays, () => ( [])),
|
|
5222
|
-
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5223
|
-
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5232
|
+
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _287 => _287.pagination, 'optionalAccess', _288 => _288.cursor]), () => ( response.cursor)), () => ( null)),
|
|
5233
|
+
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _289 => _289.pagination, 'optionalAccess', _290 => _290.hasMore]), () => ( response.hasMore)))
|
|
5224
5234
|
};
|
|
5225
5235
|
}
|
|
5226
5236
|
/** Read definition-level settings, independently of code revisions. */
|
|
@@ -5274,7 +5284,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5274
5284
|
}
|
|
5275
5285
|
/** Start provider OAuth and return the URL to open in a browser. */
|
|
5276
5286
|
async startIntegrationOAuth(provider, options = {}) {
|
|
5277
|
-
const scopes = _optionalChain([options, 'access',
|
|
5287
|
+
const scopes = _optionalChain([options, 'access', _291 => _291.scopes, 'optionalAccess', _292 => _292.map, 'call', _293 => _293((scope) => scope.trim()), 'access', _294 => _294.filter, 'call', _295 => _295(Boolean)]);
|
|
5278
5288
|
if (scopes !== void 0 && scopes.length === 0) {
|
|
5279
5289
|
throw new Error("scopes must contain at least one OAuth scope.");
|
|
5280
5290
|
}
|
|
@@ -5290,8 +5300,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5290
5300
|
return this.http.post("/api/v2/integrations/connect", {
|
|
5291
5301
|
provider: "slack",
|
|
5292
5302
|
scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
|
|
5293
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5294
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5303
|
+
..._optionalChain([options, 'optionalAccess', _296 => _296.successUrl]) ? { success_url: options.successUrl } : {},
|
|
5304
|
+
..._optionalChain([options, 'optionalAccess', _297 => _297.failureUrl]) ? { failure_url: options.failureUrl } : {}
|
|
5295
5305
|
});
|
|
5296
5306
|
}
|
|
5297
5307
|
/** List Slack channels visible to the connected Deepline Slack app. */
|
|
@@ -5366,7 +5376,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5366
5376
|
}
|
|
5367
5377
|
const targets = input.targets.map(parseNotificationGroupTarget);
|
|
5368
5378
|
const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
|
|
5369
|
-
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access',
|
|
5379
|
+
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _298 => _298[0], 'optionalAccess', _299 => _299.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
|
|
5370
5380
|
if (legacyEvents.length > 0 && !legacyTarget) {
|
|
5371
5381
|
throw new Error(
|
|
5372
5382
|
"--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
|
|
@@ -5402,7 +5412,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5402
5412
|
const existingGroup = current.configuration.groups.find(
|
|
5403
5413
|
(candidate) => candidate.name.toLowerCase() === name.toLowerCase()
|
|
5404
5414
|
);
|
|
5405
|
-
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess',
|
|
5415
|
+
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _300 => _300.groupKey]), () => ( notificationObjectKey("group")));
|
|
5406
5416
|
const group = _nullishCoalesce(existingGroup, () => ( {
|
|
5407
5417
|
groupKey,
|
|
5408
5418
|
name,
|
|
@@ -5626,7 +5636,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5626
5636
|
/** Read one trigger inventory page without loading run histories. */
|
|
5627
5637
|
async listPlayTriggerInventory(options) {
|
|
5628
5638
|
const params = new URLSearchParams({ view: "inventory" });
|
|
5629
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5639
|
+
if (_optionalChain([options, 'optionalAccess', _301 => _301.cursor])) params.set("cursor", options.cursor);
|
|
5630
5640
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5631
5641
|
}
|
|
5632
5642
|
/** Read one trigger's recent runs, with an explicit partial-history flag. */
|
|
@@ -5635,7 +5645,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5635
5645
|
view: "history",
|
|
5636
5646
|
binding_id: bindingId
|
|
5637
5647
|
});
|
|
5638
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5648
|
+
if (_optionalChain([options, 'optionalAccess', _302 => _302.limit]) !== void 0)
|
|
5639
5649
|
params.set("history_limit", String(options.limit));
|
|
5640
5650
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5641
5651
|
}
|
|
@@ -5823,14 +5833,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5823
5833
|
*/
|
|
5824
5834
|
async runPlay(code, csvPath, name, options) {
|
|
5825
5835
|
const { workflowId } = await this.submitPlay(code, csvPath, name, {
|
|
5826
|
-
input: _optionalChain([options, 'optionalAccess',
|
|
5827
|
-
sourceCode: _optionalChain([options, 'optionalAccess',
|
|
5828
|
-
artifact: _optionalChain([options, 'optionalAccess',
|
|
5829
|
-
compilerManifest: _optionalChain([options, 'optionalAccess',
|
|
5830
|
-
inputFile: _optionalChain([options, 'optionalAccess',
|
|
5831
|
-
packagedFiles: _optionalChain([options, 'optionalAccess',
|
|
5832
|
-
force: _optionalChain([options, 'optionalAccess',
|
|
5833
|
-
forceToolRefresh: _optionalChain([options, 'optionalAccess',
|
|
5836
|
+
input: _optionalChain([options, 'optionalAccess', _303 => _303.input]),
|
|
5837
|
+
sourceCode: _optionalChain([options, 'optionalAccess', _304 => _304.sourceCode]),
|
|
5838
|
+
artifact: _optionalChain([options, 'optionalAccess', _305 => _305.artifact]),
|
|
5839
|
+
compilerManifest: _optionalChain([options, 'optionalAccess', _306 => _306.compilerManifest]),
|
|
5840
|
+
inputFile: _optionalChain([options, 'optionalAccess', _307 => _307.inputFile]),
|
|
5841
|
+
packagedFiles: _optionalChain([options, 'optionalAccess', _308 => _308.packagedFiles]),
|
|
5842
|
+
force: _optionalChain([options, 'optionalAccess', _309 => _309.force]),
|
|
5843
|
+
forceToolRefresh: _optionalChain([options, 'optionalAccess', _310 => _310.forceToolRefresh])
|
|
5834
5844
|
});
|
|
5835
5845
|
const start = Date.now();
|
|
5836
5846
|
const state = {
|
|
@@ -5841,7 +5851,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5841
5851
|
latest: null
|
|
5842
5852
|
};
|
|
5843
5853
|
let terminalObserved = null;
|
|
5844
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5854
|
+
if (_optionalChain([options, 'optionalAccess', _311 => _311.signal, 'optionalAccess', _312 => _312.aborted])) {
|
|
5845
5855
|
await this.cancelPlay(workflowId);
|
|
5846
5856
|
return {
|
|
5847
5857
|
success: false,
|
|
@@ -5852,9 +5862,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5852
5862
|
};
|
|
5853
5863
|
}
|
|
5854
5864
|
for await (const event of this.watchRunEvents(workflowId, {
|
|
5855
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
5865
|
+
signal: _optionalChain([options, 'optionalAccess', _313 => _313.signal])
|
|
5856
5866
|
})) {
|
|
5857
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5867
|
+
if (_optionalChain([options, 'optionalAccess', _314 => _314.signal, 'optionalAccess', _315 => _315.aborted])) {
|
|
5858
5868
|
await this.cancelPlay(workflowId);
|
|
5859
5869
|
return {
|
|
5860
5870
|
success: false,
|
|
@@ -5864,19 +5874,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5864
5874
|
error: "Cancelled by user"
|
|
5865
5875
|
};
|
|
5866
5876
|
}
|
|
5867
|
-
const previousStatus = _optionalChain([state, 'access',
|
|
5877
|
+
const previousStatus = _optionalChain([state, 'access', _316 => _316.latest, 'optionalAccess', _317 => _317.status]);
|
|
5868
5878
|
const status = updatePlayLiveStatusState(state, event);
|
|
5869
5879
|
if (!status) {
|
|
5870
5880
|
continue;
|
|
5871
5881
|
}
|
|
5872
5882
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
5873
|
-
_optionalChain([options, 'optionalAccess',
|
|
5883
|
+
_optionalChain([options, 'optionalAccess', _318 => _318.onProgress, 'optionalCall', _319 => _319(status)]);
|
|
5874
5884
|
}
|
|
5875
5885
|
if (_chunkJKVRBCZLjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
5876
5886
|
terminalObserved = status;
|
|
5877
5887
|
}
|
|
5878
5888
|
}
|
|
5879
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5889
|
+
if (_optionalChain([options, 'optionalAccess', _320 => _320.signal, 'optionalAccess', _321 => _321.aborted])) {
|
|
5880
5890
|
await this.cancelPlay(workflowId);
|
|
5881
5891
|
return {
|
|
5882
5892
|
success: false,
|
|
@@ -5929,7 +5939,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5929
5939
|
const response = await this.http.get(
|
|
5930
5940
|
`/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
|
|
5931
5941
|
);
|
|
5932
|
-
const event = _optionalChain([response, 'access',
|
|
5942
|
+
const event = _optionalChain([response, 'access', _322 => _322.entries, 'optionalAccess', _323 => _323[0]]);
|
|
5933
5943
|
if (!event) {
|
|
5934
5944
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
5935
5945
|
"No usage event was found for this request_id.",
|
|
@@ -6103,7 +6113,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6103
6113
|
async cancelBillingSubscription(options) {
|
|
6104
6114
|
return this.http.post(
|
|
6105
6115
|
"/api/v2/billing/subscription/cancel",
|
|
6106
|
-
{ action: _optionalChain([options, 'optionalAccess',
|
|
6116
|
+
{ action: _optionalChain([options, 'optionalAccess', _324 => _324.undo]) ? "undo_cancel" : "cancel" }
|
|
6107
6117
|
);
|
|
6108
6118
|
}
|
|
6109
6119
|
/**
|
|
@@ -6115,7 +6125,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6115
6125
|
*/
|
|
6116
6126
|
async listBillingInvoices(options) {
|
|
6117
6127
|
const params = new URLSearchParams();
|
|
6118
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6128
|
+
if (_optionalChain([options, 'optionalAccess', _325 => _325.limit]) !== void 0) {
|
|
6119
6129
|
params.set("limit", String(options.limit));
|
|
6120
6130
|
}
|
|
6121
6131
|
const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
|
|
@@ -6225,7 +6235,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6225
6235
|
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
6226
6236
|
async createTargetBillingPortalSession(options) {
|
|
6227
6237
|
const response = await this.http.post(
|
|
6228
|
-
_optionalChain([options, 'optionalAccess',
|
|
6238
|
+
_optionalChain([options, 'optionalAccess', _326 => _326.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
|
|
6229
6239
|
{}
|
|
6230
6240
|
);
|
|
6231
6241
|
return response.data;
|
|
@@ -6275,8 +6285,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6275
6285
|
return this.http.request("/api/v2/monitors/audit", {
|
|
6276
6286
|
method: "POST",
|
|
6277
6287
|
body: {
|
|
6278
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6279
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6288
|
+
..._optionalChain([options, 'optionalAccess', _327 => _327.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6289
|
+
..._optionalChain([options, 'optionalAccess', _328 => _328.cursor]) ? { cursor: options.cursor } : {}
|
|
6280
6290
|
},
|
|
6281
6291
|
maxRetries: 0
|
|
6282
6292
|
});
|
|
@@ -6286,8 +6296,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6286
6296
|
return this.http.request("/api/v2/monitors/repair", {
|
|
6287
6297
|
method: "POST",
|
|
6288
6298
|
body: {
|
|
6289
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6290
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6299
|
+
..._optionalChain([options, 'optionalAccess', _329 => _329.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6300
|
+
..._optionalChain([options, 'optionalAccess', _330 => _330.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
|
|
6291
6301
|
},
|
|
6292
6302
|
maxRetries: 0
|
|
6293
6303
|
});
|
|
@@ -6295,7 +6305,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6295
6305
|
/** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
|
|
6296
6306
|
async readMonitorsHealth(options) {
|
|
6297
6307
|
const params = new URLSearchParams();
|
|
6298
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6308
|
+
if (_optionalChain([options, 'optionalAccess', _331 => _331.fleetId])) params.set("fleet_id", options.fleetId);
|
|
6299
6309
|
const query = params.toString();
|
|
6300
6310
|
const suffix = query ? `?${query}` : "";
|
|
6301
6311
|
return this.http.request(
|
|
@@ -6368,7 +6378,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6368
6378
|
);
|
|
6369
6379
|
}
|
|
6370
6380
|
const params = new URLSearchParams();
|
|
6371
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6381
|
+
if (_optionalChain([options, 'optionalAccess', _332 => _332.cursor])) params.set("cursor", options.cursor);
|
|
6372
6382
|
const suffix = params.size > 0 ? `?${params}` : "";
|
|
6373
6383
|
return this.http.request(
|
|
6374
6384
|
`/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
|
|
@@ -6415,7 +6425,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6415
6425
|
* a second charge. The submission is never replayed automatically.
|
|
6416
6426
|
*/
|
|
6417
6427
|
async previewMonitor(definition, options) {
|
|
6418
|
-
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6428
|
+
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _333 => _333.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _334 => _334.crypto, 'optionalAccess', _335 => _335.randomUUID, 'optionalCall', _336 => _336()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
|
|
6419
6429
|
try {
|
|
6420
6430
|
const result = await this.http.request(
|
|
6421
6431
|
"/api/v2/monitors/preview",
|
|
@@ -6423,7 +6433,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6423
6433
|
method: "POST",
|
|
6424
6434
|
body: {
|
|
6425
6435
|
...definition,
|
|
6426
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6436
|
+
..._optionalChain([options, 'optionalAccess', _337 => _337.limit]) === void 0 ? {} : { limit: options.limit }
|
|
6427
6437
|
},
|
|
6428
6438
|
headers: { "Idempotency-Key": idempotencyKey },
|
|
6429
6439
|
maxRetries: 0,
|
|
@@ -6445,7 +6455,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6445
6455
|
* `client.monitors.deploy(...)`.
|
|
6446
6456
|
*/
|
|
6447
6457
|
async deployMonitor(definition, options) {
|
|
6448
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6458
|
+
if (_optionalChain([options, 'optionalAccess', _338 => _338.dryRun])) {
|
|
6449
6459
|
return this.http.request("/api/v2/monitors/check", {
|
|
6450
6460
|
method: "POST",
|
|
6451
6461
|
body: definition
|
|
@@ -6481,12 +6491,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6481
6491
|
/** List deployed monitors. Prefer `client.monitors.list(...)`. */
|
|
6482
6492
|
async listMonitors(options) {
|
|
6483
6493
|
const params = new URLSearchParams();
|
|
6484
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6485
|
-
else if (_optionalChain([options, 'optionalAccess',
|
|
6486
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6494
|
+
if (_optionalChain([options, 'optionalAccess', _339 => _339.state])) params.set("state", options.state);
|
|
6495
|
+
else if (_optionalChain([options, 'optionalAccess', _340 => _340.status])) params.set("status", options.status);
|
|
6496
|
+
if (_optionalChain([options, 'optionalAccess', _341 => _341.limit]) !== void 0)
|
|
6487
6497
|
params.set("limit", String(options.limit));
|
|
6488
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6489
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6498
|
+
if (_optionalChain([options, 'optionalAccess', _342 => _342.cursor])) params.set("cursor", options.cursor);
|
|
6499
|
+
if (_optionalChain([options, 'optionalAccess', _343 => _343.includeConsumers])) params.set("include_consumers", "true");
|
|
6490
6500
|
const query = params.toString();
|
|
6491
6501
|
const suffix = query ? `?${query}` : "";
|
|
6492
6502
|
return this.http.request(
|
|
@@ -6502,7 +6512,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6502
6512
|
);
|
|
6503
6513
|
}
|
|
6504
6514
|
async testMonitorWebhook(key, payload, options) {
|
|
6505
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6515
|
+
if (_optionalChain([options, 'optionalAccess', _344 => _344.dispatch]) === true || _optionalChain([options, 'optionalAccess', _345 => _345.validationOnly]) === false) {
|
|
6506
6516
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6507
6517
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
6508
6518
|
void 0,
|
|
@@ -6557,7 +6567,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6557
6567
|
}
|
|
6558
6568
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
6559
6569
|
async deleteMonitor(key, options) {
|
|
6560
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6570
|
+
if (_optionalChain([options, 'optionalAccess', _346 => _346.localOnly]) === true) {
|
|
6561
6571
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6562
6572
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
6563
6573
|
void 0,
|
|
@@ -6565,11 +6575,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6565
6575
|
);
|
|
6566
6576
|
}
|
|
6567
6577
|
const params = new URLSearchParams();
|
|
6568
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6578
|
+
if (_optionalChain([options, 'optionalAccess', _347 => _347.dryRun])) params.set("dry_run", "true");
|
|
6569
6579
|
const query = params.toString();
|
|
6570
6580
|
return this.http.request(
|
|
6571
6581
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
6572
|
-
_optionalChain([options, 'optionalAccess',
|
|
6582
|
+
_optionalChain([options, 'optionalAccess', _348 => _348.dryRun]) ? { method: "DELETE" } : {
|
|
6573
6583
|
method: "DELETE",
|
|
6574
6584
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
6575
6585
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -6582,10 +6592,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6582
6592
|
* Prefer `client.monitors.reactivate(...)`.
|
|
6583
6593
|
*/
|
|
6584
6594
|
async reactivateMonitor(key, options) {
|
|
6585
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6595
|
+
const query = _optionalChain([options, 'optionalAccess', _349 => _349.dryRun]) ? "?dry_run=true" : "";
|
|
6586
6596
|
return this.http.request(
|
|
6587
6597
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
6588
|
-
_optionalChain([options, 'optionalAccess',
|
|
6598
|
+
_optionalChain([options, 'optionalAccess', _350 => _350.dryRun]) ? { method: "POST", body: {} } : {
|
|
6589
6599
|
method: "POST",
|
|
6590
6600
|
body: {},
|
|
6591
6601
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -6599,7 +6609,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6599
6609
|
// ——————————————————————————————————————————————————————————
|
|
6600
6610
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
6601
6611
|
monitorJobIdempotencyKey(operation) {
|
|
6602
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
6612
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _351 => _351.crypto, 'optionalAccess', _352 => _352.randomUUID, 'optionalCall', _353 => _353()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
6603
6613
|
const prefix = "monitor-job-";
|
|
6604
6614
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
6605
6615
|
const maxOperationLength = Math.max(
|
|
@@ -6610,7 +6620,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6610
6620
|
}
|
|
6611
6621
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
6612
6622
|
return {
|
|
6613
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6623
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _354 => _354.trim, 'call', _355 => _355()]) || this.monitorJobIdempotencyKey(operation)
|
|
6614
6624
|
};
|
|
6615
6625
|
}
|
|
6616
6626
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -6621,7 +6631,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6621
6631
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
6622
6632
|
headers: this.monitorJobHeaders(
|
|
6623
6633
|
"batch-deploy",
|
|
6624
|
-
_optionalChain([options, 'optionalAccess',
|
|
6634
|
+
_optionalChain([options, 'optionalAccess', _356 => _356.idempotencyKey])
|
|
6625
6635
|
),
|
|
6626
6636
|
maxRetries: 0,
|
|
6627
6637
|
exactUrlOnly: true
|
|
@@ -6640,11 +6650,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6640
6650
|
version: 1,
|
|
6641
6651
|
kind: "batch",
|
|
6642
6652
|
monitors: definitions,
|
|
6643
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6653
|
+
..._optionalChain([options, 'optionalAccess', _357 => _357.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
6644
6654
|
},
|
|
6645
6655
|
headers: this.monitorJobHeaders(
|
|
6646
6656
|
`batch-sync-${batchId}`,
|
|
6647
|
-
_optionalChain([options, 'optionalAccess',
|
|
6657
|
+
_optionalChain([options, 'optionalAccess', _358 => _358.idempotencyKey])
|
|
6648
6658
|
),
|
|
6649
6659
|
maxRetries: 0,
|
|
6650
6660
|
exactUrlOnly: true
|
|
@@ -6659,7 +6669,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6659
6669
|
body: {},
|
|
6660
6670
|
headers: this.monitorJobHeaders(
|
|
6661
6671
|
`batch-start-${batchId}`,
|
|
6662
|
-
_optionalChain([options, 'optionalAccess',
|
|
6672
|
+
_optionalChain([options, 'optionalAccess', _359 => _359.idempotencyKey])
|
|
6663
6673
|
),
|
|
6664
6674
|
maxRetries: 0,
|
|
6665
6675
|
exactUrlOnly: true
|
|
@@ -6674,7 +6684,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6674
6684
|
body: {},
|
|
6675
6685
|
headers: this.monitorJobHeaders(
|
|
6676
6686
|
`batch-stop-${batchId}`,
|
|
6677
|
-
_optionalChain([options, 'optionalAccess',
|
|
6687
|
+
_optionalChain([options, 'optionalAccess', _360 => _360.idempotencyKey])
|
|
6678
6688
|
),
|
|
6679
6689
|
maxRetries: 0,
|
|
6680
6690
|
exactUrlOnly: true
|
|
@@ -6695,7 +6705,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6695
6705
|
body: {},
|
|
6696
6706
|
headers: this.monitorJobHeaders(
|
|
6697
6707
|
`${action}-${monitorKey}`,
|
|
6698
|
-
_optionalChain([options, 'optionalAccess',
|
|
6708
|
+
_optionalChain([options, 'optionalAccess', _361 => _361.idempotencyKey])
|
|
6699
6709
|
),
|
|
6700
6710
|
maxRetries: 0,
|
|
6701
6711
|
exactUrlOnly: true
|
|
@@ -6708,7 +6718,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6708
6718
|
body: definition,
|
|
6709
6719
|
headers: this.monitorJobHeaders(
|
|
6710
6720
|
`sync-${definition.key}`,
|
|
6711
|
-
_optionalChain([options, 'optionalAccess',
|
|
6721
|
+
_optionalChain([options, 'optionalAccess', _362 => _362.idempotencyKey])
|
|
6712
6722
|
),
|
|
6713
6723
|
maxRetries: 0,
|
|
6714
6724
|
exactUrlOnly: true
|
|
@@ -6721,7 +6731,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6721
6731
|
);
|
|
6722
6732
|
}
|
|
6723
6733
|
async getMonitorJobLogs(jobId, options) {
|
|
6724
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6734
|
+
const query = _optionalChain([options, 'optionalAccess', _363 => _363.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
6725
6735
|
return this.http.request(
|
|
6726
6736
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
6727
6737
|
{ method: "GET" }
|
|
@@ -6734,15 +6744,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6734
6744
|
);
|
|
6735
6745
|
}
|
|
6736
6746
|
async waitForMonitorJob(jobId, options) {
|
|
6737
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6738
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6747
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _364 => _364.timeoutMs]), () => ( 10 * 6e4)));
|
|
6748
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _365 => _365.pollIntervalMs]), () => ( 2e3)));
|
|
6739
6749
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
6740
6750
|
const startedAt = Date.now();
|
|
6741
6751
|
let latest = await this.getMonitorJob(jobId);
|
|
6742
6752
|
while (true) {
|
|
6743
|
-
_optionalChain([options, 'optionalAccess',
|
|
6753
|
+
_optionalChain([options, 'optionalAccess', _366 => _366.onProgress, 'optionalCall', _367 => _367(latest)]);
|
|
6744
6754
|
const job = latest.job;
|
|
6745
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
6755
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _368 => _368.state]) === "string" ? job.state : void 0;
|
|
6746
6756
|
if (state && terminal.has(state)) return latest;
|
|
6747
6757
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
6748
6758
|
await sleep(pollIntervalMs);
|
|
@@ -6753,12 +6763,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6753
6763
|
// Monitor Fleets
|
|
6754
6764
|
// ——————————————————————————————————————————————————————————
|
|
6755
6765
|
monitorFleetIdempotencyKey(operation) {
|
|
6756
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
6766
|
+
const uuid = _optionalChain([globalThis, 'access', _369 => _369.crypto, 'optionalAccess', _370 => _370.randomUUID, 'optionalCall', _371 => _371()]);
|
|
6757
6767
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
6758
6768
|
}
|
|
6759
6769
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
6760
6770
|
return {
|
|
6761
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6771
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _372 => _372.trim, 'call', _373 => _373()]) || this.monitorFleetIdempotencyKey(operation)
|
|
6762
6772
|
};
|
|
6763
6773
|
}
|
|
6764
6774
|
monitorFleetPath(fleetId) {
|
|
@@ -6778,15 +6788,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6778
6788
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
6779
6789
|
const body = {
|
|
6780
6790
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
6781
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6782
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6791
|
+
..._optionalChain([options, 'optionalAccess', _374 => _374.dryRun]) ? { dry_run: true } : {},
|
|
6792
|
+
..._optionalChain([options, 'optionalAccess', _375 => _375.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
6783
6793
|
};
|
|
6784
6794
|
return this.http.request(
|
|
6785
6795
|
this.monitorFleetPath(fleetId),
|
|
6786
6796
|
{
|
|
6787
6797
|
method: "PUT",
|
|
6788
6798
|
body,
|
|
6789
|
-
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
6799
|
+
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _376 => _376.idempotencyKey])),
|
|
6790
6800
|
maxRetries: 0,
|
|
6791
6801
|
exactUrlOnly: true
|
|
6792
6802
|
}
|
|
@@ -6799,8 +6809,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6799
6809
|
}
|
|
6800
6810
|
async getMonitorFleet(fleetId, options) {
|
|
6801
6811
|
const params = new URLSearchParams();
|
|
6802
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6803
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6812
|
+
if (_optionalChain([options, 'optionalAccess', _377 => _377.drift])) params.set("drift", "1");
|
|
6813
|
+
if (_optionalChain([options, 'optionalAccess', _378 => _378.limit]) !== void 0)
|
|
6804
6814
|
params.set("limit", String(options.limit));
|
|
6805
6815
|
const query = params.toString();
|
|
6806
6816
|
return this.http.request(
|
|
@@ -6813,10 +6823,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6813
6823
|
this.monitorFleetPath(fleetId),
|
|
6814
6824
|
{
|
|
6815
6825
|
method: "DELETE",
|
|
6816
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
6826
|
+
body: _optionalChain([options, 'optionalAccess', _379 => _379.dryRun]) ? { dry_run: true } : {},
|
|
6817
6827
|
headers: this.monitorFleetHeaders(
|
|
6818
6828
|
"deactivate",
|
|
6819
|
-
_optionalChain([options, 'optionalAccess',
|
|
6829
|
+
_optionalChain([options, 'optionalAccess', _380 => _380.idempotencyKey])
|
|
6820
6830
|
),
|
|
6821
6831
|
maxRetries: 0,
|
|
6822
6832
|
exactUrlOnly: true
|
|
@@ -6831,7 +6841,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6831
6841
|
body: {},
|
|
6832
6842
|
headers: this.monitorFleetHeaders(
|
|
6833
6843
|
"reactivate",
|
|
6834
|
-
_optionalChain([options, 'optionalAccess',
|
|
6844
|
+
_optionalChain([options, 'optionalAccess', _381 => _381.idempotencyKey])
|
|
6835
6845
|
),
|
|
6836
6846
|
maxRetries: 0,
|
|
6837
6847
|
exactUrlOnly: true
|
|
@@ -6848,13 +6858,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6848
6858
|
* identical to "the request failed".
|
|
6849
6859
|
*/
|
|
6850
6860
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
6851
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6852
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6853
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
6861
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _382 => _382.timeoutMs]), () => ( 10 * 6e4)));
|
|
6862
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _383 => _383.pollIntervalMs]), () => ( 2e3)));
|
|
6863
|
+
const terminal = _optionalChain([options, 'optionalAccess', _384 => _384.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
|
|
6854
6864
|
const startedAt = Date.now();
|
|
6855
6865
|
let latest = await this.getMonitorFleet(fleetId);
|
|
6856
6866
|
while (true) {
|
|
6857
|
-
_optionalChain([options, 'optionalAccess',
|
|
6867
|
+
_optionalChain([options, 'optionalAccess', _385 => _385.onProgress, 'optionalCall', _386 => _386(latest)]);
|
|
6858
6868
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
6859
6869
|
if (status && terminal.has(status)) return latest;
|
|
6860
6870
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|