@scarn/sdk 0.8.9 → 0.8.11

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.
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  PipelineDefinitions,
4
4
  createClient
5
- } from "./chunk-vmdn05vj.js";
5
+ } from "./chunk-z9f92ayv.js";
6
6
  import {
7
7
  exports_external
8
8
  } from "./chunk-skzxcba3.js";
@@ -3,7 +3,7 @@ import {
3
3
  ScarnClient,
4
4
  TaskRuns,
5
5
  createClient
6
- } from "./chunk-vmdn05vj.js";
6
+ } from "./chunk-z9f92ayv.js";
7
7
  // src/task-plane-client.ts
8
8
  function unwrap(result) {
9
9
  if (result.error)
@@ -33,6 +33,10 @@ var buildTaskPlaneClient = (taskRuns) => {
33
33
  taskRunId,
34
34
  ...body
35
35
  }) => unwrap(await taskRuns.getTaskRunWorkerContext({ path: { taskRunId }, body })),
36
+ reportTaskRunBaseCommit: async ({
37
+ taskRunId,
38
+ ...body
39
+ }) => unwrap(await taskRuns.reportTaskRunBaseCommit({ path: { taskRunId }, body })),
36
40
  readTaskRunWorkItem: async ({
37
41
  taskRunId,
38
42
  ...body
@@ -86,6 +90,13 @@ var buildTaskPlaneClient = (taskRuns) => {
86
90
  unwrap(await taskRuns.recordTaskArtifactFailure({ path: { taskRunId }, body }));
87
91
  },
88
92
  listTaskArtifacts: async ({ taskRunId }) => unwrap(await taskRuns.listTaskArtifacts({ path: { taskRunId } })),
93
+ issueWorkSignalToken: ({
94
+ projectId,
95
+ workerId
96
+ }) => taskRuns.issueWorkSignalToken({
97
+ path: { projectId },
98
+ body: workerId === undefined ? {} : { workerId }
99
+ }),
89
100
  getArtifactDownloadUrl: async ({
90
101
  taskRunId,
91
102
  artifactId
@@ -34,7 +34,7 @@ import {
34
34
  import {
35
35
  StepDefinitions,
36
36
  createClient
37
- } from "./chunk-vmdn05vj.js";
37
+ } from "./chunk-z9f92ayv.js";
38
38
  import {
39
39
  buildArtifactMarker
40
40
  } from "./chunk-ngy1fdcx.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  Automations,
4
4
  createClient
5
- } from "./chunk-vmdn05vj.js";
5
+ } from "./chunk-z9f92ayv.js";
6
6
  import {
7
7
  exports_external
8
8
  } from "./chunk-skzxcba3.js";
@@ -888,7 +888,14 @@ class Projects extends HeyApiClient {
888
888
  return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/members", ...options });
889
889
  }
890
890
  updateProjectMemberPermissions(options) {
891
- return (options.client ?? this.client).put({ url: "/api/projects/{projectId}/members/{userId}/permissions", ...options });
891
+ return (options.client ?? this.client).put({
892
+ url: "/api/projects/{projectId}/members/{userId}/permissions",
893
+ ...options,
894
+ headers: {
895
+ "Content-Type": "application/json",
896
+ ...options.headers
897
+ }
898
+ });
892
899
  }
893
900
  checkProjectRepo(options) {
894
901
  return (options.client ?? this.client).post({
@@ -958,6 +965,16 @@ class Tasks extends HeyApiClient {
958
965
  cancelTask(options) {
959
966
  return (options.client ?? this.client).post({ url: "/api/tasks/{taskId}/cancel", ...options });
960
967
  }
968
+ retryTask(options) {
969
+ return (options.client ?? this.client).post({
970
+ url: "/api/tasks/{taskId}/retry",
971
+ ...options,
972
+ headers: {
973
+ "Content-Type": "application/json",
974
+ ...options.headers
975
+ }
976
+ });
977
+ }
961
978
  getTask(options) {
962
979
  return (options.client ?? this.client).get({ url: "/api/tasks/{taskId}", ...options });
963
980
  }
@@ -990,6 +1007,16 @@ class TaskRuns extends HeyApiClient {
990
1007
  }
991
1008
  });
992
1009
  }
1010
+ reportTaskRunBaseCommit(options) {
1011
+ return (options.client ?? this.client).post({
1012
+ url: "/api/task-runs/{taskRunId}/base-commit",
1013
+ ...options,
1014
+ headers: {
1015
+ "Content-Type": "application/json",
1016
+ ...options.headers
1017
+ }
1018
+ });
1019
+ }
993
1020
  getTaskRunWorkerContext(options) {
994
1021
  return (options.client ?? this.client).post({
995
1022
  url: "/api/task-runs/{taskRunId}/worker-context",
@@ -1114,6 +1141,16 @@ class TaskRuns extends HeyApiClient {
1114
1141
  }
1115
1142
  });
1116
1143
  }
1144
+ issueWorkSignalToken(options) {
1145
+ return (options.client ?? this.client).post({
1146
+ url: "/api/projects/{projectId}/work-signal-token",
1147
+ ...options,
1148
+ headers: {
1149
+ "Content-Type": "application/json",
1150
+ ...options.headers
1151
+ }
1152
+ });
1153
+ }
1117
1154
  }
1118
1155
 
1119
1156
  class PipelineDefinitions extends HeyApiClient {
@@ -1374,12 +1411,28 @@ class WorkItems extends HeyApiClient {
1374
1411
  }
1375
1412
 
1376
1413
  class Conversations extends HeyApiClient {
1414
+ deleteProjectConversation(options) {
1415
+ return (options.client ?? this.client).delete({ url: "/api/conversations/{conversationId}", ...options });
1416
+ }
1377
1417
  getConversation(options) {
1378
1418
  return (options.client ?? this.client).get({ url: "/api/conversations/{conversationId}", ...options });
1379
1419
  }
1380
1420
  listWorkItemConversations(options) {
1381
1421
  return (options.client ?? this.client).get({ url: "/api/work-items/{workItemId}/conversations", ...options });
1382
1422
  }
1423
+ listProjectConversations(options) {
1424
+ return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/conversations", ...options });
1425
+ }
1426
+ createProjectConversation(options) {
1427
+ return (options.client ?? this.client).post({
1428
+ url: "/api/projects/{projectId}/conversations",
1429
+ ...options,
1430
+ headers: {
1431
+ "Content-Type": "application/json",
1432
+ ...options.headers
1433
+ }
1434
+ });
1435
+ }
1383
1436
  sendConversationMessage(options) {
1384
1437
  return (options.client ?? this.client).post({
1385
1438
  url: "/api/conversations/{conversationId}/messages",
@@ -1396,6 +1449,19 @@ class Conversations extends HeyApiClient {
1396
1449
  endConversation(options) {
1397
1450
  return (options.client ?? this.client).post({ url: "/api/conversations/{conversationId}/done", ...options });
1398
1451
  }
1452
+ retryProjectConversation(options) {
1453
+ return (options.client ?? this.client).post({
1454
+ url: "/api/conversations/{conversationId}/retry",
1455
+ ...options,
1456
+ headers: {
1457
+ "Content-Type": "application/json",
1458
+ ...options.headers
1459
+ }
1460
+ });
1461
+ }
1462
+ endProjectConversation(options) {
1463
+ return (options.client ?? this.client).post({ url: "/api/conversations/{conversationId}/end", ...options });
1464
+ }
1399
1465
  }
1400
1466
 
1401
1467
  class WorkItemComments extends HeyApiClient {
package/dist/client.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createScarnClient,
4
4
  createTaskPlaneClient
5
- } from "./chunk-738k8p1c.js";
5
+ } from "./chunk-p01z6gt9.js";
6
6
  import {
7
7
  Api,
8
8
  Automations,
@@ -28,7 +28,7 @@ import {
28
28
  WorkItemCommentDrafts,
29
29
  WorkItemComments,
30
30
  WorkItems
31
- } from "./chunk-vmdn05vj.js";
31
+ } from "./chunk-z9f92ayv.js";
32
32
  import"./chunk-y64skrwp.js";
33
33
  export {
34
34
  Api,
@@ -274,8 +274,8 @@ export declare const automationDocumentSchema: z.ZodObject<{
274
274
  key: z.ZodString;
275
275
  title: z.ZodOptional<z.ZodString>;
276
276
  scope: z.ZodEnum<{
277
- project: "project";
278
277
  workItem: "workItem";
278
+ project: "project";
279
279
  }>;
280
280
  rules: z.ZodArray<z.ZodObject<{
281
281
  event: z.ZodEnum<{
@@ -4,8 +4,8 @@ import {
4
4
  } from "../chunk-rt9tq4j6.js";
5
5
  import {
6
6
  createScarnClient
7
- } from "../chunk-738k8p1c.js";
8
- import"../chunk-vmdn05vj.js";
7
+ } from "../chunk-p01z6gt9.js";
8
+ import"../chunk-z9f92ayv.js";
9
9
  import"../chunk-y64skrwp.js";
10
10
 
11
11
  // src/defaults/auth-file.ts
@@ -37,7 +37,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
37
37
  id: string;
38
38
  projectId: string;
39
39
  key: string;
40
- title: string | unknown;
40
+ title: string | null;
41
41
  scope: "workItem" | "project";
42
42
  enabled: boolean;
43
43
  latestVersion: {
@@ -49,7 +49,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
49
49
  [key: string]: unknown;
50
50
  };
51
51
  publishedAt: string;
52
- } | unknown;
52
+ } | null;
53
53
  createdAt: string;
54
54
  updatedAt: string;
55
55
  }[]>;
@@ -64,7 +64,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
64
64
  id: string;
65
65
  projectId: string;
66
66
  key: string;
67
- title: string | unknown;
67
+ title: string | null;
68
68
  scope: "workItem" | "project";
69
69
  enabled: boolean;
70
70
  latestVersion: {
@@ -76,7 +76,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
76
76
  [key: string]: unknown;
77
77
  };
78
78
  publishedAt: string;
79
- } | unknown;
79
+ } | null;
80
80
  createdAt: string;
81
81
  updatedAt: string;
82
82
  };
@@ -85,7 +85,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
85
85
  id: string;
86
86
  projectId: string;
87
87
  key: string;
88
- title: string | unknown;
88
+ title: string | null;
89
89
  scope: "workItem" | "project";
90
90
  enabled: boolean;
91
91
  latestVersion: {
@@ -97,7 +97,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
97
97
  [key: string]: unknown;
98
98
  };
99
99
  publishedAt: string;
100
- } | unknown;
100
+ } | null;
101
101
  createdAt: string;
102
102
  updatedAt: string;
103
103
  }>;
