deepline 0.3.533 → 0.3.534

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.
Files changed (152) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +46 -7
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +19 -1
  4. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +26 -0
  5. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +32 -14
  6. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +9 -0
  7. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +8 -0
  8. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +21 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +12 -1
  10. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +2 -0
  11. package/dist/cli/{auth-2TZNPIJQ.mjs → auth-MHQYIMVX.mjs} +5 -5
  12. package/dist/cli/auth-UP2RGPI6.js +43 -0
  13. package/dist/cli/{billing-LR4WJIHO.mjs → billing-LX2PSBJ4.mjs} +7 -7
  14. package/dist/cli/{billing-HQYTRIV3.js → billing-YQLNP4S5.js} +82 -82
  15. package/dist/cli/{chunk-NFDYVMGC.mjs → chunk-2P3NVX65.mjs} +68 -13
  16. package/dist/cli/{chunk-EVXRQXNV.mjs → chunk-5FXMEEF4.mjs} +35 -0
  17. package/dist/cli/{chunk-NW736SOD.mjs → chunk-5LZ5VSOK.mjs} +2 -2
  18. package/dist/cli/{chunk-2UYERVXF.mjs → chunk-62SOZ67Y.mjs} +2 -2
  19. package/dist/cli/{chunk-R7YDZSN7.js → chunk-6CEUQYMB.js} +3 -3
  20. package/dist/cli/{chunk-PIACHLYY.mjs → chunk-6GTGWZJG.mjs} +2 -2
  21. package/dist/cli/{chunk-NKVW552R.mjs → chunk-6IFZPEJE.mjs} +1 -1
  22. package/dist/cli/{chunk-KKUOIVQO.mjs → chunk-7GFR5Y4J.mjs} +1 -1
  23. package/dist/cli/{chunk-274Y66HP.js → chunk-A6HNT4EE.js} +2 -2
  24. package/dist/cli/{chunk-YZK5RSUL.mjs → chunk-AK622KIG.mjs} +1 -1
  25. package/dist/cli/{chunk-33SNTG5F.js → chunk-B2AS3R5W.js} +16 -16
  26. package/dist/cli/{chunk-USAQ42OG.mjs → chunk-BDWZBMGV.mjs} +5 -5
  27. package/dist/cli/{chunk-CANHB6DH.mjs → chunk-BXIUZM5N.mjs} +2 -2
  28. package/dist/cli/{chunk-WF652G74.js → chunk-D3J2Y2BP.js} +14 -14
  29. package/dist/cli/{chunk-SVVUC3B4.js → chunk-DGKTHWWH.js} +122 -104
  30. package/dist/cli/{chunk-G3RVDRYL.mjs → chunk-DQ5ADV2J.mjs} +1 -1
  31. package/dist/cli/{chunk-A4JP6RPX.js → chunk-DZS4JC7I.js} +2 -2
  32. package/dist/cli/{chunk-IETLUG4C.mjs → chunk-E7TP25I2.mjs} +1 -1
  33. package/dist/cli/{chunk-QZWURUBP.js → chunk-EGTUOYYG.js} +7 -7
  34. package/dist/cli/{chunk-LZMRCUVD.mjs → chunk-ENCA6O2D.mjs} +2 -2
  35. package/dist/cli/{chunk-BSI7UHQZ.mjs → chunk-EYXUAJAU.mjs} +5 -5
  36. package/dist/cli/{chunk-LTF2J3JM.js → chunk-GTXSUPCJ.js} +2 -2
  37. package/dist/cli/{chunk-5XTXC45Z.js → chunk-GVGQ6NZW.js} +41 -41
  38. package/dist/cli/{chunk-425ERNBL.js → chunk-HCD36BP6.js} +44 -44
  39. package/dist/cli/{chunk-BWZHMWM5.js → chunk-HPJAE6PP.js} +6 -6
  40. package/dist/cli/{chunk-735ZOYQN.js → chunk-IX45S5VC.js} +11 -11
  41. package/dist/cli/{chunk-352XVCGE.js → chunk-JBBJDFUJ.js} +5 -5
  42. package/dist/cli/{chunk-2TMNRF5R.mjs → chunk-KJVY7V2X.mjs} +1 -1
  43. package/dist/cli/{chunk-MNAEALPG.js → chunk-KSA2XE4T.js} +182 -127
  44. package/dist/cli/{chunk-CWIGRIIX.mjs → chunk-KXQCUX3X.mjs} +3 -3
  45. package/dist/cli/{chunk-E4VWBU2E.js → chunk-LGRZCHKC.js} +16 -16
  46. package/dist/cli/{chunk-XZN3DBTP.mjs → chunk-MG6YL4M7.mjs} +24 -6
  47. package/dist/cli/{chunk-4CYNH47Y.js → chunk-MQORQ7WL.js} +53 -53
  48. package/dist/cli/{chunk-HOTJSXLY.js → chunk-MQX363YF.js} +5 -5
  49. package/dist/cli/{chunk-TU56J4OV.js → chunk-MYSKWJMA.js} +13 -13
  50. package/dist/cli/{chunk-4YP2YAIZ.js → chunk-NDFNBJGL.js} +26 -26
  51. package/dist/cli/{chunk-JZ7LJS3P.mjs → chunk-NNAE7E23.mjs} +6 -6
  52. package/dist/cli/{chunk-LZ3PBEQH.mjs → chunk-O53LHONF.mjs} +2 -2
  53. package/dist/cli/{chunk-VKGNQC2S.mjs → chunk-OMVVHX4U.mjs} +5 -5
  54. package/dist/cli/{chunk-ZH5HCAN3.js → chunk-RH3YRMUY.js} +1 -1
  55. package/dist/cli/{chunk-V6LUMGVI.js → chunk-SUWTLXCV.js} +35 -0
  56. package/dist/cli/{chunk-MKUYZ7LR.mjs → chunk-TG2UB3A5.mjs} +1 -1
  57. package/dist/cli/{chunk-G3GJ3IGU.mjs → chunk-TQH3533L.mjs} +5 -5
  58. package/dist/cli/{chunk-B4ZNWXUW.js → chunk-TVINIDHB.js} +9 -9
  59. package/dist/cli/{chunk-O7RSUW75.js → chunk-UWNVFAFN.js} +4 -4
  60. package/dist/cli/{chunk-VPQDKL5O.js → chunk-V7SCRUFQ.js} +6 -6
  61. package/dist/cli/{chunk-HPOVAUQF.mjs → chunk-VAG5YKP6.mjs} +1 -1
  62. package/dist/cli/{chunk-4UADZTU5.js → chunk-VE7ZPLN2.js} +22 -22
  63. package/dist/cli/{chunk-XUX5KGCQ.mjs → chunk-WDNRPZED.mjs} +2 -2
  64. package/dist/cli/{chunk-3O3AL5RI.mjs → chunk-WR4WETRU.mjs} +4 -4
  65. package/dist/cli/{chunk-EYWES7F5.js → chunk-XBK6WCVA.js} +3 -3
  66. package/dist/cli/{chunk-3KQBV2CG.mjs → chunk-XRZJKHUA.mjs} +3 -3
  67. package/dist/cli/command-docs.js +2 -2
  68. package/dist/cli/command-docs.mjs +1 -1
  69. package/dist/cli/{csv-CJKKHGNQ.mjs → csv-4ID4E5W3.mjs} +4 -4
  70. package/dist/cli/{csv-MBSCHS4H.js → csv-U3M2G76R.js} +13 -13
  71. package/dist/cli/{db-45HNPCY3.js → db-IHAQIKEQ.js} +27 -27
  72. package/dist/cli/{db-EAFR6N45.mjs → db-LHX5BBCZ.mjs} +6 -6
  73. package/dist/cli/{describe-IXW3LDGC.mjs → describe-CI4MREFF.mjs} +18 -18
  74. package/dist/cli/describe-IVTSD7ST.js +50 -0
  75. package/dist/cli/describe-core.d.mts +2 -2
  76. package/dist/cli/describe-core.d.ts +2 -2
  77. package/dist/cli/{executions-SZAES2S4.js → executions-CJ5LV23G.js} +8 -8
  78. package/dist/cli/{executions-ZATZV7O6.mjs → executions-UJ6JZUL5.mjs} +6 -6
  79. package/dist/cli/{feedback-KXLF4GR4.js → feedback-TGUBVGRP.js} +14 -14
  80. package/dist/cli/{feedback-NY63KEK2.mjs → feedback-YGTPJBRJ.mjs} +6 -6
  81. package/dist/cli/{git-BSSSTR6N.mjs → git-3DOTQHJO.mjs} +5 -5
  82. package/dist/cli/git-R3W25XIF.js +25 -0
  83. package/dist/cli/index.js +145 -145
  84. package/dist/cli/index.mjs +44 -44
  85. package/dist/cli/{legacy-noops-XQANGML3.js → legacy-noops-BHEHVFHI.js} +9 -9
  86. package/dist/cli/{legacy-noops-CYF6DJBF.mjs → legacy-noops-RBBYRVLG.mjs} +6 -6
  87. package/dist/cli/{monitors-ABJVLWIP.mjs → monitors-5AJCG6IV.mjs} +7 -7
  88. package/dist/cli/{monitors-F3PTNP45.js → monitors-XECKLAXA.js} +100 -100
  89. package/dist/cli/{org-WQAPZI5Q.js → org-DOBAIYWG.js} +86 -86
  90. package/dist/cli/{org-BHF6Y5R7.mjs → org-ZAAIEZKB.mjs} +6 -6
  91. package/dist/cli/{pages-W4HWVJUG.mjs → pages-FUOSF6BE.mjs} +6 -6
  92. package/dist/cli/{pages-U3EJ2NPL.js → pages-TLC2N6L7.js} +18 -18
  93. package/dist/cli/{play-2UHKONON.js → play-E74VN6B7.js} +317 -317
  94. package/dist/cli/{play-3T4X3ZKH.mjs → play-KLYRMQPF.mjs} +18 -18
  95. package/dist/cli/{providers-LUK5LIUA.js → providers-APZ6SOSK.js} +9 -9
  96. package/dist/cli/{providers-2G2VTNDG.mjs → providers-XTQXV5LB.mjs} +6 -6
  97. package/dist/cli/{quickstart-76P6PGID.js → quickstart-S6WN6NWW.js} +6 -6
  98. package/dist/cli/{quickstart-XP4PJZ7N.mjs → quickstart-X7RHHQCH.mjs} +4 -4
  99. package/dist/cli/{run-S2KHGBCM.js → run-3YLIJJ57.js} +41 -41
  100. package/dist/cli/{run-ACIHA53A.mjs → run-TZPBBSPX.mjs} +23 -23
  101. package/dist/cli/search-NB5CBALV.js +33 -0
  102. package/dist/cli/{search-VFIJCUZL.mjs → search-VLHE2CMZ.mjs} +8 -8
  103. package/dist/cli/{search-output-2KFLZS5F.mjs → search-output-73BYB7UE.mjs} +4 -4
  104. package/dist/cli/{search-output-GV7NNB4X.js → search-output-GCT7PQIT.js} +6 -6
  105. package/dist/cli/{secrets-KJSFEW2F.js → secrets-J6CEKXKQ.js} +15 -15
  106. package/dist/cli/{secrets-MAQLBVC4.mjs → secrets-RLOTGKQZ.mjs} +6 -6
  107. package/dist/cli/{sessions-G5MWNJ75.mjs → sessions-7HZ7OZ62.mjs} +6 -6
  108. package/dist/cli/sessions-SFCZSB77.js +22 -0
  109. package/dist/cli/{settings-MR6UFOK5.mjs → settings-72K5YCIS.mjs} +13 -13
  110. package/dist/cli/{settings-VXGRPFXP.js → settings-WRV5XEZC.js} +86 -86
  111. package/dist/cli/{setup-ZOBXMONM.mjs → setup-KQFY6WT4.mjs} +10 -10
  112. package/dist/cli/{setup-C74BRK7N.js → setup-QVXWT2EQ.js} +50 -50
  113. package/dist/cli/{skills-4CG3MHOY.mjs → skills-C3K3E473.mjs} +8 -8
  114. package/dist/cli/skills-WIJEHVLA.js +37 -0
  115. package/dist/cli/{tools-YXCXZ4ZD.mjs → tools-4A2OH6MB.mjs} +17 -17
  116. package/dist/cli/tools-VMMERMLO.js +57 -0
  117. package/dist/cli/update-54WZQDTS.js +35 -0
  118. package/dist/cli/{update-Z3C5W3I4.mjs → update-BS6USKPR.mjs} +10 -10
  119. package/dist/cli/{views-XGP2GZ52.js → views-4NZGAXHL.js} +18 -18
  120. package/dist/cli/{views-45B2FZQT.mjs → views-WB6GFTRX.mjs} +6 -6
  121. package/dist/cli/{workflow-KQRWSNBH.mjs → workflow-2D4WX55R.mjs} +7 -7
  122. package/dist/cli/{workflow-DWO35XHZ.js → workflow-L2QTQZYV.js} +17 -17
  123. package/dist/{client-CBCVhL8U.d.ts → client-DQm56zMs.d.ts} +1 -1
  124. package/dist/{client-Bd2meveV.d.mts → client-DoUVSkqC.d.mts} +1 -1
  125. package/dist/{client-core-CsRRWCFy.d.ts → client-core-C7KkUIE_.d.ts} +32 -1
  126. package/dist/{client-core-CGj8V9mw.d.mts → client-core-CPlwsC1Q.d.mts} +32 -1
  127. package/dist/index.d.mts +3 -3
  128. package/dist/index.d.ts +3 -3
  129. package/dist/index.js +9 -9
  130. package/dist/index.mjs +6 -6
  131. package/dist/install-integrity.json +110 -110
  132. package/dist/plays/play-description.d.mts +1 -1
  133. package/dist/plays/play-description.d.ts +1 -1
  134. package/dist/plays/run-request.d.mts +1 -1
  135. package/dist/plays/run-request.d.ts +1 -1
  136. package/dist/release.d.mts +1 -1
  137. package/dist/release.d.ts +1 -1
  138. package/dist/release.js +2 -2
  139. package/dist/release.mjs +1 -1
  140. package/dist/server.d.mts +2 -2
  141. package/dist/server.d.ts +2 -2
  142. package/dist/server.js +5 -5
  143. package/dist/server.mjs +3 -3
  144. package/package.json +1 -1
  145. package/dist/cli/auth-KE6RFHUE.js +0 -43
  146. package/dist/cli/describe-PYLZAVRI.js +0 -50
  147. package/dist/cli/git-T5JTVBYZ.js +0 -25
  148. package/dist/cli/search-5MD65V43.js +0 -33
  149. package/dist/cli/sessions-FDMO7PAA.js +0 -22
  150. package/dist/cli/skills-KRUL7QCT.js +0 -37
  151. package/dist/cli/tools-CGHOSCPS.js +0 -57
  152. package/dist/cli/update-S2TILEHZ.js +0 -35
