@useshortcut/client 3.2.1 → 3.2.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/README.md CHANGED
@@ -81,7 +81,7 @@ You can play with it in your web browser with this live playground:
81
81
 
82
82
  ## Publishing & Deployment
83
83
 
84
- This library uses GitHub Actions for CI/CD. The deployment process is fully automated.
84
+ This library uses GitHub Actions for CI/CD. npm releases are staged automatically, then approved manually in npm.
85
85
 
86
86
  ### Release Process
87
87
 
@@ -90,17 +90,19 @@ To publish a new version:
90
90
  1. Update the version in `package.json`
91
91
  2. Commit and push to `main`
92
92
  3. Create a GitHub Release with a version tag (e.g., `v2.4.0`)
93
- 4. The publish workflow will automatically build and publish to npm
93
+ 4. The publish workflow will automatically build and stage the package versions on npm
94
+ 5. Review and approve both staged packages in npm to publish them live
94
95
 
95
- ### Publishing to npm
96
+ ### Staged Publishing to npm
96
97
 
97
- Publishing is triggered automatically when a **GitHub Release is created**:
98
+ Staging is triggered automatically when a **GitHub Release is created**:
98
99
 
99
100
  1. **Create a GitHub Release**: Go to the repository's Releases page and create a new release with a version tag (e.g., `v2.4.0`)
100
- 2. The `publish.yml` workflow will:
101
- - Build the package (`yarn build` via `prepublishOnly`)
102
- - Publish to npm under `@shortcut/client`
103
- - Also publish under the legacy `@useshortcut/client` namespace for backwards compatibility
101
+ 2. The `publish.yml` workflow will stage `@shortcut/client`, then stage the same built package under the legacy `@useshortcut/client` namespace
102
+ 3. Review the staged packages in npm using `npm stage list`, `npm stage view <stage-id>`, or the npmjs.com **Staged Packages** tab
103
+ 4. Approve both staged packages with 2FA using `npm stage approve <stage-id>` or the npmjs.com approval flow
104
+
105
+ The npm trusted publisher for this repository must allow `npm stage publish` for `.github/workflows/publish.yml`. Trusted publishing from GitHub Actions automatically generates provenance for public packages from public repositories. Staged publishing requires npm CLI `11.15.0` or later and Node.js `22.14.0` or later.
104
106
 
105
107
  ### Documentation Deployment
106
108
 
@@ -1,5 +1,4 @@
1
- const require_Api = require('./generated/Api.js');
2
-
1
+ const require_Api = require("./generated/Api.cjs");
3
2
  //#region src/ShortcutClient.ts
4
3
  var ShortcutClient = class extends require_Api.Api {
5
4
  constructor(apiToken, config = {}) {
@@ -13,6 +12,5 @@ var ShortcutClient = class extends require_Api.Api {
13
12
  });
14
13
  }
15
14
  };
16
-
17
15
  //#endregion
18
- exports.ShortcutClient = ShortcutClient;
16
+ exports.ShortcutClient = ShortcutClient;
@@ -1,5 +1,5 @@
1
- import { ApiConfig } from "./generated/http-client.js";
2
- import { Api } from "./generated/Api.js";
1
+ import { ApiConfig } from "./generated/http-client.cjs";
2
+ import { Api } from "./generated/Api.cjs";
3
3
 
4
4
  //#region src/ShortcutClient.d.ts
5
5
  declare class ShortcutClient<SecurityDataType = unknown> extends Api<SecurityDataType> {
@@ -1,5 +1,4 @@
1
1
  import { Api } from "./generated/Api.mjs";
2
-
3
2
  //#region src/ShortcutClient.ts
4
3
  var ShortcutClient = class extends Api {
5
4
  constructor(apiToken, config = {}) {
@@ -13,6 +12,5 @@ var ShortcutClient = class extends Api {
13
12
  });
14
13
  }
15
14
  };
16
-
17
15
  //#endregion
18
- export { ShortcutClient };
16
+ export { ShortcutClient };
@@ -1,4 +1,4 @@
1
- //#region rolldown:runtime
1
+ //#region \0rolldown/runtime.js
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -19,12 +19,5 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
19
19
  value: mod,
20
20
  enumerable: true
21
21
  }) : target, mod));
22
-
23
22
  //#endregion
24
-
25
- Object.defineProperty(exports, '__toESM', {
26
- enumerable: true,
27
- get: function () {
28
- return __toESM;
29
- }
30
- });
23
+ exports.__toESM = __toESM;
@@ -1,5 +1,4 @@
1
- const require_http_client = require('./http-client.js');
2
-
1
+ const require_http_client = require("./http-client.cjs");
3
2
  //#region src/generated/Api.ts
