@gravity-rail/sdk 0.8.0 → 0.11.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 +45 -8
- package/dist/chunk-FSSXKQR5.js +471 -0
- package/dist/chunk-FSSXKQR5.js.map +1 -0
- package/dist/{chunk-QS6ZRQUZ.js → chunk-V7ZKEH4V.js} +8 -1
- package/dist/chunk-V7ZKEH4V.js.map +1 -0
- package/dist/{chunk-ML55PVP7.js → chunk-YESHLUL7.js} +1435 -703
- package/dist/chunk-YESHLUL7.js.map +1 -0
- package/dist/{client-C2aWAalu.d.cts → client-BCgXtr8p.d.cts} +3684 -1291
- package/dist/{client-CLGovEox.d.ts → client-Dh1l20Ue.d.ts} +3684 -1291
- package/dist/helpers.cjs +177 -13
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +82 -3
- package/dist/helpers.d.ts +82 -3
- package/dist/helpers.js +155 -12
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +1679 -420
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -24
- package/dist/index.d.ts +32 -24
- package/dist/index.js +193 -113
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +1742 -413
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +634 -29
- package/dist/internal.d.ts +634 -29
- package/dist/internal.js +140 -7
- package/dist/internal.js.map +1 -1
- package/dist/realtime.cjs +43 -0
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +26 -0
- package/dist/realtime.d.ts +26 -0
- package/dist/realtime.js +43 -0
- package/dist/realtime.js.map +1 -1
- package/dist/{scopes-D6a_Mvqr.d.ts → revision-state-BTF-MnbW.d.cts} +270 -23
- package/dist/{scopes-CDaJBQVT.d.cts → revision-state-DOH1NMGb.d.ts} +270 -23
- package/dist/schemas.cjs +56 -117
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +121 -484
- package/dist/schemas.d.ts +121 -484
- package/dist/schemas.js +55 -114
- package/dist/schemas.js.map +1 -1
- package/dist/{inquiries-CmECZnkl.d.cts → tasks-C4aYbWVv.d.cts} +944 -148
- package/dist/{inquiries-CmECZnkl.d.ts → tasks-C4aYbWVv.d.ts} +944 -148
- package/package.json +5 -5
- package/dist/chunk-ML55PVP7.js.map +0 -1
- package/dist/chunk-QS6ZRQUZ.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -46,6 +46,7 @@ __export(src_exports, {
|
|
|
46
46
|
CalendarScheduleAvailabilityType: () => CalendarScheduleAvailabilityType,
|
|
47
47
|
CalendarScheduleRecurrence: () => CalendarScheduleRecurrence,
|
|
48
48
|
CalendarSource: () => CalendarSource,
|
|
49
|
+
CapabilityClass: () => CapabilityClass,
|
|
49
50
|
ConsentMethod: () => ConsentMethod,
|
|
50
51
|
CriterionType: () => CriterionType,
|
|
51
52
|
DEFAULT_CHAT_MODEL: () => DEFAULT_CHAT_MODEL,
|
|
@@ -54,6 +55,7 @@ __export(src_exports, {
|
|
|
54
55
|
DEFAULT_VOICE_INFERENCE_MODEL: () => DEFAULT_VOICE_INFERENCE_MODEL,
|
|
55
56
|
DataCategory: () => DataCategory,
|
|
56
57
|
DataFieldType: () => DataFieldType,
|
|
58
|
+
DataRecordRetirementResponseReason: () => DataRecordRetirementResponseReason,
|
|
57
59
|
DataSensitivity: () => DataSensitivity,
|
|
58
60
|
DataTypeRecordScope: () => DataTypeRecordScope,
|
|
59
61
|
DriverMode: () => DriverMode,
|
|
@@ -77,6 +79,9 @@ __export(src_exports, {
|
|
|
77
79
|
McpServerState: () => McpServerState,
|
|
78
80
|
MemberFeature: () => MemberFeature,
|
|
79
81
|
MemberFilterBuilder: () => MemberFilterBuilder,
|
|
82
|
+
MemberImportMatchInfoMatchType: () => MemberImportMatchInfoMatchType,
|
|
83
|
+
MemberImportPreviewRowAction: () => MemberImportPreviewRowAction,
|
|
84
|
+
MemberImportValidationError: () => MemberImportValidationError,
|
|
80
85
|
MemberLabelBuilder: () => MemberLabelBuilder,
|
|
81
86
|
MemberType: () => MemberType,
|
|
82
87
|
MenuItemResponseItemType: () => MenuItemResponseItemType,
|
|
@@ -99,7 +104,12 @@ __export(src_exports, {
|
|
|
99
104
|
PERMISSION_NONE: () => PERMISSION_NONE,
|
|
100
105
|
PERMISSION_USE: () => PERMISSION_USE,
|
|
101
106
|
PERMISSION_VERIFY: () => PERMISSION_VERIFY,
|
|
107
|
+
PIDS_DISPOSITIONS: () => PIDS_DISPOSITIONS,
|
|
108
|
+
PIDS_SOURCES: () => PIDS_SOURCES,
|
|
109
|
+
POSITIVE_RATING_THRESHOLD: () => POSITIVE_RATING_THRESHOLD,
|
|
102
110
|
ProductType: () => ProductType,
|
|
111
|
+
QUERY_VALUELESS_OPS: () => QUERY_VALUELESS_OPS,
|
|
112
|
+
QueriesApi: () => QueriesApi,
|
|
103
113
|
REALTIME_MODEL_CUSTOM: () => REALTIME_MODEL_CUSTOM,
|
|
104
114
|
REALTIME_MODEL_GEMINI: () => REALTIME_MODEL_GEMINI,
|
|
105
115
|
REALTIME_MODEL_GEMINI_VERTEX: () => REALTIME_MODEL_GEMINI_VERTEX,
|
|
@@ -129,11 +139,11 @@ __export(src_exports, {
|
|
|
129
139
|
TTS_MODEL_ELEVENLABS_FLASH: () => TTS_MODEL_ELEVENLABS_FLASH,
|
|
130
140
|
TTS_MODEL_ELEVENLABS_MULTILINGUAL: () => TTS_MODEL_ELEVENLABS_MULTILINGUAL,
|
|
131
141
|
TTS_MODEL_ELEVENLABS_TURBO: () => TTS_MODEL_ELEVENLABS_TURBO,
|
|
132
|
-
TTS_MODEL_POCKET: () => TTS_MODEL_POCKET,
|
|
133
142
|
TTS_PREVIEW_PROVIDERS: () => TTS_PREVIEW_PROVIDERS,
|
|
134
143
|
TaskBuilder: () => TaskBuilder,
|
|
135
144
|
TemplatesApi: () => TemplatesApi,
|
|
136
145
|
ToolkitState: () => ToolkitState,
|
|
146
|
+
WIDGET_SLUGS: () => WIDGET_SLUGS,
|
|
137
147
|
WorkflowAccessWarningResourceType: () => WorkflowAccessWarningResourceType,
|
|
138
148
|
WorkflowBuilder: () => WorkflowBuilder,
|
|
139
149
|
WorkflowResourceType: () => WorkflowAccessWarningResourceType,
|
|
@@ -159,12 +169,14 @@ __export(src_exports, {
|
|
|
159
169
|
getFeaturesByVisibility: () => getFeaturesByVisibility,
|
|
160
170
|
getMissingDependencies: () => getMissingDependencies,
|
|
161
171
|
getResourceMetadata: () => getResourceMetadata,
|
|
172
|
+
getRevisionState: () => getRevisionState,
|
|
162
173
|
getScopeFromProductType: () => getScopeFromProductType,
|
|
163
174
|
getTTSProvider: () => getTTSProvider,
|
|
164
175
|
getVoiceModelId: () => getVoiceModelId,
|
|
165
176
|
initializeFeatures: () => initializeFeatures,
|
|
166
177
|
isChatType: () => isChatType,
|
|
167
178
|
isFeatureAvailable: () => isFeatureAvailable,
|
|
179
|
+
isPositiveRating: () => isPositiveRating,
|
|
168
180
|
isRegistryInitialized: () => isRegistryInitialized,
|
|
169
181
|
isSMSDeliveryFailureStatus: () => isSMSDeliveryFailureStatus,
|
|
170
182
|
requiresAssistantParticipant: () => requiresAssistantParticipant,
|
|
@@ -231,6 +243,22 @@ function parseOrgAuthChallenge(wwwAuthenticate) {
|
|
|
231
243
|
authUrl: authUrlMatch[1]
|
|
232
244
|
};
|
|
233
245
|
}
|
|
246
|
+
function getRequestOrgCookieName(cookieName) {
|
|
247
|
+
if (cookieName.startsWith("orgToken")) {
|
|
248
|
+
return cookieName.replace(/^orgToken/, "requestOrgToken");
|
|
249
|
+
}
|
|
250
|
+
if (cookieName.startsWith("orgSession")) {
|
|
251
|
+
return cookieName.replace(/^orgSession/, "requestOrgSession");
|
|
252
|
+
}
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
function orgAuthHeaderName(token) {
|
|
256
|
+
return token.startsWith("gr_sess_") ? "X-Org-Session" : "X-Org-Token";
|
|
257
|
+
}
|
|
258
|
+
function setOrgAuthHeader(headers, token) {
|
|
259
|
+
if (!token) return;
|
|
260
|
+
headers.set(orgAuthHeaderName(token), token);
|
|
261
|
+
}
|
|
234
262
|
var BaseApiClient = class {
|
|
235
263
|
baseUrl;
|
|
236
264
|
apiKey;
|
|
@@ -241,15 +269,15 @@ var BaseApiClient = class {
|
|
|
241
269
|
orgAuthHandler;
|
|
242
270
|
orgAuthInProgress = null;
|
|
243
271
|
actingMemberUuid;
|
|
244
|
-
|
|
272
|
+
orgSession;
|
|
245
273
|
/**
|
|
246
|
-
* The org_uuid that issued the current
|
|
274
|
+
* The org_uuid that issued the current org auth credential. Tracked so we can detect
|
|
247
275
|
* a 401 challenge from a *different* org and re-fire the handler — the
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
276
|
+
* credential is opaque to the client, so without this the original guard
|
|
277
|
+
* `!this.orgSession` would prevent re-auth across orgs and surface as a silent
|
|
278
|
+
* 401 in multi-org CLI workflows.
|
|
251
279
|
*/
|
|
252
|
-
|
|
280
|
+
orgSessionOrgUuid;
|
|
253
281
|
constructor(apiKey, baseUrl, customFetch) {
|
|
254
282
|
this.baseUrl = baseUrl;
|
|
255
283
|
this.apiKey = apiKey;
|
|
@@ -296,18 +324,25 @@ var BaseApiClient = class {
|
|
|
296
324
|
return this.actingMemberUuid;
|
|
297
325
|
}
|
|
298
326
|
/**
|
|
299
|
-
* Set the org
|
|
300
|
-
*
|
|
301
|
-
*
|
|
327
|
+
* Set the opaque org session credential for cross-domain requests.
|
|
328
|
+
* Opaque gr_sess_ values use X-Org-Session. Legacy orgToken JWE values still
|
|
329
|
+
* use X-Org-Token through setOrgToken() during the migration window.
|
|
302
330
|
*
|
|
303
|
-
* `orgUuid` is the org that issued the
|
|
304
|
-
* handler detect a stale
|
|
331
|
+
* `orgUuid` is the org that issued the credential; passing it lets the 401
|
|
332
|
+
* handler detect a stale session when a subsequent request targets a
|
|
305
333
|
* different org and re-fire the org-auth handler instead of silently
|
|
306
334
|
* 401-ing. Callers without that context (legacy / unknown) may omit it.
|
|
307
335
|
*/
|
|
336
|
+
setOrgSession(session, orgUuid) {
|
|
337
|
+
this.orgSession = session;
|
|
338
|
+
this.orgSessionOrgUuid = session ? orgUuid : void 0;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* @deprecated Legacy compatibility for stateless orgToken JWE credentials.
|
|
342
|
+
* Prefer setOrgSession() for opaque org browser sessions.
|
|
343
|
+
*/
|
|
308
344
|
setOrgToken(token, orgUuid) {
|
|
309
|
-
this.
|
|
310
|
-
this.orgTokenOrgUuid = token ? orgUuid : void 0;
|
|
345
|
+
this.setOrgSession(token, orgUuid);
|
|
311
346
|
}
|
|
312
347
|
async fetch(endpoint, options) {
|
|
313
348
|
try {
|
|
@@ -328,9 +363,7 @@ var BaseApiClient = class {
|
|
|
328
363
|
if (this.actingMemberUuid) {
|
|
329
364
|
headers.set("X-Acting-Member", this.actingMemberUuid);
|
|
330
365
|
}
|
|
331
|
-
|
|
332
|
-
headers.set("X-Org-Token", this.orgToken);
|
|
333
|
-
}
|
|
366
|
+
setOrgAuthHeader(headers, this.orgSession);
|
|
334
367
|
const fullUrl = `${this.baseUrl}/api/v2/${endpoint}`;
|
|
335
368
|
const response = await this.fetchFunction(fullUrl, {
|
|
336
369
|
...options,
|
|
@@ -354,31 +387,28 @@ var BaseApiClient = class {
|
|
|
354
387
|
try {
|
|
355
388
|
return await this.fetch(endpoint, options);
|
|
356
389
|
} catch (retryError) {
|
|
357
|
-
this.
|
|
358
|
-
this.
|
|
390
|
+
this.orgSession = void 0;
|
|
391
|
+
this.orgSessionOrgUuid = void 0;
|
|
359
392
|
throw retryError;
|
|
360
393
|
}
|
|
361
394
|
}
|
|
362
395
|
if (response.status === 401) {
|
|
363
396
|
const orgAuthInfo = parseOrgAuthChallenge(response.headers.get("WWW-Authenticate"));
|
|
364
|
-
if (orgAuthInfo && this.
|
|
365
|
-
this.
|
|
366
|
-
this.
|
|
397
|
+
if (orgAuthInfo && this.orgSession && this.orgSessionOrgUuid && this.orgSessionOrgUuid !== orgAuthInfo.orgUuid) {
|
|
398
|
+
this.orgSession = void 0;
|
|
399
|
+
this.orgSessionOrgUuid = void 0;
|
|
367
400
|
}
|
|
368
|
-
if (orgAuthInfo && !this.
|
|
369
|
-
const requestCookieName = orgAuthInfo.cookieName
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
if (cachedOrgToken) {
|
|
375
|
-
this.orgToken = cachedOrgToken;
|
|
376
|
-
this.orgTokenOrgUuid = orgAuthInfo.orgUuid;
|
|
401
|
+
if (orgAuthInfo && !this.orgSession) {
|
|
402
|
+
const requestCookieName = getRequestOrgCookieName(orgAuthInfo.cookieName);
|
|
403
|
+
const cachedOrgSession = requestCookieName ? getCookieValue(requestCookieName) : void 0;
|
|
404
|
+
if (cachedOrgSession) {
|
|
405
|
+
this.orgSession = cachedOrgSession;
|
|
406
|
+
this.orgSessionOrgUuid = orgAuthInfo.orgUuid;
|
|
377
407
|
try {
|
|
378
408
|
return await this.fetch(endpoint, options);
|
|
379
409
|
} catch (retryError) {
|
|
380
|
-
this.
|
|
381
|
-
this.
|
|
410
|
+
this.orgSession = void 0;
|
|
411
|
+
this.orgSessionOrgUuid = void 0;
|
|
382
412
|
throw retryError;
|
|
383
413
|
}
|
|
384
414
|
}
|
|
@@ -394,20 +424,20 @@ var BaseApiClient = class {
|
|
|
394
424
|
})();
|
|
395
425
|
}
|
|
396
426
|
await this.orgAuthInProgress;
|
|
397
|
-
const
|
|
398
|
-
if (!
|
|
427
|
+
const postHandlerSession = (requestCookieName ? getCookieValue(requestCookieName) : void 0) ?? this.orgSession;
|
|
428
|
+
if (!postHandlerSession) {
|
|
399
429
|
throw new ApiError(
|
|
400
|
-
"Organization authentication did not issue a
|
|
430
|
+
"Organization authentication did not issue a session",
|
|
401
431
|
401
|
|
402
432
|
);
|
|
403
433
|
}
|
|
404
|
-
this.
|
|
405
|
-
this.
|
|
434
|
+
this.orgSession = postHandlerSession;
|
|
435
|
+
this.orgSessionOrgUuid = orgAuthInfo.orgUuid;
|
|
406
436
|
try {
|
|
407
437
|
return await this.fetch(endpoint, options);
|
|
408
438
|
} catch (retryError) {
|
|
409
|
-
this.
|
|
410
|
-
this.
|
|
439
|
+
this.orgSession = void 0;
|
|
440
|
+
this.orgSessionOrgUuid = void 0;
|
|
411
441
|
throw retryError;
|
|
412
442
|
}
|
|
413
443
|
}
|
|
@@ -482,9 +512,7 @@ ${formattedErrors}`, response.status);
|
|
|
482
512
|
if (this.actingMemberUuid) {
|
|
483
513
|
headers.set("X-Acting-Member", this.actingMemberUuid);
|
|
484
514
|
}
|
|
485
|
-
|
|
486
|
-
headers.set("X-Org-Token", this.orgToken);
|
|
487
|
-
}
|
|
515
|
+
setOrgAuthHeader(headers, this.orgSession);
|
|
488
516
|
const response = await this.fetchFunction(`${this.baseUrl}/api/v2/${endpoint}`, {
|
|
489
517
|
...options,
|
|
490
518
|
...this.apiKey ? {} : { credentials: "include" },
|
|
@@ -507,31 +535,28 @@ ${formattedErrors}`, response.status);
|
|
|
507
535
|
try {
|
|
508
536
|
return await this.fetchRaw(endpoint, options, allowedErrorStatuses);
|
|
509
537
|
} catch (retryError) {
|
|
510
|
-
this.
|
|
511
|
-
this.
|
|
538
|
+
this.orgSession = void 0;
|
|
539
|
+
this.orgSessionOrgUuid = void 0;
|
|
512
540
|
throw retryError;
|
|
513
541
|
}
|
|
514
542
|
}
|
|
515
543
|
if (response.status === 401) {
|
|
516
544
|
const orgAuthInfo = parseOrgAuthChallenge(response.headers.get("WWW-Authenticate"));
|
|
517
|
-
if (orgAuthInfo && this.
|
|
518
|
-
this.
|
|
519
|
-
this.
|
|
545
|
+
if (orgAuthInfo && this.orgSession && this.orgSessionOrgUuid && this.orgSessionOrgUuid !== orgAuthInfo.orgUuid) {
|
|
546
|
+
this.orgSession = void 0;
|
|
547
|
+
this.orgSessionOrgUuid = void 0;
|
|
520
548
|
}
|
|
521
|
-
if (orgAuthInfo && !this.
|
|
522
|
-
const requestCookieName = orgAuthInfo.cookieName
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
if (cachedOrgToken) {
|
|
528
|
-
this.orgToken = cachedOrgToken;
|
|
529
|
-
this.orgTokenOrgUuid = orgAuthInfo.orgUuid;
|
|
549
|
+
if (orgAuthInfo && !this.orgSession) {
|
|
550
|
+
const requestCookieName = getRequestOrgCookieName(orgAuthInfo.cookieName);
|
|
551
|
+
const cachedOrgSession = requestCookieName ? getCookieValue(requestCookieName) : void 0;
|
|
552
|
+
if (cachedOrgSession) {
|
|
553
|
+
this.orgSession = cachedOrgSession;
|
|
554
|
+
this.orgSessionOrgUuid = orgAuthInfo.orgUuid;
|
|
530
555
|
try {
|
|
531
556
|
return await this.fetchRaw(endpoint, options, allowedErrorStatuses);
|
|
532
557
|
} catch (retryError) {
|
|
533
|
-
this.
|
|
534
|
-
this.
|
|
558
|
+
this.orgSession = void 0;
|
|
559
|
+
this.orgSessionOrgUuid = void 0;
|
|
535
560
|
throw retryError;
|
|
536
561
|
}
|
|
537
562
|
}
|
|
@@ -547,20 +572,20 @@ ${formattedErrors}`, response.status);
|
|
|
547
572
|
})();
|
|
548
573
|
}
|
|
549
574
|
await this.orgAuthInProgress;
|
|
550
|
-
const
|
|
551
|
-
if (!
|
|
575
|
+
const postHandlerSession = (requestCookieName ? getCookieValue(requestCookieName) : void 0) ?? this.orgSession;
|
|
576
|
+
if (!postHandlerSession) {
|
|
552
577
|
throw new ApiError(
|
|
553
|
-
"Organization authentication did not issue a
|
|
578
|
+
"Organization authentication did not issue a session",
|
|
554
579
|
401
|
|
555
580
|
);
|
|
556
581
|
}
|
|
557
|
-
this.
|
|
558
|
-
this.
|
|
582
|
+
this.orgSession = postHandlerSession;
|
|
583
|
+
this.orgSessionOrgUuid = orgAuthInfo.orgUuid;
|
|
559
584
|
try {
|
|
560
585
|
return await this.fetchRaw(endpoint, options, allowedErrorStatuses);
|
|
561
586
|
} catch (retryError) {
|
|
562
|
-
this.
|
|
563
|
-
this.
|
|
587
|
+
this.orgSession = void 0;
|
|
588
|
+
this.orgSessionOrgUuid = void 0;
|
|
564
589
|
throw retryError;
|
|
565
590
|
}
|
|
566
591
|
}
|
|
@@ -599,9 +624,7 @@ ${formattedErrors}`, response.status);
|
|
|
599
624
|
if (this.actingMemberUuid) {
|
|
600
625
|
headers.set("X-Acting-Member", this.actingMemberUuid);
|
|
601
626
|
}
|
|
602
|
-
|
|
603
|
-
headers.set("X-Org-Token", this.orgToken);
|
|
604
|
-
}
|
|
627
|
+
setOrgAuthHeader(headers, this.orgSession);
|
|
605
628
|
const fullUrl = `${this.baseUrl}/${path}`;
|
|
606
629
|
const response = await this.fetchFunction(fullUrl, {
|
|
607
630
|
...options,
|
|
@@ -642,20 +665,22 @@ var AbilitiesApi = class extends BaseApiClient {
|
|
|
642
665
|
}
|
|
643
666
|
/** Get the full spec for a single ability type by slug. */
|
|
644
667
|
async getAbilityType(wid, slug) {
|
|
645
|
-
return this.fetch(
|
|
646
|
-
`w/${wid}/abilities/types/${encodeURIComponent(slug)}`
|
|
647
|
-
);
|
|
668
|
+
return this.fetch(`w/${wid}/abilities/types/${encodeURIComponent(slug)}`);
|
|
648
669
|
}
|
|
649
670
|
/**
|
|
650
671
|
* List configured ability instances for a workflow or task scope.
|
|
651
|
-
*
|
|
672
|
+
* Provide exactly one of:
|
|
673
|
+
* - workflow scope: workflowId (stable root → draft revision) and/or
|
|
674
|
+
* workflowRevisionId (explicit pin)
|
|
675
|
+
* - taskId for task-scoped abilities
|
|
652
676
|
*/
|
|
653
677
|
async listAbilities(wid, options) {
|
|
654
678
|
const params = new URLSearchParams();
|
|
655
679
|
if (options.workflowId !== void 0)
|
|
656
680
|
params.append("workflowId", options.workflowId.toString());
|
|
657
|
-
if (options.
|
|
658
|
-
params.append("
|
|
681
|
+
if (options.workflowRevisionId !== void 0)
|
|
682
|
+
params.append("workflowRevisionId", options.workflowRevisionId.toString());
|
|
683
|
+
if (options.taskId !== void 0) params.append("taskId", options.taskId.toString());
|
|
659
684
|
return this.fetch(`w/${wid}/abilities?${params}`);
|
|
660
685
|
}
|
|
661
686
|
/** Create (enable) a configured ability on a workflow or task scope. */
|
|
@@ -678,6 +703,20 @@ var AbilitiesApi = class extends BaseApiClient {
|
|
|
678
703
|
method: "DELETE"
|
|
679
704
|
});
|
|
680
705
|
}
|
|
706
|
+
/**
|
|
707
|
+
* List recipient-directory rows approved for Charleston PMD test delivery
|
|
708
|
+
* (CS-150). Returns only {recipientKey, displayLabel} for active,
|
|
709
|
+
* test-delivery-allowed rows with a device id — never the PatientSync
|
|
710
|
+
* recipient_id. Scoped to agents:write + the charleston_nephrology_pmd_paging
|
|
711
|
+
* feature; used by the ability-config test-delivery dropdown. Kept on the
|
|
712
|
+
* ability-configuration API (not generic DataRecords) because the actual
|
|
713
|
+
* ability-editor scopes do not guarantee generic record access.
|
|
714
|
+
*/
|
|
715
|
+
async getCharlestonTestDeliveryRecipients(wid) {
|
|
716
|
+
return this.fetch(
|
|
717
|
+
`w/${wid}/app-connections/charleston_nephrology/test-delivery/eligible-recipients`
|
|
718
|
+
);
|
|
719
|
+
}
|
|
681
720
|
};
|
|
682
721
|
|
|
683
722
|
// src/api/access-grants.ts
|
|
@@ -749,6 +788,24 @@ var AccessGrantsApi = class extends BaseApiClient {
|
|
|
749
788
|
);
|
|
750
789
|
return resp.items;
|
|
751
790
|
}
|
|
791
|
+
/**
|
|
792
|
+
* List access grants *received* by a member (grantee view) — the
|
|
793
|
+
* "what can this agent do without asking?" list. Filter with
|
|
794
|
+
* status=active and/or a capabilityClass (e.g. 'tool.always_allow').
|
|
795
|
+
*/
|
|
796
|
+
async getGranteeGrants(wid, memberId, params) {
|
|
797
|
+
const searchParams = new URLSearchParams();
|
|
798
|
+
if (params?.status) searchParams.set("status", params.status);
|
|
799
|
+
if (params?.capabilityClass) {
|
|
800
|
+
searchParams.set("capability_class", params.capabilityClass);
|
|
801
|
+
}
|
|
802
|
+
if (params?.page) searchParams.set("page", params.page.toString());
|
|
803
|
+
if (params?.pageSize) searchParams.set("page_size", params.pageSize.toString());
|
|
804
|
+
const qs = searchParams.toString();
|
|
805
|
+
return this.fetch(
|
|
806
|
+
`w/${wid}/access-grants/grantee/${memberId}${qs ? `?${qs}` : ""}`
|
|
807
|
+
);
|
|
808
|
+
}
|
|
752
809
|
};
|
|
753
810
|
|
|
754
811
|
// src/api/agent-tasks.ts
|
|
@@ -835,25 +892,6 @@ var AgentsApi = class extends BaseApiClient {
|
|
|
835
892
|
method: "POST"
|
|
836
893
|
});
|
|
837
894
|
}
|
|
838
|
-
/** Resolve runtime tools for an agent on a simulated channel. */
|
|
839
|
-
async resolveAgentTools(wid, id, options) {
|
|
840
|
-
const params = new URLSearchParams();
|
|
841
|
-
params.append("channel", options.channel);
|
|
842
|
-
if (options.taskId !== void 0) params.append("taskId", options.taskId.toString());
|
|
843
|
-
if (options.taskUuid !== void 0) params.append("taskUuid", options.taskUuid);
|
|
844
|
-
return this.fetch(`w/${wid}/agents/${id}/resolve-tools?${params}`);
|
|
845
|
-
}
|
|
846
|
-
/**
|
|
847
|
-
* List the configured abilities effective for an agent via a task's workflow.
|
|
848
|
-
* Requires taskId because abilities are scoped to workflows/tasks, not agents.
|
|
849
|
-
*/
|
|
850
|
-
async listAgentAbilities(wid, id, options) {
|
|
851
|
-
const params = new URLSearchParams();
|
|
852
|
-
params.append("taskId", options.taskId.toString());
|
|
853
|
-
return this.fetch(
|
|
854
|
-
`w/${wid}/agents/${id}/abilities?${params}`
|
|
855
|
-
);
|
|
856
|
-
}
|
|
857
895
|
};
|
|
858
896
|
|
|
859
897
|
// src/api/ai-models.ts
|
|
@@ -1050,8 +1088,7 @@ var AssignmentsApi = class extends BaseApiClient {
|
|
|
1050
1088
|
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
1051
1089
|
if (options.mine) params.append("mine", options.mine.toString());
|
|
1052
1090
|
if (options.taskId) params.append("taskId", options.taskId.toString());
|
|
1053
|
-
if (options.memberId !== void 0)
|
|
1054
|
-
params.append("memberId", options.memberId.toString());
|
|
1091
|
+
if (options.memberId !== void 0) params.append("memberId", options.memberId.toString());
|
|
1055
1092
|
if (options.status) params.append("status", options.status);
|
|
1056
1093
|
return this.fetch(
|
|
1057
1094
|
`w/${wid}/assignments${params.toString() ? `?${params.toString()}` : ""}`
|
|
@@ -1180,6 +1217,20 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1180
1217
|
body: JSON.stringify(info)
|
|
1181
1218
|
});
|
|
1182
1219
|
}
|
|
1220
|
+
/**
|
|
1221
|
+
* Persist the account's FIRST-touch marketing attribution (write-once).
|
|
1222
|
+
*
|
|
1223
|
+
* Called by the browser at signup completion with its resolved UTM /
|
|
1224
|
+
* referrer / landing-page capture. The server keeps the first write and
|
|
1225
|
+
* ignores later posts (`recorded: false`), so calling this again is
|
|
1226
|
+
* harmless. Marketing context only — never emails, phones, or free text.
|
|
1227
|
+
*/
|
|
1228
|
+
async recordAcquisition(request) {
|
|
1229
|
+
return this.fetch("account/acquisition", {
|
|
1230
|
+
method: "POST",
|
|
1231
|
+
body: JSON.stringify(request)
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
1183
1234
|
/** Initiate SMS login by sending a verification code to the given phone number. */
|
|
1184
1235
|
async login(phoneNumber, wid, organizationUuid) {
|
|
1185
1236
|
const params = new URLSearchParams();
|
|
@@ -1310,15 +1361,11 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1310
1361
|
body: JSON.stringify({ email, organizationUuid, redirectUrl })
|
|
1311
1362
|
});
|
|
1312
1363
|
}
|
|
1313
|
-
/** Validate a magic link token
|
|
1314
|
-
async validateMagicLink(token
|
|
1315
|
-
const body = { token };
|
|
1316
|
-
if (otp) {
|
|
1317
|
-
body.otp = otp;
|
|
1318
|
-
}
|
|
1364
|
+
/** Validate a magic link token to complete authentication. */
|
|
1365
|
+
async validateMagicLink(token) {
|
|
1319
1366
|
return await this.fetch(`auth/validate-magic-link`, {
|
|
1320
1367
|
method: "POST",
|
|
1321
|
-
body: JSON.stringify(
|
|
1368
|
+
body: JSON.stringify({ token })
|
|
1322
1369
|
});
|
|
1323
1370
|
}
|
|
1324
1371
|
// ===== EMAIL VERIFICATION METHODS =====
|
|
@@ -1407,23 +1454,29 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1407
1454
|
// ===== TWO-FACTOR AUTHENTICATION LOGIN METHODS =====
|
|
1408
1455
|
/** Verify a TOTP code during login to complete two-factor authentication. */
|
|
1409
1456
|
async verifyTOTPAuth(tempToken, code) {
|
|
1410
|
-
return this.fetch(
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1457
|
+
return this.fetch(
|
|
1458
|
+
"auth/2fa/auth/totp",
|
|
1459
|
+
{
|
|
1460
|
+
method: "POST",
|
|
1461
|
+
body: JSON.stringify({
|
|
1462
|
+
temp_token: tempToken,
|
|
1463
|
+
code
|
|
1464
|
+
})
|
|
1465
|
+
}
|
|
1466
|
+
);
|
|
1417
1467
|
}
|
|
1418
1468
|
/** Verify a recovery code during login to complete two-factor authentication. */
|
|
1419
1469
|
async verifyRecoveryCodeAuth(tempToken, code) {
|
|
1420
|
-
return this.fetch(
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1470
|
+
return this.fetch(
|
|
1471
|
+
"auth/2fa/auth/recovery",
|
|
1472
|
+
{
|
|
1473
|
+
method: "POST",
|
|
1474
|
+
body: JSON.stringify({
|
|
1475
|
+
temp_token: tempToken,
|
|
1476
|
+
code
|
|
1477
|
+
})
|
|
1478
|
+
}
|
|
1479
|
+
);
|
|
1427
1480
|
}
|
|
1428
1481
|
/** Get WebAuthn credential request options for two-factor login verification. */
|
|
1429
1482
|
async getWebAuthnAuthOptions(tempToken) {
|
|
@@ -1436,13 +1489,16 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1436
1489
|
}
|
|
1437
1490
|
/** Verify a WebAuthn assertion during login to complete two-factor authentication. */
|
|
1438
1491
|
async verifyWebAuthnAuth(tempToken, assertionResponse) {
|
|
1439
|
-
return this.fetch(
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1492
|
+
return this.fetch(
|
|
1493
|
+
"auth/2fa/webauthn",
|
|
1494
|
+
{
|
|
1495
|
+
method: "POST",
|
|
1496
|
+
body: JSON.stringify({
|
|
1497
|
+
temp_token: tempToken,
|
|
1498
|
+
assertion_response: assertionResponse
|
|
1499
|
+
})
|
|
1500
|
+
}
|
|
1501
|
+
);
|
|
1446
1502
|
}
|
|
1447
1503
|
// ===== ORGANIZATION MEMBERSHIP METHODS =====
|
|
1448
1504
|
/** List all organizations the current account belongs to. */
|
|
@@ -1824,6 +1880,35 @@ var CallsApi = class extends BaseApiClient {
|
|
|
1824
1880
|
async getMessageTiming(wid, chatId) {
|
|
1825
1881
|
return this.fetch(`w/${wid}/recordings/chat/${chatId}/message-timing`);
|
|
1826
1882
|
}
|
|
1883
|
+
/**
|
|
1884
|
+
* Get PHI-safe provenance metadata for the recording served by
|
|
1885
|
+
* `/audio.wav` — source, encryption, channels, duration, status, etc.
|
|
1886
|
+
* Staff-only Twilio SIDs are present only for superusers. Returns 404
|
|
1887
|
+
* when the chat has no native recording row (legacy chunk-only playback).
|
|
1888
|
+
*/
|
|
1889
|
+
async getRecordingInfo(wid, chatId) {
|
|
1890
|
+
return this.fetch(`w/${wid}/recordings/chat/${chatId}/info`);
|
|
1891
|
+
}
|
|
1892
|
+
/** List the recorded audio chunks for a chat (metadata only). */
|
|
1893
|
+
async listChatRecordings(wid, chatId, options = {}) {
|
|
1894
|
+
const params = new URLSearchParams();
|
|
1895
|
+
if (options.role) params.set("role", options.role);
|
|
1896
|
+
return this.fetch(
|
|
1897
|
+
`w/${wid}/recordings/chat/${chatId}${params.toString() ? `?${params.toString()}` : ""}`
|
|
1898
|
+
);
|
|
1899
|
+
}
|
|
1900
|
+
/**
|
|
1901
|
+
* Get a single short-lived presigned URL to download the complete call
|
|
1902
|
+
* recording as one WAV file. The first request assembles + caches the
|
|
1903
|
+
* full-call WAV; later requests reuse it.
|
|
1904
|
+
*/
|
|
1905
|
+
async getCallRecordingDownloadUrl(wid, chatId, options = {}) {
|
|
1906
|
+
const params = new URLSearchParams();
|
|
1907
|
+
if (options.expiresIn !== void 0) params.set("expires_in", String(options.expiresIn));
|
|
1908
|
+
return this.fetch(
|
|
1909
|
+
`w/${wid}/recordings/chat/${chatId}/download-url${params.toString() ? `?${params.toString()}` : ""}`
|
|
1910
|
+
);
|
|
1911
|
+
}
|
|
1827
1912
|
};
|
|
1828
1913
|
|
|
1829
1914
|
// src/api/cel.ts
|
|
@@ -1862,8 +1947,7 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1862
1947
|
if (options.paused !== void 0) params.append("paused", options.paused.toString());
|
|
1863
1948
|
if (options.archived !== void 0) params.append("archived", options.archived.toString());
|
|
1864
1949
|
if (options.channel) params.append("channel", options.channel);
|
|
1865
|
-
|
|
1866
|
-
params.append("chatType", chatType);
|
|
1950
|
+
if (options.chatType) params.append("chatType", options.chatType);
|
|
1867
1951
|
if (options.memberId !== void 0) params.append("memberId", options.memberId.toString());
|
|
1868
1952
|
if (options.assistantMemberId !== void 0)
|
|
1869
1953
|
params.append("assistantMemberId", options.assistantMemberId.toString());
|
|
@@ -1874,6 +1958,11 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1874
1958
|
if (options.filters && options.filters.length > 0) {
|
|
1875
1959
|
params.append("filters", JSON.stringify(options.filters));
|
|
1876
1960
|
}
|
|
1961
|
+
if (options.query) params.append("query", JSON.stringify(options.query));
|
|
1962
|
+
if (options.workflowId !== void 0)
|
|
1963
|
+
params.append("workflowId", options.workflowId.toString());
|
|
1964
|
+
if (options.workflowRevisionId !== void 0)
|
|
1965
|
+
params.append("workflowRevisionId", options.workflowRevisionId.toString());
|
|
1877
1966
|
if (options.createdAfter) params.append("createdAfter", options.createdAfter);
|
|
1878
1967
|
if (options.createdBefore) params.append("createdBefore", options.createdBefore);
|
|
1879
1968
|
return params;
|
|
@@ -1908,6 +1997,17 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1908
1997
|
async getChatTokenUsage(wid, chatId) {
|
|
1909
1998
|
return this.fetch(`w/${wid}/chats/${chatId}/token-usage`);
|
|
1910
1999
|
}
|
|
2000
|
+
/** List scheduled callbacks for a chat (newest first). */
|
|
2001
|
+
async getChatCallbacks(wid, chatId) {
|
|
2002
|
+
return this.fetch(`w/${wid}/chats/${chatId}/callbacks`);
|
|
2003
|
+
}
|
|
2004
|
+
/** Cancel a pending scheduled callback on a chat. */
|
|
2005
|
+
async cancelChatCallback(wid, chatId, callbackId) {
|
|
2006
|
+
return this.fetch(
|
|
2007
|
+
`w/${wid}/chats/${chatId}/callbacks/${callbackId}/cancel`,
|
|
2008
|
+
{ method: "POST" }
|
|
2009
|
+
);
|
|
2010
|
+
}
|
|
1911
2011
|
/** Get todo items extracted from a chat. */
|
|
1912
2012
|
async getChatTodos(wid, chatId) {
|
|
1913
2013
|
return this.fetch(`w/${wid}/chats/${chatId}/todos`);
|
|
@@ -1946,9 +2046,11 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1946
2046
|
}
|
|
1947
2047
|
/** Create a new chat. */
|
|
1948
2048
|
async createChat(wid, chat) {
|
|
2049
|
+
const { agentMemberId, ...rest } = chat;
|
|
2050
|
+
const payload = agentMemberId !== void 0 && rest.assistantMemberId === void 0 ? { ...rest, assistantMemberId: agentMemberId } : rest;
|
|
1949
2051
|
return this.fetch(`w/${wid}/chats`, {
|
|
1950
2052
|
method: "POST",
|
|
1951
|
-
body: JSON.stringify(
|
|
2053
|
+
body: JSON.stringify(payload)
|
|
1952
2054
|
});
|
|
1953
2055
|
}
|
|
1954
2056
|
/**
|
|
@@ -1981,6 +2083,25 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1981
2083
|
body: JSON.stringify(chat)
|
|
1982
2084
|
});
|
|
1983
2085
|
}
|
|
2086
|
+
/**
|
|
2087
|
+
* Get per-chat model provenance for the Chat sidebar's model summary area:
|
|
2088
|
+
* the effective chat + realtime models, the agent's current default (the
|
|
2089
|
+
* reset/inherit target), and pinned/matches flags.
|
|
2090
|
+
*/
|
|
2091
|
+
async getChatModelOverride(wid, id) {
|
|
2092
|
+
return this.fetch(`w/${wid}/chats/${id}/model-override`);
|
|
2093
|
+
}
|
|
2094
|
+
/**
|
|
2095
|
+
* Pin or reset the per-chat chat/realtime model snapshot. A concrete model id
|
|
2096
|
+
* pins that model; an empty/null id resets it to the agent's current default.
|
|
2097
|
+
* Only fields present in the payload are touched.
|
|
2098
|
+
*/
|
|
2099
|
+
async updateChatModelOverride(wid, id, override) {
|
|
2100
|
+
return this.fetch(`w/${wid}/chats/${id}/model-override`, {
|
|
2101
|
+
method: "PUT",
|
|
2102
|
+
body: JSON.stringify(override)
|
|
2103
|
+
});
|
|
2104
|
+
}
|
|
1984
2105
|
/** Update the mute status of a chat. */
|
|
1985
2106
|
async updateChatMute(wid, id, muted) {
|
|
1986
2107
|
return this.fetch(`w/${wid}/chats/${id}/mute`, {
|
|
@@ -2011,7 +2132,8 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
2011
2132
|
}
|
|
2012
2133
|
);
|
|
2013
2134
|
}
|
|
2014
|
-
/** List messages in a chat with optional pagination.
|
|
2135
|
+
/** List messages in a chat with optional pagination.
|
|
2136
|
+
* ``id`` is the numeric chat id (documented) or the chat uuid (accepted). */
|
|
2015
2137
|
async getChatMessages(wid, id, limit, offset) {
|
|
2016
2138
|
const params = new URLSearchParams();
|
|
2017
2139
|
if (limit) params.append("limit", limit.toString());
|
|
@@ -2050,13 +2172,35 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
2050
2172
|
})
|
|
2051
2173
|
});
|
|
2052
2174
|
}
|
|
2053
|
-
/**
|
|
2054
|
-
|
|
2175
|
+
/**
|
|
2176
|
+
* List durable feedback rows for a chat (thumbs, explicit, supervisor, extracted).
|
|
2177
|
+
*/
|
|
2178
|
+
async getChatFeedback(wid, chatId, options = {}) {
|
|
2179
|
+
const params = new URLSearchParams();
|
|
2180
|
+
if (options.page != null) params.set("page", String(options.page));
|
|
2181
|
+
if (options.pageSize != null) params.set("pageSize", String(options.pageSize));
|
|
2182
|
+
if (options.source) params.set("source", options.source);
|
|
2183
|
+
if (options.rating) params.set("rating", options.rating);
|
|
2184
|
+
if (options.authorKind) params.set("authorKind", options.authorKind);
|
|
2185
|
+
const qs = params.toString();
|
|
2186
|
+
return this.fetch(
|
|
2187
|
+
`w/${wid}/chats/${chatId}/feedback${qs ? `?${qs}` : ""}`
|
|
2188
|
+
);
|
|
2189
|
+
}
|
|
2190
|
+
/**
|
|
2191
|
+
* Rate a chat message by its UUID.
|
|
2192
|
+
* Optional ``comment`` updates free-text details on the same durable rating row.
|
|
2193
|
+
*/
|
|
2194
|
+
async rateMessage(wid, chatId, messageUuid, rating, comment) {
|
|
2195
|
+
const body = { rating };
|
|
2196
|
+
if (comment !== void 0) {
|
|
2197
|
+
body.comment = comment;
|
|
2198
|
+
}
|
|
2055
2199
|
return this.fetch(
|
|
2056
2200
|
`w/${wid}/chats/${chatId}/messages/${messageUuid}/rate`,
|
|
2057
2201
|
{
|
|
2058
2202
|
method: "POST",
|
|
2059
|
-
body: JSON.stringify(
|
|
2203
|
+
body: JSON.stringify(body)
|
|
2060
2204
|
}
|
|
2061
2205
|
);
|
|
2062
2206
|
}
|
|
@@ -2322,6 +2466,51 @@ var CustomToolkitsApi = class extends BaseApiClient {
|
|
|
2322
2466
|
}
|
|
2323
2467
|
};
|
|
2324
2468
|
|
|
2469
|
+
// src/api/dashboards.ts
|
|
2470
|
+
var DashboardsApi = class extends BaseApiClient {
|
|
2471
|
+
/** List all dashboards for the workspace, in tab order. */
|
|
2472
|
+
async getDashboards(wid) {
|
|
2473
|
+
return this.fetch(`w/${wid}/dashboards`);
|
|
2474
|
+
}
|
|
2475
|
+
/** Get a dashboard by ID. */
|
|
2476
|
+
async getDashboard(wid, id) {
|
|
2477
|
+
return this.fetch(`w/${wid}/dashboards/${id}`);
|
|
2478
|
+
}
|
|
2479
|
+
/** Create a named dashboard, optionally with an initial widget list. */
|
|
2480
|
+
async createDashboard(wid, body) {
|
|
2481
|
+
return this.fetch(`w/${wid}/dashboards`, {
|
|
2482
|
+
method: "POST",
|
|
2483
|
+
body: JSON.stringify(body)
|
|
2484
|
+
});
|
|
2485
|
+
}
|
|
2486
|
+
/** Update a dashboard's name, position, or widget list (full replace). */
|
|
2487
|
+
async updateDashboard(wid, id, body) {
|
|
2488
|
+
return this.fetch(`w/${wid}/dashboards/${id}`, {
|
|
2489
|
+
method: "PATCH",
|
|
2490
|
+
body: JSON.stringify(body)
|
|
2491
|
+
});
|
|
2492
|
+
}
|
|
2493
|
+
/** Delete a dashboard. */
|
|
2494
|
+
async deleteDashboard(wid, id) {
|
|
2495
|
+
await this.fetch(`w/${wid}/dashboards/${id}`, { method: "DELETE" });
|
|
2496
|
+
}
|
|
2497
|
+
/** Per-channel chat volume in the window + live needs-response backlog. */
|
|
2498
|
+
async getDashboardChannelStats(wid, options) {
|
|
2499
|
+
const params = new URLSearchParams();
|
|
2500
|
+
if (options?.hours !== void 0) params.append("hours", options.hours.toString());
|
|
2501
|
+
const query = params.toString();
|
|
2502
|
+
return this.fetch(
|
|
2503
|
+
`w/${wid}/dashboards/stats/channels${query ? `?${query}` : ""}`
|
|
2504
|
+
);
|
|
2505
|
+
}
|
|
2506
|
+
/** Assignment status rollup per root workflow. */
|
|
2507
|
+
async getDashboardWorkflowAssignmentStats(wid) {
|
|
2508
|
+
return this.fetch(
|
|
2509
|
+
`w/${wid}/dashboards/stats/workflow-assignments`
|
|
2510
|
+
);
|
|
2511
|
+
}
|
|
2512
|
+
};
|
|
2513
|
+
|
|
2325
2514
|
// src/api/data-types.ts
|
|
2326
2515
|
var DataTypesApi = class extends BaseApiClient {
|
|
2327
2516
|
/** List all data types for a workspace, optionally filtering by archived status. */
|
|
@@ -2391,14 +2580,61 @@ var DataTypesApi = class extends BaseApiClient {
|
|
|
2391
2580
|
async getDataRecords(wid, dataTypeId, options) {
|
|
2392
2581
|
const params = new URLSearchParams();
|
|
2393
2582
|
if (options?.memberId !== void 0) params.append("member_id", options.memberId.toString());
|
|
2583
|
+
if (options?.memberIds?.length) params.append("member_ids", options.memberIds.join(","));
|
|
2394
2584
|
if (options?.search) params.append("search", options.search);
|
|
2395
2585
|
if (options?.searchField) params.append("search_field", options.searchField);
|
|
2586
|
+
if (options?.dataRecordFilterId != null) {
|
|
2587
|
+
params.append("dataRecordFilterId", options.dataRecordFilterId.toString());
|
|
2588
|
+
}
|
|
2589
|
+
if (options?.query != null) params.append("query", JSON.stringify(options.query));
|
|
2396
2590
|
if (options?.page) params.append("page", options.page.toString());
|
|
2397
2591
|
if (options?.pageSize) params.append("page_size", options.pageSize.toString());
|
|
2398
2592
|
return this.fetch(
|
|
2399
2593
|
`w/${wid}/data-types/${dataTypeId}/records${params?.toString() ? `?${params.toString()}` : ""}`
|
|
2400
2594
|
);
|
|
2401
2595
|
}
|
|
2596
|
+
// Data-record filter APIs (saved Query IR predicates per form)
|
|
2597
|
+
/** List saved data-record filters, optionally scoped to one DataType. */
|
|
2598
|
+
async getDataRecordFilters(wid, options) {
|
|
2599
|
+
const params = new URLSearchParams();
|
|
2600
|
+
if (options?.dataTypeId != null) {
|
|
2601
|
+
params.append("dataTypeId", options.dataTypeId.toString());
|
|
2602
|
+
}
|
|
2603
|
+
const qs = params.toString();
|
|
2604
|
+
return this.fetch(
|
|
2605
|
+
`w/${wid}/data-record-filters${qs ? `?${qs}` : ""}`
|
|
2606
|
+
);
|
|
2607
|
+
}
|
|
2608
|
+
/** Get a single data-record filter by ID. */
|
|
2609
|
+
async getDataRecordFilter(wid, filterId) {
|
|
2610
|
+
return this.fetch(`w/${wid}/data-record-filters/${filterId}`);
|
|
2611
|
+
}
|
|
2612
|
+
/** Create a new saved data-record filter. */
|
|
2613
|
+
async createDataRecordFilter(wid, data) {
|
|
2614
|
+
return this.fetch(`w/${wid}/data-record-filters`, {
|
|
2615
|
+
method: "POST",
|
|
2616
|
+
body: JSON.stringify(data)
|
|
2617
|
+
});
|
|
2618
|
+
}
|
|
2619
|
+
/** Update a saved data-record filter. */
|
|
2620
|
+
async updateDataRecordFilter(wid, filterId, data) {
|
|
2621
|
+
return this.fetch(`w/${wid}/data-record-filters/${filterId}`, {
|
|
2622
|
+
method: "PUT",
|
|
2623
|
+
body: JSON.stringify(data)
|
|
2624
|
+
});
|
|
2625
|
+
}
|
|
2626
|
+
/** Delete a saved data-record filter. */
|
|
2627
|
+
async deleteDataRecordFilter(wid, filterId) {
|
|
2628
|
+
return this.fetch(`w/${wid}/data-record-filters/${filterId}`, {
|
|
2629
|
+
method: "DELETE"
|
|
2630
|
+
});
|
|
2631
|
+
}
|
|
2632
|
+
/** Get the count of records matching a saved filter. */
|
|
2633
|
+
async getDataRecordFilterCount(wid, filterId) {
|
|
2634
|
+
return this.fetch(
|
|
2635
|
+
`w/${wid}/data-record-filters/${filterId}/count`
|
|
2636
|
+
);
|
|
2637
|
+
}
|
|
2402
2638
|
/** Get a single data record by ID. */
|
|
2403
2639
|
async getDataRecord(wid, recordId) {
|
|
2404
2640
|
return this.fetch(`w/${wid}/data-types/records/${recordId}`);
|
|
@@ -2511,6 +2747,38 @@ var DiscordBotsApi = class extends BaseApiClient {
|
|
|
2511
2747
|
body: JSON.stringify(data)
|
|
2512
2748
|
});
|
|
2513
2749
|
}
|
|
2750
|
+
/**
|
|
2751
|
+
* Step-up preflight for the Discord account-link flow (GH #20196).
|
|
2752
|
+
*
|
|
2753
|
+
* A no-side-effect GET enforcing the same authenticated, stepped-up
|
|
2754
|
+
* `apps:write` session as authorize/complete-link. Call this through the
|
|
2755
|
+
* client *before* the full-page navigation to `/oauth/authorize`: a 401
|
|
2756
|
+
* `insufficient_user_authentication` triggers the SDK's enhanced-auth
|
|
2757
|
+
* (step-up) modal + retry, so a below-assurance session is prompted here
|
|
2758
|
+
* rather than hitting a raw 401 on a top-level browser navigation.
|
|
2759
|
+
* Resolves (204) once the session is sufficiently assured.
|
|
2760
|
+
*/
|
|
2761
|
+
async discordLinkPreflight(wid) {
|
|
2762
|
+
return this.fetch(`w/${wid}/app-connections/discord/oauth/link/preflight`);
|
|
2763
|
+
}
|
|
2764
|
+
/**
|
|
2765
|
+
* Complete an authenticated Discord account link (GH #20196).
|
|
2766
|
+
*
|
|
2767
|
+
* POST-only. Exchanges the one-time opaque handle (issued by the OAuth
|
|
2768
|
+
* callback and carried in the `?discord_link_handle=` return param) for a
|
|
2769
|
+
* persisted MemberCredential. Requires an authenticated, step-up-protected
|
|
2770
|
+
* session with `apps:write`; a 401 `insufficient_user_authentication`
|
|
2771
|
+
* triggers the SDK's enhanced-auth (step-up) retry automatically.
|
|
2772
|
+
*/
|
|
2773
|
+
async completeDiscordLink(wid, data) {
|
|
2774
|
+
return this.fetch(
|
|
2775
|
+
`w/${wid}/app-connections/discord/oauth/complete-link`,
|
|
2776
|
+
{
|
|
2777
|
+
method: "POST",
|
|
2778
|
+
body: JSON.stringify(data)
|
|
2779
|
+
}
|
|
2780
|
+
);
|
|
2781
|
+
}
|
|
2514
2782
|
/**
|
|
2515
2783
|
* Update an existing Discord bot configuration.
|
|
2516
2784
|
*/
|
|
@@ -2765,7 +3033,8 @@ var EventsApi = class extends BaseApiClient {
|
|
|
2765
3033
|
if (params.taskId) searchParams.append("taskId", params.taskId.toString());
|
|
2766
3034
|
if (params.dataTypeId) searchParams.append("dataTypeId", params.dataTypeId.toString());
|
|
2767
3035
|
if (params.routineId) searchParams.append("routineId", params.routineId.toString());
|
|
2768
|
-
if (params.
|
|
3036
|
+
if (params.workflowRevisionId)
|
|
3037
|
+
searchParams.append("workflowRevisionId", params.workflowRevisionId.toString());
|
|
2769
3038
|
if (params.journeyStepId)
|
|
2770
3039
|
searchParams.append("journeyStepId", params.journeyStepId.toString());
|
|
2771
3040
|
if (params.includeDisabled) searchParams.append("includeDisabled", "true");
|
|
@@ -2795,6 +3064,13 @@ var EventsApi = class extends BaseApiClient {
|
|
|
2795
3064
|
method: "DELETE"
|
|
2796
3065
|
});
|
|
2797
3066
|
}
|
|
3067
|
+
/** Send a one-off test webhook for an existing webhook event rule. */
|
|
3068
|
+
async testWebhook(wid, id, request) {
|
|
3069
|
+
return this.fetch(`w/${wid}/event-rules/${id}/test-webhook`, {
|
|
3070
|
+
method: "POST",
|
|
3071
|
+
body: JSON.stringify(request)
|
|
3072
|
+
});
|
|
3073
|
+
}
|
|
2798
3074
|
/** Reorder event rules by specifying the desired rule ID sequence. */
|
|
2799
3075
|
async reorderEventRules(wid, ruleIds) {
|
|
2800
3076
|
return this.fetch(`w/${wid}/event-rules/reorder`, {
|
|
@@ -2829,7 +3105,8 @@ var EventsApi = class extends BaseApiClient {
|
|
|
2829
3105
|
if (options.objectType) params.append("objectType", options.objectType);
|
|
2830
3106
|
if (options.eventType) params.append("eventType", options.eventType);
|
|
2831
3107
|
if (options.actionType) params.append("actionType", options.actionType);
|
|
2832
|
-
if (options.
|
|
3108
|
+
if (options.workflowRevisionId)
|
|
3109
|
+
params.append("workflowRevisionId", options.workflowRevisionId.toString());
|
|
2833
3110
|
return this.fetch(
|
|
2834
3111
|
`w/${wid}/event-rules/executions${params.toString() ? `?${params.toString()}` : ""}`
|
|
2835
3112
|
);
|
|
@@ -2841,6 +3118,20 @@ var EventsApi = class extends BaseApiClient {
|
|
|
2841
3118
|
body: JSON.stringify(request)
|
|
2842
3119
|
});
|
|
2843
3120
|
}
|
|
3121
|
+
/**
|
|
3122
|
+
* Preview which target-audience roles lack Workflow USE for the Workflows a
|
|
3123
|
+
* draft Routine would start. Non-persisting, non-blocking authoring assist —
|
|
3124
|
+
* returns warnings only (role/Workflow names + IDs; no Member data).
|
|
3125
|
+
*/
|
|
3126
|
+
async previewRoutineWorkflowAccess(wid, request) {
|
|
3127
|
+
return this.fetch(
|
|
3128
|
+
`w/${wid}/routines/preview-workflow-access`,
|
|
3129
|
+
{
|
|
3130
|
+
method: "POST",
|
|
3131
|
+
body: JSON.stringify(request)
|
|
3132
|
+
}
|
|
3133
|
+
);
|
|
3134
|
+
}
|
|
2844
3135
|
/** List routines with optional pagination and active status filtering. */
|
|
2845
3136
|
async getRoutines(wid, options = {}) {
|
|
2846
3137
|
const params = new URLSearchParams();
|
|
@@ -3272,6 +3563,25 @@ var FhirConnectionsApi = class extends BaseApiClient {
|
|
|
3272
3563
|
}
|
|
3273
3564
|
};
|
|
3274
3565
|
|
|
3566
|
+
// src/api/patientsync-connections.ts
|
|
3567
|
+
var PatientSyncConnectionsApi = class extends BaseApiClient {
|
|
3568
|
+
/** Create or update the workspace's PatientSync connection (singleton). */
|
|
3569
|
+
async configurePatientSync(wid, data) {
|
|
3570
|
+
return this.fetch(
|
|
3571
|
+
`w/${wid}/app-connections/patientsync/configure`,
|
|
3572
|
+
{ method: "POST", body: JSON.stringify(data) }
|
|
3573
|
+
);
|
|
3574
|
+
}
|
|
3575
|
+
/** Read the PatientSync connection status (never returns the API key). */
|
|
3576
|
+
async getPatientSyncStatus(wid) {
|
|
3577
|
+
return this.fetch(`w/${wid}/app-connections/patientsync/status`);
|
|
3578
|
+
}
|
|
3579
|
+
/** Delete the workspace's PatientSync connection. */
|
|
3580
|
+
async deletePatientSyncConnection(wid) {
|
|
3581
|
+
return this.fetch(`w/${wid}/app-connections/patientsync/`, { method: "DELETE" });
|
|
3582
|
+
}
|
|
3583
|
+
};
|
|
3584
|
+
|
|
3275
3585
|
// src/api/healthie.ts
|
|
3276
3586
|
var HealthieApi = class extends BaseApiClient {
|
|
3277
3587
|
async configureHealthie(wid, data) {
|
|
@@ -3392,6 +3702,29 @@ var FilesApi = class extends BaseApiClient {
|
|
|
3392
3702
|
async getFile(wid, id) {
|
|
3393
3703
|
return this.fetch(`w/${wid}/files/${id}`);
|
|
3394
3704
|
}
|
|
3705
|
+
/**
|
|
3706
|
+
* Resolve a wiki-style relative path (as authored in a markdown link or
|
|
3707
|
+
* image) to a file. `folderId` is the linking document's folder; omit it
|
|
3708
|
+
* to resolve from the workspace root. Handles `.`/`..` segments and an
|
|
3709
|
+
* omitted `.md` extension server-side.
|
|
3710
|
+
*/
|
|
3711
|
+
async resolveFilePath(wid, path, folderId) {
|
|
3712
|
+
const params = new URLSearchParams({ path });
|
|
3713
|
+
if (folderId != null) params.append("folderId", String(folderId));
|
|
3714
|
+
return this.fetch(`w/${wid}/files/resolve-path?${params.toString()}`);
|
|
3715
|
+
}
|
|
3716
|
+
/**
|
|
3717
|
+
* Download the given files + folders (folders recursively) as a single ZIP.
|
|
3718
|
+
* Returns the raw archive bytes for the caller to save.
|
|
3719
|
+
*/
|
|
3720
|
+
async downloadFilesZip(wid, fileIds, folderIds) {
|
|
3721
|
+
const response = await this.fetchRaw(`w/${wid}/files/download/zip`, {
|
|
3722
|
+
method: "POST",
|
|
3723
|
+
headers: { "Content-Type": "application/json" },
|
|
3724
|
+
body: JSON.stringify({ file_ids: fileIds, folder_ids: folderIds })
|
|
3725
|
+
});
|
|
3726
|
+
return response.blob();
|
|
3727
|
+
}
|
|
3395
3728
|
/** Create a new file record in the workspace. */
|
|
3396
3729
|
async createFile(wid, file) {
|
|
3397
3730
|
return this.fetch(`w/${wid}/files`, {
|
|
@@ -3433,6 +3766,36 @@ var FilesApi = class extends BaseApiClient {
|
|
|
3433
3766
|
method: "DELETE"
|
|
3434
3767
|
});
|
|
3435
3768
|
}
|
|
3769
|
+
/** List a file's version history (newest first). */
|
|
3770
|
+
async listFileVersions(wid, fileId) {
|
|
3771
|
+
return this.fetch(`w/${wid}/files/${fileId}/versions`);
|
|
3772
|
+
}
|
|
3773
|
+
/** Compare two versions of a file. For text files both raw contents are returned. */
|
|
3774
|
+
async getFileVersionDiff(wid, fileId, fromVersion, toVersion) {
|
|
3775
|
+
return this.fetch(
|
|
3776
|
+
`w/${wid}/files/${fileId}/versions/diff?fromVersion=${fromVersion}&toVersion=${toVersion}`
|
|
3777
|
+
);
|
|
3778
|
+
}
|
|
3779
|
+
/** Restore an earlier version as the file's current contents. */
|
|
3780
|
+
async restoreFileVersion(wid, fileId, versionNumber, changeNote) {
|
|
3781
|
+
return this.fetch(
|
|
3782
|
+
`w/${wid}/files/${fileId}/versions/${versionNumber}/restore`,
|
|
3783
|
+
{
|
|
3784
|
+
method: "POST",
|
|
3785
|
+
// Required JSON body: keeps this cookie-auth POST non-forgeable
|
|
3786
|
+
// by cross-site HTML forms (backend rejects bodyless requests).
|
|
3787
|
+
body: JSON.stringify(changeNote ? { changeNote } : {})
|
|
3788
|
+
}
|
|
3789
|
+
);
|
|
3790
|
+
}
|
|
3791
|
+
/**
|
|
3792
|
+
* Same-origin proxy URL for a version's raw contents. Mirrors the shape of
|
|
3793
|
+
* `FileResponse.cdnUrl`: an app-relative Next.js route that authenticates
|
|
3794
|
+
* via session cookies and forwards to the versioned contents endpoint.
|
|
3795
|
+
*/
|
|
3796
|
+
getFileVersionContentsUrl(wid, fileId, versionNumber) {
|
|
3797
|
+
return `/api/w/${wid}/files/${fileId}/versions/${versionNumber}/contents`;
|
|
3798
|
+
}
|
|
3436
3799
|
/** Convert a file to the specified format (text, markdown, or PDF). */
|
|
3437
3800
|
async convertFile(wid, fileId, format = "pdf") {
|
|
3438
3801
|
return this.fetch(
|
|
@@ -4008,6 +4371,31 @@ var McpServersApi = class extends BaseApiClient {
|
|
|
4008
4371
|
};
|
|
4009
4372
|
|
|
4010
4373
|
// src/api/members.ts
|
|
4374
|
+
var MemberImportValidationError = class extends Error {
|
|
4375
|
+
validationErrors;
|
|
4376
|
+
constructor(message, validationErrors) {
|
|
4377
|
+
super(message);
|
|
4378
|
+
this.name = "MemberImportValidationError";
|
|
4379
|
+
this.validationErrors = validationErrors;
|
|
4380
|
+
}
|
|
4381
|
+
};
|
|
4382
|
+
function throwMemberImportError(errorBody, fallback) {
|
|
4383
|
+
let detail = errorBody?.detail;
|
|
4384
|
+
if (typeof detail === "string") {
|
|
4385
|
+
try {
|
|
4386
|
+
const parsed = JSON.parse(detail);
|
|
4387
|
+
if (parsed && typeof parsed === "object") detail = parsed;
|
|
4388
|
+
} catch {
|
|
4389
|
+
}
|
|
4390
|
+
}
|
|
4391
|
+
if (detail && typeof detail === "object") {
|
|
4392
|
+
const { message, errors } = detail;
|
|
4393
|
+
if (Array.isArray(errors)) {
|
|
4394
|
+
throw new MemberImportValidationError(message || fallback, errors);
|
|
4395
|
+
}
|
|
4396
|
+
}
|
|
4397
|
+
throw new Error(typeof detail === "string" ? detail : fallback);
|
|
4398
|
+
}
|
|
4011
4399
|
var MembersApi = class extends BaseApiClient {
|
|
4012
4400
|
/** Get the currently authenticated member for a workspace. */
|
|
4013
4401
|
async getCurrentMember(wid) {
|
|
@@ -4048,19 +4436,14 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4048
4436
|
});
|
|
4049
4437
|
}
|
|
4050
4438
|
/** List workspace members with pagination, filtering, and sorting. */
|
|
4051
|
-
async getWorkspaceMembers(wid, page = 1, pageSize = 10,
|
|
4439
|
+
async getWorkspaceMembers(wid, page = 1, pageSize = 10, search, role, sortBy, sortOrder, memberType, isArchived = false, isManager, memberTypes, hasAccount, excludeIds, memberFilterId, query) {
|
|
4052
4440
|
const params = new URLSearchParams();
|
|
4441
|
+
if (memberFilterId != null) params.append("memberFilterId", memberFilterId.toString());
|
|
4442
|
+
if (query != null) params.append("query", JSON.stringify(query));
|
|
4053
4443
|
if (page) params.append("page", page.toString());
|
|
4054
4444
|
if (pageSize) params.append("pageSize", pageSize.toString());
|
|
4055
4445
|
if (sortBy) params.append("sortBy", sortBy);
|
|
4056
4446
|
if (sortOrder) params.append("sortOrder", sortOrder);
|
|
4057
|
-
if (filters) {
|
|
4058
|
-
if (Array.isArray(filters)) {
|
|
4059
|
-
params.append("filters", JSON.stringify(filters));
|
|
4060
|
-
} else {
|
|
4061
|
-
params.append("filters", JSON.stringify(filters));
|
|
4062
|
-
}
|
|
4063
|
-
}
|
|
4064
4447
|
if (search) params.append("search", search);
|
|
4065
4448
|
if (role) params.append("role", role);
|
|
4066
4449
|
if (memberTypes && memberTypes.length > 0) {
|
|
@@ -4122,6 +4505,17 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4122
4505
|
method: "POST"
|
|
4123
4506
|
});
|
|
4124
4507
|
}
|
|
4508
|
+
/**
|
|
4509
|
+
* Send the member an SMS asking them to confirm their phone number. When they
|
|
4510
|
+
* reply, a trusted phone auth binding is created so they can use SMS as
|
|
4511
|
+
* themselves without an account (member-attested alternative to the
|
|
4512
|
+
* members:admin "Trusted" override).
|
|
4513
|
+
*/
|
|
4514
|
+
async sendMemberPhoneConfirmation(wid, memberId) {
|
|
4515
|
+
return this.fetch(`w/${wid}/members/${memberId}/phone-confirmation`, {
|
|
4516
|
+
method: "POST"
|
|
4517
|
+
});
|
|
4518
|
+
}
|
|
4125
4519
|
// Member Filter APIs
|
|
4126
4520
|
/** List all saved member filters for a workspace. */
|
|
4127
4521
|
async getMemberFilters(wid) {
|
|
@@ -4222,48 +4616,98 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4222
4616
|
});
|
|
4223
4617
|
}
|
|
4224
4618
|
// Import/Export Members API
|
|
4225
|
-
/**
|
|
4226
|
-
|
|
4619
|
+
/**
|
|
4620
|
+
* Read-only preview classifying each CSV row before any write (GRA-5545).
|
|
4621
|
+
*
|
|
4622
|
+
* Returns create/update/unchanged/conflict/error counts. For phone-only
|
|
4623
|
+
* identity conflicts it also returns existing vs incoming identity so the
|
|
4624
|
+
* operator can decide whether to skip or explicitly overwrite before
|
|
4625
|
+
* committing. Requires MEMBERS_ADMIN and is bulk-PHI audited server-side.
|
|
4626
|
+
*/
|
|
4627
|
+
async previewImportMembers(wid, file, newMemberRoleId, options) {
|
|
4227
4628
|
const formData = new FormData();
|
|
4228
4629
|
formData.append("file", file);
|
|
4229
4630
|
const params = new URLSearchParams();
|
|
4230
4631
|
params.append("new_member_role_id", newMemberRoleId.toString());
|
|
4231
|
-
|
|
4232
|
-
|
|
4632
|
+
if (options?.trustEmailAddresses) {
|
|
4633
|
+
params.append("trust_email_addresses", "true");
|
|
4634
|
+
}
|
|
4635
|
+
if (options?.trustPhoneNumbers) {
|
|
4636
|
+
params.append("trust_phone_numbers", "true");
|
|
4637
|
+
}
|
|
4638
|
+
const response = await this.fetchRaw(
|
|
4639
|
+
`w/${wid}/members/import/preview?${params.toString()}`,
|
|
4233
4640
|
{
|
|
4234
4641
|
method: "POST",
|
|
4235
|
-
body: formData
|
|
4236
|
-
|
|
4237
|
-
|
|
4642
|
+
body: formData
|
|
4643
|
+
},
|
|
4644
|
+
[400, 413]
|
|
4238
4645
|
);
|
|
4239
4646
|
if (!response.ok) {
|
|
4240
|
-
const error = await response.json();
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4647
|
+
const error = await response.json().catch(() => ({}));
|
|
4648
|
+
throwMemberImportError(error, "Import preview failed");
|
|
4649
|
+
}
|
|
4650
|
+
return response.json();
|
|
4651
|
+
}
|
|
4652
|
+
/**
|
|
4653
|
+
* Import members from a CSV file, streaming progress updates via callback.
|
|
4654
|
+
*
|
|
4655
|
+
* ``identityConflictPolicy`` (default 'skip') controls how a row matching an
|
|
4656
|
+
* existing member ONLY by phone with different identity fields is handled.
|
|
4657
|
+
* Send 'overwrite_identity_fields' only after the operator confirms a preview.
|
|
4658
|
+
*/
|
|
4659
|
+
async importMembers(wid, file, newMemberRoleId, onProgress, options) {
|
|
4660
|
+
const formData = new FormData();
|
|
4661
|
+
formData.append("file", file);
|
|
4662
|
+
const params = new URLSearchParams();
|
|
4663
|
+
params.append("new_member_role_id", newMemberRoleId.toString());
|
|
4664
|
+
if (options?.trustEmailAddresses) {
|
|
4665
|
+
params.append("trust_email_addresses", "true");
|
|
4666
|
+
}
|
|
4667
|
+
if (options?.trustPhoneNumbers) {
|
|
4668
|
+
params.append("trust_phone_numbers", "true");
|
|
4669
|
+
}
|
|
4670
|
+
if (options?.identityConflictPolicy) {
|
|
4671
|
+
params.append("identity_conflict_policy", options.identityConflictPolicy);
|
|
4672
|
+
}
|
|
4673
|
+
const response = await this.fetchRaw(
|
|
4674
|
+
`w/${wid}/members/import?${params.toString()}`,
|
|
4675
|
+
{
|
|
4676
|
+
method: "POST",
|
|
4677
|
+
body: formData
|
|
4678
|
+
},
|
|
4679
|
+
[400, 413]
|
|
4680
|
+
);
|
|
4681
|
+
if (!response.ok) {
|
|
4682
|
+
const error = await response.json().catch(() => ({}));
|
|
4683
|
+
throwMemberImportError(error, "Import failed");
|
|
4250
4684
|
}
|
|
4251
4685
|
if (onProgress && response.body) {
|
|
4252
4686
|
const reader = response.body.getReader();
|
|
4253
4687
|
const decoder = new TextDecoder();
|
|
4688
|
+
let buffer = "";
|
|
4254
4689
|
while (true) {
|
|
4255
4690
|
const { done, value } = await reader.read();
|
|
4256
4691
|
if (done) break;
|
|
4257
|
-
|
|
4258
|
-
const lines =
|
|
4692
|
+
buffer += decoder.decode(value, { stream: true });
|
|
4693
|
+
const lines = buffer.split("\n");
|
|
4694
|
+
buffer = lines.pop() ?? "";
|
|
4259
4695
|
for (const line of lines) {
|
|
4696
|
+
const trimmed = line.trim();
|
|
4697
|
+
if (!trimmed) continue;
|
|
4260
4698
|
try {
|
|
4261
|
-
|
|
4262
|
-
onProgress(progress);
|
|
4699
|
+
onProgress(JSON.parse(trimmed));
|
|
4263
4700
|
} catch {
|
|
4264
4701
|
}
|
|
4265
4702
|
}
|
|
4266
4703
|
}
|
|
4704
|
+
const tail = buffer.trim();
|
|
4705
|
+
if (tail) {
|
|
4706
|
+
try {
|
|
4707
|
+
onProgress(JSON.parse(tail));
|
|
4708
|
+
} catch {
|
|
4709
|
+
}
|
|
4710
|
+
}
|
|
4267
4711
|
}
|
|
4268
4712
|
return { success: true };
|
|
4269
4713
|
}
|
|
@@ -4440,6 +4884,11 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4440
4884
|
`w/${wid}/members/${memberId}/memories${qs ? `?${qs}` : ""}`
|
|
4441
4885
|
);
|
|
4442
4886
|
}
|
|
4887
|
+
async getMemberMemory(wid, memberId, key) {
|
|
4888
|
+
return this.fetch(
|
|
4889
|
+
`w/${wid}/members/${memberId}/memories/${encodeURIComponent(key)}`
|
|
4890
|
+
);
|
|
4891
|
+
}
|
|
4443
4892
|
async createMemberMemory(wid, memberId, body) {
|
|
4444
4893
|
return this.fetch(`w/${wid}/members/${memberId}/memories`, {
|
|
4445
4894
|
method: "POST",
|
|
@@ -4455,6 +4904,17 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4455
4904
|
{ method: "DELETE" }
|
|
4456
4905
|
);
|
|
4457
4906
|
}
|
|
4907
|
+
/** Bulk-create members in a workspace. */
|
|
4908
|
+
async bulkCreateMembers(wid, request) {
|
|
4909
|
+
return this.fetch(`w/${wid}/members/bulk`, {
|
|
4910
|
+
method: "POST",
|
|
4911
|
+
body: JSON.stringify(request)
|
|
4912
|
+
});
|
|
4913
|
+
}
|
|
4914
|
+
/** Get all sync links for a member across app connections. */
|
|
4915
|
+
async getMemberSyncLinks(wid, memberId) {
|
|
4916
|
+
return this.fetch(`w/${wid}/members/${memberId}/sync-links`);
|
|
4917
|
+
}
|
|
4458
4918
|
};
|
|
4459
4919
|
|
|
4460
4920
|
// src/api/milestones.ts
|
|
@@ -4497,6 +4957,25 @@ var MilestonesApi = class extends BaseApiClient {
|
|
|
4497
4957
|
}
|
|
4498
4958
|
};
|
|
4499
4959
|
|
|
4960
|
+
// src/api/motd.ts
|
|
4961
|
+
var MotdApi = class extends BaseApiClient {
|
|
4962
|
+
/**
|
|
4963
|
+
* The Message-of-the-Day tip for the workspace on a given date.
|
|
4964
|
+
*
|
|
4965
|
+
* `date` is an ISO `YYYY-MM-DD` string (defaults to today, UTC, when
|
|
4966
|
+
* omitted); `offset` advances the rotation ("show another"). Selection is
|
|
4967
|
+
* deterministic — same date + workspace + offset always returns the same
|
|
4968
|
+
* tip — and cycles through the tip list.
|
|
4969
|
+
*/
|
|
4970
|
+
async getMotd(wid, options) {
|
|
4971
|
+
const params = new URLSearchParams();
|
|
4972
|
+
if (options?.date !== void 0) params.append("date", options.date);
|
|
4973
|
+
if (options?.offset !== void 0) params.append("offset", options.offset.toString());
|
|
4974
|
+
const query = params.toString();
|
|
4975
|
+
return this.fetch(`w/${wid}/motd${query ? `?${query}` : ""}`);
|
|
4976
|
+
}
|
|
4977
|
+
};
|
|
4978
|
+
|
|
4500
4979
|
// src/api/monday.ts
|
|
4501
4980
|
var MondayIntegrationApi = class extends BaseApiClient {
|
|
4502
4981
|
/**
|
|
@@ -4533,6 +5012,20 @@ var MondayIntegrationApi = class extends BaseApiClient {
|
|
|
4533
5012
|
// -----------------------------------------------------------------------
|
|
4534
5013
|
// Monday.com Connection management (OAuth, status, sync, reconciliation)
|
|
4535
5014
|
// -----------------------------------------------------------------------
|
|
5015
|
+
/**
|
|
5016
|
+
* Create the Monday.com connection shell (no credentials yet).
|
|
5017
|
+
*
|
|
5018
|
+
* First step of the guided setup flow: provisions the connection row so
|
|
5019
|
+
* the admin lands on the detail page where the OAuth callback URL is
|
|
5020
|
+
* shown — which they need to register their Monday.com app before they
|
|
5021
|
+
* have a Client ID / Secret to enter. Idempotent.
|
|
5022
|
+
*/
|
|
5023
|
+
async installMondayConnection(wid) {
|
|
5024
|
+
return this.fetch(`w/${wid}/app-connections/monday/install`, {
|
|
5025
|
+
method: "POST",
|
|
5026
|
+
body: JSON.stringify({})
|
|
5027
|
+
});
|
|
5028
|
+
}
|
|
4536
5029
|
async configureMondayConnection(wid, data) {
|
|
4537
5030
|
return this.fetch(`w/${wid}/app-connections/monday/configure`, {
|
|
4538
5031
|
method: "POST",
|
|
@@ -4951,6 +5444,7 @@ var OrgApi = class extends BaseApiClient {
|
|
|
4951
5444
|
*/
|
|
4952
5445
|
async searchPhoneNumbers(orgUuid, params) {
|
|
4953
5446
|
const query = new URLSearchParams();
|
|
5447
|
+
if (params?.country) query.set("country", params.country);
|
|
4954
5448
|
if (params?.numberType) query.set("number_type", params.numberType);
|
|
4955
5449
|
if (params?.areaCode) query.set("area_code", params.areaCode);
|
|
4956
5450
|
if (params?.contains) query.set("contains", params.contains);
|
|
@@ -4962,11 +5456,20 @@ var OrgApi = class extends BaseApiClient {
|
|
|
4962
5456
|
}
|
|
4963
5457
|
/**
|
|
4964
5458
|
* Purchase a phone number from Twilio for this org inventory (org admin only).
|
|
5459
|
+
*
|
|
5460
|
+
* Numbers in regulated countries (e.g. Australia) require a Twilio regulatory
|
|
5461
|
+
* bundle and an address — pass `bundleSid` and `addressSid` for those.
|
|
4965
5462
|
*/
|
|
4966
|
-
async purchasePhoneNumber(orgUuid, phoneNumber, numberType) {
|
|
5463
|
+
async purchasePhoneNumber(orgUuid, phoneNumber, numberType, opts) {
|
|
4967
5464
|
return this.fetch(`o/${orgUuid}/phone-numbers/purchase`, {
|
|
4968
5465
|
method: "POST",
|
|
4969
|
-
body: JSON.stringify({
|
|
5466
|
+
body: JSON.stringify({
|
|
5467
|
+
phoneNumber,
|
|
5468
|
+
numberType,
|
|
5469
|
+
country: opts?.country,
|
|
5470
|
+
bundleSid: opts?.bundleSid,
|
|
5471
|
+
addressSid: opts?.addressSid
|
|
5472
|
+
})
|
|
4970
5473
|
});
|
|
4971
5474
|
}
|
|
4972
5475
|
/**
|
|
@@ -5174,6 +5677,90 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5174
5677
|
method: "POST"
|
|
5175
5678
|
});
|
|
5176
5679
|
}
|
|
5680
|
+
/**
|
|
5681
|
+
* List the org's A2P brands (broker resources). The SMS-consent editor uses
|
|
5682
|
+
* this to pick which brand's consent config to edit.
|
|
5683
|
+
*/
|
|
5684
|
+
async listA2PBrands(orgUuid) {
|
|
5685
|
+
return this.fetch(`o/${orgUuid}/a2p-brands`);
|
|
5686
|
+
}
|
|
5687
|
+
/**
|
|
5688
|
+
* Fetch a brand's resolved A2P campaign config. The response carries both the
|
|
5689
|
+
* raw `overrides` and the `resolved` payload (defaults + overrides) the editor
|
|
5690
|
+
* previews — including the canonical SMS consent text.
|
|
5691
|
+
*/
|
|
5692
|
+
async getA2PCampaignConfig(orgUuid, brandUuid) {
|
|
5693
|
+
return this.fetch(
|
|
5694
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/campaign-config`
|
|
5695
|
+
);
|
|
5696
|
+
}
|
|
5697
|
+
/**
|
|
5698
|
+
* Partial-update a brand's A2P campaign config. Returns the freshly resolved
|
|
5699
|
+
* config so the editor's live preview updates without a second round-trip.
|
|
5700
|
+
*/
|
|
5701
|
+
async updateA2PCampaignConfig(orgUuid, brandUuid, data) {
|
|
5702
|
+
return this.fetch(
|
|
5703
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/campaign-config`,
|
|
5704
|
+
{
|
|
5705
|
+
method: "PUT",
|
|
5706
|
+
body: JSON.stringify(data)
|
|
5707
|
+
}
|
|
5708
|
+
);
|
|
5709
|
+
}
|
|
5710
|
+
/**
|
|
5711
|
+
* Published Sites across the org's workspaces that can be linked as this
|
|
5712
|
+
* brand's enrollment (opt-in) surface. Org-authorized, so it works even when
|
|
5713
|
+
* the admin isn't a member of the workspace holding the Site.
|
|
5714
|
+
*/
|
|
5715
|
+
async listA2PEnrollmentSiteCandidates(orgUuid, brandUuid) {
|
|
5716
|
+
return this.fetch(
|
|
5717
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-site/candidates`
|
|
5718
|
+
);
|
|
5719
|
+
}
|
|
5720
|
+
/**
|
|
5721
|
+
* Link the brand to a published enrollment Site (sets `site_uuid`). Returns
|
|
5722
|
+
* the refreshed campaign config so the editor's link state updates inline.
|
|
5723
|
+
*/
|
|
5724
|
+
async linkA2PEnrollmentSite(orgUuid, brandUuid, data) {
|
|
5725
|
+
return this.fetch(
|
|
5726
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-site`,
|
|
5727
|
+
{
|
|
5728
|
+
method: "PUT",
|
|
5729
|
+
body: JSON.stringify(data)
|
|
5730
|
+
}
|
|
5731
|
+
);
|
|
5732
|
+
}
|
|
5733
|
+
/**
|
|
5734
|
+
* Provision (or reuse) a patient-enrollment Site for the brand and link it —
|
|
5735
|
+
* the one-click path behind the SMS Consent tab. `workspaceUuid` is required
|
|
5736
|
+
* only when the org has multiple workspaces. Returns the refreshed campaign
|
|
5737
|
+
* config so the editor's link state updates inline. Idempotent.
|
|
5738
|
+
*/
|
|
5739
|
+
async provisionA2PEnrollmentSite(orgUuid, brandUuid, data = {}) {
|
|
5740
|
+
return this.fetch(
|
|
5741
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-site/provision`,
|
|
5742
|
+
{
|
|
5743
|
+
method: "POST",
|
|
5744
|
+
body: JSON.stringify(data)
|
|
5745
|
+
}
|
|
5746
|
+
);
|
|
5747
|
+
}
|
|
5748
|
+
/** Clear the brand's enrollment-site link. */
|
|
5749
|
+
async unlinkA2PEnrollmentSite(orgUuid, brandUuid) {
|
|
5750
|
+
return this.fetch(
|
|
5751
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-site`,
|
|
5752
|
+
{ method: "DELETE" }
|
|
5753
|
+
);
|
|
5754
|
+
}
|
|
5755
|
+
/**
|
|
5756
|
+
* The brand-addressable enrollment form URL (carries `?brand=…`). Outreach
|
|
5757
|
+
* appends each patient's `external_id`. `url` is null until a Site is linked.
|
|
5758
|
+
*/
|
|
5759
|
+
async getA2PBrandEnrollmentUrl(orgUuid, brandUuid) {
|
|
5760
|
+
return this.fetch(
|
|
5761
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-url`
|
|
5762
|
+
);
|
|
5763
|
+
}
|
|
5177
5764
|
/**
|
|
5178
5765
|
* List available member roles for a workspace in the organization.
|
|
5179
5766
|
*/
|
|
@@ -5198,58 +5785,53 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5198
5785
|
function getOAuthPath(providerSlug, action) {
|
|
5199
5786
|
if (providerSlug === "google_calendar") {
|
|
5200
5787
|
return `oauth/google/calendar/${action}`;
|
|
5201
|
-
}
|
|
5788
|
+
}
|
|
5789
|
+
if (providerSlug === "gmail") {
|
|
5202
5790
|
return `oauth/google/gmail/${action}`;
|
|
5203
|
-
} else {
|
|
5204
|
-
return `oauth/${providerSlug}/${action}`;
|
|
5205
5791
|
}
|
|
5792
|
+
if (providerSlug === "gdrive") {
|
|
5793
|
+
return `oauth/google/drive/${action}`;
|
|
5794
|
+
}
|
|
5795
|
+
return `oauth/${providerSlug}/${action}`;
|
|
5796
|
+
}
|
|
5797
|
+
function buildAuthorizeQuery(options) {
|
|
5798
|
+
if (!options) return "";
|
|
5799
|
+
const params = new URLSearchParams();
|
|
5800
|
+
if (options.credentialUuid) params.set("credentialUuid", options.credentialUuid);
|
|
5801
|
+
if (options.loginHint) params.set("loginHint", options.loginHint);
|
|
5802
|
+
if (options.redirect) params.set("redirect", options.redirect);
|
|
5803
|
+
const qs = params.toString();
|
|
5804
|
+
return qs ? `?${qs}` : "";
|
|
5206
5805
|
}
|
|
5207
5806
|
var OAuthConnectionsApi = class extends BaseApiClient {
|
|
5208
|
-
/**
|
|
5209
|
-
* Get the connection status for an OAuth provider
|
|
5210
|
-
*/
|
|
5211
5807
|
async getConnectionStatus(providerSlug) {
|
|
5212
5808
|
const path = getOAuthPath(providerSlug, "status");
|
|
5213
5809
|
return this.fetchRoot(path);
|
|
5214
5810
|
}
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
*/
|
|
5218
|
-
async getAuthorizationUrl(providerSlug) {
|
|
5219
|
-
const path = getOAuthPath(providerSlug, "authorize");
|
|
5811
|
+
async listAccounts(providerSlug) {
|
|
5812
|
+
const path = getOAuthPath(providerSlug, "accounts");
|
|
5220
5813
|
return this.fetchRoot(path);
|
|
5221
5814
|
}
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5815
|
+
async getAuthorizationUrl(providerSlug, options) {
|
|
5816
|
+
const path = getOAuthPath(providerSlug, "authorize") + buildAuthorizeQuery(options);
|
|
5817
|
+
return this.fetchRoot(path);
|
|
5818
|
+
}
|
|
5819
|
+
async disconnect(providerSlug, credentialUuid) {
|
|
5226
5820
|
const path = getOAuthPath(providerSlug, "disconnect");
|
|
5227
|
-
|
|
5821
|
+
const qs = credentialUuid ? `?credentialUuid=${encodeURIComponent(credentialUuid)}` : "";
|
|
5822
|
+
return this.fetchRoot(`${path}${qs}`, { method: "DELETE" });
|
|
5228
5823
|
}
|
|
5229
5824
|
};
|
|
5230
5825
|
var OAuthApi = class extends BaseApiClient {
|
|
5231
|
-
/**
|
|
5232
|
-
* Get all available OAuth/API key scopes with metadata.
|
|
5233
|
-
*
|
|
5234
|
-
* This returns the full scope definitions from the backend,
|
|
5235
|
-
* ensuring the UI always shows the correct scopes.
|
|
5236
|
-
*/
|
|
5237
5826
|
async getAvailableScopes() {
|
|
5238
5827
|
return this.fetch("oauth/scopes");
|
|
5239
5828
|
}
|
|
5240
|
-
/**
|
|
5241
|
-
* Create an authorization code for OAuth flow
|
|
5242
|
-
* This is called after the user approves the authorization request
|
|
5243
|
-
*/
|
|
5244
5829
|
async authorize(request) {
|
|
5245
5830
|
return this.fetch("oauth/authorize", {
|
|
5246
5831
|
method: "POST",
|
|
5247
5832
|
body: JSON.stringify(request)
|
|
5248
5833
|
});
|
|
5249
5834
|
}
|
|
5250
|
-
/**
|
|
5251
|
-
* Exchange authorization code for access token
|
|
5252
|
-
*/
|
|
5253
5835
|
async exchangeOAuthToken(request) {
|
|
5254
5836
|
const formData = new URLSearchParams();
|
|
5255
5837
|
formData.append("grant_type", request.grant_type);
|
|
@@ -5270,6 +5852,14 @@ var OAuthApi = class extends BaseApiClient {
|
|
|
5270
5852
|
};
|
|
5271
5853
|
|
|
5272
5854
|
// src/api/phone-numbers.ts
|
|
5855
|
+
function appendAnalyticsFilters(params, filters) {
|
|
5856
|
+
if (!filters) return;
|
|
5857
|
+
if (filters.dateFrom) params.set("dateFrom", filters.dateFrom);
|
|
5858
|
+
if (filters.dateTo) params.set("dateTo", filters.dateTo);
|
|
5859
|
+
filters.terminationReason?.forEach((v) => params.append("terminationReason", v));
|
|
5860
|
+
filters.answeredBy?.forEach((v) => params.append("answeredBy", v));
|
|
5861
|
+
filters.memberLabel?.forEach((v) => params.append("memberLabel", v));
|
|
5862
|
+
}
|
|
5273
5863
|
var PhoneNumbersApi = class extends BaseApiClient {
|
|
5274
5864
|
/** List phone numbers in a workspace, optionally including archived. */
|
|
5275
5865
|
async getPhoneNumbers(wid, options) {
|
|
@@ -5393,6 +5983,62 @@ var PhoneNumbersApi = class extends BaseApiClient {
|
|
|
5393
5983
|
method: "POST"
|
|
5394
5984
|
});
|
|
5395
5985
|
}
|
|
5986
|
+
/**
|
|
5987
|
+
* Always-anonymized outbound-call analytics summary for one phone number.
|
|
5988
|
+
* No `analyticsSessionId` is sent — the summary carries no row-level PHI.
|
|
5989
|
+
*/
|
|
5990
|
+
async getPhoneNumberOutboundAnalyticsSummary(wid, id, filters) {
|
|
5991
|
+
const params = new URLSearchParams();
|
|
5992
|
+
appendAnalyticsFilters(params, filters);
|
|
5993
|
+
const query = params.toString();
|
|
5994
|
+
return this.fetch(
|
|
5995
|
+
`w/${wid}/phone-numbers/${id}/analytics/summary${query ? `?${query}` : ""}`
|
|
5996
|
+
);
|
|
5997
|
+
}
|
|
5998
|
+
/**
|
|
5999
|
+
* One paginated page of outbound-call analytics detail rows. Anonymized by
|
|
6000
|
+
* default; `raw: true` requires the `export:admin` scope server-side and is
|
|
6001
|
+
* audited per response. `analyticsSessionId` keeps the callee pseudonyms
|
|
6002
|
+
* stable across pagination/sort within one browser session.
|
|
6003
|
+
*/
|
|
6004
|
+
async getPhoneNumberOutboundAnalyticsCalls(wid, id, options) {
|
|
6005
|
+
const params = new URLSearchParams({
|
|
6006
|
+
analyticsSessionId: options.analyticsSessionId,
|
|
6007
|
+
page: String(options.page ?? 1),
|
|
6008
|
+
pageSize: String(options.pageSize ?? 50)
|
|
6009
|
+
});
|
|
6010
|
+
if (options.sort) params.set("sort", options.sort);
|
|
6011
|
+
if (options.sortDirection) params.set("sortDirection", options.sortDirection);
|
|
6012
|
+
if (options.raw) params.set("raw", "true");
|
|
6013
|
+
appendAnalyticsFilters(params, options.filters);
|
|
6014
|
+
return this.fetch(
|
|
6015
|
+
`w/${wid}/phone-numbers/${id}/analytics/calls?${params}`
|
|
6016
|
+
);
|
|
6017
|
+
}
|
|
6018
|
+
/**
|
|
6019
|
+
* Export outbound-call analytics as a CSV blob (respecting the current
|
|
6020
|
+
* filters + raw state). The server returns HTTP 400 when the result set
|
|
6021
|
+
* exceeds its export cap; that message is surfaced to the caller via
|
|
6022
|
+
* `ApiError` so the UI can toast it.
|
|
6023
|
+
*/
|
|
6024
|
+
async exportPhoneNumberOutboundAnalyticsCsv(wid, id, options) {
|
|
6025
|
+
const params = new URLSearchParams({ analyticsSessionId: options.analyticsSessionId });
|
|
6026
|
+
if (options.sort) params.set("sort", options.sort);
|
|
6027
|
+
if (options.sortDirection) params.set("sortDirection", options.sortDirection);
|
|
6028
|
+
if (options.raw) params.set("raw", "true");
|
|
6029
|
+
appendAnalyticsFilters(params, options.filters);
|
|
6030
|
+
const response = await this.fetchRaw(
|
|
6031
|
+
`w/${wid}/phone-numbers/${id}/analytics/export?${params}`,
|
|
6032
|
+
{},
|
|
6033
|
+
[400]
|
|
6034
|
+
);
|
|
6035
|
+
if (!response.ok) {
|
|
6036
|
+
const data = await response.json().catch(() => ({}));
|
|
6037
|
+
const message = typeof data?.detail === "string" ? data.detail : "Failed to export analytics";
|
|
6038
|
+
throw new ApiError(message, response.status);
|
|
6039
|
+
}
|
|
6040
|
+
return response.blob();
|
|
6041
|
+
}
|
|
5396
6042
|
};
|
|
5397
6043
|
|
|
5398
6044
|
// src/api/pronunciations.ts
|
|
@@ -5532,14 +6178,45 @@ var PersonasApi = class extends BaseApiClient {
|
|
|
5532
6178
|
body: JSON.stringify(data)
|
|
5533
6179
|
});
|
|
5534
6180
|
}
|
|
5535
|
-
async updatePersona(wid, id, data) {
|
|
5536
|
-
return this.fetch(`w/${wid}/personas/${id}`, {
|
|
5537
|
-
method: "PUT",
|
|
5538
|
-
body: JSON.stringify(data)
|
|
6181
|
+
async updatePersona(wid, id, data) {
|
|
6182
|
+
return this.fetch(`w/${wid}/personas/${id}`, {
|
|
6183
|
+
method: "PUT",
|
|
6184
|
+
body: JSON.stringify(data)
|
|
6185
|
+
});
|
|
6186
|
+
}
|
|
6187
|
+
async deletePersona(wid, id) {
|
|
6188
|
+
return this.fetch(`w/${wid}/personas/${id}`, { method: "DELETE" });
|
|
6189
|
+
}
|
|
6190
|
+
};
|
|
6191
|
+
|
|
6192
|
+
// src/api/queries.ts
|
|
6193
|
+
var QueriesApi = class extends BaseApiClient {
|
|
6194
|
+
/** Queryable namespace: native fields, operators per type, DataType record fields. */
|
|
6195
|
+
async getQueryFields(wid) {
|
|
6196
|
+
return this.fetch(`w/${wid}/queries/fields`, {
|
|
6197
|
+
method: "GET"
|
|
6198
|
+
});
|
|
6199
|
+
}
|
|
6200
|
+
/** Structure / field / access / cost validation without execution. */
|
|
6201
|
+
async validateQuery(wid, query) {
|
|
6202
|
+
return this.fetch(`w/${wid}/queries/validate`, {
|
|
6203
|
+
method: "POST",
|
|
6204
|
+
body: JSON.stringify({ query })
|
|
6205
|
+
});
|
|
6206
|
+
}
|
|
6207
|
+
/** Bounded sample run (limit capped server-side). */
|
|
6208
|
+
async previewQuery(wid, query, mode) {
|
|
6209
|
+
return this.fetch(`w/${wid}/queries/preview`, {
|
|
6210
|
+
method: "POST",
|
|
6211
|
+
body: JSON.stringify({ query, mode })
|
|
5539
6212
|
});
|
|
5540
6213
|
}
|
|
5541
|
-
|
|
5542
|
-
|
|
6214
|
+
/** Execute a query (rows / count / aggregate). */
|
|
6215
|
+
async runQuery(wid, query, mode) {
|
|
6216
|
+
return this.fetch(`w/${wid}/queries/run`, {
|
|
6217
|
+
method: "POST",
|
|
6218
|
+
body: JSON.stringify({ query, mode })
|
|
6219
|
+
});
|
|
5543
6220
|
}
|
|
5544
6221
|
};
|
|
5545
6222
|
|
|
@@ -5594,6 +6271,9 @@ var QualificationsApi = class extends BaseApiClient {
|
|
|
5594
6271
|
async listTestChatRuns(wid, workflowId, params) {
|
|
5595
6272
|
const query = new URLSearchParams();
|
|
5596
6273
|
if (params?.scenarioId !== void 0) query.set("scenarioId", String(params.scenarioId));
|
|
6274
|
+
if (params?.assistantChatModelId !== void 0) {
|
|
6275
|
+
query.set("assistantChatModelId", params.assistantChatModelId);
|
|
6276
|
+
}
|
|
5597
6277
|
if (params?.limit !== void 0) query.set("limit", String(params.limit));
|
|
5598
6278
|
const qs = query.toString() ? `?${query.toString()}` : "";
|
|
5599
6279
|
return this.fetch(
|
|
@@ -5697,6 +6377,20 @@ var ReportsApi = class extends BaseApiClient {
|
|
|
5697
6377
|
|
|
5698
6378
|
// src/api/salesforce.ts
|
|
5699
6379
|
var SalesforceApi = class extends BaseApiClient {
|
|
6380
|
+
/**
|
|
6381
|
+
* Create the Salesforce connection shell (no credentials yet).
|
|
6382
|
+
*
|
|
6383
|
+
* First step of the guided setup flow: provisions the connection row so
|
|
6384
|
+
* the admin lands on the detail page where the OAuth callback URL is
|
|
6385
|
+
* shown — which they need to register their Salesforce Connected App
|
|
6386
|
+
* before they have a Client ID / Secret to enter. Idempotent.
|
|
6387
|
+
*/
|
|
6388
|
+
async installSalesforce(wid, data) {
|
|
6389
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/install`, {
|
|
6390
|
+
method: "POST",
|
|
6391
|
+
body: JSON.stringify(data ?? {})
|
|
6392
|
+
});
|
|
6393
|
+
}
|
|
5700
6394
|
async configureSalesforce(wid, data) {
|
|
5701
6395
|
return this.fetch(
|
|
5702
6396
|
`w/${wid}/app-connections/salesforce/configure`,
|
|
@@ -5898,6 +6592,20 @@ var ConnectionSyncApi = class extends BaseApiClient {
|
|
|
5898
6592
|
|
|
5899
6593
|
// src/api/hubspot.ts
|
|
5900
6594
|
var HubspotApi = class extends BaseApiClient {
|
|
6595
|
+
/**
|
|
6596
|
+
* Create the HubSpot connection shell (no credentials yet).
|
|
6597
|
+
*
|
|
6598
|
+
* First step of the guided setup flow: provisions the connection row so
|
|
6599
|
+
* the admin lands on the detail page where the OAuth callback URL is
|
|
6600
|
+
* shown — which they need to register their HubSpot app before they have
|
|
6601
|
+
* a Client ID / Secret to enter. Idempotent.
|
|
6602
|
+
*/
|
|
6603
|
+
async installHubspot(wid) {
|
|
6604
|
+
return this.fetch(`w/${wid}/app-connections/hubspot/install`, {
|
|
6605
|
+
method: "POST",
|
|
6606
|
+
body: JSON.stringify({})
|
|
6607
|
+
});
|
|
6608
|
+
}
|
|
5901
6609
|
async configureHubspot(wid, data) {
|
|
5902
6610
|
return this.fetch(`w/${wid}/app-connections/hubspot/configure`, {
|
|
5903
6611
|
method: "POST",
|
|
@@ -6028,6 +6736,112 @@ var SitesApi = class extends BaseApiClient {
|
|
|
6028
6736
|
async getSite(wid, id) {
|
|
6029
6737
|
return this.fetch(`w/${wid}/sites/${id}`);
|
|
6030
6738
|
}
|
|
6739
|
+
/** Get a site's sharing settings. */
|
|
6740
|
+
async getSiteSharing(wid, siteId) {
|
|
6741
|
+
return this.fetch(`w/${wid}/sites/${siteId}/sharing`);
|
|
6742
|
+
}
|
|
6743
|
+
/** Update a site's sharing settings. */
|
|
6744
|
+
async updateSiteSharing(wid, siteId, data) {
|
|
6745
|
+
return this.fetch(`w/${wid}/sites/${siteId}/sharing`, {
|
|
6746
|
+
method: "PUT",
|
|
6747
|
+
body: JSON.stringify(data)
|
|
6748
|
+
});
|
|
6749
|
+
}
|
|
6750
|
+
/** Get a site's source tree. */
|
|
6751
|
+
async getSiteSource(wid, siteId) {
|
|
6752
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source`);
|
|
6753
|
+
}
|
|
6754
|
+
/** Starter templates the caller may seed (superuser-only ones filtered server-side). */
|
|
6755
|
+
async getSiteSourceTemplates(wid, siteId) {
|
|
6756
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source/templates`);
|
|
6757
|
+
}
|
|
6758
|
+
/** Create a site's source tree with starter files if it does not exist. */
|
|
6759
|
+
async createSiteSource(wid, siteId) {
|
|
6760
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source`, {
|
|
6761
|
+
method: "POST"
|
|
6762
|
+
});
|
|
6763
|
+
}
|
|
6764
|
+
/** Build a site's source without publishing. */
|
|
6765
|
+
async buildSiteSource(wid, siteId) {
|
|
6766
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source/build`, {
|
|
6767
|
+
method: "POST"
|
|
6768
|
+
});
|
|
6769
|
+
}
|
|
6770
|
+
/**
|
|
6771
|
+
* Build and publish a site's source. Optionally label the published version
|
|
6772
|
+
* with a `name` and `note`; both default to null (the UI then shows
|
|
6773
|
+
* "Version {version}").
|
|
6774
|
+
*/
|
|
6775
|
+
async publishSiteSource(wid, siteId, options) {
|
|
6776
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source/publish`, {
|
|
6777
|
+
method: "POST",
|
|
6778
|
+
body: JSON.stringify({
|
|
6779
|
+
name: options?.name ?? null,
|
|
6780
|
+
note: options?.note ?? null
|
|
6781
|
+
})
|
|
6782
|
+
});
|
|
6783
|
+
}
|
|
6784
|
+
/**
|
|
6785
|
+
* Reset a site's source files: load a starter template and/or wipe existing
|
|
6786
|
+
* files. `template` selects which starter to seed when `loadDefaults` is set
|
|
6787
|
+
* (defaults to "hello-world"; "patient-enrollment" is the other built-in).
|
|
6788
|
+
*/
|
|
6789
|
+
async resetSiteSource(wid, siteId, options) {
|
|
6790
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source/reset`, {
|
|
6791
|
+
method: "POST",
|
|
6792
|
+
body: JSON.stringify({
|
|
6793
|
+
load_defaults: options.loadDefaults,
|
|
6794
|
+
delete_existing: options.deleteExisting,
|
|
6795
|
+
...options.template ? { template: options.template } : {}
|
|
6796
|
+
})
|
|
6797
|
+
});
|
|
6798
|
+
}
|
|
6799
|
+
/**
|
|
6800
|
+
* Re-point the published release to a prior version from the history. A pure
|
|
6801
|
+
* pointer move (no rebuild); the other versions stay in the history.
|
|
6802
|
+
*/
|
|
6803
|
+
async rollbackSiteSource(wid, siteId, releaseUuid) {
|
|
6804
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source/rollback`, {
|
|
6805
|
+
method: "POST",
|
|
6806
|
+
body: JSON.stringify({ release_uuid: releaseUuid })
|
|
6807
|
+
});
|
|
6808
|
+
}
|
|
6809
|
+
/**
|
|
6810
|
+
* Export the site's source tree as a ZIP archive (editor-gated server-side).
|
|
6811
|
+
* Returns the raw archive bytes for the caller to save.
|
|
6812
|
+
*/
|
|
6813
|
+
async downloadSiteSourceZip(wid, siteId) {
|
|
6814
|
+
const response = await this.fetchRaw(`w/${wid}/sites/${siteId}/source/download`);
|
|
6815
|
+
return response.blob();
|
|
6816
|
+
}
|
|
6817
|
+
/**
|
|
6818
|
+
* Replace the site's source tree with the contents of an uploaded ZIP
|
|
6819
|
+
* (clears the existing source first, like a reset that loads a template).
|
|
6820
|
+
*/
|
|
6821
|
+
async importSiteSourceZip(wid, siteId, file) {
|
|
6822
|
+
const form = new FormData();
|
|
6823
|
+
form.append("file", file, "source.zip");
|
|
6824
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source/import`, {
|
|
6825
|
+
method: "POST",
|
|
6826
|
+
body: form
|
|
6827
|
+
});
|
|
6828
|
+
}
|
|
6829
|
+
/**
|
|
6830
|
+
* Get a theme's settings schema, the site's saved values, and capabilities.
|
|
6831
|
+
* Pass `theme` to resolve the schema for a theme other than the saved one
|
|
6832
|
+
* (e.g. one the builder has selected but not yet saved).
|
|
6833
|
+
*/
|
|
6834
|
+
async getThemeSettings(wid, siteId, theme) {
|
|
6835
|
+
const query = theme ? `?theme=${encodeURIComponent(theme)}` : "";
|
|
6836
|
+
return this.fetch(`w/${wid}/sites/${siteId}/theme-settings${query}`);
|
|
6837
|
+
}
|
|
6838
|
+
/** Save values for the active theme's settings (validated against the schema). */
|
|
6839
|
+
async updateThemeSettings(wid, siteId, values) {
|
|
6840
|
+
return this.fetch(`w/${wid}/sites/${siteId}/theme-settings`, {
|
|
6841
|
+
method: "PUT",
|
|
6842
|
+
body: JSON.stringify({ values })
|
|
6843
|
+
});
|
|
6844
|
+
}
|
|
6031
6845
|
/** Get a single site by UUID. */
|
|
6032
6846
|
async getSiteByUuid(wid, uuid) {
|
|
6033
6847
|
return this.fetch(`s/${wid}/${uuid}`);
|
|
@@ -6066,19 +6880,28 @@ var SitesApi = class extends BaseApiClient {
|
|
|
6066
6880
|
}
|
|
6067
6881
|
);
|
|
6068
6882
|
}
|
|
6069
|
-
/**
|
|
6883
|
+
/**
|
|
6884
|
+
* Verify a phone or email code and complete site authentication.
|
|
6885
|
+
*
|
|
6886
|
+
* When the account has 2FA enrolled, the backend returns a temporary token
|
|
6887
|
+
* with ``requiresTwoFactor: true`` and this method does **not** mint full
|
|
6888
|
+
* session cookies — the caller must complete the 2FA challenge (same handoff
|
|
6889
|
+
* as public-site Google OAuth).
|
|
6890
|
+
*/
|
|
6070
6891
|
async siteVerifyCode(wid, siteUuid, code, phoneNumber, email) {
|
|
6071
6892
|
const verifyResponse = await this.fetch(`s/${wid}/${siteUuid}/auth/verify`, {
|
|
6072
6893
|
method: "POST",
|
|
6073
6894
|
body: JSON.stringify({ code, phoneNumber, email })
|
|
6074
6895
|
});
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6896
|
+
if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
|
|
6897
|
+
const completeResponse = await fetch(`/api/auth/complete`, {
|
|
6898
|
+
method: "POST",
|
|
6899
|
+
headers: { "Content-Type": "application/json" },
|
|
6900
|
+
body: JSON.stringify({ token: verifyResponse.token })
|
|
6901
|
+
});
|
|
6902
|
+
if (!completeResponse.ok) {
|
|
6903
|
+
throw new Error("Failed to complete authentication");
|
|
6904
|
+
}
|
|
6082
6905
|
}
|
|
6083
6906
|
return verifyResponse;
|
|
6084
6907
|
}
|
|
@@ -6383,6 +7206,16 @@ var SupportRequestsApi = class extends BaseApiClient {
|
|
|
6383
7206
|
body: JSON.stringify(data)
|
|
6384
7207
|
});
|
|
6385
7208
|
}
|
|
7209
|
+
/**
|
|
7210
|
+
* Reopen a resolved support request (e.g. staff resolved it prematurely).
|
|
7211
|
+
* The server rejects requests that are not in the `resolved` state.
|
|
7212
|
+
*/
|
|
7213
|
+
async reopenWorkspaceSupportRequest(workspaceUuid, uuid, data = {}) {
|
|
7214
|
+
return this.fetch(`w/${workspaceUuid}/support-requests/${uuid}/reopen`, {
|
|
7215
|
+
method: "POST",
|
|
7216
|
+
body: JSON.stringify(data)
|
|
7217
|
+
});
|
|
7218
|
+
}
|
|
6386
7219
|
/**
|
|
6387
7220
|
* Record a click on a pushed resource (Proactive Support). For a
|
|
6388
7221
|
* manager_prompt, pass the Manager Chat UUID it opened so the
|
|
@@ -6528,7 +7361,15 @@ var SupervisorsApi = class extends BaseApiClient {
|
|
|
6528
7361
|
|
|
6529
7362
|
// src/api/tasks.ts
|
|
6530
7363
|
var TasksApi = class extends BaseApiClient {
|
|
6531
|
-
/**
|
|
7364
|
+
/**
|
|
7365
|
+
* List all tasks in a workspace, optionally filtering by workflow or
|
|
7366
|
+
* including archived.
|
|
7367
|
+
*
|
|
7368
|
+
* `workflowId` is the STABLE workflow root id — the server resolves it to
|
|
7369
|
+
* that workflow's draft revision's tasks. `workflowRevisionId` filters an
|
|
7370
|
+
* explicit revision (the read-only published-revision view). Pass at most
|
|
7371
|
+
* one; passing both that disagree is a 400.
|
|
7372
|
+
*/
|
|
6532
7373
|
async getTasks(wid, options = {}) {
|
|
6533
7374
|
const params = new URLSearchParams();
|
|
6534
7375
|
if (options.includeArchived) {
|
|
@@ -6537,6 +7378,9 @@ var TasksApi = class extends BaseApiClient {
|
|
|
6537
7378
|
if (options.workflowId) {
|
|
6538
7379
|
params.append("workflow_id", options.workflowId.toString());
|
|
6539
7380
|
}
|
|
7381
|
+
if (options.workflowRevisionId) {
|
|
7382
|
+
params.append("workflow_revision_id", options.workflowRevisionId.toString());
|
|
7383
|
+
}
|
|
6540
7384
|
if (options.sortBy) {
|
|
6541
7385
|
params.append("sortBy", options.sortBy);
|
|
6542
7386
|
}
|
|
@@ -6891,11 +7735,18 @@ var JourneysApi = class extends BaseApiClient {
|
|
|
6891
7735
|
// src/api/workflows.ts
|
|
6892
7736
|
var WorkflowsApi = class extends BaseApiClient {
|
|
6893
7737
|
/** List all workflows in a workspace, optionally including archived ones. */
|
|
6894
|
-
async getWorkflows(wid,
|
|
6895
|
-
const
|
|
6896
|
-
|
|
7738
|
+
async getWorkflows(wid, options = {}) {
|
|
7739
|
+
const params = new URLSearchParams();
|
|
7740
|
+
if (options.archived) params.set("archived", "true");
|
|
7741
|
+
if (options.page) params.set("page", String(options.page));
|
|
7742
|
+
if (options.pageSize) params.set("pageSize", String(options.pageSize));
|
|
7743
|
+
if (options.sortBy) params.set("sortBy", options.sortBy);
|
|
7744
|
+
if (options.sortOrder) params.set("sortOrder", options.sortOrder);
|
|
7745
|
+
if (options.search) params.set("search", options.search);
|
|
7746
|
+
const qs = params.toString();
|
|
7747
|
+
return this.fetch(`w/${wid}/workflows${qs ? `?${qs}` : ""}`);
|
|
6897
7748
|
}
|
|
6898
|
-
/** Get a single workflow by ID. */
|
|
7749
|
+
/** Get a single workflow by ID (root + draft + active-revision summary). */
|
|
6899
7750
|
async getWorkflow(wid, id) {
|
|
6900
7751
|
return this.fetch(`w/${wid}/workflows/${id}`);
|
|
6901
7752
|
}
|
|
@@ -6943,7 +7794,7 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
6943
7794
|
body: JSON.stringify(workflow)
|
|
6944
7795
|
});
|
|
6945
7796
|
}
|
|
6946
|
-
/** Update an existing workflow. */
|
|
7797
|
+
/** Update an existing workflow's draft revision. */
|
|
6947
7798
|
async updateWorkflow(wid, id, workflow) {
|
|
6948
7799
|
return this.fetch(`w/${wid}/workflows/${id}`, {
|
|
6949
7800
|
method: "PUT",
|
|
@@ -6964,13 +7815,15 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
6964
7815
|
/** Archive a workflow. */
|
|
6965
7816
|
async archiveWorkflow(wid, id) {
|
|
6966
7817
|
return this.fetch(`w/${wid}/workflows/${id}/archive`, {
|
|
6967
|
-
method: "POST"
|
|
7818
|
+
method: "POST",
|
|
7819
|
+
body: JSON.stringify({})
|
|
6968
7820
|
});
|
|
6969
7821
|
}
|
|
6970
7822
|
/** Unarchive a previously archived workflow. */
|
|
6971
7823
|
async unarchiveWorkflow(wid, id) {
|
|
6972
7824
|
return this.fetch(`w/${wid}/workflows/${id}/unarchive`, {
|
|
6973
|
-
method: "POST"
|
|
7825
|
+
method: "POST",
|
|
7826
|
+
body: JSON.stringify({})
|
|
6974
7827
|
});
|
|
6975
7828
|
}
|
|
6976
7829
|
/** Clone a workflow with a new name. */
|
|
@@ -6986,16 +7839,20 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
6986
7839
|
}
|
|
6987
7840
|
/** Create a new workflow from a template. */
|
|
6988
7841
|
async createWorkflowFromTemplate(wid, templateUuid, data) {
|
|
6989
|
-
return this.fetch(
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
7842
|
+
return this.fetch(
|
|
7843
|
+
`w/${wid}/workflows/templates/${templateUuid}/create-workflow`,
|
|
7844
|
+
{
|
|
7845
|
+
method: "POST",
|
|
7846
|
+
body: JSON.stringify(data)
|
|
7847
|
+
}
|
|
7848
|
+
);
|
|
6993
7849
|
}
|
|
6994
7850
|
/** Get task assignment statistics for a workflow within an optional date range. */
|
|
6995
|
-
async getWorkflowTaskAssignmentStats(wid, id, fromDate, toDate) {
|
|
7851
|
+
async getWorkflowTaskAssignmentStats(wid, id, fromDate, toDate, workflowRevisionId) {
|
|
6996
7852
|
const params = new URLSearchParams();
|
|
6997
7853
|
if (fromDate) params.append("from_date", fromDate);
|
|
6998
7854
|
if (toDate) params.append("to_date", toDate);
|
|
7855
|
+
if (workflowRevisionId) params.append("workflowRevisionId", String(workflowRevisionId));
|
|
6999
7856
|
return this.fetch(
|
|
7000
7857
|
`w/${wid}/workflows/${id}/task-assignment-stats?${params.toString()}`
|
|
7001
7858
|
);
|
|
@@ -7045,6 +7902,24 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
7045
7902
|
`w/${wid}/workflows/${workflowId}/route-dry-run?${params.toString()}`
|
|
7046
7903
|
);
|
|
7047
7904
|
}
|
|
7905
|
+
// Workflow Feedback API
|
|
7906
|
+
/**
|
|
7907
|
+
* List chat feedback for a workflow (thumbs ratings + explicit/extracted rows).
|
|
7908
|
+
* First consumer of the workspace-plane chat_feedback table.
|
|
7909
|
+
*/
|
|
7910
|
+
async getWorkflowFeedback(wid, workflowId, options = {}) {
|
|
7911
|
+
const params = new URLSearchParams();
|
|
7912
|
+
if (options.page != null) params.set("page", String(options.page));
|
|
7913
|
+
if (options.pageSize != null) params.set("pageSize", String(options.pageSize));
|
|
7914
|
+
if (options.source) params.set("source", options.source);
|
|
7915
|
+
if (options.rating) params.set("rating", options.rating);
|
|
7916
|
+
if (options.authorKind) params.set("authorKind", options.authorKind);
|
|
7917
|
+
if (options.includeTest != null) params.set("includeTest", String(options.includeTest));
|
|
7918
|
+
const qs = params.toString();
|
|
7919
|
+
return this.fetch(
|
|
7920
|
+
`w/${wid}/workflows/${workflowId}/feedback${qs ? `?${qs}` : ""}`
|
|
7921
|
+
);
|
|
7922
|
+
}
|
|
7048
7923
|
// Workflow Contributors API
|
|
7049
7924
|
/** List all contributors for a workflow. */
|
|
7050
7925
|
async getWorkflowContributors(wid, workflowId) {
|
|
@@ -7110,58 +7985,80 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
7110
7985
|
body: JSON.stringify({ name })
|
|
7111
7986
|
});
|
|
7112
7987
|
}
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
return this.fetch(`w/${wid}/workflows/${workflowUuid}/versions`);
|
|
7117
|
-
}
|
|
7118
|
-
/** Get the active version of a workflow. */
|
|
7119
|
-
async getWorkflowVersionActive(wid, workflowUuid) {
|
|
7120
|
-
return this.fetch(
|
|
7121
|
-
`w/${wid}/workflows/${workflowUuid}/versions/active`
|
|
7122
|
-
);
|
|
7988
|
+
/** List relational revisions for a workflow. */
|
|
7989
|
+
async getWorkflowRevisions(wid, workflowId) {
|
|
7990
|
+
return this.fetch(`w/${wid}/workflows/${workflowId}/revisions`);
|
|
7123
7991
|
}
|
|
7124
|
-
/** Get
|
|
7125
|
-
async
|
|
7992
|
+
/** Get full workflow details for one relational workflow revision. */
|
|
7993
|
+
async getWorkflowRevision(wid, workflowId, revisionId) {
|
|
7126
7994
|
return this.fetch(
|
|
7127
|
-
`w/${wid}/workflows/${
|
|
7995
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}`
|
|
7128
7996
|
);
|
|
7129
7997
|
}
|
|
7130
|
-
/**
|
|
7131
|
-
|
|
7132
|
-
|
|
7998
|
+
/** Freeze the workflow's draft as a published revision and clone a fresh draft.
|
|
7999
|
+
*
|
|
8000
|
+
* By default the just-published revision becomes the active revision —
|
|
8001
|
+
* live traffic flips to it immediately. Pass `setActive: false` to
|
|
8002
|
+
* publish without flipping live traffic (advanced flow).
|
|
8003
|
+
*/
|
|
8004
|
+
async publishWorkflowRevision(wid, workflowId, data = {}) {
|
|
8005
|
+
return this.fetch(`w/${wid}/workflows/${workflowId}/publish`, {
|
|
7133
8006
|
method: "POST",
|
|
7134
8007
|
body: JSON.stringify(data)
|
|
7135
8008
|
});
|
|
7136
8009
|
}
|
|
7137
|
-
|
|
8010
|
+
/** Point the workflow's active pointer at a chosen revision (pointer flip only).
|
|
8011
|
+
*
|
|
8012
|
+
* The target may be any of the workflow's published revisions.
|
|
8013
|
+
* Activating the draft requires `allowDraft: true` and a UI warning
|
|
8014
|
+
* confirmation.
|
|
8015
|
+
*/
|
|
8016
|
+
async activateWorkflowRevision(wid, workflowId, revisionId, data = {}) {
|
|
7138
8017
|
return this.fetch(
|
|
7139
|
-
`w/${wid}/workflows/${
|
|
7140
|
-
{
|
|
8018
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}/activate`,
|
|
8019
|
+
{
|
|
8020
|
+
method: "POST",
|
|
8021
|
+
body: JSON.stringify(data)
|
|
8022
|
+
}
|
|
7141
8023
|
);
|
|
7142
8024
|
}
|
|
7143
|
-
/**
|
|
7144
|
-
|
|
8025
|
+
/** Update a revision's curation metadata (label + publish notes).
|
|
8026
|
+
*
|
|
8027
|
+
* Applies to both the draft and published revisions; it is not a graph
|
|
8028
|
+
* change, so it never marks the draft dirty.
|
|
8029
|
+
*/
|
|
8030
|
+
async updateWorkflowRevisionMetadata(wid, workflowId, revisionId, data) {
|
|
7145
8031
|
return this.fetch(
|
|
7146
|
-
`w/${wid}/workflows/${
|
|
8032
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}`,
|
|
7147
8033
|
{
|
|
7148
|
-
method: "
|
|
8034
|
+
method: "PATCH",
|
|
8035
|
+
body: JSON.stringify(data)
|
|
7149
8036
|
}
|
|
7150
8037
|
);
|
|
7151
8038
|
}
|
|
7152
|
-
/**
|
|
7153
|
-
|
|
8039
|
+
/** Compare two revisions of the same workflow.
|
|
8040
|
+
*
|
|
8041
|
+
* `against` is a revision id or UUID; when omitted the diff compares the
|
|
8042
|
+
* named revision against the workflow's draft. Tasks are matched by
|
|
8043
|
+
* stable lineage, so a rename reads as a changed `name` field.
|
|
8044
|
+
*/
|
|
8045
|
+
async diffWorkflowRevisions(wid, workflowId, revisionId, against) {
|
|
8046
|
+
const qs = against !== void 0 ? `?against=${encodeURIComponent(String(against))}` : "";
|
|
7154
8047
|
return this.fetch(
|
|
7155
|
-
`w/${wid}/workflows/${
|
|
7156
|
-
{
|
|
7157
|
-
method: "POST"
|
|
7158
|
-
}
|
|
8048
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}/diff${qs}`
|
|
7159
8049
|
);
|
|
7160
8050
|
}
|
|
7161
|
-
/**
|
|
7162
|
-
|
|
8051
|
+
/** Branch a published revision into the workflow's draft ("edit this
|
|
8052
|
+
* revision"): the draft becomes a fresh clone of the named published
|
|
8053
|
+
* revision. Pass `discardDraftChanges` to replace a dirty draft.
|
|
8054
|
+
*/
|
|
8055
|
+
async editWorkflowRevisionAsDraft(wid, workflowId, revisionId, data = {}) {
|
|
7163
8056
|
return this.fetch(
|
|
7164
|
-
`w/${wid}/workflows/${
|
|
8057
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}/edit`,
|
|
8058
|
+
{
|
|
8059
|
+
method: "POST",
|
|
8060
|
+
body: JSON.stringify(data)
|
|
8061
|
+
}
|
|
7165
8062
|
);
|
|
7166
8063
|
}
|
|
7167
8064
|
};
|
|
@@ -7302,11 +8199,14 @@ var Scope = /* @__PURE__ */ ((Scope2) => {
|
|
|
7302
8199
|
Scope2["ANALYTICS_READ"] = "analytics:read";
|
|
7303
8200
|
Scope2["OPERATOR_READ"] = "operator:read";
|
|
7304
8201
|
Scope2["OPERATOR_WRITE"] = "operator:write";
|
|
8202
|
+
Scope2["EXPORT_READ"] = "export:read";
|
|
8203
|
+
Scope2["EXPORT_WRITE"] = "export:write";
|
|
8204
|
+
Scope2["EXPORT_ADMIN"] = "export:admin";
|
|
7305
8205
|
Scope2["ORG_INFO"] = "org:info";
|
|
7306
8206
|
Scope2["ORG_READ"] = "org:read";
|
|
7307
8207
|
Scope2["ORG_WRITE"] = "org:write";
|
|
7308
8208
|
Scope2["ORG_ADMIN"] = "org:admin";
|
|
7309
|
-
Scope2["
|
|
8209
|
+
Scope2["ORG_MANAGE_ADMINS"] = "org:manage_admins";
|
|
7310
8210
|
Scope2["ORG_DELETE"] = "org:delete";
|
|
7311
8211
|
return Scope2;
|
|
7312
8212
|
})(Scope || {});
|
|
@@ -7317,6 +8217,20 @@ var BulkMemberResultStatus = {
|
|
|
7317
8217
|
updated: "updated",
|
|
7318
8218
|
failed: "failed"
|
|
7319
8219
|
};
|
|
8220
|
+
var MemberImportMatchInfoMatchType = {
|
|
8221
|
+
external_id: "external_id",
|
|
8222
|
+
email: "email",
|
|
8223
|
+
phone: "phone",
|
|
8224
|
+
account_email: "account_email",
|
|
8225
|
+
account_phone: "account_phone"
|
|
8226
|
+
};
|
|
8227
|
+
var MemberImportPreviewRowAction = {
|
|
8228
|
+
create: "create",
|
|
8229
|
+
update: "update",
|
|
8230
|
+
unchanged: "unchanged",
|
|
8231
|
+
conflict: "conflict",
|
|
8232
|
+
error: "error"
|
|
8233
|
+
};
|
|
7320
8234
|
|
|
7321
8235
|
// src/types/member-types.ts
|
|
7322
8236
|
var MemberType = /* @__PURE__ */ ((MemberType2) => {
|
|
@@ -7360,10 +8274,14 @@ var EventRuleObjectType = /* @__PURE__ */ ((EventRuleObjectType2) => {
|
|
|
7360
8274
|
})(EventRuleObjectType || {});
|
|
7361
8275
|
var EventRuleEventType = /* @__PURE__ */ ((EventRuleEventType2) => {
|
|
7362
8276
|
EventRuleEventType2["TASK_EXECUTE"] = "task:execute";
|
|
8277
|
+
EventRuleEventType2["TASK_ENTER"] = "task:enter";
|
|
8278
|
+
EventRuleEventType2["TASK_COMMAND"] = "task:command";
|
|
8279
|
+
EventRuleEventType2["TASK_EXIT"] = "task:exit";
|
|
7363
8280
|
EventRuleEventType2["MEMBER_JOINED"] = "workspace:member_joined";
|
|
7364
8281
|
EventRuleEventType2["MEMBER_LEFT"] = "workspace:member_left";
|
|
7365
8282
|
EventRuleEventType2["DATA_RECORD_CREATED"] = "data_record:created";
|
|
7366
8283
|
EventRuleEventType2["DATA_RECORD_UPDATED"] = "data_record:updated";
|
|
8284
|
+
EventRuleEventType2["DATA_RECORD_CHANGED"] = "data_record:changed";
|
|
7367
8285
|
EventRuleEventType2["CHAT_CREATED"] = "chat:created";
|
|
7368
8286
|
EventRuleEventType2["CHAT_CALLBACK"] = "chat:callback";
|
|
7369
8287
|
EventRuleEventType2["MEMBER_UPDATED"] = "member:updated";
|
|
@@ -7393,6 +8311,7 @@ var EventRuleActionType = /* @__PURE__ */ ((EventRuleActionType2) => {
|
|
|
7393
8311
|
EventRuleActionType2["SWITCH_TASK_ACTION"] = "task:switch";
|
|
7394
8312
|
EventRuleActionType2["ASSISTANT_MESSAGE"] = "assistant:message";
|
|
7395
8313
|
EventRuleActionType2["FORM_FIELD_UPDATE"] = "form:update_field";
|
|
8314
|
+
EventRuleActionType2["CEL_MUTATE"] = "record:cel_mutate";
|
|
7396
8315
|
EventRuleActionType2["MESSAGE_VALIDATION"] = "message:validation";
|
|
7397
8316
|
EventRuleActionType2["CHAT_CREATE"] = "chat:create";
|
|
7398
8317
|
EventRuleActionType2["CHAT_CONTINUE"] = "chat:continue";
|
|
@@ -7441,7 +8360,6 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
|
|
|
7441
8360
|
WorkspaceFeature2["GCALENDAR"] = "gcalendar";
|
|
7442
8361
|
WorkspaceFeature2["MONDAY"] = "monday";
|
|
7443
8362
|
WorkspaceFeature2["RESELL_PRODUCTS"] = "resell_products";
|
|
7444
|
-
WorkspaceFeature2["HIPAA_COMPLIANCE"] = "hipaa_compliance";
|
|
7445
8363
|
WorkspaceFeature2["SOC2_COMPLIANCE"] = "soc2_compliance";
|
|
7446
8364
|
WorkspaceFeature2["EHR_FHIR"] = "ehr_fhir";
|
|
7447
8365
|
WorkspaceFeature2["EHR_ECLINICALWORKS"] = "ehr_eclinicalworks";
|
|
@@ -7451,7 +8369,6 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
|
|
|
7451
8369
|
WorkspaceFeature2["CONFLUENCE"] = "confluence";
|
|
7452
8370
|
WorkspaceFeature2["AGENT_MEMORY"] = "agent_memory";
|
|
7453
8371
|
WorkspaceFeature2["IMAGE_GENERATION"] = "image_generation";
|
|
7454
|
-
WorkspaceFeature2["WORKFLOW_VERSIONING"] = "workflow_versioning";
|
|
7455
8372
|
return WorkspaceFeature2;
|
|
7456
8373
|
})(WorkspaceFeature || {});
|
|
7457
8374
|
var MemberFeature = /* @__PURE__ */ ((MemberFeature2) => {
|
|
@@ -7465,7 +8382,6 @@ var MemberFeature = /* @__PURE__ */ ((MemberFeature2) => {
|
|
|
7465
8382
|
var OrgFeature = /* @__PURE__ */ ((OrgFeature2) => {
|
|
7466
8383
|
OrgFeature2["SSO"] = "sso";
|
|
7467
8384
|
OrgFeature2["AUDIT_LOGS"] = "audit_logs";
|
|
7468
|
-
OrgFeature2["HIPAA_COMPLIANCE"] = "hipaa_compliance";
|
|
7469
8385
|
OrgFeature2["SOC2_COMPLIANCE"] = "soc2_compliance";
|
|
7470
8386
|
OrgFeature2["CUSTOM_BRANDING"] = "custom_branding";
|
|
7471
8387
|
OrgFeature2["PRIORITY_SUPPORT"] = "priority_support";
|
|
@@ -7525,6 +8441,12 @@ var InvitationStatus = /* @__PURE__ */ ((InvitationStatus2) => {
|
|
|
7525
8441
|
return InvitationStatus2;
|
|
7526
8442
|
})(InvitationStatus || {});
|
|
7527
8443
|
|
|
8444
|
+
// src/types/generated/data.ts
|
|
8445
|
+
var DataRecordRetirementResponseReason = {
|
|
8446
|
+
monday_item_archived: "monday_item_archived",
|
|
8447
|
+
monday_item_deleted: "monday_item_deleted"
|
|
8448
|
+
};
|
|
8449
|
+
|
|
7528
8450
|
// src/types/data-types.ts
|
|
7529
8451
|
var DataFieldType = /* @__PURE__ */ ((DataFieldType2) => {
|
|
7530
8452
|
DataFieldType2["ENUM"] = "enum";
|
|
@@ -7586,7 +8508,6 @@ var ModelProvider = {
|
|
|
7586
8508
|
aws: "aws",
|
|
7587
8509
|
elevenlabs: "elevenlabs",
|
|
7588
8510
|
deepgram: "deepgram",
|
|
7589
|
-
pocket: "pocket",
|
|
7590
8511
|
xai: "xai",
|
|
7591
8512
|
custom: "custom"
|
|
7592
8513
|
};
|
|
@@ -7616,7 +8537,10 @@ var TTS_MODEL_ELEVENLABS_MULTILINGUAL = "elevenlabs:tts:eleven_multilingual_v2";
|
|
|
7616
8537
|
var TTS_MODEL_DEEPGRAM_AURA_2 = "deepgram:tts:aura-2";
|
|
7617
8538
|
var TTS_MODEL_AWS_POLLY_GENERATIVE = "aws:tts:polly-generative";
|
|
7618
8539
|
var TTS_MODEL_AWS_POLLY_NEURAL = "aws:tts:polly-neural";
|
|
7619
|
-
|
|
8540
|
+
|
|
8541
|
+
// src/types/pids-types.ts
|
|
8542
|
+
var PIDS_DISPOSITIONS = ["true_positive", "false_positive", "needs_more_context"];
|
|
8543
|
+
var PIDS_SOURCES = ["scheduled", "backfill", "pre_llm"];
|
|
7620
8544
|
|
|
7621
8545
|
// src/types/calendar-types.ts
|
|
7622
8546
|
var CalendarPermissionType = /* @__PURE__ */ ((CalendarPermissionType2) => {
|
|
@@ -7710,8 +8634,15 @@ var AccessGrantResourceType = /* @__PURE__ */ ((AccessGrantResourceType2) => {
|
|
|
7710
8634
|
AccessGrantResourceType2["SITE"] = "site";
|
|
7711
8635
|
AccessGrantResourceType2["ASSIGNMENT"] = "assignment";
|
|
7712
8636
|
AccessGrantResourceType2["APP_CONNECTION"] = "app_connection";
|
|
8637
|
+
AccessGrantResourceType2["CAPABILITY"] = "capability";
|
|
7713
8638
|
return AccessGrantResourceType2;
|
|
7714
8639
|
})(AccessGrantResourceType || {});
|
|
8640
|
+
var CapabilityClass = /* @__PURE__ */ ((CapabilityClass2) => {
|
|
8641
|
+
CapabilityClass2["TOOL_ALWAYS_ALLOW"] = "tool.always_allow";
|
|
8642
|
+
CapabilityClass2["SELF_MODIFICATION_SCHEDULE"] = "self_modification.schedule";
|
|
8643
|
+
CapabilityClass2["ATTENTION_INTERRUPT_RUNG"] = "attention.interrupt_rung";
|
|
8644
|
+
return CapabilityClass2;
|
|
8645
|
+
})(CapabilityClass || {});
|
|
7715
8646
|
var AccessGrantStatus = /* @__PURE__ */ ((AccessGrantStatus2) => {
|
|
7716
8647
|
AccessGrantStatus2["PENDING"] = "pending";
|
|
7717
8648
|
AccessGrantStatus2["ACTIVE"] = "active";
|
|
@@ -8022,6 +8953,35 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
8022
8953
|
async getWorkspaceSiteDomains(wid) {
|
|
8023
8954
|
return this.fetch(`w/${wid}/domains/for-site`);
|
|
8024
8955
|
}
|
|
8956
|
+
/**
|
|
8957
|
+
* List org domains available for enabling embeddable widgets. Widgets ride
|
|
8958
|
+
* on domain-ownership verification only, so the consumer gates selection on
|
|
8959
|
+
* `ownershipStatus === 'verified'`.
|
|
8960
|
+
*/
|
|
8961
|
+
async getWorkspaceWidgetDomains(wid) {
|
|
8962
|
+
return this.fetch(`w/${wid}/domains/for-widget`);
|
|
8963
|
+
}
|
|
8964
|
+
/** List this workspace's widget-domain enablement entries. */
|
|
8965
|
+
async listWidgetDomains(wid) {
|
|
8966
|
+
return this.fetch(`w/${wid}/widget-domains`);
|
|
8967
|
+
}
|
|
8968
|
+
/**
|
|
8969
|
+
* Enable/replace the set of widgets on one verified org domain. Idempotent
|
|
8970
|
+
* upsert keyed by `orgDomainUuid`; the server rejects unverified domains
|
|
8971
|
+
* (400) and cross-org domains (404).
|
|
8972
|
+
*/
|
|
8973
|
+
async upsertWidgetDomain(wid, orgDomainUuid, body) {
|
|
8974
|
+
return this.fetch(`w/${wid}/widget-domains/${orgDomainUuid}`, {
|
|
8975
|
+
method: "PUT",
|
|
8976
|
+
body: JSON.stringify(body)
|
|
8977
|
+
});
|
|
8978
|
+
}
|
|
8979
|
+
/** Remove this workspace's widget entry for a domain (disables all widgets). */
|
|
8980
|
+
async deleteWidgetDomain(wid, orgDomainUuid) {
|
|
8981
|
+
await this.fetch(`w/${wid}/widget-domains/${orgDomainUuid}`, {
|
|
8982
|
+
method: "DELETE"
|
|
8983
|
+
});
|
|
8984
|
+
}
|
|
8025
8985
|
/** List client workspaces managed by this reseller workspace, paginated. */
|
|
8026
8986
|
async getResellerWorkspaces(wid, params) {
|
|
8027
8987
|
const query = new URLSearchParams();
|
|
@@ -8181,7 +9141,7 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
8181
9141
|
/**
|
|
8182
9142
|
* Get billing dashboard data for a workspace.
|
|
8183
9143
|
*
|
|
8184
|
-
* This endpoint is available to organization owners (with org:
|
|
9144
|
+
* This endpoint is available to organization owners (with org:info scope).
|
|
8185
9145
|
* Superusers should use the admin endpoint via getWorkspaceUsageDashboard.
|
|
8186
9146
|
*
|
|
8187
9147
|
* Returns comprehensive billing information including:
|
|
@@ -8278,6 +9238,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8278
9238
|
customers: new CustomersApi(apiKey, baseUrl, customFetch),
|
|
8279
9239
|
resellers: new ResellersApi(apiKey, baseUrl, customFetch),
|
|
8280
9240
|
customToolkits: new CustomToolkitsApi(apiKey, baseUrl, customFetch),
|
|
9241
|
+
dashboards: new DashboardsApi(apiKey, baseUrl, customFetch),
|
|
8281
9242
|
dataTypes: new DataTypesApi(apiKey, baseUrl, customFetch),
|
|
8282
9243
|
discordBots: new DiscordBotsApi(apiKey, baseUrl, customFetch),
|
|
8283
9244
|
slackApps: new SlackAppsApi(apiKey, baseUrl, customFetch),
|
|
@@ -8285,6 +9246,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8285
9246
|
events: new EventsApi(apiKey, baseUrl, customFetch),
|
|
8286
9247
|
experiments: new ExperimentsApi(apiKey, baseUrl, customFetch),
|
|
8287
9248
|
fhirConnections: new FhirConnectionsApi(apiKey, baseUrl, customFetch),
|
|
9249
|
+
patientSyncConnections: new PatientSyncConnectionsApi(apiKey, baseUrl, customFetch),
|
|
8288
9250
|
healthie: new HealthieApi(apiKey, baseUrl, customFetch),
|
|
8289
9251
|
hubspot: new HubspotApi(apiKey, baseUrl, customFetch),
|
|
8290
9252
|
features: new FeaturesApi(apiKey, baseUrl, customFetch),
|
|
@@ -8297,6 +9259,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8297
9259
|
mcpServers: new McpServersApi(apiKey, baseUrl, customFetch),
|
|
8298
9260
|
members: new MembersApi(apiKey, baseUrl, customFetch),
|
|
8299
9261
|
milestones: new MilestonesApi(apiKey, baseUrl, customFetch),
|
|
9262
|
+
motd: new MotdApi(apiKey, baseUrl, customFetch),
|
|
8300
9263
|
confluence: new ConfluenceApi(apiKey, baseUrl, customFetch),
|
|
8301
9264
|
mondayIntegration: new MondayIntegrationApi(apiKey, baseUrl, customFetch),
|
|
8302
9265
|
notificationRules: new NotificationRulesApi(apiKey, baseUrl, customFetch),
|
|
@@ -8308,6 +9271,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8308
9271
|
pronunciations: new PronunciationsApi(apiKey, baseUrl, customFetch),
|
|
8309
9272
|
qualifications: new QualificationsApi(apiKey, baseUrl, customFetch),
|
|
8310
9273
|
personas: new PersonasApi(apiKey, baseUrl, customFetch),
|
|
9274
|
+
queries: new QueriesApi(apiKey, baseUrl, customFetch),
|
|
8311
9275
|
reports: new ReportsApi(apiKey, baseUrl, customFetch),
|
|
8312
9276
|
salesforce: new SalesforceApi(apiKey, baseUrl, customFetch),
|
|
8313
9277
|
sites: new SitesApi(apiKey, baseUrl, customFetch),
|
|
@@ -8328,7 +9292,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8328
9292
|
|
|
8329
9293
|
// src/client/workspace-client.ts
|
|
8330
9294
|
var WORKSPACE_METHOD_NAMES = [
|
|
8331
|
-
"
|
|
9295
|
+
"activateWorkflowRevision",
|
|
8332
9296
|
"addGroupMember",
|
|
8333
9297
|
"advanceStep",
|
|
8334
9298
|
"approveWorkspaceInvitation",
|
|
@@ -8352,6 +9316,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8352
9316
|
"cancelAgentTask",
|
|
8353
9317
|
"cancelAssignment",
|
|
8354
9318
|
"cancelCalendarEvent",
|
|
9319
|
+
"cancelChatCallback",
|
|
8355
9320
|
"cancelCredentialUpdateInvite",
|
|
8356
9321
|
"checkAvailability",
|
|
8357
9322
|
"checkSiteDomainAvailability",
|
|
@@ -8366,6 +9331,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8366
9331
|
"commentOnWorkspaceSupportRequest",
|
|
8367
9332
|
"configureConfluence",
|
|
8368
9333
|
"configureHealthie",
|
|
9334
|
+
"configurePatientSync",
|
|
8369
9335
|
"configureHubspot",
|
|
8370
9336
|
"configureMondayConnection",
|
|
8371
9337
|
"configureSalesforce",
|
|
@@ -8389,6 +9355,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8389
9355
|
"createCustomTool",
|
|
8390
9356
|
"createCustomToolkit",
|
|
8391
9357
|
"createDataRecord",
|
|
9358
|
+
"createDataRecordFilter",
|
|
8392
9359
|
"createDataType",
|
|
8393
9360
|
"createDiscordBot",
|
|
8394
9361
|
"createEventRule",
|
|
@@ -8435,7 +9402,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8435
9402
|
"createWorkflowOutboundVoiceChat",
|
|
8436
9403
|
"createWorkspaceMember",
|
|
8437
9404
|
"createWorkspaceSupportRequest",
|
|
8438
|
-
"deactivateWorkflowVersion",
|
|
8439
9405
|
"deleteAbility",
|
|
8440
9406
|
"deleteAgent",
|
|
8441
9407
|
"deleteAssignment",
|
|
@@ -8451,6 +9417,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8451
9417
|
"deleteCustomTool",
|
|
8452
9418
|
"deleteCustomToolkit",
|
|
8453
9419
|
"deleteDataRecord",
|
|
9420
|
+
"deleteDataRecordFilter",
|
|
8454
9421
|
"deleteDataType",
|
|
8455
9422
|
"deleteDiscordBot",
|
|
8456
9423
|
"deleteEnrollment",
|
|
@@ -8460,6 +9427,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8460
9427
|
"deleteExperimentAssignment",
|
|
8461
9428
|
"deleteExperimentGroup",
|
|
8462
9429
|
"deleteFhirConnection",
|
|
9430
|
+
"deletePatientSyncConnection",
|
|
8463
9431
|
"deleteFile",
|
|
8464
9432
|
"deleteFileLabel",
|
|
8465
9433
|
"deleteFolder",
|
|
@@ -8492,6 +9460,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8492
9460
|
"deleteSupervisor",
|
|
8493
9461
|
"deleteTask",
|
|
8494
9462
|
"deleteTeamsApp",
|
|
9463
|
+
"deleteWidgetDomain",
|
|
8495
9464
|
"deleteWorkflow",
|
|
8496
9465
|
"deleteWorkflowContributor",
|
|
8497
9466
|
"deleteWorkflowNote",
|
|
@@ -8499,7 +9468,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8499
9468
|
"deleteWorkspaceInvitationAdmin",
|
|
8500
9469
|
"denyWorkspaceInvitation",
|
|
8501
9470
|
"describeSalesforceObject",
|
|
8502
|
-
"
|
|
9471
|
+
"diffWorkflowRevisions",
|
|
8503
9472
|
"disableConfluence",
|
|
8504
9473
|
"disableCustomToolkit",
|
|
8505
9474
|
"disableHubspot",
|
|
@@ -8515,6 +9484,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8515
9484
|
"dismissAllNotifications",
|
|
8516
9485
|
"dismissNotification",
|
|
8517
9486
|
"downloadEmailAttachment",
|
|
9487
|
+
"editWorkflowRevisionAsDraft",
|
|
8518
9488
|
"enableConfluence",
|
|
8519
9489
|
"enableCustomToolkit",
|
|
8520
9490
|
"enableHubspot",
|
|
@@ -8593,8 +9563,10 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8593
9563
|
"getCalendarSchedules",
|
|
8594
9564
|
"getCalendars",
|
|
8595
9565
|
"getCelContext",
|
|
9566
|
+
"getCharlestonTestDeliveryRecipients",
|
|
8596
9567
|
"getChat",
|
|
8597
9568
|
"getChatAssignmentTasks",
|
|
9569
|
+
"getChatCallbacks",
|
|
8598
9570
|
"getChatEmails",
|
|
8599
9571
|
"getChatFilter",
|
|
8600
9572
|
"getChatFilterByUuid",
|
|
@@ -8625,6 +9597,9 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8625
9597
|
"getCustomToolkits",
|
|
8626
9598
|
"getDataRecord",
|
|
8627
9599
|
"getDataRecordChanges",
|
|
9600
|
+
"getDataRecordFilter",
|
|
9601
|
+
"getDataRecordFilterCount",
|
|
9602
|
+
"getDataRecordFilters",
|
|
8628
9603
|
"getDataRecords",
|
|
8629
9604
|
"getDataType",
|
|
8630
9605
|
"getDataTypeByUuid",
|
|
@@ -8648,19 +9623,24 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8648
9623
|
"getFhirConnections",
|
|
8649
9624
|
"getFieldIndexStatus",
|
|
8650
9625
|
"getFile",
|
|
9626
|
+
"resolveFilePath",
|
|
8651
9627
|
"getFileLabel",
|
|
8652
9628
|
"getFileLabelByUuid",
|
|
8653
9629
|
"getFileLabels",
|
|
8654
9630
|
"getFileSharing",
|
|
9631
|
+
"getFileVersionContentsUrl",
|
|
9632
|
+
"getFileVersionDiff",
|
|
8655
9633
|
"getFiles",
|
|
8656
9634
|
"getFirstRunState",
|
|
8657
9635
|
"getFolder",
|
|
8658
9636
|
"getFolderSharing",
|
|
8659
9637
|
"getFolders",
|
|
8660
9638
|
"getGoogleCalendarStatus",
|
|
9639
|
+
"getGranteeGrants",
|
|
8661
9640
|
"getHealthieAvailableSlots",
|
|
8662
9641
|
"getHealthieReconciliationMatches",
|
|
8663
9642
|
"getHealthieStatus",
|
|
9643
|
+
"getPatientSyncStatus",
|
|
8664
9644
|
"getHubspotContactProperties",
|
|
8665
9645
|
"getHubspotManagedRules",
|
|
8666
9646
|
"getHubspotReconciliationMatches",
|
|
@@ -8702,10 +9682,12 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8702
9682
|
"getMemberLabelByUuid",
|
|
8703
9683
|
"getMemberLabels",
|
|
8704
9684
|
"getMemberMemories",
|
|
9685
|
+
"getMemberMemory",
|
|
8705
9686
|
"getMemberRecordCounts",
|
|
8706
9687
|
"getMemberRole",
|
|
8707
9688
|
"getMemberRoleByUuid",
|
|
8708
9689
|
"getMemberRoles",
|
|
9690
|
+
"getMemberSyncLinks",
|
|
8709
9691
|
"getMemberSyncSummary",
|
|
8710
9692
|
"getMemberUsage",
|
|
8711
9693
|
"getMembersMessageActivity",
|
|
@@ -8749,6 +9731,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8749
9731
|
"getPublicProducts",
|
|
8750
9732
|
"getQualification",
|
|
8751
9733
|
"getQualifications",
|
|
9734
|
+
"getRecordingInfo",
|
|
8752
9735
|
"getResellerWorkspaces",
|
|
8753
9736
|
"getRoutine",
|
|
8754
9737
|
"getRoutineRuns",
|
|
@@ -8803,17 +9786,17 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8803
9786
|
"getWorkflowAccessValidation",
|
|
8804
9787
|
"getWorkflowActivity",
|
|
8805
9788
|
"getWorkflowConfigValidation",
|
|
9789
|
+
"getWorkflowFeedback",
|
|
8806
9790
|
"getWorkflowContributors",
|
|
8807
9791
|
"getWorkflowDeletionPreview",
|
|
8808
9792
|
"getWorkflowDiagram",
|
|
8809
9793
|
"getWorkflowNotes",
|
|
9794
|
+
"getWorkflowRevision",
|
|
9795
|
+
"getWorkflowRevisions",
|
|
8810
9796
|
"getWorkflowRouteDryRun",
|
|
8811
9797
|
"getWorkflowTaskAssignmentStats",
|
|
8812
9798
|
"getWorkflowTemplates",
|
|
8813
9799
|
"getWorkflowThumbnailUrl",
|
|
8814
|
-
"getWorkflowVersion",
|
|
8815
|
-
"getWorkflowVersionActive",
|
|
8816
|
-
"getWorkflowVersions",
|
|
8817
9800
|
"getWorkflows",
|
|
8818
9801
|
"getWorkflowsActivityBatch",
|
|
8819
9802
|
"getWorkspace",
|
|
@@ -8827,6 +9810,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8827
9810
|
"getWorkspaceNotices",
|
|
8828
9811
|
"getWorkspaceProduct",
|
|
8829
9812
|
"getWorkspaceSiteDomains",
|
|
9813
|
+
"getWorkspaceWidgetDomains",
|
|
8830
9814
|
"getWorkspaceSubscriptions",
|
|
8831
9815
|
"getWorkspaceSupportRequest",
|
|
8832
9816
|
"getWorkspaceThemes",
|
|
@@ -8838,6 +9822,9 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8838
9822
|
"initiateCall",
|
|
8839
9823
|
"initiateOutboundCall",
|
|
8840
9824
|
"inspectPrompt",
|
|
9825
|
+
"installHubspot",
|
|
9826
|
+
"installMondayConnection",
|
|
9827
|
+
"installSalesforce",
|
|
8841
9828
|
"inviteMemberCredentialUpdate",
|
|
8842
9829
|
"inviteToWorkspace",
|
|
8843
9830
|
"leaveWorkspace",
|
|
@@ -8849,13 +9836,13 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8849
9836
|
"linkMemberToSalesforce",
|
|
8850
9837
|
"linkPhoneNumber",
|
|
8851
9838
|
"listAbilities",
|
|
8852
|
-
"listAgentAbilities",
|
|
8853
9839
|
"listAppConnections",
|
|
8854
9840
|
"listAvailableAppConnections",
|
|
8855
9841
|
"listConfluencePages",
|
|
8856
9842
|
"listConfluenceSpaces",
|
|
8857
9843
|
"listConnectionMemberFieldKeys",
|
|
8858
9844
|
"setDefaultGooglePlatformAccount",
|
|
9845
|
+
"listFileVersions",
|
|
8859
9846
|
"listGoogleCalendars",
|
|
8860
9847
|
"listHealthieAppointmentTypes",
|
|
8861
9848
|
"listHealthiePatients",
|
|
@@ -8865,20 +9852,24 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8865
9852
|
"listScenarios",
|
|
8866
9853
|
"listSnippets",
|
|
8867
9854
|
"listTestChatRuns",
|
|
9855
|
+
"listWidgetDomains",
|
|
8868
9856
|
"listWorkspaceInvitationsAdmin",
|
|
8869
9857
|
"listWorkspaceSupportRequests",
|
|
8870
9858
|
"markEmailAsRead",
|
|
8871
9859
|
"markEmailAsUnread",
|
|
8872
9860
|
"markNotificationAsRead",
|
|
9861
|
+
"previewImportMembers",
|
|
8873
9862
|
"previewImportWorkspace",
|
|
9863
|
+
"previewRoutineWorkflowAccess",
|
|
8874
9864
|
"previewSchedule",
|
|
8875
9865
|
"previewTTS",
|
|
8876
9866
|
"previewTemplate",
|
|
8877
9867
|
"previewThinkingSound",
|
|
8878
9868
|
"previewWorkspaceImport",
|
|
8879
9869
|
"provisionClientWorkspace",
|
|
8880
|
-
"
|
|
9870
|
+
"publishWorkflowRevision",
|
|
8881
9871
|
"rateMessage",
|
|
9872
|
+
"getChatFeedback",
|
|
8882
9873
|
"reenrollMember",
|
|
8883
9874
|
"registerLinkedRolesMetadata",
|
|
8884
9875
|
"registerPushSubscription",
|
|
@@ -8895,8 +9886,8 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8895
9886
|
"requestWorkspaceMembership",
|
|
8896
9887
|
"resetRoutineRuns",
|
|
8897
9888
|
"resolveAccessGrant",
|
|
8898
|
-
"resolveAgentTools",
|
|
8899
9889
|
"resolveAnonymousMember",
|
|
9890
|
+
"restoreFileVersion",
|
|
8900
9891
|
"revokeAccessGrant",
|
|
8901
9892
|
"revokeApiKey",
|
|
8902
9893
|
"revokeICalToken",
|
|
@@ -8962,6 +9953,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8962
9953
|
"updateCustomTool",
|
|
8963
9954
|
"updateCustomToolkit",
|
|
8964
9955
|
"updateDataRecord",
|
|
9956
|
+
"updateDataRecordFilter",
|
|
8965
9957
|
"updateDataType",
|
|
8966
9958
|
"updateDiscordBot",
|
|
8967
9959
|
"updateEventAttendee",
|
|
@@ -9014,12 +10006,13 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9014
10006
|
"updateWorkflow",
|
|
9015
10007
|
"updateWorkflowContributor",
|
|
9016
10008
|
"updateWorkflowNote",
|
|
9017
|
-
"
|
|
10009
|
+
"updateWorkflowRevisionMetadata",
|
|
9018
10010
|
"updateWorkspace",
|
|
9019
10011
|
"updateWorkspaceDefaults",
|
|
9020
10012
|
"updateWorkspaceInvitationAdmin",
|
|
9021
10013
|
"updateWorkspaceThemes",
|
|
9022
10014
|
"upsertDataRecord",
|
|
10015
|
+
"upsertWidgetDomain",
|
|
9023
10016
|
"validateDataTypeSlug",
|
|
9024
10017
|
"validateWorkflowName"
|
|
9025
10018
|
];
|
|
@@ -9051,6 +10044,7 @@ function bindAccessGrantsMethods(target, accessGrants) {
|
|
|
9051
10044
|
target.revokeAccessGrant = accessGrants.revokeAccessGrant.bind(accessGrants);
|
|
9052
10045
|
target.getAccessGrants = accessGrants.getAccessGrants.bind(accessGrants);
|
|
9053
10046
|
target.getMemberGrants = accessGrants.getMemberGrants.bind(accessGrants);
|
|
10047
|
+
target.getGranteeGrants = accessGrants.getGranteeGrants.bind(accessGrants);
|
|
9054
10048
|
}
|
|
9055
10049
|
|
|
9056
10050
|
// src/client/bindings/agent-tasks.ts
|
|
@@ -9070,8 +10064,6 @@ function bindAgentsMethods(target, agents) {
|
|
|
9070
10064
|
target.deleteAgent = agents.deleteAgent.bind(agents);
|
|
9071
10065
|
target.archiveAgent = agents.archiveAgent.bind(agents);
|
|
9072
10066
|
target.unarchiveAgent = agents.unarchiveAgent.bind(agents);
|
|
9073
|
-
target.resolveAgentTools = agents.resolveAgentTools.bind(agents);
|
|
9074
|
-
target.listAgentAbilities = agents.listAgentAbilities.bind(agents);
|
|
9075
10067
|
}
|
|
9076
10068
|
|
|
9077
10069
|
// src/client/bindings/tasks.ts
|
|
@@ -9090,12 +10082,15 @@ function bindTasksMethods(target, tasks, abilities) {
|
|
|
9090
10082
|
target.createAbility = abilities.createAbility.bind(abilities);
|
|
9091
10083
|
target.updateAbility = abilities.updateAbility.bind(abilities);
|
|
9092
10084
|
target.deleteAbility = abilities.deleteAbility.bind(abilities);
|
|
10085
|
+
target.getCharlestonTestDeliveryRecipients = abilities.getCharlestonTestDeliveryRecipients.bind(abilities);
|
|
9093
10086
|
}
|
|
9094
10087
|
|
|
9095
10088
|
// src/client/bindings/chats.ts
|
|
9096
10089
|
function bindChatsMethods(target, chats) {
|
|
9097
10090
|
target.getChats = chats.getChats.bind(chats);
|
|
9098
10091
|
target.getChat = chats.getChat.bind(chats);
|
|
10092
|
+
target.getChatCallbacks = chats.getChatCallbacks.bind(chats);
|
|
10093
|
+
target.cancelChatCallback = chats.cancelChatCallback.bind(chats);
|
|
9099
10094
|
target.getChatTokenUsage = chats.getChatTokenUsage.bind(chats);
|
|
9100
10095
|
target.getChatTodos = chats.getChatTodos.bind(chats);
|
|
9101
10096
|
target.getChatSkills = chats.getChatSkills.bind(chats);
|
|
@@ -9108,6 +10103,8 @@ function bindChatsMethods(target, chats) {
|
|
|
9108
10103
|
target.createWorkflowOutboundVoiceChat = chats.createWorkflowOutboundVoiceChat.bind(chats);
|
|
9109
10104
|
target.deleteChat = chats.deleteChat.bind(chats);
|
|
9110
10105
|
target.updateChat = chats.updateChat.bind(chats);
|
|
10106
|
+
target.getChatModelOverride = chats.getChatModelOverride.bind(chats);
|
|
10107
|
+
target.updateChatModelOverride = chats.updateChatModelOverride.bind(chats);
|
|
9111
10108
|
target.updateChatMute = chats.updateChatMute.bind(chats);
|
|
9112
10109
|
target.updateChatNeedsResponse = chats.updateChatNeedsResponse.bind(chats);
|
|
9113
10110
|
target.summarizeChat = chats.summarizeChat.bind(chats);
|
|
@@ -9117,6 +10114,7 @@ function bindChatsMethods(target, chats) {
|
|
|
9117
10114
|
target.initiateOutboundCall = chats.initiateOutboundCall.bind(chats);
|
|
9118
10115
|
target.sendAssistantMessage = chats.sendAssistantMessage.bind(chats);
|
|
9119
10116
|
target.rateMessage = chats.rateMessage.bind(chats);
|
|
10117
|
+
target.getChatFeedback = chats.getChatFeedback.bind(chats);
|
|
9120
10118
|
target.getChatAssignmentTasks = chats.getChatAssignmentTasks.bind(chats);
|
|
9121
10119
|
target.createChatCompletion = chats.createChatCompletion.bind(chats);
|
|
9122
10120
|
target.exportChats = chats.exportChats.bind(chats);
|
|
@@ -9145,9 +10143,28 @@ function bindCallsMethods(target, calls, cel) {
|
|
|
9145
10143
|
target.initiateCall = calls.initiateCall.bind(calls);
|
|
9146
10144
|
target.getVoiceToken = calls.getVoiceToken.bind(calls);
|
|
9147
10145
|
target.getMessageTiming = calls.getMessageTiming.bind(calls);
|
|
10146
|
+
target.getRecordingInfo = calls.getRecordingInfo.bind(calls);
|
|
10147
|
+
target.listChatRecordings = calls.listChatRecordings.bind(calls);
|
|
10148
|
+
target.getCallRecordingDownloadUrl = calls.getCallRecordingDownloadUrl.bind(calls);
|
|
9148
10149
|
target.getCelContext = cel.getCelContext.bind(cel);
|
|
9149
10150
|
}
|
|
9150
10151
|
|
|
10152
|
+
// src/client/bindings/dashboards.ts
|
|
10153
|
+
function bindDashboardsMethods(target, dashboards) {
|
|
10154
|
+
target.getDashboards = dashboards.getDashboards.bind(dashboards);
|
|
10155
|
+
target.getDashboard = dashboards.getDashboard.bind(dashboards);
|
|
10156
|
+
target.createDashboard = dashboards.createDashboard.bind(dashboards);
|
|
10157
|
+
target.updateDashboard = dashboards.updateDashboard.bind(dashboards);
|
|
10158
|
+
target.deleteDashboard = dashboards.deleteDashboard.bind(dashboards);
|
|
10159
|
+
target.getDashboardChannelStats = dashboards.getDashboardChannelStats.bind(dashboards);
|
|
10160
|
+
target.getDashboardWorkflowAssignmentStats = dashboards.getDashboardWorkflowAssignmentStats.bind(dashboards);
|
|
10161
|
+
}
|
|
10162
|
+
|
|
10163
|
+
// src/client/bindings/motd.ts
|
|
10164
|
+
function bindMotdMethods(target, motd) {
|
|
10165
|
+
target.getMotd = motd.getMotd.bind(motd);
|
|
10166
|
+
}
|
|
10167
|
+
|
|
9151
10168
|
// src/client/bindings/data-types.ts
|
|
9152
10169
|
function bindDataTypesMethods(target, dataTypes) {
|
|
9153
10170
|
target.getDataTypes = dataTypes.getDataTypes.bind(dataTypes);
|
|
@@ -9171,6 +10188,12 @@ function bindDataTypesMethods(target, dataTypes) {
|
|
|
9171
10188
|
target.getFieldIndexStatus = dataTypes.getFieldIndexStatus.bind(dataTypes);
|
|
9172
10189
|
target.validateDataTypeSlug = dataTypes.validateDataTypeSlug.bind(dataTypes);
|
|
9173
10190
|
target.getMemberRecordCounts = dataTypes.getMemberRecordCounts.bind(dataTypes);
|
|
10191
|
+
target.getDataRecordFilters = dataTypes.getDataRecordFilters.bind(dataTypes);
|
|
10192
|
+
target.getDataRecordFilter = dataTypes.getDataRecordFilter.bind(dataTypes);
|
|
10193
|
+
target.createDataRecordFilter = dataTypes.createDataRecordFilter.bind(dataTypes);
|
|
10194
|
+
target.updateDataRecordFilter = dataTypes.updateDataRecordFilter.bind(dataTypes);
|
|
10195
|
+
target.deleteDataRecordFilter = dataTypes.deleteDataRecordFilter.bind(dataTypes);
|
|
10196
|
+
target.getDataRecordFilterCount = dataTypes.getDataRecordFilterCount.bind(dataTypes);
|
|
9174
10197
|
}
|
|
9175
10198
|
|
|
9176
10199
|
// src/client/bindings/members.ts
|
|
@@ -9187,6 +10210,9 @@ function bindMembersMethods(target, members) {
|
|
|
9187
10210
|
target.deleteMember = members.deleteMember.bind(members);
|
|
9188
10211
|
target.archiveMember = members.archiveMember.bind(members);
|
|
9189
10212
|
target.unarchiveMember = members.unarchiveMember.bind(members);
|
|
10213
|
+
target.sendMemberPhoneConfirmation = members.sendMemberPhoneConfirmation.bind(members);
|
|
10214
|
+
target.bulkCreateMembers = members.bulkCreateMembers.bind(members);
|
|
10215
|
+
target.previewImportMembers = members.previewImportMembers.bind(members);
|
|
9190
10216
|
target.importMembers = members.importMembers.bind(members);
|
|
9191
10217
|
target.exportMembers = members.exportMembers.bind(members);
|
|
9192
10218
|
target.getMembersMessageActivity = members.getMembersMessageActivity.bind(members);
|
|
@@ -9221,8 +10247,10 @@ function bindMembersMethods(target, members) {
|
|
|
9221
10247
|
target.resolveAnonymousMember = members.resolveAnonymousMember.bind(members);
|
|
9222
10248
|
target.expireAnonymousMember = members.expireAnonymousMember.bind(members);
|
|
9223
10249
|
target.getMemberMemories = members.getMemberMemories.bind(members);
|
|
10250
|
+
target.getMemberMemory = members.getMemberMemory.bind(members);
|
|
9224
10251
|
target.createMemberMemory = members.createMemberMemory.bind(members);
|
|
9225
10252
|
target.deleteMemberMemory = members.deleteMemberMemory.bind(members);
|
|
10253
|
+
target.getMemberSyncLinks = members.getMemberSyncLinks.bind(members);
|
|
9226
10254
|
}
|
|
9227
10255
|
|
|
9228
10256
|
// src/client/bindings/workspaces.ts
|
|
@@ -9277,6 +10305,10 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
|
|
|
9277
10305
|
target.listPushSubscriptions = workspaces.listPushSubscriptions.bind(workspaces);
|
|
9278
10306
|
target.getWorkspaceEmailDomains = workspaces.getWorkspaceEmailDomains.bind(workspaces);
|
|
9279
10307
|
target.getWorkspaceSiteDomains = workspaces.getWorkspaceSiteDomains.bind(workspaces);
|
|
10308
|
+
target.getWorkspaceWidgetDomains = workspaces.getWorkspaceWidgetDomains.bind(workspaces);
|
|
10309
|
+
target.listWidgetDomains = workspaces.listWidgetDomains.bind(workspaces);
|
|
10310
|
+
target.upsertWidgetDomain = workspaces.upsertWidgetDomain.bind(workspaces);
|
|
10311
|
+
target.deleteWidgetDomain = workspaces.deleteWidgetDomain.bind(workspaces);
|
|
9280
10312
|
target.listWorkspaceInvitations = signupRequests.listWorkspaceInvitations.bind(signupRequests);
|
|
9281
10313
|
target.listWorkspaceInvitationsAdmin = signupRequests.listWorkspaceInvitationsAdmin.bind(signupRequests);
|
|
9282
10314
|
target.getWorkspaceInvitation = signupRequests.getWorkspaceInvitation.bind(signupRequests);
|
|
@@ -9296,6 +10328,7 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
|
|
|
9296
10328
|
function bindAuthMethods(target, auth, assignments) {
|
|
9297
10329
|
target.getUserAccount = auth.getUserAccount.bind(auth);
|
|
9298
10330
|
target.updateUserAccount = auth.updateUserAccount.bind(auth);
|
|
10331
|
+
target.recordAcquisition = auth.recordAcquisition.bind(auth);
|
|
9299
10332
|
target.login = auth.login.bind(auth);
|
|
9300
10333
|
target.resendCode = auth.resendCode.bind(auth);
|
|
9301
10334
|
target.verifyCodeWith2FA = auth.verifyCodeWith2FA.bind(auth);
|
|
@@ -9356,6 +10389,19 @@ function bindSitesMethods(target, sites) {
|
|
|
9356
10389
|
target.checkSiteSlugAvailability = sites.checkSiteSlugAvailability.bind(sites);
|
|
9357
10390
|
target.checkSiteDomainAvailability = sites.checkSiteDomainAvailability.bind(sites);
|
|
9358
10391
|
target.getSite = sites.getSite.bind(sites);
|
|
10392
|
+
target.getSiteSharing = sites.getSiteSharing.bind(sites);
|
|
10393
|
+
target.updateSiteSharing = sites.updateSiteSharing.bind(sites);
|
|
10394
|
+
target.getSiteSource = sites.getSiteSource.bind(sites);
|
|
10395
|
+
target.getSiteSourceTemplates = sites.getSiteSourceTemplates.bind(sites);
|
|
10396
|
+
target.createSiteSource = sites.createSiteSource.bind(sites);
|
|
10397
|
+
target.buildSiteSource = sites.buildSiteSource.bind(sites);
|
|
10398
|
+
target.publishSiteSource = sites.publishSiteSource.bind(sites);
|
|
10399
|
+
target.resetSiteSource = sites.resetSiteSource.bind(sites);
|
|
10400
|
+
target.rollbackSiteSource = sites.rollbackSiteSource.bind(sites);
|
|
10401
|
+
target.downloadSiteSourceZip = sites.downloadSiteSourceZip.bind(sites);
|
|
10402
|
+
target.importSiteSourceZip = sites.importSiteSourceZip.bind(sites);
|
|
10403
|
+
target.getThemeSettings = sites.getThemeSettings.bind(sites);
|
|
10404
|
+
target.updateThemeSettings = sites.updateThemeSettings.bind(sites);
|
|
9359
10405
|
target.getSiteByUuid = sites.getSiteByUuid.bind(sites);
|
|
9360
10406
|
target.getSiteRenderedPage = sites.getSiteRenderedPage.bind(sites);
|
|
9361
10407
|
target.getSiteRenderedMenu = sites.getSiteRenderedMenu.bind(sites);
|
|
@@ -9388,10 +10434,16 @@ function bindSitesMethods(target, sites) {
|
|
|
9388
10434
|
function bindFilesMethods(target, files) {
|
|
9389
10435
|
target.getFiles = files.getFiles.bind(files);
|
|
9390
10436
|
target.getFile = files.getFile.bind(files);
|
|
10437
|
+
target.downloadFilesZip = files.downloadFilesZip.bind(files);
|
|
9391
10438
|
target.createFile = files.createFile.bind(files);
|
|
9392
10439
|
target.uploadFile = files.uploadFile.bind(files);
|
|
9393
10440
|
target.updateFile = files.updateFile.bind(files);
|
|
9394
10441
|
target.deleteFile = files.deleteFile.bind(files);
|
|
10442
|
+
target.resolveFilePath = files.resolveFilePath.bind(files);
|
|
10443
|
+
target.listFileVersions = files.listFileVersions.bind(files);
|
|
10444
|
+
target.getFileVersionDiff = files.getFileVersionDiff.bind(files);
|
|
10445
|
+
target.restoreFileVersion = files.restoreFileVersion.bind(files);
|
|
10446
|
+
target.getFileVersionContentsUrl = files.getFileVersionContentsUrl.bind(files);
|
|
9395
10447
|
target.convertFile = files.convertFile.bind(files);
|
|
9396
10448
|
target.generateFileUploadUrl = files.generateFileUploadUrl.bind(files);
|
|
9397
10449
|
target.getFolders = files.getFolders.bind(files);
|
|
@@ -9429,6 +10481,7 @@ function bindEventsMethods(target, events) {
|
|
|
9429
10481
|
target.createEventRule = events.createEventRule.bind(events);
|
|
9430
10482
|
target.updateEventRule = events.updateEventRule.bind(events);
|
|
9431
10483
|
target.deleteEventRule = events.deleteEventRule.bind(events);
|
|
10484
|
+
target.testWebhook = events.testWebhook.bind(events);
|
|
9432
10485
|
target.reorderEventRules = events.reorderEventRules.bind(events);
|
|
9433
10486
|
target.getWebhookLogs = events.getWebhookLogs.bind(events);
|
|
9434
10487
|
target.getRuleExecutions = events.getRuleExecutions.bind(events);
|
|
@@ -9441,6 +10494,7 @@ function bindEventsMethods(target, events) {
|
|
|
9441
10494
|
target.getRoutineRuns = events.getRoutineRuns.bind(events);
|
|
9442
10495
|
target.resetRoutineRuns = events.resetRoutineRuns.bind(events);
|
|
9443
10496
|
target.previewSchedule = events.previewSchedule.bind(events);
|
|
10497
|
+
target.previewRoutineWorkflowAccess = events.previewRoutineWorkflowAccess.bind(events);
|
|
9444
10498
|
}
|
|
9445
10499
|
|
|
9446
10500
|
// src/client/bindings/experiments.ts
|
|
@@ -9485,18 +10539,18 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
|
|
|
9485
10539
|
target.createWorkflowNote = workflowNotes.createWorkflowNote.bind(workflowNotes);
|
|
9486
10540
|
target.updateWorkflowNote = workflowNotes.updateWorkflowNote.bind(workflowNotes);
|
|
9487
10541
|
target.deleteWorkflowNote = workflowNotes.deleteWorkflowNote.bind(workflowNotes);
|
|
10542
|
+
target.getWorkflowFeedback = workflows.getWorkflowFeedback.bind(workflows);
|
|
9488
10543
|
target.getWorkflowContributors = workflows.getWorkflowContributors.bind(workflows);
|
|
9489
10544
|
target.createWorkflowContributor = workflows.createWorkflowContributor.bind(workflows);
|
|
9490
10545
|
target.updateWorkflowContributor = workflows.updateWorkflowContributor.bind(workflows);
|
|
9491
10546
|
target.deleteWorkflowContributor = workflows.deleteWorkflowContributor.bind(workflows);
|
|
9492
|
-
target.
|
|
9493
|
-
target.
|
|
9494
|
-
target.
|
|
9495
|
-
target.
|
|
9496
|
-
target.
|
|
9497
|
-
target.
|
|
9498
|
-
target.
|
|
9499
|
-
target.diffWorkflowVersions = workflows.diffWorkflowVersions.bind(workflows);
|
|
10547
|
+
target.getWorkflowRevisions = workflows.getWorkflowRevisions.bind(workflows);
|
|
10548
|
+
target.getWorkflowRevision = workflows.getWorkflowRevision.bind(workflows);
|
|
10549
|
+
target.publishWorkflowRevision = workflows.publishWorkflowRevision.bind(workflows);
|
|
10550
|
+
target.activateWorkflowRevision = workflows.activateWorkflowRevision.bind(workflows);
|
|
10551
|
+
target.updateWorkflowRevisionMetadata = workflows.updateWorkflowRevisionMetadata.bind(workflows);
|
|
10552
|
+
target.diffWorkflowRevisions = workflows.diffWorkflowRevisions.bind(workflows);
|
|
10553
|
+
target.editWorkflowRevisionAsDraft = workflows.editWorkflowRevisionAsDraft.bind(workflows);
|
|
9500
10554
|
target.getWorkspaceBuilders = workflows.getWorkspaceBuilders.bind(workflows);
|
|
9501
10555
|
target.getWorkspaceBuilder = workflows.getWorkspaceBuilder.bind(workflows);
|
|
9502
10556
|
target.buildWorkspace = workflows.buildWorkspace.bind(workflows);
|
|
@@ -9561,6 +10615,9 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
|
|
|
9561
10615
|
target.getArchiveBlockers = phoneNumbers.getArchiveBlockers.bind(phoneNumbers);
|
|
9562
10616
|
target.archivePhoneNumber = phoneNumbers.archivePhoneNumber.bind(phoneNumbers);
|
|
9563
10617
|
target.getPhoneNumberCalls = phoneNumbers.getPhoneNumberCalls.bind(phoneNumbers);
|
|
10618
|
+
target.getPhoneNumberOutboundAnalyticsSummary = phoneNumbers.getPhoneNumberOutboundAnalyticsSummary.bind(phoneNumbers);
|
|
10619
|
+
target.getPhoneNumberOutboundAnalyticsCalls = phoneNumbers.getPhoneNumberOutboundAnalyticsCalls.bind(phoneNumbers);
|
|
10620
|
+
target.exportPhoneNumberOutboundAnalyticsCsv = phoneNumbers.exportPhoneNumberOutboundAnalyticsCsv.bind(phoneNumbers);
|
|
9564
10621
|
target.getPhoneNumberMessages = phoneNumbers.getPhoneNumberMessages.bind(phoneNumbers);
|
|
9565
10622
|
target.getPhoneNumberVoicemails = phoneNumbers.getPhoneNumberVoicemails.bind(phoneNumbers);
|
|
9566
10623
|
target.fetchVoicemailAudio = phoneNumbers.fetchVoicemailAudio.bind(phoneNumbers);
|
|
@@ -9679,16 +10736,18 @@ function bindAppsMethods(target, apps, builders, inquiries, oauth, oauthConnecti
|
|
|
9679
10736
|
target.exchangeOAuthToken = oauth.exchangeOAuthToken.bind(oauth);
|
|
9680
10737
|
target.getAvailableScopes = oauth.getAvailableScopes.bind(oauth);
|
|
9681
10738
|
target.getOAuthConnectionStatus = oauthConnections.getConnectionStatus.bind(oauthConnections);
|
|
10739
|
+
target.listOAuthAccounts = oauthConnections.listAccounts.bind(oauthConnections);
|
|
9682
10740
|
target.getOAuthAuthorizationUrl = oauthConnections.getAuthorizationUrl.bind(oauthConnections);
|
|
9683
10741
|
target.disconnectOAuthProvider = oauthConnections.disconnect.bind(oauthConnections);
|
|
9684
10742
|
}
|
|
9685
10743
|
|
|
9686
10744
|
// src/client/bindings/integrations.ts
|
|
9687
|
-
function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackApps, teamsApps, fhirConnections, healthie, salesforce, hubspot, appConnections, connectionSync, confluence) {
|
|
10745
|
+
function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackApps, teamsApps, fhirConnections, patientSyncConnections, healthie, salesforce, hubspot, appConnections, connectionSync, confluence) {
|
|
9688
10746
|
target.getMondayBoards = mondayIntegration.getBoards.bind(mondayIntegration);
|
|
9689
10747
|
target.getMondayBoardColumns = mondayIntegration.getBoardColumns.bind(mondayIntegration);
|
|
9690
10748
|
target.getMondayBoardGroups = mondayIntegration.getBoardGroups.bind(mondayIntegration);
|
|
9691
10749
|
target.getMondayCurrentUserInfo = mondayIntegration.getCurrentUserInfo.bind(mondayIntegration);
|
|
10750
|
+
target.installMondayConnection = mondayIntegration.installMondayConnection.bind(mondayIntegration);
|
|
9692
10751
|
target.configureMondayConnection = mondayIntegration.configureMondayConnection.bind(mondayIntegration);
|
|
9693
10752
|
target.getMondayConnectionStatus = mondayIntegration.getMondayConnectionStatus.bind(mondayIntegration);
|
|
9694
10753
|
target.authorizeMondayConnection = mondayIntegration.authorizeMondayConnection.bind(mondayIntegration);
|
|
@@ -9723,6 +10782,8 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
9723
10782
|
target.getDiscordBotAccounts = discordBots.getDiscordBotAccounts.bind(discordBots);
|
|
9724
10783
|
target.getMyCredentials = discordBots.getMyCredentials.bind(discordBots);
|
|
9725
10784
|
target.unlinkCredential = discordBots.unlinkCredential.bind(discordBots);
|
|
10785
|
+
target.completeDiscordLink = discordBots.completeDiscordLink.bind(discordBots);
|
|
10786
|
+
target.discordLinkPreflight = discordBots.discordLinkPreflight.bind(discordBots);
|
|
9726
10787
|
target.getSlackApps = slackApps.getSlackApps.bind(slackApps);
|
|
9727
10788
|
target.getSlackApp = slackApps.getSlackApp.bind(slackApps);
|
|
9728
10789
|
target.createSlackApp = slackApps.createSlackApp.bind(slackApps);
|
|
@@ -9769,6 +10830,9 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
9769
10830
|
target.fhirGetEncounterSyncRuns = fhirConnections.fhirGetEncounterSyncRuns.bind(fhirConnections);
|
|
9770
10831
|
target.fhirRefreshEncounterPatient = fhirConnections.fhirRefreshEncounterPatient.bind(fhirConnections);
|
|
9771
10832
|
target.fhirBackfillEncounterSync = fhirConnections.fhirBackfillEncounterSync.bind(fhirConnections);
|
|
10833
|
+
target.configurePatientSync = patientSyncConnections.configurePatientSync.bind(patientSyncConnections);
|
|
10834
|
+
target.getPatientSyncStatus = patientSyncConnections.getPatientSyncStatus.bind(patientSyncConnections);
|
|
10835
|
+
target.deletePatientSyncConnection = patientSyncConnections.deletePatientSyncConnection.bind(patientSyncConnections);
|
|
9772
10836
|
target.configureHealthie = healthie.configureHealthie.bind(healthie);
|
|
9773
10837
|
target.getHealthieStatus = healthie.getHealthieStatus.bind(healthie);
|
|
9774
10838
|
target.listHealthieProviders = healthie.listHealthieProviders.bind(healthie);
|
|
@@ -9792,6 +10856,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
9792
10856
|
target.deleteConfluence = confluence.deleteConfluence.bind(confluence);
|
|
9793
10857
|
target.listConfluenceSpaces = confluence.listConfluenceSpaces.bind(confluence);
|
|
9794
10858
|
target.listConfluencePages = confluence.listConfluencePages.bind(confluence);
|
|
10859
|
+
target.installSalesforce = salesforce.installSalesforce.bind(salesforce);
|
|
9795
10860
|
target.configureSalesforce = salesforce.configureSalesforce.bind(salesforce);
|
|
9796
10861
|
target.startSalesforceOAuth = salesforce.startSalesforceOAuth.bind(salesforce);
|
|
9797
10862
|
target.getSalesforceStatus = salesforce.getSalesforceStatus.bind(salesforce);
|
|
@@ -9809,6 +10874,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
9809
10874
|
target.describeSalesforceObject = salesforce.describeSalesforceObject.bind(salesforce);
|
|
9810
10875
|
target.searchSalesforceRecords = salesforce.searchSalesforceRecords.bind(salesforce);
|
|
9811
10876
|
target.importSalesforceMembers = salesforce.importSalesforceMembers.bind(salesforce);
|
|
10877
|
+
target.installHubspot = hubspot.installHubspot.bind(hubspot);
|
|
9812
10878
|
target.configureHubspot = hubspot.configureHubspot.bind(hubspot);
|
|
9813
10879
|
target.startHubspotOAuth = hubspot.startHubspotOAuth.bind(hubspot);
|
|
9814
10880
|
target.getHubspotStatus = hubspot.getHubspotStatus.bind(hubspot);
|
|
@@ -9962,6 +11028,14 @@ function bindPersonasMethods(target, personas) {
|
|
|
9962
11028
|
target.deletePersona = personas.deletePersona.bind(personas);
|
|
9963
11029
|
}
|
|
9964
11030
|
|
|
11031
|
+
// src/client/bindings/queries.ts
|
|
11032
|
+
function bindQueriesMethods(target, queries) {
|
|
11033
|
+
target.getQueryFields = queries.getQueryFields.bind(queries);
|
|
11034
|
+
target.validateQuery = queries.validateQuery.bind(queries);
|
|
11035
|
+
target.previewQuery = queries.previewQuery.bind(queries);
|
|
11036
|
+
target.runQuery = queries.runQuery.bind(queries);
|
|
11037
|
+
}
|
|
11038
|
+
|
|
9965
11039
|
// src/client/bindings/customers.ts
|
|
9966
11040
|
function bindCustomersMethods(target, customers) {
|
|
9967
11041
|
target.getMyCustomers = customers.getMyCustomers.bind(customers);
|
|
@@ -10008,6 +11082,7 @@ function bindSupportRequestMethods(target, supportRequests) {
|
|
|
10008
11082
|
target.createWorkspaceSupportRequest = supportRequests.createWorkspaceSupportRequest.bind(supportRequests);
|
|
10009
11083
|
target.commentOnWorkspaceSupportRequest = supportRequests.commentOnWorkspaceSupportRequest.bind(supportRequests);
|
|
10010
11084
|
target.closeWorkspaceSupportRequest = supportRequests.closeWorkspaceSupportRequest.bind(supportRequests);
|
|
11085
|
+
target.reopenWorkspaceSupportRequest = supportRequests.reopenWorkspaceSupportRequest.bind(supportRequests);
|
|
10011
11086
|
target.clickWorkspaceSupportRequestResource = supportRequests.clickWorkspaceSupportRequestResource.bind(supportRequests);
|
|
10012
11087
|
}
|
|
10013
11088
|
|
|
@@ -10032,9 +11107,12 @@ var GravityRailClient = class {
|
|
|
10032
11107
|
createAbility;
|
|
10033
11108
|
updateAbility;
|
|
10034
11109
|
deleteAbility;
|
|
11110
|
+
getCharlestonTestDeliveryRecipients;
|
|
10035
11111
|
// Chats API
|
|
10036
11112
|
getChats;
|
|
10037
11113
|
getChat;
|
|
11114
|
+
getChatCallbacks;
|
|
11115
|
+
cancelChatCallback;
|
|
10038
11116
|
getChatTokenUsage;
|
|
10039
11117
|
getChatTodos;
|
|
10040
11118
|
getChatSkills;
|
|
@@ -10047,6 +11125,8 @@ var GravityRailClient = class {
|
|
|
10047
11125
|
createWorkflowOutboundVoiceChat;
|
|
10048
11126
|
deleteChat;
|
|
10049
11127
|
updateChat;
|
|
11128
|
+
getChatModelOverride;
|
|
11129
|
+
updateChatModelOverride;
|
|
10050
11130
|
updateChatMute;
|
|
10051
11131
|
updateChatNeedsResponse;
|
|
10052
11132
|
summarizeChat;
|
|
@@ -10056,6 +11136,7 @@ var GravityRailClient = class {
|
|
|
10056
11136
|
initiateOutboundCall;
|
|
10057
11137
|
sendAssistantMessage;
|
|
10058
11138
|
rateMessage;
|
|
11139
|
+
getChatFeedback;
|
|
10059
11140
|
getChatAssignmentTasks;
|
|
10060
11141
|
createChatCompletion;
|
|
10061
11142
|
exportChats;
|
|
@@ -10081,6 +11162,9 @@ var GravityRailClient = class {
|
|
|
10081
11162
|
initiateCall;
|
|
10082
11163
|
getVoiceToken;
|
|
10083
11164
|
getMessageTiming;
|
|
11165
|
+
getRecordingInfo;
|
|
11166
|
+
listChatRecordings;
|
|
11167
|
+
getCallRecordingDownloadUrl;
|
|
10084
11168
|
getCelContext;
|
|
10085
11169
|
// Data Types API
|
|
10086
11170
|
getDataTypes;
|
|
@@ -10104,6 +11188,12 @@ var GravityRailClient = class {
|
|
|
10104
11188
|
getFieldIndexStatus;
|
|
10105
11189
|
validateDataTypeSlug;
|
|
10106
11190
|
getMemberRecordCounts;
|
|
11191
|
+
getDataRecordFilters;
|
|
11192
|
+
getDataRecordFilter;
|
|
11193
|
+
createDataRecordFilter;
|
|
11194
|
+
updateDataRecordFilter;
|
|
11195
|
+
deleteDataRecordFilter;
|
|
11196
|
+
getDataRecordFilterCount;
|
|
10107
11197
|
// Members API
|
|
10108
11198
|
getCurrentMember;
|
|
10109
11199
|
getOwnedMembers;
|
|
@@ -10117,6 +11207,9 @@ var GravityRailClient = class {
|
|
|
10117
11207
|
deleteMember;
|
|
10118
11208
|
archiveMember;
|
|
10119
11209
|
unarchiveMember;
|
|
11210
|
+
sendMemberPhoneConfirmation;
|
|
11211
|
+
bulkCreateMembers;
|
|
11212
|
+
previewImportMembers;
|
|
10120
11213
|
importMembers;
|
|
10121
11214
|
exportMembers;
|
|
10122
11215
|
getMembersMessageActivity;
|
|
@@ -10155,8 +11248,11 @@ var GravityRailClient = class {
|
|
|
10155
11248
|
expireAnonymousMember;
|
|
10156
11249
|
// Member Memories
|
|
10157
11250
|
getMemberMemories;
|
|
11251
|
+
getMemberMemory;
|
|
10158
11252
|
createMemberMemory;
|
|
10159
11253
|
deleteMemberMemory;
|
|
11254
|
+
// Member Sync Links
|
|
11255
|
+
getMemberSyncLinks;
|
|
10160
11256
|
// Agent Tasks API (operator-facing async sub-agent inspection/cancel)
|
|
10161
11257
|
getAgentTasks;
|
|
10162
11258
|
getAgentTask;
|
|
@@ -10170,8 +11266,6 @@ var GravityRailClient = class {
|
|
|
10170
11266
|
deleteAgent;
|
|
10171
11267
|
archiveAgent;
|
|
10172
11268
|
unarchiveAgent;
|
|
10173
|
-
resolveAgentTools;
|
|
10174
|
-
listAgentAbilities;
|
|
10175
11269
|
// Qualifications API
|
|
10176
11270
|
getQualifications;
|
|
10177
11271
|
getQualification;
|
|
@@ -10187,11 +11281,26 @@ var GravityRailClient = class {
|
|
|
10187
11281
|
evaluateTestChatRun;
|
|
10188
11282
|
endTestChatRun;
|
|
10189
11283
|
// Personas API (workspace-scoped test-identity templates)
|
|
11284
|
+
// Unified Query Engine
|
|
11285
|
+
getQueryFields;
|
|
11286
|
+
validateQuery;
|
|
11287
|
+
previewQuery;
|
|
11288
|
+
runQuery;
|
|
10190
11289
|
listPersonas;
|
|
10191
11290
|
getPersona;
|
|
10192
11291
|
createPersona;
|
|
10193
11292
|
updatePersona;
|
|
10194
11293
|
deletePersona;
|
|
11294
|
+
// Dashboards API
|
|
11295
|
+
getDashboards;
|
|
11296
|
+
getDashboard;
|
|
11297
|
+
createDashboard;
|
|
11298
|
+
updateDashboard;
|
|
11299
|
+
deleteDashboard;
|
|
11300
|
+
getDashboardChannelStats;
|
|
11301
|
+
getDashboardWorkflowAssignmentStats;
|
|
11302
|
+
// MOTD API
|
|
11303
|
+
getMotd;
|
|
10195
11304
|
// Journeys API
|
|
10196
11305
|
getJourneys;
|
|
10197
11306
|
getJourney;
|
|
@@ -10259,6 +11368,7 @@ var GravityRailClient = class {
|
|
|
10259
11368
|
revokeAccessGrant;
|
|
10260
11369
|
getAccessGrants;
|
|
10261
11370
|
getMemberGrants;
|
|
11371
|
+
getGranteeGrants;
|
|
10262
11372
|
// Prompts API
|
|
10263
11373
|
inspectPrompt;
|
|
10264
11374
|
// Workspaces API
|
|
@@ -10308,6 +11418,10 @@ var GravityRailClient = class {
|
|
|
10308
11418
|
getUsageDashboard;
|
|
10309
11419
|
getWorkspaceEmailDomains;
|
|
10310
11420
|
getWorkspaceSiteDomains;
|
|
11421
|
+
getWorkspaceWidgetDomains;
|
|
11422
|
+
listWidgetDomains;
|
|
11423
|
+
upsertWidgetDomain;
|
|
11424
|
+
deleteWidgetDomain;
|
|
10311
11425
|
// Org API
|
|
10312
11426
|
listOrgDomains;
|
|
10313
11427
|
registerOrgDomain;
|
|
@@ -10348,6 +11462,7 @@ var GravityRailClient = class {
|
|
|
10348
11462
|
// Auth API
|
|
10349
11463
|
getUserAccount;
|
|
10350
11464
|
updateUserAccount;
|
|
11465
|
+
recordAcquisition;
|
|
10351
11466
|
login;
|
|
10352
11467
|
resendCode;
|
|
10353
11468
|
verifyCodeWith2FA;
|
|
@@ -10405,6 +11520,19 @@ var GravityRailClient = class {
|
|
|
10405
11520
|
checkSiteSlugAvailability;
|
|
10406
11521
|
checkSiteDomainAvailability;
|
|
10407
11522
|
getSite;
|
|
11523
|
+
getSiteSharing;
|
|
11524
|
+
updateSiteSharing;
|
|
11525
|
+
getSiteSource;
|
|
11526
|
+
getSiteSourceTemplates;
|
|
11527
|
+
createSiteSource;
|
|
11528
|
+
buildSiteSource;
|
|
11529
|
+
publishSiteSource;
|
|
11530
|
+
resetSiteSource;
|
|
11531
|
+
rollbackSiteSource;
|
|
11532
|
+
downloadSiteSourceZip;
|
|
11533
|
+
importSiteSourceZip;
|
|
11534
|
+
getThemeSettings;
|
|
11535
|
+
updateThemeSettings;
|
|
10408
11536
|
getSiteByUuid;
|
|
10409
11537
|
getSiteRenderedPage;
|
|
10410
11538
|
getSiteRenderedMenu;
|
|
@@ -10434,10 +11562,16 @@ var GravityRailClient = class {
|
|
|
10434
11562
|
// Files API
|
|
10435
11563
|
getFiles;
|
|
10436
11564
|
getFile;
|
|
11565
|
+
resolveFilePath;
|
|
11566
|
+
downloadFilesZip;
|
|
10437
11567
|
createFile;
|
|
10438
11568
|
uploadFile;
|
|
10439
11569
|
updateFile;
|
|
10440
11570
|
deleteFile;
|
|
11571
|
+
listFileVersions;
|
|
11572
|
+
getFileVersionDiff;
|
|
11573
|
+
restoreFileVersion;
|
|
11574
|
+
getFileVersionContentsUrl;
|
|
10441
11575
|
convertFile;
|
|
10442
11576
|
generateFileUploadUrl;
|
|
10443
11577
|
getFolders;
|
|
@@ -10473,6 +11607,7 @@ var GravityRailClient = class {
|
|
|
10473
11607
|
createEventRule;
|
|
10474
11608
|
updateEventRule;
|
|
10475
11609
|
deleteEventRule;
|
|
11610
|
+
testWebhook;
|
|
10476
11611
|
reorderEventRules;
|
|
10477
11612
|
getWebhookLogs;
|
|
10478
11613
|
getRuleExecutions;
|
|
@@ -10485,6 +11620,7 @@ var GravityRailClient = class {
|
|
|
10485
11620
|
getRoutineRuns;
|
|
10486
11621
|
resetRoutineRuns;
|
|
10487
11622
|
previewSchedule;
|
|
11623
|
+
previewRoutineWorkflowAccess;
|
|
10488
11624
|
// Workflows API
|
|
10489
11625
|
getWorkflows;
|
|
10490
11626
|
getWorkflow;
|
|
@@ -10509,18 +11645,18 @@ var GravityRailClient = class {
|
|
|
10509
11645
|
createWorkflowNote;
|
|
10510
11646
|
updateWorkflowNote;
|
|
10511
11647
|
deleteWorkflowNote;
|
|
11648
|
+
getWorkflowFeedback;
|
|
10512
11649
|
getWorkflowContributors;
|
|
10513
11650
|
createWorkflowContributor;
|
|
10514
11651
|
updateWorkflowContributor;
|
|
10515
11652
|
deleteWorkflowContributor;
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
diffWorkflowVersions;
|
|
11653
|
+
getWorkflowRevisions;
|
|
11654
|
+
getWorkflowRevision;
|
|
11655
|
+
publishWorkflowRevision;
|
|
11656
|
+
activateWorkflowRevision;
|
|
11657
|
+
updateWorkflowRevisionMetadata;
|
|
11658
|
+
diffWorkflowRevisions;
|
|
11659
|
+
editWorkflowRevisionAsDraft;
|
|
10524
11660
|
getWorkspaceBuilders;
|
|
10525
11661
|
getWorkspaceBuilder;
|
|
10526
11662
|
buildWorkspace;
|
|
@@ -10579,6 +11715,9 @@ var GravityRailClient = class {
|
|
|
10579
11715
|
getArchiveBlockers;
|
|
10580
11716
|
archivePhoneNumber;
|
|
10581
11717
|
getPhoneNumberCalls;
|
|
11718
|
+
getPhoneNumberOutboundAnalyticsSummary;
|
|
11719
|
+
getPhoneNumberOutboundAnalyticsCalls;
|
|
11720
|
+
exportPhoneNumberOutboundAnalyticsCsv;
|
|
10582
11721
|
getPhoneNumberMessages;
|
|
10583
11722
|
getPhoneNumberVoicemails;
|
|
10584
11723
|
fetchVoicemailAudio;
|
|
@@ -10688,6 +11827,7 @@ var GravityRailClient = class {
|
|
|
10688
11827
|
exchangeOAuthToken;
|
|
10689
11828
|
getAvailableScopes;
|
|
10690
11829
|
getOAuthConnectionStatus;
|
|
11830
|
+
listOAuthAccounts;
|
|
10691
11831
|
getOAuthAuthorizationUrl;
|
|
10692
11832
|
disconnectOAuthProvider;
|
|
10693
11833
|
// Integrations API
|
|
@@ -10696,6 +11836,7 @@ var GravityRailClient = class {
|
|
|
10696
11836
|
getMondayBoardGroups;
|
|
10697
11837
|
getMondayCurrentUserInfo;
|
|
10698
11838
|
// Monday.com Connection API
|
|
11839
|
+
installMondayConnection;
|
|
10699
11840
|
configureMondayConnection;
|
|
10700
11841
|
getMondayConnectionStatus;
|
|
10701
11842
|
authorizeMondayConnection;
|
|
@@ -10731,6 +11872,8 @@ var GravityRailClient = class {
|
|
|
10731
11872
|
getDiscordBotAccounts;
|
|
10732
11873
|
getMyCredentials;
|
|
10733
11874
|
unlinkCredential;
|
|
11875
|
+
completeDiscordLink;
|
|
11876
|
+
discordLinkPreflight;
|
|
10734
11877
|
// Slack Apps API
|
|
10735
11878
|
getSlackApps;
|
|
10736
11879
|
getSlackApp;
|
|
@@ -10781,6 +11924,9 @@ var GravityRailClient = class {
|
|
|
10781
11924
|
fhirRefreshEncounterPatient;
|
|
10782
11925
|
fhirBackfillEncounterSync;
|
|
10783
11926
|
// Healthie API
|
|
11927
|
+
configurePatientSync;
|
|
11928
|
+
getPatientSyncStatus;
|
|
11929
|
+
deletePatientSyncConnection;
|
|
10784
11930
|
configureHealthie;
|
|
10785
11931
|
getHealthieStatus;
|
|
10786
11932
|
listHealthieProviders;
|
|
@@ -10806,6 +11952,7 @@ var GravityRailClient = class {
|
|
|
10806
11952
|
listConfluenceSpaces;
|
|
10807
11953
|
listConfluencePages;
|
|
10808
11954
|
// Salesforce API
|
|
11955
|
+
installSalesforce;
|
|
10809
11956
|
configureSalesforce;
|
|
10810
11957
|
startSalesforceOAuth;
|
|
10811
11958
|
getSalesforceStatus;
|
|
@@ -10824,6 +11971,7 @@ var GravityRailClient = class {
|
|
|
10824
11971
|
searchSalesforceRecords;
|
|
10825
11972
|
importSalesforceMembers;
|
|
10826
11973
|
// HubSpot API
|
|
11974
|
+
installHubspot;
|
|
10827
11975
|
configureHubspot;
|
|
10828
11976
|
startHubspotOAuth;
|
|
10829
11977
|
getHubspotStatus;
|
|
@@ -10909,6 +12057,7 @@ var GravityRailClient = class {
|
|
|
10909
12057
|
createWorkspaceSupportRequest;
|
|
10910
12058
|
commentOnWorkspaceSupportRequest;
|
|
10911
12059
|
closeWorkspaceSupportRequest;
|
|
12060
|
+
reopenWorkspaceSupportRequest;
|
|
10912
12061
|
clickWorkspaceSupportRequestResource;
|
|
10913
12062
|
constructor(apiKey, baseUrl, customFetch) {
|
|
10914
12063
|
const apis = createApiModules(apiKey, baseUrl, customFetch);
|
|
@@ -10923,6 +12072,9 @@ var GravityRailClient = class {
|
|
|
10923
12072
|
bindAgentsMethods(this, apis.agents);
|
|
10924
12073
|
bindQualificationsMethods(this, apis.qualifications);
|
|
10925
12074
|
bindPersonasMethods(this, apis.personas);
|
|
12075
|
+
bindQueriesMethods(this, apis.queries);
|
|
12076
|
+
bindDashboardsMethods(this, apis.dashboards);
|
|
12077
|
+
bindMotdMethods(this, apis.motd);
|
|
10926
12078
|
bindJourneysMethods(this, apis.journeys);
|
|
10927
12079
|
bindExperimentsMethods(this, apis.experiments);
|
|
10928
12080
|
bindOperatorMethods(this, apis.operatorGroups);
|
|
@@ -10962,6 +12114,7 @@ var GravityRailClient = class {
|
|
|
10962
12114
|
apis.slackApps,
|
|
10963
12115
|
apis.teamsApps,
|
|
10964
12116
|
apis.fhirConnections,
|
|
12117
|
+
apis.patientSyncConnections,
|
|
10965
12118
|
apis.healthie,
|
|
10966
12119
|
apis.salesforce,
|
|
10967
12120
|
apis.hubspot,
|
|
@@ -11015,23 +12168,30 @@ var GravityRailClient = class {
|
|
|
11015
12168
|
});
|
|
11016
12169
|
}
|
|
11017
12170
|
/**
|
|
11018
|
-
* Set the org
|
|
11019
|
-
*
|
|
11020
|
-
*
|
|
12171
|
+
* Set the org session credential for cross-domain / non-browser clients (e.g. CLI).
|
|
12172
|
+
* Opaque gr_sess_ values use X-Org-Session. Legacy orgToken JWE values still
|
|
12173
|
+
* use X-Org-Token during the migration window.
|
|
11021
12174
|
*
|
|
11022
|
-
* `orgUuid` is the org that issued the
|
|
11023
|
-
* detect a stale
|
|
12175
|
+
* `orgUuid` is the org that issued the session. Pass it so the SDK can
|
|
12176
|
+
* detect a stale session (e.g. switching orgs mid-session) and re-fire the
|
|
11024
12177
|
* org-auth handler instead of silently 401-ing.
|
|
11025
12178
|
*
|
|
11026
12179
|
* Propagates to all API modules.
|
|
11027
12180
|
*/
|
|
11028
|
-
|
|
12181
|
+
setOrgSession(session, orgUuid) {
|
|
11029
12182
|
Object.values(this.apis).forEach((api) => {
|
|
11030
|
-
if (typeof api.
|
|
11031
|
-
api.
|
|
12183
|
+
if (typeof api.setOrgSession === "function") {
|
|
12184
|
+
api.setOrgSession(session, orgUuid);
|
|
11032
12185
|
}
|
|
11033
12186
|
});
|
|
11034
12187
|
}
|
|
12188
|
+
/**
|
|
12189
|
+
* @deprecated Legacy compatibility for stateless orgToken JWE credentials.
|
|
12190
|
+
* Prefer setOrgSession() for opaque org browser sessions.
|
|
12191
|
+
*/
|
|
12192
|
+
setOrgToken(token, orgUuid) {
|
|
12193
|
+
this.setOrgSession(token, orgUuid);
|
|
12194
|
+
}
|
|
11035
12195
|
/**
|
|
11036
12196
|
* Update the API key across all modules.
|
|
11037
12197
|
* Used after successful re-authentication.
|
|
@@ -11088,6 +12248,24 @@ var WorkspaceBuilderResource = class {
|
|
|
11088
12248
|
_uuid;
|
|
11089
12249
|
_created = false;
|
|
11090
12250
|
_existed = false;
|
|
12251
|
+
/** Server-assigned numeric id — available after apply() or adopt(). */
|
|
12252
|
+
get id() {
|
|
12253
|
+
if (this._id === void 0) {
|
|
12254
|
+
throw new Error(
|
|
12255
|
+
`${this.constructor.name} has no id yet \u2014 ids are assigned during apply(). Pass the builder object itself where a reference is needed; refs resolve at apply time.`
|
|
12256
|
+
);
|
|
12257
|
+
}
|
|
12258
|
+
return this._id;
|
|
12259
|
+
}
|
|
12260
|
+
/** Server-assigned uuid — available after apply() or adopt(). */
|
|
12261
|
+
get uuid() {
|
|
12262
|
+
if (this._uuid === void 0) {
|
|
12263
|
+
throw new Error(
|
|
12264
|
+
`${this.constructor.name} has no uuid yet \u2014 uuids are assigned during apply(). Pass the builder object itself where a reference is needed; refs resolve at apply time.`
|
|
12265
|
+
);
|
|
12266
|
+
}
|
|
12267
|
+
return this._uuid;
|
|
12268
|
+
}
|
|
11091
12269
|
matchKey() {
|
|
11092
12270
|
return void 0;
|
|
11093
12271
|
}
|
|
@@ -11117,26 +12295,25 @@ var MemberFilterBuilder = class extends WorkspaceBuilderResource {
|
|
|
11117
12295
|
super();
|
|
11118
12296
|
this.name = name;
|
|
11119
12297
|
this.description = options.description ?? "";
|
|
12298
|
+
this.query = options.query ?? null;
|
|
11120
12299
|
}
|
|
12300
|
+
name;
|
|
11121
12301
|
description;
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
...options.objectIds ? { objectIds: options.objectIds } : {},
|
|
11128
|
-
...options.query ? { query: options.query } : {}
|
|
11129
|
-
});
|
|
12302
|
+
/** Query-engine predicate (JSON IR) authored on MemberFilter.query. */
|
|
12303
|
+
query = null;
|
|
12304
|
+
/** Set the filter's query-engine predicate (JSON IR). */
|
|
12305
|
+
setQuery(query) {
|
|
12306
|
+
this.query = query;
|
|
11130
12307
|
return this;
|
|
11131
12308
|
}
|
|
11132
12309
|
planLine() {
|
|
11133
|
-
return `MemberFilter: ${this.name}${this.
|
|
12310
|
+
return `MemberFilter: ${this.name}${this.query ? " (query)" : ""}`;
|
|
11134
12311
|
}
|
|
11135
12312
|
async apply(client) {
|
|
11136
12313
|
const payload = {
|
|
11137
12314
|
name: this.name,
|
|
11138
12315
|
description: this.description,
|
|
11139
|
-
|
|
12316
|
+
query: this.query
|
|
11140
12317
|
};
|
|
11141
12318
|
const result = await client.createMemberFilter(payload);
|
|
11142
12319
|
this._id = result.id;
|
|
@@ -11152,6 +12329,8 @@ var RoutineBuilder = class extends WorkspaceBuilderResource {
|
|
|
11152
12329
|
this.active = options.active ?? false;
|
|
11153
12330
|
this.description = options.description ?? "";
|
|
11154
12331
|
}
|
|
12332
|
+
name;
|
|
12333
|
+
cronSchedule;
|
|
11155
12334
|
active;
|
|
11156
12335
|
description;
|
|
11157
12336
|
rules = [];
|
|
@@ -11213,6 +12392,7 @@ var NotificationRuleBuilder = class extends WorkspaceBuilderResource {
|
|
|
11213
12392
|
this.notifyEmail = Boolean(options.notifyEmail ?? options.notify_email);
|
|
11214
12393
|
this.notifyVoice = Boolean(options.notifyVoice ?? options.notify_voice);
|
|
11215
12394
|
}
|
|
12395
|
+
name;
|
|
11216
12396
|
noticeType;
|
|
11217
12397
|
memberId;
|
|
11218
12398
|
workflow;
|
|
@@ -11437,6 +12617,11 @@ var JourneyStepBuilder = class extends WorkspaceBuilderResource {
|
|
|
11437
12617
|
this.workflow = workflow;
|
|
11438
12618
|
this.description = description;
|
|
11439
12619
|
}
|
|
12620
|
+
name;
|
|
12621
|
+
journey;
|
|
12622
|
+
order;
|
|
12623
|
+
workflow;
|
|
12624
|
+
description;
|
|
11440
12625
|
connections = [];
|
|
11441
12626
|
connectsTo(child, condition, required = false, timeoutSeconds) {
|
|
11442
12627
|
this.connections.push({ parent: this, child, condition, required, timeoutSeconds });
|
|
@@ -11465,6 +12650,7 @@ var JourneyBuilder = class extends WorkspaceBuilderResource {
|
|
|
11465
12650
|
this.name = name;
|
|
11466
12651
|
this.description = options.description ?? "";
|
|
11467
12652
|
}
|
|
12653
|
+
name;
|
|
11468
12654
|
description;
|
|
11469
12655
|
steps = [];
|
|
11470
12656
|
goals = [];
|
|
@@ -11535,6 +12721,9 @@ var RoleUpdate = class extends WorkspaceBuilderResource {
|
|
|
11535
12721
|
this.workflowIds = workflowIds;
|
|
11536
12722
|
this.dataTypeIds = dataTypeIds;
|
|
11537
12723
|
}
|
|
12724
|
+
roleId;
|
|
12725
|
+
workflowIds;
|
|
12726
|
+
dataTypeIds;
|
|
11538
12727
|
planLine() {
|
|
11539
12728
|
const parts = [];
|
|
11540
12729
|
if (this.workflowIds) parts.push(`workflows=${JSON.stringify(this.workflowIds)}`);
|
|
@@ -11551,11 +12740,6 @@ var RoleUpdate = class extends WorkspaceBuilderResource {
|
|
|
11551
12740
|
}
|
|
11552
12741
|
};
|
|
11553
12742
|
|
|
11554
|
-
// src/constants/models.ts
|
|
11555
|
-
var DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
|
|
11556
|
-
var DEFAULT_VOICE_INFERENCE_MODEL = "google:vertex:gemini-3-flash";
|
|
11557
|
-
var DEFAULT_CUSTOM_VOICE_MODEL = "elevenlabs:voice:river";
|
|
11558
|
-
|
|
11559
12743
|
// src/workspace-builder/workflows.ts
|
|
11560
12744
|
var PERM_KEYS = {
|
|
11561
12745
|
canRead: "canRead",
|
|
@@ -11581,6 +12765,7 @@ var AbilityDef = class {
|
|
|
11581
12765
|
if (inputKey in options) this.perms[outputKey] = options[inputKey];
|
|
11582
12766
|
}
|
|
11583
12767
|
}
|
|
12768
|
+
abilityType;
|
|
11584
12769
|
uuid = crypto.randomUUID();
|
|
11585
12770
|
config;
|
|
11586
12771
|
enabled;
|
|
@@ -11611,13 +12796,25 @@ var TaskBuilder = class extends WorkspaceBuilderResource {
|
|
|
11611
12796
|
this.start = start;
|
|
11612
12797
|
this.description = description;
|
|
11613
12798
|
}
|
|
12799
|
+
name;
|
|
12800
|
+
workflow;
|
|
12801
|
+
prompt;
|
|
12802
|
+
start;
|
|
12803
|
+
description;
|
|
11614
12804
|
transitions = [];
|
|
11615
12805
|
eventRules = [];
|
|
11616
|
-
transitionsTo(child, when, autoNext = false, required = false) {
|
|
12806
|
+
transitionsTo(child, when, autoNext = false, required = false, celCondition) {
|
|
11617
12807
|
if (child === this) {
|
|
11618
12808
|
throw new Error(`Task '${this.name}' cannot transition to itself`);
|
|
11619
12809
|
}
|
|
11620
|
-
this.transitions.push({
|
|
12810
|
+
this.transitions.push({
|
|
12811
|
+
parent: this,
|
|
12812
|
+
child,
|
|
12813
|
+
when,
|
|
12814
|
+
autoNext,
|
|
12815
|
+
required,
|
|
12816
|
+
celCondition
|
|
12817
|
+
});
|
|
11621
12818
|
return this;
|
|
11622
12819
|
}
|
|
11623
12820
|
onEnter(action, params = {}, name) {
|
|
@@ -11640,8 +12837,13 @@ var TaskBuilder = class extends WorkspaceBuilderResource {
|
|
|
11640
12837
|
}
|
|
11641
12838
|
async apply(client) {
|
|
11642
12839
|
if (this._existed || this.workflow._id === void 0) return;
|
|
12840
|
+
if (this.workflow._draftRevisionId === void 0) {
|
|
12841
|
+
throw new Error(
|
|
12842
|
+
`Workflow '${this.workflow.name}' has no draft revision id; cannot create tasks. Tasks attach to a WorkflowRevision, not the stable workflow root.`
|
|
12843
|
+
);
|
|
12844
|
+
}
|
|
11643
12845
|
const result = await client.createTask({
|
|
11644
|
-
|
|
12846
|
+
workflowRevisionId: this.workflow._draftRevisionId,
|
|
11645
12847
|
name: this.name,
|
|
11646
12848
|
prompt: this.prompt,
|
|
11647
12849
|
description: this.description
|
|
@@ -11657,13 +12859,18 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
11657
12859
|
this.name = name;
|
|
11658
12860
|
this.description = options.description ?? "";
|
|
11659
12861
|
this.prompt = options.prompt;
|
|
11660
|
-
this.
|
|
12862
|
+
this.copyFromAgentId = options.copyFromAgentId;
|
|
11661
12863
|
}
|
|
12864
|
+
name;
|
|
11662
12865
|
description;
|
|
11663
12866
|
prompt;
|
|
11664
|
-
|
|
12867
|
+
copyFromAgentId;
|
|
11665
12868
|
tasks = [];
|
|
11666
12869
|
abilities = [];
|
|
12870
|
+
/** The DRAFT revision's id — where tasks and graph edits attach.
|
|
12871
|
+
* `_id` is the STABLE workflow root id; the two are different entities
|
|
12872
|
+
* and (after any publish) different numbers. */
|
|
12873
|
+
_draftRevisionId;
|
|
11667
12874
|
task(name, options = {}) {
|
|
11668
12875
|
const task = new TaskBuilder(
|
|
11669
12876
|
name,
|
|
@@ -11686,10 +12893,14 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
11686
12893
|
return this.name;
|
|
11687
12894
|
}
|
|
11688
12895
|
adopt(existing) {
|
|
11689
|
-
|
|
12896
|
+
const root = existing.workflow ?? existing;
|
|
12897
|
+
super.adopt(root);
|
|
12898
|
+
const draft = existing.draftRevision;
|
|
12899
|
+
this._draftRevisionId = draft?.id ?? root.draftRevisionId;
|
|
11690
12900
|
const start = this.startTask;
|
|
11691
|
-
|
|
11692
|
-
|
|
12901
|
+
const startTaskId = draft?.startTaskId;
|
|
12902
|
+
if (start && startTaskId) {
|
|
12903
|
+
start._id = startTaskId;
|
|
11693
12904
|
start._existed = true;
|
|
11694
12905
|
}
|
|
11695
12906
|
}
|
|
@@ -11699,12 +12910,6 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
11699
12910
|
if (this.abilities.length) details.push(`${this.abilities.length} abilities`);
|
|
11700
12911
|
return `Workflow: ${this.name}${details.length ? ` (${details.join(", ")})` : ""}`;
|
|
11701
12912
|
}
|
|
11702
|
-
needsDefaultAgent() {
|
|
11703
|
-
return !this._existed && this.agentId === void 0;
|
|
11704
|
-
}
|
|
11705
|
-
setAgentId(agentId) {
|
|
11706
|
-
this.agentId = agentId;
|
|
11707
|
-
}
|
|
11708
12913
|
async apply(client) {
|
|
11709
12914
|
if (this._existed) return;
|
|
11710
12915
|
const payload = {
|
|
@@ -11712,63 +12917,16 @@ var WorkflowBuilder = class extends WorkspaceBuilderResource {
|
|
|
11712
12917
|
description: this.description,
|
|
11713
12918
|
createMode: "taskless",
|
|
11714
12919
|
...this.prompt ? { prompt: this.prompt } : {},
|
|
11715
|
-
...this.
|
|
12920
|
+
...this.copyFromAgentId ? { copyFromAgentId: this.copyFromAgentId } : {},
|
|
11716
12921
|
...this.abilities.length ? { abilities: this.abilities.map((ability) => ability.toAbility()) } : {}
|
|
11717
12922
|
};
|
|
11718
12923
|
const result = await client.createWorkflow(payload);
|
|
11719
|
-
this._id = result.id;
|
|
11720
|
-
this._uuid = result.uuid;
|
|
12924
|
+
this._id = result.workflow.id;
|
|
12925
|
+
this._uuid = result.workflow.uuid;
|
|
12926
|
+
this._draftRevisionId = result.draftRevision.id;
|
|
11721
12927
|
this._created = true;
|
|
11722
12928
|
}
|
|
11723
12929
|
};
|
|
11724
|
-
var WORKSPACE_BUILDER_DEFAULT_AGENT_NAME = "Workspace Setup Agent";
|
|
11725
|
-
var WORKSPACE_BUILDER_DEFAULT_AGENT_PROMPT = "You help workspace members complete the workflow you are assigned to. Follow the task prompts, collect requested information accurately, and escalate when the workflow asks you to.";
|
|
11726
|
-
async function getOrCreateDefaultWorkflowAgent(client) {
|
|
11727
|
-
const existingAgents = recordsFromResponse(
|
|
11728
|
-
await client.getAgents({ pageSize: 100, includeArchived: false })
|
|
11729
|
-
);
|
|
11730
|
-
const existing = existingAgents.find((agent) => !agent.isArchived) ?? existingAgents[0];
|
|
11731
|
-
if (existing) {
|
|
11732
|
-
return {
|
|
11733
|
-
id: numberField(existing, "id"),
|
|
11734
|
-
name: stringField(existing, "name"),
|
|
11735
|
-
created: false
|
|
11736
|
-
};
|
|
11737
|
-
}
|
|
11738
|
-
const roles = recordsFromResponse(await client.getMemberRoles());
|
|
11739
|
-
const role = roles.find((candidate) => stringField(candidate, "name").toLowerCase() === "agent") ?? roles[0];
|
|
11740
|
-
if (!role) {
|
|
11741
|
-
throw new Error("Cannot create default workflow agent: workspace has no member roles");
|
|
11742
|
-
}
|
|
11743
|
-
const payload = {
|
|
11744
|
-
name: WORKSPACE_BUILDER_DEFAULT_AGENT_NAME,
|
|
11745
|
-
memberRoleId: numberField(role, "id"),
|
|
11746
|
-
chatModelId: DEFAULT_CHAT_MODEL,
|
|
11747
|
-
systemPrompt: WORKSPACE_BUILDER_DEFAULT_AGENT_PROMPT
|
|
11748
|
-
};
|
|
11749
|
-
const created = await client.createAgent(payload);
|
|
11750
|
-
return {
|
|
11751
|
-
id: created.id,
|
|
11752
|
-
name: created.name ?? WORKSPACE_BUILDER_DEFAULT_AGENT_NAME,
|
|
11753
|
-
created: true
|
|
11754
|
-
};
|
|
11755
|
-
}
|
|
11756
|
-
function recordsFromResponse(value) {
|
|
11757
|
-
if (Array.isArray(value)) return value;
|
|
11758
|
-
if (value && typeof value === "object" && Array.isArray(value.items)) {
|
|
11759
|
-
return value.items;
|
|
11760
|
-
}
|
|
11761
|
-
return [];
|
|
11762
|
-
}
|
|
11763
|
-
function numberField(record, key) {
|
|
11764
|
-
const value = record[key];
|
|
11765
|
-
if (typeof value !== "number") throw new Error(`Expected numeric ${key}`);
|
|
11766
|
-
return value;
|
|
11767
|
-
}
|
|
11768
|
-
function stringField(record, key) {
|
|
11769
|
-
const value = record[key];
|
|
11770
|
-
return typeof value === "string" ? value : "";
|
|
11771
|
-
}
|
|
11772
12930
|
var AgentBuilder = class extends WorkspaceBuilderResource {
|
|
11773
12931
|
constructor(name, options = {}) {
|
|
11774
12932
|
super();
|
|
@@ -11779,6 +12937,7 @@ var AgentBuilder = class extends WorkspaceBuilderResource {
|
|
|
11779
12937
|
this.tools = options.tools ?? [];
|
|
11780
12938
|
this.codeInterpreterEnabled = options.codeInterpreterEnabled ?? options.code_interpreter_enabled ?? false;
|
|
11781
12939
|
}
|
|
12940
|
+
name;
|
|
11782
12941
|
chatModelId;
|
|
11783
12942
|
systemPrompt;
|
|
11784
12943
|
memberRoleId;
|
|
@@ -11830,6 +12989,7 @@ var WorkspaceBuilder = class {
|
|
|
11830
12989
|
constructor(client) {
|
|
11831
12990
|
this.client = client;
|
|
11832
12991
|
}
|
|
12992
|
+
client;
|
|
11833
12993
|
resources = [];
|
|
11834
12994
|
form(name, options = {}) {
|
|
11835
12995
|
const form = new FormBuilder(name, options.slug, options);
|
|
@@ -11933,7 +13093,6 @@ ${"=".repeat(50)}`);
|
|
|
11933
13093
|
await this.resolveExisting(resources);
|
|
11934
13094
|
const summary = {};
|
|
11935
13095
|
writeLine("Applying...");
|
|
11936
|
-
await this.ensureWorkflowAgents(resources, summary);
|
|
11937
13096
|
for (const resource of resources) {
|
|
11938
13097
|
try {
|
|
11939
13098
|
if (resource._existed) {
|
|
@@ -11954,7 +13113,7 @@ ${"=".repeat(50)}`);
|
|
|
11954
13113
|
writeLine(` Skipped: ${resource.planLine()}`);
|
|
11955
13114
|
}
|
|
11956
13115
|
} catch (err) {
|
|
11957
|
-
writeLine(
|
|
13116
|
+
writeLine(formatApplyFailureLine(resource, err));
|
|
11958
13117
|
throw new ApplyError(resource, err, summary);
|
|
11959
13118
|
}
|
|
11960
13119
|
}
|
|
@@ -11994,9 +13153,11 @@ Done! Created ${count} resources.`);
|
|
|
11994
13153
|
}
|
|
11995
13154
|
}
|
|
11996
13155
|
if (!workflowNames.size) return;
|
|
11997
|
-
|
|
13156
|
+
const existingWorkflows = await this.client.getWorkflows();
|
|
13157
|
+
for (const { workflow: existing } of existingWorkflows.items) {
|
|
11998
13158
|
if (existing.name && workflowNames.has(existing.name)) {
|
|
11999
|
-
|
|
13159
|
+
const detail = await this.client.getWorkflow(existing.id);
|
|
13160
|
+
workflowNames.get(existing.name).adopt(detail);
|
|
12000
13161
|
}
|
|
12001
13162
|
}
|
|
12002
13163
|
const adoptedWorkflows = resources.filter(
|
|
@@ -12005,7 +13166,9 @@ Done! Created ${count} resources.`);
|
|
|
12005
13166
|
if (!adoptedWorkflows.length) return;
|
|
12006
13167
|
const existingTasks = await this.client.getTasks();
|
|
12007
13168
|
for (const workflow of adoptedWorkflows) {
|
|
12008
|
-
const workflowTasks = existingTasks.filter(
|
|
13169
|
+
const workflowTasks = existingTasks.filter(
|
|
13170
|
+
(task) => (task.workflowRevisionId ?? task.workflowId) === workflow._draftRevisionId
|
|
13171
|
+
);
|
|
12009
13172
|
const taskByName = new Map(workflowTasks.map((task) => [task.name, task]));
|
|
12010
13173
|
for (const taskBuilder of workflow.tasks) {
|
|
12011
13174
|
const match = taskByName.get(taskBuilder.name);
|
|
@@ -12027,21 +13190,6 @@ Done! Created ${count} resources.`);
|
|
|
12027
13190
|
}
|
|
12028
13191
|
}
|
|
12029
13192
|
}
|
|
12030
|
-
async ensureWorkflowAgents(resources, summary) {
|
|
12031
|
-
const workflows = resources.filter(
|
|
12032
|
-
(resource) => resource instanceof WorkflowBuilder && resource.needsDefaultAgent()
|
|
12033
|
-
);
|
|
12034
|
-
if (!workflows.length) return;
|
|
12035
|
-
const agent = await getOrCreateDefaultWorkflowAgent(this.client);
|
|
12036
|
-
for (const workflow of workflows) workflow.setAgentId(agent.id);
|
|
12037
|
-
if (agent.created) {
|
|
12038
|
-
summary.agents ??= [];
|
|
12039
|
-
summary.agents.push(agent.id);
|
|
12040
|
-
writeLine(` Created Agent: ${agent.name} -> id=${agent.id}`);
|
|
12041
|
-
} else {
|
|
12042
|
-
writeLine(` Using Agent: ${agent.name || agent.id} -> id=${agent.id}`);
|
|
12043
|
-
}
|
|
12044
|
-
}
|
|
12045
13193
|
sortedResources() {
|
|
12046
13194
|
const all = [];
|
|
12047
13195
|
for (const resource of this.resources) {
|
|
@@ -12105,7 +13253,7 @@ Done! Created ${count} resources.`);
|
|
|
12105
13253
|
{
|
|
12106
13254
|
taskId,
|
|
12107
13255
|
choicePrompt: transition.when,
|
|
12108
|
-
celCondition: null,
|
|
13256
|
+
celCondition: transition.celCondition ?? null,
|
|
12109
13257
|
autoNext: transition.autoNext,
|
|
12110
13258
|
required: transition.required
|
|
12111
13259
|
}
|
|
@@ -12211,16 +13359,21 @@ Done! Created ${count} resources.`);
|
|
|
12211
13359
|
}
|
|
12212
13360
|
};
|
|
12213
13361
|
var ApplyError = class extends Error {
|
|
13362
|
+
createdSoFar;
|
|
13363
|
+
#resource;
|
|
13364
|
+
#cause;
|
|
12214
13365
|
constructor(resource, cause, createdSoFar) {
|
|
12215
|
-
super(
|
|
12216
|
-
|
|
12217
|
-
Already created: ${JSON.stringify(
|
|
12218
|
-
createdSoFar
|
|
12219
|
-
)}`
|
|
12220
|
-
);
|
|
12221
|
-
this.resource = resource;
|
|
12222
|
-
this.cause = cause;
|
|
13366
|
+
super(formatApplyErrorMessage(resource, cause, createdSoFar));
|
|
13367
|
+
this.name = "ApplyError";
|
|
12223
13368
|
this.createdSoFar = createdSoFar;
|
|
13369
|
+
this.#resource = resource;
|
|
13370
|
+
this.#cause = cause;
|
|
13371
|
+
}
|
|
13372
|
+
get resource() {
|
|
13373
|
+
return this.#resource;
|
|
13374
|
+
}
|
|
13375
|
+
get cause() {
|
|
13376
|
+
return this.#cause;
|
|
12224
13377
|
}
|
|
12225
13378
|
};
|
|
12226
13379
|
function resourceKey(resource) {
|
|
@@ -12241,7 +13394,7 @@ var SEARCHABLE_EVENT_RULE_SOURCE_FIELDS = [
|
|
|
12241
13394
|
"taskId",
|
|
12242
13395
|
"dataTypeId",
|
|
12243
13396
|
"routineId",
|
|
12244
|
-
"
|
|
13397
|
+
"workflowRevisionId",
|
|
12245
13398
|
"journeyStepId"
|
|
12246
13399
|
];
|
|
12247
13400
|
var EVENT_RULE_SOURCE_FIELDS = [
|
|
@@ -12331,8 +13484,64 @@ function handleEventRuleApplyFailure(resourceName, err) {
|
|
|
12331
13484
|
writeLine(` FAILED: Event rule on '${resourceName}': ${summary}`);
|
|
12332
13485
|
throw new Error(`Failed wiring event rule on '${resourceName}': ${summary}`);
|
|
12333
13486
|
}
|
|
13487
|
+
function writeScopeForResource(resource) {
|
|
13488
|
+
if (resource instanceof FormBuilder) return "datatypes:write";
|
|
13489
|
+
if (resource instanceof WorkflowBuilder || resource instanceof TaskBuilder) {
|
|
13490
|
+
return "workflows:write";
|
|
13491
|
+
}
|
|
13492
|
+
if (resource instanceof AgentBuilder) return "agents:write";
|
|
13493
|
+
if (resource instanceof MemberLabelBuilder || resource instanceof MemberFilterBuilder) {
|
|
13494
|
+
return "members:write";
|
|
13495
|
+
}
|
|
13496
|
+
if (resource instanceof RoutineBuilder || resource instanceof NotificationRuleBuilder) {
|
|
13497
|
+
return "automations:admin";
|
|
13498
|
+
}
|
|
13499
|
+
if (resource instanceof JourneyBuilder || resource instanceof JourneyStepBuilder) {
|
|
13500
|
+
return "journeys:write";
|
|
13501
|
+
}
|
|
13502
|
+
if (resource instanceof RoleUpdate) return "member_roles:write";
|
|
13503
|
+
return null;
|
|
13504
|
+
}
|
|
13505
|
+
function scopeRetryHint(resource) {
|
|
13506
|
+
const scope = writeScopeForResource(resource);
|
|
13507
|
+
return scope ? ` (retry exec with scopes=['${scope}'])` : "";
|
|
13508
|
+
}
|
|
13509
|
+
function formatApplyFailureLine(resource, err) {
|
|
13510
|
+
const line = ` FAILED: ${resource.planLine()}: ${summarizeError(err)}`;
|
|
13511
|
+
return hasStatus(err, 403) ? `${line}${scopeRetryHint(resource)}` : line;
|
|
13512
|
+
}
|
|
13513
|
+
function formatApplyErrorMessage(resource, cause, createdSoFar) {
|
|
13514
|
+
let message = `Failed creating ${resource.planLine()}: ${summarizeError(cause)}`;
|
|
13515
|
+
if (hasStatus(cause, 403)) {
|
|
13516
|
+
const scope = writeScopeForResource(resource);
|
|
13517
|
+
if (scope) {
|
|
13518
|
+
message += `
|
|
13519
|
+
Retry exec with scopes=['${scope}']`;
|
|
13520
|
+
}
|
|
13521
|
+
}
|
|
13522
|
+
const createdKeys = Object.keys(createdSoFar);
|
|
13523
|
+
if (createdKeys.length > 0) {
|
|
13524
|
+
message += `
|
|
13525
|
+
Already created: ${JSON.stringify(createdSoFar)}`;
|
|
13526
|
+
}
|
|
13527
|
+
return message;
|
|
13528
|
+
}
|
|
12334
13529
|
function summarizeError(err) {
|
|
12335
|
-
if (err
|
|
13530
|
+
if (hasStatus(err, 403)) {
|
|
13531
|
+
return "Insufficient permissions for this operation";
|
|
13532
|
+
}
|
|
13533
|
+
if (err instanceof ApiError) {
|
|
13534
|
+
const msg = err.message.trim();
|
|
13535
|
+
const availableTypesIdx = msg.indexOf("Available types:");
|
|
13536
|
+
if (availableTypesIdx !== -1) {
|
|
13537
|
+
const head = msg.slice(0, availableTypesIdx).trim().replace(/\.$/, "");
|
|
13538
|
+
return head ? `${head}.` : "Request failed";
|
|
13539
|
+
}
|
|
13540
|
+
return msg.length > 240 ? `${msg.slice(0, 237)}...` : msg;
|
|
13541
|
+
}
|
|
13542
|
+
if (err instanceof Error) {
|
|
13543
|
+
return err.name || "Error";
|
|
13544
|
+
}
|
|
12336
13545
|
return typeof err;
|
|
12337
13546
|
}
|
|
12338
13547
|
function hasStatus(err, status) {
|
|
@@ -12358,15 +13567,20 @@ var AbilityTypeSlugs = {
|
|
|
12358
13567
|
TOOLKITS: "tools:toolkits",
|
|
12359
13568
|
WEB_SEARCH: "tools:web_search",
|
|
12360
13569
|
CONVERSATION_HISTORY: "tools:conversation_history",
|
|
13570
|
+
IMAGE_GENERATION: "tools:image_generation",
|
|
13571
|
+
CONVERSATION_CONTROL: "tools:conversation_control",
|
|
12361
13572
|
// Integration
|
|
12362
13573
|
CALENDAR_BOOKING: "integration:calendar_booking",
|
|
12363
13574
|
FILE_ACCESS: "integration:file_access",
|
|
12364
13575
|
DATA_ACCESS: "integration:data_access",
|
|
12365
13576
|
GMAIL: "integration:gmail",
|
|
13577
|
+
GOOGLE_CALENDAR: "integration:google_calendar",
|
|
13578
|
+
GOOGLE_DRIVE: "integration:google_drive",
|
|
12366
13579
|
CHARLESTON_PMD_PAGING: "integration:charleston_pmd_paging",
|
|
12367
13580
|
// Communication
|
|
12368
13581
|
PHONE_CALL_TOOLS: "communication:phone_call_tools",
|
|
12369
13582
|
SEND_SMS: "communication:send_sms",
|
|
13583
|
+
SEND_WHATSAPP: "communication:send_whatsapp",
|
|
12370
13584
|
MEMBER_ACCESS: "communication:member_access",
|
|
12371
13585
|
AUDIO_PLAYBACK: "communication:audio_playback",
|
|
12372
13586
|
// Oversight
|
|
@@ -12375,6 +13589,12 @@ var AbilityTypeSlugs = {
|
|
|
12375
13589
|
ESCALATION: "oversight:escalation",
|
|
12376
13590
|
// Identity
|
|
12377
13591
|
MEMBER_FIELD_VERIFICATION: "identity:member_field_verification",
|
|
13592
|
+
// Delegation
|
|
13593
|
+
CONTRIBUTOR: "delegation:contributor",
|
|
13594
|
+
// Workflow
|
|
13595
|
+
WORKFLOW_RUN: "workflow:run",
|
|
13596
|
+
// Commerce
|
|
13597
|
+
RESELLER: "commerce:reseller",
|
|
12378
13598
|
// System (auto-injected, hidden from users)
|
|
12379
13599
|
USER_MESSAGE_RULES: "system:user_message_rules",
|
|
12380
13600
|
ASSISTANT_MESSAGE_RULES: "chat:assistant_message_rules",
|
|
@@ -12396,7 +13616,6 @@ var TTS_PREVIEW_PROVIDERS = [
|
|
|
12396
13616
|
"elevenlabs",
|
|
12397
13617
|
"google",
|
|
12398
13618
|
"aws",
|
|
12399
|
-
"pocket",
|
|
12400
13619
|
"deepgram",
|
|
12401
13620
|
"xai"
|
|
12402
13621
|
];
|
|
@@ -12411,6 +13630,13 @@ function canPreviewVoice(entity) {
|
|
|
12411
13630
|
return TTS_PREVIEW_PROVIDERS.includes(provider);
|
|
12412
13631
|
}
|
|
12413
13632
|
|
|
13633
|
+
// src/types/query-engine-types.ts
|
|
13634
|
+
var QUERY_VALUELESS_OPS = /* @__PURE__ */ new Set([
|
|
13635
|
+
"isEmpty",
|
|
13636
|
+
"notEmpty",
|
|
13637
|
+
"exists"
|
|
13638
|
+
]);
|
|
13639
|
+
|
|
12414
13640
|
// src/types/chat-types.ts
|
|
12415
13641
|
var SMS_DELIVERY_FAILURE_STATUSES = /* @__PURE__ */ new Set([
|
|
12416
13642
|
"failed",
|
|
@@ -12419,6 +13645,10 @@ var SMS_DELIVERY_FAILURE_STATUSES = /* @__PURE__ */ new Set([
|
|
|
12419
13645
|
function isSMSDeliveryFailureStatus(status) {
|
|
12420
13646
|
return status != null && SMS_DELIVERY_FAILURE_STATUSES.has(status);
|
|
12421
13647
|
}
|
|
13648
|
+
var POSITIVE_RATING_THRESHOLD = 0.5;
|
|
13649
|
+
function isPositiveRating(rating) {
|
|
13650
|
+
return rating != null && rating >= POSITIVE_RATING_THRESHOLD;
|
|
13651
|
+
}
|
|
12422
13652
|
|
|
12423
13653
|
// src/types/generated/organization.ts
|
|
12424
13654
|
var BusinessIndustry = {
|
|
@@ -12521,6 +13751,7 @@ var AbilityConfigIssueCode = {
|
|
|
12521
13751
|
missing_resource: "missing_resource",
|
|
12522
13752
|
invalid_state: "invalid_state",
|
|
12523
13753
|
feature_disabled: "feature_disabled",
|
|
13754
|
+
missing_connection: "missing_connection",
|
|
12524
13755
|
external_drift: "external_drift"
|
|
12525
13756
|
};
|
|
12526
13757
|
var AbilityConfigIssueSeverity = {
|
|
@@ -12534,6 +13765,9 @@ var WorkflowAccessWarningResourceType = {
|
|
|
12534
13765
|
calendar: "calendar"
|
|
12535
13766
|
};
|
|
12536
13767
|
|
|
13768
|
+
// src/types/widget-domain-types.ts
|
|
13769
|
+
var WIDGET_SLUGS = ["chat", "operator", "operator-tools", "chat-app"];
|
|
13770
|
+
|
|
12537
13771
|
// src/features/registry.ts
|
|
12538
13772
|
var FeatureCategory = /* @__PURE__ */ ((FeatureCategory2) => {
|
|
12539
13773
|
FeatureCategory2["COMMUNICATION"] = "communication";
|
|
@@ -12636,21 +13870,16 @@ var CHAT_TYPES = {
|
|
|
12636
13870
|
ASSIGNMENT: "assignment",
|
|
12637
13871
|
MANAGER: "manager",
|
|
12638
13872
|
CONTRIBUTOR: "contributor",
|
|
12639
|
-
|
|
12640
|
-
MEMBER: "member",
|
|
12641
|
-
/** @deprecated Use MEMBER instead */
|
|
12642
|
-
AGENT: "member",
|
|
12643
|
-
/** @deprecated Use MEMBER instead */
|
|
12644
|
-
DM: "member"
|
|
13873
|
+
DM: "dm"
|
|
12645
13874
|
};
|
|
12646
13875
|
var BUILTIN_ASSISTANT_CHAT_TYPES = /* @__PURE__ */ new Set([
|
|
12647
13876
|
CHAT_TYPES.MANAGER,
|
|
12648
|
-
CHAT_TYPES.CONTRIBUTOR
|
|
12649
|
-
CHAT_TYPES.DEVELOPER
|
|
13877
|
+
CHAT_TYPES.CONTRIBUTOR
|
|
12650
13878
|
]);
|
|
13879
|
+
var MEMBER_AGENT_CHAT_TYPES = /* @__PURE__ */ new Set([CHAT_TYPES.DM]);
|
|
12651
13880
|
var NO_ASSISTANT_PARTICIPANT_CHAT_TYPES = /* @__PURE__ */ new Set([
|
|
12652
13881
|
...BUILTIN_ASSISTANT_CHAT_TYPES,
|
|
12653
|
-
|
|
13882
|
+
...MEMBER_AGENT_CHAT_TYPES
|
|
12654
13883
|
]);
|
|
12655
13884
|
function usesBuiltinAssistant(chatType) {
|
|
12656
13885
|
return BUILTIN_ASSISTANT_CHAT_TYPES.has(chatType);
|
|
@@ -12662,6 +13891,11 @@ function isChatType(value) {
|
|
|
12662
13891
|
return Object.values(CHAT_TYPES).includes(value);
|
|
12663
13892
|
}
|
|
12664
13893
|
|
|
13894
|
+
// src/constants/models.ts
|
|
13895
|
+
var DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
|
|
13896
|
+
var DEFAULT_VOICE_INFERENCE_MODEL = "google:vertex:gemini-3-flash";
|
|
13897
|
+
var DEFAULT_CUSTOM_VOICE_MODEL = "elevenlabs:voice:river";
|
|
13898
|
+
|
|
12665
13899
|
// src/types/resource-metadata.ts
|
|
12666
13900
|
var RESOURCE_METADATA = {
|
|
12667
13901
|
["credit" /* CREDIT */]: {
|
|
@@ -13441,6 +14675,19 @@ var SCOPE_PRESETS = {
|
|
|
13441
14675
|
/** Full access - all available scopes */
|
|
13442
14676
|
ALL: Object.keys(SCOPES)
|
|
13443
14677
|
};
|
|
14678
|
+
|
|
14679
|
+
// src/utils/revision-state.ts
|
|
14680
|
+
function getRevisionState(workflow, revision) {
|
|
14681
|
+
const draftIsLive = workflow.activeRevisionId === workflow.draftRevisionId;
|
|
14682
|
+
const hasUnpublishedChanges = workflow.draftModifiedAt != null;
|
|
14683
|
+
return {
|
|
14684
|
+
isActive: revision != null && revision.id === workflow.activeRevisionId,
|
|
14685
|
+
isDraft: revision != null && revision.id === workflow.draftRevisionId,
|
|
14686
|
+
draftIsLive,
|
|
14687
|
+
hasUnpublishedChanges,
|
|
14688
|
+
state: revision?.publishedAt != null ? "published" : "draft"
|
|
14689
|
+
};
|
|
14690
|
+
}
|
|
13444
14691
|
// Annotate the CommonJS export names for ESM import in node:
|
|
13445
14692
|
0 && (module.exports = {
|
|
13446
14693
|
AbilityConfigIssueCode,
|
|
@@ -13469,6 +14716,7 @@ var SCOPE_PRESETS = {
|
|
|
13469
14716
|
CalendarScheduleAvailabilityType,
|
|
13470
14717
|
CalendarScheduleRecurrence,
|
|
13471
14718
|
CalendarSource,
|
|
14719
|
+
CapabilityClass,
|
|
13472
14720
|
ConsentMethod,
|
|
13473
14721
|
CriterionType,
|
|
13474
14722
|
DEFAULT_CHAT_MODEL,
|
|
@@ -13477,6 +14725,7 @@ var SCOPE_PRESETS = {
|
|
|
13477
14725
|
DEFAULT_VOICE_INFERENCE_MODEL,
|
|
13478
14726
|
DataCategory,
|
|
13479
14727
|
DataFieldType,
|
|
14728
|
+
DataRecordRetirementResponseReason,
|
|
13480
14729
|
DataSensitivity,
|
|
13481
14730
|
DataTypeRecordScope,
|
|
13482
14731
|
DriverMode,
|
|
@@ -13500,6 +14749,9 @@ var SCOPE_PRESETS = {
|
|
|
13500
14749
|
McpServerState,
|
|
13501
14750
|
MemberFeature,
|
|
13502
14751
|
MemberFilterBuilder,
|
|
14752
|
+
MemberImportMatchInfoMatchType,
|
|
14753
|
+
MemberImportPreviewRowAction,
|
|
14754
|
+
MemberImportValidationError,
|
|
13503
14755
|
MemberLabelBuilder,
|
|
13504
14756
|
MemberType,
|
|
13505
14757
|
MenuItemResponseItemType,
|
|
@@ -13522,7 +14774,12 @@ var SCOPE_PRESETS = {
|
|
|
13522
14774
|
PERMISSION_NONE,
|
|
13523
14775
|
PERMISSION_USE,
|
|
13524
14776
|
PERMISSION_VERIFY,
|
|
14777
|
+
PIDS_DISPOSITIONS,
|
|
14778
|
+
PIDS_SOURCES,
|
|
14779
|
+
POSITIVE_RATING_THRESHOLD,
|
|
13525
14780
|
ProductType,
|
|
14781
|
+
QUERY_VALUELESS_OPS,
|
|
14782
|
+
QueriesApi,
|
|
13526
14783
|
REALTIME_MODEL_CUSTOM,
|
|
13527
14784
|
REALTIME_MODEL_GEMINI,
|
|
13528
14785
|
REALTIME_MODEL_GEMINI_VERTEX,
|
|
@@ -13552,11 +14809,11 @@ var SCOPE_PRESETS = {
|
|
|
13552
14809
|
TTS_MODEL_ELEVENLABS_FLASH,
|
|
13553
14810
|
TTS_MODEL_ELEVENLABS_MULTILINGUAL,
|
|
13554
14811
|
TTS_MODEL_ELEVENLABS_TURBO,
|
|
13555
|
-
TTS_MODEL_POCKET,
|
|
13556
14812
|
TTS_PREVIEW_PROVIDERS,
|
|
13557
14813
|
TaskBuilder,
|
|
13558
14814
|
TemplatesApi,
|
|
13559
14815
|
ToolkitState,
|
|
14816
|
+
WIDGET_SLUGS,
|
|
13560
14817
|
WorkflowAccessWarningResourceType,
|
|
13561
14818
|
WorkflowBuilder,
|
|
13562
14819
|
WorkflowResourceType,
|
|
@@ -13582,12 +14839,14 @@ var SCOPE_PRESETS = {
|
|
|
13582
14839
|
getFeaturesByVisibility,
|
|
13583
14840
|
getMissingDependencies,
|
|
13584
14841
|
getResourceMetadata,
|
|
14842
|
+
getRevisionState,
|
|
13585
14843
|
getScopeFromProductType,
|
|
13586
14844
|
getTTSProvider,
|
|
13587
14845
|
getVoiceModelId,
|
|
13588
14846
|
initializeFeatures,
|
|
13589
14847
|
isChatType,
|
|
13590
14848
|
isFeatureAvailable,
|
|
14849
|
+
isPositiveRating,
|
|
13591
14850
|
isRegistryInitialized,
|
|
13592
14851
|
isSMSDeliveryFailureStatus,
|
|
13593
14852
|
requiresAssistantParticipant,
|