@gitbook/api 0.79.0 → 0.80.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
@@ -774,33 +774,17 @@ export declare enum SpaceEditMode {
774
774
  }
775
775
  /** @format uri */
776
776
  export type URL = string;
777
- /**
778
- * * `running`: The operation is still running
779
- * * `failure`: The operation failed
780
- * * `success`: The operation was successful
781
- */
782
- export declare enum GitSyncOperationState {
783
- Running = "running",
784
- Failure = "failure",
785
- Success = "success"
786
- }
787
- export interface GitSyncOperation {
788
- /**
789
- * * `running`: The operation is still running
790
- * * `failure`: The operation failed
791
- * * `success`: The operation was successful
792
- */
793
- state: GitSyncOperationState;
794
- startedAt?: Timestamp;
795
- /** Date when the operation was successful (when state is `success`) */
796
- completedAt?: Timestamp;
797
- /** Error details, defined if state is `failure`. */
798
- error?: string;
777
+ /** The provider of the Git Sync installation. */
778
+ export declare enum GitSyncProvider {
779
+ Github = "github",
780
+ Gitlab = "gitlab",
781
+ GithubLegacy = "github-legacy"
799
782
  }
800
783
  export interface GitSyncState {
801
784
  /** The provider of the Git Sync installation. */
802
- installationProvider?: string;
803
- operation?: GitSyncOperation;
785
+ installationProvider?: GitSyncProvider;
786
+ /** The integration name providing the Git Sync. */
787
+ integration?: string;
804
788
  /** The URL to the repository tree, used when rendering public content. */
805
789
  url?: string;
806
790
  /** When the Git provider details were last updated */
@@ -904,12 +888,28 @@ export interface Space {
904
888
  revision: string;
905
889
  /** Default level for a piece of content */
906
890
  defaultLevel: DefaultLevel;
891
+ /** Count of opened comments on the space. */
892
+ comments: number;
893
+ /** Total count of change requests on the space. */
894
+ changeRequests: number;
895
+ /** Count of open change requests on the space. */
896
+ changeRequestsOpen: number;
897
+ /** Count of draft change requests on the space. */
898
+ changeRequestsDraft: number;
907
899
  /** The set of permissions for the space */
908
900
  permissions: {
901
+ /** Can the user access the space in the application. */
902
+ access: boolean;
909
903
  /** Can the user edit the title, install integrations, and manage the space. */
910
904
  admin: boolean;
911
905
  /** Can the user edit the content of the space by creating a change request. */
912
906
  edit: boolean;
907
+ /** Can the user comment on the content. */
908
+ comment: boolean;
909
+ /** Can the user merge change requests. */
910
+ merge: boolean;
911
+ /** Can the user review change requests. */
912
+ review: boolean;
913
913
  };
914
914
  }
915
915
  export interface SpacePointer {
@@ -1490,6 +1490,7 @@ export declare enum BillingProduct {
1490
1490
  Plus2024 = "plus_2024",
1491
1491
  Pro2024 = "pro_2024",
1492
1492
  Enterprise2024 = "enterprise_2024",
1493
+ Community2024 = "community_2024",
1493
1494
  Free = "free",
1494
1495
  Plus = "plus",
1495
1496
  Pro = "pro",
@@ -1521,7 +1522,7 @@ export interface Organization {
1521
1522
  defaultRole?: MemberRoleOrGuest;
1522
1523
  /** The default content for the organization */
1523
1524
  defaultContent?: OrganizationDefaultContent;
1524
- /** Whether SSO is enforced organization wide */
1525
+ /** Whether SSO is enforced organization-wide */
1525
1526
  sso?: boolean;
1526
1527
  /** If true, the organization is configured to use all our AI features. */
1527
1528
  ai?: boolean;
@@ -1544,6 +1545,13 @@ export interface Organization {
1544
1545
  /** URL of the logo of this organization, if defined. */
1545
1546
  logo?: URL;
1546
1547
  };
1548
+ /** The set of permissions for the organization */
1549
+ permissions: {
1550
+ /** Can the user manage the title, members, etc. */
1551
+ admin: boolean;
1552
+ /** Can the user create new spaces/collections in the organization */
1553
+ createContent: boolean;
1554
+ };
1547
1555
  }
1548
1556
  export interface ContentLocationRevisionContext {
1549
1557
  type: 'revision';
@@ -2392,10 +2400,12 @@ export interface CustomizationContentLink {
2392
2400
  /** A relative reference to content in GitBook. */
2393
2401
  to: ContentRef;
2394
2402
  }
2395
- export type CustomizationHeaderLink = CustomizationContentLink & {
2403
+ export interface CustomizationHeaderItem {
2404
+ title: string;
2396
2405
  style?: 'link' | 'button-primary' | 'button-secondary';
2397
- links?: CustomizationContentLink[];
2398
- };
2406
+ to: ContentRef | null;
2407
+ links: CustomizationContentLink[];
2408
+ }
2399
2409
  export interface CustomizationFooterGroup {
2400
2410
  title: string;
2401
2411
  links: CustomizationContentLink[];
@@ -2432,7 +2442,7 @@ export interface CustomizationSettings {
2432
2442
  logo?: CustomizationThemedURL;
2433
2443
  backgroundColor?: CustomizationThemedColor;
2434
2444
  linkColor?: CustomizationThemedColor;
2435
- links: CustomizationHeaderLink[];
2445
+ links: CustomizationHeaderItem[];
2436
2446
  };
2437
2447
  footer: {
2438
2448
  logo?: CustomizationThemedURL;
@@ -3576,6 +3586,8 @@ export interface OrganizationAllSpace {
3576
3586
  export interface OrganizationAllContent {
3577
3587
  sites: OrganizationAllSite[];
3578
3588
  spaces: (OrganizationAllCollection | OrganizationAllSpace)[];
3589
+ /** List of soft-deleted spaces. */
3590
+ deletedSpaces: OrganizationAllSpace[];
3579
3591
  }
3580
3592
  export interface OrganizationMember {
3581
3593
  /** Type of Object, always equals to "member" */
@@ -3789,11 +3801,6 @@ export interface CreateSpace {
3789
3801
  /** ID of a parent collection */
3790
3802
  parent?: string;
3791
3803
  }
3792
- export interface SpaceWithGitSync {
3793
- space: Space;
3794
- /** @deprecated */
3795
- gitSync?: GitSyncState;
3796
- }
3797
3804
  export interface OrganizationExperimentalFeature {
3798
3805
  id: string;
3799
3806
  title: string;
@@ -3847,6 +3854,16 @@ export interface OrganizationSAMLProvider {
3847
3854
  location: string;
3848
3855
  };
3849
3856
  }
3857
+ export interface OrganizationSSOProviderLogin {
3858
+ /** Unique identifier for the provider. */
3859
+ id: string;
3860
+ label: SAMLProviderLabel;
3861
+ /**
3862
+ * The starting login URL for the Identity Provider
3863
+ * @format uri
3864
+ */
3865
+ startURL: string;
3866
+ }
3850
3867
  /** Spaces usage metrics of an organization */
3851
3868
  export interface OrganizationUsageSpaces {
3852
3869
  /** Count of all spaces */
@@ -4057,6 +4074,9 @@ export type BillingOperationPreviewResponse = {
4057
4074
  plan: BillingProduct;
4058
4075
  invoice?: BillingInvoicePreview;
4059
4076
  };
4077
+ export interface CustomizationTint {
4078
+ color: CustomizationThemedColor;
4079
+ }
4060
4080
  export declare enum CustomizationIconsStyle {
4061
4081
  Regular = "regular",
4062
4082
  Solid = "solid",
@@ -4069,6 +4089,7 @@ export interface SiteCustomizationSettings {
4069
4089
  title?: SiteTitle;
4070
4090
  styling: {
4071
4091
  primaryColor: CustomizationThemedColor;
4092
+ tint?: CustomizationTint;
4072
4093
  corners: CustomizationCorners;
4073
4094
  font: CustomizationFont;
4074
4095
  background: CustomizationBackground;
@@ -4089,7 +4110,7 @@ export interface SiteCustomizationSettings {
4089
4110
  logo?: CustomizationThemedURL;
4090
4111
  backgroundColor?: CustomizationThemedColor;
4091
4112
  linkColor?: CustomizationThemedColor;
4092
- links: CustomizationHeaderLink[];
4113
+ links: CustomizationHeaderItem[];
4093
4114
  };
4094
4115
  footer: {
4095
4116
  logo?: CustomizationThemedURL;
@@ -4202,6 +4223,19 @@ export type SitePublishingAuthUpdate = (VisitorAuthCustomBackend | VisitorAuthIn
4202
4223
  */
4203
4224
  fallbackURL?: string;
4204
4225
  };
4226
+ export type SiteSearchScope = {
4227
+ /** 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. */
4228
+ mode: 'default';
4229
+ includedSiteSpaces?: string[];
4230
+ } | {
4231
+ /** Only search in the provided site spaces. */
4232
+ mode: 'specific';
4233
+ /** @minLength 1 */
4234
+ siteSpaceIds: string[];
4235
+ } | {
4236
+ /** Search in all sections and site spaces. This scope is wide and deep. */
4237
+ mode: 'all';
4238
+ };
4205
4239
  export interface SiteSectionPointer {
4206
4240
  type: 'site-section';
4207
4241
  /** Unique identifier for the site section */
@@ -4286,6 +4320,19 @@ export interface SiteAdsStats {
4286
4320
  clicks: number;
4287
4321
  revenue: string;
4288
4322
  }
4323
+ export interface SearchInsightsIntervals {
4324
+ values?: {
4325
+ /**
4326
+ * The start date of this interval
4327
+ * @format date-time
4328
+ */
4329
+ date: string;
4330
+ /** The total number of searches during the interval. */
4331
+ total: number;
4332
+ /** Top queries searched for this content. */
4333
+ queries: AnalyticsSearchQuery[];
4334
+ }[];
4335
+ }
4289
4336
  /** Page entry in the content insights. */
4290
4337
  export interface InsightsContentPage {
4291
4338
  /** Unique identifier for the page in the revision */
@@ -4675,6 +4722,20 @@ export declare enum RevisionSemanticChangeType {
4675
4722
  FileDeleted = "file_deleted",
4676
4723
  CustomFieldsEdited = "custom_fields_edited"
4677
4724
  }
4725
+ /**
4726
+ * * `running`: The operation is still running
4727
+ * * `failure`: The operation failed
4728
+ * * `success`: The operation was successful
4729
+ */
4730
+ export declare enum GitSyncOperationState {
4731
+ Running = "running",
4732
+ Failure = "failure",
4733
+ Success = "success"
4734
+ }
4735
+ export declare enum GitSyncOperationDirection {
4736
+ Export = "export",
4737
+ Import = "import"
4738
+ }
4678
4739
  /**
4679
4740
  * Core stages of a Git Sync process. This is not exhaustive, but should cover
4680
4741
  * the important ones.
@@ -4690,6 +4751,35 @@ export declare enum GitSyncOperationStage {
4690
4751
  ContentProcess = "content_process",
4691
4752
  Finalize = "finalize"
4692
4753
  }
4754
+ export interface GitSyncOperation {
4755
+ /**
4756
+ * * `running`: The operation is still running
4757
+ * * `failure`: The operation failed
4758
+ * * `success`: The operation was successful
4759
+ */
4760
+ state: GitSyncOperationState;
4761
+ direction: GitSyncOperationDirection;
4762
+ /**
4763
+ * Core stages of a Git Sync process. This is not exhaustive, but should cover
4764
+ * the important ones.
4765
+ * - repo_fetch: Includes fetching the latest repository contents from remote provider.
4766
+ * - config_check: Includes checking if the YAML config is valid, etc.
4767
+ * - content_process: Includes processing of pages & files to be imported/exported.
4768
+ * - finalize: Includes finalizing the sync process like creating the commit on git, or
4769
+ * creating a new revision.
4770
+ */
4771
+ stage: GitSyncOperationStage;
4772
+ dispatchedTasks: number;
4773
+ completedTasks: number;
4774
+ /** Date when the operation was started */
4775
+ startedAt: Timestamp;
4776
+ /** Date when the operation was last updated */
4777
+ updatedAt: Timestamp;
4778
+ /** Date when the operation was successful (when state is `success`) */
4779
+ completedAt?: Timestamp;
4780
+ /** Error details, defined if state is `failure`. */
4781
+ error?: string;
4782
+ }
4693
4783
  export interface OrganizationTransferResponse {
4694
4784
  /** The unique id of the collection created in the target organization containing the content of the source organization. */
4695
4785
  collection: string;
@@ -4772,7 +4862,7 @@ export interface ContentAPIBaseToken {
4772
4862
  /** List of spaces that the token is allowed to access. */
4773
4863
  spaces: string[];
4774
4864
  /** Attributes or assertions that provide specific details about the visitor for which the token was generated. */
4775
- claims: Record<string, any>;
4865
+ claims?: Record<string, any>;
4776
4866
  /** Multiplier for the rate limit applied to the token. */
4777
4867
  rateLimitMultiplier?: number;
4778
4868
  }
@@ -4947,6 +5037,11 @@ export interface OrganizationExperimentalFeaturesChannel {
4947
5037
  channel: 'organization-experimental-features';
4948
5038
  organization: string;
4949
5039
  }
5040
+ /** Channel for messages everytime a space is indexed by the AI in an organization */
5041
+ export interface OrganizationAIIndexationChannel {
5042
+ channel: 'organization-ai-indexation';
5043
+ organization: string;
5044
+ }
4950
5045
  export interface SpaceCommentsChannel {
4951
5046
  channel: 'space-comments';
4952
5047
  space: string;
@@ -5070,27 +5165,10 @@ export interface GitSyncOperationChannel {
5070
5165
  space: string;
5071
5166
  }
5072
5167
  /** Channel to subscribe to for realtime updates. */
5073
- export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationExperimentalFeaturesChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel;
5168
+ export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationExperimentalFeaturesChannel | OrganizationAIIndexationChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel;
5074
5169
  export interface GitSyncOperationChannelData {
5075
5170
  channel: 'space-gitsync-operation';
5076
- /** Data passed on the channel messages for GitSync running in a space. */
5077
- data: {
5078
- direction: 'export' | 'import';
5079
- /**
5080
- * Core stages of a Git Sync process. This is not exhaustive, but should cover
5081
- * the important ones.
5082
- * - repo_fetch: Includes fetching the latest repository contents from remote provider.
5083
- * - config_check: Includes checking if the YAML config is valid, etc.
5084
- * - content_process: Includes processing of pages & files to be imported/exported.
5085
- * - finalize: Includes finalizing the sync process like creating the commit on git, or
5086
- * creating a new revision.
5087
- */
5088
- stage: GitSyncOperationStage;
5089
- dispatchedTasks: number;
5090
- completedTasks: number;
5091
- startedAt: number;
5092
- updatedAt: number;
5093
- } | null;
5171
+ data: GitSyncOperation;
5094
5172
  }
5095
5173
  export interface SpaceContentRefsChannelData {
5096
5174
  channel: 'space-content-refs';
@@ -5110,6 +5188,13 @@ export interface ChangeRequestContentRefsChannelData {
5110
5188
  updatedAt: number;
5111
5189
  };
5112
5190
  }
5191
+ export interface OrganizationAIIndexationChannelData {
5192
+ channel: 'organization-ai-indexation';
5193
+ data: {
5194
+ /** The space that was indexed */
5195
+ space: string;
5196
+ };
5197
+ }
5113
5198
  export interface APIChannelMutationData {
5114
5199
  channel: '*';
5115
5200
  /** Data passed on the channels associated to API endpoints. */
@@ -5119,7 +5204,7 @@ export interface APIChannelMutationData {
5119
5204
  };
5120
5205
  }
5121
5206
  /** Data passed through a realtime channel */
5122
- export type SubscriptionChannelData = GitSyncOperationChannelData | SpaceContentRefsChannelData | ChangeRequestContentRefsChannelData | APIChannelMutationData;
5207
+ export type SubscriptionChannelData = GitSyncOperationChannelData | SpaceContentRefsChannelData | ChangeRequestContentRefsChannelData | OrganizationAIIndexationChannelData | APIChannelMutationData;
5123
5208
  /** The status of ads on the site */
5124
5209
  export declare enum SiteAdsStatus {
5125
5210
  Pending = "pending",
@@ -8409,29 +8494,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8409
8494
  * @secure
8410
8495
  */
8411
8496
  createSpace: (organizationId: string, data: CreateSpace, params?: RequestParams) => Promise<HttpResponse<Space, Error>>;
8412
- /**
8413
- * @description Lists spaces including Git sync metadata for the specified organization.
8414
- *
8415
- * @tags organizations
8416
- * @name ListSpacesWithGitSyncInOrganizationById
8417
- * @summary List organization spaces including Git sync metadata
8418
- * @request GET:/orgs/{organizationId}/spaces/gitsync
8419
- * @secure
8420
- */
8421
- listSpacesWithGitSyncInOrganizationById: (organizationId: string, query?: {
8422
- /** Identifier of the page results to fetch. */
8423
- page?: string;
8424
- /**
8425
- * The number of results per page
8426
- * @min 0
8427
- * @max 1000
8428
- */
8429
- limit?: number;
8430
- /** If defined, only spaces with matching Git sync status are returned */
8431
- status?: GitSyncOperationState;
8432
- }, params?: RequestParams) => Promise<HttpResponse<List & {
8433
- items: SpaceWithGitSync[];
8434
- }, Error>>;
8435
8497
  /**
8436
8498
  * @description Lists collections for the specified organization.
8437
8499
  *
@@ -8749,6 +8811,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8749
8811
  * @secure
8750
8812
  */
8751
8813
  deleteOrganizationSamlProvider: (organizationId: string, samlProviderId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
8814
+ /**
8815
+ * @description Lists SSO login information configured for the specified organization.
8816
+ *
8817
+ * @tags organizations
8818
+ * @name ListSsoProviderLoginsInOrganization
8819
+ * @summary List organization SSO provider login information
8820
+ * @request GET:/orgs/{organizationId}/sso
8821
+ * @secure
8822
+ */
8823
+ listSsoProviderLoginsInOrganization: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
8824
+ items: OrganizationSSOProviderLogin[];
8825
+ }, Error>>;
8752
8826
  /**
8753
8827
  * No description
8754
8828
  *
@@ -9671,24 +9745,33 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9671
9745
  * @secure
9672
9746
  */
9673
9747
  searchSiteContent: (organizationId: string, siteId: string, data: {
9674
- /** Search only in the site spaces provided */
9748
+ /** @maxLength 512 */
9749
+ query: string;
9750
+ } & ({
9751
+ /** Define the scope of the search. */
9752
+ scope: SiteSearchScope;
9753
+ } | {
9754
+ /**
9755
+ * Search only in the site spaces provided. Deprecated, use scope instead.
9756
+ * @deprecated
9757
+ */
9675
9758
  mode?: "specific";
9676
9759
  /** @minLength 1 */
9677
9760
  siteSpaceIds: string[];
9678
- /** @maxLength 512 */
9679
- query: string;
9680
9761
  } | {
9681
- /** Search in the current site space and all section's defaults */
9762
+ /**
9763
+ * Search in the current site space and all section's defaults. Deprecated, use scope instead.
9764
+ * @deprecated
9765
+ */
9682
9766
  mode: "current";
9683
9767
  siteSpaceId: string;
9684
- /** @maxLength 512 */
9685
- query: string;
9686
9768
  } | {
9687
- /** search in all site-spaces */
9769
+ /**
9770
+ * Search in all site-spaces. Deprecated, use scope instead.
9771
+ * @deprecated
9772
+ */
9688
9773
  mode: "all";
9689
- /** @maxLength 512 */
9690
- query: string;
9691
- }, query?: {
9774
+ }), query?: {
9692
9775
  /** Identifier of the page results to fetch. */
9693
9776
  page?: string;
9694
9777
  /**
@@ -9700,6 +9783,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9700
9783
  }, params?: RequestParams) => Promise<HttpResponse<List & {
9701
9784
  items: SearchSpaceResult[];
9702
9785
  }, Error>>;
9786
+ /**
9787
+ * No description
9788
+ *
9789
+ * @name StreamAskInSite
9790
+ * @summary Ask a question in a site. The response is streamed.
9791
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/ask
9792
+ * @secure
9793
+ */
9794
+ streamAskInSite: (organizationId: string, siteId: string, data: {
9795
+ /** @maxLength 512 */
9796
+ question: string;
9797
+ scope: SiteSearchScope;
9798
+ }, query?: {
9799
+ /** Output format for the content. */
9800
+ format?: "document" | "markdown";
9801
+ }, params?: RequestParams) => EventIterator<SearchAIAnswerStream>;
9703
9802
  /**
9704
9803
  * No description
9705
9804
  *
@@ -9761,6 +9860,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9761
9860
  styling?: {
9762
9861
  /** The primary color used for links and UI text. Set to null to reset the override. */
9763
9862
  primaryColor?: CustomizationThemedColor | null;
9863
+ /** The tint will colour the site’s UI beyond links and buttons, such as header, sidebar and background. By default, the tint colour is the same as your Primary colour, but you can set a custom one too. */
9864
+ tint?: CustomizationTint | null;
9764
9865
  /** The style of the corners to use. Set to null to reset the override. */
9765
9866
  corners?: CustomizationCorners | null;
9766
9867
  /** The font family to use for the content. Set to null to reset the override. */
@@ -9791,7 +9892,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9791
9892
  /** The color used by the links in the header. Set to null to reset the override. */
9792
9893
  linkColor?: CustomizationThemedColor | null;
9793
9894
  /** The links that are displayed in the header. Set to null to reset the override. */
9794
- links?: CustomizationHeaderLink[] | null;
9895
+ links?: CustomizationHeaderItem[] | null;
9795
9896
  };
9796
9897
  footer?: {
9797
9898
  /** The logo displayed in the footer. Set to null to reset the override. */
package/dist/index.cjs CHANGED
@@ -210,8 +210,10 @@ __export(src_exports, {
210
210
  GITBOOK_DEFAULT_ENDPOINT: () => GITBOOK_DEFAULT_ENDPOINT,
211
211
  GitBookAPI: () => GitBookAPI,
212
212
  GitBookAPIError: () => GitBookAPIError,
213
+ GitSyncOperationDirection: () => GitSyncOperationDirection,
213
214
  GitSyncOperationStage: () => GitSyncOperationStage,
214
215
  GitSyncOperationState: () => GitSyncOperationState,
216
+ GitSyncProvider: () => GitSyncProvider,
215
217
  HttpClient: () => HttpClient,
216
218
  ImportContentSource: () => ImportContentSource,
217
219
  InsightsInterval: () => InsightsInterval,
@@ -244,7 +246,7 @@ module.exports = __toCommonJS(src_exports);
244
246
 
245
247
  // package.json
246
248
  var name = "@gitbook/api";
247
- var version = "0.79.0";
249
+ var version = "0.80.0";
248
250
 
249
251
  // src/client.ts
250
252
  var import_event_iterator = __toESM(require_node(), 1);
@@ -384,12 +386,12 @@ var SpaceEditMode = /* @__PURE__ */ ((SpaceEditMode2) => {
384
386
  SpaceEditMode2["Locked"] = "locked";
385
387
  return SpaceEditMode2;
386
388
  })(SpaceEditMode || {});
387
- var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
388
- GitSyncOperationState2["Running"] = "running";
389
- GitSyncOperationState2["Failure"] = "failure";
390
- GitSyncOperationState2["Success"] = "success";
391
- return GitSyncOperationState2;
392
- })(GitSyncOperationState || {});
389
+ var GitSyncProvider = /* @__PURE__ */ ((GitSyncProvider2) => {
390
+ GitSyncProvider2["Github"] = "github";
391
+ GitSyncProvider2["Gitlab"] = "gitlab";
392
+ GitSyncProvider2["GithubLegacy"] = "github-legacy";
393
+ return GitSyncProvider2;
394
+ })(GitSyncProvider || {});
393
395
  var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
394
396
  MemberRole2["Admin"] = "admin";
395
397
  MemberRole2["Create"] = "create";
@@ -466,6 +468,7 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
466
468
  BillingProduct2["Plus2024"] = "plus_2024";
467
469
  BillingProduct2["Pro2024"] = "pro_2024";
468
470
  BillingProduct2["Enterprise2024"] = "enterprise_2024";
471
+ BillingProduct2["Community2024"] = "community_2024";
469
472
  BillingProduct2["Free"] = "free";
470
473
  BillingProduct2["Plus"] = "plus";
471
474
  BillingProduct2["Pro"] = "pro";
@@ -770,6 +773,17 @@ var RevisionSemanticChangeType = /* @__PURE__ */ ((RevisionSemanticChangeType2)
770
773
  RevisionSemanticChangeType2["CustomFieldsEdited"] = "custom_fields_edited";
771
774
  return RevisionSemanticChangeType2;
772
775
  })(RevisionSemanticChangeType || {});
776
+ var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
777
+ GitSyncOperationState2["Running"] = "running";
778
+ GitSyncOperationState2["Failure"] = "failure";
779
+ GitSyncOperationState2["Success"] = "success";
780
+ return GitSyncOperationState2;
781
+ })(GitSyncOperationState || {});
782
+ var GitSyncOperationDirection = /* @__PURE__ */ ((GitSyncOperationDirection2) => {
783
+ GitSyncOperationDirection2["Export"] = "export";
784
+ GitSyncOperationDirection2["Import"] = "import";
785
+ return GitSyncOperationDirection2;
786
+ })(GitSyncOperationDirection || {});
773
787
  var GitSyncOperationStage = /* @__PURE__ */ ((GitSyncOperationStage2) => {
774
788
  GitSyncOperationStage2["RepoFetch"] = "repo_fetch";
775
789
  GitSyncOperationStage2["ConfigCheck"] = "config_check";
@@ -2450,14 +2464,6 @@ var Api = class extends HttpClient {
2450
2464
  format: "json",
2451
2465
  ...params
2452
2466
  }),
2453
- listSpacesWithGitSyncInOrganizationById: (organizationId, query, params = {}) => this.request({
2454
- path: `/orgs/${organizationId}/spaces/gitsync`,
2455
- method: "GET",
2456
- query,
2457
- secure: true,
2458
- format: "json",
2459
- ...params
2460
- }),
2461
2467
  listCollectionsInOrganizationById: (organizationId, query, params = {}) => this.request({
2462
2468
  path: `/orgs/${organizationId}/collections`,
2463
2469
  method: "GET",
@@ -2599,6 +2605,13 @@ var Api = class extends HttpClient {
2599
2605
  secure: true,
2600
2606
  ...params
2601
2607
  }),
2608
+ listSsoProviderLoginsInOrganization: (organizationId, params = {}) => this.request({
2609
+ path: `/orgs/${organizationId}/sso`,
2610
+ method: "GET",
2611
+ secure: true,
2612
+ format: "json",
2613
+ ...params
2614
+ }),
2602
2615
  getUsageForOrganizationById: (organizationId, params = {}) => this.request({
2603
2616
  path: `/orgs/${organizationId}/usage`,
2604
2617
  method: "GET",
@@ -3033,6 +3046,15 @@ var Api = class extends HttpClient {
3033
3046
  format: "json",
3034
3047
  ...params
3035
3048
  }),
3049
+ streamAskInSite: (organizationId, siteId, data, query, params = {}) => this.streamRequest({
3050
+ path: `/orgs/${organizationId}/sites/${siteId}/ask`,
3051
+ method: "POST",
3052
+ query,
3053
+ body: data,
3054
+ secure: true,
3055
+ type: "application/json" /* Json */,
3056
+ ...params
3057
+ }),
3036
3058
  updateSiteSpaceById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
3037
3059
  path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}`,
3038
3060
  method: "PATCH",
@@ -3393,8 +3415,10 @@ var GitBookAPI = class extends Api {
3393
3415
  GITBOOK_DEFAULT_ENDPOINT,
3394
3416
  GitBookAPI,
3395
3417
  GitBookAPIError,
3418
+ GitSyncOperationDirection,
3396
3419
  GitSyncOperationStage,
3397
3420
  GitSyncOperationState,
3421
+ GitSyncProvider,
3398
3422
  HttpClient,
3399
3423
  ImportContentSource,
3400
3424
  InsightsInterval,