deepline 0.3.509 → 0.3.511
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 +159 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +7 -2
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +3 -3
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-execution-relay.ts +94 -43
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +111 -27
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/runtime-topology.ts +79 -6
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +80 -6
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-transient-retry.ts +571 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +218 -33
- package/dist/cli/artifacts-G6JHRHY5.mjs +268 -0
- package/dist/cli/artifacts-PLF5ZUS7.js +268 -0
- package/dist/cli/{auth-6IR2QH4N.mjs → auth-2XMJMDWG.mjs} +5 -5
- package/dist/cli/auth-PI2KS2CD.js +43 -0
- package/dist/cli/{billing-WEWHH6ST.mjs → billing-6C5AI42X.mjs} +7 -7
- package/dist/cli/{billing-SYBK3ZYU.js → billing-Z3XFXP3H.js} +82 -82
- package/dist/cli/{chunk-JZJNA57M.js → chunk-2Q4H2Y6N.js} +6 -6
- package/dist/cli/{chunk-VTVZ7EUA.js → chunk-2YVRIXVR.js} +9 -9
- package/dist/cli/{chunk-RSKAPLST.mjs → chunk-5WTLXL6O.mjs} +1 -1
- package/dist/cli/{chunk-YJM3NOME.mjs → chunk-77DPQI6W.mjs} +94 -10
- package/dist/cli/{chunk-FNLGMMJJ.mjs → chunk-ASXOFBF7.mjs} +2 -2
- package/dist/cli/{chunk-AO63MXT6.js → chunk-BHV7JKXQ.js} +1 -1
- package/dist/cli/{chunk-RA2NKHV5.js → chunk-D5VWSR4D.js} +5 -5
- package/dist/cli/{chunk-CMSPA5VX.js → chunk-FAGSSIOY.js} +6 -6
- package/dist/cli/{chunk-J5P4PDRT.js → chunk-FF25PDQ2.js} +94 -10
- package/dist/cli/{chunk-SEQIB5WJ.mjs → chunk-FTT2SBBH.mjs} +5 -5
- package/dist/cli/{chunk-5Y3I5LEQ.js → chunk-FV4PASXH.js} +16 -16
- package/dist/cli/{chunk-GTAU4C44.js → chunk-GD3ES3JU.js} +14 -14
- package/dist/cli/{chunk-HMAETS53.js → chunk-GGQHOLH6.js} +3 -3
- package/dist/cli/{chunk-T67NAGSD.mjs → chunk-GJWL4KTY.mjs} +4 -4
- package/dist/cli/{chunk-6KBVQ76G.mjs → chunk-HLEZQDEZ.mjs} +2 -2
- package/dist/cli/{chunk-WJ6H2W3O.mjs → chunk-ISY7PBIK.mjs} +5 -5
- package/dist/cli/{chunk-AD45WJHN.js → chunk-IYWN7M4I.js} +5 -5
- package/dist/cli/{chunk-3CZHC24N.mjs → chunk-JDDKJIZU.mjs} +1 -1
- package/dist/cli/{chunk-E3HWUGDT.mjs → chunk-JHBZBCU4.mjs} +1 -1
- package/dist/cli/{chunk-7KALZEDZ.js → chunk-JIY25SUX.js} +4 -4
- package/dist/cli/{chunk-726UDAV2.js → chunk-JYFLIQPE.js} +7 -7
- package/dist/cli/{chunk-DGOSW42X.js → chunk-K4JB2BZP.js} +96 -96
- package/dist/cli/{chunk-XEQH65DT.mjs → chunk-KK6NZHAJ.mjs} +1 -1
- package/dist/cli/chunk-KUDNPJ43.js +77 -0
- package/dist/cli/{chunk-IZW7IOD6.mjs → chunk-KXGH4YUQ.mjs} +1 -1
- package/dist/cli/{chunk-Q7G6WORO.js → chunk-KZBKQPSA.js} +2 -2
- package/dist/cli/{chunk-4DVANPBN.js → chunk-LDZYGM7W.js} +41 -41
- package/dist/cli/{chunk-XPKBYMJH.js → chunk-LKSJXTRP.js} +53 -53
- package/dist/cli/{chunk-Q5UO2ENN.js → chunk-NVMNMKZW.js} +3 -3
- package/dist/cli/{chunk-VZ773N7G.js → chunk-O37BQ2CG.js} +21 -10
- package/dist/cli/{chunk-OOD5LGUS.mjs → chunk-OQ4YBPOQ.mjs} +3 -3
- package/dist/cli/{chunk-UART6FGK.mjs → chunk-PCI4MMH7.mjs} +1 -1
- package/dist/cli/{chunk-2ZJRCAHG.js → chunk-PI45LZ5B.js} +11 -11
- package/dist/cli/{chunk-O527H5GY.js → chunk-PUFEARWT.js} +16 -16
- package/dist/cli/{chunk-25MAOMVS.mjs → chunk-QDWNVTTO.mjs} +2 -2
- package/dist/cli/{chunk-WUKNKFB3.mjs → chunk-RPPU3XB3.mjs} +2 -2
- package/dist/cli/{chunk-XIBNY6H6.mjs → chunk-S5C4CWSS.mjs} +5 -5
- package/dist/cli/{chunk-2U7Z4LFG.mjs → chunk-S6KEACD3.mjs} +6 -6
- package/dist/cli/{chunk-Y4M5HPQV.mjs → chunk-SI4QXATV.mjs} +5 -5
- package/dist/cli/{chunk-R2KNJMOY.mjs → chunk-VEOFISLZ.mjs} +1 -1
- package/dist/cli/{chunk-Z2LVZDO5.js → chunk-VHFTN6VY.js} +44 -44
- package/dist/cli/{chunk-54YPOG5W.mjs → chunk-VQ74WMKG.mjs} +15 -4
- package/dist/cli/{chunk-ZXGMWXZW.js → chunk-WDBEWOU6.js} +2 -2
- package/dist/cli/{chunk-6TBRWRJ2.js → chunk-XGXXNT4O.js} +270 -199
- package/dist/cli/chunk-XREZY4FA.mjs +77 -0
- package/dist/cli/{chunk-K2RCVD7S.mjs → chunk-XSBGWMI6.mjs} +72 -1
- package/dist/cli/{chunk-S7JEF2MR.mjs → chunk-XXQZYLLL.mjs} +2 -2
- package/dist/cli/{chunk-EEEWADSR.mjs → chunk-XZ6IZIQJ.mjs} +2 -2
- package/dist/cli/{chunk-WPBTWRKG.js → chunk-YX7E2VQM.js} +26 -26
- package/dist/cli/{chunk-FQCIYGQY.mjs → chunk-ZFJ2U76O.mjs} +2 -2
- package/dist/cli/{chunk-7NMPGX3W.js → chunk-ZWGBQKW7.js} +21 -21
- package/dist/cli/{chunk-VH522HUP.mjs → chunk-ZYVR4A4P.mjs} +10 -10
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-4LAJ2ZKG.mjs → csv-CNK6ZF3T.mjs} +4 -4
- package/dist/cli/{csv-5KNONIAX.js → csv-S44OGG2O.js} +13 -13
- package/dist/cli/{db-BEVCJI66.mjs → db-AVO6QJU6.mjs} +6 -6
- package/dist/cli/{db-5PEXOSN3.js → db-WKZ6EXNG.js} +27 -27
- package/dist/cli/{describe-TDJIUSD6.mjs → describe-2HQRT5MI.mjs} +18 -18
- package/dist/cli/describe-CCK77NER.js +50 -0
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-KXCPU6YC.mjs → executions-DKHOR7HD.mjs} +6 -6
- package/dist/cli/{executions-36GV3A27.js → executions-MTAHNARA.js} +8 -8
- package/dist/cli/{feedback-GEUUT4S7.mjs → feedback-K6SJS4LG.mjs} +11 -7
- package/dist/cli/{feedback-SPQABV33.js → feedback-R2UABU3E.js} +15 -11
- package/dist/cli/{git-AE36X2R6.mjs → git-3EPA7433.mjs} +5 -5
- package/dist/cli/git-7L3PY2A4.js +25 -0
- package/dist/cli/index.js +177 -156
- package/dist/cli/index.mjs +80 -59
- package/dist/cli/{legacy-noops-TKPHN7WT.js → legacy-noops-3Q2D2F24.js} +9 -8
- package/dist/cli/{legacy-noops-LUEDAK7J.mjs → legacy-noops-66OPCJJD.mjs} +6 -5
- package/dist/cli/{monitors-JHJZ5XG7.mjs → monitors-2PYPRWT4.mjs} +7 -7
- package/dist/cli/{monitors-B2EAIGZI.js → monitors-KHH4MZDF.js} +100 -100
- package/dist/cli/{org-GUICCEBZ.mjs → org-WAW3OL7B.mjs} +6 -6
- package/dist/cli/{org-PYCPXEAU.js → org-X5G36B2Q.js} +72 -72
- package/dist/cli/{pages-Y2XI36HY.mjs → pages-KABWXDGW.mjs} +6 -6
- package/dist/cli/{pages-CV4TQNFY.js → pages-XDPHCHHU.js} +18 -18
- package/dist/cli/{play-VWCQNGZZ.mjs → play-654B2HQU.mjs} +18 -18
- package/dist/cli/{play-MTVK66JK.js → play-UE5FKQCO.js} +317 -317
- package/dist/cli/{providers-N72BUCXZ.js → providers-QT2BZMJ7.js} +9 -9
- package/dist/cli/{providers-ZOZTST3A.mjs → providers-SKNGX6IT.mjs} +6 -6
- package/dist/cli/{quickstart-DXIC3NHS.mjs → quickstart-BX7XMJIQ.mjs} +4 -4
- package/dist/cli/{quickstart-FK53VZB3.js → quickstart-XWDVAQTT.js} +6 -6
- package/dist/cli/{run-NNAYDCEN.js → run-C6YYD4AK.js} +41 -41
- package/dist/cli/{run-IL2KI33N.mjs → run-JTU4K4MY.mjs} +23 -23
- package/dist/cli/{search-7IPVMQCO.mjs → search-NHV4Y4SX.mjs} +8 -8
- package/dist/cli/search-RIFW5JCK.js +33 -0
- package/dist/cli/{search-output-ZY2GE35S.mjs → search-output-AAOMFK7K.mjs} +4 -4
- package/dist/cli/{search-output-YHTWLSDE.js → search-output-WLFFEGCY.js} +6 -6
- package/dist/cli/{secrets-ZML76SH2.js → secrets-H4WTLQJJ.js} +15 -15
- package/dist/cli/{secrets-BGUMHDZ7.mjs → secrets-S66PZSRO.mjs} +6 -6
- package/dist/cli/sessions-EFWO62XJ.js +18 -0
- package/dist/cli/{sessions-F5XO6HZJ.mjs → sessions-PY6FJX3O.mjs} +6 -5
- package/dist/cli/{settings-73SMIICV.mjs → settings-V7BM42KQ.mjs} +39 -12
- package/dist/cli/{settings-TOX2P5M5.js → settings-YO4FFPN6.js} +109 -82
- package/dist/cli/{setup-DNFHFQ7N.js → setup-IFZYYQ2W.js} +50 -50
- package/dist/cli/{setup-FDJZYBMS.mjs → setup-VUBM2HMH.mjs} +10 -10
- package/dist/cli/{skills-6HJ2IAY6.mjs → skills-EYWRSQQJ.mjs} +8 -8
- package/dist/cli/skills-LFP53SWQ.js +37 -0
- package/dist/cli/tools-SR2Q7KC5.js +57 -0
- package/dist/cli/{tools-4FJIIE4R.mjs → tools-VZOW4MUD.mjs} +17 -17
- package/dist/cli/update-ADZBZZZS.js +35 -0
- package/dist/cli/{update-UMRPPILV.mjs → update-CQDJJYU2.mjs} +10 -10
- package/dist/cli/{workflow-LSFOG5VU.mjs → workflow-2VRDIPF3.mjs} +7 -7
- package/dist/cli/{workflow-SK3BUHB4.js → workflow-XS3JEU6X.js} +17 -17
- package/dist/{client-DMpsMNH9.d.mts → client-By7bUS8h.d.mts} +1 -1
- package/dist/{client-BlwD-G4v.d.ts → client-CmlKSBXd.d.ts} +1 -1
- package/dist/{client-core-DwBLuEkm.d.ts → client-core-BM0mKhgp.d.ts} +93 -1
- package/dist/{client-core-CITtRTbB.d.mts → client-core-BZ3tpY_J.d.mts} +93 -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 +111 -106
- 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-SUTQ4SZQ.js +0 -43
- package/dist/cli/describe-ZB6G6DOV.js +0 -50
- package/dist/cli/git-UX7L6R32.js +0 -25
- package/dist/cli/search-OZHP5ZE2.js +0 -33
- package/dist/cli/sessions-WDINUUZ3.js +0 -17
- package/dist/cli/skills-NE7WN5PP.js +0 -37
- package/dist/cli/tools-ETX4MNNO.js +0 -57
- package/dist/cli/update-N2DMPSUH.js +0 -35
|
@@ -31,7 +31,7 @@ var _chunkNMU3VR5Ujs = require('./chunk-NMU3VR5U.js');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkJIY25SUXjs = require('./chunk-JIY25SUX.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(_chunkJIY25SUXjs.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 {
|
|
@@ -1107,8 +1107,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1107
1107
|
}
|
|
1108
1108
|
const receivers = _optionalChain([env, 'access', _55 => _55.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]);
|
|
1109
1109
|
return {
|
|
1110
|
-
[
|
|
1111
|
-
...receivers ? { [
|
|
1110
|
+
[_chunkJIY25SUXjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1111
|
+
...receivers ? { [_chunkJIY25SUXjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1112
1112
|
};
|
|
1113
1113
|
}
|
|
1114
1114
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1179,7 +1179,7 @@ var PlayClient = class {
|
|
|
1179
1179
|
return _chunkRNSHCJMEjs.startPlayRun.call(void 0,
|
|
1180
1180
|
this.http,
|
|
1181
1181
|
resolved.request,
|
|
1182
|
-
_optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1182
|
+
_optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkJIY25SUXjs.SDK_API_MAJOR) } : headers,
|
|
1183
1183
|
options
|
|
1184
1184
|
);
|
|
1185
1185
|
}
|
|
@@ -3260,7 +3260,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3260
3260
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3261
3261
|
);
|
|
3262
3262
|
}
|
|
3263
|
-
return { [
|
|
3263
|
+
return { [_chunkJIY25SUXjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3264
3264
|
}
|
|
3265
3265
|
function sleep(ms) {
|
|
3266
3266
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -3740,6 +3740,77 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3740
3740
|
`/api/v2/pages/${encodeURIComponent(name)}/links/${encodeURIComponent(linkId)}`
|
|
3741
3741
|
);
|
|
3742
3742
|
}
|
|
3743
|
+
// ——————————————————————————————————————————————————————————
|
|
3744
|
+
// Artifacts
|
|
3745
|
+
// ——————————————————————————————————————————————————————————
|
|
3746
|
+
/** List this workspace's artifacts, most recently changed first. */
|
|
3747
|
+
async listArtifacts(input) {
|
|
3748
|
+
const params = new URLSearchParams();
|
|
3749
|
+
if (_optionalChain([input, 'optionalAccess', _164 => _164.cursor])) params.set("cursor", input.cursor);
|
|
3750
|
+
if (_optionalChain([input, 'optionalAccess', _165 => _165.limit])) params.set("limit", String(input.limit));
|
|
3751
|
+
const query = params.size > 0 ? `?${params}` : "";
|
|
3752
|
+
return await this.http.get(`/api/v2/artifacts${query}`);
|
|
3753
|
+
}
|
|
3754
|
+
/** One artifact and what the caller may do with it. */
|
|
3755
|
+
async getArtifact(id) {
|
|
3756
|
+
return await this.http.get(
|
|
3757
|
+
`/api/v2/artifacts/${encodeURIComponent(id)}`
|
|
3758
|
+
);
|
|
3759
|
+
}
|
|
3760
|
+
/** Create an artifact that shows a Play's runs at a fixed URL. */
|
|
3761
|
+
async createArtifact(input) {
|
|
3762
|
+
return await this.http.post("/api/v2/artifacts", input);
|
|
3763
|
+
}
|
|
3764
|
+
/** Change the name, description, Play, or saved input. */
|
|
3765
|
+
async updateArtifact(id, input) {
|
|
3766
|
+
return await this.http.patch(
|
|
3767
|
+
`/api/v2/artifacts/${encodeURIComponent(id)}`,
|
|
3768
|
+
input
|
|
3769
|
+
);
|
|
3770
|
+
}
|
|
3771
|
+
/** Who can open an artifact: workspace members, or anyone with its URL. */
|
|
3772
|
+
async setArtifactAccess(id, access) {
|
|
3773
|
+
return await this.http.post(
|
|
3774
|
+
`/api/v2/artifacts/${encodeURIComponent(id)}/access`,
|
|
3775
|
+
{ access }
|
|
3776
|
+
);
|
|
3777
|
+
}
|
|
3778
|
+
/** Every run of the artifact's Play, newest first. */
|
|
3779
|
+
async listArtifactRuns(id, input) {
|
|
3780
|
+
const params = new URLSearchParams();
|
|
3781
|
+
if (_optionalChain([input, 'optionalAccess', _166 => _166.limit])) params.set("limit", String(input.limit));
|
|
3782
|
+
if (_optionalChain([input, 'optionalAccess', _167 => _167.offset])) params.set("offset", String(input.offset));
|
|
3783
|
+
const query = params.size > 0 ? `?${params}` : "";
|
|
3784
|
+
return await this.http.get(
|
|
3785
|
+
`/api/v2/artifacts/${encodeURIComponent(id)}/runs${query}`
|
|
3786
|
+
);
|
|
3787
|
+
}
|
|
3788
|
+
/**
|
|
3789
|
+
* Refresh an artifact: run its Play with its saved input (or `input`). The run
|
|
3790
|
+
* goes through the normal run API; the artifact shows it when it finishes.
|
|
3791
|
+
*/
|
|
3792
|
+
async refreshArtifact(id, input) {
|
|
3793
|
+
const intent = await this.http.post(`/api/v2/artifacts/${encodeURIComponent(id)}/refresh`, {});
|
|
3794
|
+
const started = await this.startPlayRun({
|
|
3795
|
+
name: intent.play,
|
|
3796
|
+
input: _nullishCoalesce(input, () => ( intent.input))
|
|
3797
|
+
});
|
|
3798
|
+
return { ...started, artifact: intent.id };
|
|
3799
|
+
}
|
|
3800
|
+
/** Delete an artifact. Its Play and runs are not touched. */
|
|
3801
|
+
async deleteArtifact(id) {
|
|
3802
|
+
return await this.http.delete(
|
|
3803
|
+
`/api/v2/artifacts/${encodeURIComponent(id)}`
|
|
3804
|
+
);
|
|
3805
|
+
}
|
|
3806
|
+
/** The workspace artifact rules and what the caller may do. */
|
|
3807
|
+
async getArtifactPermissions() {
|
|
3808
|
+
return await this.http.get("/api/v2/artifacts/permissions");
|
|
3809
|
+
}
|
|
3810
|
+
/** Change artifact rules. Admins only; omitted verbs keep their rule. */
|
|
3811
|
+
async setArtifactPermissions(rules) {
|
|
3812
|
+
return await this.http.put("/api/v2/artifacts/permissions", { rules });
|
|
3813
|
+
}
|
|
3743
3814
|
/** List secret metadata visible to the current workspace. */
|
|
3744
3815
|
async listSecrets() {
|
|
3745
3816
|
const response = await this.http.get(
|
|
@@ -3798,17 +3869,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3798
3869
|
*/
|
|
3799
3870
|
async listTools(options) {
|
|
3800
3871
|
const params = new URLSearchParams();
|
|
3801
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3872
|
+
if (_optionalChain([options, 'optionalAccess', _168 => _168.categories, 'optionalAccess', _169 => _169.trim, 'call', _170 => _170()])) {
|
|
3802
3873
|
params.set("categories", options.categories.trim());
|
|
3803
3874
|
}
|
|
3804
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3875
|
+
if (_optionalChain([options, 'optionalAccess', _171 => _171.tags, 'optionalAccess', _172 => _172.trim, 'call', _173 => _173()])) {
|
|
3805
3876
|
params.set("tags", options.tags.trim());
|
|
3806
3877
|
}
|
|
3807
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3878
|
+
if (_optionalChain([options, 'optionalAccess', _174 => _174.grep, 'optionalAccess', _175 => _175.trim, 'call', _176 => _176()])) {
|
|
3808
3879
|
params.set("grep", options.grep.trim());
|
|
3809
3880
|
params.set("grep_mode", _nullishCoalesce(options.grepMode, () => ( "all")));
|
|
3810
3881
|
}
|
|
3811
|
-
params.set("compact", _optionalChain([options, 'optionalAccess',
|
|
3882
|
+
params.set("compact", _optionalChain([options, 'optionalAccess', _177 => _177.compact]) === true ? "true" : "false");
|
|
3812
3883
|
const suffix = params.toString() ? `?${params.toString()}` : "";
|
|
3813
3884
|
const res = await this.http.get(
|
|
3814
3885
|
`/api/v2/tools${suffix}`
|
|
@@ -3841,7 +3912,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3841
3912
|
const params = new URLSearchParams({
|
|
3842
3913
|
view: "category",
|
|
3843
3914
|
categories: normalizedCategory,
|
|
3844
|
-
compact: _optionalChain([options, 'optionalAccess',
|
|
3915
|
+
compact: _optionalChain([options, 'optionalAccess', _178 => _178.compact]) === true ? "true" : "false"
|
|
3845
3916
|
});
|
|
3846
3917
|
const response = await this.http.get(
|
|
3847
3918
|
`/api/v2/tools?${params}`
|
|
@@ -3856,7 +3927,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3856
3927
|
}
|
|
3857
3928
|
/** List discoverable providers without requiring a local plugin catalog. */
|
|
3858
3929
|
async listProviders(options) {
|
|
3859
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
3930
|
+
const suffix = _optionalChain([options, 'optionalAccess', _179 => _179.changed]) ? "?changed=true" : "";
|
|
3860
3931
|
const res = await this.http.get(
|
|
3861
3932
|
`/api/v2/tools/providers${suffix}`
|
|
3862
3933
|
);
|
|
@@ -3887,8 +3958,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3887
3958
|
*/
|
|
3888
3959
|
async search(options = {}) {
|
|
3889
3960
|
const params = searchParams(options);
|
|
3890
|
-
if (_optionalChain([options, 'access',
|
|
3891
|
-
if (_optionalChain([options, 'access',
|
|
3961
|
+
if (_optionalChain([options, 'access', _180 => _180.types, 'optionalAccess', _181 => _181.length])) params.set("types", options.types.join(","));
|
|
3962
|
+
if (_optionalChain([options, 'access', _182 => _182.exclude, 'optionalAccess', _183 => _183.length])) {
|
|
3892
3963
|
params.set("exclude", options.exclude.join(","));
|
|
3893
3964
|
}
|
|
3894
3965
|
return this.http.get(`/api/v2/search?${params.toString()}`);
|
|
@@ -3910,7 +3981,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3910
3981
|
* ```
|
|
3911
3982
|
*/
|
|
3912
3983
|
async getTool(toolId, options) {
|
|
3913
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3984
|
+
if (_optionalChain([options, 'optionalAccess', _184 => _184.cliInvocationId]) !== void 0) {
|
|
3914
3985
|
validateCliInvocationId(options.cliInvocationId);
|
|
3915
3986
|
}
|
|
3916
3987
|
return this.http.request(
|
|
@@ -3923,7 +3994,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3923
3994
|
retryApiErrors: true,
|
|
3924
3995
|
headers: {
|
|
3925
3996
|
"x-deepline-tool-meta-only": "1",
|
|
3926
|
-
..._optionalChain([options, 'optionalAccess',
|
|
3997
|
+
..._optionalChain([options, 'optionalAccess', _185 => _185.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
|
|
3927
3998
|
}
|
|
3928
3999
|
}
|
|
3929
4000
|
);
|
|
@@ -4014,7 +4085,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4014
4085
|
return this.http.post(
|
|
4015
4086
|
"/api/v2/ingestion/repair",
|
|
4016
4087
|
{
|
|
4017
|
-
..._optionalChain([input, 'optionalAccess',
|
|
4088
|
+
..._optionalChain([input, 'optionalAccess', _186 => _186.provider]) ? { provider: input.provider } : {}
|
|
4018
4089
|
}
|
|
4019
4090
|
);
|
|
4020
4091
|
}
|
|
@@ -4069,7 +4140,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4069
4140
|
const prepared = await _chunkRNSHCJMEjs.preparePlayRunAdmission.call(void 0,
|
|
4070
4141
|
this.http,
|
|
4071
4142
|
resolved.request,
|
|
4072
|
-
_optionalChain([options, 'optionalAccess',
|
|
4143
|
+
_optionalChain([options, 'optionalAccess', _187 => _187.onSubmission]),
|
|
4073
4144
|
options
|
|
4074
4145
|
);
|
|
4075
4146
|
const bodyJson = JSON.stringify(prepared.body);
|
|
@@ -4077,9 +4148,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4077
4148
|
resolved.runtime,
|
|
4078
4149
|
this.environment
|
|
4079
4150
|
);
|
|
4080
|
-
const headers = _optionalChain([options, 'optionalAccess',
|
|
4151
|
+
const headers = _optionalChain([options, 'optionalAccess', _188 => _188.cliAdmission]) ? {
|
|
4081
4152
|
...runtimeHeaders,
|
|
4082
|
-
"X-Deepline-API-Major": String(
|
|
4153
|
+
"X-Deepline-API-Major": String(_chunkJIY25SUXjs.SDK_API_MAJOR)
|
|
4083
4154
|
} : runtimeHeaders;
|
|
4084
4155
|
const http = this.http;
|
|
4085
4156
|
let submitted = false;
|
|
@@ -4094,12 +4165,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4094
4165
|
);
|
|
4095
4166
|
}
|
|
4096
4167
|
if (submitted) {
|
|
4097
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
4168
|
+
if (!_optionalChain([options, 'optionalAccess', _189 => _189.callerIntentV2])) {
|
|
4098
4169
|
await _chunkRNSHCJMEjs.preparePlayRunAdmission.call(void 0,
|
|
4099
4170
|
http,
|
|
4100
4171
|
JSON.parse(bodyJson),
|
|
4101
4172
|
void 0,
|
|
4102
|
-
{ signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess',
|
|
4173
|
+
{ signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess', _190 => _190.signal]), () => ( _optionalChain([options, 'optionalAccess', _191 => _191.signal]))) }
|
|
4103
4174
|
);
|
|
4104
4175
|
}
|
|
4105
4176
|
}
|
|
@@ -4112,9 +4183,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4112
4183
|
prepared.supportsCallerIntent,
|
|
4113
4184
|
headers,
|
|
4114
4185
|
{
|
|
4115
|
-
cliAdmission: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess',
|
|
4116
|
-
callerIntentV2: _optionalChain([options, 'optionalAccess',
|
|
4117
|
-
signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess',
|
|
4186
|
+
cliAdmission: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess', _192 => _192.cliAdmission]), () => ( _optionalChain([options, 'optionalAccess', _193 => _193.cliAdmission]))),
|
|
4187
|
+
callerIntentV2: _optionalChain([options, 'optionalAccess', _194 => _194.callerIntentV2]),
|
|
4188
|
+
signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess', _195 => _195.signal]), () => ( _optionalChain([options, 'optionalAccess', _196 => _196.signal])))
|
|
4118
4189
|
}
|
|
4119
4190
|
);
|
|
4120
4191
|
} catch (error) {
|
|
@@ -4133,26 +4204,26 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4133
4204
|
);
|
|
4134
4205
|
}
|
|
4135
4206
|
if (submitted) {
|
|
4136
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
4207
|
+
if (!_optionalChain([options, 'optionalAccess', _197 => _197.callerIntentV2])) {
|
|
4137
4208
|
await _chunkRNSHCJMEjs.preparePlayRunAdmission.call(void 0,
|
|
4138
4209
|
http,
|
|
4139
4210
|
JSON.parse(bodyJson),
|
|
4140
4211
|
void 0,
|
|
4141
|
-
{ signal: _optionalChain([streamOptions, 'optionalAccess',
|
|
4212
|
+
{ signal: _optionalChain([streamOptions, 'optionalAccess', _198 => _198.signal]) }
|
|
4142
4213
|
);
|
|
4143
4214
|
}
|
|
4144
4215
|
}
|
|
4145
4216
|
submitted = true;
|
|
4146
|
-
const streamPath = _optionalChain([options, 'optionalAccess',
|
|
4217
|
+
const streamPath = _optionalChain([options, 'optionalAccess', _199 => _199.callerIntentV2]) ? _chunkRNSHCJMEjs.CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH : _optionalChain([options, 'optionalAccess', _200 => _200.cliAdmission]) ? _chunkRNSHCJMEjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkRNSHCJMEjs.PLAY_RUN_START_STREAM_PATH;
|
|
4147
4218
|
let cliAdmissionSupported = false;
|
|
4148
4219
|
try {
|
|
4149
4220
|
for await (const event of http.streamSse(streamPath, {
|
|
4150
4221
|
method: "POST",
|
|
4151
4222
|
body: JSON.parse(bodyJson),
|
|
4152
4223
|
headers,
|
|
4153
|
-
signal: _optionalChain([streamOptions, 'optionalAccess',
|
|
4224
|
+
signal: _optionalChain([streamOptions, 'optionalAccess', _201 => _201.signal]),
|
|
4154
4225
|
exactUrlOnly: true,
|
|
4155
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4226
|
+
..._optionalChain([options, 'optionalAccess', _202 => _202.cliAdmission]) ? {
|
|
4156
4227
|
onResponse: (response) => {
|
|
4157
4228
|
cliAdmissionSupported = response.headers.get(_chunkRNSHCJMEjs.CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
|
|
4158
4229
|
}
|
|
@@ -4161,7 +4232,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4161
4232
|
if (event.scope === "play") yield event;
|
|
4162
4233
|
}
|
|
4163
4234
|
} catch (error) {
|
|
4164
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4235
|
+
if (_optionalChain([options, 'optionalAccess', _203 => _203.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
4165
4236
|
if (options.callerIntentV2) {
|
|
4166
4237
|
submitted = false;
|
|
4167
4238
|
throw new (0, _chunkRNSHCJMEjs.CliPlayAdmissionCallerIntentV2UnsupportedError)(
|
|
@@ -4199,7 +4270,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4199
4270
|
*/
|
|
4200
4271
|
async *startPlayRunStream(request, options) {
|
|
4201
4272
|
const prepared = await this.preparePlayRunAdmission(request, options);
|
|
4202
|
-
yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess',
|
|
4273
|
+
yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess', _204 => _204.signal]) });
|
|
4203
4274
|
}
|
|
4204
4275
|
/**
|
|
4205
4276
|
* Register a bundled play artifact.
|
|
@@ -4352,7 +4423,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4352
4423
|
compilerManifest,
|
|
4353
4424
|
...input.input ? { input: input.input } : {},
|
|
4354
4425
|
...input.inputFile ? { inputFile: input.inputFile } : {},
|
|
4355
|
-
..._optionalChain([input, 'access',
|
|
4426
|
+
..._optionalChain([input, 'access', _205 => _205.packagedFiles, 'optionalAccess', _206 => _206.length]) ? { packagedFiles: input.packagedFiles } : {},
|
|
4356
4427
|
...input.force ? { force: true } : {},
|
|
4357
4428
|
...input.forceToolRefresh ? { forceToolRefresh: true } : {}
|
|
4358
4429
|
});
|
|
@@ -4382,29 +4453,29 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4382
4453
|
* ```
|
|
4383
4454
|
*/
|
|
4384
4455
|
async submitPlay(code, csvPath, name, options) {
|
|
4385
|
-
const runtimeInput = _optionalChain([options, 'optionalAccess',
|
|
4456
|
+
const runtimeInput = _optionalChain([options, 'optionalAccess', _207 => _207.input]) ? { ...options.input } : {};
|
|
4386
4457
|
if (csvPath) {
|
|
4387
4458
|
runtimeInput.file = csvPath;
|
|
4388
4459
|
}
|
|
4389
|
-
const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4390
|
-
const artifact = _optionalChain([options, 'optionalAccess',
|
|
4391
|
-
if (!_optionalChain([name, 'optionalAccess',
|
|
4460
|
+
const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _208 => _208.sourceCode]), () => ( code));
|
|
4461
|
+
const artifact = _optionalChain([options, 'optionalAccess', _209 => _209.artifact]);
|
|
4462
|
+
if (!_optionalChain([name, 'optionalAccess', _210 => _210.trim, 'call', _211 => _211()])) {
|
|
4392
4463
|
throw new Error("submitPlay requires a play name.");
|
|
4393
4464
|
}
|
|
4394
4465
|
if (!artifact) {
|
|
4395
4466
|
throw new Error("submitPlay requires a bundled play artifact.");
|
|
4396
4467
|
}
|
|
4397
|
-
const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async
|
|
4468
|
+
const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _212 => _212.compilerManifest]), async () => ( await this.compilePlayManifest({
|
|
4398
4469
|
name,
|
|
4399
4470
|
sourceCode,
|
|
4400
|
-
sourceFiles: _optionalChain([options, 'optionalAccess',
|
|
4471
|
+
sourceFiles: _optionalChain([options, 'optionalAccess', _213 => _213.sourceFiles]),
|
|
4401
4472
|
artifact
|
|
4402
4473
|
})));
|
|
4403
4474
|
const registeredArtifact = await this.registerPlayArtifact({
|
|
4404
4475
|
name,
|
|
4405
4476
|
sourceCode,
|
|
4406
|
-
sourceFiles: _optionalChain([options, 'optionalAccess',
|
|
4407
|
-
description: _optionalChain([options, 'optionalAccess',
|
|
4477
|
+
sourceFiles: _optionalChain([options, 'optionalAccess', _214 => _214.sourceFiles]),
|
|
4478
|
+
description: _optionalChain([options, 'optionalAccess', _215 => _215.description]),
|
|
4408
4479
|
artifact,
|
|
4409
4480
|
compilerManifest,
|
|
4410
4481
|
publish: false
|
|
@@ -4418,17 +4489,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4418
4489
|
name,
|
|
4419
4490
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
4420
4491
|
sourceCode,
|
|
4421
|
-
description: _optionalChain([options, 'optionalAccess',
|
|
4492
|
+
description: _optionalChain([options, 'optionalAccess', _216 => _216.description]),
|
|
4422
4493
|
staticPipeline: _nullishCoalesce(registeredArtifact.staticPipeline, () => ( null)),
|
|
4423
4494
|
artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
|
|
4424
4495
|
graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
|
|
4425
4496
|
runtimeArtifact: artifact,
|
|
4426
4497
|
compilerManifest,
|
|
4427
4498
|
...Object.keys(runtimeInput).length > 0 ? { input: runtimeInput } : {},
|
|
4428
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4429
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4430
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4431
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4499
|
+
..._optionalChain([options, 'optionalAccess', _217 => _217.inputFile]) ? { inputFile: options.inputFile } : {},
|
|
4500
|
+
..._optionalChain([options, 'optionalAccess', _218 => _218.packagedFiles, 'optionalAccess', _219 => _219.length]) ? { packagedFiles: options.packagedFiles } : {},
|
|
4501
|
+
..._optionalChain([options, 'optionalAccess', _220 => _220.force]) ? { force: true } : {},
|
|
4502
|
+
..._optionalChain([options, 'optionalAccess', _221 => _221.forceToolRefresh]) ? { forceToolRefresh: true } : {}
|
|
4432
4503
|
});
|
|
4433
4504
|
}
|
|
4434
4505
|
/**
|
|
@@ -4504,13 +4575,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4504
4575
|
for await (const event of watchRunEvents({
|
|
4505
4576
|
http: this.http,
|
|
4506
4577
|
runId: workflowId,
|
|
4507
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4508
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4509
|
-
onRetry: _optionalChain([options, 'optionalAccess',
|
|
4510
|
-
deferLogs: _optionalChain([options, 'optionalAccess',
|
|
4511
|
-
omitTerminalLogs: _optionalChain([options, 'optionalAccess',
|
|
4512
|
-
onPoll: _optionalChain([options, 'optionalAccess',
|
|
4513
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4578
|
+
signal: _optionalChain([options, 'optionalAccess', _222 => _222.signal]),
|
|
4579
|
+
onNotice: _optionalChain([options, 'optionalAccess', _223 => _223.onNotice]),
|
|
4580
|
+
onRetry: _optionalChain([options, 'optionalAccess', _224 => _224.onRetry]),
|
|
4581
|
+
deferLogs: _optionalChain([options, 'optionalAccess', _225 => _225.deferLogs]),
|
|
4582
|
+
omitTerminalLogs: _optionalChain([options, 'optionalAccess', _226 => _226.omitTerminalLogs]),
|
|
4583
|
+
onPoll: _optionalChain([options, 'optionalAccess', _227 => _227.onPoll]),
|
|
4584
|
+
..._optionalChain([options, 'optionalAccess', _228 => _228.terminalStatus]) ? {
|
|
4514
4585
|
terminalStatus: {
|
|
4515
4586
|
...options.terminalStatus,
|
|
4516
4587
|
onStatus: async (raw, expectedStatus) => {
|
|
@@ -4520,7 +4591,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4520
4591
|
`Run watch returned a mismatched terminal status for ${workflowId}.`
|
|
4521
4592
|
);
|
|
4522
4593
|
}
|
|
4523
|
-
await _optionalChain([options, 'access',
|
|
4594
|
+
await _optionalChain([options, 'access', _229 => _229.terminalStatus, 'optionalAccess', _230 => _230.onStatus, 'call', _231 => _231(status)]);
|
|
4524
4595
|
}
|
|
4525
4596
|
}
|
|
4526
4597
|
} : {}
|
|
@@ -4535,12 +4606,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4535
4606
|
* @deprecated Use `watchRunEvents` for ordinary run watching.
|
|
4536
4607
|
*/
|
|
4537
4608
|
async *streamPlayRunEvents(workflowId, options) {
|
|
4538
|
-
const headers = _optionalChain([options, 'optionalAccess',
|
|
4609
|
+
const headers = _optionalChain([options, 'optionalAccess', _232 => _232.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
4539
4610
|
const params = new URLSearchParams();
|
|
4540
|
-
params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4611
|
+
params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _233 => _233.mode]), () => ( "cli")));
|
|
4541
4612
|
for await (const event of this.http.streamSse(
|
|
4542
4613
|
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
4543
|
-
{ signal: _optionalChain([options, 'optionalAccess',
|
|
4614
|
+
{ signal: _optionalChain([options, 'optionalAccess', _234 => _234.signal]), headers }
|
|
4544
4615
|
)) {
|
|
4545
4616
|
if (event.scope === "play") {
|
|
4546
4617
|
yield event;
|
|
@@ -4556,8 +4627,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4556
4627
|
*/
|
|
4557
4628
|
async *observeRunEvents(runId, options) {
|
|
4558
4629
|
yield* this.watchRunEvents(runId, {
|
|
4559
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4560
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4630
|
+
signal: _optionalChain([options, 'optionalAccess', _235 => _235.signal]),
|
|
4631
|
+
onNotice: _optionalChain([options, 'optionalAccess', _236 => _236.onNotice])
|
|
4561
4632
|
});
|
|
4562
4633
|
}
|
|
4563
4634
|
/** Poll snapshots to terminal status and return the durable package. */
|
|
@@ -4565,9 +4636,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4565
4636
|
let terminalObserved = false;
|
|
4566
4637
|
let terminalStatus = null;
|
|
4567
4638
|
for await (const event of this.watchRunEvents(runId, {
|
|
4568
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4569
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4570
|
-
onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4639
|
+
signal: _optionalChain([options, 'optionalAccess', _237 => _237.signal]),
|
|
4640
|
+
onNotice: _optionalChain([options, 'optionalAccess', _238 => _238.onNotice]),
|
|
4641
|
+
onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _239 => _239.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _240 => _240.onReconnect]))),
|
|
4571
4642
|
terminalStatus: {
|
|
4572
4643
|
runStatus: true,
|
|
4573
4644
|
onStatus: (status) => {
|
|
@@ -4575,12 +4646,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4575
4646
|
}
|
|
4576
4647
|
}
|
|
4577
4648
|
})) {
|
|
4578
|
-
_optionalChain([options, 'optionalAccess',
|
|
4649
|
+
_optionalChain([options, 'optionalAccess', _241 => _241.onEvent, 'optionalCall', _242 => _242(event)]);
|
|
4579
4650
|
if (_chunkRNSHCJMEjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
|
|
4580
4651
|
terminalObserved = true;
|
|
4581
4652
|
}
|
|
4582
4653
|
}
|
|
4583
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4654
|
+
if (_optionalChain([options, 'optionalAccess', _243 => _243.signal, 'optionalAccess', _244 => _244.aborted])) {
|
|
4584
4655
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
|
|
4585
4656
|
}
|
|
4586
4657
|
const refreshed = await _asyncNullishCoalesce(terminalStatus, async () => ( await this.getRunStatus(runId)));
|
|
@@ -4660,7 +4731,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4660
4731
|
/** List the org's workflows. `GET /api/v2/workflows`. */
|
|
4661
4732
|
async listWorkflows(options) {
|
|
4662
4733
|
const params = new URLSearchParams();
|
|
4663
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
4734
|
+
if (typeof _optionalChain([options, 'optionalAccess', _245 => _245.limit]) === "number") {
|
|
4664
4735
|
params.set("limit", String(options.limit));
|
|
4665
4736
|
}
|
|
4666
4737
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4713,7 +4784,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4713
4784
|
/** List a workflow's runs. `GET /api/v2/workflows/:id/runs`. */
|
|
4714
4785
|
async listWorkflowRuns(id, options) {
|
|
4715
4786
|
const params = new URLSearchParams();
|
|
4716
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
4787
|
+
if (typeof _optionalChain([options, 'optionalAccess', _246 => _246.limit]) === "number") {
|
|
4717
4788
|
params.set("limit", String(options.limit));
|
|
4718
4789
|
}
|
|
4719
4790
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4749,13 +4820,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4749
4820
|
*/
|
|
4750
4821
|
async getRunStatus(runId, options) {
|
|
4751
4822
|
const params = new URLSearchParams();
|
|
4752
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4823
|
+
if (_optionalChain([options, 'optionalAccess', _247 => _247.full]) === true) {
|
|
4753
4824
|
params.set("full", "true");
|
|
4754
4825
|
}
|
|
4755
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4826
|
+
if (_optionalChain([options, 'optionalAccess', _248 => _248.configuration]) === true) {
|
|
4756
4827
|
params.append("include", "configuration");
|
|
4757
4828
|
}
|
|
4758
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4829
|
+
if (_optionalChain([options, 'optionalAccess', _249 => _249.performance]) === true) {
|
|
4759
4830
|
params.append("include", "performance");
|
|
4760
4831
|
}
|
|
4761
4832
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4763,7 +4834,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4763
4834
|
`/api/v2/runs/${encodeURIComponent(runId)}${query}`,
|
|
4764
4835
|
{ headers: { "x-deepline-run-status": "1" } }
|
|
4765
4836
|
);
|
|
4766
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4837
|
+
if (_optionalChain([options, 'optionalAccess', _250 => _250.configuration]) === true && !Object.hasOwn(response, "contract")) {
|
|
4767
4838
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4768
4839
|
"This server does not support recorded configuration reads.",
|
|
4769
4840
|
void 0,
|
|
@@ -4771,7 +4842,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4771
4842
|
);
|
|
4772
4843
|
}
|
|
4773
4844
|
const status = normalizePlayStatus(response);
|
|
4774
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4845
|
+
if (_optionalChain([options, 'optionalAccess', _251 => _251.failedLogs]) !== true || status.status !== "failed") {
|
|
4775
4846
|
return status;
|
|
4776
4847
|
}
|
|
4777
4848
|
const requestedFailedLogLimit = typeof options.failedLogLimit === "number" && Number.isFinite(options.failedLogLimit) ? Math.max(1, Math.floor(options.failedLogLimit)) : RUNS_FAILED_LOG_LIMIT;
|
|
@@ -4860,7 +4931,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4860
4931
|
/** The same tenant-scoped run history searched by the dashboard and CLI. */
|
|
4861
4932
|
async getRunsHistory(options = {}) {
|
|
4862
4933
|
const params = new URLSearchParams();
|
|
4863
|
-
const search = _optionalChain([options, 'access',
|
|
4934
|
+
const search = _optionalChain([options, 'access', _252 => _252.search, 'optionalAccess', _253 => _253.trim, 'call', _254 => _254()]);
|
|
4864
4935
|
if (search && search.length > 200) {
|
|
4865
4936
|
throw new Error("Run search must be at most 200 characters.");
|
|
4866
4937
|
}
|
|
@@ -4886,16 +4957,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4886
4957
|
}
|
|
4887
4958
|
/** Read one run page without discarding server pagination metadata. */
|
|
4888
4959
|
async listRunsPage(options) {
|
|
4889
|
-
const playName = _optionalChain([options, 'access',
|
|
4960
|
+
const playName = _optionalChain([options, 'access', _255 => _255.play, 'optionalAccess', _256 => _256.trim, 'call', _257 => _257()]);
|
|
4890
4961
|
const params = new URLSearchParams();
|
|
4891
4962
|
if (playName) {
|
|
4892
4963
|
params.set("play", playName);
|
|
4893
4964
|
}
|
|
4894
|
-
const status = _optionalChain([options, 'access',
|
|
4965
|
+
const status = _optionalChain([options, 'access', _258 => _258.status, 'optionalAccess', _259 => _259.trim, 'call', _260 => _260()]);
|
|
4895
4966
|
if (status) {
|
|
4896
4967
|
params.set("status", status);
|
|
4897
4968
|
}
|
|
4898
|
-
const node = _optionalChain([options, 'access',
|
|
4969
|
+
const node = _optionalChain([options, 'access', _261 => _261.node, 'optionalAccess', _262 => _262.trim, 'call', _263 => _263()]);
|
|
4899
4970
|
if (node) {
|
|
4900
4971
|
if (!playName)
|
|
4901
4972
|
throw new Error("runs.list options.node requires options.play.");
|
|
@@ -4969,8 +5040,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4969
5040
|
* A different key starts another rerun.
|
|
4970
5041
|
*/
|
|
4971
5042
|
async rerun(runId, options) {
|
|
4972
|
-
const idempotencyKey = _optionalChain([options, 'optionalAccess',
|
|
4973
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5043
|
+
const idempotencyKey = _optionalChain([options, 'optionalAccess', _264 => _264.idempotencyKey, 'optionalAccess', _265 => _265.trim, 'call', _266 => _266()]);
|
|
5044
|
+
if (_optionalChain([options, 'optionalAccess', _267 => _267.idempotencyKey]) !== void 0 && !idempotencyKey) {
|
|
4974
5045
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4975
5046
|
"runs.rerun idempotencyKey must not be empty.",
|
|
4976
5047
|
void 0,
|
|
@@ -4979,7 +5050,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4979
5050
|
}
|
|
4980
5051
|
return this.http.post(
|
|
4981
5052
|
`/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
|
|
4982
|
-
_optionalChain([options, 'optionalAccess',
|
|
5053
|
+
_optionalChain([options, 'optionalAccess', _268 => _268.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
|
|
4983
5054
|
{ "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
|
|
4984
5055
|
);
|
|
4985
5056
|
}
|
|
@@ -5006,21 +5077,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5006
5077
|
* ```
|
|
5007
5078
|
*/
|
|
5008
5079
|
async getRunLogs(runId, options) {
|
|
5009
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5080
|
+
if (_optionalChain([options, 'optionalAccess', _269 => _269.all]) === true && options.failed === true) {
|
|
5010
5081
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
5011
5082
|
"runs.logs cannot combine all and failed views.",
|
|
5012
5083
|
void 0,
|
|
5013
5084
|
"INVALID_RUN_LOG_VIEW"
|
|
5014
5085
|
);
|
|
5015
5086
|
}
|
|
5016
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5087
|
+
if (_optionalChain([options, 'optionalAccess', _270 => _270.cursor]) !== void 0 && options.failed === true) {
|
|
5017
5088
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
5018
5089
|
"runs.logs cannot combine failed with cursor.",
|
|
5019
5090
|
void 0,
|
|
5020
5091
|
"INVALID_RUN_LOG_VIEW"
|
|
5021
5092
|
);
|
|
5022
5093
|
}
|
|
5023
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5094
|
+
if (_optionalChain([options, 'optionalAccess', _271 => _271.failed]) === true) {
|
|
5024
5095
|
const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
|
|
5025
5096
|
const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
|
|
5026
5097
|
const page = await this.http.get(
|
|
@@ -5045,18 +5116,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5045
5116
|
...page.logsTruncated ? { logsTruncated: true } : {}
|
|
5046
5117
|
};
|
|
5047
5118
|
}
|
|
5048
|
-
const beforeSequence = _optionalChain([options, 'optionalAccess',
|
|
5049
|
-
const limit = _optionalChain([options, 'optionalAccess',
|
|
5119
|
+
const beforeSequence = _optionalChain([options, 'optionalAccess', _272 => _272.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
|
|
5120
|
+
const limit = _optionalChain([options, 'optionalAccess', _273 => _273.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _274 => _274.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
|
|
5050
5121
|
const fetchPage = (afterSeq2, pageLimit) => this.http.get(
|
|
5051
5122
|
`/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
|
|
5052
5123
|
{ retryApiErrors: true }
|
|
5053
5124
|
);
|
|
5054
5125
|
const probe = await fetchPage(0, 1);
|
|
5055
5126
|
const lastStoredSeq = probe.lastStoredSeq;
|
|
5056
|
-
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access',
|
|
5127
|
+
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _275 => _275.entries, 'access', _276 => _276[0], 'optionalAccess', _277 => _277.seq]), () => ( null));
|
|
5057
5128
|
const upperSeq = beforeSequence === null ? lastStoredSeq : Math.min(beforeSequence - 1, lastStoredSeq);
|
|
5058
5129
|
const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
|
|
5059
|
-
let afterSeq = _optionalChain([options, 'optionalAccess',
|
|
5130
|
+
let afterSeq = _optionalChain([options, 'optionalAccess', _278 => _278.all]) ? 0 : Math.max(0, windowEndSeq - limit);
|
|
5060
5131
|
const entries = [];
|
|
5061
5132
|
while (entries.length < limit && afterSeq < upperSeq) {
|
|
5062
5133
|
const page = await fetchPage(
|
|
@@ -5090,7 +5161,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5090
5161
|
hasMore: olderLinesExist,
|
|
5091
5162
|
nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
|
|
5092
5163
|
entries: entries.map((entry) => entry.line),
|
|
5093
|
-
view: _optionalChain([options, 'optionalAccess',
|
|
5164
|
+
view: _optionalChain([options, 'optionalAccess', _279 => _279.all]) ? "all" : "tail",
|
|
5094
5165
|
...probe.logsTruncated ? { logsTruncated: true } : {}
|
|
5095
5166
|
};
|
|
5096
5167
|
}
|
|
@@ -5266,7 +5337,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5266
5337
|
limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
|
|
5267
5338
|
offset: String(_nullishCoalesce(input.offset, () => ( 0)))
|
|
5268
5339
|
});
|
|
5269
|
-
if (_optionalChain([input, 'access',
|
|
5340
|
+
if (_optionalChain([input, 'access', _280 => _280.runId, 'optionalAccess', _281 => _281.trim, 'call', _282 => _282()])) {
|
|
5270
5341
|
params.set("runId", input.runId.trim());
|
|
5271
5342
|
}
|
|
5272
5343
|
if (input.rowMode === "all" || input.rowMode === "live") {
|
|
@@ -5279,9 +5350,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5279
5350
|
`/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
|
|
5280
5351
|
{ signal: input.signal }
|
|
5281
5352
|
);
|
|
5282
|
-
const requestedRunId = _optionalChain([input, 'access',
|
|
5353
|
+
const requestedRunId = _optionalChain([input, 'access', _283 => _283.runId, 'optionalAccess', _284 => _284.trim, 'call', _285 => _285()]) || "";
|
|
5283
5354
|
if (requestedRunId) {
|
|
5284
|
-
const confirmedRunId = _optionalChain([result, 'access',
|
|
5355
|
+
const confirmedRunId = _optionalChain([result, 'access', _286 => _286.scope, 'optionalAccess', _287 => _287.kind]) === "run" ? result.scope.runId.trim() : "";
|
|
5285
5356
|
const foreignRowRunIds = [
|
|
5286
5357
|
...new Set(
|
|
5287
5358
|
result.rows.map(
|
|
@@ -5289,7 +5360,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5289
5360
|
).filter((runId) => runId && runId !== requestedRunId)
|
|
5290
5361
|
)
|
|
5291
5362
|
];
|
|
5292
|
-
if (_optionalChain([result, 'access',
|
|
5363
|
+
if (_optionalChain([result, 'access', _288 => _288.scope, 'optionalAccess', _289 => _289.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
|
|
5293
5364
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
5294
5365
|
`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.`,
|
|
5295
5366
|
void 0,
|
|
@@ -5318,7 +5389,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5318
5389
|
async stopRun(runId, options) {
|
|
5319
5390
|
return this.http.post(
|
|
5320
5391
|
`/api/v2/runs/${encodeURIComponent(runId)}/stop`,
|
|
5321
|
-
_optionalChain([options, 'optionalAccess',
|
|
5392
|
+
_optionalChain([options, 'optionalAccess', _290 => _290.reason]) ? { reason: options.reason } : {}
|
|
5322
5393
|
);
|
|
5323
5394
|
}
|
|
5324
5395
|
/**
|
|
@@ -5336,11 +5407,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5336
5407
|
* The method clears workspace run-slot state without requiring each run ID.
|
|
5337
5408
|
*/
|
|
5338
5409
|
async stopAllRuns(options) {
|
|
5339
|
-
const dryRun = _optionalChain([options, 'optionalAccess',
|
|
5410
|
+
const dryRun = _optionalChain([options, 'optionalAccess', _291 => _291.dryRun]) === true;
|
|
5340
5411
|
const result = await this.http.post(
|
|
5341
5412
|
"/api/v2/runs/stop-all",
|
|
5342
5413
|
{
|
|
5343
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5414
|
+
..._optionalChain([options, 'optionalAccess', _292 => _292.reason]) ? { reason: options.reason } : {},
|
|
5344
5415
|
...dryRun ? { dryRun: true } : {}
|
|
5345
5416
|
}
|
|
5346
5417
|
);
|
|
@@ -5361,7 +5432,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5361
5432
|
* `origin: "owned"` for org-owned plays.
|
|
5362
5433
|
*/
|
|
5363
5434
|
async listPlays(options) {
|
|
5364
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
5435
|
+
if (!_optionalChain([options, 'optionalAccess', _293 => _293.grep, 'optionalAccess', _294 => _294.trim, 'call', _295 => _295()])) {
|
|
5365
5436
|
return (await this.requestPlaysPage(options, false)).plays;
|
|
5366
5437
|
}
|
|
5367
5438
|
const plays = [];
|
|
@@ -5383,46 +5454,46 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5383
5454
|
}
|
|
5384
5455
|
async requestPlaysPage(options, paginateInventory = true) {
|
|
5385
5456
|
const params = new URLSearchParams();
|
|
5386
|
-
if (paginateInventory && !_optionalChain([options, 'optionalAccess',
|
|
5457
|
+
if (paginateInventory && !_optionalChain([options, 'optionalAccess', _296 => _296.grep, 'optionalAccess', _297 => _297.trim, 'call', _298 => _298()]))
|
|
5387
5458
|
params.set("inventory_paginated", "1");
|
|
5388
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5389
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5390
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5459
|
+
if (_optionalChain([options, 'optionalAccess', _299 => _299.origin])) params.set("origin", options.origin);
|
|
5460
|
+
if (_optionalChain([options, 'optionalAccess', _300 => _300.summaryOnly])) params.set("summary_only", "1");
|
|
5461
|
+
if (_optionalChain([options, 'optionalAccess', _301 => _301.categories])) {
|
|
5391
5462
|
params.set(
|
|
5392
5463
|
"categories",
|
|
5393
5464
|
Array.isArray(options.categories) ? options.categories.join(",") : options.categories
|
|
5394
5465
|
);
|
|
5395
5466
|
}
|
|
5396
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5467
|
+
if (_optionalChain([options, 'optionalAccess', _302 => _302.categories]) || _optionalChain([options, 'optionalAccess', _303 => _303.includeToolCategories])) {
|
|
5397
5468
|
params.set("include_tool_categories", "1");
|
|
5398
5469
|
}
|
|
5399
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5470
|
+
if (_optionalChain([options, 'optionalAccess', _304 => _304.tags])) {
|
|
5400
5471
|
params.set(
|
|
5401
5472
|
"tags",
|
|
5402
5473
|
Array.isArray(options.tags) ? options.tags.join(",") : options.tags
|
|
5403
5474
|
);
|
|
5404
5475
|
}
|
|
5405
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5406
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5476
|
+
if (_optionalChain([options, 'optionalAccess', _305 => _305.includeArchived])) params.set("include_archived", "1");
|
|
5477
|
+
if (_optionalChain([options, 'optionalAccess', _306 => _306.includeCostEstimates])) {
|
|
5407
5478
|
params.set("include_cost_estimates", "1");
|
|
5408
5479
|
}
|
|
5409
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5480
|
+
if (_optionalChain([options, 'optionalAccess', _307 => _307.grep, 'optionalAccess', _308 => _308.trim, 'call', _309 => _309()])) {
|
|
5410
5481
|
params.set("grep", options.grep.trim());
|
|
5411
5482
|
params.set("limit", "60");
|
|
5412
5483
|
}
|
|
5413
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5484
|
+
if (_optionalChain([options, 'optionalAccess', _310 => _310.limit]) !== void 0) {
|
|
5414
5485
|
if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
|
|
5415
5486
|
throw new Error("Play page limit must be a positive integer");
|
|
5416
5487
|
}
|
|
5417
5488
|
params.set("limit", String(options.limit));
|
|
5418
5489
|
}
|
|
5419
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5490
|
+
if (_optionalChain([options, 'optionalAccess', _311 => _311.cursor])) params.set("cursor", options.cursor);
|
|
5420
5491
|
const suffix = params.size ? `?${params.toString()}` : "";
|
|
5421
5492
|
const response = await this.http.get(`/api/v2/plays${suffix}`);
|
|
5422
5493
|
return {
|
|
5423
5494
|
plays: _nullishCoalesce(response.plays, () => ( [])),
|
|
5424
|
-
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5425
|
-
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5495
|
+
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _312 => _312.pagination, 'optionalAccess', _313 => _313.cursor]), () => ( response.cursor)), () => ( null)),
|
|
5496
|
+
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _314 => _314.pagination, 'optionalAccess', _315 => _315.hasMore]), () => ( response.hasMore)))
|
|
5426
5497
|
};
|
|
5427
5498
|
}
|
|
5428
5499
|
/** Read definition-level settings, independently of code revisions. */
|
|
@@ -5481,7 +5552,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5481
5552
|
}
|
|
5482
5553
|
/** Start provider OAuth and return the URL to open in a browser. */
|
|
5483
5554
|
async startIntegrationOAuth(provider, options = {}) {
|
|
5484
|
-
const scopes = _optionalChain([options, 'access',
|
|
5555
|
+
const scopes = _optionalChain([options, 'access', _316 => _316.scopes, 'optionalAccess', _317 => _317.map, 'call', _318 => _318((scope) => scope.trim()), 'access', _319 => _319.filter, 'call', _320 => _320(Boolean)]);
|
|
5485
5556
|
if (scopes !== void 0 && scopes.length === 0) {
|
|
5486
5557
|
throw new Error("scopes must contain at least one OAuth scope.");
|
|
5487
5558
|
}
|
|
@@ -5497,8 +5568,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5497
5568
|
return this.http.post("/api/v2/integrations/connect", {
|
|
5498
5569
|
provider: "slack",
|
|
5499
5570
|
scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
|
|
5500
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5501
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5571
|
+
..._optionalChain([options, 'optionalAccess', _321 => _321.successUrl]) ? { success_url: options.successUrl } : {},
|
|
5572
|
+
..._optionalChain([options, 'optionalAccess', _322 => _322.failureUrl]) ? { failure_url: options.failureUrl } : {}
|
|
5502
5573
|
});
|
|
5503
5574
|
}
|
|
5504
5575
|
/** List Slack channels visible to the connected Deepline Slack app. */
|
|
@@ -5573,7 +5644,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5573
5644
|
}
|
|
5574
5645
|
const targets = input.targets.map(parseNotificationGroupTarget);
|
|
5575
5646
|
const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
|
|
5576
|
-
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access',
|
|
5647
|
+
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _323 => _323[0], 'optionalAccess', _324 => _324.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
|
|
5577
5648
|
if (legacyEvents.length > 0 && !legacyTarget) {
|
|
5578
5649
|
throw new Error(
|
|
5579
5650
|
"--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
|
|
@@ -5609,7 +5680,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5609
5680
|
const existingGroup = current.configuration.groups.find(
|
|
5610
5681
|
(candidate) => candidate.name.toLowerCase() === name.toLowerCase()
|
|
5611
5682
|
);
|
|
5612
|
-
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess',
|
|
5683
|
+
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _325 => _325.groupKey]), () => ( notificationObjectKey("group")));
|
|
5613
5684
|
const group = _nullishCoalesce(existingGroup, () => ( {
|
|
5614
5685
|
groupKey,
|
|
5615
5686
|
name,
|
|
@@ -5837,7 +5908,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5837
5908
|
/** Read one trigger inventory page without loading run histories. */
|
|
5838
5909
|
async listPlayTriggerInventory(options) {
|
|
5839
5910
|
const params = new URLSearchParams({ view: "inventory" });
|
|
5840
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5911
|
+
if (_optionalChain([options, 'optionalAccess', _326 => _326.cursor])) params.set("cursor", options.cursor);
|
|
5841
5912
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5842
5913
|
}
|
|
5843
5914
|
/** Read one trigger's recent runs, with an explicit partial-history flag. */
|
|
@@ -5846,7 +5917,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5846
5917
|
view: "history",
|
|
5847
5918
|
binding_id: bindingId
|
|
5848
5919
|
});
|
|
5849
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5920
|
+
if (_optionalChain([options, 'optionalAccess', _327 => _327.limit]) !== void 0)
|
|
5850
5921
|
params.set("history_limit", String(options.limit));
|
|
5851
5922
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5852
5923
|
}
|
|
@@ -6034,14 +6105,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6034
6105
|
*/
|
|
6035
6106
|
async runPlay(code, csvPath, name, options) {
|
|
6036
6107
|
const { workflowId } = await this.submitPlay(code, csvPath, name, {
|
|
6037
|
-
input: _optionalChain([options, 'optionalAccess',
|
|
6038
|
-
sourceCode: _optionalChain([options, 'optionalAccess',
|
|
6039
|
-
artifact: _optionalChain([options, 'optionalAccess',
|
|
6040
|
-
compilerManifest: _optionalChain([options, 'optionalAccess',
|
|
6041
|
-
inputFile: _optionalChain([options, 'optionalAccess',
|
|
6042
|
-
packagedFiles: _optionalChain([options, 'optionalAccess',
|
|
6043
|
-
force: _optionalChain([options, 'optionalAccess',
|
|
6044
|
-
forceToolRefresh: _optionalChain([options, 'optionalAccess',
|
|
6108
|
+
input: _optionalChain([options, 'optionalAccess', _328 => _328.input]),
|
|
6109
|
+
sourceCode: _optionalChain([options, 'optionalAccess', _329 => _329.sourceCode]),
|
|
6110
|
+
artifact: _optionalChain([options, 'optionalAccess', _330 => _330.artifact]),
|
|
6111
|
+
compilerManifest: _optionalChain([options, 'optionalAccess', _331 => _331.compilerManifest]),
|
|
6112
|
+
inputFile: _optionalChain([options, 'optionalAccess', _332 => _332.inputFile]),
|
|
6113
|
+
packagedFiles: _optionalChain([options, 'optionalAccess', _333 => _333.packagedFiles]),
|
|
6114
|
+
force: _optionalChain([options, 'optionalAccess', _334 => _334.force]),
|
|
6115
|
+
forceToolRefresh: _optionalChain([options, 'optionalAccess', _335 => _335.forceToolRefresh])
|
|
6045
6116
|
});
|
|
6046
6117
|
const start = Date.now();
|
|
6047
6118
|
const state = {
|
|
@@ -6052,7 +6123,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6052
6123
|
latest: null
|
|
6053
6124
|
};
|
|
6054
6125
|
let terminalObserved = null;
|
|
6055
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6126
|
+
if (_optionalChain([options, 'optionalAccess', _336 => _336.signal, 'optionalAccess', _337 => _337.aborted])) {
|
|
6056
6127
|
await this.cancelPlay(workflowId);
|
|
6057
6128
|
return {
|
|
6058
6129
|
success: false,
|
|
@@ -6063,9 +6134,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6063
6134
|
};
|
|
6064
6135
|
}
|
|
6065
6136
|
for await (const event of this.watchRunEvents(workflowId, {
|
|
6066
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
6137
|
+
signal: _optionalChain([options, 'optionalAccess', _338 => _338.signal])
|
|
6067
6138
|
})) {
|
|
6068
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6139
|
+
if (_optionalChain([options, 'optionalAccess', _339 => _339.signal, 'optionalAccess', _340 => _340.aborted])) {
|
|
6069
6140
|
await this.cancelPlay(workflowId);
|
|
6070
6141
|
return {
|
|
6071
6142
|
success: false,
|
|
@@ -6075,19 +6146,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6075
6146
|
error: "Cancelled by user"
|
|
6076
6147
|
};
|
|
6077
6148
|
}
|
|
6078
|
-
const previousStatus = _optionalChain([state, 'access',
|
|
6149
|
+
const previousStatus = _optionalChain([state, 'access', _341 => _341.latest, 'optionalAccess', _342 => _342.status]);
|
|
6079
6150
|
const status = updatePlayLiveStatusState(state, event);
|
|
6080
6151
|
if (!status) {
|
|
6081
6152
|
continue;
|
|
6082
6153
|
}
|
|
6083
6154
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
6084
|
-
_optionalChain([options, 'optionalAccess',
|
|
6155
|
+
_optionalChain([options, 'optionalAccess', _343 => _343.onProgress, 'optionalCall', _344 => _344(status)]);
|
|
6085
6156
|
}
|
|
6086
6157
|
if (_chunkRNSHCJMEjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
6087
6158
|
terminalObserved = status;
|
|
6088
6159
|
}
|
|
6089
6160
|
}
|
|
6090
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6161
|
+
if (_optionalChain([options, 'optionalAccess', _345 => _345.signal, 'optionalAccess', _346 => _346.aborted])) {
|
|
6091
6162
|
await this.cancelPlay(workflowId);
|
|
6092
6163
|
return {
|
|
6093
6164
|
success: false,
|
|
@@ -6140,7 +6211,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6140
6211
|
const response = await this.http.get(
|
|
6141
6212
|
`/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
|
|
6142
6213
|
);
|
|
6143
|
-
const event = _optionalChain([response, 'access',
|
|
6214
|
+
const event = _optionalChain([response, 'access', _347 => _347.entries, 'optionalAccess', _348 => _348[0]]);
|
|
6144
6215
|
if (!event) {
|
|
6145
6216
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6146
6217
|
"No usage event was found for this request_id.",
|
|
@@ -6315,7 +6386,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6315
6386
|
async cancelBillingSubscription(options) {
|
|
6316
6387
|
return this.http.post(
|
|
6317
6388
|
"/api/v2/billing/subscription/cancel",
|
|
6318
|
-
{ action: _optionalChain([options, 'optionalAccess',
|
|
6389
|
+
{ action: _optionalChain([options, 'optionalAccess', _349 => _349.undo]) ? "undo_cancel" : "cancel" }
|
|
6319
6390
|
);
|
|
6320
6391
|
}
|
|
6321
6392
|
/**
|
|
@@ -6327,7 +6398,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6327
6398
|
*/
|
|
6328
6399
|
async listBillingInvoices(options) {
|
|
6329
6400
|
const params = new URLSearchParams();
|
|
6330
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6401
|
+
if (_optionalChain([options, 'optionalAccess', _350 => _350.limit]) !== void 0) {
|
|
6331
6402
|
params.set("limit", String(options.limit));
|
|
6332
6403
|
}
|
|
6333
6404
|
const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
|
|
@@ -6437,7 +6508,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6437
6508
|
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
6438
6509
|
async createTargetBillingPortalSession(options) {
|
|
6439
6510
|
const response = await this.http.post(
|
|
6440
|
-
_optionalChain([options, 'optionalAccess',
|
|
6511
|
+
_optionalChain([options, 'optionalAccess', _351 => _351.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
|
|
6441
6512
|
{}
|
|
6442
6513
|
);
|
|
6443
6514
|
return response.data;
|
|
@@ -6487,8 +6558,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6487
6558
|
return this.http.request("/api/v2/monitors/audit", {
|
|
6488
6559
|
method: "POST",
|
|
6489
6560
|
body: {
|
|
6490
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6491
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6561
|
+
..._optionalChain([options, 'optionalAccess', _352 => _352.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6562
|
+
..._optionalChain([options, 'optionalAccess', _353 => _353.cursor]) ? { cursor: options.cursor } : {}
|
|
6492
6563
|
},
|
|
6493
6564
|
maxRetries: 0
|
|
6494
6565
|
});
|
|
@@ -6498,8 +6569,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6498
6569
|
return this.http.request("/api/v2/monitors/repair", {
|
|
6499
6570
|
method: "POST",
|
|
6500
6571
|
body: {
|
|
6501
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6502
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6572
|
+
..._optionalChain([options, 'optionalAccess', _354 => _354.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6573
|
+
..._optionalChain([options, 'optionalAccess', _355 => _355.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
|
|
6503
6574
|
},
|
|
6504
6575
|
maxRetries: 0
|
|
6505
6576
|
});
|
|
@@ -6507,7 +6578,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6507
6578
|
/** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
|
|
6508
6579
|
async readMonitorsHealth(options) {
|
|
6509
6580
|
const params = new URLSearchParams();
|
|
6510
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6581
|
+
if (_optionalChain([options, 'optionalAccess', _356 => _356.fleetId])) params.set("fleet_id", options.fleetId);
|
|
6511
6582
|
const query = params.toString();
|
|
6512
6583
|
const suffix = query ? `?${query}` : "";
|
|
6513
6584
|
return this.http.request(
|
|
@@ -6580,7 +6651,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6580
6651
|
);
|
|
6581
6652
|
}
|
|
6582
6653
|
const params = new URLSearchParams();
|
|
6583
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6654
|
+
if (_optionalChain([options, 'optionalAccess', _357 => _357.cursor])) params.set("cursor", options.cursor);
|
|
6584
6655
|
const suffix = params.size > 0 ? `?${params}` : "";
|
|
6585
6656
|
return this.http.request(
|
|
6586
6657
|
`/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
|
|
@@ -6627,7 +6698,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6627
6698
|
* a second charge. The submission is never replayed automatically.
|
|
6628
6699
|
*/
|
|
6629
6700
|
async previewMonitor(definition, options) {
|
|
6630
|
-
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6701
|
+
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _358 => _358.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _359 => _359.crypto, 'optionalAccess', _360 => _360.randomUUID, 'optionalCall', _361 => _361()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
|
|
6631
6702
|
try {
|
|
6632
6703
|
const result = await this.http.request(
|
|
6633
6704
|
"/api/v2/monitors/preview",
|
|
@@ -6635,7 +6706,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6635
6706
|
method: "POST",
|
|
6636
6707
|
body: {
|
|
6637
6708
|
...definition,
|
|
6638
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6709
|
+
..._optionalChain([options, 'optionalAccess', _362 => _362.limit]) === void 0 ? {} : { limit: options.limit }
|
|
6639
6710
|
},
|
|
6640
6711
|
headers: { "Idempotency-Key": idempotencyKey },
|
|
6641
6712
|
maxRetries: 0,
|
|
@@ -6657,7 +6728,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6657
6728
|
* `client.monitors.deploy(...)`.
|
|
6658
6729
|
*/
|
|
6659
6730
|
async deployMonitor(definition, options) {
|
|
6660
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6731
|
+
if (_optionalChain([options, 'optionalAccess', _363 => _363.dryRun])) {
|
|
6661
6732
|
return this.http.request("/api/v2/monitors/check", {
|
|
6662
6733
|
method: "POST",
|
|
6663
6734
|
body: definition
|
|
@@ -6693,12 +6764,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6693
6764
|
/** List deployed monitors. Prefer `client.monitors.list(...)`. */
|
|
6694
6765
|
async listMonitors(options) {
|
|
6695
6766
|
const params = new URLSearchParams();
|
|
6696
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6697
|
-
else if (_optionalChain([options, 'optionalAccess',
|
|
6698
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6767
|
+
if (_optionalChain([options, 'optionalAccess', _364 => _364.state])) params.set("state", options.state);
|
|
6768
|
+
else if (_optionalChain([options, 'optionalAccess', _365 => _365.status])) params.set("status", options.status);
|
|
6769
|
+
if (_optionalChain([options, 'optionalAccess', _366 => _366.limit]) !== void 0)
|
|
6699
6770
|
params.set("limit", String(options.limit));
|
|
6700
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6701
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6771
|
+
if (_optionalChain([options, 'optionalAccess', _367 => _367.cursor])) params.set("cursor", options.cursor);
|
|
6772
|
+
if (_optionalChain([options, 'optionalAccess', _368 => _368.includeConsumers])) params.set("include_consumers", "true");
|
|
6702
6773
|
const query = params.toString();
|
|
6703
6774
|
const suffix = query ? `?${query}` : "";
|
|
6704
6775
|
return this.http.request(
|
|
@@ -6709,17 +6780,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6709
6780
|
/** The Monitors list. Prefer `client.monitors.ledger(...)`. */
|
|
6710
6781
|
async listMonitorLedger(options) {
|
|
6711
6782
|
const params = new URLSearchParams();
|
|
6712
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6713
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6714
|
-
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6783
|
+
if (_optionalChain([options, 'optionalAccess', _369 => _369.search])) params.set("q", options.search);
|
|
6784
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _370 => _370.states]), () => ( []))) params.append("state", state);
|
|
6785
|
+
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _371 => _371.signals]), () => ( [])))
|
|
6715
6786
|
params.append("signal", signal);
|
|
6716
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6717
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6718
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6719
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6720
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6787
|
+
if (_optionalChain([options, 'optionalAccess', _372 => _372.play])) params.set("play", options.play);
|
|
6788
|
+
if (_optionalChain([options, 'optionalAccess', _373 => _373.fleet])) params.set("fleet", options.fleet);
|
|
6789
|
+
if (_optionalChain([options, 'optionalAccess', _374 => _374.sort])) params.set("sort", options.sort);
|
|
6790
|
+
if (_optionalChain([options, 'optionalAccess', _375 => _375.window])) params.set("window", options.window);
|
|
6791
|
+
if (_optionalChain([options, 'optionalAccess', _376 => _376.limit]) !== void 0)
|
|
6721
6792
|
params.set("limit", String(options.limit));
|
|
6722
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6793
|
+
if (_optionalChain([options, 'optionalAccess', _377 => _377.cursor])) params.set("cursor", options.cursor);
|
|
6723
6794
|
const query = params.toString();
|
|
6724
6795
|
const suffix = query ? `?${query}` : "";
|
|
6725
6796
|
return this.http.request(
|
|
@@ -6736,7 +6807,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6736
6807
|
}
|
|
6737
6808
|
/** A monitor's recent findings. Prefer `client.monitors.ledgerFindings(...)`. */
|
|
6738
6809
|
async listMonitorLedgerFindings(key, options) {
|
|
6739
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
6810
|
+
const suffix = _optionalChain([options, 'optionalAccess', _378 => _378.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
|
|
6740
6811
|
return this.http.request(
|
|
6741
6812
|
`/api/v2/monitors/ledger/${encodeURIComponent(key)}/findings${suffix}`,
|
|
6742
6813
|
{ method: "GET" }
|
|
@@ -6750,7 +6821,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6750
6821
|
);
|
|
6751
6822
|
}
|
|
6752
6823
|
async testMonitorWebhook(key, payload, options) {
|
|
6753
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6824
|
+
if (_optionalChain([options, 'optionalAccess', _379 => _379.dispatch]) === true || _optionalChain([options, 'optionalAccess', _380 => _380.validationOnly]) === false) {
|
|
6754
6825
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6755
6826
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
6756
6827
|
void 0,
|
|
@@ -6805,7 +6876,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6805
6876
|
}
|
|
6806
6877
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
6807
6878
|
async deleteMonitor(key, options) {
|
|
6808
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6879
|
+
if (_optionalChain([options, 'optionalAccess', _381 => _381.localOnly]) === true) {
|
|
6809
6880
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6810
6881
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
6811
6882
|
void 0,
|
|
@@ -6813,11 +6884,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6813
6884
|
);
|
|
6814
6885
|
}
|
|
6815
6886
|
const params = new URLSearchParams();
|
|
6816
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6887
|
+
if (_optionalChain([options, 'optionalAccess', _382 => _382.dryRun])) params.set("dry_run", "true");
|
|
6817
6888
|
const query = params.toString();
|
|
6818
6889
|
return this.http.request(
|
|
6819
6890
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
6820
|
-
_optionalChain([options, 'optionalAccess',
|
|
6891
|
+
_optionalChain([options, 'optionalAccess', _383 => _383.dryRun]) ? { method: "DELETE" } : {
|
|
6821
6892
|
method: "DELETE",
|
|
6822
6893
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
6823
6894
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -6830,10 +6901,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6830
6901
|
* Prefer `client.monitors.reactivate(...)`.
|
|
6831
6902
|
*/
|
|
6832
6903
|
async reactivateMonitor(key, options) {
|
|
6833
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6904
|
+
const query = _optionalChain([options, 'optionalAccess', _384 => _384.dryRun]) ? "?dry_run=true" : "";
|
|
6834
6905
|
return this.http.request(
|
|
6835
6906
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
6836
|
-
_optionalChain([options, 'optionalAccess',
|
|
6907
|
+
_optionalChain([options, 'optionalAccess', _385 => _385.dryRun]) ? { method: "POST", body: {} } : {
|
|
6837
6908
|
method: "POST",
|
|
6838
6909
|
body: {},
|
|
6839
6910
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -6847,7 +6918,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6847
6918
|
// ——————————————————————————————————————————————————————————
|
|
6848
6919
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
6849
6920
|
monitorJobIdempotencyKey(operation) {
|
|
6850
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
6921
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _386 => _386.crypto, 'optionalAccess', _387 => _387.randomUUID, 'optionalCall', _388 => _388()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
6851
6922
|
const prefix = "monitor-job-";
|
|
6852
6923
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
6853
6924
|
const maxOperationLength = Math.max(
|
|
@@ -6858,7 +6929,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6858
6929
|
}
|
|
6859
6930
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
6860
6931
|
return {
|
|
6861
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6932
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _389 => _389.trim, 'call', _390 => _390()]) || this.monitorJobIdempotencyKey(operation)
|
|
6862
6933
|
};
|
|
6863
6934
|
}
|
|
6864
6935
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -6869,7 +6940,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6869
6940
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
6870
6941
|
headers: this.monitorJobHeaders(
|
|
6871
6942
|
"batch-deploy",
|
|
6872
|
-
_optionalChain([options, 'optionalAccess',
|
|
6943
|
+
_optionalChain([options, 'optionalAccess', _391 => _391.idempotencyKey])
|
|
6873
6944
|
),
|
|
6874
6945
|
maxRetries: 0,
|
|
6875
6946
|
exactUrlOnly: true
|
|
@@ -6888,11 +6959,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6888
6959
|
version: 1,
|
|
6889
6960
|
kind: "batch",
|
|
6890
6961
|
monitors: definitions,
|
|
6891
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6962
|
+
..._optionalChain([options, 'optionalAccess', _392 => _392.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
6892
6963
|
},
|
|
6893
6964
|
headers: this.monitorJobHeaders(
|
|
6894
6965
|
`batch-sync-${batchId}`,
|
|
6895
|
-
_optionalChain([options, 'optionalAccess',
|
|
6966
|
+
_optionalChain([options, 'optionalAccess', _393 => _393.idempotencyKey])
|
|
6896
6967
|
),
|
|
6897
6968
|
maxRetries: 0,
|
|
6898
6969
|
exactUrlOnly: true
|
|
@@ -6907,7 +6978,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6907
6978
|
body: {},
|
|
6908
6979
|
headers: this.monitorJobHeaders(
|
|
6909
6980
|
`batch-start-${batchId}`,
|
|
6910
|
-
_optionalChain([options, 'optionalAccess',
|
|
6981
|
+
_optionalChain([options, 'optionalAccess', _394 => _394.idempotencyKey])
|
|
6911
6982
|
),
|
|
6912
6983
|
maxRetries: 0,
|
|
6913
6984
|
exactUrlOnly: true
|
|
@@ -6922,7 +6993,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6922
6993
|
body: {},
|
|
6923
6994
|
headers: this.monitorJobHeaders(
|
|
6924
6995
|
`batch-stop-${batchId}`,
|
|
6925
|
-
_optionalChain([options, 'optionalAccess',
|
|
6996
|
+
_optionalChain([options, 'optionalAccess', _395 => _395.idempotencyKey])
|
|
6926
6997
|
),
|
|
6927
6998
|
maxRetries: 0,
|
|
6928
6999
|
exactUrlOnly: true
|
|
@@ -6943,7 +7014,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6943
7014
|
body: {},
|
|
6944
7015
|
headers: this.monitorJobHeaders(
|
|
6945
7016
|
`${action}-${monitorKey}`,
|
|
6946
|
-
_optionalChain([options, 'optionalAccess',
|
|
7017
|
+
_optionalChain([options, 'optionalAccess', _396 => _396.idempotencyKey])
|
|
6947
7018
|
),
|
|
6948
7019
|
maxRetries: 0,
|
|
6949
7020
|
exactUrlOnly: true
|
|
@@ -6956,7 +7027,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6956
7027
|
body: definition,
|
|
6957
7028
|
headers: this.monitorJobHeaders(
|
|
6958
7029
|
`sync-${definition.key}`,
|
|
6959
|
-
_optionalChain([options, 'optionalAccess',
|
|
7030
|
+
_optionalChain([options, 'optionalAccess', _397 => _397.idempotencyKey])
|
|
6960
7031
|
),
|
|
6961
7032
|
maxRetries: 0,
|
|
6962
7033
|
exactUrlOnly: true
|
|
@@ -6969,7 +7040,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6969
7040
|
);
|
|
6970
7041
|
}
|
|
6971
7042
|
async getMonitorJobLogs(jobId, options) {
|
|
6972
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
7043
|
+
const query = _optionalChain([options, 'optionalAccess', _398 => _398.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
6973
7044
|
return this.http.request(
|
|
6974
7045
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
6975
7046
|
{ method: "GET" }
|
|
@@ -6982,15 +7053,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6982
7053
|
);
|
|
6983
7054
|
}
|
|
6984
7055
|
async waitForMonitorJob(jobId, options) {
|
|
6985
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6986
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7056
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _399 => _399.timeoutMs]), () => ( 10 * 6e4)));
|
|
7057
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _400 => _400.pollIntervalMs]), () => ( 2e3)));
|
|
6987
7058
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
6988
7059
|
const startedAt = Date.now();
|
|
6989
7060
|
let latest = await this.getMonitorJob(jobId);
|
|
6990
7061
|
while (true) {
|
|
6991
|
-
_optionalChain([options, 'optionalAccess',
|
|
7062
|
+
_optionalChain([options, 'optionalAccess', _401 => _401.onProgress, 'optionalCall', _402 => _402(latest)]);
|
|
6992
7063
|
const job = latest.job;
|
|
6993
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
7064
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _403 => _403.state]) === "string" ? job.state : void 0;
|
|
6994
7065
|
if (state && terminal.has(state)) return latest;
|
|
6995
7066
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
6996
7067
|
await sleep(pollIntervalMs);
|
|
@@ -7001,12 +7072,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7001
7072
|
// Monitor Fleets
|
|
7002
7073
|
// ——————————————————————————————————————————————————————————
|
|
7003
7074
|
monitorFleetIdempotencyKey(operation) {
|
|
7004
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
7075
|
+
const uuid = _optionalChain([globalThis, 'access', _404 => _404.crypto, 'optionalAccess', _405 => _405.randomUUID, 'optionalCall', _406 => _406()]);
|
|
7005
7076
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
7006
7077
|
}
|
|
7007
7078
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
7008
7079
|
return {
|
|
7009
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
7080
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _407 => _407.trim, 'call', _408 => _408()]) || this.monitorFleetIdempotencyKey(operation)
|
|
7010
7081
|
};
|
|
7011
7082
|
}
|
|
7012
7083
|
monitorFleetPath(fleetId) {
|
|
@@ -7026,15 +7097,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7026
7097
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
7027
7098
|
const body = {
|
|
7028
7099
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
7029
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7030
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7100
|
+
..._optionalChain([options, 'optionalAccess', _409 => _409.dryRun]) ? { dry_run: true } : {},
|
|
7101
|
+
..._optionalChain([options, 'optionalAccess', _410 => _410.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
7031
7102
|
};
|
|
7032
7103
|
return this.http.request(
|
|
7033
7104
|
this.monitorFleetPath(fleetId),
|
|
7034
7105
|
{
|
|
7035
7106
|
method: "PUT",
|
|
7036
7107
|
body,
|
|
7037
|
-
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
7108
|
+
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _411 => _411.idempotencyKey])),
|
|
7038
7109
|
maxRetries: 0,
|
|
7039
7110
|
exactUrlOnly: true
|
|
7040
7111
|
}
|
|
@@ -7048,10 +7119,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7048
7119
|
/** The Fleets list. Prefer `client.monitors.fleets.overview()`. */
|
|
7049
7120
|
async listMonitorFleetOverviews(options) {
|
|
7050
7121
|
const params = new URLSearchParams({ view: "overview" });
|
|
7051
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7052
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7053
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7054
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7122
|
+
if (_optionalChain([options, 'optionalAccess', _412 => _412.q])) params.set("q", options.q);
|
|
7123
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _413 => _413.states]), () => ( []))) params.append("state", state);
|
|
7124
|
+
if (_optionalChain([options, 'optionalAccess', _414 => _414.sort])) params.set("sort", options.sort);
|
|
7125
|
+
if (_optionalChain([options, 'optionalAccess', _415 => _415.window])) params.set("window", options.window);
|
|
7055
7126
|
return this.http.request(
|
|
7056
7127
|
`/api/v2/monitors/fleets?${params.toString()}`,
|
|
7057
7128
|
{ method: "GET" }
|
|
@@ -7060,7 +7131,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7060
7131
|
/** One fleet's overview. Prefer `client.monitors.fleets.overview(fleetId)`. */
|
|
7061
7132
|
async getMonitorFleetOverview(fleetId, options) {
|
|
7062
7133
|
const params = new URLSearchParams({ view: "overview" });
|
|
7063
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7134
|
+
if (_optionalChain([options, 'optionalAccess', _416 => _416.window])) params.set("window", options.window);
|
|
7064
7135
|
return this.http.request(
|
|
7065
7136
|
`${this.monitorFleetPath(fleetId)}?${params.toString()}`,
|
|
7066
7137
|
{ method: "GET" }
|
|
@@ -7069,10 +7140,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7069
7140
|
/** A fleet's problem members. Prefer `client.monitors.fleets.issues(...)`. */
|
|
7070
7141
|
async listMonitorFleetIssues(fleetId, options) {
|
|
7071
7142
|
const params = new URLSearchParams();
|
|
7072
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7073
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7074
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7075
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7143
|
+
if (_optionalChain([options, 'optionalAccess', _417 => _417.group])) params.set("group", options.group);
|
|
7144
|
+
if (_optionalChain([options, 'optionalAccess', _418 => _418.cause])) params.set("cause", options.cause);
|
|
7145
|
+
if (_optionalChain([options, 'optionalAccess', _419 => _419.cursor])) params.set("cursor", options.cursor);
|
|
7146
|
+
if (_optionalChain([options, 'optionalAccess', _420 => _420.limit]) !== void 0)
|
|
7076
7147
|
params.set("limit", String(options.limit));
|
|
7077
7148
|
const query = params.toString();
|
|
7078
7149
|
return this.http.request(
|
|
@@ -7082,8 +7153,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7082
7153
|
}
|
|
7083
7154
|
async getMonitorFleet(fleetId, options) {
|
|
7084
7155
|
const params = new URLSearchParams();
|
|
7085
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7086
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7156
|
+
if (_optionalChain([options, 'optionalAccess', _421 => _421.drift])) params.set("drift", "1");
|
|
7157
|
+
if (_optionalChain([options, 'optionalAccess', _422 => _422.limit]) !== void 0)
|
|
7087
7158
|
params.set("limit", String(options.limit));
|
|
7088
7159
|
const query = params.toString();
|
|
7089
7160
|
return this.http.request(
|
|
@@ -7096,10 +7167,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7096
7167
|
this.monitorFleetPath(fleetId),
|
|
7097
7168
|
{
|
|
7098
7169
|
method: "DELETE",
|
|
7099
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
7170
|
+
body: _optionalChain([options, 'optionalAccess', _423 => _423.dryRun]) ? { dry_run: true } : {},
|
|
7100
7171
|
headers: this.monitorFleetHeaders(
|
|
7101
7172
|
"deactivate",
|
|
7102
|
-
_optionalChain([options, 'optionalAccess',
|
|
7173
|
+
_optionalChain([options, 'optionalAccess', _424 => _424.idempotencyKey])
|
|
7103
7174
|
),
|
|
7104
7175
|
maxRetries: 0,
|
|
7105
7176
|
exactUrlOnly: true
|
|
@@ -7114,7 +7185,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7114
7185
|
body: {},
|
|
7115
7186
|
headers: this.monitorFleetHeaders(
|
|
7116
7187
|
"reactivate",
|
|
7117
|
-
_optionalChain([options, 'optionalAccess',
|
|
7188
|
+
_optionalChain([options, 'optionalAccess', _425 => _425.idempotencyKey])
|
|
7118
7189
|
),
|
|
7119
7190
|
maxRetries: 0,
|
|
7120
7191
|
exactUrlOnly: true
|
|
@@ -7131,9 +7202,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7131
7202
|
* identical to "the request failed".
|
|
7132
7203
|
*/
|
|
7133
7204
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
7134
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7135
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7136
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
7205
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _426 => _426.timeoutMs]), () => ( 10 * 6e4)));
|
|
7206
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _427 => _427.pollIntervalMs]), () => ( 2e3)));
|
|
7207
|
+
const terminal = _optionalChain([options, 'optionalAccess', _428 => _428.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
|
|
7137
7208
|
"converged",
|
|
7138
7209
|
"degraded",
|
|
7139
7210
|
"deactivated",
|
|
@@ -7142,7 +7213,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7142
7213
|
const startedAt = Date.now();
|
|
7143
7214
|
let latest = await this.getMonitorFleet(fleetId);
|
|
7144
7215
|
while (true) {
|
|
7145
|
-
_optionalChain([options, 'optionalAccess',
|
|
7216
|
+
_optionalChain([options, 'optionalAccess', _429 => _429.onProgress, 'optionalCall', _430 => _430(latest)]);
|
|
7146
7217
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
7147
7218
|
if (status && terminal.has(status)) return latest;
|
|
7148
7219
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|