@gravity-rail/sdk 3.1.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.
Files changed (38) hide show
  1. package/README.md +16 -1
  2. package/dist/{chat-interaction-DwH4z1qk.d.ts → chat-interaction-DXgKjFqZ.d.cts} +497 -523
  3. package/dist/{chat-interaction-ClNfn1UV.d.cts → chat-interaction-a7U-tHfQ.d.ts} +497 -523
  4. package/dist/{chunk-ANVLMZLD.js → chunk-WHRIIBJ4.js} +182 -145
  5. package/dist/chunk-WHRIIBJ4.js.map +1 -0
  6. package/dist/{chunk-RLFS7O2L.js → chunk-ZLF3N3ZD.js} +183 -81
  7. package/dist/chunk-ZLF3N3ZD.js.map +1 -0
  8. package/dist/helpers.cjs.map +1 -1
  9. package/dist/helpers.d.cts +2 -2
  10. package/dist/helpers.d.ts +2 -2
  11. package/dist/helpers.js +1 -1
  12. package/dist/index.cjs +340 -221
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +6 -6
  15. package/dist/index.d.ts +6 -6
  16. package/dist/index.js +2 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/internal.cjs +368 -225
  19. package/dist/internal.cjs.map +1 -1
  20. package/dist/internal.d.cts +45 -9
  21. package/dist/internal.d.ts +45 -9
  22. package/dist/internal.js +14 -6
  23. package/dist/internal.js.map +1 -1
  24. package/dist/{member-import-IN06xJrR.d.cts → member-import-BHtOru8g.d.cts} +1 -1
  25. package/dist/{member-import-D-_eJBE7.d.ts → member-import-VOLKR5dY.d.ts} +1 -1
  26. package/dist/{path-D_KPlBIr.d.cts → path-B3b3_El9.d.cts} +36 -18
  27. package/dist/{path-D4S8xYyo.d.ts → path-CUY-Iw70.d.ts} +36 -18
  28. package/dist/schemas.cjs +2 -4
  29. package/dist/schemas.cjs.map +1 -1
  30. package/dist/schemas.d.cts +21 -22
  31. package/dist/schemas.d.ts +21 -22
  32. package/dist/schemas.js +2 -4
  33. package/dist/schemas.js.map +1 -1
  34. package/dist/{tasks-C8sHnwH5.d.cts → tasks-CgptqCsN.d.cts} +17 -48
  35. package/dist/{tasks-C8sHnwH5.d.ts → tasks-CgptqCsN.d.ts} +17 -48
  36. package/package.json +3 -3
  37. package/dist/chunk-ANVLMZLD.js.map +0 -1
  38. package/dist/chunk-RLFS7O2L.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ApiError,
3
3
  BaseApiClient
