Skip to content

Commit 69d532b

Browse files
committed
fix(typescript): update for v4
1 parent 47fe5fa commit 69d532b

File tree

2 files changed

+93
-30
lines changed

2 files changed

+93
-30
lines changed

.github/workflows/definitionsBuilder.yml renamed to .github/workflows/update-and-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Definitions Builder
1+
name: Update and Release Serverless Definitions
22
on:
33
workflow_dispatch:
44
repository_dispatch:
@@ -28,7 +28,7 @@ jobs:
2828
name: Set Serverless latest version
2929
run: echo "::set-output name=version::$(npm list serverless | grep serverless@ | sed 's/.*serverless@/v/g' | tr -d '[[:space:]]')"
3030

31-
- name: Generate definitions
31+
- name: Generate TypeScript Definitions
3232
run: npx sls schema
3333

3434
- name: Update package.json version
@@ -37,8 +37,8 @@ jobs:
3737
- name: Commit changes
3838
uses: EndBug/add-and-commit@v5
3939
with:
40-
author_name: Frédéric Barthelet
41-
author_email: [email protected]
40+
author_name: Eslam λ Hefnawy
41+
author_email: [email protected]
4242
branch: master
4343
message: Add Serverless definitions for ${{ steps.serverless-version.outputs.version }}
4444
add: index.d.ts package.json

index.d.ts

Lines changed: 89 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* and run json-schema-to-typescript to regenerate this file.
66
*/
77

