chore: Move agent availability to Account level (#3074)

- Move agent availability to the account level
This commit is contained in:
Sojan Jose
2021-10-07 13:21:46 +05:30
committed by GitHub
parent 1c6a539c0a
commit c54aae21ff
84 changed files with 618 additions and 148 deletions

View File

@@ -0,0 +1,22 @@
get:
tags:
- Contact
operationId: contactConversations
summary: Contact Conversations
description: Get conversations associated to that contact
parameters:
- $ref: '#/parameters/account_id'
- name: id
in: path
type: number
description: ID of the contact
required: true
responses:
200:
description: Success
schema:
$ref: '#/definitions/contact_conversations'
404:
description: Contact not found
403:
description: Access denied

View File

@@ -0,0 +1,69 @@
get:
tags:
- Contact
operationId: contactDetails
summary: Show Contact
description: Get a contact belonging to the account using ID
parameters:
- $ref: '#/parameters/account_id'
- name: id
in: path
type: number
description: ID of the contact
required: true
responses:
200:
description: Success
schema:
$ref: '#/definitions/extended_contact'
404:
description: Contact not found
403:
description: Access denied
put:
tags:
- Contact
operationId: contactUpdate
summary: Update Contact
description: Update a contact belonging to the account using ID
parameters:
- $ref: '#/parameters/account_id'
- name: id
in: path
type: number
description: ID of the contact
required: true
- name: data
in: body
required: true
schema:
$ref: '#/definitions/contact_update'
responses:
204:
description: Success
schema:
$ref: '#/definitions/contact_base'
404:
description: Contact not found
403:
description: Access denied
delete:
tags:
- Contact
operationId: contactDelete
summary: Delete Contact
parameters:
- name: id
in: path
type: number
description: ID of the contact
required: true
responses:
200:
description: Success
401:
description: Unauthorized
404:
description: Contact not found

View File

@@ -0,0 +1,42 @@
get:
tags:
- Contact
operationId: contactList
description: Listing all the resolved contacts with pagination (Page size = 15) . Resolved contacts are the ones with a value for identifier, email or phone number
summary: List Contacts
parameters:
- $ref: '#/parameters/account_id'
- $ref: '#/parameters/contact_sort_param'
- $ref: '#/parameters/page'
responses:
200:
description: Success
schema:
$ref: '#/definitions/contact_list'
400:
description: Bad Request Error
schema:
$ref: '#/definitions/bad_request_error'
post:
tags:
- Contact
operationId: contactCreate
description: Create a new Contact
summary: Create Contact
parameters:
- $ref: '#/parameters/account_id'
- name: data
in: body
required: true
schema:
$ref: '#/definitions/contact_create'
responses:
200:
description: Success
schema:
$ref: '#/definitions/extended_contact'
400:
description: Bad Request Error
schema:
$ref: '#/definitions/bad_request_error'

View File

@@ -0,0 +1,26 @@
get:
tags:
- Contact
operationId: contactSearch
description: Search the resolved contacts using a search key, currently supports email search (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number
summary: Search Contacts
parameters:
- $ref: '#/parameters/account_id'
- name: q
in: query
type: string
description: Search using contact `name`, `identifier`, `email` or `phone number`
- $ref: '#/parameters/contact_sort_param'
- $ref: '#/parameters/page'
responses:
200:
description: Success
schema:
type: object
properties:
payload:
$ref: '#/definitions/contact_list'
401:
description: Authentication error
schema:
$ref: '#/definitions/bad_request_error'