Rename types for UserMappingOptions (#5230)
Following #5210 --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -6,7 +6,7 @@ import {
|
||||
RemoteServerEntity,
|
||||
RemoteServerType,
|
||||
} from 'src/engine/metadata-modules/remote-server/remote-server.entity';
|
||||
import { UserMappingOptionsInput } from 'src/engine/metadata-modules/remote-server/utils/user-mapping-options.utils';
|
||||
import { UserMappingOptions } from 'src/engine/metadata-modules/remote-server/utils/user-mapping-options.utils';
|
||||
|
||||
export type DeepPartial<T> = {
|
||||
[P in keyof T]?: DeepPartial<T[P]>;
|
||||
@ -15,7 +15,7 @@ export type DeepPartial<T> = {
|
||||
const buildUserMappingOptionsQuery = (
|
||||
parameters: any[],
|
||||
parametersPositions: object,
|
||||
userMappingOptions: DeepPartial<UserMappingOptionsInput>,
|
||||
userMappingOptions: DeepPartial<UserMappingOptions>,
|
||||
): string | null => {
|
||||
const shouldUpdateUserMappingOptionsPassword = isDefined(
|
||||
userMappingOptions?.password,
|
||||
|
||||
@ -2,8 +2,9 @@ import { InputType, Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { IsOptional } from 'class-validator';
|
||||
|
||||
@ObjectType()
|
||||
@InputType()
|
||||
export class UserMappingOptionsInput {
|
||||
export class UserMappingOptions {
|
||||
@IsOptional()
|
||||
@Field(() => String, { nullable: true })
|
||||
username: string;
|
||||
@ -13,9 +14,13 @@ export class UserMappingOptionsInput {
|
||||
password: string;
|
||||
}
|
||||
|
||||
@ObjectType()
|
||||
export class GetUserMappingOptions {
|
||||
@InputType()
|
||||
export class UserMappingOptionsUpdateInput {
|
||||
@IsOptional()
|
||||
@Field(() => String, { nullable: true })
|
||||
username: string;
|
||||
username?: string;
|
||||
|
||||
@IsOptional()
|
||||
@Field(() => String, { nullable: true })
|
||||
password?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user