contentful-management 7.44.2 → 7.45.3

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.
Files changed (56) hide show
  1. package/dist/contentful-management.browser.js +52 -68
  2. package/dist/contentful-management.browser.js.map +1 -1
  3. package/dist/contentful-management.browser.min.js +1 -1
  4. package/dist/contentful-management.legacy.js +52 -68
  5. package/dist/contentful-management.legacy.js.map +1 -1
  6. package/dist/contentful-management.legacy.min.js +1 -1
  7. package/dist/contentful-management.node.js +47 -63
  8. package/dist/contentful-management.node.js.map +1 -1
  9. package/dist/contentful-management.node.min.js +1 -1
  10. package/dist/es-modules/adapters/REST/endpoints/api-key.js +1 -1
  11. package/dist/es-modules/adapters/REST/endpoints/organization.js +2 -2
  12. package/dist/es-modules/adapters/REST/endpoints/space.js +4 -4
  13. package/dist/es-modules/adapters/REST/rest-adapter.js +1 -1
  14. package/dist/es-modules/common-utils.js +1 -1
  15. package/dist/es-modules/constants/editor-interface-defaults/sidebar-defaults.js +1 -8
  16. package/dist/es-modules/contentful-management.js +1 -1
  17. package/dist/es-modules/entities/locale.js +1 -1
  18. package/dist/es-modules/plain/as-iterator.js +12 -8
  19. package/dist/typings/create-entry-api.d.ts +3 -3
  20. package/dist/typings/create-environment-api.d.ts +4 -3
  21. package/dist/typings/entities/api-key.d.ts +1 -1578
  22. package/dist/typings/entities/app-bundle.d.ts +1 -1578
  23. package/dist/typings/entities/app-definition.d.ts +1 -1578
  24. package/dist/typings/entities/app-installation.d.ts +1 -1578
  25. package/dist/typings/entities/app-upload.d.ts +1 -1578
  26. package/dist/typings/entities/asset.d.ts +1 -1577
  27. package/dist/typings/entities/comment.d.ts +1 -1578
  28. package/dist/typings/entities/content-type.d.ts +1 -1578
  29. package/dist/typings/entities/editor-interface.d.ts +8 -1585
  30. package/dist/typings/entities/entry.d.ts +1 -1578
  31. package/dist/typings/entities/environment-alias.d.ts +1 -1578
  32. package/dist/typings/entities/environment.d.ts +1 -1578
  33. package/dist/typings/entities/extension.d.ts +1 -1578
  34. package/dist/typings/entities/locale.d.ts +1 -1578
  35. package/dist/typings/entities/organization-membership.d.ts +1 -1578
  36. package/dist/typings/entities/organization.d.ts +1 -1578
  37. package/dist/typings/entities/personal-access-token.d.ts +1 -1578
  38. package/dist/typings/entities/preview-api-key.d.ts +1 -1578
  39. package/dist/typings/entities/release-action.d.ts +1 -1578
  40. package/dist/typings/entities/role.d.ts +1 -1578
  41. package/dist/typings/entities/scheduled-action.d.ts +1 -1578
  42. package/dist/typings/entities/snapshot.d.ts +1 -1578
  43. package/dist/typings/entities/space-member.d.ts +1 -1578
  44. package/dist/typings/entities/space-membership.d.ts +1 -1578
  45. package/dist/typings/entities/space.d.ts +1 -1578
  46. package/dist/typings/entities/tag.d.ts +1 -1578
  47. package/dist/typings/entities/task.d.ts +1 -1578
  48. package/dist/typings/entities/team-membership.d.ts +1 -1578
  49. package/dist/typings/entities/team-space-membership.d.ts +1 -1578
  50. package/dist/typings/entities/team.d.ts +1 -1578
  51. package/dist/typings/entities/usage.d.ts +1 -1578
  52. package/dist/typings/entities/user.d.ts +1 -1578
  53. package/dist/typings/entities/webhook.d.ts +1 -1578
  54. package/dist/typings/export-types.d.ts +1 -1
  55. package/dist/typings/plain/wrappers/wrap.d.ts +4 -4
  56. package/package.json +14 -13
