deepline 0.3.568 → 0.3.569
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client-core.ts +20 -5
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +17 -10
- package/dist/cli/auth-77NOPZ6A.js +44 -0
- package/dist/cli/{auth-AV6JJ2Y6.mjs → auth-VNJLXDGF.mjs} +5 -5
- package/dist/cli/{billing-3RVJZROW.mjs → billing-6HD5LEI2.mjs} +9 -9
- package/dist/cli/{billing-3RUXM4OW.js → billing-OTIIK5ZQ.js} +102 -102
- package/dist/cli/{chunk-Y4Q4LQRX.js → chunk-3WZ3X46C.js} +13 -13
- package/dist/cli/{chunk-ANRKUFUG.js → chunk-44HOKKIN.js} +100 -100
- package/dist/cli/{chunk-LQTLFFUB.mjs → chunk-45OTCUAC.mjs} +2 -2
- package/dist/cli/{chunk-JIEUKZ7J.js → chunk-4CLEOTG6.js} +2 -2
- package/dist/cli/{chunk-G7GN3RGE.mjs → chunk-64MOX3SN.mjs} +15 -3
- package/dist/cli/{chunk-AAXGFMYQ.mjs → chunk-6D4WBX7E.mjs} +15 -5
- package/dist/cli/{chunk-KMWH6VY2.mjs → chunk-6HEZRKAO.mjs} +2 -2
- package/dist/cli/{chunk-VEPXXRHO.mjs → chunk-6SBGYX25.mjs} +2 -2
- package/dist/cli/{chunk-UPUBCTSS.js → chunk-6Z7B3IOW.js} +2 -2
- package/dist/cli/{chunk-D2DYHEH7.js → chunk-7MZUSBSI.js} +23 -23
- package/dist/cli/{chunk-JT7S45KT.mjs → chunk-7NP7WZV2.mjs} +3 -3
- package/dist/cli/{chunk-GLTA22I3.mjs → chunk-7QH52S3E.mjs} +84 -11
- package/dist/cli/{chunk-HQX2P4NH.mjs → chunk-AKNJDDSM.mjs} +1 -1
- package/dist/cli/{chunk-F62RQL3X.js → chunk-ANXJNE2G.js} +3 -3
- package/dist/cli/{chunk-TM3Z7JXT.mjs → chunk-CK6U2NH2.mjs} +1 -1
- package/dist/cli/{chunk-TSNVG3T5.mjs → chunk-D3BJ2KZX.mjs} +1 -1
- package/dist/cli/{chunk-RH3WIX2W.mjs → chunk-DG6ILAO7.mjs} +2 -2
- package/dist/cli/{chunk-QVERY22Q.mjs → chunk-EDNWMQZQ.mjs} +2 -2
- package/dist/cli/{chunk-GXSJTCCG.mjs → chunk-FPRLFIYT.mjs} +4 -4
- package/dist/cli/{chunk-5KHSPLPO.js → chunk-FSAOU4HA.js} +20 -20
- package/dist/cli/{chunk-JPSKSXNS.mjs → chunk-GSUHJUNZ.mjs} +2 -2
- package/dist/cli/{chunk-PPQHQ4J2.js → chunk-H3SQMLHO.js} +48 -48
- package/dist/cli/{chunk-RUAEON5J.js → chunk-H7DRZXYF.js} +4 -4
- package/dist/cli/{chunk-LKXBFVYU.js → chunk-HLRSNCPM.js} +53 -53
- package/dist/cli/{chunk-5SOJGKQM.mjs → chunk-IEOIGU5A.mjs} +1 -1
- package/dist/cli/{chunk-WYXXJA5J.js → chunk-IGIUAHTR.js} +41 -41
- package/dist/cli/{chunk-H4BU2RRU.js → chunk-IS4NFIQY.js} +118 -108
- package/dist/cli/{chunk-M3IMARRH.mjs → chunk-JXRWSBJZ.mjs} +1 -1
- package/dist/cli/{chunk-7X34FUYS.js → chunk-LOF7H5V3.js} +7 -7
- package/dist/cli/{chunk-RJJNXV36.js → chunk-MIGJHZ3P.js} +20 -20
- package/dist/cli/{chunk-KKIDGS7O.js → chunk-N5ZOD3LA.js} +10 -10
- package/dist/cli/{chunk-ZVJ2YNAH.js → chunk-N6KF6X3D.js} +15 -3
- package/dist/cli/{chunk-V5WFPMUC.mjs → chunk-OFBP336D.mjs} +4 -4
- package/dist/cli/{chunk-SONHOBIK.mjs → chunk-P2LVKWU6.mjs} +2 -2
- package/dist/cli/{chunk-JRTB75JO.js → chunk-PAFSVZCZ.js} +95 -22
- package/dist/cli/{chunk-PE2XN2VM.js → chunk-QKPKVLTG.js} +2 -2
- package/dist/cli/{chunk-JJSKWDUI.js → chunk-QLMMNBJW.js} +6 -6
- package/dist/cli/{chunk-2BWPNLYG.js → chunk-S3VGWMFX.js} +9 -9
- package/dist/cli/{chunk-5KDMJLQX.js → chunk-S4MDYDCF.js} +5 -5
- package/dist/cli/{chunk-4PAGRUZA.js → chunk-SMAXLMM3.js} +15 -15
- package/dist/cli/{chunk-4QGZUHDF.mjs → chunk-SRMDDVWK.mjs} +5 -5
- package/dist/cli/{chunk-DIPM4GTS.js → chunk-SWREMC6J.js} +5 -5
- package/dist/cli/{chunk-FQIOTHEZ.mjs → chunk-TALKTQK5.mjs} +1 -1
- package/dist/cli/{chunk-OWSTUCIB.js → chunk-TH2GHSF6.js} +5 -5
- package/dist/cli/{chunk-BXNCAZ7G.mjs → chunk-TRE5X6VQ.mjs} +1 -1
- package/dist/cli/{chunk-5NBR7V5U.js → chunk-TZVKEUM6.js} +1 -1
- package/dist/cli/{chunk-SHO6BOXN.mjs → chunk-UOMMXLDU.mjs} +11 -11
- package/dist/cli/{chunk-VW2EUXY2.mjs → chunk-WPCY5PR3.mjs} +5 -5
- package/dist/cli/{chunk-O4FCX6BS.js → chunk-WVS2ITKP.js} +3 -3
- package/dist/cli/{chunk-MOJOAX3X.mjs → chunk-X4WPW5O3.mjs} +3 -3
- package/dist/cli/{chunk-VIMSKO7W.mjs → chunk-YLZ63U7S.mjs} +5 -5
- package/dist/cli/{chunk-VVGHZ7S6.mjs → chunk-YNSVWNRY.mjs} +1 -1
- package/dist/cli/{chunk-RZMU7ISG.js → chunk-YTOILYBU.js} +26 -26
- package/dist/cli/{chunk-S2HGTJET.mjs → chunk-YTYDKSK7.mjs} +5 -5
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{concurrent-runs-help-SJ27PPHV.mjs → concurrent-runs-help-BVBGDMNV.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-QPUTOBFB.js +22 -0
- package/dist/cli/{csv-ZN4QI6PJ.mjs → csv-BUZIP2TV.mjs} +4 -4
- package/dist/cli/{csv-BGXZKS5R.js → csv-G25E43QV.js} +13 -13
- package/dist/cli/{db-SVBVPMWN.mjs → db-EUN7RRDX.mjs} +6 -6
- package/dist/cli/{db-KTAZ5FBG.js → db-KYIDDEEE.js} +27 -27
- package/dist/cli/{describe-4CGCRK24.mjs → describe-CTYSKRQB.mjs} +18 -18
- package/dist/cli/describe-PJIQSXJ4.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-YL5CTGWP.mjs → executions-BRSOIIV7.mjs} +6 -6
- package/dist/cli/{executions-75DO2GBS.js → executions-LQA34Z76.js} +8 -8
- package/dist/cli/{feedback-VEA3XJM3.mjs → feedback-JYL2FTWI.mjs} +6 -6
- package/dist/cli/{feedback-2SMUBQZR.js → feedback-RVYWQRSZ.js} +14 -14
- package/dist/cli/{git-BEYEHMCX.mjs → git-2Z2KYPCV.mjs} +5 -5
- package/dist/cli/git-MJRG55H7.js +26 -0
- package/dist/cli/index.js +147 -147
- package/dist/cli/index.mjs +46 -46
- package/dist/cli/{integrations-PIXZBU2N.js → integrations-JK3OT5BT.js} +29 -29
- package/dist/cli/{integrations-RXWE6WUZ.mjs → integrations-QFS62VWE.mjs} +7 -7
- package/dist/cli/{legacy-noops-PJHP4GRU.mjs → legacy-noops-NBKBFVDO.mjs} +6 -6
- package/dist/cli/{legacy-noops-XHVEYEJN.js → legacy-noops-RYP5LN5D.js} +9 -9
- package/dist/cli/{mcp-276ZFIUM.js → mcp-KPY7NZPI.js} +24 -24
- package/dist/cli/{mcp-SUOIVUOM.mjs → mcp-KVGJK3SM.mjs} +4 -4
- package/dist/cli/{monitors-DGBB7X4G.js → monitors-DE5SX3CP.js} +100 -100
- package/dist/cli/{monitors-AVGNLV7V.mjs → monitors-H3UWQMMI.mjs} +7 -7
- package/dist/cli/{org-U5275K5D.js → org-CDCSMG3J.js} +121 -121
- package/dist/cli/{org-WKP2BZJQ.mjs → org-N6I5K56T.mjs} +6 -6
- package/dist/cli/{outcomes-H3RAH5ES.mjs → outcomes-EPEMTJVB.mjs} +6 -6
- package/dist/cli/{outcomes-LSCS6QE5.js → outcomes-UNAOLWWO.js} +14 -14
- package/dist/cli/{play-GNT7SITC.js → play-7TVJ3DFQ.js} +324 -324
- package/dist/cli/{play-7MSJU3LP.mjs → play-VVM5XJFT.mjs} +19 -19
- package/dist/cli/{providers-YDKHHCO4.mjs → providers-47CT527B.mjs} +6 -6
- package/dist/cli/{providers-KTEG2ZNS.js → providers-ANYRJ56K.js} +9 -9
- package/dist/cli/{quickstart-T2NJMACU.js → quickstart-H4MI6LVO.js} +6 -6
- package/dist/cli/{quickstart-F6IH43NP.mjs → quickstart-QHMC5YCM.mjs} +4 -4
- package/dist/cli/{run-AJB4MQGO.mjs → run-NXC5W5CW.mjs} +23 -23
- package/dist/cli/{run-MIRJIW45.js → run-V4UAYPAX.js} +44 -44
- package/dist/cli/{search-V6YPFL6J.mjs → search-BEU4VBY4.mjs} +7 -7
- package/dist/cli/search-TUK2STXB.js +32 -0
- package/dist/cli/{search-output-4VDZLO42.mjs → search-output-DUA3WDB7.mjs} +4 -4
- package/dist/cli/{search-output-GGCIICSW.js → search-output-NUGUU7VJ.js} +6 -6
- package/dist/cli/{secrets-L2VDRZDZ.js → secrets-PFDBC5KO.js} +15 -15
- package/dist/cli/{secrets-XUENPM5D.mjs → secrets-XQOOWTH2.mjs} +6 -6
- package/dist/cli/sessions-5333FFSY.js +23 -0
- package/dist/cli/{sessions-W7LHEE35.mjs → sessions-U2ZS5R42.mjs} +6 -6
- package/dist/cli/{settings-NB6Y53VR.js → settings-ATYARYCR.js} +85 -85
- package/dist/cli/{settings-IVFOUU7V.mjs → settings-GPDE7DL2.mjs} +12 -12
- package/dist/cli/{setup-2F42I4HW.js → setup-4AYMU7NK.js} +49 -49
- package/dist/cli/{setup-QUL7OO6A.mjs → setup-UDO6BY5A.mjs} +9 -9
- package/dist/cli/skills-LB56HJOY.js +37 -0
- package/dist/cli/{skills-SL3DNAH6.mjs → skills-RACTA7VV.mjs} +7 -7
- package/dist/cli/tools-3Y7KCKZX.js +57 -0
- package/dist/cli/{tools-TD5EJ2UD.mjs → tools-TXI6XFHE.mjs} +17 -17
- package/dist/cli/update-EWOLMH3E.js +37 -0
- package/dist/cli/{update-Z53GM6PX.mjs → update-VHTKWNXO.mjs} +9 -9
- package/dist/cli/{views-VAQGFKXN.js → views-DVBO3L63.js} +21 -21
- package/dist/cli/{views-ZB6AOING.mjs → views-GCNEHB7D.mjs} +6 -6
- package/dist/cli/{workflow-OKDLEK3G.mjs → workflow-R3A6EGB5.mjs} +7 -7
- package/dist/cli/{workflow-PSIQ5HVP.js → workflow-TFRJ5JKX.js} +17 -17
- package/dist/{client-D5mo-R-t.d.mts → client-ClJlqkKt.d.mts} +1 -1
- package/dist/{client-B8_eh5F-.d.ts → client-DCnExziW.d.ts} +1 -1
- package/dist/{client-core-Br12Asu-.d.ts → client-core-BKq5ZNAl.d.ts} +14 -2
- package/dist/{client-core-BPu-brbA.d.mts → client-core-DAOPQnGD.d.mts} +14 -2
- 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 +118 -118
- 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-IPONFGG7.js +0 -44
- package/dist/cli/concurrent-runs-help-66WCD2Y4.js +0 -22
- package/dist/cli/describe-M3MOFAVN.js +0 -50
- package/dist/cli/git-XDS5BHBG.js +0 -26
- package/dist/cli/search-YPZ575MY.js +0 -32
- package/dist/cli/sessions-GJLSOVLW.js +0 -23
- package/dist/cli/skills-2KAEOH2N.js +0 -37
- package/dist/cli/tools-W6223Q4W.js +0 -57
- package/dist/cli/update-IZBYF422.js +0 -37
|
@@ -37,7 +37,7 @@ var _chunkPMH4GLMDjs = require('./chunk-PMH4GLMD.js');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkH7DRZXYFjs = require('./chunk-H7DRZXYF.js');
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
var _chunk6VLFQZK6js = require('./chunk-6VLFQZK6.js');
|
|
@@ -963,7 +963,7 @@ var ToolCalls = class {
|
|
|
963
963
|
idempotencyKey,
|
|
964
964
|
onResponse: (response2) => {
|
|
965
965
|
lastResponse = null;
|
|
966
|
-
atomicToolsSupported = response2.headers.get(
|
|
966
|
+
atomicToolsSupported = response2.headers.get(_chunkH7DRZXYFjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
967
967
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
968
968
|
if (_optionalChain([options, 'optionalAccess', _38 => _38.onServerTiming])) {
|
|
969
969
|
try {
|
|
@@ -1350,15 +1350,15 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
const receivers = _optionalChain([env, 'access', _63 => _63.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _64 => _64.trim, 'call', _65 => _65()]);
|
|
1352
1352
|
return {
|
|
1353
|
-
[
|
|
1354
|
-
...receivers ? { [
|
|
1353
|
+
[_chunkH7DRZXYFjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1354
|
+
...receivers ? { [_chunkH7DRZXYFjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1355
1355
|
};
|
|
1356
1356
|
}
|
|
1357
1357
|
function playRunStartHeaders(runtime, env) {
|
|
1358
1358
|
const headers = runtimeSelectionHeaders(runtime, env);
|
|
1359
1359
|
const experimentSwitches = _optionalChain([env, 'access', _66 => _66.DEEPLINE_EXPERIMENT_SWITCHES, 'optionalAccess', _67 => _67.trim, 'call', _68 => _68()]);
|
|
1360
1360
|
if (!experimentSwitches) return headers;
|
|
1361
|
-
return { ...headers, [
|
|
1361
|
+
return { ...headers, [_chunkH7DRZXYFjs.EXPERIMENT_SWITCHES_HEADER]: experimentSwitches };
|
|
1362
1362
|
}
|
|
1363
1363
|
function normalizeTestPolicyOverrides(value, source) {
|
|
1364
1364
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -1428,7 +1428,7 @@ var PlayClient = class {
|
|
|
1428
1428
|
return _chunkMJTVX4QKjs.startPlayRun.call(void 0,
|
|
1429
1429
|
this.http,
|
|
1430
1430
|
resolved.request,
|
|
1431
|
-
_optionalChain([options, 'optionalAccess', _76 => _76.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1431
|
+
_optionalChain([options, 'optionalAccess', _76 => _76.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkH7DRZXYFjs.SDK_API_MAJOR) } : headers,
|
|
1432
1432
|
options
|
|
1433
1433
|
);
|
|
1434
1434
|
}
|
|
@@ -3546,7 +3546,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3546
3546
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3547
3547
|
);
|
|
3548
3548
|
}
|
|
3549
|
-
return { [
|
|
3549
|
+
return { [_chunkH7DRZXYFjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3550
3550
|
}
|
|
3551
3551
|
function sleep(ms) {
|
|
3552
3552
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -4482,7 +4482,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4482
4482
|
);
|
|
4483
4483
|
const headers = _optionalChain([options, 'optionalAccess', _200 => _200.cliAdmission]) ? {
|
|
4484
4484
|
...runtimeHeaders,
|
|
4485
|
-
"X-Deepline-API-Major": String(
|
|
4485
|
+
"X-Deepline-API-Major": String(_chunkH7DRZXYFjs.SDK_API_MAJOR)
|
|
4486
4486
|
} : runtimeHeaders;
|
|
4487
4487
|
const http = this.http;
|
|
4488
4488
|
let submitted = false;
|
|
@@ -6005,12 +6005,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6005
6005
|
const params = new URLSearchParams({ provider });
|
|
6006
6006
|
return this.http.get(`/api/v2/integrations/connect?${params}`);
|
|
6007
6007
|
}
|
|
6008
|
-
/**
|
|
6008
|
+
/**
|
|
6009
|
+
* Save provider-owned credential fields without starting an OAuth browser flow.
|
|
6010
|
+
* `teamId` names a workspace whose own connection this saves; absent or null
|
|
6011
|
+
* saves the org default every workspace without its own connection uses.
|
|
6012
|
+
*/
|
|
6009
6013
|
async setIntegrationCredentials(provider, credentials, options) {
|
|
6010
6014
|
return this.http.post("/api/v2/integrations/connect", {
|
|
6011
6015
|
provider,
|
|
6012
6016
|
credentials,
|
|
6013
|
-
..._optionalChain([options, 'optionalAccess', _330 => _330.expectedConnectionId]) ? { expected_connection_id: options.expectedConnectionId } : {}
|
|
6017
|
+
..._optionalChain([options, 'optionalAccess', _330 => _330.expectedConnectionId]) ? { expected_connection_id: options.expectedConnectionId } : {},
|
|
6018
|
+
..._optionalChain([options, 'optionalAccess', _331 => _331.teamId]) ? { team_id: options.teamId } : {}
|
|
6014
6019
|
});
|
|
6015
6020
|
}
|
|
6016
6021
|
/**
|
|
@@ -6039,9 +6044,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6039
6044
|
`/api/v2/integrations/calendar-availability/calendars?${params}`
|
|
6040
6045
|
);
|
|
6041
6046
|
}
|
|
6042
|
-
/**
|
|
6047
|
+
/**
|
|
6048
|
+
* Start provider OAuth and return the URL to open in a browser. `teamId`
|
|
6049
|
+
* names a workspace whose own connection the grant saves; absent or null
|
|
6050
|
+
* connects the org default.
|
|
6051
|
+
*/
|
|
6043
6052
|
async startIntegrationOAuth(provider, options = {}) {
|
|
6044
|
-
const scopes = _optionalChain([options, 'access',
|
|
6053
|
+
const scopes = _optionalChain([options, 'access', _332 => _332.scopes, 'optionalAccess', _333 => _333.map, 'call', _334 => _334((scope) => scope.trim()), 'access', _335 => _335.filter, 'call', _336 => _336(Boolean)]);
|
|
6045
6054
|
if (scopes !== void 0 && scopes.length === 0) {
|
|
6046
6055
|
throw new Error("scopes must contain at least one OAuth scope.");
|
|
6047
6056
|
}
|
|
@@ -6049,7 +6058,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6049
6058
|
provider,
|
|
6050
6059
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
6051
6060
|
...scopes !== void 0 ? { scopes } : {},
|
|
6052
|
-
...options.optionalScopes !== void 0 ? { optional_scopes: options.optionalScopes } : {}
|
|
6061
|
+
...options.optionalScopes !== void 0 ? { optional_scopes: options.optionalScopes } : {},
|
|
6062
|
+
...options.teamId ? { team_id: options.teamId } : {}
|
|
6053
6063
|
});
|
|
6054
6064
|
}
|
|
6055
6065
|
/** Start the Slack OAuth flow required by product notifications. */
|
|
@@ -6057,8 +6067,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6057
6067
|
return this.http.post("/api/v2/integrations/connect", {
|
|
6058
6068
|
provider: "slack",
|
|
6059
6069
|
scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
|
|
6060
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6061
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6070
|
+
..._optionalChain([options, 'optionalAccess', _337 => _337.successUrl]) ? { success_url: options.successUrl } : {},
|
|
6071
|
+
..._optionalChain([options, 'optionalAccess', _338 => _338.failureUrl]) ? { failure_url: options.failureUrl } : {}
|
|
6062
6072
|
});
|
|
6063
6073
|
}
|
|
6064
6074
|
/** List Slack channels visible to the connected Deepline Slack app. */
|
|
@@ -6133,7 +6143,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6133
6143
|
}
|
|
6134
6144
|
const targets = input.targets.map(parseNotificationGroupTarget);
|
|
6135
6145
|
const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
|
|
6136
|
-
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access',
|
|
6146
|
+
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _339 => _339[0], 'optionalAccess', _340 => _340.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
|
|
6137
6147
|
if (legacyEvents.length > 0 && !legacyTarget) {
|
|
6138
6148
|
throw new Error(
|
|
6139
6149
|
"--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
|
|
@@ -6169,7 +6179,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6169
6179
|
const existingGroup = current.configuration.groups.find(
|
|
6170
6180
|
(candidate) => candidate.name.toLowerCase() === name.toLowerCase()
|
|
6171
6181
|
);
|
|
6172
|
-
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess',
|
|
6182
|
+
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _341 => _341.groupKey]), () => ( notificationObjectKey("group")));
|
|
6173
6183
|
const group = _nullishCoalesce(existingGroup, () => ( {
|
|
6174
6184
|
groupKey,
|
|
6175
6185
|
name,
|
|
@@ -6397,7 +6407,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6397
6407
|
/** Read one trigger inventory page without loading run histories. */
|
|
6398
6408
|
async listPlayTriggerInventory(options) {
|
|
6399
6409
|
const params = new URLSearchParams({ view: "inventory" });
|
|
6400
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6410
|
+
if (_optionalChain([options, 'optionalAccess', _342 => _342.cursor])) params.set("cursor", options.cursor);
|
|
6401
6411
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
6402
6412
|
}
|
|
6403
6413
|
/** Read one trigger's recent runs, with an explicit partial-history flag. */
|
|
@@ -6406,7 +6416,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6406
6416
|
view: "history",
|
|
6407
6417
|
binding_id: bindingId
|
|
6408
6418
|
});
|
|
6409
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6419
|
+
if (_optionalChain([options, 'optionalAccess', _343 => _343.limit]) !== void 0)
|
|
6410
6420
|
params.set("history_limit", String(options.limit));
|
|
6411
6421
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
6412
6422
|
}
|
|
@@ -6594,14 +6604,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6594
6604
|
*/
|
|
6595
6605
|
async runPlay(code, csvPath, name, options) {
|
|
6596
6606
|
const { workflowId } = await this.submitPlay(code, csvPath, name, {
|
|
6597
|
-
input: _optionalChain([options, 'optionalAccess',
|
|
6598
|
-
sourceCode: _optionalChain([options, 'optionalAccess',
|
|
6599
|
-
artifact: _optionalChain([options, 'optionalAccess',
|
|
6600
|
-
compilerManifest: _optionalChain([options, 'optionalAccess',
|
|
6601
|
-
inputFile: _optionalChain([options, 'optionalAccess',
|
|
6602
|
-
packagedFiles: _optionalChain([options, 'optionalAccess',
|
|
6603
|
-
force: _optionalChain([options, 'optionalAccess',
|
|
6604
|
-
forceToolRefresh: _optionalChain([options, 'optionalAccess',
|
|
6607
|
+
input: _optionalChain([options, 'optionalAccess', _344 => _344.input]),
|
|
6608
|
+
sourceCode: _optionalChain([options, 'optionalAccess', _345 => _345.sourceCode]),
|
|
6609
|
+
artifact: _optionalChain([options, 'optionalAccess', _346 => _346.artifact]),
|
|
6610
|
+
compilerManifest: _optionalChain([options, 'optionalAccess', _347 => _347.compilerManifest]),
|
|
6611
|
+
inputFile: _optionalChain([options, 'optionalAccess', _348 => _348.inputFile]),
|
|
6612
|
+
packagedFiles: _optionalChain([options, 'optionalAccess', _349 => _349.packagedFiles]),
|
|
6613
|
+
force: _optionalChain([options, 'optionalAccess', _350 => _350.force]),
|
|
6614
|
+
forceToolRefresh: _optionalChain([options, 'optionalAccess', _351 => _351.forceToolRefresh])
|
|
6605
6615
|
});
|
|
6606
6616
|
const start = Date.now();
|
|
6607
6617
|
const state = {
|
|
@@ -6612,7 +6622,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6612
6622
|
latest: null
|
|
6613
6623
|
};
|
|
6614
6624
|
let terminalObserved = null;
|
|
6615
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6625
|
+
if (_optionalChain([options, 'optionalAccess', _352 => _352.signal, 'optionalAccess', _353 => _353.aborted])) {
|
|
6616
6626
|
await this.cancelPlay(workflowId);
|
|
6617
6627
|
return {
|
|
6618
6628
|
success: false,
|
|
@@ -6623,9 +6633,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6623
6633
|
};
|
|
6624
6634
|
}
|
|
6625
6635
|
for await (const event of this.watchRunEvents(workflowId, {
|
|
6626
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
6636
|
+
signal: _optionalChain([options, 'optionalAccess', _354 => _354.signal])
|
|
6627
6637
|
})) {
|
|
6628
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6638
|
+
if (_optionalChain([options, 'optionalAccess', _355 => _355.signal, 'optionalAccess', _356 => _356.aborted])) {
|
|
6629
6639
|
await this.cancelPlay(workflowId);
|
|
6630
6640
|
return {
|
|
6631
6641
|
success: false,
|
|
@@ -6635,19 +6645,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6635
6645
|
error: "Cancelled by user"
|
|
6636
6646
|
};
|
|
6637
6647
|
}
|
|
6638
|
-
const previousStatus = _optionalChain([state, 'access',
|
|
6648
|
+
const previousStatus = _optionalChain([state, 'access', _357 => _357.latest, 'optionalAccess', _358 => _358.status]);
|
|
6639
6649
|
const status = updatePlayLiveStatusState(state, event);
|
|
6640
6650
|
if (!status) {
|
|
6641
6651
|
continue;
|
|
6642
6652
|
}
|
|
6643
6653
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
6644
|
-
_optionalChain([options, 'optionalAccess',
|
|
6654
|
+
_optionalChain([options, 'optionalAccess', _359 => _359.onProgress, 'optionalCall', _360 => _360(status)]);
|
|
6645
6655
|
}
|
|
6646
6656
|
if (_chunkMJTVX4QKjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
6647
6657
|
terminalObserved = status;
|
|
6648
6658
|
}
|
|
6649
6659
|
}
|
|
6650
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6660
|
+
if (_optionalChain([options, 'optionalAccess', _361 => _361.signal, 'optionalAccess', _362 => _362.aborted])) {
|
|
6651
6661
|
await this.cancelPlay(workflowId);
|
|
6652
6662
|
return {
|
|
6653
6663
|
success: false,
|
|
@@ -6700,7 +6710,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6700
6710
|
const response = await this.http.get(
|
|
6701
6711
|
`/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
|
|
6702
6712
|
);
|
|
6703
|
-
const event = _optionalChain([response, 'access',
|
|
6713
|
+
const event = _optionalChain([response, 'access', _363 => _363.entries, 'optionalAccess', _364 => _364[0]]);
|
|
6704
6714
|
if (!event) {
|
|
6705
6715
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6706
6716
|
"No usage event was found for this request_id.",
|
|
@@ -6875,7 +6885,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6875
6885
|
async cancelBillingSubscription(options) {
|
|
6876
6886
|
return this.http.post(
|
|
6877
6887
|
"/api/v2/billing/subscription/cancel",
|
|
6878
|
-
{ action: _optionalChain([options, 'optionalAccess',
|
|
6888
|
+
{ action: _optionalChain([options, 'optionalAccess', _365 => _365.undo]) ? "undo_cancel" : "cancel" }
|
|
6879
6889
|
);
|
|
6880
6890
|
}
|
|
6881
6891
|
/**
|
|
@@ -6887,7 +6897,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6887
6897
|
*/
|
|
6888
6898
|
async listBillingInvoices(options) {
|
|
6889
6899
|
const params = new URLSearchParams();
|
|
6890
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6900
|
+
if (_optionalChain([options, 'optionalAccess', _366 => _366.limit]) !== void 0) {
|
|
6891
6901
|
params.set("limit", String(options.limit));
|
|
6892
6902
|
}
|
|
6893
6903
|
const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
|
|
@@ -6898,7 +6908,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6898
6908
|
/** List the reviewed target plans and whether new acquisition is enabled. */
|
|
6899
6909
|
async getTargetBillingPlans(options) {
|
|
6900
6910
|
return this.http.get(
|
|
6901
|
-
_optionalChain([options, 'optionalAccess',
|
|
6911
|
+
_optionalChain([options, 'optionalAccess', _367 => _367.promoCode]) ? `/api/v2/billing/plans?promo_code=${encodeURIComponent(options.promoCode)}` : "/api/v2/billing/plans"
|
|
6902
6912
|
);
|
|
6903
6913
|
}
|
|
6904
6914
|
/** Read the workspace's normalized target plan, payment, and balance state. */
|
|
@@ -7004,7 +7014,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7004
7014
|
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
7005
7015
|
async createTargetBillingPortalSession(options) {
|
|
7006
7016
|
const response = await this.http.post(
|
|
7007
|
-
_optionalChain([options, 'optionalAccess',
|
|
7017
|
+
_optionalChain([options, 'optionalAccess', _368 => _368.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
|
|
7008
7018
|
{}
|
|
7009
7019
|
);
|
|
7010
7020
|
return response.data;
|
|
@@ -7054,8 +7064,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7054
7064
|
return this.http.request("/api/v2/monitors/audit", {
|
|
7055
7065
|
method: "POST",
|
|
7056
7066
|
body: {
|
|
7057
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7058
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7067
|
+
..._optionalChain([options, 'optionalAccess', _369 => _369.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
7068
|
+
..._optionalChain([options, 'optionalAccess', _370 => _370.cursor]) ? { cursor: options.cursor } : {}
|
|
7059
7069
|
},
|
|
7060
7070
|
maxRetries: 0
|
|
7061
7071
|
});
|
|
@@ -7065,8 +7075,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7065
7075
|
return this.http.request("/api/v2/monitors/repair", {
|
|
7066
7076
|
method: "POST",
|
|
7067
7077
|
body: {
|
|
7068
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7069
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7078
|
+
..._optionalChain([options, 'optionalAccess', _371 => _371.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
7079
|
+
..._optionalChain([options, 'optionalAccess', _372 => _372.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
|
|
7070
7080
|
},
|
|
7071
7081
|
maxRetries: 0
|
|
7072
7082
|
});
|
|
@@ -7074,7 +7084,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7074
7084
|
/** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
|
|
7075
7085
|
async readMonitorsHealth(options) {
|
|
7076
7086
|
const params = new URLSearchParams();
|
|
7077
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7087
|
+
if (_optionalChain([options, 'optionalAccess', _373 => _373.fleetId])) params.set("fleet_id", options.fleetId);
|
|
7078
7088
|
const query = params.toString();
|
|
7079
7089
|
const suffix = query ? `?${query}` : "";
|
|
7080
7090
|
return this.http.request(
|
|
@@ -7147,7 +7157,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7147
7157
|
);
|
|
7148
7158
|
}
|
|
7149
7159
|
const params = new URLSearchParams();
|
|
7150
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7160
|
+
if (_optionalChain([options, 'optionalAccess', _374 => _374.cursor])) params.set("cursor", options.cursor);
|
|
7151
7161
|
const suffix = params.size > 0 ? `?${params}` : "";
|
|
7152
7162
|
return this.http.request(
|
|
7153
7163
|
`/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
|
|
@@ -7194,7 +7204,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7194
7204
|
* a second charge. The submission is never replayed automatically.
|
|
7195
7205
|
*/
|
|
7196
7206
|
async previewMonitor(definition, options) {
|
|
7197
|
-
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7207
|
+
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _375 => _375.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _376 => _376.crypto, 'optionalAccess', _377 => _377.randomUUID, 'optionalCall', _378 => _378()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
|
|
7198
7208
|
try {
|
|
7199
7209
|
const result = await this.http.request(
|
|
7200
7210
|
"/api/v2/monitors/preview",
|
|
@@ -7202,7 +7212,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7202
7212
|
method: "POST",
|
|
7203
7213
|
body: {
|
|
7204
7214
|
...definition,
|
|
7205
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7215
|
+
..._optionalChain([options, 'optionalAccess', _379 => _379.limit]) === void 0 ? {} : { limit: options.limit }
|
|
7206
7216
|
},
|
|
7207
7217
|
headers: { "Idempotency-Key": idempotencyKey },
|
|
7208
7218
|
maxRetries: 0,
|
|
@@ -7224,7 +7234,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7224
7234
|
* `client.monitors.deploy(...)`.
|
|
7225
7235
|
*/
|
|
7226
7236
|
async deployMonitor(definition, options) {
|
|
7227
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7237
|
+
if (_optionalChain([options, 'optionalAccess', _380 => _380.dryRun])) {
|
|
7228
7238
|
return this.http.request("/api/v2/monitors/check", {
|
|
7229
7239
|
method: "POST",
|
|
7230
7240
|
body: definition
|
|
@@ -7260,12 +7270,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7260
7270
|
/** List deployed monitors. Prefer `client.monitors.list(...)`. */
|
|
7261
7271
|
async listMonitors(options) {
|
|
7262
7272
|
const params = new URLSearchParams();
|
|
7263
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7264
|
-
else if (_optionalChain([options, 'optionalAccess',
|
|
7265
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7273
|
+
if (_optionalChain([options, 'optionalAccess', _381 => _381.state])) params.set("state", options.state);
|
|
7274
|
+
else if (_optionalChain([options, 'optionalAccess', _382 => _382.status])) params.set("status", options.status);
|
|
7275
|
+
if (_optionalChain([options, 'optionalAccess', _383 => _383.limit]) !== void 0)
|
|
7266
7276
|
params.set("limit", String(options.limit));
|
|
7267
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7268
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7277
|
+
if (_optionalChain([options, 'optionalAccess', _384 => _384.cursor])) params.set("cursor", options.cursor);
|
|
7278
|
+
if (_optionalChain([options, 'optionalAccess', _385 => _385.includeConsumers])) params.set("include_consumers", "true");
|
|
7269
7279
|
const query = params.toString();
|
|
7270
7280
|
const suffix = query ? `?${query}` : "";
|
|
7271
7281
|
return this.http.request(
|
|
@@ -7276,17 +7286,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7276
7286
|
/** The Monitors list. Prefer `client.monitors.ledger(...)`. */
|
|
7277
7287
|
async listMonitorLedger(options) {
|
|
7278
7288
|
const params = new URLSearchParams();
|
|
7279
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7280
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7281
|
-
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7289
|
+
if (_optionalChain([options, 'optionalAccess', _386 => _386.search])) params.set("q", options.search);
|
|
7290
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _387 => _387.states]), () => ( []))) params.append("state", state);
|
|
7291
|
+
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _388 => _388.signals]), () => ( [])))
|
|
7282
7292
|
params.append("signal", signal);
|
|
7283
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7284
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7285
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7286
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7287
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7293
|
+
if (_optionalChain([options, 'optionalAccess', _389 => _389.play])) params.set("play", options.play);
|
|
7294
|
+
if (_optionalChain([options, 'optionalAccess', _390 => _390.fleet])) params.set("fleet", options.fleet);
|
|
7295
|
+
if (_optionalChain([options, 'optionalAccess', _391 => _391.sort])) params.set("sort", options.sort);
|
|
7296
|
+
if (_optionalChain([options, 'optionalAccess', _392 => _392.window])) params.set("window", options.window);
|
|
7297
|
+
if (_optionalChain([options, 'optionalAccess', _393 => _393.limit]) !== void 0)
|
|
7288
7298
|
params.set("limit", String(options.limit));
|
|
7289
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7299
|
+
if (_optionalChain([options, 'optionalAccess', _394 => _394.cursor])) params.set("cursor", options.cursor);
|
|
7290
7300
|
const query = params.toString();
|
|
7291
7301
|
const suffix = query ? `?${query}` : "";
|
|
7292
7302
|
return this.http.request(
|
|
@@ -7303,7 +7313,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7303
7313
|
}
|
|
7304
7314
|
/** A monitor's recent findings. Prefer `client.monitors.ledgerFindings(...)`. */
|
|
7305
7315
|
async listMonitorLedgerFindings(key, options) {
|
|
7306
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
7316
|
+
const suffix = _optionalChain([options, 'optionalAccess', _395 => _395.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
|
|
7307
7317
|
return this.http.request(
|
|
7308
7318
|
`/api/v2/monitors/ledger/${encodeURIComponent(key)}/findings${suffix}`,
|
|
7309
7319
|
{ method: "GET" }
|
|
@@ -7317,7 +7327,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7317
7327
|
);
|
|
7318
7328
|
}
|
|
7319
7329
|
async testMonitorWebhook(key, payload, options) {
|
|
7320
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7330
|
+
if (_optionalChain([options, 'optionalAccess', _396 => _396.dispatch]) === true || _optionalChain([options, 'optionalAccess', _397 => _397.validationOnly]) === false) {
|
|
7321
7331
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
7322
7332
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
7323
7333
|
void 0,
|
|
@@ -7372,7 +7382,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7372
7382
|
}
|
|
7373
7383
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
7374
7384
|
async deleteMonitor(key, options) {
|
|
7375
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7385
|
+
if (_optionalChain([options, 'optionalAccess', _398 => _398.localOnly]) === true) {
|
|
7376
7386
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
7377
7387
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
7378
7388
|
void 0,
|
|
@@ -7380,11 +7390,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7380
7390
|
);
|
|
7381
7391
|
}
|
|
7382
7392
|
const params = new URLSearchParams();
|
|
7383
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7393
|
+
if (_optionalChain([options, 'optionalAccess', _399 => _399.dryRun])) params.set("dry_run", "true");
|
|
7384
7394
|
const query = params.toString();
|
|
7385
7395
|
return this.http.request(
|
|
7386
7396
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
7387
|
-
_optionalChain([options, 'optionalAccess',
|
|
7397
|
+
_optionalChain([options, 'optionalAccess', _400 => _400.dryRun]) ? { method: "DELETE" } : {
|
|
7388
7398
|
method: "DELETE",
|
|
7389
7399
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
7390
7400
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -7397,10 +7407,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7397
7407
|
* Prefer `client.monitors.reactivate(...)`.
|
|
7398
7408
|
*/
|
|
7399
7409
|
async reactivateMonitor(key, options) {
|
|
7400
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
7410
|
+
const query = _optionalChain([options, 'optionalAccess', _401 => _401.dryRun]) ? "?dry_run=true" : "";
|
|
7401
7411
|
return this.http.request(
|
|
7402
7412
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
7403
|
-
_optionalChain([options, 'optionalAccess',
|
|
7413
|
+
_optionalChain([options, 'optionalAccess', _402 => _402.dryRun]) ? { method: "POST", body: {} } : {
|
|
7404
7414
|
method: "POST",
|
|
7405
7415
|
body: {},
|
|
7406
7416
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -7414,7 +7424,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7414
7424
|
// ——————————————————————————————————————————————————————————
|
|
7415
7425
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
7416
7426
|
monitorJobIdempotencyKey(operation) {
|
|
7417
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
7427
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _403 => _403.crypto, 'optionalAccess', _404 => _404.randomUUID, 'optionalCall', _405 => _405()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
7418
7428
|
const prefix = "monitor-job-";
|
|
7419
7429
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
7420
7430
|
const maxOperationLength = Math.max(
|
|
@@ -7425,7 +7435,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7425
7435
|
}
|
|
7426
7436
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
7427
7437
|
return {
|
|
7428
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
7438
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _406 => _406.trim, 'call', _407 => _407()]) || this.monitorJobIdempotencyKey(operation)
|
|
7429
7439
|
};
|
|
7430
7440
|
}
|
|
7431
7441
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -7436,7 +7446,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7436
7446
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
7437
7447
|
headers: this.monitorJobHeaders(
|
|
7438
7448
|
"batch-deploy",
|
|
7439
|
-
_optionalChain([options, 'optionalAccess',
|
|
7449
|
+
_optionalChain([options, 'optionalAccess', _408 => _408.idempotencyKey])
|
|
7440
7450
|
),
|
|
7441
7451
|
maxRetries: 0,
|
|
7442
7452
|
exactUrlOnly: true
|
|
@@ -7455,11 +7465,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7455
7465
|
version: 1,
|
|
7456
7466
|
kind: "batch",
|
|
7457
7467
|
monitors: definitions,
|
|
7458
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7468
|
+
..._optionalChain([options, 'optionalAccess', _409 => _409.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
7459
7469
|
},
|
|
7460
7470
|
headers: this.monitorJobHeaders(
|
|
7461
7471
|
`batch-sync-${batchId}`,
|
|
7462
|
-
_optionalChain([options, 'optionalAccess',
|
|
7472
|
+
_optionalChain([options, 'optionalAccess', _410 => _410.idempotencyKey])
|
|
7463
7473
|
),
|
|
7464
7474
|
maxRetries: 0,
|
|
7465
7475
|
exactUrlOnly: true
|
|
@@ -7474,7 +7484,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7474
7484
|
body: {},
|
|
7475
7485
|
headers: this.monitorJobHeaders(
|
|
7476
7486
|
`batch-start-${batchId}`,
|
|
7477
|
-
_optionalChain([options, 'optionalAccess',
|
|
7487
|
+
_optionalChain([options, 'optionalAccess', _411 => _411.idempotencyKey])
|
|
7478
7488
|
),
|
|
7479
7489
|
maxRetries: 0,
|
|
7480
7490
|
exactUrlOnly: true
|
|
@@ -7489,7 +7499,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7489
7499
|
body: {},
|
|
7490
7500
|
headers: this.monitorJobHeaders(
|
|
7491
7501
|
`batch-stop-${batchId}`,
|
|
7492
|
-
_optionalChain([options, 'optionalAccess',
|
|
7502
|
+
_optionalChain([options, 'optionalAccess', _412 => _412.idempotencyKey])
|
|
7493
7503
|
),
|
|
7494
7504
|
maxRetries: 0,
|
|
7495
7505
|
exactUrlOnly: true
|
|
@@ -7510,7 +7520,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7510
7520
|
body: {},
|
|
7511
7521
|
headers: this.monitorJobHeaders(
|
|
7512
7522
|
`${action}-${monitorKey}`,
|
|
7513
|
-
_optionalChain([options, 'optionalAccess',
|
|
7523
|
+
_optionalChain([options, 'optionalAccess', _413 => _413.idempotencyKey])
|
|
7514
7524
|
),
|
|
7515
7525
|
maxRetries: 0,
|
|
7516
7526
|
exactUrlOnly: true
|
|
@@ -7523,7 +7533,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7523
7533
|
body: definition,
|
|
7524
7534
|
headers: this.monitorJobHeaders(
|
|
7525
7535
|
`sync-${definition.key}`,
|
|
7526
|
-
_optionalChain([options, 'optionalAccess',
|
|
7536
|
+
_optionalChain([options, 'optionalAccess', _414 => _414.idempotencyKey])
|
|
7527
7537
|
),
|
|
7528
7538
|
maxRetries: 0,
|
|
7529
7539
|
exactUrlOnly: true
|
|
@@ -7536,7 +7546,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7536
7546
|
);
|
|
7537
7547
|
}
|
|
7538
7548
|
async getMonitorJobLogs(jobId, options) {
|
|
7539
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
7549
|
+
const query = _optionalChain([options, 'optionalAccess', _415 => _415.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
7540
7550
|
return this.http.request(
|
|
7541
7551
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
7542
7552
|
{ method: "GET" }
|
|
@@ -7549,15 +7559,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7549
7559
|
);
|
|
7550
7560
|
}
|
|
7551
7561
|
async waitForMonitorJob(jobId, options) {
|
|
7552
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7553
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7562
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _416 => _416.timeoutMs]), () => ( 10 * 6e4)));
|
|
7563
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _417 => _417.pollIntervalMs]), () => ( 2e3)));
|
|
7554
7564
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
7555
7565
|
const startedAt = Date.now();
|
|
7556
7566
|
let latest = await this.getMonitorJob(jobId);
|
|
7557
7567
|
while (true) {
|
|
7558
|
-
_optionalChain([options, 'optionalAccess',
|
|
7568
|
+
_optionalChain([options, 'optionalAccess', _418 => _418.onProgress, 'optionalCall', _419 => _419(latest)]);
|
|
7559
7569
|
const job = latest.job;
|
|
7560
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
7570
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _420 => _420.state]) === "string" ? job.state : void 0;
|
|
7561
7571
|
if (state && terminal.has(state)) return latest;
|
|
7562
7572
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
7563
7573
|
await sleep(pollIntervalMs);
|
|
@@ -7568,12 +7578,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7568
7578
|
// Monitor Fleets
|
|
7569
7579
|
// ——————————————————————————————————————————————————————————
|
|
7570
7580
|
monitorFleetIdempotencyKey(operation) {
|
|
7571
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
7581
|
+
const uuid = _optionalChain([globalThis, 'access', _421 => _421.crypto, 'optionalAccess', _422 => _422.randomUUID, 'optionalCall', _423 => _423()]);
|
|
7572
7582
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
7573
7583
|
}
|
|
7574
7584
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
7575
7585
|
return {
|
|
7576
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
7586
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _424 => _424.trim, 'call', _425 => _425()]) || this.monitorFleetIdempotencyKey(operation)
|
|
7577
7587
|
};
|
|
7578
7588
|
}
|
|
7579
7589
|
/**
|
|
@@ -7607,14 +7617,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7607
7617
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
7608
7618
|
const body = {
|
|
7609
7619
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
7610
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7611
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7612
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7620
|
+
..._optionalChain([options, 'optionalAccess', _426 => _426.dryRun]) ? { dry_run: true } : {},
|
|
7621
|
+
..._optionalChain([options, 'optionalAccess', _427 => _427.adoptExisting]) ? { adopt_existing: true } : {},
|
|
7622
|
+
..._optionalChain([options, 'optionalAccess', _428 => _428.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
7613
7623
|
};
|
|
7614
7624
|
const headers = {
|
|
7615
|
-
...this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
7625
|
+
...this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _429 => _429.idempotencyKey])),
|
|
7616
7626
|
"X-Deepline-Fleet-Commit-Budget-Ms": String(
|
|
7617
|
-
_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7627
|
+
_nullishCoalesce(_optionalChain([options, 'optionalAccess', _430 => _430.commitBudgetMs]), () => ( _DeeplineClient.MONITOR_FLEET_COMMIT_BUDGET_MS))
|
|
7618
7628
|
)
|
|
7619
7629
|
};
|
|
7620
7630
|
let remainingBefore = Number.POSITIVE_INFINITY;
|
|
@@ -7645,7 +7655,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7645
7655
|
{ response: result }
|
|
7646
7656
|
);
|
|
7647
7657
|
}
|
|
7648
|
-
_optionalChain([options, 'optionalAccess',
|
|
7658
|
+
_optionalChain([options, 'optionalAccess', _431 => _431.onCommitProgress, 'optionalCall', _432 => _432({
|
|
7649
7659
|
fleetId,
|
|
7650
7660
|
generation: Number(result.generation),
|
|
7651
7661
|
membersCommitted: Number(staged.members_committed),
|
|
@@ -7662,10 +7672,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7662
7672
|
/** The Fleets list. Prefer `client.monitors.fleets.overview()`. */
|
|
7663
7673
|
async listMonitorFleetOverviews(options) {
|
|
7664
7674
|
const params = new URLSearchParams({ view: "overview" });
|
|
7665
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7666
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7667
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7668
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7675
|
+
if (_optionalChain([options, 'optionalAccess', _433 => _433.q])) params.set("q", options.q);
|
|
7676
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _434 => _434.states]), () => ( []))) params.append("state", state);
|
|
7677
|
+
if (_optionalChain([options, 'optionalAccess', _435 => _435.sort])) params.set("sort", options.sort);
|
|
7678
|
+
if (_optionalChain([options, 'optionalAccess', _436 => _436.window])) params.set("window", options.window);
|
|
7669
7679
|
return this.http.request(
|
|
7670
7680
|
`/api/v2/monitors/fleets?${params.toString()}`,
|
|
7671
7681
|
{ method: "GET" }
|
|
@@ -7674,7 +7684,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7674
7684
|
/** One fleet's overview. Prefer `client.monitors.fleets.overview(fleetId)`. */
|
|
7675
7685
|
async getMonitorFleetOverview(fleetId, options) {
|
|
7676
7686
|
const params = new URLSearchParams({ view: "overview" });
|
|
7677
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7687
|
+
if (_optionalChain([options, 'optionalAccess', _437 => _437.window])) params.set("window", options.window);
|
|
7678
7688
|
return this.http.request(
|
|
7679
7689
|
`${this.monitorFleetPath(fleetId)}?${params.toString()}`,
|
|
7680
7690
|
{ method: "GET" }
|
|
@@ -7683,10 +7693,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7683
7693
|
/** A fleet's problem members. Prefer `client.monitors.fleets.issues(...)`. */
|
|
7684
7694
|
async listMonitorFleetIssues(fleetId, options) {
|
|
7685
7695
|
const params = new URLSearchParams();
|
|
7686
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7687
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7688
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7689
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7696
|
+
if (_optionalChain([options, 'optionalAccess', _438 => _438.group])) params.set("group", options.group);
|
|
7697
|
+
if (_optionalChain([options, 'optionalAccess', _439 => _439.cause])) params.set("cause", options.cause);
|
|
7698
|
+
if (_optionalChain([options, 'optionalAccess', _440 => _440.cursor])) params.set("cursor", options.cursor);
|
|
7699
|
+
if (_optionalChain([options, 'optionalAccess', _441 => _441.limit]) !== void 0)
|
|
7690
7700
|
params.set("limit", String(options.limit));
|
|
7691
7701
|
const query = params.toString();
|
|
7692
7702
|
return this.http.request(
|
|
@@ -7696,8 +7706,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7696
7706
|
}
|
|
7697
7707
|
async getMonitorFleet(fleetId, options) {
|
|
7698
7708
|
const params = new URLSearchParams();
|
|
7699
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7700
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7709
|
+
if (_optionalChain([options, 'optionalAccess', _442 => _442.drift])) params.set("drift", "1");
|
|
7710
|
+
if (_optionalChain([options, 'optionalAccess', _443 => _443.limit]) !== void 0)
|
|
7701
7711
|
params.set("limit", String(options.limit));
|
|
7702
7712
|
const query = params.toString();
|
|
7703
7713
|
return this.http.request(
|
|
@@ -7710,11 +7720,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7710
7720
|
this.monitorFleetPath(fleetId),
|
|
7711
7721
|
{
|
|
7712
7722
|
method: "DELETE",
|
|
7713
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
7723
|
+
body: _optionalChain([options, 'optionalAccess', _444 => _444.dryRun]) ? { dry_run: true } : {},
|
|
7714
7724
|
timeout: _DeeplineClient.MONITOR_FLEET_WRITE_TIMEOUT_MS,
|
|
7715
7725
|
headers: this.monitorFleetHeaders(
|
|
7716
7726
|
"deactivate",
|
|
7717
|
-
_optionalChain([options, 'optionalAccess',
|
|
7727
|
+
_optionalChain([options, 'optionalAccess', _445 => _445.idempotencyKey])
|
|
7718
7728
|
),
|
|
7719
7729
|
maxRetries: 0,
|
|
7720
7730
|
exactUrlOnly: true
|
|
@@ -7730,7 +7740,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7730
7740
|
timeout: _DeeplineClient.MONITOR_FLEET_WRITE_TIMEOUT_MS,
|
|
7731
7741
|
headers: this.monitorFleetHeaders(
|
|
7732
7742
|
"reactivate",
|
|
7733
|
-
_optionalChain([options, 'optionalAccess',
|
|
7743
|
+
_optionalChain([options, 'optionalAccess', _446 => _446.idempotencyKey])
|
|
7734
7744
|
),
|
|
7735
7745
|
maxRetries: 0,
|
|
7736
7746
|
exactUrlOnly: true
|
|
@@ -7747,9 +7757,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7747
7757
|
* identical to "the request failed".
|
|
7748
7758
|
*/
|
|
7749
7759
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
7750
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7751
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7752
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
7760
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _447 => _447.timeoutMs]), () => ( 10 * 6e4)));
|
|
7761
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _448 => _448.pollIntervalMs]), () => ( 2e3)));
|
|
7762
|
+
const terminal = _optionalChain([options, 'optionalAccess', _449 => _449.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
|
|
7753
7763
|
"converged",
|
|
7754
7764
|
"degraded",
|
|
7755
7765
|
"deactivated",
|
|
@@ -7758,7 +7768,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7758
7768
|
const startedAt = Date.now();
|
|
7759
7769
|
let latest = await this.getMonitorFleet(fleetId);
|
|
7760
7770
|
while (true) {
|
|
7761
|
-
_optionalChain([options, 'optionalAccess',
|
|
7771
|
+
_optionalChain([options, 'optionalAccess', _450 => _450.onProgress, 'optionalCall', _451 => _451(latest)]);
|
|
7762
7772
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
7763
7773
|
if (status && terminal.has(status)) return latest;
|
|
7764
7774
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|