@run402/sdk 2.43.0 → 2.44.0
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/README.md +1 -1
- package/dist/errors.d.ts +8 -8
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +6 -6
- package/dist/errors.js.map +1 -1
- package/dist/namespaces/admin.d.ts +15 -16
- package/dist/namespaces/admin.d.ts.map +1 -1
- package/dist/namespaces/admin.js +14 -15
- package/dist/namespaces/admin.js.map +1 -1
- package/dist/namespaces/billing.d.ts +47 -53
- package/dist/namespaces/billing.d.ts.map +1 -1
- package/dist/namespaces/billing.js +59 -59
- package/dist/namespaces/billing.js.map +1 -1
- package/dist/namespaces/operator.d.ts +3 -3
- package/dist/namespaces/operator.d.ts.map +1 -1
- package/dist/namespaces/operator.js +1 -1
- package/dist/namespaces/org.types.d.ts +2 -2
- package/dist/namespaces/org.types.js +1 -1
- package/dist/namespaces/projects.d.ts +2 -2
- package/dist/namespaces/projects.js +2 -2
- package/dist/namespaces/projects.types.d.ts +15 -15
- package/dist/namespaces/projects.types.d.ts.map +1 -1
- package/dist/namespaces/tier.d.ts +11 -11
- package/dist/namespaces/tier.d.ts.map +1 -1
- package/dist/namespaces/transfers.d.ts +8 -8
- package/dist/namespaces/transfers.d.ts.map +1 -1
- package/dist/namespaces/transfers.js +3 -3
- package/dist/namespaces/transfers.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `billing` namespace —
|
|
2
|
+
* `billing` namespace — organizations and Stripe checkouts.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Organizations are addressed by their canonical `organization_id` (UUID). A
|
|
5
5
|
* wallet or email is resolved to that id through the
|
|
6
|
-
* `GET /
|
|
7
|
-
* accept any of the three identifier forms and resolve internally.
|
|
8
|
-
* reads require SIWX from a wallet linked to the
|
|
6
|
+
* `GET /orgs/v1/lookup?wallet=|?email=` lookup; `getOrganization` / `history`
|
|
7
|
+
* accept any of the three identifier forms and resolve internally. Organization
|
|
8
|
+
* reads require SIWX from a wallet linked to the organization (or matching the
|
|
9
9
|
* looked-up `?wallet`), or an admin key; email lookups are admin-only.
|
|
10
10
|
* Mutations such as link-wallet / auto-recharge require SIWX (or admin);
|
|
11
11
|
* checkout-creation endpoints remain unauthenticated by design.
|
|
@@ -15,14 +15,14 @@ import { assertEmailAddress, assertEvmAddress, assertNonEmptyString, assertPosit
|
|
|
15
15
|
const BILLING_TIERS = ["prototype", "hobby", "team"];
|
|
16
16
|
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
17
17
|
/**
|
|
18
|
-
* Classify a billing identifier as a canonical
|
|
19
|
-
* wallet address, or an email. Wallets are lowercased;
|
|
18
|
+
* Classify a billing identifier as a canonical organization id (UUID), an EVM
|
|
19
|
+
* wallet address, or an email. Wallets are lowercased; organization ids and emails
|
|
20
20
|
* are returned verbatim. Throws {@link LocalError} for anything else.
|
|
21
21
|
*/
|
|
22
22
|
function classifyBillingIdentifier(identifier, context) {
|
|
23
23
|
assertNonEmptyString(identifier, "identifier", context);
|
|
24
24
|
if (UUID_RE.test(identifier)) {
|
|
25
|
-
return { kind: "
|
|
25
|
+
return { kind: "organization_id", value: identifier };
|
|
26
26
|
}
|
|
27
27
|
if (/^0x/i.test(identifier)) {
|
|
28
28
|
assertEvmAddress(identifier, "identifier", context);
|
|
@@ -31,28 +31,28 @@ function classifyBillingIdentifier(identifier, context) {
|
|
|
31
31
|
assertEmailAddress(identifier, "identifier", context);
|
|
32
32
|
return { kind: "email", value: identifier };
|
|
33
33
|
}
|
|
34
|
-
/** Read
|
|
35
|
-
function
|
|
36
|
-
return client.request(`/
|
|
34
|
+
/** Read organization billing detail by canonical id: `GET /orgs/v1/:org_id/billing`. */
|
|
35
|
+
function fetchOrganizationById(client, organizationId, context) {
|
|
36
|
+
return client.request(`/orgs/v1/${encodeURIComponent(organizationId)}/billing`, { context });
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* Resolve a wallet / email to its
|
|
40
|
-
* `GET /
|
|
41
|
-
* detail shape as the by-id read, including the resolved `
|
|
39
|
+
* Resolve a wallet / email to its organization detail via the lookup endpoint
|
|
40
|
+
* `GET /orgs/v1/lookup?wallet=|?email=`. The lookup returns the same
|
|
41
|
+
* detail shape as the by-id read, including the resolved `organization_id`.
|
|
42
42
|
*/
|
|
43
|
-
function
|
|
44
|
-
return client.request(`/
|
|
43
|
+
function fetchOrganizationByLookup(client, kind, value, context) {
|
|
44
|
+
return client.request(`/orgs/v1/lookup?${kind}=${encodeURIComponent(value)}`, { context });
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Resolve any identifier form (
|
|
48
|
-
* detail.
|
|
47
|
+
* Resolve any identifier form (organization id / wallet / email) to the organization
|
|
48
|
+
* detail. Organization ids hit the canonical by-id read; wallet/email go through
|
|
49
49
|
* the `?wallet=`/`?email=` lookup. All paths send SIWX via the kernel default.
|
|
50
50
|
*/
|
|
51
|
-
async function
|
|
51
|
+
async function resolveOrganizationDetail(client, identifier, context) {
|
|
52
52
|
const id = classifyBillingIdentifier(identifier, context);
|
|
53
|
-
return id.kind === "
|
|
54
|
-
?
|
|
55
|
-
:
|
|
53
|
+
return id.kind === "organization_id"
|
|
54
|
+
? fetchOrganizationById(client, id.value, context)
|
|
55
|
+
: fetchOrganizationByLookup(client, id.kind, id.value, context);
|
|
56
56
|
}
|
|
57
57
|
function assertNonNegativeSafeInteger(value, name, context) {
|
|
58
58
|
if (!Number.isSafeInteger(value) || value < 0) {
|
|
@@ -91,53 +91,53 @@ export class Billing {
|
|
|
91
91
|
constructor(client) {
|
|
92
92
|
this.client = client;
|
|
93
93
|
this.balance = this.checkBalance.bind(this);
|
|
94
|
-
this.createEmail = this.
|
|
94
|
+
this.createEmail = this.createEmailOrganization.bind(this);
|
|
95
95
|
this.autoRecharge = this.setAutoRecharge.bind(this);
|
|
96
96
|
}
|
|
97
|
-
/** Check a
|
|
97
|
+
/** Check a organization by organization id (UUID), wallet, or email. */
|
|
98
98
|
async checkBalance(identifier) {
|
|
99
|
-
return this.
|
|
99
|
+
return this.getOrganization(identifier);
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
|
-
* Read a
|
|
103
|
-
* or email. An
|
|
102
|
+
* Read a organization's financial detail by organization id (UUID), wallet,
|
|
103
|
+
* or email. An organization id reads `GET /orgs/v1/:org_id/billing`
|
|
104
104
|
* directly; a wallet/email is resolved through the
|
|
105
|
-
* `GET /
|
|
106
|
-
* wallet linked to the
|
|
105
|
+
* `GET /orgs/v1/lookup?wallet=|?email=` lookup. Requires SIWX from a
|
|
106
|
+
* wallet linked to the organization (or matching the looked-up `?wallet`), or an
|
|
107
107
|
* admin key; email lookups are admin-only.
|
|
108
108
|
*/
|
|
109
|
-
async
|
|
110
|
-
return
|
|
109
|
+
async getOrganization(identifier) {
|
|
110
|
+
return resolveOrganizationDetail(this.client, identifier, "checking balance");
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
|
-
* Resolve a wallet or email to its
|
|
114
|
-
* canonical `
|
|
115
|
-
* An
|
|
113
|
+
* Resolve a wallet or email to its organization detail — including the
|
|
114
|
+
* canonical `organization_id` — via `GET /orgs/v1/lookup?wallet=|?email=`.
|
|
115
|
+
* An org-id (UUID) argument is read directly instead. SIWX must match the
|
|
116
116
|
* `?wallet`; email lookups are admin-only.
|
|
117
117
|
*/
|
|
118
|
-
async
|
|
119
|
-
return
|
|
118
|
+
async lookupOrganization(identifier) {
|
|
119
|
+
return resolveOrganizationDetail(this.client, identifier, "looking up organization");
|
|
120
120
|
}
|
|
121
|
-
/** Fetch billing history by
|
|
121
|
+
/** Fetch billing history by organization id (UUID), wallet, or email. */
|
|
122
122
|
async history(identifier, limit) {
|
|
123
123
|
return this.getHistory(identifier, limit);
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
|
-
* Fetch ledger history for a
|
|
127
|
-
* (UUID): a wallet/email identifier is first resolved to its
|
|
128
|
-
* lookup, then `GET /
|
|
129
|
-
* Requires SIWX from a wallet linked to the
|
|
126
|
+
* Fetch ledger history for a organization. History is keyed by organization id
|
|
127
|
+
* (UUID): a wallet/email identifier is first resolved to its organization via the
|
|
128
|
+
* lookup, then `GET /orgs/v1/:org_id/billing/history` is read.
|
|
129
|
+
* Requires SIWX from a wallet linked to the organization, or an admin key.
|
|
130
130
|
*/
|
|
131
131
|
async getHistory(identifier, limit) {
|
|
132
132
|
if (limit !== undefined) {
|
|
133
133
|
assertPositiveSafeInteger(limit, "limit", "fetching billing history");
|
|
134
134
|
}
|
|
135
135
|
const id = classifyBillingIdentifier(identifier, "fetching billing history");
|
|
136
|
-
const
|
|
136
|
+
const organizationId = id.kind === "organization_id"
|
|
137
137
|
? id.value
|
|
138
|
-
: (await
|
|
139
|
-
.
|
|
140
|
-
const base = `/
|
|
138
|
+
: (await fetchOrganizationByLookup(this.client, id.kind, id.value, "fetching billing history"))
|
|
139
|
+
.organization_id;
|
|
140
|
+
const base = `/orgs/v1/${encodeURIComponent(organizationId)}/billing/history`;
|
|
141
141
|
const path = limit !== undefined
|
|
142
142
|
? `${base}?limit=${encodeURIComponent(String(limit))}`
|
|
143
143
|
: base;
|
|
@@ -156,30 +156,30 @@ export class Billing {
|
|
|
156
156
|
withAuth: false,
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
/** Create an email-only (no-wallet)
|
|
160
|
-
async
|
|
161
|
-
assertEmailAddress(email, "email", "creating email
|
|
162
|
-
return this.client.request("/
|
|
159
|
+
/** Create an email-only (no-wallet) organization. Sends a verification email. */
|
|
160
|
+
async createEmailOrganization(email) {
|
|
161
|
+
assertEmailAddress(email, "email", "creating email organization");
|
|
162
|
+
return this.client.request("/orgs/v1/email", {
|
|
163
163
|
method: "POST",
|
|
164
164
|
body: { email },
|
|
165
|
-
context: "creating email
|
|
165
|
+
context: "creating email organization",
|
|
166
166
|
withAuth: false,
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
/**
|
|
170
|
-
* Link a wallet to an existing email
|
|
171
|
-
* Stripe + x402 payments. `
|
|
172
|
-
* `
|
|
173
|
-
* `
|
|
174
|
-
* `POST /
|
|
170
|
+
* Link a wallet to an existing email organization to enable hybrid
|
|
171
|
+
* Stripe + x402 payments. `organizationId` is the canonical
|
|
172
|
+
* `organization_id` (UUID) returned by `createEmailOrganization` /
|
|
173
|
+
* `lookupOrganization`; the gateway addresses the route as
|
|
174
|
+
* `POST /orgs/v1/:org_id/wallets`. Returns the gateway
|
|
175
175
|
* response; v1.46+ gateways include a {@link LinkWalletPoolImplications}
|
|
176
176
|
* block describing the freshly-shared pool's tier, current usage, and limits
|
|
177
177
|
* so callers can warn before the merge pushes usage `over_limit`.
|
|
178
178
|
*/
|
|
179
|
-
async linkWallet(
|
|
180
|
-
assertNonEmptyString(
|
|
179
|
+
async linkWallet(organizationId, wallet) {
|
|
180
|
+
assertNonEmptyString(organizationId, "organizationId", "linking wallet");
|
|
181
181
|
assertEvmAddress(wallet, "wallet", "linking wallet");
|
|
182
|
-
return this.client.request(`/
|
|
182
|
+
return this.client.request(`/orgs/v1/${encodeURIComponent(organizationId)}/wallets`, {
|
|
183
183
|
method: "POST",
|
|
184
184
|
body: { wallet: wallet.toLowerCase() },
|
|
185
185
|
context: "linking wallet",
|
|
@@ -209,7 +209,7 @@ export class Billing {
|
|
|
209
209
|
/** Enable/disable email-pack auto-recharge. */
|
|
210
210
|
async setAutoRecharge(opts) {
|
|
211
211
|
const body = {
|
|
212
|
-
|
|
212
|
+
organization_id: opts.organizationId,
|
|
213
213
|
enabled: opts.enabled,
|
|
214
214
|
};
|
|
215
215
|
if (opts.threshold !== undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/namespaces/billing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;A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,EAAE,CAAC;YACjC,4BAA4B,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,uBAAuB,CAAC,CAAC;YACnF,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAClC,CAAC;QAED,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAU,uCAAuC,EAAE;YAC1E,MAAM,EAAE,MAAM;YACd,IAAI;YACJ,OAAO,EAAE,uBAAuB;SACjC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -57,7 +57,7 @@ export type DevicePollResult = {
|
|
|
57
57
|
kind: "expired_token";
|
|
58
58
|
};
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Organization overview. Forward-compatible: the gateway owns the exact shape and
|
|
61
61
|
* may add fields, so unknown keys are preserved via the index signature.
|
|
62
62
|
* `scope.kind` is `"email"` for the operator-session (email-union) and
|
|
63
63
|
* `"wallet"` for a SIWX slice.
|
|
@@ -68,7 +68,7 @@ export interface OperatorOverview {
|
|
|
68
68
|
principal?: string;
|
|
69
69
|
};
|
|
70
70
|
rollup?: Record<string, unknown>;
|
|
71
|
-
|
|
71
|
+
organizations?: unknown[];
|
|
72
72
|
wallets?: unknown[];
|
|
73
73
|
advisories?: unknown[];
|
|
74
74
|
[key: string]: unknown;
|
|
@@ -243,7 +243,7 @@ export declare class Operator {
|
|
|
243
243
|
*/
|
|
244
244
|
devicePoll(deviceCode: string): Promise<DevicePollResult>;
|
|
245
245
|
/**
|
|
246
|
-
* Fetch the
|
|
246
|
+
* Fetch the organization overview. With `opts.token` the request carries the
|
|
247
247
|
* operator-session bearer and returns the email-union; without it the request
|
|
248
248
|
* falls back to the credential provider's default auth (SIWX) and returns
|
|
249
249
|
* that wallet's slice. The CLI always passes a token (human-only surface); the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../src/namespaces/operator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;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G,SAAS,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,CAAC;IAYpE;;;;;;OAMG;IACG,MAAM,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC;CAiB5D;AAED,qBAAa,QAAQ;IAkBP,OAAO,CAAC,QAAQ,CAAC,MAAM;IAjBnC;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAElC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;gBAEX,MAAM,EAAE,MAAM;IAK3C;;;;OAIG;IACG,WAAW,CAAC,IAAI,GAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,eAAe,CAAC;IAS/E;;;;;OAKG;IACG,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAgC/D;;;;;;OAMG;IACG,QAAQ,CAAC,IAAI,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAaxE;;;;OAIG;IACG,MAAM,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBpD;;;;OAIG;IACH,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM;IAWxD;;;;OAIG;IACG,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAa/E"}
|
|
@@ -142,7 +142,7 @@ export class Operator {
|
|
|
142
142
|
throw new ApiError(`Unexpected operator device-token response (HTTP ${res.status})`, res.status, body, "polling operator device token");
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
|
-
* Fetch the
|
|
145
|
+
* Fetch the organization overview. With `opts.token` the request carries the
|
|
146
146
|
* operator-session bearer and returns the email-union; without it the request
|
|
147
147
|
* falls back to the credential provider's default auth (SIWX) and returns
|
|
148
148
|
* that wallet's slice. The CLI always passes a token (human-only surface); the
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* membership in the role lattice below, or a per-project grant. These shapes map
|
|
6
6
|
* to `/agent/v1/whoami` and `/orgs/v1*`.
|
|
7
7
|
*
|
|
8
|
-
* Public vocabulary is `org` / `org_id` (v1.82): the internal `
|
|
8
|
+
* Public vocabulary is `org` / `org_id` (v1.82): the internal `organization`
|
|
9
9
|
* substrate never appears on the wire.
|
|
10
10
|
*/
|
|
11
11
|
/** Org role lattice: `owner > admin > developer > billing > viewer`. */
|
|
@@ -37,7 +37,7 @@ export interface Principal {
|
|
|
37
37
|
* `"revoked"` do not). Returned by {@link Orgs.whoami} and {@link Orgs.list}.
|
|
38
38
|
*
|
|
39
39
|
* v1.82: carries `org_id` + `display_name` (the public vocabulary), replacing
|
|
40
|
-
* the pre-v1.82 `
|
|
40
|
+
* the pre-v1.82 `organization_id`.
|
|
41
41
|
*/
|
|
42
42
|
export interface OrgMembership {
|
|
43
43
|
org_id: string;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* membership in the role lattice below, or a per-project grant. These shapes map
|
|
6
6
|
* to `/agent/v1/whoami` and `/orgs/v1*`.
|
|
7
7
|
*
|
|
8
|
-
* Public vocabulary is `org` / `org_id` (v1.82): the internal `
|
|
8
|
+
* Public vocabulary is `org` / `org_id` (v1.82): the internal `organization`
|
|
9
9
|
* substrate never appears on the wire.
|
|
10
10
|
*/
|
|
11
11
|
export {};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Operator-only project actions live on the {@link Admin} namespace:
|
|
9
9
|
* - `admin.archiveProject` / `admin.reactivateProject` — moderate-archive
|
|
10
|
-
* - `admin.setLeasePerpetual` —
|
|
10
|
+
* - `admin.setLeasePerpetual` — organization-level escape hatch (replaces the
|
|
11
11
|
* v1.56 `projects.pin` removed in v1.57)
|
|
12
12
|
*/
|
|
13
13
|
import type { Client } from "../kernel.js";
|
|
@@ -44,7 +44,7 @@ export declare class Projects {
|
|
|
44
44
|
/**
|
|
45
45
|
* List projects in the named, domain-aware inventory (gateway
|
|
46
46
|
* `project-findability`). Each row carries `name`, `site_url`,
|
|
47
|
-
* `custom_domains`, `
|
|
47
|
+
* `custom_domains`, `organization_id` (the owning org), `status`, and
|
|
48
48
|
* `created_at`.
|
|
49
49
|
*
|
|
50
50
|
* Membership-scoped by default (`GET /projects/v1`): returns every project
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Operator-only project actions live on the {@link Admin} namespace:
|
|
9
9
|
* - `admin.archiveProject` / `admin.reactivateProject` — moderate-archive
|
|
10
|
-
* - `admin.setLeasePerpetual` —
|
|
10
|
+
* - `admin.setLeasePerpetual` — organization-level escape hatch (replaces the
|
|
11
11
|
* v1.56 `projects.pin` removed in v1.57)
|
|
12
12
|
*/
|
|
13
13
|
import { LocalError, ProjectNotFound } from "../errors.js";
|
|
@@ -96,7 +96,7 @@ export class Projects {
|
|
|
96
96
|
/**
|
|
97
97
|
* List projects in the named, domain-aware inventory (gateway
|
|
98
98
|
* `project-findability`). Each row carries `name`, `site_url`,
|
|
99
|
-
* `custom_domains`, `
|
|
99
|
+
* `custom_domains`, `organization_id` (the owning org), `status`, and
|
|
100
100
|
* `created_at`.
|
|
101
101
|
*
|
|
102
102
|
* Membership-scoped by default (`GET /projects/v1`): returns every project
|
|
@@ -18,7 +18,7 @@ export interface ProvisionOptions {
|
|
|
18
18
|
* `developer`+ membership on that org (a project-scoped grant cannot authorize
|
|
19
19
|
* creating a new project). Omit for the cold-start path — the wallet's billing
|
|
20
20
|
* account is used or auto-created exactly as before. Note: tier is governed by
|
|
21
|
-
* the org/
|
|
21
|
+
* the org/organization, not the project — the gateway ignores a client tier.
|
|
22
22
|
*/
|
|
23
23
|
orgId?: string;
|
|
24
24
|
}
|
|
@@ -29,18 +29,18 @@ export interface ProvisionResult {
|
|
|
29
29
|
schema_slot: string;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* Lifecycle state of the owning
|
|
33
|
-
* machine moved from `internal.projects` to `internal.
|
|
32
|
+
* Lifecycle state of the owning organization (gateway v1.57+). The state
|
|
33
|
+
* machine moved from `internal.projects` to `internal.organizations`; every
|
|
34
34
|
* project on the account inherits the same value. `purging` is an internal
|
|
35
35
|
* transition state and is not exposed on the wire.
|
|
36
36
|
*/
|
|
37
|
-
export type
|
|
37
|
+
export type OrganizationLifecycleState = "active" | "past_due" | "frozen" | "dormant" | "purged";
|
|
38
38
|
/**
|
|
39
|
-
* Effective project status, derived from `(
|
|
39
|
+
* Effective project status, derived from `(organization_lifecycle_state,
|
|
40
40
|
* deleted_at, archived_at)`:
|
|
41
41
|
* - `deleted_at` set → `"deleted"`
|
|
42
42
|
* - `archived_at` set → `"archived"`
|
|
43
|
-
* - otherwise → the
|
|
43
|
+
* - otherwise → the organization's `lifecycle_state`
|
|
44
44
|
*
|
|
45
45
|
* Use this for serving / UX decisions instead of trying to combine the
|
|
46
46
|
* underlying fields yourself.
|
|
@@ -52,7 +52,7 @@ export type EffectiveProjectStatus = "active" | "past_due" | "frozen" | "dormant
|
|
|
52
52
|
* and `GET /agent/v1/operator/projects` (operator email-union, `--all`) — both
|
|
53
53
|
* share this shape.
|
|
54
54
|
*
|
|
55
|
-
* Tier and lifecycle live on the owning
|
|
55
|
+
* Tier and lifecycle live on the owning organization, not the project; the
|
|
56
56
|
* row mirrors them for convenience but read `r.tier.status()` for the
|
|
57
57
|
* authoritative account view.
|
|
58
58
|
*/
|
|
@@ -76,20 +76,20 @@ export interface ProjectSummary {
|
|
|
76
76
|
status?: EffectiveProjectStatus;
|
|
77
77
|
/** Alias of `status` (gateway v1.57 canonical field). */
|
|
78
78
|
effective_status?: EffectiveProjectStatus;
|
|
79
|
-
/** Owning
|
|
80
|
-
|
|
79
|
+
/** Owning organization's lifecycle state. */
|
|
80
|
+
organization_lifecycle_state?: OrganizationLifecycleState;
|
|
81
81
|
/** Account-level lease-perpetual escape hatch (mirror). */
|
|
82
82
|
lease_perpetual?: boolean;
|
|
83
83
|
/**
|
|
84
|
-
* Owning org (
|
|
84
|
+
* Owning org (organization) id — v1.77 org-owned control plane. A wallet
|
|
85
85
|
* authenticates; the org owns the project. Surfaced as `org_id` in CLI/MCP
|
|
86
86
|
* output. `null` for legacy rows; optional because the legacy wallet-scoped
|
|
87
87
|
* list (`GET /wallets/v1/:address/projects`) omits it.
|
|
88
88
|
*/
|
|
89
|
-
|
|
89
|
+
organization_id?: string | null;
|
|
90
90
|
/**
|
|
91
91
|
* Provisioning principal id — provenance for who created the project (v1.77).
|
|
92
|
-
* Optional for the same reason as {@link ProjectSummary.
|
|
92
|
+
* Optional for the same reason as {@link ProjectSummary.organization_id}.
|
|
93
93
|
*/
|
|
94
94
|
created_by?: string | null;
|
|
95
95
|
created_at: string;
|
|
@@ -113,7 +113,7 @@ export interface ProjectSummary {
|
|
|
113
113
|
*/
|
|
114
114
|
export interface ListProjectsOptions {
|
|
115
115
|
/**
|
|
116
|
-
* Narrow to projects owned by one org (
|
|
116
|
+
* Narrow to projects owned by one org (organization) id. Authorize-before-
|
|
117
117
|
* reveal: a non-member or guessed id returns the same 403 as a real-but-
|
|
118
118
|
* unauthorized org; a non-UUID id is a clean 400.
|
|
119
119
|
*/
|
|
@@ -165,8 +165,8 @@ export interface UsageReport {
|
|
|
165
165
|
lease_expires_at?: string | null;
|
|
166
166
|
/** Derived effective status — see {@link EffectiveProjectStatus}. */
|
|
167
167
|
effective_status: EffectiveProjectStatus;
|
|
168
|
-
/** Owning
|
|
169
|
-
|
|
168
|
+
/** Owning organization's lifecycle state. */
|
|
169
|
+
organization_lifecycle_state: OrganizationLifecycleState;
|
|
170
170
|
}
|
|
171
171
|
export interface ColumnSchema {
|
|
172
172
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.types.d.ts","sourceRoot":"","sources":["../../src/namespaces/projects.types.ts"],"names":[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e,GACf,2BAA2B,GAC3B,+BAA+B,GAC/B,uBAAuB,GACvB,kCAAkC,GAClC,yBAAyB,GACzB,cAAc,CAAC;AAEnB,MAAM,MAAM,gCAAgC,GAAG,OAAO,GAAG,SAAS,CAAC;AAEnE,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,iCAAiC,CAAC;IACxC,QAAQ,EAAE,gCAAgC,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,6BAA6B,EAAE,CAAC;IACxC,QAAQ,EAAE,6BAA6B,EAAE,CAAC;CAC3C;AAID,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAID,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -16,7 +16,7 @@ export interface TierFunctionLimits {
|
|
|
16
16
|
/**
|
|
17
17
|
* Per-project summary returned in `TierStatusResult.projects[]`. Mirrors the
|
|
18
18
|
* gateway's `WalletTierInfo.projects[]` shape. Pre-v1.57 gateways may omit
|
|
19
|
-
* `effective_status` / `
|
|
19
|
+
* `effective_status` / `organization_lifecycle_state` / `lease_perpetual`; pre-v1.59
|
|
20
20
|
* gateways omit `secrets_rotation_advised`. Unknown future fields are preserved
|
|
21
21
|
* via the index signature so callers can branch on them.
|
|
22
22
|
*/
|
|
@@ -28,16 +28,16 @@ export interface TierStatusProject {
|
|
|
28
28
|
pinned: boolean;
|
|
29
29
|
created_at: string;
|
|
30
30
|
effective_status?: string;
|
|
31
|
-
|
|
31
|
+
organization_lifecycle_state?: string;
|
|
32
32
|
lease_perpetual?: boolean;
|
|
33
33
|
/**
|
|
34
|
-
* v1.77 (org-owned control plane): owning org (
|
|
34
|
+
* v1.77 (org-owned control plane): owning org (organization) id and the
|
|
35
35
|
* provisioning principal. A wallet authenticates; the org owns the project.
|
|
36
36
|
* Present on the canonical project object (`GET /projects/v1`); the
|
|
37
37
|
* tier-status list does not include them today, so both are optional and
|
|
38
38
|
* forward-compatible (preserved via the index signature regardless).
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
organization_id?: string;
|
|
41
41
|
created_by?: string;
|
|
42
42
|
/**
|
|
43
43
|
* v1.59 (add-project-transfer): set on a project after an accepted transfer
|
|
@@ -76,14 +76,14 @@ export interface TierStatusResult {
|
|
|
76
76
|
lease_expires_at: string | null;
|
|
77
77
|
active: boolean;
|
|
78
78
|
/**
|
|
79
|
-
* Lifecycle state of the owning
|
|
80
|
-
* wallet has no
|
|
79
|
+
* Lifecycle state of the owning organization. `null` only when the
|
|
80
|
+
* wallet has no organization row (orphan wallet).
|
|
81
81
|
*/
|
|
82
|
-
|
|
82
|
+
organization_lifecycle_state: "active" | "past_due" | "frozen" | "dormant" | "purged" | null;
|
|
83
83
|
/**
|
|
84
|
-
* Operator escape hatch flag on the owning
|
|
85
|
-
* the
|
|
86
|
-
* `null` only for orphan wallets with no
|
|
84
|
+
* Operator escape hatch flag on the owning organization. When `true`,
|
|
85
|
+
* the organization never advances past `active` regardless of lease expiry.
|
|
86
|
+
* `null` only for orphan wallets with no organization row.
|
|
87
87
|
*/
|
|
88
88
|
lease_perpetual: boolean | null;
|
|
89
89
|
pool_usage: {
|
|
@@ -94,7 +94,7 @@ export interface TierStatusResult {
|
|
|
94
94
|
storage_bytes_limit: number;
|
|
95
95
|
};
|
|
96
96
|
/**
|
|
97
|
-
* Per-project summary across all projects on the wallet's
|
|
97
|
+
* Per-project summary across all projects on the wallet's organization.
|
|
98
98
|
* Always present on v1.46+ gateways. Pre-v1.59 entries lack
|
|
99
99
|
* `secrets_rotation_advised`.
|
|
100
100
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tier.d.ts","sourceRoot":"","sources":["../../src/namespaces/tier.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,
|
|
1
|
+
{"version":3,"file":"tier.d.ts","sourceRoot":"","sources":["../../src/namespaces/tier.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,4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M,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAMzC;;;;;OAKG;IACG,GAAG,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC;CAOlD"}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* {@link TransferFreezeError} so agents can guide the user to cancel.
|
|
22
22
|
*/
|
|
23
23
|
import type { Client } from "../kernel.js";
|
|
24
|
-
/** Phase 1A only supports the `migrate` policy — B's wallet must already be on a
|
|
24
|
+
/** Phase 1A only supports the `migrate` policy — B's wallet must already be on a organization, and the project moves into it. */
|
|
25
25
|
export type TransferBillingPolicy = "migrate";
|
|
26
26
|
export type TransferStatus = "pending" | "accepted" | "cancelled" | "expired";
|
|
27
27
|
export type TransferCancelledBy = "from_wallet" | "to_wallet" | "system";
|
|
@@ -59,7 +59,7 @@ export interface AcceptTransferResult {
|
|
|
59
59
|
project_id: string;
|
|
60
60
|
from_wallet: string;
|
|
61
61
|
to_wallet: string;
|
|
62
|
-
|
|
62
|
+
new_organization_id: string | null;
|
|
63
63
|
completed_at: string;
|
|
64
64
|
secrets_rotation_advised: true;
|
|
65
65
|
/** Names of secrets that carried over with the project. Values are never returned. */
|
|
@@ -126,8 +126,8 @@ export interface ContractWalletPreview {
|
|
|
126
126
|
chain: string;
|
|
127
127
|
}
|
|
128
128
|
export interface BillingImplications {
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
from_organization_id: string | null;
|
|
130
|
+
target_organization_id: string | null;
|
|
131
131
|
tier: string | null;
|
|
132
132
|
secrets_count: number;
|
|
133
133
|
functions_count: number;
|
|
@@ -190,13 +190,13 @@ export interface ProjectHandoffPreview {
|
|
|
190
190
|
}
|
|
191
191
|
/** Inputs to {@link Transfers.claimHandoff}. */
|
|
192
192
|
export interface ClaimHandoffInput {
|
|
193
|
-
/** Org (
|
|
194
|
-
|
|
193
|
+
/** Org (organization) to claim into. Omit to claim into a brand-new org. */
|
|
194
|
+
organizationId?: string;
|
|
195
195
|
}
|
|
196
196
|
/** Result of {@link Transfers.claimHandoff}. Forward-compatible. */
|
|
197
197
|
export interface ClaimHandoffResult {
|
|
198
198
|
project_id: string;
|
|
199
|
-
|
|
199
|
+
new_organization_id?: string | null;
|
|
200
200
|
[key: string]: unknown;
|
|
201
201
|
}
|
|
202
202
|
export declare class Transfers {
|
|
@@ -246,7 +246,7 @@ export declare class Transfers {
|
|
|
246
246
|
/** Preview a handoff (sender, or the addressed recipient). */
|
|
247
247
|
previewHandoff(transferId: string): Promise<ProjectHandoffPreview>;
|
|
248
248
|
/**
|
|
249
|
-
* Claim an incoming handoff into an org. Omit `
|
|
249
|
+
* Claim an incoming handoff into an org. Omit `organizationId` to claim
|
|
250
250
|
* into a brand-new org. The claim atomically flips ownership (the handoff
|
|
251
251
|
* analog of {@link Transfers.accept}).
|
|
252
252
|
*/
|