@takeshape/schema 11.108.1 → 11.113.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/dist/agents.js +4 -1
- package/dist/auth-schemas.d.ts +3 -0
- package/dist/auth-utils.d.ts +5 -0
- package/dist/auth-utils.js +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/migration/index.d.ts +2 -0
- package/dist/migration/index.js +5 -1
- package/dist/migration/to/v3.57.0.js +1 -1
- package/dist/migration/to/v3.58.0.d.ts +4 -0
- package/dist/migration/to/v3.58.0.js +10 -0
- package/dist/migration/to/v3.59.0.d.ts +4 -0
- package/dist/migration/to/v3.59.0.js +10 -0
- package/dist/project-schema/index.d.ts +7 -1
- package/dist/project-schema/index.js +3 -1
- package/dist/project-schema/latest.d.ts +17 -1
- package/dist/project-schema/migrate.js +7 -1
- package/dist/project-schema/v3.57.0.d.ts +4 -0
- package/dist/project-schema/v3.58.0.d.ts +2601 -0
- package/dist/project-schema/v3.58.0.js +7 -0
- package/dist/project-schema/v3.59.0.d.ts +2613 -0
- package/dist/project-schema/v3.59.0.js +7 -0
- package/dist/resolvers/ai/agent-chat-response.d.ts +18 -1
- package/dist/resolvers/ai/agent-message-payload.d.ts +13 -3
- package/dist/resolvers/ai/agent-message-payload.js +9 -1
- package/dist/resolvers/ai/agent-session-payload.d.ts +15 -1
- package/dist/resolvers/ai/agent-session-payload.js +18 -1
- package/dist/resolvers/ai/create-agent-session-response.d.ts +17 -0
- package/dist/resolvers/ai/get-agent-message-response.d.ts +19 -1
- package/dist/resolvers/ai/get-agent-message-response.js +1 -1
- package/dist/resolvers/ai/inspect-agent-response.d.ts +14 -0
- package/dist/resolvers/ai/send-agent-message-args.d.ts +9 -0
- package/dist/resolvers/ai/send-agent-message-args.js +4 -0
- package/dist/resolvers/ai/send-agent-message-response.d.ts +15 -1
- package/dist/schemas/auth-schemas.json +9 -0
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.js +6 -2
- package/dist/schemas/project-schema/latest.json +23 -2
- package/dist/schemas/project-schema/v3.57.0.json +5 -0
- package/dist/schemas/project-schema/v3.58.0.json +4815 -0
- package/dist/schemas/project-schema/v3.59.0.json +4831 -0
- package/dist/schemas/project-schema.json +6 -0
- package/dist/util/expressions.js +0 -3
- package/dist/util/merge.js +0 -2
- package/dist/validate/validate.d.ts +1 -0
- package/dist/validate/validate.js +1 -1
- package/examples/latest/agent-schema.json +1 -1
- package/examples/latest/all-fields-shapes-inline.json +1 -1
- package/examples/latest/all-fields-shapes.json +1 -1
- package/examples/latest/betzino.json +1 -1
- package/examples/latest/blog-schema.json +1 -1
- package/examples/latest/brewery-schema.json +1 -1
- package/examples/latest/clear-cache-schema.json +1 -1
- package/examples/latest/complex-project-schema.json +1 -1
- package/examples/latest/complex-schema.json +1 -1
- package/examples/latest/edit-schema.json +1 -1
- package/examples/latest/fabric-ecommerce.json +1 -1
- package/examples/latest/frank-and-fred-schema.json +1 -1
- package/examples/latest/klirr-schema.json +1 -1
- package/examples/latest/layers/rick-and-morty-layer.json +1 -1
- package/examples/latest/layers/shopify-layer-2023-01.json +1 -1
- package/examples/latest/layers/shopify-storefront-2023-04.json +1 -1
- package/examples/latest/layers/wordpress-2024-01.json +1 -1
- package/examples/latest/massive-schema.json +1 -1
- package/examples/latest/mill-components-schema.json +1 -1
- package/examples/latest/nested-shape-arrays.json +1 -1
- package/examples/latest/one-earth.json +1 -1
- package/examples/latest/pet-oneof-array.json +1 -1
- package/examples/latest/post-schema.json +1 -1
- package/examples/latest/pruned-shopify-product-schema.json +1 -1
- package/examples/latest/rag-example.json +1 -1
- package/examples/latest/real-world-schema.json +1 -1
- package/examples/latest/recursive-repeater-schema.json +1 -1
- package/examples/latest/recursive-schema.json +1 -1
- package/examples/latest/rick-and-morty-ast.json +1 -1
- package/examples/latest/rick-and-morty-graphql.json +1 -1
- package/examples/latest/rick-and-morty-rest.json +1 -1
- package/examples/latest/rick-and-morty-user-schema.json +1 -1
- package/examples/latest/rick-and-morty-with-indexing.json +1 -1
- package/examples/latest/schema-where-filter.json +1 -1
- package/examples/latest/schema-with-repeater-draftjs.json +1 -1
- package/examples/latest/schema-with-rick-and-morty.json +1 -1
- package/examples/latest/shape-books-v3_2_0.json +1 -1
- package/examples/latest/shape-books.json +1 -1
- package/examples/latest/shape-editor-schema-edited.json +1 -1
- package/examples/latest/shape-editor-schema-initial.json +1 -1
- package/examples/latest/shapedb-crud-every-prop-type.json +1 -1
- package/examples/latest/shopify-lookbook.json +1 -1
- package/examples/latest/shopify-product-2022-07.json +1 -1
- package/examples/latest/shopify-product-2023-04.json +1 -1
- package/examples/latest/shopify-store-with-widget.json +1 -1
- package/examples/latest/stripe-product-runtime-schema.json +1 -1
- package/examples/latest/stripe-starter-resolved.json +1 -1
- package/examples/latest/user-schema-no-required.json +1 -1
- package/examples/latest/user-schema-with-defaults.json +1 -1
- package/examples/latest/valvoline-ai-demo.json +1 -1
- package/examples/latest/vector-search-schema.json +1 -1
- package/package.json +6 -6
package/dist/agents.js
CHANGED
|
@@ -145,7 +145,10 @@ export function getAgentFeatures(agents) {
|
|
|
145
145
|
type: 'object',
|
|
146
146
|
extends: [
|
|
147
147
|
{
|
|
148
|
-
...sendAgentMessageArgs.propertySchema
|
|
148
|
+
...sendAgentMessageArgs.propertySchema,
|
|
149
|
+
required: agent.protection?.enabled
|
|
150
|
+
? [...sendAgentMessageArgs.propertySchema.required, 'token']
|
|
151
|
+
: sendAgentMessageArgs.propertySchema.required
|
|
149
152
|
},
|
|
150
153
|
{
|
|
151
154
|
'@ref': inputConfig.args
|
package/dist/auth-schemas.d.ts
CHANGED
|
@@ -112,6 +112,9 @@ export interface User {
|
|
|
112
112
|
fullName: string;
|
|
113
113
|
created: number;
|
|
114
114
|
updated: number;
|
|
115
|
+
requiresEmailValidation?: boolean;
|
|
116
|
+
emailValidationToken?: string;
|
|
117
|
+
inviteCode?: string;
|
|
115
118
|
firstTime: boolean;
|
|
116
119
|
avatarPath?: string;
|
|
117
120
|
intercomHash?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './agents.ts';
|
|
2
2
|
export * from './api-version.ts';
|
|
3
3
|
export type { AccessPolicyDocument, ApiKey, Condition, Role, RoleImport, RoleInput, Statement, User, UserPermission } from './auth-schemas.ts';
|
|
4
|
+
export * from './auth-utils.ts';
|
|
4
5
|
export * from './builtin-schema.ts';
|
|
5
6
|
export * from './constants.ts';
|
|
6
7
|
export * from './content-schema-transform.ts';
|
package/dist/index.js
CHANGED
|
@@ -64,6 +64,8 @@ export declare const migrateTo: {
|
|
|
64
64
|
'v3.55.0': import("./types.ts").MigrateFunction<import("../index.ts").ProjectSchemaJSONV3_54_0, import("../index.ts").ProjectSchemaJSONV3_55_0>;
|
|
65
65
|
'v3.56.0': import("./types.ts").MigrateFunction<import("../index.ts").ProjectSchemaJSONV3_55_0, import("../index.ts").ProjectSchemaJSONV3_56_0>;
|
|
66
66
|
'v3.57.0': import("./types.ts").MigrateFunction<import("../index.ts").ProjectSchemaJSONV3_56_0, import("../index.ts").ProjectSchemaJSONV3_57_0>;
|
|
67
|
+
'v3.58.0': import("./types.ts").MigrateFunction<import("../index.ts").ProjectSchemaJSONV3_57_0, import("../index.ts").ProjectSchemaJSONV3_58_0>;
|
|
68
|
+
'v3.59.0': import("./types.ts").MigrateFunction<import("../index.ts").ProjectSchemaJSONV3_58_0, import("../index.ts").ProjectSchemaJSONV3_59_0>;
|
|
67
69
|
};
|
|
68
70
|
export * from './utils.ts';
|
|
69
71
|
export declare const listTypePrefix = "PaginatedList";
|
package/dist/migration/index.js
CHANGED
|
@@ -63,6 +63,8 @@ import migrateToV3_54_0 from "./to/v3.54.0.js";
|
|
|
63
63
|
import migrateToV3_55_0 from "./to/v3.55.0.js";
|
|
64
64
|
import migrateToV3_56_0 from "./to/v3.56.0.js";
|
|
65
65
|
import migrateToV3_57_0 from "./to/v3.57.0.js";
|
|
66
|
+
import migrateToV3_58_0 from "./to/v3.58.0.js";
|
|
67
|
+
import migrateToV3_59_0 from "./to/v3.59.0.js";
|
|
66
68
|
export const migrateTo = {
|
|
67
69
|
'v3.0.0': migrateToV3_0_0,
|
|
68
70
|
'v3.1.0': migrateToV3_1_0,
|
|
@@ -128,7 +130,9 @@ export const migrateTo = {
|
|
|
128
130
|
'v3.54.0': migrateToV3_54_0,
|
|
129
131
|
'v3.55.0': migrateToV3_55_0,
|
|
130
132
|
'v3.56.0': migrateToV3_56_0,
|
|
131
|
-
'v3.57.0': migrateToV3_57_0
|
|
133
|
+
'v3.57.0': migrateToV3_57_0,
|
|
134
|
+
'v3.58.0': migrateToV3_58_0,
|
|
135
|
+
'v3.59.0': migrateToV3_59_0
|
|
132
136
|
};
|
|
133
137
|
export * from "./utils.js";
|
|
134
138
|
export const listTypePrefix = 'PaginatedList';
|
|
@@ -7,7 +7,7 @@ const migrate = async (context, projectSchema) => {
|
|
|
7
7
|
};
|
|
8
8
|
if (ai) {
|
|
9
9
|
const migratedWithAi = Object.assign({ ...migrated }, ai);
|
|
10
|
-
const { valid } = await validateSchema({ ignoreEntitlements: true }, migratedWithAi);
|
|
10
|
+
const { valid } = await validateSchema({ ignoreEntitlements: true, structureOnly: true }, migratedWithAi);
|
|
11
11
|
if (valid) {
|
|
12
12
|
return migratedWithAi;
|
|
13
13
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ProjectSchemaJSONV3_57_0, ProjectSchemaJSONV3_58_0 } from '../../project-schema/index.ts';
|
|
2
|
+
import type { MigrateFunction } from '../types.ts';
|
|
3
|
+
declare const migrate: MigrateFunction<ProjectSchemaJSONV3_57_0, ProjectSchemaJSONV3_58_0>;
|
|
4
|
+
export default migrate;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ProjectSchemaJSONV3_58_0, ProjectSchemaJSONV3_59_0 } from '../../project-schema/index.ts';
|
|
2
|
+
import type { MigrateFunction } from '../types.ts';
|
|
3
|
+
declare const migrate: MigrateFunction<ProjectSchemaJSONV3_58_0, ProjectSchemaJSONV3_59_0>;
|
|
4
|
+
export default migrate;
|
|
@@ -65,6 +65,8 @@ export type * from './v3.54.0.ts';
|
|
|
65
65
|
export type * from './v3.55.0.ts';
|
|
66
66
|
export type * from './v3.56.0.ts';
|
|
67
67
|
export type * from './v3.57.0.ts';
|
|
68
|
+
export type * from './v3.58.0.ts';
|
|
69
|
+
export type * from './v3.59.0.ts';
|
|
68
70
|
export type * from './v4.0.0.ts';
|
|
69
71
|
import { ProjectSchemaJSONV1_0_0 } from './v1.0.0.ts';
|
|
70
72
|
import { ProjectSchemaJSONV3_0_0 } from './v3.0.0.ts';
|
|
@@ -132,9 +134,11 @@ import { ProjectSchemaJSONV3_54_0 } from './v3.54.0.ts';
|
|
|
132
134
|
import { ProjectSchemaJSONV3_55_0 } from './v3.55.0.ts';
|
|
133
135
|
import { ProjectSchemaJSONV3_56_0 } from './v3.56.0.ts';
|
|
134
136
|
import { ProjectSchemaJSONV3_57_0 } from './v3.57.0.ts';
|
|
137
|
+
import { ProjectSchemaJSONV3_58_0 } from './v3.58.0.ts';
|
|
138
|
+
import { ProjectSchemaJSONV3_59_0 } from './v3.59.0.ts';
|
|
135
139
|
import { ProjectSchemaJSONV4_0_0 } from './v4.0.0.ts';
|
|
136
140
|
import { ProjectSchemaJSON } from './latest.ts';
|
|
137
|
-
export type AnyProjectSchemaJSON = ProjectSchemaJSONV1_0_0 | ProjectSchemaJSONV3_0_0 | ProjectSchemaJSONV3_1_0 | ProjectSchemaJSONV3_2_0 | ProjectSchemaJSONV3_3_0 | ProjectSchemaJSONV3_4_0 | ProjectSchemaJSONV3_5_0 | ProjectSchemaJSONV3_5_1 | ProjectSchemaJSONV3_6_0 | ProjectSchemaJSONV3_7_0 | ProjectSchemaJSONV3_8_0 | ProjectSchemaJSONV3_9_0 | ProjectSchemaJSONV3_10_0 | ProjectSchemaJSONV3_11_0 | ProjectSchemaJSONV3_12_0 | ProjectSchemaJSONV3_12_1 | ProjectSchemaJSONV3_12_2 | ProjectSchemaJSONV3_12_3 | ProjectSchemaJSONV3_13_0 | ProjectSchemaJSONV3_14_0 | ProjectSchemaJSONV3_15_0 | ProjectSchemaJSONV3_16_0 | ProjectSchemaJSONV3_17_0 | ProjectSchemaJSONV3_17_1 | ProjectSchemaJSONV3_18_0 | ProjectSchemaJSONV3_18_1 | ProjectSchemaJSONV3_18_2 | ProjectSchemaJSONV3_19_0 | ProjectSchemaJSONV3_20_0 | ProjectSchemaJSONV3_21_0 | ProjectSchemaJSONV3_22_0 | ProjectSchemaJSONV3_23_0 | ProjectSchemaJSONV3_24_0 | ProjectSchemaJSONV3_25_0 | ProjectSchemaJSONV3_26_0 | ProjectSchemaJSONV3_27_0 | ProjectSchemaJSONV3_28_0 | ProjectSchemaJSONV3_29_0 | ProjectSchemaJSONV3_30_0 | ProjectSchemaJSONV3_31_0 | ProjectSchemaJSONV3_32_0 | ProjectSchemaJSONV3_33_0 | ProjectSchemaJSONV3_34_0 | ProjectSchemaJSONV3_35_0 | ProjectSchemaJSONV3_36_0 | ProjectSchemaJSONV3_37_0 | ProjectSchemaJSONV3_38_0 | ProjectSchemaJSONV3_39_0 | ProjectSchemaJSONV3_40_0 | ProjectSchemaJSONV3_41_0 | ProjectSchemaJSONV3_42_0 | ProjectSchemaJSONV3_43_0 | ProjectSchemaJSONV3_44_0 | ProjectSchemaJSONV3_45_0 | ProjectSchemaJSONV3_46_0 | ProjectSchemaJSONV3_47_0 | ProjectSchemaJSONV3_48_0 | ProjectSchemaJSONV3_49_0 | ProjectSchemaJSONV3_50_0 | ProjectSchemaJSONV3_51_0 | ProjectSchemaJSONV3_52_0 | ProjectSchemaJSONV3_53_0 | ProjectSchemaJSONV3_54_0 | ProjectSchemaJSONV3_55_0 | ProjectSchemaJSONV3_56_0 | ProjectSchemaJSONV3_57_0 | ProjectSchemaJSONV4_0_0 | ProjectSchemaJSON;
|
|
141
|
+
export type AnyProjectSchemaJSON = ProjectSchemaJSONV1_0_0 | ProjectSchemaJSONV3_0_0 | ProjectSchemaJSONV3_1_0 | ProjectSchemaJSONV3_2_0 | ProjectSchemaJSONV3_3_0 | ProjectSchemaJSONV3_4_0 | ProjectSchemaJSONV3_5_0 | ProjectSchemaJSONV3_5_1 | ProjectSchemaJSONV3_6_0 | ProjectSchemaJSONV3_7_0 | ProjectSchemaJSONV3_8_0 | ProjectSchemaJSONV3_9_0 | ProjectSchemaJSONV3_10_0 | ProjectSchemaJSONV3_11_0 | ProjectSchemaJSONV3_12_0 | ProjectSchemaJSONV3_12_1 | ProjectSchemaJSONV3_12_2 | ProjectSchemaJSONV3_12_3 | ProjectSchemaJSONV3_13_0 | ProjectSchemaJSONV3_14_0 | ProjectSchemaJSONV3_15_0 | ProjectSchemaJSONV3_16_0 | ProjectSchemaJSONV3_17_0 | ProjectSchemaJSONV3_17_1 | ProjectSchemaJSONV3_18_0 | ProjectSchemaJSONV3_18_1 | ProjectSchemaJSONV3_18_2 | ProjectSchemaJSONV3_19_0 | ProjectSchemaJSONV3_20_0 | ProjectSchemaJSONV3_21_0 | ProjectSchemaJSONV3_22_0 | ProjectSchemaJSONV3_23_0 | ProjectSchemaJSONV3_24_0 | ProjectSchemaJSONV3_25_0 | ProjectSchemaJSONV3_26_0 | ProjectSchemaJSONV3_27_0 | ProjectSchemaJSONV3_28_0 | ProjectSchemaJSONV3_29_0 | ProjectSchemaJSONV3_30_0 | ProjectSchemaJSONV3_31_0 | ProjectSchemaJSONV3_32_0 | ProjectSchemaJSONV3_33_0 | ProjectSchemaJSONV3_34_0 | ProjectSchemaJSONV3_35_0 | ProjectSchemaJSONV3_36_0 | ProjectSchemaJSONV3_37_0 | ProjectSchemaJSONV3_38_0 | ProjectSchemaJSONV3_39_0 | ProjectSchemaJSONV3_40_0 | ProjectSchemaJSONV3_41_0 | ProjectSchemaJSONV3_42_0 | ProjectSchemaJSONV3_43_0 | ProjectSchemaJSONV3_44_0 | ProjectSchemaJSONV3_45_0 | ProjectSchemaJSONV3_46_0 | ProjectSchemaJSONV3_47_0 | ProjectSchemaJSONV3_48_0 | ProjectSchemaJSONV3_49_0 | ProjectSchemaJSONV3_50_0 | ProjectSchemaJSONV3_51_0 | ProjectSchemaJSONV3_52_0 | ProjectSchemaJSONV3_53_0 | ProjectSchemaJSONV3_54_0 | ProjectSchemaJSONV3_55_0 | ProjectSchemaJSONV3_56_0 | ProjectSchemaJSONV3_57_0 | ProjectSchemaJSONV3_58_0 | ProjectSchemaJSONV3_59_0 | ProjectSchemaJSONV4_0_0 | ProjectSchemaJSON;
|
|
138
142
|
export declare const isProjectSchemaJSONV1_0_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV1_0_0;
|
|
139
143
|
export declare const isProjectSchemaJSONV3_0_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_0_0;
|
|
140
144
|
export declare const isProjectSchemaJSONV3_1_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_1_0;
|
|
@@ -201,5 +205,7 @@ export declare const isProjectSchemaJSONV3_54_0: (projectSchema: AnyProjectSchem
|
|
|
201
205
|
export declare const isProjectSchemaJSONV3_55_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_55_0;
|
|
202
206
|
export declare const isProjectSchemaJSONV3_56_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_56_0;
|
|
203
207
|
export declare const isProjectSchemaJSONV3_57_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_57_0;
|
|
208
|
+
export declare const isProjectSchemaJSONV3_58_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_58_0;
|
|
209
|
+
export declare const isProjectSchemaJSONV3_59_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_59_0;
|
|
204
210
|
export declare const isLatestProjectSchemaJSON: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSON;
|
|
205
211
|
export declare const isProjectSchemaJSONV4_0_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV4_0_0;
|
|
@@ -77,5 +77,7 @@ export const isProjectSchemaJSONV3_54_0 = createVersionPredicate('3.54.0');
|
|
|
77
77
|
export const isProjectSchemaJSONV3_55_0 = createVersionPredicate('3.55.0');
|
|
78
78
|
export const isProjectSchemaJSONV3_56_0 = createVersionPredicate('3.56.0');
|
|
79
79
|
export const isProjectSchemaJSONV3_57_0 = createVersionPredicate('3.57.0');
|
|
80
|
-
export const
|
|
80
|
+
export const isProjectSchemaJSONV3_58_0 = createVersionPredicate('3.58.0');
|
|
81
|
+
export const isProjectSchemaJSONV3_59_0 = createVersionPredicate('3.59.0');
|
|
82
|
+
export const isLatestProjectSchemaJSON = createVersionPredicate('3.59.0');
|
|
81
83
|
export const isProjectSchemaJSONV4_0_0 = createVersionPredicate('4.0.0');
|
|
@@ -483,6 +483,10 @@ export type Variables1 = AgentVariable[];
|
|
|
483
483
|
* via the `definition` "historyStrategyTransform".
|
|
484
484
|
*/
|
|
485
485
|
export type HistoryStrategyTransform = HistoryStrategyTransformNone | HistoryStrategyTransformReplace | HistoryStrategyTransformSummarize;
|
|
486
|
+
/**
|
|
487
|
+
* Enabling this will require a proof-of-work token to be included with each request. This will prevent abuse and spam.
|
|
488
|
+
*/
|
|
489
|
+
export type EnableAgentAbuseProtection = boolean;
|
|
486
490
|
/**
|
|
487
491
|
* The human-readable name of the Guard.
|
|
488
492
|
*/
|
|
@@ -673,7 +677,7 @@ export interface ProjectSchemaJSON {
|
|
|
673
677
|
/**
|
|
674
678
|
* The version of the schema format your project is using. We increase the version as we make breaking changes to the schema format.
|
|
675
679
|
*/
|
|
676
|
-
schemaVersion: '3.
|
|
680
|
+
schemaVersion: '3.59.0';
|
|
677
681
|
/**
|
|
678
682
|
* The ID of the TakeShape project this schema belongs to.
|
|
679
683
|
*/
|
|
@@ -1786,6 +1790,10 @@ export interface ShapeCacheConfig {
|
|
|
1786
1790
|
* Number of seconds this Shape should be cached. Default 0.
|
|
1787
1791
|
*/
|
|
1788
1792
|
maxAge?: number;
|
|
1793
|
+
/**
|
|
1794
|
+
* Requests after maxAge will send a request to origin to revalidate while serving stale content for this duration in the meantime.
|
|
1795
|
+
*/
|
|
1796
|
+
staleWhileRevalidate?: number;
|
|
1789
1797
|
}
|
|
1790
1798
|
/**
|
|
1791
1799
|
* This interface was referenced by `ProjectSchemaJSON`'s JSON-Schema
|
|
@@ -2014,6 +2022,7 @@ export interface AgentJSON {
|
|
|
2014
2022
|
states: AgentStates;
|
|
2015
2023
|
guards?: AgentGuard[];
|
|
2016
2024
|
historyStrategies?: HistoryStrategyMap;
|
|
2025
|
+
protection?: AgentProtection;
|
|
2017
2026
|
}
|
|
2018
2027
|
/**
|
|
2019
2028
|
* This interface was referenced by `ProjectSchemaJSON`'s JSON-Schema
|
|
@@ -2300,6 +2309,13 @@ export interface HistoryStrategyTransformSummarize {
|
|
|
2300
2309
|
tools?: AgentToolConfig[];
|
|
2301
2310
|
options?: AgentGenerateOptions;
|
|
2302
2311
|
}
|
|
2312
|
+
/**
|
|
2313
|
+
* This interface was referenced by `ProjectSchemaJSON`'s JSON-Schema
|
|
2314
|
+
* via the `definition` "agentProtection".
|
|
2315
|
+
*/
|
|
2316
|
+
export interface AgentProtection {
|
|
2317
|
+
enabled: EnableAgentAbuseProtection;
|
|
2318
|
+
}
|
|
2303
2319
|
/**
|
|
2304
2320
|
* This interface was referenced by `ProjectSchemaJSON`'s JSON-Schema
|
|
2305
2321
|
* via the `definition` "guardMap".
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { migrateTo } from "../migration/index.js";
|
|
2
|
-
import { isProjectSchemaJSONV1_0_0, isProjectSchemaJSONV3_0_0, isProjectSchemaJSONV3_1_0, isProjectSchemaJSONV3_2_0, isProjectSchemaJSONV3_3_0, isProjectSchemaJSONV3_4_0, isProjectSchemaJSONV3_5_0, isProjectSchemaJSONV3_5_1, isProjectSchemaJSONV3_6_0, isProjectSchemaJSONV3_7_0, isProjectSchemaJSONV3_8_0, isProjectSchemaJSONV3_9_0, isProjectSchemaJSONV3_10_0, isProjectSchemaJSONV3_11_0, isProjectSchemaJSONV3_12_0, isProjectSchemaJSONV3_12_1, isProjectSchemaJSONV3_12_2, isProjectSchemaJSONV3_12_3, isProjectSchemaJSONV3_13_0, isProjectSchemaJSONV3_14_0, isProjectSchemaJSONV3_15_0, isProjectSchemaJSONV3_16_0, isProjectSchemaJSONV3_17_0, isProjectSchemaJSONV3_17_1, isProjectSchemaJSONV3_18_0, isProjectSchemaJSONV3_18_1, isProjectSchemaJSONV3_18_2, isProjectSchemaJSONV3_19_0, isProjectSchemaJSONV3_20_0, isProjectSchemaJSONV3_21_0, isProjectSchemaJSONV3_22_0, isProjectSchemaJSONV3_23_0, isProjectSchemaJSONV3_24_0, isProjectSchemaJSONV3_25_0, isProjectSchemaJSONV3_26_0, isProjectSchemaJSONV3_27_0, isProjectSchemaJSONV3_28_0, isProjectSchemaJSONV3_29_0, isProjectSchemaJSONV3_30_0, isProjectSchemaJSONV3_31_0, isProjectSchemaJSONV3_32_0, isProjectSchemaJSONV3_33_0, isProjectSchemaJSONV3_34_0, isProjectSchemaJSONV3_35_0, isProjectSchemaJSONV3_36_0, isProjectSchemaJSONV3_37_0, isProjectSchemaJSONV3_38_0, isProjectSchemaJSONV3_39_0, isProjectSchemaJSONV3_40_0, isProjectSchemaJSONV3_41_0, isProjectSchemaJSONV3_42_0, isProjectSchemaJSONV3_43_0, isProjectSchemaJSONV3_44_0, isProjectSchemaJSONV3_45_0, isProjectSchemaJSONV3_46_0, isProjectSchemaJSONV3_47_0, isProjectSchemaJSONV3_48_0, isProjectSchemaJSONV3_49_0, isProjectSchemaJSONV3_50_0, isProjectSchemaJSONV3_51_0, isProjectSchemaJSONV3_52_0, isProjectSchemaJSONV3_53_0, isProjectSchemaJSONV3_54_0, isProjectSchemaJSONV3_55_0, isProjectSchemaJSONV3_56_0, isProjectSchemaJSONV4_0_0, isLatestProjectSchemaJSON } from "./index.js";
|
|
2
|
+
import { isProjectSchemaJSONV1_0_0, isProjectSchemaJSONV3_0_0, isProjectSchemaJSONV3_1_0, isProjectSchemaJSONV3_2_0, isProjectSchemaJSONV3_3_0, isProjectSchemaJSONV3_4_0, isProjectSchemaJSONV3_5_0, isProjectSchemaJSONV3_5_1, isProjectSchemaJSONV3_6_0, isProjectSchemaJSONV3_7_0, isProjectSchemaJSONV3_8_0, isProjectSchemaJSONV3_9_0, isProjectSchemaJSONV3_10_0, isProjectSchemaJSONV3_11_0, isProjectSchemaJSONV3_12_0, isProjectSchemaJSONV3_12_1, isProjectSchemaJSONV3_12_2, isProjectSchemaJSONV3_12_3, isProjectSchemaJSONV3_13_0, isProjectSchemaJSONV3_14_0, isProjectSchemaJSONV3_15_0, isProjectSchemaJSONV3_16_0, isProjectSchemaJSONV3_17_0, isProjectSchemaJSONV3_17_1, isProjectSchemaJSONV3_18_0, isProjectSchemaJSONV3_18_1, isProjectSchemaJSONV3_18_2, isProjectSchemaJSONV3_19_0, isProjectSchemaJSONV3_20_0, isProjectSchemaJSONV3_21_0, isProjectSchemaJSONV3_22_0, isProjectSchemaJSONV3_23_0, isProjectSchemaJSONV3_24_0, isProjectSchemaJSONV3_25_0, isProjectSchemaJSONV3_26_0, isProjectSchemaJSONV3_27_0, isProjectSchemaJSONV3_28_0, isProjectSchemaJSONV3_29_0, isProjectSchemaJSONV3_30_0, isProjectSchemaJSONV3_31_0, isProjectSchemaJSONV3_32_0, isProjectSchemaJSONV3_33_0, isProjectSchemaJSONV3_34_0, isProjectSchemaJSONV3_35_0, isProjectSchemaJSONV3_36_0, isProjectSchemaJSONV3_37_0, isProjectSchemaJSONV3_38_0, isProjectSchemaJSONV3_39_0, isProjectSchemaJSONV3_40_0, isProjectSchemaJSONV3_41_0, isProjectSchemaJSONV3_42_0, isProjectSchemaJSONV3_43_0, isProjectSchemaJSONV3_44_0, isProjectSchemaJSONV3_45_0, isProjectSchemaJSONV3_46_0, isProjectSchemaJSONV3_47_0, isProjectSchemaJSONV3_48_0, isProjectSchemaJSONV3_49_0, isProjectSchemaJSONV3_50_0, isProjectSchemaJSONV3_51_0, isProjectSchemaJSONV3_52_0, isProjectSchemaJSONV3_53_0, isProjectSchemaJSONV3_54_0, isProjectSchemaJSONV3_55_0, isProjectSchemaJSONV3_56_0, isProjectSchemaJSONV3_57_0, isProjectSchemaJSONV3_58_0, isProjectSchemaJSONV4_0_0, isLatestProjectSchemaJSON } from "./index.js";
|
|
3
3
|
export async function migrateToLatestProjectSchema(context, projectSchema) {
|
|
4
4
|
if (isLatestProjectSchemaJSON(projectSchema)) {
|
|
5
5
|
return projectSchema;
|
|
@@ -199,6 +199,12 @@ export async function migrateToLatestProjectSchema(context, projectSchema) {
|
|
|
199
199
|
if (isProjectSchemaJSONV3_56_0(projectSchema)) {
|
|
200
200
|
projectSchema = await migrateTo['v3.57.0'](context, projectSchema);
|
|
201
201
|
}
|
|
202
|
+
if (isProjectSchemaJSONV3_57_0(projectSchema)) {
|
|
203
|
+
projectSchema = await migrateTo['v3.58.0'](context, projectSchema);
|
|
204
|
+
}
|
|
205
|
+
if (isProjectSchemaJSONV3_58_0(projectSchema)) {
|
|
206
|
+
projectSchema = await migrateTo['v3.59.0'](context, projectSchema);
|
|
207
|
+
}
|
|
202
208
|
if (isProjectSchemaJSONV4_0_0(projectSchema)) {
|
|
203
209
|
throw new Error('You are using an unreleased schema version. Migration is not possible');
|
|
204
210
|
}
|
|
@@ -1786,6 +1786,10 @@ export interface ShapeCacheConfigV3_57_0 {
|
|
|
1786
1786
|
* Number of seconds this Shape should be cached. Default 0.
|
|
1787
1787
|
*/
|
|
1788
1788
|
maxAge?: number;
|
|
1789
|
+
/**
|
|
1790
|
+
* Requests after maxAge will send a request to origin to revalidate while serving stale content for this duration in the meantime.
|
|
1791
|
+
*/
|
|
1792
|
+
staleWhileRevalidate?: number;
|
|
1789
1793
|
}
|
|
1790
1794
|
/**
|
|
1791
1795
|
* This interface was referenced by `ProjectSchemaJSONV3_57_0`'s JSON-Schema
|