@prezly/sdk 23.9.0 → 23.10.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.
Files changed (112) hide show
  1. package/dist/api/ApiClient.d.ts +4 -4
  2. package/dist/api/DeferredJobsApiClient.d.ts +4 -4
  3. package/dist/api/constants.cjs +1 -1
  4. package/dist/api/constants.js +1 -1
  5. package/dist/endpoints/Accounts/Client.d.ts +1 -1
  6. package/dist/endpoints/Billing/types.cjs +6 -6
  7. package/dist/endpoints/Billing/types.js +6 -6
  8. package/dist/endpoints/CampaignRecipients/Client.d.ts +1 -1
  9. package/dist/endpoints/Campaigns/Client.cjs +4 -0
  10. package/dist/endpoints/Campaigns/Client.d.ts +8 -8
  11. package/dist/endpoints/Campaigns/Client.js +4 -0
  12. package/dist/endpoints/Campaigns/types.d.ts +1 -0
  13. package/dist/endpoints/ContactTagGroups/types.cjs +3 -3
  14. package/dist/endpoints/ContactTagGroups/types.js +3 -3
  15. package/dist/endpoints/ContactTags/Client.d.ts +4 -4
  16. package/dist/endpoints/Contacts/Client.cjs +4 -0
  17. package/dist/endpoints/Contacts/Client.d.ts +6 -6
  18. package/dist/endpoints/Contacts/Client.js +4 -0
  19. package/dist/endpoints/Contacts/types.d.ts +1 -0
  20. package/dist/endpoints/ContactsExports/Client.d.ts +2 -2
  21. package/dist/endpoints/Coverage/Client.cjs +4 -0
  22. package/dist/endpoints/Coverage/Client.js +4 -0
  23. package/dist/endpoints/Coverage/types.d.ts +1 -0
  24. package/dist/endpoints/CoverageIntegrations/Client.d.ts +2 -2
  25. package/dist/endpoints/NewsroomCategories/Client.d.ts +3 -3
  26. package/dist/endpoints/NewsroomGalleries/Client.d.ts +1 -1
  27. package/dist/endpoints/NewsroomLanguages/Client.d.ts +10 -10
  28. package/dist/endpoints/NewsroomPrivacyRequests/Client.d.ts +2 -2
  29. package/dist/endpoints/NewsroomThemes/Client.d.ts +1 -1
  30. package/dist/endpoints/NewsroomWebhooks/Client.d.ts +3 -3
  31. package/dist/endpoints/PricingTables/types.cjs +12 -12
  32. package/dist/endpoints/PricingTables/types.js +12 -12
  33. package/dist/endpoints/SenderAddresses/Client.d.ts +3 -3
  34. package/dist/endpoints/Stories/Client.d.ts +102 -102
  35. package/dist/endpoints/Stories/types.d.ts +2 -4
  36. package/dist/endpoints/Subscriptions/Client.d.ts +2 -2
  37. package/dist/endpoints/Subscriptions/types.cjs +3 -3
  38. package/dist/endpoints/Subscriptions/types.js +3 -3
  39. package/dist/endpoints/index.cjs +1 -1
  40. package/dist/http/lib.cjs +1 -1
  41. package/dist/http/types.cjs +6 -6
  42. package/dist/http/types.js +6 -6
  43. package/dist/types/BillingCycle.cjs +3 -3
  44. package/dist/types/BillingCycle.js +3 -3
  45. package/dist/types/Campaign.cjs +18 -18
  46. package/dist/types/Campaign.js +18 -18
  47. package/dist/types/Category.cjs +1 -0
  48. package/dist/types/Category.js +1 -0
  49. package/dist/types/Contact.cjs +18 -18
  50. package/dist/types/Contact.js +18 -18
  51. package/dist/types/ContactDuplicateSuggestion.cjs +3 -3
  52. package/dist/types/ContactDuplicateSuggestion.js +4 -3
  53. package/dist/types/ContactTag.cjs +2 -1
  54. package/dist/types/ContactTag.js +2 -1
  55. package/dist/types/ContactsExport.cjs +3 -3
  56. package/dist/types/ContactsExport.js +3 -3
  57. package/dist/types/ContactsScope.cjs +3 -3
  58. package/dist/types/ContactsScope.js +3 -3
  59. package/dist/types/CoverageEntry.cjs +9 -9
  60. package/dist/types/CoverageEntry.js +9 -9
  61. package/dist/types/CoverageIntegration.cjs +3 -3
  62. package/dist/types/CoverageIntegration.js +3 -3
  63. package/dist/types/CoverageIntegrationRun.cjs +3 -3
  64. package/dist/types/CoverageIntegrationRun.js +3 -3
  65. package/dist/types/Culture.cjs +3 -3
  66. package/dist/types/Culture.js +3 -3
  67. package/dist/types/Currency.cjs +3 -3
  68. package/dist/types/Currency.js +3 -3
  69. package/dist/types/EmailRecipient.cjs +3 -3
  70. package/dist/types/EmailRecipient.js +3 -3
  71. package/dist/types/JobState.cjs +3 -3
  72. package/dist/types/JobState.js +3 -3
  73. package/dist/types/License.cjs +12 -12
  74. package/dist/types/License.js +12 -12
  75. package/dist/types/Newsroom.cjs +12 -12
  76. package/dist/types/Newsroom.js +12 -12
  77. package/dist/types/NewsroomDomain.cjs +6 -6
  78. package/dist/types/NewsroomDomain.js +6 -6
  79. package/dist/types/NewsroomGallery.cjs +6 -6
  80. package/dist/types/NewsroomGallery.js +6 -6
  81. package/dist/types/NewsroomTheme.cjs +8 -7
  82. package/dist/types/NewsroomTheme.js +8 -7
  83. package/dist/types/NewsroomWebhook.cjs +3 -3
  84. package/dist/types/NewsroomWebhook.js +3 -3
  85. package/dist/types/NotificationSubscription.cjs +3 -3
  86. package/dist/types/NotificationSubscription.js +3 -3
  87. package/dist/types/Permissions.cjs +3 -3
  88. package/dist/types/Permissions.js +3 -3
  89. package/dist/types/Plan.cjs +10 -10
  90. package/dist/types/Plan.js +11 -11
  91. package/dist/types/Price.cjs +6 -6
  92. package/dist/types/Price.js +6 -6
  93. package/dist/types/PrivacyRequest.cjs +6 -6
  94. package/dist/types/PrivacyRequest.js +6 -6
  95. package/dist/types/SenderAddress.cjs +3 -3
  96. package/dist/types/SenderAddress.js +3 -3
  97. package/dist/types/SenderDomain.cjs +3 -3
  98. package/dist/types/SenderDomain.js +3 -3
  99. package/dist/types/SortOrder.cjs +3 -3
  100. package/dist/types/SortOrder.js +3 -3
  101. package/dist/types/Story.cjs +12 -12
  102. package/dist/types/Story.js +12 -12
  103. package/dist/types/User.cjs +6 -6
  104. package/dist/types/User.js +6 -6
  105. package/dist/types/common/Notification.cjs +3 -3
  106. package/dist/types/common/Notification.js +3 -3
  107. package/dist/types/common/OEmbedInfo.cjs +3 -3
  108. package/dist/types/common/OEmbedInfo.js +3 -3
  109. package/dist/types/common/Pagination.cjs +3 -3
  110. package/dist/types/common/Pagination.js +3 -3
  111. package/dist/types/common/Query.js +1 -0
  112. package/package.json +1 -1
