diff --git a/packages/api/src/@core/auth/auth.controller.ts b/packages/api/src/@core/auth/auth.controller.ts index 4d1d19bde..ac746655e 100644 --- a/packages/api/src/@core/auth/auth.controller.ts +++ b/packages/api/src/@core/auth/auth.controller.ts @@ -17,7 +17,7 @@ export class AuthController { this.logger.setContext(AuthController.name); } - @ApiOperation({ operationId: 'signUp' }) + @ApiOperation({ operationId: 'signUp', summary: 'Register' }) @ApiBody({ type: CreateUserDto }) @ApiResponse({ status: 201 }) @Post('register') @@ -25,7 +25,7 @@ export class AuthController { return this.authService.register(user); } - @ApiOperation({ operationId: 'signIn' }) + @ApiOperation({ operationId: 'signIn', summary: 'Log In' }) @ApiBody({ type: LoginDto }) @ApiResponse({ status: 201 }) @Post('login') @@ -33,21 +33,21 @@ export class AuthController { return this.authService.login(user); } - @ApiOperation({ operationId: 'getUsers' }) + @ApiOperation({ operationId: 'getUsers', summary: 'Get users' }) @ApiResponse({ status: 200 }) @Get('users') async users() { return this.authService.getUsers(); } - @ApiOperation({ operationId: 'getApiKeys' }) + @ApiOperation({ operationId: 'getApiKeys', summary: 'Retrieve API Keys' }) @ApiResponse({ status: 200 }) @Get('api-keys') async apiKeys() { return this.authService.getApiKeys(); } - @ApiOperation({ operationId: 'generateApiKey' }) + @ApiOperation({ operationId: 'generateApiKey', summary: 'Create API Key' }) @ApiBody({ type: ApiKeyDto }) @ApiResponse({ status: 201 }) @UseGuards(JwtAuthGuard) diff --git a/packages/api/src/@core/connections/connections.controller.ts b/packages/api/src/@core/connections/connections.controller.ts index 0735f242a..68607036b 100644 --- a/packages/api/src/@core/connections/connections.controller.ts +++ b/packages/api/src/@core/connections/connections.controller.ts @@ -18,7 +18,10 @@ export class ConnectionsController { this.logger.setContext(ConnectionsController.name); } - @ApiOperation({ operationId: 'handleOAuthCallback' }) + @ApiOperation({ + operationId: 'handleOAuthCallback', + summary: 'Capture oAuth Callback', + }) @ApiQuery({ name: 'state', required: true, type: String }) @ApiQuery({ name: 'code', required: true, type: String }) @ApiQuery({ name: 'location', required: true, type: String }) @@ -74,7 +77,10 @@ export class ConnectionsController { } } - @ApiOperation({ operationId: 'getConnections' }) + @ApiOperation({ + operationId: 'getConnections', + summary: 'Retrieve Connections', + }) @ApiResponse({ status: 200 }) @Get() async getConnections() { diff --git a/packages/api/src/@core/events/events.controller.ts b/packages/api/src/@core/events/events.controller.ts index 3806515f2..0549f5169 100644 --- a/packages/api/src/@core/events/events.controller.ts +++ b/packages/api/src/@core/events/events.controller.ts @@ -13,7 +13,7 @@ export class EventsController { this.logger.setContext(EventsController.name); } - @ApiOperation({ operationId: 'getEvents' }) + @ApiOperation({ operationId: 'getEvents', summary: 'Retrieve Events' }) @ApiResponse({ status: 200 }) @Get() async getEvents() { diff --git a/packages/api/src/@core/field-mapping/field-mapping.controller.ts b/packages/api/src/@core/field-mapping/field-mapping.controller.ts index b84196290..cd8e8a4b8 100644 --- a/packages/api/src/@core/field-mapping/field-mapping.controller.ts +++ b/packages/api/src/@core/field-mapping/field-mapping.controller.ts @@ -17,28 +17,40 @@ export class FieldMappingController { this.logger.setContext(FieldMappingController.name); } - @ApiOperation({ operationId: 'getFieldMappingsEntities' }) + @ApiOperation({ + operationId: 'getFieldMappingsEntities', + summary: 'Retrieve field mapping entities', + }) @ApiResponse({ status: 200 }) @Get('entities') getEntities() { return this.fieldMappingService.getEntities(); } - @ApiOperation({ operationId: 'getFieldMappings' }) + @ApiOperation({ + operationId: 'getFieldMappings', + summary: 'Retrieve field mappings', + }) @ApiResponse({ status: 200 }) @Get('attribute') getAttributes() { return this.fieldMappingService.getAttributes(); } - @ApiOperation({ operationId: 'getFieldMappingValues' }) + @ApiOperation({ + operationId: 'getFieldMappingValues', + summary: 'Retrieve field mappings values', + }) @ApiResponse({ status: 200 }) @Get('value') getValues() { return this.fieldMappingService.getValues(); } - @ApiOperation({ operationId: 'defineTargetField' }) + @ApiOperation({ + operationId: 'defineTargetField', + summary: 'Define target Field', + }) @ApiBody({ type: DefineTargetFieldDto }) @ApiResponse({ status: 201 }) //define target field on our unified model @@ -47,7 +59,7 @@ export class FieldMappingController { return this.fieldMappingService.defineTargetField(defineTargetFieldDto); } - @ApiOperation({ operationId: 'mapField' }) + @ApiOperation({ operationId: 'mapField', summary: 'Map Custom Field' }) @ApiBody({ type: MapFieldToProviderDto }) @ApiResponse({ status: 201 }) @Post('map') @@ -55,7 +67,10 @@ export class FieldMappingController { return this.fieldMappingService.mapFieldToProvider(mapFieldToProviderDto); } - @ApiOperation({ operationId: 'getCustomProviderProperties' }) + @ApiOperation({ + operationId: 'getCustomProviderProperties', + summary: 'Retrieve Custom Properties', + }) @ApiResponse({ status: 200 }) @Get('properties') getCustomProperties( diff --git a/packages/api/src/@core/linked-users/linked-users.controller.ts b/packages/api/src/@core/linked-users/linked-users.controller.ts index 22032665b..9b6427343 100644 --- a/packages/api/src/@core/linked-users/linked-users.controller.ts +++ b/packages/api/src/@core/linked-users/linked-users.controller.ts @@ -20,7 +20,7 @@ export class LinkedUsersController { this.logger.setContext(LinkedUsersController.name); } - @ApiOperation({ operationId: 'addLinkedUser' }) + @ApiOperation({ operationId: 'addLinkedUser', summary: 'Add Linked User' }) @ApiBody({ type: CreateLinkedUserDto }) @ApiResponse({ status: 201 }) @Post('create') @@ -28,14 +28,20 @@ export class LinkedUsersController { return this.linkedUsersService.addLinkedUser(linkedUserCreateDto); } - @ApiOperation({ operationId: 'getLinkedUsers' }) + @ApiOperation({ + operationId: 'getLinkedUsers', + summary: 'Retrieve Linked Users', + }) @ApiResponse({ status: 200 }) @Get() getLinkedUsers() { return this.linkedUsersService.getLinkedUsers(); } - @ApiOperation({ operationId: 'getLinkedUser' }) + @ApiOperation({ + operationId: 'getLinkedUser', + summary: 'Retrieve a Linked User', + }) @ApiQuery({ name: 'id', required: true, type: String }) @ApiResponse({ status: 200 }) @Get('single') diff --git a/packages/api/src/@core/magic-link/magic-link.controller.ts b/packages/api/src/@core/magic-link/magic-link.controller.ts index 98c19296a..afbb095ac 100644 --- a/packages/api/src/@core/magic-link/magic-link.controller.ts +++ b/packages/api/src/@core/magic-link/magic-link.controller.ts @@ -20,7 +20,10 @@ export class MagicLinkController { this.logger.setContext(MagicLinkController.name); } - @ApiOperation({ operationId: 'createMagicLink' }) + @ApiOperation({ + operationId: 'createMagicLink', + summary: 'Create a Magic Link', + }) @ApiBody({ type: CreateMagicLinkDto }) @ApiResponse({ status: 201 }) @Post('create') @@ -28,14 +31,20 @@ export class MagicLinkController { return this.magicLinkService.createUniqueLink(data); } - @ApiOperation({ operationId: 'getMagicLinks' }) + @ApiOperation({ + operationId: 'getMagicLinks', + summary: 'Retrieve Magic Links', + }) @ApiResponse({ status: 200 }) @Get() getMagicLinks() { return this.magicLinkService.getMagicLinks(); } - @ApiOperation({ operationId: 'getMagicLink' }) + @ApiOperation({ + operationId: 'getMagicLink', + summary: 'Retrieve a Magic Link', + }) @ApiQuery({ name: 'id', required: true, type: String }) @ApiResponse({ status: 200 }) @Get('single') diff --git a/packages/api/src/@core/organisations/organisations.controller.ts b/packages/api/src/@core/organisations/organisations.controller.ts index f13479087..4e6af8de7 100644 --- a/packages/api/src/@core/organisations/organisations.controller.ts +++ b/packages/api/src/@core/organisations/organisations.controller.ts @@ -14,13 +14,19 @@ export class OrganisationsController { this.logger.setContext(OrganisationsController.name); } - @ApiOperation({ operationId: 'getOrganisations' }) + @ApiOperation({ + operationId: 'getOrganisations', + summary: 'Retrieve Organisations', + }) @Get() getOragnisations() { return this.organizationsService.getOrganisations(); } - @ApiOperation({ operationId: 'createOrganisation' }) + @ApiOperation({ + operationId: 'createOrganisation', + summary: 'Create an Organisation', + }) @ApiBody({ type: CreateOrganizationDto }) @ApiResponse({ status: 201 }) @Post('create') diff --git a/packages/api/src/@core/passthrough/passthrough.controller.ts b/packages/api/src/@core/passthrough/passthrough.controller.ts index 4efcb7aa6..79ae93295 100644 --- a/packages/api/src/@core/passthrough/passthrough.controller.ts +++ b/packages/api/src/@core/passthrough/passthrough.controller.ts @@ -21,7 +21,10 @@ export class PassthroughController { this.loggerSeervice.setContext(PassthroughController.name); } - @ApiOperation({ operationId: 'passthroughRequest' }) + @ApiOperation({ + operationId: 'passthroughRequest', + summary: 'Make a passthrough request', + }) @ApiQuery({ name: 'integrationId', required: true, type: String }) @ApiQuery({ name: 'linkedUserId', required: true, type: String }) @ApiBody({ type: PassThroughRequestDto }) diff --git a/packages/api/src/@core/projects/projects.controller.ts b/packages/api/src/@core/projects/projects.controller.ts index f3dd1b980..490418b0d 100644 --- a/packages/api/src/@core/projects/projects.controller.ts +++ b/packages/api/src/@core/projects/projects.controller.ts @@ -14,14 +14,14 @@ export class ProjectsController { this.logger.setContext(ProjectsController.name); } - @ApiOperation({ operationId: 'getProjects' }) + @ApiOperation({ operationId: 'getProjects', summary: 'Retrieve projects' }) @ApiResponse({ status: 200 }) @Get() getProjects() { return this.projectsService.getProjects(); } - @ApiOperation({ operationId: 'createProject' }) + @ApiOperation({ operationId: 'createProject', summary: 'Create a project' }) @ApiBody({ type: CreateProjectDto }) @ApiResponse({ status: 201 }) @Post('create') diff --git a/packages/api/src/@core/webhook/webhook.controller.ts b/packages/api/src/@core/webhook/webhook.controller.ts index 3fd391bc2..216c42c6d 100644 --- a/packages/api/src/@core/webhook/webhook.controller.ts +++ b/packages/api/src/@core/webhook/webhook.controller.ts @@ -14,14 +14,20 @@ export class WebhookController { this.loggerSeervice.setContext(WebhookController.name); } - @ApiOperation({ operationId: 'getWebhooksMetadata' }) + @ApiOperation({ + operationId: 'getWebhooksMetadata', + summary: 'Retrieve webhooks metadata ', + }) @ApiResponse({ status: 200 }) @Get() getWebhooks() { return this.webhookService.getWebhookEndpoints(); } - @ApiOperation({ operationId: 'updateWebhookStatus' }) + @ApiOperation({ + operationId: 'updateWebhookStatus', + summary: 'Update webhook status', + }) @Put(':id') async updateWebhookStatus( @Param('id') id: string, @@ -30,7 +36,10 @@ export class WebhookController { return this.webhookService.updateStatusWebhookEndpoint(id, active); } - @ApiOperation({ operationId: 'createWebhookMetadata' }) + @ApiOperation({ + operationId: 'createWebhookMetadata', + summary: 'Add webhook metadata', + }) @ApiBody({ type: WebhookDto }) @ApiResponse({ status: 201 }) @Post() diff --git a/packages/api/swagger/swagger-spec.json b/packages/api/swagger/swagger-spec.json index ba2cbf086..c643e9577 100644 --- a/packages/api/swagger/swagger-spec.json +++ b/packages/api/swagger/swagger-spec.json @@ -15,7 +15,7 @@ "/auth/register": { "post": { "operationId": "signUp", - "summary": "", + "summary": "Register", "parameters": [], "requestBody": { "required": true, @@ -40,7 +40,7 @@ "/auth/login": { "post": { "operationId": "signIn", - "summary": "", + "summary": "Log In", "parameters": [], "requestBody": { "required": true, @@ -65,7 +65,7 @@ "/auth/users": { "get": { "operationId": "getUsers", - "summary": "", + "summary": "Get users", "parameters": [], "responses": { "200": { @@ -80,7 +80,7 @@ "/auth/api-keys": { "get": { "operationId": "getApiKeys", - "summary": "", + "summary": "Retrieve API Keys", "parameters": [], "responses": { "200": { @@ -95,7 +95,7 @@ "/auth/generate-apikey": { "post": { "operationId": "generateApiKey", - "summary": "", + "summary": "Create API Key", "parameters": [], "requestBody": { "required": true, @@ -120,7 +120,7 @@ "/connections/oauth/callback": { "get": { "operationId": "handleOAuthCallback", - "summary": "", + "summary": "Capture oAuth Callback", "parameters": [ { "name": "state", @@ -160,7 +160,7 @@ "/connections": { "get": { "operationId": "getConnections", - "summary": "", + "summary": "Retrieve Connections", "parameters": [], "responses": { "200": { @@ -175,7 +175,7 @@ "/webhook": { "get": { "operationId": "getWebhooksMetadata", - "summary": "", + "summary": "Retrieve webhooks metadata ", "parameters": [], "responses": { "200": { @@ -188,7 +188,7 @@ }, "post": { "operationId": "createWebhookMetadata", - "summary": "", + "summary": "Add webhook metadata", "parameters": [], "requestBody": { "required": true, @@ -213,7 +213,7 @@ "/webhook/{id}": { "put": { "operationId": "updateWebhookStatus", - "summary": "", + "summary": "Update webhook status", "parameters": [ { "name": "id", @@ -237,7 +237,7 @@ "/linked-users/create": { "post": { "operationId": "addLinkedUser", - "summary": "", + "summary": "Add Linked User", "parameters": [], "requestBody": { "required": true, @@ -262,7 +262,7 @@ "/linked-users": { "get": { "operationId": "getLinkedUsers", - "summary": "", + "summary": "Retrieve Linked Users", "parameters": [], "responses": { "200": { @@ -277,7 +277,7 @@ "/linked-users/single": { "get": { "operationId": "getLinkedUser", - "summary": "", + "summary": "Retrieve a Linked User", "parameters": [ { "name": "id", @@ -301,7 +301,7 @@ "/organisations": { "get": { "operationId": "getOrganisations", - "summary": "", + "summary": "Retrieve Organisations", "parameters": [], "responses": { "200": { @@ -316,7 +316,7 @@ "/organisations/create": { "post": { "operationId": "createOrganisation", - "summary": "", + "summary": "Create an Organisation", "parameters": [], "requestBody": { "required": true, @@ -341,7 +341,7 @@ "/projects": { "get": { "operationId": "getProjects", - "summary": "", + "summary": "Retrieve projects", "parameters": [], "responses": { "200": { @@ -356,7 +356,7 @@ "/projects/create": { "post": { "operationId": "createProject", - "summary": "", + "summary": "Create a project", "parameters": [], "requestBody": { "required": true, @@ -381,7 +381,7 @@ "/field-mapping/entities": { "get": { "operationId": "getFieldMappingsEntities", - "summary": "", + "summary": "Retrieve field mapping entities", "parameters": [], "responses": { "200": { @@ -396,7 +396,7 @@ "/field-mapping/attribute": { "get": { "operationId": "getFieldMappings", - "summary": "", + "summary": "Retrieve field mappings", "parameters": [], "responses": { "200": { @@ -411,7 +411,7 @@ "/field-mapping/value": { "get": { "operationId": "getFieldMappingValues", - "summary": "", + "summary": "Retrieve field mappings values", "parameters": [], "responses": { "200": { @@ -426,7 +426,7 @@ "/field-mapping/define": { "post": { "operationId": "defineTargetField", - "summary": "", + "summary": "Define target Field", "parameters": [], "requestBody": { "required": true, @@ -451,7 +451,7 @@ "/field-mapping/map": { "post": { "operationId": "mapField", - "summary": "", + "summary": "Map Custom Field", "parameters": [], "requestBody": { "required": true, @@ -476,7 +476,7 @@ "/field-mapping/properties": { "get": { "operationId": "getCustomProviderProperties", - "summary": "", + "summary": "Retrieve Custom Properties", "parameters": [ { "name": "linkedUserId", @@ -508,7 +508,7 @@ "/events": { "get": { "operationId": "getEvents", - "summary": "", + "summary": "Retrieve Events", "parameters": [], "responses": { "200": { @@ -523,7 +523,7 @@ "/magic-link/create": { "post": { "operationId": "createMagicLink", - "summary": "", + "summary": "Create a Magic Link", "parameters": [], "requestBody": { "required": true, @@ -548,7 +548,7 @@ "/magic-link": { "get": { "operationId": "getMagicLinks", - "summary": "", + "summary": "Retrieve Magic Links", "parameters": [], "responses": { "200": { @@ -563,7 +563,7 @@ "/magic-link/single": { "get": { "operationId": "getMagicLink", - "summary": "", + "summary": "Retrieve a Magic Link", "parameters": [ { "name": "id", @@ -587,7 +587,7 @@ "/passthrough": { "post": { "operationId": "passthroughRequest", - "summary": "", + "summary": "Make a passthrough request", "parameters": [ { "name": "integrationId", @@ -636,7 +636,7 @@ "/crm/contact": { "get": { "operationId": "getContacts", - "summary": "", + "summary": "Retrieve a batch of CRM Contacts", "parameters": [ { "name": "integrationId", @@ -759,7 +759,7 @@ }, "patch": { "operationId": "updateContact", - "summary": "", + "summary": "Update a CRM Contact", "parameters": [ { "name": "id", @@ -783,7 +783,7 @@ "/crm/contact/{id}": { "get": { "operationId": "getContact", - "summary": "Retrive a CRM Contact", + "summary": "Retrieve a CRM Contact", "description": "Retrive a contact in any supported CRM", "parameters": [ { @@ -834,7 +834,7 @@ "/crm/contact/batch": { "post": { "operationId": "addContacts", - "summary": "", + "summary": "Add a batch of CRM Contacts", "parameters": [ { "name": "integrationId",