diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..58592f0 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..650130d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM golang:1.10 AS build +WORKDIR /go/src +COPY pkg ./pkg +COPY main.go . + +ENV CGO_ENABLED=0 +RUN go get -d -v ./... + +RUN go build -a -installsuffix cgo -o botbuilder . + +FROM scratch AS runtime +COPY --from=build /go/src/botbuilder ./ +EXPOSE 8080/tcp +ENTRYPOINT ["./botbuilder"] diff --git a/api/openapi.yaml b/api/openapi.yaml new file mode 100644 index 0000000..00cd599 --- /dev/null +++ b/api/openapi.yaml @@ -0,0 +1,3038 @@ +openapi: 3.0.1 +info: + contact: + email: botframework@microsoft.com + name: Bot Framework + url: https://botframework.com + description: "The Bot Connector REST API allows your bot to send and receive messages\ + \ to channels configured in the\r\n[Bot Framework Developer Portal](https://dev.botframework.com).\ + \ The Connector service uses industry-standard REST\r\nand JSON over HTTPS.\r\n\ + \r\nClient libraries for this REST API are available. See below for a list.\r\n\ + \r\nMany bots will use both the Bot Connector REST API and the associated [Bot\ + \ State REST API](/en-us/restapi/state). The\r\nBot State REST API allows a bot\ + \ to store and retrieve state associated with users and conversations.\r\n\r\n\ + Authentication for both the Bot Connector and Bot State REST APIs is accomplished\ + \ with JWT Bearer tokens, and is\r\ndescribed in detail in the [Connector Authentication](/en-us/restapi/authentication)\ + \ document.\r\n\r\n# Client Libraries for the Bot Connector REST API\r\n\r\n*\ + \ [Bot Builder for C#](/en-us/csharp/builder/sdkreference/)\r\n* [Bot Builder\ + \ for Node.js](/en-us/node/builder/overview/)\r\n* Generate your own from the\ + \ [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json)\r\ + \n\r\n© 2016 Microsoft" + license: + name: The MIT License (MIT) + url: https://opensource.org/licenses/MIT + termsOfService: https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx + title: Microsoft Bot Connector API - v3.0 + version: v3 +servers: +- url: https://api.botframework.com/ +paths: + /v3/attachments/{attachmentId}: + get: + description: Get AttachmentInfo structure describing the attachment views + operationId: Attachments_GetAttachmentInfo + parameters: + - description: attachment id + in: path + name: attachmentId + required: true + schema: + type: string + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/AttachmentInfo' + text/json: + schema: + $ref: '#/components/schemas/AttachmentInfo' + application/xml: + schema: + $ref: '#/components/schemas/AttachmentInfo' + text/xml: + schema: + $ref: '#/components/schemas/AttachmentInfo' + description: "An attachmentInfo object is returned which describes the:\r\ + \n* type of the attachment\r\n* name of the attachment\r\n\r\n\r\nand\ + \ an array of views:\r\n* Size - size of the object\r\n* ViewId - View\ + \ Id which can be used to fetch a variation on the content (ex: original\ + \ or thumbnail)" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + application/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: GetAttachmentInfo + tags: + - Attachments + /v3/attachments/{attachmentId}/views/{viewId}: + get: + description: Get the named view as binary content + operationId: Attachments_GetAttachment + parameters: + - description: attachment id + in: path + name: attachmentId + required: true + schema: + type: string + - description: View id from attachmentInfo + in: path + name: viewId + required: true + schema: + type: string + responses: + 200: + content: + application/json: + schema: + format: binary + type: string + text/json: + schema: + format: binary + type: string + application/xml: + schema: + format: binary + type: string + text/xml: + schema: + format: binary + type: string + description: Attachment stream + 301: + content: {} + description: The Location header describes where the content is now. + 302: + content: {} + description: The Location header describes where the content is now. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + application/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: GetAttachment + tags: + - Attachments + /v3/conversations: + get: + description: "List the Conversations in which this bot has participated.\r\n\ + \r\nGET from this method with a skip token\r\n\r\nThe return value is a ConversationsResult,\ + \ which contains an array of ConversationMembers and a skip token. If the\ + \ skip token is not empty, then \r\nthere are further values to be returned.\ + \ Call this method again with the returned token to get more values.\r\n\r\ + \nEach ConversationMembers object contains the ID of the conversation and\ + \ an array of ChannelAccounts that describe the members of the conversation." + operationId: Conversations_GetConversations + parameters: + - description: skip or continuation token + in: query + name: continuationToken + schema: + type: string + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationsResult' + text/json: + schema: + $ref: '#/components/schemas/ConversationsResult' + application/xml: + schema: + $ref: '#/components/schemas/ConversationsResult' + text/xml: + schema: + $ref: '#/components/schemas/ConversationsResult' + description: "An object will be returned containing \r\n* an array (Conversations)\ + \ of ConversationMembers objects\r\n* a continuation token\r\n\r\nEach\ + \ ConversationMembers object contains:\r\n* the Id of the conversation\r\ + \n* an array (Members) of ChannelAccount objects" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + application/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: GetConversations + tags: + - Conversations + post: + description: "Create a new Conversation.\r\n\r\nPOST to this method with a\r\ + \n* Bot being the bot creating the conversation\r\n* IsGroup set to true if\ + \ this is not a direct message (default is false)\r\n* Array containing the\ + \ members to include in the conversation\r\n\r\nThe return value is a ResourceResponse\ + \ which contains a conversation id which is suitable for use\r\nin the message\ + \ payload and REST API uris.\r\n\r\nMost channels only support the semantics\ + \ of bots initiating a direct message conversation. An example of how to\ + \ do that would be:\r\n\r\n```\r\nvar resource = await connector.conversations.CreateConversation(new\ + \ ConversationParameters(){ Bot = bot, members = new ChannelAccount[] { new\ + \ ChannelAccount(\"user1\") } );\r\nawait connect.Conversations.SendToConversationAsync(resource.Id,\ + \ new Activity() ... ) ;\r\n\r\n```" + operationId: Conversations_CreateConversation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationParameters' + text/json: + schema: + $ref: '#/components/schemas/ConversationParameters' + application/xml: + schema: + $ref: '#/components/schemas/ConversationParameters' + text/xml: + schema: + $ref: '#/components/schemas/ConversationParameters' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ConversationParameters' + description: Parameters to create the conversation from + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ConversationResourceResponse' + application/xml: + schema: + $ref: '#/components/schemas/ConversationResourceResponse' + text/xml: + schema: + $ref: '#/components/schemas/ConversationResourceResponse' + description: "An object will be returned containing \r\n* the ID for the\ + \ conversation\r\n* ActivityId for the activity if provided. If ActivityId\ + \ is null then the channel doesn't support returning resource id's for\ + \ activity." + 201: + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ConversationResourceResponse' + application/xml: + schema: + $ref: '#/components/schemas/ConversationResourceResponse' + text/xml: + schema: + $ref: '#/components/schemas/ConversationResourceResponse' + description: "An object will be returned containing \r\n* the ID for the\ + \ conversation\r\n* ActivityId for the activity if provided. If ActivityId\ + \ is null then the channel doesn't support returning resource id's for\ + \ activity." + 202: + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ConversationResourceResponse' + application/xml: + schema: + $ref: '#/components/schemas/ConversationResourceResponse' + text/xml: + schema: + $ref: '#/components/schemas/ConversationResourceResponse' + description: "An object will be returned containing \r\n* the ID for the\ + \ conversation\r\n* ActivityId for the activity if provided. If ActivityId\ + \ is null then the channel doesn't support returning resource id's for\ + \ activity." + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + application/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: CreateConversation + tags: + - Conversations + x-codegen-request-body-name: parameters + /v3/conversations/{conversationId}/activities: + post: + description: "This method allows you to send an activity to the end of a conversation.\r\ + \n\r\nThis is slightly different from ReplyToActivity().\r\n* SendToConversation(conversationId)\ + \ - will append the activity to the end of the conversation according to the\ + \ timestamp or semantics of the channel.\r\n* ReplyToActivity(conversationId,ActivityId)\ + \ - adds the activity as a reply to another activity, if the channel supports\ + \ it. If the channel does not support nested replies, ReplyToActivity falls\ + \ back to SendToConversation.\r\n\r\nUse ReplyToActivity when replying to\ + \ a specific activity in the conversation.\r\n\r\nUse SendToConversation in\ + \ all other cases." + operationId: Conversations_SendToConversation + parameters: + - description: Conversation ID + in: path + name: conversationId + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Activity' + text/json: + schema: + $ref: '#/components/schemas/Activity' + application/xml: + schema: + $ref: '#/components/schemas/Activity' + text/xml: + schema: + $ref: '#/components/schemas/Activity' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Activity' + description: Activity to send + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: An object will be returned containing the ID for the resource. + 201: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: A ResourceResponse object will be returned containing the ID + for the resource. + 202: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: An object will be returned containing the ID for the resource. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: SendToConversation + tags: + - Conversations + x-codegen-request-body-name: activity + /v3/conversations/{conversationId}/activities/history: + post: + description: "This method allows you to upload the historic activities to the\ + \ conversation.\r\n\r\nSender must ensure that the historic activities have\ + \ unique ids and appropriate timestamps. The ids are used by the client to\ + \ deal with duplicate activities and the timestamps are used by the client\ + \ to render the activities in the right order." + operationId: Conversations_SendConversationHistory + parameters: + - description: Conversation ID + in: path + name: conversationId + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Transcript' + text/json: + schema: + $ref: '#/components/schemas/Transcript' + application/xml: + schema: + $ref: '#/components/schemas/Transcript' + text/xml: + schema: + $ref: '#/components/schemas/Transcript' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Transcript' + description: Historic activities + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: An object will be returned containing the ID for the resource. + 201: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: A ResourceResponse object will be returned containing the ID + for the resource. + 202: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: An object will be returned containing the ID for the resource. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: SendConversationHistory + tags: + - Conversations + x-codegen-request-body-name: history + /v3/conversations/{conversationId}/activities/{activityId}: + delete: + description: "Delete an existing activity.\r\n\r\nSome channels allow you to\ + \ delete an existing activity, and if successful this method will remove the\ + \ specified activity." + operationId: Conversations_DeleteActivity + parameters: + - description: Conversation ID + in: path + name: conversationId + required: true + schema: + type: string + - description: activityId to delete + in: path + name: activityId + required: true + schema: + type: string + responses: + 200: + content: {} + description: The operation succeeded, there is no response. + 202: + content: {} + description: The request has been accepted for processing, but the processing + has not been completed + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + application/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: DeleteActivity + tags: + - Conversations + post: + description: "This method allows you to reply to an activity.\r\n\r\nThis is\ + \ slightly different from SendToConversation().\r\n* SendToConversation(conversationId)\ + \ - will append the activity to the end of the conversation according to the\ + \ timestamp or semantics of the channel.\r\n* ReplyToActivity(conversationId,ActivityId)\ + \ - adds the activity as a reply to another activity, if the channel supports\ + \ it. If the channel does not support nested replies, ReplyToActivity falls\ + \ back to SendToConversation.\r\n\r\nUse ReplyToActivity when replying to\ + \ a specific activity in the conversation.\r\n\r\nUse SendToConversation in\ + \ all other cases." + operationId: Conversations_ReplyToActivity + parameters: + - description: Conversation ID + in: path + name: conversationId + required: true + schema: + type: string + - description: activityId the reply is to (OPTIONAL) + in: path + name: activityId + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Activity' + text/json: + schema: + $ref: '#/components/schemas/Activity' + application/xml: + schema: + $ref: '#/components/schemas/Activity' + text/xml: + schema: + $ref: '#/components/schemas/Activity' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Activity' + description: Activity to send + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: An object will be returned containing the ID for the resource. + 201: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: A ResourceResponse object will be returned containing the ID + for the resource. + 202: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: An object will be returned containing the ID for the resource. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: ReplyToActivity + tags: + - Conversations + x-codegen-request-body-name: activity + put: + description: "Edit an existing activity.\r\n\r\nSome channels allow you to edit\ + \ an existing activity to reflect the new state of a bot conversation.\r\n\ + \r\nFor example, you can remove buttons after someone has clicked \"Approve\"\ + \ button." + operationId: Conversations_UpdateActivity + parameters: + - description: Conversation ID + in: path + name: conversationId + required: true + schema: + type: string + - description: activityId to update + in: path + name: activityId + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Activity' + text/json: + schema: + $ref: '#/components/schemas/Activity' + application/xml: + schema: + $ref: '#/components/schemas/Activity' + text/xml: + schema: + $ref: '#/components/schemas/Activity' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Activity' + description: replacement Activity + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: An object will be returned containing the ID for the resource. + 201: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: A ResourceResponse object will be returned containing the ID + for the resource. + 202: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: An object will be returned containing the ID for the resource. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: UpdateActivity + tags: + - Conversations + x-codegen-request-body-name: activity + /v3/conversations/{conversationId}/members: + get: + description: "Enumerate the members of a conversation. \r\n\r\nThis REST API\ + \ takes a ConversationId and returns an array of ChannelAccount objects representing\ + \ the members of the conversation." + operationId: Conversations_GetConversationMembers + parameters: + - description: Conversation ID + in: path + name: conversationId + required: true + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + text/json: + schema: + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + application/xml: + schema: + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + text/xml: + schema: + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + description: An array of ChannelAccount objects + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + application/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: GetConversationMembers + tags: + - Conversations + /v3/conversations/{conversationId}/pagedmembers: + get: + description: "Enumerate the members of a conversation one page at a time.\r\n\ + \r\nThis REST API takes a ConversationId. Optionally a pageSize and/or continuationToken\ + \ can be provided. It returns a PagedMembersResult, which contains an array\r\ + \nof ChannelAccounts representing the members of the conversation and a continuation\ + \ token that can be used to get more values.\r\n\r\nOne page of ChannelAccounts\ + \ records are returned with each call. The number of records in a page may\ + \ vary between channels and calls. The pageSize parameter can be used as \r\ + \na suggestion. If there are no additional results the response will not contain\ + \ a continuation token. If there are no members in the conversation the Members\ + \ will be empty or not present in the response.\r\n\r\nA response to a request\ + \ that has a continuation token from a prior request may rarely return members\ + \ from a previous request." + operationId: Conversations_GetConversationPagedMembers + parameters: + - description: Conversation ID + in: path + name: conversationId + required: true + schema: + type: string + - description: Suggested page size + in: query + name: pageSize + schema: + format: int32 + type: integer + - description: Continuation Token + in: query + name: continuationToken + schema: + type: string + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/PagedMembersResult' + text/json: + schema: + $ref: '#/components/schemas/PagedMembersResult' + application/xml: + schema: + $ref: '#/components/schemas/PagedMembersResult' + text/xml: + schema: + $ref: '#/components/schemas/PagedMembersResult' + description: OK + summary: GetConversationPagedMembers + tags: + - Conversations + /v3/conversations/{conversationId}/members/{memberId}: + delete: + description: "Deletes a member from a conversation. \r\n\r\nThis REST API takes\ + \ a ConversationId and a memberId (of type string) and removes that member\ + \ from the conversation. If that member was the last member\r\nof the conversation,\ + \ the conversation will also be deleted." + operationId: Conversations_DeleteConversationMember + parameters: + - description: Conversation ID + in: path + name: conversationId + required: true + schema: + type: string + - description: ID of the member to delete from this conversation + in: path + name: memberId + required: true + schema: + type: string + responses: + 200: + content: {} + description: The operation succeeded, there is no response. + 204: + content: {} + description: The operation succeeded but no content was returned. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + application/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: DeleteConversationMember + tags: + - Conversations + /v3/conversations/{conversationId}/activities/{activityId}/members: + get: + description: "Enumerate the members of an activity. \r\n\r\nThis REST API takes\ + \ a ConversationId and a ActivityId, returning an array of ChannelAccount\ + \ objects representing the members of the particular activity in the conversation." + operationId: Conversations_GetActivityMembers + parameters: + - description: Conversation ID + in: path + name: conversationId + required: true + schema: + type: string + - description: Activity ID + in: path + name: activityId + required: true + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + text/json: + schema: + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + application/xml: + schema: + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + text/xml: + schema: + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + description: An array of ChannelAccount objects + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + application/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: GetActivityMembers + tags: + - Conversations + /v3/conversations/{conversationId}/attachments: + post: + description: "Upload an attachment directly into a channel's blob storage.\r\ + \n\r\nThis is useful because it allows you to store data in a compliant store\ + \ when dealing with enterprises.\r\n\r\nThe response is a ResourceResponse\ + \ which contains an AttachmentId which is suitable for using with the attachments\ + \ API." + operationId: Conversations_UploadAttachment + parameters: + - description: Conversation ID + in: path + name: conversationId + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AttachmentData' + text/json: + schema: + $ref: '#/components/schemas/AttachmentData' + application/xml: + schema: + $ref: '#/components/schemas/AttachmentData' + text/xml: + schema: + $ref: '#/components/schemas/AttachmentData' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AttachmentData' + description: Attachment data + required: true + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: An object will be returned containing the ID for the resource. + 201: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: A ResourceResponse object will be returned containing the ID + for the resource. + 202: + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + text/json: + schema: + $ref: '#/components/schemas/ResourceResponse' + description: An object will be returned containing the ID for the resource. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + text/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: The operation failed and the response is an error object describing + the status code and failure. + summary: UploadAttachment + tags: + - Conversations + x-codegen-request-body-name: attachmentUpload +components: + schemas: + AttachmentInfo: + description: Metadata for an attachment + example: + name: name + type: type + views: + - viewId: viewId + size: 0 + - viewId: viewId + size: 0 + properties: + name: + description: Name of the attachment + type: string + type: + description: ContentType of the attachment + type: string + views: + description: attachment views + items: + $ref: '#/components/schemas/AttachmentView' + type: array + type: object + AttachmentView: + description: Attachment View name and size + example: + viewId: viewId + size: 0 + properties: + viewId: + description: Id of the attachment + type: string + size: + description: Size of the attachment + format: int32 + type: integer + type: object + ErrorResponse: + description: An HTTP API response + properties: + error: + $ref: '#/components/schemas/Error' + type: object + Error: + description: Object representing error information + properties: + code: + description: Error code + type: string + message: + description: Error message + type: string + innerHttpError: + $ref: '#/components/schemas/InnerHttpError' + type: object + InnerHttpError: + description: Object representing inner http error + properties: + statusCode: + description: HttpStatusCode from failed request + format: int32 + type: integer + body: + description: Body from failed request + properties: {} + type: object + type: object + ConversationParameters: + description: Parameters for creating a new conversation + example: + channelData: '{}' + activity: + channelData: '{}' + attachments: + - contentUrl: contentUrl + name: name + contentType: contentType + content: '{}' + thumbnailUrl: thumbnailUrl + - contentUrl: contentUrl + name: name + contentType: contentType + content: '{}' + thumbnailUrl: thumbnailUrl + serviceUrl: serviceUrl + locale: locale + localTimezone: localTimezone + suggestedActions: + to: + - to + - to + actions: + - image: image + displayText: displayText + channelData: '{}' + text: text + title: title + value: '{}' + - image: image + displayText: displayText + channelData: '{}' + text: text + title: title + value: '{}' + membersAdded: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + valueType: valueType + localTimestamp: 2000-01-23T04:56:07.000+00:00 + action: action + listenFor: + - listenFor + - listenFor + from: + name: name + aadObjectId: aadObjectId + id: id + speak: speak + id: id + text: text + relatesTo: + activityId: activityId + bot: + name: name + aadObjectId: aadObjectId + id: id + serviceUrl: serviceUrl + user: + name: name + aadObjectId: aadObjectId + id: id + conversation: + conversationType: conversationType + tenantId: tenantId + name: name + aadObjectId: aadObjectId + id: id + isGroup: true + channelId: channelId + value: '{}' + channelId: channelId + conversation: + conversationType: conversationType + tenantId: tenantId + name: name + aadObjectId: aadObjectId + id: id + isGroup: true + timestamp: 2000-01-23T04:56:07.000+00:00 + summary: summary + replyToId: replyToId + historyDisclosed: true + reactionsAdded: + - {} + - {} + label: label + reactionsRemoved: + - {} + - {} + membersRemoved: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + entities: + - type: type + - type: type + recipient: + name: name + aadObjectId: aadObjectId + id: id + name: name + topicName: topicName + textHighlights: + - text: text + occurrence: 0 + - text: text + occurrence: 0 + expiration: 2000-01-23T04:56:07.000+00:00 + callerId: callerId + semanticAction: + entities: + key: + type: type + id: id + bot: + name: name + aadObjectId: aadObjectId + id: id + members: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + tenantId: tenantId + topicName: topicName + isGroup: true + properties: + isGroup: + description: IsGroup + type: boolean + bot: + $ref: '#/components/schemas/ChannelAccount' + members: + description: Members to add to the conversation + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + topicName: + description: (Optional) Topic of the conversation (if supported by the channel) + type: string + tenantId: + description: (Optional) The tenant ID in which the conversation should be + created + type: string + activity: + $ref: '#/components/schemas/Activity' + channelData: + description: Channel specific payload for creating the conversation + properties: {} + type: object + type: object + ChannelAccount: + description: Channel account information needed to route a message + example: + name: name + aadObjectId: aadObjectId + id: id + properties: + id: + description: 'Channel id for the user or bot on this channel (Example: joe@smith.com, + or @joesmith or 123456)' + type: string + name: + description: Display friendly name + type: string + aadObjectId: + description: This account's object ID within Azure Active Directory (AAD) + type: string + role: + $ref: '#/components/schemas/RoleTypes' + type: object + Activity: + description: An Activity is the basic communication type for the Bot Framework + 3.0 protocol. + example: + channelData: '{}' + attachments: + - contentUrl: contentUrl + name: name + contentType: contentType + content: '{}' + thumbnailUrl: thumbnailUrl + - contentUrl: contentUrl + name: name + contentType: contentType + content: '{}' + thumbnailUrl: thumbnailUrl + serviceUrl: serviceUrl + locale: locale + localTimezone: localTimezone + suggestedActions: + to: + - to + - to + actions: + - image: image + displayText: displayText + channelData: '{}' + text: text + title: title + value: '{}' + - image: image + displayText: displayText + channelData: '{}' + text: text + title: title + value: '{}' + membersAdded: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + valueType: valueType + localTimestamp: 2000-01-23T04:56:07.000+00:00 + action: action + listenFor: + - listenFor + - listenFor + from: + name: name + aadObjectId: aadObjectId + id: id + speak: speak + id: id + text: text + relatesTo: + activityId: activityId + bot: + name: name + aadObjectId: aadObjectId + id: id + serviceUrl: serviceUrl + user: + name: name + aadObjectId: aadObjectId + id: id + conversation: + conversationType: conversationType + tenantId: tenantId + name: name + aadObjectId: aadObjectId + id: id + isGroup: true + channelId: channelId + value: '{}' + channelId: channelId + conversation: + conversationType: conversationType + tenantId: tenantId + name: name + aadObjectId: aadObjectId + id: id + isGroup: true + timestamp: 2000-01-23T04:56:07.000+00:00 + summary: summary + replyToId: replyToId + historyDisclosed: true + reactionsAdded: + - {} + - {} + label: label + reactionsRemoved: + - {} + - {} + membersRemoved: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + entities: + - type: type + - type: type + recipient: + name: name + aadObjectId: aadObjectId + id: id + name: name + topicName: topicName + textHighlights: + - text: text + occurrence: 0 + - text: text + occurrence: 0 + expiration: 2000-01-23T04:56:07.000+00:00 + callerId: callerId + semanticAction: + entities: + key: + type: type + id: id + properties: + type: + $ref: '#/components/schemas/ActivityTypes' + id: + description: Contains an ID that uniquely identifies the activity on the + channel. + type: string + timestamp: + description: Contains the date and time that the message was sent, in UTC, + expressed in ISO-8601 format. + format: date-time + type: string + localTimestamp: + description: "Contains the local date and time of the message, expressed\ + \ in ISO-8601 format.\r\nFor example, 2016-09-23T13:07:49.4714686-07:00." + format: date-time + type: string + localTimezone: + description: "Contains the name of the local timezone of the message, expressed\ + \ in IANA Time Zone database format.\r\nFor example, America/Los_Angeles." + type: string + callerId: + description: "A string containing an IRI identifying the caller of a bot.\ + \ This field is not intended to be transmitted\r\nover the wire, but is\ + \ instead populated by bots and clients based on cryptographically verifiable\ + \ data\r\nthat asserts the identity of the callers (e.g. tokens)." + type: string + serviceUrl: + description: Contains the URL that specifies the channel's service endpoint. + Set by the channel. + type: string + channelId: + description: Contains an ID that uniquely identifies the channel. Set by + the channel. + type: string + from: + $ref: '#/components/schemas/ChannelAccount' + conversation: + $ref: '#/components/schemas/ConversationAccount' + recipient: + $ref: '#/components/schemas/ChannelAccount' + textFormat: + $ref: '#/components/schemas/TextFormatTypes' + attachmentLayout: + $ref: '#/components/schemas/AttachmentLayoutTypes' + membersAdded: + description: The collection of members added to the conversation. + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + membersRemoved: + description: The collection of members removed from the conversation. + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + reactionsAdded: + description: The collection of reactions added to the conversation. + items: + $ref: '#/components/schemas/MessageReaction' + type: array + reactionsRemoved: + description: The collection of reactions removed from the conversation. + items: + $ref: '#/components/schemas/MessageReaction' + type: array + topicName: + description: The updated topic name of the conversation. + type: string + historyDisclosed: + description: Indicates whether the prior history of the channel is disclosed. + type: boolean + locale: + description: "A locale name for the contents of the text field.\r\nThe locale\ + \ name is a combination of an ISO 639 two- or three-letter culture code\ + \ associated with a language\r\nand an ISO 3166 two-letter subculture\ + \ code associated with a country or region.\r\nThe locale name can also\ + \ correspond to a valid BCP-47 language tag." + type: string + text: + description: The text content of the message. + type: string + speak: + description: The text to speak. + type: string + inputHint: + $ref: '#/components/schemas/InputHints' + summary: + description: The text to display if the channel cannot render cards. + type: string + suggestedActions: + $ref: '#/components/schemas/SuggestedActions' + attachments: + description: Attachments + items: + $ref: '#/components/schemas/Attachment' + type: array + entities: + description: Represents the entities that were mentioned in the message. + items: + $ref: '#/components/schemas/Entity' + type: array + channelData: + description: Contains channel-specific content. + properties: {} + type: object + action: + description: Indicates whether the recipient of a contactRelationUpdate + was added or removed from the sender's contact list. + type: string + replyToId: + description: Contains the ID of the message to which this message is a reply. + type: string + label: + description: A descriptive label for the activity. + type: string + valueType: + description: The type of the activity's value object. + type: string + value: + description: A value that is associated with the activity. + properties: {} + type: object + name: + description: The name of the operation associated with an invoke or event + activity. + type: string + relatesTo: + $ref: '#/components/schemas/ConversationReference' + code: + $ref: '#/components/schemas/EndOfConversationCodes' + expiration: + description: The time at which the activity should be considered to be "expired" + and should not be presented to the recipient. + format: date-time + type: string + importance: + $ref: '#/components/schemas/ActivityImportance' + deliveryMode: + $ref: '#/components/schemas/DeliveryModes' + listenFor: + description: List of phrases and references that speech and language priming + systems should listen for + items: + type: string + type: array + textHighlights: + description: The collection of text fragments to highlight when the activity + contains a ReplyToId value. + items: + $ref: '#/components/schemas/TextHighlight' + type: array + semanticAction: + $ref: '#/components/schemas/SemanticAction' + type: object + ConversationAccount: + description: Conversation account represents the identity of the conversation + within a channel + example: + conversationType: conversationType + tenantId: tenantId + name: name + aadObjectId: aadObjectId + id: id + isGroup: true + properties: + isGroup: + description: Indicates whether the conversation contains more than two participants + at the time the activity was generated + type: boolean + conversationType: + description: Indicates the type of the conversation in channels that distinguish + between conversation types + type: string + tenantId: + description: This conversation's tenant ID + type: string + id: + description: 'Channel id for the user or bot on this channel (Example: joe@smith.com, + or @joesmith or 123456)' + type: string + name: + description: Display friendly name + type: string + aadObjectId: + description: This account's object ID within Azure Active Directory (AAD) + type: string + role: + $ref: '#/components/schemas/RoleTypes' + type: object + MessageReaction: + description: Message reaction object + example: {} + properties: + type: + $ref: '#/components/schemas/MessageReactionTypes' + type: object + SuggestedActions: + description: SuggestedActions that can be performed + example: + to: + - to + - to + actions: + - image: image + displayText: displayText + channelData: '{}' + text: text + title: title + value: '{}' + - image: image + displayText: displayText + channelData: '{}' + text: text + title: title + value: '{}' + properties: + to: + description: Ids of the recipients that the actions should be shown to. These + Ids are relative to the channelId and a subset of all recipients of the + activity + items: + type: string + type: array + actions: + description: Actions that can be shown to the user + items: + $ref: '#/components/schemas/CardAction' + type: array + type: object + Attachment: + description: An attachment within an activity + example: + contentUrl: contentUrl + name: name + contentType: contentType + content: '{}' + thumbnailUrl: thumbnailUrl + properties: + contentType: + description: mimetype/Contenttype for the file + type: string + contentUrl: + description: Content Url + type: string + content: + description: Embedded content + properties: {} + type: object + name: + description: (OPTIONAL) The name of the attachment + type: string + thumbnailUrl: + description: (OPTIONAL) Thumbnail associated with attachment + type: string + type: object + Entity: + description: Metadata object pertaining to an activity + example: + type: type + properties: + type: + description: Type of this entity (RFC 3987 IRI) + type: string + type: object + ConversationReference: + description: An object relating to a particular point in a conversation + example: + activityId: activityId + bot: + name: name + aadObjectId: aadObjectId + id: id + serviceUrl: serviceUrl + user: + name: name + aadObjectId: aadObjectId + id: id + conversation: + conversationType: conversationType + tenantId: tenantId + name: name + aadObjectId: aadObjectId + id: id + isGroup: true + channelId: channelId + properties: + activityId: + description: (Optional) ID of the activity to refer to + type: string + user: + $ref: '#/components/schemas/ChannelAccount' + bot: + $ref: '#/components/schemas/ChannelAccount' + conversation: + $ref: '#/components/schemas/ConversationAccount' + channelId: + description: Channel ID + type: string + serviceUrl: + description: Service endpoint where operations concerning the referenced + conversation may be performed + type: string + type: object + TextHighlight: + description: Refers to a substring of content within another field + example: + text: text + occurrence: 0 + properties: + text: + description: Defines the snippet of text to highlight + type: string + occurrence: + description: Occurrence of the text field within the referenced text, if + multiple exist. + format: int32 + type: integer + type: object + SemanticAction: + description: Represents a reference to a programmatic action + example: + entities: + key: + type: type + id: id + properties: + state: + $ref: '#/components/schemas/SemanticActionStates' + id: + description: ID of this action + type: string + entities: + additionalProperties: + $ref: '#/components/schemas/Entity' + description: Entities associated with this action + type: object + type: object + CardAction: + description: A clickable action + example: + image: image + displayText: displayText + channelData: '{}' + text: text + title: title + value: '{}' + properties: + type: + $ref: '#/components/schemas/ActionTypes' + title: + description: Text description which appears on the button + type: string + image: + description: Image URL which will appear on the button, next to text label + type: string + text: + description: Text for this action + type: string + displayText: + description: (Optional) text to display in the chat feed if the button is + clicked + type: string + value: + description: Supplementary parameter for action. Content of this property + depends on the ActionType + properties: {} + type: object + channelData: + description: Channel-specific data associated with this action + properties: {} + type: object + type: object + ConversationResourceResponse: + description: A response containing a resource + example: + activityId: activityId + serviceUrl: serviceUrl + id: id + properties: + activityId: + description: ID of the Activity (if sent) + type: string + serviceUrl: + description: Service endpoint where operations concerning the conversation + may be performed + type: string + id: + description: Id of the resource + type: string + type: object + ConversationsResult: + description: Conversations result + example: + conversations: + - members: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + id: id + - members: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + id: id + continuationToken: continuationToken + properties: + continuationToken: + description: Paging token + type: string + conversations: + description: List of conversations + items: + $ref: '#/components/schemas/ConversationMembers' + type: array + type: object + ConversationMembers: + description: Conversation and its members + example: + members: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + id: id + properties: + id: + description: Conversation ID + type: string + members: + description: List of members in this conversation + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + type: object + ResourceResponse: + description: A response containing a resource ID + example: + id: id + properties: + id: + description: Id of the resource + type: string + type: object + Transcript: + description: Transcript + example: + activities: + - channelData: '{}' + attachments: + - contentUrl: contentUrl + name: name + contentType: contentType + content: '{}' + thumbnailUrl: thumbnailUrl + - contentUrl: contentUrl + name: name + contentType: contentType + content: '{}' + thumbnailUrl: thumbnailUrl + serviceUrl: serviceUrl + locale: locale + localTimezone: localTimezone + suggestedActions: + to: + - to + - to + actions: + - image: image + displayText: displayText + channelData: '{}' + text: text + title: title + value: '{}' + - image: image + displayText: displayText + channelData: '{}' + text: text + title: title + value: '{}' + membersAdded: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + valueType: valueType + localTimestamp: 2000-01-23T04:56:07.000+00:00 + action: action + listenFor: + - listenFor + - listenFor + from: + name: name + aadObjectId: aadObjectId + id: id + speak: speak + id: id + text: text + relatesTo: + activityId: activityId + bot: + name: name + aadObjectId: aadObjectId + id: id + serviceUrl: serviceUrl + user: + name: name + aadObjectId: aadObjectId + id: id + conversation: + conversationType: conversationType + tenantId: tenantId + name: name + aadObjectId: aadObjectId + id: id + isGroup: true + channelId: channelId + value: '{}' + channelId: channelId + conversation: + conversationType: conversationType + tenantId: tenantId + name: name + aadObjectId: aadObjectId + id: id + isGroup: true + timestamp: 2000-01-23T04:56:07.000+00:00 + summary: summary + replyToId: replyToId + historyDisclosed: true + reactionsAdded: + - {} + - {} + label: label + reactionsRemoved: + - {} + - {} + membersRemoved: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + entities: + - type: type + - type: type + recipient: + name: name + aadObjectId: aadObjectId + id: id + name: name + topicName: topicName + textHighlights: + - text: text + occurrence: 0 + - text: text + occurrence: 0 + expiration: 2000-01-23T04:56:07.000+00:00 + callerId: callerId + semanticAction: + entities: + key: + type: type + id: id + - channelData: '{}' + attachments: + - contentUrl: contentUrl + name: name + contentType: contentType + content: '{}' + thumbnailUrl: thumbnailUrl + - contentUrl: contentUrl + name: name + contentType: contentType + content: '{}' + thumbnailUrl: thumbnailUrl + serviceUrl: serviceUrl + locale: locale + localTimezone: localTimezone + suggestedActions: + to: + - to + - to + actions: + - image: image + displayText: displayText + channelData: '{}' + text: text + title: title + value: '{}' + - image: image + displayText: displayText + channelData: '{}' + text: text + title: title + value: '{}' + membersAdded: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + valueType: valueType + localTimestamp: 2000-01-23T04:56:07.000+00:00 + action: action + listenFor: + - listenFor + - listenFor + from: + name: name + aadObjectId: aadObjectId + id: id + speak: speak + id: id + text: text + relatesTo: + activityId: activityId + bot: + name: name + aadObjectId: aadObjectId + id: id + serviceUrl: serviceUrl + user: + name: name + aadObjectId: aadObjectId + id: id + conversation: + conversationType: conversationType + tenantId: tenantId + name: name + aadObjectId: aadObjectId + id: id + isGroup: true + channelId: channelId + value: '{}' + channelId: channelId + conversation: + conversationType: conversationType + tenantId: tenantId + name: name + aadObjectId: aadObjectId + id: id + isGroup: true + timestamp: 2000-01-23T04:56:07.000+00:00 + summary: summary + replyToId: replyToId + historyDisclosed: true + reactionsAdded: + - {} + - {} + label: label + reactionsRemoved: + - {} + - {} + membersRemoved: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + entities: + - type: type + - type: type + recipient: + name: name + aadObjectId: aadObjectId + id: id + name: name + topicName: topicName + textHighlights: + - text: text + occurrence: 0 + - text: text + occurrence: 0 + expiration: 2000-01-23T04:56:07.000+00:00 + callerId: callerId + semanticAction: + entities: + key: + type: type + id: id + properties: + activities: + description: A collection of Activities that conforms to the Transcript + schema. + items: + $ref: '#/components/schemas/Activity' + type: array + type: object + PagedMembersResult: + description: Page of members. + example: + members: + - name: name + aadObjectId: aadObjectId + id: id + - name: name + aadObjectId: aadObjectId + id: id + continuationToken: continuationToken + properties: + continuationToken: + description: Paging token + type: string + members: + description: The Channel Accounts. + items: + $ref: '#/components/schemas/ChannelAccount' + type: array + type: object + AttachmentData: + description: Attachment data + example: + thumbnailBase64: thumbnailBase64 + name: name + originalBase64: originalBase64 + type: type + properties: + type: + description: Content-Type of the attachment + type: string + name: + description: Name of the attachment + type: string + originalBase64: + description: Attachment content + format: byte + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + thumbnailBase64: + description: Attachment thumbnail + format: byte + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + type: object + HeroCard: + description: A Hero card (card with a single, large image) + properties: + title: + description: Title of the card + type: string + subtitle: + description: Subtitle of the card + type: string + text: + description: Text for the card + type: string + images: + description: Array of images for the card + items: + $ref: '#/components/schemas/CardImage' + type: array + buttons: + description: Set of actions applicable to the current card + items: + $ref: '#/components/schemas/CardAction' + type: array + tap: + $ref: '#/components/schemas/CardAction' + type: object + CardImage: + description: An image on a card + properties: + url: + description: URL thumbnail image for major content property + type: string + alt: + description: Image description intended for screen readers + type: string + tap: + $ref: '#/components/schemas/CardAction' + type: object + AnimationCard: + description: 'An animation card (Ex: gif or short video clip)' + properties: + title: + description: Title of this card + type: string + subtitle: + description: Subtitle of this card + type: string + text: + description: Text of this card + type: string + image: + $ref: '#/components/schemas/ThumbnailUrl' + media: + description: Media URLs for this card. When this field contains more than + one URL, each URL is an alternative format of the same content. + items: + $ref: '#/components/schemas/MediaUrl' + type: array + buttons: + description: Actions on this card + items: + $ref: '#/components/schemas/CardAction' + type: array + shareable: + description: This content may be shared with others (default:true) + type: boolean + autoloop: + description: Should the client loop playback at end of content (default:true) + type: boolean + autostart: + description: Should the client automatically start playback of media in + this card (default:true) + type: boolean + aspect: + description: Aspect ratio of thumbnail/media placeholder. Allowed values + are "16:9" and "4:3" + type: string + duration: + description: Describes the length of the media content without requiring + a receiver to open the content. Formatted as an ISO 8601 Duration field. + type: string + value: + description: Supplementary parameter for this card + properties: {} + type: object + type: object + ThumbnailUrl: + description: Thumbnail URL + properties: + url: + description: URL pointing to the thumbnail to use for media content + type: string + alt: + description: HTML alt text to include on this thumbnail image + type: string + type: object + MediaUrl: + description: Media URL + properties: + url: + description: Url for the media + type: string + profile: + description: Optional profile hint to the client to differentiate multiple + MediaUrl objects from each other + type: string + type: object + AudioCard: + description: Audio card + properties: + title: + description: Title of this card + type: string + subtitle: + description: Subtitle of this card + type: string + text: + description: Text of this card + type: string + image: + $ref: '#/components/schemas/ThumbnailUrl' + media: + description: Media URLs for this card. When this field contains more than + one URL, each URL is an alternative format of the same content. + items: + $ref: '#/components/schemas/MediaUrl' + type: array + buttons: + description: Actions on this card + items: + $ref: '#/components/schemas/CardAction' + type: array + shareable: + description: This content may be shared with others (default:true) + type: boolean + autoloop: + description: Should the client loop playback at end of content (default:true) + type: boolean + autostart: + description: Should the client automatically start playback of media in + this card (default:true) + type: boolean + aspect: + description: Aspect ratio of thumbnail/media placeholder. Allowed values + are "16:9" and "4:3" + type: string + duration: + description: Describes the length of the media content without requiring + a receiver to open the content. Formatted as an ISO 8601 Duration field. + type: string + value: + description: Supplementary parameter for this card + properties: {} + type: object + type: object + BasicCard: + description: A basic card + properties: + title: + description: Title of the card + type: string + subtitle: + description: Subtitle of the card + type: string + text: + description: Text for the card + type: string + images: + description: Array of images for the card + items: + $ref: '#/components/schemas/CardImage' + type: array + buttons: + description: Set of actions applicable to the current card + items: + $ref: '#/components/schemas/CardAction' + type: array + tap: + $ref: '#/components/schemas/CardAction' + type: object + MediaCard: + description: Media card + properties: + title: + description: Title of this card + type: string + subtitle: + description: Subtitle of this card + type: string + text: + description: Text of this card + type: string + image: + $ref: '#/components/schemas/ThumbnailUrl' + media: + description: Media URLs for this card. When this field contains more than + one URL, each URL is an alternative format of the same content. + items: + $ref: '#/components/schemas/MediaUrl' + type: array + buttons: + description: Actions on this card + items: + $ref: '#/components/schemas/CardAction' + type: array + shareable: + description: This content may be shared with others (default:true) + type: boolean + autoloop: + description: Should the client loop playback at end of content (default:true) + type: boolean + autostart: + description: Should the client automatically start playback of media in + this card (default:true) + type: boolean + aspect: + description: Aspect ratio of thumbnail/media placeholder. Allowed values + are "16:9" and "4:3" + type: string + duration: + description: Describes the length of the media content without requiring + a receiver to open the content. Formatted as an ISO 8601 Duration field. + type: string + value: + description: Supplementary parameter for this card + properties: {} + type: object + type: object + ReceiptCard: + description: A receipt card + properties: + title: + description: Title of the card + type: string + facts: + description: Array of Fact objects + items: + $ref: '#/components/schemas/Fact' + type: array + items: + description: Array of Receipt Items + items: + $ref: '#/components/schemas/ReceiptItem' + type: array + tap: + $ref: '#/components/schemas/CardAction' + total: + description: Total amount of money paid (or to be paid) + type: string + tax: + description: Total amount of tax paid (or to be paid) + type: string + vat: + description: Total amount of VAT paid (or to be paid) + type: string + buttons: + description: Set of actions applicable to the current card + items: + $ref: '#/components/schemas/CardAction' + type: array + type: object + Fact: + description: "Set of key-value pairs. Advantage of this section is that key\ + \ and value properties will be \r\nrendered with default style information\ + \ with some delimiter between them. So there is no need for developer to specify\ + \ style information." + properties: + key: + description: The key for this Fact + type: string + value: + description: The value for this Fact + type: string + type: object + ReceiptItem: + description: An item on a receipt card + properties: + title: + description: Title of the Card + type: string + subtitle: + description: Subtitle appears just below Title field, differs from Title + in font styling only + type: string + text: + description: Text field appears just below subtitle, differs from Subtitle + in font styling only + type: string + image: + $ref: '#/components/schemas/CardImage' + price: + description: Amount with currency + type: string + quantity: + description: Number of items of given kind + type: string + tap: + $ref: '#/components/schemas/CardAction' + type: object + SigninCard: + description: A card representing a request to sign in + properties: + text: + description: Text for signin request + type: string + buttons: + description: Action to use to perform signin + items: + $ref: '#/components/schemas/CardAction' + type: array + type: object + OAuthCard: + description: A card representing a request to perform a sign in via OAuth + properties: + text: + description: Text for signin request + type: string + connectionName: + description: The name of the registered connection + type: string + buttons: + description: Action to use to perform signin + items: + $ref: '#/components/schemas/CardAction' + type: array + type: object + ThumbnailCard: + description: A thumbnail card (card with a single, small thumbnail image) + properties: + title: + description: Title of the card + type: string + subtitle: + description: Subtitle of the card + type: string + text: + description: Text for the card + type: string + images: + description: Array of images for the card + items: + $ref: '#/components/schemas/CardImage' + type: array + buttons: + description: Set of actions applicable to the current card + items: + $ref: '#/components/schemas/CardAction' + type: array + tap: + $ref: '#/components/schemas/CardAction' + type: object + VideoCard: + description: Video card + properties: + title: + description: Title of this card + type: string + subtitle: + description: Subtitle of this card + type: string + text: + description: Text of this card + type: string + image: + $ref: '#/components/schemas/ThumbnailUrl' + media: + description: Media URLs for this card. When this field contains more than + one URL, each URL is an alternative format of the same content. + items: + $ref: '#/components/schemas/MediaUrl' + type: array + buttons: + description: Actions on this card + items: + $ref: '#/components/schemas/CardAction' + type: array + shareable: + description: This content may be shared with others (default:true) + type: boolean + autoloop: + description: Should the client loop playback at end of content (default:true) + type: boolean + autostart: + description: Should the client automatically start playback of media in + this card (default:true) + type: boolean + aspect: + description: Aspect ratio of thumbnail/media placeholder. Allowed values + are "16:9" and "4:3" + type: string + duration: + description: Describes the length of the media content without requiring + a receiver to open the content. Formatted as an ISO 8601 Duration field. + type: string + value: + description: Supplementary parameter for this card + properties: {} + type: object + type: object + GeoCoordinates: + description: 'GeoCoordinates (entity type: "https://schema.org/GeoCoordinates")' + properties: + elevation: + description: Elevation of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) + format: double + type: number + latitude: + description: Latitude of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) + format: double + type: number + longitude: + description: Longitude of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) + format: double + type: number + type: + description: The type of the thing + type: string + name: + description: The name of the thing + type: string + type: object + Mention: + description: 'Mention information (entity type: "mention")' + properties: + mentioned: + $ref: '#/components/schemas/ChannelAccount' + text: + description: Sub Text which represents the mention (can be null or empty) + type: string + type: + description: Type of this entity (RFC 3987 IRI) + type: string + type: object + Place: + description: 'Place (entity type: "https://schema.org/Place")' + properties: + address: + description: Address of the place (may be `string` or complex object of + type `PostalAddress`) + properties: {} + type: object + geo: + description: Geo coordinates of the place (may be complex object of type + `GeoCoordinates` or `GeoShape`) + properties: {} + type: object + hasMap: + description: Map to the place (may be `string` (URL) or complex object of + type `Map`) + properties: {} + type: object + type: + description: The type of the thing + type: string + name: + description: The name of the thing + type: string + type: object + Thing: + description: 'Thing (entity type: "https://schema.org/Thing")' + properties: + type: + description: The type of the thing + type: string + name: + description: The name of the thing + type: string + type: object + MediaEventValue: + description: Supplementary parameter for media events + properties: + cardValue: + description: Callback parameter specified in the Value field of the MediaCard + that originated this event + properties: {} + type: object + type: object + TokenRequest: + description: A request to receive a user token + properties: + provider: + description: The provider to request a user token from + type: string + settings: + additionalProperties: + properties: {} + type: object + description: A collection of settings for the specific provider for this + request + type: object + type: object + TokenResponse: + description: A response that includes a user token + properties: + channelId: + description: The channelId of the TokenResponse + type: string + connectionName: + description: The connection name + type: string + token: + description: The user token + type: string + expiration: + description: Expiration for the token, in ISO 8601 format (e.g. "2007-04-05T14:30Z") + type: string + type: object + ActivityTypes: + description: Types of Activities + enum: + - message + - contactRelationUpdate + - conversationUpdate + - typing + - endOfConversation + - event + - invoke + - deleteUserData + - messageUpdate + - messageDelete + - installationUpdate + - messageReaction + - suggestion + - trace + - handoff + type: string + x-ms-enum: + name: ActivityTypes + modelAsString: true + AttachmentLayoutTypes: + description: Attachment layout types + enum: + - list + - carousel + type: string + x-ms-enum: + name: AttachmentLayoutTypes + modelAsString: true + SemanticActionStates: + description: Indicates whether the semantic action is starting, continuing, + or done + enum: + - start + - continue + - done + type: string + x-ms-enum: + name: SemanticActionStates + modelAsString: true + ActionTypes: + description: Defines action types for clickable buttons. + enum: + - openUrl + - imBack + - postBack + - playAudio + - playVideo + - showImage + - downloadFile + - signin + - call + - payment + - messageBack + type: string + x-ms-enum: + name: ActionTypes + modelAsString: true + ContactRelationUpdateActionTypes: + description: Action types valid for ContactRelationUpdate activities + enum: + - add + - remove + type: string + x-ms-enum: + name: ContactRelationUpdateActionTypes + modelAsString: true + InstallationUpdateActionTypes: + description: Action types valid for InstallationUpdate activities + enum: + - add + - remove + type: string + x-ms-enum: + name: InstallationUpdateActionTypes + modelAsString: true + MessageReactionTypes: + description: Message reaction types + enum: + - like + - plusOne + type: string + x-ms-enum: + name: MessageReactionTypes + modelAsString: true + TextFormatTypes: + description: Text format types + enum: + - markdown + - plain + - xml + type: string + x-ms-enum: + name: TextFormatTypes + modelAsString: true + InputHints: + description: Indicates whether the bot is accepting, expecting, or ignoring + input + enum: + - acceptingInput + - ignoringInput + - expectingInput + type: string + x-ms-enum: + name: InputHints + modelAsString: true + EndOfConversationCodes: + description: Codes indicating why a conversation has ended + enum: + - unknown + - completedSuccessfully + - userCancelled + - botTimedOut + - botIssuedInvalidMessage + - channelFailed + type: string + x-ms-enum: + name: EndOfConversationCodes + modelAsString: true + ActivityImportance: + description: Defines the importance of an Activity + enum: + - low + - normal + - high + type: string + x-ms-enum: + name: ActivityImportance + modelAsString: true + RoleTypes: + description: 'Role of the entity behind the account (Example: User, Bot, etc.)' + enum: + - user + - bot + type: string + x-ms-enum: + name: RoleTypes + modelAsString: true + DeliveryModes: + description: Values for deliveryMode field + enum: + - normal + - notification + type: string + x-ms-enum: + name: DeliveryModes + modelAsString: true + MicrosoftPayMethodData: + description: W3C Payment Method Data for Microsoft Pay + properties: + merchantId: + description: Microsoft Pay Merchant ID + type: string + supportedNetworks: + description: Supported payment networks (e.g., "visa" and "mastercard") + items: + type: string + type: array + supportedTypes: + description: Supported payment types (e.g., "credit") + items: + type: string + type: array + type: object + PaymentAddress: + description: Address within a Payment Request + properties: + country: + description: This is the CLDR (Common Locale Data Repository) region code. + For example, US, GB, CN, or JP + type: string + addressLine: + description: This is the most specific part of the address. It can include, + for example, a street name, a house number, apartment number, a rural + delivery route, descriptive instructions, or a post office box number. + items: + type: string + type: array + region: + description: This is the top level administrative subdivision of the country. + For example, this can be a state, a province, an oblast, or a prefecture. + type: string + city: + description: This is the city/town portion of the address. + type: string + dependentLocality: + description: This is the dependent locality or sublocality within a city. + For example, used for neighborhoods, boroughs, districts, or UK dependent + localities. + type: string + postalCode: + description: This is the postal code or ZIP code, also known as PIN code + in India. + type: string + sortingCode: + description: This is the sorting code as used in, for example, France. + type: string + languageCode: + description: This is the BCP-47 language code for the address. It's used + to determine the field separators and the order of fields when formatting + the address for display. + type: string + organization: + description: This is the organization, firm, company, or institution at + this address. + type: string + recipient: + description: This is the name of the recipient or contact person. + type: string + phone: + description: This is the phone number of the recipient or contact person. + type: string + type: object + PaymentCurrencyAmount: + description: Supplies monetary amounts + properties: + currency: + description: A currency identifier + type: string + value: + description: Decimal monetary value + type: string + currencySystem: + description: Currency system + type: string + type: object + PaymentDetails: + description: Provides information about the requested transaction + properties: + total: + $ref: '#/components/schemas/PaymentItem' + displayItems: + description: Contains line items for the payment request that the user agent + may display + items: + $ref: '#/components/schemas/PaymentItem' + type: array + shippingOptions: + description: A sequence containing the different shipping options for the + user to choose from + items: + $ref: '#/components/schemas/PaymentShippingOption' + type: array + modifiers: + description: Contains modifiers for particular payment method identifiers + items: + $ref: '#/components/schemas/PaymentDetailsModifier' + type: array + error: + description: Error description + type: string + type: object + PaymentItem: + description: Indicates what the payment request is for and the value asked for + properties: + label: + description: Human-readable description of the item + type: string + amount: + $ref: '#/components/schemas/PaymentCurrencyAmount' + pending: + description: When set to true this flag means that the amount field is not + final. + type: boolean + type: object + PaymentShippingOption: + description: Describes a shipping option + properties: + id: + description: String identifier used to reference this PaymentShippingOption + type: string + label: + description: Human-readable description of the item + type: string + amount: + $ref: '#/components/schemas/PaymentCurrencyAmount' + selected: + description: Indicates whether this is the default selected PaymentShippingOption + type: boolean + type: object + PaymentDetailsModifier: + description: Provides details that modify the PaymentDetails based on payment + method identifier + properties: + supportedMethods: + description: Contains a sequence of payment method identifiers + items: + type: string + type: array + total: + $ref: '#/components/schemas/PaymentItem' + additionalDisplayItems: + description: Provides additional display items that are appended to the + displayItems field in the PaymentDetails dictionary for the payment method + identifiers in the supportedMethods field + items: + $ref: '#/components/schemas/PaymentItem' + type: array + data: + description: A JSON-serializable object that provides optional information + that might be needed by the supported payment methods + properties: {} + type: object + type: object + PaymentMethodData: + description: Indicates a set of supported payment methods and any associated + payment method specific data for those methods + properties: + supportedMethods: + description: Required sequence of strings containing payment method identifiers + for payment methods that the merchant web site accepts + items: + type: string + type: array + data: + description: A JSON-serializable object that provides optional information + that might be needed by the supported payment methods + properties: {} + type: object + type: object + PaymentOptions: + description: Provides information about the options desired for the payment + request + properties: + requestPayerName: + description: Indicates whether the user agent should collect and return + the payer's name as part of the payment request + type: boolean + requestPayerEmail: + description: Indicates whether the user agent should collect and return + the payer's email address as part of the payment request + type: boolean + requestPayerPhone: + description: Indicates whether the user agent should collect and return + the payer's phone number as part of the payment request + type: boolean + requestShipping: + description: Indicates whether the user agent should collect and return + a shipping address as part of the payment request + type: boolean + shippingType: + description: If requestShipping is set to true, then the shippingType field + may be used to influence the way the user agent presents the user interface + for gathering the shipping address + type: string + type: object + PaymentRequest: + description: A request to make a payment + properties: + id: + description: ID of this payment request + type: string + methodData: + description: Allowed payment methods for this request + items: + $ref: '#/components/schemas/PaymentMethodData' + type: array + details: + $ref: '#/components/schemas/PaymentDetails' + options: + $ref: '#/components/schemas/PaymentOptions' + expires: + description: Expiration for this request, in ISO 8601 duration format (e.g., + 'P1D') + type: string + type: object + PaymentRequestComplete: + description: Payload delivered when completing a payment request + properties: + id: + description: Payment request ID + type: string + paymentRequest: + $ref: '#/components/schemas/PaymentRequest' + paymentResponse: + $ref: '#/components/schemas/PaymentResponse' + type: object + PaymentResponse: + description: A PaymentResponse is returned when a user has selected a payment + method and approved a payment request + properties: + methodName: + description: The payment method identifier for the payment method that the + user selected to fulfil the transaction + type: string + details: + description: A JSON-serializable object that provides a payment method specific + message used by the merchant to process the transaction and determine + successful fund transfer + properties: {} + type: object + shippingAddress: + $ref: '#/components/schemas/PaymentAddress' + shippingOption: + description: If the requestShipping flag was set to true in the PaymentOptions + passed to the PaymentRequest constructor, then shippingOption will be + the id attribute of the selected shipping option + type: string + payerEmail: + description: If the requestPayerEmail flag was set to true in the PaymentOptions + passed to the PaymentRequest constructor, then payerEmail will be the + email address chosen by the user + type: string + payerPhone: + description: If the requestPayerPhone flag was set to true in the PaymentOptions + passed to the PaymentRequest constructor, then payerPhone will be the + phone number chosen by the user + type: string + type: object + PaymentRequestCompleteResult: + description: Result from a completed payment request + properties: + result: + description: Result of the payment request completion + type: string + type: object + PaymentRequestUpdate: + description: An update to a payment request + properties: + id: + description: ID for the payment request to update + type: string + details: + $ref: '#/components/schemas/PaymentDetails' + shippingAddress: + $ref: '#/components/schemas/PaymentAddress' + shippingOption: + description: Updated shipping options + type: string + type: object + PaymentRequestUpdateResult: + description: A result object from a Payment Request Update invoke operation + properties: + details: + $ref: '#/components/schemas/PaymentDetails' + type: object + securitySchemes: + bearer_auth: + description: Access token to authenticate calls to the Bot Connector Service. + in: header + name: Authorization + type: apiKey diff --git a/build/codegen.sh b/build/codegen.sh index b21abc0..ee82057 100755 --- a/build/codegen.sh +++ b/build/codegen.sh @@ -1,10 +1,22 @@ #!/bin/bash -OUT_DIR="pkg" +set -o errexit +set -o nounset + +OUT_DIR="." +uid="$(id -u)" +gid="$(id -g)" echo 'Generating code with openapi-generator-cli' -docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/protocol/botframework.json -o /local/${OUT_DIR} -g go -c /local/protocol/openapi-config.yaml +sudo chown ${uid}:${gid} -R . +docker run --rm -v ${PWD}:/local --user ${uid}:${gid} \ + openapitools/openapi-generator-cli generate \ + -i /local/protocol/botframework.json \ + -o /local/${OUT_DIR} \ + -g go-server \ + -c /local/protocol/openapi-config.yaml + # Fix permissions -sudo find ${OUT_DIR} -type d -exec chmod 755 {} \; -sudo find ${OUT_DIR} -type f -exec chmod 664 {} \; +#sudo find ${OUT_DIR} -type d -exec chmod 775 {} \; +#sudo find ${OUT_DIR} -type f -exec chmod 664 {} \; diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5b6a67c --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/GIT_USER_ID/GIT_REPO_ID + +go 1.13 + +require github.com/gorilla/mux v1.7.3 diff --git a/main.go b/main.go new file mode 100644 index 0000000..a080fa9 --- /dev/null +++ b/main.go @@ -0,0 +1,32 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package main + +import ( + "log" + "net/http" + + botbuilder "github.com/GIT_USER_ID/GIT_REPO_ID/pkg" +) + +func main() { + log.Printf("Server started") + + AttachmentsApiService := botbuilder.NewAttachmentsApiService() + AttachmentsApiController := botbuilder.NewAttachmentsApiController(AttachmentsApiService) + + ConversationsApiService := botbuilder.NewConversationsApiService() + ConversationsApiController := botbuilder.NewConversationsApiController(ConversationsApiService) + + router := botbuilder.NewRouter(AttachmentsApiController, ConversationsApiController) + + log.Fatal(http.ListenAndServe(":8080", router)) +} diff --git a/pkg/api.go b/pkg/api.go new file mode 100644 index 0000000..0a68d6c --- /dev/null +++ b/pkg/api.go @@ -0,0 +1,71 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +import ( + "net/http" +) + + +// AttachmentsApiRouter defines the required methods for binding the api requests to a responses for the AttachmentsApi +// The AttachmentsApiRouter implementation should parse necessary information from the http request, +// pass the data to a AttachmentsApiServicer to perform the required actions, then write the service results to the http response. +type AttachmentsApiRouter interface { + AttachmentsGetAttachment(http.ResponseWriter, *http.Request) + AttachmentsGetAttachmentInfo(http.ResponseWriter, *http.Request) +} +// ConversationsApiRouter defines the required methods for binding the api requests to a responses for the ConversationsApi +// The ConversationsApiRouter implementation should parse necessary information from the http request, +// pass the data to a ConversationsApiServicer to perform the required actions, then write the service results to the http response. +type ConversationsApiRouter interface { + ConversationsCreateConversation(http.ResponseWriter, *http.Request) + ConversationsDeleteActivity(http.ResponseWriter, *http.Request) + ConversationsDeleteConversationMember(http.ResponseWriter, *http.Request) + ConversationsGetActivityMembers(http.ResponseWriter, *http.Request) + ConversationsGetConversationMembers(http.ResponseWriter, *http.Request) + ConversationsGetConversationPagedMembers(http.ResponseWriter, *http.Request) + ConversationsGetConversations(http.ResponseWriter, *http.Request) + ConversationsReplyToActivity(http.ResponseWriter, *http.Request) + ConversationsSendConversationHistory(http.ResponseWriter, *http.Request) + ConversationsSendToConversation(http.ResponseWriter, *http.Request) + ConversationsUpdateActivity(http.ResponseWriter, *http.Request) + ConversationsUploadAttachment(http.ResponseWriter, *http.Request) +} + + +// AttachmentsApiServicer defines the api actions for the AttachmentsApi service +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file +// and updated with the logic required for the API. +type AttachmentsApiServicer interface { + AttachmentsGetAttachment(string, string) (interface{}, error) + AttachmentsGetAttachmentInfo(string) (interface{}, error) +} + + +// ConversationsApiServicer defines the api actions for the ConversationsApi service +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file +// and updated with the logic required for the API. +type ConversationsApiServicer interface { + ConversationsCreateConversation(ConversationParameters) (interface{}, error) + ConversationsDeleteActivity(string, string) (interface{}, error) + ConversationsDeleteConversationMember(string, string) (interface{}, error) + ConversationsGetActivityMembers(string, string) (interface{}, error) + ConversationsGetConversationMembers(string) (interface{}, error) + ConversationsGetConversationPagedMembers(string, int32, string) (interface{}, error) + ConversationsGetConversations(string) (interface{}, error) + ConversationsReplyToActivity(string, string, Activity) (interface{}, error) + ConversationsSendConversationHistory(string, Transcript) (interface{}, error) + ConversationsSendToConversation(string, Activity) (interface{}, error) + ConversationsUpdateActivity(string, string, Activity) (interface{}, error) + ConversationsUploadAttachment(string, AttachmentData) (interface{}, error) +} diff --git a/pkg/api_attachments.go b/pkg/api_attachments.go new file mode 100644 index 0000000..2905f62 --- /dev/null +++ b/pkg/api_attachments.go @@ -0,0 +1,74 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +import ( + "encoding/json" + "net/http" + "strings" + + "github.com/gorilla/mux" +) + +// A AttachmentsApiController binds http requests to an api service and writes the service results to the http response +type AttachmentsApiController struct { + service AttachmentsApiServicer +} + +// NewAttachmentsApiController creates a default api controller +func NewAttachmentsApiController(s AttachmentsApiServicer) Router { + return &AttachmentsApiController{ service: s } +} + +// Routes returns all of the api route for the AttachmentsApiController +func (c *AttachmentsApiController) Routes() Routes { + return Routes{ + { + "AttachmentsGetAttachment", + strings.ToUpper("Get"), + "/v3/attachments/{attachmentId}/views/{viewId}", + c.AttachmentsGetAttachment, + }, + { + "AttachmentsGetAttachmentInfo", + strings.ToUpper("Get"), + "/v3/attachments/{attachmentId}", + c.AttachmentsGetAttachmentInfo, + }, + } +} + +// AttachmentsGetAttachment - GetAttachment +func (c *AttachmentsApiController) AttachmentsGetAttachment(w http.ResponseWriter, r *http.Request) { + params := mux.Vars(r) + attachmentId := params["attachmentId"] + viewId := params["viewId"] + result, err := c.service.AttachmentsGetAttachment(attachmentId, viewId) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + +// AttachmentsGetAttachmentInfo - GetAttachmentInfo +func (c *AttachmentsApiController) AttachmentsGetAttachmentInfo(w http.ResponseWriter, r *http.Request) { + params := mux.Vars(r) + attachmentId := params["attachmentId"] + result, err := c.service.AttachmentsGetAttachmentInfo(attachmentId) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} diff --git a/pkg/api_attachments_service.go b/pkg/api_attachments_service.go new file mode 100644 index 0000000..095c841 --- /dev/null +++ b/pkg/api_attachments_service.go @@ -0,0 +1,40 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +import ( + "errors" +) + +// AttachmentsApiService is a service that implents the logic for the AttachmentsApiServicer +// This service should implement the business logic for every endpoint for the AttachmentsApi API. +// Include any external packages or services that will be required by this service. +type AttachmentsApiService struct { +} + +// NewAttachmentsApiService creates a default api service +func NewAttachmentsApiService() AttachmentsApiServicer { + return &AttachmentsApiService{} +} + +// AttachmentsGetAttachment - GetAttachment +func (s *AttachmentsApiService) AttachmentsGetAttachment(attachmentId string, viewId string) (interface{}, error) { + // TODO - update AttachmentsGetAttachment with the required logic for this service method. + // Add api_attachments_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'AttachmentsGetAttachment' not implemented") +} + +// AttachmentsGetAttachmentInfo - GetAttachmentInfo +func (s *AttachmentsApiService) AttachmentsGetAttachmentInfo(attachmentId string) (interface{}, error) { + // TODO - update AttachmentsGetAttachmentInfo with the required logic for this service method. + // Add api_attachments_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'AttachmentsGetAttachmentInfo' not implemented") +} diff --git a/pkg/api_conversations.go b/pkg/api_conversations.go new file mode 100644 index 0000000..37231ad --- /dev/null +++ b/pkg/api_conversations.go @@ -0,0 +1,305 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +import ( + "encoding/json" + "net/http" + "strings" + + "github.com/gorilla/mux" +) + +// A ConversationsApiController binds http requests to an api service and writes the service results to the http response +type ConversationsApiController struct { + service ConversationsApiServicer +} + +// NewConversationsApiController creates a default api controller +func NewConversationsApiController(s ConversationsApiServicer) Router { + return &ConversationsApiController{ service: s } +} + +// Routes returns all of the api route for the ConversationsApiController +func (c *ConversationsApiController) Routes() Routes { + return Routes{ + { + "ConversationsCreateConversation", + strings.ToUpper("Post"), + "/v3/conversations", + c.ConversationsCreateConversation, + }, + { + "ConversationsDeleteActivity", + strings.ToUpper("Delete"), + "/v3/conversations/{conversationId}/activities/{activityId}", + c.ConversationsDeleteActivity, + }, + { + "ConversationsDeleteConversationMember", + strings.ToUpper("Delete"), + "/v3/conversations/{conversationId}/members/{memberId}", + c.ConversationsDeleteConversationMember, + }, + { + "ConversationsGetActivityMembers", + strings.ToUpper("Get"), + "/v3/conversations/{conversationId}/activities/{activityId}/members", + c.ConversationsGetActivityMembers, + }, + { + "ConversationsGetConversationMembers", + strings.ToUpper("Get"), + "/v3/conversations/{conversationId}/members", + c.ConversationsGetConversationMembers, + }, + { + "ConversationsGetConversationPagedMembers", + strings.ToUpper("Get"), + "/v3/conversations/{conversationId}/pagedmembers", + c.ConversationsGetConversationPagedMembers, + }, + { + "ConversationsGetConversations", + strings.ToUpper("Get"), + "/v3/conversations", + c.ConversationsGetConversations, + }, + { + "ConversationsReplyToActivity", + strings.ToUpper("Post"), + "/v3/conversations/{conversationId}/activities/{activityId}", + c.ConversationsReplyToActivity, + }, + { + "ConversationsSendConversationHistory", + strings.ToUpper("Post"), + "/v3/conversations/{conversationId}/activities/history", + c.ConversationsSendConversationHistory, + }, + { + "ConversationsSendToConversation", + strings.ToUpper("Post"), + "/v3/conversations/{conversationId}/activities", + c.ConversationsSendToConversation, + }, + { + "ConversationsUpdateActivity", + strings.ToUpper("Put"), + "/v3/conversations/{conversationId}/activities/{activityId}", + c.ConversationsUpdateActivity, + }, + { + "ConversationsUploadAttachment", + strings.ToUpper("Post"), + "/v3/conversations/{conversationId}/attachments", + c.ConversationsUploadAttachment, + }, + } +} + +// ConversationsCreateConversation - CreateConversation +func (c *ConversationsApiController) ConversationsCreateConversation(w http.ResponseWriter, r *http.Request) { + parameters := &ConversationParameters{} + if err := json.NewDecoder(r.Body).Decode(¶meters); err != nil { + w.WriteHeader(500) + return + } + + result, err := c.service.ConversationsCreateConversation(*parameters) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + +// ConversationsDeleteActivity - DeleteActivity +func (c *ConversationsApiController) ConversationsDeleteActivity(w http.ResponseWriter, r *http.Request) { + params := mux.Vars(r) + conversationId := params["conversationId"] + activityId := params["activityId"] + result, err := c.service.ConversationsDeleteActivity(conversationId, activityId) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + +// ConversationsDeleteConversationMember - DeleteConversationMember +func (c *ConversationsApiController) ConversationsDeleteConversationMember(w http.ResponseWriter, r *http.Request) { + params := mux.Vars(r) + conversationId := params["conversationId"] + memberId := params["memberId"] + result, err := c.service.ConversationsDeleteConversationMember(conversationId, memberId) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + +// ConversationsGetActivityMembers - GetActivityMembers +func (c *ConversationsApiController) ConversationsGetActivityMembers(w http.ResponseWriter, r *http.Request) { + params := mux.Vars(r) + conversationId := params["conversationId"] + activityId := params["activityId"] + result, err := c.service.ConversationsGetActivityMembers(conversationId, activityId) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + +// ConversationsGetConversationMembers - GetConversationMembers +func (c *ConversationsApiController) ConversationsGetConversationMembers(w http.ResponseWriter, r *http.Request) { + params := mux.Vars(r) + conversationId := params["conversationId"] + result, err := c.service.ConversationsGetConversationMembers(conversationId) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + +// ConversationsGetConversationPagedMembers - GetConversationPagedMembers +func (c *ConversationsApiController) ConversationsGetConversationPagedMembers(w http.ResponseWriter, r *http.Request) { + params := mux.Vars(r) + query := r.URL.Query() + conversationId := params["conversationId"] + pageSize := query.Get("pageSize") + continuationToken := query.Get("continuationToken") + result, err := c.service.ConversationsGetConversationPagedMembers(conversationId, pageSize, continuationToken) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + +// ConversationsGetConversations - GetConversations +func (c *ConversationsApiController) ConversationsGetConversations(w http.ResponseWriter, r *http.Request) { + query := r.URL.Query() + continuationToken := query.Get("continuationToken") + result, err := c.service.ConversationsGetConversations(continuationToken) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + +// ConversationsReplyToActivity - ReplyToActivity +func (c *ConversationsApiController) ConversationsReplyToActivity(w http.ResponseWriter, r *http.Request) { + params := mux.Vars(r) + conversationId := params["conversationId"] + activityId := params["activityId"] + activity := &Activity{} + if err := json.NewDecoder(r.Body).Decode(&activity); err != nil { + w.WriteHeader(500) + return + } + + result, err := c.service.ConversationsReplyToActivity(conversationId, activityId, *activity) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + +// ConversationsSendConversationHistory - SendConversationHistory +func (c *ConversationsApiController) ConversationsSendConversationHistory(w http.ResponseWriter, r *http.Request) { + params := mux.Vars(r) + conversationId := params["conversationId"] + history := &Transcript{} + if err := json.NewDecoder(r.Body).Decode(&history); err != nil { + w.WriteHeader(500) + return + } + + result, err := c.service.ConversationsSendConversationHistory(conversationId, *history) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + +// ConversationsSendToConversation - SendToConversation +func (c *ConversationsApiController) ConversationsSendToConversation(w http.ResponseWriter, r *http.Request) { + params := mux.Vars(r) + conversationId := params["conversationId"] + activity := &Activity{} + if err := json.NewDecoder(r.Body).Decode(&activity); err != nil { + w.WriteHeader(500) + return + } + + result, err := c.service.ConversationsSendToConversation(conversationId, *activity) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + +// ConversationsUpdateActivity - UpdateActivity +func (c *ConversationsApiController) ConversationsUpdateActivity(w http.ResponseWriter, r *http.Request) { + params := mux.Vars(r) + conversationId := params["conversationId"] + activityId := params["activityId"] + activity := &Activity{} + if err := json.NewDecoder(r.Body).Decode(&activity); err != nil { + w.WriteHeader(500) + return + } + + result, err := c.service.ConversationsUpdateActivity(conversationId, activityId, *activity) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} + +// ConversationsUploadAttachment - UploadAttachment +func (c *ConversationsApiController) ConversationsUploadAttachment(w http.ResponseWriter, r *http.Request) { + params := mux.Vars(r) + conversationId := params["conversationId"] + attachmentUpload := &AttachmentData{} + if err := json.NewDecoder(r.Body).Decode(&attachmentUpload); err != nil { + w.WriteHeader(500) + return + } + + result, err := c.service.ConversationsUploadAttachment(conversationId, *attachmentUpload) + if err != nil { + w.WriteHeader(500) + return + } + + EncodeJSONResponse(result, nil, w) +} diff --git a/pkg/api_conversations_service.go b/pkg/api_conversations_service.go new file mode 100644 index 0000000..ff46d80 --- /dev/null +++ b/pkg/api_conversations_service.go @@ -0,0 +1,110 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +import ( + "errors" +) + +// ConversationsApiService is a service that implents the logic for the ConversationsApiServicer +// This service should implement the business logic for every endpoint for the ConversationsApi API. +// Include any external packages or services that will be required by this service. +type ConversationsApiService struct { +} + +// NewConversationsApiService creates a default api service +func NewConversationsApiService() ConversationsApiServicer { + return &ConversationsApiService{} +} + +// ConversationsCreateConversation - CreateConversation +func (s *ConversationsApiService) ConversationsCreateConversation(parameters ConversationParameters) (interface{}, error) { + // TODO - update ConversationsCreateConversation with the required logic for this service method. + // Add api_conversations_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'ConversationsCreateConversation' not implemented") +} + +// ConversationsDeleteActivity - DeleteActivity +func (s *ConversationsApiService) ConversationsDeleteActivity(conversationId string, activityId string) (interface{}, error) { + // TODO - update ConversationsDeleteActivity with the required logic for this service method. + // Add api_conversations_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'ConversationsDeleteActivity' not implemented") +} + +// ConversationsDeleteConversationMember - DeleteConversationMember +func (s *ConversationsApiService) ConversationsDeleteConversationMember(conversationId string, memberId string) (interface{}, error) { + // TODO - update ConversationsDeleteConversationMember with the required logic for this service method. + // Add api_conversations_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'ConversationsDeleteConversationMember' not implemented") +} + +// ConversationsGetActivityMembers - GetActivityMembers +func (s *ConversationsApiService) ConversationsGetActivityMembers(conversationId string, activityId string) (interface{}, error) { + // TODO - update ConversationsGetActivityMembers with the required logic for this service method. + // Add api_conversations_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'ConversationsGetActivityMembers' not implemented") +} + +// ConversationsGetConversationMembers - GetConversationMembers +func (s *ConversationsApiService) ConversationsGetConversationMembers(conversationId string) (interface{}, error) { + // TODO - update ConversationsGetConversationMembers with the required logic for this service method. + // Add api_conversations_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'ConversationsGetConversationMembers' not implemented") +} + +// ConversationsGetConversationPagedMembers - GetConversationPagedMembers +func (s *ConversationsApiService) ConversationsGetConversationPagedMembers(conversationId string, pageSize int32, continuationToken string) (interface{}, error) { + // TODO - update ConversationsGetConversationPagedMembers with the required logic for this service method. + // Add api_conversations_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'ConversationsGetConversationPagedMembers' not implemented") +} + +// ConversationsGetConversations - GetConversations +func (s *ConversationsApiService) ConversationsGetConversations(continuationToken string) (interface{}, error) { + // TODO - update ConversationsGetConversations with the required logic for this service method. + // Add api_conversations_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'ConversationsGetConversations' not implemented") +} + +// ConversationsReplyToActivity - ReplyToActivity +func (s *ConversationsApiService) ConversationsReplyToActivity(conversationId string, activityId string, activity Activity) (interface{}, error) { + // TODO - update ConversationsReplyToActivity with the required logic for this service method. + // Add api_conversations_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'ConversationsReplyToActivity' not implemented") +} + +// ConversationsSendConversationHistory - SendConversationHistory +func (s *ConversationsApiService) ConversationsSendConversationHistory(conversationId string, history Transcript) (interface{}, error) { + // TODO - update ConversationsSendConversationHistory with the required logic for this service method. + // Add api_conversations_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'ConversationsSendConversationHistory' not implemented") +} + +// ConversationsSendToConversation - SendToConversation +func (s *ConversationsApiService) ConversationsSendToConversation(conversationId string, activity Activity) (interface{}, error) { + // TODO - update ConversationsSendToConversation with the required logic for this service method. + // Add api_conversations_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'ConversationsSendToConversation' not implemented") +} + +// ConversationsUpdateActivity - UpdateActivity +func (s *ConversationsApiService) ConversationsUpdateActivity(conversationId string, activityId string, activity Activity) (interface{}, error) { + // TODO - update ConversationsUpdateActivity with the required logic for this service method. + // Add api_conversations_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'ConversationsUpdateActivity' not implemented") +} + +// ConversationsUploadAttachment - UploadAttachment +func (s *ConversationsApiService) ConversationsUploadAttachment(conversationId string, attachmentUpload AttachmentData) (interface{}, error) { + // TODO - update ConversationsUploadAttachment with the required logic for this service method. + // Add api_conversations_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. + return nil, errors.New("service method 'ConversationsUploadAttachment' not implemented") +} diff --git a/pkg/logger.go b/pkg/logger.go new file mode 100644 index 0000000..ef78ef8 --- /dev/null +++ b/pkg/logger.go @@ -0,0 +1,33 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +import ( + "log" + "net/http" + "time" +) + +func Logger(inner http.Handler, name string) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + start := time.Now() + + inner.ServeHTTP(w, r) + + log.Printf( + "%s %s %s %s", + r.Method, + r.RequestURI, + name, + time.Since(start), + ) + }) +} diff --git a/pkg/model_action_types.go b/pkg/model_action_types.go new file mode 100644 index 0000000..5d38654 --- /dev/null +++ b/pkg/model_action_types.go @@ -0,0 +1,28 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// ActionTypes : Defines action types for clickable buttons. +type ActionTypes string + +// List of ActionTypes +const ( + OPEN_URL ActionTypes = "openUrl" + IM_BACK ActionTypes = "imBack" + POST_BACK ActionTypes = "postBack" + PLAY_AUDIO ActionTypes = "playAudio" + PLAY_VIDEO ActionTypes = "playVideo" + SHOW_IMAGE ActionTypes = "showImage" + DOWNLOAD_FILE ActionTypes = "downloadFile" + SIGNIN ActionTypes = "signin" + CALL ActionTypes = "call" + PAYMENT ActionTypes = "payment" + MESSAGE_BACK ActionTypes = "messageBack" +) diff --git a/pkg/model_activity.go b/pkg/model_activity.go new file mode 100644 index 0000000..d2b7230 --- /dev/null +++ b/pkg/model_activity.go @@ -0,0 +1,132 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +import ( + "time" +) + +// Activity - An Activity is the basic communication type for the Bot Framework 3.0 protocol. +type Activity struct { + + Type ActivityTypes `json:"type,omitempty"` + + // Contains an ID that uniquely identifies the activity on the channel. + Id string `json:"id,omitempty"` + + // Contains the date and time that the message was sent, in UTC, expressed in ISO-8601 format. + Timestamp time.Time `json:"timestamp,omitempty"` + + // Contains the local date and time of the message, expressed in ISO-8601 format. For example, 2016-09-23T13:07:49.4714686-07:00. + LocalTimestamp time.Time `json:"localTimestamp,omitempty"` + + // Contains the name of the local timezone of the message, expressed in IANA Time Zone database format. For example, America/Los_Angeles. + LocalTimezone string `json:"localTimezone,omitempty"` + + // A string containing an IRI identifying the caller of a bot. This field is not intended to be transmitted over the wire, but is instead populated by bots and clients based on cryptographically verifiable data that asserts the identity of the callers (e.g. tokens). + CallerId string `json:"callerId,omitempty"` + + // Contains the URL that specifies the channel's service endpoint. Set by the channel. + ServiceUrl string `json:"serviceUrl,omitempty"` + + // Contains an ID that uniquely identifies the channel. Set by the channel. + ChannelId string `json:"channelId,omitempty"` + + From ChannelAccount `json:"from,omitempty"` + + Conversation ConversationAccount `json:"conversation,omitempty"` + + Recipient ChannelAccount `json:"recipient,omitempty"` + + TextFormat TextFormatTypes `json:"textFormat,omitempty"` + + AttachmentLayout AttachmentLayoutTypes `json:"attachmentLayout,omitempty"` + + // The collection of members added to the conversation. + MembersAdded []ChannelAccount `json:"membersAdded,omitempty"` + + // The collection of members removed from the conversation. + MembersRemoved []ChannelAccount `json:"membersRemoved,omitempty"` + + // The collection of reactions added to the conversation. + ReactionsAdded []MessageReaction `json:"reactionsAdded,omitempty"` + + // The collection of reactions removed from the conversation. + ReactionsRemoved []MessageReaction `json:"reactionsRemoved,omitempty"` + + // The updated topic name of the conversation. + TopicName string `json:"topicName,omitempty"` + + // Indicates whether the prior history of the channel is disclosed. + HistoryDisclosed bool `json:"historyDisclosed,omitempty"` + + // A locale name for the contents of the text field. The locale name is a combination of an ISO 639 two- or three-letter culture code associated with a language and an ISO 3166 two-letter subculture code associated with a country or region. The locale name can also correspond to a valid BCP-47 language tag. + Locale string `json:"locale,omitempty"` + + // The text content of the message. + Text string `json:"text,omitempty"` + + // The text to speak. + Speak string `json:"speak,omitempty"` + + InputHint InputHints `json:"inputHint,omitempty"` + + // The text to display if the channel cannot render cards. + Summary string `json:"summary,omitempty"` + + SuggestedActions SuggestedActions `json:"suggestedActions,omitempty"` + + // Attachments + Attachments []Attachment `json:"attachments,omitempty"` + + // Represents the entities that were mentioned in the message. + Entities []Entity `json:"entities,omitempty"` + + // Contains channel-specific content. + ChannelData map[string]interface{} `json:"channelData,omitempty"` + + // Indicates whether the recipient of a contactRelationUpdate was added or removed from the sender's contact list. + Action string `json:"action,omitempty"` + + // Contains the ID of the message to which this message is a reply. + ReplyToId string `json:"replyToId,omitempty"` + + // A descriptive label for the activity. + Label string `json:"label,omitempty"` + + // The type of the activity's value object. + ValueType string `json:"valueType,omitempty"` + + // A value that is associated with the activity. + Value map[string]interface{} `json:"value,omitempty"` + + // The name of the operation associated with an invoke or event activity. + Name string `json:"name,omitempty"` + + RelatesTo ConversationReference `json:"relatesTo,omitempty"` + + Code EndOfConversationCodes `json:"code,omitempty"` + + // The time at which the activity should be considered to be \"expired\" and should not be presented to the recipient. + Expiration time.Time `json:"expiration,omitempty"` + + Importance ActivityImportance `json:"importance,omitempty"` + + DeliveryMode DeliveryModes `json:"deliveryMode,omitempty"` + + // List of phrases and references that speech and language priming systems should listen for + ListenFor []string `json:"listenFor,omitempty"` + + // The collection of text fragments to highlight when the activity contains a ReplyToId value. + TextHighlights []TextHighlight `json:"textHighlights,omitempty"` + + SemanticAction SemanticAction `json:"semanticAction,omitempty"` +} diff --git a/pkg/model_activity_importance.go b/pkg/model_activity_importance.go new file mode 100644 index 0000000..053f5ec --- /dev/null +++ b/pkg/model_activity_importance.go @@ -0,0 +1,20 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// ActivityImportance : Defines the importance of an Activity +type ActivityImportance string + +// List of ActivityImportance +const ( + LOW ActivityImportance = "low" + NORMAL ActivityImportance = "normal" + HIGH ActivityImportance = "high" +) diff --git a/pkg/model_activity_types.go b/pkg/model_activity_types.go new file mode 100644 index 0000000..4e02be0 --- /dev/null +++ b/pkg/model_activity_types.go @@ -0,0 +1,32 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// ActivityTypes : Types of Activities +type ActivityTypes string + +// List of ActivityTypes +const ( + MESSAGE ActivityTypes = "message" + CONTACT_RELATION_UPDATE ActivityTypes = "contactRelationUpdate" + CONVERSATION_UPDATE ActivityTypes = "conversationUpdate" + TYPING ActivityTypes = "typing" + END_OF_CONVERSATION ActivityTypes = "endOfConversation" + EVENT ActivityTypes = "event" + INVOKE ActivityTypes = "invoke" + DELETE_USER_DATA ActivityTypes = "deleteUserData" + MESSAGE_UPDATE ActivityTypes = "messageUpdate" + MESSAGE_DELETE ActivityTypes = "messageDelete" + INSTALLATION_UPDATE ActivityTypes = "installationUpdate" + MESSAGE_REACTION ActivityTypes = "messageReaction" + SUGGESTION ActivityTypes = "suggestion" + TRACE ActivityTypes = "trace" + HANDOFF ActivityTypes = "handoff" +) diff --git a/pkg/model_animation_card.go b/pkg/model_animation_card.go new file mode 100644 index 0000000..46f5405 --- /dev/null +++ b/pkg/model_animation_card.go @@ -0,0 +1,50 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// AnimationCard - An animation card (Ex: gif or short video clip) +type AnimationCard struct { + + // Title of this card + Title string `json:"title,omitempty"` + + // Subtitle of this card + Subtitle string `json:"subtitle,omitempty"` + + // Text of this card + Text string `json:"text,omitempty"` + + Image ThumbnailUrl `json:"image,omitempty"` + + // Media URLs for this card. When this field contains more than one URL, each URL is an alternative format of the same content. + Media []MediaUrl `json:"media,omitempty"` + + // Actions on this card + Buttons []CardAction `json:"buttons,omitempty"` + + // This content may be shared with others (default:true) + Shareable bool `json:"shareable,omitempty"` + + // Should the client loop playback at end of content (default:true) + Autoloop bool `json:"autoloop,omitempty"` + + // Should the client automatically start playback of media in this card (default:true) + Autostart bool `json:"autostart,omitempty"` + + // Aspect ratio of thumbnail/media placeholder. Allowed values are \"16:9\" and \"4:3\" + Aspect string `json:"aspect,omitempty"` + + // Describes the length of the media content without requiring a receiver to open the content. Formatted as an ISO 8601 Duration field. + Duration string `json:"duration,omitempty"` + + // Supplementary parameter for this card + Value map[string]interface{} `json:"value,omitempty"` +} diff --git a/pkg/model_attachment.go b/pkg/model_attachment.go new file mode 100644 index 0000000..0419821 --- /dev/null +++ b/pkg/model_attachment.go @@ -0,0 +1,30 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// Attachment - An attachment within an activity +type Attachment struct { + + // mimetype/Contenttype for the file + ContentType string `json:"contentType,omitempty"` + + // Content Url + ContentUrl string `json:"contentUrl,omitempty"` + + // Embedded content + Content map[string]interface{} `json:"content,omitempty"` + + // (OPTIONAL) The name of the attachment + Name string `json:"name,omitempty"` + + // (OPTIONAL) Thumbnail associated with attachment + ThumbnailUrl string `json:"thumbnailUrl,omitempty"` +} diff --git a/pkg/model_attachment_data.go b/pkg/model_attachment_data.go new file mode 100644 index 0000000..e7e4b10 --- /dev/null +++ b/pkg/model_attachment_data.go @@ -0,0 +1,27 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// AttachmentData - Attachment data +type AttachmentData struct { + + // Content-Type of the attachment + Type string `json:"type,omitempty"` + + // Name of the attachment + Name string `json:"name,omitempty"` + + // Attachment content + OriginalBase64 string `json:"originalBase64,omitempty"` + + // Attachment thumbnail + ThumbnailBase64 string `json:"thumbnailBase64,omitempty"` +} diff --git a/pkg/model_attachment_info.go b/pkg/model_attachment_info.go new file mode 100644 index 0000000..8a5a2ce --- /dev/null +++ b/pkg/model_attachment_info.go @@ -0,0 +1,24 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// AttachmentInfo - Metadata for an attachment +type AttachmentInfo struct { + + // Name of the attachment + Name string `json:"name,omitempty"` + + // ContentType of the attachment + Type string `json:"type,omitempty"` + + // attachment views + Views []AttachmentView `json:"views,omitempty"` +} diff --git a/pkg/model_attachment_layout_types.go b/pkg/model_attachment_layout_types.go new file mode 100644 index 0000000..d6f8f45 --- /dev/null +++ b/pkg/model_attachment_layout_types.go @@ -0,0 +1,19 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// AttachmentLayoutTypes : Attachment layout types +type AttachmentLayoutTypes string + +// List of AttachmentLayoutTypes +const ( + LIST AttachmentLayoutTypes = "list" + CAROUSEL AttachmentLayoutTypes = "carousel" +) diff --git a/pkg/model_attachment_view.go b/pkg/model_attachment_view.go new file mode 100644 index 0000000..c94c955 --- /dev/null +++ b/pkg/model_attachment_view.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// AttachmentView - Attachment View name and size +type AttachmentView struct { + + // Id of the attachment + ViewId string `json:"viewId,omitempty"` + + // Size of the attachment + Size int32 `json:"size,omitempty"` +} diff --git a/pkg/model_audio_card.go b/pkg/model_audio_card.go new file mode 100644 index 0000000..be4a77c --- /dev/null +++ b/pkg/model_audio_card.go @@ -0,0 +1,50 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// AudioCard - Audio card +type AudioCard struct { + + // Title of this card + Title string `json:"title,omitempty"` + + // Subtitle of this card + Subtitle string `json:"subtitle,omitempty"` + + // Text of this card + Text string `json:"text,omitempty"` + + Image ThumbnailUrl `json:"image,omitempty"` + + // Media URLs for this card. When this field contains more than one URL, each URL is an alternative format of the same content. + Media []MediaUrl `json:"media,omitempty"` + + // Actions on this card + Buttons []CardAction `json:"buttons,omitempty"` + + // This content may be shared with others (default:true) + Shareable bool `json:"shareable,omitempty"` + + // Should the client loop playback at end of content (default:true) + Autoloop bool `json:"autoloop,omitempty"` + + // Should the client automatically start playback of media in this card (default:true) + Autostart bool `json:"autostart,omitempty"` + + // Aspect ratio of thumbnail/media placeholder. Allowed values are \"16:9\" and \"4:3\" + Aspect string `json:"aspect,omitempty"` + + // Describes the length of the media content without requiring a receiver to open the content. Formatted as an ISO 8601 Duration field. + Duration string `json:"duration,omitempty"` + + // Supplementary parameter for this card + Value map[string]interface{} `json:"value,omitempty"` +} diff --git a/pkg/model_basic_card.go b/pkg/model_basic_card.go new file mode 100644 index 0000000..de90e6d --- /dev/null +++ b/pkg/model_basic_card.go @@ -0,0 +1,32 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// BasicCard - A basic card +type BasicCard struct { + + // Title of the card + Title string `json:"title,omitempty"` + + // Subtitle of the card + Subtitle string `json:"subtitle,omitempty"` + + // Text for the card + Text string `json:"text,omitempty"` + + // Array of images for the card + Images []CardImage `json:"images,omitempty"` + + // Set of actions applicable to the current card + Buttons []CardAction `json:"buttons,omitempty"` + + Tap CardAction `json:"tap,omitempty"` +} diff --git a/pkg/model_card_action.go b/pkg/model_card_action.go new file mode 100644 index 0000000..57cae0c --- /dev/null +++ b/pkg/model_card_action.go @@ -0,0 +1,35 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// CardAction - A clickable action +type CardAction struct { + + Type ActionTypes `json:"type,omitempty"` + + // Text description which appears on the button + Title string `json:"title,omitempty"` + + // Image URL which will appear on the button, next to text label + Image string `json:"image,omitempty"` + + // Text for this action + Text string `json:"text,omitempty"` + + // (Optional) text to display in the chat feed if the button is clicked + DisplayText string `json:"displayText,omitempty"` + + // Supplementary parameter for action. Content of this property depends on the ActionType + Value map[string]interface{} `json:"value,omitempty"` + + // Channel-specific data associated with this action + ChannelData map[string]interface{} `json:"channelData,omitempty"` +} diff --git a/pkg/model_card_image.go b/pkg/model_card_image.go new file mode 100644 index 0000000..62c6cce --- /dev/null +++ b/pkg/model_card_image.go @@ -0,0 +1,23 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// CardImage - An image on a card +type CardImage struct { + + // URL thumbnail image for major content property + Url string `json:"url,omitempty"` + + // Image description intended for screen readers + Alt string `json:"alt,omitempty"` + + Tap CardAction `json:"tap,omitempty"` +} diff --git a/pkg/model_channel_account.go b/pkg/model_channel_account.go new file mode 100644 index 0000000..81bcb47 --- /dev/null +++ b/pkg/model_channel_account.go @@ -0,0 +1,26 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ChannelAccount - Channel account information needed to route a message +type ChannelAccount struct { + + // Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456) + Id string `json:"id,omitempty"` + + // Display friendly name + Name string `json:"name,omitempty"` + + // This account's object ID within Azure Active Directory (AAD) + AadObjectId string `json:"aadObjectId,omitempty"` + + Role RoleTypes `json:"role,omitempty"` +} diff --git a/pkg/model_contact_relation_update_action_types.go b/pkg/model_contact_relation_update_action_types.go new file mode 100644 index 0000000..5f6b684 --- /dev/null +++ b/pkg/model_contact_relation_update_action_types.go @@ -0,0 +1,19 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// ContactRelationUpdateActionTypes : Action types valid for ContactRelationUpdate activities +type ContactRelationUpdateActionTypes string + +// List of ContactRelationUpdateActionTypes +const ( + ADD ContactRelationUpdateActionTypes = "add" + REMOVE ContactRelationUpdateActionTypes = "remove" +) diff --git a/pkg/model_conversation_account.go b/pkg/model_conversation_account.go new file mode 100644 index 0000000..6d9367a --- /dev/null +++ b/pkg/model_conversation_account.go @@ -0,0 +1,35 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ConversationAccount - Conversation account represents the identity of the conversation within a channel +type ConversationAccount struct { + + // Indicates whether the conversation contains more than two participants at the time the activity was generated + IsGroup bool `json:"isGroup,omitempty"` + + // Indicates the type of the conversation in channels that distinguish between conversation types + ConversationType string `json:"conversationType,omitempty"` + + // This conversation's tenant ID + TenantId string `json:"tenantId,omitempty"` + + // Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456) + Id string `json:"id,omitempty"` + + // Display friendly name + Name string `json:"name,omitempty"` + + // This account's object ID within Azure Active Directory (AAD) + AadObjectId string `json:"aadObjectId,omitempty"` + + Role RoleTypes `json:"role,omitempty"` +} diff --git a/pkg/model_conversation_members.go b/pkg/model_conversation_members.go new file mode 100644 index 0000000..ba9b467 --- /dev/null +++ b/pkg/model_conversation_members.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ConversationMembers - Conversation and its members +type ConversationMembers struct { + + // Conversation ID + Id string `json:"id,omitempty"` + + // List of members in this conversation + Members []ChannelAccount `json:"members,omitempty"` +} diff --git a/pkg/model_conversation_parameters.go b/pkg/model_conversation_parameters.go new file mode 100644 index 0000000..498340e --- /dev/null +++ b/pkg/model_conversation_parameters.go @@ -0,0 +1,34 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ConversationParameters - Parameters for creating a new conversation +type ConversationParameters struct { + + // IsGroup + IsGroup bool `json:"isGroup,omitempty"` + + Bot ChannelAccount `json:"bot,omitempty"` + + // Members to add to the conversation + Members []ChannelAccount `json:"members,omitempty"` + + // (Optional) Topic of the conversation (if supported by the channel) + TopicName string `json:"topicName,omitempty"` + + // (Optional) The tenant ID in which the conversation should be created + TenantId string `json:"tenantId,omitempty"` + + Activity Activity `json:"activity,omitempty"` + + // Channel specific payload for creating the conversation + ChannelData map[string]interface{} `json:"channelData,omitempty"` +} diff --git a/pkg/model_conversation_reference.go b/pkg/model_conversation_reference.go new file mode 100644 index 0000000..e0174f7 --- /dev/null +++ b/pkg/model_conversation_reference.go @@ -0,0 +1,30 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ConversationReference - An object relating to a particular point in a conversation +type ConversationReference struct { + + // (Optional) ID of the activity to refer to + ActivityId string `json:"activityId,omitempty"` + + User ChannelAccount `json:"user,omitempty"` + + Bot ChannelAccount `json:"bot,omitempty"` + + Conversation ConversationAccount `json:"conversation,omitempty"` + + // Channel ID + ChannelId string `json:"channelId,omitempty"` + + // Service endpoint where operations concerning the referenced conversation may be performed + ServiceUrl string `json:"serviceUrl,omitempty"` +} diff --git a/pkg/model_conversation_resource_response.go b/pkg/model_conversation_resource_response.go new file mode 100644 index 0000000..9a52afb --- /dev/null +++ b/pkg/model_conversation_resource_response.go @@ -0,0 +1,24 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ConversationResourceResponse - A response containing a resource +type ConversationResourceResponse struct { + + // ID of the Activity (if sent) + ActivityId string `json:"activityId,omitempty"` + + // Service endpoint where operations concerning the conversation may be performed + ServiceUrl string `json:"serviceUrl,omitempty"` + + // Id of the resource + Id string `json:"id,omitempty"` +} diff --git a/pkg/model_conversations_result.go b/pkg/model_conversations_result.go new file mode 100644 index 0000000..2782cf0 --- /dev/null +++ b/pkg/model_conversations_result.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ConversationsResult - Conversations result +type ConversationsResult struct { + + // Paging token + ContinuationToken string `json:"continuationToken,omitempty"` + + // List of conversations + Conversations []ConversationMembers `json:"conversations,omitempty"` +} diff --git a/pkg/model_delivery_modes.go b/pkg/model_delivery_modes.go new file mode 100644 index 0000000..602a646 --- /dev/null +++ b/pkg/model_delivery_modes.go @@ -0,0 +1,19 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// DeliveryModes : Values for deliveryMode field +type DeliveryModes string + +// List of DeliveryModes +const ( + NORMAL DeliveryModes = "normal" + NOTIFICATION DeliveryModes = "notification" +) diff --git a/pkg/model_end_of_conversation_codes.go b/pkg/model_end_of_conversation_codes.go new file mode 100644 index 0000000..5b541cd --- /dev/null +++ b/pkg/model_end_of_conversation_codes.go @@ -0,0 +1,23 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// EndOfConversationCodes : Codes indicating why a conversation has ended +type EndOfConversationCodes string + +// List of EndOfConversationCodes +const ( + UNKNOWN EndOfConversationCodes = "unknown" + COMPLETED_SUCCESSFULLY EndOfConversationCodes = "completedSuccessfully" + USER_CANCELLED EndOfConversationCodes = "userCancelled" + BOT_TIMED_OUT EndOfConversationCodes = "botTimedOut" + BOT_ISSUED_INVALID_MESSAGE EndOfConversationCodes = "botIssuedInvalidMessage" + CHANNEL_FAILED EndOfConversationCodes = "channelFailed" +) diff --git a/pkg/model_entity.go b/pkg/model_entity.go new file mode 100644 index 0000000..1dbc211 --- /dev/null +++ b/pkg/model_entity.go @@ -0,0 +1,18 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// Entity - Metadata object pertaining to an activity +type Entity struct { + + // Type of this entity (RFC 3987 IRI) + Type string `json:"type,omitempty"` +} diff --git a/pkg/model_error.go b/pkg/model_error.go new file mode 100644 index 0000000..8c0e86c --- /dev/null +++ b/pkg/model_error.go @@ -0,0 +1,23 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// Error - Object representing error information +type Error struct { + + // Error code + Code string `json:"code,omitempty"` + + // Error message + Message string `json:"message,omitempty"` + + InnerHttpError InnerHttpError `json:"innerHttpError,omitempty"` +} diff --git a/pkg/model_error_response.go b/pkg/model_error_response.go new file mode 100644 index 0000000..848a971 --- /dev/null +++ b/pkg/model_error_response.go @@ -0,0 +1,17 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ErrorResponse - An HTTP API response +type ErrorResponse struct { + + Error Error `json:"error,omitempty"` +} diff --git a/pkg/model_fact.go b/pkg/model_fact.go new file mode 100644 index 0000000..36ca367 --- /dev/null +++ b/pkg/model_fact.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// Fact - Set of key-value pairs. Advantage of this section is that key and value properties will be rendered with default style information with some delimiter between them. So there is no need for developer to specify style information. +type Fact struct { + + // The key for this Fact + Key string `json:"key,omitempty"` + + // The value for this Fact + Value string `json:"value,omitempty"` +} diff --git a/pkg/model_geo_coordinates.go b/pkg/model_geo_coordinates.go new file mode 100644 index 0000000..c288be0 --- /dev/null +++ b/pkg/model_geo_coordinates.go @@ -0,0 +1,30 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// GeoCoordinates - GeoCoordinates (entity type: \"https://schema.org/GeoCoordinates\") +type GeoCoordinates struct { + + // Elevation of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) + Elevation float64 `json:"elevation,omitempty"` + + // Latitude of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) + Latitude float64 `json:"latitude,omitempty"` + + // Longitude of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) + Longitude float64 `json:"longitude,omitempty"` + + // The type of the thing + Type string `json:"type,omitempty"` + + // The name of the thing + Name string `json:"name,omitempty"` +} diff --git a/pkg/model_hero_card.go b/pkg/model_hero_card.go new file mode 100644 index 0000000..3da670e --- /dev/null +++ b/pkg/model_hero_card.go @@ -0,0 +1,32 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// HeroCard - A Hero card (card with a single, large image) +type HeroCard struct { + + // Title of the card + Title string `json:"title,omitempty"` + + // Subtitle of the card + Subtitle string `json:"subtitle,omitempty"` + + // Text for the card + Text string `json:"text,omitempty"` + + // Array of images for the card + Images []CardImage `json:"images,omitempty"` + + // Set of actions applicable to the current card + Buttons []CardAction `json:"buttons,omitempty"` + + Tap CardAction `json:"tap,omitempty"` +} diff --git a/pkg/model_inner_http_error.go b/pkg/model_inner_http_error.go new file mode 100644 index 0000000..5872763 --- /dev/null +++ b/pkg/model_inner_http_error.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// InnerHttpError - Object representing inner http error +type InnerHttpError struct { + + // HttpStatusCode from failed request + StatusCode int32 `json:"statusCode,omitempty"` + + // Body from failed request + Body map[string]interface{} `json:"body,omitempty"` +} diff --git a/pkg/model_input_hints.go b/pkg/model_input_hints.go new file mode 100644 index 0000000..8c33e30 --- /dev/null +++ b/pkg/model_input_hints.go @@ -0,0 +1,20 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// InputHints : Indicates whether the bot is accepting, expecting, or ignoring input +type InputHints string + +// List of InputHints +const ( + ACCEPTING_INPUT InputHints = "acceptingInput" + IGNORING_INPUT InputHints = "ignoringInput" + EXPECTING_INPUT InputHints = "expectingInput" +) diff --git a/pkg/model_installation_update_action_types.go b/pkg/model_installation_update_action_types.go new file mode 100644 index 0000000..c6488a6 --- /dev/null +++ b/pkg/model_installation_update_action_types.go @@ -0,0 +1,19 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// InstallationUpdateActionTypes : Action types valid for InstallationUpdate activities +type InstallationUpdateActionTypes string + +// List of InstallationUpdateActionTypes +const ( + ADD InstallationUpdateActionTypes = "add" + REMOVE InstallationUpdateActionTypes = "remove" +) diff --git a/pkg/model_media_card.go b/pkg/model_media_card.go new file mode 100644 index 0000000..6c69da8 --- /dev/null +++ b/pkg/model_media_card.go @@ -0,0 +1,50 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// MediaCard - Media card +type MediaCard struct { + + // Title of this card + Title string `json:"title,omitempty"` + + // Subtitle of this card + Subtitle string `json:"subtitle,omitempty"` + + // Text of this card + Text string `json:"text,omitempty"` + + Image ThumbnailUrl `json:"image,omitempty"` + + // Media URLs for this card. When this field contains more than one URL, each URL is an alternative format of the same content. + Media []MediaUrl `json:"media,omitempty"` + + // Actions on this card + Buttons []CardAction `json:"buttons,omitempty"` + + // This content may be shared with others (default:true) + Shareable bool `json:"shareable,omitempty"` + + // Should the client loop playback at end of content (default:true) + Autoloop bool `json:"autoloop,omitempty"` + + // Should the client automatically start playback of media in this card (default:true) + Autostart bool `json:"autostart,omitempty"` + + // Aspect ratio of thumbnail/media placeholder. Allowed values are \"16:9\" and \"4:3\" + Aspect string `json:"aspect,omitempty"` + + // Describes the length of the media content without requiring a receiver to open the content. Formatted as an ISO 8601 Duration field. + Duration string `json:"duration,omitempty"` + + // Supplementary parameter for this card + Value map[string]interface{} `json:"value,omitempty"` +} diff --git a/pkg/model_media_event_value.go b/pkg/model_media_event_value.go new file mode 100644 index 0000000..a566839 --- /dev/null +++ b/pkg/model_media_event_value.go @@ -0,0 +1,18 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// MediaEventValue - Supplementary parameter for media events +type MediaEventValue struct { + + // Callback parameter specified in the Value field of the MediaCard that originated this event + CardValue map[string]interface{} `json:"cardValue,omitempty"` +} diff --git a/pkg/model_media_url.go b/pkg/model_media_url.go new file mode 100644 index 0000000..3709161 --- /dev/null +++ b/pkg/model_media_url.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// MediaUrl - Media URL +type MediaUrl struct { + + // Url for the media + Url string `json:"url,omitempty"` + + // Optional profile hint to the client to differentiate multiple MediaUrl objects from each other + Profile string `json:"profile,omitempty"` +} diff --git a/pkg/model_mention.go b/pkg/model_mention.go new file mode 100644 index 0000000..6af9729 --- /dev/null +++ b/pkg/model_mention.go @@ -0,0 +1,23 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// Mention - Mention information (entity type: \"mention\") +type Mention struct { + + Mentioned ChannelAccount `json:"mentioned,omitempty"` + + // Sub Text which represents the mention (can be null or empty) + Text string `json:"text,omitempty"` + + // Type of this entity (RFC 3987 IRI) + Type string `json:"type,omitempty"` +} diff --git a/pkg/model_message_reaction.go b/pkg/model_message_reaction.go new file mode 100644 index 0000000..e401474 --- /dev/null +++ b/pkg/model_message_reaction.go @@ -0,0 +1,17 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// MessageReaction - Message reaction object +type MessageReaction struct { + + Type MessageReactionTypes `json:"type,omitempty"` +} diff --git a/pkg/model_message_reaction_types.go b/pkg/model_message_reaction_types.go new file mode 100644 index 0000000..156ebe5 --- /dev/null +++ b/pkg/model_message_reaction_types.go @@ -0,0 +1,19 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// MessageReactionTypes : Message reaction types +type MessageReactionTypes string + +// List of MessageReactionTypes +const ( + LIKE MessageReactionTypes = "like" + PLUS_ONE MessageReactionTypes = "plusOne" +) diff --git a/pkg/model_microsoft_pay_method_data.go b/pkg/model_microsoft_pay_method_data.go new file mode 100644 index 0000000..89200e8 --- /dev/null +++ b/pkg/model_microsoft_pay_method_data.go @@ -0,0 +1,24 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// MicrosoftPayMethodData - W3C Payment Method Data for Microsoft Pay +type MicrosoftPayMethodData struct { + + // Microsoft Pay Merchant ID + MerchantId string `json:"merchantId,omitempty"` + + // Supported payment networks (e.g., \"visa\" and \"mastercard\") + SupportedNetworks []string `json:"supportedNetworks,omitempty"` + + // Supported payment types (e.g., \"credit\") + SupportedTypes []string `json:"supportedTypes,omitempty"` +} diff --git a/pkg/model_o_auth_card.go b/pkg/model_o_auth_card.go new file mode 100644 index 0000000..1920724 --- /dev/null +++ b/pkg/model_o_auth_card.go @@ -0,0 +1,24 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// OAuthCard - A card representing a request to perform a sign in via OAuth +type OAuthCard struct { + + // Text for signin request + Text string `json:"text,omitempty"` + + // The name of the registered connection + ConnectionName string `json:"connectionName,omitempty"` + + // Action to use to perform signin + Buttons []CardAction `json:"buttons,omitempty"` +} diff --git a/pkg/model_paged_members_result.go b/pkg/model_paged_members_result.go new file mode 100644 index 0000000..5437287 --- /dev/null +++ b/pkg/model_paged_members_result.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PagedMembersResult - Page of members. +type PagedMembersResult struct { + + // Paging token + ContinuationToken string `json:"continuationToken,omitempty"` + + // The Channel Accounts. + Members []ChannelAccount `json:"members,omitempty"` +} diff --git a/pkg/model_payment_address.go b/pkg/model_payment_address.go new file mode 100644 index 0000000..4ead5bd --- /dev/null +++ b/pkg/model_payment_address.go @@ -0,0 +1,48 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentAddress - Address within a Payment Request +type PaymentAddress struct { + + // This is the CLDR (Common Locale Data Repository) region code. For example, US, GB, CN, or JP + Country string `json:"country,omitempty"` + + // This is the most specific part of the address. It can include, for example, a street name, a house number, apartment number, a rural delivery route, descriptive instructions, or a post office box number. + AddressLine []string `json:"addressLine,omitempty"` + + // This is the top level administrative subdivision of the country. For example, this can be a state, a province, an oblast, or a prefecture. + Region string `json:"region,omitempty"` + + // This is the city/town portion of the address. + City string `json:"city,omitempty"` + + // This is the dependent locality or sublocality within a city. For example, used for neighborhoods, boroughs, districts, or UK dependent localities. + DependentLocality string `json:"dependentLocality,omitempty"` + + // This is the postal code or ZIP code, also known as PIN code in India. + PostalCode string `json:"postalCode,omitempty"` + + // This is the sorting code as used in, for example, France. + SortingCode string `json:"sortingCode,omitempty"` + + // This is the BCP-47 language code for the address. It's used to determine the field separators and the order of fields when formatting the address for display. + LanguageCode string `json:"languageCode,omitempty"` + + // This is the organization, firm, company, or institution at this address. + Organization string `json:"organization,omitempty"` + + // This is the name of the recipient or contact person. + Recipient string `json:"recipient,omitempty"` + + // This is the phone number of the recipient or contact person. + Phone string `json:"phone,omitempty"` +} diff --git a/pkg/model_payment_currency_amount.go b/pkg/model_payment_currency_amount.go new file mode 100644 index 0000000..1fb88a6 --- /dev/null +++ b/pkg/model_payment_currency_amount.go @@ -0,0 +1,24 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentCurrencyAmount - Supplies monetary amounts +type PaymentCurrencyAmount struct { + + // A currency identifier + Currency string `json:"currency,omitempty"` + + // Decimal monetary value + Value string `json:"value,omitempty"` + + // Currency system + CurrencySystem string `json:"currencySystem,omitempty"` +} diff --git a/pkg/model_payment_details.go b/pkg/model_payment_details.go new file mode 100644 index 0000000..f2e1db3 --- /dev/null +++ b/pkg/model_payment_details.go @@ -0,0 +1,29 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentDetails - Provides information about the requested transaction +type PaymentDetails struct { + + Total PaymentItem `json:"total,omitempty"` + + // Contains line items for the payment request that the user agent may display + DisplayItems []PaymentItem `json:"displayItems,omitempty"` + + // A sequence containing the different shipping options for the user to choose from + ShippingOptions []PaymentShippingOption `json:"shippingOptions,omitempty"` + + // Contains modifiers for particular payment method identifiers + Modifiers []PaymentDetailsModifier `json:"modifiers,omitempty"` + + // Error description + Error string `json:"error,omitempty"` +} diff --git a/pkg/model_payment_details_modifier.go b/pkg/model_payment_details_modifier.go new file mode 100644 index 0000000..073cb3c --- /dev/null +++ b/pkg/model_payment_details_modifier.go @@ -0,0 +1,26 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentDetailsModifier - Provides details that modify the PaymentDetails based on payment method identifier +type PaymentDetailsModifier struct { + + // Contains a sequence of payment method identifiers + SupportedMethods []string `json:"supportedMethods,omitempty"` + + Total PaymentItem `json:"total,omitempty"` + + // Provides additional display items that are appended to the displayItems field in the PaymentDetails dictionary for the payment method identifiers in the supportedMethods field + AdditionalDisplayItems []PaymentItem `json:"additionalDisplayItems,omitempty"` + + // A JSON-serializable object that provides optional information that might be needed by the supported payment methods + Data map[string]interface{} `json:"data,omitempty"` +} diff --git a/pkg/model_payment_item.go b/pkg/model_payment_item.go new file mode 100644 index 0000000..83b90f9 --- /dev/null +++ b/pkg/model_payment_item.go @@ -0,0 +1,23 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentItem - Indicates what the payment request is for and the value asked for +type PaymentItem struct { + + // Human-readable description of the item + Label string `json:"label,omitempty"` + + Amount PaymentCurrencyAmount `json:"amount,omitempty"` + + // When set to true this flag means that the amount field is not final. + Pending bool `json:"pending,omitempty"` +} diff --git a/pkg/model_payment_method_data.go b/pkg/model_payment_method_data.go new file mode 100644 index 0000000..3d5ec1d --- /dev/null +++ b/pkg/model_payment_method_data.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentMethodData - Indicates a set of supported payment methods and any associated payment method specific data for those methods +type PaymentMethodData struct { + + // Required sequence of strings containing payment method identifiers for payment methods that the merchant web site accepts + SupportedMethods []string `json:"supportedMethods,omitempty"` + + // A JSON-serializable object that provides optional information that might be needed by the supported payment methods + Data map[string]interface{} `json:"data,omitempty"` +} diff --git a/pkg/model_payment_options.go b/pkg/model_payment_options.go new file mode 100644 index 0000000..108fab9 --- /dev/null +++ b/pkg/model_payment_options.go @@ -0,0 +1,30 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentOptions - Provides information about the options desired for the payment request +type PaymentOptions struct { + + // Indicates whether the user agent should collect and return the payer's name as part of the payment request + RequestPayerName bool `json:"requestPayerName,omitempty"` + + // Indicates whether the user agent should collect and return the payer's email address as part of the payment request + RequestPayerEmail bool `json:"requestPayerEmail,omitempty"` + + // Indicates whether the user agent should collect and return the payer's phone number as part of the payment request + RequestPayerPhone bool `json:"requestPayerPhone,omitempty"` + + // Indicates whether the user agent should collect and return a shipping address as part of the payment request + RequestShipping bool `json:"requestShipping,omitempty"` + + // If requestShipping is set to true, then the shippingType field may be used to influence the way the user agent presents the user interface for gathering the shipping address + ShippingType string `json:"shippingType,omitempty"` +} diff --git a/pkg/model_payment_request.go b/pkg/model_payment_request.go new file mode 100644 index 0000000..1405907 --- /dev/null +++ b/pkg/model_payment_request.go @@ -0,0 +1,28 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentRequest - A request to make a payment +type PaymentRequest struct { + + // ID of this payment request + Id string `json:"id,omitempty"` + + // Allowed payment methods for this request + MethodData []PaymentMethodData `json:"methodData,omitempty"` + + Details PaymentDetails `json:"details,omitempty"` + + Options PaymentOptions `json:"options,omitempty"` + + // Expiration for this request, in ISO 8601 duration format (e.g., 'P1D') + Expires string `json:"expires,omitempty"` +} diff --git a/pkg/model_payment_request_complete.go b/pkg/model_payment_request_complete.go new file mode 100644 index 0000000..f355f5b --- /dev/null +++ b/pkg/model_payment_request_complete.go @@ -0,0 +1,22 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentRequestComplete - Payload delivered when completing a payment request +type PaymentRequestComplete struct { + + // Payment request ID + Id string `json:"id,omitempty"` + + PaymentRequest PaymentRequest `json:"paymentRequest,omitempty"` + + PaymentResponse PaymentResponse `json:"paymentResponse,omitempty"` +} diff --git a/pkg/model_payment_request_complete_result.go b/pkg/model_payment_request_complete_result.go new file mode 100644 index 0000000..883832a --- /dev/null +++ b/pkg/model_payment_request_complete_result.go @@ -0,0 +1,18 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentRequestCompleteResult - Result from a completed payment request +type PaymentRequestCompleteResult struct { + + // Result of the payment request completion + Result string `json:"result,omitempty"` +} diff --git a/pkg/model_payment_request_update.go b/pkg/model_payment_request_update.go new file mode 100644 index 0000000..7534fe9 --- /dev/null +++ b/pkg/model_payment_request_update.go @@ -0,0 +1,25 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentRequestUpdate - An update to a payment request +type PaymentRequestUpdate struct { + + // ID for the payment request to update + Id string `json:"id,omitempty"` + + Details PaymentDetails `json:"details,omitempty"` + + ShippingAddress PaymentAddress `json:"shippingAddress,omitempty"` + + // Updated shipping options + ShippingOption string `json:"shippingOption,omitempty"` +} diff --git a/pkg/model_payment_request_update_result.go b/pkg/model_payment_request_update_result.go new file mode 100644 index 0000000..84b46d6 --- /dev/null +++ b/pkg/model_payment_request_update_result.go @@ -0,0 +1,17 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentRequestUpdateResult - A result object from a Payment Request Update invoke operation +type PaymentRequestUpdateResult struct { + + Details PaymentDetails `json:"details,omitempty"` +} diff --git a/pkg/model_payment_response.go b/pkg/model_payment_response.go new file mode 100644 index 0000000..7cdbde0 --- /dev/null +++ b/pkg/model_payment_response.go @@ -0,0 +1,32 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentResponse - A PaymentResponse is returned when a user has selected a payment method and approved a payment request +type PaymentResponse struct { + + // The payment method identifier for the payment method that the user selected to fulfil the transaction + MethodName string `json:"methodName,omitempty"` + + // A JSON-serializable object that provides a payment method specific message used by the merchant to process the transaction and determine successful fund transfer + Details map[string]interface{} `json:"details,omitempty"` + + ShippingAddress PaymentAddress `json:"shippingAddress,omitempty"` + + // If the requestShipping flag was set to true in the PaymentOptions passed to the PaymentRequest constructor, then shippingOption will be the id attribute of the selected shipping option + ShippingOption string `json:"shippingOption,omitempty"` + + // If the requestPayerEmail flag was set to true in the PaymentOptions passed to the PaymentRequest constructor, then payerEmail will be the email address chosen by the user + PayerEmail string `json:"payerEmail,omitempty"` + + // If the requestPayerPhone flag was set to true in the PaymentOptions passed to the PaymentRequest constructor, then payerPhone will be the phone number chosen by the user + PayerPhone string `json:"payerPhone,omitempty"` +} diff --git a/pkg/model_payment_shipping_option.go b/pkg/model_payment_shipping_option.go new file mode 100644 index 0000000..66a98e0 --- /dev/null +++ b/pkg/model_payment_shipping_option.go @@ -0,0 +1,26 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// PaymentShippingOption - Describes a shipping option +type PaymentShippingOption struct { + + // String identifier used to reference this PaymentShippingOption + Id string `json:"id,omitempty"` + + // Human-readable description of the item + Label string `json:"label,omitempty"` + + Amount PaymentCurrencyAmount `json:"amount,omitempty"` + + // Indicates whether this is the default selected PaymentShippingOption + Selected bool `json:"selected,omitempty"` +} diff --git a/pkg/model_place.go b/pkg/model_place.go new file mode 100644 index 0000000..4329586 --- /dev/null +++ b/pkg/model_place.go @@ -0,0 +1,30 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// Place - Place (entity type: \"https://schema.org/Place\") +type Place struct { + + // Address of the place (may be `string` or complex object of type `PostalAddress`) + Address map[string]interface{} `json:"address,omitempty"` + + // Geo coordinates of the place (may be complex object of type `GeoCoordinates` or `GeoShape`) + Geo map[string]interface{} `json:"geo,omitempty"` + + // Map to the place (may be `string` (URL) or complex object of type `Map`) + HasMap map[string]interface{} `json:"hasMap,omitempty"` + + // The type of the thing + Type string `json:"type,omitempty"` + + // The name of the thing + Name string `json:"name,omitempty"` +} diff --git a/pkg/model_receipt_card.go b/pkg/model_receipt_card.go new file mode 100644 index 0000000..d7ac113 --- /dev/null +++ b/pkg/model_receipt_card.go @@ -0,0 +1,38 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ReceiptCard - A receipt card +type ReceiptCard struct { + + // Title of the card + Title string `json:"title,omitempty"` + + // Array of Fact objects + Facts []Fact `json:"facts,omitempty"` + + // Array of Receipt Items + Items []ReceiptItem `json:"items,omitempty"` + + Tap CardAction `json:"tap,omitempty"` + + // Total amount of money paid (or to be paid) + Total string `json:"total,omitempty"` + + // Total amount of tax paid (or to be paid) + Tax string `json:"tax,omitempty"` + + // Total amount of VAT paid (or to be paid) + Vat string `json:"vat,omitempty"` + + // Set of actions applicable to the current card + Buttons []CardAction `json:"buttons,omitempty"` +} diff --git a/pkg/model_receipt_item.go b/pkg/model_receipt_item.go new file mode 100644 index 0000000..75705c8 --- /dev/null +++ b/pkg/model_receipt_item.go @@ -0,0 +1,34 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ReceiptItem - An item on a receipt card +type ReceiptItem struct { + + // Title of the Card + Title string `json:"title,omitempty"` + + // Subtitle appears just below Title field, differs from Title in font styling only + Subtitle string `json:"subtitle,omitempty"` + + // Text field appears just below subtitle, differs from Subtitle in font styling only + Text string `json:"text,omitempty"` + + Image CardImage `json:"image,omitempty"` + + // Amount with currency + Price string `json:"price,omitempty"` + + // Number of items of given kind + Quantity string `json:"quantity,omitempty"` + + Tap CardAction `json:"tap,omitempty"` +} diff --git a/pkg/model_resource_response.go b/pkg/model_resource_response.go new file mode 100644 index 0000000..943e36c --- /dev/null +++ b/pkg/model_resource_response.go @@ -0,0 +1,18 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ResourceResponse - A response containing a resource ID +type ResourceResponse struct { + + // Id of the resource + Id string `json:"id,omitempty"` +} diff --git a/pkg/model_role_types.go b/pkg/model_role_types.go new file mode 100644 index 0000000..d5c3aa8 --- /dev/null +++ b/pkg/model_role_types.go @@ -0,0 +1,19 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// RoleTypes : Role of the entity behind the account (Example: User, Bot, etc.) +type RoleTypes string + +// List of RoleTypes +const ( + USER RoleTypes = "user" + BOT RoleTypes = "bot" +) diff --git a/pkg/model_semantic_action.go b/pkg/model_semantic_action.go new file mode 100644 index 0000000..6ba3c9b --- /dev/null +++ b/pkg/model_semantic_action.go @@ -0,0 +1,23 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// SemanticAction - Represents a reference to a programmatic action +type SemanticAction struct { + + State SemanticActionStates `json:"state,omitempty"` + + // ID of this action + Id string `json:"id,omitempty"` + + // Entities associated with this action + Entities map[string]Entity `json:"entities,omitempty"` +} diff --git a/pkg/model_semantic_action_states.go b/pkg/model_semantic_action_states.go new file mode 100644 index 0000000..071449c --- /dev/null +++ b/pkg/model_semantic_action_states.go @@ -0,0 +1,20 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// SemanticActionStates : Indicates whether the semantic action is starting, continuing, or done +type SemanticActionStates string + +// List of SemanticActionStates +const ( + START SemanticActionStates = "start" + CONTINUE SemanticActionStates = "continue" + DONE SemanticActionStates = "done" +) diff --git a/pkg/model_signin_card.go b/pkg/model_signin_card.go new file mode 100644 index 0000000..ca6f39b --- /dev/null +++ b/pkg/model_signin_card.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// SigninCard - A card representing a request to sign in +type SigninCard struct { + + // Text for signin request + Text string `json:"text,omitempty"` + + // Action to use to perform signin + Buttons []CardAction `json:"buttons,omitempty"` +} diff --git a/pkg/model_suggested_actions.go b/pkg/model_suggested_actions.go new file mode 100644 index 0000000..0d677bb --- /dev/null +++ b/pkg/model_suggested_actions.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// SuggestedActions - SuggestedActions that can be performed +type SuggestedActions struct { + + // Ids of the recipients that the actions should be shown to. These Ids are relative to the channelId and a subset of all recipients of the activity + To []string `json:"to,omitempty"` + + // Actions that can be shown to the user + Actions []CardAction `json:"actions,omitempty"` +} diff --git a/pkg/model_text_format_types.go b/pkg/model_text_format_types.go new file mode 100644 index 0000000..4c18bdc --- /dev/null +++ b/pkg/model_text_format_types.go @@ -0,0 +1,20 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder +// TextFormatTypes : Text format types +type TextFormatTypes string + +// List of TextFormatTypes +const ( + MARKDOWN TextFormatTypes = "markdown" + PLAIN TextFormatTypes = "plain" + XML TextFormatTypes = "xml" +) diff --git a/pkg/model_text_highlight.go b/pkg/model_text_highlight.go new file mode 100644 index 0000000..5b3f85a --- /dev/null +++ b/pkg/model_text_highlight.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// TextHighlight - Refers to a substring of content within another field +type TextHighlight struct { + + // Defines the snippet of text to highlight + Text string `json:"text,omitempty"` + + // Occurrence of the text field within the referenced text, if multiple exist. + Occurrence int32 `json:"occurrence,omitempty"` +} diff --git a/pkg/model_thing.go b/pkg/model_thing.go new file mode 100644 index 0000000..934c6ff --- /dev/null +++ b/pkg/model_thing.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// Thing - Thing (entity type: \"https://schema.org/Thing\") +type Thing struct { + + // The type of the thing + Type string `json:"type,omitempty"` + + // The name of the thing + Name string `json:"name,omitempty"` +} diff --git a/pkg/model_thumbnail_card.go b/pkg/model_thumbnail_card.go new file mode 100644 index 0000000..02086db --- /dev/null +++ b/pkg/model_thumbnail_card.go @@ -0,0 +1,32 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ThumbnailCard - A thumbnail card (card with a single, small thumbnail image) +type ThumbnailCard struct { + + // Title of the card + Title string `json:"title,omitempty"` + + // Subtitle of the card + Subtitle string `json:"subtitle,omitempty"` + + // Text for the card + Text string `json:"text,omitempty"` + + // Array of images for the card + Images []CardImage `json:"images,omitempty"` + + // Set of actions applicable to the current card + Buttons []CardAction `json:"buttons,omitempty"` + + Tap CardAction `json:"tap,omitempty"` +} diff --git a/pkg/model_thumbnail_url.go b/pkg/model_thumbnail_url.go new file mode 100644 index 0000000..e1ca7ea --- /dev/null +++ b/pkg/model_thumbnail_url.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// ThumbnailUrl - Thumbnail URL +type ThumbnailUrl struct { + + // URL pointing to the thumbnail to use for media content + Url string `json:"url,omitempty"` + + // HTML alt text to include on this thumbnail image + Alt string `json:"alt,omitempty"` +} diff --git a/pkg/model_token_request.go b/pkg/model_token_request.go new file mode 100644 index 0000000..412eb16 --- /dev/null +++ b/pkg/model_token_request.go @@ -0,0 +1,21 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// TokenRequest - A request to receive a user token +type TokenRequest struct { + + // The provider to request a user token from + Provider string `json:"provider,omitempty"` + + // A collection of settings for the specific provider for this request + Settings map[string]map[string]interface{} `json:"settings,omitempty"` +} diff --git a/pkg/model_token_response.go b/pkg/model_token_response.go new file mode 100644 index 0000000..dcec1b7 --- /dev/null +++ b/pkg/model_token_response.go @@ -0,0 +1,27 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// TokenResponse - A response that includes a user token +type TokenResponse struct { + + // The channelId of the TokenResponse + ChannelId string `json:"channelId,omitempty"` + + // The connection name + ConnectionName string `json:"connectionName,omitempty"` + + // The user token + Token string `json:"token,omitempty"` + + // Expiration for the token, in ISO 8601 format (e.g. \"2007-04-05T14:30Z\") + Expiration string `json:"expiration,omitempty"` +} diff --git a/pkg/model_transcript.go b/pkg/model_transcript.go new file mode 100644 index 0000000..522cb1f --- /dev/null +++ b/pkg/model_transcript.go @@ -0,0 +1,18 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// Transcript - Transcript +type Transcript struct { + + // A collection of Activities that conforms to the Transcript schema. + Activities []Activity `json:"activities,omitempty"` +} diff --git a/pkg/model_video_card.go b/pkg/model_video_card.go new file mode 100644 index 0000000..983c540 --- /dev/null +++ b/pkg/model_video_card.go @@ -0,0 +1,50 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +// VideoCard - Video card +type VideoCard struct { + + // Title of this card + Title string `json:"title,omitempty"` + + // Subtitle of this card + Subtitle string `json:"subtitle,omitempty"` + + // Text of this card + Text string `json:"text,omitempty"` + + Image ThumbnailUrl `json:"image,omitempty"` + + // Media URLs for this card. When this field contains more than one URL, each URL is an alternative format of the same content. + Media []MediaUrl `json:"media,omitempty"` + + // Actions on this card + Buttons []CardAction `json:"buttons,omitempty"` + + // This content may be shared with others (default:true) + Shareable bool `json:"shareable,omitempty"` + + // Should the client loop playback at end of content (default:true) + Autoloop bool `json:"autoloop,omitempty"` + + // Should the client automatically start playback of media in this card (default:true) + Autostart bool `json:"autostart,omitempty"` + + // Aspect ratio of thumbnail/media placeholder. Allowed values are \"16:9\" and \"4:3\" + Aspect string `json:"aspect,omitempty"` + + // Describes the length of the media content without requiring a receiver to open the content. Formatted as an ISO 8601 Duration field. + Duration string `json:"duration,omitempty"` + + // Supplementary parameter for this card + Value map[string]interface{} `json:"value,omitempty"` +} diff --git a/pkg/routers.go b/pkg/routers.go new file mode 100644 index 0000000..a55a619 --- /dev/null +++ b/pkg/routers.go @@ -0,0 +1,97 @@ +/* + * Microsoft Bot Connector API - v3.0 + * + * The Bot Connector REST API allows your bot to send and receive messages to channels configured in the [Bot Framework Developer Portal](https://dev.botframework.com). The Connector service uses industry-standard REST and JSON over HTTPS. Client libraries for this REST API are available. See below for a list. Many bots will use both the Bot Connector REST API and the associated [Bot State REST API](/en-us/restapi/state). The Bot State REST API allows a bot to store and retrieve state associated with users and conversations. Authentication for both the Bot Connector and Bot State REST APIs is accomplished with JWT Bearer tokens, and is described in detail in the [Connector Authentication](/en-us/restapi/authentication) document. # Client Libraries for the Bot Connector REST API * [Bot Builder for C#](/en-us/csharp/builder/sdkreference/) * [Bot Builder for Node.js](/en-us/node/builder/overview/) * Generate your own from the [Connector API Swagger file](https://raw.githubusercontent.com/Microsoft/BotBuilder/master/CSharp/Library/Microsoft.Bot.Connector.Shared/Swagger/ConnectorAPI.json) © 2016 Microsoft + * + * API version: v3 + * Contact: botframework@microsoft.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package botbuilder + +import ( + "encoding/json" + "io/ioutil" + "net/http" + "os" + "strconv" + "github.com/gorilla/mux" +) + +// A Route defines the parameters for an api endpoint +type Route struct { + Name string + Method string + Pattern string + HandlerFunc http.HandlerFunc +} + +// Routes are a collection of defined api endpoints +type Routes []Route + +// Router defines the required methods for retrieving api routes +type Router interface { + Routes() Routes +} + +// NewRouter creates a new router for any number of api routers +func NewRouter(routers ...Router) *mux.Router { + router := mux.NewRouter().StrictSlash(true) + for _, api := range routers { + for _, route := range api.Routes() { + var handler http.Handler + handler = route.HandlerFunc + handler = Logger(handler, route.Name) + + router. + Methods(route.Method). + Path(route.Pattern). + Name(route.Name). + Handler(handler) + } + } + + return router +} + +// EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code +func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + if status != nil { + w.WriteHeader(*status) + } else { + w.WriteHeader(http.StatusOK) + } + + return json.NewEncoder(w).Encode(i) +} + +// ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file +func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error) { + r.ParseForm() + formFile, _, err := r.FormFile(key) + if err != nil { + return nil, err + } + + defer formFile.Close() + file, err := ioutil.TempFile("tmp", key) + if err != nil { + return nil, err + } + + defer file.Close() + fileBytes, err := ioutil.ReadAll(formFile) + if err != nil { + return nil, err + } + + file.Write(fileBytes) + return file, nil +} + +// parseIntParameter parses a sting parameter to an int64 +func parseIntParameter(param string) (int64, error) { + return strconv.ParseInt(param, 10, 64) +} diff --git a/protocol/openapi-config.yaml b/protocol/openapi-config.yaml index 91dfa44..1b32717 100644 --- a/protocol/openapi-config.yaml +++ b/protocol/openapi-config.yaml @@ -1,3 +1,4 @@ { - "modelPackage": "botbuilder" + "packageName": "botbuilder", + "sourceFolder": "pkg" }