@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.
@@ -1139,8 +1139,14 @@ var CalendarsApi = class extends BaseApiClient {
1139
1139
  });
1140
1140
  }
1141
1141
  /** List all calendar event types in the workspace. */
1142
- async getEventTypes(wid) {
1143
- return this.fetch(`w/${wid}/calendar-event-types`);
1142
+ async getEventTypes(wid, options) {
1143
+ const params = new URLSearchParams();
1144
+ if (options?.page !== void 0) params.set("page", String(options.page));
1145
+ if (options?.pageSize !== void 0) params.set("pageSize", String(options.pageSize));
1146
+ const query = params.size ? `?${params}` : "";
1147
+ return this.fetch(
1148
+ `w/${wid}/calendar-event-types${query}`
1149
+ );
1144
1150
  }
1145
1151
  /** Get a single calendar event type by ID. */
1146
1152
  async getEventType(wid, id) {
@@ -3508,6 +3514,32 @@ var InboxesApi = class extends BaseApiClient {
3508
3514
  body: JSON.stringify(body)
3509
3515
  });
3510
3516
  }
3517
+ /**
3518
+ * Render a compose or `email:send` template draft through the same
3519
+ * outbound body-assembly seam (footer, layout wrapper, markdown fallback)
3520
+ * as sending. Preview excludes delivery-specific MIME transformations,
3521
+ * including inline-image content IDs.
3522
+ */
3523
+ async previewInboxEmail(wid, inboxId, body) {
3524
+ return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/preview`, {
3525
+ method: "POST",
3526
+ body: JSON.stringify(body)
3527
+ });
3528
+ }
3529
+ /**
3530
+ * Render a reply draft, including its quote, through outbound body
3531
+ * assembly. Preview excludes delivery-specific MIME transformations,
3532
+ * including inline-image content IDs.
3533
+ */
3534
+ async previewEmailReply(wid, inboxId, emailId, body) {
3535
+ return this.fetch(
3536
+ `w/${wid}/inboxes/${inboxId}/emails/${emailId}/reply-preview`,
3537
+ {
3538
+ method: "POST",
3539
+ body: JSON.stringify(body)
3540
+ }
3541
+ );
3542
+ }
3511
3543
  /**
3512
3544
  * Make a stored email's sender a Member of this workspace.
3513
3545
  *
@@ -5127,10 +5159,19 @@ var OrgApi = class extends BaseApiClient {
5127
5159
  }
5128
5160
  /**
5129
5161
  * Enable custom site routing for a verified org domain.
5162
+ *
5163
+ * Pass `{ childHosting: true }` to enable the domain as a **parent**
5164
+ * instead: it publishes one `*.<domain>` wildcard CNAME, serves nothing
5165
+ * at its own name, and hosts are added beneath it afterwards. The mode
5166
+ * is fixed at enable — disable and re-enable to change it.
5167
+ *
5168
+ * The request always carries a JSON body, `{}` by default: the route
5169
+ * requires one as a CSRF barrier.
5130
5170
  */
5131
- async enableOrgDomainSite(orgIdOrUuid, domainUuid) {
5171
+ async enableOrgDomainSite(orgIdOrUuid, domainUuid, options = {}) {
5132
5172
  return this.fetch(`o/${orgIdOrUuid}/domains/${domainUuid}/site`, {
5133
- method: "POST"
5173
+ method: "POST",
5174
+ body: JSON.stringify(options)
5134
5175
  });
5135
5176
  }
5136
5177
  /**
@@ -5142,12 +5183,15 @@ var OrgApi = class extends BaseApiClient {
5142
5183
  /**
5143
5184
  * Pre-enable DNS check: is the site CNAME resolving to the routing
5144
5185
  * endpoint yet? Pure DNS — consumes no enable budget.
5186
+ *
5187
+ * Pass `{ childHosting: true }` to check the mode you intend to enable
5188
+ * in: the wildcard is probed instead of the domain's own CNAME.
5145
5189
  */
5146
- async preflightOrgDomainSite(orgIdOrUuid, domainUuid) {
5190
+ async preflightOrgDomainSite(orgIdOrUuid, domainUuid, options = {}) {
5147
5191
  return this.fetch(
5148
5192
  `o/${orgIdOrUuid}/domains/${domainUuid}/site/preflight`,
5149
- // Empty JSON body: the route requires one as a CSRF barrier.
5150
- { method: "POST", body: JSON.stringify({}) }
5193
+ // JSON body, `{}` by default: the route requires one as a CSRF barrier.
5194
+ { method: "POST", body: JSON.stringify(options) }
5151
5195
  );
5152
5196
  }
5153
5197
  /**
@@ -5159,6 +5203,27 @@ var OrgApi = class extends BaseApiClient {
5159
5203
  { method: "POST" }
5160
5204
  );
5161
5205
  }
5206
+ /**
5207
+ * Create one child host beneath a child-hosting parent domain.
5208
+ *
5209
+ * The child gets its own CloudFront tenant and managed certificate and
5210
+ * needs no customer DNS: the parent's wildcard CNAME already routes it.
5211
+ */
5212
+ async createOrgDomainSiteChildHost(orgIdOrUuid, parentDomainUuid, request) {
5213
+ return this.fetch(
5214
+ `o/${orgIdOrUuid}/domains/${parentDomainUuid}/site/children`,
5215
+ { method: "POST", body: JSON.stringify(request) }
5216
+ );
5217
+ }
5218
+ /**
5219
+ * List the child hosts beneath a child-hosting parent domain, with live
5220
+ * per-host status.
5221
+ */
5222
+ async listOrgDomainSiteChildHosts(orgIdOrUuid, parentDomainUuid) {
5223
+ return this.fetch(
5224
+ `o/${orgIdOrUuid}/domains/${parentDomainUuid}/site/children`
5225
+ );
5226
+ }
5162
5227
  /**
5163
5228
  * Disable custom site routing for an org domain.
5164
5229
  */
@@ -5521,6 +5586,34 @@ var OrgApi = class extends BaseApiClient {
5521
5586
  `o/${orgIdOrUuid}/webhooks/${endpointUuid}/deliveries?limit=${limit}`
5522
5587
  );
5523
5588
  }
5589
+ /**
5590
+ * A representative delivery body for one event type — what the test-send
5591
+ * editor is prefilled with, and the same builder the public event catalog
5592
+ * is generated from. Pass `endpointUuid` to have the sample name that
5593
+ * endpoint and sit in a workspace it actually covers.
5594
+ */
5595
+ async getOrgWebhookEventSample(orgIdOrUuid, eventType, endpointUuid) {
5596
+ const query = endpointUuid ? `?endpointUuid=${encodeURIComponent(endpointUuid)}` : "";
5597
+ return this.fetch(
5598
+ `o/${orgIdOrUuid}/webhooks/event-types/${encodeURIComponent(eventType)}/sample${query}`
5599
+ );
5600
+ }
5601
+ /**
5602
+ * Send one payload to the endpoint now and report what came back.
5603
+ *
5604
+ * Outside the delivery queue: no delivery row, no retry, no effect on the
5605
+ * endpoint's status — but the same signing, egress vetting and outcome
5606
+ * classification a real delivery goes through.
5607
+ */
5608
+ async testOrgWebhookEndpoint(orgIdOrUuid, endpointUuid, data) {
5609
+ return this.fetch(
5610
+ `o/${orgIdOrUuid}/webhooks/${endpointUuid}/test`,
5611
+ {
5612
+ method: "POST",
5613
+ body: JSON.stringify(data)
5614
+ }
5615
+ );
5616
+ }
5524
5617
  };
5525
5618
  function businessProfilePath(orgUuid, legalEntityUuid) {
5526
5619
  return legalEntityUuid ? `o/${orgUuid}/legal-entities/${legalEntityUuid}/business-profile` : `o/${orgUuid}/business-profile`;
@@ -11291,10 +11384,12 @@ var WORKSPACE_METHOD_NAMES = [
11291
11384
  "markEmailAsUnread",
11292
11385
  "markNotificationAsRead",
11293
11386
  "mergeMemberRoles",
11387
+ "previewEmailReply",
11294
11388
  "previewImportMembers",
11295
11389
  "previewMemberWorkflowVoice",
11296
11390
  "previewRenameFieldSlug",
11297
11391
  "previewImportWorkspace",
11392
+ "previewInboxEmail",
11298
11393
  "previewRoutineVoiceReadiness",
11299
11394
  "previewRoutineWorkflowAccess",
11300
11395
  "previewSchedule",
@@ -12195,6 +12290,8 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
12195
12290
  target.getChatEmails = inboxes.getChatEmails.bind(inboxes);
12196
12291
  target.replyToEmail = inboxes.replyToEmail.bind(inboxes);
12197
12292
  target.sendInboxEmail = inboxes.sendInboxEmail.bind(inboxes);
12293
+ target.previewInboxEmail = inboxes.previewInboxEmail.bind(inboxes);
12294
+ target.previewEmailReply = inboxes.previewEmailReply.bind(inboxes);
12198
12295
  target.getNotificationRules = notificationRules.getNotificationRules.bind(notificationRules);
12199
12296
  target.createNotificationRule = notificationRules.createNotificationRule.bind(notificationRules);
12200
12297
  target.updateNotificationRule = notificationRules.updateNotificationRule.bind(notificationRules);
@@ -13453,6 +13550,8 @@ var GravityRailClient = class {
13453
13550
  getChatEmails;
13454
13551
  replyToEmail;
13455
13552
  sendInboxEmail;
13553
+ previewInboxEmail;
13554
+ previewEmailReply;
13456
13555
  getNotificationRules;
13457
13556
  createNotificationRule;
13458
13557
  updateNotificationRule;
@@ -15527,4 +15626,4 @@ export {
15527
15626
  SCOPE_PRESETS,
15528
15627
  getRevisionState
15529
15628
  };
15530
- //# sourceMappingURL=chunk-WDYHAQDY.js.map
15629
+ //# sourceMappingURL=chunk-F3DHHYCJ.js.map