contentful-management 11.54.0 → 11.54.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 +320 -630
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +9 -41
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/entities/ai-action-invocation.js +0 -12
- package/dist/es-modules/entities/ai-action.js +0 -19
- package/dist/typings/common-types.d.ts +4 -2
- package/dist/typings/entities/ai-action-invocation.d.ts +2 -10
- package/dist/typings/entities/ai-action.d.ts +7 -29
- package/package.json +1 -1
|
@@ -47,7 +47,7 @@ function createClient(params, opts = {}) {
|
|
|
47
47
|
const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
48
48
|
const userAgent = getUserAgentHeader(
|
|
49
49
|
// @ts-expect-error
|
|
50
|
-
`${sdkMain}/${"11.54.
|
|
50
|
+
`${sdkMain}/${"11.54.2"}`, params.application, params.integration, params.feature);
|
|
51
51
|
const adapter = createAdapter(_objectSpread(_objectSpread({}, params), {}, {
|
|
52
52
|
userAgent
|
|
53
53
|
}));
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { freezeSys, toPlainObject } from 'contentful-sdk-core';
|
|
2
2
|
import copy from 'fast-copy';
|
|
3
3
|
import { wrapCollection } from '../common-utils';
|
|
4
|
-
export let InvocationStatus = /*#__PURE__*/function (InvocationStatus) {
|
|
5
|
-
InvocationStatus["Scheduled"] = "SCHEDULED";
|
|
6
|
-
InvocationStatus["InProgress"] = "IN_PROGRESS";
|
|
7
|
-
InvocationStatus["Failed"] = "FAILED";
|
|
8
|
-
InvocationStatus["Completed"] = "COMPLETED";
|
|
9
|
-
InvocationStatus["Cancelled"] = "CANCELLED";
|
|
10
|
-
return InvocationStatus;
|
|
11
|
-
}({});
|
|
12
|
-
export let InvocationResultType = /*#__PURE__*/function (InvocationResultType) {
|
|
13
|
-
InvocationResultType["Text"] = "text";
|
|
14
|
-
return InvocationResultType;
|
|
15
|
-
}({});
|
|
16
4
|
export const AiActionOutputFormat = {
|
|
17
5
|
RichText: 'RichText',
|
|
18
6
|
Markdown: 'Markdown',
|
|
@@ -3,25 +3,6 @@ import copy from 'fast-copy';
|
|
|
3
3
|
import { wrapCollection } from '../common-utils';
|
|
4
4
|
import enhanceWithMethods from '../enhance-with-methods';
|
|
5
5
|
import { wrapAiActionInvocation } from './ai-action-invocation';
|
|
6
|
-
export let StatusFilter = /*#__PURE__*/function (StatusFilter) {
|
|
7
|
-
StatusFilter["ALL"] = "all";
|
|
8
|
-
StatusFilter["PUBLISHED"] = "published";
|
|
9
|
-
return StatusFilter;
|
|
10
|
-
}({});
|
|
11
|
-
export let VariableType = /*#__PURE__*/function (VariableType) {
|
|
12
|
-
VariableType["RESOURCE_LINK"] = "ResourceLink";
|
|
13
|
-
VariableType["TEXT"] = "Text";
|
|
14
|
-
VariableType["STANDARD_INPUT"] = "StandardInput";
|
|
15
|
-
VariableType["LOCALE"] = "Locale";
|
|
16
|
-
VariableType["MEDIA_REFERENCE"] = "MediaReference";
|
|
17
|
-
VariableType["REFERENCE"] = "Reference";
|
|
18
|
-
VariableType["SMART_CONTEXT"] = "SmartContext";
|
|
19
|
-
return VariableType;
|
|
20
|
-
}({});
|
|
21
|
-
export let EntityTypeEntry = /*#__PURE__*/function (EntityTypeEntry) {
|
|
22
|
-
EntityTypeEntry["ENTRY"] = "Entry";
|
|
23
|
-
return EntityTypeEntry;
|
|
24
|
-
}({});
|
|
25
6
|
function createAiActionApi(makeRequest) {
|
|
26
7
|
const getParams = data => ({
|
|
27
8
|
spaceId: data.sys.space.sys.id,
|
|
@@ -62,7 +62,7 @@ import type { CreateWorkflowDefinitionParams, CreateWorkflowDefinitionProps, Del
|
|
|
62
62
|
import type { WorkflowsChangelogEntryProps, WorkflowsChangelogQueryOptions } from './entities/workflows-changelog-entry';
|
|
63
63
|
import type { CreateOAuthApplicationProps, OAuthApplicationProps, UpdateOAuthApplicationProps } from './entities/oauth-application';
|
|
64
64
|
import type { FunctionLogProps } from './entities/function-log';
|
|
65
|
-
import type { AiActionProps, CreateAiActionProps } from './entities/ai-action';
|
|
65
|
+
import type { AiActionProps, AiActionQueryOptions, CreateAiActionProps } from './entities/ai-action';
|
|
66
66
|
import type { AiActionInvocationProps, AiActionInvocationType } from './entities/ai-action-invocation';
|
|
67
67
|
export interface DefaultElements<TPlainObject extends object = object> {
|
|
68
68
|
toPlainObject(): TPlainObject;
|
|
@@ -696,7 +696,9 @@ export type MRActions = {
|
|
|
696
696
|
return: AiActionProps;
|
|
697
697
|
};
|
|
698
698
|
getMany: {
|
|
699
|
-
params: GetSpaceParams &
|
|
699
|
+
params: GetSpaceParams & {
|
|
700
|
+
query: AiActionQueryOptions;
|
|
701
|
+
};
|
|
700
702
|
return: CollectionProp<AiActionProps>;
|
|
701
703
|
};
|
|
702
704
|
create: {
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import type { DefaultElements, MakeRequest, SysLink } from '../common-types';
|
|
2
2
|
import type { Document as RichTextDocument } from '@contentful/rich-text-types';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
InProgress = "IN_PROGRESS",
|
|
6
|
-
Failed = "FAILED",
|
|
7
|
-
Completed = "COMPLETED",
|
|
8
|
-
Cancelled = "CANCELLED"
|
|
9
|
-
}
|
|
10
|
-
export declare enum InvocationResultType {
|
|
11
|
-
Text = "text"
|
|
12
|
-
}
|
|
3
|
+
export type InvocationStatus = 'SCHEDULED' | 'IN_PROGRESS' | 'FAILED' | 'COMPLETED' | 'CANCELLED';
|
|
4
|
+
export type InvocationResultType = 'text';
|
|
13
5
|
export declare const AiActionOutputFormat: {
|
|
14
6
|
readonly RichText: "RichText";
|
|
15
7
|
readonly Markdown: "Markdown";
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import type { DefaultElements, MakeRequest, MetaSysProps } from '../common-types';
|
|
1
|
+
import type { DefaultElements, Link, MakeRequest, MetaSysProps } from '../common-types';
|
|
2
2
|
import { type AiActionInvocationType, type AiActionInvocation } from './ai-action-invocation';
|
|
3
|
-
export
|
|
4
|
-
ALL = "all",
|
|
5
|
-
PUBLISHED = "published"
|
|
6
|
-
}
|
|
7
|
-
export declare enum VariableType {
|
|
8
|
-
RESOURCE_LINK = "ResourceLink",
|
|
9
|
-
TEXT = "Text",
|
|
10
|
-
STANDARD_INPUT = "StandardInput",
|
|
11
|
-
LOCALE = "Locale",
|
|
12
|
-
MEDIA_REFERENCE = "MediaReference",
|
|
13
|
-
REFERENCE = "Reference",
|
|
14
|
-
SMART_CONTEXT = "SmartContext"
|
|
15
|
-
}
|
|
16
|
-
export declare enum EntityTypeEntry {
|
|
17
|
-
ENTRY = "Entry"
|
|
18
|
-
}
|
|
3
|
+
export type VariableType = 'ResourceLink' | 'Text' | 'StandardInput' | 'Locale' | 'MediaReference' | 'Reference' | 'SmartContext';
|
|
19
4
|
export type ReferenceVariableConfiguration = {
|
|
20
|
-
allowedEntities: Array<
|
|
5
|
+
allowedEntities: Array<'Entry'>;
|
|
21
6
|
};
|
|
22
7
|
export type VariableConfiguration = {
|
|
23
8
|
strict: boolean;
|
|
@@ -49,17 +34,10 @@ export type AiActionTestCase = {
|
|
|
49
34
|
entityId?: string;
|
|
50
35
|
};
|
|
51
36
|
};
|
|
52
|
-
export type SysLinkUserOrApp = {
|
|
53
|
-
sys: {
|
|
54
|
-
id: string;
|
|
55
|
-
linkType: 'User' | 'App';
|
|
56
|
-
type: 'Link';
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
37
|
export interface AiActionQueryOptions {
|
|
60
38
|
limit?: number;
|
|
61
39
|
skip?: number;
|
|
62
|
-
status?:
|
|
40
|
+
status?: 'all' | 'published';
|
|
63
41
|
}
|
|
64
42
|
export type AiActionProps = {
|
|
65
43
|
sys: MetaSysProps & {
|
|
@@ -69,9 +47,9 @@ export type AiActionProps = {
|
|
|
69
47
|
id: string;
|
|
70
48
|
};
|
|
71
49
|
};
|
|
72
|
-
publishedBy?:
|
|
73
|
-
updatedBy:
|
|
74
|
-
createdBy:
|
|
50
|
+
publishedBy?: Link<'User'> | Link<'AppDefinition'>;
|
|
51
|
+
updatedBy: Link<'User'> | Link<'AppDefinition'>;
|
|
52
|
+
createdBy: Link<'User'> | Link<'AppDefinition'>;
|
|
75
53
|
publishedVersion?: number;
|
|
76
54
|
version: number;
|
|
77
55
|
publishedAt?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentful-management",
|
|
3
|
-
"version": "11.54.
|
|
3
|
+
"version": "11.54.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",
|