@@ -105,7 +105,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
105
105
  id: string;
106
106
  projectId: string;
107
107
  key: string;
108
- title: string | unknown;
108
+ title: string | null;
109
109
  scope: "workItem" | "project";
110
110
  enabled: boolean;
111
111
  latestVersion: {
@@ -117,7 +117,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
117
117
  [key: string]: unknown;
118
118
  };
119
119
  publishedAt: string;
120
- } | unknown;
120
+ } | null;
121
121
  createdAt: string;
122
122
  updatedAt: string;
123
123
  }>;
@@ -127,7 +127,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
127
127
  id: string;
128
128
  projectId: string;
129
129
  key: string;
130
- title: string | unknown;
130
+ title: string | null;
131
131
  scope: "workItem" | "project";
132
132
  enabled: boolean;
133
133
  latestVersion: {
@@ -139,7 +139,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
139
139
  [key: string]: unknown;
140
140
  };
141
141
  publishedAt: string;
142
- } | unknown;
142
+ } | null;
143
143
  createdAt: string;
144
144
  updatedAt: string;
145
145
  };
@@ -152,7 +152,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
152
152
  id: string;
153
153
  projectId: string;
154
154
  key: string;
155
- title: string | unknown;
155
+ title: string | null;
156
156
  scope: "workItem" | "project";
