@gravity-rail/sdk 4.0.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/account-CSJJbLIj.d.cts +459 -0
- package/dist/account-CSJJbLIj.d.ts +459 -0
- package/dist/{path-CUY-Iw70.d.ts → agent_standing_job-CqKpMoHO.d.cts} +1068 -140
- package/dist/{path-B3b3_El9.d.cts → agent_standing_job-yehTe972.d.ts} +1068 -140
- package/dist/{chat-interaction-DXgKjFqZ.d.cts → chat-interaction-BtUtVszg.d.ts} +13512 -9340
- package/dist/{chat-interaction-a7U-tHfQ.d.ts → chat-interaction-CAfwlYvv.d.cts} +13512 -9340
- package/dist/{chunk-WHRIIBJ4.js → chunk-L4XC6KDG.js} +1773 -475
- package/dist/chunk-L4XC6KDG.js.map +1 -0
- package/dist/{chunk-D5VNVTUQ.js → chunk-P2MSMMMJ.js} +120 -2
- package/dist/chunk-P2MSMMMJ.js.map +1 -0
- package/dist/{chunk-ZLF3N3ZD.js → chunk-P2X5TOYY.js} +31 -5
- package/dist/chunk-P2X5TOYY.js.map +1 -0
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +3 -2
- package/dist/helpers.d.ts +3 -2
- package/dist/helpers.js +1 -1
- package/dist/index.cjs +1961 -917
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -249
- package/dist/index.d.ts +87 -249
- package/dist/index.js +171 -458
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +1928 -448
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +2428 -263
- package/dist/internal.d.ts +2428 -263
- package/dist/internal.js +146 -27
- package/dist/internal.js.map +1 -1
- package/dist/{member-import-VOLKR5dY.d.ts → member-import-C5nnoGvW.d.ts} +1 -1
- package/dist/{member-import-BHtOru8g.d.cts → member-import-DhaNVT7s.d.cts} +1 -1
- package/dist/realtime.cjs +250 -3
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +87 -4
- package/dist/realtime.d.ts +87 -4
- package/dist/realtime.js +245 -3
- package/dist/realtime.js.map +1 -1
- package/dist/schemas.cjs +154 -19
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +624 -72
- package/dist/schemas.d.ts +624 -72
- package/dist/schemas.js +72 -21
- package/dist/schemas.js.map +1 -1
- package/dist/{tasks-CgptqCsN.d.cts → tasks-A12E_RLa.d.cts} +2243 -1979
- package/dist/{tasks-CgptqCsN.d.ts → tasks-DrmyOlRh.d.ts} +2243 -1979
- package/dist/{types-BXaWYGHj.d.cts → types-Bv6GtLZ2.d.cts} +25 -2
- package/dist/{types-BXaWYGHj.d.ts → types-Bv6GtLZ2.d.ts} +25 -2
- package/package.json +4 -4
- package/dist/chunk-D5VNVTUQ.js.map +0 -1
- package/dist/chunk-WHRIIBJ4.js.map +0 -1
- package/dist/chunk-ZLF3N3ZD.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApiError,
|
|
3
3
|
BaseApiClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-P2X5TOYY.js";
|
|
5
5
|
|
|
6
6
|
// src/api/abilities.ts
|
|
7
7
|
var AbilitiesApi = class extends BaseApiClient {
|
|
@@ -174,6 +174,19 @@ var BundlesApi = class extends BaseApiClient {
|
|
|
174
174
|
async listBundleWorkflowCandidates(wid) {
|
|
175
175
|
return this.fetch(bundlesPath(wid, "workflow-candidates"));
|
|
176
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* The Bundles of this workspace that hold a Workflow, and what of the
|
|
179
|
+
* Workflow's draft a Bundle cannot carry (`issues`, `problems`: the check a
|
|
180
|
+
* Bundle runs when it adds or publishes the Workflow, run on its draft for
|
|
181
|
+
* the acting Member). A Bundle's draft is listed only for
|
|
182
|
+
* `workflows:admin`. Requires `workflows:read` and read access to the
|
|
183
|
+
* Workflow; 404 otherwise.
|
|
184
|
+
*/
|
|
185
|
+
async getWorkflowBundleMembership(wid, workflowUuid) {
|
|
186
|
+
return this.fetch(
|
|
187
|
+
bundlesPath(wid, "workflow-membership", workflowUuid)
|
|
188
|
+
);
|
|
189
|
+
}
|
|
177
190
|
/**
|
|
178
191
|
* This workspace's Journeys for the Bundle picker, by name. Nothing is built
|
|
179
192
|
* for the list. `available` is false while the server refuses Journey items.
|
|
@@ -184,11 +197,11 @@ var BundlesApi = class extends BaseApiClient {
|
|
|
184
197
|
}
|
|
185
198
|
/**
|
|
186
199
|
* One Journey as the Bundle item that adds it: the whole Journey item the
|
|
187
|
-
* server built (`item`), the Forms
|
|
200
|
+
* server built (`item`) with who enters it, the Forms it reads, the saved
|
|
201
|
+
* Member filters its conditions use (`filters`) and the Workflows its
|
|
188
202
|
* actions start, or the `problems` that name what the Journey must change
|
|
189
|
-
* first.
|
|
190
|
-
*
|
|
191
|
-
* `workflows:admin` and `journeys:write`.
|
|
203
|
+
* first. Requires `workflows:admin` and `journeys:write`; listing a saved
|
|
204
|
+
* filter also takes `members:read`.
|
|
192
205
|
*/
|
|
193
206
|
async getBundleJourneyCandidate(wid, journeyUuid) {
|
|
194
207
|
return this.fetch(
|
|
@@ -222,7 +235,28 @@ var BundlesApi = class extends BaseApiClient {
|
|
|
222
235
|
body: JSON.stringify(data)
|
|
223
236
|
});
|
|
224
237
|
}
|
|
225
|
-
/**
|
|
238
|
+
/**
|
|
239
|
+
* What publishing the saved draft now would put in the next version: each
|
|
240
|
+
* draft item as `ready`, `held` (stays as the last published version had
|
|
241
|
+
* it) or `blocked`, with a closed `reason`; how each differs
|
|
242
|
+
* from the last published version, a Workflow's revision before and after;
|
|
243
|
+
* and the `planToken` to pass as `expectedPlan` on publish. 409 when
|
|
244
|
+
* `expectedGeneration` is stale. Requires `workflows:admin`.
|
|
245
|
+
*/
|
|
246
|
+
async getBundlePublishPreview(wid, bundleUuid, expectedGeneration) {
|
|
247
|
+
const query2 = new URLSearchParams({ expectedGeneration: String(expectedGeneration) });
|
|
248
|
+
return this.fetch(
|
|
249
|
+
`${bundlesPath(wid, bundleUuid, "publish-preview")}?${query2.toString()}`
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Cut a new immutable version from the draft: every Workflow's newest
|
|
254
|
+
* published revision and every other item as its source is now. 409 when
|
|
255
|
+
* `expectedGeneration` is stale, when `expectedPlan` no longer matches the
|
|
256
|
+
* preview (`bundle_publish_plan_changed`), or when the version would carry
|
|
257
|
+
* exactly what the last one carries, with no example scenarios on either
|
|
258
|
+
* (`bundle_version_unchanged`).
|
|
259
|
+
*/
|
|
226
260
|
async publishBundle(wid, bundleUuid, data) {
|
|
227
261
|
return this.fetch(bundlesPath(wid, bundleUuid, "publish"), {
|
|
228
262
|
method: "POST",
|
|
@@ -308,10 +342,15 @@ var InstallationsApi = class extends BaseApiClient {
|
|
|
308
342
|
* Open slots, bindings whose target no longer resolves, Forms that drifted
|
|
309
343
|
* from their recipe, missing or changed Workflow dependencies, and archived
|
|
310
344
|
* items. Computed on read, never stored.
|
|
345
|
+
*
|
|
346
|
+
* With `verifyProvider`, also reads each linked number's live callbacks from
|
|
347
|
+
* the phone provider, bounded and read-only; this needs `phones:read` too. A
|
|
348
|
+
* failed provider read comes back `unverified`, never `configured`.
|
|
311
349
|
*/
|
|
312
|
-
async getInstallationReadiness(wid, installationUuid) {
|
|
350
|
+
async getInstallationReadiness(wid, installationUuid, options = {}) {
|
|
351
|
+
const path = installationsPath(wid, installationUuid, "readiness");
|
|
313
352
|
return this.fetch(
|
|
314
|
-
|
|
353
|
+
options.verifyProvider ? `${path}?verifyProvider=true` : path
|
|
315
354
|
);
|
|
316
355
|
}
|
|
317
356
|
/**
|
|
@@ -366,7 +405,23 @@ var InstallationsApi = class extends BaseApiClient {
|
|
|
366
405
|
{ method: "POST", body: JSON.stringify({}) }
|
|
367
406
|
);
|
|
368
407
|
}
|
|
369
|
-
/**
|
|
408
|
+
/**
|
|
409
|
+
* The installation's per-workspace Ability settings and their values. A value
|
|
410
|
+
* is returned only from an installed Workflow the caller may read the
|
|
411
|
+
* Abilities of (`agents:read` and Workflow use); otherwise it is `null`.
|
|
412
|
+
*/
|
|
413
|
+
async getInstallationAbilitySettings(wid, installationUuid) {
|
|
414
|
+
return this.fetch(
|
|
415
|
+
installationsPath(wid, installationUuid, "ability-settings")
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Fill open slots. A slot that already carries a target is refused with 409,
|
|
420
|
+
* except one sent with `replace: true` that is a local setting of the
|
|
421
|
+
* installation: a per-workspace Ability setting or a shared install field,
|
|
422
|
+
* whose new value replaces the held one on every setting it fills, a
|
|
423
|
+
* Workflow's Inbox or phone number, a recording, or a routing endpoint.
|
|
424
|
+
*/
|
|
370
425
|
async bindInstallationSlots(wid, installationUuid, data) {
|
|
371
426
|
return this.fetch(
|
|
372
427
|
installationsPath(wid, installationUuid, "bindings"),
|
|
@@ -520,6 +575,27 @@ var AgentTasksApi = class extends BaseApiClient {
|
|
|
520
575
|
|
|
521
576
|
// src/api/agents.ts
|
|
522
577
|
var AgentsApi = class extends BaseApiClient {
|
|
578
|
+
orgAgentJobsPath(orgUuid, agentUuid) {
|
|
579
|
+
return `o/${encodeURIComponent(orgUuid)}/agents/${encodeURIComponent(agentUuid)}/jobs`;
|
|
580
|
+
}
|
|
581
|
+
/** List the current organization's teammate's operational Agent Jobs. */
|
|
582
|
+
async getOrgAgentJobs(orgUuid, agentUuid, options = {}) {
|
|
583
|
+
const params = new URLSearchParams();
|
|
584
|
+
if (options.before) params.set("before", options.before);
|
|
585
|
+
if (options.limit !== void 0) params.set("limit", String(options.limit));
|
|
586
|
+
if (options.status) params.set("status", options.status);
|
|
587
|
+
const search = params.toString();
|
|
588
|
+
return this.fetch(
|
|
589
|
+
`${this.orgAgentJobsPath(orgUuid, agentUuid)}${search ? `?${search}` : ""}`
|
|
590
|
+
);
|
|
591
|
+
}
|
|
592
|
+
/** Stop one of the current teammate's Jobs and its active descendants. */
|
|
593
|
+
async stopOrgAgentJob(orgUuid, agentUuid, jobUuid) {
|
|
594
|
+
return this.fetch(
|
|
595
|
+
`${this.orgAgentJobsPath(orgUuid, agentUuid)}/${encodeURIComponent(jobUuid)}/stop`,
|
|
596
|
+
{ method: "POST", body: JSON.stringify({}) }
|
|
597
|
+
);
|
|
598
|
+
}
|
|
523
599
|
/** List agents in a workspace with optional pagination, sorting, and search. */
|
|
524
600
|
async getAgents(wid, options = {}) {
|
|
525
601
|
const params = new URLSearchParams();
|
|
@@ -951,6 +1027,19 @@ var AuthApi = class extends BaseApiClient {
|
|
|
951
1027
|
body: JSON.stringify(info)
|
|
952
1028
|
});
|
|
953
1029
|
}
|
|
1030
|
+
/**
|
|
1031
|
+
* Set the account's face: an icon, a colour, or an uploaded image.
|
|
1032
|
+
*
|
|
1033
|
+
* Only the fields sent are applied, so a picker can change the colour
|
|
1034
|
+
* without touching the icon. Sending `icon` or `color` clears an uploaded
|
|
1035
|
+
* image; sending an image clears the explicit pick.
|
|
1036
|
+
*/
|
|
1037
|
+
async updateMemberAvatar(request) {
|
|
1038
|
+
return this.fetch("account/avatar", {
|
|
1039
|
+
method: "PUT",
|
|
1040
|
+
body: JSON.stringify(request)
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
954
1043
|
/**
|
|
955
1044
|
* Persist the account's FIRST-touch marketing attribution (write-once).
|
|
956
1045
|
*
|
|
@@ -1522,7 +1611,9 @@ var CalendarsApi = class extends BaseApiClient {
|
|
|
1522
1611
|
body: JSON.stringify({ cancellationReason: reason })
|
|
1523
1612
|
});
|
|
1524
1613
|
}
|
|
1525
|
-
/** Delete
|
|
1614
|
+
/** Delete the local event. Native Google bookings return PENDING or FAILED
|
|
1615
|
+
* until provider removal is confirmed. Null is not a provider-removal receipt.
|
|
1616
|
+
*/
|
|
1526
1617
|
async deleteCalendarEvent(wid, eventId) {
|
|
1527
1618
|
return this.fetch(`w/${wid}/calendar-events/${eventId}`, {
|
|
1528
1619
|
method: "DELETE"
|
|
@@ -1710,8 +1801,61 @@ var CELApi = class extends BaseApiClient {
|
|
|
1710
1801
|
}
|
|
1711
1802
|
};
|
|
1712
1803
|
|
|
1804
|
+
// src/api/chat.ts
|
|
1805
|
+
var ChatApi = class {
|
|
1806
|
+
constructor(scope, request) {
|
|
1807
|
+
this.request = request;
|
|
1808
|
+
this.base = `w/${encodeURIComponent(scope.scopeUuid)}/chats`;
|
|
1809
|
+
this.testMemberId = scope.testMemberId;
|
|
1810
|
+
}
|
|
1811
|
+
request;
|
|
1812
|
+
base;
|
|
1813
|
+
testMemberId;
|
|
1814
|
+
path(chat, suffix2 = "", params = new URLSearchParams()) {
|
|
1815
|
+
if (this.testMemberId !== void 0) params.set("test_member_id", String(this.testMemberId));
|
|
1816
|
+
return `${this.base}${chat === void 0 ? "" : `/${encodeURIComponent(chat)}`}${suffix2}${params.size ? `?${params}` : ""}`;
|
|
1817
|
+
}
|
|
1818
|
+
snapshot(chat, options = {}) {
|
|
1819
|
+
const params = new URLSearchParams();
|
|
1820
|
+
if (options.before !== void 0) params.set("before", String(options.before));
|
|
1821
|
+
if (options.cursor) params.set("cursor", options.cursor);
|
|
1822
|
+
return this.request(this.path(chat, "/snapshot", params), {
|
|
1823
|
+
cache: "no-store",
|
|
1824
|
+
signal: options.signal
|
|
1825
|
+
});
|
|
1826
|
+
}
|
|
1827
|
+
create(body) {
|
|
1828
|
+
return this.request(this.path(), { method: "POST", body: JSON.stringify(body) });
|
|
1829
|
+
}
|
|
1830
|
+
send(chat, body) {
|
|
1831
|
+
return this.request(this.path(chat, "/input"), {
|
|
1832
|
+
method: "POST",
|
|
1833
|
+
body: JSON.stringify(body)
|
|
1834
|
+
});
|
|
1835
|
+
}
|
|
1836
|
+
respond(chat, body) {
|
|
1837
|
+
return this.request(this.path(chat, "/responses"), {
|
|
1838
|
+
method: "POST",
|
|
1839
|
+
body: JSON.stringify(body)
|
|
1840
|
+
});
|
|
1841
|
+
}
|
|
1842
|
+
stop(chat, body) {
|
|
1843
|
+
return this.request(this.path(chat, "/stop"), {
|
|
1844
|
+
method: "POST",
|
|
1845
|
+
body: JSON.stringify(body)
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
};
|
|
1849
|
+
|
|
1713
1850
|
// src/api/chats.ts
|
|
1714
1851
|
var ChatsApi = class extends BaseApiClient {
|
|
1852
|
+
/** Bind the Chat lifecycle API to its authority base once. */
|
|
1853
|
+
chat(scope) {
|
|
1854
|
+
return new ChatApi(
|
|
1855
|
+
scope,
|
|
1856
|
+
(path, options) => this.fetch(path, options)
|
|
1857
|
+
);
|
|
1858
|
+
}
|
|
1715
1859
|
/**
|
|
1716
1860
|
* Build URLSearchParams from GetChatsOptions.
|
|
1717
1861
|
* Excludes pagination params when includePagination is false.
|
|
@@ -1770,10 +1914,31 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1770
1914
|
return response.blob();
|
|
1771
1915
|
}
|
|
1772
1916
|
/** Export a single chat in the specified format as a downloadable blob. */
|
|
1773
|
-
async exportChat(wid, chatId, format = "jsonl") {
|
|
1774
|
-
const
|
|
1917
|
+
async exportChat(wid, chatId, format = "jsonl", options) {
|
|
1918
|
+
const params = new URLSearchParams({ format });
|
|
1919
|
+
if (options?.includeStaffNotes) params.append("includeStaffNotes", "true");
|
|
1920
|
+
const response = await this.fetchRaw(`w/${wid}/chats/${chatId}/export?${params.toString()}`);
|
|
1775
1921
|
return response.blob();
|
|
1776
1922
|
}
|
|
1923
|
+
/** Staff notes on a chat, oldest first (the newest `limit`). Requires
|
|
1924
|
+
* access to the chat and `chats:admin`. Notes are never delivered. */
|
|
1925
|
+
async listChatStaffNotes(wid, chatId, options) {
|
|
1926
|
+
const params = new URLSearchParams();
|
|
1927
|
+
if (options?.limit) params.append("limit", options.limit.toString());
|
|
1928
|
+
if (options?.before) params.append("before", options.before);
|
|
1929
|
+
const query2 = params.toString();
|
|
1930
|
+
return this.fetch(
|
|
1931
|
+
`w/${wid}/chats/${chatId}/notes${query2 ? `?${query2}` : ""}`
|
|
1932
|
+
);
|
|
1933
|
+
}
|
|
1934
|
+
/** Write a staff note on a chat. Append-only; nothing is sent to anyone,
|
|
1935
|
+
* and no Agent turn starts. Requires access to the chat and `chats:admin`. */
|
|
1936
|
+
async createChatStaffNote(wid, chatId, body) {
|
|
1937
|
+
return this.fetch(`w/${wid}/chats/${chatId}/notes`, {
|
|
1938
|
+
method: "POST",
|
|
1939
|
+
body: JSON.stringify(body)
|
|
1940
|
+
});
|
|
1941
|
+
}
|
|
1777
1942
|
/** Get a single chat by ID. */
|
|
1778
1943
|
async getChat(wid, id) {
|
|
1779
1944
|
return this.fetch(`w/${wid}/chats/${id}`);
|
|
@@ -1885,6 +2050,21 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1885
2050
|
`w/${wid}/chats/${chatId}/inline-connect/${encodeURIComponent(appSlug)}/link`
|
|
1886
2051
|
);
|
|
1887
2052
|
}
|
|
2053
|
+
/**
|
|
2054
|
+
* Send or discard a message the Manager proposed in a chat.
|
|
2055
|
+
*
|
|
2056
|
+
* A `proposed_message` prompt (`UiPromptPresented.proposedMessage`) is a
|
|
2057
|
+
* draft: nothing was sent and the chat did not pause. `decision: 'send'`
|
|
2058
|
+
* runs the drafted call, with `body` / `subject` replacing the draft's
|
|
2059
|
+
* text when set; `'discard'` drops it. A send that the provider refuses is
|
|
2060
|
+
* a 200 with `status: 'failed'`. 409 when it was already settled.
|
|
2061
|
+
*/
|
|
2062
|
+
async decideProposedMessage(wid, chatId, promptId, request) {
|
|
2063
|
+
return this.fetch(
|
|
2064
|
+
`w/${wid}/chats/${chatId}/proposed-messages/${encodeURIComponent(promptId)}/decision`,
|
|
2065
|
+
{ method: "POST", body: JSON.stringify(request) }
|
|
2066
|
+
);
|
|
2067
|
+
}
|
|
1888
2068
|
/** Get loaded and revealed skills for a chat. */
|
|
1889
2069
|
async getChatSkills(wid, chatId) {
|
|
1890
2070
|
return this.fetch(`w/${wid}/chats/${chatId}/skills`);
|
|
@@ -2091,7 +2271,7 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
2091
2271
|
);
|
|
2092
2272
|
}
|
|
2093
2273
|
/**
|
|
2094
|
-
* Rate a chat message by its
|
|
2274
|
+
* Rate a chat message by its `id` (message ID), not its `uuid`.
|
|
2095
2275
|
* Optional ``comment`` updates free-text details on the same durable rating row.
|
|
2096
2276
|
*/
|
|
2097
2277
|
async rateMessage(wid, chatId, messageUuid, rating, comment) {
|
|
@@ -2172,7 +2352,7 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
2172
2352
|
method: "DELETE"
|
|
2173
2353
|
});
|
|
2174
2354
|
}
|
|
2175
|
-
/** Get distinct tool call names used
|
|
2355
|
+
/** Get distinct tool call names used in the chats the caller may receive. */
|
|
2176
2356
|
async getToolCallNames(wid) {
|
|
2177
2357
|
return this.fetch(`w/${wid}/chats/tool-call-names`);
|
|
2178
2358
|
}
|
|
@@ -2410,24 +2590,6 @@ var DataTypesApi = class extends BaseApiClient {
|
|
|
2410
2590
|
}
|
|
2411
2591
|
return await response.json();
|
|
2412
2592
|
}
|
|
2413
|
-
/** Read the local Form's draft and optimistic publication counters. */
|
|
2414
|
-
async getDataTypeDraft(wid, id) {
|
|
2415
|
-
return this.fetch(`w/${wid}/data-types/${id}/schema-draft`);
|
|
2416
|
-
}
|
|
2417
|
-
/** Save a draft without changing the schema used to validate live records. */
|
|
2418
|
-
async saveDataTypeDraft(wid, id, request) {
|
|
2419
|
-
return this.fetch(`w/${wid}/data-types/${id}/schema-draft`, {
|
|
2420
|
-
method: "PUT",
|
|
2421
|
-
body: JSON.stringify(request)
|
|
2422
|
-
});
|
|
2423
|
-
}
|
|
2424
|
-
/** Publish the expected draft as the next immutable local schema version. */
|
|
2425
|
-
async publishDataTypeDraft(wid, id, request) {
|
|
2426
|
-
return this.fetch(`w/${wid}/data-types/${id}/schema-publish`, {
|
|
2427
|
-
method: "POST",
|
|
2428
|
-
body: JSON.stringify(request)
|
|
2429
|
-
});
|
|
2430
|
-
}
|
|
2431
2593
|
/** List schema history newest first; use the last version as the next cursor. */
|
|
2432
2594
|
async getDataTypeVersions(wid, id, options) {
|
|
2433
2595
|
const params = new URLSearchParams();
|
|
@@ -2519,6 +2681,16 @@ var DataTypesApi = class extends BaseApiClient {
|
|
|
2519
2681
|
`w/${wid}/data-types/${dataTypeId}/records${params?.toString() ? `?${params.toString()}` : ""}`
|
|
2520
2682
|
);
|
|
2521
2683
|
}
|
|
2684
|
+
/**
|
|
2685
|
+
* The record a Workspace Fields Form's templates read: the newest shared,
|
|
2686
|
+
* non-eval, non-retired record, or `null` before the first save. The
|
|
2687
|
+
* Values tab edits this record. Requires `records:read`.
|
|
2688
|
+
*/
|
|
2689
|
+
async getWorkspaceValuesRecord(wid, dataTypeId) {
|
|
2690
|
+
return this.fetch(
|
|
2691
|
+
`w/${wid}/data-types/${dataTypeId}/workspace-values`
|
|
2692
|
+
);
|
|
2693
|
+
}
|
|
2522
2694
|
/**
|
|
2523
2695
|
* List an anonymous Form's submissions, newest first. Requires
|
|
2524
2696
|
* `anonymous_submissions:read`. Submissions are immutable: there is no
|
|
@@ -2972,6 +3144,10 @@ var EventsApi = class extends BaseApiClient {
|
|
|
2972
3144
|
const qs = query2.toString() ? `?${query2.toString()}` : "";
|
|
2973
3145
|
return this.fetch(`w/${wid}/event-rules${qs}`);
|
|
2974
3146
|
}
|
|
3147
|
+
/** Complete directory identity/state without Action or trigger payloads. */
|
|
3148
|
+
async getEventRuleIndex(wid) {
|
|
3149
|
+
return this.fetch(`w/${wid}/event-rules/index`);
|
|
3150
|
+
}
|
|
2975
3151
|
/** Get the available action types that can be used in event rules. */
|
|
2976
3152
|
async getAvailableActions(wid) {
|
|
2977
3153
|
return this.fetch(`w/${wid}/event-rules/actions/available`);
|
|
@@ -3145,6 +3321,10 @@ var EventsApi = class extends BaseApiClient {
|
|
|
3145
3321
|
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
3146
3322
|
if (options.routineId) params.append("routineId", options.routineId.toString());
|
|
3147
3323
|
if (options.status) params.append("status", options.status);
|
|
3324
|
+
if (options.runId) params.append("runId", String(options.runId));
|
|
3325
|
+
if (options.parentRunId) params.append("parentRunId", String(options.parentRunId));
|
|
3326
|
+
if (options.dispatchKey) params.append("dispatchKey", options.dispatchKey);
|
|
3327
|
+
if (options.rootsOnly) params.append("rootsOnly", "true");
|
|
3148
3328
|
return this.fetch(
|
|
3149
3329
|
`w/${wid}/routines/runs?${params.toString()}`
|
|
3150
3330
|
);
|
|
@@ -3624,6 +3804,16 @@ var HealthieApi = class extends BaseApiClient {
|
|
|
3624
3804
|
`w/${wid}/app-connections/healthie/reconciliation/matches${qs}`
|
|
3625
3805
|
);
|
|
3626
3806
|
}
|
|
3807
|
+
/** Propose a Member for each unlinked patient on synced Healthie calendars. */
|
|
3808
|
+
async getHealthieAppointmentPatientMatches(wid, params) {
|
|
3809
|
+
const query2 = new URLSearchParams();
|
|
3810
|
+
if (params?.limit !== void 0) query2.set("limit", String(params.limit));
|
|
3811
|
+
if (params?.offset !== void 0) query2.set("offset", String(params.offset));
|
|
3812
|
+
const qs = query2.toString() ? `?${query2.toString()}` : "";
|
|
3813
|
+
return this.fetch(
|
|
3814
|
+
`w/${wid}/app-connections/healthie/reconciliation/appointment-matches${qs}`
|
|
3815
|
+
);
|
|
3816
|
+
}
|
|
3627
3817
|
async linkMemberToHealthie(wid, data) {
|
|
3628
3818
|
return this.fetch(`w/${wid}/app-connections/healthie/reconciliation/link`, {
|
|
3629
3819
|
method: "POST",
|
|
@@ -3676,7 +3866,7 @@ var FilesApi = class extends BaseApiClient {
|
|
|
3676
3866
|
/** List files in a workspace with optional folder filtering, sorting, and search. */
|
|
3677
3867
|
async getFiles(wid, options = {}) {
|
|
3678
3868
|
const params = new URLSearchParams();
|
|
3679
|
-
if (options.folderId) params.append("folder_id", options.folderId.toString());
|
|
3869
|
+
if (options.folderId != null) params.append("folder_id", options.folderId.toString());
|
|
3680
3870
|
if (options.page) params.append("page", options.page.toString());
|
|
3681
3871
|
if (options.pageSize) params.append("pageSize", options.pageSize.toString());
|
|
3682
3872
|
if (options.sortBy) params.append("sortBy", options.sortBy);
|
|
@@ -3882,11 +4072,15 @@ var FilesApi = class extends BaseApiClient {
|
|
|
3882
4072
|
method: "POST"
|
|
3883
4073
|
});
|
|
3884
4074
|
}
|
|
3885
|
-
/** Search for content within a folder using semantic search. */
|
|
4075
|
+
/** Search for content within a folder, or across its whole drive, using semantic search. */
|
|
3886
4076
|
async searchFolder(wid, id, params) {
|
|
3887
4077
|
const searchParams = new URLSearchParams();
|
|
3888
4078
|
searchParams.append("query", params.query);
|
|
3889
4079
|
if (params.topK) searchParams.append("top_k", params.topK.toString());
|
|
4080
|
+
if (params.allFiles) searchParams.append("all_files", "true");
|
|
4081
|
+
if (params.rootFolderId) {
|
|
4082
|
+
searchParams.append("root_folder_id", params.rootFolderId.toString());
|
|
4083
|
+
}
|
|
3890
4084
|
return this.fetch(
|
|
3891
4085
|
`w/${wid}/folders/${id}/search?${searchParams.toString()}`
|
|
3892
4086
|
);
|
|
@@ -4290,7 +4484,9 @@ var InquiriesApi = class extends BaseApiClient {
|
|
|
4290
4484
|
const searchParams = new URLSearchParams();
|
|
4291
4485
|
if (params?.page) searchParams.append("page", params.page.toString());
|
|
4292
4486
|
if (params?.pageSize) searchParams.append("page_size", params.pageSize.toString());
|
|
4293
|
-
|
|
4487
|
+
const types = typeof params?.inquiryType === "string" ? [params.inquiryType] : params?.inquiryType;
|
|
4488
|
+
types?.filter(Boolean).forEach((type) => searchParams.append("inquiry_type", type));
|
|
4489
|
+
params?.statuses?.forEach((status) => searchParams.append("status", status));
|
|
4294
4490
|
const queryString = searchParams.toString();
|
|
4295
4491
|
const url = queryString ? `inquiries?${queryString}` : "inquiries";
|
|
4296
4492
|
return this.fetch(url);
|
|
@@ -4544,7 +4740,7 @@ var MemberImportValidationError = class extends Error {
|
|
|
4544
4740
|
this.validationErrors = validationErrors;
|
|
4545
4741
|
}
|
|
4546
4742
|
};
|
|
4547
|
-
function throwMemberImportError(errorBody, fallback) {
|
|
4743
|
+
function throwMemberImportError(errorBody, fallback, statusCode) {
|
|
4548
4744
|
let detail = errorBody?.detail;
|
|
4549
4745
|
if (typeof detail === "string") {
|
|
4550
4746
|
try {
|
|
@@ -4554,12 +4750,13 @@ function throwMemberImportError(errorBody, fallback) {
|
|
|
4554
4750
|
}
|
|
4555
4751
|
}
|
|
4556
4752
|
if (detail && typeof detail === "object") {
|
|
4557
|
-
const { message, errors } = detail;
|
|
4753
|
+
const { message: message2, errors } = detail;
|
|
4558
4754
|
if (Array.isArray(errors)) {
|
|
4559
|
-
throw new MemberImportValidationError(
|
|
4755
|
+
throw new MemberImportValidationError(message2 || fallback, errors);
|
|
4560
4756
|
}
|
|
4561
4757
|
}
|
|
4562
|
-
|
|
4758
|
+
const message = typeof detail === "string" ? detail : fallback;
|
|
4759
|
+
throw statusCode === void 0 ? new Error(message) : new ApiError(message, statusCode);
|
|
4563
4760
|
}
|
|
4564
4761
|
function memberImportUpload(file, roleId, options) {
|
|
4565
4762
|
const body = new FormData();
|
|
@@ -4574,6 +4771,39 @@ function memberImportUpload(file, roleId, options) {
|
|
|
4574
4771
|
}
|
|
4575
4772
|
return { body, params };
|
|
4576
4773
|
}
|
|
4774
|
+
function parseMemberImportSseFrames(buffer) {
|
|
4775
|
+
const held = buffer.endsWith("\r") ? "\r" : "";
|
|
4776
|
+
const text = (held ? buffer.slice(0, -1) : buffer).replace(/\r\n?/g, "\n");
|
|
4777
|
+
const frames = text.split("\n\n");
|
|
4778
|
+
const rest = (frames.pop() ?? "") + held;
|
|
4779
|
+
const payloads = [];
|
|
4780
|
+
for (const frame of frames) {
|
|
4781
|
+
const data = [];
|
|
4782
|
+
for (const line of frame.split("\n")) {
|
|
4783
|
+
if (!line || line.startsWith(":")) continue;
|
|
4784
|
+
const colon = line.indexOf(":");
|
|
4785
|
+
if ((colon === -1 ? line : line.slice(0, colon)) !== "data") continue;
|
|
4786
|
+
const value = colon === -1 ? "" : line.slice(colon + 1);
|
|
4787
|
+
data.push(value.startsWith(" ") ? value.slice(1) : value);
|
|
4788
|
+
}
|
|
4789
|
+
if (data.length) payloads.push(data.join("\n"));
|
|
4790
|
+
}
|
|
4791
|
+
return { payloads, rest };
|
|
4792
|
+
}
|
|
4793
|
+
function toMemberImportRunEvent(payload) {
|
|
4794
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return null;
|
|
4795
|
+
const event = payload;
|
|
4796
|
+
if (event.type === "import_run") {
|
|
4797
|
+
return typeof event.runId === "string" && typeof event.status === "string" ? event : null;
|
|
4798
|
+
}
|
|
4799
|
+
if (event.type === "import_item") {
|
|
4800
|
+
return typeof event.runId === "string" && typeof event.status === "string" && Number.isInteger(event.index) ? event : null;
|
|
4801
|
+
}
|
|
4802
|
+
if (event.type === "done") {
|
|
4803
|
+
return typeof event.runId === "string" ? event : null;
|
|
4804
|
+
}
|
|
4805
|
+
return "unrecognized";
|
|
4806
|
+
}
|
|
4577
4807
|
var MembersApi = class extends BaseApiClient {
|
|
4578
4808
|
memberImportPlans = /* @__PURE__ */ new WeakMap();
|
|
4579
4809
|
/** Get the currently authenticated member for a workspace. */
|
|
@@ -4663,6 +4893,9 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4663
4893
|
}
|
|
4664
4894
|
return this.fetch(`w/${wid}/members?${params.toString()}`);
|
|
4665
4895
|
}
|
|
4896
|
+
async getMemberSmsSenders(wid, memberId) {
|
|
4897
|
+
return this.fetch(`w/${wid}/members/${memberId}/sms-senders`);
|
|
4898
|
+
}
|
|
4666
4899
|
/** Get a single workspace member by ID. */
|
|
4667
4900
|
async getWorkspaceMember(wid, memberId) {
|
|
4668
4901
|
return this.fetch(`w/${wid}/members/${memberId}`);
|
|
@@ -5015,6 +5248,130 @@ var MembersApi = class extends BaseApiClient {
|
|
|
5015
5248
|
result
|
|
5016
5249
|
};
|
|
5017
5250
|
}
|
|
5251
|
+
/**
|
|
5252
|
+
* Start a durable members CSV import (`POST /members/import/runs`) and read
|
|
5253
|
+
* its progress stream.
|
|
5254
|
+
*
|
|
5255
|
+
* The server stores the upload and `options.resolutions` as an artifact and
|
|
5256
|
+
* a Temporal workflow owns the import, so the run continues whatever happens
|
|
5257
|
+
* to this stream. `onEvent` receives each `import_run` / `import_item` /
|
|
5258
|
+
* `done` event as it is parsed; the first `import_run` carries the run id,
|
|
5259
|
+
* delivered before any later event is read.
|
|
5260
|
+
*
|
|
5261
|
+
* Unlike `importMembers`, this never previews implicitly: it sends exactly
|
|
5262
|
+
* the `previewPlanToken` supplied (or none) and never consults or refreshes
|
|
5263
|
+
* the preview cache. It never retries the POST. A non-2xx response throws:
|
|
5264
|
+
* `MemberImportValidationError` for structured validation details, otherwise
|
|
5265
|
+
* an `ApiError` carrying the status (409 means another import is already
|
|
5266
|
+
* running for the workspace). A stream that ends, fails or carries an
|
|
5267
|
+
* unreadable event before its `done` resolves as `incomplete` with whatever
|
|
5268
|
+
* run id was seen; an exception thrown by `onEvent` propagates.
|
|
5269
|
+
*
|
|
5270
|
+
* `streamStatus` reports the stream, not the import: read the run's
|
|
5271
|
+
* `status` and counters (`completed_with_errors` and `failed` are terminal
|
|
5272
|
+
* too), or `listMemberImportRuns`, for the outcome.
|
|
5273
|
+
*/
|
|
5274
|
+
async startMemberImportRun(wid, file, newMemberRoleId, options, onEvent) {
|
|
5275
|
+
const { body, params } = memberImportUpload(file, newMemberRoleId, options);
|
|
5276
|
+
if (options?.previewPlanToken) body.append("previewPlanToken", options.previewPlanToken);
|
|
5277
|
+
if (options?.identityConflictPolicy) {
|
|
5278
|
+
params.set("identity_conflict_policy", options.identityConflictPolicy);
|
|
5279
|
+
}
|
|
5280
|
+
const response = await this.fetchRaw(
|
|
5281
|
+
`w/${wid}/members/import/runs?${params.toString()}`,
|
|
5282
|
+
{ method: "POST", body },
|
|
5283
|
+
[400, 413]
|
|
5284
|
+
);
|
|
5285
|
+
if (!response.ok) {
|
|
5286
|
+
const error = await response.json().catch(() => ({}));
|
|
5287
|
+
throwMemberImportError(error, "Import run start failed", response.status);
|
|
5288
|
+
}
|
|
5289
|
+
let runId = null;
|
|
5290
|
+
let latestRun = null;
|
|
5291
|
+
const incomplete = () => ({
|
|
5292
|
+
streamStatus: "incomplete",
|
|
5293
|
+
runId,
|
|
5294
|
+
latestRun
|
|
5295
|
+
});
|
|
5296
|
+
if (!response.body) return incomplete();
|
|
5297
|
+
const reader = response.body.getReader();
|
|
5298
|
+
const decoder = new TextDecoder();
|
|
5299
|
+
let buffer = "";
|
|
5300
|
+
let finished = false;
|
|
5301
|
+
const consume = (payload) => {
|
|
5302
|
+
if (payload.trim() === "[DONE]" || !payload.trim()) return "continue";
|
|
5303
|
+
let parsed;
|
|
5304
|
+
try {
|
|
5305
|
+
parsed = JSON.parse(payload);
|
|
5306
|
+
} catch {
|
|
5307
|
+
return "malformed";
|
|
5308
|
+
}
|
|
5309
|
+
const event = toMemberImportRunEvent(parsed);
|
|
5310
|
+
if (event === "unrecognized") return "continue";
|
|
5311
|
+
if (event === null) return "malformed";
|
|
5312
|
+
runId ??= event.runId;
|
|
5313
|
+
if (event.runId !== runId) return "malformed";
|
|
5314
|
+
if (event.type === "import_run") {
|
|
5315
|
+
const { type: _type, ...run } = event;
|
|
5316
|
+
latestRun = run;
|
|
5317
|
+
}
|
|
5318
|
+
onEvent?.(event);
|
|
5319
|
+
return event.type === "done" ? "done" : "continue";
|
|
5320
|
+
};
|
|
5321
|
+
try {
|
|
5322
|
+
while (!finished) {
|
|
5323
|
+
const chunk = await reader.read().catch(() => null);
|
|
5324
|
+
if (chunk === null) return incomplete();
|
|
5325
|
+
buffer += chunk.done ? decoder.decode() : decoder.decode(chunk.value, { stream: true });
|
|
5326
|
+
const { payloads, rest } = parseMemberImportSseFrames(
|
|
5327
|
+
chunk.done ? `${buffer}
|
|
5328
|
+
|
|
5329
|
+
` : buffer
|
|
5330
|
+
);
|
|
5331
|
+
buffer = rest;
|
|
5332
|
+
for (const payload of payloads) {
|
|
5333
|
+
const outcome = consume(payload);
|
|
5334
|
+
if (outcome === "malformed") return incomplete();
|
|
5335
|
+
if (outcome === "done") {
|
|
5336
|
+
finished = true;
|
|
5337
|
+
break;
|
|
5338
|
+
}
|
|
5339
|
+
}
|
|
5340
|
+
if (chunk.done) break;
|
|
5341
|
+
}
|
|
5342
|
+
} finally {
|
|
5343
|
+
await reader.cancel().catch(() => void 0);
|
|
5344
|
+
reader.releaseLock();
|
|
5345
|
+
}
|
|
5346
|
+
return finished ? { streamStatus: "complete", runId, latestRun } : incomplete();
|
|
5347
|
+
}
|
|
5348
|
+
/**
|
|
5349
|
+
* Recent durable member import runs, newest first, with their persisted
|
|
5350
|
+
* counters. The server returns at most 100 and has no pagination: a run
|
|
5351
|
+
* missing from the list is outside the inspected window, not absent.
|
|
5352
|
+
*/
|
|
5353
|
+
async listMemberImportRuns(wid, options) {
|
|
5354
|
+
const params = new URLSearchParams();
|
|
5355
|
+
if (options?.limit !== void 0) params.set("limit", String(options.limit));
|
|
5356
|
+
const query2 = params.toString();
|
|
5357
|
+
return this.fetch(
|
|
5358
|
+
`w/${wid}/members/import/runs${query2 ? `?${query2}` : ""}`
|
|
5359
|
+
);
|
|
5360
|
+
}
|
|
5361
|
+
/**
|
|
5362
|
+
* Per-row outcomes of one durable import run, a bounded sample (server
|
|
5363
|
+
* default 500, maximum 10,000, no cursor). `index` is the zero-based data
|
|
5364
|
+
* row of the uploaded CSV. Totals come from the run summary, never from
|
|
5365
|
+
* counting this list.
|
|
5366
|
+
*/
|
|
5367
|
+
async listMemberImportRunItems(wid, runId, options) {
|
|
5368
|
+
const params = new URLSearchParams();
|
|
5369
|
+
if (options?.limit !== void 0) params.set("limit", String(options.limit));
|
|
5370
|
+
const query2 = params.toString();
|
|
5371
|
+
return this.fetch(
|
|
5372
|
+
`w/${wid}/members/import/runs/${encodeURIComponent(runId)}/items${query2 ? `?${query2}` : ""}`
|
|
5373
|
+
);
|
|
5374
|
+
}
|
|
5018
5375
|
/** Export members as a downloadable file with selected fields and data types. */
|
|
5019
5376
|
async exportMembers(wid, selectedFields, selectedDataTypes, memberType) {
|
|
5020
5377
|
const params = new URLSearchParams();
|
|
@@ -5224,6 +5581,21 @@ var MembersApi = class extends BaseApiClient {
|
|
|
5224
5581
|
}
|
|
5225
5582
|
};
|
|
5226
5583
|
|
|
5584
|
+
// src/types/generated/notification.ts
|
|
5585
|
+
var NotificationMarkerAction = {
|
|
5586
|
+
read: "read",
|
|
5587
|
+
dismiss: "dismiss"
|
|
5588
|
+
};
|
|
5589
|
+
|
|
5590
|
+
// src/types/generated/open_item.ts
|
|
5591
|
+
var OpenItemKind = {
|
|
5592
|
+
awaiting_human: "awaiting_human",
|
|
5593
|
+
connection_authorization: "connection_authorization",
|
|
5594
|
+
missed_call: "missed_call",
|
|
5595
|
+
routine_result: "routine_result",
|
|
5596
|
+
voicemail: "voicemail"
|
|
5597
|
+
};
|
|
5598
|
+
|
|
5227
5599
|
// src/api/monday.ts
|
|
5228
5600
|
var MondayIntegrationApi = class extends BaseApiClient {
|
|
5229
5601
|
/**
|
|
@@ -5329,6 +5701,24 @@ var MondayIntegrationApi = class extends BaseApiClient {
|
|
|
5329
5701
|
body: JSON.stringify({ syncConfig })
|
|
5330
5702
|
});
|
|
5331
5703
|
}
|
|
5704
|
+
/**
|
|
5705
|
+
* Run every Monday save-time check that needs no save effect against
|
|
5706
|
+
* `syncConfig`, without saving: no configuration, webhook, Form or managed
|
|
5707
|
+
* rule changes and no sync run. The same route and body as
|
|
5708
|
+
* `updateMondaySyncConfig`, with `validateOnly=true`; a refused check is the
|
|
5709
|
+
* save's own 400/403. `notCheckedWithoutSave` names what only the save does
|
|
5710
|
+
* (including `webhook_reconcile`). Monday takes no base digest: a later save
|
|
5711
|
+
* does not detect a configuration changed since it was read.
|
|
5712
|
+
*/
|
|
5713
|
+
async validateMondaySyncConfig(wid, syncConfig) {
|
|
5714
|
+
return this.fetch(
|
|
5715
|
+
`w/${wid}/app-connections/monday/sync-config?validateOnly=true`,
|
|
5716
|
+
{
|
|
5717
|
+
method: "PUT",
|
|
5718
|
+
body: JSON.stringify({ syncConfig })
|
|
5719
|
+
}
|
|
5720
|
+
);
|
|
5721
|
+
}
|
|
5332
5722
|
async getLinkedMondayMembers(wid, params) {
|
|
5333
5723
|
const query2 = new URLSearchParams();
|
|
5334
5724
|
if (params?.board_id) query2.set("board_id", params.board_id);
|
|
@@ -5425,6 +5815,15 @@ var NotificationRulesApi = class extends BaseApiClient {
|
|
|
5425
5815
|
body: JSON.stringify(rule)
|
|
5426
5816
|
});
|
|
5427
5817
|
}
|
|
5818
|
+
/**
|
|
5819
|
+
* Approved, available shared destinations (Teams channels) a notification
|
|
5820
|
+
* rule or Action may name. Choosing one never grants approval.
|
|
5821
|
+
*/
|
|
5822
|
+
async getNotificationDestinations(wid) {
|
|
5823
|
+
return this.fetch(
|
|
5824
|
+
`w/${wid}/notification-destinations`
|
|
5825
|
+
);
|
|
5826
|
+
}
|
|
5428
5827
|
/** Delete a notification rule. */
|
|
5429
5828
|
async deleteNotificationRule(wid, ruleId) {
|
|
5430
5829
|
return this.fetch(`w/${wid}/notification-rules/${ruleId}`, {
|
|
@@ -5501,48 +5900,65 @@ var OperatorApi = class extends BaseApiClient {
|
|
|
5501
5900
|
};
|
|
5502
5901
|
|
|
5503
5902
|
// src/api/org.ts
|
|
5504
|
-
var
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5903
|
+
var OrgApiKeyLimitUnconfirmedError = class extends Error {
|
|
5904
|
+
keyId;
|
|
5905
|
+
revoked;
|
|
5906
|
+
constructor(keyId, revoked) {
|
|
5907
|
+
super(
|
|
5908
|
+
revoked ? `The server did not confirm the API key's workspace limit, so key ${keyId} was revoked. Try again.` : `The server did not confirm the API key's workspace limit, and revoking key ${keyId} could not be confirmed. Revoke it manually if it is still listed.`
|
|
5508
5909
|
);
|
|
5910
|
+
this.name = "OrgApiKeyLimitUnconfirmedError";
|
|
5911
|
+
this.keyId = keyId;
|
|
5912
|
+
this.revoked = revoked;
|
|
5509
5913
|
}
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
async getOrgManagerCredentialResponse(org, chatId, deliveryId) {
|
|
5524
|
-
return this.fetch(
|
|
5525
|
-
`o/${encodeURIComponent(org)}/manager/chats/${chatId}/credentials/${encodeURIComponent(deliveryId)}`,
|
|
5526
|
-
{ cache: "no-store" }
|
|
5527
|
-
);
|
|
5528
|
-
}
|
|
5529
|
-
async getOrgManagerMessages(org, chatId, before) {
|
|
5530
|
-
return this.fetch(
|
|
5531
|
-
`o/${encodeURIComponent(org)}/manager/chats/${chatId}/messages${before ? `?before=${before}` : ""}`
|
|
5532
|
-
);
|
|
5533
|
-
}
|
|
5534
|
-
async stopOrgManagerTurn(org, chatId) {
|
|
5535
|
-
return this.fetch(`o/${encodeURIComponent(org)}/manager/chats/${chatId}/stop`, {
|
|
5536
|
-
method: "POST",
|
|
5537
|
-
body: JSON.stringify({})
|
|
5538
|
-
});
|
|
5539
|
-
}
|
|
5540
|
-
async startOrgManagerTurn(org, chatId, body) {
|
|
5541
|
-
return this.fetch(`o/${encodeURIComponent(org)}/manager/chats/${chatId}/turns`, {
|
|
5542
|
-
method: "POST",
|
|
5543
|
-
body: JSON.stringify(body)
|
|
5544
|
-
});
|
|
5914
|
+
};
|
|
5915
|
+
var OrgWebhookScopeUnconfirmedError = class extends Error {
|
|
5916
|
+
endpointUuid;
|
|
5917
|
+
operation;
|
|
5918
|
+
deleted;
|
|
5919
|
+
constructor(endpointUuid, operation, deleted) {
|
|
5920
|
+
super(
|
|
5921
|
+
operation === "update" ? `The server did not confirm the webhook endpoint's workspace scope after the update, and endpoint ${endpointUuid} was not changed back. Check its scope.` : deleted ? `The server did not confirm the webhook endpoint's workspace scope, so endpoint ${endpointUuid} was deleted. Try again.` : `The server did not confirm the webhook endpoint's workspace scope, and deleting endpoint ${endpointUuid} could not be confirmed. Delete it manually if it is still listed.`
|
|
5922
|
+
);
|
|
5923
|
+
this.name = "OrgWebhookScopeUnconfirmedError";
|
|
5924
|
+
this.endpointUuid = endpointUuid;
|
|
5925
|
+
this.operation = operation;
|
|
5926
|
+
this.deleted = operation === "create" && deleted;
|
|
5545
5927
|
}
|
|
5928
|
+
};
|
|
5929
|
+
function storedLabelSlug(value) {
|
|
5930
|
+
return value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64).replace(/-+$/, "");
|
|
5931
|
+
}
|
|
5932
|
+
function sameStringSet(left, right) {
|
|
5933
|
+
const a = new Set(left);
|
|
5934
|
+
const b = new Set(right);
|
|
5935
|
+
return a.size === b.size && [...a].every((value) => b.has(value));
|
|
5936
|
+
}
|
|
5937
|
+
function workspaceScopeConfirmed(requested, stored) {
|
|
5938
|
+
if (typeof stored !== "object" || stored === null) return false;
|
|
5939
|
+
const { mode, workspaceUuids, labelSelector } = stored;
|
|
5940
|
+
if (mode !== requested.mode) return false;
|
|
5941
|
+
if (!Array.isArray(workspaceUuids) || !Array.isArray(labelSelector)) return false;
|
|
5942
|
+
const storedUuids = [];
|
|
5943
|
+
for (const value of workspaceUuids) {
|
|
5944
|
+
if (typeof value !== "string") return false;
|
|
5945
|
+
storedUuids.push(value.trim().toLowerCase());
|
|
5946
|
+
}
|
|
5947
|
+
const storedSlugs = [];
|
|
5948
|
+
for (const label of labelSelector) {
|
|
5949
|
+
const slug = label?.slug;
|
|
5950
|
+
if (typeof slug !== "string") return false;
|
|
5951
|
+
storedSlugs.push(slug.toLowerCase());
|
|
5952
|
+
}
|
|
5953
|
+
const selected = requested.mode === "selected";
|
|
5954
|
+
const requestedUuids = selected ? requested.workspaceUuids ?? [] : [];
|
|
5955
|
+
const requestedSlugs = selected ? requested.labelSelector ?? [] : [];
|
|
5956
|
+
return sameStringSet(
|
|
5957
|
+
requestedUuids.map((value) => value.trim().toLowerCase()),
|
|
5958
|
+
storedUuids
|
|
5959
|
+
) && sameStringSet(requestedSlugs.map(storedLabelSlug), storedSlugs);
|
|
5960
|
+
}
|
|
5961
|
+
var OrgApi = class extends BaseApiClient {
|
|
5546
5962
|
/**
|
|
5547
5963
|
* Get organization by ID or UUID.
|
|
5548
5964
|
* Returns different response based on user's role:
|
|
@@ -5853,6 +6269,15 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5853
6269
|
body: JSON.stringify({ providerPhoneUuid })
|
|
5854
6270
|
});
|
|
5855
6271
|
}
|
|
6272
|
+
/**
|
|
6273
|
+
* Rename a phone number's Twilio and cached friendly name.
|
|
6274
|
+
*/
|
|
6275
|
+
async renamePhone(orgUuid, providerPhoneUuid, name) {
|
|
6276
|
+
return this.fetch(`o/${orgUuid}/phone-numbers/rename`, {
|
|
6277
|
+
method: "POST",
|
|
6278
|
+
body: JSON.stringify({ providerPhoneUuid, name })
|
|
6279
|
+
});
|
|
6280
|
+
}
|
|
5856
6281
|
/**
|
|
5857
6282
|
* Search available numbers. Use `mobile` for AU and `local` or `toll_free`
|
|
5858
6283
|
* for US; the server defaults to US local when the type is omitted.
|
|
@@ -5875,6 +6300,9 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5875
6300
|
* Australian mobile numbers require an approved business registration. Pass
|
|
5876
6301
|
* `legalEntityUuid`; the server resolves its bundle and address. Do not pass
|
|
5877
6302
|
* `bundleSid` or `addressSid` for Australian purchases.
|
|
6303
|
+
*
|
|
6304
|
+
* `name` is the whole Twilio-friendly label when supplied; without it the
|
|
6305
|
+
* server keeps its generated `{org}:0 org-{name}` fallback.
|
|
5878
6306
|
*/
|
|
5879
6307
|
async purchasePhoneNumber(orgUuid, phoneNumber, numberType, opts) {
|
|
5880
6308
|
return this.fetch(`o/${orgUuid}/phone-numbers/purchase`, {
|
|
@@ -5885,28 +6313,38 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5885
6313
|
country: opts?.country,
|
|
5886
6314
|
legalEntityUuid: opts?.legalEntityUuid,
|
|
5887
6315
|
bundleSid: opts?.bundleSid,
|
|
5888
|
-
addressSid: opts?.addressSid
|
|
6316
|
+
addressSid: opts?.addressSid,
|
|
6317
|
+
name: opts?.name
|
|
5889
6318
|
})
|
|
5890
6319
|
});
|
|
5891
6320
|
}
|
|
5892
|
-
async getNumberRegistration(orgUuid, entityUuid) {
|
|
5893
|
-
|
|
6321
|
+
async getNumberRegistration(orgUuid, entityUuid, country) {
|
|
6322
|
+
const query2 = country ? `?country=${encodeURIComponent(country)}` : "";
|
|
6323
|
+
return this.fetch(`o/${orgUuid}/legal-entities/${entityUuid}/number-registration${query2}`);
|
|
5894
6324
|
}
|
|
5895
|
-
async uploadNumberRegistrationDocument(orgUuid, entityUuid, file, documentType, requirementName) {
|
|
6325
|
+
async uploadNumberRegistrationDocument(orgUuid, entityUuid, file, documentType, requirementName, country) {
|
|
5896
6326
|
const body = new FormData();
|
|
5897
6327
|
body.append("file", file);
|
|
5898
6328
|
body.append("documentType", documentType);
|
|
5899
6329
|
body.append("requirementName", requirementName);
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
6330
|
+
const query2 = country ? `?country=${encodeURIComponent(country)}` : "";
|
|
6331
|
+
return this.fetch(
|
|
6332
|
+
`o/${orgUuid}/legal-entities/${entityUuid}/number-registration/documents${query2}`,
|
|
6333
|
+
{
|
|
6334
|
+
method: "POST",
|
|
6335
|
+
body
|
|
6336
|
+
}
|
|
6337
|
+
);
|
|
5904
6338
|
}
|
|
5905
|
-
async submitNumberRegistration(orgUuid, entityUuid) {
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
6339
|
+
async submitNumberRegistration(orgUuid, entityUuid, country) {
|
|
6340
|
+
const query2 = country ? `?country=${encodeURIComponent(country)}` : "";
|
|
6341
|
+
return this.fetch(
|
|
6342
|
+
`o/${orgUuid}/legal-entities/${entityUuid}/number-registration/submit${query2}`,
|
|
6343
|
+
{
|
|
6344
|
+
method: "POST",
|
|
6345
|
+
body: JSON.stringify({})
|
|
6346
|
+
}
|
|
6347
|
+
);
|
|
5910
6348
|
}
|
|
5911
6349
|
/**
|
|
5912
6350
|
* Delete a phone number from the org (releases from Twilio).
|
|
@@ -6154,6 +6592,14 @@ var OrgApi = class extends BaseApiClient {
|
|
|
6154
6592
|
async getPhoneVoiceTrust(orgUuid) {
|
|
6155
6593
|
return this.fetch(`o/${orgUuid}/phone-numbers/voice-trust`);
|
|
6156
6594
|
}
|
|
6595
|
+
/**
|
|
6596
|
+
* The business each of the org's numbers is attached to, read live from
|
|
6597
|
+
* Twilio: one list per business's Customer Profile, none per number. Only
|
|
6598
|
+
* numbers exactly one business holds are listed. Organization admins only.
|
|
6599
|
+
*/
|
|
6600
|
+
async getPhoneBusinessNames(orgUuid) {
|
|
6601
|
+
return this.fetch(`o/${orgUuid}/phone-numbers/voice-trust/businesses`);
|
|
6602
|
+
}
|
|
6157
6603
|
/**
|
|
6158
6604
|
* Put a number on a legal entity's Customer Profile and approved voice
|
|
6159
6605
|
* trust products, taking it off any other legal entity's first. The
|
|
@@ -6522,17 +6968,61 @@ var OrgApi = class extends BaseApiClient {
|
|
|
6522
6968
|
async listOrgWebhookEventTypes(orgIdOrUuid) {
|
|
6523
6969
|
return this.fetch(`o/${orgIdOrUuid}/webhooks/event-types`);
|
|
6524
6970
|
}
|
|
6971
|
+
/**
|
|
6972
|
+
* Create an organization webhook endpoint.
|
|
6973
|
+
*
|
|
6974
|
+
* The response must confirm the requested `workspaceScope`: the same mode,
|
|
6975
|
+
* and for `selected` the same workspaces and label slugs. A server that
|
|
6976
|
+
* predates the shared scope ignores `workspaceScope` and stores an
|
|
6977
|
+
* endpoint for every workspace. When the response does not confirm the
|
|
6978
|
+
* scope (a missing scope included, even for `all`), this method does not
|
|
6979
|
+
* return the endpoint or its signing secret. It deletes the endpoint and
|
|
6980
|
+
* throws {@link OrgWebhookScopeUnconfirmedError}, whose `deleted` says
|
|
6981
|
+
* whether that delete succeeded. It never retries the create.
|
|
6982
|
+
*/
|
|
6525
6983
|
async createOrgWebhookEndpoint(orgIdOrUuid, data) {
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6984
|
+
const created = await this.fetch(
|
|
6985
|
+
`o/${orgIdOrUuid}/webhooks`,
|
|
6986
|
+
{
|
|
6987
|
+
method: "POST",
|
|
6988
|
+
body: JSON.stringify(data)
|
|
6989
|
+
}
|
|
6990
|
+
);
|
|
6991
|
+
const stored = created.workspaceScope;
|
|
6992
|
+
if (workspaceScopeConfirmed(data.workspaceScope, stored)) return created;
|
|
6993
|
+
const endpointUuid = typeof created.uuid === "string" ? created.uuid : "";
|
|
6994
|
+
let deleted = false;
|
|
6995
|
+
if (endpointUuid) {
|
|
6996
|
+
try {
|
|
6997
|
+
await this.deleteOrgWebhookEndpoint(orgIdOrUuid, endpointUuid);
|
|
6998
|
+
deleted = true;
|
|
6999
|
+
} catch {
|
|
7000
|
+
deleted = false;
|
|
7001
|
+
}
|
|
7002
|
+
}
|
|
7003
|
+
throw new OrgWebhookScopeUnconfirmedError(endpointUuid, "create", deleted);
|
|
6530
7004
|
}
|
|
7005
|
+
/**
|
|
7006
|
+
* Update an organization webhook endpoint. An omitted (or `null`)
|
|
7007
|
+
* `workspaceScope` leaves the scope unchanged and is not checked. A sent
|
|
7008
|
+
* one replaces the whole scope, and the response must confirm it the same
|
|
7009
|
+
* way {@link OrgApi.createOrgWebhookEndpoint} checks; otherwise this
|
|
7010
|
+
* method throws {@link OrgWebhookScopeUnconfirmedError} with `operation`
|
|
7011
|
+
* `update`. It does not remediate: the previous scope is unknown here.
|
|
7012
|
+
*/
|
|
6531
7013
|
async updateOrgWebhookEndpoint(orgIdOrUuid, endpointUuid, data) {
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
7014
|
+
const updated = await this.fetch(
|
|
7015
|
+
`o/${orgIdOrUuid}/webhooks/${endpointUuid}`,
|
|
7016
|
+
{
|
|
7017
|
+
method: "PATCH",
|
|
7018
|
+
body: JSON.stringify(data)
|
|
7019
|
+
}
|
|
7020
|
+
);
|
|
7021
|
+
const requested = data.workspaceScope;
|
|
7022
|
+
if (requested == null) return updated;
|
|
7023
|
+
const stored = updated.workspaceScope;
|
|
7024
|
+
if (workspaceScopeConfirmed(requested, stored)) return updated;
|
|
7025
|
+
throw new OrgWebhookScopeUnconfirmedError(endpointUuid, "update", false);
|
|
6536
7026
|
}
|
|
6537
7027
|
async deleteOrgWebhookEndpoint(orgIdOrUuid, endpointUuid) {
|
|
6538
7028
|
return this.fetch(`o/${orgIdOrUuid}/webhooks/${endpointUuid}`, {
|
|
@@ -6628,11 +7118,16 @@ var OrgApi = class extends BaseApiClient {
|
|
|
6628
7118
|
// Organization API keys (GRA-9043)
|
|
6629
7119
|
// =========================================================================
|
|
6630
7120
|
/**
|
|
6631
|
-
* List every API key bound to this organization
|
|
7121
|
+
* List every API key bound to this organization, with each key's
|
|
7122
|
+
* `workspaceScope`. Never carries the secret.
|
|
6632
7123
|
*
|
|
6633
|
-
* Org-bound keys authenticate as an org-local principal
|
|
6634
|
-
* every current workspace of the
|
|
6635
|
-
*
|
|
7124
|
+
* Org-bound keys authenticate as an org-local principal. A key whose
|
|
7125
|
+
* `workspaceScope.mode` is `all` reaches every current workspace of the
|
|
7126
|
+
* organization and every workspace created later; `selected` reaches its
|
|
7127
|
+
* `workspaceUuids` plus every workspace carrying all of its `labelSelector`
|
|
7128
|
+
* labels; `none` reaches nothing (also what a selected key reads as once
|
|
7129
|
+
* its last workspace is deleted). Gated by `org:api_keys`, which
|
|
7130
|
+
* `org:admin` holds transitively.
|
|
6636
7131
|
*/
|
|
6637
7132
|
async listOrgApiKeys(orgIdOrUuid) {
|
|
6638
7133
|
return this.fetch(`o/${orgIdOrUuid}/api-keys`);
|
|
@@ -6640,18 +7135,38 @@ var OrgApi = class extends BaseApiClient {
|
|
|
6640
7135
|
/**
|
|
6641
7136
|
* Mint an org-bound API key.
|
|
6642
7137
|
*
|
|
6643
|
-
* The payload is
|
|
6644
|
-
*
|
|
6645
|
-
* id
|
|
6646
|
-
* the plaintext secret, which is readable
|
|
7138
|
+
* The payload is {@link OrgApiKeyFormData}: the workspace and account
|
|
7139
|
+
* routes' `{name, expiresInDays, scopes}` plus a required `workspaceScope`
|
|
7140
|
+
* — no workspace id, because the mint location is what binds the key.
|
|
7141
|
+
* The response carries `key`, the plaintext secret, which is readable
|
|
7142
|
+
* exactly once.
|
|
7143
|
+
*
|
|
7144
|
+
* A request for a `selected` or `none` scope must come back with that
|
|
7145
|
+
* `workspaceScope.mode`. A server that predates the shared scope ignores
|
|
7146
|
+
* `workspaceScope` and mints a key for every workspace; when that happens
|
|
7147
|
+
* this method does not return the secret. It revokes the key it
|
|
7148
|
+
* was given and throws {@link OrgApiKeyLimitUnconfirmedError}, whose
|
|
7149
|
+
* `revoked` says whether that revocation succeeded. It never retries the
|
|
7150
|
+
* mint.
|
|
6647
7151
|
*/
|
|
6648
7152
|
async createOrgApiKey(orgIdOrUuid, apiKey) {
|
|
6649
|
-
|
|
7153
|
+
const created = await this.fetch(`o/${orgIdOrUuid}/api-keys`, {
|
|
6650
7154
|
method: "POST",
|
|
6651
7155
|
body: JSON.stringify(apiKey)
|
|
6652
7156
|
});
|
|
6653
|
-
|
|
6654
|
-
|
|
7157
|
+
const requested = apiKey.workspaceScope.mode;
|
|
7158
|
+
const minted = created.workspaceScope?.mode;
|
|
7159
|
+
if (requested === "all" || minted === requested) return created;
|
|
7160
|
+
let revoked = false;
|
|
7161
|
+
try {
|
|
7162
|
+
await this.revokeOrgApiKey(orgIdOrUuid, created.id);
|
|
7163
|
+
revoked = true;
|
|
7164
|
+
} catch {
|
|
7165
|
+
revoked = false;
|
|
7166
|
+
}
|
|
7167
|
+
throw new OrgApiKeyLimitUnconfirmedError(created.id, revoked);
|
|
7168
|
+
}
|
|
7169
|
+
/** Revoke an org-bound API key by its id. */
|
|
6655
7170
|
async revokeOrgApiKey(orgIdOrUuid, keyId) {
|
|
6656
7171
|
return this.fetch(`o/${orgIdOrUuid}/api-keys/${keyId}`, {
|
|
6657
7172
|
method: "DELETE"
|
|
@@ -6660,7 +7175,7 @@ var OrgApi = class extends BaseApiClient {
|
|
|
6660
7175
|
// =========================================================================
|
|
6661
7176
|
// Workspace labels — the organization's own taxonomy of its workspaces
|
|
6662
7177
|
// =========================================================================
|
|
6663
|
-
/** Every label of the organization, with workspace and
|
|
7178
|
+
/** Every label of the organization, with workspace and selector (webhook, key, Agent) counts. */
|
|
6664
7179
|
async listWorkspaceLabels(orgIdOrUuid) {
|
|
6665
7180
|
return this.fetch(`o/${orgIdOrUuid}/workspace-labels`);
|
|
6666
7181
|
}
|
|
@@ -6677,15 +7192,16 @@ var OrgApi = class extends BaseApiClient {
|
|
|
6677
7192
|
body: JSON.stringify(data)
|
|
6678
7193
|
});
|
|
6679
7194
|
}
|
|
6680
|
-
/** Delete a label. Refused (409) while a webhook
|
|
7195
|
+
/** Delete a label. Refused (409) while a webhook, API key or Agent selector requires it. */
|
|
6681
7196
|
async deleteWorkspaceLabel(orgIdOrUuid, labelUuid) {
|
|
6682
7197
|
return this.fetch(`o/${orgIdOrUuid}/workspace-labels/${labelUuid}`, {
|
|
6683
7198
|
method: "DELETE"
|
|
6684
7199
|
});
|
|
6685
7200
|
}
|
|
6686
7201
|
/**
|
|
6687
|
-
* Which workspaces
|
|
6688
|
-
*
|
|
7202
|
+
* Which workspaces an unsaved `workspaceScope` — the body API keys,
|
|
7203
|
+
* webhook endpoints and org Agents save — would reach right now. `none`
|
|
7204
|
+
* reaches zero workspaces.
|
|
6689
7205
|
*/
|
|
6690
7206
|
async previewWorkspaceScope(orgIdOrUuid, data) {
|
|
6691
7207
|
return this.fetch(
|
|
@@ -6786,6 +7302,15 @@ var OAuthApi = class extends BaseApiClient {
|
|
|
6786
7302
|
const params = new URLSearchParams({ client_id: clientId });
|
|
6787
7303
|
return this.fetch(`oauth/authorize/mcp-targets?${params.toString()}`);
|
|
6788
7304
|
}
|
|
7305
|
+
/**
|
|
7306
|
+
* The organizations and workspaces the consent screen may offer a non-MCP
|
|
7307
|
+
* App: one workspace, or a whole organization where
|
|
7308
|
+
* `organizationGrantPermitted` is true.
|
|
7309
|
+
*/
|
|
7310
|
+
async getConsentTargets(clientId) {
|
|
7311
|
+
const params = new URLSearchParams({ client_id: clientId });
|
|
7312
|
+
return this.fetch(`oauth/authorize/targets?${params.toString()}`);
|
|
7313
|
+
}
|
|
6789
7314
|
/** The signed-in account's MCP grants. */
|
|
6790
7315
|
async listMcpGrants() {
|
|
6791
7316
|
return this.fetch("oauth/mcp-grants");
|
|
@@ -6848,6 +7373,17 @@ var PhoneNumbersApi = class extends BaseApiClient {
|
|
|
6848
7373
|
const query2 = params.toString();
|
|
6849
7374
|
return this.fetch(`w/${wid}/phone-numbers${query2 ? `?${query2}` : ""}`);
|
|
6850
7375
|
}
|
|
7376
|
+
/**
|
|
7377
|
+
* The numbers a Chat can be started from, for a Member with `chats:write`.
|
|
7378
|
+
*
|
|
7379
|
+
* Every non-archived workspace number in a slim shape (`id`, `number`,
|
|
7380
|
+
* `name`, `isMapped`, `enableWhatsApp`) — no phone administration data, so
|
|
7381
|
+
* it needs no `phones:read`. A row describes configuration, not permission
|
|
7382
|
+
* to send.
|
|
7383
|
+
*/
|
|
7384
|
+
async getChatPhoneNumbers(wid) {
|
|
7385
|
+
return this.fetch(`w/${wid}/phone-numbers/chat-senders`);
|
|
7386
|
+
}
|
|
6851
7387
|
/** List phone numbers available for provisioning. */
|
|
6852
7388
|
async getAvailablePhoneNumbers(wid) {
|
|
6853
7389
|
return this.fetch(
|
|
@@ -7635,213 +8171,45 @@ var RoutingRulesApi = class extends BaseApiClient {
|
|
|
7635
8171
|
}
|
|
7636
8172
|
};
|
|
7637
8173
|
|
|
7638
|
-
// src/api/
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
async
|
|
7649
|
-
return this.fetch(`w/${wid}/app-connections/salesforce/install`, {
|
|
7650
|
-
method: "POST",
|
|
7651
|
-
body: JSON.stringify(data ?? {})
|
|
7652
|
-
});
|
|
7653
|
-
}
|
|
7654
|
-
async configureSalesforce(wid, data) {
|
|
7655
|
-
return this.fetch(
|
|
7656
|
-
`w/${wid}/app-connections/salesforce/configure`,
|
|
7657
|
-
{
|
|
7658
|
-
method: "POST",
|
|
7659
|
-
body: JSON.stringify(data)
|
|
7660
|
-
}
|
|
7661
|
-
);
|
|
7662
|
-
}
|
|
7663
|
-
async startSalesforceOAuth(wid) {
|
|
7664
|
-
return this.fetch(
|
|
7665
|
-
`w/${wid}/app-connections/salesforce/oauth/start`,
|
|
7666
|
-
{
|
|
7667
|
-
method: "POST"
|
|
7668
|
-
}
|
|
7669
|
-
);
|
|
7670
|
-
}
|
|
7671
|
-
async getSalesforceStatus(wid) {
|
|
7672
|
-
return this.fetch(`w/${wid}/app-connections/salesforce/status`);
|
|
7673
|
-
}
|
|
7674
|
-
async disconnectSalesforce(wid) {
|
|
7675
|
-
return this.fetch(
|
|
7676
|
-
`w/${wid}/app-connections/salesforce/disconnect`,
|
|
7677
|
-
{
|
|
7678
|
-
method: "DELETE"
|
|
7679
|
-
}
|
|
7680
|
-
);
|
|
7681
|
-
}
|
|
7682
|
-
async disableSalesforce(wid) {
|
|
7683
|
-
return this.fetch(`w/${wid}/app-connections/salesforce/disable`, {
|
|
7684
|
-
method: "POST"
|
|
7685
|
-
});
|
|
7686
|
-
}
|
|
7687
|
-
async enableSalesforce(wid) {
|
|
7688
|
-
return this.fetch(`w/${wid}/app-connections/salesforce/enable`, {
|
|
7689
|
-
method: "POST"
|
|
7690
|
-
});
|
|
7691
|
-
}
|
|
7692
|
-
async deleteSalesforce(wid) {
|
|
7693
|
-
return this.fetch(`w/${wid}/app-connections/salesforce/delete`, {
|
|
7694
|
-
method: "DELETE"
|
|
7695
|
-
});
|
|
7696
|
-
}
|
|
7697
|
-
async getSalesforceReconciliationMatches(wid, params) {
|
|
7698
|
-
const query2 = new URLSearchParams();
|
|
7699
|
-
if (params?.limit !== void 0) query2.set("limit", String(params.limit));
|
|
7700
|
-
if (params?.offset !== void 0) query2.set("offset", String(params.offset));
|
|
7701
|
-
const qs = query2.toString() ? `?${query2.toString()}` : "";
|
|
7702
|
-
return this.fetch(
|
|
7703
|
-
`w/${wid}/app-connections/salesforce/reconciliation/matches${qs}`
|
|
7704
|
-
);
|
|
7705
|
-
}
|
|
7706
|
-
async linkMemberToSalesforce(wid, data) {
|
|
7707
|
-
return this.fetch(`w/${wid}/app-connections/salesforce/reconciliation/link`, {
|
|
7708
|
-
method: "POST",
|
|
7709
|
-
body: JSON.stringify(data)
|
|
7710
|
-
});
|
|
7711
|
-
}
|
|
7712
|
-
async bulkLinkMembersToSalesforce(wid, data) {
|
|
7713
|
-
return this.fetch(`w/${wid}/app-connections/salesforce/reconciliation/link/bulk`, {
|
|
7714
|
-
method: "POST",
|
|
7715
|
-
body: JSON.stringify(data)
|
|
7716
|
-
});
|
|
7717
|
-
}
|
|
7718
|
-
/**
|
|
7719
|
-
* @deprecated Use `linkUnlinkedMembersByIdentity(wid, connectionId)`, which
|
|
7720
|
-
* serves every connector that links by identity. This calls the retained
|
|
7721
|
-
* Salesforce-only route and will be removed once no caller remains.
|
|
7722
|
-
*/
|
|
7723
|
-
async linkUnlinkedSalesforceMembersByIdentity(wid) {
|
|
7724
|
-
return this.fetch(
|
|
7725
|
-
`w/${wid}/app-connections/salesforce/reconciliation/link-unlinked-by-identity`,
|
|
7726
|
-
{
|
|
7727
|
-
method: "POST",
|
|
7728
|
-
body: JSON.stringify({})
|
|
7729
|
-
}
|
|
7730
|
-
);
|
|
7731
|
-
}
|
|
7732
|
-
async unlinkMemberFromSalesforce(wid, memberId) {
|
|
7733
|
-
return this.fetch(`w/${wid}/app-connections/salesforce/reconciliation/unlink/${memberId}`, {
|
|
7734
|
-
method: "DELETE"
|
|
7735
|
-
});
|
|
7736
|
-
}
|
|
7737
|
-
async getLinkedSalesforceMembers(wid, params) {
|
|
7738
|
-
const query2 = new URLSearchParams();
|
|
7739
|
-
if (params?.page !== void 0) query2.set("page", String(params.page));
|
|
7740
|
-
if (params?.pageSize !== void 0) query2.set("pageSize", String(params.pageSize));
|
|
7741
|
-
if (params?.search?.trim()) query2.set("search", params.search.trim());
|
|
7742
|
-
const qs = query2.toString() ? `?${query2.toString()}` : "";
|
|
7743
|
-
return this.fetch(
|
|
7744
|
-
`w/${wid}/app-connections/salesforce/reconciliation/linked${qs}`
|
|
7745
|
-
);
|
|
7746
|
-
}
|
|
7747
|
-
// --- Sync config ---
|
|
7748
|
-
async getSalesforceSyncConfig(wid) {
|
|
7749
|
-
return this.fetch(
|
|
7750
|
-
`w/${wid}/app-connections/salesforce/sync/config`
|
|
7751
|
-
);
|
|
7752
|
-
}
|
|
7753
|
-
async updateSalesforceSyncConfig(wid, data) {
|
|
8174
|
+
// src/api/connection-sync.ts
|
|
8175
|
+
function syncConfigQuery(options, validateOnly) {
|
|
8176
|
+
const query2 = new URLSearchParams();
|
|
8177
|
+
if (validateOnly) query2.set("validateOnly", "true");
|
|
8178
|
+
if (options.baseConfigDigest !== void 0)
|
|
8179
|
+
query2.set("baseConfigDigest", options.baseConfigDigest);
|
|
8180
|
+
const qs = query2.toString();
|
|
8181
|
+
return qs ? `?${qs}` : "";
|
|
8182
|
+
}
|
|
8183
|
+
var ConnectionSyncApi = class extends BaseApiClient {
|
|
8184
|
+
async getConnectionSyncCapabilities(wid, connectionId) {
|
|
7754
8185
|
return this.fetch(
|
|
7755
|
-
`w/${wid}/app-connections/
|
|
7756
|
-
{
|
|
7757
|
-
method: "PUT",
|
|
7758
|
-
body: JSON.stringify(data)
|
|
7759
|
-
}
|
|
8186
|
+
`w/${wid}/app-connections/${connectionId}/sync-capabilities`
|
|
7760
8187
|
);
|
|
7761
8188
|
}
|
|
7762
|
-
|
|
7763
|
-
* Pull linked members' Salesforce records now, ignoring the sync cursor.
|
|
7764
|
-
*
|
|
7765
|
-
* The inbound poll only ever returns records modified after the stored
|
|
7766
|
-
* cursor, so a member linked to a record that has not changed since is
|
|
7767
|
-
* unreachable by any poll and its link never receives a field — silently.
|
|
7768
|
-
* This fetches the records by Id and leaves the cursor untouched, so it is
|
|
7769
|
-
* safe to call at any time.
|
|
7770
|
-
*
|
|
7771
|
-
* Omit `memberIds` to resync every linked member (capped server-side).
|
|
7772
|
-
*/
|
|
7773
|
-
async resyncSalesforceLinkedMembers(wid, data = {}) {
|
|
8189
|
+
async getConnectionSyncConfig(wid, connectionId) {
|
|
7774
8190
|
return this.fetch(
|
|
7775
|
-
`w/${wid}/app-connections/
|
|
7776
|
-
{
|
|
7777
|
-
method: "POST",
|
|
7778
|
-
body: JSON.stringify(data)
|
|
7779
|
-
}
|
|
8191
|
+
`w/${wid}/app-connections/${connectionId}/sync-config`
|
|
7780
8192
|
);
|
|
7781
8193
|
}
|
|
7782
8194
|
/**
|
|
7783
|
-
*
|
|
7784
|
-
*
|
|
7785
|
-
*
|
|
7786
|
-
* objects included), so it must come from the org rather than a hardcoded
|
|
7787
|
-
* list.
|
|
8195
|
+
* Save the config; returns it with the new `configDigest`. Pass the digest
|
|
8196
|
+
* the draft was read with as `options.baseConfigDigest`: a changed
|
|
8197
|
+
* configuration is refused with 409 `sync_config_changed` (never retried).
|
|
7788
8198
|
*/
|
|
7789
|
-
async
|
|
7790
|
-
return this.fetch(`w/${wid}/app-connections/salesforce/objects`);
|
|
7791
|
-
}
|
|
7792
|
-
async describeSalesforceObject(wid, sobject) {
|
|
8199
|
+
async updateConnectionSyncConfig(wid, connectionId, data, options = {}) {
|
|
7793
8200
|
return this.fetch(
|
|
7794
|
-
`w/${wid}/app-connections
|
|
7795
|
-
|
|
7796
|
-
}
|
|
7797
|
-
// --- Search & Import ---
|
|
7798
|
-
async searchSalesforceRecords(wid, data) {
|
|
7799
|
-
return this.fetch(`w/${wid}/app-connections/salesforce/search`, {
|
|
7800
|
-
method: "POST",
|
|
7801
|
-
body: JSON.stringify(data)
|
|
7802
|
-
});
|
|
7803
|
-
}
|
|
7804
|
-
async importSalesforceMembers(wid, data) {
|
|
7805
|
-
return this.fetch(
|
|
7806
|
-
`w/${wid}/app-connections/salesforce/import-members`,
|
|
7807
|
-
{
|
|
7808
|
-
method: "POST",
|
|
7809
|
-
body: JSON.stringify(data)
|
|
7810
|
-
}
|
|
8201
|
+
`w/${wid}/app-connections/${connectionId}/sync-config${syncConfigQuery(options, false)}`,
|
|
8202
|
+
{ method: "PUT", body: JSON.stringify(data) }
|
|
7811
8203
|
);
|
|
7812
8204
|
}
|
|
7813
8205
|
/**
|
|
7814
|
-
*
|
|
7815
|
-
*
|
|
7816
|
-
*
|
|
7817
|
-
* connection is parked for re-authorization.
|
|
8206
|
+
* Run every save-time check on `data` without saving
|
|
8207
|
+
* (`PUT /sync-config?validateOnly=true`). Persists nothing and starts no
|
|
8208
|
+
* run; a failed check rejects with the save's own error.
|
|
7818
8209
|
*/
|
|
7819
|
-
async
|
|
7820
|
-
const query2 = new URLSearchParams();
|
|
7821
|
-
if (params?.pageSize) query2.set("pageSize", String(params.pageSize));
|
|
7822
|
-
if (params?.cursor) query2.set("cursor", params.cursor);
|
|
7823
|
-
const qs = query2.toString() ? `?${query2.toString()}` : "";
|
|
7824
|
-
return this.fetch(
|
|
7825
|
-
`w/${wid}/app-connections/salesforce/sync/logs${qs}`
|
|
7826
|
-
);
|
|
7827
|
-
}
|
|
7828
|
-
};
|
|
7829
|
-
|
|
7830
|
-
// src/api/connection-sync.ts
|
|
7831
|
-
var ConnectionSyncApi = class extends BaseApiClient {
|
|
7832
|
-
async getConnectionSyncCapabilities(wid, connectionId) {
|
|
7833
|
-
return this.fetch(
|
|
7834
|
-
`w/${wid}/app-connections/${connectionId}/sync-capabilities`
|
|
7835
|
-
);
|
|
7836
|
-
}
|
|
7837
|
-
async getConnectionSyncConfig(wid, connectionId) {
|
|
8210
|
+
async validateConnectionSyncConfig(wid, connectionId, data, options = {}) {
|
|
7838
8211
|
return this.fetch(
|
|
7839
|
-
`w/${wid}/app-connections/${connectionId}/sync-config
|
|
7840
|
-
);
|
|
7841
|
-
}
|
|
7842
|
-
async updateConnectionSyncConfig(wid, connectionId, data) {
|
|
7843
|
-
return this.fetch(
|
|
7844
|
-
`w/${wid}/app-connections/${connectionId}/sync-config`,
|
|
8212
|
+
`w/${wid}/app-connections/${connectionId}/sync-config${syncConfigQuery(options, true)}`,
|
|
7845
8213
|
{ method: "PUT", body: JSON.stringify(data) }
|
|
7846
8214
|
);
|
|
7847
8215
|
}
|
|
@@ -7854,15 +8222,28 @@ var ConnectionSyncApi = class extends BaseApiClient {
|
|
|
7854
8222
|
`w/${wid}/app-connections/${connectionId}/inbound-records/status`
|
|
7855
8223
|
);
|
|
7856
8224
|
}
|
|
8225
|
+
/** The owner sync's opt-in, and its latest pass. */
|
|
8226
|
+
async getOwnerMemberStatus(wid, connectionId) {
|
|
8227
|
+
return this.fetch(
|
|
8228
|
+
`w/${wid}/app-connections/${connectionId}/owner-members`
|
|
8229
|
+
);
|
|
8230
|
+
}
|
|
7857
8231
|
async getConnectionWritePreview(wid, connectionId, memberId) {
|
|
7858
8232
|
return this.fetch(
|
|
7859
8233
|
`w/${wid}/app-connections/${connectionId}/write-preview/members/${memberId}`
|
|
7860
8234
|
);
|
|
7861
8235
|
}
|
|
7862
|
-
|
|
8236
|
+
/**
|
|
8237
|
+
* The checkpoint one direction of one entity type resumes from. The route
|
|
8238
|
+
* reads ``direction`` and ``entity_type`` (default ``member``); ``sync_key``
|
|
8239
|
+
* is still sent for compatibility, though the current route ignores it. A
|
|
8240
|
+
* connection or entity with no checkpoint answers ``{cursor: {}}``.
|
|
8241
|
+
*/
|
|
8242
|
+
async getConnectionSyncCheckpoint(wid, connectionId, direction = "inbound", syncKey = "default", entityType = "member") {
|
|
7863
8243
|
const query2 = new URLSearchParams({
|
|
7864
8244
|
direction,
|
|
7865
|
-
sync_key: syncKey
|
|
8245
|
+
sync_key: syncKey,
|
|
8246
|
+
entity_type: entityType
|
|
7866
8247
|
});
|
|
7867
8248
|
return this.fetch(
|
|
7868
8249
|
`w/${wid}/app-connections/${connectionId}/sync/checkpoint?${query2}`
|
|
@@ -7903,6 +8284,31 @@ var ConnectionSyncApi = class extends BaseApiClient {
|
|
|
7903
8284
|
`w/${wid}/app-connections/${connectionId}/sync/member-summary`
|
|
7904
8285
|
);
|
|
7905
8286
|
}
|
|
8287
|
+
/** Failing Member links grouped by cause. Codes and counts only; needs `apps:read`. */
|
|
8288
|
+
async getSyncFailureSummary(wid, connectionId) {
|
|
8289
|
+
return this.fetch(
|
|
8290
|
+
`w/${wid}/app-connections/${connectionId}/sync/failures/summary`
|
|
8291
|
+
);
|
|
8292
|
+
}
|
|
8293
|
+
/**
|
|
8294
|
+
* One page of failing Member links. With `cause`, the links of exactly
|
|
8295
|
+
* that cause (`remoteCode: null` is the cause with no remote code);
|
|
8296
|
+
* without it, every failing link. Returns Member names, so it needs
|
|
8297
|
+
* `members:read` as well as `apps:read`.
|
|
8298
|
+
*/
|
|
8299
|
+
async getSyncFailures(wid, connectionId, options) {
|
|
8300
|
+
const params = new URLSearchParams();
|
|
8301
|
+
if (options?.cause) {
|
|
8302
|
+
params.set("code", options.cause.code);
|
|
8303
|
+
if (options.cause.remoteCode != null) params.set("remoteCode", options.cause.remoteCode);
|
|
8304
|
+
}
|
|
8305
|
+
if (options?.page != null) params.set("page", String(options.page));
|
|
8306
|
+
if (options?.pageSize != null) params.set("pageSize", String(options.pageSize));
|
|
8307
|
+
const qs = params.toString() ? `?${params.toString()}` : "";
|
|
8308
|
+
return this.fetch(
|
|
8309
|
+
`w/${wid}/app-connections/${connectionId}/sync/failures${qs}`
|
|
8310
|
+
);
|
|
8311
|
+
}
|
|
7906
8312
|
/**
|
|
7907
8313
|
* One page of a run's items. ``cursor`` is the previous page's
|
|
7908
8314
|
* ``nextCursor`` and continues in the requested direction; exhaustion comes
|
|
@@ -7989,56 +8395,266 @@ var ConnectionSyncApi = class extends BaseApiClient {
|
|
|
7989
8395
|
/** Count and sample an unsaved selection. Never writes. */
|
|
7990
8396
|
async previewSubsetImportSelection(wid, connectionId, selection) {
|
|
7991
8397
|
return this.fetch(
|
|
7992
|
-
this.subsetImportsPath(wid, connectionId, "/preview"),
|
|
7993
|
-
{ method: "POST", body: JSON.stringify({ selection }) }
|
|
8398
|
+
this.subsetImportsPath(wid, connectionId, "/preview"),
|
|
8399
|
+
{ method: "POST", body: JSON.stringify({ selection }) }
|
|
8400
|
+
);
|
|
8401
|
+
}
|
|
8402
|
+
/** Count and sample a saved selection. Never writes. */
|
|
8403
|
+
async previewSubsetImport(wid, connectionId, importId) {
|
|
8404
|
+
return this.fetch(
|
|
8405
|
+
this.subsetImportsPath(wid, connectionId, `/${encodeURIComponent(importId)}/preview`),
|
|
8406
|
+
// The CSRF barrier refuses a body-less POST (422); `{}` is the request.
|
|
8407
|
+
{ method: "POST", body: JSON.stringify({}) }
|
|
8408
|
+
);
|
|
8409
|
+
}
|
|
8410
|
+
/**
|
|
8411
|
+
* Start the import in the background (202). A failed or cancelled import
|
|
8412
|
+
* resumes where it stopped unless `restart` is true.
|
|
8413
|
+
*/
|
|
8414
|
+
async runSubsetImport(wid, connectionId, importId, options) {
|
|
8415
|
+
return this.fetch(
|
|
8416
|
+
this.subsetImportsPath(wid, connectionId, `/${encodeURIComponent(importId)}/run`),
|
|
8417
|
+
{ method: "POST", body: JSON.stringify({ restart: options?.restart ?? false }) }
|
|
8418
|
+
);
|
|
8419
|
+
}
|
|
8420
|
+
/** Ask a running import to stop (202); its progress is kept for a resume. */
|
|
8421
|
+
async cancelSubsetImport(wid, connectionId, importId) {
|
|
8422
|
+
return this.fetch(
|
|
8423
|
+
this.subsetImportsPath(wid, connectionId, `/${encodeURIComponent(importId)}/cancel`),
|
|
8424
|
+
// The CSRF barrier refuses a body-less POST (422); `{}` is the request.
|
|
8425
|
+
{ method: "POST", body: JSON.stringify({}) }
|
|
8426
|
+
);
|
|
8427
|
+
}
|
|
8428
|
+
/** The connection's import-run history, newest first (counts only). */
|
|
8429
|
+
async listSubsetImportRuns(wid, connectionId, limit = 20) {
|
|
8430
|
+
return this.fetch(
|
|
8431
|
+
this.subsetImportsPath(wid, connectionId, `/runs?limit=${limit}`)
|
|
8432
|
+
);
|
|
8433
|
+
}
|
|
8434
|
+
/** Vendor lists a `vendor_list` import can name (configuration only). */
|
|
8435
|
+
async listSubsetImportVendorLists(wid, connectionId, options) {
|
|
8436
|
+
const query2 = new URLSearchParams({
|
|
8437
|
+
query: options?.query ?? "",
|
|
8438
|
+
limit: String(options?.limit ?? 50)
|
|
8439
|
+
});
|
|
8440
|
+
return this.fetch(
|
|
8441
|
+
this.subsetImportsPath(wid, connectionId, `/vendor-lists?${query2}`)
|
|
8442
|
+
);
|
|
8443
|
+
}
|
|
8444
|
+
/** Remote fields a `field_filter` import can name, with their operators. */
|
|
8445
|
+
async listSubsetImportFilterFields(wid, connectionId) {
|
|
8446
|
+
return this.fetch(
|
|
8447
|
+
this.subsetImportsPath(wid, connectionId, "/filter-fields")
|
|
8448
|
+
);
|
|
8449
|
+
}
|
|
8450
|
+
};
|
|
8451
|
+
|
|
8452
|
+
// src/api/salesforce.ts
|
|
8453
|
+
var SalesforceApi = class extends BaseApiClient {
|
|
8454
|
+
/**
|
|
8455
|
+
* Create the Salesforce connection shell (no credentials yet).
|
|
8456
|
+
*
|
|
8457
|
+
* First step of the guided setup flow: provisions the connection row so
|
|
8458
|
+
* the admin lands on the detail page where the OAuth callback URL is
|
|
8459
|
+
* shown — which they need to register their Salesforce Connected App
|
|
8460
|
+
* before they have a Client ID / Secret to enter. Idempotent.
|
|
8461
|
+
*/
|
|
8462
|
+
async installSalesforce(wid, data) {
|
|
8463
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/install`, {
|
|
8464
|
+
method: "POST",
|
|
8465
|
+
body: JSON.stringify(data ?? {})
|
|
8466
|
+
});
|
|
8467
|
+
}
|
|
8468
|
+
async configureSalesforce(wid, data) {
|
|
8469
|
+
return this.fetch(
|
|
8470
|
+
`w/${wid}/app-connections/salesforce/configure`,
|
|
8471
|
+
{
|
|
8472
|
+
method: "POST",
|
|
8473
|
+
body: JSON.stringify(data)
|
|
8474
|
+
}
|
|
8475
|
+
);
|
|
8476
|
+
}
|
|
8477
|
+
async startSalesforceOAuth(wid) {
|
|
8478
|
+
return this.fetch(
|
|
8479
|
+
`w/${wid}/app-connections/salesforce/oauth/start`,
|
|
8480
|
+
{
|
|
8481
|
+
method: "POST"
|
|
8482
|
+
}
|
|
8483
|
+
);
|
|
8484
|
+
}
|
|
8485
|
+
async getSalesforceStatus(wid) {
|
|
8486
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/status`);
|
|
8487
|
+
}
|
|
8488
|
+
async disconnectSalesforce(wid) {
|
|
8489
|
+
return this.fetch(
|
|
8490
|
+
`w/${wid}/app-connections/salesforce/disconnect`,
|
|
8491
|
+
{
|
|
8492
|
+
method: "DELETE"
|
|
8493
|
+
}
|
|
8494
|
+
);
|
|
8495
|
+
}
|
|
8496
|
+
async disableSalesforce(wid) {
|
|
8497
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/disable`, {
|
|
8498
|
+
method: "POST"
|
|
8499
|
+
});
|
|
8500
|
+
}
|
|
8501
|
+
async enableSalesforce(wid) {
|
|
8502
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/enable`, {
|
|
8503
|
+
method: "POST"
|
|
8504
|
+
});
|
|
8505
|
+
}
|
|
8506
|
+
async deleteSalesforce(wid) {
|
|
8507
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/delete`, {
|
|
8508
|
+
method: "DELETE"
|
|
8509
|
+
});
|
|
8510
|
+
}
|
|
8511
|
+
async getSalesforceReconciliationMatches(wid, params) {
|
|
8512
|
+
const query2 = new URLSearchParams();
|
|
8513
|
+
if (params?.limit !== void 0) query2.set("limit", String(params.limit));
|
|
8514
|
+
if (params?.offset !== void 0) query2.set("offset", String(params.offset));
|
|
8515
|
+
const qs = query2.toString() ? `?${query2.toString()}` : "";
|
|
8516
|
+
return this.fetch(
|
|
8517
|
+
`w/${wid}/app-connections/salesforce/reconciliation/matches${qs}`
|
|
8518
|
+
);
|
|
8519
|
+
}
|
|
8520
|
+
async linkMemberToSalesforce(wid, data) {
|
|
8521
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/reconciliation/link`, {
|
|
8522
|
+
method: "POST",
|
|
8523
|
+
body: JSON.stringify(data)
|
|
8524
|
+
});
|
|
8525
|
+
}
|
|
8526
|
+
async bulkLinkMembersToSalesforce(wid, data) {
|
|
8527
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/reconciliation/link/bulk`, {
|
|
8528
|
+
method: "POST",
|
|
8529
|
+
body: JSON.stringify(data)
|
|
8530
|
+
});
|
|
8531
|
+
}
|
|
8532
|
+
/**
|
|
8533
|
+
* @deprecated Use `linkUnlinkedMembersByIdentity(wid, connectionId)`, which
|
|
8534
|
+
* serves every connector that links by identity. This calls the retained
|
|
8535
|
+
* Salesforce-only route and will be removed once no caller remains.
|
|
8536
|
+
*/
|
|
8537
|
+
async linkUnlinkedSalesforceMembersByIdentity(wid) {
|
|
8538
|
+
return this.fetch(
|
|
8539
|
+
`w/${wid}/app-connections/salesforce/reconciliation/link-unlinked-by-identity`,
|
|
8540
|
+
{
|
|
8541
|
+
method: "POST",
|
|
8542
|
+
body: JSON.stringify({})
|
|
8543
|
+
}
|
|
8544
|
+
);
|
|
8545
|
+
}
|
|
8546
|
+
async unlinkMemberFromSalesforce(wid, memberId) {
|
|
8547
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/reconciliation/unlink/${memberId}`, {
|
|
8548
|
+
method: "DELETE"
|
|
8549
|
+
});
|
|
8550
|
+
}
|
|
8551
|
+
async getLinkedSalesforceMembers(wid, params) {
|
|
8552
|
+
const query2 = new URLSearchParams();
|
|
8553
|
+
if (params?.page !== void 0) query2.set("page", String(params.page));
|
|
8554
|
+
if (params?.pageSize !== void 0) query2.set("pageSize", String(params.pageSize));
|
|
8555
|
+
if (params?.search?.trim()) query2.set("search", params.search.trim());
|
|
8556
|
+
const qs = query2.toString() ? `?${query2.toString()}` : "";
|
|
8557
|
+
return this.fetch(
|
|
8558
|
+
`w/${wid}/app-connections/salesforce/reconciliation/linked${qs}`
|
|
8559
|
+
);
|
|
8560
|
+
}
|
|
8561
|
+
// --- Sync config ---
|
|
8562
|
+
async getSalesforceSyncConfig(wid) {
|
|
8563
|
+
return this.fetch(
|
|
8564
|
+
`w/${wid}/app-connections/salesforce/sync/config`
|
|
7994
8565
|
);
|
|
7995
8566
|
}
|
|
7996
|
-
/**
|
|
7997
|
-
|
|
8567
|
+
/**
|
|
8568
|
+
* Save the config and settings together; returns them with the new
|
|
8569
|
+
* `configDigest`. Pass the digest they were read with as
|
|
8570
|
+
* `options.baseConfigDigest` (409 `sync_config_changed` when it changed).
|
|
8571
|
+
*/
|
|
8572
|
+
async updateSalesforceSyncConfig(wid, data, options = {}) {
|
|
7998
8573
|
return this.fetch(
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8574
|
+
`w/${wid}/app-connections/salesforce/sync/config${syncConfigQuery(options, false)}`,
|
|
8575
|
+
{
|
|
8576
|
+
method: "PUT",
|
|
8577
|
+
body: JSON.stringify(data)
|
|
8578
|
+
}
|
|
8002
8579
|
);
|
|
8003
8580
|
}
|
|
8004
8581
|
/**
|
|
8005
|
-
*
|
|
8006
|
-
*
|
|
8582
|
+
* Run every save-time check -- including the upsert-field describe when
|
|
8583
|
+
* Member outbound is newly enabled or re-keyed -- without saving.
|
|
8007
8584
|
*/
|
|
8008
|
-
async
|
|
8585
|
+
async validateSalesforceSyncConfig(wid, data, options = {}) {
|
|
8009
8586
|
return this.fetch(
|
|
8010
|
-
|
|
8011
|
-
{
|
|
8587
|
+
`w/${wid}/app-connections/salesforce/sync/config${syncConfigQuery(options, true)}`,
|
|
8588
|
+
{
|
|
8589
|
+
method: "PUT",
|
|
8590
|
+
body: JSON.stringify(data)
|
|
8591
|
+
}
|
|
8012
8592
|
);
|
|
8013
8593
|
}
|
|
8014
|
-
/**
|
|
8015
|
-
|
|
8594
|
+
/**
|
|
8595
|
+
* Pull linked members' Salesforce records now, ignoring the sync cursor.
|
|
8596
|
+
*
|
|
8597
|
+
* The inbound poll only ever returns records modified after the stored
|
|
8598
|
+
* cursor, so a member linked to a record that has not changed since is
|
|
8599
|
+
* unreachable by any poll and its link never receives a field — silently.
|
|
8600
|
+
* This fetches the records by Id and leaves the cursor untouched, so it is
|
|
8601
|
+
* safe to call at any time.
|
|
8602
|
+
*
|
|
8603
|
+
* Omit `memberIds` to resync every linked member (capped server-side).
|
|
8604
|
+
*/
|
|
8605
|
+
async resyncSalesforceLinkedMembers(wid, data = {}) {
|
|
8016
8606
|
return this.fetch(
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8607
|
+
`w/${wid}/app-connections/salesforce/sync/resync-members`,
|
|
8608
|
+
{
|
|
8609
|
+
method: "POST",
|
|
8610
|
+
body: JSON.stringify(data)
|
|
8611
|
+
}
|
|
8020
8612
|
);
|
|
8021
8613
|
}
|
|
8022
|
-
/**
|
|
8023
|
-
|
|
8614
|
+
/**
|
|
8615
|
+
* List the sObjects available in the connected org.
|
|
8616
|
+
*
|
|
8617
|
+
* Backs the Target Object picker: the object set is org-specific (custom
|
|
8618
|
+
* objects included), so it must come from the org rather than a hardcoded
|
|
8619
|
+
* list.
|
|
8620
|
+
*/
|
|
8621
|
+
async listSalesforceObjects(wid) {
|
|
8622
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/objects`);
|
|
8623
|
+
}
|
|
8624
|
+
async describeSalesforceObject(wid, sobject) {
|
|
8024
8625
|
return this.fetch(
|
|
8025
|
-
|
|
8626
|
+
`w/${wid}/app-connections/salesforce/describe/${encodeURIComponent(sobject)}`
|
|
8026
8627
|
);
|
|
8027
8628
|
}
|
|
8028
|
-
|
|
8029
|
-
async
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8629
|
+
// --- Search & Import ---
|
|
8630
|
+
async searchSalesforceRecords(wid, data) {
|
|
8631
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/search`, {
|
|
8632
|
+
method: "POST",
|
|
8633
|
+
body: JSON.stringify(data)
|
|
8033
8634
|
});
|
|
8635
|
+
}
|
|
8636
|
+
async importSalesforceMembers(wid, data) {
|
|
8034
8637
|
return this.fetch(
|
|
8035
|
-
|
|
8638
|
+
`w/${wid}/app-connections/salesforce/import-members`,
|
|
8639
|
+
{
|
|
8640
|
+
method: "POST",
|
|
8641
|
+
body: JSON.stringify(data)
|
|
8642
|
+
}
|
|
8036
8643
|
);
|
|
8037
8644
|
}
|
|
8038
|
-
/**
|
|
8039
|
-
|
|
8645
|
+
/**
|
|
8646
|
+
* Managed-rule execution history for this connection (`GET /sync/logs`):
|
|
8647
|
+
* the connection's managed EventRule executions, newest first, with the
|
|
8648
|
+
* shared cursor pagination. Requires `apps:read`; works while the
|
|
8649
|
+
* connection is parked for re-authorization.
|
|
8650
|
+
*/
|
|
8651
|
+
async getSalesforceSyncLogs(wid, params) {
|
|
8652
|
+
const query2 = new URLSearchParams();
|
|
8653
|
+
if (params?.pageSize) query2.set("pageSize", String(params.pageSize));
|
|
8654
|
+
if (params?.cursor) query2.set("cursor", params.cursor);
|
|
8655
|
+
const qs = query2.toString() ? `?${query2.toString()}` : "";
|
|
8040
8656
|
return this.fetch(
|
|
8041
|
-
|
|
8657
|
+
`w/${wid}/app-connections/salesforce/sync/logs${qs}`
|
|
8042
8658
|
);
|
|
8043
8659
|
}
|
|
8044
8660
|
};
|
|
@@ -8110,6 +8726,18 @@ var HubspotApi = class extends BaseApiClient {
|
|
|
8110
8726
|
method: "DELETE"
|
|
8111
8727
|
});
|
|
8112
8728
|
}
|
|
8729
|
+
/**
|
|
8730
|
+
* Move a connection from its own HubSpot app onto the shared Gravity Rail
|
|
8731
|
+
* app. Sync settings and Member links stay. A connection whose saved Client
|
|
8732
|
+
* ID is the shared app's stays connected; any other returns to setup and is
|
|
8733
|
+
* connected again with `startHubspotOAuth`.
|
|
8734
|
+
*/
|
|
8735
|
+
async switchHubspotToPlatformApp(wid) {
|
|
8736
|
+
return this.fetch(
|
|
8737
|
+
`w/${wid}/app-connections/hubspot/use-platform-app`,
|
|
8738
|
+
{ method: "POST", body: JSON.stringify({}) }
|
|
8739
|
+
);
|
|
8740
|
+
}
|
|
8113
8741
|
async disableHubspot(wid) {
|
|
8114
8742
|
return this.fetch(`w/${wid}/app-connections/hubspot/disable`, {
|
|
8115
8743
|
method: "POST"
|
|
@@ -8190,6 +8818,16 @@ var HubspotApi = class extends BaseApiClient {
|
|
|
8190
8818
|
`w/${wid}/app-connections/hubspot/sync-settings/meeting-links`
|
|
8191
8819
|
);
|
|
8192
8820
|
}
|
|
8821
|
+
/**
|
|
8822
|
+
* The HubSpot objects a `crm_objects` record source may read (Services and the
|
|
8823
|
+
* portal's custom objects) with their properties, and each family's status
|
|
8824
|
+
* (`missing_scope` without that family's object and schema scopes).
|
|
8825
|
+
*/
|
|
8826
|
+
async getHubspotCrmObjects(wid) {
|
|
8827
|
+
return this.fetch(
|
|
8828
|
+
`w/${wid}/app-connections/hubspot/sync-settings/crm-objects`
|
|
8829
|
+
);
|
|
8830
|
+
}
|
|
8193
8831
|
/** The portal's forms and their fields, or `missing_scope` without the `forms` scope. */
|
|
8194
8832
|
async getHubspotForms(wid) {
|
|
8195
8833
|
return this.fetch(
|
|
@@ -8596,12 +9234,6 @@ var SnippetsApi = class extends BaseApiClient {
|
|
|
8596
9234
|
async getSnippet(wid, id) {
|
|
8597
9235
|
return this.fetch(`w/${wid}/snippets/${id}`);
|
|
8598
9236
|
}
|
|
8599
|
-
async createSnippet(wid, data) {
|
|
8600
|
-
return this.fetch(`w/${wid}/snippets`, {
|
|
8601
|
-
method: "POST",
|
|
8602
|
-
body: JSON.stringify(data)
|
|
8603
|
-
});
|
|
8604
|
-
}
|
|
8605
9237
|
async updateSnippet(wid, id, data) {
|
|
8606
9238
|
return this.fetch(`w/${wid}/snippets/${id}`, {
|
|
8607
9239
|
method: "PUT",
|
|
@@ -8692,7 +9324,7 @@ var SubscriptionsApi = class extends BaseApiClient {
|
|
|
8692
9324
|
);
|
|
8693
9325
|
}
|
|
8694
9326
|
/**
|
|
8695
|
-
* List self-service, purchasable organization plans
|
|
9327
|
+
* List self-service, purchasable organization plans. Only products
|
|
8696
9328
|
* with a Stripe Price are returned; zero-amount plans are allowed.
|
|
8697
9329
|
*/
|
|
8698
9330
|
async listSelfServeProducts(productType) {
|
|
@@ -8780,9 +9412,6 @@ function supportRequestParams(params) {
|
|
|
8780
9412
|
if (params?.workspaceId !== void 0) {
|
|
8781
9413
|
searchParams.append("workspaceId", params.workspaceId.toString());
|
|
8782
9414
|
}
|
|
8783
|
-
if (params?.linearLinked !== void 0) {
|
|
8784
|
-
searchParams.append("linearLinked", params.linearLinked.toString());
|
|
8785
|
-
}
|
|
8786
9415
|
const query2 = searchParams.toString();
|
|
8787
9416
|
return query2 ? `?${query2}` : "";
|
|
8788
9417
|
}
|
|
@@ -8827,6 +9456,18 @@ var SupportRequestsApi = class extends BaseApiClient {
|
|
|
8827
9456
|
body: JSON.stringify(data)
|
|
8828
9457
|
});
|
|
8829
9458
|
}
|
|
9459
|
+
/** Admins of this organization a new or existing request can copy in. */
|
|
9460
|
+
async listOrgSupportRequestCcCandidates(orgUuid) {
|
|
9461
|
+
return this.fetch(
|
|
9462
|
+
`o/${orgUuid}/support-requests/cc-candidates`
|
|
9463
|
+
);
|
|
9464
|
+
}
|
|
9465
|
+
async addOrgSupportRequestParticipants(orgUuid, uuid, data) {
|
|
9466
|
+
return this.fetch(`o/${orgUuid}/support-requests/${uuid}/participants`, {
|
|
9467
|
+
method: "POST",
|
|
9468
|
+
body: JSON.stringify(data)
|
|
9469
|
+
});
|
|
9470
|
+
}
|
|
8830
9471
|
async listWorkspaceSupportRequests(workspaceUuid, params) {
|
|
8831
9472
|
return this.fetch(
|
|
8832
9473
|
`w/${workspaceUuid}/support-requests${supportRequestParams(params)}`
|
|
@@ -8847,6 +9488,21 @@ var SupportRequestsApi = class extends BaseApiClient {
|
|
|
8847
9488
|
body: JSON.stringify(data)
|
|
8848
9489
|
});
|
|
8849
9490
|
}
|
|
9491
|
+
/** Admins of this workspace and its organization a request can copy in. */
|
|
9492
|
+
async listWorkspaceSupportRequestCcCandidates(workspaceUuid) {
|
|
9493
|
+
return this.fetch(
|
|
9494
|
+
`w/${workspaceUuid}/support-requests/cc-candidates`
|
|
9495
|
+
);
|
|
9496
|
+
}
|
|
9497
|
+
async addWorkspaceSupportRequestParticipants(workspaceUuid, uuid, data) {
|
|
9498
|
+
return this.fetch(
|
|
9499
|
+
`w/${workspaceUuid}/support-requests/${uuid}/participants`,
|
|
9500
|
+
{
|
|
9501
|
+
method: "POST",
|
|
9502
|
+
body: JSON.stringify(data)
|
|
9503
|
+
}
|
|
9504
|
+
);
|
|
9505
|
+
}
|
|
8850
9506
|
async closeWorkspaceSupportRequest(workspaceUuid, uuid, data = {}) {
|
|
8851
9507
|
return this.fetch(`w/${workspaceUuid}/support-requests/${uuid}/close`, {
|
|
8852
9508
|
method: "POST",
|
|
@@ -9066,6 +9722,10 @@ var TasksApi = class extends BaseApiClient {
|
|
|
9066
9722
|
`w/${wid}/tasks${params.toString() ? `?${params.toString()}` : ""}`
|
|
9067
9723
|
);
|
|
9068
9724
|
}
|
|
9725
|
+
/** Task identity only, with the same access and visibility as getTasks. */
|
|
9726
|
+
async getTaskCatalog(wid) {
|
|
9727
|
+
return this.fetch(`w/${wid}/tasks?catalog=true`);
|
|
9728
|
+
}
|
|
9069
9729
|
/** Get a single task by ID. */
|
|
9070
9730
|
async getTask(wid, id) {
|
|
9071
9731
|
return this.fetch(`w/${wid}/tasks/${id}`);
|
|
@@ -9187,6 +9847,41 @@ var ToolkitsApi = class extends BaseApiClient {
|
|
|
9187
9847
|
|
|
9188
9848
|
// src/api/journeys.ts
|
|
9189
9849
|
var JourneysApi = class extends BaseApiClient {
|
|
9850
|
+
async listJourneyTests(wid, journeyId) {
|
|
9851
|
+
return this.fetch(`w/${wid}/journeys/${journeyId}/tests`);
|
|
9852
|
+
}
|
|
9853
|
+
async createJourneyTest(wid, journeyId, data) {
|
|
9854
|
+
return this.fetch(`w/${wid}/journeys/${journeyId}/tests`, {
|
|
9855
|
+
method: "POST",
|
|
9856
|
+
body: JSON.stringify(data)
|
|
9857
|
+
});
|
|
9858
|
+
}
|
|
9859
|
+
async updateJourneyTest(wid, journeyId, testUuid, data) {
|
|
9860
|
+
return this.fetch(`w/${wid}/journeys/${journeyId}/tests/${encodeURIComponent(testUuid)}`, {
|
|
9861
|
+
method: "PATCH",
|
|
9862
|
+
body: JSON.stringify(data)
|
|
9863
|
+
});
|
|
9864
|
+
}
|
|
9865
|
+
async deleteJourneyTest(wid, journeyId, testUuid) {
|
|
9866
|
+
await this.fetch(`w/${wid}/journeys/${journeyId}/tests/${encodeURIComponent(testUuid)}`, {
|
|
9867
|
+
method: "DELETE"
|
|
9868
|
+
});
|
|
9869
|
+
}
|
|
9870
|
+
async runJourneyTests(wid, journeyId, init) {
|
|
9871
|
+
return this.fetch(`w/${wid}/journeys/${journeyId}/tests/run`, {
|
|
9872
|
+
method: "POST",
|
|
9873
|
+
body: JSON.stringify({}),
|
|
9874
|
+
signal: init?.signal
|
|
9875
|
+
});
|
|
9876
|
+
}
|
|
9877
|
+
/** Preview a saved or enrollment definition without enrolling or sending. */
|
|
9878
|
+
async simulateJourney(wid, journeyId, data, init) {
|
|
9879
|
+
return this.fetch(`w/${wid}/journeys/${journeyId}/simulate`, {
|
|
9880
|
+
method: "POST",
|
|
9881
|
+
body: JSON.stringify(data),
|
|
9882
|
+
signal: init?.signal
|
|
9883
|
+
});
|
|
9884
|
+
}
|
|
9190
9885
|
async putJourneyDraft(wid, journeyId, data) {
|
|
9191
9886
|
return this.fetch(`w/${wid}/journeys/${journeyId}/draft`, {
|
|
9192
9887
|
method: "PUT",
|
|
@@ -9223,7 +9918,7 @@ var JourneysApi = class extends BaseApiClient {
|
|
|
9223
9918
|
/**
|
|
9224
9919
|
* List journeys, optionally including archived, paginated.
|
|
9225
9920
|
*
|
|
9226
|
-
* Returns the READ projection (`JourneyRead`)
|
|
9921
|
+
* Returns the READ projection (`JourneyRead`), including edge CEL. Use
|
|
9227
9922
|
* {@link getJourneyAuthoring} for the editor's expression-carrying shape.
|
|
9228
9923
|
*/
|
|
9229
9924
|
async getJourneys(wid, includeArchived = false, pageOpts) {
|
|
@@ -9239,19 +9934,18 @@ var JourneysApi = class extends BaseApiClient {
|
|
|
9239
9934
|
/**
|
|
9240
9935
|
* Get a single journey by ID (includes steps and goals).
|
|
9241
9936
|
*
|
|
9242
|
-
* Returns the READ projection (`JourneyRead`)
|
|
9243
|
-
*
|
|
9244
|
-
* {@link getJourneyAuthoring} for those.
|
|
9937
|
+
* Returns the READ projection (`JourneyRead`) with edge `celCondition`.
|
|
9938
|
+
* Goal and decision-rule CEL remain on {@link getJourneyAuthoring}.
|
|
9245
9939
|
*/
|
|
9246
9940
|
async getJourney(wid, journeyId) {
|
|
9247
9941
|
return this.fetch(`w/${wid}/journeys/${journeyId}`);
|
|
9248
9942
|
}
|
|
9249
9943
|
/**
|
|
9250
|
-
* Get a journey's AUTHORING projection
|
|
9944
|
+
* Get a journey's write-authorized AUTHORING projection.
|
|
9251
9945
|
*
|
|
9252
|
-
*
|
|
9253
|
-
*
|
|
9254
|
-
* write-authorized surface that carries them for the Journey editor — it
|
|
9946
|
+
* The ordinary `getJourney` read projection includes edge CEL but omits
|
|
9947
|
+
* goal and decision-rule CEL and owned Member predicates. This endpoint is
|
|
9948
|
+
* the write-authorized surface that carries them for the Journey editor — it
|
|
9255
9949
|
* requires the `journeys:write` scope, so a read-only caller is denied and
|
|
9256
9950
|
* must not call it. Returns the authoring superset (`Journey`).
|
|
9257
9951
|
*/
|
|
@@ -9277,7 +9971,7 @@ var JourneysApi = class extends BaseApiClient {
|
|
|
9277
9971
|
* * `journey_v2_invalid_topology` — the resulting graph is not executable;
|
|
9278
9972
|
* the body carries `issues` (codes and resource uuids, never CEL).
|
|
9279
9973
|
*/
|
|
9280
|
-
async
|
|
9974
|
+
async putJourneyDefinition(wid, journeyId, data) {
|
|
9281
9975
|
return this.fetch(`w/${wid}/journeys/${journeyId}/v2-definition`, {
|
|
9282
9976
|
method: "PUT",
|
|
9283
9977
|
body: JSON.stringify(data)
|
|
@@ -9290,7 +9984,7 @@ var JourneysApi = class extends BaseApiClient {
|
|
|
9290
9984
|
* transition. Issues carry closed codes and resource uuids only — never CEL
|
|
9291
9985
|
* and never member data — so they are safe to render or log.
|
|
9292
9986
|
*/
|
|
9293
|
-
async
|
|
9987
|
+
async getJourneyDefinitionValidation(wid, journeyId) {
|
|
9294
9988
|
return this.fetch(
|
|
9295
9989
|
`w/${wid}/journeys/${journeyId}/v2-definition/validation`
|
|
9296
9990
|
);
|
|
@@ -9312,7 +10006,7 @@ var JourneysApi = class extends BaseApiClient {
|
|
|
9312
10006
|
return this.fetch(`w/${wid}/journeys/filter-options`);
|
|
9313
10007
|
}
|
|
9314
10008
|
/** Copy a supported legacy definition into a separate draft V2 Journey. */
|
|
9315
|
-
async
|
|
10009
|
+
async cloneJourneyToCurrent(wid, id) {
|
|
9316
10010
|
return this.fetch(`w/${wid}/journeys/${id}/clone-v2`, {
|
|
9317
10011
|
method: "POST",
|
|
9318
10012
|
body: JSON.stringify({})
|
|
@@ -9353,6 +10047,25 @@ var JourneysApi = class extends BaseApiClient {
|
|
|
9353
10047
|
async getJourneyHealth(wid, journeyId) {
|
|
9354
10048
|
return this.fetch(`w/${wid}/journeys/${journeyId}/health`);
|
|
9355
10049
|
}
|
|
10050
|
+
/**
|
|
10051
|
+
* A Journey's audit trail, newest first: who created it, changed its
|
|
10052
|
+
* lifecycle (with the status before and after), changed its settings or
|
|
10053
|
+
* definition, or cut a version (with its number), and when. IDs, field
|
|
10054
|
+
* codes and closed values only.
|
|
10055
|
+
*
|
|
10056
|
+
* The window defaults to the Journey's whole life. Pass `nextCursor` back
|
|
10057
|
+
* with the same window to read the next page. Requires `journeys:read` and
|
|
10058
|
+
* `workspace:read`.
|
|
10059
|
+
*/
|
|
10060
|
+
async getJourneyHistory(wid, journeyId, opts) {
|
|
10061
|
+
const query2 = new URLSearchParams();
|
|
10062
|
+
if (opts?.occurredFrom) query2.set("occurredFrom", opts.occurredFrom);
|
|
10063
|
+
if (opts?.occurredBefore) query2.set("occurredBefore", opts.occurredBefore);
|
|
10064
|
+
if (opts?.cursor) query2.set("cursor", opts.cursor);
|
|
10065
|
+
if (opts?.pageSize !== void 0) query2.set("pageSize", String(opts.pageSize));
|
|
10066
|
+
const qs = query2.toString() ? `?${query2.toString()}` : "";
|
|
10067
|
+
return this.fetch(`w/${wid}/journeys/${journeyId}/history${qs}`);
|
|
10068
|
+
}
|
|
9356
10069
|
/**
|
|
9357
10070
|
* How many days the journey's texts take at the workspace's current sending
|
|
9358
10071
|
* limits — advice for the publish and enroll confirmations, never a gate.
|
|
@@ -9587,10 +10300,11 @@ var JourneysApi = class extends BaseApiClient {
|
|
|
9587
10300
|
|
|
9588
10301
|
// src/api/workflows.ts
|
|
9589
10302
|
var WorkflowsApi = class extends BaseApiClient {
|
|
9590
|
-
async uploadWorkflowKnowledge(wid, id, file, relativePath) {
|
|
10303
|
+
async uploadWorkflowKnowledge(wid, id, file, relativePath, folderId) {
|
|
9591
10304
|
const body = new FormData();
|
|
9592
10305
|
body.append("file", file, relativePath.split("/").pop());
|
|
9593
10306
|
body.append("relativePath", relativePath);
|
|
10307
|
+
if (folderId !== void 0) body.append("folderId", String(folderId));
|
|
9594
10308
|
return this.fetch(`w/${wid}/workflows/${id}/knowledge/uploads`, { method: "POST", body });
|
|
9595
10309
|
}
|
|
9596
10310
|
/** List workflows by archived status; `archived: true` returns only archived Workflows. */
|
|
@@ -9751,6 +10465,16 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
9751
10465
|
`w/${wid}/workflows/${workflowId}/validate-config`
|
|
9752
10466
|
);
|
|
9753
10467
|
}
|
|
10468
|
+
/**
|
|
10469
|
+
* Files and Folders the draft config names that the Workflow's runner
|
|
10470
|
+
* roles cannot read. Read-only: sharing is a separate, explicit call to the
|
|
10471
|
+
* file or folder sharing-roles endpoint.
|
|
10472
|
+
*/
|
|
10473
|
+
async getWorkflowRunnerFileAccess(wid, workflowId) {
|
|
10474
|
+
return this.fetch(
|
|
10475
|
+
`w/${wid}/workflows/${workflowId}/runner-file-access`
|
|
10476
|
+
);
|
|
10477
|
+
}
|
|
9754
10478
|
/**
|
|
9755
10479
|
* Classify the prompts of a Workflow's draft revision.
|
|
9756
10480
|
*
|
|
@@ -10215,6 +10939,7 @@ var MemberType = /* @__PURE__ */ ((MemberType2) => {
|
|
|
10215
10939
|
MemberType2["TEST"] = "test";
|
|
10216
10940
|
MemberType2["MEMBER"] = "member";
|
|
10217
10941
|
MemberType2["AGENT"] = "agent";
|
|
10942
|
+
MemberType2["BUSINESS"] = "business";
|
|
10218
10943
|
return MemberType2;
|
|
10219
10944
|
})(MemberType || {});
|
|
10220
10945
|
function structuredErrorDetail(error) {
|
|
@@ -10287,9 +11012,6 @@ var EventRuleObjectType = /* @__PURE__ */ ((EventRuleObjectType2) => {
|
|
|
10287
11012
|
})(EventRuleObjectType || {});
|
|
10288
11013
|
var EventRuleEventType = /* @__PURE__ */ ((EventRuleEventType2) => {
|
|
10289
11014
|
EventRuleEventType2["TASK_EXECUTE"] = "task:execute";
|
|
10290
|
-
EventRuleEventType2["TASK_ENTER"] = "task:enter";
|
|
10291
|
-
EventRuleEventType2["TASK_COMMAND"] = "task:command";
|
|
10292
|
-
EventRuleEventType2["TASK_EXIT"] = "task:exit";
|
|
10293
11015
|
EventRuleEventType2["MEMBER_JOINED"] = "workspace:member_joined";
|
|
10294
11016
|
EventRuleEventType2["MEMBER_LEFT"] = "workspace:member_left";
|
|
10295
11017
|
EventRuleEventType2["DATA_RECORD_CREATED"] = "data_record:created";
|
|
@@ -10331,10 +11053,6 @@ var EventRuleActionType = /* @__PURE__ */ ((EventRuleActionType2) => {
|
|
|
10331
11053
|
EventRuleActionType2["SWITCH_TASK_ACTION"] = "task:switch";
|
|
10332
11054
|
EventRuleActionType2["ASSISTANT_MESSAGE"] = "assistant:message";
|
|
10333
11055
|
EventRuleActionType2["FORM_FIELD_UPDATE"] = "form:update_field";
|
|
10334
|
-
EventRuleActionType2["CEL_MUTATE"] = "record:cel_mutate";
|
|
10335
|
-
EventRuleActionType2["RECORD_COPY_FIELDS"] = "record:copy_fields";
|
|
10336
|
-
EventRuleActionType2["RECORD_UPSERT_LINKED"] = "record:upsert_linked";
|
|
10337
|
-
EventRuleActionType2["RECORD_VERIFY_FIELDS"] = "record:verify_fields";
|
|
10338
11056
|
EventRuleActionType2["MESSAGE_VALIDATION"] = "message:validation";
|
|
10339
11057
|
EventRuleActionType2["CHAT_CREATE"] = "chat:create";
|
|
10340
11058
|
EventRuleActionType2["CHAT_CONTINUE"] = "chat:continue";
|
|
@@ -10342,8 +11060,6 @@ var EventRuleActionType = /* @__PURE__ */ ((EventRuleActionType2) => {
|
|
|
10342
11060
|
EventRuleActionType2["CHAT_SUMMARIZE"] = "chat:summarize";
|
|
10343
11061
|
EventRuleActionType2["EMAIL_SEND"] = "email:send";
|
|
10344
11062
|
EventRuleActionType2["INVOKE_CUSTOM_TOOL"] = "custom_tool:invoke";
|
|
10345
|
-
EventRuleActionType2["MONDAY_UPSERT_ITEM"] = "monday:upsert_item";
|
|
10346
|
-
EventRuleActionType2["MONDAY_REFRESH"] = "monday:refresh";
|
|
10347
11063
|
EventRuleActionType2["HUBSPOT_CREATE_DEAL_FROM_BOOKING"] = "hubspot:create_deal_from_booking";
|
|
10348
11064
|
EventRuleActionType2["ASSIGNMENT_CONCLUDE"] = "assignment:conclude";
|
|
10349
11065
|
EventRuleActionType2["JOURNEY_ENROLL"] = "journey:enroll";
|
|
@@ -10355,7 +11071,6 @@ var EventRuleActionType = /* @__PURE__ */ ((EventRuleActionType2) => {
|
|
|
10355
11071
|
EventRuleActionType2["ECW_REFRESH_MEMBER_ENCOUNTERS"] = "ecw:refresh_member_encounters";
|
|
10356
11072
|
EventRuleActionType2["PLAY_AUDIO"] = "audio:play";
|
|
10357
11073
|
EventRuleActionType2["CHARLESTON_SEND_PMD_PAGE"] = "charleston:send_pmd_page";
|
|
10358
|
-
EventRuleActionType2["PATIENTSYNC_TRANSFER"] = "patientsync:transfer";
|
|
10359
11074
|
return EventRuleActionType2;
|
|
10360
11075
|
})(EventRuleActionType || {});
|
|
10361
11076
|
function eventRuleActionParams(params) {
|
|
@@ -10386,7 +11101,6 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
|
|
|
10386
11101
|
WorkspaceFeature2["DISCORD"] = "discord";
|
|
10387
11102
|
WorkspaceFeature2["SLACK"] = "slack";
|
|
10388
11103
|
WorkspaceFeature2["TEAMS"] = "teams";
|
|
10389
|
-
WorkspaceFeature2["SITES"] = "sites";
|
|
10390
11104
|
WorkspaceFeature2["MAPS"] = "maps";
|
|
10391
11105
|
WorkspaceFeature2["BROWSER"] = "browser";
|
|
10392
11106
|
WorkspaceFeature2["WEB_SEARCH"] = "web_search";
|
|
@@ -10410,11 +11124,6 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
|
|
|
10410
11124
|
WorkspaceFeature2["CHARLESTON_NEPHROLOGY_PMD_PAGING"] = "charleston_nephrology_pmd_paging";
|
|
10411
11125
|
WorkspaceFeature2["PATIENTSYNC_TRANSFER"] = "patientsync_transfer";
|
|
10412
11126
|
WorkspaceFeature2["COSAN_PATHWAYS_SCHEDULING"] = "cosan_pathways_scheduling";
|
|
10413
|
-
WorkspaceFeature2["OUTBOUND_CALL_INTENTS_PHONE_CALL"] = "outbound_call_intents_phone_call";
|
|
10414
|
-
WorkspaceFeature2["OUTBOUND_CALL_INTENTS_CHAT_CREATE"] = "outbound_call_intents_chat_create";
|
|
10415
|
-
WorkspaceFeature2["OUTBOUND_CALL_INTENTS_POST_CHAT_DIAL"] = "outbound_call_intents_post_chat_dial";
|
|
10416
|
-
WorkspaceFeature2["OUTBOUND_CALL_INTENTS_CHAT_CALLBACK"] = "outbound_call_intents_chat_callback";
|
|
10417
|
-
WorkspaceFeature2["OUTBOUND_CALL_INTENTS_ROUTINE"] = "outbound_call_intents_routine";
|
|
10418
11127
|
return WorkspaceFeature2;
|
|
10419
11128
|
})(WorkspaceFeature || {});
|
|
10420
11129
|
var MemberFeature = /* @__PURE__ */ ((MemberFeature2) => {
|
|
@@ -10451,7 +11160,6 @@ var Resource = /* @__PURE__ */ ((Resource2) => {
|
|
|
10451
11160
|
})(Resource || {});
|
|
10452
11161
|
var ProductType = /* @__PURE__ */ ((ProductType2) => {
|
|
10453
11162
|
ProductType2["ORG"] = "org";
|
|
10454
|
-
ProductType2["ADDON"] = "addon";
|
|
10455
11163
|
ProductType2["MEMBER"] = "member";
|
|
10456
11164
|
ProductType2["DEVICE"] = "device";
|
|
10457
11165
|
return ProductType2;
|
|
@@ -10536,8 +11244,6 @@ var ModelType = {
|
|
|
10536
11244
|
var REALTIME_MODEL_OPENAI = "openai:realtime:gpt-realtime";
|
|
10537
11245
|
var REALTIME_MODEL_OPENAI_MINI = "openai:realtime:gpt-realtime-mini";
|
|
10538
11246
|
var REALTIME_MODEL_OPENAI_2 = "openai:realtime:gpt-realtime-2";
|
|
10539
|
-
var REALTIME_MODEL_GEMINI = "google:aistudio:gemini-3.1-flash-live";
|
|
10540
|
-
var REALTIME_MODEL_GEMINI_VERTEX = "google:vertex:gemini-3.1-flash-live";
|
|
10541
11247
|
var REALTIME_MODEL_CUSTOM = "custom:realtime:composable";
|
|
10542
11248
|
var STT_MODEL_DEEPGRAM_FLUX = "deepgram:stt:flux-general-en";
|
|
10543
11249
|
var STT_MODEL_DEEPGRAM_FLUX_SELFHOST = "deepgram:stt:flux-general-en:selfhost";
|
|
@@ -10553,6 +11259,36 @@ var TTS_MODEL_DEEPGRAM_AURA_2 = "deepgram:tts:aura-2";
|
|
|
10553
11259
|
var TTS_MODEL_AWS_POLLY_GENERATIVE = "aws:tts:polly-generative";
|
|
10554
11260
|
var TTS_MODEL_AWS_POLLY_NEURAL = "aws:tts:polly-neural";
|
|
10555
11261
|
|
|
11262
|
+
// src/types/generated/org_billing.ts
|
|
11263
|
+
var DefaultCardConvergenceAction = {
|
|
11264
|
+
none: "none",
|
|
11265
|
+
clear_subscription_default: "clear_subscription_default",
|
|
11266
|
+
set_customer_default_then_clear: "set_customer_default_then_clear"
|
|
11267
|
+
};
|
|
11268
|
+
var DefaultCardConvergenceClassification = {
|
|
11269
|
+
already_converged: "already_converged",
|
|
11270
|
+
foreign_customer: "foreign_customer",
|
|
11271
|
+
customer_default_set: "customer_default_set",
|
|
11272
|
+
customer_default_missing: "customer_default_missing"
|
|
11273
|
+
};
|
|
11274
|
+
var DefaultCardConvergenceOutcome = {
|
|
11275
|
+
skipped: "skipped",
|
|
11276
|
+
planned: "planned",
|
|
11277
|
+
applied: "applied",
|
|
11278
|
+
failed: "failed"
|
|
11279
|
+
};
|
|
11280
|
+
var DefaultCardConvergenceStep = {
|
|
11281
|
+
retrieve_subscription: "retrieve_subscription",
|
|
11282
|
+
retrieve_customer: "retrieve_customer",
|
|
11283
|
+
set_customer_default: "set_customer_default",
|
|
11284
|
+
clear_subscription_default: "clear_subscription_default"
|
|
11285
|
+
};
|
|
11286
|
+
var OverdueInvoicePayment = {
|
|
11287
|
+
paid: "paid",
|
|
11288
|
+
processing: "processing",
|
|
11289
|
+
failed: "failed"
|
|
11290
|
+
};
|
|
11291
|
+
|
|
10556
11292
|
// src/types/generated/organization_billing.ts
|
|
10557
11293
|
var OrganizationClassification = {
|
|
10558
11294
|
commercial: "commercial",
|
|
@@ -10585,6 +11321,44 @@ var FhirClientType = /* @__PURE__ */ ((FhirClientType2) => {
|
|
|
10585
11321
|
return FhirClientType2;
|
|
10586
11322
|
})(FhirClientType || {});
|
|
10587
11323
|
|
|
11324
|
+
// src/types/generated/error.ts
|
|
11325
|
+
var SyncErrorCode = {
|
|
11326
|
+
missing_required_field: "missing_required_field",
|
|
11327
|
+
missing_target_datatype: "missing_target_datatype",
|
|
11328
|
+
missing_file_owner: "missing_file_owner",
|
|
11329
|
+
missing_space_mapping: "missing_space_mapping",
|
|
11330
|
+
unsupported_direction: "unsupported_direction",
|
|
11331
|
+
missing_enum_option: "missing_enum_option",
|
|
11332
|
+
missing_remote_label: "missing_remote_label",
|
|
11333
|
+
outbound_field_format_error: "outbound_field_format_error",
|
|
11334
|
+
local_entity_not_found: "local_entity_not_found",
|
|
11335
|
+
missing_local_link: "missing_local_link",
|
|
11336
|
+
missing_remote_mapping: "missing_remote_mapping",
|
|
11337
|
+
remote_api_error: "remote_api_error",
|
|
11338
|
+
remote_fetch_failed: "remote_fetch_failed",
|
|
11339
|
+
remote_missing_id: "remote_missing_id",
|
|
11340
|
+
remote_partial_failure: "remote_partial_failure",
|
|
11341
|
+
remote_inactive_record: "remote_inactive_record",
|
|
11342
|
+
remote_write_rejected: "remote_write_rejected",
|
|
11343
|
+
remote_write_uncertain: "remote_write_uncertain",
|
|
11344
|
+
side_effects_not_permitted: "side_effects_not_permitted",
|
|
11345
|
+
sync_operation_failed: "sync_operation_failed"
|
|
11346
|
+
};
|
|
11347
|
+
|
|
11348
|
+
// src/types/generated/connection_sync.ts
|
|
11349
|
+
var LinkFailureCode = {
|
|
11350
|
+
...SyncErrorCode,
|
|
11351
|
+
manual_unlink: "manual_unlink",
|
|
11352
|
+
ineligible_member: "ineligible_member",
|
|
11353
|
+
no_care_team_practitioner: "no_care_team_practitioner",
|
|
11354
|
+
unique_field_conflict: "unique_field_conflict",
|
|
11355
|
+
discovery_not_created: "discovery_not_created",
|
|
11356
|
+
discovery_not_admitted: "discovery_not_admitted",
|
|
11357
|
+
ambiguous_match: "ambiguous_match",
|
|
11358
|
+
sync_failed: "sync_failed",
|
|
11359
|
+
unexpected_error: "unexpected_error"
|
|
11360
|
+
};
|
|
11361
|
+
|
|
10588
11362
|
// src/types/app-connection-types.ts
|
|
10589
11363
|
var CrmActivityKind = /* @__PURE__ */ ((CrmActivityKind2) => {
|
|
10590
11364
|
CrmActivityKind2["MESSAGE"] = "message";
|
|
@@ -10620,6 +11394,7 @@ var TestChatRunLane = {
|
|
|
10620
11394
|
var TestChatRunOutcome = {
|
|
10621
11395
|
simulator_end: "simulator_end",
|
|
10622
11396
|
terminal_tool: "terminal_tool",
|
|
11397
|
+
human_handoff: "human_handoff",
|
|
10623
11398
|
agent_silent: "agent_silent",
|
|
10624
11399
|
max_turns: "max_turns",
|
|
10625
11400
|
human_end: "human_end",
|
|
@@ -10774,7 +11549,9 @@ var MemberRelationshipKind = {
|
|
|
10774
11549
|
legal_guardian_of: "legal_guardian_of",
|
|
10775
11550
|
healthcare_agent_of: "healthcare_agent_of",
|
|
10776
11551
|
doctor_of: "doctor_of",
|
|
10777
|
-
primary_contact_of: "primary_contact_of"
|
|
11552
|
+
primary_contact_of: "primary_contact_of",
|
|
11553
|
+
contact_owner_of: "contact_owner_of",
|
|
11554
|
+
employee_of: "employee_of"
|
|
10778
11555
|
};
|
|
10779
11556
|
var RelatedMemberRole = {
|
|
10780
11557
|
parent: "parent",
|
|
@@ -10794,7 +11571,11 @@ var RelatedMemberRole = {
|
|
|
10794
11571
|
doctor: "doctor",
|
|
10795
11572
|
patient: "patient",
|
|
10796
11573
|
primary_contact: "primary_contact",
|
|
10797
|
-
primary_contact_for: "primary_contact_for"
|
|
11574
|
+
primary_contact_for: "primary_contact_for",
|
|
11575
|
+
contact_owner: "contact_owner",
|
|
11576
|
+
owns_contact: "owns_contact",
|
|
11577
|
+
employee: "employee",
|
|
11578
|
+
employer: "employer"
|
|
10798
11579
|
};
|
|
10799
11580
|
var RelationshipCardinality = {
|
|
10800
11581
|
many_to_many: "many_to_many",
|
|
@@ -10814,13 +11595,37 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
10814
11595
|
"role": "parent",
|
|
10815
11596
|
"label": "Parent",
|
|
10816
11597
|
"inverseLabel": "Child",
|
|
10817
|
-
"description": "This person is a parent of the member. For a minor, also add Legal guardian if they should read the chart."
|
|
11598
|
+
"description": "This person is a parent of the member. For a minor, also add Legal guardian if they should read the chart.",
|
|
11599
|
+
"viewedMemberTypes": [
|
|
11600
|
+
"anonymous",
|
|
11601
|
+
"test",
|
|
11602
|
+
"member",
|
|
11603
|
+
"agent"
|
|
11604
|
+
],
|
|
11605
|
+
"relatedMemberTypes": [
|
|
11606
|
+
"anonymous",
|
|
11607
|
+
"test",
|
|
11608
|
+
"member",
|
|
11609
|
+
"agent"
|
|
11610
|
+
]
|
|
10818
11611
|
},
|
|
10819
11612
|
{
|
|
10820
11613
|
"role": "child",
|
|
10821
11614
|
"label": "Child",
|
|
10822
11615
|
"inverseLabel": "Parent",
|
|
10823
|
-
"description": "This person is a child of the member."
|
|
11616
|
+
"description": "This person is a child of the member.",
|
|
11617
|
+
"viewedMemberTypes": [
|
|
11618
|
+
"anonymous",
|
|
11619
|
+
"test",
|
|
11620
|
+
"member",
|
|
11621
|
+
"agent"
|
|
11622
|
+
],
|
|
11623
|
+
"relatedMemberTypes": [
|
|
11624
|
+
"anonymous",
|
|
11625
|
+
"test",
|
|
11626
|
+
"member",
|
|
11627
|
+
"agent"
|
|
11628
|
+
]
|
|
10824
11629
|
}
|
|
10825
11630
|
]
|
|
10826
11631
|
},
|
|
@@ -10834,7 +11639,19 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
10834
11639
|
"role": "sibling",
|
|
10835
11640
|
"label": "Sibling",
|
|
10836
11641
|
"inverseLabel": "Sibling",
|
|
10837
|
-
"description": "These members are siblings."
|
|
11642
|
+
"description": "These members are siblings.",
|
|
11643
|
+
"viewedMemberTypes": [
|
|
11644
|
+
"anonymous",
|
|
11645
|
+
"test",
|
|
11646
|
+
"member",
|
|
11647
|
+
"agent"
|
|
11648
|
+
],
|
|
11649
|
+
"relatedMemberTypes": [
|
|
11650
|
+
"anonymous",
|
|
11651
|
+
"test",
|
|
11652
|
+
"member",
|
|
11653
|
+
"agent"
|
|
11654
|
+
]
|
|
10838
11655
|
}
|
|
10839
11656
|
]
|
|
10840
11657
|
},
|
|
@@ -10848,7 +11665,19 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
10848
11665
|
"role": "spouse",
|
|
10849
11666
|
"label": "Spouse",
|
|
10850
11667
|
"inverseLabel": "Spouse",
|
|
10851
|
-
"description": "These members are spouses or partners."
|
|
11668
|
+
"description": "These members are spouses or partners.",
|
|
11669
|
+
"viewedMemberTypes": [
|
|
11670
|
+
"anonymous",
|
|
11671
|
+
"test",
|
|
11672
|
+
"member",
|
|
11673
|
+
"agent"
|
|
11674
|
+
],
|
|
11675
|
+
"relatedMemberTypes": [
|
|
11676
|
+
"anonymous",
|
|
11677
|
+
"test",
|
|
11678
|
+
"member",
|
|
11679
|
+
"agent"
|
|
11680
|
+
]
|
|
10852
11681
|
}
|
|
10853
11682
|
]
|
|
10854
11683
|
},
|
|
@@ -10862,13 +11691,37 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
10862
11691
|
"role": "caregiver",
|
|
10863
11692
|
"label": "Caregiver",
|
|
10864
11693
|
"inverseLabel": "Care recipient",
|
|
10865
|
-
"description": "This person provides care for the member at home."
|
|
11694
|
+
"description": "This person provides care for the member at home.",
|
|
11695
|
+
"viewedMemberTypes": [
|
|
11696
|
+
"anonymous",
|
|
11697
|
+
"test",
|
|
11698
|
+
"member",
|
|
11699
|
+
"agent"
|
|
11700
|
+
],
|
|
11701
|
+
"relatedMemberTypes": [
|
|
11702
|
+
"anonymous",
|
|
11703
|
+
"test",
|
|
11704
|
+
"member",
|
|
11705
|
+
"agent"
|
|
11706
|
+
]
|
|
10866
11707
|
},
|
|
10867
11708
|
{
|
|
10868
11709
|
"role": "care_recipient",
|
|
10869
11710
|
"label": "Care recipient",
|
|
10870
11711
|
"inverseLabel": "Caregiver",
|
|
10871
|
-
"description": "This person receives care from the member."
|
|
11712
|
+
"description": "This person receives care from the member.",
|
|
11713
|
+
"viewedMemberTypes": [
|
|
11714
|
+
"anonymous",
|
|
11715
|
+
"test",
|
|
11716
|
+
"member",
|
|
11717
|
+
"agent"
|
|
11718
|
+
],
|
|
11719
|
+
"relatedMemberTypes": [
|
|
11720
|
+
"anonymous",
|
|
11721
|
+
"test",
|
|
11722
|
+
"member",
|
|
11723
|
+
"agent"
|
|
11724
|
+
]
|
|
10872
11725
|
}
|
|
10873
11726
|
]
|
|
10874
11727
|
},
|
|
@@ -10882,13 +11735,37 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
10882
11735
|
"role": "emergency_contact",
|
|
10883
11736
|
"label": "Emergency contact",
|
|
10884
11737
|
"inverseLabel": "Emergency contact for",
|
|
10885
|
-
"description": "This person is the member's emergency contact."
|
|
11738
|
+
"description": "This person is the member's emergency contact.",
|
|
11739
|
+
"viewedMemberTypes": [
|
|
11740
|
+
"anonymous",
|
|
11741
|
+
"test",
|
|
11742
|
+
"member",
|
|
11743
|
+
"agent"
|
|
11744
|
+
],
|
|
11745
|
+
"relatedMemberTypes": [
|
|
11746
|
+
"anonymous",
|
|
11747
|
+
"test",
|
|
11748
|
+
"member",
|
|
11749
|
+
"agent"
|
|
11750
|
+
]
|
|
10886
11751
|
},
|
|
10887
11752
|
{
|
|
10888
11753
|
"role": "emergency_contact_for",
|
|
10889
11754
|
"label": "Emergency contact for",
|
|
10890
11755
|
"inverseLabel": "Emergency contact",
|
|
10891
|
-
"description": "The member is listed as this person's emergency contact."
|
|
11756
|
+
"description": "The member is listed as this person's emergency contact.",
|
|
11757
|
+
"viewedMemberTypes": [
|
|
11758
|
+
"anonymous",
|
|
11759
|
+
"test",
|
|
11760
|
+
"member",
|
|
11761
|
+
"agent"
|
|
11762
|
+
],
|
|
11763
|
+
"relatedMemberTypes": [
|
|
11764
|
+
"anonymous",
|
|
11765
|
+
"test",
|
|
11766
|
+
"member",
|
|
11767
|
+
"agent"
|
|
11768
|
+
]
|
|
10892
11769
|
}
|
|
10893
11770
|
]
|
|
10894
11771
|
},
|
|
@@ -10902,13 +11779,37 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
10902
11779
|
"role": "next_of_kin",
|
|
10903
11780
|
"label": "Next of kin",
|
|
10904
11781
|
"inverseLabel": "Next of kin for",
|
|
10905
|
-
"description": "This person is the member's designated next of kin. A member has at most one."
|
|
11782
|
+
"description": "This person is the member's designated next of kin. A member has at most one.",
|
|
11783
|
+
"viewedMemberTypes": [
|
|
11784
|
+
"anonymous",
|
|
11785
|
+
"test",
|
|
11786
|
+
"member",
|
|
11787
|
+
"agent"
|
|
11788
|
+
],
|
|
11789
|
+
"relatedMemberTypes": [
|
|
11790
|
+
"anonymous",
|
|
11791
|
+
"test",
|
|
11792
|
+
"member",
|
|
11793
|
+
"agent"
|
|
11794
|
+
]
|
|
10906
11795
|
},
|
|
10907
11796
|
{
|
|
10908
11797
|
"role": "next_of_kin_for",
|
|
10909
11798
|
"label": "Next of kin for",
|
|
10910
11799
|
"inverseLabel": "Next of kin",
|
|
10911
|
-
"description": "The member is this person's designated next of kin."
|
|
11800
|
+
"description": "The member is this person's designated next of kin.",
|
|
11801
|
+
"viewedMemberTypes": [
|
|
11802
|
+
"anonymous",
|
|
11803
|
+
"test",
|
|
11804
|
+
"member",
|
|
11805
|
+
"agent"
|
|
11806
|
+
],
|
|
11807
|
+
"relatedMemberTypes": [
|
|
11808
|
+
"anonymous",
|
|
11809
|
+
"test",
|
|
11810
|
+
"member",
|
|
11811
|
+
"agent"
|
|
11812
|
+
]
|
|
10912
11813
|
}
|
|
10913
11814
|
]
|
|
10914
11815
|
},
|
|
@@ -10922,13 +11823,37 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
10922
11823
|
"role": "legal_guardian",
|
|
10923
11824
|
"label": "Legal guardian",
|
|
10924
11825
|
"inverseLabel": "Legal guardian for",
|
|
10925
|
-
"description": "Court-appointed guardian, or parent/person with parental responsibility for a minor."
|
|
11826
|
+
"description": "Court-appointed guardian, or parent/person with parental responsibility for a minor.",
|
|
11827
|
+
"viewedMemberTypes": [
|
|
11828
|
+
"anonymous",
|
|
11829
|
+
"test",
|
|
11830
|
+
"member",
|
|
11831
|
+
"agent"
|
|
11832
|
+
],
|
|
11833
|
+
"relatedMemberTypes": [
|
|
11834
|
+
"anonymous",
|
|
11835
|
+
"test",
|
|
11836
|
+
"member",
|
|
11837
|
+
"agent"
|
|
11838
|
+
]
|
|
10926
11839
|
},
|
|
10927
11840
|
{
|
|
10928
11841
|
"role": "legal_guardian_for",
|
|
10929
11842
|
"label": "Legal guardian for",
|
|
10930
11843
|
"inverseLabel": "Legal guardian",
|
|
10931
|
-
"description": "The member is this person's legal guardian."
|
|
11844
|
+
"description": "The member is this person's legal guardian.",
|
|
11845
|
+
"viewedMemberTypes": [
|
|
11846
|
+
"anonymous",
|
|
11847
|
+
"test",
|
|
11848
|
+
"member",
|
|
11849
|
+
"agent"
|
|
11850
|
+
],
|
|
11851
|
+
"relatedMemberTypes": [
|
|
11852
|
+
"anonymous",
|
|
11853
|
+
"test",
|
|
11854
|
+
"member",
|
|
11855
|
+
"agent"
|
|
11856
|
+
]
|
|
10932
11857
|
}
|
|
10933
11858
|
]
|
|
10934
11859
|
},
|
|
@@ -10942,13 +11867,37 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
10942
11867
|
"role": "healthcare_agent",
|
|
10943
11868
|
"label": "Healthcare agent",
|
|
10944
11869
|
"inverseLabel": "Healthcare agent for",
|
|
10945
|
-
"description": "Healthcare power of attorney or health proxy."
|
|
11870
|
+
"description": "Healthcare power of attorney or health proxy.",
|
|
11871
|
+
"viewedMemberTypes": [
|
|
11872
|
+
"anonymous",
|
|
11873
|
+
"test",
|
|
11874
|
+
"member",
|
|
11875
|
+
"agent"
|
|
11876
|
+
],
|
|
11877
|
+
"relatedMemberTypes": [
|
|
11878
|
+
"anonymous",
|
|
11879
|
+
"test",
|
|
11880
|
+
"member",
|
|
11881
|
+
"agent"
|
|
11882
|
+
]
|
|
10946
11883
|
},
|
|
10947
11884
|
{
|
|
10948
11885
|
"role": "healthcare_agent_for",
|
|
10949
11886
|
"label": "Healthcare agent for",
|
|
10950
11887
|
"inverseLabel": "Healthcare agent",
|
|
10951
|
-
"description": "The member is this person's healthcare agent (healthcare power of attorney or health proxy)."
|
|
11888
|
+
"description": "The member is this person's healthcare agent (healthcare power of attorney or health proxy).",
|
|
11889
|
+
"viewedMemberTypes": [
|
|
11890
|
+
"anonymous",
|
|
11891
|
+
"test",
|
|
11892
|
+
"member",
|
|
11893
|
+
"agent"
|
|
11894
|
+
],
|
|
11895
|
+
"relatedMemberTypes": [
|
|
11896
|
+
"anonymous",
|
|
11897
|
+
"test",
|
|
11898
|
+
"member",
|
|
11899
|
+
"agent"
|
|
11900
|
+
]
|
|
10952
11901
|
}
|
|
10953
11902
|
]
|
|
10954
11903
|
},
|
|
@@ -10962,13 +11911,37 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
10962
11911
|
"role": "doctor",
|
|
10963
11912
|
"label": "Doctor",
|
|
10964
11913
|
"inverseLabel": "Patient",
|
|
10965
|
-
"description": "This person is a treating clinician for the member."
|
|
11914
|
+
"description": "This person is a treating clinician for the member.",
|
|
11915
|
+
"viewedMemberTypes": [
|
|
11916
|
+
"anonymous",
|
|
11917
|
+
"test",
|
|
11918
|
+
"member",
|
|
11919
|
+
"agent"
|
|
11920
|
+
],
|
|
11921
|
+
"relatedMemberTypes": [
|
|
11922
|
+
"anonymous",
|
|
11923
|
+
"test",
|
|
11924
|
+
"member",
|
|
11925
|
+
"agent"
|
|
11926
|
+
]
|
|
10966
11927
|
},
|
|
10967
11928
|
{
|
|
10968
11929
|
"role": "patient",
|
|
10969
11930
|
"label": "Patient",
|
|
10970
11931
|
"inverseLabel": "Doctor",
|
|
10971
|
-
"description": "This person is a patient of the member."
|
|
11932
|
+
"description": "This person is a patient of the member.",
|
|
11933
|
+
"viewedMemberTypes": [
|
|
11934
|
+
"anonymous",
|
|
11935
|
+
"test",
|
|
11936
|
+
"member",
|
|
11937
|
+
"agent"
|
|
11938
|
+
],
|
|
11939
|
+
"relatedMemberTypes": [
|
|
11940
|
+
"anonymous",
|
|
11941
|
+
"test",
|
|
11942
|
+
"member",
|
|
11943
|
+
"agent"
|
|
11944
|
+
]
|
|
10972
11945
|
}
|
|
10973
11946
|
]
|
|
10974
11947
|
},
|
|
@@ -10982,13 +11955,113 @@ var MEMBER_RELATIONSHIP_KINDS = [
|
|
|
10982
11955
|
"role": "primary_contact",
|
|
10983
11956
|
"label": "Primary contact",
|
|
10984
11957
|
"inverseLabel": "Primary contact for",
|
|
10985
|
-
"description": "This person is the organization's primary contact for the member. A member has at most one."
|
|
11958
|
+
"description": "This person is the organization's primary contact for the member. A member has at most one.",
|
|
11959
|
+
"viewedMemberTypes": [
|
|
11960
|
+
"anonymous",
|
|
11961
|
+
"test",
|
|
11962
|
+
"member",
|
|
11963
|
+
"agent"
|
|
11964
|
+
],
|
|
11965
|
+
"relatedMemberTypes": [
|
|
11966
|
+
"anonymous",
|
|
11967
|
+
"test",
|
|
11968
|
+
"member",
|
|
11969
|
+
"agent"
|
|
11970
|
+
]
|
|
10986
11971
|
},
|
|
10987
11972
|
{
|
|
10988
11973
|
"role": "primary_contact_for",
|
|
10989
11974
|
"label": "Primary contact for",
|
|
10990
11975
|
"inverseLabel": "Primary contact",
|
|
10991
|
-
"description": "The member is this person's assigned primary contact inside the organization."
|
|
11976
|
+
"description": "The member is this person's assigned primary contact inside the organization.",
|
|
11977
|
+
"viewedMemberTypes": [
|
|
11978
|
+
"anonymous",
|
|
11979
|
+
"test",
|
|
11980
|
+
"member",
|
|
11981
|
+
"agent"
|
|
11982
|
+
],
|
|
11983
|
+
"relatedMemberTypes": [
|
|
11984
|
+
"anonymous",
|
|
11985
|
+
"test",
|
|
11986
|
+
"member",
|
|
11987
|
+
"agent"
|
|
11988
|
+
]
|
|
11989
|
+
}
|
|
11990
|
+
]
|
|
11991
|
+
},
|
|
11992
|
+
{
|
|
11993
|
+
"kind": "contact_owner_of",
|
|
11994
|
+
"cardinality": "one_per_target",
|
|
11995
|
+
"symmetric": false,
|
|
11996
|
+
"grantsChartAccess": false,
|
|
11997
|
+
"roles": [
|
|
11998
|
+
{
|
|
11999
|
+
"role": "contact_owner",
|
|
12000
|
+
"label": "Contact owner",
|
|
12001
|
+
"inverseLabel": "Owns contact",
|
|
12002
|
+
"description": "This person owns the member's record in the CRM. A member has at most one. Grants no chart access.",
|
|
12003
|
+
"viewedMemberTypes": [
|
|
12004
|
+
"anonymous",
|
|
12005
|
+
"test",
|
|
12006
|
+
"member",
|
|
12007
|
+
"agent"
|
|
12008
|
+
],
|
|
12009
|
+
"relatedMemberTypes": [
|
|
12010
|
+
"anonymous",
|
|
12011
|
+
"test",
|
|
12012
|
+
"member",
|
|
12013
|
+
"agent"
|
|
12014
|
+
]
|
|
12015
|
+
},
|
|
12016
|
+
{
|
|
12017
|
+
"role": "owns_contact",
|
|
12018
|
+
"label": "Owns contact",
|
|
12019
|
+
"inverseLabel": "Contact owner",
|
|
12020
|
+
"description": "The member owns this person's record in the CRM.",
|
|
12021
|
+
"viewedMemberTypes": [
|
|
12022
|
+
"anonymous",
|
|
12023
|
+
"test",
|
|
12024
|
+
"member",
|
|
12025
|
+
"agent"
|
|
12026
|
+
],
|
|
12027
|
+
"relatedMemberTypes": [
|
|
12028
|
+
"anonymous",
|
|
12029
|
+
"test",
|
|
12030
|
+
"member",
|
|
12031
|
+
"agent"
|
|
12032
|
+
]
|
|
12033
|
+
}
|
|
12034
|
+
]
|
|
12035
|
+
},
|
|
12036
|
+
{
|
|
12037
|
+
"kind": "employee_of",
|
|
12038
|
+
"cardinality": "many_to_many",
|
|
12039
|
+
"symmetric": false,
|
|
12040
|
+
"grantsChartAccess": false,
|
|
12041
|
+
"roles": [
|
|
12042
|
+
{
|
|
12043
|
+
"role": "employee",
|
|
12044
|
+
"label": "Employee",
|
|
12045
|
+
"inverseLabel": "Employer",
|
|
12046
|
+
"description": "This person works at the business. Grants no chart access.",
|
|
12047
|
+
"viewedMemberTypes": [
|
|
12048
|
+
"business"
|
|
12049
|
+
],
|
|
12050
|
+
"relatedMemberTypes": [
|
|
12051
|
+
"member"
|
|
12052
|
+
]
|
|
12053
|
+
},
|
|
12054
|
+
{
|
|
12055
|
+
"role": "employer",
|
|
12056
|
+
"label": "Employer",
|
|
12057
|
+
"inverseLabel": "Employee",
|
|
12058
|
+
"description": "The member works at this business. Grants no chart access.",
|
|
12059
|
+
"viewedMemberTypes": [
|
|
12060
|
+
"member"
|
|
12061
|
+
],
|
|
12062
|
+
"relatedMemberTypes": [
|
|
12063
|
+
"business"
|
|
12064
|
+
]
|
|
10992
12065
|
}
|
|
10993
12066
|
]
|
|
10994
12067
|
}
|
|
@@ -11009,7 +12082,8 @@ function isConfigHealthFacadeCheckSlug(value) {
|
|
|
11009
12082
|
var UiPromptPresentedKind = {
|
|
11010
12083
|
render_ui: "render_ui",
|
|
11011
12084
|
present_choice_list: "present_choice_list",
|
|
11012
|
-
inline_connect: "inline_connect"
|
|
12085
|
+
inline_connect: "inline_connect",
|
|
12086
|
+
proposed_message: "proposed_message"
|
|
11013
12087
|
};
|
|
11014
12088
|
var UiPromptResponseKind = {
|
|
11015
12089
|
render_ui: "render_ui",
|
|
@@ -11021,6 +12095,56 @@ var UiPromptResponseStatus = {
|
|
|
11021
12095
|
declined: "declined"
|
|
11022
12096
|
};
|
|
11023
12097
|
|
|
12098
|
+
// src/types/proposed-message.ts
|
|
12099
|
+
var PROPOSED_MESSAGE_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
12100
|
+
"send_gmail",
|
|
12101
|
+
"slack_post_as_member",
|
|
12102
|
+
"slack_post_as_app",
|
|
12103
|
+
"teams_post_as_member",
|
|
12104
|
+
"teams_post_as_app"
|
|
12105
|
+
]);
|
|
12106
|
+
var PROPOSED_MESSAGE_SETTLED_TOOL_NAME = "proposed_message_settled";
|
|
12107
|
+
var PROPOSED_MESSAGE_SETTLEMENT_STATUSES = ["sent", "failed", "discarded"];
|
|
12108
|
+
function isProposedMessageSettlementStatus(value) {
|
|
12109
|
+
return typeof value === "string" && PROPOSED_MESSAGE_SETTLEMENT_STATUSES.includes(value);
|
|
12110
|
+
}
|
|
12111
|
+
var PROPOSED_MESSAGE_BODY_MAX_LENGTH = 4e4;
|
|
12112
|
+
var PROPOSED_MESSAGE_SUBJECT_MAX_LENGTH = 998;
|
|
12113
|
+
var PROPOSED_SERVICES = /* @__PURE__ */ new Set(["gmail", "slack", "teams"]);
|
|
12114
|
+
var PROPOSED_FIELDS = /* @__PURE__ */ new Set(["body", "subject"]);
|
|
12115
|
+
function optionalString(record, key) {
|
|
12116
|
+
const value = record[key];
|
|
12117
|
+
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
12118
|
+
}
|
|
12119
|
+
function parseProposedMessage(value) {
|
|
12120
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
12121
|
+
const record = value;
|
|
12122
|
+
const tool = optionalString(record, "tool");
|
|
12123
|
+
const to = optionalString(record, "to");
|
|
12124
|
+
const body = optionalString(record, "body");
|
|
12125
|
+
const service = record.service;
|
|
12126
|
+
if (!tool || !to || !body || typeof service !== "string" || !PROPOSED_SERVICES.has(service)) {
|
|
12127
|
+
return void 0;
|
|
12128
|
+
}
|
|
12129
|
+
const editable = Array.isArray(record.editableFields) ? record.editableFields.filter(
|
|
12130
|
+
(field) => typeof field === "string" && PROPOSED_FIELDS.has(field)
|
|
12131
|
+
) : [];
|
|
12132
|
+
const cc = optionalString(record, "cc");
|
|
12133
|
+
const thread = optionalString(record, "thread");
|
|
12134
|
+
const subject = optionalString(record, "subject");
|
|
12135
|
+
return {
|
|
12136
|
+
tool,
|
|
12137
|
+
service,
|
|
12138
|
+
sendsAs: record.sendsAs === "app" ? "app" : "member",
|
|
12139
|
+
to,
|
|
12140
|
+
body,
|
|
12141
|
+
editableFields: editable,
|
|
12142
|
+
...cc ? { cc } : {},
|
|
12143
|
+
...thread ? { thread } : {},
|
|
12144
|
+
...subject ? { subject } : {}
|
|
12145
|
+
};
|
|
12146
|
+
}
|
|
12147
|
+
|
|
11024
12148
|
// src/types/experiment-types.ts
|
|
11025
12149
|
function parseExperimentStatCount(value) {
|
|
11026
12150
|
return typeof value === "number" ? value : null;
|
|
@@ -11341,12 +12465,44 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
11341
12465
|
method: "POST"
|
|
11342
12466
|
});
|
|
11343
12467
|
}
|
|
12468
|
+
/** Read this account's own notification preferences. */
|
|
12469
|
+
async getNotificationPreferences() {
|
|
12470
|
+
return this.fetch("account/notification-preferences");
|
|
12471
|
+
}
|
|
12472
|
+
/** Silence or restore one workspace for the authenticated account. */
|
|
12473
|
+
async setWorkspaceNotificationMute(wid, muted) {
|
|
12474
|
+
return this.fetch(
|
|
12475
|
+
`account/notification-preferences/${wid}`,
|
|
12476
|
+
{
|
|
12477
|
+
method: "PUT",
|
|
12478
|
+
body: JSON.stringify({ muted })
|
|
12479
|
+
}
|
|
12480
|
+
);
|
|
12481
|
+
}
|
|
11344
12482
|
// ===== Push Notifications =====
|
|
11345
12483
|
/** Get the VAPID public key for Web Push subscription registration. */
|
|
11346
12484
|
async getVapidPublicKey() {
|
|
11347
12485
|
const response = await this.fetch("push/vapid-public-key");
|
|
11348
12486
|
return response.publicKey;
|
|
11349
12487
|
}
|
|
12488
|
+
/** Enable browser push across the authenticated account's workspaces. */
|
|
12489
|
+
async registerAccountPushSubscription(subscription) {
|
|
12490
|
+
return this.fetch("push/subscriptions", {
|
|
12491
|
+
method: "POST",
|
|
12492
|
+
body: JSON.stringify(subscription)
|
|
12493
|
+
});
|
|
12494
|
+
}
|
|
12495
|
+
/** Revoke this account's registration in one browser. */
|
|
12496
|
+
async unregisterAccountPushSubscription(endpoint) {
|
|
12497
|
+
return this.fetch("push/subscriptions", {
|
|
12498
|
+
method: "DELETE",
|
|
12499
|
+
body: JSON.stringify({ endpoint })
|
|
12500
|
+
});
|
|
12501
|
+
}
|
|
12502
|
+
/** List the authenticated account's browser registrations. */
|
|
12503
|
+
async listAccountPushSubscriptions() {
|
|
12504
|
+
return this.fetch("push/subscriptions");
|
|
12505
|
+
}
|
|
11350
12506
|
/** Register a Web Push subscription for the current user. */
|
|
11351
12507
|
async registerPushSubscription(wid, subscription) {
|
|
11352
12508
|
return this.fetch(`w/${wid}/push-subscriptions`, {
|
|
@@ -12049,6 +13205,16 @@ var TeamsAppsApi = class extends BaseApiClient {
|
|
|
12049
13205
|
`w/${wid}/app-connections/teams/apps/${appId}/installations${params.toString() ? `?${params.toString()}` : ""}`
|
|
12050
13206
|
);
|
|
12051
13207
|
}
|
|
13208
|
+
/**
|
|
13209
|
+
* Channels this app has observed, for approval on its settings form.
|
|
13210
|
+
* Approval is saved through `updateTeamsApp`
|
|
13211
|
+
* (`approvedNotificationDestinationIds`); observation approves nothing.
|
|
13212
|
+
*/
|
|
13213
|
+
async getTeamsNotificationDestinations(wid, appId) {
|
|
13214
|
+
return this.fetch(
|
|
13215
|
+
`w/${wid}/app-connections/teams/apps/${appId}/notification-destinations`
|
|
13216
|
+
);
|
|
13217
|
+
}
|
|
12052
13218
|
async getTeamsAppAccounts(wid, appId, options = {}) {
|
|
12053
13219
|
const params = new URLSearchParams();
|
|
12054
13220
|
if (options.page) params.append("page", options.page.toString());
|
|
@@ -12246,6 +13412,47 @@ var ActivityApi = class extends BaseApiClient {
|
|
|
12246
13412
|
body: JSON.stringify(request)
|
|
12247
13413
|
});
|
|
12248
13414
|
}
|
|
13415
|
+
/**
|
|
13416
|
+
* The account mount's notification feed, newest first.
|
|
13417
|
+
*
|
|
13418
|
+
* `window` is required and the client keeps it fixed across pages — a
|
|
13419
|
+
* cursor is bound to the exact request that issued it. "This workspace" is
|
|
13420
|
+
* the same read with `scope.workspaceUuids = [wid]`; "All" omits `scope`.
|
|
13421
|
+
* There is no second authorization path: a workspace the caller may not see
|
|
13422
|
+
* stays in the narrowing and admits nothing of its own, so a UUID the caller
|
|
13423
|
+
* names can never widen the response.
|
|
13424
|
+
*/
|
|
13425
|
+
async queryActivityNotifications(request) {
|
|
13426
|
+
return this.fetch("activity/notifications", {
|
|
13427
|
+
method: "POST",
|
|
13428
|
+
body: JSON.stringify(request)
|
|
13429
|
+
});
|
|
13430
|
+
}
|
|
13431
|
+
/**
|
|
13432
|
+
* The bell's number for this account.
|
|
13433
|
+
*
|
|
13434
|
+
* A snapshot, not a page: no cursor, and the way to see more is to open the
|
|
13435
|
+
* feed. An omitted `window` uses the server's recent lookback.
|
|
13436
|
+
*/
|
|
13437
|
+
async getActivityNotificationCount(request = {}) {
|
|
13438
|
+
return this.fetch("activity/notifications/count", {
|
|
13439
|
+
method: "POST",
|
|
13440
|
+
body: JSON.stringify(request)
|
|
13441
|
+
});
|
|
13442
|
+
}
|
|
13443
|
+
/**
|
|
13444
|
+
* Mark presented occurrences read, or dismiss them.
|
|
13445
|
+
*
|
|
13446
|
+
* Additive and idempotent: a repeat applies the same keys without moving
|
|
13447
|
+
* their timestamps, and keys the caller may no longer see are skipped
|
|
13448
|
+
* silently. The response counts what was applied.
|
|
13449
|
+
*/
|
|
13450
|
+
async markActivityNotifications(request) {
|
|
13451
|
+
return this.fetch("activity/notifications/mark", {
|
|
13452
|
+
method: "POST",
|
|
13453
|
+
body: JSON.stringify(request)
|
|
13454
|
+
});
|
|
13455
|
+
}
|
|
12249
13456
|
/**
|
|
12250
13457
|
* What this caller's estate admits, so a client renders honest controls.
|
|
12251
13458
|
*
|
|
@@ -12734,7 +13941,7 @@ function formatAppContextAsMarkdown(context) {
|
|
|
12734
13941
|
lines.push(`**Page**: \`${context.appUri}\``);
|
|
12735
13942
|
}
|
|
12736
13943
|
if (context.pageState) {
|
|
12737
|
-
const { site, page, workflow, dataRecord, toolkit } = context.pageState;
|
|
13944
|
+
const { site, page, workflow, chat, dataRecord, toolkit } = context.pageState;
|
|
12738
13945
|
if (site) {
|
|
12739
13946
|
const siteName = site.name || site.slug;
|
|
12740
13947
|
lines.push(
|
|
@@ -12747,6 +13954,10 @@ function formatAppContextAsMarkdown(context) {
|
|
|
12747
13954
|
pageName ? `**Page**: ${pageName} (ID: \`${page.id}\`)` : `**Page ID**: \`${page.id}\``
|
|
12748
13955
|
);
|
|
12749
13956
|
}
|
|
13957
|
+
if (chat) {
|
|
13958
|
+
const workflowSuffix = chat.workflowId != null ? ` (Workflow ID: \`${chat.workflowId}\`)` : "";
|
|
13959
|
+
lines.push(`**Chat**: #${chat.id}${workflowSuffix}`);
|
|
13960
|
+
}
|
|
12750
13961
|
if (workflow) {
|
|
12751
13962
|
const workflowName = workflow.name;
|
|
12752
13963
|
lines.push(
|
|
@@ -12877,6 +14088,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
12877
14088
|
"activateWorkflowRevision",
|
|
12878
14089
|
"addEmailSenderAsMember",
|
|
12879
14090
|
"addGroupMember",
|
|
14091
|
+
"addWorkspaceSupportRequestParticipants",
|
|
12880
14092
|
"advanceStep",
|
|
12881
14093
|
"approveWorkspaceInvitation",
|
|
12882
14094
|
"archiveAgent",
|
|
@@ -12946,6 +14158,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
12946
14158
|
"listSubsetImportRuns",
|
|
12947
14159
|
"listSubsetImports",
|
|
12948
14160
|
"listSubsetImportVendorLists",
|
|
14161
|
+
"listWorkspaceSupportRequestCcCandidates",
|
|
12949
14162
|
"previewSubsetImport",
|
|
12950
14163
|
"previewSubsetImportSelection",
|
|
12951
14164
|
"restoreInstallationForm",
|
|
@@ -12980,7 +14193,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
12980
14193
|
"createFolder",
|
|
12981
14194
|
"createGoal",
|
|
12982
14195
|
"createInbox",
|
|
12983
|
-
"
|
|
14196
|
+
"cloneJourneyToCurrent",
|
|
12984
14197
|
"createJourney",
|
|
12985
14198
|
"createJourneyNote",
|
|
12986
14199
|
"createMcpServer",
|
|
@@ -13092,6 +14305,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13092
14305
|
"disableSalesforce",
|
|
13093
14306
|
"disconnectConfluence",
|
|
13094
14307
|
"disconnectHubspot",
|
|
14308
|
+
"switchHubspotToPlatformApp",
|
|
13095
14309
|
"disconnectMondayConnection",
|
|
13096
14310
|
"disconnectSalesforce",
|
|
13097
14311
|
"discordLinkPreflight",
|
|
@@ -13180,10 +14394,12 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13180
14394
|
"getAvailablePhoneNumbers",
|
|
13181
14395
|
"getAvailableSlots",
|
|
13182
14396
|
"getInstallation",
|
|
14397
|
+
"getInstallationAbilitySettings",
|
|
13183
14398
|
"getInstallationReadiness",
|
|
13184
14399
|
"getThemeSettingsSchema",
|
|
13185
14400
|
"getBundleDraft",
|
|
13186
14401
|
"getBundleJourneyCandidate",
|
|
14402
|
+
"getBundlePublishPreview",
|
|
13187
14403
|
"getBundle",
|
|
13188
14404
|
"getBundleVersion",
|
|
13189
14405
|
"getBusinessHoursStatus",
|
|
@@ -13218,6 +14434,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13218
14434
|
"getChatTaskTransitions",
|
|
13219
14435
|
"getChatModelOverride",
|
|
13220
14436
|
"getChatPhoneCalls",
|
|
14437
|
+
"getChatPhoneNumbers",
|
|
13221
14438
|
"getChatSkills",
|
|
13222
14439
|
"getManagerSkills",
|
|
13223
14440
|
"getChatTodos",
|
|
@@ -13232,6 +14449,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13232
14449
|
"getConfluenceStatus",
|
|
13233
14450
|
"getConnectionFieldHomes",
|
|
13234
14451
|
"getInboundRecordStatus",
|
|
14452
|
+
"getOwnerMemberStatus",
|
|
13235
14453
|
"getConnectionSyncCapabilities",
|
|
13236
14454
|
"getConnectionSyncCheckpoint",
|
|
13237
14455
|
"getConnectionSyncConfig",
|
|
@@ -13258,7 +14476,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13258
14476
|
"getDataRecordFilters",
|
|
13259
14477
|
"getDataRecords",
|
|
13260
14478
|
"getDataType",
|
|
13261
|
-
"getDataTypeDraft",
|
|
13262
14479
|
"getDataTypeVersions",
|
|
13263
14480
|
"getDataTypeByUuid",
|
|
13264
14481
|
"getDataTypeBySlug",
|
|
@@ -13295,6 +14512,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13295
14512
|
"getEdgeCaptureInfo",
|
|
13296
14513
|
"getEnrollmentStatusLog",
|
|
13297
14514
|
"getEventRule",
|
|
14515
|
+
"getEventRuleIndex",
|
|
13298
14516
|
"getEventRules",
|
|
13299
14517
|
"getExperiment",
|
|
13300
14518
|
"getExperimentStats",
|
|
@@ -13323,8 +14541,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13323
14541
|
"previewDataReport",
|
|
13324
14542
|
"previewQuery",
|
|
13325
14543
|
"publishSiteSource",
|
|
13326
|
-
"publishDataTypeDraft",
|
|
13327
|
-
"saveDataTypeDraft",
|
|
13328
14544
|
"queryWorkspaceActivity",
|
|
13329
14545
|
"queryWorkspaceActivityLatestSubjects",
|
|
13330
14546
|
"queryWorkspaceActivityOpenItems",
|
|
@@ -13350,6 +14566,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13350
14566
|
"getFolders",
|
|
13351
14567
|
"getGoogleCalendarStatus",
|
|
13352
14568
|
"getGranteeGrants",
|
|
14569
|
+
"getHealthieAppointmentPatientMatches",
|
|
13353
14570
|
"getHealthieAvailableSlots",
|
|
13354
14571
|
"getHealthieReconciliationMatches",
|
|
13355
14572
|
"getHealthieStatus",
|
|
@@ -13358,6 +14575,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13358
14575
|
"getHubspotDealProperties",
|
|
13359
14576
|
"getHubspotForms",
|
|
13360
14577
|
"getHubspotMeetingLinks",
|
|
14578
|
+
"getHubspotCrmObjects",
|
|
13361
14579
|
"getHubspotManagedRules",
|
|
13362
14580
|
"getHubspotObjectProperties",
|
|
13363
14581
|
"getHubspotReconciliationMatches",
|
|
@@ -13385,10 +14603,11 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13385
14603
|
"getJourneyAuthoring",
|
|
13386
14604
|
"getJourneyFilterOptions",
|
|
13387
14605
|
"getJourneyHealth",
|
|
14606
|
+
"getJourneyHistory",
|
|
13388
14607
|
"getJourneyMembers",
|
|
13389
14608
|
"getJourneyNotes",
|
|
13390
14609
|
"getJourneySendEstimate",
|
|
13391
|
-
"
|
|
14610
|
+
"getJourneyDefinitionValidation",
|
|
13392
14611
|
"getJourneys",
|
|
13393
14612
|
"getLinkablePhones",
|
|
13394
14613
|
"getLinkedHealthieMembers",
|
|
@@ -13437,6 +14656,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13437
14656
|
"getMyGivenGrants",
|
|
13438
14657
|
"getMyReceivedGrants",
|
|
13439
14658
|
"getNotification",
|
|
14659
|
+
"getNotificationDestinations",
|
|
13440
14660
|
"getNotificationRules",
|
|
13441
14661
|
"getNotifications",
|
|
13442
14662
|
"getOperatorChatMessages",
|
|
@@ -13505,17 +14725,21 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13505
14725
|
"getStepMembers",
|
|
13506
14726
|
"getSupervisor",
|
|
13507
14727
|
"getSupervisors",
|
|
14728
|
+
"getSyncFailures",
|
|
14729
|
+
"getSyncFailureSummary",
|
|
13508
14730
|
"getSyncRunItems",
|
|
13509
14731
|
"getSyncRunItemsPage",
|
|
13510
14732
|
"getSyncRuns",
|
|
13511
14733
|
"getTask",
|
|
13512
14734
|
"getTaskChats",
|
|
14735
|
+
"getTaskCatalog",
|
|
13513
14736
|
"getTasks",
|
|
13514
14737
|
"getTeamsApp",
|
|
13515
14738
|
"getTeamsAppAccounts",
|
|
13516
14739
|
"getTeamsApps",
|
|
13517
14740
|
"getTeamsConversations",
|
|
13518
14741
|
"getTeamsInstallations",
|
|
14742
|
+
"getTeamsNotificationDestinations",
|
|
13519
14743
|
"getTemplateContext",
|
|
13520
14744
|
"getChatTestRun",
|
|
13521
14745
|
"getTestChatRun",
|
|
@@ -13538,6 +14762,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13538
14762
|
"getWorkflowFeedback",
|
|
13539
14763
|
"getWorkflowPromptClassifications",
|
|
13540
14764
|
"reviewWorkflowPromptClassifications",
|
|
14765
|
+
"getWorkflowRunnerFileAccess",
|
|
13541
14766
|
"getWorkflowContributors",
|
|
13542
14767
|
"getWorkflowDeletionPreview",
|
|
13543
14768
|
"getWorkflowDiagram",
|
|
@@ -13565,6 +14790,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13565
14790
|
"getWorkspaceWidgetDomains",
|
|
13566
14791
|
"getWorkspaceSubscriptions",
|
|
13567
14792
|
"getWorkspaceSupportRequest",
|
|
14793
|
+
"getWorkspaceValuesRecord",
|
|
13568
14794
|
"getWorkspaceThemes",
|
|
13569
14795
|
"installBundle",
|
|
13570
14796
|
"grantBundle",
|
|
@@ -13603,12 +14829,15 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13603
14829
|
"listBundleVersions",
|
|
13604
14830
|
"listBundles",
|
|
13605
14831
|
"listBundleWorkflowCandidates",
|
|
14832
|
+
"getWorkflowBundleMembership",
|
|
13606
14833
|
"updateBundle",
|
|
13607
14834
|
"listBundleInstallations",
|
|
13608
14835
|
"listConfluencePages",
|
|
13609
14836
|
"listConfluenceSpaces",
|
|
13610
14837
|
"listConnectionMemberFieldKeys",
|
|
13611
14838
|
"listContactPermissions",
|
|
14839
|
+
"listMemberImportRunItems",
|
|
14840
|
+
"listMemberImportRuns",
|
|
13612
14841
|
"revokeBundleGrant",
|
|
13613
14842
|
"rollbackSiteSource",
|
|
13614
14843
|
"rotateDocumoFaxCredentials",
|
|
@@ -13669,7 +14898,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13669
14898
|
"publishBundle",
|
|
13670
14899
|
"publishWorkflowRevision",
|
|
13671
14900
|
"putJourneyDraft",
|
|
13672
|
-
"
|
|
14901
|
+
"putJourneyDefinition",
|
|
13673
14902
|
"rateMessage",
|
|
13674
14903
|
"getChatFeedback",
|
|
13675
14904
|
"reenrollMember",
|
|
@@ -13721,6 +14950,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13721
14950
|
"skipStep",
|
|
13722
14951
|
"startConfluenceOAuth",
|
|
13723
14952
|
"startHubspotOAuth",
|
|
14953
|
+
"startMemberImportRun",
|
|
13724
14954
|
"startSalesforceOAuth",
|
|
13725
14955
|
"startSyncRun",
|
|
13726
14956
|
"captureScenarioDraft",
|
|
@@ -13732,6 +14962,12 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13732
14962
|
"testFhirConnection",
|
|
13733
14963
|
"testMcpServerConnection",
|
|
13734
14964
|
"testMondayConnection",
|
|
14965
|
+
"listJourneyTests",
|
|
14966
|
+
"createJourneyTest",
|
|
14967
|
+
"updateJourneyTest",
|
|
14968
|
+
"deleteJourneyTest",
|
|
14969
|
+
"runJourneyTests",
|
|
14970
|
+
"simulateJourney",
|
|
13735
14971
|
"testRunJourney",
|
|
13736
14972
|
"toggleFieldIndex",
|
|
13737
14973
|
"unarchiveAgent",
|
|
@@ -13840,8 +15076,11 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13840
15076
|
"upsertDataRecord",
|
|
13841
15077
|
"upsertWidgetDomain",
|
|
13842
15078
|
"validateCelExpression",
|
|
15079
|
+
"validateConnectionSyncConfig",
|
|
13843
15080
|
"validateDataTypeSlug",
|
|
15081
|
+
"validateMondaySyncConfig",
|
|
13844
15082
|
"validateQuery",
|
|
15083
|
+
"validateSalesforceSyncConfig",
|
|
13845
15084
|
"validateWorkflowName",
|
|
13846
15085
|
"verifyAthenaAccess",
|
|
13847
15086
|
"verifyClaimMdKey",
|
|
@@ -13907,11 +15146,14 @@ function bindAgentsMethods(target, agents) {
|
|
|
13907
15146
|
target.deleteAgent = agents.deleteAgent.bind(agents);
|
|
13908
15147
|
target.archiveAgent = agents.archiveAgent.bind(agents);
|
|
13909
15148
|
target.unarchiveAgent = agents.unarchiveAgent.bind(agents);
|
|
15149
|
+
target.getOrgAgentJobs = agents.getOrgAgentJobs.bind(agents);
|
|
15150
|
+
target.stopOrgAgentJob = agents.stopOrgAgentJob.bind(agents);
|
|
13910
15151
|
}
|
|
13911
15152
|
|
|
13912
15153
|
// src/client/bindings/tasks.ts
|
|
13913
15154
|
function bindTasksMethods(target, tasks, abilities) {
|
|
13914
15155
|
target.getTasks = tasks.getTasks.bind(tasks);
|
|
15156
|
+
target.getTaskCatalog = tasks.getTaskCatalog.bind(tasks);
|
|
13915
15157
|
target.getTask = tasks.getTask.bind(tasks);
|
|
13916
15158
|
target.createTask = tasks.createTask.bind(tasks);
|
|
13917
15159
|
target.updateTask = tasks.updateTask.bind(tasks);
|
|
@@ -13930,6 +15172,7 @@ function bindTasksMethods(target, tasks, abilities) {
|
|
|
13930
15172
|
|
|
13931
15173
|
// src/client/bindings/chats.ts
|
|
13932
15174
|
function bindChatsMethods(target, chats) {
|
|
15175
|
+
target.chat = chats.chat.bind(chats);
|
|
13933
15176
|
target.createChatInteractionSession = chats.createChatInteractionSession.bind(chats);
|
|
13934
15177
|
target.transitionChatInteractionSession = chats.transitionChatInteractionSession.bind(chats);
|
|
13935
15178
|
target.getChats = chats.getChats.bind(chats);
|
|
@@ -13973,6 +15216,8 @@ function bindChatsMethods(target, chats) {
|
|
|
13973
15216
|
target.createChatCompletion = chats.createChatCompletion.bind(chats);
|
|
13974
15217
|
target.exportChats = chats.exportChats.bind(chats);
|
|
13975
15218
|
target.exportChat = chats.exportChat.bind(chats);
|
|
15219
|
+
target.listChatStaffNotes = chats.listChatStaffNotes.bind(chats);
|
|
15220
|
+
target.createChatStaffNote = chats.createChatStaffNote.bind(chats);
|
|
13976
15221
|
target.findOrCreateDMChat = chats.findOrCreateDMChat.bind(chats);
|
|
13977
15222
|
target.sendChatMessage = chats.sendChatMessage.bind(chats);
|
|
13978
15223
|
target.getChatPhoneCalls = chats.getChatPhoneCalls.bind(chats);
|
|
@@ -14022,6 +15267,9 @@ function bindActivityMethods(target, activity) {
|
|
|
14022
15267
|
target.queryActivityOneView = activity.queryActivityOneView.bind(activity);
|
|
14023
15268
|
target.queryActivityDigest = activity.queryActivityDigest.bind(activity);
|
|
14024
15269
|
target.getActivityCounts = activity.getActivityCounts.bind(activity);
|
|
15270
|
+
target.queryActivityNotifications = activity.queryActivityNotifications.bind(activity);
|
|
15271
|
+
target.getActivityNotificationCount = activity.getActivityNotificationCount.bind(activity);
|
|
15272
|
+
target.markActivityNotifications = activity.markActivityNotifications.bind(activity);
|
|
14025
15273
|
target.getActivityCapabilities = activity.getActivityCapabilities.bind(activity);
|
|
14026
15274
|
target.queryOrgActivity = activity.queryOrgActivity.bind(activity);
|
|
14027
15275
|
target.queryOrgActivityLatestSubjects = activity.queryOrgActivityLatestSubjects.bind(activity);
|
|
@@ -14061,9 +15309,6 @@ function bindTrackedLinksMethods(target, trackedLinks) {
|
|
|
14061
15309
|
function bindDataTypesMethods(target, dataTypes) {
|
|
14062
15310
|
target.getAnonymousFormSchema = dataTypes.getAnonymousFormSchema.bind(dataTypes);
|
|
14063
15311
|
target.submitAnonymousForm = dataTypes.submitAnonymousForm.bind(dataTypes);
|
|
14064
|
-
target.getDataTypeDraft = dataTypes.getDataTypeDraft.bind(dataTypes);
|
|
14065
|
-
target.saveDataTypeDraft = dataTypes.saveDataTypeDraft.bind(dataTypes);
|
|
14066
|
-
target.publishDataTypeDraft = dataTypes.publishDataTypeDraft.bind(dataTypes);
|
|
14067
15312
|
target.getDataTypeVersions = dataTypes.getDataTypeVersions.bind(dataTypes);
|
|
14068
15313
|
target.getDataTypes = dataTypes.getDataTypes.bind(dataTypes);
|
|
14069
15314
|
target.getDataType = dataTypes.getDataType.bind(dataTypes);
|
|
@@ -14076,6 +15321,7 @@ function bindDataTypesMethods(target, dataTypes) {
|
|
|
14076
15321
|
target.unarchiveDataType = dataTypes.unarchiveDataType.bind(dataTypes);
|
|
14077
15322
|
target.cloneDataType = dataTypes.cloneDataType.bind(dataTypes);
|
|
14078
15323
|
target.getDataRecords = dataTypes.getDataRecords.bind(dataTypes);
|
|
15324
|
+
target.getWorkspaceValuesRecord = dataTypes.getWorkspaceValuesRecord.bind(dataTypes);
|
|
14079
15325
|
target.listAnonymousFormSubmissions = dataTypes.listAnonymousFormSubmissions.bind(dataTypes);
|
|
14080
15326
|
target.getAnonymousFormSubmission = dataTypes.getAnonymousFormSubmission.bind(dataTypes);
|
|
14081
15327
|
target.getDataRecord = dataTypes.getDataRecord.bind(dataTypes);
|
|
@@ -14121,6 +15367,7 @@ function bindMembersMethods(target, members) {
|
|
|
14121
15367
|
target.updateCurrentMember = members.updateCurrentMember.bind(members);
|
|
14122
15368
|
target.getWorkspaceMembers = members.getWorkspaceMembers.bind(members);
|
|
14123
15369
|
target.getWorkspaceMember = members.getWorkspaceMember.bind(members);
|
|
15370
|
+
target.getMemberSmsSenders = members.getMemberSmsSenders.bind(members);
|
|
14124
15371
|
target.getMemberByUuid = members.getMemberByUuid.bind(members);
|
|
14125
15372
|
target.getOrgWorkspaceMember = members.getOrgWorkspaceMember.bind(members);
|
|
14126
15373
|
target.createWorkspaceMember = members.createWorkspaceMember.bind(members);
|
|
@@ -14135,6 +15382,9 @@ function bindMembersMethods(target, members) {
|
|
|
14135
15382
|
target.bulkCreateMembers = members.bulkCreateMembers.bind(members);
|
|
14136
15383
|
target.previewImportMembers = members.previewImportMembers.bind(members);
|
|
14137
15384
|
target.importMembers = members.importMembers.bind(members);
|
|
15385
|
+
target.startMemberImportRun = members.startMemberImportRun.bind(members);
|
|
15386
|
+
target.listMemberImportRuns = members.listMemberImportRuns.bind(members);
|
|
15387
|
+
target.listMemberImportRunItems = members.listMemberImportRunItems.bind(members);
|
|
14138
15388
|
target.exportMembers = members.exportMembers.bind(members);
|
|
14139
15389
|
target.getMembersMessageActivity = members.getMembersMessageActivity.bind(members);
|
|
14140
15390
|
target.getMemberFilters = members.getMemberFilters.bind(members);
|
|
@@ -14235,6 +15485,11 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
|
|
|
14235
15485
|
target.getWorkspaceBySlug = workspaces.getWorkspace.bind(workspaces);
|
|
14236
15486
|
target.getWorkspaceScopes = workspaces.getWorkspaceScopes.bind(workspaces);
|
|
14237
15487
|
target.getUsageDashboard = workspaces.getUsageDashboard.bind(workspaces);
|
|
15488
|
+
target.getNotificationPreferences = workspaces.getNotificationPreferences.bind(workspaces);
|
|
15489
|
+
target.setWorkspaceNotificationMute = workspaces.setWorkspaceNotificationMute.bind(workspaces);
|
|
15490
|
+
target.registerAccountPushSubscription = workspaces.registerAccountPushSubscription.bind(workspaces);
|
|
15491
|
+
target.unregisterAccountPushSubscription = workspaces.unregisterAccountPushSubscription.bind(workspaces);
|
|
15492
|
+
target.listAccountPushSubscriptions = workspaces.listAccountPushSubscriptions.bind(workspaces);
|
|
14238
15493
|
target.getVapidPublicKey = workspaces.getVapidPublicKey.bind(workspaces);
|
|
14239
15494
|
target.testPushSubscription = workspaces.testPushSubscription.bind(workspaces);
|
|
14240
15495
|
target.registerPushSubscription = workspaces.registerPushSubscription.bind(workspaces);
|
|
@@ -14268,6 +15523,7 @@ function bindAuthMethods(target, auth, assignments) {
|
|
|
14268
15523
|
target.dismissAccountNotice = auth.dismissAccountNotice.bind(auth);
|
|
14269
15524
|
target.getUserAccount = auth.getUserAccount.bind(auth);
|
|
14270
15525
|
target.updateUserAccount = auth.updateUserAccount.bind(auth);
|
|
15526
|
+
target.updateMemberAvatar = auth.updateMemberAvatar.bind(auth);
|
|
14271
15527
|
target.recordAcquisition = auth.recordAcquisition.bind(auth);
|
|
14272
15528
|
target.login = auth.login.bind(auth);
|
|
14273
15529
|
target.resendCode = auth.resendCode.bind(auth);
|
|
@@ -14436,6 +15692,7 @@ function bindProjectsMethods(target, projects) {
|
|
|
14436
15692
|
// src/client/bindings/events.ts
|
|
14437
15693
|
function bindEventsMethods(target, events) {
|
|
14438
15694
|
target.getEventRules = events.getEventRules.bind(events);
|
|
15695
|
+
target.getEventRuleIndex = events.getEventRuleIndex.bind(events);
|
|
14439
15696
|
target.getAvailableActions = events.getAvailableActions.bind(events);
|
|
14440
15697
|
target.searchEventRules = events.searchEventRules.bind(events);
|
|
14441
15698
|
target.getEventRule = events.getEventRule.bind(events);
|
|
@@ -14500,6 +15757,7 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
|
|
|
14500
15757
|
target.getWorkflowConfigValidation = workflows.getWorkflowConfigValidation.bind(workflows);
|
|
14501
15758
|
target.getWorkflowPromptClassifications = workflows.getWorkflowPromptClassifications.bind(workflows);
|
|
14502
15759
|
target.reviewWorkflowPromptClassifications = workflows.reviewWorkflowPromptClassifications.bind(workflows);
|
|
15760
|
+
target.getWorkflowRunnerFileAccess = workflows.getWorkflowRunnerFileAccess.bind(workflows);
|
|
14503
15761
|
target.getWorkflowNotes = workflowNotes.getWorkflowNotes.bind(workflowNotes);
|
|
14504
15762
|
target.createWorkflowNote = workflowNotes.createWorkflowNote.bind(workflowNotes);
|
|
14505
15763
|
target.updateWorkflowNote = workflowNotes.updateWorkflowNote.bind(workflowNotes);
|
|
@@ -14567,6 +15825,7 @@ function bindCalendarsMethods(target, calendars) {
|
|
|
14567
15825
|
// src/client/bindings/communications.ts
|
|
14568
15826
|
function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRules) {
|
|
14569
15827
|
target.getPhoneNumbers = phoneNumbers.getPhoneNumbers.bind(phoneNumbers);
|
|
15828
|
+
target.getChatPhoneNumbers = phoneNumbers.getChatPhoneNumbers.bind(phoneNumbers);
|
|
14570
15829
|
target.getAvailablePhoneNumbers = phoneNumbers.getAvailablePhoneNumbers.bind(phoneNumbers);
|
|
14571
15830
|
target.requestPhoneNumber = phoneNumbers.requestPhoneNumber.bind(phoneNumbers);
|
|
14572
15831
|
target.getPhoneNumber = phoneNumbers.getPhoneNumber.bind(phoneNumbers);
|
|
@@ -14614,6 +15873,7 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
|
|
|
14614
15873
|
target.createNotificationRule = notificationRules.createNotificationRule.bind(notificationRules);
|
|
14615
15874
|
target.updateNotificationRule = notificationRules.updateNotificationRule.bind(notificationRules);
|
|
14616
15875
|
target.deleteNotificationRule = notificationRules.deleteNotificationRule.bind(notificationRules);
|
|
15876
|
+
target.getNotificationDestinations = notificationRules.getNotificationDestinations.bind(notificationRules);
|
|
14617
15877
|
}
|
|
14618
15878
|
|
|
14619
15879
|
// src/client/bindings/toolkits.ts
|
|
@@ -14714,6 +15974,7 @@ function bindAppsMethods(target, apps, builders, inquiries, oauth, oauthConnecti
|
|
|
14714
15974
|
target.denyAuthorization = oauth.denyAuthorization.bind(oauth);
|
|
14715
15975
|
target.getOAuthConsentClient = oauth.getOAuthConsentClient.bind(oauth);
|
|
14716
15976
|
target.getMcpConsentTargets = oauth.getMcpConsentTargets.bind(oauth);
|
|
15977
|
+
target.getConsentTargets = oauth.getConsentTargets.bind(oauth);
|
|
14717
15978
|
target.listMcpGrants = oauth.listMcpGrants.bind(oauth);
|
|
14718
15979
|
target.narrowMcpGrant = oauth.narrowMcpGrant.bind(oauth);
|
|
14719
15980
|
target.revokeMcpGrant = oauth.revokeMcpGrant.bind(oauth);
|
|
@@ -14746,6 +16007,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
14746
16007
|
target.getMondaySyncConfig = mondayIntegration.getMondaySyncConfig.bind(mondayIntegration);
|
|
14747
16008
|
target.getMondaySyncLogs = mondayIntegration.getMondaySyncLogs.bind(mondayIntegration);
|
|
14748
16009
|
target.updateMondaySyncConfig = mondayIntegration.updateMondaySyncConfig.bind(mondayIntegration);
|
|
16010
|
+
target.validateMondaySyncConfig = mondayIntegration.validateMondaySyncConfig.bind(mondayIntegration);
|
|
14749
16011
|
target.getLinkedMondayMembers = mondayIntegration.getLinkedMondayMembers.bind(mondayIntegration);
|
|
14750
16012
|
target.getMondayReconciliationMatches = mondayIntegration.getMondayReconciliationMatches.bind(mondayIntegration);
|
|
14751
16013
|
target.linkMemberToMonday = mondayIntegration.linkMemberToMonday.bind(mondayIntegration);
|
|
@@ -14789,6 +16051,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
14789
16051
|
target.getTeamsConversations = teamsApps.getTeamsConversations.bind(teamsApps);
|
|
14790
16052
|
target.getTeamsInstallations = teamsApps.getTeamsInstallations.bind(teamsApps);
|
|
14791
16053
|
target.getTeamsAppAccounts = teamsApps.getTeamsAppAccounts.bind(teamsApps);
|
|
16054
|
+
target.getTeamsNotificationDestinations = teamsApps.getTeamsNotificationDestinations.bind(teamsApps);
|
|
14792
16055
|
target.getFhirConnections = fhirConnections.getFhirConnections.bind(fhirConnections);
|
|
14793
16056
|
target.getFhirConnection = fhirConnections.getFhirConnection.bind(fhirConnections);
|
|
14794
16057
|
target.getFhirConnectionByUuid = fhirConnections.getFhirConnectionByUuid.bind(fhirConnections);
|
|
@@ -14848,6 +16111,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
14848
16111
|
target.syncCalendarWithHealthie = healthie.syncCalendarWithHealthie.bind(healthie);
|
|
14849
16112
|
target.getLinkedHealthieMembers = healthie.getLinkedHealthieMembers.bind(healthie);
|
|
14850
16113
|
target.getHealthieReconciliationMatches = healthie.getHealthieReconciliationMatches.bind(healthie);
|
|
16114
|
+
target.getHealthieAppointmentPatientMatches = healthie.getHealthieAppointmentPatientMatches.bind(healthie);
|
|
14851
16115
|
target.linkMemberToHealthie = healthie.linkMemberToHealthie.bind(healthie);
|
|
14852
16116
|
target.unlinkMemberFromHealthie = healthie.unlinkMemberFromHealthie.bind(healthie);
|
|
14853
16117
|
target.listHealthieAppointmentTypes = healthie.listHealthieAppointmentTypes.bind(healthie);
|
|
@@ -14880,6 +16144,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
14880
16144
|
target.getSalesforceSyncConfig = salesforce.getSalesforceSyncConfig.bind(salesforce);
|
|
14881
16145
|
target.getSalesforceSyncLogs = salesforce.getSalesforceSyncLogs.bind(salesforce);
|
|
14882
16146
|
target.updateSalesforceSyncConfig = salesforce.updateSalesforceSyncConfig.bind(salesforce);
|
|
16147
|
+
target.validateSalesforceSyncConfig = salesforce.validateSalesforceSyncConfig.bind(salesforce);
|
|
14883
16148
|
target.resyncSalesforceLinkedMembers = salesforce.resyncSalesforceLinkedMembers.bind(salesforce);
|
|
14884
16149
|
target.listSalesforceObjects = salesforce.listSalesforceObjects.bind(salesforce);
|
|
14885
16150
|
target.describeSalesforceObject = salesforce.describeSalesforceObject.bind(salesforce);
|
|
@@ -14895,6 +16160,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
14895
16160
|
target.startHubspotOAuth = hubspot.startHubspotOAuth.bind(hubspot);
|
|
14896
16161
|
target.getHubspotStatus = hubspot.getHubspotStatus.bind(hubspot);
|
|
14897
16162
|
target.disconnectHubspot = hubspot.disconnectHubspot.bind(hubspot);
|
|
16163
|
+
target.switchHubspotToPlatformApp = hubspot.switchHubspotToPlatformApp.bind(hubspot);
|
|
14898
16164
|
target.disableHubspot = hubspot.disableHubspot.bind(hubspot);
|
|
14899
16165
|
target.enableHubspot = hubspot.enableHubspot.bind(hubspot);
|
|
14900
16166
|
target.deleteHubspot = hubspot.deleteHubspot.bind(hubspot);
|
|
@@ -14909,6 +16175,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
14909
16175
|
target.getHubspotDealProperties = hubspot.getHubspotDealProperties.bind(hubspot);
|
|
14910
16176
|
target.getHubspotForms = hubspot.getHubspotForms.bind(hubspot);
|
|
14911
16177
|
target.getHubspotMeetingLinks = hubspot.getHubspotMeetingLinks.bind(hubspot);
|
|
16178
|
+
target.getHubspotCrmObjects = hubspot.getHubspotCrmObjects.bind(hubspot);
|
|
14912
16179
|
target.getHubspotObjectProperties = hubspot.getHubspotObjectProperties.bind(hubspot);
|
|
14913
16180
|
target.getHubspotManagedRules = hubspot.getHubspotManagedRules.bind(hubspot);
|
|
14914
16181
|
target.getHubspotSyncLogs = hubspot.getHubspotSyncLogs.bind(hubspot);
|
|
@@ -14916,14 +16183,18 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
14916
16183
|
target.getConnectionSyncCapabilities = connectionSync.getConnectionSyncCapabilities.bind(connectionSync);
|
|
14917
16184
|
target.getConnectionSyncConfig = connectionSync.getConnectionSyncConfig.bind(connectionSync);
|
|
14918
16185
|
target.updateConnectionSyncConfig = connectionSync.updateConnectionSyncConfig.bind(connectionSync);
|
|
16186
|
+
target.validateConnectionSyncConfig = connectionSync.validateConnectionSyncConfig.bind(connectionSync);
|
|
14919
16187
|
target.getConnectionSyncCheckpoint = connectionSync.getConnectionSyncCheckpoint.bind(connectionSync);
|
|
14920
16188
|
target.startSyncRun = connectionSync.startSyncRun.bind(connectionSync);
|
|
14921
16189
|
target.getSyncRuns = connectionSync.getSyncRuns.bind(connectionSync);
|
|
14922
16190
|
target.getSyncRunItems = connectionSync.getSyncRunItems.bind(connectionSync);
|
|
14923
16191
|
target.getSyncRunItemsPage = connectionSync.getSyncRunItemsPage.bind(connectionSync);
|
|
14924
16192
|
target.getMemberSyncSummary = connectionSync.getMemberSyncSummary.bind(connectionSync);
|
|
16193
|
+
target.getSyncFailureSummary = connectionSync.getSyncFailureSummary.bind(connectionSync);
|
|
16194
|
+
target.getSyncFailures = connectionSync.getSyncFailures.bind(connectionSync);
|
|
14925
16195
|
target.getConnectionFieldHomes = connectionSync.getConnectionFieldHomes.bind(connectionSync);
|
|
14926
16196
|
target.getInboundRecordStatus = connectionSync.getInboundRecordStatus.bind(connectionSync);
|
|
16197
|
+
target.getOwnerMemberStatus = connectionSync.getOwnerMemberStatus.bind(connectionSync);
|
|
14927
16198
|
target.getConnectionWritePreview = connectionSync.getConnectionWritePreview.bind(connectionSync);
|
|
14928
16199
|
target.clearConnectionMemberExclusion = connectionSync.clearConnectionMemberExclusion.bind(connectionSync);
|
|
14929
16200
|
target.linkUnlinkedMembersByIdentity = connectionSync.linkUnlinkedMembersByIdentity.bind(connectionSync);
|
|
@@ -14967,13 +16238,6 @@ function bindOperatorMethods(target, operatorGroups) {
|
|
|
14967
16238
|
|
|
14968
16239
|
// src/client/bindings/org.ts
|
|
14969
16240
|
function bindOrgMethods(target, org) {
|
|
14970
|
-
target.authorizeOrgManagerDelegation = org.authorizeOrgManagerDelegation.bind(org);
|
|
14971
|
-
target.getOrgManagerCredentialResponse = org.getOrgManagerCredentialResponse.bind(org);
|
|
14972
|
-
target.stopOrgManagerTurn = org.stopOrgManagerTurn.bind(org);
|
|
14973
|
-
target.getOrgManagerChats = org.getOrgManagerChats.bind(org);
|
|
14974
|
-
target.createOrgManagerChat = org.createOrgManagerChat.bind(org);
|
|
14975
|
-
target.getOrgManagerMessages = org.getOrgManagerMessages.bind(org);
|
|
14976
|
-
target.startOrgManagerTurn = org.startOrgManagerTurn.bind(org);
|
|
14977
16241
|
target.listOrgDomains = org.listOrgDomains.bind(org);
|
|
14978
16242
|
target.registerOrgDomain = org.registerOrgDomain.bind(org);
|
|
14979
16243
|
target.getOrgDomain = org.getOrgDomain.bind(org);
|
|
@@ -15062,11 +16326,13 @@ function bindBundlesMethods(target, bundles, resourceWorkflows) {
|
|
|
15062
16326
|
target.listBundleInstallations = bundles.listBundleInstallations.bind(bundles);
|
|
15063
16327
|
target.listBundles = bundles.listBundles.bind(bundles);
|
|
15064
16328
|
target.listBundleWorkflowCandidates = bundles.listBundleWorkflowCandidates.bind(bundles);
|
|
16329
|
+
target.getWorkflowBundleMembership = bundles.getWorkflowBundleMembership.bind(bundles);
|
|
15065
16330
|
target.listBundleJourneyCandidates = bundles.listBundleJourneyCandidates.bind(bundles);
|
|
15066
16331
|
target.getBundleJourneyCandidate = bundles.getBundleJourneyCandidate.bind(bundles);
|
|
15067
16332
|
target.createBundle = bundles.createBundle.bind(bundles);
|
|
15068
16333
|
target.getBundleDraft = bundles.getBundleDraft.bind(bundles);
|
|
15069
16334
|
target.replaceBundleDraft = bundles.replaceBundleDraft.bind(bundles);
|
|
16335
|
+
target.getBundlePublishPreview = bundles.getBundlePublishPreview.bind(bundles);
|
|
15070
16336
|
target.publishBundle = bundles.publishBundle.bind(bundles);
|
|
15071
16337
|
target.listBundleVersions = bundles.listBundleVersions.bind(bundles);
|
|
15072
16338
|
target.getBundle = bundles.getBundle.bind(bundles);
|
|
@@ -15084,6 +16350,7 @@ function bindInstallationsMethods(target, installations) {
|
|
|
15084
16350
|
target.listInstallations = installations.listInstallations.bind(installations);
|
|
15085
16351
|
target.getInstallation = installations.getInstallation.bind(installations);
|
|
15086
16352
|
target.getInstallationReadiness = installations.getInstallationReadiness.bind(installations);
|
|
16353
|
+
target.getInstallationAbilitySettings = installations.getInstallationAbilitySettings.bind(installations);
|
|
15087
16354
|
target.previewInstallationUpgrade = installations.previewInstallationUpgrade.bind(installations);
|
|
15088
16355
|
target.upgradeInstallation = installations.upgradeInstallation.bind(installations);
|
|
15089
16356
|
target.setInstallationPolicy = installations.setInstallationPolicy.bind(installations);
|
|
@@ -15097,17 +16364,24 @@ function bindInstallationsMethods(target, installations) {
|
|
|
15097
16364
|
|
|
15098
16365
|
// src/client/bindings/journeys.ts
|
|
15099
16366
|
function bindJourneysMethods(target, journeys) {
|
|
16367
|
+
target.listJourneyTests = journeys.listJourneyTests.bind(journeys);
|
|
16368
|
+
target.createJourneyTest = journeys.createJourneyTest.bind(journeys);
|
|
16369
|
+
target.updateJourneyTest = journeys.updateJourneyTest.bind(journeys);
|
|
16370
|
+
target.deleteJourneyTest = journeys.deleteJourneyTest.bind(journeys);
|
|
16371
|
+
target.runJourneyTests = journeys.runJourneyTests.bind(journeys);
|
|
16372
|
+
target.simulateJourney = journeys.simulateJourney.bind(journeys);
|
|
15100
16373
|
target.getJourneys = journeys.getJourneys.bind(journeys);
|
|
15101
16374
|
target.getJourney = journeys.getJourney.bind(journeys);
|
|
15102
16375
|
target.getJourneyAuthoring = journeys.getJourneyAuthoring.bind(journeys);
|
|
15103
16376
|
target.putJourneyDraft = journeys.putJourneyDraft.bind(journeys);
|
|
15104
16377
|
target.deleteJourneyDraft = journeys.deleteJourneyDraft.bind(journeys);
|
|
15105
|
-
target.
|
|
15106
|
-
target.
|
|
16378
|
+
target.putJourneyDefinition = journeys.putJourneyDefinition.bind(journeys);
|
|
16379
|
+
target.getJourneyDefinitionValidation = journeys.getJourneyDefinitionValidation.bind(journeys);
|
|
15107
16380
|
target.getJourneyFilterOptions = journeys.getJourneyFilterOptions.bind(journeys);
|
|
15108
16381
|
target.getJourneyHealth = journeys.getJourneyHealth.bind(journeys);
|
|
16382
|
+
target.getJourneyHistory = journeys.getJourneyHistory.bind(journeys);
|
|
15109
16383
|
target.getJourneySendEstimate = journeys.getJourneySendEstimate.bind(journeys);
|
|
15110
|
-
target.
|
|
16384
|
+
target.cloneJourneyToCurrent = journeys.cloneJourneyToCurrent.bind(journeys);
|
|
15111
16385
|
target.createJourney = journeys.createJourney.bind(journeys);
|
|
15112
16386
|
target.updateJourney = journeys.updateJourney.bind(journeys);
|
|
15113
16387
|
target.archiveJourney = journeys.archiveJourney.bind(journeys);
|
|
@@ -15255,6 +16529,10 @@ function bindSupportRequestMethods(target, supportRequests) {
|
|
|
15255
16529
|
target.closeWorkspaceSupportRequest = supportRequests.closeWorkspaceSupportRequest.bind(supportRequests);
|
|
15256
16530
|
target.reopenWorkspaceSupportRequest = supportRequests.reopenWorkspaceSupportRequest.bind(supportRequests);
|
|
15257
16531
|
target.clickWorkspaceSupportRequestResource = supportRequests.clickWorkspaceSupportRequestResource.bind(supportRequests);
|
|
16532
|
+
target.listOrgSupportRequestCcCandidates = supportRequests.listOrgSupportRequestCcCandidates.bind(supportRequests);
|
|
16533
|
+
target.addOrgSupportRequestParticipants = supportRequests.addOrgSupportRequestParticipants.bind(supportRequests);
|
|
16534
|
+
target.listWorkspaceSupportRequestCcCandidates = supportRequests.listWorkspaceSupportRequestCcCandidates.bind(supportRequests);
|
|
16535
|
+
target.addWorkspaceSupportRequestParticipants = supportRequests.addWorkspaceSupportRequestParticipants.bind(supportRequests);
|
|
15258
16536
|
}
|
|
15259
16537
|
|
|
15260
16538
|
// src/client/bindings/routing-rules.ts
|
|
@@ -15291,6 +16569,7 @@ var GravityRailClient = class {
|
|
|
15291
16569
|
apis;
|
|
15292
16570
|
// Tasks API
|
|
15293
16571
|
getTasks;
|
|
16572
|
+
getTaskCatalog;
|
|
15294
16573
|
getTask;
|
|
15295
16574
|
createTask;
|
|
15296
16575
|
updateTask;
|
|
@@ -15306,6 +16585,7 @@ var GravityRailClient = class {
|
|
|
15306
16585
|
deleteAbility;
|
|
15307
16586
|
getCharlestonTestDeliveryRecipients;
|
|
15308
16587
|
// Chats API
|
|
16588
|
+
chat;
|
|
15309
16589
|
getChats;
|
|
15310
16590
|
getChat;
|
|
15311
16591
|
getChatByUuid;
|
|
@@ -15349,6 +16629,8 @@ var GravityRailClient = class {
|
|
|
15349
16629
|
createChatCompletion;
|
|
15350
16630
|
exportChats;
|
|
15351
16631
|
exportChat;
|
|
16632
|
+
listChatStaffNotes;
|
|
16633
|
+
createChatStaffNote;
|
|
15352
16634
|
findOrCreateDMChat;
|
|
15353
16635
|
sendChatMessage;
|
|
15354
16636
|
getChatPhoneCalls;
|
|
@@ -15377,9 +16659,6 @@ var GravityRailClient = class {
|
|
|
15377
16659
|
getAnonymousFormSchema;
|
|
15378
16660
|
submitAnonymousForm;
|
|
15379
16661
|
getDataTypes;
|
|
15380
|
-
getDataTypeDraft;
|
|
15381
|
-
saveDataTypeDraft;
|
|
15382
|
-
publishDataTypeDraft;
|
|
15383
16662
|
getDataTypeVersions;
|
|
15384
16663
|
getDataType;
|
|
15385
16664
|
getDataTypeByUuid;
|
|
@@ -15391,6 +16670,7 @@ var GravityRailClient = class {
|
|
|
15391
16670
|
unarchiveDataType;
|
|
15392
16671
|
cloneDataType;
|
|
15393
16672
|
getDataRecords;
|
|
16673
|
+
getWorkspaceValuesRecord;
|
|
15394
16674
|
listAnonymousFormSubmissions;
|
|
15395
16675
|
getAnonymousFormSubmission;
|
|
15396
16676
|
getDataRecord;
|
|
@@ -15423,6 +16703,7 @@ var GravityRailClient = class {
|
|
|
15423
16703
|
updateCurrentMember;
|
|
15424
16704
|
getWorkspaceMembers;
|
|
15425
16705
|
getWorkspaceMember;
|
|
16706
|
+
getMemberSmsSenders;
|
|
15426
16707
|
getMemberByUuid;
|
|
15427
16708
|
// Org-scoped, so deliberately absent from WORKSPACE_METHOD_NAMES: that proxy
|
|
15428
16709
|
// passes a workspace uuid as the first argument.
|
|
@@ -15439,6 +16720,9 @@ var GravityRailClient = class {
|
|
|
15439
16720
|
bulkCreateMembers;
|
|
15440
16721
|
previewImportMembers;
|
|
15441
16722
|
importMembers;
|
|
16723
|
+
startMemberImportRun;
|
|
16724
|
+
listMemberImportRuns;
|
|
16725
|
+
listMemberImportRunItems;
|
|
15442
16726
|
exportMembers;
|
|
15443
16727
|
getMembersMessageActivity;
|
|
15444
16728
|
getMemberFilters;
|
|
@@ -15498,6 +16782,8 @@ var GravityRailClient = class {
|
|
|
15498
16782
|
deleteAgent;
|
|
15499
16783
|
archiveAgent;
|
|
15500
16784
|
unarchiveAgent;
|
|
16785
|
+
getOrgAgentJobs;
|
|
16786
|
+
stopOrgAgentJob;
|
|
15501
16787
|
// Qualifications API
|
|
15502
16788
|
getQualifications;
|
|
15503
16789
|
getQualification;
|
|
@@ -15565,6 +16851,11 @@ var GravityRailClient = class {
|
|
|
15565
16851
|
queryActivityOneView;
|
|
15566
16852
|
queryActivityDigest;
|
|
15567
16853
|
getActivityCounts;
|
|
16854
|
+
// The one global notification feed, its bell number, and its mark action.
|
|
16855
|
+
// All three are account-authorized self endpoints.
|
|
16856
|
+
queryActivityNotifications;
|
|
16857
|
+
getActivityNotificationCount;
|
|
16858
|
+
markActivityNotifications;
|
|
15568
16859
|
getActivityCapabilities;
|
|
15569
16860
|
queryOrgActivity;
|
|
15570
16861
|
queryOrgActivityLatestSubjects;
|
|
@@ -15602,12 +16893,13 @@ var GravityRailClient = class {
|
|
|
15602
16893
|
getJourneyAuthoring;
|
|
15603
16894
|
putJourneyDraft;
|
|
15604
16895
|
deleteJourneyDraft;
|
|
15605
|
-
|
|
15606
|
-
|
|
16896
|
+
putJourneyDefinition;
|
|
16897
|
+
getJourneyDefinitionValidation;
|
|
15607
16898
|
getJourneyFilterOptions;
|
|
15608
16899
|
getJourneyHealth;
|
|
16900
|
+
getJourneyHistory;
|
|
15609
16901
|
getJourneySendEstimate;
|
|
15610
|
-
|
|
16902
|
+
cloneJourneyToCurrent;
|
|
15611
16903
|
createJourney;
|
|
15612
16904
|
updateJourney;
|
|
15613
16905
|
archiveJourney;
|
|
@@ -15632,6 +16924,12 @@ var GravityRailClient = class {
|
|
|
15632
16924
|
getStepMemberCounts;
|
|
15633
16925
|
advanceStep;
|
|
15634
16926
|
skipStep;
|
|
16927
|
+
listJourneyTests;
|
|
16928
|
+
createJourneyTest;
|
|
16929
|
+
updateJourneyTest;
|
|
16930
|
+
deleteJourneyTest;
|
|
16931
|
+
runJourneyTests;
|
|
16932
|
+
simulateJourney;
|
|
15635
16933
|
testRunJourney;
|
|
15636
16934
|
getJourneyNotes;
|
|
15637
16935
|
createJourneyNote;
|
|
@@ -15644,11 +16942,13 @@ var GravityRailClient = class {
|
|
|
15644
16942
|
getPublicBundle;
|
|
15645
16943
|
listBundles;
|
|
15646
16944
|
listBundleWorkflowCandidates;
|
|
16945
|
+
getWorkflowBundleMembership;
|
|
15647
16946
|
listBundleJourneyCandidates;
|
|
15648
16947
|
getBundleJourneyCandidate;
|
|
15649
16948
|
createBundle;
|
|
15650
16949
|
getBundleDraft;
|
|
15651
16950
|
replaceBundleDraft;
|
|
16951
|
+
getBundlePublishPreview;
|
|
15652
16952
|
publishBundle;
|
|
15653
16953
|
listBundleVersions;
|
|
15654
16954
|
getBundle;
|
|
@@ -15666,6 +16966,7 @@ var GravityRailClient = class {
|
|
|
15666
16966
|
listInstallations;
|
|
15667
16967
|
getInstallation;
|
|
15668
16968
|
getInstallationReadiness;
|
|
16969
|
+
getInstallationAbilitySettings;
|
|
15669
16970
|
previewInstallationUpgrade;
|
|
15670
16971
|
upgradeInstallation;
|
|
15671
16972
|
setInstallationPolicy;
|
|
@@ -15781,13 +17082,6 @@ var GravityRailClient = class {
|
|
|
15781
17082
|
upsertWidgetDomain;
|
|
15782
17083
|
deleteWidgetDomain;
|
|
15783
17084
|
// Org API
|
|
15784
|
-
getOrgManagerCredentialResponse;
|
|
15785
|
-
authorizeOrgManagerDelegation;
|
|
15786
|
-
getOrgManagerChats;
|
|
15787
|
-
createOrgManagerChat;
|
|
15788
|
-
getOrgManagerMessages;
|
|
15789
|
-
startOrgManagerTurn;
|
|
15790
|
-
stopOrgManagerTurn;
|
|
15791
17085
|
listOrgDomains;
|
|
15792
17086
|
registerOrgDomain;
|
|
15793
17087
|
getOrgDomain;
|
|
@@ -15842,6 +17136,11 @@ var GravityRailClient = class {
|
|
|
15842
17136
|
getWorkspaceLabels;
|
|
15843
17137
|
setWorkspaceLabels;
|
|
15844
17138
|
previewWorkspaceScope;
|
|
17139
|
+
getNotificationPreferences;
|
|
17140
|
+
setWorkspaceNotificationMute;
|
|
17141
|
+
registerAccountPushSubscription;
|
|
17142
|
+
unregisterAccountPushSubscription;
|
|
17143
|
+
listAccountPushSubscriptions;
|
|
15845
17144
|
getVapidPublicKey;
|
|
15846
17145
|
testPushSubscription;
|
|
15847
17146
|
registerPushSubscription;
|
|
@@ -15866,6 +17165,7 @@ var GravityRailClient = class {
|
|
|
15866
17165
|
viewAccountNotice;
|
|
15867
17166
|
dismissAccountNotice;
|
|
15868
17167
|
updateUserAccount;
|
|
17168
|
+
updateMemberAvatar;
|
|
15869
17169
|
recordAcquisition;
|
|
15870
17170
|
login;
|
|
15871
17171
|
resendCode;
|
|
@@ -16022,6 +17322,7 @@ var GravityRailClient = class {
|
|
|
16022
17322
|
getPublicFolderFiles;
|
|
16023
17323
|
// Events API
|
|
16024
17324
|
getEventRules;
|
|
17325
|
+
getEventRuleIndex;
|
|
16025
17326
|
getAvailableActions;
|
|
16026
17327
|
searchEventRules;
|
|
16027
17328
|
getEventRule;
|
|
@@ -16066,6 +17367,7 @@ var GravityRailClient = class {
|
|
|
16066
17367
|
getWorkflowConfigValidation;
|
|
16067
17368
|
getWorkflowPromptClassifications;
|
|
16068
17369
|
reviewWorkflowPromptClassifications;
|
|
17370
|
+
getWorkflowRunnerFileAccess;
|
|
16069
17371
|
getWorkflowNotes;
|
|
16070
17372
|
createWorkflowNote;
|
|
16071
17373
|
updateWorkflowNote;
|
|
@@ -16127,6 +17429,7 @@ var GravityRailClient = class {
|
|
|
16127
17429
|
syncCalendarWithGoogle;
|
|
16128
17430
|
// Communications API
|
|
16129
17431
|
getPhoneNumbers;
|
|
17432
|
+
getChatPhoneNumbers;
|
|
16130
17433
|
getAvailablePhoneNumbers;
|
|
16131
17434
|
requestPhoneNumber;
|
|
16132
17435
|
getPhoneNumber;
|
|
@@ -16174,6 +17477,7 @@ var GravityRailClient = class {
|
|
|
16174
17477
|
createNotificationRule;
|
|
16175
17478
|
updateNotificationRule;
|
|
16176
17479
|
deleteNotificationRule;
|
|
17480
|
+
getNotificationDestinations;
|
|
16177
17481
|
// Toolkits API
|
|
16178
17482
|
getToolkits;
|
|
16179
17483
|
getTool;
|
|
@@ -16272,6 +17576,7 @@ var GravityRailClient = class {
|
|
|
16272
17576
|
denyAuthorization;
|
|
16273
17577
|
getOAuthConsentClient;
|
|
16274
17578
|
getMcpConsentTargets;
|
|
17579
|
+
getConsentTargets;
|
|
16275
17580
|
listMcpGrants;
|
|
16276
17581
|
narrowMcpGrant;
|
|
16277
17582
|
revokeMcpGrant;
|
|
@@ -16302,6 +17607,7 @@ var GravityRailClient = class {
|
|
|
16302
17607
|
getMondaySyncConfig;
|
|
16303
17608
|
getMondaySyncLogs;
|
|
16304
17609
|
updateMondaySyncConfig;
|
|
17610
|
+
validateMondaySyncConfig;
|
|
16305
17611
|
getLinkedMondayMembers;
|
|
16306
17612
|
getMondayReconciliationMatches;
|
|
16307
17613
|
linkMemberToMonday;
|
|
@@ -16348,6 +17654,7 @@ var GravityRailClient = class {
|
|
|
16348
17654
|
getTeamsConversations;
|
|
16349
17655
|
getTeamsInstallations;
|
|
16350
17656
|
getTeamsAppAccounts;
|
|
17657
|
+
getTeamsNotificationDestinations;
|
|
16351
17658
|
// FHIR Connections API
|
|
16352
17659
|
getFhirConnections;
|
|
16353
17660
|
getFhirConnection;
|
|
@@ -16409,6 +17716,7 @@ var GravityRailClient = class {
|
|
|
16409
17716
|
syncCalendarWithHealthie;
|
|
16410
17717
|
getLinkedHealthieMembers;
|
|
16411
17718
|
getHealthieReconciliationMatches;
|
|
17719
|
+
getHealthieAppointmentPatientMatches;
|
|
16412
17720
|
linkMemberToHealthie;
|
|
16413
17721
|
unlinkMemberFromHealthie;
|
|
16414
17722
|
listHealthieAppointmentTypes;
|
|
@@ -16443,6 +17751,7 @@ var GravityRailClient = class {
|
|
|
16443
17751
|
getSalesforceSyncConfig;
|
|
16444
17752
|
getSalesforceSyncLogs;
|
|
16445
17753
|
updateSalesforceSyncConfig;
|
|
17754
|
+
validateSalesforceSyncConfig;
|
|
16446
17755
|
resyncSalesforceLinkedMembers;
|
|
16447
17756
|
listSalesforceObjects;
|
|
16448
17757
|
describeSalesforceObject;
|
|
@@ -16459,6 +17768,7 @@ var GravityRailClient = class {
|
|
|
16459
17768
|
startHubspotOAuth;
|
|
16460
17769
|
getHubspotStatus;
|
|
16461
17770
|
disconnectHubspot;
|
|
17771
|
+
switchHubspotToPlatformApp;
|
|
16462
17772
|
disableHubspot;
|
|
16463
17773
|
enableHubspot;
|
|
16464
17774
|
deleteHubspot;
|
|
@@ -16473,6 +17783,7 @@ var GravityRailClient = class {
|
|
|
16473
17783
|
getHubspotDealProperties;
|
|
16474
17784
|
getHubspotForms;
|
|
16475
17785
|
getHubspotMeetingLinks;
|
|
17786
|
+
getHubspotCrmObjects;
|
|
16476
17787
|
getHubspotObjectProperties;
|
|
16477
17788
|
getHubspotManagedRules;
|
|
16478
17789
|
getHubspotSyncLogs;
|
|
@@ -16481,14 +17792,18 @@ var GravityRailClient = class {
|
|
|
16481
17792
|
getConnectionSyncCapabilities;
|
|
16482
17793
|
getConnectionSyncConfig;
|
|
16483
17794
|
updateConnectionSyncConfig;
|
|
17795
|
+
validateConnectionSyncConfig;
|
|
16484
17796
|
getConnectionSyncCheckpoint;
|
|
16485
17797
|
startSyncRun;
|
|
16486
17798
|
getSyncRuns;
|
|
16487
17799
|
getSyncRunItems;
|
|
16488
17800
|
getSyncRunItemsPage;
|
|
16489
17801
|
getMemberSyncSummary;
|
|
17802
|
+
getSyncFailureSummary;
|
|
17803
|
+
getSyncFailures;
|
|
16490
17804
|
getConnectionFieldHomes;
|
|
16491
17805
|
getInboundRecordStatus;
|
|
17806
|
+
getOwnerMemberStatus;
|
|
16492
17807
|
getConnectionWritePreview;
|
|
16493
17808
|
clearConnectionMemberExclusion;
|
|
16494
17809
|
linkUnlinkedMembersByIdentity;
|
|
@@ -16567,6 +17882,10 @@ var GravityRailClient = class {
|
|
|
16567
17882
|
closeWorkspaceSupportRequest;
|
|
16568
17883
|
reopenWorkspaceSupportRequest;
|
|
16569
17884
|
clickWorkspaceSupportRequestResource;
|
|
17885
|
+
listOrgSupportRequestCcCandidates;
|
|
17886
|
+
addOrgSupportRequestParticipants;
|
|
17887
|
+
listWorkspaceSupportRequestCcCandidates;
|
|
17888
|
+
addWorkspaceSupportRequestParticipants;
|
|
16570
17889
|
// Routing Rules API
|
|
16571
17890
|
getRoutingRules;
|
|
16572
17891
|
getRoutingRule;
|
|
@@ -16858,19 +18177,6 @@ var ChannelMessageSource = {
|
|
|
16858
18177
|
other_chat: "other_chat"
|
|
16859
18178
|
};
|
|
16860
18179
|
|
|
16861
|
-
// src/types/generated/chat.ts
|
|
16862
|
-
var ChannelMessagesUnavailableReason = {
|
|
16863
|
-
not_single_channel: "not_single_channel",
|
|
16864
|
-
no_phone_number: "no_phone_number",
|
|
16865
|
-
no_counterpart_phone: "no_counterpart_phone"
|
|
16866
|
-
};
|
|
16867
|
-
var ChatMuteReason = {
|
|
16868
|
-
working: "working",
|
|
16869
|
-
waiting_on_person: "waiting_on_person",
|
|
16870
|
-
resolved_elsewhere: "resolved_elsewhere",
|
|
16871
|
-
not_mine: "not_mine"
|
|
16872
|
-
};
|
|
16873
|
-
|
|
16874
18180
|
// src/types/generated/assignment_task_transition.ts
|
|
16875
18181
|
var TaskTransitionInitiator = {
|
|
16876
18182
|
member: "member",
|
|
@@ -17065,26 +18371,6 @@ var MenuItemResponseItemType = {
|
|
|
17065
18371
|
none: "none"
|
|
17066
18372
|
};
|
|
17067
18373
|
|
|
17068
|
-
// src/types/generated/task.ts
|
|
17069
|
-
var AbilityConfigIssueCode = {
|
|
17070
|
-
missing_resource: "missing_resource",
|
|
17071
|
-
invalid_state: "invalid_state",
|
|
17072
|
-
feature_disabled: "feature_disabled",
|
|
17073
|
-
missing_connection: "missing_connection",
|
|
17074
|
-
external_drift: "external_drift",
|
|
17075
|
-
no_qualification_scenarios: "no_qualification_scenarios"
|
|
17076
|
-
};
|
|
17077
|
-
var AbilityConfigIssueSeverity = {
|
|
17078
|
-
warning: "warning",
|
|
17079
|
-
error: "error"
|
|
17080
|
-
};
|
|
17081
|
-
|
|
17082
|
-
// src/types/generated/workflow.ts
|
|
17083
|
-
var WorkflowRoutingMode = {
|
|
17084
|
-
open_world: "open_world",
|
|
17085
|
-
strict: "strict"
|
|
17086
|
-
};
|
|
17087
|
-
|
|
17088
18374
|
// src/types/widget-domain-types.ts
|
|
17089
18375
|
var WIDGET_SLUGS = ["chat", "operator", "operator-tools", "chat-app"];
|
|
17090
18376
|
|
|
@@ -18283,6 +19569,7 @@ export {
|
|
|
18283
19569
|
CalendarsApi,
|
|
18284
19570
|
CallsApi,
|
|
18285
19571
|
CELApi,
|
|
19572
|
+
ChatApi,
|
|
18286
19573
|
ChatsApi,
|
|
18287
19574
|
ConfluenceApi,
|
|
18288
19575
|
CustomToolkitsApi,
|
|
@@ -18302,9 +19589,13 @@ export {
|
|
|
18302
19589
|
McpServersApi,
|
|
18303
19590
|
MemberImportValidationError,
|
|
18304
19591
|
MembersApi,
|
|
19592
|
+
NotificationMarkerAction,
|
|
19593
|
+
OpenItemKind,
|
|
18305
19594
|
MondayIntegrationApi,
|
|
18306
19595
|
NotificationRulesApi,
|
|
18307
19596
|
OperatorApi,
|
|
19597
|
+
OrgApiKeyLimitUnconfirmedError,
|
|
19598
|
+
OrgWebhookScopeUnconfirmedError,
|
|
18308
19599
|
OrgApi,
|
|
18309
19600
|
OAuthConnectionsApi,
|
|
18310
19601
|
OAuthApi,
|
|
@@ -18319,8 +19610,8 @@ export {
|
|
|
18319
19610
|
RoutingAudience,
|
|
18320
19611
|
RoutingChannel,
|
|
18321
19612
|
RoutingTimeWindow,
|
|
18322
|
-
SalesforceApi,
|
|
18323
19613
|
ConnectionSyncApi,
|
|
19614
|
+
SalesforceApi,
|
|
18324
19615
|
HubspotApi,
|
|
18325
19616
|
SitesApi,
|
|
18326
19617
|
SnippetsApi,
|
|
@@ -18391,8 +19682,6 @@ export {
|
|
|
18391
19682
|
REALTIME_MODEL_OPENAI,
|
|
18392
19683
|
REALTIME_MODEL_OPENAI_MINI,
|
|
18393
19684
|
REALTIME_MODEL_OPENAI_2,
|
|
18394
|
-
REALTIME_MODEL_GEMINI,
|
|
18395
|
-
REALTIME_MODEL_GEMINI_VERTEX,
|
|
18396
19685
|
REALTIME_MODEL_CUSTOM,
|
|
18397
19686
|
STT_MODEL_DEEPGRAM_FLUX,
|
|
18398
19687
|
STT_MODEL_DEEPGRAM_FLUX_SELFHOST,
|
|
@@ -18407,12 +19696,19 @@ export {
|
|
|
18407
19696
|
TTS_MODEL_DEEPGRAM_AURA_2,
|
|
18408
19697
|
TTS_MODEL_AWS_POLLY_GENERATIVE,
|
|
18409
19698
|
TTS_MODEL_AWS_POLLY_NEURAL,
|
|
19699
|
+
DefaultCardConvergenceAction,
|
|
19700
|
+
DefaultCardConvergenceClassification,
|
|
19701
|
+
DefaultCardConvergenceOutcome,
|
|
19702
|
+
DefaultCardConvergenceStep,
|
|
19703
|
+
OverdueInvoicePayment,
|
|
18410
19704
|
OrganizationClassification,
|
|
18411
19705
|
PIDS_DISPOSITIONS,
|
|
18412
19706
|
PIDS_SOURCES,
|
|
18413
19707
|
FhirVendor,
|
|
18414
19708
|
FhirConnectionState,
|
|
18415
19709
|
FhirClientType,
|
|
19710
|
+
SyncErrorCode,
|
|
19711
|
+
LinkFailureCode,
|
|
18416
19712
|
CrmActivityKind,
|
|
18417
19713
|
RunHealthCategory,
|
|
18418
19714
|
SeedSpeaker,
|
|
@@ -18447,6 +19743,13 @@ export {
|
|
|
18447
19743
|
UiPromptPresentedKind,
|
|
18448
19744
|
UiPromptResponseKind,
|
|
18449
19745
|
UiPromptResponseStatus,
|
|
19746
|
+
PROPOSED_MESSAGE_TOOL_NAMES,
|
|
19747
|
+
PROPOSED_MESSAGE_SETTLED_TOOL_NAME,
|
|
19748
|
+
PROPOSED_MESSAGE_SETTLEMENT_STATUSES,
|
|
19749
|
+
isProposedMessageSettlementStatus,
|
|
19750
|
+
PROPOSED_MESSAGE_BODY_MAX_LENGTH,
|
|
19751
|
+
PROPOSED_MESSAGE_SUBJECT_MAX_LENGTH,
|
|
19752
|
+
parseProposedMessage,
|
|
18450
19753
|
parseExperimentStatCount,
|
|
18451
19754
|
TERMINAL_TASK_STATES,
|
|
18452
19755
|
WorkspaceInvitationsApi,
|
|
@@ -18510,8 +19813,6 @@ export {
|
|
|
18510
19813
|
QUERY_VALUELESS_OPS,
|
|
18511
19814
|
ChannelMessageDirection,
|
|
18512
19815
|
ChannelMessageSource,
|
|
18513
|
-
ChannelMessagesUnavailableReason,
|
|
18514
|
-
ChatMuteReason,
|
|
18515
19816
|
TaskTransitionInitiator,
|
|
18516
19817
|
EhrWritebackOutcomeResponseStatus,
|
|
18517
19818
|
SMS_DELIVERY_FAILURE_STATUSES,
|
|
@@ -18532,9 +19833,6 @@ export {
|
|
|
18532
19833
|
VoiceIntegrityUseCase,
|
|
18533
19834
|
AiConnectorPolicy,
|
|
18534
19835
|
MenuItemResponseItemType,
|
|
18535
|
-
AbilityConfigIssueCode,
|
|
18536
|
-
AbilityConfigIssueSeverity,
|
|
18537
|
-
WorkflowRoutingMode,
|
|
18538
19836
|
WIDGET_SLUGS,
|
|
18539
19837
|
PromoCodeStatus,
|
|
18540
19838
|
RecordContactPermissionRequestChannelNote,
|
|
@@ -18592,4 +19890,4 @@ export {
|
|
|
18592
19890
|
pathDraftFromStorage,
|
|
18593
19891
|
pathDraftToStorage
|
|
18594
19892
|
};
|
|
18595
|
-
//# sourceMappingURL=chunk-
|
|
19893
|
+
//# sourceMappingURL=chunk-L4XC6KDG.js.map
|