@@ -6,8 +6,8 @@ export interface Options {
6
6
  export type ApiClient = ReturnType<typeof createApiClient>;
7
7
  export declare function createApiClient(http: HttpClient, { accessToken, headers }: Options): {
8
8
  get: <V = any>(url: string, { headers, query }?: Params) => Promise<ApiResponse<V>>;
9
- post: <V = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => Promise<ApiResponse<V>>;
10
- put: <V = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => Promise<ApiResponse<V>>;
11
- patch: <V = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => Promise<ApiResponse<V>>;
12
- delete: <V = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => Promise<ApiResponse<V>>;
9
+ post: <V_1 = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => Promise<ApiResponse<V_1>>;
10
+ put: <V_2 = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => Promise<ApiResponse<V_2>>;
11
+ patch: <V_3 = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => Promise<ApiResponse<V_3>>;
12
+ delete: <V_4 = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => Promise<ApiResponse<V_4>>;
13
13
  };
@@ -4,8 +4,8 @@ import type { ApiClient } from './ApiClient';
4
4
  export type DeferredJobsApiClient = ReturnType<typeof createDeferredJobsApiClient>;
5
5
  export declare function createDeferredJobsApiClient(api: ApiClient): {
6
6
  get: <V = any, P = any>(url: string, { headers, query }?: Params) => ProgressPromise<V, P>;
7
- post: <V = any, P = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => ProgressPromise<V, P>;
8
- put: <V = any, P = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => ProgressPromise<V, P>;
9
- patch: <V = any, P = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => ProgressPromise<V, P>;
10
- delete: <V = any, P = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => ProgressPromise<V, P>;
7
+ post: <V_1 = any, P_1 = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => ProgressPromise<V_1, P_1>;
8
+ put: <V_2 = any, P_2 = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => ProgressPromise<V_2, P_2>;
9
+ patch: <V_3 = any, P_3 = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => ProgressPromise<V_3, P_3>;
10
+ delete: <V_4 = any, P_4 = any>(url: string, { headers, payload, query }?: ParamsWithPayload) => ProgressPromise<V_4, P_4>;
11
11
  };
@@ -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.9.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.9.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -5,5 +5,5 @@ export type Client = ReturnType<typeof createClient>;
5
5
  export declare function createClient(api: DeferredJobsApiClient): {
6
6
  list: () => Promise<ListResponse>;
7
7
  create: (payload: CreateRequest) => Promise<CreateResponse>;
8
- update: (id: UserAccount["id"], payload: UpdateRequest) => Promise<UpdateResponse>;
8
+ update: (id: UserAccount['id'], payload: UpdateRequest) => Promise<UpdateResponse>;
9
9
  };
@@ -4,14 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.SignupPlan = exports.SignupCurrency = void 0;
7
- let SignupPlan = exports.SignupPlan = /*#__PURE__*/function (SignupPlan) {
7
+ let SignupPlan = exports.SignupPlan = void 0;
8
+ (function (SignupPlan) {
8
9
  SignupPlan["STARTER"] = "starter";
9
10
  SignupPlan["CORE"] = "core";
10
11
  SignupPlan["PREMIUM"] = "premium";
11
- return SignupPlan;
12
- }({});
13
- let SignupCurrency = exports.SignupCurrency = /*#__PURE__*/function (SignupCurrency) {
12
+ })(SignupPlan || (exports.SignupPlan = SignupPlan = {}));
13
+ let SignupCurrency = exports.SignupCurrency = void 0;
14
+ (function (SignupCurrency) {
14
15
  SignupCurrency["EUR"] = "eur";
15
16
  SignupCurrency["USD"] = "usd";
16
- return SignupCurrency;
17
- }({});
17
+ })(SignupCurrency || (exports.SignupCurrency = SignupCurrency = {}));
@@ -1,11 +1,11 @@
1
- export let SignupPlan = /*#__PURE__*/function (SignupPlan) {
1
+ export let SignupPlan;
2
+ (function (SignupPlan) {
2
3
  SignupPlan["STARTER"] = "starter";
3
4
  SignupPlan["CORE"] = "core";
4
5
  SignupPlan["PREMIUM"] = "premium";
5
- return SignupPlan;
6
- }({});
7
- export let SignupCurrency = /*#__PURE__*/function (SignupCurrency) {
6
+ })(SignupPlan || (SignupPlan = {}));
7
+ export let SignupCurrency;
8
+ (function (SignupCurrency) {
8
9
  SignupCurrency["EUR"] = "eur";
9
10
  SignupCurrency["USD"] = "usd";
10
- return SignupCurrency;
11
- }({});
11
+ })(SignupCurrency || (SignupCurrency = {}));
@@ -22,6 +22,6 @@ export declare function createClient(api: DeferredJobsApiClient): {
22
22
  removeRecipient: (campaignId: CampaignId, recipientId: EmailRecipientId) => Promise<RecipientsOperationResponse>;
23
23
  removeRecipients: (campaignId: CampaignId, params?: {
24
24
  query: Query;
25
- }) => Promise<RecipientsOperationResponse>;
25
+ } | undefined) => Promise<RecipientsOperationResponse>;
26
26
  };
27
27
  export {};
@@ -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
  }
@@ -6,15 +6,15 @@ export type Client = ReturnType<typeof createClient>;
6
6
  export declare function createClient(api: DeferredJobsApiClient): {
7
7
  list: (options: SearchOptions) => Promise<ListResponse>;
8
8
  search: (options: SearchOptions) => Promise<ListResponse>;
9
- get: (id: Campaign["id"]) => Promise<CampaignResponse>;
10
- duplicate: (id: Campaign["id"]) => Promise<CampaignResponse>;
11
- test: (id: Campaign["id"], emails: string[]) => Promise<void>;
12
- send: (id: Campaign["id"]) => Promise<void>;
13
- schedule: (id: Campaign["id"], sendAt: Date) => Promise<Campaign>;
14
- unschedule: (id: Campaign["id"]) => Promise<Campaign>;
9
+ get: (id: Campaign['id']) => Promise<CampaignResponse>;
10
+ duplicate: (id: Campaign['id']) => Promise<CampaignResponse>;
11
+ test: (id: Campaign['id'], emails: string[]) => Promise<void>;
12
+ send: (id: Campaign['id']) => Promise<void>;
13
+ schedule: (id: Campaign['id'], sendAt: Date) => Promise<Campaign>;
14
+ unschedule: (id: Campaign['id']) => Promise<Campaign>;
15
15
  create: (payload: CreateRequest) => ProgressPromise<RecipientsOperationResponse, {
16
16
  recipients_number: number;
17
17
  }>;
18
- update: (id: Campaign["id"], payload: UpdateRequest) => Promise<CampaignResponse>;
19
- delete: (id: Campaign["id"]) => Promise<void>;
18
+ update: (id: Campaign['id'], payload: UpdateRequest) => Promise<CampaignResponse>;
19
+ delete: (id: Campaign['id']) => Promise<void>;
20
20
  };