157
157
  enabled: boolean;
158
158
  latestVersion: {
@@ -164,7 +164,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
164
164
  [key: string]: unknown;
165
165
  };
166
166
  publishedAt: string;
167
- } | unknown;
167
+ } | null;
168
168
  createdAt: string;
169
169
  updatedAt: string;
170
170
  };
@@ -172,7 +172,7 @@ declare const buildAutomationsClient: (automations: Automations) => {
172
172
  attachedAt: string;
173
173
  }>;
174
174
  detach: (workItemId: string, key: string, options?: RequestOptions) => Promise<{
175
- detached: boolean;
175
+ detached: true;
176
176
  }>;
177
177
  };
178
178
  export {};
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  AutomationsApiError,
4
4
  createAutomationsClient
5
- } from "../../chunk-npy0jxfg.js";
6
- import"../../chunk-vmdn05vj.js";
5
+ } from "../../chunk-r01zh5mv.js";
6
+ import"../../chunk-z9f92ayv.js";
7
7
  import"../../chunk-skzxcba3.js";
8
8
  import"../../chunk-y64skrwp.js";
9
9
  export {
@@ -5,8 +5,8 @@ import {
5
5
  WORK_ITEM_TOP_LEVEL_FIELDS,
6
6
  createPipelineDefinitionsClient,
7
7
  resolveWorkItemFieldPath
8
- } from "../../chunk-qy3508g1.js";
9
- import"../../chunk-vmdn05vj.js";
8
+ } from "../../chunk-cezmxzhe.js";
9
+ import"../../chunk-z9f92ayv.js";
10
10
  import"../../chunk-skzxcba3.js";
