Skip to content

Commit

Permalink
feat: update the schema for serverless v4
Browse files Browse the repository at this point in the history
Using the the commands mentioned in github actions, the new schema for
serverless v4 is generated.

Resolves: serverless#89
  • Loading branch information
RishikeshDarandale committed Jan 8, 2025
1 parent 47fe5fa commit fbc7339
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 25 deletions.
105 changes: 81 additions & 24 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* and run json-schema-to-typescript to regenerate this file.
*/

export type AwsArnString = string;
export type ErrorCode = string;
export type AwsCfFunction =
| AwsCfImport
Expand All @@ -17,6 +16,7 @@ export type AwsCfFunction =
| AwsCfToJsonString;
export type AwsCfInstruction = string | AwsCfFunction;
export type AwsArn = AwsArnString | AwsCfFunction;
export type AwsArnString = string;
export type FunctionName = string;
export type AwsSecretsManagerArnString = string;
export type FilterPatterns = {
Expand Down Expand Up @@ -57,7 +57,9 @@ export type AwsLambdaMemorySize = number;
export type AwsLambdaRole = string | AwsCfSub | AwsCfImport | AwsCfGetAtt;
export type AwsLambdaRuntime =
| "dotnet6"
| "dotnet8"
| "go1.x"
| "java21"
| "java17"
| "java11"
| "java8"
Expand All @@ -66,6 +68,7 @@ export type AwsLambdaRuntime =
| "nodejs16.x"
| "nodejs18.x"
| "nodejs20.x"
| "nodejs22.x"
| "provided"
| "provided.al2"
| "provided.al2023"
Expand All @@ -74,6 +77,8 @@ export type AwsLambdaRuntime =
| "python3.9"
| "python3.10"
| "python3.11"
| "python3.12"
| "python3.13"
| "ruby2.7"
| "ruby3.2";
export type AwsLambdaRuntimeManagement =
Expand Down Expand Up @@ -135,31 +140,55 @@ export type AwsCfArrayInstruction = AwsCfInstruction[] | AwsCfSplit;
export type ServiceName = string;

export interface AWS {
org?: string;
app?: string;
outputs?: {
[k: string]:
| string
| number
| boolean
| unknown[]
| {
[k: string]: unknown;
};
};
configValidationMode?: "error" | "warn" | "off";
console?:
| boolean
| {
[k: string]: unknown;
};
custom?: {
enterprise?: {
collectApiGatewayLogs?: boolean;
collectLambdaLogs?: boolean;
compressLogs?: boolean;
disableAwsSpans?: boolean;
disableFrameworksInstrumentation?: boolean;
disableHttpSpans?: boolean;
logAccessIamRole?: AwsArnString;
logIngestMode?: "push" | "pull";
disableWrapping?: boolean;
};
[k: string]: unknown;
};
dashboard?: {
disableMonitoring?: boolean;
};
deprecationNotificationMode?: "error" | "warn" | "warn:summary";
disabledDeprecations?: "*" | ErrorCode[];
build?:
| string
| {
esbuild?:
| {
external?: string[];
exclude?: string[];
packages?: "external";
buildConcurrency?: number;
bundle?: boolean;
minify?: boolean;
sourcemap?:
| boolean
| {
type?: "inline" | "linked" | "external";
setNodeOptions?: boolean;
[k: string]: unknown;
};
[k: string]: unknown;
}
| boolean;
[k: string]: unknown;
};
frameworkVersion?: string;
functions?: {
/**
Expand Down Expand Up @@ -314,6 +343,7 @@ export interface AWS {
};
};
};
timeoutInMillis?: number;
};
}
| {
Expand Down Expand Up @@ -688,6 +718,7 @@ export interface AWS {
layers?: AwsLambdaLayers;
logRetentionInDays?: AwsLogRetentionInDays;
logDataProtectionPolicy?: AwsLogDataProtectionPolicy;
logs?: AwsLambdaLoggingConfiguration;
maximumEventAge?: number;
maximumRetryAttempts?: number;
memorySize?: AwsLambdaMemorySize;
Expand All @@ -703,6 +734,7 @@ export interface AWS {
reservedConcurrency?: number | AwsCfFunction | AwsCfIf;
role?: AwsLambdaRole;
runtime?: AwsLambdaRuntime;
build?: string;
runtimeManagement?: AwsLambdaRuntimeManagement;
tags?: AwsResourceTags;
timeout?: AwsLambdaTimeout;
Expand Down Expand Up @@ -730,6 +762,7 @@ export interface AWS {
};
};
};
licenseKey?: string;
package?: {
artifact?: string;
exclude?: string[];
Expand All @@ -748,6 +781,25 @@ export interface AWS {
[k: string]: unknown;
};
};
stages?: {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^[a-zA-Z0-9-]+$".
*/
[k: string]: {
observability?:
| boolean
| ("axiom" | "dashboard")
| {
provider: "axiom" | "dashboard";
dataset?: string;
};
resolvers?: {
[k: string]: unknown;
};
[k: string]: unknown;
};
};
plugins?:
| {
localPath?: string;
Expand Down Expand Up @@ -824,6 +876,7 @@ export interface AWS {
};
shouldStartNameWithService?: boolean;
stage?: string;
timeoutInMillis?: number;
usagePlan?:
| {
quota?: {
Expand Down Expand Up @@ -974,8 +1027,10 @@ export interface AWS {
buildArgs?: {
[k: string]: string;
};
buildOptions?: string[];
cacheFrom?: string[];
platform?: string;
provenance?: string;
}
| string;
};
Expand All @@ -987,6 +1042,7 @@ export interface AWS {
logDataProtectionPolicy?: AwsLogDataProtectionPolicy;
logs?: {
frameworkLambda?: boolean;
lambda?: AwsLambdaLoggingConfiguration;
httpApi?:
| boolean
| {
Expand Down Expand Up @@ -1053,6 +1109,7 @@ export interface AWS {
| "me-central-1"
| "me-south-1"
| "sa-east-1";
resolver?: string;
role?: AwsLambdaRole;
rolePermissionsBoundary?: AwsArnString;
rollbackConfiguration?: {
Expand All @@ -1064,6 +1121,7 @@ export interface AWS {
};
runtime?: AwsLambdaRuntime;
runtimeManagement?: AwsLambdaRuntimeManagement;
build?: string;
deploymentMethod?: "changesets" | "direct";
s3?: {
[k: string]: {
Expand Down Expand Up @@ -1342,6 +1400,11 @@ export interface AWS {
websocketsDescription?: string;
};
service: ServiceName;
state?:
| {
resolver: string;
}
| string;
useDotenv?: true;
variablesResolutionMode?: "20210219" | "20210326";
resources?: {
Expand Down Expand Up @@ -1437,18 +1500,6 @@ export interface AWS {
retain?: boolean;
};
};
org?: string;
app?: string;
outputs?: {
[k: string]:
| string
| number
| boolean
| unknown[]
| {
[k: string]: unknown;
};
};
}
export interface AwsCfImport {
"Fn::ImportValue": unknown;
Expand Down Expand Up @@ -1514,6 +1565,12 @@ export interface AwsLogDataProtectionPolicy {
Version: string;
Statement: unknown[];
}
export interface AwsLambdaLoggingConfiguration {
applicationLogLevel?: "DEBUG" | "ERROR" | "FATAL" | "INFO" | "TRACE" | "WARN";
logFormat?: "JSON" | "Text";
logGroup?: string;
systemLogLevel?: "DEBUG" | "INFO" | "WARN";
}
export interface AwsResourceTags {
/**
* This interface was referenced by `AwsResourceTags`'s JSON-Schema definition
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serverless/typescript",
"version": "3.38.0",
"version": "4.4.18",
"description": "Serverless typescript definitions",
"main": "index.d.ts",
"scripts": {
Expand Down

0 comments on commit fbc7339

Please sign in to comment.