Fetch available remote tables (#4665)

* Build remote table module

* Use transactions

* Export url builder in util

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
Thomas Trompette
2024-03-26 15:50:41 +01:00
committed by GitHub
parent fefa37b300
commit 279d99487c
9 changed files with 254 additions and 41 deletions

View File

@ -0,0 +1,26 @@
import { ObjectType, Field, registerEnumType } from '@nestjs/graphql';
import { IsEnum } from 'class-validator';
export enum RemoteTableStatus {
SYNCED = 'SYNCED',
NOT_SYNCED = 'NOT_SYNCED',
}
registerEnumType(RemoteTableStatus, {
name: 'RemoteTableStatus',
description: 'Status of the table',
});
@ObjectType('RemoteTable')
export class RemoteTableDTO {
@Field(() => String)
name: string;
@IsEnum(RemoteTableStatus)
@Field(() => RemoteTableStatus)
status: RemoteTableStatus;
@Field(() => String)
schema: string;
}