Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

common-types

Package Overview
Dependencies
Maintainers
1
Versions
308
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

common-types - npm Package Compare versions

Comparing version 1.6.15 to 1.6.16

137

lib/common-types.d.ts

@@ -7,2 +7,3 @@ /**

}
/** Allows the creation of a dictionary structure but specify a set of known keys */
/**

@@ -131,2 +132,138 @@ * A numeric Javascript array

}
/** A typing for the serverless framework's "serverless.yml" file */
export interface IServerlessYml {
service: string;
plugins?: string[];
package?: {
individually?: boolean;
excludeDevDependencies?: boolean;
browser?: boolean;
include?: string[];
exclude?: string[];
};
provider: {
name: string;
runtime: "nodejs6.10" | "node4" | "java8" | "go";
profile?: string;
stage?: string;
region?: string;
iamRoleStatements: any[];
stepFunctions?: {
stateMachines: IStateMachine[];
};
};
}
export declare type ServerlessEvent = IServerlessEventScheduleShortForm | IServerlessEventScheduleLongForm;
export interface IServerlessEventScheduleShortForm {
/** in the format of rate(10 minutes) or cron(0 12 * * ? *) */
schedule: string;
}
export interface IServerlessEventScheduleLongForm {
schedule: {
/** in the format of rate(10 minutes) or cron(0 12 * * ? *) */
rate: string;
enabled?: boolean;
input: IDictionary;
inputPath: string;
};
}
/** of the format of arn:aws:lambda:#{AWS::Region}:#{AWS::AccountId}:function:${self:service}-${opt:stage}-FUNCTION */
export declare type AwsFunctionArn = string;
export declare type StepFunctionBuiltinStates = "States.Timeout" | "States.ALL" | "States.TaskFailed" | "States.Permissions";
export interface IStepFunctionsConfiguration {
/** defined at the root level of the serverless configuration file */
stepFunctions: {
/** A dictionary of */
stateMachines: IStateMachine;
};
}
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: StepFunctionState;
};
};
}
export declare type StepFunctionState = IStepFunctionTask & IStepFunctionChoice & IStepFunctionWait & IStepFunctionParallel & IStepFunctionPass & IStepFunctionSucceed;
export declare type IStepFunctionType = "Task" | "Wait" | "Parallel" | "Choice" | "Succeed" | "Pass";
export interface IStepFunctionBaseState {
[name: string]: {
Type: IStepFunctionType;
};
}
export interface IStepFunctionTask extends IStepFunctionBaseState {
[name: string]: {
Type: "Task";
/** of the format arn:aws:lambda:#{AWS::Region}:#{AWS::AccountId}:function:${self:service}-${opt:stage}-FUNCTION_NAME */
Resource: AwsFunctionArn;
Next?: string;
End?: true;
Retry?: [{
ErrorEquals: string[];
IntervalSeconds: number;
BackoffRate: number;
MaxAttemps: number;
}];
Catch?: [{
ErrorEquals: string[];
Next: string;
}];
};
}
export interface IStepFunctionChoice extends IStepFunctionBaseState {
[name: string]: {
Type: "Choice";
Choices: [{
/** points to the specific area of context which is being evaluated in the choice */
Variable: string;
/** compare the value passed in -- and scoped by "Variable" -- to be numerically equal to a stated number */
NumericEquals?: number;
/** the next state to move to when completed with this one */
Next?: string;
/** the step-function should stop at this step */
End?: boolean;
}];
};
}
export interface IStepFunctionWait extends IStepFunctionBaseState {
[name: string]: {
Type: "Wait";
Seconds: number;
Next: AwsFunctionArn;
};
}
export interface IStepFunctionSucceed extends IStepFunctionBaseState {
[name: string]: {
Type: "Succeed";
};
}
export interface IStepFunctionPass extends IStepFunctionBaseState {
[name: string]: {
Type: "Pass";
Result?: any;
ResultPath?: string;
Next: string;
};
}
export interface IStepFunctionParallel extends IStepFunctionBaseState {
[name: string]: {
Type: "Parallel";
Branches: [{
StartAt: string;
States: StepFunctionState;
}];
Next?: string;
End?: true;
};
}
export interface IPackageJson {

@@ -133,0 +270,0 @@ name: string;

2

package.json
{
"name": "common-types",
"version": "1.6.15",
"version": "1.6.16",
"description": "Common types not included in Typescript",

@@ -5,0 +5,0 @@ "repository": "https://github.com/lifegadget/common-types",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc