@prezly/sdk 25.2.0 → 25.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.
- package/dist/api/ApiClient.d.ts +4 -4
- package/dist/api/DeferredJobsApiClient.d.ts +4 -4
- package/dist/api/constants.cjs +1 -1
- package/dist/api/constants.js +1 -1
- package/dist/endpoints/Accounts/Client.d.ts +1 -1
- package/dist/endpoints/Billing/types.cjs +6 -6
- package/dist/endpoints/Billing/types.js +6 -6
- package/dist/endpoints/CampaignRecipients/Client.d.ts +1 -1
- package/dist/endpoints/Campaigns/Client.cjs +14 -1
- package/dist/endpoints/Campaigns/Client.d.ts +12 -9
- package/dist/endpoints/Campaigns/Client.js +14 -1
- package/dist/endpoints/ContactTagGroups/types.cjs +3 -3
- package/dist/endpoints/ContactTagGroups/types.js +3 -3
- package/dist/endpoints/ContactTags/Client.d.ts +4 -4
- package/dist/endpoints/Contacts/Client.d.ts +6 -6
- package/dist/endpoints/ContactsExports/Client.d.ts +2 -2
- package/dist/endpoints/CoverageIntegrations/Client.d.ts +3 -3
- package/dist/endpoints/NewsroomCategories/Client.d.ts +3 -3
- package/dist/endpoints/NewsroomGalleries/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomLanguages/Client.d.ts +10 -10
- package/dist/endpoints/NewsroomPrivacyRequests/Client.d.ts +2 -2
- package/dist/endpoints/NewsroomThemes/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomWebhooks/Client.d.ts +3 -3
- package/dist/endpoints/PricingTables/types.cjs +12 -12
- package/dist/endpoints/PricingTables/types.js +12 -12
- package/dist/endpoints/SenderAddresses/Client.d.ts +3 -3
- package/dist/endpoints/Stories/Client.cjs +4 -2
- package/dist/endpoints/Stories/Client.d.ts +104 -104
- package/dist/endpoints/Stories/Client.js +4 -2
- package/dist/endpoints/Stories/types.d.ts +4 -2
- package/dist/endpoints/Subscriptions/Client.d.ts +2 -2
- package/dist/endpoints/Subscriptions/types.cjs +3 -3
- package/dist/endpoints/Subscriptions/types.js +3 -3
- package/dist/endpoints/index.cjs +1 -1
- package/dist/http/lib.cjs +1 -1
- package/dist/http/types.cjs +6 -6
- package/dist/http/types.js +6 -6
- package/dist/types/BillingCycle.cjs +3 -3
- package/dist/types/BillingCycle.js +3 -3
- package/dist/types/BulkDeletePayload.d.ts +5 -0
- package/dist/types/Campaign.cjs +18 -18
- package/dist/types/Campaign.js +18 -18
- package/dist/types/Category.cjs +0 -1
- package/dist/types/Category.js +0 -1
- package/dist/types/Contact.cjs +18 -18
- package/dist/types/Contact.js +18 -18
- package/dist/types/ContactDuplicateSuggestion.cjs +3 -3
- package/dist/types/ContactDuplicateSuggestion.js +3 -4
- package/dist/types/ContactTag.cjs +1 -2
- package/dist/types/ContactTag.js +1 -2
- package/dist/types/ContactsExport.cjs +3 -3
- package/dist/types/ContactsExport.js +3 -3
- package/dist/types/ContactsScope.cjs +3 -3
- package/dist/types/ContactsScope.js +3 -3
- package/dist/types/CoverageEntry.cjs +9 -9
- package/dist/types/CoverageEntry.js +9 -9
- package/dist/types/CoverageIntegration.cjs +3 -3
- package/dist/types/CoverageIntegration.js +3 -3
- package/dist/types/CoverageIntegrationRun.cjs +3 -3
- package/dist/types/CoverageIntegrationRun.js +3 -3
- package/dist/types/Culture.cjs +3 -3
- package/dist/types/Culture.js +3 -3
- package/dist/types/Currency.cjs +3 -3
- package/dist/types/Currency.js +3 -3
- package/dist/types/EmailRecipient.cjs +6 -6
- package/dist/types/EmailRecipient.js +6 -6
- package/dist/types/JobState.cjs +3 -3
- package/dist/types/JobState.js +3 -3
- package/dist/types/License.cjs +12 -12
- package/dist/types/License.js +12 -12
- package/dist/types/Newsroom.cjs +12 -12
- package/dist/types/Newsroom.js +12 -12
- package/dist/types/NewsroomDomain.cjs +6 -6
- package/dist/types/NewsroomDomain.js +6 -6
- package/dist/types/NewsroomGallery.cjs +6 -6
- package/dist/types/NewsroomGallery.js +6 -6
- package/dist/types/NewsroomTheme.cjs +7 -8
- package/dist/types/NewsroomTheme.js +7 -8
- package/dist/types/NewsroomWebhook.cjs +3 -3
- package/dist/types/NewsroomWebhook.js +3 -3
- package/dist/types/NotificationSubscription.cjs +3 -3
- package/dist/types/NotificationSubscription.js +3 -3
- package/dist/types/Permissions.cjs +3 -3
- package/dist/types/Permissions.js +3 -3
- package/dist/types/Plan.cjs +10 -10
- package/dist/types/Plan.js +11 -11
- package/dist/types/Price.cjs +6 -6
- package/dist/types/Price.js +6 -6
- package/dist/types/PrivacyRequest.cjs +6 -6
- package/dist/types/PrivacyRequest.js +6 -6
- package/dist/types/SenderAddress.cjs +3 -3
- package/dist/types/SenderAddress.js +3 -3
- package/dist/types/SenderDomain.cjs +3 -3
- package/dist/types/SenderDomain.js +3 -3
- package/dist/types/SortOrder.cjs +3 -3
- package/dist/types/SortOrder.js +3 -3
- package/dist/types/Story.cjs +12 -12
- package/dist/types/Story.js +12 -12
- package/dist/types/User.cjs +6 -6
- package/dist/types/User.js +6 -6
- package/dist/types/common/Notification.cjs +3 -3
- package/dist/types/common/Notification.js +3 -3
- package/dist/types/common/OEmbedInfo.cjs +3 -3
- package/dist/types/common/OEmbedInfo.js +3 -3
- package/dist/types/common/Pagination.cjs +3 -3
- package/dist/types/common/Pagination.js +3 -3
- package/dist/types/common/Query.js +0 -1
- package/dist/types/index.cjs +4 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
- package/dist/types/StoriesBulkSelector.d.ts +0 -4
- /package/dist/types/{StoriesBulkSelector.cjs → BulkDeletePayload.cjs} +0 -0
- /package/dist/types/{StoriesBulkSelector.js → BulkDeletePayload.js} +0 -0
package/dist/api/ApiClient.d.ts
CHANGED
|
@@ -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: <
|
|
10
|
-
put: <
|
|
11
|
-
patch: <
|
|
12
|
-
delete: <
|
|
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>>;
|
|
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: <
|
|
8
|
-
put: <
|
|
9
|
-
patch: <
|
|
10
|
-
delete: <
|
|
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>;
|
|
11
11
|
};
|
package/dist/api/constants.cjs
CHANGED
|
@@ -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 = "25.
|
|
7
|
+
const VERSION = "25.2.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})`;
|
package/dist/api/constants.js
CHANGED
|
@@ -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[
|
|
8
|
+
update: (id: UserAccount["id"], payload: UpdateRequest) => Promise<UpdateResponse>;
|
|
9
9
|
};
|
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SignupPlan = exports.SignupCurrency = void 0;
|
|
7
|
-
let SignupPlan = exports.SignupPlan =
|
|
8
|
-
(function (SignupPlan) {
|
|
7
|
+
let SignupPlan = exports.SignupPlan = /*#__PURE__*/function (SignupPlan) {
|
|
9
8
|
SignupPlan["ESSENTIAL"] = "essential";
|
|
10
9
|
SignupPlan["STANDARD"] = "standard";
|
|
11
10
|
SignupPlan["AGENCY_ESSENTIAL"] = "agency_essential";
|
|
12
11
|
SignupPlan["AGENCY_STANDARD"] = "agency_standard";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
return SignupPlan;
|
|
13
|
+
}({});
|
|
14
|
+
let SignupCurrency = exports.SignupCurrency = /*#__PURE__*/function (SignupCurrency) {
|
|
16
15
|
SignupCurrency["EUR"] = "eur";
|
|
17
16
|
SignupCurrency["USD"] = "usd";
|
|
18
|
-
|
|
17
|
+
return SignupCurrency;
|
|
18
|
+
}({});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export let SignupPlan
|
|
2
|
-
(function (SignupPlan) {
|
|
1
|
+
export let SignupPlan = /*#__PURE__*/function (SignupPlan) {
|
|
3
2
|
SignupPlan["ESSENTIAL"] = "essential";
|
|
4
3
|
SignupPlan["STANDARD"] = "standard";
|
|
5
4
|
SignupPlan["AGENCY_ESSENTIAL"] = "agency_essential";
|
|
6
5
|
SignupPlan["AGENCY_STANDARD"] = "agency_standard";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
return SignupPlan;
|
|
7
|
+
}({});
|
|
8
|
+
export let SignupCurrency = /*#__PURE__*/function (SignupCurrency) {
|
|
10
9
|
SignupCurrency["EUR"] = "eur";
|
|
11
10
|
SignupCurrency["USD"] = "usd";
|
|
12
|
-
|
|
11
|
+
return SignupCurrency;
|
|
12
|
+
}({});
|
|
@@ -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
|
-
}
|
|
25
|
+
}) => Promise<RecipientsOperationResponse>;
|
|
26
26
|
};
|
|
27
27
|
export {};
|
|
@@ -53,6 +53,18 @@ function createClient(api) {
|
|
|
53
53
|
async function doDelete(id) {
|
|
54
54
|
return api.delete(`${_routing.routing.campaignsUrl}/${id}`);
|
|
55
55
|
}
|
|
56
|
+
function bulkDelete(payload) {
|
|
57
|
+
const {
|
|
58
|
+
search,
|
|
59
|
+
query
|
|
60
|
+
} = payload;
|
|
61
|
+
return api.delete(_routing.routing.campaignsUrl, {
|
|
62
|
+
payload: {
|
|
63
|
+
search,
|
|
64
|
+
query
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
56
68
|
async function test(id, emails) {
|
|
57
69
|
return api.post(`${_routing.routing.campaignsUrl}/${id}/test`, {
|
|
58
70
|
payload: {
|
|
@@ -100,6 +112,7 @@ function createClient(api) {
|
|
|
100
112
|
unschedule,
|
|
101
113
|
create,
|
|
102
114
|
update,
|
|
103
|
-
delete: doDelete
|
|
115
|
+
delete: doDelete,
|
|
116
|
+
bulkDelete
|
|
104
117
|
};
|
|
105
118
|
}
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import type { ProgressPromise } from '@prezly/progress-promise';
|
|
2
2
|
import type { DeferredJobsApiClient } from '../../api';
|
|
3
|
-
import type { Campaign } from '../../types';
|
|
3
|
+
import type { BulkDeletePayload, Campaign } from '../../types';
|
|
4
4
|
import type { CreateRequest, RecipientsOperationResponse, CampaignResponse, UpdateRequest, ListResponse, SearchOptions } from './types';
|
|
5
5
|
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[
|
|
10
|
-
duplicate: (id: Campaign[
|
|
11
|
-
test: (id: Campaign[
|
|
12
|
-
send: (id: Campaign[
|
|
13
|
-
schedule: (id: Campaign[
|
|
14
|
-
unschedule: (id: 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[
|
|
19
|
-
delete: (id: Campaign[
|
|
18
|
+
update: (id: Campaign["id"], payload: UpdateRequest) => Promise<CampaignResponse>;
|
|
19
|
+
delete: (id: Campaign["id"]) => Promise<void>;
|
|
20
|
+
bulkDelete: (payload: BulkDeletePayload) => ProgressPromise<{
|
|
21
|
+
records_deleted_number: number;
|
|
22
|
+
}>;
|
|
20
23
|
};
|
|
@@ -47,6 +47,18 @@ export function createClient(api) {
|
|
|
47
47
|
async function doDelete(id) {
|
|
48
48
|
return api.delete(`${routing.campaignsUrl}/${id}`);
|
|
49
49
|
}
|
|
50
|
+
function bulkDelete(payload) {
|
|
51
|
+
const {
|
|
52
|
+
search,
|
|
53
|
+
query
|
|
54
|
+
} = payload;
|
|
55
|
+
return api.delete(routing.campaignsUrl, {
|
|
56
|
+
payload: {
|
|
57
|
+
search,
|
|
58
|
+
query
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
50
62
|
async function test(id, emails) {
|
|
51
63
|
return api.post(`${routing.campaignsUrl}/${id}/test`, {
|
|
52
64
|
payload: {
|
|
@@ -94,6 +106,7 @@ export function createClient(api) {
|
|
|
94
106
|
unschedule,
|
|
95
107
|
create,
|
|
96
108
|
update,
|
|
97
|
-
delete: doDelete
|
|
109
|
+
delete: doDelete,
|
|
110
|
+
bulkDelete
|
|
98
111
|
};
|
|
99
112
|
}
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Color = void 0;
|
|
7
|
-
let Color = exports.Color =
|
|
8
|
-
(function (Color) {
|
|
7
|
+
let Color = exports.Color = /*#__PURE__*/function (Color) {
|
|
9
8
|
Color["RED"] = "red";
|
|
10
9
|
Color["PINK"] = "pink";
|
|
11
10
|
Color["ORANGE"] = "orange";
|
|
@@ -16,4 +15,5 @@ let Color = exports.Color = void 0;
|
|
|
16
15
|
Color["BLUE"] = "blue";
|
|
17
16
|
Color["INDIGO"] = "indigo";
|
|
18
17
|
Color["PURPLE"] = "purple";
|
|
19
|
-
|
|
18
|
+
return Color;
|
|
19
|
+
}({});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export let Color
|
|
2
|
-
(function (Color) {
|
|
1
|
+
export let Color = /*#__PURE__*/function (Color) {
|
|
3
2
|
Color["RED"] = "red";
|
|
4
3
|
Color["PINK"] = "pink";
|
|
5
4
|
Color["ORANGE"] = "orange";
|
|
@@ -10,4 +9,5 @@ export let Color;
|
|
|
10
9
|
Color["BLUE"] = "blue";
|
|
11
10
|
Color["INDIGO"] = "indigo";
|
|
12
11
|
Color["PURPLE"] = "purple";
|
|
13
|
-
|
|
12
|
+
return Color;
|
|
13
|
+
}({});
|
|
@@ -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[
|
|
8
|
+
get: (id: ContactTag["id"]) => Promise<ContactTag>;
|
|
9
9
|
create: (payload: CreateRequest, { force }?: CreateOptions) => Promise<CreateResponse>;
|
|
10
|
-
update: (id: Contact[
|
|
10
|
+
update: (id: Contact["id"], payload: UpdateRequest, { force }?: UpdateOptions) => Promise<UpdateResponse>;
|
|
11
11
|
merge: ({ name, tags }: MergeRequest) => Promise<MergeResponse>;
|
|
12
|
-
delete: (id: ContactTag[
|
|
12
|
+
delete: (id: ContactTag["id"]) => Promise<{
|
|
13
13
|
deleted: number[];
|
|
14
14
|
}>;
|
|
15
|
-
deleteMany: (ids: ContactTag[
|
|
15
|
+
deleteMany: (ids: ContactTag["id"][]) => Promise<{
|
|
16
16
|
deleted: number[];
|
|
17
17
|
}>;
|
|
18
18
|
deleteUnused: () => Promise<{
|
|
@@ -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[
|
|
10
|
-
getMany: (ids: 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[
|
|
13
|
-
tag: (id: Contact[
|
|
14
|
-
untag: (id: 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[
|
|
17
|
+
delete: (id: Contact["id"]) => Promise<void>;
|
|
18
18
|
bulkDelete: (selector: BulkSelector) => Promise<BulkDeleteResponse>;
|
|
19
19
|
};
|
|
@@ -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[
|
|
8
|
+
get: (uuid: ContactsExport["uuid"]) => Promise<ContactsExport>;
|
|
9
9
|
create: (selector: ContactsBulkSelector) => Promise<ContactsExport>;
|
|
10
|
-
download: (uuid: ContactsExport[
|
|
10
|
+
download: (uuid: ContactsExport["uuid"]) => Promise<{
|
|
11
11
|
downloadUrl: string;
|
|
12
12
|
}>;
|
|
13
13
|
};
|
|
@@ -14,9 +14,9 @@ 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[
|
|
18
|
-
oldest?: number
|
|
19
|
-
limit?: number
|
|
17
|
+
input: CoverageIntegration["input"];
|
|
18
|
+
oldest?: number;
|
|
19
|
+
limit?: number;
|
|
20
20
|
}) => Promise<PreviewResponse>;
|
|
21
21
|
};
|
|
22
22
|
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[
|
|
8
|
+
get: (newsroomId: NewsroomId, categoryId: Category["id"]) => Promise<Category>;
|
|
9
9
|
create: (newsroomId: NewsroomId, payload: CreateRequest) => Promise<Category>;
|
|
10
|
-
update: (newsroomId: NewsroomId, categoryId: Category[
|
|
11
|
-
delete: (newsroomId: NewsroomId, categoryId: Category[
|
|
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[
|
|
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[
|
|
9
|
-
fallback?:
|
|
8
|
+
get: (newsroomId: NewsroomId, localeCode: CultureRef["code"], { fallback }?: {
|
|
9
|
+
fallback?: true | false;
|
|
10
10
|
}) => Promise<NewsroomLanguageSettings>;
|
|
11
|
-
enable: (newsroomId: NewsroomId, localeCode: CultureRef[
|
|
12
|
-
disable: (newsroomId: NewsroomId, localeCode: CultureRef[
|
|
13
|
-
replacement?:
|
|
11
|
+
enable: (newsroomId: NewsroomId, localeCode: CultureRef["code"], payload?: SettingsUpdateRequest) => Promise<NewsroomLanguageSettings>;
|
|
12
|
+
disable: (newsroomId: NewsroomId, localeCode: CultureRef["code"], { replacement }: {
|
|
13
|
+
replacement?: CultureRef["code"];
|
|
14
14
|
}) => Promise<void>;
|
|
15
|
-
update: (newsroomId: NewsroomId, localeCode: CultureRef[
|
|
16
|
-
force?: boolean
|
|
15
|
+
update: (newsroomId: NewsroomId, localeCode: CultureRef["code"], payload: SettingsUpdateRequest, options?: {
|
|
16
|
+
force?: boolean;
|
|
17
17
|
}) => Promise<NewsroomLanguageSettings>;
|
|
18
|
-
makeDefault: (newsroomId: NewsroomId, localeCode: CultureRef[
|
|
19
|
-
switchDefaultLanguage: (newsroomId: NewsroomId, localeCode: CultureRef[
|
|
20
|
-
status:
|
|
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[
|
|
7
|
-
confirm: (newsroomId: Newsroom[
|
|
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[
|
|
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[
|
|
10
|
-
update: (newsroomId: NewsroomId, webhookId: NewsroomWebhook[
|
|
11
|
-
delete: (newsroomId: NewsroomId, webhookId: 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>;
|
|
12
12
|
};
|
|
13
13
|
export {};
|
|
@@ -4,13 +4,12 @@ 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 =
|
|
8
|
-
(function (TableId) {
|
|
7
|
+
let TableId = exports.TableId = /*#__PURE__*/function (TableId) {
|
|
9
8
|
TableId["STANDARD"] = "standard";
|
|
10
9
|
TableId["AGENCY"] = "agency";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
return TableId;
|
|
11
|
+
}({});
|
|
12
|
+
let OptionId = exports.OptionId = /*#__PURE__*/function (OptionId) {
|
|
14
13
|
OptionId["STARTER"] = "starter";
|
|
15
14
|
OptionId["CORE"] = "core";
|
|
16
15
|
OptionId["PREMIUM"] = "premium";
|
|
@@ -19,17 +18,18 @@ let OptionId = exports.OptionId = void 0;
|
|
|
19
18
|
OptionId["AGENCY_MEDIUM"] = "agency_medium";
|
|
20
19
|
OptionId["AGENCY_LARGE"] = "agency_large";
|
|
21
20
|
OptionId["AGENCY_HUGE"] = "agency_huge";
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
return OptionId;
|
|
22
|
+
}({});
|
|
23
|
+
let LimitId = exports.LimitId = /*#__PURE__*/function (LimitId) {
|
|
25
24
|
LimitId["STORIES"] = "stories";
|
|
26
25
|
LimitId["USERS"] = "users";
|
|
27
26
|
LimitId["SITES"] = "sites";
|
|
28
27
|
LimitId["CONTACTS"] = "contacts";
|
|
29
28
|
LimitId["EMAIL_SENDS"] = "email_sends";
|
|
30
29
|
LimitId["CUSTOM_SENDER_ADDRESSES"] = "custom_sender_addresses";
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
return LimitId;
|
|
31
|
+
}({});
|
|
32
|
+
let AddOnId = exports.AddOnId = /*#__PURE__*/function (AddOnId) {
|
|
34
33
|
AddOnId["SITE"] = "site";
|
|
35
|
-
|
|
34
|
+
return AddOnId;
|
|
35
|
+
}({});
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export let TableId
|
|
2
|
-
(function (TableId) {
|
|
1
|
+
export let TableId = /*#__PURE__*/function (TableId) {
|
|
3
2
|
TableId["STANDARD"] = "standard";
|
|
4
3
|
TableId["AGENCY"] = "agency";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
return TableId;
|
|
5
|
+
}({});
|
|
6
|
+
export let OptionId = /*#__PURE__*/function (OptionId) {
|
|
8
7
|
OptionId["STARTER"] = "starter";
|
|
9
8
|
OptionId["CORE"] = "core";
|
|
10
9
|
OptionId["PREMIUM"] = "premium";
|
|
@@ -13,17 +12,18 @@ export let OptionId;
|
|
|
13
12
|
OptionId["AGENCY_MEDIUM"] = "agency_medium";
|
|
14
13
|
OptionId["AGENCY_LARGE"] = "agency_large";
|
|
15
14
|
OptionId["AGENCY_HUGE"] = "agency_huge";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
return OptionId;
|
|
16
|
+
}({});
|
|
17
|
+
export let LimitId = /*#__PURE__*/function (LimitId) {
|
|
19
18
|
LimitId["STORIES"] = "stories";
|
|
20
19
|
LimitId["USERS"] = "users";
|
|
21
20
|
LimitId["SITES"] = "sites";
|
|
22
21
|
LimitId["CONTACTS"] = "contacts";
|
|
23
22
|
LimitId["EMAIL_SENDS"] = "email_sends";
|
|
24
23
|
LimitId["CUSTOM_SENDER_ADDRESSES"] = "custom_sender_addresses";
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
return LimitId;
|
|
25
|
+
}({});
|
|
26
|
+
export let AddOnId = /*#__PURE__*/function (AddOnId) {
|
|
28
27
|
AddOnId["SITE"] = "site";
|
|
29
|
-
|
|
28
|
+
return AddOnId;
|
|
29
|
+
}({});
|
|
@@ -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[
|
|
10
|
-
update: (senderId: SenderAddress[
|
|
11
|
-
delete: (senderId: SenderAddress[
|
|
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
|
};
|
|
@@ -408,12 +408,14 @@ function createClient(api) {
|
|
|
408
408
|
const url = `${_routing.routing.storiesUrl}/${id}`;
|
|
409
409
|
await api.delete(url);
|
|
410
410
|
}
|
|
411
|
-
|
|
411
|
+
function bulkDelete(payload) {
|
|
412
412
|
const {
|
|
413
|
+
search,
|
|
413
414
|
query
|
|
414
|
-
} =
|
|
415
|
+
} = payload;
|
|
415
416
|
return api.delete(_routing.routing.storiesUrl, {
|
|
416
417
|
payload: {
|
|
418
|
+
search,
|
|
417
419
|
query
|
|
418
420
|
}
|
|
419
421
|
});
|