wechaty-grpc
Version:
gRPC for Wechaty
1,924 lines (1,923 loc) • 85.2 kB
JSON
{
"swagger": "2.0",
"info": {
"title": "Wechaty Puppet Service OpenAPI Specification",
"description": "Wechaty is a Conversational RPA SDK for chatbot makers. With only 6 lines of code, you can create a bot on the most popular IMs like WeChat, Whatsapp, WeCom, Gitter, etc.\n\nWechaty Puppet Service is the RESTful API for Wechaty API, which is build on top of the Wechaty Puppet Abstraction and the gRPC proto definition.",
"version": "1.0.1",
"contact": {
"name": "Wechaty",
"url": "https://github.com/wechaty/openapi",
"email": "wechaty@chatie.io"
},
"license": {
"name": "Apache-2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"tags": [
{
"name": "Puppet"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/contacts": {
"get": {
"summary": "*\nHuan(202002): consider changing response to a stream in the future for better performance",
"operationId": "Puppet_ContactList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetContactListResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"Puppet"
]
}
},
"/contacts/-/tags/{id}": {
"delete": {
"summary": "*\nOperate Sub-Collections\n https://cloud.google.com/apis/design/design_patterns#list_sub-collections",
"operationId": "Puppet_TagContactDelete",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetTagContactDeleteResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/contacts/self/name/{name}": {
"put": {
"operationId": "Puppet_ContactSelfName",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetContactSelfNameResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "name",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/contacts/self/qrcode": {
"get": {
"summary": "*",
"description": "Contact Self",
"operationId": "Puppet_ContactSelfQRCode",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetContactSelfQRCodeResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"Puppet"
]
}
},
"/contacts/self/signature": {
"put": {
"operationId": "Puppet_ContactSelfSignature",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetContactSelfSignatureResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/puppetContactSelfSignatureRequest"
}
}
],
"tags": [
"Puppet"
]
}
},
"/contacts/{contactId}/corporation-remark": {
"put": {
"operationId": "Puppet_ContactCorporationRemark",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetContactCorporationRemarkResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "contactId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"corporationRemarkStringValueDeprecated": {
"type": "string"
},
"corporationRemark": {
"type": "string"
}
}
}
}
],
"tags": [
"Puppet"
]
}
},
"/contacts/{contactId}/description": {
"put": {
"operationId": "Puppet_ContactDescription",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetContactDescriptionResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "contactId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"descriptionStringValueDeprecated": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
}
],
"tags": [
"Puppet"
]
}
},
"/contacts/{contactId}/phone": {
"put": {
"operationId": "Puppet_ContactPhone",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetContactPhoneResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "contactId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"phones": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
],
"tags": [
"Puppet"
]
}
},
"/contacts/{contactId}/tags": {
"get": {
"operationId": "Puppet_TagContactList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetTagContactListResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "contactId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "contactIdStringValueDeprecated",
"description": "@deprecated:\n Huan(202109): Wrapper types must not be used going forward.\n https://cloud.google.com/apis/design/design_patterns#optional_primitive_fields",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/contacts/{contactId}/tags/{id}": {
"delete": {
"operationId": "Puppet_TagContactRemove",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetTagContactRemoveResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "contactId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
},
"put": {
"summary": "*",
"description": "Tag",
"operationId": "Puppet_TagContactAdd",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetTagContactAddResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "contactId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/contacts/{id}": {
"get": {
"summary": "Get a contact payload",
"description": "Contact",
"operationId": "contactPayload",
"responses": {
"200": {
"description": "Contact payload",
"schema": {
"$ref": "#/definitions/puppetContactPayloadResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"contact"
]
}
},
"/contacts/{id}/alias": {
"put": {
"operationId": "Puppet_ContactAlias",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetContactAliasResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"aliasStringValueDeprecated": {
"type": "string",
"title": "nullable"
},
"alias": {
"type": "string"
}
}
}
}
],
"tags": [
"Puppet"
]
}
},
"/contacts/{id}/avatar": {
"get": {
"operationId": "Puppet_ContactAvatar",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetContactAvatarResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "fileboxStringValueDeprecated",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "fileBox",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/contacts/{id}/dirty/{type}": {
"put": {
"operationId": "Puppet_DirtyPayload2",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetDirtyPayloadResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string",
"enum": [
"PAYLOAD_TYPE_UNSPECIFIED",
"PAYLOAD_TYPE_MESSAGE",
"PAYLOAD_TYPE_CONTACT",
"PAYLOAD_TYPE_ROOM",
"PAYLOAD_TYPE_ROOM_MEMBER",
"PAYLOAD_TYPE_FRIENDSHIP"
],
"pattern": "PAYLOAD_TYPE_CONTACT"
}
],
"tags": [
"Puppet"
]
}
},
"/conversations/{conversationId}/contact": {
"post": {
"operationId": "Puppet_MessageSendContact",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessageSendContactResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "conversationId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"contactId": {
"type": "string"
}
}
}
}
],
"tags": [
"Puppet"
]
}
},
"/conversations/{conversationId}/forward/{messageId}": {
"post": {
"operationId": "Puppet_MessageForward2",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessageForwardResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "conversationId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "messageId",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/conversations/{conversationId}/location": {
"post": {
"operationId": "Puppet_MessageSendLocation",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessageSendLocationResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "conversationId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"location": {
"$ref": "#/definitions/puppetLocationPayload"
}
}
}
}
],
"tags": [
"Puppet"
]
}
},
"/conversations/{conversationId}/mini-program": {
"post": {
"operationId": "Puppet_MessageSendMiniProgram",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessageSendMiniProgramResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "conversationId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"miniProgramDeprecated": {
"type": "string",
"title": "*\nHuan(202110): We should use payload instead of JSON.stringify string\n The compatible code will be removed after Dec 31, 2022"
},
"miniProgram": {
"$ref": "#/definitions/puppetMiniProgramPayload"
}
}
}
}
],
"tags": [
"Puppet"
]
}
},
"/conversations/{conversationId}/text": {
"post": {
"operationId": "Puppet_MessageSendText",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessageSendTextResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "conversationId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"mentionalIds": {
"type": "array",
"items": {
"type": "string"
},
"title": "Huan(202011) FIXME: Issue #99\nhttps://github.com/wechaty/grpc/issues/99"
}
}
}
}
],
"tags": [
"Puppet"
]
}
},
"/conversations/{conversationId}/url-link": {
"post": {
"operationId": "Puppet_MessageSendUrl",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessageSendUrlResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "conversationId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"urlLinkDeprecated": {
"type": "string",
"title": "*\nHuan(202110): We should use payload instead of JSON.stringify string\n The compatible code will be removed after Dec 31, 2022"
},
"urlLink": {
"$ref": "#/definitions/puppetUrlLinkPayload"
}
}
}
}
],
"tags": [
"Puppet"
]
}
},
"/ding": {
"post": {
"operationId": "Puppet_Ding",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetDingResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/puppetDingRequest"
}
}
],
"tags": [
"Puppet"
]
}
},
"/download/{id}": {
"get": {
"summary": "*\nFile/Blob download & upload",
"operationId": "Puppet_Download",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/puppetDownloadResponse"
},
"error": {
"$ref": "#/definitions/rpcStatus"
}
},
"title": "Stream result of puppetDownloadResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/events": {
"get": {
"summary": "*",
"description": "Event - Server Stream",
"operationId": "Puppet_Event",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/puppetEventResponse"
},
"error": {
"$ref": "#/definitions/rpcStatus"
}
},
"title": "Stream result of puppetEventResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"Puppet"
]
}
},
"/friendship/accept/{id}": {
"put": {
"operationId": "Puppet_FriendshipAccept",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetFriendshipAcceptResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/friendship/add/{contactId}": {
"put": {
"operationId": "Puppet_FriendshipAdd",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetFriendshipAddResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "contactId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"hello": {
"type": "string"
},
"sourceRoomIdStringValueDeprecated": {
"type": "string"
},
"sourceContactIdStringValueDeprecated": {
"type": "string"
},
"referrer": {
"$ref": "#/definitions/puppetReferrer"
}
}
}
}
],
"tags": [
"Puppet"
]
}
},
"/friendship/search/phone/{phone}": {
"get": {
"operationId": "Puppet_FriendshipSearchPhone",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetFriendshipSearchPhoneResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "phone",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/friendship/search/weixin/{weixin}": {
"get": {
"operationId": "Puppet_FriendshipSearchWeixin",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetFriendshipSearchWeixinResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "weixin",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/friendship/{id}": {
"get": {
"summary": "*",
"description": "Friendship",
"operationId": "Puppet_FriendshipPayload",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetFriendshipPayloadResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "payloadStringValueDeprecated",
"description": "*\nHuan(202003):\n What's the reason we need belowing payload?\n We should remove it if possible.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "payload",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/friendships/{id}/dirty/{type}": {
"put": {
"operationId": "Puppet_DirtyPayload5",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetDirtyPayloadResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string",
"enum": [
"PAYLOAD_TYPE_UNSPECIFIED",
"PAYLOAD_TYPE_MESSAGE",
"PAYLOAD_TYPE_CONTACT",
"PAYLOAD_TYPE_ROOM",
"PAYLOAD_TYPE_ROOM_MEMBER",
"PAYLOAD_TYPE_FRIENDSHIP"
],
"pattern": "PAYLOAD_TYPE_FRIENDSHIP"
}
],
"tags": [
"Puppet"
]
}
},
"/logout": {
"put": {
"operationId": "Puppet_Logout",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetLogoutResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"Puppet"
]
}
},
"/message/{id}": {
"get": {
"operationId": "Puppet_MessagePayload",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessagePayloadResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/message/{id}/contact": {
"get": {
"operationId": "Puppet_MessageContact",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessageContactResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/message/{id}/dirty/{type}": {
"put": {
"operationId": "Puppet_DirtyPayload",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetDirtyPayloadResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string",
"enum": [
"PAYLOAD_TYPE_UNSPECIFIED",
"PAYLOAD_TYPE_MESSAGE",
"PAYLOAD_TYPE_CONTACT",
"PAYLOAD_TYPE_ROOM",
"PAYLOAD_TYPE_ROOM_MEMBER",
"PAYLOAD_TYPE_FRIENDSHIP"
],
"pattern": "PAYLOAD_TYPE_MESSAGE"
}
],
"tags": [
"Puppet"
]
}
},
"/message/{id}/location": {
"get": {
"operationId": "Puppet_MessageLocation",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessageLocationResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/message/{id}/mini-program": {
"get": {
"operationId": "Puppet_MessageMiniProgram",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessageMiniProgramResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/message/{id}/recall": {
"put": {
"operationId": "Puppet_MessageRecall",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessageRecallResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/message/{id}/url-link": {
"get": {
"operationId": "Puppet_MessageUrl",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessageUrlResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/messages/{messageId}/forward/{conversationId}": {
"post": {
"operationId": "Puppet_MessageForward",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetMessageForwardResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "messageId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "conversationId",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/room-invitations/{id}": {
"get": {
"summary": "*",
"description": "Room Invitation",
"operationId": "Puppet_RoomInvitationPayload",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetRoomInvitationPayloadResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "payloadStringValueDeprecated",
"description": "*\nHuan(202002): `payload` should be removed.\n The puppet server should take the responsibilities\n for storing the unaccepted friend-request payload.\n\n@deprecated: use payload instead.\n Huan(202109): Wrapper types must not be used going forward.\n https://cloud.google.com/apis/design/design_patterns#optional_primitive_fields",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "payload",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/room-invitations/{id}/accept": {
"put": {
"operationId": "Puppet_RoomInvitationAccept",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetRoomInvitationAcceptResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/rooms": {
"get": {
"operationId": "Puppet_RoomList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetRoomListResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"Puppet"
]
},
"post": {
"operationId": "Puppet_RoomCreate",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetRoomCreateResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/puppetRoomCreateRequest"
}
}
],
"tags": [
"Puppet"
]
}
},
"/rooms/{id}": {
"get": {
"summary": "*",
"description": "Room",
"operationId": "Puppet_RoomPayload",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetRoomPayloadResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
},
"delete": {
"operationId": "Puppet_RoomQuit",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetRoomQuitResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/rooms/{id}/add/{contactId}": {
"put": {
"operationId": "Puppet_RoomAdd",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetRoomAddResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "contactId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "inviteOnly",
"in": "query",
"required": false,
"type": "boolean"
}
],
"tags": [
"Puppet"
]
}
},
"/rooms/{id}/announcement": {
"get": {
"operationId": "Puppet_RoomAnnounce",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetRoomAnnounceResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "textStringValueDeprecated",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "text",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"Puppet"
]
},
"put": {
"operationId": "Puppet_RoomAnnounce2",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetRoomAnnounceResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"textStringValueDeprecated": {
"type": "string"
},
"text": {
"type": "string"
}
}
}
}
],
"tags": [
"Puppet"
]
}
},
"/rooms/{id}/avatar": {
"get": {
"operationId": "Puppet_RoomAvatar",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetRoomAvatarResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Puppet"
]
}
},
"/rooms/{id}/dirty/members/{type}": {
"put": {
"operationId": "Puppet_DirtyPayload4",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetDirtyPayloadResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string",
"enum": [
"PAYLOAD_TYPE_UNSPECIFIED",
"PAYLOAD_TYPE_MESSAGE",
"PAYLOAD_TYPE_CONTACT",
"PAYLOAD_TYPE_ROOM",
"PAYLOAD_TYPE_ROOM_MEMBER",
"PAYLOAD_TYPE_FRIENDSHIP"
],
"pattern": "PAYLOAD_TYPE_ROOM_MEMBER"
}
],
"tags": [
"Puppet"
]
}
},
"/rooms/{id}/dirty/{type}": {
"put": {
"operationId": "Puppet_DirtyPayload3",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetDirtyPayloadResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string",
"enum": [
"PAYLOAD_TYPE_UNSPECIFIED",
"PAYLOAD_TYPE_MESSAGE",
"PAYLOAD_TYPE_CONTACT",
"PAYLOAD_TYPE_ROOM",
"PAYLOAD_TYPE_ROOM_MEMBER",
"PAYLOAD_TYPE_FRIENDSHIP"
],
"pattern": "PAYLOAD_TYPE_ROOM"
}
],
"tags": [
"Puppet"
]
}
},
"/rooms/{id}/member/{contactId}": {
"delete": {
"operationId": "Puppet_RoomDel",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/puppetRoomDelResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",