@gravity-rail/sdk 0.18.0 → 0.21.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/dist/{chunk-MP5ENP4Q.js → chunk-24L4RD4Z.js} +560 -136
- package/dist/chunk-24L4RD4Z.js.map +1 -0
- package/dist/{chunk-2YLKG4TT.js → chunk-3HAV5XUJ.js} +1 -1
- package/dist/chunk-3HAV5XUJ.js.map +1 -0
- package/dist/{chunk-PJFEGUHM.js → chunk-7OLBLLV7.js} +6 -2
- package/dist/{chunk-PJFEGUHM.js.map → chunk-7OLBLLV7.js.map} +1 -1
- package/dist/{client-B51HZ6zY.d.cts → client-B0eh2BEY.d.cts} +1592 -364
- package/dist/{client-G5i59XtT.d.ts → client-CFz-BGmY.d.ts} +1592 -364
- package/dist/helpers.cjs +141 -0
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +17 -3
- package/dist/helpers.d.ts +17 -3
- package/dist/helpers.js +127 -1
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +658 -129
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -5
- package/dist/index.d.ts +28 -5
- package/dist/index.js +123 -11
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +581 -140
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +724 -553
- package/dist/internal.d.ts +724 -553
- package/dist/internal.js +23 -13
- package/dist/internal.js.map +1 -1
- package/dist/{revision-state-Cc7RAf8A.d.ts → revision-state-KfOztBkY.d.ts} +147 -232
- package/dist/{revision-state-DudSCwea.d.cts → revision-state-fJ9PM15N.d.cts} +147 -232
- package/dist/schemas.cjs +32 -18
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +37 -35
- package/dist/schemas.d.ts +37 -35
- package/dist/schemas.js +32 -18
- package/dist/schemas.js.map +1 -1
- package/dist/{tasks-1JXJJuG8.d.cts → tasks-WH_VfzMv.d.cts} +351 -20
- package/dist/{tasks-1JXJJuG8.d.ts → tasks-WH_VfzMv.d.ts} +351 -20
- package/package.json +6 -6
- package/dist/chunk-2YLKG4TT.js.map +0 -1
- package/dist/chunk-MP5ENP4Q.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -117,7 +117,6 @@ __export(src_exports, {
|
|
|
117
117
|
REALTIME_MODEL_CUSTOM: () => REALTIME_MODEL_CUSTOM,
|
|
118
118
|
REALTIME_MODEL_GEMINI: () => REALTIME_MODEL_GEMINI,
|
|
119
119
|
REALTIME_MODEL_GEMINI_VERTEX: () => REALTIME_MODEL_GEMINI_VERTEX,
|
|
120
|
-
REALTIME_MODEL_NOVA_SONIC: () => REALTIME_MODEL_NOVA_SONIC,
|
|
121
120
|
REALTIME_MODEL_OPENAI: () => REALTIME_MODEL_OPENAI,
|
|
122
121
|
REALTIME_MODEL_OPENAI_2: () => REALTIME_MODEL_OPENAI_2,
|
|
123
122
|
REALTIME_MODEL_OPENAI_MINI: () => REALTIME_MODEL_OPENAI_MINI,
|
|
@@ -170,8 +169,6 @@ __export(src_exports, {
|
|
|
170
169
|
formatAppContextAsMarkdown: () => formatAppContextAsMarkdown,
|
|
171
170
|
getAllFeatures: () => getAllFeatures,
|
|
172
171
|
getAllResourceSlugs: () => getAllResourceSlugs,
|
|
173
|
-
getApplicableResourceSlugs: () => getApplicableResourceSlugs,
|
|
174
|
-
getApplicableResources: () => getApplicableResources,
|
|
175
172
|
getAvailableFeaturesForUpgrade: () => getAvailableFeaturesForUpgrade,
|
|
176
173
|
getCookieValue: () => getCookieValue,
|
|
177
174
|
getFeature: () => getFeature,
|
|
@@ -180,7 +177,6 @@ __export(src_exports, {
|
|
|
180
177
|
getMissingDependencies: () => getMissingDependencies,
|
|
181
178
|
getResourceMetadata: () => getResourceMetadata,
|
|
182
179
|
getRevisionState: () => getRevisionState,
|
|
183
|
-
getScopeFromProductType: () => getScopeFromProductType,
|
|
184
180
|
getTTSProvider: () => getTTSProvider,
|
|
185
181
|
getVoiceModelId: () => getVoiceModelId,
|
|
186
182
|
initializeFeatures: () => initializeFeatures,
|
|
@@ -510,7 +506,11 @@ ${formattedErrors}`, response.status);
|
|
|
510
506
|
throw error;
|
|
511
507
|
}
|
|
512
508
|
const errorMessage = typeof errorData.detail === "string" ? errorData.detail : errorData.message || response.statusText;
|
|
513
|
-
|
|
509
|
+
const simpleError = new ApiError(errorMessage, response.status);
|
|
510
|
+
if (typeof errorData.code === "string") {
|
|
511
|
+
simpleError.errorData = errorData;
|
|
512
|
+
}
|
|
513
|
+
throw simpleError;
|
|
514
514
|
}
|
|
515
515
|
if (response.status === 204) {
|
|
516
516
|
return void 0;
|
|
@@ -876,6 +876,7 @@ var AgentsApi = class extends BaseApiClient {
|
|
|
876
876
|
if (options.search) params.append("search", options.search);
|
|
877
877
|
if (options.includeArchived)
|
|
878
878
|
params.append("includeArchived", options.includeArchived.toString());
|
|
879
|
+
if (options.owner) params.append("owner", options.owner);
|
|
879
880
|
return this.fetch(
|
|
880
881
|
`w/${wid}/agents${params.toString() ? `?${params.toString()}` : ""}`
|
|
881
882
|
);
|
|
@@ -1269,33 +1270,36 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1269
1270
|
});
|
|
1270
1271
|
}
|
|
1271
1272
|
/** Initiate SMS login by sending a verification code to the given phone number. */
|
|
1272
|
-
async login(phoneNumber, wid, organizationUuid) {
|
|
1273
|
+
async login(phoneNumber, wid, organizationUuid, isSignUp = false) {
|
|
1273
1274
|
const params = new URLSearchParams();
|
|
1274
1275
|
if (wid) params.append("wid", wid);
|
|
1275
1276
|
const body = { phoneNumber: sanitizePhoneForBackend(phoneNumber) };
|
|
1276
1277
|
if (organizationUuid) body.organizationUuid = organizationUuid;
|
|
1278
|
+
if (isSignUp) body.isSignUp = true;
|
|
1277
1279
|
return await this.fetch(`auth/login?${params.toString()}`, {
|
|
1278
1280
|
method: "POST",
|
|
1279
1281
|
body: JSON.stringify(body)
|
|
1280
1282
|
});
|
|
1281
1283
|
}
|
|
1282
1284
|
/** Resend the SMS verification code to the given phone number. */
|
|
1283
|
-
async resendCode(phoneNumber, organizationUuid) {
|
|
1285
|
+
async resendCode(phoneNumber, organizationUuid, isSignUp = false) {
|
|
1284
1286
|
const body = { phoneNumber: sanitizePhoneForBackend(phoneNumber) };
|
|
1285
1287
|
if (organizationUuid) body.organizationUuid = organizationUuid;
|
|
1288
|
+
if (isSignUp) body.isSignUp = true;
|
|
1286
1289
|
return await this.fetch("auth/resend-code", {
|
|
1287
1290
|
method: "POST",
|
|
1288
1291
|
body: JSON.stringify(body)
|
|
1289
1292
|
});
|
|
1290
1293
|
}
|
|
1291
1294
|
/** Verify an SMS code and complete authentication, handling 2FA if required. */
|
|
1292
|
-
async verifyCodeWith2FA(phoneNumber, code, organizationUuid) {
|
|
1295
|
+
async verifyCodeWith2FA(phoneNumber, code, organizationUuid, isSignUp = false) {
|
|
1293
1296
|
const verifyResponse = await this.fetch("auth/verify-with-2fa", {
|
|
1294
1297
|
method: "POST",
|
|
1295
1298
|
body: JSON.stringify({
|
|
1296
1299
|
phoneNumber: sanitizePhoneForBackend(phoneNumber),
|
|
1297
1300
|
code,
|
|
1298
|
-
organizationUuid
|
|
1301
|
+
organizationUuid,
|
|
1302
|
+
isSignUp
|
|
1299
1303
|
})
|
|
1300
1304
|
});
|
|
1301
1305
|
if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
|
|
@@ -1545,14 +1549,17 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1545
1549
|
// ===== CREDENTIAL CHANGE METHODS =====
|
|
1546
1550
|
/**
|
|
1547
1551
|
* Request to change email or phone credential.
|
|
1548
|
-
* Sends an OTP to the NEW credential to verify ownership.
|
|
1552
|
+
* Sends an OTP to the NEW credential to verify ownership. For phone, the
|
|
1553
|
+
* code can be delivered by SMS (default) or read aloud over a voice call
|
|
1554
|
+
* (`deliveryMethod: 'voice'`) so landlines can be verified too.
|
|
1549
1555
|
*/
|
|
1550
|
-
async requestCredentialChange(credentialType, newValue) {
|
|
1556
|
+
async requestCredentialChange(credentialType, newValue, deliveryMethod = "sms") {
|
|
1551
1557
|
return this.fetch("account/request-credential-change", {
|
|
1552
1558
|
method: "POST",
|
|
1553
1559
|
body: JSON.stringify({
|
|
1554
1560
|
credential_type: credentialType,
|
|
1555
|
-
new_value: newValue
|
|
1561
|
+
new_value: newValue,
|
|
1562
|
+
delivery_method: deliveryMethod
|
|
1556
1563
|
})
|
|
1557
1564
|
});
|
|
1558
1565
|
}
|
|
@@ -1834,10 +1841,12 @@ var CalendarsApi = class extends BaseApiClient {
|
|
|
1834
1841
|
}
|
|
1835
1842
|
/** Generate or regenerate an iCal feed token for a calendar. */
|
|
1836
1843
|
async generateICalToken(wid, calendarId, regenerate = false) {
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1844
|
+
const qs = new URLSearchParams();
|
|
1845
|
+
qs.set("regenerate", regenerate ? "true" : "false");
|
|
1846
|
+
return this.fetch(
|
|
1847
|
+
`w/${wid}/calendars/${calendarId}/ical-token?${qs.toString()}`,
|
|
1848
|
+
{ method: "POST" }
|
|
1849
|
+
);
|
|
1841
1850
|
}
|
|
1842
1851
|
/** Revoke the iCal feed token for a calendar, disabling external feed access. */
|
|
1843
1852
|
async revokeICalToken(wid, calendarId) {
|
|
@@ -2795,6 +2804,34 @@ var DataTypesApi = class extends BaseApiClient {
|
|
|
2795
2804
|
async getFieldIndexStatus(wid, dataTypeId, fieldSlug) {
|
|
2796
2805
|
return this.fetch(`w/${wid}/data-types/${dataTypeId}/fields/${fieldSlug}/index-status`);
|
|
2797
2806
|
}
|
|
2807
|
+
/**
|
|
2808
|
+
* Preview renaming a field's slug — read-only.
|
|
2809
|
+
*
|
|
2810
|
+
* A field slug is the key its answers are stored under, so a rename moves
|
|
2811
|
+
* stored data. This reports whether the new slug is allowed, how many records
|
|
2812
|
+
* would move, and every configured place still naming the old slug (CEL,
|
|
2813
|
+
* templates, sync maps) which this rename does NOT rewrite.
|
|
2814
|
+
*/
|
|
2815
|
+
async previewRenameFieldSlug(wid, dataTypeId, fieldSlug, newSlug) {
|
|
2816
|
+
return this.fetch(
|
|
2817
|
+
`w/${wid}/data-types/${dataTypeId}/fields/${fieldSlug}/rename-preview`,
|
|
2818
|
+
{ method: "POST", body: JSON.stringify({ newSlug }) }
|
|
2819
|
+
);
|
|
2820
|
+
}
|
|
2821
|
+
/**
|
|
2822
|
+
* Rename a field's slug, preserving stored answers.
|
|
2823
|
+
*
|
|
2824
|
+
* The schema change commits synchronously; the answers are moved by the
|
|
2825
|
+
* existing cleanup workflow, so this resolves on ACCEPTANCE, not completion.
|
|
2826
|
+
* Call {@link previewRenameFieldSlug} first — references naming the old slug
|
|
2827
|
+
* are reported, never rewritten.
|
|
2828
|
+
*/
|
|
2829
|
+
async renameFieldSlug(wid, dataTypeId, fieldSlug, newSlug) {
|
|
2830
|
+
return this.fetch(
|
|
2831
|
+
`w/${wid}/data-types/${dataTypeId}/fields/${fieldSlug}/rename`,
|
|
2832
|
+
{ method: "POST", body: JSON.stringify({ newSlug }) }
|
|
2833
|
+
);
|
|
2834
|
+
}
|
|
2798
2835
|
/**
|
|
2799
2836
|
* Validate if a data type slug is available.
|
|
2800
2837
|
* Returns availability and a suggested alternative if taken.
|
|
@@ -2817,6 +2854,44 @@ function isUuid(value) {
|
|
|
2817
2854
|
return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value);
|
|
2818
2855
|
}
|
|
2819
2856
|
|
|
2857
|
+
// src/api/devices.ts
|
|
2858
|
+
var DevicesApi = class extends BaseApiClient {
|
|
2859
|
+
/** List devices visible to the caller (own devices, or all with devices:admin). */
|
|
2860
|
+
async getDevices(wid, options = {}) {
|
|
2861
|
+
const qs = options.mine ? "?mine=true" : "";
|
|
2862
|
+
return this.fetch(`w/${wid}/devices${qs}`);
|
|
2863
|
+
}
|
|
2864
|
+
/** Fetch one device by UUID. Non-owners without devices:admin receive 404. */
|
|
2865
|
+
async getDevice(wid, deviceUuid) {
|
|
2866
|
+
return this.fetch(`w/${wid}/devices/${deviceUuid}`);
|
|
2867
|
+
}
|
|
2868
|
+
/** List shippable companion-device products (Lantern, later SKUs). */
|
|
2869
|
+
async getDeviceKinds(wid) {
|
|
2870
|
+
return this.fetch(`w/${wid}/devices/kinds`);
|
|
2871
|
+
}
|
|
2872
|
+
/** Claim a pairing code shown on a companion device. Requires devices:write. */
|
|
2873
|
+
async claimDevicePairing(wid, body) {
|
|
2874
|
+
return this.fetch(`w/${wid}/devices/pairing/claim`, {
|
|
2875
|
+
method: "POST",
|
|
2876
|
+
body: JSON.stringify(body)
|
|
2877
|
+
});
|
|
2878
|
+
}
|
|
2879
|
+
/** Update display name and/or LAN capability flags. Requires devices:write. */
|
|
2880
|
+
async updateDevice(wid, deviceUuid, body) {
|
|
2881
|
+
return this.fetch(`w/${wid}/devices/${deviceUuid}`, {
|
|
2882
|
+
method: "PATCH",
|
|
2883
|
+
body: JSON.stringify(body)
|
|
2884
|
+
});
|
|
2885
|
+
}
|
|
2886
|
+
/** Revoke a device credential. The device must pair again. Requires devices:write. */
|
|
2887
|
+
async revokeDevice(wid, deviceUuid) {
|
|
2888
|
+
return this.fetch(`w/${wid}/devices/${deviceUuid}/revoke`, {
|
|
2889
|
+
method: "POST",
|
|
2890
|
+
body: JSON.stringify({})
|
|
2891
|
+
});
|
|
2892
|
+
}
|
|
2893
|
+
};
|
|
2894
|
+
|
|
2820
2895
|
// src/api/discord-bots.ts
|
|
2821
2896
|
var DiscordBotsApi = class extends BaseApiClient {
|
|
2822
2897
|
/**
|
|
@@ -3247,6 +3322,7 @@ var EventsApi = class extends BaseApiClient {
|
|
|
3247
3322
|
if (options.sortBy) params.append("sortBy", options.sortBy);
|
|
3248
3323
|
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
3249
3324
|
if (options.owner) params.append("owner", options.owner);
|
|
3325
|
+
if (options.ownerId) params.append("ownerId", options.ownerId.toString());
|
|
3250
3326
|
return this.fetch(
|
|
3251
3327
|
`w/${wid}/routines${params.toString() ? `?${params.toString()}` : ""}`
|
|
3252
3328
|
);
|
|
@@ -4281,6 +4357,23 @@ var InboxesApi = class extends BaseApiClient {
|
|
|
4281
4357
|
body: JSON.stringify({ content })
|
|
4282
4358
|
});
|
|
4283
4359
|
}
|
|
4360
|
+
/**
|
|
4361
|
+
* Make a stored email's sender a Member of this workspace.
|
|
4362
|
+
*
|
|
4363
|
+
* The explicit alternative to auto-signup for inboxes that accept
|
|
4364
|
+
* non-member mail. Requires `members:write` AND `inboxes:read`. Responds
|
|
4365
|
+
* 409 when a Member already holds the address — gate the call on
|
|
4366
|
+
* `Email.senderIsMember` rather than discovering it from the error.
|
|
4367
|
+
*/
|
|
4368
|
+
async addEmailSenderAsMember(wid, inboxId, emailId, body) {
|
|
4369
|
+
return this.fetch(
|
|
4370
|
+
`w/${wid}/inboxes/${inboxId}/emails/${emailId}/add-sender-as-member`,
|
|
4371
|
+
{
|
|
4372
|
+
method: "POST",
|
|
4373
|
+
body: JSON.stringify(body)
|
|
4374
|
+
}
|
|
4375
|
+
);
|
|
4376
|
+
}
|
|
4284
4377
|
/** Convert an email to text, markdown, or PDF format. */
|
|
4285
4378
|
async convertEmail(wid, inboxId, emailId, format = "pdf") {
|
|
4286
4379
|
return this.fetch(
|
|
@@ -4623,6 +4716,54 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4623
4716
|
async getCurrentMember(wid) {
|
|
4624
4717
|
return this.fetch(`w/${wid}/me`);
|
|
4625
4718
|
}
|
|
4719
|
+
/**
|
|
4720
|
+
* One row per workflow available to the member, with its voice state
|
|
4721
|
+
* (Custom Voice). Own-data-or-scope: a member reads their OWN rows with
|
|
4722
|
+
* no member scope; others need members:read.
|
|
4723
|
+
*/
|
|
4724
|
+
async getMemberWorkflowVoices(wid, memberId) {
|
|
4725
|
+
return this.fetch(
|
|
4726
|
+
`w/${wid}/members/${memberId}/workflow-voices`
|
|
4727
|
+
);
|
|
4728
|
+
}
|
|
4729
|
+
/** Audition a voice the member can pick for this workflow (PCM16). */
|
|
4730
|
+
async previewMemberWorkflowVoice(wid, memberId, workflowId, body) {
|
|
4731
|
+
const response = await this.fetchRaw(
|
|
4732
|
+
`w/${wid}/members/${memberId}/workflow-voices/${workflowId}/preview`,
|
|
4733
|
+
{ method: "POST", body: JSON.stringify(body) }
|
|
4734
|
+
);
|
|
4735
|
+
return response.arrayBuffer();
|
|
4736
|
+
}
|
|
4737
|
+
/** Set the member's preferred voice for one workflow (Custom Voice). */
|
|
4738
|
+
async setMemberWorkflowVoice(wid, memberId, workflowId, body) {
|
|
4739
|
+
return this.fetch(
|
|
4740
|
+
`w/${wid}/members/${memberId}/workflow-voices/${workflowId}`,
|
|
4741
|
+
{ method: "PUT", body: JSON.stringify(body) }
|
|
4742
|
+
);
|
|
4743
|
+
}
|
|
4744
|
+
/** Clear the member's preferred voice for one workflow (Custom Voice). */
|
|
4745
|
+
async clearMemberWorkflowVoice(wid, memberId, workflowId) {
|
|
4746
|
+
return this.fetch(
|
|
4747
|
+
`w/${wid}/members/${memberId}/workflow-voices/${workflowId}`,
|
|
4748
|
+
{ method: "DELETE" }
|
|
4749
|
+
);
|
|
4750
|
+
}
|
|
4751
|
+
/**
|
|
4752
|
+
* Member-scoped DataTypes the current member may use (self-access — works
|
|
4753
|
+
* on a Site session, which can hold no records scope by construction).
|
|
4754
|
+
*/
|
|
4755
|
+
async getMyDataTypes(wid) {
|
|
4756
|
+
return this.fetch(`w/${wid}/me/data-types`);
|
|
4757
|
+
}
|
|
4758
|
+
/** The current member's own records for one DataType (self-access). */
|
|
4759
|
+
async getMyRecords(wid, dataTypeId, options) {
|
|
4760
|
+
const params = new URLSearchParams({ data_type_id: String(dataTypeId) });
|
|
4761
|
+
if (options?.page) params.set("page", String(options.page));
|
|
4762
|
+
if (options?.pageSize) params.set("page_size", String(options.pageSize));
|
|
4763
|
+
return this.fetch(
|
|
4764
|
+
`w/${wid}/me/records?${params.toString()}`
|
|
4765
|
+
);
|
|
4766
|
+
}
|
|
4626
4767
|
/**
|
|
4627
4768
|
* Get all members owned by the current member in this workspace.
|
|
4628
4769
|
* Returns the authenticated member plus any members they own (via owner_id).
|
|
@@ -5500,9 +5641,9 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5500
5641
|
/**
|
|
5501
5642
|
* Update the settings an org admin owns: name, slug and contact details.
|
|
5502
5643
|
*
|
|
5503
|
-
* Deliberately NOT the admin organization update — `
|
|
5504
|
-
*
|
|
5505
|
-
*
|
|
5644
|
+
* Deliberately NOT the admin organization update — `enforceCreditLimit`
|
|
5645
|
+
* is superuser-only and is not a field on this endpoint's request model
|
|
5646
|
+
* at all.
|
|
5506
5647
|
*/
|
|
5507
5648
|
async updateOrganizationSettings(orgIdOrUuid, data) {
|
|
5508
5649
|
return this.fetch(`o/${orgIdOrUuid}`, {
|
|
@@ -5533,11 +5674,30 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5533
5674
|
});
|
|
5534
5675
|
}
|
|
5535
5676
|
/**
|
|
5536
|
-
* Get the billing customer
|
|
5677
|
+
* Get the billing customer and this organization's billable subscription.
|
|
5678
|
+
*
|
|
5679
|
+
* `subscriptionId` is the org-scoped row — never pick the customer's
|
|
5680
|
+
* newest subscription from the list endpoint. One customer can bill many
|
|
5681
|
+
* organizations.
|
|
5537
5682
|
*/
|
|
5538
5683
|
async getOrgBillingCustomer(orgIdOrUuid) {
|
|
5539
5684
|
return this.fetch(`o/${orgIdOrUuid}/billing-customer`);
|
|
5540
5685
|
}
|
|
5686
|
+
/**
|
|
5687
|
+
* Per-workspace usage for this organization's current credit window.
|
|
5688
|
+
*
|
|
5689
|
+
* Requires a billing role on the organization's billing customer — the
|
|
5690
|
+
* same gate `getOrgBillingCustomer().hasAccess` reports, and the one that
|
|
5691
|
+
* decides whether the billing tab is shown at all.
|
|
5692
|
+
*
|
|
5693
|
+
* `creditsUsed` is a real organization-wide total or it is null; it is
|
|
5694
|
+
* never a partial sum. There is deliberately no per-workspace "remaining"
|
|
5695
|
+
* figure — the caps belong to the organization, so `cap - oneWorkspace`
|
|
5696
|
+
* describes nothing.
|
|
5697
|
+
*/
|
|
5698
|
+
async getOrgWorkspaceUsage(orgIdOrUuid) {
|
|
5699
|
+
return this.fetch(`o/${orgIdOrUuid}/usage/workspaces`);
|
|
5700
|
+
}
|
|
5541
5701
|
/**
|
|
5542
5702
|
* List members of an organization.
|
|
5543
5703
|
*/
|
|
@@ -5858,6 +6018,17 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5858
6018
|
async getOrgDomainSite(orgIdOrUuid, domainUuid) {
|
|
5859
6019
|
return this.fetch(`o/${orgIdOrUuid}/domains/${domainUuid}/site`);
|
|
5860
6020
|
}
|
|
6021
|
+
/**
|
|
6022
|
+
* Pre-enable DNS check: is the site CNAME resolving to the routing
|
|
6023
|
+
* endpoint yet? Pure DNS — consumes no enable budget.
|
|
6024
|
+
*/
|
|
6025
|
+
async preflightOrgDomainSite(orgIdOrUuid, domainUuid) {
|
|
6026
|
+
return this.fetch(
|
|
6027
|
+
`o/${orgIdOrUuid}/domains/${domainUuid}/site/preflight`,
|
|
6028
|
+
// Empty JSON body: the route requires one as a CSRF barrier.
|
|
6029
|
+
{ method: "POST", body: JSON.stringify({}) }
|
|
6030
|
+
);
|
|
6031
|
+
}
|
|
5861
6032
|
/**
|
|
5862
6033
|
* Verify the site CNAME points at the Gravity Rail sites domain.
|
|
5863
6034
|
*/
|
|
@@ -5901,10 +6072,10 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5901
6072
|
* is required — brands register per legal entity (Customer Profile);
|
|
5902
6073
|
* there is no primary-entity fallback.
|
|
5903
6074
|
*/
|
|
5904
|
-
async startA2PRegistration(orgUuid, legalEntityUuid, brandName,
|
|
6075
|
+
async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandUuid = null) {
|
|
5905
6076
|
return this.fetch(`o/${orgUuid}/phone-numbers/a2p/start`, {
|
|
5906
6077
|
method: "POST",
|
|
5907
|
-
body: JSON.stringify({ legalEntityUuid, brandName,
|
|
6078
|
+
body: JSON.stringify({ legalEntityUuid, brandName, brandUuid })
|
|
5908
6079
|
});
|
|
5909
6080
|
}
|
|
5910
6081
|
/**
|
|
@@ -6008,7 +6179,12 @@ var OrgApi = class extends BaseApiClient {
|
|
|
6008
6179
|
* Reconcile trust product state against Twilio (discovery + status
|
|
6009
6180
|
* refresh). Returns the refreshed products plus which product keys were
|
|
6010
6181
|
* newly discovered. Responds 409 when another Trust Hub operation holds
|
|
6011
|
-
*
|
|
6182
|
+
* this legal entity's lock, failing fast rather than queueing.
|
|
6183
|
+
*
|
|
6184
|
+
* No `Retry-After` is sent, deliberately (#23601): holders range from a
|
|
6185
|
+
* sub-second JSONB write to a multi-minute Twilio sequence, so no interval
|
|
6186
|
+
* would be honest. Back off on your own schedule, and re-read before
|
|
6187
|
+
* retrying — the operation you collided with may have committed SIDs.
|
|
6012
6188
|
*/
|
|
6013
6189
|
async syncVoiceTrustProducts(orgUuid, legalEntityUuid) {
|
|
6014
6190
|
return this.fetch(
|
|
@@ -6041,6 +6217,16 @@ var OrgApi = class extends BaseApiClient {
|
|
|
6041
6217
|
async listA2PBrands(orgUuid) {
|
|
6042
6218
|
return this.fetch(`o/${orgUuid}/a2p-brands`);
|
|
6043
6219
|
}
|
|
6220
|
+
/**
|
|
6221
|
+
* Live per-brand campaign use-case eligibility. Approved brands only — a
|
|
6222
|
+
* brand still under TCR review comes back as a structured 412 the picker
|
|
6223
|
+
* renders as the supported-list fallback, not an error.
|
|
6224
|
+
*/
|
|
6225
|
+
async getA2PBrandUseCases(orgUuid, brandUuid) {
|
|
6226
|
+
return this.fetch(
|
|
6227
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/use-cases`
|
|
6228
|
+
);
|
|
6229
|
+
}
|
|
6044
6230
|
/**
|
|
6045
6231
|
* Fetch a brand's resolved A2P campaign config. The response carries both the
|
|
6046
6232
|
* raw `overrides` and the `resolved` payload (defaults + overrides) the editor
|
|
@@ -6691,6 +6877,43 @@ var QueriesApi = class extends BaseApiClient {
|
|
|
6691
6877
|
}
|
|
6692
6878
|
};
|
|
6693
6879
|
|
|
6880
|
+
// src/api/projects.ts
|
|
6881
|
+
var ProjectsApi = class extends BaseApiClient {
|
|
6882
|
+
/** List projects (README frontmatter summaries). */
|
|
6883
|
+
async getProjects(wid, options = {}) {
|
|
6884
|
+
const params = new URLSearchParams();
|
|
6885
|
+
if (options.page !== void 0) params.append("page", options.page.toString());
|
|
6886
|
+
if (options.pageSize !== void 0) params.append("pageSize", options.pageSize.toString());
|
|
6887
|
+
return this.fetch(
|
|
6888
|
+
`w/${wid}/projects${params.toString() ? `?${params.toString()}` : ""}`
|
|
6889
|
+
);
|
|
6890
|
+
}
|
|
6891
|
+
/** One project: summary + present docs + plan summaries. */
|
|
6892
|
+
async getProject(wid, slug) {
|
|
6893
|
+
return this.fetch(`w/${wid}/projects/${encodeURIComponent(slug)}`);
|
|
6894
|
+
}
|
|
6895
|
+
/** One plan: summary + resolved process + flows + run state. */
|
|
6896
|
+
async getPlan(wid, slug, plan) {
|
|
6897
|
+
return this.fetch(
|
|
6898
|
+
`w/${wid}/projects/${encodeURIComponent(slug)}/plans/${encodeURIComponent(plan)}`
|
|
6899
|
+
);
|
|
6900
|
+
}
|
|
6901
|
+
/** Typed update of a project README; absent fields are untouched. */
|
|
6902
|
+
async updateProject(wid, slug, update) {
|
|
6903
|
+
return this.fetch(`w/${wid}/projects/${encodeURIComponent(slug)}`, {
|
|
6904
|
+
method: "PATCH",
|
|
6905
|
+
body: JSON.stringify(update)
|
|
6906
|
+
});
|
|
6907
|
+
}
|
|
6908
|
+
/** Typed update of a plan README; absent fields are untouched. */
|
|
6909
|
+
async updatePlan(wid, slug, plan, update) {
|
|
6910
|
+
return this.fetch(
|
|
6911
|
+
`w/${wid}/projects/${encodeURIComponent(slug)}/plans/${encodeURIComponent(plan)}`,
|
|
6912
|
+
{ method: "PATCH", body: JSON.stringify(update) }
|
|
6913
|
+
);
|
|
6914
|
+
}
|
|
6915
|
+
};
|
|
6916
|
+
|
|
6694
6917
|
// src/api/qualifications.ts
|
|
6695
6918
|
var QualificationsApi = class extends BaseApiClient {
|
|
6696
6919
|
/** List qualifications in a workspace, paginated. */
|
|
@@ -6956,6 +7179,26 @@ var SalesforceApi = class extends BaseApiClient {
|
|
|
6956
7179
|
}
|
|
6957
7180
|
);
|
|
6958
7181
|
}
|
|
7182
|
+
/**
|
|
7183
|
+
* Pull linked members' Salesforce records now, ignoring the sync cursor.
|
|
7184
|
+
*
|
|
7185
|
+
* The inbound poll only ever returns records modified after the stored
|
|
7186
|
+
* cursor, so a member linked to a record that has not changed since is
|
|
7187
|
+
* unreachable by any poll and its link never receives a field — silently.
|
|
7188
|
+
* This fetches the records by Id and leaves the cursor untouched, so it is
|
|
7189
|
+
* safe to call at any time.
|
|
7190
|
+
*
|
|
7191
|
+
* Omit `memberIds` to resync every linked member (capped server-side).
|
|
7192
|
+
*/
|
|
7193
|
+
async resyncSalesforceLinkedMembers(wid, data = {}) {
|
|
7194
|
+
return this.fetch(
|
|
7195
|
+
`w/${wid}/app-connections/salesforce/sync/resync-members`,
|
|
7196
|
+
{
|
|
7197
|
+
method: "POST",
|
|
7198
|
+
body: JSON.stringify(data)
|
|
7199
|
+
}
|
|
7200
|
+
);
|
|
7201
|
+
}
|
|
6959
7202
|
/**
|
|
6960
7203
|
* List the sObjects available in the connected org.
|
|
6961
7204
|
*
|
|
@@ -7386,12 +7629,6 @@ var SitesApi = class extends BaseApiClient {
|
|
|
7386
7629
|
}
|
|
7387
7630
|
return verifyResponse;
|
|
7388
7631
|
}
|
|
7389
|
-
/** Trigger a crawl of the site's external content source. */
|
|
7390
|
-
async crawlSite(wid, siteId) {
|
|
7391
|
-
return this.fetch(`w/${wid}/sites/${siteId}/crawl`, {
|
|
7392
|
-
method: "POST"
|
|
7393
|
-
});
|
|
7394
|
-
}
|
|
7395
7632
|
/** Create a new site in the workspace. */
|
|
7396
7633
|
async createSite(wid, site) {
|
|
7397
7634
|
return this.fetch(`w/${wid}/sites`, {
|
|
@@ -7534,9 +7771,65 @@ var SubscriptionsApi = class extends BaseApiClient {
|
|
|
7534
7771
|
headers: { "Content-Type": "application/json" }
|
|
7535
7772
|
});
|
|
7536
7773
|
}
|
|
7774
|
+
/** Purchase a role-granting membership in an existing workspace. */
|
|
7775
|
+
async createMemberCheckoutSession(productId, planPeriod = "month", options = {}) {
|
|
7776
|
+
return this.fetch(`subscriptions/member-checkout-session`, {
|
|
7777
|
+
method: "POST",
|
|
7778
|
+
credentials: "include",
|
|
7779
|
+
body: JSON.stringify({ productId, planPeriod, ...options }),
|
|
7780
|
+
headers: { "Content-Type": "application/json" }
|
|
7781
|
+
});
|
|
7782
|
+
}
|
|
7783
|
+
async getMemberSubscriptionStatus(siteUuidOrOptions) {
|
|
7784
|
+
const options = typeof siteUuidOrOptions === "string" ? { siteUuid: siteUuidOrOptions } : siteUuidOrOptions;
|
|
7785
|
+
const params = new URLSearchParams();
|
|
7786
|
+
if (options.siteUuid) params.set("siteUuid", options.siteUuid);
|
|
7787
|
+
if (options.workspaceUuid) params.set("workspaceUuid", options.workspaceUuid);
|
|
7788
|
+
return this.fetch(
|
|
7789
|
+
`subscriptions/member-subscription?${params.toString()}`,
|
|
7790
|
+
{ credentials: "include" }
|
|
7791
|
+
);
|
|
7792
|
+
}
|
|
7793
|
+
/** Open Stripe's hosted membership-management portal. */
|
|
7794
|
+
async createMemberPortalSession(options) {
|
|
7795
|
+
return this.fetch(`subscriptions/member-portal-session`, {
|
|
7796
|
+
method: "POST",
|
|
7797
|
+
credentials: "include",
|
|
7798
|
+
body: JSON.stringify(options),
|
|
7799
|
+
headers: { "Content-Type": "application/json" }
|
|
7800
|
+
});
|
|
7801
|
+
}
|
|
7802
|
+
/**
|
|
7803
|
+
* Purchase one physical companion device (one-time payment; Stripe collects
|
|
7804
|
+
* the shipping address in hosted Checkout).
|
|
7805
|
+
*/
|
|
7806
|
+
async createDeviceOrderCheckoutSession(productId, options = {}) {
|
|
7807
|
+
return this.fetch(`device-orders/checkout-session`, {
|
|
7808
|
+
method: "POST",
|
|
7809
|
+
credentials: "include",
|
|
7810
|
+
body: JSON.stringify({ productId, ...options }),
|
|
7811
|
+
headers: { "Content-Type": "application/json" }
|
|
7812
|
+
});
|
|
7813
|
+
}
|
|
7814
|
+
/** List the authenticated Account's own device orders in one workspace. */
|
|
7815
|
+
async listDeviceOrders(options) {
|
|
7816
|
+
const params = new URLSearchParams();
|
|
7817
|
+
if (options.siteUuid) params.set("siteUuid", options.siteUuid);
|
|
7818
|
+
if (options.workspaceUuid) params.set("workspaceUuid", options.workspaceUuid);
|
|
7819
|
+
return this.fetch(`device-orders?${params.toString()}`, {
|
|
7820
|
+
credentials: "include"
|
|
7821
|
+
});
|
|
7822
|
+
}
|
|
7823
|
+
/** Read one authenticated, server-owned checkout attempt. */
|
|
7824
|
+
async getCheckoutAttemptStatus(attemptId) {
|
|
7825
|
+
return this.fetch(
|
|
7826
|
+
`subscriptions/checkout-attempts/${encodeURIComponent(attemptId)}`,
|
|
7827
|
+
{ credentials: "include" }
|
|
7828
|
+
);
|
|
7829
|
+
}
|
|
7537
7830
|
/**
|
|
7538
|
-
* List self-service, purchasable plans
|
|
7539
|
-
*
|
|
7831
|
+
* List self-service, purchasable organization plans or add-ons. Only products
|
|
7832
|
+
* with a Stripe Price are returned; zero-amount plans are allowed.
|
|
7540
7833
|
*/
|
|
7541
7834
|
async listSelfServeProducts(productType) {
|
|
7542
7835
|
const qs = productType ? `?product_type=${productType}` : "";
|
|
@@ -7571,7 +7864,13 @@ var SubscriptionsApi = class extends BaseApiClient {
|
|
|
7571
7864
|
}
|
|
7572
7865
|
});
|
|
7573
7866
|
}
|
|
7574
|
-
/**
|
|
7867
|
+
/**
|
|
7868
|
+
* Provision a new workspace under an existing org subscription.
|
|
7869
|
+
*
|
|
7870
|
+
* No product or period: the organization already holds the plan and the new
|
|
7871
|
+
* workspace bills through it. Returns before the workspace exists —
|
|
7872
|
+
* `provisioning: true` means poll for it.
|
|
7873
|
+
*/
|
|
7575
7874
|
async addWorkspaceToSubscription(subscriptionId, data) {
|
|
7576
7875
|
return this.fetch(`subscriptions/${subscriptionId}/add-workspace`, {
|
|
7577
7876
|
method: "POST",
|
|
@@ -7732,6 +8031,9 @@ var CustomersApi = class extends BaseApiClient {
|
|
|
7732
8031
|
if (opts?.status) params.set("status", opts.status);
|
|
7733
8032
|
if (opts?.page !== void 0) params.set("page", String(opts.page));
|
|
7734
8033
|
if (opts?.pageSize !== void 0) params.set("page_size", String(opts.pageSize));
|
|
8034
|
+
if (opts?.subscriptionId !== void 0) {
|
|
8035
|
+
params.set("subscription_id", String(opts.subscriptionId));
|
|
8036
|
+
}
|
|
7735
8037
|
const qs = params.toString();
|
|
7736
8038
|
return this.fetch(`customers/${uuid}/subscriptions${qs ? "?" + qs : ""}`);
|
|
7737
8039
|
}
|
|
@@ -8735,28 +9037,36 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
8735
9037
|
};
|
|
8736
9038
|
|
|
8737
9039
|
// src/api/workflow-notes.ts
|
|
9040
|
+
function notesPath(wid, workflowId, noteId, query) {
|
|
9041
|
+
const base = noteId == null ? `w/${wid}/workflows/${workflowId}/notes` : `w/${wid}/workflows/${workflowId}/notes/${noteId}`;
|
|
9042
|
+
if (query?.workflowRevisionId == null) return base;
|
|
9043
|
+
const params = new URLSearchParams({
|
|
9044
|
+
workflowRevisionId: String(query.workflowRevisionId)
|
|
9045
|
+
});
|
|
9046
|
+
return `${base}?${params.toString()}`;
|
|
9047
|
+
}
|
|
8738
9048
|
var WorkflowNotesApi = class extends BaseApiClient {
|
|
8739
|
-
/** List
|
|
8740
|
-
async getWorkflowNotes(wid, workflowId) {
|
|
8741
|
-
return this.fetch(
|
|
9049
|
+
/** List notes for a workflow root (draft unless `workflowRevisionId` is set). */
|
|
9050
|
+
async getWorkflowNotes(wid, workflowId, query) {
|
|
9051
|
+
return this.fetch(notesPath(wid, workflowId, void 0, query));
|
|
8742
9052
|
}
|
|
8743
|
-
/** Create a new note on a workflow. */
|
|
8744
|
-
async createWorkflowNote(wid, workflowId, data) {
|
|
8745
|
-
return this.fetch(
|
|
9053
|
+
/** Create a new note on a workflow's draft (or a pinned draft revision). */
|
|
9054
|
+
async createWorkflowNote(wid, workflowId, data, query) {
|
|
9055
|
+
return this.fetch(notesPath(wid, workflowId, void 0, query), {
|
|
8746
9056
|
method: "POST",
|
|
8747
9057
|
body: JSON.stringify(data)
|
|
8748
9058
|
});
|
|
8749
9059
|
}
|
|
8750
9060
|
/** Update an existing workflow note with partial data. */
|
|
8751
|
-
async updateWorkflowNote(wid, workflowId, noteId, data) {
|
|
8752
|
-
return this.fetch(
|
|
9061
|
+
async updateWorkflowNote(wid, workflowId, noteId, data, query) {
|
|
9062
|
+
return this.fetch(notesPath(wid, workflowId, noteId, query), {
|
|
8753
9063
|
method: "PUT",
|
|
8754
9064
|
body: JSON.stringify(data)
|
|
8755
9065
|
});
|
|
8756
9066
|
}
|
|
8757
9067
|
/** Delete a workflow note by ID. */
|
|
8758
|
-
async deleteWorkflowNote(wid, workflowId, noteId) {
|
|
8759
|
-
return this.fetch(
|
|
9068
|
+
async deleteWorkflowNote(wid, workflowId, noteId, query) {
|
|
9069
|
+
return this.fetch(notesPath(wid, workflowId, noteId, query), {
|
|
8760
9070
|
method: "DELETE"
|
|
8761
9071
|
});
|
|
8762
9072
|
}
|
|
@@ -8858,6 +9168,9 @@ var Scope = /* @__PURE__ */ ((Scope2) => {
|
|
|
8858
9168
|
Scope2["FILES_READ"] = "files:read";
|
|
8859
9169
|
Scope2["FILES_WRITE"] = "files:write";
|
|
8860
9170
|
Scope2["FILES_ADMIN"] = "files:admin";
|
|
9171
|
+
Scope2["DEVICES_READ"] = "devices:read";
|
|
9172
|
+
Scope2["DEVICES_WRITE"] = "devices:write";
|
|
9173
|
+
Scope2["DEVICES_ADMIN"] = "devices:admin";
|
|
8861
9174
|
Scope2["SITES_READ"] = "sites:read";
|
|
8862
9175
|
Scope2["SITES_WRITE"] = "sites:write";
|
|
8863
9176
|
Scope2["SITES_ADMIN"] = "sites:admin";
|
|
@@ -9020,6 +9333,7 @@ var EventRuleEventType = /* @__PURE__ */ ((EventRuleEventType2) => {
|
|
|
9020
9333
|
EventRuleEventType2["CALENDAR_EVENT_CANCELLED"] = "calendar_event:cancelled";
|
|
9021
9334
|
EventRuleEventType2["CALENDAR_EVENT_STARTING"] = "calendar_event:starting";
|
|
9022
9335
|
EventRuleEventType2["CALENDAR_EVENT_ENDED"] = "calendar_event:ended";
|
|
9336
|
+
EventRuleEventType2["CALENDAR_EVENT_NO_SHOW"] = "calendar_event:no_show";
|
|
9023
9337
|
EventRuleEventType2["CONNECTOR_EVENT"] = "connector:event";
|
|
9024
9338
|
EventRuleEventType2["ASSIGNMENT_CONCLUDED"] = "assignment:concluded";
|
|
9025
9339
|
EventRuleEventType2["JOURNEY_STEP_EXECUTE"] = "journey_step:execute";
|
|
@@ -9102,7 +9416,6 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
|
|
|
9102
9416
|
WorkspaceFeature2["CONFLUENCE"] = "confluence";
|
|
9103
9417
|
WorkspaceFeature2["AGENT_MEMORY"] = "agent_memory";
|
|
9104
9418
|
WorkspaceFeature2["IMAGE_GENERATION"] = "image_generation";
|
|
9105
|
-
WorkspaceFeature2["STRICT_NATIVE_VOICE"] = "strict_native_voice";
|
|
9106
9419
|
WorkspaceFeature2["CHARLESTON_NEPHROLOGY_PMD_PAGING"] = "charleston_nephrology_pmd_paging";
|
|
9107
9420
|
WorkspaceFeature2["PATIENTSYNC_TRANSFER"] = "patientsync_transfer";
|
|
9108
9421
|
return WorkspaceFeature2;
|
|
@@ -9140,9 +9453,10 @@ var Resource = /* @__PURE__ */ ((Resource2) => {
|
|
|
9140
9453
|
return Resource2;
|
|
9141
9454
|
})(Resource || {});
|
|
9142
9455
|
var ProductType = /* @__PURE__ */ ((ProductType2) => {
|
|
9143
|
-
ProductType2["WORKSPACE"] = "workspace";
|
|
9144
9456
|
ProductType2["ORG"] = "org";
|
|
9145
9457
|
ProductType2["ADDON"] = "addon";
|
|
9458
|
+
ProductType2["MEMBER"] = "member";
|
|
9459
|
+
ProductType2["DEVICE"] = "device";
|
|
9146
9460
|
return ProductType2;
|
|
9147
9461
|
})(ProductType || {});
|
|
9148
9462
|
var ORG_ONLY_RESOURCES = /* @__PURE__ */ new Set([
|
|
@@ -9262,7 +9576,6 @@ var REALTIME_MODEL_OPENAI_MINI = "openai:realtime:gpt-realtime-mini";
|
|
|
9262
9576
|
var REALTIME_MODEL_OPENAI_2 = "openai:realtime:gpt-realtime-2";
|
|
9263
9577
|
var REALTIME_MODEL_GEMINI = "google:aistudio:gemini-3.1-flash-live";
|
|
9264
9578
|
var REALTIME_MODEL_GEMINI_VERTEX = "google:vertex:gemini-3.1-flash-live";
|
|
9265
|
-
var REALTIME_MODEL_NOVA_SONIC = "aws:bedrock:nova-sonic-1";
|
|
9266
9579
|
var REALTIME_MODEL_CUSTOM = "custom:realtime:composable";
|
|
9267
9580
|
var STT_MODEL_DEEPGRAM_FLUX = "deepgram:stt:flux-general-en";
|
|
9268
9581
|
var STT_MODEL_DEEPGRAM_FLUX_SELFHOST = "deepgram:stt:flux-general-en:selfhost";
|
|
@@ -9794,6 +10107,13 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
9794
10107
|
signal: options?.signal
|
|
9795
10108
|
});
|
|
9796
10109
|
}
|
|
10110
|
+
/** Provision the one-month direct organization plan carried by a promo code. */
|
|
10111
|
+
async startPromoPlanTrial(request) {
|
|
10112
|
+
return this.fetch("promo-codes/plan-trial", {
|
|
10113
|
+
method: "POST",
|
|
10114
|
+
body: JSON.stringify(request)
|
|
10115
|
+
});
|
|
10116
|
+
}
|
|
9797
10117
|
/** Get a publicly accessible product by ID. */
|
|
9798
10118
|
async getPublicProduct(id) {
|
|
9799
10119
|
return this.fetch(`products/${id}`);
|
|
@@ -9844,15 +10164,47 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
9844
10164
|
})
|
|
9845
10165
|
});
|
|
9846
10166
|
}
|
|
9847
|
-
/**
|
|
9848
|
-
async
|
|
10167
|
+
/** Download a workspace export ZIP (``export.json`` + file blobs). */
|
|
10168
|
+
async exportWorkspaceZip(wid, workflowId, scope, exclude) {
|
|
10169
|
+
const searchParams = new URLSearchParams();
|
|
10170
|
+
if (workflowId !== void 0) searchParams.set("workflow_id", String(workflowId));
|
|
10171
|
+
if (scope !== void 0) searchParams.set("scope", scope);
|
|
10172
|
+
if (exclude !== void 0) searchParams.set("exclude", exclude);
|
|
10173
|
+
const qs = searchParams.toString();
|
|
10174
|
+
const response = await this.fetchRaw(`w/${wid}/export.zip${qs ? `?${qs}` : ""}`);
|
|
10175
|
+
return response.arrayBuffer();
|
|
10176
|
+
}
|
|
10177
|
+
/** Import workspace configuration from exported JSON, or from a ZIP archive.
|
|
10178
|
+
* Pass ``archive`` (the ZIP from ``exportWorkspaceZip``) to restore file
|
|
10179
|
+
* contents. ``exportData`` may be omitted when the ZIP contains it.
|
|
10180
|
+
*/
|
|
10181
|
+
async importWorkspace(wid, exportData, importMappings, createNew, archive) {
|
|
10182
|
+
const payload = {
|
|
10183
|
+
importMappings,
|
|
10184
|
+
createNew
|
|
10185
|
+
};
|
|
10186
|
+
if (exportData) {
|
|
10187
|
+
payload.exportData = exportData;
|
|
10188
|
+
}
|
|
10189
|
+
if (archive) {
|
|
10190
|
+
const form = new FormData();
|
|
10191
|
+
form.append(
|
|
10192
|
+
"request",
|
|
10193
|
+
new Blob([JSON.stringify(payload)], { type: "application/json" }),
|
|
10194
|
+
"import.json"
|
|
10195
|
+
);
|
|
10196
|
+
form.append("archive", archive, "workspace-export.zip");
|
|
10197
|
+
return this.fetch(`w/${wid}/import.zip`, {
|
|
10198
|
+
method: "POST",
|
|
10199
|
+
body: form
|
|
10200
|
+
});
|
|
10201
|
+
}
|
|
10202
|
+
if (!exportData) {
|
|
10203
|
+
throw new Error("exportData is required for JSON import");
|
|
10204
|
+
}
|
|
9849
10205
|
return this.fetch(`w/${wid}/import`, {
|
|
9850
10206
|
method: "POST",
|
|
9851
|
-
body: JSON.stringify(
|
|
9852
|
-
exportData,
|
|
9853
|
-
importMappings,
|
|
9854
|
-
createNew
|
|
9855
|
-
})
|
|
10207
|
+
body: JSON.stringify(payload)
|
|
9856
10208
|
});
|
|
9857
10209
|
}
|
|
9858
10210
|
/** Preview a workspace import using the legacy untyped interface. */
|
|
@@ -9894,7 +10246,6 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
9894
10246
|
* Get billing dashboard data for a workspace.
|
|
9895
10247
|
*
|
|
9896
10248
|
* This endpoint is available to organization owners (with org:info scope).
|
|
9897
|
-
* Superusers should use the admin endpoint via getWorkspaceUsageDashboard.
|
|
9898
10249
|
*
|
|
9899
10250
|
* Returns comprehensive billing information including:
|
|
9900
10251
|
* - Subscription status and plan details
|
|
@@ -9992,6 +10343,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
9992
10343
|
customToolkits: new CustomToolkitsApi(apiKey, baseUrl, customFetch),
|
|
9993
10344
|
dashboards: new DashboardsApi(apiKey, baseUrl, customFetch),
|
|
9994
10345
|
dataTypes: new DataTypesApi(apiKey, baseUrl, customFetch),
|
|
10346
|
+
devices: new DevicesApi(apiKey, baseUrl, customFetch),
|
|
9995
10347
|
discordBots: new DiscordBotsApi(apiKey, baseUrl, customFetch),
|
|
9996
10348
|
slackApps: new SlackAppsApi(apiKey, baseUrl, customFetch),
|
|
9997
10349
|
teamsApps: new TeamsAppsApi(apiKey, baseUrl, customFetch),
|
|
@@ -10004,6 +10356,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
10004
10356
|
hubspot: new HubspotApi(apiKey, baseUrl, customFetch),
|
|
10005
10357
|
features: new FeaturesApi(apiKey, baseUrl, customFetch),
|
|
10006
10358
|
files: new FilesApi(apiKey, baseUrl, customFetch),
|
|
10359
|
+
projects: new ProjectsApi(apiKey, baseUrl, customFetch),
|
|
10007
10360
|
inboxes: new InboxesApi(apiKey, baseUrl, customFetch),
|
|
10008
10361
|
inquiries: new InquiriesApi(apiKey, baseUrl, customFetch),
|
|
10009
10362
|
journeys: new JourneysApi(apiKey, baseUrl, customFetch),
|
|
@@ -10049,6 +10402,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
10049
10402
|
// src/client/workspace-client.ts
|
|
10050
10403
|
var WORKSPACE_METHOD_NAMES = [
|
|
10051
10404
|
"activateWorkflowRevision",
|
|
10405
|
+
"addEmailSenderAsMember",
|
|
10052
10406
|
"addGroupMember",
|
|
10053
10407
|
"advanceStep",
|
|
10054
10408
|
"approveWorkspaceInvitation",
|
|
@@ -10079,6 +10433,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10079
10433
|
"checkAvailability",
|
|
10080
10434
|
"checkSiteDomainAvailability",
|
|
10081
10435
|
"checkSiteSlugAvailability",
|
|
10436
|
+
"claimDevicePairing",
|
|
10082
10437
|
"clearConnectionMemberExclusion",
|
|
10083
10438
|
"clearMemberSwitch",
|
|
10084
10439
|
"clearTrackedLinkDestinations",
|
|
@@ -10098,7 +10453,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10098
10453
|
"configureSalesforce",
|
|
10099
10454
|
"convertEmail",
|
|
10100
10455
|
"convertFile",
|
|
10101
|
-
"crawlSite",
|
|
10102
10456
|
"createAbility",
|
|
10103
10457
|
"createAccessGrant",
|
|
10104
10458
|
"createAgent",
|
|
@@ -10267,6 +10621,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10267
10621
|
"exportMembers",
|
|
10268
10622
|
"exportPhoneNumberOutboundAnalyticsCsv",
|
|
10269
10623
|
"exportWorkspace",
|
|
10624
|
+
"exportWorkspaceZip",
|
|
10270
10625
|
"fetchVoicemailAudio",
|
|
10271
10626
|
"fhirBackfillEncounterSync",
|
|
10272
10627
|
"fhirCheckPatientLinks",
|
|
@@ -10363,6 +10718,11 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10363
10718
|
"getConnectionSyncConfig",
|
|
10364
10719
|
"getCredentialUpdateInvites",
|
|
10365
10720
|
"getCurrentMember",
|
|
10721
|
+
"clearMemberWorkflowVoice",
|
|
10722
|
+
"getMemberWorkflowVoices",
|
|
10723
|
+
"getMyDataTypes",
|
|
10724
|
+
"getMyRecords",
|
|
10725
|
+
"setMemberWorkflowVoice",
|
|
10366
10726
|
"getCurrentSmsChat",
|
|
10367
10727
|
"getCustomToolkit",
|
|
10368
10728
|
"getCustomToolkits",
|
|
@@ -10380,6 +10740,9 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10380
10740
|
"getDataTypeByUuid",
|
|
10381
10741
|
"getDataTypeBySlug",
|
|
10382
10742
|
"getDataTypes",
|
|
10743
|
+
"getDevice",
|
|
10744
|
+
"getDeviceKinds",
|
|
10745
|
+
"getDevices",
|
|
10383
10746
|
"getDiscordBot",
|
|
10384
10747
|
"getDiscordBotAccounts",
|
|
10385
10748
|
"getDiscordBotByUuid",
|
|
@@ -10523,13 +10886,17 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10523
10886
|
"getPhoneNumbers",
|
|
10524
10887
|
"getPhoneUsageReport",
|
|
10525
10888
|
"getPlatformApp",
|
|
10889
|
+
"getPlan",
|
|
10526
10890
|
"getPresenceStatus",
|
|
10527
10891
|
"getProducts",
|
|
10892
|
+
"getProject",
|
|
10893
|
+
"getProjects",
|
|
10528
10894
|
"getPublicFile",
|
|
10529
10895
|
"getPublicFolder",
|
|
10530
10896
|
"getPublicFolderFiles",
|
|
10531
10897
|
"getPublicProducts",
|
|
10532
10898
|
"previewPromoCode",
|
|
10899
|
+
"startPromoPlanTrial",
|
|
10533
10900
|
"getQualification",
|
|
10534
10901
|
"getQualifications",
|
|
10535
10902
|
"getRecordingInfo",
|
|
@@ -10677,6 +11044,8 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10677
11044
|
"markNotificationAsRead",
|
|
10678
11045
|
"mergeMemberRoles",
|
|
10679
11046
|
"previewImportMembers",
|
|
11047
|
+
"previewMemberWorkflowVoice",
|
|
11048
|
+
"previewRenameFieldSlug",
|
|
10680
11049
|
"previewImportWorkspace",
|
|
10681
11050
|
"previewRoutineWorkflowAccess",
|
|
10682
11051
|
"previewSchedule",
|
|
@@ -10689,6 +11058,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10689
11058
|
"rateMessage",
|
|
10690
11059
|
"getChatFeedback",
|
|
10691
11060
|
"reenrollMember",
|
|
11061
|
+
"renameFieldSlug",
|
|
10692
11062
|
"registerLinkedRolesMetadata",
|
|
10693
11063
|
"registerPushSubscription",
|
|
10694
11064
|
"reindexFolder",
|
|
@@ -10708,6 +11078,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10708
11078
|
"restoreFileVersion",
|
|
10709
11079
|
"revokeAccessGrant",
|
|
10710
11080
|
"revokeApiKey",
|
|
11081
|
+
"revokeDevice",
|
|
10711
11082
|
"revokeICalToken",
|
|
10712
11083
|
"runRoutine",
|
|
10713
11084
|
"searchEventRules",
|
|
@@ -10778,6 +11149,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10778
11149
|
"updateDataRecord",
|
|
10779
11150
|
"updateDataRecordFilter",
|
|
10780
11151
|
"updateDataType",
|
|
11152
|
+
"updateDevice",
|
|
10781
11153
|
"updateDiscordBot",
|
|
10782
11154
|
"updateEventAttendee",
|
|
10783
11155
|
"updateEventRule",
|
|
@@ -10811,9 +11183,12 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10811
11183
|
"updatePersona",
|
|
10812
11184
|
"updatePhoneNumber",
|
|
10813
11185
|
"updatePlatformApp",
|
|
11186
|
+
"updatePlan",
|
|
10814
11187
|
"updateProduct",
|
|
11188
|
+
"updateProject",
|
|
10815
11189
|
"updateRoutine",
|
|
10816
11190
|
"updateSalesforceSyncConfig",
|
|
11191
|
+
"resyncSalesforceLinkedMembers",
|
|
10817
11192
|
"updateScenario",
|
|
10818
11193
|
"updateSite",
|
|
10819
11194
|
"updateSiteSharing",
|
|
@@ -11033,6 +11408,8 @@ function bindDataTypesMethods(target, dataTypes) {
|
|
|
11033
11408
|
target.getDataRecordChanges = dataTypes.getDataRecordChanges.bind(dataTypes);
|
|
11034
11409
|
target.upsertDataRecord = dataTypes.upsertDataRecord.bind(dataTypes);
|
|
11035
11410
|
target.toggleFieldIndex = dataTypes.toggleFieldIndex.bind(dataTypes);
|
|
11411
|
+
target.previewRenameFieldSlug = dataTypes.previewRenameFieldSlug.bind(dataTypes);
|
|
11412
|
+
target.renameFieldSlug = dataTypes.renameFieldSlug.bind(dataTypes);
|
|
11036
11413
|
target.getFieldIndexStatus = dataTypes.getFieldIndexStatus.bind(dataTypes);
|
|
11037
11414
|
target.validateDataTypeSlug = dataTypes.validateDataTypeSlug.bind(dataTypes);
|
|
11038
11415
|
target.getMemberRecordCounts = dataTypes.getMemberRecordCounts.bind(dataTypes);
|
|
@@ -11044,9 +11421,25 @@ function bindDataTypesMethods(target, dataTypes) {
|
|
|
11044
11421
|
target.getDataRecordFilterCount = dataTypes.getDataRecordFilterCount.bind(dataTypes);
|
|
11045
11422
|
}
|
|
11046
11423
|
|
|
11424
|
+
// src/client/bindings/devices.ts
|
|
11425
|
+
function bindDevicesMethods(target, devices) {
|
|
11426
|
+
target.getDevices = devices.getDevices.bind(devices);
|
|
11427
|
+
target.getDevice = devices.getDevice.bind(devices);
|
|
11428
|
+
target.getDeviceKinds = devices.getDeviceKinds.bind(devices);
|
|
11429
|
+
target.claimDevicePairing = devices.claimDevicePairing.bind(devices);
|
|
11430
|
+
target.updateDevice = devices.updateDevice.bind(devices);
|
|
11431
|
+
target.revokeDevice = devices.revokeDevice.bind(devices);
|
|
11432
|
+
}
|
|
11433
|
+
|
|
11047
11434
|
// src/client/bindings/members.ts
|
|
11048
11435
|
function bindMembersMethods(target, members) {
|
|
11049
11436
|
target.getCurrentMember = members.getCurrentMember.bind(members);
|
|
11437
|
+
target.getMyDataTypes = members.getMyDataTypes.bind(members);
|
|
11438
|
+
target.getMyRecords = members.getMyRecords.bind(members);
|
|
11439
|
+
target.getMemberWorkflowVoices = members.getMemberWorkflowVoices.bind(members);
|
|
11440
|
+
target.previewMemberWorkflowVoice = members.previewMemberWorkflowVoice.bind(members);
|
|
11441
|
+
target.setMemberWorkflowVoice = members.setMemberWorkflowVoice.bind(members);
|
|
11442
|
+
target.clearMemberWorkflowVoice = members.clearMemberWorkflowVoice.bind(members);
|
|
11050
11443
|
target.getOwnedMembers = members.getOwnedMembers.bind(members);
|
|
11051
11444
|
target.switchMember = members.switchMember.bind(members);
|
|
11052
11445
|
target.clearMemberSwitch = members.clearMemberSwitch.bind(members);
|
|
@@ -11139,6 +11532,7 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
|
|
|
11139
11532
|
target.updateProduct = workspaces.updateProduct.bind(workspaces);
|
|
11140
11533
|
target.deleteProduct = workspaces.deleteProduct.bind(workspaces);
|
|
11141
11534
|
target.exportWorkspace = workspaces.exportWorkspace.bind(workspaces);
|
|
11535
|
+
target.exportWorkspaceZip = workspaces.exportWorkspaceZip.bind(workspaces);
|
|
11142
11536
|
target.previewWorkspaceImport = workspaces.previewWorkspaceImport.bind(workspaces);
|
|
11143
11537
|
target.importWorkspace = workspaces.importWorkspace.bind(workspaces);
|
|
11144
11538
|
target.previewImportWorkspace = workspaces.previewImportWorkspace.bind(workspaces);
|
|
@@ -11258,7 +11652,6 @@ function bindSitesMethods(target, sites) {
|
|
|
11258
11652
|
target.siteSendEmailCode = sites.siteSendEmailCode.bind(sites);
|
|
11259
11653
|
target.siteVerifyCode = sites.siteVerifyCode.bind(sites);
|
|
11260
11654
|
target.siteGoogleOAuthInitiate = sites.siteGoogleOAuthInitiate.bind(sites);
|
|
11261
|
-
target.crawlSite = sites.crawlSite.bind(sites);
|
|
11262
11655
|
target.createSite = sites.createSite.bind(sites);
|
|
11263
11656
|
target.updateSite = sites.updateSite.bind(sites);
|
|
11264
11657
|
target.deleteSite = sites.deleteSite.bind(sites);
|
|
@@ -11321,6 +11714,15 @@ function bindFilesMethods(target, files) {
|
|
|
11321
11714
|
target.getPublicFolderFiles = files.getPublicFolderFiles.bind(files);
|
|
11322
11715
|
}
|
|
11323
11716
|
|
|
11717
|
+
// src/client/bindings/projects.ts
|
|
11718
|
+
function bindProjectsMethods(target, projects) {
|
|
11719
|
+
target.getProjects = projects.getProjects.bind(projects);
|
|
11720
|
+
target.getProject = projects.getProject.bind(projects);
|
|
11721
|
+
target.getPlan = projects.getPlan.bind(projects);
|
|
11722
|
+
target.updateProject = projects.updateProject.bind(projects);
|
|
11723
|
+
target.updatePlan = projects.updatePlan.bind(projects);
|
|
11724
|
+
}
|
|
11725
|
+
|
|
11324
11726
|
// src/client/bindings/events.ts
|
|
11325
11727
|
function bindEventsMethods(target, events) {
|
|
11326
11728
|
target.getEventRules = events.getEventRules.bind(events);
|
|
@@ -11479,6 +11881,7 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
|
|
|
11479
11881
|
target.getInboxEmail = inboxes.getInboxEmail.bind(inboxes);
|
|
11480
11882
|
target.markEmailAsRead = inboxes.markEmailAsRead.bind(inboxes);
|
|
11481
11883
|
target.markEmailAsUnread = inboxes.markEmailAsUnread.bind(inboxes);
|
|
11884
|
+
target.addEmailSenderAsMember = inboxes.addEmailSenderAsMember.bind(inboxes);
|
|
11482
11885
|
target.convertEmail = inboxes.convertEmail.bind(inboxes);
|
|
11483
11886
|
target.downloadEmailAttachment = inboxes.downloadEmailAttachment.bind(inboxes);
|
|
11484
11887
|
target.getInboxThreads = inboxes.getInboxThreads.bind(inboxes);
|
|
@@ -11548,6 +11951,12 @@ function bindBillingMethods(target, apiKeys, subscriptions, reports) {
|
|
|
11548
11951
|
target.addWorkspaceToSubscription = subscriptions.addWorkspaceToSubscription.bind(subscriptions);
|
|
11549
11952
|
target.purchaseCredits = subscriptions.purchaseCredits.bind(subscriptions);
|
|
11550
11953
|
target.createCheckoutSession = subscriptions.createCheckoutSession.bind(subscriptions);
|
|
11954
|
+
target.createMemberCheckoutSession = subscriptions.createMemberCheckoutSession.bind(subscriptions);
|
|
11955
|
+
target.createMemberPortalSession = subscriptions.createMemberPortalSession.bind(subscriptions);
|
|
11956
|
+
target.getMemberSubscriptionStatus = subscriptions.getMemberSubscriptionStatus.bind(subscriptions);
|
|
11957
|
+
target.createDeviceOrderCheckoutSession = subscriptions.createDeviceOrderCheckoutSession.bind(subscriptions);
|
|
11958
|
+
target.listDeviceOrders = subscriptions.listDeviceOrders.bind(subscriptions);
|
|
11959
|
+
target.getCheckoutAttemptStatus = subscriptions.getCheckoutAttemptStatus.bind(subscriptions);
|
|
11551
11960
|
target.listSelfServeProducts = subscriptions.listSelfServeProducts.bind(subscriptions);
|
|
11552
11961
|
target.getAIUsageReport = reports.getAIUsageReport.bind(reports);
|
|
11553
11962
|
target.getSMSUsageReport = reports.getSMSUsageReport.bind(reports);
|
|
@@ -11725,6 +12134,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
11725
12134
|
target.getLinkedSalesforceMembers = salesforce.getLinkedSalesforceMembers.bind(salesforce);
|
|
11726
12135
|
target.getSalesforceSyncConfig = salesforce.getSalesforceSyncConfig.bind(salesforce);
|
|
11727
12136
|
target.updateSalesforceSyncConfig = salesforce.updateSalesforceSyncConfig.bind(salesforce);
|
|
12137
|
+
target.resyncSalesforceLinkedMembers = salesforce.resyncSalesforceLinkedMembers.bind(salesforce);
|
|
11728
12138
|
target.listSalesforceObjects = salesforce.listSalesforceObjects.bind(salesforce);
|
|
11729
12139
|
target.describeSalesforceObject = salesforce.describeSalesforceObject.bind(salesforce);
|
|
11730
12140
|
target.searchSalesforceRecords = salesforce.searchSalesforceRecords.bind(salesforce);
|
|
@@ -11796,6 +12206,7 @@ function bindOrgMethods(target, org) {
|
|
|
11796
12206
|
target.disableOrgDomainEmail = org.disableOrgDomainEmail.bind(org);
|
|
11797
12207
|
target.enableOrgDomainSite = org.enableOrgDomainSite.bind(org);
|
|
11798
12208
|
target.getOrgDomainSite = org.getOrgDomainSite.bind(org);
|
|
12209
|
+
target.preflightOrgDomainSite = org.preflightOrgDomainSite.bind(org);
|
|
11799
12210
|
target.verifyOrgDomainSite = org.verifyOrgDomainSite.bind(org);
|
|
11800
12211
|
target.disableOrgDomainSite = org.disableOrgDomainSite.bind(org);
|
|
11801
12212
|
target.getBusinessProfile = org.getBusinessProfile.bind(org);
|
|
@@ -11809,6 +12220,7 @@ function bindOrgMethods(target, org) {
|
|
|
11809
12220
|
target.syncVoiceTrustProducts = org.syncVoiceTrustProducts.bind(org);
|
|
11810
12221
|
target.createOrganizationWorkspace = org.createOrganizationWorkspace.bind(org);
|
|
11811
12222
|
target.getOrgBillingCustomer = org.getOrgBillingCustomer.bind(org);
|
|
12223
|
+
target.getOrgWorkspaceUsage = org.getOrgWorkspaceUsage.bind(org);
|
|
11812
12224
|
}
|
|
11813
12225
|
|
|
11814
12226
|
// src/client/bindings/pronunciations.ts
|
|
@@ -12065,6 +12477,8 @@ var GravityRailClient = class {
|
|
|
12065
12477
|
getDataRecordChanges;
|
|
12066
12478
|
upsertDataRecord;
|
|
12067
12479
|
toggleFieldIndex;
|
|
12480
|
+
previewRenameFieldSlug;
|
|
12481
|
+
renameFieldSlug;
|
|
12068
12482
|
getFieldIndexStatus;
|
|
12069
12483
|
validateDataTypeSlug;
|
|
12070
12484
|
getMemberRecordCounts;
|
|
@@ -12076,6 +12490,12 @@ var GravityRailClient = class {
|
|
|
12076
12490
|
getDataRecordFilterCount;
|
|
12077
12491
|
// Members API
|
|
12078
12492
|
getCurrentMember;
|
|
12493
|
+
getMyDataTypes;
|
|
12494
|
+
getMyRecords;
|
|
12495
|
+
getMemberWorkflowVoices;
|
|
12496
|
+
previewMemberWorkflowVoice;
|
|
12497
|
+
setMemberWorkflowVoice;
|
|
12498
|
+
clearMemberWorkflowVoice;
|
|
12079
12499
|
getOwnedMembers;
|
|
12080
12500
|
switchMember;
|
|
12081
12501
|
clearMemberSwitch;
|
|
@@ -12310,11 +12730,13 @@ var GravityRailClient = class {
|
|
|
12310
12730
|
getWorkspaceProduct;
|
|
12311
12731
|
getPublicProducts;
|
|
12312
12732
|
previewPromoCode;
|
|
12733
|
+
startPromoPlanTrial;
|
|
12313
12734
|
getPublicProduct;
|
|
12314
12735
|
createProduct;
|
|
12315
12736
|
updateProduct;
|
|
12316
12737
|
deleteProduct;
|
|
12317
12738
|
exportWorkspace;
|
|
12739
|
+
exportWorkspaceZip;
|
|
12318
12740
|
previewWorkspaceImport;
|
|
12319
12741
|
importWorkspace;
|
|
12320
12742
|
previewImportWorkspace;
|
|
@@ -12341,6 +12763,7 @@ var GravityRailClient = class {
|
|
|
12341
12763
|
disableOrgDomainEmail;
|
|
12342
12764
|
enableOrgDomainSite;
|
|
12343
12765
|
getOrgDomainSite;
|
|
12766
|
+
preflightOrgDomainSite;
|
|
12344
12767
|
verifyOrgDomainSite;
|
|
12345
12768
|
disableOrgDomainSite;
|
|
12346
12769
|
getBusinessProfile;
|
|
@@ -12354,6 +12777,7 @@ var GravityRailClient = class {
|
|
|
12354
12777
|
syncVoiceTrustProducts;
|
|
12355
12778
|
createOrganizationWorkspace;
|
|
12356
12779
|
getOrgBillingCustomer;
|
|
12780
|
+
getOrgWorkspaceUsage;
|
|
12357
12781
|
getVapidPublicKey;
|
|
12358
12782
|
registerPushSubscription;
|
|
12359
12783
|
unregisterPushSubscription;
|
|
@@ -12453,7 +12877,6 @@ var GravityRailClient = class {
|
|
|
12453
12877
|
siteSendEmailCode;
|
|
12454
12878
|
siteVerifyCode;
|
|
12455
12879
|
siteGoogleOAuthInitiate;
|
|
12456
|
-
crawlSite;
|
|
12457
12880
|
createSite;
|
|
12458
12881
|
updateSite;
|
|
12459
12882
|
deleteSite;
|
|
@@ -12474,6 +12897,11 @@ var GravityRailClient = class {
|
|
|
12474
12897
|
// Files API
|
|
12475
12898
|
getFiles;
|
|
12476
12899
|
getFile;
|
|
12900
|
+
getProjects;
|
|
12901
|
+
getProject;
|
|
12902
|
+
getPlan;
|
|
12903
|
+
updateProject;
|
|
12904
|
+
updatePlan;
|
|
12477
12905
|
resolveFilePath;
|
|
12478
12906
|
downloadFilesZip;
|
|
12479
12907
|
createFile;
|
|
@@ -12644,6 +13072,7 @@ var GravityRailClient = class {
|
|
|
12644
13072
|
getInboxEmail;
|
|
12645
13073
|
markEmailAsRead;
|
|
12646
13074
|
markEmailAsUnread;
|
|
13075
|
+
addEmailSenderAsMember;
|
|
12647
13076
|
convertEmail;
|
|
12648
13077
|
downloadEmailAttachment;
|
|
12649
13078
|
getInboxThreads;
|
|
@@ -12692,6 +13121,13 @@ var GravityRailClient = class {
|
|
|
12692
13121
|
getFeatureRegistry;
|
|
12693
13122
|
getPublicFeatureRegistry;
|
|
12694
13123
|
getFeatureBySlug;
|
|
13124
|
+
// Devices API
|
|
13125
|
+
getDevices;
|
|
13126
|
+
getDevice;
|
|
13127
|
+
getDeviceKinds;
|
|
13128
|
+
claimDevicePairing;
|
|
13129
|
+
updateDevice;
|
|
13130
|
+
revokeDevice;
|
|
12695
13131
|
// Billing API
|
|
12696
13132
|
getApiKeys;
|
|
12697
13133
|
createApiKey;
|
|
@@ -12707,6 +13143,12 @@ var GravityRailClient = class {
|
|
|
12707
13143
|
addWorkspaceToSubscription;
|
|
12708
13144
|
purchaseCredits;
|
|
12709
13145
|
createCheckoutSession;
|
|
13146
|
+
createMemberCheckoutSession;
|
|
13147
|
+
createMemberPortalSession;
|
|
13148
|
+
getMemberSubscriptionStatus;
|
|
13149
|
+
createDeviceOrderCheckoutSession;
|
|
13150
|
+
listDeviceOrders;
|
|
13151
|
+
getCheckoutAttemptStatus;
|
|
12710
13152
|
listSelfServeProducts;
|
|
12711
13153
|
getAIUsageReport;
|
|
12712
13154
|
getSMSUsageReport;
|
|
@@ -12886,6 +13328,7 @@ var GravityRailClient = class {
|
|
|
12886
13328
|
getLinkedSalesforceMembers;
|
|
12887
13329
|
getSalesforceSyncConfig;
|
|
12888
13330
|
updateSalesforceSyncConfig;
|
|
13331
|
+
resyncSalesforceLinkedMembers;
|
|
12889
13332
|
listSalesforceObjects;
|
|
12890
13333
|
describeSalesforceObject;
|
|
12891
13334
|
searchSalesforceRecords;
|
|
@@ -12988,6 +13431,7 @@ var GravityRailClient = class {
|
|
|
12988
13431
|
bindChatsMethods(this, apis.chats);
|
|
12989
13432
|
bindCallsMethods(this, apis.calls, apis.cel);
|
|
12990
13433
|
bindDataTypesMethods(this, apis.dataTypes);
|
|
13434
|
+
bindDevicesMethods(this, apis.devices);
|
|
12991
13435
|
bindMembersMethods(this, apis.members);
|
|
12992
13436
|
bindAgentTasksMethods(this, apis.agentTasks);
|
|
12993
13437
|
bindAgentsMethods(this, apis.agents);
|
|
@@ -13009,6 +13453,7 @@ var GravityRailClient = class {
|
|
|
13009
13453
|
bindAuthMethods(this, apis.auth, apis.assignments);
|
|
13010
13454
|
bindSitesMethods(this, apis.sites);
|
|
13011
13455
|
bindFilesMethods(this, apis.files);
|
|
13456
|
+
bindProjectsMethods(this, apis.projects);
|
|
13012
13457
|
bindEventsMethods(this, apis.events);
|
|
13013
13458
|
bindWorkflowsMethods(this, apis.workflows, apis.workflowNotes, apis.voice, apis.supervisors);
|
|
13014
13459
|
bindCalendarsMethods(this, apis.calendars);
|
|
@@ -13305,6 +13750,7 @@ var RoutineBuilder = class extends WorkspaceBuilderResource {
|
|
|
13305
13750
|
return `Routine: ${this.name} (${parts.join(", ")})`;
|
|
13306
13751
|
}
|
|
13307
13752
|
async apply(client) {
|
|
13753
|
+
if (this._existed) return;
|
|
13308
13754
|
const eventRules = this.rules.map((rule) => {
|
|
13309
13755
|
const actionParams = { ...rule.actionParams };
|
|
13310
13756
|
if (rule.workflow?._id !== void 0) actionParams.workflowId = rule.workflow._id;
|
|
@@ -13360,6 +13806,7 @@ var NotificationRuleBuilder = class extends WorkspaceBuilderResource {
|
|
|
13360
13806
|
return `NotificationRule: ${this.name}${parts.length ? ` (${parts.join(", ")})` : ""}`;
|
|
13361
13807
|
}
|
|
13362
13808
|
async apply(client) {
|
|
13809
|
+
if (this._existed) return;
|
|
13363
13810
|
if (this.memberId === void 0) {
|
|
13364
13811
|
throw new Error(`Notification rule '${this.name}' requires memberId`);
|
|
13365
13812
|
}
|
|
@@ -13894,6 +14341,7 @@ var RoleUpdate = class extends WorkspaceBuilderResource {
|
|
|
13894
14341
|
return `RoleUpdate: roleId=${this.roleId}${parts.length ? ` (${parts.join(", ")})` : ""}`;
|
|
13895
14342
|
}
|
|
13896
14343
|
async apply(client) {
|
|
14344
|
+
if (this._existed) return;
|
|
13897
14345
|
const payload = {};
|
|
13898
14346
|
if (this.workflowIds) payload.workflowIds = this.workflowIds;
|
|
13899
14347
|
if (this.dataTypeIds) payload.dataTypeIds = this.dataTypeIds;
|
|
@@ -14123,6 +14571,7 @@ var AgentBuilder = class extends WorkspaceBuilderResource {
|
|
|
14123
14571
|
return `Agent: ${this.name}${parts.length ? ` (${parts.join(", ")})` : ""}`;
|
|
14124
14572
|
}
|
|
14125
14573
|
async apply(client) {
|
|
14574
|
+
if (this._existed) return;
|
|
14126
14575
|
if (this.memberRoleId === void 0) {
|
|
14127
14576
|
throw new Error(`Agent '${this.name}' requires memberRoleId`);
|
|
14128
14577
|
}
|
|
@@ -14158,6 +14607,25 @@ var PHASES = /* @__PURE__ */ new Map([
|
|
|
14158
14607
|
[JourneyBuilder, 7],
|
|
14159
14608
|
[JourneyStepBuilder, 8]
|
|
14160
14609
|
]);
|
|
14610
|
+
var LIST_PAGE_SIZE = 100;
|
|
14611
|
+
async function collectPages(fetchPage) {
|
|
14612
|
+
const first = await fetchPage(1);
|
|
14613
|
+
const all = [...first.items];
|
|
14614
|
+
const totalPages = first.totalPages ?? 1;
|
|
14615
|
+
for (let page = 2; page <= totalPages; page++) {
|
|
14616
|
+
const next = await fetchPage(page);
|
|
14617
|
+
if (!next.items.length) break;
|
|
14618
|
+
all.push(...next.items);
|
|
14619
|
+
}
|
|
14620
|
+
return all;
|
|
14621
|
+
}
|
|
14622
|
+
function sameIdSet(left, right) {
|
|
14623
|
+
const target = new Set(right);
|
|
14624
|
+
return target.size === new Set(left).size && left.every((id) => target.has(id));
|
|
14625
|
+
}
|
|
14626
|
+
function notificationRuleKey(noticeType, memberId, workflowId) {
|
|
14627
|
+
return JSON.stringify([noticeType, memberId, workflowId]);
|
|
14628
|
+
}
|
|
14161
14629
|
function phaseFor(resource) {
|
|
14162
14630
|
let ctor = resource.constructor;
|
|
14163
14631
|
while (ctor) {
|
|
@@ -14420,6 +14888,103 @@ Done! Created ${count} resources.`);
|
|
|
14420
14888
|
journeyNames.get(existing.name).adopt(detail);
|
|
14421
14889
|
}
|
|
14422
14890
|
}
|
|
14891
|
+
const agentNames = new Map(
|
|
14892
|
+
resources.filter((resource) => resource instanceof AgentBuilder).map((resource) => [resource.name, resource])
|
|
14893
|
+
);
|
|
14894
|
+
if (agentNames.size) {
|
|
14895
|
+
for (const existing of await collectPages(
|
|
14896
|
+
(page) => this.client.getAgents({ page, pageSize: LIST_PAGE_SIZE })
|
|
14897
|
+
)) {
|
|
14898
|
+
if (existing.name && agentNames.has(existing.name)) {
|
|
14899
|
+
agentNames.get(existing.name).adopt(existing);
|
|
14900
|
+
}
|
|
14901
|
+
}
|
|
14902
|
+
}
|
|
14903
|
+
const routineNames = new Map(
|
|
14904
|
+
resources.filter((resource) => resource instanceof RoutineBuilder).map((resource) => [resource.name, resource])
|
|
14905
|
+
);
|
|
14906
|
+
if (routineNames.size) {
|
|
14907
|
+
for (const existing of await collectPages(
|
|
14908
|
+
(page) => this.client.getRoutines({ page, pageSize: LIST_PAGE_SIZE })
|
|
14909
|
+
)) {
|
|
14910
|
+
if (existing.name && routineNames.has(existing.name)) {
|
|
14911
|
+
routineNames.get(existing.name).adopt(existing);
|
|
14912
|
+
}
|
|
14913
|
+
}
|
|
14914
|
+
}
|
|
14915
|
+
await this.resolveExistingRoleUpdates(resources);
|
|
14916
|
+
await this.resolveExistingWorkflows(resources, workflowNames);
|
|
14917
|
+
await this.resolveExistingNotificationRules(resources);
|
|
14918
|
+
}
|
|
14919
|
+
/**
|
|
14920
|
+
* Adopt a role update whose grants the server already has.
|
|
14921
|
+
*
|
|
14922
|
+
* A role update is a replace-semantics PUT, not a create, so its identity is
|
|
14923
|
+
* the role id and "already applied" means the id sets match exactly. Subset
|
|
14924
|
+
* would be wrong: `roleUpdate(7, [])` asks to *clear* the role's workflow
|
|
14925
|
+
* access, and treating that as satisfied by a role that still has grants
|
|
14926
|
+
* would silently skip a real change.
|
|
14927
|
+
*
|
|
14928
|
+
* Only the fields this update declares are compared — an update that passes
|
|
14929
|
+
* `workflowIds` and omits `dataTypeIds` never touches data-type access, so
|
|
14930
|
+
* that access cannot make it stale.
|
|
14931
|
+
*/
|
|
14932
|
+
async resolveExistingRoleUpdates(resources) {
|
|
14933
|
+
const updates = resources.filter(
|
|
14934
|
+
(resource) => resource instanceof RoleUpdate
|
|
14935
|
+
);
|
|
14936
|
+
if (!updates.length) return;
|
|
14937
|
+
const rolesById = new Map(
|
|
14938
|
+
(await this.client.getMemberRoles()).map((role) => [role.id, role])
|
|
14939
|
+
);
|
|
14940
|
+
for (const update of updates) {
|
|
14941
|
+
const role = rolesById.get(update.roleId);
|
|
14942
|
+
if (!role) continue;
|
|
14943
|
+
const workflowsSettled = update.workflowIds === void 0 || sameIdSet(
|
|
14944
|
+
update.workflowIds,
|
|
14945
|
+
(role.workflowAccess ?? []).map((access) => access.workflowId)
|
|
14946
|
+
);
|
|
14947
|
+
const dataTypesSettled = update.dataTypeIds === void 0 || sameIdSet(
|
|
14948
|
+
update.dataTypeIds,
|
|
14949
|
+
(role.dataTypeAccess ?? []).map((access) => access.dataTypeId)
|
|
14950
|
+
);
|
|
14951
|
+
if (workflowsSettled && dataTypesSettled) update.adopt(role);
|
|
14952
|
+
}
|
|
14953
|
+
}
|
|
14954
|
+
/**
|
|
14955
|
+
* Adopt notification rules the server already has.
|
|
14956
|
+
*
|
|
14957
|
+
* There is no name on the server row — `NotificationRule` is keyed by what
|
|
14958
|
+
* it does — so identity is the composite the API enforces uniqueness on in
|
|
14959
|
+
* practice: notice type, recipient, and subject workflow.
|
|
14960
|
+
*/
|
|
14961
|
+
async resolveExistingNotificationRules(resources) {
|
|
14962
|
+
const rules = resources.filter(
|
|
14963
|
+
(resource) => resource instanceof NotificationRuleBuilder
|
|
14964
|
+
);
|
|
14965
|
+
if (!rules.length) return;
|
|
14966
|
+
const identified = rules.flatMap((rule) => {
|
|
14967
|
+
if (rule.memberId === void 0) return [];
|
|
14968
|
+
if (rule.workflow && rule.workflow._id === void 0) return [];
|
|
14969
|
+
return [
|
|
14970
|
+
[
|
|
14971
|
+
notificationRuleKey(rule.noticeType, rule.memberId, rule.workflow?._id ?? null),
|
|
14972
|
+
rule
|
|
14973
|
+
]
|
|
14974
|
+
];
|
|
14975
|
+
});
|
|
14976
|
+
if (!identified.length) return;
|
|
14977
|
+
const byKey = new Map(identified);
|
|
14978
|
+
for (const existing of await this.client.getNotificationRules()) {
|
|
14979
|
+
const key = notificationRuleKey(
|
|
14980
|
+
existing.noticeType,
|
|
14981
|
+
existing.memberId,
|
|
14982
|
+
existing.workflowId ?? null
|
|
14983
|
+
);
|
|
14984
|
+
byKey.get(key)?.adopt(existing);
|
|
14985
|
+
}
|
|
14986
|
+
}
|
|
14987
|
+
async resolveExistingWorkflows(resources, workflowNames) {
|
|
14423
14988
|
if (!workflowNames.size) return;
|
|
14424
14989
|
const existingWorkflows = await this.client.getWorkflows();
|
|
14425
14990
|
for (const { workflow: existing } of existingWorkflows.items) {
|
|
@@ -14865,6 +15430,7 @@ var AbilityTypeSlugs = {
|
|
|
14865
15430
|
SEND_WHATSAPP: "communication:send_whatsapp",
|
|
14866
15431
|
MEMBER_ACCESS: "communication:member_access",
|
|
14867
15432
|
AUDIO_PLAYBACK: "communication:audio_playback",
|
|
15433
|
+
IMAGE_DISPLAY: "communication:image_display",
|
|
14868
15434
|
// Oversight
|
|
14869
15435
|
SUPERVISOR: "oversight:supervisor",
|
|
14870
15436
|
SUPERVISOR_ACTIONS: "oversight:supervisor_actions",
|
|
@@ -14873,6 +15439,7 @@ var AbilityTypeSlugs = {
|
|
|
14873
15439
|
MEMBER_FIELD_VERIFICATION: "identity:member_field_verification",
|
|
14874
15440
|
// Delegation
|
|
14875
15441
|
CONTRIBUTOR: "delegation:contributor",
|
|
15442
|
+
MANAGE_WORKSPACE: "delegation:manage_workspace",
|
|
14876
15443
|
// Workflow
|
|
14877
15444
|
WORKFLOW_RUN: "workflow:run",
|
|
14878
15445
|
// Commerce
|
|
@@ -15200,7 +15767,7 @@ function isChatType(value) {
|
|
|
15200
15767
|
|
|
15201
15768
|
// src/constants/models.ts
|
|
15202
15769
|
var DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
|
|
15203
|
-
var DEFAULT_VOICE_INFERENCE_MODEL = "
|
|
15770
|
+
var DEFAULT_VOICE_INFERENCE_MODEL = "openai:chat:gpt-5.6-luna";
|
|
15204
15771
|
var DEFAULT_CUSTOM_VOICE_MODEL = "elevenlabs:voice:river";
|
|
15205
15772
|
|
|
15206
15773
|
// src/types/resource-metadata.ts
|
|
@@ -15209,105 +15776,79 @@ var RESOURCE_METADATA = {
|
|
|
15209
15776
|
label: "Credits",
|
|
15210
15777
|
unit: "credit",
|
|
15211
15778
|
unitPlural: "credits",
|
|
15212
|
-
description: "AI model usage billed as tokens with model-specific multipliers"
|
|
15213
|
-
requiresFeature: null,
|
|
15214
|
-
scope: "any"
|
|
15779
|
+
description: "AI model usage billed as tokens with model-specific multipliers"
|
|
15215
15780
|
},
|
|
15216
15781
|
["stt" /* STT */]: {
|
|
15217
15782
|
label: "Speech-to-Text",
|
|
15218
15783
|
unit: "minute",
|
|
15219
15784
|
unitPlural: "minutes",
|
|
15220
|
-
description: "Audio transcription in minutes"
|
|
15221
|
-
requiresFeature: null,
|
|
15222
|
-
scope: "any"
|
|
15785
|
+
description: "Audio transcription in minutes"
|
|
15223
15786
|
},
|
|
15224
15787
|
["tts" /* TTS */]: {
|
|
15225
15788
|
label: "Text-to-Speech",
|
|
15226
15789
|
unit: "1,000 characters",
|
|
15227
15790
|
unitPlural: "1,000 characters",
|
|
15228
|
-
description: "Text synthesized to audio, billed in lots of 1,000 characters"
|
|
15229
|
-
requiresFeature: null,
|
|
15230
|
-
scope: "any"
|
|
15791
|
+
description: "Text synthesized to audio, billed in lots of 1,000 characters"
|
|
15231
15792
|
},
|
|
15232
15793
|
["sms" /* SMS */]: {
|
|
15233
15794
|
label: "SMS Messages",
|
|
15234
15795
|
unit: "message",
|
|
15235
15796
|
unitPlural: "messages",
|
|
15236
|
-
description: "Text messages sent via phone number"
|
|
15237
|
-
requiresFeature: "phone" /* PHONE */,
|
|
15238
|
-
scope: "any"
|
|
15797
|
+
description: "Text messages sent via phone number"
|
|
15239
15798
|
},
|
|
15240
15799
|
["email" /* EMAIL */]: {
|
|
15241
15800
|
label: "Emails",
|
|
15242
15801
|
unit: "message",
|
|
15243
15802
|
unitPlural: "messages",
|
|
15244
|
-
description: "Email messages sent or received"
|
|
15245
|
-
requiresFeature: "email" /* EMAIL */,
|
|
15246
|
-
scope: "any"
|
|
15803
|
+
description: "Email messages sent or received"
|
|
15247
15804
|
},
|
|
15248
15805
|
["phone_call" /* PHONE_CALL */]: {
|
|
15249
15806
|
label: "Phone Calls",
|
|
15250
15807
|
unit: "minute",
|
|
15251
15808
|
unitPlural: "minutes",
|
|
15252
|
-
description: "Phone call duration in minutes"
|
|
15253
|
-
requiresFeature: "phone" /* PHONE */,
|
|
15254
|
-
scope: "any"
|
|
15809
|
+
description: "Phone call duration in minutes"
|
|
15255
15810
|
},
|
|
15256
15811
|
["phone_number" /* PHONE_NUMBER */]: {
|
|
15257
15812
|
label: "Phone Numbers",
|
|
15258
15813
|
unit: "number",
|
|
15259
15814
|
unitPlural: "numbers",
|
|
15260
|
-
description: "Active phone numbers for calling and SMS"
|
|
15261
|
-
requiresFeature: "phone" /* PHONE */,
|
|
15262
|
-
scope: "any"
|
|
15815
|
+
description: "Active phone numbers for calling and SMS"
|
|
15263
15816
|
},
|
|
15264
15817
|
["inbox" /* INBOX */]: {
|
|
15265
15818
|
label: "Email Inboxes",
|
|
15266
15819
|
unit: "inbox",
|
|
15267
15820
|
unitPlural: "inboxes",
|
|
15268
|
-
description: "Email inboxes for receiving messages"
|
|
15269
|
-
requiresFeature: "email" /* EMAIL */,
|
|
15270
|
-
scope: "any"
|
|
15821
|
+
description: "Email inboxes for receiving messages"
|
|
15271
15822
|
},
|
|
15272
15823
|
["site" /* SITE */]: {
|
|
15273
15824
|
label: "Sites",
|
|
15274
15825
|
unit: "site",
|
|
15275
15826
|
unitPlural: "sites",
|
|
15276
|
-
description: "Published websites"
|
|
15277
|
-
requiresFeature: "sites" /* SITES */,
|
|
15278
|
-
scope: "any"
|
|
15827
|
+
description: "Published websites"
|
|
15279
15828
|
},
|
|
15280
15829
|
["member" /* MEMBER */]: {
|
|
15281
15830
|
label: "Members",
|
|
15282
15831
|
unit: "member",
|
|
15283
15832
|
unitPlural: "members",
|
|
15284
|
-
description: "
|
|
15285
|
-
requiresFeature: null,
|
|
15286
|
-
scope: "workspace"
|
|
15833
|
+
description: "Members across the organization"
|
|
15287
15834
|
},
|
|
15288
15835
|
["workspace" /* WORKSPACE */]: {
|
|
15289
15836
|
label: "Workspaces",
|
|
15290
15837
|
unit: "workspace",
|
|
15291
15838
|
unitPlural: "workspaces",
|
|
15292
|
-
description: "Workspaces in the organization"
|
|
15293
|
-
requiresFeature: null,
|
|
15294
|
-
scope: "org"
|
|
15839
|
+
description: "Workspaces in the organization"
|
|
15295
15840
|
},
|
|
15296
15841
|
["org_admin" /* ORG_ADMIN */]: {
|
|
15297
15842
|
label: "Organization Admins",
|
|
15298
15843
|
unit: "admin",
|
|
15299
15844
|
unitPlural: "admins",
|
|
15300
|
-
description: "Organization administrators"
|
|
15301
|
-
requiresFeature: null,
|
|
15302
|
-
scope: "org"
|
|
15845
|
+
description: "Organization administrators"
|
|
15303
15846
|
},
|
|
15304
15847
|
["storage_mb" /* STORAGE_MB */]: {
|
|
15305
15848
|
label: "Storage",
|
|
15306
15849
|
unit: "MB",
|
|
15307
15850
|
unitPlural: "MB",
|
|
15308
|
-
description: "File storage in megabytes"
|
|
15309
|
-
requiresFeature: null,
|
|
15310
|
-
scope: "any"
|
|
15851
|
+
description: "File storage in megabytes"
|
|
15311
15852
|
}
|
|
15312
15853
|
};
|
|
15313
15854
|
function getResourceMetadata(resource) {
|
|
@@ -15316,35 +15857,6 @@ function getResourceMetadata(resource) {
|
|
|
15316
15857
|
function getAllResourceSlugs() {
|
|
15317
15858
|
return Object.keys(RESOURCE_METADATA);
|
|
15318
15859
|
}
|
|
15319
|
-
function getScopeFromProductType(productType) {
|
|
15320
|
-
const isOrgProduct = productType === "org" /* ORG */;
|
|
15321
|
-
return isOrgProduct ? "org" : "workspace";
|
|
15322
|
-
}
|
|
15323
|
-
function getApplicableResources(scope, enabledFeatures) {
|
|
15324
|
-
const enabledSet = enabledFeatures ? new Set(enabledFeatures) : null;
|
|
15325
|
-
return Object.entries(RESOURCE_METADATA).filter(([_slug, metadata]) => {
|
|
15326
|
-
if (scope === "workspace" && metadata.scope === "org") {
|
|
15327
|
-
return false;
|
|
15328
|
-
}
|
|
15329
|
-
if (scope === "org" && metadata.scope === "workspace") {
|
|
15330
|
-
return false;
|
|
15331
|
-
}
|
|
15332
|
-
if (enabledSet !== null && metadata.requiresFeature !== null) {
|
|
15333
|
-
if (!enabledSet.has(metadata.requiresFeature)) {
|
|
15334
|
-
return false;
|
|
15335
|
-
}
|
|
15336
|
-
}
|
|
15337
|
-
return true;
|
|
15338
|
-
}).map(([slug]) => slug).sort((a, b) => {
|
|
15339
|
-
const metaA = RESOURCE_METADATA[a];
|
|
15340
|
-
const metaB = RESOURCE_METADATA[b];
|
|
15341
|
-
return metaA.label.localeCompare(metaB.label);
|
|
15342
|
-
});
|
|
15343
|
-
}
|
|
15344
|
-
function getApplicableResourceSlugs(productType) {
|
|
15345
|
-
const scope = getScopeFromProductType(productType);
|
|
15346
|
-
return getApplicableResources(scope);
|
|
15347
|
-
}
|
|
15348
15860
|
|
|
15349
15861
|
// src/scopes.ts
|
|
15350
15862
|
var ScopeCategory = /* @__PURE__ */ ((ScopeCategory2) => {
|
|
@@ -15359,6 +15871,7 @@ var ScopeCategory = /* @__PURE__ */ ((ScopeCategory2) => {
|
|
|
15359
15871
|
ScopeCategory2["DATATYPES"] = "datatypes";
|
|
15360
15872
|
ScopeCategory2["RECORDS"] = "records";
|
|
15361
15873
|
ScopeCategory2["FILES"] = "files";
|
|
15874
|
+
ScopeCategory2["DEVICES"] = "devices";
|
|
15362
15875
|
ScopeCategory2["JOURNEYS"] = "journeys";
|
|
15363
15876
|
ScopeCategory2["EXPERIMENTS"] = "experiments";
|
|
15364
15877
|
ScopeCategory2["SITES"] = "sites";
|
|
@@ -15603,6 +16116,26 @@ var SCOPES = {
|
|
|
15603
16116
|
implies: ["files:write"]
|
|
15604
16117
|
},
|
|
15605
16118
|
// =========================================================================
|
|
16119
|
+
// DEVICES
|
|
16120
|
+
// =========================================================================
|
|
16121
|
+
"devices:read": {
|
|
16122
|
+
name: "devices:read",
|
|
16123
|
+
category: "devices" /* DEVICES */,
|
|
16124
|
+
description: "View companion devices"
|
|
16125
|
+
},
|
|
16126
|
+
"devices:write": {
|
|
16127
|
+
name: "devices:write",
|
|
16128
|
+
category: "devices" /* DEVICES */,
|
|
16129
|
+
description: "Enrol and manage own companion devices",
|
|
16130
|
+
implies: ["devices:read"]
|
|
16131
|
+
},
|
|
16132
|
+
"devices:admin": {
|
|
16133
|
+
name: "devices:admin",
|
|
16134
|
+
category: "devices" /* DEVICES */,
|
|
16135
|
+
description: "List and revoke any companion device",
|
|
16136
|
+
implies: ["devices:write"]
|
|
16137
|
+
},
|
|
16138
|
+
// =========================================================================
|
|
15606
16139
|
// JOURNEYS
|
|
15607
16140
|
// =========================================================================
|
|
15608
16141
|
"journeys:read": {
|
|
@@ -16097,7 +16630,6 @@ function getRevisionState(workflow, revision) {
|
|
|
16097
16630
|
REALTIME_MODEL_CUSTOM,
|
|
16098
16631
|
REALTIME_MODEL_GEMINI,
|
|
16099
16632
|
REALTIME_MODEL_GEMINI_VERTEX,
|
|
16100
|
-
REALTIME_MODEL_NOVA_SONIC,
|
|
16101
16633
|
REALTIME_MODEL_OPENAI,
|
|
16102
16634
|
REALTIME_MODEL_OPENAI_2,
|
|
16103
16635
|
REALTIME_MODEL_OPENAI_MINI,
|
|
@@ -16150,8 +16682,6 @@ function getRevisionState(workflow, revision) {
|
|
|
16150
16682
|
formatAppContextAsMarkdown,
|
|
16151
16683
|
getAllFeatures,
|
|
16152
16684
|
getAllResourceSlugs,
|
|
16153
|
-
getApplicableResourceSlugs,
|
|
16154
|
-
getApplicableResources,
|
|
16155
16685
|
getAvailableFeaturesForUpgrade,
|
|
16156
16686
|
getCookieValue,
|
|
16157
16687
|
getFeature,
|
|
@@ -16160,7 +16690,6 @@ function getRevisionState(workflow, revision) {
|
|
|
16160
16690
|
getMissingDependencies,
|
|
16161
16691
|
getResourceMetadata,
|
|
16162
16692
|
getRevisionState,
|
|
16163
|
-
getScopeFromProductType,
|
|
16164
16693
|
getTTSProvider,
|
|
16165
16694
|
getVoiceModelId,
|
|
16166
16695
|
initializeFeatures,
|