@gitbook/api 0.90.0 → 0.92.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
@@ -609,7 +609,7 @@ export interface DocumentBlockOpenAPI {
609
609
  type: 'swagger';
610
610
  key?: string;
611
611
  data: OpenAPIOperationPointer & {
612
- ref: ContentRefFile;
612
+ ref: ContentRefFile | ContentRefURL;
613
613
  /** If true, the block is opened by default. */
614
614
  expanded?: boolean;
615
615
  fullWidth?: boolean;
@@ -660,39 +660,29 @@ export interface JSONDocument {
660
660
  export type Document = MarkdownDocument | {
661
661
  document: JSONDocument;
662
662
  } | object;
663
- export type SearchAIAnswerSource = {
664
- type: 'page' | 'capture';
665
- } & ({
663
+ /**
664
+ * Page source
665
+ * The source points to a page in a space.
666
+ */
667
+ export interface SearchAIAnswerSource {
666
668
  type: 'page';
669
+ /** Short explanation of how the source was used to answer. */
670
+ reason?: string;
671
+ /** The page ID of the source. */
667
672
  page: string;
673
+ /** The revision ID where the page was extracted from. */
668
674
  revision: string;
675
+ /** The space ID owning the page. */
669
676
  space: string;
677
+ /** The IDs of the sections of the page that were used to answer the question. */
670
678
  sections: string[];
671
- } | {
672
- type: 'capture';
673
- /** ID of the capture */
674
- captureId: string;
675
- /** Source of the capture */
676
- source: string;
677
- });
679
+ }
678
680
  /** Answer from AI for a question asked on a content. */
679
681
  export interface SearchAIAnswer {
680
- /** @deprecated */
681
- text?: string;
682
682
  answer?: Document;
683
683
  followupQuestions: string[];
684
684
  /** The sources used to generate the answer. */
685
685
  sources: SearchAIAnswerSource[];
686
- /**
687
- * The pages used to generate the answer. Deprecated - use sources instead.
688
- * @deprecated
689
- */
690
- pages: {
691
- page: string;
692
- revision: string;
693
- space: string;
694
- sections: string[];
695
- }[];
696
686
  }
697
687
  export interface SearchAIQuery {
698
688
  query: string;
@@ -1110,7 +1100,17 @@ export type RevisionPageLink = RevisionPageBase & {
1110
1100
  */
1111
1101
  hidden?: boolean;
1112
1102
  };
1113
- export type ComputedContentDependency = ContentRefSpace;
1103
+ export type ComputedContentDependencyRef = ContentRefSpace;
1104
+ /** Dependency for a computation, with its resolved value. */
1105
+ export type ComputedContentDependencyValue = {
1106
+ ref: ContentRefSpace;
1107
+ /** See `Space` schema component. */
1108
+ value: {
1109
+ object: 'space';
1110
+ id: string;
1111
+ revision: string;
1112
+ } | null;
1113
+ };
1114
1114
  /** Parameters for a computed content */
1115
1115
  export interface ComputedContentSource {
1116
1116
  /** Name of the integration */
@@ -1119,8 +1119,14 @@ export interface ComputedContentSource {
1119
1119
  source: string;
1120
1120
  /** Properties to be passed to the computation */
1121
1121
  props: PlainObject;
1122
- /** Dependencies the computation depend on. When the dependency's targets are updated, the computation will be updated. */
1123
- dependsOn?: ComputedContentDependency[];
1122
+ /**
1123
+ * Dependencies the computation depends on.
1124
+ * The state of the dependencies will be passed to the computation.
1125
+ * When the dependency's targets are updated, the computation will be updated.
1126
+ */
1127
+ dependencies?: Record<string, {
1128
+ ref: ComputedContentDependencyRef;
1129
+ } | ComputedContentDependencyValue>;
1124
1130
  }
1125
1131
  export type RevisionPageComputed = RevisionPageBase & {
1126
1132
  type: 'computed';
@@ -3122,6 +3128,8 @@ export type ContentComputeEvent = SpaceEvent & {
3122
3128
  sourceId: string;
3123
3129
  /** Properties passed to the rendering. */
3124
3130
  props: PlainObject;
3131
+ /** Dependencies of the computation. */
3132
+ dependencies: Record<string, ComputedContentDependencyValue>;
3125
3133
  };
3126
3134
  /**
3127
3135
  * Event generated when computing the document of a pages.
@@ -3702,6 +3710,12 @@ export interface CreateOrganization {
3702
3710
  * @maxLength 128
3703
3711
  */
3704
3712
  export type SiteSectionTitle = string;
3713
+ /**
3714
+ * Description of the site section
3715
+ * @minLength 0
3716
+ * @maxLength 256
3717
+ */
3718
+ export type SiteSectionDescription = string;
3705
3719
  /**
3706
3720
  * Path to the section on the site
3707
3721
  * @minLength 1
@@ -3752,6 +3766,8 @@ export interface SiteSection {
3752
3766
  id: string;
3753
3767
  /** Title of the site section */
3754
3768
  title: SiteSectionTitle;
3769
+ /** Description of the site section */
3770
+ description?: SiteSectionDescription;
3755
3771
  /** Whether this is the default section for the site */
3756
3772
  default?: boolean;
3757
3773
  /** Path to the section on the site */
@@ -3772,9 +3788,27 @@ export interface SiteSection {
3772
3788
  /** Name of the icon */
3773
3789
  icon?: Icon;
3774
3790
  }
3791
+ /**
3792
+ * Title of the site section group
3793
+ * @minLength 1
3794
+ * @maxLength 100
3795
+ */
3796
+ export type SiteSectionGroupTitle = string;
3797
+ export interface SiteSectionGroup {
3798
+ /** The object type, which is always "site-section-group" */
3799
+ object: 'site-section-group';
3800
+ /** Unique identifier of the site section group */
3801
+ id: string;
3802
+ /** Title of the site section group */
3803
+ title: SiteSectionGroupTitle;
3804
+ /** List of site section ids that are members of the group */
3805
+ sections: SiteSection[];
3806
+ /** Name of the icon */
3807
+ icon?: Icon;
3808
+ }
3775
3809
  export type SiteStructure = {
3776
3810
  type: 'sections';
3777
- structure: SiteSection[];
3811
+ structure: (SiteSection | SiteSectionGroup)[];
3778
3812
  } | {
3779
3813
  type: 'siteSpaces';
3780
3814
  structure: SiteSpace[];
@@ -3971,6 +4005,24 @@ export type BillingUpgrade = {
3971
4005
  } | {
3972
4006
  result: 'interval_changed';
3973
4007
  };
4008
+ export interface MigrateOrganizationParameters {
4009
+ /** The desired billing interval */
4010
+ interval: BillingInterval;
4011
+ /** The new product to upgrade to */
4012
+ product: 'free_2024' | 'plus_2024' | 'pro_2024';
4013
+ /** Changes to apply to the organization and its sites before upgrading */
4014
+ changes: {
4015
+ /** A list of member identifiers to be removed */
4016
+ removeMembers: string[];
4017
+ /** 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. */
4018
+ updateSites: {
4019
+ /** The site identifier */
4020
+ id: string;
4021
+ /** The site type to migrate to */
4022
+ type: SiteType;
4023
+ }[];
4024
+ };
4025
+ }
3974
4026
  /** These are all the features we check to determine the new pricing site type. */
3975
4027
  export declare enum SiteToMigrateFeature {
3976
4028
  Sections = "sections",
@@ -4486,24 +4538,6 @@ export type SitePublishingAuthUpdate = (VisitorAuthCustomBackend | VisitorAuthIn
4486
4538
  */
4487
4539
  fallbackURL?: string;
4488
4540
  };
4489
- /**
4490
- * Title of the site section group
4491
- * @minLength 1
4492
- * @maxLength 100
4493
- */
4494
- export type SiteSectionGroupTitle = string;
4495
- export interface SiteSectionGroup {
4496
- /** The object type, which is always "site-section-group" */
4497
- object: 'site-section-group';
4498
- /** Unique identifier of the site section group */
4499
- id: string;
4500
- /** Title of the site section group */
4501
- title: SiteSectionGroupTitle;
4502
- /** List of site section ids that are members of the group */
4503
- sections: SiteSection[];
4504
- /** Name of the icon */
4505
- icon?: Icon;
4506
- }
4507
4541
  export type SiteSearchScope = {
4508
4542
  /** Search across all sections of a site, only including the default content of each section. This scope is wide and shallow. You may optionally specify a list of additional site spaces to search in alongside the default content. */
4509
4543
  mode: 'default';
@@ -4521,6 +4555,16 @@ export type SiteSpaceCustomizationSettings = SiteCustomizationSettings & {
4521
4555
  /** Indicates whether the site customization settings have been overridden. */
4522
4556
  hasOverrides: boolean;
4523
4557
  };
4558
+ export interface SiteSectionGroupPointer {
4559
+ type: 'site-section' | 'site-section-group';
4560
+ /** Unique identifier for the site section */
4561
+ id: string;
4562
+ }
4563
+ /** Position at which to move the site section group. */
4564
+ export interface SiteSectionGroupMovePosition {
4565
+ before?: SiteSectionGroupPointer;
4566
+ after?: SiteSectionGroupPointer;
4567
+ }
4524
4568
  export interface SiteSectionPointer {
4525
4569
  type: 'site-section';
4526
4570
  /** Unique identifier for the site section */
@@ -5398,6 +5442,10 @@ export interface ContentPublishingAuth {
5398
5442
  fallbackURL?: string;
5399
5443
  }
5400
5444
  export type DocumentBlock = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockListItem | DocumentBlockDivider | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockImage | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockCodeLine | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTabsItem | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockStepperStep;
5445
+ /** Dependency for a computation, before its resolution. */
5446
+ export interface ComputedContentDependency {
5447
+ ref: ComputedContentDependencyRef;
5448
+ }
5401
5449
  export type InputPageBase = {
5402
5450
  /**
5403
5451
  * Optional unique identifier for the page.
@@ -6076,6 +6124,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6076
6124
  * @name SearchContent
6077
6125
  * @summary Search content across spaces that is accessible by the currently authenticated target
6078
6126
  * @request GET:/search
6127
+ * @deprecated
6079
6128
  * @secure
6080
6129
  */
6081
6130
  searchContent: (query: {
@@ -6117,6 +6166,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6117
6166
  * @name AskQuery
6118
6167
  * @summary Ask a question to an AI across spaces that is accessible by the currently authenticated target.
6119
6168
  * @request POST:/search/ask
6169
+ * @deprecated
6120
6170
  * @secure
6121
6171
  */
6122
6172
  askQuery: (data: SearchAIQuery, query?: {
@@ -6398,6 +6448,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6398
6448
  * @name GetRecommendedQuestionsInSpace
6399
6449
  * @summary Get a list of questions that can be asked in a space.
6400
6450
  * @request GET:/spaces/{spaceId}/search/questions
6451
+ * @deprecated
6401
6452
  * @secure
6402
6453
  */
6403
6454
  getRecommendedQuestionsInSpace: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<SearchAIRecommendedQuestions, Error>>;
@@ -6407,6 +6458,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6407
6458
  * @name StreamRecommendedQuestionsInSpace
6408
6459
  * @summary Stream a list of questions that can be asked in a space.
6409
6460
  * @request GET:/spaces/{spaceId}/search/questions/stream
6461
+ * @deprecated
6410
6462
  * @secure
6411
6463
  */
6412
6464
  streamRecommendedQuestionsInSpace: (spaceId: string, params?: RequestParams) => EventIterator<SearchAIRecommendedQuestionStream>;
@@ -6453,6 +6505,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6453
6505
  * @name GetContentAnalyticsForSpaceById
6454
6506
  * @summary Get content analytics for a given space.
6455
6507
  * @request GET:/spaces/{spaceId}/insights/content
6508
+ * @deprecated
6456
6509
  * @secure
6457
6510
  */
6458
6511
  getContentAnalyticsForSpaceById: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<AnalyticsContentPages, Error>>;
@@ -6463,6 +6516,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6463
6516
  * @name GetSearchAnalyticsForSpaceById
6464
6517
  * @summary Get an overview of the top search queries in a space.
6465
6518
  * @request GET:/spaces/{spaceId}/insights/search
6519
+ * @deprecated
6466
6520
  * @secure
6467
6521
  */
6468
6522
  getSearchAnalyticsForSpaceById: (spaceId: string, query?: {
@@ -6475,6 +6529,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6475
6529
  * @name GetTrafficAnalyticsForSpaceById
6476
6530
  * @summary Get traffic page views for a given space
6477
6531
  * @request GET:/spaces/{spaceId}/insights/traffic
6532
+ * @deprecated
6478
6533
  * @secure
6479
6534
  */
6480
6535
  getTrafficAnalyticsForSpaceById: (spaceId: string, query?: {
@@ -6487,6 +6542,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6487
6542
  * @name TrackViewInSpaceById
6488
6543
  * @summary Track a page view in a space
6489
6544
  * @request POST:/spaces/{spaceId}/insights/track_view
6545
+ * @deprecated
6490
6546
  * @secure
6491
6547
  */
6492
6548
  trackViewInSpaceById: (spaceId: string, data: SpaceTrackPageView, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
@@ -6897,29 +6953,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6897
6953
  * No description
6898
6954
  *
6899
6955
  * @name GetComputedDocument
6900
- * @summary Get the document for a page in a computed content.
6901
- * @request GET:/spaces/{spaceId}/content/computed/document
6956
+ * @summary Generate a document for a page in a computed content.
6957
+ * @request POST:/spaces/{spaceId}/content/computed/document
6902
6958
  * @secure
6903
6959
  */
6904
- getComputedDocument: (spaceId: string, query: {
6960
+ getComputedDocument: (spaceId: string, data: {
6961
+ /** Parameters for a computed content */
6962
+ source: ComputedContentSource;
6963
+ }, query?: {
6905
6964
  /** Output format for the content. */
6906
6965
  format?: "document" | "markdown";
6907
- /** LZ-string compressed JSON request */
6908
- request: string;
6909
6966
  }, params?: RequestParams) => Promise<HttpResponse<Document, Error>>;
6910
6967
  /**
6911
6968
  * No description
6912
6969
  *
6913
- * @name GetComputedPage
6914
- * @summary Get the computed pages for a page in a computed content.
6915
- * @request GET:/spaces/{spaceId}/content/computed/page
6970
+ * @name GetComputedRevision
6971
+ * @summary Get the computed content for a source in a computed content.
6972
+ * @request POST:/spaces/{spaceId}/content/computed/revision
6916
6973
  * @secure
6917
6974
  */
6918
- getComputedPage: (spaceId: string, query: {
6919
- /** Output format for the content. */
6920
- format?: "document" | "markdown";
6921
- /** LZ-string compressed JSON request */
6922
- request: string;
6975
+ getComputedRevision: (spaceId: string, data: {
6976
+ /** Parameters for a computed content */
6977
+ source: ComputedContentSource;
6923
6978
  }, params?: RequestParams) => Promise<HttpResponse<{
6924
6979
  pages: RevisionPage[];
6925
6980
  files: RevisionFile[];
@@ -9449,41 +9504,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9449
9504
  * @request POST:/orgs/{organizationId}/billing/migrate
9450
9505
  * @secure
9451
9506
  */
9452
- migrateOrganizationPlan: (organizationId: string, data: {
9453
- /** The desired billing interval */
9454
- interval: BillingInterval;
9455
- /** The new product to upgrade to */
9456
- product: "free_2024" | "plus_2024" | "pro_2024";
9457
- /** Changes to apply to the organization and its sites before upgrading */
9458
- changes?: {
9459
- /** A list of member identifiers to be removed */
9460
- removeMembers?: string[];
9461
- /** A list of site type 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. */
9462
- updateSiteTypes?: {
9463
- /** The site identifier */
9464
- id: string;
9465
- /** The new site type */
9466
- type: "basic" | "premium" | "ultimate";
9467
- }[];
9468
- };
9469
- }, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
9507
+ migrateOrganizationPlan: (organizationId: string, data: MigrateOrganizationParameters, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
9470
9508
  /**
9471
9509
  * No description
9472
9510
  *
9473
9511
  * @tags organizations
9474
9512
  * @name PreviewMigrateOrganizationPlan
9475
9513
  * @summary Preview a migration of an organization to new pricing.
9476
- * @request GET:/orgs/{organizationId}/billing/migrate
9514
+ * @request POST:/orgs/{organizationId}/billing/migrate/preview
9477
9515
  * @secure
9478
9516
  */
9479
- previewMigrateOrganizationPlan: (organizationId: string, query: {
9480
- /** The desired billing interval */
9481
- interval: BillingInterval;
9482
- /** The new product to upgrade to */
9483
- product: "free_2024" | "plus_2024" | "pro_2024";
9484
- /** How many members have been deselected by the user */
9485
- removedMembersCount: number;
9486
- }, params?: RequestParams) => Promise<HttpResponse<{
9517
+ previewMigrateOrganizationPlan: (organizationId: string, data: MigrateOrganizationParameters, params?: RequestParams) => Promise<HttpResponse<{
9487
9518
  totals: {
9488
9519
  /** Count of all members */
9489
9520
  members: number;
@@ -10104,6 +10135,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10104
10135
  * @name ListSnippets
10105
10136
  * @summary Lists snippets.
10106
10137
  * @request GET:/orgs/{organizationId}/snippets
10138
+ * @deprecated
10107
10139
  * @secure
10108
10140
  */
10109
10141
  listSnippets: (organizationId: string, query?: {
@@ -10127,6 +10159,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10127
10159
  * @name CreateSnippet
10128
10160
  * @summary Create a new snippet
10129
10161
  * @request POST:/orgs/{organizationId}/snippets
10162
+ * @deprecated
10130
10163
  * @secure
10131
10164
  */
10132
10165
  createSnippet: (organizationId: string, data: object, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
@@ -10137,6 +10170,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10137
10170
  * @name GetSnippet
10138
10171
  * @summary Get a snippet by its ID
10139
10172
  * @request GET:/orgs/{organizationId}/snippets/{snippetId}
10173
+ * @deprecated
10140
10174
  * @secure
10141
10175
  */
10142
10176
  getSnippet: (organizationId: string, snippetId: string, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
@@ -10157,6 +10191,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10157
10191
  * @name UpdateSnippet
10158
10192
  * @summary Update an existing snippet.
10159
10193
  * @request PUT:/orgs/{organizationId}/snippets/{snippetId}
10194
+ * @deprecated
10160
10195
  * @secure
10161
10196
  */
10162
10197
  updateSnippet: (organizationId: string, snippetId: string, data: UpdateSnippetSchema, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
@@ -10167,6 +10202,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10167
10202
  * @name MoveSnippet
10168
10203
  * @summary Move a snippet into a destination. The snippet will be archived in the process.
10169
10204
  * @request POST:/orgs/{organizationId}/snippets/{snippetId}/move
10205
+ * @deprecated
10170
10206
  * @secure
10171
10207
  */
10172
10208
  moveSnippet: (organizationId: string, snippetId: string, data: {
@@ -10192,6 +10228,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10192
10228
  * @name GetSnippetSuggestedLocations
10193
10229
  * @summary Return possible snippet locations in an organization based on the current user.
10194
10230
  * @request GET:/orgs/{organizationId}/snippets/{snippetId}/move
10231
+ * @deprecated
10195
10232
  * @secure
10196
10233
  */
10197
10234
  getSnippetSuggestedLocations: (organizationId: string, snippetId: string, query?: {
@@ -10771,6 +10808,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10771
10808
  }, params?: RequestParams) => Promise<HttpResponse<List & {
10772
10809
  items: SiteSpace[];
10773
10810
  }, Error>>;
10811
+ /**
10812
+ * No description
10813
+ *
10814
+ * @tags sites
10815
+ * @name ListSiteSectionGroups
10816
+ * @summary List all the section groups under a site in an organization
10817
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/section-groups
10818
+ * @secure
10819
+ */
10820
+ listSiteSectionGroups: (organizationId: string, siteId: string, query?: {
10821
+ /** Identifier of the page results to fetch. */
10822
+ page?: string;
10823
+ /**
10824
+ * The number of results per page
10825
+ * @min 0
10826
+ * @max 1000
10827
+ */
10828
+ limit?: number;
10829
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
10830
+ items: SiteSectionGroup[];
10831
+ }, Error>>;
10774
10832
  /**
10775
10833
  * No description
10776
10834
  *
@@ -10810,6 +10868,29 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10810
10868
  * @secure
10811
10869
  */
10812
10870
  deleteSiteSectionGroupById: (organizationId: string, siteId: string, siteSectionGroupId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
10871
+ /**
10872
+ * No description
10873
+ *
10874
+ * @tags sites
10875
+ * @name AddSectionToGroup
10876
+ * @summary Add a section to a section group
10877
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/sections
10878
+ * @secure
10879
+ */
10880
+ addSectionToGroup: (organizationId: string, siteId: string, siteSectionGroupId: string, data: {
10881
+ /** ID of the section to add to the section group */
10882
+ sectionId: string;
10883
+ }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, Error>>;
10884
+ /**
10885
+ * No description
10886
+ *
10887
+ * @tags sites
10888
+ * @name RemoveSectionFromGroup
10889
+ * @summary Remove a section from a section group
10890
+ * @request DELETE:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/sections/{siteSectionId}
10891
+ * @secure
10892
+ */
10893
+ removeSectionFromGroup: (organizationId: string, siteId: string, siteSectionGroupId: string, siteSectionId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
10813
10894
  /**
10814
10895
  * No description
10815
10896
  *
@@ -10870,6 +10951,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10870
10951
  /** Conditional expression used to evaluate whether the site section 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. */
10871
10952
  condition?: Condition | null;
10872
10953
  icon?: Icon | null;
10954
+ description?: SiteSectionDescription | null;
10873
10955
  }, params?: RequestParams) => Promise<HttpResponse<SiteSection, Error>>;
10874
10956
  /**
10875
10957
  * No description
@@ -11171,6 +11253,31 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11171
11253
  createSitesPageFeedback: (organizationId: string, siteId: string, siteSpaceId: string, pageId: string, visitorId: string, data: {
11172
11254
  rating: PageFeedbackRating;
11173
11255
  }, params?: RequestParams) => Promise<HttpResponse<PageFeedback, Error>>;
11256
+ /**
11257
+ * No description
11258
+ *
11259
+ * @tags sites
11260
+ * @name MoveSiteSectionGroup
11261
+ * @summary Move a site section group to a new position in the site.
11262
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/move
11263
+ * @secure
11264
+ */
11265
+ moveSiteSectionGroup: (organizationId: string, siteId: string, siteSectionGroupId: string, data: {
11266
+ /** The position where to move the site section group. When not provided the site section group is moved at the end of the site. */
11267
+ position?: SiteSectionGroupMovePosition;
11268
+ }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, Error | {
11269
+ error: {
11270
+ /** @format int32 */
11271
+ code: 400;
11272
+ message: string;
11273
+ };
11274
+ } | {
11275
+ error: {
11276
+ /** @format int32 */
11277
+ code: 404;
11278
+ message: string;
11279
+ };
11280
+ }>>;
11174
11281
  /**
11175
11282
  * No description
11176
11283
  *
package/dist/index.cjs CHANGED
@@ -265,7 +265,7 @@ module.exports = __toCommonJS(src_exports);
265
265
 
266
266
  // package.json
267
267
  var name = "@gitbook/api";
268
- var version = "0.90.0";
268
+ var version = "0.92.0";
269
269
 
270
270
  // src/client.ts
271
271
  var import_event_iterator = __toESM(require_node(), 1);
@@ -1550,19 +1550,22 @@ var Api = class extends HttpClient {
1550
1550
  format: "json",
1551
1551
  ...params
1552
1552
  }),
1553
- getComputedDocument: (spaceId, query, params = {}) => this.request({
1553
+ getComputedDocument: (spaceId, data, query, params = {}) => this.request({
1554
1554
  path: `/spaces/${spaceId}/content/computed/document`,
1555
- method: "GET",
1555
+ method: "POST",
1556
1556
  query,
1557
+ body: data,
1557
1558
  secure: true,
1559
+ type: "application/json" /* Json */,
1558
1560
  format: "json",
1559
1561
  ...params
1560
1562
  }),
1561
- getComputedPage: (spaceId, query, params = {}) => this.request({
1562
- path: `/spaces/${spaceId}/content/computed/page`,
1563
- method: "GET",
1564
- query,
1563
+ getComputedRevision: (spaceId, data, params = {}) => this.request({
1564
+ path: `/spaces/${spaceId}/content/computed/revision`,
1565
+ method: "POST",
1566
+ body: data,
1565
1567
  secure: true,
1568
+ type: "application/json" /* Json */,
1566
1569
  format: "json",
1567
1570
  ...params
1568
1571
  }),
@@ -2695,11 +2698,12 @@ var Api = class extends HttpClient {
2695
2698
  type: "application/json" /* Json */,
2696
2699
  ...params
2697
2700
  }),
2698
- previewMigrateOrganizationPlan: (organizationId, query, params = {}) => this.request({
2699
- path: `/orgs/${organizationId}/billing/migrate`,
2700
- method: "GET",
2701
- query,
2701
+ previewMigrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
2702
+ path: `/orgs/${organizationId}/billing/migrate/preview`,
2703
+ method: "POST",
2704
+ body: data,
2702
2705
  secure: true,
2706
+ type: "application/json" /* Json */,
2703
2707
  format: "json",
2704
2708
  ...params
2705
2709
  }),
@@ -3283,6 +3287,14 @@ var Api = class extends HttpClient {
3283
3287
  format: "json",
3284
3288
  ...params
3285
3289
  }),
3290
+ listSiteSectionGroups: (organizationId, siteId, query, params = {}) => this.request({
3291
+ path: `/orgs/${organizationId}/sites/${siteId}/section-groups`,
3292
+ method: "GET",
3293
+ query,
3294
+ secure: true,
3295
+ format: "json",
3296
+ ...params
3297
+ }),
3286
3298
  addSectionGroupToSite: (organizationId, siteId, data, params = {}) => this.request({
3287
3299
  path: `/orgs/${organizationId}/sites/${siteId}/section-groups`,
3288
3300
  method: "POST",
@@ -3307,6 +3319,21 @@ var Api = class extends HttpClient {
3307
3319
  secure: true,
3308
3320
  ...params
3309
3321
  }),
3322
+ addSectionToGroup: (organizationId, siteId, siteSectionGroupId, data, params = {}) => this.request({
3323
+ path: `/orgs/${organizationId}/sites/${siteId}/section-groups/${siteSectionGroupId}/sections`,
3324
+ method: "POST",
3325
+ body: data,
3326
+ secure: true,
3327
+ type: "application/json" /* Json */,
3328
+ format: "json",
3329
+ ...params
3330
+ }),
3331
+ removeSectionFromGroup: (organizationId, siteId, siteSectionGroupId, siteSectionId, params = {}) => this.request({
3332
+ path: `/orgs/${organizationId}/sites/${siteId}/section-groups/${siteSectionGroupId}/sections/${siteSectionId}`,
3333
+ method: "DELETE",
3334
+ secure: true,
3335
+ ...params
3336
+ }),
3310
3337
  addSectionToSite: (organizationId, siteId, data, params = {}) => this.request({
3311
3338
  path: `/orgs/${organizationId}/sites/${siteId}/sections`,
3312
3339
  method: "POST",
@@ -3426,6 +3453,15 @@ var Api = class extends HttpClient {
3426
3453
  format: "json",
3427
3454
  ...params
3428
3455
  }),
3456
+ moveSiteSectionGroup: (organizationId, siteId, siteSectionGroupId, data, params = {}) => this.request({
3457
+ path: `/orgs/${organizationId}/sites/${siteId}/section-groups/${siteSectionGroupId}/move`,
3458
+ method: "POST",
3459
+ body: data,
3460
+ secure: true,
3461
+ type: "application/json" /* Json */,
3462
+ format: "json",
3463
+ ...params
3464
+ }),
3429
3465
  moveSiteSection: (organizationId, siteId, siteSectionId, data, params = {}) => this.request({
3430
3466
  path: `/orgs/${organizationId}/sites/${siteId}/sections/${siteSectionId}/move`,
3431
3467
  method: "POST",