FIX: new route for synchronizing connections with platform

This commit is contained in:
Gabriel Rosa
2022-09-11 13:07:21 -03:00
parent 0b14221d5a
commit 69af7ba626
26 changed files with 235 additions and 116 deletions
+15 -2
View File
@@ -14,7 +14,10 @@ import {
UpdateConnectionDto,
} from './dtos/connection';
import { ConnectionClientConfiguration } from './client.config';
import { GetConnectionDetailsResponse } from '@dadosfera/protospack-v2/dist/lib/ConnectionManager/interfaces/messages';
import {
GetConnectionDetailsResponse,
INTERNAL_GetAllConnectionsResponse,
} from '@dadosfera/protospack-v2/dist/lib/ConnectionManager/interfaces/messages';
export class ConnectionClientService implements OnModuleInit {
private connectionServiceRead: ConnectionManager.ReadService.ConnectionManagerReadServices;
@@ -119,7 +122,7 @@ export class ConnectionClientService implements OnModuleInit {
});
}
async getAllConnection({ body, metadata }): Promise<ConnectionsRes> {
async getAllConnections({ body, metadata }): Promise<ConnectionsRes> {
const { search, filters, size, page } = body;
return lastValueFrom(
@@ -150,4 +153,14 @@ export class ConnectionClientService implements OnModuleInit {
);
});
}
async INTERNAL_getAllConnections({
customer_name,
}: {
customer_name: string;
}): Promise<INTERNAL_GetAllConnectionsResponse> {
return lastValueFrom(
this.connectionServiceRead.INTERNAL_GetAllConnections({ customer_name }),
);
}
}