@scarn/sdk 0.8.20 → 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 (102) hide show
  1. package/dist/auth/api-token-cache.d.ts +24 -0
  2. package/dist/auth/api-token-source.d.ts +39 -0
  3. package/dist/auth/authenticated-fetch.d.ts +10 -0
  4. package/dist/auth/index.d.ts +3 -0
  5. package/dist/auth/index.js +19 -0
  6. package/dist/automations/index.js +14 -17
  7. package/dist/{chunk-habmdf89.js → chunk-0bwsjn0b.js} +29 -29
  8. package/dist/{chunk-mzj1j0p5.js → chunk-0w13kxkr.js} +34 -31
  9. package/dist/{chunk-qgkx89eg.js → chunk-3j5wf2t5.js} +44 -43
  10. package/dist/{chunk-0y2fy5en.js → chunk-4361gxk0.js} +7 -7
  11. package/dist/{chunk-n3ywwx7n.js → chunk-52520csz.js} +15 -14
  12. package/dist/chunk-5dnfgyx8.js +159 -0
  13. package/dist/{chunk-tr3v83cn.js → chunk-5fa4arn1.js} +18 -11
  14. package/dist/{chunk-ngy1fdcx.js → chunk-631ffb6r.js} +10 -10
  15. package/dist/{chunk-01nfqm18.js → chunk-7anj08zc.js} +11 -9
  16. package/dist/{chunk-yq0sf8sb.js → chunk-7dr4kybf.js} +483 -451
  17. package/dist/chunk-7mhr5aex.js +171 -0
  18. package/dist/chunk-7rywbqzz.js +27 -0
  19. package/dist/{chunk-yf15kdte.js → chunk-9ct3xypr.js} +2636 -3864
  20. package/dist/chunk-9geh4c3v.js +1034 -0
  21. package/dist/{chunk-19brnwkp.js → chunk-9qf0eg7m.js} +19 -19
  22. package/dist/{chunk-y11p1q7r.js → chunk-aqqywy8g.js} +4 -4
  23. package/dist/chunk-bcvx11fn.js +174 -0
  24. package/dist/{chunk-z4smq8qd.js → chunk-cyfeaz43.js} +86 -86
  25. package/dist/chunk-czq37rrt.js +286 -0
  26. package/dist/chunk-ec5z8bbq.js +126 -0
  27. package/dist/{chunk-rt9tq4j6.js → chunk-h9yxx0hd.js} +7 -7
  28. package/dist/{chunk-t1dq2c2s.js → chunk-hma87efq.js} +40 -40
  29. package/dist/{chunk-5dny5jg1.js → chunk-hpv234hf.js} +11 -11
  30. package/dist/{chunk-rq5k7m33.js → chunk-k7xnsmp5.js} +182 -97
  31. package/dist/{chunk-91f5gm5z.js → chunk-kbpkpxcn.js} +22 -21
  32. package/dist/{chunk-6tra3gw8.js → chunk-kjn1knb9.js} +7 -7
  33. package/dist/{chunk-g4j5cfpc.js → chunk-p3s7cjfc.js} +17 -16
  34. package/dist/chunk-pq6hrtnb.js +49 -0
  35. package/dist/{chunk-mp2rqtcj.js → chunk-ptpy7nnm.js} +8 -8
  36. package/dist/{chunk-xqfj56m9.js → chunk-vn1rfxma.js} +8 -8
  37. package/dist/chunk-vyv8kvkv.js +113 -0
  38. package/dist/{chunk-0c60x3v8.js → chunk-xe2zgyz7.js} +35 -35
  39. package/dist/chunk-y4dwmhn2.js +14 -0
  40. package/dist/{chunk-098740f7.js → chunk-yypj3zn0.js} +8 -8
  41. package/dist/chunk-yzj1mfpr.js +1515 -0
  42. package/dist/client.d.ts +5 -1
  43. package/dist/client.js +62 -61
  44. package/dist/connectors/index.js +36 -37
  45. package/dist/contracts/artifact-markers.js +11 -12
  46. package/dist/contracts/artifacts.js +21 -23
  47. package/dist/contracts/automation-document/index.js +28 -30
  48. package/dist/contracts/pipeline-document/built-ins.d.ts +1 -1
  49. package/dist/contracts/pipeline-document/index.js +95 -97
  50. package/dist/contracts/step-artifact-submissions.js +20 -17
  51. package/dist/contracts/work-item-changes.js +8 -6
  52. package/dist/create-api-client.d.ts +11 -0
  53. package/dist/defaults/index.js +44 -884
  54. package/dist/defaults/load-push-defaults.d.ts +11 -4
  55. package/dist/defaults/project-ref.d.ts +2 -4
  56. package/dist/definitions/automations/automations-client.d.ts +2 -1
  57. package/dist/definitions/automations/index.js +6 -8
  58. package/dist/definitions/environments/environments-client.d.ts +2 -1
  59. package/dist/definitions/environments/index.js +37 -38
  60. package/dist/definitions/pipelines/index.js +12 -14
  61. package/dist/definitions/pipelines/pipeline-definitions-client.d.ts +2 -1
  62. package/dist/definitions/steps/define-mcp.d.ts +2 -2
  63. package/dist/definitions/steps/index.js +93 -95
  64. package/dist/definitions/steps/mcp-server-config.d.ts +13 -3
  65. package/dist/definitions/steps/step-definitions-client.d.ts +20 -1
  66. package/dist/definitions/validation/index.js +17 -18
  67. package/dist/devcontainer-config-path.js +9 -11
  68. package/dist/env-vars.js +37 -39
  69. package/dist/environment.js +41 -42
  70. package/dist/eslint.js +0 -2
  71. package/dist/generated/index.d.ts +2 -2
  72. package/dist/generated/sdk.gen.d.ts +41 -1
  73. package/dist/generated/types.gen.d.ts +1801 -0
  74. package/dist/git-url/git-repo-identity.js +0 -2
  75. package/dist/health-checks.js +15 -17
  76. package/dist/index.js +364 -358
  77. package/dist/jsonc.js +7 -8
  78. package/dist/managed-connections.d.ts +16 -0
  79. package/dist/managed-connections.js +9 -0
  80. package/dist/managed-runtimes.js +9 -11
  81. package/dist/opencode-mcp.d.ts +55 -1
  82. package/dist/opencode-mcp.js +33 -28
  83. package/dist/pipelines/index.js +78 -81
  84. package/dist/push/code-step-lookup.js +9 -10
  85. package/dist/push/index.d.ts +1 -0
  86. package/dist/push/index.js +109 -79
  87. package/dist/push/push-from-directory.d.ts +9 -1
  88. package/dist/push/pushed-mcp-servers.d.ts +28 -0
  89. package/dist/repo-config.js +41 -43
  90. package/dist/resolve-environment.js +14 -15
  91. package/dist/scarn-config-parser.js +5 -6
  92. package/dist/task-plane-client.d.ts +143 -1
  93. package/package.json +11 -3
  94. package/dist/chunk-46wmsgv7.js +0 -14
  95. package/dist/chunk-a56zc4s5.js +0 -119
  96. package/dist/chunk-aemxz9r7.js +0 -107
  97. package/dist/chunk-b9ja6ss5.js +0 -275
  98. package/dist/chunk-e0pt5x0e.js +0 -167
  99. package/dist/chunk-pqtd0hr7.js +0 -96
  100. package/dist/chunk-rphfy0fj.js +0 -167
  101. package/dist/chunk-y34zsgsw.js +0 -39
  102. package/dist/chunk-y64skrwp.js +0 -17