4
- } from "./chunk-RLFS7O2L.js";
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
- * Get the billing customer and this organization's billable subscription.
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 a billing role on the organization's billing customer — the
5658
- * same gate `getOrgBillingCustomer().hasAccess` reports, and the one that
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/customers.ts
8876
- var CustomersApi = class extends BaseApiClient {
8877
- async getMyCustomers() {
8878
- return this.fetch("customers");
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 getMyCustomer(uuid) {
8881
- return this.fetch(`customers/${uuid}`);
8901
+ async getBillingOrganizations() {
8902
+ return this.fetch("o/billing-organizations");
8882
8903
  }
8883
- async getMyCustomerAccounts(uuid) {
8884
- return this.fetch(`customers/${uuid}/accounts`);
8904
+ async getOrganizationBilling(uuid) {
8905
+ return this.fetch(`o/${uuid}/billing`);
8885
8906
  }
8886
- async getMyCustomerSubscriptions(uuid, opts) {
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(`customers/${uuid}/subscriptions${qs ? "?" + qs : ""}`);
8916
+ return this.fetch(`o/${uuid}/billing/subscriptions${qs ? "?" + qs : ""}`);
8896
8917
  }
8897
- async getMyCustomerInvoices(uuid) {
8898
- return this.fetch(`customers/${uuid}/invoices`);
8918
+ async getOrganizationInvoices(uuid) {
8919
+ return this.fetch(`o/${uuid}/billing/invoices`);
8899
8920
  }
8900
- async createMyCustomerPortalSession(uuid, returnUrl) {
8901
- return this.fetch(`customers/${uuid}/stripe/portal-session`, {
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 updateMyCustomer(uuid, data) {
8908
- return this.fetch(`customers/${uuid}`, {
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 createMyCustomerSetupIntent(uuid) {
8916
- return this.fetch(`customers/${uuid}/stripe/setup-intent`, { method: "POST" });
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 getMyCustomerPaymentMethods(uuid) {
8919
- return this.fetch(`customers/${uuid}/stripe/payment-methods`);
8942
+ async getOrganizationPaymentMethods(uuid) {
8943
+ return this.fetch(`o/${uuid}/billing/stripe/payment-methods`);
8920
8944
  }
8921
- async attachMyCustomerPaymentMethod(uuid, paymentMethodId, setAsDefault = false) {
8922
- return this.fetch(`customers/${uuid}/stripe/payment-methods/${paymentMethodId}/attach`, {
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 detachMyCustomerPaymentMethod(uuid, paymentMethodId) {
8929
- return this.fetch(`customers/${uuid}/stripe/payment-methods/${paymentMethodId}`, {
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 setDefaultMyCustomerPaymentMethod(uuid, paymentMethodId) {
8934
- return this.fetch(`customers/${uuid}/stripe/payment-methods/${paymentMethodId}/set-default`, {
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 getMyCustomerCreditGrants(uuid, opts) {
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(`customers/${uuid}/credit-grants${qs ? "?" + qs : ""}`);
8970
+ return this.fetch(`o/${uuid}/billing/credit-grants${qs ? "?" + qs : ""}`);
8947
8971
  }
8948
8972
  };
8949
8973
 
@@ -9569,7 +9593,7 @@ var WorkflowsApi = class extends BaseApiClient {
9569
9593
  body.append("relativePath", relativePath);
9570
9594
  return this.fetch(`w/${wid}/workflows/${id}/knowledge/uploads`, { method: "POST", body });
9571
9595
  }
9572
- /** List all workflows in a workspace, optionally including archived ones. */
9596
+ /** List workflows by archived status; `archived: true` returns only archived Workflows. */
9573
9597
  async getWorkflows(wid, options = {}) {
9574
9598
  const params = new URLSearchParams();
9575
9599
  if (options.archived) params.set("archived", "true");
@@ -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 webhook endpoint and a signing secret belong to ONE
11561
- * target workspace.
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, activateWebhookRules, autoMap, options) {
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 webhook endpoint and a signing secret belong to ONE
11682
- * target workspace.
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 CustomersApi(apiKey, baseUrl, customFetch),
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.getOrgBillingCustomer = org.getOrgBillingCustomer.bind(org);
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/customers.ts
15185
- function bindCustomersMethods(target, customers) {
15186
- target.getMyCustomers = customers.getMyCustomers.bind(customers);
15187
- target.getMyCustomer = customers.getMyCustomer.bind(customers);
15188
- target.getMyCustomerAccounts = customers.getMyCustomerAccounts.bind(customers);
15189
- target.getMyCustomerSubscriptions = customers.getMyCustomerSubscriptions.bind(customers);
15190
- target.getMyCustomerInvoices = customers.getMyCustomerInvoices.bind(customers);
15191
- target.createMyCustomerPortalSession = customers.createMyCustomerPortalSession.bind(customers);
15192
- target.updateMyCustomer = customers.updateMyCustomer.bind(customers);
15193
- target.createMyCustomerSetupIntent = customers.createMyCustomerSetupIntent.bind(customers);
15194
- target.getMyCustomerPaymentMethods = customers.getMyCustomerPaymentMethods.bind(customers);
15195
- target.attachMyCustomerPaymentMethod = customers.attachMyCustomerPaymentMethod.bind(customers);
15196
- target.detachMyCustomerPaymentMethod = customers.detachMyCustomerPaymentMethod.bind(customers);
15197
- target.setDefaultMyCustomerPaymentMethod = customers.setDefaultMyCustomerPaymentMethod.bind(customers);
15198
- target.getMyCustomerCreditGrants = customers.getMyCustomerCreditGrants.bind(customers);
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
- getOrgBillingCustomer;
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
- // Customers API (self-service billing portal)
16504
- getMyCustomers;
16505
- getMyCustomer;
16506
- getMyCustomerAccounts;
16507
- getMyCustomerSubscriptions;
16508
- getMyCustomerInvoices;
16509
- createMyCustomerPortalSession;
16510
- updateMyCustomer;
16511
- createMyCustomerSetupIntent;
16512
- getMyCustomerPaymentMethods;
16513
- attachMyCustomerPaymentMethod;
16514
- detachMyCustomerPaymentMethod;
16515
- setDefaultMyCustomerPaymentMethod;
16516
- getMyCustomerCreditGrants;
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
- bindCustomersMethods(this, apis.customers);
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
- * Opaque gr_sess_ values use X-Org-Session. Legacy orgToken JWE values still
16705
- * use X-Org-Token during the migration window.
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 logs"
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: "Configure webhooks",
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: "Delete webhooks",
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
- CustomersApi,
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
- bindCustomersMethods,
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-ANVLMZLD.js.map
18595
+ //# sourceMappingURL=chunk-WHRIIBJ4.js.map