@@ -31,7 +31,7 @@ var _chunkPMH4GLMDjs = require('./chunk-PMH4GLMD.js');
31
31
 
32
32
 
33
33
 
34
- var _chunkO7RSUW75js = require('./chunk-O7RSUW75.js');
34
+ var _chunkUWNVFAFNjs = require('./chunk-UWNVFAFN.js');
35
35
 
36
36
 
37
37
  var _chunkT2N3B7IQjs = require('./chunk-T2N3B7IQ.js');
@@ -674,7 +674,7 @@ var ToolCalls = class {
674
674
  idempotencyKey,
675
675
  onResponse: (response2) => {
676
676
  lastResponse = null;
677
- atomicToolsSupported = response2.headers.get(_chunkO7RSUW75js.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
677
+ atomicToolsSupported = response2.headers.get(_chunkUWNVFAFNjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
678
678
  recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
679
679
  if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
680
680
  try {
@@ -1060,8 +1060,8 @@ function runtimeSelectionHeaders(runtime, env) {
1060
1060
  }
1061
1061
  const receivers = _optionalChain([env, 'access', _55 => _55.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]);
1062
1062
  return {
1063
- [_chunkO7RSUW75js.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1064
- ...receivers ? { [_chunkO7RSUW75js.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1063
+ [_chunkUWNVFAFNjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1064
+ ...receivers ? { [_chunkUWNVFAFNjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1065
1065
  };
1066
1066
  }
1067
1067
  function normalizeTestPolicyOverrides(value, source) {
@@ -1132,7 +1132,7 @@ var PlayClient = class {
1132
1132
  return _chunk2KHUFWTKjs.startPlayRun.call(void 0,
1133
1133
  this.http,
1134
1134
  resolved.request,
1135
- _optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkO7RSUW75js.SDK_API_MAJOR) } : headers,
1135
+ _optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkUWNVFAFNjs.SDK_API_MAJOR) } : headers,
1136
1136
  options
1137
1137
  );
1138
1138
  }
@@ -3229,7 +3229,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
3229
3229
  "RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
3230
3230
  );
3231
3231
  }
3232
- return { [_chunkO7RSUW75js.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3232
+ return { [_chunkUWNVFAFNjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3233
3233
  }
3234
3234
  function sleep(ms) {
3235
3235
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -3805,9 +3805,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3805
3805
  }
3806
3806
  /** Delete a view. Its Play and runs are not touched. */
3807
3807
  async deleteView(id) {
3808
- return await this.http.delete(
3809
- `/api/v2/views/${encodeURIComponent(id)}`
3810
- );
3808
+ return await this.http.delete(`/api/v2/views/${encodeURIComponent(id)}`);
3811
3809
  }
3812
3810
  /** The workspace view rules and what the caller may do. */
3813
3811
  async getViewPermissions() {
@@ -4156,7 +4154,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4156
4154
  );
4157
4155
  const headers = _optionalChain([options, 'optionalAccess', _188 => _188.cliAdmission]) ? {
4158
4156
  ...runtimeHeaders,
4159
- "X-Deepline-API-Major": String(_chunkO7RSUW75js.SDK_API_MAJOR)
4157
+ "X-Deepline-API-Major": String(_chunkUWNVFAFNjs.SDK_API_MAJOR)
4160
4158
  } : runtimeHeaders;
4161
4159
  const http = this.http;
4162
4160
  let submitted = false;
@@ -5552,21 +5550,41 @@ var DeeplineClient = (_class = class _DeeplineClient {
5552
5550
  const params = new URLSearchParams({ provider });
5553
5551
  return this.http.get(`/api/v2/integrations/balance?${params}`);
5554
5552
  }
5553
+ /** List the internal pilot's workspace connections. */
5554
+ async listWorkspaceIntegrationConnections() {
5555
+ return this.http.get("/api/v2/integrations/connections");
5556
+ }
5557
+ /** Manage a workspace-owned OAuth connection. Consent completes in the browser. */
5558
+ async manageWorkspaceIntegrationConnection(input) {
5559
+ return this.http.post("/api/v2/integrations/connections", {
5560
+ ...input,
5561
+ owner: "workspace"
5562
+ });
5563
+ }
5555
5564
  /** Get the dashboard link where a workspace owner or admin can connect a provider. */
5556
5565
  async getIntegrationConnectLink(provider) {
5557
5566
  const params = new URLSearchParams({ provider });
5558
5567
  return this.http.get(`/api/v2/integrations/connect?${params}`);
5559
5568
  }
5560
5569
  /** Save provider-owned credential fields without starting an OAuth browser flow. */
5561
- async setIntegrationCredentials(provider, credentials) {
5570
+ async setIntegrationCredentials(provider, credentials, options) {
5562
5571
  return this.http.post("/api/v2/integrations/connect", {
5563
5572
  provider,
5564
- credentials
5573
+ credentials,
5574
+ ..._optionalChain([options, 'optionalAccess', _317 => _317.expectedConnectionId]) ? { expected_connection_id: options.expectedConnectionId } : {}
5565
5575
  });
5566
5576
  }
5577
+ /** Calendar discovery compatibility method. The managed pilot requires calendar IDs in tool and Play inputs. */
5578
+ async listAvailabilityCalendars(cursor) {
5579
+ const params = new URLSearchParams();
5580
+ if (cursor) params.set("cursor", cursor);
5581
+ return this.http.get(
5582
+ `/api/v2/integrations/calendar-availability/calendars?${params}`
5583
+ );
5584
+ }
5567
5585
  /** Start provider OAuth and return the URL to open in a browser. */
5568
5586
  async startIntegrationOAuth(provider, options = {}) {
5569
- const scopes = _optionalChain([options, 'access', _317 => _317.scopes, 'optionalAccess', _318 => _318.map, 'call', _319 => _319((scope) => scope.trim()), 'access', _320 => _320.filter, 'call', _321 => _321(Boolean)]);
5587
+ const scopes = _optionalChain([options, 'access', _318 => _318.scopes, 'optionalAccess', _319 => _319.map, 'call', _320 => _320((scope) => scope.trim()), 'access', _321 => _321.filter, 'call', _322 => _322(Boolean)]);
5570
5588
  if (scopes !== void 0 && scopes.length === 0) {
5571
5589
  throw new Error("scopes must contain at least one OAuth scope.");
5572
5590
  }
@@ -5582,8 +5600,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
5582
5600
  return this.http.post("/api/v2/integrations/connect", {
5583
5601
  provider: "slack",
5584
5602
  scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
5585
- ..._optionalChain([options, 'optionalAccess', _322 => _322.successUrl]) ? { success_url: options.successUrl } : {},
5586
- ..._optionalChain([options, 'optionalAccess', _323 => _323.failureUrl]) ? { failure_url: options.failureUrl } : {}
5603
+ ..._optionalChain([options, 'optionalAccess', _323 => _323.successUrl]) ? { success_url: options.successUrl } : {},
5604
+ ..._optionalChain([options, 'optionalAccess', _324 => _324.failureUrl]) ? { failure_url: options.failureUrl } : {}
5587
5605
  });
5588
5606
  }
5589
5607
  /** List Slack channels visible to the connected Deepline Slack app. */
@@ -5658,7 +5676,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5658
5676
  }
5659
5677
  const targets = input.targets.map(parseNotificationGroupTarget);
5660
5678
  const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
5661
- const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _324 => _324[0], 'optionalAccess', _325 => _325.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
5679
+ const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _325 => _325[0], 'optionalAccess', _326 => _326.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
5662
5680
  if (legacyEvents.length > 0 && !legacyTarget) {
5663
5681
  throw new Error(
5664
5682
  "--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
@@ -5694,7 +5712,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5694
5712
  const existingGroup = current.configuration.groups.find(
5695
5713
  (candidate) => candidate.name.toLowerCase() === name.toLowerCase()
5696
5714
  );
5697
- const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _326 => _326.groupKey]), () => ( notificationObjectKey("group")));
5715
+ const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _327 => _327.groupKey]), () => ( notificationObjectKey("group")));
5698
5716
  const group = _nullishCoalesce(existingGroup, () => ( {
5699
5717
  groupKey,
5700
5718
  name,
@@ -5922,7 +5940,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5922
5940
  /** Read one trigger inventory page without loading run histories. */
5923
5941
  async listPlayTriggerInventory(options) {
5924
5942
  const params = new URLSearchParams({ view: "inventory" });
5925
- if (_optionalChain([options, 'optionalAccess', _327 => _327.cursor])) params.set("cursor", options.cursor);
5943
+ if (_optionalChain([options, 'optionalAccess', _328 => _328.cursor])) params.set("cursor", options.cursor);
5926
5944
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5927
5945
  }
5928
5946
  /** Read one trigger's recent runs, with an explicit partial-history flag. */
@@ -5931,7 +5949,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5931
5949
  view: "history",
5932
5950
  binding_id: bindingId
5933
5951
  });
5934
- if (_optionalChain([options, 'optionalAccess', _328 => _328.limit]) !== void 0)
5952
+ if (_optionalChain([options, 'optionalAccess', _329 => _329.limit]) !== void 0)
5935
5953
  params.set("history_limit", String(options.limit));
5936
5954
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5937
5955
  }
@@ -6119,14 +6137,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
6119
6137
  */
6120
6138
  async runPlay(code, csvPath, name, options) {
6121
6139
  const { workflowId } = await this.submitPlay(code, csvPath, name, {
6122
- input: _optionalChain([options, 'optionalAccess', _329 => _329.input]),
6123
- sourceCode: _optionalChain([options, 'optionalAccess', _330 => _330.sourceCode]),
6124
- artifact: _optionalChain([options, 'optionalAccess', _331 => _331.artifact]),
6125
- compilerManifest: _optionalChain([options, 'optionalAccess', _332 => _332.compilerManifest]),
6126
- inputFile: _optionalChain([options, 'optionalAccess', _333 => _333.inputFile]),
6127
- packagedFiles: _optionalChain([options, 'optionalAccess', _334 => _334.packagedFiles]),
6128
- force: _optionalChain([options, 'optionalAccess', _335 => _335.force]),
6129
- forceToolRefresh: _optionalChain([options, 'optionalAccess', _336 => _336.forceToolRefresh])
6140
+ input: _optionalChain([options, 'optionalAccess', _330 => _330.input]),
6141
+ sourceCode: _optionalChain([options, 'optionalAccess', _331 => _331.sourceCode]),
6142
+ artifact: _optionalChain([options, 'optionalAccess', _332 => _332.artifact]),
6143
+ compilerManifest: _optionalChain([options, 'optionalAccess', _333 => _333.compilerManifest]),
6144
+ inputFile: _optionalChain([options, 'optionalAccess', _334 => _334.inputFile]),
6145
+ packagedFiles: _optionalChain([options, 'optionalAccess', _335 => _335.packagedFiles]),
6146
+ force: _optionalChain([options, 'optionalAccess', _336 => _336.force]),
6147
+ forceToolRefresh: _optionalChain([options, 'optionalAccess', _337 => _337.forceToolRefresh])
6130
6148
  });
6131
6149
  const start = Date.now();
6132
6150
  const state = {
@@ -6137,7 +6155,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6137
6155
  latest: null
6138
6156
  };
6139
6157
  let terminalObserved = null;
6140
- if (_optionalChain([options, 'optionalAccess', _337 => _337.signal, 'optionalAccess', _338 => _338.aborted])) {
6158
+ if (_optionalChain([options, 'optionalAccess', _338 => _338.signal, 'optionalAccess', _339 => _339.aborted])) {
6141
6159
  await this.cancelPlay(workflowId);
6142
6160
  return {
6143
6161
  success: false,
@@ -6148,9 +6166,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
6148
6166
  };
6149
6167
  }
6150
6168
  for await (const event of this.watchRunEvents(workflowId, {
6151
- signal: _optionalChain([options, 'optionalAccess', _339 => _339.signal])
6169
+ signal: _optionalChain([options, 'optionalAccess', _340 => _340.signal])
6152
6170
  })) {
6153
- if (_optionalChain([options, 'optionalAccess', _340 => _340.signal, 'optionalAccess', _341 => _341.aborted])) {
6171
+ if (_optionalChain([options, 'optionalAccess', _341 => _341.signal, 'optionalAccess', _342 => _342.aborted])) {
6154
6172
  await this.cancelPlay(workflowId);
6155
6173
  return {
6156
6174
  success: false,
@@ -6160,19 +6178,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
6160
6178
  error: "Cancelled by user"
6161
6179
  };
6162
6180
  }
6163
- const previousStatus = _optionalChain([state, 'access', _342 => _342.latest, 'optionalAccess', _343 => _343.status]);
6181
+ const previousStatus = _optionalChain([state, 'access', _343 => _343.latest, 'optionalAccess', _344 => _344.status]);
6164
6182
  const status = updatePlayLiveStatusState(state, event);
6165
6183
  if (!status) {
6166
6184
  continue;
6167
6185
  }
6168
6186
  if (event.type !== "play.run.status" || status.status !== previousStatus) {
6169
- _optionalChain([options, 'optionalAccess', _344 => _344.onProgress, 'optionalCall', _345 => _345(status)]);
6187
+ _optionalChain([options, 'optionalAccess', _345 => _345.onProgress, 'optionalCall', _346 => _346(status)]);
6170
6188
  }
6171
6189
  if (_chunk2KHUFWTKjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
6172
6190
  terminalObserved = status;
6173
6191
  }
6174
6192
  }
6175
- if (_optionalChain([options, 'optionalAccess', _346 => _346.signal, 'optionalAccess', _347 => _347.aborted])) {
6193
+ if (_optionalChain([options, 'optionalAccess', _347 => _347.signal, 'optionalAccess', _348 => _348.aborted])) {
6176
6194
  await this.cancelPlay(workflowId);
6177
6195
  return {
6178
6196
  success: false,
@@ -6225,7 +6243,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6225
6243
  const response = await this.http.get(
6226
6244
  `/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
6227
6245
  );
6228
- const event = _optionalChain([response, 'access', _348 => _348.entries, 'optionalAccess', _349 => _349[0]]);
6246
+ const event = _optionalChain([response, 'access', _349 => _349.entries, 'optionalAccess', _350 => _350[0]]);
6229
6247
  if (!event) {
6230
6248
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
6231
6249
  "No usage event was found for this request_id.",
@@ -6400,7 +6418,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6400
6418
  async cancelBillingSubscription(options) {
6401
6419
  return this.http.post(
6402
6420
  "/api/v2/billing/subscription/cancel",
6403
- { action: _optionalChain([options, 'optionalAccess', _350 => _350.undo]) ? "undo_cancel" : "cancel" }
6421
+ { action: _optionalChain([options, 'optionalAccess', _351 => _351.undo]) ? "undo_cancel" : "cancel" }
6404
6422
  );
6405
6423
  }
6406
6424
  /**
@@ -6412,7 +6430,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6412
6430
  */
6413
6431
  async listBillingInvoices(options) {
6414
6432
  const params = new URLSearchParams();
6415
- if (_optionalChain([options, 'optionalAccess', _351 => _351.limit]) !== void 0) {
6433
+ if (_optionalChain([options, 'optionalAccess', _352 => _352.limit]) !== void 0) {
6416
6434
  params.set("limit", String(options.limit));
6417
6435
  }
6418
6436
  const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
@@ -6522,7 +6540,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6522
6540
  /** Create a Stripe-hosted portal session for payment recovery and invoices. */
6523
6541
  async createTargetBillingPortalSession(options) {
6524
6542
  const response = await this.http.post(
6525
- _optionalChain([options, 'optionalAccess', _352 => _352.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
6543
+ _optionalChain([options, 'optionalAccess', _353 => _353.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
6526
6544
  {}
6527
6545
  );
6528
6546
  return response.data;
@@ -6572,8 +6590,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6572
6590
  return this.http.request("/api/v2/monitors/audit", {
6573
6591
  method: "POST",
6574
6592
  body: {
6575
- ..._optionalChain([options, 'optionalAccess', _353 => _353.fleetId]) ? { fleet_id: options.fleetId } : {},
6576
- ..._optionalChain([options, 'optionalAccess', _354 => _354.cursor]) ? { cursor: options.cursor } : {}
6593
+ ..._optionalChain([options, 'optionalAccess', _354 => _354.fleetId]) ? { fleet_id: options.fleetId } : {},
6594
+ ..._optionalChain([options, 'optionalAccess', _355 => _355.cursor]) ? { cursor: options.cursor } : {}
6577
6595
  },
6578
6596
  maxRetries: 0
6579
6597
  });
@@ -6583,8 +6601,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6583
6601
  return this.http.request("/api/v2/monitors/repair", {
6584
6602
  method: "POST",
6585
6603
  body: {
6586
- ..._optionalChain([options, 'optionalAccess', _355 => _355.fleetId]) ? { fleet_id: options.fleetId } : {},
6587
- ..._optionalChain([options, 'optionalAccess', _356 => _356.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
6604
+ ..._optionalChain([options, 'optionalAccess', _356 => _356.fleetId]) ? { fleet_id: options.fleetId } : {},
6605
+ ..._optionalChain([options, 'optionalAccess', _357 => _357.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
6588
6606
  },
6589
6607
  maxRetries: 0
6590
6608
  });
@@ -6592,7 +6610,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6592
6610
  /** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
6593
6611
  async readMonitorsHealth(options) {
6594
6612
  const params = new URLSearchParams();
6595
- if (_optionalChain([options, 'optionalAccess', _357 => _357.fleetId])) params.set("fleet_id", options.fleetId);
6613
+ if (_optionalChain([options, 'optionalAccess', _358 => _358.fleetId])) params.set("fleet_id", options.fleetId);
6596
6614
  const query = params.toString();
6597
6615
  const suffix = query ? `?${query}` : "";
6598
6616
  return this.http.request(
@@ -6665,7 +6683,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6665
6683
  );
6666
6684
  }
6667
6685
  const params = new URLSearchParams();
6668
- if (_optionalChain([options, 'optionalAccess', _358 => _358.cursor])) params.set("cursor", options.cursor);
6686
+ if (_optionalChain([options, 'optionalAccess', _359 => _359.cursor])) params.set("cursor", options.cursor);
6669
6687
  const suffix = params.size > 0 ? `?${params}` : "";
6670
6688
  return this.http.request(
6671
6689
  `/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
@@ -6712,7 +6730,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6712
6730
  * a second charge. The submission is never replayed automatically.
6713
6731
  */
6714
6732
  async previewMonitor(definition, options) {
6715
- const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _359 => _359.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _360 => _360.crypto, 'optionalAccess', _361 => _361.randomUUID, 'optionalCall', _362 => _362()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
6733
+ const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _360 => _360.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _361 => _361.crypto, 'optionalAccess', _362 => _362.randomUUID, 'optionalCall', _363 => _363()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
6716
6734
  try {
6717
6735
  const result = await this.http.request(
6718
6736
  "/api/v2/monitors/preview",
@@ -6720,7 +6738,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6720
6738
  method: "POST",
6721
6739
  body: {
6722
6740
  ...definition,
6723
- ..._optionalChain([options, 'optionalAccess', _363 => _363.limit]) === void 0 ? {} : { limit: options.limit }
6741
+ ..._optionalChain([options, 'optionalAccess', _364 => _364.limit]) === void 0 ? {} : { limit: options.limit }
6724
6742
  },
6725
6743
  headers: { "Idempotency-Key": idempotencyKey },
6726
6744
  maxRetries: 0,
@@ -6742,7 +6760,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6742
6760
  * `client.monitors.deploy(...)`.
6743
6761
  */
6744
6762
  async deployMonitor(definition, options) {
6745
- if (_optionalChain([options, 'optionalAccess', _364 => _364.dryRun])) {
6763
+ if (_optionalChain([options, 'optionalAccess', _365 => _365.dryRun])) {
6746
6764
  return this.http.request("/api/v2/monitors/check", {
6747
6765
  method: "POST",
6748
6766
  body: definition
@@ -6778,12 +6796,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6778
6796
  /** List deployed monitors. Prefer `client.monitors.list(...)`. */
6779
6797
  async listMonitors(options) {
6780
6798
  const params = new URLSearchParams();
6781
- if (_optionalChain([options, 'optionalAccess', _365 => _365.state])) params.set("state", options.state);
6782
- else if (_optionalChain([options, 'optionalAccess', _366 => _366.status])) params.set("status", options.status);
6783
- if (_optionalChain([options, 'optionalAccess', _367 => _367.limit]) !== void 0)
6799
+ if (_optionalChain([options, 'optionalAccess', _366 => _366.state])) params.set("state", options.state);
6800
+ else if (_optionalChain([options, 'optionalAccess', _367 => _367.status])) params.set("status", options.status);
6801
+ if (_optionalChain([options, 'optionalAccess', _368 => _368.limit]) !== void 0)
6784
6802
  params.set("limit", String(options.limit));
6785
- if (_optionalChain([options, 'optionalAccess', _368 => _368.cursor])) params.set("cursor", options.cursor);
6786
- if (_optionalChain([options, 'optionalAccess', _369 => _369.includeConsumers])) params.set("include_consumers", "true");
6803
+ if (_optionalChain([options, 'optionalAccess', _369 => _369.cursor])) params.set("cursor", options.cursor);
6804
+ if (_optionalChain([options, 'optionalAccess', _370 => _370.includeConsumers])) params.set("include_consumers", "true");
6787
6805
  const query = params.toString();
6788
6806
  const suffix = query ? `?${query}` : "";
6789
6807
  return this.http.request(
@@ -6794,17 +6812,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
6794
6812
  /** The Monitors list. Prefer `client.monitors.ledger(...)`. */
6795
6813
  async listMonitorLedger(options) {
6796
6814
  const params = new URLSearchParams();
6797
- if (_optionalChain([options, 'optionalAccess', _370 => _370.search])) params.set("q", options.search);
6798
- for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _371 => _371.states]), () => ( []))) params.append("state", state);
6799
- for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _372 => _372.signals]), () => ( [])))
6815
+ if (_optionalChain([options, 'optionalAccess', _371 => _371.search])) params.set("q", options.search);
6816
+ for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _372 => _372.states]), () => ( []))) params.append("state", state);
6817
+ for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _373 => _373.signals]), () => ( [])))
6800
6818
  params.append("signal", signal);
6801
- if (_optionalChain([options, 'optionalAccess', _373 => _373.play])) params.set("play", options.play);
6802
- if (_optionalChain([options, 'optionalAccess', _374 => _374.fleet])) params.set("fleet", options.fleet);
6803
- if (_optionalChain([options, 'optionalAccess', _375 => _375.sort])) params.set("sort", options.sort);
6804
- if (_optionalChain([options, 'optionalAccess', _376 => _376.window])) params.set("window", options.window);
6805
- if (_optionalChain([options, 'optionalAccess', _377 => _377.limit]) !== void 0)
6819
+ if (_optionalChain([options, 'optionalAccess', _374 => _374.play])) params.set("play", options.play);
6820
+ if (_optionalChain([options, 'optionalAccess', _375 => _375.fleet])) params.set("fleet", options.fleet);
6821
+ if (_optionalChain([options, 'optionalAccess', _376 => _376.sort])) params.set("sort", options.sort);
6822
+ if (_optionalChain([options, 'optionalAccess', _377 => _377.window])) params.set("window", options.window);
6823
+ if (_optionalChain([options, 'optionalAccess', _378 => _378.limit]) !== void 0)
6806
6824
  params.set("limit", String(options.limit));
6807
- if (_optionalChain([options, 'optionalAccess', _378 => _378.cursor])) params.set("cursor", options.cursor);
6825
+ if (_optionalChain([options, 'optionalAccess', _379 => _379.cursor])) params.set("cursor", options.cursor);
6808
6826
  const query = params.toString();
6809
6827
  const suffix = query ? `?${query}` : "";
6810
6828
  return this.http.request(
@@ -6821,7 +6839,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6821
6839
  }
6822
6840
  /** A monitor's recent findings. Prefer `client.monitors.ledgerFindings(...)`. */
6823
6841
  async listMonitorLedgerFindings(key, options) {
6824
- const suffix = _optionalChain([options, 'optionalAccess', _379 => _379.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
6842
+ const suffix = _optionalChain([options, 'optionalAccess', _380 => _380.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
6825
6843
  return this.http.request(
6826
6844
  `/api/v2/monitors/ledger/${encodeURIComponent(key)}/findings${suffix}`,
6827
6845
  { method: "GET" }
@@ -6835,7 +6853,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6835
6853
  );
6836
6854
  }
6837
6855
  async testMonitorWebhook(key, payload, options) {
6838
- if (_optionalChain([options, 'optionalAccess', _380 => _380.dispatch]) === true || _optionalChain([options, 'optionalAccess', _381 => _381.validationOnly]) === false) {
6856
+ if (_optionalChain([options, 'optionalAccess', _381 => _381.dispatch]) === true || _optionalChain([options, 'optionalAccess', _382 => _382.validationOnly]) === false) {
6839
6857
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
6840
6858
  "Monitor tests are validation-only and cannot dispatch events.",
6841
6859
  void 0,
@@ -6890,7 +6908,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6890
6908
  }
6891
6909
  /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6892
6910
  async deleteMonitor(key, options) {
6893
- if (_optionalChain([options, 'optionalAccess', _382 => _382.localOnly]) === true) {
6911
+ if (_optionalChain([options, 'optionalAccess', _383 => _383.localOnly]) === true) {
6894
6912
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
6895
6913
  "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6896
6914
  void 0,
@@ -6898,11 +6916,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6898
6916
  );
6899
6917
  }
6900
6918
  const params = new URLSearchParams();
6901
- if (_optionalChain([options, 'optionalAccess', _383 => _383.dryRun])) params.set("dry_run", "true");
6919
+ if (_optionalChain([options, 'optionalAccess', _384 => _384.dryRun])) params.set("dry_run", "true");
6902
6920
  const query = params.toString();
6903
6921
  return this.http.request(
6904
6922
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
6905
- _optionalChain([options, 'optionalAccess', _384 => _384.dryRun]) ? { method: "DELETE" } : {
6923
+ _optionalChain([options, 'optionalAccess', _385 => _385.dryRun]) ? { method: "DELETE" } : {
6906
6924
  method: "DELETE",
6907
6925
  // Deletion is a provider lifecycle operation. A timeout is an
6908
6926
  // unknown outcome, not authority to begin another delete attempt.
@@ -6915,10 +6933,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6915
6933
  * Prefer `client.monitors.reactivate(...)`.
6916
6934
  */
6917
6935
  async reactivateMonitor(key, options) {
6918
- const query = _optionalChain([options, 'optionalAccess', _385 => _385.dryRun]) ? "?dry_run=true" : "";
6936
+ const query = _optionalChain([options, 'optionalAccess', _386 => _386.dryRun]) ? "?dry_run=true" : "";
6919
6937
  return this.http.request(
6920
6938
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
6921
- _optionalChain([options, 'optionalAccess', _386 => _386.dryRun]) ? { method: "POST", body: {} } : {
6939
+ _optionalChain([options, 'optionalAccess', _387 => _387.dryRun]) ? { method: "POST", body: {} } : {
6922
6940
  method: "POST",
6923
6941
  body: {},
6924
6942
  // Reactivation can create an upstream resource, so it must not use
@@ -6932,7 +6950,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6932
6950
  // ——————————————————————————————————————————————————————————
6933
6951
  static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
6934
6952
  monitorJobIdempotencyKey(operation) {
6935
- const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _387 => _387.crypto, 'optionalAccess', _388 => _388.randomUUID, 'optionalCall', _389 => _389()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
6953
+ const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _388 => _388.crypto, 'optionalAccess', _389 => _389.randomUUID, 'optionalCall', _390 => _390()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
6936
6954
  const prefix = "monitor-job-";
6937
6955
  const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
6938
6956
  const maxOperationLength = Math.max(
@@ -6943,7 +6961,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6943
6961
  }
6944
6962
  monitorJobHeaders(operation, idempotencyKey) {
6945
6963
  return {
6946
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _390 => _390.trim, 'call', _391 => _391()]) || this.monitorJobIdempotencyKey(operation)
6964
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _391 => _391.trim, 'call', _392 => _392()]) || this.monitorJobIdempotencyKey(operation)
6947
6965
  };
6948
6966
  }
6949
6967
  async deployMonitorBatch(definitions, options) {
@@ -6954,7 +6972,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6954
6972
  body: { version: 1, kind: "batch", monitors: definitions },
6955
6973
  headers: this.monitorJobHeaders(
6956
6974
  "batch-deploy",
6957
- _optionalChain([options, 'optionalAccess', _392 => _392.idempotencyKey])
6975
+ _optionalChain([options, 'optionalAccess', _393 => _393.idempotencyKey])
6958
6976
  ),
6959
6977
  maxRetries: 0,
6960
6978
  exactUrlOnly: true
@@ -6973,11 +6991,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6973
6991
  version: 1,
6974
6992
  kind: "batch",
6975
6993
  monitors: definitions,
6976
- ..._optionalChain([options, 'optionalAccess', _393 => _393.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6994
+ ..._optionalChain([options, 'optionalAccess', _394 => _394.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6977
6995
  },
6978
6996
  headers: this.monitorJobHeaders(
6979
6997
  `batch-sync-${batchId}`,
6980
- _optionalChain([options, 'optionalAccess', _394 => _394.idempotencyKey])
6998
+ _optionalChain([options, 'optionalAccess', _395 => _395.idempotencyKey])
6981
6999
  ),
6982
7000
  maxRetries: 0,
6983
7001
  exactUrlOnly: true
@@ -6992,7 +7010,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6992
7010
  body: {},
6993
7011
  headers: this.monitorJobHeaders(
6994
7012
  `batch-start-${batchId}`,
6995
- _optionalChain([options, 'optionalAccess', _395 => _395.idempotencyKey])
7013
+ _optionalChain([options, 'optionalAccess', _396 => _396.idempotencyKey])
6996
7014
  ),
6997
7015
  maxRetries: 0,
6998
7016
  exactUrlOnly: true
@@ -7007,7 +7025,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7007
7025
  body: {},
7008
7026
  headers: this.monitorJobHeaders(
7009
7027
  `batch-stop-${batchId}`,
7010
- _optionalChain([options, 'optionalAccess', _396 => _396.idempotencyKey])
7028
+ _optionalChain([options, 'optionalAccess', _397 => _397.idempotencyKey])
7011
7029
  ),
7012
7030
  maxRetries: 0,
7013
7031
  exactUrlOnly: true
@@ -7028,7 +7046,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7028
7046
  body: {},
7029
7047
  headers: this.monitorJobHeaders(
7030
7048
  `${action}-${monitorKey}`,
7031
- _optionalChain([options, 'optionalAccess', _397 => _397.idempotencyKey])
7049
+ _optionalChain([options, 'optionalAccess', _398 => _398.idempotencyKey])
7032
7050
  ),
7033
7051
  maxRetries: 0,
7034
7052
  exactUrlOnly: true
@@ -7041,7 +7059,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7041
7059
  body: definition,
7042
7060
  headers: this.monitorJobHeaders(
7043
7061
  `sync-${definition.key}`,
7044
- _optionalChain([options, 'optionalAccess', _398 => _398.idempotencyKey])
7062
+ _optionalChain([options, 'optionalAccess', _399 => _399.idempotencyKey])
7045
7063
  ),
7046
7064
  maxRetries: 0,
7047
7065
  exactUrlOnly: true
@@ -7054,7 +7072,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7054
7072
  );
7055
7073
  }
7056
7074
  async getMonitorJobLogs(jobId, options) {
7057
- const query = _optionalChain([options, 'optionalAccess', _399 => _399.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
7075
+ const query = _optionalChain([options, 'optionalAccess', _400 => _400.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
7058
7076
  return this.http.request(
7059
7077
  `/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
7060
7078
  { method: "GET" }
@@ -7067,15 +7085,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
7067
7085
  );
7068
7086
  }
7069
7087
  async waitForMonitorJob(jobId, options) {
7070
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _400 => _400.timeoutMs]), () => ( 10 * 6e4)));
7071
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _401 => _401.pollIntervalMs]), () => ( 2e3)));
7088
+ const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _401 => _401.timeoutMs]), () => ( 10 * 6e4)));
7089
+ const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _402 => _402.pollIntervalMs]), () => ( 2e3)));
7072
7090
  const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
7073
7091
  const startedAt = Date.now();
7074
7092
  let latest = await this.getMonitorJob(jobId);
7075
7093
  while (true) {
7076
- _optionalChain([options, 'optionalAccess', _402 => _402.onProgress, 'optionalCall', _403 => _403(latest)]);
7094
+ _optionalChain([options, 'optionalAccess', _403 => _403.onProgress, 'optionalCall', _404 => _404(latest)]);
7077
7095
  const job = latest.job;
7078
- const state = typeof _optionalChain([job, 'optionalAccess', _404 => _404.state]) === "string" ? job.state : void 0;
7096
+ const state = typeof _optionalChain([job, 'optionalAccess', _405 => _405.state]) === "string" ? job.state : void 0;
7079
7097
  if (state && terminal.has(state)) return latest;
7080
7098
  if (Date.now() - startedAt >= timeoutMs) return latest;
7081
7099
  await sleep(pollIntervalMs);
@@ -7086,12 +7104,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
7086
7104
  // Monitor Fleets
7087
7105
  // ——————————————————————————————————————————————————————————
7088
7106
  monitorFleetIdempotencyKey(operation) {
7089
- const uuid = _optionalChain([globalThis, 'access', _405 => _405.crypto, 'optionalAccess', _406 => _406.randomUUID, 'optionalCall', _407 => _407()]);
7107
+ const uuid = _optionalChain([globalThis, 'access', _406 => _406.crypto, 'optionalAccess', _407 => _407.randomUUID, 'optionalCall', _408 => _408()]);
7090
7108
  return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
7091
7109
  }
7092
7110
  monitorFleetHeaders(operation, idempotencyKey) {
7093
7111
  return {
7094
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _408 => _408.trim, 'call', _409 => _409()]) || this.monitorFleetIdempotencyKey(operation)
7112
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _409 => _409.trim, 'call', _410 => _410()]) || this.monitorFleetIdempotencyKey(operation)
7095
7113
  };
7096
7114
  }
7097
7115
  monitorFleetPath(fleetId) {
@@ -7111,15 +7129,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
7111
7129
  const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
7112
7130
  const body = {
7113
7131
  ...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
7114
- ..._optionalChain([options, 'optionalAccess', _410 => _410.dryRun]) ? { dry_run: true } : {},
7115
- ..._optionalChain([options, 'optionalAccess', _411 => _411.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
7132
+ ..._optionalChain([options, 'optionalAccess', _411 => _411.dryRun]) ? { dry_run: true } : {},
7133
+ ..._optionalChain([options, 'optionalAccess', _412 => _412.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
7116
7134
  };
7117
7135
  return this.http.request(
7118
7136
  this.monitorFleetPath(fleetId),
7119
7137
  {
7120
7138
  method: "PUT",
7121
7139
  body,
7122
- headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _412 => _412.idempotencyKey])),
7140
+ headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _413 => _413.idempotencyKey])),
7123
7141
  maxRetries: 0,
7124
7142
  exactUrlOnly: true
7125
7143
  }
@@ -7133,10 +7151,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
7133
7151
  /** The Fleets list. Prefer `client.monitors.fleets.overview()`. */
7134
7152
  async listMonitorFleetOverviews(options) {
7135
7153
  const params = new URLSearchParams({ view: "overview" });
7136
- if (_optionalChain([options, 'optionalAccess', _413 => _413.q])) params.set("q", options.q);
7137
- for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _414 => _414.states]), () => ( []))) params.append("state", state);
7138
- if (_optionalChain([options, 'optionalAccess', _415 => _415.sort])) params.set("sort", options.sort);
7139
- if (_optionalChain([options, 'optionalAccess', _416 => _416.window])) params.set("window", options.window);
7154
+ if (_optionalChain([options, 'optionalAccess', _414 => _414.q])) params.set("q", options.q);
7155
+ for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _415 => _415.states]), () => ( []))) params.append("state", state);
7156
+ if (_optionalChain([options, 'optionalAccess', _416 => _416.sort])) params.set("sort", options.sort);
7157
+ if (_optionalChain([options, 'optionalAccess', _417 => _417.window])) params.set("window", options.window);
7140
7158
  return this.http.request(
7141
7159
  `/api/v2/monitors/fleets?${params.toString()}`,
7142
7160
  { method: "GET" }
@@ -7145,7 +7163,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7145
7163
  /** One fleet's overview. Prefer `client.monitors.fleets.overview(fleetId)`. */
7146
7164
  async getMonitorFleetOverview(fleetId, options) {
7147
7165
  const params = new URLSearchParams({ view: "overview" });
7148
- if (_optionalChain([options, 'optionalAccess', _417 => _417.window])) params.set("window", options.window);
7166
+ if (_optionalChain([options, 'optionalAccess', _418 => _418.window])) params.set("window", options.window);
7149
7167
  return this.http.request(
7150
7168
  `${this.monitorFleetPath(fleetId)}?${params.toString()}`,
7151
7169
  { method: "GET" }
@@ -7154,10 +7172,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
7154
7172
  /** A fleet's problem members. Prefer `client.monitors.fleets.issues(...)`. */
7155
7173
  async listMonitorFleetIssues(fleetId, options) {
7156
7174
  const params = new URLSearchParams();
7157
- if (_optionalChain([options, 'optionalAccess', _418 => _418.group])) params.set("group", options.group);
7158
- if (_optionalChain([options, 'optionalAccess', _419 => _419.cause])) params.set("cause", options.cause);
7159
- if (_optionalChain([options, 'optionalAccess', _420 => _420.cursor])) params.set("cursor", options.cursor);
7160
- if (_optionalChain([options, 'optionalAccess', _421 => _421.limit]) !== void 0)
7175
+ if (_optionalChain([options, 'optionalAccess', _419 => _419.group])) params.set("group", options.group);
7176
+ if (_optionalChain([options, 'optionalAccess', _420 => _420.cause])) params.set("cause", options.cause);
7177
+ if (_optionalChain([options, 'optionalAccess', _421 => _421.cursor])) params.set("cursor", options.cursor);
7178
+ if (_optionalChain([options, 'optionalAccess', _422 => _422.limit]) !== void 0)
7161
7179
  params.set("limit", String(options.limit));
7162
7180
  const query = params.toString();
7163
7181
  return this.http.request(
@@ -7167,8 +7185,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
7167
7185
  }
7168
7186
  async getMonitorFleet(fleetId, options) {
7169
7187
  const params = new URLSearchParams();
7170
- if (_optionalChain([options, 'optionalAccess', _422 => _422.drift])) params.set("drift", "1");
7171
- if (_optionalChain([options, 'optionalAccess', _423 => _423.limit]) !== void 0)
7188
+ if (_optionalChain([options, 'optionalAccess', _423 => _423.drift])) params.set("drift", "1");
7189
+ if (_optionalChain([options, 'optionalAccess', _424 => _424.limit]) !== void 0)
7172
7190
  params.set("limit", String(options.limit));
7173
7191
  const query = params.toString();
7174
7192
  return this.http.request(
@@ -7181,10 +7199,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
7181
7199
  this.monitorFleetPath(fleetId),
7182
7200
  {
7183
7201
  method: "DELETE",
7184
- body: _optionalChain([options, 'optionalAccess', _424 => _424.dryRun]) ? { dry_run: true } : {},
7202
+ body: _optionalChain([options, 'optionalAccess', _425 => _425.dryRun]) ? { dry_run: true } : {},
7185
7203
  headers: this.monitorFleetHeaders(
7186
7204
  "deactivate",
7187
- _optionalChain([options, 'optionalAccess', _425 => _425.idempotencyKey])
7205
+ _optionalChain([options, 'optionalAccess', _426 => _426.idempotencyKey])
7188
7206
  ),
7189
7207
  maxRetries: 0,
7190
7208
  exactUrlOnly: true
@@ -7199,7 +7217,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7199
7217
  body: {},
7200
7218
  headers: this.monitorFleetHeaders(
7201
7219
  "reactivate",
7202
- _optionalChain([options, 'optionalAccess', _426 => _426.idempotencyKey])
7220
+ _optionalChain([options, 'optionalAccess', _427 => _427.idempotencyKey])
7203
7221
  ),
7204
7222
  maxRetries: 0,
7205
7223
  exactUrlOnly: true
@@ -7216,9 +7234,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
7216
7234
  * identical to "the request failed".
7217
7235
  */
7218
7236
  async waitForMonitorFleetConvergence(fleetId, options) {
7219
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _427 => _427.timeoutMs]), () => ( 10 * 6e4)));
7220
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _428 => _428.pollIntervalMs]), () => ( 2e3)));
7221
- const terminal = _optionalChain([options, 'optionalAccess', _429 => _429.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
7237
+ const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _428 => _428.timeoutMs]), () => ( 10 * 6e4)));
7238
+ const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _429 => _429.pollIntervalMs]), () => ( 2e3)));
7239
+ const terminal = _optionalChain([options, 'optionalAccess', _430 => _430.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
7222
7240
  "converged",
7223
7241
  "degraded",
7224
7242
  "deactivated",
@@ -7227,7 +7245,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7227
7245
  const startedAt = Date.now();
7228
7246
  let latest = await this.getMonitorFleet(fleetId);
7229
7247
  while (true) {
7230
- _optionalChain([options, 'optionalAccess', _430 => _430.onProgress, 'optionalCall', _431 => _431(latest)]);
7248
+ _optionalChain([options, 'optionalAccess', _431 => _431.onProgress, 'optionalCall', _432 => _432(latest)]);
7231
7249
  const status = typeof latest.status === "string" ? latest.status : void 0;
7232
7250
  if (status && terminal.has(status)) return latest;
7233
7251
  if (Date.now() - startedAt >= timeoutMs) return latest;