110 lines
3.7 KiB
YAML
110 lines
3.7 KiB
YAML
tags:
|
|
- name: Settings
|
|
|
|
components:
|
|
schemas:
|
|
CompanySettingsBody:
|
|
type: object
|
|
minProperties: 1
|
|
properties:
|
|
org_name: { type: string, example: 'Bharat Consumer Products' }
|
|
gstin: { type: string, example: '33AABCB1234D1Z5', description: '15-character GSTIN' }
|
|
mobile: { type: string, example: '9876543210' }
|
|
email: { type: string, format: email, example: 'info@company.com' }
|
|
website: { type: string, example: 'https://www.company.com' }
|
|
address: { type: string, example: '3rd Floor, Business Tower' }
|
|
city: { type: string, example: 'Noida' }
|
|
state: { type: string, example: 'Uttar Pradesh' }
|
|
pincode: { type: string, example: '201301' }
|
|
EmailSettingsBody:
|
|
type: object
|
|
minProperties: 1
|
|
properties:
|
|
smtp_host: { type: string, example: 'smtp.gmail.com' }
|
|
smtp_port: { type: integer, example: 587 }
|
|
smtp_username: { type: string, example: 'smtp-user@company.com' }
|
|
smtp_password: { type: string, example: 'app-password' }
|
|
sender_email: { type: string, format: email, example: 'noreply@company.com' }
|
|
sender_name: { type: string, example: 'Bharat ERP' }
|
|
|
|
paths:
|
|
/settings/company:
|
|
get:
|
|
tags: [Settings]
|
|
summary: Get company profile settings
|
|
responses:
|
|
"200":
|
|
description: Company settings fetched
|
|
content: { application/json: { schema: { $ref: "#/components/schemas/ApiResponse" } } }
|
|
put:
|
|
tags: [Settings]
|
|
summary: Update company profile settings
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema: { $ref: "#/components/schemas/CompanySettingsBody" }
|
|
responses:
|
|
"200":
|
|
description: Company settings updated
|
|
content: { application/json: { schema: { $ref: "#/components/schemas/ApiResponse" } } }
|
|
/settings/company/logo:
|
|
post:
|
|
tags: [Settings]
|
|
summary: Upload company logo
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
required: [logo]
|
|
properties:
|
|
logo:
|
|
type: string
|
|
format: binary
|
|
responses:
|
|
"200":
|
|
description: Logo updated
|
|
content: { application/json: { schema: { $ref: "#/components/schemas/ApiResponse" } } }
|
|
/settings/company/favicon:
|
|
post:
|
|
tags: [Settings]
|
|
summary: Upload company favicon
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
required: [favicon]
|
|
properties:
|
|
favicon:
|
|
type: string
|
|
format: binary
|
|
description: JPEG, PNG, or WebP image
|
|
responses:
|
|
"200":
|
|
description: Favicon updated
|
|
content: { application/json: { schema: { $ref: "#/components/schemas/ApiResponse" } } }
|
|
/settings/email:
|
|
get:
|
|
tags: [Settings]
|
|
summary: Get SMTP email settings
|
|
responses:
|
|
"200":
|
|
description: Email settings fetched
|
|
content: { application/json: { schema: { $ref: "#/components/schemas/ApiResponse" } } }
|
|
put:
|
|
tags: [Settings]
|
|
summary: Update SMTP email settings
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema: { $ref: "#/components/schemas/EmailSettingsBody" }
|
|
responses:
|
|
"200":
|
|
description: Email settings updated
|
|
content: { application/json: { schema: { $ref: "#/components/schemas/ApiResponse" } } }
|