From 081986607bec4511b6291681d3c4471941907e64 Mon Sep 17 00:00:00 2001 From: Colombo Date: Thu, 6 Apr 2023 17:07:23 -0300 Subject: [PATCH 1/7] CHORE: change protospack package to beta --- docsfera.json | 2 +- package-lock.json | 14 +++++++------- package.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docsfera.json b/docsfera.json index cde4eee..395a0d2 100644 --- a/docsfera.json +++ b/docsfera.json @@ -4716,7 +4716,7 @@ } }, "info": { - "title": "Maestro - fix/upload-files", + "title": "Maestro - main", "description": "This is the Maestro API", "version": "1.0.0", "contact": {} diff --git a/package-lock.json b/package-lock.json index 664cad4..f13a526 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "dependencies": { "@aws-sdk/client-secrets-manager": "^3.112.0", "@dadosfera/dadosfera-logs": "^1.0.0-beta.4", - "@dadosfera/protospack-v2": "3.29.1", + "@dadosfera/protospack-v2": "3.31.0-beta.2", "@grpc/grpc-js": "^1.6.7", "@grpc/proto-loader": "^0.6.13", "@nestjs/common": "^8.4.7", @@ -1727,9 +1727,9 @@ } }, "node_modules/@dadosfera/protospack-v2": { - "version": "3.29.1", - "resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.29.1.tgz", - "integrity": "sha512-uVswwXltdG0aX8cYVSFPRcROPWjOlW5bJGFfn5RNodKyHeBiTVDWBB3/YgocKrWV4mYBSbZ11ctBzjSAOkf/0Q==", + "version": "3.31.0-beta.2", + "resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.31.0-beta.2.tgz", + "integrity": "sha512-/nMiiz0eS8hBXVNKlnaxYke+DXc/J6VeJdxogqnmo4j/cDxWMlsRDkmp8b5FPgLTEeLfikaqiNbnHl2dFOiqeQ==", "dependencies": { "@grpc/grpc-js": "^1.6.7", "rxjs": "^7.5.5", @@ -12284,9 +12284,9 @@ } }, "@dadosfera/protospack-v2": { - "version": "3.29.1", - "resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.29.1.tgz", - "integrity": "sha512-uVswwXltdG0aX8cYVSFPRcROPWjOlW5bJGFfn5RNodKyHeBiTVDWBB3/YgocKrWV4mYBSbZ11ctBzjSAOkf/0Q==", + "version": "3.31.0-beta.2", + "resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.31.0-beta.2.tgz", + "integrity": "sha512-/nMiiz0eS8hBXVNKlnaxYke+DXc/J6VeJdxogqnmo4j/cDxWMlsRDkmp8b5FPgLTEeLfikaqiNbnHl2dFOiqeQ==", "requires": { "@grpc/grpc-js": "^1.6.7", "rxjs": "^7.5.5", diff --git a/package.json b/package.json index b2f45ee..2853595 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "dependencies": { "@aws-sdk/client-secrets-manager": "^3.112.0", "@dadosfera/dadosfera-logs": "^1.0.0-beta.4", - "@dadosfera/protospack-v2": "3.29.1", + "@dadosfera/protospack-v2": "3.31.0-beta.2", "@grpc/grpc-js": "^1.6.7", "@grpc/proto-loader": "^0.6.13", "@nestjs/common": "^8.4.7", From 082741405111055511a77364dcaf817facd812bf Mon Sep 17 00:00:00 2001 From: Colombo Date: Mon, 10 Apr 2023 19:36:36 -0300 Subject: [PATCH 2/7] FEAT: add new dto property --- docsfera.external.json | 11 +++++++++-- package-lock.json | 14 +++++++------- package.json | 2 +- src/modules/auth/dtos/login.ts | 3 +++ 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/docsfera.external.json b/docsfera.external.json index d3aa50e..30cf65f 100644 --- a/docsfera.external.json +++ b/docsfera.external.json @@ -1544,7 +1544,7 @@ } }, "info": { - "title": "Maestro - fix/upload-files", + "title": "Maestro - feature/customer-links", "description": "This is the Maestro API", "version": "1.0.0", "contact": {} @@ -1612,6 +1612,12 @@ }, "scheduleLimit": { "type": "string" + }, + "links": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -1619,7 +1625,8 @@ "id", "name", "tier", - "scheduleLimit" + "scheduleLimit", + "links" ] }, "AuthUser": { diff --git a/package-lock.json b/package-lock.json index f13a526..f9bcd83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "dependencies": { "@aws-sdk/client-secrets-manager": "^3.112.0", "@dadosfera/dadosfera-logs": "^1.0.0-beta.4", - "@dadosfera/protospack-v2": "3.31.0-beta.2", + "@dadosfera/protospack-v2": "3.31.0-beta.5", "@grpc/grpc-js": "^1.6.7", "@grpc/proto-loader": "^0.6.13", "@nestjs/common": "^8.4.7", @@ -1727,9 +1727,9 @@ } }, "node_modules/@dadosfera/protospack-v2": { - "version": "3.31.0-beta.2", - "resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.31.0-beta.2.tgz", - "integrity": "sha512-/nMiiz0eS8hBXVNKlnaxYke+DXc/J6VeJdxogqnmo4j/cDxWMlsRDkmp8b5FPgLTEeLfikaqiNbnHl2dFOiqeQ==", + "version": "3.31.0-beta.5", + "resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.31.0-beta.5.tgz", + "integrity": "sha512-GbZT88Q1zmPhCDQmBiCMIkPSQOEb6SHwb5iqii/FE1A9dcItGbZintCrudkkiH/oe+nhbzYAujAb8PLosKnNRA==", "dependencies": { "@grpc/grpc-js": "^1.6.7", "rxjs": "^7.5.5", @@ -12284,9 +12284,9 @@ } }, "@dadosfera/protospack-v2": { - "version": "3.31.0-beta.2", - "resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.31.0-beta.2.tgz", - "integrity": "sha512-/nMiiz0eS8hBXVNKlnaxYke+DXc/J6VeJdxogqnmo4j/cDxWMlsRDkmp8b5FPgLTEeLfikaqiNbnHl2dFOiqeQ==", + "version": "3.31.0-beta.5", + "resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.31.0-beta.5.tgz", + "integrity": "sha512-GbZT88Q1zmPhCDQmBiCMIkPSQOEb6SHwb5iqii/FE1A9dcItGbZintCrudkkiH/oe+nhbzYAujAb8PLosKnNRA==", "requires": { "@grpc/grpc-js": "^1.6.7", "rxjs": "^7.5.5", diff --git a/package.json b/package.json index 2853595..113a17a 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "dependencies": { "@aws-sdk/client-secrets-manager": "^3.112.0", "@dadosfera/dadosfera-logs": "^1.0.0-beta.4", - "@dadosfera/protospack-v2": "3.31.0-beta.2", + "@dadosfera/protospack-v2": "3.31.0-beta.5", "@grpc/grpc-js": "^1.6.7", "@grpc/proto-loader": "^0.6.13", "@nestjs/common": "^8.4.7", diff --git a/src/modules/auth/dtos/login.ts b/src/modules/auth/dtos/login.ts index eae2b64..33a779b 100644 --- a/src/modules/auth/dtos/login.ts +++ b/src/modules/auth/dtos/login.ts @@ -1,3 +1,4 @@ +import { Link } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/entities'; import { AuthSignInRequest, AuthSignInResponse, @@ -74,6 +75,8 @@ export class AuthCustomer { tier: string; @ApiProperty() scheduleLimit: string; + @ApiProperty() + links: Link[]; } export class AuthSignInReq implements AuthSignInRequest { From eb1e248d4b9b776a58da6cd6fd771f6532857ecd Mon Sep 17 00:00:00 2001 From: Colombo Date: Tue, 11 Apr 2023 17:04:40 -0300 Subject: [PATCH 3/7] FEAT: add customer (links) endpoint --- docsfera.json | 70 ++++++++++++++++++- src/app.module.ts | 2 + src/modules/customers/customers.controller.ts | 54 ++++++++++++++ src/modules/customers/customers.module.ts | 16 +++++ src/modules/customers/customers.service.ts | 63 +++++++++++++++++ src/utils/errorCodes.ts | 1 + 6 files changed, 204 insertions(+), 2 deletions(-) create mode 100644 src/modules/customers/customers.controller.ts create mode 100644 src/modules/customers/customers.module.ts create mode 100644 src/modules/customers/customers.service.ts diff --git a/docsfera.json b/docsfera.json index 395a0d2..113884b 100644 --- a/docsfera.json +++ b/docsfera.json @@ -4700,6 +4700,65 @@ ] } }, + "/customers/{id}/links": { + "get": { + "operationId": "CustomersController_getCustomerLinks", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Customers" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + }, + "put": { + "operationId": "CustomersController_setCustomerLinks", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Customers" + ], + "security": [ + { + "access-token": [] + }, + { + "access-token": [] + } + ] + } + }, "/health": { "get": { "operationId": "HealthController_check", @@ -4716,7 +4775,7 @@ } }, "info": { - "title": "Maestro - main", + "title": "Maestro - feature/customer-links", "description": "This is the Maestro API", "version": "1.0.0", "contact": {} @@ -4784,6 +4843,12 @@ }, "scheduleLimit": { "type": "string" + }, + "links": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -4791,7 +4856,8 @@ "id", "name", "tier", - "scheduleLimit" + "scheduleLimit", + "links" ] }, "AuthUser": { diff --git a/src/app.module.ts b/src/app.module.ts index 22ea09a..fa831fd 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -25,6 +25,7 @@ import { ConfigModule } from '@nestjs/config'; import { PipelinesV2Module } from './modules/pipelinesV2/pipelines.module'; import { ProductboardModule } from './modules/productboard/productboard.module'; import { MixpanelModule } from './modules/mixpanel/mixpanel.module'; +import { CustomersModule } from './modules/customers/customers.module'; @Module({ controllers: [], @@ -56,6 +57,7 @@ import { MixpanelModule } from './modules/mixpanel/mixpanel.module'; OauthModule, ProductboardModule, MixpanelModule, + CustomersModule, //Always leave HealthModule last, so it is on the bottom of swagger HealthModule, ], diff --git a/src/modules/customers/customers.controller.ts b/src/modules/customers/customers.controller.ts new file mode 100644 index 0000000..e2b06f7 --- /dev/null +++ b/src/modules/customers/customers.controller.ts @@ -0,0 +1,54 @@ +import { DadosferaLogger } from '@dadosfera/dadosfera-logs'; +import { Link } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/entities'; +import { + Body, + Controller, + Get, + Inject, + Param, + Put, + UseFilters, +} from '@nestjs/common'; +import { ApiTags } from '@nestjs/swagger'; +import { PERMISSIONS_GROUPS } from 'src/authentication/permissions.enum'; +import { + Authenticated, + RequireAllPermissions, +} from 'src/decorators/authentication.decorator'; +import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator'; +import { GrpcToHttpExceptionFilter } from 'src/error/grpc-to-http-exception.filter'; +import { CustomersService } from './customers.service'; + +@ApiInternalOnlyController() +@ApiTags('Customers') +@Controller('customers') +@Authenticated() +@UseFilters(GrpcToHttpExceptionFilter) +export class CustomersController { + logger: DadosferaLogger; + + constructor( + @Inject(DadosferaLogger) + dadosferaLogger: DadosferaLogger, + private customersService: CustomersService, + ) { + this.logger = dadosferaLogger.logger; + } + + @Get(':id/links') + @RequireAllPermissions(PERMISSIONS_GROUPS.USERS.permissions.ADMIN) + getCustomerLinks(@Param() params): Promise { + const { id } = params; + this.logger.info('getCustomerLinks', { id }); + return this.customersService.getLinks(id); + } + + @Put(':id/links') + @RequireAllPermissions(PERMISSIONS_GROUPS.USERS.permissions.ADMIN) + setCustomerLinks(@Body() body, @Param() params) { + const { id } = params; + const { links } = body; + this.logger.info('setCustomerLinks', { id, links }); + return this.customersService.setLinks(id, links); + } +} diff --git a/src/modules/customers/customers.module.ts b/src/modules/customers/customers.module.ts new file mode 100644 index 0000000..56a285f --- /dev/null +++ b/src/modules/customers/customers.module.ts @@ -0,0 +1,16 @@ +import { Module } from '@nestjs/common'; +import { DadosferaLogger } from '@dadosfera/dadosfera-logs'; +import { ClientsModule } from '@nestjs/microservices'; +import { DucClient } from '../duc/client.config'; +import { CustomersController } from './customers.controller'; +import { CustomersService } from './customers.service'; + +const client = new DucClient(); + +@Module({ + imports: [ClientsModule.register([client.providerOptions])], + controllers: [CustomersController], + providers: [CustomersService, DadosferaLogger], + exports: [CustomersService], +}) +export class CustomersModule {} diff --git a/src/modules/customers/customers.service.ts b/src/modules/customers/customers.service.ts new file mode 100644 index 0000000..3b32007 --- /dev/null +++ b/src/modules/customers/customers.service.ts @@ -0,0 +1,63 @@ +import { + OnModuleInit, + Inject, + Injectable, + HttpException, + HttpStatus, +} from '@nestjs/common'; + +import { firstValueFrom, lastValueFrom } from 'rxjs'; +import { Link } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/entities'; +import { DucClient } from '../duc/client.config'; +import { ClientGrpc } from '@nestjs/microservices'; +import { ProtoServices } from '@dadosfera/protospack-v2/dist/lib/Duc'; +import { CustomerUpdateRequest } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/messages'; +import { CustomersProtoService } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/write-service'; +import ErrorCodes from 'src/utils/errorCodes'; + +@Injectable() +export class CustomersService implements OnModuleInit { + private customerService: CustomersProtoService; + + constructor( + @Inject(DucClient.name) private readonly grpcClient: ClientGrpc, + ) {} + + onModuleInit() { + this.customerService = this.grpcClient.getService( + ProtoServices.CustomersProtoService, + ); + } + + async getLinks(customerId: string) { + try { + const result = await lastValueFrom( + this.customerService.CustomerFindOneById({ id: customerId }), + ); + return result.customer?.links || []; + } catch (err) { + if (err.details === ErrorCodes.CUSTOMER.NOT_FOUND) + throw new HttpException(err.details, HttpStatus.NOT_FOUND); + throw err; + } + } + + async setLinks(customerId: string, links: Link[]) { + if (!customerId || !links) { + throw new HttpException(null, HttpStatus.BAD_REQUEST); + } + + try { + return await firstValueFrom( + this.customerService.CustomerUpdate({ + id: customerId, + links, + } as CustomerUpdateRequest), + ); + } catch (err) { + if (err.details === ErrorCodes.CUSTOMER.NOT_FOUND) + throw new HttpException(err.details, HttpStatus.NOT_FOUND); + else throw err; + } + } +} diff --git a/src/utils/errorCodes.ts b/src/utils/errorCodes.ts index 91b83d8..7c5ce09 100644 --- a/src/utils/errorCodes.ts +++ b/src/utils/errorCodes.ts @@ -39,6 +39,7 @@ export const CUSTOMER = { INVALID_ID: 'CUSTOMER.INVALID_ID', NOT_FOUND: 'CUSTOMER.NOT_FOUND', ALREADY_EXISTS: 'CUSTOMER.ALREADY_EXISTS', + BAD_REQUEST: 'CUSTOMER.BAD_REQUEST', }; const TERMS_OF_USE = { UP_TO_DATE: 'TERMS_OF_USE.UP_TO_DATE', From bf5b3484a1854eeada023d8ec9d421bd0a8c0f57 Mon Sep 17 00:00:00 2001 From: Colombo Date: Tue, 11 Apr 2023 20:39:47 -0300 Subject: [PATCH 4/7] FEAT: add controller method interfaces --- docsfera.json | 43 +++++++++++++++++-- src/modules/customers/customers.controller.ts | 15 ++++--- src/modules/customers/dtos/customers.ts | 12 ++++++ 3 files changed, 60 insertions(+), 10 deletions(-) create mode 100644 src/modules/customers/dtos/customers.ts diff --git a/docsfera.json b/docsfera.json index 113884b..054c67e 100644 --- a/docsfera.json +++ b/docsfera.json @@ -4710,10 +4710,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object" - } + "$ref": "#/components/schemas/CustomerLinksResponse" } } } @@ -4734,6 +4731,16 @@ "put": { "operationId": "CustomersController_setCustomerLinks", "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerDto" + } + } + } + }, "responses": { "200": { "description": "", @@ -7455,6 +7462,34 @@ "content", "tags" ] + }, + "CustomerLinksResponse": { + "type": "object", + "properties": { + "links": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "links" + ] + }, + "CustomerDto": { + "type": "object", + "properties": { + "links": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "links" + ] } } } diff --git a/src/modules/customers/customers.controller.ts b/src/modules/customers/customers.controller.ts index e2b06f7..e69d331 100644 --- a/src/modules/customers/customers.controller.ts +++ b/src/modules/customers/customers.controller.ts @@ -1,5 +1,5 @@ import { DadosferaLogger } from '@dadosfera/dadosfera-logs'; -import { Link } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/entities'; +import { IdResponse } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/messages'; import { Body, Controller, @@ -18,6 +18,7 @@ import { import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator'; import { GrpcToHttpExceptionFilter } from 'src/error/grpc-to-http-exception.filter'; import { CustomersService } from './customers.service'; +import { CustomerDto, CustomerLinksResponse } from './dtos/customers'; @ApiInternalOnlyController() @ApiTags('Customers') @@ -37,16 +38,18 @@ export class CustomersController { @Get(':id/links') @RequireAllPermissions(PERMISSIONS_GROUPS.USERS.permissions.ADMIN) - getCustomerLinks(@Param() params): Promise { - const { id } = params; + async getCustomerLinks(@Param('id') id): Promise { this.logger.info('getCustomerLinks', { id }); - return this.customersService.getLinks(id); + const links = await this.customersService.getLinks(id); + return { links }; } @Put(':id/links') @RequireAllPermissions(PERMISSIONS_GROUPS.USERS.permissions.ADMIN) - setCustomerLinks(@Body() body, @Param() params) { - const { id } = params; + setCustomerLinks( + @Body() body: CustomerDto, + @Param('id') id, + ): Promise { const { links } = body; this.logger.info('setCustomerLinks', { id, links }); return this.customersService.setLinks(id, links); diff --git a/src/modules/customers/dtos/customers.ts b/src/modules/customers/dtos/customers.ts new file mode 100644 index 0000000..01337ad --- /dev/null +++ b/src/modules/customers/dtos/customers.ts @@ -0,0 +1,12 @@ +import { Link } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/entities'; +import { ApiProperty } from '@nestjs/swagger'; + +export class CustomerDto { + @ApiProperty() + links: Link[]; +} + +export class CustomerLinksResponse { + @ApiProperty() + links: Link[]; +} From 1b923717378fad29cc8676bbcfe9ec837ba18c07 Mon Sep 17 00:00:00 2001 From: Victor Radael Date: Thu, 13 Apr 2023 14:55:33 -0300 Subject: [PATCH 5/7] Att hubspot connection --- src/modules/oauth/passport-strategies/hubspot-strategy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/oauth/passport-strategies/hubspot-strategy.ts b/src/modules/oauth/passport-strategies/hubspot-strategy.ts index 91c353a..481d6ba 100644 --- a/src/modules/oauth/passport-strategies/hubspot-strategy.ts +++ b/src/modules/oauth/passport-strategies/hubspot-strategy.ts @@ -17,7 +17,7 @@ export class HubspotStrategy extends PassportStrategy(Strategy) { clientSecret: oauthSecrets.hubspot.client_secret, callbackURL: oauthSecrets.hubspot.redirect_uri, scope: - 'automation business-intelligence oauth forms integration-sync sales-email-read crm.lists.read crm.objects.contacts.read crm.schemas.contacts.read crm.objects.companies.read crm.objects.deals.read crm.schemas.companies.read crm.schemas.deals.read crm.objects.owners.read crm.objects.quotes.read crm.schemas.quotes.read crm.objects.line_items.read crm.schemas.line_items.read', + 'ticket automation business-intelligence oauth forms integration-sync sales-email-read crm.lists.read crm.objects.contacts.read crm.schemas.contacts.read crm.objects.companies.read crm.objects.deals.read crm.schemas.companies.read crm.schemas.deals.read crm.objects.owners.read crm.objects.quotes.read crm.schemas.quotes.read crm.objects.line_items.read crm.schemas.line_items.read', passReqToCallback: true, }, (accessToken, refreshToken, tokenInfo, profile, done) => { From 1fd0f79dd5a669dd1f8f305b9deffb0ed681d7cc Mon Sep 17 00:00:00 2001 From: Victor Radael Date: Thu, 13 Apr 2023 15:41:44 -0300 Subject: [PATCH 6/7] Att hubspot connection --- src/modules/oauth/passport-strategies/hubspot-strategy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/oauth/passport-strategies/hubspot-strategy.ts b/src/modules/oauth/passport-strategies/hubspot-strategy.ts index 481d6ba..abcbc96 100644 --- a/src/modules/oauth/passport-strategies/hubspot-strategy.ts +++ b/src/modules/oauth/passport-strategies/hubspot-strategy.ts @@ -17,7 +17,7 @@ export class HubspotStrategy extends PassportStrategy(Strategy) { clientSecret: oauthSecrets.hubspot.client_secret, callbackURL: oauthSecrets.hubspot.redirect_uri, scope: - 'ticket automation business-intelligence oauth forms integration-sync sales-email-read crm.lists.read crm.objects.contacts.read crm.schemas.contacts.read crm.objects.companies.read crm.objects.deals.read crm.schemas.companies.read crm.schemas.deals.read crm.objects.owners.read crm.objects.quotes.read crm.schemas.quotes.read crm.objects.line_items.read crm.schemas.line_items.read', + 'tickets automation business-intelligence oauth forms integration-sync sales-email-read crm.lists.read crm.objects.contacts.read crm.schemas.contacts.read crm.objects.companies.read crm.objects.deals.read crm.schemas.companies.read crm.schemas.deals.read crm.objects.owners.read crm.objects.quotes.read crm.schemas.quotes.read crm.objects.line_items.read crm.schemas.line_items.read', passReqToCallback: true, }, (accessToken, refreshToken, tokenInfo, profile, done) => { From 44df13e820c17f22a551bb06a3a3565cfecc939f Mon Sep 17 00:00:00 2001 From: Victor Radael Date: Fri, 14 Apr 2023 13:13:47 -0300 Subject: [PATCH 7/7] UPDATE: Att protospack-v2 version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 113a17a..3aa3413 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "dependencies": { "@aws-sdk/client-secrets-manager": "^3.112.0", "@dadosfera/dadosfera-logs": "^1.0.0-beta.4", - "@dadosfera/protospack-v2": "3.31.0-beta.5", + "@dadosfera/protospack-v2": "3.31.0", "@grpc/grpc-js": "^1.6.7", "@grpc/proto-loader": "^0.6.13", "@nestjs/common": "^8.4.7",