@gitbook/api 0.120.0 → 0.122.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.
package/dist/client.d.ts CHANGED
@@ -109,18 +109,18 @@ export interface GitSyncState {
109
109
  /** When the Git provider details were last updated */
110
110
  updatedAt?: Timestamp;
111
111
  }
112
- /** Custom backend for Visitor Authentication */
112
+ /** Custom backend for authenticated access */
113
113
  export interface VisitorAuthCustomBackend {
114
- /** Custom backend for Visitor Authentication */
114
+ /** Custom backend for authenticated access */
115
115
  backend: 'custom';
116
116
  }
117
- /** Integration backend for Visitor Authentication */
117
+ /** Integration backend for authenticated access */
118
118
  export interface VisitorAuthIntegrationBackend {
119
- /** Integration as backend for Visitor Authentication */
119
+ /** Integration as backend for authenticated access */
120
120
  backend: 'integration';
121
121
  }
122
122
  export type VisitorAuth = VisitorAuthCustomBackend | (VisitorAuthIntegrationBackend & {
123
- /** Name of integration being used as the backend for Visitor Authentication */
123
+ /** Name of integration being used as the backend for authenticated access */
124
124
  integration: string;
125
125
  });
126
126
  /**
@@ -580,6 +580,15 @@ export interface DocumentInlineEmoji {
580
580
  };
581
581
  isVoid: true;
582
582
  }
583
+ export interface DocumentInlineIcon {
584
+ object: 'inline';
585
+ type: 'icon';
586
+ key?: string;
587
+ data: {
588
+ icon: string;
589
+ };
590
+ isVoid: true;
591
+ }
583
592
  export interface DocumentInlineExpression {
584
593
  object: 'inline';
585
594
  type: 'expression';
@@ -604,9 +613,16 @@ export interface DocumentBlockParagraph {
604
613
  key?: string;
605
614
  nodes: (DocumentInline | DocumentText)[];
606
615
  isVoid?: false;
607
- data?: object;
616
+ data?: {
617
+ align?: TextAlignment;
618
+ };
619
+ }
620
+ export type DocumentInline = DocumentInlineLink | DocumentInlineEmoji | DocumentInlineIcon | DocumentInlineExpression | DocumentInlineMath | DocumentInlineImage | DocumentInlineAnnotation | DocumentInlineMention | DocumentInlineButton;
621
+ export declare enum TextAlignment {
622
+ Start = "start",
623
+ Center = "center",
624
+ End = "end"
608
625
  }
609
- export type DocumentInline = DocumentInlineLink | DocumentInlineEmoji | DocumentInlineExpression | DocumentInlineMath | DocumentInlineImage | DocumentInlineAnnotation | DocumentInlineMention | DocumentInlineButton;
610
626
  export interface DocumentBlockHeading {
611
627
  object: 'block';
612
628
  type: 'heading-1' | 'heading-2' | 'heading-3';
@@ -615,6 +631,7 @@ export interface DocumentBlockHeading {
615
631
  data: {
616
632
  /** @pattern ^[-a-z0-9.+_]+$ */
617
633
  id?: string;
634
+ align?: TextAlignment;
618
635
  };
