A repeated Instance.
+ *
+ * InstanceForm is an utility class for repeated {@link Instance}. It is designed for shrinking
+ * volume of network message I/O by storing {@link count repeated count}.
+ *
+ * @author Jeongho Nam
+ */
+ class InstanceForm extends samchon.protocol.Entity {
+ /**
+ * A duplicated Instance.
+ */
+ private instance;
+ /**
+ * Repeated count of the {@link instance}.
+ */
+ private count;
+ /**
+ * Default Constructor.
+ */
+ constructor(instance?: Instance, count?: number);
+ /**
+ * @inheritdoc
+ */
+ construct(xml: samchon.library.XML): void;
+ private createInstance(xml);
+ key(): any;
+ getInstance(): Instance;
+ getCount(): number;
+ setCount(val: number): void;
+ $name: string;
+ $width: string;
+ $height: string;
+ $length: string;
+ $count: string;
+ /**
+ * @inheritdoc
+ */
+ TAG(): string;
+ /**
+ * @inheritdoc
+ */
+ toXML(): samchon.library.XML;
+ /**
+ * Repeated {@link instance} to {@link InstanceArray}.
+ *
+ * @details
+ *
Contains the {@link instance repeated instance} to an {@link InstanceArray} to make
+ * {@link instance} to participate in the packing process. The returned {@link InstanceArray} will be
+ * registered on {@link Packer.instanceArray}.
+ *
+ * @return An array of instance containing repeated {@link instance}.
+ */
+ toInstanceArray(): InstanceArray;
+ }
+}
+declare namespace bws.packer {
+ class WrapperArray extends samchon.protocol.EntityArrayCollection {
+ /**
+ * Default Constructor.
+ */
+ constructor();
+ /**
+ * @inheritdoc
+ */
+ createChild(xml: samchon.library.XML): Wrapper;
+ /**
+ * Get (calculate) price.
+ */
+ getPrice(): number;
+ /**
+ * Get (calculate) utilization rate.
+ */
+ getUtilization(): number;
+ /**
+ * @inheritdoc
+ */
+ TAG(): string;
+ /**
+ * @inheritdoc
+ */
+ CHILD_TAG(): string;
+ }
+}
+declare namespace bws.packer {
+ class GAWrapperArray extends WrapperArray {
+ protected instanceArray: InstanceArray;
+ protected result: std.HashMap;
+ private price;
+ /**
+ * @brief Validity of this sequence list.
+ */
+ private valid;
+ /**
+ * Construct from instances.
+ *
+ * @param instanceArray Instances to be wrapped.
+ */
+ constructor(instanceArray: InstanceArray);
+ /**
+ * @brief Copy Constructor.
+ */
+ constructor(genes: GAWrapperArray);
+ private constructResult();
+ /**
+ * @brief Get optimization result.
+ *
+ * @return result map.
+ */
+ getResult(): std.HashMap;
+ less(obj: GAWrapperArray): boolean;
+ }
+}
+declare namespace bws.packer {
+ /**
+ * An interface of physical 3D-instances.
+ *
+ * @author Jeongho Nam
+ */
+ interface Instance extends samchon.protocol.IEntity {
+ /**
+ * Get name.
+ */
+ getName(): string;
+ /**
+ * Get width, length on the X-axis in 3D.
+ */
+ getWidth(): number;
+ /**
+ * Get height, length on the Y-axis in 3D.
+ */
+ getHeight(): number;
+ /**
+ * Get length, length on the Z-axis in 3D.
+ */
+ getLength(): number;
+ /**
+ * Get (calculate) volume.
+ *
+ * @return width x height x length
+ */
+ getVolume(): number;
+ /**
+ * Set name.
+ */
+ setName(val: string): void;
+ /**
+ * Set width, length on the X-axis in 3D.
+ */
+ setWidth(val: number): void;
+ /**
+ * Set height, length on the Y-axis in 3D.
+ */
+ setHeight(val: number): void;
+ /**
+ * Set length, length on the Z-axis in 3D.
+ */
+ setLength(val: number): void;
+ /**
+ * A type, identifier of derived class.
+ *
+ * Derived types
+ *
+ * - {@link Product product}
+ * - {@link Wrapper wrapper}
+ *
+ */
+ TYPE(): string;
+ }
+}
+declare namespace bws.packer {
+ /**
+ * An array of Instance objects.
+ *
+ * @author Jeongho Nam
+ */
+ class InstanceArray extends samchon.protocol.EntityArray {
+ /**
+ * Default Constructor.
+ */
+ constructor();
+ /**
+ * @inheritdoc
+ */
+ createChild(xml: samchon.library.XML): Instance;
+ /**
+ * @inheritdoc
+ */
+ TAG(): string;
+ /**
+ * @inheritdoc
+ */
+ CHILD_TAG(): string;
+ }
+}
+declare namespace bws.packer {
+ /**
+ * A product.
+ *
+ * @author Jeongho Nam
+ */
+ class Product extends samchon.protocol.Entity implements Instance {
+ /**
+ * Name, key of the Product.
+ *
+ * The name must be unique because a name identifies a {@link Product}.
+ */
+ protected name: string;
+ /**
+ * Width of the Product, length on the X-axis in 3D.
+ */
+ protected width: number;
+ /**
+ * Height of the Product, length on the Y-axis in 3D.
+ */
+ protected height: number;
+ /**
+ * Length of the Product, length on the Z-axis in 3D.
+ */
+ protected length: number;
+ /**
+ * Default Constructor.
+ */
+ constructor();
+ /**
+ * Construct from members.
+ *
+ * @param name Name, identifier of the Product.
+ * @param width Width, length on the X-axis in 3D.
+ * @param height Height, length on the Y-axis in 3D.
+ * @param length Length, length on the Z-axis in 3D.
+ */
+ constructor(name: string, width: number, height: number, length: number);
+ /**
+ * Key of a Product is its name.
+ */
+ key(): any;
+ /**
+ * @inheritdoc
+ */
+ getName(): string;
+ /**
+ * @inheritdoc
+ */
+ getWidth(): number;
+ /**
+ * @inheritdoc
+ */
+ getHeight(): number;
+ /**
+ * @inheritdoc
+ */
+ getLength(): number;
+ /**
+ * @inheritdoc
+ */
+ getVolume(): number;
+ /**
+ * @inheritdoc
+ */
+ setName(val: string): void;
+ /**
+ * @inheritdoc
+ */
+ setWidth(val: number): void;
+ /**
+ * @inheritdoc
+ */
+ setHeight(val: number): void;
+ /**
+ * @inheritdoc
+ */
+ setLength(val: number): void;
+ /**
+ * @inheritdoc
+ */
+ TYPE(): string;
+ /**
+ * @inheritdoc
+ */
+ TAG(): string;
+ /**
+ * @inheritdoc
+ */
+ toXML(): samchon.library.XML;
+ }
+}
+declare namespace bws.packer {
+ /**
+ * Wrap represents an act wrap(ping).
+ *
+ * {@link Wrap} is a class represents an act wrapping an {@link Instance} to an {@link Wrapper}.
+ * To represent the relationship, Wrap uses Bridge and Capsular patterns to links and intermediates
+ * relationship between Wrapper and Instance.
+ *
+ * Wrap also helps packing optimization and 3d-visualization with its own members
+ * {@link orientation} and position variables {@link x}, {@link y} and {@link z}.
+ *
+ * @author Jeongho Nam
+ */
+ class Wrap extends samchon.protocol.Entity {
+ /**
+ * A wrapper wrapping the {@link instance}.
+ */
+ protected wrapper: Wrapper;
+ /**
+ * An instance wrapped into the {@link wrapper}.
+ */
+ protected instance: Instance;
+ /**
+ * Coordinate-X of the instance placement in the wrapper.
+ */
+ protected x: number;
+ /**
+ * Coordinate-Y of the instance placement in the wrapper.
+ */
+ protected y: number;
+ /**
+ * Coordinate-Z of the instance placement in the wrapper.
+ */
+ protected z: number;
+ /**
+ * Placement orientation of wrapped {@link instance}.
+ */
+ protected orientation: number;
+ /**
+ *
+ */
+ protected color: number;
+ /**
+ * Construct from a Wrapper.
+ *
+ * @param wrapper A wrapper who will contain an instance.
+ */
+ constructor(wrapper: Wrapper);
+ /**
+ * Construct from a Wrapper and Instance with its position and default orientation 1.
+ *
+ * @param wrapper A wrapper who contains the instance.
+ * @param instance An instance contained into the wrapper.
+ * @param x Coordinate-X of the {@link instance} placement in the {@link wrapper}.
+ * @param y Coordinate-Y of the {@link instance} placement in the {@link wrapper}.
+ * @param z Coordinate-Z of the {@link instance} placement in the {@link wrapper}.
+ */
+ constructor(wrapper: Wrapper, instance: Instance, x: number, y: number, z: number);
+ /**
+ * Construct from a Wrapper and Instance with its position and orientation.
+ *
+ * @param wrapper A wrapper who contains the instance.
+ * @param instance An instance contained into the wrapper.
+ * @param x Coordinate-X of the {@link instance} placement in the {@link wrapper}.
+ * @param y Coordinate-Y of the {@link instance} placement in the {@link wrapper}.
+ * @param z Coordinate-Z of the {@link instance} placement in the {@link wrapper}.
+ * @param orientation Placement orientation of wrapped {@link instance}.
+ */
+ constructor(wrapper: Wrapper, instance: Instance, x: number, y: number, z: number, orientation: number);
+ /**
+ * @inheritdoc
+ */
+ construct(xml: samchon.library.XML): void;
+ /**
+ * Factory method of wrapped Instance.
+ *
+ * @param type Type of contained Instance's type.
+ */
+ protected createInstance(type: string): Instance;
+ /**
+ * Set orientation.
+ *
+ * @param orientation Orientation code (1 to 6).
+ */
+ setOrientation(orientation: number): void;
+ /**
+ * Set position.
+ *
+ * @param x Coordinate-X of the instance placement in the wrapper.
+ * @param y Coordinate-Y of the instance placement in the wrapper.
+ * @param z Coordinate-Z of the instance placement in the wrapper.
+ */
+ setPosition(x: number, y: number, z: number): void;
+ /**
+ * @brief Estimate orientation by given size.
+ *
+ * @param width Width by placement.
+ * @param height Height by placement.
+ * @param length Length by placement.
+ */
+ estimateOrientation(width: number, height: number, length: number): void;
+ /**
+ * @brief Orientation change is occured in level of the packer.
+ *
+ * @details orientation Packer's new orientation.
+ */
+ changeWrapperOrientation(orientation: number): void;
+ /**
+ * Get wrapper.
+ */
+ getWrapper(): Wrapper;
+ /**
+ * Get instance.
+ */
+ getInstance(): Instance;
+ /**
+ * Get x.
+ */
+ getX(): number;
+ /**
+ * Get y.
+ */
+ getY(): number;
+ /**
+ * Get z.
+ */
+ getZ(): number;
+ /**
+ * Get orientation.
+ */
+ getOrientation(): number;
+ /**
+ * Get width.
+ */
+ getWidth(): number;
+ /**
+ * Get height.
+ */
+ getHeight(): number;
+ /**
+ * Get length.
+ */
+ getLength(): number;
+ /**
+ * Get volume.
+ */
+ getVolume(): number;
+ $instanceName: string;
+ $layoutScale: string;
+ $position: string;
+ /**
+ * @inheritdoc
+ */
+ TAG(): string;
+ /**
+ * @inheritdoc
+ */
+ toXML(): samchon.library.XML;
+ /**
+ * Thickness of boundary lines of a shape represents the {@link instance}.
+ */
+ private static BOUNDARY_THICKNESS;
+ /**
+ *
+ *
+ * @param geometry
+ *
+ * @return A shape and its boundary lines as 3D-objects.
+ */
+ toDisplayObjects(geometry: THREE.Geometry): std.Vector;
+ }
+}
+declare namespace bws.packer {
+ /**
+ * A wrapper wrapping instances.
+ *
+ * @author Jeongho Nam
+ */
+ class Wrapper extends samchon.protocol.EntityDeque implements Instance {
+ /**
+ * Name, key of the Wrapper.
+ *
+ * The name represents a type of Wrapper and identifies the Wrapper.
+ */
+ protected name: string;
+ /**
+ * Price, cost of using an Wrapper.
+ */
+ protected price: number;
+ /**
+ * Width of the Wrapper, length on the X-axis in 3D.
+ */
+ protected width: number;
+ /**
+ * Height of the Wrapper, length on the Y-axis in 3D.
+ */
+ protected height: number;
+ /**
+ * Length of the Wrapper, length on the Z-axis in 3D.
+ */
+ protected length: number;
+ /**
+ * Thickness, margin of a Wrapper causes shrinkness of containable volume.
+ *
+ * The thickness reduces each dimension's containable size (dimension - 2*thickness),
+ * so finally, it reduces total containable volume (-8 * thickness^3).
+ */
+ protected thickness: number;
+ /**
+ * Default Constructor.
+ */
+ constructor();
+ /**
+ * Copy Constructor.
+ */
+ constructor(wrapper: Wrapper);
+ /**
+ * Construct from members.
+ *
+ * @param name Name, identifier of a Wrapper.
+ * @param price Price, issued cost for a type of the Wrapper.
+ * @param width Width, dimensional length on the X-axis in 3D.
+ * @param height Height, dimensional length on the Y-axis in 3D.
+ * @param length Length, dimensional length on the Z-axis in 3D.
+ * @param thickness A thickness causes shrinkness on containable volume.
+ */
+ constructor(name: string, price: number, width: number, height: number, length: number, thickness: number);
+ construct(xml: samchon.library.XML): void;
+ /**
+ * @inheritdoc
+ */
+ createChild(xml: samchon.library.XML): Wrap;
+ /**
+ * Key of a Wrapper is its name.
+ */
+ key(): any;
+ /**
+ * Get name.
+ */
+ getName(): string;
+ /**
+ * Get price.
+ */
+ getPrice(): number;
+ /**
+ * Get width, length on X-axis in 3D.
+ */
+ getWidth(): number;
+ /**
+ * Get height, length on Y-axis in 3D.
+ */
+ getHeight(): number;
+ /**
+ * Get length, length on Z-axis in 3D.
+ */
+ getLength(): number;
+ /**
+ * Get thickness.
+ */
+ getThickness(): number;
+ /**
+ * Get (calculate) containable width, length on the X-axis in 3D.
+ *
+ * Calculates containable width considering the {@link thickness}.
+ *
+ * @return width - (2 x thickness)
+ */
+ getContainableWidth(): number;
+ /**
+ * Get (calculate) containable height, length on the Y-axis in 3D.
+ *
+ * Calculates containable height considering the {@link thickness}.
+ *
+ * @return height - (2 x thickness)
+ */
+ getContainableHeight(): number;
+ /**
+ * Get (calculate) containable length, length on the Z-axis in 3D.
+ *
+ * Calculates containable length considering the {@link thickness}.
+ *
+ * @return length - (2 x thickness)
+ */
+ getContainableLength(): number;
+ /**
+ * Get (calculate) volume.
+ *
+ * Notice
+ * If {@link thickness} of the Wrapper is not 0, the volume does not mean containable volume.
+ * In that case, use {@link containableVolume} instead.
+ *
+ * @return width x height x length
+ */
+ getVolume(): number;
+ /**
+ * Get (calculate) containable volume.
+ *
+ * Calculates containable volume considering the {@link thickness}.
+ *
+ * @return volume - {(2 x thickness) ^ 3}
+ */
+ getContainableVolume(): number;
+ /**
+ * Get utilization ratio of containable volume.
+ *
+ * @return utilization ratio.
+ */
+ getUtilization(): number;
+ equal_to(obj: Wrapper): boolean;
+ /**
+ * Wrapper is enough greater?
+ *
+ * Test whether the Wrapper is enough greater than an Instance to contain.
+ *
+ * @param instance An Instance to test.
+ * @return Enough greater or not.
+ */
+ containable(instance: Instance): boolean;
+ /**
+ * @inheritdoc
+ */
+ setName(val: string): void;
+ /**
+ * Set price.
+ */
+ setPrice(val: number): void;
+ /**
+ * @inheritdoc
+ */
+ setWidth(val: number): void;
+ /**
+ * @inheritdoc
+ */
+ setHeight(val: number): void;
+ /**
+ * @inheritdoc
+ */
+ setLength(val: number): void;
+ /**
+ * Set thickness.
+ */
+ setThickness(val: number): void;
+ $name: string;
+ $price: string;
+ $width: string;
+ $height: string;
+ $length: string;
+ $thickness: string;
+ $scale: string;
+ $spaceUtilization: string;
+ /**
+ * @inheritdoc
+ */
+ TYPE(): string;
+ /**
+ * @inheritdoc
+ */
+ TAG(): string;
+ /**
+ * @inheritdoc
+ */
+ CHILD_TAG(): string;
+ /**
+ * @inheritdoc
+ */
+ toXML(): samchon.library.XML;
+ private static scene;
+ private static renderer;
+ private static camera;
+ private static trackball;
+ private static mouse;
+ private static BOUNDARY_THICKNESS;
+ /**
+ * Convert to a canvas containing 3D elements.
+ *
+ * @param endIndex
+ *
+ * @return A 3D-canvans printing the Wrapper and its children {@link Wrap wrapped}
+ * {@link Instance instances} with those boundary lines.
+ */
+ toCanvas(endIndex?: number): HTMLCanvasElement;
+ private static handleMouseMove(event);
+ private static animate();
+ private static render();
+ }
+}
+declare namespace bws.packer {
+ /**
+ * A group of {@link Wrapper Wrappers} with same type.
+ *
+ * @author Jeongho Nam
+ */
+ class WrapperGroup extends WrapperArray {
+ /**
+ * A sample, standard of the WrapperGroup.
+ *
+ * The sample represents what type of Wrappers are grouped into the WrapperGroup.
+ */
+ protected sample: Wrapper;
+ /**
+ * Allocated instances.
+ */
+ protected allocatedInstanceArray: InstanceArray;
+ /**
+ * Default Constructor.
+ */
+ constructor();
+ /**
+ * Copy Constructor.
+ */
+ constructor(wrapperGroup: WrapperGroup);
+ /**
+ * Construct from a sample.
+ *
+ * @param sample A sample, standard of the WrapperGroup.
+ */
+ constructor(sample: Wrapper);
+ /**
+ * Construct from members of the {@link sample}.
+ *
+ * @param name Name, identifier of the sample.
+ * @param price Price, issued cost for a type of the sample.
+ * @param width Width, dimensional length on the X-axis in 3D, of the sample.
+ * @param height Height, dimensional length on the Y-axis in 3D, of the sample.
+ * @param length Length, dimensional length on the Z-axis in 3D, of the sample.
+ * @param thickness A thickness, causes shrinkness on containable volume, of the sample.
+ */
+ constructor(name: string, price: number, width: number, height: number, length: number, thickness: number);
+ /**
+ * Key of a WrapperGroup is dependent on its sample.
+ */
+ key(): any;
+ /**
+ * Get sample.
+ */
+ getSample(): Wrapper;
+ /**
+ * Get allocated instances.
+ */
+ getAllocatedInstanceArray(): InstanceArray;
+ /**
+ * Get (calculate) price.
+ *
+ * @return (Price of the sample) x (numbers of children Wrappers)
+ */
+ getPrice(): number;
+ /**
+ * @inheritdoc
+ */
+ getUtilization(): number;
+ /**
+ * Allocate instance(s) to the WrapperGroup.
+ *
+ * Inspect the instance is enough small to be wrapped into an empty wrapper. If the instance
+ * is enough small, registers the instance (or repeated instances) to the {@link reserveds} and
+ * returns true. If the instance is too large to be capsuled, returns false.
+ *
+ * Note
+ * The word the instance is enough small to be wrapped into the empty wrapper means
+ * the instance can be contained into an empty, a new wrapper contaning nothing literally.
+ *
+ * In the method allocate(), it doesn't consider how many instances are wrapped into ordinary
+ * wrapper and how much volumes are consumed.
+ *
+ * @param instance An Instance to allocate.
+ * @param n Repeating number of the instance.
+ *
+ * @return Whether the instance is enough small to be wrapped into a (new) wrapper
+ * of same type with the sample.
+ */
+ allocate(instance: Instance, n?: number): boolean;
+ /**
+ * Run optimization in level of the group.
+ *
+ * The optimization routine begins by creating a {@link Wrapper} like the {@link sample}. Then
+ * try to pack {@link allocatedInstanceArray allocated instances} to the {@link Wrapper} as a lot as
+ * possible. If there're some {@link Wrappers} can't be packed by overloading, then create a new
+ * {@link Wrapper} again and try to pack {@link allocatedInstanceArray instances} again, too.
+ *
+ * Repeats those steps until all {@link alloctedInstanceArray instances} are {@link Wrap packed}
+ * so that there's not any {@link Instance instance} left.
+ *
+ * Warning
+ * When call this {@link optimize optimize()} method, ordinary children {@link Wrapper} objects
+ * in the {@link WrapperGroup} will be substituted with the newly optimized {@link Wrapper} objects.
+ */
+ optimize(): void;
+ /**
+ * Wrap allocated instances into a new {@link Wrapper}.
+ *
+ * {@link Wrap Wraps} instances to a new Wrapper which is copied from the sample.
+ * After the wrapping is done, the new {@link Wrapper} is registered to the {@link WrapperGroup}
+ * as a child and instances failed to wrap by overloading is returned.
+ *
+ * @param instanceArray instances to {@link Wrap wrap} into a new {@link Wrapper}.
+ *
+ * @return Instances failed to {@link Wrap wrap} by overloading.
+ * @see boxologic
+ */
+ private pack(instanceArray);
+ /**
+ * @inheritdoc
+ */
+ TAG(): string;
+ }
+}
+declare namespace bws.packer {
+ abstract class Editor extends React.Component<{
+ dataProvider: samchon.protocol.EntityArrayCollection;
+ }, {}> {
+ private columns;
+ private selected_index;
+ /**
+ * Default Constructor.
+ */
+ constructor();
+ protected abstract createColumns(): AdazzleReactDataGrid.Column[];
+ private get_row(index);
+ private insert_instance(event);
+ private erase_instances(event);
+ private handle_data_change(event);
+ private handle_row_change(event);
+ private handle_select(event);
+ render(): JSX.Element;
+ }
+}
+declare namespace bws.packer {
+ interface ItemEditorProps extends React.Props {
+ application: PackerApplication;
+ instances: InstanceFormArray;
+ wrappers: WrapperArray;
+ }
+ class ItemEditor extends React.Component {
+ private clear(event);
+ private open(event);
+ private save(event);
+ private pack(event);
+ render(): JSX.Element;
+ }
+ class InstanceEditor extends Editor {
+ protected createColumns(): AdazzleReactDataGrid.Column[];
+ }
+ class WrapperEditor extends Editor {
+ protected createColumns(): AdazzleReactDataGrid.Column[];
+ }
+}
+declare namespace bws.packer {
+ class PackerApplication extends React.Component<{}, {}> {
+ private instances;
+ private wrappers;
+ private result;
+ /**
+ * Default Constructor.
+ */
+ constructor();
+ pack(): void;
+ drawWrapper(wrapper: Wrapper, index?: number): void;
+ render(): JSX.Element;
+ static main(): void;
+ }
+}
+declare namespace bws.packer {
+ class ResultViewer extends React.Component {
+ drawWrapper(wrapper: Wrapper, index?: number): void;
+ private clear(event);
+ private open(event);
+ private save(event);
+ refresh(): void;
+ render(): JSX.Element;
+ }
+ interface WrapperViewerProps extends React.Props {
+ application: PackerApplication;
+ wrappers: WrapperArray;
+ }
+}
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 4317128869..44f0d8e9a0 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -401,6 +401,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](egg.js/egg.js.d.ts) [Egg.js](https://github.com/mikeflynn/egg.js) by [Markus Peloso](https://github.com/ToastHawaii)
* [:link:](ejs-locals/ejs-locals.d.ts) [ejs-locals](https://github.com/randometc/ejs-locals) by [jt000](https://github.com/jt000)
* [:link:](ejs/ejs.d.ts) [ejs.js](http://ejs.co) by [Ben Liddicott](https://github.com/benliddicott/DefinitelyTyped)
+* [:link:](elasticsearch/elasticsearch.d.ts) [elasticsearch](https://www.elastic.co) by [Casper Skydt](https://github.com/CasperSkydt/DefinitelyTyped), [Blake Smith](https://github.com/bfsmith/DefinitelyTyped)
* [:link:](jquery.elang/jquery.elang.d.ts) [eLang](https://github.com/sumegizoltan/ELang) by [Zoltan Sumegi](https://github.com/sumegizoltan)
* [:link:](github-electron/github-electron.d.ts) [Electron](http://electron.atom.io) by [jedmao](https://github.com/jedmao), [rhysd](https://rhysd.github.io), [Milan Burda](https://github.com/miniak)
* [:link:](electron-builder/electron-builder.d.ts) [electron-builder](https://github.com/loopline-systems/electron-builder) by [Maxime LUCE](https://github.com/SomaticIT)
@@ -1123,10 +1124,11 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](moment/moment.d.ts) [Moment.js](https://github.com/timrwood/moment) by [Michael Lakerveld](https://github.com/Lakerfield), [Aaron King](https://github.com/kingdango), [Hiroki Horiuchi](https://github.com/horiuchi), [Dick van den Brink](https://github.com/DickvdBrink), [Adi Dahiya](https://github.com/adidahiya), [Matt Brooks](https://github.com/EnableSoftware)
* [:link:](moment-range/moment-range.d.ts) [Moment.js](https://github.com/gf3/moment-range) by [Bart van den Burg](https://github.com/Burgov), [Wilgert Velinga](https://github.com/wilgert)
* [:link:](mongodb/mongodb.d.ts) [MongoDB](https://github.com/mongodb/node-mongodb-native/tree/2.1) by [Federico Caselli](https://github.com/CaselIT)
-* [:link:](mongoose/mongoose.d.ts) [Mongoose](http://mongoosejs.com) by [horiuchi](https://github.com/horiuchi)
+* [:link:](mongoose/mongoose.d.ts) [Mongoose](http://mongoosejs.com) by [simonxca](https://github.com/simonxca), [horiuchi](https://github.com/horiuchi)
* [:link:](mongoose-auto-increment/mongoose-auto-increment.d.ts) [mongoose-auto-increment](https://github.com/codetunnel/mongoose-auto-increment) by [Aya Morisawa](https://github.com/AyaMorisawa)
* [:link:](mongoose-deep-populate/mongoose-deep-populate.d.ts) [mongoose-deep-populate](https://github.com/buunguyen/mongoose-deep-populate) by [Aya Morisawa](https://github.com/AyaMorisawa)
* [:link:](mongoose-mock/mongoose-mock.d.ts) [mongoose-mock](https://github.com/JohanObrink/mongoose-mock) by [jt000](https://github.com/jt000)
+* [:link:](mongoose-promise/mongoose-promise.d.ts) [mongoose-promise](http://mongoosejs.com/docs/api.html#promise-js) by [simonxca](https://github.com/simonxca)
* [:link:](morgan/morgan.d.ts) [morgan](https://github.com/expressjs/morgan) by [James Roland Cabresos](https://github.com/staticfunction)
* [:link:](mousetrap/mousetrap-global-bind.d.ts) [Mousetrap 1.4.6's global-bind extension](http://craig.is/killing/mice#extensions.global) by [Andrew Bradley](https://github.com/cspotcode)
* [:link:](mousetrap/mousetrap.d.ts) [Mousetrap 1.5.x](http://craig.is/killing/mice) by [Dániel Tar](https://github.com/qcz)
diff --git a/acl/acl.d.ts b/acl/acl.d.ts
index 06defa2449..d222f9ebb6 100644
--- a/acl/acl.d.ts
+++ b/acl/acl.d.ts
@@ -3,7 +3,7 @@
// Definitions by: Qubo
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-///
+///
///
///
diff --git a/agenda/agenda.d.ts b/agenda/agenda.d.ts
index 463ba43d2e..8dd58fdd80 100644
--- a/agenda/agenda.d.ts
+++ b/agenda/agenda.d.ts
@@ -319,6 +319,11 @@ declare module "agenda" {
* The date/time the job last failed.
*/
failedAt: Date;
+
+ /**
+ * Job's state
+ */
+ disabled: boolean
}
/**
@@ -409,6 +414,11 @@ declare module "agenda" {
* @param cb Called after the job has been saved to the database.
*/
touch(cb?: Callback): void;
+
+ /**
+ * Calculates next time the job should run
+ */
+ computeNextRunAt(): Job;
}
interface JobOptions {
diff --git a/ajv/ajv-tests.ts b/ajv/ajv-tests.ts
new file mode 100644
index 0000000000..e6413fd824
--- /dev/null
+++ b/ajv/ajv-tests.ts
@@ -0,0 +1,74 @@
+///
+
+import * as Ajv from 'ajv';
+var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true}
+var validate = ajv.compile({});
+var valid = validate({});
+if (!valid) console.log(validate.errors);
+
+var valid = ajv.validate({}, {});
+if (!valid) console.log(ajv.errors);
+
+ajv.addSchema({}, 'mySchema');
+var valid = ajv.validate('mySchema', {});
+if (!valid) console.log(ajv.errorsText());
+
+ajv.addKeyword('range', {
+ type: 'number', compile: function (sch, parentSchema) {
+ var min: any = sch[0];
+ var max: any = sch[1];
+
+ return parentSchema.exclusiveRange === true
+ ? function (data) { return data > min && data < max; }
+ : function (data) { return data >= min && data <= max; }
+ }
+});
+
+var schema = { "range": [2, 4], "exclusiveRange": true };
+var validate = ajv.compile(schema);
+console.log(validate(2.01)); // true
+console.log(validate(3.99)); // true
+console.log(validate(2)); // false
+console.log(validate(4)); // false
+
+declare var request: any;
+function loadSchema(uri: any, callback: any) {
+ request.json(uri, function (err: any, res: any, body: any) {
+ if (err || res.statusCode >= 400)
+ callback(err || new Error('Loading error: ' + res.statusCode));
+ else
+ callback(null, body);
+ });
+}
+var ajv = new Ajv({ loadSchema: loadSchema });
+
+ajv.compileAsync(schema, function (err, validate) {
+ if (err) return;
+ var valid = validate({});
+});
+
+declare var knex: any;
+function checkIdExists(schema: any, data: any) {
+ return knex(schema.table)
+ .select('id')
+ .where('id', data)
+ .then(function (rows: any) {
+ return true;
+ });
+}
+
+var validate = ajv.compile(schema);
+
+(validate({ userId: 1, postId: 19 }) as PromiseLike)
+ .then(function (valid) {
+ // "valid" is always true here
+ console.log('Data is valid');
+ }, function (err) {
+ if (!(err instanceof Ajv.ValidationError)) throw err;
+ // data is invalid
+ console.log('Validation errors:', err.errors);
+ });
+
+var ajv = new Ajv({ /* async: 'es7', */ transpile: 'nodent' });
+var validate = ajv.compile(schema); // transpiled es7 async function
+(validate({}) as PromiseLike).then(() => { }, () => { });
diff --git a/ajv/ajv.d.ts b/ajv/ajv.d.ts
new file mode 100644
index 0000000000..d8bfd56ef3
--- /dev/null
+++ b/ajv/ajv.d.ts
@@ -0,0 +1,112 @@
+// Type definitions for ajv
+// Project: https://github.com/epoberezkin/ajv
+// Definitions by: York Yao
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare module "ajv" {
+ class Ajv {
+ /**
+ * Create Ajv instance.
+ */
+ constructor(options?: Ajv.AjvOptions);
+ /**
+ * Generate validating function and cache the compiled schema for future use.
+ */
+ compile(schema: any): Ajv.AjvValidate;
+ /**
+ * Asyncronous version of compile method that loads missing remote schemas using asynchronous function in options.loadSchema.
+ */
+ compileAsync(schema: any, callback: (error: Error, validate: Ajv.AjvValidate) => void): void;
+ /**
+ * Validate data using passed schema (it will be compiled and cached).
+ */
+ validate(schema: any, data: any): boolean | PromiseLike;
+ errors: Ajv.ValidationError[];
+ /**
+ * Add schema(s) to validator instance.
+ */
+ addSchema(schema: any, key: string): void;
+ /**
+ * Adds meta schema(s) that can be used to validate other schemas.
+ * That function should be used instead of addSchema because there may be instance options that would compile a meta schema incorrectly (at the moment it is removeAdditional option).
+ */
+ addMetaSchema(schema: any, key: string): void;
+ /**
+ * Validates schema.
+ * This method should be used to validate schemas rather than validate due to the inconsistency of uri format in JSON-Schema standard.
+ */
+ validateSchema(schema: any): Boolean;
+ /**
+ * Retrieve compiled schema previously added with addSchema by the key passed to addSchema or by its full reference (id).
+ * Returned validating function has schema property with the reference to the original schema.
+ */
+ getSchema(key: string): Ajv.AjvValidate;
+ /**
+ * Remove added/cached schema.
+ * Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references.
+ */
+ removeSchema(schema: any): void;
+ /**
+ * Add custom format to validate strings. It can also be used to replace pre-defined formats for Ajv instance.
+ */
+ addFormat(name: string, format: any): void;
+ /**
+ * Add custom validation keyword to Ajv instance.
+ */
+ addKeyword(keyword: string, definition: Ajv.AjxKeywordDefinition): void;
+ errorsText(): any;
+ static ValidationError: Function;
+ }
+ namespace Ajv {
+ type AjvOptions = {
+ v5?: boolean;
+ allErrors?: boolean;
+ verbose?: boolean;
+ jsonPointers?: boolean;
+ uniqueItems?: boolean;
+ unicode?: boolean;
+ format?: string;
+ formats?: any;
+ schemas?: any;
+ missingRefs?: boolean;
+ loadSchema?(uri: string, callback: (error: Error, body: any) => void): void;
+ removeAdditional?: boolean;
+ useDefaults?: boolean;
+ coerceTypes?: boolean;
+ async?: any;
+ transpile?: string;
+ meta?: boolean;
+ validateSchema?: boolean;
+ addUsedSchema?: boolean;
+ inlineRefs?: boolean;
+ passContext?: boolean;
+ loopRequired?: number;
+ ownProperties?: boolean;
+ multipleOfPrecision?: boolean;
+ errorDataPath?: string,
+ messages?: boolean;
+ beautify?: boolean;
+ cache?: any;
+ }
+ type AjvValidate = ((data: any) => boolean | PromiseLike) & {
+ errors: ValidationError[];
+ }
+ type AjxKeywordDefinition = {
+ async?: boolean;
+ type: string;
+ compile?: (schema: any, parentsSchema: any) => ((data: any) => boolean | PromiseLike);
+ validate?: (schema: any, data: any) => boolean;
+ }
+ type ValidationError = {
+ keyword: string;
+ dataPath: string;
+ schemaPath: string;
+ params: any;
+ message: string;
+ schema: any;
+ parentSchema: any;
+ data: any;
+ }
+ }
+ export = Ajv;
+}
diff --git a/alexa-sdk/alexa-sdk-tests.ts b/alexa-sdk/alexa-sdk-tests.ts
new file mode 100644
index 0000000000..e161c5bf38
--- /dev/null
+++ b/alexa-sdk/alexa-sdk-tests.ts
@@ -0,0 +1,25 @@
+///
+///
+
+import * as Alexa from "alexa-sdk";
+
+exports.handler = function(event: Alexa.RequestBody, context: Alexa.Context, callback: Function) {
+ let alexa = Alexa.handler(event, context);
+ alexa.registerHandlers(handlers);
+ alexa.execute();
+};
+
+let handlers: Alexa.Handlers = {
+ 'LaunchRequest': function () {
+ var self: Alexa.Handler = this;
+ self.emit('SayHello');
+ },
+ 'HelloWorldIntent': function () {
+ var self: Alexa.Handler = this;
+ self.emit('SayHello');
+ },
+ 'SayHello': function () {
+ var self: Alexa.Handler = this;
+ self.emit(':tell', 'Hello World!');
+ }
+};
diff --git a/alexa-sdk/alexa-sdk.d.ts b/alexa-sdk/alexa-sdk.d.ts
new file mode 100644
index 0000000000..5866d8c4ee
--- /dev/null
+++ b/alexa-sdk/alexa-sdk.d.ts
@@ -0,0 +1,132 @@
+// Type definitions for Alexa SDK for Node.js v1.0.3
+// Project: https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs
+// Definitions by: Pete Beegle
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare module 'alexa-sdk' {
+ export function handler(event: RequestBody, context: Context, callback?: Function): AlexaObject;
+ export function CreateStateHandler(state: string, obj: any): any;
+ export var StateString: string;
+
+ interface AlexaObject {
+ _event: any;
+ _context: any;
+ _callback: any;
+ state: any;
+ appId: any;
+ response: any;
+ dynamoDBTableName: any;
+ saveBeforeResponse: boolean;
+ registerHandlers: (...handlers: Handlers[]) => any;
+ execute: () => void;
+ }
+
+ interface Handlers {
+ [intent: string]: () => void;
+ }
+
+ interface Handler {
+ on: any;
+ emit(event: string, ...args: any[]): boolean;
+ emitWithState: any;
+ state: any;
+ handler: any;
+ event: RequestBody;
+ attributes: any;
+ context: any;
+ name: any;
+ isOverriden: any;
+ }
+
+ interface Context {
+ callbackWaitsForEmptyEventLoop: boolean;
+ logGroupName: string;
+ logStreamName: string;
+ functionName: string;
+ memoryLimitInMB: string;
+ functionVersion: string;
+ invokeid: string;
+ awsRequestId: string;
+ }
+
+ interface RequestBody {
+ version: string;
+ session: Session;
+ request: LaunchRequest | IntentRequest | SessionEndedRequest;
+ }
+
+ interface Session {
+ new: boolean;
+ sessionId: string;
+ attributes: any;
+ application: SessionApplication;
+ user: SessionUser;
+ }
+
+ interface SessionApplication {
+ applicationId: string;
+ }
+
+ interface SessionUser {
+ userId: string;
+ accessToken: string;
+ }
+
+ interface LaunchRequest extends IRequest {}
+
+ interface IntentRequest extends IRequest {
+ intent: Intent;
+ }
+
+ interface Intent {
+ name: string;
+ slots: any;
+ }
+
+ interface SessionEndedRequest extends IRequest{
+ reason: string;
+ }
+
+ interface IRequest {
+ type: "LaunchRequest" | "IntentRequest" | "SessionEndedRequest";
+ requestId: string;
+ timeStamp: string;
+ }
+
+ interface ResponseBody {
+ version: string;
+ sessionAttributes?: any;
+ response: Response;
+ }
+
+ interface Response {
+ outputSpeech?: OutputSpeech;
+ card?: Card;
+ reprompt?: Reprompt;
+ shouldEndSession: boolean;
+ }
+
+ interface OutputSpeech {
+ type: "PlainText" | "SSML";
+ text?: string;
+ ssml?: string;
+ }
+
+ interface Card {
+ type: "Simple" | "Standard" | "LinkAccount";
+ title?: string;
+ content?: string;
+ text?: string;
+ image?: Image;
+ }
+
+ interface Image {
+ smallImageUrl: string;
+ largeImageUrl: string;
+ }
+
+ interface Reprompt {
+ outputSpeech: OutputSpeech;
+ }
+}
+
diff --git a/alt/alt.d.ts b/alt/alt.d.ts
index 20da159f35..575d476451 100644
--- a/alt/alt.d.ts
+++ b/alt/alt.d.ts
@@ -53,8 +53,8 @@ declare namespace AltJS {
export type Source = {[name:string]: () => SourceModel};
export interface SourceModel {
- local(state:any):any;
- remote(state:any):Promise;
+ local(state:any, ...args: any[]):any;
+ remote(state:any, ...args: any[]):Promise;
shouldFetch?(fetchFn:(...args:Array) => boolean):void;
loading?:(args:any) => void;
success?:(state:S) => void;
diff --git a/amcharts/AmCharts.d.ts b/amcharts/AmCharts.d.ts
index 543467feac..4f5dbe90f7 100644
--- a/amcharts/AmCharts.d.ts
+++ b/amcharts/AmCharts.d.ts
@@ -26,6 +26,22 @@ declare namespace AmCharts {
/** Clears all the charts on page, removes listeners and intervals. */
function clear();
+
+ /** Handle ready event */
+ function ready(Function): void;
+
+ /** Create chart by params. */
+ function makeChart(selector: string, params: any, delay?: number): AmChart;
+
+ /** Set a method to be called before initializing the chart.
+ * When the method is called, the chart instance is passed as an attribute.
+ * You can use this feature to preprocess chart data or do some other things you need
+ * before initializing the chart.
+ * @param {Function} handler - The method to be called.
+ * @param {string[]} types - Which chart types should call this method. Defaults to all
+ * if none is passed.
+ */
+ function addInitHandler(handler: Function, types: string[]);
/** AmPieChart class creates pie/donut chart. In order to display pie chart you need to set at least three properties - dataProvider, titleField and valueField.
@example
@@ -948,6 +964,10 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
@Default 150
*/
hideBalloonTime: number;
+ /** Allows changing language easily.
+ * Note, you should include the language.js file from amcharts/lang or ammap/lang folder and then use variable name used in this file, like chart.language = "de";
+ * Note, for maps this works differently - you use language only for country names, as there are no other strings in the maps application. */
+ language: string;
/** Legend of a chart. */
legend: AmLegend;
/** Reference to the div of the legend. */
@@ -976,6 +996,8 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
prefixesOfBigNumbers: any[];
/** Prefixes which are used to make small numbers shorter: 2μ instead of 0.000002, etc. Prefixes are used on value axes and in the legend. To enable prefixes, set usePrefixes property to true. [{number:1e-24, prefix:"y"},{number:1e-21, prefix:"z"},{number:1e-18, prefix:"a"},{number:1e-15, prefix:"f"},{number:1e-12, prefix:"p"},{number:1e-9, prefix:"n"},{number:1e-6, prefix:"μ"},{number:1e-3, prefix:"m"}] */
prefixesOfSmallNumbers: any[];
+ /** A config object for Responsive plugin. */
+ responsive: any;
/** Theme of a chart. Config files of themes can be found in amcharts/themes/ folder. More info about using themes. */
theme: string;
/** Thousands separator.
@@ -1003,7 +1025,7 @@ If you do not set properties such as dashLength, lineAlpha, lineColor, etc - val
bold - specifies if text is bold (true/false),
url - url
*/
- addLabel(x: number, y: number, text: string, align: string, size: number, color: string, rotation: number, alpha: number, bold: boolean, url: string);
+ addLabel(x: number|string, y: number|string, text: string, align: string, size?: number, color?: string, rotation?: number, alpha?: number, bold?: boolean, url?: string);
/** Adds a legend to the chart.
By default, you don't need to create div for your legend, however if you want it to be positioned in some different way, you can create div anywhere you want and pass id or reference to your div as a second parameter.
(NOTE: This method will not work on StockPanel.)
diff --git a/amplitude-js/v2/amplitude-js-tests.ts b/amplitude-js/v2/amplitude-js-tests.ts
new file mode 100644
index 0000000000..3e69d7c867
--- /dev/null
+++ b/amplitude-js/v2/amplitude-js-tests.ts
@@ -0,0 +1,87 @@
+// Tests for Amplitude SDK TypeScript definitions
+
+///
+
+module Amplitude.Tests {
+ function all() {
+ amplitude.init('YOUR_API_KEY_HERE', null, {
+ // optional configuration options
+ saveEvents: true,
+ includeUtm: true,
+ includeReferrer: true,
+ batchEvents: true,
+ eventUploadThreshold: 50
+ });
+ amplitude.init('YOUR_API_KEY_HERE', 'USER_ID_HERE', null, () => {});
+
+ amplitude.logEvent('EVENT_IDENTIFIER_HERE');
+ amplitude.setUserId('USER_ID_HERE');
+ amplitude.init('YOUR_API_KEY_HERE', 'USER_ID_HERE');
+ amplitude.setUserId(null); // not string 'null'
+ amplitude.setVersionName('VERSION_NAME_HERE');
+
+ amplitude.regenerateDeviceId();
+ amplitude.setDeviceId('CUSTOM_DEVICE_ID');
+
+ amplitude.logEvent('EVENT_IDENTIFIER_HERE', {
+ 'color': 'blue',
+ 'age': 20,
+ 'key': 'value'
+ });
+ amplitude.logEvent("EVENT_IDENTIFIER_HERE", null, (httpCode, response) => { });
+
+ let identify = new amplitude.Identify().set('gender', 'female').set('age', 20);
+ amplitude.identify(identify);
+
+ identify = new amplitude.Identify().setOnce('sign_up_date', '08/24/2015');
+ amplitude.identify(identify);
+
+ identify = new amplitude.Identify().setOnce('sign_up_date', '09/14/2015');
+ amplitude.identify(identify);
+
+ identify = new amplitude.Identify().unset('gender').unset('age');
+ amplitude.identify(identify);
+
+ identify = new amplitude.Identify().add('karma', 1).add('friends', 1);
+ amplitude.identify(identify);
+
+ identify = new amplitude.Identify().append('ab-tests', 'new-user-test').append('some_list', [1, 2, 3, 4, 'values']);
+ amplitude.identify(identify);
+
+ identify = new amplitude.Identify().prepend('ab-tests', 'new-user-test').prepend('some_list', [1, 2, 3, 4, 'values']);
+ amplitude.identify(identify);
+
+ identify = new amplitude.Identify()
+ .set('karma', 10)
+ .add('karma', 1)
+ .unset('karma');
+ amplitude.identify(identify);
+
+ identify = new amplitude.Identify()
+ .set('colors', ['rose', 'gold'])
+ .append('ab-tests', 'campaign_a')
+ .append('existing_list', [4, 5]);
+ amplitude.identify(identify);
+
+ amplitude.setUserProperties({
+ gender: 'female',
+ age: 20
+ });
+
+ amplitude.clearUserProperties();
+
+ amplitude.setOptOut(true);
+ amplitude.setOptOut(false);
+
+ amplitude.setGroup('orgId', '15');
+ amplitude.setGroup('sport', ['soccer', 'tennis']);
+
+ // TODO: Implement those.
+ /*
+ var revenue = new amplitude.Revenue().setProductId('com.company.productId').setPrice(3.99).setQuantity(3);
+ amplitude.logRevenueV2(revenue);
+
+ amplitude.logEventWithGroups('initialize_game', { 'key': 'value' }, { 'sport': 'soccer' });
+ */
+ }
+}
diff --git a/amplitude-js/v2/amplitude-js.d.ts b/amplitude-js/v2/amplitude-js.d.ts
new file mode 100644
index 0000000000..613f5ad5d8
--- /dev/null
+++ b/amplitude-js/v2/amplitude-js.d.ts
@@ -0,0 +1,61 @@
+// Type definitions for Amplitude SDK 2.12.1
+// Project: https://github.com/amplitude/Amplitude-Javascript
+// Definitions by: Arvydas Sidorenko
+// Definitions: https://github.com/Asido/DefinitelyTyped
+
+declare module amplitude {
+ interface Config {
+ batchEvents?: boolean;
+ cookieExpiration?: number;
+ cookieName?: string;
+ deviceId?: string;
+ domain?: string;
+ eventUploadPeriodMillis?: number;
+ eventUploadThreshold?: number;
+ includeReferrer?: boolean;
+ includeUtm?: boolean;
+ language?: string;
+ optOut?: boolean;
+ platform?: string;
+ saveEvents?: boolean;
+ savedMaxCount?: number;
+ sessionTimeout?: number;
+ uploadBatchSize?: number;
+ }
+
+ export class Identify {
+ set(key: string, value: any): Identify;
+ setOnce(key: string, value: any): Identify;
+ add(key: string, value: number): Identify;
+ append(key: string, value: any): Identify;
+ prepend(key: string, value: any): Identify;
+
+ unset(key: string): Identify;
+ }
+
+ export function init(apiKey: string): void;
+ export function init(apiKey: string, userId: string): void;
+ export function init(apiKey: string, userId: string, options: Config): void;
+ export function init(apiKey: string, userId: string, options: Config, callback: () => void): void;
+
+ export function setVersionName(version: string): void;
+ export function setUserId(userId: string): void;
+
+ export function setDeviceId(id: string): void;
+ export function regenerateDeviceId(): void;
+
+ export function identify(identify: Identify): void;
+
+ export function setUserProperties(properties: Object): void;
+ export function clearUserProperties(): void;
+
+ export function setOptOut(optOut: boolean): void;
+
+ export function setGroup(groupType: string, groupName: string | string[]): void;
+
+ export function logEvent(event: string): void;
+ export function logEvent(event: string, data: Object): void;
+ export function logEvent(event: string, data: Object, callback: (httpCode: number, response: any) => void): void;
+
+ export var options: Config;
+}
diff --git a/angular-environment/angular-environment.d.ts b/angular-environment/angular-environment.d.ts
index 483474410c..94972d1383 100644
--- a/angular-environment/angular-environment.d.ts
+++ b/angular-environment/angular-environment.d.ts
@@ -14,6 +14,11 @@ declare namespace angular.environment {
* loads the correct environment variables.
*/
check: () => void;
+ /**
+ * Retrieves the correct version of a
+ * variable for the current environment.
+ */
+ read: (key: string) => any;
}
interface Service {
/**
diff --git a/angular-es/angular-es-tests.ts b/angular-es/angular-es-tests.ts
new file mode 100644
index 0000000000..2e44d5d0a8
--- /dev/null
+++ b/angular-es/angular-es-tests.ts
@@ -0,0 +1,157 @@
+///
+
+//
+// @Component
+//
+import { Component } from 'angular-es';
+@Component({
+ selector: '',
+ template: ''
+})
+class MyComponentController {
+
+}
+
+//
+// @Config
+//
+import { Config } from 'angular-es';
+
+@Config()
+class MyConfig {
+
+}
+
+//
+// @Constant
+//
+import { Constant } from 'angular-es';
+
+@Constant('MyConstant')
+class MyConstant {
+ foo = 'foo';
+ bar = 'bar';
+}
+
+//
+// @Controller
+//
+import { Controller } from 'angular-es';
+
+@Controller('MyController')
+class MyController {
+
+}
+
+//
+// @Decorator
+//
+import { Decorator } from 'angular-es';
+
+@Decorator('MyServiceDecorator')
+class MyServiceDecorator {
+
+}
+
+//
+// @Directive
+//
+import { Directive } from 'angular-es';
+
+@Directive('MyDirective')
+class MyDirective {
+
+}
+
+//
+// @Factory
+//
+import { Factory } from 'angular-es';
+
+@Factory('MyFactory')
+class MyFactory {
+}
+
+//
+// @Filter
+//
+import { Filter } from 'angular-es';
+
+@Filter('MyFilter')
+class MyFilter {
+}
+
+//
+// @Inject
+//
+import { Inject } from 'angular-es';
+
+@Inject('fooBar')
+class MyFooService {
+
+ @Inject('bazBar')
+ myMethod(bazBar: Object) {
+ }
+
+ constructor(fooBar: Object) {
+ }
+}
+
+//
+// @InjectAsProperty
+//
+import { InjectAsProperty } from 'angular-es';
+
+@InjectAsProperty('fooBar')
+class MyFooBarService {
+ fooBar: Object;
+
+ myMethod() {
+ this.fooBar !== undefined;
+ }
+}
+
+//
+// @Module
+//
+import { Module } from 'angular-es';
+
+@Module('my.module')
+@Service('MyModuleService')
+class MyModuleService {
+}
+
+//
+// @Provider
+//
+import { Provider } from 'angular-es';
+
+@Provider('MyProvider')
+class MyProvider {
+}
+
+//
+// @Run
+//
+import { Run } from 'angular-es';
+
+@Run()
+class MyRunBlock {
+}
+
+//
+// @Service
+//
+import { Service } from 'angular-es';
+
+@Service('MyService')
+class MyService {
+}
+//
+// @Value
+//
+import { Value } from 'angular-es';
+
+@Value('MyValue')
+class MyValue {
+}
diff --git a/angular-es/angular-es.d.ts b/angular-es/angular-es.d.ts
new file mode 100644
index 0000000000..0972b42da0
--- /dev/null
+++ b/angular-es/angular-es.d.ts
@@ -0,0 +1,187 @@
+// Type definitions for angular-es v0.0.3
+// Project: https://github.com/mbutsykin/angular-es
+// Definitions by: mbutsykin
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare module 'angular-es' {
+
+ interface ClassDecorator {
+ (target: TFunction): TFunction|void;
+ }
+
+ interface MethodDecorator {
+ (target: Object, propertyKey: string|symbol, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor|void;
+ }
+
+ /**
+ * Decorated target
+ */
+ interface ngESDecorator extends ClassDecorator, MethodDecorator {
+ (target: Object|Function,
+ ngName?: string,
+ ngArguments?: Array,
+ ngType?: string,
+ injectAsProperty?: Array): void;
+ }
+
+ /**
+ * Component interface
+ * @see https://docs.angularjs.org/guide/component
+ */
+ interface iComponent {
+ template: string,
+ selector: string,
+ controllerAs?: string,
+ require?: string,
+ templateUrl?: string,
+ transclude?: string,
+ bindings?: Object
+ }
+
+ /**
+ * Register component
+ *
+ * @param {Object} component - component config
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Component(component: iComponent): ngESDecorator;
+
+ /**
+ * Register config block
+ */
+ function Config(): ngESDecorator;
+
+ /**
+ * Register constant
+ *
+ * @param {string} name - constant name
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Constant(name: string): ngESDecorator;
+
+ /**
+ * Register controller
+ *
+ * @param {string} name - controller name
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Controller(name: string): ngESDecorator;
+
+ /**
+ * Register decorator
+ *
+ * @param {string} name - provider name to decorate
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Decorator(name: string): ngESDecorator;
+
+ /**
+ * Register directive
+ *
+ * @param {string} name - directive selector, can be in hyphen-case
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Directive(name: string): ngESDecorator;
+
+ /**
+ * Register factory
+ *
+ * @param {string} name - factory name
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Factory(name: string): ngESDecorator;
+
+ /**
+ * Register filter
+ *
+ * @param {string} name - filter name
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Filter(name: string): ngESDecorator;
+
+ /**
+ * Add $inject property to target
+ *
+ * @param {Array} dependencies - dependencies to inject
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Inject(...dependencies: Array): ngESDecorator;
+
+ /**
+ * Inject dependencies as properties to target
+ *
+ * @param {Array} dependencies - dependencies to inject
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function InjectAsProperty(...dependencies: Array): ngESDecorator;
+
+ /**
+ * Attach target to the specified module
+ *
+ * @param {string} name - module name
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Module(name: string): ngESDecorator;
+
+ /**
+ * Register provider
+ *
+ * @param {string} name - provider name
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Provider(name: string): ngESDecorator;
+
+ /**
+ * Register run block
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Run(): ngESDecorator;
+
+ /**
+ * Register service
+ *
+ * @param {string} name - service name
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Service(name: string): ngESDecorator;
+
+ /**
+ * Register value
+ *
+ * @param {string} name - value name
+ *
+ * @returns {ngESDecorator} - decorated class
+ */
+ function Value(name: string): ngESDecorator;
+
+ export {
+ Component,
+ Config,
+ Constant,
+ Controller,
+ Decorator,
+ Directive,
+ Factory,
+ Filter,
+ Inject,
+ InjectAsProperty,
+ Module,
+ Provider,
+ Run,
+ Service,
+ Value,
+ }
+}
diff --git a/angular-feature-flags/angular-feature-flags-tests.ts b/angular-feature-flags/angular-feature-flags-tests.ts
new file mode 100644
index 0000000000..a36eaba3d0
--- /dev/null
+++ b/angular-feature-flags/angular-feature-flags-tests.ts
@@ -0,0 +1,31 @@
+///
+
+let myApp = angular.module('myApp', ['feature-flags']);
+
+const flagsData: Array = [
+ {
+ key: '1',
+ active: true,
+ name: 'flag1',
+ description: 'This is the first flag'
+ },
+ {
+ key: '2',
+ active: false,
+ name: 'flag2',
+ description: 'This is the second flag'
+ }
+];
+
+myApp.config(function (featureFlagsProvider: angular.featureflags.FeatureFlagsProvider) {
+ featureFlagsProvider.setInitialFlags(flagsData);
+});
+
+myApp.run(function ($q: angular.IQService, $http: angular.IHttpService, featureFlags: angular.featureflags.FeatureFlagsService) {
+ let deferred = $q.defer();
+ deferred.resolve(flagsData);
+
+ featureFlags.set(deferred.promise);
+
+ featureFlags.set($http.get('/data/flags.json'));
+});
\ No newline at end of file
diff --git a/angular-feature-flags/angular-feature-flags.d.ts b/angular-feature-flags/angular-feature-flags.d.ts
new file mode 100644
index 0000000000..99ef300976
--- /dev/null
+++ b/angular-feature-flags/angular-feature-flags.d.ts
@@ -0,0 +1,38 @@
+// Type definitions for angular-feature-flags 1.4.0
+// Project: https://github.com/mjt01/angular-feature-flags
+// Definitions by: Borislav Zhivkov
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+///
+
+declare namespace angular.featureflags {
+ export interface FlagData {
+ /**
+ * Unique key that is used from the markup to resolve whether a flag is active or not.
+ */
+ key: string;
+
+ /**
+ * Boolean value for enabling/disabling the feature
+ */
+ active: boolean;
+
+ /**
+ * A short name of the flag (only visible in the list of flags)
+ */
+ name: string;
+
+ /**
+ * A long description of the flag to further explain the feature being toggled (only visible in the list of flags)
+ */
+ description: string;
+ }
+
+ export interface FeatureFlagsProvider {
+ setInitialFlags(flags: Array): void;
+ }
+
+ export interface FeatureFlagsService {
+ set(flagsPromise: angular.IPromise | angular.IHttpPromise): void;
+ }
+}
\ No newline at end of file
diff --git a/angular-gettext/angular-gettext.d.ts b/angular-gettext/angular-gettext.d.ts
index 48734d4433..84721d8dc0 100644
--- a/angular-gettext/angular-gettext.d.ts
+++ b/angular-gettext/angular-gettext.d.ts
@@ -51,12 +51,12 @@ declare namespace angular.gettext {
/** Get the correct pluralized (but untranslated) string for the value of n. */
getStringForm(string: string, n: number): string;
- /** Translate a string with the given context. Uses Angular.JS interpolation, so something like this will do what you expect:
+ /** Translate a string with the given scope. Uses Angular.JS interpolation, so something like this will do what you expect:
* var hello = gettextCatalog.getString("Hello {{name}}!", { name: "Ruben" });
* // var hello will be "Hallo Ruben!" in Dutch.
- * The context parameter is optional: pass null (or don't pass anything) if you're not using it: this skips interpolation and is a lot faster.
+ * The scope parameter is optional: pass null (or don't pass anything) if you're not using it: this skips interpolation and is a lot faster.
*/
- getString(string: string, context?: any): string;
+ getString(string: string, scope?: any, context?: string): string;
/** Translate a plural string with the given context. */
getPlural(n: number, string: string, stringPlural: string, context?: any): string;
diff --git a/angular-jwt/angular-jwt-tests.ts b/angular-jwt/angular-jwt-tests.ts
index 3a6b7d6bf1..818899e829 100644
--- a/angular-jwt/angular-jwt-tests.ts
+++ b/angular-jwt/angular-jwt-tests.ts
@@ -15,3 +15,18 @@ var $jwtInterceptor: ng.jwt.IJwtInterceptor;
$jwtInterceptor.tokenGetter = () => {
return expToken;
}
+
+
+var authManager: ng.jwt.IAuthManagerServiceProvider;
+
+// Indicate the user is authenticated
+authManager.authenticate();
+
+// Indicate the user is unauthenticated
+authManager.unauthenticate();
+
+// Keep the user authenticated
+authManager.checkAuthOnRefresh();
+
+// Redirect the user on unauthorized requests
+authManager.redirectWhenUnauthenticated();
\ No newline at end of file
diff --git a/angular-jwt/angular-jwt.d.ts b/angular-jwt/angular-jwt.d.ts
index eb02cf24df..d1f9eb085f 100644
--- a/angular-jwt/angular-jwt.d.ts
+++ b/angular-jwt/angular-jwt.d.ts
@@ -27,4 +27,11 @@ declare namespace angular.jwt {
interface IJwtInterceptor {
tokenGetter(...params : any[]): string;
}
+
+ interface IAuthManagerServiceProvider {
+ authenticate(): void;
+ unauthenticate(): void;
+ checkAuthOnRefresh(): void;
+ redirectWhenUnauthenticated(): void;
+ }
}
diff --git a/angular-material/angular-material-tests.ts b/angular-material/angular-material-tests.ts
index 8e2bdfdf43..552ba7a95e 100644
--- a/angular-material/angular-material-tests.ts
+++ b/angular-material/angular-material-tests.ts
@@ -30,7 +30,11 @@ myApp.config((
myApp.controller('BottomSheetController', ($scope: ng.IScope, $mdBottomSheet: ng.material.IBottomSheetService) => {
$scope['openBottomSheet'] = () => {
$mdBottomSheet.show({
- template: 'Hello!'
+ template: 'Hello!',
+ clickOutsideToClose: true,
+ disableBackdrop: true,
+ disableParentScroll: false,
+ parent: () => {}
});
};
$scope['hideBottomSheet'] = $mdBottomSheet.hide.bind($mdBottomSheet, 'hide');
@@ -115,15 +119,41 @@ myApp.controller('SidenavController', ($scope: ng.IScope, $mdSidenav: ng.materia
$scope['close'] = () => $mdSidenav(componentId).close();
$scope['isOpen'] = $mdSidenav(componentId).isOpen();
$scope['isLockedOpen'] = $mdSidenav(componentId).isLockedOpen();
+
+ $scope['asyncLookup'] = $mdSidenav(componentId, true).then((instance) => {
+ instance.toggle();
+ instance.open();
+ instance.close();
+ instance.isOpen();
+ instance.isLockedOpen();
+ });
+
+ $scope['onClose'] = $mdSidenav(componentId).onClose(() => {});
});
myApp.controller('ToastController', ($scope: ng.IScope, $mdToast: ng.material.IToastService) => {
- $scope['openToast'] = () => $mdToast.show($mdToast.simple().textContent('Hello!'));
+ $scope['openToast'] = () => {
+ $mdToast.show($mdToast.simple().textContent('Hello!'));
+ $mdToast.updateTextContent('New Content');
+ }
+
+ $scope['customToast'] = () => {
+ var options = {
+ hideDelay: 3000,
+ position: 'top right',
+ controller : 'ToastCtrl',
+ templateUrl : 'toast-template.html',
+ toastClass: 'my-class'
+ };
+
+ $mdToast.show(options);
+ }
});
myApp.controller('PanelController', ($scope: ng.IScope, $mdPanel: ng.material.IPanelService) => {
$scope['createPanel'] = () => {
var config = {
+ id: 'myPanel',
template: 'Hello!
',
hasBackdrop: true,
disableParentScroll: true,
diff --git a/angular-material/angular-material.d.ts b/angular-material/angular-material.d.ts
index 2769945a7b..3fa0290904 100644
--- a/angular-material/angular-material.d.ts
+++ b/angular-material/angular-material.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Angular Material 1.0.0-rc5+ (angular.material module)
+// Type definitions for Angular Material 1.1.0-rc5+ (angular.material module)
// Project: https://github.com/angular/material
// Definitions by: Alex Staroselsky , Blake Bigelow , Peter Hajdu
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -19,11 +19,12 @@ declare namespace angular.material {
preserveScope?: boolean; // default: false
controller?: string|Function;
locals?: {[index: string]: any};
- targetEvent?: MouseEvent;
- resolve?: {[index: string]: angular.IPromise}
+ clickOutsideToClose?: boolean;
+ disableBackdrop?: boolean;
+ escapeToClose?: boolean;
+ resolve?: {[index: string]: () => angular.IPromise};
controllerAs?: string;
- bindToController?: boolean;
- parent?: string|Element|JQuery; // default: root node
+ parent?: Function|string|Object; // default: root node
disableParentScroll?: boolean; // default: true
}
@@ -52,7 +53,7 @@ declare namespace angular.material {
controller(controller?: string|Function): T;
locals(locals?: {[index: string]: any}): T;
bindToController(bindToController?: boolean): T; // default: false
- resolve(resolve?: {[index: string]: angular.IPromise}): T;
+ resolve(resolve?: {[index: string]: () => angular.IPromise}): T;
controllerAs(controllerAs?: string): T;
parent(parent?: string|Element|JQuery): T; // default: root node
onComplete(onComplete?: Function): T;
@@ -90,7 +91,7 @@ declare namespace angular.material {
controller?: string|Function;
locals?: {[index: string]: any};
bindToController?: boolean; // default: false
- resolve?: {[index: string]: angular.IPromise}
+ resolve?: {[index: string]: () => angular.IPromise}
controllerAs?: string;
parent?: string|Element|JQuery; // default: root node
onShowing?: Function;
@@ -131,9 +132,11 @@ declare namespace angular.material {
close(): angular.IPromise;
isOpen(): boolean;
isLockedOpen(): boolean;
+ onClose(onClose: Function): void;
}
interface ISidenavService {
+ (component: string, enableWait: boolean): angular.IPromise;
(component: string): ISidenavObject;
}
@@ -160,10 +163,11 @@ declare namespace angular.material {
preserveScope?: boolean; // default: false
hideDelay?: number; // default (ms): 3000
position?: string; // any combination of 'bottom'/'left'/'top'/'right'/'fit'; default: 'bottom left'
+ toastClass?: string;
controller?: string|Function;
locals?: {[index: string]: any};
bindToController?: boolean; // default: false
- resolve?: {[index: string]: angular.IPromise}
+ resolve?: {[index: string]: () => angular.IPromise}
controllerAs?: string;
parent?: string|Element|JQuery; // default: root node
}
@@ -173,7 +177,8 @@ declare namespace angular.material {
showSimple(content: string): angular.IPromise;
simple(): ISimpleToastPreset;
build(): IToastPreset;
- updateContent(): void;
+ updateContent(newContent: string): void;
+ updateTextContent(newContent: string): void
hide(response?: any): void;
cancel(response?: any): void;
}
@@ -245,6 +250,7 @@ declare namespace angular.material {
extendPalette(name: string, palette: IPalette): IPalette;
setDefaultTheme(theme: string): void;
alwaysWatchTheme(alwaysWatch: boolean): void;
+ setNonce(nonce: string): void;
}
interface IDateLocaleProvider {
@@ -288,14 +294,16 @@ declare namespace angular.material {
}
interface IPanelConfig {
+ id?: string;
template?: string;
templateUrl?: string;
controller?: string|Function;
controllerAs?: string;
bindToController?: boolean; // default: true
locals?: {[index: string]: any};
- resolve?: {[index: string]: angular.IPromise}
+ resolve?: {[index: string]: () => angular.IPromise}
attachTo?: string|JQuery|Element;
+ propagateContainerEvents?: boolean;
panelClass?: string;
zIndex?: number; // default: 80
position?: IPanelPosition;
@@ -328,16 +336,18 @@ declare namespace angular.material {
addClass(newClass: string): void;
removeClass(oldClass: string): void;
toggleClass(toggleClass: string): void;
- focusOnOpen(): void;
+ updatePosition(position: IPanelPosition): void;
}
interface IPanelPosition {
absolute(): IPanelPosition;
relativeTo(someElement: string|JQuery|Element): IPanelPosition;
- top(opt_top: string): IPanelPosition; // default: '0'
- bottom(opt_bottom: string): IPanelPosition; // default: '0'
- left(opt_left: string): IPanelPosition; // default: '0'
- right(opt_right: string): IPanelPosition; // default: '0'
+ top(top?: string): IPanelPosition; // default: '0'
+ bottom(bottom?: string): IPanelPosition; // default: '0'
+ start(start?: string): IPanelPosition; // default: '0'
+ end(end?: string): IPanelPosition; // default: '0'
+ left(left?: string): IPanelPosition; // default: '0'
+ right(right?: string): IPanelPosition; // default: '0'
centerHorizontally(): IPanelPosition;
centerVertically(): IPanelPosition;
center(): IPanelPosition;
@@ -357,5 +367,24 @@ declare namespace angular.material {
open(opt_config: IPanelConfig): angular.IPromise;
newPanelPosition(): IPanelPosition;
newPanelAnimation(): IPanelAnimation;
+ xPosition: {
+ CENTER: string,
+ ALIGN_START: string,
+ ALIGN_END: string,
+ OFFSET_START: string,
+ OFFSET_END: string,
+ };
+ yPosition: {
+ CENTER: string,
+ ALIGN_TOPS: string,
+ ALIGN_BOTTOMS: string,
+ ABOVE: string,
+ BELOW: string,
+ };
+ animation: {
+ SLIDE: string,
+ SCALE: string,
+ FADE: string,
+ };
}
}
diff --git a/angular-permission/angular-permission-tests.ts b/angular-permission/angular-permission-tests.ts
index cc9cd7c367..c6d5b91a8d 100644
--- a/angular-permission/angular-permission-tests.ts
+++ b/angular-permission/angular-permission-tests.ts
@@ -1,10 +1,11 @@
///
-import permission = angular.permission;
+import permissionNamespace = angular.permission;
+import { permission, ngPermission, uiPermission } from "angular-permission";
angular
- .module('fooModule', ['permission', 'user'])
- .run(function (PermissionStore: permission.PermissionStore, User: any) {
+ .module('fooModule', [permission, ngPermission, uiPermission, 'user'])
+ .run(function (PermissionStore: permissionNamespace.PermissionStore, User: any) {
// Define anonymous permission
PermissionStore
.definePermission('anonymous', function (stateParams) {
@@ -22,8 +23,8 @@ angular
hasPermissionDefinition(permission: string) : angular.IPromise;
}
- angular.module('barModule', ['permission', 'user'])
- .run(function (PermissionStore: permission.PermissionStore, User: BackendUserService, $q: angular.IQService) {
+ angular.module('barModule', [permission, 'user'])
+ .run(function (PermissionStore: permissionNamespace.PermissionStore, User: BackendUserService, $q: angular.IQService) {
PermissionStore
// Define user permission calling back-end
.definePermission('user', function (stateParams) {
@@ -64,14 +65,14 @@ angular
PermissionStore.removePermissionDefinition('user');
- let permissions: Array = PermissionStore.getStore();
+ let permissions: Array = PermissionStore.getStore();
});
angular
- .module('fooModule', ['permission', 'user'])
- .run(function (RoleStore: permission.RoleStore, User: any) {
+ .module('fooModule', [permission, 'user'])
+ .run(function (RoleStore: permissionNamespace.RoleStore, User: any) {
RoleStore
// Permission array validated role
// Library will internally validate if 'user' and 'editor' permissions are valid when checking if role is valid
@@ -88,5 +89,5 @@ angular
RoleStore.removeRoleDefinition('user');
- let roles: Array = RoleStore.getStore();
+ let roles: Array = RoleStore.getStore();
});
diff --git a/angular-permission/angular-permission.d.ts b/angular-permission/angular-permission.d.ts
index fecbafb29b..138c8892ce 100644
--- a/angular-permission/angular-permission.d.ts
+++ b/angular-permission/angular-permission.d.ts
@@ -173,3 +173,9 @@ declare namespace angular.permission {
options?: angular.ui.IStateOptions;
}
}
+
+declare module "angular-permission" {
+ export var permission: string;
+ export var ngPermission: string;
+ export var uiPermission: string;
+}
diff --git a/angular-translate/angular-translate.d.ts b/angular-translate/angular-translate.d.ts
index 51946281ce..0187e33cab 100644
--- a/angular-translate/angular-translate.d.ts
+++ b/angular-translate/angular-translate.d.ts
@@ -13,7 +13,7 @@ declare module "angular-translate" {
declare namespace angular.translate {
interface ITranslationTable {
- [key: string]: any;
+ [key: string]: string | ITranslationTable;
}
interface ILanguageKeyAlias {
@@ -95,8 +95,9 @@ declare namespace angular.translate {
use(key: string): ITranslateProvider;
storageKey(): string;
storageKey(key: string): void; // JeroMiya - the library should probably return ITranslateProvider but it doesn't here
+ uniformLanguageTag(options: string | Object): ITranslateProvider;
useUrlLoader(url: string): ITranslateProvider;
- useStaticFilesLoader(options: IStaticFilesLoaderOptions): ITranslateProvider;
+ useStaticFilesLoader(options: IStaticFilesLoaderOptions | { files: IStaticFilesLoaderOptions[] }): ITranslateProvider;
useLoader(loaderFactory: string, options?: any): ITranslateProvider;
useLocalStorage(): ITranslateProvider;
useCookieStorage(): ITranslateProvider;
diff --git a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts
index dd129d141d..d6c389146b 100644
--- a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts
+++ b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts
@@ -400,6 +400,17 @@ declare namespace angular.ui.bootstrap {
* @default 'body'
*/
appendTo?: angular.IAugmentedJQuery;
+
+ /**
+ * A string reference to the component to be rendered that is registered with Angular's compiler. If using a directive, the directive must have `restrict: 'E'` and a template or templateUrl set.
+ *
+ * It supports these bindings:
+ * - `close` - A method that can be used to close a modal, passing a result. The result must be passed in this format: `{$value: myResult}`
+ * - `dismiss` - A method that can be used to dismiss a modal, passing a result. The result must be passed in this format: `{$value: myRejectedResult}`
+ * - `modalInstance` - The modal instance. This is the same `$uibModalInstance` injectable found when using `controller`.
+ * - `resolve` - An object of the modal resolve values. See [UI Router resolves] for details.
+ */
+ component?: string;
}
interface IModalStackService {
diff --git a/angular-ui-notification/angular-ui-notification-tests.ts b/angular-ui-notification/angular-ui-notification-tests.ts
new file mode 100644
index 0000000000..3039a74c9e
--- /dev/null
+++ b/angular-ui-notification/angular-ui-notification-tests.ts
@@ -0,0 +1,30 @@
+///
+
+function TestNotifications(NotificationProvider: angular.uiNotification.INotificationProvider, Notification: angular.uiNotification.INotificationService) {
+ NotificationProvider.setOptions({
+ delay: 10000,
+ startTop: 20,
+ startRight: 10,
+ verticalSpacing: 20,
+ horizontalSpacing: 20,
+ positionX: 'left',
+ positionY: 'bottom'
+ });
+
+ Notification.primary('Primary notification');
+ Notification('Primary notification');
+
+ Notification.success('Success notification');
+
+ Notification({message: 'Warning notification'}, 'warning');
+
+ Notification({message: 'Primary notification', title: 'Primary notification'});
+
+ Notification.error({message: 'Error notification 1s', delay: 1000});
+
+ Notification.success({message: 'Success notification
Some other content
This is a link
', title: 'Html content'});
+
+ Notification.error({message: 'Error Bottom Right', positionY: 'bottom', positionX: 'right'});
+
+ Notification.error({message: 'Error notification 1s', replaceMessage: true});
+}
\ No newline at end of file
diff --git a/angular-ui-notification/angular-ui-notification.d.ts b/angular-ui-notification/angular-ui-notification.d.ts
new file mode 100644
index 0000000000..48215e6d42
--- /dev/null
+++ b/angular-ui-notification/angular-ui-notification.d.ts
@@ -0,0 +1,82 @@
+// Type definitions for angular-ui-notification
+// Project: https://github.com/alexcrack/angular-ui-notification
+// Definitions by: Kamil Rojewski
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare namespace angular.uiNotification {
+ // Taken from angular to avoid dependency
+ interface IPromise {
+ /**
+ * Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected.
+ * The successCallBack may return IPromise for when a $q.reject() needs to be returned
+ * This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
+ */
+ then(successCallback: (promiseValue: T) => IPromise|TResult, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise;
+
+ /**
+ * Shorthand for promise.then(null, errorCallback)
+ */
+ catch(onRejected: (reason: any) => IPromise|TResult): IPromise;
+
+ /**
+ * Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful to release resources or do some clean-up that needs to be done whether the promise was rejected or resolved. See the full specification for more information.
+ *
+ * Because finally is a reserved word in JavaScript and reserved keywords are not supported as property names by ES3, you'll need to invoke the method like promise['finally'](callback) to make your code IE8 and Android 2.x compatible.
+ */
+ finally(finallyCallback: () => any): IPromise;
+ }
+
+ type XPosition = 'right'|'left'|'center';
+ type YPosition = 'top'|'bottom';
+
+ type MessageType = 'primary'|'info'|'success'|'warning'|'error';
+
+ interface IGlobalMessageOptions {
+ delay?: number;
+ startTop?: number;
+ startRight?: number;
+ verticalSpacing?: number;
+ horizontalSpacing?: number;
+ positionX?: XPosition;
+ positionY?: YPosition;
+ replaceMessage?: boolean;
+ templateUrl?: string;
+ onClose?: (element: any) => any;
+ closeOnClick?: boolean;
+ maxCount?: number;
+ }
+
+ interface IMessageOptions {
+ title?: string;
+ message?: string;
+ templateUrl?: string;
+ delay?: number;
+ type?: MessageType;
+ positionX?: XPosition;
+ positionY?: YPosition;
+ replaceMessage?: boolean;
+ closeOnClick?: boolean;
+ }
+
+ interface INotificationScope {
+ kill(isHard: boolean): void;
+ }
+
+ interface INotificationProvider {
+ setOptions(options: IGlobalMessageOptions): void;
+ }
+
+ type Message = string|IMessageOptions;
+
+ interface INotificationService {
+ primary(message: Message): IPromise;
+ info(message: Message): IPromise;
+ success(message: Message): IPromise;
+ warning(message: Message): IPromise;
+ error(message: Message): IPromise;
+
+ clearAll(): void;
+
+ (message: Message, type?: MessageType): IPromise;
+ }
+}
diff --git a/angular-ui-router/angular-ui-router-tests.ts b/angular-ui-router/angular-ui-router-tests.ts
index 9c5db1754a..a588faa448 100644
--- a/angular-ui-router/angular-ui-router-tests.ts
+++ b/angular-ui-router/angular-ui-router-tests.ts
@@ -1,6 +1,7 @@
///
-var myApp = angular.module('testModule');
+import uiRouterModule from "angular-ui-router";
+var myApp = angular.module("testModule", [uiRouterModule]);
interface MyAppScope extends ng.IScope {
items: string[];
@@ -141,7 +142,7 @@ class UrlLocatorTestService implements IUrlLocatorTestService {
private $state: ng.ui.IStateService
) {
$rootScope.$on("$locationChangeSuccess", (event: ng.IAngularEvent) => this.onLocationChangeSuccess(event));
- $rootScope.$on('$stateNotFound', (event: ng.IAngularEvent, unfoundState: ng.ui.IUnfoundState, fromState: ng.ui.IState, fromParams: {}) =>
+ $rootScope.$on('$stateNotFound', (event: ng.IAngularEvent, unfoundState: ng.ui.IUnfoundState, fromState: ng.ui.IState, fromParams: {}) =>
this.onStateNotFound(event, unfoundState, fromState, fromParams));
}
@@ -164,14 +165,14 @@ class UrlLocatorTestService implements IUrlLocatorTestService {
});
}
}
-
+
private onStateNotFound(event: ng.IAngularEvent,
unfoundState: ng.ui.IUnfoundState,
fromState: ng.ui.IState,
fromParams: {}) {
var unfoundTo: string = unfoundState.to;
var unfoundToParams: {} = unfoundState.toParams;
- var unfoundOptions: ng.ui.IStateOptions = unfoundState.options
+ var unfoundOptions: ng.ui.IStateOptions = unfoundState.options
}
private stateServiceTest() {
diff --git a/angular-ui-router/angular-ui-router.d.ts b/angular-ui-router/angular-ui-router.d.ts
index 0f0ac8caa3..7e4f097c8c 100644
--- a/angular-ui-router/angular-ui-router.d.ts
+++ b/angular-ui-router/angular-ui-router.d.ts
@@ -7,13 +7,7 @@
// Support for AMD require and CommonJS
declare module 'angular-ui-router' {
- // Since angular-ui-router adds providers for a bunch of
- // injectable dependencies, it doesn't really return any
- // actual data except the plain string 'ui.router'.
- //
- // As such, I don't think anybody will ever use the actual
- // default value of the module. So I've only included the
- // the types. (@xogeny)
+ export default "ui.router";
export type IState = angular.ui.IState;
export type IStateProvider = angular.ui.IStateProvider;
export type IUrlMatcher = angular.ui.IUrlMatcher;
@@ -109,7 +103,7 @@ declare namespace angular.ui {
toParams: {},
options: IStateOptions
}
-
+
interface IStateProvider extends angular.IServiceProvider {
state(name:string, config:IState): IStateProvider;
state(config:IState): IStateProvider;
diff --git a/angular-ui-scroll/angular-ui-scroll.d.ts b/angular-ui-scroll/angular-ui-scroll.d.ts
index 168c6ba271..5f24c8ec38 100644
--- a/angular-ui-scroll/angular-ui-scroll.d.ts
+++ b/angular-ui-scroll/angular-ui-scroll.d.ts
@@ -42,9 +42,10 @@ declare namespace angular.ui {
*/
topVisibleScope: ng.IRepeatScope;
/**
- * calling this method reinitializes and reloads the scroller content.
+ * calling this method reinitializes and reloads the scroller content.
+ * @param startIndex is an integer indicating what item index the scroller will use to start the load process.
*/
- reload(): void;
+ reload(startIndex?: number): void;
/**
* Replaces the item in the buffer at the given index with the new items.
*
diff --git a/angularjs/angular-component-router.d.ts b/angularjs/angular-component-router.d.ts
index 3b037b58b1..94d7dd7359 100644
--- a/angularjs/angular-component-router.d.ts
+++ b/angularjs/angular-component-router.d.ts
@@ -476,7 +476,7 @@ declare namespace angular {
// Supplement IComponentOptions from angular.d.ts with router-specific
// fields.
interface IComponentOptions {
- $canActivate?: () => boolean;
+ $canActivate?: (...args: any[]) => boolean | angular.IPromise;
$routeConfig?: RouteDefinition[];
}
}
diff --git a/angularjs/angular-resource.d.ts b/angularjs/angular-resource.d.ts
index 441a7e1d3d..f7e803c1c8 100644
--- a/angularjs/angular-resource.d.ts
+++ b/angularjs/angular-resource.d.ts
@@ -42,15 +42,20 @@ declare namespace angular.resource {
(url: string, paramDefaults?: any,
/** example: {update: { method: 'PUT' }, delete: deleteDescriptor }
where deleteDescriptor : IActionDescriptor */
- actions?: any, options?: IResourceOptions): IResourceClass>;
+ actions?: IActionHash, options?: IResourceOptions): IResourceClass>;
(url: string, paramDefaults?: any,
/** example: {update: { method: 'PUT' }, delete: deleteDescriptor }
where deleteDescriptor : IActionDescriptor */
- actions?: any, options?: IResourceOptions): U;
+ actions?: IActionHash, options?: IResourceOptions): U;
(url: string, paramDefaults?: any,
/** example: {update: { method: 'PUT' }, delete: deleteDescriptor }
where deleteDescriptor : IActionDescriptor */
- actions?: any, options?: IResourceOptions): IResourceClass;
+ actions?: IActionHash, options?: IResourceOptions): IResourceClass;
+ }
+
+ // Hash of action descriptors allows custom action names
+ interface IActionHash {
+ [action: string]: IActionDescriptor
}
// Just a reference to facilitate describing new actions
@@ -186,6 +191,12 @@ declare namespace angular {
/** creating a resource service factory */
factory(name: string, resourceServiceFactoryFunction: angular.resource.IResourceServiceFactoryFunction): IModule;
}
+
+ namespace auto {
+ interface IInjectorService {
+ get(name: '$resource'): ng.resource.IResourceService;
+ }
+ }
}
interface Array
diff --git a/angularjs/angular-tests.ts b/angularjs/angular-tests.ts
index 10d3b17eda..07f67a7375 100644
--- a/angularjs/angular-tests.ts
+++ b/angularjs/angular-tests.ts
@@ -867,6 +867,26 @@ angular.module('docsTabsExample', [])
};
});
+angular.module('multiSlotTranscludeExample', [])
+ .directive('dropDownMenu', function() {
+ return {
+ transclude: {
+ button: 'button',
+ list: 'ul',
+ },
+ link: function(scope, element, attrs, ctrl, transclude) {
+ // without scope
+ transclude().appendTo(element);
+ transclude(clone => clone.appendTo(element));
+
+ // with scope
+ transclude(scope, clone => clone.appendTo(element));
+ transclude(scope, clone => clone.appendTo(element), element, 'button');
+ transclude(scope, null, element, 'list').addClass('drop-down-list').appendTo(element);
+ }
+ };
+ });
+
angular.module('componentExample', [])
.component('counter', {
require: {'ctrl': '^ctrl'},
@@ -1098,6 +1118,12 @@ function parseTyping() {
}
}
+function parseWithParams() {
+ var $parse: angular.IParseService;
+ var compiledExp = $parse('a.b.c', () => null);
+ var compiledExp = $parse('a.b.c', null, false);
+}
+
function doBootstrap(element: Element | JQuery, mode: string): ng.auto.IInjectorService {
if (mode === 'debug') {
return angular.bootstrap(element, ['main', function($provide: ng.auto.IProvideService) {
diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts
index e9175a25ce..d78f39bec9 100644
--- a/angularjs/angular.d.ts
+++ b/angularjs/angular.d.ts
@@ -1,6 +1,6 @@
// Type definitions for Angular JS 1.5
// Project: http://angularjs.org
-// Definitions by: Diego Vilar
+// Definitions by: Diego Vilar , Georgii Dolzhykov
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -118,14 +118,15 @@ declare namespace angular {
fromJson(json: string): any;
identity(arg?: T): T;
injector(modules?: any[], strictDi?: boolean): auto.IInjectorService;
- isArray(value: any): boolean;
- isDate(value: any): boolean;
+ isArray(value: any): value is Array;
+ isDate(value: any): value is Date;
isDefined(value: any): boolean;
isElement(value: any): boolean;
- isFunction(value: any): boolean;
- isNumber(value: any): boolean;
- isObject(value: any): boolean;
- isString(value: any): boolean;
+ isFunction(value: any): value is Function;
+ isNumber(value: any): value is number;
+ isObject(value: any): value is Object;
+ isObject(value: any): value is T;
+ isString(value: any): value is string;
isUndefined(value: any): boolean;
lowercase(str: string): string;
@@ -387,6 +388,7 @@ declare namespace angular {
$invalid: boolean;
$submitted: boolean;
$error: any;
+ $name: string;
$pending: any;
$addControl(control: INgModelController | IFormController): void;
$removeControl(control: INgModelController | IFormController): void;
@@ -873,7 +875,7 @@ declare namespace angular {
// see http://docs.angularjs.org/api/ng.$parseProvider
///////////////////////////////////////////////////////////////////////////
interface IParseService {
- (expression: string): ICompiledExpression;
+ (expression: string, interceptorFn?: (value: any, scope: IScope, locals: any) => any, expensiveChecks?: boolean): ICompiledExpression;
}
interface IParseProvider {
@@ -985,7 +987,10 @@ declare namespace angular {
// DocumentService
// see http://docs.angularjs.org/api/ng.$document
///////////////////////////////////////////////////////////////////////////
- interface IDocumentService extends JQuery {}
+ interface IDocumentService extends JQuery {
+ // Must return intersection type for index signature compatibility with JQuery
+ [index: number]: HTMLElement & Document;
+ }
///////////////////////////////////////////////////////////////////////////
// ExceptionHandlerService
@@ -1254,7 +1259,7 @@ declare namespace angular {
// This corresponds to $transclude (and also the transclude function passed to link).
interface ITranscludeFunction {
// If the scope is provided, then the cloneAttachFn must be as well.
- (scope: IScope, cloneAttachFn: ICloneAttachFunction): JQuery;
+ (scope: IScope, cloneAttachFn: ICloneAttachFunction, futureParentElement?: JQuery, slotName?: string): JQuery;
// If one argument is provided, then it's assumed to be the cloneAttachFn.
(cloneAttachFn?: ICloneAttachFunction): JQuery;
}
@@ -1407,6 +1412,16 @@ declare namespace angular {
* Absolute or relative URL of the resource that is being requested.
*/
url: string;
+ /**
+ * Event listeners to be bound to the XMLHttpRequest object.
+ * To bind events to the XMLHttpRequest upload object, use uploadEventHandlers. The handler will be called in the context of a $apply block.
+ */
+ eventHandlers?: { [type: string]: EventListenerOrEventListenerObject };
+ /**
+ * Event listeners to be bound to the XMLHttpRequest upload object.
+ * To bind events to the XMLHttpRequest object, use eventHandlers. The handler will be called in the context of a $apply block.
+ */
+ uploadEventHandlers?: { [type: string]: EventListenerOrEventListenerObject };
}
interface IHttpHeadersGetter {
@@ -1710,14 +1725,24 @@ declare namespace angular {
* Define DOM attribute binding to component properties. Component properties are always bound to the component
* controller and not to the scope.
*/
- bindings?: {[binding: string]: string};
+ bindings?: IComponentBindings;
/**
* Whether transclusion is enabled. Enabled by default.
*/
transclude?: boolean | string | {[slot: string]: string};
+ /**
+ * Requires the controllers of other directives and binds them to this component's controller.
+ * The object keys specify the property names under which the required controllers (object values) will be bound.
+ * Note that the required controllers will not be available during the instantiation of the controller,
+ * but they are guaranteed to be available just before the $onInit method is executed!
+ */
require?: {[controller: string]: string};
}
+ interface IComponentBindings {
+ [binding: string]: string;
+ }
+
interface IComponentTemplateFn {
( $element?: JQuery, $attrs?: IAttributes ): string;
}
@@ -1735,12 +1760,12 @@ declare namespace angular {
*/
$onInit?(): void;
/**
- * Called whenever one-way bindings are updated. The changesObj is a hash whose keys are the names of the bound
- * properties that have changed, and the values are an {@link IChangesObject} object of the form
+ * Called whenever one-way bindings are updated. The onChangesObj is a hash whose keys are the names of the bound
+ * properties that have changed, and the values are an {@link IChangesObject} object of the form
* { currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a component such as
* cloning the bound value to prevent accidental mutation of the outer value.
*/
- $onChanges?(changesObj: {[property:string]: IChangesObject}): void;
+ $onChanges?(onChangesObj: IOnChangesObject): void;
/**
* Called on a controller when its containing scope is destroyed. Use this hook for releasing external resources,
* watches and event handlers.
@@ -1756,6 +1781,10 @@ declare namespace angular {
*/
$postLink?(): void;
}
+
+ interface IOnChangesObject {
+ [property: string]: IChangesObject;
+ }
interface IChangesObject {
currentValue: any;
@@ -1802,6 +1831,10 @@ declare namespace angular {
): void | IDirectivePrePost;
}
+ interface IDirectiveScope {
+ [property: string]: string;
+ }
+
interface IDirective {
compile?: IDirectiveCompileFn;
controller?: any;
@@ -1815,7 +1848,7 @@ declare namespace angular {
bindToController?: boolean | Object;
link?: IDirectiveLinkFn | IDirectivePrePost;
multiElement?: boolean;
- name?: string;
+ directiveName?: string;
priority?: number;
/**
* @deprecated
@@ -1823,7 +1856,7 @@ declare namespace angular {
replace?: boolean;
require?: string | string[] | {[controller: string]: string};
restrict?: string;
- scope?: boolean | Object;
+ scope?: boolean | IDirectiveScope;
template?: string | Function;
templateNamespace?: string;
templateUrl?: string | Function;
diff --git a/angularjs/legacy/angular-1.4.d.ts b/angularjs/legacy/angular-1.4.d.ts
index 22c504712e..2cb129dca1 100644
--- a/angularjs/legacy/angular-1.4.d.ts
+++ b/angularjs/legacy/angular-1.4.d.ts
@@ -886,7 +886,7 @@ declare namespace angular {
// see http://docs.angularjs.org/api/ng.$parseProvider
///////////////////////////////////////////////////////////////////////////
interface IParseService {
- (expression: string): ICompiledExpression;
+ (expression: string, interceptorFn?: (value: any, scope: IScope, locals: any) => any, expensiveChecks?: boolean): ICompiledExpression;
}
interface IParseProvider {
diff --git a/anydb-sql-migrations/anydb-sql-migrations.d.ts b/anydb-sql-migrations/anydb-sql-migrations.d.ts
index 9ab421c3ac..98961266a9 100644
--- a/anydb-sql-migrations/anydb-sql-migrations.d.ts
+++ b/anydb-sql-migrations/anydb-sql-migrations.d.ts
@@ -3,7 +3,7 @@
// Definitions by: Gorgi Kosev
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-///
+///
///
declare module "anydb-sql-migrations" {
@@ -31,4 +31,4 @@ declare module "anydb-sql-migrations" {
items: MigrationTask[];
}) => any) => Promise;
};
-}
\ No newline at end of file
+}
diff --git a/aphrodite/aphrodite-tests.tsx b/aphrodite/aphrodite-tests.tsx
new file mode 100644
index 0000000000..76d28ca43f
--- /dev/null
+++ b/aphrodite/aphrodite-tests.tsx
@@ -0,0 +1,82 @@
+///
+///
+
+import * as React from "react";
+import { StyleSheet, css, StyleSheetServer, StyleSheetTestUtils } from "aphrodite";
+
+const styles = StyleSheet.create({
+ red: {
+ backgroundColor: 'red'
+ },
+ blue: {
+ backgroundColor: 'blue'
+ },
+ hover: {
+ ':hover': {
+ backgroundColor: 'red'
+ }
+ },
+ small: {
+ '@media (max-width: 600px)': {
+ backgroundColor: 'red',
+ }
+ }
+});
+
+const coolFont = {
+ fontFamily: "CoolFont",
+ fontStyle: "normal",
+ fontWeight: "normal",
+ src: "url('coolfont.woff2') format('woff2')"
+};
+
+const withFont = StyleSheet.create({
+ headingText: {
+ fontFamily: coolFont,
+ fontSize: 20
+ },
+ bodyText: {
+ fontFamily: [coolFont, "sans-serif"],
+ fontSize: 12
+ }
+});
+
+
+class App extends React.Component<{}, {}> {
+ render() {
+ return
+
+ This is red.
+
+
+ This turns red on hover.
+
+
+ This turns red when the browser is less than 600px width.
+
+
+ This is blue.
+
+
+ This is blue and turns red when the browser is less than
+ 600px width.
+
+
+ With font
+
+
;
+ }
+}
+
+const output = StyleSheetServer.renderStatic(() => {
+ return "test";
+});
+
+output.css.content;
+output.css.renderedClassNames;
+output.html;
+
+StyleSheet.rehydrate(output.css.renderedClassNames);
+
+StyleSheetTestUtils.suppressStyleInjection();
+StyleSheetTestUtils.clearBufferAndResumeStyleInjection();
diff --git a/aphrodite/aphrodite.d.ts b/aphrodite/aphrodite.d.ts
new file mode 100644
index 0000000000..89d8646e54
--- /dev/null
+++ b/aphrodite/aphrodite.d.ts
@@ -0,0 +1,76 @@
+// Type definitions for Aphrodite 0.5.0
+// Project: https://github.com/Khan/aphrodite
+// Definitions by: Alexey Svetliakov
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+///
+
+declare module "aphrodite" {
+ import * as React from "react";
+
+ /**
+ * Aphrodite style declaration
+ */
+ export interface StyleDeclaration {
+ [key: string]: React.CSSProperties;
+ }
+
+ interface StyleSheetStatic {
+ /**
+ * Create style sheet
+ */
+ create(styles: T): T;
+ /**
+ * Rehydrate class names from server renderer
+ */
+ rehydrate(renderedClassNames: string[]): void;
+ }
+
+ export var StyleSheet: StyleSheetStatic;
+ /**
+ * Get class names from passed styles
+ */
+ export function css(...styles: any[]): string;
+
+ interface StaticRendererResult {
+ html: string;
+ css: {
+ content: string;
+ renderedClassNames: string[];
+ }
+ }
+
+ /**
+ * Utilities for using Aphrodite server-side.
+ */
+ interface StyleSheetServerStatic {
+ renderStatic(renderFunc: () => string): StaticRendererResult;
+ }
+
+ export var StyleSheetServer: StyleSheetServerStatic;
+
+ interface StyleSheetTestUtilsStatic {
+ /**
+ * Prevent styles from being injected into the DOM.
+ *
+ * This is useful in situations where you'd like to test rendering UI
+ * components which use Aphrodite without any of the side-effects of
+ * Aphrodite happening. Particularly useful for testing the output of
+ * components when you have no DOM, e.g. testing in Node without a fake DOM.
+ *
+ * Should be paired with a subsequent call to
+ * clearBufferAndResumeStyleInjection.
+ */
+ suppressStyleInjection(): void;
+ /**
+ * Opposite method of preventStyleInject.
+ */
+ clearBufferAndResumeStyleInjection(): void;
+ }
+
+ export var StyleSheetTestUtils: StyleSheetTestUtilsStatic;
+}
+
+declare module "aphrodite/no-important" {
+ export * from "aphrodite";
+}
diff --git a/app-root-path/app-root-path-tests.ts b/app-root-path/app-root-path-tests.ts
new file mode 100644
index 0000000000..64d8cdab6b
--- /dev/null
+++ b/app-root-path/app-root-path-tests.ts
@@ -0,0 +1,10 @@
+///
+import * as root from 'app-root-path';
+
+let resolvedPath: string;
+resolvedPath = root.resolve('../dir');
+resolvedPath = root.path;
+resolvedPath = root.toString();
+let resolvedModule: any = root.require('app-root-path');
+root.setPath('C:\\app-root');
+
diff --git a/app-root-path/app-root-path.d.ts b/app-root-path/app-root-path.d.ts
new file mode 100644
index 0000000000..7cccc59e01
--- /dev/null
+++ b/app-root-path/app-root-path.d.ts
@@ -0,0 +1,39 @@
+// Type definitions for app-root-path 1.2.1
+// Project: https://github.com/inxilpro/node-app-root-path
+// Definitions by: Shant Marouti
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare module 'app-root-path' {
+ interface RootPath {
+
+ /**
+ * Application root directory absolute path
+ * @type {string}
+ */
+ path: string;
+
+ /**
+ * Resolves relative path from root to absolute path
+ * @param {string} pathToModule
+ * @returns {string}
+ */
+ resolve(pathToModule: string): string;
+
+ /**
+ * Resolve module by relative addressing from root
+ * @param {string} pathToModule
+ * @returns {*}
+ */
+ require(pathToModule: string): any;
+
+ /**
+ * Explicitly set root path
+ * @param {string} explicitlySetPath
+ */
+ setPath(explicitlySetPath: string): void;
+
+ toString(): string;
+ }
+ var RootPath: RootPath;
+ export = RootPath;
+}
\ No newline at end of file
diff --git a/applicationinsights-js/applicationinsights-js.d.ts b/applicationinsights-js/applicationinsights-js.d.ts
index d9ad3c1c9d..ba154e5fe6 100644
--- a/applicationinsights-js/applicationinsights-js.d.ts
+++ b/applicationinsights-js/applicationinsights-js.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for ApplicationInsights-JS v0.22.14
+// Type definitions for ApplicationInsights-JS v0.23.2
// Project: https://github.com/Microsoft/ApplicationInsights-JS
// Definitions by: Kamil Szostak
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -788,3 +788,9 @@ declare module Microsoft.ApplicationInsights {
_onerror(message: string, url: string, lineNumber: number, columnNumber: number, error: Error): any;
}
}
+
+declare module 'applicationinsights-js' {
+ export let AppInsights: Microsoft.ApplicationInsights.IAppInsights;
+}
+
+declare var appInsights: Microsoft.ApplicationInsights.IAppInsights;
\ No newline at end of file
diff --git a/asana/asana.d.ts b/asana/asana.d.ts
index 61cb54d26f..8b618b81a3 100644
--- a/asana/asana.d.ts
+++ b/asana/asana.d.ts
@@ -3,7 +3,7 @@
// Definitions by: Qubo
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-///
+///
///
declare module "asana" {
diff --git a/async/async-tests.ts b/async/async-tests.ts
index e7af9120a1..63640cecf6 100644
--- a/async/async-tests.ts
+++ b/async/async-tests.ts
@@ -392,13 +392,6 @@ function (results) {
]);
});
-var sys;
-var iterator = async.iterator([
- function () { sys.p('one'); },
- function () { sys.p('two'); },
- function () { sys.p('three'); }
-]);
-
async.parallel([
async.apply(fs.writeFile, 'testfile1', 'test1'),
async.apply(fs.writeFile, 'testfile2', 'test2'),
diff --git a/async/async.d.ts b/async/async.d.ts
index 6288a269a1..96da35c1ea 100644
--- a/async/async.d.ts
+++ b/async/async.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Async 1.4.2
+// Type definitions for Async 2.0.1
// Project: https://github.com/caolan/async
// Definitions by: Boris Yankov , Arseniy Maximov , Joe Herman
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -37,6 +37,13 @@ interface AsyncQueue {
pause(): void
resume(): void;
kill(): void;
+ workersList(): {
+ data: T,
+ callback: Function
+ }[];
+ error(error: Error, data: any): void;
+ unsaturated(): void;
+ buffer: number;
}
interface AsyncPriorityQueue {
@@ -54,6 +61,14 @@ interface AsyncPriorityQueue {
pause(): void;
resume(): void;
kill(): void;
+ workersList(): {
+ data: T,
+ priority: number,
+ callback: Function
+ }[];
+ error(error: Error, data: any): void;
+ unsaturated(): void;
+ buffer: number;
}
interface AsyncCargo {
@@ -85,6 +100,9 @@ interface Async {
map(arr: T[], iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): any;
mapSeries(arr: T[], iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): any;
mapLimit(arr: T[], limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): any;
+ mapValuesLimit(obj: {[name: string]: T}, limit: number, iteratee: (value: string, key: T, callback: AsyncResultCallback) => void, callback: AsyncResultCallback): void;
+ mapValues(obj: {[name: string]: T}, iteratee: (value: string, key: T, callback: AsyncResultCallback) => void, callback: AsyncResultCallback): void;
+ mapValuesSeries: typeof async.mapValues;
filter(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): any;
select(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): any;
filterSeries(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): any;
@@ -100,11 +118,17 @@ interface Async {
reduceRight(arr: T[], memo: R, iterator: AsyncMemoIterator, callback: AsyncResultCallback): any;
foldr(arr: T[], memo: R, iterator: AsyncMemoIterator, callback: AsyncResultCallback): any;
detect(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): any;
+ find: typeof async.detect;
detectSeries(arr: T[], iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): any;
+ findSeries: typeof async.detectSeries;
detectLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): any;
+ findLimit: typeof async.detectLimit;
sortBy(arr: T[], iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): any;
some(arr: T[], iterator: AsyncBooleanIterator, callback?: (result: boolean) => void): any;
someLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: (result: boolean) => void): any;
+ anyLimit: typeof async.someLimit;
+ someSeries(arr: T[], iterator: AsyncBooleanIterator, callback?: (result: boolean) => void): any;
+ anySeries: typeof async.someSeries;
any(arr: T[], iterator: AsyncBooleanIterator, callback?: (result: boolean) => void): any;
every(arr: T[], iterator: AsyncBooleanIterator, callback?: (result: boolean) => any): any;
everyLimit(arr: T[], limit: number, iterator: AsyncBooleanIterator, callback?: (result: boolean) => any): any;
@@ -134,18 +158,35 @@ interface Async {
queue(worker: AsyncWorker, concurrency?: number): AsyncQueue;
priorityQueue(worker: AsyncWorker, concurrency: number): AsyncPriorityQueue;
cargo(worker : (tasks: any[], callback : ErrorCallback) => void, payload? : number) : AsyncCargo;
- auto(tasks: any, callback?: (error: Error, results: any) => void): void;
+ auto(tasks: any, concurrency?: number, callback?: (error: Error, results: any) => void): void;
+ autoInject(tasks: any, callback?: (error: Error, results: any) => void): void;
retry(opts: number, task: (callback : AsyncResultCallback, results: any) => void, callback: (error: Error, results: any) => void): void;
retry(opts: { times: number, interval: number|((retryCount: number) => number) }, task: (callback: AsyncResultCallback, results : any) => void, callback: (error: Error, results: any) => void): void;
- iterator(tasks: Function[]): Function;
+ retryable(opts: number | {times: number, interval: number}, task: AsyncFunction): AsyncFunction;
apply(fn: Function, ...arguments: any[]): AsyncFunction;
- nextTick(callback: Function): void;
- setImmediate(callback: Function): void;
+ nextTick(callback: Function, ...args: any[]): void;
+ setImmediate: typeof async.nextTick;
+
+ allLimit(arr: T[], limit: number, iteratee: AsyncBooleanIterator, cb?: (result: boolean) => any) : any;
+ everySeries(arr: T[], iteratee: AsyncBooleanIterator, cb?: (result: boolean) => any) : any
+ allSeries: typeof async.everySeries;
+
+ reflect(fn: AsyncFunction) : (callback: (err: void, result: {error?: Error, value?: T}) => void) => void;
+ reflectAll(tasks: AsyncFunction[]): ((callback: (err: void, result: {error?: Error, value?: T}) => void) => void)[];
+
+ timeout(fn: AsyncFunction, milliseconds: number, info: any): AsyncFunction;
times (n: number, iterator: AsyncResultIterator, callback: AsyncResultArrayCallback): void;
timesSeries(n: number, iterator: AsyncResultIterator, callback: AsyncResultArrayCallback): void;
timesLimit(n: number, limit: number, iterator: AsyncResultIterator, callback: AsyncResultArrayCallback): void;
+ transform(arr: T[], iteratee: (acc: R[], item: T, key: string, callback: (error?: Error) => void) => void): void;
+ transform(arr: T[], acc: R[], iteratee: (acc: R[], item: T, key: string, callback: (error?: Error) => void) => void): void;
+ transform(arr: {[key: string] : T}, iteratee: (acc: {[key: string] : R}, item: T, key: string, callback: (error?: Error) => void) => void): void;
+ transform(arr: {[key: string] : T}, acc: {[key: string] : R}, iteratee: (acc: {[key: string] : R}, item: T, key: string, callback: (error?: Error) => void) => void): void;
+
+ race(tasks: (AsyncFunction)[], callback: AsyncResultCallback) : void;
+
// Utils
memoize(fn: Function, hasher?: Function): Function;
unmemoize(fn: Function): Function;
@@ -155,7 +196,6 @@ interface Async {
wrapSync(fn: Function): Function;
log(fn: Function, ...arguments: any[]): void;
dir(fn: Function, ...arguments: any[]): void;
- noConflict(): Async;
}
declare var async: Async;
diff --git a/atom/atom.d.ts b/atom/atom.d.ts
index 389d6ef16e..ac899ba5ac 100644
--- a/atom/atom.d.ts
+++ b/atom/atom.d.ts
@@ -946,9 +946,14 @@ declare namespace AtomCore {
registry: any;
repository: Object;
scopeName: string;
+ tokenizeLines: (text: string) => any;
// TBD
}
+
+ interface IGrammars {
+ grammarForScopeName(scope: string): IGrammar;
+ }
interface IPane /* extends Theorist.Model */ {
itemForURI: (uri:string)=>IEditor;
@@ -1302,6 +1307,7 @@ declare namespace AtomCore {
deserializers:IDeserializerManager;
config: IConfig;
commands: ICommandRegistry;
+ grammars: IGrammars;
keymaps: IKeymapManager;
keymap: IKeymapManager;
packages: IPackageManager;
diff --git a/auth0-js/auth0-js-tests.ts b/auth0-js/auth0-js-tests.ts
new file mode 100644
index 0000000000..c92251db91
--- /dev/null
+++ b/auth0-js/auth0-js-tests.ts
@@ -0,0 +1,23 @@
+///
+
+var auth0 = new Auth0({
+ domain: 'mine.auth0.com',
+ clientID: 'dsa7d77dsa7d7',
+ callbackURL: 'http://my-app.com/callback',
+ callbackOnLocationHash: true
+});
+
+auth0.login({
+ connection: 'google-oauth2',
+ popup: true,
+ popupOptions: {
+ width: 450,
+ height: 800
+ }
+}, (err, profile, idToken, accessToken, state) => {
+ if (err) {
+ alert("something went wrong: " + err.message);
+ return;
+ }
+ alert('hello ' + profile.name);
+ });
diff --git a/auth0-js/auth0-js.d.ts b/auth0-js/auth0-js.d.ts
new file mode 100644
index 0000000000..250c7a850e
--- /dev/null
+++ b/auth0-js/auth0-js.d.ts
@@ -0,0 +1,133 @@
+// Type definitions for Auth0.js
+// Project: https://github.com/auth0/auth0.js
+// Definitions by: Robert McLaws
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/** Extensions to the browser Window object. */
+interface Window {
+ /** Allows you to pass the id_token to other APIs, as specified in https://docs.auth0.com/apps-apis */
+ token: string;
+}
+
+/** This is the interface for the main Auth0 client. */
+interface Auth0Static {
+
+ new(options: Auth0ClientOptions): Auth0Static;
+ changePassword(options: any, callback?: Function): void;
+ decodeJwt(jwt: string): any;
+ login(options: any, callback: (error?: Auth0Error, profile?: Auth0UserProfile, id_token?: string, access_token?: string, state?: string) => any): void;
+ loginWithPopup(options: Auth0LoginOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, id_token?: string, access_token?: string, state?: string) => any): void;
+ loginWithResourceOwner(options: Auth0LoginOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, id_token?: string, access_token?: string, state?: any) => any): void;
+ loginWithUsernamePassword(options: Auth0LoginOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, id_token?: string, access_token?: string, state?: string) => any): void;
+ logout(query: string): void;
+ getConnections(callback?: Function): void;
+ refreshToken(refreshToken: string, callback: (error?: Auth0Error, delegationResult?: Auth0DelegationToken) => any): void;
+ getDelegationToken(targetClientId: string, id_token: string, options: any, callback: (error?: Auth0Error, delegationResult?: Auth0DelegationToken) => any): void;
+ getProfile(id_token: string, callback?: Function): Auth0UserProfile;
+ getSSOData(withActiveDirectories: any, callback?: Function): void;
+ parseHash(hash: string): Auth0DecodedHash;
+ signup(options: Auth0SignupOptions, callback: Function): void;
+ validateUser(options: any, callback: (error?: Auth0Error, valid?: any) => any): void;
+}
+
+/** Represents constructor options for the Auth0 client. */
+interface Auth0ClientOptions {
+ clientID: string;
+ callbackURL: string;
+ callbackOnLocationHash?: boolean;
+ domain: string;
+ forceJSONP?: boolean;
+}
+
+/** Represents a normalized UserProfile. */
+interface Auth0UserProfile {
+ email: string;
+ email_verified: boolean;
+ family_name: string;
+ gender: string;
+ given_name: string;
+ locale: string;
+ name: string;
+ nickname: string;
+ picture: string;
+ user_id: string;
+ /** Represents one or more Identities that may be associated with the User. */
+ identities: Auth0Identity[];
+ user_metadata?: any;
+ app_metadata?: any;
+}
+
+/** Represents an Auth0UserProfile that has a Microsoft Account as the primary identity. */
+interface MicrosoftUserProfile extends Auth0UserProfile {
+ emails: string[];
+}
+
+/** Represents an Auth0UserProfile that has an Office365 account as the primary identity. */
+interface Office365UserProfile extends Auth0UserProfile {
+ tenantid: string;
+ upn: string;
+}
+
+/** Represents an Auth0UserProfile that has an Active Directory account as the primary identity. */
+interface AdfsUserProfile extends Auth0UserProfile {
+ issuer: string;
+}
+
+/** Represents multiple identities assigned to a user. */
+interface Auth0Identity {
+ access_token: string;
+ connection: string;
+ isSocial: boolean;
+ provider: string;
+ user_id: string;
+}
+
+interface Auth0DecodedHash {
+ access_token: string;
+ id_token: string;
+ profile: Auth0UserProfile;
+ state: any;
+}
+
+interface Auth0PopupOptions {
+ width: number;
+ height: number;
+}
+
+interface Auth0LoginOptions {
+ auto_login?: boolean;
+ connection?: string;
+ email?: string;
+ username?: string;
+ password?: string;
+ popup?: boolean;
+ popupOptions?: Auth0PopupOptions;
+}
+
+interface Auth0SignupOptions extends Auth0LoginOptions {
+ auto_login: boolean;
+}
+
+interface Auth0Error {
+ code: any;
+ details: any;
+ name: string;
+ message: string;
+ status: any;
+}
+
+/** Represents the response from an API Token Delegation request. */
+interface Auth0DelegationToken {
+ /** The length of time in seconds the token is valid for. */
+ expires_in: string;
+ /** The JWT for delegated access. */
+ id_token: string;
+ /** The type of token being returned. Possible values: "Bearer" */
+ token_type: string;
+}
+
+declare var Auth0: Auth0Static;
+
+declare module "auth0-js" {
+ export = Auth0
+}
diff --git a/auth0.lock/auth0.lock-tests.ts b/auth0.lock/auth0.lock-tests.ts
index fd646ee1bb..d466cf5937 100644
--- a/auth0.lock/auth0.lock-tests.ts
+++ b/auth0.lock/auth0.lock-tests.ts
@@ -1,13 +1,165 @@
-///
+///
///
-var lock: Auth0LockStatic = new Auth0Lock("dsa7d77dsa7d7", "mine.auth0.com");
+const CLIENT_ID = "YOUR_AUTH0_APP_CLIENTID";
+const DOMAIN = "YOUR_DOMAIN_AT.auth0.com";
-lock.showSignin({
- connections: ["facebook", "google-oauth2", "twitter", "Username-Password-Authentication"],
- icon: "https://contoso.com/logo-32.png",
- socialBigButtons: true
- },
- () => {
- // The Auth0 Widget is now loaded.
+var lock: Auth0LockStatic = new Auth0Lock(CLIENT_ID, DOMAIN);
+
+lock.show();
+lock.hide();
+lock.logout(() => {});
+
+// The examples below are lifted from auth0-lock documentation on Github
+
+// "on" event-driven example
+
+lock.on("authenticated", function(authResult : any) {
+ lock.getProfile(authResult.idToken, function(error, profile) {
+ if (error) {
+ // Handle error
+ return;
+ }
+
+ localStorage.setItem("idToken", authResult.idToken);
+ localStorage.setItem("profile", JSON.stringify(profile));
+ });
});
+
+
+// test theme
+
+var themeOptions : Auth0LockConstructorOptions = {
+ theme: {
+ logo: "https://example.com/assets/logo.png",
+ primaryColor: "green"
+ }
+};
+
+new Auth0Lock(CLIENT_ID, DOMAIN, themeOptions);
+
+// test authentication
+
+var authOptions : Auth0LockConstructorOptions = {
+ auth: {
+ params: { state: "foo" },
+ redirect: true,
+ redirectUrl: "some url",
+ responseType: "token",
+ sso: true
+ }
+};
+
+new Auth0Lock(CLIENT_ID, DOMAIN, authOptions);
+
+// test multi-variant example
+
+var multiVariantOptions : Auth0LockConstructorOptions = {
+ container: "myContainer",
+ closable: false,
+ languageDictionary: {
+ signUpTerms: "I agree to the terms of service ...",
+ title: "My Company",
+ },
+ autofocus: false
+};
+
+new Auth0Lock(CLIENT_ID, DOMAIN, multiVariantOptions);
+
+// test text-field additional sign up field
+
+var textFieldOptions : Auth0LockConstructorOptions = {
+ additionalSignUpFields: [{
+ name: "address",
+ placeholder: "enter your address",
+ // The following properties are optional
+ icon: "https://example.com/assests/address_icon.png",
+ prefill: "street 123",
+ validator: function(input : string) {
+ return {
+ valid: input.length >= 10,
+ hint: "Must have 10 or more chars" // optional
+ };
+ }
+ }]
+};
+
+new Auth0Lock(CLIENT_ID, DOMAIN, textFieldOptions);
+
+// test select-field additional sign up field
+
+var selectFieldOptions : Auth0LockConstructorOptions = {
+ additionalSignUpFields: [{
+ type: "select",
+ name: "location",
+ placeholder: "choose your location",
+ options: [
+ {value: "us", label: "United States"},
+ {value: "fr", label: "France"},
+ {value: "ar", label: "Argentina"}
+ ],
+ // The following properties are optional
+ icon: "https://example.com/assests/location_icon.png",
+ prefill: "us"
+ }]
+};
+
+new Auth0Lock(CLIENT_ID, DOMAIN, selectFieldOptions);
+
+// test select-field additional sign up field with callbacks for
+
+var selectFieldOptionsWithCallbacks : Auth0LockConstructorOptions = {
+ additionalSignUpFields: [{
+ type: "select",
+ name: "location",
+ placeholder: "choose your location",
+ options: function(cb) {
+ // obtain options, in case of error you call cb with the error in the
+ // first arg instead of null
+
+ let options = [
+ {value: "us", label: "United States"},
+ {value: "fr", label: "France"},
+ {value: "ar", label: "Argentina"}
+ ];
+
+ cb(null, options);
+ },
+ icon: "https://example.com/assests/location_icon.png",
+ prefill: function(cb) {
+ // obtain prefill, in case of error you call cb with the error in the
+ // first arg instead of null
+
+ let prefill = "us";
+
+ cb(null, prefill);
+ }
+ }]
+}
+
+new Auth0Lock(CLIENT_ID, DOMAIN, selectFieldOptionsWithCallbacks);
+
+// test Avatar options
+
+var avatarOptions : Auth0LockConstructorOptions = {
+ avatar: {
+ url: (email : string, cb : Auth0LockAvatarUrlCallback) => {
+ // obtain url for email, in case of error you call cb with the error in
+ // the first arg instead of null
+
+ let url = "url";
+
+ cb(null, url);
+ },
+ displayName: (email : string, cb : Auth0LockAvatarDisplayNameCallback) => {
+ // obtain displayName for email, in case of error you call cb with the
+ // error in the first arg instead of null
+
+ let displayName = "displayName";
+
+ cb(null, displayName);
+ }
+ }
+};
+
+new Auth0Lock(CLIENT_ID, DOMAIN, avatarOptions);
diff --git a/auth0.lock/auth0.lock.d.ts b/auth0.lock/auth0.lock.d.ts
index 15f767984b..2d74f6e6a5 100644
--- a/auth0.lock/auth0.lock.d.ts
+++ b/auth0.lock/auth0.lock.d.ts
@@ -1,9 +1,69 @@
-// Type definitions for Auth0Widget.js
+// Type definitions for auth0-lock v10.0.1
// Project: http://auth0.com
-// Definitions by: Robert McLaws
+// Definitions by: Brian Caruso
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-///
+///
+
+interface Auth0LockAdditionalSignUpFieldOption {
+ value: string;
+ label: string;
+}
+
+type Auth0LockAdditionalSignUpFieldOptionsCallback =
+ (error: Auth0Error, options: Auth0LockAdditionalSignUpFieldOption[]) => void;
+
+type Auth0LockAdditionalSignUpFieldOptionsFunction =
+ (callback: Auth0LockAdditionalSignUpFieldOptionsCallback) => void;
+
+type Auth0LockAdditionalSignUpFieldPrefillCallback =
+ (error: Auth0Error, prefill: string) => void;
+
+type Auth0LockAdditionalSignUpFieldPrefillFunction =
+ (callback: Auth0LockAdditionalSignUpFieldPrefillCallback) => void;
+
+interface Auth0LockAdditionalSignUpField {
+ icon?: string;
+ name: string;
+ options?: Auth0LockAdditionalSignUpFieldOption[] | Auth0LockAdditionalSignUpFieldOptionsFunction;
+ placeholder: string;
+ prefill?: string | Auth0LockAdditionalSignUpFieldPrefillFunction;
+ type?: "select" | "text";
+ validator?: (input: string) => { valid: boolean; hint?: string };
+}
+
+type Auth0LockAvatarUrlCallback = (error: Auth0Error, url: string) => void;
+type Auth0LockAvatarDisplayNameCallback = (error: Auth0Error, displayName: string) => void;
+
+interface Auth0LockAvatarOptions {
+ url: (email: string, callback: Auth0LockAvatarUrlCallback) => void;
+ displayName: (email: string, callback: Auth0LockAvatarDisplayNameCallback) => void;
+}
+
+interface Auth0LockThemeOptions {
+ logo?: string;
+ primaryColor?: string;
+}
+
+// https://auth0.com/docs/libraries/lock/v10/sending-authentication-parameters
+interface Auth0LockAuthParamsOptions {
+ access_token?: any;
+ connection_scopes?: any;
+ device?: any;
+ nonce?: any;
+ protocol?: any;
+ request_id?: any;
+ scope?: string;
+ state?: string;
+}
+
+interface Auth0LockAuthOptions {
+ params?: Auth0LockAuthParamsOptions;
+ redirect?: boolean;
+ redirectUrl?: string;
+ responseType?: string;
+ sso?: boolean;
+}
interface Auth0LockPopupOptions {
width: number;
@@ -12,68 +72,51 @@ interface Auth0LockPopupOptions {
top: number;
}
-interface Auth0LockOptions {
- authParams?: any;
- callbackURL?: string;
- connections?: string[];
- container?: string;
- closable?: boolean;
- dict?: any;
- defaultUserPasswordConnection?: string;
- defaultADUsernameFromEmailPrefix?: boolean;
- disableResetAction?: boolean;
- disableSignupAction?: boolean;
- focusInput?: boolean;
- forceJSONP?: boolean;
- gravatar?: boolean;
- integratedWindowsLogin?: boolean;
- icon?: string;
- loginAfterSignup?: boolean;
- popup?: boolean;
- popupOptions?: Auth0LockPopupOptions;
- rememberLastLogin?: boolean;
- resetLink?: string;
- responseType?: string;
- signupLink?: string;
- socialBigButtons?: boolean;
- sso?: boolean;
- theme?: string;
- usernameStyle?: any;
-}
-
interface Auth0LockConstructorOptions {
- cdn?: string;
+ additionalSignUpFields?: Auth0LockAdditionalSignUpField[];
+ allowedConnections?: string[];
+ allowForgotPassword?: boolean;
+ allowLogin?: boolean;
+ allowSignUp?: boolean;
assetsUrl?: string;
- useCordovaSocialPlugins?: boolean;
+ auth?: Auth0LockAuthOptions;
+ autoclose?: boolean;
+ autofocus?: boolean;
+ avatar?: Auth0LockAvatarOptions;
+ closable?: boolean;
+ container?: string;
+ defaultADUsernameFromEmailPrefix?: string;
+ defaultDatabaseConnection?: string;
+ defaultEnterpriseConnection?: string;
+ forgotPasswordLink?: string;
+ initialScreen?: "login" | "signUp" | "forgotPassword";
+ language?: string;
+ languageDictionary?: any;
+ loginAfterSignUp?: boolean;
+ mustAcceptTerms?: boolean;
+ popupOptions?: Auth0LockPopupOptions;
+ prefill?: { email?: string, username?: string};
+ rememberLastLogin?: boolean;
+ signupLink?: string;
+ socialButtonStyle?: "big" | "small";
+ theme?: Auth0LockThemeOptions;
+ usernameStyle?: string;
}
interface Auth0LockStatic {
new (clientId: string, domain: string, options?: Auth0LockConstructorOptions): Auth0LockStatic;
+ getProfile(token: string, callback: (error: Auth0Error, profile: Auth0UserProfile) => void) : void;
show(): void;
- show(options: Auth0LockOptions): void;
- show(callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
- show(options: Auth0LockOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
+ hide(): void;
+ logout(query: any): void;
- showSignin(): void;
- showSignin(options: Auth0LockOptions): void;
- showSignin(callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
- showSignin(options: Auth0LockOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
-
- showSignup(): void;
- showSignup(options: Auth0LockOptions): void;
- showSignup(callback: (error?: Auth0Error) => void) : void;
- showSignup(options: Auth0LockOptions, callback: (error?: Auth0Error) => void) : void;
-
- showReset(): void;
- showReset(options: Auth0LockOptions): void;
- showReset(callback: (error?: Auth0Error) => void) : void;
- showReset(options: Auth0LockOptions, callback: (error?: Auth0Error) => void) : void;
-
- hide(callback: () => void): void;
- logout(callback: () => void): void;
-
- getClient(): Auth0Static;
+ on(event: "show", callback: () => void) : void;
+ on(event: "hide", callback: () => void) : void;
+ on(event: "unrecoverable_error", callback: (error: Auth0Error) => void) : void;
+ on(event: "authorization_error", callback: (error: Auth0Error) => void) : void;
+ on(event: "authenticated", callback: (authResult: any) => void) : void;
+ on(event: string, callback: (...args: any[]) => void) : void;
}
declare var Auth0Lock: Auth0LockStatic;
diff --git a/auth0.widget/auth0.widget-tests.ts b/auth0.widget/auth0.widget-tests.ts
index 012e9b9769..f44601986e 100644
--- a/auth0.widget/auth0.widget-tests.ts
+++ b/auth0.widget/auth0.widget-tests.ts
@@ -1,4 +1,4 @@
-///
+///
///
var widget: Auth0WidgetStatic = new Auth0Widget({
diff --git a/auth0.widget/auth0.widget.d.ts b/auth0.widget/auth0.widget.d.ts
index 20694526c3..e36a7f868a 100644
--- a/auth0.widget/auth0.widget.d.ts
+++ b/auth0.widget/auth0.widget.d.ts
@@ -3,7 +3,7 @@
// Definitions by: Robert McLaws
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-///
+///
interface Auth0WidgetStatic {
diff --git a/auth0/auth0-tests.ts b/auth0/auth0-tests.ts
index 9cd903b306..a1357246f3 100644
--- a/auth0/auth0-tests.ts
+++ b/auth0/auth0-tests.ts
@@ -1,23 +1,51 @@
-///
+///
-var auth0 = new Auth0({
- domain: 'mine.auth0.com',
- clientID: 'dsa7d77dsa7d7',
- callbackURL: 'http://my-app.com/callback',
- callbackOnLocationHash: true
+import * as auth0 from 'auth0';
+
+const management = new auth0.ManagementClient({
+ token: '{YOUR_API_V2_TOKEN}',
+ domain: '{YOUR_ACCOUNT}.auth0.com'
});
-auth0.login({
- connection: 'google-oauth2',
- popup: true,
- popupOptions: {
- width: 450,
- height: 800
- }
-}, (err, profile, idToken, accessToken, state) => {
- if (err) {
- alert("something went wrong: " + err.message);
- return;
- }
- alert('hello ' + profile.name);
- });
+const auth = new auth0.AuthenticationClient({
+ domain: '{YOUR_ACCOUNT}.auth0.com',
+ clientId: '{OPTIONAL_CLIENT_ID}'
+});
+
+// Using a callback.
+management.getUsers((err: Error, users: auth0.User[]) => {
+ if (err) {
+ // Handle error.
+ }
+ console.log(users);
+});
+
+// Using a Promise.
+management
+ .getUsers()
+ .then((users) => {
+ console.log(users);
+ })
+ .catch((err) => {
+ // Handle the error.
+ });
+
+management
+ .createUser({
+ connection: 'My-Connection',
+ email: 'hi@me.co',
+ }).then((user) => {
+ console.log(user);
+ }).catch((err) => {
+ // Handle the error.
+ });
+
+auth
+ .requestChangePasswordEmail({
+ connection: 'My-Connection',
+ email: 'hi@me.co',
+ }).then((response) => {
+ console.log(response);
+ }).catch((err) => {
+ // Handle the error.
+ });
diff --git a/auth0/auth0.d.ts b/auth0/auth0.d.ts
index 0608674ae7..e367d30411 100644
--- a/auth0/auth0.d.ts
+++ b/auth0/auth0.d.ts
@@ -1,131 +1,95 @@
-// Type definitions for Auth0.js
-// Project: http://auth0.com
-// Definitions by: Robert McLaws
+// Type definitions for auth0 v2.3.1
+// Project: https://github.com/auth0/node-auth0
+// Definitions by: Seth Westphal
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-/** Extensions to the browser Window object. */
-interface Window {
- /** Allows you to pass the id_token to other APIs, as specified in https://docs.auth0.com/apps-apis */
+///
+
+declare module "auth0" {
+
+ import * as Promise from 'bluebird';
+
+ export interface ManagementClientOptions {
token: string;
-}
+ domain?: string;
+ }
-/** This is the interface for the main Auth0 client. */
-interface Auth0Static {
-
- new(options: Auth0ClientOptions): Auth0Static;
- changePassword(options: any, callback?: Function): void;
- decodeJwt(jwt: string): any;
- login(options: any, callback: (error?: Auth0Error, profile?: Auth0UserProfile, id_token?: string, access_token?: string, state?: string) => any): void;
- loginWithPopup(options: Auth0LoginOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, id_token?: string, access_token?: string, state?: string) => any): void;
- loginWithResourceOwner(options: Auth0LoginOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, id_token?: string, access_token?: string, state?: any) => any): void;
- loginWithUsernamePassword(options: Auth0LoginOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, id_token?: string, access_token?: string, state?: string) => any): void;
- logout(query: string): void;
- getConnections(callback?: Function): void;
- getDelegationToken(targetClientId: string, id_token: string, options: any, callback: (error?: Auth0Error, delegationResult?: Auth0DelegationToken) => any): void;
- getProfile(id_token: string, callback?: Function): Auth0UserProfile;
- getSSOData(withActiveDirectories: any, callback?: Function): void;
- parseHash(hash: string): Auth0DecodedHash;
- signup(options: Auth0SignupOptions, callback: Function): void;
- validateUser(options: any, callback: (error?: Auth0Error, valid?: any) => any): void;
-}
-
-/** Represents constructor options for the Auth0 client. */
-interface Auth0ClientOptions {
- clientID: string;
- callbackURL: string;
- callbackOnLocationHash?: boolean;
- domain: string;
- forceJSONP?: boolean;
-}
-
-/** Represents a normalized UserProfile. */
-interface Auth0UserProfile {
- email: string;
- family_name: string;
- gender: string;
- given_name: string;
- locale: string;
- name: string;
- nickname: string;
- picture: string;
- user_id: string;
- /** Represents one or more Identities that may be associated with the User. */
- identities: Auth0Identity[];
- user_metadata?: any;
- app_metadata?: any;
-}
-
-/** Represents an Auth0UserProfile that has a Microsoft Account as the primary identity. */
-interface MicrosoftUserProfile extends Auth0UserProfile {
- emails: string[];
-}
-
-/** Represents an Auth0UserProfile that has an Office365 account as the primary identity. */
-interface Office365UserProfile extends Auth0UserProfile {
- tenantid: string;
- upn: string;
-}
-
-/** Represents an Auth0UserProfile that has an Active Directory account as the primary identity. */
-interface AdfsUserProfile extends Auth0UserProfile {
- issuer: string;
-}
-
-/** Represents multiple identities assigned to a user. */
-interface Auth0Identity {
- access_token: string;
+ export interface UserData {
connection: string;
- isSocial: boolean;
- provider: string;
- user_id: string;
-}
-
-interface Auth0DecodedHash {
- access_token: string;
- id_token: string;
- profile: Auth0UserProfile;
- state: any;
-}
-
-interface Auth0PopupOptions {
- width: number;
- height: number;
-}
-
-interface Auth0LoginOptions {
- auto_login?: boolean;
- connection?: string;
email?: string;
username?: string;
password?: string;
- popup?: boolean;
- popupOptions?: Auth0PopupOptions;
-}
+ phone_number?: string;
+ user_metadata?: {};
+ email_verified?: boolean;
+ app_metadata?: {};
+ }
-interface Auth0SignupOptions extends Auth0LoginOptions {
- auto_login: boolean;
-}
+ export interface GetUsersData {
+ per_page?: number;
+ page?: number;
+ include_totals?: boolean;
+ sort?: string;
+ connection?: string;
+ fields?: string;
+ include_fields?: boolean;
+ q?: string;
+ search_engine?: string;
+ }
-interface Auth0Error {
- code: any;
- details: any;
- name: string;
- message: string;
- status: any;
-}
+ export interface User {
+ email?: string;
+ email_verified?: boolean;
+ username?: string;
+ phone_number?: string;
+ phone_verified?: boolean;
+ user_id?: string;
+ created_at?: string;
+ updated_at?: string;
+ identities?: Identity[];
+ app_metadata?: {};
+ user_metadata?: {};
+ picture?: string;
+ name?: string;
+ nickname?: string;
+ multifactor?: string[];
+ last_ip?: string;
+ last_login?: string;
+ logins_count?: number;
+ blocked?: boolean;
+ }
-/** Represents the response from an API Token Delegation request. */
-interface Auth0DelegationToken {
- /** The length of time in seconds the token is valid for. */
- expires_in: string;
- /** The JWT for delegated access. */
- id_token: string;
- /** The type of token being returned. Possible values: "Bearer" */
- token_type: string;
-}
+ export interface Identity {
+ connection: string;
+ user_id: string;
+ provider: string;
+ isSocial: boolean;
+ }
-declare var Auth0: Auth0Static;
+ export class ManagementClient {
+ constructor(options: ManagementClientOptions);
+
+ getUsers(params?: GetUsersData): Promise;
+ getUsers(params?: GetUsersData, cb?: (err: Error, users: User[]) => void): void;
+ createUser(data: UserData): Promise;
+ createUser(data: UserData, cb: (err: Error, data: User) => void): void;
+ }
+
+ export interface AuthenticationClientOptions {
+ clientId?: string;
+ domain: string;
+ }
+
+ export interface RequestChangePasswordEmailData {
+ connection: string;
+ email: string;
+ }
+
+ export class AuthenticationClient {
+ constructor(options: AuthenticationClientOptions);
+
+ requestChangePasswordEmail(data: RequestChangePasswordEmailData): Promise;
+ requestChangePasswordEmail(data: RequestChangePasswordEmailData, cb: (err: Error, message: string) => void): void;
+ }
-declare module "auth0" {
- export = Auth0
}
diff --git a/autobahn/autobahn.d.ts b/autobahn/autobahn.d.ts
index 97837b52d0..bb7a0c86ae 100644
--- a/autobahn/autobahn.d.ts
+++ b/autobahn/autobahn.d.ts
@@ -45,7 +45,7 @@ declare namespace autobahn {
interface IInvocation {
caller?: number;
- progress?: boolean;
+ progress?: (args : any[], kwargs : any) => void;
procedure: string;
}
@@ -163,6 +163,7 @@ declare namespace autobahn {
}
interface IPublishOptions {
+ acknowledge?: boolean;
exclude?: number[];
eligible?: number[];
disclose_me?: Boolean;
diff --git a/autobind-decorator/autobind-decorator-tests.ts b/autobind-decorator/autobind-decorator-tests.ts
new file mode 100644
index 0000000000..e428604802
--- /dev/null
+++ b/autobind-decorator/autobind-decorator-tests.ts
@@ -0,0 +1,43 @@
+///
+
+import autobind = require('autobind-decorator');
+
+class Test {
+ public static what: string = 'static';
+
+ @autobind
+ public static test(): void {
+ console.log(this.what);
+ }
+
+ public constructor(public what: string) {
+ this.what = what;
+ }
+
+ @autobind
+ public test(): void {
+ console.warn(this.what);
+ }
+}
+
+const tester: Test = new Test('bind');
+const { test } = tester;
+tester.test(); // warns 'bind'.
+test(); // warns 'bind'.
+Test.test(); // logs 'static'.
+
+@autobind
+class Component {
+ public constructor(private someMember: string) {
+ this.someMember = someMember;
+ }
+
+ public someMethod(): void {
+ console.error(this.someMember);
+ }
+}
+
+const component: Component = new Component('React vs Angular2');
+const { someMethod } = component;
+component.someMethod(); // errors 'React vs Angular2'
+someMethod(); // errors 'React vs Angular2'
diff --git a/autobind-decorator/autobind-decorator.d.ts b/autobind-decorator/autobind-decorator.d.ts
new file mode 100644
index 0000000000..51ba89c9bf
--- /dev/null
+++ b/autobind-decorator/autobind-decorator.d.ts
@@ -0,0 +1,10 @@
+// Type definitions for autobind-decorator v1.3.3
+// Project: https://github.com/andreypopp/autobind-decorator
+// Definitions by: Ivo Stratev
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare module 'autobind-decorator' {
+ function autobind(target: TFunction): TFunction | void;
+ function autobind(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor | void;
+ export = autobind;
+}
diff --git a/autobind-decorator/autobind-decorator.ts.tscparams b/autobind-decorator/autobind-decorator.ts.tscparams
new file mode 100644
index 0000000000..1ee3d05cb6
--- /dev/null
+++ b/autobind-decorator/autobind-decorator.ts.tscparams
@@ -0,0 +1 @@
+--experimentalDecorators
diff --git a/autosize/autosize-tests.ts b/autosize/autosize-tests.ts
new file mode 100644
index 0000000000..23686fbd88
--- /dev/null
+++ b/autosize/autosize-tests.ts
@@ -0,0 +1,10 @@
+///
+
+// from a NodeList
+autosize(document.querySelectorAll('textarea'));
+
+// from a single Node
+autosize(document.querySelector('textarea'));
+
+// from a single element
+autosize(document.getElementById('my-textarea'));
diff --git a/autosize/autosize.d.ts b/autosize/autosize.d.ts
new file mode 100644
index 0000000000..0a8a696c3d
--- /dev/null
+++ b/autosize/autosize.d.ts
@@ -0,0 +1,17 @@
+// Type definitions for jquery.autosize 3.0.7
+// Project: http://www.jacklmoore.com/autosize/
+// Definitions by: Aaron T. King
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare namespace autosize {
+ interface AutosizeStatic {
+ (el: Element): void;
+ (el: NodeList): void;
+ }
+}
+
+declare var autosize: autosize.AutosizeStatic;
+
+declare module 'autosize' {
+ export = autosize;
+}
diff --git a/aws-lambda/aws-lambda-tests.ts b/aws-lambda/aws-lambda-tests.ts
new file mode 100644
index 0000000000..f562b59d3d
--- /dev/null
+++ b/aws-lambda/aws-lambda-tests.ts
@@ -0,0 +1,40 @@
+///
+
+import lambda = require('aws-lambda');
+
+var str: string;
+var date: Date;
+var anyObj: any;
+var num: number;
+var identity: lambda.CognitoIdentity;
+var error: Error;
+var b: boolean;
+var clientCtx: lambda.ClientContext;
+
+/* Context */
+var context: lambda.Context;
+
+b = context.callbackWaitsForEmptyEventLoop;
+str = context.functionName;
+str = context.functionVersion;
+str = context.invokedFunctionArn;
+num = context.memoryLimitInMB;
+str = context.awsRequestId;
+str = context.logGroupName;
+str = context.logStreamName;
+identity = context.identity;
+clientCtx = context.clientContext;
+
+/* CognitoIdentity */
+var identity: lambda.CognitoIdentity;
+
+str = identity.cognitoIdentityId;
+str = identity.cognitoIdentityPoolId;
+
+/* Callback */
+function callback(cb: lambda.Callback) {
+ cb();
+ cb(null);
+ cb(error);
+ cb(null, anyObj);
+}
\ No newline at end of file
diff --git a/aws-lambda/aws-lambda.d.ts b/aws-lambda/aws-lambda.d.ts
new file mode 100644
index 0000000000..c9a66a3783
--- /dev/null
+++ b/aws-lambda/aws-lambda.d.ts
@@ -0,0 +1,68 @@
+// Type definitions for AWS Lambda
+// Project: http://docs.aws.amazon.com/lambda
+// Definitions by: James Darbyshire , Michael Skarum , Stef Heyenrath
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare module "aws-lambda" {
+ // Context
+ // http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html
+ interface Context {
+ // Properties
+ callbackWaitsForEmptyEventLoop: boolean;
+ functionName: string;
+ functionVersion: string;
+ invokedFunctionArn: string;
+ memoryLimitInMB: number;
+ awsRequestId: string;
+ logGroupName: string;
+ logStreamName: string;
+ identity?: CognitoIdentity;
+ clientContext?: ClientContext;
+
+ // Functions
+ getRemainingTimeInMillis(): number;
+
+ // Functions for compatibility with earlier Node.js Runtime v0.10.42
+ log(message: string, object: any): void;
+ fail(message: string): void;
+ succeed(message: string): void;
+ succeed(object: any): void;
+ succeed(message: string, object: any): void;
+ }
+
+ interface CognitoIdentity {
+ cognitoIdentityId: string;
+ cognitoIdentityPoolId: string;
+ }
+
+ interface ClientContext {
+ client: ClientContextClient;
+ Custom?: any;
+ env: ClientContextEnv;
+ }
+
+ interface ClientContextClient {
+ installationId: string;
+ appTitle: string;
+ appVersionName: string;
+ appVersionCode: string;
+ appPackageName: string;
+ }
+
+ interface ClientContextEnv {
+ platformVersion: string;
+ platform: string;
+ make: string;
+ model: string;
+ locale: string;
+ }
+
+ /**
+ * Optional callback parameter.
+ * http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html
+ *
+ * @param error – an optional parameter that you can use to provide results of the failed Lambda function execution.
+ * @param result – an optional parameter that you can use to provide the result of a successful function execution. The result provided must be JSON.stringify compatible.
+ */
+ export type Callback = (error?: Error, result?: any) => void;
+}
\ No newline at end of file
diff --git a/aws-sdk/aws-sdk.d.ts b/aws-sdk/aws-sdk.d.ts
index 270f06d36a..869f61071b 100644
--- a/aws-sdk/aws-sdk.d.ts
+++ b/aws-sdk/aws-sdk.d.ts
@@ -9,1496 +9,2263 @@
declare module "aws-sdk" {
- export var config: ClientConfig;
+ export var config: ClientConfig;
- export function Config(json: any): void;
+ export function Config(json: any): void;
- export class Credentials {
- constructor(accessKeyId: string, secretAccessKey: string, sessionToken?: string);
- accessKeyId: string;
- }
+ export class Credentials {
+ constructor(accessKeyId: string, secretAccessKey: string, sessionToken?: string);
+ accessKeyId: string;
+ }
- export class EnvironmentCredentials extends Credentials {
- constructor(profile: string);
- }
+ export class EnvironmentCredentials extends Credentials {
+ constructor(profile: string);
+ }
- export interface Logger {
- write?: (chunk: any, encoding?: string, callback?: () => void) => void;
- log?: (...messages: any[]) => void;
- }
+ export interface Logger {
+ write?: (chunk: any, encoding?: string, callback?: () => void) => void;
+ log?: (...messages: any[]) => void;
+ }
- export interface HttpOptions {
- proxy?: string;
- agent?: any;
- timeout?: number;
- xhrAsync?: boolean;
- xhrWithCredentials?: boolean;
- }
+ export interface HttpOptions {
+ proxy?: string;
+ agent?: any;
+ timeout?: number;
+ xhrAsync?: boolean;
+ xhrWithCredentials?: boolean;
+ }
- export class Endpoint {
- constructor(endpoint:string);
+ export class Endpoint {
+ constructor(endpoint: string);
- host:string;
- hostname:string;
- href:string;
- port:number;
- protocol:string;
- }
+ host: string;
+ hostname: string;
+ href: string;
+ port: number;
+ protocol: string;
+ }
- export interface Services {
- autoscaling?: any;
- cloudformation?: any;
- cloudfront?: any;
- cloudsearch?: any;
- cloudsearchdomain?: any;
- cloudtrail?: any;
- cloudwatch?: any;
- cloudwatchlogs?: any;
- cognitoidentity?: any;
- cognitosync?: any;
- datapipeline?: any;
- directconnect?: any;
- dynamodb?: any;
- ec2?: any;
- ecs?: any;
- elasticache?: any;
- elasticbeanstalk?: any;
- elastictranscoder?: any;
- elb?: any;
- emr?: any;
- glacier?: any;
- httpOptions?: HttpOptions;
- iam?: any;
- importexport?: any;
- kinesis?: any;
- opsworks?: any;
- rds?: any;
- redshift?: any;
- route53?: any;
- route53domains?: any;
- s3?: any;
- ses?: any;
- simpledb?: any;
- sns?: any;
- sqs?: any;
- storagegateway?: any;
- sts?: any;
- support?: any;
- swf?: any;
- }
+ interface AwsError extends Error {
+ stack: string;
+ }
- export interface ClientConfigPartial extends Services {
- credentials?: Credentials;
- region?: string;
- accessKeyId?: string;
- secretAccessKey?: string;
- computeChecksums?: boolean;
- convertResponseTypes?: boolean;
- logger?: Logger;
- maxRedirects?: number;
- maxRetries?: number;
- paramValidation?: boolean;
- s3ForcePathStyle?: boolean;
- apiVersion?: any;
- apiVersions?: Services;
- signatureVersion?: string;
- sslEnabled?: boolean;
- systemClockOffset?: number;
- }
+ export interface RetryDelayOption {
+ base?: number;
+ customBackoff?: (retryCount: number) => number;
+ }
- export interface ClientConfig extends ClientConfigPartial {
- update?: (options: ClientConfigPartial, allUnknownKeys?: boolean) => void;
- getCredentials?: (callback: (err?: any) => void) => void ;
- loadFromPath?: (path: string) => void;
- credentials: Credentials;
- region: string;
- }
+ export interface Ebs {
+ SnapshotId?: string;
+ VolumeSize?: number;
+ VolumeType?: string;
+ DeleteOnTermination?: boolean;
+ Iops?: number;
+ Encrypted?: boolean;
+ }
- export class SQS {
- constructor(options?: any);
- endpoint:Endpoint;
+ export interface BlockDeviceMapping {
+ VirtualName?: string;
+ DeviceName: string;
+ Ebs?: Ebs;
+ NoDevice?: boolean;
+ }
- addPermission(params: SQS.AddPermissionParams, callback: (err:Error, data:any) => void): void;
- changeMessageVisibility(params: SQS.ChangeMessageVisibilityParams, callback: (err:Error, data:any) => void): void;
- changeMessageVisibilityBatch(params: SQS.ChangeMessageVisibilityBatchParams, callback: (err:Error, data:SQS.ChangeMessageVisibilityBatchResponse) => void): void;
- createQueue(params: SQS.CreateQueueParams, callback: (err: Error, data: SQS.CreateQueueResult) => void): void;
- deleteMessage(params: SQS.DeleteMessageParams, callback: (err: Error, data: any) => void): void;
- deleteMessageBatch(params: SQS.DeleteMessageBatchParams, callback: (err: Error, data: SQS.DeleteMessageBatchResult) => void): void;
- deleteQueue(params: { QueueUrl: string; }, callback: (err: Error, data: any) => void): void;
- getQueueAttributes(params: SQS.GetQueueAttributesParams, callback: (err: Error, data: SQS.GetQueueAttributesResult) => void): void;
- getQueueUrl(params: SQS.GetQueueUrlParams, callback: (err: Error, data: { QueueUrl: string; }) => void): void;
- listDeadLetterSourceQueues(params: {QueueUrl:string}, callback: (err: Error, data: {queueUrls: string[]}) => void): void;
- listQueues(params: {QueueNamePrefix?:string}, callback: (err: Error, data: {QueueUrls: string[]}) => void): void;
- purgeQueue(params: {QueueUrl: string}, callback: (err: Error, data: any) => void): void;
- receiveMessage(params: SQS.ReceiveMessageParams, callback: (err: Error, data: SQS.ReceiveMessageResult) => void): void;
- removePermission(params: {QueueUrl: string, Label: string}, callback: (err: Error, data: any) => void): void;
- sendMessage(params: SQS.SendMessageParams, callback: (err: Error, data: SQS.SendMessageResult) => void): void;
- sendMessageBatch(params: SQS.SendMessageBatchParams, callback: (err: Error, data: SQS.SendMessageBatchResult) => void): void;
- setQueueAttributes(params: SQS.SetQueueAttributesParams, callback: (err: Error, data: any) => void): void;
- }
+ export interface InstanceMonitoring {
+ SpotPrice?: string;
+ Enabled?: boolean;
+ }
- export class SES {
- constructor(options?: any);
- public client: Ses.Client;
- }
+ export interface Filter {
+ Name?: string;
+ Values?: boolean;
+ }
- export class SNS {
- constructor(options?: any);
- publish(request: Sns.PublishRequest, callback: (err: any, data: any) => void): void;
- }
+ export interface StepAdjustment {
+ scalingAdjustment: number;
+ metricIntervalLowerBound?: number;
+ metricIntervalUpperBound?: number;
+ }
- export class SimpleWorkflow {
- constructor(options?: any);
- public client: Swf.Client;
- }
+ export interface Tags {
+ resourceId?: string;
+ resourceType?: string;
+ key: string;
+ value?: string;
+ propagateAtLaunch?: boolean;
+ }
- export class S3 {
- constructor(options?: any);
- getObject(params: s3.GetObjectRequest, callback: (err: Error, data: any) => void): void;
- putObject(params: s3.PutObjectRequest, callback: (err: Error, data: any) => void): void;
- deleteObject(params: s3.DeleteObjectRequest, callback: (err: Error, data: any) => void): void;
- headObject(params: s3.HeadObjectRequest, callback: (err: Error, data: any) => void): void;
- getSignedUrl(operation: string, params: any): string;
- getSignedUrl(operation: string, params: any, callback: (err: Error, url: string) => void): void;
- upload(params?: s3.PutObjectRequest, options?: s3.UploadOptions, callback?: (err: Error, data: any) => void): void;
- }
+ export interface Services {
+ autoscaling?: any;
+ cloudformation?: any;
+ cloudfront?: any;
+ cloudsearch?: any;
+ cloudsearchdomain?: any;
+ cloudtrail?: any;
+ cloudwatch?: any;
+ cloudwatchlogs?: any;
+ cognitoidentity?: any;
+ cognitosync?: any;
+ datapipeline?: any;
+ directconnect?: any;
+ dynamodb?: any;
+ ec2?: any;
+ ecs?: any;
+ elasticache?: any;
+ elasticbeanstalk?: any;
+ elastictranscoder?: any;
+ elb?: any;
+ emr?: any;
+ glacier?: any;
+ httpOptions?: HttpOptions;
+ iam?: any;
+ importexport?: any;
+ kinesis?: any;
+ opsworks?: any;
+ rds?: any;
+ redshift?: any;
+ route53?: any;
+ route53domains?: any;
+ s3?: any;
+ ses?: any;
+ simpledb?: any;
+ sns?: any;
+ sqs?: any;
+ storagegateway?: any;
+ sts?: any;
+ support?: any;
+ swf?: any;
+ }
- export class STS{
- constructor(options?: any);
+ export interface ClientConfigPartial extends Services {
+ credentials?: Credentials;
+ region?: string;
+ accessKeyId?: string;
+ secretAccessKey?: string;
+ computeChecksums?: boolean;
+ convertResponseTypes?: boolean;
+ logger?: Logger;
+ maxRedirects?: number;
+ maxRetries?: number;
+ paramValidation?: boolean;
+ s3ForcePathStyle?: boolean;
+ apiVersion?: any;
+ apiVersions?: Services;
+ signatureVersion?: string;
+ sslEnabled?: boolean;
+ systemClockOffset?: number;
+ }
+
+ export interface ClientConfig extends ClientConfigPartial {
+ update?: (options: ClientConfigPartial, allUnknownKeys?: boolean) => void;
+ getCredentials?: (callback: (err?: any) => void) => void;
+ loadFromPath?: (path: string) => void;
+ credentials: Credentials;
+ region: string;
+ }
+
+ export class Lambda {
+ constructor(options?: any);
+ endpoint: Endpoint;
+
+ addPermission(params: Lambda.AddPermissionParams, callback: (err: AwsError, data: any) => void): void;
+ createAlias(params: Lambda.CreateAliasParams, callback: (err: AwsError, data: any) => void): void;
+ createEventSourceMapping(params: Lambda.CreateEventSourceMappingParams, callback: (err: AwsError, data: any) => void): void;
+ createFunction(params: Lambda.CreateFunctionParams, callback: (err: AwsError, data: any) => void): void;
+ deleteAlias(params: Lambda.DeleteAliasParams, callback: (err: AwsError, data: any) => void): void;
+ deleteEventSourceMapping(params: Lambda.DeleteEventSourceMappingParams, callback: (err: AwsError, data: any) => void): void;
+ deleteFunction(params: Lambda.DeleteFunctionParams, callback: (err: AwsError, data: any) => void): void;
+ getAlias(params: Lambda.GetAliasParams, callback: (err: AwsError, data: any) => void): void;
+ getEventSourceMapping(params: Lambda.GetEventSourceMappingParams, callback: (err: AwsError, data: any) => void): void;
+ getFunction(params: Lambda.GetFunctionParams, callback: (err: AwsError, data: any) => void): void;
+ getFunctionConfiguration(params: Lambda.GetFunctionConfigurationParams, callback: (err: AwsError, data: any) => void): void;
+ getPolicy(params: Lambda.GetPolicyParams, callback: (err: AwsError, data: any) => void): void;
+ invoke(params: Lambda.InvokeParams, callback: (err: AwsError, data: any) => void): void;
+ listAliases(params: Lambda.ListAliasesParams, callback: (err: AwsError, data: any) => void): void;
+ listEventSourceMappings(params: Lambda.ListEventSourceMappingsParams, callback: (err: AwsError, data: any) => void): void;
+ listFunctions(params: Lambda.ListFunctionsParams, callback: (err: AwsError, data: any) => void): void;
+ listVersionsByFunction(params: Lambda.ListVersionsByFunctionParams, callback: (err: AwsError, data: any) => void): void;
+ publishVersion(params: Lambda.PublishVersionParams, callback: (err: AwsError, data: any) => void): void;
+ removePermission(params: Lambda.RemovePermissionParams, callback: (err: AwsError, data: any) => void): void;
+ updateAlias(params: Lambda.UpdateAliasParams, callback: (err: AwsError, data: any) => void): void;
+ updateEventSourceMapping(params: Lambda.UpdateEventSourceMappingParams, callback: (err: AwsError, data: any) => void): void;
+ updateFunctionCode(params: Lambda.UpdateFunctionCodeParams, callback: (err: AwsError, data: any) => void): void;
+ updateFunctionConfiguration(params: Lambda.UpdateFunctionConfigurationParams, callback: (err: AwsError, data: any) => void): void;
+ }
+
+ export class AutoScaling {
+ constructor(options?: any);
+ endpoint: Endpoint;
+
+ attachInstances(params: AutoScaling.AttachInstancesParams, callback: (err: AwsError, data: any) => void): void;
+ attachLoadBalancers(params: AutoScaling.AttachLoadBalancersParams, callback: (err: AwsError, data: any) => void): void;
+ attachLoadBalancerTargetGroups(param: AutoScaling.AttachLoadBalancerTargetGroupsParams, callback: (err: AwsError, data: any) => void): void;
+ completeLifecycleAction(param: AutoScaling.CompleteLifecycleActionParams, callback: (err: AwsError, data: any) => void): void;
+ createAutoScalingGroup(param: AutoScaling.CreateAutoScalingGroupParams, callback: (err: AwsError, data: any) => void): void;
+ createLaunchConfiguration(param: AutoScaling.CreateLaunchConfigurationParams, callback: (err: AwsError, data: any) => void): void;
+ createOrUpdateTags(param: AutoScaling.CreateOrUpdateTagsParams, callback: (err: AwsError, data: any) => void): void;
+ deleteAutoScalingGroup(param: AutoScaling.DeleteAutoScalingGroupParams, callback: (err: AwsError, data: any) => void): void;
+ deleteLaunchConfiguration(param: AutoScaling.DeleteLaunchConfigurationParams, callback: (err: AwsError, data: any) => void): void;
+ deleteLifecycleHook(param: AutoScaling.DeleteLifecycleHookParams, callback: (err: AwsError, data: any) => void): void;
+ deleteNotificationConfiguration(param: AutoScaling.DeleteNotificationConfigurationParams, callback: (err: AwsError, data: any) => void): void;
+ deletePolicy(param: AutoScaling.DeletePolicyParams, callback: (err: AwsError, data: any) => void): void;
+ deleteScheduledAction(param: AutoScaling.DeleteScheduledActionParams, callback: (err: AwsError, data: any) => void): void;
+ deleteTags(param: AutoScaling.DeleteTagsParams, callback: (err: AwsError, data: any) => void): void;
+ describeAccountLimits(callback: (err: AwsError, data: any) => void): void;
+ describeAdjustmentTypes(callback: (err: AwsError, data: any) => void): void;
+ describeAutoScalingGroups(param: AutoScaling.DescribeAutoScalingGroupsParams, callback: (err: AwsError, data: any) => void): void;
+ describeAutoScalingInstances(param: AutoScaling.DescribeAutoScalingInstancesParams, callback: (err: AwsError, data: any) => void): void;
+ describeAutoScalingNotificationTypes(callback: (err: AwsError, data: any) => void): void;
+ describeLaunchConfigurations(param: AutoScaling.DescribeLaunchConfigurationsParams, callback: (err: AwsError, data: any) => void): void;
+ describeLifecycleHooks(param: AutoScaling.DescribeLifecycleHooksParams, callback: (err: AwsError, data: any) => void): void;
+ describeLifecycleHookTypes(callback: (err: AwsError, data: any) => void): void;
+ describeLoadBalancers(param: AutoScaling.DescribeLoadBalancersParams, callback: (err: AwsError, data: any) => void): void;
+ describeLoadBalancerTargetGroups(param: AutoScaling.DescribeLoadBalancerTargetGroupsParams, callback: (err: AwsError, data: any) => void): void;
+ describeMetricCollectionTypes(callback: (err: AwsError, data: any) => void): void;
+ describeNotificationConfigurations(param: AutoScaling.DescribeNotificationConfigurationsParams, callback: (err: AwsError, data: any) => void): void;
+ describePolicies(param: AutoScaling.DescribePoliciesParams, callback: (err: AwsError, data: any) => void): void;
+ describeScalingActivities(param: AutoScaling.DescribeScalingActivitiesParams, callback: (err: AwsError, data: any) => void): void;
+ describeScalingProcessTypes(callback: (err: AwsError, data: any) => void): void;
+ describeScheduledActions(param: AutoScaling.DescribeScheduledActionsParams, callback: (err: AwsError, data: any) => void): void;
+ describeTags(param: AutoScaling.DescribeTagsParams, callback: (err: AwsError, data: any) => void): void;
+ describeTerminationPolicyTypes(callback: (err: AwsError, data: any) => void): void;
+ detachInstances(param: AutoScaling.DetachInstancesParams, callback: (err: AwsError, data: any) => void): void;
+ detachLoadBalancers(param: AutoScaling.DetachLoadBalancersParams, callback: (err: AwsError, data: any) => void): void;
+ detachLoadBalancerTargetGroups(param: AutoScaling.DetachLoadBalancerTargetGroupsParams, callback: (err: AwsError, data: any) => void): void;
+ disableMetricsCollection(param: AutoScaling.DisableMetricsCollectionParams, callback: (err: AwsError, data: any) => void): void;
+ enableMetricsCollection(param: AutoScaling.EnableMetricsCollectionParams, callback: (err: AwsError, data: any) => void): void;
+ enterStandby(param: AutoScaling.EnterStandbyParams, callback: (err: AwsError, data: any) => void): void;
+ executePolicy(param: AutoScaling.ExecutePolicyParams, callback: (err: AwsError, data: any) => void): void;
+ exitStandby(param: AutoScaling.ExitStandbyParams, callback: (err: AwsError, data: any) => void): void;
+ putLifecycleHook(param: AutoScaling.PutLifecycleHookParams, callback: (err: AwsError, data: any) => void): void;
+ putNotificationConfiguration(param: AutoScaling.PutNotificationConfigurationParams, callback: (err: AwsError, data: any) => void): void;
+ putScalingPolicy(param: AutoScaling.PutScalingPolicyParams, callback: (err: AwsError, data: any) => void): void;
+ putScheduledUpdateGroupAction(param: AutoScaling.PutScheduledUpdateGroupActionParams, callback: (err: AwsError, data: any) => void): void;
+ recordLifecycleActionHeartbeat(params: AutoScaling.RecordLifecycleActionHeartbeatParams, callback: (err: AwsError, data: any) => void): void;
+ resumeProcesses(params: AutoScaling.ResumeProcessesParams, callback: (err: AwsError, data: any) => void): void;
+ setDesiredCapacity(params: AutoScaling.SetDesiredCapacityParams, callback: (err: AwsError, data: any) => void): void;
+ setInstanceHealth(params: AutoScaling.SetInstanceHealthParams, callback: (err: AwsError, data: any) => void): void;
+ setInstanceProtection(params: AutoScaling.SetInstanceProtectionParams, callback: (err: AwsError, data: any) => void): void;
+ suspendProcesses(params: AutoScaling.SuspendProcessesParams, callback: (err: AwsError, data: any) => void): void;
+ terminateInstanceInAutoScalingGroup(params: AutoScaling.TerminateInstanceInAutoScalingGroupParams, callback: (err: AwsError, data: any) => void): void;
+ updateAutoScalingGroup(params: AutoScaling.UpdateAutoScalingGroupParams, callback: (err: AwsError, data: any) => void): void;
+ }
+
+ export class SQS {
+ constructor(options?: any);
+ endpoint: Endpoint;
+
+ addPermission(params: SQS.AddPermissionParams, callback: (err: AwsError, data: any) => void): void;
+ changeMessageVisibility(params: SQS.ChangeMessageVisibilityParams, callback: (err: AwsError, data: any) => void): void;
+ changeMessageVisibilityBatch(params: SQS.ChangeMessageVisibilityBatchParams, callback: (err: AwsError, data: SQS.ChangeMessageVisibilityBatchResponse) => void): void;
+ createQueue(params: SQS.CreateQueueParams, callback: (err: AwsError, data: SQS.CreateQueueResult) => void): void;
+ deleteMessage(params: SQS.DeleteMessageParams, callback: (err: AwsError, data: any) => void): void;
+ deleteMessageBatch(params: SQS.DeleteMessageBatchParams, callback: (err: AwsError, data: SQS.DeleteMessageBatchResult) => void): void;
+ deleteQueue(params: { QueueUrl: string; }, callback: (err: AwsError, data: any) => void): void;
+ getQueueAttributes(params: SQS.GetQueueAttributesParams, callback: (err: AwsError, data: SQS.GetQueueAttributesResult) => void): void;
+ getQueueUrl(params: SQS.GetQueueUrlParams, callback: (err: AwsError, data: { QueueUrl: string; }) => void): void;
+ listDeadLetterSourceQueues(params: { QueueUrl: string }, callback: (err: AwsError, data: { queueUrls: string[] }) => void): void;
+ listQueues(params: { QueueNamePrefix?: string }, callback: (err: AwsError, data: { QueueUrls: string[] }) => void): void;
+ purgeQueue(params: { QueueUrl: string }, callback: (err: AwsError, data: any) => void): void;
+ receiveMessage(params: SQS.ReceiveMessageParams, callback: (err: AwsError, data: SQS.ReceiveMessageResult) => void): void;
+ removePermission(params: { QueueUrl: string, Label: string }, callback: (err: AwsError, data: any) => void): void;
+ sendMessage(params: SQS.SendMessageParams, callback: (err: AwsError, data: SQS.SendMessageResult) => void): void;
+ sendMessageBatch(params: SQS.SendMessageBatchParams, callback: (err: AwsError, data: SQS.SendMessageBatchResult) => void): void;
+ setQueueAttributes(params: SQS.SetQueueAttributesParams, callback: (err: AwsError, data: any) => void): void;
+ }
+
+ export class SES {
+ constructor(options?: any);
+ endpoint: Endpoint;
+
+ sendEmail(params: any, callback: (err: any, data: SES.SendEmailResult) => void): void;
+ }
+
+ export class SNS {
+ constructor(options?: any);
+ endpoint: Endpoint;
+
+ publish(request: Sns.PublishRequest, callback: (err: any, data: any) => void): void;
+ }
+
+ export class SWF {
+ constructor(options?: any);
+ endpoint: Endpoint;
+
+ countClosedWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
+ countOpenWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
+ countPendingActivityTasks(params: any, callback: (err: any, data: any) => void): void;
+ countPendingDecisionTasks(params: any, callback: (err: any, data: any) => void): void;
+ deprecateActivityType(params: any, callback: (err: any, data: any) => void): void;
+ deprecateDomain(params: any, callback: (err: any, data: any) => void): void;
+ deprecateWorkflowType(params: any, callback: (err: any, data: any) => void): void;
+ describeActivityType(params: any, callback: (err: any, data: any) => void): void;
+ describeDomain(params: any, callback: (err: any, data: any) => void): void;
+ describeWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
+ describeWorkflowType(params: any, callback: (err: any, data: any) => void): void;
+ getWorkflowExecutionHistory(params: any, callback: (err: any, data: any) => void): void;
+ listActivityTypes(params: any, callback: (err: any, data: any) => void): void;
+ listClosedWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
+ listDomains(params: any, callback: (err: any, data: any) => void): void;
+ listOpenWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
+ listWorkflowTypes(params: any, callback: (err: any, data: any) => void): void;
+ pollForActivityTask(params: any, callback: (err: any, data: Swf.ActivityTask) => void): void;
+ pollForDecisionTask(params: any, callback: (err: any, data: Swf.DecisionTask) => void): void;
+ recordActivityTaskHeartbeat(params: any, callback: (err: any, data: any) => void): void;
+ registerActivityType(params: any, callback: (err: any, data: any) => void): void;
+ registerDomain(params: any, callback: (err: any, data: any) => void): void;
+ registerWorkflowType(params: any, callback: (err: any, data: any) => void): void;
+ requestCancelWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
+ respondActivityTaskCanceled(params: Swf.RespondActivityTaskCanceledRequest, callback: (err: any, data: any) => void): void;
+ respondActivityTaskCompleted(params: Swf.RespondActivityTaskCompletedRequest, callback: (err: any, data: any) => void): void;
+ respondActivityTaskFailed(params: Swf.RespondActivityTaskFailedRequest, callback: (err: any, data: any) => void): void;
+ respondDecisionTaskCompleted(params: Swf.RespondDecisionTaskCompletedRequest, callback: (err: any, data: any) => void): void;
+ signalWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
+ startWorkflowExecution(params: any, callback: (err: any, data: Swf.StartWorkflowExecutionResult) => void): void;
+ terminateWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
+
+ }
+
+ export class S3 {
+ constructor(options?: any);
+ endpoint: Endpoint;
+
+ getObject(params: s3.GetObjectRequest, callback?: (err: Error, data: any) => void): any;
+ putObject(params: s3.PutObjectRequest, callback: (err: Error, data: any) => void): void;
+ deleteObject(params: s3.DeleteObjectRequest, callback: (err: Error, data: any) => void): void;
+ headObject(params: s3.HeadObjectRequest, callback: (err: Error, data: any) => void): void;
+ getSignedUrl(operation: string, params: any): string;
+ getSignedUrl(operation: string, params: any, callback: (err: Error, url: string) => void): void;
+ upload(params?: s3.PutObjectRequest, options?: s3.UploadOptions, callback?: (err: Error, data: any) => void): void;
+ listObjects(params: s3.ListObjectRequest, callback: (err: Error, data: s3.ListObjectResponse) => void): void;
+ listObjectsV2(params: s3.ListObjectV2Request, callback: (err: Error, data: s3.ListObjectV2Response) => void): void;
+ waitFor(state: string, params: s3.HeadObjectRequest, callback: (err: Error, data: any) => void): void;
+
+ createMultipartUpload(params: any, callback: (err: Error, data: any) => void): void;
+ uploadPart(params: any, callback: (err: Error, data: any) => void): void;
+ listParts(params: any, callback: (err: Error, data: any) => void): void;
+ completeMultipartUpload(params: any, callback: (err: Error, data: any) => void): void;
+ }
+
+ export class STS {
+ constructor(options?: any);
+ endpoint: Endpoint;
/**
* Returns a set of temporary security credentials (consisting of an access key ID, a secret access key, and a security token) that you can use to access AWS resources that you might not normally have access to.
*/
- assumeRole(params: sts.AssumeRoleParams, callback: (err: any, data: sts.AssumeRoleCallbackData) => void): void;
+ assumeRole(params: sts.AssumeRoleParams, callback: (err: any, data: sts.AssumeRoleCallbackData) => void): void;
/**
* Returns a set of temporary security credentials for users who have been authenticated via a SAML authentication response.
*/
- assumeRoleWithSAML(params: sts.AssumeRoleWithSAMLParams, callback: (err: any, data: any) => void): void;
+ assumeRoleWithSAML(params: sts.AssumeRoleWithSAMLParams, callback: (err: any, data: any) => void): void;
/**
* Returns a set of temporary security credentials for users who have been authenticated in a mobile or web application with a web identity provider, such as Amazon Cognito, Login with Amazon, Facebook, Google, or any OpenID Connect-compatible identity provider.
*/
- assumeRoleWithWebIdentity(params: sts.AssumeRoleWithWebIdentityParams, callback: (err: any, data: any) => void): void;
+ assumeRoleWithWebIdentity(params: sts.AssumeRoleWithWebIdentityParams, callback: (err: any, data: any) => void): void;
/**
* Creates a credentials object from STS response data containing credentials information.
*/
- credentialsFrom(params: sts.CredentialsFromParams, callback: (err: any, data: any) => void): void;
+ credentialsFrom(params: sts.CredentialsFromParams, callback: (err: any, data: any) => void): void;
/**
* Decodes additional information about the authorization status of a request from an encoded message returned in response to an AWS request.
*/
- decodeAuthorizationMessage(params: sts.DecodeAuthorizationMessageParams, callback: (err: any, data: any) => void): void;
+ decodeAuthorizationMessage(params: sts.DecodeAuthorizationMessageParams, callback: (err: any, data: any) => void): void;
/**
* Returns details about the IAM identity whose credentials are used to call the API.
*/
- getCallerIdentity(params: {}, callback: (err: any, data: any) => void): void;
+ getCallerIdentity(params: {}, callback: (err: any, data: any) => void): void;
/**
* Returns a set of temporary security credentials (consisting of an access key ID, a secret access key, and a security token) for a federated user.
*/
- getFederationToken(params: sts.GetFederationTokenParams, callback: (err: any, data: any) => void): void;
+ getFederationToken(params: sts.GetFederationTokenParams, callback: (err: any, data: any) => void): void;
/**
* Returns a set of temporary credentials for an AWS account or IAM user.
*/
- getSessionToken(params: sts.GetSessionTokenParams, callback: (err: any, data: any) => void): void;
+ getSessionToken(params: sts.GetSessionTokenParams, callback: (err: any, data: any) => void): void;
- }
+ }
- export class ECS {
- constructor(options?: any);
- /**
- * Runs and maintains a desired number of tasks from a specified task definition. If the number of tasks running in a service drops below desiredCount, Amazon ECS spawns another instantiation of the task in the specified cluster. To update an existing service, see UpdateService.
- */
- createService(params: ecs.CreateServicesParams, callback: (err: any, data: any) => void): void;
+ export class ECS {
+ constructor(options?: any);
+ endpoint: Endpoint;
+ /**
+ * Runs and maintains a desired number of tasks from a specified task definition. If the number of tasks running in a service drops below desiredCount, Amazon ECS spawns another instantiation of the task in the specified cluster. To update an existing service, see UpdateService.
+ */
+ createService(params: ecs.CreateServicesParams, callback: (err: any, data: any) => void): void;
/**
* Describes one or more of your clusters.
*/
- describeClusters(params: ecs.DescribeClustersParams, callback: (err: any, data: any) => void): void;
+ describeClusters(params: ecs.DescribeClustersParams, callback: (err: any, data: any) => void): void;
/**
* Describes the specified services running in your cluster.
*/
- describeServices(params: ecs.DescribeServicesParams, callback: (err: any, data: any) => void): void;
+ describeServices(params: ecs.DescribeServicesParams, callback: (err: any, data: any) => void): void;
/**
* Describes a specified task or tasks.
*/
- describeTasks(params: ecs.DescribeTasksParams, callback: (err: any, data: any) => void): void;
+ describeTasks(params: ecs.DescribeTasksParams, callback: (err: any, data: any) => void): void;
/**
* Describes a task definition. You can specify a family and revision to find information about a specific task definition, or you can simply specify the family to find the latest ACTIVE revision in that family.
*/
- describeTaskDefinition(params: ecs.DescribeTaskDefinitionParams, callback: (err: any, data: any) => void): void;
+ describeTaskDefinition(params: ecs.DescribeTaskDefinitionParams, callback: (err: any, data: any) => void): void;
/**
* Registers a new task definition from the supplied family and containerDefinitions. Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon EC2 Container Service Developer Guide.
*/
- registerTaskDefinition(params: ecs.RegisterTaskDefinitionParams, callback: (err: any, data: any) => void): void;
+ registerTaskDefinition(params: ecs.RegisterTaskDefinitionParams, callback: (err: any, data: any) => void): void;
/**
* Modifies the desired count, deployment configuration, or task definition used in a service.
*/
- updateService(params: ecs.UpdateServiceParams, callback: (err: any, data: any) => void): void;
- }
-
- export class DynamoDB {
- constructor(options?: any);
- }
-
- // ==========================================================
-
- export module DynamoDB {
-
- interface _DDBDC_Generic {
- TableName: string;
- ExpressionAttributeNames?: string[];
- ReturnConsumedCapacity?: "INDEXES" | "TOTAL" | "NONE";
- }
-
- type _DDBDC_ComparisonOperator = "EQ" | "NE" | "IN" | "LE" | "LT" | "GE" | "GT" | "BETWEEN" | "NOT_NULL" | "NULL" | "CONTAINS" | "NOT_CONTAINS" | "BEGINS_WITH"
- type _DDBDC_Keys = { [someKey: string]: any };
- type _DDBDC_KeyComparison = {
- [someKey: string]: {
- AttributeValueList: any[];
- ComparisonOperator: _DDBDC_ComparisonOperator;
- }
- };
-
- interface _DDBDC_Reader extends _DDBDC_Generic {
- ConsistentRead?: boolean;
- ProjectionExpression?: string;
- AttributesToGet?: string[];
- }
-
- interface _DDBDC_Writer extends _DDBDC_Generic {
- ExpressionAttributeValues?: _DDBDC_Keys;
- ReturnItemCollectionMetrics?: "SIZE" | "NONE";
- ReturnValues?: "NONE" | "ALL_OLD" | "UPDATED_OLD" | "ALL_NEW" | "UPDATED_NEW";
- ConditionExpression?: string;
- ConditionalOperator?: "AND" | "OR";
- Expected?: {
- [someKey: string]: {
- AttributeValueList: any[];
- ComparisonOperator: _DDBDC_ComparisonOperator;
- Exists: boolean;
- Value: any;
- }
- }
- }
-
- interface UpdateParam extends _DDBDC_Writer {
- Key: _DDBDC_Keys;
- AttributeUpdates: {
- [someKey: string]: {
- Action: "PUT" | "ADD" | "DELETE";
- Value: any
- }
- }
- }
-
- interface QueryParam extends _DDBDC_Reader {
- ConditionalOperator?: "AND" | "OR";
- ExclusiveStartKey?: _DDBDC_Keys;
- ExpressionAttributeValues?: _DDBDC_Keys;
- FilterExpression?: string;
- IndexName?: string;
- KeyConditionExpression?: string;
- KeyConditions?: _DDBDC_KeyComparison;
- Limit?: number;
- QueryFilter?: _DDBDC_KeyComparison;
- ScanIndexForward?: boolean;
- Select?: "ALL_ATTRIBUTES" | "ALL_PROJECTED_ATTRIBUTES" | "SPECIFIC_ATTRIBUTES" | "COUNT";
- }
-
- interface ScanParam extends QueryParam {
- Segment?: number;
- ScanFilter?: _DDBDC_KeyComparison;
- TotalSegments?: number;
- }
-
- interface GetParam extends _DDBDC_Reader {
- Key: _DDBDC_Keys;
- }
-
- interface PutParam extends _DDBDC_Writer {
- Item: _DDBDC_Keys;
- }
-
- interface DeleteParam extends _DDBDC_Writer {
- Key: _DDBDC_Keys;
- }
-
- export class DocumentClient {
- constructor(options?: any);
- get(params: GetParam, next: (err: any, data: any) => void): void;
- put(params: PutParam, next: (err: any, data: any) => void): void;
- delete(params: DeleteParam, next: (err: any, data: any) => void): void;
- query(params: QueryParam, next: (err: any, data: any) => void): void;
- scan(params: ScanParam, next: (err: any, data: any) => void): void;
- update(params: UpdateParam, next: (err: any, data: any) => void): void;
- createSet(list: any[], options?: { validate?: boolean }): { values: any[], type: string };
- batchGet(params: any, next: (err: any, data: any) => void): void;
- batchWrite(params: any, next: (err: any, data: any) => void): void;
- }
-
- }
-
-// ===========================================================
-
- export module SQS {
-
- export interface SqsOptions {
- params?: any;
- endpoint?: string;
- accessKeyId?: string;
- secretAccessKey?: string;
- sessionToken?: Credentials;
- credentials?: Credentials;
- credentialProvider?: any;
- region?: string;
- maxRetries?: number;
- maxRedirects?: number;
- sslEnabled?: boolean;
- paramValidation?: boolean;
- computeChecksums?: boolean;
- convertResponseTypes?: boolean;
- correctClockSkew?: boolean;
- s3ForcePathStyle?: boolean;
- s3BucketEndpoint?: boolean;
- httpOptions?: HttpOptions;
- apiVersion?: string;
- apiVersions?: { [serviceName:string]: string};
- logger?: Logger;
- systemClockOffset?: number;
- signatureVersion?: string;
- signatureCache?: boolean;
- }
-
- export interface AddPermissionParams {
- QueueUrl: string;
- Label: string;
- AWSAccountIds:string[];
- Actions:string[];
- }
-
- export interface ChangeMessageVisibilityParams {
- QueueUrl: string,
- ReceiptHandle: string,
- VisibilityTimeout: number
- }
-
- export interface ChangeMessageVisibilityBatchParams {
- QueueUrl: string,
- Entries: { Id: string; ReceiptHandle: string; VisibilityTimeout?: number; }[]
- }
-
- export interface ChangeMessageVisibilityBatchResponse {
- Successful: { Id:string }[];
- Failed: BatchResultErrorEntry[];
- }
-
- export interface SendMessageParams {
- QueueUrl: string;
- MessageBody: string;
- DelaySeconds?: number;
- MessageAttributes?: { [name:string]: MessageAttribute; }
- }
-
- export interface ReceiveMessageParams {
- QueueUrl: string;
- MaxNumberOfMessages?: number;
- VisibilityTimeout?: number;
- AttributeNames?: string[];
- MessageAttributeNames?: string[];
- WaitTimeSeconds?:number;
- }
-
- export interface DeleteMessageBatchParams {
- QueueUrl: string;
- Entries: DeleteMessageBatchRequestEntry[];
- }
-
- export interface DeleteMessageBatchRequestEntry {
- Id: string;
- ReceiptHandle: string;
- }
-
- export interface DeleteMessageParams {
- QueueUrl: string;
- ReceiptHandle: string;
- }
-
- export interface SendMessageBatchParams {
- QueueUrl: string;
- Entries: SendMessageBatchRequestEntry[];
- }
-
- export interface SendMessageBatchRequestEntry {
- Id: string;
- MessageBody: string;
- DelaySeconds?: number;
- MessageAttributes?: { [name:string]: MessageAttribute; }
- }
-
- export interface CreateQueueParams {
- QueueName: string;
- Attributes: QueueAttributes;
- }
-
- export interface QueueAttributes {
- [name:string]: any;
- DelaySeconds?: number;
- MaximumMessageSize?: number;
- MessageRetentionPeriod?: number;
- Policy?: any;
- ReceiveMessageWaitTimeSeconds?: number;
- VisibilityTimeout?: number;
- RedrivePolicy?: any;
- }
-
- export interface GetQueueAttributesParams {
- QueueUrl: string;
- AttributeNames: string[];
- }
-
- export interface GetQueueAttributesResult {
- Attributes: {[name:string]: string};
- }
-
- export interface GetQueueUrlParams {
- QueueName: string;
- QueueOwnerAWSAccountId?: string;
- }
-
- export interface SendMessageResult {
- MessageId: string;
- MD5OfMessageBody: string;
- MD5OfMessageAttributes: string;
- }
-
- export interface ReceiveMessageResult {
- Messages: Message[];
- }
-
- export interface Message {
- MessageId: string;
- ReceiptHandle: string;
- MD5OfBody: string;
- Body: string;
- Attributes: { [name:string]:any };
- MD5OfMessageAttributes:string;
- MessageAttributes: { [name:string]: MessageAttribute; }
- }
-
- export interface MessageAttribute {
- StringValue?: string;
- BinaryValue?: any; //(Buffer, Typed Array, Blob, String)
- StringListValues?: string[];
- BinaryListValues?: any[];
- DataType: string;
- }
-
- export interface DeleteMessageBatchResult {
- Successful: DeleteMessageBatchResultEntry[];
- Failed: BatchResultErrorEntry[];
- }
-
- export interface DeleteMessageBatchResultEntry {
- Id: string;
- }
-
- export interface BatchResultErrorEntry {
- Id: string;
- Code: string;
- Message?: string;
- SenderFault: boolean;
- }
-
- export interface SendMessageBatchResult {
- Successful: SendMessageBatchResultEntry[];
- Failed: BatchResultErrorEntry[];
- }
-
- export interface SendMessageBatchResultEntry {
- Id: string;
- MessageId: string;
- MD5OfMessageBody: string;
- MD5OfMessageAttributes:string;
- }
-
- export interface CreateQueueResult {
- QueueUrl: string;
- }
-
- export interface SetQueueAttributesParams {
- QueueUrl: string;
- Attributes: QueueAttributes;
- }
-
- }
-
- export module Ses {
-
- export interface Client {
- config: ClientConfig;
-
- sendEmail(params: any, callback: (err: any, data: SendEmailResult) => void): void;
- }
-
- export interface SendEmailRequest {
- Source: string;
- Destination: Destination;
- Message: Message;
- ReplyToAddresses: string[];
- ReturnPath: string;
- }
-
- export class Destination {
- ToAddresses: string[];
- CcAddresses: string[];
- BccAddresses: string[];
- }
-
- export class Message {
- Subject: Content;
- Body: Body;
- }
-
- export class Content {
- Data: string;
- Charset: string;
- }
-
- export class Body {
- Text: Content;
- Html: Content;
- }
-
- export class SendEmailResult {
- MessageId: string;
- }
-
- }
-
- export module Swf {
-
- export class Client {
- //constructor(options?: any);
- public config: ClientConfig;
-
- countClosedWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
- countOpenWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
- countPendingActivityTasks(params: any, callback: (err: any, data: any) => void): void;
- countPendingDecisionTasks(params: any, callback: (err: any, data: any) => void): void;
- deprecateActivityType(params: any, callback: (err: any, data: any) => void): void;
- deprecateDomain(params: any, callback: (err: any, data: any) => void): void;
- deprecateWorkflowType(params: any, callback: (err: any, data: any) => void): void;
- describeActivityType(params: any, callback: (err: any, data: any) => void): void;
- describeDomain(params: any, callback: (err: any, data: any) => void): void;
- describeWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
- describeWorkflowType(params: any, callback: (err: any, data: any) => void): void;
- getWorkflowExecutionHistory(params: any, callback: (err: any, data: any) => void): void;
- listActivityTypes(params: any, callback: (err: any, data: any) => void): void;
- listClosedWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
- listDomains(params: any, callback: (err: any, data: any) => void): void;
- listOpenWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
- listWorkflowTypes(params: any, callback: (err: any, data: any) => void): void;
- pollForActivityTask(params: any, callback: (err: any, data: ActivityTask) => void): void;
- pollForDecisionTask(params: any, callback: (err: any, data: DecisionTask) => void): void;
- recordActivityTaskHeartbeat(params: any, callback: (err: any, data: any) => void): void;
- registerActivityType(params: any, callback: (err: any, data: any) => void): void;
- registerDomain(params: any, callback: (err: any, data: any) => void): void;
- registerWorkflowType(params: any, callback: (err: any, data: any) => void): void;
- requestCancelWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
- respondActivityTaskCanceled(params: RespondActivityTaskCanceledRequest, callback: (err: any, data: any) => void): void;
- respondActivityTaskCompleted(params: RespondActivityTaskCompletedRequest, callback: (err: any, data: any) => void): void;
- respondActivityTaskFailed(params: RespondActivityTaskFailedRequest, callback: (err: any, data: any) => void): void;
- respondDecisionTaskCompleted(params: RespondDecisionTaskCompletedRequest, callback: (err: any, data: any) => void): void;
- signalWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
- startWorkflowExecution(params: any, callback: (err: any, data: StartWorkflowExecutionResult) => void): void;
- terminateWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
- }
-
- export interface PollForActivityTaskRequest {
- domain?: string;
- taskList?: TaskList;
- identity?: string;
- }
-
- export interface TaskList {
- name?: string;
- }
-
- export interface PollForDecisionTaskRequest {
- domain?: string;
- taskList?: TaskList;
- identity?: string;
- nextPageToken?: string;
- maximumPageSize?: number;
- reverseOrder?: Boolean;
- }
-
- export interface StartWorkflowExecutionRequest {
- domain?: string;
- workflowId?: string;
- workflowType?: WorkflowType;
- taskList?: TaskList;
- input?: string;
- executionStartToCloseTimeout?: string;
- tagList?: string[];
- taskStartToCloseTimeout?: string;
- childPolicy?: string;
- }
-
- export interface WorkflowType {
- name?: string;
- version?: string;
- }
-
- export interface RespondDecisionTaskCompletedRequest {
- taskToken?: string;
- decisions?: Decision[];
- executionContext?: string;
- }
-
- export interface Decision {
- decisionType?: string;
- scheduleActivityTaskDecisionAttributes?: ScheduleActivityTaskDecisionAttributes;
- requestCancelActivityTaskDecisionAttributes?: RequestCancelActivityTaskDecisionAttributes;
- completeWorkflowExecutionDecisionAttributes?: CompleteWorkflowExecutionDecisionAttributes;
- failWorkflowExecutionDecisionAttributes?: FailWorkflowExecutionDecisionAttributes;
- cancelWorkflowExecutionDecisionAttributes?: CancelWorkflowExecutionDecisionAttributes;
- continueAsNewWorkflowExecutionDecisionAttributes?: ContinueAsNewWorkflowExecutionDecisionAttributes;
- recordMarkerDecisionAttributes?: RecordMarkerDecisionAttributes;
- startTimerDecisionAttributes?: StartTimerDecisionAttributes;
- cancelTimerDecisionAttributes?: CancelTimerDecisionAttributes;
- signalExternalWorkflowExecutionDecisionAttributes?: SignalExternalWorkflowExecutionDecisionAttributes;
- requestCancelExternalWorkflowExecutionDecisionAttributes?: RequestCancelExternalWorkflowExecutionDecisionAttributes;
- startChildWorkflowExecutionDecisionAttributes?: StartChildWorkflowExecutionDecisionAttributes;
- }
-
- export interface ScheduleActivityTaskDecisionAttributes {
- activityType?: ActivityType;
- activityId?: string;
- control?: string;
- input?: string;
- scheduleToCloseTimeout?: string;
- taskList?: TaskList;
- scheduleToStartTimeout?: string;
- startToCloseTimeout?: string;
- heartbeatTimeout?: string;
- }
-
- export interface ActivityType {
- name?: string;
- version?: string;
- }
-
- export interface RequestCancelActivityTaskDecisionAttributes {
- activityId?: string;
- }
-
- export interface CompleteWorkflowExecutionDecisionAttributes {
- result?: string;
- }
-
- export interface FailWorkflowExecutionDecisionAttributes {
- reason?: string;
- details?: string;
- }
-
- export interface CancelWorkflowExecutionDecisionAttributes {
- details?: string;
- }
-
- export interface ContinueAsNewWorkflowExecutionDecisionAttributes {
- input?: string;
- executionStartToCloseTimeout?: string;
- taskList?: TaskList;
- taskStartToCloseTimeout?: string;
- childPolicy?: string;
- tagList?: string[];
- workflowTypeVersion?: string;
- }
-
- export interface RecordMarkerDecisionAttributes {
- markerName?: string;
- details?: string;
- }
-
- export interface StartTimerDecisionAttributes {
- timerId?: string;
- control?: string;
- startToFireTimeout?: string;
- }
-
- export interface CancelTimerDecisionAttributes {
- timerId?: string;
- }
-
- export interface SignalExternalWorkflowExecutionDecisionAttributes {
- workflowId?: string;
- runId?: string;
- signalName?: string;
- input?: string;
- control?: string;
- }
-
- export interface RequestCancelExternalWorkflowExecutionDecisionAttributes {
- workflowId?: string;
- runId?: string;
- control?: string;
- }
-
- export interface StartChildWorkflowExecutionDecisionAttributes {
- workflowType?: WorkflowType;
- workflowId?: string;
- control?: string;
- input?: string;
- executionStartToCloseTimeout?: string;
- taskList?: TaskList;
- taskStartToCloseTimeout?: string;
- childPolicy?: string;
- tagList?: string[];
- }
-
- export interface RespondActivityTaskCompletedRequest {
- taskToken?: string;
- result?: string;
- }
-
- export interface RespondActivityTaskFailedRequest {
- taskToken?: string;
- reason?: string;
- details?: string;
- }
-
- export interface RespondActivityTaskCanceledRequest {
- taskToken?: string;
- details?: string;
- }
-
- export interface DecisionTask {
- taskToken?: string;
- startedEventId?: number;
- workflowExecution?: WorkflowExecution;
- workflowType?: WorkflowType;
- events?: HistoryEvent[];
- nextPageToken?: string;
- previousStartedEventId?: number;
- }
-
- export interface WorkflowExecution {
- workflowId?: string;
- runId?: string;
- }
-
- export interface HistoryEvent {
- eventTimestamp?: any;
- eventType?: string;
- eventId?: number;
- workflowExecutionStartedEventAttributes?: WorkflowExecutionStartedEventAttributes;
- workflowExecutionCompletedEventAttributes?: WorkflowExecutionCompletedEventAttributes;
- completeWorkflowExecutionFailedEventAttributes?: CompleteWorkflowExecutionFailedEventAttributes;
- workflowExecutionFailedEventAttributes?: WorkflowExecutionFailedEventAttributes;
- failWorkflowExecutionFailedEventAttributes?: FailWorkflowExecutionFailedEventAttributes;
- workflowExecutionTimedOutEventAttributes?: WorkflowExecutionTimedOutEventAttributes;
- workflowExecutionCanceledEventAttributes?: WorkflowExecutionCanceledEventAttributes;
- cancelWorkflowExecutionFailedEventAttributes?: CancelWorkflowExecutionFailedEventAttributes;
- workflowExecutionContinuedAsNewEventAttributes?: WorkflowExecutionContinuedAsNewEventAttributes;
- continueAsNewWorkflowExecutionFailedEventAttributes?: ContinueAsNewWorkflowExecutionFailedEventAttributes;
- workflowExecutionTerminatedEventAttributes?: WorkflowExecutionTerminatedEventAttributes;
- workflowExecutionCancelRequestedEventAttributes?: WorkflowExecutionCancelRequestedEventAttributes;
- decisionTaskScheduledEventAttributes?: DecisionTaskScheduledEventAttributes;
- decisionTaskStartedEventAttributes?: DecisionTaskStartedEventAttributes;
- decisionTaskCompletedEventAttributes?: DecisionTaskCompletedEventAttributes;
- decisionTaskTimedOutEventAttributes?: DecisionTaskTimedOutEventAttributes;
- activityTaskScheduledEventAttributes?: ActivityTaskScheduledEventAttributes;
- activityTaskStartedEventAttributes?: ActivityTaskStartedEventAttributes;
- activityTaskCompletedEventAttributes?: ActivityTaskCompletedEventAttributes;
- activityTaskFailedEventAttributes?: ActivityTaskFailedEventAttributes;
- activityTaskTimedOutEventAttributes?: ActivityTaskTimedOutEventAttributes;
- activityTaskCanceledEventAttributes?: ActivityTaskCanceledEventAttributes;
- activityTaskCancelRequestedEventAttributes?: ActivityTaskCancelRequestedEventAttributes;
- workflowExecutionSignaledEventAttributes?: WorkflowExecutionSignaledEventAttributes;
- markerRecordedEventAttributes?: MarkerRecordedEventAttributes;
- timerStartedEventAttributes?: TimerStartedEventAttributes;
- timerFiredEventAttributes?: TimerFiredEventAttributes;
- timerCanceledEventAttributes?: TimerCanceledEventAttributes;
- startChildWorkflowExecutionInitiatedEventAttributes?: StartChildWorkflowExecutionInitiatedEventAttributes;
- childWorkflowExecutionStartedEventAttributes?: ChildWorkflowExecutionStartedEventAttributes;
- childWorkflowExecutionCompletedEventAttributes?: ChildWorkflowExecutionCompletedEventAttributes;
- childWorkflowExecutionFailedEventAttributes?: ChildWorkflowExecutionFailedEventAttributes;
- childWorkflowExecutionTimedOutEventAttributes?: ChildWorkflowExecutionTimedOutEventAttributes;
- childWorkflowExecutionCanceledEventAttributes?: ChildWorkflowExecutionCanceledEventAttributes;
- childWorkflowExecutionTerminatedEventAttributes?: ChildWorkflowExecutionTerminatedEventAttributes;
- signalExternalWorkflowExecutionInitiatedEventAttributes?: SignalExternalWorkflowExecutionInitiatedEventAttributes;
- externalWorkflowExecutionSignaledEventAttributes?: ExternalWorkflowExecutionSignaledEventAttributes;
- signalExternalWorkflowExecutionFailedEventAttributes?: SignalExternalWorkflowExecutionFailedEventAttributes;
- externalWorkflowExecutionCancelRequestedEventAttributes?: ExternalWorkflowExecutionCancelRequestedEventAttributes;
- requestCancelExternalWorkflowExecutionInitiatedEventAttributes?: RequestCancelExternalWorkflowExecutionInitiatedEventAttributes;
- requestCancelExternalWorkflowExecutionFailedEventAttributes?: RequestCancelExternalWorkflowExecutionFailedEventAttributes;
- scheduleActivityTaskFailedEventAttributes?: ScheduleActivityTaskFailedEventAttributes;
- requestCancelActivityTaskFailedEventAttributes?: RequestCancelActivityTaskFailedEventAttributes;
- startTimerFailedEventAttributes?: StartTimerFailedEventAttributes;
- cancelTimerFailedEventAttributes?: CancelTimerFailedEventAttributes;
- startChildWorkflowExecutionFailedEventAttributes?: StartChildWorkflowExecutionFailedEventAttributes;
- }
-
- export interface WorkflowExecutionStartedEventAttributes {
- input?: string;
- executionStartToCloseTimeout?: string;
- taskStartToCloseTimeout?: string;
- childPolicy?: string;
- taskList?: TaskList;
- workflowType?: WorkflowType;
- tagList?: string[];
- continuedExecutionRunId?: string;
- parentWorkflowExecution?: WorkflowExecution;
- parentInitiatedEventId?: number;
- }
-
- export interface WorkflowExecutionCompletedEventAttributes {
- result?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface CompleteWorkflowExecutionFailedEventAttributes {
- cause?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface WorkflowExecutionFailedEventAttributes {
- reason?: string;
- details?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface FailWorkflowExecutionFailedEventAttributes {
- cause?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface WorkflowExecutionTimedOutEventAttributes {
- timeoutType?: string;
- childPolicy?: string;
- }
-
- export interface WorkflowExecutionCanceledEventAttributes {
- details?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface CancelWorkflowExecutionFailedEventAttributes {
- cause?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface WorkflowExecutionContinuedAsNewEventAttributes {
- input?: string;
- decisionTaskCompletedEventId?: number;
- newExecutionRunId?: string;
- executionStartToCloseTimeout?: string;
- taskList?: TaskList;
- taskStartToCloseTimeout?: string;
- childPolicy?: string;
- tagList?: string[];
- workflowType?: WorkflowType;
- }
-
- export interface ContinueAsNewWorkflowExecutionFailedEventAttributes {
- cause?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface WorkflowExecutionTerminatedEventAttributes {
- reason?: string;
- details?: string;
- childPolicy?: string;
- cause?: string;
- }
-
- export interface WorkflowExecutionCancelRequestedEventAttributes {
- externalWorkflowExecution?: WorkflowExecution;
- externalInitiatedEventId?: number;
- cause?: string;
- }
-
- export interface DecisionTaskScheduledEventAttributes {
- taskList?: TaskList;
- startToCloseTimeout?: string;
- }
-
- export interface DecisionTaskStartedEventAttributes {
- identity?: string;
- scheduledEventId?: number;
- }
-
- export interface DecisionTaskCompletedEventAttributes {
- executionContext?: string;
- scheduledEventId?: number;
- startedEventId?: number;
- }
-
- export interface DecisionTaskTimedOutEventAttributes {
- timeoutType?: string;
- scheduledEventId?: number;
- startedEventId?: number;
- }
-
- export interface ActivityTaskScheduledEventAttributes {
- activityType?: ActivityType;
- activityId?: string;
- input?: string;
- control?: string;
- scheduleToStartTimeout?: string;
- scheduleToCloseTimeout?: string;
- startToCloseTimeout?: string;
- taskList?: TaskList;
- decisionTaskCompletedEventId?: number;
- heartbeatTimeout?: string;
- }
-
- export interface ActivityTaskStartedEventAttributes {
- identity?: string;
- scheduledEventId?: number;
- }
-
- export interface ActivityTaskCompletedEventAttributes {
- result?: string;
- scheduledEventId?: number;
- startedEventId?: number;
- }
-
- export interface ActivityTaskFailedEventAttributes {
- reason?: string;
- details?: string;
- scheduledEventId?: number;
- startedEventId?: number;
- }
-
- export interface ActivityTaskTimedOutEventAttributes {
- timeoutType?: string;
- scheduledEventId?: number;
- startedEventId?: number;
- details?: string;
- }
-
- export interface ActivityTaskCanceledEventAttributes {
- details?: string;
- scheduledEventId?: number;
- startedEventId?: number;
- latestCancelRequestedEventId?: number;
- }
-
- export interface ActivityTaskCancelRequestedEventAttributes {
- decisionTaskCompletedEventId?: number;
- activityId?: string;
- }
-
- export interface WorkflowExecutionSignaledEventAttributes {
- signalName?: string;
- input?: string;
- externalWorkflowExecution?: WorkflowExecution;
- externalInitiatedEventId?: number;
- }
-
- export interface MarkerRecordedEventAttributes {
- markerName?: string;
- details?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface TimerStartedEventAttributes {
- timerId?: string;
- control?: string;
- startToFireTimeout?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface TimerFiredEventAttributes {
- timerId?: string;
- startedEventId?: number;
- }
-
- export interface TimerCanceledEventAttributes {
- timerId?: string;
- startedEventId?: number;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface StartChildWorkflowExecutionInitiatedEventAttributes {
- workflowId?: string;
- workflowType?: WorkflowType;
- control?: string;
- input?: string;
- executionStartToCloseTimeout?: string;
- taskList?: TaskList;
- decisionTaskCompletedEventId?: number;
- childPolicy?: string;
- taskStartToCloseTimeout?: string;
- tagList?: string[];
- }
-
- export interface ChildWorkflowExecutionStartedEventAttributes {
- workflowExecution?: WorkflowExecution;
- workflowType?: WorkflowType;
- initiatedEventId?: number;
- }
-
- export interface ChildWorkflowExecutionCompletedEventAttributes {
- workflowExecution?: WorkflowExecution;
- workflowType?: WorkflowType;
- result?: string;
- initiatedEventId?: number;
- startedEventId?: number;
- }
-
- export interface ChildWorkflowExecutionFailedEventAttributes {
- workflowExecution?: WorkflowExecution;
- workflowType?: WorkflowType;
- reason?: string;
- details?: string;
- initiatedEventId?: number;
- startedEventId?: number;
- }
-
- export interface ChildWorkflowExecutionTimedOutEventAttributes {
- workflowExecution?: WorkflowExecution;
- workflowType?: WorkflowType;
- timeoutType?: string;
- initiatedEventId?: number;
- startedEventId?: number;
- }
-
- export interface ChildWorkflowExecutionCanceledEventAttributes {
- workflowExecution?: WorkflowExecution;
- workflowType?: WorkflowType;
- details?: string;
- initiatedEventId?: number;
- startedEventId?: number;
- }
-
- export interface ChildWorkflowExecutionTerminatedEventAttributes {
- workflowExecution?: WorkflowExecution;
- workflowType?: WorkflowType;
- initiatedEventId?: number;
- startedEventId?: number;
- }
-
- export interface SignalExternalWorkflowExecutionInitiatedEventAttributes {
- workflowId?: string;
- runId?: string;
- signalName?: string;
- input?: string;
- decisionTaskCompletedEventId?: number;
- control?: string;
- }
-
- export interface ExternalWorkflowExecutionSignaledEventAttributes {
- workflowExecution?: WorkflowExecution;
- initiatedEventId?: number;
- }
-
- export interface SignalExternalWorkflowExecutionFailedEventAttributes {
- workflowId?: string;
- runId?: string;
- cause?: string;
- initiatedEventId?: number;
- decisionTaskCompletedEventId?: number;
- control?: string;
- }
-
- export interface ExternalWorkflowExecutionCancelRequestedEventAttributes {
- workflowExecution?: WorkflowExecution;
- initiatedEventId?: number;
- }
-
- export interface RequestCancelExternalWorkflowExecutionInitiatedEventAttributes {
- workflowId?: string;
- runId?: string;
- decisionTaskCompletedEventId?: number;
- control?: string;
- }
-
- export interface RequestCancelExternalWorkflowExecutionFailedEventAttributes {
- workflowId?: string;
- runId?: string;
- cause?: string;
- initiatedEventId?: number;
- decisionTaskCompletedEventId?: number;
- control?: string;
- }
-
- export interface ScheduleActivityTaskFailedEventAttributes {
- activityType?: ActivityType;
- activityId?: string;
- cause?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface RequestCancelActivityTaskFailedEventAttributes {
- activityId?: string;
- cause?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface StartTimerFailedEventAttributes {
- timerId?: string;
- cause?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface CancelTimerFailedEventAttributes {
- timerId?: string;
- cause?: string;
- decisionTaskCompletedEventId?: number;
- }
-
- export interface StartChildWorkflowExecutionFailedEventAttributes {
- workflowType?: WorkflowType;
- cause?: string;
- workflowId?: string;
- initiatedEventId?: number;
- decisionTaskCompletedEventId?: number;
- control?: string;
- }
-
- export interface ActivityTask {
- taskToken?: string;
- activityId?: string;
- startedEventId?: number;
- workflowExecution?: WorkflowExecution;
- activityType?: ActivityType;
- input?: string;
- }
-
- export interface PollForActivityTaskResult {
- activityTask?: ActivityTask;
- }
-
- export interface PollForDecisionTaskResult {
- decisionTask?: DecisionTask;
- }
-
- export interface StartWorkflowExecutionResult {
- run?: Run;
- }
-
- export interface Run {
- runId?: string;
- }
-
- }
-
- export module Sns {
-
- export interface Client {
- config: ClientConfig;
-
- publish(params: PublishRequest, callback: (err: any, data: PublishResult) => void): void;
- createTopic(params: CreateTopicRequest, callback: (err: any, data: CreateTopicResult) => void): void;
- deleteTopic(params: DeleteTopicRequest, callback: (err: any, data: any) => void): void;
- }
-
- export interface PublishRequest {
- TopicArn?: string;
- TargetArn?: string;
- MessageAttributes?: { [name: string]: MessageAttribute; };
- Message?: string;
- MessageStructure?: string;
- Subject?: string;
- }
-
- export interface MessageAttribute {
- DataType: string;
- StringValue?: string;
- BinaryValue: any; // (Buffer, Typed Array, Blob, String)
- }
-
- export interface PublishResult {
- MessageId?: string;
- }
-
- export interface CreateTopicRequest {
- Name?: string;
- }
-
- export interface CreateTopicResult {
- TopicArn?: string;
- }
-
- export interface DeleteTopicRequest {
- TopicArn?: string;
- }
-
- }
-
- export module s3 {
- export interface PutObjectRequest {
- ACL?: string;
- Body?: any;
- Bucket: string;
- CacheControl?: string;
- ContentDisposition?: string;
- ContentEncoding?: string;
- ContentLanguage?: string;
- ContentLength?: string;
- ContentMD5?: string;
- ContentType?: string;
- Expires?: any;
- GrantFullControl?: string;
- GrantRead?: string;
- GrantReadACP?: string;
- GrantWriteACP?: string;
- Key: string;
- Metadata?: { [key: string]:string; };
- ServerSideEncryption?: string;
- StorageClass?: string;
- WebsiteRedirectLocation?: string;
+ updateService(params: ecs.UpdateServiceParams, callback: (err: any, data: any) => void): void;
+ }
+
+ export class DynamoDB {
+ constructor(options?: any);
+ endpoint: Endpoint;
+ createTable(params: any, next: (err: any, data: any) => void): void;
+ deleteTable(params: any, next: (err: any, data: any) => void): void;
+ }
+
+ // ==========================================================
+
+ export module DynamoDB {
+
+ interface _DDBDC_Generic {
+ TableName: string;
+ ExpressionAttributeNames?: { [someKey: string]: string };
+ ReturnConsumedCapacity?: "INDEXES" | "TOTAL" | "NONE";
+ }
+
+ type _DDBDC_ComparisonOperator = "EQ" | "NE" | "IN" | "LE" | "LT" | "GE" | "GT" | "BETWEEN" | "NOT_NULL" | "NULL" | "CONTAINS" | "NOT_CONTAINS" | "BEGINS_WITH"
+ type _DDBDC_Keys = { [someKey: string]: any };
+ type _DDBDC_KeyComparison = {
+ [someKey: string]: {
+ AttributeValueList: any[];
+ ComparisonOperator: _DDBDC_ComparisonOperator;
+ }
+ };
+
+ interface _DDBDC_Reader extends _DDBDC_Generic {
+ ConsistentRead?: boolean;
+ ProjectionExpression?: string;
+ AttributesToGet?: string[];
+ }
+
+ interface _DDBDC_Writer extends _DDBDC_Generic {
+ ExpressionAttributeValues?: _DDBDC_Keys;
+ ReturnItemCollectionMetrics?: "SIZE" | "NONE";
+ ReturnValues?: "NONE" | "ALL_OLD" | "UPDATED_OLD" | "ALL_NEW" | "UPDATED_NEW";
+ ConditionExpression?: string;
+ ConditionalOperator?: "AND" | "OR";
+ Expected?: {
+ [someKey: string]: {
+ AttributeValueList?: any[];
+ ComparisonOperator?: _DDBDC_ComparisonOperator;
+ Exists: boolean;
+ Value?: any;
}
+ }
+ }
- export interface GetObjectRequest {
- Bucket: string;
- IfMatch?: string;
- IfModifiedSince?: any;
- IfNoneMatch?: string;
- IfUnmodifiedSince?: any;
- Key: string;
- Range?: string;
- ResponseCacheControl?: string;
- ResponseContentDisposition?: string;
- ResponseContentEncoding?: string;
- ResponseContentLanguage?: string;
- ResponseContentType?: string;
- ResponseExpires?: any;
- VersionId?: string;
+ interface UpdateParam extends _DDBDC_Writer {
+ Key: _DDBDC_Keys;
+ AttributeUpdates: {
+ [someKey: string]: {
+ Action: "PUT" | "ADD" | "DELETE";
+ Value: any
}
+ }
+ }
- export interface DeleteObjectRequest {
- Bucket: string;
- Key: string;
- MFA?: string;
- RequestPayer?: string;
- VersionId?: string;
- }
+ interface QueryParam extends _DDBDC_Reader {
+ ConditionalOperator?: "AND" | "OR";
+ ExclusiveStartKey?: _DDBDC_Keys;
+ ExpressionAttributeValues?: _DDBDC_Keys;
+ FilterExpression?: string;
+ IndexName?: string;
+ KeyConditionExpression?: string;
+ KeyConditions?: _DDBDC_KeyComparison;
+ Limit?: number;
+ QueryFilter?: _DDBDC_KeyComparison;
+ ScanIndexForward?: boolean;
+ Select?: "ALL_ATTRIBUTES" | "ALL_PROJECTED_ATTRIBUTES" | "SPECIFIC_ATTRIBUTES" | "COUNT";
+ }
- export interface HeadObjectRequest {
- Bucket: string;
- Key: string;
- IfMatch?: string;
- IfModifiedSince?: Date;
- IfNoneMatch?: string;
- IfUnmodifiedSince?: Date;
- Range?: string;
- RequestPayer?: string;
- SSECustomerAlgorithm?: string;
- SSECustomerKey?: Buffer | string;
- SSECustomerKeyMD5?: string;
- VersionId?: string;
- }
+ interface ScanParam extends QueryParam {
+ Segment?: number;
+ ScanFilter?: _DDBDC_KeyComparison;
+ TotalSegments?: number;
+ }
- export interface UploadOptions {
- partSize?: number;
- queueSize?: number;
- }
- }
+ interface GetParam extends _DDBDC_Reader {
+ Key: _DDBDC_Keys;
+ }
- export module ecs {
- export interface CreateServicesParams {
- desiredCount: number;
- serviceName: string;
- taskDefinition: string;
- clientToken?: string;
- cluster?: string;
- deploymentConfiguration?: {
- maximumPercent?: number;
- minimumHealthyPercent?: number;
- };
- loadBalancers?: {
- containerName?: string;
- containerPort?: number;
- loadBalancerName?: string;
- }[];
- role?: string;
- }
+ interface PutParam extends _DDBDC_Writer {
+ Item: _DDBDC_Keys;
+ }
- export interface DescribeServicesParams {
+ interface DeleteParam extends _DDBDC_Writer {
+ Key: _DDBDC_Keys;
+ }
+
+ export class DocumentClient {
+ constructor(options?: any);
+ get(params: GetParam, next: (err: any, data: any) => void): void;
+ put(params: PutParam, next: (err: any, data: any) => void): void;
+ delete(params: DeleteParam, next: (err: any, data: any) => void): void;
+ query(params: QueryParam, next: (err: any, data: any) => void): void;
+ scan(params: ScanParam, next: (err: any, data: any) => void): void;
+ update(params: UpdateParam, next: (err: any, data: any) => void): void;
+ createSet(list: any[], options?: { validate?: boolean }): { values: any[], type: string };
+ batchGet(params: any, next: (err: any, data: any) => void): void;
+ batchWrite(params: any, next: (err: any, data: any) => void): void;
+ }
+
+ }
+
+ // ===========================================================
+
+ export module Lambda {
+
+ export interface AddPermissionParams {
+ Action: string;
+ FunctionName: string;
+ Principal: string;
+ StatementId: string;
+ Qualifier?: string;
+ SourceAccount?: string;
+ SourceArn?: string;
+ }
+
+ export interface CreateAliasParams {
+ FunctionName: string;
+ FunctionVersion: string;
+ Name: string;
+ Description?: string;
+ }
+
+ export interface CreateEventSourceMappingParams {
+ EventSourceArn: string;
+ FunctionName: string;
+ StartingPosition: string; /* TRIM_HORIZON | LATEST */
+ BatchSize?: number;
+ Enabled?: boolean
+ }
+
+ export interface CreateFunctionParams {
+ Code: {
+ S3Bucket?: string;
+ S3Key?: string;
+ S3ObjectVersion?: string;
+ ZipFile?: any; // new Buffer('...') || string;
+ },
+ FunctionName: string;
+ Handler: string;
+ Role: string;
+ Runtime: string; /* 'nodejs | java8 | python2.7', */
+ Description?: string;
+ MemorySize?: number;
+ Publish?: boolean;
+ Timeout?: number;
+ VpcConfig?: {
+ SecurityGroupIds?: string[];
+ SubnetIds?: string[];
+ }
+ }
+
+ export interface DeleteAliasParams {
+ FunctionName: string;
+ Name: string;
+ }
+
+ export interface DeleteEventSourceMappingParams {
+ UUID: string;
+ }
+
+ export interface DeleteFunctionParams {
+ FunctionName: string;
+ Qualifier?: string;
+ }
+ export interface GetAliasParams {
+ FunctionName: string;
+ Name: string;
+ }
+
+ export interface GetEventSourceMappingParams {
+ UUID: string;
+ }
+
+ export interface GetFunctionParams {
+ FunctionName: string;
+ Qualifier?: string;
+ }
+
+ export interface GetFunctionConfigurationParams {
+ FunctionName: string;
+ Qualifier?: string;
+ }
+
+ export interface GetPolicyParams {
+ FunctionName: string;
+ Qualifier?: string;
+ }
+
+ export interface InvokeParams {
+ FunctionName: string;
+ ClientContext?: string;
+ InvocationType?: string;/* 'Event | RequestResponse | DryRun' */
+ LogType?: string; /* 'None | Tail' */
+ Payload?: any; /* new Buffer('...') || string */
+ Qualifier?: string;
+ }
+
+ export interface ListAliasesParams {
+ FunctionName: string;
+ FunctionVersion?: string;
+ Marker?: string;
+ MaxItems?: number
+ }
+
+ export interface ListEventSourceMappingsParams {
+ EventSourceArn?: string;
+ FunctionName?: string;
+ Marker?: string;
+ MaxItems?: number
+ }
+
+ export interface ListFunctionsParams {
+ Marker?: string;
+ MaxItems?: number
+ }
+
+ export interface ListVersionsByFunctionParams {
+ FunctionName: string;
+ Marker?: string;
+ MaxItems?: number
+ }
+
+ export interface PublishVersionParams {
+ FunctionName: string;
+ CodeSha256?: string;
+ Description?: string;
+ }
+
+ export interface RemovePermissionParams {
+ FunctionName: string;
+ StatementId: string;
+ Qualifier?: string;
+ }
+
+ export interface UpdateAliasParams {
+ FunctionName: string;
+ Name: string;
+ Description?: string;
+ FunctionVersion?: string;
+ }
+
+ export interface UpdateEventSourceMappingParams {
+ UUID: string;
+ BatchSize?: number;
+ Enabled?: boolean;
+ FunctionName?: string;
+ }
+
+ export interface UpdateFunctionCodeParams {
+ FunctionName: string;
+ Publish?: boolean;
+ S3Bucket?: string;
+ S3Key?: string;
+ S3ObjectVersion?: string;
+ ZipFile?: any; /* new Buffer('...') || string; */
+
+ }
+
+ export interface UpdateFunctionConfigurationParams {
+ FunctionName: string;
+ Description?: string;
+ Handler?: string;
+ MemorySize?: number;
+ Role?: string;
+ Timeout?: number;
+ VpcConfig?: {
+ SecurityGroupIds?: string[];
+ SubnetIds?: string[];
+ }
+ }
+ }
+
+ export module AutoScaling {
+ export interface AutoScalingOptions {
+ params?: any;
+ endpoint?: string;
+ accessKeyId?: string;
+ secretAccessKey?: string;
+ sessionToken?: Credentials;
+ credentials?: Credentials;
+ credentialProvider?: any;
+ region?: string;
+ maxRetries?: number;
+ maxRedirects?: number;
+ sslEnabled?: boolean;
+ paramValidation?: boolean;
+ computeChecksums?: boolean;
+ convertResponseTypes?: boolean;
+ correctClockSkew?: boolean;
+ s3ForcePathStyle?: boolean;
+ s3BucketEndpoint?: boolean;
+ s3DisableBodySigning?: boolean;
+ retryDelayOptions?: RetryDelayOption;
+ httpOptions?: HttpOptions;
+ apiVersion?: string;
+ apiVersions?: { [serviceName: string]: string };
+ logger?: Logger;
+ systemClockOffset?: number;
+ signatureVersion?: string;
+ signatureCache?: boolean;
+ }
+
+ export interface AttachInstancesParams {
+ AutoScalingGroupName: string;
+ InstanceIds: string[];
+ }
+
+ export interface AttachLoadBalancersParams {
+ AutoScalingGroupName: string;
+ LoadBalancerNames: string[];
+ }
+
+ export interface AttachLoadBalancerTargetGroupsParams {
+ AutoScalingGroupName: string;
+ TargetGroupARNs: string[];
+ }
+
+ export interface CompleteLifecycleActionParams {
+ AutoScalingGroupName: string;
+ LifecycleActionResult: string;
+ LifecycleHookName: string;
+ lifecycleActionToken?: string;
+ InstanceId?: string;
+ }
+
+ export interface CreateAutoScalingGroupParams {
+ AutoScalingGroupName: string;
+ MinSize: number;
+ MaxSize: number;
+ LaunchConfigurationName?: string;
+ InstanceId?: string;
+ DesiredCapacity?: number;
+ DefaultCooldown?: number;
+ AvailabilityZones?: string[];
+ LoadBalancerNames?: string[];
+ TargetGroupARNs?: string[];
+ HealthCheckType?: string;
+ HealthCheckGracePeriod?: number;
+ PlacementGroup?: string;
+ VPCZoneIdentifier?: string;
+ TerminationPolicies?: string;
+ NewInstancesProtectedFromScaleIn?: boolean;
+ Tags?: Tags;
+ }
+
+ export interface CreateLaunchConfigurationParams {
+ LaunchConfigurationName: string;
+ AssociatePublicIpAddress?: boolean;
+ ImageId?: string;
+ KeyName?: string;
+ SecurityGroups?: string[];
+ ClassicLinkVPCId?: string;
+ ClassicLinkVPCSecurityGroups?: string[];
+ UserData?: string;
+ InstanceId?: string;
+ InstanceType?: string;
+ KernelId?: string;
+ RamdiskId?: string;
+ BlockDeviceMappings?: BlockDeviceMapping[];
+ InstanceMonitoring?: InstanceMonitoring;
+ SpotPrice?: string;
+ IamInstanceProfile?: string;
+ EbsOptimized?: boolean;
+ PlacementTenancy?: string;
+ }
+
+ export interface CreateOrUpdateTagsParams {
+ Tags: Tags[];
+ }
+
+ export interface DeleteAutoScalingGroupParams {
+ AutoScalingGroupName: string;
+ ForceDelete?: boolean;
+ }
+
+ export interface DeleteLaunchConfigurationParams {
+ LaunchConfigurationName: string;
+ }
+
+ export interface DeleteLifecycleHookParams {
+ AutoScalingGroupName: string;
+ LifecycleHookName: string;
+ }
+
+ export interface DeleteNotificationConfigurationParams {
+ AutoScalingGroupName: string;
+ TopicARN: string;
+ }
+
+ export interface DeletePolicyParams {
+ PolicyName: string;
+ AutoScalingGroupName?: string;
+ }
+
+ export interface DeleteScheduledActionParams {
+ AutoScalingGroupName: string;
+ ScheduledActionName: string;
+ }
+
+ export interface DeleteTagsParams {
+ Tags: Tags[];
+ }
+
+ export interface DescribeAutoScalingGroupsParams {
+ AutoScalingGroupName?: string;
+ NextToken?: string;
+ MaxRecords?: number;
+ }
+
+ export interface DescribeAutoScalingInstancesParams {
+ InstanceIds?: string[];
+ NextToken?: string;
+ MaxRecords?: number;
+ }
+
+ export interface DescribeLaunchConfigurationsParams {
+ LaunchConfigurationNames?: string[];
+ NextToken?: string;
+ MaxRecords?: number;
+ }
+
+ export interface DescribeLifecycleHooksParams {
+ AutoScalingGroupName: string;
+ LifecycleHookNames?: string[];
+ }
+
+ export interface DescribeLoadBalancersParams {
+ AutoScalingGroupName: string;
+ NextToken?: string;
+ MaxRecords?: number;
+ }
+
+ export interface DescribeLoadBalancerTargetGroupsParams {
+ AutoScalingGroupName: string;
+ NextToken?: string;
+ MaxRecords?: number;
+ }
+
+ export interface DescribeNotificationConfigurationsParams {
+ AutoScalingGroupName?: string;
+ NextToken?: string;
+ MaxRecords?: number;
+ }
+
+ export interface DescribePoliciesParams {
+ AutoScalingGroupName?: string;
+ PolicyNames?: string[];
+ PolicyTypes?: string[];
+ NextToken?: string;
+ MaxRecords?: number;
+ }
+
+ export interface DescribeScalingActivitiesParams {
+ AutoScalingGroupName?: string;
+ ActivityIds?: string[];
+ NextToken?: string;
+ MaxRecords?: number;
+ }
+
+ export interface DescribeScheduledActionsParams {
+ AutoScalingGroupName?: string;
+ ScheduledActionNames?: string[];
+ StartTime?: Date;
+ EndTime?: Date;
+ NextToken?: string;
+ MaxRecords?: number;
+ }
+
+ export interface DescribeTagsParams {
+ Filters?: Filter[];
+ NextToken?: string;
+ MaxRecords?: number;
+ }
+
+ export interface DetachInstancesParams {
+ AutoScalingGroupName: string;
+ ShouldDecrementDesiredCapacity: boolean;
+ InstanceIds?: string[];
+ }
+
+ export interface DetachLoadBalancersParams {
+ AutoScalingGroupName: string;
+ LoadBalancerNames: string;
+ }
+
+ export interface DetachLoadBalancerTargetGroupsParams {
+ AutoScalingGroupName: string;
+ TargetGroupARNs: string[];
+ }
+
+ export interface DisableMetricsCollectionParams {
+ AutoScalingGroupName: string;
+ Metrics?: string[];
+ }
+
+ export interface EnableMetricsCollectionParams {
+ AutoScalingGroupName: string;
+ Granularity: string;
+ Metrics?: string[];
+ }
+
+ export interface EnterStandbyParams {
+ AutoScalingGroupName: string;
+ ShouldDecrementDesiredCapacity: boolean;
+ InstanceIds?: string[];
+ }
+
+ export interface ExecutePolicyParams {
+ PolicyName: string;
+ AutoScalingGroupName?: string;
+ HonorCooldown?: boolean;
+ MetricValue?: number;
+ BreachThreshold?: number;
+ }
+
+ export interface ExitStandbyParams {
+ AutoScalingGroupName: string;
+ InstanceIds?: string[];
+ }
+
+ export interface PutLifecycleHookParams {
+ AutoScalingGroupName: string;
+ LifecycleHookName: string;
+ LifecycleTransition?: string;
+ RoleARN?: string;
+ NotificationTargetARN?: string;
+ NotificationMetadata?: string;
+ HeartbeatTimeout?: number;
+ DefaultResult?: string;
+ }
+
+ export interface PutNotificationConfigurationParams {
+ AutoScalingGroupName: string;
+ NotificationTypes: string[];
+ TopicARN: string;
+ }
+
+ export interface PutScalingPolicyParams {
+ AutoScalingGroupName: string;
+ AdjustmentType: string;
+ PolicyName: string;
+ PolicyType?: string;
+ MinAdjustmentStep?: number;
+ MinAdjustmentMagnitude?: number;
+ ScalingAdjustment?: number;
+ Cooldown?: number;
+ MetricAggregationType?: string;
+ StepAdjustments?: StepAdjustment[];
+ EstimatedInstanceWarmup: number;
+ }
+
+ export interface PutScheduledUpdateGroupActionParams {
+ AutoScalingGroupName: string;
+ ScheduledActionName: string;
+ Time?: Date;
+ StartTime?: Date;
+ EndTime?: Date;
+ Recurrence?: string;
+ MinSize?: number;
+ MaxSize?: number;
+ DesiredCapacity?: number;
+ }
+
+ export interface RecordLifecycleActionHeartbeatParams {
+ AutoScalingGroupName: string;
+ LifecycleHookName: string;
+ LifecycleActionToken?: string;
+ InstanceId?: string;
+ }
+
+ export interface ResumeProcessesParams {
+ AutoScalingGroupName: string;
+ ScalingProcesses?: string[];
+ }
+
+ export interface SetDesiredCapacityParams {
+ AutoScalingGroupName: string;
+ DesiredCapacity: number;
+ HonorCooldown?: boolean;
+ }
+
+ export interface SetInstanceHealthParams {
+ HealthStatus: string;
+ InstanceId: string;
+ ShouldRespectGracePeriod?: boolean;
+ }
+
+ export interface SetInstanceProtectionParams {
+ AutoScalingGroupName: string;
+ InstanceIds: string[];
+ ProtectedFromScaleIn: boolean;
+ }
+
+ export interface SuspendProcessesParams {
+ AutoScalingGroupName: string;
+ ScalingProcesses?: string[];
+ }
+
+ export interface TerminateInstanceInAutoScalingGroupParams {
+ InstanceId: string;
+ ShouldDecrementDesiredCapacity: boolean;
+ }
+
+ export interface UpdateAutoScalingGroupParams {
+ AutoScalingGroupName: string;
+ LaunchConfigurationName: string;
+ MinSize: number;
+ MaxSize: number;
+ DesiredCapacity: number;
+ DefaultCooldown: number;
+ AvailabilityZones: string[];
+ HealthCheckType: string;
+ HealthCheckGracePeriod: number;
+ PlacementGroup: string;
+ VPCZoneIdentifier: string;
+ TerminationPolicies: string[];
+ NewInstancesProtectedFromScaleIn?: boolean;
+ }
+ }
+
+
+ export module SQS {
+
+ export interface SqsOptions {
+ params?: any;
+ endpoint?: string;
+ accessKeyId?: string;
+ secretAccessKey?: string;
+ sessionToken?: Credentials;
+ credentials?: Credentials;
+ credentialProvider?: any;
+ region?: string;
+ maxRetries?: number;
+ maxRedirects?: number;
+ sslEnabled?: boolean;
+ paramValidation?: boolean;
+ computeChecksums?: boolean;
+ convertResponseTypes?: boolean;
+ correctClockSkew?: boolean;
+ s3ForcePathStyle?: boolean;
+ s3BucketEndpoint?: boolean;
+ httpOptions?: HttpOptions;
+ apiVersion?: string;
+ apiVersions?: { [serviceName: string]: string };
+ logger?: Logger;
+ systemClockOffset?: number;
+ signatureVersion?: string;
+ signatureCache?: boolean;
+ }
+
+ export interface AddPermissionParams {
+ QueueUrl: string;
+ Label: string;
+ AWSAccountIds: string[];
+ Actions: string[];
+ }
+
+ export interface ChangeMessageVisibilityParams {
+ QueueUrl: string,
+ ReceiptHandle: string,
+ VisibilityTimeout: number
+ }
+
+ export interface ChangeMessageVisibilityBatchParams {
+ QueueUrl: string,
+ Entries: { Id: string; ReceiptHandle: string; VisibilityTimeout?: number; }[]
+ }
+
+ export interface ChangeMessageVisibilityBatchResponse {
+ Successful: { Id: string }[];
+ Failed: BatchResultErrorEntry[];
+ }
+
+ export interface SendMessageParams {
+ QueueUrl?: string;
+ MessageBody: string;
+ DelaySeconds?: number;
+ MessageAttributes?: { [name: string]: MessageAttribute; }
+ }
+
+ export interface ReceiveMessageParams {
+ QueueUrl: string;
+ MaxNumberOfMessages?: number;
+ VisibilityTimeout?: number;
+ AttributeNames?: string[];
+ MessageAttributeNames?: string[];
+ WaitTimeSeconds?: number;
+ }
+
+ export interface DeleteMessageBatchParams {
+ QueueUrl: string;
+ Entries: DeleteMessageBatchRequestEntry[];
+ }
+
+ export interface DeleteMessageBatchRequestEntry {
+ Id: string;
+ ReceiptHandle: string;
+ }
+
+ export interface DeleteMessageParams {
+ QueueUrl: string;
+ ReceiptHandle: string;
+ }
+
+ export interface SendMessageBatchParams {
+ QueueUrl: string;
+ Entries: SendMessageBatchRequestEntry[];
+ }
+
+ export interface SendMessageBatchRequestEntry {
+ Id: string;
+ MessageBody: string;
+ DelaySeconds?: number;
+ MessageAttributes?: { [name: string]: MessageAttribute; }
+ }
+
+ export interface CreateQueueParams {
+ QueueName: string;
+ Attributes: QueueAttributes;
+ }
+
+ export interface QueueAttributes {
+ [name: string]: any;
+ DelaySeconds?: number;
+ MaximumMessageSize?: number;
+ MessageRetentionPeriod?: number;
+ Policy?: any;
+ ReceiveMessageWaitTimeSeconds?: number;
+ VisibilityTimeout?: number;
+ RedrivePolicy?: any;
+ }
+
+ export interface GetQueueAttributesParams {
+ QueueUrl: string;
+ AttributeNames: string[];
+ }
+
+ export interface GetQueueAttributesResult {
+ Attributes: { [name: string]: string };
+ }
+
+ export interface GetQueueUrlParams {
+ QueueName: string;
+ QueueOwnerAWSAccountId?: string;
+ }
+
+ export interface SendMessageResult {
+ MessageId: string;
+ MD5OfMessageBody: string;
+ MD5OfMessageAttributes: string;
+ }
+
+ export interface ReceiveMessageResult {
+ Messages: Message[];
+ }
+
+ export interface Message {
+ MessageId: string;
+ ReceiptHandle: string;
+ MD5OfBody: string;
+ Body: string;
+ Attributes: { [name: string]: any };
+ MD5OfMessageAttributes: string;
+ MessageAttributes: { [name: string]: MessageAttribute; }
+ }
+
+ export interface MessageAttribute {
+ StringValue?: string;
+ BinaryValue?: any; //(Buffer, Typed Array, Blob, String)
+ StringListValues?: string[];
+ BinaryListValues?: any[];
+ DataType: string;
+ }
+
+ export interface DeleteMessageBatchResult {
+ Successful: DeleteMessageBatchResultEntry[];
+ Failed: BatchResultErrorEntry[];
+ }
+
+ export interface DeleteMessageBatchResultEntry {
+ Id: string;
+ }
+
+ export interface BatchResultErrorEntry {
+ Id: string;
+ Code: string;
+ Message?: string;
+ SenderFault: boolean;
+ }
+
+ export interface SendMessageBatchResult {
+ Successful: SendMessageBatchResultEntry[];
+ Failed: BatchResultErrorEntry[];
+ }
+
+ export interface SendMessageBatchResultEntry {
+ Id: string;
+ MessageId: string;
+ MD5OfMessageBody: string;
+ MD5OfMessageAttributes: string;
+ }
+
+ export interface CreateQueueResult {
+ QueueUrl: string;
+ }
+
+ export interface SetQueueAttributesParams {
+ QueueUrl: string;
+ Attributes: QueueAttributes;
+ }
+
+ }
+
+ export module SES {
+
+ export interface Client {
+ config: ClientConfig;
+
+ sendEmail(params: any, callback: (err: any, data: SendEmailResult) => void): void;
+ }
+
+ export interface SendEmailRequest {
+ Source: string;
+ Destination: Destination;
+ Message: Message;
+ ReplyToAddresses: string[];
+ ReturnPath: string;
+ }
+
+ export class Destination {
+ ToAddresses: string[];
+ CcAddresses: string[];
+ BccAddresses: string[];
+ }
+
+ export class Message {
+ Subject: Content;
+ Body: Body;
+ }
+
+ export class Content {
+ Data: string;
+ Charset: string;
+ }
+
+ export class Body {
+ Text: Content;
+ Html: Content;
+ }
+
+ export class SendEmailResult {
+ MessageId: string;
+ }
+
+ }
+
+ export module Swf {
+
+ export interface Client {
+ //constructor(options?: any);
+ config: ClientConfig;
+
+ countClosedWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
+ countOpenWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
+ countPendingActivityTasks(params: any, callback: (err: any, data: any) => void): void;
+ countPendingDecisionTasks(params: any, callback: (err: any, data: any) => void): void;
+ deprecateActivityType(params: any, callback: (err: any, data: any) => void): void;
+ deprecateDomain(params: any, callback: (err: any, data: any) => void): void;
+ deprecateWorkflowType(params: any, callback: (err: any, data: any) => void): void;
+ describeActivityType(params: any, callback: (err: any, data: any) => void): void;
+ describeDomain(params: any, callback: (err: any, data: any) => void): void;
+ describeWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
+ describeWorkflowType(params: any, callback: (err: any, data: any) => void): void;
+ getWorkflowExecutionHistory(params: any, callback: (err: any, data: any) => void): void;
+ listActivityTypes(params: any, callback: (err: any, data: any) => void): void;
+ listClosedWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
+ listDomains(params: any, callback: (err: any, data: any) => void): void;
+ listOpenWorkflowExecutions(params: any, callback: (err: any, data: any) => void): void;
+ listWorkflowTypes(params: any, callback: (err: any, data: any) => void): void;
+ pollForActivityTask(params: any, callback: (err: any, data: ActivityTask) => void): void;
+ pollForDecisionTask(params: any, callback: (err: any, data: DecisionTask) => void): void;
+ recordActivityTaskHeartbeat(params: any, callback: (err: any, data: any) => void): void;
+ registerActivityType(params: any, callback: (err: any, data: any) => void): void;
+ registerDomain(params: any, callback: (err: any, data: any) => void): void;
+ registerWorkflowType(params: any, callback: (err: any, data: any) => void): void;
+ requestCancelWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
+ respondActivityTaskCanceled(params: RespondActivityTaskCanceledRequest, callback: (err: any, data: any) => void): void;
+ respondActivityTaskCompleted(params: RespondActivityTaskCompletedRequest, callback: (err: any, data: any) => void): void;
+ respondActivityTaskFailed(params: RespondActivityTaskFailedRequest, callback: (err: any, data: any) => void): void;
+ respondDecisionTaskCompleted(params: RespondDecisionTaskCompletedRequest, callback: (err: any, data: any) => void): void;
+ signalWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
+ startWorkflowExecution(params: any, callback: (err: any, data: StartWorkflowExecutionResult) => void): void;
+ terminateWorkflowExecution(params: any, callback: (err: any, data: any) => void): void;
+ }
+
+ export interface PollForActivityTaskRequest {
+ domain?: string;
+ taskList?: TaskList;
+ identity?: string;
+ }
+
+ export interface TaskList {
+ name?: string;
+ }
+
+ export interface PollForDecisionTaskRequest {
+ domain?: string;
+ taskList?: TaskList;
+ identity?: string;
+ nextPageToken?: string;
+ maximumPageSize?: number;
+ reverseOrder?: Boolean;
+ }
+
+ export interface StartWorkflowExecutionRequest {
+ domain?: string;
+ workflowId?: string;
+ workflowType?: WorkflowType;
+ taskList?: TaskList;
+ input?: string;
+ executionStartToCloseTimeout?: string;
+ tagList?: string[];
+ taskStartToCloseTimeout?: string;
+ childPolicy?: string;
+ }
+
+ export interface WorkflowType {
+ name?: string;
+ version?: string;
+ }
+
+ export interface RespondDecisionTaskCompletedRequest {
+ taskToken?: string;
+ decisions?: Decision[];
+ executionContext?: string;
+ }
+
+ export interface Decision {
+ decisionType?: string;
+ scheduleActivityTaskDecisionAttributes?: ScheduleActivityTaskDecisionAttributes;
+ requestCancelActivityTaskDecisionAttributes?: RequestCancelActivityTaskDecisionAttributes;
+ completeWorkflowExecutionDecisionAttributes?: CompleteWorkflowExecutionDecisionAttributes;
+ failWorkflowExecutionDecisionAttributes?: FailWorkflowExecutionDecisionAttributes;
+ cancelWorkflowExecutionDecisionAttributes?: CancelWorkflowExecutionDecisionAttributes;
+ continueAsNewWorkflowExecutionDecisionAttributes?: ContinueAsNewWorkflowExecutionDecisionAttributes;
+ recordMarkerDecisionAttributes?: RecordMarkerDecisionAttributes;
+ startTimerDecisionAttributes?: StartTimerDecisionAttributes;
+ cancelTimerDecisionAttributes?: CancelTimerDecisionAttributes;
+ signalExternalWorkflowExecutionDecisionAttributes?: SignalExternalWorkflowExecutionDecisionAttributes;
+ requestCancelExternalWorkflowExecutionDecisionAttributes?: RequestCancelExternalWorkflowExecutionDecisionAttributes;
+ startChildWorkflowExecutionDecisionAttributes?: StartChildWorkflowExecutionDecisionAttributes;
+ }
+
+ export interface ScheduleActivityTaskDecisionAttributes {
+ activityType?: ActivityType;
+ activityId?: string;
+ control?: string;
+ input?: string;
+ scheduleToCloseTimeout?: string;
+ taskList?: TaskList;
+ scheduleToStartTimeout?: string;
+ startToCloseTimeout?: string;
+ heartbeatTimeout?: string;
+ }
+
+ export interface ActivityType {
+ name?: string;
+ version?: string;
+ }
+
+ export interface RequestCancelActivityTaskDecisionAttributes {
+ activityId?: string;
+ }
+
+ export interface CompleteWorkflowExecutionDecisionAttributes {
+ result?: string;
+ }
+
+ export interface FailWorkflowExecutionDecisionAttributes {
+ reason?: string;
+ details?: string;
+ }
+
+ export interface CancelWorkflowExecutionDecisionAttributes {
+ details?: string;
+ }
+
+ export interface ContinueAsNewWorkflowExecutionDecisionAttributes {
+ input?: string;
+ executionStartToCloseTimeout?: string;
+ taskList?: TaskList;
+ taskStartToCloseTimeout?: string;
+ childPolicy?: string;
+ tagList?: string[];
+ workflowTypeVersion?: string;
+ }
+
+ export interface RecordMarkerDecisionAttributes {
+ markerName?: string;
+ details?: string;
+ }
+
+ export interface StartTimerDecisionAttributes {
+ timerId?: string;
+ control?: string;
+ startToFireTimeout?: string;
+ }
+
+ export interface CancelTimerDecisionAttributes {
+ timerId?: string;
+ }
+
+ export interface SignalExternalWorkflowExecutionDecisionAttributes {
+ workflowId?: string;
+ runId?: string;
+ signalName?: string;
+ input?: string;
+ control?: string;
+ }
+
+ export interface RequestCancelExternalWorkflowExecutionDecisionAttributes {
+ workflowId?: string;
+ runId?: string;
+ control?: string;
+ }
+
+ export interface StartChildWorkflowExecutionDecisionAttributes {
+ workflowType?: WorkflowType;
+ workflowId?: string;
+ control?: string;
+ input?: string;
+ executionStartToCloseTimeout?: string;
+ taskList?: TaskList;
+ taskStartToCloseTimeout?: string;
+ childPolicy?: string;
+ tagList?: string[];
+ }
+
+ export interface RespondActivityTaskCompletedRequest {
+ taskToken?: string;
+ result?: string;
+ }
+
+ export interface RespondActivityTaskFailedRequest {
+ taskToken?: string;
+ reason?: string;
+ details?: string;
+ }
+
+ export interface RespondActivityTaskCanceledRequest {
+ taskToken?: string;
+ details?: string;
+ }
+
+ export interface DecisionTask {
+ taskToken?: string;
+ startedEventId?: number;
+ workflowExecution?: WorkflowExecution;
+ workflowType?: WorkflowType;
+ events?: HistoryEvent[];
+ nextPageToken?: string;
+ previousStartedEventId?: number;
+ }
+
+ export interface WorkflowExecution {
+ workflowId?: string;
+ runId?: string;
+ }
+
+ export interface HistoryEvent {
+ eventTimestamp?: any;
+ eventType?: string;
+ eventId?: number;
+ workflowExecutionStartedEventAttributes?: WorkflowExecutionStartedEventAttributes;
+ workflowExecutionCompletedEventAttributes?: WorkflowExecutionCompletedEventAttributes;
+ completeWorkflowExecutionFailedEventAttributes?: CompleteWorkflowExecutionFailedEventAttributes;
+ workflowExecutionFailedEventAttributes?: WorkflowExecutionFailedEventAttributes;
+ failWorkflowExecutionFailedEventAttributes?: FailWorkflowExecutionFailedEventAttributes;
+ workflowExecutionTimedOutEventAttributes?: WorkflowExecutionTimedOutEventAttributes;
+ workflowExecutionCanceledEventAttributes?: WorkflowExecutionCanceledEventAttributes;
+ cancelWorkflowExecutionFailedEventAttributes?: CancelWorkflowExecutionFailedEventAttributes;
+ workflowExecutionContinuedAsNewEventAttributes?: WorkflowExecutionContinuedAsNewEventAttributes;
+ continueAsNewWorkflowExecutionFailedEventAttributes?: ContinueAsNewWorkflowExecutionFailedEventAttributes;
+ workflowExecutionTerminatedEventAttributes?: WorkflowExecutionTerminatedEventAttributes;
+ workflowExecutionCancelRequestedEventAttributes?: WorkflowExecutionCancelRequestedEventAttributes;
+ decisionTaskScheduledEventAttributes?: DecisionTaskScheduledEventAttributes;
+ decisionTaskStartedEventAttributes?: DecisionTaskStartedEventAttributes;
+ decisionTaskCompletedEventAttributes?: DecisionTaskCompletedEventAttributes;
+ decisionTaskTimedOutEventAttributes?: DecisionTaskTimedOutEventAttributes;
+ activityTaskScheduledEventAttributes?: ActivityTaskScheduledEventAttributes;
+ activityTaskStartedEventAttributes?: ActivityTaskStartedEventAttributes;
+ activityTaskCompletedEventAttributes?: ActivityTaskCompletedEventAttributes;
+ activityTaskFailedEventAttributes?: ActivityTaskFailedEventAttributes;
+ activityTaskTimedOutEventAttributes?: ActivityTaskTimedOutEventAttributes;
+ activityTaskCanceledEventAttributes?: ActivityTaskCanceledEventAttributes;
+ activityTaskCancelRequestedEventAttributes?: ActivityTaskCancelRequestedEventAttributes;
+ workflowExecutionSignaledEventAttributes?: WorkflowExecutionSignaledEventAttributes;
+ markerRecordedEventAttributes?: MarkerRecordedEventAttributes;
+ timerStartedEventAttributes?: TimerStartedEventAttributes;
+ timerFiredEventAttributes?: TimerFiredEventAttributes;
+ timerCanceledEventAttributes?: TimerCanceledEventAttributes;
+ startChildWorkflowExecutionInitiatedEventAttributes?: StartChildWorkflowExecutionInitiatedEventAttributes;
+ childWorkflowExecutionStartedEventAttributes?: ChildWorkflowExecutionStartedEventAttributes;
+ childWorkflowExecutionCompletedEventAttributes?: ChildWorkflowExecutionCompletedEventAttributes;
+ childWorkflowExecutionFailedEventAttributes?: ChildWorkflowExecutionFailedEventAttributes;
+ childWorkflowExecutionTimedOutEventAttributes?: ChildWorkflowExecutionTimedOutEventAttributes;
+ childWorkflowExecutionCanceledEventAttributes?: ChildWorkflowExecutionCanceledEventAttributes;
+ childWorkflowExecutionTerminatedEventAttributes?: ChildWorkflowExecutionTerminatedEventAttributes;
+ signalExternalWorkflowExecutionInitiatedEventAttributes?: SignalExternalWorkflowExecutionInitiatedEventAttributes;
+ externalWorkflowExecutionSignaledEventAttributes?: ExternalWorkflowExecutionSignaledEventAttributes;
+ signalExternalWorkflowExecutionFailedEventAttributes?: SignalExternalWorkflowExecutionFailedEventAttributes;
+ externalWorkflowExecutionCancelRequestedEventAttributes?: ExternalWorkflowExecutionCancelRequestedEventAttributes;
+ requestCancelExternalWorkflowExecutionInitiatedEventAttributes?: RequestCancelExternalWorkflowExecutionInitiatedEventAttributes;
+ requestCancelExternalWorkflowExecutionFailedEventAttributes?: RequestCancelExternalWorkflowExecutionFailedEventAttributes;
+ scheduleActivityTaskFailedEventAttributes?: ScheduleActivityTaskFailedEventAttributes;
+ requestCancelActivityTaskFailedEventAttributes?: RequestCancelActivityTaskFailedEventAttributes;
+ startTimerFailedEventAttributes?: StartTimerFailedEventAttributes;
+ cancelTimerFailedEventAttributes?: CancelTimerFailedEventAttributes;
+ startChildWorkflowExecutionFailedEventAttributes?: StartChildWorkflowExecutionFailedEventAttributes;
+ }
+
+ export interface WorkflowExecutionStartedEventAttributes {
+ input?: string;
+ executionStartToCloseTimeout?: string;
+ taskStartToCloseTimeout?: string;
+ childPolicy?: string;
+ taskList?: TaskList;
+ workflowType?: WorkflowType;
+ tagList?: string[];
+ continuedExecutionRunId?: string;
+ parentWorkflowExecution?: WorkflowExecution;
+ parentInitiatedEventId?: number;
+ }
+
+ export interface WorkflowExecutionCompletedEventAttributes {
+ result?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface CompleteWorkflowExecutionFailedEventAttributes {
+ cause?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface WorkflowExecutionFailedEventAttributes {
+ reason?: string;
+ details?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface FailWorkflowExecutionFailedEventAttributes {
+ cause?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface WorkflowExecutionTimedOutEventAttributes {
+ timeoutType?: string;
+ childPolicy?: string;
+ }
+
+ export interface WorkflowExecutionCanceledEventAttributes {
+ details?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface CancelWorkflowExecutionFailedEventAttributes {
+ cause?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface WorkflowExecutionContinuedAsNewEventAttributes {
+ input?: string;
+ decisionTaskCompletedEventId?: number;
+ newExecutionRunId?: string;
+ executionStartToCloseTimeout?: string;
+ taskList?: TaskList;
+ taskStartToCloseTimeout?: string;
+ childPolicy?: string;
+ tagList?: string[];
+ workflowType?: WorkflowType;
+ }
+
+ export interface ContinueAsNewWorkflowExecutionFailedEventAttributes {
+ cause?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface WorkflowExecutionTerminatedEventAttributes {
+ reason?: string;
+ details?: string;
+ childPolicy?: string;
+ cause?: string;
+ }
+
+ export interface WorkflowExecutionCancelRequestedEventAttributes {
+ externalWorkflowExecution?: WorkflowExecution;
+ externalInitiatedEventId?: number;
+ cause?: string;
+ }
+
+ export interface DecisionTaskScheduledEventAttributes {
+ taskList?: TaskList;
+ startToCloseTimeout?: string;
+ }
+
+ export interface DecisionTaskStartedEventAttributes {
+ identity?: string;
+ scheduledEventId?: number;
+ }
+
+ export interface DecisionTaskCompletedEventAttributes {
+ executionContext?: string;
+ scheduledEventId?: number;
+ startedEventId?: number;
+ }
+
+ export interface DecisionTaskTimedOutEventAttributes {
+ timeoutType?: string;
+ scheduledEventId?: number;
+ startedEventId?: number;
+ }
+
+ export interface ActivityTaskScheduledEventAttributes {
+ activityType?: ActivityType;
+ activityId?: string;
+ input?: string;
+ control?: string;
+ scheduleToStartTimeout?: string;
+ scheduleToCloseTimeout?: string;
+ startToCloseTimeout?: string;
+ taskList?: TaskList;
+ decisionTaskCompletedEventId?: number;
+ heartbeatTimeout?: string;
+ }
+
+ export interface ActivityTaskStartedEventAttributes {
+ identity?: string;
+ scheduledEventId?: number;
+ }
+
+ export interface ActivityTaskCompletedEventAttributes {
+ result?: string;
+ scheduledEventId?: number;
+ startedEventId?: number;
+ }
+
+ export interface ActivityTaskFailedEventAttributes {
+ reason?: string;
+ details?: string;
+ scheduledEventId?: number;
+ startedEventId?: number;
+ }
+
+ export interface ActivityTaskTimedOutEventAttributes {
+ timeoutType?: string;
+ scheduledEventId?: number;
+ startedEventId?: number;
+ details?: string;
+ }
+
+ export interface ActivityTaskCanceledEventAttributes {
+ details?: string;
+ scheduledEventId?: number;
+ startedEventId?: number;
+ latestCancelRequestedEventId?: number;
+ }
+
+ export interface ActivityTaskCancelRequestedEventAttributes {
+ decisionTaskCompletedEventId?: number;
+ activityId?: string;
+ }
+
+ export interface WorkflowExecutionSignaledEventAttributes {
+ signalName?: string;
+ input?: string;
+ externalWorkflowExecution?: WorkflowExecution;
+ externalInitiatedEventId?: number;
+ }
+
+ export interface MarkerRecordedEventAttributes {
+ markerName?: string;
+ details?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface TimerStartedEventAttributes {
+ timerId?: string;
+ control?: string;
+ startToFireTimeout?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface TimerFiredEventAttributes {
+ timerId?: string;
+ startedEventId?: number;
+ }
+
+ export interface TimerCanceledEventAttributes {
+ timerId?: string;
+ startedEventId?: number;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface StartChildWorkflowExecutionInitiatedEventAttributes {
+ workflowId?: string;
+ workflowType?: WorkflowType;
+ control?: string;
+ input?: string;
+ executionStartToCloseTimeout?: string;
+ taskList?: TaskList;
+ decisionTaskCompletedEventId?: number;
+ childPolicy?: string;
+ taskStartToCloseTimeout?: string;
+ tagList?: string[];
+ }
+
+ export interface ChildWorkflowExecutionStartedEventAttributes {
+ workflowExecution?: WorkflowExecution;
+ workflowType?: WorkflowType;
+ initiatedEventId?: number;
+ }
+
+ export interface ChildWorkflowExecutionCompletedEventAttributes {
+ workflowExecution?: WorkflowExecution;
+ workflowType?: WorkflowType;
+ result?: string;
+ initiatedEventId?: number;
+ startedEventId?: number;
+ }
+
+ export interface ChildWorkflowExecutionFailedEventAttributes {
+ workflowExecution?: WorkflowExecution;
+ workflowType?: WorkflowType;
+ reason?: string;
+ details?: string;
+ initiatedEventId?: number;
+ startedEventId?: number;
+ }
+
+ export interface ChildWorkflowExecutionTimedOutEventAttributes {
+ workflowExecution?: WorkflowExecution;
+ workflowType?: WorkflowType;
+ timeoutType?: string;
+ initiatedEventId?: number;
+ startedEventId?: number;
+ }
+
+ export interface ChildWorkflowExecutionCanceledEventAttributes {
+ workflowExecution?: WorkflowExecution;
+ workflowType?: WorkflowType;
+ details?: string;
+ initiatedEventId?: number;
+ startedEventId?: number;
+ }
+
+ export interface ChildWorkflowExecutionTerminatedEventAttributes {
+ workflowExecution?: WorkflowExecution;
+ workflowType?: WorkflowType;
+ initiatedEventId?: number;
+ startedEventId?: number;
+ }
+
+ export interface SignalExternalWorkflowExecutionInitiatedEventAttributes {
+ workflowId?: string;
+ runId?: string;
+ signalName?: string;
+ input?: string;
+ decisionTaskCompletedEventId?: number;
+ control?: string;
+ }
+
+ export interface ExternalWorkflowExecutionSignaledEventAttributes {
+ workflowExecution?: WorkflowExecution;
+ initiatedEventId?: number;
+ }
+
+ export interface SignalExternalWorkflowExecutionFailedEventAttributes {
+ workflowId?: string;
+ runId?: string;
+ cause?: string;
+ initiatedEventId?: number;
+ decisionTaskCompletedEventId?: number;
+ control?: string;
+ }
+
+ export interface ExternalWorkflowExecutionCancelRequestedEventAttributes {
+ workflowExecution?: WorkflowExecution;
+ initiatedEventId?: number;
+ }
+
+ export interface RequestCancelExternalWorkflowExecutionInitiatedEventAttributes {
+ workflowId?: string;
+ runId?: string;
+ decisionTaskCompletedEventId?: number;
+ control?: string;
+ }
+
+ export interface RequestCancelExternalWorkflowExecutionFailedEventAttributes {
+ workflowId?: string;
+ runId?: string;
+ cause?: string;
+ initiatedEventId?: number;
+ decisionTaskCompletedEventId?: number;
+ control?: string;
+ }
+
+ export interface ScheduleActivityTaskFailedEventAttributes {
+ activityType?: ActivityType;
+ activityId?: string;
+ cause?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface RequestCancelActivityTaskFailedEventAttributes {
+ activityId?: string;
+ cause?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface StartTimerFailedEventAttributes {
+ timerId?: string;
+ cause?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface CancelTimerFailedEventAttributes {
+ timerId?: string;
+ cause?: string;
+ decisionTaskCompletedEventId?: number;
+ }
+
+ export interface StartChildWorkflowExecutionFailedEventAttributes {
+ workflowType?: WorkflowType;
+ cause?: string;
+ workflowId?: string;
+ initiatedEventId?: number;
+ decisionTaskCompletedEventId?: number;
+ control?: string;
+ }
+
+ export interface ActivityTask {
+ taskToken?: string;
+ activityId?: string;
+ startedEventId?: number;
+ workflowExecution?: WorkflowExecution;
+ activityType?: ActivityType;
+ input?: string;
+ }
+
+ export interface PollForActivityTaskResult {
+ activityTask?: ActivityTask;
+ }
+
+ export interface PollForDecisionTaskResult {
+ decisionTask?: DecisionTask;
+ }
+
+ export interface StartWorkflowExecutionResult {
+ run?: Run;
+ }
+
+ export interface Run {
+ runId?: string;
+ }
+
+ }
+
+ export module Sns {
+
+ export interface Client {
+ config: ClientConfig;
+
+ publish(params: PublishRequest, callback: (err: any, data: PublishResult) => void): void;
+ createTopic(params: CreateTopicRequest, callback: (err: any, data: CreateTopicResult) => void): void;
+ deleteTopic(params: DeleteTopicRequest, callback: (err: any, data: any) => void): void;
+ }
+
+ export interface PublishRequest {
+ TopicArn?: string;
+ TargetArn?: string;
+ MessageAttributes?: { [name: string]: MessageAttribute; };
+ Message?: string;
+ MessageStructure?: string;
+ Subject?: string;
+ }
+
+ export interface MessageAttribute {
+ DataType: string;
+ StringValue?: string;
+ BinaryValue: any; // (Buffer, Typed Array, Blob, String)
+ }
+
+ export interface PublishResult {
+ MessageId?: string;
+ }
+
+ export interface CreateTopicRequest {
+ Name?: string;
+ }
+
+ export interface CreateTopicResult {
+ TopicArn?: string;
+ }
+
+ export interface DeleteTopicRequest {
+ TopicArn?: string;
+ }
+
+ }
+
+ export module s3 {
+ interface Owner {
+ DisplayName: string;
+ ID: string;
+ }
+
+ interface ObjectKeyPrefix {
+ Prefix: string;
+ }
+
+ export interface ListObjectContent {
+ Key: string;
+ LastModified: Date;
+ ETag: string;
+ Size: number;
+ StorageClass: "STANDARD" | "REDUCED_REDUNDANCY" | "GLACIER";
+ Owner?: Owner
+ }
+
+ // This private interface contains the common parts between v1 and v2 of the API Request and is exposed via V1 and V2 subclasses
+ interface ListObjectRequestBase {
+ Bucket: string;
+ Delimiter?: string;
+ EncodingType?: 'url';
+ MaxKeys?: number;
+ Prefix?: string;
+ }
+
+ // This private interface contains the common parts between v1 and v2 of the API Response and is exposed via V1 and V2 subclasses
+ interface ListObjectResponseBase {
+ IsTruncated: boolean;
+ Contents: ListObjectContent[];
+ Name: string;
+ Prefix?: string;
+ Delimiter?: string;
+ MaxKeys: number;
+ CommonPrefixes?: ObjectKeyPrefix[];
+ EncodingType?: "url";
+ }
+
+ export interface PutObjectRequest {
+ ACL?: string;
+ Body?: any;
+ Bucket: string;
+ CacheControl?: string;
+ ContentDisposition?: string;
+ ContentEncoding?: string;
+ ContentLanguage?: string;
+ ContentLength?: string;
+ ContentMD5?: string;
+ ContentType?: string;
+ Expires?: any;
+ GrantFullControl?: string;
+ GrantRead?: string;
+ GrantReadACP?: string;
+ GrantWriteACP?: string;
+ Key: string;
+ Metadata?: { [key: string]: string; };
+ ServerSideEncryption?: string;
+ StorageClass?: string;
+ WebsiteRedirectLocation?: string;
+ }
+
+ export interface GetObjectRequest {
+ Bucket: string;
+ IfMatch?: string;
+ IfModifiedSince?: any;
+ IfNoneMatch?: string;
+ IfUnmodifiedSince?: any;
+ Key: string;
+ Range?: string;
+ ResponseCacheControl?: string;
+ ResponseContentDisposition?: string;
+ ResponseContentEncoding?: string;
+ ResponseContentLanguage?: string;
+ ResponseContentType?: string;
+ ResponseExpires?: any;
+ VersionId?: string;
+ }
+
+ export interface DeleteObjectRequest {
+ Bucket: string;
+ Key: string;
+ MFA?: string;
+ RequestPayer?: string;
+ VersionId?: string;
+ }
+
+ export interface HeadObjectRequest {
+ Bucket: string;
+ Key: string;
+ IfMatch?: string;
+ IfModifiedSince?: Date;
+ IfNoneMatch?: string;
+ IfUnmodifiedSince?: Date;
+ Range?: string;
+ RequestPayer?: string;
+ SSECustomerAlgorithm?: string;
+ SSECustomerKey?: Buffer | string;
+ SSECustomerKeyMD5?: string;
+ VersionId?: string;
+ }
+
+ export interface UploadOptions {
+ partSize?: number;
+ queueSize?: number;
+ }
+
+ export interface ListObjectRequest extends ListObjectRequestBase {
+ Marker?: string;
+ }
+
+ export interface ListObjectV2Request extends ListObjectRequestBase {
+ ContinuationToken?: string;
+ FetchOwner?: boolean;
+ StartAfter?: string;
+ }
+
+ export interface ListObjectResponse extends ListObjectResponseBase {
+ Marker?: string;
+ NextMarker?: string;
+ }
+
+ export interface ListObjectV2Response extends ListObjectResponseBase {
+ KeyCount: number;
+ ContinuationToken?: string;
+ NextContinuationToken?: string;
+ StartAfter?: string;
+ }
+ }
+
+ export module ecs {
+ export interface CreateServicesParams {
+ desiredCount: number;
+ serviceName: string;
+ taskDefinition: string;
+ clientToken?: string;
+ cluster?: string;
+ deploymentConfiguration?: {
+ maximumPercent?: number;
+ minimumHealthyPercent?: number;
+ };
+ loadBalancers?: {
+ containerName?: string;
+ containerPort?: number;
+ loadBalancerName?: string;
+ }[];
+ role?: string;
+ }
+
+ export interface DescribeServicesParams {
/**
* A list of services to describe.
*/
- services: string[];
+ services: string[];
/**
* The name of the cluster that hosts the service to describe. If you do not specify a cluster, the default cluster is assumed.
*/
- cluster?: string;
- }
+ cluster?: string;
+ }
- export interface DescribeClustersParams {
+ export interface DescribeClustersParams {
/**
* A space-separated list of cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.
*/
- clusters?: string[];
- }
+ clusters?: string[];
+ }
- export interface DescribeTasksParams {
+ export interface DescribeTasksParams {
/**
* A space-separated list of task IDs or full Amazon Resource Name (ARN) entries.
*/
- tasks: string[];
+ tasks: string[];
/**
* The short name or full Amazon Resource Name (ARN) of the cluster that hosts the task to describe. If you do not specify a cluster, the default cluster is assumed.
*/
- cluster?: string;
- }
+ cluster?: string;
+ }
- export interface DescribeTaskDefinitionParams {
+ export interface DescribeTaskDefinitionParams {
/**
* The `family` for the latest `ACTIVE` revision, `family` and `revision` (`family:revision`) for a specific revision in the family, or full Amazon Resource Name (ARN) of the task definition to describe.
*/
- taskDefinition: string;
- }
+ taskDefinition: string;
+ }
- export interface RegisterTaskDefinitionParams {
- containerDefinitions: {
- command?: string[],
- cpu?: number,
- disableNetworking?: boolean,
- dnsSearchDomains?: string[],
- dnsServers?: string[],
- dockerLabels?: any,
- dockerSecurityOptions?: string[],
- entryPoint?: string[],
- environment?: any[],
- essential?: boolean,
- extraHosts?: {
- hostName: string,
- ipAddress: string
- }[];
- hostname?: string,
- image?: string,
- links?: string[],
- logConfiguration?: {
- logDriver: string,
- options: any
- }[],
- memory?: number,
- mountPoints?: {
- containerPath: string,
- readOnly: boolean,
- sourceVolume: string
- }[];
- name?: string,
- portMappings?: {
- containerPort?: number,
- hostPort?: number,
- protocol: string
- }[];
- privileged?: boolean,
- readonlyRootFilesystem?: boolean,
- ulimits?: {
- hardLimit: number,
- name: string,
- softLimit: number
- }[];
- user?: string,
- volumesFrom?: {
- readOnly?: boolean,
- sourceContainer?: string
- }[],
- workingDirectory?: string
- }[];
- family: string;
- volumes?: {
- host: {
- sourcePath: string
- },
- name: string
- }[];
- }
+ export interface RegisterTaskDefinitionParams {
+ containerDefinitions: {
+ command?: string[],
+ cpu?: number,
+ disableNetworking?: boolean,
+ dnsSearchDomains?: string[],
+ dnsServers?: string[],
+ dockerLabels?: any,
+ dockerSecurityOptions?: string[],
+ entryPoint?: string[],
+ environment?: any[],
+ essential?: boolean,
+ extraHosts?: {
+ hostName: string,
+ ipAddress: string
+ }[];
+ hostname?: string,
+ image?: string,
+ links?: string[],
+ logConfiguration?: {
+ logDriver: string,
+ options: any
+ }[],
+ memory?: number,
+ mountPoints?: {
+ containerPath: string,
+ readOnly: boolean,
+ sourceVolume: string
+ }[];
+ name?: string,
+ portMappings?: {
+ containerPort?: number,
+ hostPort?: number,
+ protocol: string
+ }[];
+ privileged?: boolean,
+ readonlyRootFilesystem?: boolean,
+ ulimits?: {
+ hardLimit: number,
+ name: string,
+ softLimit: number
+ }[];
+ user?: string,
+ volumesFrom?: {
+ readOnly?: boolean,
+ sourceContainer?: string
+ }[],
+ workingDirectory?: string
+ }[];
+ family: string;
+ volumes?: {
+ host: {
+ sourcePath: string
+ },
+ name: string
+ }[];
+ }
- export interface UpdateServiceParams {
- service: string;
- cluster?: string;
- deploymentConfiguration?: {
- maximumPercent: number;
- minimumHealthyPercent: number;
- };
- desiredCount?: number;
- taskDefinition: string;
- }
- }
+ export interface UpdateServiceParams {
+ service: string;
+ cluster?: string;
+ deploymentConfiguration?: {
+ maximumPercent: number;
+ minimumHealthyPercent: number;
+ };
+ desiredCount?: number;
+ taskDefinition: string;
+ }
+ }
- export module sts {
- export interface AssumeRoleParams {
- RoleArn: string;
- RoleSessionName: string;
- DurationSeconds?: number;
- ExternalId?: string;
- Policy?: string;
- SerialNumber?: string;
- TokenCode?: string;
- }
+ export module sts {
+ export interface AssumeRoleParams {
+ RoleArn: string;
+ RoleSessionName: string;
+ DurationSeconds?: number;
+ ExternalId?: string;
+ Policy?: string;
+ SerialNumber?: string;
+ TokenCode?: string;
+ }
- export interface AssumeRoleCallbackData{
- Credentials: TemporaryCredentials;
- AssumedRoleUser: AssumedRoleUser;
- PackedPolicySize: number;
- }
+ export interface AssumeRoleCallbackData {
+ Credentials: TemporaryCredentials;
+ AssumedRoleUser: AssumedRoleUser;
+ PackedPolicySize: number;
+ }
- export interface TemporaryCredentials{
- AccessKeyId: string;
- SecretAccessKey: string;
- SessionToken: string;
- Expiration: Date;
- }
+ export interface TemporaryCredentials {
+ AccessKeyId: string;
+ SecretAccessKey: string;
+ SessionToken: string;
+ Expiration: Date;
+ }
- export interface AssumedRoleUser{
- AssumedRoleId: string;
- Arn: string;
- }
+ export interface AssumedRoleUser {
+ AssumedRoleId: string;
+ Arn: string;
+ }
- export interface AssumeRoleWithSAMLParams {
- PrincipalArn: string;
- RoleArn: string;
- SAMLAssertion: string;
- DurationSeconds?: number;
- Policy?: string;
- }
+ export interface AssumeRoleWithSAMLParams {
+ PrincipalArn: string;
+ RoleArn: string;
+ SAMLAssertion: string;
+ DurationSeconds?: number;
+ Policy?: string;
+ }
- export interface AssumeRoleWithWebIdentityParams {
- RoleArn: string;
- RoleSessionName: string;
- WebIdentityToken: string;
- DurationSeconds?: number;
- Policy?: string;
- ProviderId?: string;
- }
+ export interface AssumeRoleWithWebIdentityParams {
+ RoleArn: string;
+ RoleSessionName: string;
+ WebIdentityToken: string;
+ DurationSeconds?: number;
+ Policy?: string;
+ ProviderId?: string;
+ }
- export interface CredentialsFromParams {
+ export interface CredentialsFromParams {
/**
* Data retrieved from a call to AWS.STS.getFederatedToken, getSessionToken(), assumeRole(), or assumeRoleWithWebIdentity().
*/
- Data: any;
+ Data: any;
/**
* An optional credentials object to fill instead of creating a new object. Useful when modifying an existing credentials object from a refresh call.
*/
- Credentials?: Credentials
- }
+ Credentials?: Credentials
+ }
- export interface DecodeAuthorizationMessageParams {
- EncodedMessage: string;
- }
+ export interface DecodeAuthorizationMessageParams {
+ EncodedMessage: string;
+ }
- export interface GetFederationTokenParams {
- Name: string;
- DurationSeconds?: number,
- Policy?: string
- }
+ export interface GetFederationTokenParams {
+ Name: string;
+ DurationSeconds?: number,
+ Policy?: string
+ }
- export interface GetSessionTokenParams {
- DurationSeconds: number,
- SerialNumber: string;
- TokenCode: string;
- }
- }
+ export interface GetSessionTokenParams {
+ DurationSeconds: number,
+ SerialNumber: string;
+ TokenCode: string;
+ }
+ }
}
diff --git a/axe-core/axe-core-tests.ts b/axe-core/axe-core-tests.ts
new file mode 100644
index 0000000000..7decb865c2
--- /dev/null
+++ b/axe-core/axe-core-tests.ts
@@ -0,0 +1,91 @@
+///
+
+var context:any = document
+var $fixture:any = {}
+
+// axe.a11yCheck config
+axe.a11yCheck(context, {}, (results) => {
+ // axe's results object
+ console.log(results.passes.length)
+ console.log(results.violations.length)
+});
+// axe.a11yCheck include/exclude
+axe.a11yCheck({include: [['#id1'], ['#id2']]}, {}, (results) => {
+ console.log(results)
+})
+axe.a11yCheck({exclude: [$fixture[0]]}, {}, (results) => {
+ console.log(results)
+})
+var tagConfigRunOnly: axe.RunOnly = {
+ type: 'tag',
+ values: ['wcag2a']
+}
+var tagConfig = {
+ runOnly: tagConfigRunOnly
+}
+axe.a11yCheck(context, tagConfig, (results) => {
+ console.log(results)
+})
+var includeExcludeTagsRunOnly: axe.RunOnly = {
+ type: 'tags',
+ value: {
+ include: ['wcag2a', 'wcag2aa'],
+ exclude: ['experimental']
+ }
+}
+var includeExcludeTagsConfig = {
+ runOnly: includeExcludeTagsRunOnly
+}
+axe.a11yCheck(context, includeExcludeTagsConfig, (results) => {
+ console.log(results)
+})
+var someRulesConfig = {
+ rules: {
+ "color-contrast": {enabled: 'false'},
+ "heading-order": {enabled: 'true'}
+ }
+}
+axe.a11yCheck(context, someRulesConfig, (results) => {
+ console.log(results)
+})
+
+// axe.configure
+var spec: axe.Spec = {
+ branding: {
+ brand: 'foo',
+ application: 'bar'
+ },
+ reporter: 'v1',
+ checks: [{
+ id: 'custom-check',
+ evaluate: function() {
+ return true
+ }
+ }],
+ rules: [{
+ id: 'custom-rule',
+ any: ['custom-check']
+ }]
+}
+axe.configure(spec)
+
+axe.reset()
+
+axe.getRules(['wcag2aa'])
+typeof axe.getRules() === 'object'
+
+// Plugins
+var pluginSrc: axe.AxePlugin = {
+ id: 'doStuff',
+ run: (data:any, callback:Function) => {
+ callback()
+ },
+ commands: [{
+ id: 'run-doStuff',
+ callback: (data:any, callback:Function) => {
+ axe.plugins['doStuff'].run(data, callback)
+ }
+ }]
+}
+axe.registerPlugin(pluginSrc)
+axe.cleanup()
diff --git a/axe-core/axe-core.d.ts b/axe-core/axe-core.d.ts
new file mode 100644
index 0000000000..98818e75cc
--- /dev/null
+++ b/axe-core/axe-core.d.ts
@@ -0,0 +1,159 @@
+// Type definitions for axe-core 2.0.5
+// Project: https://github.com/dequelabs/axe-core
+// Definitions by: Marcy Sutton
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare namespace axe {
+
+ export type ImpactValue = "minor" | "moderate" | "serious" | "critical";
+
+ export type TagValue = "wcag2a" | "wcag2aa" | "section508" | "best-practice";
+
+ export type ReporterVersion = "v1" | "v2";
+
+ export type RunOnlyType = "rule" | "rules" | "tag" | "tags";
+
+ export interface ElementContext {
+ node?: Object,
+ selector?: string,
+ include?: any[],
+ exclude?: any[]
+ }
+ export interface RunOnly {
+ type: RunOnlyType,
+ value?: {
+ include?: string[],
+ exclude?: string[]
+ }
+ values?: TagValue[]
+ }
+ export interface AxeResults {
+ url: string,
+ timestamp: string,
+ passes: Pass[],
+ violations: Violation[]
+ }
+ export interface Pass {
+ description: string,
+ help: string,
+ helpUrl: string,
+ id: string,
+ impact: ImpactValue,
+ tags: TagValue[],
+ nodes: NodeResult[]
+ }
+ export interface Violation {
+ description: string,
+ help: string,
+ helpUrl: string,
+ id: string,
+ impact: ImpactValue,
+ tags: TagValue[],
+ nodes: NodeResult[]
+ }
+ export interface NodeResult {
+ html: string,
+ impact: ImpactValue,
+ target: string[],
+ any: CheckResult[],
+ all: CheckResult[],
+ none: CheckResult[]
+ }
+ export interface CheckResult {
+ id: string,
+ impact: string,
+ message: string,
+ data: any,
+ relatedNodes?: RelatedNode[]
+ }
+ export interface RelatedNode {
+ target: string[],
+ html: string
+ }
+ export interface Spec {
+ branding?: {
+ brand: string,
+ application: string
+ },
+ reporter?: ReporterVersion,
+ checks?: Check[],
+ rules?: Rule[]
+ }
+ export interface Check {
+ id: string,
+ evaluate: Function,
+ after?: Function,
+ options?: any,
+ matches?: string,
+ enabled?: boolean
+ }
+ export interface Rule {
+ id: string,
+ selector?: string,
+ excludeHidden?: boolean,
+ enabled?: boolean,
+ pageLevel?: boolean,
+ any?: string[],
+ all?: string[],
+ none?: string[],
+ tags?: string[],
+ matches?: string
+ }
+ export interface AxePlugin {
+ id: string,
+ run(...args:any[]): any,
+ commands: {
+ id: string,
+ callback(...args:any[]): void
+ }[],
+ cleanup?(callback:Function): void
+ }
+
+ export let plugins: any
+
+ /**
+ * Starts analysis on the current document and its subframes
+ *
+ * @param {Object} context The `Context` specification object @see Context
+ * @param {Array} options Options passed into rules or checks, temporarily modifyint them.
+ * @param {Function} callback The function to invoke when analysis is complete.
+ * @returns {Object} results The aXe results object
+ */
+ export function a11yCheck(context: ElementContext, options: {runOnly?: RunOnly, rules?: Object}, callback: (results:AxeResults) => void): AxeResults
+
+ /**
+ * Method for configuring the data format used by aXe. Helpful for adding new
+ * rules, which must be registered with the library to execute.
+ * @param {Spec} Spec Object with valid `branding`, `reporter`, `checks` and `rules` data
+ */
+ export function configure(spec: Spec): void
+
+ /**
+ * Searches and returns rules that contain a tag in the list of tags.
+ * @param {Array} tags Optional array of tags
+ * @return {Array} Array of rules
+ */
+ export function getRules(tags?: string[]): Object[]
+
+ /**
+ * Restores the default axe configuration
+ */
+ export function reset(): void
+
+ /**
+ * Function to register a plugin configuration in document and its subframes
+ * @param {Object} plugin A plugin configuration object
+ */
+ export function registerPlugin(plugin: AxePlugin): void
+
+ /**
+ * Function to clean up plugin configuration in document and its subframes
+ */
+ export function cleanup(): void
+
+}
+
+// axe is also available as a module
+declare module "axe-core" {
+ export = axe;
+}
diff --git a/azure-mobile-apps/azure-mobile-apps-tests.ts b/azure-mobile-apps/azure-mobile-apps-tests.ts
index 093932c2fb..f8f3bcef52 100644
--- a/azure-mobile-apps/azure-mobile-apps-tests.ts
+++ b/azure-mobile-apps/azure-mobile-apps-tests.ts
@@ -8,7 +8,7 @@ import queries = require('azure-mobile-apps/src/query');
var app = express(),
mobileApp = mobileApps();
-// various configuration permutations
+// various configuration permutations
mobileApps({
debug: true,
data: {
@@ -17,7 +17,8 @@ mobileApps({
user: '',
database: '',
password: ''
- }
+ },
+ webhook: { url: 'http://localhost/' }
});
mobileApps({
@@ -29,7 +30,7 @@ mobileApps({
// it would be nice to integrate with winston
mobileApps({ logging: { level: 'silly', transports: [{}] } })
-// various custom middleware syntaxes
+// various custom middleware syntaxes
mobileApp.use(function (req: any, res: any, next: any) { next(); });
mobileApp.use([function () {}, function () {}]);
mobileApp.use(function () {}, function () {});
@@ -43,6 +44,9 @@ mobileApp.tables.import('tables');
mobileApp.api.add('api', { authorize: true, get: function () {}, delete: function () {} });
mobileApp.api.import('api');
+// ensure the mobile app instance can be correctly mounted as an express router
+app.use(mobileApp);
+
// Express.Table, instantiated from the mobile app
var table = mobileApp.table()
table.use(function (req: Express.Request, res: Express.Response, next: any) {
@@ -61,21 +65,45 @@ table.read(function (context: Azure.MobileApps.Context) {
table.insert(function (context: Azure.MobileApps.Context) {
context.query.id = 'anotherId';
context.query.single = true;
- context.item.userId = context.user.id;
+ context.item.userId = context.user.id;
context.push.send('tag', {}, function (error, result) {});
context.push.gcm.send('tag', {}, function (error, result) {});
context.push.apns.send('tag', { payload: { } }, function (error, result) {});
context.push.wns.sendToastText01('tag', '', { headers: { } }, function (error, result) {});
+ context.next(new Error());
+ context.next('An error occurred');
});
table.read.use(function () {});
table.read.use([function () {}, function () {}]);
table.read.use(function () {}, function () {});
-table.use(function () {}).use(function () {}).read(function () {}).use(function () {})
+table.use(function () {}).use(function () {}).read(function () {}).use(function () {});
+
+table.access = undefined;
+table.access = 'authenticated';
+table.read.access = 'anonymous';
+table.update.access = 'disabled';
+table.delete.access = 'authenticated';
+table.insert.access = 'authenticated';
+
+table.filters = [function (query, context) { }];
+table.transforms = [function (item, context) { }];
+table.hooks = [function (results, context) { }];
+
+table.perUser = true;
+table.recordsExpire = { milliseconds: 1, seconds: 1, minutes: 1, hours: 1, days: 1, weeks: 1, months: 1, years: 1 };
+table.webhook = { url: 'http://localhost/' }
+table.webhook = true;
// Express.Table, instantiated from the static require('azure-mobile-apps').table()
// This is going to be interesting if we ever support more than one provider
var table2 = mobileApps.table();
-table2.read(function (context: Azure.MobileApps.Context) {})
+table2.read(function (context: Azure.MobileApps.Context) {});
+
+// ApiDefinition, from the static require('azure-mobile-apps').api()
+var api2 = mobileApps.api({
+ get: function (req, res, next) { }
+});
+api2.post = function (req, res, next) {};
// Logger
logger.silly('test', 'message');
@@ -83,5 +111,15 @@ logger.error('Something happened', new Error());
mobileApps.logger.debug('a debug message')
// Query
-queries.create('table').where({ x: 10 }).select('col1,col2');
-mobileApps.query.create('table');
\ No newline at end of file
+queries.create('table').where({ x: 10 }).select('col1,col2').includeDeleted().includeTotalCount();
+mobileApps.query.create('table');
+
+// Custom SQL query
+mobileApp.api.add('query', { authorize: true, get: (req, res, next) => {
+ req.azureMobile.data.execute({
+ sql: "SELECT * FROM TODOITEM WHERE COMPLETE = :complete",
+ parameters: [
+ { name: 'complete', value: 1 }
+ ]
+ }).then(x => {});
+}, delete: function () {} });
diff --git a/azure-mobile-apps/azure-mobile-apps.d.ts b/azure-mobile-apps/azure-mobile-apps.d.ts
index 0a42fa9ecf..54aaa66f8b 100644
--- a/azure-mobile-apps/azure-mobile-apps.d.ts
+++ b/azure-mobile-apps/azure-mobile-apps.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for azure-mobile-apps v2.0.0-beta3
+// Type definitions for azure-mobile-apps v2.1.7
// Project: https://github.com/Azure/azure-mobile-apps-node/
// Definitions by: Microsoft Azure
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -10,6 +10,7 @@ declare module "azure-mobile-apps" {
interface AzureMobileApps {
(configuration?: Azure.MobileApps.Configuration): Azure.MobileApps.Platforms.Express.MobileApp;
table(): Azure.MobileApps.Platforms.Express.Table;
+ api(definition?: Azure.MobileApps.ApiDefinition): Azure.MobileApps.ApiDefinition;
logger: Azure.MobileApps.Logger;
query: Azure.MobileApps.Query;
}
@@ -31,7 +32,7 @@ declare namespace Azure.MobileApps {
// the additional Platforms namespace is required to avoid collisions with the main Express namespace
export module Platforms {
export module Express {
- interface MobileApp {
+ interface MobileApp extends Middleware {
configuration: Configuration;
tables: Tables;
table(): Table;
@@ -45,14 +46,7 @@ declare namespace Azure.MobileApps {
import(fileOrFolder: string): void;
}
- interface Table {
- authorize?: boolean;
- autoIncrement?: boolean;
- dynamicSchema?: boolean;
- name: string;
- columns?: any;
- schema: string;
-
+ interface Table extends TableDefinition {
use(...middleware: Middleware[]): Table;
use(middleware: Middleware[]): Table;
read: TableOperation;
@@ -66,6 +60,7 @@ declare namespace Azure.MobileApps {
(operationHandler: (context: Context) => void): Table;
use(...middleware: Middleware[]): Table;
use(middleware: Middleware[]): Table;
+ access?: AccessType;
}
interface Tables {
@@ -132,6 +127,7 @@ declare namespace Azure.MobileApps {
auth?: Configuration.Auth;
cors?: Configuration.Cors;
notifications?: Configuration.Notifications;
+ webhook?: Webhook;
}
export module Configuration {
@@ -148,6 +144,7 @@ declare namespace Azure.MobileApps {
options?: { encrypt: boolean };
schema?: string;
dynamicSchema?: boolean;
+ filename?: string;
}
interface Auth {
@@ -163,8 +160,9 @@ declare namespace Azure.MobileApps {
interface LoggingTransport { }
interface Cors {
+ exposeHeaders: string;
maxAge?: number;
- origins: string[];
+ hostnames: string[];
}
interface Notifications {
@@ -184,7 +182,8 @@ declare namespace Azure.MobileApps {
}
interface QueryJs {
- includeTotalCount?: boolean;
+ includeTotalCount(): QueryJs;
+ includeDeleted(): QueryJs;
orderBy(properties: string): QueryJs;
orderByDescending(properties: string): QueryJs;
select(properties: string): QueryJs;
@@ -209,27 +208,75 @@ declare namespace Azure.MobileApps {
// general
var nh: Azure.ServiceBus.NotificationHubService;
+
interface Context {
query: QueryJs;
id: string | number;
item: any;
req: Express.Request;
res: Express.Response;
- data: (table: TableDefinition) => Data.Table;
+ data: ContextData;
tables: (tableName: string) => Data.Table;
user: User;
push: typeof nh;
logger: Logger;
execute(): Thenable;
+ next(error: string|Error): any;
}
+ interface ContextData {
+ (table: TableDefinition): Data.Table;
+ execute(q: SqlQueryDefinition): Thenable;
+ }
+
+ interface SqlQueryDefinition {
+ sql: string;
+ parameters?: SqlParameterDefinition[];
+ }
+
+ interface SqlParameterDefinition {
+ name: string;
+ value: any;
+ }
+
interface TableDefinition {
+ access?: AccessType;
authorize?: boolean;
autoIncrement?: boolean;
- dynamicSchema?: boolean;
- name?: string;
columns?: any;
+ databaseTableName?: string;
+ dynamicSchema?: boolean;
+ maxTop?: number;
+ name?: string;
+ pageSize?: number;
schema?: string;
+ softDelete?: boolean;
+ userIdColumn?: string;
+
+ filters?: [(query: QueryJs, context: Context) => void | QueryJs];
+ transforms?: [(item: any, context: Context) => void | any];
+ hooks?: [(results: any, context: Context) => void];
+
+ perUser?: boolean;
+ recordsExpire?: Duration;
+ webhook?: Webhook | boolean;
+ }
+
+ type AccessType = 'anonymous' | 'authenticated' | 'disabled';
+
+ interface Duration {
+ milliseconds?: number;
+ seconds?: number;
+ minutes?: number;
+ hours?: number;
+ days?: number;
+ weeks?: number;
+ months?: number;
+ years?: number;
+ }
+
+ interface Webhook {
+ url: string;
}
interface ApiDefinition {
diff --git a/azure-mobile-services-client/AzureMobileServicesClient.d.ts b/azure-mobile-services-client/AzureMobileServicesClient.d.ts
index afd6014598..6fa0f9c475 100644
--- a/azure-mobile-services-client/AzureMobileServicesClient.d.ts
+++ b/azure-mobile-services-client/AzureMobileServicesClient.d.ts
@@ -17,7 +17,7 @@ declare namespace Microsoft.WindowsAzure {
login(provider: string, token: string): asyncPromise;
login(provider: string, callback: (error: any, user: User) => void ): void;
login(provider: string): asyncPromise;
- logout(): void;
+ logout(): asyncPromise;
getTable(tableName: string): MobileServiceTable;
withFilter(serviceFilter: (request: any, next: (request: any, callback: (error: any, response: any) => void) => void, callback: (error: any, response: any) => void) => void): MobileServiceClient;
/**
diff --git a/backbone/backbone-global.d.ts b/backbone/backbone-global.d.ts
index d86305ee3d..3dca269eb0 100644
--- a/backbone/backbone-global.d.ts
+++ b/backbone/backbone-global.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Backbone 1.0.0
+// Type definitions for Backbone 1.3.3
// Project: http://backbonejs.org/
// Definitions by: Boris Yankov , Natan Vivo
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -109,9 +109,15 @@ declare namespace Backbone {
attributes: any;
changed: any[];
+ cidPrefix: string;
cid: string;
collection: Collection;
+ private _changing: boolean;
+ private _previousAttributes : any;
+ private _pending: boolean;
+
+
/**
* Default attributes for the model. It can be an object hash or a method returning an object hash.
* For assigning an object hash, do it like this: this.defaults = { attribute: value, ... };
@@ -147,7 +153,14 @@ declare namespace Backbone {
/*private*/ set(attributeName: string, value: any, options?: ModelSetOptions): Model;
set(obj: any, options?: ModelSetOptions): Model;
- changedAttributes(attributes?: any): any[];
+ /**
+ * Return an object containing all the attributes that have changed, or
+ * false if there are no changed attributes. Useful for determining what
+ * parts of a view need to be updated and/or what attributes need to be
+ * persisted to the server. Unset attributes will be set to undefined.
+ * You can also pass an attributes object to diff against the model,
+ * determining if there *would be* a change. */
+ changedAttributes(attributes?: any): any;
clear(options?: Silenceable): any;
clone(): Model;
destroy(options?: ModelDestroyOptions): any;
@@ -178,6 +191,7 @@ declare namespace Backbone {
omit(fn: (value: any, key: any, object: any) => any): any;
chain(): any;
isEmpty(): boolean;
+ matches(attrs: any): boolean;
}
class Collection extends ModelBase {
@@ -208,6 +222,7 @@ declare namespace Backbone {
* Get a model from a collection, specified by an id, a cid, or by passing in a model.
**/
get(id: number|string|Model): TModel;
+ has(key: number|string|Model): boolean;
create(attributes: any, options?: ModelSaveOptions): TModel;
pluck(attribute: string): any[];
push(model: TModel, options?: AddOptions): TModel;
@@ -221,10 +236,12 @@ declare namespace Backbone {
unshift(model: TModel, options?: AddOptions): TModel;
where(properties: any): TModel[];
findWhere(properties: any): TModel;
+ modelId(attrs: any) : any
private _prepareModel(attributes?: any, options?: any): any;
private _removeReference(model: TModel): void;
private _onModelEvent(event: string, model: TModel, collection: Collection, options: any): void;
+ private _isModel(obj: any) : obj is Model;
/**
* Return a shallow copy of this collection's models, using the same options as native Array#slice.
@@ -314,6 +331,8 @@ declare namespace Backbone {
navigate(fragment: string, options?: NavigateOptions): Router;
navigate(fragment: string, trigger?: boolean): Router;
+ execute(callback: Function, args: any[], name: string) : void;
+
private _bindRoutes(): void;
private _routeToRegExp(route: string): RegExp;
private _extractParameters(route: RegExp, fragment: string): string[];
@@ -330,9 +349,14 @@ declare namespace Backbone {
getHash(window?: Window): string;
getFragment(fragment?: string): string;
+ decodeFragment(fragment: string): string;
+ getSearch(): string;
stop(): void;
route(route: string, callback: Function): number;
checkUrl(e?: any): void;
+ getPath(): string;
+ matchRoot(): boolean;
+ atRoot(): boolean;
loadUrl(fragmentOverride?: string): boolean;
navigate(fragment: string, options?: any): boolean;
static started: boolean;
diff --git a/backbone/backbone.d.ts b/backbone/backbone.d.ts
index 65e273a61f..d3887b4176 100644
--- a/backbone/backbone.d.ts
+++ b/backbone/backbone.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Backbone 1.0.0
+// Type definitions for Backbone 1.3.3
// Project: http://backbonejs.org/
// Definitions by: Boris Yankov