Browse Source

feat: update open api

pull/60/head
Aldino Kemal 3 years ago
parent
commit
615b3c4a5a
  1. 79
      docs/openapi.yaml

79
docs/openapi.yaml

@ -1,7 +1,7 @@
openapi: 3.0.0 openapi: 3.0.0
info: info:
title: WhatsApp API MultiDevice title: WhatsApp API MultiDevice
version: 3.3.1
version: 3.4.0
description: This API is used for sending whatsapp via API description: This API is used for sending whatsapp via API
servers: servers:
- url: http://localhost:3000 - url: http://localhost:3000
@ -10,8 +10,10 @@ tags:
description: Initial Connection to Whatsapp server description: Initial Connection to Whatsapp server
- name: user - name: user
description: Getting information description: Getting information
- name: send
description: Send Message (Text/Image/File/Video).
- name: message - name: message
description: Send or Manipulate Message (Text/Image/File/Video).
description: Message manipulation (revoke/react/update).
paths: paths:
/app/login: /app/login:
get: get:
@ -192,7 +194,7 @@ paths:
post: post:
operationId: sendMessage operationId: sendMessage
tags: tags:
- message
- send
summary: Send Message summary: Send Message
requestBody: requestBody:
content: content:
@ -231,7 +233,7 @@ paths:
post: post:
operationId: sendImage operationId: sendImage
tags: tags:
- message
- send
summary: Send Image summary: Send Image
requestBody: requestBody:
content: content:
@ -282,7 +284,7 @@ paths:
post: post:
operationId: sendFile operationId: sendFile
tags: tags:
- message
- send
summary: Send File summary: Send File
requestBody: requestBody:
content: content:
@ -325,7 +327,7 @@ paths:
post: post:
operationId: sendVideo operationId: sendVideo
tags: tags:
- message
- send
summary: Send Video summary: Send Video
requestBody: requestBody:
content: content:
@ -376,7 +378,7 @@ paths:
post: post:
operationId: sendContact operationId: sendContact
tags: tags:
- message
- send
summary: Send Contact summary: Send Contact
requestBody: requestBody:
content: content:
@ -419,7 +421,7 @@ paths:
post: post:
operationId: sendLink operationId: sendLink
tags: tags:
- message
- send
summary: Send Link summary: Send Link
requestBody: requestBody:
content: content:
@ -462,7 +464,7 @@ paths:
post: post:
operationId: sendLocation operationId: sendLocation
tags: tags:
- message
- send
summary: Send Location summary: Send Location
requestBody: requestBody:
content: content:
@ -501,12 +503,61 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ErrorInternalServer' $ref: '#/components/schemas/ErrorInternalServer'
/message/:message_id/revoke:
/message/{message_id}/revoke:
post: post:
operationId: revokeMessage operationId: revokeMessage
tags: tags:
- message - message
summary: Send Link
summary: Revoke Message
parameters:
- in: path
name: message_id
schema:
type: string
required: true
description: Message ID
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
phone:
type: string
example: '6289685024051@s.whatsapp.net'
description: Phone number with country code
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SendResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBadRequest'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorInternalServer'
/message/{message_id}/reaction:
post:
operationId: reactMessage
tags:
- message
summary: Send reaction to message
parameters:
- in: path
name: message_id
schema:
type: string
required: true
description: Message ID
requestBody: requestBody:
content: content:
multipart/form-data: multipart/form-data:
@ -517,10 +568,10 @@ paths:
type: string type: string
example: '6289685024051@s.whatsapp.net' example: '6289685024051@s.whatsapp.net'
description: Phone number with country code description: Phone number with country code
message_id:
emoji:
type: string type: string
example: "3EB007D87686670344D7"
description: Message ID
example: "🙏"
description: Emoji to react
responses: responses:
'200': '200':
description: OK description: OK

Loading…
Cancel
Save