@parall/daemon 1.85.0 → 1.87.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 +252 -108
- package/bundle/parall-claude-agent.js +253 -103
- package/bundle/parall-codex-agent.js +253 -103
- package/bundle/parall-daemon.js +310 -114
- 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.87.0",
|
|
3
|
+
"built_at": "2026-11-04T13:34:24.747Z",
|
|
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": "8bd6ccb4f2adbc9088752bf04fd6543bfc75f223f614f8214abf66696fa1ef86",
|
|
20
|
+
"size": 3090713
|
|
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": "3b44cc18cf95bfde8e85dbea3b58aee5098e2ce345f776d6f895d76888e5c827",
|
|
28
|
+
"size": 3104443
|
|
29
29
|
},
|
|
30
30
|
"parall-codex-agent.js": {
|
|
31
|
-
"sha256": "
|
|
32
|
-
"size":
|
|
31
|
+
"sha256": "114744ef59e5d58c4295d9919d54c6213bb22652798360cab60ca1c05550efd3",
|
|
32
|
+
"size": 3116144
|
|
33
33
|
},
|
|
34
34
|
"parall-daemon.js": {
|
|
35
|
-
"sha256": "
|
|
36
|
-
"size":
|
|
35
|
+
"sha256": "73df46d16ecb80391a00453932f4da02b1e952d4d6b7d7c8c9f9cec0853f3ab0",
|
|
36
|
+
"size": 3284711
|
|
37
37
|
},
|
|
38
38
|
"parall-openclaw-agent.js": {
|
|
39
39
|
"sha256": "856a1c3a9ae0ffef8efe2481fa1171dbeb1d67cccb88616aa9bf16da96a69355",
|
|
40
40
|
"size": 9923
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
"signature": "
|
|
43
|
+
"signature": "ITgUo1Zy94F3Tqi+yiYfpCs1aM8K9maW/fU6BEe2hGkCpdCuFJa4rWuWyJTBlkd+ip8ey7EzeUPAHvL6VdpdCA=="
|
|
44
44
|
}
|
|
@@ -8085,8 +8085,8 @@ var require_client_h2 = __commonJS({
|
|
|
8085
8085
|
this.destroy(err);
|
|
8086
8086
|
util.destroy(this[kSocket], err);
|
|
8087
8087
|
}
|
|
8088
|
-
function onHttp2SessionGoAway(
|
|
8089
|
-
const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${
|
|
8088
|
+
function onHttp2SessionGoAway(errorCode2) {
|
|
8089
|
+
const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${errorCode2}`, util.getSocketInfo(this[kSocket]));
|
|
8090
8090
|
const client = this[kClient];
|
|
8091
8091
|
client[kSocket] = null;
|
|
8092
8092
|
client[kHTTPContext] = null;
|
|
@@ -26915,14 +26915,14 @@ var require_receiver2 = __commonJS({
|
|
|
26915
26915
|
* @return {(Error|RangeError)} The error
|
|
26916
26916
|
* @private
|
|
26917
26917
|
*/
|
|
26918
|
-
createError(ErrorCtor, message, prefix, statusCode,
|
|
26918
|
+
createError(ErrorCtor, message, prefix, statusCode, errorCode2) {
|
|
26919
26919
|
this._loop = false;
|
|
26920
26920
|
this._errored = true;
|
|
26921
26921
|
const err = new ErrorCtor(
|
|
26922
26922
|
prefix ? `Invalid WebSocket frame: ${message}` : message
|
|
26923
26923
|
);
|
|
26924
26924
|
Error.captureStackTrace(err, this.createError);
|
|
26925
|
-
err.code =
|
|
26925
|
+
err.code = errorCode2;
|
|
26926
26926
|
err[kStatusCode] = statusCode;
|
|
26927
26927
|
return err;
|
|
26928
26928
|
}
|
|
@@ -37904,19 +37904,19 @@ var require_dist_cjs29 = __commonJS({
|
|
|
37904
37904
|
delete exception.Message;
|
|
37905
37905
|
return exception;
|
|
37906
37906
|
};
|
|
37907
|
-
var throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {
|
|
37907
|
+
var throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode: errorCode2 }) => {
|
|
37908
37908
|
const $metadata = deserializeMetadata(output);
|
|
37909
37909
|
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
|
|
37910
37910
|
const response = new exceptionCtor({
|
|
37911
|
-
name: parsedBody?.code || parsedBody?.Code ||
|
|
37911
|
+
name: parsedBody?.code || parsedBody?.Code || errorCode2 || statusCode || "UnknownError",
|
|
37912
37912
|
$fault: "client",
|
|
37913
37913
|
$metadata
|
|
37914
37914
|
});
|
|
37915
37915
|
throw decorateServiceException2(response, parsedBody);
|
|
37916
37916
|
};
|
|
37917
37917
|
var withBaseException = (ExceptionCtor) => {
|
|
37918
|
-
return ({ output, parsedBody, errorCode }) => {
|
|
37919
|
-
throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });
|
|
37918
|
+
return ({ output, parsedBody, errorCode: errorCode2 }) => {
|
|
37919
|
+
throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode: errorCode2 });
|
|
37920
37920
|
};
|
|
37921
37921
|
};
|
|
37922
37922
|
var deserializeMetadata = (output) => ({
|
|
@@ -64270,6 +64270,107 @@ function browserViewerRequestOptions(command, opts) {
|
|
|
64270
64270
|
};
|
|
64271
64271
|
}
|
|
64272
64272
|
|
|
64273
|
+
// ts/sdk/dist/wiki-upload.js
|
|
64274
|
+
function createWikiUploadFormData(params) {
|
|
64275
|
+
const form = new FormData();
|
|
64276
|
+
form.append("path", params.path);
|
|
64277
|
+
form.append("file", params.file);
|
|
64278
|
+
if (params.message)
|
|
64279
|
+
form.append("message", params.message);
|
|
64280
|
+
if (params.uploadId)
|
|
64281
|
+
form.append("upload_id", params.uploadId);
|
|
64282
|
+
if (params.conflict)
|
|
64283
|
+
form.append("conflict", params.conflict);
|
|
64284
|
+
if ("contentRoute" in params && params.contentRoute) {
|
|
64285
|
+
form.append("content_route", params.contentRoute);
|
|
64286
|
+
}
|
|
64287
|
+
return form;
|
|
64288
|
+
}
|
|
64289
|
+
function sendMultipartRequest(options) {
|
|
64290
|
+
if (options.onProgress && typeof XMLHttpRequest !== "undefined") {
|
|
64291
|
+
return multipartXHR(options, options.onProgress);
|
|
64292
|
+
}
|
|
64293
|
+
const timeoutSignal = AbortSignal.timeout(options.timeoutMs);
|
|
64294
|
+
const signal = options.signal ? AbortSignal.any([options.signal, timeoutSignal]) : timeoutSignal;
|
|
64295
|
+
return fetch(options.url, {
|
|
64296
|
+
method: options.method,
|
|
64297
|
+
headers: options.headers,
|
|
64298
|
+
body: options.body,
|
|
64299
|
+
signal
|
|
64300
|
+
});
|
|
64301
|
+
}
|
|
64302
|
+
function multipartXHR(options, onProgress) {
|
|
64303
|
+
return new Promise((resolve2, reject) => {
|
|
64304
|
+
const xhr = new XMLHttpRequest();
|
|
64305
|
+
let settled = false;
|
|
64306
|
+
const finish = (fn) => {
|
|
64307
|
+
if (settled)
|
|
64308
|
+
return;
|
|
64309
|
+
settled = true;
|
|
64310
|
+
options.signal?.removeEventListener("abort", abortFromSignal);
|
|
64311
|
+
fn();
|
|
64312
|
+
};
|
|
64313
|
+
const abortFromSignal = () => xhr.abort();
|
|
64314
|
+
xhr.open(options.method, options.url, true);
|
|
64315
|
+
xhr.timeout = options.timeoutMs;
|
|
64316
|
+
for (const [name, value] of Object.entries(options.headers)) {
|
|
64317
|
+
xhr.setRequestHeader(name, value);
|
|
64318
|
+
}
|
|
64319
|
+
xhr.upload.onprogress = (event) => {
|
|
64320
|
+
try {
|
|
64321
|
+
onProgress(event.loaded, event.lengthComputable ? event.total : 0);
|
|
64322
|
+
} catch {
|
|
64323
|
+
}
|
|
64324
|
+
};
|
|
64325
|
+
xhr.onload = () => finish(() => {
|
|
64326
|
+
const responseHeaders = new Headers();
|
|
64327
|
+
for (const line of xhr.getAllResponseHeaders().trim().split(/[\r\n]+/)) {
|
|
64328
|
+
if (!line)
|
|
64329
|
+
continue;
|
|
64330
|
+
const separator = line.indexOf(":");
|
|
64331
|
+
if (separator > 0) {
|
|
64332
|
+
responseHeaders.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());
|
|
64333
|
+
}
|
|
64334
|
+
}
|
|
64335
|
+
const responseBody = xhr.status === 204 || xhr.responseText === "" ? null : xhr.responseText;
|
|
64336
|
+
resolve2(new Response(responseBody, {
|
|
64337
|
+
status: xhr.status,
|
|
64338
|
+
statusText: xhr.statusText,
|
|
64339
|
+
headers: responseHeaders
|
|
64340
|
+
}));
|
|
64341
|
+
});
|
|
64342
|
+
xhr.onerror = () => finish(() => reject(new TypeError("Network request failed")));
|
|
64343
|
+
xhr.ontimeout = () => finish(() => reject(new DOMException("Request timed out", "TimeoutError")));
|
|
64344
|
+
xhr.onabort = () => finish(() => reject(new DOMException("Request aborted", "AbortError")));
|
|
64345
|
+
if (options.signal?.aborted) {
|
|
64346
|
+
finish(() => reject(new DOMException("Request aborted", "AbortError")));
|
|
64347
|
+
return;
|
|
64348
|
+
}
|
|
64349
|
+
options.signal?.addEventListener("abort", abortFromSignal, { once: true });
|
|
64350
|
+
xhr.send(options.body);
|
|
64351
|
+
});
|
|
64352
|
+
}
|
|
64353
|
+
|
|
64354
|
+
// ts/sdk/dist/fetch-cause.js
|
|
64355
|
+
var GENERIC_FETCH_MESSAGES = /* @__PURE__ */ new Set(["Failed to fetch", "fetch failed"]);
|
|
64356
|
+
function describeFetchCause(err) {
|
|
64357
|
+
const inner = err?.cause;
|
|
64358
|
+
for (const candidate of [inner, err]) {
|
|
64359
|
+
if (!(candidate instanceof Error))
|
|
64360
|
+
continue;
|
|
64361
|
+
const code = candidate.code;
|
|
64362
|
+
const parts = [];
|
|
64363
|
+
if (typeof code === "string" && code && !candidate.message.includes(code))
|
|
64364
|
+
parts.push(code);
|
|
64365
|
+
if (candidate.message && !GENERIC_FETCH_MESSAGES.has(candidate.message)) {
|
|
64366
|
+
parts.push(candidate.message);
|
|
64367
|
+
}
|
|
64368
|
+
if (parts.length > 0)
|
|
64369
|
+
return parts.join(" ");
|
|
64370
|
+
}
|
|
64371
|
+
return void 0;
|
|
64372
|
+
}
|
|
64373
|
+
|
|
64273
64374
|
// ts/sdk/dist/app-template-endpoints.js
|
|
64274
64375
|
function appTemplateEndpoints(apiBase) {
|
|
64275
64376
|
return {
|
|
@@ -64338,6 +64439,22 @@ function chatTeamGrantEndpoints(apiBase) {
|
|
|
64338
64439
|
};
|
|
64339
64440
|
}
|
|
64340
64441
|
|
|
64442
|
+
// ts/sdk/dist/team-invite-endpoints.js
|
|
64443
|
+
function teamInviteEndpoints(apiBase) {
|
|
64444
|
+
const seg = encodeURIComponent;
|
|
64445
|
+
return {
|
|
64446
|
+
TEMPLATE_INVITE_LINK: (orgId, templateId) => `${apiBase}/orgs/${seg(orgId)}/templates/${seg(templateId)}/invite-link`,
|
|
64447
|
+
TEMPLATE_INVITE_REQUESTS: (orgId, templateId) => `${apiBase}/orgs/${seg(orgId)}/templates/${seg(templateId)}/invite-link/requests`,
|
|
64448
|
+
TEMPLATE_INVITE_REQUEST_DECIDE: (orgId, templateId, requestId) => `${apiBase}/orgs/${seg(orgId)}/templates/${seg(templateId)}/invite-link/requests/${seg(requestId)}/decide`,
|
|
64449
|
+
TEAM_INVITE: (token) => `${apiBase}/team-invites/${seg(token)}`,
|
|
64450
|
+
TEAM_INVITE_TEAMS: (token) => `${apiBase}/team-invites/${seg(token)}/teams`,
|
|
64451
|
+
TEAM_INVITE_REQUESTS: (token) => `${apiBase}/team-invites/${seg(token)}/requests`,
|
|
64452
|
+
TEAM_INVITE_REQUEST_MINE: (token) => `${apiBase}/team-invites/${seg(token)}/requests/mine`,
|
|
64453
|
+
TEAM_INVITE_REQUEST_CANCEL: (requestId) => `${apiBase}/team-invite-requests/${seg(requestId)}/cancel`,
|
|
64454
|
+
TEAM_INVITE_REQUEST_RETRY: (requestId) => `${apiBase}/team-invite-requests/${seg(requestId)}/retry`
|
|
64455
|
+
};
|
|
64456
|
+
}
|
|
64457
|
+
|
|
64341
64458
|
// ts/sdk/dist/wechat-endpoints.js
|
|
64342
64459
|
function wechatEndpoints(apiBase) {
|
|
64343
64460
|
const agentBase = (orgId) => `${apiBase}/orgs/${orgId}/agents/me/wechat`;
|
|
@@ -64377,8 +64494,12 @@ function billingEndpoints(apiBase) {
|
|
|
64377
64494
|
function teamEndpoints(apiBase) {
|
|
64378
64495
|
return {
|
|
64379
64496
|
TEAMS: (orgId) => `${apiBase}/orgs/${orgId}/teams`,
|
|
64497
|
+
/** The whole team tree in one read (team-chart-design.md §5). */
|
|
64498
|
+
TEAM_GRAPH: (orgId) => `${apiBase}/orgs/${orgId}/team-graph`,
|
|
64380
64499
|
TEAM: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}`,
|
|
64381
64500
|
TEAM_PARENT: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/parent`,
|
|
64501
|
+
/** What moving a team would change (team-chart-design.md §7). */
|
|
64502
|
+
TEAM_PARENT_PREVIEW: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/parent/preview`,
|
|
64382
64503
|
TEAM_MEMBERS: (orgId, teamId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/members`,
|
|
64383
64504
|
TEAM_MEMBER: (orgId, teamId, userId) => `${apiBase}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
64384
64505
|
/** An agent's owning Team (agent-team-attribution-design.md §5.4). */
|
|
@@ -64391,6 +64512,9 @@ var API_BASE2 = "/api/v1";
|
|
|
64391
64512
|
var WIKI_BASE = "/wiki/v1";
|
|
64392
64513
|
var CLIP_BASE = "/clip/v1";
|
|
64393
64514
|
var ENDPOINTS = {
|
|
64515
|
+
WIKI_PAGE_SHARES: (orgId, wikiId) => `/wiki/v1/orgs/${orgId}/wikis/${wikiId}/page-shares`,
|
|
64516
|
+
WIKI_PAGE_SHARE_CANDIDATES: (orgId, wikiId) => `/wiki/v1/orgs/${orgId}/wikis/${wikiId}/page-share-candidates`,
|
|
64517
|
+
WIKI_SHARED_PAGE: (shareId) => `/wiki/v1/shared-pages/${encodeURIComponent(shareId)}`,
|
|
64394
64518
|
// Auth
|
|
64395
64519
|
AUTH_REGISTER: `${API_BASE2}/auth/register`,
|
|
64396
64520
|
AUTH_LOGIN: `${API_BASE2}/auth/login`,
|
|
@@ -64876,6 +65000,8 @@ var ENDPOINTS = {
|
|
|
64876
65000
|
TEMPLATE: (orgId, templateId) => `${API_BASE2}/orgs/${orgId}/templates/${templateId}`,
|
|
64877
65001
|
TEMPLATE_DEPLOYMENTS: (orgId) => `${API_BASE2}/orgs/${orgId}/template-deployments`,
|
|
64878
65002
|
TEMPLATE_DEPLOYMENT: (orgId, deploymentId) => `${API_BASE2}/orgs/${orgId}/template-deployments/${deploymentId}`,
|
|
65003
|
+
// Team launch / team invite links (public preview + signed-in requests)
|
|
65004
|
+
...teamInviteEndpoints(API_BASE2),
|
|
64879
65005
|
CLIP_DEPENDENCIES_CHECK: (orgId) => `${API_BASE2}/orgs/${orgId}/clip-dependencies/check`,
|
|
64880
65006
|
// Onboarding wizard progress (org-scoped, self)
|
|
64881
65007
|
ONBOARDING_PROGRESS: (orgId) => `${API_BASE2}/orgs/${orgId}/onboarding`,
|
|
@@ -66049,8 +66175,29 @@ var AgentOwningTeamClient = class extends AgentCallerScopeClient {
|
|
|
66049
66175
|
}
|
|
66050
66176
|
};
|
|
66051
66177
|
|
|
66178
|
+
// ts/sdk/dist/team-graph-client.js
|
|
66179
|
+
var TeamGraphClient = class extends AgentOwningTeamClient {
|
|
66180
|
+
async getTeamGraph(orgId, opts) {
|
|
66181
|
+
const query = opts?.includeAccess ? "?include=access" : "";
|
|
66182
|
+
return this.request("GET", `${ENDPOINTS.TEAM_GRAPH(orgId)}${query}`);
|
|
66183
|
+
}
|
|
66184
|
+
/**
|
|
66185
|
+
* Who would come to see more or less through teams if the team moved under
|
|
66186
|
+
* `parentTeamId`, or to the top level with null, without moving it
|
|
66187
|
+
* (team-chart-design.md §7). Org owners and admins only. Refuses what the move
|
|
66188
|
+
* would refuse, with the same codes. 503 when it cannot compute the whole answer
|
|
66189
|
+
* (`TEAM_MOVE_PREVIEW_WIKI_UNAVAILABLE`, `TEAM_MOVE_PREVIEW_TIMEOUT`,
|
|
66190
|
+
* `TEAM_MOVE_PREVIEW_TOO_LARGE`). Send `tree_revision` back on `setTeamParent`.
|
|
66191
|
+
*/
|
|
66192
|
+
async previewTeamMove(orgId, teamId, parentTeamId) {
|
|
66193
|
+
return this.request("POST", ENDPOINTS.TEAM_PARENT_PREVIEW(orgId, teamId), {
|
|
66194
|
+
parent_team_id: parentTeamId
|
|
66195
|
+
});
|
|
66196
|
+
}
|
|
66197
|
+
};
|
|
66198
|
+
|
|
66052
66199
|
// ts/sdk/dist/billing-client.js
|
|
66053
|
-
var BillingClient = class extends
|
|
66200
|
+
var BillingClient = class extends TeamGraphClient {
|
|
66054
66201
|
// ---- Billing & Credits (org-scoped) ----
|
|
66055
66202
|
//
|
|
66056
66203
|
// Every account method takes an optional trailing accountId: omitted, it
|
|
@@ -66172,106 +66319,97 @@ var BillingClient = class extends AgentOwningTeamClient {
|
|
|
66172
66319
|
}
|
|
66173
66320
|
};
|
|
66174
66321
|
|
|
66175
|
-
// ts/sdk/dist/
|
|
66176
|
-
|
|
66177
|
-
|
|
66178
|
-
|
|
66179
|
-
|
|
66180
|
-
|
|
66181
|
-
|
|
66182
|
-
|
|
66183
|
-
|
|
66184
|
-
|
|
66185
|
-
|
|
66186
|
-
|
|
66187
|
-
form.append("content_route", params.contentRoute);
|
|
66322
|
+
// ts/sdk/dist/team-invite-client.js
|
|
66323
|
+
var TeamInviteClient = class extends BillingClient {
|
|
66324
|
+
/** Org owner/admin: the template's current launch link, or null while it
|
|
66325
|
+
* has none (`TEAM_INVITE_LINK_NOT_FOUND`). Never creates one. */
|
|
66326
|
+
async getTemplateInviteLink(orgId, templateId) {
|
|
66327
|
+
try {
|
|
66328
|
+
return await this.request("GET", ENDPOINTS.TEMPLATE_INVITE_LINK(orgId, templateId));
|
|
66329
|
+
} catch (err) {
|
|
66330
|
+
if (errorCode(err) === "TEAM_INVITE_LINK_NOT_FOUND")
|
|
66331
|
+
return null;
|
|
66332
|
+
throw err;
|
|
66333
|
+
}
|
|
66188
66334
|
}
|
|
66189
|
-
|
|
66190
|
-
|
|
66191
|
-
|
|
66192
|
-
|
|
66193
|
-
|
|
66335
|
+
/** Org owner/admin: a new launch link, replacing the template's previous
|
|
66336
|
+
* one, whose URL stops working. Every new team waits for an admin's
|
|
66337
|
+
* approval unless `requireApproval` is false (the server's default is
|
|
66338
|
+
* true). */
|
|
66339
|
+
async createTemplateInviteLink(orgId, templateId, options = {}) {
|
|
66340
|
+
return this.request("POST", ENDPOINTS.TEMPLATE_INVITE_LINK(orgId, templateId), options.requireApproval !== void 0 ? { require_approval: options.requireApproval } : {});
|
|
66341
|
+
}
|
|
66342
|
+
/** Org owner/admin: the requests waiting for approval on the template's
|
|
66343
|
+
* current link, oldest first. */
|
|
66344
|
+
async listTemplateInviteRequests(orgId, templateId) {
|
|
66345
|
+
const res = await this.request("GET", ENDPOINTS.TEMPLATE_INVITE_REQUESTS(orgId, templateId));
|
|
66346
|
+
return res.requests ?? [];
|
|
66347
|
+
}
|
|
66348
|
+
/** Org owner/admin: approve or decline a waiting request. Approving brings
|
|
66349
|
+
* a requester from outside the org in as a member and starts their team.
|
|
66350
|
+
* `ALREADY_DECIDED` (409) when someone decided first. */
|
|
66351
|
+
async decideTemplateInviteRequest(orgId, templateId, requestId, decision) {
|
|
66352
|
+
return this.request("POST", ENDPOINTS.TEMPLATE_INVITE_REQUEST_DECIDE(orgId, templateId, requestId), { decision });
|
|
66353
|
+
}
|
|
66354
|
+
/** Public, no login needed: what a link shows before anyone signs in.
|
|
66355
|
+
* `TEAM_INVITE_NOT_FOUND` (404) for an unknown, revoked or switched-off
|
|
66356
|
+
* link; `TEAM_INVITE_EXPIRED` (410) once it lapsed. */
|
|
66357
|
+
async getTeamInvite(token) {
|
|
66358
|
+
return this.request("GET", ENDPOINTS.TEAM_INVITE(token));
|
|
66359
|
+
}
|
|
66360
|
+
/** Signed in: the org's Teams to pick from on a launch link, the caller's
|
|
66361
|
+
* own first, each marked with whether it has (or is getting) the squad and
|
|
66362
|
+
* which Team account would pay. */
|
|
66363
|
+
async getTeamInviteTeams(token) {
|
|
66364
|
+
const res = await this.request("GET", ENDPOINTS.TEAM_INVITE_TEAMS(token));
|
|
66365
|
+
return res.teams ?? [];
|
|
66366
|
+
}
|
|
66367
|
+
/** Ask for a team through a link: pick an existing one (`team_id`) or name
|
|
66368
|
+
* a new one. Submitting again returns the caller's open request instead of
|
|
66369
|
+
* making another. */
|
|
66370
|
+
async createTeamInviteRequest(token, body) {
|
|
66371
|
+
return this.request("POST", ENDPOINTS.TEAM_INVITE_REQUESTS(token), body);
|
|
66372
|
+
}
|
|
66373
|
+
/** The caller's latest request through this link, with its derived phase.
|
|
66374
|
+
* `TEAM_INVITE_REQUEST_NOT_FOUND` (404) while they have none. */
|
|
66375
|
+
async getMyTeamInviteRequest(token) {
|
|
66376
|
+
return this.request("GET", ENDPOINTS.TEAM_INVITE_REQUEST_MINE(token));
|
|
66377
|
+
}
|
|
66378
|
+
/** The requester withdraws a request that is still waiting. */
|
|
66379
|
+
async cancelTeamInviteRequest(requestId) {
|
|
66380
|
+
return this.request("POST", ENDPOINTS.TEAM_INVITE_REQUEST_CANCEL(requestId));
|
|
66381
|
+
}
|
|
66382
|
+
/** The requester retries a failed launch; the server never makes a second
|
|
66383
|
+
* squad for the same request. */
|
|
66384
|
+
async retryTeamInviteRequest(requestId) {
|
|
66385
|
+
return this.request("POST", ENDPOINTS.TEAM_INVITE_REQUEST_RETRY(requestId));
|
|
66194
66386
|
}
|
|
66195
|
-
|
|
66196
|
-
|
|
66197
|
-
return
|
|
66198
|
-
method: options.method,
|
|
66199
|
-
headers: options.headers,
|
|
66200
|
-
body: options.body,
|
|
66201
|
-
signal
|
|
66202
|
-
});
|
|
66203
|
-
}
|
|
66204
|
-
function multipartXHR(options, onProgress) {
|
|
66205
|
-
return new Promise((resolve2, reject) => {
|
|
66206
|
-
const xhr = new XMLHttpRequest();
|
|
66207
|
-
let settled = false;
|
|
66208
|
-
const finish = (fn) => {
|
|
66209
|
-
if (settled)
|
|
66210
|
-
return;
|
|
66211
|
-
settled = true;
|
|
66212
|
-
options.signal?.removeEventListener("abort", abortFromSignal);
|
|
66213
|
-
fn();
|
|
66214
|
-
};
|
|
66215
|
-
const abortFromSignal = () => xhr.abort();
|
|
66216
|
-
xhr.open(options.method, options.url, true);
|
|
66217
|
-
xhr.timeout = options.timeoutMs;
|
|
66218
|
-
for (const [name, value] of Object.entries(options.headers)) {
|
|
66219
|
-
xhr.setRequestHeader(name, value);
|
|
66220
|
-
}
|
|
66221
|
-
xhr.upload.onprogress = (event) => {
|
|
66222
|
-
try {
|
|
66223
|
-
onProgress(event.loaded, event.lengthComputable ? event.total : 0);
|
|
66224
|
-
} catch {
|
|
66225
|
-
}
|
|
66226
|
-
};
|
|
66227
|
-
xhr.onload = () => finish(() => {
|
|
66228
|
-
const responseHeaders = new Headers();
|
|
66229
|
-
for (const line of xhr.getAllResponseHeaders().trim().split(/[\r\n]+/)) {
|
|
66230
|
-
if (!line)
|
|
66231
|
-
continue;
|
|
66232
|
-
const separator = line.indexOf(":");
|
|
66233
|
-
if (separator > 0) {
|
|
66234
|
-
responseHeaders.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());
|
|
66235
|
-
}
|
|
66236
|
-
}
|
|
66237
|
-
const responseBody = xhr.status === 204 || xhr.responseText === "" ? null : xhr.responseText;
|
|
66238
|
-
resolve2(new Response(responseBody, {
|
|
66239
|
-
status: xhr.status,
|
|
66240
|
-
statusText: xhr.statusText,
|
|
66241
|
-
headers: responseHeaders
|
|
66242
|
-
}));
|
|
66243
|
-
});
|
|
66244
|
-
xhr.onerror = () => finish(() => reject(new TypeError("Network request failed")));
|
|
66245
|
-
xhr.ontimeout = () => finish(() => reject(new DOMException("Request timed out", "TimeoutError")));
|
|
66246
|
-
xhr.onabort = () => finish(() => reject(new DOMException("Request aborted", "AbortError")));
|
|
66247
|
-
if (options.signal?.aborted) {
|
|
66248
|
-
finish(() => reject(new DOMException("Request aborted", "AbortError")));
|
|
66249
|
-
return;
|
|
66250
|
-
}
|
|
66251
|
-
options.signal?.addEventListener("abort", abortFromSignal, { once: true });
|
|
66252
|
-
xhr.send(options.body);
|
|
66253
|
-
});
|
|
66387
|
+
};
|
|
66388
|
+
function errorCode(err) {
|
|
66389
|
+
return typeof err === "object" && err !== null ? err.code : void 0;
|
|
66254
66390
|
}
|
|
66255
66391
|
|
|
66256
|
-
// ts/sdk/dist/
|
|
66257
|
-
var
|
|
66258
|
-
|
|
66259
|
-
|
|
66260
|
-
|
|
66261
|
-
if (!(candidate instanceof Error))
|
|
66262
|
-
continue;
|
|
66263
|
-
const code = candidate.code;
|
|
66264
|
-
const parts = [];
|
|
66265
|
-
if (typeof code === "string" && code && !candidate.message.includes(code))
|
|
66266
|
-
parts.push(code);
|
|
66267
|
-
if (candidate.message && !GENERIC_FETCH_MESSAGES.has(candidate.message)) {
|
|
66268
|
-
parts.push(candidate.message);
|
|
66269
|
-
}
|
|
66270
|
-
if (parts.length > 0)
|
|
66271
|
-
return parts.join(" ");
|
|
66392
|
+
// ts/sdk/dist/wiki-page-share-client.js
|
|
66393
|
+
var WikiPageShareClient = class extends TeamInviteClient {
|
|
66394
|
+
async listWikiPageShares(orgId, wikiId, path7) {
|
|
66395
|
+
const res = await this.request("GET", ENDPOINTS.WIKI_PAGE_SHARES(orgId, wikiId), void 0, { path: path7 });
|
|
66396
|
+
return res.data;
|
|
66272
66397
|
}
|
|
66273
|
-
|
|
66274
|
-
}
|
|
66398
|
+
async createWikiPageShare(orgId, wikiId, path7, userId) {
|
|
66399
|
+
return this.request("POST", ENDPOINTS.WIKI_PAGE_SHARES(orgId, wikiId), { user_id: userId }, { path: path7 });
|
|
66400
|
+
}
|
|
66401
|
+
async revokeWikiPageShare(orgId, wikiId, path7, shareId) {
|
|
66402
|
+
return this.request("DELETE", `${ENDPOINTS.WIKI_PAGE_SHARES(orgId, wikiId)}/${encodeURIComponent(shareId)}`, void 0, { path: path7 });
|
|
66403
|
+
}
|
|
66404
|
+
async listWikiShareCandidates(orgId, wikiId, path7, q2 = "") {
|
|
66405
|
+
const res = await this.request("GET", ENDPOINTS.WIKI_PAGE_SHARE_CANDIDATES(orgId, wikiId), void 0, { path: path7, q: q2 });
|
|
66406
|
+
return res.data;
|
|
66407
|
+
}
|
|
66408
|
+
/** No path or ref override: the server always reads the shared page on main. */
|
|
66409
|
+
async getSharedWikiPage(shareId, opts) {
|
|
66410
|
+
return this.request("GET", ENDPOINTS.WIKI_SHARED_PAGE(shareId), void 0, void 0, false, opts);
|
|
66411
|
+
}
|
|
66412
|
+
};
|
|
66275
66413
|
|
|
66276
66414
|
// ts/sdk/dist/wiki-changeset.js
|
|
66277
66415
|
function normalizeWikiChangeset(changeset) {
|
|
@@ -66308,7 +66446,7 @@ function legacyHeartbeatFromReport(report) {
|
|
|
66308
66446
|
detectedRuntimes
|
|
66309
66447
|
};
|
|
66310
66448
|
}
|
|
66311
|
-
var ParallClient = class _ParallClient extends
|
|
66449
|
+
var ParallClient = class _ParallClient extends WikiPageShareClient {
|
|
66312
66450
|
baseUrl;
|
|
66313
66451
|
wikiBaseUrl;
|
|
66314
66452
|
token;
|
|
@@ -66709,10 +66847,16 @@ var ParallClient = class _ParallClient extends BillingClient {
|
|
|
66709
66847
|
async deleteTeam(orgId, teamId) {
|
|
66710
66848
|
return this.request("DELETE", ENDPOINTS.TEAM(orgId, teamId));
|
|
66711
66849
|
}
|
|
66712
|
-
/**
|
|
66713
|
-
|
|
66850
|
+
/**
|
|
66851
|
+
* Moves a team under `parentTeamId`, or to the top level with null. Org-admin
|
|
66852
|
+
* action. `expectedTreeRevision` is the revision the move's preview returned: if
|
|
66853
|
+
* the org's team tree changed since, nothing moves and it answers 409
|
|
66854
|
+
* `TEAM_TREE_CHANGED`. Without it nothing is checked.
|
|
66855
|
+
*/
|
|
66856
|
+
async setTeamParent(orgId, teamId, parentTeamId, opts) {
|
|
66714
66857
|
return this.request("PUT", ENDPOINTS.TEAM_PARENT(orgId, teamId), {
|
|
66715
|
-
parent_team_id: parentTeamId
|
|
66858
|
+
parent_team_id: parentTeamId,
|
|
66859
|
+
...opts?.expectedTreeRevision ? { expected_tree_revision: opts.expectedTreeRevision } : {}
|
|
66716
66860
|
});
|
|
66717
66861
|
}
|
|
66718
66862
|
/** Roster with display info, minus members who left the org; `includeSubteams` adds subteam rows. */
|