@myapihq/sdk 2.27.3 → 2.27.4
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/dist/hq.d.ts +16 -1
- package/dist/hq.js +16 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/hq.d.ts
CHANGED
|
@@ -45,7 +45,22 @@ export interface AccountInfo {
|
|
|
45
45
|
}
|
|
46
46
|
export type GrantAccess = 'read' | 'write';
|
|
47
47
|
export type Grants = Record<string, GrantAccess>;
|
|
48
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Slots a key's grants can name. Mirrors `iam.GrantableSlots` in the backend.
|
|
50
|
+
*
|
|
51
|
+
* A second copy of somebody else's vocabulary, so it drifts: this list was
|
|
52
|
+
* missing `payments`, which the API accepts. The CLI refuses what it cannot
|
|
53
|
+
* name, so `keys create --grant payments:write` failed and the only way to
|
|
54
|
+
* mint a payments key was to omit --grant — an UNRESTRICTED key, which for
|
|
55
|
+
* payments is precisely backwards.
|
|
56
|
+
*
|
|
57
|
+
* Slots absent from BOTH lists — queue, container, task, git, pixel, feedback,
|
|
58
|
+
* auth — cannot be granted at all, so a key that needs them has to be
|
|
59
|
+
* unrestricted. That gap is the backend's and is filed; do not paper over it
|
|
60
|
+
* by adding names here that `iam.GrantableSlots` does not have, because a
|
|
61
|
+
* grant the API rejects is worse than one the CLI refuses.
|
|
62
|
+
*/
|
|
63
|
+
export declare const GRANTABLE_SLOTS: readonly ["domain", "email", "funnel", "storage", "image", "webhook", "workflow", "function", "url", "people", "company", "audience", "llm", "database", "crm", "payments"];
|
|
49
64
|
export type KeyKind = 'account' | 'function' | 'manual';
|
|
50
65
|
export type SpendCapPeriod = 'month' | 'day' | 'none';
|
|
51
66
|
export interface ApiKey {
|
package/dist/hq.js
CHANGED
|
@@ -77,9 +77,25 @@ exports.EXPOSES = [
|
|
|
77
77
|
// The closed grantable-slot vocabulary. Mirrors `iam.GrantableSlots` in the
|
|
78
78
|
// backend — keep in sync. Used to validate `--grant` client-side before the
|
|
79
79
|
// network call. "*" is also valid in a Grants map but is not a slot name.
|
|
80
|
+
/**
|
|
81
|
+
* Slots a key's grants can name. Mirrors `iam.GrantableSlots` in the backend.
|
|
82
|
+
*
|
|
83
|
+
* A second copy of somebody else's vocabulary, so it drifts: this list was
|
|
84
|
+
* missing `payments`, which the API accepts. The CLI refuses what it cannot
|
|
85
|
+
* name, so `keys create --grant payments:write` failed and the only way to
|
|
86
|
+
* mint a payments key was to omit --grant — an UNRESTRICTED key, which for
|
|
87
|
+
* payments is precisely backwards.
|
|
88
|
+
*
|
|
89
|
+
* Slots absent from BOTH lists — queue, container, task, git, pixel, feedback,
|
|
90
|
+
* auth — cannot be granted at all, so a key that needs them has to be
|
|
91
|
+
* unrestricted. That gap is the backend's and is filed; do not paper over it
|
|
92
|
+
* by adding names here that `iam.GrantableSlots` does not have, because a
|
|
93
|
+
* grant the API rejects is worse than one the CLI refuses.
|
|
94
|
+
*/
|
|
80
95
|
exports.GRANTABLE_SLOTS = [
|
|
81
96
|
'domain', 'email', 'funnel', 'storage', 'image', 'webhook', 'workflow',
|
|
82
97
|
'function', 'url', 'people', 'company', 'audience', 'llm', 'database', 'crm',
|
|
98
|
+
'payments',
|
|
83
99
|
];
|
|
84
100
|
async function createAnonymousAccount() {
|
|
85
101
|
return (0, client_1.request)('POST', `${config_1.HQ_BASE}/hq/account/anonymous`, undefined, {});
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.27.
|
|
1
|
+
export declare const SDK_VERSION = "2.27.4";
|
package/dist/version.js
CHANGED
|
@@ -8,4 +8,4 @@ exports.SDK_VERSION = void 0;
|
|
|
8
8
|
// Why a constant and not a package.json read: the SDK runs inside edge
|
|
9
9
|
// functions (Cloudflare Workers), so it must not import node:fs. A literal
|
|
10
10
|
// is the only version source that works in every runtime we ship to.
|
|
11
|
-
exports.SDK_VERSION = '2.27.
|
|
11
|
+
exports.SDK_VERSION = '2.27.4';
|