deepline 0.3.567 → 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 +53 -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/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +21 -0
- package/dist/cli/auth-77NOPZ6A.js +44 -0
- package/dist/cli/{auth-IYYQA4ZO.mjs → auth-VNJLXDGF.mjs} +5 -5
- package/dist/cli/{billing-B37Z3HQJ.mjs → billing-6HD5LEI2.mjs} +9 -9
- package/dist/cli/{billing-HSUA42W6.js → billing-OTIIK5ZQ.js} +102 -102
- package/dist/cli/{chunk-NQ6NYC54.js → chunk-3WZ3X46C.js} +13 -13
- package/dist/cli/{chunk-Z75WS3TZ.js → chunk-44HOKKIN.js} +100 -100
- package/dist/cli/{chunk-GWKHJ6BN.mjs → chunk-45OTCUAC.mjs} +2 -2
- package/dist/cli/{chunk-OUKIU4AE.js → chunk-4CLEOTG6.js} +2 -2
- package/dist/cli/{chunk-KOMEYB7H.mjs → chunk-64MOX3SN.mjs} +16 -3
- package/dist/cli/{chunk-3GRMC25W.mjs → chunk-6D4WBX7E.mjs} +33 -5
- package/dist/cli/{chunk-LZV3AJAX.mjs → chunk-6HEZRKAO.mjs} +2 -2
- package/dist/cli/{chunk-KOBUUBOO.mjs → chunk-6SBGYX25.mjs} +2 -2
- package/dist/cli/{chunk-LQRWLQAQ.js → chunk-6Z7B3IOW.js} +2 -2
- package/dist/cli/{chunk-AC37TMJX.js → chunk-7MZUSBSI.js} +23 -23
- package/dist/cli/{chunk-FT7OSIWX.mjs → chunk-7NP7WZV2.mjs} +3 -3
- package/dist/cli/{chunk-HYYWZFYF.mjs → chunk-7QH52S3E.mjs} +145 -10
- package/dist/cli/{chunk-4FTTLJVV.mjs → chunk-AKNJDDSM.mjs} +1 -1
- package/dist/cli/{chunk-A5VWMZY4.js → chunk-ANXJNE2G.js} +3 -3
- package/dist/cli/{chunk-RSQ6AVH3.mjs → chunk-CK6U2NH2.mjs} +1 -1
- package/dist/cli/{chunk-ZPD6SPP2.mjs → chunk-D3BJ2KZX.mjs} +1 -1
- package/dist/cli/{chunk-YDXPAUGF.mjs → chunk-DG6ILAO7.mjs} +2 -2
- package/dist/cli/{chunk-6DJHNVGT.mjs → chunk-EDNWMQZQ.mjs} +2 -2
- package/dist/cli/{chunk-JBXDWAGB.mjs → chunk-FPRLFIYT.mjs} +4 -4
- package/dist/cli/{chunk-LTJQCMEM.js → chunk-FSAOU4HA.js} +20 -20
- package/dist/cli/{chunk-MMWD3ZTQ.mjs → chunk-GSUHJUNZ.mjs} +2 -2
- package/dist/cli/{chunk-OPGDVTAQ.js → chunk-H3SQMLHO.js} +48 -48
- package/dist/cli/{chunk-3E2C6CIE.js → chunk-H7DRZXYF.js} +4 -4
- package/dist/cli/{chunk-5D3QECRX.js → chunk-HLRSNCPM.js} +53 -53
- package/dist/cli/{chunk-OD4LINNE.mjs → chunk-IEOIGU5A.mjs} +1 -1
- package/dist/cli/{chunk-ZNXUAZDK.js → chunk-IGIUAHTR.js} +41 -41
- package/dist/cli/{chunk-V5YGEK5Q.js → chunk-IS4NFIQY.js} +136 -108
- package/dist/cli/{chunk-4ACBVZ44.mjs → chunk-JXRWSBJZ.mjs} +1 -1
- package/dist/cli/{chunk-GFETP5X7.js → chunk-LOF7H5V3.js} +7 -7
- package/dist/cli/{chunk-KHZVZOJF.js → chunk-MIGJHZ3P.js} +20 -20
- package/dist/cli/{chunk-XG5NEJOK.js → chunk-N5ZOD3LA.js} +10 -10
- package/dist/cli/{chunk-OEVCKW2M.js → chunk-N6KF6X3D.js} +16 -3
- package/dist/cli/{chunk-64CQF2JL.mjs → chunk-OFBP336D.mjs} +4 -4
- package/dist/cli/{chunk-3TJKNRHY.mjs → chunk-P2LVKWU6.mjs} +2 -2
- package/dist/cli/{chunk-PFJNZUUK.js → chunk-PAFSVZCZ.js} +155 -20
- package/dist/cli/{chunk-P4GUUPIV.js → chunk-QKPKVLTG.js} +2 -2
- package/dist/cli/{chunk-35TWSBEO.js → chunk-QLMMNBJW.js} +6 -6
- package/dist/cli/{chunk-7RNBGBTS.js → chunk-S3VGWMFX.js} +9 -9
- package/dist/cli/{chunk-OOFYQCNU.js → chunk-S4MDYDCF.js} +5 -5
- package/dist/cli/{chunk-RIR3YNNB.js → chunk-SMAXLMM3.js} +15 -15
- package/dist/cli/{chunk-IPOAJ56O.mjs → chunk-SRMDDVWK.mjs} +5 -5
- package/dist/cli/{chunk-L5UB7RF2.js → chunk-SWREMC6J.js} +5 -5
- package/dist/cli/{chunk-FRQYUWGF.mjs → chunk-TALKTQK5.mjs} +1 -1
- package/dist/cli/{chunk-4FVLQFCF.js → chunk-TH2GHSF6.js} +5 -5
- package/dist/cli/{chunk-S72EZ4R5.mjs → chunk-TRE5X6VQ.mjs} +1 -1
- package/dist/cli/{chunk-WIKOKQJV.js → chunk-TZVKEUM6.js} +1 -1
- package/dist/cli/{chunk-C67KGU5G.mjs → chunk-UOMMXLDU.mjs} +11 -11
- package/dist/cli/{chunk-YRRXHWQ2.mjs → chunk-WPCY5PR3.mjs} +5 -5
- package/dist/cli/{chunk-CR7U44AW.js → chunk-WVS2ITKP.js} +3 -3
- package/dist/cli/{chunk-ASIXRCHD.mjs → chunk-X4WPW5O3.mjs} +3 -3
- package/dist/cli/{chunk-6TLCP356.mjs → chunk-YLZ63U7S.mjs} +5 -5
- package/dist/cli/{chunk-PH4SALNI.mjs → chunk-YNSVWNRY.mjs} +1 -1
- package/dist/cli/{chunk-SDJ5CTZX.js → chunk-YTOILYBU.js} +26 -26
- package/dist/cli/{chunk-AUXDJJYK.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-P5TBHSRA.mjs → concurrent-runs-help-BVBGDMNV.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-QPUTOBFB.js +22 -0
- package/dist/cli/{csv-KPYMOFM2.mjs → csv-BUZIP2TV.mjs} +4 -4
- package/dist/cli/{csv-2F5LOZUT.js → csv-G25E43QV.js} +13 -13
- package/dist/cli/{db-URVQ2LNU.mjs → db-EUN7RRDX.mjs} +6 -6
- package/dist/cli/{db-4H4CJFI2.js → db-KYIDDEEE.js} +27 -27
- package/dist/cli/{describe-KV6RFX2K.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-NFQCGCBK.mjs → executions-BRSOIIV7.mjs} +6 -6
- package/dist/cli/{executions-BAAJY5LB.js → executions-LQA34Z76.js} +8 -8
- package/dist/cli/{feedback-UF2TRDNI.mjs → feedback-JYL2FTWI.mjs} +6 -6
- package/dist/cli/{feedback-Y3WJ5VTT.js → feedback-RVYWQRSZ.js} +14 -14
- package/dist/cli/{git-EIURJKMS.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-YVBIIULS.js → integrations-JK3OT5BT.js} +29 -29
- package/dist/cli/{integrations-TPEILZYO.mjs → integrations-QFS62VWE.mjs} +7 -7
- package/dist/cli/{legacy-noops-EVEQ4T2F.mjs → legacy-noops-NBKBFVDO.mjs} +6 -6
- package/dist/cli/{legacy-noops-K5YAE7DD.js → legacy-noops-RYP5LN5D.js} +9 -9
- package/dist/cli/{mcp-NADIFFBS.js → mcp-KPY7NZPI.js} +24 -24
- package/dist/cli/{mcp-7UX5HDKR.mjs → mcp-KVGJK3SM.mjs} +4 -4
- package/dist/cli/{monitors-TOWPB2IO.js → monitors-DE5SX3CP.js} +100 -100
- package/dist/cli/{monitors-V2XU3WU3.mjs → monitors-H3UWQMMI.mjs} +7 -7
- package/dist/cli/{org-S2UZTR74.js → org-CDCSMG3J.js} +121 -121
- package/dist/cli/{org-J2FDLRIR.mjs → org-N6I5K56T.mjs} +6 -6
- package/dist/cli/{outcomes-ECG7SORM.mjs → outcomes-EPEMTJVB.mjs} +6 -6
- package/dist/cli/{outcomes-DIU4I6IA.js → outcomes-UNAOLWWO.js} +14 -14
- package/dist/cli/{play-LW5RPGMR.js → play-7TVJ3DFQ.js} +324 -324
- package/dist/cli/{play-SIYRTGQF.mjs → play-VVM5XJFT.mjs} +19 -19
- package/dist/cli/{providers-5VIQLQGV.mjs → providers-47CT527B.mjs} +6 -6
- package/dist/cli/{providers-G4FAPJ6K.js → providers-ANYRJ56K.js} +9 -9
- package/dist/cli/{quickstart-6NLZQN2K.js → quickstart-H4MI6LVO.js} +6 -6
- package/dist/cli/{quickstart-IPM5YDLX.mjs → quickstart-QHMC5YCM.mjs} +4 -4
- package/dist/cli/{run-Z3TL5ZOG.mjs → run-NXC5W5CW.mjs} +23 -23
- package/dist/cli/{run-VGIB7CJB.js → run-V4UAYPAX.js} +44 -44
- package/dist/cli/{search-2CLGFCVP.mjs → search-BEU4VBY4.mjs} +7 -7
- package/dist/cli/search-TUK2STXB.js +32 -0
- package/dist/cli/{search-output-O6RCBYN6.mjs → search-output-DUA3WDB7.mjs} +4 -4
- package/dist/cli/{search-output-FEB5JLB5.js → search-output-NUGUU7VJ.js} +6 -6
- package/dist/cli/{secrets-OVVWC2HX.js → secrets-PFDBC5KO.js} +15 -15
- package/dist/cli/{secrets-RBHLBJHA.mjs → secrets-XQOOWTH2.mjs} +6 -6
- package/dist/cli/sessions-5333FFSY.js +23 -0
- package/dist/cli/{sessions-PFA3PFXV.mjs → sessions-U2ZS5R42.mjs} +6 -6
- package/dist/cli/{settings-V5OAQOFP.js → settings-ATYARYCR.js} +85 -85
- package/dist/cli/{settings-N54VKHLV.mjs → settings-GPDE7DL2.mjs} +12 -12
- package/dist/cli/{setup-XF3KBJ6Y.js → setup-4AYMU7NK.js} +49 -49
- package/dist/cli/{setup-2EZ563DR.mjs → setup-UDO6BY5A.mjs} +9 -9
- package/dist/cli/skills-LB56HJOY.js +37 -0
- package/dist/cli/{skills-7DULCICX.mjs → skills-RACTA7VV.mjs} +7 -7
- package/dist/cli/tools-3Y7KCKZX.js +57 -0
- package/dist/cli/{tools-NC5IVGAT.mjs → tools-TXI6XFHE.mjs} +17 -17
- package/dist/cli/update-EWOLMH3E.js +37 -0
- package/dist/cli/{update-4H3GBUVU.mjs → update-VHTKWNXO.mjs} +9 -9
- package/dist/cli/{views-CEGJLVO7.js → views-DVBO3L63.js} +21 -21
- package/dist/cli/{views-O2V4FIII.mjs → views-GCNEHB7D.mjs} +6 -6
- package/dist/cli/{workflow-SGWK2I2Z.mjs → workflow-R3A6EGB5.mjs} +7 -7
- package/dist/cli/{workflow-EJNNNQOE.js → workflow-TFRJ5JKX.js} +17 -17
- package/dist/{client-B5cSKEi4.d.mts → client-ClJlqkKt.d.mts} +1 -1
- package/dist/{client-vUZGmXT9.d.ts → client-DCnExziW.d.ts} +1 -1
- package/dist/{client-core-Deqov12F.d.ts → client-core-BKq5ZNAl.d.ts} +33 -2
- package/dist/{client-core-BP19BoBb.d.mts → client-core-DAOPQnGD.d.mts} +33 -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-KI3KBLRD.js +0 -44
- package/dist/cli/concurrent-runs-help-7SA3A2K5.js +0 -22
- package/dist/cli/describe-R7QLYW6K.js +0 -50
- package/dist/cli/git-TIF77U5E.js +0 -26
- package/dist/cli/search-BJFP7VHT.js +0 -32
- package/dist/cli/sessions-HCKHUILD.js +0 -23
- package/dist/cli/skills-TZC2JNIZ.js +0 -37
- package/dist/cli/tools-ECUMBLZB.js +0 -57
- package/dist/cli/update-4AAEZJ64.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,35 @@ 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 } : {}
|
|
6019
|
+
});
|
|
6020
|
+
}
|
|
6021
|
+
/**
|
|
6022
|
+
* Connect a provider with a Deepline-managed key (Lusha). Deepline creates
|
|
6023
|
+
* the key and bills usage through Deepline credits; the key is never
|
|
6024
|
+
* returned. `termsVersion` records which provider terms the caller accepted.
|
|
6025
|
+
*/
|
|
6026
|
+
async connectManagedIntegration(provider, input) {
|
|
6027
|
+
return this.http.post("/api/v2/integrations/connect", {
|
|
6028
|
+
provider,
|
|
6029
|
+
credential_mode: "partner_managed",
|
|
6030
|
+
accept_terms: input.termsVersion !== void 0,
|
|
6031
|
+
...input.termsVersion !== void 0 ? { terms_version: input.termsVersion } : {},
|
|
6032
|
+
company: {
|
|
6033
|
+
domain: input.company.domain,
|
|
6034
|
+
legal_name: input.company.legalName,
|
|
6035
|
+
country: input.company.country
|
|
6036
|
+
}
|
|
6014
6037
|
});
|
|
6015
6038
|
}
|
|
6016
6039
|
/** Calendar discovery compatibility method. The managed pilot requires calendar IDs in tool and Play inputs. */
|
|
@@ -6021,9 +6044,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6021
6044
|
`/api/v2/integrations/calendar-availability/calendars?${params}`
|
|
6022
6045
|
);
|
|
6023
6046
|
}
|
|
6024
|
-
/**
|
|
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
|
+
*/
|
|
6025
6052
|
async startIntegrationOAuth(provider, options = {}) {
|
|
6026
|
-
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)]);
|
|
6027
6054
|
if (scopes !== void 0 && scopes.length === 0) {
|
|
6028
6055
|
throw new Error("scopes must contain at least one OAuth scope.");
|
|
6029
6056
|
}
|
|
@@ -6031,7 +6058,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6031
6058
|
provider,
|
|
6032
6059
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
6033
6060
|
...scopes !== void 0 ? { scopes } : {},
|
|
6034
|
-
...options.optionalScopes !== void 0 ? { optional_scopes: options.optionalScopes } : {}
|
|
6061
|
+
...options.optionalScopes !== void 0 ? { optional_scopes: options.optionalScopes } : {},
|
|
6062
|
+
...options.teamId ? { team_id: options.teamId } : {}
|
|
6035
6063
|
});
|
|
6036
6064
|
}
|
|
6037
6065
|
/** Start the Slack OAuth flow required by product notifications. */
|
|
@@ -6039,8 +6067,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6039
6067
|
return this.http.post("/api/v2/integrations/connect", {
|
|
6040
6068
|
provider: "slack",
|
|
6041
6069
|
scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
|
|
6042
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6043
|
-
..._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 } : {}
|
|
6044
6072
|
});
|
|
6045
6073
|
}
|
|
6046
6074
|
/** List Slack channels visible to the connected Deepline Slack app. */
|
|
@@ -6115,7 +6143,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6115
6143
|
}
|
|
6116
6144
|
const targets = input.targets.map(parseNotificationGroupTarget);
|
|
6117
6145
|
const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
|
|
6118
|
-
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;
|
|
6119
6147
|
if (legacyEvents.length > 0 && !legacyTarget) {
|
|
6120
6148
|
throw new Error(
|
|
6121
6149
|
"--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
|
|
@@ -6151,7 +6179,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6151
6179
|
const existingGroup = current.configuration.groups.find(
|
|
6152
6180
|
(candidate) => candidate.name.toLowerCase() === name.toLowerCase()
|
|
6153
6181
|
);
|
|
6154
|
-
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess',
|
|
6182
|
+
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _341 => _341.groupKey]), () => ( notificationObjectKey("group")));
|
|
6155
6183
|
const group = _nullishCoalesce(existingGroup, () => ( {
|
|
6156
6184
|
groupKey,
|
|
6157
6185
|
name,
|
|
@@ -6379,7 +6407,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6379
6407
|
/** Read one trigger inventory page without loading run histories. */
|
|
6380
6408
|
async listPlayTriggerInventory(options) {
|
|
6381
6409
|
const params = new URLSearchParams({ view: "inventory" });
|
|
6382
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6410
|
+
if (_optionalChain([options, 'optionalAccess', _342 => _342.cursor])) params.set("cursor", options.cursor);
|
|
6383
6411
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
6384
6412
|
}
|
|
6385
6413
|
/** Read one trigger's recent runs, with an explicit partial-history flag. */
|
|
@@ -6388,7 +6416,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6388
6416
|
view: "history",
|
|
6389
6417
|
binding_id: bindingId
|
|
6390
6418
|
});
|
|
6391
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6419
|
+
if (_optionalChain([options, 'optionalAccess', _343 => _343.limit]) !== void 0)
|
|
6392
6420
|
params.set("history_limit", String(options.limit));
|
|
6393
6421
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
6394
6422
|
}
|
|
@@ -6576,14 +6604,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6576
6604
|
*/
|
|
6577
6605
|
async runPlay(code, csvPath, name, options) {
|
|
6578
6606
|
const { workflowId } = await this.submitPlay(code, csvPath, name, {
|
|
6579
|
-
input: _optionalChain([options, 'optionalAccess',
|
|
6580
|
-
sourceCode: _optionalChain([options, 'optionalAccess',
|
|
6581
|
-
artifact: _optionalChain([options, 'optionalAccess',
|
|
6582
|
-
compilerManifest: _optionalChain([options, 'optionalAccess',
|
|
6583
|
-
inputFile: _optionalChain([options, 'optionalAccess',
|
|
6584
|
-
packagedFiles: _optionalChain([options, 'optionalAccess',
|
|
6585
|
-
force: _optionalChain([options, 'optionalAccess',
|
|
6586
|
-
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])
|
|
6587
6615
|
});
|
|
6588
6616
|
const start = Date.now();
|
|
6589
6617
|
const state = {
|
|
@@ -6594,7 +6622,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6594
6622
|
latest: null
|
|
6595
6623
|
};
|
|
6596
6624
|
let terminalObserved = null;
|
|
6597
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6625
|
+
if (_optionalChain([options, 'optionalAccess', _352 => _352.signal, 'optionalAccess', _353 => _353.aborted])) {
|
|
6598
6626
|
await this.cancelPlay(workflowId);
|
|
6599
6627
|
return {
|
|
6600
6628
|
success: false,
|
|
@@ -6605,9 +6633,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6605
6633
|
};
|
|
6606
6634
|
}
|
|
6607
6635
|
for await (const event of this.watchRunEvents(workflowId, {
|
|
6608
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
6636
|
+
signal: _optionalChain([options, 'optionalAccess', _354 => _354.signal])
|
|
6609
6637
|
})) {
|
|
6610
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6638
|
+
if (_optionalChain([options, 'optionalAccess', _355 => _355.signal, 'optionalAccess', _356 => _356.aborted])) {
|
|
6611
6639
|
await this.cancelPlay(workflowId);
|
|
6612
6640
|
return {
|
|
6613
6641
|
success: false,
|
|
@@ -6617,19 +6645,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6617
6645
|
error: "Cancelled by user"
|
|
6618
6646
|
};
|
|
6619
6647
|
}
|
|
6620
|
-
const previousStatus = _optionalChain([state, 'access',
|
|
6648
|
+
const previousStatus = _optionalChain([state, 'access', _357 => _357.latest, 'optionalAccess', _358 => _358.status]);
|
|
6621
6649
|
const status = updatePlayLiveStatusState(state, event);
|
|
6622
6650
|
if (!status) {
|
|
6623
6651
|
continue;
|
|
6624
6652
|
}
|
|
6625
6653
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
6626
|
-
_optionalChain([options, 'optionalAccess',
|
|
6654
|
+
_optionalChain([options, 'optionalAccess', _359 => _359.onProgress, 'optionalCall', _360 => _360(status)]);
|
|
6627
6655
|
}
|
|
6628
6656
|
if (_chunkMJTVX4QKjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
6629
6657
|
terminalObserved = status;
|
|
6630
6658
|
}
|
|
6631
6659
|
}
|
|
6632
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6660
|
+
if (_optionalChain([options, 'optionalAccess', _361 => _361.signal, 'optionalAccess', _362 => _362.aborted])) {
|
|
6633
6661
|
await this.cancelPlay(workflowId);
|
|
6634
6662
|
return {
|
|
6635
6663
|
success: false,
|
|
@@ -6682,7 +6710,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6682
6710
|
const response = await this.http.get(
|
|
6683
6711
|
`/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
|
|
6684
6712
|
);
|
|
6685
|
-
const event = _optionalChain([response, 'access',
|
|
6713
|
+
const event = _optionalChain([response, 'access', _363 => _363.entries, 'optionalAccess', _364 => _364[0]]);
|
|
6686
6714
|
if (!event) {
|
|
6687
6715
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6688
6716
|
"No usage event was found for this request_id.",
|
|
@@ -6857,7 +6885,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6857
6885
|
async cancelBillingSubscription(options) {
|
|
6858
6886
|
return this.http.post(
|
|
6859
6887
|
"/api/v2/billing/subscription/cancel",
|
|
6860
|
-
{ action: _optionalChain([options, 'optionalAccess',
|
|
6888
|
+
{ action: _optionalChain([options, 'optionalAccess', _365 => _365.undo]) ? "undo_cancel" : "cancel" }
|
|
6861
6889
|
);
|
|
6862
6890
|
}
|
|
6863
6891
|
/**
|
|
@@ -6869,7 +6897,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6869
6897
|
*/
|
|
6870
6898
|
async listBillingInvoices(options) {
|
|
6871
6899
|
const params = new URLSearchParams();
|
|
6872
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6900
|
+
if (_optionalChain([options, 'optionalAccess', _366 => _366.limit]) !== void 0) {
|
|
6873
6901
|
params.set("limit", String(options.limit));
|
|
6874
6902
|
}
|
|
6875
6903
|
const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
|
|
@@ -6880,7 +6908,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6880
6908
|
/** List the reviewed target plans and whether new acquisition is enabled. */
|
|
6881
6909
|
async getTargetBillingPlans(options) {
|
|
6882
6910
|
return this.http.get(
|
|
6883
|
-
_optionalChain([options, 'optionalAccess',
|
|
6911
|
+
_optionalChain([options, 'optionalAccess', _367 => _367.promoCode]) ? `/api/v2/billing/plans?promo_code=${encodeURIComponent(options.promoCode)}` : "/api/v2/billing/plans"
|
|
6884
6912
|
);
|
|
6885
6913
|
}
|
|
6886
6914
|
/** Read the workspace's normalized target plan, payment, and balance state. */
|
|
@@ -6986,7 +7014,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6986
7014
|
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
6987
7015
|
async createTargetBillingPortalSession(options) {
|
|
6988
7016
|
const response = await this.http.post(
|
|
6989
|
-
_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",
|
|
6990
7018
|
{}
|
|
6991
7019
|
);
|
|
6992
7020
|
return response.data;
|
|
@@ -7036,8 +7064,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7036
7064
|
return this.http.request("/api/v2/monitors/audit", {
|
|
7037
7065
|
method: "POST",
|
|
7038
7066
|
body: {
|
|
7039
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7040
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7067
|
+
..._optionalChain([options, 'optionalAccess', _369 => _369.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
7068
|
+
..._optionalChain([options, 'optionalAccess', _370 => _370.cursor]) ? { cursor: options.cursor } : {}
|
|
7041
7069
|
},
|
|
7042
7070
|
maxRetries: 0
|
|
7043
7071
|
});
|
|
@@ -7047,8 +7075,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7047
7075
|
return this.http.request("/api/v2/monitors/repair", {
|
|
7048
7076
|
method: "POST",
|
|
7049
7077
|
body: {
|
|
7050
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7051
|
-
..._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 }
|
|
7052
7080
|
},
|
|
7053
7081
|
maxRetries: 0
|
|
7054
7082
|
});
|
|
@@ -7056,7 +7084,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7056
7084
|
/** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
|
|
7057
7085
|
async readMonitorsHealth(options) {
|
|
7058
7086
|
const params = new URLSearchParams();
|
|
7059
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7087
|
+
if (_optionalChain([options, 'optionalAccess', _373 => _373.fleetId])) params.set("fleet_id", options.fleetId);
|
|
7060
7088
|
const query = params.toString();
|
|
7061
7089
|
const suffix = query ? `?${query}` : "";
|
|
7062
7090
|
return this.http.request(
|
|
@@ -7129,7 +7157,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7129
7157
|
);
|
|
7130
7158
|
}
|
|
7131
7159
|
const params = new URLSearchParams();
|
|
7132
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7160
|
+
if (_optionalChain([options, 'optionalAccess', _374 => _374.cursor])) params.set("cursor", options.cursor);
|
|
7133
7161
|
const suffix = params.size > 0 ? `?${params}` : "";
|
|
7134
7162
|
return this.http.request(
|
|
7135
7163
|
`/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
|
|
@@ -7176,7 +7204,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7176
7204
|
* a second charge. The submission is never replayed automatically.
|
|
7177
7205
|
*/
|
|
7178
7206
|
async previewMonitor(definition, options) {
|
|
7179
|
-
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)}`))}`));
|
|
7180
7208
|
try {
|
|
7181
7209
|
const result = await this.http.request(
|
|
7182
7210
|
"/api/v2/monitors/preview",
|
|
@@ -7184,7 +7212,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7184
7212
|
method: "POST",
|
|
7185
7213
|
body: {
|
|
7186
7214
|
...definition,
|
|
7187
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7215
|
+
..._optionalChain([options, 'optionalAccess', _379 => _379.limit]) === void 0 ? {} : { limit: options.limit }
|
|
7188
7216
|
},
|
|
7189
7217
|
headers: { "Idempotency-Key": idempotencyKey },
|
|
7190
7218
|
maxRetries: 0,
|
|
@@ -7206,7 +7234,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7206
7234
|
* `client.monitors.deploy(...)`.
|
|
7207
7235
|
*/
|
|
7208
7236
|
async deployMonitor(definition, options) {
|
|
7209
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7237
|
+
if (_optionalChain([options, 'optionalAccess', _380 => _380.dryRun])) {
|
|
7210
7238
|
return this.http.request("/api/v2/monitors/check", {
|
|
7211
7239
|
method: "POST",
|
|
7212
7240
|
body: definition
|
|
@@ -7242,12 +7270,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7242
7270
|
/** List deployed monitors. Prefer `client.monitors.list(...)`. */
|
|
7243
7271
|
async listMonitors(options) {
|
|
7244
7272
|
const params = new URLSearchParams();
|
|
7245
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7246
|
-
else if (_optionalChain([options, 'optionalAccess',
|
|
7247
|
-
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)
|
|
7248
7276
|
params.set("limit", String(options.limit));
|
|
7249
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7250
|
-
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");
|
|
7251
7279
|
const query = params.toString();
|
|
7252
7280
|
const suffix = query ? `?${query}` : "";
|
|
7253
7281
|
return this.http.request(
|
|
@@ -7258,17 +7286,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7258
7286
|
/** The Monitors list. Prefer `client.monitors.ledger(...)`. */
|
|
7259
7287
|
async listMonitorLedger(options) {
|
|
7260
7288
|
const params = new URLSearchParams();
|
|
7261
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7262
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7263
|
-
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]), () => ( [])))
|
|
7264
7292
|
params.append("signal", signal);
|
|
7265
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7266
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7267
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7268
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7269
|
-
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)
|
|
7270
7298
|
params.set("limit", String(options.limit));
|
|
7271
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7299
|
+
if (_optionalChain([options, 'optionalAccess', _394 => _394.cursor])) params.set("cursor", options.cursor);
|
|
7272
7300
|
const query = params.toString();
|
|
7273
7301
|
const suffix = query ? `?${query}` : "";
|
|
7274
7302
|
return this.http.request(
|
|
@@ -7285,7 +7313,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7285
7313
|
}
|
|
7286
7314
|
/** A monitor's recent findings. Prefer `client.monitors.ledgerFindings(...)`. */
|
|
7287
7315
|
async listMonitorLedgerFindings(key, options) {
|
|
7288
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
7316
|
+
const suffix = _optionalChain([options, 'optionalAccess', _395 => _395.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
|
|
7289
7317
|
return this.http.request(
|
|
7290
7318
|
`/api/v2/monitors/ledger/${encodeURIComponent(key)}/findings${suffix}`,
|
|
7291
7319
|
{ method: "GET" }
|
|
@@ -7299,7 +7327,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7299
7327
|
);
|
|
7300
7328
|
}
|
|
7301
7329
|
async testMonitorWebhook(key, payload, options) {
|
|
7302
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7330
|
+
if (_optionalChain([options, 'optionalAccess', _396 => _396.dispatch]) === true || _optionalChain([options, 'optionalAccess', _397 => _397.validationOnly]) === false) {
|
|
7303
7331
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
7304
7332
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
7305
7333
|
void 0,
|
|
@@ -7354,7 +7382,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7354
7382
|
}
|
|
7355
7383
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
7356
7384
|
async deleteMonitor(key, options) {
|
|
7357
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7385
|
+
if (_optionalChain([options, 'optionalAccess', _398 => _398.localOnly]) === true) {
|
|
7358
7386
|
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
7359
7387
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
7360
7388
|
void 0,
|
|
@@ -7362,11 +7390,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7362
7390
|
);
|
|
7363
7391
|
}
|
|
7364
7392
|
const params = new URLSearchParams();
|
|
7365
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7393
|
+
if (_optionalChain([options, 'optionalAccess', _399 => _399.dryRun])) params.set("dry_run", "true");
|
|
7366
7394
|
const query = params.toString();
|
|
7367
7395
|
return this.http.request(
|
|
7368
7396
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
7369
|
-
_optionalChain([options, 'optionalAccess',
|
|
7397
|
+
_optionalChain([options, 'optionalAccess', _400 => _400.dryRun]) ? { method: "DELETE" } : {
|
|
7370
7398
|
method: "DELETE",
|
|
7371
7399
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
7372
7400
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -7379,10 +7407,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7379
7407
|
* Prefer `client.monitors.reactivate(...)`.
|
|
7380
7408
|
*/
|
|
7381
7409
|
async reactivateMonitor(key, options) {
|
|
7382
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
7410
|
+
const query = _optionalChain([options, 'optionalAccess', _401 => _401.dryRun]) ? "?dry_run=true" : "";
|
|
7383
7411
|
return this.http.request(
|
|
7384
7412
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
7385
|
-
_optionalChain([options, 'optionalAccess',
|
|
7413
|
+
_optionalChain([options, 'optionalAccess', _402 => _402.dryRun]) ? { method: "POST", body: {} } : {
|
|
7386
7414
|
method: "POST",
|
|
7387
7415
|
body: {},
|
|
7388
7416
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -7396,7 +7424,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7396
7424
|
// ——————————————————————————————————————————————————————————
|
|
7397
7425
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
7398
7426
|
monitorJobIdempotencyKey(operation) {
|
|
7399
|
-
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)}`));
|
|
7400
7428
|
const prefix = "monitor-job-";
|
|
7401
7429
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
7402
7430
|
const maxOperationLength = Math.max(
|
|
@@ -7407,7 +7435,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7407
7435
|
}
|
|
7408
7436
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
7409
7437
|
return {
|
|
7410
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
7438
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _406 => _406.trim, 'call', _407 => _407()]) || this.monitorJobIdempotencyKey(operation)
|
|
7411
7439
|
};
|
|
7412
7440
|
}
|
|
7413
7441
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -7418,7 +7446,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7418
7446
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
7419
7447
|
headers: this.monitorJobHeaders(
|
|
7420
7448
|
"batch-deploy",
|
|
7421
|
-
_optionalChain([options, 'optionalAccess',
|
|
7449
|
+
_optionalChain([options, 'optionalAccess', _408 => _408.idempotencyKey])
|
|
7422
7450
|
),
|
|
7423
7451
|
maxRetries: 0,
|
|
7424
7452
|
exactUrlOnly: true
|
|
@@ -7437,11 +7465,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7437
7465
|
version: 1,
|
|
7438
7466
|
kind: "batch",
|
|
7439
7467
|
monitors: definitions,
|
|
7440
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7468
|
+
..._optionalChain([options, 'optionalAccess', _409 => _409.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
7441
7469
|
},
|
|
7442
7470
|
headers: this.monitorJobHeaders(
|
|
7443
7471
|
`batch-sync-${batchId}`,
|
|
7444
|
-
_optionalChain([options, 'optionalAccess',
|
|
7472
|
+
_optionalChain([options, 'optionalAccess', _410 => _410.idempotencyKey])
|
|
7445
7473
|
),
|
|
7446
7474
|
maxRetries: 0,
|
|
7447
7475
|
exactUrlOnly: true
|
|
@@ -7456,7 +7484,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7456
7484
|
body: {},
|
|
7457
7485
|
headers: this.monitorJobHeaders(
|
|
7458
7486
|
`batch-start-${batchId}`,
|
|
7459
|
-
_optionalChain([options, 'optionalAccess',
|
|
7487
|
+
_optionalChain([options, 'optionalAccess', _411 => _411.idempotencyKey])
|
|
7460
7488
|
),
|
|
7461
7489
|
maxRetries: 0,
|
|
7462
7490
|
exactUrlOnly: true
|
|
@@ -7471,7 +7499,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7471
7499
|
body: {},
|
|
7472
7500
|
headers: this.monitorJobHeaders(
|
|
7473
7501
|
`batch-stop-${batchId}`,
|
|
7474
|
-
_optionalChain([options, 'optionalAccess',
|
|
7502
|
+
_optionalChain([options, 'optionalAccess', _412 => _412.idempotencyKey])
|
|
7475
7503
|
),
|
|
7476
7504
|
maxRetries: 0,
|
|
7477
7505
|
exactUrlOnly: true
|
|
@@ -7492,7 +7520,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7492
7520
|
body: {},
|
|
7493
7521
|
headers: this.monitorJobHeaders(
|
|
7494
7522
|
`${action}-${monitorKey}`,
|
|
7495
|
-
_optionalChain([options, 'optionalAccess',
|
|
7523
|
+
_optionalChain([options, 'optionalAccess', _413 => _413.idempotencyKey])
|
|
7496
7524
|
),
|
|
7497
7525
|
maxRetries: 0,
|
|
7498
7526
|
exactUrlOnly: true
|
|
@@ -7505,7 +7533,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7505
7533
|
body: definition,
|
|
7506
7534
|
headers: this.monitorJobHeaders(
|
|
7507
7535
|
`sync-${definition.key}`,
|
|
7508
|
-
_optionalChain([options, 'optionalAccess',
|
|
7536
|
+
_optionalChain([options, 'optionalAccess', _414 => _414.idempotencyKey])
|
|
7509
7537
|
),
|
|
7510
7538
|
maxRetries: 0,
|
|
7511
7539
|
exactUrlOnly: true
|
|
@@ -7518,7 +7546,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7518
7546
|
);
|
|
7519
7547
|
}
|
|
7520
7548
|
async getMonitorJobLogs(jobId, options) {
|
|
7521
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
7549
|
+
const query = _optionalChain([options, 'optionalAccess', _415 => _415.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
7522
7550
|
return this.http.request(
|
|
7523
7551
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
7524
7552
|
{ method: "GET" }
|
|
@@ -7531,15 +7559,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7531
7559
|
);
|
|
7532
7560
|
}
|
|
7533
7561
|
async waitForMonitorJob(jobId, options) {
|
|
7534
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7535
|
-
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)));
|
|
7536
7564
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
7537
7565
|
const startedAt = Date.now();
|
|
7538
7566
|
let latest = await this.getMonitorJob(jobId);
|
|
7539
7567
|
while (true) {
|
|
7540
|
-
_optionalChain([options, 'optionalAccess',
|
|
7568
|
+
_optionalChain([options, 'optionalAccess', _418 => _418.onProgress, 'optionalCall', _419 => _419(latest)]);
|
|
7541
7569
|
const job = latest.job;
|
|
7542
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
7570
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _420 => _420.state]) === "string" ? job.state : void 0;
|
|
7543
7571
|
if (state && terminal.has(state)) return latest;
|
|
7544
7572
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
7545
7573
|
await sleep(pollIntervalMs);
|
|
@@ -7550,12 +7578,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7550
7578
|
// Monitor Fleets
|
|
7551
7579
|
// ——————————————————————————————————————————————————————————
|
|
7552
7580
|
monitorFleetIdempotencyKey(operation) {
|
|
7553
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
7581
|
+
const uuid = _optionalChain([globalThis, 'access', _421 => _421.crypto, 'optionalAccess', _422 => _422.randomUUID, 'optionalCall', _423 => _423()]);
|
|
7554
7582
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
7555
7583
|
}
|
|
7556
7584
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
7557
7585
|
return {
|
|
7558
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
7586
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _424 => _424.trim, 'call', _425 => _425()]) || this.monitorFleetIdempotencyKey(operation)
|
|
7559
7587
|
};
|
|
7560
7588
|
}
|
|
7561
7589
|
/**
|
|
@@ -7589,14 +7617,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7589
7617
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
7590
7618
|
const body = {
|
|
7591
7619
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
7592
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7593
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7594
|
-
..._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 } : {}
|
|
7595
7623
|
};
|
|
7596
7624
|
const headers = {
|
|
7597
|
-
...this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
7625
|
+
...this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _429 => _429.idempotencyKey])),
|
|
7598
7626
|
"X-Deepline-Fleet-Commit-Budget-Ms": String(
|
|
7599
|
-
_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7627
|
+
_nullishCoalesce(_optionalChain([options, 'optionalAccess', _430 => _430.commitBudgetMs]), () => ( _DeeplineClient.MONITOR_FLEET_COMMIT_BUDGET_MS))
|
|
7600
7628
|
)
|
|
7601
7629
|
};
|
|
7602
7630
|
let remainingBefore = Number.POSITIVE_INFINITY;
|
|
@@ -7627,7 +7655,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7627
7655
|
{ response: result }
|
|
7628
7656
|
);
|
|
7629
7657
|
}
|
|
7630
|
-
_optionalChain([options, 'optionalAccess',
|
|
7658
|
+
_optionalChain([options, 'optionalAccess', _431 => _431.onCommitProgress, 'optionalCall', _432 => _432({
|
|
7631
7659
|
fleetId,
|
|
7632
7660
|
generation: Number(result.generation),
|
|
7633
7661
|
membersCommitted: Number(staged.members_committed),
|
|
@@ -7644,10 +7672,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7644
7672
|
/** The Fleets list. Prefer `client.monitors.fleets.overview()`. */
|
|
7645
7673
|
async listMonitorFleetOverviews(options) {
|
|
7646
7674
|
const params = new URLSearchParams({ view: "overview" });
|
|
7647
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7648
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7649
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7650
|
-
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);
|
|
7651
7679
|
return this.http.request(
|
|
7652
7680
|
`/api/v2/monitors/fleets?${params.toString()}`,
|
|
7653
7681
|
{ method: "GET" }
|
|
@@ -7656,7 +7684,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7656
7684
|
/** One fleet's overview. Prefer `client.monitors.fleets.overview(fleetId)`. */
|
|
7657
7685
|
async getMonitorFleetOverview(fleetId, options) {
|
|
7658
7686
|
const params = new URLSearchParams({ view: "overview" });
|
|
7659
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7687
|
+
if (_optionalChain([options, 'optionalAccess', _437 => _437.window])) params.set("window", options.window);
|
|
7660
7688
|
return this.http.request(
|
|
7661
7689
|
`${this.monitorFleetPath(fleetId)}?${params.toString()}`,
|
|
7662
7690
|
{ method: "GET" }
|
|
@@ -7665,10 +7693,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7665
7693
|
/** A fleet's problem members. Prefer `client.monitors.fleets.issues(...)`. */
|
|
7666
7694
|
async listMonitorFleetIssues(fleetId, options) {
|
|
7667
7695
|
const params = new URLSearchParams();
|
|
7668
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7669
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7670
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7671
|
-
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)
|
|
7672
7700
|
params.set("limit", String(options.limit));
|
|
7673
7701
|
const query = params.toString();
|
|
7674
7702
|
return this.http.request(
|
|
@@ -7678,8 +7706,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7678
7706
|
}
|
|
7679
7707
|
async getMonitorFleet(fleetId, options) {
|
|
7680
7708
|
const params = new URLSearchParams();
|
|
7681
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7682
|
-
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)
|
|
7683
7711
|
params.set("limit", String(options.limit));
|
|
7684
7712
|
const query = params.toString();
|
|
7685
7713
|
return this.http.request(
|
|
@@ -7692,11 +7720,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7692
7720
|
this.monitorFleetPath(fleetId),
|
|
7693
7721
|
{
|
|
7694
7722
|
method: "DELETE",
|
|
7695
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
7723
|
+
body: _optionalChain([options, 'optionalAccess', _444 => _444.dryRun]) ? { dry_run: true } : {},
|
|
7696
7724
|
timeout: _DeeplineClient.MONITOR_FLEET_WRITE_TIMEOUT_MS,
|
|
7697
7725
|
headers: this.monitorFleetHeaders(
|
|
7698
7726
|
"deactivate",
|
|
7699
|
-
_optionalChain([options, 'optionalAccess',
|
|
7727
|
+
_optionalChain([options, 'optionalAccess', _445 => _445.idempotencyKey])
|
|
7700
7728
|
),
|
|
7701
7729
|
maxRetries: 0,
|
|
7702
7730
|
exactUrlOnly: true
|
|
@@ -7712,7 +7740,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7712
7740
|
timeout: _DeeplineClient.MONITOR_FLEET_WRITE_TIMEOUT_MS,
|
|
7713
7741
|
headers: this.monitorFleetHeaders(
|
|
7714
7742
|
"reactivate",
|
|
7715
|
-
_optionalChain([options, 'optionalAccess',
|
|
7743
|
+
_optionalChain([options, 'optionalAccess', _446 => _446.idempotencyKey])
|
|
7716
7744
|
),
|
|
7717
7745
|
maxRetries: 0,
|
|
7718
7746
|
exactUrlOnly: true
|
|
@@ -7729,9 +7757,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7729
7757
|
* identical to "the request failed".
|
|
7730
7758
|
*/
|
|
7731
7759
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
7732
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7733
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7734
|
-
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([
|
|
7735
7763
|
"converged",
|
|
7736
7764
|
"degraded",
|
|
7737
7765
|
"deactivated",
|
|
@@ -7740,7 +7768,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7740
7768
|
const startedAt = Date.now();
|
|
7741
7769
|
let latest = await this.getMonitorFleet(fleetId);
|
|
7742
7770
|
while (true) {
|
|
7743
|
-
_optionalChain([options, 'optionalAccess',
|
|
7771
|
+
_optionalChain([options, 'optionalAccess', _450 => _450.onProgress, 'optionalCall', _451 => _451(latest)]);
|
|
7744
7772
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
7745
7773
|
if (status && terminal.has(status)) return latest;
|
|
7746
7774
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|