craterview 0.4.32 → 0.4.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +8 -4
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -18,7 +18,7 @@ import { imageSize } from "image-size";
|
|
|
18
18
|
// Mirrored from package.json, which is the number a release bumps. It cannot be imported
|
|
19
19
|
// from there — this ships as TypeScript, so the import would have to resolve in the
|
|
20
20
|
// consumer's toolchain — so test/version.test.ts asserts the two agree.
|
|
21
|
-
export const VERSION = "0.4.
|
|
21
|
+
export const VERSION = "0.4.35";
|
|
22
22
|
const DEFAULT_BASE_URL = "https://api.craterview.ai";
|
|
23
23
|
// The server rejects a longer wait outright, so asking for one costs a 422 rather than the
|
|
24
24
|
// wait you asked for. `run()` clamps to this rather than letting that happen.
|
|
@@ -1110,8 +1110,12 @@ export class CraterView {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
|
|
1112
1112
|
/**
|
|
1113
|
-
* Mint another key. **The value is in this response and
|
|
1114
|
-
* as hashes, so one that is not written down has to be
|
|
1113
|
+
* Mint another key, named for what will use it. **The value is in this response and
|
|
1114
|
+
* nowhere else** — keys are stored as hashes, so one that is not written down has to be
|
|
1115
|
+
* replaced rather than recovered.
|
|
1116
|
+
*
|
|
1117
|
+
* The name is required: every key on the account is listed by it, with `keys()` and on the
|
|
1118
|
+
* account page, and it is how you tell one from another when you come to revoke one.
|
|
1115
1119
|
*
|
|
1116
1120
|
* Several keys on an account is the ordinary arrangement, one per service or environment.
|
|
1117
1121
|
* They share the account's credits and history. This is also how you rotate without
|
|
@@ -1120,7 +1124,7 @@ export class CraterView {
|
|
|
1120
1124
|
* An account is given a limited number of new keys an hour, whichever of its keys asks:
|
|
1121
1125
|
* past it this throws `RateLimited`, whose `retryAfter` says when to ask again.
|
|
1122
1126
|
*/
|
|
1123
|
-
async createKey(name
|
|
1127
|
+
async createKey(name: string): Promise<NewKey> {
|
|
1124
1128
|
return await this.request("POST", "/v1/keys", { name }) as NewKey;
|
|
1125
1129
|
}
|
|
1126
1130
|
|