Sindbad~EG File Manager
/**
* @swagger
* components:
* schemas:
* PhoneNumber:
* type: object
* properties:
* _id:
* type: string
* description: The _id automatically generated
* phone_no:
* type: string
* description: The phone number value
* type:
* type: string
* description: Type of the phone number (e.g., Cell, Home)
* is_primary:
* type: boolean
* description: Indicates if this is the primary phone number
* required:
* - phone_no
* - type
* - is_primary
*
* Email:
* type: object
* properties:
* _id:
* type: string
* description: The _id automatically generated
* email_address:
* type: string
* description: The email address value
* type:
* type: string
* description: Type of the email address (e.g., HOME, WORK)
* is_primary:
* type: boolean
* description: Indicates if this is the primary email address
* required:
* - email_address
* - type
* - is_primary
*
* BasicContactInfo:
* type: object
* properties:
* phone_numbers:
* type: array
* items:
* $ref: '#/components/schemas/PhoneNumber'
* description: List of phone numbers
* emails:
* type: array
* items:
* $ref: '#/components/schemas/Email'
* description: List of email addresses
* required:
* - phone_numbers
* - emails
* example:
* phone_numbers:
* phone_id: "66a0b0cf9fd2befce733e9ab"
* phone_no: "5050-6060-7070"
* is_primary: true
* emails:
* email_id: "66a0b0cf9fd2befce733e9ac"
* email_address: "testjohndoe@workplace.com"
* is_primary: false
* EditBasicContactInfo:
* type: object
* properties:
* phone_numbers:
* $ref: '#/components/schemas/PhoneNumber'
* description: Object of phone numbers
* emails:
* $ref: '#/components/schemas/Email'
* description: Object of email addresses
* required:
* - phone_numbers
* - emails
* example:
* phone_numbers:
* _id: "66a01276cb4d06db5b77b016"
* phone_no: "123-456-7890"
* type: "WORK"
* is_primary: false
* emails:
* _id: "66a01276cb4d06db5b77b018"
* email_address: "muhammad.awais@example.com"
* type: "WORK"
* is_primary: true
*
* DeleteBasicContactInfo:
* type: object
* properties:
* phone_numbers:
* type: object
* properties:
* phone_id:
* type: string
* description: The ID of the phone number to be deleted
* phone_no:
* type: string
* description: The phone number value to be deleted
* emails:
* type: object
* properties:
* email_id:
* type: string
* description: The ID of the email address to be deleted
* email_address:
* type: string
* description: The email address value to be deleted
* required:
* - phone_numbers
* - emails
* example:
* phone_numbers:
* phone_id: "66a0b0cf9fd2befce733e9ab"
* phone_no: "5050-6060-7070"
* emails:
* email_id: "66a0b0cf9fd2befce733e9ac"
* email_address: "testjohndoe@workplace.com"
*
* UpdateBasicContactResponse:
* type: object
* properties:
* message:
* type: string
* example: "Data updated successfully"
*
* DeleteResponse:
* type: object
* properties:
* message:
* type: string
* example: "BasicContactInfo and related data deleted successfully"
*
* tags:
* - name: BasicContactInfo
* description: Operations related to Basic Contact Info
*
* paths:
* /basic-contact-info/list:
* get:
* summary: Returns the list of Basic-Contact-Info entries conatc_id is only required for CONTACT/CUSTOMER list
* tags: [BasicContactInfo]
* security:
* - bearerAuth: []
* parameters:
* - in: query
* name: contact_id
* schema:
* type: string
* required: false
* description: ID of the contact
* responses:
* 200:
* description: The list of Basic Contact Info entries
* content:
* application/json:
* schema:
* type: array
* items:
* $ref: '#/components/schemas/BasicContactInfo'
*
* /basic-contact-info/add:
* post:
* summary: Create a new Basic Contact Info entry
* tags: [BasicContactInfo]
* security:
* - bearerAuth: []
* requestBody:
* required: true
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/BasicContactInfo'
* responses:
* 201:
* description: The Basic Contact Info entry was successfully created
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/BasicContactInfo'
*
* /basic-contact-info/edit:
* put:
* summary: Update the Basic Contact Info entry by userID,taken from JWT token
* tags: [BasicContactInfo]
* security:
* - bearerAuth: []
* requestBody:
* required: true
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/EditBasicContactInfo'
* responses:
* 200:
* description: The Basic Contact Info entry was successfully updated
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/UpdateBasicContactResponse'
*
* /basic-contact-info/delete:
* delete:
* summary: Delete the Basic Contact Info entry by provided details
* tags: [BasicContactInfo]
* security:
* - bearerAuth: []
* requestBody:
* required: true
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/DeleteBasicContactInfo'
* responses:
* 200:
* description: The Basic Contact Info entry was successfully deleted
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/DeleteResponse'
*
* /basic-contact-info/save:
* post:
* summary: Save or update contact information it will take contact_id for Contact/Customer and user_id for User/Agent you don't have to pass user_id it will be taken from JWT-token but for Contact/Customer you have to pass contact_id.NOTE *_id* is not required for all cases and remove *contact_id* from request for User/Agent..
* tags: [BasicContactInfo]
* requestBody:
* required: true
* content:
* application/json:
* schema:
* type: object
* properties:
* contact_id:
* type: string
* example: "601c3c8f9d1e8b3530a7d2b5"
* phone_numbers:
* type: array
* items:
* $ref: '#/components/schemas/PhoneNumber'
* emails:
* type: array
* items:
* $ref: '#/components/schemas/Email'
* responses:
* 200:
* description: Contact information saved successfully
* content:
* application/json:
* schema:
* type: object
* properties:
* success:
* type: boolean
* example: true
* message:
* type: string
* example: 'Contact information saved successfully'
* 500:
* description: An error occurred while saving contact information
* content:
* application/json:
* schema:
* type: object
* properties:
* success:
* type: boolean
* example: false
* message:
* type: string
* example: 'An error occurred while saving contact information'
*/
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists