Created
September 6, 2020 01:03
-
-
Save lekhanh1234/0ee94a57dacd514ac028c5fbf726cee5 to your computer and use it in GitHub Desktop.
openapi.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi" : "3.0.0", | |
| "info" : { | |
| "description" : "API for the configuration page", | |
| "version" : "1.0.0", | |
| "title" : "Story related APIs", | |
| "contact" : { | |
| "email" : "[email protected]" | |
| }, | |
| "license" : { | |
| "name" : "Apache 2.0", | |
| "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" | |
| } | |
| }, | |
| "servers" : [ { | |
| "description" : "SwaggerHub API Auto Mocking", | |
| "url" : "https://virtserver.swaggerhub.com/gotit_inc/story-related-data/1.0.0" | |
| }, { | |
| "url" : "/organizations/{organization_id}/projects/{project_id}" | |
| } ], | |
| "tags" : [ { | |
| "name" : "story", | |
| "description" : "Story" | |
| }, { | |
| "name" : "message", | |
| "description" : "Message in Story" | |
| }, { | |
| "name" : "action", | |
| "description" : "Custom action" | |
| }, { | |
| "name" : "response", | |
| "description" : "Custom response" | |
| }, { | |
| "name" : "intent", | |
| "description" : "Intent" | |
| }, { | |
| "name" : "entity_type", | |
| "description" : "Entity type" | |
| }, { | |
| "name" : "config", | |
| "description" : "Config" | |
| } ], | |
| "paths" : { | |
| "/stories" : { | |
| "get" : { | |
| "tags" : [ "story" ], | |
| "summary" : "Search stories in a project", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/PaginationPageInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/PaginationItemsPerPageInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SearchByNameInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SortByInQuery" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "search stories success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/StoryListPaginationSchema" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "post" : { | |
| "tags" : [ "story" ], | |
| "summary" : "Create a story", | |
| "requestBody" : { | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/StoryCreateSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success" | |
| } | |
| } | |
| } | |
| }, | |
| "/stories/import" : { | |
| "post" : { | |
| "tags" : [ "story" ], | |
| "summary" : "Import a story from a conversation", | |
| "requestBody" : { | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "conversation_id" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "story_id" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/stories/{story_id}" : { | |
| "get" : { | |
| "tags" : [ "story" ], | |
| "summary" : "Get story detail", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/StoryIdInPath" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Get story detail success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/StoryDetailSchema" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "put" : { | |
| "tags" : [ "story" ], | |
| "summary" : "Update a story", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/StoryIdInPath" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/StoryUpdateSchema" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "delete" : { | |
| "tags" : [ "story" ], | |
| "summary" : "delete a story", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/StoryIdInPath" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "type" : "object" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/stories/{story_id}/messages" : { | |
| "post" : { | |
| "tags" : [ "message" ], | |
| "summary" : "Create message", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/StoryIdInPath" | |
| } ], | |
| "requestBody" : { | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/MessageCreateSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "type" : "object" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/stories/{story_id}/messages/{message_id}" : { | |
| "get" : { | |
| "tags" : [ "message" ], | |
| "summary" : "Get a message detail of a story", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/StoryIdInPath" | |
| }, { | |
| "$ref" : "#/components/parameters/MessageIdInPath" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/MessageDetailSchema" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "put" : { | |
| "tags" : [ "message" ], | |
| "summary" : "Update a message", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/StoryIdInPath" | |
| }, { | |
| "$ref" : "#/components/parameters/MessageIdInPath" | |
| } ], | |
| "requestBody" : { | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/MessageUpdateSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "type" : "object" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "delete" : { | |
| "tags" : [ "message" ], | |
| "summary" : "delete a message", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/StoryIdInPath" | |
| }, { | |
| "$ref" : "#/components/parameters/MessageIdInPath" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "type" : "object" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/intents" : { | |
| "get" : { | |
| "tags" : [ "intent" ], | |
| "summary" : "Get intents", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/PaginationPageInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/PaginationItemsPerPageInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SearchByNameInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SearchByPhraseInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SortByInQuery" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/IntentListPaginationSchema" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/intents/{intent_id}/stories/most-recent" : { | |
| "get" : { | |
| "tags" : [ "intent" ], | |
| "summary" : "Find most recent story by intent id", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/IntentIdInPath" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/StoryConfigurationSearchSchema" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/responses" : { | |
| "get" : { | |
| "tags" : [ "response" ], | |
| "summary" : "Get repsonses", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/PaginationPageInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/PaginationItemsPerPageInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SearchByNameInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SortByInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SearchByResponseTextInQuery" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/ResponseListPaginationSchema" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/responses/{response_id}/stories/most-recent" : { | |
| "get" : { | |
| "tags" : [ "response" ], | |
| "summary" : "Find most recent story by response id", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/ResponseIdInPath" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/StoryConfigurationSearchSchema" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/actions" : { | |
| "get" : { | |
| "tags" : [ "action" ], | |
| "summary" : "Get actions", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/PaginationPageInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/PaginationItemsPerPageInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SearchByNameInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SortByInQuery" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/ActionListPaginationSchema" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/actions/{action_id}/stories/most-recent" : { | |
| "get" : { | |
| "tags" : [ "action" ], | |
| "summary" : "Find most recent story by action id", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/ActionIdInPath" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/StoryConfigurationSearchSchema" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/entity-types" : { | |
| "get" : { | |
| "tags" : [ "entity_type" ], | |
| "summary" : "Get entity types", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/PaginationPageInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/PaginationItemsPerPageInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SearchByNameInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SortByInQuery" | |
| }, { | |
| "$ref" : "#/components/parameters/SearchByTypeInQuery" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/EntityTypeListPaginationSchema" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "post" : { | |
| "tags" : [ "entity_type" ], | |
| "summary" : "Create entity type", | |
| "requestBody" : { | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/EntityTypeCreateSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "type" : "object" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/entity-types/{entity_type_id}" : { | |
| "put" : { | |
| "tags" : [ "entity_type" ], | |
| "summary" : "Edit an entity type", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/EntityTypeIdInPath" | |
| } ], | |
| "requestBody" : { | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/EntityTypeUpdateSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "type" : "object" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "delete" : { | |
| "tags" : [ "entity_type" ], | |
| "summary" : "delete an entity type", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/EntityTypeIdInPath" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "type" : "object" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/config" : { | |
| "get" : { | |
| "tags" : [ "config" ], | |
| "summary" : "Get config", | |
| "parameters" : [ { | |
| "$ref" : "#/components/parameters/ConfigKeyInQuery" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Success", | |
| "content" : { | |
| "application/json" : { | |
| "schema" : { | |
| "$ref" : "#/components/schemas/ConfigSchema" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "components" : { | |
| "schemas" : { | |
| "PaginationBaseSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "page" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| }, | |
| "items_per_page" : { | |
| "type" : "integer", | |
| "example" : 10 | |
| }, | |
| "total_items" : { | |
| "type" : "integer", | |
| "example" : 10 | |
| } | |
| } | |
| }, | |
| "StoryBaseSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id" : { | |
| "$ref" : "#/components/schemas/BaseIdSchema" | |
| }, | |
| "name" : { | |
| "type" : "string", | |
| "example" : "Story name" | |
| } | |
| } | |
| }, | |
| "StoryListPaginationSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/PaginationBaseSchema" | |
| } ], | |
| "properties" : { | |
| "items" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/StoryListPaginationItemSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "StoryListPaginationItemSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/StoryBaseSchema" | |
| } ], | |
| "properties" : { | |
| "properly_configured" : { | |
| "type" : "boolean", | |
| "readOnly" : true | |
| } | |
| } | |
| }, | |
| "StoryDetailSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/StoryBaseSchema" | |
| } ], | |
| "properties" : { | |
| "description" : { | |
| "type" : "string", | |
| "example" : "Description here" | |
| }, | |
| "messages" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/MessageListItemSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "StoryCreateSchema" : { | |
| "properties" : { | |
| "name" : { | |
| "type" : "string", | |
| "example" : "Story name" | |
| }, | |
| "description" : { | |
| "type" : "string", | |
| "example" : "Description here" | |
| } | |
| } | |
| }, | |
| "StoryUpdateSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/StoryCreateSchema" | |
| } ] | |
| }, | |
| "StoryConfigurationSearchSchema" : { | |
| "properties" : { | |
| "story_id" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| }, | |
| "selected_message_id" : { | |
| "type" : "integer", | |
| "example" : 7 | |
| } | |
| } | |
| }, | |
| "MessageBaseSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id" : { | |
| "$ref" : "#/components/schemas/BaseIdSchema" | |
| }, | |
| "text" : { | |
| "type" : "string", | |
| "example" : "I want to cancel my subscription" | |
| }, | |
| "type" : { | |
| "type" : "string", | |
| "enum" : [ "user_message", "bot_message_response", "bot_message_action" ], | |
| "readOnly" : true | |
| }, | |
| "properly_configured" : { | |
| "type" : "boolean", | |
| "readOnly" : true | |
| } | |
| } | |
| }, | |
| "MessageListItemSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/MessageBaseSchema" | |
| } ] | |
| }, | |
| "MessageDetailSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/MessageBaseSchema" | |
| } ], | |
| "properties" : { | |
| "user_message_primary_phrase_id" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| }, | |
| "bot_message_primary_response_text_id" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| }, | |
| "description" : { | |
| "type" : "string", | |
| "example" : "Description here" | |
| }, | |
| "contexts" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/ContextVariableListItemSchema" | |
| } | |
| }, | |
| "user_message_intent" : { | |
| "$ref" : "#/components/schemas/IntentDetailSchema" | |
| }, | |
| "bot_message_response" : { | |
| "$ref" : "#/components/schemas/ResponseSchema" | |
| }, | |
| "bot_message_action" : { | |
| "$ref" : "#/components/schemas/ActionDetailSchema" | |
| } | |
| } | |
| }, | |
| "MessageCreateSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/MessageDetailSchema" | |
| } ] | |
| }, | |
| "MessageUpdateSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/MessageCreateSchema" | |
| } ] | |
| }, | |
| "ActionBaseSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id" : { | |
| "$ref" : "#/components/schemas/BaseIdSchema" | |
| }, | |
| "name" : { | |
| "type" : "string", | |
| "example" : "Load account information" | |
| }, | |
| "type" : { | |
| "type" : "string", | |
| "enum" : [ "sql_query", "api_call", "web_hook" ] | |
| } | |
| } | |
| }, | |
| "ActionListPaginationSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/PaginationBaseSchema" | |
| } ], | |
| "properties" : { | |
| "items" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/ActionListItemSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "ActionListItemSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/ActionBaseSchema" | |
| } ] | |
| }, | |
| "ActionDetailSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/ActionBaseSchema" | |
| } ], | |
| "properties" : { | |
| "conditions" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/ConditionSchema" | |
| } | |
| }, | |
| "sql_query" : { | |
| "type" : "string", | |
| "example" : "select * from student" | |
| }, | |
| "api_call" : { | |
| "$ref" : "#/components/schemas/APICallSchema" | |
| }, | |
| "webhook" : { | |
| "$ref" : "#/components/schemas/WebHookSchema" | |
| }, | |
| "response_slots" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/ResponseSlotSchema" | |
| } | |
| }, | |
| "query_slots" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/QuerySlotSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "QuerySlotSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "start_index" : { | |
| "type" : "integer", | |
| "example" : 51 | |
| }, | |
| "end_index" : { | |
| "type" : "integer", | |
| "example" : 63 | |
| }, | |
| "name" : { | |
| "type" : "string", | |
| "example" : "sys_number_1" | |
| }, | |
| "key" : { | |
| "type" : "string", | |
| "example" : "key" | |
| }, | |
| "format" : { | |
| "type" : "string", | |
| "example" : "format" | |
| } | |
| } | |
| }, | |
| "ResponseSlotSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "name" : { | |
| "type" : "string", | |
| "example" : "student_count" | |
| }, | |
| "start_index" : { | |
| "type" : "integer", | |
| "example" : 7 | |
| }, | |
| "end_index" : { | |
| "type" : "integer", | |
| "example" : 7 | |
| }, | |
| "selected_field" : { | |
| "type" : "integer", | |
| "example" : "*" | |
| } | |
| } | |
| }, | |
| "APICallSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "api_name" : { | |
| "type" : "string", | |
| "example" : "Salesforce account information" | |
| }, | |
| "notes" : { | |
| "type" : "string", | |
| "example" : "Requesting account information for $" | |
| } | |
| } | |
| }, | |
| "WebHookSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "method" : { | |
| "type" : "string", | |
| "example" : "GET" | |
| }, | |
| "url" : { | |
| "type" : "string", | |
| "example" : "https://myapi.com/v1/api_func?city={$city}&state=$state" | |
| }, | |
| "headers" : { | |
| "type" : "object", | |
| "example" : { | |
| "X-Custom-Header" : "value" | |
| } | |
| }, | |
| "body" : { | |
| "type" : "string", | |
| "example" : "{data}" | |
| } | |
| } | |
| }, | |
| "ResponseBaseSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id" : { | |
| "$ref" : "#/components/schemas/BaseIdSchema" | |
| }, | |
| "name" : { | |
| "type" : "string", | |
| "example" : "Cancellation sentiment" | |
| } | |
| } | |
| }, | |
| "ResponseSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/ResponseBaseSchema" | |
| } ], | |
| "properties" : { | |
| "response_texts" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/ResponseTextSchema" | |
| } | |
| }, | |
| "conditions" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/ConditionSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "ResponseListPaginationSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/PaginationBaseSchema" | |
| } ], | |
| "properties" : { | |
| "items" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/ResponseBaseSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "ResponseTextSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "text" : { | |
| "type" : "string", | |
| "example" : "I am sorry to hear that" | |
| }, | |
| "id" : { | |
| "$ref" : "#/components/schemas/BaseIdSchema" | |
| } | |
| } | |
| }, | |
| "ConditionSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "context_variable" : { | |
| "type" : "string", | |
| "example" : "$subscription" | |
| }, | |
| "operator" : { | |
| "type" : "string", | |
| "example" : ">" | |
| }, | |
| "operand" : { | |
| "type" : "string", | |
| "example" : "1000" | |
| }, | |
| "properly_configured" : { | |
| "type" : "boolean" | |
| } | |
| } | |
| }, | |
| "EntityTypeBaseSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id" : { | |
| "$ref" : "#/components/schemas/BaseIdSchema" | |
| }, | |
| "name" : { | |
| "type" : "string", | |
| "example" : "custom.products.product_category" | |
| }, | |
| "entries" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/EntityTypeEntrySchema" | |
| } | |
| } | |
| } | |
| }, | |
| "EntityTypeListItemSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/EntityTypeBaseSchema" | |
| } ], | |
| "properties" : { | |
| "type" : { | |
| "type" : "string", | |
| "enum" : [ "system", "custom" ] | |
| } | |
| } | |
| }, | |
| "EntityTypeUpdateSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/EntityTypeBaseSchema" | |
| } ] | |
| }, | |
| "EntityTypeCreateSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/EntityTypeBaseSchema" | |
| } ] | |
| }, | |
| "EntityTypeListPaginationSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/PaginationBaseSchema" | |
| } ], | |
| "properties" : { | |
| "items" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/EntityTypeListItemSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "EntityTypeEntrySchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "value" : { | |
| "type" : "string", | |
| "example" : "color" | |
| }, | |
| "synonyms" : { | |
| "type" : "array", | |
| "items" : { | |
| "type" : "string" | |
| } | |
| } | |
| } | |
| }, | |
| "IntentBaseSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id" : { | |
| "$ref" : "#/components/schemas/BaseIdSchema" | |
| }, | |
| "name" : { | |
| "type" : "string", | |
| "example" : "Cancellation request" | |
| } | |
| } | |
| }, | |
| "IntentListPaginationSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/PaginationBaseSchema" | |
| } ], | |
| "properties" : { | |
| "items" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/IntentListPaginationItemSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "IntentListPaginationItemSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/IntentBaseSchema" | |
| } ] | |
| }, | |
| "IntentDetailSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/IntentBaseSchema" | |
| } ], | |
| "properties" : { | |
| "phrases" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/PhraseListItemSchema" | |
| } | |
| }, | |
| "entities" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/EntityBaseSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "PhraseBaseSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id" : { | |
| "$ref" : "#/components/schemas/BaseIdSchema" | |
| }, | |
| "text" : { | |
| "type" : "string", | |
| "example" : "I want to cancel my subscription" | |
| }, | |
| "annotations" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/AnnotationSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "PhraseListItemSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/PhraseBaseSchema" | |
| } ] | |
| }, | |
| "AnnotationSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "start_index" : { | |
| "type" : "integer", | |
| "example" : 21 | |
| }, | |
| "end_index" : { | |
| "type" : "integer", | |
| "example" : 31 | |
| }, | |
| "entity_type_id" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| }, | |
| "entity_type_name" : { | |
| "type" : "string", | |
| "example" : "subscription_type" | |
| } | |
| } | |
| }, | |
| "EntityBaseSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| }, | |
| "name" : { | |
| "type" : "string", | |
| "example" : "ticket_id" | |
| }, | |
| "entity_type_name" : { | |
| "type" : "string", | |
| "example" : "custom.account.user_id" | |
| } | |
| } | |
| }, | |
| "ContextVariableBaseSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id" : { | |
| "$ref" : "#/components/schemas/BaseIdSchema" | |
| }, | |
| "name" : { | |
| "type" : "string", | |
| "example" : "ticket_id" | |
| }, | |
| "status" : { | |
| "$ref" : "#/components/schemas/BaseStatusSchema" | |
| }, | |
| "type" : { | |
| "type" : "string", | |
| "enum" : [ "non_system", "system" ], | |
| "readOnly" : true | |
| }, | |
| "value" : { | |
| "type" : "string", | |
| "example" : "1093" | |
| }, | |
| "entity_type_name" : { | |
| "type" : "string", | |
| "example" : "@sys.number" | |
| }, | |
| "formula" : { | |
| "type" : "string", | |
| "example" : "=$ticket_ID" | |
| } | |
| } | |
| }, | |
| "ContextVariableListItemSchema" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/ContextVariableBaseSchema" | |
| } ] | |
| }, | |
| "ConfigSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "predefined_api_calls" : { | |
| "type" : "array", | |
| "items" : { | |
| "type" : "string", | |
| "example" : "Salesforce load account information" | |
| } | |
| }, | |
| "condition_operators" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/ConditionOperatorSchema" | |
| } | |
| } | |
| } | |
| }, | |
| "ConditionOperatorSchema" : { | |
| "type" : "object", | |
| "properties" : { | |
| "context_variable_type" : { | |
| "type" : "string", | |
| "example" : "string" | |
| }, | |
| "operators" : { | |
| "type" : "array", | |
| "items" : { | |
| "type" : "string", | |
| "example" : "is empty" | |
| } | |
| } | |
| } | |
| }, | |
| "BaseStatusSchema" : { | |
| "type" : "string", | |
| "enum" : [ "active", "deleted" ] | |
| }, | |
| "BaseIdSchema" : { | |
| "type" : "integer", | |
| "example" : 1, | |
| "readOnly" : true | |
| } | |
| }, | |
| "parameters" : { | |
| "StoryIdInPath" : { | |
| "in" : "path", | |
| "name" : "story_id", | |
| "required" : true, | |
| "schema" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| } | |
| }, | |
| "EntityTypeIdInPath" : { | |
| "in" : "path", | |
| "name" : "entity_type_id", | |
| "required" : true, | |
| "schema" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| } | |
| }, | |
| "MessageIdInPath" : { | |
| "in" : "path", | |
| "name" : "message_id", | |
| "required" : true, | |
| "schema" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| } | |
| }, | |
| "PaginationPageInQuery" : { | |
| "in" : "query", | |
| "name" : "page", | |
| "required" : false, | |
| "schema" : { | |
| "type" : "integer", | |
| "default" : 1 | |
| } | |
| }, | |
| "PaginationItemsPerPageInQuery" : { | |
| "in" : "query", | |
| "name" : "items_per_page", | |
| "required" : false, | |
| "schema" : { | |
| "type" : "integer", | |
| "default" : 100 | |
| } | |
| }, | |
| "SearchByNameInQuery" : { | |
| "in" : "query", | |
| "name" : "name", | |
| "required" : false, | |
| "description" : "search by name", | |
| "schema" : { | |
| "type" : "string" | |
| } | |
| }, | |
| "SearchByTypeInQuery" : { | |
| "in" : "query", | |
| "name" : "type", | |
| "required" : false, | |
| "description" : "search by type", | |
| "schema" : { | |
| "type" : "string" | |
| } | |
| }, | |
| "SearchByResponseTextInQuery" : { | |
| "in" : "query", | |
| "name" : "response_text", | |
| "required" : false, | |
| "description" : "search responses by response text", | |
| "schema" : { | |
| "type" : "string" | |
| } | |
| }, | |
| "SearchByPhraseInQuery" : { | |
| "in" : "query", | |
| "name" : "phrase", | |
| "required" : false, | |
| "description" : "search intents by phrase", | |
| "schema" : { | |
| "type" : "string" | |
| } | |
| }, | |
| "SortByInQuery" : { | |
| "in" : "query", | |
| "name" : "sort_by", | |
| "required" : false, | |
| "description" : "sort the list by a field", | |
| "schema" : { | |
| "type" : "string", | |
| "example" : "name:asc" | |
| } | |
| }, | |
| "IntentIdInPath" : { | |
| "in" : "path", | |
| "name" : "intent_id", | |
| "required" : true, | |
| "schema" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| } | |
| }, | |
| "ActionIdInPath" : { | |
| "in" : "path", | |
| "name" : "action_id", | |
| "required" : true, | |
| "description" : "Search for an action", | |
| "schema" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| } | |
| }, | |
| "ResponseIdInPath" : { | |
| "in" : "path", | |
| "name" : "response_id", | |
| "required" : true, | |
| "description" : "Search for an response", | |
| "schema" : { | |
| "type" : "integer", | |
| "example" : 1 | |
| } | |
| }, | |
| "ConfigKeyInQuery" : { | |
| "in" : "query", | |
| "name" : "config_key", | |
| "schema" : { | |
| "type" : "string", | |
| "enum" : [ "predefined_api_calls", "condition_operators" ] | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment