deepline 0.3.490 → 0.3.491
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 +6 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +4 -1
- package/dist/cli/{auth-RL6LOZGC.mjs → auth-FXAC472Y.mjs} +5 -5
- package/dist/cli/auth-QIDL3YCW.js +43 -0
- package/dist/cli/{billing-LIDDSOSY.js → billing-PDOA3KZ3.js} +79 -79
- package/dist/cli/{billing-33THO76F.mjs → billing-UM4LE33K.mjs} +6 -6
- package/dist/cli/{chunk-QZPJWFGD.js → chunk-27MRSV6O.js} +26 -26
- package/dist/cli/{chunk-V47SUOAE.mjs → chunk-2MW6TGNZ.mjs} +4 -4
- package/dist/cli/{chunk-63TNO23X.js → chunk-3FMU6F6E.js} +10 -10
- package/dist/cli/{chunk-CB7IFKXN.mjs → chunk-3K4IAV7I.mjs} +2 -2
- package/dist/cli/{chunk-7W53Y4VH.mjs → chunk-3WRWPNHE.mjs} +5 -5
- package/dist/cli/{chunk-Y2KHSQEF.js → chunk-5KMGKG4B.js} +8 -8
- package/dist/cli/{chunk-A3D677RX.mjs → chunk-6PMM7VJN.mjs} +1 -1
- package/dist/cli/{chunk-LZ37B62K.js → chunk-6UARNRXT.js} +3 -3
- package/dist/cli/{chunk-EPQZ42PY.js → chunk-74H5OTRM.js} +1 -1
- package/dist/cli/{chunk-FPYESYBO.js → chunk-AEKJZJ4R.js} +4 -4
- package/dist/cli/{chunk-PVMN4OE2.js → chunk-B2TXKEED.js} +5 -5
- package/dist/cli/{chunk-E26477MJ.js → chunk-BCKIBVEJ.js} +7 -7
- package/dist/cli/{chunk-QWJZSPCV.mjs → chunk-CFPFTS3A.mjs} +10 -10
- package/dist/cli/{chunk-L7QSZAF6.js → chunk-CRBBGKRH.js} +9 -9
- package/dist/cli/{chunk-YPUDIEZX.js → chunk-DUFRH43S.js} +94 -94
- package/dist/cli/{chunk-CSSOP7XG.mjs → chunk-EPD7NSDJ.mjs} +1 -1
- package/dist/cli/{chunk-JTYKW3UL.mjs → chunk-H6UIS36S.mjs} +2 -2
- package/dist/cli/{chunk-UQXHBCHU.js → chunk-HNG2U3IG.js} +2 -2
- package/dist/cli/{chunk-JSYCPTG6.mjs → chunk-HSJK6EMU.mjs} +3 -3
- package/dist/cli/{chunk-XSGJKXMP.js → chunk-I64PYCTB.js} +2 -2
- package/dist/cli/{chunk-6TTPAGNX.js → chunk-IG3GSBBE.js} +122 -119
- package/dist/cli/{chunk-MEYQOZPF.mjs → chunk-IIO7UOVW.mjs} +5 -2
- package/dist/cli/{chunk-MDKAPUN2.mjs → chunk-KGJVDR4Q.mjs} +2 -2
- package/dist/cli/{chunk-LQIKW55V.mjs → chunk-LMG7O6XJ.mjs} +2 -2
- package/dist/cli/{chunk-MBQZMHE6.mjs → chunk-MAM6ZOVS.mjs} +4 -4
- package/dist/cli/{chunk-QC6QUFKY.js → chunk-MN6DCV63.js} +5 -5
- package/dist/cli/{chunk-Z7W6VJFN.mjs → chunk-NUOKAKZW.mjs} +1 -1
- package/dist/cli/{chunk-BL5Q5JY7.mjs → chunk-OLHWZM4A.mjs} +5 -5
- package/dist/cli/{chunk-TVZJ6XWM.mjs → chunk-ORKLMANE.mjs} +1 -1
- package/dist/cli/{chunk-PIENQTDE.mjs → chunk-OYJTLEB4.mjs} +1 -1
- package/dist/cli/{chunk-JC2M6XG2.mjs → chunk-PIPEPCRL.mjs} +1 -1
- package/dist/cli/{chunk-SGG3TERP.js → chunk-Q7G7CU4W.js} +3 -3
- package/dist/cli/{chunk-2HYJU4LJ.mjs → chunk-QBOE5LEH.mjs} +1 -1
- package/dist/cli/{chunk-FDYCUA7A.js → chunk-RFSXXDH7.js} +16 -16
- package/dist/cli/{chunk-NRM5OWH2.mjs → chunk-S4CYM4EC.mjs} +4 -4
- package/dist/cli/{chunk-HHGAY2A4.js → chunk-SJOHQ2WW.js} +53 -53
- package/dist/cli/{chunk-WNVZV6VK.js → chunk-SUMKWA53.js} +53 -53
- package/dist/cli/{chunk-B7MPY7WH.js → chunk-TH7JLR5D.js} +6 -6
- package/dist/cli/{chunk-UTKNSD6T.js → chunk-TMAS3WH3.js} +21 -21
- package/dist/cli/{chunk-27IBWHR5.mjs → chunk-VC3SH4QW.mjs} +4 -4
- package/dist/cli/{chunk-J5HMAZ34.mjs → chunk-WCWVXN3R.mjs} +2 -2
- package/dist/cli/{chunk-OFCP66VS.mjs → chunk-X75ONMDJ.mjs} +2 -2
- package/dist/cli/{chunk-TCBYQX5N.js → chunk-X7YOVJBC.js} +37 -37
- package/dist/cli/{chunk-3M5VPIRL.mjs → chunk-YV4DP6KQ.mjs} +2 -2
- package/dist/cli/{chunk-YYN2O43C.js → chunk-ZEZ3CZ3X.js} +3 -3
- package/dist/cli/{chunk-IFGBL3US.js → chunk-ZX2FXZJN.js} +7 -7
- package/dist/cli/{csv-PLJNQPLE.js → csv-IGPAPAES.js} +13 -13
- package/dist/cli/{csv-TELSH4ND.mjs → csv-RNMQHECI.mjs} +4 -4
- package/dist/cli/{db-QDJ6GWF5.js → db-32OXM3TO.js} +27 -27
- package/dist/cli/{db-GISAU665.mjs → db-CKMVVGXJ.mjs} +6 -6
- package/dist/cli/describe-67GMIEIO.js +50 -0
- package/dist/cli/{describe-F4K54VXB.mjs → describe-QR7I3VOF.mjs} +17 -17
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-VKUTKQNN.js → executions-PCZS7B2M.js} +8 -8
- package/dist/cli/{executions-3QE7MRBG.mjs → executions-S4M4JMCU.mjs} +6 -6
- package/dist/cli/{feedback-HH5AUYLA.js → feedback-6EGKPZ3U.js} +8 -8
- package/dist/cli/{feedback-JU7PJGDL.mjs → feedback-FGUJVCBS.mjs} +4 -4
- package/dist/cli/{git-ACXH7K7D.mjs → git-LR4ARG5H.mjs} +5 -5
- package/dist/cli/git-PIH5Z5LN.js +25 -0
- package/dist/cli/index.js +137 -137
- package/dist/cli/index.mjs +40 -40
- package/dist/cli/{legacy-noops-IOAZ3YJ2.mjs → legacy-noops-S37PJ7OJ.mjs} +5 -5
- package/dist/cli/{legacy-noops-NRPYJZOP.js → legacy-noops-VX4JEQR6.js} +8 -8
- package/dist/cli/{monitors-4SKMAAMR.js → monitors-ADASJI72.js} +91 -91
- package/dist/cli/{monitors-PMQUOIOI.mjs → monitors-H3AX6CZG.mjs} +7 -7
- package/dist/cli/{org-XNT3W6OU.mjs → org-D3F5LUDW.mjs} +6 -6
- package/dist/cli/{org-WJM7X6WB.js → org-ZRJ3C56J.js} +72 -72
- package/dist/cli/{pages-WXY4GGZG.js → pages-5TKO3644.js} +17 -17
- package/dist/cli/{pages-Y3JKBS4B.mjs → pages-PSHU366M.mjs} +6 -6
- package/dist/cli/{play-NPWWAQYK.mjs → play-AUDDK7XB.mjs} +19 -18
- package/dist/cli/{play-NKSRPIAV.js → play-VDAETQDI.js} +314 -313
- package/dist/cli/{providers-VNPJHXK5.js → providers-IURPWRWD.js} +9 -9
- package/dist/cli/{providers-CUIKFE6F.mjs → providers-X7YMZSKQ.mjs} +6 -6
- package/dist/cli/{quickstart-PJYPKFZI.mjs → quickstart-6AGWVFNX.mjs} +4 -4
- package/dist/cli/{quickstart-6OTS2HDR.js → quickstart-Y6GFXLDV.js} +6 -6
- package/dist/cli/{run-AGX3EUK4.mjs → run-TG7J45NS.mjs} +22 -22
- package/dist/cli/{run-2DLJBYFC.js → run-TQFGOXNT.js} +36 -36
- package/dist/cli/{search-DVIEJ2UQ.mjs → search-3G4J2GC6.mjs} +7 -7
- package/dist/cli/search-VC43NUY7.js +32 -0
- package/dist/cli/{search-output-PFLNDCA7.js → search-output-NPZICK5C.js} +6 -6
- package/dist/cli/{search-output-TXSIPSPS.mjs → search-output-ZGNHDCLL.mjs} +4 -4
- package/dist/cli/{secrets-OAGXFXEX.mjs → secrets-EAWJBRUD.mjs} +6 -6
- package/dist/cli/{secrets-O5OQTFVD.js → secrets-KTTHT4ZG.js} +15 -15
- package/dist/cli/{sessions-GBR5PGB6.mjs → sessions-D4Q3LCEQ.mjs} +5 -5
- package/dist/cli/{sessions-WT7P3F73.js → sessions-S4YVBPAW.js} +6 -6
- package/dist/cli/{settings-U7UNDUDB.js → settings-BAK3VOWW.js} +78 -78
- package/dist/cli/{settings-KGNBIFOU.mjs → settings-JUORW6NL.mjs} +11 -11
- package/dist/cli/{setup-PYWSU4YM.mjs → setup-AXFGCXJE.mjs} +9 -9
- package/dist/cli/{setup-4MZNDFKM.js → setup-NJPHTW32.js} +49 -49
- package/dist/cli/skills-4NQZISNK.js +36 -0
- package/dist/cli/{skills-7Y6OBM7Z.mjs → skills-SKJVDJEF.mjs} +7 -7
- package/dist/cli/{tools-O7L435CR.mjs → tools-63THJVJZ.mjs} +16 -16
- package/dist/cli/tools-BAHK33FQ.js +57 -0
- package/dist/cli/update-EMIGRGJ7.js +34 -0
- package/dist/cli/{update-SPHIBY5L.mjs → update-KSID5F74.mjs} +9 -9
- package/dist/cli/{workflow-GTDKPIEV.js → workflow-BLSMWBKW.js} +17 -17
- package/dist/cli/{workflow-ZRYO5J3K.mjs → workflow-C4B54X2Z.mjs} +7 -7
- package/dist/{client-BkbDHRIg.d.mts → client-B4R1scm2.d.mts} +1 -1
- package/dist/{client-D3hVHXjK.d.ts → client-CQgGFxAH.d.ts} +1 -1
- package/dist/{client-core-DUdVqO_m.d.ts → client-core-BUNjKBKq.d.ts} +6 -1
- package/dist/{client-core-BZoSMKcY.d.mts → client-core-DMvHWjub.d.mts} +6 -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 +102 -102
- 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-AW34RGV5.js +0 -43
- package/dist/cli/describe-R6NVISAS.js +0 -50
- package/dist/cli/git-CXRU4CRW.js +0 -25
- package/dist/cli/search-Y7VFEFJJ.js +0 -32
- package/dist/cli/skills-BQC2323O.js +0 -36
- package/dist/cli/tools-732SZ4KV.js +0 -57
- package/dist/cli/update-PCYIUORM.js +0 -34
|
@@ -31,7 +31,7 @@ var _chunkNMU3VR5Ujs = require('./chunk-NMU3VR5U.js');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkAEKJZJ4Rjs = require('./chunk-AEKJZJ4R.js');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
|
|
@@ -652,7 +652,7 @@ var ToolCalls = class {
|
|
|
652
652
|
idempotencyKey,
|
|
653
653
|
onResponse: (response2) => {
|
|
654
654
|
lastResponse = null;
|
|
655
|
-
atomicToolsSupported = response2.headers.get(
|
|
655
|
+
atomicToolsSupported = response2.headers.get(_chunkAEKJZJ4Rjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
656
656
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
657
657
|
if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
|
|
658
658
|
try {
|
|
@@ -1031,8 +1031,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
const receivers = _optionalChain([env, 'access', _52 => _52.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]);
|
|
1033
1033
|
return {
|
|
1034
|
-
[
|
|
1035
|
-
...receivers ? { [
|
|
1034
|
+
[_chunkAEKJZJ4Rjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1035
|
+
...receivers ? { [_chunkAEKJZJ4Rjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1036
1036
|
};
|
|
1037
1037
|
}
|
|
1038
1038
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1103,7 +1103,7 @@ var PlayClient = class {
|
|
|
1103
1103
|
return _chunkAUQQVDABjs.startPlayRun.call(void 0,
|
|
1104
1104
|
this.http,
|
|
1105
1105
|
resolved.request,
|
|
1106
|
-
_optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1106
|
+
_optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkAEKJZJ4Rjs.SDK_API_MAJOR) } : headers,
|
|
1107
1107
|
options
|
|
1108
1108
|
);
|
|
1109
1109
|
}
|
|
@@ -3200,7 +3200,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3200
3200
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3201
3201
|
);
|
|
3202
3202
|
}
|
|
3203
|
-
return { [
|
|
3203
|
+
return { [_chunkAEKJZJ4Rjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3204
3204
|
}
|
|
3205
3205
|
function sleep(ms) {
|
|
3206
3206
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -4001,7 +4001,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4001
4001
|
);
|
|
4002
4002
|
const headers = _optionalChain([options, 'optionalAccess', _181 => _181.cliAdmission]) ? {
|
|
4003
4003
|
...runtimeHeaders,
|
|
4004
|
-
"X-Deepline-API-Major": String(
|
|
4004
|
+
"X-Deepline-API-Major": String(_chunkAEKJZJ4Rjs.SDK_API_MAJOR)
|
|
4005
4005
|
} : runtimeHeaders;
|
|
4006
4006
|
const http = this.http;
|
|
4007
4007
|
let submitted = false;
|
|
@@ -4675,14 +4675,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4675
4675
|
params.set("full", "true");
|
|
4676
4676
|
}
|
|
4677
4677
|
if (_optionalChain([options, 'optionalAccess', _241 => _241.configuration]) === true) {
|
|
4678
|
-
params.
|
|
4678
|
+
params.append("include", "configuration");
|
|
4679
|
+
}
|
|
4680
|
+
if (_optionalChain([options, 'optionalAccess', _242 => _242.performance]) === true) {
|
|
4681
|
+
params.append("include", "performance");
|
|
4679
4682
|
}
|
|
4680
4683
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
4681
4684
|
const response = await this.http.get(
|
|
4682
4685
|
`/api/v2/runs/${encodeURIComponent(runId)}${query}`,
|
|
4683
4686
|
{ headers: { "x-deepline-run-status": "1" } }
|
|
4684
4687
|
);
|
|
4685
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4688
|
+
if (_optionalChain([options, 'optionalAccess', _243 => _243.configuration]) === true && !Object.hasOwn(response, "contract")) {
|
|
4686
4689
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4687
4690
|
"This server does not support recorded configuration reads.",
|
|
4688
4691
|
void 0,
|
|
@@ -4690,7 +4693,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4690
4693
|
);
|
|
4691
4694
|
}
|
|
4692
4695
|
const status = normalizePlayStatus(response);
|
|
4693
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4696
|
+
if (_optionalChain([options, 'optionalAccess', _244 => _244.failedLogs]) !== true || status.status !== "failed") {
|
|
4694
4697
|
return status;
|
|
4695
4698
|
}
|
|
4696
4699
|
const requestedFailedLogLimit = typeof options.failedLogLimit === "number" && Number.isFinite(options.failedLogLimit) ? Math.max(1, Math.floor(options.failedLogLimit)) : RUNS_FAILED_LOG_LIMIT;
|
|
@@ -4779,7 +4782,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4779
4782
|
/** The same tenant-scoped run history searched by the dashboard and CLI. */
|
|
4780
4783
|
async getRunsHistory(options = {}) {
|
|
4781
4784
|
const params = new URLSearchParams();
|
|
4782
|
-
const search = _optionalChain([options, 'access',
|
|
4785
|
+
const search = _optionalChain([options, 'access', _245 => _245.search, 'optionalAccess', _246 => _246.trim, 'call', _247 => _247()]);
|
|
4783
4786
|
if (search && search.length > 200) {
|
|
4784
4787
|
throw new Error("Run search must be at most 200 characters.");
|
|
4785
4788
|
}
|
|
@@ -4805,16 +4808,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4805
4808
|
}
|
|
4806
4809
|
/** Read one run page without discarding server pagination metadata. */
|
|
4807
4810
|
async listRunsPage(options) {
|
|
4808
|
-
const playName = _optionalChain([options, 'access',
|
|
4811
|
+
const playName = _optionalChain([options, 'access', _248 => _248.play, 'optionalAccess', _249 => _249.trim, 'call', _250 => _250()]);
|
|
4809
4812
|
const params = new URLSearchParams();
|
|
4810
4813
|
if (playName) {
|
|
4811
4814
|
params.set("play", playName);
|
|
4812
4815
|
}
|
|
4813
|
-
const status = _optionalChain([options, 'access',
|
|
4816
|
+
const status = _optionalChain([options, 'access', _251 => _251.status, 'optionalAccess', _252 => _252.trim, 'call', _253 => _253()]);
|
|
4814
4817
|
if (status) {
|
|
4815
4818
|
params.set("status", status);
|
|
4816
4819
|
}
|
|
4817
|
-
const node = _optionalChain([options, 'access',
|
|
4820
|
+
const node = _optionalChain([options, 'access', _254 => _254.node, 'optionalAccess', _255 => _255.trim, 'call', _256 => _256()]);
|
|
4818
4821
|
if (node) {
|
|
4819
4822
|
if (!playName)
|
|
4820
4823
|
throw new Error("runs.list options.node requires options.play.");
|
|
@@ -4888,8 +4891,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4888
4891
|
* A different key starts another rerun.
|
|
4889
4892
|
*/
|
|
4890
4893
|
async rerun(runId, options) {
|
|
4891
|
-
const idempotencyKey = _optionalChain([options, 'optionalAccess',
|
|
4892
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4894
|
+
const idempotencyKey = _optionalChain([options, 'optionalAccess', _257 => _257.idempotencyKey, 'optionalAccess', _258 => _258.trim, 'call', _259 => _259()]);
|
|
4895
|
+
if (_optionalChain([options, 'optionalAccess', _260 => _260.idempotencyKey]) !== void 0 && !idempotencyKey) {
|
|
4893
4896
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4894
4897
|
"runs.rerun idempotencyKey must not be empty.",
|
|
4895
4898
|
void 0,
|
|
@@ -4898,7 +4901,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4898
4901
|
}
|
|
4899
4902
|
return this.http.post(
|
|
4900
4903
|
`/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
|
|
4901
|
-
_optionalChain([options, 'optionalAccess',
|
|
4904
|
+
_optionalChain([options, 'optionalAccess', _261 => _261.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
|
|
4902
4905
|
{ "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
|
|
4903
4906
|
);
|
|
4904
4907
|
}
|
|
@@ -4912,21 +4915,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4912
4915
|
* ```
|
|
4913
4916
|
*/
|
|
4914
4917
|
async getRunLogs(runId, options) {
|
|
4915
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4918
|
+
if (_optionalChain([options, 'optionalAccess', _262 => _262.all]) === true && options.failed === true) {
|
|
4916
4919
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4917
4920
|
"runs.logs cannot combine all and failed views.",
|
|
4918
4921
|
void 0,
|
|
4919
4922
|
"INVALID_RUN_LOG_VIEW"
|
|
4920
4923
|
);
|
|
4921
4924
|
}
|
|
4922
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4925
|
+
if (_optionalChain([options, 'optionalAccess', _263 => _263.cursor]) !== void 0 && options.failed === true) {
|
|
4923
4926
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4924
4927
|
"runs.logs cannot combine failed with cursor.",
|
|
4925
4928
|
void 0,
|
|
4926
4929
|
"INVALID_RUN_LOG_VIEW"
|
|
4927
4930
|
);
|
|
4928
4931
|
}
|
|
4929
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4932
|
+
if (_optionalChain([options, 'optionalAccess', _264 => _264.failed]) === true) {
|
|
4930
4933
|
const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
|
|
4931
4934
|
const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
|
|
4932
4935
|
const page = await this.http.get(
|
|
@@ -4951,18 +4954,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4951
4954
|
...page.logsTruncated ? { logsTruncated: true } : {}
|
|
4952
4955
|
};
|
|
4953
4956
|
}
|
|
4954
|
-
const beforeSequence = _optionalChain([options, 'optionalAccess',
|
|
4955
|
-
const limit = _optionalChain([options, 'optionalAccess',
|
|
4957
|
+
const beforeSequence = _optionalChain([options, 'optionalAccess', _265 => _265.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
|
|
4958
|
+
const limit = _optionalChain([options, 'optionalAccess', _266 => _266.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _267 => _267.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
|
|
4956
4959
|
const fetchPage = (afterSeq2, pageLimit) => this.http.get(
|
|
4957
4960
|
`/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
|
|
4958
4961
|
{ retryApiErrors: true }
|
|
4959
4962
|
);
|
|
4960
4963
|
const probe = await fetchPage(0, 1);
|
|
4961
4964
|
const lastStoredSeq = probe.lastStoredSeq;
|
|
4962
|
-
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access',
|
|
4965
|
+
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _268 => _268.entries, 'access', _269 => _269[0], 'optionalAccess', _270 => _270.seq]), () => ( null));
|
|
4963
4966
|
const upperSeq = beforeSequence === null ? lastStoredSeq : Math.min(beforeSequence - 1, lastStoredSeq);
|
|
4964
4967
|
const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
|
|
4965
|
-
let afterSeq = _optionalChain([options, 'optionalAccess',
|
|
4968
|
+
let afterSeq = _optionalChain([options, 'optionalAccess', _271 => _271.all]) ? 0 : Math.max(0, windowEndSeq - limit);
|
|
4966
4969
|
const entries = [];
|
|
4967
4970
|
while (entries.length < limit && afterSeq < upperSeq) {
|
|
4968
4971
|
const page = await fetchPage(
|
|
@@ -4996,7 +4999,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4996
4999
|
hasMore: olderLinesExist,
|
|
4997
5000
|
nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
|
|
4998
5001
|
entries: entries.map((entry) => entry.line),
|
|
4999
|
-
view: _optionalChain([options, 'optionalAccess',
|
|
5002
|
+
view: _optionalChain([options, 'optionalAccess', _272 => _272.all]) ? "all" : "tail",
|
|
5000
5003
|
...probe.logsTruncated ? { logsTruncated: true } : {}
|
|
5001
5004
|
};
|
|
5002
5005
|
}
|
|
@@ -5172,7 +5175,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5172
5175
|
limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
|
|
5173
5176
|
offset: String(_nullishCoalesce(input.offset, () => ( 0)))
|
|
5174
5177
|
});
|
|
5175
|
-
if (_optionalChain([input, 'access',
|
|
5178
|
+
if (_optionalChain([input, 'access', _273 => _273.runId, 'optionalAccess', _274 => _274.trim, 'call', _275 => _275()])) {
|
|
5176
5179
|
params.set("runId", input.runId.trim());
|
|
5177
5180
|
}
|
|
5178
5181
|
if (input.rowMode === "all" || input.rowMode === "live") {
|
|
@@ -5185,9 +5188,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5185
5188
|
`/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
|
|
5186
5189
|
{ signal: input.signal }
|
|
5187
5190
|
);
|
|
5188
|
-
const requestedRunId = _optionalChain([input, 'access',
|
|
5191
|
+
const requestedRunId = _optionalChain([input, 'access', _276 => _276.runId, 'optionalAccess', _277 => _277.trim, 'call', _278 => _278()]) || "";
|
|
5189
5192
|
if (requestedRunId) {
|
|
5190
|
-
const confirmedRunId = _optionalChain([result, 'access',
|
|
5193
|
+
const confirmedRunId = _optionalChain([result, 'access', _279 => _279.scope, 'optionalAccess', _280 => _280.kind]) === "run" ? result.scope.runId.trim() : "";
|
|
5191
5194
|
const foreignRowRunIds = [
|
|
5192
5195
|
...new Set(
|
|
5193
5196
|
result.rows.map(
|
|
@@ -5195,7 +5198,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5195
5198
|
).filter((runId) => runId && runId !== requestedRunId)
|
|
5196
5199
|
)
|
|
5197
5200
|
];
|
|
5198
|
-
if (_optionalChain([result, 'access',
|
|
5201
|
+
if (_optionalChain([result, 'access', _281 => _281.scope, 'optionalAccess', _282 => _282.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
|
|
5199
5202
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
5200
5203
|
`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.`,
|
|
5201
5204
|
void 0,
|
|
@@ -5224,7 +5227,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5224
5227
|
async stopRun(runId, options) {
|
|
5225
5228
|
return this.http.post(
|
|
5226
5229
|
`/api/v2/runs/${encodeURIComponent(runId)}/stop`,
|
|
5227
|
-
_optionalChain([options, 'optionalAccess',
|
|
5230
|
+
_optionalChain([options, 'optionalAccess', _283 => _283.reason]) ? { reason: options.reason } : {}
|
|
5228
5231
|
);
|
|
5229
5232
|
}
|
|
5230
5233
|
/**
|
|
@@ -5242,11 +5245,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5242
5245
|
* The method clears workspace run-slot state without requiring each run ID.
|
|
5243
5246
|
*/
|
|
5244
5247
|
async stopAllRuns(options) {
|
|
5245
|
-
const dryRun = _optionalChain([options, 'optionalAccess',
|
|
5248
|
+
const dryRun = _optionalChain([options, 'optionalAccess', _284 => _284.dryRun]) === true;
|
|
5246
5249
|
const result = await this.http.post(
|
|
5247
5250
|
"/api/v2/runs/stop-all",
|
|
5248
5251
|
{
|
|
5249
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5252
|
+
..._optionalChain([options, 'optionalAccess', _285 => _285.reason]) ? { reason: options.reason } : {},
|
|
5250
5253
|
...dryRun ? { dryRun: true } : {}
|
|
5251
5254
|
}
|
|
5252
5255
|
);
|
|
@@ -5267,7 +5270,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5267
5270
|
* `origin: "owned"` for org-owned plays.
|
|
5268
5271
|
*/
|
|
5269
5272
|
async listPlays(options) {
|
|
5270
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
5273
|
+
if (!_optionalChain([options, 'optionalAccess', _286 => _286.grep, 'optionalAccess', _287 => _287.trim, 'call', _288 => _288()])) {
|
|
5271
5274
|
return (await this.requestPlaysPage(options, false)).plays;
|
|
5272
5275
|
}
|
|
5273
5276
|
const plays = [];
|
|
@@ -5289,46 +5292,46 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5289
5292
|
}
|
|
5290
5293
|
async requestPlaysPage(options, paginateInventory = true) {
|
|
5291
5294
|
const params = new URLSearchParams();
|
|
5292
|
-
if (paginateInventory && !_optionalChain([options, 'optionalAccess',
|
|
5295
|
+
if (paginateInventory && !_optionalChain([options, 'optionalAccess', _289 => _289.grep, 'optionalAccess', _290 => _290.trim, 'call', _291 => _291()]))
|
|
5293
5296
|
params.set("inventory_paginated", "1");
|
|
5294
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5295
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5296
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5297
|
+
if (_optionalChain([options, 'optionalAccess', _292 => _292.origin])) params.set("origin", options.origin);
|
|
5298
|
+
if (_optionalChain([options, 'optionalAccess', _293 => _293.summaryOnly])) params.set("summary_only", "1");
|
|
5299
|
+
if (_optionalChain([options, 'optionalAccess', _294 => _294.categories])) {
|
|
5297
5300
|
params.set(
|
|
5298
5301
|
"categories",
|
|
5299
5302
|
Array.isArray(options.categories) ? options.categories.join(",") : options.categories
|
|
5300
5303
|
);
|
|
5301
5304
|
}
|
|
5302
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5305
|
+
if (_optionalChain([options, 'optionalAccess', _295 => _295.categories]) || _optionalChain([options, 'optionalAccess', _296 => _296.includeToolCategories])) {
|
|
5303
5306
|
params.set("include_tool_categories", "1");
|
|
5304
5307
|
}
|
|
5305
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5308
|
+
if (_optionalChain([options, 'optionalAccess', _297 => _297.tags])) {
|
|
5306
5309
|
params.set(
|
|
5307
5310
|
"tags",
|
|
5308
5311
|
Array.isArray(options.tags) ? options.tags.join(",") : options.tags
|
|
5309
5312
|
);
|
|
5310
5313
|
}
|
|
5311
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5312
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5314
|
+
if (_optionalChain([options, 'optionalAccess', _298 => _298.includeArchived])) params.set("include_archived", "1");
|
|
5315
|
+
if (_optionalChain([options, 'optionalAccess', _299 => _299.includeCostEstimates])) {
|
|
5313
5316
|
params.set("include_cost_estimates", "1");
|
|
5314
5317
|
}
|
|
5315
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5318
|
+
if (_optionalChain([options, 'optionalAccess', _300 => _300.grep, 'optionalAccess', _301 => _301.trim, 'call', _302 => _302()])) {
|
|
5316
5319
|
params.set("grep", options.grep.trim());
|
|
5317
5320
|
params.set("limit", "60");
|
|
5318
5321
|
}
|
|
5319
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5322
|
+
if (_optionalChain([options, 'optionalAccess', _303 => _303.limit]) !== void 0) {
|
|
5320
5323
|
if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
|
|
5321
5324
|
throw new Error("Play page limit must be a positive integer");
|
|
5322
5325
|
}
|
|
5323
5326
|
params.set("limit", String(options.limit));
|
|
5324
5327
|
}
|
|
5325
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5328
|
+
if (_optionalChain([options, 'optionalAccess', _304 => _304.cursor])) params.set("cursor", options.cursor);
|
|
5326
5329
|
const suffix = params.size ? `?${params.toString()}` : "";
|
|
5327
5330
|
const response = await this.http.get(`/api/v2/plays${suffix}`);
|
|
5328
5331
|
return {
|
|
5329
5332
|
plays: _nullishCoalesce(response.plays, () => ( [])),
|
|
5330
|
-
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5331
|
-
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5333
|
+
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _305 => _305.pagination, 'optionalAccess', _306 => _306.cursor]), () => ( response.cursor)), () => ( null)),
|
|
5334
|
+
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _307 => _307.pagination, 'optionalAccess', _308 => _308.hasMore]), () => ( response.hasMore)))
|
|
5332
5335
|
};
|
|
5333
5336
|
}
|
|
5334
5337
|
/** Read definition-level settings, independently of code revisions. */
|
|
@@ -5382,7 +5385,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5382
5385
|
}
|
|
5383
5386
|
/** Start provider OAuth and return the URL to open in a browser. */
|
|
5384
5387
|
async startIntegrationOAuth(provider, options = {}) {
|
|
5385
|
-
const scopes = _optionalChain([options, 'access',
|
|
5388
|
+
const scopes = _optionalChain([options, 'access', _309 => _309.scopes, 'optionalAccess', _310 => _310.map, 'call', _311 => _311((scope) => scope.trim()), 'access', _312 => _312.filter, 'call', _313 => _313(Boolean)]);
|
|
5386
5389
|
if (scopes !== void 0 && scopes.length === 0) {
|
|
5387
5390
|
throw new Error("scopes must contain at least one OAuth scope.");
|
|
5388
5391
|
}
|
|
@@ -5398,8 +5401,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5398
5401
|
return this.http.post("/api/v2/integrations/connect", {
|
|
5399
5402
|
provider: "slack",
|
|
5400
5403
|
scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
|
|
5401
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5402
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5404
|
+
..._optionalChain([options, 'optionalAccess', _314 => _314.successUrl]) ? { success_url: options.successUrl } : {},
|
|
5405
|
+
..._optionalChain([options, 'optionalAccess', _315 => _315.failureUrl]) ? { failure_url: options.failureUrl } : {}
|
|
5403
5406
|
});
|
|
5404
5407
|
}
|
|
5405
5408
|
/** List Slack channels visible to the connected Deepline Slack app. */
|
|
@@ -5474,7 +5477,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5474
5477
|
}
|
|
5475
5478
|
const targets = input.targets.map(parseNotificationGroupTarget);
|
|
5476
5479
|
const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
|
|
5477
|
-
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access',
|
|
5480
|
+
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _316 => _316[0], 'optionalAccess', _317 => _317.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
|
|
5478
5481
|
if (legacyEvents.length > 0 && !legacyTarget) {
|
|
5479
5482
|
throw new Error(
|
|
5480
5483
|
"--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
|
|
@@ -5510,7 +5513,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5510
5513
|
const existingGroup = current.configuration.groups.find(
|
|
5511
5514
|
(candidate) => candidate.name.toLowerCase() === name.toLowerCase()
|
|
5512
5515
|
);
|
|
5513
|
-
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess',
|
|
5516
|
+
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _318 => _318.groupKey]), () => ( notificationObjectKey("group")));
|
|
5514
5517
|
const group = _nullishCoalesce(existingGroup, () => ( {
|
|
5515
5518
|
groupKey,
|
|
5516
5519
|
name,
|
|
@@ -5738,7 +5741,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5738
5741
|
/** Read one trigger inventory page without loading run histories. */
|
|
5739
5742
|
async listPlayTriggerInventory(options) {
|
|
5740
5743
|
const params = new URLSearchParams({ view: "inventory" });
|
|
5741
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5744
|
+
if (_optionalChain([options, 'optionalAccess', _319 => _319.cursor])) params.set("cursor", options.cursor);
|
|
5742
5745
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5743
5746
|
}
|
|
5744
5747
|
/** Read one trigger's recent runs, with an explicit partial-history flag. */
|
|
@@ -5747,7 +5750,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5747
5750
|
view: "history",
|
|
5748
5751
|
binding_id: bindingId
|
|
5749
5752
|
});
|
|
5750
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5753
|
+
if (_optionalChain([options, 'optionalAccess', _320 => _320.limit]) !== void 0)
|
|
5751
5754
|
params.set("history_limit", String(options.limit));
|
|
5752
5755
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5753
5756
|
}
|
|
@@ -5935,14 +5938,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5935
5938
|
*/
|
|
5936
5939
|
async runPlay(code, csvPath, name, options) {
|
|
5937
5940
|
const { workflowId } = await this.submitPlay(code, csvPath, name, {
|
|
5938
|
-
input: _optionalChain([options, 'optionalAccess',
|
|
5939
|
-
sourceCode: _optionalChain([options, 'optionalAccess',
|
|
5940
|
-
artifact: _optionalChain([options, 'optionalAccess',
|
|
5941
|
-
compilerManifest: _optionalChain([options, 'optionalAccess',
|
|
5942
|
-
inputFile: _optionalChain([options, 'optionalAccess',
|
|
5943
|
-
packagedFiles: _optionalChain([options, 'optionalAccess',
|
|
5944
|
-
force: _optionalChain([options, 'optionalAccess',
|
|
5945
|
-
forceToolRefresh: _optionalChain([options, 'optionalAccess',
|
|
5941
|
+
input: _optionalChain([options, 'optionalAccess', _321 => _321.input]),
|
|
5942
|
+
sourceCode: _optionalChain([options, 'optionalAccess', _322 => _322.sourceCode]),
|
|
5943
|
+
artifact: _optionalChain([options, 'optionalAccess', _323 => _323.artifact]),
|
|
5944
|
+
compilerManifest: _optionalChain([options, 'optionalAccess', _324 => _324.compilerManifest]),
|
|
5945
|
+
inputFile: _optionalChain([options, 'optionalAccess', _325 => _325.inputFile]),
|
|
5946
|
+
packagedFiles: _optionalChain([options, 'optionalAccess', _326 => _326.packagedFiles]),
|
|
5947
|
+
force: _optionalChain([options, 'optionalAccess', _327 => _327.force]),
|
|
5948
|
+
forceToolRefresh: _optionalChain([options, 'optionalAccess', _328 => _328.forceToolRefresh])
|
|
5946
5949
|
});
|
|
5947
5950
|
const start = Date.now();
|
|
5948
5951
|
const state = {
|
|
@@ -5953,7 +5956,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5953
5956
|
latest: null
|
|
5954
5957
|
};
|
|
5955
5958
|
let terminalObserved = null;
|
|
5956
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5959
|
+
if (_optionalChain([options, 'optionalAccess', _329 => _329.signal, 'optionalAccess', _330 => _330.aborted])) {
|
|
5957
5960
|
await this.cancelPlay(workflowId);
|
|
5958
5961
|
return {
|
|
5959
5962
|
success: false,
|
|
@@ -5964,9 +5967,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5964
5967
|
};
|
|
5965
5968
|
}
|
|
5966
5969
|
for await (const event of this.watchRunEvents(workflowId, {
|
|
5967
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
5970
|
+
signal: _optionalChain([options, 'optionalAccess', _331 => _331.signal])
|
|
5968
5971
|
})) {
|
|
5969
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5972
|
+
if (_optionalChain([options, 'optionalAccess', _332 => _332.signal, 'optionalAccess', _333 => _333.aborted])) {
|
|
5970
5973
|
await this.cancelPlay(workflowId);
|
|
5971
5974
|
return {
|
|
5972
5975
|
success: false,
|
|
@@ -5976,19 +5979,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5976
5979
|
error: "Cancelled by user"
|
|
5977
5980
|
};
|
|
5978
5981
|
}
|
|
5979
|
-
const previousStatus = _optionalChain([state, 'access',
|
|
5982
|
+
const previousStatus = _optionalChain([state, 'access', _334 => _334.latest, 'optionalAccess', _335 => _335.status]);
|
|
5980
5983
|
const status = updatePlayLiveStatusState(state, event);
|
|
5981
5984
|
if (!status) {
|
|
5982
5985
|
continue;
|
|
5983
5986
|
}
|
|
5984
5987
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
5985
|
-
_optionalChain([options, 'optionalAccess',
|
|
5988
|
+
_optionalChain([options, 'optionalAccess', _336 => _336.onProgress, 'optionalCall', _337 => _337(status)]);
|
|
5986
5989
|
}
|
|
5987
5990
|
if (_chunkAUQQVDABjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
5988
5991
|
terminalObserved = status;
|
|
5989
5992
|
}
|
|
5990
5993
|
}
|
|
5991
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5994
|
+
if (_optionalChain([options, 'optionalAccess', _338 => _338.signal, 'optionalAccess', _339 => _339.aborted])) {
|
|
5992
5995
|
await this.cancelPlay(workflowId);
|
|
5993
5996
|
return {
|
|
5994
5997
|
success: false,
|
|
@@ -6041,7 +6044,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6041
6044
|
const response = await this.http.get(
|
|
6042
6045
|
`/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
|
|
6043
6046
|
);
|
|
6044
|
-
const event = _optionalChain([response, 'access',
|
|
6047
|
+
const event = _optionalChain([response, 'access', _340 => _340.entries, 'optionalAccess', _341 => _341[0]]);
|
|
6045
6048
|
if (!event) {
|
|
6046
6049
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6047
6050
|
"No usage event was found for this request_id.",
|
|
@@ -6216,7 +6219,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6216
6219
|
async cancelBillingSubscription(options) {
|
|
6217
6220
|
return this.http.post(
|
|
6218
6221
|
"/api/v2/billing/subscription/cancel",
|
|
6219
|
-
{ action: _optionalChain([options, 'optionalAccess',
|
|
6222
|
+
{ action: _optionalChain([options, 'optionalAccess', _342 => _342.undo]) ? "undo_cancel" : "cancel" }
|
|
6220
6223
|
);
|
|
6221
6224
|
}
|
|
6222
6225
|
/**
|
|
@@ -6228,7 +6231,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6228
6231
|
*/
|
|
6229
6232
|
async listBillingInvoices(options) {
|
|
6230
6233
|
const params = new URLSearchParams();
|
|
6231
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6234
|
+
if (_optionalChain([options, 'optionalAccess', _343 => _343.limit]) !== void 0) {
|
|
6232
6235
|
params.set("limit", String(options.limit));
|
|
6233
6236
|
}
|
|
6234
6237
|
const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
|
|
@@ -6338,7 +6341,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6338
6341
|
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
6339
6342
|
async createTargetBillingPortalSession(options) {
|
|
6340
6343
|
const response = await this.http.post(
|
|
6341
|
-
_optionalChain([options, 'optionalAccess',
|
|
6344
|
+
_optionalChain([options, 'optionalAccess', _344 => _344.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
|
|
6342
6345
|
{}
|
|
6343
6346
|
);
|
|
6344
6347
|
return response.data;
|
|
@@ -6388,8 +6391,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6388
6391
|
return this.http.request("/api/v2/monitors/audit", {
|
|
6389
6392
|
method: "POST",
|
|
6390
6393
|
body: {
|
|
6391
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6392
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6394
|
+
..._optionalChain([options, 'optionalAccess', _345 => _345.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6395
|
+
..._optionalChain([options, 'optionalAccess', _346 => _346.cursor]) ? { cursor: options.cursor } : {}
|
|
6393
6396
|
},
|
|
6394
6397
|
maxRetries: 0
|
|
6395
6398
|
});
|
|
@@ -6399,8 +6402,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6399
6402
|
return this.http.request("/api/v2/monitors/repair", {
|
|
6400
6403
|
method: "POST",
|
|
6401
6404
|
body: {
|
|
6402
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6403
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6405
|
+
..._optionalChain([options, 'optionalAccess', _347 => _347.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6406
|
+
..._optionalChain([options, 'optionalAccess', _348 => _348.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
|
|
6404
6407
|
},
|
|
6405
6408
|
maxRetries: 0
|
|
6406
6409
|
});
|
|
@@ -6408,7 +6411,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6408
6411
|
/** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
|
|
6409
6412
|
async readMonitorsHealth(options) {
|
|
6410
6413
|
const params = new URLSearchParams();
|
|
6411
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6414
|
+
if (_optionalChain([options, 'optionalAccess', _349 => _349.fleetId])) params.set("fleet_id", options.fleetId);
|
|
6412
6415
|
const query = params.toString();
|
|
6413
6416
|
const suffix = query ? `?${query}` : "";
|
|
6414
6417
|
return this.http.request(
|
|
@@ -6481,7 +6484,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6481
6484
|
);
|
|
6482
6485
|
}
|
|
6483
6486
|
const params = new URLSearchParams();
|
|
6484
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6487
|
+
if (_optionalChain([options, 'optionalAccess', _350 => _350.cursor])) params.set("cursor", options.cursor);
|
|
6485
6488
|
const suffix = params.size > 0 ? `?${params}` : "";
|
|
6486
6489
|
return this.http.request(
|
|
6487
6490
|
`/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
|
|
@@ -6528,7 +6531,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6528
6531
|
* a second charge. The submission is never replayed automatically.
|
|
6529
6532
|
*/
|
|
6530
6533
|
async previewMonitor(definition, options) {
|
|
6531
|
-
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6534
|
+
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _351 => _351.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _352 => _352.crypto, 'optionalAccess', _353 => _353.randomUUID, 'optionalCall', _354 => _354()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
|
|
6532
6535
|
try {
|
|
6533
6536
|
const result = await this.http.request(
|
|
6534
6537
|
"/api/v2/monitors/preview",
|
|
@@ -6536,7 +6539,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6536
6539
|
method: "POST",
|
|
6537
6540
|
body: {
|
|
6538
6541
|
...definition,
|
|
6539
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6542
|
+
..._optionalChain([options, 'optionalAccess', _355 => _355.limit]) === void 0 ? {} : { limit: options.limit }
|
|
6540
6543
|
},
|
|
6541
6544
|
headers: { "Idempotency-Key": idempotencyKey },
|
|
6542
6545
|
maxRetries: 0,
|
|
@@ -6558,7 +6561,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6558
6561
|
* `client.monitors.deploy(...)`.
|
|
6559
6562
|
*/
|
|
6560
6563
|
async deployMonitor(definition, options) {
|
|
6561
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6564
|
+
if (_optionalChain([options, 'optionalAccess', _356 => _356.dryRun])) {
|
|
6562
6565
|
return this.http.request("/api/v2/monitors/check", {
|
|
6563
6566
|
method: "POST",
|
|
6564
6567
|
body: definition
|
|
@@ -6594,12 +6597,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6594
6597
|
/** List deployed monitors. Prefer `client.monitors.list(...)`. */
|
|
6595
6598
|
async listMonitors(options) {
|
|
6596
6599
|
const params = new URLSearchParams();
|
|
6597
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6598
|
-
else if (_optionalChain([options, 'optionalAccess',
|
|
6599
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6600
|
+
if (_optionalChain([options, 'optionalAccess', _357 => _357.state])) params.set("state", options.state);
|
|
6601
|
+
else if (_optionalChain([options, 'optionalAccess', _358 => _358.status])) params.set("status", options.status);
|
|
6602
|
+
if (_optionalChain([options, 'optionalAccess', _359 => _359.limit]) !== void 0)
|
|
6600
6603
|
params.set("limit", String(options.limit));
|
|
6601
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6602
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6604
|
+
if (_optionalChain([options, 'optionalAccess', _360 => _360.cursor])) params.set("cursor", options.cursor);
|
|
6605
|
+
if (_optionalChain([options, 'optionalAccess', _361 => _361.includeConsumers])) params.set("include_consumers", "true");
|
|
6603
6606
|
const query = params.toString();
|
|
6604
6607
|
const suffix = query ? `?${query}` : "";
|
|
6605
6608
|
return this.http.request(
|
|
@@ -6615,7 +6618,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6615
6618
|
);
|
|
6616
6619
|
}
|
|
6617
6620
|
async testMonitorWebhook(key, payload, options) {
|
|
6618
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6621
|
+
if (_optionalChain([options, 'optionalAccess', _362 => _362.dispatch]) === true || _optionalChain([options, 'optionalAccess', _363 => _363.validationOnly]) === false) {
|
|
6619
6622
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6620
6623
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
6621
6624
|
void 0,
|
|
@@ -6670,7 +6673,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6670
6673
|
}
|
|
6671
6674
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
6672
6675
|
async deleteMonitor(key, options) {
|
|
6673
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6676
|
+
if (_optionalChain([options, 'optionalAccess', _364 => _364.localOnly]) === true) {
|
|
6674
6677
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6675
6678
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
6676
6679
|
void 0,
|
|
@@ -6678,11 +6681,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6678
6681
|
);
|
|
6679
6682
|
}
|
|
6680
6683
|
const params = new URLSearchParams();
|
|
6681
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6684
|
+
if (_optionalChain([options, 'optionalAccess', _365 => _365.dryRun])) params.set("dry_run", "true");
|
|
6682
6685
|
const query = params.toString();
|
|
6683
6686
|
return this.http.request(
|
|
6684
6687
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
6685
|
-
_optionalChain([options, 'optionalAccess',
|
|
6688
|
+
_optionalChain([options, 'optionalAccess', _366 => _366.dryRun]) ? { method: "DELETE" } : {
|
|
6686
6689
|
method: "DELETE",
|
|
6687
6690
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
6688
6691
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -6695,10 +6698,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6695
6698
|
* Prefer `client.monitors.reactivate(...)`.
|
|
6696
6699
|
*/
|
|
6697
6700
|
async reactivateMonitor(key, options) {
|
|
6698
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6701
|
+
const query = _optionalChain([options, 'optionalAccess', _367 => _367.dryRun]) ? "?dry_run=true" : "";
|
|
6699
6702
|
return this.http.request(
|
|
6700
6703
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
6701
|
-
_optionalChain([options, 'optionalAccess',
|
|
6704
|
+
_optionalChain([options, 'optionalAccess', _368 => _368.dryRun]) ? { method: "POST", body: {} } : {
|
|
6702
6705
|
method: "POST",
|
|
6703
6706
|
body: {},
|
|
6704
6707
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -6712,7 +6715,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6712
6715
|
// ——————————————————————————————————————————————————————————
|
|
6713
6716
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
6714
6717
|
monitorJobIdempotencyKey(operation) {
|
|
6715
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
6718
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _369 => _369.crypto, 'optionalAccess', _370 => _370.randomUUID, 'optionalCall', _371 => _371()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
6716
6719
|
const prefix = "monitor-job-";
|
|
6717
6720
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
6718
6721
|
const maxOperationLength = Math.max(
|
|
@@ -6723,7 +6726,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6723
6726
|
}
|
|
6724
6727
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
6725
6728
|
return {
|
|
6726
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6729
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _372 => _372.trim, 'call', _373 => _373()]) || this.monitorJobIdempotencyKey(operation)
|
|
6727
6730
|
};
|
|
6728
6731
|
}
|
|
6729
6732
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -6734,7 +6737,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6734
6737
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
6735
6738
|
headers: this.monitorJobHeaders(
|
|
6736
6739
|
"batch-deploy",
|
|
6737
|
-
_optionalChain([options, 'optionalAccess',
|
|
6740
|
+
_optionalChain([options, 'optionalAccess', _374 => _374.idempotencyKey])
|
|
6738
6741
|
),
|
|
6739
6742
|
maxRetries: 0,
|
|
6740
6743
|
exactUrlOnly: true
|
|
@@ -6753,11 +6756,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6753
6756
|
version: 1,
|
|
6754
6757
|
kind: "batch",
|
|
6755
6758
|
monitors: definitions,
|
|
6756
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6759
|
+
..._optionalChain([options, 'optionalAccess', _375 => _375.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
6757
6760
|
},
|
|
6758
6761
|
headers: this.monitorJobHeaders(
|
|
6759
6762
|
`batch-sync-${batchId}`,
|
|
6760
|
-
_optionalChain([options, 'optionalAccess',
|
|
6763
|
+
_optionalChain([options, 'optionalAccess', _376 => _376.idempotencyKey])
|
|
6761
6764
|
),
|
|
6762
6765
|
maxRetries: 0,
|
|
6763
6766
|
exactUrlOnly: true
|
|
@@ -6772,7 +6775,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6772
6775
|
body: {},
|
|
6773
6776
|
headers: this.monitorJobHeaders(
|
|
6774
6777
|
`batch-start-${batchId}`,
|
|
6775
|
-
_optionalChain([options, 'optionalAccess',
|
|
6778
|
+
_optionalChain([options, 'optionalAccess', _377 => _377.idempotencyKey])
|
|
6776
6779
|
),
|
|
6777
6780
|
maxRetries: 0,
|
|
6778
6781
|
exactUrlOnly: true
|
|
@@ -6787,7 +6790,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6787
6790
|
body: {},
|
|
6788
6791
|
headers: this.monitorJobHeaders(
|
|
6789
6792
|
`batch-stop-${batchId}`,
|
|
6790
|
-
_optionalChain([options, 'optionalAccess',
|
|
6793
|
+
_optionalChain([options, 'optionalAccess', _378 => _378.idempotencyKey])
|
|
6791
6794
|
),
|
|
6792
6795
|
maxRetries: 0,
|
|
6793
6796
|
exactUrlOnly: true
|
|
@@ -6808,7 +6811,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6808
6811
|
body: {},
|
|
6809
6812
|
headers: this.monitorJobHeaders(
|
|
6810
6813
|
`${action}-${monitorKey}`,
|
|
6811
|
-
_optionalChain([options, 'optionalAccess',
|
|
6814
|
+
_optionalChain([options, 'optionalAccess', _379 => _379.idempotencyKey])
|
|
6812
6815
|
),
|
|
6813
6816
|
maxRetries: 0,
|
|
6814
6817
|
exactUrlOnly: true
|
|
@@ -6821,7 +6824,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6821
6824
|
body: definition,
|
|
6822
6825
|
headers: this.monitorJobHeaders(
|
|
6823
6826
|
`sync-${definition.key}`,
|
|
6824
|
-
_optionalChain([options, 'optionalAccess',
|
|
6827
|
+
_optionalChain([options, 'optionalAccess', _380 => _380.idempotencyKey])
|
|
6825
6828
|
),
|
|
6826
6829
|
maxRetries: 0,
|
|
6827
6830
|
exactUrlOnly: true
|
|
@@ -6834,7 +6837,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6834
6837
|
);
|
|
6835
6838
|
}
|
|
6836
6839
|
async getMonitorJobLogs(jobId, options) {
|
|
6837
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6840
|
+
const query = _optionalChain([options, 'optionalAccess', _381 => _381.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
6838
6841
|
return this.http.request(
|
|
6839
6842
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
6840
6843
|
{ method: "GET" }
|
|
@@ -6847,15 +6850,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6847
6850
|
);
|
|
6848
6851
|
}
|
|
6849
6852
|
async waitForMonitorJob(jobId, options) {
|
|
6850
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6851
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6853
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _382 => _382.timeoutMs]), () => ( 10 * 6e4)));
|
|
6854
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _383 => _383.pollIntervalMs]), () => ( 2e3)));
|
|
6852
6855
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
6853
6856
|
const startedAt = Date.now();
|
|
6854
6857
|
let latest = await this.getMonitorJob(jobId);
|
|
6855
6858
|
while (true) {
|
|
6856
|
-
_optionalChain([options, 'optionalAccess',
|
|
6859
|
+
_optionalChain([options, 'optionalAccess', _384 => _384.onProgress, 'optionalCall', _385 => _385(latest)]);
|
|
6857
6860
|
const job = latest.job;
|
|
6858
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
6861
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _386 => _386.state]) === "string" ? job.state : void 0;
|
|
6859
6862
|
if (state && terminal.has(state)) return latest;
|
|
6860
6863
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
6861
6864
|
await sleep(pollIntervalMs);
|
|
@@ -6866,12 +6869,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6866
6869
|
// Monitor Fleets
|
|
6867
6870
|
// ——————————————————————————————————————————————————————————
|
|
6868
6871
|
monitorFleetIdempotencyKey(operation) {
|
|
6869
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
6872
|
+
const uuid = _optionalChain([globalThis, 'access', _387 => _387.crypto, 'optionalAccess', _388 => _388.randomUUID, 'optionalCall', _389 => _389()]);
|
|
6870
6873
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
6871
6874
|
}
|
|
6872
6875
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
6873
6876
|
return {
|
|
6874
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6877
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _390 => _390.trim, 'call', _391 => _391()]) || this.monitorFleetIdempotencyKey(operation)
|
|
6875
6878
|
};
|
|
6876
6879
|
}
|
|
6877
6880
|
monitorFleetPath(fleetId) {
|
|
@@ -6891,15 +6894,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6891
6894
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
6892
6895
|
const body = {
|
|
6893
6896
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
6894
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6895
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6897
|
+
..._optionalChain([options, 'optionalAccess', _392 => _392.dryRun]) ? { dry_run: true } : {},
|
|
6898
|
+
..._optionalChain([options, 'optionalAccess', _393 => _393.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
6896
6899
|
};
|
|
6897
6900
|
return this.http.request(
|
|
6898
6901
|
this.monitorFleetPath(fleetId),
|
|
6899
6902
|
{
|
|
6900
6903
|
method: "PUT",
|
|
6901
6904
|
body,
|
|
6902
|
-
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
6905
|
+
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _394 => _394.idempotencyKey])),
|
|
6903
6906
|
maxRetries: 0,
|
|
6904
6907
|
exactUrlOnly: true
|
|
6905
6908
|
}
|
|
@@ -6912,8 +6915,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6912
6915
|
}
|
|
6913
6916
|
async getMonitorFleet(fleetId, options) {
|
|
6914
6917
|
const params = new URLSearchParams();
|
|
6915
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6916
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6918
|
+
if (_optionalChain([options, 'optionalAccess', _395 => _395.drift])) params.set("drift", "1");
|
|
6919
|
+
if (_optionalChain([options, 'optionalAccess', _396 => _396.limit]) !== void 0)
|
|
6917
6920
|
params.set("limit", String(options.limit));
|
|
6918
6921
|
const query = params.toString();
|
|
6919
6922
|
return this.http.request(
|
|
@@ -6926,10 +6929,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6926
6929
|
this.monitorFleetPath(fleetId),
|
|
6927
6930
|
{
|
|
6928
6931
|
method: "DELETE",
|
|
6929
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
6932
|
+
body: _optionalChain([options, 'optionalAccess', _397 => _397.dryRun]) ? { dry_run: true } : {},
|
|
6930
6933
|
headers: this.monitorFleetHeaders(
|
|
6931
6934
|
"deactivate",
|
|
6932
|
-
_optionalChain([options, 'optionalAccess',
|
|
6935
|
+
_optionalChain([options, 'optionalAccess', _398 => _398.idempotencyKey])
|
|
6933
6936
|
),
|
|
6934
6937
|
maxRetries: 0,
|
|
6935
6938
|
exactUrlOnly: true
|
|
@@ -6944,7 +6947,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6944
6947
|
body: {},
|
|
6945
6948
|
headers: this.monitorFleetHeaders(
|
|
6946
6949
|
"reactivate",
|
|
6947
|
-
_optionalChain([options, 'optionalAccess',
|
|
6950
|
+
_optionalChain([options, 'optionalAccess', _399 => _399.idempotencyKey])
|
|
6948
6951
|
),
|
|
6949
6952
|
maxRetries: 0,
|
|
6950
6953
|
exactUrlOnly: true
|
|
@@ -6961,13 +6964,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6961
6964
|
* identical to "the request failed".
|
|
6962
6965
|
*/
|
|
6963
6966
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
6964
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6965
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6966
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
6967
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _400 => _400.timeoutMs]), () => ( 10 * 6e4)));
|
|
6968
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _401 => _401.pollIntervalMs]), () => ( 2e3)));
|
|
6969
|
+
const terminal = _optionalChain([options, 'optionalAccess', _402 => _402.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
|
|
6967
6970
|
const startedAt = Date.now();
|
|
6968
6971
|
let latest = await this.getMonitorFleet(fleetId);
|
|
6969
6972
|
while (true) {
|
|
6970
|
-
_optionalChain([options, 'optionalAccess',
|
|
6973
|
+
_optionalChain([options, 'optionalAccess', _403 => _403.onProgress, 'optionalCall', _404 => _404(latest)]);
|
|
6971
6974
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
6972
6975
|
if (status && terminal.has(status)) return latest;
|
|
6973
6976
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|