@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.
package/dist/internal.cjs CHANGED
@@ -4415,8 +4415,14 @@ var CalendarsApi = class extends BaseApiClient {
4415
4415
  });
4416
4416
  }
4417
4417
  /** List all calendar event types in the workspace. */
4418
- async getEventTypes(wid) {
4419
- return this.fetch(`w/${wid}/calendar-event-types`);
4418
+ async getEventTypes(wid, options) {
4419
+ const params = new URLSearchParams();
4420
+ if (options?.page !== void 0) params.set("page", String(options.page));
4421
+ if (options?.pageSize !== void 0) params.set("pageSize", String(options.pageSize));
4422
+ const query = params.size ? `?${params}` : "";
4423
+ return this.fetch(
4424
+ `w/${wid}/calendar-event-types${query}`
4425
+ );
4420
4426
  }
4421
4427
  /** Get a single calendar event type by ID. */
4422
4428
  async getEventType(wid, id) {
@@ -7059,6 +7065,32 @@ var InboxesApi = class extends BaseApiClient {
7059
7065
  body: JSON.stringify(body)
7060
7066
  });
7061
7067
  }
7068
+ /**
7069
+ * Render a compose or `email:send` template draft through the same
7070
+ * outbound body-assembly seam (footer, layout wrapper, markdown fallback)
7071
+ * as sending. Preview excludes delivery-specific MIME transformations,
7072
+ * including inline-image content IDs.
7073
+ */
7074
+ async previewInboxEmail(wid, inboxId, body) {
7075
+ return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/preview`, {
7076
+ method: "POST",
7077
+ body: JSON.stringify(body)
7078
+ });
7079
+ }
7080
+ /**
7081
+ * Render a reply draft, including its quote, through outbound body
7082
+ * assembly. Preview excludes delivery-specific MIME transformations,
7083
+ * including inline-image content IDs.
7084
+ */
7085
+ async previewEmailReply(wid, inboxId, emailId, body) {
7086
+ return this.fetch(
7087
+ `w/${wid}/inboxes/${inboxId}/emails/${emailId}/reply-preview`,
7088
+ {
7089
+ method: "POST",
7090
+ body: JSON.stringify(body)
7091
+ }
7092
+ );
7093
+ }
7062
7094
  /**
7063
7095
  * Make a stored email's sender a Member of this workspace.
7064
7096
  *
@@ -8966,10 +8998,19 @@ var OrgApi = class extends BaseApiClient {
8966
8998
  }
8967
8999
  /**
8968
9000
  * Enable custom site routing for a verified org domain.
9001
+ *
9002
+ * Pass `{ childHosting: true }` to enable the domain as a **parent**
9003
+ * instead: it publishes one `*.<domain>` wildcard CNAME, serves nothing
9004
+ * at its own name, and hosts are added beneath it afterwards. The mode
9005
+ * is fixed at enable — disable and re-enable to change it.
9006
+ *
9007
+ * The request always carries a JSON body, `{}` by default: the route
9008
+ * requires one as a CSRF barrier.
8969
9009
  */
8970
- async enableOrgDomainSite(orgIdOrUuid, domainUuid) {
9010
+ async enableOrgDomainSite(orgIdOrUuid, domainUuid, options = {}) {
8971
9011
  return this.fetch(`o/${orgIdOrUuid}/domains/${domainUuid}/site`, {
8972
- method: "POST"
9012
+ method: "POST",
9013
+ body: JSON.stringify(options)
8973
9014
  });
8974
9015
  }
8975
9016
  /**
@@ -8981,12 +9022,15 @@ var OrgApi = class extends BaseApiClient {
8981
9022
  /**
8982
9023
  * Pre-enable DNS check: is the site CNAME resolving to the routing
8983
9024
  * endpoint yet? Pure DNS — consumes no enable budget.
9025
+ *
9026
+ * Pass `{ childHosting: true }` to check the mode you intend to enable
9027
+ * in: the wildcard is probed instead of the domain's own CNAME.
8984
9028
  */
8985
- async preflightOrgDomainSite(orgIdOrUuid, domainUuid) {
9029
+ async preflightOrgDomainSite(orgIdOrUuid, domainUuid, options = {}) {
8986
9030
  return this.fetch(
8987
9031
  `o/${orgIdOrUuid}/domains/${domainUuid}/site/preflight`,
8988
- // Empty JSON body: the route requires one as a CSRF barrier.
8989
- { method: "POST", body: JSON.stringify({}) }
9032
+ // JSON body, `{}` by default: the route requires one as a CSRF barrier.
9033
+ { method: "POST", body: JSON.stringify(options) }
8990
9034
  );
8991
9035
  }
8992
9036
  /**
@@ -8998,6 +9042,27 @@ var OrgApi = class extends BaseApiClient {
8998
9042
  { method: "POST" }
8999
9043
  );
9000
9044
  }
9045
+ /**
9046
+ * Create one child host beneath a child-hosting parent domain.
9047
+ *
9048
+ * The child gets its own CloudFront tenant and managed certificate and
9049
+ * needs no customer DNS: the parent's wildcard CNAME already routes it.
9050
+ */
9051
+ async createOrgDomainSiteChildHost(orgIdOrUuid, parentDomainUuid, request) {
9052
+ return this.fetch(
9053
+ `o/${orgIdOrUuid}/domains/${parentDomainUuid}/site/children`,
9054
+ { method: "POST", body: JSON.stringify(request) }
9055
+ );
9056
+ }
9057
+ /**
9058
+ * List the child hosts beneath a child-hosting parent domain, with live
9059
+ * per-host status.
9060
+ */
9061
+ async listOrgDomainSiteChildHosts(orgIdOrUuid, parentDomainUuid) {
9062
+ return this.fetch(
9063
+ `o/${orgIdOrUuid}/domains/${parentDomainUuid}/site/children`
9064
+ );
9065
+ }
9001
9066
  /**
9002
9067
  * Disable custom site routing for an org domain.
9003
9068
  */
@@ -9360,6 +9425,34 @@ var OrgApi = class extends BaseApiClient {
9360
9425
  `o/${orgIdOrUuid}/webhooks/${endpointUuid}/deliveries?limit=${limit}`
9361
9426
  );
9362
9427
  }
9428
+ /**
9429
+ * A representative delivery body for one event type — what the test-send
9430
+ * editor is prefilled with, and the same builder the public event catalog
9431
+ * is generated from. Pass `endpointUuid` to have the sample name that
9432
+ * endpoint and sit in a workspace it actually covers.
9433
+ */
9434
+ async getOrgWebhookEventSample(orgIdOrUuid, eventType, endpointUuid) {
9435
+ const query = endpointUuid ? `?endpointUuid=${encodeURIComponent(endpointUuid)}` : "";
9436
+ return this.fetch(
9437
+ `o/${orgIdOrUuid}/webhooks/event-types/${encodeURIComponent(eventType)}/sample${query}`
9438
+ );
9439
+ }
9440
+ /**
9441
+ * Send one payload to the endpoint now and report what came back.
9442
+ *
9443
+ * Outside the delivery queue: no delivery row, no retry, no effect on the
9444
+ * endpoint's status — but the same signing, egress vetting and outcome
9445
+ * classification a real delivery goes through.
9446
+ */
9447
+ async testOrgWebhookEndpoint(orgIdOrUuid, endpointUuid, data) {
9448
+ return this.fetch(
9449
+ `o/${orgIdOrUuid}/webhooks/${endpointUuid}/test`,
9450
+ {
9451
+ method: "POST",
9452
+ body: JSON.stringify(data)
9453
+ }
9454
+ );
9455
+ }
9363
9456
  };
9364
9457
  function businessProfilePath(orgUuid, legalEntityUuid) {
9365
9458
  return legalEntityUuid ? `o/${orgUuid}/legal-entities/${legalEntityUuid}/business-profile` : `o/${orgUuid}/business-profile`;
@@ -13638,10 +13731,12 @@ var WORKSPACE_METHOD_NAMES = [
13638
13731
  "markEmailAsUnread",
13639
13732
  "markNotificationAsRead",
13640
13733
  "mergeMemberRoles",
13734
+ "previewEmailReply",
13641
13735
  "previewImportMembers",
13642
13736
  "previewMemberWorkflowVoice",
13643
13737
  "previewRenameFieldSlug",
13644
13738
  "previewImportWorkspace",
13739
+ "previewInboxEmail",
13645
13740
  "previewRoutineVoiceReadiness",
13646
13741
  "previewRoutineWorkflowAccess",
13647
13742
  "previewSchedule",
@@ -14542,6 +14637,8 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
14542
14637
  target.getChatEmails = inboxes.getChatEmails.bind(inboxes);
14543
14638
  target.replyToEmail = inboxes.replyToEmail.bind(inboxes);
14544
14639
  target.sendInboxEmail = inboxes.sendInboxEmail.bind(inboxes);
14640
+ target.previewInboxEmail = inboxes.previewInboxEmail.bind(inboxes);
14641
+ target.previewEmailReply = inboxes.previewEmailReply.bind(inboxes);
14545
14642
  target.getNotificationRules = notificationRules.getNotificationRules.bind(notificationRules);
14546
14643
  target.createNotificationRule = notificationRules.createNotificationRule.bind(notificationRules);
14547
14644
  target.updateNotificationRule = notificationRules.updateNotificationRule.bind(notificationRules);
@@ -15800,6 +15897,8 @@ var GravityRailClient = class {
15800
15897
  getChatEmails;
15801
15898
  replyToEmail;
15802
15899
  sendInboxEmail;
15900
+ previewInboxEmail;
15901
+ previewEmailReply;
15803
15902
  getNotificationRules;
15804
15903
  createNotificationRule;
15805
15904
  updateNotificationRule;