@scarn/sdk 0.8.21 → 0.8.22

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 (91) hide show
  1. package/dist/auth/index.js +15 -16
  2. package/dist/automations/index.js +14 -17
  3. package/dist/{chunk-6p340dd4.js → chunk-0bwsjn0b.js} +29 -29
  4. package/dist/{chunk-r3sbp2wn.js → chunk-0w13kxkr.js} +34 -31
  5. package/dist/{chunk-nkm31g10.js → chunk-3j5wf2t5.js} +44 -43
  6. package/dist/{chunk-0y2fy5en.js → chunk-4361gxk0.js} +7 -7
  7. package/dist/{chunk-8tmsvkmj.js → chunk-52520csz.js} +13 -12
  8. package/dist/chunk-5dnfgyx8.js +159 -0
  9. package/dist/{chunk-k57h6qke.js → chunk-5fa4arn1.js} +12 -8
  10. package/dist/{chunk-ngy1fdcx.js → chunk-631ffb6r.js} +10 -10
  11. package/dist/{chunk-01nfqm18.js → chunk-7anj08zc.js} +11 -9
  12. package/dist/{chunk-p74r4y6j.js → chunk-7dr4kybf.js} +481 -449
  13. package/dist/chunk-7mhr5aex.js +171 -0
  14. package/dist/chunk-7rywbqzz.js +27 -0
  15. package/dist/{chunk-xhpp6qz8.js → chunk-9ct3xypr.js} +2552 -3780
  16. package/dist/{chunk-azss2d1n.js → chunk-9geh4c3v.js} +153 -155
  17. package/dist/{chunk-8hsk6f6b.js → chunk-9qf0eg7m.js} +19 -19
  18. package/dist/{chunk-y11p1q7r.js → chunk-aqqywy8g.js} +4 -4
  19. package/dist/chunk-bcvx11fn.js +174 -0
  20. package/dist/{chunk-59arcerk.js → chunk-cyfeaz43.js} +86 -86
  21. package/dist/chunk-czq37rrt.js +286 -0
  22. package/dist/chunk-ec5z8bbq.js +126 -0
  23. package/dist/{chunk-rt9tq4j6.js → chunk-h9yxx0hd.js} +7 -7
  24. package/dist/{chunk-gasw078g.js → chunk-hma87efq.js} +40 -40
  25. package/dist/{chunk-5dny5jg1.js → chunk-hpv234hf.js} +11 -11
  26. package/dist/{chunk-y81cr6tp.js → chunk-k7xnsmp5.js} +158 -87
  27. package/dist/{chunk-zxzvketc.js → chunk-kbpkpxcn.js} +20 -19
  28. package/dist/{chunk-6tra3gw8.js → chunk-kjn1knb9.js} +7 -7
  29. package/dist/{chunk-0he2dx5n.js → chunk-p3s7cjfc.js} +15 -14
  30. package/dist/chunk-pq6hrtnb.js +49 -0
  31. package/dist/{chunk-mp2rqtcj.js → chunk-ptpy7nnm.js} +8 -8
  32. package/dist/{chunk-xqfj56m9.js → chunk-vn1rfxma.js} +8 -8
  33. package/dist/chunk-vyv8kvkv.js +113 -0
  34. package/dist/{chunk-h1v6w1fh.js → chunk-xe2zgyz7.js} +35 -35
  35. package/dist/chunk-y4dwmhn2.js +14 -0
  36. package/dist/{chunk-8kzaxz52.js → chunk-yypj3zn0.js} +8 -8
  37. package/dist/chunk-yzj1mfpr.js +1515 -0
  38. package/dist/client.js +62 -61
  39. package/dist/connectors/index.js +36 -37
  40. package/dist/contracts/artifact-markers.js +11 -12
  41. package/dist/contracts/artifacts.js +21 -23
  42. package/dist/contracts/automation-document/index.js +28 -30
  43. package/dist/contracts/pipeline-document/built-ins.d.ts +1 -1
  44. package/dist/contracts/pipeline-document/index.js +95 -97
  45. package/dist/contracts/step-artifact-submissions.js +20 -17
  46. package/dist/contracts/work-item-changes.js +8 -6
  47. package/dist/defaults/index.js +22 -23
  48. package/dist/definitions/automations/index.js +6 -8
  49. package/dist/definitions/environments/index.js +37 -38
  50. package/dist/definitions/pipelines/index.js +12 -14
  51. package/dist/definitions/steps/define-mcp.d.ts +2 -2
  52. package/dist/definitions/steps/index.js +93 -95
  53. package/dist/definitions/steps/mcp-server-config.d.ts +13 -3
  54. package/dist/definitions/steps/step-definitions-client.d.ts +18 -0
  55. package/dist/definitions/validation/index.js +17 -18
  56. package/dist/devcontainer-config-path.js +9 -11
  57. package/dist/env-vars.js +37 -39
  58. package/dist/environment.js +41 -42
  59. package/dist/eslint.js +0 -2
  60. package/dist/generated/index.d.ts +2 -2
  61. package/dist/generated/sdk.gen.d.ts +41 -1
  62. package/dist/generated/types.gen.d.ts +1801 -0
  63. package/dist/git-url/git-repo-identity.js +0 -2
  64. package/dist/health-checks.js +15 -17
  65. package/dist/index.js +364 -358
  66. package/dist/jsonc.js +7 -8
  67. package/dist/managed-connections.d.ts +16 -0
  68. package/dist/managed-connections.js +9 -0
  69. package/dist/managed-runtimes.js +9 -11
  70. package/dist/opencode-mcp.d.ts +55 -1
  71. package/dist/opencode-mcp.js +33 -28
  72. package/dist/pipelines/index.js +78 -81
  73. package/dist/push/code-step-lookup.js +9 -10
  74. package/dist/push/index.d.ts +1 -0
  75. package/dist/push/index.js +88 -59
  76. package/dist/push/push-from-directory.d.ts +3 -0
  77. package/dist/push/pushed-mcp-servers.d.ts +28 -0
  78. package/dist/repo-config.js +41 -43
  79. package/dist/resolve-environment.js +14 -15
  80. package/dist/scarn-config-parser.js +5 -6
  81. package/dist/task-plane-client.d.ts +137 -1
  82. package/package.json +6 -2
  83. package/dist/chunk-08gcnrzh.js +0 -96
  84. package/dist/chunk-5say64w8.js +0 -14
  85. package/dist/chunk-aph2js2v.js +0 -167
  86. package/dist/chunk-mrzn5tq4.js +0 -107
  87. package/dist/chunk-pwyj6qf3.js +0 -119
  88. package/dist/chunk-qt81x1pm.js +0 -275
  89. package/dist/chunk-vsp708vw.js +0 -167
  90. package/dist/chunk-y64skrwp.js +0 -17
  91. package/dist/chunk-y7ac1t9c.js +0 -39
