deepline 0.3.578 → 0.3.580
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 +20 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/billing/public-pricing.ts +470 -15
- package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +12 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +59 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +5 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +124 -57
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +182 -80
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +39 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +25 -0
- package/dist/bundling-sources/shared_libs/plays/sandbox-runtime-limits.ts +83 -0
- package/dist/cli/{agents-MCU3ITQZ.js → agents-BF5VX5ZB.js} +31 -31
- package/dist/cli/{agents-LRBANBZH.mjs → agents-JRFTZE7G.mjs} +4 -4
- package/dist/cli/auth-25MVD7TK.js +44 -0
- package/dist/cli/{auth-5BJKVYMQ.mjs → auth-XJXZ64R4.mjs} +5 -5
- package/dist/cli/{billing-EBBI4MVL.mjs → billing-TXJBGP2I.mjs} +69 -64
- package/dist/cli/{billing-NT57POHH.js → billing-VGMTJI7W.js} +158 -153
- package/dist/cli/{chunk-XBO4ERH6.js → chunk-2ZCFAUCV.js} +3 -3
- package/dist/cli/{chunk-P35YQAUC.js → chunk-3OSNEWGR.js} +281 -275
- package/dist/cli/{chunk-7J473OJ5.mjs → chunk-3P4QZIJ5.mjs} +1 -1
- package/dist/cli/{chunk-SKHUWQZE.js → chunk-3S5KFHQH.js} +17 -7
- package/dist/cli/{chunk-4LMTY4RQ.mjs → chunk-3ZBPXNSW.mjs} +2 -2
- package/dist/cli/{chunk-H7DY5NQ3.mjs → chunk-5BPJW6X5.mjs} +5 -5
- package/dist/cli/{chunk-A7NKOXBV.js → chunk-6VSUP4WN.js} +4 -4
- package/dist/cli/{chunk-4KNRCUKY.mjs → chunk-7HOG3JZE.mjs} +21 -15
- package/dist/cli/{chunk-OAQYLTUN.mjs → chunk-7ORX33JX.mjs} +5 -5
- package/dist/cli/{chunk-24FGR73C.js → chunk-ANX3PYLT.js} +13 -13
- package/dist/cli/{chunk-VVZ7JZMQ.js → chunk-APJ7IPRT.js} +15 -15
- package/dist/cli/{chunk-MXPCTF57.js → chunk-AZTQJJH7.js} +17 -2
- package/dist/cli/{chunk-3GF33QJJ.mjs → chunk-BAXLPQTM.mjs} +4 -4
- package/dist/cli/{chunk-DDJN4RR6.mjs → chunk-BK4Z62CF.mjs} +4 -4
- package/dist/cli/{chunk-IFWB4BYZ.mjs → chunk-C6YXUGX2.mjs} +3 -3
- package/dist/cli/{chunk-J7PCSLRY.js → chunk-COAAKSFX.js} +5 -5
- package/dist/cli/{chunk-Y2TK7OXN.js → chunk-D6I7QWOZ.js} +2 -2
- package/dist/cli/{chunk-W47SXEWQ.js → chunk-DQEHBAHL.js} +9 -9
- package/dist/cli/{chunk-ITYSPUKD.mjs → chunk-EI7KTESB.mjs} +2 -2
- package/dist/cli/{chunk-HZXF2HFF.mjs → chunk-FCJJPEKN.mjs} +5 -5
- package/dist/cli/{chunk-NEH7NZFT.js → chunk-GDBNH57Z.js} +10 -10
- package/dist/cli/{chunk-CFG3ZM7M.mjs → chunk-GE4ZEMMA.mjs} +2 -2
- package/dist/cli/{chunk-4YSJOSBG.mjs → chunk-GIZIWNL5.mjs} +1 -1
- package/dist/cli/{chunk-PJXPHUAR.mjs → chunk-H3B6QM6V.mjs} +3 -3
- package/dist/cli/{chunk-25SSGQJJ.js → chunk-HEZ24K5F.js} +2 -2
- package/dist/cli/{chunk-LYZPGP3P.mjs → chunk-HLMF53HZ.mjs} +1 -1
- package/dist/cli/{chunk-T2CCLYHV.mjs → chunk-IERWFFDB.mjs} +7 -7
- package/dist/cli/{chunk-CFLAGRWL.mjs → chunk-IG3CXIJY.mjs} +1 -1
- package/dist/cli/{chunk-ALXYCC4K.mjs → chunk-IM322G7M.mjs} +1 -1
- package/dist/cli/{chunk-RW3URFZK.mjs → chunk-KLBIHDZB.mjs} +2 -2
- package/dist/cli/{chunk-VMCJKGZS.mjs → chunk-LC4ETCOA.mjs} +2 -2
- package/dist/cli/{chunk-CS36W3RL.js → chunk-LHV3HPAY.js} +26 -26
- package/dist/cli/{chunk-CPNTDIJK.js → chunk-MBOPKQJF.js} +1 -1
- package/dist/cli/{chunk-BPMA4S3O.js → chunk-MCYZO3RB.js} +21 -21
- package/dist/cli/{chunk-JQPFICW3.mjs → chunk-MEDA3STC.mjs} +1 -1
- package/dist/cli/{chunk-ZO65VJRJ.js → chunk-MOZDEYQC.js} +11 -1
- package/dist/cli/{chunk-6UFTWNC5.mjs → chunk-MP6XUVAJ.mjs} +2 -2
- package/dist/cli/{chunk-HGQT6EGK.js → chunk-NNWEQDZR.js} +20 -20
- package/dist/cli/{chunk-AZFSCPYK.mjs → chunk-NV5IJ3NY.mjs} +17 -2
- package/dist/cli/{chunk-QPOJLAFT.mjs → chunk-O7AWGIDD.mjs} +2 -2
- package/dist/cli/{chunk-G7PH2QVM.js → chunk-PFNYLTCZ.js} +5 -5
- package/dist/cli/{chunk-DWUESXDD.mjs → chunk-QXQBTTRD.mjs} +11 -1
- package/dist/cli/{chunk-5IMWXYVB.js → chunk-R77IVVEZ.js} +53 -53
- package/dist/cli/{chunk-MXK4M7HP.js → chunk-S2YKIWCD.js} +17 -17
- package/dist/cli/{chunk-FYKHAT2F.mjs → chunk-SECFDB27.mjs} +10 -0
- package/dist/cli/{chunk-NTHN7ODR.mjs → chunk-SQBSK74D.mjs} +7 -3
- package/dist/cli/{chunk-M3ITWEGS.js → chunk-TSOXJZSW.js} +41 -41
- package/dist/cli/{chunk-CSPOWVWS.mjs → chunk-U4VCAECC.mjs} +8 -3
- package/dist/cli/{chunk-RLPPLS6A.js → chunk-URZPR54R.js} +6 -6
- package/dist/cli/{chunk-27HAQRGH.js → chunk-V5NDHTBB.js} +23 -23
- package/dist/cli/{chunk-HKZN33F2.mjs → chunk-VF3EGTHU.mjs} +3 -3
- package/dist/cli/{chunk-5LCV36BR.js → chunk-VOQWPUIF.js} +20 -20
- package/dist/cli/{chunk-3ZUKYLC6.js → chunk-WJUAVMQC.js} +217 -213
- package/dist/cli/{chunk-W66GXHYR.mjs → chunk-X5RXG6VS.mjs} +1 -1
- package/dist/cli/{chunk-UKSOIH2P.js → chunk-XFVJ3JNA.js} +5 -5
- package/dist/cli/{chunk-RWDYULX2.js → chunk-XQUVLYOL.js} +17 -12
- package/dist/cli/{chunk-XE66BGLB.js → chunk-YY6EB252.js} +2 -2
- package/dist/cli/{chunk-XX7TZM4N.js → chunk-Z6DERGHY.js} +48 -48
- package/dist/cli/{chunk-PXMCPEE2.js → chunk-ZADJC22U.js} +3 -3
- package/dist/cli/{chunk-4CNHOBUO.mjs → chunk-ZR7PDXIA.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/concurrent-runs-help-DEN63DUM.js +22 -0
- package/dist/cli/{concurrent-runs-help-2MHLIUC6.mjs → concurrent-runs-help-DSUQRWZQ.mjs} +6 -6
- package/dist/cli/{csv-RYYDAC76.js → csv-HSHF6JYZ.js} +13 -13
- package/dist/cli/{csv-J6SRBMOT.mjs → csv-QNXJBT5T.mjs} +4 -4
- package/dist/cli/{db-WK226TM7.mjs → db-RAWY3SWS.mjs} +6 -6
- package/dist/cli/{db-5QLH6QK5.js → db-VHYWVLLU.js} +27 -27
- package/dist/cli/{describe-UBSCFPH5.mjs → describe-WZOVHWAM.mjs} +21 -21
- package/dist/cli/describe-YHZ2EGBQ.js +50 -0
- package/dist/cli/describe-core.d.mts +4 -2
- package/dist/cli/describe-core.d.ts +4 -2
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-AGV5V7SD.js → executions-DQIFH4Z6.js} +8 -8
- package/dist/cli/{executions-XF5BNCFS.mjs → executions-QABOXV4K.mjs} +6 -6
- package/dist/cli/{feedback-3RDEZE2M.js → feedback-6IER2W4G.js} +14 -14
- package/dist/cli/{feedback-LT3PDK72.mjs → feedback-DW4O63DG.mjs} +6 -6
- package/dist/cli/{git-7VBTCCBV.mjs → git-3NAPGZGR.mjs} +5 -5
- package/dist/cli/git-SQ2MAKAH.js +26 -0
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-JP732FQB.js → integrations-5LHIBBXB.js} +29 -29
- package/dist/cli/{integrations-E7QRWMKZ.mjs → integrations-TSRUTENK.mjs} +7 -7
- package/dist/cli/{legacy-noops-UFNQBPIT.mjs → legacy-noops-4N63A6H7.mjs} +6 -6
- package/dist/cli/{legacy-noops-UTL4W5WE.js → legacy-noops-S22XGYGN.js} +9 -9
- package/dist/cli/{mcp-YHETA3AU.mjs → mcp-4EJHRRFV.mjs} +4 -4
- package/dist/cli/{mcp-5X4XFB4V.js → mcp-JERBGJYE.js} +24 -24
- package/dist/cli/{monitors-WFVZ42OQ.mjs → monitors-7BTLBD6S.mjs} +16 -11
- package/dist/cli/{monitors-AN6KH4XY.js → monitors-FF35CGC4.js} +109 -104
- package/dist/cli/{org-CN3XJZLA.js → org-ADCDO7KU.js} +121 -121
- package/dist/cli/{org-OMDV7WDF.mjs → org-QYIIBKA2.mjs} +6 -6
- package/dist/cli/{outcomes-7HCZ6K3Q.js → outcomes-2LW4GK2L.js} +14 -14
- package/dist/cli/{outcomes-I4ZTG5ND.mjs → outcomes-C5DIBG4Q.mjs} +6 -6
- package/dist/cli/{play-TSNBSHGA.mjs → play-DTTDTISL.mjs} +20 -20
- package/dist/cli/{play-45VXZ57A.js → play-S5MZ2GRA.js} +349 -349
- package/dist/cli/{providers-4TB56ZLK.mjs → providers-AXOEFQ6Q.mjs} +6 -6
- package/dist/cli/{providers-RB3TT7AE.js → providers-N2IWEJBW.js} +9 -9
- package/dist/cli/{quickstart-XHZ3PG5I.mjs → quickstart-ADWSZBV6.mjs} +4 -4
- package/dist/cli/{quickstart-ZNDM6VUD.js → quickstart-UC5AJZWU.js} +6 -6
- package/dist/cli/{run-XNEJGAKV.js → run-6TDYUL7L.js} +49 -48
- package/dist/cli/{run-7PY4G6GB.mjs → run-R2FVH3K6.mjs} +27 -26
- package/dist/cli/{search-BG7KCIOG.mjs → search-GRHUFSLY.mjs} +7 -7
- package/dist/cli/search-V7ANBX3J.js +32 -0
- package/dist/cli/{search-output-3ZBNTHGO.js → search-output-O7NY3VMD.js} +8 -8
- package/dist/cli/{search-output-TWKKP2BE.mjs → search-output-UPQNAFAF.mjs} +5 -5
- package/dist/cli/{secrets-FNR6MX6A.js → secrets-72GJHFER.js} +15 -15
- package/dist/cli/{secrets-AZZCE7E3.mjs → secrets-NKAEJLIQ.mjs} +6 -6
- package/dist/cli/sessions-EO6RTMUC.js +23 -0
- package/dist/cli/{sessions-ZAMKN3AF.mjs → sessions-VIMF3UF5.mjs} +6 -6
- package/dist/cli/{settings-QGASFWV3.js → settings-HFAW5HIF.js} +85 -85
- package/dist/cli/{settings-WKWOOOI2.mjs → settings-KCQHBFNZ.mjs} +12 -12
- package/dist/cli/{setup-KUZDCR3F.js → setup-2MHWGEAD.js} +49 -49
- package/dist/cli/{setup-U36W42LE.mjs → setup-2ZD5ZIUH.mjs} +9 -9
- package/dist/cli/skills-ID6KKDLH.js +37 -0
- package/dist/cli/{skills-25CSZQIK.mjs → skills-X2DZZG5P.mjs} +7 -7
- package/dist/cli/tools-7UY7GERW.js +57 -0
- package/dist/cli/{tools-4NZQ22AA.mjs → tools-KPTOWKD4.mjs} +19 -19
- package/dist/cli/{update-CJYP36TG.mjs → update-6PMQCEUP.mjs} +9 -9
- package/dist/cli/update-T2RDLLSY.js +37 -0
- package/dist/cli/{views-76UIPWJD.js → views-MNBHNO6C.js} +37 -24
- package/dist/cli/{views-GYGE7FSV.mjs → views-VRZ5CTFL.mjs} +21 -8
- package/dist/cli/{workflow-LZSWALZS.mjs → workflow-7JUJWA5S.mjs} +7 -7
- package/dist/cli/{workflow-NCVXBATM.js → workflow-SSMFO7YE.js} +17 -17
- package/dist/{client-CF-bsrtI.d.mts → client-CmG8MT0x.d.mts} +1 -1
- package/dist/{client-BrdMPFCM.d.ts → client-QznpkWrk.d.ts} +1 -1
- package/dist/{client-core-rMoUWSYM.d.ts → client-core-CXDqfeiB.d.ts} +12 -1
- package/dist/{client-core-DM1ZedOG.d.mts → client-core-CY0jNW0e.d.mts} +12 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +126 -126
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- 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 +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-VSW3MTFO.js +0 -44
- package/dist/cli/concurrent-runs-help-ATT2GVTQ.js +0 -22
- package/dist/cli/describe-Q27SRQWM.js +0 -50
- package/dist/cli/git-BBTP3H7J.js +0 -26
- package/dist/cli/search-ZBU5GW4W.js +0 -32
- package/dist/cli/sessions-GCY62GAW.js +0 -23
- package/dist/cli/skills-43DHMLRW.js +0 -37
- package/dist/cli/tools-5BGKNMFU.js +0 -57
- package/dist/cli/update-CUO2MTB6.js +0 -37
|
@@ -37,7 +37,7 @@ var _chunkPMH4GLMDjs = require('./chunk-PMH4GLMD.js');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunk6VSUP4WNjs = require('./chunk-6VSUP4WN.js');
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
var _chunk6VLFQZK6js = require('./chunk-6VLFQZK6.js');
|
|
@@ -963,7 +963,7 @@ var ToolCalls = class {
|
|
|
963
963
|
idempotencyKey,
|
|
964
964
|
onResponse: (response2) => {
|
|
965
965
|
lastResponse = null;
|
|
966
|
-
atomicToolsSupported = response2.headers.get(
|
|
966
|
+
atomicToolsSupported = response2.headers.get(_chunk6VSUP4WNjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
967
967
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
968
968
|
if (_optionalChain([options, 'optionalAccess', _38 => _38.onServerTiming])) {
|
|
969
969
|
try {
|
|
@@ -1350,15 +1350,15 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
const receivers = _optionalChain([env, 'access', _63 => _63.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _64 => _64.trim, 'call', _65 => _65()]);
|
|
1352
1352
|
return {
|
|
1353
|
-
[
|
|
1354
|
-
...receivers ? { [
|
|
1353
|
+
[_chunk6VSUP4WNjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1354
|
+
...receivers ? { [_chunk6VSUP4WNjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1355
1355
|
};
|
|
1356
1356
|
}
|
|
1357
1357
|
function playRunStartHeaders(runtime, env) {
|
|
1358
1358
|
const headers = runtimeSelectionHeaders(runtime, env);
|
|
1359
1359
|
const experimentSwitches = _optionalChain([env, 'access', _66 => _66.DEEPLINE_EXPERIMENT_SWITCHES, 'optionalAccess', _67 => _67.trim, 'call', _68 => _68()]);
|
|
1360
1360
|
if (!experimentSwitches) return headers;
|
|
1361
|
-
return { ...headers, [
|
|
1361
|
+
return { ...headers, [_chunk6VSUP4WNjs.EXPERIMENT_SWITCHES_HEADER]: experimentSwitches };
|
|
1362
1362
|
}
|
|
1363
1363
|
function normalizeTestPolicyOverrides(value, source) {
|
|
1364
1364
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -1428,7 +1428,7 @@ var PlayClient = class {
|
|
|
1428
1428
|
return _chunkMJTVX4QKjs.startPlayRun.call(void 0,
|
|
1429
1429
|
this.http,
|
|
1430
1430
|
resolved.request,
|
|
1431
|
-
_optionalChain([options, 'optionalAccess', _76 => _76.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1431
|
+
_optionalChain([options, 'optionalAccess', _76 => _76.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunk6VSUP4WNjs.SDK_API_MAJOR) } : headers,
|
|
1432
1432
|
options
|
|
1433
1433
|
);
|
|
1434
1434
|
}
|
|
@@ -3546,7 +3546,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3546
3546
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3547
3547
|
);
|
|
3548
3548
|
}
|
|
3549
|
-
return { [
|
|
3549
|
+
return { [_chunk6VSUP4WNjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3550
3550
|
}
|
|
3551
3551
|
function sleep(ms) {
|
|
3552
3552
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -4079,10 +4079,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4079
4079
|
);
|
|
4080
4080
|
}
|
|
4081
4081
|
/** Who can open a view: its workspace, every org member, or anyone with its URL. */
|
|
4082
|
-
async setViewAccess(id, access) {
|
|
4082
|
+
async setViewAccess(id, access, options) {
|
|
4083
4083
|
return await this.http.post(
|
|
4084
4084
|
`/api/v2/views/${encodeURIComponent(id)}/access`,
|
|
4085
|
-
{
|
|
4085
|
+
{
|
|
4086
|
+
access,
|
|
4087
|
+
..._optionalChain([options, 'optionalAccess', _178 => _178.embedOrigins]) !== void 0 ? { embed_origins: options.embedOrigins } : {}
|
|
4088
|
+
}
|
|
4086
4089
|
);
|
|
4087
4090
|
}
|
|
4088
4091
|
/** The view's share links, newest first. Their tokens are never returned. */
|
|
@@ -4112,8 +4115,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4112
4115
|
/** Every run of the view's Play, newest first. */
|
|
4113
4116
|
async listViewRuns(id, input) {
|
|
4114
4117
|
const params = new URLSearchParams();
|
|
4115
|
-
if (_optionalChain([input, 'optionalAccess',
|
|
4116
|
-
if (_optionalChain([input, 'optionalAccess',
|
|
4118
|
+
if (_optionalChain([input, 'optionalAccess', _179 => _179.limit])) params.set("limit", String(input.limit));
|
|
4119
|
+
if (_optionalChain([input, 'optionalAccess', _180 => _180.offset])) params.set("offset", String(input.offset));
|
|
4117
4120
|
const query = params.size > 0 ? `?${params}` : "";
|
|
4118
4121
|
return await this.http.get(
|
|
4119
4122
|
`/api/v2/views/${encodeURIComponent(id)}/runs${query}`
|
|
@@ -4201,17 +4204,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4201
4204
|
*/
|
|
4202
4205
|
async listTools(options) {
|
|
4203
4206
|
const params = new URLSearchParams();
|
|
4204
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4207
|
+
if (_optionalChain([options, 'optionalAccess', _181 => _181.categories, 'optionalAccess', _182 => _182.trim, 'call', _183 => _183()])) {
|
|
4205
4208
|
params.set("categories", options.categories.trim());
|
|
4206
4209
|
}
|
|
4207
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4210
|
+
if (_optionalChain([options, 'optionalAccess', _184 => _184.tags, 'optionalAccess', _185 => _185.trim, 'call', _186 => _186()])) {
|
|
4208
4211
|
params.set("tags", options.tags.trim());
|
|
4209
4212
|
}
|
|
4210
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4213
|
+
if (_optionalChain([options, 'optionalAccess', _187 => _187.grep, 'optionalAccess', _188 => _188.trim, 'call', _189 => _189()])) {
|
|
4211
4214
|
params.set("grep", options.grep.trim());
|
|
4212
4215
|
params.set("grep_mode", _nullishCoalesce(options.grepMode, () => ( "all")));
|
|
4213
4216
|
}
|
|
4214
|
-
params.set("compact", _optionalChain([options, 'optionalAccess',
|
|
4217
|
+
params.set("compact", _optionalChain([options, 'optionalAccess', _190 => _190.compact]) === true ? "true" : "false");
|
|
4215
4218
|
const suffix = params.toString() ? `?${params.toString()}` : "";
|
|
4216
4219
|
const res = await this.http.get(
|
|
4217
4220
|
`/api/v2/tools${suffix}`
|
|
@@ -4244,7 +4247,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4244
4247
|
const params = new URLSearchParams({
|
|
4245
4248
|
view: "category",
|
|
4246
4249
|
categories: normalizedCategory,
|
|
4247
|
-
compact: _optionalChain([options, 'optionalAccess',
|
|
4250
|
+
compact: _optionalChain([options, 'optionalAccess', _191 => _191.compact]) === true ? "true" : "false"
|
|
4248
4251
|
});
|
|
4249
4252
|
const response = await this.http.get(
|
|
4250
4253
|
`/api/v2/tools?${params}`
|
|
@@ -4259,7 +4262,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4259
4262
|
}
|
|
4260
4263
|
/** List discoverable providers without requiring a local plugin catalog. */
|
|
4261
4264
|
async listProviders(options) {
|
|
4262
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
4265
|
+
const suffix = _optionalChain([options, 'optionalAccess', _192 => _192.changed]) ? "?changed=true" : "";
|
|
4263
4266
|
const res = await this.http.get(
|
|
4264
4267
|
`/api/v2/tools/providers${suffix}`
|
|
4265
4268
|
);
|
|
@@ -4290,8 +4293,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4290
4293
|
*/
|
|
4291
4294
|
async search(options = {}) {
|
|
4292
4295
|
const params = searchParams(options);
|
|
4293
|
-
if (_optionalChain([options, 'access',
|
|
4294
|
-
if (_optionalChain([options, 'access',
|
|
4296
|
+
if (_optionalChain([options, 'access', _193 => _193.types, 'optionalAccess', _194 => _194.length])) params.set("types", options.types.join(","));
|
|
4297
|
+
if (_optionalChain([options, 'access', _195 => _195.exclude, 'optionalAccess', _196 => _196.length])) {
|
|
4295
4298
|
params.set("exclude", options.exclude.join(","));
|
|
4296
4299
|
}
|
|
4297
4300
|
return this.http.get(`/api/v2/search?${params.toString()}`);
|
|
@@ -4313,7 +4316,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4313
4316
|
* ```
|
|
4314
4317
|
*/
|
|
4315
4318
|
async getTool(toolId, options) {
|
|
4316
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4319
|
+
if (_optionalChain([options, 'optionalAccess', _197 => _197.cliInvocationId]) !== void 0) {
|
|
4317
4320
|
validateCliInvocationId(options.cliInvocationId);
|
|
4318
4321
|
}
|
|
4319
4322
|
return this.http.request(
|
|
@@ -4326,7 +4329,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4326
4329
|
retryApiErrors: true,
|
|
4327
4330
|
headers: {
|
|
4328
4331
|
"x-deepline-tool-meta-only": "1",
|
|
4329
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4332
|
+
..._optionalChain([options, 'optionalAccess', _198 => _198.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
|
|
4330
4333
|
}
|
|
4331
4334
|
}
|
|
4332
4335
|
);
|
|
@@ -4417,7 +4420,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4417
4420
|
return this.http.post(
|
|
4418
4421
|
"/api/v2/ingestion/repair",
|
|
4419
4422
|
{
|
|
4420
|
-
..._optionalChain([input, 'optionalAccess',
|
|
4423
|
+
..._optionalChain([input, 'optionalAccess', _199 => _199.provider]) ? { provider: input.provider } : {}
|
|
4421
4424
|
}
|
|
4422
4425
|
);
|
|
4423
4426
|
}
|
|
@@ -4472,7 +4475,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4472
4475
|
const prepared = await _chunkMJTVX4QKjs.preparePlayRunAdmission.call(void 0,
|
|
4473
4476
|
this.http,
|
|
4474
4477
|
resolved.request,
|
|
4475
|
-
_optionalChain([options, 'optionalAccess',
|
|
4478
|
+
_optionalChain([options, 'optionalAccess', _200 => _200.onSubmission]),
|
|
4476
4479
|
options
|
|
4477
4480
|
);
|
|
4478
4481
|
const bodyJson = JSON.stringify(prepared.body);
|
|
@@ -4480,9 +4483,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4480
4483
|
resolved.runtime,
|
|
4481
4484
|
this.environment
|
|
4482
4485
|
);
|
|
4483
|
-
const headers = _optionalChain([options, 'optionalAccess',
|
|
4486
|
+
const headers = _optionalChain([options, 'optionalAccess', _201 => _201.cliAdmission]) ? {
|
|
4484
4487
|
...runtimeHeaders,
|
|
4485
|
-
"X-Deepline-API-Major": String(
|
|
4488
|
+
"X-Deepline-API-Major": String(_chunk6VSUP4WNjs.SDK_API_MAJOR)
|
|
4486
4489
|
} : runtimeHeaders;
|
|
4487
4490
|
const http = this.http;
|
|
4488
4491
|
let submitted = false;
|
|
@@ -4497,12 +4500,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4497
4500
|
);
|
|
4498
4501
|
}
|
|
4499
4502
|
if (submitted) {
|
|
4500
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
4503
|
+
if (!_optionalChain([options, 'optionalAccess', _202 => _202.callerIntentV2])) {
|
|
4501
4504
|
await _chunkMJTVX4QKjs.preparePlayRunAdmission.call(void 0,
|
|
4502
4505
|
http,
|
|
4503
4506
|
JSON.parse(bodyJson),
|
|
4504
4507
|
void 0,
|
|
4505
|
-
{ signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess',
|
|
4508
|
+
{ signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess', _203 => _203.signal]), () => ( _optionalChain([options, 'optionalAccess', _204 => _204.signal]))) }
|
|
4506
4509
|
);
|
|
4507
4510
|
}
|
|
4508
4511
|
}
|
|
@@ -4515,9 +4518,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4515
4518
|
prepared.supportsCallerIntent,
|
|
4516
4519
|
headers,
|
|
4517
4520
|
{
|
|
4518
|
-
cliAdmission: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess',
|
|
4519
|
-
callerIntentV2: _optionalChain([options, 'optionalAccess',
|
|
4520
|
-
signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess',
|
|
4521
|
+
cliAdmission: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess', _205 => _205.cliAdmission]), () => ( _optionalChain([options, 'optionalAccess', _206 => _206.cliAdmission]))),
|
|
4522
|
+
callerIntentV2: _optionalChain([options, 'optionalAccess', _207 => _207.callerIntentV2]),
|
|
4523
|
+
signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess', _208 => _208.signal]), () => ( _optionalChain([options, 'optionalAccess', _209 => _209.signal])))
|
|
4521
4524
|
}
|
|
4522
4525
|
);
|
|
4523
4526
|
} catch (error) {
|
|
@@ -4536,26 +4539,26 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4536
4539
|
);
|
|
4537
4540
|
}
|
|
4538
4541
|
if (submitted) {
|
|
4539
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
4542
|
+
if (!_optionalChain([options, 'optionalAccess', _210 => _210.callerIntentV2])) {
|
|
4540
4543
|
await _chunkMJTVX4QKjs.preparePlayRunAdmission.call(void 0,
|
|
4541
4544
|
http,
|
|
4542
4545
|
JSON.parse(bodyJson),
|
|
4543
4546
|
void 0,
|
|
4544
|
-
{ signal: _optionalChain([streamOptions, 'optionalAccess',
|
|
4547
|
+
{ signal: _optionalChain([streamOptions, 'optionalAccess', _211 => _211.signal]) }
|
|
4545
4548
|
);
|
|
4546
4549
|
}
|
|
4547
4550
|
}
|
|
4548
4551
|
submitted = true;
|
|
4549
|
-
const streamPath = _optionalChain([options, 'optionalAccess',
|
|
4552
|
+
const streamPath = _optionalChain([options, 'optionalAccess', _212 => _212.callerIntentV2]) ? _chunkMJTVX4QKjs.CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH : _optionalChain([options, 'optionalAccess', _213 => _213.cliAdmission]) ? _chunkMJTVX4QKjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkMJTVX4QKjs.PLAY_RUN_START_STREAM_PATH;
|
|
4550
4553
|
let cliAdmissionSupported = false;
|
|
4551
4554
|
try {
|
|
4552
4555
|
for await (const event of http.streamSse(streamPath, {
|
|
4553
4556
|
method: "POST",
|
|
4554
4557
|
body: JSON.parse(bodyJson),
|
|
4555
4558
|
headers,
|
|
4556
|
-
signal: _optionalChain([streamOptions, 'optionalAccess',
|
|
4559
|
+
signal: _optionalChain([streamOptions, 'optionalAccess', _214 => _214.signal]),
|
|
4557
4560
|
exactUrlOnly: true,
|
|
4558
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4561
|
+
..._optionalChain([options, 'optionalAccess', _215 => _215.cliAdmission]) ? {
|
|
4559
4562
|
onResponse: (response) => {
|
|
4560
4563
|
cliAdmissionSupported = response.headers.get(_chunkMJTVX4QKjs.CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
|
|
4561
4564
|
}
|
|
@@ -4564,7 +4567,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4564
4567
|
if (event.scope === "play") yield event;
|
|
4565
4568
|
}
|
|
4566
4569
|
} catch (error) {
|
|
4567
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4570
|
+
if (_optionalChain([options, 'optionalAccess', _216 => _216.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkLFQJW4S2js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
4568
4571
|
if (options.callerIntentV2) {
|
|
4569
4572
|
submitted = false;
|
|
4570
4573
|
throw new (0, _chunkMJTVX4QKjs.CliPlayAdmissionCallerIntentV2UnsupportedError)(
|
|
@@ -4602,7 +4605,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4602
4605
|
*/
|
|
4603
4606
|
async *startPlayRunStream(request, options) {
|
|
4604
4607
|
const prepared = await this.preparePlayRunAdmission(request, options);
|
|
4605
|
-
yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess',
|
|
4608
|
+
yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess', _217 => _217.signal]) });
|
|
4606
4609
|
}
|
|
4607
4610
|
/**
|
|
4608
4611
|
* Register a bundled play artifact.
|
|
@@ -4755,7 +4758,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4755
4758
|
compilerManifest,
|
|
4756
4759
|
...input.input ? { input: input.input } : {},
|
|
4757
4760
|
...input.inputFile ? { inputFile: input.inputFile } : {},
|
|
4758
|
-
..._optionalChain([input, 'access',
|
|
4761
|
+
..._optionalChain([input, 'access', _218 => _218.packagedFiles, 'optionalAccess', _219 => _219.length]) ? { packagedFiles: input.packagedFiles } : {},
|
|
4759
4762
|
...input.force ? { force: true } : {},
|
|
4760
4763
|
...input.forceToolRefresh ? { forceToolRefresh: true } : {}
|
|
4761
4764
|
});
|
|
@@ -4785,29 +4788,29 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4785
4788
|
* ```
|
|
4786
4789
|
*/
|
|
4787
4790
|
async submitPlay(code, csvPath, name, options) {
|
|
4788
|
-
const runtimeInput = _optionalChain([options, 'optionalAccess',
|
|
4791
|
+
const runtimeInput = _optionalChain([options, 'optionalAccess', _220 => _220.input]) ? { ...options.input } : {};
|
|
4789
4792
|
if (csvPath) {
|
|
4790
4793
|
runtimeInput.file = csvPath;
|
|
4791
4794
|
}
|
|
4792
|
-
const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4793
|
-
const artifact = _optionalChain([options, 'optionalAccess',
|
|
4794
|
-
if (!_optionalChain([name, 'optionalAccess',
|
|
4795
|
+
const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _221 => _221.sourceCode]), () => ( code));
|
|
4796
|
+
const artifact = _optionalChain([options, 'optionalAccess', _222 => _222.artifact]);
|
|
4797
|
+
if (!_optionalChain([name, 'optionalAccess', _223 => _223.trim, 'call', _224 => _224()])) {
|
|
4795
4798
|
throw new Error("submitPlay requires a play name.");
|
|
4796
4799
|
}
|
|
4797
4800
|
if (!artifact) {
|
|
4798
4801
|
throw new Error("submitPlay requires a bundled play artifact.");
|
|
4799
4802
|
}
|
|
4800
|
-
const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async
|
|
4803
|
+
const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _225 => _225.compilerManifest]), async () => ( await this.compilePlayManifest({
|
|
4801
4804
|
name,
|
|
4802
4805
|
sourceCode,
|
|
4803
|
-
sourceFiles: _optionalChain([options, 'optionalAccess',
|
|
4806
|
+
sourceFiles: _optionalChain([options, 'optionalAccess', _226 => _226.sourceFiles]),
|
|
4804
4807
|
artifact
|
|
4805
4808
|
})));
|
|
4806
4809
|
const registeredArtifact = await this.registerPlayArtifact({
|
|
4807
4810
|
name,
|
|
4808
4811
|
sourceCode,
|
|
4809
|
-
sourceFiles: _optionalChain([options, 'optionalAccess',
|
|
4810
|
-
description: _optionalChain([options, 'optionalAccess',
|
|
4812
|
+
sourceFiles: _optionalChain([options, 'optionalAccess', _227 => _227.sourceFiles]),
|
|
4813
|
+
description: _optionalChain([options, 'optionalAccess', _228 => _228.description]),
|
|
4811
4814
|
artifact,
|
|
4812
4815
|
compilerManifest,
|
|
4813
4816
|
publish: false
|
|
@@ -4821,17 +4824,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4821
4824
|
name,
|
|
4822
4825
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
4823
4826
|
sourceCode,
|
|
4824
|
-
description: _optionalChain([options, 'optionalAccess',
|
|
4827
|
+
description: _optionalChain([options, 'optionalAccess', _229 => _229.description]),
|
|
4825
4828
|
staticPipeline: _nullishCoalesce(registeredArtifact.staticPipeline, () => ( null)),
|
|
4826
4829
|
artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
|
|
4827
4830
|
graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
|
|
4828
4831
|
runtimeArtifact: artifact,
|
|
4829
4832
|
compilerManifest,
|
|
4830
4833
|
...Object.keys(runtimeInput).length > 0 ? { input: runtimeInput } : {},
|
|
4831
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4832
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4833
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4834
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4834
|
+
..._optionalChain([options, 'optionalAccess', _230 => _230.inputFile]) ? { inputFile: options.inputFile } : {},
|
|
4835
|
+
..._optionalChain([options, 'optionalAccess', _231 => _231.packagedFiles, 'optionalAccess', _232 => _232.length]) ? { packagedFiles: options.packagedFiles } : {},
|
|
4836
|
+
..._optionalChain([options, 'optionalAccess', _233 => _233.force]) ? { force: true } : {},
|
|
4837
|
+
..._optionalChain([options, 'optionalAccess', _234 => _234.forceToolRefresh]) ? { forceToolRefresh: true } : {}
|
|
4835
4838
|
});
|
|
4836
4839
|
}
|
|
4837
4840
|
/**
|
|
@@ -4907,13 +4910,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4907
4910
|
for await (const event of watchRunEvents({
|
|
4908
4911
|
http: this.http,
|
|
4909
4912
|
runId: workflowId,
|
|
4910
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4911
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4912
|
-
onRetry: _optionalChain([options, 'optionalAccess',
|
|
4913
|
-
deferLogs: _optionalChain([options, 'optionalAccess',
|
|
4914
|
-
omitTerminalLogs: _optionalChain([options, 'optionalAccess',
|
|
4915
|
-
onPoll: _optionalChain([options, 'optionalAccess',
|
|
4916
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4913
|
+
signal: _optionalChain([options, 'optionalAccess', _235 => _235.signal]),
|
|
4914
|
+
onNotice: _optionalChain([options, 'optionalAccess', _236 => _236.onNotice]),
|
|
4915
|
+
onRetry: _optionalChain([options, 'optionalAccess', _237 => _237.onRetry]),
|
|
4916
|
+
deferLogs: _optionalChain([options, 'optionalAccess', _238 => _238.deferLogs]),
|
|
4917
|
+
omitTerminalLogs: _optionalChain([options, 'optionalAccess', _239 => _239.omitTerminalLogs]),
|
|
4918
|
+
onPoll: _optionalChain([options, 'optionalAccess', _240 => _240.onPoll]),
|
|
4919
|
+
..._optionalChain([options, 'optionalAccess', _241 => _241.terminalStatus]) ? {
|
|
4917
4920
|
terminalStatus: {
|
|
4918
4921
|
...options.terminalStatus,
|
|
4919
4922
|
onStatus: async (raw, expectedStatus) => {
|
|
@@ -4923,7 +4926,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4923
4926
|
`Run watch returned a mismatched terminal status for ${workflowId}.`
|
|
4924
4927
|
);
|
|
4925
4928
|
}
|
|
4926
|
-
await _optionalChain([options, 'access',
|
|
4929
|
+
await _optionalChain([options, 'access', _242 => _242.terminalStatus, 'optionalAccess', _243 => _243.onStatus, 'call', _244 => _244(status)]);
|
|
4927
4930
|
}
|
|
4928
4931
|
}
|
|
4929
4932
|
} : {}
|
|
@@ -4938,12 +4941,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4938
4941
|
* @deprecated Use `watchRunEvents` for ordinary run watching.
|
|
4939
4942
|
*/
|
|
4940
4943
|
async *streamPlayRunEvents(workflowId, options) {
|
|
4941
|
-
const headers = _optionalChain([options, 'optionalAccess',
|
|
4944
|
+
const headers = _optionalChain([options, 'optionalAccess', _245 => _245.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
4942
4945
|
const params = new URLSearchParams();
|
|
4943
|
-
params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4946
|
+
params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _246 => _246.mode]), () => ( "cli")));
|
|
4944
4947
|
for await (const event of this.http.streamSse(
|
|
4945
4948
|
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
4946
|
-
{ signal: _optionalChain([options, 'optionalAccess',
|
|
4949
|
+
{ signal: _optionalChain([options, 'optionalAccess', _247 => _247.signal]), headers }
|
|
4947
4950
|
)) {
|
|
4948
4951
|
if (event.scope === "play") {
|
|
4949
4952
|
yield event;
|
|
@@ -4959,8 +4962,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4959
4962
|
*/
|
|
4960
4963
|
async *observeRunEvents(runId, options) {
|
|
4961
4964
|
yield* this.watchRunEvents(runId, {
|
|
4962
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4963
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4965
|
+
signal: _optionalChain([options, 'optionalAccess', _248 => _248.signal]),
|
|
4966
|
+
onNotice: _optionalChain([options, 'optionalAccess', _249 => _249.onNotice])
|
|
4964
4967
|
});
|
|
4965
4968
|
}
|
|
4966
4969
|
/** Poll snapshots to terminal status and return the durable package. */
|
|
@@ -4968,9 +4971,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4968
4971
|
let terminalObserved = false;
|
|
4969
4972
|
let terminalStatus = null;
|
|
4970
4973
|
for await (const event of this.watchRunEvents(runId, {
|
|
4971
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4972
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4973
|
-
onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4974
|
+
signal: _optionalChain([options, 'optionalAccess', _250 => _250.signal]),
|
|
4975
|
+
onNotice: _optionalChain([options, 'optionalAccess', _251 => _251.onNotice]),
|
|
4976
|
+
onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _252 => _252.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _253 => _253.onReconnect]))),
|
|
4974
4977
|
terminalStatus: {
|
|
4975
4978
|
runStatus: true,
|
|
4976
4979
|
onStatus: (status) => {
|
|
@@ -4978,12 +4981,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4978
4981
|
}
|
|
4979
4982
|
}
|
|
4980
4983
|
})) {
|
|
4981
|
-
_optionalChain([options, 'optionalAccess',
|
|
4984
|
+
_optionalChain([options, 'optionalAccess', _254 => _254.onEvent, 'optionalCall', _255 => _255(event)]);
|
|
4982
4985
|
if (_chunkMJTVX4QKjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
|
|
4983
4986
|
terminalObserved = true;
|
|
4984
4987
|
}
|
|
4985
4988
|
}
|
|
4986
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4989
|
+
if (_optionalChain([options, 'optionalAccess', _256 => _256.signal, 'optionalAccess', _257 => _257.aborted])) {
|
|
4987
4990
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
|
|
4988
4991
|
}
|
|
4989
4992
|
const refreshed = await _asyncNullishCoalesce(terminalStatus, async () => ( await this.getRunStatus(runId)));
|
|
@@ -5063,7 +5066,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5063
5066
|
/** List the org's workflows. `GET /api/v2/workflows`. */
|
|
5064
5067
|
async listWorkflows(options) {
|
|
5065
5068
|
const params = new URLSearchParams();
|
|
5066
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
5069
|
+
if (typeof _optionalChain([options, 'optionalAccess', _258 => _258.limit]) === "number") {
|
|
5067
5070
|
params.set("limit", String(options.limit));
|
|
5068
5071
|
}
|
|
5069
5072
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -5116,7 +5119,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5116
5119
|
/** List a workflow's runs. `GET /api/v2/workflows/:id/runs`. */
|
|
5117
5120
|
async listWorkflowRuns(id, options) {
|
|
5118
5121
|
const params = new URLSearchParams();
|
|
5119
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
5122
|
+
if (typeof _optionalChain([options, 'optionalAccess', _259 => _259.limit]) === "number") {
|
|
5120
5123
|
params.set("limit", String(options.limit));
|
|
5121
5124
|
}
|
|
5122
5125
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -5152,16 +5155,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5152
5155
|
*/
|
|
5153
5156
|
async getRunStatus(runId, options) {
|
|
5154
5157
|
const params = new URLSearchParams();
|
|
5155
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5158
|
+
if (_optionalChain([options, 'optionalAccess', _260 => _260.full]) === true) {
|
|
5156
5159
|
params.set("full", "true");
|
|
5157
5160
|
}
|
|
5158
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5161
|
+
if (_optionalChain([options, 'optionalAccess', _261 => _261.configuration]) === true) {
|
|
5159
5162
|
params.append("include", "configuration");
|
|
5160
5163
|
}
|
|
5161
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5164
|
+
if (_optionalChain([options, 'optionalAccess', _262 => _262.performance]) === true) {
|
|
5162
5165
|
params.append("include", "performance");
|
|
5163
5166
|
}
|
|
5164
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5167
|
+
if (_optionalChain([options, 'optionalAccess', _263 => _263.retries]) === true) {
|
|
5165
5168
|
params.append("include", "retries");
|
|
5166
5169
|
}
|
|
5167
5170
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -5169,7 +5172,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5169
5172
|
`/api/v2/runs/${encodeURIComponent(runId)}${query}`,
|
|
5170
5173
|
{ headers: { "x-deepline-run-status": "1" } }
|
|
5171
5174
|
);
|
|
5172
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5175
|
+
if (_optionalChain([options, 'optionalAccess', _264 => _264.configuration]) === true && !Object.hasOwn(response, "contract")) {
|
|
5173
5176
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5174
5177
|
"This server does not support recorded configuration reads.",
|
|
5175
5178
|
void 0,
|
|
@@ -5177,7 +5180,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5177
5180
|
);
|
|
5178
5181
|
}
|
|
5179
5182
|
const status = normalizePlayStatus(response);
|
|
5180
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5183
|
+
if (_optionalChain([options, 'optionalAccess', _265 => _265.failedLogs]) !== true || status.status !== "failed") {
|
|
5181
5184
|
return status;
|
|
5182
5185
|
}
|
|
5183
5186
|
const requestedFailedLogLimit = typeof options.failedLogLimit === "number" && Number.isFinite(options.failedLogLimit) ? Math.max(1, Math.floor(options.failedLogLimit)) : RUNS_FAILED_LOG_LIMIT;
|
|
@@ -5266,7 +5269,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5266
5269
|
/** The same tenant-scoped run history searched by the dashboard and CLI. */
|
|
5267
5270
|
async getRunsHistory(options = {}) {
|
|
5268
5271
|
const params = new URLSearchParams();
|
|
5269
|
-
const search = _optionalChain([options, 'access',
|
|
5272
|
+
const search = _optionalChain([options, 'access', _266 => _266.search, 'optionalAccess', _267 => _267.trim, 'call', _268 => _268()]);
|
|
5270
5273
|
if (search && search.length > 200) {
|
|
5271
5274
|
throw new Error("Run search must be at most 200 characters.");
|
|
5272
5275
|
}
|
|
@@ -5292,16 +5295,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5292
5295
|
}
|
|
5293
5296
|
/** Read one run page without discarding server pagination metadata. */
|
|
5294
5297
|
async listRunsPage(options) {
|
|
5295
|
-
const playName = _optionalChain([options, 'access',
|
|
5298
|
+
const playName = _optionalChain([options, 'access', _269 => _269.play, 'optionalAccess', _270 => _270.trim, 'call', _271 => _271()]);
|
|
5296
5299
|
const params = new URLSearchParams();
|
|
5297
5300
|
if (playName) {
|
|
5298
5301
|
params.set("play", playName);
|
|
5299
5302
|
}
|
|
5300
|
-
const status = _optionalChain([options, 'access',
|
|
5303
|
+
const status = _optionalChain([options, 'access', _272 => _272.status, 'optionalAccess', _273 => _273.trim, 'call', _274 => _274()]);
|
|
5301
5304
|
if (status) {
|
|
5302
5305
|
params.set("status", status);
|
|
5303
5306
|
}
|
|
5304
|
-
const node = _optionalChain([options, 'access',
|
|
5307
|
+
const node = _optionalChain([options, 'access', _275 => _275.node, 'optionalAccess', _276 => _276.trim, 'call', _277 => _277()]);
|
|
5305
5308
|
if (node) {
|
|
5306
5309
|
if (!playName)
|
|
5307
5310
|
throw new Error("runs.list options.node requires options.play.");
|
|
@@ -5384,8 +5387,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5384
5387
|
* A different key starts another rerun.
|
|
5385
5388
|
*/
|
|
5386
5389
|
async rerun(runId, options) {
|
|
5387
|
-
const idempotencyKey = _optionalChain([options, 'optionalAccess',
|
|
5388
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5390
|
+
const idempotencyKey = _optionalChain([options, 'optionalAccess', _278 => _278.idempotencyKey, 'optionalAccess', _279 => _279.trim, 'call', _280 => _280()]);
|
|
5391
|
+
if (_optionalChain([options, 'optionalAccess', _281 => _281.idempotencyKey]) !== void 0 && !idempotencyKey) {
|
|
5389
5392
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5390
5393
|
"runs.rerun idempotencyKey must not be empty.",
|
|
5391
5394
|
void 0,
|
|
@@ -5394,7 +5397,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5394
5397
|
}
|
|
5395
5398
|
return this.http.post(
|
|
5396
5399
|
`/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
|
|
5397
|
-
_optionalChain([options, 'optionalAccess',
|
|
5400
|
+
_optionalChain([options, 'optionalAccess', _282 => _282.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
|
|
5398
5401
|
{ "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
|
|
5399
5402
|
);
|
|
5400
5403
|
}
|
|
@@ -5421,21 +5424,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5421
5424
|
* ```
|
|
5422
5425
|
*/
|
|
5423
5426
|
async getRunLogs(runId, options) {
|
|
5424
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5427
|
+
if (_optionalChain([options, 'optionalAccess', _283 => _283.all]) === true && options.failed === true) {
|
|
5425
5428
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5426
5429
|
"runs.logs cannot combine all and failed views.",
|
|
5427
5430
|
void 0,
|
|
5428
5431
|
"INVALID_RUN_LOG_VIEW"
|
|
5429
5432
|
);
|
|
5430
5433
|
}
|
|
5431
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5434
|
+
if (_optionalChain([options, 'optionalAccess', _284 => _284.cursor]) !== void 0 && options.failed === true) {
|
|
5432
5435
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5433
5436
|
"runs.logs cannot combine failed with cursor.",
|
|
5434
5437
|
void 0,
|
|
5435
5438
|
"INVALID_RUN_LOG_VIEW"
|
|
5436
5439
|
);
|
|
5437
5440
|
}
|
|
5438
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5441
|
+
if (_optionalChain([options, 'optionalAccess', _285 => _285.failed]) === true) {
|
|
5439
5442
|
const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
|
|
5440
5443
|
const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
|
|
5441
5444
|
const page = await this.http.get(
|
|
@@ -5460,18 +5463,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5460
5463
|
...page.logsTruncated ? { logsTruncated: true } : {}
|
|
5461
5464
|
};
|
|
5462
5465
|
}
|
|
5463
|
-
const beforeSequence = _optionalChain([options, 'optionalAccess',
|
|
5464
|
-
const limit = _optionalChain([options, 'optionalAccess',
|
|
5466
|
+
const beforeSequence = _optionalChain([options, 'optionalAccess', _286 => _286.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
|
|
5467
|
+
const limit = _optionalChain([options, 'optionalAccess', _287 => _287.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _288 => _288.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
|
|
5465
5468
|
const fetchPage = (afterSeq2, pageLimit) => this.http.get(
|
|
5466
5469
|
`/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
|
|
5467
5470
|
{ retryApiErrors: true }
|
|
5468
5471
|
);
|
|
5469
5472
|
const probe = await fetchPage(0, 1);
|
|
5470
5473
|
const lastStoredSeq = probe.lastStoredSeq;
|
|
5471
|
-
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access',
|
|
5474
|
+
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _289 => _289.entries, 'access', _290 => _290[0], 'optionalAccess', _291 => _291.seq]), () => ( null));
|
|
5472
5475
|
const upperSeq = beforeSequence === null ? lastStoredSeq : Math.min(beforeSequence - 1, lastStoredSeq);
|
|
5473
5476
|
const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
|
|
5474
|
-
let afterSeq = _optionalChain([options, 'optionalAccess',
|
|
5477
|
+
let afterSeq = _optionalChain([options, 'optionalAccess', _292 => _292.all]) ? 0 : Math.max(0, windowEndSeq - limit);
|
|
5475
5478
|
const entries = [];
|
|
5476
5479
|
while (entries.length < limit && afterSeq < upperSeq) {
|
|
5477
5480
|
const page = await fetchPage(
|
|
@@ -5505,7 +5508,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5505
5508
|
hasMore: olderLinesExist,
|
|
5506
5509
|
nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
|
|
5507
5510
|
entries: entries.map((entry) => entry.line),
|
|
5508
|
-
view: _optionalChain([options, 'optionalAccess',
|
|
5511
|
+
view: _optionalChain([options, 'optionalAccess', _293 => _293.all]) ? "all" : "tail",
|
|
5509
5512
|
...probe.logsTruncated ? { logsTruncated: true } : {}
|
|
5510
5513
|
};
|
|
5511
5514
|
}
|
|
@@ -5681,7 +5684,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5681
5684
|
limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
|
|
5682
5685
|
offset: String(_nullishCoalesce(input.offset, () => ( 0)))
|
|
5683
5686
|
});
|
|
5684
|
-
if (_optionalChain([input, 'access',
|
|
5687
|
+
if (_optionalChain([input, 'access', _294 => _294.runId, 'optionalAccess', _295 => _295.trim, 'call', _296 => _296()])) {
|
|
5685
5688
|
params.set("runId", input.runId.trim());
|
|
5686
5689
|
}
|
|
5687
5690
|
if (input.rowMode === "all" || input.rowMode === "live") {
|
|
@@ -5694,9 +5697,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5694
5697
|
`/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
|
|
5695
5698
|
{ signal: input.signal }
|
|
5696
5699
|
);
|
|
5697
|
-
const requestedRunId = _optionalChain([input, 'access',
|
|
5700
|
+
const requestedRunId = _optionalChain([input, 'access', _297 => _297.runId, 'optionalAccess', _298 => _298.trim, 'call', _299 => _299()]) || "";
|
|
5698
5701
|
if (requestedRunId) {
|
|
5699
|
-
const confirmedRunId = _optionalChain([result, 'access',
|
|
5702
|
+
const confirmedRunId = _optionalChain([result, 'access', _300 => _300.scope, 'optionalAccess', _301 => _301.kind]) === "run" ? result.scope.runId.trim() : "";
|
|
5700
5703
|
const foreignRowRunIds = [
|
|
5701
5704
|
...new Set(
|
|
5702
5705
|
result.rows.map(
|
|
@@ -5704,7 +5707,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5704
5707
|
).filter((runId) => runId && runId !== requestedRunId)
|
|
5705
5708
|
)
|
|
5706
5709
|
];
|
|
5707
|
-
if (_optionalChain([result, 'access',
|
|
5710
|
+
if (_optionalChain([result, 'access', _302 => _302.scope, 'optionalAccess', _303 => _303.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
|
|
5708
5711
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5709
5712
|
`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.`,
|
|
5710
5713
|
void 0,
|
|
@@ -5733,7 +5736,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5733
5736
|
async stopRun(runId, options) {
|
|
5734
5737
|
return this.http.post(
|
|
5735
5738
|
`/api/v2/runs/${encodeURIComponent(runId)}/stop`,
|
|
5736
|
-
_optionalChain([options, 'optionalAccess',
|
|
5739
|
+
_optionalChain([options, 'optionalAccess', _304 => _304.reason]) ? { reason: options.reason } : {}
|
|
5737
5740
|
);
|
|
5738
5741
|
}
|
|
5739
5742
|
/**
|
|
@@ -5751,11 +5754,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5751
5754
|
* The method clears workspace run-slot state without requiring each run ID.
|
|
5752
5755
|
*/
|
|
5753
5756
|
async stopAllRuns(options) {
|
|
5754
|
-
const dryRun = _optionalChain([options, 'optionalAccess',
|
|
5757
|
+
const dryRun = _optionalChain([options, 'optionalAccess', _305 => _305.dryRun]) === true;
|
|
5755
5758
|
const result = await this.http.post(
|
|
5756
5759
|
"/api/v2/runs/stop-all",
|
|
5757
5760
|
{
|
|
5758
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5761
|
+
..._optionalChain([options, 'optionalAccess', _306 => _306.reason]) ? { reason: options.reason } : {},
|
|
5759
5762
|
...dryRun ? { dryRun: true } : {}
|
|
5760
5763
|
}
|
|
5761
5764
|
);
|
|
@@ -5776,7 +5779,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5776
5779
|
* `origin: "owned"` for org-owned plays.
|
|
5777
5780
|
*/
|
|
5778
5781
|
async listPlays(options) {
|
|
5779
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
5782
|
+
if (!_optionalChain([options, 'optionalAccess', _307 => _307.grep, 'optionalAccess', _308 => _308.trim, 'call', _309 => _309()])) {
|
|
5780
5783
|
return (await this.requestPlaysPage(options, false)).plays;
|
|
5781
5784
|
}
|
|
5782
5785
|
const plays = [];
|
|
@@ -5798,46 +5801,46 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5798
5801
|
}
|
|
5799
5802
|
async requestPlaysPage(options, paginateInventory = true) {
|
|
5800
5803
|
const params = new URLSearchParams();
|
|
5801
|
-
if (paginateInventory && !_optionalChain([options, 'optionalAccess',
|
|
5804
|
+
if (paginateInventory && !_optionalChain([options, 'optionalAccess', _310 => _310.grep, 'optionalAccess', _311 => _311.trim, 'call', _312 => _312()]))
|
|
5802
5805
|
params.set("inventory_paginated", "1");
|
|
5803
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5804
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5805
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5806
|
+
if (_optionalChain([options, 'optionalAccess', _313 => _313.origin])) params.set("origin", options.origin);
|
|
5807
|
+
if (_optionalChain([options, 'optionalAccess', _314 => _314.summaryOnly])) params.set("summary_only", "1");
|
|
5808
|
+
if (_optionalChain([options, 'optionalAccess', _315 => _315.categories])) {
|
|
5806
5809
|
params.set(
|
|
5807
5810
|
"categories",
|
|
5808
5811
|
Array.isArray(options.categories) ? options.categories.join(",") : options.categories
|
|
5809
5812
|
);
|
|
5810
5813
|
}
|
|
5811
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5814
|
+
if (_optionalChain([options, 'optionalAccess', _316 => _316.categories]) || _optionalChain([options, 'optionalAccess', _317 => _317.includeToolCategories])) {
|
|
5812
5815
|
params.set("include_tool_categories", "1");
|
|
5813
5816
|
}
|
|
5814
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5817
|
+
if (_optionalChain([options, 'optionalAccess', _318 => _318.tags])) {
|
|
5815
5818
|
params.set(
|
|
5816
5819
|
"tags",
|
|
5817
5820
|
Array.isArray(options.tags) ? options.tags.join(",") : options.tags
|
|
5818
5821
|
);
|
|
5819
5822
|
}
|
|
5820
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5821
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5823
|
+
if (_optionalChain([options, 'optionalAccess', _319 => _319.includeArchived])) params.set("include_archived", "1");
|
|
5824
|
+
if (_optionalChain([options, 'optionalAccess', _320 => _320.includeCostEstimates])) {
|
|
5822
5825
|
params.set("include_cost_estimates", "1");
|
|
5823
5826
|
}
|
|
5824
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5827
|
+
if (_optionalChain([options, 'optionalAccess', _321 => _321.grep, 'optionalAccess', _322 => _322.trim, 'call', _323 => _323()])) {
|
|
5825
5828
|
params.set("grep", options.grep.trim());
|
|
5826
5829
|
params.set("limit", "60");
|
|
5827
5830
|
}
|
|
5828
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5831
|
+
if (_optionalChain([options, 'optionalAccess', _324 => _324.limit]) !== void 0) {
|
|
5829
5832
|
if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
|
|
5830
5833
|
throw new Error("Play page limit must be a positive integer");
|
|
5831
5834
|
}
|
|
5832
5835
|
params.set("limit", String(options.limit));
|
|
5833
5836
|
}
|
|
5834
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5837
|
+
if (_optionalChain([options, 'optionalAccess', _325 => _325.cursor])) params.set("cursor", options.cursor);
|
|
5835
5838
|
const suffix = params.size ? `?${params.toString()}` : "";
|
|
5836
5839
|
const response = await this.http.get(`/api/v2/plays${suffix}`);
|
|
5837
5840
|
return {
|
|
5838
5841
|
plays: _nullishCoalesce(response.plays, () => ( [])),
|
|
5839
|
-
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5840
|
-
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5842
|
+
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _326 => _326.pagination, 'optionalAccess', _327 => _327.cursor]), () => ( response.cursor)), () => ( null)),
|
|
5843
|
+
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _328 => _328.pagination, 'optionalAccess', _329 => _329.hasMore]), () => ( response.hasMore)))
|
|
5841
5844
|
};
|
|
5842
5845
|
}
|
|
5843
5846
|
/** Read definition-level settings, independently of code revisions. */
|
|
@@ -5948,7 +5951,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5948
5951
|
}
|
|
5949
5952
|
async listWorkspaceConnectionInventory(provider, options) {
|
|
5950
5953
|
const params = new URLSearchParams({
|
|
5951
|
-
view: _optionalChain([options, 'optionalAccess',
|
|
5954
|
+
view: _optionalChain([options, 'optionalAccess', _330 => _330.authorizationsOnly]) ? "authorizations" : "inventory"
|
|
5952
5955
|
});
|
|
5953
5956
|
if (provider) params.set("provider", provider);
|
|
5954
5957
|
return this.http.get(`/api/v2/integrations/connections?${params}`);
|
|
@@ -6014,8 +6017,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6014
6017
|
return this.http.post("/api/v2/integrations/connect", {
|
|
6015
6018
|
provider,
|
|
6016
6019
|
credentials,
|
|
6017
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6018
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6020
|
+
..._optionalChain([options, 'optionalAccess', _331 => _331.expectedConnectionId]) ? { expected_connection_id: options.expectedConnectionId } : {},
|
|
6021
|
+
..._optionalChain([options, 'optionalAccess', _332 => _332.teamId]) ? { team_id: options.teamId } : {}
|
|
6019
6022
|
});
|
|
6020
6023
|
}
|
|
6021
6024
|
/**
|
|
@@ -6050,7 +6053,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6050
6053
|
* connects the org default.
|
|
6051
6054
|
*/
|
|
6052
6055
|
async startIntegrationOAuth(provider, options = {}) {
|
|
6053
|
-
const scopes = _optionalChain([options, 'access',
|
|
6056
|
+
const scopes = _optionalChain([options, 'access', _333 => _333.scopes, 'optionalAccess', _334 => _334.map, 'call', _335 => _335((scope) => scope.trim()), 'access', _336 => _336.filter, 'call', _337 => _337(Boolean)]);
|
|
6054
6057
|
if (scopes !== void 0 && scopes.length === 0) {
|
|
6055
6058
|
throw new Error("scopes must contain at least one OAuth scope.");
|
|
6056
6059
|
}
|
|
@@ -6067,8 +6070,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6067
6070
|
return this.http.post("/api/v2/integrations/connect", {
|
|
6068
6071
|
provider: "slack",
|
|
6069
6072
|
scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
|
|
6070
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6071
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6073
|
+
..._optionalChain([options, 'optionalAccess', _338 => _338.successUrl]) ? { success_url: options.successUrl } : {},
|
|
6074
|
+
..._optionalChain([options, 'optionalAccess', _339 => _339.failureUrl]) ? { failure_url: options.failureUrl } : {}
|
|
6072
6075
|
});
|
|
6073
6076
|
}
|
|
6074
6077
|
/** List Slack channels visible to the connected Deepline Slack app. */
|
|
@@ -6143,7 +6146,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6143
6146
|
}
|
|
6144
6147
|
const targets = input.targets.map(parseNotificationGroupTarget);
|
|
6145
6148
|
const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
|
|
6146
|
-
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access',
|
|
6149
|
+
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _340 => _340[0], 'optionalAccess', _341 => _341.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
|
|
6147
6150
|
if (legacyEvents.length > 0 && !legacyTarget) {
|
|
6148
6151
|
throw new Error(
|
|
6149
6152
|
"--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
|
|
@@ -6179,7 +6182,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6179
6182
|
const existingGroup = current.configuration.groups.find(
|
|
6180
6183
|
(candidate) => candidate.name.toLowerCase() === name.toLowerCase()
|
|
6181
6184
|
);
|
|
6182
|
-
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess',
|
|
6185
|
+
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _342 => _342.groupKey]), () => ( notificationObjectKey("group")));
|
|
6183
6186
|
const group = _nullishCoalesce(existingGroup, () => ( {
|
|
6184
6187
|
groupKey,
|
|
6185
6188
|
name,
|
|
@@ -6407,7 +6410,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6407
6410
|
/** Read one trigger inventory page without loading run histories. */
|
|
6408
6411
|
async listPlayTriggerInventory(options) {
|
|
6409
6412
|
const params = new URLSearchParams({ view: "inventory" });
|
|
6410
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6413
|
+
if (_optionalChain([options, 'optionalAccess', _343 => _343.cursor])) params.set("cursor", options.cursor);
|
|
6411
6414
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
6412
6415
|
}
|
|
6413
6416
|
/** Read one trigger's recent runs, with an explicit partial-history flag. */
|
|
@@ -6416,7 +6419,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6416
6419
|
view: "history",
|
|
6417
6420
|
binding_id: bindingId
|
|
6418
6421
|
});
|
|
6419
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6422
|
+
if (_optionalChain([options, 'optionalAccess', _344 => _344.limit]) !== void 0)
|
|
6420
6423
|
params.set("history_limit", String(options.limit));
|
|
6421
6424
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
6422
6425
|
}
|
|
@@ -6604,14 +6607,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6604
6607
|
*/
|
|
6605
6608
|
async runPlay(code, csvPath, name, options) {
|
|
6606
6609
|
const { workflowId } = await this.submitPlay(code, csvPath, name, {
|
|
6607
|
-
input: _optionalChain([options, 'optionalAccess',
|
|
6608
|
-
sourceCode: _optionalChain([options, 'optionalAccess',
|
|
6609
|
-
artifact: _optionalChain([options, 'optionalAccess',
|
|
6610
|
-
compilerManifest: _optionalChain([options, 'optionalAccess',
|
|
6611
|
-
inputFile: _optionalChain([options, 'optionalAccess',
|
|
6612
|
-
packagedFiles: _optionalChain([options, 'optionalAccess',
|
|
6613
|
-
force: _optionalChain([options, 'optionalAccess',
|
|
6614
|
-
forceToolRefresh: _optionalChain([options, 'optionalAccess',
|
|
6610
|
+
input: _optionalChain([options, 'optionalAccess', _345 => _345.input]),
|
|
6611
|
+
sourceCode: _optionalChain([options, 'optionalAccess', _346 => _346.sourceCode]),
|
|
6612
|
+
artifact: _optionalChain([options, 'optionalAccess', _347 => _347.artifact]),
|
|
6613
|
+
compilerManifest: _optionalChain([options, 'optionalAccess', _348 => _348.compilerManifest]),
|
|
6614
|
+
inputFile: _optionalChain([options, 'optionalAccess', _349 => _349.inputFile]),
|
|
6615
|
+
packagedFiles: _optionalChain([options, 'optionalAccess', _350 => _350.packagedFiles]),
|
|
6616
|
+
force: _optionalChain([options, 'optionalAccess', _351 => _351.force]),
|
|
6617
|
+
forceToolRefresh: _optionalChain([options, 'optionalAccess', _352 => _352.forceToolRefresh])
|
|
6615
6618
|
});
|
|
6616
6619
|
const start = Date.now();
|
|
6617
6620
|
const state = {
|
|
@@ -6622,7 +6625,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6622
6625
|
latest: null
|
|
6623
6626
|
};
|
|
6624
6627
|
let terminalObserved = null;
|
|
6625
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6628
|
+
if (_optionalChain([options, 'optionalAccess', _353 => _353.signal, 'optionalAccess', _354 => _354.aborted])) {
|
|
6626
6629
|
await this.cancelPlay(workflowId);
|
|
6627
6630
|
return {
|
|
6628
6631
|
success: false,
|
|
@@ -6633,9 +6636,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6633
6636
|
};
|
|
6634
6637
|
}
|
|
6635
6638
|
for await (const event of this.watchRunEvents(workflowId, {
|
|
6636
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
6639
|
+
signal: _optionalChain([options, 'optionalAccess', _355 => _355.signal])
|
|
6637
6640
|
})) {
|
|
6638
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6641
|
+
if (_optionalChain([options, 'optionalAccess', _356 => _356.signal, 'optionalAccess', _357 => _357.aborted])) {
|
|
6639
6642
|
await this.cancelPlay(workflowId);
|
|
6640
6643
|
return {
|
|
6641
6644
|
success: false,
|
|
@@ -6645,19 +6648,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6645
6648
|
error: "Cancelled by user"
|
|
6646
6649
|
};
|
|
6647
6650
|
}
|
|
6648
|
-
const previousStatus = _optionalChain([state, 'access',
|
|
6651
|
+
const previousStatus = _optionalChain([state, 'access', _358 => _358.latest, 'optionalAccess', _359 => _359.status]);
|
|
6649
6652
|
const status = updatePlayLiveStatusState(state, event);
|
|
6650
6653
|
if (!status) {
|
|
6651
6654
|
continue;
|
|
6652
6655
|
}
|
|
6653
6656
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
6654
|
-
_optionalChain([options, 'optionalAccess',
|
|
6657
|
+
_optionalChain([options, 'optionalAccess', _360 => _360.onProgress, 'optionalCall', _361 => _361(status)]);
|
|
6655
6658
|
}
|
|
6656
6659
|
if (_chunkMJTVX4QKjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
6657
6660
|
terminalObserved = status;
|
|
6658
6661
|
}
|
|
6659
6662
|
}
|
|
6660
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6663
|
+
if (_optionalChain([options, 'optionalAccess', _362 => _362.signal, 'optionalAccess', _363 => _363.aborted])) {
|
|
6661
6664
|
await this.cancelPlay(workflowId);
|
|
6662
6665
|
return {
|
|
6663
6666
|
success: false,
|
|
@@ -6710,7 +6713,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6710
6713
|
const response = await this.http.get(
|
|
6711
6714
|
`/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
|
|
6712
6715
|
);
|
|
6713
|
-
const event = _optionalChain([response, 'access',
|
|
6716
|
+
const event = _optionalChain([response, 'access', _364 => _364.entries, 'optionalAccess', _365 => _365[0]]);
|
|
6714
6717
|
if (!event) {
|
|
6715
6718
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6716
6719
|
"No usage event was found for this request_id.",
|
|
@@ -6885,7 +6888,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6885
6888
|
async cancelBillingSubscription(options) {
|
|
6886
6889
|
return this.http.post(
|
|
6887
6890
|
"/api/v2/billing/subscription/cancel",
|
|
6888
|
-
{ action: _optionalChain([options, 'optionalAccess',
|
|
6891
|
+
{ action: _optionalChain([options, 'optionalAccess', _366 => _366.undo]) ? "undo_cancel" : "cancel" }
|
|
6889
6892
|
);
|
|
6890
6893
|
}
|
|
6891
6894
|
/**
|
|
@@ -6897,7 +6900,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6897
6900
|
*/
|
|
6898
6901
|
async listBillingInvoices(options) {
|
|
6899
6902
|
const params = new URLSearchParams();
|
|
6900
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6903
|
+
if (_optionalChain([options, 'optionalAccess', _367 => _367.limit]) !== void 0) {
|
|
6901
6904
|
params.set("limit", String(options.limit));
|
|
6902
6905
|
}
|
|
6903
6906
|
const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
|
|
@@ -6908,7 +6911,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6908
6911
|
/** List the reviewed target plans and whether new acquisition is enabled. */
|
|
6909
6912
|
async getTargetBillingPlans(options) {
|
|
6910
6913
|
return this.http.get(
|
|
6911
|
-
_optionalChain([options, 'optionalAccess',
|
|
6914
|
+
_optionalChain([options, 'optionalAccess', _368 => _368.promoCode]) ? `/api/v2/billing/plans?promo_code=${encodeURIComponent(options.promoCode)}` : "/api/v2/billing/plans"
|
|
6912
6915
|
);
|
|
6913
6916
|
}
|
|
6914
6917
|
/** Read the workspace's normalized target plan, payment, and balance state. */
|
|
@@ -7014,7 +7017,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7014
7017
|
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
7015
7018
|
async createTargetBillingPortalSession(options) {
|
|
7016
7019
|
const response = await this.http.post(
|
|
7017
|
-
_optionalChain([options, 'optionalAccess',
|
|
7020
|
+
_optionalChain([options, 'optionalAccess', _369 => _369.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
|
|
7018
7021
|
{}
|
|
7019
7022
|
);
|
|
7020
7023
|
return response.data;
|
|
@@ -7064,8 +7067,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7064
7067
|
return this.http.request("/api/v2/monitors/audit", {
|
|
7065
7068
|
method: "POST",
|
|
7066
7069
|
body: {
|
|
7067
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7068
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7070
|
+
..._optionalChain([options, 'optionalAccess', _370 => _370.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
7071
|
+
..._optionalChain([options, 'optionalAccess', _371 => _371.cursor]) ? { cursor: options.cursor } : {}
|
|
7069
7072
|
},
|
|
7070
7073
|
maxRetries: 0
|
|
7071
7074
|
});
|
|
@@ -7075,8 +7078,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7075
7078
|
return this.http.request("/api/v2/monitors/repair", {
|
|
7076
7079
|
method: "POST",
|
|
7077
7080
|
body: {
|
|
7078
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7079
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7081
|
+
..._optionalChain([options, 'optionalAccess', _372 => _372.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
7082
|
+
..._optionalChain([options, 'optionalAccess', _373 => _373.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
|
|
7080
7083
|
},
|
|
7081
7084
|
maxRetries: 0
|
|
7082
7085
|
});
|
|
@@ -7084,7 +7087,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7084
7087
|
/** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
|
|
7085
7088
|
async readMonitorsHealth(options) {
|
|
7086
7089
|
const params = new URLSearchParams();
|
|
7087
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7090
|
+
if (_optionalChain([options, 'optionalAccess', _374 => _374.fleetId])) params.set("fleet_id", options.fleetId);
|
|
7088
7091
|
const query = params.toString();
|
|
7089
7092
|
const suffix = query ? `?${query}` : "";
|
|
7090
7093
|
return this.http.request(
|
|
@@ -7157,7 +7160,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7157
7160
|
);
|
|
7158
7161
|
}
|
|
7159
7162
|
const params = new URLSearchParams();
|
|
7160
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7163
|
+
if (_optionalChain([options, 'optionalAccess', _375 => _375.cursor])) params.set("cursor", options.cursor);
|
|
7161
7164
|
const suffix = params.size > 0 ? `?${params}` : "";
|
|
7162
7165
|
return this.http.request(
|
|
7163
7166
|
`/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
|
|
@@ -7204,7 +7207,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7204
7207
|
* a second charge. The submission is never replayed automatically.
|
|
7205
7208
|
*/
|
|
7206
7209
|
async previewMonitor(definition, options) {
|
|
7207
|
-
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7210
|
+
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _376 => _376.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _377 => _377.crypto, 'optionalAccess', _378 => _378.randomUUID, 'optionalCall', _379 => _379()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
|
|
7208
7211
|
try {
|
|
7209
7212
|
const result = await this.http.request(
|
|
7210
7213
|
"/api/v2/monitors/preview",
|
|
@@ -7212,7 +7215,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7212
7215
|
method: "POST",
|
|
7213
7216
|
body: {
|
|
7214
7217
|
...definition,
|
|
7215
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7218
|
+
..._optionalChain([options, 'optionalAccess', _380 => _380.limit]) === void 0 ? {} : { limit: options.limit }
|
|
7216
7219
|
},
|
|
7217
7220
|
headers: { "Idempotency-Key": idempotencyKey },
|
|
7218
7221
|
maxRetries: 0,
|
|
@@ -7234,7 +7237,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7234
7237
|
* `client.monitors.deploy(...)`.
|
|
7235
7238
|
*/
|
|
7236
7239
|
async deployMonitor(definition, options) {
|
|
7237
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7240
|
+
if (_optionalChain([options, 'optionalAccess', _381 => _381.dryRun])) {
|
|
7238
7241
|
return this.http.request("/api/v2/monitors/check", {
|
|
7239
7242
|
method: "POST",
|
|
7240
7243
|
body: definition
|
|
@@ -7270,12 +7273,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7270
7273
|
/** List deployed monitors. Prefer `client.monitors.list(...)`. */
|
|
7271
7274
|
async listMonitors(options) {
|
|
7272
7275
|
const params = new URLSearchParams();
|
|
7273
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7274
|
-
else if (_optionalChain([options, 'optionalAccess',
|
|
7275
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7276
|
+
if (_optionalChain([options, 'optionalAccess', _382 => _382.state])) params.set("state", options.state);
|
|
7277
|
+
else if (_optionalChain([options, 'optionalAccess', _383 => _383.status])) params.set("status", options.status);
|
|
7278
|
+
if (_optionalChain([options, 'optionalAccess', _384 => _384.limit]) !== void 0)
|
|
7276
7279
|
params.set("limit", String(options.limit));
|
|
7277
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7278
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7280
|
+
if (_optionalChain([options, 'optionalAccess', _385 => _385.cursor])) params.set("cursor", options.cursor);
|
|
7281
|
+
if (_optionalChain([options, 'optionalAccess', _386 => _386.includeConsumers])) params.set("include_consumers", "true");
|
|
7279
7282
|
const query = params.toString();
|
|
7280
7283
|
const suffix = query ? `?${query}` : "";
|
|
7281
7284
|
return this.http.request(
|
|
@@ -7286,17 +7289,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7286
7289
|
/** The Monitors list. Prefer `client.monitors.ledger(...)`. */
|
|
7287
7290
|
async listMonitorLedger(options) {
|
|
7288
7291
|
const params = new URLSearchParams();
|
|
7289
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7290
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7291
|
-
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7292
|
+
if (_optionalChain([options, 'optionalAccess', _387 => _387.search])) params.set("q", options.search);
|
|
7293
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _388 => _388.states]), () => ( []))) params.append("state", state);
|
|
7294
|
+
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _389 => _389.signals]), () => ( [])))
|
|
7292
7295
|
params.append("signal", signal);
|
|
7293
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7294
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7295
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7296
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7297
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7296
|
+
if (_optionalChain([options, 'optionalAccess', _390 => _390.play])) params.set("play", options.play);
|
|
7297
|
+
if (_optionalChain([options, 'optionalAccess', _391 => _391.fleet])) params.set("fleet", options.fleet);
|
|
7298
|
+
if (_optionalChain([options, 'optionalAccess', _392 => _392.sort])) params.set("sort", options.sort);
|
|
7299
|
+
if (_optionalChain([options, 'optionalAccess', _393 => _393.window])) params.set("window", options.window);
|
|
7300
|
+
if (_optionalChain([options, 'optionalAccess', _394 => _394.limit]) !== void 0)
|
|
7298
7301
|
params.set("limit", String(options.limit));
|
|
7299
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7302
|
+
if (_optionalChain([options, 'optionalAccess', _395 => _395.cursor])) params.set("cursor", options.cursor);
|
|
7300
7303
|
const query = params.toString();
|
|
7301
7304
|
const suffix = query ? `?${query}` : "";
|
|
7302
7305
|
return this.http.request(
|
|
@@ -7313,7 +7316,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7313
7316
|
}
|
|
7314
7317
|
/** A monitor's recent findings. Prefer `client.monitors.ledgerFindings(...)`. */
|
|
7315
7318
|
async listMonitorLedgerFindings(key, options) {
|
|
7316
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
7319
|
+
const suffix = _optionalChain([options, 'optionalAccess', _396 => _396.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
|
|
7317
7320
|
return this.http.request(
|
|
7318
7321
|
`/api/v2/monitors/ledger/${encodeURIComponent(key)}/findings${suffix}`,
|
|
7319
7322
|
{ method: "GET" }
|
|
@@ -7327,7 +7330,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7327
7330
|
);
|
|
7328
7331
|
}
|
|
7329
7332
|
async testMonitorWebhook(key, payload, options) {
|
|
7330
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7333
|
+
if (_optionalChain([options, 'optionalAccess', _397 => _397.dispatch]) === true || _optionalChain([options, 'optionalAccess', _398 => _398.validationOnly]) === false) {
|
|
7331
7334
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
7332
7335
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
7333
7336
|
void 0,
|
|
@@ -7382,7 +7385,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7382
7385
|
}
|
|
7383
7386
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
7384
7387
|
async deleteMonitor(key, options) {
|
|
7385
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7388
|
+
if (_optionalChain([options, 'optionalAccess', _399 => _399.localOnly]) === true) {
|
|
7386
7389
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
7387
7390
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
7388
7391
|
void 0,
|
|
@@ -7390,11 +7393,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7390
7393
|
);
|
|
7391
7394
|
}
|
|
7392
7395
|
const params = new URLSearchParams();
|
|
7393
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7396
|
+
if (_optionalChain([options, 'optionalAccess', _400 => _400.dryRun])) params.set("dry_run", "true");
|
|
7394
7397
|
const query = params.toString();
|
|
7395
7398
|
return this.http.request(
|
|
7396
7399
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
7397
|
-
_optionalChain([options, 'optionalAccess',
|
|
7400
|
+
_optionalChain([options, 'optionalAccess', _401 => _401.dryRun]) ? { method: "DELETE" } : {
|
|
7398
7401
|
method: "DELETE",
|
|
7399
7402
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
7400
7403
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -7407,10 +7410,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7407
7410
|
* Prefer `client.monitors.reactivate(...)`.
|
|
7408
7411
|
*/
|
|
7409
7412
|
async reactivateMonitor(key, options) {
|
|
7410
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
7413
|
+
const query = _optionalChain([options, 'optionalAccess', _402 => _402.dryRun]) ? "?dry_run=true" : "";
|
|
7411
7414
|
return this.http.request(
|
|
7412
7415
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
7413
|
-
_optionalChain([options, 'optionalAccess',
|
|
7416
|
+
_optionalChain([options, 'optionalAccess', _403 => _403.dryRun]) ? { method: "POST", body: {} } : {
|
|
7414
7417
|
method: "POST",
|
|
7415
7418
|
body: {},
|
|
7416
7419
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -7424,7 +7427,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7424
7427
|
// ——————————————————————————————————————————————————————————
|
|
7425
7428
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
7426
7429
|
monitorJobIdempotencyKey(operation) {
|
|
7427
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
7430
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _404 => _404.crypto, 'optionalAccess', _405 => _405.randomUUID, 'optionalCall', _406 => _406()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
7428
7431
|
const prefix = "monitor-job-";
|
|
7429
7432
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
7430
7433
|
const maxOperationLength = Math.max(
|
|
@@ -7435,7 +7438,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7435
7438
|
}
|
|
7436
7439
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
7437
7440
|
return {
|
|
7438
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
7441
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _407 => _407.trim, 'call', _408 => _408()]) || this.monitorJobIdempotencyKey(operation)
|
|
7439
7442
|
};
|
|
7440
7443
|
}
|
|
7441
7444
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -7446,7 +7449,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7446
7449
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
7447
7450
|
headers: this.monitorJobHeaders(
|
|
7448
7451
|
"batch-deploy",
|
|
7449
|
-
_optionalChain([options, 'optionalAccess',
|
|
7452
|
+
_optionalChain([options, 'optionalAccess', _409 => _409.idempotencyKey])
|
|
7450
7453
|
),
|
|
7451
7454
|
maxRetries: 0,
|
|
7452
7455
|
exactUrlOnly: true
|
|
@@ -7465,11 +7468,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7465
7468
|
version: 1,
|
|
7466
7469
|
kind: "batch",
|
|
7467
7470
|
monitors: definitions,
|
|
7468
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7471
|
+
..._optionalChain([options, 'optionalAccess', _410 => _410.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
7469
7472
|
},
|
|
7470
7473
|
headers: this.monitorJobHeaders(
|
|
7471
7474
|
`batch-sync-${batchId}`,
|
|
7472
|
-
_optionalChain([options, 'optionalAccess',
|
|
7475
|
+
_optionalChain([options, 'optionalAccess', _411 => _411.idempotencyKey])
|
|
7473
7476
|
),
|
|
7474
7477
|
maxRetries: 0,
|
|
7475
7478
|
exactUrlOnly: true
|
|
@@ -7484,7 +7487,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7484
7487
|
body: {},
|
|
7485
7488
|
headers: this.monitorJobHeaders(
|
|
7486
7489
|
`batch-start-${batchId}`,
|
|
7487
|
-
_optionalChain([options, 'optionalAccess',
|
|
7490
|
+
_optionalChain([options, 'optionalAccess', _412 => _412.idempotencyKey])
|
|
7488
7491
|
),
|
|
7489
7492
|
maxRetries: 0,
|
|
7490
7493
|
exactUrlOnly: true
|
|
@@ -7499,7 +7502,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7499
7502
|
body: {},
|
|
7500
7503
|
headers: this.monitorJobHeaders(
|
|
7501
7504
|
`batch-stop-${batchId}`,
|
|
7502
|
-
_optionalChain([options, 'optionalAccess',
|
|
7505
|
+
_optionalChain([options, 'optionalAccess', _413 => _413.idempotencyKey])
|
|
7503
7506
|
),
|
|
7504
7507
|
maxRetries: 0,
|
|
7505
7508
|
exactUrlOnly: true
|
|
@@ -7520,7 +7523,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7520
7523
|
body: {},
|
|
7521
7524
|
headers: this.monitorJobHeaders(
|
|
7522
7525
|
`${action}-${monitorKey}`,
|
|
7523
|
-
_optionalChain([options, 'optionalAccess',
|
|
7526
|
+
_optionalChain([options, 'optionalAccess', _414 => _414.idempotencyKey])
|
|
7524
7527
|
),
|
|
7525
7528
|
maxRetries: 0,
|
|
7526
7529
|
exactUrlOnly: true
|
|
@@ -7533,7 +7536,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7533
7536
|
body: definition,
|
|
7534
7537
|
headers: this.monitorJobHeaders(
|
|
7535
7538
|
`sync-${definition.key}`,
|
|
7536
|
-
_optionalChain([options, 'optionalAccess',
|
|
7539
|
+
_optionalChain([options, 'optionalAccess', _415 => _415.idempotencyKey])
|
|
7537
7540
|
),
|
|
7538
7541
|
maxRetries: 0,
|
|
7539
7542
|
exactUrlOnly: true
|
|
@@ -7546,7 +7549,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7546
7549
|
);
|
|
7547
7550
|
}
|
|
7548
7551
|
async getMonitorJobLogs(jobId, options) {
|
|
7549
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
7552
|
+
const query = _optionalChain([options, 'optionalAccess', _416 => _416.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
7550
7553
|
return this.http.request(
|
|
7551
7554
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
7552
7555
|
{ method: "GET" }
|
|
@@ -7559,15 +7562,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7559
7562
|
);
|
|
7560
7563
|
}
|
|
7561
7564
|
async waitForMonitorJob(jobId, options) {
|
|
7562
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7563
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7565
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _417 => _417.timeoutMs]), () => ( 10 * 6e4)));
|
|
7566
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _418 => _418.pollIntervalMs]), () => ( 2e3)));
|
|
7564
7567
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
7565
7568
|
const startedAt = Date.now();
|
|
7566
7569
|
let latest = await this.getMonitorJob(jobId);
|
|
7567
7570
|
while (true) {
|
|
7568
|
-
_optionalChain([options, 'optionalAccess',
|
|
7571
|
+
_optionalChain([options, 'optionalAccess', _419 => _419.onProgress, 'optionalCall', _420 => _420(latest)]);
|
|
7569
7572
|
const job = latest.job;
|
|
7570
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
7573
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _421 => _421.state]) === "string" ? job.state : void 0;
|
|
7571
7574
|
if (state && terminal.has(state)) return latest;
|
|
7572
7575
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
7573
7576
|
await sleep(pollIntervalMs);
|
|
@@ -7578,12 +7581,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7578
7581
|
// Monitor Fleets
|
|
7579
7582
|
// ——————————————————————————————————————————————————————————
|
|
7580
7583
|
monitorFleetIdempotencyKey(operation) {
|
|
7581
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
7584
|
+
const uuid = _optionalChain([globalThis, 'access', _422 => _422.crypto, 'optionalAccess', _423 => _423.randomUUID, 'optionalCall', _424 => _424()]);
|
|
7582
7585
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
7583
7586
|
}
|
|
7584
7587
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
7585
7588
|
return {
|
|
7586
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
7589
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _425 => _425.trim, 'call', _426 => _426()]) || this.monitorFleetIdempotencyKey(operation)
|
|
7587
7590
|
};
|
|
7588
7591
|
}
|
|
7589
7592
|
/**
|
|
@@ -7617,14 +7620,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7617
7620
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
7618
7621
|
const body = {
|
|
7619
7622
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
7620
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7621
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7622
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7623
|
+
..._optionalChain([options, 'optionalAccess', _427 => _427.dryRun]) ? { dry_run: true } : {},
|
|
7624
|
+
..._optionalChain([options, 'optionalAccess', _428 => _428.adoptExisting]) ? { adopt_existing: true } : {},
|
|
7625
|
+
..._optionalChain([options, 'optionalAccess', _429 => _429.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
7623
7626
|
};
|
|
7624
7627
|
const headers = {
|
|
7625
|
-
...this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
7628
|
+
...this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _430 => _430.idempotencyKey])),
|
|
7626
7629
|
"X-Deepline-Fleet-Commit-Budget-Ms": String(
|
|
7627
|
-
_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7630
|
+
_nullishCoalesce(_optionalChain([options, 'optionalAccess', _431 => _431.commitBudgetMs]), () => ( _DeeplineClient.MONITOR_FLEET_COMMIT_BUDGET_MS))
|
|
7628
7631
|
)
|
|
7629
7632
|
};
|
|
7630
7633
|
let remainingBefore = Number.POSITIVE_INFINITY;
|
|
@@ -7655,7 +7658,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7655
7658
|
{ response: result }
|
|
7656
7659
|
);
|
|
7657
7660
|
}
|
|
7658
|
-
_optionalChain([options, 'optionalAccess',
|
|
7661
|
+
_optionalChain([options, 'optionalAccess', _432 => _432.onCommitProgress, 'optionalCall', _433 => _433({
|
|
7659
7662
|
fleetId,
|
|
7660
7663
|
generation: Number(result.generation),
|
|
7661
7664
|
membersCommitted: Number(staged.members_committed),
|
|
@@ -7672,10 +7675,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7672
7675
|
/** The Fleets list. Prefer `client.monitors.fleets.overview()`. */
|
|
7673
7676
|
async listMonitorFleetOverviews(options) {
|
|
7674
7677
|
const params = new URLSearchParams({ view: "overview" });
|
|
7675
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7676
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7677
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7678
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7678
|
+
if (_optionalChain([options, 'optionalAccess', _434 => _434.q])) params.set("q", options.q);
|
|
7679
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _435 => _435.states]), () => ( []))) params.append("state", state);
|
|
7680
|
+
if (_optionalChain([options, 'optionalAccess', _436 => _436.sort])) params.set("sort", options.sort);
|
|
7681
|
+
if (_optionalChain([options, 'optionalAccess', _437 => _437.window])) params.set("window", options.window);
|
|
7679
7682
|
return this.http.request(
|
|
7680
7683
|
`/api/v2/monitors/fleets?${params.toString()}`,
|
|
7681
7684
|
{ method: "GET" }
|
|
@@ -7684,7 +7687,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7684
7687
|
/** One fleet's overview. Prefer `client.monitors.fleets.overview(fleetId)`. */
|
|
7685
7688
|
async getMonitorFleetOverview(fleetId, options) {
|
|
7686
7689
|
const params = new URLSearchParams({ view: "overview" });
|
|
7687
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7690
|
+
if (_optionalChain([options, 'optionalAccess', _438 => _438.window])) params.set("window", options.window);
|
|
7688
7691
|
return this.http.request(
|
|
7689
7692
|
`${this.monitorFleetPath(fleetId)}?${params.toString()}`,
|
|
7690
7693
|
{ method: "GET" }
|
|
@@ -7693,10 +7696,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7693
7696
|
/** A fleet's problem members. Prefer `client.monitors.fleets.issues(...)`. */
|
|
7694
7697
|
async listMonitorFleetIssues(fleetId, options) {
|
|
7695
7698
|
const params = new URLSearchParams();
|
|
7696
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7697
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7698
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7699
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7699
|
+
if (_optionalChain([options, 'optionalAccess', _439 => _439.group])) params.set("group", options.group);
|
|
7700
|
+
if (_optionalChain([options, 'optionalAccess', _440 => _440.cause])) params.set("cause", options.cause);
|
|
7701
|
+
if (_optionalChain([options, 'optionalAccess', _441 => _441.cursor])) params.set("cursor", options.cursor);
|
|
7702
|
+
if (_optionalChain([options, 'optionalAccess', _442 => _442.limit]) !== void 0)
|
|
7700
7703
|
params.set("limit", String(options.limit));
|
|
7701
7704
|
const query = params.toString();
|
|
7702
7705
|
return this.http.request(
|
|
@@ -7706,8 +7709,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7706
7709
|
}
|
|
7707
7710
|
async getMonitorFleet(fleetId, options) {
|
|
7708
7711
|
const params = new URLSearchParams();
|
|
7709
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7710
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7712
|
+
if (_optionalChain([options, 'optionalAccess', _443 => _443.drift])) params.set("drift", "1");
|
|
7713
|
+
if (_optionalChain([options, 'optionalAccess', _444 => _444.limit]) !== void 0)
|
|
7711
7714
|
params.set("limit", String(options.limit));
|
|
7712
7715
|
const query = params.toString();
|
|
7713
7716
|
return this.http.request(
|
|
@@ -7720,11 +7723,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7720
7723
|
this.monitorFleetPath(fleetId),
|
|
7721
7724
|
{
|
|
7722
7725
|
method: "DELETE",
|
|
7723
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
7726
|
+
body: _optionalChain([options, 'optionalAccess', _445 => _445.dryRun]) ? { dry_run: true } : {},
|
|
7724
7727
|
timeout: _DeeplineClient.MONITOR_FLEET_WRITE_TIMEOUT_MS,
|
|
7725
7728
|
headers: this.monitorFleetHeaders(
|
|
7726
7729
|
"deactivate",
|
|
7727
|
-
_optionalChain([options, 'optionalAccess',
|
|
7730
|
+
_optionalChain([options, 'optionalAccess', _446 => _446.idempotencyKey])
|
|
7728
7731
|
),
|
|
7729
7732
|
maxRetries: 0,
|
|
7730
7733
|
exactUrlOnly: true
|
|
@@ -7740,7 +7743,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7740
7743
|
timeout: _DeeplineClient.MONITOR_FLEET_WRITE_TIMEOUT_MS,
|
|
7741
7744
|
headers: this.monitorFleetHeaders(
|
|
7742
7745
|
"reactivate",
|
|
7743
|
-
_optionalChain([options, 'optionalAccess',
|
|
7746
|
+
_optionalChain([options, 'optionalAccess', _447 => _447.idempotencyKey])
|
|
7744
7747
|
),
|
|
7745
7748
|
maxRetries: 0,
|
|
7746
7749
|
exactUrlOnly: true
|
|
@@ -7757,9 +7760,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7757
7760
|
* identical to "the request failed".
|
|
7758
7761
|
*/
|
|
7759
7762
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
7760
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7761
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7762
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
7763
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _448 => _448.timeoutMs]), () => ( 10 * 6e4)));
|
|
7764
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _449 => _449.pollIntervalMs]), () => ( 2e3)));
|
|
7765
|
+
const terminal = _optionalChain([options, 'optionalAccess', _450 => _450.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
|
|
7763
7766
|
"converged",
|
|
7764
7767
|
"degraded",
|
|
7765
7768
|
"deactivated",
|
|
@@ -7768,7 +7771,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7768
7771
|
const startedAt = Date.now();
|
|
7769
7772
|
let latest = await this.getMonitorFleet(fleetId);
|
|
7770
7773
|
while (true) {
|
|
7771
|
-
_optionalChain([options, 'optionalAccess',
|
|
7774
|
+
_optionalChain([options, 'optionalAccess', _451 => _451.onProgress, 'optionalCall', _452 => _452(latest)]);
|
|
7772
7775
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
7773
7776
|
if (status && terminal.has(status)) return latest;
|
|
7774
7777
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
@@ -7833,4 +7836,5 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7833
7836
|
|
|
7834
7837
|
|
|
7835
7838
|
|
|
7836
|
-
|
|
7839
|
+
|
|
7840
|
+
exports.AD_ACCOUNT_DISCOVERY_PROVIDERS = AD_ACCOUNT_DISCOVERY_PROVIDERS; exports.planAdAccountDiscovery = planAdAccountDiscovery; exports.PUBLIC_PLAN_SKUS = PUBLIC_PLAN_SKUS; exports.resolvePublicPlanSku = resolvePublicPlanSku; exports.iterateCursorPages = iterateCursorPages; exports.requireBillingIdempotencyKey = requireBillingIdempotencyKey; exports.planCustomerDbQuery = planCustomerDbQuery; exports.validateExecutionIdempotencyKey = validateExecutionIdempotencyKey; exports.normalizePlayStatus = normalizePlayStatus; exports.PlayClient = PlayClient; exports.PRODUCT_NOTIFICATION_EVENT_CATALOG = PRODUCT_NOTIFICATION_EVENT_CATALOG; exports.resolveLegacySlackNotification = resolveLegacySlackNotification; exports.RUN_EVENT_SEARCH_KIND_VALUES = RUN_EVENT_SEARCH_KIND_VALUES; exports.logProvenanceReaches = logProvenanceReaches; exports.logLevelReaches = logLevelReaches; exports.parseLogLevel = parseLogLevel; exports.classifyLogLine = classifyLogLine; exports.isTransientPlayRunReadError = isTransientPlayRunReadError; exports.encodeRunLogsCursor = encodeRunLogsCursor; exports.isRunLogsCursor = isRunLogsCursor; exports.RunEventQueryInputError = RunEventQueryInputError; exports.normalizeRunEventOperationRequest = normalizeRunEventOperationRequest; exports.isStopAllPlayRunsDryRunResult = isStopAllPlayRunsDryRunResult; exports.MONITOR_JOB_STATES = MONITOR_JOB_STATES; exports.MONITOR_JOB_PHASES = MONITOR_JOB_PHASES; exports.MONITOR_JOB_RECONCILIATION_STATES = MONITOR_JOB_RECONCILIATION_STATES; exports.DeeplineClient = DeeplineClient;
|