docs: add swagger spec for accounts API (#11620)
This commit is contained in:
@@ -60,6 +60,10 @@ webhook:
|
||||
$ref: ./resource/webhook.yml
|
||||
account:
|
||||
$ref: ./resource/account.yml
|
||||
account_detail:
|
||||
$ref: ./resource/account_detail.yml
|
||||
account_show_response:
|
||||
$ref: ./resource/account_show_response.yml
|
||||
account_user:
|
||||
$ref: ./resource/account_user.yml
|
||||
platform_account:
|
||||
@@ -87,6 +91,9 @@ public_inbox:
|
||||
account_create_update_payload:
|
||||
$ref: ./request/account/create_update_payload.yml
|
||||
|
||||
account_update_payload:
|
||||
$ref: ./request/account/update_payload.yml
|
||||
|
||||
account_user_create_update_payload:
|
||||
$ref: ./request/account_user/create_update_payload.yml
|
||||
|
||||
|
||||
49
swagger/definitions/request/account/update_payload.yml
Normal file
49
swagger/definitions/request/account/update_payload.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Name of the account
|
||||
example: 'My Account'
|
||||
locale:
|
||||
type: string
|
||||
description: The locale of the account
|
||||
example: 'en'
|
||||
domain:
|
||||
type: string
|
||||
description: The domain of the account
|
||||
example: 'example.com'
|
||||
support_email:
|
||||
type: string
|
||||
description: The support email of the account
|
||||
example: 'support@example.com'
|
||||
# Settings parameters (stored in settings JSONB column)
|
||||
auto_resolve_after:
|
||||
type: integer
|
||||
minimum: 10
|
||||
maximum: 1439856
|
||||
nullable: true
|
||||
description: Auto resolve conversations after specified minutes
|
||||
example: 1440
|
||||
auto_resolve_message:
|
||||
type: string
|
||||
nullable: true
|
||||
description: Message to send when auto resolving
|
||||
example: "This conversation has been automatically resolved due to inactivity"
|
||||
auto_resolve_ignore_waiting:
|
||||
type: boolean
|
||||
nullable: true
|
||||
description: Whether to ignore waiting conversations for auto resolve
|
||||
example: false
|
||||
# Custom attributes parameters (stored in custom_attributes JSONB column)
|
||||
industry:
|
||||
type: string
|
||||
description: Industry type
|
||||
example: "Technology"
|
||||
company_size:
|
||||
type: string
|
||||
description: Company size
|
||||
example: "50-100"
|
||||
timezone:
|
||||
type: string
|
||||
description: Account timezone
|
||||
example: "UTC"
|
||||
84
swagger/definitions/resource/account_detail.yml
Normal file
84
swagger/definitions/resource/account_detail.yml
Normal file
@@ -0,0 +1,84 @@
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: number
|
||||
description: Account ID
|
||||
name:
|
||||
type: string
|
||||
description: Name of the account
|
||||
locale:
|
||||
type: string
|
||||
description: The locale of the account
|
||||
domain:
|
||||
type: string
|
||||
description: The domain of the account
|
||||
support_email:
|
||||
type: string
|
||||
description: The support email of the account
|
||||
status:
|
||||
type: string
|
||||
description: The status of the account
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The creation date of the account
|
||||
cache_keys:
|
||||
type: object
|
||||
description: Cache keys for the account
|
||||
features:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Enabled features for the account
|
||||
settings:
|
||||
type: object
|
||||
description: Account settings
|
||||
properties:
|
||||
auto_resolve_after:
|
||||
type: number
|
||||
description: Auto resolve conversations after specified minutes
|
||||
auto_resolve_message:
|
||||
type: string
|
||||
description: Message to send when auto resolving
|
||||
auto_resolve_ignore_waiting:
|
||||
type: boolean
|
||||
description: Whether to ignore waiting conversations for auto resolve
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: Custom attributes of the account
|
||||
properties:
|
||||
plan_name:
|
||||
type: string
|
||||
description: Subscription plan name
|
||||
subscribed_quantity:
|
||||
type: number
|
||||
description: Subscribed quantity
|
||||
subscription_status:
|
||||
type: string
|
||||
description: Subscription status
|
||||
subscription_ends_on:
|
||||
type: string
|
||||
format: date
|
||||
description: Subscription end date
|
||||
industry:
|
||||
type: string
|
||||
description: Industry type
|
||||
company_size:
|
||||
type: string
|
||||
description: Company size
|
||||
timezone:
|
||||
type: string
|
||||
description: Account timezone
|
||||
logo:
|
||||
type: string
|
||||
description: Account logo URL
|
||||
onboarding_step:
|
||||
type: string
|
||||
description: Current onboarding step
|
||||
marked_for_deletion_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: When account was marked for deletion
|
||||
marked_for_deletion_reason:
|
||||
type: string
|
||||
description: Reason for account deletion
|
||||
13
swagger/definitions/resource/account_show_response.yml
Normal file
13
swagger/definitions/resource/account_show_response.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/account_detail'
|
||||
- type: object
|
||||
properties:
|
||||
latest_chatwoot_version:
|
||||
type: string
|
||||
description: Latest version of Chatwoot available
|
||||
example: "3.0.0"
|
||||
subscribed_features:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: List of subscribed enterprise features (if enterprise edition is enabled)
|
||||
Reference in New Issue
Block a user