@prezly/sdk 20.2.0 → 20.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api/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 = "20.
|
|
7
|
+
const VERSION = "20.2.0";
|
|
8
8
|
const URL = 'https://github.com/prezly/javascript-sdk';
|
|
9
9
|
const DEFAULT_USER_AGENT = exports.DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
|
package/dist/api/constants.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UploadedImage } from '@prezly/uploads';
|
|
1
2
|
import type { SortOrder } from '../../types';
|
|
2
3
|
export interface ListOptions {
|
|
3
4
|
/**
|
|
@@ -16,9 +17,11 @@ export interface CreateRequest {
|
|
|
16
17
|
description?: string;
|
|
17
18
|
};
|
|
18
19
|
};
|
|
20
|
+
image?: UploadedImage | null;
|
|
21
|
+
is_featured?: boolean;
|
|
19
22
|
}
|
|
20
23
|
export interface UpdateRequest {
|
|
21
|
-
i18n
|
|
24
|
+
i18n?: {
|
|
22
25
|
/**
|
|
23
26
|
* Pass `null` to erase category translation.
|
|
24
27
|
*/
|
|
@@ -27,4 +30,6 @@ export interface UpdateRequest {
|
|
|
27
30
|
description?: string;
|
|
28
31
|
};
|
|
29
32
|
};
|
|
33
|
+
image?: UploadedImage | null;
|
|
34
|
+
is_featured?: boolean;
|
|
30
35
|
}
|
|
@@ -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>) => 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> & {
|
package/dist/types/Category.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UploadedImage } from '@prezly/uploads';
|
|
1
2
|
import type { Culture, CultureRef } from './Culture';
|
|
2
3
|
export interface CategoryRef {
|
|
3
4
|
id: number;
|
|
@@ -21,6 +22,8 @@ export interface Category extends Omit<CategoryRef, 'i18n'> {
|
|
|
21
22
|
i18n: {
|
|
22
23
|
[localeCode: Culture.Code]: Category.Translation;
|
|
23
24
|
};
|
|
25
|
+
image: UploadedImage | null;
|
|
26
|
+
is_featured: boolean;
|
|
24
27
|
}
|
|
25
28
|
export declare namespace Category {
|
|
26
29
|
interface Translation extends CategoryRef.Translation {
|