619
636
  meta?: {
620
637
  /** Unique ID to be used in an URL for the block. */
@@ -640,7 +657,7 @@ export interface DocumentBlockCodeLine {
640
657
  object: 'block';
641
658
  type: 'code-line';
642
659
  key?: string;
643
- nodes: (DocumentText | DocumentInlineAnnotation)[];
660
+ nodes: (DocumentText | DocumentInlineAnnotation | DocumentInlineExpression)[];
644
661
  data: {
645
662
  highlighted?: boolean;
646
663
  };
@@ -1114,7 +1131,7 @@ export interface DocumentBlockColumn {
1114
1131
  object: 'block';
1115
1132
  type: 'column';
1116
1133
  key?: string;
1117
- nodes: (DocumentBlocksEssentials | DocumentBlockImages)[];
1134
+ nodes: (DocumentBlocksEssentials | DocumentBlockImages | DocumentBlockCode | DocumentBlockHint | DocumentBlockContentRef | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockIntegration | DocumentBlockMath | DocumentBlockQuote)[];
1118
1135
  isVoid?: false;
1119
1136
  data: {
1120
1137
  width?: Length;
@@ -1148,6 +1165,8 @@ export interface DocumentInlineButton {
1148
1165
  data: {
1149
1166
  label: string;
1150
1167
  kind: 'primary' | 'secondary';
1168
+ /** Name of the icon */
1169
+ icon?: Icon;
1151
1170
  } & {
1152
1171
  /** A relative reference to content in GitBook. */
1153
1172
  ref: ContentRef;
@@ -2933,7 +2952,7 @@ export type FetchEvent = BaseEvent & {
2933
2952
  export type FetchPublishedScriptEvent = (SpaceEvent | SiteEvent) & {
2934
2953
  type: 'fetch_published_script';
2935
2954
  };
2936
- /** Common properties for all events related to visitor authentication from an installation */
2955
+ /** Common properties for all events related to authenticated access from an installation */
2937
2956
  export type FetchVisitorAuthenticationEvent = (SpaceEvent | SiteEvent) & {
2938
2957
  type: 'fetch_visitor_authentication';
2939
2958
  location?: string;
@@ -3168,6 +3187,36 @@ export declare enum SiteAgentsContext {
3168
3187
  Excluded = "excluded",
3169
3188
  Included = "included"
3170
3189
  }
3190
+ /** The site feature identifier */
3191
+ export declare enum SiteFeatureKey {
3192
+ SitesAdaptiveContent = "sites-adaptive-content",
3193
+ SitesAdvancedCustomization = "sites-advanced-customization",
3194
+ SitesAdvancedInsights = "sites-advanced-insights",
3195
+ SitesAds = "sites-ads",
3196
+ SitesAiSearch = "sites-ai-search",
3197
+ SitesApiPlayground = "sites-api-playground",
3198
+ SitesBasicCustomization = "sites-basic-customization",
3199
+ SitesCustomDomain = "sites-custom-domain",
3200
+ SitesCustomFonts = "sites-custom-fonts",
3201
+ SitesCustomSubdirectory = "sites-custom-subdirectory",
3202
+ SitesFullTextSearch = "sites-full-text-search",
3203
+ SitesMultivariantSite = "sites-multivariant-site",
3204
+ SitesNoCustomDomain = "sites-no-custom-domain",
3205
+ SitesPageFeedback = "sites-page-feedback",
3206
+ SitesPageTrafficInsights = "sites-page-traffic-insights",
3207
+ SitesPdfExport = "sites-pdf-export",
3208
+ SitesPreviewDeployments = "sites-preview-deployments",
3209
+ SitesPublicVisibility = "sites-public-visibility",
3210
+ SitesRedirects = "sites-redirects",
3211
+ SitesSearchInsights = "sites-search-insights",
3212
+ SitesSections = "sites-sections",
3213
+ SitesSeo = "sites-seo",
3214
+ SitesShareLinks = "sites-share-links",
3215
+ SitesUnlistedVisibility = "sites-unlisted-visibility",
3216
+ SitesUserContribution = "sites-user-contribution",
3217
+ SitesVisitorAuthentication = "sites-visitor-authentication",
3218
+ SitesVisitors = "sites-visitors"
3219
+ }
3171
3220
  /** A list of all premium customizations. */
3172
3221
  export declare enum SiteCustomizationFeature {
3173
3222
  HeaderLogo = "header-logo",
@@ -3180,23 +3229,16 @@ export declare enum SiteCustomizationFeature {
3180
3229
  SemanticColors = "semantic-colors"
3181
3230
  }
3182
3231
  /** A site feature and the plan it is available on. */
3183
- export type SiteFeature = {
3184
- /** The feature identifier, matching the feature table keys in the pricing definition */
3185
- id: 'sites-sections' | 'sites-visitor-authentication' | 'sites-adaptive-content' | 'sites-redirects' | 'sites-custom-domain' | 'sites-ai-search' | 'sites-pdf-export' | 'sites-page-feedback' | 'sites-unlisted-visibility' | 'sites-share-links' | 'sites-custom-fonts';
3232
+ export interface SiteFeature {
3233
+ /** The site feature identifier */
3234
+ id: SiteFeatureKey;
3186
3235
  /** The type of the site */
3187
3236
  plan: SiteType;
3188
3237
  /** A frozen feature is still enabled but cannot be changed or modified. */
3189
3238
  frozen: boolean;
3190
- } | {
3191
- /** The feature identifier, always set to `sites-advanced-customization` */
3192
- id: 'sites-advanced-customization';
3193
- /** The type of the site */
3194
- plan: SiteType;
3195
- /** A frozen feature is still enabled but cannot be changed or modified. */
3196
- frozen: boolean;
3197
- /** A list of the actual advanced customizations used */
3198
- customizations: SiteCustomizationFeature[];
3199
- };
3239
+ /** A list of the actual advanced customizations used (only applicable for sites-advanced-customization) */
3240
+ customizations?: SiteCustomizationFeature[];
3241
+ }
3200
3242
  export interface Site {
3201
3243
  object: 'site';
3202
3244
  /** Unique identifier of the site */
@@ -3884,12 +3926,34 @@ export interface CreateInviteToCollection {
3884
3926
  export type CreateOrganizationInvite = CreateInviteToOrganization | CreateInviteToSpace | CreateInviteToCollection;
3885
3927
  /** An invite link created in an organization */
3886
3928
  export type OrganizationInviteLink = InviteLinkToOrganization | InviteLinkToSpace | InviteLinkToCollection;
3929
+ /** Changes to apply during a subscription upgrade or downgrade */
3930
+ export interface SubscriptionChanges {
3931
+ /** A list of member identifiers to be removed */
3932
+ removeMembers: string[];
3933
+ /** A list of site updates to be applied before upgrading. If a site is not present in this list, it'll be upgraded to whichever type matches its features and its published status will be unchanged. When downgrading to a lower type all relevant paid features will be disabled before applying the new type. */
3934
+ updateSites: ({
3935
+ /** The site identifier */
3936
+ id: string;
3937
+ /** The site type to migrate to */
3938
+ type: SiteType;
3939
+ } | {
3940
+ /** The site identifier */
3941
+ id: string;
3942
+ /** Can be set to `false` to unpublish a site */
3943
+ isPublished: false;
3944
+ })[];
3945
+ }
3887
3946
  export interface UpgradeOrganizationBilling {
3888
3947
  /** Name of the product */
3889
3948
  product: BillingProduct;
3890
3949
  /** Interval for a billing subscription */
3891
3950
  interval: BillingInterval;
3892
- /** Members to remove or sites to unpublish before upgrading */
3951
+ /** Changes to apply during a subscription upgrade or downgrade */
3952
+ changes?: SubscriptionChanges;
3953
+ /**
3954
+ * Deprecated. Use `changes` instead.
3955
+ * @deprecated
3956
+ */
3893
3957
  exclude?: {
3894
3958
  /** A list of member identifiers to be removed, `all` to remove all members but the current admin */
3895
3959
  members?: string[] | 'all';
@@ -3944,23 +4008,8 @@ export interface MigrateOrganizationParameters {
3944
4008
  interval: BillingInterval;
3945
4009
  /** The new product to upgrade to */
3946
4010
  product: 'free_2024' | 'plus_2024' | 'pro_2024';
3947
- /** Changes to apply to the organization and its sites before upgrading */
3948
- changes: {
3949
- /** A list of member identifiers to be removed */
3950
- removeMembers: string[];
3951
- /** A list of site updates to be applied before upgrading. If a site is not present in this list, it'll be upgraded to whichever type matches its features and its published status will be unchanged. When downgrading to a lower type all relevant paid features will be disabled before applying the new type. */
3952
- updateSites: ({
3953
- /** The site identifier */
3954
- id: string;
3955
- /** The site type to migrate to */
3956
- type: SiteType;
3957
- } | {
3958
- /** The site identifier */
3959
- id: string;
3960
- /** Can be set to `false` to unpublish a site */
3961
- isPublished: false;
3962
- })[];
3963
- };
4011
+ /** Changes to apply during a subscription upgrade or downgrade */
4012
+ changes: SubscriptionChanges;
3964
4013
  }
3965
4014
  export interface Error {
3966
4015
  error: {
@@ -4753,6 +4802,8 @@ export interface CustomizationHeaderItem {
4753
4802
  style?: 'link' | 'button-primary' | 'button-secondary';
4754
4803
  to: ContentRef | null;
4755
4804
  links: CustomizationContentLink[];
4805
+ /** Conditional expression used to evaluate whether the header item should be shown to the site's visitor. */
4806
+ condition?: Condition;
4756
4807
  }
4757
4808
  export interface CustomizationFooterGroup {
4758
4809
  title: string;
@@ -4960,18 +5011,36 @@ export interface ShareLink {
4960
5011
  published?: string;
4961
5012
  };
4962
5013
  }
5014
+ export interface SiteStructureItemPointer {
5015
+ type: 'site-space' | 'site-section' | 'site-section-group';
5016
+ /** Unique identifier for the site structure item (site space, site section or site section group). */
5017
+ id: string;
5018
+ }
5019
+ /** Position at which to move the site structure item (site space, site section or site section group). */
5020
+ export interface SiteStructureItemMovePosition {
5021
+ before?: SiteStructureItemPointer;
5022
+ after?: SiteStructureItemPointer;
5023
+ }
5024
+ /**
5025
+ * Site Structure Item
5026
+ * A site structure item can be a site space, a site section or a site section group.
5027
+ * It is used to represent the structure of a site.
5028
+ */
5029
+ export type SiteStructureItem = SiteSpace | SiteSection | SiteSectionGroup;
5030
+ /** The reason or feature that triggered the site upgrade */
5031
+ export type SiteUpgradeReason = SiteFeatureKey | 'settings' | 'publish-downgrade' | 'from-billing-modal' | 'payment-failed-modal';
4963
5032
  export type SitePublishingAuth = (VisitorAuthCustomBackend | VisitorAuthIntegrationBackend) & {
4964
5033
  /** Type of Object, always equals to "publishing-auth" */
4965
5034
  object: 'publishing-auth';
4966
5035
  /** Private key used to sign JWT tokens. */
4967
5036
  privateKey: string;
4968
5037
  /**
4969
- * URL to redirect to when the visitor auth secret is invalid.
5038
+ * URL to redirect to when the authenticated access secret is invalid.
4970
5039
  * @format uri
4971
5040
  */
4972
5041
  fallbackURL?: string;
4973
5042
  /**
4974
- * Name of the Visitor Authentication integration installed on the site (if any).
5043
+ * Name of the authenticated access integration installed on the site (if any).
4975
5044
  * It is also the one being used as VA backend when the published auth settings are configured to use "integration" as backend.
4976
5045
  */
4977
5046
  integration?: string;
@@ -5991,7 +6060,7 @@ export interface PublishedSiteContent {
5991
6060
  shareKey?: string;
5992
6061
  /** Whether the resolved site URL is complete and at it's terminal point, meaning no more site path segments can be further expected before any page path segments. */
5993
6062
  complete: boolean;
5994
- /** Context returned only for a visitor authentication session to track changes in the visitor session context that affect content rendering (used for cache invalidation). */
6063
+ /** Context returned only for a authenticated access session to track changes in the visitor session context that affect content rendering (used for cache invalidation). */
5995
6064
  contextId?: string;
5996
6065
  /** The canonical URL of the resolution. */
5997
6066
  canonicalUrl: string;
@@ -6003,7 +6072,7 @@ export type PublishedSiteContentLookup = {
6003
6072
  } | PublishedSiteContent;
6004
6073
  /** An object that describes the payload of site visitor info. It can include a jwt token with signed claims and/or a record of its unsigned claims. */
6005
6074
  export interface SiteVisitorPayload {
6006
- /** JWT token generated for a visitor auth session. */
6075
+ /** JWT token generated for a authenticated access session. */
6007
6076
  jwtToken?: string;
6008
6077
  unsignedClaims?: PlainObject;
6009
6078
  }
@@ -6085,30 +6154,10 @@ export interface UpdateContentPublishingAuth {
6085
6154
  */
6086
6155
  fallbackURL?: string;
6087
6156
  }
6088
- /** The context to send when triggering a content indexing. */
6089
- export interface TriggerContentIndexingContext {
6090
- /** The unique identifier of the Space to index. */
6091
- spaceId: string;
6092
- /** Whether to force a complete re-indexing of the Space. */
6093
- force: boolean;
6094
- }
6095
6157
  /** Predefined GitBook user identifiers */
6096
6158
  export declare enum GitBookUsers {
6097
6159
  GitbookAgent = "gitbook:agent"
6098
6160
  }
6099
- export interface ContentPublishingAuth {
6100
- /** Type of Object, always equals to "publishing-auth" */
6101
- object: 'publishing-auth';
6102
- /** Unique identifier for the content. */
6103
- id: string;
6104
- /** Private key used to sign JWT tokens. */
6105
- privateKey: string;
6106
- /**
6107
- * URL to redirect to when the visitor auth secret is invalid.
6108
- * @format uri
6109
- */
6110
- fallbackURL?: string;
6111
- }
6112
6161
  export type ComputedContentSource = ComputedContentSourceDocument | ComputedContentSourceRevision;
6113
6162
  export type InputPageBase = {
6114
6163
  /**
@@ -6236,12 +6285,6 @@ export interface GitSyncOperation {
6236
6285
  /** Error details, defined if state is `failure`. */
6237
6286
  error?: string;
6238
6287
  }
6239
- export interface OrganizationTransferResponse {
6240
- /** The unique id of the collection created in the target organization containing the content of the source organization. */
6241
- collection: string;
6242
- /** The new hostname if the source organization needed to change hostname. */
6243
- newSourceHostname?: string;
6244
- }
6245
6288
  export type IntegrationEnvironmentSpaceInstallation = IntegrationContentInstallationBase & {
6246
6289
  /** The space the integration is installed on. */
6247
6290
  space: string;
@@ -6684,79 +6727,6 @@ export interface APIChannelMutationData {
6684
6727
  }
6685
6728
  /** Data passed through a realtime channel */
6686
6729
  export type SubscriptionChannelData = GitSyncOperationChannelData | SpaceContentRefsChannelData | ChangeRequestContentRefsChannelData | OrganizationAIIndexationChannelData | APIChannelMutationData;
6687
- /**
6688
- * @minLength 1
6689
- * @maxLength 50
6690
- * @pattern ^[a-z_\-0-9]+$
6691
- */
6692
- export type VariableName = string;
6693
- export interface CustomizationSettings {
6694
- /** Inherit customization settings from the parent collection. */
6695
- inherit: boolean;
6696
- /** Title to use for the published content. If not defined, it'll fallback to the content title. */
6697
- title?: string;
6698
- styling: {
6699
- primaryColor: CustomizationThemedColor;
6700
- corners: CustomizationCorners;
6701
- font: CustomizationDefaultFont;
6702
- /** The background style has been deprecated and will be removed in a future release. Use the `tint` settings instead. */
6703
- background?: CustomizationBackground;
6704
- };
6705
- internationalization: {
6706
- /** Language for the UI element */
6707
- locale: CustomizationLocale;
6708
- };
6709
- favicon: CustomizationFavicon;
6710
- header: {
6711
- /** The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead. */
6712
- preset: CustomizationHeaderPreset;
6713
- logo?: CustomizationThemedURL;
6714
- backgroundColor?: CustomizationThemedColor;
6715
- linkColor?: CustomizationThemedColor;
6716
- links: CustomizationHeaderItem[];
6717
- };
6718
- footer: {
6719
- logo?: CustomizationThemedURL;
6720
- groups: CustomizationFooterGroup[];
6721
- /** @maxLength 300 */
6722
- copyright?: string;
6723
- };
6724
- themes: {
6725
- default: CustomizationThemeMode;
6726
- /** Should the reader be able to switch between dark and light mode */
6727
- toggeable: boolean;
6728
- };
6729
- pdf: {
6730
- /** If true, PDF export is enabled for the published content. */
6731
- enabled: boolean;
6732
- };
6733
- feedback: {
6734
- /** If true, feedback gathering is enabled */
6735
- enabled: boolean;
6736
- };
6737
- aiSearch: {
6738
- /** If true, AI search is enabled */
6739
- enabled: boolean;
6740
- };
6741
- git: {
6742
- /** Whether the public content should show a link to edit the content on the git provider set up in the GitSync */
6743
- showEditLink: boolean;
6744
- };
6745
- pagination: {
6746
- /** Whether the pagination navigation should be displayed on pages. */
6747
- enabled: boolean;
6748
- };
6749
- trademark: {
6750
- /** Whether the GitBook trademark ("Powered by GitBook") should be visible */
6751
- enabled: boolean;
6752
- };
6753
- privacyPolicy: {
6754
- url?: URL;
6755
- };
6756
- socialPreview: {
6757
- url?: URL;
6758
- };
6759
- }
6760
6730
  /** The status of ads on the site */
6761
6731
  export declare enum SiteAdsStatus {
6762
6732
  Pending = "pending",
@@ -7851,6 +7821,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7851
7821
  /** The user requests that were sent. */
7852
7822
  users?: ChangeRequestRequestedReviewer[];
7853
7823
  }, any>>;
7824
+ /**
7825
+ * No description
7826
+ *
7827
+ * @tags change-request-reviewers
7828
+ * @name RemoveRequestedReviewerFromChangeRequest
7829
+ * @summary Remove a reviewer from a change request
7830
+ * @request DELETE:/spaces/{spaceId}/change-requests/{changeRequestId}/requested-reviewers/{userId}
7831
+ * @secure
7832
+ */
7833
+ removeRequestedReviewerFromChangeRequest: (spaceId: string, changeRequestId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void, {
7834
+ error: {
7835
+ /** @format int32 */
7836
+ code: 404;
7837
+ message: string;
7838
+ };
7839
+ }>>;
7854
7840
  /**
7855
7841
  * No description
7856
7842
  *
@@ -9186,6 +9172,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9186
9172
  owner?: string;
9187
9173
  /** Filter the integrations by scope */
9188
9174
  scope?: IntegrationScope;
9175
+ /** Filter the integrations by target */
9176
+ target?: IntegrationTarget;
9189
9177
  }, params?: RequestParams) => Promise<HttpResponse<List & {
9190
9178
  items: Integration[];
9191
9179
  }, any>>;
@@ -10278,6 +10266,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10278
10266
  owner?: string;
10279
10267
  /** Filter the integrations by scope */
10280
10268
  scope?: IntegrationScope;
10269
+ /** Filter the integrations by target */
10270
+ target?: IntegrationTarget;
10281
10271
  }, params?: RequestParams) => Promise<HttpResponse<List & {
10282
10272
  items: Integration[];
10283
10273
  }, any>>;
@@ -11426,6 +11416,33 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11426
11416
  message: string;
11427
11417
  };
11428
11418
  }>>;
11419
+ /**
11420
+ * No description
11421
+ *
11422
+ * @tags sites
11423
+ * @name SortSiteStructure
11424
+ * @summary Move a site space, site section or site section group to a new position in the site structure.
11425
+ * @request PATCH:/orgs/{organizationId}/sites/{siteId}/structure/sort
11426
+ * @secure
11427
+ */
11428
+ sortSiteStructure: (organizationId: string, siteId: string, data: {
11429
+ /** pointer to the item (site space, site section or site section group) being moved. */
11430
+ item: SiteStructureItemPointer;
11431
+ /** The position to move the item to. When not provided the item is moved to the end of the site structure. */
11432
+ position: SiteStructureItemMovePosition;
11433
+ }, params?: RequestParams) => Promise<HttpResponse<SiteStructureItem, Error | {
11434
+ error: {
11435
+ /** @format int32 */
11436
+ code: 400;
11437
+ message: string;
11438
+ };
11439
+ } | {
11440
+ error: {
11441
+ /** @format int32 */
11442
+ code: 404;
11443
+ message: string;
11444
+ };
11445
+ }>>;
11429
11446
  /**
11430
11447
  * No description
11431
11448
  *
@@ -11703,11 +11720,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11703
11720
  addSectionToSite: (organizationId: string, siteId: string, data: {
11704
11721
  /** ID of the space to be added to the section as a site space variant */
11705
11722
  spaceId: string;
11706
- /**
11707
- * Title of the section
11708
- * @maxLength 64
11709
- */
11710
- title?: string;
11723
+ title?: SiteSectionTitle | null;
11724
+ icon?: Icon | null;
11711
11725
  }, params?: RequestParams) => Promise<HttpResponse<SiteSection, any>>;
11712
11726
  /**
11713
11727
  * No description
@@ -11856,6 +11870,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11856
11870
  path?: SiteSpacePath;
11857
11871
  /** Conditional expression used to evaluate whether the site space should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
11858
11872
  condition?: Condition | null;
11873
+ /** The content that this site space points to. If not set, the space will remain unchanged. */
11874
+ spaceId?: string;
11859
11875
  }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
11860
11876
  /**
11861
11877
  * No description
@@ -12033,8 +12049,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12033
12049
  *
12034
12050
  * @tags site-section-groups
12035
12051
  * @name MoveSiteSectionGroup
12036
- * @summary Move a site section group to a new position
12052
+ * @summary Move a site section group to a new position. (Deprecated) use sortSiteStructure instead.
12037
12053
  * @request POST:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/move
12054
+ * @deprecated
12038
12055
  * @secure
12039
12056
  */
12040
12057
  moveSiteSectionGroup: (organizationId: string, siteId: string, siteSectionGroupId: string, data: {
@@ -12058,8 +12075,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12058
12075
  *
12059
12076
  * @tags site-sections
12060
12077
  * @name MoveSiteSection
12061
- * @summary Move a site section to a new position
12078
+ * @summary Move a site section to a new position. (Deprecated) use sortSiteStructure instead.
12062
12079
  * @request POST:/orgs/{organizationId}/sites/{siteId}/sections/{siteSectionId}/move
12080
+ * @deprecated
12063
12081
  * @secure
12064
12082
  */
12065
12083
  moveSiteSection: (organizationId: string, siteId: string, siteSectionId: string, data: {
@@ -12083,8 +12101,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12083
12101
  *
12084
12102
  * @tags site-spaces
12085
12103
  * @name MoveSiteSpace
12086
- * @summary Move a site space to a new position
12104
+ * @summary Move a site space to a new position. (Deprecated) use sortSiteStructure instead.
12087
12105
  * @request POST:/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/move
12106
+ * @deprecated
12088
12107
  * @secure
12089
12108
  */
12090
12109
  moveSiteSpace: (organizationId: string, siteId: string, siteSpaceId: string, data: {
@@ -12456,10 +12475,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12456
12475
  getPublishedContentByUrl: (query: {
12457
12476
  /** URL to resolve */
12458
12477
  url: URL;
12459
- /** JWT token generated for a visitor auth session */
12478
+ /** JWT token generated for a authenticated access session */
12460
12479
  visitorAuthToken?: string;
12461
12480
  /**
12462
- * When true redirects the user to the authentication/fallback URL if the visitor auth token is invalid
12481
+ * When true redirects the user to the authentication/fallback URL if the access token is invalid
12463
12482
  * @default false
12464
12483
  */
12465
12484
  redirectOnError?: boolean;
@@ -12483,7 +12502,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12483
12502
  /** URL to resolve */
12484
12503
  url: URL;
12485
12504
  /**
12486
- * When true redirects the user to the authentication/fallback URL if the visitor auth token is invalid
12505
+ * When true redirects the user to the authentication/fallback URL if the access token is invalid
12487
12506
  * @default false
12488
12507
  */
12489
12508
  redirectOnError?: boolean;
package/dist/index.cjs CHANGED
@@ -249,6 +249,7 @@ __export(src_exports, {
249
249
  SiteAdsTopic: () => SiteAdsTopic,
250
250
  SiteAgentsContext: () => SiteAgentsContext,
251
251
  SiteCustomizationFeature: () => SiteCustomizationFeature,
252
+ SiteFeatureKey: () => SiteFeatureKey,
252
253
  SiteInsightsAdPlacement: () => SiteInsightsAdPlacement,
253
254
  SiteInsightsEventType: () => SiteInsightsEventType,
254
255
  SiteInsightsLinkPosition: () => SiteInsightsLinkPosition,
@@ -264,13 +265,14 @@ __export(src_exports, {
264
265
  SpaceEditMode: () => SpaceEditMode,
265
266
  StorageUploadKind: () => StorageUploadKind,
266
267
  TeamMemberRole: () => TeamMemberRole,
268
+ TextAlignment: () => TextAlignment,
267
269
  TranslationLanguage: () => TranslationLanguage
268
270
  });
269
271
  module.exports = __toCommonJS(src_exports);
270
272
 
271
273
  // package.json
272
274
  var name = "@gitbook/api";
273
- var version = "0.120.0";
275
+ var version = "0.122.0";
274
276
 
275
277
  // src/client.ts
276
278
  var import_event_iterator = __toESM(require_node(), 1);
@@ -399,6 +401,12 @@ var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
399
401
  MemberRole2["Read"] = "read";
400
402
  return MemberRole2;
401
403
  })(MemberRole || {});
404
+ var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
405
+ TextAlignment2["Start"] = "start";
406
+ TextAlignment2["Center"] = "center";
407
+ TextAlignment2["End"] = "end";
408
+ return TextAlignment2;
409
+ })(TextAlignment || {});
402
410
  var TranslationLanguage = /* @__PURE__ */ ((TranslationLanguage2) => {
403
411
  TranslationLanguage2["En"] = "en";
404
412
  TranslationLanguage2["Fr"] = "fr";
@@ -652,6 +660,36 @@ var SiteAgentsContext = /* @__PURE__ */ ((SiteAgentsContext2) => {
652
660
  SiteAgentsContext2["Included"] = "included";
653
661
  return SiteAgentsContext2;
654
662
  })(SiteAgentsContext || {});
663
+ var SiteFeatureKey = /* @__PURE__ */ ((SiteFeatureKey2) => {
664
+ SiteFeatureKey2["SitesAdaptiveContent"] = "sites-adaptive-content";
665
+ SiteFeatureKey2["SitesAdvancedCustomization"] = "sites-advanced-customization";
666
+ SiteFeatureKey2["SitesAdvancedInsights"] = "sites-advanced-insights";
667
+ SiteFeatureKey2["SitesAds"] = "sites-ads";
668
+ SiteFeatureKey2["SitesAiSearch"] = "sites-ai-search";
669
+ SiteFeatureKey2["SitesApiPlayground"] = "sites-api-playground";
670
+ SiteFeatureKey2["SitesBasicCustomization"] = "sites-basic-customization";
671
+ SiteFeatureKey2["SitesCustomDomain"] = "sites-custom-domain";
672
+ SiteFeatureKey2["SitesCustomFonts"] = "sites-custom-fonts";
673
+ SiteFeatureKey2["SitesCustomSubdirectory"] = "sites-custom-subdirectory";
674
+ SiteFeatureKey2["SitesFullTextSearch"] = "sites-full-text-search";
675
+ SiteFeatureKey2["SitesMultivariantSite"] = "sites-multivariant-site";
676
+ SiteFeatureKey2["SitesNoCustomDomain"] = "sites-no-custom-domain";
677
+ SiteFeatureKey2["SitesPageFeedback"] = "sites-page-feedback";
678
+ SiteFeatureKey2["SitesPageTrafficInsights"] = "sites-page-traffic-insights";
679
+ SiteFeatureKey2["SitesPdfExport"] = "sites-pdf-export";
680
+ SiteFeatureKey2["SitesPreviewDeployments"] = "sites-preview-deployments";
681
+ SiteFeatureKey2["SitesPublicVisibility"] = "sites-public-visibility";
682
+ SiteFeatureKey2["SitesRedirects"] = "sites-redirects";
683
+ SiteFeatureKey2["SitesSearchInsights"] = "sites-search-insights";
684
+ SiteFeatureKey2["SitesSections"] = "sites-sections";
685
+ SiteFeatureKey2["SitesSeo"] = "sites-seo";
686
+ SiteFeatureKey2["SitesShareLinks"] = "sites-share-links";
687
+ SiteFeatureKey2["SitesUnlistedVisibility"] = "sites-unlisted-visibility";
688
+ SiteFeatureKey2["SitesUserContribution"] = "sites-user-contribution";
689
+ SiteFeatureKey2["SitesVisitorAuthentication"] = "sites-visitor-authentication";
690
+ SiteFeatureKey2["SitesVisitors"] = "sites-visitors";
691
+ return SiteFeatureKey2;
692
+ })(SiteFeatureKey || {});
655
693
  var SiteCustomizationFeature = /* @__PURE__ */ ((SiteCustomizationFeature2) => {
656
694
  SiteCustomizationFeature2["HeaderLogo"] = "header-logo";
657
695
  SiteCustomizationFeature2["ThemePreset"] = "theme-preset";
@@ -1616,6 +1654,12 @@ var Api = class extends HttpClient {
1616
1654
  format: "json",
1617
1655
  ...params
1618
1656
  }),
1657
+ removeRequestedReviewerFromChangeRequest: (spaceId, changeRequestId, userId, params = {}) => this.request({
1658
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/requested-reviewers/${userId}`,
1659
+ method: "DELETE",
1660
+ secure: true,
1661
+ ...params
1662
+ }),
1619
1663
  listChangeRequestLinks: (spaceId, changeRequestId, query, params = {}) => this.request({
1620
1664
  path: `/spaces/${spaceId}/change-requests/${changeRequestId}/links`,
1621
1665
  method: "GET",
@@ -3110,6 +3154,15 @@ var Api = class extends HttpClient {
3110
3154
  format: "json",
3111
3155
  ...params
3112
3156
  }),
3157
+ sortSiteStructure: (organizationId, siteId, data, params = {}) => this.request({
3158
+ path: `/orgs/${organizationId}/sites/${siteId}/structure/sort`,
3159
+ method: "PATCH",
3160
+ body: data,
3161
+ secure: true,
3162
+ type: "application/json" /* Json */,
3163
+ format: "json",
3164
+ ...params
3165
+ }),
3113
3166
  getSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
3114
3167
  path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
3115
3168
  method: "GET",
@@ -3696,6 +3749,7 @@ var GitBookAPI = class extends Api {
3696
3749
  SiteAdsTopic,
3697
3750
  SiteAgentsContext,
3698
3751
  SiteCustomizationFeature,
3752
+ SiteFeatureKey,
3699
3753
  SiteInsightsAdPlacement,
3700
3754
  SiteInsightsEventType,
3701
3755
  SiteInsightsLinkPosition,
@@ -3711,5 +3765,6 @@ var GitBookAPI = class extends Api {
3711
3765
  SpaceEditMode,
3712
3766
  StorageUploadKind,
3713
3767
  TeamMemberRole,
3768
+ TextAlignment,
3714
3769
  TranslationLanguage
3715
3770
  });