@@ -1,30 +1,30 @@
1
1
  // @bun
2
2
  // src/contracts/pipeline-document/json.ts
3
- function isJsonObject(value) {
3
+ function isJsonObject2(value) {
4
4
  return typeof value === "object" && value !== null && !Array.isArray(value);
5
5
  }
6
6
  function escapePointerSegment(segment) {
7
7
  return String(segment).replaceAll("~", "~0").replaceAll("/", "~1");
8
8
  }
9
- function jsonPointer(segments) {
9
+ function jsonPointer2(segments) {
10
10
  return segments.map((segment) => `/${escapePointerSegment(segment)}`).join("");
11
11
  }
12
- function deepEqual(left, right) {
12
+ function deepEqual2(left, right) {
13
13
  if (left === right) {
14
14
  return true;
15
15
  }
16
16
  if (Array.isArray(left)) {
17
- return Array.isArray(right) && left.length === right.length && left.every((item, index) => deepEqual(item, right[index]));
17
+ return Array.isArray(right) && left.length === right.length && left.every((item, index) => deepEqual2(item, right[index]));
18
18
  }
19
- if (isJsonObject(left) && isJsonObject(right)) {
19
+ if (isJsonObject2(left) && isJsonObject2(right)) {
20
20
  const leftKeys = Object.keys(left);
21
21
  const rightKeys = Object.keys(right);
22
- return leftKeys.length === rightKeys.length && leftKeys.every((key) => Object.hasOwn(right, key) && deepEqual(left[key], right[key]));
22
+ return leftKeys.length === rightKeys.length && leftKeys.every((key) => Object.hasOwn(right, key) && deepEqual2(left[key], right[key]));
23
23
  }
24
24
  return false;
25
25
  }
26
26
  // src/contracts/pipeline-document/routes.ts
27
- function routeEntries(next) {
27
+ function routeEntries2(next) {
28
28
  if (next === undefined) {
29
29
  return [];
30
30
  }
@@ -44,14 +44,14 @@ function routeEntries(next) {
44
44
  }
45
45
  return entries;
46
46
  }
47
- function routeAt(next, kind, index) {
47
+ function routeAt2(next, kind, index) {
48
48
  if (next === undefined) {
49
49
  return;
50
50
  }
51
51
  return kind === "otherwise" ? next.otherwise : next.routes[index];
52
52
  }
53
- function isRouteOverridable(next, transition) {
54
- const route = routeAt(next, transition.kind, transition.index);
53
+ function isRouteOverridable2(next, transition) {
54
+ const route = routeAt2(next, transition.kind, transition.index);
55
55
  if (next === undefined || route === undefined) {
56
56
  return false;
57
57
  }
@@ -60,4 +60,4 @@ function isRouteOverridable(next, transition) {
60
60
  }
61
61
  return route.overridable ?? next.overridable ?? false;
62
62
  }
63
- export { isJsonObject, jsonPointer, deepEqual, routeEntries, routeAt, isRouteOverridable };
63
+ export { isJsonObject2, jsonPointer2, deepEqual2, routeEntries2, routeAt2, isRouteOverridable2 };
@@ -192,16 +192,16 @@ var serializeArrayParam = ({
192
192
  value
193
193
  }) => {
194
194
  if (!explode) {
195
- const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
195
+ const joinedValues = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
196
196
  switch (style) {
197
197
  case "label":
198
- return `.${joinedValues2}`;
198
+ return `.${joinedValues}`;
199
199
  case "matrix":
200
- return `;${name}=${joinedValues2}`;
200
+ return `;${name}=${joinedValues}`;
201
201
  case "simple":
202
- return joinedValues2;
202
+ return joinedValues;
203
203
  default:
204
- return `${name}=${joinedValues2}`;
204
+ return `${name}=${joinedValues}`;
205
205
  }
206
206
  }
207
207
  const separator = separatorArrayExplode(style);
@@ -250,16 +250,16 @@ var serializeObjectParam = ({
250
250
  allowReserved ? v : encodeURIComponent(v)
251
251
  ];
252
252
  });
253
- const joinedValues2 = values.join(",");
253
+ const joinedValues = values.join(",");
254
254
  switch (style) {
255
255
  case "form":
256
- return `${name}=${joinedValues2}`;
256
+ return `${name}=${joinedValues}`;
257
257
  case "label":
258
- return `.${joinedValues2}`;
258
+ return `.${joinedValues}`;
259
259
  case "matrix":
260
- return `;${name}=${joinedValues2}`;
260
+ return `;${name}=${joinedValues}`;
261
261
  default:
262
- return joinedValues2;
262
+ return joinedValues;
263
263
  }
264
264
  }
265
265
  const separator = separatorObjectExplode(style);
@@ -596,8 +596,8 @@ var createConfig = (override = {}) => ({
596
596
  var createClient = (config = {}) => {
597
597
  let _config = mergeConfigs(createConfig(), config);
598
598
  const getConfig = () => ({ ..._config });
599
- const setConfig = (config2) => {
600
- _config = mergeConfigs(_config, config2);
599
+ const setConfig = (config) => {
600
+ _config = mergeConfigs(_config, config);
601
601
  return getConfig();
602
602
  };
603
603
  const interceptors = createInterceptors();
@@ -634,40 +634,40 @@ var createClient = (config = {}) => {
634
634
  ...opts,
635
635
  body: getValidRequestBody(opts)
636
636
  };
637
- let request2 = new Request(url, requestInit);
637
+ let request = new Request(url, requestInit);
638
638
  for (const fn of interceptors.request.fns) {
639
639
  if (fn) {
640
- request2 = await fn(request2, opts);
640
+ request = await fn(request, opts);
641
641
  }
642
642
  }
643
643
  const _fetch = opts.fetch;
644
644
  let response;
645
645
  try {
646
- response = await _fetch(request2);
647
- } catch (error2) {
648
- let finalError2 = error2;
646
+ response = await _fetch(request);
647
+ } catch (error) {
648
+ let finalError = error;
649
649
  for (const fn of interceptors.error.fns) {
650
650
  if (fn) {
651
- finalError2 = await fn(error2, undefined, request2, opts);
651
+ finalError = await fn(error, undefined, request, opts);
652
652
  }
653
653
  }
654
- finalError2 = finalError2 || {};
654
+ finalError = finalError || {};
655
655
  if (opts.throwOnError) {
656
- throw finalError2;
656
+ throw finalError;
657
657
  }
658
658
  return opts.responseStyle === "data" ? undefined : {
659
- error: finalError2,
660
- request: request2,
659
+ error: finalError,
660
+ request,
661
661
  response: undefined
662
662
  };
663
663
  }
664
664
  for (const fn of interceptors.response.fns) {
665
665
  if (fn) {
666
- response = await fn(response, request2, opts);
666
+ response = await fn(response, request, opts);
667
667
  }
668
668
  }
669
669
  const result = {
670
- request: request2,
670
+ request,
671
671
  response
672
672
  };
673
673
  if (response.ok) {
@@ -737,7 +737,7 @@ var createClient = (config = {}) => {
737
737
  let finalError = error;
738
738
  for (const fn of interceptors.error.fns) {
739
739
  if (fn) {
740
- finalError = await fn(error, response, request2, opts);
740
+ finalError = await fn(error, response, request, opts);
741
741
  }
742
742
  }
743
743
  finalError = finalError || {};
@@ -757,14 +757,14 @@ var createClient = (config = {}) => {
757
757
  body: opts.body,
758
758
  headers: opts.headers,
759
759
  method,
760
- onRequest: async (url2, init) => {
761
- let request2 = new Request(url2, init);
760
+ onRequest: async (url, init) => {
761
+ let request = new Request(url, init);
762
762
  for (const fn of interceptors.request.fns) {
763
763
  if (fn) {
764
- request2 = await fn(request2, opts);
764
+ request = await fn(request, opts);
765
765
  }
766
766
  }
767
- return request2;
767
+ return request;
768
768
  },
769
769
  serializedBody: getValidRequestBody(opts),
770
770
  url
@@ -824,7 +824,7 @@ class HeyApiRegistry {
824
824
  }
825
825
  }
826
826
 
827
- class Api extends HeyApiClient {
827
+ class Api2 extends HeyApiClient {
828
828
  "*ApiAuth*"(options) {
829
829
  return (options?.client ?? this.client).delete({ url: "/api/auth/*", ...options });
830
830
  }
@@ -851,7 +851,7 @@ class Api extends HeyApiClient {
851
851
  }
852
852
  }
853
853
 
854
- class Projects extends HeyApiClient {
854
+ class Projects2 extends HeyApiClient {
855
855
  resolveProjectBySlug(options) {
856
856
  return (options.client ?? this.client).get({ url: "/api/projects/resolve", ...options });
857
857
  }
@@ -918,7 +918,7 @@ class Projects extends HeyApiClient {
918
918
  }
919
919
  }
920
920
 
921
- class StepDefinitions extends HeyApiClient {
921
+ class StepDefinitions2 extends HeyApiClient {
922
922
  listStepDefinitions(options) {
923
923
  return (options.client ?? this.client).get({ url: "/api/step-definitions", ...options });
924
924
  }
@@ -950,7 +950,7 @@ class StepDefinitions extends HeyApiClient {
950
950
  }
951
951
  }
952
952
 
953
- class Tasks extends HeyApiClient {
953
+ class Tasks2 extends HeyApiClient {
954
954
  createTask(options) {
955
955
  return (options.client ?? this.client).post({
956
956
  url: "/api/tasks",
@@ -985,7 +985,7 @@ class Tasks extends HeyApiClient {
985
985
  }
986
986
  }
987
987
 
988
- class TaskRuns extends HeyApiClient {
988
+ class TaskRuns2 extends HeyApiClient {
989
989
  claimTaskRuns(options) {
990
990
  return (options.client ?? this.client).post({
991
991
  url: "/api/task-runs/claims",
@@ -1173,9 +1173,19 @@ class TaskRuns extends HeyApiClient {
1173
1173
  }
1174
1174
  });
1175
1175
  }
1176
+ registerTaskRunManagedLaunch(options) {
1177
+ return (options.client ?? this.client).post({
1178
+ url: "/api/task-runs/{taskRunId}/managed-launch",
1179
+ ...options,
1180
+ headers: {
1181
+ "Content-Type": "application/json",
1182
+ ...options.headers
1183
+ }
1184
+ });
1185
+ }
1176
1186
  }
1177
1187
 
1178
- class PipelineDefinitions extends HeyApiClient {
1188
+ class PipelineDefinitions2 extends HeyApiClient {
1179
1189
  createPipelineDefinition(options) {
1180
1190
  return (options.client ?? this.client).post({
1181
1191
  url: "/api/pipeline-definitions",
@@ -1219,7 +1229,7 @@ class PipelineDefinitions extends HeyApiClient {
1219
1229
  }
1220
1230
  }
1221
1231
 
1222
- class Automations extends HeyApiClient {
1232
+ class Automations2 extends HeyApiClient {
1223
1233
  listAutomations(options) {
1224
1234
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/automations", ...options });
1225
1235
  }
@@ -1250,7 +1260,7 @@ class Automations extends HeyApiClient {
1250
1260
  }
1251
1261
  }
1252
1262
 
1253
- class PipelineExecutions extends HeyApiClient {
1263
+ class PipelineExecutions2 extends HeyApiClient {
1254
1264
  listPipelineExecutions(options) {
1255
1265
  return (options.client ?? this.client).get({ url: "/api/pipeline-executions", ...options });
1256
1266
  }
@@ -1340,7 +1350,7 @@ class PipelineExecutions extends HeyApiClient {
1340
1350
  }
1341
1351
  }
1342
1352
 
1343
- class WorkItems extends HeyApiClient {
1353
+ class WorkItems2 extends HeyApiClient {
1344
1354
  listWorkItemQuestions(options) {
1345
1355
  return (options.client ?? this.client).get({ url: "/api/work-items/{workItemId}/questions", ...options });
1346
1356
  }
@@ -1448,7 +1458,7 @@ class WorkItems extends HeyApiClient {
1448
1458
  }
1449
1459
  }
1450
1460
 
1451
- class Conversations extends HeyApiClient {
1461
+ class Conversations2 extends HeyApiClient {
1452
1462
  deleteProjectConversation(options) {
1453
1463
  return (options.client ?? this.client).delete({ url: "/api/conversations/{conversationId}", ...options });
1454
1464
  }
@@ -1502,7 +1512,7 @@ class Conversations extends HeyApiClient {
1502
1512
  }
1503
1513
  }
1504
1514
 
1505
- class WorkItemComments extends HeyApiClient {
1515
+ class WorkItemComments2 extends HeyApiClient {
1506
1516
  listWorkItemComments(options) {
1507
1517
  return (options.client ?? this.client).get({ url: "/api/work-item-comments", ...options });
1508
1518
  }
@@ -1541,7 +1551,7 @@ class WorkItemComments extends HeyApiClient {
1541
1551
  }
1542
1552
  }
1543
1553
 
1544
- class WorkItemCommentDrafts extends HeyApiClient {
1554
+ class WorkItemCommentDrafts2 extends HeyApiClient {
1545
1555
  listPendingCommentDrafts(options) {
1546
1556
  return (options.client ?? this.client).get({ url: "/api/work-item-comment-drafts", ...options });
1547
1557
  }
@@ -1560,7 +1570,7 @@ class WorkItemCommentDrafts extends HeyApiClient {
1560
1570
  }
1561
1571
  }
1562
1572
 
1563
- class WorkItemBlocks extends HeyApiClient {
1573
+ class WorkItemBlocks2 extends HeyApiClient {
1564
1574
  listWorkItemBlocks(options) {
1565
1575
  return (options.client ?? this.client).get({ url: "/api/work-item-blocks", ...options });
1566
1576
  }
@@ -1579,7 +1589,7 @@ class WorkItemBlocks extends HeyApiClient {
1579
1589
  }
1580
1590
  }
1581
1591
 
1582
- class ProjectArtifacts extends HeyApiClient {
1592
+ class ProjectArtifacts2 extends HeyApiClient {
1583
1593
  listProjectArtifacts(options) {
1584
1594
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/artifacts", ...options });
1585
1595
  }
@@ -1601,7 +1611,7 @@ class ProjectArtifacts extends HeyApiClient {
1601
1611
  }
1602
1612
  }
1603
1613
 
1604
- class UserNotifications extends HeyApiClient {
1614
+ class UserNotifications2 extends HeyApiClient {
1605
1615
  listUserNotifications(options) {
1606
1616
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notifications", ...options });
1607
1617
  }
@@ -1623,7 +1633,7 @@ class UserNotifications extends HeyApiClient {
1623
1633
  }
1624
1634
  }
1625
1635
 
1626
- class Inbox extends HeyApiClient {
1636
+ class Inbox2 extends HeyApiClient {
1627
1637
  listProjectInboxWaits(options) {
1628
1638
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/inbox/waits", ...options });
1629
1639
  }
@@ -1632,7 +1642,7 @@ class Inbox extends HeyApiClient {
1632
1642
  }
1633
1643
  }
1634
1644
 
1635
- class NotificationRules extends HeyApiClient {
1645
+ class NotificationRules2 extends HeyApiClient {
1636
1646
  listNotificationRules(options) {
1637
1647
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notification-rules", ...options });
1638
1648
  }
@@ -1648,7 +1658,7 @@ class NotificationRules extends HeyApiClient {
1648
1658
  }
1649
1659
  }
1650
1660
 
1651
- class ProjectIntegrations extends HeyApiClient {
1661
+ class ProjectIntegrations2 extends HeyApiClient {
1652
1662
  listProjectIntegrations(options) {
1653
1663
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/integrations", ...options });
1654
1664
  }
@@ -1690,7 +1700,7 @@ class ProjectIntegrations extends HeyApiClient {
1690
1700
  }
1691
1701
  }
1692
1702
 
1693
- class GitHubIntegrations extends HeyApiClient {
1703
+ class GitHubIntegrations2 extends HeyApiClient {
1694
1704
  beginGitHubAppInstall(options) {
1695
1705
  return (options?.client ?? this.client).get({ url: "/api/integrations/github/install", ...options });
1696
1706
  }
@@ -1708,7 +1718,7 @@ class GitHubIntegrations extends HeyApiClient {
1708
1718
  }
1709
1719
  }
1710
1720
 
1711
- class ProjectInvites extends HeyApiClient {
1721
+ class ProjectInvites2 extends HeyApiClient {
1712
1722
  getProjectInviteByToken(options) {
1713
1723
  return (options.client ?? this.client).get({ url: "/api/project-invites/{token}", ...options });
1714
1724
  }
@@ -1733,13 +1743,13 @@ class ProjectInvites extends HeyApiClient {
1733
1743
  }
1734
1744
  }
1735
1745
 
1736
- class Billing extends HeyApiClient {
1746
+ class Billing2 extends HeyApiClient {
1737
1747
  getOrgUsage(options) {
1738
1748
  return (options.client ?? this.client).get({ url: "/api/orgs/{orgId}/usage", ...options });
1739
1749
  }
1740
1750
  }
1741
1751
 
1742
- class Username extends HeyApiClient {
1752
+ class Username2 extends HeyApiClient {
1743
1753
  checkUsernameAvailable(options) {
1744
1754
  return (options.client ?? this.client).get({ url: "/api/username/available", ...options });
1745
1755
  }
@@ -1755,7 +1765,7 @@ class Username extends HeyApiClient {
1755
1765
  }
1756
1766
  }
1757
1767
 
1758
- class Secrets extends HeyApiClient {
1768
+ class Secrets2 extends HeyApiClient {
1759
1769
  listMySecrets(options) {
1760
1770
  return (options?.client ?? this.client).get({ url: "/api/me/secrets", ...options });
1761
1771
  }
@@ -1787,7 +1797,7 @@ class Secrets extends HeyApiClient {
1787
1797
  }
1788
1798
  }
1789
1799
 
1790
- class ProjectSecrets extends HeyApiClient {
1800
+ class ProjectSecrets2 extends HeyApiClient {
1791
1801
  listProjectSecrets(options) {
1792
1802
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/secrets", ...options });
1793
1803
  }
@@ -1816,7 +1826,7 @@ class ProjectSecrets extends HeyApiClient {
1816
1826
  }
1817
1827
  }
1818
1828
 
1819
- class Environments extends HeyApiClient {
1829
+ class Environments2 extends HeyApiClient {
1820
1830
  listEnvironments(options) {
1821
1831
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/environments", ...options });
1822
1832
  }
@@ -1838,137 +1848,198 @@ class Environments extends HeyApiClient {
1838
1848
  }
1839
1849
  }
1840
1850
 
1841
- class Connectors extends HeyApiClient {
1851
+ class Connectors2 extends HeyApiClient {
1842
1852
  listConnectors(options) {
1843
1853
  return (options?.client ?? this.client).get({ url: "/api/connectors", ...options });
1844
1854
  }
1845
1855
  }
1846
1856
 
1847
- class ScarnClient extends HeyApiClient {
1857
+ class Connections2 extends HeyApiClient {
1858
+ managedMcpOAuthCallback(options) {
1859
+ return (options?.client ?? this.client).get({ url: "/api/oauth/mcp/callback", ...options });
1860
+ }
1861
+ listManagedMcpConnections(options) {
1862
+ return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/mcp-connections", ...options });
1863
+ }
1864
+ startManagedMcpConnection(options) {
1865
+ return (options.client ?? this.client).post({
1866
+ url: "/api/projects/{projectId}/mcp-connections",
1867
+ ...options,
1868
+ headers: {
1869
+ "Content-Type": "application/json",
1870
+ ...options.headers
1871
+ }
1872
+ });
1873
+ }
1874
+ listManagedMcpConnectionPresets(options) {
1875
+ return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/mcp-connection-presets", ...options });
1876
+ }
1877
+ disconnectManagedMcpConnection(options) {
1878
+ return (options.client ?? this.client).delete({ url: "/api/projects/{projectId}/mcp-connections/{connectionId}", ...options });
1879
+ }
1880
+ getManagedMcpConnection(options) {
1881
+ return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/mcp-connections/{connectionId}", ...options });
1882
+ }
1883
+ getManagedMcpConnectionUsage(options) {
1884
+ return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/mcp-connections/{connectionId}/usage", ...options });
1885
+ }
1886
+ listManagedMcpConnectionTools(options) {
1887
+ return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/mcp-connections/{connectionId}/tools", ...options });
1888
+ }
1889
+ reconnectManagedMcpConnection(options) {
1890
+ return (options.client ?? this.client).post({ url: "/api/projects/{projectId}/mcp-connections/{connectionId}/reconnect", ...options });
1891
+ }
1892
+ confirmManagedMcpCandidate(options) {
1893
+ return (options.client ?? this.client).post({
1894
+ url: "/api/projects/{projectId}/mcp-connections/{connectionId}/candidate/confirm",
1895
+ ...options,
1896
+ headers: {
1897
+ "Content-Type": "application/json",
1898
+ ...options.headers
1899
+ }
1900
+ });
1901
+ }
1902
+ cancelManagedMcpCandidate(options) {
1903
+ return (options.client ?? this.client).post({
1904
+ url: "/api/projects/{projectId}/mcp-connections/{connectionId}/candidate/cancel",
1905
+ ...options,
1906
+ headers: {
1907
+ "Content-Type": "application/json",
1908
+ ...options.headers
1909
+ }
1910
+ });
1911
+ }
1912
+ }
1913
+
1914
+ class ScarnClient2 extends HeyApiClient {
1848
1915
  static __registry = new HeyApiRegistry;
1849
1916
  constructor(args) {
1850
1917
  super(args);
1851
- ScarnClient.__registry.set(this, args?.key);
1918
+ ScarnClient2.__registry.set(this, args?.key);
1852
1919
  }
1853
1920
  _api;
1854
1921
  get api() {
1855
- return this._api ??= new Api({ client: this.client });
1922
+ return this._api ??= new Api2({ client: this.client });
1856
1923
  }
1857
1924
  _projects;
1858
1925
  get projects() {
1859
- return this._projects ??= new Projects({ client: this.client });
1926
+ return this._projects ??= new Projects2({ client: this.client });
1860
1927
  }
1861
1928
  _stepDefinitions;
1862
1929
  get stepDefinitions() {
1863
- return this._stepDefinitions ??= new StepDefinitions({ client: this.client });
1930
+ return this._stepDefinitions ??= new StepDefinitions2({ client: this.client });
1864
1931
  }
1865
1932
  _tasks;
1866
1933
  get tasks() {
1867
- return this._tasks ??= new Tasks({ client: this.client });
1934
+ return this._tasks ??= new Tasks2({ client: this.client });
1868
1935
  }
1869
1936
  _taskRuns;
1870
1937
  get taskRuns() {
1871
- return this._taskRuns ??= new TaskRuns({ client: this.client });
1938
+ return this._taskRuns ??= new TaskRuns2({ client: this.client });
1872
1939
  }
1873
1940
  _pipelineDefinitions;
1874
1941
  get pipelineDefinitions() {
1875
- return this._pipelineDefinitions ??= new PipelineDefinitions({ client: this.client });
1942
+ return this._pipelineDefinitions ??= new PipelineDefinitions2({ client: this.client });
1876
1943
  }
1877
1944
  _automations;
1878
1945
  get automations() {
1879
- return this._automations ??= new Automations({ client: this.client });
1946
+ return this._automations ??= new Automations2({ client: this.client });
1880
1947
  }
1881
1948
  _pipelineExecutions;
1882
1949
  get pipelineExecutions() {
1883
- return this._pipelineExecutions ??= new PipelineExecutions({ client: this.client });
1950
+ return this._pipelineExecutions ??= new PipelineExecutions2({ client: this.client });
1884
1951
  }
1885
1952
  _workItems;
1886
1953
  get workItems() {
1887
- return this._workItems ??= new WorkItems({ client: this.client });
1954
+ return this._workItems ??= new WorkItems2({ client: this.client });
1888
1955
  }
1889
1956
  _conversations;
1890
1957
  get conversations() {
1891
- return this._conversations ??= new Conversations({ client: this.client });
1958
+ return this._conversations ??= new Conversations2({ client: this.client });
1892
1959
  }
1893
1960
  _workItemComments;
1894
1961
  get workItemComments() {
1895
- return this._workItemComments ??= new WorkItemComments({ client: this.client });
1962
+ return this._workItemComments ??= new WorkItemComments2({ client: this.client });
1896
1963
  }
1897
1964
  _workItemCommentDrafts;
1898
1965
  get workItemCommentDrafts() {
1899
- return this._workItemCommentDrafts ??= new WorkItemCommentDrafts({ client: this.client });
1966
+ return this._workItemCommentDrafts ??= new WorkItemCommentDrafts2({ client: this.client });
1900
1967
  }
1901
1968
  _workItemBlocks;
1902
1969
  get workItemBlocks() {
1903
- return this._workItemBlocks ??= new WorkItemBlocks({ client: this.client });
1970
+ return this._workItemBlocks ??= new WorkItemBlocks2({ client: this.client });
1904
1971
  }
1905
1972
  _projectArtifacts;
1906
1973
  get projectArtifacts() {
1907
- return this._projectArtifacts ??= new ProjectArtifacts({ client: this.client });
1974
+ return this._projectArtifacts ??= new ProjectArtifacts2({ client: this.client });
1908
1975
  }
1909
1976
  _userNotifications;
1910
1977
  get userNotifications() {
1911
- return this._userNotifications ??= new UserNotifications({ client: this.client });
1978
+ return this._userNotifications ??= new UserNotifications2({ client: this.client });
1912
1979
  }
1913
1980
  _inbox;
1914
1981
  get inbox() {
1915
- return this._inbox ??= new Inbox({ client: this.client });
1982
+ return this._inbox ??= new Inbox2({ client: this.client });
1916
1983
  }
1917
1984
  _notificationRules;
1918
1985
  get notificationRules() {
1919
- return this._notificationRules ??= new NotificationRules({ client: this.client });
1986
+ return this._notificationRules ??= new NotificationRules2({ client: this.client });
1920
1987
  }
1921
1988
  _projectIntegrations;
1922
1989
  get projectIntegrations() {
1923
- return this._projectIntegrations ??= new ProjectIntegrations({ client: this.client });
1990
+ return this._projectIntegrations ??= new ProjectIntegrations2({ client: this.client });
1924
1991
  }
1925
1992
  _gitHubIntegrations;
1926
1993
  get gitHubIntegrations() {
1927
- return this._gitHubIntegrations ??= new GitHubIntegrations({ client: this.client });
1994
+ return this._gitHubIntegrations ??= new GitHubIntegrations2({ client: this.client });
1928
1995
  }
1929
1996
  _projectInvites;
1930
1997
  get projectInvites() {
1931
- return this._projectInvites ??= new ProjectInvites({ client: this.client });
1998
+ return this._projectInvites ??= new ProjectInvites2({ client: this.client });
1932
1999
  }
1933
2000
  _billing;
1934
2001
  get billing() {
1935
- return this._billing ??= new Billing({ client: this.client });
2002
+ return this._billing ??= new Billing2({ client: this.client });
1936
2003
  }
1937
2004
  _username;
1938
2005
  get username() {
1939
- return this._username ??= new Username({ client: this.client });
2006
+ return this._username ??= new Username2({ client: this.client });
1940
2007
  }
1941
2008
  _secrets;
1942
2009
  get secrets() {
1943
- return this._secrets ??= new Secrets({ client: this.client });
2010
+ return this._secrets ??= new Secrets2({ client: this.client });
1944
2011
  }
1945
2012
  _projectSecrets;
1946
2013
  get projectSecrets() {
1947
- return this._projectSecrets ??= new ProjectSecrets({ client: this.client });
2014
+ return this._projectSecrets ??= new ProjectSecrets2({ client: this.client });
1948
2015
  }
1949
2016
  _environments;
1950
2017
  get environments() {
1951
- return this._environments ??= new Environments({ client: this.client });
2018
+ return this._environments ??= new Environments2({ client: this.client });
1952
2019
  }
1953
2020
  _connectors;
1954
2021
  get connectors() {
1955
- return this._connectors ??= new Connectors({ client: this.client });
2022
+ return this._connectors ??= new Connectors2({ client: this.client });
2023
+ }
2024
+ _connections;
2025
+ get connections() {
2026
+ return this._connections ??= new Connections2({ client: this.client });
1956
2027
  }
1957
2028
  }
1958
2029
 
1959
2030
  // src/create-api-client.ts
1960
2031
  function createApiClient(baseUrl, options) {
1961
- const client2 = createClient({
2032
+ const client = createClient({
1962
2033
  baseUrl,
1963
2034
  headers: options?.headers,
1964
2035
  fetch: options?.fetch
1965
2036
  });
1966
- client2.interceptors.error.use((error, response) => {
2037
+ client.interceptors.error.use((error, response) => {
1967
2038
  if (response === undefined)
1968
2039
  throw error;
1969
2040
  return error;
1970
2041
  });
1971
- return client2;
2042
+ return client;
1972
2043
  }
1973
2044
 
1974
- export { Api, Projects, StepDefinitions, Tasks, TaskRuns, PipelineDefinitions, Automations, PipelineExecutions, WorkItems, Conversations, WorkItemComments, WorkItemCommentDrafts, WorkItemBlocks, ProjectArtifacts, UserNotifications, Inbox, NotificationRules, ProjectIntegrations, GitHubIntegrations, ProjectInvites, Billing, Username, Secrets, ProjectSecrets, Environments, Connectors, ScarnClient, createApiClient };
2045
+ export { Api2, Projects2, StepDefinitions2, Tasks2, TaskRuns2, PipelineDefinitions2, Automations2, PipelineExecutions2, WorkItems2, Conversations2, WorkItemComments2, WorkItemCommentDrafts2, WorkItemBlocks2, ProjectArtifacts2, UserNotifications2, Inbox2, NotificationRules2, ProjectIntegrations2, GitHubIntegrations2, ProjectInvites2, Billing2, Username2, Secrets2, ProjectSecrets2, Environments2, Connectors2, Connections2, ScarnClient2, createApiClient };