@gitbook/api 0.208.0 → 0.209.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.
@@ -36,9 +36,11 @@ export declare const CHANGE_REQUEST_REVIEW_STATUS_ENUM: ["changes-requested", "a
36
36
  export declare const VARIABLE_NAME_MAX_LENGTH = 64;
37
37
  export declare const VARIABLE_NAME_MIN_LENGTH = 1;
38
38
  export declare const VARIABLE_NAME_PATTERN = "^[a-zA-Z_$][a-zA-Z0-9_$]*$";
39
+ export declare const REVISION_TAG_LABEL_MAX_LENGTH = 50;
40
+ export declare const REVISION_TAG_LABEL_MIN_LENGTH = 1;
39
41
  export declare const REVISION_PAGE_TYPE_ENUM: ["document", "group", "link", "computed"];
40
42
  export declare const REVISION_PAGE_LAYOUT_PRESET_ENUM: ["docs", "editorial", "landing"];
41
- export declare const MEMBER_DISABLED_REASON_ENUM: ["billing", "scim", "admin"];
43
+ export declare const MEMBER_DISABLED_REASON_ENUM: ["billing", "scim", "admin", "gitbook"];
42
44
  export declare const INTEGRATION_TITLE_MAX_LENGTH = 30;
43
45
  export declare const INTEGRATION_TITLE_MIN_LENGTH = 2;
44
46
  export declare const INTEGRATION_DESCRIPTION_MAX_LENGTH = 100;
@@ -69,7 +71,6 @@ export declare const COLLECTION_DESCRIPTION_MIN_LENGTH = 0;
69
71
  export declare const INTEGRATION_INSTALLATION_STATUS_ENUM: ["active", "pending", "paused"];
70
72
  export declare const INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM: ["all", "selected"];
71
73
  export declare const INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM: ["all", "selected"];
72
- export declare const PAGE_FEEDBACK_RATING_ENUM: ["bad", "ok", "good"];
73
74
  export declare const SITE_TYPE_ENUM: ["basic", "premium", "ultimate", "sponsored"];
74
75
  export declare const SITE_TITLE_MAX_LENGTH = 128;
75
76
  export declare const SITE_TITLE_MIN_LENGTH = 2;
@@ -84,6 +85,9 @@ export declare const SITE_ADS_TOPIC_ENUM: ["webdev", "crypto"];
84
85
  export declare const SITE_FEATURE_KEY_ENUM: ["sites-adaptive-content", "sites-advanced-customization", "sites-advanced-insights", "sites-ads", "sites-ai-search", "sites-ai-assistant", "sites-ai-insights", "sites-fix-broken-links", "sites-connections", "sites-content-gaps", "sites-channels", "sites-embed", "sites-api-playground", "sites-basic-customization", "sites-broken-links", "sites-custom-domain", "sites-custom-subdirectory", "sites-full-text-search", "sites-multivariant-site", "sites-no-custom-domain", "sites-page-feedback", "sites-page-traffic-insights", "sites-pdf-export", "sites-preview-deployments", "sites-public-visibility", "sites-redirects", "sites-search-insights", "sites-sections", "sites-seo", "sites-share-links", "sites-style-guide", "sites-unlisted-visibility", "sites-user-contribution", "sites-visitor-authentication", "sites-visitors"];
85
86
  export declare const SITE_CUSTOMIZATION_FEATURE_ENUM: ["header-logo", "header-primary-link", "theme-preset", "premium-fonts", "custom-icons", "footer-logo", "footer-links", "footer-copyright", "semantic-colors"];
86
87
  export declare const CONTENT_KIT_ICON_ENUM: ["close", "edit", "github", "gitlab", "maximize", "email", "settings", "search", "delete", "star", "warning", "link", "link-external", "eye", "eye-off", "lock", "check", "check-circle"];
88
+ export declare const NEW_ORGANIZATION_TITLE_MAX_LENGTH = 80;
89
+ export declare const NEW_ORGANIZATION_TITLE_MIN_LENGTH = 2;
90
+ export declare const NEW_ORGANIZATION_TITLE_PATTERN = "\\S.*\\S";
87
91
  export declare const SITE_ONBOARDING_SOURCE_ENUM: ["markdown-in-git", "import", "template"];
88
92
  export declare const SITE_ONBOARDING_AUDIENCE_ENUM: ["public", "mixed", "protected", "internal"];
89
93
  export declare const SITE_ONBOARDING_INTEREST_ENUM: ["adaptive-content", "api-docs", "proactive-agent"];
@@ -106,12 +110,13 @@ export declare const BILLING_METER_ENUM: ["ai_responses", "ai_agent_responses",
106
110
  export declare const AICREDIT_GRANT_TYPE_ENUM: ["paid", "bonus", "site", "rollover", "custom"];
107
111
  export declare const BILLING_SWITCH_ACTION_ENUM: ["trial", "upgrade", "upgrade_passive", "downgrade", "switch_interval"];
108
112
  export declare const AIUSAGE_INTERVAL_ENUM: ["day", "week", "month", "year"];
109
- export declare const ORGANIZATION_FEATURE_ENUM: ["max-members", "ai", "ai-lens", "pdf-export", "ai-writing", "reusable-content", "translations", "members-advanced-roles", "members-teams", "members-team-owners", "security-saml", "scim", "change-requests-merge-rules"];
113
+ export declare const ORGANIZATION_FEATURE_ENUM: ["max-members", "ai", "ai-lens", "pdf-export", "ai-writing", "reusable-content", "translations", "members-advanced-roles", "members-teams", "members-team-owners", "security-saml", "scim", "verified-domains", "change-requests-merge-rules"];
110
114
  export declare const SAMLPROVIDER_LABEL_MAX_LENGTH = 30;
111
115
  export declare const SAMLPROVIDER_LABEL_MIN_LENGTH = 1;
112
116
  export declare const SAMLPROVIDER_ENTITY_ID_MAX_LENGTH = 1024;
113
117
  export declare const SAMLPROVIDER_CERTIFICATE_MAX_LENGTH = 10000;
114
118
  export declare const SAMLPROVIDER_STATUS_ENUM: ["active", "pending"];
119
+ export declare const ORGANIZATION_DOMAIN_STATUS_ENUM: ["legacy", "pending", "verified", "error"];
115
120
  export declare const SCIMCONNECTION_LABEL_MAX_LENGTH = 100;
116
121
  export declare const SCIMCONNECTION_LABEL_MIN_LENGTH = 1;
117
122
  export declare const SCIMCONNECTION_PROVIDER_ENUM: ["okta", "entra", "generic"];
@@ -213,6 +218,7 @@ export declare const SITE_SETTINGS_SCAN_TOPICS_ENUM: ["auto", "never"];
213
218
  export declare const SITE_SETTINGS_FINDING_CHANGE_REQUESTS_ENUM: ["always", "auto-fixable", "never"];
214
219
  export declare const SITE_INSIGHTS_DISPLAY_CONTEXT_ENUM: ["site", "server", "embed", "mcp"];
215
220
  export declare const SITE_INSIGHTS_MARKDOWN_SOURCE_ENUM: ["page-action"];
221
+ export declare const PAGE_FEEDBACK_RATING_ENUM: ["bad", "ok", "good"];
216
222
  export declare const SITE_INSIGHTS_LINK_POSITION_ENUM: ["announcement", "header", "footer", "sidebar", "content"];
217
223
  export declare const SITE_INSIGHTS_TRADEMARK_PLACEMENT_ENUM: ["sidebar", "ad", "footer", "pdf", "embed"];
218
224
  export declare const SITE_INSIGHTS_AD_PLACEMENT_ENUM: ["aside"];
package/dist/index.cjs CHANGED
@@ -384,6 +384,9 @@ __export(src_exports, {
384
384
  MEMBER_ROLE_ENUM: () => MEMBER_ROLE_ENUM,
385
385
  MemberDisabledReason: () => MemberDisabledReason,
386
386
  MemberRole: () => MemberRole,
387
+ NEW_ORGANIZATION_TITLE_MAX_LENGTH: () => NEW_ORGANIZATION_TITLE_MAX_LENGTH,
388
+ NEW_ORGANIZATION_TITLE_MIN_LENGTH: () => NEW_ORGANIZATION_TITLE_MIN_LENGTH,
389
+ NEW_ORGANIZATION_TITLE_PATTERN: () => NEW_ORGANIZATION_TITLE_PATTERN,
387
390
  OPEN_APISPEC_PROCESSING_ERROR_CODE_ENUM: () => OPEN_APISPEC_PROCESSING_ERROR_CODE_ENUM,
388
391
  OPEN_APISPEC_PROCESSING_STATE_ENUM: () => OPEN_APISPEC_PROCESSING_STATE_ENUM,
389
392
  OPEN_APISPEC_SLUG_MAX_LENGTH: () => OPEN_APISPEC_SLUG_MAX_LENGTH,
@@ -391,6 +394,7 @@ __export(src_exports, {
391
394
  OPEN_APISPEC_SLUG_PATTERN: () => OPEN_APISPEC_SLUG_PATTERN,
392
395
  OPEN_APISPEC_VISIBILITY_ENUM: () => OPEN_APISPEC_VISIBILITY_ENUM,
393
396
  ORGANIZATION_COMMUNITY_TYPE_ENUM: () => ORGANIZATION_COMMUNITY_TYPE_ENUM,
397
+ ORGANIZATION_DOMAIN_STATUS_ENUM: () => ORGANIZATION_DOMAIN_STATUS_ENUM,
394
398
  ORGANIZATION_FEATURE_ENUM: () => ORGANIZATION_FEATURE_ENUM,
395
399
  ORGANIZATION_HOSTNAME_MAX_LENGTH: () => ORGANIZATION_HOSTNAME_MAX_LENGTH,
396
400
  ORGANIZATION_HOSTNAME_MIN_LENGTH: () => ORGANIZATION_HOSTNAME_MIN_LENGTH,
@@ -405,6 +409,7 @@ __export(src_exports, {
405
409
  OpenAPISpecProcessingState: () => OpenAPISpecProcessingState,
406
410
  OpenAPISpecVisibility: () => OpenAPISpecVisibility,
407
411
  OrganizationCommunityType: () => OrganizationCommunityType,
412
+ OrganizationDomainStatus: () => OrganizationDomainStatus,
408
413
  OrganizationFeature: () => OrganizationFeature,
409
414
  OrganizationType: () => OrganizationType,
410
415
  OrganizationUseCase: () => OrganizationUseCase,
@@ -419,6 +424,8 @@ __export(src_exports, {
419
424
  REVISION_PAGE_SLUG_MIN_LENGTH: () => REVISION_PAGE_SLUG_MIN_LENGTH,
420
425
  REVISION_PAGE_TYPE_ENUM: () => REVISION_PAGE_TYPE_ENUM,
421
426
  REVISION_SEMANTIC_CHANGE_TYPE_ENUM: () => REVISION_SEMANTIC_CHANGE_TYPE_ENUM,
427
+ REVISION_TAG_LABEL_MAX_LENGTH: () => REVISION_TAG_LABEL_MAX_LENGTH,
428
+ REVISION_TAG_LABEL_MIN_LENGTH: () => REVISION_TAG_LABEL_MIN_LENGTH,
422
429
  RevisionPageDocumentCoverTextColor: () => RevisionPageDocumentCoverTextColor,
423
430
  RevisionPageLayoutOptionsCoverMask: () => RevisionPageLayoutOptionsCoverMask,
424
431
  RevisionPageLayoutOptionsCoverSize: () => RevisionPageLayoutOptionsCoverSize,
@@ -601,7 +608,7 @@ module.exports = __toCommonJS(src_exports);
601
608
 
602
609
  // package.json
603
610
  var name = "@gitbook/api";
604
- var version = "0.208.0";
611
+ var version = "0.209.1";
605
612
 
606
613
  // src/client.ts
607
614
  var import_event_iterator = __toESM(require_node(), 1);
@@ -612,49 +619,134 @@ var ParseError = class extends Error {
612
619
  super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
613
620
  }
614
621
  };
622
+ var LF = 10;
623
+ var CR = 13;
624
+ var SPACE = 32;
615
625
  function noop(_arg) {
616
626
  }
617
- function createParser(callbacks) {
618
- if (typeof callbacks == "function")
627
+ function createParser(config) {
628
+ if (typeof config == "function")
619
629
  throw new TypeError(
620
- "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
630
+ "`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?"
621
631
  );
622
- const { onEvent = noop, onError = noop, onRetry = noop, onComment } = callbacks;
623
- let incompleteLine = "", isFirstChunk = true, id, data = "", eventType = "";
624
- function feed(newChunk) {
625
- const chunk = isFirstChunk ? newChunk.replace(/^\xEF\xBB\xBF/, "") : newChunk, [complete, incomplete] = splitLines(`${incompleteLine}${chunk}`);
626
- for (const line of complete)
627
- parseLine(line);
628
- incompleteLine = incomplete, isFirstChunk = false;
632
+ const { onEvent = noop, onError = noop, onRetry = noop, onComment, maxBufferSize } = config, pendingFragments = [];
633
+ let pendingFragmentsLength = 0, isFirstChunk = true, id, data = "", dataLines = 0, eventType, terminated = false;
634
+ function feed(chunk) {
635
+ if (terminated)
636
+ throw new Error(
637
+ "Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing."
638
+ );
639
+ if (isFirstChunk && (isFirstChunk = false, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {
640
+ const trailing2 = processLines(chunk);
641
+ trailing2 !== "" && (pendingFragments.push(trailing2), pendingFragmentsLength = trailing2.length), checkBufferSize();
642
+ return;
643
+ }
644
+ if (chunk.indexOf(`
645
+ `) === -1 && chunk.indexOf("\r") === -1) {
646
+ pendingFragments.push(chunk), pendingFragmentsLength += chunk.length, checkBufferSize();
647
+ return;
648
+ }
649
+ pendingFragments.push(chunk);
650
+ const input = pendingFragments.join("");
651
+ pendingFragments.length = 0, pendingFragmentsLength = 0;
652
+ const trailing = processLines(input);
653
+ trailing !== "" && (pendingFragments.push(trailing), pendingFragmentsLength = trailing.length), checkBufferSize();
654
+ }
655
+ function checkBufferSize() {
656
+ maxBufferSize !== void 0 && (pendingFragmentsLength + data.length <= maxBufferSize || (terminated = true, pendingFragments.length = 0, pendingFragmentsLength = 0, id = void 0, data = "", dataLines = 0, eventType = void 0, onError(
657
+ new ParseError(`Buffered data exceeded max buffer size of ${maxBufferSize} characters`, {
658
+ type: "max-buffer-size-exceeded"
659
+ })
660
+ )));
629
661
  }
630
- function parseLine(line) {
631
- if (line === "") {
662
+ function processLines(chunk) {
663
+ let searchIndex = 0;
664
+ if (chunk.indexOf("\r") === -1) {
665
+ let lfIndex = chunk.indexOf(`
666
+ `, searchIndex);
667
+ for (; lfIndex !== -1; ) {
668
+ if (searchIndex === lfIndex) {
669
+ dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = "", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
670
+ `, searchIndex);
671
+ continue;
672
+ }
673
+ const firstCharCode = chunk.charCodeAt(searchIndex);
674
+ if (isDataPrefix(chunk, searchIndex, firstCharCode)) {
675
+ const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);
676
+ if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF) {
677
+ onEvent({ id, event: eventType, data: value }), id = void 0, data = "", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`
678
+ `, searchIndex);
679
+ continue;
680
+ }
681
+ data = dataLines === 0 ? value : `${data}
682
+ ${value}`, dataLines++;
683
+ } else
684
+ isEventPrefix(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(
685
+ chunk.charCodeAt(searchIndex + 6) === SPACE ? searchIndex + 7 : searchIndex + 6,
686
+ lfIndex
687
+ ) || void 0 : parseLine(chunk, searchIndex, lfIndex);
688
+ searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
689
+ `, searchIndex);
690
+ }
691
+ return chunk.slice(searchIndex);
692
+ }
693
+ for (; searchIndex < chunk.length; ) {
694
+ const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
695
+ `, searchIndex);
696
+ let lineEnd = -1;
697
+ if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)
698
+ break;
699
+ parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR && chunk.charCodeAt(searchIndex) === LF && searchIndex++;
700
+ }
701
+ return chunk.slice(searchIndex);
702
+ }
703
+ function parseLine(chunk, start, end) {
704
+ if (start === end) {
632
705
  dispatchEvent();
633
706
  return;
634
707
  }
635
- if (line.startsWith(":")) {
636
- onComment && onComment(line.slice(line.startsWith(": ") ? 2 : 1));
708
+ const firstCharCode = chunk.charCodeAt(start);
709
+ if (isDataPrefix(chunk, start, firstCharCode)) {
710
+ const valueStart = chunk.charCodeAt(start + 5) === SPACE ? start + 6 : start + 5, value2 = chunk.slice(valueStart, end);
711
+ data = dataLines === 0 ? value2 : `${data}
712
+ ${value2}`, dataLines++;
637
713
  return;
638
714
  }
639
- const fieldSeparatorIndex = line.indexOf(":");
640
- if (fieldSeparatorIndex !== -1) {
641
- const field = line.slice(0, fieldSeparatorIndex), offset = line[fieldSeparatorIndex + 1] === " " ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
642
- processField(field, value, line);
715
+ if (isEventPrefix(chunk, start, firstCharCode)) {
716
+ eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE ? start + 7 : start + 6, end) || void 0;
643
717
  return;
644
718
  }
645
- processField(line, "", line);
719
+ if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {
720
+ const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);
721
+ value2.includes("\0") || (id = value2);
722
+ return;
723
+ }
724
+ if (firstCharCode === 58) {
725
+ if (onComment) {
726
+ const line2 = chunk.slice(start, end);
727
+ onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE ? 2 : 1));
728
+ }
729
+ return;
730
+ }
731
+ const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(":");
732
+ if (fieldSeparatorIndex === -1) {
733
+ processField(line, "", line);
734
+ return;
735
+ }
736
+ const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
737
+ processField(field, value, line);
646
738
  }
647
739
  function processField(field, value, line) {
648
740
  switch (field) {
649
741
  case "event":
650
- eventType = value;
742
+ eventType = value || void 0;
651
743
  break;
652
744
  case "data":
653
- data = `${data}${value}
654
- `;
745
+ data = dataLines === 0 ? value : `${data}
746
+ ${value}`, dataLines++;
655
747
  break;
656
748
  case "id":
657
- id = value.includes("\0") ? void 0 : value;
749
+ value.includes("\0") || (id = value);
658
750
  break;
659
751
  case "retry":
660
752
  /^\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(
@@ -676,35 +768,26 @@ function createParser(callbacks) {
676
768
  }
677
769
  }
678
770
  function dispatchEvent() {
679
- data.length > 0 && onEvent({
771
+ dataLines > 0 && onEvent({
680
772
  id,
681
- event: eventType || void 0,
682
- data: data.endsWith(`
683
- `) ? data.slice(0, -1) : data
684
- }), id = void 0, data = "", eventType = "";
773
+ event: eventType,
774
+ data
775
+ }), id = void 0, data = "", dataLines = 0, eventType = void 0;
685
776
  }
686
777
  function reset(options = {}) {
687
- incompleteLine && options.consume && parseLine(incompleteLine), isFirstChunk = true, id = void 0, data = "", eventType = "", incompleteLine = "";
778
+ if (options.consume && pendingFragments.length > 0) {
779
+ const incompleteLine = pendingFragments.join("");
780
+ parseLine(incompleteLine, 0, incompleteLine.length);
781
+ }
782
+ isFirstChunk = true, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0, pendingFragmentsLength = 0, terminated = false;
688
783
  }
689
784
  return { feed, reset };
690
785
  }
691
- function splitLines(chunk) {
692
- const lines = [];
693
- let incompleteLine = "", searchIndex = 0;
694
- for (; searchIndex < chunk.length; ) {
695
- const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
696
- `, searchIndex);
697
- let lineEnd = -1;
698
- if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = Math.min(crIndex, lfIndex) : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1) {
699
- incompleteLine = chunk.slice(searchIndex);
700
- break;
701
- } else {
702
- const line = chunk.slice(searchIndex, lineEnd);
703
- lines.push(line), searchIndex = lineEnd + 1, chunk[searchIndex - 1] === "\r" && chunk[searchIndex] === `
704
- ` && searchIndex++;
705
- }
706
- }
707
- return [lines, incompleteLine];
786
+ function isDataPrefix(chunk, i, firstCharCode) {
787
+ return firstCharCode === 100 && chunk.charCodeAt(i + 1) === 97 && chunk.charCodeAt(i + 2) === 116 && chunk.charCodeAt(i + 3) === 97 && chunk.charCodeAt(i + 4) === 58;
788
+ }
789
+ function isEventPrefix(chunk, i, firstCharCode) {
790
+ return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;
708
791
  }
709
792
 
710
793
  // src/client.ts
@@ -1022,6 +1105,12 @@ var SiteInsightsLinkPosition = /* @__PURE__ */ ((SiteInsightsLinkPosition2) => {
1022
1105
  SiteInsightsLinkPosition2["Content"] = "content";
1023
1106
  return SiteInsightsLinkPosition2;
1024
1107
  })(SiteInsightsLinkPosition || {});
1108
+ var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
1109
+ PageFeedbackRating2["Bad"] = "bad";
1110
+ PageFeedbackRating2["Ok"] = "ok";
1111
+ PageFeedbackRating2["Good"] = "good";
1112
+ return PageFeedbackRating2;
1113
+ })(PageFeedbackRating || {});
1025
1114
  var SiteInsightsMarkdownSource = /* @__PURE__ */ ((SiteInsightsMarkdownSource2) => {
1026
1115
  SiteInsightsMarkdownSource2["PageAction"] = "page-action";
1027
1116
  return SiteInsightsMarkdownSource2;
@@ -1495,6 +1584,13 @@ var SCIMConnectionProvider = /* @__PURE__ */ ((SCIMConnectionProvider2) => {
1495
1584
  SCIMConnectionProvider2["Generic"] = "generic";
1496
1585
  return SCIMConnectionProvider2;
1497
1586
  })(SCIMConnectionProvider || {});
1587
+ var OrganizationDomainStatus = /* @__PURE__ */ ((OrganizationDomainStatus2) => {
1588
+ OrganizationDomainStatus2["Legacy"] = "legacy";
1589
+ OrganizationDomainStatus2["Pending"] = "pending";
1590
+ OrganizationDomainStatus2["Verified"] = "verified";
1591
+ OrganizationDomainStatus2["Error"] = "error";
1592
+ return OrganizationDomainStatus2;
1593
+ })(OrganizationDomainStatus || {});
1498
1594
  var SAMLProviderStatus = /* @__PURE__ */ ((SAMLProviderStatus2) => {
1499
1595
  SAMLProviderStatus2["Active"] = "active";
1500
1596
  SAMLProviderStatus2["Pending"] = "pending";
@@ -1513,6 +1609,7 @@ var OrganizationFeature = /* @__PURE__ */ ((OrganizationFeature2) => {
1513
1609
  OrganizationFeature2["MembersTeamOwners"] = "members-team-owners";
1514
1610
  OrganizationFeature2["SecuritySaml"] = "security-saml";
1515
1611
  OrganizationFeature2["Scim"] = "scim";
1612
+ OrganizationFeature2["VerifiedDomains"] = "verified-domains";
1516
1613
  OrganizationFeature2["ChangeRequestsMergeRules"] = "change-requests-merge-rules";
1517
1614
  return OrganizationFeature2;
1518
1615
  })(OrganizationFeature || {});
@@ -1659,12 +1756,6 @@ var SiteType = /* @__PURE__ */ ((SiteType2) => {
1659
1756
  SiteType2["Sponsored"] = "sponsored";
1660
1757
  return SiteType2;
1661
1758
  })(SiteType || {});
1662
- var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
1663
- PageFeedbackRating2["Bad"] = "bad";
1664
- PageFeedbackRating2["Ok"] = "ok";
1665
- PageFeedbackRating2["Good"] = "good";
1666
- return PageFeedbackRating2;
1667
- })(PageFeedbackRating || {});
1668
1759
  var IntegrationInstallationSiteSelection = /* @__PURE__ */ ((IntegrationInstallationSiteSelection2) => {
1669
1760
  IntegrationInstallationSiteSelection2["All"] = "all";
1670
1761
  IntegrationInstallationSiteSelection2["Selected"] = "selected";
@@ -1786,6 +1877,7 @@ var MemberDisabledReason = /* @__PURE__ */ ((MemberDisabledReason2) => {
1786
1877
  MemberDisabledReason2["Billing"] = "billing";
1787
1878
  MemberDisabledReason2["Scim"] = "scim";
1788
1879
  MemberDisabledReason2["Admin"] = "admin";
1880
+ MemberDisabledReason2["Gitbook"] = "gitbook";
1789
1881
  return MemberDisabledReason2;
1790
1882
  })(MemberDisabledReason || {});
1791
1883
  var RevisionPageLayoutPreset = /* @__PURE__ */ ((RevisionPageLayoutPreset2) => {
@@ -3241,6 +3333,33 @@ var Api = class extends HttpClient {
3241
3333
  format: "json",
3242
3334
  ...params
3243
3335
  }),
3336
+ createIntegrationOAuthTransaction: (integrationName, installationId, data, params = {}) => this.request({
3337
+ path: `/integrations/${integrationName}/installations/${installationId}/oauth-transactions`,
3338
+ method: "POST",
3339
+ body: data,
3340
+ secure: true,
3341
+ type: "application/json" /* Json */,
3342
+ format: "json",
3343
+ ...params
3344
+ }),
3345
+ consumeIntegrationOAuthTransaction: (integrationName, transactionId, data, params = {}) => this.request({
3346
+ path: `/integrations/${integrationName}/oauth-transactions/${transactionId}/consume`,
3347
+ method: "POST",
3348
+ body: data,
3349
+ secure: true,
3350
+ type: "application/json" /* Json */,
3351
+ format: "json",
3352
+ ...params
3353
+ }),
3354
+ confirmIntegrationOAuthTransaction: (integrationName, transactionId, data, params = {}) => this.request({
3355
+ path: `/integrations/${integrationName}/oauth-transactions/${transactionId}/confirm`,
3356
+ method: "POST",
3357
+ body: data,
3358
+ secure: true,
3359
+ type: "application/json" /* Json */,
3360
+ format: "json",
3361
+ ...params
3362
+ }),
3244
3363
  listIntegrationInstallationSpaces: (integrationName, installationId, query, params = {}) => this.request({
3245
3364
  path: `/integrations/${integrationName}/installations/${installationId}/spaces`,
3246
3365
  method: "GET",
@@ -3722,6 +3841,51 @@ var Api = class extends HttpClient {
3722
3841
  secure: true,
3723
3842
  ...params
3724
3843
  }),
3844
+ listOrganizationDomains: (organizationId, params = {}) => this.request({
3845
+ path: `/orgs/${organizationId}/domains`,
3846
+ method: "GET",
3847
+ secure: true,
3848
+ format: "json",
3849
+ ...params
3850
+ }),
3851
+ addOrganizationDomain: (organizationId, data, params = {}) => this.request({
3852
+ path: `/orgs/${organizationId}/domains`,
3853
+ method: "POST",
3854
+ body: data,
3855
+ secure: true,
3856
+ type: "application/json" /* Json */,
3857
+ format: "json",
3858
+ ...params
3859
+ }),
3860
+ getOrganizationDomain: (organizationId, emailDomain, params = {}) => this.request({
3861
+ path: `/orgs/${organizationId}/domains/${emailDomain}`,
3862
+ method: "GET",
3863
+ secure: true,
3864
+ format: "json",
3865
+ ...params
3866
+ }),
3867
+ updateOrganizationDomain: (organizationId, emailDomain, data, params = {}) => this.request({
3868
+ path: `/orgs/${organizationId}/domains/${emailDomain}`,
3869
+ method: "PATCH",
3870
+ body: data,
3871
+ secure: true,
3872
+ type: "application/json" /* Json */,
3873
+ format: "json",
3874
+ ...params
3875
+ }),
3876
+ deleteOrganizationDomain: (organizationId, emailDomain, params = {}) => this.request({
3877
+ path: `/orgs/${organizationId}/domains/${emailDomain}`,
3878
+ method: "DELETE",
3879
+ secure: true,
3880
+ ...params
3881
+ }),
3882
+ verifyOrganizationDomain: (organizationId, emailDomain, params = {}) => this.request({
3883
+ path: `/orgs/${organizationId}/domains/${emailDomain}/verify`,
3884
+ method: "POST",
3885
+ secure: true,
3886
+ format: "json",
3887
+ ...params
3888
+ }),
3725
3889
  listOrganizationScimConnections: (organizationId, params = {}) => this.request({
3726
3890
  path: `/orgs/${organizationId}/scim/connections`,
3727
3891
  method: "GET",
@@ -4511,15 +4675,6 @@ var Api = class extends HttpClient {
4511
4675
  format: "json",
4512
4676
  ...params
4513
4677
  }),
4514
- updateSiteFindingById: (organizationId, siteId, siteFindingId, data, params = {}) => this.request({
4515
- path: `/orgs/${organizationId}/sites/${siteId}/findings/${siteFindingId}`,
4516
- method: "PATCH",
4517
- body: data,
4518
- secure: true,
4519
- type: "application/json" /* Json */,
4520
- format: "json",
4521
- ...params
4522
- }),
4523
4678
  listChangeRequestsForSiteFinding: (organizationId, siteId, siteFindingId, query, params = {}) => this.request({
4524
4679
  path: `/orgs/${organizationId}/sites/${siteId}/findings/${siteFindingId}/change-requests`,
4525
4680
  method: "GET",
@@ -5345,9 +5500,11 @@ var CHANGE_REQUEST_REVIEW_STATUS_ENUM = ["changes-requested", "approved"];
5345
5500
  var VARIABLE_NAME_MAX_LENGTH = 64;
5346
5501
  var VARIABLE_NAME_MIN_LENGTH = 1;
5347
5502
  var VARIABLE_NAME_PATTERN = "^[a-zA-Z_$][a-zA-Z0-9_$]*$";
5503
+ var REVISION_TAG_LABEL_MAX_LENGTH = 50;
5504
+ var REVISION_TAG_LABEL_MIN_LENGTH = 1;
5348
5505
  var REVISION_PAGE_TYPE_ENUM = ["document", "group", "link", "computed"];
5349
5506
  var REVISION_PAGE_LAYOUT_PRESET_ENUM = ["docs", "editorial", "landing"];
5350
- var MEMBER_DISABLED_REASON_ENUM = ["billing", "scim", "admin"];
5507
+ var MEMBER_DISABLED_REASON_ENUM = ["billing", "scim", "admin", "gitbook"];
5351
5508
  var INTEGRATION_TITLE_MAX_LENGTH = 30;
5352
5509
  var INTEGRATION_TITLE_MIN_LENGTH = 2;
5353
5510
  var INTEGRATION_DESCRIPTION_MAX_LENGTH = 100;
@@ -5378,7 +5535,6 @@ var COLLECTION_DESCRIPTION_MIN_LENGTH = 0;
5378
5535
  var INTEGRATION_INSTALLATION_STATUS_ENUM = ["active", "pending", "paused"];
5379
5536
  var INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM = ["all", "selected"];
5380
5537
  var INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM = ["all", "selected"];
5381
- var PAGE_FEEDBACK_RATING_ENUM = ["bad", "ok", "good"];
5382
5538
  var SITE_TYPE_ENUM = ["basic", "premium", "ultimate", "sponsored"];
5383
5539
  var SITE_TITLE_MAX_LENGTH = 128;
5384
5540
  var SITE_TITLE_MIN_LENGTH = 2;
@@ -5393,6 +5549,9 @@ var SITE_ADS_TOPIC_ENUM = ["webdev", "crypto"];
5393
5549
  var SITE_FEATURE_KEY_ENUM = ["sites-adaptive-content", "sites-advanced-customization", "sites-advanced-insights", "sites-ads", "sites-ai-search", "sites-ai-assistant", "sites-ai-insights", "sites-fix-broken-links", "sites-connections", "sites-content-gaps", "sites-channels", "sites-embed", "sites-api-playground", "sites-basic-customization", "sites-broken-links", "sites-custom-domain", "sites-custom-subdirectory", "sites-full-text-search", "sites-multivariant-site", "sites-no-custom-domain", "sites-page-feedback", "sites-page-traffic-insights", "sites-pdf-export", "sites-preview-deployments", "sites-public-visibility", "sites-redirects", "sites-search-insights", "sites-sections", "sites-seo", "sites-share-links", "sites-style-guide", "sites-unlisted-visibility", "sites-user-contribution", "sites-visitor-authentication", "sites-visitors"];
5394
5550
  var SITE_CUSTOMIZATION_FEATURE_ENUM = ["header-logo", "header-primary-link", "theme-preset", "premium-fonts", "custom-icons", "footer-logo", "footer-links", "footer-copyright", "semantic-colors"];
5395
5551
  var CONTENT_KIT_ICON_ENUM = ["close", "edit", "github", "gitlab", "maximize", "email", "settings", "search", "delete", "star", "warning", "link", "link-external", "eye", "eye-off", "lock", "check", "check-circle"];
5552
+ var NEW_ORGANIZATION_TITLE_MAX_LENGTH = 80;
5553
+ var NEW_ORGANIZATION_TITLE_MIN_LENGTH = 2;
5554
+ var NEW_ORGANIZATION_TITLE_PATTERN = "\\S.*\\S";
5396
5555
  var SITE_ONBOARDING_SOURCE_ENUM = ["markdown-in-git", "import", "template"];
5397
5556
  var SITE_ONBOARDING_AUDIENCE_ENUM = ["public", "mixed", "protected", "internal"];
5398
5557
  var SITE_ONBOARDING_INTEREST_ENUM = ["adaptive-content", "api-docs", "proactive-agent"];
@@ -5415,12 +5574,13 @@ var BILLING_METER_ENUM = ["ai_responses", "ai_agent_responses", "translation_wor
5415
5574
  var AICREDIT_GRANT_TYPE_ENUM = ["paid", "bonus", "site", "rollover", "custom"];
5416
5575
  var BILLING_SWITCH_ACTION_ENUM = ["trial", "upgrade", "upgrade_passive", "downgrade", "switch_interval"];
5417
5576
  var AIUSAGE_INTERVAL_ENUM = ["day", "week", "month", "year"];
5418
- var ORGANIZATION_FEATURE_ENUM = ["max-members", "ai", "ai-lens", "pdf-export", "ai-writing", "reusable-content", "translations", "members-advanced-roles", "members-teams", "members-team-owners", "security-saml", "scim", "change-requests-merge-rules"];
5577
+ var ORGANIZATION_FEATURE_ENUM = ["max-members", "ai", "ai-lens", "pdf-export", "ai-writing", "reusable-content", "translations", "members-advanced-roles", "members-teams", "members-team-owners", "security-saml", "scim", "verified-domains", "change-requests-merge-rules"];
5419
5578
  var SAMLPROVIDER_LABEL_MAX_LENGTH = 30;
5420
5579
  var SAMLPROVIDER_LABEL_MIN_LENGTH = 1;
5421
5580
  var SAMLPROVIDER_ENTITY_ID_MAX_LENGTH = 1024;
5422
5581
  var SAMLPROVIDER_CERTIFICATE_MAX_LENGTH = 1e4;
5423
5582
  var SAMLPROVIDER_STATUS_ENUM = ["active", "pending"];
5583
+ var ORGANIZATION_DOMAIN_STATUS_ENUM = ["legacy", "pending", "verified", "error"];
5424
5584
  var SCIMCONNECTION_LABEL_MAX_LENGTH = 100;
5425
5585
  var SCIMCONNECTION_LABEL_MIN_LENGTH = 1;
5426
5586
  var SCIMCONNECTION_PROVIDER_ENUM = ["okta", "entra", "generic"];
@@ -5522,6 +5682,7 @@ var SITE_SETTINGS_SCAN_TOPICS_ENUM = ["auto", "never"];
5522
5682
  var SITE_SETTINGS_FINDING_CHANGE_REQUESTS_ENUM = ["always", "auto-fixable", "never"];
5523
5683
  var SITE_INSIGHTS_DISPLAY_CONTEXT_ENUM = ["site", "server", "embed", "mcp"];
5524
5684
  var SITE_INSIGHTS_MARKDOWN_SOURCE_ENUM = ["page-action"];
5685
+ var PAGE_FEEDBACK_RATING_ENUM = ["bad", "ok", "good"];
5525
5686
  var SITE_INSIGHTS_LINK_POSITION_ENUM = ["announcement", "header", "footer", "sidebar", "content"];
5526
5687
  var SITE_INSIGHTS_TRADEMARK_PLACEMENT_ENUM = ["sidebar", "ad", "footer", "pdf", "embed"];
5527
5688
  var SITE_INSIGHTS_AD_PLACEMENT_ENUM = ["aside"];
@@ -5842,6 +6003,9 @@ var GitBookAPI = class extends Api {
5842
6003
  MEMBER_ROLE_ENUM,
5843
6004
  MemberDisabledReason,
5844
6005
  MemberRole,
6006
+ NEW_ORGANIZATION_TITLE_MAX_LENGTH,
6007
+ NEW_ORGANIZATION_TITLE_MIN_LENGTH,
6008
+ NEW_ORGANIZATION_TITLE_PATTERN,
5845
6009
  OPEN_APISPEC_PROCESSING_ERROR_CODE_ENUM,
5846
6010
  OPEN_APISPEC_PROCESSING_STATE_ENUM,
5847
6011
  OPEN_APISPEC_SLUG_MAX_LENGTH,
@@ -5849,6 +6013,7 @@ var GitBookAPI = class extends Api {
5849
6013
  OPEN_APISPEC_SLUG_PATTERN,
5850
6014
  OPEN_APISPEC_VISIBILITY_ENUM,
5851
6015
  ORGANIZATION_COMMUNITY_TYPE_ENUM,
6016
+ ORGANIZATION_DOMAIN_STATUS_ENUM,
5852
6017
  ORGANIZATION_FEATURE_ENUM,
5853
6018
  ORGANIZATION_HOSTNAME_MAX_LENGTH,
5854
6019
  ORGANIZATION_HOSTNAME_MIN_LENGTH,
@@ -5863,6 +6028,7 @@ var GitBookAPI = class extends Api {
5863
6028
  OpenAPISpecProcessingState,
5864
6029
  OpenAPISpecVisibility,
5865
6030
  OrganizationCommunityType,
6031
+ OrganizationDomainStatus,
5866
6032
  OrganizationFeature,
5867
6033
  OrganizationType,
5868
6034
  OrganizationUseCase,
@@ -5877,6 +6043,8 @@ var GitBookAPI = class extends Api {
5877
6043
  REVISION_PAGE_SLUG_MIN_LENGTH,
5878
6044
  REVISION_PAGE_TYPE_ENUM,
5879
6045
  REVISION_SEMANTIC_CHANGE_TYPE_ENUM,
6046
+ REVISION_TAG_LABEL_MAX_LENGTH,
6047
+ REVISION_TAG_LABEL_MIN_LENGTH,
5880
6048
  RevisionPageDocumentCoverTextColor,
5881
6049
  RevisionPageLayoutOptionsCoverMask,
5882
6050
  RevisionPageLayoutOptionsCoverSize,