-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7149d7
commit dbc31a6
Showing
7 changed files
with
96 additions
and
4 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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,41 @@ | ||
/** | ||
* Download token item resource object representing a file download token. | ||
*/ | ||
export class DownloadToken extends ItemResource { | ||
/** | ||
* Constructor | ||
* | ||
* @param {string} url - url of the resource | ||
* @param {Object} auth - authentication object | ||
* @param {string} auth.token - authentication token | ||
*/ | ||
constructor(url: string, auth: { | ||
token: string; | ||
}); | ||
} | ||
/** | ||
* Download token list resource object representing a list of a user's file download tokens. | ||
*/ | ||
export class DownloadTokenList extends ListResource { | ||
/** | ||
* Constructor | ||
* | ||
* @param {string} url - url of the resource | ||
* @param {Object} auth - authentication object | ||
* @param {string} auth.token - authentication token | ||
*/ | ||
constructor(url: string, auth: { | ||
token: string; | ||
}); | ||
/** | ||
* Make a POST request to this download token list resource to create a new file download token | ||
* item resource through the REST API. | ||
* | ||
* @param {number} [timeout=30000] - request timeout | ||
* | ||
* @return {Promise<this>} - JS Promise, resolves to ``this`` object | ||
*/ | ||
post(timeout?: number): Promise<DownloadTokenList>; | ||
} | ||
import { ItemResource } from "./resource"; | ||
import { ListResource } from "./resource"; |
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
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
Large diffs are not rendered by default.
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