@gravity-rail/sdk 0.33.0 → 0.34.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.
@@ -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-C-B463O4.cjs';
2
+ export { bM as ChatInteractionController } from './chat-interaction-C-B463O4.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-BiH_iWSK.js';
2
+ export { bM as ChatInteractionController } from './chat-interaction-BiH_iWSK.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
@@ -4504,6 +4504,32 @@ var InboxesApi = class extends BaseApiClient {
4504
4504
  body: JSON.stringify(body)
4505
4505
  });
4506
4506
  }
4507
+ /**
4508
+ * Render a compose or `email:send` template draft through the same
4509
+ * outbound body-assembly seam (footer, layout wrapper, markdown fallback)
4510
+ * as sending. Preview excludes delivery-specific MIME transformations,
4511
+ * including inline-image content IDs.
4512
+ */
4513
+ async previewInboxEmail(wid, inboxId, body) {
4514
+ return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/preview`, {
4515
+ method: "POST",
4516
+ body: JSON.stringify(body)
4517
+ });
4518
+ }
4519
+ /**
4520
+ * Render a reply draft, including its quote, through outbound body
4521
+ * assembly. Preview excludes delivery-specific MIME transformations,
4522
+ * including inline-image content IDs.
4523
+ */
4524
+ async previewEmailReply(wid, inboxId, emailId, body) {
4525
+ return this.fetch(
4526
+ `w/${wid}/inboxes/${inboxId}/emails/${emailId}/reply-preview`,
4527
+ {
4528
+ method: "POST",
4529
+ body: JSON.stringify(body)
4530
+ }
4531
+ );
4532
+ }
4507
4533
  /**
4508
4534
  * Make a stored email's sender a Member of this workspace.
4509
4535
  *
@@ -6411,10 +6437,19 @@ var OrgApi = class extends BaseApiClient {
6411
6437
  }
6412
6438
  /**
6413
6439
  * Enable custom site routing for a verified org domain.
6440
+ *
6441
+ * Pass `{ childHosting: true }` to enable the domain as a **parent**
6442
+ * instead: it publishes one `*.<domain>` wildcard CNAME, serves nothing
6443
+ * at its own name, and hosts are added beneath it afterwards. The mode
6444
+ * is fixed at enable — disable and re-enable to change it.
6445
+ *
6446
+ * The request always carries a JSON body, `{}` by default: the route
6447
+ * requires one as a CSRF barrier.
6414
6448
  */
6415
- async enableOrgDomainSite(orgIdOrUuid, domainUuid) {
6449
+ async enableOrgDomainSite(orgIdOrUuid, domainUuid, options = {}) {
6416
6450
  return this.fetch(`o/${orgIdOrUuid}/domains/${domainUuid}/site`, {
6417
- method: "POST"
6451
+ method: "POST",
6452
+ body: JSON.stringify(options)
6418
6453
  });
6419
6454
  }
6420
6455
  /**
@@ -6426,12 +6461,15 @@ var OrgApi = class extends BaseApiClient {
6426
6461
  /**
6427
6462
  * Pre-enable DNS check: is the site CNAME resolving to the routing
6428
6463
  * endpoint yet? Pure DNS — consumes no enable budget.
6464
+ *
6465
+ * Pass `{ childHosting: true }` to check the mode you intend to enable
6466
+ * in: the wildcard is probed instead of the domain's own CNAME.
6429
6467
  */
6430
- async preflightOrgDomainSite(orgIdOrUuid, domainUuid) {
6468
+ async preflightOrgDomainSite(orgIdOrUuid, domainUuid, options = {}) {
6431
6469
  return this.fetch(
6432
6470
  `o/${orgIdOrUuid}/domains/${domainUuid}/site/preflight`,
6433
- // Empty JSON body: the route requires one as a CSRF barrier.
6434
- { method: "POST", body: JSON.stringify({}) }
6471
+ // JSON body, `{}` by default: the route requires one as a CSRF barrier.
6472
+ { method: "POST", body: JSON.stringify(options) }
6435
6473
  );
6436
6474
  }
6437
6475
  /**
@@ -6443,6 +6481,27 @@ var OrgApi = class extends BaseApiClient {
6443
6481
  { method: "POST" }
6444
6482
  );
6445
6483
  }
6484
+ /**
6485
+ * Create one child host beneath a child-hosting parent domain.
6486
+ *
6487
+ * The child gets its own CloudFront tenant and managed certificate and
6488
+ * needs no customer DNS: the parent's wildcard CNAME already routes it.
6489
+ */
6490
+ async createOrgDomainSiteChildHost(orgIdOrUuid, parentDomainUuid, request) {
6491
+ return this.fetch(
6492
+ `o/${orgIdOrUuid}/domains/${parentDomainUuid}/site/children`,
6493
+ { method: "POST", body: JSON.stringify(request) }
6494
+ );
6495
+ }
6496
+ /**
6497
+ * List the child hosts beneath a child-hosting parent domain, with live
6498
+ * per-host status.
6499
+ */
6500
+ async listOrgDomainSiteChildHosts(orgIdOrUuid, parentDomainUuid) {
6501
+ return this.fetch(
6502
+ `o/${orgIdOrUuid}/domains/${parentDomainUuid}/site/children`
6503
+ );
6504
+ }
6446
6505
  /**
6447
6506
  * Disable custom site routing for an org domain.
6448
6507
  */
@@ -6805,6 +6864,34 @@ var OrgApi = class extends BaseApiClient {
6805
6864
  `o/${orgIdOrUuid}/webhooks/${endpointUuid}/deliveries?limit=${limit}`
6806
6865
  );
6807
6866
  }
6867
+ /**
6868
+ * A representative delivery body for one event type — what the test-send
6869
+ * editor is prefilled with, and the same builder the public event catalog
6870
+ * is generated from. Pass `endpointUuid` to have the sample name that
6871
+ * endpoint and sit in a workspace it actually covers.
6872
+ */
6873
+ async getOrgWebhookEventSample(orgIdOrUuid, eventType, endpointUuid) {
6874
+ const query = endpointUuid ? `?endpointUuid=${encodeURIComponent(endpointUuid)}` : "";
6875
+ return this.fetch(
6876
+ `o/${orgIdOrUuid}/webhooks/event-types/${encodeURIComponent(eventType)}/sample${query}`
6877
+ );
6878
+ }
6879
+ /**
6880
+ * Send one payload to the endpoint now and report what came back.
6881
+ *
6882
+ * Outside the delivery queue: no delivery row, no retry, no effect on the
6883
+ * endpoint's status — but the same signing, egress vetting and outcome
6884
+ * classification a real delivery goes through.
6885
+ */
6886
+ async testOrgWebhookEndpoint(orgIdOrUuid, endpointUuid, data) {
6887
+ return this.fetch(
6888
+ `o/${orgIdOrUuid}/webhooks/${endpointUuid}/test`,
6889
+ {
6890
+ method: "POST",
6891
+ body: JSON.stringify(data)
6892
+ }
6893
+ );
6894
+ }
6808
6895
  };
6809
6896
  function businessProfilePath(orgUuid, legalEntityUuid) {
6810
6897
  return legalEntityUuid ? `o/${orgUuid}/legal-entities/${legalEntityUuid}/business-profile` : `o/${orgUuid}/business-profile`;
@@ -12038,10 +12125,12 @@ var WORKSPACE_METHOD_NAMES = [
12038
12125
  "markEmailAsUnread",
12039
12126
  "markNotificationAsRead",
12040
12127
  "mergeMemberRoles",
12128
+ "previewEmailReply",
12041
12129
  "previewImportMembers",
12042
12130
  "previewMemberWorkflowVoice",
12043
12131
  "previewRenameFieldSlug",
12044
12132
  "previewImportWorkspace",
12133
+ "previewInboxEmail",
12045
12134
  "previewRoutineVoiceReadiness",
12046
12135
  "previewRoutineWorkflowAccess",
12047
12136
  "previewSchedule",
@@ -12942,6 +13031,8 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
12942
13031
  target.getChatEmails = inboxes.getChatEmails.bind(inboxes);
12943
13032
  target.replyToEmail = inboxes.replyToEmail.bind(inboxes);
12944
13033
  target.sendInboxEmail = inboxes.sendInboxEmail.bind(inboxes);
13034
+ target.previewInboxEmail = inboxes.previewInboxEmail.bind(inboxes);
13035
+ target.previewEmailReply = inboxes.previewEmailReply.bind(inboxes);
12945
13036
  target.getNotificationRules = notificationRules.getNotificationRules.bind(notificationRules);
12946
13037
  target.createNotificationRule = notificationRules.createNotificationRule.bind(notificationRules);
12947
13038
  target.updateNotificationRule = notificationRules.updateNotificationRule.bind(notificationRules);
@@ -14200,6 +14291,8 @@ var GravityRailClient = class {
14200
14291
  getChatEmails;
14201
14292
  replyToEmail;
14202
14293
  sendInboxEmail;
14294
+ previewInboxEmail;
14295
+ previewEmailReply;
14203
14296
  getNotificationRules;
14204
14297
  createNotificationRule;
14205
14298
  updateNotificationRule;