@gravity-rail/sdk 8.2.0 → 9.0.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 +2 -3
- package/dist/{agent_standing_job-CQqd8LDQ.d.ts → agent_team-CeErHy0t.d.ts} +846 -110
- package/dist/{agent_standing_job-DfjwGfg_.d.cts → agent_team-J0TyZPkg.d.cts} +846 -110
- package/dist/{chunk-U2U5X3LY.js → chunk-AMJ2MMBM.js} +238 -226
- package/dist/chunk-AMJ2MMBM.js.map +1 -0
- package/dist/{chunk-IIIRXFKG.js → chunk-MWTQXZGB.js} +1 -1
- package/dist/chunk-MWTQXZGB.js.map +1 -0
- package/dist/{chunk-6KPGCPGW.js → chunk-ZJJDZUAK.js} +40 -1
- package/dist/chunk-ZJJDZUAK.js.map +1 -0
- package/dist/{client-BGGgZhKg.d.cts → client-CO1hYs43.d.cts} +2238 -1099
- package/dist/{client-Bd-zXY42.d.ts → client-xtsG-YOi.d.ts} +2238 -1099
- package/dist/helpers.cjs +41 -0
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/helpers.js +5 -1
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +283 -305
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -23
- package/dist/index.d.ts +7 -23
- package/dist/index.js +14 -84
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +245 -230
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +775 -927
- package/dist/internal.d.ts +775 -927
- package/dist/internal.js +12 -9
- package/dist/internal.js.map +1 -1
- package/dist/member-import-CzGVMtgv.d.cts +92 -0
- package/dist/member-import-q5-fCvfV.d.ts +92 -0
- package/dist/realtime.cjs +109 -54
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +7 -2
- package/dist/realtime.d.ts +7 -2
- package/dist/realtime.js +109 -54
- package/dist/realtime.js.map +1 -1
- package/dist/schemas.cjs +24 -6
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +62 -48
- package/dist/schemas.d.ts +62 -48
- package/dist/schemas.js +24 -7
- package/dist/schemas.js.map +1 -1
- package/dist/{tasks-BTURuIlD.d.cts → tasks-BM3pb5W6.d.cts} +67 -904
- package/dist/{tasks-2LhXIwL8.d.ts → tasks-Dc89D2Gu.d.ts} +67 -904
- package/package.json +3 -3
- package/dist/chunk-6KPGCPGW.js.map +0 -1
- package/dist/chunk-IIIRXFKG.js.map +0 -1
- package/dist/chunk-U2U5X3LY.js.map +0 -1
- package/dist/member-import-4VSE3yYo.d.cts +0 -46
- package/dist/member-import-BQDFoSyf.d.ts +0 -46
package/dist/index.cjs
CHANGED
|
@@ -38,7 +38,6 @@ __export(src_exports, {
|
|
|
38
38
|
ActivityVisibility: () => ActivityVisibility,
|
|
39
39
|
ActivityWindowBasis: () => ActivityWindowBasis,
|
|
40
40
|
ActorKind: () => ActorKind,
|
|
41
|
-
AgentBuilder: () => AgentBuilder,
|
|
42
41
|
AiConnectorPolicy: () => AiConnectorPolicy,
|
|
43
42
|
AiDisclosure: () => AiDisclosure,
|
|
44
43
|
ApiError: () => ApiError,
|
|
@@ -296,6 +295,8 @@ __export(src_exports, {
|
|
|
296
295
|
pathDraftToStorage: () => pathDraftToStorage,
|
|
297
296
|
requiresAssistantParticipant: () => requiresAssistantParticipant,
|
|
298
297
|
runWorkspaceScript: () => runWorkspaceScript,
|
|
298
|
+
toSafeBusinessImportPreview: () => toSafeBusinessImportPreview,
|
|
299
|
+
toSafeBusinessImportResult: () => toSafeBusinessImportResult,
|
|
299
300
|
toSafeMemberImportPreview: () => toSafeMemberImportPreview,
|
|
300
301
|
toSafeMemberImportSummary: () => toSafeMemberImportSummary,
|
|
301
302
|
usesBuiltinAssistant: () => usesBuiltinAssistant,
|
|
@@ -1375,8 +1376,6 @@ var AgentTasksApi = class extends BaseApiClient {
|
|
|
1375
1376
|
async getAgentTasks(wid, params) {
|
|
1376
1377
|
const searchParams = new URLSearchParams();
|
|
1377
1378
|
if (params?.status) searchParams.set("status", params.status);
|
|
1378
|
-
if (params?.agentMemberId != null)
|
|
1379
|
-
searchParams.set("agent_member_id", String(params.agentMemberId));
|
|
1380
1379
|
if (params?.parentTaskId != null)
|
|
1381
1380
|
searchParams.set("parent_task_id", String(params.parentTaskId));
|
|
1382
1381
|
if (params?.limit != null) searchParams.set("limit", String(params.limit));
|
|
@@ -1401,82 +1400,6 @@ var AgentTasksApi = class extends BaseApiClient {
|
|
|
1401
1400
|
}
|
|
1402
1401
|
};
|
|
1403
1402
|
|
|
1404
|
-
// src/api/agents.ts
|
|
1405
|
-
var AgentsApi = class extends BaseApiClient {
|
|
1406
|
-
orgAgentJobsPath(orgUuid, agentUuid) {
|
|
1407
|
-
return `o/${encodeURIComponent(orgUuid)}/agents/${encodeURIComponent(agentUuid)}/jobs`;
|
|
1408
|
-
}
|
|
1409
|
-
/** List the current organization's teammate's operational Agent Jobs. */
|
|
1410
|
-
async getOrgAgentJobs(orgUuid, agentUuid, options = {}) {
|
|
1411
|
-
const params = new URLSearchParams();
|
|
1412
|
-
if (options.before) params.set("before", options.before);
|
|
1413
|
-
if (options.limit !== void 0) params.set("limit", String(options.limit));
|
|
1414
|
-
if (options.status) params.set("status", options.status);
|
|
1415
|
-
const search = params.toString();
|
|
1416
|
-
return this.fetch(
|
|
1417
|
-
`${this.orgAgentJobsPath(orgUuid, agentUuid)}${search ? `?${search}` : ""}`
|
|
1418
|
-
);
|
|
1419
|
-
}
|
|
1420
|
-
/** Stop one of the current teammate's Jobs and its active descendants. */
|
|
1421
|
-
async stopOrgAgentJob(orgUuid, agentUuid, jobUuid) {
|
|
1422
|
-
return this.fetch(
|
|
1423
|
-
`${this.orgAgentJobsPath(orgUuid, agentUuid)}/${encodeURIComponent(jobUuid)}/stop`,
|
|
1424
|
-
{ method: "POST", body: JSON.stringify({}) }
|
|
1425
|
-
);
|
|
1426
|
-
}
|
|
1427
|
-
/** List agents in a workspace with optional pagination, sorting, and search. */
|
|
1428
|
-
async getAgents(wid, options = {}) {
|
|
1429
|
-
const params = new URLSearchParams();
|
|
1430
|
-
if (options.page) params.append("page", options.page.toString());
|
|
1431
|
-
if (options.pageSize) params.append("pageSize", options.pageSize.toString());
|
|
1432
|
-
if (options.sortBy) params.append("sortBy", options.sortBy);
|
|
1433
|
-
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
1434
|
-
if (options.search) params.append("search", options.search);
|
|
1435
|
-
if (options.includeArchived)
|
|
1436
|
-
params.append("includeArchived", options.includeArchived.toString());
|
|
1437
|
-
return this.fetch(
|
|
1438
|
-
`w/${wid}/agents${params.toString() ? `?${params.toString()}` : ""}`
|
|
1439
|
-
);
|
|
1440
|
-
}
|
|
1441
|
-
/** Get a single agent by ID. */
|
|
1442
|
-
async getAgent(wid, id) {
|
|
1443
|
-
return this.fetch(`w/${wid}/agents/${id}`);
|
|
1444
|
-
}
|
|
1445
|
-
/** Create a new agent in a workspace. */
|
|
1446
|
-
async createAgent(wid, agent) {
|
|
1447
|
-
return this.fetch(`w/${wid}/agents`, {
|
|
1448
|
-
method: "POST",
|
|
1449
|
-
body: JSON.stringify(agent)
|
|
1450
|
-
});
|
|
1451
|
-
}
|
|
1452
|
-
/** Update an existing agent. */
|
|
1453
|
-
async updateAgent(wid, id, agent) {
|
|
1454
|
-
return this.fetch(`w/${wid}/agents/${id}`, {
|
|
1455
|
-
method: "PUT",
|
|
1456
|
-
body: JSON.stringify(agent)
|
|
1457
|
-
});
|
|
1458
|
-
}
|
|
1459
|
-
/** Delete an agent by ID, optionally forcing deletion of agents with active references. */
|
|
1460
|
-
async deleteAgent(wid, id, force) {
|
|
1461
|
-
const params = force ? "?force=true" : "";
|
|
1462
|
-
return this.fetch(`w/${wid}/agents/${id}${params}`, {
|
|
1463
|
-
method: "DELETE"
|
|
1464
|
-
});
|
|
1465
|
-
}
|
|
1466
|
-
/** Archive an agent, hiding it from default listings. */
|
|
1467
|
-
async archiveAgent(wid, id) {
|
|
1468
|
-
return this.fetch(`w/${wid}/agents/${id}/archive`, {
|
|
1469
|
-
method: "POST"
|
|
1470
|
-
});
|
|
1471
|
-
}
|
|
1472
|
-
/** Restore an archived agent back to active status. */
|
|
1473
|
-
async unarchiveAgent(wid, id) {
|
|
1474
|
-
return this.fetch(`w/${wid}/agents/${id}/unarchive`, {
|
|
1475
|
-
method: "POST"
|
|
1476
|
-
});
|
|
1477
|
-
}
|
|
1478
|
-
};
|
|
1479
|
-
|
|
1480
1403
|
// src/api/ai-models.ts
|
|
1481
1404
|
var AIModelsApi = class extends BaseApiClient {
|
|
1482
1405
|
/**
|
|
@@ -1794,7 +1717,7 @@ var AssignmentsApi = class extends BaseApiClient {
|
|
|
1794
1717
|
var VoiceApi = class extends BaseApiClient {
|
|
1795
1718
|
/** Generate a text-to-speech audio preview for a given voice model. */
|
|
1796
1719
|
async previewTTS(wid, request) {
|
|
1797
|
-
const response = await this.fetchRaw(`w/${wid}/
|
|
1720
|
+
const response = await this.fetchRaw(`w/${wid}/voice/tts-preview`, {
|
|
1798
1721
|
method: "POST",
|
|
1799
1722
|
headers: {
|
|
1800
1723
|
"Content-Type": "application/json"
|
|
@@ -1805,7 +1728,7 @@ var VoiceApi = class extends BaseApiClient {
|
|
|
1805
1728
|
}
|
|
1806
1729
|
/** Generate a thinking sound audio preview. */
|
|
1807
1730
|
async previewThinkingSound(wid, request) {
|
|
1808
|
-
const response = await this.fetchRaw(`w/${wid}/
|
|
1731
|
+
const response = await this.fetchRaw(`w/${wid}/voice/thinking-sound-preview`, {
|
|
1809
1732
|
method: "POST",
|
|
1810
1733
|
headers: {
|
|
1811
1734
|
"Content-Type": "application/json"
|
|
@@ -2745,6 +2668,29 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
2745
2668
|
`w/${wid}/chats${queryString ? `?${queryString}` : ""}`
|
|
2746
2669
|
);
|
|
2747
2670
|
}
|
|
2671
|
+
/**
|
|
2672
|
+
* Chats across the Workspaces an Operator Tools widget session signed in
|
|
2673
|
+
* for this organization shows, in queue order: waiting Chats first, longest
|
|
2674
|
+
* wait first, then the rest by most recent message. Each row names its
|
|
2675
|
+
* Workspace. `requiredScopes` leaves out every Workspace where the caller
|
|
2676
|
+
* lacks one of the view's scopes. Answers only to a widget session.
|
|
2677
|
+
*/
|
|
2678
|
+
async queryOrgChats(orgUuid, request) {
|
|
2679
|
+
return this.fetch(`o/${orgUuid}/chats/query`, {
|
|
2680
|
+
method: "POST",
|
|
2681
|
+
body: JSON.stringify({ ...request, countOnly: false })
|
|
2682
|
+
});
|
|
2683
|
+
}
|
|
2684
|
+
/**
|
|
2685
|
+
* How many Chats match the same organization read, without returning any
|
|
2686
|
+
* Chat, Workspace or Member. Answers only to a widget session.
|
|
2687
|
+
*/
|
|
2688
|
+
async countOrgChats(orgUuid, request) {
|
|
2689
|
+
return this.fetch(`o/${orgUuid}/chats/query`, {
|
|
2690
|
+
method: "POST",
|
|
2691
|
+
body: JSON.stringify({ ...request, countOnly: true })
|
|
2692
|
+
});
|
|
2693
|
+
}
|
|
2748
2694
|
/** Export multiple chats as a downloadable blob. */
|
|
2749
2695
|
async exportChats(wid, options = {}) {
|
|
2750
2696
|
const params = this.buildChatsQueryParams(options, false);
|
|
@@ -2963,11 +2909,9 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
2963
2909
|
}
|
|
2964
2910
|
/** Create a new chat. */
|
|
2965
2911
|
async createChat(wid, chat) {
|
|
2966
|
-
const { agentMemberId, ...rest } = chat;
|
|
2967
|
-
const payload = agentMemberId !== void 0 && rest.assistantMemberId === void 0 ? { ...rest, assistantMemberId: agentMemberId } : rest;
|
|
2968
2912
|
return this.fetch(`w/${wid}/chats`, {
|
|
2969
2913
|
method: "POST",
|
|
2970
|
-
body: JSON.stringify(
|
|
2914
|
+
body: JSON.stringify(chat)
|
|
2971
2915
|
});
|
|
2972
2916
|
}
|
|
2973
2917
|
/**
|
|
@@ -4024,7 +3968,6 @@ var SlackAppsApi = class extends BaseApiClient {
|
|
|
4024
3968
|
if (options.sortBy) params.append("sortBy", options.sortBy);
|
|
4025
3969
|
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
4026
3970
|
if (options.search) params.append("search", options.search);
|
|
4027
|
-
if (options.agentId !== void 0) params.set("agentId", String(options.agentId));
|
|
4028
3971
|
if (options.workflowId !== void 0) params.set("workflowId", String(options.workflowId));
|
|
4029
3972
|
if (options.managed !== void 0) params.set("managed", String(options.managed));
|
|
4030
3973
|
return this.fetch(
|
|
@@ -4154,14 +4097,6 @@ var TeamsAppsApi = class extends BaseApiClient {
|
|
|
4154
4097
|
`w/${wid}/app-connections/teams/apps/${appId}/installations${params.toString() ? `?${params.toString()}` : ""}`
|
|
4155
4098
|
);
|
|
4156
4099
|
}
|
|
4157
|
-
/**
|
|
4158
|
-
* The organization Bot Teams connection that delivers this workspace's
|
|
4159
|
-
* notifications, the connections it may choose, and the caller's own
|
|
4160
|
-
* readiness. Reads only; nothing is sent to Microsoft.
|
|
4161
|
-
*/
|
|
4162
|
-
async getTeamsNotificationDelivery(wid) {
|
|
4163
|
-
return this.fetch(`w/${wid}/notification-delivery/teams`);
|
|
4164
|
-
}
|
|
4165
4100
|
async getTeamsAppAccounts(wid, appId, options = {}) {
|
|
4166
4101
|
const params = new URLSearchParams();
|
|
4167
4102
|
if (options.page) params.append("page", options.page.toString());
|
|
@@ -4291,8 +4226,6 @@ var EventsApi = class extends BaseApiClient {
|
|
|
4291
4226
|
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
4292
4227
|
if (options.owner) params.append("owner", options.owner);
|
|
4293
4228
|
if (options.ownerId) params.append("ownerId", options.ownerId.toString());
|
|
4294
|
-
if (options.agentId) params.append("agentId", options.agentId.toString());
|
|
4295
|
-
if (options.agentOnly) params.append("agentOnly", "true");
|
|
4296
4229
|
return this.fetch(
|
|
4297
4230
|
`w/${wid}/routines${params.toString() ? `?${params.toString()}` : ""}`
|
|
4298
4231
|
);
|
|
@@ -5435,6 +5368,16 @@ var InboxesApi = class extends BaseApiClient {
|
|
|
5435
5368
|
async getInbox(wid, id) {
|
|
5436
5369
|
return this.fetch(`w/${wid}/inboxes/${id}`);
|
|
5437
5370
|
}
|
|
5371
|
+
/**
|
|
5372
|
+
* List the Inboxes a new email Chat can be sent from (`chats:write`).
|
|
5373
|
+
*
|
|
5374
|
+
* Only Inboxes the Member can see that can send now, as `id`, `name` and
|
|
5375
|
+
* `emailAddress`. `POST /chats` refuses an `inboxId` this list would not
|
|
5376
|
+
* offer.
|
|
5377
|
+
*/
|
|
5378
|
+
async getChatSenderInboxes(wid) {
|
|
5379
|
+
return this.fetch(`w/${wid}/inboxes/chat-senders`);
|
|
5380
|
+
}
|
|
5438
5381
|
/** Create a new inbox. */
|
|
5439
5382
|
async createInbox(wid, inbox) {
|
|
5440
5383
|
return this.fetch(`w/${wid}/inboxes`, {
|
|
@@ -6102,6 +6045,17 @@ var MembersApi = class extends BaseApiClient {
|
|
|
6102
6045
|
`o/${orgUuid}/activity/workspaces/${workspaceUuid}/members/${memberId}`
|
|
6103
6046
|
);
|
|
6104
6047
|
}
|
|
6048
|
+
/**
|
|
6049
|
+
* Members across the Workspaces an Operator Tools widget session signed in
|
|
6050
|
+
* for this organization shows, up to 20, each naming its Workspace. The
|
|
6051
|
+
* search text travels in the body. Answers only to a widget session.
|
|
6052
|
+
*/
|
|
6053
|
+
async searchOrgWorkspaceMembers(orgUuid, request) {
|
|
6054
|
+
return this.fetch(
|
|
6055
|
+
`o/${orgUuid}/workspace-members/search`,
|
|
6056
|
+
{ method: "POST", body: JSON.stringify(request) }
|
|
6057
|
+
);
|
|
6058
|
+
}
|
|
6105
6059
|
/** Create a new workspace member. */
|
|
6106
6060
|
async createWorkspaceMember(wid, data) {
|
|
6107
6061
|
return this.fetch(`w/${wid}/members`, {
|
|
@@ -6901,6 +6855,14 @@ var ActivityApi = class extends BaseApiClient {
|
|
|
6901
6855
|
body: JSON.stringify(request)
|
|
6902
6856
|
});
|
|
6903
6857
|
}
|
|
6858
|
+
/**
|
|
6859
|
+
* The Workspaces an Operator Tools widget session signed in for this
|
|
6860
|
+
* organization reaches, as `{uuid, name}` pairs for its Workspace labels.
|
|
6861
|
+
* Answers only to a widget session; `[]` when it reaches none.
|
|
6862
|
+
*/
|
|
6863
|
+
async listOrgWidgetWorkspaces(orgUuid) {
|
|
6864
|
+
return this.fetch(`o/${orgUuid}/widget-workspaces`, { method: "GET" });
|
|
6865
|
+
}
|
|
6904
6866
|
/** The org mount's badge numbers. */
|
|
6905
6867
|
async getOrgActivityCounts(orgUuid, request = {}) {
|
|
6906
6868
|
return this.fetch(`o/${orgUuid}/activity/counts`, {
|
|
@@ -7324,14 +7286,25 @@ var NotificationRulesApi = class extends BaseApiClient {
|
|
|
7324
7286
|
});
|
|
7325
7287
|
}
|
|
7326
7288
|
/**
|
|
7327
|
-
* Approved, available shared destinations (Teams channels) a
|
|
7328
|
-
* rule or Action may name. Choosing one never grants approval.
|
|
7289
|
+
* Approved, available shared destinations (Teams and Slack channels) a
|
|
7290
|
+
* notification rule or Action may name. Choosing one never grants approval.
|
|
7329
7291
|
*/
|
|
7330
7292
|
async getNotificationDestinations(wid) {
|
|
7331
7293
|
return this.fetch(
|
|
7332
7294
|
`w/${wid}/notification-destinations`
|
|
7333
7295
|
);
|
|
7334
7296
|
}
|
|
7297
|
+
/**
|
|
7298
|
+
* The organization Bot connection that delivers this workspace's
|
|
7299
|
+
* notifications on one provider (`teams` or `slack`), the connections it
|
|
7300
|
+
* may choose, and the caller's own readiness. Reads only; nothing is sent
|
|
7301
|
+
* to the provider.
|
|
7302
|
+
*/
|
|
7303
|
+
async getNotificationDelivery(wid, provider) {
|
|
7304
|
+
return this.fetch(
|
|
7305
|
+
`w/${wid}/notification-delivery/${provider}`
|
|
7306
|
+
);
|
|
7307
|
+
}
|
|
7335
7308
|
/** Delete a notification rule. */
|
|
7336
7309
|
async deleteNotificationRule(wid, ruleId) {
|
|
7337
7310
|
return this.fetch(`w/${wid}/notification-rules/${ruleId}`, {
|
|
@@ -7398,11 +7371,16 @@ var OperatorApi = class extends BaseApiClient {
|
|
|
7398
7371
|
`w/${wid}/operator/chats/${chatId}/messages?limit=${limit}&offset=${offset}`
|
|
7399
7372
|
);
|
|
7400
7373
|
}
|
|
7401
|
-
/**
|
|
7402
|
-
|
|
7374
|
+
/**
|
|
7375
|
+
* Send a message in an operator chat.
|
|
7376
|
+
*
|
|
7377
|
+
* `subject` applies to an email Chat only: required while the Chat holds no
|
|
7378
|
+
* linked Email (`operatorReplyNeedsSubject`), refused once it holds one.
|
|
7379
|
+
*/
|
|
7380
|
+
async sendOperatorMessage(wid, chatId, content, subject) {
|
|
7403
7381
|
return this.fetch(`w/${wid}/operator/chats/${chatId}/messages`, {
|
|
7404
7382
|
method: "POST",
|
|
7405
|
-
body: JSON.stringify({ content })
|
|
7383
|
+
body: JSON.stringify(subject === void 0 ? { content } : { content, subject })
|
|
7406
7384
|
});
|
|
7407
7385
|
}
|
|
7408
7386
|
};
|
|
@@ -8213,6 +8191,35 @@ var OrgApi = class extends BaseApiClient {
|
|
|
8213
8191
|
async getLegalEntity(orgUuid, legalEntityUuid) {
|
|
8214
8192
|
return this.fetch(`o/${orgUuid}/legal-entities/${legalEntityUuid}`);
|
|
8215
8193
|
}
|
|
8194
|
+
/** The columns a business CSV import reads, and the row and size limits on its file. */
|
|
8195
|
+
async getBusinessImportColumns(orgUuid) {
|
|
8196
|
+
return this.fetch(
|
|
8197
|
+
`o/${orgUuid}/legal-entities/import/columns`
|
|
8198
|
+
);
|
|
8199
|
+
}
|
|
8200
|
+
/** The business import template: CSV text whose only row is the header. */
|
|
8201
|
+
async getBusinessImportTemplate(orgUuid) {
|
|
8202
|
+
const response = await this.fetchRaw(`o/${orgUuid}/legal-entities/import/template`);
|
|
8203
|
+
return response.text();
|
|
8204
|
+
}
|
|
8205
|
+
/** Classify each row of a business CSV without writing; returns the token its import needs. */
|
|
8206
|
+
async previewBusinessImport(orgUuid, file) {
|
|
8207
|
+
return this.fetch(
|
|
8208
|
+
`o/${orgUuid}/legal-entities/import/preview`,
|
|
8209
|
+
{ method: "POST", body: businessImportUpload(file) }
|
|
8210
|
+
);
|
|
8211
|
+
}
|
|
8212
|
+
/** Import a business CSV; without a `previewPlanToken` it previews the file first. */
|
|
8213
|
+
async importBusinesses(orgUuid, file, previewPlanToken) {
|
|
8214
|
+
const token = previewPlanToken ?? (await this.previewBusinessImport(orgUuid, file)).previewPlanToken;
|
|
8215
|
+
if (!token) throw new Error("The business import preview returned no plan token");
|
|
8216
|
+
const body = businessImportUpload(file);
|
|
8217
|
+
body.append("previewPlanToken", token);
|
|
8218
|
+
return this.fetch(`o/${orgUuid}/legal-entities/import`, {
|
|
8219
|
+
method: "POST",
|
|
8220
|
+
body
|
|
8221
|
+
});
|
|
8222
|
+
}
|
|
8216
8223
|
/**
|
|
8217
8224
|
* Read one registration draft for a legal entity.
|
|
8218
8225
|
*
|
|
@@ -8760,10 +8767,41 @@ var OrgApi = class extends BaseApiClient {
|
|
|
8760
8767
|
function businessProfilePath(orgUuid, legalEntityUuid) {
|
|
8761
8768
|
return legalEntityUuid ? `o/${orgUuid}/legal-entities/${legalEntityUuid}/business-profile` : `o/${orgUuid}/business-profile`;
|
|
8762
8769
|
}
|
|
8770
|
+
function businessImportUpload(file) {
|
|
8771
|
+
const body = new FormData();
|
|
8772
|
+
const name = "name" in file && typeof file.name === "string" ? file.name : "businesses.csv";
|
|
8773
|
+
body.append("file", file, name);
|
|
8774
|
+
return body;
|
|
8775
|
+
}
|
|
8763
8776
|
function campaignQuery(options) {
|
|
8764
8777
|
return options?.campaignUuid ? `?campaignUuid=${encodeURIComponent(options.campaignUuid)}` : "";
|
|
8765
8778
|
}
|
|
8766
8779
|
|
|
8780
|
+
// src/api/bot-jobs.ts
|
|
8781
|
+
var BotJobsApi = class extends BaseApiClient {
|
|
8782
|
+
botJobsPath(orgUuid, agentUuid) {
|
|
8783
|
+
return `o/${encodeURIComponent(orgUuid)}/agents/${encodeURIComponent(agentUuid)}/jobs`;
|
|
8784
|
+
}
|
|
8785
|
+
/** List the organization Bot's operational Jobs. */
|
|
8786
|
+
async getBotJobs(orgUuid, agentUuid, options = {}) {
|
|
8787
|
+
const params = new URLSearchParams();
|
|
8788
|
+
if (options.before) params.set("before", options.before);
|
|
8789
|
+
if (options.limit !== void 0) params.set("limit", String(options.limit));
|
|
8790
|
+
if (options.status) params.set("status", options.status);
|
|
8791
|
+
const search = params.toString();
|
|
8792
|
+
return this.fetch(
|
|
8793
|
+
`${this.botJobsPath(orgUuid, agentUuid)}${search ? `?${search}` : ""}`
|
|
8794
|
+
);
|
|
8795
|
+
}
|
|
8796
|
+
/** Stop one of the organization Bot's Jobs and its active descendants. */
|
|
8797
|
+
async stopBotJob(orgUuid, agentUuid, jobUuid) {
|
|
8798
|
+
return this.fetch(
|
|
8799
|
+
`${this.botJobsPath(orgUuid, agentUuid)}/${encodeURIComponent(jobUuid)}/stop`,
|
|
8800
|
+
{ method: "POST", body: JSON.stringify({}) }
|
|
8801
|
+
);
|
|
8802
|
+
}
|
|
8803
|
+
};
|
|
8804
|
+
|
|
8767
8805
|
// src/api/oauth.ts
|
|
8768
8806
|
function getOAuthPath(providerSlug, action) {
|
|
8769
8807
|
if (providerSlug === "google_calendar") {
|
|
@@ -8909,9 +8947,10 @@ var PhoneNumbersApi = class extends BaseApiClient {
|
|
|
8909
8947
|
* The numbers a Chat can be started from, for a Member with `chats:write`.
|
|
8910
8948
|
*
|
|
8911
8949
|
* Every non-archived workspace number in a slim shape (`id`, `number`,
|
|
8912
|
-
* `name`, `isMapped`, `enableWhatsApp`
|
|
8913
|
-
* it
|
|
8914
|
-
*
|
|
8950
|
+
* `name`, `isMapped`, `enableWhatsApp`, `isWorkspaceDefault`, and whether
|
|
8951
|
+
* it can send SMS now, `canSendSms`, or place a call now, `canPlaceCall`)
|
|
8952
|
+
* — no phone administration data, so it needs no `phones:read`. A row
|
|
8953
|
+
* describes the number, not permission to send.
|
|
8915
8954
|
*/
|
|
8916
8955
|
async getChatPhoneNumbers(wid) {
|
|
8917
8956
|
return this.fetch(`w/${wid}/phone-numbers/chat-senders`);
|
|
@@ -10468,6 +10507,12 @@ var HubspotApi = class extends BaseApiClient {
|
|
|
10468
10507
|
`w/${wid}/app-connections/hubspot/sync-settings/hs-properties?objectType=deals`
|
|
10469
10508
|
);
|
|
10470
10509
|
}
|
|
10510
|
+
/** The portal's active deal pipelines with their active stages. */
|
|
10511
|
+
async getHubspotDealPipelines(wid) {
|
|
10512
|
+
return this.fetch(
|
|
10513
|
+
`w/${wid}/app-connections/hubspot/sync-settings/deal-pipelines`
|
|
10514
|
+
);
|
|
10515
|
+
}
|
|
10471
10516
|
/** The portal's Meetings booking links, or `missing_scope` without the scheduler scope. */
|
|
10472
10517
|
async getHubspotMeetingLinks(wid) {
|
|
10473
10518
|
return this.fetch(
|
|
@@ -10684,15 +10729,21 @@ var SitesApi = class extends BaseApiClient {
|
|
|
10684
10729
|
/**
|
|
10685
10730
|
* Get a theme's settings schema, the site's saved values, and capabilities.
|
|
10686
10731
|
* Pass `theme` to resolve the schema for a theme other than the saved one
|
|
10687
|
-
* (e.g. one the builder has selected but not yet saved).
|
|
10732
|
+
* (e.g. one the builder has selected but not yet saved). Pass `resolved: true` to
|
|
10733
|
+
* also receive `resolvedValues`, the saved theme's values as its render resolves them.
|
|
10688
10734
|
*/
|
|
10689
|
-
async getThemeSettings(wid, siteId, theme) {
|
|
10690
|
-
const
|
|
10735
|
+
async getThemeSettings(wid, siteId, theme, options) {
|
|
10736
|
+
const params = new URLSearchParams();
|
|
10737
|
+
if (theme) params.set("theme", theme);
|
|
10738
|
+
if (options?.resolved) params.set("resolved", "true");
|
|
10739
|
+
const search = params.toString();
|
|
10740
|
+
const query2 = search ? `?${search}` : "";
|
|
10691
10741
|
return this.fetch(`w/${wid}/sites/${siteId}/theme-settings${query2}`);
|
|
10692
10742
|
}
|
|
10693
|
-
/** Save values for the active theme's settings (validated against the schema). */
|
|
10694
|
-
async updateThemeSettings(wid, siteId, values) {
|
|
10695
|
-
|
|
10743
|
+
/** Save values for the active theme's settings (validated against the schema). Pass `resolved: true` to also receive `resolvedValues`. */
|
|
10744
|
+
async updateThemeSettings(wid, siteId, values, options) {
|
|
10745
|
+
const query2 = options?.resolved ? "?resolved=true" : "";
|
|
10746
|
+
return this.fetch(`w/${wid}/sites/${siteId}/theme-settings${query2}`, {
|
|
10696
10747
|
method: "PUT",
|
|
10697
10748
|
body: JSON.stringify({ values })
|
|
10698
10749
|
});
|
|
@@ -12685,7 +12736,6 @@ var MemberType = /* @__PURE__ */ ((MemberType2) => {
|
|
|
12685
12736
|
MemberType2["ANONYMOUS"] = "anonymous";
|
|
12686
12737
|
MemberType2["TEST"] = "test";
|
|
12687
12738
|
MemberType2["MEMBER"] = "member";
|
|
12688
|
-
MemberType2["AGENT"] = "agent";
|
|
12689
12739
|
MemberType2["BUSINESS"] = "business";
|
|
12690
12740
|
return MemberType2;
|
|
12691
12741
|
})(MemberType || {});
|
|
@@ -12814,6 +12864,8 @@ var EventRuleActionType = /* @__PURE__ */ ((EventRuleActionType2) => {
|
|
|
12814
12864
|
EventRuleActionType2["EMAIL_SEND"] = "email:send";
|
|
12815
12865
|
EventRuleActionType2["INVOKE_CUSTOM_TOOL"] = "custom_tool:invoke";
|
|
12816
12866
|
EventRuleActionType2["HUBSPOT_CREATE_DEAL_FROM_BOOKING"] = "hubspot:create_deal_from_booking";
|
|
12867
|
+
EventRuleActionType2["HUBSPOT_UPDATE_CONTACT_DEALS"] = "hubspot:update_contact_deals";
|
|
12868
|
+
EventRuleActionType2["HUBSPOT_UPDATE_CONTACT_PROPERTIES"] = "hubspot:update_contact_properties";
|
|
12817
12869
|
EventRuleActionType2["ASSIGNMENT_CONCLUDE"] = "assignment:conclude";
|
|
12818
12870
|
EventRuleActionType2["JOURNEY_ENROLL"] = "journey:enroll";
|
|
12819
12871
|
EventRuleActionType2["SMS_SEND"] = "sms:send";
|
|
@@ -13401,14 +13453,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13401
13453
|
"viewedMemberTypes": [
|
|
13402
13454
|
"anonymous",
|
|
13403
13455
|
"test",
|
|
13404
|
-
"member"
|
|
13405
|
-
"agent"
|
|
13456
|
+
"member"
|
|
13406
13457
|
],
|
|
13407
13458
|
"relatedMemberTypes": [
|
|
13408
13459
|
"anonymous",
|
|
13409
13460
|
"test",
|
|
13410
|
-
"member"
|
|
13411
|
-
"agent"
|
|
13461
|
+
"member"
|
|
13412
13462
|
]
|
|
13413
13463
|
},
|
|
13414
13464
|
{
|
|
@@ -13419,14 +13469,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13419
13469
|
"viewedMemberTypes": [
|
|
13420
13470
|
"anonymous",
|
|
13421
13471
|
"test",
|
|
13422
|
-
"member"
|
|
13423
|
-
"agent"
|
|
13472
|
+
"member"
|
|
13424
13473
|
],
|
|
13425
13474
|
"relatedMemberTypes": [
|
|
13426
13475
|
"anonymous",
|
|
13427
13476
|
"test",
|
|
13428
|
-
"member"
|
|
13429
|
-
"agent"
|
|
13477
|
+
"member"
|
|
13430
13478
|
]
|
|
13431
13479
|
}
|
|
13432
13480
|
]
|
|
@@ -13445,14 +13493,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13445
13493
|
"viewedMemberTypes": [
|
|
13446
13494
|
"anonymous",
|
|
13447
13495
|
"test",
|
|
13448
|
-
"member"
|
|
13449
|
-
"agent"
|
|
13496
|
+
"member"
|
|
13450
13497
|
],
|
|
13451
13498
|
"relatedMemberTypes": [
|
|
13452
13499
|
"anonymous",
|
|
13453
13500
|
"test",
|
|
13454
|
-
"member"
|
|
13455
|
-
"agent"
|
|
13501
|
+
"member"
|
|
13456
13502
|
]
|
|
13457
13503
|
}
|
|
13458
13504
|
]
|
|
@@ -13471,14 +13517,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13471
13517
|
"viewedMemberTypes": [
|
|
13472
13518
|
"anonymous",
|
|
13473
13519
|
"test",
|
|
13474
|
-
"member"
|
|
13475
|
-
"agent"
|
|
13520
|
+
"member"
|
|
13476
13521
|
],
|
|
13477
13522
|
"relatedMemberTypes": [
|
|
13478
13523
|
"anonymous",
|
|
13479
13524
|
"test",
|
|
13480
|
-
"member"
|
|
13481
|
-
"agent"
|
|
13525
|
+
"member"
|
|
13482
13526
|
]
|
|
13483
13527
|
}
|
|
13484
13528
|
]
|
|
@@ -13497,14 +13541,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13497
13541
|
"viewedMemberTypes": [
|
|
13498
13542
|
"anonymous",
|
|
13499
13543
|
"test",
|
|
13500
|
-
"member"
|
|
13501
|
-
"agent"
|
|
13544
|
+
"member"
|
|
13502
13545
|
],
|
|
13503
13546
|
"relatedMemberTypes": [
|
|
13504
13547
|
"anonymous",
|
|
13505
13548
|
"test",
|
|
13506
|
-
"member"
|
|
13507
|
-
"agent"
|
|
13549
|
+
"member"
|
|
13508
13550
|
]
|
|
13509
13551
|
},
|
|
13510
13552
|
{
|
|
@@ -13515,14 +13557,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13515
13557
|
"viewedMemberTypes": [
|
|
13516
13558
|
"anonymous",
|
|
13517
13559
|
"test",
|
|
13518
|
-
"member"
|
|
13519
|
-
"agent"
|
|
13560
|
+
"member"
|
|
13520
13561
|
],
|
|
13521
13562
|
"relatedMemberTypes": [
|
|
13522
13563
|
"anonymous",
|
|
13523
13564
|
"test",
|
|
13524
|
-
"member"
|
|
13525
|
-
"agent"
|
|
13565
|
+
"member"
|
|
13526
13566
|
]
|
|
13527
13567
|
}
|
|
13528
13568
|
]
|
|
@@ -13541,14 +13581,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13541
13581
|
"viewedMemberTypes": [
|
|
13542
13582
|
"anonymous",
|
|
13543
13583
|
"test",
|
|
13544
|
-
"member"
|
|
13545
|
-
"agent"
|
|
13584
|
+
"member"
|
|
13546
13585
|
],
|
|
13547
13586
|
"relatedMemberTypes": [
|
|
13548
13587
|
"anonymous",
|
|
13549
13588
|
"test",
|
|
13550
|
-
"member"
|
|
13551
|
-
"agent"
|
|
13589
|
+
"member"
|
|
13552
13590
|
]
|
|
13553
13591
|
},
|
|
13554
13592
|
{
|
|
@@ -13559,14 +13597,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13559
13597
|
"viewedMemberTypes": [
|
|
13560
13598
|
"anonymous",
|
|
13561
13599
|
"test",
|
|
13562
|
-
"member"
|
|
13563
|
-
"agent"
|
|
13600
|
+
"member"
|
|
13564
13601
|
],
|
|
13565
13602
|
"relatedMemberTypes": [
|
|
13566
13603
|
"anonymous",
|
|
13567
13604
|
"test",
|
|
13568
|
-
"member"
|
|
13569
|
-
"agent"
|
|
13605
|
+
"member"
|
|
13570
13606
|
]
|
|
13571
13607
|
}
|
|
13572
13608
|
]
|
|
@@ -13585,14 +13621,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13585
13621
|
"viewedMemberTypes": [
|
|
13586
13622
|
"anonymous",
|
|
13587
13623
|
"test",
|
|
13588
|
-
"member"
|
|
13589
|
-
"agent"
|
|
13624
|
+
"member"
|
|
13590
13625
|
],
|
|
13591
13626
|
"relatedMemberTypes": [
|
|
13592
13627
|
"anonymous",
|
|
13593
13628
|
"test",
|
|
13594
|
-
"member"
|
|
13595
|
-
"agent"
|
|
13629
|
+
"member"
|
|
13596
13630
|
]
|
|
13597
13631
|
},
|
|
13598
13632
|
{
|
|
@@ -13603,14 +13637,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13603
13637
|
"viewedMemberTypes": [
|
|
13604
13638
|
"anonymous",
|
|
13605
13639
|
"test",
|
|
13606
|
-
"member"
|
|
13607
|
-
"agent"
|
|
13640
|
+
"member"
|
|
13608
13641
|
],
|
|
13609
13642
|
"relatedMemberTypes": [
|
|
13610
13643
|
"anonymous",
|
|
13611
13644
|
"test",
|
|
13612
|
-
"member"
|
|
13613
|
-
"agent"
|
|
13645
|
+
"member"
|
|
13614
13646
|
]
|
|
13615
13647
|
}
|
|
13616
13648
|
]
|
|
@@ -13629,14 +13661,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13629
13661
|
"viewedMemberTypes": [
|
|
13630
13662
|
"anonymous",
|
|
13631
13663
|
"test",
|
|
13632
|
-
"member"
|
|
13633
|
-
"agent"
|
|
13664
|
+
"member"
|
|
13634
13665
|
],
|
|
13635
13666
|
"relatedMemberTypes": [
|
|
13636
13667
|
"anonymous",
|
|
13637
13668
|
"test",
|
|
13638
|
-
"member"
|
|
13639
|
-
"agent"
|
|
13669
|
+
"member"
|
|
13640
13670
|
]
|
|
13641
13671
|
},
|
|
13642
13672
|
{
|
|
@@ -13647,14 +13677,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13647
13677
|
"viewedMemberTypes": [
|
|
13648
13678
|
"anonymous",
|
|
13649
13679
|
"test",
|
|
13650
|
-
"member"
|
|
13651
|
-
"agent"
|
|
13680
|
+
"member"
|
|
13652
13681
|
],
|
|
13653
13682
|
"relatedMemberTypes": [
|
|
13654
13683
|
"anonymous",
|
|
13655
13684
|
"test",
|
|
13656
|
-
"member"
|
|
13657
|
-
"agent"
|
|
13685
|
+
"member"
|
|
13658
13686
|
]
|
|
13659
13687
|
}
|
|
13660
13688
|
]
|
|
@@ -13673,14 +13701,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13673
13701
|
"viewedMemberTypes": [
|
|
13674
13702
|
"anonymous",
|
|
13675
13703
|
"test",
|
|
13676
|
-
"member"
|
|
13677
|
-
"agent"
|
|
13704
|
+
"member"
|
|
13678
13705
|
],
|
|
13679
13706
|
"relatedMemberTypes": [
|
|
13680
13707
|
"anonymous",
|
|
13681
13708
|
"test",
|
|
13682
|
-
"member"
|
|
13683
|
-
"agent"
|
|
13709
|
+
"member"
|
|
13684
13710
|
]
|
|
13685
13711
|
},
|
|
13686
13712
|
{
|
|
@@ -13691,14 +13717,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13691
13717
|
"viewedMemberTypes": [
|
|
13692
13718
|
"anonymous",
|
|
13693
13719
|
"test",
|
|
13694
|
-
"member"
|
|
13695
|
-
"agent"
|
|
13720
|
+
"member"
|
|
13696
13721
|
],
|
|
13697
13722
|
"relatedMemberTypes": [
|
|
13698
13723
|
"anonymous",
|
|
13699
13724
|
"test",
|
|
13700
|
-
"member"
|
|
13701
|
-
"agent"
|
|
13725
|
+
"member"
|
|
13702
13726
|
]
|
|
13703
13727
|
}
|
|
13704
13728
|
]
|
|
@@ -13717,14 +13741,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13717
13741
|
"viewedMemberTypes": [
|
|
13718
13742
|
"anonymous",
|
|
13719
13743
|
"test",
|
|
13720
|
-
"member"
|
|
13721
|
-
"agent"
|
|
13744
|
+
"member"
|
|
13722
13745
|
],
|
|
13723
13746
|
"relatedMemberTypes": [
|
|
13724
13747
|
"anonymous",
|
|
13725
13748
|
"test",
|
|
13726
|
-
"member"
|
|
13727
|
-
"agent"
|
|
13749
|
+
"member"
|
|
13728
13750
|
]
|
|
13729
13751
|
},
|
|
13730
13752
|
{
|
|
@@ -13735,14 +13757,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13735
13757
|
"viewedMemberTypes": [
|
|
13736
13758
|
"anonymous",
|
|
13737
13759
|
"test",
|
|
13738
|
-
"member"
|
|
13739
|
-
"agent"
|
|
13760
|
+
"member"
|
|
13740
13761
|
],
|
|
13741
13762
|
"relatedMemberTypes": [
|
|
13742
13763
|
"anonymous",
|
|
13743
13764
|
"test",
|
|
13744
|
-
"member"
|
|
13745
|
-
"agent"
|
|
13765
|
+
"member"
|
|
13746
13766
|
]
|
|
13747
13767
|
}
|
|
13748
13768
|
]
|
|
@@ -13761,14 +13781,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13761
13781
|
"viewedMemberTypes": [
|
|
13762
13782
|
"anonymous",
|
|
13763
13783
|
"test",
|
|
13764
|
-
"member"
|
|
13765
|
-
"agent"
|
|
13784
|
+
"member"
|
|
13766
13785
|
],
|
|
13767
13786
|
"relatedMemberTypes": [
|
|
13768
13787
|
"anonymous",
|
|
13769
13788
|
"test",
|
|
13770
|
-
"member"
|
|
13771
|
-
"agent"
|
|
13789
|
+
"member"
|
|
13772
13790
|
]
|
|
13773
13791
|
},
|
|
13774
13792
|
{
|
|
@@ -13779,14 +13797,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13779
13797
|
"viewedMemberTypes": [
|
|
13780
13798
|
"anonymous",
|
|
13781
13799
|
"test",
|
|
13782
|
-
"member"
|
|
13783
|
-
"agent"
|
|
13800
|
+
"member"
|
|
13784
13801
|
],
|
|
13785
13802
|
"relatedMemberTypes": [
|
|
13786
13803
|
"anonymous",
|
|
13787
13804
|
"test",
|
|
13788
|
-
"member"
|
|
13789
|
-
"agent"
|
|
13805
|
+
"member"
|
|
13790
13806
|
]
|
|
13791
13807
|
}
|
|
13792
13808
|
]
|
|
@@ -13805,14 +13821,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13805
13821
|
"viewedMemberTypes": [
|
|
13806
13822
|
"anonymous",
|
|
13807
13823
|
"test",
|
|
13808
|
-
"member"
|
|
13809
|
-
"agent"
|
|
13824
|
+
"member"
|
|
13810
13825
|
],
|
|
13811
13826
|
"relatedMemberTypes": [
|
|
13812
13827
|
"anonymous",
|
|
13813
13828
|
"test",
|
|
13814
|
-
"member"
|
|
13815
|
-
"agent"
|
|
13829
|
+
"member"
|
|
13816
13830
|
]
|
|
13817
13831
|
},
|
|
13818
13832
|
{
|
|
@@ -13823,14 +13837,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13823
13837
|
"viewedMemberTypes": [
|
|
13824
13838
|
"anonymous",
|
|
13825
13839
|
"test",
|
|
13826
|
-
"member"
|
|
13827
|
-
"agent"
|
|
13840
|
+
"member"
|
|
13828
13841
|
],
|
|
13829
13842
|
"relatedMemberTypes": [
|
|
13830
13843
|
"anonymous",
|
|
13831
13844
|
"test",
|
|
13832
|
-
"member"
|
|
13833
|
-
"agent"
|
|
13845
|
+
"member"
|
|
13834
13846
|
]
|
|
13835
13847
|
}
|
|
13836
13848
|
]
|
|
@@ -14976,7 +14988,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
14976
14988
|
abilities: new AbilitiesApi(apiKey, baseUrl, customFetch),
|
|
14977
14989
|
accessGrants: new AccessGrantsApi(apiKey, baseUrl, customFetch),
|
|
14978
14990
|
agentTasks: new AgentTasksApi(apiKey, baseUrl, customFetch),
|
|
14979
|
-
|
|
14991
|
+
botJobs: new BotJobsApi(apiKey, baseUrl, customFetch),
|
|
14980
14992
|
aiModels: new AIModelsApi(apiKey, baseUrl, customFetch),
|
|
14981
14993
|
apiKeys: new ApiKeysApi(apiKey, baseUrl, customFetch),
|
|
14982
14994
|
appLinks: new AppLinksApi(apiKey, baseUrl, customFetch),
|
|
@@ -15065,7 +15077,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15065
15077
|
"addWorkspaceSupportRequestParticipants",
|
|
15066
15078
|
"advanceStep",
|
|
15067
15079
|
"approveWorkspaceInvitation",
|
|
15068
|
-
"archiveAgent",
|
|
15069
15080
|
"archiveChat",
|
|
15070
15081
|
"archiveDataType",
|
|
15071
15082
|
"archiveJourney",
|
|
@@ -15121,7 +15132,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15121
15132
|
"convertFile",
|
|
15122
15133
|
"createAbility",
|
|
15123
15134
|
"createAccessGrant",
|
|
15124
|
-
"createAgent",
|
|
15125
15135
|
"createApiKey",
|
|
15126
15136
|
"createAssignment",
|
|
15127
15137
|
"bindInstallationSlots",
|
|
@@ -15204,7 +15214,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15204
15214
|
"createWorkspaceRealtimeLoginToken",
|
|
15205
15215
|
"createWorkspaceSupportRequest",
|
|
15206
15216
|
"deleteAbility",
|
|
15207
|
-
"deleteAgent",
|
|
15208
15217
|
"deleteAssignment",
|
|
15209
15218
|
"deleteCalendar",
|
|
15210
15219
|
"deleteCalendarEvent",
|
|
@@ -15343,12 +15352,10 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15343
15352
|
"getAbilityTypes",
|
|
15344
15353
|
"getAccessGrant",
|
|
15345
15354
|
"getAccessGrants",
|
|
15346
|
-
"getAgent",
|
|
15347
15355
|
"getAgentModeAttention",
|
|
15348
15356
|
"getAgentTask",
|
|
15349
15357
|
"getAgentTaskMessages",
|
|
15350
15358
|
"getAgentTasks",
|
|
15351
|
-
"getAgents",
|
|
15352
15359
|
"getAnonymousResolution",
|
|
15353
15360
|
"getAnonymousFormSubmission",
|
|
15354
15361
|
"getAnonymousFormSchema",
|
|
@@ -15548,6 +15555,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15548
15555
|
"getPatientSyncStatus",
|
|
15549
15556
|
"getHubspotContactProperties",
|
|
15550
15557
|
"getHubspotDealProperties",
|
|
15558
|
+
"getHubspotDealPipelines",
|
|
15551
15559
|
"getHubspotForms",
|
|
15552
15560
|
"getHubspotMeetingLinks",
|
|
15553
15561
|
"getHubspotCrmObjects",
|
|
@@ -15567,6 +15575,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15567
15575
|
"getImportReadiness",
|
|
15568
15576
|
"rebuildImportSkippedRules",
|
|
15569
15577
|
"getInbox",
|
|
15578
|
+
"getChatSenderInboxes",
|
|
15570
15579
|
"getInboxEmail",
|
|
15571
15580
|
"getInboxEmails",
|
|
15572
15581
|
"getInboxArchiveBlockers",
|
|
@@ -15631,6 +15640,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15631
15640
|
"getMyGivenGrants",
|
|
15632
15641
|
"getMyReceivedGrants",
|
|
15633
15642
|
"getNotification",
|
|
15643
|
+
"getNotificationDelivery",
|
|
15634
15644
|
"getNotificationDestinations",
|
|
15635
15645
|
"getNotificationRules",
|
|
15636
15646
|
"getNotifications",
|
|
@@ -15715,7 +15725,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15715
15725
|
"getTeamsApps",
|
|
15716
15726
|
"getTeamsConversations",
|
|
15717
15727
|
"getTeamsInstallations",
|
|
15718
|
-
"getTeamsNotificationDelivery",
|
|
15719
15728
|
"getTemplateContext",
|
|
15720
15729
|
"getChatTestRun",
|
|
15721
15730
|
"getTestChatRun",
|
|
@@ -15944,7 +15953,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15944
15953
|
"simulateJourney",
|
|
15945
15954
|
"testRunJourney",
|
|
15946
15955
|
"toggleFieldIndex",
|
|
15947
|
-
"unarchiveAgent",
|
|
15948
15956
|
"unarchiveChat",
|
|
15949
15957
|
"unarchiveDataType",
|
|
15950
15958
|
"unarchiveMember",
|
|
@@ -15963,7 +15971,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15963
15971
|
"unlinkMemberFromSalesforce",
|
|
15964
15972
|
"unregisterPushSubscription",
|
|
15965
15973
|
"updateAbility",
|
|
15966
|
-
"updateAgent",
|
|
15967
15974
|
"updateAssignment",
|
|
15968
15975
|
"updateCalendar",
|
|
15969
15976
|
"updateCalendarEvent",
|
|
@@ -16111,17 +16118,10 @@ function bindAgentTasksMethods(target, api) {
|
|
|
16111
16118
|
target.getAgentTaskMessages = api.getAgentTaskMessages.bind(api);
|
|
16112
16119
|
}
|
|
16113
16120
|
|
|
16114
|
-
// src/client/bindings/
|
|
16115
|
-
function
|
|
16116
|
-
target.
|
|
16117
|
-
target.
|
|
16118
|
-
target.createAgent = agents.createAgent.bind(agents);
|
|
16119
|
-
target.updateAgent = agents.updateAgent.bind(agents);
|
|
16120
|
-
target.deleteAgent = agents.deleteAgent.bind(agents);
|
|
16121
|
-
target.archiveAgent = agents.archiveAgent.bind(agents);
|
|
16122
|
-
target.unarchiveAgent = agents.unarchiveAgent.bind(agents);
|
|
16123
|
-
target.getOrgAgentJobs = agents.getOrgAgentJobs.bind(agents);
|
|
16124
|
-
target.stopOrgAgentJob = agents.stopOrgAgentJob.bind(agents);
|
|
16121
|
+
// src/client/bindings/bot-jobs.ts
|
|
16122
|
+
function bindBotJobsMethods(target, botJobs) {
|
|
16123
|
+
target.getBotJobs = botJobs.getBotJobs.bind(botJobs);
|
|
16124
|
+
target.stopBotJob = botJobs.stopBotJob.bind(botJobs);
|
|
16125
16125
|
}
|
|
16126
16126
|
|
|
16127
16127
|
// src/client/bindings/tasks.ts
|
|
@@ -16150,6 +16150,8 @@ function bindChatsMethods(target, chats) {
|
|
|
16150
16150
|
target.createChatInteractionSession = chats.createChatInteractionSession.bind(chats);
|
|
16151
16151
|
target.transitionChatInteractionSession = chats.transitionChatInteractionSession.bind(chats);
|
|
16152
16152
|
target.getChats = chats.getChats.bind(chats);
|
|
16153
|
+
target.queryOrgChats = chats.queryOrgChats.bind(chats);
|
|
16154
|
+
target.countOrgChats = chats.countOrgChats.bind(chats);
|
|
16153
16155
|
target.getChat = chats.getChat.bind(chats);
|
|
16154
16156
|
target.getChatAttention = chats.getChatAttention.bind(chats);
|
|
16155
16157
|
target.getChatByUuid = chats.getChatByUuid.bind(chats);
|
|
@@ -16253,6 +16255,7 @@ function bindActivityMethods(target, activity) {
|
|
|
16253
16255
|
target.queryOrgActivityOneView = activity.queryOrgActivityOneView.bind(activity);
|
|
16254
16256
|
target.queryOrgActivityDigest = activity.queryOrgActivityDigest.bind(activity);
|
|
16255
16257
|
target.getOrgActivityCounts = activity.getOrgActivityCounts.bind(activity);
|
|
16258
|
+
target.listOrgWidgetWorkspaces = activity.listOrgWidgetWorkspaces.bind(activity);
|
|
16256
16259
|
target.queryWorkspaceActivity = activity.queryWorkspaceActivity.bind(activity);
|
|
16257
16260
|
target.queryWorkspaceActivityLatestSubjects = activity.queryWorkspaceActivityLatestSubjects.bind(activity);
|
|
16258
16261
|
target.queryWorkspaceActivityOpenItems = activity.queryWorkspaceActivityOpenItems.bind(activity);
|
|
@@ -16347,6 +16350,7 @@ function bindMembersMethods(target, members) {
|
|
|
16347
16350
|
target.getMemberSmsSenders = members.getMemberSmsSenders.bind(members);
|
|
16348
16351
|
target.getMemberByUuid = members.getMemberByUuid.bind(members);
|
|
16349
16352
|
target.getOrgWorkspaceMember = members.getOrgWorkspaceMember.bind(members);
|
|
16353
|
+
target.searchOrgWorkspaceMembers = members.searchOrgWorkspaceMembers.bind(members);
|
|
16350
16354
|
target.createWorkspaceMember = members.createWorkspaceMember.bind(members);
|
|
16351
16355
|
target.updateMember = members.updateMember.bind(members);
|
|
16352
16356
|
target.deleteMember = members.deleteMember.bind(members);
|
|
@@ -16826,6 +16830,7 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
|
|
|
16826
16830
|
target.linkPhoneNumber = phoneNumbers.linkPhoneNumber.bind(phoneNumbers);
|
|
16827
16831
|
target.getInboxes = inboxes.getInboxes.bind(inboxes);
|
|
16828
16832
|
target.getInbox = inboxes.getInbox.bind(inboxes);
|
|
16833
|
+
target.getChatSenderInboxes = inboxes.getChatSenderInboxes.bind(inboxes);
|
|
16829
16834
|
target.createInbox = inboxes.createInbox.bind(inboxes);
|
|
16830
16835
|
target.updateInbox = inboxes.updateInbox.bind(inboxes);
|
|
16831
16836
|
target.deleteInbox = inboxes.deleteInbox.bind(inboxes);
|
|
@@ -16851,6 +16856,7 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
|
|
|
16851
16856
|
target.updateNotificationRule = notificationRules.updateNotificationRule.bind(notificationRules);
|
|
16852
16857
|
target.deleteNotificationRule = notificationRules.deleteNotificationRule.bind(notificationRules);
|
|
16853
16858
|
target.getNotificationDestinations = notificationRules.getNotificationDestinations.bind(notificationRules);
|
|
16859
|
+
target.getNotificationDelivery = notificationRules.getNotificationDelivery.bind(notificationRules);
|
|
16854
16860
|
}
|
|
16855
16861
|
|
|
16856
16862
|
// src/client/bindings/toolkits.ts
|
|
@@ -17040,8 +17046,7 @@ function createIntegrationsBindings(apis) {
|
|
|
17040
17046
|
"deleteTeamsApp",
|
|
17041
17047
|
"getTeamsConversations",
|
|
17042
17048
|
"getTeamsInstallations",
|
|
17043
|
-
"getTeamsAppAccounts"
|
|
17044
|
-
"getTeamsNotificationDelivery"
|
|
17049
|
+
"getTeamsAppAccounts"
|
|
17045
17050
|
]),
|
|
17046
17051
|
...bindMethods(apis.fhirConnections, [
|
|
17047
17052
|
"getFhirConnections",
|
|
@@ -17178,6 +17183,7 @@ function createIntegrationsBindings(apis) {
|
|
|
17178
17183
|
"importHubspotMembers",
|
|
17179
17184
|
"getHubspotContactProperties",
|
|
17180
17185
|
"getHubspotDealProperties",
|
|
17186
|
+
"getHubspotDealPipelines",
|
|
17181
17187
|
"getHubspotForms",
|
|
17182
17188
|
"getHubspotMeetingLinks",
|
|
17183
17189
|
"getHubspotCrmObjects",
|
|
@@ -17272,6 +17278,10 @@ function bindOrgMethods(target, org) {
|
|
|
17272
17278
|
target.listLegalEntities = org.listLegalEntities.bind(org);
|
|
17273
17279
|
target.getLegalEntity = org.getLegalEntity.bind(org);
|
|
17274
17280
|
target.createLegalEntity = org.createLegalEntity.bind(org);
|
|
17281
|
+
target.getBusinessImportColumns = org.getBusinessImportColumns.bind(org);
|
|
17282
|
+
target.getBusinessImportTemplate = org.getBusinessImportTemplate.bind(org);
|
|
17283
|
+
target.previewBusinessImport = org.previewBusinessImport.bind(org);
|
|
17284
|
+
target.importBusinesses = org.importBusinesses.bind(org);
|
|
17275
17285
|
target.getRegistrationDraft = org.getRegistrationDraft.bind(org);
|
|
17276
17286
|
target.saveRegistrationDraft = org.saveRegistrationDraft.bind(org);
|
|
17277
17287
|
target.getVoiceTrustProducts = org.getVoiceTrustProducts.bind(org);
|
|
@@ -17598,6 +17608,8 @@ var GravityRailClient = class {
|
|
|
17598
17608
|
// Chats API
|
|
17599
17609
|
chat;
|
|
17600
17610
|
getChats;
|
|
17611
|
+
queryOrgChats;
|
|
17612
|
+
countOrgChats;
|
|
17601
17613
|
getChat;
|
|
17602
17614
|
getChatAttention;
|
|
17603
17615
|
getChatByUuid;
|
|
@@ -17722,6 +17734,7 @@ var GravityRailClient = class {
|
|
|
17722
17734
|
// Org-scoped, so deliberately absent from WORKSPACE_METHOD_NAMES: that proxy
|
|
17723
17735
|
// passes a workspace uuid as the first argument.
|
|
17724
17736
|
getOrgWorkspaceMember;
|
|
17737
|
+
searchOrgWorkspaceMembers;
|
|
17725
17738
|
createWorkspaceMember;
|
|
17726
17739
|
updateMember;
|
|
17727
17740
|
deleteMember;
|
|
@@ -17788,16 +17801,9 @@ var GravityRailClient = class {
|
|
|
17788
17801
|
getAgentTask;
|
|
17789
17802
|
cancelAgentTask;
|
|
17790
17803
|
getAgentTaskMessages;
|
|
17791
|
-
//
|
|
17792
|
-
|
|
17793
|
-
|
|
17794
|
-
createAgent;
|
|
17795
|
-
updateAgent;
|
|
17796
|
-
deleteAgent;
|
|
17797
|
-
archiveAgent;
|
|
17798
|
-
unarchiveAgent;
|
|
17799
|
-
getOrgAgentJobs;
|
|
17800
|
-
stopOrgAgentJob;
|
|
17804
|
+
// Org Agent Jobs API
|
|
17805
|
+
getBotJobs;
|
|
17806
|
+
stopBotJob;
|
|
17801
17807
|
// Qualifications API
|
|
17802
17808
|
getQualifications;
|
|
17803
17809
|
getQualification;
|
|
@@ -17877,6 +17883,7 @@ var GravityRailClient = class {
|
|
|
17877
17883
|
queryOrgActivityOneView;
|
|
17878
17884
|
queryOrgActivityDigest;
|
|
17879
17885
|
getOrgActivityCounts;
|
|
17886
|
+
listOrgWidgetWorkspaces;
|
|
17880
17887
|
queryWorkspaceActivity;
|
|
17881
17888
|
queryWorkspaceActivityLatestSubjects;
|
|
17882
17889
|
queryWorkspaceActivityOpenItems;
|
|
@@ -18119,6 +18126,10 @@ var GravityRailClient = class {
|
|
|
18119
18126
|
listLegalEntities;
|
|
18120
18127
|
getLegalEntity;
|
|
18121
18128
|
createLegalEntity;
|
|
18129
|
+
getBusinessImportColumns;
|
|
18130
|
+
getBusinessImportTemplate;
|
|
18131
|
+
previewBusinessImport;
|
|
18132
|
+
importBusinesses;
|
|
18122
18133
|
getRegistrationDraft;
|
|
18123
18134
|
saveRegistrationDraft;
|
|
18124
18135
|
getVoiceTrustProducts;
|
|
@@ -18467,6 +18478,7 @@ var GravityRailClient = class {
|
|
|
18467
18478
|
linkPhoneNumber;
|
|
18468
18479
|
getInboxes;
|
|
18469
18480
|
getInbox;
|
|
18481
|
+
getChatSenderInboxes;
|
|
18470
18482
|
createInbox;
|
|
18471
18483
|
updateInbox;
|
|
18472
18484
|
deleteInbox;
|
|
@@ -18492,6 +18504,7 @@ var GravityRailClient = class {
|
|
|
18492
18504
|
updateNotificationRule;
|
|
18493
18505
|
deleteNotificationRule;
|
|
18494
18506
|
getNotificationDestinations;
|
|
18507
|
+
getNotificationDelivery;
|
|
18495
18508
|
// Toolkits API
|
|
18496
18509
|
getToolkits;
|
|
18497
18510
|
getTool;
|
|
@@ -18668,7 +18681,6 @@ var GravityRailClient = class {
|
|
|
18668
18681
|
getTeamsConversations;
|
|
18669
18682
|
getTeamsInstallations;
|
|
18670
18683
|
getTeamsAppAccounts;
|
|
18671
|
-
getTeamsNotificationDelivery;
|
|
18672
18684
|
// FHIR Connections API
|
|
18673
18685
|
getFhirConnections;
|
|
18674
18686
|
getFhirConnection;
|
|
@@ -18795,6 +18807,7 @@ var GravityRailClient = class {
|
|
|
18795
18807
|
importHubspotMembers;
|
|
18796
18808
|
getHubspotContactProperties;
|
|
18797
18809
|
getHubspotDealProperties;
|
|
18810
|
+
getHubspotDealPipelines;
|
|
18798
18811
|
getHubspotForms;
|
|
18799
18812
|
getHubspotMeetingLinks;
|
|
18800
18813
|
getHubspotCrmObjects;
|
|
@@ -18952,7 +18965,7 @@ var GravityRailClient = class {
|
|
|
18952
18965
|
bindDevicesMethods(this, apis.devices);
|
|
18953
18966
|
bindMembersMethods(this, apis.members);
|
|
18954
18967
|
bindAgentTasksMethods(this, apis.agentTasks);
|
|
18955
|
-
|
|
18968
|
+
bindBotJobsMethods(this, apis.botJobs);
|
|
18956
18969
|
bindQualificationsMethods(this, apis.qualifications);
|
|
18957
18970
|
bindPersonasMethods(this, apis.personas);
|
|
18958
18971
|
bindMetricsMethods(this, apis.metrics);
|
|
@@ -19279,7 +19292,6 @@ var NotificationRuleBuilder = class extends WorkspaceBuilderResource {
|
|
|
19279
19292
|
this.prompt = options.prompt ?? options.message;
|
|
19280
19293
|
this.notifySms = Boolean(options.notifySms ?? options.notify_sms);
|
|
19281
19294
|
this.notifyEmail = Boolean(options.notifyEmail ?? options.notify_email);
|
|
19282
|
-
this.notifyVoice = Boolean(options.notifyVoice ?? options.notify_voice);
|
|
19283
19295
|
}
|
|
19284
19296
|
name;
|
|
19285
19297
|
noticeType;
|
|
@@ -19288,7 +19300,6 @@ var NotificationRuleBuilder = class extends WorkspaceBuilderResource {
|
|
|
19288
19300
|
prompt;
|
|
19289
19301
|
notifySms;
|
|
19290
19302
|
notifyEmail;
|
|
19291
|
-
notifyVoice;
|
|
19292
19303
|
planLine() {
|
|
19293
19304
|
const parts = [];
|
|
19294
19305
|
if (this.memberId !== void 0) parts.push(`memberId=${this.memberId}`);
|
|
@@ -19306,8 +19317,7 @@ var NotificationRuleBuilder = class extends WorkspaceBuilderResource {
|
|
|
19306
19317
|
workflowId: this.workflow?._id,
|
|
19307
19318
|
prompt: this.prompt ?? null,
|
|
19308
19319
|
notifySms: this.notifySms,
|
|
19309
|
-
notifyEmail: this.notifyEmail
|
|
19310
|
-
notifyVoice: this.notifyVoice
|
|
19320
|
+
notifyEmail: this.notifyEmail
|
|
19311
19321
|
};
|
|
19312
19322
|
const result = await client.createNotificationRule(payload);
|
|
19313
19323
|
this._id = result.id;
|
|
@@ -19477,7 +19487,7 @@ var MemberLabelBuilder = class extends WorkspaceBuilderResource {
|
|
|
19477
19487
|
this.description = description;
|
|
19478
19488
|
}
|
|
19479
19489
|
matchKey() {
|
|
19480
|
-
return this.
|
|
19490
|
+
return this.name;
|
|
19481
19491
|
}
|
|
19482
19492
|
planLine() {
|
|
19483
19493
|
return `Label: ${this.name} (slug=${this.slug})`;
|
|
@@ -20375,12 +20385,10 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
20375
20385
|
this.name = name;
|
|
20376
20386
|
this.description = options.description ?? "";
|
|
20377
20387
|
this.prompt = options.prompt;
|
|
20378
|
-
this.copyFromAgentId = options.copyFromAgentId;
|
|
20379
20388
|
}
|
|
20380
20389
|
name;
|
|
20381
20390
|
description;
|
|
20382
20391
|
prompt;
|
|
20383
|
-
copyFromAgentId;
|
|
20384
20392
|
tasks = [];
|
|
20385
20393
|
abilities = [];
|
|
20386
20394
|
/** The DRAFT revision's id — where tasks and graph edits attach.
|
|
@@ -20433,7 +20441,6 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
20433
20441
|
description: this.description,
|
|
20434
20442
|
createMode: "taskless",
|
|
20435
20443
|
...this.prompt ? { prompt: this.prompt } : {},
|
|
20436
|
-
...this.copyFromAgentId ? { copyFromAgentId: this.copyFromAgentId } : {},
|
|
20437
20444
|
...this.abilities.length ? { abilities: this.abilities.map((ability) => ability.toAbility()) } : {}
|
|
20438
20445
|
};
|
|
20439
20446
|
const result = await client.createWorkflow(payload);
|
|
@@ -20443,59 +20450,11 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
20443
20450
|
this._created = true;
|
|
20444
20451
|
}
|
|
20445
20452
|
};
|
|
20446
|
-
var AgentBuilder = class extends WorkspaceBuilderResource {
|
|
20447
|
-
constructor(name, options = {}) {
|
|
20448
|
-
super();
|
|
20449
|
-
this.name = name;
|
|
20450
|
-
this.chatModelId = options.chatModelId ?? options.chat_model_id ?? "";
|
|
20451
|
-
this.systemPrompt = options.systemPrompt ?? options.system_prompt ?? "";
|
|
20452
|
-
this.memberRoleId = options.roleId ?? options.role_id;
|
|
20453
|
-
this.tools = options.tools ?? [];
|
|
20454
|
-
this.codeInterpreterEnabled = options.codeInterpreterEnabled ?? options.code_interpreter_enabled ?? false;
|
|
20455
|
-
this.webBrowserEnabled = options.webBrowserEnabled ?? options.web_browser_enabled ?? false;
|
|
20456
|
-
}
|
|
20457
|
-
name;
|
|
20458
|
-
chatModelId;
|
|
20459
|
-
systemPrompt;
|
|
20460
|
-
memberRoleId;
|
|
20461
|
-
tools;
|
|
20462
|
-
codeInterpreterEnabled;
|
|
20463
|
-
webBrowserEnabled;
|
|
20464
|
-
planLine() {
|
|
20465
|
-
const parts = [];
|
|
20466
|
-
if (this.chatModelId) parts.push(`model=${this.chatModelId}`);
|
|
20467
|
-
if (this.tools.length) parts.push(`${this.tools.length} tools`);
|
|
20468
|
-
return `Agent: ${this.name}${parts.length ? ` (${parts.join(", ")})` : ""}`;
|
|
20469
|
-
}
|
|
20470
|
-
async apply(client) {
|
|
20471
|
-
if (this._existed) return;
|
|
20472
|
-
if (this.memberRoleId === void 0) {
|
|
20473
|
-
throw new Error(`Agent '${this.name}' requires memberRoleId`);
|
|
20474
|
-
}
|
|
20475
|
-
if (!this.chatModelId) {
|
|
20476
|
-
throw new Error(`Agent '${this.name}' requires chatModelId`);
|
|
20477
|
-
}
|
|
20478
|
-
const payload = {
|
|
20479
|
-
name: this.name,
|
|
20480
|
-
memberRoleId: this.memberRoleId,
|
|
20481
|
-
chatModelId: this.chatModelId,
|
|
20482
|
-
systemPrompt: this.systemPrompt,
|
|
20483
|
-
...this.tools.length ? { tools: this.tools } : {},
|
|
20484
|
-
...this.codeInterpreterEnabled ? { codeInterpreterEnabled: true } : {},
|
|
20485
|
-
...this.webBrowserEnabled ? { webBrowserEnabled: true } : {}
|
|
20486
|
-
};
|
|
20487
|
-
const result = await client.createAgent(payload);
|
|
20488
|
-
this._id = result.id;
|
|
20489
|
-
this._uuid = result.uuid;
|
|
20490
|
-
this._created = true;
|
|
20491
|
-
}
|
|
20492
|
-
};
|
|
20493
20453
|
|
|
20494
20454
|
// src/workspace-builder/orchestrator.ts
|
|
20495
20455
|
var PHASES = /* @__PURE__ */ new Map([
|
|
20496
20456
|
[FormBuilder, 0],
|
|
20497
20457
|
[MemberLabelBuilder, 0],
|
|
20498
|
-
[AgentBuilder, 1],
|
|
20499
20458
|
[WorkflowBuilder, 2],
|
|
20500
20459
|
[TaskBuilder, 3],
|
|
20501
20460
|
[MemberFilterBuilder, 5],
|
|
@@ -20567,11 +20526,6 @@ var WorkspaceBuilder = class {
|
|
|
20567
20526
|
this.resources.push(journey);
|
|
20568
20527
|
return journey;
|
|
20569
20528
|
}
|
|
20570
|
-
agent(name, options = {}) {
|
|
20571
|
-
const agent = new AgentBuilder(name, options);
|
|
20572
|
-
this.resources.push(agent);
|
|
20573
|
-
return agent;
|
|
20574
|
-
}
|
|
20575
20529
|
routine(name, cronSchedule = "", options = {}) {
|
|
20576
20530
|
const routine = new RoutineBuilder(name, cronSchedule, options);
|
|
20577
20531
|
this.resources.push(routine);
|
|
@@ -20754,10 +20708,10 @@ Done! Created ${count} resources.`);
|
|
|
20754
20708
|
const formSlugs = new Map(
|
|
20755
20709
|
resources.filter((resource) => resource instanceof FormBuilder).map((resource) => [resource.slug, resource])
|
|
20756
20710
|
);
|
|
20757
|
-
const
|
|
20711
|
+
const labelNames = new Map(
|
|
20758
20712
|
resources.filter(
|
|
20759
20713
|
(resource) => resource instanceof MemberLabelBuilder
|
|
20760
|
-
).map((resource) => [resource.
|
|
20714
|
+
).map((resource) => [resource.name, resource])
|
|
20761
20715
|
);
|
|
20762
20716
|
const workflowNames = new Map(
|
|
20763
20717
|
resources.filter((resource) => resource instanceof WorkflowBuilder).map((resource) => [resource.name, resource])
|
|
@@ -20769,10 +20723,10 @@ Done! Created ${count} resources.`);
|
|
|
20769
20723
|
}
|
|
20770
20724
|
}
|
|
20771
20725
|
}
|
|
20772
|
-
if (
|
|
20726
|
+
if (labelNames.size) {
|
|
20773
20727
|
for (const existing of await this.client.getMemberLabels()) {
|
|
20774
|
-
if (existing.
|
|
20775
|
-
|
|
20728
|
+
if (existing.name && labelNames.has(existing.name)) {
|
|
20729
|
+
labelNames.get(existing.name).adopt(existing);
|
|
20776
20730
|
}
|
|
20777
20731
|
}
|
|
20778
20732
|
}
|
|
@@ -20815,18 +20769,6 @@ Done! Created ${count} resources.`);
|
|
|
20815
20769
|
builder.adopt(await this.client.getJourneyAuthoring(existing.id));
|
|
20816
20770
|
}
|
|
20817
20771
|
}
|
|
20818
|
-
const agentNames = new Map(
|
|
20819
|
-
resources.filter((resource) => resource instanceof AgentBuilder).map((resource) => [resource.name, resource])
|
|
20820
|
-
);
|
|
20821
|
-
if (agentNames.size) {
|
|
20822
|
-
for (const existing of await collectPages(
|
|
20823
|
-
(page) => this.client.getAgents({ page, pageSize: LIST_PAGE_SIZE })
|
|
20824
|
-
)) {
|
|
20825
|
-
if (existing.name && agentNames.has(existing.name)) {
|
|
20826
|
-
agentNames.get(existing.name).adopt(existing);
|
|
20827
|
-
}
|
|
20828
|
-
}
|
|
20829
|
-
}
|
|
20830
20772
|
const routineNames = new Map(
|
|
20831
20773
|
resources.filter((resource) => resource instanceof RoutineBuilder).map((resource) => [resource.name, resource])
|
|
20832
20774
|
);
|
|
@@ -21097,7 +21039,6 @@ function resourceKey(resource) {
|
|
|
21097
21039
|
if (resource instanceof RoutineBuilder) return "routines";
|
|
21098
21040
|
if (resource instanceof NotificationRuleBuilder) return "notificationRules";
|
|
21099
21041
|
if (resource instanceof JourneyBuilder) return "journeys";
|
|
21100
|
-
if (resource instanceof AgentBuilder) return "agents";
|
|
21101
21042
|
return "resources";
|
|
21102
21043
|
}
|
|
21103
21044
|
var SEARCHABLE_EVENT_RULE_SOURCE_FIELDS = [
|
|
@@ -21199,7 +21140,6 @@ function writeScopeForResource(resource) {
|
|
|
21199
21140
|
if (resource instanceof WorkflowBuilder || resource instanceof TaskBuilder) {
|
|
21200
21141
|
return "workflows:write";
|
|
21201
21142
|
}
|
|
21202
|
-
if (resource instanceof AgentBuilder) return "agents:write";
|
|
21203
21143
|
if (resource instanceof MemberLabelBuilder || resource instanceof MemberFilterBuilder) {
|
|
21204
21144
|
return "members:write";
|
|
21205
21145
|
}
|
|
@@ -22833,6 +22773,43 @@ var ChatInteractionController = class {
|
|
|
22833
22773
|
}
|
|
22834
22774
|
};
|
|
22835
22775
|
|
|
22776
|
+
// src/helpers/business-import.ts
|
|
22777
|
+
function toSafeRow(row, legalEntityUuid) {
|
|
22778
|
+
return {
|
|
22779
|
+
row: row.row,
|
|
22780
|
+
action: row.action,
|
|
22781
|
+
legalEntityUuid: legalEntityUuid ?? void 0,
|
|
22782
|
+
proposedChanges: row.proposedChanges,
|
|
22783
|
+
reason: row.reason ?? void 0,
|
|
22784
|
+
error: row.error ?? void 0
|
|
22785
|
+
};
|
|
22786
|
+
}
|
|
22787
|
+
function toSafeIssue({ row, column, columnPosition, code }) {
|
|
22788
|
+
return { row, column, columnPosition, code };
|
|
22789
|
+
}
|
|
22790
|
+
function toSafeBusinessImportPreview(preview) {
|
|
22791
|
+
return {
|
|
22792
|
+
previewPlanToken: preview.previewPlanToken,
|
|
22793
|
+
totalRows: preview.totalRows,
|
|
22794
|
+
summary: preview.summary,
|
|
22795
|
+
rows: preview.rows.map((row) => toSafeRow(row, row.match?.legalEntityUuid)),
|
|
22796
|
+
ignoredColumnPositions: preview.ignoredColumnPositions,
|
|
22797
|
+
issues: preview.issues?.map(toSafeIssue),
|
|
22798
|
+
issueCount: preview.issueCount
|
|
22799
|
+
};
|
|
22800
|
+
}
|
|
22801
|
+
function toSafeBusinessImportResult(result) {
|
|
22802
|
+
return {
|
|
22803
|
+
importId: result.importId,
|
|
22804
|
+
totalRows: result.totalRows,
|
|
22805
|
+
summary: result.summary,
|
|
22806
|
+
rows: result.rows.map((row) => toSafeRow(row, row.legalEntityUuid)),
|
|
22807
|
+
ignoredColumnPositions: result.ignoredColumnPositions,
|
|
22808
|
+
issues: result.issues?.map(toSafeIssue),
|
|
22809
|
+
issueCount: result.issueCount
|
|
22810
|
+
};
|
|
22811
|
+
}
|
|
22812
|
+
|
|
22836
22813
|
// src/helpers/member-import.ts
|
|
22837
22814
|
function toSafeMemberImportPreview(preview) {
|
|
22838
22815
|
return {
|
|
@@ -22975,7 +22952,6 @@ function pathDraftToStorage(draft, original) {
|
|
|
22975
22952
|
ActivityVisibility,
|
|
22976
22953
|
ActivityWindowBasis,
|
|
22977
22954
|
ActorKind,
|
|
22978
|
-
AgentBuilder,
|
|
22979
22955
|
AiConnectorPolicy,
|
|
22980
22956
|
AiDisclosure,
|
|
22981
22957
|
ApiError,
|
|
@@ -23233,6 +23209,8 @@ function pathDraftToStorage(draft, original) {
|
|
|
23233
23209
|
pathDraftToStorage,
|
|
23234
23210
|
requiresAssistantParticipant,
|
|
23235
23211
|
runWorkspaceScript,
|
|
23212
|
+
toSafeBusinessImportPreview,
|
|
23213
|
+
toSafeBusinessImportResult,
|
|
23236
23214
|
toSafeMemberImportPreview,
|
|
23237
23215
|
toSafeMemberImportSummary,
|
|
23238
23216
|
usesBuiltinAssistant,
|