Add endpoints to create and delete remote server (#4606)
* Build remote server * Add getters * Migrate to json inputs * Use extendable type * Use regex validation * Remove acronymes --------- Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
import { Field, InputType } from '@nestjs/graphql';
|
||||
|
||||
import { IsOptional } from 'class-validator';
|
||||
import GraphQLJSON from 'graphql-type-json';
|
||||
|
||||
import {
|
||||
ForeignDataWrapperOptions,
|
||||
RemoteServerType,
|
||||
UserMappingOptions,
|
||||
} from 'src/engine/metadata-modules/remote-server/remote-server.entity';
|
||||
|
||||
@InputType()
|
||||
export class CreateRemoteServerInput<T extends RemoteServerType> {
|
||||
@Field(() => String)
|
||||
foreignDataWrapperType: T;
|
||||
|
||||
@IsOptional()
|
||||
@Field(() => GraphQLJSON)
|
||||
foreignDataWrapperOptions: ForeignDataWrapperOptions<T>;
|
||||
|
||||
@IsOptional()
|
||||
@Field(() => GraphQLJSON, { nullable: true })
|
||||
userMappingOptions?: UserMappingOptions;
|
||||
}
|
||||
Reference in New Issue
Block a user