@boboddy/sdk 0.4.0 → 0.4.3
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.
- package/dist/client.js +57 -0
- package/dist/definitions/pipelines/builder-helpers.d.ts +33 -4
- package/dist/definitions/pipelines/define-default-pipeline-assignment.d.ts +68 -18
- package/dist/definitions/pipelines/index.d.ts +1 -0
- package/dist/definitions/pipelines/index.js +111 -10
- package/dist/definitions/pipelines/pipeline-definitions-client.d.ts +24 -8
- package/dist/definitions/pipelines/work-item-fields.d.ts +98 -0
- package/dist/definitions/steps/define-step.d.ts +19 -8
- package/dist/definitions/steps/index.js +56 -0
- package/dist/definitions/steps/step-definitions-client.d.ts +18 -6
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/sdk.gen.d.ts +15 -1
- package/dist/generated/types.gen.d.ts +1321 -276
- package/dist/index.js +112 -10
- package/dist/push/index.js +108 -10
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -1200,6 +1200,16 @@ class PipelineExecutions extends HeyApiClient {
|
|
|
1200
1200
|
cancelPipelineExecution(options) {
|
|
1201
1201
|
return (options.client ?? this.client).put({ url: "/api/pipeline-executions/{pipelineExecutionId}/cancel", ...options });
|
|
1202
1202
|
}
|
|
1203
|
+
cancelPipelineExecutions(options) {
|
|
1204
|
+
return (options.client ?? this.client).put({
|
|
1205
|
+
url: "/api/pipeline-executions/batch/cancel",
|
|
1206
|
+
...options,
|
|
1207
|
+
headers: {
|
|
1208
|
+
"Content-Type": "application/json",
|
|
1209
|
+
...options.headers
|
|
1210
|
+
}
|
|
1211
|
+
});
|
|
1212
|
+
}
|
|
1203
1213
|
getPipelineExecution(options) {
|
|
1204
1214
|
return (options.client ?? this.client).get({ url: "/api/pipeline-executions/{pipelineExecutionId}", ...options });
|
|
1205
1215
|
}
|
|
@@ -1224,6 +1234,19 @@ class WorkItems extends HeyApiClient {
|
|
|
1224
1234
|
getWorkItem(options) {
|
|
1225
1235
|
return (options.client ?? this.client).get({ url: "/api/work-items/{workItemId}", ...options });
|
|
1226
1236
|
}
|
|
1237
|
+
editWorkItem(options) {
|
|
1238
|
+
return (options.client ?? this.client).patch({
|
|
1239
|
+
url: "/api/work-items/{workItemId}",
|
|
1240
|
+
...options,
|
|
1241
|
+
headers: {
|
|
1242
|
+
"Content-Type": "application/json",
|
|
1243
|
+
...options.headers
|
|
1244
|
+
}
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
listWorkItemChildren(options) {
|
|
1248
|
+
return (options.client ?? this.client).get({ url: "/api/work-items/{workItemId}/children", ...options });
|
|
1249
|
+
}
|
|
1227
1250
|
createWorkItem(options) {
|
|
1228
1251
|
return (options.client ?? this.client).post({
|
|
1229
1252
|
url: "/api/work-items",
|
|
@@ -1274,6 +1297,16 @@ class WorkItems extends HeyApiClient {
|
|
|
1274
1297
|
}
|
|
1275
1298
|
});
|
|
1276
1299
|
}
|
|
1300
|
+
setWorkItemParent(options) {
|
|
1301
|
+
return (options.client ?? this.client).patch({
|
|
1302
|
+
url: "/api/work-items/{workItemId}/parent",
|
|
1303
|
+
...options,
|
|
1304
|
+
headers: {
|
|
1305
|
+
"Content-Type": "application/json",
|
|
1306
|
+
...options.headers
|
|
1307
|
+
}
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1277
1310
|
}
|
|
1278
1311
|
|
|
1279
1312
|
class WorkItemComments extends HeyApiClient {
|
|
@@ -1315,6 +1348,25 @@ class WorkItemComments extends HeyApiClient {
|
|
|
1315
1348
|
}
|
|
1316
1349
|
}
|
|
1317
1350
|
|
|
1351
|
+
class WorkItemBlocks extends HeyApiClient {
|
|
1352
|
+
listWorkItemBlocks(options) {
|
|
1353
|
+
return (options.client ?? this.client).get({ url: "/api/work-item-blocks", ...options });
|
|
1354
|
+
}
|
|
1355
|
+
createWorkItemBlock(options) {
|
|
1356
|
+
return (options.client ?? this.client).post({
|
|
1357
|
+
url: "/api/work-item-blocks",
|
|
1358
|
+
...options,
|
|
1359
|
+
headers: {
|
|
1360
|
+
"Content-Type": "application/json",
|
|
1361
|
+
...options.headers
|
|
1362
|
+
}
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
deleteWorkItemBlock(options) {
|
|
1366
|
+
return (options.client ?? this.client).delete({ url: "/api/work-item-blocks/{blockId}", ...options });
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1318
1370
|
class ProjectContext extends HeyApiClient {
|
|
1319
1371
|
listProjectContextEntries(options) {
|
|
1320
1372
|
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/context-entries", ...options });
|
|
@@ -1523,6 +1575,10 @@ class BoboddyClient extends HeyApiClient {
|
|
|
1523
1575
|
get workItemComments() {
|
|
1524
1576
|
return this._workItemComments ??= new WorkItemComments({ client: this.client });
|
|
1525
1577
|
}
|
|
1578
|
+
_workItemBlocks;
|
|
1579
|
+
get workItemBlocks() {
|
|
1580
|
+
return this._workItemBlocks ??= new WorkItemBlocks({ client: this.client });
|
|
1581
|
+
}
|
|
1526
1582
|
_projectContext;
|
|
1527
1583
|
get projectContext() {
|
|
1528
1584
|
return this._projectContext ??= new ProjectContext({ client: this.client });
|
|
@@ -1683,6 +1739,7 @@ export {
|
|
|
1683
1739
|
createBoboddyClient,
|
|
1684
1740
|
WorkItems,
|
|
1685
1741
|
WorkItemComments,
|
|
1742
|
+
WorkItemBlocks,
|
|
1686
1743
|
Username,
|
|
1687
1744
|
UserNotifications,
|
|
1688
1745
|
StepExecutions,
|
|
@@ -2,6 +2,7 @@ import { z, type ZodType } from "zod";
|
|
|
2
2
|
import { type AdditionalStepInputBinding, type TypedStepDefinitionSpec } from "../steps/define-step";
|
|
3
3
|
import { type AnyBinding, type FanOutItemBinding, type LiteralBinding, type SignalsListBinding, type StepOutputBinding, type StepSignalBinding, type WorkItemBinding } from "./define-pipeline";
|
|
4
4
|
import { type InputAccessor } from "./input-accessor";
|
|
5
|
+
import { type WorkItemTopLevelField } from "./work-item-fields";
|
|
5
6
|
export type AnyTypedStep = TypedStepDefinitionSpec<any, any, any, any>;
|
|
6
7
|
type ElementOf<T extends ReadonlyArray<unknown>> = T extends ReadonlyArray<infer U> ? U : never;
|
|
7
8
|
export type LastStep<T extends ReadonlyArray<AnyTypedStep>> = T extends readonly [...AnyTypedStep[], infer L] ? L extends AnyTypedStep ? L : never : never;
|
|
@@ -30,10 +31,31 @@ export type FanOutInputCtx<TInput extends ZodType, TSteps extends ReadonlyArray<
|
|
|
30
31
|
item: FanOutItemBinding & FanOutItemType<TSteps, K>;
|
|
31
32
|
});
|
|
32
33
|
export type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
34
|
+
/**
|
|
35
|
+
* Work-item accessor for `additionalPipelineInput.bindings(({ workItem }) => ...)`:
|
|
36
|
+
* a top-level property (`workItem.title`, `workItem.platform`,
|
|
37
|
+
* `workItem.url`, ...) for every member of `WORK_ITEM_TOP_LEVEL_FIELDS`, plus
|
|
38
|
+
* `workItem.field(name)` for the platform-specific `fields` bag.
|
|
39
|
+
*
|
|
40
|
+
* Mirrors the default-pipeline-assignment DSL's `WorkItemAssignmentAccessor`
|
|
41
|
+
* (`define-default-pipeline-assignment.ts`) in which properties it exposes —
|
|
42
|
+
* both are generated off the same `WORK_ITEM_TOP_LEVEL_FIELDS` list — but
|
|
43
|
+
* returns a plain `WorkItemBinding` per property rather than a
|
|
44
|
+
* comparator-bound `AssignmentFieldRef`: a regular pipeline input binding
|
|
45
|
+
* has no conditions to compare against, it's just "read this work-item
|
|
46
|
+
* property into this input field."
|
|
47
|
+
*
|
|
48
|
+
* `field`'s optional `TName` type parameter accepts a literal union of known
|
|
49
|
+
* field names (e.g. the `WorkItemFieldName` type `boboddy pipelines pull`
|
|
50
|
+
* generates into `work-item-fields.ts`) for compile-time validation and
|
|
51
|
+
* autocomplete on the field name, exactly like the assignment DSL's
|
|
52
|
+
* `workItem.field<TName>(...)`. Defaults to permissive `string`, so
|
|
53
|
+
* `workItem.field(name)` with no type argument keeps working as before.
|
|
54
|
+
*/
|
|
33
55
|
export type WorkItemAccessor = {
|
|
34
|
-
readonly
|
|
35
|
-
|
|
36
|
-
|
|
56
|
+
readonly [K in WorkItemTopLevelField]: WorkItemBinding;
|
|
57
|
+
} & {
|
|
58
|
+
field<TName extends string = string>(fieldName: TName): WorkItemBinding;
|
|
37
59
|
};
|
|
38
60
|
export type PinnedWorkItemComment = {
|
|
39
61
|
createdAt: string;
|
|
@@ -91,7 +113,14 @@ export type PipelineMeta<TInput extends ZodType = z.ZodUnknown> = {
|
|
|
91
113
|
additionalStepInput?: {
|
|
92
114
|
schema: ZodType;
|
|
93
115
|
bindings: (ctx: {
|
|
94
|
-
|
|
116
|
+
/**
|
|
117
|
+
* References a platform-specific field (Jira custom field, GitHub
|
|
118
|
+
* label, etc.) in the work item's `fields` bag. `TName` optionally
|
|
119
|
+
* accepts a literal union of known field names (e.g. the generated
|
|
120
|
+
* `WorkItemFieldName`) for compile-time validation and autocomplete,
|
|
121
|
+
* exactly like `WorkItemAccessor.field` above.
|
|
122
|
+
*/
|
|
123
|
+
workItemField: <TName extends string = string>(fieldName: TName) => WorkItemBinding;
|
|
95
124
|
literal: (value: unknown) => LiteralBinding;
|
|
96
125
|
}) => Partial<Record<string, AdditionalStepInputBinding>>;
|
|
97
126
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PipelineDefinitionSpec } from "./define-pipeline";
|
|
2
|
+
import { type WorkItemTopLevelField, type WorkItemTopLevelFieldTypeMap } from "./work-item-fields";
|
|
2
3
|
/**
|
|
3
4
|
* The reserved filename for the default pipeline assignment file.
|
|
4
5
|
* This file is NOT treated as a pipeline definition by the push scanner.
|
|
@@ -47,31 +48,80 @@ export interface AssignmentGroup {
|
|
|
47
48
|
readonly _condition: AssignmentCondition;
|
|
48
49
|
}
|
|
49
50
|
type AssignmentNestable = AssignmentLeaf | AssignmentGroup;
|
|
50
|
-
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
/**
|
|
52
|
+
* `.gt`/`.gte`/`.lt`/`.lte` are only ever meaningful for numeric fields.
|
|
53
|
+
* Intersected onto `AssignmentFieldRef<T>` only when `T` is (or includes)
|
|
54
|
+
* `number`, so e.g. `workItem.title.gt(...)` doesn't even type-check, let
|
|
55
|
+
* alone appear in autocomplete.
|
|
56
|
+
*/
|
|
57
|
+
type NumericComparators = {
|
|
54
58
|
gt(value: number): AssignmentLeaf;
|
|
55
59
|
gte(value: number): AssignmentLeaf;
|
|
56
60
|
lt(value: number): AssignmentLeaf;
|
|
57
61
|
lte(value: number): AssignmentLeaf;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Comparator-bound reference to a work-item field or context fact.
|
|
65
|
+
*
|
|
66
|
+
* `T` is the field's value type (defaulting to `unknown`, which preserves
|
|
67
|
+
* the pre-generic behavior for any caller that doesn't otherwise constrain
|
|
68
|
+
* it). `.contains`/`.doesNotContain` narrow to the array element type when
|
|
69
|
+
* `T` is an array — json-rules-engine's `contains`/`doesNotContain`
|
|
70
|
+
* operators check array-membership (or substring-membership for strings)
|
|
71
|
+
* against the fact's actual runtime shape, so an array-typed field's
|
|
72
|
+
* `.contains(...)` should accept one element, not the whole array.
|
|
73
|
+
*/
|
|
74
|
+
export type AssignmentFieldRef<T = unknown> = {
|
|
75
|
+
eq(value: T): AssignmentLeaf;
|
|
76
|
+
ne(value: T): AssignmentLeaf;
|
|
77
|
+
in(values: ReadonlyArray<T>): AssignmentLeaf;
|
|
78
|
+
notIn(values: ReadonlyArray<T>): AssignmentLeaf;
|
|
79
|
+
contains(value: T extends ReadonlyArray<infer U> ? U : T): AssignmentLeaf;
|
|
80
|
+
doesNotContain(value: T extends ReadonlyArray<infer U> ? U : T): AssignmentLeaf;
|
|
81
|
+
} & (T extends number ? NumericComparators : Record<string, never>);
|
|
82
|
+
/** Comparator-bound accessor for the work item passed to `defaultPipelineAssignment`. */
|
|
83
|
+
export type WorkItemAssignmentAccessor = {
|
|
84
|
+
[K in WorkItemTopLevelField]: AssignmentFieldRef<WorkItemTopLevelFieldTypeMap[K]>;
|
|
85
|
+
} & {
|
|
86
|
+
/**
|
|
87
|
+
* Accessor for a platform-specific field (Jira custom field, GitHub label,
|
|
88
|
+
* etc.) stored in the work item's `fields` bag. Since `fields` keys and
|
|
89
|
+
* value shapes are platform- and project-dependent, there is no static
|
|
90
|
+
* schema to check either against by default.
|
|
91
|
+
*
|
|
92
|
+
* Two independent, optional type parameters:
|
|
93
|
+
* - `TName` constrains the `name` argument itself — pass a literal union
|
|
94
|
+
* of known field names (e.g. the `WorkItemFieldName` type
|
|
95
|
+
* `boboddy pipelines pull` generates into `work-item-fields.ts`) to get
|
|
96
|
+
* compile-time validation and autocomplete on the field name.
|
|
97
|
+
* - `TValue` types the comparator (`.eq`/`.gte`/etc.) argument, exactly
|
|
98
|
+
* like the top-level accessors above — pass it for a known-shaped
|
|
99
|
+
* custom field (e.g. a numeric one).
|
|
100
|
+
* Both default to permissive types, so `workItem.field(name)` with no
|
|
101
|
+
* type arguments keeps working exactly as before.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* workItem.field("issueType").eq("bug")
|
|
105
|
+
* workItem.field("labels").contains("regression")
|
|
106
|
+
* workItem.field<WorkItemFieldName>("issueType").eq("bug")
|
|
107
|
+
* workItem.field<WorkItemFieldName, number>("storyPoints").gte(3)
|
|
108
|
+
*/
|
|
109
|
+
field<TName extends string = string, TValue = unknown>(name: TName): AssignmentFieldRef<TValue>;
|
|
110
|
+
};
|
|
63
111
|
export type DefaultPipelineAssignmentCtx = {
|
|
64
112
|
/**
|
|
65
|
-
* Work-item
|
|
113
|
+
* Work-item accessor: top-level properties (`workItem.title`,
|
|
114
|
+
* `workItem.platform`, `workItem.url`, ...) plus `workItem.field(name)`
|
|
115
|
+
* for the platform-specific `fields` bag.
|
|
66
116
|
*
|
|
67
117
|
* @example
|
|
68
118
|
* workItem.field("issueType").eq("bug").then(assign(bugTriage))
|
|
69
119
|
* workItem.field("labels").contains("regression").then(assign(regressionReview))
|
|
70
120
|
* workItem.field("status").eq("resolved").then(skip())
|
|
121
|
+
* workItem.platform.eq("github").then(assign(githubTriage))
|
|
122
|
+
* workItem.title.contains("[urgent]").then(assign(urgentTriage))
|
|
71
123
|
*/
|
|
72
|
-
workItem:
|
|
73
|
-
field(name: string): AssignmentFieldRef;
|
|
74
|
-
};
|
|
124
|
+
workItem: WorkItemAssignmentAccessor;
|
|
75
125
|
/**
|
|
76
126
|
* Context facts for the current ingestion event.
|
|
77
127
|
* `context.isNew` is `true` when the work item is being created for the first time.
|
|
@@ -80,7 +130,7 @@ export type DefaultPipelineAssignmentCtx = {
|
|
|
80
130
|
* context.isNew.eq(true).then(assign(onboarding))
|
|
81
131
|
*/
|
|
82
132
|
context: {
|
|
83
|
-
isNew: AssignmentFieldRef
|
|
133
|
+
isNew: AssignmentFieldRef<boolean>;
|
|
84
134
|
};
|
|
85
135
|
/**
|
|
86
136
|
* Outcome: assign the work item to the given pipeline.
|
|
@@ -89,7 +139,7 @@ export type DefaultPipelineAssignmentCtx = {
|
|
|
89
139
|
* @example
|
|
90
140
|
* workItem.field("issueType").eq("bug").then(assign(bugTriage))
|
|
91
141
|
*/
|
|
92
|
-
assign(pipeline: PipelineDefinitionSpec)
|
|
142
|
+
assign: (pipeline: PipelineDefinitionSpec) => AssignOutcome;
|
|
93
143
|
/**
|
|
94
144
|
* Outcome: do not assign any pipeline to this work item.
|
|
95
145
|
* Used in both `rules` (via `.then(skip())`) and `default`.
|
|
@@ -97,7 +147,7 @@ export type DefaultPipelineAssignmentCtx = {
|
|
|
97
147
|
* @example
|
|
98
148
|
* workItem.field("status").eq("resolved").then(skip())
|
|
99
149
|
*/
|
|
100
|
-
skip()
|
|
150
|
+
skip: () => SkipOutcome;
|
|
101
151
|
/**
|
|
102
152
|
* All nested conditions must match.
|
|
103
153
|
*
|
|
@@ -107,7 +157,7 @@ export type DefaultPipelineAssignmentCtx = {
|
|
|
107
157
|
* workItem.field("priority").eq("high"),
|
|
108
158
|
* ).then(assign(bugTriage))
|
|
109
159
|
*/
|
|
110
|
-
all(...refs: AssignmentNestable[])
|
|
160
|
+
all: (...refs: AssignmentNestable[]) => AssignmentGroup;
|
|
111
161
|
/**
|
|
112
162
|
* Any nested condition must match.
|
|
113
163
|
*
|
|
@@ -117,7 +167,7 @@ export type DefaultPipelineAssignmentCtx = {
|
|
|
117
167
|
* workItem.field("status").eq("closed"),
|
|
118
168
|
* ).then(skip())
|
|
119
169
|
*/
|
|
120
|
-
any(...refs: AssignmentNestable[])
|
|
170
|
+
any: (...refs: AssignmentNestable[]) => AssignmentGroup;
|
|
121
171
|
};
|
|
122
172
|
export type DefaultPipelineAssignmentInput = {
|
|
123
173
|
/**
|
|
@@ -14821,14 +14821,48 @@ function materializeAccessor(accessor) {
|
|
|
14821
14821
|
};
|
|
14822
14822
|
}
|
|
14823
14823
|
|
|
14824
|
+
// src/definitions/pipelines/work-item-fields.ts
|
|
14825
|
+
var WORK_ITEM_TOP_LEVEL_FIELDS = [
|
|
14826
|
+
"id",
|
|
14827
|
+
"projectId",
|
|
14828
|
+
"platform",
|
|
14829
|
+
"platformId",
|
|
14830
|
+
"platformKey",
|
|
14831
|
+
"url",
|
|
14832
|
+
"title",
|
|
14833
|
+
"description",
|
|
14834
|
+
"sourceCreatedAt",
|
|
14835
|
+
"sourceUpdatedAt",
|
|
14836
|
+
"createdByUserId",
|
|
14837
|
+
"parentWorkItemId",
|
|
14838
|
+
"createdAt",
|
|
14839
|
+
"updatedAt"
|
|
14840
|
+
];
|
|
14841
|
+
var WORK_ITEM_FIELDS_PATH_PREFIX = "fields.";
|
|
14842
|
+
function resolveWorkItemFieldPath(record2, path) {
|
|
14843
|
+
if (typeof record2 !== "object" || record2 === null)
|
|
14844
|
+
return;
|
|
14845
|
+
const asRecord = record2;
|
|
14846
|
+
if (path.startsWith(WORK_ITEM_FIELDS_PATH_PREFIX)) {
|
|
14847
|
+
const fieldName = path.slice(WORK_ITEM_FIELDS_PATH_PREFIX.length);
|
|
14848
|
+
const fields = asRecord["fields"];
|
|
14849
|
+
if (typeof fields !== "object" || fields === null)
|
|
14850
|
+
return;
|
|
14851
|
+
return fields[fieldName];
|
|
14852
|
+
}
|
|
14853
|
+
return asRecord[path];
|
|
14854
|
+
}
|
|
14855
|
+
|
|
14824
14856
|
// src/definitions/pipelines/builder-helpers.ts
|
|
14825
14857
|
var WORK_ITEM_ACCESSOR = Object.freeze({
|
|
14826
|
-
|
|
14827
|
-
|
|
14858
|
+
...Object.fromEntries(WORK_ITEM_TOP_LEVEL_FIELDS.map((field) => [
|
|
14859
|
+
field,
|
|
14860
|
+
Object.freeze({ source: "work_item", field })
|
|
14861
|
+
])),
|
|
14862
|
+
field: (fieldName) => Object.freeze({
|
|
14828
14863
|
source: "work_item",
|
|
14829
|
-
field:
|
|
14830
|
-
})
|
|
14831
|
-
field: (fieldName) => Object.freeze({ source: "work_item", field: `fields.${fieldName}` })
|
|
14864
|
+
field: `${WORK_ITEM_FIELDS_PATH_PREFIX}${fieldName}`
|
|
14865
|
+
})
|
|
14832
14866
|
});
|
|
14833
14867
|
var WORK_ITEM_FIELD_BINDINGS = {
|
|
14834
14868
|
workItemTitle: { source: "work_item", field: "title" },
|
|
@@ -14879,7 +14913,7 @@ function resolveAdditionalStepInputBindings(label, definition) {
|
|
|
14879
14913
|
const raw = definition.bindings({
|
|
14880
14914
|
workItemField: (fieldName) => ({
|
|
14881
14915
|
source: "work_item",
|
|
14882
|
-
field:
|
|
14916
|
+
field: `${WORK_ITEM_FIELDS_PATH_PREFIX}${fieldName}`
|
|
14883
14917
|
}),
|
|
14884
14918
|
literal: literal2
|
|
14885
14919
|
});
|
|
@@ -16378,6 +16412,16 @@ class PipelineExecutions extends HeyApiClient {
|
|
|
16378
16412
|
cancelPipelineExecution(options) {
|
|
16379
16413
|
return (options.client ?? this.client).put({ url: "/api/pipeline-executions/{pipelineExecutionId}/cancel", ...options });
|
|
16380
16414
|
}
|
|
16415
|
+
cancelPipelineExecutions(options) {
|
|
16416
|
+
return (options.client ?? this.client).put({
|
|
16417
|
+
url: "/api/pipeline-executions/batch/cancel",
|
|
16418
|
+
...options,
|
|
16419
|
+
headers: {
|
|
16420
|
+
"Content-Type": "application/json",
|
|
16421
|
+
...options.headers
|
|
16422
|
+
}
|
|
16423
|
+
});
|
|
16424
|
+
}
|
|
16381
16425
|
getPipelineExecution(options) {
|
|
16382
16426
|
return (options.client ?? this.client).get({ url: "/api/pipeline-executions/{pipelineExecutionId}", ...options });
|
|
16383
16427
|
}
|
|
@@ -16402,6 +16446,19 @@ class WorkItems extends HeyApiClient {
|
|
|
16402
16446
|
getWorkItem(options) {
|
|
16403
16447
|
return (options.client ?? this.client).get({ url: "/api/work-items/{workItemId}", ...options });
|
|
16404
16448
|
}
|
|
16449
|
+
editWorkItem(options) {
|
|
16450
|
+
return (options.client ?? this.client).patch({
|
|
16451
|
+
url: "/api/work-items/{workItemId}",
|
|
16452
|
+
...options,
|
|
16453
|
+
headers: {
|
|
16454
|
+
"Content-Type": "application/json",
|
|
16455
|
+
...options.headers
|
|
16456
|
+
}
|
|
16457
|
+
});
|
|
16458
|
+
}
|
|
16459
|
+
listWorkItemChildren(options) {
|
|
16460
|
+
return (options.client ?? this.client).get({ url: "/api/work-items/{workItemId}/children", ...options });
|
|
16461
|
+
}
|
|
16405
16462
|
createWorkItem(options) {
|
|
16406
16463
|
return (options.client ?? this.client).post({
|
|
16407
16464
|
url: "/api/work-items",
|
|
@@ -16452,6 +16509,16 @@ class WorkItems extends HeyApiClient {
|
|
|
16452
16509
|
}
|
|
16453
16510
|
});
|
|
16454
16511
|
}
|
|
16512
|
+
setWorkItemParent(options) {
|
|
16513
|
+
return (options.client ?? this.client).patch({
|
|
16514
|
+
url: "/api/work-items/{workItemId}/parent",
|
|
16515
|
+
...options,
|
|
16516
|
+
headers: {
|
|
16517
|
+
"Content-Type": "application/json",
|
|
16518
|
+
...options.headers
|
|
16519
|
+
}
|
|
16520
|
+
});
|
|
16521
|
+
}
|
|
16455
16522
|
}
|
|
16456
16523
|
|
|
16457
16524
|
class WorkItemComments extends HeyApiClient {
|
|
@@ -16493,6 +16560,25 @@ class WorkItemComments extends HeyApiClient {
|
|
|
16493
16560
|
}
|
|
16494
16561
|
}
|
|
16495
16562
|
|
|
16563
|
+
class WorkItemBlocks extends HeyApiClient {
|
|
16564
|
+
listWorkItemBlocks(options) {
|
|
16565
|
+
return (options.client ?? this.client).get({ url: "/api/work-item-blocks", ...options });
|
|
16566
|
+
}
|
|
16567
|
+
createWorkItemBlock(options) {
|
|
16568
|
+
return (options.client ?? this.client).post({
|
|
16569
|
+
url: "/api/work-item-blocks",
|
|
16570
|
+
...options,
|
|
16571
|
+
headers: {
|
|
16572
|
+
"Content-Type": "application/json",
|
|
16573
|
+
...options.headers
|
|
16574
|
+
}
|
|
16575
|
+
});
|
|
16576
|
+
}
|
|
16577
|
+
deleteWorkItemBlock(options) {
|
|
16578
|
+
return (options.client ?? this.client).delete({ url: "/api/work-item-blocks/{blockId}", ...options });
|
|
16579
|
+
}
|
|
16580
|
+
}
|
|
16581
|
+
|
|
16496
16582
|
class ProjectContext extends HeyApiClient {
|
|
16497
16583
|
listProjectContextEntries(options) {
|
|
16498
16584
|
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/context-entries", ...options });
|
|
@@ -16701,6 +16787,10 @@ class BoboddyClient extends HeyApiClient {
|
|
|
16701
16787
|
get workItemComments() {
|
|
16702
16788
|
return this._workItemComments ??= new WorkItemComments({ client: this.client });
|
|
16703
16789
|
}
|
|
16790
|
+
_workItemBlocks;
|
|
16791
|
+
get workItemBlocks() {
|
|
16792
|
+
return this._workItemBlocks ??= new WorkItemBlocks({ client: this.client });
|
|
16793
|
+
}
|
|
16704
16794
|
_projectContext;
|
|
16705
16795
|
get projectContext() {
|
|
16706
16796
|
return this._projectContext ??= new ProjectContext({ client: this.client });
|
|
@@ -16836,7 +16926,7 @@ function makeLeaf(fact, path, operator, value) {
|
|
|
16836
16926
|
};
|
|
16837
16927
|
}
|
|
16838
16928
|
function makeFieldRef(fact, path) {
|
|
16839
|
-
|
|
16929
|
+
const untyped = {
|
|
16840
16930
|
eq: (v) => makeLeaf(fact, path, "equal", v),
|
|
16841
16931
|
ne: (v) => makeLeaf(fact, path, "notEqual", v),
|
|
16842
16932
|
gt: (v) => makeLeaf(fact, path, "greaterThan", v),
|
|
@@ -16848,6 +16938,16 @@ function makeFieldRef(fact, path) {
|
|
|
16848
16938
|
contains: (v) => makeLeaf(fact, path, "contains", v),
|
|
16849
16939
|
doesNotContain: (v) => makeLeaf(fact, path, "doesNotContain", v)
|
|
16850
16940
|
};
|
|
16941
|
+
return untyped;
|
|
16942
|
+
}
|
|
16943
|
+
function buildWorkItemAccessor() {
|
|
16944
|
+
const accessor = {
|
|
16945
|
+
field: (name) => makeFieldRef("workItem", `$.${WORK_ITEM_FIELDS_PATH_PREFIX}${name}`)
|
|
16946
|
+
};
|
|
16947
|
+
for (const key of WORK_ITEM_TOP_LEVEL_FIELDS) {
|
|
16948
|
+
accessor[key] = makeFieldRef("workItem", `$.${key}`);
|
|
16949
|
+
}
|
|
16950
|
+
return accessor;
|
|
16851
16951
|
}
|
|
16852
16952
|
function makeAssign(pipeline2) {
|
|
16853
16953
|
if (typeof pipeline2 !== "object" || typeof pipeline2["key"] !== "string" || !Array.isArray(pipeline2["nodeDefinitions"])) {
|
|
@@ -16870,9 +16970,7 @@ function makeGroup(mode, refs) {
|
|
|
16870
16970
|
}
|
|
16871
16971
|
function buildCtx() {
|
|
16872
16972
|
return {
|
|
16873
|
-
workItem:
|
|
16874
|
-
field: (name) => makeFieldRef("workItem", `$.fields.${name}`)
|
|
16875
|
-
},
|
|
16973
|
+
workItem: buildWorkItemAccessor(),
|
|
16876
16974
|
context: {
|
|
16877
16975
|
isNew: makeFieldRef("context", "$.isNew")
|
|
16878
16976
|
},
|
|
@@ -16952,6 +17050,7 @@ function isDefaultPipelineAssignmentSpec(value) {
|
|
|
16952
17050
|
}
|
|
16953
17051
|
export {
|
|
16954
17052
|
serializeDefaultPipelineAssignment,
|
|
17053
|
+
resolveWorkItemFieldPath,
|
|
16955
17054
|
pipeline,
|
|
16956
17055
|
materializeAccessor,
|
|
16957
17056
|
literal2 as literal,
|
|
@@ -16961,6 +17060,8 @@ export {
|
|
|
16961
17060
|
createPipelineDefinitionsClient,
|
|
16962
17061
|
createInputAccessor,
|
|
16963
17062
|
buildPipelineSpec,
|
|
17063
|
+
WORK_ITEM_TOP_LEVEL_FIELDS,
|
|
17064
|
+
WORK_ITEM_FIELDS_PATH_PREFIX,
|
|
16964
17065
|
Rule,
|
|
16965
17066
|
PipelineStepBuilder,
|
|
16966
17067
|
PipelineBuilder,
|
|
@@ -20,7 +20,9 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
|
|
|
20
20
|
description: string | unknown;
|
|
21
21
|
status: "draft" | "active" | "archived";
|
|
22
22
|
archivedAt: string | unknown;
|
|
23
|
-
inputSchemaJson:
|
|
23
|
+
inputSchemaJson: {
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
} | unknown;
|
|
24
26
|
stepDefinitions: Array<{
|
|
25
27
|
id: string;
|
|
26
28
|
pipelineDefinitionId: string;
|
|
@@ -51,7 +53,9 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
|
|
|
51
53
|
};
|
|
52
54
|
} | unknown;
|
|
53
55
|
timeoutSeconds: number | unknown;
|
|
54
|
-
retryPolicyJson:
|
|
56
|
+
retryPolicyJson: {
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
} | unknown;
|
|
55
59
|
advancementPolicyDefinition: {
|
|
56
60
|
id: string;
|
|
57
61
|
pipelineStepDefinitionId: string;
|
|
@@ -100,7 +104,9 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
|
|
|
100
104
|
}>;
|
|
101
105
|
};
|
|
102
106
|
defaultEventType: "continue" | "block" | "complete" | "route";
|
|
103
|
-
defaultEventParamsJson:
|
|
107
|
+
defaultEventParamsJson: {
|
|
108
|
+
[key: string]: unknown;
|
|
109
|
+
} | unknown;
|
|
104
110
|
allowedEventTypes: Array<"continue" | "block" | "complete" | "route">;
|
|
105
111
|
createdAt: string;
|
|
106
112
|
updatedAt: string;
|
|
@@ -110,7 +116,9 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
|
|
|
110
116
|
key: string;
|
|
111
117
|
type: "average" | "weighted_average" | "sum" | "min" | "max" | "count" | "boolean_any" | "boolean_all";
|
|
112
118
|
inputSignalKeys: Array<string>;
|
|
113
|
-
configJson:
|
|
119
|
+
configJson: {
|
|
120
|
+
[key: string]: unknown;
|
|
121
|
+
} | unknown;
|
|
114
122
|
availableWhenResultStatusIn: Array<string> | unknown;
|
|
115
123
|
createdAt: string;
|
|
116
124
|
updatedAt: string;
|
|
@@ -138,7 +146,9 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
|
|
|
138
146
|
description: string | unknown;
|
|
139
147
|
status: "draft" | "active" | "archived";
|
|
140
148
|
archivedAt: string | unknown;
|
|
141
|
-
inputSchemaJson:
|
|
149
|
+
inputSchemaJson: {
|
|
150
|
+
[key: string]: unknown;
|
|
151
|
+
} | unknown;
|
|
142
152
|
stepDefinitions: Array<{
|
|
143
153
|
id: string;
|
|
144
154
|
pipelineDefinitionId: string;
|
|
@@ -169,7 +179,9 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
|
|
|
169
179
|
};
|
|
170
180
|
} | unknown;
|
|
171
181
|
timeoutSeconds: number | unknown;
|
|
172
|
-
retryPolicyJson:
|
|
182
|
+
retryPolicyJson: {
|
|
183
|
+
[key: string]: unknown;
|
|
184
|
+
} | unknown;
|
|
173
185
|
advancementPolicyDefinition: {
|
|
174
186
|
id: string;
|
|
175
187
|
pipelineStepDefinitionId: string;
|
|
@@ -218,7 +230,9 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
|
|
|
218
230
|
}>;
|
|
219
231
|
};
|
|
220
232
|
defaultEventType: "continue" | "block" | "complete" | "route";
|
|
221
|
-
defaultEventParamsJson:
|
|
233
|
+
defaultEventParamsJson: {
|
|
234
|
+
[key: string]: unknown;
|
|
235
|
+
} | unknown;
|
|
222
236
|
allowedEventTypes: Array<"continue" | "block" | "complete" | "route">;
|
|
223
237
|
createdAt: string;
|
|
224
238
|
updatedAt: string;
|
|
@@ -228,7 +242,9 @@ declare const buildPipelineDefinitionsClient: (pipelineDefinitions: PipelineDefi
|
|
|
228
242
|
key: string;
|
|
229
243
|
type: "average" | "weighted_average" | "sum" | "min" | "max" | "count" | "boolean_any" | "boolean_all";
|
|
230
244
|
inputSignalKeys: Array<string>;
|
|
231
|
-
configJson:
|
|
245
|
+
configJson: {
|
|
246
|
+
[key: string]: unknown;
|
|
247
|
+
} | unknown;
|
|
232
248
|
availableWhenResultStatusIn: Array<string> | unknown;
|
|
233
249
|
createdAt: string;
|
|
234
250
|
updatedAt: string;
|