@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
|
@@ -1,456 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
for (const cookie of cookies) {
|
|
6
|
-
const trimmedCookie = cookie.trim();
|
|
7
|
-
const eqIndex = trimmedCookie.indexOf("=");
|
|
8
|
-
if (eqIndex === -1) continue;
|
|
9
|
-
const cookieName = trimmedCookie.substring(0, eqIndex);
|
|
10
|
-
const cookieValue = trimmedCookie.substring(eqIndex + 1);
|
|
11
|
-
if (cookieName === name) {
|
|
12
|
-
return cookieValue;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return void 0;
|
|
16
|
-
}
|
|
17
|
-
function isApiValidationError(value) {
|
|
18
|
-
if (!value || typeof value !== "object") return false;
|
|
19
|
-
const v = value;
|
|
20
|
-
return typeof v.field === "string" && typeof v.kind === "string" && typeof v.message === "string";
|
|
21
|
-
}
|
|
22
|
-
var ApiError = class extends Error {
|
|
23
|
-
statusCode;
|
|
24
|
-
/** Legacy string-array errors — kept for non-validation callers. */
|
|
25
|
-
errors;
|
|
26
|
-
/**
|
|
27
|
-
* Structured workflow-expression validation errors (CEL/Jinja).
|
|
28
|
-
* Populated when the backend returns a WorkflowValidationErrorResponse.
|
|
29
|
-
*/
|
|
30
|
-
validationErrors;
|
|
31
|
-
constructor(message, statusCode, errors, validationErrors) {
|
|
32
|
-
super(message);
|
|
33
|
-
this.statusCode = statusCode;
|
|
34
|
-
this.errors = errors;
|
|
35
|
-
this.validationErrors = validationErrors;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
function requiresStepUpAuth(wwwAuthenticate) {
|
|
39
|
-
if (!wwwAuthenticate) return false;
|
|
40
|
-
return wwwAuthenticate.includes('error="insufficient_user_authentication"');
|
|
41
|
-
}
|
|
42
|
-
function parseOrgAuthChallenge(wwwAuthenticate) {
|
|
43
|
-
if (!wwwAuthenticate) return null;
|
|
44
|
-
if (!wwwAuthenticate.includes('realm="org"')) return null;
|
|
45
|
-
const orgUuidMatch = wwwAuthenticate.match(/org_uuid="([^"]+)"/);
|
|
46
|
-
const cookieNameMatch = wwwAuthenticate.match(/cookie_name="([^"]+)"/);
|
|
47
|
-
const authUrlMatch = wwwAuthenticate.match(/auth_url="([^"]+)"/);
|
|
48
|
-
if (!orgUuidMatch?.[1] || !cookieNameMatch?.[1] || !authUrlMatch?.[1]) {
|
|
49
|
-
console.warn("Invalid org auth challenge header: missing required fields");
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
orgUuid: orgUuidMatch[1],
|
|
54
|
-
cookieName: cookieNameMatch[1],
|
|
55
|
-
authUrl: authUrlMatch[1]
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
var BaseApiClient = class {
|
|
59
|
-
baseUrl;
|
|
60
|
-
apiKey;
|
|
61
|
-
isCrossDomain;
|
|
62
|
-
fetchFunction;
|
|
63
|
-
enhancedAuthHandler;
|
|
64
|
-
enhancedAuthInProgress = null;
|
|
65
|
-
orgAuthHandler;
|
|
66
|
-
orgAuthInProgress = null;
|
|
67
|
-
actingMemberUuid;
|
|
68
|
-
orgToken;
|
|
69
|
-
/**
|
|
70
|
-
* The org_uuid that issued the current orgToken. Tracked so we can detect
|
|
71
|
-
* a 401 challenge from a *different* org and re-fire the handler — the
|
|
72
|
-
* orgToken is an opaque JWE we cannot decrypt client-side, so without this
|
|
73
|
-
* the original guard `!this.orgToken` would prevent re-auth across orgs and
|
|
74
|
-
* surface as a silent 401 in multi-org CLI workflows.
|
|
75
|
-
*/
|
|
76
|
-
orgTokenOrgUuid;
|
|
77
|
-
constructor(apiKey, baseUrl, customFetch) {
|
|
78
|
-
this.baseUrl = baseUrl;
|
|
79
|
-
this.apiKey = apiKey;
|
|
80
|
-
this.fetchFunction = customFetch || (typeof window !== "undefined" ? fetch.bind(window) : fetch);
|
|
81
|
-
const apiUrlParsed = new URL(baseUrl);
|
|
82
|
-
const currentOrigin = typeof window !== "undefined" ? window.location.origin : "";
|
|
83
|
-
this.isCrossDomain = currentOrigin !== "" && currentOrigin !== apiUrlParsed.origin;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Set the handler for enhanced authentication requirements (RFC 9470 Step-Up Auth).
|
|
87
|
-
* This handler is called when a 401 response includes WWW-Authenticate header
|
|
88
|
-
* with error="insufficient_user_authentication".
|
|
89
|
-
*/
|
|
90
|
-
setEnhancedAuthHandler(handler) {
|
|
91
|
-
this.enhancedAuthHandler = handler;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Set the handler for organization authentication requirements.
|
|
95
|
-
* This handler is called when a 401 response includes WWW-Authenticate header
|
|
96
|
-
* with realm="org". The handler should redirect the user to complete org auth.
|
|
97
|
-
*/
|
|
98
|
-
setOrgAuthHandler(handler) {
|
|
99
|
-
this.orgAuthHandler = handler;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Update the API key (used after successful re-authentication).
|
|
103
|
-
*/
|
|
104
|
-
updateApiKey(newApiKey) {
|
|
105
|
-
this.apiKey = newApiKey;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Set the acting member UUID for member identity switching.
|
|
109
|
-
* When set, all API requests will include the X-Acting-Member header.
|
|
110
|
-
* The backend will validate that the authenticated account owns this member
|
|
111
|
-
* and use it as the effective identity for the request.
|
|
112
|
-
*/
|
|
113
|
-
setActingMember(memberUuid) {
|
|
114
|
-
this.actingMemberUuid = memberUuid;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Get the current acting member UUID.
|
|
118
|
-
*/
|
|
119
|
-
getActingMember() {
|
|
120
|
-
return this.actingMemberUuid;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Set the org token for cross-domain requests.
|
|
124
|
-
* When set, all API requests will include the X-Org-Token header,
|
|
125
|
-
* allowing org-level SSO verification without cookies.
|
|
126
|
-
*
|
|
127
|
-
* `orgUuid` is the org that issued the token; passing it lets the 401
|
|
128
|
-
* handler detect a stale token when a subsequent request targets a
|
|
129
|
-
* different org and re-fire the org-auth handler instead of silently
|
|
130
|
-
* 401-ing. Callers without that context (legacy / unknown) may omit it.
|
|
131
|
-
*/
|
|
132
|
-
setOrgToken(token, orgUuid) {
|
|
133
|
-
this.orgToken = token;
|
|
134
|
-
this.orgTokenOrgUuid = token ? orgUuid : void 0;
|
|
135
|
-
}
|
|
136
|
-
async fetch(endpoint, options) {
|
|
137
|
-
try {
|
|
138
|
-
const headers = new Headers({
|
|
139
|
-
// Don't set Content-Type for FormData — the browser must set it
|
|
140
|
-
// with the multipart boundary automatically.
|
|
141
|
-
...options?.body instanceof FormData ? {} : { "Content-Type": "application/json" },
|
|
142
|
-
...options?.headers || {}
|
|
143
|
-
});
|
|
144
|
-
if (this.apiKey) {
|
|
145
|
-
headers.set("Authorization", `Bearer ${this.apiKey}`);
|
|
146
|
-
} else if (this.isCrossDomain) {
|
|
147
|
-
const requestToken = getCookieValue("requestToken");
|
|
148
|
-
if (requestToken) {
|
|
149
|
-
headers.set("Authorization", `Bearer ${requestToken}`);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
if (this.actingMemberUuid) {
|
|
153
|
-
headers.set("X-Acting-Member", this.actingMemberUuid);
|
|
154
|
-
}
|
|
155
|
-
if (this.orgToken) {
|
|
156
|
-
headers.set("X-Org-Token", this.orgToken);
|
|
157
|
-
}
|
|
158
|
-
const fullUrl = `${this.baseUrl}/api/v2/${endpoint}`;
|
|
159
|
-
const response = await this.fetchFunction(fullUrl, {
|
|
160
|
-
...options,
|
|
161
|
-
...this.apiKey ? {} : { credentials: "include" },
|
|
162
|
-
...this.isCrossDomain ? { mode: "cors" } : {},
|
|
163
|
-
headers
|
|
164
|
-
});
|
|
165
|
-
if (!response.ok) {
|
|
166
|
-
if (response.status === 401 && requiresStepUpAuth(response.headers.get("WWW-Authenticate")) && this.enhancedAuthHandler) {
|
|
167
|
-
if (this.enhancedAuthInProgress) {
|
|
168
|
-
await this.enhancedAuthInProgress;
|
|
169
|
-
} else {
|
|
170
|
-
this.enhancedAuthInProgress = this.enhancedAuthHandler();
|
|
171
|
-
try {
|
|
172
|
-
const newToken = await this.enhancedAuthInProgress;
|
|
173
|
-
this.apiKey = newToken;
|
|
174
|
-
} finally {
|
|
175
|
-
this.enhancedAuthInProgress = null;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
try {
|
|
179
|
-
return await this.fetch(endpoint, options);
|
|
180
|
-
} catch (retryError) {
|
|
181
|
-
this.orgToken = void 0;
|
|
182
|
-
this.orgTokenOrgUuid = void 0;
|
|
183
|
-
throw retryError;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
if (response.status === 401) {
|
|
187
|
-
const orgAuthInfo = parseOrgAuthChallenge(response.headers.get("WWW-Authenticate"));
|
|
188
|
-
if (orgAuthInfo && this.orgToken && this.orgTokenOrgUuid && this.orgTokenOrgUuid !== orgAuthInfo.orgUuid) {
|
|
189
|
-
this.orgToken = void 0;
|
|
190
|
-
this.orgTokenOrgUuid = void 0;
|
|
191
|
-
}
|
|
192
|
-
if (orgAuthInfo && !this.orgToken) {
|
|
193
|
-
const requestCookieName = orgAuthInfo.cookieName.replace(
|
|
194
|
-
/^orgToken/,
|
|
195
|
-
"requestOrgToken"
|
|
196
|
-
);
|
|
197
|
-
const cachedOrgToken = getCookieValue(requestCookieName);
|
|
198
|
-
if (cachedOrgToken) {
|
|
199
|
-
this.orgToken = cachedOrgToken;
|
|
200
|
-
this.orgTokenOrgUuid = orgAuthInfo.orgUuid;
|
|
201
|
-
try {
|
|
202
|
-
return await this.fetch(endpoint, options);
|
|
203
|
-
} catch (retryError) {
|
|
204
|
-
this.orgToken = void 0;
|
|
205
|
-
this.orgTokenOrgUuid = void 0;
|
|
206
|
-
throw retryError;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
if (this.orgAuthHandler) {
|
|
210
|
-
if (!this.orgAuthInProgress) {
|
|
211
|
-
const handler = this.orgAuthHandler;
|
|
212
|
-
this.orgAuthInProgress = (async () => {
|
|
213
|
-
try {
|
|
214
|
-
await handler(orgAuthInfo);
|
|
215
|
-
} finally {
|
|
216
|
-
this.orgAuthInProgress = null;
|
|
217
|
-
}
|
|
218
|
-
})();
|
|
219
|
-
}
|
|
220
|
-
await this.orgAuthInProgress;
|
|
221
|
-
const postHandlerToken = getCookieValue(requestCookieName) ?? this.orgToken;
|
|
222
|
-
if (!postHandlerToken) {
|
|
223
|
-
throw new ApiError(
|
|
224
|
-
"Organization authentication did not issue a token",
|
|
225
|
-
401
|
|
226
|
-
);
|
|
227
|
-
}
|
|
228
|
-
this.orgToken = postHandlerToken;
|
|
229
|
-
this.orgTokenOrgUuid = orgAuthInfo.orgUuid;
|
|
230
|
-
try {
|
|
231
|
-
return await this.fetch(endpoint, options);
|
|
232
|
-
} catch (retryError) {
|
|
233
|
-
this.orgToken = void 0;
|
|
234
|
-
this.orgTokenOrgUuid = void 0;
|
|
235
|
-
throw retryError;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
const errorData = await response.json().catch(() => ({}));
|
|
241
|
-
if (response.status === 401 && endpoint === "account") {
|
|
242
|
-
throw new Error("unauthorized");
|
|
243
|
-
}
|
|
244
|
-
if (Array.isArray(errorData.detail)) {
|
|
245
|
-
const formattedErrors = errorData.detail.map((error) => {
|
|
246
|
-
const location = error.loc.join(" > ");
|
|
247
|
-
return `${location}: ${error.msg}`;
|
|
248
|
-
}).join("\n");
|
|
249
|
-
throw new ApiError(`Validation Error:
|
|
250
|
-
${formattedErrors}`, response.status);
|
|
251
|
-
}
|
|
252
|
-
if (errorData.errors && Array.isArray(errorData.errors)) {
|
|
253
|
-
if (errorData.errors.length > 0 && isApiValidationError(errorData.errors[0])) {
|
|
254
|
-
const validationErrors = errorData.errors.filter(isApiValidationError);
|
|
255
|
-
const [first] = validationErrors;
|
|
256
|
-
if (first) {
|
|
257
|
-
const extra = validationErrors.length > 1 ? ` (+${validationErrors.length - 1} more)` : "";
|
|
258
|
-
const readable = `${first.field}: ${first.message}${extra}`;
|
|
259
|
-
throw new ApiError(
|
|
260
|
-
readable,
|
|
261
|
-
response.status,
|
|
262
|
-
validationErrors.map((e) => `${e.field}: ${e.message}`),
|
|
263
|
-
validationErrors
|
|
264
|
-
);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
const stringErrors = errorData.errors.filter(
|
|
268
|
-
(e) => typeof e === "string"
|
|
269
|
-
);
|
|
270
|
-
const details = stringErrors.join("; ");
|
|
271
|
-
const message = errorData.detail ? `${errorData.detail}: ${details}` : `Validation failed: ${details}`;
|
|
272
|
-
throw new ApiError(message, response.status, stringErrors);
|
|
273
|
-
}
|
|
274
|
-
const structuredError = errorData.detail || errorData;
|
|
275
|
-
if (structuredError && typeof structuredError === "object" && (structuredError.error === true || structuredError.code)) {
|
|
276
|
-
const message = structuredError.message || structuredError.code || "Unknown error";
|
|
277
|
-
const error = new ApiError(message, response.status);
|
|
278
|
-
error.errorData = structuredError;
|
|
279
|
-
throw error;
|
|
280
|
-
}
|
|
281
|
-
const errorMessage = typeof errorData.detail === "string" ? errorData.detail : errorData.message || response.statusText;
|
|
282
|
-
throw new ApiError(errorMessage, response.status);
|
|
283
|
-
}
|
|
284
|
-
if (response.status === 204) {
|
|
285
|
-
return void 0;
|
|
286
|
-
}
|
|
287
|
-
return response.json();
|
|
288
|
-
} catch (error) {
|
|
289
|
-
console.warn(error);
|
|
290
|
-
throw error;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
async fetchRaw(endpoint, options, allowedErrorStatuses = []) {
|
|
294
|
-
try {
|
|
295
|
-
const headers = new Headers({
|
|
296
|
-
...options?.headers || {}
|
|
297
|
-
});
|
|
298
|
-
if (this.apiKey) {
|
|
299
|
-
headers.set("Authorization", `Bearer ${this.apiKey}`);
|
|
300
|
-
} else if (this.isCrossDomain) {
|
|
301
|
-
const requestToken = getCookieValue("requestToken");
|
|
302
|
-
if (requestToken) {
|
|
303
|
-
headers.set("Authorization", `Bearer ${requestToken}`);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
if (this.actingMemberUuid) {
|
|
307
|
-
headers.set("X-Acting-Member", this.actingMemberUuid);
|
|
308
|
-
}
|
|
309
|
-
if (this.orgToken) {
|
|
310
|
-
headers.set("X-Org-Token", this.orgToken);
|
|
311
|
-
}
|
|
312
|
-
const response = await this.fetchFunction(`${this.baseUrl}/api/v2/${endpoint}`, {
|
|
313
|
-
...options,
|
|
314
|
-
...this.apiKey ? {} : { credentials: "include" },
|
|
315
|
-
...this.isCrossDomain ? { mode: "cors" } : {},
|
|
316
|
-
headers
|
|
317
|
-
});
|
|
318
|
-
if (!response.ok) {
|
|
319
|
-
if (response.status === 401 && requiresStepUpAuth(response.headers.get("WWW-Authenticate")) && this.enhancedAuthHandler) {
|
|
320
|
-
if (this.enhancedAuthInProgress) {
|
|
321
|
-
await this.enhancedAuthInProgress;
|
|
322
|
-
} else {
|
|
323
|
-
this.enhancedAuthInProgress = this.enhancedAuthHandler();
|
|
324
|
-
try {
|
|
325
|
-
const newToken = await this.enhancedAuthInProgress;
|
|
326
|
-
this.apiKey = newToken;
|
|
327
|
-
} finally {
|
|
328
|
-
this.enhancedAuthInProgress = null;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
try {
|
|
332
|
-
return await this.fetchRaw(endpoint, options, allowedErrorStatuses);
|
|
333
|
-
} catch (retryError) {
|
|
334
|
-
this.orgToken = void 0;
|
|
335
|
-
this.orgTokenOrgUuid = void 0;
|
|
336
|
-
throw retryError;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
if (response.status === 401) {
|
|
340
|
-
const orgAuthInfo = parseOrgAuthChallenge(response.headers.get("WWW-Authenticate"));
|
|
341
|
-
if (orgAuthInfo && this.orgToken && this.orgTokenOrgUuid && this.orgTokenOrgUuid !== orgAuthInfo.orgUuid) {
|
|
342
|
-
this.orgToken = void 0;
|
|
343
|
-
this.orgTokenOrgUuid = void 0;
|
|
344
|
-
}
|
|
345
|
-
if (orgAuthInfo && !this.orgToken) {
|
|
346
|
-
const requestCookieName = orgAuthInfo.cookieName.replace(
|
|
347
|
-
/^orgToken/,
|
|
348
|
-
"requestOrgToken"
|
|
349
|
-
);
|
|
350
|
-
const cachedOrgToken = getCookieValue(requestCookieName);
|
|
351
|
-
if (cachedOrgToken) {
|
|
352
|
-
this.orgToken = cachedOrgToken;
|
|
353
|
-
this.orgTokenOrgUuid = orgAuthInfo.orgUuid;
|
|
354
|
-
try {
|
|
355
|
-
return await this.fetchRaw(endpoint, options, allowedErrorStatuses);
|
|
356
|
-
} catch (retryError) {
|
|
357
|
-
this.orgToken = void 0;
|
|
358
|
-
this.orgTokenOrgUuid = void 0;
|
|
359
|
-
throw retryError;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
if (this.orgAuthHandler) {
|
|
363
|
-
if (!this.orgAuthInProgress) {
|
|
364
|
-
const handler = this.orgAuthHandler;
|
|
365
|
-
this.orgAuthInProgress = (async () => {
|
|
366
|
-
try {
|
|
367
|
-
await handler(orgAuthInfo);
|
|
368
|
-
} finally {
|
|
369
|
-
this.orgAuthInProgress = null;
|
|
370
|
-
}
|
|
371
|
-
})();
|
|
372
|
-
}
|
|
373
|
-
await this.orgAuthInProgress;
|
|
374
|
-
const postHandlerToken = getCookieValue(requestCookieName) ?? this.orgToken;
|
|
375
|
-
if (!postHandlerToken) {
|
|
376
|
-
throw new ApiError(
|
|
377
|
-
"Organization authentication did not issue a token",
|
|
378
|
-
401
|
|
379
|
-
);
|
|
380
|
-
}
|
|
381
|
-
this.orgToken = postHandlerToken;
|
|
382
|
-
this.orgTokenOrgUuid = orgAuthInfo.orgUuid;
|
|
383
|
-
try {
|
|
384
|
-
return await this.fetchRaw(endpoint, options, allowedErrorStatuses);
|
|
385
|
-
} catch (retryError) {
|
|
386
|
-
this.orgToken = void 0;
|
|
387
|
-
this.orgTokenOrgUuid = void 0;
|
|
388
|
-
throw retryError;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
if (allowedErrorStatuses.includes(response.status)) {
|
|
394
|
-
return response;
|
|
395
|
-
}
|
|
396
|
-
const errorText = await response.text().catch(() => "");
|
|
397
|
-
throw new ApiError(errorText || response.statusText, response.status);
|
|
398
|
-
}
|
|
399
|
-
return response;
|
|
400
|
-
} catch (error) {
|
|
401
|
-
console.warn(error);
|
|
402
|
-
throw error;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
/**
|
|
406
|
-
* Fetch from root path (not prefixed with /api/v2/)
|
|
407
|
-
* Used for OAuth and other non-API endpoints
|
|
408
|
-
*/
|
|
409
|
-
async fetchRoot(path, options) {
|
|
410
|
-
try {
|
|
411
|
-
const headers = new Headers({
|
|
412
|
-
...options?.body instanceof FormData ? {} : { "Content-Type": "application/json" },
|
|
413
|
-
...options?.headers || {}
|
|
414
|
-
});
|
|
415
|
-
if (this.apiKey) {
|
|
416
|
-
headers.set("Authorization", `Bearer ${this.apiKey}`);
|
|
417
|
-
} else if (this.isCrossDomain) {
|
|
418
|
-
const requestToken = getCookieValue("requestToken");
|
|
419
|
-
if (requestToken) {
|
|
420
|
-
headers.set("Authorization", `Bearer ${requestToken}`);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
if (this.actingMemberUuid) {
|
|
424
|
-
headers.set("X-Acting-Member", this.actingMemberUuid);
|
|
425
|
-
}
|
|
426
|
-
if (this.orgToken) {
|
|
427
|
-
headers.set("X-Org-Token", this.orgToken);
|
|
428
|
-
}
|
|
429
|
-
const fullUrl = `${this.baseUrl}/${path}`;
|
|
430
|
-
const response = await this.fetchFunction(fullUrl, {
|
|
431
|
-
...options,
|
|
432
|
-
...this.apiKey ? {} : { credentials: "include" },
|
|
433
|
-
...this.isCrossDomain ? { mode: "cors" } : {},
|
|
434
|
-
headers
|
|
435
|
-
});
|
|
436
|
-
if (!response.ok) {
|
|
437
|
-
if (response.status === 404) {
|
|
438
|
-
return null;
|
|
439
|
-
}
|
|
440
|
-
const errorData = await response.json().catch(() => ({}));
|
|
441
|
-
const errorMessage = errorData.detail || errorData.message || response.statusText;
|
|
442
|
-
throw new ApiError(errorMessage, response.status);
|
|
443
|
-
}
|
|
444
|
-
if (response.status === 204) {
|
|
445
|
-
return void 0;
|
|
446
|
-
}
|
|
447
|
-
return response.json();
|
|
448
|
-
} catch (error) {
|
|
449
|
-
console.warn(error);
|
|
450
|
-
throw error;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
ApiError,
|
|
3
|
+
BaseApiClient
|
|
4
|
+
} from "./chunk-FSSXKQR5.js";
|
|
454
5
|
|
|
455
6
|
// src/api/abilities.ts
|
|
456
7
|
var AbilitiesApi = class extends BaseApiClient {
|
|
@@ -466,20 +17,22 @@ var AbilitiesApi = class extends BaseApiClient {
|
|
|
466
17
|
}
|
|
467
18
|
/** Get the full spec for a single ability type by slug. */
|
|
468
19
|
async getAbilityType(wid, slug) {
|
|
469
|
-
return this.fetch(
|
|
470
|
-
`w/${wid}/abilities/types/${encodeURIComponent(slug)}`
|
|
471
|
-
);
|
|
20
|
+
return this.fetch(`w/${wid}/abilities/types/${encodeURIComponent(slug)}`);
|
|
472
21
|
}
|
|
473
22
|
/**
|
|
474
23
|
* List configured ability instances for a workflow or task scope.
|
|
475
|
-
*
|
|
24
|
+
* Provide exactly one of:
|
|
25
|
+
* - workflow scope: workflowId (stable root → draft revision) and/or
|
|
26
|
+
* workflowRevisionId (explicit pin)
|
|
27
|
+
* - taskId for task-scoped abilities
|
|
476
28
|
*/
|
|
477
29
|
async listAbilities(wid, options) {
|
|
478
30
|
const params = new URLSearchParams();
|
|
479
31
|
if (options.workflowId !== void 0)
|
|
480
32
|
params.append("workflowId", options.workflowId.toString());
|
|
481
|
-
if (options.
|
|
482
|
-
params.append("
|
|
33
|
+
if (options.workflowRevisionId !== void 0)
|
|
34
|
+
params.append("workflowRevisionId", options.workflowRevisionId.toString());
|
|
35
|
+
if (options.taskId !== void 0) params.append("taskId", options.taskId.toString());
|
|
483
36
|
return this.fetch(`w/${wid}/abilities?${params}`);
|
|
484
37
|
}
|
|
485
38
|
/** Create (enable) a configured ability on a workflow or task scope. */
|
|
@@ -502,6 +55,20 @@ var AbilitiesApi = class extends BaseApiClient {
|
|
|
502
55
|
method: "DELETE"
|
|
503
56
|
});
|
|
504
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* List recipient-directory rows approved for Charleston PMD test delivery
|
|
60
|
+
* (CS-150). Returns only {recipientKey, displayLabel} for active,
|
|
61
|
+
* test-delivery-allowed rows with a device id — never the PatientSync
|
|
62
|
+
* recipient_id. Scoped to agents:write + the charleston_nephrology_pmd_paging
|
|
63
|
+
* feature; used by the ability-config test-delivery dropdown. Kept on the
|
|
64
|
+
* ability-configuration API (not generic DataRecords) because the actual
|
|
65
|
+
* ability-editor scopes do not guarantee generic record access.
|
|
66
|
+
*/
|
|
67
|
+
async getCharlestonTestDeliveryRecipients(wid) {
|
|
68
|
+
return this.fetch(
|
|
69
|
+
`w/${wid}/app-connections/charleston_nephrology/test-delivery/eligible-recipients`
|
|
70
|
+
);
|
|
71
|
+
}
|
|
505
72
|
};
|
|
506
73
|
|
|
507
74
|
// src/api/access-grants.ts
|
|
@@ -573,6 +140,24 @@ var AccessGrantsApi = class extends BaseApiClient {
|
|
|
573
140
|
);
|
|
574
141
|
return resp.items;
|
|
575
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* List access grants *received* by a member (grantee view) — the
|
|
145
|
+
* "what can this agent do without asking?" list. Filter with
|
|
146
|
+
* status=active and/or a capabilityClass (e.g. 'tool.always_allow').
|
|
147
|
+
*/
|
|
148
|
+
async getGranteeGrants(wid, memberId, params) {
|
|
149
|
+
const searchParams = new URLSearchParams();
|
|
150
|
+
if (params?.status) searchParams.set("status", params.status);
|
|
151
|
+
if (params?.capabilityClass) {
|
|
152
|
+
searchParams.set("capability_class", params.capabilityClass);
|
|
153
|
+
}
|
|
154
|
+
if (params?.page) searchParams.set("page", params.page.toString());
|
|
155
|
+
if (params?.pageSize) searchParams.set("page_size", params.pageSize.toString());
|
|
156
|
+
const qs = searchParams.toString();
|
|
157
|
+
return this.fetch(
|
|
158
|
+
`w/${wid}/access-grants/grantee/${memberId}${qs ? `?${qs}` : ""}`
|
|
159
|
+
);
|
|
160
|
+
}
|
|
576
161
|
};
|
|
577
162
|
|
|
578
163
|
// src/api/agent-tasks.ts
|
|
@@ -659,25 +244,6 @@ var AgentsApi = class extends BaseApiClient {
|
|
|
659
244
|
method: "POST"
|
|
660
245
|
});
|
|
661
246
|
}
|
|
662
|
-
/** Resolve runtime tools for an agent on a simulated channel. */
|
|
663
|
-
async resolveAgentTools(wid, id, options) {
|
|
664
|
-
const params = new URLSearchParams();
|
|
665
|
-
params.append("channel", options.channel);
|
|
666
|
-
if (options.taskId !== void 0) params.append("taskId", options.taskId.toString());
|
|
667
|
-
if (options.taskUuid !== void 0) params.append("taskUuid", options.taskUuid);
|
|
668
|
-
return this.fetch(`w/${wid}/agents/${id}/resolve-tools?${params}`);
|
|
669
|
-
}
|
|
670
|
-
/**
|
|
671
|
-
* List the configured abilities effective for an agent via a task's workflow.
|
|
672
|
-
* Requires taskId because abilities are scoped to workflows/tasks, not agents.
|
|
673
|
-
*/
|
|
674
|
-
async listAgentAbilities(wid, id, options) {
|
|
675
|
-
const params = new URLSearchParams();
|
|
676
|
-
params.append("taskId", options.taskId.toString());
|
|
677
|
-
return this.fetch(
|
|
678
|
-
`w/${wid}/agents/${id}/abilities?${params}`
|
|
679
|
-
);
|
|
680
|
-
}
|
|
681
247
|
};
|
|
682
248
|
|
|
683
249
|
// src/api/ai-models.ts
|
|
@@ -874,8 +440,7 @@ var AssignmentsApi = class extends BaseApiClient {
|
|
|
874
440
|
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
875
441
|
if (options.mine) params.append("mine", options.mine.toString());
|
|
876
442
|
if (options.taskId) params.append("taskId", options.taskId.toString());
|
|
877
|
-
if (options.memberId !== void 0)
|
|
878
|
-
params.append("memberId", options.memberId.toString());
|
|
443
|
+
if (options.memberId !== void 0) params.append("memberId", options.memberId.toString());
|
|
879
444
|
if (options.status) params.append("status", options.status);
|
|
880
445
|
return this.fetch(
|
|
881
446
|
`w/${wid}/assignments${params.toString() ? `?${params.toString()}` : ""}`
|
|
@@ -1004,6 +569,20 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1004
569
|
body: JSON.stringify(info)
|
|
1005
570
|
});
|
|
1006
571
|
}
|
|
572
|
+
/**
|
|
573
|
+
* Persist the account's FIRST-touch marketing attribution (write-once).
|
|
574
|
+
*
|
|
575
|
+
* Called by the browser at signup completion with its resolved UTM /
|
|
576
|
+
* referrer / landing-page capture. The server keeps the first write and
|
|
577
|
+
* ignores later posts (`recorded: false`), so calling this again is
|
|
578
|
+
* harmless. Marketing context only — never emails, phones, or free text.
|
|
579
|
+
*/
|
|
580
|
+
async recordAcquisition(request) {
|
|
581
|
+
return this.fetch("account/acquisition", {
|
|
582
|
+
method: "POST",
|
|
583
|
+
body: JSON.stringify(request)
|
|
584
|
+
});
|
|
585
|
+
}
|
|
1007
586
|
/** Initiate SMS login by sending a verification code to the given phone number. */
|
|
1008
587
|
async login(phoneNumber, wid, organizationUuid) {
|
|
1009
588
|
const params = new URLSearchParams();
|
|
@@ -1134,15 +713,11 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1134
713
|
body: JSON.stringify({ email, organizationUuid, redirectUrl })
|
|
1135
714
|
});
|
|
1136
715
|
}
|
|
1137
|
-
/** Validate a magic link token
|
|
1138
|
-
async validateMagicLink(token
|
|
1139
|
-
const body = { token };
|
|
1140
|
-
if (otp) {
|
|
1141
|
-
body.otp = otp;
|
|
1142
|
-
}
|
|
716
|
+
/** Validate a magic link token to complete authentication. */
|
|
717
|
+
async validateMagicLink(token) {
|
|
1143
718
|
return await this.fetch(`auth/validate-magic-link`, {
|
|
1144
719
|
method: "POST",
|
|
1145
|
-
body: JSON.stringify(
|
|
720
|
+
body: JSON.stringify({ token })
|
|
1146
721
|
});
|
|
1147
722
|
}
|
|
1148
723
|
// ===== EMAIL VERIFICATION METHODS =====
|
|
@@ -1231,23 +806,29 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1231
806
|
// ===== TWO-FACTOR AUTHENTICATION LOGIN METHODS =====
|
|
1232
807
|
/** Verify a TOTP code during login to complete two-factor authentication. */
|
|
1233
808
|
async verifyTOTPAuth(tempToken, code) {
|
|
1234
|
-
return this.fetch(
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
809
|
+
return this.fetch(
|
|
810
|
+
"auth/2fa/auth/totp",
|
|
811
|
+
{
|
|
812
|
+
method: "POST",
|
|
813
|
+
body: JSON.stringify({
|
|
814
|
+
temp_token: tempToken,
|
|
815
|
+
code
|
|
816
|
+
})
|
|
817
|
+
}
|
|
818
|
+
);
|
|
1241
819
|
}
|
|
1242
820
|
/** Verify a recovery code during login to complete two-factor authentication. */
|
|
1243
821
|
async verifyRecoveryCodeAuth(tempToken, code) {
|
|
1244
|
-
return this.fetch(
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
822
|
+
return this.fetch(
|
|
823
|
+
"auth/2fa/auth/recovery",
|
|
824
|
+
{
|
|
825
|
+
method: "POST",
|
|
826
|
+
body: JSON.stringify({
|
|
827
|
+
temp_token: tempToken,
|
|
828
|
+
code
|
|
829
|
+
})
|
|
830
|
+
}
|
|
831
|
+
);
|
|
1251
832
|
}
|
|
1252
833
|
/** Get WebAuthn credential request options for two-factor login verification. */
|
|
1253
834
|
async getWebAuthnAuthOptions(tempToken) {
|
|
@@ -1260,13 +841,16 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1260
841
|
}
|
|
1261
842
|
/** Verify a WebAuthn assertion during login to complete two-factor authentication. */
|
|
1262
843
|
async verifyWebAuthnAuth(tempToken, assertionResponse) {
|
|
1263
|
-
return this.fetch(
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
844
|
+
return this.fetch(
|
|
845
|
+
"auth/2fa/webauthn",
|
|
846
|
+
{
|
|
847
|
+
method: "POST",
|
|
848
|
+
body: JSON.stringify({
|
|
849
|
+
temp_token: tempToken,
|
|
850
|
+
assertion_response: assertionResponse
|
|
851
|
+
})
|
|
852
|
+
}
|
|
853
|
+
);
|
|
1270
854
|
}
|
|
1271
855
|
// ===== ORGANIZATION MEMBERSHIP METHODS =====
|
|
1272
856
|
/** List all organizations the current account belongs to. */
|
|
@@ -1648,6 +1232,35 @@ var CallsApi = class extends BaseApiClient {
|
|
|
1648
1232
|
async getMessageTiming(wid, chatId) {
|
|
1649
1233
|
return this.fetch(`w/${wid}/recordings/chat/${chatId}/message-timing`);
|
|
1650
1234
|
}
|
|
1235
|
+
/**
|
|
1236
|
+
* Get PHI-safe provenance metadata for the recording served by
|
|
1237
|
+
* `/audio.wav` — source, encryption, channels, duration, status, etc.
|
|
1238
|
+
* Staff-only Twilio SIDs are present only for superusers. Returns 404
|
|
1239
|
+
* when the chat has no native recording row (legacy chunk-only playback).
|
|
1240
|
+
*/
|
|
1241
|
+
async getRecordingInfo(wid, chatId) {
|
|
1242
|
+
return this.fetch(`w/${wid}/recordings/chat/${chatId}/info`);
|
|
1243
|
+
}
|
|
1244
|
+
/** List the recorded audio chunks for a chat (metadata only). */
|
|
1245
|
+
async listChatRecordings(wid, chatId, options = {}) {
|
|
1246
|
+
const params = new URLSearchParams();
|
|
1247
|
+
if (options.role) params.set("role", options.role);
|
|
1248
|
+
return this.fetch(
|
|
1249
|
+
`w/${wid}/recordings/chat/${chatId}${params.toString() ? `?${params.toString()}` : ""}`
|
|
1250
|
+
);
|
|
1251
|
+
}
|
|
1252
|
+
/**
|
|
1253
|
+
* Get a single short-lived presigned URL to download the complete call
|
|
1254
|
+
* recording as one WAV file. The first request assembles + caches the
|
|
1255
|
+
* full-call WAV; later requests reuse it.
|
|
1256
|
+
*/
|
|
1257
|
+
async getCallRecordingDownloadUrl(wid, chatId, options = {}) {
|
|
1258
|
+
const params = new URLSearchParams();
|
|
1259
|
+
if (options.expiresIn !== void 0) params.set("expires_in", String(options.expiresIn));
|
|
1260
|
+
return this.fetch(
|
|
1261
|
+
`w/${wid}/recordings/chat/${chatId}/download-url${params.toString() ? `?${params.toString()}` : ""}`
|
|
1262
|
+
);
|
|
1263
|
+
}
|
|
1651
1264
|
};
|
|
1652
1265
|
|
|
1653
1266
|
// src/api/cel.ts
|
|
@@ -1686,8 +1299,7 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1686
1299
|
if (options.paused !== void 0) params.append("paused", options.paused.toString());
|
|
1687
1300
|
if (options.archived !== void 0) params.append("archived", options.archived.toString());
|
|
1688
1301
|
if (options.channel) params.append("channel", options.channel);
|
|
1689
|
-
|
|
1690
|
-
params.append("chatType", chatType);
|
|
1302
|
+
if (options.chatType) params.append("chatType", options.chatType);
|
|
1691
1303
|
if (options.memberId !== void 0) params.append("memberId", options.memberId.toString());
|
|
1692
1304
|
if (options.assistantMemberId !== void 0)
|
|
1693
1305
|
params.append("assistantMemberId", options.assistantMemberId.toString());
|
|
@@ -1698,6 +1310,11 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1698
1310
|
if (options.filters && options.filters.length > 0) {
|
|
1699
1311
|
params.append("filters", JSON.stringify(options.filters));
|
|
1700
1312
|
}
|
|
1313
|
+
if (options.query) params.append("query", JSON.stringify(options.query));
|
|
1314
|
+
if (options.workflowId !== void 0)
|
|
1315
|
+
params.append("workflowId", options.workflowId.toString());
|
|
1316
|
+
if (options.workflowRevisionId !== void 0)
|
|
1317
|
+
params.append("workflowRevisionId", options.workflowRevisionId.toString());
|
|
1701
1318
|
if (options.createdAfter) params.append("createdAfter", options.createdAfter);
|
|
1702
1319
|
if (options.createdBefore) params.append("createdBefore", options.createdBefore);
|
|
1703
1320
|
return params;
|
|
@@ -1732,6 +1349,17 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1732
1349
|
async getChatTokenUsage(wid, chatId) {
|
|
1733
1350
|
return this.fetch(`w/${wid}/chats/${chatId}/token-usage`);
|
|
1734
1351
|
}
|
|
1352
|
+
/** List scheduled callbacks for a chat (newest first). */
|
|
1353
|
+
async getChatCallbacks(wid, chatId) {
|
|
1354
|
+
return this.fetch(`w/${wid}/chats/${chatId}/callbacks`);
|
|
1355
|
+
}
|
|
1356
|
+
/** Cancel a pending scheduled callback on a chat. */
|
|
1357
|
+
async cancelChatCallback(wid, chatId, callbackId) {
|
|
1358
|
+
return this.fetch(
|
|
1359
|
+
`w/${wid}/chats/${chatId}/callbacks/${callbackId}/cancel`,
|
|
1360
|
+
{ method: "POST" }
|
|
1361
|
+
);
|
|
1362
|
+
}
|
|
1735
1363
|
/** Get todo items extracted from a chat. */
|
|
1736
1364
|
async getChatTodos(wid, chatId) {
|
|
1737
1365
|
return this.fetch(`w/${wid}/chats/${chatId}/todos`);
|
|
@@ -1770,9 +1398,11 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1770
1398
|
}
|
|
1771
1399
|
/** Create a new chat. */
|
|
1772
1400
|
async createChat(wid, chat) {
|
|
1401
|
+
const { agentMemberId, ...rest } = chat;
|
|
1402
|
+
const payload = agentMemberId !== void 0 && rest.assistantMemberId === void 0 ? { ...rest, assistantMemberId: agentMemberId } : rest;
|
|
1773
1403
|
return this.fetch(`w/${wid}/chats`, {
|
|
1774
1404
|
method: "POST",
|
|
1775
|
-
body: JSON.stringify(
|
|
1405
|
+
body: JSON.stringify(payload)
|
|
1776
1406
|
});
|
|
1777
1407
|
}
|
|
1778
1408
|
/**
|
|
@@ -1805,6 +1435,25 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1805
1435
|
body: JSON.stringify(chat)
|
|
1806
1436
|
});
|
|
1807
1437
|
}
|
|
1438
|
+
/**
|
|
1439
|
+
* Get per-chat model provenance for the Chat sidebar's model summary area:
|
|
1440
|
+
* the effective chat + realtime models, the agent's current default (the
|
|
1441
|
+
* reset/inherit target), and pinned/matches flags.
|
|
1442
|
+
*/
|
|
1443
|
+
async getChatModelOverride(wid, id) {
|
|
1444
|
+
return this.fetch(`w/${wid}/chats/${id}/model-override`);
|
|
1445
|
+
}
|
|
1446
|
+
/**
|
|
1447
|
+
* Pin or reset the per-chat chat/realtime model snapshot. A concrete model id
|
|
1448
|
+
* pins that model; an empty/null id resets it to the agent's current default.
|
|
1449
|
+
* Only fields present in the payload are touched.
|
|
1450
|
+
*/
|
|
1451
|
+
async updateChatModelOverride(wid, id, override) {
|
|
1452
|
+
return this.fetch(`w/${wid}/chats/${id}/model-override`, {
|
|
1453
|
+
method: "PUT",
|
|
1454
|
+
body: JSON.stringify(override)
|
|
1455
|
+
});
|
|
1456
|
+
}
|
|
1808
1457
|
/** Update the mute status of a chat. */
|
|
1809
1458
|
async updateChatMute(wid, id, muted) {
|
|
1810
1459
|
return this.fetch(`w/${wid}/chats/${id}/mute`, {
|
|
@@ -1835,7 +1484,8 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1835
1484
|
}
|
|
1836
1485
|
);
|
|
1837
1486
|
}
|
|
1838
|
-
/** List messages in a chat with optional pagination.
|
|
1487
|
+
/** List messages in a chat with optional pagination.
|
|
1488
|
+
* ``id`` is the numeric chat id (documented) or the chat uuid (accepted). */
|
|
1839
1489
|
async getChatMessages(wid, id, limit, offset) {
|
|
1840
1490
|
const params = new URLSearchParams();
|
|
1841
1491
|
if (limit) params.append("limit", limit.toString());
|
|
@@ -1874,13 +1524,35 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
1874
1524
|
})
|
|
1875
1525
|
});
|
|
1876
1526
|
}
|
|
1877
|
-
/**
|
|
1878
|
-
|
|
1527
|
+
/**
|
|
1528
|
+
* List durable feedback rows for a chat (thumbs, explicit, supervisor, extracted).
|
|
1529
|
+
*/
|
|
1530
|
+
async getChatFeedback(wid, chatId, options = {}) {
|
|
1531
|
+
const params = new URLSearchParams();
|
|
1532
|
+
if (options.page != null) params.set("page", String(options.page));
|
|
1533
|
+
if (options.pageSize != null) params.set("pageSize", String(options.pageSize));
|
|
1534
|
+
if (options.source) params.set("source", options.source);
|
|
1535
|
+
if (options.rating) params.set("rating", options.rating);
|
|
1536
|
+
if (options.authorKind) params.set("authorKind", options.authorKind);
|
|
1537
|
+
const qs = params.toString();
|
|
1538
|
+
return this.fetch(
|
|
1539
|
+
`w/${wid}/chats/${chatId}/feedback${qs ? `?${qs}` : ""}`
|
|
1540
|
+
);
|
|
1541
|
+
}
|
|
1542
|
+
/**
|
|
1543
|
+
* Rate a chat message by its UUID.
|
|
1544
|
+
* Optional ``comment`` updates free-text details on the same durable rating row.
|
|
1545
|
+
*/
|
|
1546
|
+
async rateMessage(wid, chatId, messageUuid, rating, comment) {
|
|
1547
|
+
const body = { rating };
|
|
1548
|
+
if (comment !== void 0) {
|
|
1549
|
+
body.comment = comment;
|
|
1550
|
+
}
|
|
1879
1551
|
return this.fetch(
|
|
1880
1552
|
`w/${wid}/chats/${chatId}/messages/${messageUuid}/rate`,
|
|
1881
1553
|
{
|
|
1882
1554
|
method: "POST",
|
|
1883
|
-
body: JSON.stringify(
|
|
1555
|
+
body: JSON.stringify(body)
|
|
1884
1556
|
}
|
|
1885
1557
|
);
|
|
1886
1558
|
}
|
|
@@ -2215,14 +1887,61 @@ var DataTypesApi = class extends BaseApiClient {
|
|
|
2215
1887
|
async getDataRecords(wid, dataTypeId, options) {
|
|
2216
1888
|
const params = new URLSearchParams();
|
|
2217
1889
|
if (options?.memberId !== void 0) params.append("member_id", options.memberId.toString());
|
|
1890
|
+
if (options?.memberIds?.length) params.append("member_ids", options.memberIds.join(","));
|
|
2218
1891
|
if (options?.search) params.append("search", options.search);
|
|
2219
1892
|
if (options?.searchField) params.append("search_field", options.searchField);
|
|
1893
|
+
if (options?.dataRecordFilterId != null) {
|
|
1894
|
+
params.append("dataRecordFilterId", options.dataRecordFilterId.toString());
|
|
1895
|
+
}
|
|
1896
|
+
if (options?.query != null) params.append("query", JSON.stringify(options.query));
|
|
2220
1897
|
if (options?.page) params.append("page", options.page.toString());
|
|
2221
1898
|
if (options?.pageSize) params.append("page_size", options.pageSize.toString());
|
|
2222
1899
|
return this.fetch(
|
|
2223
1900
|
`w/${wid}/data-types/${dataTypeId}/records${params?.toString() ? `?${params.toString()}` : ""}`
|
|
2224
1901
|
);
|
|
2225
1902
|
}
|
|
1903
|
+
// Data-record filter APIs (saved Query IR predicates per form)
|
|
1904
|
+
/** List saved data-record filters, optionally scoped to one DataType. */
|
|
1905
|
+
async getDataRecordFilters(wid, options) {
|
|
1906
|
+
const params = new URLSearchParams();
|
|
1907
|
+
if (options?.dataTypeId != null) {
|
|
1908
|
+
params.append("dataTypeId", options.dataTypeId.toString());
|
|
1909
|
+
}
|
|
1910
|
+
const qs = params.toString();
|
|
1911
|
+
return this.fetch(
|
|
1912
|
+
`w/${wid}/data-record-filters${qs ? `?${qs}` : ""}`
|
|
1913
|
+
);
|
|
1914
|
+
}
|
|
1915
|
+
/** Get a single data-record filter by ID. */
|
|
1916
|
+
async getDataRecordFilter(wid, filterId) {
|
|
1917
|
+
return this.fetch(`w/${wid}/data-record-filters/${filterId}`);
|
|
1918
|
+
}
|
|
1919
|
+
/** Create a new saved data-record filter. */
|
|
1920
|
+
async createDataRecordFilter(wid, data) {
|
|
1921
|
+
return this.fetch(`w/${wid}/data-record-filters`, {
|
|
1922
|
+
method: "POST",
|
|
1923
|
+
body: JSON.stringify(data)
|
|
1924
|
+
});
|
|
1925
|
+
}
|
|
1926
|
+
/** Update a saved data-record filter. */
|
|
1927
|
+
async updateDataRecordFilter(wid, filterId, data) {
|
|
1928
|
+
return this.fetch(`w/${wid}/data-record-filters/${filterId}`, {
|
|
1929
|
+
method: "PUT",
|
|
1930
|
+
body: JSON.stringify(data)
|
|
1931
|
+
});
|
|
1932
|
+
}
|
|
1933
|
+
/** Delete a saved data-record filter. */
|
|
1934
|
+
async deleteDataRecordFilter(wid, filterId) {
|
|
1935
|
+
return this.fetch(`w/${wid}/data-record-filters/${filterId}`, {
|
|
1936
|
+
method: "DELETE"
|
|
1937
|
+
});
|
|
1938
|
+
}
|
|
1939
|
+
/** Get the count of records matching a saved filter. */
|
|
1940
|
+
async getDataRecordFilterCount(wid, filterId) {
|
|
1941
|
+
return this.fetch(
|
|
1942
|
+
`w/${wid}/data-record-filters/${filterId}/count`
|
|
1943
|
+
);
|
|
1944
|
+
}
|
|
2226
1945
|
/** Get a single data record by ID. */
|
|
2227
1946
|
async getDataRecord(wid, recordId) {
|
|
2228
1947
|
return this.fetch(`w/${wid}/data-types/records/${recordId}`);
|
|
@@ -2335,6 +2054,38 @@ var DiscordBotsApi = class extends BaseApiClient {
|
|
|
2335
2054
|
body: JSON.stringify(data)
|
|
2336
2055
|
});
|
|
2337
2056
|
}
|
|
2057
|
+
/**
|
|
2058
|
+
* Step-up preflight for the Discord account-link flow (GH #20196).
|
|
2059
|
+
*
|
|
2060
|
+
* A no-side-effect GET enforcing the same authenticated, stepped-up
|
|
2061
|
+
* `apps:write` session as authorize/complete-link. Call this through the
|
|
2062
|
+
* client *before* the full-page navigation to `/oauth/authorize`: a 401
|
|
2063
|
+
* `insufficient_user_authentication` triggers the SDK's enhanced-auth
|
|
2064
|
+
* (step-up) modal + retry, so a below-assurance session is prompted here
|
|
2065
|
+
* rather than hitting a raw 401 on a top-level browser navigation.
|
|
2066
|
+
* Resolves (204) once the session is sufficiently assured.
|
|
2067
|
+
*/
|
|
2068
|
+
async discordLinkPreflight(wid) {
|
|
2069
|
+
return this.fetch(`w/${wid}/app-connections/discord/oauth/link/preflight`);
|
|
2070
|
+
}
|
|
2071
|
+
/**
|
|
2072
|
+
* Complete an authenticated Discord account link (GH #20196).
|
|
2073
|
+
*
|
|
2074
|
+
* POST-only. Exchanges the one-time opaque handle (issued by the OAuth
|
|
2075
|
+
* callback and carried in the `?discord_link_handle=` return param) for a
|
|
2076
|
+
* persisted MemberCredential. Requires an authenticated, step-up-protected
|
|
2077
|
+
* session with `apps:write`; a 401 `insufficient_user_authentication`
|
|
2078
|
+
* triggers the SDK's enhanced-auth (step-up) retry automatically.
|
|
2079
|
+
*/
|
|
2080
|
+
async completeDiscordLink(wid, data) {
|
|
2081
|
+
return this.fetch(
|
|
2082
|
+
`w/${wid}/app-connections/discord/oauth/complete-link`,
|
|
2083
|
+
{
|
|
2084
|
+
method: "POST",
|
|
2085
|
+
body: JSON.stringify(data)
|
|
2086
|
+
}
|
|
2087
|
+
);
|
|
2088
|
+
}
|
|
2338
2089
|
/**
|
|
2339
2090
|
* Update an existing Discord bot configuration.
|
|
2340
2091
|
*/
|
|
@@ -2527,7 +2278,8 @@ var EventsApi = class extends BaseApiClient {
|
|
|
2527
2278
|
if (params.taskId) searchParams.append("taskId", params.taskId.toString());
|
|
2528
2279
|
if (params.dataTypeId) searchParams.append("dataTypeId", params.dataTypeId.toString());
|
|
2529
2280
|
if (params.routineId) searchParams.append("routineId", params.routineId.toString());
|
|
2530
|
-
if (params.
|
|
2281
|
+
if (params.workflowRevisionId)
|
|
2282
|
+
searchParams.append("workflowRevisionId", params.workflowRevisionId.toString());
|
|
2531
2283
|
if (params.journeyStepId)
|
|
2532
2284
|
searchParams.append("journeyStepId", params.journeyStepId.toString());
|
|
2533
2285
|
if (params.includeDisabled) searchParams.append("includeDisabled", "true");
|
|
@@ -2557,6 +2309,13 @@ var EventsApi = class extends BaseApiClient {
|
|
|
2557
2309
|
method: "DELETE"
|
|
2558
2310
|
});
|
|
2559
2311
|
}
|
|
2312
|
+
/** Send a one-off test webhook for an existing webhook event rule. */
|
|
2313
|
+
async testWebhook(wid, id, request) {
|
|
2314
|
+
return this.fetch(`w/${wid}/event-rules/${id}/test-webhook`, {
|
|
2315
|
+
method: "POST",
|
|
2316
|
+
body: JSON.stringify(request)
|
|
2317
|
+
});
|
|
2318
|
+
}
|
|
2560
2319
|
/** Reorder event rules by specifying the desired rule ID sequence. */
|
|
2561
2320
|
async reorderEventRules(wid, ruleIds) {
|
|
2562
2321
|
return this.fetch(`w/${wid}/event-rules/reorder`, {
|
|
@@ -2591,7 +2350,8 @@ var EventsApi = class extends BaseApiClient {
|
|
|
2591
2350
|
if (options.objectType) params.append("objectType", options.objectType);
|
|
2592
2351
|
if (options.eventType) params.append("eventType", options.eventType);
|
|
2593
2352
|
if (options.actionType) params.append("actionType", options.actionType);
|
|
2594
|
-
if (options.
|
|
2353
|
+
if (options.workflowRevisionId)
|
|
2354
|
+
params.append("workflowRevisionId", options.workflowRevisionId.toString());
|
|
2595
2355
|
return this.fetch(
|
|
2596
2356
|
`w/${wid}/event-rules/executions${params.toString() ? `?${params.toString()}` : ""}`
|
|
2597
2357
|
);
|
|
@@ -2603,6 +2363,20 @@ var EventsApi = class extends BaseApiClient {
|
|
|
2603
2363
|
body: JSON.stringify(request)
|
|
2604
2364
|
});
|
|
2605
2365
|
}
|
|
2366
|
+
/**
|
|
2367
|
+
* Preview which target-audience roles lack Workflow USE for the Workflows a
|
|
2368
|
+
* draft Routine would start. Non-persisting, non-blocking authoring assist —
|
|
2369
|
+
* returns warnings only (role/Workflow names + IDs; no Member data).
|
|
2370
|
+
*/
|
|
2371
|
+
async previewRoutineWorkflowAccess(wid, request) {
|
|
2372
|
+
return this.fetch(
|
|
2373
|
+
`w/${wid}/routines/preview-workflow-access`,
|
|
2374
|
+
{
|
|
2375
|
+
method: "POST",
|
|
2376
|
+
body: JSON.stringify(request)
|
|
2377
|
+
}
|
|
2378
|
+
);
|
|
2379
|
+
}
|
|
2606
2380
|
/** List routines with optional pagination and active status filtering. */
|
|
2607
2381
|
async getRoutines(wid, options = {}) {
|
|
2608
2382
|
const params = new URLSearchParams();
|
|
@@ -3061,6 +2835,29 @@ var FilesApi = class extends BaseApiClient {
|
|
|
3061
2835
|
async getFile(wid, id) {
|
|
3062
2836
|
return this.fetch(`w/${wid}/files/${id}`);
|
|
3063
2837
|
}
|
|
2838
|
+
/**
|
|
2839
|
+
* Resolve a wiki-style relative path (as authored in a markdown link or
|
|
2840
|
+
* image) to a file. `folderId` is the linking document's folder; omit it
|
|
2841
|
+
* to resolve from the workspace root. Handles `.`/`..` segments and an
|
|
2842
|
+
* omitted `.md` extension server-side.
|
|
2843
|
+
*/
|
|
2844
|
+
async resolveFilePath(wid, path, folderId) {
|
|
2845
|
+
const params = new URLSearchParams({ path });
|
|
2846
|
+
if (folderId != null) params.append("folderId", String(folderId));
|
|
2847
|
+
return this.fetch(`w/${wid}/files/resolve-path?${params.toString()}`);
|
|
2848
|
+
}
|
|
2849
|
+
/**
|
|
2850
|
+
* Download the given files + folders (folders recursively) as a single ZIP.
|
|
2851
|
+
* Returns the raw archive bytes for the caller to save.
|
|
2852
|
+
*/
|
|
2853
|
+
async downloadFilesZip(wid, fileIds, folderIds) {
|
|
2854
|
+
const response = await this.fetchRaw(`w/${wid}/files/download/zip`, {
|
|
2855
|
+
method: "POST",
|
|
2856
|
+
headers: { "Content-Type": "application/json" },
|
|
2857
|
+
body: JSON.stringify({ file_ids: fileIds, folder_ids: folderIds })
|
|
2858
|
+
});
|
|
2859
|
+
return response.blob();
|
|
2860
|
+
}
|
|
3064
2861
|
/** Create a new file record in the workspace. */
|
|
3065
2862
|
async createFile(wid, file) {
|
|
3066
2863
|
return this.fetch(`w/${wid}/files`, {
|
|
@@ -3102,6 +2899,36 @@ var FilesApi = class extends BaseApiClient {
|
|
|
3102
2899
|
method: "DELETE"
|
|
3103
2900
|
});
|
|
3104
2901
|
}
|
|
2902
|
+
/** List a file's version history (newest first). */
|
|
2903
|
+
async listFileVersions(wid, fileId) {
|
|
2904
|
+
return this.fetch(`w/${wid}/files/${fileId}/versions`);
|
|
2905
|
+
}
|
|
2906
|
+
/** Compare two versions of a file. For text files both raw contents are returned. */
|
|
2907
|
+
async getFileVersionDiff(wid, fileId, fromVersion, toVersion) {
|
|
2908
|
+
return this.fetch(
|
|
2909
|
+
`w/${wid}/files/${fileId}/versions/diff?fromVersion=${fromVersion}&toVersion=${toVersion}`
|
|
2910
|
+
);
|
|
2911
|
+
}
|
|
2912
|
+
/** Restore an earlier version as the file's current contents. */
|
|
2913
|
+
async restoreFileVersion(wid, fileId, versionNumber, changeNote) {
|
|
2914
|
+
return this.fetch(
|
|
2915
|
+
`w/${wid}/files/${fileId}/versions/${versionNumber}/restore`,
|
|
2916
|
+
{
|
|
2917
|
+
method: "POST",
|
|
2918
|
+
// Required JSON body: keeps this cookie-auth POST non-forgeable
|
|
2919
|
+
// by cross-site HTML forms (backend rejects bodyless requests).
|
|
2920
|
+
body: JSON.stringify(changeNote ? { changeNote } : {})
|
|
2921
|
+
}
|
|
2922
|
+
);
|
|
2923
|
+
}
|
|
2924
|
+
/**
|
|
2925
|
+
* Same-origin proxy URL for a version's raw contents. Mirrors the shape of
|
|
2926
|
+
* `FileResponse.cdnUrl`: an app-relative Next.js route that authenticates
|
|
2927
|
+
* via session cookies and forwards to the versioned contents endpoint.
|
|
2928
|
+
*/
|
|
2929
|
+
getFileVersionContentsUrl(wid, fileId, versionNumber) {
|
|
2930
|
+
return `/api/w/${wid}/files/${fileId}/versions/${versionNumber}/contents`;
|
|
2931
|
+
}
|
|
3105
2932
|
/** Convert a file to the specified format (text, markdown, or PDF). */
|
|
3106
2933
|
async convertFile(wid, fileId, format = "pdf") {
|
|
3107
2934
|
return this.fetch(
|
|
@@ -3677,6 +3504,31 @@ var McpServersApi = class extends BaseApiClient {
|
|
|
3677
3504
|
};
|
|
3678
3505
|
|
|
3679
3506
|
// src/api/members.ts
|
|
3507
|
+
var MemberImportValidationError = class extends Error {
|
|
3508
|
+
validationErrors;
|
|
3509
|
+
constructor(message, validationErrors) {
|
|
3510
|
+
super(message);
|
|
3511
|
+
this.name = "MemberImportValidationError";
|
|
3512
|
+
this.validationErrors = validationErrors;
|
|
3513
|
+
}
|
|
3514
|
+
};
|
|
3515
|
+
function throwMemberImportError(errorBody, fallback) {
|
|
3516
|
+
let detail = errorBody?.detail;
|
|
3517
|
+
if (typeof detail === "string") {
|
|
3518
|
+
try {
|
|
3519
|
+
const parsed = JSON.parse(detail);
|
|
3520
|
+
if (parsed && typeof parsed === "object") detail = parsed;
|
|
3521
|
+
} catch {
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
if (detail && typeof detail === "object") {
|
|
3525
|
+
const { message, errors } = detail;
|
|
3526
|
+
if (Array.isArray(errors)) {
|
|
3527
|
+
throw new MemberImportValidationError(message || fallback, errors);
|
|
3528
|
+
}
|
|
3529
|
+
}
|
|
3530
|
+
throw new Error(typeof detail === "string" ? detail : fallback);
|
|
3531
|
+
}
|
|
3680
3532
|
var MembersApi = class extends BaseApiClient {
|
|
3681
3533
|
/** Get the currently authenticated member for a workspace. */
|
|
3682
3534
|
async getCurrentMember(wid) {
|
|
@@ -3717,19 +3569,14 @@ var MembersApi = class extends BaseApiClient {
|
|
|
3717
3569
|
});
|
|
3718
3570
|
}
|
|
3719
3571
|
/** List workspace members with pagination, filtering, and sorting. */
|
|
3720
|
-
async getWorkspaceMembers(wid, page = 1, pageSize = 10,
|
|
3572
|
+
async getWorkspaceMembers(wid, page = 1, pageSize = 10, search, role, sortBy, sortOrder, memberType, isArchived = false, isManager, memberTypes, hasAccount, excludeIds, memberFilterId, query) {
|
|
3721
3573
|
const params = new URLSearchParams();
|
|
3574
|
+
if (memberFilterId != null) params.append("memberFilterId", memberFilterId.toString());
|
|
3575
|
+
if (query != null) params.append("query", JSON.stringify(query));
|
|
3722
3576
|
if (page) params.append("page", page.toString());
|
|
3723
3577
|
if (pageSize) params.append("pageSize", pageSize.toString());
|
|
3724
3578
|
if (sortBy) params.append("sortBy", sortBy);
|
|
3725
3579
|
if (sortOrder) params.append("sortOrder", sortOrder);
|
|
3726
|
-
if (filters) {
|
|
3727
|
-
if (Array.isArray(filters)) {
|
|
3728
|
-
params.append("filters", JSON.stringify(filters));
|
|
3729
|
-
} else {
|
|
3730
|
-
params.append("filters", JSON.stringify(filters));
|
|
3731
|
-
}
|
|
3732
|
-
}
|
|
3733
3580
|
if (search) params.append("search", search);
|
|
3734
3581
|
if (role) params.append("role", role);
|
|
3735
3582
|
if (memberTypes && memberTypes.length > 0) {
|
|
@@ -3791,6 +3638,17 @@ var MembersApi = class extends BaseApiClient {
|
|
|
3791
3638
|
method: "POST"
|
|
3792
3639
|
});
|
|
3793
3640
|
}
|
|
3641
|
+
/**
|
|
3642
|
+
* Send the member an SMS asking them to confirm their phone number. When they
|
|
3643
|
+
* reply, a trusted phone auth binding is created so they can use SMS as
|
|
3644
|
+
* themselves without an account (member-attested alternative to the
|
|
3645
|
+
* members:admin "Trusted" override).
|
|
3646
|
+
*/
|
|
3647
|
+
async sendMemberPhoneConfirmation(wid, memberId) {
|
|
3648
|
+
return this.fetch(`w/${wid}/members/${memberId}/phone-confirmation`, {
|
|
3649
|
+
method: "POST"
|
|
3650
|
+
});
|
|
3651
|
+
}
|
|
3794
3652
|
// Member Filter APIs
|
|
3795
3653
|
/** List all saved member filters for a workspace. */
|
|
3796
3654
|
async getMemberFilters(wid) {
|
|
@@ -3891,48 +3749,98 @@ var MembersApi = class extends BaseApiClient {
|
|
|
3891
3749
|
});
|
|
3892
3750
|
}
|
|
3893
3751
|
// Import/Export Members API
|
|
3894
|
-
/**
|
|
3895
|
-
|
|
3752
|
+
/**
|
|
3753
|
+
* Read-only preview classifying each CSV row before any write (GRA-5545).
|
|
3754
|
+
*
|
|
3755
|
+
* Returns create/update/unchanged/conflict/error counts. For phone-only
|
|
3756
|
+
* identity conflicts it also returns existing vs incoming identity so the
|
|
3757
|
+
* operator can decide whether to skip or explicitly overwrite before
|
|
3758
|
+
* committing. Requires MEMBERS_ADMIN and is bulk-PHI audited server-side.
|
|
3759
|
+
*/
|
|
3760
|
+
async previewImportMembers(wid, file, newMemberRoleId, options) {
|
|
3896
3761
|
const formData = new FormData();
|
|
3897
3762
|
formData.append("file", file);
|
|
3898
3763
|
const params = new URLSearchParams();
|
|
3899
3764
|
params.append("new_member_role_id", newMemberRoleId.toString());
|
|
3900
|
-
|
|
3901
|
-
|
|
3765
|
+
if (options?.trustEmailAddresses) {
|
|
3766
|
+
params.append("trust_email_addresses", "true");
|
|
3767
|
+
}
|
|
3768
|
+
if (options?.trustPhoneNumbers) {
|
|
3769
|
+
params.append("trust_phone_numbers", "true");
|
|
3770
|
+
}
|
|
3771
|
+
const response = await this.fetchRaw(
|
|
3772
|
+
`w/${wid}/members/import/preview?${params.toString()}`,
|
|
3902
3773
|
{
|
|
3903
3774
|
method: "POST",
|
|
3904
|
-
body: formData
|
|
3905
|
-
|
|
3906
|
-
|
|
3775
|
+
body: formData
|
|
3776
|
+
},
|
|
3777
|
+
[400, 413]
|
|
3907
3778
|
);
|
|
3908
3779
|
if (!response.ok) {
|
|
3909
|
-
const error = await response.json();
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3780
|
+
const error = await response.json().catch(() => ({}));
|
|
3781
|
+
throwMemberImportError(error, "Import preview failed");
|
|
3782
|
+
}
|
|
3783
|
+
return response.json();
|
|
3784
|
+
}
|
|
3785
|
+
/**
|
|
3786
|
+
* Import members from a CSV file, streaming progress updates via callback.
|
|
3787
|
+
*
|
|
3788
|
+
* ``identityConflictPolicy`` (default 'skip') controls how a row matching an
|
|
3789
|
+
* existing member ONLY by phone with different identity fields is handled.
|
|
3790
|
+
* Send 'overwrite_identity_fields' only after the operator confirms a preview.
|
|
3791
|
+
*/
|
|
3792
|
+
async importMembers(wid, file, newMemberRoleId, onProgress, options) {
|
|
3793
|
+
const formData = new FormData();
|
|
3794
|
+
formData.append("file", file);
|
|
3795
|
+
const params = new URLSearchParams();
|
|
3796
|
+
params.append("new_member_role_id", newMemberRoleId.toString());
|
|
3797
|
+
if (options?.trustEmailAddresses) {
|
|
3798
|
+
params.append("trust_email_addresses", "true");
|
|
3799
|
+
}
|
|
3800
|
+
if (options?.trustPhoneNumbers) {
|
|
3801
|
+
params.append("trust_phone_numbers", "true");
|
|
3802
|
+
}
|
|
3803
|
+
if (options?.identityConflictPolicy) {
|
|
3804
|
+
params.append("identity_conflict_policy", options.identityConflictPolicy);
|
|
3805
|
+
}
|
|
3806
|
+
const response = await this.fetchRaw(
|
|
3807
|
+
`w/${wid}/members/import?${params.toString()}`,
|
|
3808
|
+
{
|
|
3809
|
+
method: "POST",
|
|
3810
|
+
body: formData
|
|
3811
|
+
},
|
|
3812
|
+
[400, 413]
|
|
3813
|
+
);
|
|
3814
|
+
if (!response.ok) {
|
|
3815
|
+
const error = await response.json().catch(() => ({}));
|
|
3816
|
+
throwMemberImportError(error, "Import failed");
|
|
3919
3817
|
}
|
|
3920
3818
|
if (onProgress && response.body) {
|
|
3921
3819
|
const reader = response.body.getReader();
|
|
3922
3820
|
const decoder = new TextDecoder();
|
|
3821
|
+
let buffer = "";
|
|
3923
3822
|
while (true) {
|
|
3924
3823
|
const { done, value } = await reader.read();
|
|
3925
3824
|
if (done) break;
|
|
3926
|
-
|
|
3927
|
-
const lines =
|
|
3825
|
+
buffer += decoder.decode(value, { stream: true });
|
|
3826
|
+
const lines = buffer.split("\n");
|
|
3827
|
+
buffer = lines.pop() ?? "";
|
|
3928
3828
|
for (const line of lines) {
|
|
3829
|
+
const trimmed = line.trim();
|
|
3830
|
+
if (!trimmed) continue;
|
|
3929
3831
|
try {
|
|
3930
|
-
|
|
3931
|
-
onProgress(progress);
|
|
3832
|
+
onProgress(JSON.parse(trimmed));
|
|
3932
3833
|
} catch {
|
|
3933
3834
|
}
|
|
3934
3835
|
}
|
|
3935
3836
|
}
|
|
3837
|
+
const tail = buffer.trim();
|
|
3838
|
+
if (tail) {
|
|
3839
|
+
try {
|
|
3840
|
+
onProgress(JSON.parse(tail));
|
|
3841
|
+
} catch {
|
|
3842
|
+
}
|
|
3843
|
+
}
|
|
3936
3844
|
}
|
|
3937
3845
|
return { success: true };
|
|
3938
3846
|
}
|
|
@@ -4109,6 +4017,11 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4109
4017
|
`w/${wid}/members/${memberId}/memories${qs ? `?${qs}` : ""}`
|
|
4110
4018
|
);
|
|
4111
4019
|
}
|
|
4020
|
+
async getMemberMemory(wid, memberId, key) {
|
|
4021
|
+
return this.fetch(
|
|
4022
|
+
`w/${wid}/members/${memberId}/memories/${encodeURIComponent(key)}`
|
|
4023
|
+
);
|
|
4024
|
+
}
|
|
4112
4025
|
async createMemberMemory(wid, memberId, body) {
|
|
4113
4026
|
return this.fetch(`w/${wid}/members/${memberId}/memories`, {
|
|
4114
4027
|
method: "POST",
|
|
@@ -4124,6 +4037,17 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4124
4037
|
{ method: "DELETE" }
|
|
4125
4038
|
);
|
|
4126
4039
|
}
|
|
4040
|
+
/** Bulk-create members in a workspace. */
|
|
4041
|
+
async bulkCreateMembers(wid, request) {
|
|
4042
|
+
return this.fetch(`w/${wid}/members/bulk`, {
|
|
4043
|
+
method: "POST",
|
|
4044
|
+
body: JSON.stringify(request)
|
|
4045
|
+
});
|
|
4046
|
+
}
|
|
4047
|
+
/** Get all sync links for a member across app connections. */
|
|
4048
|
+
async getMemberSyncLinks(wid, memberId) {
|
|
4049
|
+
return this.fetch(`w/${wid}/members/${memberId}/sync-links`);
|
|
4050
|
+
}
|
|
4127
4051
|
};
|
|
4128
4052
|
|
|
4129
4053
|
// src/api/milestones.ts
|
|
@@ -4202,6 +4126,20 @@ var MondayIntegrationApi = class extends BaseApiClient {
|
|
|
4202
4126
|
// -----------------------------------------------------------------------
|
|
4203
4127
|
// Monday.com Connection management (OAuth, status, sync, reconciliation)
|
|
4204
4128
|
// -----------------------------------------------------------------------
|
|
4129
|
+
/**
|
|
4130
|
+
* Create the Monday.com connection shell (no credentials yet).
|
|
4131
|
+
*
|
|
4132
|
+
* First step of the guided setup flow: provisions the connection row so
|
|
4133
|
+
* the admin lands on the detail page where the OAuth callback URL is
|
|
4134
|
+
* shown — which they need to register their Monday.com app before they
|
|
4135
|
+
* have a Client ID / Secret to enter. Idempotent.
|
|
4136
|
+
*/
|
|
4137
|
+
async installMondayConnection(wid) {
|
|
4138
|
+
return this.fetch(`w/${wid}/app-connections/monday/install`, {
|
|
4139
|
+
method: "POST",
|
|
4140
|
+
body: JSON.stringify({})
|
|
4141
|
+
});
|
|
4142
|
+
}
|
|
4205
4143
|
async configureMondayConnection(wid, data) {
|
|
4206
4144
|
return this.fetch(`w/${wid}/app-connections/monday/configure`, {
|
|
4207
4145
|
method: "POST",
|
|
@@ -4620,6 +4558,7 @@ var OrgApi = class extends BaseApiClient {
|
|
|
4620
4558
|
*/
|
|
4621
4559
|
async searchPhoneNumbers(orgUuid, params) {
|
|
4622
4560
|
const query = new URLSearchParams();
|
|
4561
|
+
if (params?.country) query.set("country", params.country);
|
|
4623
4562
|
if (params?.numberType) query.set("number_type", params.numberType);
|
|
4624
4563
|
if (params?.areaCode) query.set("area_code", params.areaCode);
|
|
4625
4564
|
if (params?.contains) query.set("contains", params.contains);
|
|
@@ -4631,11 +4570,20 @@ var OrgApi = class extends BaseApiClient {
|
|
|
4631
4570
|
}
|
|
4632
4571
|
/**
|
|
4633
4572
|
* Purchase a phone number from Twilio for this org inventory (org admin only).
|
|
4573
|
+
*
|
|
4574
|
+
* Numbers in regulated countries (e.g. Australia) require a Twilio regulatory
|
|
4575
|
+
* bundle and an address — pass `bundleSid` and `addressSid` for those.
|
|
4634
4576
|
*/
|
|
4635
|
-
async purchasePhoneNumber(orgUuid, phoneNumber, numberType) {
|
|
4577
|
+
async purchasePhoneNumber(orgUuid, phoneNumber, numberType, opts) {
|
|
4636
4578
|
return this.fetch(`o/${orgUuid}/phone-numbers/purchase`, {
|
|
4637
4579
|
method: "POST",
|
|
4638
|
-
body: JSON.stringify({
|
|
4580
|
+
body: JSON.stringify({
|
|
4581
|
+
phoneNumber,
|
|
4582
|
+
numberType,
|
|
4583
|
+
country: opts?.country,
|
|
4584
|
+
bundleSid: opts?.bundleSid,
|
|
4585
|
+
addressSid: opts?.addressSid
|
|
4586
|
+
})
|
|
4639
4587
|
});
|
|
4640
4588
|
}
|
|
4641
4589
|
/**
|
|
@@ -4843,6 +4791,90 @@ var OrgApi = class extends BaseApiClient {
|
|
|
4843
4791
|
method: "POST"
|
|
4844
4792
|
});
|
|
4845
4793
|
}
|
|
4794
|
+
/**
|
|
4795
|
+
* List the org's A2P brands (broker resources). The SMS-consent editor uses
|
|
4796
|
+
* this to pick which brand's consent config to edit.
|
|
4797
|
+
*/
|
|
4798
|
+
async listA2PBrands(orgUuid) {
|
|
4799
|
+
return this.fetch(`o/${orgUuid}/a2p-brands`);
|
|
4800
|
+
}
|
|
4801
|
+
/**
|
|
4802
|
+
* Fetch a brand's resolved A2P campaign config. The response carries both the
|
|
4803
|
+
* raw `overrides` and the `resolved` payload (defaults + overrides) the editor
|
|
4804
|
+
* previews — including the canonical SMS consent text.
|
|
4805
|
+
*/
|
|
4806
|
+
async getA2PCampaignConfig(orgUuid, brandUuid) {
|
|
4807
|
+
return this.fetch(
|
|
4808
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/campaign-config`
|
|
4809
|
+
);
|
|
4810
|
+
}
|
|
4811
|
+
/**
|
|
4812
|
+
* Partial-update a brand's A2P campaign config. Returns the freshly resolved
|
|
4813
|
+
* config so the editor's live preview updates without a second round-trip.
|
|
4814
|
+
*/
|
|
4815
|
+
async updateA2PCampaignConfig(orgUuid, brandUuid, data) {
|
|
4816
|
+
return this.fetch(
|
|
4817
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/campaign-config`,
|
|
4818
|
+
{
|
|
4819
|
+
method: "PUT",
|
|
4820
|
+
body: JSON.stringify(data)
|
|
4821
|
+
}
|
|
4822
|
+
);
|
|
4823
|
+
}
|
|
4824
|
+
/**
|
|
4825
|
+
* Published Sites across the org's workspaces that can be linked as this
|
|
4826
|
+
* brand's enrollment (opt-in) surface. Org-authorized, so it works even when
|
|
4827
|
+
* the admin isn't a member of the workspace holding the Site.
|
|
4828
|
+
*/
|
|
4829
|
+
async listA2PEnrollmentSiteCandidates(orgUuid, brandUuid) {
|
|
4830
|
+
return this.fetch(
|
|
4831
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-site/candidates`
|
|
4832
|
+
);
|
|
4833
|
+
}
|
|
4834
|
+
/**
|
|
4835
|
+
* Link the brand to a published enrollment Site (sets `site_uuid`). Returns
|
|
4836
|
+
* the refreshed campaign config so the editor's link state updates inline.
|
|
4837
|
+
*/
|
|
4838
|
+
async linkA2PEnrollmentSite(orgUuid, brandUuid, data) {
|
|
4839
|
+
return this.fetch(
|
|
4840
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-site`,
|
|
4841
|
+
{
|
|
4842
|
+
method: "PUT",
|
|
4843
|
+
body: JSON.stringify(data)
|
|
4844
|
+
}
|
|
4845
|
+
);
|
|
4846
|
+
}
|
|
4847
|
+
/**
|
|
4848
|
+
* Provision (or reuse) a patient-enrollment Site for the brand and link it —
|
|
4849
|
+
* the one-click path behind the SMS Consent tab. `workspaceUuid` is required
|
|
4850
|
+
* only when the org has multiple workspaces. Returns the refreshed campaign
|
|
4851
|
+
* config so the editor's link state updates inline. Idempotent.
|
|
4852
|
+
*/
|
|
4853
|
+
async provisionA2PEnrollmentSite(orgUuid, brandUuid, data = {}) {
|
|
4854
|
+
return this.fetch(
|
|
4855
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-site/provision`,
|
|
4856
|
+
{
|
|
4857
|
+
method: "POST",
|
|
4858
|
+
body: JSON.stringify(data)
|
|
4859
|
+
}
|
|
4860
|
+
);
|
|
4861
|
+
}
|
|
4862
|
+
/** Clear the brand's enrollment-site link. */
|
|
4863
|
+
async unlinkA2PEnrollmentSite(orgUuid, brandUuid) {
|
|
4864
|
+
return this.fetch(
|
|
4865
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-site`,
|
|
4866
|
+
{ method: "DELETE" }
|
|
4867
|
+
);
|
|
4868
|
+
}
|
|
4869
|
+
/**
|
|
4870
|
+
* The brand-addressable enrollment form URL (carries `?brand=…`). Outreach
|
|
4871
|
+
* appends each patient's `external_id`. `url` is null until a Site is linked.
|
|
4872
|
+
*/
|
|
4873
|
+
async getA2PBrandEnrollmentUrl(orgUuid, brandUuid) {
|
|
4874
|
+
return this.fetch(
|
|
4875
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-url`
|
|
4876
|
+
);
|
|
4877
|
+
}
|
|
4846
4878
|
/**
|
|
4847
4879
|
* List available member roles for a workspace in the organization.
|
|
4848
4880
|
*/
|
|
@@ -4867,58 +4899,53 @@ var OrgApi = class extends BaseApiClient {
|
|
|
4867
4899
|
function getOAuthPath(providerSlug, action) {
|
|
4868
4900
|
if (providerSlug === "google_calendar") {
|
|
4869
4901
|
return `oauth/google/calendar/${action}`;
|
|
4870
|
-
}
|
|
4902
|
+
}
|
|
4903
|
+
if (providerSlug === "gmail") {
|
|
4871
4904
|
return `oauth/google/gmail/${action}`;
|
|
4872
|
-
} else {
|
|
4873
|
-
return `oauth/${providerSlug}/${action}`;
|
|
4874
4905
|
}
|
|
4906
|
+
if (providerSlug === "gdrive") {
|
|
4907
|
+
return `oauth/google/drive/${action}`;
|
|
4908
|
+
}
|
|
4909
|
+
return `oauth/${providerSlug}/${action}`;
|
|
4910
|
+
}
|
|
4911
|
+
function buildAuthorizeQuery(options) {
|
|
4912
|
+
if (!options) return "";
|
|
4913
|
+
const params = new URLSearchParams();
|
|
4914
|
+
if (options.credentialUuid) params.set("credentialUuid", options.credentialUuid);
|
|
4915
|
+
if (options.loginHint) params.set("loginHint", options.loginHint);
|
|
4916
|
+
if (options.redirect) params.set("redirect", options.redirect);
|
|
4917
|
+
const qs = params.toString();
|
|
4918
|
+
return qs ? `?${qs}` : "";
|
|
4875
4919
|
}
|
|
4876
4920
|
var OAuthConnectionsApi = class extends BaseApiClient {
|
|
4877
|
-
/**
|
|
4878
|
-
* Get the connection status for an OAuth provider
|
|
4879
|
-
*/
|
|
4880
4921
|
async getConnectionStatus(providerSlug) {
|
|
4881
4922
|
const path = getOAuthPath(providerSlug, "status");
|
|
4882
4923
|
return this.fetchRoot(path);
|
|
4883
4924
|
}
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
*/
|
|
4887
|
-
async getAuthorizationUrl(providerSlug) {
|
|
4888
|
-
const path = getOAuthPath(providerSlug, "authorize");
|
|
4925
|
+
async listAccounts(providerSlug) {
|
|
4926
|
+
const path = getOAuthPath(providerSlug, "accounts");
|
|
4889
4927
|
return this.fetchRoot(path);
|
|
4890
4928
|
}
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4929
|
+
async getAuthorizationUrl(providerSlug, options) {
|
|
4930
|
+
const path = getOAuthPath(providerSlug, "authorize") + buildAuthorizeQuery(options);
|
|
4931
|
+
return this.fetchRoot(path);
|
|
4932
|
+
}
|
|
4933
|
+
async disconnect(providerSlug, credentialUuid) {
|
|
4895
4934
|
const path = getOAuthPath(providerSlug, "disconnect");
|
|
4896
|
-
|
|
4935
|
+
const qs = credentialUuid ? `?credentialUuid=${encodeURIComponent(credentialUuid)}` : "";
|
|
4936
|
+
return this.fetchRoot(`${path}${qs}`, { method: "DELETE" });
|
|
4897
4937
|
}
|
|
4898
4938
|
};
|
|
4899
4939
|
var OAuthApi = class extends BaseApiClient {
|
|
4900
|
-
/**
|
|
4901
|
-
* Get all available OAuth/API key scopes with metadata.
|
|
4902
|
-
*
|
|
4903
|
-
* This returns the full scope definitions from the backend,
|
|
4904
|
-
* ensuring the UI always shows the correct scopes.
|
|
4905
|
-
*/
|
|
4906
4940
|
async getAvailableScopes() {
|
|
4907
4941
|
return this.fetch("oauth/scopes");
|
|
4908
4942
|
}
|
|
4909
|
-
/**
|
|
4910
|
-
* Create an authorization code for OAuth flow
|
|
4911
|
-
* This is called after the user approves the authorization request
|
|
4912
|
-
*/
|
|
4913
4943
|
async authorize(request) {
|
|
4914
4944
|
return this.fetch("oauth/authorize", {
|
|
4915
4945
|
method: "POST",
|
|
4916
4946
|
body: JSON.stringify(request)
|
|
4917
4947
|
});
|
|
4918
4948
|
}
|
|
4919
|
-
/**
|
|
4920
|
-
* Exchange authorization code for access token
|
|
4921
|
-
*/
|
|
4922
4949
|
async exchangeOAuthToken(request) {
|
|
4923
4950
|
const formData = new URLSearchParams();
|
|
4924
4951
|
formData.append("grant_type", request.grant_type);
|
|
@@ -4939,6 +4966,14 @@ var OAuthApi = class extends BaseApiClient {
|
|
|
4939
4966
|
};
|
|
4940
4967
|
|
|
4941
4968
|
// src/api/phone-numbers.ts
|
|
4969
|
+
function appendAnalyticsFilters(params, filters) {
|
|
4970
|
+
if (!filters) return;
|
|
4971
|
+
if (filters.dateFrom) params.set("dateFrom", filters.dateFrom);
|
|
4972
|
+
if (filters.dateTo) params.set("dateTo", filters.dateTo);
|
|
4973
|
+
filters.terminationReason?.forEach((v) => params.append("terminationReason", v));
|
|
4974
|
+
filters.answeredBy?.forEach((v) => params.append("answeredBy", v));
|
|
4975
|
+
filters.memberLabel?.forEach((v) => params.append("memberLabel", v));
|
|
4976
|
+
}
|
|
4942
4977
|
var PhoneNumbersApi = class extends BaseApiClient {
|
|
4943
4978
|
/** List phone numbers in a workspace, optionally including archived. */
|
|
4944
4979
|
async getPhoneNumbers(wid, options) {
|
|
@@ -5057,10 +5092,66 @@ var PhoneNumbersApi = class extends BaseApiClient {
|
|
|
5057
5092
|
body: JSON.stringify({ providerPhoneUuid })
|
|
5058
5093
|
});
|
|
5059
5094
|
}
|
|
5060
|
-
async releasePhoneNumber(wid, id) {
|
|
5061
|
-
return this.fetch(`w/${wid}/phone-numbers/${id}/release`, {
|
|
5062
|
-
method: "POST"
|
|
5095
|
+
async releasePhoneNumber(wid, id) {
|
|
5096
|
+
return this.fetch(`w/${wid}/phone-numbers/${id}/release`, {
|
|
5097
|
+
method: "POST"
|
|
5098
|
+
});
|
|
5099
|
+
}
|
|
5100
|
+
/**
|
|
5101
|
+
* Always-anonymized outbound-call analytics summary for one phone number.
|
|
5102
|
+
* No `analyticsSessionId` is sent — the summary carries no row-level PHI.
|
|
5103
|
+
*/
|
|
5104
|
+
async getPhoneNumberOutboundAnalyticsSummary(wid, id, filters) {
|
|
5105
|
+
const params = new URLSearchParams();
|
|
5106
|
+
appendAnalyticsFilters(params, filters);
|
|
5107
|
+
const query = params.toString();
|
|
5108
|
+
return this.fetch(
|
|
5109
|
+
`w/${wid}/phone-numbers/${id}/analytics/summary${query ? `?${query}` : ""}`
|
|
5110
|
+
);
|
|
5111
|
+
}
|
|
5112
|
+
/**
|
|
5113
|
+
* One paginated page of outbound-call analytics detail rows. Anonymized by
|
|
5114
|
+
* default; `raw: true` requires the `export:admin` scope server-side and is
|
|
5115
|
+
* audited per response. `analyticsSessionId` keeps the callee pseudonyms
|
|
5116
|
+
* stable across pagination/sort within one browser session.
|
|
5117
|
+
*/
|
|
5118
|
+
async getPhoneNumberOutboundAnalyticsCalls(wid, id, options) {
|
|
5119
|
+
const params = new URLSearchParams({
|
|
5120
|
+
analyticsSessionId: options.analyticsSessionId,
|
|
5121
|
+
page: String(options.page ?? 1),
|
|
5122
|
+
pageSize: String(options.pageSize ?? 50)
|
|
5063
5123
|
});
|
|
5124
|
+
if (options.sort) params.set("sort", options.sort);
|
|
5125
|
+
if (options.sortDirection) params.set("sortDirection", options.sortDirection);
|
|
5126
|
+
if (options.raw) params.set("raw", "true");
|
|
5127
|
+
appendAnalyticsFilters(params, options.filters);
|
|
5128
|
+
return this.fetch(
|
|
5129
|
+
`w/${wid}/phone-numbers/${id}/analytics/calls?${params}`
|
|
5130
|
+
);
|
|
5131
|
+
}
|
|
5132
|
+
/**
|
|
5133
|
+
* Export outbound-call analytics as a CSV blob (respecting the current
|
|
5134
|
+
* filters + raw state). The server returns HTTP 400 when the result set
|
|
5135
|
+
* exceeds its export cap; that message is surfaced to the caller via
|
|
5136
|
+
* `ApiError` so the UI can toast it.
|
|
5137
|
+
*/
|
|
5138
|
+
async exportPhoneNumberOutboundAnalyticsCsv(wid, id, options) {
|
|
5139
|
+
const params = new URLSearchParams({ analyticsSessionId: options.analyticsSessionId });
|
|
5140
|
+
if (options.sort) params.set("sort", options.sort);
|
|
5141
|
+
if (options.sortDirection) params.set("sortDirection", options.sortDirection);
|
|
5142
|
+
if (options.raw) params.set("raw", "true");
|
|
5143
|
+
appendAnalyticsFilters(params, options.filters);
|
|
5144
|
+
const response = await this.fetchRaw(
|
|
5145
|
+
`w/${wid}/phone-numbers/${id}/analytics/export?${params}`,
|
|
5146
|
+
{},
|
|
5147
|
+
[400]
|
|
5148
|
+
);
|
|
5149
|
+
if (!response.ok) {
|
|
5150
|
+
const data = await response.json().catch(() => ({}));
|
|
5151
|
+
const message = typeof data?.detail === "string" ? data.detail : "Failed to export analytics";
|
|
5152
|
+
throw new ApiError(message, response.status);
|
|
5153
|
+
}
|
|
5154
|
+
return response.blob();
|
|
5064
5155
|
}
|
|
5065
5156
|
};
|
|
5066
5157
|
|
|
@@ -5212,6 +5303,37 @@ var PersonasApi = class extends BaseApiClient {
|
|
|
5212
5303
|
}
|
|
5213
5304
|
};
|
|
5214
5305
|
|
|
5306
|
+
// src/api/queries.ts
|
|
5307
|
+
var QueriesApi = class extends BaseApiClient {
|
|
5308
|
+
/** Queryable namespace: native fields, operators per type, DataType record fields. */
|
|
5309
|
+
async getQueryFields(wid) {
|
|
5310
|
+
return this.fetch(`w/${wid}/queries/fields`, {
|
|
5311
|
+
method: "GET"
|
|
5312
|
+
});
|
|
5313
|
+
}
|
|
5314
|
+
/** Structure / field / access / cost validation without execution. */
|
|
5315
|
+
async validateQuery(wid, query) {
|
|
5316
|
+
return this.fetch(`w/${wid}/queries/validate`, {
|
|
5317
|
+
method: "POST",
|
|
5318
|
+
body: JSON.stringify({ query })
|
|
5319
|
+
});
|
|
5320
|
+
}
|
|
5321
|
+
/** Bounded sample run (limit capped server-side). */
|
|
5322
|
+
async previewQuery(wid, query, mode) {
|
|
5323
|
+
return this.fetch(`w/${wid}/queries/preview`, {
|
|
5324
|
+
method: "POST",
|
|
5325
|
+
body: JSON.stringify({ query, mode })
|
|
5326
|
+
});
|
|
5327
|
+
}
|
|
5328
|
+
/** Execute a query (rows / count / aggregate). */
|
|
5329
|
+
async runQuery(wid, query, mode) {
|
|
5330
|
+
return this.fetch(`w/${wid}/queries/run`, {
|
|
5331
|
+
method: "POST",
|
|
5332
|
+
body: JSON.stringify({ query, mode })
|
|
5333
|
+
});
|
|
5334
|
+
}
|
|
5335
|
+
};
|
|
5336
|
+
|
|
5215
5337
|
// src/api/qualifications.ts
|
|
5216
5338
|
var QualificationsApi = class extends BaseApiClient {
|
|
5217
5339
|
/** List qualifications in a workspace, paginated. */
|
|
@@ -5263,6 +5385,9 @@ var QualificationsApi = class extends BaseApiClient {
|
|
|
5263
5385
|
async listTestChatRuns(wid, workflowId, params) {
|
|
5264
5386
|
const query = new URLSearchParams();
|
|
5265
5387
|
if (params?.scenarioId !== void 0) query.set("scenarioId", String(params.scenarioId));
|
|
5388
|
+
if (params?.assistantChatModelId !== void 0) {
|
|
5389
|
+
query.set("assistantChatModelId", params.assistantChatModelId);
|
|
5390
|
+
}
|
|
5266
5391
|
if (params?.limit !== void 0) query.set("limit", String(params.limit));
|
|
5267
5392
|
const qs = query.toString() ? `?${query.toString()}` : "";
|
|
5268
5393
|
return this.fetch(
|
|
@@ -5366,6 +5491,20 @@ var ReportsApi = class extends BaseApiClient {
|
|
|
5366
5491
|
|
|
5367
5492
|
// src/api/salesforce.ts
|
|
5368
5493
|
var SalesforceApi = class extends BaseApiClient {
|
|
5494
|
+
/**
|
|
5495
|
+
* Create the Salesforce connection shell (no credentials yet).
|
|
5496
|
+
*
|
|
5497
|
+
* First step of the guided setup flow: provisions the connection row so
|
|
5498
|
+
* the admin lands on the detail page where the OAuth callback URL is
|
|
5499
|
+
* shown — which they need to register their Salesforce Connected App
|
|
5500
|
+
* before they have a Client ID / Secret to enter. Idempotent.
|
|
5501
|
+
*/
|
|
5502
|
+
async installSalesforce(wid, data) {
|
|
5503
|
+
return this.fetch(`w/${wid}/app-connections/salesforce/install`, {
|
|
5504
|
+
method: "POST",
|
|
5505
|
+
body: JSON.stringify(data ?? {})
|
|
5506
|
+
});
|
|
5507
|
+
}
|
|
5369
5508
|
async configureSalesforce(wid, data) {
|
|
5370
5509
|
return this.fetch(
|
|
5371
5510
|
`w/${wid}/app-connections/salesforce/configure`,
|
|
@@ -5567,6 +5706,20 @@ var ConnectionSyncApi = class extends BaseApiClient {
|
|
|
5567
5706
|
|
|
5568
5707
|
// src/api/hubspot.ts
|
|
5569
5708
|
var HubspotApi = class extends BaseApiClient {
|
|
5709
|
+
/**
|
|
5710
|
+
* Create the HubSpot connection shell (no credentials yet).
|
|
5711
|
+
*
|
|
5712
|
+
* First step of the guided setup flow: provisions the connection row so
|
|
5713
|
+
* the admin lands on the detail page where the OAuth callback URL is
|
|
5714
|
+
* shown — which they need to register their HubSpot app before they have
|
|
5715
|
+
* a Client ID / Secret to enter. Idempotent.
|
|
5716
|
+
*/
|
|
5717
|
+
async installHubspot(wid) {
|
|
5718
|
+
return this.fetch(`w/${wid}/app-connections/hubspot/install`, {
|
|
5719
|
+
method: "POST",
|
|
5720
|
+
body: JSON.stringify({})
|
|
5721
|
+
});
|
|
5722
|
+
}
|
|
5570
5723
|
async configureHubspot(wid, data) {
|
|
5571
5724
|
return this.fetch(`w/${wid}/app-connections/hubspot/configure`, {
|
|
5572
5725
|
method: "POST",
|
|
@@ -5697,6 +5850,112 @@ var SitesApi = class extends BaseApiClient {
|
|
|
5697
5850
|
async getSite(wid, id) {
|
|
5698
5851
|
return this.fetch(`w/${wid}/sites/${id}`);
|
|
5699
5852
|
}
|
|
5853
|
+
/** Get a site's sharing settings. */
|
|
5854
|
+
async getSiteSharing(wid, siteId) {
|
|
5855
|
+
return this.fetch(`w/${wid}/sites/${siteId}/sharing`);
|
|
5856
|
+
}
|
|
5857
|
+
/** Update a site's sharing settings. */
|
|
5858
|
+
async updateSiteSharing(wid, siteId, data) {
|
|
5859
|
+
return this.fetch(`w/${wid}/sites/${siteId}/sharing`, {
|
|
5860
|
+
method: "PUT",
|
|
5861
|
+
body: JSON.stringify(data)
|
|
5862
|
+
});
|
|
5863
|
+
}
|
|
5864
|
+
/** Get a site's source tree. */
|
|
5865
|
+
async getSiteSource(wid, siteId) {
|
|
5866
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source`);
|
|
5867
|
+
}
|
|
5868
|
+
/** Starter templates the caller may seed (superuser-only ones filtered server-side). */
|
|
5869
|
+
async getSiteSourceTemplates(wid, siteId) {
|
|
5870
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source/templates`);
|
|
5871
|
+
}
|
|
5872
|
+
/** Create a site's source tree with starter files if it does not exist. */
|
|
5873
|
+
async createSiteSource(wid, siteId) {
|
|
5874
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source`, {
|
|
5875
|
+
method: "POST"
|
|
5876
|
+
});
|
|
5877
|
+
}
|
|
5878
|
+
/** Build a site's source without publishing. */
|
|
5879
|
+
async buildSiteSource(wid, siteId) {
|
|
5880
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source/build`, {
|
|
5881
|
+
method: "POST"
|
|
5882
|
+
});
|
|
5883
|
+
}
|
|
5884
|
+
/**
|
|
5885
|
+
* Build and publish a site's source. Optionally label the published version
|
|
5886
|
+
* with a `name` and `note`; both default to null (the UI then shows
|
|
5887
|
+
* "Version {version}").
|
|
5888
|
+
*/
|
|
5889
|
+
async publishSiteSource(wid, siteId, options) {
|
|
5890
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source/publish`, {
|
|
5891
|
+
method: "POST",
|
|
5892
|
+
body: JSON.stringify({
|
|
5893
|
+
name: options?.name ?? null,
|
|
5894
|
+
note: options?.note ?? null
|
|
5895
|
+
})
|
|
5896
|
+
});
|
|
5897
|
+
}
|
|
5898
|
+
/**
|
|
5899
|
+
* Reset a site's source files: load a starter template and/or wipe existing
|
|
5900
|
+
* files. `template` selects which starter to seed when `loadDefaults` is set
|
|
5901
|
+
* (defaults to "hello-world"; "patient-enrollment" is the other built-in).
|
|
5902
|
+
*/
|
|
5903
|
+
async resetSiteSource(wid, siteId, options) {
|
|
5904
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source/reset`, {
|
|
5905
|
+
method: "POST",
|
|
5906
|
+
body: JSON.stringify({
|
|
5907
|
+
load_defaults: options.loadDefaults,
|
|
5908
|
+
delete_existing: options.deleteExisting,
|
|
5909
|
+
...options.template ? { template: options.template } : {}
|
|
5910
|
+
})
|
|
5911
|
+
});
|
|
5912
|
+
}
|
|
5913
|
+
/**
|
|
5914
|
+
* Re-point the published release to a prior version from the history. A pure
|
|
5915
|
+
* pointer move (no rebuild); the other versions stay in the history.
|
|
5916
|
+
*/
|
|
5917
|
+
async rollbackSiteSource(wid, siteId, releaseUuid) {
|
|
5918
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source/rollback`, {
|
|
5919
|
+
method: "POST",
|
|
5920
|
+
body: JSON.stringify({ release_uuid: releaseUuid })
|
|
5921
|
+
});
|
|
5922
|
+
}
|
|
5923
|
+
/**
|
|
5924
|
+
* Export the site's source tree as a ZIP archive (editor-gated server-side).
|
|
5925
|
+
* Returns the raw archive bytes for the caller to save.
|
|
5926
|
+
*/
|
|
5927
|
+
async downloadSiteSourceZip(wid, siteId) {
|
|
5928
|
+
const response = await this.fetchRaw(`w/${wid}/sites/${siteId}/source/download`);
|
|
5929
|
+
return response.blob();
|
|
5930
|
+
}
|
|
5931
|
+
/**
|
|
5932
|
+
* Replace the site's source tree with the contents of an uploaded ZIP
|
|
5933
|
+
* (clears the existing source first, like a reset that loads a template).
|
|
5934
|
+
*/
|
|
5935
|
+
async importSiteSourceZip(wid, siteId, file) {
|
|
5936
|
+
const form = new FormData();
|
|
5937
|
+
form.append("file", file, "source.zip");
|
|
5938
|
+
return this.fetch(`w/${wid}/sites/${siteId}/source/import`, {
|
|
5939
|
+
method: "POST",
|
|
5940
|
+
body: form
|
|
5941
|
+
});
|
|
5942
|
+
}
|
|
5943
|
+
/**
|
|
5944
|
+
* Get a theme's settings schema, the site's saved values, and capabilities.
|
|
5945
|
+
* Pass `theme` to resolve the schema for a theme other than the saved one
|
|
5946
|
+
* (e.g. one the builder has selected but not yet saved).
|
|
5947
|
+
*/
|
|
5948
|
+
async getThemeSettings(wid, siteId, theme) {
|
|
5949
|
+
const query = theme ? `?theme=${encodeURIComponent(theme)}` : "";
|
|
5950
|
+
return this.fetch(`w/${wid}/sites/${siteId}/theme-settings${query}`);
|
|
5951
|
+
}
|
|
5952
|
+
/** Save values for the active theme's settings (validated against the schema). */
|
|
5953
|
+
async updateThemeSettings(wid, siteId, values) {
|
|
5954
|
+
return this.fetch(`w/${wid}/sites/${siteId}/theme-settings`, {
|
|
5955
|
+
method: "PUT",
|
|
5956
|
+
body: JSON.stringify({ values })
|
|
5957
|
+
});
|
|
5958
|
+
}
|
|
5700
5959
|
/** Get a single site by UUID. */
|
|
5701
5960
|
async getSiteByUuid(wid, uuid) {
|
|
5702
5961
|
return this.fetch(`s/${wid}/${uuid}`);
|
|
@@ -5735,19 +5994,28 @@ var SitesApi = class extends BaseApiClient {
|
|
|
5735
5994
|
}
|
|
5736
5995
|
);
|
|
5737
5996
|
}
|
|
5738
|
-
/**
|
|
5997
|
+
/**
|
|
5998
|
+
* Verify a phone or email code and complete site authentication.
|
|
5999
|
+
*
|
|
6000
|
+
* When the account has 2FA enrolled, the backend returns a temporary token
|
|
6001
|
+
* with ``requiresTwoFactor: true`` and this method does **not** mint full
|
|
6002
|
+
* session cookies — the caller must complete the 2FA challenge (same handoff
|
|
6003
|
+
* as public-site Google OAuth).
|
|
6004
|
+
*/
|
|
5739
6005
|
async siteVerifyCode(wid, siteUuid, code, phoneNumber, email) {
|
|
5740
6006
|
const verifyResponse = await this.fetch(`s/${wid}/${siteUuid}/auth/verify`, {
|
|
5741
6007
|
method: "POST",
|
|
5742
6008
|
body: JSON.stringify({ code, phoneNumber, email })
|
|
5743
6009
|
});
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
6010
|
+
if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
|
|
6011
|
+
const completeResponse = await fetch(`/api/auth/complete`, {
|
|
6012
|
+
method: "POST",
|
|
6013
|
+
headers: { "Content-Type": "application/json" },
|
|
6014
|
+
body: JSON.stringify({ token: verifyResponse.token })
|
|
6015
|
+
});
|
|
6016
|
+
if (!completeResponse.ok) {
|
|
6017
|
+
throw new Error("Failed to complete authentication");
|
|
6018
|
+
}
|
|
5751
6019
|
}
|
|
5752
6020
|
return verifyResponse;
|
|
5753
6021
|
}
|
|
@@ -6079,6 +6347,16 @@ var SupportRequestsApi = class extends BaseApiClient {
|
|
|
6079
6347
|
body: JSON.stringify(data)
|
|
6080
6348
|
});
|
|
6081
6349
|
}
|
|
6350
|
+
/**
|
|
6351
|
+
* Reopen a resolved support request (e.g. staff resolved it prematurely).
|
|
6352
|
+
* The server rejects requests that are not in the `resolved` state.
|
|
6353
|
+
*/
|
|
6354
|
+
async reopenWorkspaceSupportRequest(workspaceUuid, uuid, data = {}) {
|
|
6355
|
+
return this.fetch(`w/${workspaceUuid}/support-requests/${uuid}/reopen`, {
|
|
6356
|
+
method: "POST",
|
|
6357
|
+
body: JSON.stringify(data)
|
|
6358
|
+
});
|
|
6359
|
+
}
|
|
6082
6360
|
/**
|
|
6083
6361
|
* Record a click on a pushed resource (Proactive Support). For a
|
|
6084
6362
|
* manager_prompt, pass the Manager Chat UUID it opened so the
|
|
@@ -6224,7 +6502,15 @@ var SupervisorsApi = class extends BaseApiClient {
|
|
|
6224
6502
|
|
|
6225
6503
|
// src/api/tasks.ts
|
|
6226
6504
|
var TasksApi = class extends BaseApiClient {
|
|
6227
|
-
/**
|
|
6505
|
+
/**
|
|
6506
|
+
* List all tasks in a workspace, optionally filtering by workflow or
|
|
6507
|
+
* including archived.
|
|
6508
|
+
*
|
|
6509
|
+
* `workflowId` is the STABLE workflow root id — the server resolves it to
|
|
6510
|
+
* that workflow's draft revision's tasks. `workflowRevisionId` filters an
|
|
6511
|
+
* explicit revision (the read-only published-revision view). Pass at most
|
|
6512
|
+
* one; passing both that disagree is a 400.
|
|
6513
|
+
*/
|
|
6228
6514
|
async getTasks(wid, options = {}) {
|
|
6229
6515
|
const params = new URLSearchParams();
|
|
6230
6516
|
if (options.includeArchived) {
|
|
@@ -6233,6 +6519,9 @@ var TasksApi = class extends BaseApiClient {
|
|
|
6233
6519
|
if (options.workflowId) {
|
|
6234
6520
|
params.append("workflow_id", options.workflowId.toString());
|
|
6235
6521
|
}
|
|
6522
|
+
if (options.workflowRevisionId) {
|
|
6523
|
+
params.append("workflow_revision_id", options.workflowRevisionId.toString());
|
|
6524
|
+
}
|
|
6236
6525
|
if (options.sortBy) {
|
|
6237
6526
|
params.append("sortBy", options.sortBy);
|
|
6238
6527
|
}
|
|
@@ -6587,11 +6876,18 @@ var JourneysApi = class extends BaseApiClient {
|
|
|
6587
6876
|
// src/api/workflows.ts
|
|
6588
6877
|
var WorkflowsApi = class extends BaseApiClient {
|
|
6589
6878
|
/** List all workflows in a workspace, optionally including archived ones. */
|
|
6590
|
-
async getWorkflows(wid,
|
|
6591
|
-
const
|
|
6592
|
-
|
|
6879
|
+
async getWorkflows(wid, options = {}) {
|
|
6880
|
+
const params = new URLSearchParams();
|
|
6881
|
+
if (options.archived) params.set("archived", "true");
|
|
6882
|
+
if (options.page) params.set("page", String(options.page));
|
|
6883
|
+
if (options.pageSize) params.set("pageSize", String(options.pageSize));
|
|
6884
|
+
if (options.sortBy) params.set("sortBy", options.sortBy);
|
|
6885
|
+
if (options.sortOrder) params.set("sortOrder", options.sortOrder);
|
|
6886
|
+
if (options.search) params.set("search", options.search);
|
|
6887
|
+
const qs = params.toString();
|
|
6888
|
+
return this.fetch(`w/${wid}/workflows${qs ? `?${qs}` : ""}`);
|
|
6593
6889
|
}
|
|
6594
|
-
/** Get a single workflow by ID. */
|
|
6890
|
+
/** Get a single workflow by ID (root + draft + active-revision summary). */
|
|
6595
6891
|
async getWorkflow(wid, id) {
|
|
6596
6892
|
return this.fetch(`w/${wid}/workflows/${id}`);
|
|
6597
6893
|
}
|
|
@@ -6639,7 +6935,7 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
6639
6935
|
body: JSON.stringify(workflow)
|
|
6640
6936
|
});
|
|
6641
6937
|
}
|
|
6642
|
-
/** Update an existing workflow. */
|
|
6938
|
+
/** Update an existing workflow's draft revision. */
|
|
6643
6939
|
async updateWorkflow(wid, id, workflow) {
|
|
6644
6940
|
return this.fetch(`w/${wid}/workflows/${id}`, {
|
|
6645
6941
|
method: "PUT",
|
|
@@ -6660,13 +6956,15 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
6660
6956
|
/** Archive a workflow. */
|
|
6661
6957
|
async archiveWorkflow(wid, id) {
|
|
6662
6958
|
return this.fetch(`w/${wid}/workflows/${id}/archive`, {
|
|
6663
|
-
method: "POST"
|
|
6959
|
+
method: "POST",
|
|
6960
|
+
body: JSON.stringify({})
|
|
6664
6961
|
});
|
|
6665
6962
|
}
|
|
6666
6963
|
/** Unarchive a previously archived workflow. */
|
|
6667
6964
|
async unarchiveWorkflow(wid, id) {
|
|
6668
6965
|
return this.fetch(`w/${wid}/workflows/${id}/unarchive`, {
|
|
6669
|
-
method: "POST"
|
|
6966
|
+
method: "POST",
|
|
6967
|
+
body: JSON.stringify({})
|
|
6670
6968
|
});
|
|
6671
6969
|
}
|
|
6672
6970
|
/** Clone a workflow with a new name. */
|
|
@@ -6682,16 +6980,20 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
6682
6980
|
}
|
|
6683
6981
|
/** Create a new workflow from a template. */
|
|
6684
6982
|
async createWorkflowFromTemplate(wid, templateUuid, data) {
|
|
6685
|
-
return this.fetch(
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6983
|
+
return this.fetch(
|
|
6984
|
+
`w/${wid}/workflows/templates/${templateUuid}/create-workflow`,
|
|
6985
|
+
{
|
|
6986
|
+
method: "POST",
|
|
6987
|
+
body: JSON.stringify(data)
|
|
6988
|
+
}
|
|
6989
|
+
);
|
|
6689
6990
|
}
|
|
6690
6991
|
/** Get task assignment statistics for a workflow within an optional date range. */
|
|
6691
|
-
async getWorkflowTaskAssignmentStats(wid, id, fromDate, toDate) {
|
|
6992
|
+
async getWorkflowTaskAssignmentStats(wid, id, fromDate, toDate, workflowRevisionId) {
|
|
6692
6993
|
const params = new URLSearchParams();
|
|
6693
6994
|
if (fromDate) params.append("from_date", fromDate);
|
|
6694
6995
|
if (toDate) params.append("to_date", toDate);
|
|
6996
|
+
if (workflowRevisionId) params.append("workflowRevisionId", String(workflowRevisionId));
|
|
6695
6997
|
return this.fetch(
|
|
6696
6998
|
`w/${wid}/workflows/${id}/task-assignment-stats?${params.toString()}`
|
|
6697
6999
|
);
|
|
@@ -6741,6 +7043,24 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
6741
7043
|
`w/${wid}/workflows/${workflowId}/route-dry-run?${params.toString()}`
|
|
6742
7044
|
);
|
|
6743
7045
|
}
|
|
7046
|
+
// Workflow Feedback API
|
|
7047
|
+
/**
|
|
7048
|
+
* List chat feedback for a workflow (thumbs ratings + explicit/extracted rows).
|
|
7049
|
+
* First consumer of the workspace-plane chat_feedback table.
|
|
7050
|
+
*/
|
|
7051
|
+
async getWorkflowFeedback(wid, workflowId, options = {}) {
|
|
7052
|
+
const params = new URLSearchParams();
|
|
7053
|
+
if (options.page != null) params.set("page", String(options.page));
|
|
7054
|
+
if (options.pageSize != null) params.set("pageSize", String(options.pageSize));
|
|
7055
|
+
if (options.source) params.set("source", options.source);
|
|
7056
|
+
if (options.rating) params.set("rating", options.rating);
|
|
7057
|
+
if (options.authorKind) params.set("authorKind", options.authorKind);
|
|
7058
|
+
if (options.includeTest != null) params.set("includeTest", String(options.includeTest));
|
|
7059
|
+
const qs = params.toString();
|
|
7060
|
+
return this.fetch(
|
|
7061
|
+
`w/${wid}/workflows/${workflowId}/feedback${qs ? `?${qs}` : ""}`
|
|
7062
|
+
);
|
|
7063
|
+
}
|
|
6744
7064
|
// Workflow Contributors API
|
|
6745
7065
|
/** List all contributors for a workflow. */
|
|
6746
7066
|
async getWorkflowContributors(wid, workflowId) {
|
|
@@ -6806,58 +7126,80 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
6806
7126
|
body: JSON.stringify({ name })
|
|
6807
7127
|
});
|
|
6808
7128
|
}
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
return this.fetch(`w/${wid}/workflows/${workflowUuid}/versions`);
|
|
6813
|
-
}
|
|
6814
|
-
/** Get the active version of a workflow. */
|
|
6815
|
-
async getWorkflowVersionActive(wid, workflowUuid) {
|
|
6816
|
-
return this.fetch(
|
|
6817
|
-
`w/${wid}/workflows/${workflowUuid}/versions/active`
|
|
6818
|
-
);
|
|
7129
|
+
/** List relational revisions for a workflow. */
|
|
7130
|
+
async getWorkflowRevisions(wid, workflowId) {
|
|
7131
|
+
return this.fetch(`w/${wid}/workflows/${workflowId}/revisions`);
|
|
6819
7132
|
}
|
|
6820
|
-
/** Get
|
|
6821
|
-
async
|
|
7133
|
+
/** Get full workflow details for one relational workflow revision. */
|
|
7134
|
+
async getWorkflowRevision(wid, workflowId, revisionId) {
|
|
6822
7135
|
return this.fetch(
|
|
6823
|
-
`w/${wid}/workflows/${
|
|
7136
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}`
|
|
6824
7137
|
);
|
|
6825
7138
|
}
|
|
6826
|
-
/**
|
|
6827
|
-
|
|
6828
|
-
|
|
7139
|
+
/** Freeze the workflow's draft as a published revision and clone a fresh draft.
|
|
7140
|
+
*
|
|
7141
|
+
* By default the just-published revision becomes the active revision —
|
|
7142
|
+
* live traffic flips to it immediately. Pass `setActive: false` to
|
|
7143
|
+
* publish without flipping live traffic (advanced flow).
|
|
7144
|
+
*/
|
|
7145
|
+
async publishWorkflowRevision(wid, workflowId, data = {}) {
|
|
7146
|
+
return this.fetch(`w/${wid}/workflows/${workflowId}/publish`, {
|
|
6829
7147
|
method: "POST",
|
|
6830
7148
|
body: JSON.stringify(data)
|
|
6831
7149
|
});
|
|
6832
7150
|
}
|
|
6833
|
-
|
|
7151
|
+
/** Point the workflow's active pointer at a chosen revision (pointer flip only).
|
|
7152
|
+
*
|
|
7153
|
+
* The target may be any of the workflow's published revisions.
|
|
7154
|
+
* Activating the draft requires `allowDraft: true` and a UI warning
|
|
7155
|
+
* confirmation.
|
|
7156
|
+
*/
|
|
7157
|
+
async activateWorkflowRevision(wid, workflowId, revisionId, data = {}) {
|
|
6834
7158
|
return this.fetch(
|
|
6835
|
-
`w/${wid}/workflows/${
|
|
6836
|
-
{
|
|
7159
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}/activate`,
|
|
7160
|
+
{
|
|
7161
|
+
method: "POST",
|
|
7162
|
+
body: JSON.stringify(data)
|
|
7163
|
+
}
|
|
6837
7164
|
);
|
|
6838
7165
|
}
|
|
6839
|
-
/**
|
|
6840
|
-
|
|
7166
|
+
/** Update a revision's curation metadata (label + publish notes).
|
|
7167
|
+
*
|
|
7168
|
+
* Applies to both the draft and published revisions; it is not a graph
|
|
7169
|
+
* change, so it never marks the draft dirty.
|
|
7170
|
+
*/
|
|
7171
|
+
async updateWorkflowRevisionMetadata(wid, workflowId, revisionId, data) {
|
|
6841
7172
|
return this.fetch(
|
|
6842
|
-
`w/${wid}/workflows/${
|
|
7173
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}`,
|
|
6843
7174
|
{
|
|
6844
|
-
method: "
|
|
7175
|
+
method: "PATCH",
|
|
7176
|
+
body: JSON.stringify(data)
|
|
6845
7177
|
}
|
|
6846
7178
|
);
|
|
6847
7179
|
}
|
|
6848
|
-
/**
|
|
6849
|
-
|
|
7180
|
+
/** Compare two revisions of the same workflow.
|
|
7181
|
+
*
|
|
7182
|
+
* `against` is a revision id or UUID; when omitted the diff compares the
|
|
7183
|
+
* named revision against the workflow's draft. Tasks are matched by
|
|
7184
|
+
* stable lineage, so a rename reads as a changed `name` field.
|
|
7185
|
+
*/
|
|
7186
|
+
async diffWorkflowRevisions(wid, workflowId, revisionId, against) {
|
|
7187
|
+
const qs = against !== void 0 ? `?against=${encodeURIComponent(String(against))}` : "";
|
|
6850
7188
|
return this.fetch(
|
|
6851
|
-
`w/${wid}/workflows/${
|
|
6852
|
-
{
|
|
6853
|
-
method: "POST"
|
|
6854
|
-
}
|
|
7189
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}/diff${qs}`
|
|
6855
7190
|
);
|
|
6856
7191
|
}
|
|
6857
|
-
/**
|
|
6858
|
-
|
|
7192
|
+
/** Branch a published revision into the workflow's draft ("edit this
|
|
7193
|
+
* revision"): the draft becomes a fresh clone of the named published
|
|
7194
|
+
* revision. Pass `discardDraftChanges` to replace a dirty draft.
|
|
7195
|
+
*/
|
|
7196
|
+
async editWorkflowRevisionAsDraft(wid, workflowId, revisionId, data = {}) {
|
|
6859
7197
|
return this.fetch(
|
|
6860
|
-
`w/${wid}/workflows/${
|
|
7198
|
+
`w/${wid}/workflows/${workflowId}/revisions/${revisionId}/edit`,
|
|
7199
|
+
{
|
|
7200
|
+
method: "POST",
|
|
7201
|
+
body: JSON.stringify(data)
|
|
7202
|
+
}
|
|
6861
7203
|
);
|
|
6862
7204
|
}
|
|
6863
7205
|
};
|
|
@@ -6998,11 +7340,14 @@ var Scope = /* @__PURE__ */ ((Scope2) => {
|
|
|
6998
7340
|
Scope2["ANALYTICS_READ"] = "analytics:read";
|
|
6999
7341
|
Scope2["OPERATOR_READ"] = "operator:read";
|
|
7000
7342
|
Scope2["OPERATOR_WRITE"] = "operator:write";
|
|
7343
|
+
Scope2["EXPORT_READ"] = "export:read";
|
|
7344
|
+
Scope2["EXPORT_WRITE"] = "export:write";
|
|
7345
|
+
Scope2["EXPORT_ADMIN"] = "export:admin";
|
|
7001
7346
|
Scope2["ORG_INFO"] = "org:info";
|
|
7002
7347
|
Scope2["ORG_READ"] = "org:read";
|
|
7003
7348
|
Scope2["ORG_WRITE"] = "org:write";
|
|
7004
7349
|
Scope2["ORG_ADMIN"] = "org:admin";
|
|
7005
|
-
Scope2["
|
|
7350
|
+
Scope2["ORG_MANAGE_ADMINS"] = "org:manage_admins";
|
|
7006
7351
|
Scope2["ORG_DELETE"] = "org:delete";
|
|
7007
7352
|
return Scope2;
|
|
7008
7353
|
})(Scope || {});
|
|
@@ -7013,6 +7358,20 @@ var BulkMemberResultStatus = {
|
|
|
7013
7358
|
updated: "updated",
|
|
7014
7359
|
failed: "failed"
|
|
7015
7360
|
};
|
|
7361
|
+
var MemberImportMatchInfoMatchType = {
|
|
7362
|
+
external_id: "external_id",
|
|
7363
|
+
email: "email",
|
|
7364
|
+
phone: "phone",
|
|
7365
|
+
account_email: "account_email",
|
|
7366
|
+
account_phone: "account_phone"
|
|
7367
|
+
};
|
|
7368
|
+
var MemberImportPreviewRowAction = {
|
|
7369
|
+
create: "create",
|
|
7370
|
+
update: "update",
|
|
7371
|
+
unchanged: "unchanged",
|
|
7372
|
+
conflict: "conflict",
|
|
7373
|
+
error: "error"
|
|
7374
|
+
};
|
|
7016
7375
|
|
|
7017
7376
|
// src/types/member-types.ts
|
|
7018
7377
|
var MemberType = /* @__PURE__ */ ((MemberType2) => {
|
|
@@ -7056,10 +7415,14 @@ var EventRuleObjectType = /* @__PURE__ */ ((EventRuleObjectType2) => {
|
|
|
7056
7415
|
})(EventRuleObjectType || {});
|
|
7057
7416
|
var EventRuleEventType = /* @__PURE__ */ ((EventRuleEventType2) => {
|
|
7058
7417
|
EventRuleEventType2["TASK_EXECUTE"] = "task:execute";
|
|
7418
|
+
EventRuleEventType2["TASK_ENTER"] = "task:enter";
|
|
7419
|
+
EventRuleEventType2["TASK_COMMAND"] = "task:command";
|
|
7420
|
+
EventRuleEventType2["TASK_EXIT"] = "task:exit";
|
|
7059
7421
|
EventRuleEventType2["MEMBER_JOINED"] = "workspace:member_joined";
|
|
7060
7422
|
EventRuleEventType2["MEMBER_LEFT"] = "workspace:member_left";
|
|
7061
7423
|
EventRuleEventType2["DATA_RECORD_CREATED"] = "data_record:created";
|
|
7062
7424
|
EventRuleEventType2["DATA_RECORD_UPDATED"] = "data_record:updated";
|
|
7425
|
+
EventRuleEventType2["DATA_RECORD_CHANGED"] = "data_record:changed";
|
|
7063
7426
|
EventRuleEventType2["CHAT_CREATED"] = "chat:created";
|
|
7064
7427
|
EventRuleEventType2["CHAT_CALLBACK"] = "chat:callback";
|
|
7065
7428
|
EventRuleEventType2["MEMBER_UPDATED"] = "member:updated";
|
|
@@ -7089,6 +7452,7 @@ var EventRuleActionType = /* @__PURE__ */ ((EventRuleActionType2) => {
|
|
|
7089
7452
|
EventRuleActionType2["SWITCH_TASK_ACTION"] = "task:switch";
|
|
7090
7453
|
EventRuleActionType2["ASSISTANT_MESSAGE"] = "assistant:message";
|
|
7091
7454
|
EventRuleActionType2["FORM_FIELD_UPDATE"] = "form:update_field";
|
|
7455
|
+
EventRuleActionType2["CEL_MUTATE"] = "record:cel_mutate";
|
|
7092
7456
|
EventRuleActionType2["MESSAGE_VALIDATION"] = "message:validation";
|
|
7093
7457
|
EventRuleActionType2["CHAT_CREATE"] = "chat:create";
|
|
7094
7458
|
EventRuleActionType2["CHAT_CONTINUE"] = "chat:continue";
|
|
@@ -7137,7 +7501,6 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
|
|
|
7137
7501
|
WorkspaceFeature2["GCALENDAR"] = "gcalendar";
|
|
7138
7502
|
WorkspaceFeature2["MONDAY"] = "monday";
|
|
7139
7503
|
WorkspaceFeature2["RESELL_PRODUCTS"] = "resell_products";
|
|
7140
|
-
WorkspaceFeature2["HIPAA_COMPLIANCE"] = "hipaa_compliance";
|
|
7141
7504
|
WorkspaceFeature2["SOC2_COMPLIANCE"] = "soc2_compliance";
|
|
7142
7505
|
WorkspaceFeature2["EHR_FHIR"] = "ehr_fhir";
|
|
7143
7506
|
WorkspaceFeature2["EHR_ECLINICALWORKS"] = "ehr_eclinicalworks";
|
|
@@ -7147,7 +7510,6 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
|
|
|
7147
7510
|
WorkspaceFeature2["CONFLUENCE"] = "confluence";
|
|
7148
7511
|
WorkspaceFeature2["AGENT_MEMORY"] = "agent_memory";
|
|
7149
7512
|
WorkspaceFeature2["IMAGE_GENERATION"] = "image_generation";
|
|
7150
|
-
WorkspaceFeature2["WORKFLOW_VERSIONING"] = "workflow_versioning";
|
|
7151
7513
|
return WorkspaceFeature2;
|
|
7152
7514
|
})(WorkspaceFeature || {});
|
|
7153
7515
|
var MemberFeature = /* @__PURE__ */ ((MemberFeature2) => {
|
|
@@ -7161,7 +7523,6 @@ var MemberFeature = /* @__PURE__ */ ((MemberFeature2) => {
|
|
|
7161
7523
|
var OrgFeature = /* @__PURE__ */ ((OrgFeature2) => {
|
|
7162
7524
|
OrgFeature2["SSO"] = "sso";
|
|
7163
7525
|
OrgFeature2["AUDIT_LOGS"] = "audit_logs";
|
|
7164
|
-
OrgFeature2["HIPAA_COMPLIANCE"] = "hipaa_compliance";
|
|
7165
7526
|
OrgFeature2["SOC2_COMPLIANCE"] = "soc2_compliance";
|
|
7166
7527
|
OrgFeature2["CUSTOM_BRANDING"] = "custom_branding";
|
|
7167
7528
|
OrgFeature2["PRIORITY_SUPPORT"] = "priority_support";
|
|
@@ -7239,7 +7600,6 @@ var ModelProvider = {
|
|
|
7239
7600
|
aws: "aws",
|
|
7240
7601
|
elevenlabs: "elevenlabs",
|
|
7241
7602
|
deepgram: "deepgram",
|
|
7242
|
-
pocket: "pocket",
|
|
7243
7603
|
xai: "xai",
|
|
7244
7604
|
custom: "custom"
|
|
7245
7605
|
};
|
|
@@ -7269,7 +7629,10 @@ var TTS_MODEL_ELEVENLABS_MULTILINGUAL = "elevenlabs:tts:eleven_multilingual_v2";
|
|
|
7269
7629
|
var TTS_MODEL_DEEPGRAM_AURA_2 = "deepgram:tts:aura-2";
|
|
7270
7630
|
var TTS_MODEL_AWS_POLLY_GENERATIVE = "aws:tts:polly-generative";
|
|
7271
7631
|
var TTS_MODEL_AWS_POLLY_NEURAL = "aws:tts:polly-neural";
|
|
7272
|
-
|
|
7632
|
+
|
|
7633
|
+
// src/types/pids-types.ts
|
|
7634
|
+
var PIDS_DISPOSITIONS = ["true_positive", "false_positive", "needs_more_context"];
|
|
7635
|
+
var PIDS_SOURCES = ["scheduled", "backfill", "pre_llm"];
|
|
7273
7636
|
|
|
7274
7637
|
// src/types/fhir-connection-types.ts
|
|
7275
7638
|
var FhirVendor = /* @__PURE__ */ ((FhirVendor2) => {
|
|
@@ -7314,8 +7677,15 @@ var AccessGrantResourceType = /* @__PURE__ */ ((AccessGrantResourceType2) => {
|
|
|
7314
7677
|
AccessGrantResourceType2["SITE"] = "site";
|
|
7315
7678
|
AccessGrantResourceType2["ASSIGNMENT"] = "assignment";
|
|
7316
7679
|
AccessGrantResourceType2["APP_CONNECTION"] = "app_connection";
|
|
7680
|
+
AccessGrantResourceType2["CAPABILITY"] = "capability";
|
|
7317
7681
|
return AccessGrantResourceType2;
|
|
7318
7682
|
})(AccessGrantResourceType || {});
|
|
7683
|
+
var CapabilityClass = /* @__PURE__ */ ((CapabilityClass2) => {
|
|
7684
|
+
CapabilityClass2["TOOL_ALWAYS_ALLOW"] = "tool.always_allow";
|
|
7685
|
+
CapabilityClass2["SELF_MODIFICATION_SCHEDULE"] = "self_modification.schedule";
|
|
7686
|
+
CapabilityClass2["ATTENTION_INTERRUPT_RUNG"] = "attention.interrupt_rung";
|
|
7687
|
+
return CapabilityClass2;
|
|
7688
|
+
})(CapabilityClass || {});
|
|
7319
7689
|
var AccessGrantStatus = /* @__PURE__ */ ((AccessGrantStatus2) => {
|
|
7320
7690
|
AccessGrantStatus2["PENDING"] = "pending";
|
|
7321
7691
|
AccessGrantStatus2["ACTIVE"] = "active";
|
|
@@ -7639,6 +8009,35 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
7639
8009
|
async getWorkspaceSiteDomains(wid) {
|
|
7640
8010
|
return this.fetch(`w/${wid}/domains/for-site`);
|
|
7641
8011
|
}
|
|
8012
|
+
/**
|
|
8013
|
+
* List org domains available for enabling embeddable widgets. Widgets ride
|
|
8014
|
+
* on domain-ownership verification only, so the consumer gates selection on
|
|
8015
|
+
* `ownershipStatus === 'verified'`.
|
|
8016
|
+
*/
|
|
8017
|
+
async getWorkspaceWidgetDomains(wid) {
|
|
8018
|
+
return this.fetch(`w/${wid}/domains/for-widget`);
|
|
8019
|
+
}
|
|
8020
|
+
/** List this workspace's widget-domain enablement entries. */
|
|
8021
|
+
async listWidgetDomains(wid) {
|
|
8022
|
+
return this.fetch(`w/${wid}/widget-domains`);
|
|
8023
|
+
}
|
|
8024
|
+
/**
|
|
8025
|
+
* Enable/replace the set of widgets on one verified org domain. Idempotent
|
|
8026
|
+
* upsert keyed by `orgDomainUuid`; the server rejects unverified domains
|
|
8027
|
+
* (400) and cross-org domains (404).
|
|
8028
|
+
*/
|
|
8029
|
+
async upsertWidgetDomain(wid, orgDomainUuid, body) {
|
|
8030
|
+
return this.fetch(`w/${wid}/widget-domains/${orgDomainUuid}`, {
|
|
8031
|
+
method: "PUT",
|
|
8032
|
+
body: JSON.stringify(body)
|
|
8033
|
+
});
|
|
8034
|
+
}
|
|
8035
|
+
/** Remove this workspace's widget entry for a domain (disables all widgets). */
|
|
8036
|
+
async deleteWidgetDomain(wid, orgDomainUuid) {
|
|
8037
|
+
await this.fetch(`w/${wid}/widget-domains/${orgDomainUuid}`, {
|
|
8038
|
+
method: "DELETE"
|
|
8039
|
+
});
|
|
8040
|
+
}
|
|
7642
8041
|
/** List client workspaces managed by this reseller workspace, paginated. */
|
|
7643
8042
|
async getResellerWorkspaces(wid, params) {
|
|
7644
8043
|
const query = new URLSearchParams();
|
|
@@ -7798,7 +8197,7 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
7798
8197
|
/**
|
|
7799
8198
|
* Get billing dashboard data for a workspace.
|
|
7800
8199
|
*
|
|
7801
|
-
* This endpoint is available to organization owners (with org:
|
|
8200
|
+
* This endpoint is available to organization owners (with org:info scope).
|
|
7802
8201
|
* Superusers should use the admin endpoint via getWorkspaceUsageDashboard.
|
|
7803
8202
|
*
|
|
7804
8203
|
* Returns comprehensive billing information including:
|
|
@@ -7812,6 +8211,51 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
7812
8211
|
}
|
|
7813
8212
|
};
|
|
7814
8213
|
|
|
8214
|
+
// src/api/dashboards.ts
|
|
8215
|
+
var DashboardsApi = class extends BaseApiClient {
|
|
8216
|
+
/** List all dashboards for the workspace, in tab order. */
|
|
8217
|
+
async getDashboards(wid) {
|
|
8218
|
+
return this.fetch(`w/${wid}/dashboards`);
|
|
8219
|
+
}
|
|
8220
|
+
/** Get a dashboard by ID. */
|
|
8221
|
+
async getDashboard(wid, id) {
|
|
8222
|
+
return this.fetch(`w/${wid}/dashboards/${id}`);
|
|
8223
|
+
}
|
|
8224
|
+
/** Create a named dashboard, optionally with an initial widget list. */
|
|
8225
|
+
async createDashboard(wid, body) {
|
|
8226
|
+
return this.fetch(`w/${wid}/dashboards`, {
|
|
8227
|
+
method: "POST",
|
|
8228
|
+
body: JSON.stringify(body)
|
|
8229
|
+
});
|
|
8230
|
+
}
|
|
8231
|
+
/** Update a dashboard's name, position, or widget list (full replace). */
|
|
8232
|
+
async updateDashboard(wid, id, body) {
|
|
8233
|
+
return this.fetch(`w/${wid}/dashboards/${id}`, {
|
|
8234
|
+
method: "PATCH",
|
|
8235
|
+
body: JSON.stringify(body)
|
|
8236
|
+
});
|
|
8237
|
+
}
|
|
8238
|
+
/** Delete a dashboard. */
|
|
8239
|
+
async deleteDashboard(wid, id) {
|
|
8240
|
+
await this.fetch(`w/${wid}/dashboards/${id}`, { method: "DELETE" });
|
|
8241
|
+
}
|
|
8242
|
+
/** Per-channel chat volume in the window + live needs-response backlog. */
|
|
8243
|
+
async getDashboardChannelStats(wid, options) {
|
|
8244
|
+
const params = new URLSearchParams();
|
|
8245
|
+
if (options?.hours !== void 0) params.append("hours", options.hours.toString());
|
|
8246
|
+
const query = params.toString();
|
|
8247
|
+
return this.fetch(
|
|
8248
|
+
`w/${wid}/dashboards/stats/channels${query ? `?${query}` : ""}`
|
|
8249
|
+
);
|
|
8250
|
+
}
|
|
8251
|
+
/** Assignment status rollup per root workflow. */
|
|
8252
|
+
async getDashboardWorkflowAssignmentStats(wid) {
|
|
8253
|
+
return this.fetch(
|
|
8254
|
+
`w/${wid}/dashboards/stats/workflow-assignments`
|
|
8255
|
+
);
|
|
8256
|
+
}
|
|
8257
|
+
};
|
|
8258
|
+
|
|
7815
8259
|
// src/api/teams-apps.ts
|
|
7816
8260
|
var TeamsAppsApi = class extends BaseApiClient {
|
|
7817
8261
|
/**
|
|
@@ -7967,6 +8411,44 @@ var ExperimentsApi = class extends BaseApiClient {
|
|
|
7967
8411
|
}
|
|
7968
8412
|
};
|
|
7969
8413
|
|
|
8414
|
+
// src/api/patientsync-connections.ts
|
|
8415
|
+
var PatientSyncConnectionsApi = class extends BaseApiClient {
|
|
8416
|
+
/** Create or update the workspace's PatientSync connection (singleton). */
|
|
8417
|
+
async configurePatientSync(wid, data) {
|
|
8418
|
+
return this.fetch(
|
|
8419
|
+
`w/${wid}/app-connections/patientsync/configure`,
|
|
8420
|
+
{ method: "POST", body: JSON.stringify(data) }
|
|
8421
|
+
);
|
|
8422
|
+
}
|
|
8423
|
+
/** Read the PatientSync connection status (never returns the API key). */
|
|
8424
|
+
async getPatientSyncStatus(wid) {
|
|
8425
|
+
return this.fetch(`w/${wid}/app-connections/patientsync/status`);
|
|
8426
|
+
}
|
|
8427
|
+
/** Delete the workspace's PatientSync connection. */
|
|
8428
|
+
async deletePatientSyncConnection(wid) {
|
|
8429
|
+
return this.fetch(`w/${wid}/app-connections/patientsync/`, { method: "DELETE" });
|
|
8430
|
+
}
|
|
8431
|
+
};
|
|
8432
|
+
|
|
8433
|
+
// src/api/motd.ts
|
|
8434
|
+
var MotdApi = class extends BaseApiClient {
|
|
8435
|
+
/**
|
|
8436
|
+
* The Message-of-the-Day tip for the workspace on a given date.
|
|
8437
|
+
*
|
|
8438
|
+
* `date` is an ISO `YYYY-MM-DD` string (defaults to today, UTC, when
|
|
8439
|
+
* omitted); `offset` advances the rotation ("show another"). Selection is
|
|
8440
|
+
* deterministic — same date + workspace + offset always returns the same
|
|
8441
|
+
* tip — and cycles through the tip list.
|
|
8442
|
+
*/
|
|
8443
|
+
async getMotd(wid, options) {
|
|
8444
|
+
const params = new URLSearchParams();
|
|
8445
|
+
if (options?.date !== void 0) params.append("date", options.date);
|
|
8446
|
+
if (options?.offset !== void 0) params.append("offset", options.offset.toString());
|
|
8447
|
+
const query = params.toString();
|
|
8448
|
+
return this.fetch(`w/${wid}/motd${query ? `?${query}` : ""}`);
|
|
8449
|
+
}
|
|
8450
|
+
};
|
|
8451
|
+
|
|
7970
8452
|
// src/app-context.ts
|
|
7971
8453
|
function formatAppContextAsMarkdown(context) {
|
|
7972
8454
|
if (!context) {
|
|
@@ -8050,6 +8532,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8050
8532
|
customers: new CustomersApi(apiKey, baseUrl, customFetch),
|
|
8051
8533
|
resellers: new ResellersApi(apiKey, baseUrl, customFetch),
|
|
8052
8534
|
customToolkits: new CustomToolkitsApi(apiKey, baseUrl, customFetch),
|
|
8535
|
+
dashboards: new DashboardsApi(apiKey, baseUrl, customFetch),
|
|
8053
8536
|
dataTypes: new DataTypesApi(apiKey, baseUrl, customFetch),
|
|
8054
8537
|
discordBots: new DiscordBotsApi(apiKey, baseUrl, customFetch),
|
|
8055
8538
|
slackApps: new SlackAppsApi(apiKey, baseUrl, customFetch),
|
|
@@ -8057,6 +8540,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8057
8540
|
events: new EventsApi(apiKey, baseUrl, customFetch),
|
|
8058
8541
|
experiments: new ExperimentsApi(apiKey, baseUrl, customFetch),
|
|
8059
8542
|
fhirConnections: new FhirConnectionsApi(apiKey, baseUrl, customFetch),
|
|
8543
|
+
patientSyncConnections: new PatientSyncConnectionsApi(apiKey, baseUrl, customFetch),
|
|
8060
8544
|
healthie: new HealthieApi(apiKey, baseUrl, customFetch),
|
|
8061
8545
|
hubspot: new HubspotApi(apiKey, baseUrl, customFetch),
|
|
8062
8546
|
features: new FeaturesApi(apiKey, baseUrl, customFetch),
|
|
@@ -8069,6 +8553,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8069
8553
|
mcpServers: new McpServersApi(apiKey, baseUrl, customFetch),
|
|
8070
8554
|
members: new MembersApi(apiKey, baseUrl, customFetch),
|
|
8071
8555
|
milestones: new MilestonesApi(apiKey, baseUrl, customFetch),
|
|
8556
|
+
motd: new MotdApi(apiKey, baseUrl, customFetch),
|
|
8072
8557
|
confluence: new ConfluenceApi(apiKey, baseUrl, customFetch),
|
|
8073
8558
|
mondayIntegration: new MondayIntegrationApi(apiKey, baseUrl, customFetch),
|
|
8074
8559
|
notificationRules: new NotificationRulesApi(apiKey, baseUrl, customFetch),
|
|
@@ -8080,6 +8565,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8080
8565
|
pronunciations: new PronunciationsApi(apiKey, baseUrl, customFetch),
|
|
8081
8566
|
qualifications: new QualificationsApi(apiKey, baseUrl, customFetch),
|
|
8082
8567
|
personas: new PersonasApi(apiKey, baseUrl, customFetch),
|
|
8568
|
+
queries: new QueriesApi(apiKey, baseUrl, customFetch),
|
|
8083
8569
|
reports: new ReportsApi(apiKey, baseUrl, customFetch),
|
|
8084
8570
|
salesforce: new SalesforceApi(apiKey, baseUrl, customFetch),
|
|
8085
8571
|
sites: new SitesApi(apiKey, baseUrl, customFetch),
|
|
@@ -8100,7 +8586,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
8100
8586
|
|
|
8101
8587
|
// src/client/workspace-client.ts
|
|
8102
8588
|
var WORKSPACE_METHOD_NAMES = [
|
|
8103
|
-
"
|
|
8589
|
+
"activateWorkflowRevision",
|
|
8104
8590
|
"addGroupMember",
|
|
8105
8591
|
"advanceStep",
|
|
8106
8592
|
"approveWorkspaceInvitation",
|
|
@@ -8124,6 +8610,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8124
8610
|
"cancelAgentTask",
|
|
8125
8611
|
"cancelAssignment",
|
|
8126
8612
|
"cancelCalendarEvent",
|
|
8613
|
+
"cancelChatCallback",
|
|
8127
8614
|
"cancelCredentialUpdateInvite",
|
|
8128
8615
|
"checkAvailability",
|
|
8129
8616
|
"checkSiteDomainAvailability",
|
|
@@ -8138,6 +8625,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8138
8625
|
"commentOnWorkspaceSupportRequest",
|
|
8139
8626
|
"configureConfluence",
|
|
8140
8627
|
"configureHealthie",
|
|
8628
|
+
"configurePatientSync",
|
|
8141
8629
|
"configureHubspot",
|
|
8142
8630
|
"configureMondayConnection",
|
|
8143
8631
|
"configureSalesforce",
|
|
@@ -8161,6 +8649,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8161
8649
|
"createCustomTool",
|
|
8162
8650
|
"createCustomToolkit",
|
|
8163
8651
|
"createDataRecord",
|
|
8652
|
+
"createDataRecordFilter",
|
|
8164
8653
|
"createDataType",
|
|
8165
8654
|
"createDiscordBot",
|
|
8166
8655
|
"createEventRule",
|
|
@@ -8207,7 +8696,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8207
8696
|
"createWorkflowOutboundVoiceChat",
|
|
8208
8697
|
"createWorkspaceMember",
|
|
8209
8698
|
"createWorkspaceSupportRequest",
|
|
8210
|
-
"deactivateWorkflowVersion",
|
|
8211
8699
|
"deleteAbility",
|
|
8212
8700
|
"deleteAgent",
|
|
8213
8701
|
"deleteAssignment",
|
|
@@ -8223,6 +8711,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8223
8711
|
"deleteCustomTool",
|
|
8224
8712
|
"deleteCustomToolkit",
|
|
8225
8713
|
"deleteDataRecord",
|
|
8714
|
+
"deleteDataRecordFilter",
|
|
8226
8715
|
"deleteDataType",
|
|
8227
8716
|
"deleteDiscordBot",
|
|
8228
8717
|
"deleteEnrollment",
|
|
@@ -8232,6 +8721,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8232
8721
|
"deleteExperimentAssignment",
|
|
8233
8722
|
"deleteExperimentGroup",
|
|
8234
8723
|
"deleteFhirConnection",
|
|
8724
|
+
"deletePatientSyncConnection",
|
|
8235
8725
|
"deleteFile",
|
|
8236
8726
|
"deleteFileLabel",
|
|
8237
8727
|
"deleteFolder",
|
|
@@ -8264,6 +8754,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8264
8754
|
"deleteSupervisor",
|
|
8265
8755
|
"deleteTask",
|
|
8266
8756
|
"deleteTeamsApp",
|
|
8757
|
+
"deleteWidgetDomain",
|
|
8267
8758
|
"deleteWorkflow",
|
|
8268
8759
|
"deleteWorkflowContributor",
|
|
8269
8760
|
"deleteWorkflowNote",
|
|
@@ -8271,7 +8762,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8271
8762
|
"deleteWorkspaceInvitationAdmin",
|
|
8272
8763
|
"denyWorkspaceInvitation",
|
|
8273
8764
|
"describeSalesforceObject",
|
|
8274
|
-
"
|
|
8765
|
+
"diffWorkflowRevisions",
|
|
8275
8766
|
"disableConfluence",
|
|
8276
8767
|
"disableCustomToolkit",
|
|
8277
8768
|
"disableHubspot",
|
|
@@ -8287,6 +8778,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8287
8778
|
"dismissAllNotifications",
|
|
8288
8779
|
"dismissNotification",
|
|
8289
8780
|
"downloadEmailAttachment",
|
|
8781
|
+
"editWorkflowRevisionAsDraft",
|
|
8290
8782
|
"enableConfluence",
|
|
8291
8783
|
"enableCustomToolkit",
|
|
8292
8784
|
"enableHubspot",
|
|
@@ -8365,8 +8857,10 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8365
8857
|
"getCalendarSchedules",
|
|
8366
8858
|
"getCalendars",
|
|
8367
8859
|
"getCelContext",
|
|
8860
|
+
"getCharlestonTestDeliveryRecipients",
|
|
8368
8861
|
"getChat",
|
|
8369
8862
|
"getChatAssignmentTasks",
|
|
8863
|
+
"getChatCallbacks",
|
|
8370
8864
|
"getChatEmails",
|
|
8371
8865
|
"getChatFilter",
|
|
8372
8866
|
"getChatFilterByUuid",
|
|
@@ -8397,6 +8891,9 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8397
8891
|
"getCustomToolkits",
|
|
8398
8892
|
"getDataRecord",
|
|
8399
8893
|
"getDataRecordChanges",
|
|
8894
|
+
"getDataRecordFilter",
|
|
8895
|
+
"getDataRecordFilterCount",
|
|
8896
|
+
"getDataRecordFilters",
|
|
8400
8897
|
"getDataRecords",
|
|
8401
8898
|
"getDataType",
|
|
8402
8899
|
"getDataTypeByUuid",
|
|
@@ -8420,19 +8917,24 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8420
8917
|
"getFhirConnections",
|
|
8421
8918
|
"getFieldIndexStatus",
|
|
8422
8919
|
"getFile",
|
|
8920
|
+
"resolveFilePath",
|
|
8423
8921
|
"getFileLabel",
|
|
8424
8922
|
"getFileLabelByUuid",
|
|
8425
8923
|
"getFileLabels",
|
|
8426
8924
|
"getFileSharing",
|
|
8925
|
+
"getFileVersionContentsUrl",
|
|
8926
|
+
"getFileVersionDiff",
|
|
8427
8927
|
"getFiles",
|
|
8428
8928
|
"getFirstRunState",
|
|
8429
8929
|
"getFolder",
|
|
8430
8930
|
"getFolderSharing",
|
|
8431
8931
|
"getFolders",
|
|
8432
8932
|
"getGoogleCalendarStatus",
|
|
8933
|
+
"getGranteeGrants",
|
|
8433
8934
|
"getHealthieAvailableSlots",
|
|
8434
8935
|
"getHealthieReconciliationMatches",
|
|
8435
8936
|
"getHealthieStatus",
|
|
8937
|
+
"getPatientSyncStatus",
|
|
8436
8938
|
"getHubspotContactProperties",
|
|
8437
8939
|
"getHubspotManagedRules",
|
|
8438
8940
|
"getHubspotReconciliationMatches",
|
|
@@ -8474,10 +8976,12 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8474
8976
|
"getMemberLabelByUuid",
|
|
8475
8977
|
"getMemberLabels",
|
|
8476
8978
|
"getMemberMemories",
|
|
8979
|
+
"getMemberMemory",
|
|
8477
8980
|
"getMemberRecordCounts",
|
|
8478
8981
|
"getMemberRole",
|
|
8479
8982
|
"getMemberRoleByUuid",
|
|
8480
8983
|
"getMemberRoles",
|
|
8984
|
+
"getMemberSyncLinks",
|
|
8481
8985
|
"getMemberSyncSummary",
|
|
8482
8986
|
"getMemberUsage",
|
|
8483
8987
|
"getMembersMessageActivity",
|
|
@@ -8521,6 +9025,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8521
9025
|
"getPublicProducts",
|
|
8522
9026
|
"getQualification",
|
|
8523
9027
|
"getQualifications",
|
|
9028
|
+
"getRecordingInfo",
|
|
8524
9029
|
"getResellerWorkspaces",
|
|
8525
9030
|
"getRoutine",
|
|
8526
9031
|
"getRoutineRuns",
|
|
@@ -8575,17 +9080,17 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8575
9080
|
"getWorkflowAccessValidation",
|
|
8576
9081
|
"getWorkflowActivity",
|
|
8577
9082
|
"getWorkflowConfigValidation",
|
|
9083
|
+
"getWorkflowFeedback",
|
|
8578
9084
|
"getWorkflowContributors",
|
|
8579
9085
|
"getWorkflowDeletionPreview",
|
|
8580
9086
|
"getWorkflowDiagram",
|
|
8581
9087
|
"getWorkflowNotes",
|
|
9088
|
+
"getWorkflowRevision",
|
|
9089
|
+
"getWorkflowRevisions",
|
|
8582
9090
|
"getWorkflowRouteDryRun",
|
|
8583
9091
|
"getWorkflowTaskAssignmentStats",
|
|
8584
9092
|
"getWorkflowTemplates",
|
|
8585
9093
|
"getWorkflowThumbnailUrl",
|
|
8586
|
-
"getWorkflowVersion",
|
|
8587
|
-
"getWorkflowVersionActive",
|
|
8588
|
-
"getWorkflowVersions",
|
|
8589
9094
|
"getWorkflows",
|
|
8590
9095
|
"getWorkflowsActivityBatch",
|
|
8591
9096
|
"getWorkspace",
|
|
@@ -8599,6 +9104,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8599
9104
|
"getWorkspaceNotices",
|
|
8600
9105
|
"getWorkspaceProduct",
|
|
8601
9106
|
"getWorkspaceSiteDomains",
|
|
9107
|
+
"getWorkspaceWidgetDomains",
|
|
8602
9108
|
"getWorkspaceSubscriptions",
|
|
8603
9109
|
"getWorkspaceSupportRequest",
|
|
8604
9110
|
"getWorkspaceThemes",
|
|
@@ -8610,6 +9116,9 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8610
9116
|
"initiateCall",
|
|
8611
9117
|
"initiateOutboundCall",
|
|
8612
9118
|
"inspectPrompt",
|
|
9119
|
+
"installHubspot",
|
|
9120
|
+
"installMondayConnection",
|
|
9121
|
+
"installSalesforce",
|
|
8613
9122
|
"inviteMemberCredentialUpdate",
|
|
8614
9123
|
"inviteToWorkspace",
|
|
8615
9124
|
"leaveWorkspace",
|
|
@@ -8621,13 +9130,13 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8621
9130
|
"linkMemberToSalesforce",
|
|
8622
9131
|
"linkPhoneNumber",
|
|
8623
9132
|
"listAbilities",
|
|
8624
|
-
"listAgentAbilities",
|
|
8625
9133
|
"listAppConnections",
|
|
8626
9134
|
"listAvailableAppConnections",
|
|
8627
9135
|
"listConfluencePages",
|
|
8628
9136
|
"listConfluenceSpaces",
|
|
8629
9137
|
"listConnectionMemberFieldKeys",
|
|
8630
9138
|
"setDefaultGooglePlatformAccount",
|
|
9139
|
+
"listFileVersions",
|
|
8631
9140
|
"listGoogleCalendars",
|
|
8632
9141
|
"listHealthieAppointmentTypes",
|
|
8633
9142
|
"listHealthiePatients",
|
|
@@ -8637,20 +9146,24 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8637
9146
|
"listScenarios",
|
|
8638
9147
|
"listSnippets",
|
|
8639
9148
|
"listTestChatRuns",
|
|
9149
|
+
"listWidgetDomains",
|
|
8640
9150
|
"listWorkspaceInvitationsAdmin",
|
|
8641
9151
|
"listWorkspaceSupportRequests",
|
|
8642
9152
|
"markEmailAsRead",
|
|
8643
9153
|
"markEmailAsUnread",
|
|
8644
9154
|
"markNotificationAsRead",
|
|
9155
|
+
"previewImportMembers",
|
|
8645
9156
|
"previewImportWorkspace",
|
|
9157
|
+
"previewRoutineWorkflowAccess",
|
|
8646
9158
|
"previewSchedule",
|
|
8647
9159
|
"previewTTS",
|
|
8648
9160
|
"previewTemplate",
|
|
8649
9161
|
"previewThinkingSound",
|
|
8650
9162
|
"previewWorkspaceImport",
|
|
8651
9163
|
"provisionClientWorkspace",
|
|
8652
|
-
"
|
|
9164
|
+
"publishWorkflowRevision",
|
|
8653
9165
|
"rateMessage",
|
|
9166
|
+
"getChatFeedback",
|
|
8654
9167
|
"reenrollMember",
|
|
8655
9168
|
"registerLinkedRolesMetadata",
|
|
8656
9169
|
"registerPushSubscription",
|
|
@@ -8667,8 +9180,8 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8667
9180
|
"requestWorkspaceMembership",
|
|
8668
9181
|
"resetRoutineRuns",
|
|
8669
9182
|
"resolveAccessGrant",
|
|
8670
|
-
"resolveAgentTools",
|
|
8671
9183
|
"resolveAnonymousMember",
|
|
9184
|
+
"restoreFileVersion",
|
|
8672
9185
|
"revokeAccessGrant",
|
|
8673
9186
|
"revokeApiKey",
|
|
8674
9187
|
"revokeICalToken",
|
|
@@ -8734,6 +9247,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8734
9247
|
"updateCustomTool",
|
|
8735
9248
|
"updateCustomToolkit",
|
|
8736
9249
|
"updateDataRecord",
|
|
9250
|
+
"updateDataRecordFilter",
|
|
8737
9251
|
"updateDataType",
|
|
8738
9252
|
"updateDiscordBot",
|
|
8739
9253
|
"updateEventAttendee",
|
|
@@ -8786,12 +9300,13 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8786
9300
|
"updateWorkflow",
|
|
8787
9301
|
"updateWorkflowContributor",
|
|
8788
9302
|
"updateWorkflowNote",
|
|
8789
|
-
"
|
|
9303
|
+
"updateWorkflowRevisionMetadata",
|
|
8790
9304
|
"updateWorkspace",
|
|
8791
9305
|
"updateWorkspaceDefaults",
|
|
8792
9306
|
"updateWorkspaceInvitationAdmin",
|
|
8793
9307
|
"updateWorkspaceThemes",
|
|
8794
9308
|
"upsertDataRecord",
|
|
9309
|
+
"upsertWidgetDomain",
|
|
8795
9310
|
"validateDataTypeSlug",
|
|
8796
9311
|
"validateWorkflowName"
|
|
8797
9312
|
];
|
|
@@ -8823,6 +9338,7 @@ function bindAccessGrantsMethods(target, accessGrants) {
|
|
|
8823
9338
|
target.revokeAccessGrant = accessGrants.revokeAccessGrant.bind(accessGrants);
|
|
8824
9339
|
target.getAccessGrants = accessGrants.getAccessGrants.bind(accessGrants);
|
|
8825
9340
|
target.getMemberGrants = accessGrants.getMemberGrants.bind(accessGrants);
|
|
9341
|
+
target.getGranteeGrants = accessGrants.getGranteeGrants.bind(accessGrants);
|
|
8826
9342
|
}
|
|
8827
9343
|
|
|
8828
9344
|
// src/client/bindings/agent-tasks.ts
|
|
@@ -8842,8 +9358,6 @@ function bindAgentsMethods(target, agents) {
|
|
|
8842
9358
|
target.deleteAgent = agents.deleteAgent.bind(agents);
|
|
8843
9359
|
target.archiveAgent = agents.archiveAgent.bind(agents);
|
|
8844
9360
|
target.unarchiveAgent = agents.unarchiveAgent.bind(agents);
|
|
8845
|
-
target.resolveAgentTools = agents.resolveAgentTools.bind(agents);
|
|
8846
|
-
target.listAgentAbilities = agents.listAgentAbilities.bind(agents);
|
|
8847
9361
|
}
|
|
8848
9362
|
|
|
8849
9363
|
// src/client/bindings/tasks.ts
|
|
@@ -8862,12 +9376,15 @@ function bindTasksMethods(target, tasks, abilities) {
|
|
|
8862
9376
|
target.createAbility = abilities.createAbility.bind(abilities);
|
|
8863
9377
|
target.updateAbility = abilities.updateAbility.bind(abilities);
|
|
8864
9378
|
target.deleteAbility = abilities.deleteAbility.bind(abilities);
|
|
9379
|
+
target.getCharlestonTestDeliveryRecipients = abilities.getCharlestonTestDeliveryRecipients.bind(abilities);
|
|
8865
9380
|
}
|
|
8866
9381
|
|
|
8867
9382
|
// src/client/bindings/chats.ts
|
|
8868
9383
|
function bindChatsMethods(target, chats) {
|
|
8869
9384
|
target.getChats = chats.getChats.bind(chats);
|
|
8870
9385
|
target.getChat = chats.getChat.bind(chats);
|
|
9386
|
+
target.getChatCallbacks = chats.getChatCallbacks.bind(chats);
|
|
9387
|
+
target.cancelChatCallback = chats.cancelChatCallback.bind(chats);
|
|
8871
9388
|
target.getChatTokenUsage = chats.getChatTokenUsage.bind(chats);
|
|
8872
9389
|
target.getChatTodos = chats.getChatTodos.bind(chats);
|
|
8873
9390
|
target.getChatSkills = chats.getChatSkills.bind(chats);
|
|
@@ -8880,6 +9397,8 @@ function bindChatsMethods(target, chats) {
|
|
|
8880
9397
|
target.createWorkflowOutboundVoiceChat = chats.createWorkflowOutboundVoiceChat.bind(chats);
|
|
8881
9398
|
target.deleteChat = chats.deleteChat.bind(chats);
|
|
8882
9399
|
target.updateChat = chats.updateChat.bind(chats);
|
|
9400
|
+
target.getChatModelOverride = chats.getChatModelOverride.bind(chats);
|
|
9401
|
+
target.updateChatModelOverride = chats.updateChatModelOverride.bind(chats);
|
|
8883
9402
|
target.updateChatMute = chats.updateChatMute.bind(chats);
|
|
8884
9403
|
target.updateChatNeedsResponse = chats.updateChatNeedsResponse.bind(chats);
|
|
8885
9404
|
target.summarizeChat = chats.summarizeChat.bind(chats);
|
|
@@ -8889,6 +9408,7 @@ function bindChatsMethods(target, chats) {
|
|
|
8889
9408
|
target.initiateOutboundCall = chats.initiateOutboundCall.bind(chats);
|
|
8890
9409
|
target.sendAssistantMessage = chats.sendAssistantMessage.bind(chats);
|
|
8891
9410
|
target.rateMessage = chats.rateMessage.bind(chats);
|
|
9411
|
+
target.getChatFeedback = chats.getChatFeedback.bind(chats);
|
|
8892
9412
|
target.getChatAssignmentTasks = chats.getChatAssignmentTasks.bind(chats);
|
|
8893
9413
|
target.createChatCompletion = chats.createChatCompletion.bind(chats);
|
|
8894
9414
|
target.exportChats = chats.exportChats.bind(chats);
|
|
@@ -8917,9 +9437,28 @@ function bindCallsMethods(target, calls, cel) {
|
|
|
8917
9437
|
target.initiateCall = calls.initiateCall.bind(calls);
|
|
8918
9438
|
target.getVoiceToken = calls.getVoiceToken.bind(calls);
|
|
8919
9439
|
target.getMessageTiming = calls.getMessageTiming.bind(calls);
|
|
9440
|
+
target.getRecordingInfo = calls.getRecordingInfo.bind(calls);
|
|
9441
|
+
target.listChatRecordings = calls.listChatRecordings.bind(calls);
|
|
9442
|
+
target.getCallRecordingDownloadUrl = calls.getCallRecordingDownloadUrl.bind(calls);
|
|
8920
9443
|
target.getCelContext = cel.getCelContext.bind(cel);
|
|
8921
9444
|
}
|
|
8922
9445
|
|
|
9446
|
+
// src/client/bindings/dashboards.ts
|
|
9447
|
+
function bindDashboardsMethods(target, dashboards) {
|
|
9448
|
+
target.getDashboards = dashboards.getDashboards.bind(dashboards);
|
|
9449
|
+
target.getDashboard = dashboards.getDashboard.bind(dashboards);
|
|
9450
|
+
target.createDashboard = dashboards.createDashboard.bind(dashboards);
|
|
9451
|
+
target.updateDashboard = dashboards.updateDashboard.bind(dashboards);
|
|
9452
|
+
target.deleteDashboard = dashboards.deleteDashboard.bind(dashboards);
|
|
9453
|
+
target.getDashboardChannelStats = dashboards.getDashboardChannelStats.bind(dashboards);
|
|
9454
|
+
target.getDashboardWorkflowAssignmentStats = dashboards.getDashboardWorkflowAssignmentStats.bind(dashboards);
|
|
9455
|
+
}
|
|
9456
|
+
|
|
9457
|
+
// src/client/bindings/motd.ts
|
|
9458
|
+
function bindMotdMethods(target, motd) {
|
|
9459
|
+
target.getMotd = motd.getMotd.bind(motd);
|
|
9460
|
+
}
|
|
9461
|
+
|
|
8923
9462
|
// src/client/bindings/data-types.ts
|
|
8924
9463
|
function bindDataTypesMethods(target, dataTypes) {
|
|
8925
9464
|
target.getDataTypes = dataTypes.getDataTypes.bind(dataTypes);
|
|
@@ -8943,6 +9482,12 @@ function bindDataTypesMethods(target, dataTypes) {
|
|
|
8943
9482
|
target.getFieldIndexStatus = dataTypes.getFieldIndexStatus.bind(dataTypes);
|
|
8944
9483
|
target.validateDataTypeSlug = dataTypes.validateDataTypeSlug.bind(dataTypes);
|
|
8945
9484
|
target.getMemberRecordCounts = dataTypes.getMemberRecordCounts.bind(dataTypes);
|
|
9485
|
+
target.getDataRecordFilters = dataTypes.getDataRecordFilters.bind(dataTypes);
|
|
9486
|
+
target.getDataRecordFilter = dataTypes.getDataRecordFilter.bind(dataTypes);
|
|
9487
|
+
target.createDataRecordFilter = dataTypes.createDataRecordFilter.bind(dataTypes);
|
|
9488
|
+
target.updateDataRecordFilter = dataTypes.updateDataRecordFilter.bind(dataTypes);
|
|
9489
|
+
target.deleteDataRecordFilter = dataTypes.deleteDataRecordFilter.bind(dataTypes);
|
|
9490
|
+
target.getDataRecordFilterCount = dataTypes.getDataRecordFilterCount.bind(dataTypes);
|
|
8946
9491
|
}
|
|
8947
9492
|
|
|
8948
9493
|
// src/client/bindings/members.ts
|
|
@@ -8959,6 +9504,9 @@ function bindMembersMethods(target, members) {
|
|
|
8959
9504
|
target.deleteMember = members.deleteMember.bind(members);
|
|
8960
9505
|
target.archiveMember = members.archiveMember.bind(members);
|
|
8961
9506
|
target.unarchiveMember = members.unarchiveMember.bind(members);
|
|
9507
|
+
target.sendMemberPhoneConfirmation = members.sendMemberPhoneConfirmation.bind(members);
|
|
9508
|
+
target.bulkCreateMembers = members.bulkCreateMembers.bind(members);
|
|
9509
|
+
target.previewImportMembers = members.previewImportMembers.bind(members);
|
|
8962
9510
|
target.importMembers = members.importMembers.bind(members);
|
|
8963
9511
|
target.exportMembers = members.exportMembers.bind(members);
|
|
8964
9512
|
target.getMembersMessageActivity = members.getMembersMessageActivity.bind(members);
|
|
@@ -8993,8 +9541,10 @@ function bindMembersMethods(target, members) {
|
|
|
8993
9541
|
target.resolveAnonymousMember = members.resolveAnonymousMember.bind(members);
|
|
8994
9542
|
target.expireAnonymousMember = members.expireAnonymousMember.bind(members);
|
|
8995
9543
|
target.getMemberMemories = members.getMemberMemories.bind(members);
|
|
9544
|
+
target.getMemberMemory = members.getMemberMemory.bind(members);
|
|
8996
9545
|
target.createMemberMemory = members.createMemberMemory.bind(members);
|
|
8997
9546
|
target.deleteMemberMemory = members.deleteMemberMemory.bind(members);
|
|
9547
|
+
target.getMemberSyncLinks = members.getMemberSyncLinks.bind(members);
|
|
8998
9548
|
}
|
|
8999
9549
|
|
|
9000
9550
|
// src/client/bindings/workspaces.ts
|
|
@@ -9049,6 +9599,10 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
|
|
|
9049
9599
|
target.listPushSubscriptions = workspaces.listPushSubscriptions.bind(workspaces);
|
|
9050
9600
|
target.getWorkspaceEmailDomains = workspaces.getWorkspaceEmailDomains.bind(workspaces);
|
|
9051
9601
|
target.getWorkspaceSiteDomains = workspaces.getWorkspaceSiteDomains.bind(workspaces);
|
|
9602
|
+
target.getWorkspaceWidgetDomains = workspaces.getWorkspaceWidgetDomains.bind(workspaces);
|
|
9603
|
+
target.listWidgetDomains = workspaces.listWidgetDomains.bind(workspaces);
|
|
9604
|
+
target.upsertWidgetDomain = workspaces.upsertWidgetDomain.bind(workspaces);
|
|
9605
|
+
target.deleteWidgetDomain = workspaces.deleteWidgetDomain.bind(workspaces);
|
|
9052
9606
|
target.listWorkspaceInvitations = signupRequests.listWorkspaceInvitations.bind(signupRequests);
|
|
9053
9607
|
target.listWorkspaceInvitationsAdmin = signupRequests.listWorkspaceInvitationsAdmin.bind(signupRequests);
|
|
9054
9608
|
target.getWorkspaceInvitation = signupRequests.getWorkspaceInvitation.bind(signupRequests);
|
|
@@ -9068,6 +9622,7 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
|
|
|
9068
9622
|
function bindAuthMethods(target, auth, assignments) {
|
|
9069
9623
|
target.getUserAccount = auth.getUserAccount.bind(auth);
|
|
9070
9624
|
target.updateUserAccount = auth.updateUserAccount.bind(auth);
|
|
9625
|
+
target.recordAcquisition = auth.recordAcquisition.bind(auth);
|
|
9071
9626
|
target.login = auth.login.bind(auth);
|
|
9072
9627
|
target.resendCode = auth.resendCode.bind(auth);
|
|
9073
9628
|
target.verifyCodeWith2FA = auth.verifyCodeWith2FA.bind(auth);
|
|
@@ -9128,6 +9683,19 @@ function bindSitesMethods(target, sites) {
|
|
|
9128
9683
|
target.checkSiteSlugAvailability = sites.checkSiteSlugAvailability.bind(sites);
|
|
9129
9684
|
target.checkSiteDomainAvailability = sites.checkSiteDomainAvailability.bind(sites);
|
|
9130
9685
|
target.getSite = sites.getSite.bind(sites);
|
|
9686
|
+
target.getSiteSharing = sites.getSiteSharing.bind(sites);
|
|
9687
|
+
target.updateSiteSharing = sites.updateSiteSharing.bind(sites);
|
|
9688
|
+
target.getSiteSource = sites.getSiteSource.bind(sites);
|
|
9689
|
+
target.getSiteSourceTemplates = sites.getSiteSourceTemplates.bind(sites);
|
|
9690
|
+
target.createSiteSource = sites.createSiteSource.bind(sites);
|
|
9691
|
+
target.buildSiteSource = sites.buildSiteSource.bind(sites);
|
|
9692
|
+
target.publishSiteSource = sites.publishSiteSource.bind(sites);
|
|
9693
|
+
target.resetSiteSource = sites.resetSiteSource.bind(sites);
|
|
9694
|
+
target.rollbackSiteSource = sites.rollbackSiteSource.bind(sites);
|
|
9695
|
+
target.downloadSiteSourceZip = sites.downloadSiteSourceZip.bind(sites);
|
|
9696
|
+
target.importSiteSourceZip = sites.importSiteSourceZip.bind(sites);
|
|
9697
|
+
target.getThemeSettings = sites.getThemeSettings.bind(sites);
|
|
9698
|
+
target.updateThemeSettings = sites.updateThemeSettings.bind(sites);
|
|
9131
9699
|
target.getSiteByUuid = sites.getSiteByUuid.bind(sites);
|
|
9132
9700
|
target.getSiteRenderedPage = sites.getSiteRenderedPage.bind(sites);
|
|
9133
9701
|
target.getSiteRenderedMenu = sites.getSiteRenderedMenu.bind(sites);
|
|
@@ -9160,10 +9728,16 @@ function bindSitesMethods(target, sites) {
|
|
|
9160
9728
|
function bindFilesMethods(target, files) {
|
|
9161
9729
|
target.getFiles = files.getFiles.bind(files);
|
|
9162
9730
|
target.getFile = files.getFile.bind(files);
|
|
9731
|
+
target.downloadFilesZip = files.downloadFilesZip.bind(files);
|
|
9163
9732
|
target.createFile = files.createFile.bind(files);
|
|
9164
9733
|
target.uploadFile = files.uploadFile.bind(files);
|
|
9165
9734
|
target.updateFile = files.updateFile.bind(files);
|
|
9166
9735
|
target.deleteFile = files.deleteFile.bind(files);
|
|
9736
|
+
target.resolveFilePath = files.resolveFilePath.bind(files);
|
|
9737
|
+
target.listFileVersions = files.listFileVersions.bind(files);
|
|
9738
|
+
target.getFileVersionDiff = files.getFileVersionDiff.bind(files);
|
|
9739
|
+
target.restoreFileVersion = files.restoreFileVersion.bind(files);
|
|
9740
|
+
target.getFileVersionContentsUrl = files.getFileVersionContentsUrl.bind(files);
|
|
9167
9741
|
target.convertFile = files.convertFile.bind(files);
|
|
9168
9742
|
target.generateFileUploadUrl = files.generateFileUploadUrl.bind(files);
|
|
9169
9743
|
target.getFolders = files.getFolders.bind(files);
|
|
@@ -9201,6 +9775,7 @@ function bindEventsMethods(target, events) {
|
|
|
9201
9775
|
target.createEventRule = events.createEventRule.bind(events);
|
|
9202
9776
|
target.updateEventRule = events.updateEventRule.bind(events);
|
|
9203
9777
|
target.deleteEventRule = events.deleteEventRule.bind(events);
|
|
9778
|
+
target.testWebhook = events.testWebhook.bind(events);
|
|
9204
9779
|
target.reorderEventRules = events.reorderEventRules.bind(events);
|
|
9205
9780
|
target.getWebhookLogs = events.getWebhookLogs.bind(events);
|
|
9206
9781
|
target.getRuleExecutions = events.getRuleExecutions.bind(events);
|
|
@@ -9213,6 +9788,7 @@ function bindEventsMethods(target, events) {
|
|
|
9213
9788
|
target.getRoutineRuns = events.getRoutineRuns.bind(events);
|
|
9214
9789
|
target.resetRoutineRuns = events.resetRoutineRuns.bind(events);
|
|
9215
9790
|
target.previewSchedule = events.previewSchedule.bind(events);
|
|
9791
|
+
target.previewRoutineWorkflowAccess = events.previewRoutineWorkflowAccess.bind(events);
|
|
9216
9792
|
}
|
|
9217
9793
|
|
|
9218
9794
|
// src/client/bindings/experiments.ts
|
|
@@ -9257,18 +9833,18 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
|
|
|
9257
9833
|
target.createWorkflowNote = workflowNotes.createWorkflowNote.bind(workflowNotes);
|
|
9258
9834
|
target.updateWorkflowNote = workflowNotes.updateWorkflowNote.bind(workflowNotes);
|
|
9259
9835
|
target.deleteWorkflowNote = workflowNotes.deleteWorkflowNote.bind(workflowNotes);
|
|
9836
|
+
target.getWorkflowFeedback = workflows.getWorkflowFeedback.bind(workflows);
|
|
9260
9837
|
target.getWorkflowContributors = workflows.getWorkflowContributors.bind(workflows);
|
|
9261
9838
|
target.createWorkflowContributor = workflows.createWorkflowContributor.bind(workflows);
|
|
9262
9839
|
target.updateWorkflowContributor = workflows.updateWorkflowContributor.bind(workflows);
|
|
9263
9840
|
target.deleteWorkflowContributor = workflows.deleteWorkflowContributor.bind(workflows);
|
|
9264
|
-
target.
|
|
9265
|
-
target.
|
|
9266
|
-
target.
|
|
9267
|
-
target.
|
|
9268
|
-
target.
|
|
9269
|
-
target.
|
|
9270
|
-
target.
|
|
9271
|
-
target.diffWorkflowVersions = workflows.diffWorkflowVersions.bind(workflows);
|
|
9841
|
+
target.getWorkflowRevisions = workflows.getWorkflowRevisions.bind(workflows);
|
|
9842
|
+
target.getWorkflowRevision = workflows.getWorkflowRevision.bind(workflows);
|
|
9843
|
+
target.publishWorkflowRevision = workflows.publishWorkflowRevision.bind(workflows);
|
|
9844
|
+
target.activateWorkflowRevision = workflows.activateWorkflowRevision.bind(workflows);
|
|
9845
|
+
target.updateWorkflowRevisionMetadata = workflows.updateWorkflowRevisionMetadata.bind(workflows);
|
|
9846
|
+
target.diffWorkflowRevisions = workflows.diffWorkflowRevisions.bind(workflows);
|
|
9847
|
+
target.editWorkflowRevisionAsDraft = workflows.editWorkflowRevisionAsDraft.bind(workflows);
|
|
9272
9848
|
target.getWorkspaceBuilders = workflows.getWorkspaceBuilders.bind(workflows);
|
|
9273
9849
|
target.getWorkspaceBuilder = workflows.getWorkspaceBuilder.bind(workflows);
|
|
9274
9850
|
target.buildWorkspace = workflows.buildWorkspace.bind(workflows);
|
|
@@ -9333,6 +9909,9 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
|
|
|
9333
9909
|
target.getArchiveBlockers = phoneNumbers.getArchiveBlockers.bind(phoneNumbers);
|
|
9334
9910
|
target.archivePhoneNumber = phoneNumbers.archivePhoneNumber.bind(phoneNumbers);
|
|
9335
9911
|
target.getPhoneNumberCalls = phoneNumbers.getPhoneNumberCalls.bind(phoneNumbers);
|
|
9912
|
+
target.getPhoneNumberOutboundAnalyticsSummary = phoneNumbers.getPhoneNumberOutboundAnalyticsSummary.bind(phoneNumbers);
|
|
9913
|
+
target.getPhoneNumberOutboundAnalyticsCalls = phoneNumbers.getPhoneNumberOutboundAnalyticsCalls.bind(phoneNumbers);
|
|
9914
|
+
target.exportPhoneNumberOutboundAnalyticsCsv = phoneNumbers.exportPhoneNumberOutboundAnalyticsCsv.bind(phoneNumbers);
|
|
9336
9915
|
target.getPhoneNumberMessages = phoneNumbers.getPhoneNumberMessages.bind(phoneNumbers);
|
|
9337
9916
|
target.getPhoneNumberVoicemails = phoneNumbers.getPhoneNumberVoicemails.bind(phoneNumbers);
|
|
9338
9917
|
target.fetchVoicemailAudio = phoneNumbers.fetchVoicemailAudio.bind(phoneNumbers);
|
|
@@ -9451,16 +10030,18 @@ function bindAppsMethods(target, apps, builders, inquiries, oauth, oauthConnecti
|
|
|
9451
10030
|
target.exchangeOAuthToken = oauth.exchangeOAuthToken.bind(oauth);
|
|
9452
10031
|
target.getAvailableScopes = oauth.getAvailableScopes.bind(oauth);
|
|
9453
10032
|
target.getOAuthConnectionStatus = oauthConnections.getConnectionStatus.bind(oauthConnections);
|
|
10033
|
+
target.listOAuthAccounts = oauthConnections.listAccounts.bind(oauthConnections);
|
|
9454
10034
|
target.getOAuthAuthorizationUrl = oauthConnections.getAuthorizationUrl.bind(oauthConnections);
|
|
9455
10035
|
target.disconnectOAuthProvider = oauthConnections.disconnect.bind(oauthConnections);
|
|
9456
10036
|
}
|
|
9457
10037
|
|
|
9458
10038
|
// src/client/bindings/integrations.ts
|
|
9459
|
-
function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackApps, teamsApps, fhirConnections, healthie, salesforce, hubspot, appConnections, connectionSync, confluence) {
|
|
10039
|
+
function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackApps, teamsApps, fhirConnections, patientSyncConnections, healthie, salesforce, hubspot, appConnections, connectionSync, confluence) {
|
|
9460
10040
|
target.getMondayBoards = mondayIntegration.getBoards.bind(mondayIntegration);
|
|
9461
10041
|
target.getMondayBoardColumns = mondayIntegration.getBoardColumns.bind(mondayIntegration);
|
|
9462
10042
|
target.getMondayBoardGroups = mondayIntegration.getBoardGroups.bind(mondayIntegration);
|
|
9463
10043
|
target.getMondayCurrentUserInfo = mondayIntegration.getCurrentUserInfo.bind(mondayIntegration);
|
|
10044
|
+
target.installMondayConnection = mondayIntegration.installMondayConnection.bind(mondayIntegration);
|
|
9464
10045
|
target.configureMondayConnection = mondayIntegration.configureMondayConnection.bind(mondayIntegration);
|
|
9465
10046
|
target.getMondayConnectionStatus = mondayIntegration.getMondayConnectionStatus.bind(mondayIntegration);
|
|
9466
10047
|
target.authorizeMondayConnection = mondayIntegration.authorizeMondayConnection.bind(mondayIntegration);
|
|
@@ -9495,6 +10076,8 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
9495
10076
|
target.getDiscordBotAccounts = discordBots.getDiscordBotAccounts.bind(discordBots);
|
|
9496
10077
|
target.getMyCredentials = discordBots.getMyCredentials.bind(discordBots);
|
|
9497
10078
|
target.unlinkCredential = discordBots.unlinkCredential.bind(discordBots);
|
|
10079
|
+
target.completeDiscordLink = discordBots.completeDiscordLink.bind(discordBots);
|
|
10080
|
+
target.discordLinkPreflight = discordBots.discordLinkPreflight.bind(discordBots);
|
|
9498
10081
|
target.getSlackApps = slackApps.getSlackApps.bind(slackApps);
|
|
9499
10082
|
target.getSlackApp = slackApps.getSlackApp.bind(slackApps);
|
|
9500
10083
|
target.createSlackApp = slackApps.createSlackApp.bind(slackApps);
|
|
@@ -9541,6 +10124,9 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
9541
10124
|
target.fhirGetEncounterSyncRuns = fhirConnections.fhirGetEncounterSyncRuns.bind(fhirConnections);
|
|
9542
10125
|
target.fhirRefreshEncounterPatient = fhirConnections.fhirRefreshEncounterPatient.bind(fhirConnections);
|
|
9543
10126
|
target.fhirBackfillEncounterSync = fhirConnections.fhirBackfillEncounterSync.bind(fhirConnections);
|
|
10127
|
+
target.configurePatientSync = patientSyncConnections.configurePatientSync.bind(patientSyncConnections);
|
|
10128
|
+
target.getPatientSyncStatus = patientSyncConnections.getPatientSyncStatus.bind(patientSyncConnections);
|
|
10129
|
+
target.deletePatientSyncConnection = patientSyncConnections.deletePatientSyncConnection.bind(patientSyncConnections);
|
|
9544
10130
|
target.configureHealthie = healthie.configureHealthie.bind(healthie);
|
|
9545
10131
|
target.getHealthieStatus = healthie.getHealthieStatus.bind(healthie);
|
|
9546
10132
|
target.listHealthieProviders = healthie.listHealthieProviders.bind(healthie);
|
|
@@ -9564,6 +10150,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
9564
10150
|
target.deleteConfluence = confluence.deleteConfluence.bind(confluence);
|
|
9565
10151
|
target.listConfluenceSpaces = confluence.listConfluenceSpaces.bind(confluence);
|
|
9566
10152
|
target.listConfluencePages = confluence.listConfluencePages.bind(confluence);
|
|
10153
|
+
target.installSalesforce = salesforce.installSalesforce.bind(salesforce);
|
|
9567
10154
|
target.configureSalesforce = salesforce.configureSalesforce.bind(salesforce);
|
|
9568
10155
|
target.startSalesforceOAuth = salesforce.startSalesforceOAuth.bind(salesforce);
|
|
9569
10156
|
target.getSalesforceStatus = salesforce.getSalesforceStatus.bind(salesforce);
|
|
@@ -9581,6 +10168,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
9581
10168
|
target.describeSalesforceObject = salesforce.describeSalesforceObject.bind(salesforce);
|
|
9582
10169
|
target.searchSalesforceRecords = salesforce.searchSalesforceRecords.bind(salesforce);
|
|
9583
10170
|
target.importSalesforceMembers = salesforce.importSalesforceMembers.bind(salesforce);
|
|
10171
|
+
target.installHubspot = hubspot.installHubspot.bind(hubspot);
|
|
9584
10172
|
target.configureHubspot = hubspot.configureHubspot.bind(hubspot);
|
|
9585
10173
|
target.startHubspotOAuth = hubspot.startHubspotOAuth.bind(hubspot);
|
|
9586
10174
|
target.getHubspotStatus = hubspot.getHubspotStatus.bind(hubspot);
|
|
@@ -9734,6 +10322,14 @@ function bindPersonasMethods(target, personas) {
|
|
|
9734
10322
|
target.deletePersona = personas.deletePersona.bind(personas);
|
|
9735
10323
|
}
|
|
9736
10324
|
|
|
10325
|
+
// src/client/bindings/queries.ts
|
|
10326
|
+
function bindQueriesMethods(target, queries) {
|
|
10327
|
+
target.getQueryFields = queries.getQueryFields.bind(queries);
|
|
10328
|
+
target.validateQuery = queries.validateQuery.bind(queries);
|
|
10329
|
+
target.previewQuery = queries.previewQuery.bind(queries);
|
|
10330
|
+
target.runQuery = queries.runQuery.bind(queries);
|
|
10331
|
+
}
|
|
10332
|
+
|
|
9737
10333
|
// src/client/bindings/customers.ts
|
|
9738
10334
|
function bindCustomersMethods(target, customers) {
|
|
9739
10335
|
target.getMyCustomers = customers.getMyCustomers.bind(customers);
|
|
@@ -9780,6 +10376,7 @@ function bindSupportRequestMethods(target, supportRequests) {
|
|
|
9780
10376
|
target.createWorkspaceSupportRequest = supportRequests.createWorkspaceSupportRequest.bind(supportRequests);
|
|
9781
10377
|
target.commentOnWorkspaceSupportRequest = supportRequests.commentOnWorkspaceSupportRequest.bind(supportRequests);
|
|
9782
10378
|
target.closeWorkspaceSupportRequest = supportRequests.closeWorkspaceSupportRequest.bind(supportRequests);
|
|
10379
|
+
target.reopenWorkspaceSupportRequest = supportRequests.reopenWorkspaceSupportRequest.bind(supportRequests);
|
|
9783
10380
|
target.clickWorkspaceSupportRequestResource = supportRequests.clickWorkspaceSupportRequestResource.bind(supportRequests);
|
|
9784
10381
|
}
|
|
9785
10382
|
|
|
@@ -9804,9 +10401,12 @@ var GravityRailClient = class {
|
|
|
9804
10401
|
createAbility;
|
|
9805
10402
|
updateAbility;
|
|
9806
10403
|
deleteAbility;
|
|
10404
|
+
getCharlestonTestDeliveryRecipients;
|
|
9807
10405
|
// Chats API
|
|
9808
10406
|
getChats;
|
|
9809
10407
|
getChat;
|
|
10408
|
+
getChatCallbacks;
|
|
10409
|
+
cancelChatCallback;
|
|
9810
10410
|
getChatTokenUsage;
|
|
9811
10411
|
getChatTodos;
|
|
9812
10412
|
getChatSkills;
|
|
@@ -9819,6 +10419,8 @@ var GravityRailClient = class {
|
|
|
9819
10419
|
createWorkflowOutboundVoiceChat;
|
|
9820
10420
|
deleteChat;
|
|
9821
10421
|
updateChat;
|
|
10422
|
+
getChatModelOverride;
|
|
10423
|
+
updateChatModelOverride;
|
|
9822
10424
|
updateChatMute;
|
|
9823
10425
|
updateChatNeedsResponse;
|
|
9824
10426
|
summarizeChat;
|
|
@@ -9828,6 +10430,7 @@ var GravityRailClient = class {
|
|
|
9828
10430
|
initiateOutboundCall;
|
|
9829
10431
|
sendAssistantMessage;
|
|
9830
10432
|
rateMessage;
|
|
10433
|
+
getChatFeedback;
|
|
9831
10434
|
getChatAssignmentTasks;
|
|
9832
10435
|
createChatCompletion;
|
|
9833
10436
|
exportChats;
|
|
@@ -9853,6 +10456,9 @@ var GravityRailClient = class {
|
|
|
9853
10456
|
initiateCall;
|
|
9854
10457
|
getVoiceToken;
|
|
9855
10458
|
getMessageTiming;
|
|
10459
|
+
getRecordingInfo;
|
|
10460
|
+
listChatRecordings;
|
|
10461
|
+
getCallRecordingDownloadUrl;
|
|
9856
10462
|
getCelContext;
|
|
9857
10463
|
// Data Types API
|
|
9858
10464
|
getDataTypes;
|
|
@@ -9876,6 +10482,12 @@ var GravityRailClient = class {
|
|
|
9876
10482
|
getFieldIndexStatus;
|
|
9877
10483
|
validateDataTypeSlug;
|
|
9878
10484
|
getMemberRecordCounts;
|
|
10485
|
+
getDataRecordFilters;
|
|
10486
|
+
getDataRecordFilter;
|
|
10487
|
+
createDataRecordFilter;
|
|
10488
|
+
updateDataRecordFilter;
|
|
10489
|
+
deleteDataRecordFilter;
|
|
10490
|
+
getDataRecordFilterCount;
|
|
9879
10491
|
// Members API
|
|
9880
10492
|
getCurrentMember;
|
|
9881
10493
|
getOwnedMembers;
|
|
@@ -9889,6 +10501,9 @@ var GravityRailClient = class {
|
|
|
9889
10501
|
deleteMember;
|
|
9890
10502
|
archiveMember;
|
|
9891
10503
|
unarchiveMember;
|
|
10504
|
+
sendMemberPhoneConfirmation;
|
|
10505
|
+
bulkCreateMembers;
|
|
10506
|
+
previewImportMembers;
|
|
9892
10507
|
importMembers;
|
|
9893
10508
|
exportMembers;
|
|
9894
10509
|
getMembersMessageActivity;
|
|
@@ -9927,8 +10542,11 @@ var GravityRailClient = class {
|
|
|
9927
10542
|
expireAnonymousMember;
|
|
9928
10543
|
// Member Memories
|
|
9929
10544
|
getMemberMemories;
|
|
10545
|
+
getMemberMemory;
|
|
9930
10546
|
createMemberMemory;
|
|
9931
10547
|
deleteMemberMemory;
|
|
10548
|
+
// Member Sync Links
|
|
10549
|
+
getMemberSyncLinks;
|
|
9932
10550
|
// Agent Tasks API (operator-facing async sub-agent inspection/cancel)
|
|
9933
10551
|
getAgentTasks;
|
|
9934
10552
|
getAgentTask;
|
|
@@ -9942,8 +10560,6 @@ var GravityRailClient = class {
|
|
|
9942
10560
|
deleteAgent;
|
|
9943
10561
|
archiveAgent;
|
|
9944
10562
|
unarchiveAgent;
|
|
9945
|
-
resolveAgentTools;
|
|
9946
|
-
listAgentAbilities;
|
|
9947
10563
|
// Qualifications API
|
|
9948
10564
|
getQualifications;
|
|
9949
10565
|
getQualification;
|
|
@@ -9959,11 +10575,26 @@ var GravityRailClient = class {
|
|
|
9959
10575
|
evaluateTestChatRun;
|
|
9960
10576
|
endTestChatRun;
|
|
9961
10577
|
// Personas API (workspace-scoped test-identity templates)
|
|
10578
|
+
// Unified Query Engine
|
|
10579
|
+
getQueryFields;
|
|
10580
|
+
validateQuery;
|
|
10581
|
+
previewQuery;
|
|
10582
|
+
runQuery;
|
|
9962
10583
|
listPersonas;
|
|
9963
10584
|
getPersona;
|
|
9964
10585
|
createPersona;
|
|
9965
10586
|
updatePersona;
|
|
9966
10587
|
deletePersona;
|
|
10588
|
+
// Dashboards API
|
|
10589
|
+
getDashboards;
|
|
10590
|
+
getDashboard;
|
|
10591
|
+
createDashboard;
|
|
10592
|
+
updateDashboard;
|
|
10593
|
+
deleteDashboard;
|
|
10594
|
+
getDashboardChannelStats;
|
|
10595
|
+
getDashboardWorkflowAssignmentStats;
|
|
10596
|
+
// MOTD API
|
|
10597
|
+
getMotd;
|
|
9967
10598
|
// Journeys API
|
|
9968
10599
|
getJourneys;
|
|
9969
10600
|
getJourney;
|
|
@@ -10031,6 +10662,7 @@ var GravityRailClient = class {
|
|
|
10031
10662
|
revokeAccessGrant;
|
|
10032
10663
|
getAccessGrants;
|
|
10033
10664
|
getMemberGrants;
|
|
10665
|
+
getGranteeGrants;
|
|
10034
10666
|
// Prompts API
|
|
10035
10667
|
inspectPrompt;
|
|
10036
10668
|
// Workspaces API
|
|
@@ -10080,6 +10712,10 @@ var GravityRailClient = class {
|
|
|
10080
10712
|
getUsageDashboard;
|
|
10081
10713
|
getWorkspaceEmailDomains;
|
|
10082
10714
|
getWorkspaceSiteDomains;
|
|
10715
|
+
getWorkspaceWidgetDomains;
|
|
10716
|
+
listWidgetDomains;
|
|
10717
|
+
upsertWidgetDomain;
|
|
10718
|
+
deleteWidgetDomain;
|
|
10083
10719
|
// Org API
|
|
10084
10720
|
listOrgDomains;
|
|
10085
10721
|
registerOrgDomain;
|
|
@@ -10120,6 +10756,7 @@ var GravityRailClient = class {
|
|
|
10120
10756
|
// Auth API
|
|
10121
10757
|
getUserAccount;
|
|
10122
10758
|
updateUserAccount;
|
|
10759
|
+
recordAcquisition;
|
|
10123
10760
|
login;
|
|
10124
10761
|
resendCode;
|
|
10125
10762
|
verifyCodeWith2FA;
|
|
@@ -10177,6 +10814,19 @@ var GravityRailClient = class {
|
|
|
10177
10814
|
checkSiteSlugAvailability;
|
|
10178
10815
|
checkSiteDomainAvailability;
|
|
10179
10816
|
getSite;
|
|
10817
|
+
getSiteSharing;
|
|
10818
|
+
updateSiteSharing;
|
|
10819
|
+
getSiteSource;
|
|
10820
|
+
getSiteSourceTemplates;
|
|
10821
|
+
createSiteSource;
|
|
10822
|
+
buildSiteSource;
|
|
10823
|
+
publishSiteSource;
|
|
10824
|
+
resetSiteSource;
|
|
10825
|
+
rollbackSiteSource;
|
|
10826
|
+
downloadSiteSourceZip;
|
|
10827
|
+
importSiteSourceZip;
|
|
10828
|
+
getThemeSettings;
|
|
10829
|
+
updateThemeSettings;
|
|
10180
10830
|
getSiteByUuid;
|
|
10181
10831
|
getSiteRenderedPage;
|
|
10182
10832
|
getSiteRenderedMenu;
|
|
@@ -10206,10 +10856,16 @@ var GravityRailClient = class {
|
|
|
10206
10856
|
// Files API
|
|
10207
10857
|
getFiles;
|
|
10208
10858
|
getFile;
|
|
10859
|
+
resolveFilePath;
|
|
10860
|
+
downloadFilesZip;
|
|
10209
10861
|
createFile;
|
|
10210
10862
|
uploadFile;
|
|
10211
10863
|
updateFile;
|
|
10212
10864
|
deleteFile;
|
|
10865
|
+
listFileVersions;
|
|
10866
|
+
getFileVersionDiff;
|
|
10867
|
+
restoreFileVersion;
|
|
10868
|
+
getFileVersionContentsUrl;
|
|
10213
10869
|
convertFile;
|
|
10214
10870
|
generateFileUploadUrl;
|
|
10215
10871
|
getFolders;
|
|
@@ -10245,6 +10901,7 @@ var GravityRailClient = class {
|
|
|
10245
10901
|
createEventRule;
|
|
10246
10902
|
updateEventRule;
|
|
10247
10903
|
deleteEventRule;
|
|
10904
|
+
testWebhook;
|
|
10248
10905
|
reorderEventRules;
|
|
10249
10906
|
getWebhookLogs;
|
|
10250
10907
|
getRuleExecutions;
|
|
@@ -10257,6 +10914,7 @@ var GravityRailClient = class {
|
|
|
10257
10914
|
getRoutineRuns;
|
|
10258
10915
|
resetRoutineRuns;
|
|
10259
10916
|
previewSchedule;
|
|
10917
|
+
previewRoutineWorkflowAccess;
|
|
10260
10918
|
// Workflows API
|
|
10261
10919
|
getWorkflows;
|
|
10262
10920
|
getWorkflow;
|
|
@@ -10281,18 +10939,18 @@ var GravityRailClient = class {
|
|
|
10281
10939
|
createWorkflowNote;
|
|
10282
10940
|
updateWorkflowNote;
|
|
10283
10941
|
deleteWorkflowNote;
|
|
10942
|
+
getWorkflowFeedback;
|
|
10284
10943
|
getWorkflowContributors;
|
|
10285
10944
|
createWorkflowContributor;
|
|
10286
10945
|
updateWorkflowContributor;
|
|
10287
10946
|
deleteWorkflowContributor;
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
diffWorkflowVersions;
|
|
10947
|
+
getWorkflowRevisions;
|
|
10948
|
+
getWorkflowRevision;
|
|
10949
|
+
publishWorkflowRevision;
|
|
10950
|
+
activateWorkflowRevision;
|
|
10951
|
+
updateWorkflowRevisionMetadata;
|
|
10952
|
+
diffWorkflowRevisions;
|
|
10953
|
+
editWorkflowRevisionAsDraft;
|
|
10296
10954
|
getWorkspaceBuilders;
|
|
10297
10955
|
getWorkspaceBuilder;
|
|
10298
10956
|
buildWorkspace;
|
|
@@ -10351,6 +11009,9 @@ var GravityRailClient = class {
|
|
|
10351
11009
|
getArchiveBlockers;
|
|
10352
11010
|
archivePhoneNumber;
|
|
10353
11011
|
getPhoneNumberCalls;
|
|
11012
|
+
getPhoneNumberOutboundAnalyticsSummary;
|
|
11013
|
+
getPhoneNumberOutboundAnalyticsCalls;
|
|
11014
|
+
exportPhoneNumberOutboundAnalyticsCsv;
|
|
10354
11015
|
getPhoneNumberMessages;
|
|
10355
11016
|
getPhoneNumberVoicemails;
|
|
10356
11017
|
fetchVoicemailAudio;
|
|
@@ -10460,6 +11121,7 @@ var GravityRailClient = class {
|
|
|
10460
11121
|
exchangeOAuthToken;
|
|
10461
11122
|
getAvailableScopes;
|
|
10462
11123
|
getOAuthConnectionStatus;
|
|
11124
|
+
listOAuthAccounts;
|
|
10463
11125
|
getOAuthAuthorizationUrl;
|
|
10464
11126
|
disconnectOAuthProvider;
|
|
10465
11127
|
// Integrations API
|
|
@@ -10468,6 +11130,7 @@ var GravityRailClient = class {
|
|
|
10468
11130
|
getMondayBoardGroups;
|
|
10469
11131
|
getMondayCurrentUserInfo;
|
|
10470
11132
|
// Monday.com Connection API
|
|
11133
|
+
installMondayConnection;
|
|
10471
11134
|
configureMondayConnection;
|
|
10472
11135
|
getMondayConnectionStatus;
|
|
10473
11136
|
authorizeMondayConnection;
|
|
@@ -10503,6 +11166,8 @@ var GravityRailClient = class {
|
|
|
10503
11166
|
getDiscordBotAccounts;
|
|
10504
11167
|
getMyCredentials;
|
|
10505
11168
|
unlinkCredential;
|
|
11169
|
+
completeDiscordLink;
|
|
11170
|
+
discordLinkPreflight;
|
|
10506
11171
|
// Slack Apps API
|
|
10507
11172
|
getSlackApps;
|
|
10508
11173
|
getSlackApp;
|
|
@@ -10553,6 +11218,9 @@ var GravityRailClient = class {
|
|
|
10553
11218
|
fhirRefreshEncounterPatient;
|
|
10554
11219
|
fhirBackfillEncounterSync;
|
|
10555
11220
|
// Healthie API
|
|
11221
|
+
configurePatientSync;
|
|
11222
|
+
getPatientSyncStatus;
|
|
11223
|
+
deletePatientSyncConnection;
|
|
10556
11224
|
configureHealthie;
|
|
10557
11225
|
getHealthieStatus;
|
|
10558
11226
|
listHealthieProviders;
|
|
@@ -10578,6 +11246,7 @@ var GravityRailClient = class {
|
|
|
10578
11246
|
listConfluenceSpaces;
|
|
10579
11247
|
listConfluencePages;
|
|
10580
11248
|
// Salesforce API
|
|
11249
|
+
installSalesforce;
|
|
10581
11250
|
configureSalesforce;
|
|
10582
11251
|
startSalesforceOAuth;
|
|
10583
11252
|
getSalesforceStatus;
|
|
@@ -10596,6 +11265,7 @@ var GravityRailClient = class {
|
|
|
10596
11265
|
searchSalesforceRecords;
|
|
10597
11266
|
importSalesforceMembers;
|
|
10598
11267
|
// HubSpot API
|
|
11268
|
+
installHubspot;
|
|
10599
11269
|
configureHubspot;
|
|
10600
11270
|
startHubspotOAuth;
|
|
10601
11271
|
getHubspotStatus;
|
|
@@ -10681,6 +11351,7 @@ var GravityRailClient = class {
|
|
|
10681
11351
|
createWorkspaceSupportRequest;
|
|
10682
11352
|
commentOnWorkspaceSupportRequest;
|
|
10683
11353
|
closeWorkspaceSupportRequest;
|
|
11354
|
+
reopenWorkspaceSupportRequest;
|
|
10684
11355
|
clickWorkspaceSupportRequestResource;
|
|
10685
11356
|
constructor(apiKey, baseUrl, customFetch) {
|
|
10686
11357
|
const apis = createApiModules(apiKey, baseUrl, customFetch);
|
|
@@ -10695,6 +11366,9 @@ var GravityRailClient = class {
|
|
|
10695
11366
|
bindAgentsMethods(this, apis.agents);
|
|
10696
11367
|
bindQualificationsMethods(this, apis.qualifications);
|
|
10697
11368
|
bindPersonasMethods(this, apis.personas);
|
|
11369
|
+
bindQueriesMethods(this, apis.queries);
|
|
11370
|
+
bindDashboardsMethods(this, apis.dashboards);
|
|
11371
|
+
bindMotdMethods(this, apis.motd);
|
|
10698
11372
|
bindJourneysMethods(this, apis.journeys);
|
|
10699
11373
|
bindExperimentsMethods(this, apis.experiments);
|
|
10700
11374
|
bindOperatorMethods(this, apis.operatorGroups);
|
|
@@ -10734,6 +11408,7 @@ var GravityRailClient = class {
|
|
|
10734
11408
|
apis.slackApps,
|
|
10735
11409
|
apis.teamsApps,
|
|
10736
11410
|
apis.fhirConnections,
|
|
11411
|
+
apis.patientSyncConnections,
|
|
10737
11412
|
apis.healthie,
|
|
10738
11413
|
apis.salesforce,
|
|
10739
11414
|
apis.hubspot,
|
|
@@ -10787,23 +11462,30 @@ var GravityRailClient = class {
|
|
|
10787
11462
|
});
|
|
10788
11463
|
}
|
|
10789
11464
|
/**
|
|
10790
|
-
* Set the org
|
|
10791
|
-
*
|
|
10792
|
-
*
|
|
11465
|
+
* Set the org session credential for cross-domain / non-browser clients (e.g. CLI).
|
|
11466
|
+
* Opaque gr_sess_ values use X-Org-Session. Legacy orgToken JWE values still
|
|
11467
|
+
* use X-Org-Token during the migration window.
|
|
10793
11468
|
*
|
|
10794
|
-
* `orgUuid` is the org that issued the
|
|
10795
|
-
* detect a stale
|
|
11469
|
+
* `orgUuid` is the org that issued the session. Pass it so the SDK can
|
|
11470
|
+
* detect a stale session (e.g. switching orgs mid-session) and re-fire the
|
|
10796
11471
|
* org-auth handler instead of silently 401-ing.
|
|
10797
11472
|
*
|
|
10798
11473
|
* Propagates to all API modules.
|
|
10799
11474
|
*/
|
|
10800
|
-
|
|
11475
|
+
setOrgSession(session, orgUuid) {
|
|
10801
11476
|
Object.values(this.apis).forEach((api) => {
|
|
10802
|
-
if (typeof api.
|
|
10803
|
-
api.
|
|
11477
|
+
if (typeof api.setOrgSession === "function") {
|
|
11478
|
+
api.setOrgSession(session, orgUuid);
|
|
10804
11479
|
}
|
|
10805
11480
|
});
|
|
10806
11481
|
}
|
|
11482
|
+
/**
|
|
11483
|
+
* @deprecated Legacy compatibility for stateless orgToken JWE credentials.
|
|
11484
|
+
* Prefer setOrgSession() for opaque org browser sessions.
|
|
11485
|
+
*/
|
|
11486
|
+
setOrgToken(token, orgUuid) {
|
|
11487
|
+
this.setOrgSession(token, orgUuid);
|
|
11488
|
+
}
|
|
10807
11489
|
/**
|
|
10808
11490
|
* Update the API key across all modules.
|
|
10809
11491
|
* Used after successful re-authentication.
|
|
@@ -10843,26 +11525,26 @@ var GravityRailClient = class {
|
|
|
10843
11525
|
}
|
|
10844
11526
|
};
|
|
10845
11527
|
|
|
10846
|
-
// src/constants/models.ts
|
|
10847
|
-
var DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
|
|
10848
|
-
var DEFAULT_VOICE_INFERENCE_MODEL = "google:vertex:gemini-3-flash";
|
|
10849
|
-
var DEFAULT_CUSTOM_VOICE_MODEL = "elevenlabs:voice:river";
|
|
10850
|
-
|
|
10851
11528
|
// src/types/ability-types.ts
|
|
10852
11529
|
var AbilityTypeSlugs = {
|
|
10853
11530
|
// Tools
|
|
10854
11531
|
TOOLKITS: "tools:toolkits",
|
|
10855
11532
|
WEB_SEARCH: "tools:web_search",
|
|
10856
11533
|
CONVERSATION_HISTORY: "tools:conversation_history",
|
|
11534
|
+
IMAGE_GENERATION: "tools:image_generation",
|
|
11535
|
+
CONVERSATION_CONTROL: "tools:conversation_control",
|
|
10857
11536
|
// Integration
|
|
10858
11537
|
CALENDAR_BOOKING: "integration:calendar_booking",
|
|
10859
11538
|
FILE_ACCESS: "integration:file_access",
|
|
10860
11539
|
DATA_ACCESS: "integration:data_access",
|
|
10861
11540
|
GMAIL: "integration:gmail",
|
|
11541
|
+
GOOGLE_CALENDAR: "integration:google_calendar",
|
|
11542
|
+
GOOGLE_DRIVE: "integration:google_drive",
|
|
10862
11543
|
CHARLESTON_PMD_PAGING: "integration:charleston_pmd_paging",
|
|
10863
11544
|
// Communication
|
|
10864
11545
|
PHONE_CALL_TOOLS: "communication:phone_call_tools",
|
|
10865
11546
|
SEND_SMS: "communication:send_sms",
|
|
11547
|
+
SEND_WHATSAPP: "communication:send_whatsapp",
|
|
10866
11548
|
MEMBER_ACCESS: "communication:member_access",
|
|
10867
11549
|
AUDIO_PLAYBACK: "communication:audio_playback",
|
|
10868
11550
|
// Oversight
|
|
@@ -10871,6 +11553,12 @@ var AbilityTypeSlugs = {
|
|
|
10871
11553
|
ESCALATION: "oversight:escalation",
|
|
10872
11554
|
// Identity
|
|
10873
11555
|
MEMBER_FIELD_VERIFICATION: "identity:member_field_verification",
|
|
11556
|
+
// Delegation
|
|
11557
|
+
CONTRIBUTOR: "delegation:contributor",
|
|
11558
|
+
// Workflow
|
|
11559
|
+
WORKFLOW_RUN: "workflow:run",
|
|
11560
|
+
// Commerce
|
|
11561
|
+
RESELLER: "commerce:reseller",
|
|
10874
11562
|
// System (auto-injected, hidden from users)
|
|
10875
11563
|
USER_MESSAGE_RULES: "system:user_message_rules",
|
|
10876
11564
|
ASSISTANT_MESSAGE_RULES: "chat:assistant_message_rules",
|
|
@@ -10892,7 +11580,6 @@ var TTS_PREVIEW_PROVIDERS = [
|
|
|
10892
11580
|
"elevenlabs",
|
|
10893
11581
|
"google",
|
|
10894
11582
|
"aws",
|
|
10895
|
-
"pocket",
|
|
10896
11583
|
"deepgram",
|
|
10897
11584
|
"xai"
|
|
10898
11585
|
];
|
|
@@ -10907,6 +11594,13 @@ function canPreviewVoice(entity) {
|
|
|
10907
11594
|
return TTS_PREVIEW_PROVIDERS.includes(provider);
|
|
10908
11595
|
}
|
|
10909
11596
|
|
|
11597
|
+
// src/types/query-engine-types.ts
|
|
11598
|
+
var QUERY_VALUELESS_OPS = /* @__PURE__ */ new Set([
|
|
11599
|
+
"isEmpty",
|
|
11600
|
+
"notEmpty",
|
|
11601
|
+
"exists"
|
|
11602
|
+
]);
|
|
11603
|
+
|
|
10910
11604
|
// src/types/chat-types.ts
|
|
10911
11605
|
var SMS_DELIVERY_FAILURE_STATUSES = /* @__PURE__ */ new Set([
|
|
10912
11606
|
"failed",
|
|
@@ -10915,6 +11609,10 @@ var SMS_DELIVERY_FAILURE_STATUSES = /* @__PURE__ */ new Set([
|
|
|
10915
11609
|
function isSMSDeliveryFailureStatus(status) {
|
|
10916
11610
|
return status != null && SMS_DELIVERY_FAILURE_STATUSES.has(status);
|
|
10917
11611
|
}
|
|
11612
|
+
var POSITIVE_RATING_THRESHOLD = 0.5;
|
|
11613
|
+
function isPositiveRating(rating) {
|
|
11614
|
+
return rating != null && rating >= POSITIVE_RATING_THRESHOLD;
|
|
11615
|
+
}
|
|
10918
11616
|
|
|
10919
11617
|
// src/types/generated/organization.ts
|
|
10920
11618
|
var BusinessIndustry = {
|
|
@@ -10958,6 +11656,11 @@ var BusinessType = {
|
|
|
10958
11656
|
"Non-profit_Corporation": "Non-profit Corporation",
|
|
10959
11657
|
Corporation: "Corporation"
|
|
10960
11658
|
};
|
|
11659
|
+
var DeclaredDataUse = {
|
|
11660
|
+
unclassified: "unclassified",
|
|
11661
|
+
non_phi_only: "non_phi_only",
|
|
11662
|
+
phi_expected: "phi_expected"
|
|
11663
|
+
};
|
|
10961
11664
|
var EmailDnsRecordType = {
|
|
10962
11665
|
TXT: "TXT",
|
|
10963
11666
|
CNAME: "CNAME",
|
|
@@ -11017,6 +11720,7 @@ var AbilityConfigIssueCode = {
|
|
|
11017
11720
|
missing_resource: "missing_resource",
|
|
11018
11721
|
invalid_state: "invalid_state",
|
|
11019
11722
|
feature_disabled: "feature_disabled",
|
|
11723
|
+
missing_connection: "missing_connection",
|
|
11020
11724
|
external_drift: "external_drift"
|
|
11021
11725
|
};
|
|
11022
11726
|
var AbilityConfigIssueSeverity = {
|
|
@@ -11030,6 +11734,9 @@ var WorkflowAccessWarningResourceType = {
|
|
|
11030
11734
|
calendar: "calendar"
|
|
11031
11735
|
};
|
|
11032
11736
|
|
|
11737
|
+
// src/types/widget-domain-types.ts
|
|
11738
|
+
var WIDGET_SLUGS = ["chat", "operator", "operator-tools", "chat-app"];
|
|
11739
|
+
|
|
11033
11740
|
// src/features/registry.ts
|
|
11034
11741
|
var FeatureCategory = /* @__PURE__ */ ((FeatureCategory2) => {
|
|
11035
11742
|
FeatureCategory2["COMMUNICATION"] = "communication";
|
|
@@ -11132,21 +11839,16 @@ var CHAT_TYPES = {
|
|
|
11132
11839
|
ASSIGNMENT: "assignment",
|
|
11133
11840
|
MANAGER: "manager",
|
|
11134
11841
|
CONTRIBUTOR: "contributor",
|
|
11135
|
-
|
|
11136
|
-
MEMBER: "member",
|
|
11137
|
-
/** @deprecated Use MEMBER instead */
|
|
11138
|
-
AGENT: "member",
|
|
11139
|
-
/** @deprecated Use MEMBER instead */
|
|
11140
|
-
DM: "member"
|
|
11842
|
+
DM: "dm"
|
|
11141
11843
|
};
|
|
11142
11844
|
var BUILTIN_ASSISTANT_CHAT_TYPES = /* @__PURE__ */ new Set([
|
|
11143
11845
|
CHAT_TYPES.MANAGER,
|
|
11144
|
-
CHAT_TYPES.CONTRIBUTOR
|
|
11145
|
-
CHAT_TYPES.DEVELOPER
|
|
11846
|
+
CHAT_TYPES.CONTRIBUTOR
|
|
11146
11847
|
]);
|
|
11848
|
+
var MEMBER_AGENT_CHAT_TYPES = /* @__PURE__ */ new Set([CHAT_TYPES.DM]);
|
|
11147
11849
|
var NO_ASSISTANT_PARTICIPANT_CHAT_TYPES = /* @__PURE__ */ new Set([
|
|
11148
11850
|
...BUILTIN_ASSISTANT_CHAT_TYPES,
|
|
11149
|
-
|
|
11851
|
+
...MEMBER_AGENT_CHAT_TYPES
|
|
11150
11852
|
]);
|
|
11151
11853
|
function usesBuiltinAssistant(chatType) {
|
|
11152
11854
|
return BUILTIN_ASSISTANT_CHAT_TYPES.has(chatType);
|
|
@@ -11158,6 +11860,11 @@ function isChatType(value) {
|
|
|
11158
11860
|
return Object.values(CHAT_TYPES).includes(value);
|
|
11159
11861
|
}
|
|
11160
11862
|
|
|
11863
|
+
// src/constants/models.ts
|
|
11864
|
+
var DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
|
|
11865
|
+
var DEFAULT_VOICE_INFERENCE_MODEL = "google:vertex:gemini-3-flash";
|
|
11866
|
+
var DEFAULT_CUSTOM_VOICE_MODEL = "elevenlabs:voice:river";
|
|
11867
|
+
|
|
11161
11868
|
// src/types/resource-metadata.ts
|
|
11162
11869
|
var RESOURCE_METADATA = {
|
|
11163
11870
|
["credit" /* CREDIT */]: {
|
|
@@ -11938,10 +12645,20 @@ var SCOPE_PRESETS = {
|
|
|
11938
12645
|
ALL: Object.keys(SCOPES)
|
|
11939
12646
|
};
|
|
11940
12647
|
|
|
12648
|
+
// src/utils/revision-state.ts
|
|
12649
|
+
function getRevisionState(workflow, revision) {
|
|
12650
|
+
const draftIsLive = workflow.activeRevisionId === workflow.draftRevisionId;
|
|
12651
|
+
const hasUnpublishedChanges = workflow.draftModifiedAt != null;
|
|
12652
|
+
return {
|
|
12653
|
+
isActive: revision != null && revision.id === workflow.activeRevisionId,
|
|
12654
|
+
isDraft: revision != null && revision.id === workflow.draftRevisionId,
|
|
12655
|
+
draftIsLive,
|
|
12656
|
+
hasUnpublishedChanges,
|
|
12657
|
+
state: revision?.publishedAt != null ? "published" : "draft"
|
|
12658
|
+
};
|
|
12659
|
+
}
|
|
12660
|
+
|
|
11941
12661
|
export {
|
|
11942
|
-
getCookieValue,
|
|
11943
|
-
ApiError,
|
|
11944
|
-
BaseApiClient,
|
|
11945
12662
|
AbilitiesApi,
|
|
11946
12663
|
AccessGrantsApi,
|
|
11947
12664
|
AgentTasksApi,
|
|
@@ -11971,6 +12688,7 @@ export {
|
|
|
11971
12688
|
InquiriesApi,
|
|
11972
12689
|
AppConnectionsApi,
|
|
11973
12690
|
McpServersApi,
|
|
12691
|
+
MemberImportValidationError,
|
|
11974
12692
|
MembersApi,
|
|
11975
12693
|
MilestonesApi,
|
|
11976
12694
|
MondayIntegrationApi,
|
|
@@ -11983,6 +12701,7 @@ export {
|
|
|
11983
12701
|
PronunciationsApi,
|
|
11984
12702
|
PromptsApi,
|
|
11985
12703
|
PersonasApi,
|
|
12704
|
+
QueriesApi,
|
|
11986
12705
|
QualificationsApi,
|
|
11987
12706
|
ReportsApi,
|
|
11988
12707
|
SalesforceApi,
|
|
@@ -12016,6 +12735,8 @@ export {
|
|
|
12016
12735
|
encodePermissions,
|
|
12017
12736
|
Scope,
|
|
12018
12737
|
BulkMemberResultStatus,
|
|
12738
|
+
MemberImportMatchInfoMatchType,
|
|
12739
|
+
MemberImportPreviewRowAction,
|
|
12019
12740
|
MemberType,
|
|
12020
12741
|
McpServerState,
|
|
12021
12742
|
ToolkitState,
|
|
@@ -12051,13 +12772,15 @@ export {
|
|
|
12051
12772
|
TTS_MODEL_DEEPGRAM_AURA_2,
|
|
12052
12773
|
TTS_MODEL_AWS_POLLY_GENERATIVE,
|
|
12053
12774
|
TTS_MODEL_AWS_POLLY_NEURAL,
|
|
12054
|
-
|
|
12775
|
+
PIDS_DISPOSITIONS,
|
|
12776
|
+
PIDS_SOURCES,
|
|
12055
12777
|
FhirVendor,
|
|
12056
12778
|
FhirConnectionState,
|
|
12057
12779
|
FhirClientType,
|
|
12058
12780
|
CriterionType,
|
|
12059
12781
|
DriverMode,
|
|
12060
12782
|
AccessGrantResourceType,
|
|
12783
|
+
CapabilityClass,
|
|
12061
12784
|
AccessGrantStatus,
|
|
12062
12785
|
AccessGrantTrigger,
|
|
12063
12786
|
ConsentMethod,
|
|
@@ -12074,6 +12797,8 @@ export {
|
|
|
12074
12797
|
bindTasksMethods,
|
|
12075
12798
|
bindChatsMethods,
|
|
12076
12799
|
bindCallsMethods,
|
|
12800
|
+
bindDashboardsMethods,
|
|
12801
|
+
bindMotdMethods,
|
|
12077
12802
|
bindDataTypesMethods,
|
|
12078
12803
|
bindMembersMethods,
|
|
12079
12804
|
bindWorkspacesMethods,
|
|
@@ -12095,24 +12820,26 @@ export {
|
|
|
12095
12820
|
bindJourneysMethods,
|
|
12096
12821
|
bindQualificationsMethods,
|
|
12097
12822
|
bindPersonasMethods,
|
|
12823
|
+
bindQueriesMethods,
|
|
12098
12824
|
bindCustomersMethods,
|
|
12099
12825
|
bindResellersMethods,
|
|
12100
12826
|
bindPromptsMethods,
|
|
12101
12827
|
bindSupportRequestMethods,
|
|
12102
12828
|
GravityRailClient,
|
|
12103
|
-
DEFAULT_CHAT_MODEL,
|
|
12104
|
-
DEFAULT_VOICE_INFERENCE_MODEL,
|
|
12105
|
-
DEFAULT_CUSTOM_VOICE_MODEL,
|
|
12106
12829
|
AbilityTypeSlugs,
|
|
12107
12830
|
DEFAULT_THINKING_SPEECH_PHRASES,
|
|
12108
12831
|
getTTSProvider,
|
|
12109
12832
|
TTS_PREVIEW_PROVIDERS,
|
|
12110
12833
|
getVoiceModelId,
|
|
12111
12834
|
canPreviewVoice,
|
|
12835
|
+
QUERY_VALUELESS_OPS,
|
|
12112
12836
|
SMS_DELIVERY_FAILURE_STATUSES,
|
|
12113
12837
|
isSMSDeliveryFailureStatus,
|
|
12838
|
+
POSITIVE_RATING_THRESHOLD,
|
|
12839
|
+
isPositiveRating,
|
|
12114
12840
|
BusinessIndustry,
|
|
12115
12841
|
BusinessType,
|
|
12842
|
+
DeclaredDataUse,
|
|
12116
12843
|
EmailDnsRecordType,
|
|
12117
12844
|
JobPosition,
|
|
12118
12845
|
OIDCAdminConfigViewProviderType,
|
|
@@ -12123,6 +12850,7 @@ export {
|
|
|
12123
12850
|
AbilityConfigIssueCode,
|
|
12124
12851
|
AbilityConfigIssueSeverity,
|
|
12125
12852
|
WorkflowAccessWarningResourceType,
|
|
12853
|
+
WIDGET_SLUGS,
|
|
12126
12854
|
FeatureCategory,
|
|
12127
12855
|
FeatureVisibility,
|
|
12128
12856
|
initializeFeatures,
|
|
@@ -12143,6 +12871,9 @@ export {
|
|
|
12143
12871
|
usesBuiltinAssistant,
|
|
12144
12872
|
requiresAssistantParticipant,
|
|
12145
12873
|
isChatType,
|
|
12874
|
+
DEFAULT_CHAT_MODEL,
|
|
12875
|
+
DEFAULT_VOICE_INFERENCE_MODEL,
|
|
12876
|
+
DEFAULT_CUSTOM_VOICE_MODEL,
|
|
12146
12877
|
getResourceMetadata,
|
|
12147
12878
|
getAllResourceSlugs,
|
|
12148
12879
|
getScopeFromProductType,
|
|
@@ -12151,6 +12882,7 @@ export {
|
|
|
12151
12882
|
ScopeCategory,
|
|
12152
12883
|
SCOPES,
|
|
12153
12884
|
ScopeManager,
|
|
12154
|
-
SCOPE_PRESETS
|
|
12885
|
+
SCOPE_PRESETS,
|
|
12886
|
+
getRevisionState
|
|
12155
12887
|
};
|
|
12156
|
-
//# sourceMappingURL=chunk-
|
|
12888
|
+
//# sourceMappingURL=chunk-YESHLUL7.js.map
|