@prezly/sdk 21.10.1 → 21.11.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.cjs +1 -1
- package/dist/api/constants.js +1 -1
- package/dist/endpoints/Contacts/types.d.ts +2 -0
- package/dist/endpoints/Stories/Client.d.ts +1 -1
- package/dist/endpoints/Stories/types.cjs +8 -4
- package/dist/endpoints/Stories/types.d.ts +6 -3
- package/dist/endpoints/Stories/types.js +3 -3
- package/dist/types/Contact.d.ts +1 -0
- package/dist/types/Story.cjs +1 -5
- package/dist/types/Story.d.ts +2 -1
- package/dist/types/Story.js +1 -5
- package/package.json +1 -1
package/dist/api/constants.cjs
CHANGED
|
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DEFAULT_USER_AGENT = void 0;
|
|
7
|
-
const VERSION = "21.10.
|
|
7
|
+
const VERSION = "21.10.1";
|
|
8
8
|
const URL = 'https://github.com/prezly/javascript-sdk';
|
|
9
9
|
const DEFAULT_USER_AGENT = exports.DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
|
package/dist/api/constants.js
CHANGED
|
@@ -41,10 +41,12 @@ interface BaseContactPayload {
|
|
|
41
41
|
}
|
|
42
42
|
export interface OrganisationUpdateRequest extends BaseContactPayload {
|
|
43
43
|
company_name?: string;
|
|
44
|
+
domain?: string | null;
|
|
44
45
|
}
|
|
45
46
|
export interface OrganisationCreateRequest extends BaseContactPayload {
|
|
46
47
|
contact_type: `${Contact.Type.ORGANISATION}`;
|
|
47
48
|
company_name: string;
|
|
49
|
+
domain?: string | null;
|
|
48
50
|
}
|
|
49
51
|
export interface PersonUpdateRequest extends BaseContactPayload {
|
|
50
52
|
first_name?: string;
|
|
@@ -14,7 +14,7 @@ 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<keyof Story.ExtraFields>>(options?: Exactly<Options, ListOptions
|
|
17
|
+
list: <Options extends ListOptions<keyof Story.ExtraFields>>(options?: Exactly<Options, ListOptions<keyof Story.ExtraFields>> | undefined) => Promise<ListResponse<Story & InferExtraFields<Options>>>;
|
|
18
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
20
|
<Options_2 extends IncludeOptions<keyof Story.ExtraFields> & {
|
|
@@ -3,23 +3,27 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.EXTENDED_STORY_INCLUDED_EXTRA_FIELDS = exports.ALL_EXTRA_FIELDS = void 0;
|
|
6
|
+
exports.HeaderFooter = exports.EXTENDED_STORY_INCLUDED_EXTRA_FIELDS = exports.Appearance = exports.Alignment = exports.ALL_EXTRA_FIELDS = void 0;
|
|
7
7
|
var _index = require("../../types/index.cjs");
|
|
8
8
|
/**
|
|
9
9
|
* Uploadcare image JSON string.
|
|
10
10
|
*/
|
|
11
|
+
|
|
11
12
|
/**
|
|
12
13
|
* Raw HTML string.
|
|
13
14
|
*/
|
|
15
|
+
|
|
14
16
|
/**
|
|
15
17
|
* String-serialized JSON object.
|
|
16
18
|
*/
|
|
19
|
+
|
|
17
20
|
/**
|
|
18
21
|
* String containing Prezly Content Format JSON structure.
|
|
19
22
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
const Alignment = exports.Alignment = _index.Campaign.StoryAlignment;
|
|
25
|
+
const Appearance = exports.Appearance = _index.Campaign.StoryAppearance;
|
|
26
|
+
const HeaderFooter = exports.HeaderFooter = _index.Campaign.StoryHeaderFooter;
|
|
23
27
|
const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS_SHAPE = {
|
|
24
28
|
thumbnail_image: true,
|
|
25
29
|
header_image: true,
|
|
@@ -210,9 +210,12 @@ export interface PreviewOptions {
|
|
|
210
210
|
appearance?: Appearance;
|
|
211
211
|
headerFooter?: HeaderFooter;
|
|
212
212
|
}
|
|
213
|
-
export
|
|
214
|
-
export
|
|
215
|
-
export
|
|
213
|
+
export declare const Alignment: typeof Campaign.StoryAlignment;
|
|
214
|
+
export type Alignment = Campaign.StoryAlignment;
|
|
215
|
+
export declare const Appearance: typeof Campaign.StoryAppearance;
|
|
216
|
+
export type Appearance = Campaign.StoryAppearance;
|
|
217
|
+
export declare const HeaderFooter: typeof Campaign.StoryHeaderFooter;
|
|
218
|
+
export type HeaderFooter = Campaign.StoryHeaderFooter;
|
|
216
219
|
export type CreateRequest = HtmlStoryCreateRequest | SlateV3StoryCreateRequest | SlateV4StoryCreateRequest | SlateV5StoryCreateRequest;
|
|
217
220
|
export type UpdateRequest = HtmlStoryUpdateRequest | SlateV3StoryUpdateRequest | SlateV4StoryUpdateRequest | SlateV5StoryUpdateRequest;
|
|
218
221
|
export interface AutosaveRequest {
|
|
@@ -11,9 +11,9 @@ import { Campaign } from "../../types/index.js";
|
|
|
11
11
|
/**
|
|
12
12
|
* String containing Prezly Content Format JSON structure.
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
export const Alignment = Campaign.StoryAlignment;
|
|
15
|
+
export const Appearance = Campaign.StoryAppearance;
|
|
16
|
+
export const HeaderFooter = Campaign.StoryHeaderFooter;
|
|
17
17
|
const EXTENDED_STORY_INCLUDED_EXTRA_FIELDS_SHAPE = {
|
|
18
18
|
thumbnail_image: true,
|
|
19
19
|
header_image: true,
|
package/dist/types/Contact.d.ts
CHANGED
package/dist/types/Story.cjs
CHANGED
|
@@ -25,11 +25,7 @@ let Story = exports.Story = void 0;
|
|
|
25
25
|
return Status;
|
|
26
26
|
}({});
|
|
27
27
|
_Story.Status = Status;
|
|
28
|
-
|
|
29
|
-
* @deprecated Please use `Status` instead.
|
|
30
|
-
* @see Status
|
|
31
|
-
*/
|
|
32
|
-
var LifecycleStatus = Status;
|
|
28
|
+
const LifecycleStatus = _Story.LifecycleStatus = Status;
|
|
33
29
|
/**
|
|
34
30
|
* @deprecated Please use `Status` instead.
|
|
35
31
|
* @see Status
|
package/dist/types/Story.d.ts
CHANGED
|
@@ -167,7 +167,8 @@ export declare namespace Story {
|
|
|
167
167
|
* @deprecated Please use `Status` instead.
|
|
168
168
|
* @see Status
|
|
169
169
|
*/
|
|
170
|
-
|
|
170
|
+
const LifecycleStatus: typeof Status;
|
|
171
|
+
type LifecycleStatus = Status;
|
|
171
172
|
/**
|
|
172
173
|
* @deprecated Please use `Status` instead.
|
|
173
174
|
* @see Status
|
package/dist/types/Story.js
CHANGED
|
@@ -19,11 +19,7 @@ export let Story;
|
|
|
19
19
|
return Status;
|
|
20
20
|
}({});
|
|
21
21
|
_Story.Status = Status;
|
|
22
|
-
|
|
23
|
-
* @deprecated Please use `Status` instead.
|
|
24
|
-
* @see Status
|
|
25
|
-
*/
|
|
26
|
-
var LifecycleStatus = Status;
|
|
22
|
+
const LifecycleStatus = _Story.LifecycleStatus = Status;
|
|
27
23
|
/**
|
|
28
24
|
* @deprecated Please use `Status` instead.
|
|
29
25
|
* @see Status
|