@prezly/sdk 9.0.2 → 10.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/api/constants.js +1 -1
- package/dist/endpoints/CampaignRecipients/scopes.d.ts +15 -6
- package/dist/endpoints/CampaignRecipients/scopes.js +12 -1
- package/dist/types/Campaign.d.ts +10 -0
- package/dist/types/Campaign.js +28 -0
- package/dist/types/Category.d.ts +2 -2
- package/dist/types/Contact.d.ts +4 -4
- package/dist/types/Country.d.ts +3 -0
- package/dist/types/CoverageEntry.d.ts +1 -2
- package/dist/types/Culture.d.ts +1 -0
- package/dist/types/Currency.d.ts +5 -0
- package/dist/types/Currency.js +6 -0
- package/dist/types/EmailRecipient.d.ts +10 -7
- package/dist/types/License.d.ts +84 -0
- package/dist/types/License.js +10 -0
- package/dist/types/NewsroomDomain.d.ts +12 -2
- package/dist/types/NewsroomDomain.js +16 -1
- package/dist/types/NewsroomTheme.d.ts +1 -1
- package/dist/types/Plan.d.ts +10 -0
- package/dist/types/Plan.js +11 -0
- package/dist/types/SenderAddress.d.ts +1 -0
- package/dist/types/SenderDomain.d.ts +12 -2
- package/dist/types/SenderDomain.js +1 -0
- package/dist/types/Story.d.ts +11 -2
- package/dist/types/Story.js +35 -0
- package/dist/types/User.d.ts +22 -2
- package/dist/types/User.js +21 -1
- package/dist/types/UserAccount.d.ts +2 -0
- package/dist/types/common/Notification.d.ts +2 -2
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.js +3 -2
- package/package.json +1 -1
- package/dist/types/Entity.d.ts +0 -3
- package/dist/types/Entity.js +0 -1
package/dist/api/constants.js
CHANGED
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
import type { Campaign, Contact, EmailRecipient, SelectionValue } from '../../types';
|
|
2
2
|
export interface AllContactsScope {
|
|
3
|
-
type:
|
|
3
|
+
type: ContactsScope.Type.ALL_CONTACTS;
|
|
4
4
|
selection?: SelectionValue<Contact['id']>;
|
|
5
5
|
}
|
|
6
6
|
export interface ContactOrganisationsScope {
|
|
7
|
-
type:
|
|
7
|
+
type: ContactsScope.Type.CONTACT_ORGANISATIONS;
|
|
8
8
|
contact_id: Contact['id'];
|
|
9
9
|
selection?: SelectionValue<Contact['id']>;
|
|
10
10
|
}
|
|
11
11
|
export interface ContactEmployeesScope {
|
|
12
|
-
type:
|
|
12
|
+
type: ContactsScope.Type.CONTACT_EMPLOYEES;
|
|
13
13
|
contact_id: Contact['id'];
|
|
14
14
|
selection?: SelectionValue<Contact['id']>;
|
|
15
15
|
}
|
|
16
16
|
export interface CampaignRecipientsScope {
|
|
17
|
-
type:
|
|
17
|
+
type: ContactsScope.Type.CAMPAIGN_RECIPIENTS;
|
|
18
18
|
campaign_id: Campaign['id'];
|
|
19
19
|
selection?: SelectionValue<EmailRecipient['id']>;
|
|
20
20
|
}
|
|
21
21
|
export interface CampaignReportScope {
|
|
22
|
-
type:
|
|
22
|
+
type: ContactsScope.Type.CAMPAIGN_REPORT;
|
|
23
23
|
campaign_id: Campaign['id'];
|
|
24
24
|
report: 'recipients' | 'sent' | 'clicked' | 'opened' | 'unopened' | 'undelivered' | 'unsubscribed';
|
|
25
|
-
selection?: SelectionValue<
|
|
25
|
+
selection?: SelectionValue<EmailRecipient['id']>;
|
|
26
26
|
}
|
|
27
27
|
export declare type ContactsScope = AllContactsScope | ContactOrganisationsScope | ContactEmployeesScope | CampaignRecipientsScope | CampaignReportScope;
|
|
28
|
+
export declare namespace ContactsScope {
|
|
29
|
+
enum Type {
|
|
30
|
+
ALL_CONTACTS = "scope:contacts",
|
|
31
|
+
CONTACT_EMPLOYEES = "scope:contact_employees",
|
|
32
|
+
CONTACT_ORGANISATIONS = "scope:contact_organisations",
|
|
33
|
+
CAMPAIGN_RECIPIENTS = "scope:campaign_recipients",
|
|
34
|
+
CAMPAIGN_REPORT = "scope:campaign_report"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export let ContactsScope;
|
|
2
|
+
(function (_ContactsScope) {
|
|
3
|
+
let Type;
|
|
4
|
+
(function (Type) {
|
|
5
|
+
Type["ALL_CONTACTS"] = "scope:contacts";
|
|
6
|
+
Type["CONTACT_EMPLOYEES"] = "scope:contact_employees";
|
|
7
|
+
Type["CONTACT_ORGANISATIONS"] = "scope:contact_organisations";
|
|
8
|
+
Type["CAMPAIGN_RECIPIENTS"] = "scope:campaign_recipients";
|
|
9
|
+
Type["CAMPAIGN_REPORT"] = "scope:campaign_report";
|
|
10
|
+
})(Type || (Type = {}));
|
|
11
|
+
_ContactsScope.Type = Type;
|
|
12
|
+
})(ContactsScope || (ContactsScope = {}));
|
package/dist/types/Campaign.d.ts
CHANGED
|
@@ -32,8 +32,10 @@ export interface Campaign {
|
|
|
32
32
|
clicks: number;
|
|
33
33
|
clicks_rate: number;
|
|
34
34
|
delivered: number;
|
|
35
|
+
delivering: number;
|
|
35
36
|
opens: number;
|
|
36
37
|
opens_rate: number;
|
|
38
|
+
skipped: number;
|
|
37
39
|
undelivered_rate: number;
|
|
38
40
|
unsubscribes: number;
|
|
39
41
|
unsubscribes_rate: number;
|
|
@@ -63,4 +65,12 @@ export declare namespace Campaign {
|
|
|
63
65
|
INVALID = "invalid",
|
|
64
66
|
NOT_APPLICABLE = "not-applicable"
|
|
65
67
|
}
|
|
68
|
+
function isDraft(status: LifecycleStatus): boolean;
|
|
69
|
+
function isDraft(campaign: Pick<Campaign, 'lifecycle_status'>): boolean;
|
|
70
|
+
function isScheduled(status: LifecycleStatus): boolean;
|
|
71
|
+
function isScheduled(campaign: Pick<Campaign, 'lifecycle_status'>): boolean;
|
|
72
|
+
function isPending(status: LifecycleStatus): boolean;
|
|
73
|
+
function isPending(campaign: Pick<Campaign, 'lifecycle_status'>): boolean;
|
|
74
|
+
function isSent(status: LifecycleStatus): boolean;
|
|
75
|
+
function isSent(campaign: Pick<Campaign, 'lifecycle_status'>): boolean;
|
|
66
76
|
}
|
package/dist/types/Campaign.js
CHANGED
|
@@ -31,4 +31,32 @@ export let Campaign;
|
|
|
31
31
|
SenderDomainVerificationStatus["NOT_APPLICABLE"] = "not-applicable";
|
|
32
32
|
})(SenderDomainVerificationStatus || (SenderDomainVerificationStatus = {}));
|
|
33
33
|
_Campaign.SenderDomainVerificationStatus = SenderDomainVerificationStatus;
|
|
34
|
+
function isDraft(arg) {
|
|
35
|
+
if (typeof arg === 'object') {
|
|
36
|
+
return isDraft(arg.lifecycle_status);
|
|
37
|
+
}
|
|
38
|
+
return arg === LifecycleStatus.DRAFT;
|
|
39
|
+
}
|
|
40
|
+
_Campaign.isDraft = isDraft;
|
|
41
|
+
function isScheduled(arg) {
|
|
42
|
+
if (typeof arg === 'object') {
|
|
43
|
+
return isScheduled(arg.lifecycle_status);
|
|
44
|
+
}
|
|
45
|
+
return arg === LifecycleStatus.SCHEDULED;
|
|
46
|
+
}
|
|
47
|
+
_Campaign.isScheduled = isScheduled;
|
|
48
|
+
function isPending(arg) {
|
|
49
|
+
if (typeof arg === 'object') {
|
|
50
|
+
return isPending(arg.lifecycle_status);
|
|
51
|
+
}
|
|
52
|
+
return arg === LifecycleStatus.PENDING;
|
|
53
|
+
}
|
|
54
|
+
_Campaign.isPending = isPending;
|
|
55
|
+
function isSent(arg) {
|
|
56
|
+
if (typeof arg === 'object') {
|
|
57
|
+
return isSent(arg.lifecycle_status);
|
|
58
|
+
}
|
|
59
|
+
return arg === LifecycleStatus.SENT;
|
|
60
|
+
}
|
|
61
|
+
_Campaign.isSent = isSent;
|
|
34
62
|
})(Campaign || (Campaign = {}));
|
package/dist/types/Category.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { CultureRef } from './Culture';
|
|
2
2
|
export interface Category {
|
|
3
|
-
|
|
3
|
+
id: number;
|
|
4
4
|
display_name: string;
|
|
5
|
+
display_description: string | null;
|
|
5
6
|
i18n: {
|
|
6
7
|
[localeCode: string]: {
|
|
7
8
|
description: string | null;
|
|
@@ -10,6 +11,5 @@ export interface Category {
|
|
|
10
11
|
slug: string | null;
|
|
11
12
|
};
|
|
12
13
|
};
|
|
13
|
-
id: number;
|
|
14
14
|
stories_number: number;
|
|
15
15
|
}
|
package/dist/types/Contact.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { UploadedImage } from '@prezly/uploads';
|
|
2
2
|
import type { ContactDuplicateSuggestion } from './ContactDuplicateSuggestion';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
contact_type:
|
|
3
|
+
export interface ContactRef {
|
|
4
|
+
id: number;
|
|
5
|
+
contact_type: Contact.Type;
|
|
6
6
|
display_name: string;
|
|
7
7
|
function_name: string | null;
|
|
8
8
|
avatar_url: string;
|
|
@@ -12,7 +12,7 @@ export interface ContactRef extends Entity {
|
|
|
12
12
|
view: string | null;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
export interface Contact
|
|
15
|
+
export interface Contact {
|
|
16
16
|
id: number;
|
|
17
17
|
contact_type: Contact.Type;
|
|
18
18
|
is_deleted: boolean;
|
package/dist/types/Country.d.ts
CHANGED
|
@@ -3,11 +3,10 @@ import type { OEmbedInfo } from './common';
|
|
|
3
3
|
import type { Contact } from './Contact';
|
|
4
4
|
import type { CountryRef } from './Country';
|
|
5
5
|
import type { CultureRef } from './Culture';
|
|
6
|
-
import type { Entity } from './Entity';
|
|
7
6
|
import type { NewsroomRef } from './Newsroom';
|
|
8
7
|
import type { Story } from './Story';
|
|
9
8
|
import type { UserRef } from './User';
|
|
10
|
-
export interface CoverageEntry
|
|
9
|
+
export interface CoverageEntry {
|
|
11
10
|
uuid: string;
|
|
12
11
|
/**
|
|
13
12
|
* @deprecated Please use `uuid` as identifier.
|
package/dist/types/Culture.d.ts
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import type { Contact } from './Contact';
|
|
2
|
-
export interface
|
|
1
|
+
import type { Contact, ContactRef } from './Contact';
|
|
2
|
+
export interface EmailRecipientRef {
|
|
3
3
|
/**
|
|
4
4
|
* Unique alphanumerical identifier for the recipient.
|
|
5
5
|
*/
|
|
6
6
|
id: string;
|
|
7
7
|
display_name: string;
|
|
8
8
|
avatar_url: string;
|
|
9
|
-
contact:
|
|
9
|
+
contact: ContactRef;
|
|
10
10
|
/**
|
|
11
11
|
* Email address the email will be sent to. One of the contact email addresses.
|
|
12
12
|
*/
|
|
13
13
|
email_address: string;
|
|
14
|
-
/**
|
|
15
|
-
* List of all contact email addresses with their statuses in context of the current campaign.
|
|
16
|
-
*/
|
|
17
|
-
email_addresses: EmailRecipient.EmailAddressRecord[];
|
|
18
14
|
/**
|
|
19
15
|
* The current recipient email address is unsubscribed from the current campaign newsroom.
|
|
20
16
|
*/
|
|
@@ -24,6 +20,13 @@ export interface EmailRecipient {
|
|
|
24
20
|
*/
|
|
25
21
|
is_unsubscribed_from_all_communications: boolean;
|
|
26
22
|
}
|
|
23
|
+
export interface EmailRecipient extends EmailRecipientRef {
|
|
24
|
+
contact: Contact;
|
|
25
|
+
/**
|
|
26
|
+
* List of all contact email addresses with their statuses in context of the current campaign.
|
|
27
|
+
*/
|
|
28
|
+
email_addresses: EmailRecipient.EmailAddressRecord[];
|
|
29
|
+
}
|
|
27
30
|
export declare namespace EmailRecipient {
|
|
28
31
|
enum EmailAddressStatus {
|
|
29
32
|
OK = "ok",
|
package/dist/types/License.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Currency } from './Currency';
|
|
2
|
+
import type { PlanLevel } from './Plan';
|
|
1
3
|
export interface LicenseRef {
|
|
2
4
|
id: number;
|
|
3
5
|
display_name: string;
|
|
@@ -8,15 +10,97 @@ export interface LicenseRef {
|
|
|
8
10
|
status: License.Status;
|
|
9
11
|
}
|
|
10
12
|
export interface License extends LicenseRef {
|
|
13
|
+
billing_company_name: string;
|
|
14
|
+
billing_contact: string;
|
|
15
|
+
billing_contact_email: string;
|
|
16
|
+
/**
|
|
17
|
+
* Billing cycle in months. (e.g. 1, 3, 6, 12, 24 or 36)
|
|
18
|
+
* If billing cycle info is not manually set
|
|
19
|
+
* it will be null (no data about billing cycle).
|
|
20
|
+
*/
|
|
21
|
+
billing_cycle: number | null;
|
|
22
|
+
/**
|
|
23
|
+
* Date when subscription will be automatically canceled.
|
|
24
|
+
*/
|
|
25
|
+
cancel_at: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* Date when subscription cancellation was requested.
|
|
28
|
+
*/
|
|
29
|
+
canceled_at: string | null;
|
|
30
|
+
company_address: string;
|
|
31
|
+
company_address_city: string;
|
|
32
|
+
company_address_country: string;
|
|
33
|
+
company_address_zip: string;
|
|
11
34
|
created_at: string;
|
|
35
|
+
/**
|
|
36
|
+
* When there are no subscriptions yet, the currency is null (we do not set a default value).
|
|
37
|
+
*/
|
|
38
|
+
currency: Currency | null;
|
|
39
|
+
/**
|
|
40
|
+
* Date when current subscription period/cycle will end.
|
|
41
|
+
* At the end of this period, a new invoice will be created.
|
|
42
|
+
*/
|
|
43
|
+
current_period_end: string | null;
|
|
44
|
+
display_name: string;
|
|
45
|
+
id: number;
|
|
46
|
+
is_locked: boolean;
|
|
47
|
+
is_operable: boolean;
|
|
48
|
+
is_sso_required: boolean;
|
|
49
|
+
avatar_url: string;
|
|
50
|
+
/**
|
|
51
|
+
* Limit of newsrooms included in current plan.
|
|
52
|
+
*/
|
|
53
|
+
newsrooms_limit: number;
|
|
54
|
+
number_of_active_newsrooms: number;
|
|
55
|
+
/**
|
|
56
|
+
* Plan level will be null in case
|
|
57
|
+
* we do not have data about plan level.
|
|
58
|
+
*/
|
|
59
|
+
plan_level: PlanLevel | null;
|
|
60
|
+
status: License.Status;
|
|
61
|
+
subscription_lockout: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Tax rate percent as a full number. (e.g. 21)
|
|
64
|
+
*/
|
|
65
|
+
tax_rate_percent: number;
|
|
66
|
+
/**
|
|
67
|
+
* Total price *after* applying the discounts in cents.
|
|
68
|
+
*/
|
|
69
|
+
total_after_discount: number | null;
|
|
70
|
+
/**
|
|
71
|
+
* Total price *before* applying the discounts in cents.
|
|
72
|
+
*/
|
|
73
|
+
total_before_discount: number | null;
|
|
74
|
+
total_seats: number;
|
|
75
|
+
type: License.Type;
|
|
76
|
+
vat_nr: string;
|
|
77
|
+
/**
|
|
78
|
+
* A combination of a number and the interval type ("day", "week", "month", "year"), separated by "/".
|
|
79
|
+
*
|
|
80
|
+
* Examples:
|
|
81
|
+
* - "100/day"
|
|
82
|
+
* - "5000/week"
|
|
83
|
+
* - "100000/month"
|
|
84
|
+
* - "2000000/year"
|
|
85
|
+
*/
|
|
86
|
+
send_emails_limit: string;
|
|
87
|
+
sent_emails_in_period: number;
|
|
12
88
|
}
|
|
13
89
|
export declare namespace License {
|
|
90
|
+
enum Type {
|
|
91
|
+
FAVOUR = "favour",
|
|
92
|
+
FREE = "free",
|
|
93
|
+
PAID_AUTO = "paid_auto",
|
|
94
|
+
PAID_MANUAL = "paid_manual",
|
|
95
|
+
TRIAL = "trial"
|
|
96
|
+
}
|
|
14
97
|
enum Status {
|
|
15
98
|
TRIAL = "trial",
|
|
16
99
|
ACTIVE = "active",
|
|
17
100
|
PAST_DUE = "past_due",
|
|
18
101
|
PAYMENT_COLLECTION_PAUSED = "payment_collection_paused",
|
|
19
102
|
INACTIVE = "inactive",
|
|
103
|
+
INCOMPLETE = "incomplete",
|
|
20
104
|
CANCELED = "canceled",
|
|
21
105
|
UNPAID = "unpaid"
|
|
22
106
|
}
|
package/dist/types/License.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
export let License;
|
|
2
2
|
(function (_License) {
|
|
3
|
+
let Type;
|
|
4
|
+
(function (Type) {
|
|
5
|
+
Type["FAVOUR"] = "favour";
|
|
6
|
+
Type["FREE"] = "free";
|
|
7
|
+
Type["PAID_AUTO"] = "paid_auto";
|
|
8
|
+
Type["PAID_MANUAL"] = "paid_manual";
|
|
9
|
+
Type["TRIAL"] = "trial";
|
|
10
|
+
})(Type || (Type = {}));
|
|
11
|
+
_License.Type = Type;
|
|
3
12
|
let Status;
|
|
4
13
|
(function (Status) {
|
|
5
14
|
Status["TRIAL"] = "trial";
|
|
@@ -7,6 +16,7 @@ export let License;
|
|
|
7
16
|
Status["PAST_DUE"] = "past_due";
|
|
8
17
|
Status["PAYMENT_COLLECTION_PAUSED"] = "payment_collection_paused";
|
|
9
18
|
Status["INACTIVE"] = "inactive";
|
|
19
|
+
Status["INCOMPLETE"] = "incomplete";
|
|
10
20
|
Status["CANCELED"] = "canceled";
|
|
11
21
|
Status["UNPAID"] = "unpaid";
|
|
12
22
|
})(Status || (Status = {}));
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import type { DnsConfigurationInstruction } from './DnsConfigurationInstruction';
|
|
2
2
|
export interface NewsroomDomain {
|
|
3
3
|
domain_name: string;
|
|
4
|
-
type:
|
|
5
|
-
status:
|
|
4
|
+
type: NewsroomDomain.Type;
|
|
5
|
+
status: NewsroomDomain.Status;
|
|
6
6
|
instructions: DnsConfigurationInstruction[];
|
|
7
7
|
}
|
|
8
8
|
export declare namespace NewsroomDomain {
|
|
9
|
+
enum Type {
|
|
10
|
+
PREZLY = "prezly",
|
|
11
|
+
CUSTOM = "custom",
|
|
12
|
+
REVERSE_PROXY = "reverse_proxy"
|
|
13
|
+
}
|
|
14
|
+
enum Status {
|
|
15
|
+
ACTIVE = "active",
|
|
16
|
+
INACTIVE = "inactive",
|
|
17
|
+
REDIRECT = "redirect"
|
|
18
|
+
}
|
|
9
19
|
interface ShareInstructions {
|
|
10
20
|
url: string;
|
|
11
21
|
expires_at: string;
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
export let NewsroomDomain;
|
|
2
|
-
(function (_NewsroomDomain) {
|
|
2
|
+
(function (_NewsroomDomain) {
|
|
3
|
+
let Type;
|
|
4
|
+
(function (Type) {
|
|
5
|
+
Type["PREZLY"] = "prezly";
|
|
6
|
+
Type["CUSTOM"] = "custom";
|
|
7
|
+
Type["REVERSE_PROXY"] = "reverse_proxy";
|
|
8
|
+
})(Type || (Type = {}));
|
|
9
|
+
_NewsroomDomain.Type = Type;
|
|
10
|
+
let Status;
|
|
11
|
+
(function (Status) {
|
|
12
|
+
Status["ACTIVE"] = "active";
|
|
13
|
+
Status["INACTIVE"] = "inactive";
|
|
14
|
+
Status["REDIRECT"] = "redirect";
|
|
15
|
+
})(Status || (Status = {}));
|
|
16
|
+
_NewsroomDomain.Status = Status;
|
|
17
|
+
})(NewsroomDomain || (NewsroomDomain = {}));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { UploadedImage } from '@prezly/uploads';
|
|
2
2
|
import type { Newsroom } from './Newsroom';
|
|
3
3
|
export interface NewsroomTheme {
|
|
4
|
+
id: string;
|
|
4
5
|
codename: string;
|
|
5
6
|
description: string;
|
|
6
7
|
use_case: string | null;
|
|
7
8
|
features: NewsroomTheme.Feature[];
|
|
8
|
-
id: string;
|
|
9
9
|
is_custom: boolean;
|
|
10
10
|
is_legacy: boolean;
|
|
11
11
|
name: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export let PlanLevel;
|
|
2
|
+
(function (PlanLevel) {
|
|
3
|
+
PlanLevel["BASIC"] = "basic";
|
|
4
|
+
PlanLevel["CORE"] = "core";
|
|
5
|
+
PlanLevel["ENTERPRISE"] = "enterprise";
|
|
6
|
+
PlanLevel["EXPERT"] = "expert";
|
|
7
|
+
PlanLevel["NONE"] = "";
|
|
8
|
+
PlanLevel["PREMIUM"] = "premium";
|
|
9
|
+
PlanLevel["PROFESSIONAL"] = "professional";
|
|
10
|
+
PlanLevel["STARTER"] = "starter";
|
|
11
|
+
})(PlanLevel || (PlanLevel = {}));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DnsConfigurationInstruction } from './DnsConfigurationInstruction';
|
|
1
2
|
export interface SenderDomain {
|
|
2
3
|
domain_name: string;
|
|
3
4
|
/**
|
|
@@ -22,12 +23,21 @@ export interface SenderDomain {
|
|
|
22
23
|
* There were different verification setups we've been using over the years.
|
|
23
24
|
* The latest one, which is also the best so far, is `v3`.
|
|
24
25
|
*/
|
|
25
|
-
verification_flow_version: SenderDomain.VerificationFlowVersion;
|
|
26
|
+
verification_flow_version: SenderDomain.VerificationFlowVersion | null;
|
|
27
|
+
/**
|
|
28
|
+
* Expirable URL linking to the domain-specific instructions page users can share with their IT departments.
|
|
29
|
+
*/
|
|
30
|
+
shareable_dns_instructions_url: string | null;
|
|
26
31
|
}
|
|
27
32
|
export declare namespace SenderDomain {
|
|
28
33
|
enum VerificationFlowVersion {
|
|
29
34
|
V1 = "v1",
|
|
30
35
|
V2 = "v2",
|
|
31
|
-
V3 = "v3"
|
|
36
|
+
V3 = "v3",
|
|
37
|
+
PREZLYMAIL = "prezlymail"
|
|
38
|
+
}
|
|
39
|
+
interface Configuration {
|
|
40
|
+
domain: SenderDomain;
|
|
41
|
+
dns: Record<VerificationFlowVersion, DnsConfigurationInstruction[]>;
|
|
32
42
|
}
|
|
33
43
|
}
|
|
@@ -5,6 +5,7 @@ export let SenderDomain;
|
|
|
5
5
|
VerificationFlowVersion["V1"] = "v1";
|
|
6
6
|
VerificationFlowVersion["V2"] = "v2";
|
|
7
7
|
VerificationFlowVersion["V3"] = "v3";
|
|
8
|
+
VerificationFlowVersion["PREZLYMAIL"] = "prezlymail";
|
|
8
9
|
})(VerificationFlowVersion || (VerificationFlowVersion = {}));
|
|
9
10
|
_SenderDomain.VerificationFlowVersion = VerificationFlowVersion;
|
|
10
11
|
})(SenderDomain || (SenderDomain = {}));
|
package/dist/types/Story.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Category } from './Category';
|
|
2
2
|
import type { OEmbedInfo } from './common';
|
|
3
3
|
import type { CultureRef } from './Culture';
|
|
4
|
-
import type { Entity } from './Entity';
|
|
5
4
|
import type { NewsroomRef } from './Newsroom';
|
|
6
5
|
import type { UserRef } from './User';
|
|
7
6
|
export interface StoryRef {
|
|
@@ -31,7 +30,7 @@ export interface StoryRef {
|
|
|
31
30
|
report: string;
|
|
32
31
|
};
|
|
33
32
|
}
|
|
34
|
-
export interface Story
|
|
33
|
+
export interface Story {
|
|
35
34
|
uuid: string;
|
|
36
35
|
/**
|
|
37
36
|
* @deprecated Please use `uuid` as an identifier instead.
|
|
@@ -143,6 +142,16 @@ export declare namespace Story {
|
|
|
143
142
|
stories: Record<string, OEmbedInfo>;
|
|
144
143
|
};
|
|
145
144
|
}
|
|
145
|
+
function isUninitialized(status: LifecycleStatus): boolean;
|
|
146
|
+
function isUninitialized(story: Pick<Story, 'lifecycle_status'>): boolean;
|
|
147
|
+
function isDraft(status: LifecycleStatus): boolean;
|
|
148
|
+
function isDraft(story: Pick<Story, 'lifecycle_status'>): boolean;
|
|
149
|
+
function isScheduled(status: LifecycleStatus): boolean;
|
|
150
|
+
function isScheduled(story: Pick<Story, 'lifecycle_status'>): boolean;
|
|
151
|
+
function isScheduledEmbargo(status: LifecycleStatus): boolean;
|
|
152
|
+
function isScheduledEmbargo(story: Pick<Story, 'lifecycle_status'>): boolean;
|
|
153
|
+
function isPublished(status: LifecycleStatus): boolean;
|
|
154
|
+
function isPublished(story: Pick<Story, 'lifecycle_status'>): boolean;
|
|
146
155
|
}
|
|
147
156
|
export interface ExtendedStory extends Story, Story.ExtraFields {
|
|
148
157
|
}
|
package/dist/types/Story.js
CHANGED
|
@@ -30,4 +30,39 @@ export let Story;
|
|
|
30
30
|
Visibility["CONFIDENTIAL"] = "confidential";
|
|
31
31
|
})(Visibility || (Visibility = {}));
|
|
32
32
|
_Story.Visibility = Visibility;
|
|
33
|
+
function isUninitialized(arg) {
|
|
34
|
+
if (typeof arg === 'object') {
|
|
35
|
+
return isUninitialized(arg.lifecycle_status);
|
|
36
|
+
}
|
|
37
|
+
return arg === LifecycleStatus.UNINITIALIZED;
|
|
38
|
+
}
|
|
39
|
+
_Story.isUninitialized = isUninitialized;
|
|
40
|
+
function isDraft(arg) {
|
|
41
|
+
if (typeof arg === 'object') {
|
|
42
|
+
return isDraft(arg.lifecycle_status);
|
|
43
|
+
}
|
|
44
|
+
return arg === LifecycleStatus.DRAFT;
|
|
45
|
+
}
|
|
46
|
+
_Story.isDraft = isDraft;
|
|
47
|
+
function isScheduled(arg) {
|
|
48
|
+
if (typeof arg === 'object') {
|
|
49
|
+
return isScheduled(arg.lifecycle_status);
|
|
50
|
+
}
|
|
51
|
+
return arg === LifecycleStatus.SCHEDULED;
|
|
52
|
+
}
|
|
53
|
+
_Story.isScheduled = isScheduled;
|
|
54
|
+
function isScheduledEmbargo(arg) {
|
|
55
|
+
if (typeof arg === 'object') {
|
|
56
|
+
return isScheduledEmbargo(arg.lifecycle_status);
|
|
57
|
+
}
|
|
58
|
+
return arg === LifecycleStatus.EMBARGO;
|
|
59
|
+
}
|
|
60
|
+
_Story.isScheduledEmbargo = isScheduledEmbargo;
|
|
61
|
+
function isPublished(arg) {
|
|
62
|
+
if (typeof arg === 'object') {
|
|
63
|
+
return isPublished(arg.lifecycle_status);
|
|
64
|
+
}
|
|
65
|
+
return arg === LifecycleStatus.PUBLISHED;
|
|
66
|
+
}
|
|
67
|
+
_Story.isPublished = isPublished;
|
|
33
68
|
})(Story || (Story = {}));
|
package/dist/types/User.d.ts
CHANGED
|
@@ -11,8 +11,28 @@ export interface UserRef {
|
|
|
11
11
|
first_name: string;
|
|
12
12
|
last_name: string;
|
|
13
13
|
is_terms_of_service_accepted: boolean;
|
|
14
|
-
sign_in_flow:
|
|
15
|
-
use_case_answer:
|
|
14
|
+
sign_in_flow: User.SignInFlow;
|
|
15
|
+
use_case_answer: User.UseCaseAnswer | null;
|
|
16
16
|
created_at: string;
|
|
17
|
+
/**
|
|
18
|
+
* Last time the user was active.
|
|
19
|
+
*/
|
|
17
20
|
last_seen_at: string | null;
|
|
21
|
+
locked_until: string | null;
|
|
22
|
+
}
|
|
23
|
+
export declare namespace User {
|
|
24
|
+
enum SignInFlow {
|
|
25
|
+
GOOGLE = "google",
|
|
26
|
+
PASSWORD = "password",
|
|
27
|
+
SSO = "sso"
|
|
28
|
+
}
|
|
29
|
+
enum UseCaseAnswer {
|
|
30
|
+
UNKNOWN = "unknown",
|
|
31
|
+
CAMPAIGNS = "campaigns",
|
|
32
|
+
CONTACTS = "contacts",
|
|
33
|
+
STORIES = "stories",
|
|
34
|
+
NEWSROOM = "newsroom",
|
|
35
|
+
COVERAGE = "coverage",
|
|
36
|
+
SKIP = "skip"
|
|
37
|
+
}
|
|
18
38
|
}
|
package/dist/types/User.js
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
export
|
|
1
|
+
export let User;
|
|
2
|
+
(function (_User) {
|
|
3
|
+
let SignInFlow;
|
|
4
|
+
(function (SignInFlow) {
|
|
5
|
+
SignInFlow["GOOGLE"] = "google";
|
|
6
|
+
SignInFlow["PASSWORD"] = "password";
|
|
7
|
+
SignInFlow["SSO"] = "sso";
|
|
8
|
+
})(SignInFlow || (SignInFlow = {}));
|
|
9
|
+
_User.SignInFlow = SignInFlow;
|
|
10
|
+
let UseCaseAnswer;
|
|
11
|
+
(function (UseCaseAnswer) {
|
|
12
|
+
UseCaseAnswer["UNKNOWN"] = "unknown";
|
|
13
|
+
UseCaseAnswer["CAMPAIGNS"] = "campaigns";
|
|
14
|
+
UseCaseAnswer["CONTACTS"] = "contacts";
|
|
15
|
+
UseCaseAnswer["STORIES"] = "stories";
|
|
16
|
+
UseCaseAnswer["NEWSROOM"] = "newsroom";
|
|
17
|
+
UseCaseAnswer["COVERAGE"] = "coverage";
|
|
18
|
+
UseCaseAnswer["SKIP"] = "skip";
|
|
19
|
+
})(UseCaseAnswer || (UseCaseAnswer = {}));
|
|
20
|
+
_User.UseCaseAnswer = UseCaseAnswer;
|
|
21
|
+
})(User || (User = {}));
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { LicenseRef } from './License';
|
|
2
2
|
import type { NewsroomRef } from './Newsroom';
|
|
3
3
|
import type { Permission } from './Permissions';
|
|
4
|
+
import type { UserRef } from './User';
|
|
5
|
+
export declare type UserAccountRef = UserRef;
|
|
4
6
|
export interface UserAccount {
|
|
5
7
|
id: number;
|
|
6
8
|
avatar_url: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * from './common';
|
|
2
|
-
export * from './Entity';
|
|
3
2
|
export * from './Campaign';
|
|
4
3
|
export * from './Category';
|
|
5
4
|
export * from './Contact';
|
|
6
5
|
export * from './Country';
|
|
7
6
|
export * from './CoverageEntry';
|
|
8
7
|
export * from './Culture';
|
|
8
|
+
export * from './Currency';
|
|
9
9
|
export * from './DnsConfigurationInstruction';
|
|
10
10
|
export * from './EmailRecipient';
|
|
11
11
|
export * from './EmailSubscription';
|
|
@@ -19,6 +19,7 @@ export * from './NewsroomGallery';
|
|
|
19
19
|
export * from './NewsroomLanguageSettings';
|
|
20
20
|
export * from './NewsroomTheme';
|
|
21
21
|
export * from './NewsroomWebhook';
|
|
22
|
+
export * from './Plan';
|
|
22
23
|
export * from './PrivacyRequest';
|
|
23
24
|
export * from './SenderAddress';
|
|
24
25
|
export * from './SenderDomain';
|
package/dist/types/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Common
|
|
2
|
-
export * from "./common/index.js";
|
|
3
|
-
export * from "./Entity.js"; // Entities
|
|
2
|
+
export * from "./common/index.js"; // Entities
|
|
4
3
|
export * from "./Campaign.js";
|
|
5
4
|
export * from "./Category.js";
|
|
6
5
|
export * from "./Contact.js";
|
|
7
6
|
export * from "./Country.js";
|
|
8
7
|
export * from "./CoverageEntry.js";
|
|
9
8
|
export * from "./Culture.js";
|
|
9
|
+
export * from "./Currency.js";
|
|
10
10
|
export * from "./DnsConfigurationInstruction.js";
|
|
11
11
|
export * from "./EmailRecipient.js";
|
|
12
12
|
export * from "./EmailSubscription.js";
|
|
@@ -20,6 +20,7 @@ export * from "./NewsroomGallery.js";
|
|
|
20
20
|
export * from "./NewsroomLanguageSettings.js";
|
|
21
21
|
export * from "./NewsroomTheme.js";
|
|
22
22
|
export * from "./NewsroomWebhook.js";
|
|
23
|
+
export * from "./Plan.js";
|
|
23
24
|
export * from "./PrivacyRequest.js";
|
|
24
25
|
export * from "./SenderAddress.js";
|
|
25
26
|
export * from "./SenderDomain.js";
|
package/package.json
CHANGED
package/dist/types/Entity.d.ts
DELETED
package/dist/types/Entity.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|