Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(appsync-modelgen-plugin): add generation and conversation route handling #873

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading