closes https://github.com/twentyhq/core-team-issues/issues/242 - unify timeout behavior between local and lambda - add timeout in serverless entity - set timeout default to 300s (5min)
46 lines
828 B
TypeScript
46 lines
828 B
TypeScript
import { Field, InputType } from '@nestjs/graphql';
|
|
|
|
import {
|
|
IsNotEmpty,
|
|
IsNumber,
|
|
IsObject,
|
|
IsOptional,
|
|
IsString,
|
|
IsUUID,
|
|
Max,
|
|
Min,
|
|
} from 'class-validator';
|
|
import graphqlTypeJson from 'graphql-type-json';
|
|
|
|
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
|
|
|
@InputType()
|
|
export class UpdateServerlessFunctionInput {
|
|
@Field(() => UUIDScalarType, {
|
|
description: 'Id of the serverless function to execute',
|
|
})
|
|
@IsNotEmpty()
|
|
@IsUUID()
|
|
id: string;
|
|
|
|
@IsString()
|
|
@Field()
|
|
name: string;
|
|
|
|
@IsString()
|
|
@Field({ nullable: true })
|
|
@IsOptional()
|
|
description?: string;
|
|
|
|
@IsNumber()
|
|
@Field({ nullable: true })
|
|
@Min(1)
|
|
@Max(900)
|
|
@IsOptional()
|
|
timeoutSeconds?: number;
|
|
|
|
@Field(() => graphqlTypeJson)
|
|
@IsObject()
|
|
code: JSON;
|
|
}
|