Skip to content

Commit

Permalink
Merge pull request #873 from aws-amplify/feat/ai
Browse files Browse the repository at this point in the history
feature(appsync-modelgen-plugin): add generation and conversation route handling
  • Loading branch information
phani-srikar authored Sep 5, 2024
2 parents 0425c76 + b4821bd commit 8bad73d
Show file tree
Hide file tree
Showing 10 changed files with 945 additions and 26 deletions.
30 changes: 30 additions & 0 deletions packages/appsync-modelgen-plugin/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ export type ModelIntrospectionSchema = {
mutations?: SchemaMutations;
subscriptions?: SchemaSubscriptions;
inputs?: SchemaInputs;
generations?: SchemaGenerations;
conversations?: SchemaConversationRoutes;
};

// Warning: (ae-forgotten-export) The symbol "RawAppSyncModelConfig" needs to be exported by the entry point index.d.ts
Expand All @@ -153,6 +155,31 @@ export type PrimaryKeyInfo = {
// @public (undocumented)
export type ScalarType = 'ID' | 'String' | 'Int' | 'Float' | 'AWSDate' | 'AWSTime' | 'AWSDateTime' | 'AWSTimestamp' | 'AWSEmail' | 'AWSURL' | 'AWSIPAddress' | 'Boolean' | 'AWSJSON' | 'AWSPhone';

// @public (undocumented)
export type SchemaConversation = {
modelName: string;
};

// @public (undocumented)
export type SchemaConversationMessage = {
modelName: string;
subscribe: SchemaSubscription;
send: SchemaMutation;
};

// @public (undocumented)
export type SchemaConversationRoute = {
name: string;
models: SchemaModels;
nonModels: SchemaNonModels;
enums: SchemaEnums;
conversation: SchemaConversation;
message: SchemaConversationMessage;
};

// @public (undocumented)
export type SchemaConversationRoutes = Record<string, SchemaConversationRoute>;

// @public (undocumented)
export type SchemaEnum = {
name: string;
Expand All @@ -162,6 +189,9 @@ export type SchemaEnum = {
// @public (undocumented)
export type SchemaEnums = Record<string, SchemaEnum>;

// @public (undocumented)
export type SchemaGenerations = SchemaQueries;

// @public (undocumented)
export type SchemaInputs = Record<string, Input>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
},
"inputs": {
"$ref": "#/definitions/SchemaInputs"
},
"generations": {
"$ref": "#/definitions/SchemaGenerations"
},
"conversations": {
"$ref": "#/definitions/SchemaConversationRoutes"
}
},
"required": [
Expand Down Expand Up @@ -532,6 +538,82 @@
],
"additionalProperties": false,
"description": "Input Definition"
},
"SchemaGenerations": {
"$ref": "#/definitions/SchemaQueries"
},
"SchemaConversationRoutes": {
"$ref": "#/definitions/Record%3Cstring%2CSchemaConversationRoute%3E"
},
"Record<string,SchemaConversationRoute>": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/SchemaConversationRoute"
}
},
"SchemaConversationRoute": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"models": {
"$ref": "#/definitions/SchemaModels"
},
"nonModels": {
"$ref": "#/definitions/SchemaNonModels"
},
"enums": {
"$ref": "#/definitions/SchemaEnums"
},
"conversation": {
"$ref": "#/definitions/SchemaConversation"
},
"message": {
"$ref": "#/definitions/SchemaConversationMessage"
}
},
"required": [
"name",
"models",
"nonModels",
"enums",
"conversation",
"message"
],
"additionalProperties": false
},
"SchemaConversation": {
"type": "object",
"properties": {
"modelName": {
"type": "string"
}
},
"required": [
"modelName"
],
"additionalProperties": false
},
"SchemaConversationMessage": {
"type": "object",
"properties": {
"modelName": {
"type": "string"
},
"subscribe": {
"$ref": "#/definitions/SchemaSubscription"
},
"send": {
"$ref": "#/definitions/SchemaMutation"
}
},
"required": [
"modelName",
"subscribe",
"send"
],
"additionalProperties": false
}
}
}
Loading

0 comments on commit 8bad73d

Please sign in to comment.