@useshortcut/client 2.1.0 → 2.3.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.
@@ -1,9 +1,21 @@
1
- import { ApiConfig } from "./generated/http-client.mjs";
1
+ import { SearchStories, StorySlim } from "./generated/data-contracts.mjs";
2
+ import { ApiConfig, RequestParams } from "./generated/http-client.mjs";
2
3
  import { Api } from "./generated/Api.mjs";
4
+ import * as axios0 from "axios";
3
5
 
4
6
  //#region src/ShortcutClient.d.ts
5
7
  declare class ShortcutClient<SecurityDataType = unknown> extends Api<SecurityDataType> {
6
8
  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>>;
7
19
  }
8
20
  //#endregion
9
21
  export { ShortcutClient };
@@ -1,9 +1,21 @@
1
- import { ApiConfig } from "./generated/http-client.js";
1
+ import { SearchStories, StorySlim } from "./generated/data-contracts.js";
2
+ import { ApiConfig, RequestParams } from "./generated/http-client.js";
2
3
  import { Api } from "./generated/Api.js";
4
+ import * as axios0 from "axios";
3
5
 
4
6
  //#region src/ShortcutClient.d.ts
5
7
  declare class ShortcutClient<SecurityDataType = unknown> extends Api<SecurityDataType> {
6
8
  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>>;
7
19
  }
8
20
  //#endregion
9
21
  export { ShortcutClient };
@@ -1,3 +1,4 @@
1
+ const require_http_client = require('./generated/http-client.js');
1
2
  const require_Api = require('./generated/Api.js');
2
3
 
3
4
  //#region src/ShortcutClient.ts
@@ -12,6 +13,24 @@ var ShortcutClient = class extends require_Api.Api {
12
13
  ...config
13
14
  });
14
15
  }
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
+ });
15
34
  };
16
35
 
17
36
  //#endregion
@@ -1,3 +1,4 @@
1
+ import { ContentType } from "./generated/http-client.mjs";
1
2
  import { Api } from "./generated/Api.mjs";
2
3
 
3
4
  //#region src/ShortcutClient.ts
@@ -12,6 +13,24 @@ var ShortcutClient = class extends Api {
12
13
  ...config
13
14
  });
14
15
  }
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
+ });
15
34
  };
16
35
 
17
36
  //#endregion