@@ -13,7 +13,7 @@ export type { BulkAction, BulkActionPublishPayload, BulkActionUnpublishPayload,
13
13
  export type { Comment, CommentProps, CreateCommentProps, UpdateCommentProps, } from './entities/comment';
14
14
  export type { ContentType, ContentTypeProps, CreateContentTypeProps } from './entities/content-type';
15
15
  export type { ContentFields, ContentTypeFieldValidation } from './entities/content-type-fields';
16
- export type { EditorInterface, EditorInterfaceProps, Control, GroupControl, Editor, EditorLayoutItem, FieldItem, SidebarItem, } from './entities/editor-interface';
16
+ export type { EditorInterface, EditorInterfaceProps, Control, GroupControl, Editor, EditorLayoutItem, FieldGroupItem, FieldItem, SidebarItem, } from './entities/editor-interface';
17
17
  export type { FieldType } from './entities/field-type';
18
18
  export type { ParameterDefinition, DefinedParameters, FreeFormParameters, } from './entities/widget-parameters';
19
19
  export type { Entry, EntryProps, CreateEntryProps } from './entities/entry';
@@ -9,11 +9,11 @@ export declare type DefaultParams = {
9
9
  */
10
10
  export declare type OptionalDefaults<T> = Omit<T, keyof DefaultParams> & ('organizationId' extends keyof T ? {
11
11
  organizationId?: string;
12
- } : {}) & ('spaceId' extends keyof T ? {
12
+ } : Record<string, unknown>) & ('spaceId' extends keyof T ? {
13
13
  spaceId?: string;
14
- } : {}) & ('environmentId' extends keyof T ? {
14
+ } : Record<string, unknown>) & ('environmentId' extends keyof T ? {
15
15
  environmentId?: string;
16
- } : {});
16
+ } : Record<string, unknown>);
17
17
  /**
18
18
  * @private
19
19
  */
@@ -28,4 +28,4 @@ export declare type WrapFn<ET extends keyof MRActions, Action extends keyof MRAc
28
28
  /**
29
29
  * @private
30
30
  */
31
- export declare const wrap: <ET extends "Http" | "AppBundle" | "ApiKey" | "AppDefinition" | "AppInstallation" | "Asset" | "AppUpload" | "AppDetails" | "AppSignedRequest" | "AppSigningSecret" | "AssetKey" | "BulkAction" | "Comment" | "ContentType" | "EditorInterface" | "Environment" | "EnvironmentAlias" | "Entry" | "Extension" | "Locale" | "Organization" | "OrganizationInvitation" | "OrganizationMembership" | "PersonalAccessToken" | "PreviewApiKey" | "Release" | "ReleaseAction" | "Role" | "ScheduledAction" | "Snapshot" | "Space" | "SpaceMember" | "SpaceMembership" | "Tag" | "Task" | "Team" | "TeamMembership" | "TeamSpaceMembership" | "Upload" | "Usage" | "User" | "Webhook", Action extends keyof MRActions[ET]>({ makeRequest, defaults }: WrapParams, entityType: ET, action: Action) => WrapFn<ET, Action, "params" extends keyof MRActions[ET][Action] ? MRActions[ET][Action][keyof MRActions[ET][Action] & "params"] : undefined, "payload" extends keyof MRActions[ET][Action] ? MRActions[ET][Action][keyof MRActions[ET][Action] & "payload"] : undefined, "headers" extends keyof MRActions[ET][Action] ? MRActions[ET][Action][keyof MRActions[ET][Action] & "headers"] : undefined, MRReturn<ET, Action>>;
31
+ export declare const wrap: <ET extends keyof MRActions, Action extends keyof MRActions[ET]>({ makeRequest, defaults }: WrapParams, entityType: ET, action: Action) => WrapFn<ET, Action, "params" extends keyof MRActions[ET][Action] ? MRActions[ET][Action][keyof MRActions[ET][Action] & "params"] : undefined, "payload" extends keyof MRActions[ET][Action] ? MRActions[ET][Action][keyof MRActions[ET][Action] & "payload"] : undefined, "headers" extends keyof MRActions[ET][Action] ? MRActions[ET][Action][keyof MRActions[ET][Action] & "headers"] : undefined, MRReturn<ET, Action>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentful-management",
3
- "version": "7.44.2",
3
+ "version": "7.45.3",
4
4
  "description": "Client for Contentful's Content Management API",
5
5
  "homepage": "https://www.contentful.com/developers/documentation/content-management-api/",
6
6
  "main": "./dist/contentful-management.node.js",
@@ -31,11 +31,11 @@
31
31
  "lint": "eslint lib test --ext '.ts,.tsx,.js,.jsx'",
32
32
  "pretest": "rimraf coverage && npm run lint",
33
33
  "test": "npm run test:cover-unit && npm run test:cover-integration && npm run test:size",
