@gravity-rail/sdk 0.18.1 → 0.22.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-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/{chunk-PUIYXJSZ.js → chunk-WMA6YCAS.js} +496 -41
- package/dist/chunk-WMA6YCAS.js.map +1 -0
- package/dist/{client-B-jmQ4UA.d.cts → client-C10qSd6b.d.ts} +1678 -285
- package/dist/{client-CatNn6FD.d.ts → client-Ct0soeip.d.cts} +1678 -285
- 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 +595 -41
- 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 -5
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +502 -41
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +630 -551
- package/dist/internal.d.ts +630 -551
- package/dist/internal.js +9 -5
- package/dist/internal.js.map +1 -1
- package/dist/{revision-state-Fw1jsQOa.d.ts → revision-state-C6aM-PHu.d.ts} +53 -172
- package/dist/{revision-state-CuESPYpi.d.cts → revision-state-CCPTiW-i.d.cts} +53 -172
- package/dist/schemas.cjs +31 -5
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +37 -14
- package/dist/schemas.d.ts +37 -14
- package/dist/schemas.js +31 -6
- package/dist/schemas.js.map +1 -1
- package/dist/{tasks-GVbVa_Lj.d.cts → tasks-WH_VfzMv.d.cts} +351 -16
- package/dist/{tasks-GVbVa_Lj.d.ts → tasks-WH_VfzMv.d.ts} +351 -16
- package/package.json +6 -6
- package/dist/chunk-2YLKG4TT.js.map +0 -1
- package/dist/chunk-PUIYXJSZ.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,
|
|
@@ -507,7 +506,11 @@ ${formattedErrors}`, response.status);
|
|
|
507
506
|
throw error;
|
|
508
507
|
}
|
|
509
508
|
const errorMessage = typeof errorData.detail === "string" ? errorData.detail : errorData.message || response.statusText;
|
|
510
|
-
|
|
509
|
+
const simpleError = new ApiError(errorMessage, response.status);
|
|
510
|
+
if (typeof errorData.code === "string") {
|
|
511
|
+
simpleError.errorData = errorData;
|
|
512
|
+
}
|
|
513
|
+
throw simpleError;
|
|
511
514
|
}
|
|
512
515
|
if (response.status === 204) {
|
|
513
516
|
return void 0;
|
|
@@ -873,6 +876,7 @@ var AgentsApi = class extends BaseApiClient {
|
|
|
873
876
|
if (options.search) params.append("search", options.search);
|
|
874
877
|
if (options.includeArchived)
|
|
875
878
|
params.append("includeArchived", options.includeArchived.toString());
|
|
879
|
+
if (options.owner) params.append("owner", options.owner);
|
|
876
880
|
return this.fetch(
|
|
877
881
|
`w/${wid}/agents${params.toString() ? `?${params.toString()}` : ""}`
|
|
878
882
|
);
|
|
@@ -1266,33 +1270,36 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1266
1270
|
});
|
|
1267
1271
|
}
|
|
1268
1272
|
/** Initiate SMS login by sending a verification code to the given phone number. */
|
|
1269
|
-
async login(phoneNumber, wid, organizationUuid) {
|
|
1273
|
+
async login(phoneNumber, wid, organizationUuid, isSignUp = false) {
|
|
1270
1274
|
const params = new URLSearchParams();
|
|
1271
1275
|
if (wid) params.append("wid", wid);
|
|
1272
1276
|
const body = { phoneNumber: sanitizePhoneForBackend(phoneNumber) };
|
|
1273
1277
|
if (organizationUuid) body.organizationUuid = organizationUuid;
|
|
1278
|
+
if (isSignUp) body.isSignUp = true;
|
|
1274
1279
|
return await this.fetch(`auth/login?${params.toString()}`, {
|
|
1275
1280
|
method: "POST",
|
|
1276
1281
|
body: JSON.stringify(body)
|
|
1277
1282
|
});
|
|
1278
1283
|
}
|
|
1279
1284
|
/** Resend the SMS verification code to the given phone number. */
|
|
1280
|
-
async resendCode(phoneNumber, organizationUuid) {
|
|
1285
|
+
async resendCode(phoneNumber, organizationUuid, isSignUp = false) {
|
|
1281
1286
|
const body = { phoneNumber: sanitizePhoneForBackend(phoneNumber) };
|
|
1282
1287
|
if (organizationUuid) body.organizationUuid = organizationUuid;
|
|
1288
|
+
if (isSignUp) body.isSignUp = true;
|
|
1283
1289
|
return await this.fetch("auth/resend-code", {
|
|
1284
1290
|
method: "POST",
|
|
1285
1291
|
body: JSON.stringify(body)
|
|
1286
1292
|
});
|
|
1287
1293
|
}
|
|
1288
1294
|
/** Verify an SMS code and complete authentication, handling 2FA if required. */
|
|
1289
|
-
async verifyCodeWith2FA(phoneNumber, code, organizationUuid) {
|
|
1295
|
+
async verifyCodeWith2FA(phoneNumber, code, organizationUuid, isSignUp = false) {
|
|
1290
1296
|
const verifyResponse = await this.fetch("auth/verify-with-2fa", {
|
|
1291
1297
|
method: "POST",
|
|
1292
1298
|
body: JSON.stringify({
|
|
1293
1299
|
phoneNumber: sanitizePhoneForBackend(phoneNumber),
|
|
1294
1300
|
code,
|
|
1295
|
-
organizationUuid
|
|
1301
|
+
organizationUuid,
|
|
1302
|
+
isSignUp
|
|
1296
1303
|
})
|
|
1297
1304
|
});
|
|
1298
1305
|
if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
|
|
@@ -1542,14 +1549,17 @@ var AuthApi = class extends BaseApiClient {
|
|
|
1542
1549
|
// ===== CREDENTIAL CHANGE METHODS =====
|
|
1543
1550
|
/**
|
|
1544
1551
|
* Request to change email or phone credential.
|
|
1545
|
-
* 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.
|
|
1546
1555
|
*/
|
|
1547
|
-
async requestCredentialChange(credentialType, newValue) {
|
|
1556
|
+
async requestCredentialChange(credentialType, newValue, deliveryMethod = "sms") {
|
|
1548
1557
|
return this.fetch("account/request-credential-change", {
|
|
1549
1558
|
method: "POST",
|
|
1550
1559
|
body: JSON.stringify({
|
|
1551
1560
|
credential_type: credentialType,
|
|
1552
|
-
new_value: newValue
|
|
1561
|
+
new_value: newValue,
|
|
1562
|
+
delivery_method: deliveryMethod
|
|
1553
1563
|
})
|
|
1554
1564
|
});
|
|
1555
1565
|
}
|
|
@@ -1831,10 +1841,12 @@ var CalendarsApi = class extends BaseApiClient {
|
|
|
1831
1841
|
}
|
|
1832
1842
|
/** Generate or regenerate an iCal feed token for a calendar. */
|
|
1833
1843
|
async generateICalToken(wid, calendarId, regenerate = false) {
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
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
|
+
);
|
|
1838
1850
|
}
|
|
1839
1851
|
/** Revoke the iCal feed token for a calendar, disabling external feed access. */
|
|
1840
1852
|
async revokeICalToken(wid, calendarId) {
|
|
@@ -2792,6 +2804,34 @@ var DataTypesApi = class extends BaseApiClient {
|
|
|
2792
2804
|
async getFieldIndexStatus(wid, dataTypeId, fieldSlug) {
|
|
2793
2805
|
return this.fetch(`w/${wid}/data-types/${dataTypeId}/fields/${fieldSlug}/index-status`);
|
|
2794
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
|
+
}
|
|
2795
2835
|
/**
|
|
2796
2836
|
* Validate if a data type slug is available.
|
|
2797
2837
|
* Returns availability and a suggested alternative if taken.
|
|
@@ -2814,6 +2854,44 @@ function isUuid(value) {
|
|
|
2814
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);
|
|
2815
2855
|
}
|
|
2816
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
|
+
|
|
2817
2895
|
// src/api/discord-bots.ts
|
|
2818
2896
|
var DiscordBotsApi = class extends BaseApiClient {
|
|
2819
2897
|
/**
|
|
@@ -3244,6 +3322,7 @@ var EventsApi = class extends BaseApiClient {
|
|
|
3244
3322
|
if (options.sortBy) params.append("sortBy", options.sortBy);
|
|
3245
3323
|
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
3246
3324
|
if (options.owner) params.append("owner", options.owner);
|
|
3325
|
+
if (options.ownerId) params.append("ownerId", options.ownerId.toString());
|
|
3247
3326
|
return this.fetch(
|
|
3248
3327
|
`w/${wid}/routines${params.toString() ? `?${params.toString()}` : ""}`
|
|
3249
3328
|
);
|
|
@@ -4272,12 +4351,37 @@ var InboxesApi = class extends BaseApiClient {
|
|
|
4272
4351
|
});
|
|
4273
4352
|
}
|
|
4274
4353
|
/** Reply to an email from the inbox. */
|
|
4275
|
-
async replyToEmail(wid, inboxId, emailId, content) {
|
|
4354
|
+
async replyToEmail(wid, inboxId, emailId, content, htmlContent) {
|
|
4355
|
+
const body = { content, htmlContent };
|
|
4276
4356
|
return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/${emailId}/reply`, {
|
|
4277
4357
|
method: "POST",
|
|
4278
|
-
body: JSON.stringify(
|
|
4358
|
+
body: JSON.stringify(body)
|
|
4279
4359
|
});
|
|
4280
4360
|
}
|
|
4361
|
+
/** Compose and send a new email from an inbox. */
|
|
4362
|
+
async sendInboxEmail(wid, inboxId, body) {
|
|
4363
|
+
return this.fetch(`w/${wid}/inboxes/${inboxId}/emails`, {
|
|
4364
|
+
method: "POST",
|
|
4365
|
+
body: JSON.stringify(body)
|
|
4366
|
+
});
|
|
4367
|
+
}
|
|
4368
|
+
/**
|
|
4369
|
+
* Make a stored email's sender a Member of this workspace.
|
|
4370
|
+
*
|
|
4371
|
+
* The explicit alternative to auto-signup for inboxes that accept
|
|
4372
|
+
* non-member mail. Requires `members:write` AND `inboxes:read`. Responds
|
|
4373
|
+
* 409 when a Member already holds the address — gate the call on
|
|
4374
|
+
* `Email.senderIsMember` rather than discovering it from the error.
|
|
4375
|
+
*/
|
|
4376
|
+
async addEmailSenderAsMember(wid, inboxId, emailId, body) {
|
|
4377
|
+
return this.fetch(
|
|
4378
|
+
`w/${wid}/inboxes/${inboxId}/emails/${emailId}/add-sender-as-member`,
|
|
4379
|
+
{
|
|
4380
|
+
method: "POST",
|
|
4381
|
+
body: JSON.stringify(body)
|
|
4382
|
+
}
|
|
4383
|
+
);
|
|
4384
|
+
}
|
|
4281
4385
|
/** Convert an email to text, markdown, or PDF format. */
|
|
4282
4386
|
async convertEmail(wid, inboxId, emailId, format = "pdf") {
|
|
4283
4387
|
return this.fetch(
|
|
@@ -4620,6 +4724,54 @@ var MembersApi = class extends BaseApiClient {
|
|
|
4620
4724
|
async getCurrentMember(wid) {
|
|
4621
4725
|
return this.fetch(`w/${wid}/me`);
|
|
4622
4726
|
}
|
|
4727
|
+
/**
|
|
4728
|
+
* One row per workflow available to the member, with its voice state
|
|
4729
|
+
* (Custom Voice). Own-data-or-scope: a member reads their OWN rows with
|
|
4730
|
+
* no member scope; others need members:read.
|
|
4731
|
+
*/
|
|
4732
|
+
async getMemberWorkflowVoices(wid, memberId) {
|
|
4733
|
+
return this.fetch(
|
|
4734
|
+
`w/${wid}/members/${memberId}/workflow-voices`
|
|
4735
|
+
);
|
|
4736
|
+
}
|
|
4737
|
+
/** Audition a voice the member can pick for this workflow (PCM16). */
|
|
4738
|
+
async previewMemberWorkflowVoice(wid, memberId, workflowId, body) {
|
|
4739
|
+
const response = await this.fetchRaw(
|
|
4740
|
+
`w/${wid}/members/${memberId}/workflow-voices/${workflowId}/preview`,
|
|
4741
|
+
{ method: "POST", body: JSON.stringify(body) }
|
|
4742
|
+
);
|
|
4743
|
+
return response.arrayBuffer();
|
|
4744
|
+
}
|
|
4745
|
+
/** Set the member's preferred voice for one workflow (Custom Voice). */
|
|
4746
|
+
async setMemberWorkflowVoice(wid, memberId, workflowId, body) {
|
|
4747
|
+
return this.fetch(
|
|
4748
|
+
`w/${wid}/members/${memberId}/workflow-voices/${workflowId}`,
|
|
4749
|
+
{ method: "PUT", body: JSON.stringify(body) }
|
|
4750
|
+
);
|
|
4751
|
+
}
|
|
4752
|
+
/** Clear the member's preferred voice for one workflow (Custom Voice). */
|
|
4753
|
+
async clearMemberWorkflowVoice(wid, memberId, workflowId) {
|
|
4754
|
+
return this.fetch(
|
|
4755
|
+
`w/${wid}/members/${memberId}/workflow-voices/${workflowId}`,
|
|
4756
|
+
{ method: "DELETE" }
|
|
4757
|
+
);
|
|
4758
|
+
}
|
|
4759
|
+
/**
|
|
4760
|
+
* Member-scoped DataTypes the current member may use (self-access — works
|
|
4761
|
+
* on a Site session, which can hold no records scope by construction).
|
|
4762
|
+
*/
|
|
4763
|
+
async getMyDataTypes(wid) {
|
|
4764
|
+
return this.fetch(`w/${wid}/me/data-types`);
|
|
4765
|
+
}
|
|
4766
|
+
/** The current member's own records for one DataType (self-access). */
|
|
4767
|
+
async getMyRecords(wid, dataTypeId, options) {
|
|
4768
|
+
const params = new URLSearchParams({ data_type_id: String(dataTypeId) });
|
|
4769
|
+
if (options?.page) params.set("page", String(options.page));
|
|
4770
|
+
if (options?.pageSize) params.set("page_size", String(options.pageSize));
|
|
4771
|
+
return this.fetch(
|
|
4772
|
+
`w/${wid}/me/records?${params.toString()}`
|
|
4773
|
+
);
|
|
4774
|
+
}
|
|
4623
4775
|
/**
|
|
4624
4776
|
* Get all members owned by the current member in this workspace.
|
|
4625
4777
|
* Returns the authenticated member plus any members they own (via owner_id).
|
|
@@ -5530,7 +5682,11 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5530
5682
|
});
|
|
5531
5683
|
}
|
|
5532
5684
|
/**
|
|
5533
|
-
* Get the billing customer
|
|
5685
|
+
* Get the billing customer and this organization's billable subscription.
|
|
5686
|
+
*
|
|
5687
|
+
* `subscriptionId` is the org-scoped row — never pick the customer's
|
|
5688
|
+
* newest subscription from the list endpoint. One customer can bill many
|
|
5689
|
+
* organizations.
|
|
5534
5690
|
*/
|
|
5535
5691
|
async getOrgBillingCustomer(orgIdOrUuid) {
|
|
5536
5692
|
return this.fetch(`o/${orgIdOrUuid}/billing-customer`);
|
|
@@ -5870,6 +6026,17 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5870
6026
|
async getOrgDomainSite(orgIdOrUuid, domainUuid) {
|
|
5871
6027
|
return this.fetch(`o/${orgIdOrUuid}/domains/${domainUuid}/site`);
|
|
5872
6028
|
}
|
|
6029
|
+
/**
|
|
6030
|
+
* Pre-enable DNS check: is the site CNAME resolving to the routing
|
|
6031
|
+
* endpoint yet? Pure DNS — consumes no enable budget.
|
|
6032
|
+
*/
|
|
6033
|
+
async preflightOrgDomainSite(orgIdOrUuid, domainUuid) {
|
|
6034
|
+
return this.fetch(
|
|
6035
|
+
`o/${orgIdOrUuid}/domains/${domainUuid}/site/preflight`,
|
|
6036
|
+
// Empty JSON body: the route requires one as a CSRF barrier.
|
|
6037
|
+
{ method: "POST", body: JSON.stringify({}) }
|
|
6038
|
+
);
|
|
6039
|
+
}
|
|
5873
6040
|
/**
|
|
5874
6041
|
* Verify the site CNAME points at the Gravity Rail sites domain.
|
|
5875
6042
|
*/
|
|
@@ -5913,10 +6080,10 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5913
6080
|
* is required — brands register per legal entity (Customer Profile);
|
|
5914
6081
|
* there is no primary-entity fallback.
|
|
5915
6082
|
*/
|
|
5916
|
-
async startA2PRegistration(orgUuid, legalEntityUuid, brandName,
|
|
6083
|
+
async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandUuid = null) {
|
|
5917
6084
|
return this.fetch(`o/${orgUuid}/phone-numbers/a2p/start`, {
|
|
5918
6085
|
method: "POST",
|
|
5919
|
-
body: JSON.stringify({ legalEntityUuid, brandName,
|
|
6086
|
+
body: JSON.stringify({ legalEntityUuid, brandName, brandUuid })
|
|
5920
6087
|
});
|
|
5921
6088
|
}
|
|
5922
6089
|
/**
|
|
@@ -6020,7 +6187,12 @@ var OrgApi = class extends BaseApiClient {
|
|
|
6020
6187
|
* Reconcile trust product state against Twilio (discovery + status
|
|
6021
6188
|
* refresh). Returns the refreshed products plus which product keys were
|
|
6022
6189
|
* newly discovered. Responds 409 when another Trust Hub operation holds
|
|
6023
|
-
*
|
|
6190
|
+
* this legal entity's lock, failing fast rather than queueing.
|
|
6191
|
+
*
|
|
6192
|
+
* No `Retry-After` is sent, deliberately (#23601): holders range from a
|
|
6193
|
+
* sub-second JSONB write to a multi-minute Twilio sequence, so no interval
|
|
6194
|
+
* would be honest. Back off on your own schedule, and re-read before
|
|
6195
|
+
* retrying — the operation you collided with may have committed SIDs.
|
|
6024
6196
|
*/
|
|
6025
6197
|
async syncVoiceTrustProducts(orgUuid, legalEntityUuid) {
|
|
6026
6198
|
return this.fetch(
|
|
@@ -6053,6 +6225,16 @@ var OrgApi = class extends BaseApiClient {
|
|
|
6053
6225
|
async listA2PBrands(orgUuid) {
|
|
6054
6226
|
return this.fetch(`o/${orgUuid}/a2p-brands`);
|
|
6055
6227
|
}
|
|
6228
|
+
/**
|
|
6229
|
+
* Live per-brand campaign use-case eligibility. Approved brands only — a
|
|
6230
|
+
* brand still under TCR review comes back as a structured 412 the picker
|
|
6231
|
+
* renders as the supported-list fallback, not an error.
|
|
6232
|
+
*/
|
|
6233
|
+
async getA2PBrandUseCases(orgUuid, brandUuid) {
|
|
6234
|
+
return this.fetch(
|
|
6235
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/use-cases`
|
|
6236
|
+
);
|
|
6237
|
+
}
|
|
6056
6238
|
/**
|
|
6057
6239
|
* Fetch a brand's resolved A2P campaign config. The response carries both the
|
|
6058
6240
|
* raw `overrides` and the `resolved` payload (defaults + overrides) the editor
|
|
@@ -6724,6 +6906,20 @@ var ProjectsApi = class extends BaseApiClient {
|
|
|
6724
6906
|
`w/${wid}/projects/${encodeURIComponent(slug)}/plans/${encodeURIComponent(plan)}`
|
|
6725
6907
|
);
|
|
6726
6908
|
}
|
|
6909
|
+
/** Typed update of a project README; absent fields are untouched. */
|
|
6910
|
+
async updateProject(wid, slug, update) {
|
|
6911
|
+
return this.fetch(`w/${wid}/projects/${encodeURIComponent(slug)}`, {
|
|
6912
|
+
method: "PATCH",
|
|
6913
|
+
body: JSON.stringify(update)
|
|
6914
|
+
});
|
|
6915
|
+
}
|
|
6916
|
+
/** Typed update of a plan README; absent fields are untouched. */
|
|
6917
|
+
async updatePlan(wid, slug, plan, update) {
|
|
6918
|
+
return this.fetch(
|
|
6919
|
+
`w/${wid}/projects/${encodeURIComponent(slug)}/plans/${encodeURIComponent(plan)}`,
|
|
6920
|
+
{ method: "PATCH", body: JSON.stringify(update) }
|
|
6921
|
+
);
|
|
6922
|
+
}
|
|
6727
6923
|
};
|
|
6728
6924
|
|
|
6729
6925
|
// src/api/qualifications.ts
|
|
@@ -6991,6 +7187,26 @@ var SalesforceApi = class extends BaseApiClient {
|
|
|
6991
7187
|
}
|
|
6992
7188
|
);
|
|
6993
7189
|
}
|
|
7190
|
+
/**
|
|
7191
|
+
* Pull linked members' Salesforce records now, ignoring the sync cursor.
|
|
7192
|
+
*
|
|
7193
|
+
* The inbound poll only ever returns records modified after the stored
|
|
7194
|
+
* cursor, so a member linked to a record that has not changed since is
|
|
7195
|
+
* unreachable by any poll and its link never receives a field — silently.
|
|
7196
|
+
* This fetches the records by Id and leaves the cursor untouched, so it is
|
|
7197
|
+
* safe to call at any time.
|
|
7198
|
+
*
|
|
7199
|
+
* Omit `memberIds` to resync every linked member (capped server-side).
|
|
7200
|
+
*/
|
|
7201
|
+
async resyncSalesforceLinkedMembers(wid, data = {}) {
|
|
7202
|
+
return this.fetch(
|
|
7203
|
+
`w/${wid}/app-connections/salesforce/sync/resync-members`,
|
|
7204
|
+
{
|
|
7205
|
+
method: "POST",
|
|
7206
|
+
body: JSON.stringify(data)
|
|
7207
|
+
}
|
|
7208
|
+
);
|
|
7209
|
+
}
|
|
6994
7210
|
/**
|
|
6995
7211
|
* List the sObjects available in the connected org.
|
|
6996
7212
|
*
|
|
@@ -7563,6 +7779,62 @@ var SubscriptionsApi = class extends BaseApiClient {
|
|
|
7563
7779
|
headers: { "Content-Type": "application/json" }
|
|
7564
7780
|
});
|
|
7565
7781
|
}
|
|
7782
|
+
/** Purchase a role-granting membership in an existing workspace. */
|
|
7783
|
+
async createMemberCheckoutSession(productId, planPeriod = "month", options = {}) {
|
|
7784
|
+
return this.fetch(`subscriptions/member-checkout-session`, {
|
|
7785
|
+
method: "POST",
|
|
7786
|
+
credentials: "include",
|
|
7787
|
+
body: JSON.stringify({ productId, planPeriod, ...options }),
|
|
7788
|
+
headers: { "Content-Type": "application/json" }
|
|
7789
|
+
});
|
|
7790
|
+
}
|
|
7791
|
+
async getMemberSubscriptionStatus(siteUuidOrOptions) {
|
|
7792
|
+
const options = typeof siteUuidOrOptions === "string" ? { siteUuid: siteUuidOrOptions } : siteUuidOrOptions;
|
|
7793
|
+
const params = new URLSearchParams();
|
|
7794
|
+
if (options.siteUuid) params.set("siteUuid", options.siteUuid);
|
|
7795
|
+
if (options.workspaceUuid) params.set("workspaceUuid", options.workspaceUuid);
|
|
7796
|
+
return this.fetch(
|
|
7797
|
+
`subscriptions/member-subscription?${params.toString()}`,
|
|
7798
|
+
{ credentials: "include" }
|
|
7799
|
+
);
|
|
7800
|
+
}
|
|
7801
|
+
/** Open Stripe's hosted membership-management portal. */
|
|
7802
|
+
async createMemberPortalSession(options) {
|
|
7803
|
+
return this.fetch(`subscriptions/member-portal-session`, {
|
|
7804
|
+
method: "POST",
|
|
7805
|
+
credentials: "include",
|
|
7806
|
+
body: JSON.stringify(options),
|
|
7807
|
+
headers: { "Content-Type": "application/json" }
|
|
7808
|
+
});
|
|
7809
|
+
}
|
|
7810
|
+
/**
|
|
7811
|
+
* Purchase one physical companion device (one-time payment; Stripe collects
|
|
7812
|
+
* the shipping address in hosted Checkout).
|
|
7813
|
+
*/
|
|
7814
|
+
async createDeviceOrderCheckoutSession(productId, options = {}) {
|
|
7815
|
+
return this.fetch(`device-orders/checkout-session`, {
|
|
7816
|
+
method: "POST",
|
|
7817
|
+
credentials: "include",
|
|
7818
|
+
body: JSON.stringify({ productId, ...options }),
|
|
7819
|
+
headers: { "Content-Type": "application/json" }
|
|
7820
|
+
});
|
|
7821
|
+
}
|
|
7822
|
+
/** List the authenticated Account's own device orders in one workspace. */
|
|
7823
|
+
async listDeviceOrders(options) {
|
|
7824
|
+
const params = new URLSearchParams();
|
|
7825
|
+
if (options.siteUuid) params.set("siteUuid", options.siteUuid);
|
|
7826
|
+
if (options.workspaceUuid) params.set("workspaceUuid", options.workspaceUuid);
|
|
7827
|
+
return this.fetch(`device-orders?${params.toString()}`, {
|
|
7828
|
+
credentials: "include"
|
|
7829
|
+
});
|
|
7830
|
+
}
|
|
7831
|
+
/** Read one authenticated, server-owned checkout attempt. */
|
|
7832
|
+
async getCheckoutAttemptStatus(attemptId) {
|
|
7833
|
+
return this.fetch(
|
|
7834
|
+
`subscriptions/checkout-attempts/${encodeURIComponent(attemptId)}`,
|
|
7835
|
+
{ credentials: "include" }
|
|
7836
|
+
);
|
|
7837
|
+
}
|
|
7566
7838
|
/**
|
|
7567
7839
|
* List self-service, purchasable organization plans or add-ons. Only products
|
|
7568
7840
|
* with a Stripe Price are returned; zero-amount plans are allowed.
|
|
@@ -7767,6 +8039,9 @@ var CustomersApi = class extends BaseApiClient {
|
|
|
7767
8039
|
if (opts?.status) params.set("status", opts.status);
|
|
7768
8040
|
if (opts?.page !== void 0) params.set("page", String(opts.page));
|
|
7769
8041
|
if (opts?.pageSize !== void 0) params.set("page_size", String(opts.pageSize));
|
|
8042
|
+
if (opts?.subscriptionId !== void 0) {
|
|
8043
|
+
params.set("subscription_id", String(opts.subscriptionId));
|
|
8044
|
+
}
|
|
7770
8045
|
const qs = params.toString();
|
|
7771
8046
|
return this.fetch(`customers/${uuid}/subscriptions${qs ? "?" + qs : ""}`);
|
|
7772
8047
|
}
|
|
@@ -8770,28 +9045,36 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
8770
9045
|
};
|
|
8771
9046
|
|
|
8772
9047
|
// src/api/workflow-notes.ts
|
|
9048
|
+
function notesPath(wid, workflowId, noteId, query) {
|
|
9049
|
+
const base = noteId == null ? `w/${wid}/workflows/${workflowId}/notes` : `w/${wid}/workflows/${workflowId}/notes/${noteId}`;
|
|
9050
|
+
if (query?.workflowRevisionId == null) return base;
|
|
9051
|
+
const params = new URLSearchParams({
|
|
9052
|
+
workflowRevisionId: String(query.workflowRevisionId)
|
|
9053
|
+
});
|
|
9054
|
+
return `${base}?${params.toString()}`;
|
|
9055
|
+
}
|
|
8773
9056
|
var WorkflowNotesApi = class extends BaseApiClient {
|
|
8774
|
-
/** List
|
|
8775
|
-
async getWorkflowNotes(wid, workflowId) {
|
|
8776
|
-
return this.fetch(
|
|
9057
|
+
/** List notes for a workflow root (draft unless `workflowRevisionId` is set). */
|
|
9058
|
+
async getWorkflowNotes(wid, workflowId, query) {
|
|
9059
|
+
return this.fetch(notesPath(wid, workflowId, void 0, query));
|
|
8777
9060
|
}
|
|
8778
|
-
/** Create a new note on a workflow. */
|
|
8779
|
-
async createWorkflowNote(wid, workflowId, data) {
|
|
8780
|
-
return this.fetch(
|
|
9061
|
+
/** Create a new note on a workflow's draft (or a pinned draft revision). */
|
|
9062
|
+
async createWorkflowNote(wid, workflowId, data, query) {
|
|
9063
|
+
return this.fetch(notesPath(wid, workflowId, void 0, query), {
|
|
8781
9064
|
method: "POST",
|
|
8782
9065
|
body: JSON.stringify(data)
|
|
8783
9066
|
});
|
|
8784
9067
|
}
|
|
8785
9068
|
/** Update an existing workflow note with partial data. */
|
|
8786
|
-
async updateWorkflowNote(wid, workflowId, noteId, data) {
|
|
8787
|
-
return this.fetch(
|
|
9069
|
+
async updateWorkflowNote(wid, workflowId, noteId, data, query) {
|
|
9070
|
+
return this.fetch(notesPath(wid, workflowId, noteId, query), {
|
|
8788
9071
|
method: "PUT",
|
|
8789
9072
|
body: JSON.stringify(data)
|
|
8790
9073
|
});
|
|
8791
9074
|
}
|
|
8792
9075
|
/** Delete a workflow note by ID. */
|
|
8793
|
-
async deleteWorkflowNote(wid, workflowId, noteId) {
|
|
8794
|
-
return this.fetch(
|
|
9076
|
+
async deleteWorkflowNote(wid, workflowId, noteId, query) {
|
|
9077
|
+
return this.fetch(notesPath(wid, workflowId, noteId, query), {
|
|
8795
9078
|
method: "DELETE"
|
|
8796
9079
|
});
|
|
8797
9080
|
}
|
|
@@ -8893,6 +9176,9 @@ var Scope = /* @__PURE__ */ ((Scope2) => {
|
|
|
8893
9176
|
Scope2["FILES_READ"] = "files:read";
|
|
8894
9177
|
Scope2["FILES_WRITE"] = "files:write";
|
|
8895
9178
|
Scope2["FILES_ADMIN"] = "files:admin";
|
|
9179
|
+
Scope2["DEVICES_READ"] = "devices:read";
|
|
9180
|
+
Scope2["DEVICES_WRITE"] = "devices:write";
|
|
9181
|
+
Scope2["DEVICES_ADMIN"] = "devices:admin";
|
|
8896
9182
|
Scope2["SITES_READ"] = "sites:read";
|
|
8897
9183
|
Scope2["SITES_WRITE"] = "sites:write";
|
|
8898
9184
|
Scope2["SITES_ADMIN"] = "sites:admin";
|
|
@@ -9055,6 +9341,7 @@ var EventRuleEventType = /* @__PURE__ */ ((EventRuleEventType2) => {
|
|
|
9055
9341
|
EventRuleEventType2["CALENDAR_EVENT_CANCELLED"] = "calendar_event:cancelled";
|
|
9056
9342
|
EventRuleEventType2["CALENDAR_EVENT_STARTING"] = "calendar_event:starting";
|
|
9057
9343
|
EventRuleEventType2["CALENDAR_EVENT_ENDED"] = "calendar_event:ended";
|
|
9344
|
+
EventRuleEventType2["CALENDAR_EVENT_NO_SHOW"] = "calendar_event:no_show";
|
|
9058
9345
|
EventRuleEventType2["CONNECTOR_EVENT"] = "connector:event";
|
|
9059
9346
|
EventRuleEventType2["ASSIGNMENT_CONCLUDED"] = "assignment:concluded";
|
|
9060
9347
|
EventRuleEventType2["JOURNEY_STEP_EXECUTE"] = "journey_step:execute";
|
|
@@ -9137,7 +9424,6 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
|
|
|
9137
9424
|
WorkspaceFeature2["CONFLUENCE"] = "confluence";
|
|
9138
9425
|
WorkspaceFeature2["AGENT_MEMORY"] = "agent_memory";
|
|
9139
9426
|
WorkspaceFeature2["IMAGE_GENERATION"] = "image_generation";
|
|
9140
|
-
WorkspaceFeature2["STRICT_NATIVE_VOICE"] = "strict_native_voice";
|
|
9141
9427
|
WorkspaceFeature2["CHARLESTON_NEPHROLOGY_PMD_PAGING"] = "charleston_nephrology_pmd_paging";
|
|
9142
9428
|
WorkspaceFeature2["PATIENTSYNC_TRANSFER"] = "patientsync_transfer";
|
|
9143
9429
|
return WorkspaceFeature2;
|
|
@@ -9177,6 +9463,8 @@ var Resource = /* @__PURE__ */ ((Resource2) => {
|
|
|
9177
9463
|
var ProductType = /* @__PURE__ */ ((ProductType2) => {
|
|
9178
9464
|
ProductType2["ORG"] = "org";
|
|
9179
9465
|
ProductType2["ADDON"] = "addon";
|
|
9466
|
+
ProductType2["MEMBER"] = "member";
|
|
9467
|
+
ProductType2["DEVICE"] = "device";
|
|
9180
9468
|
return ProductType2;
|
|
9181
9469
|
})(ProductType || {});
|
|
9182
9470
|
var ORG_ONLY_RESOURCES = /* @__PURE__ */ new Set([
|
|
@@ -9296,7 +9584,6 @@ var REALTIME_MODEL_OPENAI_MINI = "openai:realtime:gpt-realtime-mini";
|
|
|
9296
9584
|
var REALTIME_MODEL_OPENAI_2 = "openai:realtime:gpt-realtime-2";
|
|
9297
9585
|
var REALTIME_MODEL_GEMINI = "google:aistudio:gemini-3.1-flash-live";
|
|
9298
9586
|
var REALTIME_MODEL_GEMINI_VERTEX = "google:vertex:gemini-3.1-flash-live";
|
|
9299
|
-
var REALTIME_MODEL_NOVA_SONIC = "aws:bedrock:nova-sonic-1";
|
|
9300
9587
|
var REALTIME_MODEL_CUSTOM = "custom:realtime:composable";
|
|
9301
9588
|
var STT_MODEL_DEEPGRAM_FLUX = "deepgram:stt:flux-general-en";
|
|
9302
9589
|
var STT_MODEL_DEEPGRAM_FLUX_SELFHOST = "deepgram:stt:flux-general-en:selfhost";
|
|
@@ -9828,6 +10115,13 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
9828
10115
|
signal: options?.signal
|
|
9829
10116
|
});
|
|
9830
10117
|
}
|
|
10118
|
+
/** Provision the one-month direct organization plan carried by a promo code. */
|
|
10119
|
+
async startPromoPlanTrial(request) {
|
|
10120
|
+
return this.fetch("promo-codes/plan-trial", {
|
|
10121
|
+
method: "POST",
|
|
10122
|
+
body: JSON.stringify(request)
|
|
10123
|
+
});
|
|
10124
|
+
}
|
|
9831
10125
|
/** Get a publicly accessible product by ID. */
|
|
9832
10126
|
async getPublicProduct(id) {
|
|
9833
10127
|
return this.fetch(`products/${id}`);
|
|
@@ -9878,15 +10172,47 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
9878
10172
|
})
|
|
9879
10173
|
});
|
|
9880
10174
|
}
|
|
9881
|
-
/**
|
|
9882
|
-
async
|
|
10175
|
+
/** Download a workspace export ZIP (``export.json`` + file blobs). */
|
|
10176
|
+
async exportWorkspaceZip(wid, workflowId, scope, exclude) {
|
|
10177
|
+
const searchParams = new URLSearchParams();
|
|
10178
|
+
if (workflowId !== void 0) searchParams.set("workflow_id", String(workflowId));
|
|
10179
|
+
if (scope !== void 0) searchParams.set("scope", scope);
|
|
10180
|
+
if (exclude !== void 0) searchParams.set("exclude", exclude);
|
|
10181
|
+
const qs = searchParams.toString();
|
|
10182
|
+
const response = await this.fetchRaw(`w/${wid}/export.zip${qs ? `?${qs}` : ""}`);
|
|
10183
|
+
return response.arrayBuffer();
|
|
10184
|
+
}
|
|
10185
|
+
/** Import workspace configuration from exported JSON, or from a ZIP archive.
|
|
10186
|
+
* Pass ``archive`` (the ZIP from ``exportWorkspaceZip``) to restore file
|
|
10187
|
+
* contents. ``exportData`` may be omitted when the ZIP contains it.
|
|
10188
|
+
*/
|
|
10189
|
+
async importWorkspace(wid, exportData, importMappings, createNew, archive) {
|
|
10190
|
+
const payload = {
|
|
10191
|
+
importMappings,
|
|
10192
|
+
createNew
|
|
10193
|
+
};
|
|
10194
|
+
if (exportData) {
|
|
10195
|
+
payload.exportData = exportData;
|
|
10196
|
+
}
|
|
10197
|
+
if (archive) {
|
|
10198
|
+
const form = new FormData();
|
|
10199
|
+
form.append(
|
|
10200
|
+
"request",
|
|
10201
|
+
new Blob([JSON.stringify(payload)], { type: "application/json" }),
|
|
10202
|
+
"import.json"
|
|
10203
|
+
);
|
|
10204
|
+
form.append("archive", archive, "workspace-export.zip");
|
|
10205
|
+
return this.fetch(`w/${wid}/import.zip`, {
|
|
10206
|
+
method: "POST",
|
|
10207
|
+
body: form
|
|
10208
|
+
});
|
|
10209
|
+
}
|
|
10210
|
+
if (!exportData) {
|
|
10211
|
+
throw new Error("exportData is required for JSON import");
|
|
10212
|
+
}
|
|
9883
10213
|
return this.fetch(`w/${wid}/import`, {
|
|
9884
10214
|
method: "POST",
|
|
9885
|
-
body: JSON.stringify(
|
|
9886
|
-
exportData,
|
|
9887
|
-
importMappings,
|
|
9888
|
-
createNew
|
|
9889
|
-
})
|
|
10215
|
+
body: JSON.stringify(payload)
|
|
9890
10216
|
});
|
|
9891
10217
|
}
|
|
9892
10218
|
/** Preview a workspace import using the legacy untyped interface. */
|
|
@@ -9928,7 +10254,6 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
9928
10254
|
* Get billing dashboard data for a workspace.
|
|
9929
10255
|
*
|
|
9930
10256
|
* This endpoint is available to organization owners (with org:info scope).
|
|
9931
|
-
* Superusers should use the admin endpoint via getWorkspaceUsageDashboard.
|
|
9932
10257
|
*
|
|
9933
10258
|
* Returns comprehensive billing information including:
|
|
9934
10259
|
* - Subscription status and plan details
|
|
@@ -10026,6 +10351,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
10026
10351
|
customToolkits: new CustomToolkitsApi(apiKey, baseUrl, customFetch),
|
|
10027
10352
|
dashboards: new DashboardsApi(apiKey, baseUrl, customFetch),
|
|
10028
10353
|
dataTypes: new DataTypesApi(apiKey, baseUrl, customFetch),
|
|
10354
|
+
devices: new DevicesApi(apiKey, baseUrl, customFetch),
|
|
10029
10355
|
discordBots: new DiscordBotsApi(apiKey, baseUrl, customFetch),
|
|
10030
10356
|
slackApps: new SlackAppsApi(apiKey, baseUrl, customFetch),
|
|
10031
10357
|
teamsApps: new TeamsAppsApi(apiKey, baseUrl, customFetch),
|
|
@@ -10084,6 +10410,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
10084
10410
|
// src/client/workspace-client.ts
|
|
10085
10411
|
var WORKSPACE_METHOD_NAMES = [
|
|
10086
10412
|
"activateWorkflowRevision",
|
|
10413
|
+
"addEmailSenderAsMember",
|
|
10087
10414
|
"addGroupMember",
|
|
10088
10415
|
"advanceStep",
|
|
10089
10416
|
"approveWorkspaceInvitation",
|
|
@@ -10114,6 +10441,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10114
10441
|
"checkAvailability",
|
|
10115
10442
|
"checkSiteDomainAvailability",
|
|
10116
10443
|
"checkSiteSlugAvailability",
|
|
10444
|
+
"claimDevicePairing",
|
|
10117
10445
|
"clearConnectionMemberExclusion",
|
|
10118
10446
|
"clearMemberSwitch",
|
|
10119
10447
|
"clearTrackedLinkDestinations",
|
|
@@ -10301,6 +10629,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10301
10629
|
"exportMembers",
|
|
10302
10630
|
"exportPhoneNumberOutboundAnalyticsCsv",
|
|
10303
10631
|
"exportWorkspace",
|
|
10632
|
+
"exportWorkspaceZip",
|
|
10304
10633
|
"fetchVoicemailAudio",
|
|
10305
10634
|
"fhirBackfillEncounterSync",
|
|
10306
10635
|
"fhirCheckPatientLinks",
|
|
@@ -10397,6 +10726,11 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10397
10726
|
"getConnectionSyncConfig",
|
|
10398
10727
|
"getCredentialUpdateInvites",
|
|
10399
10728
|
"getCurrentMember",
|
|
10729
|
+
"clearMemberWorkflowVoice",
|
|
10730
|
+
"getMemberWorkflowVoices",
|
|
10731
|
+
"getMyDataTypes",
|
|
10732
|
+
"getMyRecords",
|
|
10733
|
+
"setMemberWorkflowVoice",
|
|
10400
10734
|
"getCurrentSmsChat",
|
|
10401
10735
|
"getCustomToolkit",
|
|
10402
10736
|
"getCustomToolkits",
|
|
@@ -10414,6 +10748,9 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10414
10748
|
"getDataTypeByUuid",
|
|
10415
10749
|
"getDataTypeBySlug",
|
|
10416
10750
|
"getDataTypes",
|
|
10751
|
+
"getDevice",
|
|
10752
|
+
"getDeviceKinds",
|
|
10753
|
+
"getDevices",
|
|
10417
10754
|
"getDiscordBot",
|
|
10418
10755
|
"getDiscordBotAccounts",
|
|
10419
10756
|
"getDiscordBotByUuid",
|
|
@@ -10567,6 +10904,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10567
10904
|
"getPublicFolderFiles",
|
|
10568
10905
|
"getPublicProducts",
|
|
10569
10906
|
"previewPromoCode",
|
|
10907
|
+
"startPromoPlanTrial",
|
|
10570
10908
|
"getQualification",
|
|
10571
10909
|
"getQualifications",
|
|
10572
10910
|
"getRecordingInfo",
|
|
@@ -10714,6 +11052,8 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10714
11052
|
"markNotificationAsRead",
|
|
10715
11053
|
"mergeMemberRoles",
|
|
10716
11054
|
"previewImportMembers",
|
|
11055
|
+
"previewMemberWorkflowVoice",
|
|
11056
|
+
"previewRenameFieldSlug",
|
|
10717
11057
|
"previewImportWorkspace",
|
|
10718
11058
|
"previewRoutineWorkflowAccess",
|
|
10719
11059
|
"previewSchedule",
|
|
@@ -10726,6 +11066,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10726
11066
|
"rateMessage",
|
|
10727
11067
|
"getChatFeedback",
|
|
10728
11068
|
"reenrollMember",
|
|
11069
|
+
"renameFieldSlug",
|
|
10729
11070
|
"registerLinkedRolesMetadata",
|
|
10730
11071
|
"registerPushSubscription",
|
|
10731
11072
|
"reindexFolder",
|
|
@@ -10745,6 +11086,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10745
11086
|
"restoreFileVersion",
|
|
10746
11087
|
"revokeAccessGrant",
|
|
10747
11088
|
"revokeApiKey",
|
|
11089
|
+
"revokeDevice",
|
|
10748
11090
|
"revokeICalToken",
|
|
10749
11091
|
"runRoutine",
|
|
10750
11092
|
"searchEventRules",
|
|
@@ -10754,6 +11096,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10754
11096
|
"selectCurrentAssignmentTask",
|
|
10755
11097
|
"sendAssistantMessage",
|
|
10756
11098
|
"sendChatMessage",
|
|
11099
|
+
"sendInboxEmail",
|
|
10757
11100
|
"sendOperatorMessage",
|
|
10758
11101
|
"siteGoogleOAuthInitiate",
|
|
10759
11102
|
"siteSendEmailCode",
|
|
@@ -10815,6 +11158,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10815
11158
|
"updateDataRecord",
|
|
10816
11159
|
"updateDataRecordFilter",
|
|
10817
11160
|
"updateDataType",
|
|
11161
|
+
"updateDevice",
|
|
10818
11162
|
"updateDiscordBot",
|
|
10819
11163
|
"updateEventAttendee",
|
|
10820
11164
|
"updateEventRule",
|
|
@@ -10848,9 +11192,12 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10848
11192
|
"updatePersona",
|
|
10849
11193
|
"updatePhoneNumber",
|
|
10850
11194
|
"updatePlatformApp",
|
|
11195
|
+
"updatePlan",
|
|
10851
11196
|
"updateProduct",
|
|
11197
|
+
"updateProject",
|
|
10852
11198
|
"updateRoutine",
|
|
10853
11199
|
"updateSalesforceSyncConfig",
|
|
11200
|
+
"resyncSalesforceLinkedMembers",
|
|
10854
11201
|
"updateScenario",
|
|
10855
11202
|
"updateSite",
|
|
10856
11203
|
"updateSiteSharing",
|
|
@@ -11070,6 +11417,8 @@ function bindDataTypesMethods(target, dataTypes) {
|
|
|
11070
11417
|
target.getDataRecordChanges = dataTypes.getDataRecordChanges.bind(dataTypes);
|
|
11071
11418
|
target.upsertDataRecord = dataTypes.upsertDataRecord.bind(dataTypes);
|
|
11072
11419
|
target.toggleFieldIndex = dataTypes.toggleFieldIndex.bind(dataTypes);
|
|
11420
|
+
target.previewRenameFieldSlug = dataTypes.previewRenameFieldSlug.bind(dataTypes);
|
|
11421
|
+
target.renameFieldSlug = dataTypes.renameFieldSlug.bind(dataTypes);
|
|
11073
11422
|
target.getFieldIndexStatus = dataTypes.getFieldIndexStatus.bind(dataTypes);
|
|
11074
11423
|
target.validateDataTypeSlug = dataTypes.validateDataTypeSlug.bind(dataTypes);
|
|
11075
11424
|
target.getMemberRecordCounts = dataTypes.getMemberRecordCounts.bind(dataTypes);
|
|
@@ -11081,9 +11430,25 @@ function bindDataTypesMethods(target, dataTypes) {
|
|
|
11081
11430
|
target.getDataRecordFilterCount = dataTypes.getDataRecordFilterCount.bind(dataTypes);
|
|
11082
11431
|
}
|
|
11083
11432
|
|
|
11433
|
+
// src/client/bindings/devices.ts
|
|
11434
|
+
function bindDevicesMethods(target, devices) {
|
|
11435
|
+
target.getDevices = devices.getDevices.bind(devices);
|
|
11436
|
+
target.getDevice = devices.getDevice.bind(devices);
|
|
11437
|
+
target.getDeviceKinds = devices.getDeviceKinds.bind(devices);
|
|
11438
|
+
target.claimDevicePairing = devices.claimDevicePairing.bind(devices);
|
|
11439
|
+
target.updateDevice = devices.updateDevice.bind(devices);
|
|
11440
|
+
target.revokeDevice = devices.revokeDevice.bind(devices);
|
|
11441
|
+
}
|
|
11442
|
+
|
|
11084
11443
|
// src/client/bindings/members.ts
|
|
11085
11444
|
function bindMembersMethods(target, members) {
|
|
11086
11445
|
target.getCurrentMember = members.getCurrentMember.bind(members);
|
|
11446
|
+
target.getMyDataTypes = members.getMyDataTypes.bind(members);
|
|
11447
|
+
target.getMyRecords = members.getMyRecords.bind(members);
|
|
11448
|
+
target.getMemberWorkflowVoices = members.getMemberWorkflowVoices.bind(members);
|
|
11449
|
+
target.previewMemberWorkflowVoice = members.previewMemberWorkflowVoice.bind(members);
|
|
11450
|
+
target.setMemberWorkflowVoice = members.setMemberWorkflowVoice.bind(members);
|
|
11451
|
+
target.clearMemberWorkflowVoice = members.clearMemberWorkflowVoice.bind(members);
|
|
11087
11452
|
target.getOwnedMembers = members.getOwnedMembers.bind(members);
|
|
11088
11453
|
target.switchMember = members.switchMember.bind(members);
|
|
11089
11454
|
target.clearMemberSwitch = members.clearMemberSwitch.bind(members);
|
|
@@ -11176,6 +11541,7 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
|
|
|
11176
11541
|
target.updateProduct = workspaces.updateProduct.bind(workspaces);
|
|
11177
11542
|
target.deleteProduct = workspaces.deleteProduct.bind(workspaces);
|
|
11178
11543
|
target.exportWorkspace = workspaces.exportWorkspace.bind(workspaces);
|
|
11544
|
+
target.exportWorkspaceZip = workspaces.exportWorkspaceZip.bind(workspaces);
|
|
11179
11545
|
target.previewWorkspaceImport = workspaces.previewWorkspaceImport.bind(workspaces);
|
|
11180
11546
|
target.importWorkspace = workspaces.importWorkspace.bind(workspaces);
|
|
11181
11547
|
target.previewImportWorkspace = workspaces.previewImportWorkspace.bind(workspaces);
|
|
@@ -11362,6 +11728,8 @@ function bindProjectsMethods(target, projects) {
|
|
|
11362
11728
|
target.getProjects = projects.getProjects.bind(projects);
|
|
11363
11729
|
target.getProject = projects.getProject.bind(projects);
|
|
11364
11730
|
target.getPlan = projects.getPlan.bind(projects);
|
|
11731
|
+
target.updateProject = projects.updateProject.bind(projects);
|
|
11732
|
+
target.updatePlan = projects.updatePlan.bind(projects);
|
|
11365
11733
|
}
|
|
11366
11734
|
|
|
11367
11735
|
// src/client/bindings/events.ts
|
|
@@ -11522,12 +11890,14 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
|
|
|
11522
11890
|
target.getInboxEmail = inboxes.getInboxEmail.bind(inboxes);
|
|
11523
11891
|
target.markEmailAsRead = inboxes.markEmailAsRead.bind(inboxes);
|
|
11524
11892
|
target.markEmailAsUnread = inboxes.markEmailAsUnread.bind(inboxes);
|
|
11893
|
+
target.addEmailSenderAsMember = inboxes.addEmailSenderAsMember.bind(inboxes);
|
|
11525
11894
|
target.convertEmail = inboxes.convertEmail.bind(inboxes);
|
|
11526
11895
|
target.downloadEmailAttachment = inboxes.downloadEmailAttachment.bind(inboxes);
|
|
11527
11896
|
target.getInboxThreads = inboxes.getInboxThreads.bind(inboxes);
|
|
11528
11897
|
target.getThreadEmails = inboxes.getThreadEmails.bind(inboxes);
|
|
11529
11898
|
target.getChatEmails = inboxes.getChatEmails.bind(inboxes);
|
|
11530
11899
|
target.replyToEmail = inboxes.replyToEmail.bind(inboxes);
|
|
11900
|
+
target.sendInboxEmail = inboxes.sendInboxEmail.bind(inboxes);
|
|
11531
11901
|
target.getNotificationRules = notificationRules.getNotificationRules.bind(notificationRules);
|
|
11532
11902
|
target.createNotificationRule = notificationRules.createNotificationRule.bind(notificationRules);
|
|
11533
11903
|
target.updateNotificationRule = notificationRules.updateNotificationRule.bind(notificationRules);
|
|
@@ -11591,6 +11961,12 @@ function bindBillingMethods(target, apiKeys, subscriptions, reports) {
|
|
|
11591
11961
|
target.addWorkspaceToSubscription = subscriptions.addWorkspaceToSubscription.bind(subscriptions);
|
|
11592
11962
|
target.purchaseCredits = subscriptions.purchaseCredits.bind(subscriptions);
|
|
11593
11963
|
target.createCheckoutSession = subscriptions.createCheckoutSession.bind(subscriptions);
|
|
11964
|
+
target.createMemberCheckoutSession = subscriptions.createMemberCheckoutSession.bind(subscriptions);
|
|
11965
|
+
target.createMemberPortalSession = subscriptions.createMemberPortalSession.bind(subscriptions);
|
|
11966
|
+
target.getMemberSubscriptionStatus = subscriptions.getMemberSubscriptionStatus.bind(subscriptions);
|
|
11967
|
+
target.createDeviceOrderCheckoutSession = subscriptions.createDeviceOrderCheckoutSession.bind(subscriptions);
|
|
11968
|
+
target.listDeviceOrders = subscriptions.listDeviceOrders.bind(subscriptions);
|
|
11969
|
+
target.getCheckoutAttemptStatus = subscriptions.getCheckoutAttemptStatus.bind(subscriptions);
|
|
11594
11970
|
target.listSelfServeProducts = subscriptions.listSelfServeProducts.bind(subscriptions);
|
|
11595
11971
|
target.getAIUsageReport = reports.getAIUsageReport.bind(reports);
|
|
11596
11972
|
target.getSMSUsageReport = reports.getSMSUsageReport.bind(reports);
|
|
@@ -11768,6 +12144,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
11768
12144
|
target.getLinkedSalesforceMembers = salesforce.getLinkedSalesforceMembers.bind(salesforce);
|
|
11769
12145
|
target.getSalesforceSyncConfig = salesforce.getSalesforceSyncConfig.bind(salesforce);
|
|
11770
12146
|
target.updateSalesforceSyncConfig = salesforce.updateSalesforceSyncConfig.bind(salesforce);
|
|
12147
|
+
target.resyncSalesforceLinkedMembers = salesforce.resyncSalesforceLinkedMembers.bind(salesforce);
|
|
11771
12148
|
target.listSalesforceObjects = salesforce.listSalesforceObjects.bind(salesforce);
|
|
11772
12149
|
target.describeSalesforceObject = salesforce.describeSalesforceObject.bind(salesforce);
|
|
11773
12150
|
target.searchSalesforceRecords = salesforce.searchSalesforceRecords.bind(salesforce);
|
|
@@ -11839,6 +12216,7 @@ function bindOrgMethods(target, org) {
|
|
|
11839
12216
|
target.disableOrgDomainEmail = org.disableOrgDomainEmail.bind(org);
|
|
11840
12217
|
target.enableOrgDomainSite = org.enableOrgDomainSite.bind(org);
|
|
11841
12218
|
target.getOrgDomainSite = org.getOrgDomainSite.bind(org);
|
|
12219
|
+
target.preflightOrgDomainSite = org.preflightOrgDomainSite.bind(org);
|
|
11842
12220
|
target.verifyOrgDomainSite = org.verifyOrgDomainSite.bind(org);
|
|
11843
12221
|
target.disableOrgDomainSite = org.disableOrgDomainSite.bind(org);
|
|
11844
12222
|
target.getBusinessProfile = org.getBusinessProfile.bind(org);
|
|
@@ -11852,6 +12230,8 @@ function bindOrgMethods(target, org) {
|
|
|
11852
12230
|
target.syncVoiceTrustProducts = org.syncVoiceTrustProducts.bind(org);
|
|
11853
12231
|
target.createOrganizationWorkspace = org.createOrganizationWorkspace.bind(org);
|
|
11854
12232
|
target.getOrgBillingCustomer = org.getOrgBillingCustomer.bind(org);
|
|
12233
|
+
target.getA2PCampaignConfig = org.getA2PCampaignConfig.bind(org);
|
|
12234
|
+
target.updateA2PCampaignConfig = org.updateA2PCampaignConfig.bind(org);
|
|
11855
12235
|
target.getOrgWorkspaceUsage = org.getOrgWorkspaceUsage.bind(org);
|
|
11856
12236
|
}
|
|
11857
12237
|
|
|
@@ -12109,6 +12489,8 @@ var GravityRailClient = class {
|
|
|
12109
12489
|
getDataRecordChanges;
|
|
12110
12490
|
upsertDataRecord;
|
|
12111
12491
|
toggleFieldIndex;
|
|
12492
|
+
previewRenameFieldSlug;
|
|
12493
|
+
renameFieldSlug;
|
|
12112
12494
|
getFieldIndexStatus;
|
|
12113
12495
|
validateDataTypeSlug;
|
|
12114
12496
|
getMemberRecordCounts;
|
|
@@ -12120,6 +12502,12 @@ var GravityRailClient = class {
|
|
|
12120
12502
|
getDataRecordFilterCount;
|
|
12121
12503
|
// Members API
|
|
12122
12504
|
getCurrentMember;
|
|
12505
|
+
getMyDataTypes;
|
|
12506
|
+
getMyRecords;
|
|
12507
|
+
getMemberWorkflowVoices;
|
|
12508
|
+
previewMemberWorkflowVoice;
|
|
12509
|
+
setMemberWorkflowVoice;
|
|
12510
|
+
clearMemberWorkflowVoice;
|
|
12123
12511
|
getOwnedMembers;
|
|
12124
12512
|
switchMember;
|
|
12125
12513
|
clearMemberSwitch;
|
|
@@ -12354,11 +12742,13 @@ var GravityRailClient = class {
|
|
|
12354
12742
|
getWorkspaceProduct;
|
|
12355
12743
|
getPublicProducts;
|
|
12356
12744
|
previewPromoCode;
|
|
12745
|
+
startPromoPlanTrial;
|
|
12357
12746
|
getPublicProduct;
|
|
12358
12747
|
createProduct;
|
|
12359
12748
|
updateProduct;
|
|
12360
12749
|
deleteProduct;
|
|
12361
12750
|
exportWorkspace;
|
|
12751
|
+
exportWorkspaceZip;
|
|
12362
12752
|
previewWorkspaceImport;
|
|
12363
12753
|
importWorkspace;
|
|
12364
12754
|
previewImportWorkspace;
|
|
@@ -12385,6 +12775,7 @@ var GravityRailClient = class {
|
|
|
12385
12775
|
disableOrgDomainEmail;
|
|
12386
12776
|
enableOrgDomainSite;
|
|
12387
12777
|
getOrgDomainSite;
|
|
12778
|
+
preflightOrgDomainSite;
|
|
12388
12779
|
verifyOrgDomainSite;
|
|
12389
12780
|
disableOrgDomainSite;
|
|
12390
12781
|
getBusinessProfile;
|
|
@@ -12398,6 +12789,8 @@ var GravityRailClient = class {
|
|
|
12398
12789
|
syncVoiceTrustProducts;
|
|
12399
12790
|
createOrganizationWorkspace;
|
|
12400
12791
|
getOrgBillingCustomer;
|
|
12792
|
+
getA2PCampaignConfig;
|
|
12793
|
+
updateA2PCampaignConfig;
|
|
12401
12794
|
getOrgWorkspaceUsage;
|
|
12402
12795
|
getVapidPublicKey;
|
|
12403
12796
|
registerPushSubscription;
|
|
@@ -12521,6 +12914,8 @@ var GravityRailClient = class {
|
|
|
12521
12914
|
getProjects;
|
|
12522
12915
|
getProject;
|
|
12523
12916
|
getPlan;
|
|
12917
|
+
updateProject;
|
|
12918
|
+
updatePlan;
|
|
12524
12919
|
resolveFilePath;
|
|
12525
12920
|
downloadFilesZip;
|
|
12526
12921
|
createFile;
|
|
@@ -12691,12 +13086,14 @@ var GravityRailClient = class {
|
|
|
12691
13086
|
getInboxEmail;
|
|
12692
13087
|
markEmailAsRead;
|
|
12693
13088
|
markEmailAsUnread;
|
|
13089
|
+
addEmailSenderAsMember;
|
|
12694
13090
|
convertEmail;
|
|
12695
13091
|
downloadEmailAttachment;
|
|
12696
13092
|
getInboxThreads;
|
|
12697
13093
|
getThreadEmails;
|
|
12698
13094
|
getChatEmails;
|
|
12699
13095
|
replyToEmail;
|
|
13096
|
+
sendInboxEmail;
|
|
12700
13097
|
getNotificationRules;
|
|
12701
13098
|
createNotificationRule;
|
|
12702
13099
|
updateNotificationRule;
|
|
@@ -12739,6 +13136,13 @@ var GravityRailClient = class {
|
|
|
12739
13136
|
getFeatureRegistry;
|
|
12740
13137
|
getPublicFeatureRegistry;
|
|
12741
13138
|
getFeatureBySlug;
|
|
13139
|
+
// Devices API
|
|
13140
|
+
getDevices;
|
|
13141
|
+
getDevice;
|
|
13142
|
+
getDeviceKinds;
|
|
13143
|
+
claimDevicePairing;
|
|
13144
|
+
updateDevice;
|
|
13145
|
+
revokeDevice;
|
|
12742
13146
|
// Billing API
|
|
12743
13147
|
getApiKeys;
|
|
12744
13148
|
createApiKey;
|
|
@@ -12754,6 +13158,12 @@ var GravityRailClient = class {
|
|
|
12754
13158
|
addWorkspaceToSubscription;
|
|
12755
13159
|
purchaseCredits;
|
|
12756
13160
|
createCheckoutSession;
|
|
13161
|
+
createMemberCheckoutSession;
|
|
13162
|
+
createMemberPortalSession;
|
|
13163
|
+
getMemberSubscriptionStatus;
|
|
13164
|
+
createDeviceOrderCheckoutSession;
|
|
13165
|
+
listDeviceOrders;
|
|
13166
|
+
getCheckoutAttemptStatus;
|
|
12757
13167
|
listSelfServeProducts;
|
|
12758
13168
|
getAIUsageReport;
|
|
12759
13169
|
getSMSUsageReport;
|
|
@@ -12933,6 +13343,7 @@ var GravityRailClient = class {
|
|
|
12933
13343
|
getLinkedSalesforceMembers;
|
|
12934
13344
|
getSalesforceSyncConfig;
|
|
12935
13345
|
updateSalesforceSyncConfig;
|
|
13346
|
+
resyncSalesforceLinkedMembers;
|
|
12936
13347
|
listSalesforceObjects;
|
|
12937
13348
|
describeSalesforceObject;
|
|
12938
13349
|
searchSalesforceRecords;
|
|
@@ -13035,6 +13446,7 @@ var GravityRailClient = class {
|
|
|
13035
13446
|
bindChatsMethods(this, apis.chats);
|
|
13036
13447
|
bindCallsMethods(this, apis.calls, apis.cel);
|
|
13037
13448
|
bindDataTypesMethods(this, apis.dataTypes);
|
|
13449
|
+
bindDevicesMethods(this, apis.devices);
|
|
13038
13450
|
bindMembersMethods(this, apis.members);
|
|
13039
13451
|
bindAgentTasksMethods(this, apis.agentTasks);
|
|
13040
13452
|
bindAgentsMethods(this, apis.agents);
|
|
@@ -13353,6 +13765,7 @@ var RoutineBuilder = class extends WorkspaceBuilderResource {
|
|
|
13353
13765
|
return `Routine: ${this.name} (${parts.join(", ")})`;
|
|
13354
13766
|
}
|
|
13355
13767
|
async apply(client) {
|
|
13768
|
+
if (this._existed) return;
|
|
13356
13769
|
const eventRules = this.rules.map((rule) => {
|
|
13357
13770
|
const actionParams = { ...rule.actionParams };
|
|
13358
13771
|
if (rule.workflow?._id !== void 0) actionParams.workflowId = rule.workflow._id;
|
|
@@ -13408,6 +13821,7 @@ var NotificationRuleBuilder = class extends WorkspaceBuilderResource {
|
|
|
13408
13821
|
return `NotificationRule: ${this.name}${parts.length ? ` (${parts.join(", ")})` : ""}`;
|
|
13409
13822
|
}
|
|
13410
13823
|
async apply(client) {
|
|
13824
|
+
if (this._existed) return;
|
|
13411
13825
|
if (this.memberId === void 0) {
|
|
13412
13826
|
throw new Error(`Notification rule '${this.name}' requires memberId`);
|
|
13413
13827
|
}
|
|
@@ -13942,6 +14356,7 @@ var RoleUpdate = class extends WorkspaceBuilderResource {
|
|
|
13942
14356
|
return `RoleUpdate: roleId=${this.roleId}${parts.length ? ` (${parts.join(", ")})` : ""}`;
|
|
13943
14357
|
}
|
|
13944
14358
|
async apply(client) {
|
|
14359
|
+
if (this._existed) return;
|
|
13945
14360
|
const payload = {};
|
|
13946
14361
|
if (this.workflowIds) payload.workflowIds = this.workflowIds;
|
|
13947
14362
|
if (this.dataTypeIds) payload.dataTypeIds = this.dataTypeIds;
|
|
@@ -14171,6 +14586,7 @@ var AgentBuilder = class extends WorkspaceBuilderResource {
|
|
|
14171
14586
|
return `Agent: ${this.name}${parts.length ? ` (${parts.join(", ")})` : ""}`;
|
|
14172
14587
|
}
|
|
14173
14588
|
async apply(client) {
|
|
14589
|
+
if (this._existed) return;
|
|
14174
14590
|
if (this.memberRoleId === void 0) {
|
|
14175
14591
|
throw new Error(`Agent '${this.name}' requires memberRoleId`);
|
|
14176
14592
|
}
|
|
@@ -14206,6 +14622,25 @@ var PHASES = /* @__PURE__ */ new Map([
|
|
|
14206
14622
|
[JourneyBuilder, 7],
|
|
14207
14623
|
[JourneyStepBuilder, 8]
|
|
14208
14624
|
]);
|
|
14625
|
+
var LIST_PAGE_SIZE = 100;
|
|
14626
|
+
async function collectPages(fetchPage) {
|
|
14627
|
+
const first = await fetchPage(1);
|
|
14628
|
+
const all = [...first.items];
|
|
14629
|
+
const totalPages = first.totalPages ?? 1;
|
|
14630
|
+
for (let page = 2; page <= totalPages; page++) {
|
|
14631
|
+
const next = await fetchPage(page);
|
|
14632
|
+
if (!next.items.length) break;
|
|
14633
|
+
all.push(...next.items);
|
|
14634
|
+
}
|
|
14635
|
+
return all;
|
|
14636
|
+
}
|
|
14637
|
+
function sameIdSet(left, right) {
|
|
14638
|
+
const target = new Set(right);
|
|
14639
|
+
return target.size === new Set(left).size && left.every((id) => target.has(id));
|
|
14640
|
+
}
|
|
14641
|
+
function notificationRuleKey(noticeType, memberId, workflowId) {
|
|
14642
|
+
return JSON.stringify([noticeType, memberId, workflowId]);
|
|
14643
|
+
}
|
|
14209
14644
|
function phaseFor(resource) {
|
|
14210
14645
|
let ctor = resource.constructor;
|
|
14211
14646
|
while (ctor) {
|
|
@@ -14468,6 +14903,103 @@ Done! Created ${count} resources.`);
|
|
|
14468
14903
|
journeyNames.get(existing.name).adopt(detail);
|
|
14469
14904
|
}
|
|
14470
14905
|
}
|
|
14906
|
+
const agentNames = new Map(
|
|
14907
|
+
resources.filter((resource) => resource instanceof AgentBuilder).map((resource) => [resource.name, resource])
|
|
14908
|
+
);
|
|
14909
|
+
if (agentNames.size) {
|
|
14910
|
+
for (const existing of await collectPages(
|
|
14911
|
+
(page) => this.client.getAgents({ page, pageSize: LIST_PAGE_SIZE })
|
|
14912
|
+
)) {
|
|
14913
|
+
if (existing.name && agentNames.has(existing.name)) {
|
|
14914
|
+
agentNames.get(existing.name).adopt(existing);
|
|
14915
|
+
}
|
|
14916
|
+
}
|
|
14917
|
+
}
|
|
14918
|
+
const routineNames = new Map(
|
|
14919
|
+
resources.filter((resource) => resource instanceof RoutineBuilder).map((resource) => [resource.name, resource])
|
|
14920
|
+
);
|
|
14921
|
+
if (routineNames.size) {
|
|
14922
|
+
for (const existing of await collectPages(
|
|
14923
|
+
(page) => this.client.getRoutines({ page, pageSize: LIST_PAGE_SIZE })
|
|
14924
|
+
)) {
|
|
14925
|
+
if (existing.name && routineNames.has(existing.name)) {
|
|
14926
|
+
routineNames.get(existing.name).adopt(existing);
|
|
14927
|
+
}
|
|
14928
|
+
}
|
|
14929
|
+
}
|
|
14930
|
+
await this.resolveExistingRoleUpdates(resources);
|
|
14931
|
+
await this.resolveExistingWorkflows(resources, workflowNames);
|
|
14932
|
+
await this.resolveExistingNotificationRules(resources);
|
|
14933
|
+
}
|
|
14934
|
+
/**
|
|
14935
|
+
* Adopt a role update whose grants the server already has.
|
|
14936
|
+
*
|
|
14937
|
+
* A role update is a replace-semantics PUT, not a create, so its identity is
|
|
14938
|
+
* the role id and "already applied" means the id sets match exactly. Subset
|
|
14939
|
+
* would be wrong: `roleUpdate(7, [])` asks to *clear* the role's workflow
|
|
14940
|
+
* access, and treating that as satisfied by a role that still has grants
|
|
14941
|
+
* would silently skip a real change.
|
|
14942
|
+
*
|
|
14943
|
+
* Only the fields this update declares are compared — an update that passes
|
|
14944
|
+
* `workflowIds` and omits `dataTypeIds` never touches data-type access, so
|
|
14945
|
+
* that access cannot make it stale.
|
|
14946
|
+
*/
|
|
14947
|
+
async resolveExistingRoleUpdates(resources) {
|
|
14948
|
+
const updates = resources.filter(
|
|
14949
|
+
(resource) => resource instanceof RoleUpdate
|
|
14950
|
+
);
|
|
14951
|
+
if (!updates.length) return;
|
|
14952
|
+
const rolesById = new Map(
|
|
14953
|
+
(await this.client.getMemberRoles()).map((role) => [role.id, role])
|
|
14954
|
+
);
|
|
14955
|
+
for (const update of updates) {
|
|
14956
|
+
const role = rolesById.get(update.roleId);
|
|
14957
|
+
if (!role) continue;
|
|
14958
|
+
const workflowsSettled = update.workflowIds === void 0 || sameIdSet(
|
|
14959
|
+
update.workflowIds,
|
|
14960
|
+
(role.workflowAccess ?? []).map((access) => access.workflowId)
|
|
14961
|
+
);
|
|
14962
|
+
const dataTypesSettled = update.dataTypeIds === void 0 || sameIdSet(
|
|
14963
|
+
update.dataTypeIds,
|
|
14964
|
+
(role.dataTypeAccess ?? []).map((access) => access.dataTypeId)
|
|
14965
|
+
);
|
|
14966
|
+
if (workflowsSettled && dataTypesSettled) update.adopt(role);
|
|
14967
|
+
}
|
|
14968
|
+
}
|
|
14969
|
+
/**
|
|
14970
|
+
* Adopt notification rules the server already has.
|
|
14971
|
+
*
|
|
14972
|
+
* There is no name on the server row — `NotificationRule` is keyed by what
|
|
14973
|
+
* it does — so identity is the composite the API enforces uniqueness on in
|
|
14974
|
+
* practice: notice type, recipient, and subject workflow.
|
|
14975
|
+
*/
|
|
14976
|
+
async resolveExistingNotificationRules(resources) {
|
|
14977
|
+
const rules = resources.filter(
|
|
14978
|
+
(resource) => resource instanceof NotificationRuleBuilder
|
|
14979
|
+
);
|
|
14980
|
+
if (!rules.length) return;
|
|
14981
|
+
const identified = rules.flatMap((rule) => {
|
|
14982
|
+
if (rule.memberId === void 0) return [];
|
|
14983
|
+
if (rule.workflow && rule.workflow._id === void 0) return [];
|
|
14984
|
+
return [
|
|
14985
|
+
[
|
|
14986
|
+
notificationRuleKey(rule.noticeType, rule.memberId, rule.workflow?._id ?? null),
|
|
14987
|
+
rule
|
|
14988
|
+
]
|
|
14989
|
+
];
|
|
14990
|
+
});
|
|
14991
|
+
if (!identified.length) return;
|
|
14992
|
+
const byKey = new Map(identified);
|
|
14993
|
+
for (const existing of await this.client.getNotificationRules()) {
|
|
14994
|
+
const key = notificationRuleKey(
|
|
14995
|
+
existing.noticeType,
|
|
14996
|
+
existing.memberId,
|
|
14997
|
+
existing.workflowId ?? null
|
|
14998
|
+
);
|
|
14999
|
+
byKey.get(key)?.adopt(existing);
|
|
15000
|
+
}
|
|
15001
|
+
}
|
|
15002
|
+
async resolveExistingWorkflows(resources, workflowNames) {
|
|
14471
15003
|
if (!workflowNames.size) return;
|
|
14472
15004
|
const existingWorkflows = await this.client.getWorkflows();
|
|
14473
15005
|
for (const { workflow: existing } of existingWorkflows.items) {
|
|
@@ -14913,6 +15445,7 @@ var AbilityTypeSlugs = {
|
|
|
14913
15445
|
SEND_WHATSAPP: "communication:send_whatsapp",
|
|
14914
15446
|
MEMBER_ACCESS: "communication:member_access",
|
|
14915
15447
|
AUDIO_PLAYBACK: "communication:audio_playback",
|
|
15448
|
+
IMAGE_DISPLAY: "communication:image_display",
|
|
14916
15449
|
// Oversight
|
|
14917
15450
|
SUPERVISOR: "oversight:supervisor",
|
|
14918
15451
|
SUPERVISOR_ACTIONS: "oversight:supervisor_actions",
|
|
@@ -14921,6 +15454,7 @@ var AbilityTypeSlugs = {
|
|
|
14921
15454
|
MEMBER_FIELD_VERIFICATION: "identity:member_field_verification",
|
|
14922
15455
|
// Delegation
|
|
14923
15456
|
CONTRIBUTOR: "delegation:contributor",
|
|
15457
|
+
MANAGE_WORKSPACE: "delegation:manage_workspace",
|
|
14924
15458
|
// Workflow
|
|
14925
15459
|
WORKFLOW_RUN: "workflow:run",
|
|
14926
15460
|
// Commerce
|
|
@@ -15248,7 +15782,7 @@ function isChatType(value) {
|
|
|
15248
15782
|
|
|
15249
15783
|
// src/constants/models.ts
|
|
15250
15784
|
var DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
|
|
15251
|
-
var DEFAULT_VOICE_INFERENCE_MODEL = "
|
|
15785
|
+
var DEFAULT_VOICE_INFERENCE_MODEL = "openai:chat:gpt-5.6-luna";
|
|
15252
15786
|
var DEFAULT_CUSTOM_VOICE_MODEL = "elevenlabs:voice:river";
|
|
15253
15787
|
|
|
15254
15788
|
// src/types/resource-metadata.ts
|
|
@@ -15352,6 +15886,7 @@ var ScopeCategory = /* @__PURE__ */ ((ScopeCategory2) => {
|
|
|
15352
15886
|
ScopeCategory2["DATATYPES"] = "datatypes";
|
|
15353
15887
|
ScopeCategory2["RECORDS"] = "records";
|
|
15354
15888
|
ScopeCategory2["FILES"] = "files";
|
|
15889
|
+
ScopeCategory2["DEVICES"] = "devices";
|
|
15355
15890
|
ScopeCategory2["JOURNEYS"] = "journeys";
|
|
15356
15891
|
ScopeCategory2["EXPERIMENTS"] = "experiments";
|
|
15357
15892
|
ScopeCategory2["SITES"] = "sites";
|
|
@@ -15596,6 +16131,26 @@ var SCOPES = {
|
|
|
15596
16131
|
implies: ["files:write"]
|
|
15597
16132
|
},
|
|
15598
16133
|
// =========================================================================
|
|
16134
|
+
// DEVICES
|
|
16135
|
+
// =========================================================================
|
|
16136
|
+
"devices:read": {
|
|
16137
|
+
name: "devices:read",
|
|
16138
|
+
category: "devices" /* DEVICES */,
|
|
16139
|
+
description: "View companion devices"
|
|
16140
|
+
},
|
|
16141
|
+
"devices:write": {
|
|
16142
|
+
name: "devices:write",
|
|
16143
|
+
category: "devices" /* DEVICES */,
|
|
16144
|
+
description: "Enrol and manage own companion devices",
|
|
16145
|
+
implies: ["devices:read"]
|
|
16146
|
+
},
|
|
16147
|
+
"devices:admin": {
|
|
16148
|
+
name: "devices:admin",
|
|
16149
|
+
category: "devices" /* DEVICES */,
|
|
16150
|
+
description: "List and revoke any companion device",
|
|
16151
|
+
implies: ["devices:write"]
|
|
16152
|
+
},
|
|
16153
|
+
// =========================================================================
|
|
15599
16154
|
// JOURNEYS
|
|
15600
16155
|
// =========================================================================
|
|
15601
16156
|
"journeys:read": {
|
|
@@ -16090,7 +16645,6 @@ function getRevisionState(workflow, revision) {
|
|
|
16090
16645
|
REALTIME_MODEL_CUSTOM,
|
|
16091
16646
|
REALTIME_MODEL_GEMINI,
|
|
16092
16647
|
REALTIME_MODEL_GEMINI_VERTEX,
|
|
16093
|
-
REALTIME_MODEL_NOVA_SONIC,
|
|
16094
16648
|
REALTIME_MODEL_OPENAI,
|
|
16095
16649
|
REALTIME_MODEL_OPENAI_2,
|
|
16096
16650
|
REALTIME_MODEL_OPENAI_MINI,
|