/
home
/
infinitibizsol
/
insurcrm.infinitibizsol.com
/
docs
/
common
/
File Upload :
llllll
Current File: /home/infinitibizsol/insurcrm.infinitibizsol.com/docs/common/goal.js
/** * @swagger * components: * schemas: * Goal: * type: object * required: * - month * - year * - user_id * properties: * month: * type: string * description: The month for the goal * year: * type: string * description: The year for the goal * policy_count: * type: string * description: The number of policies targeted * premium: * type: string * description: Indicates if there is a premium * agency_commission: * type: string * description: The commission percentage for the agency * user_id: * type: string * description: The ID of the user who created this entry * example: * month: "09" * year: "2024" * policy_count: "2" * premium: "No" * agency_commission: "10%" * user_id: "667dcaf3f52d0d7678ea7dea" * UpdateResponse: * type: object * properties: * message: * type: string * example: "Data updated successfully" * DeleteResponse: * type: object * properties: * message: * type: string * example: "entry_name and related data deleted successfully" * securitySchemes: * bearerAuth: * type: http * scheme: bearer * bearerFormat: JWT */ /** * @swagger * tags: * - name: Goal * description: Goal-related operations */ /** * @swagger * /goals/list: * get: * summary: Returns the list of goals * tags: [Goal] * security: * - bearerAuth: [] * responses: * 200: * description: The list of goals * content: * application/json: * schema: * type: array * items: * $ref: '#/components/schemas/Goal' */ /** * @swagger * /goals/add: * post: * summary: Create a new goal * description: | * - To add goal information, follow these guidelines: * * For **User/Agent**: * - When accessing another agent's profile, provide `user_id` in request body. * - For the logged-in agent, `user_id` will be automatically obtained from the JWT token. * tags: [Goal] * security: * - bearerAuth: [] * requestBody: * required: true * content: * application/json: * schema: * $ref: '#/components/schemas/Goal' * responses: * 201: * description: The goal was successfully created * content: * application/json: * schema: * $ref: '#/components/schemas/Goal' */ /** * @swagger * /goals/edit/{id}: * put: * summary: Update the goal by ID * tags: [Goal] * security: * - bearerAuth: [] * parameters: * - in: path * name: id * schema: * type: string * required: true * description: The ID of the goal * requestBody: * required: true * content: * application/json: * schema: * $ref: '#/components/schemas/Goal' * responses: * 200: * description: The goal was successfully updated * content: * application/json: * schema: * $ref: '#/components/schemas/UpdateResponse' * 404: * description: Goal not found */ /** * @swagger * /goals/delete/{id}: * delete: * summary: Delete the goal by ID * tags: [Goal] * security: * - bearerAuth: [] * parameters: * - in: path * name: id * schema: * type: string * required: true * description: The ID of the goal * responses: * 200: * description: The goal was successfully deleted * content: * application/json: * schema: * $ref: '#/components/schemas/DeleteResponse' * 404: * description: Goal not found */ "use strict";
Copyright ©2k19 -
Hexid
|
Tex7ure