@aws-amplify/data-schema 1.13.2 → 1.13.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.
- package/dist/cjs/SchemaProcessor.js +4 -3
- package/dist/cjs/SchemaProcessor.js.map +1 -1
- package/dist/cjs/ai/ConversationSchemaGraphQLTypes.js +190 -0
- package/dist/cjs/ai/ConversationSchemaGraphQLTypes.js.map +1 -0
- package/dist/cjs/ai/ConversationSchemaProcessor.js +52 -0
- package/dist/cjs/ai/ConversationSchemaProcessor.js.map +1 -0
- package/dist/esm/SchemaProcessor.mjs +3 -2
- package/dist/esm/SchemaProcessor.mjs.map +1 -1
- package/dist/esm/ai/ConversationSchemaGraphQLTypes.d.ts +1 -0
- package/dist/esm/ai/ConversationSchemaGraphQLTypes.mjs +188 -0
- package/dist/esm/ai/ConversationSchemaGraphQLTypes.mjs.map +1 -0
- package/dist/esm/ai/ConversationSchemaProcessor.d.ts +6 -0
- package/dist/esm/ai/ConversationSchemaProcessor.mjs +50 -0
- package/dist/esm/ai/ConversationSchemaProcessor.mjs.map +1 -0
- package/dist/meta/cjs.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/SchemaProcessor.ts +3 -5
- package/src/ai/ConversationSchemaGraphQLTypes.ts +185 -0
- package/src/ai/ConversationSchemaProcessor.ts +63 -0
- package/dist/cjs/ai/ConversationSchemaTypes.js +0 -239
- package/dist/cjs/ai/ConversationSchemaTypes.js.map +0 -1
- package/dist/esm/ai/ConversationSchemaTypes.d.ts +0 -7
- package/dist/esm/ai/ConversationSchemaTypes.mjs +0 -237
- package/dist/esm/ai/ConversationSchemaTypes.mjs.map +0 -1
- package/src/ai/ConversationSchemaTypes.ts +0 -286
|
@@ -13,7 +13,8 @@ const os = tslib_1.__importStar(require("os"));
|
|
|
13
13
|
const path = tslib_1.__importStar(require("path"));
|
|
14
14
|
const Brand_1 = require("./util/Brand");
|
|
15
15
|
const ConversationType_1 = require("./ai/ConversationType");
|
|
16
|
-
const
|
|
16
|
+
const ConversationSchemaGraphQLTypes_1 = require("./ai/ConversationSchemaGraphQLTypes");
|
|
17
|
+
const ConversationSchemaProcessor_1 = require("./ai/ConversationSchemaProcessor");
|
|
17
18
|
function isInternalModel(model) {
|
|
18
19
|
if (model.data &&
|
|
19
20
|
!isCustomType(model) &&
|
|
@@ -955,7 +956,7 @@ const schemaPreprocessor = (schema) => {
|
|
|
955
956
|
}
|
|
956
957
|
else if (isConversationRoute(typeDef)) {
|
|
957
958
|
// TODO: add inferenceConfiguration values to directive.
|
|
958
|
-
const { field, functionHandler } = (0,
|
|
959
|
+
const { field, functionHandler } = (0, ConversationSchemaProcessor_1.createConversationField)(typeDef, typeName);
|
|
959
960
|
customMutations.push(field);
|
|
960
961
|
Object.assign(lambdaFunctions, functionHandler);
|
|
961
962
|
shouldAddConversationTypes = true;
|
|
@@ -1019,7 +1020,7 @@ const schemaPreprocessor = (schema) => {
|
|
|
1019
1020
|
};
|
|
1020
1021
|
gqlModels.push(...generateCustomOperationTypes(customOperations));
|
|
1021
1022
|
if (shouldAddConversationTypes) {
|
|
1022
|
-
gqlModels.push(
|
|
1023
|
+
gqlModels.push(ConversationSchemaGraphQLTypes_1.CONVERSATION_SCHEMA_GRAPHQL_TYPES);
|
|
1023
1024
|
}
|
|
1024
1025
|
const processedSchema = gqlModels.join('\n\n');
|
|
1025
1026
|
return {
|