-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from PagerDuty/v2.0.2
Update dependencies and roll v2.0.2
- Loading branch information
Showing
30 changed files
with
848 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
node_modules | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { RequestOptions } from './common'; | ||
export interface ShorthandCall { | ||
(res: string, apiParameters?: Partial<APIParameters>): APIPromise; | ||
} | ||
export interface PartialCall { | ||
(apiParameters: APIParameters): APIPromise; | ||
(apiParameters: Partial<APIParameters>): PartialCall; | ||
get: ShorthandCall; | ||
post: ShorthandCall; | ||
put: ShorthandCall; | ||
patch: ShorthandCall; | ||
delete: ShorthandCall; | ||
all: (apiParameters: APIParameters) => Promise<APIResponse[]>; | ||
} | ||
export declare type APIParameters = RequestOptions & { | ||
endpoint?: string; | ||
url?: string; | ||
data?: object; | ||
token?: string; | ||
server?: string; | ||
version?: number; | ||
} & ({ | ||
endpoint: string; | ||
} | { | ||
url: string; | ||
}); | ||
export declare type APIPromise = Promise<APIResponse>; | ||
export interface APIResponse extends Response { | ||
data: any; | ||
resource: any; | ||
response: Response; | ||
next?: () => APIPromise; | ||
} | ||
export declare function api(apiParameters: APIParameters): APIPromise; | ||
export declare function api(apiParameters: Partial<APIParameters>): PartialCall; | ||
export declare function all(apiParameters: APIParameters): Promise<APIResponse[]>; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
Oops, something went wrong.