Skip to content

Commit

Permalink
📝 Updated api docs swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed Dec 18, 2023
1 parent 3d0c8e3 commit 326133a
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions packages/api/src/crm/contact/contact.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export class ContactController {
this.logger.setContext(ContactController.name);
}

@ApiOperation({ operationId: 'getContacts' })
@ApiOperation({
operationId: 'getContacts',
summary: 'Retrieve a batch of CRM Contacts',
})
@ApiQuery({ name: 'integrationId', required: true, type: String })
@ApiQuery({ name: 'linkedUserId', required: true, type: String })
@ApiQuery({ name: 'remote_data', required: false, type: Boolean })
Expand All @@ -46,7 +49,11 @@ export class ContactController {
);
}

@ApiOperation({ operationId: 'getContact', summary: 'Retrive a CRM Contact', description: 'Retrive a contact in any supported CRM' })
@ApiOperation({
operationId: 'getContact',
summary: 'Retrieve a CRM Contact',
description: 'Retrive a contact in any supported CRM',
})
@ApiParam({ name: 'id', required: true, type: String })
@ApiQuery({ name: 'remote_data', required: false, type: Boolean })
@ApiCustomResponse(ContactResponse)
Expand All @@ -58,7 +65,11 @@ export class ContactController {
return this.contactService.getContact(id, remote_data);
}

@ApiOperation({ operationId: 'addContact', summary: 'Create CRM Contact', description: 'Create a contact in any supported CRM' })
@ApiOperation({
operationId: 'addContact',
summary: 'Create CRM Contact',
description: 'Create a contact in any supported CRM',
})
@ApiQuery({ name: 'integrationId', required: true, type: String })
@ApiQuery({ name: 'linkedUserId', required: true, type: String })
@ApiQuery({ name: 'remote_data', required: false, type: Boolean })
Expand All @@ -79,7 +90,10 @@ export class ContactController {
);
}

@ApiOperation({ operationId: 'addContacts' })
@ApiOperation({
operationId: 'addContacts',
summary: 'Add a batch of CRM Contacts',
})
@ApiQuery({ name: 'integrationId', required: true, type: String })
@ApiQuery({ name: 'linkedUserId', required: true, type: String })
@ApiQuery({ name: 'remote_data', required: false, type: Boolean })
Expand All @@ -100,7 +114,10 @@ export class ContactController {
);
}

@ApiOperation({ operationId: 'updateContact' })
@ApiOperation({
operationId: 'updateContact',
summary: 'Update a CRM Contact',
})
@Patch()
updateContact(
@Query('id') id: string,
Expand Down

0 comments on commit 326133a

Please sign in to comment.