8-
export type AwsArnString = string;
98
export type ErrorCode = string;
109
export type AwsCfFunction =
1110
| AwsCfImport
@@ -17,6 +16,7 @@ export type AwsCfFunction =
1716
| AwsCfToJsonString;
1817
export type AwsCfInstruction = string | AwsCfFunction;
1918
export type AwsArn = AwsArnString | AwsCfFunction;
19+
export type AwsArnString = string;
2020
export type FunctionName = string;
2121
export type AwsSecretsManagerArnString = string;
2222
export type FilterPatterns = {
@@ -57,7 +57,9 @@ export type AwsLambdaMemorySize = number;
5757
export type AwsLambdaRole = string | AwsCfSub | AwsCfImport | AwsCfGetAtt;
5858
export type AwsLambdaRuntime =
5959
| "dotnet6"
60+
| "dotnet8"
6061
| "go1.x"
62+
| "java21"
6163
| "java17"
6264
| "java11"
6365
| "java8"
@@ -66,6 +68,7 @@ export type AwsLambdaRuntime =
6668
| "nodejs16.x"
6769
| "nodejs18.x"
6870
| "nodejs20.x"
71+
| "nodejs22.x"
6972
| "provided"
7073
| "provided.al2"
7174
| "provided.al2023"
@@ -74,8 +77,11 @@ export type AwsLambdaRuntime =
7477
| "python3.9"
7578
| "python3.10"
7679
| "python3.11"
80+
| "python3.12"
81+
| "python3.13"
7782
| "ruby2.7"
78-
| "ruby3.2";
83+
| "ruby3.2"
84+
| "ruby3.3";
7985
export type AwsLambdaRuntimeManagement =
8086
| ("auto" | "onFunctionUpdate")
8187
| {
@@ -135,31 +141,55 @@ export type AwsCfArrayInstruction = AwsCfInstruction[] | AwsCfSplit;
135141
export type ServiceName = string;
136142

137143
export interface AWS {
144+
org?: string;
145+
app?: string;
146+
outputs?: {
147+
[k: string]:
148+
| string
149+
| number
150+
| boolean
151+
| unknown[]
152+
| {
153+
[k: string]: unknown;
154+
};
155+
};
138156
configValidationMode?: "error" | "warn" | "off";
139157
console?:
140158
| boolean
141159
| {
142160
[k: string]: unknown;
143161
};
144162
custom?: {
145-
enterprise?: {
146-
collectApiGatewayLogs?: boolean;
147-
collectLambdaLogs?: boolean;
148-
compressLogs?: boolean;
149-
disableAwsSpans?: boolean;
150-
disableFrameworksInstrumentation?: boolean;
151-
disableHttpSpans?: boolean;
152-
logAccessIamRole?: AwsArnString;
153-
logIngestMode?: "push" | "pull";
154-
disableWrapping?: boolean;
155-
};
156163
[k: string]: unknown;
157164
};
158165
dashboard?: {
159166
disableMonitoring?: boolean;
160167
};
161168
deprecationNotificationMode?: "error" | "warn" | "warn:summary";
162169
disabledDeprecations?: "*" | ErrorCode[];
170+
build?:
171+
| string
172+
| {
173+
esbuild?:
174+
| {
175+
external?: string[];
176+
exclude?: string[];
177+
packages?: "external";
178+
buildConcurrency?: number;
179+
bundle?: boolean;
180+
minify?: boolean;
181+
sourcemap?:
182+
| boolean
183+
| {
184+
type?: "inline" | "linked" | "external";
185+
setNodeOptions?: boolean;
186+
[k: string]: unknown;
187+
};
188+
[k: string]: unknown;
189+
}
190+
| boolean;
191+
[k: string]: unknown;
192+
};
163193
frameworkVersion?: string;
164194
functions?: {
165195
/**
@@ -314,6 +344,7 @@ export interface AWS {
314344
};
315345
};
316346
};
347+
timeoutInMillis?: number;
317348
};
318349
}
319350
| {
@@ -688,6 +719,7 @@ export interface AWS {
688719
layers?: AwsLambdaLayers;
689720
logRetentionInDays?: AwsLogRetentionInDays;
690721
logDataProtectionPolicy?: AwsLogDataProtectionPolicy;
722+
logs?: AwsLambdaLoggingConfiguration;
691723
maximumEventAge?: number;
692724
maximumRetryAttempts?: number;
693725
memorySize?: AwsLambdaMemorySize;
@@ -703,6 +735,7 @@ export interface AWS {
703735
reservedConcurrency?: number | AwsCfFunction | AwsCfIf;
704736
role?: AwsLambdaRole;
705737
runtime?: AwsLambdaRuntime;
738+
build?: string;
706739
runtimeManagement?: AwsLambdaRuntimeManagement;
707740
tags?: AwsResourceTags;
708741
timeout?: AwsLambdaTimeout;
@@ -730,6 +763,7 @@ export interface AWS {
730763
};
731764
};
732765
};
766+
licenseKey?: string;
733767
package?: {
734768
artifact?: string;
735769
exclude?: string[];
@@ -748,6 +782,25 @@ export interface AWS {
748782
[k: string]: unknown;
749783
};
750784
};
785+
stages?: {
786+
/**
787+
* This interface was referenced by `undefined`'s JSON-Schema definition
788+
* via the `patternProperty` "^[a-zA-Z0-9-]+$".
789+
*/
790+
[k: string]: {
791+
observability?:
792+
| boolean
793+
| ("axiom" | "dashboard")
794+
| {
795+
provider: "axiom" | "dashboard";
796+
dataset?: string;
797+
};
798+
resolvers?: {
799+
[k: string]: unknown;
800+
};
801+
[k: string]: unknown;
802+
};
803+
};
751804
plugins?:
752805
| {
753806
localPath?: string;
@@ -824,6 +877,7 @@ export interface AWS {
824877
};
825878
shouldStartNameWithService?: boolean;
826879
stage?: string;
880+
timeoutInMillis?: number;
827881
usagePlan?:
828882
| {
829883
quota?: {
@@ -974,8 +1028,10 @@ export interface AWS {
9741028
buildArgs?: {
9751029
[k: string]: string;
9761030
};
1031+
buildOptions?: string[];
9771032
cacheFrom?: string[];
9781033
platform?: string;
1034+
provenance?: string;
9791035
}
9801036
| string;
9811037
};
@@ -987,6 +1043,7 @@ export interface AWS {
9871043
logDataProtectionPolicy?: AwsLogDataProtectionPolicy;
9881044
logs?: {
9891045
frameworkLambda?: boolean;
1046+
lambda?: AwsLambdaLoggingConfiguration;
9901047
httpApi?:
9911048
| boolean
9921049
| {
@@ -1038,7 +1095,10 @@ export interface AWS {
10381095
| "ap-southeast-2"
10391096
| "ap-southeast-3"
10401097
| "ap-southeast-4"
1098+
| "ap-southeast-5"
1099+
| "ap-southeast-7"
10411100
| "ca-central-1"
1101+
| "ca-west-1"
10421102
| "cn-north-1"
10431103
| "cn-northwest-1"
10441104
| "eu-central-1"
@@ -1052,7 +1112,9 @@ export interface AWS {
10521112
| "il-central-1"
10531113
| "me-central-1"
10541114
| "me-south-1"
1055-
| "sa-east-1";
1115+
| "sa-east-1"
1116+
| "mx-central-1";
1117+
resolver?: string;
10561118
role?: AwsLambdaRole;
10571119
rolePermissionsBoundary?: AwsArnString;
10581120
rollbackConfiguration?: {
@@ -1064,7 +1126,9 @@ export interface AWS {
10641126
};
10651127
runtime?: AwsLambdaRuntime;
10661128
runtimeManagement?: AwsLambdaRuntimeManagement;
1129+
build?: string;
10671130
deploymentMethod?: "changesets" | "direct";
1131+
enableLegacyDeploymentBucket?: boolean;
10681132
s3?: {
10691133
[k: string]: {
10701134
accelerateConfiguration?: {
@@ -1342,6 +1406,11 @@ export interface AWS {
13421406
websocketsDescription?: string;
13431407
};
13441408
service: ServiceName;
1409+
state?:
1410+
| {
1411+
resolver: string;
1412+
}
1413+
| string;
13451414
useDotenv?: true;
13461415
variablesResolutionMode?: "20210219" | "20210326";
13471416
resources?: {
@@ -1437,18 +1506,6 @@ export interface AWS {
14371506
retain?: boolean;
14381507
};
14391508
};
1440-
org?: string;
1441-
app?: string;
1442-
outputs?: {
1443-
[k: string]:
1444-
| string
1445-
| number
1446-
| boolean
1447-
| unknown[]
1448-
| {
1449-
[k: string]: unknown;
1450-
};
1451-
};
14521509
}
14531510
export interface AwsCfImport {
14541511
"Fn::ImportValue": unknown;
@@ -1514,6 +1571,12 @@ export interface AwsLogDataProtectionPolicy {
15141571
Version: string;
15151572
Statement: unknown[];
15161573
}
1574+
export interface AwsLambdaLoggingConfiguration {
1575+
applicationLogLevel?: "DEBUG" | "ERROR" | "FATAL" | "INFO" | "TRACE" | "WARN";
1576+
logFormat?: "JSON" | "Text";
1577+
logGroup?: string;
1578+
systemLogLevel?: "DEBUG" | "INFO" | "WARN";
1579+
}
15171580
export interface AwsResourceTags {
15181581
/**
15191582
* This interface was referenced by `AwsResourceTags`'s JSON-Schema definition

0 commit comments

Comments
 (0)