common-types
Advanced tools
Comparing version 1.6.21 to 1.6.22
@@ -15,3 +15,3 @@ import { IDictionary } from "./basics"; | ||
name: string; | ||
runtime: "nodejs6.10" | "node4" | "java8" | "go"; | ||
runtime: "nodejs6.10" | "node4" | "java8" | "python2.7" | "python3.6" | "go1.x"; | ||
profile?: string; | ||
@@ -23,6 +23,19 @@ stage?: string; | ||
stepFunctions?: { | ||
stateMachines: IStateMachine[]; | ||
stateMachines: IDictionary<IStateMachine>; | ||
}; | ||
functions?: IDictionary<IServerlessFunction>; | ||
} | ||
export declare type ServerlessEvent = IServerlessEventScheduleShortForm | IServerlessEventScheduleLongForm; | ||
export interface IServerlessFunction { | ||
environment?: string; | ||
description?: string; | ||
handler: string; | ||
timeout?: number; | ||
memorySize: number; | ||
package: { | ||
exclude: string[]; | ||
include: string[]; | ||
}; | ||
events?: ServerlessEvent[]; | ||
} | ||
export declare type ServerlessEvent = IServerlessEventScheduleShortForm | IServerlessEventScheduleLongForm | IServerlessEventHttp; | ||
export interface IServerlessEventScheduleShortForm { | ||
@@ -41,2 +54,9 @@ /** in the format of rate(10 minutes) or cron(0 12 * * ? *) */ | ||
} | ||
export interface IServerlessEventHttp { | ||
http: { | ||
method: "get" | "put" | "post" | "delete"; | ||
path: string; | ||
cors?: boolean; | ||
}; | ||
} | ||
/** of the format of arn:aws:lambda:#{AWS::Region}:#{AWS::AccountId}:function:${self:service}-${opt:stage}-FUNCTION */ | ||
@@ -46,16 +66,14 @@ export declare type AwsFunctionArn = string; | ||
export interface IStateMachine { | ||
[stateMachineName: string]: { | ||
/** Schedule or HTTP events which trigger the step function */ | ||
events?: [ServerlessEvent]; | ||
/** optionally override the default role used to execute this step-function */ | ||
role?: string; | ||
/** The definition of the State Machine */ | ||
definition?: { | ||
/** Prose description of what this Step is about */ | ||
Comment?: string; | ||
/** A pointer to one of the defined states in the States block which will be the starting point for execution */ | ||
StartAt: keyof StepFunctionState; | ||
/** The available states to this state machine */ | ||
States: IDictionary<StepFunctionState>; | ||
}; | ||
/** Schedule or HTTP events which trigger the step function */ | ||
events?: [ServerlessEvent]; | ||
/** optionally override the default role used to execute this step-function */ | ||
role?: string; | ||
/** The definition of the State Machine */ | ||
definition?: { | ||
/** Prose description of what this Step is about */ | ||
Comment?: string; | ||
/** A pointer to one of the defined states in the States block which will be the starting point for execution */ | ||
StartAt: string; | ||
/** The available states to this state machine */ | ||
States: IDictionary<StepFunctionState>; | ||
}; | ||
@@ -62,0 +80,0 @@ } |
{ | ||
"name": "common-types", | ||
"version": "1.6.21", | ||
"version": "1.6.22", | ||
"description": "Common types not included in Typescript", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/lifegadget/common-types", |
18552
349