@@ -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 {
@@ -4,7 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Color = void 0;
7
- let Color = exports.Color = /*#__PURE__*/function (Color) {
7
+ let Color = exports.Color = void 0;
8
+ (function (Color) {
8
9
  Color["RED"] = "red";
9
10
  Color["PINK"] = "pink";
10
11
  Color["ORANGE"] = "orange";
@@ -15,5 +16,4 @@ let Color = exports.Color = /*#__PURE__*/function (Color) {
15
16
  Color["BLUE"] = "blue";
16
17
  Color["INDIGO"] = "indigo";
17
18
  Color["PURPLE"] = "purple";
18
- return Color;
19
- }({});
19
+ })(Color || (exports.Color = Color = {}));
@@ -1,4 +1,5 @@
1
- export let Color = /*#__PURE__*/function (Color) {
1
+ export let Color;
2
+ (function (Color) {
2
3
  Color["RED"] = "red";
3
4
  Color["PINK"] = "pink";
4
5
  Color["ORANGE"] = "orange";
@@ -9,5 +10,4 @@ export let Color = /*#__PURE__*/function (Color) {
9
10
  Color["BLUE"] = "blue";
10
11
  Color["INDIGO"] = "indigo";
11
12
  Color["PURPLE"] = "purple";
12
- return Color;
13
- }({});
13
+ })(Color || (Color = {}));
@@ -5,14 +5,14 @@ export type Client = ReturnType<typeof createClient>;
5
5
  export declare function createClient(api: DeferredJobsApiClient): {
6
6
  list: (options?: ListOptions) => Promise<ListResponse>;
7
7
  search: (options?: SearchOptions) => Promise<SearchResponse>;
8
- get: (id: ContactTag["id"]) => Promise<ContactTag>;
8
+ get: (id: ContactTag['id']) => Promise<ContactTag>;
9
9
  create: (payload: CreateRequest, { force }?: CreateOptions) => Promise<CreateResponse>;
10
- update: (id: Contact["id"], payload: UpdateRequest, { force }?: UpdateOptions) => Promise<UpdateResponse>;
10
+ update: (id: Contact['id'], payload: UpdateRequest, { force }?: UpdateOptions) => Promise<UpdateResponse>;
11
11
  merge: ({ name, tags }: MergeRequest) => Promise<MergeResponse>;
12
- delete: (id: ContactTag["id"]) => Promise<{
12
+ delete: (id: ContactTag['id']) => Promise<{
13
13
  deleted: number[];
14
14
  }>;
15
- deleteMany: (ids: ContactTag["id"][]) => Promise<{
15
+ deleteMany: (ids: ContactTag['id'][]) => Promise<{
16
16
  deleted: number[];
17
17
  }>;
18
18
  deleteUnused: () => Promise<{
@@ -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
  }
@@ -6,14 +6,14 @@ export type Client = ReturnType<typeof createClient>;
6
6
  export declare function createClient(api: DeferredJobsApiClient): {
7
7
  list: (options?: ListOptions) => Promise<ListResponse>;
8
8
  search: (options?: SearchOptions) => Promise<SearchResponse>;
9
- get: (id: Contact["id"]) => Promise<Contact>;
10
- getMany: (ids: Contact["id"][]) => Promise<Contact[]>;
9
+ get: (id: Contact['id']) => Promise<Contact>;
10
+ getMany: (ids: Contact['id'][]) => Promise<Contact[]>;
11
11
  create: (payload: CreateRequest) => Promise<Contact>;
12
- update: (id: Contact["id"], payload: UpdateRequest) => Promise<Contact>;
13
- tag: (id: Contact["id"], tags: ContactTag.Identifier[]) => Promise<Contact>;
14
- untag: (id: Contact["id"], tags: ContactTag.Identifier[]) => Promise<Contact>;
12
+ update: (id: Contact['id'], payload: UpdateRequest) => Promise<Contact>;
13
+ tag: (id: Contact['id'], tags: ContactTag.Identifier[]) => Promise<Contact>;
14
+ untag: (id: Contact['id'], tags: ContactTag.Identifier[]) => Promise<Contact>;
15
15
  bulkTag: (selector: BulkSelector, tags: ContactTag.Identifier[]) => ProgressPromise<undefined>;
16
16
  bulkUntag: (selector: BulkSelector, tags: ContactTag.Identifier[]) => ProgressPromise<undefined>;
17
- delete: (id: Contact["id"]) => Promise<void>;
17
+ delete: (id: Contact['id']) => Promise<void>;
18
18
  bulkDelete: (selector: BulkSelector) => Promise<BulkDeleteResponse>;
19
19
  };
@@ -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 {
@@ -5,9 +5,9 @@ export type Client = ReturnType<typeof createClient>;
5
5
  export declare function createClient(api: DeferredJobsApiClient): {
6
6
  list: (options: ListOptions) => Promise<ListResponse>;
7
7
  search: (options: SearchOptions) => Promise<ListResponse>;
8
- get: (uuid: ContactsExport["uuid"]) => Promise<ContactsExport>;
8
+ get: (uuid: ContactsExport['uuid']) => Promise<ContactsExport>;
9
9
  create: (selector: ContactsBulkSelector) => Promise<ContactsExport>;
10
- download: (uuid: ContactsExport["uuid"]) => Promise<{
10
+ download: (uuid: ContactsExport['uuid']) => Promise<{
11
11
  downloadUrl: string;
12
12
  }>;
13
13
  };
@@ -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 {
@@ -14,8 +14,8 @@ export declare function createClient(api: DeferredJobsApiClient): {
14
14
  delete: (integrationId: IntegrationId) => Promise<void>;
15
15
  listRuns: (integrationId: IntegrationId, options?: ListRunsOptions) => Promise<ListRunsResponse>;
16
16
  preview: (provider: CoverageEntry.Provider, options: {
17
- input: CoverageIntegration["input"];
18
- oldest?: boolean;
17
+ input: CoverageIntegration['input'];
18
+ oldest?: boolean | undefined;
19
19
  }) => Promise<PreviewResponse>;
20
20
  };
21
21
  export {};
@@ -5,9 +5,9 @@ type NewsroomId = Newsroom['uuid'] | Newsroom['id'];
5
5
  export type Client = ReturnType<typeof createClient>;
6
6
  export declare function createClient(api: DeferredJobsApiClient): {
7
7
  list: (newsroomId: NewsroomId, { sortOrder }?: ListOptions) => Promise<Category[]>;
8
- get: (newsroomId: NewsroomId, categoryId: Category["id"]) => Promise<Category>;
8
+ get: (newsroomId: NewsroomId, categoryId: Category['id']) => Promise<Category>;
9
9
  create: (newsroomId: NewsroomId, payload: CreateRequest) => Promise<Category>;
10
- update: (newsroomId: NewsroomId, categoryId: Category["id"], payload: UpdateRequest) => Promise<Category>;
11
- delete: (newsroomId: NewsroomId, categoryId: Category["id"]) => Promise<void>;
10
+ update: (newsroomId: NewsroomId, categoryId: Category['id'], payload: UpdateRequest) => Promise<Category>;
11
+ delete: (newsroomId: NewsroomId, categoryId: Category['id']) => Promise<void>;
12
12
  };
13
13
  export {};
@@ -5,7 +5,7 @@ type NewsroomId = Newsroom['uuid'] | Newsroom['id'];
5
5
  type GalleryId = NewsroomGallery['uuid'] | NewsroomGallery['id'];
6
6
  export type Client = ReturnType<typeof createClient>;
7
7
  export declare function createClient(api: DeferredJobsApiClient): {
8
- get: (newsroomId: NewsroomId, id: NewsroomGallery["uuid"]) => Promise<NewsroomGallery>;
8
+ get: (newsroomId: NewsroomId, id: NewsroomGallery['uuid']) => Promise<NewsroomGallery>;
9
9
  list: (newsroomId: NewsroomId, options?: ListOptions) => Promise<ListResponse>;
10
10
  search: (newsroomId: NewsroomId, options?: SearchOptions) => Promise<ListResponse>;
11
11
  order: (newsroomId: NewsroomId, payload: ReorderRequest) => Promise<void>;
@@ -5,19 +5,19 @@ type NewsroomId = Newsroom['uuid'] | Newsroom['id'];
5
5
  export type Client = ReturnType<typeof createClient>;
6
6
  export declare function createClient(api: DeferredJobsApiClient): {
7
7
  list: (newsroomId: NewsroomId, { sortOrder }?: ListOptions) => Promise<ListResponse>;
8
- get: (newsroomId: NewsroomId, localeCode: CultureRef["code"], { fallback }?: {
9
- fallback?: true | false;
8
+ get: (newsroomId: NewsroomId, localeCode: CultureRef['code'], { fallback }?: {
9
+ fallback?: boolean | undefined;
10
10
  }) => Promise<NewsroomLanguageSettings>;
11
- enable: (newsroomId: NewsroomId, localeCode: CultureRef["code"], payload?: SettingsUpdateRequest) => Promise<NewsroomLanguageSettings>;
12
- disable: (newsroomId: NewsroomId, localeCode: CultureRef["code"], { replacement }: {
13
- replacement?: CultureRef["code"];
11
+ enable: (newsroomId: NewsroomId, localeCode: CultureRef['code'], payload?: SettingsUpdateRequest) => Promise<NewsroomLanguageSettings>;
12
+ disable: (newsroomId: NewsroomId, localeCode: CultureRef['code'], { replacement }: {
13
+ replacement?: import("../../types").Culture.Code | undefined;
14
14
  }) => Promise<void>;
15
- update: (newsroomId: NewsroomId, localeCode: CultureRef["code"], payload: SettingsUpdateRequest, options?: {
16
- force?: boolean;
15
+ update: (newsroomId: NewsroomId, localeCode: CultureRef['code'], payload: SettingsUpdateRequest, options?: {
16
+ force?: boolean | undefined;
17
17
  }) => Promise<NewsroomLanguageSettings>;
18
- makeDefault: (newsroomId: NewsroomId, localeCode: CultureRef["code"]) => Promise<NewsroomLanguageSettings>;
19
- switchDefaultLanguage: (newsroomId: NewsroomId, localeCode: CultureRef["code"], newLocaleCode: CultureRef["code"], forceUnsafeOperation?: boolean) => Promise<{
20
- status: "success";
18
+ makeDefault: (newsroomId: NewsroomId, localeCode: CultureRef['code']) => Promise<NewsroomLanguageSettings>;
19
+ switchDefaultLanguage: (newsroomId: NewsroomId, localeCode: CultureRef['code'], newLocaleCode: CultureRef['code'], forceUnsafeOperation?: boolean) => Promise<{
20
+ status: 'success';
21
21
  language: NewsroomLanguageSettings;
22
22
  } | UnsafeUpdateErrorResponse>;
23
23
  };
@@ -3,6 +3,6 @@ import type { Newsroom, PrivacyRequest } from '../../types';
3
3
  import type { DeletePrivacyRequestCreateRequest, ExportPrivacyRequestCreateRequest, CorrectPrivacyRequestCreateRequest, OtherPrivacyRequestCreateRequest } from './types';
4
4
  export type Client = ReturnType<typeof createClient>;
5
5
  export declare function createClient(api: DeferredJobsApiClient): {
6
- create: (newsroomId: Newsroom["uuid"], payload: DeletePrivacyRequestCreateRequest | ExportPrivacyRequestCreateRequest | CorrectPrivacyRequestCreateRequest | OtherPrivacyRequestCreateRequest) => Promise<PrivacyRequest>;
7
- confirm: (newsroomId: Newsroom["uuid"], privacyRequestId: PrivacyRequest["id"]) => Promise<PrivacyRequest>;
6
+ create: (newsroomId: Newsroom['uuid'], payload: DeletePrivacyRequestCreateRequest | ExportPrivacyRequestCreateRequest | CorrectPrivacyRequestCreateRequest | OtherPrivacyRequestCreateRequest) => Promise<PrivacyRequest>;
7
+ confirm: (newsroomId: Newsroom['uuid'], privacyRequestId: PrivacyRequest['id']) => Promise<PrivacyRequest>;
8
8
  };
@@ -4,7 +4,7 @@ type NewsroomId = Newsroom['uuid'] | Newsroom['id'];
4
4
  type NewsroomThemeId = NewsroomTheme['id'];
5
5
  export type Client = ReturnType<typeof createClient>;
6
6
  export declare function createClient(api: DeferredJobsApiClient): {
7
- apply: (newsroomId: NewsroomId, themeId: NewsroomThemeId, settings: NewsroomThemePreset["settings"]) => Promise<NewsroomThemePreset>;
7
+ apply: (newsroomId: NewsroomId, themeId: NewsroomThemeId, settings: NewsroomThemePreset['settings']) => Promise<NewsroomThemePreset>;
8
8
  get: (newsroomId: NewsroomId, themeId: NewsroomThemeId) => Promise<NewsroomThemePreset>;
9
9
  getActive: (newsroomId: NewsroomId) => Promise<NewsroomThemePreset>;
10
10
  list: (newsroomId: NewsroomId) => Promise<NewsroomThemePreset[]>;
@@ -6,8 +6,8 @@ export type Client = ReturnType<typeof createClient>;
6
6
  export declare function createClient(api: DeferredJobsApiClient): {
7
7
  list: (newsroomId: NewsroomId) => Promise<NewsroomWebhook[]>;
8
8
  create: (newsroomId: NewsroomId, payload: CreateRequest) => Promise<NewsroomWebhook>;
9
- get: (newsroomId: NewsroomId, webhookId: NewsroomWebhook["id"]) => Promise<NewsroomWebhook>;
10
- update: (newsroomId: NewsroomId, webhookId: NewsroomWebhook["id"], payload: UpdateRequest) => Promise<NewsroomWebhook>;
11
- delete: (newsroomId: NewsroomId, webhookId: NewsroomWebhook["id"]) => Promise<void>;
9
+ get: (newsroomId: NewsroomId, webhookId: NewsroomWebhook['id']) => Promise<NewsroomWebhook>;
10
+ update: (newsroomId: NewsroomId, webhookId: NewsroomWebhook['id'], payload: UpdateRequest) => Promise<NewsroomWebhook>;
11
+ delete: (newsroomId: NewsroomId, webhookId: NewsroomWebhook['id']) => Promise<void>;
12
12
  };
13
13
  export {};
@@ -4,12 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.TableId = exports.OptionId = exports.LimitId = exports.AddOnId = void 0;
7
- let TableId = exports.TableId = /*#__PURE__*/function (TableId) {
7
+ let TableId = exports.TableId = void 0;
8
+ (function (TableId) {
8
9
  TableId["STANDARD"] = "standard";
9
10
  TableId["AGENCY"] = "agency";
10
- return TableId;
11
- }({});
12
- let OptionId = exports.OptionId = /*#__PURE__*/function (OptionId) {
11
+ })(TableId || (exports.TableId = TableId = {}));
12
+ let OptionId = exports.OptionId = void 0;
13
+ (function (OptionId) {
13
14
  OptionId["STARTER"] = "starter";
14
15
  OptionId["CORE"] = "core";
15
16
  OptionId["PREMIUM"] = "premium";
@@ -18,18 +19,17 @@ let OptionId = exports.OptionId = /*#__PURE__*/function (OptionId) {
18
19
  OptionId["AGENCY_MEDIUM"] = "agency_medium";
19
20
  OptionId["AGENCY_LARGE"] = "agency_large";
20
21
  OptionId["AGENCY_HUGE"] = "agency_huge";
21
- return OptionId;
22
- }({});
23
- let LimitId = exports.LimitId = /*#__PURE__*/function (LimitId) {
22
+ })(OptionId || (exports.OptionId = OptionId = {}));
23
+ let LimitId = exports.LimitId = void 0;
24
+ (function (LimitId) {
24
25
  LimitId["STORIES"] = "stories";
25
26
  LimitId["USERS"] = "users";
26
27
  LimitId["SITES"] = "sites";
27
28
  LimitId["CONTACTS"] = "contacts";
28
29
  LimitId["EMAIL_SENDS"] = "email_sends";
29
30
  LimitId["CUSTOM_SENDER_ADDRESSES"] = "custom_sender_addresses";
30
- return LimitId;
31
- }({});
32
- let AddOnId = exports.AddOnId = /*#__PURE__*/function (AddOnId) {
31
+ })(LimitId || (exports.LimitId = LimitId = {}));
32
+ let AddOnId = exports.AddOnId = void 0;
33
+ (function (AddOnId) {
33
34
  AddOnId["SITE"] = "site";
34
- return AddOnId;
35
- }({});
35
+ })(AddOnId || (exports.AddOnId = AddOnId = {}));
@@ -1,9 +1,10 @@
1
- export let TableId = /*#__PURE__*/function (TableId) {
1
+ export let TableId;
2
+ (function (TableId) {
2
3
  TableId["STANDARD"] = "standard";
3
4
  TableId["AGENCY"] = "agency";
4
- return TableId;
5
- }({});
6
- export let OptionId = /*#__PURE__*/function (OptionId) {
5
+ })(TableId || (TableId = {}));
6
+ export let OptionId;
7
+ (function (OptionId) {
7
8
  OptionId["STARTER"] = "starter";
8
9
  OptionId["CORE"] = "core";
9
10
  OptionId["PREMIUM"] = "premium";
@@ -12,18 +13,17 @@ export let OptionId = /*#__PURE__*/function (OptionId) {
12
13
  OptionId["AGENCY_MEDIUM"] = "agency_medium";
13
14
  OptionId["AGENCY_LARGE"] = "agency_large";
14
15
  OptionId["AGENCY_HUGE"] = "agency_huge";
15
- return OptionId;
16
- }({});
17
- export let LimitId = /*#__PURE__*/function (LimitId) {
16
+ })(OptionId || (OptionId = {}));
17
+ export let LimitId;
18
+ (function (LimitId) {
18
19
  LimitId["STORIES"] = "stories";
19
20
  LimitId["USERS"] = "users";
20
21
  LimitId["SITES"] = "sites";
21
22
  LimitId["CONTACTS"] = "contacts";
22
23
  LimitId["EMAIL_SENDS"] = "email_sends";
23
24
  LimitId["CUSTOM_SENDER_ADDRESSES"] = "custom_sender_addresses";
24
- return LimitId;
25
- }({});
26
- export let AddOnId = /*#__PURE__*/function (AddOnId) {
25
+ })(LimitId || (LimitId = {}));
26
+ export let AddOnId;
27
+ (function (AddOnId) {
27
28
  AddOnId["SITE"] = "site";
28
- return AddOnId;
29
- }({});
29
+ })(AddOnId || (AddOnId = {}));
@@ -6,7 +6,7 @@ export type Client = ReturnType<typeof createClient>;
6
6
  export declare function createClient(api: DeferredJobsApiClient): {
7
7
  list: (scope?: Query) => Promise<SenderAddress[]>;
8
8
  create: (payload: CreateRequest) => Promise<SenderAddress>;
9
- get: (senderId: SenderAddress["id"]) => Promise<SenderAddress>;
10
- update: (senderId: SenderAddress["id"], payload: UpdateRequest) => Promise<SenderAddress>;
11
- delete: (senderId: SenderAddress["id"]) => Promise<void>;
9
+ get: (senderId: SenderAddress['id']) => Promise<SenderAddress>;
10
+ update: (senderId: SenderAddress['id'], payload: UpdateRequest) => Promise<SenderAddress>;
11
+ delete: (senderId: SenderAddress['id']) => Promise<void>;
12
12
  };