@parall/daemon 1.84.0 → 1.85.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/bundle/manifest.json +11 -11
- package/bundle/parall-browser-pod.js +173 -110
- package/bundle/parall-claude-agent.js +182 -114
- package/bundle/parall-codex-agent.js +182 -114
- package/bundle/parall-daemon.js +218 -111
- package/package.json +6 -6
package/bundle/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
3
|
-
"built_at": "2026-11-
|
|
2
|
+
"version": "1.85.0",
|
|
3
|
+
"built_at": "2026-11-02T15:17:32.706Z",
|
|
4
4
|
"min_node_version": "20.0.0",
|
|
5
5
|
"files": {
|
|
6
6
|
"bb-browser-daemon.js": {
|
|
@@ -16,29 +16,29 @@
|
|
|
16
16
|
"size": 18
|
|
17
17
|
},
|
|
18
18
|
"parall-browser-pod.js": {
|
|
19
|
-
"sha256": "
|
|
20
|
-
"size":
|
|
19
|
+
"sha256": "55dbbbe785af139f426cd18d6cfa5489d27d433fa4b4c7bb1b8f4d7ed0c86659",
|
|
20
|
+
"size": 3082993
|
|
21
21
|
},
|
|
22
22
|
"parall-channel-exec.js": {
|
|
23
23
|
"sha256": "2500dec2c332cce29aea476d3c048b49dbc43acf8572059bae2cd9dff49750b4",
|
|
24
24
|
"size": 7978
|
|
25
25
|
},
|
|
26
26
|
"parall-claude-agent.js": {
|
|
27
|
-
"sha256": "
|
|
28
|
-
"size":
|
|
27
|
+
"sha256": "9526f1b186f71ec2d9394088438a8c2f39c172d32ac2cde8272904f41032d5f5",
|
|
28
|
+
"size": 3096309
|
|
29
29
|
},
|
|
30
30
|
"parall-codex-agent.js": {
|
|
31
|
-
"sha256": "
|
|
32
|
-
"size":
|
|
31
|
+
"sha256": "1e23480cf008adf6588553e97f08ba068a1423ee10f0b6549722e0161dc7c1f9",
|
|
32
|
+
"size": 3108010
|
|
33
33
|
},
|
|
34
34
|
"parall-daemon.js": {
|
|
35
|
-
"sha256": "
|
|
36
|
-
"size":
|
|
35
|
+
"sha256": "6988492d830f5a9ee54f64c44f0134e4b3835ff7b45693a4c004303802121743",
|
|
36
|
+
"size": 3275246
|
|
37
37
|
},
|
|
38
38
|
"parall-openclaw-agent.js": {
|
|
39
39
|
"sha256": "856a1c3a9ae0ffef8efe2481fa1171dbeb1d67cccb88616aa9bf16da96a69355",
|
|
40
40
|
"size": 9923
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
"signature": "
|
|
43
|
+
"signature": "mMnoqcEP9rcIZ9qzcnpjyoiRjiyrpgNokYNVm3fc0WyDQ+og7tUhHWfOPpd2v08ReDQirH0yYiBI+fOnUcSDBA=="
|
|
44
44
|
}
|
|
@@ -64351,6 +64351,41 @@ function wechatEndpoints(apiBase) {
|
|
|
64351
64351
|
};
|
|
64352
64352
|
}
|
|
64353
64353
|
|
|
64354
|
+
// ts/sdk/dist/billing-endpoints.js
|
|
64355
|
+
function billingEndpoints(apiBase) {
|
|
64356
|
+
const billingBase = (orgId, accountId) => accountId ? `${apiBase}/orgs/${orgId}/billing/accounts/${accountId}` : `${apiBase}/orgs/${orgId}/billing`;
|
|
64357
|
+
return {
|
|
64358
|
+
// Billing & Credits (org-scoped). An account's endpoints live under
|
|
64359
|
+
// /billing/accounts/{accountId}; without an accountId they are the org's
|
|
64360
|
+
// own account's /billing routes.
|
|
64361
|
+
BILLING: (orgId, accountId) => billingBase(orgId, accountId),
|
|
64362
|
+
BILLING_TRANSACTIONS: (orgId, accountId) => `${billingBase(orgId, accountId)}/transactions`,
|
|
64363
|
+
BILLING_CHECKOUT: (orgId, accountId) => `${billingBase(orgId, accountId)}/checkout`,
|
|
64364
|
+
BILLING_AUTO_RELOAD: (orgId, accountId) => `${billingBase(orgId, accountId)}/auto-reload`,
|
|
64365
|
+
BILLING_SETUP_INTENT: (orgId, accountId) => `${billingBase(orgId, accountId)}/setup-intent`,
|
|
64366
|
+
BILLING_PORTAL_SESSION: (orgId, accountId) => `${billingBase(orgId, accountId)}/portal-session`,
|
|
64367
|
+
BILLING_USAGE_DAILY: (orgId, accountId) => `${billingBase(orgId, accountId)}/usage-daily`,
|
|
64368
|
+
BILLING_USAGE_HEATMAP: (orgId, accountId) => `${billingBase(orgId, accountId)}/usage-heatmap`,
|
|
64369
|
+
BILLING_ACCOUNTS: (orgId) => `${apiBase}/orgs/${orgId}/billing/accounts`,
|
|
64370
|
+
BILLING_ACCOUNT_CLOSE: (orgId, accountId) => `${apiBase}/orgs/${orgId}/billing/accounts/${accountId}/close`,
|
|
64371
|
+
BILLING_SETTINGS: (orgId) => `${apiBase}/orgs/${orgId}/billing/settings`,
|
|
64372
|
+
COMPUTE_PRICING: () => `${apiBase}/billing/compute-pricing`
|
|
64373
|
+
};
|
|
64374
|
+
}
|
|
64375
|
+
|
|
64376
|
+
// ts/sdk/dist/team-endpoints.js
|
|
64377
|
+
function teamEndpoints(apiBase) {
|
|
64378
|
+
return {
|
|
64379
|
+
TEAMS: (orgId) => `${apiBase}/orgs/${orgId}/teams`,
|
|
64380
|
+
TEAM: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}`,
|
|
64381
|
+
TEAM_PARENT: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/parent`,
|
|
64382
|
+
TEAM_MEMBERS: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/members`,
|
|
64383
|
+
TEAM_MEMBER: (orgId, teamId, userId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
64384
|
+
/** An agent's owning Team (agent-team-attribution-design.md §5.4). */
|
|
64385
|
+
AGENT_OWNING_TEAM: (orgId, agentId) => `${apiBase}/orgs/${orgId}/agents/${agentId}/owning-team`
|
|
64386
|
+
};
|
|
64387
|
+
}
|
|
64388
|
+
|
|
64354
64389
|
// ts/sdk/dist/constants.js
|
|
64355
64390
|
var API_BASE2 = "/api/v1";
|
|
64356
64391
|
var WIKI_BASE = "/wiki/v1";
|
|
@@ -64383,11 +64418,7 @@ var ENDPOINTS = {
|
|
|
64383
64418
|
ORG: (orgId) => `${API_BASE2}/orgs/${orgId}`,
|
|
64384
64419
|
ORG_MEMBERS: (orgId) => `${API_BASE2}/orgs/${orgId}/members`,
|
|
64385
64420
|
ORG_MEMBERS_FORMER: (orgId) => `${API_BASE2}/orgs/${orgId}/members/former`,
|
|
64386
|
-
|
|
64387
|
-
TEAM: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}`,
|
|
64388
|
-
TEAM_PARENT: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/parent`,
|
|
64389
|
-
TEAM_MEMBERS: (orgId, teamId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/members`,
|
|
64390
|
-
TEAM_MEMBER: (orgId, teamId, userId) => `${API_BASE2}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
64421
|
+
...teamEndpoints(API_BASE2),
|
|
64391
64422
|
ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE2}/orgs/${orgId}/members/online`,
|
|
64392
64423
|
LLM_PROVIDERS: (orgId) => `${API_BASE2}/orgs/${orgId}/llm-providers`,
|
|
64393
64424
|
LLM_PROVIDER: (orgId, providerId) => `${API_BASE2}/orgs/${orgId}/llm-providers/${providerId}`,
|
|
@@ -64848,16 +64879,7 @@ var ENDPOINTS = {
|
|
|
64848
64879
|
CLIP_DEPENDENCIES_CHECK: (orgId) => `${API_BASE2}/orgs/${orgId}/clip-dependencies/check`,
|
|
64849
64880
|
// Onboarding wizard progress (org-scoped, self)
|
|
64850
64881
|
ONBOARDING_PROGRESS: (orgId) => `${API_BASE2}/orgs/${orgId}/onboarding`,
|
|
64851
|
-
|
|
64852
|
-
BILLING: (orgId) => `${API_BASE2}/orgs/${orgId}/billing`,
|
|
64853
|
-
BILLING_TRANSACTIONS: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/transactions`,
|
|
64854
|
-
BILLING_CHECKOUT: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/checkout`,
|
|
64855
|
-
BILLING_AUTO_RELOAD: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/auto-reload`,
|
|
64856
|
-
BILLING_SETUP_INTENT: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/setup-intent`,
|
|
64857
|
-
BILLING_PORTAL_SESSION: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/portal-session`,
|
|
64858
|
-
BILLING_USAGE_DAILY: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/usage-daily`,
|
|
64859
|
-
BILLING_USAGE_HEATMAP: (orgId) => `${API_BASE2}/orgs/${orgId}/billing/usage-heatmap`,
|
|
64860
|
-
COMPUTE_PRICING: () => `${API_BASE2}/billing/compute-pricing`,
|
|
64882
|
+
...billingEndpoints(API_BASE2),
|
|
64861
64883
|
// Runtime capability table (public, no auth) — SSOT for the create/settings
|
|
64862
64884
|
// interlock: per-runtime compute modes, native model family, cross-family
|
|
64863
64885
|
// availability, and recommended model.
|
|
@@ -66015,6 +66037,141 @@ var AgentCallerScopeClient = class extends ChatTeamGrantClient {
|
|
|
66015
66037
|
}
|
|
66016
66038
|
};
|
|
66017
66039
|
|
|
66040
|
+
// ts/sdk/dist/agent-owning-team-client.js
|
|
66041
|
+
var AgentOwningTeamClient = class extends AgentCallerScopeClient {
|
|
66042
|
+
/**
|
|
66043
|
+
* Moves the agent to another Team, or to the organization with `team_id`
|
|
66044
|
+
* null. Pass the Team you saw as `expected_team_id`: someone else's change
|
|
66045
|
+
* in between answers 409 OWNING_TEAM_CHANGED.
|
|
66046
|
+
*/
|
|
66047
|
+
async setAgentOwningTeam(orgId, agentId, req) {
|
|
66048
|
+
return this.request("PUT", ENDPOINTS.AGENT_OWNING_TEAM(orgId, agentId), req);
|
|
66049
|
+
}
|
|
66050
|
+
};
|
|
66051
|
+
|
|
66052
|
+
// ts/sdk/dist/billing-client.js
|
|
66053
|
+
var BillingClient = class extends AgentOwningTeamClient {
|
|
66054
|
+
// ---- Billing & Credits (org-scoped) ----
|
|
66055
|
+
//
|
|
66056
|
+
// Every account method takes an optional trailing accountId: omitted, it
|
|
66057
|
+
// acts on the org's own account through the org's /billing routes; given,
|
|
66058
|
+
// on that account under /billing/accounts/{accountId}.
|
|
66059
|
+
async getBilling(orgId, accountId) {
|
|
66060
|
+
return this.request("GET", ENDPOINTS.BILLING(orgId, accountId));
|
|
66061
|
+
}
|
|
66062
|
+
async getUsageDaily(orgId, opts, accountId) {
|
|
66063
|
+
const params = new URLSearchParams();
|
|
66064
|
+
params.set("start_date", opts.start_date);
|
|
66065
|
+
params.set("end_date", opts.end_date);
|
|
66066
|
+
return this.request("GET", `${ENDPOINTS.BILLING_USAGE_DAILY(orgId, accountId)}?${params}`);
|
|
66067
|
+
}
|
|
66068
|
+
async getUsageHeatmap(orgId, opts, accountId) {
|
|
66069
|
+
const params = new URLSearchParams();
|
|
66070
|
+
params.set("start_time", opts.start_time);
|
|
66071
|
+
if (opts.limit != null)
|
|
66072
|
+
params.set("limit", String(opts.limit));
|
|
66073
|
+
if (opts.offset != null)
|
|
66074
|
+
params.set("offset", String(opts.offset));
|
|
66075
|
+
return this.request("GET", `${ENDPOINTS.BILLING_USAGE_HEATMAP(orgId, accountId)}?${params}`);
|
|
66076
|
+
}
|
|
66077
|
+
async listBillingTransactions(orgId, opts, accountId) {
|
|
66078
|
+
const params = new URLSearchParams();
|
|
66079
|
+
if (opts?.cursor)
|
|
66080
|
+
params.set("cursor", opts.cursor);
|
|
66081
|
+
if (opts?.limit)
|
|
66082
|
+
params.set("limit", String(opts.limit));
|
|
66083
|
+
if (opts?.types?.length)
|
|
66084
|
+
params.set("types", opts.types.join(","));
|
|
66085
|
+
if (opts?.user_id)
|
|
66086
|
+
params.set("user_id", opts.user_id);
|
|
66087
|
+
if (opts?.unresolved_actor)
|
|
66088
|
+
params.set("unresolved_actor", "true");
|
|
66089
|
+
if (opts?.machine_id)
|
|
66090
|
+
params.set("machine_id", opts.machine_id);
|
|
66091
|
+
if (opts?.unresolved_machine)
|
|
66092
|
+
params.set("unresolved_machine", "true");
|
|
66093
|
+
if (opts?.from)
|
|
66094
|
+
params.set("from", opts.from);
|
|
66095
|
+
if (opts?.to)
|
|
66096
|
+
params.set("to", opts.to);
|
|
66097
|
+
const qs = params.toString();
|
|
66098
|
+
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId, accountId)}${qs ? `?${qs}` : ""}`);
|
|
66099
|
+
}
|
|
66100
|
+
async listBillingTransactionAgentGroups(orgId, opts, accountId) {
|
|
66101
|
+
const params = new URLSearchParams({ group_by: "agent" });
|
|
66102
|
+
if (opts?.from)
|
|
66103
|
+
params.set("from", opts.from);
|
|
66104
|
+
if (opts?.to)
|
|
66105
|
+
params.set("to", opts.to);
|
|
66106
|
+
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId, accountId)}?${params}`);
|
|
66107
|
+
}
|
|
66108
|
+
async listBillingTransactionMachineGroups(orgId, opts, accountId) {
|
|
66109
|
+
const params = new URLSearchParams({ group_by: "machine" });
|
|
66110
|
+
if (opts?.from)
|
|
66111
|
+
params.set("from", opts.from);
|
|
66112
|
+
if (opts?.to)
|
|
66113
|
+
params.set("to", opts.to);
|
|
66114
|
+
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId, accountId)}?${params}`);
|
|
66115
|
+
}
|
|
66116
|
+
async createCheckout(orgId, req, accountId) {
|
|
66117
|
+
return this.request("POST", ENDPOINTS.BILLING_CHECKOUT(orgId, accountId), req);
|
|
66118
|
+
}
|
|
66119
|
+
/**
|
|
66120
|
+
* Creates a Stripe-hosted card-collection session (Checkout in mode=setup)
|
|
66121
|
+
* and returns the redirect URL. The frontend navigates to `setup_url` and
|
|
66122
|
+
* Stripe handles the card form; the resulting payment_method is recorded
|
|
66123
|
+
* server-side via the `setup_intent.succeeded` webhook. Mirrors
|
|
66124
|
+
* `POST /billing/setup-intent`.
|
|
66125
|
+
*/
|
|
66126
|
+
async createSetupIntent(orgId, req, accountId) {
|
|
66127
|
+
return this.request("POST", ENDPOINTS.BILLING_SETUP_INTENT(orgId, accountId), req);
|
|
66128
|
+
}
|
|
66129
|
+
/**
|
|
66130
|
+
* Returns a link to the Stripe-hosted customer portal for the account,
|
|
66131
|
+
* where its managers download invoices and edit the billing details
|
|
66132
|
+
* printed on them. Mirrors `POST /billing/portal-session`.
|
|
66133
|
+
*/
|
|
66134
|
+
async createBillingPortalSession(orgId, accountId) {
|
|
66135
|
+
return this.request("POST", ENDPOINTS.BILLING_PORTAL_SESSION(orgId, accountId));
|
|
66136
|
+
}
|
|
66137
|
+
async getAutoReloadSettings(orgId, accountId) {
|
|
66138
|
+
return this.request("GET", ENDPOINTS.BILLING_AUTO_RELOAD(orgId, accountId));
|
|
66139
|
+
}
|
|
66140
|
+
async updateAutoReloadSettings(orgId, req, accountId) {
|
|
66141
|
+
return this.request("PUT", ENDPOINTS.BILLING_AUTO_RELOAD(orgId, accountId), req);
|
|
66142
|
+
}
|
|
66143
|
+
/** The org's billing accounts the caller may view, the org's own first. */
|
|
66144
|
+
async listBillingAccounts(orgId) {
|
|
66145
|
+
const res = await this.request("GET", ENDPOINTS.BILLING_ACCOUNTS(orgId));
|
|
66146
|
+
return res.data;
|
|
66147
|
+
}
|
|
66148
|
+
/** Opens a Team's account (org owners and admins, while Team accounts are
|
|
66149
|
+
* on). Reopening a closed account starts it at zero. */
|
|
66150
|
+
async openBillingAccount(orgId, teamId) {
|
|
66151
|
+
return this.request("POST", ENDPOINTS.BILLING_ACCOUNTS(orgId), { team_id: teamId });
|
|
66152
|
+
}
|
|
66153
|
+
/** Closes a Team account and moves its balance into the org's account. */
|
|
66154
|
+
async closeBillingAccount(orgId, accountId) {
|
|
66155
|
+
await this.request("POST", ENDPOINTS.BILLING_ACCOUNT_CLOSE(orgId, accountId));
|
|
66156
|
+
}
|
|
66157
|
+
async getBillingSettings(orgId) {
|
|
66158
|
+
return this.request("GET", ENDPOINTS.BILLING_SETTINGS(orgId));
|
|
66159
|
+
}
|
|
66160
|
+
/** Sets the org's rules for Team accounts (the org owner only). */
|
|
66161
|
+
async updateBillingSettings(orgId, req) {
|
|
66162
|
+
return this.request("PATCH", ENDPOINTS.BILLING_SETTINGS(orgId), req);
|
|
66163
|
+
}
|
|
66164
|
+
// The admin grant endpoints (POST/GET /internal/admin/orgs/
|
|
66165
|
+
// {id}/grants) intentionally do NOT live on this public client — they
|
|
66166
|
+
// are mounted on the unauthenticated `/internal/*` surface and reachable
|
|
66167
|
+
// only via internal network paths. The admin dashboard maintains its
|
|
66168
|
+
// own thin client (`ts/admin/lib/api.ts`) that hits these directly.
|
|
66169
|
+
async getComputePricing() {
|
|
66170
|
+
const resp = await this.request("GET", ENDPOINTS.COMPUTE_PRICING());
|
|
66171
|
+
return resp.data;
|
|
66172
|
+
}
|
|
66173
|
+
};
|
|
66174
|
+
|
|
66018
66175
|
// ts/sdk/dist/wiki-upload.js
|
|
66019
66176
|
function createWikiUploadFormData(params) {
|
|
66020
66177
|
const form = new FormData();
|
|
@@ -66151,7 +66308,7 @@ function legacyHeartbeatFromReport(report) {
|
|
|
66151
66308
|
detectedRuntimes
|
|
66152
66309
|
};
|
|
66153
66310
|
}
|
|
66154
|
-
var ParallClient = class _ParallClient extends
|
|
66311
|
+
var ParallClient = class _ParallClient extends BillingClient {
|
|
66155
66312
|
baseUrl;
|
|
66156
66313
|
wikiBaseUrl;
|
|
66157
66314
|
token;
|
|
@@ -68219,100 +68376,6 @@ var ParallClient = class _ParallClient extends AgentCallerScopeClient {
|
|
|
68219
68376
|
async updateOnboardingProgress(orgId, request) {
|
|
68220
68377
|
return this.request("PATCH", ENDPOINTS.ONBOARDING_PROGRESS(orgId), request);
|
|
68221
68378
|
}
|
|
68222
|
-
// ---- Billing & Credits (org-scoped) ----
|
|
68223
|
-
async getBilling(orgId) {
|
|
68224
|
-
return this.request("GET", ENDPOINTS.BILLING(orgId));
|
|
68225
|
-
}
|
|
68226
|
-
async getUsageDaily(orgId, opts) {
|
|
68227
|
-
const params = new URLSearchParams();
|
|
68228
|
-
params.set("start_date", opts.start_date);
|
|
68229
|
-
params.set("end_date", opts.end_date);
|
|
68230
|
-
return this.request("GET", `${ENDPOINTS.BILLING_USAGE_DAILY(orgId)}?${params}`);
|
|
68231
|
-
}
|
|
68232
|
-
async getUsageHeatmap(orgId, opts) {
|
|
68233
|
-
const params = new URLSearchParams();
|
|
68234
|
-
params.set("start_time", opts.start_time);
|
|
68235
|
-
if (opts.limit != null)
|
|
68236
|
-
params.set("limit", String(opts.limit));
|
|
68237
|
-
if (opts.offset != null)
|
|
68238
|
-
params.set("offset", String(opts.offset));
|
|
68239
|
-
return this.request("GET", `${ENDPOINTS.BILLING_USAGE_HEATMAP(orgId)}?${params}`);
|
|
68240
|
-
}
|
|
68241
|
-
async listBillingTransactions(orgId, opts) {
|
|
68242
|
-
const params = new URLSearchParams();
|
|
68243
|
-
if (opts?.cursor)
|
|
68244
|
-
params.set("cursor", opts.cursor);
|
|
68245
|
-
if (opts?.limit)
|
|
68246
|
-
params.set("limit", String(opts.limit));
|
|
68247
|
-
if (opts?.types?.length)
|
|
68248
|
-
params.set("types", opts.types.join(","));
|
|
68249
|
-
if (opts?.user_id)
|
|
68250
|
-
params.set("user_id", opts.user_id);
|
|
68251
|
-
if (opts?.unresolved_actor)
|
|
68252
|
-
params.set("unresolved_actor", "true");
|
|
68253
|
-
if (opts?.machine_id)
|
|
68254
|
-
params.set("machine_id", opts.machine_id);
|
|
68255
|
-
if (opts?.unresolved_machine)
|
|
68256
|
-
params.set("unresolved_machine", "true");
|
|
68257
|
-
if (opts?.from)
|
|
68258
|
-
params.set("from", opts.from);
|
|
68259
|
-
if (opts?.to)
|
|
68260
|
-
params.set("to", opts.to);
|
|
68261
|
-
const qs = params.toString();
|
|
68262
|
-
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId)}${qs ? `?${qs}` : ""}`);
|
|
68263
|
-
}
|
|
68264
|
-
async listBillingTransactionAgentGroups(orgId, opts) {
|
|
68265
|
-
const params = new URLSearchParams({ group_by: "agent" });
|
|
68266
|
-
if (opts?.from)
|
|
68267
|
-
params.set("from", opts.from);
|
|
68268
|
-
if (opts?.to)
|
|
68269
|
-
params.set("to", opts.to);
|
|
68270
|
-
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId)}?${params}`);
|
|
68271
|
-
}
|
|
68272
|
-
async listBillingTransactionMachineGroups(orgId, opts) {
|
|
68273
|
-
const params = new URLSearchParams({ group_by: "machine" });
|
|
68274
|
-
if (opts?.from)
|
|
68275
|
-
params.set("from", opts.from);
|
|
68276
|
-
if (opts?.to)
|
|
68277
|
-
params.set("to", opts.to);
|
|
68278
|
-
return this.request("GET", `${ENDPOINTS.BILLING_TRANSACTIONS(orgId)}?${params}`);
|
|
68279
|
-
}
|
|
68280
|
-
async createCheckout(orgId, req) {
|
|
68281
|
-
return this.request("POST", ENDPOINTS.BILLING_CHECKOUT(orgId), req);
|
|
68282
|
-
}
|
|
68283
|
-
/**
|
|
68284
|
-
* Creates a Stripe-hosted card-collection session (Checkout in mode=setup)
|
|
68285
|
-
* and returns the redirect URL. The frontend navigates to `setup_url` and
|
|
68286
|
-
* Stripe handles the card form; the resulting payment_method is recorded
|
|
68287
|
-
* server-side via the `setup_intent.succeeded` webhook. Mirrors
|
|
68288
|
-
* `POST /billing/setup-intent`.
|
|
68289
|
-
*/
|
|
68290
|
-
async createSetupIntent(orgId, req) {
|
|
68291
|
-
return this.request("POST", ENDPOINTS.BILLING_SETUP_INTENT(orgId), req);
|
|
68292
|
-
}
|
|
68293
|
-
/**
|
|
68294
|
-
* Returns a link to the Stripe-hosted customer portal for the org, where
|
|
68295
|
-
* admins download invoices and edit the billing details printed on them.
|
|
68296
|
-
* Mirrors `POST /billing/portal-session`.
|
|
68297
|
-
*/
|
|
68298
|
-
async createBillingPortalSession(orgId) {
|
|
68299
|
-
return this.request("POST", ENDPOINTS.BILLING_PORTAL_SESSION(orgId));
|
|
68300
|
-
}
|
|
68301
|
-
async getAutoReloadSettings(orgId) {
|
|
68302
|
-
return this.request("GET", ENDPOINTS.BILLING_AUTO_RELOAD(orgId));
|
|
68303
|
-
}
|
|
68304
|
-
async updateAutoReloadSettings(orgId, req) {
|
|
68305
|
-
return this.request("PUT", ENDPOINTS.BILLING_AUTO_RELOAD(orgId), req);
|
|
68306
|
-
}
|
|
68307
|
-
// The admin grant endpoints (POST/GET /internal/admin/orgs/
|
|
68308
|
-
// {id}/grants) intentionally do NOT live on this public client — they
|
|
68309
|
-
// are mounted on the unauthenticated `/internal/*` surface and reachable
|
|
68310
|
-
// only via internal network paths. The admin dashboard maintains its
|
|
68311
|
-
// own thin client (`ts/admin/lib/api.ts`) that hits these directly.
|
|
68312
|
-
async getComputePricing() {
|
|
68313
|
-
const resp = await this.request("GET", ENDPOINTS.COMPUTE_PRICING());
|
|
68314
|
-
return resp.data;
|
|
68315
|
-
}
|
|
68316
68379
|
/** Runtime capability table (public) — SSOT for the create/settings interlock. */
|
|
68317
68380
|
async getRuntimes() {
|
|
68318
68381
|
const resp = await this.request("GET", ENDPOINTS.RUNTIMES());
|