update contact payload for developer docs

This commit is contained in:
Tanmay Deep Sharma
2025-05-15 14:01:36 +07:00
parent 97b6624d9d
commit f0a43e3ba6
7 changed files with 269 additions and 6 deletions
+8 -1
View File
@@ -173,7 +173,6 @@ contact_list:
description: 'array of contacts'
items:
allOf:
- $ref: '#/components/schemas/generic_id'
- $ref: '#/components/schemas/contact'
contact_conversations:
type: array
@@ -210,3 +209,11 @@ conversation_meta:
$ref: ./resource/conversation_meta.yml
conversation_messages:
$ref: ./resource/conversation_messages.yml
contact_meta:
$ref: ./resource/contact_meta.yml
contact_inbox:
$ref: ./resource/contact_inbox.yml
contact_list_item:
$ref: ./resource/contact_list_item.yml
contacts_list_response:
$ref: ./resource/contacts_list_response.yml
@@ -0,0 +1,27 @@
type: object
properties:
source_id:
type: string
description: Source identifier for the contact inbox
inbox:
type: object
properties:
id:
type: integer
description: ID of the inbox
avatar_url:
type: string
description: URL for the inbox avatar
channel_id:
type: integer
description: ID of the channel
name:
type: string
description: Name of the inbox
channel_type:
type: string
description: Type of channel
provider:
type: string
description: Provider of the inbox
nullable: true
@@ -0,0 +1,61 @@
type: object
properties:
additional_attributes:
type: object
description: The object containing additional attributes related to the contact
properties:
city:
type: string
description: City of the contact
country:
type: string
description: Country of the contact
country_code:
type: string
description: Country code of the contact
created_at_ip:
type: string
description: IP address when the contact was created
availability_status:
type: string
description: Availability status of the contact
enum: ["online", "offline"]
email:
type: string
description: The email address of the contact
nullable: true
id:
type: integer
description: The ID of the contact
name:
type: string
description: The name of the contact
phone_number:
type: string
description: The phone number of the contact
nullable: true
blocked:
type: boolean
description: Whether the contact is blocked
identifier:
type: string
description: The identifier of the contact
nullable: true
thumbnail:
type: string
description: The thumbnail of the contact
custom_attributes:
type: object
description: The custom attributes of the contact
last_activity_at:
type: integer
description: Timestamp of last activity
nullable: true
created_at:
type: integer
description: Timestamp when contact was created
contact_inboxes:
type: array
description: List of inboxes associated with this contact
items:
$ref: '#/components/schemas/contact_inbox'
@@ -0,0 +1,8 @@
type: object
properties:
count:
type: integer
description: Total number of contacts
current_page:
type: string
description: Current page number
@@ -0,0 +1,10 @@
type: object
properties:
meta:
$ref: '#/components/schemas/contact_meta'
description: Metadata about the contact list response
payload:
type: array
items:
$ref: '#/components/schemas/contact_list_item'
description: List of contacts
@@ -16,7 +16,7 @@ get:
content:
application/json:
schema:
$ref: '#/components/schemas/contact_list'
$ref: '#/components/schemas/contacts_list_response'
'400':
description: Bad Request Error
content:
+154 -4
View File
@@ -2560,7 +2560,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/contact_list"
"$ref": "#/components/schemas/contacts_list_response"
}
}
}
@@ -10195,9 +10195,6 @@
"description": "array of contacts",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/generic_id"
},
{
"$ref": "#/components/schemas/contact"
}
@@ -10859,6 +10856,159 @@
"description": "List of messages in the conversation"
}
}
},
"contact_meta": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"description": "Total number of contacts"
},
"current_page": {
"type": "string",
"description": "Current page number"
}
}
},
"contact_inbox": {
"type": "object",
"properties": {
"source_id": {
"type": "string",
"description": "Source identifier for the contact inbox"
},
"inbox": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "ID of the inbox"
},
"avatar_url": {
"type": "string",
"description": "URL for the inbox avatar"
},
"channel_id": {
"type": "integer",
"description": "ID of the channel"
},
"name": {
"type": "string",
"description": "Name of the inbox"
},
"channel_type": {
"type": "string",
"description": "Type of channel"
},
"provider": {
"type": "string",
"description": "Provider of the inbox",
"nullable": true
}
}
}
}
},
"contact_list_item": {
"type": "object",
"properties": {
"additional_attributes": {
"type": "object",
"description": "The object containing additional attributes related to the contact",
"properties": {
"city": {
"type": "string",
"description": "City of the contact"
},
"country": {
"type": "string",
"description": "Country of the contact"
},
"country_code": {
"type": "string",
"description": "Country code of the contact"
},
"created_at_ip": {
"type": "string",
"description": "IP address when the contact was created"
}
}
},
"availability_status": {
"type": "string",
"description": "Availability status of the contact",
"enum": [
"online",
"offline"
]
},
"email": {
"type": "string",
"description": "The email address of the contact",
"nullable": true
},
"id": {
"type": "integer",
"description": "The ID of the contact"
},
"name": {
"type": "string",
"description": "The name of the contact"
},
"phone_number": {
"type": "string",
"description": "The phone number of the contact",
"nullable": true
},
"blocked": {
"type": "boolean",
"description": "Whether the contact is blocked"
},
"identifier": {
"type": "string",
"description": "The identifier of the contact",
"nullable": true
},
"thumbnail": {
"type": "string",
"description": "The thumbnail of the contact"
},
"custom_attributes": {
"type": "object",
"description": "The custom attributes of the contact"
},
"last_activity_at": {
"type": "integer",
"description": "Timestamp of last activity",
"nullable": true
},
"created_at": {
"type": "integer",
"description": "Timestamp when contact was created"
},
"contact_inboxes": {
"type": "array",
"description": "List of inboxes associated with this contact",
"items": {
"$ref": "#/components/schemas/contact_inbox"
}
}
}
},
"contacts_list_response": {
"type": "object",
"properties": {
"meta": {
"$ref": "#/components/schemas/contact_meta"
},
"payload": {
"type": "array",
"items": {
"$ref": "#/components/schemas/contact_list_item"
},
"description": "List of contacts"
}
}
}
},
"parameters": {