diff --git a/3d-bin-packing/3d-bin-packing-tests.ts b/3d-bin-packing/3d-bin-packing-tests.ts
index 4562c26ce9..319624d597 100644
--- a/3d-bin-packing/3d-bin-packing-tests.ts
+++ b/3d-bin-packing/3d-bin-packing-tests.ts
@@ -1,5 +1,3 @@
-///
-
import packer = require("3d-bin-packing");
import samchon = require("samchon-framework");
diff --git a/3d-bin-packing/3d-bin-packing.d.ts b/3d-bin-packing/3d-bin-packing.d.ts
index afd3af6050..2461538194 100644
--- a/3d-bin-packing/3d-bin-packing.d.ts
+++ b/3d-bin-packing/3d-bin-packing.d.ts
@@ -3,11 +3,11 @@
// Definitions by: Jeongho Nam
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-///
-///
-///
-///
-///
+///
+///
+///
+///
+///
declare module "3d-bin-packing"
{
diff --git a/3d-bin-packing/tsconfig.json b/3d-bin-packing/tsconfig.json
new file mode 100644
index 0000000000..ddad71a1fe
--- /dev/null
+++ b/3d-bin-packing/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "strictNullChecks": false,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "3d-bin-packing.d.ts",
+ "3d-bin-packing-tests.ts"
+ ]
+}
\ No newline at end of file
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 7ebdcc514f..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)
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-material/angular-material-tests.ts b/angular-material/angular-material-tests.ts
index 9e17c01594..bddecb446e 100644
--- a/angular-material/angular-material-tests.ts
+++ b/angular-material/angular-material-tests.ts
@@ -132,7 +132,10 @@ myApp.controller('SidenavController', ($scope: ng.IScope, $mdSidenav: ng.materia
});
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 = {
diff --git a/angular-material/index.d.ts b/angular-material/index.d.ts
index 9568ec7de5..1a4456b2e1 100644
--- a/angular-material/index.d.ts
+++ b/angular-material/index.d.ts
@@ -175,7 +175,8 @@ declare module 'angular' {
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;
}
diff --git a/angular-q-spread/angular-q-spread-tests.ts b/angular-q-spread/angular-q-spread-tests.ts
index 932ecc4fa9..31fad81acd 100644
--- a/angular-q-spread/angular-q-spread-tests.ts
+++ b/angular-q-spread/angular-q-spread-tests.ts
@@ -1,5 +1,3 @@
-///
-
interface IMyService {
getFirstname(): ng.IPromise;
getLastname(): ng.IPromise;
diff --git a/angular-q-spread/angular-q-spread.d.ts b/angular-q-spread/angular-q-spread.d.ts
index 3eb37dc4e0..57f6327071 100644
--- a/angular-q-spread/angular-q-spread.d.ts
+++ b/angular-q-spread/angular-q-spread.d.ts
@@ -3,9 +3,9 @@
// Definitions by: rafw87
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-///
+import * as a from "angular";
-declare module angular {
+declare module "angular" {
interface IPromise {
/**
This method can be used as a replacement for then. Similarly, it takes two parameters, a callback when all promises are resolved and a callback for failure. The resolve callback is going to be called with the result of the list of promises passed to $q.all as separate parameters instead of one parameters which is an array.
diff --git a/angular-q-spread/tsconfig.json b/angular-q-spread/tsconfig.json
new file mode 100644
index 0000000000..90110b0e9f
--- /dev/null
+++ b/angular-q-spread/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "files": [
+ "angular-q-spread.d.ts",
+ "angular-q-spread-tests.ts"
+ ],
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "strictNullChecks": false,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": false
+ }
+}
\ No newline at end of file
diff --git a/angular-resource/index.d.ts b/angular-resource/index.d.ts
index 9fd27142cd..e8726cc089 100644
--- a/angular-resource/index.d.ts
+++ b/angular-resource/index.d.ts
@@ -39,15 +39,20 @@ declare module 'angular' {
(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
@@ -181,6 +186,12 @@ declare module 'angular' {
/** creating a resource service factory */
factory(name: string, resourceServiceFactoryFunction: angular.resource.IResourceServiceFactoryFunction): IModule;
}
+
+ namespace auto {
+ interface IInjectorService {
+ get(name: '$resource'): ng.resource.IResourceService;
+ }
+ }
}
declare global {
diff --git a/angular-ui-bootstrap/index.d.ts b/angular-ui-bootstrap/index.d.ts
index 89efa8fe36..f4773975aa 100644
--- a/angular-ui-bootstrap/index.d.ts
+++ b/angular-ui-bootstrap/index.d.ts
@@ -379,18 +379,29 @@ declare module 'angular' {
* @default 'model-open'
*/
openedClass?: string;
+
/**
* CSS class(es) to be added to the top modal window.
- */
-
+ */
windowTopClass?: string;
/**
* Appends the modal to a specific element.
- *
+ *
* @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-scroll/index.d.ts b/angular-ui-scroll/index.d.ts
index 9727ee6061..99639eccf4 100644
--- a/angular-ui-scroll/index.d.ts
+++ b/angular-ui-scroll/index.d.ts
@@ -46,8 +46,9 @@ declare module 'angular' {
topVisibleScope: ng.IRepeatScope;
/**
* 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/angular-websocket/angular-websocket.d.ts b/angular-websocket/angular-websocket.d.ts
index 6929561f9c..9c2c93ea09 100644
--- a/angular-websocket/angular-websocket.d.ts
+++ b/angular-websocket/angular-websocket.d.ts
@@ -3,155 +3,157 @@
// Definitions by: Nick Veys
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-///
+import * as ng from "angular";
-declare namespace angular.websocket {
-
- /**
- * Options available to be specified for IWebSocketProvider.
- */
- type IWebSocketConfigOptions = {
- scope?: ng.IScope;
- rootScopeFailOver?: boolean;
- useApplyAsync?: boolean;
- initialTimeout?: number;
- maxTimeout?: number;
- binaryType?: "blob" | "arraybuffer";
- reconnectIfNotNormalClose?: boolean;
- }
- interface IWebSocketProvider {
- /**
- * Creates and opens an IWebSocket instance.
- *
- * @param url url to connect to
- * @return websocket instance
- */
- (url: string, protocols?: string | string[] | IWebSocketConfigOptions, options?: IWebSocketConfigOptions): IWebSocket;
- }
-
- /** Options available to be specified for IWebSocket.onMessage */
- type IWebSocketMessageOptions = {
+declare module "angular" {
+ namespace websocket {
/**
- * If specified, only messages that match the filter will cause the message event
- * to be fired.
+ * Options available to be specified for IWebSocketProvider.
*/
- filter?: string | RegExp;
+ type IWebSocketConfigOptions = {
+ scope?: ng.IScope;
+ rootScopeFailOver?: boolean;
+ useApplyAsync?: boolean;
+ initialTimeout?: number;
+ maxTimeout?: number;
+ binaryType?: "blob" | "arraybuffer";
+ reconnectIfNotNormalClose?: boolean;
+ }
+ interface IWebSocketProvider {
+ /**
+ * Creates and opens an IWebSocket instance.
+ *
+ * @param url url to connect to
+ * @return websocket instance
+ */
+ (url: string, protocols?: string | string[] | IWebSocketConfigOptions, options?: IWebSocketConfigOptions): IWebSocket;
+ }
- /** If true, each message handled will safely call `$rootScope.$digest()`. */
- autoApply?: boolean;
- }
+ /** Options available to be specified for IWebSocket.onMessage */
+ type IWebSocketMessageOptions = {
- /** Type corresponding to onMessage callbaks stored in $Websocket#onMessageCallbacks instance. */
- type IWebSocketMessageHandler = {
- fn: (evt: MessageEvent) => void;
- pattern: string | RegExp;
- autoApply: boolean;
- }
+ /**
+ * If specified, only messages that match the filter will cause the message event
+ * to be fired.
+ */
+ filter?: string | RegExp;
- /** Type corresponding to items stored in $WebSocket#sendQueue instance. */
- type IWebSocketQueueItem = {
- message: any;
- defered: ng.IPromise;
- }
+ /** If true, each message handled will safely call `$rootScope.$digest()`. */
+ autoApply?: boolean;
+ }
- interface IWebSocket {
+ /** Type corresponding to onMessage callbaks stored in $Websocket#onMessageCallbacks instance. */
+ type IWebSocketMessageHandler = {
+ fn: (evt: MessageEvent) => void;
+ pattern: string | RegExp;
+ autoApply: boolean;
+ }
- /**
- * Adds a callback to be executed each time a socket connection is opened for
- * this instance.
- *
- * @param event event object
- * @returns this instance, for method chaining
- */
- onOpen(callback: (event: Event) => void): IWebSocket;
+ /** Type corresponding to items stored in $WebSocket#sendQueue instance. */
+ type IWebSocketQueueItem = {
+ message: any;
+ defered: ng.IPromise;
+ }
- /**
- * Adds a callback to be executed each time a socket connection is closed for
- * this instance.
- *
- * @param event event object
- * @returns this instance, for method chaining
- */
- onClose(callback: (event: CloseEvent) => void): IWebSocket;
+ interface IWebSocket {
- /**
- * Adds a callback to be executed each time a socket connection is closed for
- * this instance.
- *
- * @param event event object
- * @returns this instance, for method chaining
- */
- onError(callback: (event: Event) => void): IWebSocket;
+ /**
+ * Adds a callback to be executed each time a socket connection is opened for
+ * this instance.
+ *
+ * @param event event object
+ * @returns this instance, for method chaining
+ */
+ onOpen(callback: (event: Event) => void): IWebSocket;
- /**
- * Adds a callback to be executed each time a socket connection has an error for
- * this instance.
- *
- * @param event event object
- * @returns this instance, for method chaining
- */
- onMessage(callback: (event: MessageEvent) => void, options?: IWebSocketMessageOptions): IWebSocket;
+ /**
+ * Adds a callback to be executed each time a socket connection is closed for
+ * this instance.
+ *
+ * @param event event object
+ * @returns this instance, for method chaining
+ */
+ onClose(callback: (event: CloseEvent) => void): IWebSocket;
- /**
- * Closes the underlying socket, as long as no data is still being sent from the client.
- *
- * @param force if `true`, force close even if data is still being sent
- * @returns this instance, for method chaining
- */
- close(force?: boolean): IWebSocket;
+ /**
+ * Adds a callback to be executed each time a socket connection is closed for
+ * this instance.
+ *
+ * @param event event object
+ * @returns this instance, for method chaining
+ */
+ onError(callback: (event: Event) => void): IWebSocket;
- /**
- * Adds data to a queue, and attempts to send if the socket is ready.
- *
- * @param data data to send, if this is an object, it will be stringified before sending
- */
- send(data: string | {}): ng.IPromise;
+ /**
+ * Adds a callback to be executed each time a socket connection has an error for
+ * this instance.
+ *
+ * @param event event object
+ * @returns this instance, for method chaining
+ */
+ onMessage(callback: (event: MessageEvent) => void, options?: IWebSocketMessageOptions): IWebSocket;
- /**
- * WebSocket instance.
- */
- socket: WebSocket;
+ /**
+ * Closes the underlying socket, as long as no data is still being sent from the client.
+ *
+ * @param force if `true`, force close even if data is still being sent
+ * @returns this instance, for method chaining
+ */
+ close(force?: boolean): IWebSocket;
- /**
- * Queue of send calls to be made on socket when socket is able to receive data.
- */
- sendQueue: IWebSocketQueueItem[];
+ /**
+ * Adds data to a queue, and attempts to send if the socket is ready.
+ *
+ * @param data data to send, if this is an object, it will be stringified before sending
+ */
+ send(data: string | {}): ng.IPromise;
- /**
- * List of callbacks to be executed when the socket is opened.
- */
- onOpenCallbacks: ((evt: Event) => void)[];
+ /**
+ * WebSocket instance.
+ */
+ socket: WebSocket;
- /**
- * List of callbacks to be executed when a message is received from the socket.
- */
- onMessageCallbacks: IWebSocketMessageHandler[];
+ /**
+ * Queue of send calls to be made on socket when socket is able to receive data.
+ */
+ sendQueue: IWebSocketQueueItem[];
- /**
- * List of callbacks to be executed when an error is received from the socket.
- */
- onErrorCallbacks: ((evt: Event) => void)[];
+ /**
+ * List of callbacks to be executed when the socket is opened.
+ */
+ onOpenCallbacks: ((evt: Event) => void)[];
- /**
- * List of callbacks to be executed when the socket is closed.
- */
- onCloseCallbacks: ((evt: CloseEvent) => void)[];
+ /**
+ * List of callbacks to be executed when a message is received from the socket.
+ */
+ onMessageCallbacks: IWebSocketMessageHandler[];
- /**
- * Returns either the readyState value from the underlying WebSocket instance
- * or a proprietary value representing the internal state
- */
- readyState: number;
+ /**
+ * List of callbacks to be executed when an error is received from the socket.
+ */
+ onErrorCallbacks: ((evt: Event) => void)[];
- /**
- * The initial timeout.
- */
- initialTimeout: number;
+ /**
+ * List of callbacks to be executed when the socket is closed.
+ */
+ onCloseCallbacks: ((evt: CloseEvent) => void)[];
- /**
- * Maximun timeout used to determine reconnection delay.
- */
- maxTimeout: number;
+ /**
+ * Returns either the readyState value from the underlying WebSocket instance
+ * or a proprietary value representing the internal state
+ */
+ readyState: number;
+
+ /**
+ * The initial timeout.
+ */
+ initialTimeout: number;
+
+ /**
+ * Maximun timeout used to determine reconnection delay.
+ */
+ maxTimeout: number;
+ }
}
}
diff --git a/angular-websocket/tsconfig.json b/angular-websocket/tsconfig.json
new file mode 100644
index 0000000000..7579a1591c
--- /dev/null
+++ b/angular-websocket/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "files": [
+ "angular-websocket.d.ts",
+ "angular-websocket-tests.ts"
+ ],
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "strictNullChecks": false,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": false
+ }
+}
\ No newline at end of file
diff --git a/angular-xeditable/angular-xeditable.d.ts b/angular-xeditable/angular-xeditable.d.ts
index 026fc5d2fb..e0aba2a0e9 100644
--- a/angular-xeditable/angular-xeditable.d.ts
+++ b/angular-xeditable/angular-xeditable.d.ts
@@ -3,96 +3,96 @@
// Definitions by: Joao Monteiro
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-///
+import * as angular from "angular";
-declare namespace angular.xeditable {
+declare module "angular" {
+ namespace xeditable {
+ interface IEditableOptions {
- interface IEditableOptions {
+ /**
+ * Theme. Possible values `bs3`, `bs2`, `default`
+ */
+ theme: string;
- /**
- * Theme. Possible values `bs3`, `bs2`, `default`
- */
- theme: string;
+ /**
+ * Icon Set. Possible values `font-awesome`, `default`.
+ */
+ icon_set: string;
- /**
- * Icon Set. Possible values `font-awesome`, `default`.
- */
- icon_set: string;
+ /**
+ * Whether to show buttons for single editalbe element.
+ * Possible values `right` (default), `no`.
+ */
+ buttons: string;
- /**
- * Whether to show buttons for single editalbe element.
- * Possible values `right` (default), `no`.
- */
- buttons: string;
+ /**
+ * Default value for `blur` attribute of single editable element.
+ * Can be `cancel|submit|ignore`.
+ */
+ blurElem: string;
- /**
- * Default value for `blur` attribute of single editable element.
- * Can be `cancel|submit|ignore`.
- */
- blurElem: string;
+ /**
+ * Default value for `blur` attribute of editable form.
+ * Can be `cancel|submit|ignore`.
+ */
+ blurForm: string;
- /**
- * Default value for `blur` attribute of editable form.
- * Can be `cancel|submit|ignore`.
- */
- blurForm: string;
+ /**
+ * How input elements get activated. Possible values: `focus|select|none`.
+ */
+ activate: string;
- /**
- * How input elements get activated. Possible values: `focus|select|none`.
- */
- activate: string;
+ /**
+ * Whether to disable x-editable. Can be overloaded on each element.
+ */
+ isDisabled: boolean;
- /**
- * Whether to disable x-editable. Can be overloaded on each element.
- */
- isDisabled: boolean;
+ /*
+ * Event, on which the edit mode gets activated.
+ * Can be any event.
+ */
+ activationEvent: string;
+ }
- /*
- * Event, on which the edit mode gets activated.
- * Can be any event.
- */
- activationEvent: string;
+ interface IEditableFormController extends angular.IFormController {
+
+ /**
+ * Shows form with editable controls.
+ */
+ $show(): void;
+
+ /**
+ * Hides form with editable controls without saving.
+ */
+ $hide(): void;
+
+ /**
+ * Sets focus on form field specified by `name`.
+ * When trying to set the focus on a form field of a new row in the editable table, the `$activate` call needs to be wrapped in a `$timeout` call so that the form is rendered before the `$activate` function is called.
+ *
+ * @param name name of field
+ */
+ $activate(name: string): void;
+
+ /**
+ * Triggers `oncancel` event and calls `$hide()`.
+ */
+ $cancel(): void;
+
+ $setWaiting(value: boolean): void;
+
+ /**
+ * Shows error message for particular field.
+ *
+ * @param name name of field
+ * @param msg error message
+ */
+ $setError(name: string, msg: string): void;
+
+ $submit(): void;
+
+ $save(): void;
+
+ }
}
-
- interface IEditableFormController extends angular.IFormController {
-
- /**
- * Shows form with editable controls.
- */
- $show(): void;
-
- /**
- * Hides form with editable controls without saving.
- */
- $hide(): void;
-
- /**
- * Sets focus on form field specified by `name`.
- * When trying to set the focus on a form field of a new row in the editable table, the `$activate` call needs to be wrapped in a `$timeout` call so that the form is rendered before the `$activate` function is called.
- *
- * @param name name of field
- */
- $activate(name: string): void;
-
- /**
- * Triggers `oncancel` event and calls `$hide()`.
- */
- $cancel(): void;
-
- $setWaiting(value: boolean): void;
-
- /**
- * Shows error message for particular field.
- *
- * @param name name of field
- * @param msg error message
- */
- $setError(name: string, msg: string): void;
-
- $submit(): void;
-
- $save(): void;
-
- }
-
}
diff --git a/angular-xeditable/tsconfig.json b/angular-xeditable/tsconfig.json
new file mode 100644
index 0000000000..e9a9c10c51
--- /dev/null
+++ b/angular-xeditable/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "files": [
+ "angular-xeditable.d.ts",
+ "angular-xeditable-tests.ts"
+ ],
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": true,
+ "strictNullChecks": false,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": false
+ }
+}
\ No newline at end of file
diff --git a/angular/angular-tests.ts b/angular/angular-tests.ts
index 30422e1526..86e36d9db9 100644
--- a/angular/angular-tests.ts
+++ b/angular/angular-tests.ts
@@ -866,6 +866,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'},
diff --git a/angular/index.d.ts b/angular/index.d.ts
index 5e0729cc14..0694d4e583 100644
--- a/angular/index.d.ts
+++ b/angular/index.d.ts
@@ -1261,7 +1261,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;
}
diff --git a/atom/index.d.ts b/atom/index.d.ts
index b7c7a070f8..7c984bd812 100644
--- a/atom/index.d.ts
+++ b/atom/index.d.ts
@@ -946,10 +946,15 @@ 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;
items:any[];
@@ -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-lock/index.d.ts b/auth0-lock/index.d.ts
index 10ee3aac0d..5d53fd8dc3 100644
--- a/auth0-lock/index.d.ts
+++ b/auth0-lock/index.d.ts
@@ -92,7 +92,7 @@ interface Auth0LockConstructorOptions {
initialScreen?: "login" | "signUp" | "forgotPassword";
language?: string;
languageDictionary?: any;
- loginAfterSignup?: boolean;
+ loginAfterSignUp?: boolean;
mustAcceptTerms?: boolean;
popupOptions?: Auth0LockPopupOptions;
prefill?: { email?: string, username?: string};
diff --git a/aws-sdk/index.d.ts b/aws-sdk/index.d.ts
index 4287ece921..be93d40620 100644
--- a/aws-sdk/index.d.ts
+++ b/aws-sdk/index.d.ts
@@ -47,6 +47,51 @@ interface AwsError extends Error {
stack: string;
}
+export interface RetryDelayOption {
+ base?: number;
+ customBackoff?: (retryCount: number) => number;
+}
+
+export interface Ebs {
+ SnapshotId?: string;
+ VolumeSize?: number;
+ VolumeType?: string;
+ DeleteOnTermination?: boolean;
+ Iops?: number;
+ Encrypted?: boolean;
+}
+
+export interface BlockDeviceMapping {
+ VirtualName?: string;
+ DeviceName: string;
+ Ebs?: Ebs;
+ NoDevice?: boolean;
+}
+
+export interface InstanceMonitoring {
+ SpotPrice?: string;
+ Enabled?: boolean;
+}
+
+export interface Filter {
+ Name?: string;
+ Values?: boolean;
+}
+
+export interface StepAdjustment {
+ scalingAdjustment: number;
+ metricIntervalLowerBound?: number;
+ metricIntervalUpperBound?: number;
+}
+
+export interface Tags {
+ resourceId?: string;
+ resourceType?: string;
+ key: string;
+ value?: string;
+ propagateAtLaunch?: boolean;
+}
+
export interface Services {
autoscaling?: any;
cloudformation?: any;
@@ -143,7 +188,65 @@ export declare class Lambda {
updateFunctionConfiguration(params: Lambda.UpdateFunctionConfigurationParams, callback: (err: AwsError, data: any) => void): void;
}
-export declare class SQS {
+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;
@@ -232,7 +335,12 @@ export declare class S3 {
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 {
@@ -243,7 +351,7 @@ export class STS {
*/
assumeRole(params: sts.AssumeRoleParams, callback: (err: any, data: any) => void): void;
/**
- * Returns a set of temporary security credentials for users who have been authenticated via a SAML authentication response.
+ * 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;
@@ -586,8 +694,355 @@ export declare module Lambda {
}
}
-export declare module SQS {
+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;
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 db3a38d078..82b4ccfa68 100644
--- a/azure-mobile-apps/azure-mobile-apps-tests.ts
+++ b/azure-mobile-apps/azure-mobile-apps-tests.ts
@@ -72,6 +72,13 @@ table.read.use([function () {}, function () {}]);
table.read.use(function () {}, 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';
+
// 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();
diff --git a/azure-mobile-apps/index.d.ts b/azure-mobile-apps/index.d.ts
index c6f6def763..68d6d08826 100644
--- a/azure-mobile-apps/index.d.ts
+++ b/azure-mobile-apps/index.d.ts
@@ -47,6 +47,7 @@ declare namespace Azure.MobileApps {
interface Table {
authorize?: boolean;
+ access?: AccessType;
autoIncrement?: boolean;
dynamicSchema?: boolean;
name: string;
@@ -66,8 +67,11 @@ declare namespace Azure.MobileApps {
(operationHandler: (context: Context) => void): Table;
use(...middleware: Middleware[]): Table;
use(middleware: Middleware[]): Table;
+ access: AccessType;
}
+ type AccessType = 'anonymous' | 'authenticated' | 'disabled';
+
interface Tables {
configuration: Configuration;
add(name: string, definition?: Table | TableDefinition): void;
diff --git a/backbone-fetch-cache/backbone-fetch-cache-tests.ts b/backbone-fetch-cache/backbone-fetch-cache-tests.ts
index e2eb532690..072e3c29ce 100644
--- a/backbone-fetch-cache/backbone-fetch-cache-tests.ts
+++ b/backbone-fetch-cache/backbone-fetch-cache-tests.ts
@@ -1,6 +1,5 @@
-///
-
-import * as Backbone from "backbone-fetch-cache";
+import * as Backbone from "backbone";
+import * as BackboneFetchCache from "backbone-fetch-cache";
// static methods / properties
diff --git a/backbone-fetch-cache/backbone-fetch-cache.d.ts b/backbone-fetch-cache/backbone-fetch-cache.d.ts
deleted file mode 100644
index 449db1c667..0000000000
--- a/backbone-fetch-cache/backbone-fetch-cache.d.ts
+++ /dev/null
@@ -1,189 +0,0 @@
-// Type definitions for backbone-fetch-cache 1.4.0
-// Project: https://github.com/madglory/backbone-fetch-cache
-// Definitions by: delphinus
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-///
-
-declare namespace BackboneFetchCache {
-
- interface SuperMethods {
-
- modelFetch(options?: Backbone.ModelFetchOptions): JQueryXHR;
- modelSync(...arg: any[]): JQueryXHR;
- collectionFetch(options?: Backbone.CollectionFetchOptions): JQueryXHR;
- }
-
- interface GetCacheOptions {
-
- data?: any;
- url?: string;
- }
-
- interface SetCacheOptions extends GetCacheOptions {
-
- cache: boolean;
- expires: boolean | number;
- prefill: boolean;
- prefillExpires: boolean | number;
- }
-
- interface Cache {
-
- expires: number;
- lastSync: number;
- prefillExpires: number;
- value: any;
- }
-
- interface GetCacheKeyObject {
-
- getCacheKey?: (opts?: GetCacheOptions) => string;
- url?: () => string;
- }
-
- type GetCacheKeyOptions = string | {url: string} | GetCacheKeyObject;
-
- interface Static {
-
- /**
- * Global flag to enable/disable caching
- */
- enabled: boolean;
-
- /**
- * By default the cache is persisted in localStorage (if available).
- * Set Backbone.fetchCache.localStorage = false to disable this.
- */
- localStorage: boolean;
-
- /**
- * Sometimes you just need to clear a cached item manually.
- * Backbone.fetchCache.clearItem() can be called safely from anywhere
- * in your application. It will take your backbone Model or Collection,
- * a function that returns the key String, or the key String itself. If
- * you pass in a Model or Collection, the .getCacheKey() method will be
- * checked before the url property.
- */
- clearItem(...args: any[]): any;
-
- /**
- * You can explicitly fetch a cached item, without having to call the
- * models/collection fetch. This might be useful for debugging and
- * testing.
- */
- getCache(key: () => string, opts?: GetCacheOptions): Cache;
- getCache(key: GetCacheKeyOptions, opts?: GetCacheOptions): Cache;
-
- getCacheKey(key: () => string, opts?: GetCacheOptions): string;
- getCacheKey(key: GetCacheKeyOptions, opts?: GetCacheOptions): string;
-
- /**
- * If you want to know when was the last (server) sync of a given key, you can use.
- */
- getLastSync(key: () => string, opts?: GetCacheOptions): number;
- getLastSync(key: GetCacheKeyOptions, opts?: GetCacheOptions): number;
-
- getLocalStorage(): void;
- getLocalStorageKey(): string;
-
- /**
- * When setting items in localStorage, the browser may throw a
- * QUOTA_EXCEEDED_ERR, meaning the store is full. Backbone.fetchCache
- * tries to work around this problem by deleting what it considers the
- * most stale item to make space for the new data. The staleness of
- * data is determined by the sorting function priorityFn, which by
- * default returns the oldest item.
- */
- priorityFn(a: Cache, b: Cache): number;
-
- reset(): void;
-
- setCache(instance: () => string, opts?: SetCacheOptions, attrs?: any): void;
- setCache(instance: GetCacheKeyOptions, opts?: SetCacheOptions, attrs?: any): void;
-
- setLocalStorage(...args: any[]): any;
-
- _superMethods: SuperMethods;
- }
-}
-
-declare module Backbone {
-
- var fetchCache: BackboneFetchCache.Static;
-
- /**
- * The most used API hook for Backbone Fetch Cache is the Model and
- * Collection #.fetch() method. Here are the options you can pass into that
- * method to get behaviour particular to Backbone Fetch Cache.
- */
- interface ModelFetchWithCacheOptions extends ModelFetchOptions {
-
- /**
- * Calls to modelInstance.fetch or collectionInstance.fetch will be
- * fulfilled from the cache (if possible) when cache: true is set in
- * the options hash.
- */
- cache?: boolean;
-
- context?: any;
-
- /**
- * Cache values expire after 5 minutes by default. You can adjust this
- * by passing expires: to the fetch call. Set to false to
- * never expire.
- */
- expires?: number;
-
- /**
- * This option allows the model/collection to be populated from the
- * cache immediately and then be updated once the call to fetch has
- * completed. The initial cache hit calls the prefillSuccess callback
- * and then the AJAX success/error callbacks are called as normal when
- * the request is complete. This allows the page to render something
- * immediately and then update it after the request completes. (Note:
- * the prefillSuccess callback will not fire if the data is not found
- * in the cache.)
- *
- * prefill and prefillExpires options can be used with the promises
- * interface like so (note: the progress event will not fire if the
- * data is not found in the cache.).
- *
- * prefillExpires affects prefill in the following ways:
- *
- * 1. If the cache doesn't hold the requested data, just fetch it
- * (usual behaviour)
- * 2. If the cache holds an expired version of the requested data, just
- * fetch it (usual behaviour)
- * 3. If the cache holds requested data that is neither expired nor
- * prefill expired, just return it and don't do a fetch / prefill
- * callback (usual cache behavior, unusual prefill behaviour)
- * 4. If the cache holds requested data that isn't expired but is
- * prefill expired, use the prefill callback and do a fetch (usual
- * prefill behaviour)
- */
- prefill?: boolean;
- prefillExpires?: number;
- prefillSuccess?: (self: any, attributes: any, opts: ModelFetchWithCacheOptions) => void;
- }
-
- interface CollectionFetchWithCacheOptions extends ModelFetchWithCacheOptions {
-
- prefillSuccess?: (self: any) => void;
- }
-
- interface ModelWithCache extends Model {
-
- fetch(options?: ModelFetchWithCacheOptions): JQueryXHR;
- }
-
- interface CollectionWithCache extends Collection {
-
- fetch(options?: CollectionFetchWithCacheOptions): JQueryXHR;
- }
-}
-
-declare module "backbone-fetch-cache" {
-
- export = Backbone;
-}
diff --git a/backbone-fetch-cache/index.d.ts b/backbone-fetch-cache/index.d.ts
new file mode 100644
index 0000000000..0067bb4443
--- /dev/null
+++ b/backbone-fetch-cache/index.d.ts
@@ -0,0 +1,183 @@
+// Type definitions for backbone-fetch-cache 1.4.0
+// Project: https://github.com/madglory/backbone-fetch-cache
+// Definitions by: delphinus
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+import * as Backbone from "backbone";
+
+interface SuperMethods {
+
+ modelFetch(options?: Backbone.ModelFetchOptions): JQueryXHR;
+ modelSync(...arg: any[]): JQueryXHR;
+ collectionFetch(options?: Backbone.CollectionFetchOptions): JQueryXHR;
+}
+
+interface GetCacheOptions {
+
+ data?: any;
+ url?: string;
+}
+
+interface SetCacheOptions extends GetCacheOptions {
+
+ cache: boolean;
+ expires: boolean | number;
+ prefill: boolean;
+ prefillExpires: boolean | number;
+}
+
+interface Cache {
+
+ expires: number;
+ lastSync: number;
+ prefillExpires: number;
+ value: any;
+}
+
+interface GetCacheKeyObject {
+
+ getCacheKey?: (opts?: GetCacheOptions) => string;
+ url?: () => string;
+}
+
+type GetCacheKeyOptions = string | {url: string} | GetCacheKeyObject;
+
+interface Static {
+
+ /**
+ * Global flag to enable/disable caching
+ */
+ enabled: boolean;
+
+ /**
+ * By default the cache is persisted in localStorage (if available).
+ * Set Backbone.fetchCache.localStorage = false to disable this.
+ */
+ localStorage: boolean;
+
+ /**
+ * Sometimes you just need to clear a cached item manually.
+ * Backbone.fetchCache.clearItem() can be called safely from anywhere
+ * in your application. It will take your backbone Model or Collection,
+ * a function that returns the key String, or the key String itself. If
+ * you pass in a Model or Collection, the .getCacheKey() method will be
+ * checked before the url property.
+ */
+ clearItem(...args: any[]): any;
+
+ /**
+ * You can explicitly fetch a cached item, without having to call the
+ * models/collection fetch. This might be useful for debugging and
+ * testing.
+ */
+ getCache(key: () => string, opts?: GetCacheOptions): Cache;
+ getCache(key: GetCacheKeyOptions, opts?: GetCacheOptions): Cache;
+
+ getCacheKey(key: () => string, opts?: GetCacheOptions): string;
+ getCacheKey(key: GetCacheKeyOptions, opts?: GetCacheOptions): string;
+
+ /**
+ * If you want to know when was the last (server) sync of a given key, you can use.
+ */
+ getLastSync(key: () => string, opts?: GetCacheOptions): number;
+ getLastSync(key: GetCacheKeyOptions, opts?: GetCacheOptions): number;
+
+ getLocalStorage(): void;
+ getLocalStorageKey(): string;
+
+ /**
+ * When setting items in localStorage, the browser may throw a
+ * QUOTA_EXCEEDED_ERR, meaning the store is full. Backbone.fetchCache
+ * tries to work around this problem by deleting what it considers the
+ * most stale item to make space for the new data. The staleness of
+ * data is determined by the sorting function priorityFn, which by
+ * default returns the oldest item.
+ */
+ priorityFn(a: Cache, b: Cache): number;
+
+ reset(): void;
+
+ setCache(instance: () => string, opts?: SetCacheOptions, attrs?: any): void;
+ setCache(instance: GetCacheKeyOptions, opts?: SetCacheOptions, attrs?: any): void;
+
+ setLocalStorage(...args: any[]): any;
+
+ _superMethods: SuperMethods;
+}
+
+declare module "backbone" {
+
+ var fetchCache: Static;
+
+ /**
+ * The most used API hook for Backbone Fetch Cache is the Model and
+ * Collection #.fetch() method. Here are the options you can pass into that
+ * method to get behaviour particular to Backbone Fetch Cache.
+ */
+ interface ModelFetchWithCacheOptions extends ModelFetchOptions {
+
+ /**
+ * Calls to modelInstance.fetch or collectionInstance.fetch will be
+ * fulfilled from the cache (if possible) when cache: true is set in
+ * the options hash.
+ */
+ cache?: boolean;
+
+ context?: any;
+
+ /**
+ * Cache values expire after 5 minutes by default. You can adjust this
+ * by passing expires: to the fetch call. Set to false to
+ * never expire.
+ */
+ expires?: number;
+
+ /**
+ * This option allows the model/collection to be populated from the
+ * cache immediately and then be updated once the call to fetch has
+ * completed. The initial cache hit calls the prefillSuccess callback
+ * and then the AJAX success/error callbacks are called as normal when
+ * the request is complete. This allows the page to render something
+ * immediately and then update it after the request completes. (Note:
+ * the prefillSuccess callback will not fire if the data is not found
+ * in the cache.)
+ *
+ * prefill and prefillExpires options can be used with the promises
+ * interface like so (note: the progress event will not fire if the
+ * data is not found in the cache.).
+ *
+ * prefillExpires affects prefill in the following ways:
+ *
+ * 1. If the cache doesn't hold the requested data, just fetch it
+ * (usual behaviour)
+ * 2. If the cache holds an expired version of the requested data, just
+ * fetch it (usual behaviour)
+ * 3. If the cache holds requested data that is neither expired nor
+ * prefill expired, just return it and don't do a fetch / prefill
+ * callback (usual cache behavior, unusual prefill behaviour)
+ * 4. If the cache holds requested data that isn't expired but is
+ * prefill expired, use the prefill callback and do a fetch (usual
+ * prefill behaviour)
+ */
+ prefill?: boolean;
+ prefillExpires?: number;
+ prefillSuccess?: (self: any, attributes: any, opts: ModelFetchWithCacheOptions) => void;
+ }
+
+ interface CollectionFetchWithCacheOptions extends ModelFetchWithCacheOptions {
+
+ prefillSuccess?: (self: any) => void;
+ }
+
+ interface ModelWithCache extends Model {
+
+ fetch(options?: ModelFetchWithCacheOptions): JQueryXHR;
+ }
+
+ interface CollectionWithCache extends Collection {
+
+ fetch(options?: CollectionFetchWithCacheOptions): JQueryXHR;
+ }
+}
+
+export as namespace BackboneFetchCache;
diff --git a/backbone-fetch-cache/tsconfig.json b/backbone-fetch-cache/tsconfig.json
new file mode 100644
index 0000000000..563a475286
--- /dev/null
+++ b/backbone-fetch-cache/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "noImplicitAny": false,
+ "strictNullChecks": false,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "backbone-fetch-cache-tests.ts"
+ ]
+}
\ No newline at end of file
diff --git a/backbone/index.d.ts b/backbone/index.d.ts
index f1203c0967..975d7f33c9 100644
--- a/backbone/index.d.ts
+++ b/backbone/index.d.ts
@@ -58,7 +58,7 @@ declare namespace Backbone {
interface ModelSetOptions extends Silenceable, Validable {
}
- interface ModelFetchOptions extends PersistenceOptions, ModelSetOptions, Parseable {
+ export interface ModelFetchOptions extends PersistenceOptions, ModelSetOptions, Parseable {
}
interface ModelSaveOptions extends Silenceable, Waitable, Validable, Parseable, PersistenceOptions {
diff --git a/backlog-js/backlog-js-tests.ts b/backlog-js/backlog-js-tests.ts
index 979eb57ca4..8a3e47fbb1 100644
--- a/backlog-js/backlog-js-tests.ts
+++ b/backlog-js/backlog-js-tests.ts
@@ -1,5 +1,3 @@
-///
-
import * as backlogjs from 'backlog-js';
const host = 'example.backlog.jp';
diff --git a/backlog-js/backlog-js.d.ts b/backlog-js/backlog-js.d.ts
deleted file mode 100644
index 353e7e90cd..0000000000
--- a/backlog-js/backlog-js.d.ts
+++ /dev/null
@@ -1,695 +0,0 @@
-// Type definitions for backlog-js 0.9.0
-// Project: https://github.com/nulab/backlog-js
-// Definitions by: Yuichi Watanabe
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-///
-///
-///
-
-declare module 'backlog-js' {
-
- class Request {
- private configure;
- constructor(configure: {
- host: string;
- apiKey?: string;
- accessToken?: string;
- timeout?: number;
- });
- get(path: string, params?: any): Promise;
- post(path: string, params?: any): Promise;
- put(path: string, params: any): Promise;
- patch(path: string, params: any): Promise;
- delete(path: string, params?: any): Promise;
- request(options: {
- method: string;
- path: string;
- params?: Params | FormData;
- }): Promise;
- checkStatus(response: IResponse): Promise;
- parseJSON(response: IResponse): Promise;
- private toFormData(params);
- private toQueryString(params);
- webAppBaseURL: string;
- restBaseURL: string;
- }
-
- type Params = {
- [index: string]: number | string | number[] | string[];
- };
-
- export class Backlog extends Request {
- constructor(configure: {
- host: string;
- apiKey?: string;
- accessToken?: string;
- timeout?: number;
- });
- getSpace(): Promise;
- getSpaceActivities(params: Option.Space.GetActivitiesParams): Promise;
- getSpaceNotification(): Promise;
- putSpaceNotification(params: Option.Space.PutSpaceNotificationParams): Promise;
- getSpaceDiskUsage(): Promise;
- getSpaceIcon(): Promise;
- postSpaceAttachment(form: FormData): Promise;
- getUsers(): Promise;
- getUser(userId: number): Promise;
- postUser(params: Option.User.PostUserParams): Promise;
- patchUser(userId: number, params: Option.User.PatchUserParams): Promise;
- deleteUser(userId: number): Promise;
- getMyself(): Promise;
- getUserActivities(userId: number, params: Option.User.GetUserActivitiesParams): Promise;
- getUserStars(userId: number, params: Option.User.GetUserStarsParams): Promise;
- getUserStarsCount(userId: number, params: Option.User.GetUserStarsCountParams): Promise;
- getRecentlyViewedIssues(params: Option.User.GetRecentlyViewedParams): Promise;
- getRecentlyViewedProjects(params: Option.User.GetRecentlyViewedParams): Promise;
- getRecentlyViewedWikis(params: Option.User.GetRecentlyViewedParams): Promise;
- getUserIcon(userId: number): Promise;
- getGroups(params: Option.Group.GetGroupsParams): Promise;
- postGroups(params: Option.Group.PostGroupsParams): Promise;
- getGroup(groupId: number): Promise;
- patchGroup(groupId: number, params: Option.Group.PatchGroupParams): Promise;
- deleteGroup(groupId: number): Promise;
- getStatuses(): Promise;
- getResolutions(): Promise;
- getPriorities(): Promise;
- postProject(params: Option.Project.PostProjectParams): Promise;
- getProjects(params?: Option.Project.GetProjectsParams): Promise;
- getProject(projectIdOrKey: string): Promise;
- patchProject(projectIdOrKey: string, params: Option.Project.PatchProjectParams): Promise;
- deleteProject(projectIdOrKey: string): Promise;
- getProjectActivities(projectIdOrKey: string, params: Option.Space.GetActivitiesParams): Promise;
- getProjectUsers(projectIdOrKey: string): Promise;
- deleteProjectUsers(projectIdOrKey: string, params: Option.Project.DeleteProjectUsersParams): Promise;
- postProjectAdministrators(projectIdOrKey: string, params: Option.Project.PostProjectAdministrators): Promise;
- getProjectAdministrators(projectIdOrKey: string): Promise;
- deleteProjectAdministrators(projectIdOrKey: string, params: Option.Project.DeleteProjectAdministrators): Promise;
- getIssueTypes(projectIdOrKey: string): Promise;
- postIssueType(projectIdOrKey: string, params: Option.Project.PostIssueTypeParams): Promise;
- patchIssueType(projectIdOrKey: string, id: number, params: Option.Project.PatchIssueTypeParams): Promise;
- deleteIssueType(projectIdOrKey: string, id: number, params: Option.Project.DeleteIssueTypeParams): Promise;
- getCategories(projectIdOrKey: string): Promise;
- postCategories(projectIdOrKey: string, params: Option.Project.PostCategoriesParams): Promise;
- patchCategories(projectIdOrKey: string, id: number, params: Option.Project.PatchCategoriesParams): Promise;
- deleteCategories(projectIdOrKey: string, id: number): Promise;
- getVersions(projectIdOrKey: string): Promise;
- postVersions(projectIdOrKey: string, params: Option.Project.PostVersionsParams): Promise;
- patchVersions(projectIdOrKey: string, id: number, params: Option.Project.PatchVersionsParams): Promise;
- deleteVersions(projectIdOrKey: string, id: number): Promise;
- getCustomFields(projectIdOrKey: string): Promise;
- postCustomField(projectIdOrKey: string, params: Option.Project.PostCustomFieldParams | Option.Project.PostCustomFieldWithNumericParams | Option.Project.PostCustomFieldWithDateParams | Option.Project.PostCustomFieldWithListParams): Promise;
- patchCustomField(projectIdOrKey: string, id: number, params: Option.Project.PatchCustomFieldParams | Option.Project.PatchCustomFieldWithNumericParams | Option.Project.PatchCustomFieldWithDateParams | Option.Project.PatchCustomFieldWithListParams): Promise;
- deleteCustomField(projectIdOrKey: string, id: number): Promise;
- postCustomFieldItem(projectIdOrKey: string, id: number, params: Option.Project.PostCustomFieldItemParams): Promise;
- patchCustomFieldItem(projectIdOrKey: string, id: number, itemId: number, params: Option.Project.PatchCustomFieldItemParams): Promise;
- deleteCustomFieldItem(projectIdOrKey: string, id: number, params: Option.Project.PostCustomFieldItemParams): Promise;
- getSharedFiles(projectIdOrKey: string, path: string, params: Option.Project.GetSharedFilesParams): Promise;
- getProjectsDiskUsage(projectIdOrKey: string): Promise;
- getWebhooks(projectIdOrKey: string): Promise;
- postWebhook(projectIdOrKey: string, params: Option.Project.PostWebhookParams): Promise;
- getWebhook(projectIdOrKey: string, webhookId: string): Promise;
- patchWebhook(projectIdOrKey: string, webhookId: string, params: Option.Project.PatchWebhookParams): Promise;
- deleteWebhook(projectIdOrKey: string, webhookId: string): Promise;
- postIssue(params: Option.Issue.PostIssueParams): Promise;
- patchIssue(issueIdOrKey: string, params: Option.Issue.PatchIssueParams): Promise;
- getIssues(params?: Option.Issue.GetIssuesParams): Promise;
- getIssue(issueIdOrKey: string): Promise;
- getIssuesCount(params?: Option.Issue.GetIssuesParams): Promise;
- deleteIssuesCount(issueIdOrKey: string): Promise;
- getIssueComments(issueIdOrKey: string, params: Option.Issue.GetIssueCommentsParams): Promise;
- postIssueComments(issueIdOrKey: string, params: Option.Issue.PostIssueCommentsParams): Promise;
- getIssueCommentsCount(issueIdOrKey: string): Promise;
- getIssueComment(issueIdOrKey: string, commentId: number): Promise;
- patchIssueComment(issueIdOrKey: string, commentId: number, params: Option.Issue.PatchIssueCommentParams): Promise;
- getIssueCommentNotifications(issueIdOrKey: string, commentId: number): Promise;
- postIssueCommentNotifications(issueIdOrKey: string, commentId: number, prams: Option.Issue.IssueCommentNotifications): Promise;
- getIssueAttachments(issueIdOrKey: string): Promise;
- deleteIssueAttachment(issueIdOrKey: string, attachmentId: string): Promise;
- getIssueSharedFiles(issueIdOrKey: string): Promise;
- linkIssueSharedFiles(issueIdOrKey: string, params: Option.Issue.LinkIssueSharedFilesParams): Promise;
- unlinkIssueSharedFile(issueIdOrKey: string, id: number): Promise;
- getWikis(projectIdOrKey: number): Promise;
- getWikisCount(projectIdOrKey: number): Promise;
- getWikisTags(projectIdOrKey: number): Promise;
- postWiki(params: Option.Wiki.PostWikiParams): Promise;
- getWiki(wikiId: number): Promise;
- patchWiki(wikiId: number, params: Option.Wiki.PatchWikiParams): Promise;
- deleteWiki(wikiId: number, mailNotify: boolean): Promise;
- getWikisAttachments(wikiId: number): Promise;
- postWikisAttachments(wikiId: number, attachmentId: number[]): Promise;
- deleteWikisAttachments(wikiId: number, attachmentId: number): Promise;
- getWikisSharedFiles(wikiId: number): Promise;
- linkWikisSharedFiles(wikiId: number, fileId: number[]): Promise;
- unlinkWikisSharedFiles(wikiId: number, id: number): Promise;
- getWikisHistory(wikiId: number, params: Option.Wiki.GetWikisHistoryParams): Promise;
- getWikisStars(wikiId: number): Promise;
- postStar(params: Option.Project.PostStarParams): Promise;
- getNotifications(params: Option.Notification.GetNotificationsParams): Promise;
- getNotificationsCount(params: Option.Notification.GetNotificationsCountParams): Promise;
- resetNotificationsMarkAsRead(): Promise;
- markAsReadNotification(id: number): Promise;
- getGitRepositories(projectIdOrKey: string): Promise;
- getGitRepository(projectIdOrKey: string, repoIdOrName: string): Promise;
- getPullRequests(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.GetPullRequestsParams): Promise;
- getPullRequestsCount(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.GetPullRequestsParams): Promise;
- postPullRequest(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.PostPullRequestParams): Promise;
- getPullRequest(projectIdOrKey: string, repoIdOrName: string, number: number): Promise;
- patchPullRequest(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.PatchPullRequestParams): Promise;
- getPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.GetPullRequestCommentsParams): Promise;
- postPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.PostPullRequestCommentsParams): Promise;
- getPullRequestCommentsCount(projectIdOrKey: string, repoIdOrName: string, number: number): Promise;
- patchPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, commentId: number, params: Option.PullRequest.PatchPullRequestCommentsParams): Promise;
- getPullRequestAttachments(projectIdOrKey: string, repoIdOrName: string, number: number): Promise;
- deletePullRequestAttachment(projectIdOrKey: string, repoIdOrName: string, number: number, attachmentId: number): Promise;
- getProjectIcon(projectIdOrKey: string): Promise;
- getSharedFile(projectIdOrKey: string, sharedFileId: number): Promise;
- getIssueAttachment(issueIdOrKey: string, attachmentId: number): Promise;
- getWikiAttachment(wikiId: number, attachmentId: number): Promise;
- getPullRequestAttachment(projectIdOrKey: string, repoIdOrName: string, number: number, attachmentId: number): Promise;
- private download(path);
- private upload(path, params);
- private parseFileData(response);
- }
-
- export class OAuth2 {
- private credentials;
- private timeout;
- constructor(credentials: Option.OAuth2.Credentials, timeout?: number);
- getAuthorizationURL(options: {
- host: string;
- redirectUri?: string;
- state?: string;
- }): string;
- getAccessToken(options: {
- host: string;
- code: string;
- redirectUri?: string;
- }): Promise;
- refreshAccessToken(options: {
- host: string;
- refreshToken: string;
- }): Promise;
- }
-
- import { PassThrough } from 'stream';
- export namespace Entity {
- export namespace File {
- export type FileData = NodeFileData | BrowserFileData;
- export interface NodeFileData {
- body: PassThrough;
- url: string;
- filename: string;
- }
- export interface BrowserFileData {
- body: any;
- url: string;
- blob?: () => Promise;
- }
- }
- export namespace OAuth2 {
- export interface AccessToken {
- access_token: string;
- token_type: string;
- expires_in: number;
- refresh_token: string;
- }
- }
- }
-
-
- export namespace Option {
- export type Order = "asc" | "desc";
- export enum ActivityType {
- Undefined = -1,
- IssueCreated = 1,
- IssueUpdated = 2,
- IssueCommented = 3,
- IssueDeleted = 4,
- WikiCreated = 5,
- WikiUpdated = 6,
- WikiDeleted = 7,
- FileAdded = 8,
- FileUpdated = 9,
- FileDeleted = 10,
- SvnCommitted = 11,
- GitPushed = 12,
- GitRepositoryCreated = 13,
- IssueMultiUpdated = 14,
- ProjectUserAdded = 15,
- ProjectUserRemoved = 16,
- NotifyAdded = 17,
- PullRequestAdded = 18,
- PullRequestUpdated = 19,
- PullRequestCommented = 20,
- PullRequestMerged = 21,
- }
- export namespace Notification {
- export interface GetNotificationsParams {
- minId?: number;
- maxId?: number;
- count?: number;
- order?: Order;
- }
- export interface GetNotificationsCountParams {
- alreadyRead: boolean;
- resourceAlreadyRead: boolean;
- }
- }
- export namespace Space {
- export interface GetActivitiesParams {
- activityTypeId?: ActivityType[];
- minId?: number;
- maxId?: number;
- count?: number;
- order?: Order;
- }
- export interface PutSpaceNotificationParams {
- content: string;
- }
- }
- export namespace User {
- export interface PostUserParams {
- userId: string;
- password: string;
- name: string;
- mailAddress: string;
- roleType: RoleType;
- }
- export interface PatchUserParams {
- password?: string;
- name?: string;
- mailAddress?: string;
- roleType?: RoleType;
- }
- export enum RoleType {
- Admin = 1,
- User = 2,
- Reporter = 3,
- Viewer = 4,
- GuestReporter = 5,
- GuestViewer = 6,
- }
- export interface GetUserActivitiesParams {
- activityTypeId?: ActivityType[];
- minId?: number;
- maxId?: number;
- count?: number;
- order?: Order;
- }
- export interface GetUserStarsParams {
- minId?: number;
- maxId?: number;
- count?: number;
- order?: Order;
- }
- export interface GetUserStarsCountParams {
- since?: string;
- until?: string;
- }
- export interface GetRecentlyViewedParams {
- order?: Order;
- offset?: number;
- count?: number;
- }
- }
- export namespace Group {
- export interface GetGroupsParams {
- order?: Order;
- offset?: number;
- count?: number;
- }
- export interface PostGroupsParams {
- name: string;
- members?: string[];
- }
- export interface PatchGroupParams {
- name?: string;
- members?: string[];
- }
- }
- export namespace Project {
- export type TextFormattingRule = "backlog" | "markdown";
- export interface PostProjectParams {
- name: string;
- key: string;
- chartEnabled: boolean;
- projectLeaderCanEditProjectLeader?: boolean;
- subtaskingEnabled: boolean;
- textFormattingRule: TextFormattingRule;
- }
- export interface PatchProjectParams {
- name?: string;
- key?: string;
- chartEnabled?: boolean;
- subtaskingEnabled?: boolean;
- projectLeaderCanEditProjectLeader?: boolean;
- textFormattingRule?: TextFormattingRule;
- archived?: boolean;
- }
- export interface GetProjectsParams {
- archived?: boolean;
- all?: boolean;
- }
- export interface DeleteProjectUsersParams {
- userId: number;
- }
- export interface PostProjectAdministrators {
- userId: number;
- }
- export interface DeleteProjectAdministrators {
- userId: number;
- }
- export type IssueTypeColor = "#e30000" | "#990000" | "#934981" | "#814fbc" | "#2779ca" | "#007e9a" | "#7ea800" | "#ff9200" | "#ff3265" | "#666665";
- export interface PostIssueTypeParams {
- name: string;
- color: IssueTypeColor;
- }
- export interface PatchIssueTypeParams {
- name?: string;
- color?: IssueTypeColor;
- }
- export interface DeleteIssueTypeParams {
- substituteIssueTypeId: number;
- }
- export interface PostCategoriesParams {
- name: string;
- }
- export interface PatchCategoriesParams {
- name: string;
- }
- export interface PostVersionsParams {
- name: string;
- description: string;
- startDate: string;
- releaseDueDate: string;
- }
- export interface PatchVersionsParams {
- name: string;
- description?: string;
- startDate?: string;
- releaseDueDate?: string;
- archived?: boolean;
- }
- export interface PostCustomFieldParams {
- typeId: FieldType;
- name: string;
- applicableIssueTypes?: number[];
- description?: string;
- required?: boolean;
- }
- export interface PostCustomFieldWithNumericParams extends PostCustomFieldParams {
- min?: number;
- max?: number;
- initialValue?: number;
- unit?: string;
- }
- export interface PostCustomFieldWithDateParams extends PostCustomFieldParams {
- min?: string;
- max?: string;
- initialValueType?: number;
- initialDate?: string;
- initialShift?: number;
- }
- export interface PostCustomFieldWithListParams extends PostCustomFieldParams {
- items?: string[];
- allowInput?: boolean;
- allowAddItem?: boolean;
- }
- export interface PatchCustomFieldParams {
- name?: string;
- applicableIssueTypes?: number[];
- description?: string;
- required?: boolean;
- }
- export interface PatchCustomFieldWithNumericParams extends PatchCustomFieldParams {
- min?: number;
- max?: number;
- initialValue?: number;
- unit?: string;
- }
- export interface PatchCustomFieldWithDateParams extends PatchCustomFieldParams {
- min?: string;
- max?: string;
- initialValueType?: number;
- initialDate?: string;
- initialShift?: number;
- }
- export interface PatchCustomFieldWithListParams extends PatchCustomFieldParams {
- items?: string[];
- allowInput?: boolean;
- allowAddItem?: boolean;
- }
- export interface PostCustomFieldItemParams {
- name: string;
- }
- export interface PatchCustomFieldItemParams {
- name: string;
- }
- export interface GetSharedFilesParams {
- order?: Order;
- offset?: number;
- count?: number;
- }
- export interface PostWebhookParams {
- name?: string;
- description?: string;
- hookUrl?: string;
- allEvent?: boolean;
- activityTypeIds?: number[];
- }
- export interface PatchWebhookParams {
- name?: string;
- description?: string;
- hookUrl?: string;
- allEvent?: boolean;
- activityTypeIds?: number[];
- }
- export enum FieldType {
- Text = 1,
- TextArea = 2,
- Numeric = 3,
- Date = 4,
- SingleList = 5,
- MultipleList = 6,
- CheckBox = 7,
- Radio = 8,
- }
- export interface PostStarParams {
- issueId?: number;
- commentId?: number;
- wikiId?: number;
- pullRequestId?: number;
- pullRequestCommentId?: number;
- }
- }
- export namespace Issue {
- export interface PostIssueParams {
- projectId: number;
- summary: string;
- priorityId: number;
- issueTypeId: number;
- parentIssueId?: number;
- description?: string;
- startDate?: string;
- dueDate?: string;
- estimatedHours?: number;
- actualHours?: number;
- categoryId?: number[];
- versionId?: number[];
- milestoneId?: number[];
- assigneeId?: number;
- notifiedUserId?: number[];
- attachmentId?: number[];
- [customField_: string]: any;
- }
- export interface PatchIssueParams {
- summary?: string;
- parentIssueId?: number;
- description?: string;
- statusId?: number;
- resolutionId?: number;
- startDate?: string;
- dueDate?: string;
- estimatedHours?: number;
- actualHours?: number;
- issueTypeId?: number;
- categoryId?: number[];
- versionId?: number[];
- milestoneId?: number[];
- priorityId?: number;
- assigneeId?: number;
- notifiedUserId?: number[];
- attachmentId?: number[];
- comment?: string;
- [customField_: string]: any;
- }
- export interface GetIssuesParams {
- projectId?: number[];
- issueTypeId?: number[];
- categoryId?: number[];
- versionId?: number[];
- milestoneId?: number[];
- statusId?: number[];
- priorityId?: number[];
- assigneeId?: number[];
- createdUserId?: number[];
- resolutionId?: number[];
- parentChild?: ParentChildType;
- attachment?: boolean;
- sharedFile?: boolean;
- sort?: SortKey;
- order?: Order;
- offset?: number;
- count?: number;
- createdSince?: string;
- createdUntil?: string;
- updatedSince?: string;
- updatedUntil?: string;
- startDateSince?: string;
- startDateUntil?: string;
- dueDateSince?: string;
- dueDateUntil?: string;
- id?: number[];
- parentIssueId?: number[];
- keyword: string;
- [customField_: string]: any;
- }
- export enum ParentChildType {
- All = 0,
- NotChild = 1,
- Child = 2,
- NotChildNotParent = 3,
- Parent = 4,
- }
- export type SortKey = "issueType" | "category" | "version" | "milestone" | "summary" | "status" | "priority" | "attachment" | "sharedFile" | "created" | "createdUser" | "updated" | "updatedUser" | "assignee" | "startDate" | "dueDate" | "estimatedHours" | "actualHours" | "childIssue";
- export interface GetIssueCommentsParams {
- minId?: number;
- maxId?: number;
- count?: number;
- order?: Order;
- }
- export interface PostIssueCommentsParams {
- content: string;
- notifiedUserId?: number[];
- attachmentId?: number[];
- }
- export interface PatchIssueCommentParams {
- content: string;
- }
- export interface IssueCommentNotifications {
- notifiedUserId: number[];
- }
- export interface LinkIssueSharedFilesParams {
- fileId: number[];
- }
- }
- export namespace PullRequest {
- export interface GetPullRequestsParams {
- statusId?: number[];
- assigneeId?: number[];
- issueId?: number[];
- createdUserId?: number[];
- offset?: number;
- count?: number;
- }
- export interface PostPullRequestParams {
- summary: string;
- description: string;
- base: string;
- branch: string;
- issueId?: number;
- assigneeId?: number;
- notifiedUserId?: number[];
- attachmentId?: number[];
- }
- export interface PatchPullRequestParams {
- summary?: string;
- description?: string;
- issueId?: number;
- assigneeId?: number;
- notifiedUserId?: number[];
- comment?: string[];
- }
- export interface GetPullRequestCommentsParams {
- minId?: number;
- maxId?: number;
- count?: number;
- order?: Order;
- }
- export interface PostPullRequestCommentsParams {
- content: string;
- notifiedUserId?: number[];
- }
- export interface PatchPullRequestCommentsParams {
- content: string;
- }
- }
- export namespace Wiki {
- export interface PostWikiParams {
- projectId: number;
- name: string;
- content: string;
- mailNotify?: boolean;
- }
- export interface PatchWikiParams {
- name?: string;
- content?: string;
- mailNotify?: boolean;
- }
- export interface GetWikisHistoryParams {
- minId?: number;
- maxId?: number;
- count?: number;
- order?: Order;
- }
- }
- export namespace OAuth2 {
- export interface Credentials {
- clientId: string;
- clientSecret: string;
- }
- }
- }
-
- export namespace Error {
- export class BacklogError extends global.Error {
- private _name;
- private _url;
- private _status;
- private _body;
- private _response;
- constructor(name: BacklogErrorNameType, response: IResponse, body?: {
- errors: BacklogErrorMessage[];
- });
- name: BacklogErrorNameType;
- url: string;
- status: number;
- body: {
- errors: BacklogErrorMessage[];
- };
- response: IResponse;
- }
- export class BacklogApiError extends BacklogError {
- constructor(response: IResponse, body?: {
- errors: BacklogErrorMessage[];
- });
- }
- export class BacklogAuthError extends BacklogError {
- constructor(response: IResponse, body?: {
- errors: BacklogErrorMessage[];
- });
- }
- export class UnexpectedError extends BacklogError {
- constructor(response: IResponse);
- }
- export interface BacklogErrorMessage {
- message: string;
- code: number;
- errorInfo: string;
- moreInfo: string;
- }
- export type BacklogErrorNameType = 'BacklogApiError' | 'BacklogAuthError' | 'UnexpectedError';
- }
-
-}
diff --git a/backlog-js/index.d.ts b/backlog-js/index.d.ts
new file mode 100644
index 0000000000..b15602f958
--- /dev/null
+++ b/backlog-js/index.d.ts
@@ -0,0 +1,690 @@
+// Type definitions for backlog-js 0.9.0
+// Project: https://github.com/nulab/backlog-js
+// Definitions by: Yuichi Watanabe
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+///
+///
+
+declare class Request {
+ private configure;
+ constructor(configure: {
+ host: string;
+ apiKey?: string;
+ accessToken?: string;
+ timeout?: number;
+ });
+ get(path: string, params?: any): Promise;
+ post(path: string, params?: any): Promise;
+ put(path: string, params: any): Promise;
+ patch(path: string, params: any): Promise;
+ delete(path: string, params?: any): Promise;
+ request(options: {
+ method: string;
+ path: string;
+ params?: Params | FormData;
+ }): Promise;
+ checkStatus(response: IResponse): Promise;
+ parseJSON(response: IResponse): Promise;
+ private toFormData(params);
+ private toQueryString(params);
+ webAppBaseURL: string;
+ restBaseURL: string;
+}
+
+type Params = {
+ [index: string]: number | string | number[] | string[];
+};
+
+export class Backlog extends Request {
+ constructor(configure: {
+ host: string;
+ apiKey?: string;
+ accessToken?: string;
+ timeout?: number;
+ });
+ getSpace(): Promise;
+ getSpaceActivities(params: Option.Space.GetActivitiesParams): Promise;
+ getSpaceNotification(): Promise;
+ putSpaceNotification(params: Option.Space.PutSpaceNotificationParams): Promise;
+ getSpaceDiskUsage(): Promise;
+ getSpaceIcon(): Promise;
+ postSpaceAttachment(form: FormData): Promise;
+ getUsers(): Promise;
+ getUser(userId: number): Promise;
+ postUser(params: Option.User.PostUserParams): Promise;
+ patchUser(userId: number, params: Option.User.PatchUserParams): Promise;
+ deleteUser(userId: number): Promise;
+ getMyself(): Promise;
+ getUserActivities(userId: number, params: Option.User.GetUserActivitiesParams): Promise;
+ getUserStars(userId: number, params: Option.User.GetUserStarsParams): Promise;
+ getUserStarsCount(userId: number, params: Option.User.GetUserStarsCountParams): Promise;
+ getRecentlyViewedIssues(params: Option.User.GetRecentlyViewedParams): Promise;
+ getRecentlyViewedProjects(params: Option.User.GetRecentlyViewedParams): Promise;
+ getRecentlyViewedWikis(params: Option.User.GetRecentlyViewedParams): Promise;
+ getUserIcon(userId: number): Promise;
+ getGroups(params: Option.Group.GetGroupsParams): Promise;
+ postGroups(params: Option.Group.PostGroupsParams): Promise;
+ getGroup(groupId: number): Promise;
+ patchGroup(groupId: number, params: Option.Group.PatchGroupParams): Promise;
+ deleteGroup(groupId: number): Promise;
+ getStatuses(): Promise;
+ getResolutions(): Promise;
+ getPriorities(): Promise;
+ postProject(params: Option.Project.PostProjectParams): Promise;
+ getProjects(params?: Option.Project.GetProjectsParams): Promise;
+ getProject(projectIdOrKey: string): Promise;
+ patchProject(projectIdOrKey: string, params: Option.Project.PatchProjectParams): Promise;
+ deleteProject(projectIdOrKey: string): Promise;
+ getProjectActivities(projectIdOrKey: string, params: Option.Space.GetActivitiesParams): Promise;
+ getProjectUsers(projectIdOrKey: string): Promise;
+ deleteProjectUsers(projectIdOrKey: string, params: Option.Project.DeleteProjectUsersParams): Promise;
+ postProjectAdministrators(projectIdOrKey: string, params: Option.Project.PostProjectAdministrators): Promise;
+ getProjectAdministrators(projectIdOrKey: string): Promise;
+ deleteProjectAdministrators(projectIdOrKey: string, params: Option.Project.DeleteProjectAdministrators): Promise;
+ getIssueTypes(projectIdOrKey: string): Promise;
+ postIssueType(projectIdOrKey: string, params: Option.Project.PostIssueTypeParams): Promise;
+ patchIssueType(projectIdOrKey: string, id: number, params: Option.Project.PatchIssueTypeParams): Promise;
+ deleteIssueType(projectIdOrKey: string, id: number, params: Option.Project.DeleteIssueTypeParams): Promise;
+ getCategories(projectIdOrKey: string): Promise;
+ postCategories(projectIdOrKey: string, params: Option.Project.PostCategoriesParams): Promise;
+ patchCategories(projectIdOrKey: string, id: number, params: Option.Project.PatchCategoriesParams): Promise;
+ deleteCategories(projectIdOrKey: string, id: number): Promise;
+ getVersions(projectIdOrKey: string): Promise;
+ postVersions(projectIdOrKey: string, params: Option.Project.PostVersionsParams): Promise;
+ patchVersions(projectIdOrKey: string, id: number, params: Option.Project.PatchVersionsParams): Promise;
+ deleteVersions(projectIdOrKey: string, id: number): Promise;
+ getCustomFields(projectIdOrKey: string): Promise;
+ postCustomField(projectIdOrKey: string, params: Option.Project.PostCustomFieldParams | Option.Project.PostCustomFieldWithNumericParams | Option.Project.PostCustomFieldWithDateParams | Option.Project.PostCustomFieldWithListParams): Promise;
+ patchCustomField(projectIdOrKey: string, id: number, params: Option.Project.PatchCustomFieldParams | Option.Project.PatchCustomFieldWithNumericParams | Option.Project.PatchCustomFieldWithDateParams | Option.Project.PatchCustomFieldWithListParams): Promise;
+ deleteCustomField(projectIdOrKey: string, id: number): Promise;
+ postCustomFieldItem(projectIdOrKey: string, id: number, params: Option.Project.PostCustomFieldItemParams): Promise;
+ patchCustomFieldItem(projectIdOrKey: string, id: number, itemId: number, params: Option.Project.PatchCustomFieldItemParams): Promise;
+ deleteCustomFieldItem(projectIdOrKey: string, id: number, params: Option.Project.PostCustomFieldItemParams): Promise;
+ getSharedFiles(projectIdOrKey: string, path: string, params: Option.Project.GetSharedFilesParams): Promise;
+ getProjectsDiskUsage(projectIdOrKey: string): Promise;
+ getWebhooks(projectIdOrKey: string): Promise;
+ postWebhook(projectIdOrKey: string, params: Option.Project.PostWebhookParams): Promise;
+ getWebhook(projectIdOrKey: string, webhookId: string): Promise;
+ patchWebhook(projectIdOrKey: string, webhookId: string, params: Option.Project.PatchWebhookParams): Promise;
+ deleteWebhook(projectIdOrKey: string, webhookId: string): Promise;
+ postIssue(params: Option.Issue.PostIssueParams): Promise;
+ patchIssue(issueIdOrKey: string, params: Option.Issue.PatchIssueParams): Promise;
+ getIssues(params?: Option.Issue.GetIssuesParams): Promise;
+ getIssue(issueIdOrKey: string): Promise;
+ getIssuesCount(params?: Option.Issue.GetIssuesParams): Promise;
+ deleteIssuesCount(issueIdOrKey: string): Promise;
+ getIssueComments(issueIdOrKey: string, params: Option.Issue.GetIssueCommentsParams): Promise