contentful-management 8.1.3 → 8.2.2
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/contentful-management.browser.js +59 -27
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.legacy.js +59 -27
- package/dist/contentful-management.legacy.js.map +1 -1
- package/dist/contentful-management.legacy.min.js +1 -1
- package/dist/contentful-management.node.js +58 -25
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/adapters/REST/endpoints/http.js +8 -3
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/entities/workflow-definition.js +9 -0
- package/dist/typings/adapters/REST/endpoints/http.d.ts +1 -0
- package/dist/typings/entities/workflow-definition.d.ts +29 -4
- package/package.json +1 -1
|
@@ -15,13 +15,18 @@ export var put = function put(http, _ref3, payload) {
|
|
|
15
15
|
config = _ref3.config;
|
|
16
16
|
return raw.put(http, url, payload, config);
|
|
17
17
|
};
|
|
18
|
-
export var
|
|
18
|
+
export var patch = function patch(http, _ref4, payload) {
|
|
19
19
|
var url = _ref4.url,
|
|
20
20
|
config = _ref4.config;
|
|
21
|
-
return raw.
|
|
21
|
+
return raw.patch(http, url, payload, config);
|
|
22
22
|
};
|
|
23
|
-
export var
|
|
23
|
+
export var del = function del(http, _ref5) {
|
|
24
24
|
var url = _ref5.url,
|
|
25
25
|
config = _ref5.config;
|
|
26
|
+
return raw.del(http, url, config);
|
|
27
|
+
};
|
|
28
|
+
export var request = function request(http, _ref6) {
|
|
29
|
+
var url = _ref6.url,
|
|
30
|
+
config = _ref6.config;
|
|
26
31
|
return raw.http(http, url, config);
|
|
27
32
|
};
|
|
@@ -25,7 +25,7 @@ function createClient(params) {
|
|
|
25
25
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
26
26
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
27
27
|
var userAgent = getUserAgentHeader( // @ts-expect-error
|
|
28
|
-
"".concat(sdkMain, "/").concat("8.
|
|
28
|
+
"".concat(sdkMain, "/").concat("8.2.2"), params.application, params.integration, params.feature);
|
|
29
29
|
var adapter = createAdapter(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
|
|
30
30
|
// https://github.com/microsoft/TypeScript/issues/26591
|
|
31
31
|
// @ts-expect-error
|
|
@@ -9,6 +9,15 @@ import copy from 'fast-copy';
|
|
|
9
9
|
import { wrapCollection } from '../common-utils';
|
|
10
10
|
import enhanceWithMethods from '../enhance-with-methods';
|
|
11
11
|
|
|
12
|
+
/* Workflow Step Action */
|
|
13
|
+
export var WorkflowStepActionType;
|
|
14
|
+
|
|
15
|
+
(function (WorkflowStepActionType) {
|
|
16
|
+
WorkflowStepActionType["App"] = "app";
|
|
17
|
+
WorkflowStepActionType["Email"] = "email";
|
|
18
|
+
WorkflowStepActionType["Task"] = "task";
|
|
19
|
+
})(WorkflowStepActionType || (WorkflowStepActionType = {}));
|
|
20
|
+
|
|
12
21
|
/**
|
|
13
22
|
* @private
|
|
14
23
|
*/
|
|
@@ -2,5 +2,6 @@ import { RestEndpoint } from '../types';
|
|
|
2
2
|
export declare const get: RestEndpoint<'Http', 'get'>;
|
|
3
3
|
export declare const post: RestEndpoint<'Http', 'post'>;
|
|
4
4
|
export declare const put: RestEndpoint<'Http', 'put'>;
|
|
5
|
+
export declare const patch: RestEndpoint<'Http', 'patch'>;
|
|
5
6
|
export declare const del: RestEndpoint<'Http', 'delete'>;
|
|
6
7
|
export declare const request: RestEndpoint<'Http', 'request'>;
|
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
import { BasicMetaSysProps, DefaultElements, GetSpaceEnvironmentParams, GetWorkflowDefinitionParams, Link, MakeRequest, PaginationQueryOptions, SysLink } from '../common-types';
|
|
2
2
|
import { ActionType } from './role';
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export declare enum WorkflowStepActionType {
|
|
4
|
+
App = "app",
|
|
5
|
+
Email = "email",
|
|
6
|
+
Task = "task"
|
|
7
|
+
}
|
|
8
|
+
export declare type WorkflowStepAction = WorkflowStepEmailAction | WorkflowStepTaskAction | WorkflowStepAppAction;
|
|
9
|
+
declare type EmailActionRecipient = string | Link<'User'> | Link<'Team'>;
|
|
10
|
+
declare type WorkflowStepEmailAction = {
|
|
11
|
+
type: 'email';
|
|
12
|
+
configuration: {
|
|
13
|
+
recipients: EmailActionRecipient[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
declare type WorkflowStepTaskAction = {
|
|
17
|
+
type: 'task';
|
|
18
|
+
configuration: {
|
|
19
|
+
assignee: Link<'User'> | Link<'Team'>;
|
|
20
|
+
body: string;
|
|
21
|
+
dueDate?: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
declare type WorkflowStepAppAction = {
|
|
25
|
+
type: 'app';
|
|
26
|
+
appId: string;
|
|
27
|
+
appActionId: string;
|
|
28
|
+
configuration?: {
|
|
29
|
+
body?: Record<string, any>;
|
|
30
|
+
headers?: Record<string, string>;
|
|
31
|
+
};
|
|
7
32
|
};
|
|
8
33
|
export declare type WorkflowStepPermission = {
|
|
9
34
|
effect: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentful-management",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.2",
|
|
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",
|