@gravity-rail/sdk 0.33.0 → 0.34.1

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.
@@ -1,6 +1,6 @@
1
- import { fo as GravityRailClient } from './chat-interaction-DJ9-Qtg2.cjs';
2
- export { bM as ChatInteractionController } from './chat-interaction-DJ9-Qtg2.cjs';
3
- import { c8 as WorkspaceMemberResponse, aT as DataRecordResponse } from './tasks-B-31JPuq.cjs';
1
+ import { fr as GravityRailClient } from './chat-interaction-SVa5dCEM.cjs';
2
+ export { bM as ChatInteractionController } from './chat-interaction-SVa5dCEM.cjs';
3
+ import { c8 as WorkspaceMemberResponse, aT as DataRecordResponse } from './tasks-Co5om-p9.cjs';
4
4
  import 'zod';
5
5
 
6
6
  interface OutboundPhoneNumberOption {
package/dist/helpers.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { fo as GravityRailClient } from './chat-interaction-dd6F3uT4.js';
2
- export { bM as ChatInteractionController } from './chat-interaction-dd6F3uT4.js';
3
- import { c8 as WorkspaceMemberResponse, aT as DataRecordResponse } from './tasks-B-31JPuq.js';
1
+ import { fr as GravityRailClient } from './chat-interaction-cAFv3O2a.js';
2
+ export { bM as ChatInteractionController } from './chat-interaction-cAFv3O2a.js';
3
+ import { c8 as WorkspaceMemberResponse, aT as DataRecordResponse } from './tasks-Co5om-p9.js';
4
4
  import 'zod';
5
5
 
6
6
  interface OutboundPhoneNumberOption {
package/dist/index.cjs CHANGED
@@ -1853,8 +1853,14 @@ var CalendarsApi = class extends BaseApiClient {
1853
1853
  });
1854
1854
  }
1855
1855
  /** List all calendar event types in the workspace. */
1856
- async getEventTypes(wid) {
1857
- return this.fetch(`w/${wid}/calendar-event-types`);
1856
+ async getEventTypes(wid, options) {
1857
+ const params = new URLSearchParams();
1858
+ if (options?.page !== void 0) params.set("page", String(options.page));
1859
+ if (options?.pageSize !== void 0) params.set("pageSize", String(options.pageSize));
1860
+ const query = params.size ? `?${params}` : "";
1861
+ return this.fetch(
1862
+ `w/${wid}/calendar-event-types${query}`
1863
+ );
1858
1864
  }
1859
1865
  /** Get a single calendar event type by ID. */
1860
1866
  async getEventType(wid, id) {
@@ -4504,6 +4510,32 @@ var InboxesApi = class extends BaseApiClient {
4504
4510
  body: JSON.stringify(body)
4505
4511
  });
4506
4512
  }
