@gitbook/api 0.91.0 → 0.93.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,12 @@ 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
  }
156
151
  /** A relative reference to content in GitBook. */
157
- export type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace | ContentRefSnippet | ContentRefReusableContent;
152
+ export type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace | ContentRefReusableContent;
158
153
  export interface DocumentInlineLink {
159
154
  object: 'inline';
160
155
  type: 'link';
@@ -609,7 +604,7 @@ export interface DocumentBlockOpenAPI {
609
604
  type: 'swagger';
610
605
  key?: string;
611
606
  data: OpenAPIOperationPointer & {
612
- ref: ContentRefFile;
607
+ ref: ContentRefFile | ContentRefURL;
613
608
  /** If true, the block is opened by default. */
614
609
  expanded?: boolean;
615
610
  fullWidth?: boolean;
@@ -770,7 +765,10 @@ export declare enum SpaceEditMode {
770
765
  Live = "live",
771
766
  Locked = "locked"
772
767
  }
773
- /** @format uri */
768
+ /**
769
+ * @format uri
770
+ * @maxLength 2048
771
+ */
774
772
  export type URL = string;
775
773
  /** The provider of the Git Sync installation. */
776
774
  export declare enum GitSyncProvider {
@@ -1100,7 +1098,17 @@ export type RevisionPageLink = RevisionPageBase & {
1100
1098
  */
1101
1099
  hidden?: boolean;
1102
1100
  };
1103
- export type ComputedContentDependency = ContentRefSpace;
1101
+ export type ComputedContentDependencyRef = ContentRefSpace;
1102
+ /** Dependency for a computation, with its resolved value. */
1103
+ export type ComputedContentDependencyValue = {
1104
+ ref: ContentRefSpace;
1105
+ /** See `Space` schema component. */
1106
+ value: {
1107
+ object: 'space';
1108
+ id: string;
1109
+ revision: string;
1110
+ } | null;
1111
+ };
1104
1112
  /** Parameters for a computed content */
1105
1113
  export interface ComputedContentSource {
1106
1114
  /** Name of the integration */
@@ -1109,8 +1117,14 @@ export interface ComputedContentSource {
1109
1117
  source: string;
1110
1118
  /** Properties to be passed to the computation */
1111
1119
  props: PlainObject;
1112
- /** Dependencies the computation depend on. When the dependency's targets are updated, the computation will be updated. */
1113
- dependsOn?: ComputedContentDependency[];
1120
+ /**
1121
+ * Dependencies the computation depends on.
1122
+ * The state of the dependencies will be passed to the computation.
1123
+ * When the dependency's targets are updated, the computation will be updated.
1124
+ */
1125
+ dependencies?: Record<string, {
1126
+ ref: ComputedContentDependencyRef;
1127
+ } | ComputedContentDependencyValue>;
1114
1128
  }
1115
1129
  export type RevisionPageComputed = RevisionPageBase & {
1116
1130
  type: 'computed';
@@ -1596,8 +1610,6 @@ export interface Organization {
1596
1610
  blocked?: {
1597
1611
  reason: OrganizationBlockReason;
1598
1612
  };
1599
- /** If true, the organization is still using the deprecated snippets feature. */
1600
- internal_isUsingSnippets?: boolean;
1601
1613
  /** If true, the organization is on the new trial which includes sites and the Pro plan. */
1602
1614
  internal_isOnNewTrial?: boolean;
1603
1615
  /** The set of permissions for the organization */
@@ -1706,354 +1718,72 @@ export interface ContentLocationSpace {
1706
1718
  organization: Organization;
1707
1719
  space: Space;
1708
1720
  }
1721
+ export interface ContentLocationReusableContent {
1722
+ kind: 'reusable-content';
1723
+ organization: Organization;
1724
+ space: Space;
1725
+ versionContext?: ContentLocationRevisionContext | ContentLocationChangeRequestContext;
1726
+ reusableContent: RevisionReusableContent;
1727
+ }
1728
+ /** An absolute reference to content in GitBook. */
1729
+ export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationReusableContent;
1709
1730
  /**
1710
- * Title of the integration
1711
- * @minLength 2
1712
- * @maxLength 30
1713
- */
1714
- export type IntegrationTitle = string;
1715
- /**
1716
- * Description of the integration
1717
- * @maxLength 100
1718
- */
1719
- export type IntegrationDescription = string;
1720
- /**
1721
- * Long form markdown summary of the integration
1722
- * @maxLength 2048
1731
+ * Text to display to represent the reference. Possible values include:
1732
+ * - `ok` - No problems detected for this content reference.
1733
+ * - `broken` - The target does not exist in the revision.
1734
+ * - `in-app` - The target is a URL link pointing to an internal location in the app.
1723
1735
  */
1724
- export type IntegrationSummary = string;
1725
- /** The target on which the integration can operate and needs to be configured for */
1726
- export declare enum IntegrationTarget {
1727
- All = "all",
1728
- Site = "site",
1729
- Space = "space",
1730
- Organization = "organization"
1731
- }
1732
- export declare enum IntegrationVisibility {
1733
- Public = "public",
1734
- Private = "private",
1735
- Unlisted = "unlisted"
1736
- }
1737
- export declare enum IntegrationScope {
1738
- SnippetsRead = "snippets:read",
1739
- CaptureWrite = "capture:write",
1740
- SpaceViewsRead = "space:views:read",
1741
- SpaceContentRead = "space:content:read",
1742
- SpaceContentWrite = "space:content:write",
1743
- SpaceMetadataRead = "space:metadata:read",
1744
- SpaceMetadataWrite = "space:metadata:write",
1745
- SpaceScriptInject = "space:script:inject",
1746
- SpaceScriptCookies = "space:script:cookies",
1747
- SpaceGitSync = "space:git:sync",
1748
- SpaceVisitorAuth = "space:visitor:auth",
1749
- SiteMetadataRead = "site:metadata:read",
1750
- SiteViewsRead = "site:views:read",
1751
- SiteScriptInject = "site:script:inject",
1752
- SiteScriptCookies = "site:script:cookies",
1753
- SiteVisitorAuth = "site:visitor:auth"
1736
+ export declare enum ContentReferenceStatus {
1737
+ Ok = "ok",
1738
+ Broken = "broken",
1739
+ InApp = "in-app"
1754
1740
  }
1755
- /** Permissions that should be granted to the integration */
1756
- export type IntegrationScopes = IntegrationScope[];
1757
- export declare enum IntegrationCategory {
1758
- Analytics = "analytics",
1759
- Captures = "captures",
1760
- Collaboration = "collaboration",
1761
- Content = "content",
1762
- Gitsync = "gitsync",
1763
- Marketing = "marketing",
1764
- VisitorAuth = "visitor-auth",
1765
- Other = "other"
1741
+ export interface ContentReferencesStats {
1742
+ /** Total count of links */
1743
+ total: number;
1744
+ broken: {
1745
+ /** Count of broken links */
1746
+ total: number;
1747
+ /** Count of broken links that were broken in current change request, if applicable. */
1748
+ changeRequest?: number;
1749
+ };
1766
1750
  }
1767
- /** Categories for which the integration is listed in the marketplace */
1768
- export type IntegrationCategories = IntegrationCategory[];
1769
- /** Custom blocks defined by this integration. */
1770
- export type IntegrationBlocks = IntegrationBlock[];
1771
- /** ContentKit component for configuration */
1772
- export interface IntegrationConfigurationComponent {
1773
- /** ID of the ContentKit component defined in the integration */
1774
- componentId: string;
1751
+ /**
1752
+ * Indicator of the relationship with the content ref target.
1753
+ * - `reference` - The content soft-references the ref target
1754
+ * - `dependsOn` - The content depends on the ref target
1755
+ */
1756
+ export declare enum ContentReferenceRelation {
1757
+ Reference = "reference",
1758
+ DependsOn = "dependsOn"
1775
1759
  }
1776
- /** Definition of a content source provided by the integration. */
1777
- export interface IntegrationContentSource {
1778
- /** Unique ID in the integration for the source. */
1779
- id: string;
1760
+ export interface ContentReferenceUsage {
1780
1761
  /**
1781
- * Short descriptive title for the source.
1782
- * @minLength 2
1783
- * @maxLength 40
1762
+ * Text to display to represent the reference. Possible values include:
1763
+ * - `ok` - No problems detected for this content reference.
1764
+ * - `broken` - The target does not exist in the revision.
1765
+ * - `in-app` - The target is a URL link pointing to an internal location in the app.
1784
1766
  */
1785
- title: string;
1767
+ status: ContentReferenceStatus;
1786
1768
  /**
1787
- * Long descriptive text for the source.
1788
- * @minLength 0
1789
- * @maxLength 150
1769
+ * Indicator of the relationship with the content ref target.
1770
+ * - `reference` - The content soft-references the ref target
1771
+ * - `dependsOn` - The content depends on the ref target
1790
1772
  */
1791
- description?: string;
1792
- /** URL of the icon to represent this source. */
1793
- icon?: string;
1794
- /** ContentKit component for configuration */
1795
- configuration?: IntegrationConfigurationComponent;
1773
+ relation: ContentReferenceRelation;
1774
+ /** The reference target where a list of pages are pointing at */
1775
+ targetReference?: ContentLocation;
1776
+ /** Pages locations where a link to the target is found. */
1777
+ locationReferences: ContentLocation[];
1796
1778
  }
1797
- /** Schema for a configuration */
1798
- export interface IntegrationConfigurationSchema {
1799
- properties: Record<string, {
1800
- /** @maxLength 30 */
1801
- title?: string;
1802
- /** @maxLength 100 */
1803
- description?: string;
1804
- } & ({
1805
- type: 'string';
1806
- default?: string;
1807
- } | {
1808
- type: 'number';
1809
- default?: number;
1810
- } | {
1811
- type: 'boolean';
1812
- default?: boolean;
1813
- } | {
1814
- type: 'button';
1815
- callback_url: string;
1816
- button_text: string;
1817
- })>;
1818
- /** @uniqueItems true */
1819
- required?: string[];
1779
+ export interface CreateChangeRequest {
1780
+ /** Subject of the change-request */
1781
+ subject?: string;
1820
1782
  }
1821
- export type IntegrationConfiguration = IntegrationConfigurationSchema | IntegrationConfigurationComponent;
1822
- export interface IntegrationConfigurations {
1823
- account?: IntegrationConfiguration;
1824
- space?: IntegrationConfiguration;
1825
- site?: IntegrationConfiguration;
1826
- }
1827
- /**
1828
- * External urls configured by the developer of the integration
1829
- * @maxItems 5
1830
- */
1831
- export type IntegrationExternalLinks = {
1832
- url: URL;
1833
- label: string;
1834
- }[];
1835
- /**
1836
- * Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
1837
- * headers when processing the script fetch event and the blocks fetch events.
1838
- */
1839
- export type IntegrationContentSecurityPolicy = string | {
1840
- 'base-uri'?: string;
1841
- 'block-all-mixed-content'?: string;
1842
- 'child-src'?: string;
1843
- 'connect-src'?: string;
1844
- 'default-src'?: string;
1845
- 'font-src'?: string;
1846
- 'form-action'?: string;
1847
- 'frame-ancestors'?: string;
1848
- 'frame-src'?: string;
1849
- 'img-src'?: string;
1850
- 'manifest-src'?: string;
1851
- 'media-src'?: string;
1852
- 'navigate-to'?: string;
1853
- 'object-src'?: string;
1854
- 'plugin-types'?: string;
1855
- 'prefetch-src'?: string;
1856
- referrer?: string;
1857
- 'report-to'?: string;
1858
- 'report-uri'?: string;
1859
- 'require-sri-for'?: string;
1860
- 'require-trusted-types-for'?: string;
1861
- sandbox?: string;
1862
- 'script-src'?: string;
1863
- 'script-src-attr'?: string;
1864
- 'script-src-elem'?: string;
1865
- 'style-src'?: string;
1866
- 'style-src-attr'?: string;
1867
- 'style-src-elem'?: string;
1868
- 'trusted-types'?: string;
1869
- 'upgrade-insecure-requests'?: string;
1870
- 'worker-src'?: string;
1871
- };
1872
- export interface Integration {
1873
- object: 'integration';
1874
- /** Unique named identifier for the integration */
1875
- name: string;
1876
- /** Version of the integration */
1877
- version: number;
1878
- /** Title of the integration */
1879
- title: IntegrationTitle;
1880
- /** Description of the integration */
1881
- description?: IntegrationDescription;
1882
- /** Long form markdown summary of the integration */
1883
- summary?: IntegrationSummary;
1884
- /**
1885
- * URLs of images to showcase the integration
1886
- * @maxItems 3
1887
- */
1888
- previewImages: string[];
1889
- /** The target on which the integration can operate and needs to be configured for */
1890
- target: IntegrationTarget;
1891
- /** If true, the integration has been verified by the GitBook team */
1892
- verified: boolean;
1893
- visibility: IntegrationVisibility;
1894
- /** Permissions that should be granted to the integration */
1895
- scopes: IntegrationScopes;
1896
- /** Categories for which the integration is listed in the marketplace */
1897
- categories: IntegrationCategories;
1898
- /** Custom blocks defined by this integration. */
1899
- blocks?: IntegrationBlocks;
1900
- contentSources?: IntegrationContentSource[];
1901
- configurations?: IntegrationConfigurations;
1902
- /** External urls configured by the developer of the integration */
1903
- externalLinks: IntegrationExternalLinks;
1904
- owner: Organization;
1905
- /** URLs associated with the object */
1906
- urls: {
1907
- /**
1908
- * URL of the integration in the API
1909
- * @format uri
1910
- */
1911
- location: string;
1912
- /**
1913
- * URL of the icon associated to the integration
1914
- * @format uri
1915
- */
1916
- icon?: string;
1917
- /**
1918
- * URL of the integration in the application
1919
- * @format uri
1920
- */
1921
- app: string;
1922
- /**
1923
- * URL of the integration's assets.
1924
- * @format uri
1925
- */
1926
- assets: string;
1927
- /**
1928
- * Public HTTP endpoint for the integration
1929
- * @format uri
1930
- */
1931
- publicEndpoint: string;
1932
- };
1933
- /** The set of permissions for the integration */
1934
- permissions: {
1935
- admin: boolean;
1936
- };
1937
- /**
1938
- * Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
1939
- * headers when processing the script fetch event and the blocks fetch events.
1940
- */
1941
- contentSecurityPolicy?: IntegrationContentSecurityPolicy;
1942
- }
1943
- export interface Snippet {
1944
- /** Unique identifier for the snippet */
1945
- id: string;
1946
- /** ID of the organization owning this snippet */
1947
- organization: string;
1948
- /** @format date-time */
1949
- createdAt: string;
1950
- /**
1951
- * Timestamp of when the snippet was last edited, if it has been edited since its creation.
1952
- * @format date-time
1953
- */
1954
- editedAt?: string;
1955
- /** Whether the snippet is archived. Archived snippets don't appear in search results or in the app. */
1956
- archived: boolean;
1957
- /**
1958
- * Title describing the snippet.
1959
- * @maxLength 100
1960
- */
1961
- title?: string;
1962
- /** The source of the snippet. */
1963
- source: {
1964
- /** An ID identifying the source, unique across all sources. */
1965
- sourceId: string;
1966
- /** A display name for the source. */
1967
- name: string;
1968
- /** An ID identifying the snippet in the source system, if available. */
1969
- externalId?: string;
1970
- /** URL of the snippet in the source system, if available. */
1971
- externalUrl?: URL;
1972
- };
1973
- /**
1974
- * An array of contributors to the snippet, which can be either users or integrations. The first contributor is the one who created the snippet.
1975
- * @minItems 1
1976
- */
1977
- contributors: (Integration | User)[];
1978
- /** URLs associated with the object */
1979
- urls: {
1980
- /** URL of the snippet in the API */
1981
- location: URL;
1982
- /** URL of the snippet in the app */
1983
- app: URL;
1984
- };
1985
- }
1986
- export interface ContentLocationSnippet {
1987
- kind: 'snippet';
1988
- organization: Organization;
1989
- snippet: Snippet;
1990
- }
1991
- export interface ContentLocationReusableContent {
1992
- kind: 'reusable-content';
1993
- organization: Organization;
1994
- space: Space;
1995
- versionContext?: ContentLocationRevisionContext | ContentLocationChangeRequestContext;
1996
- reusableContent: RevisionReusableContent;
1997
- }
1998
- /** An absolute reference to content in GitBook. */
1999
- export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationSnippet | ContentLocationReusableContent;
2000
- /**
2001
- * Text to display to represent the reference. Possible values include:
2002
- * - `ok` - No problems detected for this content reference.
2003
- * - `broken` - The target does not exist in the revision.
2004
- * - `in-app` - The target is a URL link pointing to an internal location in the app.
2005
- */
2006
- export declare enum ContentReferenceStatus {
2007
- Ok = "ok",
2008
- Broken = "broken",
2009
- InApp = "in-app"
2010
- }
2011
- export interface ContentReferencesStats {
2012
- /** Total count of links */
2013
- total: number;
2014
- broken: {
2015
- /** Count of broken links */
2016
- total: number;
2017
- /** Count of broken links that were broken in current change request, if applicable. */
2018
- changeRequest?: number;
2019
- };
2020
- }
2021
- /**
2022
- * Indicator of the relationship with the content ref target.
2023
- * - `reference` - The content soft-references the ref target
2024
- * - `dependsOn` - The content depends on the ref target
2025
- */
2026
- export declare enum ContentReferenceRelation {
2027
- Reference = "reference",
2028
- DependsOn = "dependsOn"
2029
- }
2030
- export interface ContentReferenceUsage {
2031
- /**
2032
- * Text to display to represent the reference. Possible values include:
2033
- * - `ok` - No problems detected for this content reference.
2034
- * - `broken` - The target does not exist in the revision.
2035
- * - `in-app` - The target is a URL link pointing to an internal location in the app.
2036
- */
2037
- status: ContentReferenceStatus;
2038
- /**
2039
- * Indicator of the relationship with the content ref target.
2040
- * - `reference` - The content soft-references the ref target
2041
- * - `dependsOn` - The content depends on the ref target
2042
- */
2043
- relation: ContentReferenceRelation;
2044
- /** The reference target where a list of pages are pointing at */
2045
- targetReference?: ContentLocation;
2046
- /** Pages locations where a link to the target is found. */
2047
- locationReferences: ContentLocation[];
2048
- }
2049
- export interface CreateChangeRequest {
2050
- /** Subject of the change-request */
2051
- subject?: string;
2052
- }
2053
- /** Status of a change request review. */
2054
- export declare enum ChangeRequestReviewStatus {
2055
- ChangesRequested = "changes-requested",
2056
- Approved = "approved"
1783
+ /** Status of a change request review. */
1784
+ export declare enum ChangeRequestReviewStatus {
1785
+ ChangesRequested = "changes-requested",
1786
+ Approved = "approved"
2057
1787
  }
2058
1788
  /** An emoji reaction by one or many users */
2059
1789
  export interface EmojiReaction {
@@ -2656,6 +2386,237 @@ export interface CustomizationSettings {
2656
2386
  url?: URL;
2657
2387
  };
2658
2388
  }
2389
+ /**
2390
+ * Title of the integration
2391
+ * @minLength 2
2392
+ * @maxLength 30
2393
+ */
2394
+ export type IntegrationTitle = string;
2395
+ /**
2396
+ * Description of the integration
2397
+ * @maxLength 100
2398
+ */
2399
+ export type IntegrationDescription = string;
2400
+ /**
2401
+ * Long form markdown summary of the integration
2402
+ * @maxLength 2048
2403
+ */
2404
+ export type IntegrationSummary = string;
2405
+ /** The target on which the integration can operate and needs to be configured for */
2406
+ export declare enum IntegrationTarget {
2407
+ All = "all",
2408
+ Site = "site",
2409
+ Space = "space",
2410
+ Organization = "organization"
2411
+ }
2412
+ export declare enum IntegrationVisibility {
2413
+ Public = "public",
2414
+ Private = "private",
2415
+ Unlisted = "unlisted"
2416
+ }
2417
+ export declare enum IntegrationScope {
2418
+ SpaceViewsRead = "space:views:read",
2419
+ SpaceContentRead = "space:content:read",
2420
+ SpaceContentWrite = "space:content:write",
2421
+ SpaceMetadataRead = "space:metadata:read",
2422
+ SpaceMetadataWrite = "space:metadata:write",
2423
+ SpaceScriptInject = "space:script:inject",
2424
+ SpaceScriptCookies = "space:script:cookies",
2425
+ SpaceGitSync = "space:git:sync",
2426
+ SpaceVisitorAuth = "space:visitor:auth",
2427
+ SiteMetadataRead = "site:metadata:read",
2428
+ SiteViewsRead = "site:views:read",
2429
+ SiteScriptInject = "site:script:inject",
2430
+ SiteScriptCookies = "site:script:cookies",
2431
+ SiteVisitorAuth = "site:visitor:auth"
2432
+ }
2433
+ /** Permissions that should be granted to the integration */
2434
+ export type IntegrationScopes = IntegrationScope[];
2435
+ export declare enum IntegrationCategory {
2436
+ Analytics = "analytics",
2437
+ Collaboration = "collaboration",
2438
+ Content = "content",
2439
+ Gitsync = "gitsync",
2440
+ Marketing = "marketing",
2441
+ VisitorAuth = "visitor-auth",
2442
+ Other = "other"
2443
+ }
2444
+ /** Categories for which the integration is listed in the marketplace */
2445
+ export type IntegrationCategories = IntegrationCategory[];
2446
+ /** Custom blocks defined by this integration. */
2447
+ export type IntegrationBlocks = IntegrationBlock[];
2448
+ /** ContentKit component for configuration */
2449
+ export interface IntegrationConfigurationComponent {
2450
+ /** ID of the ContentKit component defined in the integration */
2451
+ componentId: string;
2452
+ }
2453
+ /** Definition of a content source provided by the integration. */
2454
+ export interface IntegrationContentSource {
2455
+ /** Unique ID in the integration for the source. */
2456
+ id: string;
2457
+ /**
2458
+ * Short descriptive title for the source.
2459
+ * @minLength 2
2460
+ * @maxLength 40
2461
+ */
2462
+ title: string;
2463
+ /**
2464
+ * Long descriptive text for the source.
2465
+ * @minLength 0
2466
+ * @maxLength 150
2467
+ */
2468
+ description?: string;
2469
+ /** URL of the icon to represent this source. */
2470
+ icon?: string;
2471
+ /** ContentKit component for configuration */
2472
+ configuration?: IntegrationConfigurationComponent;
2473
+ }
2474
+ /** Schema for a configuration */
2475
+ export interface IntegrationConfigurationSchema {
2476
+ properties: Record<string, {
2477
+ /** @maxLength 30 */
2478
+ title?: string;
2479
+ /** @maxLength 100 */
2480
+ description?: string;
2481
+ } & ({
2482
+ type: 'string';
2483
+ default?: string;
2484
+ } | {
2485
+ type: 'number';
2486
+ default?: number;
2487
+ } | {
2488
+ type: 'boolean';
2489
+ default?: boolean;
2490
+ } | {
2491
+ type: 'button';
2492
+ callback_url: string;
2493
+ button_text: string;
2494
+ })>;
2495
+ /** @uniqueItems true */
2496
+ required?: string[];
2497
+ }
2498
+ export type IntegrationConfiguration = IntegrationConfigurationSchema | IntegrationConfigurationComponent;
2499
+ export interface IntegrationConfigurations {
2500
+ account?: IntegrationConfiguration;
2501
+ space?: IntegrationConfiguration;
2502
+ site?: IntegrationConfiguration;
2503
+ }
2504
+ /**
2505
+ * External urls configured by the developer of the integration
2506
+ * @maxItems 5
2507
+ */
2508
+ export type IntegrationExternalLinks = {
2509
+ url: URL;
2510
+ label: string;
2511
+ }[];
2512
+ /**
2513
+ * Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
2514
+ * headers when processing the script fetch event and the blocks fetch events.
2515
+ */
2516
+ export type IntegrationContentSecurityPolicy = string | {
2517
+ 'base-uri'?: string;
2518
+ 'block-all-mixed-content'?: string;
2519
+ 'child-src'?: string;
2520
+ 'connect-src'?: string;
2521
+ 'default-src'?: string;
2522
+ 'font-src'?: string;
2523
+ 'form-action'?: string;
2524
+ 'frame-ancestors'?: string;
2525
+ 'frame-src'?: string;
2526
+ 'img-src'?: string;
2527
+ 'manifest-src'?: string;
2528
+ 'media-src'?: string;
2529
+ 'navigate-to'?: string;
2530
+ 'object-src'?: string;
2531
+ 'plugin-types'?: string;
2532
+ 'prefetch-src'?: string;
2533
+ referrer?: string;
2534
+ 'report-to'?: string;
2535
+ 'report-uri'?: string;
2536
+ 'require-sri-for'?: string;
2537
+ 'require-trusted-types-for'?: string;
2538
+ sandbox?: string;
2539
+ 'script-src'?: string;
2540
+ 'script-src-attr'?: string;
2541
+ 'script-src-elem'?: string;
2542
+ 'style-src'?: string;
2543
+ 'style-src-attr'?: string;
2544
+ 'style-src-elem'?: string;
2545
+ 'trusted-types'?: string;
2546
+ 'upgrade-insecure-requests'?: string;
2547
+ 'worker-src'?: string;
2548
+ };
2549
+ export interface Integration {
2550
+ object: 'integration';
2551
+ /** Unique named identifier for the integration */
2552
+ name: string;
2553
+ /** Version of the integration */
2554
+ version: number;
2555
+ /** Title of the integration */
2556
+ title: IntegrationTitle;
2557
+ /** Description of the integration */
2558
+ description?: IntegrationDescription;
2559
+ /** Long form markdown summary of the integration */
2560
+ summary?: IntegrationSummary;
2561
+ /**
2562
+ * URLs of images to showcase the integration
2563
+ * @maxItems 3
2564
+ */
2565
+ previewImages: string[];
2566
+ /** The target on which the integration can operate and needs to be configured for */
2567
+ target: IntegrationTarget;
2568
+ /** If true, the integration has been verified by the GitBook team */
2569
+ verified: boolean;
2570
+ visibility: IntegrationVisibility;
2571
+ /** Permissions that should be granted to the integration */
2572
+ scopes: IntegrationScopes;
2573
+ /** Categories for which the integration is listed in the marketplace */
2574
+ categories: IntegrationCategories;
2575
+ /** Custom blocks defined by this integration. */
2576
+ blocks?: IntegrationBlocks;
2577
+ contentSources?: IntegrationContentSource[];
2578
+ configurations?: IntegrationConfigurations;
2579
+ /** External urls configured by the developer of the integration */
2580
+ externalLinks: IntegrationExternalLinks;
2581
+ owner: Organization;
2582
+ /** URLs associated with the object */
2583
+ urls: {
2584
+ /**
2585
+ * URL of the integration in the API
2586
+ * @format uri
2587
+ */
2588
+ location: string;
2589
+ /**
2590
+ * URL of the icon associated to the integration
2591
+ * @format uri
2592
+ */
2593
+ icon?: string;
2594
+ /**
2595
+ * URL of the integration in the application
2596
+ * @format uri
2597
+ */
2598
+ app: string;
2599
+ /**
2600
+ * URL of the integration's assets.
2601
+ * @format uri
2602
+ */
2603
+ assets: string;
2604
+ /**
2605
+ * Public HTTP endpoint for the integration
2606
+ * @format uri
2607
+ */
2608
+ publicEndpoint: string;
2609
+ };
2610
+ /** The set of permissions for the integration */
2611
+ permissions: {
2612
+ admin: boolean;
2613
+ };
2614
+ /**
2615
+ * Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
2616
+ * headers when processing the script fetch event and the blocks fetch events.
2617
+ */
2618
+ contentSecurityPolicy?: IntegrationContentSecurityPolicy;
2619
+ }
2659
2620
  export type SpaceIntegrationBlocks = {
2660
2621
  /** Unique named identifier for the integration */
2661
2622
  name: string;
@@ -3112,6 +3073,8 @@ export type ContentComputeEvent = SpaceEvent & {
3112
3073
  sourceId: string;
3113
3074
  /** Properties passed to the rendering. */
3114
3075
  props: PlainObject;
3076
+ /** Dependencies of the computation. */
3077
+ dependencies: Record<string, ComputedContentDependencyValue>;
3115
3078
  };
3116
3079
  /**
3117
3080
  * Event generated when computing the document of a pages.
@@ -3692,6 +3655,12 @@ export interface CreateOrganization {
3692
3655
  * @maxLength 128
3693
3656
  */
3694
3657
  export type SiteSectionTitle = string;
3658
+ /**
3659
+ * Description of the site section
3660
+ * @minLength 0
3661
+ * @maxLength 256
3662
+ */
3663
+ export type SiteSectionDescription = string;
3695
3664
  /**
3696
3665
  * Path to the section on the site
3697
3666
  * @minLength 1
@@ -3742,6 +3711,8 @@ export interface SiteSection {
3742
3711
  id: string;
3743
3712
  /** Title of the site section */
3744
3713
  title: SiteSectionTitle;
3714
+ /** Description of the site section */
3715
+ description?: SiteSectionDescription;
3745
3716
  /** Whether this is the default section for the site */
3746
3717
  default?: boolean;
3747
3718
  /** Path to the section on the site */
@@ -3762,9 +3733,27 @@ export interface SiteSection {
3762
3733
  /** Name of the icon */
3763
3734
  icon?: Icon;
3764
3735
  }
3736
+ /**
3737
+ * Title of the site section group
3738
+ * @minLength 1
3739
+ * @maxLength 100
3740
+ */
3741
+ export type SiteSectionGroupTitle = string;
3742
+ export interface SiteSectionGroup {
3743
+ /** The object type, which is always "site-section-group" */
3744
+ object: 'site-section-group';
3745
+ /** Unique identifier of the site section group */
3746
+ id: string;
3747
+ /** Title of the site section group */
3748
+ title: SiteSectionGroupTitle;
3749
+ /** List of site section ids that are members of the group */
3750
+ sections: SiteSection[];
3751
+ /** Name of the icon */
3752
+ icon?: Icon;
3753
+ }
3765
3754
  export type SiteStructure = {
3766
3755
  type: 'sections';
3767
- structure: SiteSection[];
3756
+ structure: (SiteSection | SiteSectionGroup)[];
3768
3757
  } | {
3769
3758
  type: 'siteSpaces';
3770
3759
  structure: SiteSpace[];
@@ -3961,6 +3950,29 @@ export type BillingUpgrade = {
3961
3950
  } | {
3962
3951
  result: 'interval_changed';
3963
3952
  };
3953
+ export interface MigrateOrganizationParameters {
3954
+ /** The desired billing interval */
3955
+ interval: BillingInterval;
3956
+ /** The new product to upgrade to */
3957
+ product: 'free_2024' | 'plus_2024' | 'pro_2024';
3958
+ /** Changes to apply to the organization and its sites before upgrading */
3959
+ changes: {
3960
+ /** A list of member identifiers to be removed */
3961
+ removeMembers: string[];
3962
+ /** 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. */
3963
+ updateSites: ({
3964
+ /** The site identifier */
3965
+ id: string;
3966
+ /** The site type to migrate to */
3967
+ type: SiteType;
3968
+ } | {
3969
+ /** The site identifier */
3970
+ id: string;
3971
+ /** Can be set to `false` to unpublish a site */
3972
+ isPublished: false;
3973
+ })[];
3974
+ };
3975
+ }
3964
3976
  /** These are all the features we check to determine the new pricing site type. */
3965
3977
  export declare enum SiteToMigrateFeature {
3966
3978
  Sections = "sections",
@@ -4114,140 +4126,31 @@ export interface OrganizationUsageMembers {
4114
4126
  /** Count of all readers */
4115
4127
  read: number;
4116
4128
  /** Count of all guests */
4117
- guest: number;
4118
- }
4119
- /** Team members usage metrics of an organization */
4120
- export interface OrganizationUsageTeamMembers {
4121
- /** Count of all organization members in a team */
4122
- total: number;
4123
- /** Count of all team owners */
4124
- owner: number;
4125
- /** Count of all team members */
4126
- member: number;
4127
- }
4128
- /** All usage metrics of an organization */
4129
- export interface OrganizationUsage {
4130
- /** Spaces usage metrics of an organization */
4131
- spaces: OrganizationUsageSpaces;
4132
- /** Collections usage metrics of an organization */
4133
- collections: OrganizationUsageCollections;
4134
- /** Sites usage metrics of an organization */
4135
- sites: OrganizationUsageSites;
4136
- /** Team members usage metrics of an organization */
4137
- teams: OrganizationUsageTeams;
4138
- /** Members usage metrics of an organization */
4139
- members: OrganizationUsageMembers;
4140
- /** Team members usage metrics of an organization */
4141
- teamMembers: OrganizationUsageTeamMembers;
4142
- }
4143
- /**
4144
- * Optional title describing the capture
4145
- * @maxLength 100
4146
- */
4147
- export type CaptureTitle = string;
4148
- export type CaptureContext = 'thread' | 'walkthrough' | 'document';
4149
- export interface Capture {
4150
- /** Unique identifier for the capture */
4151
- id: string;
4152
- /** Optional title describing the capture */
4153
- title: CaptureTitle;
4154
- context: CaptureContext;
4155
- /** ID in the original source of the capture. */
4156
- externalId?: string;
4157
- /**
4158
- * URL of the source from which the capture originated
4159
- * @format uri
4160
- */
4161
- externalURL?: string;
4162
- /** @format date-time */
4163
- createdAt: string;
4164
- /** @format date-time */
4165
- stoppedAt?: string;
4166
- /** @format date-time */
4167
- editedAt?: string;
4168
- /** Count of events recorded. */
4169
- events: {
4170
- 'terminal.command'?: number;
4171
- speech?: number;
4172
- 'thread.message'?: number;
4173
- };
4174
- /**
4175
- * An array of contributors to the capture. The first contributor is the one who triggered the capture (either a user or an integration).
4176
- * @minItems 1
4177
- */
4178
- contributors: (Integration | User)[];
4179
- /** Output document for the capture. Is not set when capture is not finished. */
4180
- output?: Document;
4181
- /** URLs associated with the object */
4182
- urls: {
4183
- /**
4184
- * URL of the capture in the API
4185
- * @format uri
4186
- */
4187
- location: string;
4188
- /**
4189
- * URL of the capture in the app
4190
- * @format uri
4191
- */
4192
- app: string;
4193
- };
4194
- }
4195
- export interface BaseCaptureEvent {
4196
- /** The type of event */
4197
- type: string;
4198
- /**
4199
- * When the event happened
4200
- * @format date-time
4201
- */
4202
- timestamp: string;
4203
- /**
4204
- * Optionally, provide the source of the event. GitBook may use this to improve the generated content.
4205
- * @maxLength 50
4206
- */
4207
- source?: string;
4208
- /** Optionally, provide the actor of the event, in the context of multiple people contributing to the capture. */
4209
- actor?: {
4210
- name: string;
4211
- };
4129
+ guest: number;
4212
4130
  }
4213
- export type CaptureTerminalCommandEvent = BaseCaptureEvent & {
4214
- type: 'terminal.command';
4215
- command: string;
4216
- stdout: string;
4217
- };
4218
- export type CaptureSpeechEvent = BaseCaptureEvent & {
4219
- type: 'speech';
4220
- } & ({
4221
- /** WAV audio file, encoded as base64 */
4222
- audio: string;
4223
- } | {
4224
- /** Transcript of the speech */
4225
- transcript: string;
4226
- });
4227
- export type CaptureThreadMessageEvent = BaseCaptureEvent & {
4228
- type: 'thread.message';
4229
- isFirst?: boolean;
4230
- text: string;
4231
- };
4232
- export type CaptureFileAddedEvent = BaseCaptureEvent & {
4233
- type: 'file.added';
4234
- filename: string;
4235
- fileSnapshot: string;
4236
- };
4237
- export type CaptureFileChangedEvent = BaseCaptureEvent & {
4238
- type: 'file.changed';
4239
- filename: string;
4240
- fileDiff: string;
4241
- };
4242
- export type CaptureFileRemovedEvent = BaseCaptureEvent & {
4243
- type: 'file.removed';
4244
- filename: string;
4245
- fileSnapshot: string;
4246
- };
4247
- export type CaptureEvent = CaptureTerminalCommandEvent | CaptureSpeechEvent | CaptureThreadMessageEvent | CaptureFileAddedEvent | CaptureFileChangedEvent | CaptureFileRemovedEvent;
4248
- export interface UpdateSnippetSchema {
4249
- /** A new title for the snippet. */
4250
- title?: string;
4131
+ /** Team members usage metrics of an organization */
4132
+ export interface OrganizationUsageTeamMembers {
4133
+ /** Count of all organization members in a team */
4134
+ total: number;
4135
+ /** Count of all team owners */
4136
+ owner: number;
4137
+ /** Count of all team members */
4138
+ member: number;
4139
+ }
4140
+ /** All usage metrics of an organization */
4141
+ export interface OrganizationUsage {
4142
+ /** Spaces usage metrics of an organization */
4143
+ spaces: OrganizationUsageSpaces;
4144
+ /** Collections usage metrics of an organization */
4145
+ collections: OrganizationUsageCollections;
4146
+ /** Sites usage metrics of an organization */
4147
+ sites: OrganizationUsageSites;
4148
+ /** Team members usage metrics of an organization */
4149
+ teams: OrganizationUsageTeams;
4150
+ /** Members usage metrics of an organization */
4151
+ members: OrganizationUsageMembers;
4152
+ /** Team members usage metrics of an organization */
4153
+ teamMembers: OrganizationUsageTeamMembers;
4251
4154
  }
4252
4155
  /** 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. */
4253
4156
  export type BillingOperationPreviewResponse = {
@@ -4304,7 +4207,7 @@ export declare enum CustomizationSidebarBackgroundStyle {
4304
4207
  /**
4305
4208
  * - `default`: Simple list items without special styling, groups are inset with a line.
4306
4209
  * - `pill`: Rounded capsule shape around selected/active items.
4307
- * - `line`: Continuous line next to all items, with coloured line part for selected/active items.
4210
+ * - `line`: Continuous line next to all items, with colored line part for selected/active items.
4308
4211
  */
4309
4212
  export declare enum CustomizationSidebarListStyle {
4310
4213
  Default = "default",
@@ -4342,7 +4245,7 @@ export interface SiteCustomizationSettings {
4342
4245
  /**
4343
4246
  * - `default`: Simple list items without special styling, groups are inset with a line.
4344
4247
  * - `pill`: Rounded capsule shape around selected/active items.
4345
- * - `line`: Continuous line next to all items, with coloured line part for selected/active items.
4248
+ * - `line`: Continuous line next to all items, with colored line part for selected/active items.
4346
4249
  */
4347
4250
  list: CustomizationSidebarListStyle;
4348
4251
  };
@@ -4476,24 +4379,6 @@ export type SitePublishingAuthUpdate = (VisitorAuthCustomBackend | VisitorAuthIn
4476
4379
  */
4477
4380
  fallbackURL?: string;
4478
4381
  };
4479
- /**
4480
- * Title of the site section group
4481
- * @minLength 1
4482
- * @maxLength 100
4483
- */
4484
- export type SiteSectionGroupTitle = string;
4485
- export interface SiteSectionGroup {
4486
- /** The object type, which is always "site-section-group" */
4487
- object: 'site-section-group';
4488
- /** Unique identifier of the site section group */
4489
- id: string;
4490
- /** Title of the site section group */
4491
- title: SiteSectionGroupTitle;
4492
- /** List of site section ids that are members of the group */
4493
- sections: SiteSection[];
4494
- /** Name of the icon */
4495
- icon?: Icon;
4496
- }
4497
4382
  export type SiteSearchScope = {
4498
4383
  /** 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. */
4499
4384
  mode: 'default';
@@ -4511,6 +4396,16 @@ export type SiteSpaceCustomizationSettings = SiteCustomizationSettings & {
4511
4396
  /** Indicates whether the site customization settings have been overridden. */
4512
4397
  hasOverrides: boolean;
4513
4398
  };
4399
+ export interface SiteSectionGroupPointer {
4400
+ type: 'site-section' | 'site-section-group';
4401
+ /** Unique identifier for the site section */
4402
+ id: string;
4403
+ }
4404
+ /** Position at which to move the site section group. */
4405
+ export interface SiteSectionGroupMovePosition {
4406
+ before?: SiteSectionGroupPointer;
4407
+ after?: SiteSectionGroupPointer;
4408
+ }
4514
4409
  export interface SiteSectionPointer {
4515
4410
  type: 'site-section';
4516
4411
  /** Unique identifier for the site section */
@@ -5360,6 +5255,68 @@ export type PublishedSiteContentLookup = {
5360
5255
  target: 'application' | 'content' | 'external';
5361
5256
  redirect: URL;
5362
5257
  } | PublishedSiteContent;
5258
+ /**
5259
+ * Slug used as reference
5260
+ * @minLength 1
5261
+ * @maxLength 100
5262
+ */
5263
+ export type OpenAPISpecSlug = string;
5264
+ /** Processing state */
5265
+ export declare enum OpenAPISpecProcessingState {
5266
+ Pending = "pending",
5267
+ Progress = "progress",
5268
+ Complete = "complete"
5269
+ }
5270
+ export interface OpenAPISpec {
5271
+ /** The object type, which is always "openapi-spec" */
5272
+ object: 'openapi-spec';
5273
+ /** Unique identifier */
5274
+ id: string;
5275
+ /** Date of creation */
5276
+ createdAt: Timestamp;
5277
+ /** Date of the last update */
5278
+ updatedAt: Timestamp;
5279
+ /** Slug used as reference */
5280
+ slug: OpenAPISpecSlug;
5281
+ sourceURL?: URL;
5282
+ /** Processing state */
5283
+ processingState: OpenAPISpecProcessingState;
5284
+ /** Date of the last processing */
5285
+ lastProcessedAt?: Timestamp;
5286
+ /** URLs associated with the object */
5287
+ urls: {
5288
+ /** URL of the OpenAPI specification in the API */
5289
+ location: URL;
5290
+ /** URL of the OpenAPI specification in the application */
5291
+ app: URL;
5292
+ };
5293
+ }
5294
+ export interface OpenAPISpecVersion {
5295
+ /** The object type, which is always "openapi-spec-version" */
5296
+ object: 'openapi-spec-version';
5297
+ /** Unique identifier */
5298
+ id: string;
5299
+ /** Date of creation */
5300
+ createdAt?: Timestamp;
5301
+ /** URL poiting to the source of the specification */
5302
+ sourceURL: URL;
5303
+ /** URL pointing to the processed specification */
5304
+ contentURL: URL;
5305
+ /** URLs associated with the object */
5306
+ urls: {
5307
+ /** URL of the OpenAPI specification version in the API */
5308
+ location: URL;
5309
+ /** URL of the OpenAPI specification version in the application */
5310
+ app: URL;
5311
+ };
5312
+ }
5313
+ /** Content of OpenAPI specification */
5314
+ export type OpenAPISpecContent = object;
5315
+ /**
5316
+ * @minLength 64
5317
+ * @maxLength 64
5318
+ */
5319
+ export type SHA256 = string;
5363
5320
  export interface UpdateContentPublishingAuth {
5364
5321
  /**
5365
5322
  * A fallback URL that will be used if authentication fails.
@@ -5388,6 +5345,10 @@ export interface ContentPublishingAuth {
5388
5345
  fallbackURL?: string;
5389
5346
  }
5390
5347
  export type DocumentBlock = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockListItem | DocumentBlockDivider | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockImage | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockCodeLine | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTabsItem | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockStepperStep;
5348
+ /** Dependency for a computation, before its resolution. */
5349
+ export interface ComputedContentDependency {
5350
+ ref: ComputedContentDependencyRef;
5351
+ }
5391
5352
  export type InputPageBase = {
5392
5353
  /**
5393
5354
  * Optional unique identifier for the page.
@@ -5751,10 +5712,6 @@ export interface OrganizationCollectionsChannel {
5751
5712
  channel: 'organization-collections';
5752
5713
  organization: string;
5753
5714
  }
5754
- export interface OrganizationCapturesChannel {
5755
- channel: 'organization-captures';
5756
- organization: string;
5757
- }
5758
5715
  export interface OrganizationIntegrationsChannel {
5759
5716
  channel: 'organization-integrations';
5760
5717
  organization: string;
@@ -5773,6 +5730,11 @@ export interface OrganizationAIIndexationChannel {
5773
5730
  channel: 'organization-ai-indexation';
5774
5731
  organization: string;
5775
5732
  }
5733
+ /** Subscription channel for changes in OpenAPI specifications in an organization. */
5734
+ export interface OrganizationOpenAPISpecsChannel {
5735
+ channel: 'organization-openapi-specs';
5736
+ organization: string;
5737
+ }
5776
5738
  export interface SpaceCommentsChannel {
5777
5739
  channel: 'space-comments';
5778
5740
  space: string;
@@ -5895,8 +5857,13 @@ export interface GitSyncOperationChannel {
5895
5857
  channel: 'space-gitsync-operation';
5896
5858
  space: string;
5897
5859
  }
5860
+ /** Subscription channel for changes in OpenAPI specification versions. */
5861
+ export interface OpenAPISpecVersionsChannel {
5862
+ channel: 'openapi-spec-versions';
5863
+ openAPISpec: string;
5864
+ }
5898
5865
  /** Channel to subscribe to for realtime updates. */
5899
- 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;
5866
+ 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 | OpenAPISpecVersionsChannel;
5900
5867
  export interface GitSyncOperationChannelData {
5901
5868
  channel: 'space-gitsync-operation';
5902
5869
  data: GitSyncOperation;
@@ -5978,6 +5945,7 @@ export type SpaceVisitorAuthCustomBackend = VisitorAuthCustomBackend;
5978
5945
  export type SpaceVisitorAuthIntegrationBackend = VisitorAuthIntegrationBackend;
5979
5946
  export type UserPermissions = Index;
5980
5947
  export type SiteRedirectDestinationSpace = SiteRedirectDestinationSiteSpace;
5948
+ export type OpenAPISpecSourceURL = URL;
5981
5949
  import { EventIterator } from 'event-iterator';
5982
5950
  export type QueryParamsType = Record<string | number, any>;
5983
5951
  export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
@@ -6066,6 +6034,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6066
6034
  * @name SearchContent
6067
6035
  * @summary Search content across spaces that is accessible by the currently authenticated target
6068
6036
  * @request GET:/search
6037
+ * @deprecated
6069
6038
  * @secure
6070
6039
  */
6071
6040
  searchContent: (query: {
@@ -6107,6 +6076,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6107
6076
  * @name AskQuery
6108
6077
  * @summary Ask a question to an AI across spaces that is accessible by the currently authenticated target.
6109
6078
  * @request POST:/search/ask
6079
+ * @deprecated
6110
6080
  * @secure
6111
6081
  */
6112
6082
  askQuery: (data: SearchAIQuery, query?: {
@@ -6388,6 +6358,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6388
6358
  * @name GetRecommendedQuestionsInSpace
6389
6359
  * @summary Get a list of questions that can be asked in a space.
6390
6360
  * @request GET:/spaces/{spaceId}/search/questions
6361
+ * @deprecated
6391
6362
  * @secure
6392
6363
  */
6393
6364
  getRecommendedQuestionsInSpace: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<SearchAIRecommendedQuestions, Error>>;
@@ -6397,6 +6368,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6397
6368
  * @name StreamRecommendedQuestionsInSpace
6398
6369
  * @summary Stream a list of questions that can be asked in a space.
6399
6370
  * @request GET:/spaces/{spaceId}/search/questions/stream
6371
+ * @deprecated
6400
6372
  * @secure
6401
6373
  */
6402
6374
  streamRecommendedQuestionsInSpace: (spaceId: string, params?: RequestParams) => EventIterator<SearchAIRecommendedQuestionStream>;
@@ -6443,6 +6415,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6443
6415
  * @name GetContentAnalyticsForSpaceById
6444
6416
  * @summary Get content analytics for a given space.
6445
6417
  * @request GET:/spaces/{spaceId}/insights/content
6418
+ * @deprecated
6446
6419
  * @secure
6447
6420
  */
6448
6421
  getContentAnalyticsForSpaceById: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<AnalyticsContentPages, Error>>;
@@ -6453,6 +6426,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6453
6426
  * @name GetSearchAnalyticsForSpaceById
6454
6427
  * @summary Get an overview of the top search queries in a space.
6455
6428
  * @request GET:/spaces/{spaceId}/insights/search
6429
+ * @deprecated
6456
6430
  * @secure
6457
6431
  */
6458
6432
  getSearchAnalyticsForSpaceById: (spaceId: string, query?: {
@@ -6465,6 +6439,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6465
6439
  * @name GetTrafficAnalyticsForSpaceById
6466
6440
  * @summary Get traffic page views for a given space
6467
6441
  * @request GET:/spaces/{spaceId}/insights/traffic
6442
+ * @deprecated
6468
6443
  * @secure
6469
6444
  */
6470
6445
  getTrafficAnalyticsForSpaceById: (spaceId: string, query?: {
@@ -6477,6 +6452,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6477
6452
  * @name TrackViewInSpaceById
6478
6453
  * @summary Track a page view in a space
6479
6454
  * @request POST:/spaces/{spaceId}/insights/track_view
6455
+ * @deprecated
6480
6456
  * @secure
6481
6457
  */
6482
6458
  trackViewInSpaceById: (spaceId: string, data: SpaceTrackPageView, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
@@ -6887,29 +6863,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6887
6863
  * No description
6888
6864
  *
6889
6865
  * @name GetComputedDocument
6890
- * @summary Get the document for a page in a computed content.
6891
- * @request GET:/spaces/{spaceId}/content/computed/document
6866
+ * @summary Generate a document for a page in a computed content.
6867
+ * @request POST:/spaces/{spaceId}/content/computed/document
6892
6868
  * @secure
6893
6869
  */
6894
- getComputedDocument: (spaceId: string, query: {
6895
- /** Output format for the content. */
6896
- format?: "document" | "markdown";
6897
- /** LZ-string compressed JSON request */
6898
- request: string;
6899
- }, params?: RequestParams) => Promise<HttpResponse<Document, Error>>;
6870
+ getComputedDocument: (spaceId: string, data: {
6871
+ /** Parameters for a computed content */
6872
+ source: ComputedContentSource;
6873
+ }, query?: {
6874
+ /** Version of the schema used for the document. */
6875
+ schema?: "current" | "next";
6876
+ }, params?: RequestParams) => Promise<HttpResponse<JSONDocument, Error>>;
6900
6877
  /**
6901
6878
  * No description
6902
6879
  *
6903
- * @name GetComputedPage
6904
- * @summary Get the computed pages for a page in a computed content.
6905
- * @request GET:/spaces/{spaceId}/content/computed/page
6880
+ * @name GetComputedRevision
6881
+ * @summary Get the computed content for a source in a computed content.
6882
+ * @request POST:/spaces/{spaceId}/content/computed/revision
6906
6883
  * @secure
6907
6884
  */
6908
- getComputedPage: (spaceId: string, query: {
6909
- /** Output format for the content. */
6910
- format?: "document" | "markdown";
6911
- /** LZ-string compressed JSON request */
6912
- request: string;
6885
+ getComputedRevision: (spaceId: string, data: {
6886
+ /** Parameters for a computed content */
6887
+ source: ComputedContentSource;
6913
6888
  }, params?: RequestParams) => Promise<HttpResponse<{
6914
6889
  pages: RevisionPage[];
6915
6890
  files: RevisionFile[];
@@ -9439,41 +9414,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9439
9414
  * @request POST:/orgs/{organizationId}/billing/migrate
9440
9415
  * @secure
9441
9416
  */
9442
- migrateOrganizationPlan: (organizationId: string, data: {
9443
- /** The desired billing interval */
9444
- interval: BillingInterval;
9445
- /** The new product to upgrade to */
9446
- product: "free_2024" | "plus_2024" | "pro_2024";
9447
- /** Changes to apply to the organization and its sites before upgrading */
9448
- changes?: {
9449
- /** A list of member identifiers to be removed */
9450
- removeMembers?: string[];
9451
- /** A list of site type updates to be applied before upgrading. If a site is not present in this list, it'll be upgraded to whichever type matches its features and its published status will be unchanged. */
9452
- updateSiteTypes?: {
9453
- /** The site identifier */
9454
- id: string;
9455
- /** The new site type */
9456
- type: "basic" | "premium" | "ultimate";
9457
- }[];
9458
- };
9459
- }, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
9417
+ migrateOrganizationPlan: (organizationId: string, data: MigrateOrganizationParameters, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
9460
9418
  /**
9461
9419
  * No description
9462
9420
  *
9463
9421
  * @tags organizations
9464
9422
  * @name PreviewMigrateOrganizationPlan
9465
9423
  * @summary Preview a migration of an organization to new pricing.
9466
- * @request GET:/orgs/{organizationId}/billing/migrate
9424
+ * @request POST:/orgs/{organizationId}/billing/migrate/preview
9467
9425
  * @secure
9468
9426
  */
9469
- previewMigrateOrganizationPlan: (organizationId: string, query: {
9470
- /** The desired billing interval */
9471
- interval: BillingInterval;
9472
- /** The new product to upgrade to */
9473
- product: "free_2024" | "plus_2024" | "pro_2024";
9474
- /** How many members have been deselected by the user */
9475
- removedMembersCount: number;
9476
- }, params?: RequestParams) => Promise<HttpResponse<{
9427
+ previewMigrateOrganizationPlan: (organizationId: string, data: MigrateOrganizationParameters, params?: RequestParams) => Promise<HttpResponse<{
9477
9428
  totals: {
9478
9429
  /** Count of all members */
9479
9430
  members: number;
@@ -9898,315 +9849,104 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9898
9849
  */
9899
9850
  deleteOrganizationSamlProvider: (organizationId: string, samlProviderId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
9900
9851
  /**
9901
- * @description Lists SSO login information configured for the specified organization.
9902
- *
9903
- * @tags organizations
9904
- * @name ListSsoProviderLoginsInOrganization
9905
- * @summary List organization SSO provider login information
9906
- * @request GET:/orgs/{organizationId}/sso
9907
- * @secure
9908
- */
9909
- listSsoProviderLoginsInOrganization: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9910
- items: OrganizationSSOProviderLogin[];
9911
- }, Error>>;
9912
- /**
9913
- * No description
9914
- *
9915
- * @tags organizations, usage
9916
- * @name GetUsageForOrganizationById
9917
- * @summary Get all usage metrics for an organization
9918
- * @request GET:/orgs/{organizationId}/usage
9919
- * @secure
9920
- */
9921
- getUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationUsage, Error>>;
9922
- /**
9923
- * No description
9924
- *
9925
- * @tags organizations, usage
9926
- * @name GetCollectionsUsageForOrganizationById
9927
- * @summary Get collections usage metrics for an organization
9928
- * @request GET:/orgs/{organizationId}/usage/collections
9929
- * @secure
9930
- */
9931
- getCollectionsUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9932
- /** Collections usage metrics of an organization */
9933
- collections: OrganizationUsageCollections;
9934
- }, Error>>;
9935
- /**
9936
- * No description
9937
- *
9938
- * @tags organizations, usage
9939
- * @name GetSpacesUsageForOrganizationById
9940
- * @summary Get spaces usage metrics for an organization
9941
- * @request GET:/orgs/{organizationId}/usage/spaces
9942
- * @secure
9943
- */
9944
- getSpacesUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9945
- /** Spaces usage metrics of an organization */
9946
- spaces: OrganizationUsageSpaces;
9947
- }, Error>>;
9948
- /**
9949
- * No description
9950
- *
9951
- * @tags organizations, usage
9952
- * @name GetSitesUsageForOrganizationById
9953
- * @summary Get sites usage metrics for an organization
9954
- * @request GET:/orgs/{organizationId}/usage/sites
9955
- * @secure
9956
- */
9957
- getSitesUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9958
- /** Sites usage metrics of an organization */
9959
- sites: OrganizationUsageSites;
9960
- }, Error>>;
9961
- /**
9962
- * No description
9963
- *
9964
- * @tags organizations, usage
9965
- * @name GetTeamsUsageForOrganizationById
9966
- * @summary Get teams usage metrics for an organization
9967
- * @request GET:/orgs/{organizationId}/usage/teams
9968
- * @secure
9969
- */
9970
- getTeamsUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9971
- /** Team members usage metrics of an organization */
9972
- teams: OrganizationUsageTeams;
9973
- }, Error>>;
9974
- /**
9975
- * No description
9976
- *
9977
- * @tags organizations, usage
9978
- * @name GetMembersUsageForOrganizationById
9979
- * @summary Get members usage metrics for an organization
9980
- * @request GET:/orgs/{organizationId}/usage/members
9981
- * @secure
9982
- */
9983
- getMembersUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9984
- /** Members usage metrics of an organization */
9985
- members: OrganizationUsageMembers;
9986
- }, Error>>;
9987
- /**
9988
- * No description
9989
- *
9990
- * @tags organizations, usage
9991
- * @name GetTeamMembersUsageForOrganizationById
9992
- * @summary Get team members usage metrics for an organization
9993
- * @request GET:/orgs/{organizationId}/usage/team-members
9994
- * @secure
9995
- */
9996
- getTeamMembersUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9997
- /** Team members usage metrics of an organization */
9998
- teamMembers: OrganizationUsageTeamMembers;
9999
- }, Error>>;
10000
- /**
10001
- * @description List captures in an organization, newest first.
10002
- *
10003
- * @tags organizations
10004
- * @name ListCaptures
10005
- * @summary List captures. Deprecated, use listSnippets instead.
10006
- * @request GET:/orgs/{organizationId}/captures
10007
- * @deprecated
10008
- * @secure
10009
- */
10010
- listCaptures: (organizationId: string, query?: {
10011
- /** Output format for the content. */
10012
- format?: "document" | "markdown";
10013
- /** Identifier of the page results to fetch. */
10014
- page?: string;
10015
- /**
10016
- * The number of results per page
10017
- * @min 0
10018
- * @max 1000
10019
- */
10020
- limit?: number;
10021
- /** The context in which the item was captured */
10022
- context?: "walkthrough" | "thread";
10023
- }, params?: RequestParams) => Promise<HttpResponse<List & {
10024
- items: Capture[];
10025
- }, Error>>;
10026
- /**
10027
- * No description
10028
- *
10029
- * @tags organizations
10030
- * @name StartCapture
10031
- * @summary Start a capture
10032
- * @request POST:/orgs/{organizationId}/captures
10033
- * @secure
10034
- */
10035
- startCapture: (organizationId: string, data: {
10036
- /** Optional title describing the capture */
10037
- title?: CaptureTitle;
10038
- context: CaptureContext;
10039
- /** ID in the original source of the capture. */
10040
- externalId?: string;
10041
- /**
10042
- * URL of the original source of the capture.
10043
- * @format uri
10044
- */
10045
- externalURL?: string;
10046
- }, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
10047
- /**
10048
- * No description
10049
- *
10050
- * @tags organizations
10051
- * @name GetCapture
10052
- * @summary Get a capture by its ID. Deprecated, use getSnippet instead.
10053
- * @request GET:/orgs/{organizationId}/captures/{captureId}
10054
- * @deprecated
10055
- * @secure
10056
- */
10057
- getCapture: (organizationId: string, captureId: string, query?: {
10058
- /** Output format for the content. */
10059
- format?: "document" | "markdown";
10060
- }, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
10061
- /**
10062
- * No description
10063
- *
10064
- * @tags organizations
10065
- * @name AddEventsToCapture
10066
- * @summary Add events to a running capture
10067
- * @request POST:/orgs/{organizationId}/captures/{captureId}/events
10068
- * @secure
10069
- */
10070
- addEventsToCapture: (organizationId: string, captureId: string, data: {
10071
- events: CaptureEvent[];
10072
- }, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
10073
- /**
10074
- * No description
9852
+ * @description Lists SSO login information configured for the specified organization.
10075
9853
  *
10076
9854
  * @tags organizations
10077
- * @name StopCapture
10078
- * @summary Stop a capture
10079
- * @request POST:/orgs/{organizationId}/captures/{captureId}/stop
9855
+ * @name ListSsoProviderLoginsInOrganization
9856
+ * @summary List organization SSO provider login information
9857
+ * @request GET:/orgs/{organizationId}/sso
10080
9858
  * @secure
10081
9859
  */
10082
- stopCapture: (organizationId: string, captureId: string, data: object, query?: {
10083
- /** Output format for the content. */
10084
- format?: "document" | "markdown";
10085
- }, params?: RequestParams) => Promise<HttpResponse<{
10086
- capture: Capture;
10087
- /** Example questions that would be answered by the content of this capture. */
10088
- followupQuestions?: string[];
9860
+ listSsoProviderLoginsInOrganization: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9861
+ items: OrganizationSSOProviderLogin[];
10089
9862
  }, Error>>;
10090
9863
  /**
10091
- * @description List snippets in an organization, newest first.
9864
+ * No description
10092
9865
  *
10093
- * @tags organizations
10094
- * @name ListSnippets
10095
- * @summary Lists snippets.
10096
- * @request GET:/orgs/{organizationId}/snippets
9866
+ * @tags organizations, usage
9867
+ * @name GetUsageForOrganizationById
9868
+ * @summary Get all usage metrics for an organization
9869
+ * @request GET:/orgs/{organizationId}/usage
10097
9870
  * @secure
10098
9871
  */
10099
- listSnippets: (organizationId: string, query?: {
10100
- /** Identifier of the page results to fetch. */
10101
- page?: string;
10102
- /**
10103
- * The number of results per page
10104
- * @min 0
10105
- * @max 1000
10106
- */
10107
- limit?: number;
10108
- /** If specified, only snippets from the specified source will be returned. */
10109
- source?: string;
10110
- }, params?: RequestParams) => Promise<HttpResponse<List & {
10111
- items: Snippet[];
10112
- }, Error>>;
9872
+ getUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationUsage, Error>>;
10113
9873
  /**
10114
9874
  * No description
10115
9875
  *
10116
- * @tags organizations
10117
- * @name CreateSnippet
10118
- * @summary Create a new snippet
10119
- * @request POST:/orgs/{organizationId}/snippets
9876
+ * @tags organizations, usage
9877
+ * @name GetCollectionsUsageForOrganizationById
9878
+ * @summary Get collections usage metrics for an organization
9879
+ * @request GET:/orgs/{organizationId}/usage/collections
10120
9880
  * @secure
10121
9881
  */
10122
- createSnippet: (organizationId: string, data: object, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
9882
+ getCollectionsUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9883
+ /** Collections usage metrics of an organization */
9884
+ collections: OrganizationUsageCollections;
9885
+ }, Error>>;
10123
9886
  /**
10124
9887
  * No description
10125
9888
  *
10126
- * @tags organizations
10127
- * @name GetSnippet
10128
- * @summary Get a snippet by its ID
10129
- * @request GET:/orgs/{organizationId}/snippets/{snippetId}
9889
+ * @tags organizations, usage
9890
+ * @name GetSpacesUsageForOrganizationById
9891
+ * @summary Get spaces usage metrics for an organization
9892
+ * @request GET:/orgs/{organizationId}/usage/spaces
10130
9893
  * @secure
10131
9894
  */
10132
- getSnippet: (organizationId: string, snippetId: string, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
9895
+ getSpacesUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9896
+ /** Spaces usage metrics of an organization */
9897
+ spaces: OrganizationUsageSpaces;
9898
+ }, Error>>;
10133
9899
  /**
10134
9900
  * No description
10135
9901
  *
10136
- * @tags organizations
10137
- * @name DeleteSnippet
10138
- * @summary Delete a snippet by its ID.
10139
- * @request DELETE:/orgs/{organizationId}/snippets/{snippetId}
9902
+ * @tags organizations, usage
9903
+ * @name GetSitesUsageForOrganizationById
9904
+ * @summary Get sites usage metrics for an organization
9905
+ * @request GET:/orgs/{organizationId}/usage/sites
10140
9906
  * @secure
10141
9907
  */
10142
- deleteSnippet: (organizationId: string, snippetId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
9908
+ getSitesUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9909
+ /** Sites usage metrics of an organization */
9910
+ sites: OrganizationUsageSites;
9911
+ }, Error>>;
10143
9912
  /**
10144
9913
  * No description
10145
9914
  *
10146
- * @tags organizations
10147
- * @name UpdateSnippet
10148
- * @summary Update an existing snippet.
10149
- * @request PUT:/orgs/{organizationId}/snippets/{snippetId}
9915
+ * @tags organizations, usage
9916
+ * @name GetTeamsUsageForOrganizationById
9917
+ * @summary Get teams usage metrics for an organization
9918
+ * @request GET:/orgs/{organizationId}/usage/teams
10150
9919
  * @secure
10151
9920
  */
10152
- updateSnippet: (organizationId: string, snippetId: string, data: UpdateSnippetSchema, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
9921
+ getTeamsUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9922
+ /** Team members usage metrics of an organization */
9923
+ teams: OrganizationUsageTeams;
9924
+ }, Error>>;
10153
9925
  /**
10154
9926
  * No description
10155
9927
  *
10156
- * @tags organizations
10157
- * @name MoveSnippet
10158
- * @summary Move a snippet into a destination. The snippet will be archived in the process.
10159
- * @request POST:/orgs/{organizationId}/snippets/{snippetId}/move
10160
- * @secure
10161
- */
10162
- moveSnippet: (organizationId: string, snippetId: string, data: {
10163
- /** Intended destination for the page */
10164
- target: {
10165
- /** The id of the target space */
10166
- space: string;
10167
- position?: {
10168
- /** The parent of the page in the target space. If undefined, the page will be inserted at the root of the space. */
10169
- parent?: string;
10170
- /** The index of the page in the parent. If undefined, the page will be inserted at the end of the parent's current children. */
10171
- index?: number;
10172
- };
10173
- };
10174
- }, params?: RequestParams) => Promise<HttpResponse<{
10175
- page: RevisionPageDocument;
10176
- changeRequest?: ChangeRequest;
9928
+ * @tags organizations, usage
9929
+ * @name GetMembersUsageForOrganizationById
9930
+ * @summary Get members usage metrics for an organization
9931
+ * @request GET:/orgs/{organizationId}/usage/members
9932
+ * @secure
9933
+ */
9934
+ getMembersUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9935
+ /** Members usage metrics of an organization */
9936
+ members: OrganizationUsageMembers;
10177
9937
  }, Error>>;
10178
9938
  /**
10179
9939
  * No description
10180
9940
  *
10181
- * @tags organizations
10182
- * @name GetSnippetSuggestedLocations
10183
- * @summary Return possible snippet locations in an organization based on the current user.
10184
- * @request GET:/orgs/{organizationId}/snippets/{snippetId}/move
9941
+ * @tags organizations, usage
9942
+ * @name GetTeamMembersUsageForOrganizationById
9943
+ * @summary Get team members usage metrics for an organization
9944
+ * @request GET:/orgs/{organizationId}/usage/team-members
10185
9945
  * @secure
10186
9946
  */
10187
- getSnippetSuggestedLocations: (organizationId: string, snippetId: string, query?: {
10188
- /** Identifier of the page results to fetch. */
10189
- page?: string;
10190
- /**
10191
- * The number of results per page
10192
- * @min 0
10193
- * @max 1000
10194
- */
10195
- limit?: number;
10196
- /** If specified, only locations in the given space will be returned. If not specified, GitBook will suggest spaces. */
10197
- spaceId?: string;
10198
- /** 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. */
10199
- pageId?: string;
10200
- /** If specified, only locations matching the search query will be returned. */
10201
- search?: string;
10202
- }, params?: RequestParams) => Promise<HttpResponse<List & {
10203
- items: {
10204
- /** If defined and true, this location was suggested by GitBook AI. */
10205
- aiPowered?: boolean;
10206
- space: Space;
10207
- /** The parent page of the suggested location. */
10208
- parentPage?: RevisionPageDocument | RevisionPageGroup;
10209
- }[];
9947
+ getTeamMembersUsageForOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
9948
+ /** Team members usage metrics of an organization */
9949
+ teamMembers: OrganizationUsageTeamMembers;
10210
9950
  }, Error>>;
10211
9951
  /**
10212
9952
  * No description
@@ -10761,6 +10501,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10761
10501
  }, params?: RequestParams) => Promise<HttpResponse<List & {
10762
10502
  items: SiteSpace[];
10763
10503
  }, Error>>;
10504
+ /**
10505
+ * No description
10506
+ *
10507
+ * @tags sites
10508
+ * @name ListSiteSectionGroups
10509
+ * @summary List all the section groups under a site in an organization
10510
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/section-groups
10511
+ * @secure
10512
+ */
10513
+ listSiteSectionGroups: (organizationId: string, siteId: string, query?: {
10514
+ /** Identifier of the page results to fetch. */
10515
+ page?: string;
10516
+ /**
10517
+ * The number of results per page
10518
+ * @min 0
10519
+ * @max 1000
10520
+ */
10521
+ limit?: number;
10522
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
10523
+ items: SiteSectionGroup[];
10524
+ }, Error>>;
10764
10525
  /**
10765
10526
  * No description
10766
10527
  *
@@ -10773,6 +10534,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10773
10534
  addSectionGroupToSite: (organizationId: string, siteId: string, data: {
10774
10535
  /** Title of the site section group */
10775
10536
  title: SiteSectionGroupTitle;
10537
+ icon?: Icon | null;
10776
10538
  /** IDs of the sections to be added to the section group */
10777
10539
  sections?: string[];
10778
10540
  }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, Error>>;
@@ -10800,6 +10562,29 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10800
10562
  * @secure
10801
10563
  */
10802
10564
  deleteSiteSectionGroupById: (organizationId: string, siteId: string, siteSectionGroupId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
10565
+ /**
10566
+ * No description
10567
+ *
10568
+ * @tags sites
10569
+ * @name AddSectionToGroup
10570
+ * @summary Add a section to a section group
10571
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/sections
10572
+ * @secure
10573
+ */
10574
+ addSectionToGroup: (organizationId: string, siteId: string, siteSectionGroupId: string, data: {
10575
+ /** ID of the section to add to the section group */
10576
+ sectionId: string;
10577
+ }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, Error>>;
10578
+ /**
10579
+ * No description
10580
+ *
10581
+ * @tags sites
10582
+ * @name RemoveSectionFromGroup
10583
+ * @summary Remove a section from a section group
10584
+ * @request DELETE:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/sections/{siteSectionId}
10585
+ * @secure
10586
+ */
10587
+ removeSectionFromGroup: (organizationId: string, siteId: string, siteSectionGroupId: string, siteSectionId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
10803
10588
  /**
10804
10589
  * No description
10805
10590
  *
@@ -10860,6 +10645,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10860
10645
  /** Conditional expression used to evaluate whether the site section should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
10861
10646
  condition?: Condition | null;
10862
10647
  icon?: Icon | null;
10648
+ description?: SiteSectionDescription | null;
10863
10649
  }, params?: RequestParams) => Promise<HttpResponse<SiteSection, Error>>;
10864
10650
  /**
10865
10651
  * No description
@@ -11010,7 +10796,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11010
10796
  styling?: {
11011
10797
  /** The primary color used for links and UI text. Set to null to reset the override. */
11012
10798
  primaryColor?: CustomizationThemedColor | null;
11013
- /** 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. */
10799
+ /** 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. */
11014
10800
  tint?: CustomizationTint | null;
11015
10801
  /** The style of the corners to use. Set to null to reset the override. */
11016
10802
  corners?: CustomizationCorners | null;
@@ -11161,6 +10947,31 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11161
10947
  createSitesPageFeedback: (organizationId: string, siteId: string, siteSpaceId: string, pageId: string, visitorId: string, data: {
11162
10948
  rating: PageFeedbackRating;
11163
10949
  }, params?: RequestParams) => Promise<HttpResponse<PageFeedback, Error>>;
10950
+ /**
10951
+ * No description
10952
+ *
10953
+ * @tags sites
10954
+ * @name MoveSiteSectionGroup
10955
+ * @summary Move a site section group to a new position in the site.
10956
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/move
10957
+ * @secure
10958
+ */
10959
+ moveSiteSectionGroup: (organizationId: string, siteId: string, siteSectionGroupId: string, data: {
10960
+ /** The position where to move the site section group. When not provided the site section group is moved at the end of the site. */
10961
+ position?: SiteSectionGroupMovePosition;
10962
+ }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, Error | {
10963
+ error: {
10964
+ /** @format int32 */
10965
+ code: 400;
10966
+ message: string;
10967
+ };
10968
+ } | {
10969
+ error: {
10970
+ /** @format int32 */
10971
+ code: 404;
10972
+ message: string;
10973
+ };
10974
+ }>>;
11164
10975
  /**
11165
10976
  * No description
11166
10977
  *
@@ -11428,6 +11239,171 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11428
11239
  message: string;
11429
11240
  };
11430
11241
  }>>;
11242
+ /**
11243
+ * No description
11244
+ *
11245
+ * @tags openapi
11246
+ * @name ListOpenApiSpecs
11247
+ * @summary List all the OpenAPI specifications in the organization
11248
+ * @request GET:/orgs/{organizationId}/openapi
11249
+ * @secure
11250
+ */
11251
+ listOpenApiSpecs: (organizationId: string, query?: {
11252
+ /** Identifier of the page results to fetch. */
11253
+ page?: string;
11254
+ /**
11255
+ * The number of results per page
11256
+ * @min 0
11257
+ * @max 1000
11258
+ */
11259
+ limit?: number;
11260
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
11261
+ items: OpenAPISpec[];
11262
+ }, Error>>;
11263
+ /**
11264
+ * No description
11265
+ *
11266
+ * @tags openapi
11267
+ * @name GetOpenApiSpecBySlug
11268
+ * @summary Get an organization OpenAPI specification by its slug
11269
+ * @request GET:/orgs/{organizationId}/openapi/{specSlug}
11270
+ * @secure
11271
+ */
11272
+ getOpenApiSpecBySlug: (organizationId: string, specSlug: string, params?: RequestParams) => Promise<HttpResponse<OpenAPISpec, Error | {
11273
+ error: {
11274
+ /** @format int32 */
11275
+ code: 404;
11276
+ message: string;
11277
+ };
11278
+ }>>;
11279
+ /**
11280
+ * No description
11281
+ *
11282
+ * @tags openapi
11283
+ * @name CreateOrUpdateOpenApiSpecBySlug
11284
+ * @summary Create or update an organization OpenAPI specification by its slug
11285
+ * @request PUT:/orgs/{organizationId}/openapi/{specSlug}
11286
+ * @secure
11287
+ */
11288
+ createOrUpdateOpenApiSpecBySlug: (organizationId: string, specSlug: string, data: {
11289
+ /** Create a specification from an URL */
11290
+ source: {
11291
+ url: URL;
11292
+ } | {
11293
+ /**
11294
+ * OpenAPI specification as text
11295
+ * @minLength 1
11296
+ */
11297
+ text: string;
11298
+ };
11299
+ }, params?: RequestParams) => Promise<HttpResponse<OpenAPISpec, Error | {
11300
+ error: {
11301
+ /** @format int32 */
11302
+ code: 400;
11303
+ message: string;
11304
+ };
11305
+ }>>;
11306
+ /**
11307
+ * No description
11308
+ *
11309
+ * @tags openapi
11310
+ * @name DeleteOpenApiSpecBySlug
11311
+ * @summary Delete an organization OpenAPI specification by its slug
11312
+ * @request DELETE:/orgs/{organizationId}/openapi/{specSlug}
11313
+ * @secure
11314
+ */
11315
+ deleteOpenApiSpecBySlug: (organizationId: string, specSlug: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
11316
+ /**
11317
+ * No description
11318
+ *
11319
+ * @tags openapi
11320
+ * @name ListOpenApiSpecVersions
11321
+ * @summary List all the OpenAPI specification versions
11322
+ * @request GET:/orgs/{organizationId}/openapi/{specSlug}/versions
11323
+ * @secure
11324
+ */
11325
+ listOpenApiSpecVersions: (organizationId: string, specSlug: string, query?: {
11326
+ /** Identifier of the page results to fetch. */
11327
+ page?: string;
11328
+ /**
11329
+ * The number of results per page
11330
+ * @min 0
11331
+ * @max 1000
11332
+ */
11333
+ limit?: number;
11334
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
11335
+ items: OpenAPISpecVersion[];
11336
+ }, Error | {
11337
+ error: {
11338
+ /** @format int32 */
11339
+ code: 404;
11340
+ message: string;
11341
+ };
11342
+ }>>;
11343
+ /**
11344
+ * No description
11345
+ *
11346
+ * @tags openapi
11347
+ * @name GetLatestOpenApiSpecVersion
11348
+ * @summary Get the latest OpenAPI specification version
11349
+ * @request GET:/orgs/{organizationId}/openapi/{specSlug}/versions/latest
11350
+ * @secure
11351
+ */
11352
+ getLatestOpenApiSpecVersion: (organizationId: string, specSlug: string, params?: RequestParams) => Promise<HttpResponse<OpenAPISpecVersion, Error | {
11353
+ error: {
11354
+ /** @format int32 */
11355
+ code: 404;
11356
+ message: string;
11357
+ };
11358
+ }>>;
11359
+ /**
11360
+ * No description
11361
+ *
11362
+ * @tags openapi
11363
+ * @name GetLatestOpenApiSpecVersionContent
11364
+ * @summary Get the latest OpenAPI specification version content
11365
+ * @request GET:/orgs/{organizationId}/openapi/{specSlug}/versions/latest/content
11366
+ * @secure
11367
+ */
11368
+ getLatestOpenApiSpecVersionContent: (organizationId: string, specSlug: string, params?: RequestParams) => Promise<HttpResponse<object, Error | {
11369
+ error: {
11370
+ /** @format int32 */
11371
+ code: 404;
11372
+ message: string;
11373
+ };
11374
+ }>>;
11375
+ /**
11376
+ * No description
11377
+ *
11378
+ * @tags openapi
11379
+ * @name GetOpenApiSpecVersionById
11380
+ * @summary Get an OpenAPI specification version by its ID
11381
+ * @request GET:/orgs/{organizationId}/openapi/{specSlug}/versions/{versionId}
11382
+ * @secure
11383
+ */
11384
+ getOpenApiSpecVersionById: (organizationId: string, specSlug: string, versionId: string, params?: RequestParams) => Promise<HttpResponse<OpenAPISpecVersion, Error | {
11385
+ error: {
11386
+ /** @format int32 */
11387
+ code: 404;
11388
+ message: string;
11389
+ };
11390
+ }>>;
11391
+ /**
11392
+ * No description
11393
+ *
11394
+ * @tags openapi
11395
+ * @name GetOpenApiSpecVersionContentById
11396
+ * @summary Get an OpenAPI specification version content by its ID
11397
+ * @request GET:/orgs/{organizationId}/openapi/{specSlug}/versions/{versionId}/content
11398
+ * @secure
11399
+ */
11400
+ getOpenApiSpecVersionContentById: (organizationId: string, specSlug: string, versionId: string, params?: RequestParams) => Promise<HttpResponse<object, Error | {
11401
+ error: {
11402
+ /** @format int32 */
11403
+ code: 404;
11404
+ message: string;
11405
+ };
11406
+ }>>;
11431
11407
  };
11432
11408
  customHostnames: {
11433
11409
  /**