@gravity-rail/sdk 0.10.1 → 0.12.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 +7 -8
- package/dist/{chunk-2BJG4GYM.js → chunk-LODUVCW6.js} +884 -210
- package/dist/chunk-LODUVCW6.js.map +1 -0
- package/dist/{chunk-TJT7A4CO.js → chunk-V7ZKEH4V.js} +1 -1
- package/dist/chunk-V7ZKEH4V.js.map +1 -0
- package/dist/{client-BffM3KcA.d.cts → client-CYQ_N681.d.ts} +2794 -1123
- package/dist/{client-DfjAYbt8.d.ts → client-DSFqUxvN.d.cts} +2794 -1123
- package/dist/helpers.cjs +6 -18
- 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 +6 -18
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +914 -298
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -21
- package/dist/index.d.ts +23 -21
- package/dist/index.js +51 -95
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +1040 -297
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +446 -74
- package/dist/internal.d.ts +446 -74
- package/dist/internal.js +75 -3
- package/dist/internal.js.map +1 -1
- package/dist/realtime.cjs +42 -0
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +26 -0
- package/dist/realtime.d.ts +26 -0
- package/dist/realtime.js +42 -0
- package/dist/realtime.js.map +1 -1
- package/dist/{scopes-CmNKWrzb.d.ts → revision-state-C0VW3vDJ.d.cts} +221 -19
- package/dist/{scopes-CjSvITpL.d.cts → revision-state-CIRkBy-k.d.ts} +221 -19
- package/dist/schemas.cjs +55 -111
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +48 -466
- package/dist/schemas.d.ts +48 -466
- package/dist/schemas.js +55 -108
- package/dist/schemas.js.map +1 -1
- package/dist/{inquiries-UcWNYo-Q.d.cts → tasks-DcxMysiR.d.cts} +483 -143
- package/dist/{inquiries-UcWNYo-Q.d.ts → tasks-DcxMysiR.d.ts} +483 -143
- package/package.json +1 -1
- package/dist/chunk-2BJG4GYM.js.map +0 -1
- package/dist/chunk-TJT7A4CO.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -46,6 +46,7 @@ __export(src_exports, {
|
|
|
46
46
|
CalendarScheduleAvailabilityType: () => CalendarScheduleAvailabilityType,
|
|
47
47
|
CalendarScheduleRecurrence: () => CalendarScheduleRecurrence,
|
|
48
48
|
CalendarSource: () => CalendarSource,
|
|
49
|
+
CapabilityClass: () => CapabilityClass,
|
|
49
50
|
ConsentMethod: () => ConsentMethod,
|
|
50
51
|
CriterionType: () => CriterionType,
|
|
51
52
|
DEFAULT_CHAT_MODEL: () => DEFAULT_CHAT_MODEL,
|
|
@@ -105,6 +106,7 @@ __export(src_exports, {
|
|
|
105
106
|
PERMISSION_VERIFY: () => PERMISSION_VERIFY,
|
|
106
107
|
PIDS_DISPOSITIONS: () => PIDS_DISPOSITIONS,
|
|
107
108
|
PIDS_SOURCES: () => PIDS_SOURCES,
|
|
109
|
+
POSITIVE_RATING_THRESHOLD: () => POSITIVE_RATING_THRESHOLD,
|
|
108
110
|
ProductType: () => ProductType,
|
|
109
111
|
QUERY_VALUELESS_OPS: () => QUERY_VALUELESS_OPS,
|
|
110
112
|
QueriesApi: () => QueriesApi,
|
|
@@ -141,6 +143,7 @@ __export(src_exports, {
|
|
|
141
143
|
TaskBuilder: () => TaskBuilder,
|
|
142
144
|
TemplatesApi: () => TemplatesApi,
|
|
143
145
|
ToolkitState: () => ToolkitState,
|
|
146
|
+
WIDGET_SLUGS: () => WIDGET_SLUGS,
|
|
144
147
|
WorkflowAccessWarningResourceType: () => WorkflowAccessWarningResourceType,
|
|
145
148
|
WorkflowBuilder: () => WorkflowBuilder,
|
|
146
149
|
WorkflowResourceType: () => WorkflowAccessWarningResourceType,
|
|
@@ -166,12 +169,14 @@ __export(src_exports, {
|
|
|
166
169
|
getFeaturesByVisibility: () => getFeaturesByVisibility,
|
|
167
170
|
getMissingDependencies: () => getMissingDependencies,
|
|
168
171
|
getResourceMetadata: () => getResourceMetadata,
|
|
172
|
+
getRevisionState: () => getRevisionState,
|
|
169
173
|
getScopeFromProductType: () => getScopeFromProductType,
|
|
170
174
|
getTTSProvider: () => getTTSProvider,
|
|
171
175
|
getVoiceModelId: () => getVoiceModelId,
|
|
172
176
|
initializeFeatures: () => initializeFeatures,
|
|
173
177
|
isChatType: () => isChatType,
|
|
174
178
|
isFeatureAvailable: () => isFeatureAvailable,
|
|
179
|
+
isPositiveRating: () => isPositiveRating,
|
|
175
180
|
isRegistryInitialized: () => isRegistryInitialized,
|
|
176
181
|
isSMSDeliveryFailureStatus: () => isSMSDeliveryFailureStatus,
|
|
177
182
|
requiresAssistantParticipant: () => requiresAssistantParticipant,
|
|
@@ -660,20 +665,22 @@ var AbilitiesApi = class extends BaseApiClient {
|
|
|
660
665
|
}
|
|
661
666
|
/** Get the full spec for a single ability type by slug. */
|
|
662
667
|
async getAbilityType(wid, slug) {
|
|
663
|
-
return this.fetch(
|
|
664
|
-
`w/${wid}/abilities/types/${encodeURIComponent(slug)}`
|
|
665
|
-
);
|
|
668
|
+
return this.fetch(`w/${wid}/abilities/types/${encodeURIComponent(slug)}`);
|
|
666
669
|
}
|
|
667
670
|
/**
|
|
668
671
|
* List configured ability instances for a workflow or task scope.
|
|
669
|
-
*
|
|
672
|
+
* Provide exactly one of:
|
|
673
|
+
* - workflow scope: workflowId (stable root → draft revision) and/or
|
|
674
|
+
* workflowRevisionId (explicit pin)
|
|
675
|
+
* - taskId for task-scoped abilities
|
|
670
676
|
*/
|
|
671
677
|
async listAbilities(wid, options) {
|
|
672
678
|
const params = new URLSearchParams();
|
|
673
679
|
if (options.workflowId !== void 0)
|
|
674
680
|
params.append("workflowId", options.workflowId.toString());
|
|
675
|
-
if (options.
|
|
676
|
-
params.append("
|
|
681
|
+
if (options.workflowRevisionId !== void 0)
|
|
682
|
+
params.append("workflowRevisionId", options.workflowRevisionId.toString());
|
|
683
|
+
if (options.taskId !== void 0) params.append("taskId", options.taskId.toString());
|
|
677
684
|
return this.fetch(`w/${wid}/abilities?${params}`);
|
|
678
685
|
}
|
|
679
686
|
/** Create (enable) a configured ability on a workflow or task scope. */
|
|
@@ -696,6 +703,20 @@ var AbilitiesApi = class extends BaseApiClient {
|
|
|
696
703
|
method: "DELETE"
|
|
697
704
|
});
|
|
698
705
|
}
|
|
706
|
+
/**
|
|
707
|
+
* List recipient-directory rows approved for Charleston PMD test delivery
|
|
708
|
+
* (CS-150). Returns only {recipientKey, displayLabel} for active,
|
|
709
|
+
* test-delivery-allowed rows with a device id — never the PatientSync
|
|
710
|
+
* recipient_id. Scoped to agents:write + the charleston_nephrology_pmd_paging
|
|
711
|
+
* feature; used by the ability-config test-delivery dropdown. Kept on the
|
|
712
|
+
* ability-configuration API (not generic DataRecords) because the actual
|
|
713
|
+
* ability-editor scopes do not guarantee generic record access.
|
|
714
|
+
*/
|
|
715
|
+
async getCharlestonTestDeliveryRecipients(wid) {
|
|
716
|
+
return this.fetch(
|
|
717
|
+
`w/${wid}/app-connections/charleston_nephrology/test-delivery/eligible-recipients`
|
|
718
|
+
);
|
|
719
|
+
}
|
|
699
720
|
};
|
|
700
721
|
|
|
701
722
|
// src/api/access-grants.ts
|
|
@@ -767,6 +788,24 @@ var AccessGrantsApi = class extends BaseApiClient {
|
|
|
767
788
|
);
|
|
768
789
|
return resp.items;
|
|
769
790
|
}
|
|
791
|
+
/**
|
|
792
|
+
* List access grants *received* by a member (grantee view) — the
|
|
793
|
+
* "what can this agent do without asking?" list. Filter with
|
|
794
|
+
* status=active and/or a capabilityClass (e.g. 'tool.always_allow').
|
|
795
|
+
*/
|
|
796
|
+
async getGranteeGrants(wid, memberId, params) {
|
|
797
|
+
const searchParams = new URLSearchParams();
|
|
798
|
+
if (params?.status) searchParams.set("status", params.status);
|
|
799
|
+
if (params?.capabilityClass) {
|
|
800
|
+
searchParams.set("capability_class", params.capabilityClass);
|
|
801
|
+
}
|
|
802
|
+
if (params?.page) searchParams.set("page", params.page.toString());
|
|
803
|
+
if (params?.pageSize) searchParams.set("page_size", params.pageSize.toString());
|
|
804
|
+
const qs = searchParams.toString();
|
|
805
|
+
return this.fetch(
|
|
806
|
+
`w/${wid}/access-grants/grantee/${memberId}${qs ? `?${qs}` : ""}`
|
|
807
|
+
);
|
|
808
|
+
}
|
|
770
809
|
};
|
|
771
810
|
|
|
772
811
|
// src/api/agent-tasks.ts
|
|
@@ -853,25 +892,6 @@ var AgentsApi = class extends BaseApiClient {
|
|
|
853
892
|
method: "POST"
|
|
854
893
|
});
|
|
855
894
|
}
|
|
856
|
-
/** Resolve runtime tools for an agent on a simulated channel. */
|
|
857
|
-
async resolveAgentTools(wid, id, options) {
|
|
858
|
-
const params = new URLSearchParams();
|
|
859
|
-
params.append("channel", options.channel);
|
|
860
|
-
if (options.taskId !== void 0) params.append("taskId", options.taskId.toString());
|
|
861
|
-
if (options.taskUuid !== void 0) params.append("taskUuid", options.taskUuid);
|
|
862
|
-
return this.fetch(`w/${wid}/agents/${id}/resolve-tools?${params}`);
|
|
863
|
-
}
|
|
864
|
-
/**
|
|
865
|
-
* List the configured abilities effective for an agent via a task's workflow.
|
|
866
|
-
* Requires taskId because abilities are scoped to workflows/tasks, not agents.
|
|
867
|
-
*/
|
|
868
|
-
async listAgentAbilities(wid, id, options) {
|
|
869
|
-
const params = new URLSearchParams();
|
|
870
|
-
params.append("taskId", options.taskId.toString());
|
|
871
|
-
return this.fetch(
|
|
872
|
-
`w/${wid}/agents/${id}/abilities?${params}`
|
|
873
|
-
);
|
|
874
|
-
}
|
|
875
895
|
};
|
|
876
896
|
|
|
877
897
|
// src/api/ai-models.ts
|
|
@@ -1068,8 +1088,7 @@ var AssignmentsApi = class extends BaseApiClient {
|
|
|
1068
1088
|
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
1069
1089
|
if (options.mine) params.append("mine", options.mine.toString());
|
|
1070
1090
|
if (options.taskId) params.append("taskId", options.taskId.toString());
|
|
1071
|
-
if (options.memberId !== void 0)
|
|
1072
|
-
params.append("memberId", options.memberId.toString());
|
|
1091
|
+
if (options.memberId !== void 0) params.append("memberId", options.memberId.toString());
|
|
1073
1092
|
if (options.status) params.append("status", options.status);
|
|
1074
1093
|
return this.fetch(
|
|
1075
1094
|
`w/${wid}/assignments${params.toString() ? `?${params.toString()}` : ""}`
|
|
@@ -1198,6 +1217,20 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1198
1217
|
body: JSON.stringify(info)
|
|
1199
1218
|
});
|
|
1200
1219
|
}
|
|
1220
|
+
/**
|
|
1221
|
+
* Persist the account's FIRST-touch marketing attribution (write-once).
|
|
1222
|
+
*
|
|
1223
|
+
* Called by the browser at signup completion with its resolved UTM /
|
|
1224
|
+
* referrer / landing-page capture. The server keeps the first write and
|
|
1225
|
+
* ignores later posts (`recorded: false`), so calling this again is
|
|
1226
|
+
* harmless. Marketing context only — never emails, phones, or free text.
|
|
1227
|
+
*/
|
|
1228
|
+
async recordAcquisition(request) {
|
|
1229
|
+
return this.fetch("account/acquisition", {
|
|
1230
|
+
method: "POST",
|
|
1231
|
+
body: JSON.stringify(request)
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
1201
1234
|
/** Initiate SMS login by sending a verification code to the given phone number. */
|
|
1202
1235
|
async login(phoneNumber, wid, organizationUuid) {
|
|
1203
1236
|
const params = new URLSearchParams();
|
|
@@ -1421,23 +1454,29 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1421
1454
|
// ===== TWO-FACTOR AUTHENTICATION LOGIN METHODS =====
|
|
1422
1455
|
/** Verify a TOTP code during login to complete two-factor authentication. */
|
|
1423
1456
|
async verifyTOTPAuth(tempToken, code) {
|
|
1424
|
-
return this.fetch(
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1457
|
+
return this.fetch(
|
|
1458
|
+
"auth/2fa/auth/totp",
|
|
1459
|
+
{
|
|
1460
|
+
method: "POST",
|
|
1461
|
+
body: JSON.stringify({
|
|
1462
|
+
temp_token: tempToken,
|
|
1463
|
+
code
|
|
1464
|
+
})
|
|
1465
|
+
}
|
|
1466
|
+
);
|
|
1431
1467
|
}
|
|
1432
1468
|
/** Verify a recovery code during login to complete two-factor authentication. */
|
|
1433
1469
|
async verifyRecoveryCodeAuth(tempToken, code) {
|
|
1434
|
-
return this.fetch(
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1470
|
+
return this.fetch(
|
|
1471
|
+
"auth/2fa/auth/recovery",
|
|
1472
|
+
{
|
|
1473
|
+
method: "POST",
|
|
1474
|
+
body: JSON.stringify({
|
|
1475
|
+
temp_token: tempToken,
|
|
1476
|
+
code
|
|
1477
|
+
})
|
|
1478
|
+
}
|
|
1479
|
+
);
|
|
1441
1480
|
}
|
|
1442
1481
|
/** Get WebAuthn credential request options for two-factor login verification. */
|
|
1443
1482
|
async getWebAuthnAuthOptions(tempToken) {
|
|
@@ -1450,13 +1489,16 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1450
1489
|
}
|
|
1451
1490
|
/** Verify a WebAuthn assertion during login to complete two-factor authentication. */
|
|
1452
1491
|
async verifyWebAuthnAuth(tempToken, assertionResponse) {
|
|
1453
|
-
return this.fetch(
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1492
|
+
return this.fetch(
|
|
1493
|
+
"auth/2fa/webauthn",
|
|
1494
|
+
{
|
|
1495
|
+
method: "POST",
|
|
1496
|
+
body: JSON.stringify({
|
|
1497
|
+
temp_token: tempToken,
|
|
1498
|
+
assertion_response: assertionResponse
|
|
1499
|
+
})
|
|
1500
|
+
}
|
|
1501
|
+
);
|
|
1460
1502
|
}
|
|
1461
1503
|
// ===== ORGANIZATION MEMBERSHIP METHODS =====
|
|
1462
1504
|
/** List all organizations the current account belongs to. */
|
|
@@ -1838,6 +1880,15 @@ var CallsApi = class extends BaseApiClient {
|
|
|
1838
1880
|
async getMessageTiming(wid, chatId) {
|
|
1839
1881
|
return this.fetch(`w/${wid}/recordings/chat/${chatId}/message-timing`);
|
|
1840
1882
|
}
|
|
1883
|
+
/**
|
|
1884
|
+
* Get PHI-safe provenance metadata for the recording served by
|
|
1885
|
+
* `/audio.wav` — source, encryption, channels, duration, status, etc.
|
|
1886
|
+
* Staff-only Twilio SIDs are present only for superusers. Returns 404
|
|
1887
|
+
* when the chat has no native recording row (legacy chunk-only playback).
|
|
1888
|
+
*/
|
|
1889
|
+
async getRecordingInfo(wid, chatId) {
|
|
1890
|
+
return this.fetch(`w/${wid}/recordings/chat/${chatId}/info`);
|
|
1891
|
+
}
|
|
1841
1892
|
/** List the recorded audio chunks for a chat (metadata only). */
|
|
1842
1893
|
async listChatRecordings(wid, chatId, options = {}) {
|
|
1843
1894
|
const params = new URLSearchParams();
|
|
@@ -1896,8 +1947,7 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1896
1947
|
if (options.paused !== void 0) params.append("paused", options.paused.toString());
|
|
1897
1948
|
if (options.archived !== void 0) params.append("archived", options.archived.toString());
|
|
1898
1949
|
if (options.channel) params.append("channel", options.channel);
|
|
1899
|
-
|
|
1900
|
-
params.append("chatType", chatType);
|
|
1950
|
+
if (options.chatType) params.append("chatType", options.chatType);
|
|
1901
1951
|
if (options.memberId !== void 0) params.append("memberId", options.memberId.toString());
|
|
1902
1952
|
if (options.assistantMemberId !== void 0)
|
|
1903
1953
|
params.append("assistantMemberId", options.assistantMemberId.toString());
|
|
@@ -1908,6 +1958,11 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1908
1958
|
if (options.filters && options.filters.length > 0) {
|
|
1909
1959
|
params.append("filters", JSON.stringify(options.filters));
|
|
1910
1960
|
}
|
|
1961
|
+
if (options.query) params.append("query", JSON.stringify(options.query));
|
|
1962
|
+
if (options.workflowId !== void 0)
|
|
1963
|
+
params.append("workflowId", options.workflowId.toString());
|
|
1964
|
+
if (options.workflowRevisionId !== void 0)
|
|
1965
|
+
params.append("workflowRevisionId", options.workflowRevisionId.toString());
|
|
1911
1966
|
if (options.createdAfter) params.append("createdAfter", options.createdAfter);
|
|
1912
1967
|
if (options.createdBefore) params.append("createdBefore", options.createdBefore);
|
|
1913
1968
|
return params;
|
|
@@ -2028,6 +2083,25 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
2028
2083
|
body: JSON.stringify(chat)
|
|
2029
2084
|
});
|
|
2030
2085
|
}
|
|
2086
|
+
/**
|
|
2087
|
+
* Get per-chat model provenance for the Chat sidebar's model summary area:
|
|
2088
|
+
* the effective chat + realtime models, the agent's current default (the
|
|
2089
|
+
* reset/inherit target), and pinned/matches flags.
|
|
2090
|
+
*/
|
|
2091
|
+
async getChatModelOverride(wid, id) {
|
|
2092
|
+
return this.fetch(`w/${wid}/chats/${id}/model-override`);
|
|
2093
|
+
}
|
|
2094
|
+
/**
|
|
2095
|
+
* Pin or reset the per-chat chat/realtime model snapshot. A concrete model id
|
|
2096
|
+
* pins that model; an empty/null id resets it to the agent's current default.
|
|
2097
|
+
* Only fields present in the payload are touched.
|
|
2098
|
+
*/
|
|
2099
|
+
async updateChatModelOverride(wid, id, override) {
|
|
2100
|
+
return this.fetch(`w/${wid}/chats/${id}/model-override`, {
|
|
2101
|
+
method: "PUT",
|
|
2102
|
+
body: JSON.stringify(override)
|
|
2103
|
+
});
|
|
2104
|
+
}
|
|
2031
2105
|
/** Update the mute status of a chat. */
|
|
2032
2106
|
async updateChatMute(wid, id, muted) {
|
|
2033
2107
|
return this.fetch(`w/${wid}/chats/${id}/mute`, {
|
|
@@ -2098,13 +2172,35 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
2098
2172
|
})
|
|
2099
2173
|
});
|
|
2100
2174
|
}
|
|
2101
|
-
/**
|
|
2102
|
-
|
|
2175
|
+
/**
|
|
2176
|
+
* List durable feedback rows for a chat (thumbs, explicit, supervisor, extracted).
|
|
2177
|
+
*/
|
|
2178
|
+
async getChatFeedback(wid, chatId, options = {}) {
|
|
2179
|
+
const params = new URLSearchParams();
|
|
2180
|
+
if (options.page != null) params.set("page", String(options.page));
|
|
2181
|
+
if (options.pageSize != null) params.set("pageSize", String(options.pageSize));
|
|
2182
|
+
if (options.source) params.set("source", options.source);
|
|
2183
|
+
if (options.rating) params.set("rating", options.rating);
|
|
2184
|
+
if (options.authorKind) params.set("authorKind", options.authorKind);
|
|
2185
|
+
const qs = params.toString();
|
|
2186
|
+
return this.fetch(
|
|
2187
|
+
`w/${wid}/chats/${chatId}/feedback${qs ? `?${qs}` : ""}`
|
|
2188
|
+
);
|
|
2189
|
+
}
|
|
2190
|
+
/**
|
|
2191
|
+
* Rate a chat message by its UUID.
|
|
2192
|
+
* Optional ``comment`` updates free-text details on the same durable rating row.
|
|
2193
|
+
*/
|
|
2194
|
+
async rateMessage(wid, chatId, messageUuid, rating, comment) {
|
|
2195
|
+
const body = { rating };
|
|
2196
|
+
if (comment !== void 0) {
|
|
2197
|
+
body.comment = comment;
|
|
2198
|
+
}
|
|
2103
2199
|
return this.fetch(
|
|
2104
2200
|
`w/${wid}/chats/${chatId}/messages/${messageUuid}/rate`,
|
|
2105
2201
|
{
|
|
2106
2202
|
method: "POST",
|
|
2107
|
-
body: JSON.stringify(
|
|
2203
|
+
body: JSON.stringify(body)
|
|
2108
2204
|
}
|
|
2109
2205
|
);
|
|
2110
2206
|
}
|
|
@@ -2370,6 +2466,51 @@ var CustomToolkitsApi = class extends BaseApiClient {
|
|
|
2370
2466
|
}
|
|
2371
2467
|
};
|
|
2372
2468
|
|
|
2469
|
+
// src/api/dashboards.ts
|
|
2470
|
+
var DashboardsApi = class extends BaseApiClient {
|
|
2471
|
+
/** List all dashboards for the workspace, in tab order. */
|
|
2472
|
+
async getDashboards(wid) {
|
|
2473
|
+
return this.fetch(`w/${wid}/dashboards`);
|
|
2474
|
+
}
|
|
2475
|
+
/** Get a dashboard by ID. */
|
|
2476
|
+
async getDashboard(wid, id) {
|
|
2477
|
+
return this.fetch(`w/${wid}/dashboards/${id}`);
|
|
2478
|
+
}
|
|
2479
|
+
/** Create a named dashboard, optionally with an initial widget list. */
|
|
2480
|
+
async createDashboard(wid, body) {
|
|
2481
|
+
return this.fetch(`w/${wid}/dashboards`, {
|
|
2482
|
+
method: "POST",
|
|
2483
|
+
body: JSON.stringify(body)
|
|
2484
|
+
});
|
|
2485
|
+
}
|
|
2486
|
+
/** Update a dashboard's name, position, or widget list (full replace). */
|
|
2487
|
+
async updateDashboard(wid, id, body) {
|
|
2488
|
+
return this.fetch(`w/${wid}/dashboards/${id}`, {
|
|
2489
|
+
method: "PATCH",
|
|
2490
|
+
body: JSON.stringify(body)
|
|
2491
|
+
});
|
|
2492
|
+
}
|
|
2493
|
+
/** Delete a dashboard. */
|
|
2494
|
+
async deleteDashboard(wid, id) {
|
|
2495
|
+
await this.fetch(`w/${wid}/dashboards/${id}`, { method: "DELETE" });
|
|
2496
|
+
}
|
|
2497
|
+
/** Per-channel chat volume in the window + live needs-response backlog. */
|
|
2498
|
+
async getDashboardChannelStats(wid, options) {
|
|
2499
|
+
const params = new URLSearchParams();
|
|
2500
|
+
if (options?.hours !== void 0) params.append("hours", options.hours.toString());
|
|
2501
|
+
const query = params.toString();
|
|
2502
|
+
return this.fetch(
|
|
2503
|
+
`w/${wid}/dashboards/stats/channels${query ? `?${query}` : ""}`
|
|
2504
|
+
);
|
|
2505
|
+
}
|
|
2506
|
+
/** Assignment status rollup per root workflow. */
|
|
2507
|
+
async getDashboardWorkflowAssignmentStats(wid) {
|
|
2508
|
+
return this.fetch(
|
|
2509
|
+
`w/${wid}/dashboards/stats/workflow-assignments`
|
|
2510
|
+
);
|
|
2511
|
+
}
|
|
2512
|
+
};
|
|
2513
|
+
|
|
2373
2514
|
// src/api/data-types.ts
|
|
2374
2515
|
var DataTypesApi = class extends BaseApiClient {
|
|
2375
2516
|
/** List all data types for a workspace, optionally filtering by archived status. */
|
|
@@ -2442,12 +2583,58 @@ var DataTypesApi = class extends BaseApiClient {
|
|
|
2442
2583
|
if (options?.memberIds?.length) params.append("member_ids", options.memberIds.join(","));
|
|
2443
2584
|
if (options?.search) params.append("search", options.search);
|
|
2444
2585
|
if (options?.searchField) params.append("search_field", options.searchField);
|
|
2586
|
+
if (options?.dataRecordFilterId != null) {
|
|
2587
|
+
params.append("dataRecordFilterId", options.dataRecordFilterId.toString());
|
|
2588
|
+
}
|
|
2589
|
+
if (options?.query != null) params.append("query", JSON.stringify(options.query));
|
|
2445
2590
|
if (options?.page) params.append("page", options.page.toString());
|
|
2446
2591
|
if (options?.pageSize) params.append("page_size", options.pageSize.toString());
|
|
2447
2592
|
return this.fetch(
|
|
2448
2593
|
`w/${wid}/data-types/${dataTypeId}/records${params?.toString() ? `?${params.toString()}` : ""}`
|
|
2449
2594
|
);
|
|
2450
2595
|
}
|
|
2596
|
+
// Data-record filter APIs (saved Query IR predicates per form)
|
|
2597
|
+
/** List saved data-record filters, optionally scoped to one DataType. */
|
|
2598
|
+
async getDataRecordFilters(wid, options) {
|
|
2599
|
+
const params = new URLSearchParams();
|
|
2600
|
+
if (options?.dataTypeId != null) {
|
|
2601
|
+
params.append("dataTypeId", options.dataTypeId.toString());
|
|
2602
|
+
}
|
|
2603
|
+
const qs = params.toString();
|
|
2604
|
+
return this.fetch(
|
|
2605
|
+
`w/${wid}/data-record-filters${qs ? `?${qs}` : ""}`
|
|
2606
|
+
);
|
|
2607
|
+
}
|
|
2608
|
+
/** Get a single data-record filter by ID. */
|
|
2609
|
+
async getDataRecordFilter(wid, filterId) {
|
|
2610
|
+
return this.fetch(`w/${wid}/data-record-filters/${filterId}`);
|
|
2611
|
+
}
|
|
2612
|
+
/** Create a new saved data-record filter. */
|
|
2613
|
+
async createDataRecordFilter(wid, data) {
|
|
2614
|
+
return this.fetch(`w/${wid}/data-record-filters`, {
|
|
2615
|
+
method: "POST",
|
|
2616
|
+
body: JSON.stringify(data)
|
|
2617
|
+
});
|
|
2618
|
+
}
|
|
2619
|
+
/** Update a saved data-record filter. */
|
|
2620
|
+
async updateDataRecordFilter(wid, filterId, data) {
|
|
2621
|
+
return this.fetch(`w/${wid}/data-record-filters/${filterId}`, {
|
|
2622
|
+
method: "PUT",
|
|
2623
|
+
body: JSON.stringify(data)
|
|
2624
|
+
});
|
|
2625
|
+
}
|
|
2626
|
+
/** Delete a saved data-record filter. */
|
|
2627
|
+
async deleteDataRecordFilter(wid, filterId) {
|
|
2628
|
+
return this.fetch(`w/${wid}/data-record-filters/${filterId}`, {
|
|
2629
|
+
method: "DELETE"
|
|
2630
|
+
});
|
|
2631
|
+
}
|
|
2632
|
+
/** Get the count of records matching a saved filter. */
|
|
2633
|
+
async getDataRecordFilterCount(wid, filterId) {
|
|
2634
|
+
return this.fetch(
|
|
2635
|
+
`w/${wid}/data-record-filters/${filterId}/count`
|
|
2636
|
+
);
|
|
2637
|
+
}
|
|
2451
2638
|
/** Get a single data record by ID. */
|
|
2452
2639
|
async getDataRecord(wid, recordId) {
|
|
2453
2640
|
return this.fetch(`w/${wid}/data-types/records/${recordId}`);
|
|
@@ -2560,6 +2747,38 @@ var DiscordBotsApi = class extends BaseApiClient {
|
|
|
2560
2747
|
body: JSON.stringify(data)
|
|
2561
2748
|
});
|
|
2562
2749
|
}
|
|
2750
|
+
/**
|
|
2751
|
+
* Step-up preflight for the Discord account-link flow (GH #20196).
|
|
2752
|
+
*
|
|
2753
|
+
* A no-side-effect GET enforcing the same authenticated, stepped-up
|
|
2754
|
+
* `apps:write` session as authorize/complete-link. Call this through the
|
|
2755
|
+
* client *before* the full-page navigation to `/oauth/authorize`: a 401
|
|
2756
|
+
* `insufficient_user_authentication` triggers the SDK's enhanced-auth
|
|
2757
|
+
* (step-up) modal + retry, so a below-assurance session is prompted here
|
|
2758
|
+
* rather than hitting a raw 401 on a top-level browser navigation.
|
|
2759
|
+
* Resolves (204) once the session is sufficiently assured.
|
|
2760
|
+
*/
|
|
2761
|
+
async discordLinkPreflight(wid) {
|
|
2762
|
+
return this.fetch(`w/${wid}/app-connections/discord/oauth/link/preflight`);
|
|
2763
|
+
}
|
|
2764
|
+
/**
|
|
2765
|
+
* Complete an authenticated Discord account link (GH #20196).
|
|
2766
|
+
*
|
|
2767
|
+
* POST-only. Exchanges the one-time opaque handle (issued by the OAuth
|
|
2768
|
+
* callback and carried in the `?discord_link_handle=` return param) for a
|
|
2769
|
+
* persisted MemberCredential. Requires an authenticated, step-up-protected
|
|
2770
|
+
* session with `apps:write`; a 401 `insufficient_user_authentication`
|
|
2771
|
+
* triggers the SDK's enhanced-auth (step-up) retry automatically.
|
|
2772
|
+
*/
|
|
2773
|
+
async completeDiscordLink(wid, data) {
|
|
2774
|
+
return this.fetch(
|
|
2775
|
+
`w/${wid}/app-connections/discord/oauth/complete-link`,
|
|
2776
|
+
{
|
|
2777
|
+
method: "POST",
|
|
2778
|
+
body: JSON.stringify(data)
|
|
2779
|
+
}
|
|
2780
|
+
);
|
|
2781
|
+
}
|
|
2563
2782
|
/**
|
|
2564
2783
|
* Update an existing Discord bot configuration.
|
|
2565
2784
|
*/
|
|
@@ -2814,7 +3033,8 @@ var EventsApi = class extends BaseApiClient {
|
|
|
2814
3033
|
if (params.taskId) searchParams.append("taskId", params.taskId.toString());
|
|
2815
3034
|
if (params.dataTypeId) searchParams.append("dataTypeId", params.dataTypeId.toString());
|
|
2816
3035
|
if (params.routineId) searchParams.append("routineId", params.routineId.toString());
|
|
2817
|
-
if (params.
|
|
3036
|
+
if (params.workflowRevisionId)
|
|
3037
|
+
searchParams.append("workflowRevisionId", params.workflowRevisionId.toString());
|
|
2818
3038
|
if (params.journeyStepId)
|
|
2819
3039
|
searchParams.append("journeyStepId", params.journeyStepId.toString());
|
|
2820
3040
|
if (params.includeDisabled) searchParams.append("includeDisabled", "true");
|
|
@@ -2885,7 +3105,8 @@ var EventsApi = class extends BaseApiClient {
|
|
|
2885
3105
|
if (options.objectType) params.append("objectType", options.objectType);
|
|
2886
3106
|
if (options.eventType) params.append("eventType", options.eventType);
|
|
2887
3107
|
if (options.actionType) params.append("actionType", options.actionType);
|
|
2888
|
-
if (options.
|
|
3108
|
+
if (options.workflowRevisionId)
|
|
3109
|
+
params.append("workflowRevisionId", options.workflowRevisionId.toString());
|
|
2889
3110
|
return this.fetch(
|
|
2890
3111
|
`w/${wid}/event-rules/executions${params.toString() ? `?${params.toString()}` : ""}`
|
|
2891
3112
|
);
|
|
@@ -2897,6 +3118,20 @@ var EventsApi = class extends BaseApiClient {
|
|
|
2897
3118
|
body: JSON.stringify(request)
|
|
2898
3119
|
});
|
|
2899
3120
|
}
|
|
3121
|
+
/**
|
|
3122
|
+
* Preview which target-audience roles lack Workflow USE for the Workflows a
|
|
3123
|
+
* draft Routine would start. Non-persisting, non-blocking authoring assist —
|
|
3124
|
+
* returns warnings only (role/Workflow names + IDs; no Member data).
|
|
3125
|
+
*/
|
|
3126
|
+
async previewRoutineWorkflowAccess(wid, request) {
|
|
3127
|
+
return this.fetch(
|
|
3128
|
+
`w/${wid}/routines/preview-workflow-access`,
|
|
3129
|
+
{
|
|
3130
|
+
method: "POST",
|
|
3131
|
+
body: JSON.stringify(request)
|
|
3132
|
+
}
|
|
3133
|
+
);
|
|
3134
|
+
}
|
|
2900
3135
|
/** List routines with optional pagination and active status filtering. */
|
|
2901
3136
|
async getRoutines(wid, options = {}) {
|
|
2902
3137
|
const params = new URLSearchParams();
|
|
@@ -3467,6 +3702,17 @@ var FilesApi = class extends BaseApiClient {
|
|
|
3467
3702
|
async getFile(wid, id) {
|
|
3468
3703
|
return this.fetch(`w/${wid}/files/${id}`);
|
|
3469
3704
|
}
|
|
3705
|
+
/**
|
|
3706
|
+
* Resolve a wiki-style relative path (as authored in a markdown link or
|
|
3707
|
+
* image) to a file. `folderId` is the linking document's folder; omit it
|
|
3708
|
+
* to resolve from the workspace root. Handles `.`/`..` segments and an
|
|
3709
|
+
* omitted `.md` extension server-side.
|
|
3710
|
+
*/
|
|
3711
|
+
async resolveFilePath(wid, path, folderId) {
|
|
3712
|
+
const params = new URLSearchParams({ path });
|
|
3713
|
+
if (folderId != null) params.append("folderId", String(folderId));
|
|
3714
|
+
return this.fetch(`w/${wid}/files/resolve-path?${params.toString()}`);
|
|
3715
|
+
}
|
|
3470
3716
|
/**
|
|
3471
3717
|
* Download the given files + folders (folders recursively) as a single ZIP.
|
|
3472
3718
|
* Returns the raw archive bytes for the caller to save.
|
|
@@ -3520,6 +3766,36 @@ var FilesApi = class extends BaseApiClient {
|
|
|
3520
3766
|
method: "DELETE"
|
|
3521
3767
|
});
|
|
3522
3768
|
}
|
|
3769
|
+
/** List a file's version history (newest first). */
|
|
3770
|
+
async listFileVersions(wid, fileId) {
|
|
3771
|
+
return this.fetch(`w/${wid}/files/${fileId}/versions`);
|
|
3772
|
+
}
|
|
3773
|
+
/** Compare two versions of a file. For text files both raw contents are returned. */
|
|
3774
|
+
async getFileVersionDiff(wid, fileId, fromVersion, toVersion) {
|
|
3775
|
+
return this.fetch(
|
|
3776
|
+
`w/${wid}/files/${fileId}/versions/diff?fromVersion=${fromVersion}&toVersion=${toVersion}`
|
|
3777
|
+
);
|
|
3778
|
+
}
|
|
3779
|
+
/** Restore an earlier version as the file's current contents. */
|
|
3780
|
+
async restoreFileVersion(wid, fileId, versionNumber, changeNote) {
|
|
3781
|
+
return this.fetch(
|
|
3782
|
+
`w/${wid}/files/${fileId}/versions/${versionNumber}/restore`,
|
|
3783
|
+
{
|
|
3784
|
+
method: "POST",
|
|
3785
|
+
// Required JSON body: keeps this cookie-auth POST non-forgeable
|
|
3786
|
+
// by cross-site HTML forms (backend rejects bodyless requests).
|
|
3787
|
+
body: JSON.stringify(changeNote ? { changeNote } : {})
|
|
3788
|
+
}
|
|
3789
|
+
);
|
|
3790
|
+
}
|
|
3791
|
+
/**
|
|
3792
|
+
* Same-origin proxy URL for a version's raw contents. Mirrors the shape of
|
|
3793
|
+
* `FileResponse.cdnUrl`: an app-relative Next.js route that authenticates
|
|
3794
|
+
* via session cookies and forwards to the versioned contents endpoint.
|
|
3795
|
+
*/
|
|
3796
|
+
getFileVersionContentsUrl(wid, fileId, versionNumber) {
|
|
3797
|
+
return `/api/w/${wid}/files/${fileId}/versions/${versionNumber}/contents`;
|
|
3798
|
+
}
|
|
3523
3799
|
/** Convert a file to the specified format (text, markdown, or PDF). */
|
|
3524
3800
|
async convertFile(wid, fileId, format = "pdf") {
|
|
3525
3801
|
return this.fetch(
|
|
@@ -4160,7 +4436,7 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4160
4436
|
});
|
|
4161
4437
|
}
|
|
4162
4438
|
/** List workspace members with pagination, filtering, and sorting. */
|
|
4163
|
-
async getWorkspaceMembers(wid, page = 1, pageSize = 10,
|
|
4439
|
+
async getWorkspaceMembers(wid, page = 1, pageSize = 10, search, role, sortBy, sortOrder, memberType, isArchived = false, isManager, memberTypes, hasAccount, excludeIds, memberFilterId, query) {
|
|
4164
4440
|
const params = new URLSearchParams();
|
|
4165
4441
|
if (memberFilterId != null) params.append("memberFilterId", memberFilterId.toString());
|
|
4166
4442
|
if (query != null) params.append("query", JSON.stringify(query));
|
|
@@ -4168,13 +4444,6 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4168
4444
|
if (pageSize) params.append("pageSize", pageSize.toString());
|
|
4169
4445
|
if (sortBy) params.append("sortBy", sortBy);
|
|
4170
4446
|
if (sortOrder) params.append("sortOrder", sortOrder);
|
|
4171
|
-
if (filters) {
|
|
4172
|
-
if (Array.isArray(filters)) {
|
|
4173
|
-
params.append("filters", JSON.stringify(filters));
|
|
4174
|
-
} else {
|
|
4175
|
-
params.append("filters", JSON.stringify(filters));
|
|
4176
|
-
}
|
|
4177
|
-
}
|
|
4178
4447
|
if (search) params.append("search", search);
|
|
4179
4448
|
if (role) params.append("role", role);
|
|
4180
4449
|
if (memberTypes && memberTypes.length > 0) {
|
|
@@ -4270,22 +4539,6 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4270
4539
|
body: JSON.stringify(data)
|
|
4271
4540
|
});
|
|
4272
4541
|
}
|
|
4273
|
-
/**
|
|
4274
|
-
* Convert a legacy rules filter to a query-engine predicate. One-way and
|
|
4275
|
-
* transactional: on success the filter's legacy rules are gone and
|
|
4276
|
-
* `query` holds the equivalent IR predicate. 409 if already query-format;
|
|
4277
|
-
* 422 when rules have no engine equivalent.
|
|
4278
|
-
*
|
|
4279
|
-
* With `dryRun: true` the same validation runs but nothing persists: the
|
|
4280
|
-
* response previews the normalized predicate in `query` while `rules`
|
|
4281
|
-
* stay intact on the filter.
|
|
4282
|
-
*/
|
|
4283
|
-
async convertMemberFilterToQuery(wid, filterId, opts) {
|
|
4284
|
-
const suffix = opts?.dryRun ? "?dryRun=true" : "";
|
|
4285
|
-
return this.fetch(`w/${wid}/member-filters/${filterId}/convert${suffix}`, {
|
|
4286
|
-
method: "PUT"
|
|
4287
|
-
});
|
|
4288
|
-
}
|
|
4289
4542
|
/** Delete a saved member filter. */
|
|
4290
4543
|
async deleteMemberFilter(wid, filterId) {
|
|
4291
4544
|
return this.fetch(`w/${wid}/member-filters/${filterId}`, {
|
|
@@ -4631,6 +4884,11 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4631
4884
|
`w/${wid}/members/${memberId}/memories${qs ? `?${qs}` : ""}`
|
|
4632
4885
|
);
|
|
4633
4886
|
}
|
|
4887
|
+
async getMemberMemory(wid, memberId, key) {
|
|
4888
|
+
return this.fetch(
|
|
4889
|
+
`w/${wid}/members/${memberId}/memories/${encodeURIComponent(key)}`
|
|
4890
|
+
);
|
|
4891
|
+
}
|
|
4634
4892
|
async createMemberMemory(wid, memberId, body) {
|
|
4635
4893
|
return this.fetch(`w/${wid}/members/${memberId}/memories`, {
|
|
4636
4894
|
method: "POST",
|
|
@@ -4699,6 +4957,25 @@ var MilestonesApi = class extends BaseApiClient {
|
|
|
4699
4957
|
}
|
|
4700
4958
|
};
|
|
4701
4959
|
|
|
4960
|
+
// src/api/motd.ts
|
|
4961
|
+
var MotdApi = class extends BaseApiClient {
|
|
4962
|
+
/**
|
|
4963
|
+
* The Message-of-the-Day tip for the workspace on a given date.
|
|
4964
|
+
*
|
|
4965
|
+
* `date` is an ISO `YYYY-MM-DD` string (defaults to today, UTC, when
|
|
4966
|
+
* omitted); `offset` advances the rotation ("show another"). Selection is
|
|
4967
|
+
* deterministic — same date + workspace + offset always returns the same
|
|
4968
|
+
* tip — and cycles through the tip list.
|
|
4969
|
+
*/
|
|
4970
|
+
async getMotd(wid, options) {
|
|
4971
|
+
const params = new URLSearchParams();
|
|
4972
|
+
if (options?.date !== void 0) params.append("date", options.date);
|
|
4973
|
+
if (options?.offset !== void 0) params.append("offset", options.offset.toString());
|
|
4974
|
+
const query = params.toString();
|
|
4975
|
+
return this.fetch(`w/${wid}/motd${query ? `?${query}` : ""}`);
|
|
4976
|
+
}
|
|
4977
|
+
};
|
|
4978
|
+
|
|
4702
4979
|
// src/api/monday.ts
|
|
4703
4980
|
var MondayIntegrationApi = class extends BaseApiClient {
|
|
4704
4981
|
/**
|
|
@@ -4735,6 +5012,20 @@ var MondayIntegrationApi = class extends BaseApiClient {
|
|
|
4735
5012
|
// -----------------------------------------------------------------------
|
|
4736
5013
|
// Monday.com Connection management (OAuth, status, sync, reconciliation)
|
|
4737
5014
|
// -----------------------------------------------------------------------
|
|
5015
|
+
/**
|
|
5016
|
+
* Create the Monday.com connection shell (no credentials yet).
|
|
5017
|
+
*
|
|
5018
|
+
* First step of the guided setup flow: provisions the connection row so
|
|
5019
|
+
* the admin lands on the detail page where the OAuth callback URL is
|
|
5020
|
+
* shown — which they need to register their Monday.com app before they
|
|
5021
|
+
* have a Client ID / Secret to enter. Idempotent.
|
|
5022
|
+
*/
|
|
5023
|
+
async installMondayConnection(wid) {
|
|
5024
|
+
return this.fetch(`w/${wid}/app-connections/monday/install`, {
|
|
5025
|
+
method: "POST",
|
|
5026
|
+
body: JSON.stringify({})
|
|
5027
|
+
});
|
|
5028
|
+
}
|
|
4738
5029
|
async configureMondayConnection(wid, data) {
|
|
4739
5030
|
return this.fetch(`w/${wid}/app-connections/monday/configure`, {
|
|
4740
5031
|
method: "POST",
|
|
@@ -5319,24 +5610,24 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5319
5610
|
return this.fetch(`o/${orgUuid}/phone-numbers/a2p/status`);
|
|
5320
5611
|
}
|
|
5321
5612
|
/**
|
|
5322
|
-
* Start
|
|
5613
|
+
* Start A2P brand registration under a legal entity. `legalEntityUuid`
|
|
5614
|
+
* is required — brands register per legal entity (Customer Profile);
|
|
5615
|
+
* there is no primary-entity fallback.
|
|
5323
5616
|
*/
|
|
5324
|
-
async startA2PRegistration(orgUuid, brandName, brandDescription) {
|
|
5325
|
-
return this.fetch(
|
|
5326
|
-
|
|
5327
|
-
{
|
|
5328
|
-
|
|
5329
|
-
body: JSON.stringify({ brandName, brandDescription })
|
|
5330
|
-
}
|
|
5331
|
-
);
|
|
5617
|
+
async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandDescription) {
|
|
5618
|
+
return this.fetch(`o/${orgUuid}/phone-numbers/a2p/start`, {
|
|
5619
|
+
method: "POST",
|
|
5620
|
+
body: JSON.stringify({ legalEntityUuid, brandName, brandDescription })
|
|
5621
|
+
});
|
|
5332
5622
|
}
|
|
5333
5623
|
/**
|
|
5334
|
-
* Approve sample messages for
|
|
5624
|
+
* Approve sample messages for one brand's A2P campaign. Signals the
|
|
5625
|
+
* brand's registration workflow to create the TCR campaign.
|
|
5335
5626
|
*/
|
|
5336
|
-
async approveA2PMessages(orgUuid, sampleMessages) {
|
|
5627
|
+
async approveA2PMessages(orgUuid, brandUuid, sampleMessages) {
|
|
5337
5628
|
return this.fetch(`o/${orgUuid}/phone-numbers/a2p/approve-messages`, {
|
|
5338
5629
|
method: "POST",
|
|
5339
|
-
body: JSON.stringify({ sampleMessages })
|
|
5630
|
+
body: JSON.stringify({ brandUuid, sampleMessages })
|
|
5340
5631
|
});
|
|
5341
5632
|
}
|
|
5342
5633
|
// ============================================================================
|
|
@@ -5352,8 +5643,8 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5352
5643
|
* which is impossible (lifecycle status is one of `draft` /
|
|
5353
5644
|
* `pending-review` / `in-review` / `twilio-approved` / `twilio-rejected`).
|
|
5354
5645
|
*/
|
|
5355
|
-
async getBusinessProfile(orgUuid) {
|
|
5356
|
-
return this.fetch(
|
|
5646
|
+
async getBusinessProfile(orgUuid, legalEntityUuid) {
|
|
5647
|
+
return this.fetch(businessProfilePath(orgUuid, legalEntityUuid));
|
|
5357
5648
|
}
|
|
5358
5649
|
/**
|
|
5359
5650
|
* Upsert the org's business profile. Idempotent via cached SIDs.
|
|
@@ -5361,8 +5652,8 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5361
5652
|
* compliance evaluation result so the frontend can immediately enable
|
|
5362
5653
|
* Submit without a second round-trip.
|
|
5363
5654
|
*/
|
|
5364
|
-
async updateBusinessProfile(orgUuid, data) {
|
|
5365
|
-
return this.fetch(
|
|
5655
|
+
async updateBusinessProfile(orgUuid, data, legalEntityUuid) {
|
|
5656
|
+
return this.fetch(businessProfilePath(orgUuid, legalEntityUuid), {
|
|
5366
5657
|
method: "PUT",
|
|
5367
5658
|
body: JSON.stringify(data)
|
|
5368
5659
|
});
|
|
@@ -5372,20 +5663,46 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5372
5663
|
* compliance live and returns 412 if the profile is not currently
|
|
5373
5664
|
* `compliant`; returns 409 if a review is already in flight.
|
|
5374
5665
|
*/
|
|
5375
|
-
async submitBusinessProfile(orgUuid) {
|
|
5376
|
-
return this.fetch(
|
|
5377
|
-
|
|
5378
|
-
|
|
5666
|
+
async submitBusinessProfile(orgUuid, legalEntityUuid) {
|
|
5667
|
+
return this.fetch(
|
|
5668
|
+
`${businessProfilePath(orgUuid, legalEntityUuid)}/submit`,
|
|
5669
|
+
{ method: "POST" }
|
|
5670
|
+
);
|
|
5379
5671
|
}
|
|
5380
5672
|
/**
|
|
5381
5673
|
* Cancel an in-flight Twilio review. Resets the cached profile state
|
|
5382
5674
|
* to `draft` so the user can edit and resubmit.
|
|
5383
5675
|
*/
|
|
5384
|
-
async cancelBusinessProfile(orgUuid) {
|
|
5385
|
-
return this.fetch(
|
|
5386
|
-
|
|
5676
|
+
async cancelBusinessProfile(orgUuid, legalEntityUuid) {
|
|
5677
|
+
return this.fetch(
|
|
5678
|
+
`${businessProfilePath(orgUuid, legalEntityUuid)}/cancel`,
|
|
5679
|
+
{ method: "POST" }
|
|
5680
|
+
);
|
|
5681
|
+
}
|
|
5682
|
+
// ============================================================================
|
|
5683
|
+
// Legal entities (Twilio Secondary Customer Profiles)
|
|
5684
|
+
// ============================================================================
|
|
5685
|
+
/** List the org's legal entities (one Customer Profile each). */
|
|
5686
|
+
async listLegalEntities(orgUuid) {
|
|
5687
|
+
return this.fetch(`o/${orgUuid}/legal-entities`);
|
|
5688
|
+
}
|
|
5689
|
+
/** Create a legal entity. Its business profile is edited via the entity-scoped business-profile methods. */
|
|
5690
|
+
async createLegalEntity(orgUuid, data) {
|
|
5691
|
+
return this.fetch(`o/${orgUuid}/legal-entities`, {
|
|
5692
|
+
method: "POST",
|
|
5693
|
+
body: JSON.stringify(data)
|
|
5387
5694
|
});
|
|
5388
5695
|
}
|
|
5696
|
+
async getLegalEntity(orgUuid, legalEntityUuid) {
|
|
5697
|
+
return this.fetch(`o/${orgUuid}/legal-entities/${legalEntityUuid}`);
|
|
5698
|
+
}
|
|
5699
|
+
/**
|
|
5700
|
+
* Brand detail with live registration-workflow state (`workflowStatus`,
|
|
5701
|
+
* `pendingSampleMessages`) for the sample-approval step.
|
|
5702
|
+
*/
|
|
5703
|
+
async getA2PBrand(orgUuid, brandUuid) {
|
|
5704
|
+
return this.fetch(`o/${orgUuid}/a2p-brands/${brandUuid}`);
|
|
5705
|
+
}
|
|
5389
5706
|
/**
|
|
5390
5707
|
* List the org's A2P brands (broker resources). The SMS-consent editor uses
|
|
5391
5708
|
* this to pick which brand's consent config to edit.
|
|
@@ -5489,6 +5806,9 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5489
5806
|
);
|
|
5490
5807
|
}
|
|
5491
5808
|
};
|
|
5809
|
+
function businessProfilePath(orgUuid, legalEntityUuid) {
|
|
5810
|
+
return legalEntityUuid ? `o/${orgUuid}/legal-entities/${legalEntityUuid}/business-profile` : `o/${orgUuid}/business-profile`;
|
|
5811
|
+
}
|
|
5492
5812
|
|
|
5493
5813
|
// src/api/oauth.ts
|
|
5494
5814
|
function getOAuthPath(providerSlug, action) {
|
|
@@ -5561,6 +5881,14 @@ var OAuthApi = class extends BaseApiClient {
|
|
|
5561
5881
|
};
|
|
5562
5882
|
|
|
5563
5883
|
// src/api/phone-numbers.ts
|
|
5884
|
+
function appendAnalyticsFilters(params, filters) {
|
|
5885
|
+
if (!filters) return;
|
|
5886
|
+
if (filters.dateFrom) params.set("dateFrom", filters.dateFrom);
|
|
5887
|
+
if (filters.dateTo) params.set("dateTo", filters.dateTo);
|
|
5888
|
+
filters.terminationReason?.forEach((v) => params.append("terminationReason", v));
|
|
5889
|
+
filters.answeredBy?.forEach((v) => params.append("answeredBy", v));
|
|
5890
|
+
filters.memberLabel?.forEach((v) => params.append("memberLabel", v));
|
|
5891
|
+
}
|
|
5564
5892
|
var PhoneNumbersApi = class extends BaseApiClient {
|
|
5565
5893
|
/** List phone numbers in a workspace, optionally including archived. */
|
|
5566
5894
|
async getPhoneNumbers(wid, options) {
|
|
@@ -5684,6 +6012,62 @@ var PhoneNumbersApi = class extends BaseApiClient {
|
|
|
5684
6012
|
method: "POST"
|
|
5685
6013
|
});
|
|
5686
6014
|
}
|
|
6015
|
+
/**
|
|
6016
|
+
* Always-anonymized outbound-call analytics summary for one phone number.
|
|
6017
|
+
* No `analyticsSessionId` is sent — the summary carries no row-level PHI.
|
|
6018
|
+
*/
|
|
6019
|
+
async getPhoneNumberOutboundAnalyticsSummary(wid, id, filters) {
|
|
6020
|
+
const params = new URLSearchParams();
|
|
6021
|
+
appendAnalyticsFilters(params, filters);
|
|
6022
|
+
const query = params.toString();
|
|
6023
|
+
return this.fetch(
|
|
6024
|
+
`w/${wid}/phone-numbers/${id}/analytics/summary${query ? `?${query}` : ""}`
|
|
6025
|
+
);
|
|
6026
|
+
}
|
|
6027
|
+
/**
|
|
6028
|
+
* One paginated page of outbound-call analytics detail rows. Anonymized by
|
|
6029
|
+
* default; `raw: true` requires the `export:admin` scope server-side and is
|
|
6030
|
+
* audited per response. `analyticsSessionId` keeps the callee pseudonyms
|
|
6031
|
+
* stable across pagination/sort within one browser session.
|
|
6032
|
+
*/
|
|
6033
|
+
async getPhoneNumberOutboundAnalyticsCalls(wid, id, options) {
|
|
6034
|
+
const params = new URLSearchParams({
|
|
6035
|
+
analyticsSessionId: options.analyticsSessionId,
|
|
6036
|
+
page: String(options.page ?? 1),
|
|
6037
|
+
pageSize: String(options.pageSize ?? 50)
|
|
6038
|
+
});
|
|
6039
|
+
if (options.sort) params.set("sort", options.sort);
|
|
6040
|
+
if (options.sortDirection) params.set("sortDirection", options.sortDirection);
|
|
6041
|
+
if (options.raw) params.set("raw", "true");
|
|
6042
|
+
appendAnalyticsFilters(params, options.filters);
|
|
6043
|
+
return this.fetch(
|
|
6044
|
+
`w/${wid}/phone-numbers/${id}/analytics/calls?${params}`
|
|
6045
|
+
);
|
|
6046
|
+
}
|
|
6047
|
+
/**
|
|
6048
|
+
* Export outbound-call analytics as a CSV blob (respecting the current
|
|
6049
|
+
* filters + raw state). The server returns HTTP 400 when the result set
|
|
6050
|
+
* exceeds its export cap; that message is surfaced to the caller via
|
|
6051
|
+
* `ApiError` so the UI can toast it.
|
|
6052
|
+
*/
|
|
6053
|
+
async exportPhoneNumberOutboundAnalyticsCsv(wid, id, options) {
|
|
6054
|
+
const params = new URLSearchParams({ analyticsSessionId: options.analyticsSessionId });
|
|
6055
|
+
if (options.sort) params.set("sort", options.sort);
|
|
6056
|
+
if (options.sortDirection) params.set("sortDirection", options.sortDirection);
|
|
6057
|
+
if (options.raw) params.set("raw", "true");
|
|
6058
|
+
appendAnalyticsFilters(params, options.filters);
|
|
6059
|
+
const response = await this.fetchRaw(
|
|
6060
|
+
`w/${wid}/phone-numbers/${id}/analytics/export?${params}`,
|
|
6061
|
+
{},
|
|
6062
|
+
[400]
|
|
6063
|
+
);
|
|
6064
|
+
if (!response.ok) {
|
|
6065
|
+
const data = await response.json().catch(() => ({}));
|
|
6066
|
+
const message = typeof data?.detail === "string" ? data.detail : "Failed to export analytics";
|
|
6067
|
+
throw new ApiError(message, response.status);
|
|
6068
|
+
}
|
|
6069
|
+
return response.blob();
|
|
6070
|
+
}
|
|
5687
6071
|
};
|
|
5688
6072
|
|
|
5689
6073
|
// src/api/pronunciations.ts
|
|
@@ -6022,6 +6406,20 @@ var ReportsApi = class extends BaseApiClient {
|
|
|
6022
6406
|
|
|
6023
6407
|
// src/api/salesforce.ts
|
|
6024
6408
|
var SalesforceApi = class extends BaseApiClient {
|
|
6409
|
+
/**
|
|
6410
|
+
* Create the Salesforce connection shell (no credentials yet).
|
|
6411
|
+
*
|
|
6412
|
+
* First step of the guided setup flow: provisions the connection row so
|
|
6413
|
+
* the admin lands on the detail page where the OAuth callback URL is
|
|
6414
|
+
* shown — which they need to register their Salesforce Connected App
|
|
6415
|
+
* before they have a Client ID / Secret to enter. Idempotent.
|
|
6416
|
+
*/
|
|
6417
|
+
async installSalesforce(wid, data) {
|
|
6418
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/install`, {
|
|
6419
|
+
method: "POST",
|
|
6420
|
+
body: JSON.stringify(data ?? {})
|
|
6421
|
+
});
|
|
6422
|
+
}
|
|
6025
6423
|
async configureSalesforce(wid, data) {
|
|
6026
6424
|
return this.fetch(
|
|
6027
6425
|
`w/${wid}/app-connections/salesforce/configure`,
|
|
@@ -6223,6 +6621,20 @@ var ConnectionSyncApi = class extends BaseApiClient {
|
|
|
6223
6621
|
|
|
6224
6622
|
// src/api/hubspot.ts
|
|
6225
6623
|
var HubspotApi = class extends BaseApiClient {
|
|
6624
|
+
/**
|
|
6625
|
+
* Create the HubSpot connection shell (no credentials yet).
|
|
6626
|
+
*
|
|
6627
|
+
* First step of the guided setup flow: provisions the connection row so
|
|
6628
|
+
* the admin lands on the detail page where the OAuth callback URL is
|
|
6629
|
+
* shown — which they need to register their HubSpot app before they have
|
|
6630
|
+
* a Client ID / Secret to enter. Idempotent.
|
|
6631
|
+
*/
|
|
6632
|
+
async installHubspot(wid) {
|
|
6633
|
+
return this.fetch(`w/${wid}/app-connections/hubspot/install`, {
|
|
6634
|
+
method: "POST",
|
|
6635
|
+
body: JSON.stringify({})
|
|
6636
|
+
});
|
|
6637
|
+
}
|
|
6226
6638
|
async configureHubspot(wid, data) {
|
|
6227
6639
|
return this.fetch(`w/${wid}/app-connections/hubspot/configure`, {
|
|
6228
6640
|
method: "POST",
|
|
@@ -6497,19 +6909,28 @@ var SitesApi = class extends BaseApiClient {
|
|
|
6497
6909
|
}
|
|
6498
6910
|
);
|
|
6499
6911
|
}
|
|
6500
|
-
/**
|
|
6912
|
+
/**
|
|
6913
|
+
* Verify a phone or email code and complete site authentication.
|
|
6914
|
+
*
|
|
6915
|
+
* When the account has 2FA enrolled, the backend returns a temporary token
|
|
6916
|
+
* with ``requiresTwoFactor: true`` and this method does **not** mint full
|
|
6917
|
+
* session cookies — the caller must complete the 2FA challenge (same handoff
|
|
6918
|
+
* as public-site Google OAuth).
|
|
6919
|
+
*/
|
|
6501
6920
|
async siteVerifyCode(wid, siteUuid, code, phoneNumber, email) {
|
|
6502
6921
|
const verifyResponse = await this.fetch(`s/${wid}/${siteUuid}/auth/verify`, {
|
|
6503
6922
|
method: "POST",
|
|
6504
6923
|
body: JSON.stringify({ code, phoneNumber, email })
|
|
6505
6924
|
});
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6925
|
+
if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
|
|
6926
|
+
const completeResponse = await fetch(`/api/auth/complete`, {
|
|
6927
|
+
method: "POST",
|
|
6928
|
+
headers: { "Content-Type": "application/json" },
|
|
6929
|
+
body: JSON.stringify({ token: verifyResponse.token })
|
|
6930
|
+
});
|
|
6931
|
+
if (!completeResponse.ok) {
|
|
6932
|
+
throw new Error("Failed to complete authentication");
|
|
6933
|
+
}
|
|
6513
6934
|
}
|
|
6514
6935
|
return verifyResponse;
|
|
6515
6936
|
}
|
|
@@ -6653,11 +7074,11 @@ var SubscriptionsApi = class extends BaseApiClient {
|
|
|
6653
7074
|
* customer, and subscription are created on payment by the checkout
|
|
6654
7075
|
* completion handler.
|
|
6655
7076
|
*/
|
|
6656
|
-
async createCheckoutSession(productId, planPeriod = "month") {
|
|
7077
|
+
async createCheckoutSession(productId, planPeriod = "month", options = {}) {
|
|
6657
7078
|
return this.fetch(`subscriptions/checkout-session`, {
|
|
6658
7079
|
method: "POST",
|
|
6659
7080
|
credentials: "include",
|
|
6660
|
-
body: JSON.stringify({ productId, planPeriod }),
|
|
7081
|
+
body: JSON.stringify({ productId, planPeriod, ...options }),
|
|
6661
7082
|
headers: { "Content-Type": "application/json" }
|
|
6662
7083
|
});
|
|
6663
7084
|
}
|
|
@@ -6714,12 +7135,15 @@ var SubscriptionsApi = class extends BaseApiClient {
|
|
|
6714
7135
|
return this.fetch(`subscriptions/${subscriptionId}/items`);
|
|
6715
7136
|
}
|
|
6716
7137
|
/** Purchase extra credits on a subscription (org-level). */
|
|
6717
|
-
async purchaseCredits(subscriptionId, amountCents) {
|
|
7138
|
+
async purchaseCredits(subscriptionId, amountCents, idempotencyKey = crypto.randomUUID()) {
|
|
6718
7139
|
return this.fetch(`subscriptions/${subscriptionId}/purchase-credits`, {
|
|
6719
7140
|
method: "POST",
|
|
6720
7141
|
credentials: "include",
|
|
6721
7142
|
body: JSON.stringify({ amount_cents: amountCents }),
|
|
6722
|
-
headers: {
|
|
7143
|
+
headers: {
|
|
7144
|
+
"Content-Type": "application/json",
|
|
7145
|
+
"Idempotency-Key": idempotencyKey
|
|
7146
|
+
}
|
|
6723
7147
|
});
|
|
6724
7148
|
}
|
|
6725
7149
|
};
|
|
@@ -6862,6 +7286,13 @@ var CustomersApi = class extends BaseApiClient {
|
|
|
6862
7286
|
async getMyCustomerInvoices(uuid) {
|
|
6863
7287
|
return this.fetch(`customers/${uuid}/invoices`);
|
|
6864
7288
|
}
|
|
7289
|
+
async createMyCustomerPortalSession(uuid, returnUrl) {
|
|
7290
|
+
return this.fetch(`customers/${uuid}/stripe/portal-session`, {
|
|
7291
|
+
method: "POST",
|
|
7292
|
+
body: JSON.stringify({ returnUrl }),
|
|
7293
|
+
headers: { "Content-Type": "application/json" }
|
|
7294
|
+
});
|
|
7295
|
+
}
|
|
6865
7296
|
async updateMyCustomer(uuid, data) {
|
|
6866
7297
|
return this.fetch(`customers/${uuid}`, {
|
|
6867
7298
|
method: "PUT",
|
|
@@ -6879,7 +7310,8 @@ var CustomersApi = class extends BaseApiClient {
|
|
|
6879
7310
|
async attachMyCustomerPaymentMethod(uuid, paymentMethodId, setAsDefault = false) {
|
|
6880
7311
|
return this.fetch(`customers/${uuid}/stripe/payment-methods/${paymentMethodId}/attach`, {
|
|
6881
7312
|
method: "POST",
|
|
6882
|
-
body: JSON.stringify({ setAsDefault })
|
|
7313
|
+
body: JSON.stringify({ setAsDefault }),
|
|
7314
|
+
headers: { "Content-Type": "application/json" }
|
|
6883
7315
|
});
|
|
6884
7316
|
}
|
|
6885
7317
|
async detachMyCustomerPaymentMethod(uuid, paymentMethodId) {
|
|
@@ -6969,7 +7401,15 @@ var SupervisorsApi = class extends BaseApiClient {
|
|
|
6969
7401
|
|
|
6970
7402
|
// src/api/tasks.ts
|
|
6971
7403
|
var TasksApi = class extends BaseApiClient {
|
|
6972
|
-
/**
|
|
7404
|
+
/**
|
|
7405
|
+
* List all tasks in a workspace, optionally filtering by workflow or
|
|
7406
|
+
* including archived.
|
|
7407
|
+
*
|
|
7408
|
+
* `workflowId` is the STABLE workflow root id — the server resolves it to
|
|
7409
|
+
* that workflow's draft revision's tasks. `workflowRevisionId` filters an
|
|
7410
|
+
* explicit revision (the read-only published-revision view). Pass at most
|
|
7411
|
+
* one; passing both that disagree is a 400.
|
|
7412
|
+
*/
|
|
6973
7413
|
async getTasks(wid, options = {}) {
|
|
6974
7414
|
const params = new URLSearchParams();
|
|
6975
7415
|
if (options.includeArchived) {
|
|
@@ -6978,6 +7418,9 @@ var TasksApi = class extends BaseApiClient {
|
|
|
6978
7418
|
if (options.workflowId) {
|
|
6979
7419
|
params.append("workflow_id", options.workflowId.toString());
|
|
6980
7420
|
}
|
|
7421
|
+
if (options.workflowRevisionId) {
|
|
7422
|
+
params.append("workflow_revision_id", options.workflowRevisionId.toString());
|
|
7423
|
+
}
|
|
6981
7424
|
if (options.sortBy) {
|
|
6982
7425
|
params.append("sortBy", options.sortBy);
|
|
6983
7426
|
}
|
|
@@ -7332,11 +7775,18 @@ var JourneysApi = class extends BaseApiClient {
|
|
|
7332
7775
|
// src/api/workflows.ts
|
|
7333
7776
|
var WorkflowsApi = class extends BaseApiClient {
|
|
7334
7777
|
/** List all workflows in a workspace, optionally including archived ones. */
|
|
7335
|
-
async getWorkflows(wid,
|
|
7336
|
-
const
|
|
7337
|
-
|
|
7778
|
+
async getWorkflows(wid, options = {}) {
|
|
7779
|
+
const params = new URLSearchParams();
|
|
7780
|
+
if (options.archived) params.set("archived", "true");
|
|
7781
|
+
if (options.page) params.set("page", String(options.page));
|
|
7782
|
+
if (options.pageSize) params.set("pageSize", String(options.pageSize));
|
|
7783
|
+
if (options.sortBy) params.set("sortBy", options.sortBy);
|
|
7784
|
+
if (options.sortOrder) params.set("sortOrder", options.sortOrder);
|
|
7785
|
+
if (options.search) params.set("search", options.search);
|
|
7786
|
+
const qs = params.toString();
|
|
7787
|
+
return this.fetch(`w/${wid}/workflows${qs ? `?${qs}` : ""}`);
|
|
7338
7788
|
}
|
|
7339
|
-
/** Get a single workflow by ID. */
|
|
7789
|
+
/** Get a single workflow by ID (root + draft + active-revision summary). */
|
|
7340
7790
|
async getWorkflow(wid, id) {
|
|
7341
7791
|
return this.fetch(`w/${wid}/workflows/${id}`);
|
|
7342
7792
|
}
|
|
@@ -7384,7 +7834,7 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
7384
7834
|
body: JSON.stringify(workflow)
|
|
7385
7835
|
});
|
|
7386
7836
|
}
|
|
7387
|
-
/** Update an existing workflow. */
|
|
7837
|
+
/** Update an existing workflow's draft revision. */
|
|
7388
7838
|
async updateWorkflow(wid, id, workflow) {
|
|
7389
7839
|
return this.fetch(`w/${wid}/workflows/${id}`, {
|
|
7390
7840
|
method: "PUT",
|
|
@@ -7405,13 +7855,15 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
7405
7855
|
/** Archive a workflow. */
|
|
7406
7856
|
async archiveWorkflow(wid, id) {
|
|
7407
7857
|
return this.fetch(`w/${wid}/workflows/${id}/archive`, {
|
|
7408
|
-
method: "POST"
|
|
7858
|
+
method: "POST",
|
|
7859
|
+
body: JSON.stringify({})
|
|
7409
7860
|
});
|
|
7410
7861
|
}
|
|
7411
7862
|
/** Unarchive a previously archived workflow. */
|
|
7412
7863
|
async unarchiveWorkflow(wid, id) {
|
|
7413
7864
|
return this.fetch(`w/${wid}/workflows/${id}/unarchive`, {
|
|
7414
|
-
method: "POST"
|
|
7865
|
+
method: "POST",
|
|
7866
|
+
body: JSON.stringify({})
|
|
7415
7867
|
});
|
|
7416
7868
|
}
|
|
7417
7869
|
/** Clone a workflow with a new name. */
|
|
@@ -7427,16 +7879,20 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
7427
7879
|
}
|
|
7428
7880
|
/** Create a new workflow from a template. */
|
|
7429
7881
|
async createWorkflowFromTemplate(wid, templateUuid, data) {
|
|
7430
|
-
return this.fetch(
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7882
|
+
return this.fetch(
|
|
7883
|
+
`w/${wid}/workflows/templates/${templateUuid}/create-workflow`,
|
|
7884
|
+
{
|
|
7885
|
+
method: "POST",
|
|
7886
|
+
body: JSON.stringify(data)
|
|
7887
|
+
}
|
|
7888
|
+
);
|
|
7434
7889
|
}
|
|
7435
7890
|
/** Get task assignment statistics for a workflow within an optional date range. */
|
|
7436
|
-
async getWorkflowTaskAssignmentStats(wid, id, fromDate, toDate) {
|
|
7891
|
+
async getWorkflowTaskAssignmentStats(wid, id, fromDate, toDate, workflowRevisionId) {
|
|
7437
7892
|
const params = new URLSearchParams();
|
|
7438
7893
|
if (fromDate) params.append("from_date", fromDate);
|
|
7439
7894
|
if (toDate) params.append("to_date", toDate);
|
|
7895
|
+
if (workflowRevisionId) params.append("workflowRevisionId", String(workflowRevisionId));
|
|
7440
7896
|
return this.fetch(
|
|
7441
7897
|
`w/${wid}/workflows/${id}/task-assignment-stats?${params.toString()}`
|
|
7442
7898
|
);
|
|
@@ -7486,6 +7942,24 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
7486
7942
|
`w/${wid}/workflows/${workflowId}/route-dry-run?${params.toString()}`
|
|
7487
7943
|
);
|
|
7488
7944
|
}
|
|
7945
|
+
// Workflow Feedback API
|
|
7946
|
+
/**
|
|
7947
|
+
* List chat feedback for a workflow (thumbs ratings + explicit/extracted rows).
|
|
7948
|
+
* First consumer of the workspace-plane chat_feedback table.
|
|
7949
|
+
*/
|
|
7950
|
+
async getWorkflowFeedback(wid, workflowId, options = {}) {
|
|
7951
|
+
const params = new URLSearchParams();
|
|
7952
|
+
if (options.page != null) params.set("page", String(options.page));
|
|
7953
|
+
if (options.pageSize != null) params.set("pageSize", String(options.pageSize));
|
|
7954
|
+
if (options.source) params.set("source", options.source);
|
|
7955
|
+
if (options.rating) params.set("rating", options.rating);
|
|
7956
|
+
if (options.authorKind) params.set("authorKind", options.authorKind);
|
|
7957
|
+
if (options.includeTest != null) params.set("includeTest", String(options.includeTest));
|
|
7958
|
+
const qs = params.toString();
|
|
7959
|
+
return this.fetch(
|
|
7960
|
+
`w/${wid}/workflows/${workflowId}/feedback${qs ? `?${qs}` : ""}`
|
|
7961
|
+
);
|
|
7962
|
+
}
|
|
7489
7963
|
// Workflow Contributors API
|
|
7490
7964
|
/** List all contributors for a workflow. */
|
|
7491
7965
|
async getWorkflowContributors(wid, workflowId) {
|
|
@@ -7551,58 +8025,80 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
7551
8025
|
body: JSON.stringify({ name })
|
|
7552
8026
|
});
|
|
7553
8027
|
}
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
return this.fetch(`w/${wid}/workflows/${workflowUuid}/versions`);
|
|
7558
|
-
}
|
|
7559
|
-
/** Get the active version of a workflow. */
|
|
7560
|
-
async getWorkflowVersionActive(wid, workflowUuid) {
|
|
7561
|
-
return this.fetch(
|
|
7562
|
-
`w/${wid}/workflows/${workflowUuid}/versions/active`
|
|
7563
|
-
);
|
|
8028
|
+
/** List relational revisions for a workflow. */
|
|
8029
|
+
async getWorkflowRevisions(wid, workflowId) {
|
|
8030
|
+
return this.fetch(`w/${wid}/workflows/${workflowId}/revisions`);
|
|
7564
8031
|
}
|
|
7565
|
-
/** Get
|
|
7566
|
-
async
|
|
8032
|
+
/** Get full workflow details for one relational workflow revision. */
|
|
8033
|
+
async getWorkflowRevision(wid, workflowId, revisionId) {
|
|
7567
8034
|
return this.fetch(
|
|
7568
|
-
`w/${wid}/workflows/${
|
|
8035
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}`
|
|
7569
8036
|
);
|
|
7570
8037
|
}
|
|
7571
|
-
/**
|
|
7572
|
-
|
|
7573
|
-
|
|
8038
|
+
/** Freeze the workflow's draft as a published revision and clone a fresh draft.
|
|
8039
|
+
*
|
|
8040
|
+
* By default the just-published revision becomes the active revision —
|
|
8041
|
+
* live traffic flips to it immediately. Pass `setActive: false` to
|
|
8042
|
+
* publish without flipping live traffic (advanced flow).
|
|
8043
|
+
*/
|
|
8044
|
+
async publishWorkflowRevision(wid, workflowId, data = {}) {
|
|
8045
|
+
return this.fetch(`w/${wid}/workflows/${workflowId}/publish`, {
|
|
7574
8046
|
method: "POST",
|
|
7575
8047
|
body: JSON.stringify(data)
|
|
7576
8048
|
});
|
|
7577
8049
|
}
|
|
7578
|
-
|
|
8050
|
+
/** Point the workflow's active pointer at a chosen revision (pointer flip only).
|
|
8051
|
+
*
|
|
8052
|
+
* The target may be any of the workflow's published revisions.
|
|
8053
|
+
* Activating the draft requires `allowDraft: true` and a UI warning
|
|
8054
|
+
* confirmation.
|
|
8055
|
+
*/
|
|
8056
|
+
async activateWorkflowRevision(wid, workflowId, revisionId, data = {}) {
|
|
7579
8057
|
return this.fetch(
|
|
7580
|
-
`w/${wid}/workflows/${
|
|
7581
|
-
{
|
|
8058
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}/activate`,
|
|
8059
|
+
{
|
|
8060
|
+
method: "POST",
|
|
8061
|
+
body: JSON.stringify(data)
|
|
8062
|
+
}
|
|
7582
8063
|
);
|
|
7583
8064
|
}
|
|
7584
|
-
/**
|
|
7585
|
-
|
|
8065
|
+
/** Update a revision's curation metadata (label + publish notes).
|
|
8066
|
+
*
|
|
8067
|
+
* Applies to both the draft and published revisions; it is not a graph
|
|
8068
|
+
* change, so it never marks the draft dirty.
|
|
8069
|
+
*/
|
|
8070
|
+
async updateWorkflowRevisionMetadata(wid, workflowId, revisionId, data) {
|
|
7586
8071
|
return this.fetch(
|
|
7587
|
-
`w/${wid}/workflows/${
|
|
8072
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}`,
|
|
7588
8073
|
{
|
|
7589
|
-
method: "
|
|
8074
|
+
method: "PATCH",
|
|
8075
|
+
body: JSON.stringify(data)
|
|
7590
8076
|
}
|
|
7591
8077
|
);
|
|
7592
8078
|
}
|
|
7593
|
-
/**
|
|
7594
|
-
|
|
8079
|
+
/** Compare two revisions of the same workflow.
|
|
8080
|
+
*
|
|
8081
|
+
* `against` is a revision id or UUID; when omitted the diff compares the
|
|
8082
|
+
* named revision against the workflow's draft. Tasks are matched by
|
|
8083
|
+
* stable lineage, so a rename reads as a changed `name` field.
|
|
8084
|
+
*/
|
|
8085
|
+
async diffWorkflowRevisions(wid, workflowId, revisionId, against) {
|
|
8086
|
+
const qs = against !== void 0 ? `?against=${encodeURIComponent(String(against))}` : "";
|
|
7595
8087
|
return this.fetch(
|
|
7596
|
-
`w/${wid}/workflows/${
|
|
7597
|
-
{
|
|
7598
|
-
method: "POST"
|
|
7599
|
-
}
|
|
8088
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}/diff${qs}`
|
|
7600
8089
|
);
|
|
7601
8090
|
}
|
|
7602
|
-
/**
|
|
7603
|
-
|
|
8091
|
+
/** Branch a published revision into the workflow's draft ("edit this
|
|
8092
|
+
* revision"): the draft becomes a fresh clone of the named published
|
|
8093
|
+
* revision. Pass `discardDraftChanges` to replace a dirty draft.
|
|
8094
|
+
*/
|
|
8095
|
+
async editWorkflowRevisionAsDraft(wid, workflowId, revisionId, data = {}) {
|
|
7604
8096
|
return this.fetch(
|
|
7605
|
-
`w/${wid}/workflows/${
|
|
8097
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}/edit`,
|
|
8098
|
+
{
|
|
8099
|
+
method: "POST",
|
|
8100
|
+
body: JSON.stringify(data)
|
|
8101
|
+
}
|
|
7606
8102
|
);
|
|
7607
8103
|
}
|
|
7608
8104
|
};
|
|
@@ -7743,11 +8239,14 @@ var Scope = /* @__PURE__ */ ((Scope2) => {
|
|
|
7743
8239
|
Scope2["ANALYTICS_READ"] = "analytics:read";
|
|
7744
8240
|
Scope2["OPERATOR_READ"] = "operator:read";
|
|
7745
8241
|
Scope2["OPERATOR_WRITE"] = "operator:write";
|
|
8242
|
+
Scope2["EXPORT_READ"] = "export:read";
|
|
8243
|
+
Scope2["EXPORT_WRITE"] = "export:write";
|
|
8244
|
+
Scope2["EXPORT_ADMIN"] = "export:admin";
|
|
7746
8245
|
Scope2["ORG_INFO"] = "org:info";
|
|
7747
8246
|
Scope2["ORG_READ"] = "org:read";
|
|
7748
8247
|
Scope2["ORG_WRITE"] = "org:write";
|
|
7749
8248
|
Scope2["ORG_ADMIN"] = "org:admin";
|
|
7750
|
-
Scope2["
|
|
8249
|
+
Scope2["ORG_MANAGE_ADMINS"] = "org:manage_admins";
|
|
7751
8250
|
Scope2["ORG_DELETE"] = "org:delete";
|
|
7752
8251
|
return Scope2;
|
|
7753
8252
|
})(Scope || {});
|
|
@@ -7811,6 +8310,7 @@ var EventRuleObjectType = /* @__PURE__ */ ((EventRuleObjectType2) => {
|
|
|
7811
8310
|
EventRuleObjectType2["CALENDAR_EVENT_TYPE"] = "calendar_event_type";
|
|
7812
8311
|
EventRuleObjectType2["JOURNEY"] = "journey";
|
|
7813
8312
|
EventRuleObjectType2["CALL"] = "call";
|
|
8313
|
+
EventRuleObjectType2["VOICEMAIL"] = "voicemail";
|
|
7814
8314
|
return EventRuleObjectType2;
|
|
7815
8315
|
})(EventRuleObjectType || {});
|
|
7816
8316
|
var EventRuleEventType = /* @__PURE__ */ ((EventRuleEventType2) => {
|
|
@@ -7822,6 +8322,7 @@ var EventRuleEventType = /* @__PURE__ */ ((EventRuleEventType2) => {
|
|
|
7822
8322
|
EventRuleEventType2["MEMBER_LEFT"] = "workspace:member_left";
|
|
7823
8323
|
EventRuleEventType2["DATA_RECORD_CREATED"] = "data_record:created";
|
|
7824
8324
|
EventRuleEventType2["DATA_RECORD_UPDATED"] = "data_record:updated";
|
|
8325
|
+
EventRuleEventType2["DATA_RECORD_CHANGED"] = "data_record:changed";
|
|
7825
8326
|
EventRuleEventType2["CHAT_CREATED"] = "chat:created";
|
|
7826
8327
|
EventRuleEventType2["CHAT_CALLBACK"] = "chat:callback";
|
|
7827
8328
|
EventRuleEventType2["MEMBER_UPDATED"] = "member:updated";
|
|
@@ -7841,6 +8342,7 @@ var EventRuleEventType = /* @__PURE__ */ ((EventRuleEventType2) => {
|
|
|
7841
8342
|
EventRuleEventType2["CALL_STARTED"] = "call:started";
|
|
7842
8343
|
EventRuleEventType2["CALL_COMPLETED"] = "call:completed";
|
|
7843
8344
|
EventRuleEventType2["CALL_SUMMARY"] = "call:summary";
|
|
8345
|
+
EventRuleEventType2["VOICEMAIL_RECEIVED"] = "voicemail:received";
|
|
7844
8346
|
return EventRuleEventType2;
|
|
7845
8347
|
})(EventRuleEventType || {});
|
|
7846
8348
|
var EventRuleActionType = /* @__PURE__ */ ((EventRuleActionType2) => {
|
|
@@ -7891,16 +8393,13 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
|
|
|
7891
8393
|
WorkspaceFeature2["BROWSER"] = "browser";
|
|
7892
8394
|
WorkspaceFeature2["WEB_SEARCH"] = "web_search";
|
|
7893
8395
|
WorkspaceFeature2["CALENDAR"] = "calendar";
|
|
7894
|
-
WorkspaceFeature2["DIRECT_MESSAGES"] = "direct_messages";
|
|
7895
8396
|
WorkspaceFeature2["JOURNEYS"] = "journeys";
|
|
7896
8397
|
WorkspaceFeature2["EXPERIMENTS"] = "experiments";
|
|
7897
8398
|
WorkspaceFeature2["OPERATOR"] = "operator";
|
|
7898
|
-
WorkspaceFeature2["PRESENCE"] = "presence";
|
|
7899
8399
|
WorkspaceFeature2["GMAIL"] = "gmail";
|
|
7900
8400
|
WorkspaceFeature2["GCALENDAR"] = "gcalendar";
|
|
7901
8401
|
WorkspaceFeature2["MONDAY"] = "monday";
|
|
7902
8402
|
WorkspaceFeature2["RESELL_PRODUCTS"] = "resell_products";
|
|
7903
|
-
WorkspaceFeature2["HIPAA_COMPLIANCE"] = "hipaa_compliance";
|
|
7904
8403
|
WorkspaceFeature2["SOC2_COMPLIANCE"] = "soc2_compliance";
|
|
7905
8404
|
WorkspaceFeature2["EHR_FHIR"] = "ehr_fhir";
|
|
7906
8405
|
WorkspaceFeature2["EHR_ECLINICALWORKS"] = "ehr_eclinicalworks";
|
|
@@ -7910,7 +8409,6 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
|
|
|
7910
8409
|
WorkspaceFeature2["CONFLUENCE"] = "confluence";
|
|
7911
8410
|
WorkspaceFeature2["AGENT_MEMORY"] = "agent_memory";
|
|
7912
8411
|
WorkspaceFeature2["IMAGE_GENERATION"] = "image_generation";
|
|
7913
|
-
WorkspaceFeature2["WORKFLOW_VERSIONING"] = "workflow_versioning";
|
|
7914
8412
|
return WorkspaceFeature2;
|
|
7915
8413
|
})(WorkspaceFeature || {});
|
|
7916
8414
|
var MemberFeature = /* @__PURE__ */ ((MemberFeature2) => {
|
|
@@ -7924,7 +8422,6 @@ var MemberFeature = /* @__PURE__ */ ((MemberFeature2) => {
|
|
|
7924
8422
|
var OrgFeature = /* @__PURE__ */ ((OrgFeature2) => {
|
|
7925
8423
|
OrgFeature2["SSO"] = "sso";
|
|
7926
8424
|
OrgFeature2["AUDIT_LOGS"] = "audit_logs";
|
|
7927
|
-
OrgFeature2["HIPAA_COMPLIANCE"] = "hipaa_compliance";
|
|
7928
8425
|
OrgFeature2["SOC2_COMPLIANCE"] = "soc2_compliance";
|
|
7929
8426
|
OrgFeature2["CUSTOM_BRANDING"] = "custom_branding";
|
|
7930
8427
|
OrgFeature2["PRIORITY_SUPPORT"] = "priority_support";
|
|
@@ -8177,8 +8674,15 @@ var AccessGrantResourceType = /* @__PURE__ */ ((AccessGrantResourceType2) => {
|
|
|
8177
8674
|
AccessGrantResourceType2["SITE"] = "site";
|
|
8178
8675
|
AccessGrantResourceType2["ASSIGNMENT"] = "assignment";
|
|
8179
8676
|
AccessGrantResourceType2["APP_CONNECTION"] = "app_connection";
|
|
8677
|
+
AccessGrantResourceType2["CAPABILITY"] = "capability";
|
|
8180
8678
|
return AccessGrantResourceType2;
|
|
8181
8679
|
})(AccessGrantResourceType || {});
|
|
8680
|
+
var CapabilityClass = /* @__PURE__ */ ((CapabilityClass2) => {
|
|
8681
|
+
CapabilityClass2["TOOL_ALWAYS_ALLOW"] = "tool.always_allow";
|
|
8682
|
+
CapabilityClass2["SELF_MODIFICATION_SCHEDULE"] = "self_modification.schedule";
|
|
8683
|
+
CapabilityClass2["ATTENTION_INTERRUPT_RUNG"] = "attention.interrupt_rung";
|
|
8684
|
+
return CapabilityClass2;
|
|
8685
|
+
})(CapabilityClass || {});
|
|
8182
8686
|
var AccessGrantStatus = /* @__PURE__ */ ((AccessGrantStatus2) => {
|
|
8183
8687
|
AccessGrantStatus2["PENDING"] = "pending";
|
|
8184
8688
|
AccessGrantStatus2["ACTIVE"] = "active";
|
|
@@ -8489,6 +8993,35 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
8489
8993
|
async getWorkspaceSiteDomains(wid) {
|
|
8490
8994
|
return this.fetch(`w/${wid}/domains/for-site`);
|
|
8491
8995
|
}
|
|
8996
|
+
/**
|
|
8997
|
+
* List org domains available for enabling embeddable widgets. Widgets ride
|
|
8998
|
+
* on domain-ownership verification only, so the consumer gates selection on
|
|
8999
|
+
* `ownershipStatus === 'verified'`.
|
|
9000
|
+
*/
|
|
9001
|
+
async getWorkspaceWidgetDomains(wid) {
|
|
9002
|
+
return this.fetch(`w/${wid}/domains/for-widget`);
|
|
9003
|
+
}
|
|
9004
|
+
/** List this workspace's widget-domain enablement entries. */
|
|
9005
|
+
async listWidgetDomains(wid) {
|
|
9006
|
+
return this.fetch(`w/${wid}/widget-domains`);
|
|
9007
|
+
}
|
|
9008
|
+
/**
|
|
9009
|
+
* Enable/replace the set of widgets on one verified org domain. Idempotent
|
|
9010
|
+
* upsert keyed by `orgDomainUuid`; the server rejects unverified domains
|
|
9011
|
+
* (400) and cross-org domains (404).
|
|
9012
|
+
*/
|
|
9013
|
+
async upsertWidgetDomain(wid, orgDomainUuid, body) {
|
|
9014
|
+
return this.fetch(`w/${wid}/widget-domains/${orgDomainUuid}`, {
|
|
9015
|
+
method: "PUT",
|
|
9016
|
+
body: JSON.stringify(body)
|
|
9017
|
+
});
|
|
9018
|
+
}
|
|
9019
|
+
/** Remove this workspace's widget entry for a domain (disables all widgets). */
|
|
9020
|
+
async deleteWidgetDomain(wid, orgDomainUuid) {
|
|
9021
|
+
await this.fetch(`w/${wid}/widget-domains/${orgDomainUuid}`, {
|
|
9022
|
+
method: "DELETE"
|
|
9023
|
+
});
|
|
9024
|
+
}
|
|
8492
9025
|
/** List client workspaces managed by this reseller workspace, paginated. */
|
|
8493
9026
|
async getResellerWorkspaces(wid, params) {
|
|
8494
9027
|
const query = new URLSearchParams();
|
|
@@ -8648,7 +9181,7 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
8648
9181
|
/**
|
|
8649
9182
|
* Get billing dashboard data for a workspace.
|
|
8650
9183
|
*
|
|
8651
|
-
* This endpoint is available to organization owners (with org:
|
|
9184
|
+
* This endpoint is available to organization owners (with org:info scope).
|
|
8652
9185
|
* Superusers should use the admin endpoint via getWorkspaceUsageDashboard.
|
|
8653
9186
|
*
|
|
8654
9187
|
* Returns comprehensive billing information including:
|
|
@@ -8745,6 +9278,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8745
9278
|
customers: new CustomersApi(apiKey, baseUrl, customFetch),
|
|
8746
9279
|
resellers: new ResellersApi(apiKey, baseUrl, customFetch),
|
|
8747
9280
|
customToolkits: new CustomToolkitsApi(apiKey, baseUrl, customFetch),
|
|
9281
|
+
dashboards: new DashboardsApi(apiKey, baseUrl, customFetch),
|
|
8748
9282
|
dataTypes: new DataTypesApi(apiKey, baseUrl, customFetch),
|
|
8749
9283
|
discordBots: new DiscordBotsApi(apiKey, baseUrl, customFetch),
|
|
8750
9284
|
slackApps: new SlackAppsApi(apiKey, baseUrl, customFetch),
|
|
@@ -8765,6 +9299,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8765
9299
|
mcpServers: new McpServersApi(apiKey, baseUrl, customFetch),
|
|
8766
9300
|
members: new MembersApi(apiKey, baseUrl, customFetch),
|
|
8767
9301
|
milestones: new MilestonesApi(apiKey, baseUrl, customFetch),
|
|
9302
|
+
motd: new MotdApi(apiKey, baseUrl, customFetch),
|
|
8768
9303
|
confluence: new ConfluenceApi(apiKey, baseUrl, customFetch),
|
|
8769
9304
|
mondayIntegration: new MondayIntegrationApi(apiKey, baseUrl, customFetch),
|
|
8770
9305
|
notificationRules: new NotificationRulesApi(apiKey, baseUrl, customFetch),
|
|
@@ -8797,7 +9332,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8797
9332
|
|
|
8798
9333
|
// src/client/workspace-client.ts
|
|
8799
9334
|
var WORKSPACE_METHOD_NAMES = [
|
|
8800
|
-
"
|
|
9335
|
+
"activateWorkflowRevision",
|
|
8801
9336
|
"addGroupMember",
|
|
8802
9337
|
"advanceStep",
|
|
8803
9338
|
"approveWorkspaceInvitation",
|
|
@@ -8860,6 +9395,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8860
9395
|
"createCustomTool",
|
|
8861
9396
|
"createCustomToolkit",
|
|
8862
9397
|
"createDataRecord",
|
|
9398
|
+
"createDataRecordFilter",
|
|
8863
9399
|
"createDataType",
|
|
8864
9400
|
"createDiscordBot",
|
|
8865
9401
|
"createEventRule",
|
|
@@ -8867,7 +9403,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8867
9403
|
"createExperiment",
|
|
8868
9404
|
"createExperimentAssignment",
|
|
8869
9405
|
"createExperimentGroup",
|
|
8870
|
-
"convertMemberFilterToQuery",
|
|
8871
9406
|
"createFhirConnection",
|
|
8872
9407
|
"createFile",
|
|
8873
9408
|
"createFileLabel",
|
|
@@ -8907,7 +9442,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8907
9442
|
"createWorkflowOutboundVoiceChat",
|
|
8908
9443
|
"createWorkspaceMember",
|
|
8909
9444
|
"createWorkspaceSupportRequest",
|
|
8910
|
-
"deactivateWorkflowVersion",
|
|
8911
9445
|
"deleteAbility",
|
|
8912
9446
|
"deleteAgent",
|
|
8913
9447
|
"deleteAssignment",
|
|
@@ -8923,6 +9457,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8923
9457
|
"deleteCustomTool",
|
|
8924
9458
|
"deleteCustomToolkit",
|
|
8925
9459
|
"deleteDataRecord",
|
|
9460
|
+
"deleteDataRecordFilter",
|
|
8926
9461
|
"deleteDataType",
|
|
8927
9462
|
"deleteDiscordBot",
|
|
8928
9463
|
"deleteEnrollment",
|
|
@@ -8965,6 +9500,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8965
9500
|
"deleteSupervisor",
|
|
8966
9501
|
"deleteTask",
|
|
8967
9502
|
"deleteTeamsApp",
|
|
9503
|
+
"deleteWidgetDomain",
|
|
8968
9504
|
"deleteWorkflow",
|
|
8969
9505
|
"deleteWorkflowContributor",
|
|
8970
9506
|
"deleteWorkflowNote",
|
|
@@ -8972,7 +9508,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8972
9508
|
"deleteWorkspaceInvitationAdmin",
|
|
8973
9509
|
"denyWorkspaceInvitation",
|
|
8974
9510
|
"describeSalesforceObject",
|
|
8975
|
-
"
|
|
9511
|
+
"diffWorkflowRevisions",
|
|
8976
9512
|
"disableConfluence",
|
|
8977
9513
|
"disableCustomToolkit",
|
|
8978
9514
|
"disableHubspot",
|
|
@@ -8988,6 +9524,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8988
9524
|
"dismissAllNotifications",
|
|
8989
9525
|
"dismissNotification",
|
|
8990
9526
|
"downloadEmailAttachment",
|
|
9527
|
+
"editWorkflowRevisionAsDraft",
|
|
8991
9528
|
"enableConfluence",
|
|
8992
9529
|
"enableCustomToolkit",
|
|
8993
9530
|
"enableHubspot",
|
|
@@ -9066,6 +9603,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9066
9603
|
"getCalendarSchedules",
|
|
9067
9604
|
"getCalendars",
|
|
9068
9605
|
"getCelContext",
|
|
9606
|
+
"getCharlestonTestDeliveryRecipients",
|
|
9069
9607
|
"getChat",
|
|
9070
9608
|
"getChatAssignmentTasks",
|
|
9071
9609
|
"getChatCallbacks",
|
|
@@ -9099,6 +9637,9 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9099
9637
|
"getCustomToolkits",
|
|
9100
9638
|
"getDataRecord",
|
|
9101
9639
|
"getDataRecordChanges",
|
|
9640
|
+
"getDataRecordFilter",
|
|
9641
|
+
"getDataRecordFilterCount",
|
|
9642
|
+
"getDataRecordFilters",
|
|
9102
9643
|
"getDataRecords",
|
|
9103
9644
|
"getDataType",
|
|
9104
9645
|
"getDataTypeByUuid",
|
|
@@ -9122,16 +9663,20 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9122
9663
|
"getFhirConnections",
|
|
9123
9664
|
"getFieldIndexStatus",
|
|
9124
9665
|
"getFile",
|
|
9666
|
+
"resolveFilePath",
|
|
9125
9667
|
"getFileLabel",
|
|
9126
9668
|
"getFileLabelByUuid",
|
|
9127
9669
|
"getFileLabels",
|
|
9128
9670
|
"getFileSharing",
|
|
9671
|
+
"getFileVersionContentsUrl",
|
|
9672
|
+
"getFileVersionDiff",
|
|
9129
9673
|
"getFiles",
|
|
9130
9674
|
"getFirstRunState",
|
|
9131
9675
|
"getFolder",
|
|
9132
9676
|
"getFolderSharing",
|
|
9133
9677
|
"getFolders",
|
|
9134
9678
|
"getGoogleCalendarStatus",
|
|
9679
|
+
"getGranteeGrants",
|
|
9135
9680
|
"getHealthieAvailableSlots",
|
|
9136
9681
|
"getHealthieReconciliationMatches",
|
|
9137
9682
|
"getHealthieStatus",
|
|
@@ -9177,6 +9722,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9177
9722
|
"getMemberLabelByUuid",
|
|
9178
9723
|
"getMemberLabels",
|
|
9179
9724
|
"getMemberMemories",
|
|
9725
|
+
"getMemberMemory",
|
|
9180
9726
|
"getMemberRecordCounts",
|
|
9181
9727
|
"getMemberRole",
|
|
9182
9728
|
"getMemberRoleByUuid",
|
|
@@ -9225,6 +9771,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9225
9771
|
"getPublicProducts",
|
|
9226
9772
|
"getQualification",
|
|
9227
9773
|
"getQualifications",
|
|
9774
|
+
"getRecordingInfo",
|
|
9228
9775
|
"getResellerWorkspaces",
|
|
9229
9776
|
"getRoutine",
|
|
9230
9777
|
"getRoutineRuns",
|
|
@@ -9279,17 +9826,17 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9279
9826
|
"getWorkflowAccessValidation",
|
|
9280
9827
|
"getWorkflowActivity",
|
|
9281
9828
|
"getWorkflowConfigValidation",
|
|
9829
|
+
"getWorkflowFeedback",
|
|
9282
9830
|
"getWorkflowContributors",
|
|
9283
9831
|
"getWorkflowDeletionPreview",
|
|
9284
9832
|
"getWorkflowDiagram",
|
|
9285
9833
|
"getWorkflowNotes",
|
|
9834
|
+
"getWorkflowRevision",
|
|
9835
|
+
"getWorkflowRevisions",
|
|
9286
9836
|
"getWorkflowRouteDryRun",
|
|
9287
9837
|
"getWorkflowTaskAssignmentStats",
|
|
9288
9838
|
"getWorkflowTemplates",
|
|
9289
9839
|
"getWorkflowThumbnailUrl",
|
|
9290
|
-
"getWorkflowVersion",
|
|
9291
|
-
"getWorkflowVersionActive",
|
|
9292
|
-
"getWorkflowVersions",
|
|
9293
9840
|
"getWorkflows",
|
|
9294
9841
|
"getWorkflowsActivityBatch",
|
|
9295
9842
|
"getWorkspace",
|
|
@@ -9303,6 +9850,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9303
9850
|
"getWorkspaceNotices",
|
|
9304
9851
|
"getWorkspaceProduct",
|
|
9305
9852
|
"getWorkspaceSiteDomains",
|
|
9853
|
+
"getWorkspaceWidgetDomains",
|
|
9306
9854
|
"getWorkspaceSubscriptions",
|
|
9307
9855
|
"getWorkspaceSupportRequest",
|
|
9308
9856
|
"getWorkspaceThemes",
|
|
@@ -9314,6 +9862,9 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9314
9862
|
"initiateCall",
|
|
9315
9863
|
"initiateOutboundCall",
|
|
9316
9864
|
"inspectPrompt",
|
|
9865
|
+
"installHubspot",
|
|
9866
|
+
"installMondayConnection",
|
|
9867
|
+
"installSalesforce",
|
|
9317
9868
|
"inviteMemberCredentialUpdate",
|
|
9318
9869
|
"inviteToWorkspace",
|
|
9319
9870
|
"leaveWorkspace",
|
|
@@ -9325,13 +9876,13 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9325
9876
|
"linkMemberToSalesforce",
|
|
9326
9877
|
"linkPhoneNumber",
|
|
9327
9878
|
"listAbilities",
|
|
9328
|
-
"listAgentAbilities",
|
|
9329
9879
|
"listAppConnections",
|
|
9330
9880
|
"listAvailableAppConnections",
|
|
9331
9881
|
"listConfluencePages",
|
|
9332
9882
|
"listConfluenceSpaces",
|
|
9333
9883
|
"listConnectionMemberFieldKeys",
|
|
9334
9884
|
"setDefaultGooglePlatformAccount",
|
|
9885
|
+
"listFileVersions",
|
|
9335
9886
|
"listGoogleCalendars",
|
|
9336
9887
|
"listHealthieAppointmentTypes",
|
|
9337
9888
|
"listHealthiePatients",
|
|
@@ -9341,6 +9892,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9341
9892
|
"listScenarios",
|
|
9342
9893
|
"listSnippets",
|
|
9343
9894
|
"listTestChatRuns",
|
|
9895
|
+
"listWidgetDomains",
|
|
9344
9896
|
"listWorkspaceInvitationsAdmin",
|
|
9345
9897
|
"listWorkspaceSupportRequests",
|
|
9346
9898
|
"markEmailAsRead",
|
|
@@ -9348,14 +9900,16 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9348
9900
|
"markNotificationAsRead",
|
|
9349
9901
|
"previewImportMembers",
|
|
9350
9902
|
"previewImportWorkspace",
|
|
9903
|
+
"previewRoutineWorkflowAccess",
|
|
9351
9904
|
"previewSchedule",
|
|
9352
9905
|
"previewTTS",
|
|
9353
9906
|
"previewTemplate",
|
|
9354
9907
|
"previewThinkingSound",
|
|
9355
9908
|
"previewWorkspaceImport",
|
|
9356
9909
|
"provisionClientWorkspace",
|
|
9357
|
-
"
|
|
9910
|
+
"publishWorkflowRevision",
|
|
9358
9911
|
"rateMessage",
|
|
9912
|
+
"getChatFeedback",
|
|
9359
9913
|
"reenrollMember",
|
|
9360
9914
|
"registerLinkedRolesMetadata",
|
|
9361
9915
|
"registerPushSubscription",
|
|
@@ -9372,8 +9926,8 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9372
9926
|
"requestWorkspaceMembership",
|
|
9373
9927
|
"resetRoutineRuns",
|
|
9374
9928
|
"resolveAccessGrant",
|
|
9375
|
-
"resolveAgentTools",
|
|
9376
9929
|
"resolveAnonymousMember",
|
|
9930
|
+
"restoreFileVersion",
|
|
9377
9931
|
"revokeAccessGrant",
|
|
9378
9932
|
"revokeApiKey",
|
|
9379
9933
|
"revokeICalToken",
|
|
@@ -9439,6 +9993,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9439
9993
|
"updateCustomTool",
|
|
9440
9994
|
"updateCustomToolkit",
|
|
9441
9995
|
"updateDataRecord",
|
|
9996
|
+
"updateDataRecordFilter",
|
|
9442
9997
|
"updateDataType",
|
|
9443
9998
|
"updateDiscordBot",
|
|
9444
9999
|
"updateEventAttendee",
|
|
@@ -9491,12 +10046,13 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9491
10046
|
"updateWorkflow",
|
|
9492
10047
|
"updateWorkflowContributor",
|
|
9493
10048
|
"updateWorkflowNote",
|
|
9494
|
-
"
|
|
10049
|
+
"updateWorkflowRevisionMetadata",
|
|
9495
10050
|
"updateWorkspace",
|
|
9496
10051
|
"updateWorkspaceDefaults",
|
|
9497
10052
|
"updateWorkspaceInvitationAdmin",
|
|
9498
10053
|
"updateWorkspaceThemes",
|
|
9499
10054
|
"upsertDataRecord",
|
|
10055
|
+
"upsertWidgetDomain",
|
|
9500
10056
|
"validateDataTypeSlug",
|
|
9501
10057
|
"validateWorkflowName"
|
|
9502
10058
|
];
|
|
@@ -9528,6 +10084,7 @@ function bindAccessGrantsMethods(target, accessGrants) {
|
|
|
9528
10084
|
target.revokeAccessGrant = accessGrants.revokeAccessGrant.bind(accessGrants);
|
|
9529
10085
|
target.getAccessGrants = accessGrants.getAccessGrants.bind(accessGrants);
|
|
9530
10086
|
target.getMemberGrants = accessGrants.getMemberGrants.bind(accessGrants);
|
|
10087
|
+
target.getGranteeGrants = accessGrants.getGranteeGrants.bind(accessGrants);
|
|
9531
10088
|
}
|
|
9532
10089
|
|
|
9533
10090
|
// src/client/bindings/agent-tasks.ts
|
|
@@ -9547,8 +10104,6 @@ function bindAgentsMethods(target, agents) {
|
|
|
9547
10104
|
target.deleteAgent = agents.deleteAgent.bind(agents);
|
|
9548
10105
|
target.archiveAgent = agents.archiveAgent.bind(agents);
|
|
9549
10106
|
target.unarchiveAgent = agents.unarchiveAgent.bind(agents);
|
|
9550
|
-
target.resolveAgentTools = agents.resolveAgentTools.bind(agents);
|
|
9551
|
-
target.listAgentAbilities = agents.listAgentAbilities.bind(agents);
|
|
9552
10107
|
}
|
|
9553
10108
|
|
|
9554
10109
|
// src/client/bindings/tasks.ts
|
|
@@ -9567,6 +10122,7 @@ function bindTasksMethods(target, tasks, abilities) {
|
|
|
9567
10122
|
target.createAbility = abilities.createAbility.bind(abilities);
|
|
9568
10123
|
target.updateAbility = abilities.updateAbility.bind(abilities);
|
|
9569
10124
|
target.deleteAbility = abilities.deleteAbility.bind(abilities);
|
|
10125
|
+
target.getCharlestonTestDeliveryRecipients = abilities.getCharlestonTestDeliveryRecipients.bind(abilities);
|
|
9570
10126
|
}
|
|
9571
10127
|
|
|
9572
10128
|
// src/client/bindings/chats.ts
|
|
@@ -9587,6 +10143,8 @@ function bindChatsMethods(target, chats) {
|
|
|
9587
10143
|
target.createWorkflowOutboundVoiceChat = chats.createWorkflowOutboundVoiceChat.bind(chats);
|
|
9588
10144
|
target.deleteChat = chats.deleteChat.bind(chats);
|
|
9589
10145
|
target.updateChat = chats.updateChat.bind(chats);
|
|
10146
|
+
target.getChatModelOverride = chats.getChatModelOverride.bind(chats);
|
|
10147
|
+
target.updateChatModelOverride = chats.updateChatModelOverride.bind(chats);
|
|
9590
10148
|
target.updateChatMute = chats.updateChatMute.bind(chats);
|
|
9591
10149
|
target.updateChatNeedsResponse = chats.updateChatNeedsResponse.bind(chats);
|
|
9592
10150
|
target.summarizeChat = chats.summarizeChat.bind(chats);
|
|
@@ -9596,6 +10154,7 @@ function bindChatsMethods(target, chats) {
|
|
|
9596
10154
|
target.initiateOutboundCall = chats.initiateOutboundCall.bind(chats);
|
|
9597
10155
|
target.sendAssistantMessage = chats.sendAssistantMessage.bind(chats);
|
|
9598
10156
|
target.rateMessage = chats.rateMessage.bind(chats);
|
|
10157
|
+
target.getChatFeedback = chats.getChatFeedback.bind(chats);
|
|
9599
10158
|
target.getChatAssignmentTasks = chats.getChatAssignmentTasks.bind(chats);
|
|
9600
10159
|
target.createChatCompletion = chats.createChatCompletion.bind(chats);
|
|
9601
10160
|
target.exportChats = chats.exportChats.bind(chats);
|
|
@@ -9624,11 +10183,28 @@ function bindCallsMethods(target, calls, cel) {
|
|
|
9624
10183
|
target.initiateCall = calls.initiateCall.bind(calls);
|
|
9625
10184
|
target.getVoiceToken = calls.getVoiceToken.bind(calls);
|
|
9626
10185
|
target.getMessageTiming = calls.getMessageTiming.bind(calls);
|
|
10186
|
+
target.getRecordingInfo = calls.getRecordingInfo.bind(calls);
|
|
9627
10187
|
target.listChatRecordings = calls.listChatRecordings.bind(calls);
|
|
9628
10188
|
target.getCallRecordingDownloadUrl = calls.getCallRecordingDownloadUrl.bind(calls);
|
|
9629
10189
|
target.getCelContext = cel.getCelContext.bind(cel);
|
|
9630
10190
|
}
|
|
9631
10191
|
|
|
10192
|
+
// src/client/bindings/dashboards.ts
|
|
10193
|
+
function bindDashboardsMethods(target, dashboards) {
|
|
10194
|
+
target.getDashboards = dashboards.getDashboards.bind(dashboards);
|
|
10195
|
+
target.getDashboard = dashboards.getDashboard.bind(dashboards);
|
|
10196
|
+
target.createDashboard = dashboards.createDashboard.bind(dashboards);
|
|
10197
|
+
target.updateDashboard = dashboards.updateDashboard.bind(dashboards);
|
|
10198
|
+
target.deleteDashboard = dashboards.deleteDashboard.bind(dashboards);
|
|
10199
|
+
target.getDashboardChannelStats = dashboards.getDashboardChannelStats.bind(dashboards);
|
|
10200
|
+
target.getDashboardWorkflowAssignmentStats = dashboards.getDashboardWorkflowAssignmentStats.bind(dashboards);
|
|
10201
|
+
}
|
|
10202
|
+
|
|
10203
|
+
// src/client/bindings/motd.ts
|
|
10204
|
+
function bindMotdMethods(target, motd) {
|
|
10205
|
+
target.getMotd = motd.getMotd.bind(motd);
|
|
10206
|
+
}
|
|
10207
|
+
|
|
9632
10208
|
// src/client/bindings/data-types.ts
|
|
9633
10209
|
function bindDataTypesMethods(target, dataTypes) {
|
|
9634
10210
|
target.getDataTypes = dataTypes.getDataTypes.bind(dataTypes);
|
|
@@ -9652,6 +10228,12 @@ function bindDataTypesMethods(target, dataTypes) {
|
|
|
9652
10228
|
target.getFieldIndexStatus = dataTypes.getFieldIndexStatus.bind(dataTypes);
|
|
9653
10229
|
target.validateDataTypeSlug = dataTypes.validateDataTypeSlug.bind(dataTypes);
|
|
9654
10230
|
target.getMemberRecordCounts = dataTypes.getMemberRecordCounts.bind(dataTypes);
|
|
10231
|
+
target.getDataRecordFilters = dataTypes.getDataRecordFilters.bind(dataTypes);
|
|
10232
|
+
target.getDataRecordFilter = dataTypes.getDataRecordFilter.bind(dataTypes);
|
|
10233
|
+
target.createDataRecordFilter = dataTypes.createDataRecordFilter.bind(dataTypes);
|
|
10234
|
+
target.updateDataRecordFilter = dataTypes.updateDataRecordFilter.bind(dataTypes);
|
|
10235
|
+
target.deleteDataRecordFilter = dataTypes.deleteDataRecordFilter.bind(dataTypes);
|
|
10236
|
+
target.getDataRecordFilterCount = dataTypes.getDataRecordFilterCount.bind(dataTypes);
|
|
9655
10237
|
}
|
|
9656
10238
|
|
|
9657
10239
|
// src/client/bindings/members.ts
|
|
@@ -9678,7 +10260,6 @@ function bindMembersMethods(target, members) {
|
|
|
9678
10260
|
target.getMemberFilter = members.getMemberFilter.bind(members);
|
|
9679
10261
|
target.createMemberFilter = members.createMemberFilter.bind(members);
|
|
9680
10262
|
target.updateMemberFilter = members.updateMemberFilter.bind(members);
|
|
9681
|
-
target.convertMemberFilterToQuery = members.convertMemberFilterToQuery.bind(members);
|
|
9682
10263
|
target.deleteMemberFilter = members.deleteMemberFilter.bind(members);
|
|
9683
10264
|
target.getMemberFilterCount = members.getMemberFilterCount.bind(members);
|
|
9684
10265
|
target.getMemberLabels = members.getMemberLabels.bind(members);
|
|
@@ -9706,6 +10287,7 @@ function bindMembersMethods(target, members) {
|
|
|
9706
10287
|
target.resolveAnonymousMember = members.resolveAnonymousMember.bind(members);
|
|
9707
10288
|
target.expireAnonymousMember = members.expireAnonymousMember.bind(members);
|
|
9708
10289
|
target.getMemberMemories = members.getMemberMemories.bind(members);
|
|
10290
|
+
target.getMemberMemory = members.getMemberMemory.bind(members);
|
|
9709
10291
|
target.createMemberMemory = members.createMemberMemory.bind(members);
|
|
9710
10292
|
target.deleteMemberMemory = members.deleteMemberMemory.bind(members);
|
|
9711
10293
|
target.getMemberSyncLinks = members.getMemberSyncLinks.bind(members);
|
|
@@ -9763,6 +10345,10 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
|
|
|
9763
10345
|
target.listPushSubscriptions = workspaces.listPushSubscriptions.bind(workspaces);
|
|
9764
10346
|
target.getWorkspaceEmailDomains = workspaces.getWorkspaceEmailDomains.bind(workspaces);
|
|
9765
10347
|
target.getWorkspaceSiteDomains = workspaces.getWorkspaceSiteDomains.bind(workspaces);
|
|
10348
|
+
target.getWorkspaceWidgetDomains = workspaces.getWorkspaceWidgetDomains.bind(workspaces);
|
|
10349
|
+
target.listWidgetDomains = workspaces.listWidgetDomains.bind(workspaces);
|
|
10350
|
+
target.upsertWidgetDomain = workspaces.upsertWidgetDomain.bind(workspaces);
|
|
10351
|
+
target.deleteWidgetDomain = workspaces.deleteWidgetDomain.bind(workspaces);
|
|
9766
10352
|
target.listWorkspaceInvitations = signupRequests.listWorkspaceInvitations.bind(signupRequests);
|
|
9767
10353
|
target.listWorkspaceInvitationsAdmin = signupRequests.listWorkspaceInvitationsAdmin.bind(signupRequests);
|
|
9768
10354
|
target.getWorkspaceInvitation = signupRequests.getWorkspaceInvitation.bind(signupRequests);
|
|
@@ -9782,6 +10368,7 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
|
|
|
9782
10368
|
function bindAuthMethods(target, auth, assignments) {
|
|
9783
10369
|
target.getUserAccount = auth.getUserAccount.bind(auth);
|
|
9784
10370
|
target.updateUserAccount = auth.updateUserAccount.bind(auth);
|
|
10371
|
+
target.recordAcquisition = auth.recordAcquisition.bind(auth);
|
|
9785
10372
|
target.login = auth.login.bind(auth);
|
|
9786
10373
|
target.resendCode = auth.resendCode.bind(auth);
|
|
9787
10374
|
target.verifyCodeWith2FA = auth.verifyCodeWith2FA.bind(auth);
|
|
@@ -9892,6 +10479,11 @@ function bindFilesMethods(target, files) {
|
|
|
9892
10479
|
target.uploadFile = files.uploadFile.bind(files);
|
|
9893
10480
|
target.updateFile = files.updateFile.bind(files);
|
|
9894
10481
|
target.deleteFile = files.deleteFile.bind(files);
|
|
10482
|
+
target.resolveFilePath = files.resolveFilePath.bind(files);
|
|
10483
|
+
target.listFileVersions = files.listFileVersions.bind(files);
|
|
10484
|
+
target.getFileVersionDiff = files.getFileVersionDiff.bind(files);
|
|
10485
|
+
target.restoreFileVersion = files.restoreFileVersion.bind(files);
|
|
10486
|
+
target.getFileVersionContentsUrl = files.getFileVersionContentsUrl.bind(files);
|
|
9895
10487
|
target.convertFile = files.convertFile.bind(files);
|
|
9896
10488
|
target.generateFileUploadUrl = files.generateFileUploadUrl.bind(files);
|
|
9897
10489
|
target.getFolders = files.getFolders.bind(files);
|
|
@@ -9942,6 +10534,7 @@ function bindEventsMethods(target, events) {
|
|
|
9942
10534
|
target.getRoutineRuns = events.getRoutineRuns.bind(events);
|
|
9943
10535
|
target.resetRoutineRuns = events.resetRoutineRuns.bind(events);
|
|
9944
10536
|
target.previewSchedule = events.previewSchedule.bind(events);
|
|
10537
|
+
target.previewRoutineWorkflowAccess = events.previewRoutineWorkflowAccess.bind(events);
|
|
9945
10538
|
}
|
|
9946
10539
|
|
|
9947
10540
|
// src/client/bindings/experiments.ts
|
|
@@ -9986,18 +10579,18 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
|
|
|
9986
10579
|
target.createWorkflowNote = workflowNotes.createWorkflowNote.bind(workflowNotes);
|
|
9987
10580
|
target.updateWorkflowNote = workflowNotes.updateWorkflowNote.bind(workflowNotes);
|
|
9988
10581
|
target.deleteWorkflowNote = workflowNotes.deleteWorkflowNote.bind(workflowNotes);
|
|
10582
|
+
target.getWorkflowFeedback = workflows.getWorkflowFeedback.bind(workflows);
|
|
9989
10583
|
target.getWorkflowContributors = workflows.getWorkflowContributors.bind(workflows);
|
|
9990
10584
|
target.createWorkflowContributor = workflows.createWorkflowContributor.bind(workflows);
|
|
9991
10585
|
target.updateWorkflowContributor = workflows.updateWorkflowContributor.bind(workflows);
|
|
9992
10586
|
target.deleteWorkflowContributor = workflows.deleteWorkflowContributor.bind(workflows);
|
|
9993
|
-
target.
|
|
9994
|
-
target.
|
|
9995
|
-
target.
|
|
9996
|
-
target.
|
|
9997
|
-
target.
|
|
9998
|
-
target.
|
|
9999
|
-
target.
|
|
10000
|
-
target.diffWorkflowVersions = workflows.diffWorkflowVersions.bind(workflows);
|
|
10587
|
+
target.getWorkflowRevisions = workflows.getWorkflowRevisions.bind(workflows);
|
|
10588
|
+
target.getWorkflowRevision = workflows.getWorkflowRevision.bind(workflows);
|
|
10589
|
+
target.publishWorkflowRevision = workflows.publishWorkflowRevision.bind(workflows);
|
|
10590
|
+
target.activateWorkflowRevision = workflows.activateWorkflowRevision.bind(workflows);
|
|
10591
|
+
target.updateWorkflowRevisionMetadata = workflows.updateWorkflowRevisionMetadata.bind(workflows);
|
|
10592
|
+
target.diffWorkflowRevisions = workflows.diffWorkflowRevisions.bind(workflows);
|
|
10593
|
+
target.editWorkflowRevisionAsDraft = workflows.editWorkflowRevisionAsDraft.bind(workflows);
|
|
10001
10594
|
target.getWorkspaceBuilders = workflows.getWorkspaceBuilders.bind(workflows);
|
|
10002
10595
|
target.getWorkspaceBuilder = workflows.getWorkspaceBuilder.bind(workflows);
|
|
10003
10596
|
target.buildWorkspace = workflows.buildWorkspace.bind(workflows);
|
|
@@ -10062,6 +10655,9 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
|
|
|
10062
10655
|
target.getArchiveBlockers = phoneNumbers.getArchiveBlockers.bind(phoneNumbers);
|
|
10063
10656
|
target.archivePhoneNumber = phoneNumbers.archivePhoneNumber.bind(phoneNumbers);
|
|
10064
10657
|
target.getPhoneNumberCalls = phoneNumbers.getPhoneNumberCalls.bind(phoneNumbers);
|
|
10658
|
+
target.getPhoneNumberOutboundAnalyticsSummary = phoneNumbers.getPhoneNumberOutboundAnalyticsSummary.bind(phoneNumbers);
|
|
10659
|
+
target.getPhoneNumberOutboundAnalyticsCalls = phoneNumbers.getPhoneNumberOutboundAnalyticsCalls.bind(phoneNumbers);
|
|
10660
|
+
target.exportPhoneNumberOutboundAnalyticsCsv = phoneNumbers.exportPhoneNumberOutboundAnalyticsCsv.bind(phoneNumbers);
|
|
10065
10661
|
target.getPhoneNumberMessages = phoneNumbers.getPhoneNumberMessages.bind(phoneNumbers);
|
|
10066
10662
|
target.getPhoneNumberVoicemails = phoneNumbers.getPhoneNumberVoicemails.bind(phoneNumbers);
|
|
10067
10663
|
target.fetchVoicemailAudio = phoneNumbers.fetchVoicemailAudio.bind(phoneNumbers);
|
|
@@ -10191,6 +10787,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
10191
10787
|
target.getMondayBoardColumns = mondayIntegration.getBoardColumns.bind(mondayIntegration);
|
|
10192
10788
|
target.getMondayBoardGroups = mondayIntegration.getBoardGroups.bind(mondayIntegration);
|
|
10193
10789
|
target.getMondayCurrentUserInfo = mondayIntegration.getCurrentUserInfo.bind(mondayIntegration);
|
|
10790
|
+
target.installMondayConnection = mondayIntegration.installMondayConnection.bind(mondayIntegration);
|
|
10194
10791
|
target.configureMondayConnection = mondayIntegration.configureMondayConnection.bind(mondayIntegration);
|
|
10195
10792
|
target.getMondayConnectionStatus = mondayIntegration.getMondayConnectionStatus.bind(mondayIntegration);
|
|
10196
10793
|
target.authorizeMondayConnection = mondayIntegration.authorizeMondayConnection.bind(mondayIntegration);
|
|
@@ -10225,6 +10822,8 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
10225
10822
|
target.getDiscordBotAccounts = discordBots.getDiscordBotAccounts.bind(discordBots);
|
|
10226
10823
|
target.getMyCredentials = discordBots.getMyCredentials.bind(discordBots);
|
|
10227
10824
|
target.unlinkCredential = discordBots.unlinkCredential.bind(discordBots);
|
|
10825
|
+
target.completeDiscordLink = discordBots.completeDiscordLink.bind(discordBots);
|
|
10826
|
+
target.discordLinkPreflight = discordBots.discordLinkPreflight.bind(discordBots);
|
|
10228
10827
|
target.getSlackApps = slackApps.getSlackApps.bind(slackApps);
|
|
10229
10828
|
target.getSlackApp = slackApps.getSlackApp.bind(slackApps);
|
|
10230
10829
|
target.createSlackApp = slackApps.createSlackApp.bind(slackApps);
|
|
@@ -10297,6 +10896,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
10297
10896
|
target.deleteConfluence = confluence.deleteConfluence.bind(confluence);
|
|
10298
10897
|
target.listConfluenceSpaces = confluence.listConfluenceSpaces.bind(confluence);
|
|
10299
10898
|
target.listConfluencePages = confluence.listConfluencePages.bind(confluence);
|
|
10899
|
+
target.installSalesforce = salesforce.installSalesforce.bind(salesforce);
|
|
10300
10900
|
target.configureSalesforce = salesforce.configureSalesforce.bind(salesforce);
|
|
10301
10901
|
target.startSalesforceOAuth = salesforce.startSalesforceOAuth.bind(salesforce);
|
|
10302
10902
|
target.getSalesforceStatus = salesforce.getSalesforceStatus.bind(salesforce);
|
|
@@ -10314,6 +10914,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
10314
10914
|
target.describeSalesforceObject = salesforce.describeSalesforceObject.bind(salesforce);
|
|
10315
10915
|
target.searchSalesforceRecords = salesforce.searchSalesforceRecords.bind(salesforce);
|
|
10316
10916
|
target.importSalesforceMembers = salesforce.importSalesforceMembers.bind(salesforce);
|
|
10917
|
+
target.installHubspot = hubspot.installHubspot.bind(hubspot);
|
|
10317
10918
|
target.configureHubspot = hubspot.configureHubspot.bind(hubspot);
|
|
10318
10919
|
target.startHubspotOAuth = hubspot.startHubspotOAuth.bind(hubspot);
|
|
10319
10920
|
target.getHubspotStatus = hubspot.getHubspotStatus.bind(hubspot);
|
|
@@ -10482,6 +11083,7 @@ function bindCustomersMethods(target, customers) {
|
|
|
10482
11083
|
target.getMyCustomerAccounts = customers.getMyCustomerAccounts.bind(customers);
|
|
10483
11084
|
target.getMyCustomerSubscriptions = customers.getMyCustomerSubscriptions.bind(customers);
|
|
10484
11085
|
target.getMyCustomerInvoices = customers.getMyCustomerInvoices.bind(customers);
|
|
11086
|
+
target.createMyCustomerPortalSession = customers.createMyCustomerPortalSession.bind(customers);
|
|
10485
11087
|
target.updateMyCustomer = customers.updateMyCustomer.bind(customers);
|
|
10486
11088
|
target.createMyCustomerSetupIntent = customers.createMyCustomerSetupIntent.bind(customers);
|
|
10487
11089
|
target.getMyCustomerPaymentMethods = customers.getMyCustomerPaymentMethods.bind(customers);
|
|
@@ -10546,6 +11148,7 @@ var GravityRailClient = class {
|
|
|
10546
11148
|
createAbility;
|
|
10547
11149
|
updateAbility;
|
|
10548
11150
|
deleteAbility;
|
|
11151
|
+
getCharlestonTestDeliveryRecipients;
|
|
10549
11152
|
// Chats API
|
|
10550
11153
|
getChats;
|
|
10551
11154
|
getChat;
|
|
@@ -10563,6 +11166,8 @@ var GravityRailClient = class {
|
|
|
10563
11166
|
createWorkflowOutboundVoiceChat;
|
|
10564
11167
|
deleteChat;
|
|
10565
11168
|
updateChat;
|
|
11169
|
+
getChatModelOverride;
|
|
11170
|
+
updateChatModelOverride;
|
|
10566
11171
|
updateChatMute;
|
|
10567
11172
|
updateChatNeedsResponse;
|
|
10568
11173
|
summarizeChat;
|
|
@@ -10572,6 +11177,7 @@ var GravityRailClient = class {
|
|
|
10572
11177
|
initiateOutboundCall;
|
|
10573
11178
|
sendAssistantMessage;
|
|
10574
11179
|
rateMessage;
|
|
11180
|
+
getChatFeedback;
|
|
10575
11181
|
getChatAssignmentTasks;
|
|
10576
11182
|
createChatCompletion;
|
|
10577
11183
|
exportChats;
|
|
@@ -10597,6 +11203,7 @@ var GravityRailClient = class {
|
|
|
10597
11203
|
initiateCall;
|
|
10598
11204
|
getVoiceToken;
|
|
10599
11205
|
getMessageTiming;
|
|
11206
|
+
getRecordingInfo;
|
|
10600
11207
|
listChatRecordings;
|
|
10601
11208
|
getCallRecordingDownloadUrl;
|
|
10602
11209
|
getCelContext;
|
|
@@ -10622,6 +11229,12 @@ var GravityRailClient = class {
|
|
|
10622
11229
|
getFieldIndexStatus;
|
|
10623
11230
|
validateDataTypeSlug;
|
|
10624
11231
|
getMemberRecordCounts;
|
|
11232
|
+
getDataRecordFilters;
|
|
11233
|
+
getDataRecordFilter;
|
|
11234
|
+
createDataRecordFilter;
|
|
11235
|
+
updateDataRecordFilter;
|
|
11236
|
+
deleteDataRecordFilter;
|
|
11237
|
+
getDataRecordFilterCount;
|
|
10625
11238
|
// Members API
|
|
10626
11239
|
getCurrentMember;
|
|
10627
11240
|
getOwnedMembers;
|
|
@@ -10645,7 +11258,6 @@ var GravityRailClient = class {
|
|
|
10645
11258
|
getMemberFilter;
|
|
10646
11259
|
createMemberFilter;
|
|
10647
11260
|
updateMemberFilter;
|
|
10648
|
-
convertMemberFilterToQuery;
|
|
10649
11261
|
deleteMemberFilter;
|
|
10650
11262
|
getMemberFilterCount;
|
|
10651
11263
|
getMemberLabels;
|
|
@@ -10677,6 +11289,7 @@ var GravityRailClient = class {
|
|
|
10677
11289
|
expireAnonymousMember;
|
|
10678
11290
|
// Member Memories
|
|
10679
11291
|
getMemberMemories;
|
|
11292
|
+
getMemberMemory;
|
|
10680
11293
|
createMemberMemory;
|
|
10681
11294
|
deleteMemberMemory;
|
|
10682
11295
|
// Member Sync Links
|
|
@@ -10694,8 +11307,6 @@ var GravityRailClient = class {
|
|
|
10694
11307
|
deleteAgent;
|
|
10695
11308
|
archiveAgent;
|
|
10696
11309
|
unarchiveAgent;
|
|
10697
|
-
resolveAgentTools;
|
|
10698
|
-
listAgentAbilities;
|
|
10699
11310
|
// Qualifications API
|
|
10700
11311
|
getQualifications;
|
|
10701
11312
|
getQualification;
|
|
@@ -10721,6 +11332,16 @@ var GravityRailClient = class {
|
|
|
10721
11332
|
createPersona;
|
|
10722
11333
|
updatePersona;
|
|
10723
11334
|
deletePersona;
|
|
11335
|
+
// Dashboards API
|
|
11336
|
+
getDashboards;
|
|
11337
|
+
getDashboard;
|
|
11338
|
+
createDashboard;
|
|
11339
|
+
updateDashboard;
|
|
11340
|
+
deleteDashboard;
|
|
11341
|
+
getDashboardChannelStats;
|
|
11342
|
+
getDashboardWorkflowAssignmentStats;
|
|
11343
|
+
// MOTD API
|
|
11344
|
+
getMotd;
|
|
10724
11345
|
// Journeys API
|
|
10725
11346
|
getJourneys;
|
|
10726
11347
|
getJourney;
|
|
@@ -10788,6 +11409,7 @@ var GravityRailClient = class {
|
|
|
10788
11409
|
revokeAccessGrant;
|
|
10789
11410
|
getAccessGrants;
|
|
10790
11411
|
getMemberGrants;
|
|
11412
|
+
getGranteeGrants;
|
|
10791
11413
|
// Prompts API
|
|
10792
11414
|
inspectPrompt;
|
|
10793
11415
|
// Workspaces API
|
|
@@ -10837,6 +11459,10 @@ var GravityRailClient = class {
|
|
|
10837
11459
|
getUsageDashboard;
|
|
10838
11460
|
getWorkspaceEmailDomains;
|
|
10839
11461
|
getWorkspaceSiteDomains;
|
|
11462
|
+
getWorkspaceWidgetDomains;
|
|
11463
|
+
listWidgetDomains;
|
|
11464
|
+
upsertWidgetDomain;
|
|
11465
|
+
deleteWidgetDomain;
|
|
10840
11466
|
// Org API
|
|
10841
11467
|
listOrgDomains;
|
|
10842
11468
|
registerOrgDomain;
|
|
@@ -10877,6 +11503,7 @@ var GravityRailClient = class {
|
|
|
10877
11503
|
// Auth API
|
|
10878
11504
|
getUserAccount;
|
|
10879
11505
|
updateUserAccount;
|
|
11506
|
+
recordAcquisition;
|
|
10880
11507
|
login;
|
|
10881
11508
|
resendCode;
|
|
10882
11509
|
verifyCodeWith2FA;
|
|
@@ -10976,11 +11603,16 @@ var GravityRailClient = class {
|
|
|
10976
11603
|
// Files API
|
|
10977
11604
|
getFiles;
|
|
10978
11605
|
getFile;
|
|
11606
|
+
resolveFilePath;
|
|
10979
11607
|
downloadFilesZip;
|
|
10980
11608
|
createFile;
|
|
10981
11609
|
uploadFile;
|
|
10982
11610
|
updateFile;
|
|
10983
11611
|
deleteFile;
|
|
11612
|
+
listFileVersions;
|
|
11613
|
+
getFileVersionDiff;
|
|
11614
|
+
restoreFileVersion;
|
|
11615
|
+
getFileVersionContentsUrl;
|
|
10984
11616
|
convertFile;
|
|
10985
11617
|
generateFileUploadUrl;
|
|
10986
11618
|
getFolders;
|
|
@@ -11029,6 +11661,7 @@ var GravityRailClient = class {
|
|
|
11029
11661
|
getRoutineRuns;
|
|
11030
11662
|
resetRoutineRuns;
|
|
11031
11663
|
previewSchedule;
|
|
11664
|
+
previewRoutineWorkflowAccess;
|
|
11032
11665
|
// Workflows API
|
|
11033
11666
|
getWorkflows;
|
|
11034
11667
|
getWorkflow;
|
|
@@ -11053,18 +11686,18 @@ var GravityRailClient = class {
|
|
|
11053
11686
|
createWorkflowNote;
|
|
11054
11687
|
updateWorkflowNote;
|
|
11055
11688
|
deleteWorkflowNote;
|
|
11689
|
+
getWorkflowFeedback;
|
|
11056
11690
|
getWorkflowContributors;
|
|
11057
11691
|
createWorkflowContributor;
|
|
11058
11692
|
updateWorkflowContributor;
|
|
11059
11693
|
deleteWorkflowContributor;
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
diffWorkflowVersions;
|
|
11694
|
+
getWorkflowRevisions;
|
|
11695
|
+
getWorkflowRevision;
|
|
11696
|
+
publishWorkflowRevision;
|
|
11697
|
+
activateWorkflowRevision;
|
|
11698
|
+
updateWorkflowRevisionMetadata;
|
|
11699
|
+
diffWorkflowRevisions;
|
|
11700
|
+
editWorkflowRevisionAsDraft;
|
|
11068
11701
|
getWorkspaceBuilders;
|
|
11069
11702
|
getWorkspaceBuilder;
|
|
11070
11703
|
buildWorkspace;
|
|
@@ -11123,6 +11756,9 @@ var GravityRailClient = class {
|
|
|
11123
11756
|
getArchiveBlockers;
|
|
11124
11757
|
archivePhoneNumber;
|
|
11125
11758
|
getPhoneNumberCalls;
|
|
11759
|
+
getPhoneNumberOutboundAnalyticsSummary;
|
|
11760
|
+
getPhoneNumberOutboundAnalyticsCalls;
|
|
11761
|
+
exportPhoneNumberOutboundAnalyticsCsv;
|
|
11126
11762
|
getPhoneNumberMessages;
|
|
11127
11763
|
getPhoneNumberVoicemails;
|
|
11128
11764
|
fetchVoicemailAudio;
|
|
@@ -11241,6 +11877,7 @@ var GravityRailClient = class {
|
|
|
11241
11877
|
getMondayBoardGroups;
|
|
11242
11878
|
getMondayCurrentUserInfo;
|
|
11243
11879
|
// Monday.com Connection API
|
|
11880
|
+
installMondayConnection;
|
|
11244
11881
|
configureMondayConnection;
|
|
11245
11882
|
getMondayConnectionStatus;
|
|
11246
11883
|
authorizeMondayConnection;
|
|
@@ -11276,6 +11913,8 @@ var GravityRailClient = class {
|
|
|
11276
11913
|
getDiscordBotAccounts;
|
|
11277
11914
|
getMyCredentials;
|
|
11278
11915
|
unlinkCredential;
|
|
11916
|
+
completeDiscordLink;
|
|
11917
|
+
discordLinkPreflight;
|
|
11279
11918
|
// Slack Apps API
|
|
11280
11919
|
getSlackApps;
|
|
11281
11920
|
getSlackApp;
|
|
@@ -11354,6 +11993,7 @@ var GravityRailClient = class {
|
|
|
11354
11993
|
listConfluenceSpaces;
|
|
11355
11994
|
listConfluencePages;
|
|
11356
11995
|
// Salesforce API
|
|
11996
|
+
installSalesforce;
|
|
11357
11997
|
configureSalesforce;
|
|
11358
11998
|
startSalesforceOAuth;
|
|
11359
11999
|
getSalesforceStatus;
|
|
@@ -11372,6 +12012,7 @@ var GravityRailClient = class {
|
|
|
11372
12012
|
searchSalesforceRecords;
|
|
11373
12013
|
importSalesforceMembers;
|
|
11374
12014
|
// HubSpot API
|
|
12015
|
+
installHubspot;
|
|
11375
12016
|
configureHubspot;
|
|
11376
12017
|
startHubspotOAuth;
|
|
11377
12018
|
getHubspotStatus;
|
|
@@ -11429,6 +12070,7 @@ var GravityRailClient = class {
|
|
|
11429
12070
|
getMyCustomerAccounts;
|
|
11430
12071
|
getMyCustomerSubscriptions;
|
|
11431
12072
|
getMyCustomerInvoices;
|
|
12073
|
+
createMyCustomerPortalSession;
|
|
11432
12074
|
updateMyCustomer;
|
|
11433
12075
|
createMyCustomerSetupIntent;
|
|
11434
12076
|
getMyCustomerPaymentMethods;
|
|
@@ -11473,6 +12115,8 @@ var GravityRailClient = class {
|
|
|
11473
12115
|
bindQualificationsMethods(this, apis.qualifications);
|
|
11474
12116
|
bindPersonasMethods(this, apis.personas);
|
|
11475
12117
|
bindQueriesMethods(this, apis.queries);
|
|
12118
|
+
bindDashboardsMethods(this, apis.dashboards);
|
|
12119
|
+
bindMotdMethods(this, apis.motd);
|
|
11476
12120
|
bindJourneysMethods(this, apis.journeys);
|
|
11477
12121
|
bindExperimentsMethods(this, apis.experiments);
|
|
11478
12122
|
bindOperatorMethods(this, apis.operatorGroups);
|
|
@@ -11693,27 +12337,25 @@ var MemberFilterBuilder = class extends WorkspaceBuilderResource {
|
|
|
11693
12337
|
super();
|
|
11694
12338
|
this.name = name;
|
|
11695
12339
|
this.description = options.description ?? "";
|
|
12340
|
+
this.query = options.query ?? null;
|
|
11696
12341
|
}
|
|
11697
12342
|
name;
|
|
11698
12343
|
description;
|
|
11699
|
-
|
|
11700
|
-
|
|
11701
|
-
|
|
11702
|
-
|
|
11703
|
-
|
|
11704
|
-
...options.objectIds ? { objectIds: options.objectIds } : {},
|
|
11705
|
-
...options.query ? { query: options.query } : {}
|
|
11706
|
-
});
|
|
12344
|
+
/** Query-engine predicate (JSON IR) authored on MemberFilter.query. */
|
|
12345
|
+
query = null;
|
|
12346
|
+
/** Set the filter's query-engine predicate (JSON IR). */
|
|
12347
|
+
setQuery(query) {
|
|
12348
|
+
this.query = query;
|
|
11707
12349
|
return this;
|
|
11708
12350
|
}
|
|
11709
12351
|
planLine() {
|
|
11710
|
-
return `MemberFilter: ${this.name}${this.
|
|
12352
|
+
return `MemberFilter: ${this.name}${this.query ? " (query)" : ""}`;
|
|
11711
12353
|
}
|
|
11712
12354
|
async apply(client) {
|
|
11713
12355
|
const payload = {
|
|
11714
12356
|
name: this.name,
|
|
11715
12357
|
description: this.description,
|
|
11716
|
-
|
|
12358
|
+
query: this.query
|
|
11717
12359
|
};
|
|
11718
12360
|
const result = await client.createMemberFilter(payload);
|
|
11719
12361
|
this._id = result.id;
|
|
@@ -12140,11 +12782,6 @@ var RoleUpdate = class extends WorkspaceBuilderResource {
|
|
|
12140
12782
|
}
|
|
12141
12783
|
};
|
|
12142
12784
|
|
|
12143
|
-
// src/constants/models.ts
|
|
12144
|
-
var DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
|
|
12145
|
-
var DEFAULT_VOICE_INFERENCE_MODEL = "google:vertex:gemini-3-flash";
|
|
12146
|
-
var DEFAULT_CUSTOM_VOICE_MODEL = "elevenlabs:voice:river";
|
|
12147
|
-
|
|
12148
12785
|
// src/workspace-builder/workflows.ts
|
|
12149
12786
|
var PERM_KEYS = {
|
|
12150
12787
|
canRead: "canRead",
|
|
@@ -12242,8 +12879,13 @@ var TaskBuilder = class extends WorkspaceBuilderResource {
|
|
|
12242
12879
|
}
|
|
12243
12880
|
async apply(client) {
|
|
12244
12881
|
if (this._existed || this.workflow._id === void 0) return;
|
|
12882
|
+
if (this.workflow._draftRevisionId === void 0) {
|
|
12883
|
+
throw new Error(
|
|
12884
|
+
`Workflow '${this.workflow.name}' has no draft revision id; cannot create tasks. Tasks attach to a WorkflowRevision, not the stable workflow root.`
|
|
12885
|
+
);
|
|
12886
|
+
}
|
|
12245
12887
|
const result = await client.createTask({
|
|
12246
|
-
|
|
12888
|
+
workflowRevisionId: this.workflow._draftRevisionId,
|
|
12247
12889
|
name: this.name,
|
|
12248
12890
|
prompt: this.prompt,
|
|
12249
12891
|
description: this.description
|
|
@@ -12259,14 +12901,18 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
12259
12901
|
this.name = name;
|
|
12260
12902
|
this.description = options.description ?? "";
|
|
12261
12903
|
this.prompt = options.prompt;
|
|
12262
|
-
this.
|
|
12904
|
+
this.copyFromAgentId = options.copyFromAgentId;
|
|
12263
12905
|
}
|
|
12264
12906
|
name;
|
|
12265
12907
|
description;
|
|
12266
12908
|
prompt;
|
|
12267
|
-
|
|
12909
|
+
copyFromAgentId;
|
|
12268
12910
|
tasks = [];
|
|
12269
12911
|
abilities = [];
|
|
12912
|
+
/** The DRAFT revision's id — where tasks and graph edits attach.
|
|
12913
|
+
* `_id` is the STABLE workflow root id; the two are different entities
|
|
12914
|
+
* and (after any publish) different numbers. */
|
|
12915
|
+
_draftRevisionId;
|
|
12270
12916
|
task(name, options = {}) {
|
|
12271
12917
|
const task = new TaskBuilder(
|
|
12272
12918
|
name,
|
|
@@ -12289,10 +12935,14 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
12289
12935
|
return this.name;
|
|
12290
12936
|
}
|
|
12291
12937
|
adopt(existing) {
|
|
12292
|
-
|
|
12938
|
+
const root = existing.workflow ?? existing;
|
|
12939
|
+
super.adopt(root);
|
|
12940
|
+
const draft = existing.draftRevision;
|
|
12941
|
+
this._draftRevisionId = draft?.id ?? root.draftRevisionId;
|
|
12293
12942
|
const start = this.startTask;
|
|
12294
|
-
|
|
12295
|
-
|
|
12943
|
+
const startTaskId = draft?.startTaskId;
|
|
12944
|
+
if (start && startTaskId) {
|
|
12945
|
+
start._id = startTaskId;
|
|
12296
12946
|
start._existed = true;
|
|
12297
12947
|
}
|
|
12298
12948
|
}
|
|
@@ -12302,12 +12952,6 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
12302
12952
|
if (this.abilities.length) details.push(`${this.abilities.length} abilities`);
|
|
12303
12953
|
return `Workflow: ${this.name}${details.length ? ` (${details.join(", ")})` : ""}`;
|
|
12304
12954
|
}
|
|
12305
|
-
needsDefaultAgent() {
|
|
12306
|
-
return !this._existed && this.agentId === void 0;
|
|
12307
|
-
}
|
|
12308
|
-
setAgentId(agentId) {
|
|
12309
|
-
this.agentId = agentId;
|
|
12310
|
-
}
|
|
12311
12955
|
async apply(client) {
|
|
12312
12956
|
if (this._existed) return;
|
|
12313
12957
|
const payload = {
|
|
@@ -12315,63 +12959,16 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
12315
12959
|
description: this.description,
|
|
12316
12960
|
createMode: "taskless",
|
|
12317
12961
|
...this.prompt ? { prompt: this.prompt } : {},
|
|
12318
|
-
...this.
|
|
12962
|
+
...this.copyFromAgentId ? { copyFromAgentId: this.copyFromAgentId } : {},
|
|
12319
12963
|
...this.abilities.length ? { abilities: this.abilities.map((ability) => ability.toAbility()) } : {}
|
|
12320
12964
|
};
|
|
12321
12965
|
const result = await client.createWorkflow(payload);
|
|
12322
|
-
this._id = result.id;
|
|
12323
|
-
this._uuid = result.uuid;
|
|
12966
|
+
this._id = result.workflow.id;
|
|
12967
|
+
this._uuid = result.workflow.uuid;
|
|
12968
|
+
this._draftRevisionId = result.draftRevision.id;
|
|
12324
12969
|
this._created = true;
|
|
12325
12970
|
}
|
|
12326
12971
|
};
|
|
12327
|
-
var WORKSPACE_BUILDER_DEFAULT_AGENT_NAME = "Workspace Setup Agent";
|
|
12328
|
-
var WORKSPACE_BUILDER_DEFAULT_AGENT_PROMPT = "You help workspace members complete the workflow you are assigned to. Follow the task prompts, collect requested information accurately, and escalate when the workflow asks you to.";
|
|
12329
|
-
async function getOrCreateDefaultWorkflowAgent(client) {
|
|
12330
|
-
const existingAgents = recordsFromResponse(
|
|
12331
|
-
await client.getAgents({ pageSize: 100, includeArchived: false })
|
|
12332
|
-
);
|
|
12333
|
-
const existing = existingAgents.find((agent) => !agent.isArchived) ?? existingAgents[0];
|
|
12334
|
-
if (existing) {
|
|
12335
|
-
return {
|
|
12336
|
-
id: numberField(existing, "id"),
|
|
12337
|
-
name: stringField(existing, "name"),
|
|
12338
|
-
created: false
|
|
12339
|
-
};
|
|
12340
|
-
}
|
|
12341
|
-
const roles = recordsFromResponse(await client.getMemberRoles());
|
|
12342
|
-
const role = roles.find((candidate) => stringField(candidate, "name").toLowerCase() === "agent") ?? roles[0];
|
|
12343
|
-
if (!role) {
|
|
12344
|
-
throw new Error("Cannot create default workflow agent: workspace has no member roles");
|
|
12345
|
-
}
|
|
12346
|
-
const payload = {
|
|
12347
|
-
name: WORKSPACE_BUILDER_DEFAULT_AGENT_NAME,
|
|
12348
|
-
memberRoleId: numberField(role, "id"),
|
|
12349
|
-
chatModelId: DEFAULT_CHAT_MODEL,
|
|
12350
|
-
systemPrompt: WORKSPACE_BUILDER_DEFAULT_AGENT_PROMPT
|
|
12351
|
-
};
|
|
12352
|
-
const created = await client.createAgent(payload);
|
|
12353
|
-
return {
|
|
12354
|
-
id: created.id,
|
|
12355
|
-
name: created.name ?? WORKSPACE_BUILDER_DEFAULT_AGENT_NAME,
|
|
12356
|
-
created: true
|
|
12357
|
-
};
|
|
12358
|
-
}
|
|
12359
|
-
function recordsFromResponse(value) {
|
|
12360
|
-
if (Array.isArray(value)) return value;
|
|
12361
|
-
if (value && typeof value === "object" && Array.isArray(value.items)) {
|
|
12362
|
-
return value.items;
|
|
12363
|
-
}
|
|
12364
|
-
return [];
|
|
12365
|
-
}
|
|
12366
|
-
function numberField(record, key) {
|
|
12367
|
-
const value = record[key];
|
|
12368
|
-
if (typeof value !== "number") throw new Error(`Expected numeric ${key}`);
|
|
12369
|
-
return value;
|
|
12370
|
-
}
|
|
12371
|
-
function stringField(record, key) {
|
|
12372
|
-
const value = record[key];
|
|
12373
|
-
return typeof value === "string" ? value : "";
|
|
12374
|
-
}
|
|
12375
12972
|
var AgentBuilder = class extends WorkspaceBuilderResource {
|
|
12376
12973
|
constructor(name, options = {}) {
|
|
12377
12974
|
super();
|
|
@@ -12538,7 +13135,6 @@ ${"=".repeat(50)}`);
|
|
|
12538
13135
|
await this.resolveExisting(resources);
|
|
12539
13136
|
const summary = {};
|
|
12540
13137
|
writeLine("Applying...");
|
|
12541
|
-
await this.ensureWorkflowAgents(resources, summary);
|
|
12542
13138
|
for (const resource of resources) {
|
|
12543
13139
|
try {
|
|
12544
13140
|
if (resource._existed) {
|
|
@@ -12599,9 +13195,11 @@ Done! Created ${count} resources.`);
|
|
|
12599
13195
|
}
|
|
12600
13196
|
}
|
|
12601
13197
|
if (!workflowNames.size) return;
|
|
12602
|
-
|
|
13198
|
+
const existingWorkflows = await this.client.getWorkflows();
|
|
13199
|
+
for (const { workflow: existing } of existingWorkflows.items) {
|
|
12603
13200
|
if (existing.name && workflowNames.has(existing.name)) {
|
|
12604
|
-
|
|
13201
|
+
const detail = await this.client.getWorkflow(existing.id);
|
|
13202
|
+
workflowNames.get(existing.name).adopt(detail);
|
|
12605
13203
|
}
|
|
12606
13204
|
}
|
|
12607
13205
|
const adoptedWorkflows = resources.filter(
|
|
@@ -12610,7 +13208,9 @@ Done! Created ${count} resources.`);
|
|
|
12610
13208
|
if (!adoptedWorkflows.length) return;
|
|
12611
13209
|
const existingTasks = await this.client.getTasks();
|
|
12612
13210
|
for (const workflow of adoptedWorkflows) {
|
|
12613
|
-
const workflowTasks = existingTasks.filter(
|
|
13211
|
+
const workflowTasks = existingTasks.filter(
|
|
13212
|
+
(task) => (task.workflowRevisionId ?? task.workflowId) === workflow._draftRevisionId
|
|
13213
|
+
);
|
|
12614
13214
|
const taskByName = new Map(workflowTasks.map((task) => [task.name, task]));
|
|
12615
13215
|
for (const taskBuilder of workflow.tasks) {
|
|
12616
13216
|
const match = taskByName.get(taskBuilder.name);
|
|
@@ -12632,21 +13232,6 @@ Done! Created ${count} resources.`);
|
|
|
12632
13232
|
}
|
|
12633
13233
|
}
|
|
12634
13234
|
}
|
|
12635
|
-
async ensureWorkflowAgents(resources, summary) {
|
|
12636
|
-
const workflows = resources.filter(
|
|
12637
|
-
(resource) => resource instanceof WorkflowBuilder && resource.needsDefaultAgent()
|
|
12638
|
-
);
|
|
12639
|
-
if (!workflows.length) return;
|
|
12640
|
-
const agent = await getOrCreateDefaultWorkflowAgent(this.client);
|
|
12641
|
-
for (const workflow of workflows) workflow.setAgentId(agent.id);
|
|
12642
|
-
if (agent.created) {
|
|
12643
|
-
summary.agents ??= [];
|
|
12644
|
-
summary.agents.push(agent.id);
|
|
12645
|
-
writeLine(` Created Agent: ${agent.name} -> id=${agent.id}`);
|
|
12646
|
-
} else {
|
|
12647
|
-
writeLine(` Using Agent: ${agent.name || agent.id} -> id=${agent.id}`);
|
|
12648
|
-
}
|
|
12649
|
-
}
|
|
12650
13235
|
sortedResources() {
|
|
12651
13236
|
const all = [];
|
|
12652
13237
|
for (const resource of this.resources) {
|
|
@@ -12851,7 +13436,7 @@ var SEARCHABLE_EVENT_RULE_SOURCE_FIELDS = [
|
|
|
12851
13436
|
"taskId",
|
|
12852
13437
|
"dataTypeId",
|
|
12853
13438
|
"routineId",
|
|
12854
|
-
"
|
|
13439
|
+
"workflowRevisionId",
|
|
12855
13440
|
"journeyStepId"
|
|
12856
13441
|
];
|
|
12857
13442
|
var EVENT_RULE_SOURCE_FIELDS = [
|
|
@@ -13102,6 +13687,10 @@ var SMS_DELIVERY_FAILURE_STATUSES = /* @__PURE__ */ new Set([
|
|
|
13102
13687
|
function isSMSDeliveryFailureStatus(status) {
|
|
13103
13688
|
return status != null && SMS_DELIVERY_FAILURE_STATUSES.has(status);
|
|
13104
13689
|
}
|
|
13690
|
+
var POSITIVE_RATING_THRESHOLD = 0.5;
|
|
13691
|
+
function isPositiveRating(rating) {
|
|
13692
|
+
return rating != null && rating >= POSITIVE_RATING_THRESHOLD;
|
|
13693
|
+
}
|
|
13105
13694
|
|
|
13106
13695
|
// src/types/generated/organization.ts
|
|
13107
13696
|
var BusinessIndustry = {
|
|
@@ -13204,6 +13793,7 @@ var AbilityConfigIssueCode = {
|
|
|
13204
13793
|
missing_resource: "missing_resource",
|
|
13205
13794
|
invalid_state: "invalid_state",
|
|
13206
13795
|
feature_disabled: "feature_disabled",
|
|
13796
|
+
missing_connection: "missing_connection",
|
|
13207
13797
|
external_drift: "external_drift"
|
|
13208
13798
|
};
|
|
13209
13799
|
var AbilityConfigIssueSeverity = {
|
|
@@ -13217,6 +13807,9 @@ var WorkflowAccessWarningResourceType = {
|
|
|
13217
13807
|
calendar: "calendar"
|
|
13218
13808
|
};
|
|
13219
13809
|
|
|
13810
|
+
// src/types/widget-domain-types.ts
|
|
13811
|
+
var WIDGET_SLUGS = ["chat", "operator", "operator-tools", "chat-app"];
|
|
13812
|
+
|
|
13220
13813
|
// src/features/registry.ts
|
|
13221
13814
|
var FeatureCategory = /* @__PURE__ */ ((FeatureCategory2) => {
|
|
13222
13815
|
FeatureCategory2["COMMUNICATION"] = "communication";
|
|
@@ -13340,6 +13933,11 @@ function isChatType(value) {
|
|
|
13340
13933
|
return Object.values(CHAT_TYPES).includes(value);
|
|
13341
13934
|
}
|
|
13342
13935
|
|
|
13936
|
+
// src/constants/models.ts
|
|
13937
|
+
var DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
|
|
13938
|
+
var DEFAULT_VOICE_INFERENCE_MODEL = "google:vertex:gemini-3-flash";
|
|
13939
|
+
var DEFAULT_CUSTOM_VOICE_MODEL = "elevenlabs:voice:river";
|
|
13940
|
+
|
|
13343
13941
|
// src/types/resource-metadata.ts
|
|
13344
13942
|
var RESOURCE_METADATA = {
|
|
13345
13943
|
["credit" /* CREDIT */]: {
|
|
@@ -14119,6 +14717,19 @@ var SCOPE_PRESETS = {
|
|
|
14119
14717
|
/** Full access - all available scopes */
|
|
14120
14718
|
ALL: Object.keys(SCOPES)
|
|
14121
14719
|
};
|
|
14720
|
+
|
|
14721
|
+
// src/utils/revision-state.ts
|
|
14722
|
+
function getRevisionState(workflow, revision) {
|
|
14723
|
+
const draftIsLive = workflow.activeRevisionId === workflow.draftRevisionId;
|
|
14724
|
+
const hasUnpublishedChanges = workflow.draftModifiedAt != null;
|
|
14725
|
+
return {
|
|
14726
|
+
isActive: revision != null && revision.id === workflow.activeRevisionId,
|
|
14727
|
+
isDraft: revision != null && revision.id === workflow.draftRevisionId,
|
|
14728
|
+
draftIsLive,
|
|
14729
|
+
hasUnpublishedChanges,
|
|
14730
|
+
state: revision?.publishedAt != null ? "published" : "draft"
|
|
14731
|
+
};
|
|
14732
|
+
}
|
|
14122
14733
|
// Annotate the CommonJS export names for ESM import in node:
|
|
14123
14734
|
0 && (module.exports = {
|
|
14124
14735
|
AbilityConfigIssueCode,
|
|
@@ -14147,6 +14758,7 @@ var SCOPE_PRESETS = {
|
|
|
14147
14758
|
CalendarScheduleAvailabilityType,
|
|
14148
14759
|
CalendarScheduleRecurrence,
|
|
14149
14760
|
CalendarSource,
|
|
14761
|
+
CapabilityClass,
|
|
14150
14762
|
ConsentMethod,
|
|
14151
14763
|
CriterionType,
|
|
14152
14764
|
DEFAULT_CHAT_MODEL,
|
|
@@ -14206,6 +14818,7 @@ var SCOPE_PRESETS = {
|
|
|
14206
14818
|
PERMISSION_VERIFY,
|
|
14207
14819
|
PIDS_DISPOSITIONS,
|
|
14208
14820
|
PIDS_SOURCES,
|
|
14821
|
+
POSITIVE_RATING_THRESHOLD,
|
|
14209
14822
|
ProductType,
|
|
14210
14823
|
QUERY_VALUELESS_OPS,
|
|
14211
14824
|
QueriesApi,
|
|
@@ -14242,6 +14855,7 @@ var SCOPE_PRESETS = {
|
|
|
14242
14855
|
TaskBuilder,
|
|
14243
14856
|
TemplatesApi,
|
|
14244
14857
|
ToolkitState,
|
|
14858
|
+
WIDGET_SLUGS,
|
|
14245
14859
|
WorkflowAccessWarningResourceType,
|
|
14246
14860
|
WorkflowBuilder,
|
|
14247
14861
|
WorkflowResourceType,
|
|
@@ -14267,12 +14881,14 @@ var SCOPE_PRESETS = {
|
|
|
14267
14881
|
getFeaturesByVisibility,
|
|
14268
14882
|
getMissingDependencies,
|
|
14269
14883
|
getResourceMetadata,
|
|
14884
|
+
getRevisionState,
|
|
14270
14885
|
getScopeFromProductType,
|
|
14271
14886
|
getTTSProvider,
|
|
14272
14887
|
getVoiceModelId,
|
|
14273
14888
|
initializeFeatures,
|
|
14274
14889
|
isChatType,
|
|
14275
14890
|
isFeatureAvailable,
|
|
14891
|
+
isPositiveRating,
|
|
14276
14892
|
isRegistryInitialized,
|
|
14277
14893
|
isSMSDeliveryFailureStatus,
|
|
14278
14894
|
requiresAssistantParticipant,
|