deepline 0.3.314 → 0.3.315
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.ts +12 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +28 -0
- package/dist/bundling-sources/shared_libs/plays/docflow-binding-owner.ts +61 -11
- package/dist/cli/{auth-GWF55S3N.mjs → auth-OVWOO5NP.mjs} +4 -4
- package/dist/cli/auth-P2TTZU36.js +31 -0
- package/dist/cli/{billing-2YU6E2IF.js → billing-SRZL7UOH.js} +70 -70
- package/dist/cli/{billing-WWOJN7GV.mjs → billing-W3OXKWNE.mjs} +4 -4
- package/dist/cli/{chunk-VFRZG4OW.js → chunk-6BJACIVK.js} +1 -1
- package/dist/cli/{chunk-CPN2N6EZ.mjs → chunk-AO4IWPP7.mjs} +32 -8
- package/dist/cli/{chunk-25SPKKF2.mjs → chunk-AZWQJAQF.mjs} +1 -1
- package/dist/cli/{chunk-3CKNUJVZ.mjs → chunk-B473QUQU.mjs} +4 -4
- package/dist/cli/{chunk-ENQZV7NR.js → chunk-C5WSTXUB.js} +246 -222
- package/dist/cli/{chunk-YVMJTXEG.js → chunk-FGAK6FET.js} +26 -26
- package/dist/cli/{chunk-DR3S76BG.mjs → chunk-FTJQO757.mjs} +1 -1
- package/dist/cli/{chunk-JZZT4GAY.mjs → chunk-GK67FYMS.mjs} +5 -5
- package/dist/cli/{chunk-QB5MAFCU.mjs → chunk-HNKHMHJ7.mjs} +1 -1
- package/dist/cli/{chunk-IZTIBG7A.mjs → chunk-IGE7EJJY.mjs} +11 -1
- package/dist/cli/{chunk-3K6QD7Z3.mjs → chunk-JF4O5OMH.mjs} +1 -1
- package/dist/cli/{chunk-WTO3ITBC.mjs → chunk-L5TSFCJ6.mjs} +2 -2
- package/dist/cli/{chunk-JNUHGWB2.js → chunk-LOWURQMF.js} +50 -50
- package/dist/cli/{chunk-WDPRE6DU.js → chunk-OJP4FCCX.js} +48 -48
- package/dist/cli/{chunk-HTXZLCSP.mjs → chunk-OUIIYFG3.mjs} +2 -2
- package/dist/cli/{chunk-GSRDZD7R.js → chunk-OYJCNCUW.js} +2 -2
- package/dist/cli/{chunk-VBRO5QCI.js → chunk-PPONZ6IE.js} +15 -15
- package/dist/cli/{chunk-3A4LJUX6.mjs → chunk-R3IFZDJL.mjs} +2 -2
- package/dist/cli/{chunk-NG4WDOGN.js → chunk-SNFSO2AN.js} +6 -6
- package/dist/cli/{chunk-2Q2IKUL5.mjs → chunk-TQ3F77AC.mjs} +3 -3
- package/dist/cli/{chunk-VWW6VHQX.js → chunk-TQK662WG.js} +60 -60
- package/dist/cli/{chunk-OUHCJL5B.mjs → chunk-TZ5KUDPP.mjs} +1 -1
- package/dist/cli/{chunk-B5LUKLKH.js → chunk-URVZGYGG.js} +4 -4
- package/dist/cli/{chunk-MLEJ2FYH.js → chunk-VYK23G2C.js} +119 -109
- package/dist/cli/{chunk-ODEWOXWW.js → chunk-Y42UERUY.js} +6 -6
- package/dist/cli/{chunk-UZTTPEG2.js → chunk-YL42TF53.js} +6 -6
- package/dist/cli/client-CXFPFCIG.js +20 -0
- package/dist/cli/{client-EYGNDORT.mjs → client-WQ3J5BSH.mjs} +3 -3
- package/dist/cli/{csv-NZCN7SVV.mjs → csv-36ARCBNQ.mjs} +3 -3
- package/dist/cli/{csv-YOW5JMOH.js → csv-CENMEWDH.js} +12 -12
- package/dist/cli/{db-6BIYLZ6F.js → db-6DQZG6NB.js} +20 -20
- package/dist/cli/{db-HALJV3KY.mjs → db-JU7XLKQM.mjs} +4 -4
- package/dist/cli/{describe-KY2ZYGBR.mjs → describe-34ALEEFO.mjs} +8 -8
- package/dist/cli/{describe-WA6R2JSH.js → describe-VUD4AFBY.js} +15 -15
- package/dist/cli/{executions-NMCTN7XM.js → executions-H2UXS6FP.js} +6 -6
- package/dist/cli/{executions-CBOAN6KI.mjs → executions-H66BMN6N.mjs} +4 -4
- package/dist/cli/{feedback-FOMPE3DJ.mjs → feedback-Q7LXXLSH.mjs} +3 -3
- package/dist/cli/{feedback-ZZFDSCWS.js → feedback-YSYFQSAB.js} +6 -6
- package/dist/cli/git-SYFCYIFP.js +23 -0
- package/dist/cli/{git-YQR2NBCO.mjs → git-XV43NSWN.mjs} +4 -4
- package/dist/cli/index.js +74 -74
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-XH2TFFI6.js → legacy-noops-RGDW6SCA.js} +7 -7
- package/dist/cli/{legacy-noops-KMU6P3K4.mjs → legacy-noops-Z2DTZQN3.mjs} +4 -4
- package/dist/cli/{monitors-5M3BZ5OR.js → monitors-I75KZ2BP.js} +85 -85
- package/dist/cli/{monitors-2ONK5L3I.mjs → monitors-OFQ56O4S.mjs} +4 -4
- package/dist/cli/{org-6MKULUZI.js → org-75AH6RIB.js} +60 -60
- package/dist/cli/{org-LR5BMCGL.mjs → org-ZYMCU6XO.mjs} +4 -4
- package/dist/cli/{play-4NOSD7DW.mjs → play-BKXM76DV.mjs} +7 -7
- package/dist/cli/play-OKXUWPMO.js +152 -0
- package/dist/cli/{providers-UBGIKGCA.mjs → providers-GWG2WFIY.mjs} +4 -4
- package/dist/cli/{providers-UFJD3VKF.js → providers-Z77MM7ID.js} +7 -7
- package/dist/cli/{quickstart-KDUKQRUH.mjs → quickstart-BGVIV374.mjs} +3 -3
- package/dist/cli/{quickstart-KQZHZE6C.js → quickstart-I4RECIQC.js} +5 -5
- package/dist/cli/search-3KISUDDT.js +26 -0
- package/dist/cli/{search-4BVOOS5Q.mjs → search-TIKBP3RE.mjs} +5 -5
- package/dist/cli/{secrets-TVXZ3WJ3.js → secrets-SNGRI4KS.js} +13 -13
- package/dist/cli/{secrets-YGV23N3N.mjs → secrets-YCHKLWKC.mjs} +4 -4
- package/dist/cli/{sessions-G7ROUW35.mjs → sessions-IRDG6ZRX.mjs} +4 -4
- package/dist/cli/{sessions-RWIQWDFD.js → sessions-WXLADGDX.js} +5 -5
- package/dist/cli/{settings-TG3E2NR7.js → settings-72J4BVF6.js} +74 -74
- package/dist/cli/{settings-QZEVGCXE.mjs → settings-KZALJDXW.mjs} +7 -7
- package/dist/cli/{setup-HUXINKOH.mjs → setup-4KCA7ESV.mjs} +6 -6
- package/dist/cli/{setup-3KDUNEEE.js → setup-FFB3KLFD.js} +41 -41
- package/dist/cli/{skills-LHU3DB7J.mjs → skills-MQZPYUQ3.mjs} +4 -4
- package/dist/cli/skills-XGOK4GRW.js +28 -0
- package/dist/cli/tools-LEAJ7EPW.js +38 -0
- package/dist/cli/{tools-J5WQ33BB.mjs → tools-M3WKRZ5T.mjs} +6 -6
- package/dist/cli/{update-T6744RM7.mjs → update-QJMNYGNF.mjs} +6 -6
- package/dist/cli/update-ZN6LDUHS.js +28 -0
- package/dist/cli/{workflow-YF5SQJLG.js → workflow-35UUOZ5E.js} +15 -15
- package/dist/cli/{workflow-CG2B65HD.mjs → workflow-6T2EUFCN.mjs} +5 -5
- package/dist/{client-CtVdLZux.d.mts → client-CvpZsBqt.d.mts} +12 -0
- package/dist/{client-OBwghxPC.d.ts → client-Dh_4Ph1R.d.ts} +12 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +76 -76
- 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/package.json +1 -1
- package/dist/cli/auth-QX2L4LPM.js +0 -31
- package/dist/cli/client-Z4VFNTUB.js +0 -20
- package/dist/cli/git-AC2ATBDK.js +0 -23
- package/dist/cli/play-U3CZ4F2W.js +0 -152
- package/dist/cli/search-Y7OTFRCI.js +0 -26
- package/dist/cli/skills-CO5YUWBK.js +0 -28
- package/dist/cli/tools-MWPT5X47.js +0 -38
- package/dist/cli/update-VVIJW7ZJ.js +0 -28
|
@@ -14,7 +14,7 @@ var _chunkLA46MMTLjs = require('./chunk-LA46MMTL.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkURVZGYGGjs = require('./chunk-URVZGYGG.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -2753,8 +2753,8 @@ function runtimeSelectionHeaders(runtime) {
|
|
|
2753
2753
|
}
|
|
2754
2754
|
const receivers = _optionalChain([process, 'access', _105 => _105.env, 'access', _106 => _106.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]);
|
|
2755
2755
|
return {
|
|
2756
|
-
[
|
|
2757
|
-
...receivers ? { [
|
|
2756
|
+
[_chunkURVZGYGGjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
2757
|
+
...receivers ? { [_chunkURVZGYGGjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
2758
2758
|
};
|
|
2759
2759
|
}
|
|
2760
2760
|
function isolatedCiRuntimeEventReadHeaders() {
|
|
@@ -2770,7 +2770,7 @@ function isolatedCiRuntimeEventReadHeaders() {
|
|
|
2770
2770
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
2771
2771
|
);
|
|
2772
2772
|
}
|
|
2773
|
-
return { [
|
|
2773
|
+
return { [_chunkURVZGYGGjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
2774
2774
|
}
|
|
2775
2775
|
function normalizeTestPolicyOverrides(value, source) {
|
|
2776
2776
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -3071,8 +3071,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3071
3071
|
* @throws {@link ConfigError} if no API key can be resolved from any source.
|
|
3072
3072
|
*/
|
|
3073
3073
|
constructor(options) {
|
|
3074
|
-
this.config =
|
|
3075
|
-
this.http = new (0,
|
|
3074
|
+
this.config = _chunkURVZGYGGjs.resolveConfig.call(void 0, options);
|
|
3075
|
+
this.http = new (0, _chunkURVZGYGGjs.HttpClient)(this.config);
|
|
3076
3076
|
this.toolCalls = new ToolCalls(
|
|
3077
3077
|
this.http,
|
|
3078
3078
|
this.config.timeout,
|
|
@@ -4322,6 +4322,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4322
4322
|
if (status) {
|
|
4323
4323
|
params.set("status", status);
|
|
4324
4324
|
}
|
|
4325
|
+
const node = _optionalChain([options, 'access', _249 => _249.node, 'optionalAccess', _250 => _250.trim, 'call', _251 => _251()]);
|
|
4326
|
+
if (node) {
|
|
4327
|
+
if (!playName)
|
|
4328
|
+
throw new Error("runs.list options.node requires options.play.");
|
|
4329
|
+
if (node.length > 300)
|
|
4330
|
+
throw new Error(
|
|
4331
|
+
"runs.list options.node must be at most 300 characters."
|
|
4332
|
+
);
|
|
4333
|
+
params.set("node", node);
|
|
4334
|
+
}
|
|
4325
4335
|
if (typeof options.limit === "number" && Number.isFinite(options.limit)) {
|
|
4326
4336
|
params.set("limit", String(Math.max(1, Math.floor(options.limit))));
|
|
4327
4337
|
}
|
|
@@ -4386,8 +4396,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4386
4396
|
* different key intentionally starts another rerun.
|
|
4387
4397
|
*/
|
|
4388
4398
|
async rerun(runId, options) {
|
|
4389
|
-
const idempotencyKey = _optionalChain([options, 'optionalAccess',
|
|
4390
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4399
|
+
const idempotencyKey = _optionalChain([options, 'optionalAccess', _252 => _252.idempotencyKey, 'optionalAccess', _253 => _253.trim, 'call', _254 => _254()]);
|
|
4400
|
+
if (_optionalChain([options, 'optionalAccess', _255 => _255.idempotencyKey]) !== void 0 && !idempotencyKey) {
|
|
4391
4401
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
4392
4402
|
"runs.rerun idempotencyKey must not be empty.",
|
|
4393
4403
|
void 0,
|
|
@@ -4396,7 +4406,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4396
4406
|
}
|
|
4397
4407
|
return this.http.post(
|
|
4398
4408
|
`/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
|
|
4399
|
-
_optionalChain([options, 'optionalAccess',
|
|
4409
|
+
_optionalChain([options, 'optionalAccess', _256 => _256.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
|
|
4400
4410
|
{ "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
|
|
4401
4411
|
);
|
|
4402
4412
|
}
|
|
@@ -4410,21 +4420,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4410
4420
|
* ```
|
|
4411
4421
|
*/
|
|
4412
4422
|
async getRunLogs(runId, options) {
|
|
4413
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4423
|
+
if (_optionalChain([options, 'optionalAccess', _257 => _257.all]) === true && options.failed === true) {
|
|
4414
4424
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
4415
4425
|
"runs.logs cannot combine all and failed views.",
|
|
4416
4426
|
void 0,
|
|
4417
4427
|
"INVALID_RUN_LOG_VIEW"
|
|
4418
4428
|
);
|
|
4419
4429
|
}
|
|
4420
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4430
|
+
if (_optionalChain([options, 'optionalAccess', _258 => _258.cursor]) !== void 0 && options.failed === true) {
|
|
4421
4431
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
4422
4432
|
"runs.logs cannot combine failed with cursor.",
|
|
4423
4433
|
void 0,
|
|
4424
4434
|
"INVALID_RUN_LOG_VIEW"
|
|
4425
4435
|
);
|
|
4426
4436
|
}
|
|
4427
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4437
|
+
if (_optionalChain([options, 'optionalAccess', _259 => _259.failed]) === true) {
|
|
4428
4438
|
const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
|
|
4429
4439
|
const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
|
|
4430
4440
|
const page = await this.http.get(
|
|
@@ -4449,18 +4459,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4449
4459
|
...page.logsTruncated ? { logsTruncated: true } : {}
|
|
4450
4460
|
};
|
|
4451
4461
|
}
|
|
4452
|
-
const beforeSequence = _optionalChain([options, 'optionalAccess',
|
|
4453
|
-
const limit = _optionalChain([options, 'optionalAccess',
|
|
4462
|
+
const beforeSequence = _optionalChain([options, 'optionalAccess', _260 => _260.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
|
|
4463
|
+
const limit = _optionalChain([options, 'optionalAccess', _261 => _261.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _262 => _262.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
|
|
4454
4464
|
const fetchPage = (afterSeq2, pageLimit) => this.http.get(
|
|
4455
4465
|
`/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
|
|
4456
4466
|
{ retryApiErrors: true }
|
|
4457
4467
|
);
|
|
4458
4468
|
const probe = await fetchPage(0, 1);
|
|
4459
4469
|
const lastStoredSeq = probe.lastStoredSeq;
|
|
4460
|
-
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access',
|
|
4470
|
+
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _263 => _263.entries, 'access', _264 => _264[0], 'optionalAccess', _265 => _265.seq]), () => ( null));
|
|
4461
4471
|
const upperSeq = beforeSequence === null ? Number.POSITIVE_INFINITY : Math.min(beforeSequence - 1, lastStoredSeq);
|
|
4462
4472
|
const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
|
|
4463
|
-
let afterSeq = _optionalChain([options, 'optionalAccess',
|
|
4473
|
+
let afterSeq = _optionalChain([options, 'optionalAccess', _266 => _266.all]) ? 0 : Math.max(0, windowEndSeq - limit);
|
|
4464
4474
|
const entries = [];
|
|
4465
4475
|
while (entries.length < limit && afterSeq < upperSeq) {
|
|
4466
4476
|
const page = await fetchPage(
|
|
@@ -4494,7 +4504,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4494
4504
|
hasMore: olderLinesExist,
|
|
4495
4505
|
nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
|
|
4496
4506
|
entries: entries.map((entry) => entry.line),
|
|
4497
|
-
view: _optionalChain([options, 'optionalAccess',
|
|
4507
|
+
view: _optionalChain([options, 'optionalAccess', _267 => _267.all]) ? "all" : "tail",
|
|
4498
4508
|
...probe.logsTruncated ? { logsTruncated: true } : {}
|
|
4499
4509
|
};
|
|
4500
4510
|
}
|
|
@@ -4655,7 +4665,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4655
4665
|
limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
|
|
4656
4666
|
offset: String(_nullishCoalesce(input.offset, () => ( 0)))
|
|
4657
4667
|
});
|
|
4658
|
-
if (_optionalChain([input, 'access',
|
|
4668
|
+
if (_optionalChain([input, 'access', _268 => _268.runId, 'optionalAccess', _269 => _269.trim, 'call', _270 => _270()])) {
|
|
4659
4669
|
params.set("runId", input.runId.trim());
|
|
4660
4670
|
}
|
|
4661
4671
|
if (input.rowMode === "all" || input.rowMode === "live") {
|
|
@@ -4665,9 +4675,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4665
4675
|
`/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
|
|
4666
4676
|
{ signal: input.signal }
|
|
4667
4677
|
);
|
|
4668
|
-
const requestedRunId = _optionalChain([input, 'access',
|
|
4678
|
+
const requestedRunId = _optionalChain([input, 'access', _271 => _271.runId, 'optionalAccess', _272 => _272.trim, 'call', _273 => _273()]) || "";
|
|
4669
4679
|
if (requestedRunId) {
|
|
4670
|
-
const confirmedRunId = _optionalChain([result, 'access',
|
|
4680
|
+
const confirmedRunId = _optionalChain([result, 'access', _274 => _274.scope, 'optionalAccess', _275 => _275.kind]) === "run" ? result.scope.runId.trim() : "";
|
|
4671
4681
|
const foreignRowRunIds = [
|
|
4672
4682
|
...new Set(
|
|
4673
4683
|
result.rows.map(
|
|
@@ -4675,7 +4685,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4675
4685
|
).filter((runId) => runId && runId !== requestedRunId)
|
|
4676
4686
|
)
|
|
4677
4687
|
];
|
|
4678
|
-
if (_optionalChain([result, 'access',
|
|
4688
|
+
if (_optionalChain([result, 'access', _276 => _276.scope, 'optionalAccess', _277 => _277.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
|
|
4679
4689
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
4680
4690
|
`Run-scoped dataset export was not confirmed for ${requestedRunId}; no rows were returned to the caller. Update Deepline, then retry the same export command. Do not rerun the play.`,
|
|
4681
4691
|
void 0,
|
|
@@ -4704,7 +4714,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4704
4714
|
async stopRun(runId, options) {
|
|
4705
4715
|
return this.http.post(
|
|
4706
4716
|
`/api/v2/runs/${encodeURIComponent(runId)}/stop`,
|
|
4707
|
-
_optionalChain([options, 'optionalAccess',
|
|
4717
|
+
_optionalChain([options, 'optionalAccess', _278 => _278.reason]) ? { reason: options.reason } : {}
|
|
4708
4718
|
);
|
|
4709
4719
|
}
|
|
4710
4720
|
/**
|
|
@@ -4722,11 +4732,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4722
4732
|
* need to clear the workspace run-slot state without knowing each run id.
|
|
4723
4733
|
*/
|
|
4724
4734
|
async stopAllRuns(options) {
|
|
4725
|
-
const dryRun = _optionalChain([options, 'optionalAccess',
|
|
4735
|
+
const dryRun = _optionalChain([options, 'optionalAccess', _279 => _279.dryRun]) === true;
|
|
4726
4736
|
const result = await this.http.post(
|
|
4727
4737
|
"/api/v2/runs/stop-all",
|
|
4728
4738
|
{
|
|
4729
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4739
|
+
..._optionalChain([options, 'optionalAccess', _280 => _280.reason]) ? { reason: options.reason } : {},
|
|
4730
4740
|
...dryRun ? { dryRun: true } : {}
|
|
4731
4741
|
}
|
|
4732
4742
|
);
|
|
@@ -4747,7 +4757,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4747
4757
|
* `origin: "owned"` for org-owned plays.
|
|
4748
4758
|
*/
|
|
4749
4759
|
async listPlays(options) {
|
|
4750
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
4760
|
+
if (!_optionalChain([options, 'optionalAccess', _281 => _281.grep, 'optionalAccess', _282 => _282.trim, 'call', _283 => _283()])) {
|
|
4751
4761
|
return (await this.requestPlaysPage(options, false)).plays;
|
|
4752
4762
|
}
|
|
4753
4763
|
const plays = [];
|
|
@@ -4769,45 +4779,45 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4769
4779
|
}
|
|
4770
4780
|
async requestPlaysPage(options, paginateInventory = true) {
|
|
4771
4781
|
const params = new URLSearchParams();
|
|
4772
|
-
if (paginateInventory && !_optionalChain([options, 'optionalAccess',
|
|
4782
|
+
if (paginateInventory && !_optionalChain([options, 'optionalAccess', _284 => _284.grep, 'optionalAccess', _285 => _285.trim, 'call', _286 => _286()]))
|
|
4773
4783
|
params.set("inventory_paginated", "1");
|
|
4774
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4775
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4784
|
+
if (_optionalChain([options, 'optionalAccess', _287 => _287.origin])) params.set("origin", options.origin);
|
|
4785
|
+
if (_optionalChain([options, 'optionalAccess', _288 => _288.categories])) {
|
|
4776
4786
|
params.set(
|
|
4777
4787
|
"categories",
|
|
4778
4788
|
Array.isArray(options.categories) ? options.categories.join(",") : options.categories
|
|
4779
4789
|
);
|
|
4780
4790
|
}
|
|
4781
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4791
|
+
if (_optionalChain([options, 'optionalAccess', _289 => _289.categories]) || _optionalChain([options, 'optionalAccess', _290 => _290.includeToolCategories])) {
|
|
4782
4792
|
params.set("include_tool_categories", "1");
|
|
4783
4793
|
}
|
|
4784
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4794
|
+
if (_optionalChain([options, 'optionalAccess', _291 => _291.tags])) {
|
|
4785
4795
|
params.set(
|
|
4786
4796
|
"tags",
|
|
4787
4797
|
Array.isArray(options.tags) ? options.tags.join(",") : options.tags
|
|
4788
4798
|
);
|
|
4789
4799
|
}
|
|
4790
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4791
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4800
|
+
if (_optionalChain([options, 'optionalAccess', _292 => _292.includeArchived])) params.set("include_archived", "1");
|
|
4801
|
+
if (_optionalChain([options, 'optionalAccess', _293 => _293.includeCostEstimates])) {
|
|
4792
4802
|
params.set("include_cost_estimates", "1");
|
|
4793
4803
|
}
|
|
4794
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4804
|
+
if (_optionalChain([options, 'optionalAccess', _294 => _294.grep, 'optionalAccess', _295 => _295.trim, 'call', _296 => _296()])) {
|
|
4795
4805
|
params.set("grep", options.grep.trim());
|
|
4796
4806
|
params.set("limit", "60");
|
|
4797
4807
|
}
|
|
4798
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4808
|
+
if (_optionalChain([options, 'optionalAccess', _297 => _297.limit]) !== void 0) {
|
|
4799
4809
|
if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
|
|
4800
4810
|
throw new Error("Play page limit must be a positive integer");
|
|
4801
4811
|
}
|
|
4802
4812
|
params.set("limit", String(options.limit));
|
|
4803
4813
|
}
|
|
4804
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4814
|
+
if (_optionalChain([options, 'optionalAccess', _298 => _298.cursor])) params.set("cursor", options.cursor);
|
|
4805
4815
|
const suffix = params.size ? `?${params.toString()}` : "";
|
|
4806
4816
|
const response = await this.http.get(`/api/v2/plays${suffix}`);
|
|
4807
4817
|
return {
|
|
4808
4818
|
plays: _nullishCoalesce(response.plays, () => ( [])),
|
|
4809
|
-
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access',
|
|
4810
|
-
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access',
|
|
4819
|
+
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _299 => _299.pagination, 'optionalAccess', _300 => _300.cursor]), () => ( response.cursor)), () => ( null)),
|
|
4820
|
+
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _301 => _301.pagination, 'optionalAccess', _302 => _302.hasMore]), () => ( response.hasMore)))
|
|
4811
4821
|
};
|
|
4812
4822
|
}
|
|
4813
4823
|
/** Read definition-level settings, independently of code revisions. */
|
|
@@ -4857,8 +4867,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4857
4867
|
return this.http.post("/api/v2/integrations/connect", {
|
|
4858
4868
|
provider: "slack",
|
|
4859
4869
|
scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
|
|
4860
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4861
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4870
|
+
..._optionalChain([options, 'optionalAccess', _303 => _303.successUrl]) ? { success_url: options.successUrl } : {},
|
|
4871
|
+
..._optionalChain([options, 'optionalAccess', _304 => _304.failureUrl]) ? { failure_url: options.failureUrl } : {}
|
|
4862
4872
|
});
|
|
4863
4873
|
}
|
|
4864
4874
|
/** List Slack channels visible to the connected Deepline Slack app. */
|
|
@@ -4933,7 +4943,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4933
4943
|
}
|
|
4934
4944
|
const targets = input.targets.map(parseNotificationGroupTarget);
|
|
4935
4945
|
const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
|
|
4936
|
-
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access',
|
|
4946
|
+
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _305 => _305[0], 'optionalAccess', _306 => _306.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
|
|
4937
4947
|
if (legacyEvents.length > 0 && !legacyTarget) {
|
|
4938
4948
|
throw new Error(
|
|
4939
4949
|
"--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
|
|
@@ -4969,7 +4979,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4969
4979
|
const existingGroup = current.configuration.groups.find(
|
|
4970
4980
|
(candidate) => candidate.name.toLowerCase() === name.toLowerCase()
|
|
4971
4981
|
);
|
|
4972
|
-
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess',
|
|
4982
|
+
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _307 => _307.groupKey]), () => ( notificationObjectKey("group")));
|
|
4973
4983
|
const group = _nullishCoalesce(existingGroup, () => ( {
|
|
4974
4984
|
groupKey,
|
|
4975
4985
|
name,
|
|
@@ -5187,13 +5197,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5187
5197
|
*/
|
|
5188
5198
|
async getPlay(name, options) {
|
|
5189
5199
|
const encodedName = encodeURIComponent(name);
|
|
5190
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
5200
|
+
const query = _optionalChain([options, 'optionalAccess', _308 => _308.source]) ? `?include=source&revision=${encodeURIComponent(options.source)}` : _optionalChain([options, 'optionalAccess', _309 => _309.guidance]) ? "?include=guidance" : "";
|
|
5191
5201
|
return this.http.get(`/api/v2/plays/${encodedName}${query}`);
|
|
5192
5202
|
}
|
|
5193
5203
|
/** Read one trigger inventory page without loading run histories. */
|
|
5194
5204
|
async listPlayTriggerInventory(options) {
|
|
5195
5205
|
const params = new URLSearchParams({ view: "inventory" });
|
|
5196
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5206
|
+
if (_optionalChain([options, 'optionalAccess', _310 => _310.cursor])) params.set("cursor", options.cursor);
|
|
5197
5207
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5198
5208
|
}
|
|
5199
5209
|
/** Read one trigger's recent runs, with an explicit partial-history flag. */
|
|
@@ -5202,7 +5212,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5202
5212
|
view: "history",
|
|
5203
5213
|
binding_id: bindingId
|
|
5204
5214
|
});
|
|
5205
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5215
|
+
if (_optionalChain([options, 'optionalAccess', _311 => _311.limit]) !== void 0)
|
|
5206
5216
|
params.set("history_limit", String(options.limit));
|
|
5207
5217
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5208
5218
|
}
|
|
@@ -5238,7 +5248,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5238
5248
|
*/
|
|
5239
5249
|
async listPlayVersions(name, options) {
|
|
5240
5250
|
const encodedName = encodeURIComponent(name);
|
|
5241
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
5251
|
+
const suffix = _optionalChain([options, 'optionalAccess', _312 => _312.full]) ? "?full=true" : "";
|
|
5242
5252
|
const response = await this.http.get(
|
|
5243
5253
|
`/api/v2/plays/${encodedName}/versions${suffix}`
|
|
5244
5254
|
);
|
|
@@ -5391,14 +5401,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5391
5401
|
*/
|
|
5392
5402
|
async runPlay(code, csvPath, name, options) {
|
|
5393
5403
|
const { workflowId } = await this.submitPlay(code, csvPath, name, {
|
|
5394
|
-
input: _optionalChain([options, 'optionalAccess',
|
|
5395
|
-
sourceCode: _optionalChain([options, 'optionalAccess',
|
|
5396
|
-
artifact: _optionalChain([options, 'optionalAccess',
|
|
5397
|
-
compilerManifest: _optionalChain([options, 'optionalAccess',
|
|
5398
|
-
inputFile: _optionalChain([options, 'optionalAccess',
|
|
5399
|
-
packagedFiles: _optionalChain([options, 'optionalAccess',
|
|
5400
|
-
force: _optionalChain([options, 'optionalAccess',
|
|
5401
|
-
forceToolRefresh: _optionalChain([options, 'optionalAccess',
|
|
5404
|
+
input: _optionalChain([options, 'optionalAccess', _313 => _313.input]),
|
|
5405
|
+
sourceCode: _optionalChain([options, 'optionalAccess', _314 => _314.sourceCode]),
|
|
5406
|
+
artifact: _optionalChain([options, 'optionalAccess', _315 => _315.artifact]),
|
|
5407
|
+
compilerManifest: _optionalChain([options, 'optionalAccess', _316 => _316.compilerManifest]),
|
|
5408
|
+
inputFile: _optionalChain([options, 'optionalAccess', _317 => _317.inputFile]),
|
|
5409
|
+
packagedFiles: _optionalChain([options, 'optionalAccess', _318 => _318.packagedFiles]),
|
|
5410
|
+
force: _optionalChain([options, 'optionalAccess', _319 => _319.force]),
|
|
5411
|
+
forceToolRefresh: _optionalChain([options, 'optionalAccess', _320 => _320.forceToolRefresh])
|
|
5402
5412
|
});
|
|
5403
5413
|
const start = Date.now();
|
|
5404
5414
|
const state = {
|
|
@@ -5409,7 +5419,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5409
5419
|
latest: null
|
|
5410
5420
|
};
|
|
5411
5421
|
let terminalObserved = null;
|
|
5412
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5422
|
+
if (_optionalChain([options, 'optionalAccess', _321 => _321.signal, 'optionalAccess', _322 => _322.aborted])) {
|
|
5413
5423
|
await this.cancelPlay(workflowId);
|
|
5414
5424
|
return {
|
|
5415
5425
|
success: false,
|
|
@@ -5420,9 +5430,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5420
5430
|
};
|
|
5421
5431
|
}
|
|
5422
5432
|
for await (const event of this.watchRunEvents(workflowId, {
|
|
5423
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
5433
|
+
signal: _optionalChain([options, 'optionalAccess', _323 => _323.signal])
|
|
5424
5434
|
})) {
|
|
5425
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5435
|
+
if (_optionalChain([options, 'optionalAccess', _324 => _324.signal, 'optionalAccess', _325 => _325.aborted])) {
|
|
5426
5436
|
await this.cancelPlay(workflowId);
|
|
5427
5437
|
return {
|
|
5428
5438
|
success: false,
|
|
@@ -5432,19 +5442,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5432
5442
|
error: "Cancelled by user"
|
|
5433
5443
|
};
|
|
5434
5444
|
}
|
|
5435
|
-
const previousStatus = _optionalChain([state, 'access',
|
|
5445
|
+
const previousStatus = _optionalChain([state, 'access', _326 => _326.latest, 'optionalAccess', _327 => _327.status]);
|
|
5436
5446
|
const status = updatePlayLiveStatusState(state, event);
|
|
5437
5447
|
if (!status) {
|
|
5438
5448
|
continue;
|
|
5439
5449
|
}
|
|
5440
5450
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
5441
|
-
_optionalChain([options, 'optionalAccess',
|
|
5451
|
+
_optionalChain([options, 'optionalAccess', _328 => _328.onProgress, 'optionalCall', _329 => _329(status)]);
|
|
5442
5452
|
}
|
|
5443
5453
|
if (_chunkLA46MMTLjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
5444
5454
|
terminalObserved = status;
|
|
5445
5455
|
}
|
|
5446
5456
|
}
|
|
5447
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5457
|
+
if (_optionalChain([options, 'optionalAccess', _330 => _330.signal, 'optionalAccess', _331 => _331.aborted])) {
|
|
5448
5458
|
await this.cancelPlay(workflowId);
|
|
5449
5459
|
return {
|
|
5450
5460
|
success: false,
|
|
@@ -5497,7 +5507,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5497
5507
|
const response = await this.http.get(
|
|
5498
5508
|
`/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
|
|
5499
5509
|
);
|
|
5500
|
-
const event = _optionalChain([response, 'access',
|
|
5510
|
+
const event = _optionalChain([response, 'access', _332 => _332.entries, 'optionalAccess', _333 => _333[0]]);
|
|
5501
5511
|
if (!event) {
|
|
5502
5512
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
5503
5513
|
"No usage event was found for this request_id.",
|
|
@@ -5623,7 +5633,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5623
5633
|
async cancelBillingSubscription(options) {
|
|
5624
5634
|
return this.http.post(
|
|
5625
5635
|
"/api/v2/billing/subscription/cancel",
|
|
5626
|
-
{ action: _optionalChain([options, 'optionalAccess',
|
|
5636
|
+
{ action: _optionalChain([options, 'optionalAccess', _334 => _334.undo]) ? "undo_cancel" : "cancel" }
|
|
5627
5637
|
);
|
|
5628
5638
|
}
|
|
5629
5639
|
/**
|
|
@@ -5635,7 +5645,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5635
5645
|
*/
|
|
5636
5646
|
async listBillingInvoices(options) {
|
|
5637
5647
|
const params = new URLSearchParams();
|
|
5638
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5648
|
+
if (_optionalChain([options, 'optionalAccess', _335 => _335.limit]) !== void 0) {
|
|
5639
5649
|
params.set("limit", String(options.limit));
|
|
5640
5650
|
}
|
|
5641
5651
|
const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
|
|
@@ -5745,7 +5755,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5745
5755
|
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
5746
5756
|
async createTargetBillingPortalSession(options) {
|
|
5747
5757
|
const response = await this.http.post(
|
|
5748
|
-
_optionalChain([options, 'optionalAccess',
|
|
5758
|
+
_optionalChain([options, 'optionalAccess', _336 => _336.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
|
|
5749
5759
|
{}
|
|
5750
5760
|
);
|
|
5751
5761
|
return response.data;
|
|
@@ -5795,8 +5805,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5795
5805
|
return this.http.request("/api/v2/monitors/audit", {
|
|
5796
5806
|
method: "POST",
|
|
5797
5807
|
body: {
|
|
5798
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5799
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5808
|
+
..._optionalChain([options, 'optionalAccess', _337 => _337.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
5809
|
+
..._optionalChain([options, 'optionalAccess', _338 => _338.cursor]) ? { cursor: options.cursor } : {}
|
|
5800
5810
|
},
|
|
5801
5811
|
maxRetries: 0
|
|
5802
5812
|
});
|
|
@@ -5806,8 +5816,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5806
5816
|
return this.http.request("/api/v2/monitors/repair", {
|
|
5807
5817
|
method: "POST",
|
|
5808
5818
|
body: {
|
|
5809
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5810
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5819
|
+
..._optionalChain([options, 'optionalAccess', _339 => _339.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
5820
|
+
..._optionalChain([options, 'optionalAccess', _340 => _340.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
|
|
5811
5821
|
},
|
|
5812
5822
|
maxRetries: 0
|
|
5813
5823
|
});
|
|
@@ -5815,7 +5825,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5815
5825
|
/** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
|
|
5816
5826
|
async readMonitorsHealth(options) {
|
|
5817
5827
|
const params = new URLSearchParams();
|
|
5818
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5828
|
+
if (_optionalChain([options, 'optionalAccess', _341 => _341.fleetId])) params.set("fleet_id", options.fleetId);
|
|
5819
5829
|
const query = params.toString();
|
|
5820
5830
|
const suffix = query ? `?${query}` : "";
|
|
5821
5831
|
return this.http.request(
|
|
@@ -5888,7 +5898,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5888
5898
|
);
|
|
5889
5899
|
}
|
|
5890
5900
|
const params = new URLSearchParams();
|
|
5891
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5901
|
+
if (_optionalChain([options, 'optionalAccess', _342 => _342.cursor])) params.set("cursor", options.cursor);
|
|
5892
5902
|
const suffix = params.size > 0 ? `?${params}` : "";
|
|
5893
5903
|
return this.http.request(
|
|
5894
5904
|
`/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
|
|
@@ -5932,7 +5942,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5932
5942
|
* `client.monitors.deploy(...)`.
|
|
5933
5943
|
*/
|
|
5934
5944
|
async deployMonitor(definition, options) {
|
|
5935
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5945
|
+
if (_optionalChain([options, 'optionalAccess', _343 => _343.dryRun])) {
|
|
5936
5946
|
return this.http.request("/api/v2/monitors/check", {
|
|
5937
5947
|
method: "POST",
|
|
5938
5948
|
body: definition
|
|
@@ -5968,12 +5978,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5968
5978
|
/** List deployed monitors. Prefer `client.monitors.list(...)`. */
|
|
5969
5979
|
async listMonitors(options) {
|
|
5970
5980
|
const params = new URLSearchParams();
|
|
5971
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5972
|
-
else if (_optionalChain([options, 'optionalAccess',
|
|
5973
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5981
|
+
if (_optionalChain([options, 'optionalAccess', _344 => _344.state])) params.set("state", options.state);
|
|
5982
|
+
else if (_optionalChain([options, 'optionalAccess', _345 => _345.status])) params.set("status", options.status);
|
|
5983
|
+
if (_optionalChain([options, 'optionalAccess', _346 => _346.limit]) !== void 0)
|
|
5974
5984
|
params.set("limit", String(options.limit));
|
|
5975
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5976
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5985
|
+
if (_optionalChain([options, 'optionalAccess', _347 => _347.cursor])) params.set("cursor", options.cursor);
|
|
5986
|
+
if (_optionalChain([options, 'optionalAccess', _348 => _348.includeConsumers])) params.set("include_consumers", "true");
|
|
5977
5987
|
const query = params.toString();
|
|
5978
5988
|
const suffix = query ? `?${query}` : "";
|
|
5979
5989
|
return this.http.request(
|
|
@@ -5989,7 +5999,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5989
5999
|
);
|
|
5990
6000
|
}
|
|
5991
6001
|
async testMonitorWebhook(key, payload, options) {
|
|
5992
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6002
|
+
if (_optionalChain([options, 'optionalAccess', _349 => _349.dispatch]) === true || _optionalChain([options, 'optionalAccess', _350 => _350.validationOnly]) === false) {
|
|
5993
6003
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
5994
6004
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
5995
6005
|
void 0,
|
|
@@ -6044,7 +6054,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6044
6054
|
}
|
|
6045
6055
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
6046
6056
|
async deleteMonitor(key, options) {
|
|
6047
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6057
|
+
if (_optionalChain([options, 'optionalAccess', _351 => _351.localOnly]) === true) {
|
|
6048
6058
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
6049
6059
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
6050
6060
|
void 0,
|
|
@@ -6052,11 +6062,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6052
6062
|
);
|
|
6053
6063
|
}
|
|
6054
6064
|
const params = new URLSearchParams();
|
|
6055
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6065
|
+
if (_optionalChain([options, 'optionalAccess', _352 => _352.dryRun])) params.set("dry_run", "true");
|
|
6056
6066
|
const query = params.toString();
|
|
6057
6067
|
return this.http.request(
|
|
6058
6068
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
6059
|
-
_optionalChain([options, 'optionalAccess',
|
|
6069
|
+
_optionalChain([options, 'optionalAccess', _353 => _353.dryRun]) ? { method: "DELETE" } : {
|
|
6060
6070
|
method: "DELETE",
|
|
6061
6071
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
6062
6072
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -6069,10 +6079,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6069
6079
|
* Prefer `client.monitors.reactivate(...)`.
|
|
6070
6080
|
*/
|
|
6071
6081
|
async reactivateMonitor(key, options) {
|
|
6072
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6082
|
+
const query = _optionalChain([options, 'optionalAccess', _354 => _354.dryRun]) ? "?dry_run=true" : "";
|
|
6073
6083
|
return this.http.request(
|
|
6074
6084
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
6075
|
-
_optionalChain([options, 'optionalAccess',
|
|
6085
|
+
_optionalChain([options, 'optionalAccess', _355 => _355.dryRun]) ? { method: "POST", body: {} } : {
|
|
6076
6086
|
method: "POST",
|
|
6077
6087
|
body: {},
|
|
6078
6088
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -6086,7 +6096,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6086
6096
|
// ——————————————————————————————————————————————————————————
|
|
6087
6097
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
6088
6098
|
monitorJobIdempotencyKey(operation) {
|
|
6089
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
6099
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _356 => _356.crypto, 'optionalAccess', _357 => _357.randomUUID, 'optionalCall', _358 => _358()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
6090
6100
|
const prefix = "monitor-job-";
|
|
6091
6101
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
6092
6102
|
const maxOperationLength = Math.max(
|
|
@@ -6097,7 +6107,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6097
6107
|
}
|
|
6098
6108
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
6099
6109
|
return {
|
|
6100
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6110
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _359 => _359.trim, 'call', _360 => _360()]) || this.monitorJobIdempotencyKey(operation)
|
|
6101
6111
|
};
|
|
6102
6112
|
}
|
|
6103
6113
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -6108,7 +6118,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6108
6118
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
6109
6119
|
headers: this.monitorJobHeaders(
|
|
6110
6120
|
"batch-deploy",
|
|
6111
|
-
_optionalChain([options, 'optionalAccess',
|
|
6121
|
+
_optionalChain([options, 'optionalAccess', _361 => _361.idempotencyKey])
|
|
6112
6122
|
),
|
|
6113
6123
|
maxRetries: 0,
|
|
6114
6124
|
exactUrlOnly: true
|
|
@@ -6127,11 +6137,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6127
6137
|
version: 1,
|
|
6128
6138
|
kind: "batch",
|
|
6129
6139
|
monitors: definitions,
|
|
6130
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6140
|
+
..._optionalChain([options, 'optionalAccess', _362 => _362.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
6131
6141
|
},
|
|
6132
6142
|
headers: this.monitorJobHeaders(
|
|
6133
6143
|
`batch-sync-${batchId}`,
|
|
6134
|
-
_optionalChain([options, 'optionalAccess',
|
|
6144
|
+
_optionalChain([options, 'optionalAccess', _363 => _363.idempotencyKey])
|
|
6135
6145
|
),
|
|
6136
6146
|
maxRetries: 0,
|
|
6137
6147
|
exactUrlOnly: true
|
|
@@ -6146,7 +6156,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6146
6156
|
body: {},
|
|
6147
6157
|
headers: this.monitorJobHeaders(
|
|
6148
6158
|
`batch-start-${batchId}`,
|
|
6149
|
-
_optionalChain([options, 'optionalAccess',
|
|
6159
|
+
_optionalChain([options, 'optionalAccess', _364 => _364.idempotencyKey])
|
|
6150
6160
|
),
|
|
6151
6161
|
maxRetries: 0,
|
|
6152
6162
|
exactUrlOnly: true
|
|
@@ -6161,7 +6171,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6161
6171
|
body: {},
|
|
6162
6172
|
headers: this.monitorJobHeaders(
|
|
6163
6173
|
`batch-stop-${batchId}`,
|
|
6164
|
-
_optionalChain([options, 'optionalAccess',
|
|
6174
|
+
_optionalChain([options, 'optionalAccess', _365 => _365.idempotencyKey])
|
|
6165
6175
|
),
|
|
6166
6176
|
maxRetries: 0,
|
|
6167
6177
|
exactUrlOnly: true
|
|
@@ -6182,7 +6192,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6182
6192
|
body: {},
|
|
6183
6193
|
headers: this.monitorJobHeaders(
|
|
6184
6194
|
`${action}-${monitorKey}`,
|
|
6185
|
-
_optionalChain([options, 'optionalAccess',
|
|
6195
|
+
_optionalChain([options, 'optionalAccess', _366 => _366.idempotencyKey])
|
|
6186
6196
|
),
|
|
6187
6197
|
maxRetries: 0,
|
|
6188
6198
|
exactUrlOnly: true
|
|
@@ -6195,7 +6205,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6195
6205
|
body: definition,
|
|
6196
6206
|
headers: this.monitorJobHeaders(
|
|
6197
6207
|
`sync-${definition.key}`,
|
|
6198
|
-
_optionalChain([options, 'optionalAccess',
|
|
6208
|
+
_optionalChain([options, 'optionalAccess', _367 => _367.idempotencyKey])
|
|
6199
6209
|
),
|
|
6200
6210
|
maxRetries: 0,
|
|
6201
6211
|
exactUrlOnly: true
|
|
@@ -6208,7 +6218,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6208
6218
|
);
|
|
6209
6219
|
}
|
|
6210
6220
|
async getMonitorJobLogs(jobId, options) {
|
|
6211
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6221
|
+
const query = _optionalChain([options, 'optionalAccess', _368 => _368.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
6212
6222
|
return this.http.request(
|
|
6213
6223
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
6214
6224
|
{ method: "GET" }
|
|
@@ -6221,15 +6231,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6221
6231
|
);
|
|
6222
6232
|
}
|
|
6223
6233
|
async waitForMonitorJob(jobId, options) {
|
|
6224
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6225
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6234
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _369 => _369.timeoutMs]), () => ( 10 * 6e4)));
|
|
6235
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _370 => _370.pollIntervalMs]), () => ( 2e3)));
|
|
6226
6236
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
6227
6237
|
const startedAt = Date.now();
|
|
6228
6238
|
let latest = await this.getMonitorJob(jobId);
|
|
6229
6239
|
while (true) {
|
|
6230
|
-
_optionalChain([options, 'optionalAccess',
|
|
6240
|
+
_optionalChain([options, 'optionalAccess', _371 => _371.onProgress, 'optionalCall', _372 => _372(latest)]);
|
|
6231
6241
|
const job = latest.job;
|
|
6232
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
6242
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _373 => _373.state]) === "string" ? job.state : void 0;
|
|
6233
6243
|
if (state && terminal.has(state)) return latest;
|
|
6234
6244
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
6235
6245
|
await sleep(pollIntervalMs);
|
|
@@ -6240,12 +6250,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6240
6250
|
// Monitor Fleets
|
|
6241
6251
|
// ——————————————————————————————————————————————————————————
|
|
6242
6252
|
monitorFleetIdempotencyKey(operation) {
|
|
6243
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
6253
|
+
const uuid = _optionalChain([globalThis, 'access', _374 => _374.crypto, 'optionalAccess', _375 => _375.randomUUID, 'optionalCall', _376 => _376()]);
|
|
6244
6254
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
6245
6255
|
}
|
|
6246
6256
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
6247
6257
|
return {
|
|
6248
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6258
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _377 => _377.trim, 'call', _378 => _378()]) || this.monitorFleetIdempotencyKey(operation)
|
|
6249
6259
|
};
|
|
6250
6260
|
}
|
|
6251
6261
|
monitorFleetPath(fleetId) {
|
|
@@ -6265,15 +6275,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6265
6275
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
6266
6276
|
const body = {
|
|
6267
6277
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
6268
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6269
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6278
|
+
..._optionalChain([options, 'optionalAccess', _379 => _379.dryRun]) ? { dry_run: true } : {},
|
|
6279
|
+
..._optionalChain([options, 'optionalAccess', _380 => _380.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
6270
6280
|
};
|
|
6271
6281
|
return this.http.request(
|
|
6272
6282
|
this.monitorFleetPath(fleetId),
|
|
6273
6283
|
{
|
|
6274
6284
|
method: "PUT",
|
|
6275
6285
|
body,
|
|
6276
|
-
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
6286
|
+
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _381 => _381.idempotencyKey])),
|
|
6277
6287
|
maxRetries: 0,
|
|
6278
6288
|
exactUrlOnly: true
|
|
6279
6289
|
}
|
|
@@ -6286,8 +6296,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6286
6296
|
}
|
|
6287
6297
|
async getMonitorFleet(fleetId, options) {
|
|
6288
6298
|
const params = new URLSearchParams();
|
|
6289
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6290
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6299
|
+
if (_optionalChain([options, 'optionalAccess', _382 => _382.drift])) params.set("drift", "1");
|
|
6300
|
+
if (_optionalChain([options, 'optionalAccess', _383 => _383.limit]) !== void 0)
|
|
6291
6301
|
params.set("limit", String(options.limit));
|
|
6292
6302
|
const query = params.toString();
|
|
6293
6303
|
return this.http.request(
|
|
@@ -6300,10 +6310,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6300
6310
|
this.monitorFleetPath(fleetId),
|
|
6301
6311
|
{
|
|
6302
6312
|
method: "DELETE",
|
|
6303
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
6313
|
+
body: _optionalChain([options, 'optionalAccess', _384 => _384.dryRun]) ? { dry_run: true } : {},
|
|
6304
6314
|
headers: this.monitorFleetHeaders(
|
|
6305
6315
|
"deactivate",
|
|
6306
|
-
_optionalChain([options, 'optionalAccess',
|
|
6316
|
+
_optionalChain([options, 'optionalAccess', _385 => _385.idempotencyKey])
|
|
6307
6317
|
),
|
|
6308
6318
|
maxRetries: 0,
|
|
6309
6319
|
exactUrlOnly: true
|
|
@@ -6318,7 +6328,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6318
6328
|
body: {},
|
|
6319
6329
|
headers: this.monitorFleetHeaders(
|
|
6320
6330
|
"reactivate",
|
|
6321
|
-
_optionalChain([options, 'optionalAccess',
|
|
6331
|
+
_optionalChain([options, 'optionalAccess', _386 => _386.idempotencyKey])
|
|
6322
6332
|
),
|
|
6323
6333
|
maxRetries: 0,
|
|
6324
6334
|
exactUrlOnly: true
|
|
@@ -6335,13 +6345,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6335
6345
|
* identical to "the request failed".
|
|
6336
6346
|
*/
|
|
6337
6347
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
6338
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6339
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6340
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
6348
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _387 => _387.timeoutMs]), () => ( 10 * 6e4)));
|
|
6349
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _388 => _388.pollIntervalMs]), () => ( 2e3)));
|
|
6350
|
+
const terminal = _optionalChain([options, 'optionalAccess', _389 => _389.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
|
|
6341
6351
|
const startedAt = Date.now();
|
|
6342
6352
|
let latest = await this.getMonitorFleet(fleetId);
|
|
6343
6353
|
while (true) {
|
|
6344
|
-
_optionalChain([options, 'optionalAccess',
|
|
6354
|
+
_optionalChain([options, 'optionalAccess', _390 => _390.onProgress, 'optionalCall', _391 => _391(latest)]);
|
|
6345
6355
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
6346
6356
|
if (status && terminal.has(status)) return latest;
|
|
6347
6357
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|