contentful-ui-extensions-sdk 4.14.1 → 4.15.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.
|
@@ -2,7 +2,7 @@ import { ContentType, EditorInterface, SpaceMembership, Role, ContentTypeField,
|
|
|
2
2
|
import { EntryAPI } from './entry.types';
|
|
3
3
|
import { SpaceAPI } from './space.types';
|
|
4
4
|
import { WindowAPI } from './window.types';
|
|
5
|
-
import {
|
|
5
|
+
import { EntrySys, Link, SerializedJSONValue } from './utils';
|
|
6
6
|
import { FieldAPI } from './field-locale.types';
|
|
7
7
|
import { DialogsAPI } from './dialogs.types';
|
|
8
8
|
import { AppConfigAPI } from './app.types';
|
|
@@ -214,7 +214,7 @@ export interface ConnectMessage {
|
|
|
214
214
|
contentType: ContentTypeAPI;
|
|
215
215
|
editorInterface?: EditorInterface;
|
|
216
216
|
entry: {
|
|
217
|
-
sys:
|
|
217
|
+
sys: EntrySys;
|
|
218
218
|
metadata?: Metadata;
|
|
219
219
|
};
|
|
220
220
|
fieldInfo: EntryFieldInfo[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Metadata, Task } from './entities';
|
|
2
2
|
import { EntryFieldAPI } from './field.types';
|
|
3
|
-
import { CollectionResponse,
|
|
3
|
+
import { CollectionResponse, EntrySys, SearchQuery } from './utils';
|
|
4
4
|
type TaskState = 'active' | 'resolved';
|
|
5
5
|
export interface TaskInputData {
|
|
6
6
|
assignedToId: string;
|
|
@@ -19,7 +19,7 @@ export interface TaskAPI {
|
|
|
19
19
|
}
|
|
20
20
|
export interface EntryAPI extends TaskAPI {
|
|
21
21
|
/** Returns sys for an entry. */
|
|
22
|
-
getSys: () =>
|
|
22
|
+
getSys: () => EntrySys;
|
|
23
23
|
/** Publish the entry */
|
|
24
24
|
publish: (options?: {
|
|
25
25
|
skipUiValidation?: boolean;
|
|
@@ -29,7 +29,7 @@ export interface EntryAPI extends TaskAPI {
|
|
|
29
29
|
/** Saves the current changes of the entry */
|
|
30
30
|
save: () => Promise<void>;
|
|
31
31
|
/** Calls the callback with sys every time that sys changes. */
|
|
32
|
-
onSysChanged: (callback: (sys:
|
|
32
|
+
onSysChanged: (callback: (sys: EntrySys) => void) => () => void;
|
|
33
33
|
/** Allows to control the values of all other fields in the current entry. */
|
|
34
34
|
fields: {
|
|
35
35
|
[key: string]: EntryFieldAPI;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type { FieldInfo, EntryFieldInfo, EntryFieldAPI } from './field.types';
|
|
|
7
7
|
export type { FieldAPI } from './field-locale.types';
|
|
8
8
|
export type { NavigatorAPI, AppPageLocationOptions, NavigatorAPIOptions, NavigatorOpenResponse, NavigatorPageResponse, NavigatorSlideInfo, PageExtensionOptions, } from './navigator.types';
|
|
9
9
|
export type { SpaceAPI } from './space.types';
|
|
10
|
-
export type { SearchQuery, CollectionResponse, ContentEntitySys, ContentEntityType, Items, Link, WithOptionalId, WithId, SerializedJSONValue, } from './utils';
|
|
10
|
+
export type { SearchQuery, CollectionResponse, EntrySys, ContentEntitySys, ContentEntityType, Items, Link, WithOptionalId, WithId, SerializedJSONValue, } from './utils';
|
|
11
11
|
export type { DateRangeValidationError, InValidationError, LinkContentTypeValidationError, LinkMimetypeGroupValidationError, NotResolvableValidationError, ProhibitRegexpValidationError, RangeValidationError, RegexpValidationError, RequiredValidationError, SizeValidationError, TypeValidationError, UniqueValidationError, UnknownValidationError, ValidationError, } from './validation-error';
|
|
12
12
|
export type { WindowAPI } from './window.types';
|
|
13
13
|
export type { CMAClient } from './cmaClient.types';
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export interface CollectionResponse<T> {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
export type ContentEntityType = 'Entry' | 'Asset';
|
|
37
|
-
export
|
|
37
|
+
export type ContentEntitySys = {
|
|
38
38
|
space: Link;
|
|
39
39
|
id: string;
|
|
40
40
|
type: ContentEntityType;
|
|
@@ -52,6 +52,10 @@ export interface ContentEntitySys {
|
|
|
52
52
|
version: number;
|
|
53
53
|
publishedBy?: Link;
|
|
54
54
|
contentType: Link;
|
|
55
|
+
};
|
|
56
|
+
export interface EntrySys extends ContentEntitySys {
|
|
57
|
+
type: 'Entry';
|
|
58
|
+
automationTags: Link<'Tag'>[];
|
|
55
59
|
}
|
|
56
60
|
export interface Items {
|
|
57
61
|
type: string;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"contentful-ui-extensions-sdk","description":"A JavaScript library to develop custom apps for Contentful","version":"4.
|
|
1
|
+
{"name":"contentful-ui-extensions-sdk","description":"A JavaScript library to develop custom apps for Contentful","version":"4.15.0","author":"Contentful GmbH","license":"MIT","sideEffects":true,"repository":{"url":"https://github.com/contentful/ui-extensions-sdk.git","type":"git"},"homepage":"https://www.contentful.com/developers/docs/extensibility/app-framework/sdk/","main":"dist/cf-extension-api.js","types":"dist/index.d.ts","files":["dist/cf-extension-api.js","dist/cf-extension-api.js.map","dist/cf-extension.css","dist/**/*.d.ts"],"scripts":{"test":"ts-mocha -p tsconfig.test.json 'test/unit/*.[jt]s' --reporter mocha-multi-reporters --reporter-options configFile=mocha.unit-reporters.json","lint":"eslint '{lib,test}/**/*.{t,j}s'","lint:fix":"npm run lint -- --fix","build":"npm run check-types && rollup -c --compact","build:debug":"npm run build -- --sourcemap","prepublishOnly":"npm run build","size":"echo \"Gzipped, estimate: $(gzip -9 -c dist/cf-extension-api.js | wc -c) bytes\"","semantic-release":"semantic-release","publish-all":"node ./scripts/publish.js","verify":"node ./scripts/verify.js","check-types":"tsc --noEmit -m commonjs","prepare":"husky install","lint-staged":"lint-staged"},"devDependencies":{"@semantic-release/changelog":"6.0.2","@semantic-release/exec":"6.0.3","@semantic-release/git":"10.0.1","@testing-library/dom":"8.20.0","@types/chai-as-promised":"7.1.5","@types/cross-spawn":"6.0.2","@types/fs-extra":"11.0.1","@types/jsdom":"20.0.1","@types/mocha":"10.0.1","@types/nanoid":"3.0.0","@types/sinon":"^10.0.0","@types/sinon-chai":"^3.2.5","@typescript-eslint/eslint-plugin":"4.33.0","@typescript-eslint/parser":"4.33.0","babel-eslint":"10.1.0","chai":"4.3.7","chai-as-promised":"7.1.1","contentful-management":"10.27.4","cross-spawn":"7.0.3","eslint":"7.32.0","eslint-config-prettier":"8.6.0","eslint-config-standard":"16.0.3","eslint-plugin-import":"2.27.5","eslint-plugin-node":"11.1.0","eslint-plugin-prettier":"4.2.1","eslint-plugin-promise":"6.1.1","eslint-plugin-react":"7.32.2","eslint-plugin-standard":"5.0.0","fs-extra":"11.1.0","husky":"8.0.3","jsdom":"21.1.0","lint-staged":"13.1.0","mocha":"10.2.0","mocha-junit-reporter":"2.2.0","mocha-multi-reporters":"1.5.1","mochawesome":"7.1.3","mochawesome-merge":"4.2.2","mochawesome-report-generator":"6.2.0","prettier":"2.8.3","rollup":"2.79.1","rollup-plugin-terser":"7.0.2","rollup-plugin-typescript2":"0.34.1","semantic-release":"19.0.5","sinon":"15.0.1","sinon-chai":"3.7.0","ts-mocha":"10.0.0","tslib":"2.5.0","typescript":"4.9.5"},"lint-staged":{"*.ts":["prettier --write","eslint --fix","git add"],"*.md":["prettier --write","git add"]},"release":{"branches":["master",{"name":"canary","channel":"canary","prerelease":"alpha"}],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog",["@semantic-release/npm",{"npmPublish":false}],["@semantic-release/exec",{"verifyConditionsCmd":"node ./scripts/verify.js","publishCmd":"npm run publish-all"}],["@semantic-release/git",{"message":"chore: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}","assets":["CHANGELOG.md","package.json","package-lock.json"]}],"@semantic-release/github"]},"peerDependencies":{"contentful-management":">=7.30.0"}}
|