@@ -1,4 +1,16 @@
1
1
  // @bun
2
+ // src/generated/core/bodySerializer.gen.ts
3
+ var jsonBodySerializer = {
4
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
5
+ };
6
+ // src/generated/core/params.gen.ts
7
+ var extraPrefixesMap = {
8
+ $body_: "body",
9
+ $headers_: "headers",
10
+ $path_: "path",
11
+ $query_: "query"
12
+ };
13
+ var extraPrefixes = Object.entries(extraPrefixesMap);
2
14
  // src/generated/core/serverSentEvents.gen.ts
3
15
  var createSseClient = ({
4
16
  onRequest,
@@ -180,16 +192,16 @@ var serializeArrayParam = ({
180
192
  value
181
193
  }) => {
182
194
  if (!explode) {
183
- 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));
184
196
  switch (style) {
185
197
  case "label":
186
- return `.${joinedValues2}`;
198
+ return `.${joinedValues}`;
187
199
  case "matrix":
188
- return `;${name}=${joinedValues2}`;
200
+ return `;${name}=${joinedValues}`;
189
201
  case "simple":
190
- return joinedValues2;
202
+ return joinedValues;
191
203
  default:
192
- return `${name}=${joinedValues2}`;
204
+ return `${name}=${joinedValues}`;
193
205
  }
194
206
  }
195
207
  const separator = separatorArrayExplode(style);
@@ -238,16 +250,16 @@ var serializeObjectParam = ({
238
250
  allowReserved ? v : encodeURIComponent(v)
239
251
  ];
240
252
  });
