@prezly/sdk 16.2.1 → 16.3.1

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.
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_USER_AGENT = void 0;
7
- const VERSION = "16.2.0";
7
+ const VERSION = "16.3.0";
8
8
  const URL = 'https://github.com/prezly/javascript-sdk';
9
9
  const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
10
10
  exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
@@ -1,3 +1,3 @@
1
- const VERSION = "16.2.0";
1
+ const VERSION = "16.3.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -13,6 +13,7 @@ class Client {
13
13
  }
14
14
  async list(options) {
15
15
  const {
16
+ search,
16
17
  limit,
17
18
  offset,
18
19
  sortOrder,
@@ -22,6 +23,7 @@ class Client {
22
23
  return this.apiClient.get(_routing.routing.storiesUrl, {
23
24
  headers: acceptedFormatsHeader(formats),
24
25
  query: {
26
+ search,
25
27
  limit,
26
28
  offset,
27
29
  sort: _index2.SortOrder.stringify(sortOrder),
@@ -7,6 +7,7 @@ export class Client {
7
7
  }
8
8
  async list(options) {
9
9
  const {
10
+ search,
10
11
  limit,
11
12
  offset,
12
13
  sortOrder,
@@ -16,6 +17,7 @@ export class Client {
16
17
  return this.apiClient.get(routing.storiesUrl, {
17
18
  headers: acceptedFormatsHeader(formats),
18
19
  query: {
20
+ search,
19
21
  limit,
20
22
  offset,
21
23
  sort: SortOrder.stringify(sortOrder),
@@ -53,6 +53,7 @@ export interface IncludeOptions<Include extends readonly (keyof Story.ExtraField
53
53
  include?: Include;
54
54
  }
55
55
  export interface ListOptions<Include extends readonly (keyof Story.ExtraFields)[]> {
56
+ search?: string;
56
57
  limit?: number;
57
58
  offset?: number;
58
59
  sortOrder?: SortOrder | string;
@@ -39,7 +39,7 @@ export interface StoryRef {
39
39
  newsroom: NewsroomRef;
40
40
  oembed: OEmbedInfo;
41
41
  links: {
42
- newsroom_view: string;
42
+ newsroom_view: string | null;
43
43
  };
44
44
  }
45
45
  export interface Story {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "16.2.1",
3
+ "version": "16.3.1",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -64,8 +64,9 @@
64
64
  "start": "npm run build --incremental --watch",
65
65
  "lint": "eslint ./src --ext=.ts",
66
66
  "lint:fix": "npm run lint -- --fix",
67
- "test": "npm run test:build && npm run test:unit",
67
+ "test": "npm run test:build && npm run test:ts && npm run test:unit",
68
68
  "test:unit": "NODE_OPTIONS=--experimental-vm-modules jest",
69
+ "test:ts": "find src/ -name '*.test.ts' | xargs -I{} tsc --noEmit --strict {}",
69
70
  "test:build": "node dist/index.js && tsc --noEmit dist/index.d.ts",
70
71
  "snapshot": "jest --updateSnapshot",
71
72
  "prettier:check": "prettier --check './src/**/*.{ts,js}'",