mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-25 18:20:04 +00:00
Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a722fc6c86 | ||
|
|
abb46d78da | ||
|
|
04fdc0368a | ||
|
|
50d76622c5 | ||
|
|
238f56cb76 | ||
|
|
e721d6f5f5 | ||
|
|
44df13e820 | ||
|
|
bf5b3484a1 | ||
|
|
eb1e248d4b | ||
|
|
0827414051 | ||
|
|
081986607b |
@@ -1752,7 +1752,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
"title": "Maestro - feat/trigger-catalog-task",
|
"title": "Maestro - feature/customer-links",
|
||||||
"description": "This is the Maestro API",
|
"description": "This is the Maestro API",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"contact": {}
|
"contact": {}
|
||||||
@@ -1812,6 +1812,12 @@
|
|||||||
},
|
},
|
||||||
"scheduleLimit": {
|
"scheduleLimit": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -1819,7 +1825,8 @@
|
|||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"tier",
|
"tier",
|
||||||
"scheduleLimit"
|
"scheduleLimit",
|
||||||
|
"links"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"AuthUser": {
|
"AuthUser": {
|
||||||
|
|||||||
+149
-10
@@ -1412,6 +1412,51 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/users/connector_request": {
|
||||||
|
"post": {
|
||||||
|
"operationId": "UsersController_sendConnectorRequest",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "dadosfera-lang",
|
||||||
|
"in": "header",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"enum": [
|
||||||
|
"pt-br",
|
||||||
|
"en-us"
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/UpdateUserRes"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"201": {
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"Users"
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/roles": {
|
"/roles": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "RolesController_searchRoles",
|
"operationId": "RolesController_searchRoles",
|
||||||
@@ -4923,14 +4968,7 @@
|
|||||||
},
|
},
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"201": {
|
||||||
"description": "",
|
"description": ""
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"type": "object"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -4959,6 +4997,72 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/customers/{id}/links": {
|
||||||
|
"get": {
|
||||||
|
"operationId": "CustomersController_getCustomerLinks",
|
||||||
|
"parameters": [],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/CustomerLinksResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"Customers"
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"operationId": "CustomersController_setCustomerLinks",
|
||||||
|
"parameters": [],
|
||||||
|
"requestBody": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/CustomerDto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"Customers"
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/health": {
|
"/health": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "HealthController_check",
|
"operationId": "HealthController_check",
|
||||||
@@ -4975,7 +5079,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
"title": "Maestro - feat/trigger-catalog-task",
|
"title": "Maestro - main",
|
||||||
"description": "This is the Maestro API",
|
"description": "This is the Maestro API",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"contact": {}
|
"contact": {}
|
||||||
@@ -5030,6 +5134,12 @@
|
|||||||
},
|
},
|
||||||
"scheduleLimit": {
|
"scheduleLimit": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -5037,7 +5147,8 @@
|
|||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"tier",
|
"tier",
|
||||||
"scheduleLimit"
|
"scheduleLimit",
|
||||||
|
"links"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"AuthUser": {
|
"AuthUser": {
|
||||||
@@ -7702,6 +7813,34 @@
|
|||||||
"content",
|
"content",
|
||||||
"tags"
|
"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"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-secrets-manager": "^3.112.0",
|
"@aws-sdk/client-secrets-manager": "^3.112.0",
|
||||||
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
|
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
|
||||||
"@dadosfera/protospack-v2": "3.30.0",
|
"@dadosfera/protospack-v2": "3.31.0",
|
||||||
"@grpc/grpc-js": "^1.6.7",
|
"@grpc/grpc-js": "^1.6.7",
|
||||||
"@grpc/proto-loader": "^0.6.13",
|
"@grpc/proto-loader": "^0.6.13",
|
||||||
"@nestjs/common": "^8.4.7",
|
"@nestjs/common": "^8.4.7",
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import { ConfigModule } from '@nestjs/config';
|
|||||||
import { PipelinesV2Module } from './modules/pipelinesV2/pipelines.module';
|
import { PipelinesV2Module } from './modules/pipelinesV2/pipelines.module';
|
||||||
import { ProductboardModule } from './modules/productboard/productboard.module';
|
import { ProductboardModule } from './modules/productboard/productboard.module';
|
||||||
import { MixpanelModule } from './modules/mixpanel/mixpanel.module';
|
import { MixpanelModule } from './modules/mixpanel/mixpanel.module';
|
||||||
|
import { CustomersModule } from './modules/customers/customers.module';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
controllers: [],
|
controllers: [],
|
||||||
@@ -56,6 +57,7 @@ import { MixpanelModule } from './modules/mixpanel/mixpanel.module';
|
|||||||
OauthModule,
|
OauthModule,
|
||||||
ProductboardModule,
|
ProductboardModule,
|
||||||
MixpanelModule,
|
MixpanelModule,
|
||||||
|
CustomersModule,
|
||||||
//Always leave HealthModule last, so it is on the bottom of swagger
|
//Always leave HealthModule last, so it is on the bottom of swagger
|
||||||
HealthModule,
|
HealthModule,
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { Link } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/entities';
|
||||||
import {
|
import {
|
||||||
AuthSignInRequest,
|
AuthSignInRequest,
|
||||||
AuthSignInResponse,
|
AuthSignInResponse,
|
||||||
@@ -74,6 +75,8 @@ export class AuthCustomer {
|
|||||||
tier: string;
|
tier: string;
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
scheduleLimit: string;
|
scheduleLimit: string;
|
||||||
|
@ApiProperty()
|
||||||
|
links: Link[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export class AuthSignInReq implements AuthSignInRequest {
|
export class AuthSignInReq implements AuthSignInRequest {
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||||
|
import { IdResponse } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/messages';
|
||||||
|
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';
|
||||||
|
import { CustomerDto, CustomerLinksResponse } from './dtos/customers';
|
||||||
|
|
||||||
|
@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)
|
||||||
|
async getCustomerLinks(@Param('id') id): Promise<CustomerLinksResponse> {
|
||||||
|
this.logger.info('getCustomerLinks', { id });
|
||||||
|
const links = await this.customersService.getLinks(id);
|
||||||
|
return { links };
|
||||||
|
}
|
||||||
|
|
||||||
|
@Put(':id/links')
|
||||||
|
@RequireAllPermissions(PERMISSIONS_GROUPS.USERS.permissions.ADMIN)
|
||||||
|
setCustomerLinks(
|
||||||
|
@Body() body: CustomerDto,
|
||||||
|
@Param('id') id,
|
||||||
|
): Promise<IdResponse> {
|
||||||
|
const { links } = body;
|
||||||
|
this.logger.info('setCustomerLinks', { id, links });
|
||||||
|
return this.customersService.setLinks(id, links);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 {}
|
||||||
@@ -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<CustomersProtoService>(
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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[];
|
||||||
|
}
|
||||||
@@ -14,42 +14,44 @@ import { INote } from './dtos';
|
|||||||
export class ProductboardController {
|
export class ProductboardController {
|
||||||
@Post('notes')
|
@Post('notes')
|
||||||
async sendNote(@Body() note: INote, @User() user: RequestUser) {
|
async sendNote(@Body() note: INote, @User() user: RequestUser) {
|
||||||
const { title, content, tags } = note;
|
const [request_type, urgency, connector_name = 'Não informado'] = note.tags;
|
||||||
const { username, customer_name } = user;
|
|
||||||
|
|
||||||
const email = username.includes('@')
|
const { title, content } = note;
|
||||||
? username
|
// const { username, customer_name } = user;
|
||||||
: username + `@${customer_name}.default`;
|
|
||||||
|
|
||||||
const path = process.env.PB_TOKEN_PATH;
|
// const email = username.includes('@')
|
||||||
const token = await getSecretFromSecretsManager(path);
|
// ? username
|
||||||
|
// : username + `@${customer_name}.default`;
|
||||||
|
|
||||||
const response = await axios
|
// const path = process.env.PB_TOKEN_PATH;
|
||||||
.post(
|
// const token = await getSecretFromSecretsManager(path);
|
||||||
`https://api.productboard.com/notes`,
|
|
||||||
{
|
|
||||||
title,
|
|
||||||
content,
|
|
||||||
tags,
|
|
||||||
user: {
|
|
||||||
email,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
headers: {
|
|
||||||
Authorization: 'Bearer ' + token,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.catch(() => null);
|
|
||||||
|
|
||||||
if (!response) {
|
// const response = await axios
|
||||||
throw new HttpException(
|
// .post(
|
||||||
'Your request could not be submitted, please try again in a few moments or contact support.',
|
// `https://api.productboard.com/notes`,
|
||||||
502,
|
// {
|
||||||
);
|
// title,
|
||||||
}
|
// content,
|
||||||
|
// tags,
|
||||||
|
// user: {
|
||||||
|
// email,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// headers: {
|
||||||
|
// Authorization: 'Bearer ' + token,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// )
|
||||||
|
// .catch(() => null);
|
||||||
|
|
||||||
return response.data;
|
// if (!response) {
|
||||||
|
// throw new HttpException(
|
||||||
|
// 'Your request could not be submitted, please try again in a few moments or contact support.',
|
||||||
|
// 502,
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return response.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,4 +263,17 @@ export class UsersController {
|
|||||||
this.logger.info('synchronizeUser', { user });
|
this.logger.info('synchronizeUser', { user });
|
||||||
return await this.userService.synchronizeUser(id);
|
return await this.userService.synchronizeUser(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Post('connector_request')
|
||||||
|
@RequireAllPermissions(PERMISSIONS_GROUPS.DADOSFERA.permissions.SYNC_USER)
|
||||||
|
@ApiOkResponse({ type: UpdateUserRes })
|
||||||
|
async sendConnectorRequest(@User() user: RequestUser, request) {
|
||||||
|
const metadata = PackTheMetadata({
|
||||||
|
customer_name: user.customer_name,
|
||||||
|
customer_id: user.customer_id,
|
||||||
|
user_id: user.user_id,
|
||||||
|
username: user.username,
|
||||||
|
});
|
||||||
|
this.userService.sendUserConnectorRequest(request, metadata);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,4 +243,17 @@ export class UsersService implements OnModuleInit {
|
|||||||
this.usersClientService.INTERNAL_UserSynchronize({ userId }),
|
this.usersClientService.INTERNAL_UserSynchronize({ userId }),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
async sendUserConnectorRequest(
|
||||||
|
request: {
|
||||||
|
connector_name: string;
|
||||||
|
description: string;
|
||||||
|
title: string;
|
||||||
|
urgency: string;
|
||||||
|
},
|
||||||
|
metadata: Metadata,
|
||||||
|
) {
|
||||||
|
return await lastValueFrom(
|
||||||
|
this.usersClientService.UserConnectorRequest({ request }, metadata),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ export const CUSTOMER = {
|
|||||||
INVALID_ID: 'CUSTOMER.INVALID_ID',
|
INVALID_ID: 'CUSTOMER.INVALID_ID',
|
||||||
NOT_FOUND: 'CUSTOMER.NOT_FOUND',
|
NOT_FOUND: 'CUSTOMER.NOT_FOUND',
|
||||||
ALREADY_EXISTS: 'CUSTOMER.ALREADY_EXISTS',
|
ALREADY_EXISTS: 'CUSTOMER.ALREADY_EXISTS',
|
||||||
|
BAD_REQUEST: 'CUSTOMER.BAD_REQUEST',
|
||||||
};
|
};
|
||||||
const TERMS_OF_USE = {
|
const TERMS_OF_USE = {
|
||||||
UP_TO_DATE: 'TERMS_OF_USE.UP_TO_DATE',
|
UP_TO_DATE: 'TERMS_OF_USE.UP_TO_DATE',
|
||||||
|
|||||||
Reference in New Issue
Block a user