4513
+ /**
4514
+ * Render a compose or `email:send` template draft through the same
4515
+ * outbound body-assembly seam (footer, layout wrapper, markdown fallback)
4516
+ * as sending. Preview excludes delivery-specific MIME transformations,
4517
+ * including inline-image content IDs.
4518
+ */
4519
+ async previewInboxEmail(wid, inboxId, body) {
4520
+ return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/preview`, {
4521
+ method: "POST",
4522
+ body: JSON.stringify(body)
4523
+ });
4524
+ }
4525
+ /**
4526
+ * Render a reply draft, including its quote, through outbound body
4527
+ * assembly. Preview excludes delivery-specific MIME transformations,
4528
+ * including inline-image content IDs.
4529
+ */
4530
+ async previewEmailReply(wid, inboxId, emailId, body) {
4531
+ return this.fetch(
4532
+ `w/${wid}/inboxes/${inboxId}/emails/${emailId}/reply-preview`,
4533
+ {
4534
+ method: "POST",
4535
+ body: JSON.stringify(body)
4536
+ }
4537
+ );
4538
+ }
4507
4539
  /**
4508
4540
  * Make a stored email's sender a Member of this workspace.
4509
4541
  *
@@ -6411,10 +6443,19 @@ var OrgApi = class extends BaseApiClient {
6411
6443
  }
6412
6444
  /**
6413
6445
  * Enable custom site routing for a verified org domain.
6446
+ *
6447
+ * Pass `{ childHosting: true }` to enable the domain as a **parent**
6448
+ * instead: it publishes one `*.<domain>` wildcard CNAME, serves nothing
6449
+ * at its own name, and hosts are added beneath it afterwards. The mode
6450
+ * is fixed at enable — disable and re-enable to change it.
6451
+ *
6452
+ * The request always carries a JSON body, `{}` by default: the route
6453
+ * requires one as a CSRF barrier.
6414
6454
  */
6415
- async enableOrgDomainSite(orgIdOrUuid, domainUuid) {
6455
+ async enableOrgDomainSite(orgIdOrUuid, domainUuid, options = {}) {
6416
6456
  return this.fetch(`o/${orgIdOrUuid}/domains/${domainUuid}/site`, {
6417
- method: "POST"
6457
+ method: "POST",
6458
+ body: JSON.stringify(options)
6418
6459
  });
6419
6460
  }
6420
6461
  /**
@@ -6426,12 +6467,15 @@ var OrgApi = class extends BaseApiClient {
6426
6467
  /**
6427
6468
  * Pre-enable DNS check: is the site CNAME resolving to the routing
6428
6469
  * endpoint yet? Pure DNS — consumes no enable budget.
6470
+ *
6471
+ * Pass `{ childHosting: true }` to check the mode you intend to enable
6472
+ * in: the wildcard is probed instead of the domain's own CNAME.
6429
6473
  */
6430
- async preflightOrgDomainSite(orgIdOrUuid, domainUuid) {
6474
+ async preflightOrgDomainSite(orgIdOrUuid, domainUuid, options = {}) {
6431
6475
  return this.fetch(
6432
6476
  `o/${orgIdOrUuid}/domains/${domainUuid}/site/preflight`,
6433
- // Empty JSON body: the route requires one as a CSRF barrier.
6434
- { method: "POST", body: JSON.stringify({}) }
6477
+ // JSON body, `{}` by default: the route requires one as a CSRF barrier.
6478
+ { method: "POST", body: JSON.stringify(options) }
6435
6479
  );
6436
6480
  }
6437
6481
  /**
@@ -6443,6 +6487,27 @@ var OrgApi = class extends BaseApiClient {
6443
6487
  { method: "POST" }
6444
6488
  );
6445
6489
  }
6490
+ /**
6491
+ * Create one child host beneath a child-hosting parent domain.
6492
+ *
6493
+ * The child gets its own CloudFront tenant and managed certificate and
6494
+ * needs no customer DNS: the parent's wildcard CNAME already routes it.
6495
+ */
6496
+ async createOrgDomainSiteChildHost(orgIdOrUuid, parentDomainUuid, request) {
6497
+ return this.fetch(
6498
+ `o/${orgIdOrUuid}/domains/${parentDomainUuid}/site/children`,
6499
+ { method: "POST", body: JSON.stringify(request) }
6500
+ );
6501
+ }
6502
+ /**
6503
+ * List the child hosts beneath a child-hosting parent domain, with live
6504
+ * per-host status.
6505
+ */
6506
+ async listOrgDomainSiteChildHosts(orgIdOrUuid, parentDomainUuid) {
6507
+ return this.fetch(
6508
+ `o/${orgIdOrUuid}/domains/${parentDomainUuid}/site/children`
6509
+ );
6510
+ }
6446
6511
  /**
6447
6512
  * Disable custom site routing for an org domain.
6448
6513
  */
@@ -6805,6 +6870,34 @@ var OrgApi = class extends BaseApiClient {
6805
6870
  `o/${orgIdOrUuid}/webhooks/${endpointUuid}/deliveries?limit=${limit}`
6806
6871
  );
6807
6872
  }
6873
+ /**
6874
+ * A representative delivery body for one event type — what the test-send
6875
+ * editor is prefilled with, and the same builder the public event catalog
6876
+ * is generated from. Pass `endpointUuid` to have the sample name that
6877
+ * endpoint and sit in a workspace it actually covers.
6878
+ */
6879
+ async getOrgWebhookEventSample(orgIdOrUuid, eventType, endpointUuid) {
6880
+ const query = endpointUuid ? `?endpointUuid=${encodeURIComponent(endpointUuid)}` : "";
6881
+ return this.fetch(
6882
+ `o/${orgIdOrUuid}/webhooks/event-types/${encodeURIComponent(eventType)}/sample${query}`
6883
+ );
6884
+ }
6885
+ /**
6886
+ * Send one payload to the endpoint now and report what came back.
6887
+ *
6888
+ * Outside the delivery queue: no delivery row, no retry, no effect on the
6889
+ * endpoint's status — but the same signing, egress vetting and outcome
6890
+ * classification a real delivery goes through.
6891
+ */
6892
+ async testOrgWebhookEndpoint(orgIdOrUuid, endpointUuid, data) {
6893
+ return this.fetch(
6894
+ `o/${orgIdOrUuid}/webhooks/${endpointUuid}/test`,
6895
+ {
6896
+ method: "POST",
6897
+ body: JSON.stringify(data)
6898
+ }
6899
+ );
6900
+ }
6808
6901
  };
6809
6902
  function businessProfilePath(orgUuid, legalEntityUuid) {
6810
6903
  return legalEntityUuid ? `o/${orgUuid}/legal-entities/${legalEntityUuid}/business-profile` : `o/${orgUuid}/business-profile`;
@@ -12038,10 +12131,12 @@ var WORKSPACE_METHOD_NAMES = [
12038
12131
  "markEmailAsUnread",
12039
12132
  "markNotificationAsRead",
12040
12133
  "mergeMemberRoles",
12134
+ "previewEmailReply",
12041
12135
  "previewImportMembers",
12042
12136
  "previewMemberWorkflowVoice",
12043
12137
  "previewRenameFieldSlug",
12044
12138
  "previewImportWorkspace",
12139
+ "previewInboxEmail",
12045
12140
  "previewRoutineVoiceReadiness",
12046
12141
  "previewRoutineWorkflowAccess",
12047
12142
  "previewSchedule",
@@ -12942,6 +13037,8 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
12942
13037
  target.getChatEmails = inboxes.getChatEmails.bind(inboxes);
12943
13038
  target.replyToEmail = inboxes.replyToEmail.bind(inboxes);
12944
13039
  target.sendInboxEmail = inboxes.sendInboxEmail.bind(inboxes);
13040
+ target.previewInboxEmail = inboxes.previewInboxEmail.bind(inboxes);
13041
+ target.previewEmailReply = inboxes.previewEmailReply.bind(inboxes);
12945
13042
  target.getNotificationRules = notificationRules.getNotificationRules.bind(notificationRules);
12946
13043
  target.createNotificationRule = notificationRules.createNotificationRule.bind(notificationRules);
12947
13044
  target.updateNotificationRule = notificationRules.updateNotificationRule.bind(notificationRules);
@@ -14200,6 +14297,8 @@ var GravityRailClient = class {
14200
14297
  getChatEmails;
14201
14298
  replyToEmail;
14202
14299
  sendInboxEmail;
14300
+ previewInboxEmail;
14301
+ previewEmailReply;
14203
14302
  getNotificationRules;
14204
14303
  createNotificationRule;
14205
14304
  updateNotificationRule;