@gitbook/api 0.92.0 → 0.94.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
@@ -144,17 +144,17 @@ export interface ContentRefSpace {
144
144
  kind: 'space';
145
145
  space: string;
146
146
  }
147
- export interface ContentRefSnippet {
148
- kind: 'snippet';
149
- snippet: string;
150
- organization: string;
151
- }
152
147
  export interface ContentRefReusableContent {
153
148
  kind: 'reusable-content';
154
149
  reusableContent: string;
155
150
  }
151
+ export interface ContentRefOpenAPI {
152
+ kind: 'openapi';
153
+ /** Slug of the OpenAPI specification */
154
+ spec: string;
155
+ }
156
156
  /** A relative reference to content in GitBook. */
157
- export type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace | ContentRefSnippet | ContentRefReusableContent;
157
+ export type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace | ContentRefReusableContent | ContentRefOpenAPI;
158
158
  export interface DocumentInlineLink {
159
159
  object: 'inline';
160
160
  type: 'link';
@@ -534,9 +534,6 @@ export type ContentKitDefaultAction = {
534
534
  } | {
535
535
  action: '@ui.modal.close';
536
536
  returnValue: PlainObject;
537
- } | {
538
- action: '@ui.complete';
539
- returnValue: PlainObject;
540
537
  } | {
541
538
  action: '@ui.url.open';
542
539
  url: string;
@@ -609,7 +606,7 @@ export interface DocumentBlockOpenAPI {
609
606
  type: 'swagger';
610
607
  key?: string;
611
608
  data: OpenAPIOperationPointer & {
612
- ref: ContentRefFile | ContentRefURL;
609
+ ref: ContentRefFile | ContentRefURL | ContentRefOpenAPI;
613
610
  /** If true, the block is opened by default. */
614
611
  expanded?: boolean;
615
612
  fullWidth?: boolean;
@@ -770,7 +767,10 @@ export declare enum SpaceEditMode {
770
767
  Live = "live",
771
768
  Locked = "locked"
772
769
  }
773
- /** @format uri */
770
+ /**
771
+ * @format uri
772
+ * @maxLength 2048
773
+ */
774
774
  export type URL = string;
775
775
  /** The provider of the Git Sync installation. */
776
776
  export declare enum GitSyncProvider {
@@ -1612,10 +1612,16 @@ export interface Organization {
1612
1612
  blocked?: {
1613
1613
  reason: OrganizationBlockReason;
1614
1614
  };
1615
- /** If true, the organization is still using the deprecated snippets feature. */
1616
- internal_isUsingSnippets?: boolean;
1617
1615
  /** If true, the organization is on the new trial which includes sites and the Pro plan. */
1618
1616
  internal_isOnNewTrial?: boolean;
1617
+ internal_billingMigration?: {
1618
+ /** When we will upgrade the organization onto new pricing, if they haven't already. */
1619
+ deadline?: Timestamp;
1620
+ /** A discount the organization may have received thanks to migrating early. */
1621
+ discountPercent?: number;
1622
+ /** The expiration date of the discount, after wich regular pricing resumes. */
1623
+ discountEndDate?: Timestamp;
1624
+ };
1619
1625
  /** The set of permissions for the organization */
1620
1626
  permissions: {
1621
1627
  /** Can the user manage the title, members, etc. */
@@ -1722,297 +1728,64 @@ export interface ContentLocationSpace {
1722
1728
  organization: Organization;
1723
1729
  space: Space;
1724
1730
  }
1725
- /**
1726
- * Title of the integration
1727
- * @minLength 2
1728
- * @maxLength 30
1729
- */
1730
- export type IntegrationTitle = string;
1731
- /**
1732
- * Description of the integration
1733
- * @maxLength 100
1734
- */
1735
- export type IntegrationDescription = string;
1736
- /**
1737
- * Long form markdown summary of the integration
1738
- * @maxLength 2048
1739
- */
1740
- export type IntegrationSummary = string;
1741
- /** The target on which the integration can operate and needs to be configured for */
1742
- export declare enum IntegrationTarget {
1743
- All = "all",
1744
- Site = "site",
1745
- Space = "space",
1746
- Organization = "organization"
1747
- }
1748
- export declare enum IntegrationVisibility {
1749
- Public = "public",
1750
- Private = "private",
1751
- Unlisted = "unlisted"
1752
- }
1753
- export declare enum IntegrationScope {
1754
- SnippetsRead = "snippets:read",
1755
- CaptureWrite = "capture:write",
1756
- SpaceViewsRead = "space:views:read",
1757
- SpaceContentRead = "space:content:read",
1758
- SpaceContentWrite = "space:content:write",
1759
- SpaceMetadataRead = "space:metadata:read",
1760
- SpaceMetadataWrite = "space:metadata:write",
1761
- SpaceScriptInject = "space:script:inject",
1762
- SpaceScriptCookies = "space:script:cookies",
1763
- SpaceGitSync = "space:git:sync",
1764
- SpaceVisitorAuth = "space:visitor:auth",
1765
- SiteMetadataRead = "site:metadata:read",
1766
- SiteViewsRead = "site:views:read",
1767
- SiteScriptInject = "site:script:inject",
1768
- SiteScriptCookies = "site:script:cookies",
1769
- SiteVisitorAuth = "site:visitor:auth"
1770
- }
1771
- /** Permissions that should be granted to the integration */
1772
- export type IntegrationScopes = IntegrationScope[];
1773
- export declare enum IntegrationCategory {
1774
- Analytics = "analytics",
1775
- Captures = "captures",
1776
- Collaboration = "collaboration",
1777
- Content = "content",
1778
- Gitsync = "gitsync",
1779
- Marketing = "marketing",
1780
- VisitorAuth = "visitor-auth",
1781
- Other = "other"
1782
- }
1783
- /** Categories for which the integration is listed in the marketplace */
1784
- export type IntegrationCategories = IntegrationCategory[];
1785
- /** Custom blocks defined by this integration. */
1786
- export type IntegrationBlocks = IntegrationBlock[];
1787
- /** ContentKit component for configuration */
1788
- export interface IntegrationConfigurationComponent {
1789
- /** ID of the ContentKit component defined in the integration */
1790
- componentId: string;
1791
- }
1792
- /** Definition of a content source provided by the integration. */
1793
- export interface IntegrationContentSource {
1794
- /** Unique ID in the integration for the source. */
1795
- id: string;
1796
- /**
1797
- * Short descriptive title for the source.
1798
- * @minLength 2
1799
- * @maxLength 40
1800
- */
1801
- title: string;
1802
- /**
1803
- * Long descriptive text for the source.
1804
- * @minLength 0
1805
- * @maxLength 150
1806
- */
1807
- description?: string;
1808
- /** URL of the icon to represent this source. */
1809
- icon?: string;
1810
- /** ContentKit component for configuration */
1811
- configuration?: IntegrationConfigurationComponent;
1812
- }
1813
- /** Schema for a configuration */
1814
- export interface IntegrationConfigurationSchema {
1815
- properties: Record<string, {
1816
- /** @maxLength 30 */
1817
- title?: string;
1818
- /** @maxLength 100 */
1819
- description?: string;
1820
- } & ({
1821
- type: 'string';
1822
- default?: string;
1823
- } | {
1824
- type: 'number';
1825
- default?: number;
1826
- } | {
1827
- type: 'boolean';
1828
- default?: boolean;
1829
- } | {
1830
- type: 'button';
1831
- callback_url: string;
1832
- button_text: string;
1833
- })>;
1834
- /** @uniqueItems true */
1835
- required?: string[];
1836
- }
1837
- export type IntegrationConfiguration = IntegrationConfigurationSchema | IntegrationConfigurationComponent;
1838
- export interface IntegrationConfigurations {
1839
- account?: IntegrationConfiguration;
1840
- space?: IntegrationConfiguration;
1841
- site?: IntegrationConfiguration;
1731
+ export interface ContentLocationReusableContent {
1732
+ kind: 'reusable-content';
1733
+ organization: Organization;
1734
+ space: Space;
1735
+ versionContext?: ContentLocationRevisionContext | ContentLocationChangeRequestContext;
1736
+ reusableContent: RevisionReusableContent;
1842
1737
  }
1843
1738
  /**
1844
- * External urls configured by the developer of the integration
1845
- * @maxItems 5
1846
- */
1847
- export type IntegrationExternalLinks = {
1848
- url: URL;
1849
- label: string;
1850
- }[];
1851
- /**
1852
- * Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
1853
- * headers when processing the script fetch event and the blocks fetch events.
1739
+ * Slug used as reference
1740
+ * @minLength 1
1741
+ * @maxLength 100
1854
1742
  */
1855
- export type IntegrationContentSecurityPolicy = string | {
1856
- 'base-uri'?: string;
1857
- 'block-all-mixed-content'?: string;
1858
- 'child-src'?: string;
1859
- 'connect-src'?: string;
1860
- 'default-src'?: string;
1861
- 'font-src'?: string;
1862
- 'form-action'?: string;
1863
- 'frame-ancestors'?: string;
1864
- 'frame-src'?: string;
1865
- 'img-src'?: string;
1866
- 'manifest-src'?: string;
1867
- 'media-src'?: string;
1868
- 'navigate-to'?: string;
1869
- 'object-src'?: string;
1870
- 'plugin-types'?: string;
1871
- 'prefetch-src'?: string;
1872
- referrer?: string;
1873
- 'report-to'?: string;
1874
- 'report-uri'?: string;
1875
- 'require-sri-for'?: string;
1876
- 'require-trusted-types-for'?: string;
1877
- sandbox?: string;
1878
- 'script-src'?: string;
1879
- 'script-src-attr'?: string;
1880
- 'script-src-elem'?: string;
1881
- 'style-src'?: string;
1882
- 'style-src-attr'?: string;
1883
- 'style-src-elem'?: string;
1884
- 'trusted-types'?: string;
1885
- 'upgrade-insecure-requests'?: string;
1886
- 'worker-src'?: string;
1887
- };
1888
- export interface Integration {
1889
- object: 'integration';
1890
- /** Unique named identifier for the integration */
1891
- name: string;
1892
- /** Version of the integration */
1893
- version: number;
1894
- /** Title of the integration */
1895
- title: IntegrationTitle;
1896
- /** Description of the integration */
1897
- description?: IntegrationDescription;
1898
- /** Long form markdown summary of the integration */
1899
- summary?: IntegrationSummary;
1900
- /**
1901
- * URLs of images to showcase the integration
1902
- * @maxItems 3
1903
- */
1904
- previewImages: string[];
1905
- /** The target on which the integration can operate and needs to be configured for */
1906
- target: IntegrationTarget;
1907
- /** If true, the integration has been verified by the GitBook team */
1908
- verified: boolean;
1909
- visibility: IntegrationVisibility;
1910
- /** Permissions that should be granted to the integration */
1911
- scopes: IntegrationScopes;
1912
- /** Categories for which the integration is listed in the marketplace */
1913
- categories: IntegrationCategories;
1914
- /** Custom blocks defined by this integration. */
1915
- blocks?: IntegrationBlocks;
1916
- contentSources?: IntegrationContentSource[];
1917
- configurations?: IntegrationConfigurations;
1918
- /** External urls configured by the developer of the integration */
1919
- externalLinks: IntegrationExternalLinks;
1920
- owner: Organization;
1921
- /** URLs associated with the object */
1922
- urls: {
1923
- /**
1924
- * URL of the integration in the API
1925
- * @format uri
1926
- */
1927
- location: string;
1928
- /**
1929
- * URL of the icon associated to the integration
1930
- * @format uri
1931
- */
1932
- icon?: string;
1933
- /**
1934
- * URL of the integration in the application
1935
- * @format uri
1936
- */
1937
- app: string;
1938
- /**
1939
- * URL of the integration's assets.
1940
- * @format uri
1941
- */
1942
- assets: string;
1943
- /**
1944
- * Public HTTP endpoint for the integration
1945
- * @format uri
1946
- */
1947
- publicEndpoint: string;
1948
- };
1949
- /** The set of permissions for the integration */
1950
- permissions: {
1951
- admin: boolean;
1952
- };
1953
- /**
1954
- * Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
1955
- * headers when processing the script fetch event and the blocks fetch events.
1956
- */
1957
- contentSecurityPolicy?: IntegrationContentSecurityPolicy;
1958
- }
1959
- export interface Snippet {
1960
- /** Unique identifier for the snippet */
1743
+ export type OpenAPISpecSlug = string;
1744
+ /** Processing state */
1745
+ export declare enum OpenAPISpecProcessingState {
1746
+ Pending = "pending",
1747
+ Progress = "progress",
1748
+ Complete = "complete"
1749
+ }
1750
+ /** OpenAPI processing error code */
1751
+ export declare enum OpenAPISpecProcessingErrorCode {
1752
+ FETCH_TIMEOUT = "FETCH_TIMEOUT",
1753
+ FETCH_ERROR = "FETCH_ERROR",
1754
+ PARSE_ERROR = "PARSE_ERROR"
1755
+ }
1756
+ export interface OpenAPISpec {
1757
+ /** The object type, which is always "openapi-spec" */
1758
+ object: 'openapi-spec';
1759
+ /** Unique identifier */
1961
1760
  id: string;
1962
- /** ID of the organization owning this snippet */
1963
- organization: string;
1964
- /** @format date-time */
1965
- createdAt: string;
1966
- /**
1967
- * Timestamp of when the snippet was last edited, if it has been edited since its creation.
1968
- * @format date-time
1969
- */
1970
- editedAt?: string;
1971
- /** Whether the snippet is archived. Archived snippets don't appear in search results or in the app. */
1972
- archived: boolean;
1973
- /**
1974
- * Title describing the snippet.
1975
- * @maxLength 100
1976
- */
1977
- title?: string;
1978
- /** The source of the snippet. */
1979
- source: {
1980
- /** An ID identifying the source, unique across all sources. */
1981
- sourceId: string;
1982
- /** A display name for the source. */
1983
- name: string;
1984
- /** An ID identifying the snippet in the source system, if available. */
1985
- externalId?: string;
1986
- /** URL of the snippet in the source system, if available. */
1987
- externalUrl?: URL;
1988
- };
1989
- /**
1990
- * An array of contributors to the snippet, which can be either users or integrations. The first contributor is the one who created the snippet.
1991
- * @minItems 1
1992
- */
1993
- contributors: (Integration | User)[];
1761
+ /** Date of creation */
1762
+ createdAt: Timestamp;
1763
+ /** Date of the last update */
1764
+ updatedAt: Timestamp;
1765
+ /** Slug used as reference */
1766
+ slug: OpenAPISpecSlug;
1767
+ sourceURL?: URL;
1768
+ /** Processing state */
1769
+ processingState: OpenAPISpecProcessingState;
1770
+ /** Date of the last processing */
1771
+ lastProcessedAt?: Timestamp;
1772
+ /** OpenAPI processing error code */
1773
+ lastProcessErrorCode?: OpenAPISpecProcessingErrorCode;
1994
1774
  /** URLs associated with the object */
1995
1775
  urls: {
1996
- /** URL of the snippet in the API */
1776
+ /** URL of the OpenAPI specification in the API */
1997
1777
  location: URL;
1998
- /** URL of the snippet in the app */
1778
+ /** URL of the OpenAPI specification in the application */
1999
1779
  app: URL;
2000
1780
  };
2001
1781
  }
2002
- export interface ContentLocationSnippet {
2003
- kind: 'snippet';
1782
+ export interface ContentLocationOpenAPI {
1783
+ kind: 'openapi';
2004
1784
  organization: Organization;
2005
- snippet: Snippet;
2006
- }
2007
- export interface ContentLocationReusableContent {
2008
- kind: 'reusable-content';
2009
- organization: Organization;
2010
- space: Space;
2011
- versionContext?: ContentLocationRevisionContext | ContentLocationChangeRequestContext;
2012
- reusableContent: RevisionReusableContent;
1785
+ openAPISpec: OpenAPISpec;
2013
1786
  }
2014
1787
  /** An absolute reference to content in GitBook. */
2015
- export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationSnippet | ContentLocationReusableContent;
1788
+ export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationReusableContent | ContentLocationOpenAPI;
2016
1789
  /**
2017
1790
  * Text to display to represent the reference. Possible values include:
2018
1791
  * - `ok` - No problems detected for this content reference.
@@ -2573,6 +2346,10 @@ export interface CustomizationThemedURL {
2573
2346
  light: URL;
2574
2347
  dark: URL;
2575
2348
  }
2349
+ /**
2350
+ * The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead.
2351
+ * @deprecated
2352
+ */
2576
2353
  export declare enum CustomizationHeaderPreset {
2577
2354
  Default = "default",
2578
2355
  Bold = "bold",
@@ -2595,82 +2372,316 @@ export interface CustomizationFooterGroup {
2595
2372
  title: string;
2596
2373
  links: CustomizationContentLink[];
2597
2374
  }
2598
- export declare enum CustomizationThemeMode {
2599
- Light = "light",
2600
- Dark = "dark"
2375
+ export declare enum CustomizationThemeMode {
2376
+ Light = "light",
2377
+ Dark = "dark"
2378
+ }
2379
+ export interface CustomizationSettings {
2380
+ /** Inherit customization settings from the parent collection. */
2381
+ inherit: boolean;
2382
+ /** Title to use for the published content. If not defined, it'll fallback to the content title. */
2383
+ title?: string;
2384
+ styling: {
2385
+ primaryColor: CustomizationThemedColor;
2386
+ corners: CustomizationCorners;
2387
+ font: CustomizationFont;
2388
+ /** The background style has been deprecated and will be removed in a future release. Use the `tint` settings instead. */
2389
+ background?: CustomizationBackground;
2390
+ };
2391
+ internationalization: {
2392
+ /** Language for the UI element */
2393
+ locale: CustomizationLocale;
2394
+ /** Inherit locale from the parent collection. */
2395
+ inherit: boolean;
2396
+ };
2397
+ favicon: {
2398
+ icon: CustomizationThemedURL;
2399
+ } | {
2400
+ /** Unicode codepoint or character of the emoji */
2401
+ emoji: Emoji;
2402
+ } | object;
2403
+ header: {
2404
+ /** The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead. */
2405
+ preset: CustomizationHeaderPreset;
2406
+ logo?: CustomizationThemedURL;
2407
+ backgroundColor?: CustomizationThemedColor;
2408
+ linkColor?: CustomizationThemedColor;
2409
+ links: CustomizationHeaderItem[];
2410
+ };
2411
+ footer: {
2412
+ logo?: CustomizationThemedURL;
2413
+ groups: CustomizationFooterGroup[];
2414
+ /** @maxLength 300 */
2415
+ copyright?: string;
2416
+ };
2417
+ themes: {
2418
+ default: CustomizationThemeMode;
2419
+ /** Should the reader be able to switch between dark and light mode */
2420
+ toggeable: boolean;
2421
+ };
2422
+ pdf: {
2423
+ /** If true, PDF export is enabled for the published content. */
2424
+ enabled: boolean;
2425
+ };
2426
+ feedback: {
2427
+ /** If true, feedback gathering is enabled */
2428
+ enabled: boolean;
2429
+ };
2430
+ aiSearch: {
2431
+ /** If true, AI search is enabled */
2432
+ enabled: boolean;
2433
+ };
2434
+ git: {
2435
+ /** Whether the public content should show a link to edit the content on the git provider set up in the GitSync */
2436
+ showEditLink: boolean;
2437
+ };
2438
+ pagination: {
2439
+ /** Whether the pagination navigation should be displayed on pages. */
2440
+ enabled: boolean;
2441
+ };
2442
+ trademark: {
2443
+ /** Whether the GitBook trademark ("Powered by GitBook") should be visible */
2444
+ enabled: boolean;
2445
+ };
2446
+ privacyPolicy: {
2447
+ url?: URL;
2448
+ };
2449
+ socialPreview: {
2450
+ url?: URL;
2451
+ };
2452
+ }
2453
+ /**
2454
+ * Title of the integration
2455
+ * @minLength 2
2456
+ * @maxLength 30
2457
+ */
2458
+ export type IntegrationTitle = string;
2459
+ /**
2460
+ * Description of the integration
2461
+ * @maxLength 100
2462
+ */
2463
+ export type IntegrationDescription = string;
2464
+ /**
2465
+ * Long form markdown summary of the integration
2466
+ * @maxLength 2048
2467
+ */
2468
+ export type IntegrationSummary = string;
2469
+ /** The target on which the integration can operate and needs to be configured for */
2470
+ export declare enum IntegrationTarget {
2471
+ All = "all",
2472
+ Site = "site",
2473
+ Space = "space",
2474
+ Organization = "organization"
2475
+ }
2476
+ export declare enum IntegrationVisibility {
2477
+ Public = "public",
2478
+ Private = "private",
2479
+ Unlisted = "unlisted"
2480
+ }
2481
+ export declare enum IntegrationScope {
2482
+ SpaceViewsRead = "space:views:read",
2483
+ SpaceContentRead = "space:content:read",
2484
+ SpaceContentWrite = "space:content:write",
2485
+ SpaceMetadataRead = "space:metadata:read",
2486
+ SpaceMetadataWrite = "space:metadata:write",
2487
+ SpaceScriptInject = "space:script:inject",
2488
+ SpaceScriptCookies = "space:script:cookies",
2489
+ SpaceGitSync = "space:git:sync",
2490
+ SpaceVisitorAuth = "space:visitor:auth",
2491
+ SiteMetadataRead = "site:metadata:read",
2492
+ SiteViewsRead = "site:views:read",
2493
+ SiteScriptInject = "site:script:inject",
2494
+ SiteScriptCookies = "site:script:cookies",
2495
+ SiteVisitorAuth = "site:visitor:auth",
2496
+ OpenapiRead = "openapi:read",
2497
+ OpenapiWrite = "openapi:write"
2498
+ }
2499
+ /** Permissions that should be granted to the integration */
2500
+ export type IntegrationScopes = IntegrationScope[];
2501
+ export declare enum IntegrationCategory {
2502
+ Analytics = "analytics",
2503
+ Collaboration = "collaboration",
2504
+ Content = "content",
2505
+ Gitsync = "gitsync",
2506
+ Marketing = "marketing",
2507
+ VisitorAuth = "visitor-auth",
2508
+ Other = "other"
2509
+ }
2510
+ /** Categories for which the integration is listed in the marketplace */
2511
+ export type IntegrationCategories = IntegrationCategory[];
2512
+ /** Custom blocks defined by this integration. */
2513
+ export type IntegrationBlocks = IntegrationBlock[];
2514
+ /** ContentKit component for configuration */
2515
+ export interface IntegrationConfigurationComponent {
2516
+ /** ID of the ContentKit component defined in the integration */
2517
+ componentId: string;
2518
+ }
2519
+ /** Definition of a content source provided by the integration. */
2520
+ export interface IntegrationContentSource {
2521
+ /** Unique ID in the integration for the source. */
2522
+ id: string;
2523
+ /**
2524
+ * Short descriptive title for the source.
2525
+ * @minLength 2
2526
+ * @maxLength 40
2527
+ */
2528
+ title: string;
2529
+ /**
2530
+ * Long descriptive text for the source.
2531
+ * @minLength 0
2532
+ * @maxLength 150
2533
+ */
2534
+ description?: string;
2535
+ /** URL of the icon to represent this source. */
2536
+ icon?: string;
2537
+ /** ContentKit component for configuration */
2538
+ configuration: IntegrationConfigurationComponent;
2539
+ }
2540
+ /** Schema for a configuration */
2541
+ export interface IntegrationConfigurationSchema {
2542
+ properties: Record<string, {
2543
+ /** @maxLength 30 */
2544
+ title?: string;
2545
+ /** @maxLength 100 */
2546
+ description?: string;
2547
+ } & ({
2548
+ type: 'string';
2549
+ default?: string;
2550
+ } | {
2551
+ type: 'number';
2552
+ default?: number;
2553
+ } | {
2554
+ type: 'boolean';
2555
+ default?: boolean;
2556
+ } | {
2557
+ type: 'button';
2558
+ callback_url: string;
2559
+ button_text: string;
2560
+ })>;
2561
+ /** @uniqueItems true */
2562
+ required?: string[];
2563
+ }
2564
+ export type IntegrationConfiguration = IntegrationConfigurationSchema | IntegrationConfigurationComponent;
2565
+ export interface IntegrationConfigurations {
2566
+ account?: IntegrationConfiguration;
2567
+ space?: IntegrationConfiguration;
2568
+ site?: IntegrationConfiguration;
2601
2569
  }
2602
- export interface CustomizationSettings {
2603
- /** Inherit customization settings from the parent collection. */
2604
- inherit: boolean;
2605
- /** Title to use for the published content. If not defined, it'll fallback to the content title. */
2606
- title?: string;
2607
- styling: {
2608
- primaryColor: CustomizationThemedColor;
2609
- corners: CustomizationCorners;
2610
- font: CustomizationFont;
2611
- /** The background style has been deprecated and will be removed in a future release. Use the `tint` settings instead. */
2612
- background?: CustomizationBackground;
2613
- };
2614
- internationalization: {
2615
- /** Language for the UI element */
2616
- locale: CustomizationLocale;
2617
- /** Inherit locale from the parent collection. */
2618
- inherit: boolean;
2619
- };
2620
- favicon: {
2621
- icon: CustomizationThemedURL;
2622
- } | {
2623
- /** Unicode codepoint or character of the emoji */
2624
- emoji: Emoji;
2625
- } | object;
2626
- header: {
2627
- preset: CustomizationHeaderPreset;
2628
- logo?: CustomizationThemedURL;
2629
- backgroundColor?: CustomizationThemedColor;
2630
- linkColor?: CustomizationThemedColor;
2631
- links: CustomizationHeaderItem[];
2632
- };
2633
- footer: {
2634
- logo?: CustomizationThemedURL;
2635
- groups: CustomizationFooterGroup[];
2636
- /** @maxLength 300 */
2637
- copyright?: string;
2638
- };
2639
- themes: {
2640
- default: CustomizationThemeMode;
2641
- /** Should the reader be able to switch between dark and light mode */
2642
- toggeable: boolean;
2643
- };
2644
- pdf: {
2645
- /** If true, PDF export is enabled for the published content. */
2646
- enabled: boolean;
2647
- };
2648
- feedback: {
2649
- /** If true, feedback gathering is enabled */
2650
- enabled: boolean;
2651
- };
2652
- aiSearch: {
2653
- /** If true, AI search is enabled */
2654
- enabled: boolean;
2655
- };
2656
- git: {
2657
- /** Whether the public content should show a link to edit the content on the git provider set up in the GitSync */
2658
- showEditLink: boolean;
2659
- };
2660
- pagination: {
2661
- /** Whether the pagination navigation should be displayed on pages. */
2662
- enabled: boolean;
2663
- };
2664
- trademark: {
2665
- /** Whether the GitBook trademark ("Powered by GitBook") should be visible */
2666
- enabled: boolean;
2667
- };
2668
- privacyPolicy: {
2669
- url?: URL;
2570
+ /**
2571
+ * External urls configured by the developer of the integration
2572
+ * @maxItems 5
2573
+ */
2574
+ export type IntegrationExternalLinks = {
2575
+ url: URL;
2576
+ label: string;
2577
+ }[];
2578
+ /**
2579
+ * Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
2580
+ * headers when processing the script fetch event and the blocks fetch events.
2581
+ */
2582
+ export type IntegrationContentSecurityPolicy = string | {
2583
+ 'base-uri'?: string;
2584
+ 'block-all-mixed-content'?: string;
2585
+ 'child-src'?: string;
2586
+ 'connect-src'?: string;
2587
+ 'default-src'?: string;
2588
+ 'font-src'?: string;
2589
+ 'form-action'?: string;
2590
+ 'frame-ancestors'?: string;
2591
+ 'frame-src'?: string;
2592
+ 'img-src'?: string;
2593
+ 'manifest-src'?: string;
2594
+ 'media-src'?: string;
2595
+ 'navigate-to'?: string;
2596
+ 'object-src'?: string;
2597
+ 'plugin-types'?: string;
2598
+ 'prefetch-src'?: string;
2599
+ referrer?: string;
2600
+ 'report-to'?: string;
2601
+ 'report-uri'?: string;
2602
+ 'require-sri-for'?: string;
2603
+ 'require-trusted-types-for'?: string;
2604
+ sandbox?: string;
2605
+ 'script-src'?: string;
2606
+ 'script-src-attr'?: string;
2607
+ 'script-src-elem'?: string;
2608
+ 'style-src'?: string;
2609
+ 'style-src-attr'?: string;
2610
+ 'style-src-elem'?: string;
2611
+ 'trusted-types'?: string;
2612
+ 'upgrade-insecure-requests'?: string;
2613
+ 'worker-src'?: string;
2614
+ };
2615
+ export interface Integration {
2616
+ object: 'integration';
2617
+ /** Unique named identifier for the integration */
2618
+ name: string;
2619
+ /** Version of the integration */
2620
+ version: number;
2621
+ /** Title of the integration */
2622
+ title: IntegrationTitle;
2623
+ /** Description of the integration */
2624
+ description?: IntegrationDescription;
2625
+ /** Long form markdown summary of the integration */
2626
+ summary?: IntegrationSummary;
2627
+ /**
2628
+ * URLs of images to showcase the integration
2629
+ * @maxItems 3
2630
+ */
2631
+ previewImages: string[];
2632
+ /** The target on which the integration can operate and needs to be configured for */
2633
+ target: IntegrationTarget;
2634
+ /** If true, the integration has been verified by the GitBook team */
2635
+ verified: boolean;
2636
+ visibility: IntegrationVisibility;
2637
+ /** Permissions that should be granted to the integration */
2638
+ scopes: IntegrationScopes;
2639
+ /** Categories for which the integration is listed in the marketplace */
2640
+ categories: IntegrationCategories;
2641
+ /** Custom blocks defined by this integration. */
2642
+ blocks?: IntegrationBlocks;
2643
+ contentSources?: IntegrationContentSource[];
2644
+ configurations?: IntegrationConfigurations;
2645
+ /** External urls configured by the developer of the integration */
2646
+ externalLinks: IntegrationExternalLinks;
2647
+ owner: Organization;
2648
+ /** URLs associated with the object */
2649
+ urls: {
2650
+ /**
2651
+ * URL of the integration in the API
2652
+ * @format uri
2653
+ */
2654
+ location: string;
2655
+ /**
2656
+ * URL of the icon associated to the integration
2657
+ * @format uri
2658
+ */
2659
+ icon?: string;
2660
+ /**
2661
+ * URL of the integration in the application
2662
+ * @format uri
2663
+ */
2664
+ app: string;
2665
+ /**
2666
+ * URL of the integration's assets.
2667
+ * @format uri
2668
+ */
2669
+ assets: string;
2670
+ /**
2671
+ * Public HTTP endpoint for the integration
2672
+ * @format uri
2673
+ */
2674
+ publicEndpoint: string;
2670
2675
  };
2671
- socialPreview: {
2672
- url?: URL;
2676
+ /** The set of permissions for the integration */
2677
+ permissions: {
2678
+ admin: boolean;
2673
2679
  };
2680
+ /**
2681
+ * Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
2682
+ * headers when processing the script fetch event and the blocks fetch events.
2683
+ */
2684
+ contentSecurityPolicy?: IntegrationContentSecurityPolicy;
2674
2685
  }
2675
2686
  export type SpaceIntegrationBlocks = {
2676
2687
  /** Unique named identifier for the integration */
@@ -3990,6 +4001,13 @@ export interface BillingInvoicePreview {
3990
4001
  periodStart: Timestamp;
3991
4002
  periodEnd: Timestamp;
3992
4003
  }[];
4004
+ /** Discount applied to the subscription. */
4005
+ discount?: {
4006
+ /** The combined description of all discounts applied to the subscription. */
4007
+ description: string;
4008
+ /** The total amount of all discounts applied to the subscription. */
4009
+ amount: number;
4010
+ };
3993
4011
  }
3994
4012
  export type BillingUpgrade = {
3995
4013
  result: 'checkout';
@@ -4015,14 +4033,25 @@ export interface MigrateOrganizationParameters {
4015
4033
  /** A list of member identifiers to be removed */
4016
4034
  removeMembers: string[];
4017
4035
  /** 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: {
4036
+ updateSites: ({
4019
4037
  /** The site identifier */
4020
4038
  id: string;
4021
4039
  /** The site type to migrate to */
4022
4040
  type: SiteType;
4023
- }[];
4041
+ } | {
4042
+ /** The site identifier */
4043
+ id: string;
4044
+ /** Can be set to `false` to unpublish a site */
4045
+ isPublished: false;
4046
+ })[];
4024
4047
  };
4025
4048
  }
4049
+ export interface BillingDiscount {
4050
+ /** How many months the discount will last */
4051
+ duration: number;
4052
+ /** Percent that will be deducted from the subtotal of the invoice */
4053
+ percentOff: number;
4054
+ }
4026
4055
  /** These are all the features we check to determine the new pricing site type. */
4027
4056
  export declare enum SiteToMigrateFeature {
4028
4057
  Sections = "sections",
@@ -4202,115 +4231,6 @@ export interface OrganizationUsage {
4202
4231
  /** Team members usage metrics of an organization */
4203
4232
  teamMembers: OrganizationUsageTeamMembers;
4204
4233
  }
4205
- /**
4206
- * Optional title describing the capture
4207
- * @maxLength 100
4208
- */
4209
- export type CaptureTitle = string;
4210
- export type CaptureContext = 'thread' | 'walkthrough' | 'document';
4211
- export interface Capture {
4212
- /** Unique identifier for the capture */
4213
- id: string;
4214
- /** Optional title describing the capture */
4215
- title: CaptureTitle;
4216
- context: CaptureContext;
4217
- /** ID in the original source of the capture. */
4218
- externalId?: string;
4219
- /**
4220
- * URL of the source from which the capture originated
4221
- * @format uri
4222
- */
4223
- externalURL?: string;
4224
- /** @format date-time */
4225
- createdAt: string;
4226
- /** @format date-time */
4227
- stoppedAt?: string;
4228
- /** @format date-time */
4229
- editedAt?: string;
4230
- /** Count of events recorded. */
4231
- events: {
4232
- 'terminal.command'?: number;
4233
- speech?: number;
4234
- 'thread.message'?: number;
4235
- };
4236
- /**
4237
- * An array of contributors to the capture. The first contributor is the one who triggered the capture (either a user or an integration).
4238
- * @minItems 1
4239
- */
4240
- contributors: (Integration | User)[];
4241
- /** Output document for the capture. Is not set when capture is not finished. */
4242
- output?: Document;
4243
- /** URLs associated with the object */
4244
- urls: {
4245
- /**
4246
- * URL of the capture in the API
4247
- * @format uri
4248
- */
4249
- location: string;
4250
- /**
4251
- * URL of the capture in the app
4252
- * @format uri
4253
- */
4254
- app: string;
4255
- };
4256
- }
4257
- export interface BaseCaptureEvent {
4258
- /** The type of event */
4259
- type: string;
4260
- /**
4261
- * When the event happened
4262
- * @format date-time
4263
- */
4264
- timestamp: string;
4265
- /**
4266
- * Optionally, provide the source of the event. GitBook may use this to improve the generated content.
4267
- * @maxLength 50
4268
- */
4269
- source?: string;
4270
- /** Optionally, provide the actor of the event, in the context of multiple people contributing to the capture. */
4271
- actor?: {
4272
- name: string;
4273
- };
4274
- }
4275
- export type CaptureTerminalCommandEvent = BaseCaptureEvent & {
4276
- type: 'terminal.command';
4277
- command: string;
4278
- stdout: string;
4279
- };
4280
- export type CaptureSpeechEvent = BaseCaptureEvent & {
4281
- type: 'speech';
4282
- } & ({
4283
- /** WAV audio file, encoded as base64 */
4284
- audio: string;
4285
- } | {
4286
- /** Transcript of the speech */
4287
- transcript: string;
4288
- });
4289
- export type CaptureThreadMessageEvent = BaseCaptureEvent & {
4290
- type: 'thread.message';
4291
- isFirst?: boolean;
4292
- text: string;
4293
- };
4294
- export type CaptureFileAddedEvent = BaseCaptureEvent & {
4295
- type: 'file.added';
4296
- filename: string;
4297
- fileSnapshot: string;
4298
- };
4299
- export type CaptureFileChangedEvent = BaseCaptureEvent & {
4300
- type: 'file.changed';
4301
- filename: string;
4302
- fileDiff: string;
4303
- };
4304
- export type CaptureFileRemovedEvent = BaseCaptureEvent & {
4305
- type: 'file.removed';
4306
- filename: string;
4307
- fileSnapshot: string;
4308
- };
4309
- export type CaptureEvent = CaptureTerminalCommandEvent | CaptureSpeechEvent | CaptureThreadMessageEvent | CaptureFileAddedEvent | CaptureFileChangedEvent | CaptureFileRemovedEvent;
4310
- export interface UpdateSnippetSchema {
4311
- /** A new title for the snippet. */
4312
- title?: string;
4313
- }
4314
4234
  /** A response to a request to preview a paid operation or action. A user might preview an operation before executing it to see which billing steps would be required (if any). This schema defines the response of that preview request. */
4315
4235
  export type BillingOperationPreviewResponse = {
4316
4236
  /** User can go ahead with the operation without any additional steps. Their subscription will be updated to reflect the new changes. */
@@ -4366,7 +4286,7 @@ export declare enum CustomizationSidebarBackgroundStyle {
4366
4286
  /**
4367
4287
  * - `default`: Simple list items without special styling, groups are inset with a line.
4368
4288
  * - `pill`: Rounded capsule shape around selected/active items.
4369
- * - `line`: Continuous line next to all items, with coloured line part for selected/active items.
4289
+ * - `line`: Continuous line next to all items, with colored line part for selected/active items.
4370
4290
  */
4371
4291
  export declare enum CustomizationSidebarListStyle {
4372
4292
  Default = "default",
@@ -4384,7 +4304,7 @@ export interface SiteCustomizationSettings {
4384
4304
  * - `bold`: High-impact theme with prominent colors and strong contrasts.
4385
4305
  * - `gradient`: Trendy theme featuring colorful gradients and splashes of color.
4386
4306
  */
4387
- theme?: CustomizationTheme;
4307
+ theme: CustomizationTheme;
4388
4308
  primaryColor: CustomizationThemedColor;
4389
4309
  tint?: CustomizationTint;
4390
4310
  corners: CustomizationCorners;
@@ -4404,7 +4324,7 @@ export interface SiteCustomizationSettings {
4404
4324
  /**
4405
4325
  * - `default`: Simple list items without special styling, groups are inset with a line.
4406
4326
  * - `pill`: Rounded capsule shape around selected/active items.
4407
- * - `line`: Continuous line next to all items, with coloured line part for selected/active items.
4327
+ * - `line`: Continuous line next to all items, with colored line part for selected/active items.
4408
4328
  */
4409
4329
  list: CustomizationSidebarListStyle;
4410
4330
  };
@@ -4420,6 +4340,7 @@ export interface SiteCustomizationSettings {
4420
4340
  emoji: Emoji;
4421
4341
  } | object;
4422
4342
  header: {
4343
+ /** The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead. */
4423
4344
  preset: CustomizationHeaderPreset;
4424
4345
  logo?: CustomizationThemedURL;
4425
4346
  backgroundColor?: CustomizationThemedColor;
@@ -5368,14 +5289,6 @@ export interface Index {
5368
5289
  collections: Record<string, UserCollectionsPermissions>;
5369
5290
  spaces: Record<string, UserSpacesPermissions>;
5370
5291
  }
5371
- /** Reason for a space to be blocked */
5372
- export declare enum SpaceBlockReason {
5373
- DMCA = "DMCA",
5374
- THREAT_TYPE_UNSPECIFIED = "THREAT_TYPE_UNSPECIFIED",
5375
- MALWARE = "MALWARE",
5376
- SOCIAL_ENGINEERING = "SOCIAL_ENGINEERING",
5377
- UNWANTED_SOFTWARE = "UNWANTED_SOFTWARE"
5378
- }
5379
5292
  export type BackOfficeSite = Site & {
5380
5293
  /** ID of the organization owning this site */
5381
5294
  organization: string;
@@ -5414,6 +5327,30 @@ export type PublishedSiteContentLookup = {
5414
5327
  target: 'application' | 'content' | 'external';
5415
5328
  redirect: URL;
5416
5329
  } | PublishedSiteContent;
5330
+ export interface OpenAPISpecVersion {
5331
+ /** The object type, which is always "openapi-spec-version" */
5332
+ object: 'openapi-spec-version';
5333
+ /** Unique identifier */
5334
+ id: string;
5335
+ /** Date of creation */
5336
+ createdAt?: Timestamp;
5337
+ /** URL where the specification is accessible. */
5338
+ url: URL;
5339
+ /** URLs associated with the object */
5340
+ urls: {
5341
+ /** URL of the OpenAPI specification version in the API */
5342
+ location: URL;
5343
+ /** URL of the OpenAPI specification version in the application */
5344
+ app: URL;
5345
+ };
5346
+ }
5347
+ /** Filesystem representing the OpenAPI spec files and content. */
5348
+ export type OpenAPISpecContent = object;
5349
+ /**
5350
+ * @minLength 64
5351
+ * @maxLength 64
5352
+ */
5353
+ export type SHA256 = string;
5417
5354
  export interface UpdateContentPublishingAuth {
5418
5355
  /**
5419
5356
  * A fallback URL that will be used if authentication fails.
@@ -5809,10 +5746,6 @@ export interface OrganizationCollectionsChannel {
5809
5746
  channel: 'organization-collections';
5810
5747
  organization: string;
5811
5748
  }
5812
- export interface OrganizationCapturesChannel {
5813
- channel: 'organization-captures';
5814
- organization: string;
5815
- }
5816
5749
  export interface OrganizationIntegrationsChannel {
5817
5750
  channel: 'organization-integrations';
5818
5751
  organization: string;
@@ -5831,6 +5764,11 @@ export interface OrganizationAIIndexationChannel {
5831
5764
  channel: 'organization-ai-indexation';
5832
5765
  organization: string;
5833
5766
  }
5767
+ /** Subscription channel for changes in OpenAPI specifications in an organization. */
5768
+ export interface OrganizationOpenAPISpecsChannel {
5769
+ channel: 'organization-openapi-specs';
5770
+ organization: string;
5771
+ }
5834
5772
  export interface SpaceCommentsChannel {
5835
5773
  channel: 'space-comments';
5836
5774
  space: string;
@@ -5953,8 +5891,13 @@ export interface GitSyncOperationChannel {
5953
5891
  channel: 'space-gitsync-operation';
5954
5892
  space: string;
5955
5893
  }
5894
+ /** Subscription channel for changes in OpenAPI specification. */
5895
+ export interface OpenAPISpecChannel {
5896
+ channel: 'openapi-spec';
5897
+ openAPISpec: string;
5898
+ }
5956
5899
  /** Channel to subscribe to for realtime updates. */
5957
- 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 | 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;
5900
+ 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 | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | OrganizationOpenAPISpecsChannel | 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 | OpenAPISpecChannel;
5958
5901
  export interface GitSyncOperationChannelData {
5959
5902
  channel: 'space-gitsync-operation';
5960
5903
  data: GitSyncOperation;
@@ -6036,6 +5979,7 @@ export type SpaceVisitorAuthCustomBackend = VisitorAuthCustomBackend;
6036
5979
  export type SpaceVisitorAuthIntegrationBackend = VisitorAuthIntegrationBackend;
6037
5980
  export type UserPermissions = Index;
6038
5981
  export type SiteRedirectDestinationSpace = SiteRedirectDestinationSiteSpace;
5982
+ export type OpenAPISpecSourceURL = URL;
6039
5983
  import { EventIterator } from 'event-iterator';
6040
5984
  export type QueryParamsType = Record<string | number, any>;
6041
5985
  export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
@@ -6961,9 +6905,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6961
6905
  /** Parameters for a computed content */
6962
6906
  source: ComputedContentSource;
6963
6907
  }, query?: {
6964
- /** Output format for the content. */
6965
- format?: "document" | "markdown";
6966
- }, params?: RequestParams) => Promise<HttpResponse<Document, Error>>;
6908
+ /** Version of the schema used for the document. */
6909
+ schema?: "current" | "next";
6910
+ }, params?: RequestParams) => Promise<HttpResponse<JSONDocument, Error>>;
6967
6911
  /**
6968
6912
  * No description
6969
6913
  *
@@ -9524,6 +9468,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9524
9468
  ultimateSites: number;
9525
9469
  };
9526
9470
  invoice?: BillingInvoicePreview;
9471
+ discount?: BillingDiscount;
9527
9472
  }, Error>>;
9528
9473
  /**
9529
9474
  * No description
@@ -10038,223 +9983,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10038
9983
  /** Team members usage metrics of an organization */
10039
9984
  teamMembers: OrganizationUsageTeamMembers;
10040
9985
  }, Error>>;
10041
- /**
10042
- * @description List captures in an organization, newest first.
10043
- *
10044
- * @tags organizations
10045
- * @name ListCaptures
10046
- * @summary List captures. Deprecated, use listSnippets instead.
10047
- * @request GET:/orgs/{organizationId}/captures
10048
- * @deprecated
10049
- * @secure
10050
- */
10051
- listCaptures: (organizationId: string, query?: {
10052
- /** Output format for the content. */
10053
- format?: "document" | "markdown";
10054
- /** Identifier of the page results to fetch. */
10055
- page?: string;
10056
- /**
10057
- * The number of results per page
10058
- * @min 0
10059
- * @max 1000
10060
- */
10061
- limit?: number;
10062
- /** The context in which the item was captured */
10063
- context?: "walkthrough" | "thread";
10064
- }, params?: RequestParams) => Promise<HttpResponse<List & {
10065
- items: Capture[];
10066
- }, Error>>;
10067
- /**
10068
- * No description
10069
- *
10070
- * @tags organizations
10071
- * @name StartCapture
10072
- * @summary Start a capture
10073
- * @request POST:/orgs/{organizationId}/captures
10074
- * @secure
10075
- */
10076
- startCapture: (organizationId: string, data: {
10077
- /** Optional title describing the capture */
10078
- title?: CaptureTitle;
10079
- context: CaptureContext;
10080
- /** ID in the original source of the capture. */
10081
- externalId?: string;
10082
- /**
10083
- * URL of the original source of the capture.
10084
- * @format uri
10085
- */
10086
- externalURL?: string;
10087
- }, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
10088
- /**
10089
- * No description
10090
- *
10091
- * @tags organizations
10092
- * @name GetCapture
10093
- * @summary Get a capture by its ID. Deprecated, use getSnippet instead.
10094
- * @request GET:/orgs/{organizationId}/captures/{captureId}
10095
- * @deprecated
10096
- * @secure
10097
- */
10098
- getCapture: (organizationId: string, captureId: string, query?: {
10099
- /** Output format for the content. */
10100
- format?: "document" | "markdown";
10101
- }, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
10102
- /**
10103
- * No description
10104
- *
10105
- * @tags organizations
10106
- * @name AddEventsToCapture
10107
- * @summary Add events to a running capture
10108
- * @request POST:/orgs/{organizationId}/captures/{captureId}/events
10109
- * @secure
10110
- */
10111
- addEventsToCapture: (organizationId: string, captureId: string, data: {
10112
- events: CaptureEvent[];
10113
- }, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
10114
- /**
10115
- * No description
10116
- *
10117
- * @tags organizations
10118
- * @name StopCapture
10119
- * @summary Stop a capture
10120
- * @request POST:/orgs/{organizationId}/captures/{captureId}/stop
10121
- * @secure
10122
- */
10123
- stopCapture: (organizationId: string, captureId: string, data: object, query?: {
10124
- /** Output format for the content. */
10125
- format?: "document" | "markdown";
10126
- }, params?: RequestParams) => Promise<HttpResponse<{
10127
- capture: Capture;
10128
- /** Example questions that would be answered by the content of this capture. */
10129
- followupQuestions?: string[];
10130
- }, Error>>;
10131
- /**
10132
- * @description List snippets in an organization, newest first.
10133
- *
10134
- * @tags organizations
10135
- * @name ListSnippets
10136
- * @summary Lists snippets.
10137
- * @request GET:/orgs/{organizationId}/snippets
10138
- * @deprecated
10139
- * @secure
10140
- */
10141
- listSnippets: (organizationId: string, query?: {
10142
- /** Identifier of the page results to fetch. */
10143
- page?: string;
10144
- /**
10145
- * The number of results per page
10146
- * @min 0
10147
- * @max 1000
10148
- */
10149
- limit?: number;
10150
- /** If specified, only snippets from the specified source will be returned. */
10151
- source?: string;
10152
- }, params?: RequestParams) => Promise<HttpResponse<List & {
10153
- items: Snippet[];
10154
- }, Error>>;
10155
- /**
10156
- * No description
10157
- *
10158
- * @tags organizations
10159
- * @name CreateSnippet
10160
- * @summary Create a new snippet
10161
- * @request POST:/orgs/{organizationId}/snippets
10162
- * @deprecated
10163
- * @secure
10164
- */
10165
- createSnippet: (organizationId: string, data: object, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
10166
- /**
10167
- * No description
10168
- *
10169
- * @tags organizations
10170
- * @name GetSnippet
10171
- * @summary Get a snippet by its ID
10172
- * @request GET:/orgs/{organizationId}/snippets/{snippetId}
10173
- * @deprecated
10174
- * @secure
10175
- */
10176
- getSnippet: (organizationId: string, snippetId: string, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
10177
- /**
10178
- * No description
10179
- *
10180
- * @tags organizations
10181
- * @name DeleteSnippet
10182
- * @summary Delete a snippet by its ID.
10183
- * @request DELETE:/orgs/{organizationId}/snippets/{snippetId}
10184
- * @secure
10185
- */
10186
- deleteSnippet: (organizationId: string, snippetId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
10187
- /**
10188
- * No description
10189
- *
10190
- * @tags organizations
10191
- * @name UpdateSnippet
10192
- * @summary Update an existing snippet.
10193
- * @request PUT:/orgs/{organizationId}/snippets/{snippetId}
10194
- * @deprecated
10195
- * @secure
10196
- */
10197
- updateSnippet: (organizationId: string, snippetId: string, data: UpdateSnippetSchema, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
10198
- /**
10199
- * No description
10200
- *
10201
- * @tags organizations
10202
- * @name MoveSnippet
10203
- * @summary Move a snippet into a destination. The snippet will be archived in the process.
10204
- * @request POST:/orgs/{organizationId}/snippets/{snippetId}/move
10205
- * @deprecated
10206
- * @secure
10207
- */
10208
- moveSnippet: (organizationId: string, snippetId: string, data: {
10209
- /** Intended destination for the page */
10210
- target: {
10211
- /** The id of the target space */
10212
- space: string;
10213
- position?: {
10214
- /** The parent of the page in the target space. If undefined, the page will be inserted at the root of the space. */
10215
- parent?: string;
10216
- /** The index of the page in the parent. If undefined, the page will be inserted at the end of the parent's current children. */
10217
- index?: number;
10218
- };
10219
- };
10220
- }, params?: RequestParams) => Promise<HttpResponse<{
10221
- page: RevisionPageDocument;
10222
- changeRequest?: ChangeRequest;
10223
- }, Error>>;
10224
- /**
10225
- * No description
10226
- *
10227
- * @tags organizations
10228
- * @name GetSnippetSuggestedLocations
10229
- * @summary Return possible snippet locations in an organization based on the current user.
10230
- * @request GET:/orgs/{organizationId}/snippets/{snippetId}/move
10231
- * @deprecated
10232
- * @secure
10233
- */
10234
- getSnippetSuggestedLocations: (organizationId: string, snippetId: string, query?: {
10235
- /** Identifier of the page results to fetch. */
10236
- page?: string;
10237
- /**
10238
- * The number of results per page
10239
- * @min 0
10240
- * @max 1000
10241
- */
10242
- limit?: number;
10243
- /** If specified, only locations in the given space will be returned. If not specified, GitBook will suggest spaces. */
10244
- spaceId?: string;
10245
- /** If specified, only locations under the given pageId will be returned. You must specify a spaceId too. If pageId is not specified, GitBook will suggest pages at the top level. */
10246
- pageId?: string;
10247
- /** If specified, only locations matching the search query will be returned. */
10248
- search?: string;
10249
- }, params?: RequestParams) => Promise<HttpResponse<List & {
10250
- items: {
10251
- /** If defined and true, this location was suggested by GitBook AI. */
10252
- aiPowered?: boolean;
10253
- space: Space;
10254
- /** The parent page of the suggested location. */
10255
- parentPage?: RevisionPageDocument | RevisionPageGroup;
10256
- }[];
10257
- }, Error>>;
10258
9986
  /**
10259
9987
  * No description
10260
9988
  *
@@ -10841,6 +10569,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10841
10569
  addSectionGroupToSite: (organizationId: string, siteId: string, data: {
10842
10570
  /** Title of the site section group */
10843
10571
  title: SiteSectionGroupTitle;
10572
+ icon?: Icon | null;
10844
10573
  /** IDs of the sections to be added to the section group */
10845
10574
  sections?: string[];
10846
10575
  }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, Error>>;
@@ -11100,9 +10829,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11100
10829
  /** Title to use for the published site variant. If not defined, the title will not be changed. If set to null, the title will be unset and will fallback to the content title. */
11101
10830
  title?: SiteTitle | null;
11102
10831
  styling?: {
10832
+ /** The site theme. Set to null to reset the override. */
10833
+ theme?: CustomizationTheme | null;
11103
10834
  /** The primary color used for links and UI text. Set to null to reset the override. */
11104
10835
  primaryColor?: CustomizationThemedColor | null;
11105
- /** 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. */
10836
+ /** The tint will color 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. */
11106
10837
  tint?: CustomizationTint | null;
11107
10838
  /** The style of the corners to use. Set to null to reset the override. */
11108
10839
  corners?: CustomizationCorners | null;
@@ -11545,6 +11276,171 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11545
11276
  message: string;
11546
11277
  };
11547
11278
  }>>;
11279
+ /**
11280
+ * No description
11281
+ *
11282
+ * @tags openapi
11283
+ * @name ListOpenApiSpecs
11284
+ * @summary List all the OpenAPI specifications in the organization
11285
+ * @request GET:/orgs/{organizationId}/openapi
11286
+ * @secure
11287
+ */
11288
+ listOpenApiSpecs: (organizationId: string, query?: {
11289
+ /** Identifier of the page results to fetch. */
11290
+ page?: string;
11291
+ /**
11292
+ * The number of results per page
11293
+ * @min 0
11294
+ * @max 1000
11295
+ */
11296
+ limit?: number;
11297
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
11298
+ items: OpenAPISpec[];
11299
+ }, Error>>;
11300
+ /**
11301
+ * No description
11302
+ *
11303
+ * @tags openapi
11304
+ * @name GetOpenApiSpecBySlug
11305
+ * @summary Get an organization OpenAPI specification by its slug
11306
+ * @request GET:/orgs/{organizationId}/openapi/{specSlug}
11307
+ * @secure
11308
+ */
11309
+ getOpenApiSpecBySlug: (organizationId: string, specSlug: string, params?: RequestParams) => Promise<HttpResponse<OpenAPISpec, Error | {
11310
+ error: {
11311
+ /** @format int32 */
11312
+ code: 404;
11313
+ message: string;
11314
+ };
11315
+ }>>;
11316
+ /**
11317
+ * No description
11318
+ *
11319
+ * @tags openapi
11320
+ * @name CreateOrUpdateOpenApiSpecBySlug
11321
+ * @summary Create or update an organization OpenAPI specification by its slug
11322
+ * @request PUT:/orgs/{organizationId}/openapi/{specSlug}
11323
+ * @secure
11324
+ */
11325
+ createOrUpdateOpenApiSpecBySlug: (organizationId: string, specSlug: string, data: {
11326
+ /** Create a specification from an URL */
11327
+ source: {
11328
+ url: URL;
11329
+ } | {
11330
+ /**
11331
+ * OpenAPI specification as text
11332
+ * @minLength 1
11333
+ */
11334
+ text: string;
11335
+ };
11336
+ }, params?: RequestParams) => Promise<HttpResponse<OpenAPISpec, Error | {
11337
+ error: {
11338
+ /** @format int32 */
11339
+ code: 400;
11340
+ message: string;
11341
+ };
11342
+ }>>;
11343
+ /**
11344
+ * No description
11345
+ *
11346
+ * @tags openapi
11347
+ * @name DeleteOpenApiSpecBySlug
11348
+ * @summary Delete an organization OpenAPI specification by its slug
11349
+ * @request DELETE:/orgs/{organizationId}/openapi/{specSlug}
11350
+ * @secure
11351
+ */
11352
+ deleteOpenApiSpecBySlug: (organizationId: string, specSlug: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
11353
+ /**
11354
+ * No description
11355
+ *
11356
+ * @tags openapi
11357
+ * @name ListOpenApiSpecVersions
11358
+ * @summary List all the OpenAPI specification versions
11359
+ * @request GET:/orgs/{organizationId}/openapi/{specSlug}/versions
11360
+ * @secure
11361
+ */
11362
+ listOpenApiSpecVersions: (organizationId: string, specSlug: string, query?: {
11363
+ /** Identifier of the page results to fetch. */
11364
+ page?: string;
11365
+ /**
11366
+ * The number of results per page
11367
+ * @min 0
11368
+ * @max 1000
11369
+ */
11370
+ limit?: number;
11371
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
11372
+ items: OpenAPISpecVersion[];
11373
+ }, Error | {
11374
+ error: {
11375
+ /** @format int32 */
11376
+ code: 404;
11377
+ message: string;
11378
+ };
11379
+ }>>;
11380
+ /**
11381
+ * No description
11382
+ *
11383
+ * @tags openapi
11384
+ * @name GetLatestOpenApiSpecVersion
11385
+ * @summary Get the latest OpenAPI specification version
11386
+ * @request GET:/orgs/{organizationId}/openapi/{specSlug}/versions/latest
11387
+ * @secure
11388
+ */
11389
+ getLatestOpenApiSpecVersion: (organizationId: string, specSlug: string, params?: RequestParams) => Promise<HttpResponse<OpenAPISpecVersion, Error | {
11390
+ error: {
11391
+ /** @format int32 */
11392
+ code: 404;
11393
+ message: string;
11394
+ };
11395
+ }>>;
11396
+ /**
11397
+ * No description
11398
+ *
11399
+ * @tags openapi
11400
+ * @name GetLatestOpenApiSpecVersionContent
11401
+ * @summary Get the latest OpenAPI specification version content
11402
+ * @request GET:/orgs/{organizationId}/openapi/{specSlug}/versions/latest/content
11403
+ * @secure
11404
+ */
11405
+ getLatestOpenApiSpecVersionContent: (organizationId: string, specSlug: string, params?: RequestParams) => Promise<HttpResponse<object, Error | {
11406
+ error: {
11407
+ /** @format int32 */
11408
+ code: 404;
11409
+ message: string;
11410
+ };
11411
+ }>>;
11412
+ /**
11413
+ * No description
11414
+ *
11415
+ * @tags openapi
11416
+ * @name GetOpenApiSpecVersionById
11417
+ * @summary Get an OpenAPI specification version by its ID
11418
+ * @request GET:/orgs/{organizationId}/openapi/{specSlug}/versions/{versionId}
11419
+ * @secure
11420
+ */
11421
+ getOpenApiSpecVersionById: (organizationId: string, specSlug: string, versionId: string, params?: RequestParams) => Promise<HttpResponse<OpenAPISpecVersion, Error | {
11422
+ error: {
11423
+ /** @format int32 */
11424
+ code: 404;
11425
+ message: string;
11426
+ };
11427
+ }>>;
11428
+ /**
11429
+ * No description
11430
+ *
11431
+ * @tags openapi
11432
+ * @name GetOpenApiSpecVersionContentById
11433
+ * @summary Get an OpenAPI specification version content by its ID
11434
+ * @request GET:/orgs/{organizationId}/openapi/{specSlug}/versions/{versionId}/content
11435
+ * @secure
11436
+ */
11437
+ getOpenApiSpecVersionContentById: (organizationId: string, specSlug: string, versionId: string, params?: RequestParams) => Promise<HttpResponse<object, Error | {
11438
+ error: {
11439
+ /** @format int32 */
11440
+ code: 404;
11441
+ message: string;
11442
+ };
11443
+ }>>;
11548
11444
  };
11549
11445
  customHostnames: {
11550
11446
  /**