@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.
@@ -3508,6 +3508,32 @@ var InboxesApi = class extends BaseApiClient {
3508
3508
  body: JSON.stringify(body)
3509
3509
  });
3510
3510
  }
3511
+ /**
3512
+ * Render a compose or `email:send` template draft through the same
3513
+ * outbound body-assembly seam (footer, layout wrapper, markdown fallback)
3514
+ * as sending. Preview excludes delivery-specific MIME transformations,
3515
+ * including inline-image content IDs.
3516
+ */
3517
+ async previewInboxEmail(wid, inboxId, body) {
3518
+ return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/preview`, {
3519
+ method: "POST",
3520
+ body: JSON.stringify(body)
3521
+ });
3522
+ }
3523
+ /**
3524
+ * Render a reply draft, including its quote, through outbound body
3525
+ * assembly. Preview excludes delivery-specific MIME transformations,
3526
+ * including inline-image content IDs.
3527
+ */
3528
+ async previewEmailReply(wid, inboxId, emailId, body) {
3529
+ return this.fetch(
3530
+ `w/${wid}/inboxes/${inboxId}/emails/${emailId}/reply-preview`,
3531
+ {
3532
+ method: "POST",
3533
+ body: JSON.stringify(body)
3534
+ }
3535
+ );
3536
+ }
3511
3537
  /**
3512
3538
  * Make a stored email's sender a Member of this workspace.
3513
3539
  *
@@ -5127,10 +5153,19 @@ var OrgApi = class extends BaseApiClient {
5127
5153
  }
5128
5154
  /**
5129
5155
  * Enable custom site routing for a verified org domain.
5156
+ *
5157
+ * Pass `{ childHosting: true }` to enable the domain as a **parent**
5158
+ * instead: it publishes one `*.<domain>` wildcard CNAME, serves nothing
5159
+ * at its own name, and hosts are added beneath it afterwards. The mode
5160
+ * is fixed at enable — disable and re-enable to change it.
5161
+ *
5162
+ * The request always carries a JSON body, `{}` by default: the route
5163
+ * requires one as a CSRF barrier.
5130
5164
  */
5131
- async enableOrgDomainSite(orgIdOrUuid, domainUuid) {
5165
+ async enableOrgDomainSite(orgIdOrUuid, domainUuid, options = {}) {
5132
5166
  return this.fetch(`o/${orgIdOrUuid}/domains/${domainUuid}/site`, {
5133
- method: "POST"
5167
+ method: "POST",
5168
+ body: JSON.stringify(options)
5134
5169
  });
5135
5170
  }
5136
5171
  /**
@@ -5142,12 +5177,15 @@ var OrgApi = class extends BaseApiClient {
5142
5177
  /**
5143
5178
  * Pre-enable DNS check: is the site CNAME resolving to the routing
5144
5179
  * endpoint yet? Pure DNS — consumes no enable budget.
5180
+ *
5181
+ * Pass `{ childHosting: true }` to check the mode you intend to enable
5182
+ * in: the wildcard is probed instead of the domain's own CNAME.
5145
5183
  */
5146
- async preflightOrgDomainSite(orgIdOrUuid, domainUuid) {
5184
+ async preflightOrgDomainSite(orgIdOrUuid, domainUuid, options = {}) {
5147
5185
  return this.fetch(
5148
5186
  `o/${orgIdOrUuid}/domains/${domainUuid}/site/preflight`,
5149
- // Empty JSON body: the route requires one as a CSRF barrier.
5150
- { method: "POST", body: JSON.stringify({}) }
5187
+ // JSON body, `{}` by default: the route requires one as a CSRF barrier.
5188
+ { method: "POST", body: JSON.stringify(options) }
5151
5189
  );
5152
5190
  }
5153
5191
  /**
@@ -5159,6 +5197,27 @@ var OrgApi = class extends BaseApiClient {
5159
5197
  { method: "POST" }
5160
5198
  );
5161
5199
  }
5200
+ /**
5201
+ * Create one child host beneath a child-hosting parent domain.
5202
+ *
5203
+ * The child gets its own CloudFront tenant and managed certificate and
5204
+ * needs no customer DNS: the parent's wildcard CNAME already routes it.
5205
+ */
5206
+ async createOrgDomainSiteChildHost(orgIdOrUuid, parentDomainUuid, request) {
5207
+ return this.fetch(
5208
+ `o/${orgIdOrUuid}/domains/${parentDomainUuid}/site/children`,
5209
+ { method: "POST", body: JSON.stringify(request) }
5210
+ );
5211
+ }
5212
+ /**
5213
+ * List the child hosts beneath a child-hosting parent domain, with live
5214
+ * per-host status.
5215
+ */
5216
+ async listOrgDomainSiteChildHosts(orgIdOrUuid, parentDomainUuid) {
5217
+ return this.fetch(
5218
+ `o/${orgIdOrUuid}/domains/${parentDomainUuid}/site/children`
5219
+ );
5220
+ }
5162
5221
  /**
5163
5222
  * Disable custom site routing for an org domain.
5164
5223
  */
@@ -5521,6 +5580,34 @@ var OrgApi = class extends BaseApiClient {
5521
5580
  `o/${orgIdOrUuid}/webhooks/${endpointUuid}/deliveries?limit=${limit}`
5522
5581
  );
5523
5582
  }
5583
+ /**
5584
+ * A representative delivery body for one event type — what the test-send
5585
+ * editor is prefilled with, and the same builder the public event catalog
5586
+ * is generated from. Pass `endpointUuid` to have the sample name that
5587
+ * endpoint and sit in a workspace it actually covers.
5588
+ */
5589
+ async getOrgWebhookEventSample(orgIdOrUuid, eventType, endpointUuid) {
5590
+ const query = endpointUuid ? `?endpointUuid=${encodeURIComponent(endpointUuid)}` : "";
5591
+ return this.fetch(
5592
+ `o/${orgIdOrUuid}/webhooks/event-types/${encodeURIComponent(eventType)}/sample${query}`
5593
+ );
5594
+ }
5595
+ /**
5596
+ * Send one payload to the endpoint now and report what came back.
5597
+ *
5598
+ * Outside the delivery queue: no delivery row, no retry, no effect on the
5599
+ * endpoint's status — but the same signing, egress vetting and outcome
5600
+ * classification a real delivery goes through.
5601
+ */
5602
+ async testOrgWebhookEndpoint(orgIdOrUuid, endpointUuid, data) {
5603
+ return this.fetch(
5604
+ `o/${orgIdOrUuid}/webhooks/${endpointUuid}/test`,
5605
+ {
5606
+ method: "POST",
5607
+ body: JSON.stringify(data)
5608
+ }
5609
+ );
5610
+ }
5524
5611
  };
5525
5612
  function businessProfilePath(orgUuid, legalEntityUuid) {
5526
5613
  return legalEntityUuid ? `o/${orgUuid}/legal-entities/${legalEntityUuid}/business-profile` : `o/${orgUuid}/business-profile`;
@@ -11291,10 +11378,12 @@ var WORKSPACE_METHOD_NAMES = [
11291
11378
  "markEmailAsUnread",
11292
11379
  "markNotificationAsRead",
11293
11380
  "mergeMemberRoles",
11381
+ "previewEmailReply",
11294
11382
  "previewImportMembers",
11295
11383
  "previewMemberWorkflowVoice",
11296
11384
  "previewRenameFieldSlug",
11297
11385
  "previewImportWorkspace",
11386
+ "previewInboxEmail",
11298
11387
  "previewRoutineVoiceReadiness",
11299
11388
  "previewRoutineWorkflowAccess",
11300
11389
  "previewSchedule",
@@ -12195,6 +12284,8 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
12195
12284
  target.getChatEmails = inboxes.getChatEmails.bind(inboxes);
12196
12285
  target.replyToEmail = inboxes.replyToEmail.bind(inboxes);
12197
12286
  target.sendInboxEmail = inboxes.sendInboxEmail.bind(inboxes);
12287
+ target.previewInboxEmail = inboxes.previewInboxEmail.bind(inboxes);
12288
+ target.previewEmailReply = inboxes.previewEmailReply.bind(inboxes);
12198
12289
  target.getNotificationRules = notificationRules.getNotificationRules.bind(notificationRules);
12199
12290
  target.createNotificationRule = notificationRules.createNotificationRule.bind(notificationRules);
12200
12291
  target.updateNotificationRule = notificationRules.updateNotificationRule.bind(notificationRules);
@@ -13453,6 +13544,8 @@ var GravityRailClient = class {
13453
13544
  getChatEmails;
13454
13545
  replyToEmail;
13455
13546
  sendInboxEmail;
13547
+ previewInboxEmail;
13548
+ previewEmailReply;
13456
13549
  getNotificationRules;
13457
13550
  createNotificationRule;
13458
13551
  updateNotificationRule;
@@ -15527,4 +15620,4 @@ export {
15527
15620
  SCOPE_PRESETS,
15528
15621
  getRevisionState
15529
15622
  };
15530
- //# sourceMappingURL=chunk-WDYHAQDY.js.map
15623
+ //# sourceMappingURL=chunk-ON7HBHJA.js.map