contentful-ui-extensions-sdk 3.39.0 → 3.40.1
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 +21 -0
- package/dist/types.d.ts +13 -1
- package/package.json +25 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [3.40.1](https://github.com/contentful/ui-extensions-sdk/compare/v3.40.0...v3.40.1) (2021-09-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **AccessSDK:** patch action isn't supported ([#987](https://github.com/contentful/ui-extensions-sdk/issues/987)) ([7aff0ae](https://github.com/contentful/ui-extensions-sdk/commit/7aff0aeb4d3680e33a2ab7173a78982c55fa3677))
|
|
7
|
+
|
|
8
|
+
# [3.40.0](https://github.com/contentful/ui-extensions-sdk/compare/v3.39.2...v3.40.0) (2021-09-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **AccessAPI:** add support for JSON patches in access sdk [EXT-3041] ([#974](https://github.com/contentful/ui-extensions-sdk/issues/974)) ([a720fc2](https://github.com/contentful/ui-extensions-sdk/commit/a720fc223b19419f61fb5df917540834966dbd83))
|
|
14
|
+
|
|
15
|
+
## [3.39.1](https://github.com/contentful/ui-extensions-sdk/compare/v3.39.0...v3.39.1) (2021-09-10)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* create upload types ([#961](https://github.com/contentful/ui-extensions-sdk/issues/961)) ([a65b320](https://github.com/contentful/ui-extensions-sdk/commit/a65b32046087763708f521b5b2dbb92ac22c6579))
|
|
21
|
+
|
|
1
22
|
# [3.39.0](https://github.com/contentful/ui-extensions-sdk/compare/v3.38.0...v3.39.0) (2021-07-20)
|
|
2
23
|
|
|
3
24
|
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export declare type EntityType = 'Entry' | 'Asset';
|
|
2
2
|
export declare type TagVisibility = 'private' | 'public';
|
|
3
|
+
export interface Upload {
|
|
4
|
+
sys: {
|
|
5
|
+
id: string;
|
|
6
|
+
type: 'Upload' | string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
3
9
|
export interface SpaceMembership {
|
|
4
10
|
sys: {
|
|
5
11
|
id: string;
|
|
@@ -358,7 +364,7 @@ export interface SpaceAPI {
|
|
|
358
364
|
processAsset: <T = Object, InputArgs = any>(data: InputArgs, locale: string) => Promise<T>;
|
|
359
365
|
unarchiveAsset: <T = Object, InputArgs = any>(data: InputArgs) => Promise<T>;
|
|
360
366
|
getPublishedAssets: <T = Object, InputArgs = SearchQuery>(query?: InputArgs) => Promise<CollectionResponse<T>>;
|
|
361
|
-
createUpload: (base64data: string) =>
|
|
367
|
+
createUpload: (base64data: string) => Promise<Upload>;
|
|
362
368
|
waitUntilAssetProcessed: (assetId: string, locale: string) => Promise<void>;
|
|
363
369
|
/** Returns all users who belong to the space. */
|
|
364
370
|
getUsers: <T = Object>() => Promise<CollectionResponse<T>>;
|
|
@@ -580,11 +586,17 @@ export interface SharedEditorSDK {
|
|
|
580
586
|
export declare type CrudAction = 'create' | 'read' | 'update' | 'delete';
|
|
581
587
|
export declare type PublishableAction = 'publish' | 'unpublish';
|
|
582
588
|
export declare type ArchiveableAction = 'archive' | 'unarchive';
|
|
589
|
+
declare type JSONPatchItem = {
|
|
590
|
+
op: 'remove' | 'replace' | 'add';
|
|
591
|
+
path: string;
|
|
592
|
+
value?: any;
|
|
593
|
+
};
|
|
583
594
|
export interface AccessAPI {
|
|
584
595
|
can(action: 'read' | 'update', entity: 'EditorInterface' | EditorInterface): Promise<boolean>;
|
|
585
596
|
can<T = Object>(action: CrudAction, entity: 'ContentType' | ContentType | 'Asset' | 'Entry' | T): Promise<boolean>;
|
|
586
597
|
can<T = Object>(action: PublishableAction, entity: 'ContentType' | ContentType | 'Asset' | 'Entry' | T): Promise<boolean>;
|
|
587
598
|
can<T = Object>(action: ArchiveableAction, entity: 'Asset' | 'Entry' | T): Promise<boolean>;
|
|
599
|
+
can<T = Object>(action: 'update', entity: 'Asset' | 'Entry' | T, patch: JSONPatchItem[]): Promise<boolean>;
|
|
588
600
|
/** Whether the current user can edit app config */
|
|
589
601
|
canEditAppConfig: () => Promise<boolean>;
|
|
590
602
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentful-ui-extensions-sdk",
|
|
3
3
|
"description": "SDK to develop custom UI Extension for the Contentful Web App",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.40.1",
|
|
5
5
|
"author": "Contentful GmbH",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -38,60 +38,61 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@semantic-release/changelog": "5.0.1",
|
|
40
40
|
"@semantic-release/exec": "5.0.0",
|
|
41
|
-
"@semantic-release/git": "9.0.
|
|
42
|
-
"@testing-library/cypress": "
|
|
43
|
-
"@testing-library/dom": "
|
|
41
|
+
"@semantic-release/git": "9.0.1",
|
|
42
|
+
"@testing-library/cypress": "8.0.1",
|
|
43
|
+
"@testing-library/dom": "8.5.0",
|
|
44
44
|
"@types/async-retry": "1.4.3",
|
|
45
45
|
"@types/chai-as-promised": "7.1.4",
|
|
46
46
|
"@types/cross-spawn": "6.0.2",
|
|
47
|
-
"@types/fs-extra": "9.0.
|
|
47
|
+
"@types/fs-extra": "9.0.13",
|
|
48
48
|
"@types/jsdom": "16.2.13",
|
|
49
49
|
"@types/nanoid": "3.0.0",
|
|
50
50
|
"@types/sinon": "^10.0.0",
|
|
51
51
|
"@types/sinon-chai": "^3.2.5",
|
|
52
|
-
"@typescript-eslint/eslint-plugin": "4.
|
|
53
|
-
"@typescript-eslint/parser": "4.
|
|
54
|
-
"async-retry": "1.3.
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "4.31.2",
|
|
53
|
+
"@typescript-eslint/parser": "4.31.2",
|
|
54
|
+
"async-retry": "1.3.3",
|
|
55
55
|
"babel-eslint": "10.1.0",
|
|
56
56
|
"chai": "4.3.4",
|
|
57
57
|
"chai-as-promised": "7.1.1",
|
|
58
|
-
"contentful-management": "7.
|
|
58
|
+
"contentful-management": "7.39.1",
|
|
59
59
|
"cross-spawn": "7.0.3",
|
|
60
|
-
"cypress": "
|
|
60
|
+
"cypress": "8.4.1",
|
|
61
61
|
"cypress-multi-reporters": "1.5.0",
|
|
62
|
+
"cypress-terminal-report": "^3.3.2",
|
|
62
63
|
"dotenv": "10.0.0",
|
|
63
|
-
"eslint": "7.
|
|
64
|
+
"eslint": "7.32.0",
|
|
64
65
|
"eslint-config-prettier": "8.3.0",
|
|
65
66
|
"eslint-config-standard": "16.0.3",
|
|
66
|
-
"eslint-plugin-cypress": "2.
|
|
67
|
-
"eslint-plugin-import": "2.
|
|
67
|
+
"eslint-plugin-cypress": "2.12.1",
|
|
68
|
+
"eslint-plugin-import": "2.24.2",
|
|
68
69
|
"eslint-plugin-node": "11.1.0",
|
|
69
|
-
"eslint-plugin-prettier": "
|
|
70
|
+
"eslint-plugin-prettier": "4.0.0",
|
|
70
71
|
"eslint-plugin-promise": "5.1.0",
|
|
71
|
-
"eslint-plugin-react": "7.
|
|
72
|
+
"eslint-plugin-react": "7.26.0",
|
|
72
73
|
"eslint-plugin-standard": "5.0.0",
|
|
73
74
|
"fs-extra": "10.0.0",
|
|
74
75
|
"husky": "4.3.8",
|
|
75
|
-
"jsdom": "
|
|
76
|
-
"lint-staged": "11.
|
|
76
|
+
"jsdom": "17.0.0",
|
|
77
|
+
"lint-staged": "11.1.2",
|
|
77
78
|
"mocha": "8.4.0",
|
|
78
79
|
"mocha-junit-reporter": "2.0.0",
|
|
79
80
|
"mocha-multi-reporters": "1.5.1",
|
|
80
81
|
"mochawesome": "6.2.2",
|
|
81
82
|
"mochawesome-merge": "4.2.0",
|
|
82
83
|
"mochawesome-report-generator": "5.2.0",
|
|
83
|
-
"nanoid": "3.1.
|
|
84
|
-
"prettier": "2.
|
|
85
|
-
"rollup": "2.
|
|
84
|
+
"nanoid": "3.1.25",
|
|
85
|
+
"prettier": "2.4.1",
|
|
86
|
+
"rollup": "2.57.0",
|
|
86
87
|
"rollup-plugin-terser": "7.0.2",
|
|
87
88
|
"rollup-plugin-typescript2": "0.30.0",
|
|
88
89
|
"semantic-release": "17.4.2",
|
|
89
|
-
"sinon": "11.1.
|
|
90
|
+
"sinon": "11.1.2",
|
|
90
91
|
"sinon-chai": "3.7.0",
|
|
91
92
|
"ts-mocha": "8.0.0",
|
|
92
|
-
"ts-node": "10.1
|
|
93
|
-
"tslib": "2.3.
|
|
94
|
-
"typescript": "4.3
|
|
93
|
+
"ts-node": "10.2.1",
|
|
94
|
+
"tslib": "2.3.1",
|
|
95
|
+
"typescript": "4.4.3"
|
|
95
96
|
},
|
|
96
97
|
"husky": {
|
|
97
98
|
"hooks": {
|