@scarn/sdk 0.8.9 → 0.8.10

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
  Automations,
4
4
  createClient
5
- } from "./chunk-vmdn05vj.js";
5
+ } from "./chunk-c3xzrd3w.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
  }
@@ -1114,6 +1131,16 @@ class TaskRuns extends HeyApiClient {
1114
1131
  }
1115
1132
  });
1116
1133
  }
1134
+ issueWorkSignalToken(options) {
1135
+ return (options.client ?? this.client).post({
1136
+ url: "/api/projects/{projectId}/work-signal-token",
1137
+ ...options,
1138
+ headers: {
1139
+ "Content-Type": "application/json",
1140
+ ...options.headers
1141
+ }
1142
+ });
1143
+ }
1117
1144
  }
1118
1145
 
1119
1146
  class PipelineDefinitions extends HeyApiClient {
@@ -34,7 +34,7 @@ import {
34
34
  import {
35
35
  StepDefinitions,
36
36
  createClient
37
- } from "./chunk-vmdn05vj.js";
37
+ } from "./chunk-c3xzrd3w.js";
38
38
  import {
39
39
  buildArtifactMarker
40
40
  } from "./chunk-ngy1fdcx.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  PipelineDefinitions,
4
4
  createClient
5
- } from "./chunk-vmdn05vj.js";
5
+ } from "./chunk-c3xzrd3w.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-c3xzrd3w.js";
7
7
  // src/task-plane-client.ts
8
8
  function unwrap(result) {
9
9
  if (result.error)
@@ -86,6 +86,13 @@ var buildTaskPlaneClient = (taskRuns) => {
86
86
  unwrap(await taskRuns.recordTaskArtifactFailure({ path: { taskRunId }, body }));
87
87
  },
88
88
  listTaskArtifacts: async ({ taskRunId }) => unwrap(await taskRuns.listTaskArtifacts({ path: { taskRunId } })),
89
+ issueWorkSignalToken: ({
90
+ projectId,
91
+ workerId
92
+ }) => taskRuns.issueWorkSignalToken({
93
+ path: { projectId },
94
+ body: workerId === undefined ? {} : { workerId }
95
+ }),
89
96
  getArtifactDownloadUrl: async ({
90
97
  taskRunId,
91
98
  artifactId
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-zjp1c7ye.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-c3xzrd3w.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-zjp1c7ye.js";
8
+ import"../chunk-c3xzrd3w.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-aqsa0bpk.js";
6
+ import"../../chunk-c3xzrd3w.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-nxsa7ksc.js";
9
+ import"../../chunk-c3xzrd3w.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-d4e1kz6h.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-c3xzrd3w.js";
46
46
  import"../../chunk-ngy1fdcx.js";
47
47
  import"../../chunk-y2pv8d6a.js";
48
48
  import"../../chunk-01nfqm18.js";