@shortcut/client 1.1.0 → 2.0.0

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/lib/index.js CHANGED
@@ -1,21 +1,2179 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ ShortcutClient: () => ShortcutClient,
34
+ default: () => ShortcutClient
35
+ });
36
+ module.exports = __toCommonJS(index_exports);
37
+
38
+ // src/generated/http-client.ts
39
+ var import_axios = __toESM(require("axios"));
40
+ var HttpClient = class {
41
+ instance;
42
+ securityData = null;
43
+ securityWorker;
44
+ secure;
45
+ format;
46
+ constructor({
47
+ securityWorker,
48
+ secure,
49
+ format,
50
+ ...axiosConfig
51
+ } = {}) {
52
+ this.instance = import_axios.default.create({
53
+ ...axiosConfig,
54
+ baseURL: axiosConfig.baseURL || "https://api.app.shortcut.com"
55
+ });
56
+ this.secure = secure;
57
+ this.format = format;
58
+ this.securityWorker = securityWorker;
59
+ }
60
+ setSecurityData = (data) => {
61
+ this.securityData = data;
62
+ };
63
+ mergeRequestParams(params1, params2) {
64
+ const method = params1.method || params2 && params2.method;
65
+ return {
66
+ ...this.instance.defaults,
67
+ ...params1,
68
+ ...params2 || {},
69
+ headers: {
70
+ ...method && this.instance.defaults.headers[method.toLowerCase()] || {},
71
+ ...params1.headers || {},
72
+ ...params2 && params2.headers || {}
73
+ }
74
+ };
75
+ }
76
+ stringifyFormItem(formItem) {
77
+ if (typeof formItem === "object" && formItem !== null) {
78
+ return JSON.stringify(formItem);
79
+ } else {
80
+ return `${formItem}`;
81
+ }
82
+ }
83
+ createFormData(input) {
84
+ return Object.keys(input || {}).reduce((formData, key) => {
85
+ const property = input[key];
86
+ const propertyContent = property instanceof Array ? property : [property];
87
+ for (const formItem of propertyContent) {
88
+ const isFileType = formItem instanceof Blob;
89
+ formData.append(
90
+ key,
91
+ isFileType ? formItem : this.stringifyFormItem(formItem)
92
+ );
93
+ }
94
+ return formData;
95
+ }, new FormData());
96
+ }
97
+ request = async ({
98
+ secure,
99
+ path,
100
+ type,
101
+ query,
102
+ format,
103
+ body,
104
+ ...params
105
+ }) => {
106
+ const secureParams = (typeof secure === "boolean" ? secure : this.secure) && this.securityWorker && await this.securityWorker(this.securityData) || {};
107
+ const requestParams = this.mergeRequestParams(params, secureParams);
108
+ const responseFormat = format || this.format || void 0;
109
+ if (type === "multipart/form-data" /* FormData */ && body && body !== null && typeof body === "object") {
110
+ body = this.createFormData(body);
111
+ }
112
+ if (type === "text/plain" /* Text */ && body && body !== null && typeof body !== "string") {
113
+ body = JSON.stringify(body);
114
+ }
115
+ return this.instance.request({
116
+ ...requestParams,
117
+ headers: {
118
+ ...requestParams.headers || {},
119
+ ...type && type !== "multipart/form-data" /* FormData */ ? { "Content-Type": type } : {}
120
+ },
121
+ params: query,
122
+ responseType: responseFormat,
123
+ data: body,
124
+ url: path
125
+ });
126
+ };
127
+ };
128
+
129
+ // src/generated/Api.ts
130
+ var Api = class extends HttpClient {
131
+ /**
132
+ * @description List Categories returns a list of all Categories and their attributes.
133
+ *
134
+ * @name ListCategories
135
+ * @summary List Categories
136
+ * @request GET:/api/v3/categories
137
+ * @secure
138
+ */
139
+ listCategories = (params = {}) => this.request({
140
+ path: `/api/v3/categories`,
141
+ method: "GET",
142
+ secure: true,
143
+ format: "json",
144
+ ...params
145
+ });
146
+ /**
147
+ * @description Create Category allows you to create a new Category in Shortcut.
148
+ *
149
+ * @name CreateCategory
150
+ * @summary Create Category
151
+ * @request POST:/api/v3/categories
152
+ * @secure
153
+ */
154
+ createCategory = (CreateCategory, params = {}) => this.request({
155
+ path: `/api/v3/categories`,
156
+ method: "POST",
157
+ body: CreateCategory,
158
+ secure: true,
159
+ type: "application/json" /* Json */,
160
+ format: "json",
161
+ ...params
162
+ });
163
+ /**
164
+ * @description Get Category returns information about the selected Category.
165
+ *
166
+ * @name GetCategory
167
+ * @summary Get Category
168
+ * @request GET:/api/v3/categories/{category-public-id}
169
+ * @secure
170
+ */
171
+ getCategory = (categoryPublicId, params = {}) => this.request({
172
+ path: `/api/v3/categories/${categoryPublicId}`,
173
+ method: "GET",
174
+ secure: true,
175
+ format: "json",
176
+ ...params
177
+ });
178
+ /**
179
+ * @description Update Category allows you to replace a Category name with another name. If you try to name a Category something that already exists, you will receive a 422 response.
180
+ *
181
+ * @name UpdateCategory
182
+ * @summary Update Category
183
+ * @request PUT:/api/v3/categories/{category-public-id}
184
+ * @secure
185
+ */
186
+ updateCategory = (categoryPublicId, UpdateCategory, params = {}) => this.request({
187
+ path: `/api/v3/categories/${categoryPublicId}`,
188
+ method: "PUT",
189
+ body: UpdateCategory,
190
+ secure: true,
191
+ type: "application/json" /* Json */,
192
+ format: "json",
193
+ ...params
194
+ });
195
+ /**
196
+ * @description Delete Category can be used to delete any Category.
197
+ *
198
+ * @name DeleteCategory
199
+ * @summary Delete Category
200
+ * @request DELETE:/api/v3/categories/{category-public-id}
201
+ * @secure
202
+ */
203
+ deleteCategory = (categoryPublicId, params = {}) => this.request({
204
+ path: `/api/v3/categories/${categoryPublicId}`,
205
+ method: "DELETE",
206
+ secure: true,
207
+ ...params
208
+ });
209
+ /**
210
+ * @description List Category Milestones returns a list of all Milestones with the Category.
211
+ *
212
+ * @name ListCategoryMilestones
213
+ * @summary List Category Milestones
214
+ * @request GET:/api/v3/categories/{category-public-id}/milestones
215
+ * @secure
216
+ */
217
+ listCategoryMilestones = (categoryPublicId, params = {}) => this.request({
218
+ path: `/api/v3/categories/${categoryPublicId}/milestones`,
219
+ method: "GET",
220
+ secure: true,
221
+ format: "json",
222
+ ...params
223
+ });
224
+ /**
225
+ * @description Returns a list of all Objectives with the Category.
226
+ *
227
+ * @name ListCategoryObjectives
228
+ * @summary List Category Objectives
229
+ * @request GET:/api/v3/categories/{category-public-id}/objectives
230
+ * @secure
231
+ */
232
+ listCategoryObjectives = (categoryPublicId, params = {}) => this.request({
233
+ path: `/api/v3/categories/${categoryPublicId}/objectives`,
234
+ method: "GET",
235
+ secure: true,
236
+ format: "json",
237
+ ...params
238
+ });
239
+ /**
240
+ * No description
241
+ *
242
+ * @name ListCustomFields
243
+ * @summary List Custom Fields
244
+ * @request GET:/api/v3/custom-fields
245
+ * @secure
246
+ */
247
+ listCustomFields = (params = {}) => this.request({
248
+ path: `/api/v3/custom-fields`,
249
+ method: "GET",
250
+ secure: true,
251
+ format: "json",
252
+ ...params
253
+ });
254
+ /**
255
+ * No description
256
+ *
257
+ * @name GetCustomField
258
+ * @summary Get Custom Field
259
+ * @request GET:/api/v3/custom-fields/{custom-field-public-id}
260
+ * @secure
261
+ */
262
+ getCustomField = (customFieldPublicId, params = {}) => this.request({
263
+ path: `/api/v3/custom-fields/${customFieldPublicId}`,
264
+ method: "GET",
265
+ secure: true,
266
+ format: "json",
267
+ ...params
268
+ });
269
+ /**
270
+ * @description Update Custom Field can be used to update the definition of a Custom Field. The order of items in the 'values' collection is interpreted to be their ascending sort order.To delete an existing enum value, simply omit it from the 'values' collection. New enum values may be created inline by including an object in the 'values' collection having a 'value' entry with no 'id' (eg. {'value': 'myNewValue', 'color_key': 'green'}).
271
+ *
272
+ * @name UpdateCustomField
273
+ * @summary Update Custom Field
274
+ * @request PUT:/api/v3/custom-fields/{custom-field-public-id}
275
+ * @secure
276
+ */
277
+ updateCustomField = (customFieldPublicId, UpdateCustomField, params = {}) => this.request({
278
+ path: `/api/v3/custom-fields/${customFieldPublicId}`,
279
+ method: "PUT",
280
+ body: UpdateCustomField,
281
+ secure: true,
282
+ type: "application/json" /* Json */,
283
+ format: "json",
284
+ ...params
285
+ });
286
+ /**
287
+ * No description
288
+ *
289
+ * @name DeleteCustomField
290
+ * @summary Delete Custom Field
291
+ * @request DELETE:/api/v3/custom-fields/{custom-field-public-id}
292
+ * @secure
293
+ */
294
+ deleteCustomField = (customFieldPublicId, params = {}) => this.request({
295
+ path: `/api/v3/custom-fields/${customFieldPublicId}`,
296
+ method: "DELETE",
297
+ secure: true,
298
+ ...params
299
+ });
300
+ /**
301
+ * @description List all the entity templates for the Workspace.
302
+ *
303
+ * @name ListEntityTemplates
304
+ * @summary List Entity Templates
305
+ * @request GET:/api/v3/entity-templates
306
+ * @secure
307
+ */
308
+ listEntityTemplates = (params = {}) => this.request({
309
+ path: `/api/v3/entity-templates`,
310
+ method: "GET",
311
+ secure: true,
312
+ format: "json",
313
+ ...params
314
+ });
315
+ /**
316
+ * @description Create a new entity template for the Workspace.
317
+ *
318
+ * @name CreateEntityTemplate
319
+ * @summary Create Entity Template
320
+ * @request POST:/api/v3/entity-templates
321
+ * @secure
322
+ */
323
+ createEntityTemplate = (CreateEntityTemplate, params = {}) => this.request({
324
+ path: `/api/v3/entity-templates`,
325
+ method: "POST",
326
+ body: CreateEntityTemplate,
327
+ secure: true,
328
+ type: "application/json" /* Json */,
329
+ format: "json",
330
+ ...params
331
+ });
332
+ /**
333
+ * @description Disables the Story Template feature for the Workspace.
334
+ *
335
+ * @name DisableStoryTemplates
336
+ * @summary Disable Story Templates
337
+ * @request PUT:/api/v3/entity-templates/disable
338
+ * @secure
339
+ */
340
+ disableStoryTemplates = (params = {}) => this.request({
341
+ path: `/api/v3/entity-templates/disable`,
342
+ method: "PUT",
343
+ secure: true,
344
+ ...params
345
+ });
346
+ /**
347
+ * @description Enables the Story Template feature for the Workspace.
348
+ *
349
+ * @name EnableStoryTemplates
350
+ * @summary Enable Story Templates
351
+ * @request PUT:/api/v3/entity-templates/enable
352
+ * @secure
353
+ */
354
+ enableStoryTemplates = (params = {}) => this.request({
355
+ path: `/api/v3/entity-templates/enable`,
356
+ method: "PUT",
357
+ secure: true,
358
+ ...params
359
+ });
360
+ /**
361
+ * @description Get Entity Template returns information about a given entity template.
362
+ *
363
+ * @name GetEntityTemplate
364
+ * @summary Get Entity Template
365
+ * @request GET:/api/v3/entity-templates/{entity-template-public-id}
366
+ * @secure
367
+ */
368
+ getEntityTemplate = (entityTemplatePublicId, params = {}) => this.request({
369
+ path: `/api/v3/entity-templates/${entityTemplatePublicId}`,
370
+ method: "GET",
371
+ secure: true,
372
+ format: "json",
373
+ ...params
374
+ });
375
+ /**
376
+ * @description Update an entity template's name or its contents.
377
+ *
378
+ * @name UpdateEntityTemplate
379
+ * @summary Update Entity Template
380
+ * @request PUT:/api/v3/entity-templates/{entity-template-public-id}
381
+ * @secure
382
+ */
383
+ updateEntityTemplate = (entityTemplatePublicId, UpdateEntityTemplate, params = {}) => this.request({
384
+ path: `/api/v3/entity-templates/${entityTemplatePublicId}`,
385
+ method: "PUT",
386
+ body: UpdateEntityTemplate,
387
+ secure: true,
388
+ type: "application/json" /* Json */,
389
+ format: "json",
390
+ ...params
391
+ });
392
+ /**
393
+ * No description
394
+ *
395
+ * @name DeleteEntityTemplate
396
+ * @summary Delete Entity Template
397
+ * @request DELETE:/api/v3/entity-templates/{entity-template-public-id}
398
+ * @secure
399
+ */
400
+ deleteEntityTemplate = (entityTemplatePublicId, params = {}) => this.request({
401
+ path: `/api/v3/entity-templates/${entityTemplatePublicId}`,
402
+ method: "DELETE",
403
+ secure: true,
404
+ ...params
405
+ });
406
+ /**
407
+ * @description Returns the Epic Workflow for the Workspace.
408
+ *
409
+ * @name GetEpicWorkflow
410
+ * @summary Get Epic Workflow
411
+ * @request GET:/api/v3/epic-workflow
412
+ * @secure
413
+ */
414
+ getEpicWorkflow = (params = {}) => this.request({
415
+ path: `/api/v3/epic-workflow`,
416
+ method: "GET",
417
+ secure: true,
418
+ format: "json",
419
+ ...params
420
+ });
421
+ /**
422
+ * @description List Epics returns a list of all Epics and their attributes.
423
+ *
424
+ * @name ListEpics
425
+ * @summary List Epics
426
+ * @request GET:/api/v3/epics
427
+ * @secure
428
+ */
429
+ listEpics = (query, params = {}) => this.request({
430
+ path: `/api/v3/epics`,
431
+ method: "GET",
432
+ query,
433
+ secure: true,
434
+ format: "json",
435
+ ...params
436
+ });
437
+ /**
438
+ * @description Create Epic allows you to create a new Epic in Shortcut.
439
+ *
440
+ * @name CreateEpic
441
+ * @summary Create Epic
442
+ * @request POST:/api/v3/epics
443
+ * @secure
444
+ */
445
+ createEpic = (CreateEpic, params = {}) => this.request({
446
+ path: `/api/v3/epics`,
447
+ method: "POST",
448
+ body: CreateEpic,
449
+ secure: true,
450
+ type: "application/json" /* Json */,
451
+ format: "json",
452
+ ...params
453
+ });
454
+ /**
455
+ * @description List Epics with pagination returns a paginated list of Epics and their attributes.
456
+ *
457
+ * @name ListEpicsPaginated
458
+ * @summary List Epics Paginated
459
+ * @request GET:/api/v3/epics/paginated
460
+ * @secure
461
+ */
462
+ listEpicsPaginated = (query, params = {}) => this.request({
463
+ path: `/api/v3/epics/paginated`,
464
+ method: "GET",
465
+ query,
466
+ secure: true,
467
+ format: "json",
468
+ ...params
469
+ });
470
+ /**
471
+ * @description Get Epic returns information about the selected Epic.
472
+ *
473
+ * @name GetEpic
474
+ * @summary Get Epic
475
+ * @request GET:/api/v3/epics/{epic-public-id}
476
+ * @secure
477
+ */
478
+ getEpic = (epicPublicId, params = {}) => this.request({
479
+ path: `/api/v3/epics/${epicPublicId}`,
480
+ method: "GET",
481
+ secure: true,
482
+ format: "json",
483
+ ...params
484
+ });
485
+ /**
486
+ * @description Update Epic can be used to update numerous fields in the Epic. The only required parameter is Epic ID, which can be found in the Shortcut UI.
487
+ *
488
+ * @name UpdateEpic
489
+ * @summary Update Epic
490
+ * @request PUT:/api/v3/epics/{epic-public-id}
491
+ * @secure
492
+ */
493
+ updateEpic = (epicPublicId, UpdateEpic, params = {}) => this.request({
494
+ path: `/api/v3/epics/${epicPublicId}`,
495
+ method: "PUT",
496
+ body: UpdateEpic,
497
+ secure: true,
498
+ type: "application/json" /* Json */,
499
+ format: "json",
500
+ ...params
501
+ });
502
+ /**
503
+ * @description Delete Epic can be used to delete the Epic. The only required parameter is Epic ID.
504
+ *
505
+ * @name DeleteEpic
506
+ * @summary Delete Epic
507
+ * @request DELETE:/api/v3/epics/{epic-public-id}
508
+ * @secure
509
+ */
510
+ deleteEpic = (epicPublicId, params = {}) => this.request({
511
+ path: `/api/v3/epics/${epicPublicId}`,
512
+ method: "DELETE",
513
+ secure: true,
514
+ ...params
515
+ });
516
+ /**
517
+ * @description Get a list of all Comments on an Epic.
518
+ *
519
+ * @name ListEpicComments
520
+ * @summary List Epic Comments
521
+ * @request GET:/api/v3/epics/{epic-public-id}/comments
522
+ * @secure
523
+ */
524
+ listEpicComments = (epicPublicId, params = {}) => this.request({
525
+ path: `/api/v3/epics/${epicPublicId}/comments`,
526
+ method: "GET",
527
+ secure: true,
528
+ format: "json",
529
+ ...params
530
+ });
531
+ /**
532
+ * @description This endpoint allows you to create a threaded Comment on an Epic.
533
+ *
534
+ * @name CreateEpicComment
535
+ * @summary Create Epic Comment
536
+ * @request POST:/api/v3/epics/{epic-public-id}/comments
537
+ * @secure
538
+ */
539
+ createEpicComment = (epicPublicId, CreateEpicComment, params = {}) => this.request({
540
+ path: `/api/v3/epics/${epicPublicId}/comments`,
541
+ method: "POST",
542
+ body: CreateEpicComment,
543
+ secure: true,
544
+ type: "application/json" /* Json */,
545
+ format: "json",
546
+ ...params
547
+ });
548
+ /**
549
+ * @description This endpoint allows you to create a nested Comment reply to an existing Epic Comment.
550
+ *
551
+ * @name CreateEpicCommentComment
552
+ * @summary Create Epic Comment Comment
553
+ * @request POST:/api/v3/epics/{epic-public-id}/comments/{comment-public-id}
554
+ * @secure
555
+ */
556
+ createEpicCommentComment = (epicPublicId, commentPublicId, CreateCommentComment, params = {}) => this.request({
557
+ path: `/api/v3/epics/${epicPublicId}/comments/${commentPublicId}`,
558
+ method: "POST",
559
+ body: CreateCommentComment,
560
+ secure: true,
561
+ type: "application/json" /* Json */,
562
+ format: "json",
563
+ ...params
564
+ });
565
+ /**
566
+ * @description This endpoint returns information about the selected Epic Comment.
567
+ *
568
+ * @name GetEpicComment
569
+ * @summary Get Epic Comment
570
+ * @request GET:/api/v3/epics/{epic-public-id}/comments/{comment-public-id}
571
+ * @secure
572
+ */
573
+ getEpicComment = (epicPublicId, commentPublicId, params = {}) => this.request({
574
+ path: `/api/v3/epics/${epicPublicId}/comments/${commentPublicId}`,
575
+ method: "GET",
576
+ secure: true,
577
+ format: "json",
578
+ ...params
579
+ });
580
+ /**
581
+ * @description This endpoint allows you to update a threaded Comment on an Epic.
582
+ *
583
+ * @name UpdateEpicComment
584
+ * @summary Update Epic Comment
585
+ * @request PUT:/api/v3/epics/{epic-public-id}/comments/{comment-public-id}
586
+ * @secure
587
+ */
588
+ updateEpicComment = (epicPublicId, commentPublicId, UpdateComment, params = {}) => this.request({
589
+ path: `/api/v3/epics/${epicPublicId}/comments/${commentPublicId}`,
590
+ method: "PUT",
591
+ body: UpdateComment,
592
+ secure: true,
593
+ type: "application/json" /* Json */,
594
+ format: "json",
595
+ ...params
596
+ });
597
+ /**
598
+ * @description This endpoint allows you to delete a Comment from an Epic.
599
+ *
600
+ * @name DeleteEpicComment
601
+ * @summary Delete Epic Comment
602
+ * @request DELETE:/api/v3/epics/{epic-public-id}/comments/{comment-public-id}
603
+ * @secure
604
+ */
605
+ deleteEpicComment = (epicPublicId, commentPublicId, params = {}) => this.request({
606
+ path: `/api/v3/epics/${epicPublicId}/comments/${commentPublicId}`,
607
+ method: "DELETE",
608
+ secure: true,
609
+ ...params
610
+ });
611
+ /**
612
+ * @description Get the current health for the specified Epic.
613
+ *
614
+ * @name GetEpicHealth
615
+ * @summary Get Epic Health
616
+ * @request GET:/api/v3/epics/{epic-public-id}/health
617
+ * @secure
618
+ */
619
+ getEpicHealth = (epicPublicId, params = {}) => this.request({
620
+ path: `/api/v3/epics/${epicPublicId}/health`,
621
+ method: "GET",
622
+ secure: true,
623
+ format: "json",
624
+ ...params
625
+ });
626
+ /**
627
+ * @description Create a new health status for the specified Epic.
628
+ *
629
+ * @name CreateEpicHealth
630
+ * @summary Create Epic Health
631
+ * @request POST:/api/v3/epics/{epic-public-id}/health
632
+ * @secure
633
+ */
634
+ createEpicHealth = (epicPublicId, CreateEpicHealth, params = {}) => this.request({
635
+ path: `/api/v3/epics/${epicPublicId}/health`,
636
+ method: "POST",
637
+ body: CreateEpicHealth,
638
+ secure: true,
639
+ type: "application/json" /* Json */,
640
+ format: "json",
641
+ ...params
642
+ });
643
+ /**
644
+ * @description List the history of health statuses for the specified Epic, most recent first.
645
+ *
646
+ * @name ListEpicHealths
647
+ * @summary List Epic Healths
648
+ * @request GET:/api/v3/epics/{epic-public-id}/health-history
649
+ * @secure
650
+ */
651
+ listEpicHealths = (epicPublicId, params = {}) => this.request({
652
+ path: `/api/v3/epics/${epicPublicId}/health-history`,
653
+ method: "GET",
654
+ secure: true,
655
+ format: "json",
656
+ ...params
657
+ });
658
+ /**
659
+ * @description Get a list of all Stories in an Epic.
660
+ *
661
+ * @name ListEpicStories
662
+ * @summary List Epic Stories
663
+ * @request GET:/api/v3/epics/{epic-public-id}/stories
664
+ * @secure
665
+ */
666
+ listEpicStories = (epicPublicId, query, params = {}) => this.request({
667
+ path: `/api/v3/epics/${epicPublicId}/stories`,
668
+ method: "GET",
669
+ query,
670
+ secure: true,
671
+ format: "json",
672
+ ...params
673
+ });
674
+ /**
675
+ * @description This endpoint allows you to unlink a productboard epic.
676
+ *
677
+ * @name UnlinkProductboardFromEpic
678
+ * @summary Unlink Productboard from Epic
679
+ * @request POST:/api/v3/epics/{epic-public-id}/unlink-productboard
680
+ * @secure
681
+ */
682
+ unlinkProductboardFromEpic = (epicPublicId, params = {}) => this.request({
683
+ path: `/api/v3/epics/${epicPublicId}/unlink-productboard`,
684
+ method: "POST",
685
+ secure: true,
686
+ ...params
687
+ });
688
+ /**
689
+ * @description Get Stories which have a given External Link associated with them.
690
+ *
691
+ * @name GetExternalLinkStories
692
+ * @summary Get External Link Stories
693
+ * @request GET:/api/v3/external-link/stories
694
+ * @secure
695
+ */
696
+ getExternalLinkStories = (query, params = {}) => this.request({
697
+ path: `/api/v3/external-link/stories`,
698
+ method: "GET",
699
+ query,
700
+ secure: true,
701
+ format: "json",
702
+ ...params
703
+ });
704
+ /**
705
+ * @description List Files returns a list of all UploadedFiles in the workspace.
706
+ *
707
+ * @name ListFiles
708
+ * @summary List Files
709
+ * @request GET:/api/v3/files
710
+ * @secure
711
+ */
712
+ listFiles = (params = {}) => this.request({
713
+ path: `/api/v3/files`,
714
+ method: "GET",
715
+ secure: true,
716
+ format: "json",
717
+ ...params
718
+ });
719
+ /**
720
+ * @description Upload Files uploads one or many files and optionally associates them with a story. Use the multipart/form-data content-type to upload. Each `file` key should contain a separate file. Each UploadedFile's name comes from the Content-Disposition header "filename" directive for that field.
721
+ *
722
+ * @name UploadFiles
723
+ * @summary Upload Files
724
+ * @request POST:/api/v3/files
725
+ * @secure
726
+ */
727
+ uploadFiles = (data, params = {}) => this.request({
728
+ path: `/api/v3/files`,
729
+ method: "POST",
730
+ body: data,
731
+ secure: true,
732
+ type: "multipart/form-data" /* FormData */,
733
+ format: "json",
734
+ ...params
735
+ });
736
+ /**
737
+ * @description Get File returns information about the selected UploadedFile.
738
+ *
739
+ * @name GetFile
740
+ * @summary Get File
741
+ * @request GET:/api/v3/files/{file-public-id}
742
+ * @secure
743
+ */
744
+ getFile = (filePublicId, params = {}) => this.request({
745
+ path: `/api/v3/files/${filePublicId}`,
746
+ method: "GET",
747
+ secure: true,
748
+ format: "json",
749
+ ...params
750
+ });
751
+ /**
752
+ * @description Update File updates the properties of an UploadedFile (but not its content).
753
+ *
754
+ * @name UpdateFile
755
+ * @summary Update File
756
+ * @request PUT:/api/v3/files/{file-public-id}
757
+ * @secure
758
+ */
759
+ updateFile = (filePublicId, UpdateFile, params = {}) => this.request({
760
+ path: `/api/v3/files/${filePublicId}`,
761
+ method: "PUT",
762
+ body: UpdateFile,
763
+ secure: true,
764
+ type: "application/json" /* Json */,
765
+ format: "json",
766
+ ...params
767
+ });
768
+ /**
769
+ * @description Delete File deletes a previously uploaded file.
770
+ *
771
+ * @name DeleteFile
772
+ * @summary Delete File
773
+ * @request DELETE:/api/v3/files/{file-public-id}
774
+ * @secure
775
+ */
776
+ deleteFile = (filePublicId, params = {}) => this.request({
777
+ path: `/api/v3/files/${filePublicId}`,
778
+ method: "DELETE",
779
+ secure: true,
780
+ ...params
781
+ });
782
+ /**
783
+ * @description A group in our API maps to a "Team" within the Shortcut Product. A Team is a collection of Users that can be associated to Stories, Epics, and Iterations within Shortcut.
784
+ *
785
+ * @name ListGroups
786
+ * @summary List Groups
787
+ * @request GET:/api/v3/groups
788
+ * @secure
789
+ */
790
+ listGroups = (params = {}) => this.request({
791
+ path: `/api/v3/groups`,
792
+ method: "GET",
793
+ secure: true,
794
+ format: "json",
795
+ ...params
796
+ });
797
+ /**
798
+ * No description
799
+ *
800
+ * @name CreateGroup
801
+ * @summary Create Group
802
+ * @request POST:/api/v3/groups
803
+ * @secure
804
+ */
805
+ createGroup = (CreateGroup, params = {}) => this.request({
806
+ path: `/api/v3/groups`,
807
+ method: "POST",
808
+ body: CreateGroup,
809
+ secure: true,
810
+ type: "application/json" /* Json */,
811
+ format: "json",
812
+ ...params
813
+ });
814
+ /**
815
+ * No description
816
+ *
817
+ * @name GetGroup
818
+ * @summary Get Group
819
+ * @request GET:/api/v3/groups/{group-public-id}
820
+ * @secure
821
+ */
822
+ getGroup = (groupPublicId, params = {}) => this.request({
823
+ path: `/api/v3/groups/${groupPublicId}`,
824
+ method: "GET",
825
+ secure: true,
826
+ format: "json",
827
+ ...params
828
+ });
829
+ /**
830
+ * No description
831
+ *
832
+ * @name UpdateGroup
833
+ * @summary Update Group
834
+ * @request PUT:/api/v3/groups/{group-public-id}
835
+ * @secure
836
+ */
837
+ updateGroup = (groupPublicId, UpdateGroup, params = {}) => this.request({
838
+ path: `/api/v3/groups/${groupPublicId}`,
839
+ method: "PUT",
840
+ body: UpdateGroup,
841
+ secure: true,
842
+ type: "application/json" /* Json */,
843
+ format: "json",
844
+ ...params
845
+ });
846
+ /**
847
+ * @description List the Stories assigned to the Group. (By default, limited to 1,000).
848
+ *
849
+ * @name ListGroupStories
850
+ * @summary List Group Stories
851
+ * @request GET:/api/v3/groups/{group-public-id}/stories
852
+ * @secure
853
+ */
854
+ listGroupStories = (groupPublicId, query, params = {}) => this.request({
855
+ path: `/api/v3/groups/${groupPublicId}/stories`,
856
+ method: "GET",
857
+ query,
858
+ secure: true,
859
+ format: "json",
860
+ ...params
861
+ });
862
+ /**
863
+ * @description Update an existing health status by its ID.
864
+ *
865
+ * @name UpdateHealth
866
+ * @summary Update Health
867
+ * @request PUT:/api/v3/health/{health-public-id}
868
+ * @secure
869
+ */
870
+ updateHealth = (healthPublicId, UpdateHealth, params = {}) => this.request({
871
+ path: `/api/v3/health/${healthPublicId}`,
872
+ method: "PUT",
873
+ body: UpdateHealth,
874
+ secure: true,
875
+ type: "application/json" /* Json */,
876
+ format: "json",
877
+ ...params
878
+ });
879
+ /**
880
+ * No description
881
+ *
882
+ * @name CreateGenericIntegration
883
+ * @summary Create Generic Integration
884
+ * @request POST:/api/v3/integrations/webhook
885
+ * @secure
886
+ */
887
+ createGenericIntegration = (CreateGenericIntegration, params = {}) => this.request({
888
+ path: `/api/v3/integrations/webhook`,
889
+ method: "POST",
890
+ body: CreateGenericIntegration,
891
+ secure: true,
892
+ type: "application/json" /* Json */,
893
+ ...params
894
+ });
895
+ /**
896
+ * No description
897
+ *
898
+ * @name GetGenericIntegration
899
+ * @summary Get Generic Integration
900
+ * @request GET:/api/v3/integrations/webhook/{integration-public-id}
901
+ * @secure
902
+ */
903
+ getGenericIntegration = (integrationPublicId, params = {}) => this.request({
904
+ path: `/api/v3/integrations/webhook/${integrationPublicId}`,
905
+ method: "GET",
906
+ secure: true,
907
+ ...params
908
+ });
909
+ /**
910
+ * No description
911
+ *
912
+ * @name DeleteGenericIntegration
913
+ * @summary Delete Generic Integration
914
+ * @request DELETE:/api/v3/integrations/webhook/{integration-public-id}
915
+ * @secure
916
+ */
917
+ deleteGenericIntegration = (integrationPublicId, params = {}) => this.request({
918
+ path: `/api/v3/integrations/webhook/${integrationPublicId}`,
919
+ method: "DELETE",
920
+ secure: true,
921
+ ...params
922
+ });
923
+ /**
924
+ * No description
925
+ *
926
+ * @name ListIterations
927
+ * @summary List Iterations
928
+ * @request GET:/api/v3/iterations
929
+ * @secure
930
+ */
931
+ listIterations = (params = {}) => this.request({
932
+ path: `/api/v3/iterations`,
933
+ method: "GET",
934
+ secure: true,
935
+ format: "json",
936
+ ...params
937
+ });
938
+ /**
939
+ * No description
940
+ *
941
+ * @name CreateIteration
942
+ * @summary Create Iteration
943
+ * @request POST:/api/v3/iterations
944
+ * @secure
945
+ */
946
+ createIteration = (CreateIteration, params = {}) => this.request({
947
+ path: `/api/v3/iterations`,
948
+ method: "POST",
949
+ body: CreateIteration,
950
+ secure: true,
951
+ type: "application/json" /* Json */,
952
+ format: "json",
953
+ ...params
954
+ });
955
+ /**
956
+ * @description Disables Iterations for the current workspace
957
+ *
958
+ * @name DisableIterations
959
+ * @summary Disable Iterations
960
+ * @request PUT:/api/v3/iterations/disable
961
+ * @secure
962
+ */
963
+ disableIterations = (params = {}) => this.request({
964
+ path: `/api/v3/iterations/disable`,
965
+ method: "PUT",
966
+ secure: true,
967
+ ...params
968
+ });
969
+ /**
970
+ * @description Enables Iterations for the current workspace
971
+ *
972
+ * @name EnableIterations
973
+ * @summary Enable Iterations
974
+ * @request PUT:/api/v3/iterations/enable
975
+ * @secure
976
+ */
977
+ enableIterations = (params = {}) => this.request({
978
+ path: `/api/v3/iterations/enable`,
979
+ method: "PUT",
980
+ secure: true,
981
+ ...params
982
+ });
983
+ /**
984
+ * No description
985
+ *
986
+ * @name GetIteration
987
+ * @summary Get Iteration
988
+ * @request GET:/api/v3/iterations/{iteration-public-id}
989
+ * @secure
990
+ */
991
+ getIteration = (iterationPublicId, params = {}) => this.request({
992
+ path: `/api/v3/iterations/${iterationPublicId}`,
993
+ method: "GET",
994
+ secure: true,
995
+ format: "json",
996
+ ...params
997
+ });
998
+ /**
999
+ * No description
1000
+ *
1001
+ * @name UpdateIteration
1002
+ * @summary Update Iteration
1003
+ * @request PUT:/api/v3/iterations/{iteration-public-id}
1004
+ * @secure
1005
+ */
1006
+ updateIteration = (iterationPublicId, UpdateIteration, params = {}) => this.request({
1007
+ path: `/api/v3/iterations/${iterationPublicId}`,
1008
+ method: "PUT",
1009
+ body: UpdateIteration,
1010
+ secure: true,
1011
+ type: "application/json" /* Json */,
1012
+ format: "json",
1013
+ ...params
1014
+ });
1015
+ /**
1016
+ * No description
1017
+ *
1018
+ * @name DeleteIteration
1019
+ * @summary Delete Iteration
1020
+ * @request DELETE:/api/v3/iterations/{iteration-public-id}
1021
+ * @secure
1022
+ */
1023
+ deleteIteration = (iterationPublicId, params = {}) => this.request({
1024
+ path: `/api/v3/iterations/${iterationPublicId}`,
1025
+ method: "DELETE",
1026
+ secure: true,
1027
+ ...params
1028
+ });
1029
+ /**
1030
+ * @description Get a list of all Stories in an Iteration.
1031
+ *
1032
+ * @name ListIterationStories
1033
+ * @summary List Iteration Stories
1034
+ * @request GET:/api/v3/iterations/{iteration-public-id}/stories
1035
+ * @secure
1036
+ */
1037
+ listIterationStories = (iterationPublicId, query, params = {}) => this.request({
1038
+ path: `/api/v3/iterations/${iterationPublicId}/stories`,
1039
+ method: "GET",
1040
+ query,
1041
+ secure: true,
1042
+ format: "json",
1043
+ ...params
1044
+ });
1045
+ /**
1046
+ * @description Get Key Result returns information about a chosen Key Result.
1047
+ *
1048
+ * @name GetKeyResult
1049
+ * @summary Get Key Result
1050
+ * @request GET:/api/v3/key-results/{key-result-public-id}
1051
+ * @secure
1052
+ */
1053
+ getKeyResult = (keyResultPublicId, params = {}) => this.request({
1054
+ path: `/api/v3/key-results/${keyResultPublicId}`,
1055
+ method: "GET",
1056
+ secure: true,
1057
+ format: "json",
1058
+ ...params
1059
+ });
1060
+ /**
1061
+ * @description Update Key Result allows updating a Key Result's name or initial, observed, or target values.
1062
+ *
1063
+ * @name UpdateKeyResult
1064
+ * @summary Update Key Result
1065
+ * @request PUT:/api/v3/key-results/{key-result-public-id}
1066
+ * @secure
1067
+ */
1068
+ updateKeyResult = (keyResultPublicId, UpdateKeyResult, params = {}) => this.request({
1069
+ path: `/api/v3/key-results/${keyResultPublicId}`,
1070
+ method: "PUT",
1071
+ body: UpdateKeyResult,
1072
+ secure: true,
1073
+ type: "application/json" /* Json */,
1074
+ format: "json",
1075
+ ...params
1076
+ });
1077
+ /**
1078
+ * @description List Labels returns a list of all Labels and their attributes.
1079
+ *
1080
+ * @name ListLabels
1081
+ * @summary List Labels
1082
+ * @request GET:/api/v3/labels
1083
+ * @secure
1084
+ */
1085
+ listLabels = (query, params = {}) => this.request({
1086
+ path: `/api/v3/labels`,
1087
+ method: "GET",
1088
+ query,
1089
+ secure: true,
1090
+ format: "json",
1091
+ ...params
1092
+ });
1093
+ /**
1094
+ * @description Create Label allows you to create a new Label in Shortcut.
1095
+ *
1096
+ * @name CreateLabel
1097
+ * @summary Create Label
1098
+ * @request POST:/api/v3/labels
1099
+ * @secure
1100
+ */
1101
+ createLabel = (CreateLabelParams, params = {}) => this.request({
1102
+ path: `/api/v3/labels`,
1103
+ method: "POST",
1104
+ body: CreateLabelParams,
1105
+ secure: true,
1106
+ type: "application/json" /* Json */,
1107
+ format: "json",
1108
+ ...params
1109
+ });
1110
+ /**
1111
+ * @description Get Label returns information about the selected Label.
1112
+ *
1113
+ * @name GetLabel
1114
+ * @summary Get Label
1115
+ * @request GET:/api/v3/labels/{label-public-id}
1116
+ * @secure
1117
+ */
1118
+ getLabel = (labelPublicId, params = {}) => this.request({
1119
+ path: `/api/v3/labels/${labelPublicId}`,
1120
+ method: "GET",
1121
+ secure: true,
1122
+ format: "json",
1123
+ ...params
1124
+ });
1125
+ /**
1126
+ * @description Update Label allows you to replace a Label name with another name. If you try to name a Label something that already exists, you will receive a 422 response.
1127
+ *
1128
+ * @name UpdateLabel
1129
+ * @summary Update Label
1130
+ * @request PUT:/api/v3/labels/{label-public-id}
1131
+ * @secure
1132
+ */
1133
+ updateLabel = (labelPublicId, UpdateLabel, params = {}) => this.request({
1134
+ path: `/api/v3/labels/${labelPublicId}`,
1135
+ method: "PUT",
1136
+ body: UpdateLabel,
1137
+ secure: true,
1138
+ type: "application/json" /* Json */,
1139
+ format: "json",
1140
+ ...params
1141
+ });
1142
+ /**
1143
+ * @description Delete Label can be used to delete any Label.
1144
+ *
1145
+ * @name DeleteLabel
1146
+ * @summary Delete Label
1147
+ * @request DELETE:/api/v3/labels/{label-public-id}
1148
+ * @secure
1149
+ */
1150
+ deleteLabel = (labelPublicId, params = {}) => this.request({
1151
+ path: `/api/v3/labels/${labelPublicId}`,
1152
+ method: "DELETE",
1153
+ secure: true,
1154
+ ...params
1155
+ });
1156
+ /**
1157
+ * @description List all of the Epics with the Label.
1158
+ *
1159
+ * @name ListLabelEpics
1160
+ * @summary List Label Epics
1161
+ * @request GET:/api/v3/labels/{label-public-id}/epics
1162
+ * @secure
1163
+ */
1164
+ listLabelEpics = (labelPublicId, params = {}) => this.request({
1165
+ path: `/api/v3/labels/${labelPublicId}/epics`,
1166
+ method: "GET",
1167
+ secure: true,
1168
+ format: "json",
1169
+ ...params
1170
+ });
1171
+ /**
1172
+ * @description List all of the Stories with the Label.
1173
+ *
1174
+ * @name ListLabelStories
1175
+ * @summary List Label Stories
1176
+ * @request GET:/api/v3/labels/{label-public-id}/stories
1177
+ * @secure
1178
+ */
1179
+ listLabelStories = (labelPublicId, query, params = {}) => this.request({
1180
+ path: `/api/v3/labels/${labelPublicId}/stories`,
1181
+ method: "GET",
1182
+ query,
1183
+ secure: true,
1184
+ format: "json",
1185
+ ...params
1186
+ });
1187
+ /**
1188
+ * @description List Linked Files returns a list of all Linked-Files and their attributes.
1189
+ *
1190
+ * @name ListLinkedFiles
1191
+ * @summary List Linked Files
1192
+ * @request GET:/api/v3/linked-files
1193
+ * @secure
1194
+ */
1195
+ listLinkedFiles = (params = {}) => this.request({
1196
+ path: `/api/v3/linked-files`,
1197
+ method: "GET",
1198
+ secure: true,
1199
+ format: "json",
1200
+ ...params
1201
+ });
1202
+ /**
1203
+ * @description Create Linked File allows you to create a new Linked File in Shortcut.
1204
+ *
1205
+ * @name CreateLinkedFile
1206
+ * @summary Create Linked File
1207
+ * @request POST:/api/v3/linked-files
1208
+ * @secure
1209
+ */
1210
+ createLinkedFile = (CreateLinkedFile, params = {}) => this.request({
1211
+ path: `/api/v3/linked-files`,
1212
+ method: "POST",
1213
+ body: CreateLinkedFile,
1214
+ secure: true,
1215
+ type: "application/json" /* Json */,
1216
+ format: "json",
1217
+ ...params
1218
+ });
1219
+ /**
1220
+ * @description Get File returns information about the selected Linked File.
1221
+ *
1222
+ * @name GetLinkedFile
1223
+ * @summary Get Linked File
1224
+ * @request GET:/api/v3/linked-files/{linked-file-public-id}
1225
+ * @secure
1226
+ */
1227
+ getLinkedFile = (linkedFilePublicId, params = {}) => this.request({
1228
+ path: `/api/v3/linked-files/${linkedFilePublicId}`,
1229
+ method: "GET",
1230
+ secure: true,
1231
+ format: "json",
1232
+ ...params
1233
+ });
1234
+ /**
1235
+ * @description Updated Linked File allows you to update properties of a previously attached Linked-File.
1236
+ *
1237
+ * @name UpdateLinkedFile
1238
+ * @summary Update Linked File
1239
+ * @request PUT:/api/v3/linked-files/{linked-file-public-id}
1240
+ * @secure
1241
+ */
1242
+ updateLinkedFile = (linkedFilePublicId, UpdateLinkedFile, params = {}) => this.request({
1243
+ path: `/api/v3/linked-files/${linkedFilePublicId}`,
1244
+ method: "PUT",
1245
+ body: UpdateLinkedFile,
1246
+ secure: true,
1247
+ type: "application/json" /* Json */,
1248
+ format: "json",
1249
+ ...params
1250
+ });
1251
+ /**
1252
+ * @description Delete Linked File can be used to delete any previously attached Linked-File.
1253
+ *
1254
+ * @name DeleteLinkedFile
1255
+ * @summary Delete Linked File
1256
+ * @request DELETE:/api/v3/linked-files/{linked-file-public-id}
1257
+ * @secure
1258
+ */
1259
+ deleteLinkedFile = (linkedFilePublicId, params = {}) => this.request({
1260
+ path: `/api/v3/linked-files/${linkedFilePublicId}`,
1261
+ method: "DELETE",
1262
+ secure: true,
1263
+ ...params
1264
+ });
1265
+ /**
1266
+ * @description Returns information about the authenticated member.
1267
+ *
1268
+ * @name GetCurrentMemberInfo
1269
+ * @summary Get Current Member Info
1270
+ * @request GET:/api/v3/member
1271
+ * @secure
1272
+ */
1273
+ getCurrentMemberInfo = (params = {}) => this.request({
1274
+ path: `/api/v3/member`,
1275
+ method: "GET",
1276
+ secure: true,
1277
+ format: "json",
1278
+ ...params
1279
+ });
1280
+ /**
1281
+ * @description Returns information about members of the Workspace.
1282
+ *
1283
+ * @name ListMembers
1284
+ * @summary List Members
1285
+ * @request GET:/api/v3/members
1286
+ * @secure
1287
+ */
1288
+ listMembers = (query, params = {}) => this.request({
1289
+ path: `/api/v3/members`,
1290
+ method: "GET",
1291
+ query,
1292
+ secure: true,
1293
+ format: "json",
1294
+ ...params
1295
+ });
1296
+ /**
1297
+ * @description Returns information about a Member.
1298
+ *
1299
+ * @name GetMember
1300
+ * @summary Get Member
1301
+ * @request GET:/api/v3/members/{member-public-id}
1302
+ * @secure
1303
+ */
1304
+ getMember = (memberPublicId, query, params = {}) => this.request({
1305
+ path: `/api/v3/members/${memberPublicId}`,
1306
+ method: "GET",
1307
+ query,
1308
+ secure: true,
1309
+ format: "json",
1310
+ ...params
1311
+ });
1312
+ /**
1313
+ * @description (Deprecated: Use 'List Objectives') List Milestones returns a list of all Milestones and their attributes.
1314
+ *
1315
+ * @name ListMilestones
1316
+ * @summary List Milestones
1317
+ * @request GET:/api/v3/milestones
1318
+ * @secure
1319
+ */
1320
+ listMilestones = (params = {}) => this.request({
1321
+ path: `/api/v3/milestones`,
1322
+ method: "GET",
1323
+ secure: true,
1324
+ format: "json",
1325
+ ...params
1326
+ });
1327
+ /**
1328
+ * @description (Deprecated: Use 'Create Objective') Create Milestone allows you to create a new Milestone in Shortcut.
1329
+ *
1330
+ * @name CreateMilestone
1331
+ * @summary Create Milestone
1332
+ * @request POST:/api/v3/milestones
1333
+ * @secure
1334
+ */
1335
+ createMilestone = (CreateMilestone, params = {}) => this.request({
1336
+ path: `/api/v3/milestones`,
1337
+ method: "POST",
1338
+ body: CreateMilestone,
1339
+ secure: true,
1340
+ type: "application/json" /* Json */,
1341
+ format: "json",
1342
+ ...params
1343
+ });
1344
+ /**
1345
+ * @description (Deprecated: Use 'Get Objective') Get Milestone returns information about a chosen Milestone.
1346
+ *
1347
+ * @name GetMilestone
1348
+ * @summary Get Milestone
1349
+ * @request GET:/api/v3/milestones/{milestone-public-id}
1350
+ * @secure
1351
+ */
1352
+ getMilestone = (milestonePublicId, params = {}) => this.request({
1353
+ path: `/api/v3/milestones/${milestonePublicId}`,
1354
+ method: "GET",
1355
+ secure: true,
1356
+ format: "json",
1357
+ ...params
1358
+ });
1359
+ /**
1360
+ * @description (Deprecated: Use 'Update Objective') Update Milestone can be used to update Milestone properties.
1361
+ *
1362
+ * @name UpdateMilestone
1363
+ * @summary Update Milestone
1364
+ * @request PUT:/api/v3/milestones/{milestone-public-id}
1365
+ * @secure
1366
+ */
1367
+ updateMilestone = (milestonePublicId, UpdateMilestone, params = {}) => this.request({
1368
+ path: `/api/v3/milestones/${milestonePublicId}`,
1369
+ method: "PUT",
1370
+ body: UpdateMilestone,
1371
+ secure: true,
1372
+ type: "application/json" /* Json */,
1373
+ format: "json",
1374
+ ...params
1375
+ });
1376
+ /**
1377
+ * @description (Deprecated: Use 'Delete Objective') Delete Milestone can be used to delete any Milestone.
1378
+ *
1379
+ * @name DeleteMilestone
1380
+ * @summary Delete Milestone
1381
+ * @request DELETE:/api/v3/milestones/{milestone-public-id}
1382
+ * @secure
1383
+ */
1384
+ deleteMilestone = (milestonePublicId, params = {}) => this.request({
1385
+ path: `/api/v3/milestones/${milestonePublicId}`,
1386
+ method: "DELETE",
1387
+ secure: true,
1388
+ ...params
1389
+ });
1390
+ /**
1391
+ * @description (Deprecated: Use 'List Objective Epics') List all of the Epics within the Milestone.
1392
+ *
1393
+ * @name ListMilestoneEpics
1394
+ * @summary List Milestone Epics
1395
+ * @request GET:/api/v3/milestones/{milestone-public-id}/epics
1396
+ * @secure
1397
+ */
1398
+ listMilestoneEpics = (milestonePublicId, params = {}) => this.request({
1399
+ path: `/api/v3/milestones/${milestonePublicId}/epics`,
1400
+ method: "GET",
1401
+ secure: true,
1402
+ format: "json",
1403
+ ...params
1404
+ });
1405
+ /**
1406
+ * @description List Objectives returns a list of all Objectives and their attributes.
1407
+ *
1408
+ * @name ListObjectives
1409
+ * @summary List Objectives
1410
+ * @request GET:/api/v3/objectives
1411
+ * @secure
1412
+ */
1413
+ listObjectives = (params = {}) => this.request({
1414
+ path: `/api/v3/objectives`,
1415
+ method: "GET",
1416
+ secure: true,
1417
+ format: "json",
1418
+ ...params
1419
+ });
1420
+ /**
1421
+ * @description Create Objective allows you to create a new Objective in Shortcut.
1422
+ *
1423
+ * @name CreateObjective
1424
+ * @summary Create Objective
1425
+ * @request POST:/api/v3/objectives
1426
+ * @secure
1427
+ */
1428
+ createObjective = (CreateObjective, params = {}) => this.request({
1429
+ path: `/api/v3/objectives`,
1430
+ method: "POST",
1431
+ body: CreateObjective,
1432
+ secure: true,
1433
+ type: "application/json" /* Json */,
1434
+ format: "json",
1435
+ ...params
1436
+ });
1437
+ /**
1438
+ * @description Get Objective returns information about a chosen Objective.
1439
+ *
1440
+ * @name GetObjective
1441
+ * @summary Get Objective
1442
+ * @request GET:/api/v3/objectives/{objective-public-id}
1443
+ * @secure
1444
+ */
1445
+ getObjective = (objectivePublicId, params = {}) => this.request({
1446
+ path: `/api/v3/objectives/${objectivePublicId}`,
1447
+ method: "GET",
1448
+ secure: true,
1449
+ format: "json",
1450
+ ...params
1451
+ });
1452
+ /**
1453
+ * @description Update Objective can be used to update Objective properties.
1454
+ *
1455
+ * @name UpdateObjective
1456
+ * @summary Update Objective
1457
+ * @request PUT:/api/v3/objectives/{objective-public-id}
1458
+ * @secure
1459
+ */
1460
+ updateObjective = (objectivePublicId, UpdateObjective, params = {}) => this.request({
1461
+ path: `/api/v3/objectives/${objectivePublicId}`,
1462
+ method: "PUT",
1463
+ body: UpdateObjective,
1464
+ secure: true,
1465
+ type: "application/json" /* Json */,
1466
+ format: "json",
1467
+ ...params
1468
+ });
1469
+ /**
1470
+ * @description Delete Objective can be used to delete any Objective.
1471
+ *
1472
+ * @name DeleteObjective
1473
+ * @summary Delete Objective
1474
+ * @request DELETE:/api/v3/objectives/{objective-public-id}
1475
+ * @secure
1476
+ */
1477
+ deleteObjective = (objectivePublicId, params = {}) => this.request({
1478
+ path: `/api/v3/objectives/${objectivePublicId}`,
1479
+ method: "DELETE",
1480
+ secure: true,
1481
+ ...params
1482
+ });
1483
+ /**
1484
+ * @description List all of the Epics within the Objective.
1485
+ *
1486
+ * @name ListObjectiveEpics
1487
+ * @summary List Objective Epics
1488
+ * @request GET:/api/v3/objectives/{objective-public-id}/epics
1489
+ * @secure
1490
+ */
1491
+ listObjectiveEpics = (objectivePublicId, params = {}) => this.request({
1492
+ path: `/api/v3/objectives/${objectivePublicId}/epics`,
1493
+ method: "GET",
1494
+ secure: true,
1495
+ format: "json",
1496
+ ...params
1497
+ });
1498
+ /**
1499
+ * @description List Projects returns a list of all Projects and their attributes.
1500
+ *
1501
+ * @name ListProjects
1502
+ * @summary List Projects
1503
+ * @request GET:/api/v3/projects
1504
+ * @secure
1505
+ */
1506
+ listProjects = (params = {}) => this.request({
1507
+ path: `/api/v3/projects`,
1508
+ method: "GET",
1509
+ secure: true,
1510
+ format: "json",
1511
+ ...params
1512
+ });
1513
+ /**
1514
+ * @description Create Project is used to create a new Shortcut Project.
1515
+ *
1516
+ * @name CreateProject
1517
+ * @summary Create Project
1518
+ * @request POST:/api/v3/projects
1519
+ * @secure
1520
+ */
1521
+ createProject = (CreateProject, params = {}) => this.request({
1522
+ path: `/api/v3/projects`,
1523
+ method: "POST",
1524
+ body: CreateProject,
1525
+ secure: true,
1526
+ type: "application/json" /* Json */,
1527
+ format: "json",
1528
+ ...params
1529
+ });
1530
+ /**
1531
+ * @description Get Project returns information about the selected Project.
1532
+ *
1533
+ * @name GetProject
1534
+ * @summary Get Project
1535
+ * @request GET:/api/v3/projects/{project-public-id}
1536
+ * @secure
1537
+ */
1538
+ getProject = (projectPublicId, params = {}) => this.request({
1539
+ path: `/api/v3/projects/${projectPublicId}`,
1540
+ method: "GET",
1541
+ secure: true,
1542
+ format: "json",
1543
+ ...params
1544
+ });
1545
+ /**
1546
+ * @description Update Project can be used to change properties of a Project.
1547
+ *
1548
+ * @name UpdateProject
1549
+ * @summary Update Project
1550
+ * @request PUT:/api/v3/projects/{project-public-id}
1551
+ * @secure
1552
+ */
1553
+ updateProject = (projectPublicId, UpdateProject, params = {}) => this.request({
1554
+ path: `/api/v3/projects/${projectPublicId}`,
1555
+ method: "PUT",
1556
+ body: UpdateProject,
1557
+ secure: true,
1558
+ type: "application/json" /* Json */,
1559
+ format: "json",
1560
+ ...params
1561
+ });
1562
+ /**
1563
+ * @description Delete Project can be used to delete a Project. Projects can only be deleted if all associated Stories are moved or deleted. In the case that the Project cannot be deleted, you will receive a 422 response.
1564
+ *
1565
+ * @name DeleteProject
1566
+ * @summary Delete Project
1567
+ * @request DELETE:/api/v3/projects/{project-public-id}
1568
+ * @secure
1569
+ */
1570
+ deleteProject = (projectPublicId, params = {}) => this.request({
1571
+ path: `/api/v3/projects/${projectPublicId}`,
1572
+ method: "DELETE",
1573
+ secure: true,
1574
+ ...params
1575
+ });
1576
+ /**
1577
+ * @description List Stories returns a list of all Stories in a selected Project and their attributes.
1578
+ *
1579
+ * @name ListStories
1580
+ * @summary List Stories
1581
+ * @request GET:/api/v3/projects/{project-public-id}/stories
1582
+ * @secure
1583
+ */
1584
+ listStories = (projectPublicId, query, params = {}) => this.request({
1585
+ path: `/api/v3/projects/${projectPublicId}/stories`,
1586
+ method: "GET",
1587
+ query,
1588
+ secure: true,
1589
+ format: "json",
1590
+ ...params
1591
+ });
1592
+ /**
1593
+ * @description List Repositories returns a list of all Repositories and their attributes.
1594
+ *
1595
+ * @name ListRepositories
1596
+ * @summary List Repositories
1597
+ * @request GET:/api/v3/repositories
1598
+ * @secure
1599
+ */
1600
+ listRepositories = (params = {}) => this.request({
1601
+ path: `/api/v3/repositories`,
1602
+ method: "GET",
1603
+ secure: true,
1604
+ format: "json",
1605
+ ...params
1606
+ });
1607
+ /**
1608
+ * @description Get Repository returns information about the selected Repository.
1609
+ *
1610
+ * @name GetRepository
1611
+ * @summary Get Repository
1612
+ * @request GET:/api/v3/repositories/{repo-public-id}
1613
+ * @secure
1614
+ */
1615
+ getRepository = (repoPublicId, params = {}) => this.request({
1616
+ path: `/api/v3/repositories/${repoPublicId}`,
1617
+ method: "GET",
1618
+ secure: true,
1619
+ format: "json",
1620
+ ...params
1621
+ });
1622
+ /**
1623
+ * @description Search lets you search Epics and Stories based on desired parameters. Since ordering of the results can change over time (due to search ranking decay, new Epics and Stories being created), the `next` value from the previous response can be used as the path and query string for the next page to ensure stable ordering.
1624
+ *
1625
+ * @name Search
1626
+ * @summary Search
1627
+ * @request GET:/api/v3/search
1628
+ * @secure
1629
+ */
1630
+ search = (query, params = {}) => this.request({
1631
+ path: `/api/v3/search`,
1632
+ method: "GET",
1633
+ query,
1634
+ secure: true,
1635
+ format: "json",
1636
+ ...params
1637
+ });
1638
+ /**
1639
+ * @description Search Epics lets you search Epics based on desired parameters. Since ordering of stories can change over time (due to search ranking decay, new Epics being created), the `next` value from the previous response can be used as the path and query string for the next page to ensure stable ordering.
1640
+ *
1641
+ * @name SearchEpics
1642
+ * @summary Search Epics
1643
+ * @request GET:/api/v3/search/epics
1644
+ * @secure
1645
+ */
1646
+ searchEpics = (query, params = {}) => this.request({
1647
+ path: `/api/v3/search/epics`,
1648
+ method: "GET",
1649
+ query,
1650
+ secure: true,
1651
+ format: "json",
1652
+ ...params
1653
+ });
1654
+ /**
1655
+ * @description Search Iterations lets you search Iterations based on desired parameters. Since ordering of results can change over time (due to search ranking decay, new Iterations being created), the `next` value from the previous response can be used as the path and query string for the next page to ensure stable ordering.
1656
+ *
1657
+ * @name SearchIterations
1658
+ * @summary Search Iterations
1659
+ * @request GET:/api/v3/search/iterations
1660
+ * @secure
1661
+ */
1662
+ searchIterations = (query, params = {}) => this.request({
1663
+ path: `/api/v3/search/iterations`,
1664
+ method: "GET",
1665
+ query,
1666
+ secure: true,
1667
+ format: "json",
1668
+ ...params
1669
+ });
1670
+ /**
1671
+ * @description Search Milestones lets you search Milestones based on desired parameters. Since ordering of results can change over time (due to search ranking decay, new Milestones being created), the `next` value from the previous response can be used as the path and query string for the next page to ensure stable ordering.
1672
+ *
1673
+ * @name SearchMilestones
1674
+ * @summary Search Milestones
1675
+ * @request GET:/api/v3/search/milestones
1676
+ * @secure
1677
+ */
1678
+ searchMilestones = (query, params = {}) => this.request({
1679
+ path: `/api/v3/search/milestones`,
1680
+ method: "GET",
1681
+ query,
1682
+ secure: true,
1683
+ format: "json",
1684
+ ...params
1685
+ });
1686
+ /**
1687
+ * @description Search Objectives lets you search Objectives based on desired parameters. Since ordering of results can change over time (due to search ranking decay, new Objectives being created), the `next` value from the previous response can be used as the path and query string for the next page to ensure stable ordering.
1688
+ *
1689
+ * @name SearchObjectives
1690
+ * @summary Search Objectives
1691
+ * @request GET:/api/v3/search/objectives
1692
+ * @secure
1693
+ */
1694
+ searchObjectives = (query, params = {}) => this.request({
1695
+ path: `/api/v3/search/objectives`,
1696
+ method: "GET",
1697
+ query,
1698
+ secure: true,
1699
+ format: "json",
1700
+ ...params
1701
+ });
1702
+ /**
1703
+ * @description Search Stories lets you search Stories based on desired parameters. Since ordering of stories can change over time (due to search ranking decay, new stories being created), the `next` value from the previous response can be used as the path and query string for the next page to ensure stable ordering.
1704
+ *
1705
+ * @name SearchStories
1706
+ * @summary Search Stories
1707
+ * @request GET:/api/v3/search/stories
1708
+ * @secure
1709
+ */
1710
+ searchStories = (query, params = {}) => this.request({
1711
+ path: `/api/v3/search/stories`,
1712
+ method: "GET",
1713
+ query,
1714
+ secure: true,
1715
+ format: "json",
1716
+ ...params
1717
+ });
1718
+ /**
1719
+ * @description Create Story is used to add a new story to your Shortcut Workspace. This endpoint requires that either **workflow_state_id** or **project_id** be provided, but will reject the request if both or neither are specified. The workflow_state_id has been marked as required and is the recommended field to specify because we are in the process of sunsetting Projects in Shortcut.
1720
+ *
1721
+ * @name CreateStory
1722
+ * @summary Create Story
1723
+ * @request POST:/api/v3/stories
1724
+ * @secure
1725
+ */
1726
+ createStory = (CreateStoryParams, params = {}) => this.request({
1727
+ path: `/api/v3/stories`,
1728
+ method: "POST",
1729
+ body: CreateStoryParams,
1730
+ secure: true,
1731
+ type: "application/json" /* Json */,
1732
+ format: "json",
1733
+ ...params
1734
+ });
1735
+ /**
1736
+ * @description Create Multiple Stories allows you to create multiple stories in a single request using the same syntax as [Create Story](https://developer.shortcut.com/api/rest/v3#create-story).
1737
+ *
1738
+ * @name CreateMultipleStories
1739
+ * @summary Create Multiple Stories
1740
+ * @request POST:/api/v3/stories/bulk
1741
+ * @secure
1742
+ */
1743
+ createMultipleStories = (CreateStories, params = {}) => this.request({
1744
+ path: `/api/v3/stories/bulk`,
1745
+ method: "POST",
1746
+ body: CreateStories,
1747
+ secure: true,
1748
+ type: "application/json" /* Json */,
1749
+ format: "json",
1750
+ ...params
1751
+ });
1752
+ /**
1753
+ * @description Update Multiple Stories allows you to make changes to numerous stories at once.
1754
+ *
1755
+ * @name UpdateMultipleStories
1756
+ * @summary Update Multiple Stories
1757
+ * @request PUT:/api/v3/stories/bulk
1758
+ * @secure
1759
+ */
1760
+ updateMultipleStories = (UpdateStories, params = {}) => this.request({
1761
+ path: `/api/v3/stories/bulk`,
1762
+ method: "PUT",
1763
+ body: UpdateStories,
1764
+ secure: true,
1765
+ type: "application/json" /* Json */,
1766
+ format: "json",
1767
+ ...params
1768
+ });
1769
+ /**
1770
+ * @description Delete Multiple Stories allows you to delete multiple archived stories at once.
1771
+ *
1772
+ * @name DeleteMultipleStories
1773
+ * @summary Delete Multiple Stories
1774
+ * @request DELETE:/api/v3/stories/bulk
1775
+ * @secure
1776
+ */
1777
+ deleteMultipleStories = (DeleteStories, params = {}) => this.request({
1778
+ path: `/api/v3/stories/bulk`,
1779
+ method: "DELETE",
1780
+ body: DeleteStories,
1781
+ secure: true,
1782
+ type: "application/json" /* Json */,
1783
+ ...params
1784
+ });
1785
+ /**
1786
+ * @description Create Story From Template is used to add a new story derived from a template to your Shortcut Workspace.
1787
+ *
1788
+ * @name CreateStoryFromTemplate
1789
+ * @summary Create Story From Template
1790
+ * @request POST:/api/v3/stories/from-template
1791
+ * @secure
1792
+ */
1793
+ createStoryFromTemplate = (CreateStoryFromTemplateParams, params = {}) => this.request({
1794
+ path: `/api/v3/stories/from-template`,
1795
+ method: "POST",
1796
+ body: CreateStoryFromTemplateParams,
1797
+ secure: true,
1798
+ type: "application/json" /* Json */,
1799
+ format: "json",
1800
+ ...params
1801
+ });
1802
+ /**
1803
+ * @description Search Stories lets you search Stories based on desired parameters.
1804
+ *
1805
+ * @name SearchStoriesOld
1806
+ * @summary Search Stories (Old)
1807
+ * @request POST:/api/v3/stories/search
1808
+ * @secure
1809
+ */
1810
+ searchStoriesOld = (SearchStories, params = {}) => this.request({
1811
+ path: `/api/v3/stories/search`,
1812
+ method: "POST",
1813
+ body: SearchStories,
1814
+ secure: true,
1815
+ type: "application/json" /* Json */,
1816
+ format: "json",
1817
+ ...params
1818
+ });
1819
+ /**
1820
+ * @description Get Story returns information about a chosen Story.
1821
+ *
1822
+ * @name GetStory
1823
+ * @summary Get Story
1824
+ * @request GET:/api/v3/stories/{story-public-id}
1825
+ * @secure
1826
+ */
1827
+ getStory = (storyPublicId, params = {}) => this.request({
1828
+ path: `/api/v3/stories/${storyPublicId}`,
1829
+ method: "GET",
1830
+ secure: true,
1831
+ format: "json",
1832
+ ...params
1833
+ });
1834
+ /**
1835
+ * @description Update Story can be used to update Story properties.
1836
+ *
1837
+ * @name UpdateStory
1838
+ * @summary Update Story
1839
+ * @request PUT:/api/v3/stories/{story-public-id}
1840
+ * @secure
1841
+ */
1842
+ updateStory = (storyPublicId, UpdateStory, params = {}) => this.request({
1843
+ path: `/api/v3/stories/${storyPublicId}`,
1844
+ method: "PUT",
1845
+ body: UpdateStory,
1846
+ secure: true,
1847
+ type: "application/json" /* Json */,
1848
+ format: "json",
1849
+ ...params
1850
+ });
1851
+ /**
1852
+ * @description Delete Story can be used to delete any Story.
1853
+ *
1854
+ * @name DeleteStory
1855
+ * @summary Delete Story
1856
+ * @request DELETE:/api/v3/stories/{story-public-id}
1857
+ * @secure
1858
+ */
1859
+ deleteStory = (storyPublicId, params = {}) => this.request({
1860
+ path: `/api/v3/stories/${storyPublicId}`,
1861
+ method: "DELETE",
1862
+ secure: true,
1863
+ ...params
1864
+ });
1865
+ /**
1866
+ * @description Lists Comments associated with a Story
1867
+ *
1868
+ * @name ListStoryComment
1869
+ * @summary List Story Comment
1870
+ * @request GET:/api/v3/stories/{story-public-id}/comments
1871
+ * @secure
1872
+ */
1873
+ listStoryComment = (storyPublicId, params = {}) => this.request({
1874
+ path: `/api/v3/stories/${storyPublicId}/comments`,
1875
+ method: "GET",
1876
+ secure: true,
1877
+ format: "json",
1878
+ ...params
1879
+ });
1880
+ /**
1881
+ * @description Create Comment allows you to create a Comment on any Story.
1882
+ *
1883
+ * @name CreateStoryComment
1884
+ * @summary Create Story Comment
1885
+ * @request POST:/api/v3/stories/{story-public-id}/comments
1886
+ * @secure
1887
+ */
1888
+ createStoryComment = (storyPublicId, CreateStoryComment, params = {}) => this.request({
1889
+ path: `/api/v3/stories/${storyPublicId}/comments`,
1890
+ method: "POST",
1891
+ body: CreateStoryComment,
1892
+ secure: true,
1893
+ type: "application/json" /* Json */,
1894
+ format: "json",
1895
+ ...params
1896
+ });
1897
+ /**
1898
+ * @description Get Comment is used to get Comment information.
1899
+ *
1900
+ * @name GetStoryComment
1901
+ * @summary Get Story Comment
1902
+ * @request GET:/api/v3/stories/{story-public-id}/comments/{comment-public-id}
1903
+ * @secure
1904
+ */
1905
+ getStoryComment = (storyPublicId, commentPublicId, params = {}) => this.request({
1906
+ path: `/api/v3/stories/${storyPublicId}/comments/${commentPublicId}`,
1907
+ method: "GET",
1908
+ secure: true,
1909
+ format: "json",
1910
+ ...params
1911
+ });
1912
+ /**
1913
+ * @description Update Comment replaces the text of the existing Comment.
1914
+ *
1915
+ * @name UpdateStoryComment
1916
+ * @summary Update Story Comment
1917
+ * @request PUT:/api/v3/stories/{story-public-id}/comments/{comment-public-id}
1918
+ * @secure
1919
+ */
1920
+ updateStoryComment = (storyPublicId, commentPublicId, UpdateStoryComment, params = {}) => this.request({
1921
+ path: `/api/v3/stories/${storyPublicId}/comments/${commentPublicId}`,
1922
+ method: "PUT",
1923
+ body: UpdateStoryComment,
1924
+ secure: true,
1925
+ type: "application/json" /* Json */,
1926
+ format: "json",
1927
+ ...params
1928
+ });
1929
+ /**
1930
+ * @description Delete a Comment from any story.
1931
+ *
1932
+ * @name DeleteStoryComment
1933
+ * @summary Delete Story Comment
1934
+ * @request DELETE:/api/v3/stories/{story-public-id}/comments/{comment-public-id}
1935
+ * @secure
1936
+ */
1937
+ deleteStoryComment = (storyPublicId, commentPublicId, params = {}) => this.request({
1938
+ path: `/api/v3/stories/${storyPublicId}/comments/${commentPublicId}`,
1939
+ method: "DELETE",
1940
+ secure: true,
1941
+ ...params
1942
+ });
1943
+ /**
1944
+ * @description Create a reaction to a story comment.
1945
+ *
1946
+ * @name CreateStoryReaction
1947
+ * @summary Create Story Reaction
1948
+ * @request POST:/api/v3/stories/{story-public-id}/comments/{comment-public-id}/reactions
1949
+ * @secure
1950
+ */
1951
+ createStoryReaction = (storyPublicId, commentPublicId, CreateOrDeleteStoryReaction, params = {}) => this.request({
1952
+ path: `/api/v3/stories/${storyPublicId}/comments/${commentPublicId}/reactions`,
1953
+ method: "POST",
1954
+ body: CreateOrDeleteStoryReaction,
1955
+ secure: true,
1956
+ type: "application/json" /* Json */,
1957
+ format: "json",
1958
+ ...params
1959
+ });
1960
+ /**
1961
+ * @description Delete a reaction from any story comment.
1962
+ *
1963
+ * @name DeleteStoryReaction
1964
+ * @summary Delete Story Reaction
1965
+ * @request DELETE:/api/v3/stories/{story-public-id}/comments/{comment-public-id}/reactions
1966
+ * @secure
1967
+ */
1968
+ deleteStoryReaction = (storyPublicId, commentPublicId, CreateOrDeleteStoryReaction, params = {}) => this.request({
1969
+ path: `/api/v3/stories/${storyPublicId}/comments/${commentPublicId}/reactions`,
1970
+ method: "DELETE",
1971
+ body: CreateOrDeleteStoryReaction,
1972
+ secure: true,
1973
+ type: "application/json" /* Json */,
1974
+ ...params
1975
+ });
1976
+ /**
1977
+ * @description Unlinks a Comment from its linked Slack thread (Comment replies and Slack replies will no longer be synced)
1978
+ *
1979
+ * @name UnlinkCommentThreadFromSlack
1980
+ * @summary Unlink Comment thread from Slack
1981
+ * @request POST:/api/v3/stories/{story-public-id}/comments/{comment-public-id}/unlink-from-slack
1982
+ * @secure
1983
+ */
1984
+ unlinkCommentThreadFromSlack = (storyPublicId, commentPublicId, params = {}) => this.request({
1985
+ path: `/api/v3/stories/${storyPublicId}/comments/${commentPublicId}/unlink-from-slack`,
1986
+ method: "POST",
1987
+ secure: true,
1988
+ format: "json",
1989
+ ...params
1990
+ });
1991
+ /**
1992
+ * No description
1993
+ *
1994
+ * @name StoryHistory
1995
+ * @summary Story History
1996
+ * @request GET:/api/v3/stories/{story-public-id}/history
1997
+ * @secure
1998
+ */
1999
+ storyHistory = (storyPublicId, params = {}) => this.request({
2000
+ path: `/api/v3/stories/${storyPublicId}/history`,
2001
+ method: "GET",
2002
+ secure: true,
2003
+ format: "json",
2004
+ ...params
2005
+ });
2006
+ /**
2007
+ * @description Create Task is used to create a new task in a Story.
2008
+ *
2009
+ * @name CreateTask
2010
+ * @summary Create Task
2011
+ * @request POST:/api/v3/stories/{story-public-id}/tasks
2012
+ * @secure
2013
+ */
2014
+ createTask = (storyPublicId, CreateTask, params = {}) => this.request({
2015
+ path: `/api/v3/stories/${storyPublicId}/tasks`,
2016
+ method: "POST",
2017
+ body: CreateTask,
2018
+ secure: true,
2019
+ type: "application/json" /* Json */,
2020
+ format: "json",
2021
+ ...params
2022
+ });
2023
+ /**
2024
+ * @description Returns information about a chosen Task.
2025
+ *
2026
+ * @name GetTask
2027
+ * @summary Get Task
2028
+ * @request GET:/api/v3/stories/{story-public-id}/tasks/{task-public-id}
2029
+ * @secure
2030
+ */
2031
+ getTask = (storyPublicId, taskPublicId, params = {}) => this.request({
2032
+ path: `/api/v3/stories/${storyPublicId}/tasks/${taskPublicId}`,
2033
+ method: "GET",
2034
+ secure: true,
2035
+ format: "json",
2036
+ ...params
2037
+ });
2038
+ /**
2039
+ * @description Update Task can be used to update Task properties.
2040
+ *
2041
+ * @name UpdateTask
2042
+ * @summary Update Task
2043
+ * @request PUT:/api/v3/stories/{story-public-id}/tasks/{task-public-id}
2044
+ * @secure
2045
+ */
2046
+ updateTask = (storyPublicId, taskPublicId, UpdateTask, params = {}) => this.request({
2047
+ path: `/api/v3/stories/${storyPublicId}/tasks/${taskPublicId}`,
2048
+ method: "PUT",
2049
+ body: UpdateTask,
2050
+ secure: true,
2051
+ type: "application/json" /* Json */,
2052
+ format: "json",
2053
+ ...params
2054
+ });
2055
+ /**
2056
+ * @description Delete Task can be used to delete any previously created Task on a Story.
2057
+ *
2058
+ * @name DeleteTask
2059
+ * @summary Delete Task
2060
+ * @request DELETE:/api/v3/stories/{story-public-id}/tasks/{task-public-id}
2061
+ * @secure
2062
+ */
2063
+ deleteTask = (storyPublicId, taskPublicId, params = {}) => this.request({
2064
+ path: `/api/v3/stories/${storyPublicId}/tasks/${taskPublicId}`,
2065
+ method: "DELETE",
2066
+ secure: true,
2067
+ ...params
2068
+ });
2069
+ /**
2070
+ * @description Story Links (called Story Relationships in the UI) allow you create semantic relationships between two stories. The parameters read like an active voice grammatical sentence: subject -> verb -> object. The subject story acts on the object Story; the object story is the direct object of the sentence. The subject story "blocks", "duplicates", or "relates to" the object story. Examples: - "story 5 blocks story 6” -- story 6 is now "blocked" until story 5 is moved to a Done workflow state. - "story 2 duplicates story 1” -- Story 2 represents the same body of work as Story 1 (and should probably be archived). - "story 7 relates to story 3”
2071
+ *
2072
+ * @name CreateStoryLink
2073
+ * @summary Create Story Link
2074
+ * @request POST:/api/v3/story-links
2075
+ * @secure
2076
+ */
2077
+ createStoryLink = (CreateStoryLink, params = {}) => this.request({
2078
+ path: `/api/v3/story-links`,
2079
+ method: "POST",
2080
+ body: CreateStoryLink,
2081
+ secure: true,
2082
+ type: "application/json" /* Json */,
2083
+ format: "json",
2084
+ ...params
2085
+ });
2086
+ /**
2087
+ * @description Returns the stories and their relationship for the given Story Link.
2088
+ *
2089
+ * @name GetStoryLink
2090
+ * @summary Get Story Link
2091
+ * @request GET:/api/v3/story-links/{story-link-public-id}
2092
+ * @secure
2093
+ */
2094
+ getStoryLink = (storyLinkPublicId, params = {}) => this.request({
2095
+ path: `/api/v3/story-links/${storyLinkPublicId}`,
2096
+ method: "GET",
2097
+ secure: true,
2098
+ format: "json",
2099
+ ...params
2100
+ });
2101
+ /**
2102
+ * @description Updates the stories and/or the relationship for the given Story Link.
2103
+ *
2104
+ * @name UpdateStoryLink
2105
+ * @summary Update Story Link
2106
+ * @request PUT:/api/v3/story-links/{story-link-public-id}
2107
+ * @secure
2108
+ */
2109
+ updateStoryLink = (storyLinkPublicId, UpdateStoryLink, params = {}) => this.request({
2110
+ path: `/api/v3/story-links/${storyLinkPublicId}`,
2111
+ method: "PUT",
2112
+ body: UpdateStoryLink,
2113
+ secure: true,
2114
+ type: "application/json" /* Json */,
2115
+ format: "json",
2116
+ ...params
2117
+ });
2118
+ /**
2119
+ * @description Removes the relationship between the stories for the given Story Link.
2120
+ *
2121
+ * @name DeleteStoryLink
2122
+ * @summary Delete Story Link
2123
+ * @request DELETE:/api/v3/story-links/{story-link-public-id}
2124
+ * @secure
2125
+ */
2126
+ deleteStoryLink = (storyLinkPublicId, params = {}) => this.request({
2127
+ path: `/api/v3/story-links/${storyLinkPublicId}`,
2128
+ method: "DELETE",
2129
+ secure: true,
2130
+ ...params
2131
+ });
2132
+ /**
2133
+ * @description Returns a list of all Workflows in the Workspace.
2134
+ *
2135
+ * @name ListWorkflows
2136
+ * @summary List Workflows
2137
+ * @request GET:/api/v3/workflows
2138
+ * @secure
2139
+ */
2140
+ listWorkflows = (params = {}) => this.request({
2141
+ path: `/api/v3/workflows`,
2142
+ method: "GET",
2143
+ secure: true,
2144
+ format: "json",
2145
+ ...params
2146
+ });
2147
+ /**
2148
+ * @description Get Workflow returns information about a chosen Workflow.
2149
+ *
2150
+ * @name GetWorkflow
2151
+ * @summary Get Workflow
2152
+ * @request GET:/api/v3/workflows/{workflow-public-id}
2153
+ * @secure
2154
+ */
2155
+ getWorkflow = (workflowPublicId, params = {}) => this.request({
2156
+ path: `/api/v3/workflows/${workflowPublicId}`,
2157
+ method: "GET",
2158
+ secure: true,
2159
+ format: "json",
2160
+ ...params
2161
+ });
2162
+ };
2163
+
2164
+ // src/ShortcutClient.ts
2165
+ var ShortcutClient = class extends Api {
2166
+ constructor(apiToken, config = {}) {
2167
+ if (apiToken == null || typeof apiToken !== "string") {
2168
+ console.error("You need to supply an API Token.");
7
2169
  }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2170
+ super({
2171
+ headers: { "Shortcut-Token": apiToken, ...config.headers },
2172
+ ...config
2173
+ });
2174
+ }
15
2175
  };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.default = void 0;
18
- var ShortcutClient_1 = require("./ShortcutClient");
19
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return ShortcutClient_1.ShortcutClient; } });
20
- __exportStar(require("./ShortcutClient"), exports);
21
- __exportStar(require("./generated/data-contracts"), exports);
2176
+ // Annotate the CommonJS export names for ESM import in node:
2177
+ 0 && (module.exports = {
2178
+ ShortcutClient
2179
+ });