deepline 0.3.533 → 0.3.535
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 +68 -7
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/call-requeue-state-machine.ts +420 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +677 -26
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-retry-policy.ts +624 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +32 -14
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +51 -1
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +245 -1
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-no-progress.ts +6 -2
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +55 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +2 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +101 -0
- package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +63 -13
- package/dist/cli/auth-VDCU3T6A.js +43 -0
- package/dist/cli/{auth-2TZNPIJQ.mjs → auth-ZCTMB5RA.mjs} +5 -5
- package/dist/cli/{billing-HQYTRIV3.js → billing-GVFKZQH3.js} +82 -82
- package/dist/cli/{billing-LR4WJIHO.mjs → billing-OU2ZHL72.mjs} +7 -7
- package/dist/cli/{chunk-HOTJSXLY.js → chunk-243O3FH5.js} +5 -5
- package/dist/cli/{chunk-TU56J4OV.js → chunk-2D6SWQTK.js} +13 -13
- package/dist/cli/{chunk-4YP2YAIZ.js → chunk-4NLRWKZB.js} +26 -26
- package/dist/cli/{chunk-NW736SOD.mjs → chunk-4QELPWUW.mjs} +2 -2
- package/dist/cli/{chunk-LTF2J3JM.js → chunk-5EKNDNFQ.js} +2 -2
- package/dist/cli/{chunk-VPQDKL5O.js → chunk-6LHX33VN.js} +6 -6
- package/dist/cli/{chunk-LZMRCUVD.mjs → chunk-6TYRRNXY.mjs} +2 -2
- package/dist/cli/{chunk-YZK5RSUL.mjs → chunk-7CWSAEYS.mjs} +1 -1
- package/dist/cli/{chunk-A4JP6RPX.js → chunk-7PXP2FQK.js} +2 -2
- package/dist/cli/{chunk-2TMNRF5R.mjs → chunk-7R5DAANG.mjs} +1 -1
- package/dist/cli/{chunk-NKVW552R.mjs → chunk-AUEUAPVS.mjs} +1 -1
- package/dist/cli/{chunk-3KQBV2CG.mjs → chunk-BF65LB7X.mjs} +3 -3
- package/dist/cli/{chunk-33SNTG5F.js → chunk-CIDATNTY.js} +16 -16
- package/dist/cli/{chunk-O7RSUW75.js → chunk-D4MHCCIR.js} +4 -4
- package/dist/cli/{chunk-5XTXC45Z.js → chunk-DAPKLYST.js} +41 -41
- package/dist/cli/{chunk-USAQ42OG.mjs → chunk-DFJODFMC.mjs} +5 -5
- package/dist/cli/{chunk-KKUOIVQO.mjs → chunk-DWPY6ZID.mjs} +1 -1
- package/dist/cli/{chunk-MNAEALPG.js → chunk-DYIWDUY4.js} +182 -127
- package/dist/cli/{chunk-EVXRQXNV.mjs → chunk-E3CLOVG5.mjs} +47 -0
- package/dist/cli/{chunk-SVVUC3B4.js → chunk-FGN75ZN6.js} +138 -104
- package/dist/cli/{chunk-XZN3DBTP.mjs → chunk-FZKPPB5P.mjs} +40 -6
- package/dist/cli/{chunk-NFDYVMGC.mjs → chunk-G2DLG32W.mjs} +68 -13
- package/dist/cli/{chunk-LZ3PBEQH.mjs → chunk-H6SWS5CG.mjs} +2 -2
- package/dist/cli/{chunk-EYWES7F5.js → chunk-HWPOXCCK.js} +3 -3
- package/dist/cli/{chunk-425ERNBL.js → chunk-HYBZWSSH.js} +44 -44
- package/dist/cli/{chunk-CANHB6DH.mjs → chunk-J75DANZY.mjs} +2 -2
- package/dist/cli/{chunk-CWIGRIIX.mjs → chunk-JQQG4QL4.mjs} +3 -3
- package/dist/cli/{chunk-2UYERVXF.mjs → chunk-JWWYLGUT.mjs} +2 -2
- package/dist/cli/{chunk-735ZOYQN.js → chunk-K3IPGMGP.js} +11 -11
- package/dist/cli/{chunk-VKGNQC2S.mjs → chunk-K53NKWZO.mjs} +5 -5
- package/dist/cli/{chunk-3O3AL5RI.mjs → chunk-K76AEBFY.mjs} +4 -4
- package/dist/cli/{chunk-BWZHMWM5.js → chunk-KA6ZERJL.js} +6 -6
- package/dist/cli/{chunk-4CYNH47Y.js → chunk-KOZBZPRM.js} +53 -53
- package/dist/cli/{chunk-QZWURUBP.js → chunk-KWGXHPHL.js} +7 -7
- package/dist/cli/{chunk-XUX5KGCQ.mjs → chunk-LVISZFYO.mjs} +2 -2
- package/dist/cli/{chunk-B4ZNWXUW.js → chunk-OM732MGV.js} +9 -9
- package/dist/cli/{chunk-352XVCGE.js → chunk-PHLNYBAA.js} +5 -5
- package/dist/cli/{chunk-ZH5HCAN3.js → chunk-PI5R65OQ.js} +1 -1
- package/dist/cli/{chunk-JZ7LJS3P.mjs → chunk-QYBAHYP4.mjs} +6 -6
- package/dist/cli/{chunk-G3GJ3IGU.mjs → chunk-R2KKEHJN.mjs} +5 -5
- package/dist/cli/{chunk-R7YDZSN7.js → chunk-RFQWSH6I.js} +3 -3
- package/dist/cli/{chunk-MKUYZ7LR.mjs → chunk-RKY4LBX3.mjs} +1 -1
- package/dist/cli/{chunk-WF652G74.js → chunk-T7RBM2WX.js} +14 -14
- package/dist/cli/{chunk-G3RVDRYL.mjs → chunk-TCVCFZP6.mjs} +1 -1
- package/dist/cli/{chunk-E4VWBU2E.js → chunk-UUQ2OXMH.js} +16 -16
- package/dist/cli/{chunk-IETLUG4C.mjs → chunk-W5YJYU4G.mjs} +1 -1
- package/dist/cli/{chunk-HPOVAUQF.mjs → chunk-W6T23EUC.mjs} +1 -1
- package/dist/cli/{chunk-BSI7UHQZ.mjs → chunk-WAIBM6KX.mjs} +5 -5
- package/dist/cli/{chunk-4UADZTU5.js → chunk-WNNA4L6Z.js} +22 -22
- package/dist/cli/{chunk-V6LUMGVI.js → chunk-XSOTEVOB.js} +47 -0
- package/dist/cli/{chunk-PIACHLYY.mjs → chunk-YFZLZNTH.mjs} +2 -2
- package/dist/cli/{chunk-274Y66HP.js → chunk-ZUVE63Y7.js} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-MBSCHS4H.js → csv-CD55KEIO.js} +13 -13
- package/dist/cli/{csv-CJKKHGNQ.mjs → csv-CLPVMIRF.mjs} +4 -4
- package/dist/cli/{db-EAFR6N45.mjs → db-AU4SMWUN.mjs} +6 -6
- package/dist/cli/{db-45HNPCY3.js → db-MQKLDAEO.js} +27 -27
- package/dist/cli/describe-5BFNHT5V.js +50 -0
- package/dist/cli/{describe-IXW3LDGC.mjs → describe-AWJUXE2U.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-SZAES2S4.js → executions-77GOLWRM.js} +8 -8
- package/dist/cli/{executions-ZATZV7O6.mjs → executions-TFIJPUX7.mjs} +6 -6
- package/dist/cli/{feedback-NY63KEK2.mjs → feedback-2WRSZ5WL.mjs} +6 -6
- package/dist/cli/{feedback-KXLF4GR4.js → feedback-OV5YAL3A.js} +14 -14
- package/dist/cli/git-HGMX52XU.js +25 -0
- package/dist/cli/{git-BSSSTR6N.mjs → git-VNS4ATLZ.mjs} +5 -5
- package/dist/cli/index.js +145 -145
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{legacy-noops-CYF6DJBF.mjs → legacy-noops-C732QDCY.mjs} +6 -6
- package/dist/cli/{legacy-noops-XQANGML3.js → legacy-noops-HDOB5C6F.js} +9 -9
- package/dist/cli/{monitors-ABJVLWIP.mjs → monitors-2LYEFXOU.mjs} +7 -7
- package/dist/cli/{monitors-F3PTNP45.js → monitors-5IUMHH3E.js} +100 -100
- package/dist/cli/{org-WQAPZI5Q.js → org-ADW2EVAC.js} +86 -86
- package/dist/cli/{org-BHF6Y5R7.mjs → org-G4YGZPHS.mjs} +6 -6
- package/dist/cli/{pages-W4HWVJUG.mjs → pages-KXKWSCEV.mjs} +6 -6
- package/dist/cli/{pages-U3EJ2NPL.js → pages-VTJGAI2D.js} +18 -18
- package/dist/cli/{play-3T4X3ZKH.mjs → play-7GQ56C2D.mjs} +69 -22
- package/dist/cli/{play-2UHKONON.js → play-EHSOSSHT.js} +367 -320
- package/dist/cli/{providers-LUK5LIUA.js → providers-PWCF6OOO.js} +9 -9
- package/dist/cli/{providers-2G2VTNDG.mjs → providers-WL3YTCSV.mjs} +6 -6
- package/dist/cli/{quickstart-XP4PJZ7N.mjs → quickstart-323XOPGI.mjs} +4 -4
- package/dist/cli/{quickstart-76P6PGID.js → quickstart-ZKI5MURA.js} +6 -6
- package/dist/cli/{run-S2KHGBCM.js → run-XZPWA6JS.js} +41 -41
- package/dist/cli/{run-ACIHA53A.mjs → run-ZCNZU3K2.mjs} +23 -23
- package/dist/cli/{search-VFIJCUZL.mjs → search-CVLVSFMJ.mjs} +8 -8
- package/dist/cli/search-J6EY7DQN.js +33 -0
- package/dist/cli/{search-output-2KFLZS5F.mjs → search-output-6PY6RN2R.mjs} +4 -4
- package/dist/cli/{search-output-GV7NNB4X.js → search-output-7HRSSRBS.js} +6 -6
- package/dist/cli/{secrets-MAQLBVC4.mjs → secrets-6S2ZWDIM.mjs} +6 -6
- package/dist/cli/{secrets-KJSFEW2F.js → secrets-IYD5VKY4.js} +15 -15
- package/dist/cli/sessions-7HPIVSQ4.js +22 -0
- package/dist/cli/{sessions-G5MWNJ75.mjs → sessions-GVEX5TUJ.mjs} +6 -6
- package/dist/cli/{settings-MR6UFOK5.mjs → settings-BN5MJZ3C.mjs} +13 -13
- package/dist/cli/{settings-VXGRPFXP.js → settings-CANK4HJQ.js} +86 -86
- package/dist/cli/{setup-ZOBXMONM.mjs → setup-JNMSCCU4.mjs} +10 -10
- package/dist/cli/{setup-C74BRK7N.js → setup-YSGKGLSJ.js} +50 -50
- package/dist/cli/{skills-4CG3MHOY.mjs → skills-QCQN2UM2.mjs} +8 -8
- package/dist/cli/skills-WDGSSKJZ.js +37 -0
- package/dist/cli/{tools-YXCXZ4ZD.mjs → tools-CDPOID7V.mjs} +17 -17
- package/dist/cli/tools-URNVXSTZ.js +57 -0
- package/dist/cli/{update-Z3C5W3I4.mjs → update-D3ZERUQ3.mjs} +10 -10
- package/dist/cli/update-Q6JW32IA.js +35 -0
- package/dist/cli/{views-XGP2GZ52.js → views-4NV2KQKA.js} +18 -18
- package/dist/cli/{views-45B2FZQT.mjs → views-RDZRWQBQ.mjs} +6 -6
- package/dist/cli/{workflow-KQRWSNBH.mjs → workflow-2CG3TVCG.mjs} +7 -7
- package/dist/cli/{workflow-DWO35XHZ.js → workflow-RABJCAZC.js} +17 -17
- package/dist/{client-Bd2meveV.d.mts → client-DhSvMO3A.d.mts} +1 -1
- package/dist/{client-core-CGj8V9mw.d.mts → client-core-CVG1Et-4.d.mts} +41 -2
- package/dist/{client-core-CsRRWCFy.d.ts → client-core-CdWH6Sii.d.ts} +41 -2
- package/dist/{client-CBCVhL8U.d.ts → client-oGNJMQFd.d.ts} +1 -1
- package/dist/{compiler-manifest-DsxsQP-T.d.ts → compiler-manifest-D2ZlBGxj.d.mts} +44 -0
- package/dist/{compiler-manifest-DsxsQP-T.d.mts → compiler-manifest-D2ZlBGxj.d.ts} +44 -0
- package/dist/{errors-qdJUVQ3g.d.mts → errors-B-gOQdj-.d.mts} +1 -1
- package/dist/{errors-Bk5h1D-C.d.ts → errors-CB0KAmmV.d.ts} +1 -1
- package/dist/{index-PaupwX1B.d.mts → index-BbJADro4.d.mts} +1 -1
- package/dist/{index-bL66eHYz.d.ts → index-c3nvUGCS.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +118 -116
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +52 -0
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-KE6RFHUE.js +0 -43
- package/dist/cli/describe-PYLZAVRI.js +0 -50
- package/dist/cli/git-T5JTVBYZ.js +0 -25
- package/dist/cli/search-5MD65V43.js +0 -33
- package/dist/cli/sessions-FDMO7PAA.js +0 -22
- package/dist/cli/skills-KRUL7QCT.js +0 -37
- package/dist/cli/tools-CGHOSCPS.js +0 -57
- package/dist/cli/update-S2TILEHZ.js +0 -35
|
@@ -31,7 +31,7 @@ var _chunkPMH4GLMDjs = require('./chunk-PMH4GLMD.js');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkD4MHCCIRjs = require('./chunk-D4MHCCIR.js');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
var _chunkT2N3B7IQjs = require('./chunk-T2N3B7IQ.js');
|
|
@@ -674,7 +674,7 @@ var ToolCalls = class {
|
|
|
674
674
|
idempotencyKey,
|
|
675
675
|
onResponse: (response2) => {
|
|
676
676
|
lastResponse = null;
|
|
677
|
-
atomicToolsSupported = response2.headers.get(
|
|
677
|
+
atomicToolsSupported = response2.headers.get(_chunkD4MHCCIRjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
678
678
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
679
679
|
if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
|
|
680
680
|
try {
|
|
@@ -1060,8 +1060,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
const receivers = _optionalChain([env, 'access', _55 => _55.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]);
|
|
1062
1062
|
return {
|
|
1063
|
-
[
|
|
1064
|
-
...receivers ? { [
|
|
1063
|
+
[_chunkD4MHCCIRjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1064
|
+
...receivers ? { [_chunkD4MHCCIRjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1065
1065
|
};
|
|
1066
1066
|
}
|
|
1067
1067
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1132,7 +1132,7 @@ var PlayClient = class {
|
|
|
1132
1132
|
return _chunk2KHUFWTKjs.startPlayRun.call(void 0,
|
|
1133
1133
|
this.http,
|
|
1134
1134
|
resolved.request,
|
|
1135
|
-
_optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1135
|
+
_optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkD4MHCCIRjs.SDK_API_MAJOR) } : headers,
|
|
1136
1136
|
options
|
|
1137
1137
|
);
|
|
1138
1138
|
}
|
|
@@ -3229,7 +3229,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3229
3229
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3230
3230
|
);
|
|
3231
3231
|
}
|
|
3232
|
-
return { [
|
|
3232
|
+
return { [_chunkD4MHCCIRjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3233
3233
|
}
|
|
3234
3234
|
function sleep(ms) {
|
|
3235
3235
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -3805,9 +3805,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3805
3805
|
}
|
|
3806
3806
|
/** Delete a view. Its Play and runs are not touched. */
|
|
3807
3807
|
async deleteView(id) {
|
|
3808
|
-
return await this.http.delete(
|
|
3809
|
-
`/api/v2/views/${encodeURIComponent(id)}`
|
|
3810
|
-
);
|
|
3808
|
+
return await this.http.delete(`/api/v2/views/${encodeURIComponent(id)}`);
|
|
3811
3809
|
}
|
|
3812
3810
|
/** The workspace view rules and what the caller may do. */
|
|
3813
3811
|
async getViewPermissions() {
|
|
@@ -4156,7 +4154,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4156
4154
|
);
|
|
4157
4155
|
const headers = _optionalChain([options, 'optionalAccess', _188 => _188.cliAdmission]) ? {
|
|
4158
4156
|
...runtimeHeaders,
|
|
4159
|
-
"X-Deepline-API-Major": String(
|
|
4157
|
+
"X-Deepline-API-Major": String(_chunkD4MHCCIRjs.SDK_API_MAJOR)
|
|
4160
4158
|
} : runtimeHeaders;
|
|
4161
4159
|
const http = this.http;
|
|
4162
4160
|
let submitted = false;
|
|
@@ -5511,6 +5509,22 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5511
5509
|
`/api/v2/plays/${encodeURIComponent(playName)}/settings`
|
|
5512
5510
|
);
|
|
5513
5511
|
}
|
|
5512
|
+
/** Register an editing attempt so the author's open working canvas can show a rejected save. */
|
|
5513
|
+
async beginWorkingPlaySave(playName) {
|
|
5514
|
+
return this.http.post(
|
|
5515
|
+
`/api/v2/plays/${encodeURIComponent(playName)}/pipeline`,
|
|
5516
|
+
{ action: "begin" },
|
|
5517
|
+
void 0,
|
|
5518
|
+
{ maxRetries: 0, exactUrlOnly: true }
|
|
5519
|
+
);
|
|
5520
|
+
}
|
|
5521
|
+
/** Report a save outcome for that specific editing attempt. */
|
|
5522
|
+
async finishWorkingPlaySave(playName, attemptId, action) {
|
|
5523
|
+
return this.http.post(
|
|
5524
|
+
`/api/v2/plays/${encodeURIComponent(playName)}/pipeline`,
|
|
5525
|
+
{ action, attemptId }
|
|
5526
|
+
);
|
|
5527
|
+
}
|
|
5514
5528
|
/** Retry-safe field patch; omitted fields retain their current value. */
|
|
5515
5529
|
async updatePlaySettings(playName, patch) {
|
|
5516
5530
|
return this.http.patch(
|
|
@@ -5552,21 +5566,41 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5552
5566
|
const params = new URLSearchParams({ provider });
|
|
5553
5567
|
return this.http.get(`/api/v2/integrations/balance?${params}`);
|
|
5554
5568
|
}
|
|
5569
|
+
/** List the internal pilot's workspace connections. */
|
|
5570
|
+
async listWorkspaceIntegrationConnections() {
|
|
5571
|
+
return this.http.get("/api/v2/integrations/connections");
|
|
5572
|
+
}
|
|
5573
|
+
/** Manage a workspace-owned OAuth connection. Consent completes in the browser. */
|
|
5574
|
+
async manageWorkspaceIntegrationConnection(input) {
|
|
5575
|
+
return this.http.post("/api/v2/integrations/connections", {
|
|
5576
|
+
...input,
|
|
5577
|
+
owner: "workspace"
|
|
5578
|
+
});
|
|
5579
|
+
}
|
|
5555
5580
|
/** Get the dashboard link where a workspace owner or admin can connect a provider. */
|
|
5556
5581
|
async getIntegrationConnectLink(provider) {
|
|
5557
5582
|
const params = new URLSearchParams({ provider });
|
|
5558
5583
|
return this.http.get(`/api/v2/integrations/connect?${params}`);
|
|
5559
5584
|
}
|
|
5560
5585
|
/** Save provider-owned credential fields without starting an OAuth browser flow. */
|
|
5561
|
-
async setIntegrationCredentials(provider, credentials) {
|
|
5586
|
+
async setIntegrationCredentials(provider, credentials, options) {
|
|
5562
5587
|
return this.http.post("/api/v2/integrations/connect", {
|
|
5563
5588
|
provider,
|
|
5564
|
-
credentials
|
|
5589
|
+
credentials,
|
|
5590
|
+
..._optionalChain([options, 'optionalAccess', _317 => _317.expectedConnectionId]) ? { expected_connection_id: options.expectedConnectionId } : {}
|
|
5565
5591
|
});
|
|
5566
5592
|
}
|
|
5593
|
+
/** Calendar discovery compatibility method. The managed pilot requires calendar IDs in tool and Play inputs. */
|
|
5594
|
+
async listAvailabilityCalendars(cursor) {
|
|
5595
|
+
const params = new URLSearchParams();
|
|
5596
|
+
if (cursor) params.set("cursor", cursor);
|
|
5597
|
+
return this.http.get(
|
|
5598
|
+
`/api/v2/integrations/calendar-availability/calendars?${params}`
|
|
5599
|
+
);
|
|
5600
|
+
}
|
|
5567
5601
|
/** Start provider OAuth and return the URL to open in a browser. */
|
|
5568
5602
|
async startIntegrationOAuth(provider, options = {}) {
|
|
5569
|
-
const scopes = _optionalChain([options, 'access',
|
|
5603
|
+
const scopes = _optionalChain([options, 'access', _318 => _318.scopes, 'optionalAccess', _319 => _319.map, 'call', _320 => _320((scope) => scope.trim()), 'access', _321 => _321.filter, 'call', _322 => _322(Boolean)]);
|
|
5570
5604
|
if (scopes !== void 0 && scopes.length === 0) {
|
|
5571
5605
|
throw new Error("scopes must contain at least one OAuth scope.");
|
|
5572
5606
|
}
|
|
@@ -5582,8 +5616,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5582
5616
|
return this.http.post("/api/v2/integrations/connect", {
|
|
5583
5617
|
provider: "slack",
|
|
5584
5618
|
scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
|
|
5585
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5586
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5619
|
+
..._optionalChain([options, 'optionalAccess', _323 => _323.successUrl]) ? { success_url: options.successUrl } : {},
|
|
5620
|
+
..._optionalChain([options, 'optionalAccess', _324 => _324.failureUrl]) ? { failure_url: options.failureUrl } : {}
|
|
5587
5621
|
});
|
|
5588
5622
|
}
|
|
5589
5623
|
/** List Slack channels visible to the connected Deepline Slack app. */
|
|
@@ -5658,7 +5692,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5658
5692
|
}
|
|
5659
5693
|
const targets = input.targets.map(parseNotificationGroupTarget);
|
|
5660
5694
|
const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
|
|
5661
|
-
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access',
|
|
5695
|
+
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _325 => _325[0], 'optionalAccess', _326 => _326.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
|
|
5662
5696
|
if (legacyEvents.length > 0 && !legacyTarget) {
|
|
5663
5697
|
throw new Error(
|
|
5664
5698
|
"--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
|
|
@@ -5694,7 +5728,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5694
5728
|
const existingGroup = current.configuration.groups.find(
|
|
5695
5729
|
(candidate) => candidate.name.toLowerCase() === name.toLowerCase()
|
|
5696
5730
|
);
|
|
5697
|
-
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess',
|
|
5731
|
+
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _327 => _327.groupKey]), () => ( notificationObjectKey("group")));
|
|
5698
5732
|
const group = _nullishCoalesce(existingGroup, () => ( {
|
|
5699
5733
|
groupKey,
|
|
5700
5734
|
name,
|
|
@@ -5922,7 +5956,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5922
5956
|
/** Read one trigger inventory page without loading run histories. */
|
|
5923
5957
|
async listPlayTriggerInventory(options) {
|
|
5924
5958
|
const params = new URLSearchParams({ view: "inventory" });
|
|
5925
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5959
|
+
if (_optionalChain([options, 'optionalAccess', _328 => _328.cursor])) params.set("cursor", options.cursor);
|
|
5926
5960
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5927
5961
|
}
|
|
5928
5962
|
/** Read one trigger's recent runs, with an explicit partial-history flag. */
|
|
@@ -5931,7 +5965,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5931
5965
|
view: "history",
|
|
5932
5966
|
binding_id: bindingId
|
|
5933
5967
|
});
|
|
5934
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5968
|
+
if (_optionalChain([options, 'optionalAccess', _329 => _329.limit]) !== void 0)
|
|
5935
5969
|
params.set("history_limit", String(options.limit));
|
|
5936
5970
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5937
5971
|
}
|
|
@@ -6119,14 +6153,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6119
6153
|
*/
|
|
6120
6154
|
async runPlay(code, csvPath, name, options) {
|
|
6121
6155
|
const { workflowId } = await this.submitPlay(code, csvPath, name, {
|
|
6122
|
-
input: _optionalChain([options, 'optionalAccess',
|
|
6123
|
-
sourceCode: _optionalChain([options, 'optionalAccess',
|
|
6124
|
-
artifact: _optionalChain([options, 'optionalAccess',
|
|
6125
|
-
compilerManifest: _optionalChain([options, 'optionalAccess',
|
|
6126
|
-
inputFile: _optionalChain([options, 'optionalAccess',
|
|
6127
|
-
packagedFiles: _optionalChain([options, 'optionalAccess',
|
|
6128
|
-
force: _optionalChain([options, 'optionalAccess',
|
|
6129
|
-
forceToolRefresh: _optionalChain([options, 'optionalAccess',
|
|
6156
|
+
input: _optionalChain([options, 'optionalAccess', _330 => _330.input]),
|
|
6157
|
+
sourceCode: _optionalChain([options, 'optionalAccess', _331 => _331.sourceCode]),
|
|
6158
|
+
artifact: _optionalChain([options, 'optionalAccess', _332 => _332.artifact]),
|
|
6159
|
+
compilerManifest: _optionalChain([options, 'optionalAccess', _333 => _333.compilerManifest]),
|
|
6160
|
+
inputFile: _optionalChain([options, 'optionalAccess', _334 => _334.inputFile]),
|
|
6161
|
+
packagedFiles: _optionalChain([options, 'optionalAccess', _335 => _335.packagedFiles]),
|
|
6162
|
+
force: _optionalChain([options, 'optionalAccess', _336 => _336.force]),
|
|
6163
|
+
forceToolRefresh: _optionalChain([options, 'optionalAccess', _337 => _337.forceToolRefresh])
|
|
6130
6164
|
});
|
|
6131
6165
|
const start = Date.now();
|
|
6132
6166
|
const state = {
|
|
@@ -6137,7 +6171,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6137
6171
|
latest: null
|
|
6138
6172
|
};
|
|
6139
6173
|
let terminalObserved = null;
|
|
6140
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6174
|
+
if (_optionalChain([options, 'optionalAccess', _338 => _338.signal, 'optionalAccess', _339 => _339.aborted])) {
|
|
6141
6175
|
await this.cancelPlay(workflowId);
|
|
6142
6176
|
return {
|
|
6143
6177
|
success: false,
|
|
@@ -6148,9 +6182,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6148
6182
|
};
|
|
6149
6183
|
}
|
|
6150
6184
|
for await (const event of this.watchRunEvents(workflowId, {
|
|
6151
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
6185
|
+
signal: _optionalChain([options, 'optionalAccess', _340 => _340.signal])
|
|
6152
6186
|
})) {
|
|
6153
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6187
|
+
if (_optionalChain([options, 'optionalAccess', _341 => _341.signal, 'optionalAccess', _342 => _342.aborted])) {
|
|
6154
6188
|
await this.cancelPlay(workflowId);
|
|
6155
6189
|
return {
|
|
6156
6190
|
success: false,
|
|
@@ -6160,19 +6194,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6160
6194
|
error: "Cancelled by user"
|
|
6161
6195
|
};
|
|
6162
6196
|
}
|
|
6163
|
-
const previousStatus = _optionalChain([state, 'access',
|
|
6197
|
+
const previousStatus = _optionalChain([state, 'access', _343 => _343.latest, 'optionalAccess', _344 => _344.status]);
|
|
6164
6198
|
const status = updatePlayLiveStatusState(state, event);
|
|
6165
6199
|
if (!status) {
|
|
6166
6200
|
continue;
|
|
6167
6201
|
}
|
|
6168
6202
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
6169
|
-
_optionalChain([options, 'optionalAccess',
|
|
6203
|
+
_optionalChain([options, 'optionalAccess', _345 => _345.onProgress, 'optionalCall', _346 => _346(status)]);
|
|
6170
6204
|
}
|
|
6171
6205
|
if (_chunk2KHUFWTKjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
6172
6206
|
terminalObserved = status;
|
|
6173
6207
|
}
|
|
6174
6208
|
}
|
|
6175
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6209
|
+
if (_optionalChain([options, 'optionalAccess', _347 => _347.signal, 'optionalAccess', _348 => _348.aborted])) {
|
|
6176
6210
|
await this.cancelPlay(workflowId);
|
|
6177
6211
|
return {
|
|
6178
6212
|
success: false,
|
|
@@ -6225,7 +6259,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6225
6259
|
const response = await this.http.get(
|
|
6226
6260
|
`/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
|
|
6227
6261
|
);
|
|
6228
|
-
const event = _optionalChain([response, 'access',
|
|
6262
|
+
const event = _optionalChain([response, 'access', _349 => _349.entries, 'optionalAccess', _350 => _350[0]]);
|
|
6229
6263
|
if (!event) {
|
|
6230
6264
|
throw new (0, _chunkSQWET4SLjs.DeeplineError)(
|
|
6231
6265
|
"No usage event was found for this request_id.",
|
|
@@ -6400,7 +6434,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6400
6434
|
async cancelBillingSubscription(options) {
|
|
6401
6435
|
return this.http.post(
|
|
6402
6436
|
"/api/v2/billing/subscription/cancel",
|
|
6403
|
-
{ action: _optionalChain([options, 'optionalAccess',
|
|
6437
|
+
{ action: _optionalChain([options, 'optionalAccess', _351 => _351.undo]) ? "undo_cancel" : "cancel" }
|
|
6404
6438
|
);
|
|
6405
6439
|
}
|
|
6406
6440
|
/**
|
|
@@ -6412,7 +6446,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6412
6446
|
*/
|
|
6413
6447
|
async listBillingInvoices(options) {
|
|
6414
6448
|
const params = new URLSearchParams();
|
|
6415
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6449
|
+
if (_optionalChain([options, 'optionalAccess', _352 => _352.limit]) !== void 0) {
|
|
6416
6450
|
params.set("limit", String(options.limit));
|
|
6417
6451
|
}
|
|
6418
6452
|
const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
|
|
@@ -6522,7 +6556,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6522
6556
|
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
6523
6557
|
async createTargetBillingPortalSession(options) {
|
|
6524
6558
|
const response = await this.http.post(
|
|
6525
|
-
_optionalChain([options, 'optionalAccess',
|
|
6559
|
+
_optionalChain([options, 'optionalAccess', _353 => _353.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
|
|
6526
6560
|
{}
|
|
6527
6561
|
);
|
|
6528
6562
|
return response.data;
|
|
@@ -6572,8 +6606,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6572
6606
|
return this.http.request("/api/v2/monitors/audit", {
|
|
6573
6607
|
method: "POST",
|
|
6574
6608
|
body: {
|
|
6575
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6576
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6609
|
+
..._optionalChain([options, 'optionalAccess', _354 => _354.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6610
|
+
..._optionalChain([options, 'optionalAccess', _355 => _355.cursor]) ? { cursor: options.cursor } : {}
|
|
6577
6611
|
},
|
|
6578
6612
|
maxRetries: 0
|
|
6579
6613
|
});
|
|
@@ -6583,8 +6617,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6583
6617
|
return this.http.request("/api/v2/monitors/repair", {
|
|
6584
6618
|
method: "POST",
|
|
6585
6619
|
body: {
|
|
6586
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6587
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6620
|
+
..._optionalChain([options, 'optionalAccess', _356 => _356.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6621
|
+
..._optionalChain([options, 'optionalAccess', _357 => _357.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
|
|
6588
6622
|
},
|
|
6589
6623
|
maxRetries: 0
|
|
6590
6624
|
});
|
|
@@ -6592,7 +6626,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6592
6626
|
/** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
|
|
6593
6627
|
async readMonitorsHealth(options) {
|
|
6594
6628
|
const params = new URLSearchParams();
|
|
6595
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6629
|
+
if (_optionalChain([options, 'optionalAccess', _358 => _358.fleetId])) params.set("fleet_id", options.fleetId);
|
|
6596
6630
|
const query = params.toString();
|
|
6597
6631
|
const suffix = query ? `?${query}` : "";
|
|
6598
6632
|
return this.http.request(
|
|
@@ -6665,7 +6699,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6665
6699
|
);
|
|
6666
6700
|
}
|
|
6667
6701
|
const params = new URLSearchParams();
|
|
6668
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6702
|
+
if (_optionalChain([options, 'optionalAccess', _359 => _359.cursor])) params.set("cursor", options.cursor);
|
|
6669
6703
|
const suffix = params.size > 0 ? `?${params}` : "";
|
|
6670
6704
|
return this.http.request(
|
|
6671
6705
|
`/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
|
|
@@ -6712,7 +6746,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6712
6746
|
* a second charge. The submission is never replayed automatically.
|
|
6713
6747
|
*/
|
|
6714
6748
|
async previewMonitor(definition, options) {
|
|
6715
|
-
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6749
|
+
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _360 => _360.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _361 => _361.crypto, 'optionalAccess', _362 => _362.randomUUID, 'optionalCall', _363 => _363()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
|
|
6716
6750
|
try {
|
|
6717
6751
|
const result = await this.http.request(
|
|
6718
6752
|
"/api/v2/monitors/preview",
|
|
@@ -6720,7 +6754,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6720
6754
|
method: "POST",
|
|
6721
6755
|
body: {
|
|
6722
6756
|
...definition,
|
|
6723
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6757
|
+
..._optionalChain([options, 'optionalAccess', _364 => _364.limit]) === void 0 ? {} : { limit: options.limit }
|
|
6724
6758
|
},
|
|
6725
6759
|
headers: { "Idempotency-Key": idempotencyKey },
|
|
6726
6760
|
maxRetries: 0,
|
|
@@ -6742,7 +6776,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6742
6776
|
* `client.monitors.deploy(...)`.
|
|
6743
6777
|
*/
|
|
6744
6778
|
async deployMonitor(definition, options) {
|
|
6745
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6779
|
+
if (_optionalChain([options, 'optionalAccess', _365 => _365.dryRun])) {
|
|
6746
6780
|
return this.http.request("/api/v2/monitors/check", {
|
|
6747
6781
|
method: "POST",
|
|
6748
6782
|
body: definition
|
|
@@ -6778,12 +6812,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6778
6812
|
/** List deployed monitors. Prefer `client.monitors.list(...)`. */
|
|
6779
6813
|
async listMonitors(options) {
|
|
6780
6814
|
const params = new URLSearchParams();
|
|
6781
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6782
|
-
else if (_optionalChain([options, 'optionalAccess',
|
|
6783
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6815
|
+
if (_optionalChain([options, 'optionalAccess', _366 => _366.state])) params.set("state", options.state);
|
|
6816
|
+
else if (_optionalChain([options, 'optionalAccess', _367 => _367.status])) params.set("status", options.status);
|
|
6817
|
+
if (_optionalChain([options, 'optionalAccess', _368 => _368.limit]) !== void 0)
|
|
6784
6818
|
params.set("limit", String(options.limit));
|
|
6785
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6786
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6819
|
+
if (_optionalChain([options, 'optionalAccess', _369 => _369.cursor])) params.set("cursor", options.cursor);
|
|
6820
|
+
if (_optionalChain([options, 'optionalAccess', _370 => _370.includeConsumers])) params.set("include_consumers", "true");
|
|
6787
6821
|
const query = params.toString();
|
|
6788
6822
|
const suffix = query ? `?${query}` : "";
|
|
6789
6823
|
return this.http.request(
|
|
@@ -6794,17 +6828,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6794
6828
|
/** The Monitors list. Prefer `client.monitors.ledger(...)`. */
|
|
6795
6829
|
async listMonitorLedger(options) {
|
|
6796
6830
|
const params = new URLSearchParams();
|
|
6797
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6798
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6799
|
-
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6831
|
+
if (_optionalChain([options, 'optionalAccess', _371 => _371.search])) params.set("q", options.search);
|
|
6832
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _372 => _372.states]), () => ( []))) params.append("state", state);
|
|
6833
|
+
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _373 => _373.signals]), () => ( [])))
|
|
6800
6834
|
params.append("signal", signal);
|
|
6801
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6802
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6803
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6804
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6805
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6835
|
+
if (_optionalChain([options, 'optionalAccess', _374 => _374.play])) params.set("play", options.play);
|
|
6836
|
+
if (_optionalChain([options, 'optionalAccess', _375 => _375.fleet])) params.set("fleet", options.fleet);
|
|
6837
|
+
if (_optionalChain([options, 'optionalAccess', _376 => _376.sort])) params.set("sort", options.sort);
|
|
6838
|
+
if (_optionalChain([options, 'optionalAccess', _377 => _377.window])) params.set("window", options.window);
|
|
6839
|
+
if (_optionalChain([options, 'optionalAccess', _378 => _378.limit]) !== void 0)
|
|
6806
6840
|
params.set("limit", String(options.limit));
|
|
6807
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6841
|
+
if (_optionalChain([options, 'optionalAccess', _379 => _379.cursor])) params.set("cursor", options.cursor);
|
|
6808
6842
|
const query = params.toString();
|
|
6809
6843
|
const suffix = query ? `?${query}` : "";
|
|
6810
6844
|
return this.http.request(
|
|
@@ -6821,7 +6855,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6821
6855
|
}
|
|
6822
6856
|
/** A monitor's recent findings. Prefer `client.monitors.ledgerFindings(...)`. */
|
|
6823
6857
|
async listMonitorLedgerFindings(key, options) {
|
|
6824
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
6858
|
+
const suffix = _optionalChain([options, 'optionalAccess', _380 => _380.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
|
|
6825
6859
|
return this.http.request(
|
|
6826
6860
|
`/api/v2/monitors/ledger/${encodeURIComponent(key)}/findings${suffix}`,
|
|
6827
6861
|
{ method: "GET" }
|
|
@@ -6835,7 +6869,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6835
6869
|
);
|
|
6836
6870
|
}
|
|
6837
6871
|
async testMonitorWebhook(key, payload, options) {
|
|
6838
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6872
|
+
if (_optionalChain([options, 'optionalAccess', _381 => _381.dispatch]) === true || _optionalChain([options, 'optionalAccess', _382 => _382.validationOnly]) === false) {
|
|
6839
6873
|
throw new (0, _chunkSQWET4SLjs.DeeplineError)(
|
|
6840
6874
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
6841
6875
|
void 0,
|
|
@@ -6890,7 +6924,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6890
6924
|
}
|
|
6891
6925
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
6892
6926
|
async deleteMonitor(key, options) {
|
|
6893
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6927
|
+
if (_optionalChain([options, 'optionalAccess', _383 => _383.localOnly]) === true) {
|
|
6894
6928
|
throw new (0, _chunkSQWET4SLjs.DeeplineError)(
|
|
6895
6929
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
6896
6930
|
void 0,
|
|
@@ -6898,11 +6932,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6898
6932
|
);
|
|
6899
6933
|
}
|
|
6900
6934
|
const params = new URLSearchParams();
|
|
6901
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6935
|
+
if (_optionalChain([options, 'optionalAccess', _384 => _384.dryRun])) params.set("dry_run", "true");
|
|
6902
6936
|
const query = params.toString();
|
|
6903
6937
|
return this.http.request(
|
|
6904
6938
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
6905
|
-
_optionalChain([options, 'optionalAccess',
|
|
6939
|
+
_optionalChain([options, 'optionalAccess', _385 => _385.dryRun]) ? { method: "DELETE" } : {
|
|
6906
6940
|
method: "DELETE",
|
|
6907
6941
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
6908
6942
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -6915,10 +6949,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6915
6949
|
* Prefer `client.monitors.reactivate(...)`.
|
|
6916
6950
|
*/
|
|
6917
6951
|
async reactivateMonitor(key, options) {
|
|
6918
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6952
|
+
const query = _optionalChain([options, 'optionalAccess', _386 => _386.dryRun]) ? "?dry_run=true" : "";
|
|
6919
6953
|
return this.http.request(
|
|
6920
6954
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
6921
|
-
_optionalChain([options, 'optionalAccess',
|
|
6955
|
+
_optionalChain([options, 'optionalAccess', _387 => _387.dryRun]) ? { method: "POST", body: {} } : {
|
|
6922
6956
|
method: "POST",
|
|
6923
6957
|
body: {},
|
|
6924
6958
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -6932,7 +6966,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6932
6966
|
// ——————————————————————————————————————————————————————————
|
|
6933
6967
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
6934
6968
|
monitorJobIdempotencyKey(operation) {
|
|
6935
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
6969
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _388 => _388.crypto, 'optionalAccess', _389 => _389.randomUUID, 'optionalCall', _390 => _390()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
6936
6970
|
const prefix = "monitor-job-";
|
|
6937
6971
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
6938
6972
|
const maxOperationLength = Math.max(
|
|
@@ -6943,7 +6977,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6943
6977
|
}
|
|
6944
6978
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
6945
6979
|
return {
|
|
6946
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6980
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _391 => _391.trim, 'call', _392 => _392()]) || this.monitorJobIdempotencyKey(operation)
|
|
6947
6981
|
};
|
|
6948
6982
|
}
|
|
6949
6983
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -6954,7 +6988,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6954
6988
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
6955
6989
|
headers: this.monitorJobHeaders(
|
|
6956
6990
|
"batch-deploy",
|
|
6957
|
-
_optionalChain([options, 'optionalAccess',
|
|
6991
|
+
_optionalChain([options, 'optionalAccess', _393 => _393.idempotencyKey])
|
|
6958
6992
|
),
|
|
6959
6993
|
maxRetries: 0,
|
|
6960
6994
|
exactUrlOnly: true
|
|
@@ -6973,11 +7007,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6973
7007
|
version: 1,
|
|
6974
7008
|
kind: "batch",
|
|
6975
7009
|
monitors: definitions,
|
|
6976
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7010
|
+
..._optionalChain([options, 'optionalAccess', _394 => _394.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
6977
7011
|
},
|
|
6978
7012
|
headers: this.monitorJobHeaders(
|
|
6979
7013
|
`batch-sync-${batchId}`,
|
|
6980
|
-
_optionalChain([options, 'optionalAccess',
|
|
7014
|
+
_optionalChain([options, 'optionalAccess', _395 => _395.idempotencyKey])
|
|
6981
7015
|
),
|
|
6982
7016
|
maxRetries: 0,
|
|
6983
7017
|
exactUrlOnly: true
|
|
@@ -6992,7 +7026,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6992
7026
|
body: {},
|
|
6993
7027
|
headers: this.monitorJobHeaders(
|
|
6994
7028
|
`batch-start-${batchId}`,
|
|
6995
|
-
_optionalChain([options, 'optionalAccess',
|
|
7029
|
+
_optionalChain([options, 'optionalAccess', _396 => _396.idempotencyKey])
|
|
6996
7030
|
),
|
|
6997
7031
|
maxRetries: 0,
|
|
6998
7032
|
exactUrlOnly: true
|
|
@@ -7007,7 +7041,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7007
7041
|
body: {},
|
|
7008
7042
|
headers: this.monitorJobHeaders(
|
|
7009
7043
|
`batch-stop-${batchId}`,
|
|
7010
|
-
_optionalChain([options, 'optionalAccess',
|
|
7044
|
+
_optionalChain([options, 'optionalAccess', _397 => _397.idempotencyKey])
|
|
7011
7045
|
),
|
|
7012
7046
|
maxRetries: 0,
|
|
7013
7047
|
exactUrlOnly: true
|
|
@@ -7028,7 +7062,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7028
7062
|
body: {},
|
|
7029
7063
|
headers: this.monitorJobHeaders(
|
|
7030
7064
|
`${action}-${monitorKey}`,
|
|
7031
|
-
_optionalChain([options, 'optionalAccess',
|
|
7065
|
+
_optionalChain([options, 'optionalAccess', _398 => _398.idempotencyKey])
|
|
7032
7066
|
),
|
|
7033
7067
|
maxRetries: 0,
|
|
7034
7068
|
exactUrlOnly: true
|
|
@@ -7041,7 +7075,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7041
7075
|
body: definition,
|
|
7042
7076
|
headers: this.monitorJobHeaders(
|
|
7043
7077
|
`sync-${definition.key}`,
|
|
7044
|
-
_optionalChain([options, 'optionalAccess',
|
|
7078
|
+
_optionalChain([options, 'optionalAccess', _399 => _399.idempotencyKey])
|
|
7045
7079
|
),
|
|
7046
7080
|
maxRetries: 0,
|
|
7047
7081
|
exactUrlOnly: true
|
|
@@ -7054,7 +7088,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7054
7088
|
);
|
|
7055
7089
|
}
|
|
7056
7090
|
async getMonitorJobLogs(jobId, options) {
|
|
7057
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
7091
|
+
const query = _optionalChain([options, 'optionalAccess', _400 => _400.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
7058
7092
|
return this.http.request(
|
|
7059
7093
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
7060
7094
|
{ method: "GET" }
|
|
@@ -7067,15 +7101,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7067
7101
|
);
|
|
7068
7102
|
}
|
|
7069
7103
|
async waitForMonitorJob(jobId, options) {
|
|
7070
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7071
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7104
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _401 => _401.timeoutMs]), () => ( 10 * 6e4)));
|
|
7105
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _402 => _402.pollIntervalMs]), () => ( 2e3)));
|
|
7072
7106
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
7073
7107
|
const startedAt = Date.now();
|
|
7074
7108
|
let latest = await this.getMonitorJob(jobId);
|
|
7075
7109
|
while (true) {
|
|
7076
|
-
_optionalChain([options, 'optionalAccess',
|
|
7110
|
+
_optionalChain([options, 'optionalAccess', _403 => _403.onProgress, 'optionalCall', _404 => _404(latest)]);
|
|
7077
7111
|
const job = latest.job;
|
|
7078
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
7112
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _405 => _405.state]) === "string" ? job.state : void 0;
|
|
7079
7113
|
if (state && terminal.has(state)) return latest;
|
|
7080
7114
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
7081
7115
|
await sleep(pollIntervalMs);
|
|
@@ -7086,12 +7120,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7086
7120
|
// Monitor Fleets
|
|
7087
7121
|
// ——————————————————————————————————————————————————————————
|
|
7088
7122
|
monitorFleetIdempotencyKey(operation) {
|
|
7089
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
7123
|
+
const uuid = _optionalChain([globalThis, 'access', _406 => _406.crypto, 'optionalAccess', _407 => _407.randomUUID, 'optionalCall', _408 => _408()]);
|
|
7090
7124
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
7091
7125
|
}
|
|
7092
7126
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
7093
7127
|
return {
|
|
7094
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
7128
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _409 => _409.trim, 'call', _410 => _410()]) || this.monitorFleetIdempotencyKey(operation)
|
|
7095
7129
|
};
|
|
7096
7130
|
}
|
|
7097
7131
|
monitorFleetPath(fleetId) {
|
|
@@ -7111,15 +7145,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7111
7145
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
7112
7146
|
const body = {
|
|
7113
7147
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
7114
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7115
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7148
|
+
..._optionalChain([options, 'optionalAccess', _411 => _411.dryRun]) ? { dry_run: true } : {},
|
|
7149
|
+
..._optionalChain([options, 'optionalAccess', _412 => _412.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
7116
7150
|
};
|
|
7117
7151
|
return this.http.request(
|
|
7118
7152
|
this.monitorFleetPath(fleetId),
|
|
7119
7153
|
{
|
|
7120
7154
|
method: "PUT",
|
|
7121
7155
|
body,
|
|
7122
|
-
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
7156
|
+
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _413 => _413.idempotencyKey])),
|
|
7123
7157
|
maxRetries: 0,
|
|
7124
7158
|
exactUrlOnly: true
|
|
7125
7159
|
}
|
|
@@ -7133,10 +7167,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7133
7167
|
/** The Fleets list. Prefer `client.monitors.fleets.overview()`. */
|
|
7134
7168
|
async listMonitorFleetOverviews(options) {
|
|
7135
7169
|
const params = new URLSearchParams({ view: "overview" });
|
|
7136
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7137
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7138
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7139
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7170
|
+
if (_optionalChain([options, 'optionalAccess', _414 => _414.q])) params.set("q", options.q);
|
|
7171
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _415 => _415.states]), () => ( []))) params.append("state", state);
|
|
7172
|
+
if (_optionalChain([options, 'optionalAccess', _416 => _416.sort])) params.set("sort", options.sort);
|
|
7173
|
+
if (_optionalChain([options, 'optionalAccess', _417 => _417.window])) params.set("window", options.window);
|
|
7140
7174
|
return this.http.request(
|
|
7141
7175
|
`/api/v2/monitors/fleets?${params.toString()}`,
|
|
7142
7176
|
{ method: "GET" }
|
|
@@ -7145,7 +7179,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7145
7179
|
/** One fleet's overview. Prefer `client.monitors.fleets.overview(fleetId)`. */
|
|
7146
7180
|
async getMonitorFleetOverview(fleetId, options) {
|
|
7147
7181
|
const params = new URLSearchParams({ view: "overview" });
|
|
7148
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7182
|
+
if (_optionalChain([options, 'optionalAccess', _418 => _418.window])) params.set("window", options.window);
|
|
7149
7183
|
return this.http.request(
|
|
7150
7184
|
`${this.monitorFleetPath(fleetId)}?${params.toString()}`,
|
|
7151
7185
|
{ method: "GET" }
|
|
@@ -7154,10 +7188,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7154
7188
|
/** A fleet's problem members. Prefer `client.monitors.fleets.issues(...)`. */
|
|
7155
7189
|
async listMonitorFleetIssues(fleetId, options) {
|
|
7156
7190
|
const params = new URLSearchParams();
|
|
7157
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7158
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7159
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7160
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7191
|
+
if (_optionalChain([options, 'optionalAccess', _419 => _419.group])) params.set("group", options.group);
|
|
7192
|
+
if (_optionalChain([options, 'optionalAccess', _420 => _420.cause])) params.set("cause", options.cause);
|
|
7193
|
+
if (_optionalChain([options, 'optionalAccess', _421 => _421.cursor])) params.set("cursor", options.cursor);
|
|
7194
|
+
if (_optionalChain([options, 'optionalAccess', _422 => _422.limit]) !== void 0)
|
|
7161
7195
|
params.set("limit", String(options.limit));
|
|
7162
7196
|
const query = params.toString();
|
|
7163
7197
|
return this.http.request(
|
|
@@ -7167,8 +7201,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7167
7201
|
}
|
|
7168
7202
|
async getMonitorFleet(fleetId, options) {
|
|
7169
7203
|
const params = new URLSearchParams();
|
|
7170
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7171
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7204
|
+
if (_optionalChain([options, 'optionalAccess', _423 => _423.drift])) params.set("drift", "1");
|
|
7205
|
+
if (_optionalChain([options, 'optionalAccess', _424 => _424.limit]) !== void 0)
|
|
7172
7206
|
params.set("limit", String(options.limit));
|
|
7173
7207
|
const query = params.toString();
|
|
7174
7208
|
return this.http.request(
|
|
@@ -7181,10 +7215,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7181
7215
|
this.monitorFleetPath(fleetId),
|
|
7182
7216
|
{
|
|
7183
7217
|
method: "DELETE",
|
|
7184
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
7218
|
+
body: _optionalChain([options, 'optionalAccess', _425 => _425.dryRun]) ? { dry_run: true } : {},
|
|
7185
7219
|
headers: this.monitorFleetHeaders(
|
|
7186
7220
|
"deactivate",
|
|
7187
|
-
_optionalChain([options, 'optionalAccess',
|
|
7221
|
+
_optionalChain([options, 'optionalAccess', _426 => _426.idempotencyKey])
|
|
7188
7222
|
),
|
|
7189
7223
|
maxRetries: 0,
|
|
7190
7224
|
exactUrlOnly: true
|
|
@@ -7199,7 +7233,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7199
7233
|
body: {},
|
|
7200
7234
|
headers: this.monitorFleetHeaders(
|
|
7201
7235
|
"reactivate",
|
|
7202
|
-
_optionalChain([options, 'optionalAccess',
|
|
7236
|
+
_optionalChain([options, 'optionalAccess', _427 => _427.idempotencyKey])
|
|
7203
7237
|
),
|
|
7204
7238
|
maxRetries: 0,
|
|
7205
7239
|
exactUrlOnly: true
|
|
@@ -7216,9 +7250,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7216
7250
|
* identical to "the request failed".
|
|
7217
7251
|
*/
|
|
7218
7252
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
7219
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7220
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7221
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
7253
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _428 => _428.timeoutMs]), () => ( 10 * 6e4)));
|
|
7254
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _429 => _429.pollIntervalMs]), () => ( 2e3)));
|
|
7255
|
+
const terminal = _optionalChain([options, 'optionalAccess', _430 => _430.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
|
|
7222
7256
|
"converged",
|
|
7223
7257
|
"degraded",
|
|
7224
7258
|
"deactivated",
|
|
@@ -7227,7 +7261,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7227
7261
|
const startedAt = Date.now();
|
|
7228
7262
|
let latest = await this.getMonitorFleet(fleetId);
|
|
7229
7263
|
while (true) {
|
|
7230
|
-
_optionalChain([options, 'optionalAccess',
|
|
7264
|
+
_optionalChain([options, 'optionalAccess', _431 => _431.onProgress, 'optionalCall', _432 => _432(latest)]);
|
|
7231
7265
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
7232
7266
|
if (status && terminal.has(status)) return latest;
|
|
7233
7267
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|