fix: standardize GraphQL schema UUID field types (#13550)
Closes [#1264](https://github.com/twentyhq/core-team-issues/issues/1264)
This commit is contained in:
@@ -2,11 +2,10 @@
|
||||
|
||||
import { Field, InputType } from '@nestjs/graphql';
|
||||
|
||||
import { IsUUID } from 'class-validator';
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
|
||||
@InputType()
|
||||
export class DeleteSsoInput {
|
||||
@Field(() => String)
|
||||
@IsUUID()
|
||||
@Field(() => UUIDScalarType)
|
||||
identityProviderId: string;
|
||||
}
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
|
||||
@ObjectType()
|
||||
export class DeleteSsoOutput {
|
||||
@Field(() => String)
|
||||
@Field(() => UUIDScalarType)
|
||||
identityProviderId: string;
|
||||
}
|
||||
|
||||
@@ -4,12 +4,13 @@ import { Field, InputType } from '@nestjs/graphql';
|
||||
|
||||
import { IsString, IsUUID } from 'class-validator';
|
||||
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
import { SSOConfiguration } from 'src/engine/core-modules/sso/types/SSOConfigurations.type';
|
||||
import { SSOIdentityProviderStatus } from 'src/engine/core-modules/sso/workspace-sso-identity-provider.entity';
|
||||
|
||||
@InputType()
|
||||
export class EditSsoInput {
|
||||
@Field(() => String)
|
||||
@Field(() => UUIDScalarType)
|
||||
@IsUUID()
|
||||
id: string;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
import { SSOConfiguration } from 'src/engine/core-modules/sso/types/SSOConfigurations.type';
|
||||
import {
|
||||
IdentityProviderType,
|
||||
@@ -10,7 +11,7 @@ import {
|
||||
|
||||
@ObjectType()
|
||||
export class EditSsoOutput {
|
||||
@Field(() => String)
|
||||
@Field(() => UUIDScalarType)
|
||||
id: string;
|
||||
|
||||
@Field(() => IdentityProviderType)
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
import { SSOConfiguration } from 'src/engine/core-modules/sso/types/SSOConfigurations.type';
|
||||
import {
|
||||
IdentityProviderType,
|
||||
@@ -13,7 +14,7 @@ class WorkspaceNameAndId {
|
||||
@Field(() => String, { nullable: true })
|
||||
displayName?: string | null;
|
||||
|
||||
@Field(() => String)
|
||||
@Field(() => UUIDScalarType)
|
||||
id: string;
|
||||
}
|
||||
|
||||
@@ -22,7 +23,7 @@ export class FindAvailableSSOIDPOutput {
|
||||
@Field(() => IdentityProviderType)
|
||||
type: SSOConfiguration['type'];
|
||||
|
||||
@Field(() => String)
|
||||
@Field(() => UUIDScalarType)
|
||||
id: string;
|
||||
|
||||
@Field(() => String)
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Field, InputType } from '@nestjs/graphql';
|
||||
|
||||
import { IsOptional, IsString, IsUrl, IsUUID } from 'class-validator';
|
||||
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
import { IsX509Certificate } from 'src/engine/core-modules/sso/dtos/validators/x509.validator';
|
||||
|
||||
@InputType()
|
||||
@@ -31,7 +32,7 @@ export class SetupOIDCSsoInput extends SetupSsoInputCommon {
|
||||
|
||||
@InputType()
|
||||
export class SetupSAMLSsoInput extends SetupSsoInputCommon {
|
||||
@Field(() => String)
|
||||
@Field(() => UUIDScalarType)
|
||||
@IsUUID()
|
||||
id: string;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
import { SSOConfiguration } from 'src/engine/core-modules/sso/types/SSOConfigurations.type';
|
||||
import {
|
||||
IdentityProviderType,
|
||||
@@ -10,7 +11,7 @@ import {
|
||||
|
||||
@ObjectType()
|
||||
export class SetupSsoOutput {
|
||||
@Field(() => String)
|
||||
@Field(() => UUIDScalarType)
|
||||
id: string;
|
||||
|
||||
@Field(() => IdentityProviderType)
|
||||
|
||||
Reference in New Issue
Block a user