@prezly/sdk 23.9.0 → 23.10.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,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_USER_AGENT = void 0;
7
- const VERSION = "23.8.0";
7
+ const VERSION = "23.10.0";
8
8
  const URL = 'https://github.com/prezly/javascript-sdk';
9
9
  const DEFAULT_USER_AGENT = exports.DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -1,3 +1,3 @@
1
- const VERSION = "23.8.0";
1
+ const VERSION = "23.10.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -10,6 +10,7 @@ var _utils = require("../../utils.cjs");
10
10
  function createClient(api) {
11
11
  async function list(options) {
12
12
  const {
13
+ search,
13
14
  query,
14
15
  limit,
15
16
  offset,
@@ -19,6 +20,7 @@ function createClient(api) {
19
20
  query: {
20
21
  limit,
21
22
  offset,
23
+ search,
22
24
  query: _index.Query.stringify(query),
23
25
  sort: _index.SortOrder.stringify(sortOrder)
24
26
  }
@@ -26,6 +28,7 @@ function createClient(api) {
26
28
  }
27
29
  async function search(options) {
28
30
  const {
31
+ search,
29
32
  query,
30
33
  limit,
31
34
  offset,
@@ -35,6 +38,7 @@ function createClient(api) {
35
38
  payload: {
36
39
  limit,
37
40
  offset,
41
+ search,
38
42
  query,
39
43
  sort: _index.SortOrder.stringify(sortOrder)
40
44
  }
@@ -4,6 +4,7 @@ import { toIso8601 } from "../../utils.js";
4
4
  export function createClient(api) {
5
5
  async function list(options) {
6
6
  const {
7
+ search,
7
8
  query,
8
9
  limit,
9
10
  offset,
@@ -13,6 +14,7 @@ export function createClient(api) {
13
14
  query: {
14
15
  limit,
15
16
  offset,
17
+ search,
16
18
  query: Query.stringify(query),
17
19
  sort: SortOrder.stringify(sortOrder)
18
20
  }
@@ -20,6 +22,7 @@ export function createClient(api) {
20
22
  }
21
23
  async function search(options) {
22
24
  const {
25
+ search,
23
26
  query,
24
27
  limit,
25
28
  offset,
@@ -29,6 +32,7 @@ export function createClient(api) {
29
32
  payload: {
30
33
  limit,
31
34
  offset,
35
+ search,
32
36
  query,
33
37
  sort: SortOrder.stringify(sortOrder)
34
38
  }
@@ -37,6 +37,7 @@ export interface CampaignResponse {
37
37
  export interface ListOptions {
38
38
  limit?: number;
39
39
  offset?: number;
40
+ search?: string;
40
41
  sortOrder?: SortOrder | string;
41
42
  }
42
43
  export interface SearchOptions extends ListOptions {
@@ -14,6 +14,7 @@ function createClient(api) {
14
14
  const {
15
15
  limit,
16
16
  offset,
17
+ search,
17
18
  sortOrder
18
19
  } = options;
19
20
  const {
@@ -22,6 +23,7 @@ function createClient(api) {
22
23
  sort
23
24
  } = await api.get(_routing.routing.contactsUrl, {
24
25
  query: {
26
+ search,
25
27
  limit,
26
28
  offset,
27
29
  sort: _index.SortOrder.stringify(sortOrder)
@@ -42,6 +44,7 @@ function createClient(api) {
42
44
  limit,
43
45
  offset,
44
46
  query,
47
+ search,
45
48
  sortOrder
46
49
  } = options;
47
50
  const url = `${_routing.routing.contactsUrl}/search`;
@@ -53,6 +56,7 @@ function createClient(api) {
53
56
  payload: {
54
57
  limit,
55
58
  offset,
59
+ search,
56
60
  sort: _index.SortOrder.stringify(sortOrder),
57
61
  query
58
62
  }
@@ -8,6 +8,7 @@ export function createClient(api) {
8
8
  const {
9
9
  limit,
10
10
  offset,
11
+ search,
11
12
  sortOrder
12
13
  } = options;
13
14
  const {
@@ -16,6 +17,7 @@ export function createClient(api) {
16
17
  sort
17
18
  } = await api.get(routing.contactsUrl, {
18
19
  query: {
20
+ search,
19
21
  limit,
20
22
  offset,
21
23
  sort: SortOrder.stringify(sortOrder)
@@ -36,6 +38,7 @@ export function createClient(api) {
36
38
  limit,
37
39
  offset,
38
40
  query,
41
+ search,
39
42
  sortOrder
40
43
  } = options;
41
44
  const url = `${routing.contactsUrl}/search`;
@@ -47,6 +50,7 @@ export function createClient(api) {
47
50
  payload: {
48
51
  limit,
49
52
  offset,
53
+ search,
50
54
  sort: SortOrder.stringify(sortOrder),
51
55
  query
52
56
  }
@@ -4,6 +4,7 @@ export type { ContactsBulkSelector as BulkSelector, ContactsScope as Scope } fro
4
4
  export interface ListOptions {
5
5
  limit?: number;
6
6
  offset?: number;
7
+ search?: string;
7
8
  sortOrder?: SortOrder | string;
8
9
  }
9
10
  export interface SearchOptions extends ListOptions {
@@ -12,6 +12,7 @@ function createClient(api) {
12
12
  includeDeleted,
13
13
  limit,
14
14
  offset,
15
+ search,
15
16
  sortOrder
16
17
  } = options;
17
18
  // TODO: Switch to `scope` API parameter
@@ -21,6 +22,7 @@ function createClient(api) {
21
22
  include_deleted: includeDeleted ? 'on' : undefined,
22
23
  limit,
23
24
  offset,
25
+ search,
24
26
  sort: _index.SortOrder.stringify(sortOrder)
25
27
  }
26
28
  });
@@ -28,6 +30,7 @@ function createClient(api) {
28
30
  async function search(options = {}, scope) {
29
31
  const {
30
32
  includeDeleted,
33
+ search,
31
34
  query,
32
35
  limit,
33
36
  offset,
@@ -39,6 +42,7 @@ function createClient(api) {
39
42
  return api.get(url, {
40
43
  query: {
41
44
  include_deleted: includeDeleted ? 'on' : undefined,
45
+ search,
42
46
  query: _index.Query.stringify(query),
43
47
  limit,
44
48
  offset,
@@ -6,6 +6,7 @@ export function createClient(api) {
6
6
  includeDeleted,
7
7
  limit,
8
8
  offset,
9
+ search,
9
10
  sortOrder
10
11
  } = options;
11
12
  // TODO: Switch to `scope` API parameter
@@ -15,6 +16,7 @@ export function createClient(api) {
15
16
  include_deleted: includeDeleted ? 'on' : undefined,
16
17
  limit,
17
18
  offset,
19
+ search,
18
20
  sort: SortOrder.stringify(sortOrder)
19
21
  }
20
22
  });
@@ -22,6 +24,7 @@ export function createClient(api) {
22
24
  async function search(options = {}, scope) {
23
25
  const {
24
26
  includeDeleted,
27
+ search,
25
28
  query,
26
29
  limit,
27
30
  offset,
@@ -33,6 +36,7 @@ export function createClient(api) {
33
36
  return api.get(url, {
34
37
  query: {
35
38
  include_deleted: includeDeleted ? 'on' : undefined,
39
+ search,
36
40
  query: Query.stringify(query),
37
41
  limit,
38
42
  offset,
@@ -67,6 +67,7 @@ export interface ListOptions {
67
67
  includeDeleted?: boolean;
68
68
  limit?: number;
69
69
  offset?: number;
70
+ search?: string;
70
71
  sortOrder?: SortOrder | string;
71
72
  }
72
73
  export interface SearchOptions extends ListOptions {
@@ -72,13 +72,15 @@ function createClient(api) {
72
72
  async function preview(provider, options) {
73
73
  const {
74
74
  input,
75
- oldest
75
+ oldest,
76
+ limit
76
77
  } = options;
77
78
  return api.post(`${_routing.routing.coverageIntegrationsUrl}/preview`, {
78
79
  payload: {
79
80
  provider,
80
81
  input,
81
- oldest
82
+ oldest,
83
+ limit
82
84
  }
83
85
  });
84
86
  }
@@ -15,7 +15,8 @@ export declare function createClient(api: DeferredJobsApiClient): {
15
15
  listRuns: (integrationId: IntegrationId, options?: ListRunsOptions) => Promise<ListRunsResponse>;
16
16
  preview: (provider: CoverageEntry.Provider, options: {
17
17
  input: CoverageIntegration["input"];
18
- oldest?: boolean;
18
+ oldest?: number;
19
+ limit?: number;
19
20
  }) => Promise<PreviewResponse>;
20
21
  };
21
22
  export {};
@@ -66,13 +66,15 @@ export function createClient(api) {
66
66
  async function preview(provider, options) {
67
67
  const {
68
68
  input,
69
- oldest
69
+ oldest,
70
+ limit
70
71
  } = options;
71
72
  return api.post(`${routing.coverageIntegrationsUrl}/preview`, {
72
73
  payload: {
73
74
  provider,
74
75
  input,
75
- oldest
76
+ oldest,
77
+ limit
76
78
  }
77
79
  });
78
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "23.9.0",
3
+ "version": "23.10.1",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",