11
11
  import"../../chunk-y64skrwp.js";
12
12
  export {
@@ -38,7 +38,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
38
38
  projectId: string;
39
39
  key: string;
40
40
  name: string;
41
- archivedAt: string | unknown;
41
+ archivedAt: string | null;
42
42
  currentVersion: {
43
43
  id: string;
44
44
  pipelineDefinitionId: string;
@@ -53,7 +53,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
53
53
  stepDefinitionId: string;
54
54
  }>;
55
55
  createdAt: string;
56
- } | unknown;
56
+ } | null;
57
57
  createdAt: string;
58
58
  updatedAt: string;
59
59
  }[]>;
@@ -62,7 +62,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
62
62
  projectId: string;
63
63
  key: string;
64
64
  name: string;
65
- archivedAt: string | unknown;
65
+ archivedAt: string | null;
66
66
  currentVersion: {
67
67
  id: string;
68
68
  pipelineDefinitionId: string;
@@ -77,7 +77,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
77
77
  stepDefinitionId: string;
78
78
  }>;
79
79
  createdAt: string;
80
- } | unknown;
80
+ } | null;
81
81
  createdAt: string;
82
82
  updatedAt: string;
83
83
  }>;
@@ -92,7 +92,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
92
92
  projectId: string;
93
93
  key: string;
94
94
  name: string;
95
- archivedAt: string | unknown;
95
+ archivedAt: string | null;
96
96
  currentVersion: {
97
97
  id: string;
98
98
  pipelineDefinitionId: string;
@@ -107,7 +107,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
107
107
  stepDefinitionId: string;
108
108
  }>;
109
109
  createdAt: string;
110
- } | unknown;
110
+ } | null;
111
111
  createdAt: string;
112
112
  updatedAt: string;
113
113
  }>;
@@ -137,7 +137,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
137
137
  projectId: string;
138
138
  key: string;
139
139
  name: string;
140
- archivedAt: string | unknown;
140
+ archivedAt: string | null;
141
141
  currentVersion: {
142
142
  id: string;
143
143
  pipelineDefinitionId: string;
@@ -152,7 +152,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
152
152
  stepDefinitionId: string;
153
153
  }>;
154
154
  createdAt: string;
155
- } | unknown;
155
+ } | null;
156
156
  createdAt: string;
157
157
  updatedAt: string;
158
158
  };
@@ -162,7 +162,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
162
162
  projectId: string;
163
163
  key: string;
164
164
  name: string;
165
- archivedAt: string | unknown;
165
+ archivedAt: string | null;
166
166
  currentVersion: {
167
167
  id: string;
168
168
  pipelineDefinitionId: string;
@@ -177,7 +177,7 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
177
177
  stepDefinitionId: string;
178
178
  }>;
179
179
  createdAt: string;
180
- } | unknown;
180
+ } | null;
181
181
  createdAt: string;
182
182
  updatedAt: string;
183
183
  }>;
@@ -33,7 +33,7 @@ import {
33
33
  resolveMcpChecks,
34
34
  toStepHandle,
35
35
  toStepSpec
36
- } from "../../chunk-hpn4q02f.js";
36
+ } from "../../chunk-p6dt8nej.js";
37
37
  import"../../chunk-e1h021kq.js";
38
38
  import"../../chunk-63f90zky.js";
39
39
  import"../../chunk-jj9pezwb.js";
@@ -42,7 +42,7 @@ import"../../chunk-5zsavw98.js";
42
42
  import"../../chunk-4ggr8af6.js";
43
43
  import"../../chunk-k4y5qt4y.js";
44
44
  import"../../chunk-xzx08r6y.js";
45
- import"../../chunk-vmdn05vj.js";
45
+ import"../../chunk-z9f92ayv.js";
46
46
  import"../../chunk-ngy1fdcx.js";
47
47
  import"../../chunk-y2pv8d6a.js";
48
48
  import"../../chunk-01nfqm18.js";