contentful-management 11.66.0 → 11.67.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/README.md +13 -10
- package/dist/contentful-management.browser.js +940 -449
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +923 -450
- 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/agent-run.js +20 -0
- package/dist/es-modules/adapters/REST/endpoints/agent.js +24 -0
- package/dist/es-modules/adapters/REST/endpoints/index.js +4 -0
- package/dist/es-modules/create-environment-api.js +173 -0
- package/dist/es-modules/entities/agent-run.js +8 -0
- package/dist/es-modules/entities/agent.js +29 -0
- package/dist/es-modules/entities/index.js +4 -0
- package/dist/es-modules/plain/entities/agent-run.js +1 -0
- package/dist/es-modules/plain/entities/agent.js +1 -0
- package/dist/es-modules/plain/plain-client.js +9 -0
- package/dist/typings/adapters/REST/endpoints/agent-run.d.ts +3 -0
- package/dist/typings/adapters/REST/endpoints/agent.d.ts +4 -0
- package/dist/typings/adapters/REST/endpoints/index.d.ts +4 -0
- package/dist/typings/common-types.d.ts +45 -0
- package/dist/typings/create-environment-api.d.ts +112 -0
- package/dist/typings/entities/agent-run.d.ts +47 -0
- package/dist/typings/entities/agent.d.ts +49 -0
- package/dist/typings/entities/index.d.ts +4 -0
- package/dist/typings/export-types.d.ts +2 -0
- package/dist/typings/plain/common-types.d.ts +4 -0
- package/dist/typings/plain/entities/agent-run.d.ts +27 -0
- package/dist/typings/plain/entities/agent.d.ts +34 -0
- package/package.json +3 -3
|
@@ -4,6 +4,8 @@ export type { ApiKey, ApiKeyProps, CreateApiKeyProps } from './entities/api-key'
|
|
|
4
4
|
export type { AppAccessToken, AppAccessTokenProps, CreateAppAccessTokenProps, } from './entities/app-access-token';
|
|
5
5
|
export type { AiAction, AiActionProps, CreateAiActionProps } from './entities/ai-action';
|
|
6
6
|
export type { AiActionInvocation, AiActionInvocationProps } from './entities/ai-action-invocation';
|
|
7
|
+
export type { Agent, AgentGeneratePayload, AgentProps, AgentToolLink } from './entities/agent';
|
|
8
|
+
export type { AgentRun, AgentRunMessage, AgentRunMessagePart, AgentRunMessageRole, AgentRunMessageTextPart, AgentRunMessageToolCallPart, AgentRunProps, AgentRunQueryOptions, AgentRunStatus, } from './entities/agent-run';
|
|
7
9
|
export type { AppAction, AppActionCategoryProps, AppActionCategoryType, AppActionParameterDefinition, AppActionProps, AppActionType, CreateAppActionProps, } from './entities/app-action';
|
|
8
10
|
export type { AppActionCall, AppActionCallProps, AppActionCallErrorProps, AppActionCallRawResponseProps, AppActionCallStatus, CreateAppActionCallProps, } from './entities/app-action-call';
|
|
9
11
|
export type { AppBundle, AppBundleFile, AppBundleProps, CreateAppBundleProps, } from './entities/app-bundle';
|
|
@@ -67,6 +67,8 @@ import type { OAuthApplicationPlainClientAPI } from './entities/oauth-applicatio
|
|
|
67
67
|
import type { FunctionLogPlainClientAPI } from './entities/function-log';
|
|
68
68
|
import type { AiActionPlainClientAPI } from './entities/ai-action';
|
|
69
69
|
import type { AiActionInvocationPlainClientAPI } from './entities/ai-action-invocation';
|
|
70
|
+
import type { AgentPlainClientAPI } from './entities/agent';
|
|
71
|
+
import type { AgentRunPlainClientAPI } from './entities/agent-run';
|
|
70
72
|
import type { VectorizationStatusPlainClientAPI } from './entities/vectorization-status';
|
|
71
73
|
import type { SemanticDuplicatesPlainClientAPI } from './entities/semantic-duplicates';
|
|
72
74
|
import type { SemanticRecommendationsPlainClientAPI } from './entities/semantic-recommendations';
|
|
@@ -84,6 +86,8 @@ export type PlainClientAPI = {
|
|
|
84
86
|
};
|
|
85
87
|
aiAction: AiActionPlainClientAPI;
|
|
86
88
|
aiActionInvocation: AiActionInvocationPlainClientAPI;
|
|
89
|
+
agent: AgentPlainClientAPI;
|
|
90
|
+
agentRun: AgentRunPlainClientAPI;
|
|
87
91
|
appAction: AppActionPlainClientAPI;
|
|
88
92
|
appActionCall: AppActionCallPlainClientAPI;
|
|
89
93
|
appBundle: AppBundlePlainClientAPI;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RawAxiosRequestHeaders } from 'axios';
|
|
2
|
+
import type { CollectionProp, GetSpaceEnvironmentParams } from '../../common-types';
|
|
3
|
+
import type { AgentRunProps, AgentRunQueryOptions } from '../../entities/agent-run';
|
|
4
|
+
import type { OptionalDefaults } from '../wrappers/wrap';
|
|
5
|
+
export type AgentRunPlainClientAPI = {
|
|
6
|
+
/**
|
|
7
|
+
* Fetches an AI Agent Run.
|
|
8
|
+
* @param params Entity IDs to identify the AI Agent Run.
|
|
9
|
+
* Must include spaceId, environmentId, and runId.
|
|
10
|
+
* @param headers Optional headers for the request.
|
|
11
|
+
* @returns A promise resolving with the AI Agent Run.
|
|
12
|
+
* @throws if the request fails or the AI Agent Run is not found.
|
|
13
|
+
*/
|
|
14
|
+
get(params: OptionalDefaults<GetSpaceEnvironmentParams & {
|
|
15
|
+
runId: string;
|
|
16
|
+
}>, headers?: Partial<RawAxiosRequestHeaders>): Promise<AgentRunProps>;
|
|
17
|
+
/**
|
|
18
|
+
* Fetches all AI Agent Runs for the given space and environment.
|
|
19
|
+
* @param params Entity IDs and query options.
|
|
20
|
+
* @param headers Optional headers for the request.
|
|
21
|
+
* @returns A promise resolving with a collection of AI Agent Runs.
|
|
22
|
+
* @throws if the request fails or the entities are not found.
|
|
23
|
+
*/
|
|
24
|
+
getMany(params: OptionalDefaults<GetSpaceEnvironmentParams & {
|
|
25
|
+
query?: AgentRunQueryOptions;
|
|
26
|
+
}>, headers?: Partial<RawAxiosRequestHeaders>): Promise<CollectionProp<AgentRunProps>>;
|
|
27
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { RawAxiosRequestHeaders } from 'axios';
|
|
2
|
+
import type { CollectionProp, GetSpaceEnvironmentParams, QueryParams } from '../../common-types';
|
|
3
|
+
import type { AgentGeneratePayload, AgentProps } from '../../entities/agent';
|
|
4
|
+
import type { AgentRunProps } from '../../entities/agent-run';
|
|
5
|
+
import type { OptionalDefaults } from '../wrappers/wrap';
|
|
6
|
+
export type AgentPlainClientAPI = {
|
|
7
|
+
/**
|
|
8
|
+
* Fetches the AI Agent.
|
|
9
|
+
* @param params Entity IDs to identify the AI Agent.
|
|
10
|
+
* @returns The AI Agent.
|
|
11
|
+
* @throws if the request fails or the AI Agent is not found.
|
|
12
|
+
*/
|
|
13
|
+
get(params: OptionalDefaults<GetSpaceEnvironmentParams & {
|
|
14
|
+
agentId: string;
|
|
15
|
+
}>): Promise<AgentProps>;
|
|
16
|
+
/**
|
|
17
|
+
* Fetches all AI Agents for the given space and environment.
|
|
18
|
+
* @param params Entity IDs and query options.
|
|
19
|
+
* @returns A collection containing an array of AI Agents.
|
|
20
|
+
* @throws if the request fails or the entities are not found.
|
|
21
|
+
*/
|
|
22
|
+
getMany(params: OptionalDefaults<GetSpaceEnvironmentParams & QueryParams>): Promise<CollectionProp<AgentProps>>;
|
|
23
|
+
/**
|
|
24
|
+
* Generates a response from an AI Agent.
|
|
25
|
+
* @param params Entity IDs to identify the AI Agent.
|
|
26
|
+
* @param payload The generation payload.
|
|
27
|
+
* @param headers Optional headers for the request.
|
|
28
|
+
* @returns A promise resolving with the AI Agent generation response.
|
|
29
|
+
* @throws if the request fails or the payload is malformed.
|
|
30
|
+
*/
|
|
31
|
+
generate(params: OptionalDefaults<GetSpaceEnvironmentParams & {
|
|
32
|
+
agentId: string;
|
|
33
|
+
}>, payload: AgentGeneratePayload, headers?: Partial<RawAxiosRequestHeaders>): Promise<AgentRunProps>;
|
|
34
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentful-management",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.67.1",
|
|
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",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@contentful/rich-text-types": "^16.6.1",
|
|
64
64
|
"axios": "^1.12.2",
|
|
65
|
-
"contentful-sdk-core": "^9.
|
|
65
|
+
"contentful-sdk-core": "^9.4.1",
|
|
66
66
|
"fast-copy": "^3.0.0",
|
|
67
67
|
"globals": "^15.15.0"
|
|
68
68
|
},
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"contentful-sdk-jsdoc": "^3.1.5",
|
|
93
93
|
"cz-conventional-changelog": "^3.3.0",
|
|
94
94
|
"eslint": "^9.15.0",
|
|
95
|
-
"express": "^4.
|
|
95
|
+
"express": "^4.22.1",
|
|
96
96
|
"husky": "^9.1.7",
|
|
97
97
|
"in-publish": "^2.0.1",
|
|
98
98
|
"json-patch": "^0.7.0",
|