@gravity-rail/sdk 3.2.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/dist/{chat-interaction-Cc9hQNyx.d.ts → chat-interaction-DXgKjFqZ.d.cts} +490 -522
- package/dist/{chat-interaction-CoHsIqyX.d.cts → chat-interaction-a7U-tHfQ.d.ts} +490 -522
- package/dist/{chunk-MAPAZORN.js → chunk-WHRIIBJ4.js} +181 -144
- package/dist/chunk-WHRIIBJ4.js.map +1 -0
- package/dist/{chunk-RLFS7O2L.js → chunk-ZLF3N3ZD.js} +183 -81
- package/dist/chunk-ZLF3N3ZD.js.map +1 -0
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/helpers.js +1 -1
- package/dist/index.cjs +339 -220
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +367 -224
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +45 -9
- package/dist/internal.d.ts +45 -9
- package/dist/internal.js +14 -6
- package/dist/internal.js.map +1 -1
- package/dist/{member-import-9h52_4KO.d.cts → member-import-BHtOru8g.d.cts} +1 -1
- package/dist/{member-import-BWyl88Qx.d.ts → member-import-VOLKR5dY.d.ts} +1 -1
- package/dist/{path-ChuuGGLG.d.ts → path-B3b3_El9.d.cts} +36 -18
- package/dist/{path-CXnjBalr.d.cts → path-CUY-Iw70.d.ts} +36 -18
- package/dist/schemas.cjs +2 -4
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +5 -6
- package/dist/schemas.d.ts +5 -6
- package/dist/schemas.js +2 -4
- package/dist/schemas.js.map +1 -1
- package/dist/{tasks-B7tIHQcS.d.cts → tasks-CgptqCsN.d.cts} +13 -45
- package/dist/{tasks-B7tIHQcS.d.ts → tasks-CgptqCsN.d.ts} +13 -45
- package/package.json +3 -3
- package/dist/chunk-MAPAZORN.js.map +0 -1
- package/dist/chunk-RLFS7O2L.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApiError,
|
|
3
3
|
BaseApiClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZLF3N3ZD.js";
|
|
5
5
|
|
|
6
6
|
// src/api/abilities.ts
|
|
7
7
|
var AbilitiesApi = class extends BaseApiClient {
|
|
@@ -721,6 +721,21 @@ var ApiKeysApi = class extends BaseApiClient {
|
|
|
721
721
|
}
|
|
722
722
|
};
|
|
723
723
|
|
|
724
|
+
// src/api/app-links.ts
|
|
725
|
+
var AppLinksApi = class extends BaseApiClient {
|
|
726
|
+
/**
|
|
727
|
+
* Resolve an App Link to the concrete chat it opens.
|
|
728
|
+
*
|
|
729
|
+
* `linkParams` is the `?with=&mode=&action=&channel=` suffix built from the
|
|
730
|
+
* link's search params (an empty string when the link carries none). The
|
|
731
|
+
* resolver re-runs the current session's workspace authorization; the
|
|
732
|
+
* response is ids and closed-vocabulary enums only, never PHI.
|
|
733
|
+
*/
|
|
734
|
+
async resolveAppLink(wid, linkParams = "") {
|
|
735
|
+
return this.fetch(`w/${wid}/app-links/resolve${linkParams}`);
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
|
|
724
739
|
// src/api/apps.ts
|
|
725
740
|
var AppsApi = class extends BaseApiClient {
|
|
726
741
|
/**
|
|
@@ -3001,13 +3016,6 @@ var EventsApi = class extends BaseApiClient {
|
|
|
3001
3016
|
method: "DELETE"
|
|
3002
3017
|
});
|
|
3003
3018
|
}
|
|
3004
|
-
/** Send a one-off test webhook for an existing webhook event rule. */
|
|
3005
|
-
async testWebhook(wid, id, request) {
|
|
3006
|
-
return this.fetch(`w/${wid}/event-rules/${id}/test-webhook`, {
|
|
3007
|
-
method: "POST",
|
|
3008
|
-
body: JSON.stringify(request)
|
|
3009
|
-
});
|
|
3010
|
-
}
|
|
3011
3019
|
/** Reorder event rules by specifying the desired rule ID sequence. */
|
|
3012
3020
|
async reorderEventRules(wid, ruleIds) {
|
|
3013
3021
|
return this.fetch(`w/${wid}/event-rules/reorder`, {
|
|
@@ -3015,19 +3023,6 @@ var EventsApi = class extends BaseApiClient {
|
|
|
3015
3023
|
body: JSON.stringify(ruleIds)
|
|
3016
3024
|
});
|
|
3017
3025
|
}
|
|
3018
|
-
/** List webhook logs with optional filtering by event type and success status. */
|
|
3019
|
-
async getWebhookLogs(wid, options = {}) {
|
|
3020
|
-
const params = new URLSearchParams();
|
|
3021
|
-
if (options.page) params.append("page", options.page.toString());
|
|
3022
|
-
if (options.pageSize) params.append("pageSize", options.pageSize.toString());
|
|
3023
|
-
if (options.sortBy) params.append("sortBy", options.sortBy);
|
|
3024
|
-
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
3025
|
-
if (options.eventType) params.append("eventType", options.eventType);
|
|
3026
|
-
if (options.success !== void 0) params.append("success", options.success.toString());
|
|
3027
|
-
return this.fetch(
|
|
3028
|
-
`w/${wid}/webhook-logs${params.toString() ? `?${params.toString()}` : ""}`
|
|
3029
|
-
);
|
|
3030
|
-
}
|
|
3031
3026
|
/** List event rule executions with cursor-based pagination and filtering. */
|
|
3032
3027
|
async getRuleExecutions(wid, options = {}) {
|
|
3033
3028
|
const params = new URLSearchParams();
|
|
@@ -5635,27 +5630,15 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5635
5630
|
method: "DELETE"
|
|
5636
5631
|
});
|
|
5637
5632
|
}
|
|
5638
|
-
/**
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
* `subscriptionId` is the org-scoped row — never pick the customer's
|
|
5642
|
-
* newest subscription from the list endpoint. One customer can bill many
|
|
5643
|
-
* organizations.
|
|
5644
|
-
*
|
|
5645
|
-
* Returns the generated `OrgBillingCustomerResponse` — the contract the
|
|
5646
|
-
* route actually emits, `audiences` included. The hand-written mirror that
|
|
5647
|
-
* used to live here listed four fields and silently dropped `audiences`,
|
|
5648
|
-
* so callers could not see the commercial roles they hold (GRA-8792).
|
|
5649
|
-
* Regenerate the shape (`yarn generate:types`) rather than re-declaring it.
|
|
5650
|
-
*/
|
|
5651
|
-
async getOrgBillingCustomer(orgIdOrUuid) {
|
|
5652
|
-
return this.fetch(`o/${orgIdOrUuid}/billing-customer`);
|
|
5633
|
+
/** Current Organization billing access and billable subscription. */
|
|
5634
|
+
async getOrgBillingAccess(orgIdOrUuid) {
|
|
5635
|
+
return this.fetch(`o/${orgIdOrUuid}/billing-access`);
|
|
5653
5636
|
}
|
|
5654
5637
|
/**
|
|
5655
5638
|
* Per-workspace usage for this organization's current credit window.
|
|
5656
5639
|
*
|
|
5657
|
-
* Requires
|
|
5658
|
-
* same gate `
|
|
5640
|
+
* Requires Organization billing access, the
|
|
5641
|
+
* same gate `getOrgBillingAccess().hasAccess` reports, and the one that
|
|
5659
5642
|
* decides whether the billing tab is shown at all.
|
|
5660
5643
|
*
|
|
5661
5644
|
* `creditsUsed` is a real organization-wide total or it is null; it is
|
|
@@ -5698,6 +5681,12 @@ var OrgApi = class extends BaseApiClient {
|
|
|
5698
5681
|
body: JSON.stringify(data)
|
|
5699
5682
|
});
|
|
5700
5683
|
}
|
|
5684
|
+
async setOrganizationMemberBillingRole(orgUuid, memberId, billingRole) {
|
|
5685
|
+
return this.fetch(`o/${orgUuid}/members/${memberId}/billing-role`, {
|
|
5686
|
+
method: "PUT",
|
|
5687
|
+
body: JSON.stringify({ billingRole })
|
|
5688
|
+
});
|
|
5689
|
+
}
|
|
5701
5690
|
/**
|
|
5702
5691
|
* Remove a member from an organization.
|
|
5703
5692
|
*/
|
|
@@ -8056,6 +8045,24 @@ var ConnectionSyncApi = class extends BaseApiClient {
|
|
|
8056
8045
|
|
|
8057
8046
|
// src/api/hubspot.ts
|
|
8058
8047
|
var HubspotApi = class extends BaseApiClient {
|
|
8048
|
+
async bindHubspotCalendar(wid, calendarId, linkId) {
|
|
8049
|
+
return this.fetch(`w/${wid}/app-connections/hubspot/calendars/${calendarId}/binding`, {
|
|
8050
|
+
method: "PUT",
|
|
8051
|
+
body: JSON.stringify({ linkId })
|
|
8052
|
+
});
|
|
8053
|
+
}
|
|
8054
|
+
async unlinkHubspotCalendar(wid, calendarId) {
|
|
8055
|
+
return this.fetch(`w/${wid}/app-connections/hubspot/calendars/${calendarId}/binding`, {
|
|
8056
|
+
method: "DELETE"
|
|
8057
|
+
});
|
|
8058
|
+
}
|
|
8059
|
+
/** Import one page into native CalendarEvents. Does not book or send invitations. */
|
|
8060
|
+
async importHubspotCalendarEvents(wid, calendarId, eventTypeId) {
|
|
8061
|
+
return this.fetch(`w/${wid}/app-connections/hubspot/calendars/${calendarId}/events/sync`, {
|
|
8062
|
+
method: "POST",
|
|
8063
|
+
body: JSON.stringify({ eventTypeId })
|
|
8064
|
+
});
|
|
8065
|
+
}
|
|
8059
8066
|
async getHubspotBookingReceipt(wid, meetingId) {
|
|
8060
8067
|
return this.fetch(
|
|
8061
8068
|
`w/${wid}/app-connections/hubspot/booking-deals/${encodeURIComponent(meetingId)}/receipt`
|
|
@@ -8872,18 +8879,32 @@ var SupportRequestsApi = class extends BaseApiClient {
|
|
|
8872
8879
|
}
|
|
8873
8880
|
};
|
|
8874
8881
|
|
|
8875
|
-
// src/api/
|
|
8876
|
-
var
|
|
8877
|
-
async
|
|
8878
|
-
return this.fetch(
|
|
8882
|
+
// src/api/organization-billing.ts
|
|
8883
|
+
var OrganizationBillingApi = class extends BaseApiClient {
|
|
8884
|
+
async getOrganizationSubscription(orgUuid) {
|
|
8885
|
+
return this.fetch(`o/${orgUuid}/billing/subscription`);
|
|
8886
|
+
}
|
|
8887
|
+
async updateOrganizationCreditSettings(orgUuid, updates) {
|
|
8888
|
+
return this.fetch(`o/${orgUuid}/billing/subscription`, {
|
|
8889
|
+
method: "PUT",
|
|
8890
|
+
body: JSON.stringify(updates),
|
|
8891
|
+
headers: { "Content-Type": "application/json" }
|
|
8892
|
+
});
|
|
8893
|
+
}
|
|
8894
|
+
async purchaseOrganizationCredits(orgUuid, amountCents, idempotencyKey = crypto.randomUUID()) {
|
|
8895
|
+
return this.fetch(`o/${orgUuid}/billing/subscription/purchase-credits`, {
|
|
8896
|
+
method: "POST",
|
|
8897
|
+
body: JSON.stringify({ amountCents }),
|
|
8898
|
+
headers: { "Content-Type": "application/json", "Idempotency-Key": idempotencyKey }
|
|
8899
|
+
});
|
|
8879
8900
|
}
|
|
8880
|
-
async
|
|
8881
|
-
return this.fetch(
|
|
8901
|
+
async getBillingOrganizations() {
|
|
8902
|
+
return this.fetch("o/billing-organizations");
|
|
8882
8903
|
}
|
|
8883
|
-
async
|
|
8884
|
-
return this.fetch(`
|
|
8904
|
+
async getOrganizationBilling(uuid) {
|
|
8905
|
+
return this.fetch(`o/${uuid}/billing`);
|
|
8885
8906
|
}
|
|
8886
|
-
async
|
|
8907
|
+
async getOrganizationBillingSubscriptions(uuid, opts) {
|
|
8887
8908
|
const params = new URLSearchParams();
|
|
8888
8909
|
if (opts?.status) params.set("status", opts.status);
|
|
8889
8910
|
if (opts?.page !== void 0) params.set("page", String(opts.page));
|
|
@@ -8892,50 +8913,53 @@ var CustomersApi = class extends BaseApiClient {
|
|
|
8892
8913
|
params.set("subscription_id", String(opts.subscriptionId));
|
|
8893
8914
|
}
|
|
8894
8915
|
const qs = params.toString();
|
|
8895
|
-
return this.fetch(`
|
|
8916
|
+
return this.fetch(`o/${uuid}/billing/subscriptions${qs ? "?" + qs : ""}`);
|
|
8896
8917
|
}
|
|
8897
|
-
async
|
|
8898
|
-
return this.fetch(`
|
|
8918
|
+
async getOrganizationInvoices(uuid) {
|
|
8919
|
+
return this.fetch(`o/${uuid}/billing/invoices`);
|
|
8899
8920
|
}
|
|
8900
|
-
async
|
|
8901
|
-
return this.fetch(`
|
|
8921
|
+
async createOrganizationPortalSession(uuid, returnUrl) {
|
|
8922
|
+
return this.fetch(`o/${uuid}/billing/stripe/portal-session`, {
|
|
8902
8923
|
method: "POST",
|
|
8903
8924
|
body: JSON.stringify({ returnUrl }),
|
|
8904
8925
|
headers: { "Content-Type": "application/json" }
|
|
8905
8926
|
});
|
|
8906
8927
|
}
|
|
8907
|
-
async
|
|
8908
|
-
return this.fetch(`
|
|
8928
|
+
async updateOrganizationBilling(uuid, data) {
|
|
8929
|
+
return this.fetch(`o/${uuid}/billing`, {
|
|
8909
8930
|
method: "PUT",
|
|
8910
8931
|
body: JSON.stringify(data),
|
|
8911
8932
|
headers: { "Content-Type": "application/json" }
|
|
8912
8933
|
});
|
|
8913
8934
|
}
|
|
8914
8935
|
// ===== Payment Methods =====
|
|
8915
|
-
async
|
|
8916
|
-
return this.fetch(`
|
|
8936
|
+
async createOrganizationSetupIntent(uuid) {
|
|
8937
|
+
return this.fetch(`o/${uuid}/billing/stripe/setup-intent`, {
|
|
8938
|
+
method: "POST",
|
|
8939
|
+
body: JSON.stringify({})
|
|
8940
|
+
});
|
|
8917
8941
|
}
|
|
8918
|
-
async
|
|
8919
|
-
return this.fetch(`
|
|
8942
|
+
async getOrganizationPaymentMethods(uuid) {
|
|
8943
|
+
return this.fetch(`o/${uuid}/billing/stripe/payment-methods`);
|
|
8920
8944
|
}
|
|
8921
|
-
async
|
|
8922
|
-
return this.fetch(`
|
|
8945
|
+
async attachOrganizationPaymentMethod(uuid, paymentMethodId, setAsDefault = false) {
|
|
8946
|
+
return this.fetch(`o/${uuid}/billing/stripe/payment-methods/${paymentMethodId}/attach`, {
|
|
8923
8947
|
method: "POST",
|
|
8924
8948
|
body: JSON.stringify({ setAsDefault }),
|
|
8925
8949
|
headers: { "Content-Type": "application/json" }
|
|
8926
8950
|
});
|
|
8927
8951
|
}
|
|
8928
|
-
async
|
|
8929
|
-
return this.fetch(`
|
|
8952
|
+
async detachOrganizationPaymentMethod(uuid, paymentMethodId) {
|
|
8953
|
+
return this.fetch(`o/${uuid}/billing/stripe/payment-methods/${paymentMethodId}`, {
|
|
8930
8954
|
method: "DELETE"
|
|
8931
8955
|
});
|
|
8932
8956
|
}
|
|
8933
|
-
async
|
|
8934
|
-
return this.fetch(`
|
|
8957
|
+
async setDefaultOrganizationPaymentMethod(uuid, paymentMethodId) {
|
|
8958
|
+
return this.fetch(`o/${uuid}/billing/stripe/payment-methods/${paymentMethodId}/set-default`, {
|
|
8935
8959
|
method: "PUT"
|
|
8936
8960
|
});
|
|
8937
8961
|
}
|
|
8938
|
-
async
|
|
8962
|
+
async getOrganizationCreditGrants(uuid, opts) {
|
|
8939
8963
|
const params = new URLSearchParams();
|
|
8940
8964
|
if (opts?.subscriptionId !== void 0) {
|
|
8941
8965
|
params.set("subscription_id", String(opts.subscriptionId));
|
|
@@ -8943,7 +8967,7 @@ var CustomersApi = class extends BaseApiClient {
|
|
|
8943
8967
|
if (opts?.page !== void 0) params.set("page", String(opts.page));
|
|
8944
8968
|
if (opts?.pageSize !== void 0) params.set("page_size", String(opts.pageSize));
|
|
8945
8969
|
const qs = params.toString();
|
|
8946
|
-
return this.fetch(`
|
|
8970
|
+
return this.fetch(`o/${uuid}/billing/credit-grants${qs ? "?" + qs : ""}`);
|
|
8947
8971
|
}
|
|
8948
8972
|
};
|
|
8949
8973
|
|
|
@@ -10304,7 +10328,6 @@ var EventRuleActionType = /* @__PURE__ */ ((EventRuleActionType2) => {
|
|
|
10304
10328
|
EventRuleActionType2["MEMBER_NOTIFY_ACTION"] = "member:notify";
|
|
10305
10329
|
EventRuleActionType2["MEMBER_LABEL_ACTION"] = "member:label";
|
|
10306
10330
|
EventRuleActionType2["MEMBER_UPSERT"] = "member:upsert";
|
|
10307
|
-
EventRuleActionType2["SEND_WEBHOOK"] = "webhook:send";
|
|
10308
10331
|
EventRuleActionType2["SWITCH_TASK_ACTION"] = "task:switch";
|
|
10309
10332
|
EventRuleActionType2["ASSISTANT_MESSAGE"] = "assistant:message";
|
|
10310
10333
|
EventRuleActionType2["FORM_FIELD_UPDATE"] = "form:update_field";
|
|
@@ -10530,6 +10553,14 @@ var TTS_MODEL_DEEPGRAM_AURA_2 = "deepgram:tts:aura-2";
|
|
|
10530
10553
|
var TTS_MODEL_AWS_POLLY_GENERATIVE = "aws:tts:polly-generative";
|
|
10531
10554
|
var TTS_MODEL_AWS_POLLY_NEURAL = "aws:tts:polly-neural";
|
|
10532
10555
|
|
|
10556
|
+
// src/types/generated/organization_billing.ts
|
|
10557
|
+
var OrganizationClassification = {
|
|
10558
|
+
commercial: "commercial",
|
|
10559
|
+
internal: "internal",
|
|
10560
|
+
demo: "demo",
|
|
10561
|
+
promo: "promo"
|
|
10562
|
+
};
|
|
10563
|
+
|
|
10533
10564
|
// src/types/pids-types.ts
|
|
10534
10565
|
var PIDS_DISPOSITIONS = ["true_positive", "false_positive", "needs_more_context"];
|
|
10535
10566
|
var PIDS_SOURCES = ["scheduled", "backfill", "pre_llm"];
|
|
@@ -11557,8 +11588,8 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
11557
11588
|
*
|
|
11558
11589
|
* `bindings` values are sent in the request body only. They are never
|
|
11559
11590
|
* projected from a response and must never be logged: the point of a
|
|
11560
|
-
* binding is that a
|
|
11561
|
-
*
|
|
11591
|
+
* binding is that a phone number, inbox or Member belongs to ONE target
|
|
11592
|
+
* workspace.
|
|
11562
11593
|
*/
|
|
11563
11594
|
/** Download a workspace export ZIP (``export.json`` + file blobs). */
|
|
11564
11595
|
async exportWorkspaceZip(wid, workflowId, scope, exclude, options) {
|
|
@@ -11619,10 +11650,6 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
11619
11650
|
* Pass ``archive`` (the ZIP from ``exportWorkspaceZip``) to restore file
|
|
11620
11651
|
* contents. ``exportData`` may be omitted when the ZIP contains it.
|
|
11621
11652
|
*
|
|
11622
|
-
* ``activateWebhookRules`` is safety-default false: imported
|
|
11623
|
-
* ``webhook:send`` EventRules are force-disabled unless the operator
|
|
11624
|
-
* opts in. An exported-inactive rule stays inactive either way.
|
|
11625
|
-
*
|
|
11626
11653
|
* With ``options.intent = 'template_reapply'`` this is the GUARDED apply.
|
|
11627
11654
|
* It requires ``options.expectedPlanFingerprint`` — the digest a preview
|
|
11628
11655
|
* returned — and answers 200 ``success``, 200 ``noop`` (the target already
|
|
@@ -11630,15 +11657,14 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
11630
11657
|
* ``stale_import_plan`` or 409 ``import_plan_refused``. Both 409s commit
|
|
11631
11658
|
* nothing and carry the complete values-free ``planRows``.
|
|
11632
11659
|
*/
|
|
11633
|
-
async importWorkspace(wid, exportData, importMappings, createNew, archive,
|
|
11660
|
+
async importWorkspace(wid, exportData, importMappings, createNew, archive, autoMap, options) {
|
|
11634
11661
|
if (archive) {
|
|
11635
11662
|
return this.importWorkspaceZip(wid, archive, {
|
|
11636
11663
|
...options,
|
|
11637
11664
|
exportData,
|
|
11638
11665
|
importMappings,
|
|
11639
11666
|
createNew,
|
|
11640
|
-
autoMap
|
|
11641
|
-
activateWebhookRules
|
|
11667
|
+
autoMap
|
|
11642
11668
|
});
|
|
11643
11669
|
}
|
|
11644
11670
|
if (!exportData) {
|
|
@@ -11650,9 +11676,6 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
11650
11676
|
createNew,
|
|
11651
11677
|
...planFields(options)
|
|
11652
11678
|
};
|
|
11653
|
-
if (activateWebhookRules) {
|
|
11654
|
-
payload.activateWebhookRules = activateWebhookRules;
|
|
11655
|
-
}
|
|
11656
11679
|
if (autoMap) {
|
|
11657
11680
|
payload.autoMap = autoMap;
|
|
11658
11681
|
}
|
|
@@ -11678,25 +11701,17 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
11678
11701
|
*
|
|
11679
11702
|
* `options.bindings` values are sent in the request body only. They are
|
|
11680
11703
|
* never projected from a response and must never be logged: the point of a
|
|
11681
|
-
* binding is that a
|
|
11682
|
-
*
|
|
11704
|
+
* binding is that a phone number, inbox or Member belongs to ONE target
|
|
11705
|
+
* workspace.
|
|
11683
11706
|
*/
|
|
11684
11707
|
async importWorkspaceZip(wid, archive, options) {
|
|
11685
|
-
const {
|
|
11686
|
-
exportData,
|
|
11687
|
-
importMappings,
|
|
11688
|
-
createNew,
|
|
11689
|
-
autoMap,
|
|
11690
|
-
activateWebhookRules,
|
|
11691
|
-
...planOptions
|
|
11692
|
-
} = options ?? {};
|
|
11708
|
+
const { exportData, importMappings, createNew, autoMap, ...planOptions } = options ?? {};
|
|
11693
11709
|
const payload = {
|
|
11694
11710
|
importMappings: importMappings ?? {},
|
|
11695
11711
|
createNew: createNew ?? {},
|
|
11696
11712
|
...planFields(planOptions)
|
|
11697
11713
|
};
|
|
11698
11714
|
if (exportData) payload.exportData = exportData;
|
|
11699
|
-
if (activateWebhookRules) payload.activateWebhookRules = activateWebhookRules;
|
|
11700
11715
|
if (autoMap) payload.autoMap = autoMap;
|
|
11701
11716
|
const form = new FormData();
|
|
11702
11717
|
form.append(
|
|
@@ -12779,6 +12794,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
12779
12794
|
agents: new AgentsApi(apiKey, baseUrl, customFetch),
|
|
12780
12795
|
aiModels: new AIModelsApi(apiKey, baseUrl, customFetch),
|
|
12781
12796
|
apiKeys: new ApiKeysApi(apiKey, baseUrl, customFetch),
|
|
12797
|
+
appLinks: new AppLinksApi(apiKey, baseUrl, customFetch),
|
|
12782
12798
|
apps: new AppsApi(apiKey, baseUrl, customFetch),
|
|
12783
12799
|
assignments: new AssignmentsApi(apiKey, baseUrl, customFetch),
|
|
12784
12800
|
auth: new AuthApi(apiKey, baseUrl, customFetch),
|
|
@@ -12789,7 +12805,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
12789
12805
|
calls: new CallsApi(apiKey, baseUrl, customFetch),
|
|
12790
12806
|
cel: new CELApi(apiKey, baseUrl, customFetch),
|
|
12791
12807
|
chats: new ChatsApi(apiKey, baseUrl, customFetch),
|
|
12792
|
-
customers: new
|
|
12808
|
+
customers: new OrganizationBillingApi(apiKey, baseUrl, customFetch),
|
|
12793
12809
|
resellers: new ResellersApi(apiKey, baseUrl, customFetch),
|
|
12794
12810
|
customToolkits: new CustomToolkitsApi(apiKey, baseUrl, customFetch),
|
|
12795
12811
|
dashboards: new DashboardsApi(apiKey, baseUrl, customFetch),
|
|
@@ -13346,6 +13362,9 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13346
13362
|
"getHubspotObjectProperties",
|
|
13347
13363
|
"getHubspotReconciliationMatches",
|
|
13348
13364
|
"getHubspotStatus",
|
|
13365
|
+
"bindHubspotCalendar",
|
|
13366
|
+
"unlinkHubspotCalendar",
|
|
13367
|
+
"importHubspotCalendarEvents",
|
|
13349
13368
|
"getHubspotBookingReceipt",
|
|
13350
13369
|
"releaseHubspotBookingAttempt",
|
|
13351
13370
|
"getHubspotSyncLogs",
|
|
@@ -13512,7 +13531,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13512
13531
|
"getUsageDashboard",
|
|
13513
13532
|
"getVariableRegistry",
|
|
13514
13533
|
"getVoiceUsageReport",
|
|
13515
|
-
"getWebhookLogs",
|
|
13516
13534
|
"getWorkflow",
|
|
13517
13535
|
"getWorkflowOpeningTurnConversionReport",
|
|
13518
13536
|
"getWorkflowActivity",
|
|
@@ -13715,7 +13733,6 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
13715
13733
|
"testMcpServerConnection",
|
|
13716
13734
|
"testMondayConnection",
|
|
13717
13735
|
"testRunJourney",
|
|
13718
|
-
"testWebhook",
|
|
13719
13736
|
"toggleFieldIndex",
|
|
13720
13737
|
"unarchiveAgent",
|
|
13721
13738
|
"unarchiveChat",
|
|
@@ -13861,6 +13878,11 @@ function bindAccessGrantsMethods(target, accessGrants) {
|
|
|
13861
13878
|
target.getGranteeGrants = accessGrants.getGranteeGrants.bind(accessGrants);
|
|
13862
13879
|
}
|
|
13863
13880
|
|
|
13881
|
+
// src/client/bindings/app-links.ts
|
|
13882
|
+
function bindAppLinksMethods(target, appLinks) {
|
|
13883
|
+
target.resolveAppLink = appLinks.resolveAppLink.bind(appLinks);
|
|
13884
|
+
}
|
|
13885
|
+
|
|
13864
13886
|
// src/client/bindings/intervention-requests.ts
|
|
13865
13887
|
function bindInterventionRequestsMethods(target, interventionRequests) {
|
|
13866
13888
|
target.getAgentModeAttention = interventionRequests.getAgentModeAttention.bind(interventionRequests);
|
|
@@ -14420,9 +14442,7 @@ function bindEventsMethods(target, events) {
|
|
|
14420
14442
|
target.createEventRule = events.createEventRule.bind(events);
|
|
14421
14443
|
target.updateEventRule = events.updateEventRule.bind(events);
|
|
14422
14444
|
target.deleteEventRule = events.deleteEventRule.bind(events);
|
|
14423
|
-
target.testWebhook = events.testWebhook.bind(events);
|
|
14424
14445
|
target.reorderEventRules = events.reorderEventRules.bind(events);
|
|
14425
|
-
target.getWebhookLogs = events.getWebhookLogs.bind(events);
|
|
14426
14446
|
target.getRuleExecutions = events.getRuleExecutions.bind(events);
|
|
14427
14447
|
target.getRoutines = events.getRoutines.bind(events);
|
|
14428
14448
|
target.getRoutine = events.getRoutine.bind(events);
|
|
@@ -14865,6 +14885,9 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
14865
14885
|
target.describeSalesforceObject = salesforce.describeSalesforceObject.bind(salesforce);
|
|
14866
14886
|
target.searchSalesforceRecords = salesforce.searchSalesforceRecords.bind(salesforce);
|
|
14867
14887
|
target.importSalesforceMembers = salesforce.importSalesforceMembers.bind(salesforce);
|
|
14888
|
+
target.bindHubspotCalendar = hubspot.bindHubspotCalendar.bind(hubspot);
|
|
14889
|
+
target.unlinkHubspotCalendar = hubspot.unlinkHubspotCalendar.bind(hubspot);
|
|
14890
|
+
target.importHubspotCalendarEvents = hubspot.importHubspotCalendarEvents.bind(hubspot);
|
|
14868
14891
|
target.getHubspotBookingReceipt = hubspot.getHubspotBookingReceipt.bind(hubspot);
|
|
14869
14892
|
target.releaseHubspotBookingAttempt = hubspot.releaseHubspotBookingAttempt.bind(hubspot);
|
|
14870
14893
|
target.installHubspot = hubspot.installHubspot.bind(hubspot);
|
|
@@ -14982,7 +15005,7 @@ function bindOrgMethods(target, org) {
|
|
|
14982
15005
|
target.getOrganizationWorkspaces = org.getOrganizationWorkspaces.bind(org);
|
|
14983
15006
|
target.getOrganizationWorkspace = org.getOrganizationWorkspace.bind(org);
|
|
14984
15007
|
target.updateOrganizationWorkspace = org.updateOrganizationWorkspace.bind(org);
|
|
14985
|
-
target.
|
|
15008
|
+
target.getOrgBillingAccess = org.getOrgBillingAccess.bind(org);
|
|
14986
15009
|
target.getA2PCampaignConfig = org.getA2PCampaignConfig.bind(org);
|
|
14987
15010
|
target.updateA2PCampaignConfig = org.updateA2PCampaignConfig.bind(org);
|
|
14988
15011
|
target.getOrgWorkspaceUsage = org.getOrgWorkspaceUsage.bind(org);
|
|
@@ -15181,21 +15204,23 @@ function bindQueriesMethods(target, queries) {
|
|
|
15181
15204
|
target.runQuery = queries.runQuery.bind(queries);
|
|
15182
15205
|
}
|
|
15183
15206
|
|
|
15184
|
-
// src/client/bindings/
|
|
15185
|
-
function
|
|
15186
|
-
target.
|
|
15187
|
-
target.
|
|
15188
|
-
target.
|
|
15189
|
-
target.
|
|
15190
|
-
target.
|
|
15191
|
-
target.
|
|
15192
|
-
target.
|
|
15193
|
-
target.
|
|
15194
|
-
target.
|
|
15195
|
-
target.
|
|
15196
|
-
target.
|
|
15197
|
-
target.
|
|
15198
|
-
target.
|
|
15207
|
+
// src/client/bindings/organization-billing.ts
|
|
15208
|
+
function bindOrganizationBillingMethods(target, billing) {
|
|
15209
|
+
target.getOrganizationSubscription = billing.getOrganizationSubscription.bind(billing);
|
|
15210
|
+
target.updateOrganizationCreditSettings = billing.updateOrganizationCreditSettings.bind(billing);
|
|
15211
|
+
target.purchaseOrganizationCredits = billing.purchaseOrganizationCredits.bind(billing);
|
|
15212
|
+
target.getBillingOrganizations = billing.getBillingOrganizations.bind(billing);
|
|
15213
|
+
target.getOrganizationBilling = billing.getOrganizationBilling.bind(billing);
|
|
15214
|
+
target.getOrganizationBillingSubscriptions = billing.getOrganizationBillingSubscriptions.bind(billing);
|
|
15215
|
+
target.getOrganizationInvoices = billing.getOrganizationInvoices.bind(billing);
|
|
15216
|
+
target.createOrganizationPortalSession = billing.createOrganizationPortalSession.bind(billing);
|
|
15217
|
+
target.updateOrganizationBilling = billing.updateOrganizationBilling.bind(billing);
|
|
15218
|
+
target.createOrganizationSetupIntent = billing.createOrganizationSetupIntent.bind(billing);
|
|
15219
|
+
target.getOrganizationPaymentMethods = billing.getOrganizationPaymentMethods.bind(billing);
|
|
15220
|
+
target.attachOrganizationPaymentMethod = billing.attachOrganizationPaymentMethod.bind(billing);
|
|
15221
|
+
target.detachOrganizationPaymentMethod = billing.detachOrganizationPaymentMethod.bind(billing);
|
|
15222
|
+
target.setDefaultOrganizationPaymentMethod = billing.setDefaultOrganizationPaymentMethod.bind(billing);
|
|
15223
|
+
target.getOrganizationCreditGrants = billing.getOrganizationCreditGrants.bind(billing);
|
|
15199
15224
|
}
|
|
15200
15225
|
|
|
15201
15226
|
// src/client/bindings/resellers.ts
|
|
@@ -15558,6 +15583,8 @@ var GravityRailClient = class {
|
|
|
15558
15583
|
resolveEntityRefs;
|
|
15559
15584
|
resolveOrgEntityRefs;
|
|
15560
15585
|
resolveAccountEntityRefs;
|
|
15586
|
+
// App Links API
|
|
15587
|
+
resolveAppLink;
|
|
15561
15588
|
// MOTD API
|
|
15562
15589
|
getMotd;
|
|
15563
15590
|
// Tracked Links analytics (#10934)
|
|
@@ -15792,7 +15819,7 @@ var GravityRailClient = class {
|
|
|
15792
15819
|
getOrganizationWorkspaces;
|
|
15793
15820
|
getOrganizationWorkspace;
|
|
15794
15821
|
updateOrganizationWorkspace;
|
|
15795
|
-
|
|
15822
|
+
getOrgBillingAccess;
|
|
15796
15823
|
getA2PCampaignConfig;
|
|
15797
15824
|
updateA2PCampaignConfig;
|
|
15798
15825
|
getOrgWorkspaceUsage;
|
|
@@ -16001,9 +16028,7 @@ var GravityRailClient = class {
|
|
|
16001
16028
|
createEventRule;
|
|
16002
16029
|
updateEventRule;
|
|
16003
16030
|
deleteEventRule;
|
|
16004
|
-
testWebhook;
|
|
16005
16031
|
reorderEventRules;
|
|
16006
|
-
getWebhookLogs;
|
|
16007
16032
|
getRuleExecutions;
|
|
16008
16033
|
getRoutines;
|
|
16009
16034
|
getRoutine;
|
|
@@ -16424,6 +16449,9 @@ var GravityRailClient = class {
|
|
|
16424
16449
|
searchSalesforceRecords;
|
|
16425
16450
|
importSalesforceMembers;
|
|
16426
16451
|
// HubSpot API
|
|
16452
|
+
bindHubspotCalendar;
|
|
16453
|
+
unlinkHubspotCalendar;
|
|
16454
|
+
importHubspotCalendarEvents;
|
|
16427
16455
|
getHubspotBookingReceipt;
|
|
16428
16456
|
releaseHubspotBookingAttempt;
|
|
16429
16457
|
installHubspot;
|
|
@@ -16500,20 +16528,22 @@ var GravityRailClient = class {
|
|
|
16500
16528
|
suggestPronunciations;
|
|
16501
16529
|
getRecommendedVoices;
|
|
16502
16530
|
previewPronunciation;
|
|
16503
|
-
//
|
|
16504
|
-
|
|
16505
|
-
|
|
16506
|
-
|
|
16507
|
-
|
|
16508
|
-
|
|
16509
|
-
|
|
16510
|
-
|
|
16511
|
-
|
|
16512
|
-
|
|
16513
|
-
|
|
16514
|
-
|
|
16515
|
-
|
|
16516
|
-
|
|
16531
|
+
// Organization billing API
|
|
16532
|
+
getOrganizationSubscription;
|
|
16533
|
+
updateOrganizationCreditSettings;
|
|
16534
|
+
purchaseOrganizationCredits;
|
|
16535
|
+
getBillingOrganizations;
|
|
16536
|
+
getOrganizationBilling;
|
|
16537
|
+
getOrganizationBillingSubscriptions;
|
|
16538
|
+
getOrganizationInvoices;
|
|
16539
|
+
createOrganizationPortalSession;
|
|
16540
|
+
updateOrganizationBilling;
|
|
16541
|
+
createOrganizationSetupIntent;
|
|
16542
|
+
getOrganizationPaymentMethods;
|
|
16543
|
+
attachOrganizationPaymentMethod;
|
|
16544
|
+
detachOrganizationPaymentMethod;
|
|
16545
|
+
setDefaultOrganizationPaymentMethod;
|
|
16546
|
+
getOrganizationCreditGrants;
|
|
16517
16547
|
// Resellers API (self-service reseller portal)
|
|
16518
16548
|
getMyResellers;
|
|
16519
16549
|
getMyReseller;
|
|
@@ -16598,6 +16628,7 @@ var GravityRailClient = class {
|
|
|
16598
16628
|
bindDashboardsMethods(this, apis.dashboards);
|
|
16599
16629
|
bindActivityMethods(this, apis.activity);
|
|
16600
16630
|
bindMotdMethods(this, apis.motd);
|
|
16631
|
+
bindAppLinksMethods(this, apis.appLinks);
|
|
16601
16632
|
bindTrackedLinksMethods(this, apis.trackedLinks);
|
|
16602
16633
|
bindJourneysMethods(this, apis.journeys);
|
|
16603
16634
|
bindBundlesMethods(this, apis.bundles, apis.resourceWorkflows);
|
|
@@ -16654,7 +16685,7 @@ var GravityRailClient = class {
|
|
|
16654
16685
|
apis.confluence
|
|
16655
16686
|
);
|
|
16656
16687
|
bindPronunciationsMethods(this, apis.pronunciations);
|
|
16657
|
-
|
|
16688
|
+
bindOrganizationBillingMethods(this, apis.customers);
|
|
16658
16689
|
bindResellersMethods(this, apis.resellers);
|
|
16659
16690
|
bindSupportRequestMethods(this, apis.supportRequests);
|
|
16660
16691
|
bindRoutingRulesMethods(this, apis.routingRules);
|
|
@@ -16701,8 +16732,9 @@ var GravityRailClient = class {
|
|
|
16701
16732
|
}
|
|
16702
16733
|
/**
|
|
16703
16734
|
* Set the org session credential for cross-domain / non-browser clients (e.g. CLI).
|
|
16704
|
-
*
|
|
16705
|
-
*
|
|
16735
|
+
* Only opaque `gr_sess_` credentials are supported and sent as `X-Org-Session`.
|
|
16736
|
+
* Legacy org tokens raise an error. Sign in again to obtain a session;
|
|
16737
|
+
* pass `undefined` to clear it.
|
|
16706
16738
|
*
|
|
16707
16739
|
* `orgUuid` is the org that issued the session. Pass it so the SDK can
|
|
16708
16740
|
* detect a stale session (e.g. switching orgs mid-session) and re-fire the
|
|
@@ -16717,13 +16749,6 @@ var GravityRailClient = class {
|
|
|
16717
16749
|
}
|
|
16718
16750
|
});
|
|
16719
16751
|
}
|
|
16720
|
-
/**
|
|
16721
|
-
* @deprecated Legacy compatibility for stateless orgToken JWE credentials.
|
|
16722
|
-
* Prefer setOrgSession() for opaque org browser sessions.
|
|
16723
|
-
*/
|
|
16724
|
-
setOrgToken(token, orgUuid) {
|
|
16725
|
-
this.setOrgSession(token, orgUuid);
|
|
16726
|
-
}
|
|
16727
16752
|
/**
|
|
16728
16753
|
* Update the API key across all modules.
|
|
16729
16754
|
* Used after successful re-authentication.
|
|
@@ -17107,6 +17132,14 @@ var ImportReadinessIssueResourceType = {
|
|
|
17107
17132
|
app_connection: "app_connection",
|
|
17108
17133
|
site: "site"
|
|
17109
17134
|
};
|
|
17135
|
+
var ImportReadinessResponseCapCutResourceTypesItem = {
|
|
17136
|
+
phone: "phone",
|
|
17137
|
+
inbox: "inbox",
|
|
17138
|
+
workflow: "workflow",
|
|
17139
|
+
routine: "routine",
|
|
17140
|
+
app_connection: "app_connection",
|
|
17141
|
+
site: "site"
|
|
17142
|
+
};
|
|
17110
17143
|
var ImportSkippedRuleResourceGroupResourceType = {
|
|
17111
17144
|
phone: "phone",
|
|
17112
17145
|
inbox: "inbox",
|
|
@@ -17892,18 +17925,18 @@ var SCOPES = {
|
|
|
17892
17925
|
"webhooks:read": {
|
|
17893
17926
|
name: "webhooks:read",
|
|
17894
17927
|
category: "webhooks" /* WEBHOOKS */,
|
|
17895
|
-
description: "View webhook
|
|
17928
|
+
description: "View the organization webhook endpoints that cover this workspace"
|
|
17896
17929
|
},
|
|
17897
17930
|
"webhooks:write": {
|
|
17898
17931
|
name: "webhooks:write",
|
|
17899
17932
|
category: "webhooks" /* WEBHOOKS */,
|
|
17900
|
-
description: "
|
|
17933
|
+
description: "Legacy webhook scope; grants no write operation (includes webhooks:read)",
|
|
17901
17934
|
implies: ["webhooks:read"]
|
|
17902
17935
|
},
|
|
17903
17936
|
"webhooks:admin": {
|
|
17904
17937
|
name: "webhooks:admin",
|
|
17905
17938
|
category: "webhooks" /* WEBHOOKS */,
|
|
17906
|
-
description: "
|
|
17939
|
+
description: "Legacy webhook scope; grants no write operation (includes webhooks:read)",
|
|
17907
17940
|
implies: ["webhooks:write"]
|
|
17908
17941
|
},
|
|
17909
17942
|
"webhooks:raw": {
|
|
@@ -18241,6 +18274,7 @@ export {
|
|
|
18241
18274
|
AgentsApi,
|
|
18242
18275
|
AIModelsApi,
|
|
18243
18276
|
ApiKeysApi,
|
|
18277
|
+
AppLinksApi,
|
|
18244
18278
|
AppsApi,
|
|
18245
18279
|
AssignmentsApi,
|
|
18246
18280
|
VoiceApi,
|
|
@@ -18292,7 +18326,7 @@ export {
|
|
|
18292
18326
|
SnippetsApi,
|
|
18293
18327
|
SubscriptionsApi,
|
|
18294
18328
|
SupportRequestsApi,
|
|
18295
|
-
|
|
18329
|
+
OrganizationBillingApi,
|
|
18296
18330
|
ResellersApi,
|
|
18297
18331
|
SupervisorsApi,
|
|
18298
18332
|
TasksApi,
|
|
@@ -18373,6 +18407,7 @@ export {
|
|
|
18373
18407
|
TTS_MODEL_DEEPGRAM_AURA_2,
|
|
18374
18408
|
TTS_MODEL_AWS_POLLY_GENERATIVE,
|
|
18375
18409
|
TTS_MODEL_AWS_POLLY_NEURAL,
|
|
18410
|
+
OrganizationClassification,
|
|
18376
18411
|
PIDS_DISPOSITIONS,
|
|
18377
18412
|
PIDS_SOURCES,
|
|
18378
18413
|
FhirVendor,
|
|
@@ -18421,6 +18456,7 @@ export {
|
|
|
18421
18456
|
createApiModules,
|
|
18422
18457
|
createWorkspaceClient,
|
|
18423
18458
|
bindAccessGrantsMethods,
|
|
18459
|
+
bindAppLinksMethods,
|
|
18424
18460
|
bindInterventionRequestsMethods,
|
|
18425
18461
|
bindAgentTasksMethods,
|
|
18426
18462
|
bindAgentsMethods,
|
|
@@ -18459,7 +18495,7 @@ export {
|
|
|
18459
18495
|
bindMetricsMethods,
|
|
18460
18496
|
bindDataReportsMethods,
|
|
18461
18497
|
bindQueriesMethods,
|
|
18462
|
-
|
|
18498
|
+
bindOrganizationBillingMethods,
|
|
18463
18499
|
bindResellersMethods,
|
|
18464
18500
|
bindPromptsMethods,
|
|
18465
18501
|
bindSupportRequestMethods,
|
|
@@ -18504,6 +18540,7 @@ export {
|
|
|
18504
18540
|
RecordContactPermissionRequestChannelNote,
|
|
18505
18541
|
ImportReadinessIssueCode,
|
|
18506
18542
|
ImportReadinessIssueResourceType,
|
|
18543
|
+
ImportReadinessResponseCapCutResourceTypesItem,
|
|
18507
18544
|
ImportSkippedRuleResourceGroupResourceType,
|
|
18508
18545
|
ImportSkippedRuleResponseNeededResourceTypesItem,
|
|
18509
18546
|
ImportSkippedRuleResponseParentKind,
|
|
@@ -18555,4 +18592,4 @@ export {
|
|
|
18555
18592
|
pathDraftFromStorage,
|
|
18556
18593
|
pathDraftToStorage
|
|
18557
18594
|
};
|
|
18558
|
-
//# sourceMappingURL=chunk-
|
|
18595
|
+
//# sourceMappingURL=chunk-WHRIIBJ4.js.map
|