4
3
  /**
5
4
  * Please don't use this class directly, instead use the `ShortcutClient` class we provided which is extending this class to add headers for authorization. * @internal
@@ -34,7 +33,7 @@ var Api = class extends require_http_client.HttpClient {
34
33
  method: "POST",
35
34
  body: CreateCategory,
36
35
  secure: true,
37
- type: require_http_client.ContentType.Json,
36
+ type: "application/json",
38
37
  format: "json",
39
38
  ...params
40
39
  });
@@ -66,7 +65,7 @@ var Api = class extends require_http_client.HttpClient {
66
65
  method: "PUT",
67
66
  body: UpdateCategory,
68
67
  secure: true,
69
- type: require_http_client.ContentType.Json,
68
+ type: "application/json",
70
69
  format: "json",
71
70
  ...params
72
71
  });
@@ -157,7 +156,7 @@ var Api = class extends require_http_client.HttpClient {
157
156
  method: "PUT",
158
157
  body: UpdateCustomField,
159
158
  secure: true,
160
- type: require_http_client.ContentType.Json,
159
+ type: "application/json",
161
160
  format: "json",
162
161
  ...params
163
162
  });
@@ -203,7 +202,7 @@ var Api = class extends require_http_client.HttpClient {
203
202
  method: "POST",
204
203
  body: CreateDoc,
205
204
  secure: true,
206
- type: require_http_client.ContentType.Json,
205
+ type: "application/json",
207
206
  format: "json",
208
207
  ...params
209
208
  });
@@ -236,7 +235,7 @@ var Api = class extends require_http_client.HttpClient {
236
235
  method: "PUT",
237
236
  body: UpdateDoc,
238
237
  secure: true,
239
- type: require_http_client.ContentType.Json,
238
+ type: "application/json",
240
239
  format: "json",
241
240
  ...params
242
241
  });
@@ -253,7 +252,7 @@ var Api = class extends require_http_client.HttpClient {
253
252
  method: "DELETE",
254
253
  body: GetDoc,
255
254
  secure: true,
256
- type: require_http_client.ContentType.Json,
255
+ type: "application/json",
257
256
  ...params
258
257
  });
259
258
  /**
@@ -327,7 +326,7 @@ var Api = class extends require_http_client.HttpClient {
327
326
  method: "POST",
328
327
  body: CreateEntityTemplate,
329
328
  secure: true,
330
- type: require_http_client.ContentType.Json,
329
+ type: "application/json",
331
330
  format: "json",
332
331
  ...params
333
332
  });
@@ -387,7 +386,7 @@ var Api = class extends require_http_client.HttpClient {
387
386
  method: "PUT",
388
387
  body: UpdateEntityTemplate,
389
388
  secure: true,
390
- type: require_http_client.ContentType.Json,
389
+ type: "application/json",
391
390
  format: "json",
392
391
  ...params
393
392
  });
@@ -449,7 +448,7 @@ var Api = class extends require_http_client.HttpClient {
449
448
  method: "POST",
450
449
  body: CreateEpic,
451
450
  secure: true,
452
- type: require_http_client.ContentType.Json,
451
+ type: "application/json",
453
452
  format: "json",
454
453
  ...params
455
454
  });
@@ -497,7 +496,7 @@ var Api = class extends require_http_client.HttpClient {
497
496
  method: "PUT",
498
497
  body: UpdateEpic,
499
498
  secure: true,
500
- type: require_http_client.ContentType.Json,
499
+ type: "application/json",
501
500
  format: "json",
502
501
  ...params
503
502
  });
@@ -543,7 +542,7 @@ var Api = class extends require_http_client.HttpClient {
543
542
  method: "POST",
544
543
  body: CreateEpicComment,
545
544
  secure: true,
546
- type: require_http_client.ContentType.Json,
545
+ type: "application/json",
547
546
  format: "json",
548
547
  ...params
549
548
  });
@@ -560,7 +559,7 @@ var Api = class extends require_http_client.HttpClient {
560
559
  method: "POST",
561
560
  body: CreateCommentComment,
562
561
  secure: true,
563
- type: require_http_client.ContentType.Json,
562
+ type: "application/json",
564
563
  format: "json",
565
564
  ...params
566
565
  });
@@ -592,7 +591,7 @@ var Api = class extends require_http_client.HttpClient {
592
591
  method: "PUT",
593
592
  body: UpdateComment,
594
593
  secure: true,
595
- type: require_http_client.ContentType.Json,
594
+ type: "application/json",
596
595
  format: "json",
597
596
  ...params
598
597
  });
@@ -653,7 +652,7 @@ var Api = class extends require_http_client.HttpClient {
653
652
  method: "POST",
654
653
  body: CreateEpicHealth,
655
654
  secure: true,
656
- type: require_http_client.ContentType.Json,
655
+ type: "application/json",
657
656
  format: "json",
658
657
  ...params
659
658
  });
@@ -746,7 +745,7 @@ var Api = class extends require_http_client.HttpClient {
746
745
  method: "POST",
747
746
  body: data,
748
747
  secure: true,
749
- type: require_http_client.ContentType.FormData,
748
+ type: "multipart/form-data",
750
749
  format: "json",
751
750
  ...params
752
751
  });
@@ -778,7 +777,7 @@ var Api = class extends require_http_client.HttpClient {
778
777
  method: "PUT",
779
778
  body: UpdateFile,
780
779
  secure: true,
781
- type: require_http_client.ContentType.Json,
780
+ type: "application/json",
782
781
  format: "json",
783
782
  ...params
784
783
  });
@@ -825,7 +824,7 @@ var Api = class extends require_http_client.HttpClient {
825
824
  method: "POST",
826
825
  body: CreateGroup,
827
826
  secure: true,
828
- type: require_http_client.ContentType.Json,
827
+ type: "application/json",
829
828
  format: "json",
830
829
  ...params
831
830
  });
@@ -857,7 +856,7 @@ var Api = class extends require_http_client.HttpClient {
857
856
  method: "PUT",
858
857
  body: UpdateGroup,
859
858
  secure: true,
860
- type: require_http_client.ContentType.Json,
859
+ type: "application/json",
861
860
  format: "json",
862
861
  ...params
863
862
  });
@@ -890,7 +889,7 @@ var Api = class extends require_http_client.HttpClient {
890
889
  method: "PUT",
891
890
  body: UpdateHealth,
892
891
  secure: true,
893
- type: require_http_client.ContentType.Json,
892
+ type: "application/json",
894
893
  format: "json",
895
894
  ...params
896
895
  });
@@ -907,7 +906,7 @@ var Api = class extends require_http_client.HttpClient {
907
906
  method: "POST",
908
907
  body: CreateGenericIntegration,
909
908
  secure: true,
910
- type: require_http_client.ContentType.Json,
909
+ type: "application/json",
911
910
  ...params
912
911
  });
913
912
  /**
@@ -966,7 +965,7 @@ var Api = class extends require_http_client.HttpClient {
966
965
  method: "POST",
967
966
  body: CreateIteration,
968
967
  secure: true,
969
- type: require_http_client.ContentType.Json,
968
+ type: "application/json",
970
969
  format: "json",
971
970
  ...params
972
971
  });
@@ -1026,7 +1025,7 @@ var Api = class extends require_http_client.HttpClient {
1026
1025
  method: "PUT",
1027
1026
  body: UpdateIteration,
1028
1027
  secure: true,
1029
- type: require_http_client.ContentType.Json,
1028
+ type: "application/json",
1030
1029
  format: "json",
1031
1030
  ...params
1032
1031
  });
@@ -1088,7 +1087,7 @@ var Api = class extends require_http_client.HttpClient {
1088
1087
  method: "PUT",
1089
1088
  body: UpdateKeyResult,
1090
1089
  secure: true,
1091
- type: require_http_client.ContentType.Json,
1090
+ type: "application/json",
1092
1091
  format: "json",
1093
1092
  ...params
1094
1093
  });
@@ -1121,7 +1120,7 @@ var Api = class extends require_http_client.HttpClient {
1121
1120
  method: "POST",
1122
1121
  body: CreateLabelParams,
1123
1122
  secure: true,
1124
- type: require_http_client.ContentType.Json,
1123
+ type: "application/json",
1125
1124
  format: "json",
1126
1125
  ...params
1127
1126
  });
@@ -1153,7 +1152,7 @@ var Api = class extends require_http_client.HttpClient {
1153
1152
  method: "PUT",
1154
1153
  body: UpdateLabel,
1155
1154
  secure: true,
1156
- type: require_http_client.ContentType.Json,
1155
+ type: "application/json",
1157
1156
  format: "json",
1158
1157
  ...params
1159
1158
  });
@@ -1230,7 +1229,7 @@ var Api = class extends require_http_client.HttpClient {
1230
1229
  method: "POST",
1231
1230
  body: CreateLinkedFile,
1232
1231
  secure: true,
1233
- type: require_http_client.ContentType.Json,
1232
+ type: "application/json",
1234
1233
  format: "json",
1235
1234
  ...params
1236
1235
  });
@@ -1262,7 +1261,7 @@ var Api = class extends require_http_client.HttpClient {
1262
1261
  method: "PUT",
1263
1262
  body: UpdateLinkedFile,
1264
1263
  secure: true,
1265
- type: require_http_client.ContentType.Json,
1264
+ type: "application/json",
1266
1265
  format: "json",
1267
1266
  ...params
1268
1267
  });
@@ -1355,7 +1354,7 @@ var Api = class extends require_http_client.HttpClient {
1355
1354
  method: "POST",
1356
1355
  body: CreateMilestone,
1357
1356
  secure: true,
1358
- type: require_http_client.ContentType.Json,
1357
+ type: "application/json",
1359
1358
  format: "json",
1360
1359
  ...params
1361
1360
  });
@@ -1387,7 +1386,7 @@ var Api = class extends require_http_client.HttpClient {
1387
1386
  method: "PUT",
1388
1387
  body: UpdateMilestone,
1389
1388
  secure: true,
1390
- type: require_http_client.ContentType.Json,
1389
+ type: "application/json",
1391
1390
  format: "json",
1392
1391
  ...params
1393
1392
  });
@@ -1448,7 +1447,7 @@ var Api = class extends require_http_client.HttpClient {
1448
1447
  method: "POST",
1449
1448
  body: CreateObjective,
1450
1449
  secure: true,
1451
- type: require_http_client.ContentType.Json,
1450
+ type: "application/json",
1452
1451
  format: "json",
1453
1452
  ...params
1454
1453
  });
@@ -1480,7 +1479,7 @@ var Api = class extends require_http_client.HttpClient {
1480
1479
  method: "PUT",
1481
1480
  body: UpdateObjective,
1482
1481
  secure: true,
1483
- type: require_http_client.ContentType.Json,
1482
+ type: "application/json",
1484
1483
  format: "json",
1485
1484
  ...params
1486
1485
  });
@@ -1541,7 +1540,7 @@ var Api = class extends require_http_client.HttpClient {
1541
1540
  method: "POST",
1542
1541
  body: CreateProject,
1543
1542
  secure: true,
1544
- type: require_http_client.ContentType.Json,
1543
+ type: "application/json",
1545
1544
  format: "json",
1546
1545
  ...params
1547
1546
  });
@@ -1573,7 +1572,7 @@ var Api = class extends require_http_client.HttpClient {
1573
1572
  method: "PUT",
1574
1573
  body: UpdateProject,
1575
1574
  secure: true,
1576
- type: require_http_client.ContentType.Json,
1575
+ type: "application/json",
1577
1576
  format: "json",
1578
1577
  ...params
1579
1578
  });
@@ -1762,7 +1761,7 @@ var Api = class extends require_http_client.HttpClient {
1762
1761
  method: "POST",
1763
1762
  body: CreateStoryParams,
1764
1763
  secure: true,
1765
- type: require_http_client.ContentType.Json,
1764
+ type: "application/json",
1766
1765
  format: "json",
1767
1766
  ...params
1768
1767
  });
@@ -1779,7 +1778,7 @@ var Api = class extends require_http_client.HttpClient {
1779
1778
  method: "POST",
1780
1779
  body: CreateStories,
1781
1780
  secure: true,
1782
- type: require_http_client.ContentType.Json,
1781
+ type: "application/json",
1783
1782
  format: "json",
1784
1783
  ...params
1785
1784
  });
@@ -1796,7 +1795,7 @@ var Api = class extends require_http_client.HttpClient {
1796
1795
  method: "PUT",
1797
1796
  body: UpdateStories,
1798
1797
  secure: true,
1799
- type: require_http_client.ContentType.Json,
1798
+ type: "application/json",
1800
1799
  format: "json",
1801
1800
  ...params
1802
1801
  });
@@ -1813,7 +1812,7 @@ var Api = class extends require_http_client.HttpClient {
1813
1812
  method: "DELETE",
1814
1813
  body: DeleteStories,
1815
1814
  secure: true,
1816
- type: require_http_client.ContentType.Json,
1815
+ type: "application/json",
1817
1816
  ...params
1818
1817
  });
1819
1818
  /**
@@ -1829,7 +1828,7 @@ var Api = class extends require_http_client.HttpClient {
1829
1828
  method: "POST",
1830
1829
  body: CreateStoryFromTemplateParams,
1831
1830
  secure: true,
1832
- type: require_http_client.ContentType.Json,
1831
+ type: "application/json",
1833
1832
  format: "json",
1834
1833
  ...params
1835
1834
  });
@@ -1846,7 +1845,7 @@ var Api = class extends require_http_client.HttpClient {
1846
1845
  method: "POST",
1847
1846
  body: SearchStories,
1848
1847
  secure: true,
1849
- type: require_http_client.ContentType.Json,
1848
+ type: "application/json",
1850
1849
  format: "json",
1851
1850
  ...params
1852
1851
  });
@@ -1878,7 +1877,7 @@ var Api = class extends require_http_client.HttpClient {
1878
1877
  method: "PUT",
1879
1878
  body: UpdateStory,
1880
1879
  secure: true,
1881
- type: require_http_client.ContentType.Json,
1880
+ type: "application/json",
1882
1881
  format: "json",
1883
1882
  ...params
1884
1883
  });
@@ -1924,7 +1923,7 @@ var Api = class extends require_http_client.HttpClient {
1924
1923
  method: "POST",
1925
1924
  body: CreateStoryComment,
1926
1925
  secure: true,
1927
- type: require_http_client.ContentType.Json,
1926
+ type: "application/json",
1928
1927
  format: "json",
1929
1928
  ...params
1930
1929
  });
@@ -1956,7 +1955,7 @@ var Api = class extends require_http_client.HttpClient {
1956
1955
  method: "PUT",
1957
1956
  body: UpdateStoryComment,
1958
1957
  secure: true,
1959
- type: require_http_client.ContentType.Json,
1958
+ type: "application/json",
1960
1959
  format: "json",
1961
1960
  ...params
1962
1961
  });
@@ -1987,7 +1986,7 @@ var Api = class extends require_http_client.HttpClient {
1987
1986
  method: "POST",
1988
1987
  body: CreateOrDeleteStoryReaction,
1989
1988
  secure: true,
1990
- type: require_http_client.ContentType.Json,
1989
+ type: "application/json",
1991
1990
  format: "json",
1992
1991
  ...params
1993
1992
  });
@@ -2004,7 +2003,7 @@ var Api = class extends require_http_client.HttpClient {
2004
2003
  method: "DELETE",
2005
2004
  body: CreateOrDeleteStoryReaction,
2006
2005
  secure: true,
2007
- type: require_http_client.ContentType.Json,
2006
+ type: "application/json",
2008
2007
  ...params
2009
2008
  });
2010
2009
  /**
@@ -2065,7 +2064,7 @@ var Api = class extends require_http_client.HttpClient {
2065
2064
  method: "POST",
2066
2065
  body: CreateTask,
2067
2066
  secure: true,
2068
- type: require_http_client.ContentType.Json,
2067
+ type: "application/json",
2069
2068
  format: "json",
2070
2069
  ...params
2071
2070
  });
@@ -2097,7 +2096,7 @@ var Api = class extends require_http_client.HttpClient {
2097
2096
  method: "PUT",
2098
2097
  body: UpdateTask,
2099
2098
  secure: true,
2100
- type: require_http_client.ContentType.Json,
2099
+ type: "application/json",
2101
2100
  format: "json",
2102
2101
  ...params
2103
2102
  });
@@ -2128,7 +2127,7 @@ var Api = class extends require_http_client.HttpClient {
2128
2127
  method: "POST",
2129
2128
  body: CreateStoryLink,
2130
2129
  secure: true,
2131
- type: require_http_client.ContentType.Json,
2130
+ type: "application/json",
2132
2131
  format: "json",
2133
2132
  ...params
2134
2133
  });
@@ -2160,7 +2159,7 @@ var Api = class extends require_http_client.HttpClient {
2160
2159
  method: "PUT",
2161
2160
  body: UpdateStoryLink,
2162
2161
  secure: true,
2163
- type: require_http_client.ContentType.Json,
2162
+ type: "application/json",
2164
2163
  format: "json",
2165
2164
  ...params
2166
2165
  });
@@ -2209,6 +2208,5 @@ var Api = class extends require_http_client.HttpClient {
2209
2208
  ...params
2210
2209
  });
2211
2210
  };
2212
-
2213
2211
  //#endregion
2214
- exports.Api = Api;
2212
+ exports.Api = Api;