@useshortcut/client 2.3.0 → 3.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/README.md +30 -0
- package/lib/ShortcutClient.d.mts +1 -13
- package/lib/ShortcutClient.d.ts +1 -13
- package/lib/ShortcutClient.js +0 -19
- package/lib/ShortcutClient.mjs +0 -19
- package/lib/generated/Api.d.mts +146 -134
- package/lib/generated/Api.d.ts +146 -134
- package/lib/generated/Api.js +18 -2
- package/lib/generated/Api.mjs +18 -2
- package/lib/generated/data-contracts.d.mts +61 -13
- package/lib/generated/data-contracts.d.ts +61 -13
- package/lib/index.d.mts +2 -2
- package/lib/index.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,3 +78,33 @@ You can play with it in your web browser with this live playground:
|
|
|
78
78
|
[Documentation for this client](https://useshortcut.github.io/shortcut-client-js/).
|
|
79
79
|
|
|
80
80
|
[Documentation for the REST API](https://developer.shortcut.com/api/rest/v3).
|
|
81
|
+
|
|
82
|
+
## Publishing & Deployment
|
|
83
|
+
|
|
84
|
+
This library uses GitHub Actions for CI/CD. The deployment process is fully automated.
|
|
85
|
+
|
|
86
|
+
### Release Process
|
|
87
|
+
|
|
88
|
+
To publish a new version:
|
|
89
|
+
|
|
90
|
+
1. Update the version in `package.json`
|
|
91
|
+
2. Commit and push to `main`
|
|
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
|
|
94
|
+
|
|
95
|
+
### Publishing to npm
|
|
96
|
+
|
|
97
|
+
Publishing is triggered automatically when a **GitHub Release is created**:
|
|
98
|
+
|
|
99
|
+
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
|
|
104
|
+
|
|
105
|
+
### Documentation Deployment
|
|
106
|
+
|
|
107
|
+
API documentation is automatically deployed to GitHub Pages on every push to `main`:
|
|
108
|
+
|
|
109
|
+
1. The `gh-pages.yml` workflow builds the documentation using TypeDoc
|
|
110
|
+
2. Documentation is published to https://useshortcut.github.io/shortcut-client-js/
|
package/lib/ShortcutClient.d.mts
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ApiConfig, RequestParams } from "./generated/http-client.mjs";
|
|
1
|
+
import { ApiConfig } from "./generated/http-client.mjs";
|
|
3
2
|
import { Api } from "./generated/Api.mjs";
|
|
4
|
-
import * as axios0 from "axios";
|
|
5
3
|
|
|
6
4
|
//#region src/ShortcutClient.d.ts
|
|
7
5
|
declare class ShortcutClient<SecurityDataType = unknown> extends Api<SecurityDataType> {
|
|
8
6
|
constructor(apiToken: string, config?: ApiConfig<SecurityDataType>);
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated Use queryStories instead.
|
|
11
|
-
* @description Search Stories (Old) lets you search Stories based on desired parameters.
|
|
12
|
-
*
|
|
13
|
-
* @name SearchStoriesOld
|
|
14
|
-
* @summary Search Stories (Old)
|
|
15
|
-
* @request POST:/api/v3/stories/search
|
|
16
|
-
* @secure
|
|
17
|
-
*/
|
|
18
|
-
searchStoriesOld: (searchStories: SearchStories, params?: RequestParams) => Promise<axios0.AxiosResponse<StorySlim[], any>>;
|
|
19
7
|
}
|
|
20
8
|
//#endregion
|
|
21
9
|
export { ShortcutClient };
|
package/lib/ShortcutClient.d.ts
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ApiConfig, RequestParams } from "./generated/http-client.js";
|
|
1
|
+
import { ApiConfig } from "./generated/http-client.js";
|
|
3
2
|
import { Api } from "./generated/Api.js";
|
|
4
|
-
import * as axios0 from "axios";
|
|
5
3
|
|
|
6
4
|
//#region src/ShortcutClient.d.ts
|
|
7
5
|
declare class ShortcutClient<SecurityDataType = unknown> extends Api<SecurityDataType> {
|
|
8
6
|
constructor(apiToken: string, config?: ApiConfig<SecurityDataType>);
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated Use queryStories instead.
|
|
11
|
-
* @description Search Stories (Old) lets you search Stories based on desired parameters.
|
|
12
|
-
*
|
|
13
|
-
* @name SearchStoriesOld
|
|
14
|
-
* @summary Search Stories (Old)
|
|
15
|
-
* @request POST:/api/v3/stories/search
|
|
16
|
-
* @secure
|
|
17
|
-
*/
|
|
18
|
-
searchStoriesOld: (searchStories: SearchStories, params?: RequestParams) => Promise<axios0.AxiosResponse<StorySlim[], any>>;
|
|
19
7
|
}
|
|
20
8
|
//#endregion
|
|
21
9
|
export { ShortcutClient };
|
package/lib/ShortcutClient.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const require_http_client = require('./generated/http-client.js');
|
|
2
1
|
const require_Api = require('./generated/Api.js');
|
|
3
2
|
|
|
4
3
|
//#region src/ShortcutClient.ts
|
|
@@ -13,24 +12,6 @@ var ShortcutClient = class extends require_Api.Api {
|
|
|
13
12
|
...config
|
|
14
13
|
});
|
|
15
14
|
}
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated Use queryStories instead.
|
|
18
|
-
* @description Search Stories (Old) lets you search Stories based on desired parameters.
|
|
19
|
-
*
|
|
20
|
-
* @name SearchStoriesOld
|
|
21
|
-
* @summary Search Stories (Old)
|
|
22
|
-
* @request POST:/api/v3/stories/search
|
|
23
|
-
* @secure
|
|
24
|
-
*/
|
|
25
|
-
searchStoriesOld = (searchStories, params = {}) => this.request({
|
|
26
|
-
path: `/api/v3/stories/search`,
|
|
27
|
-
method: "POST",
|
|
28
|
-
body: searchStories,
|
|
29
|
-
secure: true,
|
|
30
|
-
type: require_http_client.ContentType.Json,
|
|
31
|
-
format: "json",
|
|
32
|
-
...params
|
|
33
|
-
});
|
|
34
15
|
};
|
|
35
16
|
|
|
36
17
|
//#endregion
|
package/lib/ShortcutClient.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ContentType } from "./generated/http-client.mjs";
|
|
2
1
|
import { Api } from "./generated/Api.mjs";
|
|
3
2
|
|
|
4
3
|
//#region src/ShortcutClient.ts
|
|
@@ -13,24 +12,6 @@ var ShortcutClient = class extends Api {
|
|
|
13
12
|
...config
|
|
14
13
|
});
|
|
15
14
|
}
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated Use queryStories instead.
|
|
18
|
-
* @description Search Stories (Old) lets you search Stories based on desired parameters.
|
|
19
|
-
*
|
|
20
|
-
* @name SearchStoriesOld
|
|
21
|
-
* @summary Search Stories (Old)
|
|
22
|
-
* @request POST:/api/v3/stories/search
|
|
23
|
-
* @secure
|
|
24
|
-
*/
|
|
25
|
-
searchStoriesOld = (searchStories, params = {}) => this.request({
|
|
26
|
-
path: `/api/v3/stories/search`,
|
|
27
|
-
method: "POST",
|
|
28
|
-
body: searchStories,
|
|
29
|
-
secure: true,
|
|
30
|
-
type: ContentType.Json,
|
|
31
|
-
format: "json",
|
|
32
|
-
...params
|
|
33
|
-
});
|
|
34
15
|
};
|
|
35
16
|
|
|
36
17
|
//#endregion
|