@prezly/sdk 18.2.2 → 19.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/DeferredJobsApiClient.cjs +0 -1
- package/dist/api/DeferredJobsApiClient.js +0 -1
- package/dist/api/constants.cjs +2 -3
- package/dist/api/constants.js +1 -1
- package/dist/api/types.d.ts +1 -1
- package/dist/endpoints/Accounts/index.cjs +2 -0
- package/dist/endpoints/Billing/index.cjs +2 -0
- package/dist/endpoints/Billing/types.cjs +3 -5
- package/dist/endpoints/CampaignRecipients/Client.d.ts +3 -3
- package/dist/endpoints/CampaignRecipients/index.cjs +2 -0
- package/dist/endpoints/Campaigns/index.cjs +2 -0
- package/dist/endpoints/Contacts/Client.d.ts +2 -2
- package/dist/endpoints/Contacts/index.cjs +2 -0
- package/dist/endpoints/Contacts/types.d.ts +3 -3
- package/dist/endpoints/ContactsExports/index.cjs +2 -0
- package/dist/endpoints/Coverage/Client.d.ts +1 -1
- package/dist/endpoints/Coverage/index.cjs +2 -0
- package/dist/endpoints/Coverage/types.d.ts +1 -1
- package/dist/endpoints/Jobs/index.cjs +2 -0
- package/dist/endpoints/Licenses/index.cjs +1 -0
- package/dist/endpoints/NewsroomCategories/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomCategories/index.cjs +2 -0
- package/dist/endpoints/NewsroomContacts/Client.d.ts +2 -2
- package/dist/endpoints/NewsroomContacts/index.cjs +2 -0
- package/dist/endpoints/NewsroomContacts/types.d.ts +1 -1
- package/dist/endpoints/NewsroomDomains/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomDomains/index.cjs +2 -0
- package/dist/endpoints/NewsroomGalleries/Client.d.ts +2 -2
- package/dist/endpoints/NewsroomGalleries/index.cjs +2 -0
- package/dist/endpoints/NewsroomHub/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomHub/index.cjs +2 -0
- package/dist/endpoints/NewsroomHub/types.d.ts +1 -1
- package/dist/endpoints/NewsroomLanguages/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomLanguages/index.cjs +2 -0
- package/dist/endpoints/NewsroomPrivacyRequests/index.cjs +2 -0
- package/dist/endpoints/NewsroomSubscriptions/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomSubscriptions/index.cjs +2 -0
- package/dist/endpoints/NewsroomThemes/Client.d.ts +2 -2
- package/dist/endpoints/NewsroomThemes/index.cjs +1 -0
- package/dist/endpoints/NewsroomWebhooks/Client.d.ts +1 -1
- package/dist/endpoints/NewsroomWebhooks/index.cjs +2 -0
- package/dist/endpoints/Newsrooms/Client.d.ts +1 -1
- package/dist/endpoints/Newsrooms/index.cjs +2 -0
- package/dist/endpoints/NotificationSubscriptions/index.cjs +2 -0
- package/dist/endpoints/PricingTables/index.cjs +2 -0
- package/dist/endpoints/PricingTables/types.cjs +5 -9
- package/dist/endpoints/SenderAddresses/index.cjs +2 -0
- package/dist/endpoints/Snippets/Client.d.ts +1 -1
- package/dist/endpoints/Snippets/index.cjs +2 -0
- package/dist/endpoints/Stories/Client.cjs +69 -20
- package/dist/endpoints/Stories/Client.d.ts +20 -9
- package/dist/endpoints/Stories/Client.js +68 -23
- package/dist/endpoints/Stories/index.cjs +3 -0
- package/dist/endpoints/Stories/scopes.cjs +2 -3
- package/dist/endpoints/Stories/types.cjs +14 -4
- package/dist/endpoints/Stories/types.d.ts +28 -9
- package/dist/endpoints/Stories/types.js +13 -3
- package/dist/endpoints/Subscriptions/Client.d.ts +1 -1
- package/dist/endpoints/Subscriptions/index.cjs +2 -0
- package/dist/endpoints/Subscriptions/types.cjs +1 -2
- package/dist/endpoints/index.cjs +3 -3
- package/dist/http/constants.cjs +3 -6
- package/dist/http/index.cjs +8 -8
- package/dist/http/lib.cjs +0 -16
- package/dist/http/lib.js +0 -14
- package/dist/http/types.cjs +2 -4
- package/dist/index.cjs +7 -4
- package/dist/routing.cjs +2 -3
- package/dist/types/BillingCycle.cjs +1 -2
- package/dist/types/Campaign.cjs +1 -2
- package/dist/types/Category.cjs +1 -2
- package/dist/types/Category.d.ts +3 -3
- package/dist/types/Contact.cjs +1 -2
- package/dist/types/ContactDuplicateSuggestion.cjs +2 -2
- package/dist/types/ContactDuplicateSuggestion.d.ts +1 -1
- package/dist/types/ContactsExport.cjs +1 -2
- package/dist/types/ContactsExport.d.ts +1 -1
- package/dist/types/ContactsScope.cjs +1 -2
- package/dist/types/ContactsScope.d.ts +1 -1
- package/dist/types/CoverageEntry.cjs +1 -2
- package/dist/types/Culture.cjs +7 -2
- package/dist/types/Culture.d.ts +1 -1
- package/dist/types/Culture.js +6 -0
- package/dist/types/Currency.cjs +1 -2
- package/dist/types/DnsConfigurationInstruction.d.ts +1 -1
- package/dist/types/EmailRecipient.cjs +1 -2
- package/dist/types/JobState.cjs +1 -2
- package/dist/types/JobState.d.ts +1 -1
- package/dist/types/License.cjs +1 -2
- package/dist/types/Newsroom.cjs +4 -2
- package/dist/types/Newsroom.d.ts +2 -2
- package/dist/types/Newsroom.js +3 -0
- package/dist/types/NewsroomDomain.cjs +1 -2
- package/dist/types/NewsroomGallery.cjs +1 -2
- package/dist/types/NewsroomTheme.cjs +3 -5
- package/dist/types/NewsroomTheme.d.ts +1 -1
- package/dist/types/NewsroomTheme.js +1 -1
- package/dist/types/NewsroomWebhook.cjs +1 -2
- package/dist/types/NotificationSubscription.cjs +1 -2
- package/dist/types/Permissions.cjs +1 -2
- package/dist/types/Permissions.d.ts +1 -1
- package/dist/types/Plan.cjs +3 -4
- package/dist/types/PrivacyRequest.cjs +1 -2
- package/dist/types/SenderAddress.cjs +1 -2
- package/dist/types/SenderDomain.cjs +1 -2
- package/dist/types/SortOrder.cjs +1 -2
- package/dist/types/Story.cjs +17 -6
- package/dist/types/Story.d.ts +2 -2
- package/dist/types/Story.js +16 -4
- package/dist/types/User.cjs +1 -2
- package/dist/types/UserAccount.d.ts +1 -1
- package/dist/types/common/Notification.cjs +1 -2
- package/dist/types/common/OEmbedInfo.cjs +1 -2
- package/dist/types/common/Pagination.cjs +2 -2
- package/dist/types/common/Query.cjs +1 -2
- package/dist/types/common/Query.d.ts +1 -1
- package/dist/types/common/index.cjs +6 -0
- package/dist/types/index.cjs +36 -0
- package/package.json +10 -13
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import { Campaign } from "../../types/index.js";
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Campaign } from "../../types/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Uploadcare image JSON string.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Raw HTML string.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* String-serialized JSON object.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* String containing Prezly Content Format JSON structure.
|
|
13
|
+
*/
|
|
4
14
|
var Alignment = Campaign.StoryAlignment;
|
|
5
15
|
var Appearance = Campaign.StoryAppearance;
|
|
6
16
|
const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS_SHAPE = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DeferredJobsApiClient } from '../../api';
|
|
2
2
|
import type { Contact, EmailSubscription, Newsroom } from '../../types';
|
|
3
3
|
import type { SubscribeRequest, UnsubscribeRequest, UpdateUnsubscribeDetailsRequest } from './types';
|
|
4
|
-
|
|
4
|
+
type NewsroomId = Newsroom['uuid'] | Newsroom['id'];
|
|
5
5
|
export declare class Client {
|
|
6
6
|
private readonly apiClient;
|
|
7
7
|
constructor(apiClient: DeferredJobsApiClient);
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _Client = require("./Client.cjs");
|
|
7
7
|
Object.keys(_Client).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Client[key]) return;
|
|
9
10
|
Object.defineProperty(exports, key, {
|
|
10
11
|
enumerable: true,
|
|
11
12
|
get: function () {
|
|
@@ -16,6 +17,7 @@ Object.keys(_Client).forEach(function (key) {
|
|
|
16
17
|
var _types = require("./types.cjs");
|
|
17
18
|
Object.keys(_types).forEach(function (key) {
|
|
18
19
|
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
19
21
|
Object.defineProperty(exports, key, {
|
|
20
22
|
enumerable: true,
|
|
21
23
|
get: function () {
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.UnsubscribeReason = void 0;
|
|
7
|
-
let UnsubscribeReason;
|
|
8
|
-
exports.UnsubscribeReason = UnsubscribeReason;
|
|
7
|
+
let UnsubscribeReason = exports.UnsubscribeReason = void 0;
|
|
9
8
|
(function (UnsubscribeReason) {
|
|
10
9
|
UnsubscribeReason["UNKNOWN"] = "unknown";
|
|
11
10
|
UnsubscribeReason["UNWANTED"] = "unwanted";
|
package/dist/endpoints/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.Subscriptions = exports.Stories = exports.Snippets = exports.SenderAddresses = exports.PricingTables = exports.NotificationSubscriptions = exports.Newsrooms = exports.NewsroomWebhooks = exports.NewsroomThemes = exports.NewsroomSubscriptions = exports.NewsroomPrivacyRequests = exports.NewsroomLanguages = exports.NewsroomHub = exports.NewsroomGalleries = exports.NewsroomDomains = exports.NewsroomContacts = exports.NewsroomCategories = exports.Licenses = exports.Jobs = exports.Coverage = exports.ContactsExports = exports.Contacts = exports.Campaigns = exports.CampaignRecipients = exports.Billing = exports.Accounts = void 0;
|
|
7
7
|
var _Accounts = _interopRequireWildcard(require("./Accounts/index.cjs"));
|
|
8
8
|
exports.Accounts = _Accounts;
|
|
9
9
|
var _Billing = _interopRequireWildcard(require("./Billing/index.cjs"));
|
|
@@ -56,5 +56,5 @@ var _Subscriptions = _interopRequireWildcard(require("./Subscriptions/index.cjs"
|
|
|
56
56
|
exports.Subscriptions = _Subscriptions;
|
|
57
57
|
var _NotificationSubscriptions = _interopRequireWildcard(require("./NotificationSubscriptions/index.cjs"));
|
|
58
58
|
exports.NotificationSubscriptions = _NotificationSubscriptions;
|
|
59
|
-
function _getRequireWildcardCache() { if (typeof WeakMap
|
|
60
|
-
function _interopRequireWildcard(
|
|
59
|
+
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); }
|
|
60
|
+
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; }
|
package/dist/http/constants.cjs
CHANGED
|
@@ -4,9 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.NETWORK_PROBLEM_ERROR_MESSAGE = exports.INVALID_URL_ERROR_MESSAGE = exports.CONTENT_TYPE = void 0;
|
|
7
|
-
const CONTENT_TYPE = 'application/json;charset=utf-8';
|
|
8
|
-
exports.
|
|
9
|
-
const
|
|
10
|
-
exports.INVALID_URL_ERROR_MESSAGE = INVALID_URL_ERROR_MESSAGE;
|
|
11
|
-
const NETWORK_PROBLEM_ERROR_MESSAGE = 'Network problem';
|
|
12
|
-
exports.NETWORK_PROBLEM_ERROR_MESSAGE = NETWORK_PROBLEM_ERROR_MESSAGE;
|
|
7
|
+
const CONTENT_TYPE = exports.CONTENT_TYPE = 'application/json;charset=utf-8';
|
|
8
|
+
const INVALID_URL_ERROR_MESSAGE = exports.INVALID_URL_ERROR_MESSAGE = 'Invalid URL provided';
|
|
9
|
+
const NETWORK_PROBLEM_ERROR_MESSAGE = exports.NETWORK_PROBLEM_ERROR_MESSAGE = 'Network problem';
|
package/dist/http/index.cjs
CHANGED
|
@@ -9,28 +9,28 @@ Object.defineProperty(exports, "ApiError", {
|
|
|
9
9
|
return _ApiError.ApiError;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "HttpCodes", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _types.HttpCodes;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "
|
|
18
|
+
Object.defineProperty(exports, "Method", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return
|
|
21
|
+
return _types.Method;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "
|
|
24
|
+
Object.defineProperty(exports, "createHttpClient", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function () {
|
|
27
|
-
return
|
|
27
|
+
return _HttpClient.createHttpClient;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "isDeferredJobResponse", {
|
|
31
31
|
enumerable: true,
|
|
32
32
|
get: function () {
|
|
33
|
-
return
|
|
33
|
+
return _lib.isDeferredJobResponse;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
var _ApiError = require("./ApiError.cjs");
|
package/dist/http/lib.cjs
CHANGED
|
@@ -6,23 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.createUrlWithQuery = createUrlWithQuery;
|
|
7
7
|
exports.isDeferredJobResponse = isDeferredJobResponse;
|
|
8
8
|
var _queryString = _interopRequireDefault(require("query-string"));
|
|
9
|
-
var nodeUrl = _interopRequireWildcard(require("url"));
|
|
10
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
11
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
/**
|
|
14
|
-
* Choose which `URL` class to use based on the environment (Browser / Node.js / Edge)
|
|
15
|
-
*/
|
|
16
|
-
function getURLClass() {
|
|
17
|
-
if (typeof window !== 'undefined') {
|
|
18
|
-
return window.URL;
|
|
19
|
-
}
|
|
20
|
-
if (typeof globalThis.EdgeRuntime === 'string') {
|
|
21
|
-
return globalThis.URL;
|
|
22
|
-
}
|
|
23
|
-
return nodeUrl.URL;
|
|
24
|
-
}
|
|
25
|
-
const URL = getURLClass();
|
|
26
10
|
function parseUrlParams(query) {
|
|
27
11
|
return _queryString.default.parse(query, {
|
|
28
12
|
arrayFormat: 'bracket'
|
package/dist/http/lib.js
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import queryString from 'query-string';
|
|
2
|
-
import * as nodeUrl from 'url';
|
|
3
|
-
/**
|
|
4
|
-
* Choose which `URL` class to use based on the environment (Browser / Node.js / Edge)
|
|
5
|
-
*/
|
|
6
|
-
function getURLClass() {
|
|
7
|
-
if (typeof window !== 'undefined') {
|
|
8
|
-
return window.URL;
|
|
9
|
-
}
|
|
10
|
-
if (typeof globalThis.EdgeRuntime === 'string') {
|
|
11
|
-
return globalThis.URL;
|
|
12
|
-
}
|
|
13
|
-
return nodeUrl.URL;
|
|
14
|
-
}
|
|
15
|
-
const URL = getURLClass();
|
|
16
2
|
function parseUrlParams(query) {
|
|
17
3
|
return queryString.parse(query, {
|
|
18
4
|
arrayFormat: 'bracket'
|
package/dist/http/types.cjs
CHANGED
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Method = exports.HttpCodes = void 0;
|
|
7
|
-
let HttpCodes;
|
|
8
|
-
exports.HttpCodes = HttpCodes;
|
|
7
|
+
let HttpCodes = exports.HttpCodes = void 0;
|
|
9
8
|
(function (HttpCodes) {
|
|
10
9
|
HttpCodes[HttpCodes["ACCEPTED"] = 202] = "ACCEPTED";
|
|
11
10
|
HttpCodes[HttpCodes["NO_CONTENT"] = 204] = "NO_CONTENT";
|
|
@@ -14,8 +13,7 @@ exports.HttpCodes = HttpCodes;
|
|
|
14
13
|
HttpCodes[HttpCodes["GONE"] = 410] = "GONE";
|
|
15
14
|
HttpCodes[HttpCodes["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
|
|
16
15
|
})(HttpCodes || (exports.HttpCodes = HttpCodes = {}));
|
|
17
|
-
let Method;
|
|
18
|
-
exports.Method = Method;
|
|
16
|
+
let Method = exports.Method = void 0;
|
|
19
17
|
(function (Method) {
|
|
20
18
|
Method["DELETE"] = "DELETE";
|
|
21
19
|
Method["GET"] = "GET";
|
package/dist/index.cjs
CHANGED
|
@@ -7,22 +7,23 @@ var _exportNames = {
|
|
|
7
7
|
createPrezlyClient: true,
|
|
8
8
|
ApiError: true
|
|
9
9
|
};
|
|
10
|
-
Object.defineProperty(exports, "
|
|
10
|
+
Object.defineProperty(exports, "ApiError", {
|
|
11
11
|
enumerable: true,
|
|
12
12
|
get: function () {
|
|
13
|
-
return
|
|
13
|
+
return _index.ApiError;
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
Object.defineProperty(exports, "
|
|
16
|
+
Object.defineProperty(exports, "createPrezlyClient", {
|
|
17
17
|
enumerable: true,
|
|
18
18
|
get: function () {
|
|
19
|
-
return
|
|
19
|
+
return _Client.createClient;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
var _uploads = require("@prezly/uploads");
|
|
23
23
|
Object.keys(_uploads).forEach(function (key) {
|
|
24
24
|
if (key === "default" || key === "__esModule") return;
|
|
25
25
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
26
|
+
if (key in exports && exports[key] === _uploads[key]) return;
|
|
26
27
|
Object.defineProperty(exports, key, {
|
|
27
28
|
enumerable: true,
|
|
28
29
|
get: function () {
|
|
@@ -36,6 +37,7 @@ var _index2 = require("./endpoints/index.cjs");
|
|
|
36
37
|
Object.keys(_index2).forEach(function (key) {
|
|
37
38
|
if (key === "default" || key === "__esModule") return;
|
|
38
39
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
40
|
+
if (key in exports && exports[key] === _index2[key]) return;
|
|
39
41
|
Object.defineProperty(exports, key, {
|
|
40
42
|
enumerable: true,
|
|
41
43
|
get: function () {
|
|
@@ -47,6 +49,7 @@ var _index3 = require("./types/index.cjs");
|
|
|
47
49
|
Object.keys(_index3).forEach(function (key) {
|
|
48
50
|
if (key === "default" || key === "__esModule") return;
|
|
49
51
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
52
|
+
if (key in exports && exports[key] === _index3[key]) return;
|
|
50
53
|
Object.defineProperty(exports, key, {
|
|
51
54
|
enumerable: true,
|
|
52
55
|
get: function () {
|
package/dist/routing.cjs
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.routing = void 0;
|
|
7
|
-
const routing = {
|
|
7
|
+
const routing = exports.routing = {
|
|
8
8
|
accounts: '/v2/accounts',
|
|
9
9
|
billing: 'v2/billing',
|
|
10
10
|
campaignsUrl: '/v2/campaigns',
|
|
@@ -37,5 +37,4 @@ const routing = {
|
|
|
37
37
|
storiesSearchUrl: '/v2/stories/search',
|
|
38
38
|
storyCoverageUrl: '/v1/stories/:story_id/reports/coverage',
|
|
39
39
|
snippetsUrl: '/v2/snippets'
|
|
40
|
-
};
|
|
41
|
-
exports.routing = routing;
|
|
40
|
+
};
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BillingCycle = void 0;
|
|
7
|
-
let BillingCycle;
|
|
8
|
-
exports.BillingCycle = BillingCycle;
|
|
7
|
+
let BillingCycle = exports.BillingCycle = void 0;
|
|
9
8
|
(function (BillingCycle) {
|
|
10
9
|
BillingCycle["YEAR"] = "year";
|
|
11
10
|
BillingCycle["MONTH"] = "month";
|
package/dist/types/Campaign.cjs
CHANGED
|
@@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.Campaign = void 0;
|
|
7
7
|
var _SenderDomain = require("./SenderDomain.cjs");
|
|
8
|
-
let Campaign;
|
|
9
|
-
exports.Campaign = Campaign;
|
|
8
|
+
let Campaign = exports.Campaign = void 0;
|
|
10
9
|
(function (_Campaign) {
|
|
11
10
|
const SenderDomainVerificationFlow = _Campaign.SenderDomainVerificationFlow = _SenderDomain.SenderDomain.VerificationFlowVersion;
|
|
12
11
|
let LifecycleStatus;
|
package/dist/types/Category.cjs
CHANGED
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Category = void 0;
|
|
7
|
-
let Category;
|
|
8
|
-
exports.Category = Category;
|
|
7
|
+
let Category = exports.Category = void 0;
|
|
9
8
|
(function (_Category) {
|
|
10
9
|
function isTranslated(category, locale) {
|
|
11
10
|
const translation = category.i18n[localeCode(locale)];
|
package/dist/types/Category.d.ts
CHANGED
|
@@ -31,14 +31,14 @@ export interface TranslatedCategory {
|
|
|
31
31
|
name: Category.Translation['name'];
|
|
32
32
|
description: Category.Translation['description'];
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
type LocaleIdentifier<Locale extends Culture['code'] = Culture['code']> = Locale | {
|
|
35
35
|
code: Locale;
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
type NonEmptyTranslation = Category.Translation & {
|
|
38
38
|
slug: NonNullable<Category.Translation['slug']>;
|
|
39
39
|
name: Exclude<Category.Translation['name'], ''>;
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
type WithNonEmptyTranslation<T extends Category, LocaleCode extends Culture['code']> = T & {
|
|
42
42
|
i18n: {
|
|
43
43
|
[localeCode in LocaleCode]: NonEmptyTranslation;
|
|
44
44
|
};
|
package/dist/types/Contact.cjs
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ContactDuplicateSuggestion = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* Value in range 0.0 ... 1.0.
|
|
9
|
-
*/
|
|
10
|
-
exports.ContactDuplicateSuggestion =
|
|
9
|
+
*/
|
|
10
|
+
let ContactDuplicateSuggestion = exports.ContactDuplicateSuggestion = void 0;
|
|
11
11
|
(function (_ContactDuplicateSuggestion) {
|
|
12
12
|
let Status;
|
|
13
13
|
(function (Status) {
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ContactsExport = void 0;
|
|
7
|
-
let ContactsExport;
|
|
8
|
-
exports.ContactsExport = ContactsExport;
|
|
7
|
+
let ContactsExport = exports.ContactsExport = void 0;
|
|
9
8
|
(function (_ContactsExport) {
|
|
10
9
|
let Status;
|
|
11
10
|
(function (Status) {
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ContactsScope = void 0;
|
|
7
|
-
let ContactsScope;
|
|
8
|
-
exports.ContactsScope = ContactsScope;
|
|
7
|
+
let ContactsScope = exports.ContactsScope = void 0;
|
|
9
8
|
(function (_ContactsScope) {
|
|
10
9
|
let Type;
|
|
11
10
|
(function (Type) {
|
|
@@ -2,7 +2,7 @@ import type { Campaign } from './Campaign';
|
|
|
2
2
|
import type { SelectionValue } from './common';
|
|
3
3
|
import type { Contact } from './Contact';
|
|
4
4
|
import type { EmailRecipient } from './EmailRecipient';
|
|
5
|
-
export
|
|
5
|
+
export type ContactsScope = ContactsScope.AllContactsScope | ContactsScope.ContactOrganisationsScope | ContactsScope.ContactEmployeesScope | ContactsScope.CampaignRecipientsScope | ContactsScope.CampaignReportScope;
|
|
6
6
|
export declare namespace ContactsScope {
|
|
7
7
|
enum Type {
|
|
8
8
|
ALL_CONTACTS = "scope:contacts",
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CoverageEntry = void 0;
|
|
7
|
-
let CoverageEntry;
|
|
8
|
-
exports.CoverageEntry = CoverageEntry;
|
|
7
|
+
let CoverageEntry = exports.CoverageEntry = void 0;
|
|
9
8
|
(function (_CoverageEntry) {
|
|
10
9
|
let Type;
|
|
11
10
|
(function (Type) {
|
package/dist/types/Culture.cjs
CHANGED
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Culture = void 0;
|
|
7
|
-
let Culture;
|
|
8
|
-
exports.Culture = Culture;
|
|
7
|
+
let Culture = exports.Culture = void 0;
|
|
9
8
|
(function (_Culture) {
|
|
10
9
|
let TextDirection;
|
|
11
10
|
(function (TextDirection) {
|
|
@@ -13,6 +12,12 @@ exports.Culture = Culture;
|
|
|
13
12
|
TextDirection["RTL"] = "rtl";
|
|
14
13
|
})(TextDirection || (TextDirection = {}));
|
|
15
14
|
_Culture.TextDirection = TextDirection;
|
|
15
|
+
/**
|
|
16
|
+
* Primary locale code used everywhere in the Prezly app.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Locale ISO code to be used in HTML attributes.
|
|
20
|
+
*/
|
|
16
21
|
function isoCode(code) {
|
|
17
22
|
return code.replace('_', '-');
|
|
18
23
|
}
|
package/dist/types/Culture.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface CultureRef {
|
|
|
6
6
|
direction: `${Culture.TextDirection}`;
|
|
7
7
|
language_code: Culture.LangCode;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type Culture = CultureRef;
|
|
10
10
|
export declare namespace Culture {
|
|
11
11
|
enum TextDirection {
|
|
12
12
|
LTR = "ltr",
|
package/dist/types/Culture.js
CHANGED
|
@@ -6,6 +6,12 @@ export let Culture;
|
|
|
6
6
|
TextDirection["RTL"] = "rtl";
|
|
7
7
|
})(TextDirection || (TextDirection = {}));
|
|
8
8
|
_Culture.TextDirection = TextDirection;
|
|
9
|
+
/**
|
|
10
|
+
* Primary locale code used everywhere in the Prezly app.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Locale ISO code to be used in HTML attributes.
|
|
14
|
+
*/
|
|
9
15
|
function isoCode(code) {
|
|
10
16
|
return code.replace('_', '-');
|
|
11
17
|
}
|
package/dist/types/Currency.cjs
CHANGED
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Currency = void 0;
|
|
7
|
-
let Currency;
|
|
8
|
-
exports.Currency = Currency;
|
|
7
|
+
let Currency = exports.Currency = void 0;
|
|
9
8
|
(function (Currency) {
|
|
10
9
|
Currency["EUR"] = "eur";
|
|
11
10
|
Currency["USD"] = "usd";
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.EmailRecipient = void 0;
|
|
7
|
-
let EmailRecipient;
|
|
8
|
-
exports.EmailRecipient = EmailRecipient;
|
|
7
|
+
let EmailRecipient = exports.EmailRecipient = void 0;
|
|
9
8
|
(function (_EmailRecipient) {
|
|
10
9
|
let EmailAddressStatus;
|
|
11
10
|
(function (EmailAddressStatus) {
|
package/dist/types/JobState.cjs
CHANGED
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.JobStatus = void 0;
|
|
7
|
-
let JobStatus;
|
|
8
|
-
exports.JobStatus = JobStatus;
|
|
7
|
+
let JobStatus = exports.JobStatus = void 0;
|
|
9
8
|
(function (JobStatus) {
|
|
10
9
|
JobStatus["PENDING"] = "pending";
|
|
11
10
|
JobStatus["RESOLVED"] = "resolved";
|
package/dist/types/JobState.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare enum JobStatus {
|
|
|
3
3
|
RESOLVED = "resolved",
|
|
4
4
|
REJECTED = "rejected"
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type JobState<V = object | null, P = object | null, E = object | null> = {
|
|
7
7
|
status: JobStatus.RESOLVED;
|
|
8
8
|
progress: number;
|
|
9
9
|
value: V;
|
package/dist/types/License.cjs
CHANGED
package/dist/types/Newsroom.cjs
CHANGED
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Newsroom = void 0;
|
|
7
|
-
let Newsroom;
|
|
8
|
-
exports.Newsroom = Newsroom;
|
|
7
|
+
let Newsroom = exports.Newsroom = void 0;
|
|
9
8
|
(function (_Newsroom) {
|
|
10
9
|
let Status;
|
|
11
10
|
(function (Status) {
|
|
@@ -27,6 +26,9 @@ exports.Newsroom = Newsroom;
|
|
|
27
26
|
TrackingPolicy["CONSENT_TO_IDENTIFY"] = "consent-to-identify";
|
|
28
27
|
})(TrackingPolicy || (TrackingPolicy = {}));
|
|
29
28
|
_Newsroom.TrackingPolicy = TrackingPolicy;
|
|
29
|
+
/*
|
|
30
|
+
* Status checks
|
|
31
|
+
*/
|
|
30
32
|
function isActive(arg) {
|
|
31
33
|
if (typeof arg === 'object' && arg !== null) {
|
|
32
34
|
return isActive(arg.status);
|
package/dist/types/Newsroom.d.ts
CHANGED
|
@@ -112,8 +112,8 @@ export interface Newsroom extends NewsroomRef {
|
|
|
112
112
|
}
|
|
113
113
|
export declare namespace Newsroom {
|
|
114
114
|
enum Status {
|
|
115
|
-
ACTIVE = "active"
|
|
116
|
-
INACTIVE = "inactive"
|
|
115
|
+
ACTIVE = "active",// i.e. "Live"
|
|
116
|
+
INACTIVE = "inactive",// i.e. "Not live"
|
|
117
117
|
ARCHIVED = "archived"
|
|
118
118
|
}
|
|
119
119
|
interface EmailBranding {
|
package/dist/types/Newsroom.js
CHANGED
|
@@ -20,6 +20,9 @@ export let Newsroom;
|
|
|
20
20
|
TrackingPolicy["CONSENT_TO_IDENTIFY"] = "consent-to-identify";
|
|
21
21
|
})(TrackingPolicy || (TrackingPolicy = {}));
|
|
22
22
|
_Newsroom.TrackingPolicy = TrackingPolicy;
|
|
23
|
+
/*
|
|
24
|
+
* Status checks
|
|
25
|
+
*/
|
|
23
26
|
function isActive(arg) {
|
|
24
27
|
if (typeof arg === 'object' && arg !== null) {
|
|
25
28
|
return isActive(arg.status);
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.NewsroomDomain = void 0;
|
|
7
|
-
let NewsroomDomain;
|
|
8
|
-
exports.NewsroomDomain = NewsroomDomain;
|
|
7
|
+
let NewsroomDomain = exports.NewsroomDomain = void 0;
|
|
9
8
|
(function (_NewsroomDomain) {
|
|
10
9
|
let Type;
|
|
11
10
|
(function (Type) {
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.NewsroomGallery = void 0;
|
|
7
|
-
let NewsroomGallery;
|
|
8
|
-
exports.NewsroomGallery = NewsroomGallery;
|
|
7
|
+
let NewsroomGallery = exports.NewsroomGallery = void 0;
|
|
9
8
|
(function (_NewsroomGallery) {
|
|
10
9
|
let Status;
|
|
11
10
|
(function (Status) {
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.NewsroomThemePreset = exports.NewsroomTheme = void 0;
|
|
7
|
-
let NewsroomTheme;
|
|
8
|
-
exports.NewsroomTheme = NewsroomTheme;
|
|
7
|
+
let NewsroomTheme = exports.NewsroomTheme = void 0;
|
|
9
8
|
(function (_NewsroomTheme) {
|
|
10
9
|
let Status;
|
|
11
10
|
(function (Status) {
|
|
@@ -13,7 +12,7 @@ exports.NewsroomTheme = NewsroomTheme;
|
|
|
13
12
|
Status["STABLE"] = "stable";
|
|
14
13
|
})(Status || (Status = {}));
|
|
15
14
|
_NewsroomTheme.Status = Status;
|
|
16
|
-
let Feature;
|
|
15
|
+
let Feature; // DEV-11475
|
|
17
16
|
(function (Feature) {
|
|
18
17
|
Feature["CATEGORIES"] = "categories";
|
|
19
18
|
Feature["SEARCH"] = "search";
|
|
@@ -37,6 +36,5 @@ exports.NewsroomTheme = NewsroomTheme;
|
|
|
37
36
|
}
|
|
38
37
|
_NewsroomTheme.isFeatureSupported = isFeatureSupported;
|
|
39
38
|
})(NewsroomTheme || (exports.NewsroomTheme = NewsroomTheme = {}));
|
|
40
|
-
let NewsroomThemePreset;
|
|
41
|
-
exports.NewsroomThemePreset = NewsroomThemePreset;
|
|
39
|
+
let NewsroomThemePreset = exports.NewsroomThemePreset = void 0;
|
|
42
40
|
(function (_NewsroomThemePreset) {})(NewsroomThemePreset || (exports.NewsroomThemePreset = NewsroomThemePreset = {}));
|
|
@@ -32,7 +32,7 @@ export declare namespace NewsroomTheme {
|
|
|
32
32
|
STORY_PINNING = "story_pinning",
|
|
33
33
|
TITLE_FORMATTING = "title_formatting",
|
|
34
34
|
CTA_BUTTONS = "cta_buttons",
|
|
35
|
-
VIDEO_LAYOUT = "video_layout"
|
|
35
|
+
VIDEO_LAYOUT = "video_layout",// DEV-7588
|
|
36
36
|
EMBED_LAYOUT = "embed_layout"
|
|
37
37
|
}
|
|
38
38
|
function isFeatureSupported(theme: NewsroomTheme, feature: NewsroomTheme.Feature): boolean;
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.NewsroomWebhook = void 0;
|
|
7
|
-
let NewsroomWebhook;
|
|
8
|
-
exports.NewsroomWebhook = NewsroomWebhook;
|
|
7
|
+
let NewsroomWebhook = exports.NewsroomWebhook = void 0;
|
|
9
8
|
(function (_NewsroomWebhook) {
|
|
10
9
|
let Event;
|
|
11
10
|
(function (Event) {
|