@prezly/sdk 22.10.1 → 23.0.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/Client.cjs +4 -5
- package/dist/Client.d.ts +1 -1
- package/dist/Client.js +5 -6
- package/dist/api/ApiClient.cjs +10 -15
- package/dist/api/ApiClient.d.ts +6 -7
- package/dist/api/ApiClient.js +10 -15
- package/dist/api/DeferredJobsApiClient.cjs +26 -27
- package/dist/api/DeferredJobsApiClient.d.ts +7 -7
- package/dist/api/DeferredJobsApiClient.js +26 -27
- 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 +1 -1
- package/dist/endpoints/Campaigns/Client.d.ts +8 -8
- package/dist/endpoints/Campaigns/Client.js +1 -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.cjs +2 -2
- package/dist/endpoints/Contacts/Client.d.ts +6 -6
- package/dist/endpoints/Contacts/Client.js +2 -2
- package/dist/endpoints/ContactsExports/Client.d.ts +2 -2
- package/dist/endpoints/Coverage/Client.cjs +1 -1
- package/dist/endpoints/Coverage/Client.js +1 -1
- 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.d.ts +102 -102
- package/dist/endpoints/Stories/types.d.ts +2 -4
- 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/HttpClient.cjs +12 -5
- package/dist/http/HttpClient.d.ts +1 -0
- package/dist/http/HttpClient.js +12 -5
- 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/Campaign.cjs +18 -18
- package/dist/types/Campaign.js +18 -18
- package/dist/types/Category.cjs +1 -0
- package/dist/types/Category.js +1 -0
- 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 +4 -3
- package/dist/types/ContactTag.cjs +2 -1
- package/dist/types/ContactTag.js +2 -1
- 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 +3 -3
- package/dist/types/EmailRecipient.js +3 -3
- package/dist/types/JobState.cjs +3 -3
- package/dist/types/JobState.js +3 -3
- package/dist/types/License.cjs +9 -9
- package/dist/types/License.js +9 -9
- 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 +8 -7
- package/dist/types/NewsroomTheme.js +8 -7
- 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 +1 -0
- package/package.json +1 -1
|
@@ -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<{
|
|
@@ -123,7 +123,7 @@ function createClient(api) {
|
|
|
123
123
|
});
|
|
124
124
|
return contact;
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
function bulkTag(selector, tags) {
|
|
127
127
|
const {
|
|
128
128
|
scope,
|
|
129
129
|
query
|
|
@@ -136,7 +136,7 @@ function createClient(api) {
|
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
function bulkUntag(selector, tags) {
|
|
140
140
|
const {
|
|
141
141
|
query,
|
|
142
142
|
scope
|
|
@@ -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
|
};
|
|
@@ -117,7 +117,7 @@ export function createClient(api) {
|
|
|
117
117
|
});
|
|
118
118
|
return contact;
|
|
119
119
|
}
|
|
120
|
-
|
|
120
|
+
function bulkTag(selector, tags) {
|
|
121
121
|
const {
|
|
122
122
|
scope,
|
|
123
123
|
query
|
|
@@ -130,7 +130,7 @@ export function createClient(api) {
|
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
|
|
133
|
+
function bulkUntag(selector, tags) {
|
|
134
134
|
const {
|
|
135
135
|
query,
|
|
136
136
|
scope
|
|
@@ -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
|
};
|
|
@@ -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?: boolean | undefined;
|
|
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?: import("../../types").Culture.Code | undefined;
|
|
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 | undefined;
|
|
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,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 =
|
|
7
|
+
let TableId = exports.TableId = void 0;
|
|
8
|
+
(function (TableId) {
|
|
8
9
|
TableId["STANDARD"] = "standard";
|
|
9
10
|
TableId["AGENCY"] = "agency";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
})(LimitId || (exports.LimitId = LimitId = {}));
|
|
32
|
+
let AddOnId = exports.AddOnId = void 0;
|
|
33
|
+
(function (AddOnId) {
|
|
33
34
|
AddOnId["SITE"] = "site";
|
|
34
|
-
|
|
35
|
-
}({});
|
|
35
|
+
})(AddOnId || (exports.AddOnId = AddOnId = {}));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export let TableId
|
|
1
|
+
export let TableId;
|
|
2
|
+
(function (TableId) {
|
|
2
3
|
TableId["STANDARD"] = "standard";
|
|
3
4
|
TableId["AGENCY"] = "agency";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
})(LimitId || (LimitId = {}));
|
|
26
|
+
export let AddOnId;
|
|
27
|
+
(function (AddOnId) {
|
|
27
28
|
AddOnId["SITE"] = "site";
|
|
28
|
-
|
|
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[
|
|
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
|
};
|
|
@@ -14,110 +14,110 @@ type Exactly<Concrete, Abstract> = Concrete & Record<Exclude<keyof Concrete, key
|
|
|
14
14
|
type InferExtraFields<T> = T extends Required<IncludeOptions<infer I>> ? Pick<Story.ExtraFields, I> : unknown;
|
|
15
15
|
export type Client = ReturnType<typeof createClient>;
|
|
16
16
|
export declare function createClient(api: DeferredJobsApiClient): {
|
|
17
|
-
list: <Options extends ListOptions
|
|
18
|
-
search: <
|
|
17
|
+
list: <Options extends ListOptions<keyof Story.ExtraFields>>(options?: Exactly<Options, ListOptions<keyof Story.ExtraFields>> | undefined) => Promise<ListResponse<Story & InferExtraFields<Options>>>;
|
|
18
|
+
search: <Options_1 extends SearchOptions<keyof Story.ExtraFields>>(options?: Exactly<Options_1, SearchOptions<keyof Story.ExtraFields>> | undefined) => Promise<ListResponse<Story & InferExtraFields<Options_1>>>;
|
|
19
19
|
get: {
|
|
20
|
-
<
|
|
21
|
-
formats?: Formats;
|
|
22
|
-
}>(id: Story[
|
|
23
|
-
formats?: Formats;
|
|
24
|
-
}>): Promise<ExtendedStory & InferExtraFields<
|
|
25
|
-
<
|
|
26
|
-
formats?: Formats;
|
|
27
|
-
}>(ids: Story[
|
|
28
|
-
formats?: Formats;
|
|
29
|
-
}>): Promise<(ExtendedStory & InferExtraFields<
|
|
30
|
-
<
|
|
31
|
-
formats?: Formats;
|
|
32
|
-
}>(id: Story[
|
|
33
|
-
formats?: Formats;
|
|
34
|
-
}>): Promise<ExtendedStory & InferExtraFields<
|
|
35
|
-
<
|
|
36
|
-
formats?: Formats;
|
|
37
|
-
}>(ids: Story[
|
|
38
|
-
formats?: Formats;
|
|
39
|
-
}>): Promise<(ExtendedStory & InferExtraFields<
|
|
20
|
+
<Options_2 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
21
|
+
formats?: Formats | undefined;
|
|
22
|
+
}>(id: Story['uuid'], options?: Exactly<Options_2, IncludeOptions<keyof Story.ExtraFields> & {
|
|
23
|
+
formats?: Formats | undefined;
|
|
24
|
+
}> | undefined): Promise<ExtendedStory & InferExtraFields<Options_2>>;
|
|
25
|
+
<Options_3 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
26
|
+
formats?: Formats | undefined;
|
|
27
|
+
}>(ids: Story['uuid'][], options?: Exactly<Options_3, IncludeOptions<keyof Story.ExtraFields> & {
|
|
28
|
+
formats?: Formats | undefined;
|
|
29
|
+
}> | undefined): Promise<(ExtendedStory & InferExtraFields<Options_3>)[]>;
|
|
30
|
+
<Options_4 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
31
|
+
formats?: Formats | undefined;
|
|
32
|
+
}>(id: Story['id'] | Story['uuid'], options?: Exactly<Options_4, IncludeOptions<keyof Story.ExtraFields> & {
|
|
33
|
+
formats?: Formats | undefined;
|
|
34
|
+
}> | undefined): Promise<ExtendedStory & InferExtraFields<Options_4>>;
|
|
35
|
+
<Options_5 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
36
|
+
formats?: Formats | undefined;
|
|
37
|
+
}>(ids: Story['id'][], options?: Exactly<Options_5, IncludeOptions<keyof Story.ExtraFields> & {
|
|
38
|
+
formats?: Formats | undefined;
|
|
39
|
+
}> | undefined): Promise<(ExtendedStory & InferExtraFields<Options_5>)[]>;
|
|
40
40
|
};
|
|
41
|
-
getBySlug: <
|
|
42
|
-
formats?: Formats;
|
|
43
|
-
query?: Query;
|
|
44
|
-
}>(slug: Story[
|
|
45
|
-
formats?: Formats;
|
|
46
|
-
query?: Query;
|
|
47
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
48
|
-
create: <
|
|
49
|
-
formats?: Formats;
|
|
50
|
-
force?: boolean;
|
|
51
|
-
}>(payload: CreateRequest, options?: Exactly<
|
|
52
|
-
formats?: Formats;
|
|
53
|
-
force?: boolean;
|
|
54
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
55
|
-
duplicate: <
|
|
56
|
-
formats?: Formats;
|
|
57
|
-
}>(id: StoryId, options?: Exactly<
|
|
58
|
-
formats?: Formats;
|
|
59
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
60
|
-
translate: <
|
|
61
|
-
formats?: Formats;
|
|
62
|
-
}>(id: StoryId, payload?: TranslateRequest, options?: Exactly<
|
|
63
|
-
formats?: Formats;
|
|
64
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
65
|
-
move: <
|
|
66
|
-
formats?: Formats;
|
|
67
|
-
force?: boolean;
|
|
68
|
-
}>(id: StoryId, payload: MoveRequest, options?: Exactly<
|
|
69
|
-
formats?: Formats;
|
|
70
|
-
force?: boolean;
|
|
71
|
-
}>) => Promise<ChangeNewsroomSuccessResponse<ExtendedStory & InferExtraFields<
|
|
72
|
-
update: <
|
|
73
|
-
formats?: Formats;
|
|
74
|
-
force?: boolean;
|
|
75
|
-
}>(id: StoryId, payload: UpdateRequest, options?: Exactly<
|
|
76
|
-
formats?: Formats;
|
|
77
|
-
force?: boolean;
|
|
78
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
79
|
-
autosave: <
|
|
80
|
-
formats?: Formats;
|
|
81
|
-
}>(id: StoryId, payload: AutosaveRequest, options?: Exactly<
|
|
82
|
-
formats?: Formats;
|
|
83
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
84
|
-
revert: <
|
|
85
|
-
formats?: Formats;
|
|
86
|
-
}>(id: StoryId, payload?: RevertRequest, options?: Exactly<
|
|
87
|
-
formats?: Formats;
|
|
88
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
89
|
-
publish: <
|
|
90
|
-
formats?: Formats;
|
|
91
|
-
}>(id: StoryId, payload?: PublishRequest, options?: Exactly<
|
|
92
|
-
formats?: Formats;
|
|
93
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
94
|
-
unpublish: <
|
|
95
|
-
formats?: Formats;
|
|
96
|
-
}>(id: StoryId, payload?: UnpublishRequest, options?: Exactly<
|
|
97
|
-
formats?: Formats;
|
|
98
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
99
|
-
schedule: <
|
|
100
|
-
formats?: Formats;
|
|
101
|
-
}>(id: StoryId, payload?: ScheduleRequest, options?: Exactly<
|
|
102
|
-
formats?: Formats;
|
|
103
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
104
|
-
unschedule: <
|
|
105
|
-
formats?: Formats;
|
|
106
|
-
}>(id: StoryId, payload?: UnscheduleRequest, options?: Exactly<
|
|
107
|
-
formats?: Formats;
|
|
108
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
109
|
-
pin: <
|
|
110
|
-
formats?: Formats;
|
|
111
|
-
force?: boolean;
|
|
112
|
-
}>(id: StoryId, options?: Exactly<
|
|
113
|
-
formats?: Formats;
|
|
114
|
-
force?: boolean;
|
|
115
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
116
|
-
unpin: <
|
|
117
|
-
formats?: Formats;
|
|
118
|
-
}>(id: StoryId, options?: Exactly<
|
|
119
|
-
formats?: Formats;
|
|
120
|
-
}>) => Promise<ExtendedStory & InferExtraFields<
|
|
41
|
+
getBySlug: <Options_6 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
42
|
+
formats?: Formats | undefined;
|
|
43
|
+
query?: Query | undefined;
|
|
44
|
+
}>(slug: Story['slug'], options?: Exactly<Options_6, IncludeOptions<keyof Story.ExtraFields> & {
|
|
45
|
+
formats?: Formats | undefined;
|
|
46
|
+
query?: Query | undefined;
|
|
47
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_6>>;
|
|
48
|
+
create: <Options_7 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
49
|
+
formats?: Formats | undefined;
|
|
50
|
+
force?: boolean | undefined;
|
|
51
|
+
}>(payload: CreateRequest, options?: Exactly<Options_7, IncludeOptions<keyof Story.ExtraFields> & {
|
|
52
|
+
formats?: Formats | undefined;
|
|
53
|
+
force?: boolean | undefined;
|
|
54
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_7>>;
|
|
55
|
+
duplicate: <Options_8 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
56
|
+
formats?: Formats | undefined;
|
|
57
|
+
}>(id: StoryId, options?: Exactly<Options_8, IncludeOptions<keyof Story.ExtraFields> & {
|
|
58
|
+
formats?: Formats | undefined;
|
|
59
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_8>>;
|
|
60
|
+
translate: <Options_9 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
61
|
+
formats?: Formats | undefined;
|
|
62
|
+
}>(id: StoryId, payload?: TranslateRequest, options?: Exactly<Options_9, IncludeOptions<keyof Story.ExtraFields> & {
|
|
63
|
+
formats?: Formats | undefined;
|
|
64
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_9>>;
|
|
65
|
+
move: <Options_10 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
66
|
+
formats?: Formats | undefined;
|
|
67
|
+
force?: boolean | undefined;
|
|
68
|
+
}>(id: StoryId, payload: MoveRequest, options?: Exactly<Options_10, IncludeOptions<keyof Story.ExtraFields> & {
|
|
69
|
+
formats?: Formats | undefined;
|
|
70
|
+
force?: boolean | undefined;
|
|
71
|
+
}> | undefined) => Promise<ChangeNewsroomUnsafeResponse | ChangeNewsroomSuccessResponse<ExtendedStory & InferExtraFields<Options_10>>>;
|
|
72
|
+
update: <Options_11 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
73
|
+
formats?: Formats | undefined;
|
|
74
|
+
force?: boolean | undefined;
|
|
75
|
+
}>(id: StoryId, payload: UpdateRequest, options?: Exactly<Options_11, IncludeOptions<keyof Story.ExtraFields> & {
|
|
76
|
+
formats?: Formats | undefined;
|
|
77
|
+
force?: boolean | undefined;
|
|
78
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_11>>;
|
|
79
|
+
autosave: <Options_12 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
80
|
+
formats?: Formats | undefined;
|
|
81
|
+
}>(id: StoryId, payload: AutosaveRequest, options?: Exactly<Options_12, IncludeOptions<keyof Story.ExtraFields> & {
|
|
82
|
+
formats?: Formats | undefined;
|
|
83
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_12>>;
|
|
84
|
+
revert: <Options_13 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
85
|
+
formats?: Formats | undefined;
|
|
86
|
+
}>(id: StoryId, payload?: RevertRequest, options?: Exactly<Options_13, IncludeOptions<keyof Story.ExtraFields> & {
|
|
87
|
+
formats?: Formats | undefined;
|
|
88
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_13>>;
|
|
89
|
+
publish: <Options_14 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
90
|
+
formats?: Formats | undefined;
|
|
91
|
+
}>(id: StoryId, payload?: PublishRequest, options?: Exactly<Options_14, IncludeOptions<keyof Story.ExtraFields> & {
|
|
92
|
+
formats?: Formats | undefined;
|
|
93
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_14>>;
|
|
94
|
+
unpublish: <Options_15 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
95
|
+
formats?: Formats | undefined;
|
|
96
|
+
}>(id: StoryId, payload?: UnpublishRequest, options?: Exactly<Options_15, IncludeOptions<keyof Story.ExtraFields> & {
|
|
97
|
+
formats?: Formats | undefined;
|
|
98
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_15>>;
|
|
99
|
+
schedule: <Options_16 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
100
|
+
formats?: Formats | undefined;
|
|
101
|
+
}>(id: StoryId, payload?: ScheduleRequest, options?: Exactly<Options_16, IncludeOptions<keyof Story.ExtraFields> & {
|
|
102
|
+
formats?: Formats | undefined;
|
|
103
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_16>>;
|
|
104
|
+
unschedule: <Options_17 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
105
|
+
formats?: Formats | undefined;
|
|
106
|
+
}>(id: StoryId, payload?: UnscheduleRequest, options?: Exactly<Options_17, IncludeOptions<keyof Story.ExtraFields> & {
|
|
107
|
+
formats?: Formats | undefined;
|
|
108
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_17>>;
|
|
109
|
+
pin: <Options_18 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
110
|
+
formats?: Formats | undefined;
|
|
111
|
+
force?: boolean | undefined;
|
|
112
|
+
}>(id: StoryId, options?: Exactly<Options_18, IncludeOptions<keyof Story.ExtraFields> & {
|
|
113
|
+
formats?: Formats | undefined;
|
|
114
|
+
force?: boolean | undefined;
|
|
115
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_18>>;
|
|
116
|
+
unpin: <Options_19 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
117
|
+
formats?: Formats | undefined;
|
|
118
|
+
}>(id: StoryId, options?: Exactly<Options_19, IncludeOptions<keyof Story.ExtraFields> & {
|
|
119
|
+
formats?: Formats | undefined;
|
|
120
|
+
}> | undefined) => Promise<ExtendedStory & InferExtraFields<Options_19>>;
|
|
121
121
|
delete: (id: StoryId) => Promise<void>;
|
|
122
122
|
preview: (id: StoryId, options?: PreviewOptions) => Promise<PreviewResponse>;
|
|
123
123
|
};
|
|
@@ -254,8 +254,6 @@ export interface ChangeNewsroomUnsafeResponse {
|
|
|
254
254
|
message: string;
|
|
255
255
|
warnings: ChangeNewsroomWarning[];
|
|
256
256
|
}
|
|
257
|
-
declare const
|
|
258
|
-
declare const
|
|
259
|
-
export declare const ALL_EXTRA_FIELDS: (keyof typeof ALL_EXTRA_FIELDS_SHAPE)[];
|
|
260
|
-
export declare const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS: (keyof typeof EXTENDED_STORY_INCLUDED_EXTRA_FIELDS_SHAPE)[];
|
|
257
|
+
export declare const ALL_EXTRA_FIELDS: (keyof Story.ExtraFields)[];
|
|
258
|
+
export declare const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS: ("content" | "thumbnail_image" | "header_image" | "preview_image" | "social_image" | "social_text" | "tag_names" | "attached_gallery_content" | "referenced_entities")[];
|
|
261
259
|
export {};
|
|
@@ -7,7 +7,7 @@ export declare function createClient(api: DeferredJobsApiClient): {
|
|
|
7
7
|
subscribeToNewsroom: <Type extends Contact.Type>(newsroomId: NewsroomId, payload: SubscribeRequest<Type>) => Promise<EmailSubscription>;
|
|
8
8
|
unsubscribeFromNewsroom: (newsroomId: NewsroomId, payload: UnsubscribeRequest) => Promise<EmailSubscription>;
|
|
9
9
|
unsubscribeFromLicense: (payload: UnsubscribeRequest) => Promise<EmailSubscription>;
|
|
10
|
-
updateNewsroomUnsubscribeDetails: (newsroomId: NewsroomId, subscriptionId: EmailSubscription[
|
|
11
|
-
updateLicenseUnsubscribeDetails: (subscriptionId: EmailSubscription[
|
|
10
|
+
updateNewsroomUnsubscribeDetails: (newsroomId: NewsroomId, subscriptionId: EmailSubscription['id'], payload: UpdateUnsubscribeDetailsRequest) => Promise<EmailSubscription>;
|
|
11
|
+
updateLicenseUnsubscribeDetails: (subscriptionId: EmailSubscription['id'], payload: UpdateUnsubscribeDetailsRequest) => Promise<EmailSubscription>;
|
|
12
12
|
};
|
|
13
13
|
export {};
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.UnsubscribeReason = void 0;
|
|
7
|
-
let UnsubscribeReason = exports.UnsubscribeReason =
|
|
7
|
+
let UnsubscribeReason = exports.UnsubscribeReason = void 0;
|
|
8
|
+
(function (UnsubscribeReason) {
|
|
8
9
|
UnsubscribeReason["UNKNOWN"] = "unknown";
|
|
9
10
|
UnsubscribeReason["UNWANTED"] = "unwanted";
|
|
10
11
|
UnsubscribeReason["SPAM"] = "spam";
|
|
11
12
|
UnsubscribeReason["NEVER_SIGNED_UP"] = "never_signed_up";
|
|
12
13
|
UnsubscribeReason["OTHER"] = "other";
|
|
13
|
-
|
|
14
|
-
}({});
|
|
14
|
+
})(UnsubscribeReason || (exports.UnsubscribeReason = UnsubscribeReason = {}));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export let UnsubscribeReason
|
|
1
|
+
export let UnsubscribeReason;
|
|
2
|
+
(function (UnsubscribeReason) {
|
|
2
3
|
UnsubscribeReason["UNKNOWN"] = "unknown";
|
|
3
4
|
UnsubscribeReason["UNWANTED"] = "unwanted";
|
|
4
5
|
UnsubscribeReason["SPAM"] = "spam";
|
|
5
6
|
UnsubscribeReason["NEVER_SIGNED_UP"] = "never_signed_up";
|
|
6
7
|
UnsubscribeReason["OTHER"] = "other";
|
|
7
|
-
|
|
8
|
-
}({});
|
|
8
|
+
})(UnsubscribeReason || (UnsubscribeReason = {}));
|
package/dist/endpoints/index.cjs
CHANGED
|
@@ -63,4 +63,4 @@ exports.Subscriptions = _Subscriptions;
|
|
|
63
63
|
var _NotificationSubscriptions = _interopRequireWildcard(require("./NotificationSubscriptions/index.cjs"));
|
|
64
64
|
exports.NotificationSubscriptions = _NotificationSubscriptions;
|
|
65
65
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
66
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
66
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|