@isardsat/editorial-client 6.9.0 → 6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @isardsat/editorial-client
2
2
 
3
+ ## 6.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 144ab5c: Added a favicon and displayed the Editorial version in the sidebar.
8
+
9
+ Introduced table filtering by a specific element defined in the schema.filterBy.
10
+
11
+ Added column sorting support for tables.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [144ab5c]
16
+ - @isardsat/editorial-common@6.11.0
17
+
18
+ ## 6.10.0
19
+
20
+ ### Minor Changes
21
+
22
+ - 7383e37: Ui changes and vulnerability fix
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [7383e37]
27
+ - @isardsat/editorial-common@6.10.0
28
+
3
29
  ## 6.9.0
4
30
 
5
31
  ### Minor Changes
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@isardsat/editorial-client",
3
- "version": "6.9.0",
3
+ "version": "6.11.0",
4
4
  "description": "JavaScript client for the Editorial CMS API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "type": "module",
8
8
  "dependencies": {
9
- "@isardsat/editorial-common": "6.9.0"
9
+ "@isardsat/editorial-common": "6.11.0"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@tsconfig/node22": "^22.0.0",
package/dist/helpers.d.ts DELETED
@@ -1,70 +0,0 @@
1
- import type { EditorialDataItem, EditorialDataType, EditorialData } from "@isardsat/editorial-common";
2
- import type { EditorialClientInterface } from "./types.js";
3
- export declare function createEditorialHelpers(client: EditorialClientInterface): {
4
- getContentIds({ type, locale, preview, }: {
5
- type: string;
6
- locale?: string;
7
- preview?: boolean;
8
- }): Promise<string[]>;
9
- getContent<T = import("zod").objectOutputType<{
10
- id: import("zod").ZodString;
11
- isDraft: import("zod").ZodDefault<import("zod").ZodBoolean>;
12
- createdAt: import("zod").ZodDefault<import("zod").ZodString>;
13
- updatedAt: import("zod").ZodDefault<import("zod").ZodString>;
14
- }, import("zod").ZodTypeAny, "passthrough">>({ type, id, locale, preview, }: {
15
- type: string;
16
- id: string;
17
- locale?: string;
18
- preview?: boolean;
19
- }): Promise<T>;
20
- getContentByType<T = Record<string, import("zod").objectOutputType<{
21
- id: import("zod").ZodString;
22
- isDraft: import("zod").ZodDefault<import("zod").ZodBoolean>;
23
- createdAt: import("zod").ZodDefault<import("zod").ZodString>;
24
- updatedAt: import("zod").ZodDefault<import("zod").ZodString>;
25
- }, import("zod").ZodTypeAny, "passthrough">>>({ type, locale, preview, }: {
26
- type: string;
27
- locale?: string;
28
- preview?: boolean;
29
- }): Promise<T>;
30
- getAllContent<T = Record<string, Record<string, import("zod").objectOutputType<{
31
- id: import("zod").ZodString;
32
- isDraft: import("zod").ZodDefault<import("zod").ZodBoolean>;
33
- createdAt: import("zod").ZodDefault<import("zod").ZodString>;
34
- updatedAt: import("zod").ZodDefault<import("zod").ZodString>;
35
- }, import("zod").ZodTypeAny, "passthrough">>>>({ locale, preview, }?: {
36
- locale?: string;
37
- preview?: boolean;
38
- }): Promise<T>;
39
- getSchema(): Promise<Record<string, {
40
- displayName: string;
41
- fields: Record<string, import("zod").objectOutputType<{
42
- type: import("zod").ZodEnum<["string", "boolean", "date", "datetime", "markdown", "number", "color", "select", "url"]>;
43
- displayName: import("zod").ZodString;
44
- displayExtra: import("zod").ZodOptional<import("zod").ZodString>;
45
- placeholder: import("zod").ZodOptional<import("zod").ZodString>;
46
- isRequired: import("zod").ZodOptional<import("zod").ZodBoolean>;
47
- showInSummary: import("zod").ZodOptional<import("zod").ZodBoolean>;
48
- }, import("zod").ZodTypeAny, "passthrough">>;
49
- singleton?: boolean | undefined;
50
- }>>;
51
- getConfig(): Promise<{
52
- name: string;
53
- publicUrl: string;
54
- publicDir: string;
55
- publicDeletedDir: string;
56
- filesUrl: string;
57
- largeFilesUrl: string;
58
- previewUrl?: string | undefined;
59
- silent?: boolean | undefined;
60
- firebase?: {
61
- apiKey: string;
62
- authDomain: string;
63
- databaseURL: string;
64
- projectId: string;
65
- storageBucket: string;
66
- messagingSenderId: string;
67
- dbUsersPath: string;
68
- } | undefined;
69
- }>;
70
- };
package/dist/helpers.js DELETED
@@ -1,51 +0,0 @@
1
- const DEFAULT_LANG = "en";
2
- export function createEditorialHelpers(client) {
3
- return {
4
- async getContentIds({ type, locale, preview, }) {
5
- const options = {};
6
- if (locale && locale !== DEFAULT_LANG) {
7
- options.locale = locale;
8
- }
9
- if (preview) {
10
- options.preview = true;
11
- }
12
- return client.getContentIds(type, options);
13
- },
14
- async getContent({ type, id, locale, preview, }) {
15
- const options = {};
16
- if (locale && locale !== DEFAULT_LANG) {
17
- options.locale = locale;
18
- }
19
- if (preview) {
20
- options.preview = true;
21
- }
22
- return client.getContentById(type, id, options);
23
- },
24
- async getContentByType({ type, locale, preview, }) {
25
- const options = {};
26
- if (locale && locale !== DEFAULT_LANG) {
27
- options.locale = locale;
28
- }
29
- if (preview) {
30
- options.preview = true;
31
- }
32
- return client.getContentByType(type, options);
33
- },
34
- async getAllContent({ locale, preview, } = {}) {
35
- const options = {};
36
- if (locale && locale !== DEFAULT_LANG) {
37
- options.locale = locale;
38
- }
39
- if (preview) {
40
- options.preview = true;
41
- }
42
- return client.getContent(options);
43
- },
44
- async getSchema() {
45
- return client.getSchema();
46
- },
47
- async getConfig() {
48
- return client.getConfig();
49
- },
50
- };
51
- }