@gravity-rail/sdk 8.2.0 → 9.2.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-C4ZYR_m1.d.ts} +731 -354
- package/dist/{agent_standing_job-DfjwGfg_.d.cts → agent_team-C6FdNgYH.d.cts} +731 -354
- package/dist/{chunk-U2U5X3LY.js → chunk-7LQYEV5Y.js} +245 -226
- package/dist/chunk-7LQYEV5Y.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-Bd-zXY42.d.ts → client-DVF3qwNq.d.ts} +2380 -1113
- package/dist/{client-BGGgZhKg.d.cts → client-DwslF70Y.d.cts} +2380 -1113
- 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 +290 -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 +252 -230
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +775 -999
- package/dist/internal.d.ts +775 -999
- package/dist/internal.js +12 -9
- package/dist/internal.js.map +1 -1
- package/dist/member-import-BpcX-swC.d.ts +92 -0
- package/dist/member-import-CA9YWv3Y.d.cts +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 +53 -39
- package/dist/schemas.d.ts +53 -39
- package/dist/schemas.js +24 -7
- package/dist/schemas.js.map +1 -1
- package/dist/{tasks-2LhXIwL8.d.ts → tasks-BGLfmf5y.d.ts} +69 -904
- package/dist/{tasks-BTURuIlD.d.cts → tasks-BZb3rt5m.d.cts} +69 -904
- package/package.json +10 -9
- 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`);
|
|
@@ -9010,6 +9049,10 @@ var PhoneNumbersApi = class extends BaseApiClient {
|
|
|
9010
9049
|
`w/${wid}/phone-numbers/${id}/voicemails?${params}`
|
|
9011
9050
|
);
|
|
9012
9051
|
}
|
|
9052
|
+
/** Fetch one authorized voicemail by uuid. */
|
|
9053
|
+
async getVoicemailByUuid(wid, uuid) {
|
|
9054
|
+
return this.fetch(`w/${wid}/voicemails/by-uuid/${encodeURIComponent(uuid)}`);
|
|
9055
|
+
}
|
|
9013
9056
|
/** Fetch voicemail audio through the authenticated client path. */
|
|
9014
9057
|
async fetchVoicemailAudio(wid, phoneNumberId, voicemailId) {
|
|
9015
9058
|
const response = await this.fetchRaw(
|
|
@@ -10468,6 +10511,12 @@ var HubspotApi = class extends BaseApiClient {
|
|
|
10468
10511
|
`w/${wid}/app-connections/hubspot/sync-settings/hs-properties?objectType=deals`
|
|
10469
10512
|
);
|
|
10470
10513
|
}
|
|
10514
|
+
/** The portal's active deal pipelines with their active stages. */
|
|
10515
|
+
async getHubspotDealPipelines(wid) {
|
|
10516
|
+
return this.fetch(
|
|
10517
|
+
`w/${wid}/app-connections/hubspot/sync-settings/deal-pipelines`
|
|
10518
|
+
);
|
|
10519
|
+
}
|
|
10471
10520
|
/** The portal's Meetings booking links, or `missing_scope` without the scheduler scope. */
|
|
10472
10521
|
async getHubspotMeetingLinks(wid) {
|
|
10473
10522
|
return this.fetch(
|
|
@@ -10684,15 +10733,21 @@ var SitesApi = class extends BaseApiClient {
|
|
|
10684
10733
|
/**
|
|
10685
10734
|
* Get a theme's settings schema, the site's saved values, and capabilities.
|
|
10686
10735
|
* 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).
|
|
10736
|
+
* (e.g. one the builder has selected but not yet saved). Pass `resolved: true` to
|
|
10737
|
+
* also receive `resolvedValues`, the saved theme's values as its render resolves them.
|
|
10688
10738
|
*/
|
|
10689
|
-
async getThemeSettings(wid, siteId, theme) {
|
|
10690
|
-
const
|
|
10739
|
+
async getThemeSettings(wid, siteId, theme, options) {
|
|
10740
|
+
const params = new URLSearchParams();
|
|
10741
|
+
if (theme) params.set("theme", theme);
|
|
10742
|
+
if (options?.resolved) params.set("resolved", "true");
|
|
10743
|
+
const search = params.toString();
|
|
10744
|
+
const query2 = search ? `?${search}` : "";
|
|
10691
10745
|
return this.fetch(`w/${wid}/sites/${siteId}/theme-settings${query2}`);
|
|
10692
10746
|
}
|
|
10693
|
-
/** Save values for the active theme's settings (validated against the schema). */
|
|
10694
|
-
async updateThemeSettings(wid, siteId, values) {
|
|
10695
|
-
|
|
10747
|
+
/** Save values for the active theme's settings (validated against the schema). Pass `resolved: true` to also receive `resolvedValues`. */
|
|
10748
|
+
async updateThemeSettings(wid, siteId, values, options) {
|
|
10749
|
+
const query2 = options?.resolved ? "?resolved=true" : "";
|
|
10750
|
+
return this.fetch(`w/${wid}/sites/${siteId}/theme-settings${query2}`, {
|
|
10696
10751
|
method: "PUT",
|
|
10697
10752
|
body: JSON.stringify({ values })
|
|
10698
10753
|
});
|
|
@@ -12685,7 +12740,6 @@ var MemberType = /* @__PURE__ */ ((MemberType2) => {
|
|
|
12685
12740
|
MemberType2["ANONYMOUS"] = "anonymous";
|
|
12686
12741
|
MemberType2["TEST"] = "test";
|
|
12687
12742
|
MemberType2["MEMBER"] = "member";
|
|
12688
|
-
MemberType2["AGENT"] = "agent";
|
|
12689
12743
|
MemberType2["BUSINESS"] = "business";
|
|
12690
12744
|
return MemberType2;
|
|
12691
12745
|
})(MemberType || {});
|
|
@@ -12814,6 +12868,8 @@ var EventRuleActionType = /* @__PURE__ */ ((EventRuleActionType2) => {
|
|
|
12814
12868
|
EventRuleActionType2["EMAIL_SEND"] = "email:send";
|
|
12815
12869
|
EventRuleActionType2["INVOKE_CUSTOM_TOOL"] = "custom_tool:invoke";
|
|
12816
12870
|
EventRuleActionType2["HUBSPOT_CREATE_DEAL_FROM_BOOKING"] = "hubspot:create_deal_from_booking";
|
|
12871
|
+
EventRuleActionType2["HUBSPOT_UPDATE_CONTACT_DEALS"] = "hubspot:update_contact_deals";
|
|
12872
|
+
EventRuleActionType2["HUBSPOT_UPDATE_CONTACT_PROPERTIES"] = "hubspot:update_contact_properties";
|
|
12817
12873
|
EventRuleActionType2["ASSIGNMENT_CONCLUDE"] = "assignment:conclude";
|
|
12818
12874
|
EventRuleActionType2["JOURNEY_ENROLL"] = "journey:enroll";
|
|
12819
12875
|
EventRuleActionType2["SMS_SEND"] = "sms:send";
|
|
@@ -13401,14 +13457,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13401
13457
|
"viewedMemberTypes": [
|
|
13402
13458
|
"anonymous",
|
|
13403
13459
|
"test",
|
|
13404
|
-
"member"
|
|
13405
|
-
"agent"
|
|
13460
|
+
"member"
|
|
13406
13461
|
],
|
|
13407
13462
|
"relatedMemberTypes": [
|
|
13408
13463
|
"anonymous",
|
|
13409
13464
|
"test",
|
|
13410
|
-
"member"
|
|
13411
|
-
"agent"
|
|
13465
|
+
"member"
|
|
13412
13466
|
]
|
|
13413
13467
|
},
|
|
13414
13468
|
{
|
|
@@ -13419,14 +13473,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13419
13473
|
"viewedMemberTypes": [
|
|
13420
13474
|
"anonymous",
|
|
13421
13475
|
"test",
|
|
13422
|
-
"member"
|
|
13423
|
-
"agent"
|
|
13476
|
+
"member"
|
|
13424
13477
|
],
|
|
13425
13478
|
"relatedMemberTypes": [
|
|
13426
13479
|
"anonymous",
|
|
13427
13480
|
"test",
|
|
13428
|
-
"member"
|
|
13429
|
-
"agent"
|
|
13481
|
+
"member"
|
|
13430
13482
|
]
|
|
13431
13483
|
}
|
|
13432
13484
|
]
|
|
@@ -13445,14 +13497,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13445
13497
|
"viewedMemberTypes": [
|
|
13446
13498
|
"anonymous",
|
|
13447
13499
|
"test",
|
|
13448
|
-
"member"
|
|
13449
|
-
"agent"
|
|
13500
|
+
"member"
|
|
13450
13501
|
],
|
|
13451
13502
|
"relatedMemberTypes": [
|
|
13452
13503
|
"anonymous",
|
|
13453
13504
|
"test",
|
|
13454
|
-
"member"
|
|
13455
|
-
"agent"
|
|
13505
|
+
"member"
|
|
13456
13506
|
]
|
|
13457
13507
|
}
|
|
13458
13508
|
]
|
|
@@ -13471,14 +13521,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13471
13521
|
"viewedMemberTypes": [
|
|
13472
13522
|
"anonymous",
|
|
13473
13523
|
"test",
|
|
13474
|
-
"member"
|
|
13475
|
-
"agent"
|
|
13524
|
+
"member"
|
|
13476
13525
|
],
|
|
13477
13526
|
"relatedMemberTypes": [
|
|
13478
13527
|
"anonymous",
|
|
13479
13528
|
"test",
|
|
13480
|
-
"member"
|
|
13481
|
-
"agent"
|
|
13529
|
+
"member"
|
|
13482
13530
|
]
|
|
13483
13531
|
}
|
|
13484
13532
|
]
|
|
@@ -13497,14 +13545,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13497
13545
|
"viewedMemberTypes": [
|
|
13498
13546
|
"anonymous",
|
|
13499
13547
|
"test",
|
|
13500
|
-
"member"
|
|
13501
|
-
"agent"
|
|
13548
|
+
"member"
|
|
13502
13549
|
],
|
|
13503
13550
|
"relatedMemberTypes": [
|
|
13504
13551
|
"anonymous",
|
|
13505
13552
|
"test",
|
|
13506
|
-
"member"
|
|
13507
|
-
"agent"
|
|
13553
|
+
"member"
|
|
13508
13554
|
]
|
|
13509
13555
|
},
|
|
13510
13556
|
{
|
|
@@ -13515,14 +13561,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13515
13561
|
"viewedMemberTypes": [
|
|
13516
13562
|
"anonymous",
|
|
13517
13563
|
"test",
|
|
13518
|
-
"member"
|
|
13519
|
-
"agent"
|
|
13564
|
+
"member"
|
|
13520
13565
|
],
|
|
13521
13566
|
"relatedMemberTypes": [
|
|
13522
13567
|
"anonymous",
|
|
13523
13568
|
"test",
|
|
13524
|
-
"member"
|
|
13525
|
-
"agent"
|
|
13569
|
+
"member"
|
|
13526
13570
|
]
|
|
13527
13571
|
}
|
|
13528
13572
|
]
|
|
@@ -13541,14 +13585,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13541
13585
|
"viewedMemberTypes": [
|
|
13542
13586
|
"anonymous",
|
|
13543
13587
|
"test",
|
|
13544
|
-
"member"
|
|
13545
|
-
"agent"
|
|
13588
|
+
"member"
|
|
13546
13589
|
],
|
|
13547
13590
|
"relatedMemberTypes": [
|
|
13548
13591
|
"anonymous",
|
|
13549
13592
|
"test",
|
|
13550
|
-
"member"
|
|
13551
|
-
"agent"
|
|
13593
|
+
"member"
|
|
13552
13594
|
]
|
|
13553
13595
|
},
|
|
13554
13596
|
{
|
|
@@ -13559,14 +13601,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13559
13601
|
"viewedMemberTypes": [
|
|
13560
13602
|
"anonymous",
|
|
13561
13603
|
"test",
|
|
13562
|
-
"member"
|
|
13563
|
-
"agent"
|
|
13604
|
+
"member"
|
|
13564
13605
|
],
|
|
13565
13606
|
"relatedMemberTypes": [
|
|
13566
13607
|
"anonymous",
|
|
13567
13608
|
"test",
|
|
13568
|
-
"member"
|
|
13569
|
-
"agent"
|
|
13609
|
+
"member"
|
|
13570
13610
|
]
|
|
13571
13611
|
}
|
|
13572
13612
|
]
|
|
@@ -13585,14 +13625,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13585
13625
|
"viewedMemberTypes": [
|
|
13586
13626
|
"anonymous",
|
|
13587
13627
|
"test",
|
|
13588
|
-
"member"
|
|
13589
|
-
"agent"
|
|
13628
|
+
"member"
|
|
13590
13629
|
],
|
|
13591
13630
|
"relatedMemberTypes": [
|
|
13592
13631
|
"anonymous",
|
|
13593
13632
|
"test",
|
|
13594
|
-
"member"
|
|
13595
|
-
"agent"
|
|
13633
|
+
"member"
|
|
13596
13634
|
]
|
|
13597
13635
|
},
|
|
13598
13636
|
{
|
|
@@ -13603,14 +13641,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13603
13641
|
"viewedMemberTypes": [
|
|
13604
13642
|
"anonymous",
|
|
13605
13643
|
"test",
|
|
13606
|
-
"member"
|
|
13607
|
-
"agent"
|
|
13644
|
+
"member"
|
|
13608
13645
|
],
|
|
13609
13646
|
"relatedMemberTypes": [
|
|
13610
13647
|
"anonymous",
|
|
13611
13648
|
"test",
|
|
13612
|
-
"member"
|
|
13613
|
-
"agent"
|
|
13649
|
+
"member"
|
|
13614
13650
|
]
|
|
13615
13651
|
}
|
|
13616
13652
|
]
|
|
@@ -13629,14 +13665,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13629
13665
|
"viewedMemberTypes": [
|
|
13630
13666
|
"anonymous",
|
|
13631
13667
|
"test",
|
|
13632
|
-
"member"
|
|
13633
|
-
"agent"
|
|
13668
|
+
"member"
|
|
13634
13669
|
],
|
|
13635
13670
|
"relatedMemberTypes": [
|
|
13636
13671
|
"anonymous",
|
|
13637
13672
|
"test",
|
|
13638
|
-
"member"
|
|
13639
|
-
"agent"
|
|
13673
|
+
"member"
|
|
13640
13674
|
]
|
|
13641
13675
|
},
|
|
13642
13676
|
{
|
|
@@ -13647,14 +13681,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13647
13681
|
"viewedMemberTypes": [
|
|
13648
13682
|
"anonymous",
|
|
13649
13683
|
"test",
|
|
13650
|
-
"member"
|
|
13651
|
-
"agent"
|
|
13684
|
+
"member"
|
|
13652
13685
|
],
|
|
13653
13686
|
"relatedMemberTypes": [
|
|
13654
13687
|
"anonymous",
|
|
13655
13688
|
"test",
|
|
13656
|
-
"member"
|
|
13657
|
-
"agent"
|
|
13689
|
+
"member"
|
|
13658
13690
|
]
|
|
13659
13691
|
}
|
|
13660
13692
|
]
|
|
@@ -13673,14 +13705,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13673
13705
|
"viewedMemberTypes": [
|
|
13674
13706
|
"anonymous",
|
|
13675
13707
|
"test",
|
|
13676
|
-
"member"
|
|
13677
|
-
"agent"
|
|
13708
|
+
"member"
|
|
13678
13709
|
],
|
|
13679
13710
|
"relatedMemberTypes": [
|
|
13680
13711
|
"anonymous",
|
|
13681
13712
|
"test",
|
|
13682
|
-
"member"
|
|
13683
|
-
"agent"
|
|
13713
|
+
"member"
|
|
13684
13714
|
]
|
|
13685
13715
|
},
|
|
13686
13716
|
{
|
|
@@ -13691,14 +13721,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13691
13721
|
"viewedMemberTypes": [
|
|
13692
13722
|
"anonymous",
|
|
13693
13723
|
"test",
|
|
13694
|
-
"member"
|
|
13695
|
-
"agent"
|
|
13724
|
+
"member"
|
|
13696
13725
|
],
|
|
13697
13726
|
"relatedMemberTypes": [
|
|
13698
13727
|
"anonymous",
|
|
13699
13728
|
"test",
|
|
13700
|
-
"member"
|
|
13701
|
-
"agent"
|
|
13729
|
+
"member"
|
|
13702
13730
|
]
|
|
13703
13731
|
}
|
|
13704
13732
|
]
|
|
@@ -13717,14 +13745,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13717
13745
|
"viewedMemberTypes": [
|
|
13718
13746
|
"anonymous",
|
|
13719
13747
|
"test",
|
|
13720
|
-
"member"
|
|
13721
|
-
"agent"
|
|
13748
|
+
"member"
|
|
13722
13749
|
],
|
|
13723
13750
|
"relatedMemberTypes": [
|
|
13724
13751
|
"anonymous",
|
|
13725
13752
|
"test",
|
|
13726
|
-
"member"
|
|
13727
|
-
"agent"
|
|
13753
|
+
"member"
|
|
13728
13754
|
]
|
|
13729
13755
|
},
|
|
13730
13756
|
{
|
|
@@ -13735,14 +13761,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13735
13761
|
"viewedMemberTypes": [
|
|
13736
13762
|
"anonymous",
|
|
13737
13763
|
"test",
|
|
13738
|
-
"member"
|
|
13739
|
-
"agent"
|
|
13764
|
+
"member"
|
|
13740
13765
|
],
|
|
13741
13766
|
"relatedMemberTypes": [
|
|
13742
13767
|
"anonymous",
|
|
13743
13768
|
"test",
|
|
13744
|
-
"member"
|
|
13745
|
-
"agent"
|
|
13769
|
+
"member"
|
|
13746
13770
|
]
|
|
13747
13771
|
}
|
|
13748
13772
|
]
|
|
@@ -13761,14 +13785,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13761
13785
|
"viewedMemberTypes": [
|
|
13762
13786
|
"anonymous",
|
|
13763
13787
|
"test",
|
|
13764
|
-
"member"
|
|
13765
|
-
"agent"
|
|
13788
|
+
"member"
|
|
13766
13789
|
],
|
|
13767
13790
|
"relatedMemberTypes": [
|
|
13768
13791
|
"anonymous",
|
|
13769
13792
|
"test",
|
|
13770
|
-
"member"
|
|
13771
|
-
"agent"
|
|
13793
|
+
"member"
|
|
13772
13794
|
]
|
|
13773
13795
|
},
|
|
13774
13796
|
{
|
|
@@ -13779,14 +13801,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13779
13801
|
"viewedMemberTypes": [
|
|
13780
13802
|
"anonymous",
|
|
13781
13803
|
"test",
|
|
13782
|
-
"member"
|
|
13783
|
-
"agent"
|
|
13804
|
+
"member"
|
|
13784
13805
|
],
|
|
13785
13806
|
"relatedMemberTypes": [
|
|
13786
13807
|
"anonymous",
|
|
13787
13808
|
"test",
|
|
13788
|
-
"member"
|
|
13789
|
-
"agent"
|
|
13809
|
+
"member"
|
|
13790
13810
|
]
|
|
13791
13811
|
}
|
|
13792
13812
|
]
|
|
@@ -13805,14 +13825,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13805
13825
|
"viewedMemberTypes": [
|
|
13806
13826
|
"anonymous",
|
|
13807
13827
|
"test",
|
|
13808
|
-
"member"
|
|
13809
|
-
"agent"
|
|
13828
|
+
"member"
|
|
13810
13829
|
],
|
|
13811
13830
|
"relatedMemberTypes": [
|
|
13812
13831
|
"anonymous",
|
|
13813
13832
|
"test",
|
|
13814
|
-
"member"
|
|
13815
|
-
"agent"
|
|
13833
|
+
"member"
|
|
13816
13834
|
]
|
|
13817
13835
|
},
|
|
13818
13836
|
{
|
|
@@ -13823,14 +13841,12 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
13823
13841
|
"viewedMemberTypes": [
|
|
13824
13842
|
"anonymous",
|
|
13825
13843
|
"test",
|
|
13826
|
-
"member"
|
|
13827
|
-
"agent"
|
|
13844
|
+
"member"
|
|
13828
13845
|
],
|
|
13829
13846
|
"relatedMemberTypes": [
|
|
13830
13847
|
"anonymous",
|
|
13831
13848
|
"test",
|
|
13832
|
-
"member"
|
|
13833
|
-
"agent"
|
|
13849
|
+
"member"
|
|
13834
13850
|
]
|
|
13835
13851
|
}
|
|
13836
13852
|
]
|
|
@@ -14976,7 +14992,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
14976
14992
|
abilities: new AbilitiesApi(apiKey, baseUrl, customFetch),
|
|
14977
14993
|
accessGrants: new AccessGrantsApi(apiKey, baseUrl, customFetch),
|
|
14978
14994
|
agentTasks: new AgentTasksApi(apiKey, baseUrl, customFetch),
|
|
14979
|
-
|
|
14995
|
+
botJobs: new BotJobsApi(apiKey, baseUrl, customFetch),
|
|
14980
14996
|
aiModels: new AIModelsApi(apiKey, baseUrl, customFetch),
|
|
14981
14997
|
apiKeys: new ApiKeysApi(apiKey, baseUrl, customFetch),
|
|
14982
14998
|
appLinks: new AppLinksApi(apiKey, baseUrl, customFetch),
|
|
@@ -15065,7 +15081,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15065
15081
|
"addWorkspaceSupportRequestParticipants",
|
|
15066
15082
|
"advanceStep",
|
|
15067
15083
|
"approveWorkspaceInvitation",
|
|
15068
|
-
"archiveAgent",
|
|
15069
15084
|
"archiveChat",
|
|
15070
15085
|
"archiveDataType",
|
|
15071
15086
|
"archiveJourney",
|
|
@@ -15121,7 +15136,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15121
15136
|
"convertFile",
|
|
15122
15137
|
"createAbility",
|
|
15123
15138
|
"createAccessGrant",
|
|
15124
|
-
"createAgent",
|
|
15125
15139
|
"createApiKey",
|
|
15126
15140
|
"createAssignment",
|
|
15127
15141
|
"bindInstallationSlots",
|
|
@@ -15204,7 +15218,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15204
15218
|
"createWorkspaceRealtimeLoginToken",
|
|
15205
15219
|
"createWorkspaceSupportRequest",
|
|
15206
15220
|
"deleteAbility",
|
|
15207
|
-
"deleteAgent",
|
|
15208
15221
|
"deleteAssignment",
|
|
15209
15222
|
"deleteCalendar",
|
|
15210
15223
|
"deleteCalendarEvent",
|
|
@@ -15310,6 +15323,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15310
15323
|
"exportWorkspace",
|
|
15311
15324
|
"exportWorkspaceZip",
|
|
15312
15325
|
"fetchVoicemailAudio",
|
|
15326
|
+
"getVoicemailByUuid",
|
|
15313
15327
|
"fhirBackfillEncounterSync",
|
|
15314
15328
|
"fhirCheckPatientLinks",
|
|
15315
15329
|
"fhirCreateEncounter",
|
|
@@ -15343,12 +15357,10 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15343
15357
|
"getAbilityTypes",
|
|
15344
15358
|
"getAccessGrant",
|
|
15345
15359
|
"getAccessGrants",
|
|
15346
|
-
"getAgent",
|
|
15347
15360
|
"getAgentModeAttention",
|
|
15348
15361
|
"getAgentTask",
|
|
15349
15362
|
"getAgentTaskMessages",
|
|
15350
15363
|
"getAgentTasks",
|
|
15351
|
-
"getAgents",
|
|
15352
15364
|
"getAnonymousResolution",
|
|
15353
15365
|
"getAnonymousFormSubmission",
|
|
15354
15366
|
"getAnonymousFormSchema",
|
|
@@ -15548,6 +15560,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15548
15560
|
"getPatientSyncStatus",
|
|
15549
15561
|
"getHubspotContactProperties",
|
|
15550
15562
|
"getHubspotDealProperties",
|
|
15563
|
+
"getHubspotDealPipelines",
|
|
15551
15564
|
"getHubspotForms",
|
|
15552
15565
|
"getHubspotMeetingLinks",
|
|
15553
15566
|
"getHubspotCrmObjects",
|
|
@@ -15567,6 +15580,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15567
15580
|
"getImportReadiness",
|
|
15568
15581
|
"rebuildImportSkippedRules",
|
|
15569
15582
|
"getInbox",
|
|
15583
|
+
"getChatSenderInboxes",
|
|
15570
15584
|
"getInboxEmail",
|
|
15571
15585
|
"getInboxEmails",
|
|
15572
15586
|
"getInboxArchiveBlockers",
|
|
@@ -15631,6 +15645,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15631
15645
|
"getMyGivenGrants",
|
|
15632
15646
|
"getMyReceivedGrants",
|
|
15633
15647
|
"getNotification",
|
|
15648
|
+
"getNotificationDelivery",
|
|
15634
15649
|
"getNotificationDestinations",
|
|
15635
15650
|
"getNotificationRules",
|
|
15636
15651
|
"getNotifications",
|
|
@@ -15715,7 +15730,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15715
15730
|
"getTeamsApps",
|
|
15716
15731
|
"getTeamsConversations",
|
|
15717
15732
|
"getTeamsInstallations",
|
|
15718
|
-
"getTeamsNotificationDelivery",
|
|
15719
15733
|
"getTemplateContext",
|
|
15720
15734
|
"getChatTestRun",
|
|
15721
15735
|
"getTestChatRun",
|
|
@@ -15944,7 +15958,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15944
15958
|
"simulateJourney",
|
|
15945
15959
|
"testRunJourney",
|
|
15946
15960
|
"toggleFieldIndex",
|
|
15947
|
-
"unarchiveAgent",
|
|
15948
15961
|
"unarchiveChat",
|
|
15949
15962
|
"unarchiveDataType",
|
|
15950
15963
|
"unarchiveMember",
|
|
@@ -15963,7 +15976,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
15963
15976
|
"unlinkMemberFromSalesforce",
|
|
15964
15977
|
"unregisterPushSubscription",
|
|
15965
15978
|
"updateAbility",
|
|
15966
|
-
"updateAgent",
|
|
15967
15979
|
"updateAssignment",
|
|
15968
15980
|
"updateCalendar",
|
|
15969
15981
|
"updateCalendarEvent",
|
|
@@ -16111,17 +16123,10 @@ function bindAgentTasksMethods(target, api) {
|
|
|
16111
16123
|
target.getAgentTaskMessages = api.getAgentTaskMessages.bind(api);
|
|
16112
16124
|
}
|
|
16113
16125
|
|
|
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);
|
|
16126
|
+
// src/client/bindings/bot-jobs.ts
|
|
16127
|
+
function bindBotJobsMethods(target, botJobs) {
|
|
16128
|
+
target.getBotJobs = botJobs.getBotJobs.bind(botJobs);
|
|
16129
|
+
target.stopBotJob = botJobs.stopBotJob.bind(botJobs);
|
|
16125
16130
|
}
|
|
16126
16131
|
|
|
16127
16132
|
// src/client/bindings/tasks.ts
|
|
@@ -16150,6 +16155,8 @@ function bindChatsMethods(target, chats) {
|
|
|
16150
16155
|
target.createChatInteractionSession = chats.createChatInteractionSession.bind(chats);
|
|
16151
16156
|
target.transitionChatInteractionSession = chats.transitionChatInteractionSession.bind(chats);
|
|
16152
16157
|
target.getChats = chats.getChats.bind(chats);
|
|
16158
|
+
target.queryOrgChats = chats.queryOrgChats.bind(chats);
|
|
16159
|
+
target.countOrgChats = chats.countOrgChats.bind(chats);
|
|
16153
16160
|
target.getChat = chats.getChat.bind(chats);
|
|
16154
16161
|
target.getChatAttention = chats.getChatAttention.bind(chats);
|
|
16155
16162
|
target.getChatByUuid = chats.getChatByUuid.bind(chats);
|
|
@@ -16253,6 +16260,7 @@ function bindActivityMethods(target, activity) {
|
|
|
16253
16260
|
target.queryOrgActivityOneView = activity.queryOrgActivityOneView.bind(activity);
|
|
16254
16261
|
target.queryOrgActivityDigest = activity.queryOrgActivityDigest.bind(activity);
|
|
16255
16262
|
target.getOrgActivityCounts = activity.getOrgActivityCounts.bind(activity);
|
|
16263
|
+
target.listOrgWidgetWorkspaces = activity.listOrgWidgetWorkspaces.bind(activity);
|
|
16256
16264
|
target.queryWorkspaceActivity = activity.queryWorkspaceActivity.bind(activity);
|
|
16257
16265
|
target.queryWorkspaceActivityLatestSubjects = activity.queryWorkspaceActivityLatestSubjects.bind(activity);
|
|
16258
16266
|
target.queryWorkspaceActivityOpenItems = activity.queryWorkspaceActivityOpenItems.bind(activity);
|
|
@@ -16347,6 +16355,7 @@ function bindMembersMethods(target, members) {
|
|
|
16347
16355
|
target.getMemberSmsSenders = members.getMemberSmsSenders.bind(members);
|
|
16348
16356
|
target.getMemberByUuid = members.getMemberByUuid.bind(members);
|
|
16349
16357
|
target.getOrgWorkspaceMember = members.getOrgWorkspaceMember.bind(members);
|
|
16358
|
+
target.searchOrgWorkspaceMembers = members.searchOrgWorkspaceMembers.bind(members);
|
|
16350
16359
|
target.createWorkspaceMember = members.createWorkspaceMember.bind(members);
|
|
16351
16360
|
target.updateMember = members.updateMember.bind(members);
|
|
16352
16361
|
target.deleteMember = members.deleteMember.bind(members);
|
|
@@ -16819,6 +16828,7 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
|
|
|
16819
16828
|
target.getPhoneNumberMessages = phoneNumbers.getPhoneNumberMessages.bind(phoneNumbers);
|
|
16820
16829
|
target.getPhoneNumberFaxes = phoneNumbers.getPhoneNumberFaxes.bind(phoneNumbers);
|
|
16821
16830
|
target.getPhoneNumberVoicemails = phoneNumbers.getPhoneNumberVoicemails.bind(phoneNumbers);
|
|
16831
|
+
target.getVoicemailByUuid = phoneNumbers.getVoicemailByUuid.bind(phoneNumbers);
|
|
16822
16832
|
target.fetchVoicemailAudio = phoneNumbers.fetchVoicemailAudio.bind(phoneNumbers);
|
|
16823
16833
|
target.updateVoicemailStatus = phoneNumbers.updateVoicemailStatus.bind(phoneNumbers);
|
|
16824
16834
|
target.releasePhoneNumber = phoneNumbers.releasePhoneNumber.bind(phoneNumbers);
|
|
@@ -16826,6 +16836,7 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
|
|
|
16826
16836
|
target.linkPhoneNumber = phoneNumbers.linkPhoneNumber.bind(phoneNumbers);
|
|
16827
16837
|
target.getInboxes = inboxes.getInboxes.bind(inboxes);
|
|
16828
16838
|
target.getInbox = inboxes.getInbox.bind(inboxes);
|
|
16839
|
+
target.getChatSenderInboxes = inboxes.getChatSenderInboxes.bind(inboxes);
|
|
16829
16840
|
target.createInbox = inboxes.createInbox.bind(inboxes);
|
|
16830
16841
|
target.updateInbox = inboxes.updateInbox.bind(inboxes);
|
|
16831
16842
|
target.deleteInbox = inboxes.deleteInbox.bind(inboxes);
|
|
@@ -16851,6 +16862,7 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
|
|
|
16851
16862
|
target.updateNotificationRule = notificationRules.updateNotificationRule.bind(notificationRules);
|
|
16852
16863
|
target.deleteNotificationRule = notificationRules.deleteNotificationRule.bind(notificationRules);
|
|
16853
16864
|
target.getNotificationDestinations = notificationRules.getNotificationDestinations.bind(notificationRules);
|
|
16865
|
+
target.getNotificationDelivery = notificationRules.getNotificationDelivery.bind(notificationRules);
|
|
16854
16866
|
}
|
|
16855
16867
|
|
|
16856
16868
|
// src/client/bindings/toolkits.ts
|
|
@@ -17040,8 +17052,7 @@ function createIntegrationsBindings(apis) {
|
|
|
17040
17052
|
"deleteTeamsApp",
|
|
17041
17053
|
"getTeamsConversations",
|
|
17042
17054
|
"getTeamsInstallations",
|
|
17043
|
-
"getTeamsAppAccounts"
|
|
17044
|
-
"getTeamsNotificationDelivery"
|
|
17055
|
+
"getTeamsAppAccounts"
|
|
17045
17056
|
]),
|
|
17046
17057
|
...bindMethods(apis.fhirConnections, [
|
|
17047
17058
|
"getFhirConnections",
|
|
@@ -17178,6 +17189,7 @@ function createIntegrationsBindings(apis) {
|
|
|
17178
17189
|
"importHubspotMembers",
|
|
17179
17190
|
"getHubspotContactProperties",
|
|
17180
17191
|
"getHubspotDealProperties",
|
|
17192
|
+
"getHubspotDealPipelines",
|
|
17181
17193
|
"getHubspotForms",
|
|
17182
17194
|
"getHubspotMeetingLinks",
|
|
17183
17195
|
"getHubspotCrmObjects",
|
|
@@ -17272,6 +17284,10 @@ function bindOrgMethods(target, org) {
|
|
|
17272
17284
|
target.listLegalEntities = org.listLegalEntities.bind(org);
|
|
17273
17285
|
target.getLegalEntity = org.getLegalEntity.bind(org);
|
|
17274
17286
|
target.createLegalEntity = org.createLegalEntity.bind(org);
|
|
17287
|
+
target.getBusinessImportColumns = org.getBusinessImportColumns.bind(org);
|
|
17288
|
+
target.getBusinessImportTemplate = org.getBusinessImportTemplate.bind(org);
|
|
17289
|
+
target.previewBusinessImport = org.previewBusinessImport.bind(org);
|
|
17290
|
+
target.importBusinesses = org.importBusinesses.bind(org);
|
|
17275
17291
|
target.getRegistrationDraft = org.getRegistrationDraft.bind(org);
|
|
17276
17292
|
target.saveRegistrationDraft = org.saveRegistrationDraft.bind(org);
|
|
17277
17293
|
target.getVoiceTrustProducts = org.getVoiceTrustProducts.bind(org);
|
|
@@ -17598,6 +17614,8 @@ var GravityRailClient = class {
|
|
|
17598
17614
|
// Chats API
|
|
17599
17615
|
chat;
|
|
17600
17616
|
getChats;
|
|
17617
|
+
queryOrgChats;
|
|
17618
|
+
countOrgChats;
|
|
17601
17619
|
getChat;
|
|
17602
17620
|
getChatAttention;
|
|
17603
17621
|
getChatByUuid;
|
|
@@ -17722,6 +17740,7 @@ var GravityRailClient = class {
|
|
|
17722
17740
|
// Org-scoped, so deliberately absent from WORKSPACE_METHOD_NAMES: that proxy
|
|
17723
17741
|
// passes a workspace uuid as the first argument.
|
|
17724
17742
|
getOrgWorkspaceMember;
|
|
17743
|
+
searchOrgWorkspaceMembers;
|
|
17725
17744
|
createWorkspaceMember;
|
|
17726
17745
|
updateMember;
|
|
17727
17746
|
deleteMember;
|
|
@@ -17788,16 +17807,9 @@ var GravityRailClient = class {
|
|
|
17788
17807
|
getAgentTask;
|
|
17789
17808
|
cancelAgentTask;
|
|
17790
17809
|
getAgentTaskMessages;
|
|
17791
|
-
//
|
|
17792
|
-
|
|
17793
|
-
|
|
17794
|
-
createAgent;
|
|
17795
|
-
updateAgent;
|
|
17796
|
-
deleteAgent;
|
|
17797
|
-
archiveAgent;
|
|
17798
|
-
unarchiveAgent;
|
|
17799
|
-
getOrgAgentJobs;
|
|
17800
|
-
stopOrgAgentJob;
|
|
17810
|
+
// Org Agent Jobs API
|
|
17811
|
+
getBotJobs;
|
|
17812
|
+
stopBotJob;
|
|
17801
17813
|
// Qualifications API
|
|
17802
17814
|
getQualifications;
|
|
17803
17815
|
getQualification;
|
|
@@ -17877,6 +17889,7 @@ var GravityRailClient = class {
|
|
|
17877
17889
|
queryOrgActivityOneView;
|
|
17878
17890
|
queryOrgActivityDigest;
|
|
17879
17891
|
getOrgActivityCounts;
|
|
17892
|
+
listOrgWidgetWorkspaces;
|
|
17880
17893
|
queryWorkspaceActivity;
|
|
17881
17894
|
queryWorkspaceActivityLatestSubjects;
|
|
17882
17895
|
queryWorkspaceActivityOpenItems;
|
|
@@ -18119,6 +18132,10 @@ var GravityRailClient = class {
|
|
|
18119
18132
|
listLegalEntities;
|
|
18120
18133
|
getLegalEntity;
|
|
18121
18134
|
createLegalEntity;
|
|
18135
|
+
getBusinessImportColumns;
|
|
18136
|
+
getBusinessImportTemplate;
|
|
18137
|
+
previewBusinessImport;
|
|
18138
|
+
importBusinesses;
|
|
18122
18139
|
getRegistrationDraft;
|
|
18123
18140
|
saveRegistrationDraft;
|
|
18124
18141
|
getVoiceTrustProducts;
|
|
@@ -18460,6 +18477,7 @@ var GravityRailClient = class {
|
|
|
18460
18477
|
getPhoneNumberMessages;
|
|
18461
18478
|
getPhoneNumberFaxes;
|
|
18462
18479
|
getPhoneNumberVoicemails;
|
|
18480
|
+
getVoicemailByUuid;
|
|
18463
18481
|
fetchVoicemailAudio;
|
|
18464
18482
|
updateVoicemailStatus;
|
|
18465
18483
|
releasePhoneNumber;
|
|
@@ -18467,6 +18485,7 @@ var GravityRailClient = class {
|
|
|
18467
18485
|
linkPhoneNumber;
|
|
18468
18486
|
getInboxes;
|
|
18469
18487
|
getInbox;
|
|
18488
|
+
getChatSenderInboxes;
|
|
18470
18489
|
createInbox;
|
|
18471
18490
|
updateInbox;
|
|
18472
18491
|
deleteInbox;
|
|
@@ -18492,6 +18511,7 @@ var GravityRailClient = class {
|
|
|
18492
18511
|
updateNotificationRule;
|
|
18493
18512
|
deleteNotificationRule;
|
|
18494
18513
|
getNotificationDestinations;
|
|
18514
|
+
getNotificationDelivery;
|
|
18495
18515
|
// Toolkits API
|
|
18496
18516
|
getToolkits;
|
|
18497
18517
|
getTool;
|
|
@@ -18668,7 +18688,6 @@ var GravityRailClient = class {
|
|
|
18668
18688
|
getTeamsConversations;
|
|
18669
18689
|
getTeamsInstallations;
|
|
18670
18690
|
getTeamsAppAccounts;
|
|
18671
|
-
getTeamsNotificationDelivery;
|
|
18672
18691
|
// FHIR Connections API
|
|
18673
18692
|
getFhirConnections;
|
|
18674
18693
|
getFhirConnection;
|
|
@@ -18795,6 +18814,7 @@ var GravityRailClient = class {
|
|
|
18795
18814
|
importHubspotMembers;
|
|
18796
18815
|
getHubspotContactProperties;
|
|
18797
18816
|
getHubspotDealProperties;
|
|
18817
|
+
getHubspotDealPipelines;
|
|
18798
18818
|
getHubspotForms;
|
|
18799
18819
|
getHubspotMeetingLinks;
|
|
18800
18820
|
getHubspotCrmObjects;
|
|
@@ -18952,7 +18972,7 @@ var GravityRailClient = class {
|
|
|
18952
18972
|
bindDevicesMethods(this, apis.devices);
|
|
18953
18973
|
bindMembersMethods(this, apis.members);
|
|
18954
18974
|
bindAgentTasksMethods(this, apis.agentTasks);
|
|
18955
|
-
|
|
18975
|
+
bindBotJobsMethods(this, apis.botJobs);
|
|
18956
18976
|
bindQualificationsMethods(this, apis.qualifications);
|
|
18957
18977
|
bindPersonasMethods(this, apis.personas);
|
|
18958
18978
|
bindMetricsMethods(this, apis.metrics);
|
|
@@ -19279,7 +19299,6 @@ var NotificationRuleBuilder = class extends WorkspaceBuilderResource {
|
|
|
19279
19299
|
this.prompt = options.prompt ?? options.message;
|
|
19280
19300
|
this.notifySms = Boolean(options.notifySms ?? options.notify_sms);
|
|
19281
19301
|
this.notifyEmail = Boolean(options.notifyEmail ?? options.notify_email);
|
|
19282
|
-
this.notifyVoice = Boolean(options.notifyVoice ?? options.notify_voice);
|
|
19283
19302
|
}
|
|
19284
19303
|
name;
|
|
19285
19304
|
noticeType;
|
|
@@ -19288,7 +19307,6 @@ var NotificationRuleBuilder = class extends WorkspaceBuilderResource {
|
|
|
19288
19307
|
prompt;
|
|
19289
19308
|
notifySms;
|
|
19290
19309
|
notifyEmail;
|
|
19291
|
-
notifyVoice;
|
|
19292
19310
|
planLine() {
|
|
19293
19311
|
const parts = [];
|
|
19294
19312
|
if (this.memberId !== void 0) parts.push(`memberId=${this.memberId}`);
|
|
@@ -19306,8 +19324,7 @@ var NotificationRuleBuilder = class extends WorkspaceBuilderResource {
|
|
|
19306
19324
|
workflowId: this.workflow?._id,
|
|
19307
19325
|
prompt: this.prompt ?? null,
|
|
19308
19326
|
notifySms: this.notifySms,
|
|
19309
|
-
notifyEmail: this.notifyEmail
|
|
19310
|
-
notifyVoice: this.notifyVoice
|
|
19327
|
+
notifyEmail: this.notifyEmail
|
|
19311
19328
|
};
|
|
19312
19329
|
const result = await client.createNotificationRule(payload);
|
|
19313
19330
|
this._id = result.id;
|
|
@@ -19477,7 +19494,7 @@ var MemberLabelBuilder = class extends WorkspaceBuilderResource {
|
|
|
19477
19494
|
this.description = description;
|
|
19478
19495
|
}
|
|
19479
19496
|
matchKey() {
|
|
19480
|
-
return this.
|
|
19497
|
+
return this.name;
|
|
19481
19498
|
}
|
|
19482
19499
|
planLine() {
|
|
19483
19500
|
return `Label: ${this.name} (slug=${this.slug})`;
|
|
@@ -20375,12 +20392,10 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
20375
20392
|
this.name = name;
|
|
20376
20393
|
this.description = options.description ?? "";
|
|
20377
20394
|
this.prompt = options.prompt;
|
|
20378
|
-
this.copyFromAgentId = options.copyFromAgentId;
|
|
20379
20395
|
}
|
|
20380
20396
|
name;
|
|
20381
20397
|
description;
|
|
20382
20398
|
prompt;
|
|
20383
|
-
copyFromAgentId;
|
|
20384
20399
|
tasks = [];
|
|
20385
20400
|
abilities = [];
|
|
20386
20401
|
/** The DRAFT revision's id — where tasks and graph edits attach.
|
|
@@ -20433,7 +20448,6 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
20433
20448
|
description: this.description,
|
|
20434
20449
|
createMode: "taskless",
|
|
20435
20450
|
...this.prompt ? { prompt: this.prompt } : {},
|
|
20436
|
-
...this.copyFromAgentId ? { copyFromAgentId: this.copyFromAgentId } : {},
|
|
20437
20451
|
...this.abilities.length ? { abilities: this.abilities.map((ability) => ability.toAbility()) } : {}
|
|
20438
20452
|
};
|
|
20439
20453
|
const result = await client.createWorkflow(payload);
|
|
@@ -20443,59 +20457,11 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
20443
20457
|
this._created = true;
|
|
20444
20458
|
}
|
|
20445
20459
|
};
|
|
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
20460
|
|
|
20494
20461
|
// src/workspace-builder/orchestrator.ts
|
|
20495
20462
|
var PHASES = /* @__PURE__ */ new Map([
|
|
20496
20463
|
[FormBuilder, 0],
|
|
20497
20464
|
[MemberLabelBuilder, 0],
|
|
20498
|
-
[AgentBuilder, 1],
|
|
20499
20465
|
[WorkflowBuilder, 2],
|
|
20500
20466
|
[TaskBuilder, 3],
|
|
20501
20467
|
[MemberFilterBuilder, 5],
|
|
@@ -20567,11 +20533,6 @@ var WorkspaceBuilder = class {
|
|
|
20567
20533
|
this.resources.push(journey);
|
|
20568
20534
|
return journey;
|
|
20569
20535
|
}
|
|
20570
|
-
agent(name, options = {}) {
|
|
20571
|
-
const agent = new AgentBuilder(name, options);
|
|
20572
|
-
this.resources.push(agent);
|
|
20573
|
-
return agent;
|
|
20574
|
-
}
|
|
20575
20536
|
routine(name, cronSchedule = "", options = {}) {
|
|
20576
20537
|
const routine = new RoutineBuilder(name, cronSchedule, options);
|
|
20577
20538
|
this.resources.push(routine);
|
|
@@ -20754,10 +20715,10 @@ Done! Created ${count} resources.`);
|
|
|
20754
20715
|
const formSlugs = new Map(
|
|
20755
20716
|
resources.filter((resource) => resource instanceof FormBuilder).map((resource) => [resource.slug, resource])
|
|
20756
20717
|
);
|
|
20757
|
-
const
|
|
20718
|
+
const labelNames = new Map(
|
|
20758
20719
|
resources.filter(
|
|
20759
20720
|
(resource) => resource instanceof MemberLabelBuilder
|
|
20760
|
-
).map((resource) => [resource.
|
|
20721
|
+
).map((resource) => [resource.name, resource])
|
|
20761
20722
|
);
|
|
20762
20723
|
const workflowNames = new Map(
|
|
20763
20724
|
resources.filter((resource) => resource instanceof WorkflowBuilder).map((resource) => [resource.name, resource])
|
|
@@ -20769,10 +20730,10 @@ Done! Created ${count} resources.`);
|
|
|
20769
20730
|
}
|
|
20770
20731
|
}
|
|
20771
20732
|
}
|
|
20772
|
-
if (
|
|
20733
|
+
if (labelNames.size) {
|
|
20773
20734
|
for (const existing of await this.client.getMemberLabels()) {
|
|
20774
|
-
if (existing.
|
|
20775
|
-
|
|
20735
|
+
if (existing.name && labelNames.has(existing.name)) {
|
|
20736
|
+
labelNames.get(existing.name).adopt(existing);
|
|
20776
20737
|
}
|
|
20777
20738
|
}
|
|
20778
20739
|
}
|
|
@@ -20815,18 +20776,6 @@ Done! Created ${count} resources.`);
|
|
|
20815
20776
|
builder.adopt(await this.client.getJourneyAuthoring(existing.id));
|
|
20816
20777
|
}
|
|
20817
20778
|
}
|
|
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
20779
|
const routineNames = new Map(
|
|
20831
20780
|
resources.filter((resource) => resource instanceof RoutineBuilder).map((resource) => [resource.name, resource])
|
|
20832
20781
|
);
|
|
@@ -21097,7 +21046,6 @@ function resourceKey(resource) {
|
|
|
21097
21046
|
if (resource instanceof RoutineBuilder) return "routines";
|
|
21098
21047
|
if (resource instanceof NotificationRuleBuilder) return "notificationRules";
|
|
21099
21048
|
if (resource instanceof JourneyBuilder) return "journeys";
|
|
21100
|
-
if (resource instanceof AgentBuilder) return "agents";
|
|
21101
21049
|
return "resources";
|
|
21102
21050
|
}
|
|
21103
21051
|
var SEARCHABLE_EVENT_RULE_SOURCE_FIELDS = [
|
|
@@ -21199,7 +21147,6 @@ function writeScopeForResource(resource) {
|
|
|
21199
21147
|
if (resource instanceof WorkflowBuilder || resource instanceof TaskBuilder) {
|
|
21200
21148
|
return "workflows:write";
|
|
21201
21149
|
}
|
|
21202
|
-
if (resource instanceof AgentBuilder) return "agents:write";
|
|
21203
21150
|
if (resource instanceof MemberLabelBuilder || resource instanceof MemberFilterBuilder) {
|
|
21204
21151
|
return "members:write";
|
|
21205
21152
|
}
|
|
@@ -22833,6 +22780,43 @@ var ChatInteractionController = class {
|
|
|
22833
22780
|
}
|
|
22834
22781
|
};
|
|
22835
22782
|
|
|
22783
|
+
// src/helpers/business-import.ts
|
|
22784
|
+
function toSafeRow(row, legalEntityUuid) {
|
|
22785
|
+
return {
|
|
22786
|
+
row: row.row,
|
|
22787
|
+
action: row.action,
|
|
22788
|
+
legalEntityUuid: legalEntityUuid ?? void 0,
|
|
22789
|
+
proposedChanges: row.proposedChanges,
|
|
22790
|
+
reason: row.reason ?? void 0,
|
|
22791
|
+
error: row.error ?? void 0
|
|
22792
|
+
};
|
|
22793
|
+
}
|
|
22794
|
+
function toSafeIssue({ row, column, columnPosition, code }) {
|
|
22795
|
+
return { row, column, columnPosition, code };
|
|
22796
|
+
}
|
|
22797
|
+
function toSafeBusinessImportPreview(preview) {
|
|
22798
|
+
return {
|
|
22799
|
+
previewPlanToken: preview.previewPlanToken,
|
|
22800
|
+
totalRows: preview.totalRows,
|
|
22801
|
+
summary: preview.summary,
|
|
22802
|
+
rows: preview.rows.map((row) => toSafeRow(row, row.match?.legalEntityUuid)),
|
|
22803
|
+
ignoredColumnPositions: preview.ignoredColumnPositions,
|
|
22804
|
+
issues: preview.issues?.map(toSafeIssue),
|
|
22805
|
+
issueCount: preview.issueCount
|
|
22806
|
+
};
|
|
22807
|
+
}
|
|
22808
|
+
function toSafeBusinessImportResult(result) {
|
|
22809
|
+
return {
|
|
22810
|
+
importId: result.importId,
|
|
22811
|
+
totalRows: result.totalRows,
|
|
22812
|
+
summary: result.summary,
|
|
22813
|
+
rows: result.rows.map((row) => toSafeRow(row, row.legalEntityUuid)),
|
|
22814
|
+
ignoredColumnPositions: result.ignoredColumnPositions,
|
|
22815
|
+
issues: result.issues?.map(toSafeIssue),
|
|
22816
|
+
issueCount: result.issueCount
|
|
22817
|
+
};
|
|
22818
|
+
}
|
|
22819
|
+
|
|
22836
22820
|
// src/helpers/member-import.ts
|
|
22837
22821
|
function toSafeMemberImportPreview(preview) {
|
|
22838
22822
|
return {
|
|
@@ -22975,7 +22959,6 @@ function pathDraftToStorage(draft, original) {
|
|
|
22975
22959
|
ActivityVisibility,
|
|
22976
22960
|
ActivityWindowBasis,
|
|
22977
22961
|
ActorKind,
|
|
22978
|
-
AgentBuilder,
|
|
22979
22962
|
AiConnectorPolicy,
|
|
22980
22963
|
AiDisclosure,
|
|
22981
22964
|
ApiError,
|
|
@@ -23233,6 +23216,8 @@ function pathDraftToStorage(draft, original) {
|
|
|
23233
23216
|
pathDraftToStorage,
|
|
23234
23217
|
requiresAssistantParticipant,
|
|
23235
23218
|
runWorkspaceScript,
|
|
23219
|
+
toSafeBusinessImportPreview,
|
|
23220
|
+
toSafeBusinessImportResult,
|
|
23236
23221
|
toSafeMemberImportPreview,
|
|
23237
23222
|
toSafeMemberImportSummary,
|
|
23238
23223
|
usesBuiltinAssistant,
|