Skip to content

Commit

Permalink
Merge pull request #39 from PagerDuty/v2.0.2
Browse files Browse the repository at this point in the history
Update dependencies and roll v2.0.2
  • Loading branch information
Brett Willemsen authored Nov 25, 2020
2 parents 483fd17 + 72f100b commit 6739b80
Show file tree
Hide file tree
Showing 30 changed files with 848 additions and 6 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
node_modules
build
36 changes: 36 additions & 0 deletions build/src/api.d.ts
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[]>;
128 changes: 128 additions & 0 deletions build/src/api.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build/src/api.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build/src/api.test.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
Loading

0 comments on commit 6739b80

Please sign in to comment.