34
- "test:cover-unit": "./node_modules/.bin/nyc --reporter=lcov --reporter=text --report-dir=coverage/unit npm run test:unit",
35
- "test:cover-integration": "./node_modules/.bin/nyc --reporter=lcov --reporter=text --report-dir=coverage/integration npm run test:integration",
36
- "test:unit": "BABEL_ENV=test babel-node --extensions .ts --extensions .js ./node_modules/.bin/mocha './test/unit/**/*-test.[tj]s' --config mocharc.js --require @babel/register",
34
+ "test:cover-unit": "./node_modules/.bin/nyc --reporter=lcov --reporter=text --reporter=clover --report-dir=coverage/unit npm run test:unit",
35
+ "test:cover-integration": "./node_modules/.bin/nyc --reporter=lcov --reporter=text --reporter=clover --report-dir=coverage/integration npm run test:integration",
36
+ "test:unit": "BABEL_ENV=test babel-node --extensions .ts --extensions .js ./node_modules/.bin/mocha './test/unit/**/*-test.[tj]s' --config mocharc.js --require @babel/register --reporter mocha-junit-reporter --reporter-options mochaFile=reports/unit-results.xml",
37
37
  "test:unit-watch": "BABEL_ENV=test babel-node --extensions .ts --extensions .js ./node_modules/.bin/mocha './test/unit/**/*-test.[tj]s' --config mocharc.js --watch --require @babel/register",
38
- "test:integration": "BABEL_ENV=test babel-node --extensions .ts --extensions .js ./node_modules/.bin/mocha './test/integration/*.[tj]s' --config mocharc.js --require @babel/register",
38
+ "test:integration": "BABEL_ENV=test babel-node --extensions .ts --extensions .js ./node_modules/.bin/mocha './test/integration/*.[tj]s' --config mocharc.js --require @babel/register --reporter mocha-junit-reporter --reporter-options mochaFile=reports/integration-results.xml",
39
39
  "test:integration-watch": "BABEL_ENV=test babel-node --extensions .ts --extensions .js ./node_modules/.bin/mocha './test/integration/*.[tj]s' --config mocharc.js --watch --require @babel/register",
40
40
  "test:browser": "BABEL_ENV=test karma start karma.conf.local.js --log-level info",
41
41
  "test:size": "bundlesize",
@@ -57,10 +57,10 @@
57
57
  "dependencies": {
58
58
  "@types/json-patch": "0.0.30",
59
59
  "axios": "^0.21.4",
60
- "contentful-sdk-core": "^6.10.1",
60
+ "contentful-sdk-core": "^6.10.4",
61
61
  "fast-copy": "^2.1.0",
62
62
  "lodash.isplainobject": "^4.0.6",
63
- "type-fest": "^0.21.3"
63
+ "type-fest": "^2.5.3"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@babel/cli": "^7.12.7",
@@ -79,9 +79,9 @@
79
79
  "@types/lodash": "^4.14.168",
80
80
  "@types/lodash.isplainobject": "^4.0.6",
81
81
  "@types/node": "^16.7.10",
82
- "@types/sinon": "10.0.4",
83
- "@typescript-eslint/eslint-plugin": "2.34.0",
84
- "@typescript-eslint/parser": "2.34.0",
82
+ "@types/sinon": "10.0.6",
83
+ "@typescript-eslint/eslint-plugin": "4.33.0",
84
+ "@typescript-eslint/parser": "4.33.0",
85
85
  "babel-eslint": "^10.1.0",
86
86
  "babel-loader": "^8.2.1",
87
87
  "babel-minify-webpack-plugin": "^0.3.1",
@@ -117,15 +117,16 @@
117
117
  "lodash": "^4.17.20",
118
118
  "lodash-webpack-plugin": "^0.11.5",
119
119
  "mocha": "^9.1.1",
120
+ "mocha-junit-reporter": "^2.0.2",
120
121
  "nodemon": "^2.0.7",
121
122
  "nyc": "^15.1.0",
122
123
  "prettier": "^2.0.5",
123
124
  "require-all": "^3.0.0",
124
125
  "rimraf": "^3.0.2",
125
126
  "semantic-release": "^18.0.0",
126
- "sinon": "^11.1.2",
127
- "typedoc": "0.19.2",
128
- "typescript": "^3.9.3",
127
+ "sinon": "^12.0.1",
128
+ "typedoc": "0.22.8",
129
+ "typescript": "^4.1.2",
129
130
  "webpack": "^4.46.0",
130
131
  "webpack-bundle-analyzer": "^4.4.1",
131
132
  "webpack-cli": "^4.8.0"