241
- const joinedValues2 = values.join(",");
253
+ const joinedValues = values.join(",");
242
254
  switch (style) {
243
255
  case "form":
244
- return `${name}=${joinedValues2}`;
256
+ return `${name}=${joinedValues}`;
245
257
  case "label":
246
- return `.${joinedValues2}`;
258
+ return `.${joinedValues}`;
247
259
  case "matrix":
248
- return `;${name}=${joinedValues2}`;
260
+ return `;${name}=${joinedValues}`;
249
261
  default:
250
- return joinedValues2;
262
+ return joinedValues;
251
263
  }
252
264
  }
253
265
  const separator = separatorObjectExplode(style);
@@ -363,11 +375,6 @@ var getAuthToken = async (auth, callback) => {
363
375
  return token;
364
376
  };
365
377
 
366
- // src/generated/core/bodySerializer.gen.ts
367
- var jsonBodySerializer = {
368
- bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
369
- };
370
-
371
378
  // src/generated/client/utils.gen.ts
372
379
  var createQuerySerializer = ({
373
380
  parameters = {},
@@ -589,8 +596,8 @@ var createConfig = (override = {}) => ({
589
596
  var createClient = (config = {}) => {
590
597
  let _config = mergeConfigs(createConfig(), config);
591
598
  const getConfig = () => ({ ..._config });
592
- const setConfig = (config2) => {
593
- _config = mergeConfigs(_config, config2);
599
+ const setConfig = (config) => {
600
+ _config = mergeConfigs(_config, config);
594
601
  return getConfig();
595
602
  };
596
603
  const interceptors = createInterceptors();
@@ -627,40 +634,40 @@ var createClient = (config = {}) => {
627
634
  ...opts,
628
635
  body: getValidRequestBody(opts)
629
636
  };
630
- let request2 = new Request(url, requestInit);
637
+ let request = new Request(url, requestInit);
631
638
  for (const fn of interceptors.request.fns) {
632
639
  if (fn) {
633
- request2 = await fn(request2, opts);
640
+ request = await fn(request, opts);
634
641
  }
635
642
  }
636
643
  const _fetch = opts.fetch;
637
644
  let response;
638
645
  try {
639
- response = await _fetch(request2);
640
- } catch (error2) {
641
- let finalError2 = error2;
646
+ response = await _fetch(request);
647
+ } catch (error) {
648
+ let finalError = error;
642
649
  for (const fn of interceptors.error.fns) {
643
650
  if (fn) {
644
- finalError2 = await fn(error2, undefined, request2, opts);
651
+ finalError = await fn(error, undefined, request, opts);
645
652
  }
646
653
  }
647
- finalError2 = finalError2 || {};
654
+ finalError = finalError || {};
648
655
  if (opts.throwOnError) {
649
- throw finalError2;
656
+ throw finalError;
650
657
  }
651
658
  return opts.responseStyle === "data" ? undefined : {
652
- error: finalError2,
653
- request: request2,
659
+ error: finalError,
660
+ request,
654
661
  response: undefined
655
662
  };
656
663
  }
657
664
  for (const fn of interceptors.response.fns) {
658
665
  if (fn) {
659
- response = await fn(response, request2, opts);
666
+ response = await fn(response, request, opts);
660
667
  }
661
668
  }
662
669
  const result = {
663
- request: request2,
670
+ request,
664
671
  response
665
672
  };
666
673
  if (response.ok) {
@@ -730,7 +737,7 @@ var createClient = (config = {}) => {
730
737
  let finalError = error;
731
738
  for (const fn of interceptors.error.fns) {
732
739
  if (fn) {
733
- finalError = await fn(error, response, request2, opts);
740
+ finalError = await fn(error, response, request, opts);
734
741
  }
735
742
  }
736
743
  finalError = finalError || {};
@@ -750,14 +757,14 @@ var createClient = (config = {}) => {
750
757
  body: opts.body,
751
758
  headers: opts.headers,
752
759
  method,
753
- onRequest: async (url2, init) => {
754
- let request2 = new Request(url2, init);
760
+ onRequest: async (url, init) => {
761
+ let request = new Request(url, init);
755
762
  for (const fn of interceptors.request.fns) {
756
763
  if (fn) {
757
- request2 = await fn(request2, opts);
764
+ request = await fn(request, opts);
758
765
  }
759
766
  }
760
- return request2;
767
+ return request;
761
768
  },
762
769
  serializedBody: getValidRequestBody(opts),
763
770
  url
@@ -791,14 +798,6 @@ var createClient = (config = {}) => {
791
798
  trace: makeMethodFn("TRACE")
792
799
  };
793
800
  };
794
- // src/generated/core/params.gen.ts
795
- var extraPrefixesMap = {
796
- $body_: "body",
797
- $headers_: "headers",
798
- $path_: "path",
799
- $query_: "query"
800
- };
801
- var extraPrefixes = Object.entries(extraPrefixesMap);
802
801
  // src/generated/client.gen.ts
803
802
  var client = createClient(createConfig());
804
803
 
@@ -825,7 +824,7 @@ class HeyApiRegistry {
825
824
  }
826
825
  }
827
826
 
828
- class Api extends HeyApiClient {
827
+ class Api2 extends HeyApiClient {
829
828
  "*ApiAuth*"(options) {
830
829
  return (options?.client ?? this.client).delete({ url: "/api/auth/*", ...options });
831
830
  }
@@ -852,7 +851,7 @@ class Api extends HeyApiClient {
852
851
  }
853
852
  }
854
853
 
855
- class Projects extends HeyApiClient {
854
+ class Projects2 extends HeyApiClient {
856
855
  resolveProjectBySlug(options) {
857
856
  return (options.client ?? this.client).get({ url: "/api/projects/resolve", ...options });
858
857
  }
@@ -919,7 +918,7 @@ class Projects extends HeyApiClient {
919
918
  }
920
919
  }
921
920
 
922
- class StepDefinitions extends HeyApiClient {
921
+ class StepDefinitions2 extends HeyApiClient {
923
922
  listStepDefinitions(options) {
924
923
  return (options.client ?? this.client).get({ url: "/api/step-definitions", ...options });
925
924
  }
@@ -951,7 +950,7 @@ class StepDefinitions extends HeyApiClient {
951
950
  }
952
951
  }
953
952
 
954
- class Tasks extends HeyApiClient {
953
+ class Tasks2 extends HeyApiClient {
955
954
  createTask(options) {
956
955
  return (options.client ?? this.client).post({
957
956
  url: "/api/tasks",
@@ -986,7 +985,7 @@ class Tasks extends HeyApiClient {
986
985
  }
987
986
  }
988
987
 
989
- class TaskRuns extends HeyApiClient {
988
+ class TaskRuns2 extends HeyApiClient {
990
989
  claimTaskRuns(options) {
991
990
  return (options.client ?? this.client).post({
992
991
  url: "/api/task-runs/claims",
@@ -1174,9 +1173,19 @@ class TaskRuns extends HeyApiClient {
1174
1173
  }
1175
1174
  });
1176
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
+ }
1177
1186
  }
1178
1187
 
1179
- class PipelineDefinitions extends HeyApiClient {
1188
+ class PipelineDefinitions2 extends HeyApiClient {
1180
1189
  createPipelineDefinition(options) {
1181
1190
  return (options.client ?? this.client).post({
1182
1191
  url: "/api/pipeline-definitions",
@@ -1220,7 +1229,7 @@ class PipelineDefinitions extends HeyApiClient {
1220
1229
  }
1221
1230
  }
1222
1231
 
1223
- class Automations extends HeyApiClient {
1232
+ class Automations2 extends HeyApiClient {
1224
1233
  listAutomations(options) {
1225
1234
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/automations", ...options });
1226
1235
  }
@@ -1251,7 +1260,7 @@ class Automations extends HeyApiClient {
1251
1260
  }
1252
1261
  }
1253
1262
 
1254
- class PipelineExecutions extends HeyApiClient {
1263
+ class PipelineExecutions2 extends HeyApiClient {
1255
1264
  listPipelineExecutions(options) {
1256
1265
  return (options.client ?? this.client).get({ url: "/api/pipeline-executions", ...options });
1257
1266
  }
@@ -1341,7 +1350,7 @@ class PipelineExecutions extends HeyApiClient {
1341
1350
  }
1342
1351
  }
1343
1352
 
1344
- class WorkItems extends HeyApiClient {
1353
+ class WorkItems2 extends HeyApiClient {
1345
1354
  listWorkItemQuestions(options) {
1346
1355
  return (options.client ?? this.client).get({ url: "/api/work-items/{workItemId}/questions", ...options });
1347
1356
  }
@@ -1449,7 +1458,7 @@ class WorkItems extends HeyApiClient {
1449
1458
  }
1450
1459
  }
1451
1460
 
1452
- class Conversations extends HeyApiClient {
1461
+ class Conversations2 extends HeyApiClient {
1453
1462
  deleteProjectConversation(options) {
1454
1463
  return (options.client ?? this.client).delete({ url: "/api/conversations/{conversationId}", ...options });
1455
1464
  }
@@ -1503,7 +1512,7 @@ class Conversations extends HeyApiClient {
1503
1512
  }
1504
1513
  }
1505
1514
 
1506
- class WorkItemComments extends HeyApiClient {
1515
+ class WorkItemComments2 extends HeyApiClient {
1507
1516
  listWorkItemComments(options) {
1508
1517
  return (options.client ?? this.client).get({ url: "/api/work-item-comments", ...options });
1509
1518
  }
@@ -1542,7 +1551,7 @@ class WorkItemComments extends HeyApiClient {
1542
1551
  }
1543
1552
  }
1544
1553
 
1545
- class WorkItemCommentDrafts extends HeyApiClient {
1554
+ class WorkItemCommentDrafts2 extends HeyApiClient {
1546
1555
  listPendingCommentDrafts(options) {
1547
1556
  return (options.client ?? this.client).get({ url: "/api/work-item-comment-drafts", ...options });
1548
1557
  }
@@ -1561,7 +1570,7 @@ class WorkItemCommentDrafts extends HeyApiClient {
1561
1570
  }
1562
1571
  }
1563
1572
 
1564
- class WorkItemBlocks extends HeyApiClient {
1573
+ class WorkItemBlocks2 extends HeyApiClient {
1565
1574
  listWorkItemBlocks(options) {
1566
1575
  return (options.client ?? this.client).get({ url: "/api/work-item-blocks", ...options });
1567
1576
  }
@@ -1580,7 +1589,7 @@ class WorkItemBlocks extends HeyApiClient {
1580
1589
  }
1581
1590
  }
1582
1591
 
1583
- class ProjectArtifacts extends HeyApiClient {
1592
+ class ProjectArtifacts2 extends HeyApiClient {
1584
1593
  listProjectArtifacts(options) {
1585
1594
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/artifacts", ...options });
1586
1595
  }
@@ -1602,7 +1611,7 @@ class ProjectArtifacts extends HeyApiClient {
1602
1611
  }
1603
1612
  }
1604
1613
 
1605
- class UserNotifications extends HeyApiClient {
1614
+ class UserNotifications2 extends HeyApiClient {
1606
1615
  listUserNotifications(options) {
1607
1616
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notifications", ...options });
1608
1617
  }
@@ -1624,7 +1633,7 @@ class UserNotifications extends HeyApiClient {
1624
1633
  }
1625
1634
  }
1626
1635
 
1627
- class Inbox extends HeyApiClient {
1636
+ class Inbox2 extends HeyApiClient {
1628
1637
  listProjectInboxWaits(options) {
1629
1638
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/inbox/waits", ...options });
1630
1639
  }
@@ -1633,7 +1642,7 @@ class Inbox extends HeyApiClient {
1633
1642
  }
1634
1643
  }
1635
1644
 
1636
- class NotificationRules extends HeyApiClient {
1645
+ class NotificationRules2 extends HeyApiClient {
1637
1646
  listNotificationRules(options) {
1638
1647
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notification-rules", ...options });
1639
1648
  }
@@ -1649,7 +1658,7 @@ class NotificationRules extends HeyApiClient {
1649
1658
  }
1650
1659
  }
1651
1660
 
1652
- class ProjectIntegrations extends HeyApiClient {
1661
+ class ProjectIntegrations2 extends HeyApiClient {
1653
1662
  listProjectIntegrations(options) {
1654
1663
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/integrations", ...options });
1655
1664
  }
@@ -1691,7 +1700,7 @@ class ProjectIntegrations extends HeyApiClient {
1691
1700
  }
1692
1701
  }
1693
1702
 
1694
- class GitHubIntegrations extends HeyApiClient {
1703
+ class GitHubIntegrations2 extends HeyApiClient {
1695
1704
  beginGitHubAppInstall(options) {
1696
1705
  return (options?.client ?? this.client).get({ url: "/api/integrations/github/install", ...options });
1697
1706
  }
@@ -1709,7 +1718,7 @@ class GitHubIntegrations extends HeyApiClient {
1709
1718
  }
1710
1719
  }
1711
1720
 
1712
- class ProjectInvites extends HeyApiClient {
1721
+ class ProjectInvites2 extends HeyApiClient {
1713
1722
  getProjectInviteByToken(options) {
1714
1723
  return (options.client ?? this.client).get({ url: "/api/project-invites/{token}", ...options });
1715
1724
  }
@@ -1734,13 +1743,13 @@ class ProjectInvites extends HeyApiClient {
1734
1743
  }
1735
1744
  }
1736
1745
 
1737
- class Billing extends HeyApiClient {
1746
+ class Billing2 extends HeyApiClient {
1738
1747
  getOrgUsage(options) {
1739
1748
  return (options.client ?? this.client).get({ url: "/api/orgs/{orgId}/usage", ...options });
1740
1749
  }
1741
1750
  }
1742
1751
 
1743
- class Username extends HeyApiClient {
1752
+ class Username2 extends HeyApiClient {
1744
1753
  checkUsernameAvailable(options) {
1745
1754
  return (options.client ?? this.client).get({ url: "/api/username/available", ...options });
1746
1755
  }
@@ -1756,7 +1765,7 @@ class Username extends HeyApiClient {
1756
1765
  }
1757
1766
  }
1758
1767
 
1759
- class Secrets extends HeyApiClient {
1768
+ class Secrets2 extends HeyApiClient {
1760
1769
  listMySecrets(options) {
1761
1770
  return (options?.client ?? this.client).get({ url: "/api/me/secrets", ...options });
1762
1771
  }
@@ -1788,7 +1797,7 @@ class Secrets extends HeyApiClient {
1788
1797
  }
1789
1798
  }
1790
1799
 
1791
- class ProjectSecrets extends HeyApiClient {
1800
+ class ProjectSecrets2 extends HeyApiClient {
1792
1801
  listProjectSecrets(options) {
1793
1802
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/secrets", ...options });
1794
1803
  }
@@ -1817,7 +1826,7 @@ class ProjectSecrets extends HeyApiClient {
1817
1826
  }
1818
1827
  }
1819
1828
 
1820
- class Environments extends HeyApiClient {
1829
+ class Environments2 extends HeyApiClient {
1821
1830
  listEnvironments(options) {
1822
1831
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/environments", ...options });
1823
1832
  }
@@ -1839,122 +1848,198 @@ class Environments extends HeyApiClient {
1839
1848
  }
1840
1849
  }
1841
1850
 
1842
- class Connectors extends HeyApiClient {
1851
+ class Connectors2 extends HeyApiClient {
1843
1852
  listConnectors(options) {
1844
1853
  return (options?.client ?? this.client).get({ url: "/api/connectors", ...options });
1845
1854
  }
1846
1855
  }
1847
1856
 
1848
- 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 {
1849
1915
  static __registry = new HeyApiRegistry;
1850
1916
  constructor(args) {
1851
1917
  super(args);
1852
- ScarnClient.__registry.set(this, args?.key);
1918
+ ScarnClient2.__registry.set(this, args?.key);
1853
1919
  }
1854
1920
  _api;
1855
1921
  get api() {
1856
- return this._api ??= new Api({ client: this.client });
1922
+ return this._api ??= new Api2({ client: this.client });
1857
1923
  }
1858
1924
  _projects;
1859
1925
  get projects() {
1860
- return this._projects ??= new Projects({ client: this.client });
1926
+ return this._projects ??= new Projects2({ client: this.client });
1861
1927
  }
1862
1928
  _stepDefinitions;
1863
1929
  get stepDefinitions() {
1864
- return this._stepDefinitions ??= new StepDefinitions({ client: this.client });
1930
+ return this._stepDefinitions ??= new StepDefinitions2({ client: this.client });
1865
1931
  }
1866
1932
  _tasks;
1867
1933
  get tasks() {
1868
- return this._tasks ??= new Tasks({ client: this.client });
1934
+ return this._tasks ??= new Tasks2({ client: this.client });
1869
1935
  }
1870
1936
  _taskRuns;
1871
1937
  get taskRuns() {
1872
- return this._taskRuns ??= new TaskRuns({ client: this.client });
1938
+ return this._taskRuns ??= new TaskRuns2({ client: this.client });
1873
1939
  }
1874
1940
  _pipelineDefinitions;
1875
1941
  get pipelineDefinitions() {
1876
- return this._pipelineDefinitions ??= new PipelineDefinitions({ client: this.client });
1942
+ return this._pipelineDefinitions ??= new PipelineDefinitions2({ client: this.client });
1877
1943
  }
1878
1944
  _automations;
1879
1945
  get automations() {
1880
- return this._automations ??= new Automations({ client: this.client });
1946
+ return this._automations ??= new Automations2({ client: this.client });
1881
1947
  }
1882
1948
  _pipelineExecutions;
1883
1949
  get pipelineExecutions() {
1884
- return this._pipelineExecutions ??= new PipelineExecutions({ client: this.client });
1950
+ return this._pipelineExecutions ??= new PipelineExecutions2({ client: this.client });
1885
1951
  }
1886
1952
  _workItems;
1887
1953
  get workItems() {
1888
- return this._workItems ??= new WorkItems({ client: this.client });
1954
+ return this._workItems ??= new WorkItems2({ client: this.client });
1889
1955
  }
1890
1956
  _conversations;
1891
1957
  get conversations() {
1892
- return this._conversations ??= new Conversations({ client: this.client });
1958
+ return this._conversations ??= new Conversations2({ client: this.client });
1893
1959
  }
1894
1960
  _workItemComments;
1895
1961
  get workItemComments() {
1896
- return this._workItemComments ??= new WorkItemComments({ client: this.client });
1962
+ return this._workItemComments ??= new WorkItemComments2({ client: this.client });
1897
1963
  }
1898
1964
  _workItemCommentDrafts;
1899
1965
  get workItemCommentDrafts() {
1900
- return this._workItemCommentDrafts ??= new WorkItemCommentDrafts({ client: this.client });
1966
+ return this._workItemCommentDrafts ??= new WorkItemCommentDrafts2({ client: this.client });
1901
1967
  }
1902
1968
  _workItemBlocks;
1903
1969
  get workItemBlocks() {
1904
- return this._workItemBlocks ??= new WorkItemBlocks({ client: this.client });
1970
+ return this._workItemBlocks ??= new WorkItemBlocks2({ client: this.client });
1905
1971
  }
1906
1972
  _projectArtifacts;
1907
1973
  get projectArtifacts() {
1908
- return this._projectArtifacts ??= new ProjectArtifacts({ client: this.client });
1974
+ return this._projectArtifacts ??= new ProjectArtifacts2({ client: this.client });
1909
1975
  }
1910
1976
  _userNotifications;
1911
1977
  get userNotifications() {
1912
- return this._userNotifications ??= new UserNotifications({ client: this.client });
1978
+ return this._userNotifications ??= new UserNotifications2({ client: this.client });
1913
1979
  }
1914
1980
  _inbox;
1915
1981
  get inbox() {
1916
- return this._inbox ??= new Inbox({ client: this.client });
1982
+ return this._inbox ??= new Inbox2({ client: this.client });
1917
1983
  }
1918
1984
  _notificationRules;
1919
1985
  get notificationRules() {
1920
- return this._notificationRules ??= new NotificationRules({ client: this.client });
1986
+ return this._notificationRules ??= new NotificationRules2({ client: this.client });
1921
1987
  }
1922
1988
  _projectIntegrations;
1923
1989
  get projectIntegrations() {
1924
- return this._projectIntegrations ??= new ProjectIntegrations({ client: this.client });
1990
+ return this._projectIntegrations ??= new ProjectIntegrations2({ client: this.client });
1925
1991
  }
1926
1992
  _gitHubIntegrations;
1927
1993
  get gitHubIntegrations() {
1928
- return this._gitHubIntegrations ??= new GitHubIntegrations({ client: this.client });
1994
+ return this._gitHubIntegrations ??= new GitHubIntegrations2({ client: this.client });
1929
1995
  }
1930
1996
  _projectInvites;
1931
1997
  get projectInvites() {
1932
- return this._projectInvites ??= new ProjectInvites({ client: this.client });
1998
+ return this._projectInvites ??= new ProjectInvites2({ client: this.client });
1933
1999
  }
1934
2000
  _billing;
1935
2001
  get billing() {
1936
- return this._billing ??= new Billing({ client: this.client });
2002
+ return this._billing ??= new Billing2({ client: this.client });
1937
2003
  }
1938
2004
  _username;
1939
2005
  get username() {
1940
- return this._username ??= new Username({ client: this.client });
2006
+ return this._username ??= new Username2({ client: this.client });
1941
2007
  }
1942
2008
  _secrets;
1943
2009
  get secrets() {
1944
- return this._secrets ??= new Secrets({ client: this.client });
2010
+ return this._secrets ??= new Secrets2({ client: this.client });
1945
2011
  }
1946
2012
  _projectSecrets;
1947
2013
  get projectSecrets() {
1948
- return this._projectSecrets ??= new ProjectSecrets({ client: this.client });
2014
+ return this._projectSecrets ??= new ProjectSecrets2({ client: this.client });
1949
2015
  }
1950
2016
  _environments;
1951
2017
  get environments() {
1952
- return this._environments ??= new Environments({ client: this.client });
2018
+ return this._environments ??= new Environments2({ client: this.client });
1953
2019
  }
1954
2020
  _connectors;
1955
2021
  get connectors() {
1956
- 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 });
1957
2027
  }
1958
2028
  }
1959
2029
 
1960
- export { createClient, 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 };
2030
+ // src/create-api-client.ts
2031
+ function createApiClient(baseUrl, options) {
2032
+ const client = createClient({
2033
+ baseUrl,
2034
+ headers: options?.headers,
2035
+ fetch: options?.fetch
2036
+ });
2037
+ client.interceptors.error.use((error, response) => {
2038
+ if (response === undefined)
2039
+ throw error;
2040
+ return error;
2041
+ });
2042
+ return client;
2043
+ }
2044
+
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 };