@gitbook/api 0.64.1 → 0.65.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 +289 -25
- package/dist/index.cjs +12 -1
- package/dist/index.js +12 -1
- package/package.json +1 -1
- package/spec/openapi.json +767 -61
- package/spec/openapi.yaml +429 -29
package/dist/client.d.ts
CHANGED
|
@@ -441,7 +441,7 @@ export interface DocumentBlockImage {
|
|
|
441
441
|
alt?: string;
|
|
442
442
|
};
|
|
443
443
|
fragments: (DocumentFragment & {
|
|
444
|
-
|
|
444
|
+
fragment: 'caption';
|
|
445
445
|
nodes: DocumentBlockParagraph[];
|
|
446
446
|
})[];
|
|
447
447
|
isVoid: true;
|
|
@@ -455,7 +455,7 @@ export interface DocumentBlockImages {
|
|
|
455
455
|
fullWidth?: boolean;
|
|
456
456
|
};
|
|
457
457
|
nodes: DocumentBlockImage[];
|
|
458
|
-
isVoid:
|
|
458
|
+
isVoid: false;
|
|
459
459
|
}
|
|
460
460
|
export interface DocumentBlockFile {
|
|
461
461
|
object: 'block';
|
|
@@ -520,14 +520,18 @@ export interface DocumentBlockContentRef {
|
|
|
520
520
|
};
|
|
521
521
|
isVoid: true;
|
|
522
522
|
}
|
|
523
|
+
export type PlainObject = any;
|
|
523
524
|
/** Action to open an overlay modal defined by "componentId". */
|
|
524
525
|
export type ContentKitDefaultAction = {
|
|
525
526
|
action: '@ui.modal.open';
|
|
526
527
|
componentId: string;
|
|
527
|
-
props:
|
|
528
|
+
props: PlainObject;
|
|
528
529
|
} | {
|
|
529
530
|
action: '@ui.modal.close';
|
|
530
|
-
returnValue:
|
|
531
|
+
returnValue: PlainObject;
|
|
532
|
+
} | {
|
|
533
|
+
action: '@ui.submit';
|
|
534
|
+
returnValue: PlainObject;
|
|
531
535
|
} | {
|
|
532
536
|
action: '@ui.url.open';
|
|
533
537
|
url: string;
|
|
@@ -536,7 +540,7 @@ export type ContentKitDefaultAction = {
|
|
|
536
540
|
url: string;
|
|
537
541
|
} | {
|
|
538
542
|
action: '@editor.node.updateProps';
|
|
539
|
-
props:
|
|
543
|
+
props: PlainObject;
|
|
540
544
|
};
|
|
541
545
|
/** Custom action to re-render the block. */
|
|
542
546
|
export type ContentKitAction = {
|
|
@@ -553,7 +557,7 @@ export interface DocumentBlockIntegration {
|
|
|
553
557
|
/** ID of the block in the integration */
|
|
554
558
|
block: string;
|
|
555
559
|
/** Properties passed to the block during rendering */
|
|
556
|
-
props:
|
|
560
|
+
props: PlainObject;
|
|
557
561
|
/** Custom action to re-render the block. */
|
|
558
562
|
action?: ContentKitAction;
|
|
559
563
|
/**
|
|
@@ -1037,7 +1041,7 @@ export interface RevisionPageBase {
|
|
|
1037
1041
|
id: string;
|
|
1038
1042
|
/**
|
|
1039
1043
|
* Title of the page
|
|
1040
|
-
* @
|
|
1044
|
+
* @minLength 1
|
|
1041
1045
|
*/
|
|
1042
1046
|
title: string;
|
|
1043
1047
|
/** Emoji of the page, if one has been set. */
|
|
@@ -1064,7 +1068,7 @@ export type RevisionPageDocument = RevisionPageBase & Document & {
|
|
|
1064
1068
|
description?: string;
|
|
1065
1069
|
/** ID of the document with the page body. If undefined, the page is empty. */
|
|
1066
1070
|
documentId?: string;
|
|
1067
|
-
pages: (RevisionPageDocument | RevisionPageLink)[];
|
|
1071
|
+
pages: (RevisionPageDocument | RevisionPageLink | RevisionPageComputed)[];
|
|
1068
1072
|
git?: GitSyncBlob;
|
|
1069
1073
|
layout: RevisionPageLayoutOptions;
|
|
1070
1074
|
cover?: RevisionPageDocumentCover;
|
|
@@ -1083,6 +1087,8 @@ export type RevisionPageDocument = RevisionPageBase & Document & {
|
|
|
1083
1087
|
* @default false
|
|
1084
1088
|
*/
|
|
1085
1089
|
noRobotsIndex?: boolean;
|
|
1090
|
+
/** Defined when the page was generated by a computed content. */
|
|
1091
|
+
computed?: ComputedContentSource;
|
|
1086
1092
|
};
|
|
1087
1093
|
export type RevisionPageLink = RevisionPageBase & {
|
|
1088
1094
|
/** @deprecated */
|
|
@@ -1097,6 +1103,23 @@ export type RevisionPageLink = RevisionPageBase & {
|
|
|
1097
1103
|
*/
|
|
1098
1104
|
hidden?: boolean;
|
|
1099
1105
|
};
|
|
1106
|
+
export type ComputedContentDependency = ContentRefSpace;
|
|
1107
|
+
/** Parameters for a computed content */
|
|
1108
|
+
export interface ComputedContentSource {
|
|
1109
|
+
/** Name of the integration */
|
|
1110
|
+
integration: string;
|
|
1111
|
+
/** Identifier of the source used for computation */
|
|
1112
|
+
source: string;
|
|
1113
|
+
/** Properties to be passed to the computation */
|
|
1114
|
+
props: PlainObject;
|
|
1115
|
+
/** Dependencies the computation depend on. When the dependency's targets are updated, the computation will be updated. */
|
|
1116
|
+
dependsOn?: ComputedContentDependency[];
|
|
1117
|
+
}
|
|
1118
|
+
export type RevisionPageComputed = RevisionPageBase & {
|
|
1119
|
+
type: 'computed';
|
|
1120
|
+
/** Parameters for a computed content */
|
|
1121
|
+
computed: ComputedContentSource;
|
|
1122
|
+
};
|
|
1100
1123
|
export interface GitSyncBlob {
|
|
1101
1124
|
/** SHA for the blob */
|
|
1102
1125
|
oid: string;
|
|
@@ -1253,9 +1276,9 @@ export type RevisionPageGroup = RevisionPageBase & {
|
|
|
1253
1276
|
* @default false
|
|
1254
1277
|
*/
|
|
1255
1278
|
noRobotsIndex?: boolean;
|
|
1256
|
-
pages: (RevisionPageDocument | RevisionPageLink)[];
|
|
1279
|
+
pages: (RevisionPageDocument | RevisionPageLink | RevisionPageComputed)[];
|
|
1257
1280
|
};
|
|
1258
|
-
export type RevisionPage = RevisionPageDocument | RevisionPageGroup | RevisionPageLink;
|
|
1281
|
+
export type RevisionPage = RevisionPageDocument | RevisionPageGroup | RevisionPageLink | RevisionPageComputed;
|
|
1259
1282
|
export interface RevisionFile {
|
|
1260
1283
|
id: string;
|
|
1261
1284
|
name: string;
|
|
@@ -1370,7 +1393,11 @@ export type RevisionTypeUpdate = RevisionBase & {
|
|
|
1370
1393
|
/** Revision created when updating a change request with changes from primary. */
|
|
1371
1394
|
type: 'update';
|
|
1372
1395
|
};
|
|
1373
|
-
export type
|
|
1396
|
+
export type RevisionTypeComputed = RevisionBase & {
|
|
1397
|
+
/** Virtual revision, computed from a source revision */
|
|
1398
|
+
type: 'computed';
|
|
1399
|
+
};
|
|
1400
|
+
export type Revision = RevisionTypeEdits | RevisionTypeMerge | RevisionTypeRollback | RevisionTypeUpdate | RevisionTypeComputed;
|
|
1374
1401
|
export declare enum ImportContentSource {
|
|
1375
1402
|
Website = "website",
|
|
1376
1403
|
Docx = "docx",
|
|
@@ -1644,6 +1671,32 @@ export declare enum IntegrationCategory {
|
|
|
1644
1671
|
export type IntegrationCategories = IntegrationCategory[];
|
|
1645
1672
|
/** Custom blocks defined by this integration. */
|
|
1646
1673
|
export type IntegrationBlocks = IntegrationBlock[];
|
|
1674
|
+
/** ContentKit component for configuration */
|
|
1675
|
+
export interface IntegrationConfigurationComponent {
|
|
1676
|
+
/** ID of the ContentKit component defined in the integration */
|
|
1677
|
+
componentId: string;
|
|
1678
|
+
}
|
|
1679
|
+
/** Definition of a content source provided by the integration. */
|
|
1680
|
+
export interface IntegrationContentSource {
|
|
1681
|
+
/** Unique ID in the integration for the source. */
|
|
1682
|
+
id: string;
|
|
1683
|
+
/**
|
|
1684
|
+
* Short descriptive title for the source.
|
|
1685
|
+
* @minLength 2
|
|
1686
|
+
* @maxLength 40
|
|
1687
|
+
*/
|
|
1688
|
+
title: string;
|
|
1689
|
+
/**
|
|
1690
|
+
* Long descriptive text for the source.
|
|
1691
|
+
* @minLength 0
|
|
1692
|
+
* @maxLength 150
|
|
1693
|
+
*/
|
|
1694
|
+
description?: string;
|
|
1695
|
+
/** URL of the icon to represent this source. */
|
|
1696
|
+
icon?: string;
|
|
1697
|
+
/** ContentKit component for configuration */
|
|
1698
|
+
configuration?: IntegrationConfigurationComponent;
|
|
1699
|
+
}
|
|
1647
1700
|
/** Schema for a configuration */
|
|
1648
1701
|
export interface IntegrationConfigurationSchema {
|
|
1649
1702
|
properties: Record<string, {
|
|
@@ -1668,11 +1721,6 @@ export interface IntegrationConfigurationSchema {
|
|
|
1668
1721
|
/** @uniqueItems true */
|
|
1669
1722
|
required?: string[];
|
|
1670
1723
|
}
|
|
1671
|
-
/** ContentKit component for configuration */
|
|
1672
|
-
export interface IntegrationConfigurationComponent {
|
|
1673
|
-
/** ID of the ContentKit component defined in the integration */
|
|
1674
|
-
componentId: string;
|
|
1675
|
-
}
|
|
1676
1724
|
export type IntegrationConfiguration = IntegrationConfigurationSchema | IntegrationConfigurationComponent;
|
|
1677
1725
|
export interface IntegrationConfigurations {
|
|
1678
1726
|
account?: IntegrationConfiguration;
|
|
@@ -1751,6 +1799,7 @@ export interface Integration {
|
|
|
1751
1799
|
categories: IntegrationCategories;
|
|
1752
1800
|
/** Custom blocks defined by this integration. */
|
|
1753
1801
|
blocks?: IntegrationBlocks;
|
|
1802
|
+
contentSources?: IntegrationContentSource[];
|
|
1754
1803
|
configurations?: IntegrationConfigurations;
|
|
1755
1804
|
/** External urls configured by the developer of the integration */
|
|
1756
1805
|
externalLinks: IntegrationExternalLinks;
|
|
@@ -2085,7 +2134,8 @@ export interface UserContributor {
|
|
|
2085
2134
|
export declare enum RevisionPageType {
|
|
2086
2135
|
Document = "document",
|
|
2087
2136
|
Group = "group",
|
|
2088
|
-
Link = "link"
|
|
2137
|
+
Link = "link",
|
|
2138
|
+
Computed = "computed"
|
|
2089
2139
|
}
|
|
2090
2140
|
export interface ChangedRevisionPage {
|
|
2091
2141
|
id: string;
|
|
@@ -2528,6 +2578,7 @@ export interface PublishIntegration {
|
|
|
2528
2578
|
categories?: IntegrationCategories;
|
|
2529
2579
|
/** Custom blocks defined by this integration. */
|
|
2530
2580
|
blocks?: IntegrationBlocks;
|
|
2581
|
+
contentSources?: IntegrationContentSource[];
|
|
2531
2582
|
/** External urls configured by the developer of the integration */
|
|
2532
2583
|
externalLinks?: IntegrationExternalLinks;
|
|
2533
2584
|
configurations?: IntegrationConfigurations;
|
|
@@ -2825,6 +2876,12 @@ export type ContentKitContextConfigurationSite = ContentKitContextBase & {
|
|
|
2825
2876
|
/** ID of the site the site-installation configuration is in. */
|
|
2826
2877
|
siteId: string;
|
|
2827
2878
|
};
|
|
2879
|
+
/** Context while rendering the configuration flow of a content source. */
|
|
2880
|
+
export type ContentKitContextConfigurationContentSource = ContentKitContextBase & {
|
|
2881
|
+
type: 'configuration_contentsource';
|
|
2882
|
+
/** ID of the organization the content source installation configuration is in. */
|
|
2883
|
+
organizationId: string;
|
|
2884
|
+
};
|
|
2828
2885
|
/** Context while rendering in a document. */
|
|
2829
2886
|
export type ContentKitContextDocument = ContentKitContextBase & {
|
|
2830
2887
|
type: 'document';
|
|
@@ -2833,7 +2890,7 @@ export type ContentKitContextDocument = ContentKitContextBase & {
|
|
|
2833
2890
|
editable: boolean;
|
|
2834
2891
|
};
|
|
2835
2892
|
/** Object representing the context in which a ContentKit component is rendered. */
|
|
2836
|
-
export type ContentKitContext = ContentKitContextConfigurationAccount | ContentKitContextConfigurationSpace | ContentKitContextConfigurationSite | ContentKitContextDocument;
|
|
2893
|
+
export type ContentKitContext = ContentKitContextConfigurationAccount | ContentKitContextConfigurationSpace | ContentKitContextConfigurationSite | ContentKitContextConfigurationContentSource | ContentKitContextDocument;
|
|
2837
2894
|
/** Event generated when rendering a UI */
|
|
2838
2895
|
export type UIRenderEvent = (SpaceEvent | SiteEvent | InstallationEvent) & {
|
|
2839
2896
|
auth?: {
|
|
@@ -2850,8 +2907,28 @@ export type UIRenderEvent = (SpaceEvent | SiteEvent | InstallationEvent) & {
|
|
|
2850
2907
|
context: ContentKitContext;
|
|
2851
2908
|
action?: object;
|
|
2852
2909
|
};
|
|
2910
|
+
/** Generic event when computing the content of a space */
|
|
2911
|
+
export type ContentComputeEvent = SpaceEvent & {
|
|
2912
|
+
sourceId: string;
|
|
2913
|
+
/** Properties passed to the rendering. */
|
|
2914
|
+
props: PlainObject;
|
|
2915
|
+
};
|
|
2916
|
+
/**
|
|
2917
|
+
* Event generated when computing the document of a pages.
|
|
2918
|
+
* The integration should respond with a `Document`.
|
|
2919
|
+
*/
|
|
2920
|
+
export type ContentComputeDocumentEvent = ContentComputeEvent & {
|
|
2921
|
+
type: 'content_compute_document';
|
|
2922
|
+
};
|
|
2923
|
+
/**
|
|
2924
|
+
* Event generated when computing revision in a content.
|
|
2925
|
+
* The integration should respond with an array of pages and files.
|
|
2926
|
+
*/
|
|
2927
|
+
export type ContentComputeRevisionEvent = ContentComputeEvent & {
|
|
2928
|
+
type: 'content_compute_revision';
|
|
2929
|
+
};
|
|
2853
2930
|
/** Any event that can be received from GitBook. */
|
|
2854
|
-
export type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent | SiteInstallationSetupEvent | SiteInstallationDeletedEvent | SpaceViewEvent | SiteViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | FetchEvent | FetchPublishedScriptEvent | FetchVisitorAuthenticationEvent | UIRenderEvent;
|
|
2931
|
+
export type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent | SiteInstallationSetupEvent | SiteInstallationDeletedEvent | SpaceViewEvent | SiteViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | FetchEvent | FetchPublishedScriptEvent | FetchVisitorAuthenticationEvent | UIRenderEvent | ContentComputeDocumentEvent | ContentComputeRevisionEvent;
|
|
2855
2932
|
export interface IntegrationEvent {
|
|
2856
2933
|
/** Unique ID of the event. */
|
|
2857
2934
|
id: string;
|
|
@@ -3226,13 +3303,13 @@ export interface ContentKitRenderOutput {
|
|
|
3226
3303
|
/** Element used as root */
|
|
3227
3304
|
element: ContentKitRootElement;
|
|
3228
3305
|
state: object;
|
|
3229
|
-
props:
|
|
3306
|
+
props: PlainObject;
|
|
3230
3307
|
}
|
|
3231
3308
|
export interface RenderIntegrationUI {
|
|
3232
3309
|
/** ID of the component to render in the integration. */
|
|
3233
3310
|
componentId: string;
|
|
3234
3311
|
/** Current properties of the UI. */
|
|
3235
|
-
props:
|
|
3312
|
+
props: PlainObject;
|
|
3236
3313
|
/** Current local state of the UI. */
|
|
3237
3314
|
state?: object;
|
|
3238
3315
|
/** Object representing the context in which a ContentKit component is rendered. */
|
|
@@ -3887,6 +3964,12 @@ export type BillingOperationPreviewResponse = {
|
|
|
3887
3964
|
plan: BillingProduct;
|
|
3888
3965
|
invoice?: BillingInvoicePreview;
|
|
3889
3966
|
};
|
|
3967
|
+
/**
|
|
3968
|
+
* Title of the site section
|
|
3969
|
+
* @minLength 2
|
|
3970
|
+
* @maxLength 128
|
|
3971
|
+
*/
|
|
3972
|
+
export type SiteSectionTitle = string;
|
|
3890
3973
|
/**
|
|
3891
3974
|
* Path to the section on the site
|
|
3892
3975
|
* @minLength 1
|
|
@@ -3929,7 +4012,7 @@ export interface SiteSection {
|
|
|
3929
4012
|
/** Unique identifier of the site section */
|
|
3930
4013
|
id: string;
|
|
3931
4014
|
/** Title of the site section */
|
|
3932
|
-
title:
|
|
4015
|
+
title: SiteSectionTitle;
|
|
3933
4016
|
/** Whether this is the default section for the site */
|
|
3934
4017
|
default?: boolean;
|
|
3935
4018
|
/** Path to the section on the site */
|
|
@@ -4383,6 +4466,64 @@ export interface ContentPublishingAuth {
|
|
|
4383
4466
|
fallbackURL?: string;
|
|
4384
4467
|
}
|
|
4385
4468
|
export type DocumentBlock = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockListItem | DocumentBlockDivider | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockImage | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockCodeLine | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTabsItem | DocumentBlockTable | DocumentBlockSwagger | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockSyncedBlock;
|
|
4469
|
+
export type InputPageBase = {
|
|
4470
|
+
/**
|
|
4471
|
+
* Optional unique identifier for the page.
|
|
4472
|
+
* It can be used to reference pages in document links.
|
|
4473
|
+
*/
|
|
4474
|
+
id?: string;
|
|
4475
|
+
/** @minLength 1 */
|
|
4476
|
+
title: string;
|
|
4477
|
+
} & ({
|
|
4478
|
+
/** Emoji of the page. */
|
|
4479
|
+
emoji: Emoji;
|
|
4480
|
+
} | {
|
|
4481
|
+
/** Icon of the page. */
|
|
4482
|
+
icon?: Icon;
|
|
4483
|
+
});
|
|
4484
|
+
export type InputPageDocument = InputPageBase & {
|
|
4485
|
+
type: 'document';
|
|
4486
|
+
/**
|
|
4487
|
+
* @minLength 0
|
|
4488
|
+
* @maxLength 300
|
|
4489
|
+
*/
|
|
4490
|
+
description?: string;
|
|
4491
|
+
/** Page's slug in its direct parent */
|
|
4492
|
+
slug?: string;
|
|
4493
|
+
pages?: (InputPageDocument | InputPageLink | InputPageComputed)[];
|
|
4494
|
+
/** Parameters for a computed content */
|
|
4495
|
+
computed?: ComputedContentSource;
|
|
4496
|
+
};
|
|
4497
|
+
export type InputPageLink = InputPageBase & {
|
|
4498
|
+
type: 'link';
|
|
4499
|
+
/** A relative reference to content in GitBook. */
|
|
4500
|
+
target: ContentRef;
|
|
4501
|
+
};
|
|
4502
|
+
export type InputPageComputed = InputPageBase & {
|
|
4503
|
+
type: 'computed';
|
|
4504
|
+
/** Parameters for a computed content */
|
|
4505
|
+
computed: ComputedContentSource;
|
|
4506
|
+
};
|
|
4507
|
+
export type InputPageGroup = InputPageBase & {
|
|
4508
|
+
type: 'group';
|
|
4509
|
+
/** Page's slug in its direct parent */
|
|
4510
|
+
slug?: string;
|
|
4511
|
+
/** @minLength 1 */
|
|
4512
|
+
pages: (InputPageDocument | InputPageLink | InputPageComputed)[];
|
|
4513
|
+
};
|
|
4514
|
+
export type InputPage = InputPageDocument | InputPageLink | InputPageComputed | InputPageGroup;
|
|
4515
|
+
export interface InputFile {
|
|
4516
|
+
id?: string;
|
|
4517
|
+
name: string;
|
|
4518
|
+
contentType: string;
|
|
4519
|
+
downloadURL: string;
|
|
4520
|
+
size: number;
|
|
4521
|
+
/** For images, it contains the dimensions of it. */
|
|
4522
|
+
dimensions?: {
|
|
4523
|
+
width: number;
|
|
4524
|
+
height: number;
|
|
4525
|
+
};
|
|
4526
|
+
}
|
|
4386
4527
|
/** The type of semantic change. */
|
|
4387
4528
|
export declare enum RevisionSemanticChangeType {
|
|
4388
4529
|
PageCreated = "page_created",
|
|
@@ -4440,6 +4581,15 @@ export interface IntegrationEnvironment {
|
|
|
4440
4581
|
installation?: string;
|
|
4441
4582
|
};
|
|
4442
4583
|
}
|
|
4584
|
+
/** Response expected for an event of type `content_compute_document`. */
|
|
4585
|
+
export interface ContentComputeDocumentEventResponse {
|
|
4586
|
+
document: Document;
|
|
4587
|
+
}
|
|
4588
|
+
/** Response expected for an event of type `content_compute_pages`. */
|
|
4589
|
+
export interface ContentComputeRevisionEventResponse {
|
|
4590
|
+
pages?: InputPage[];
|
|
4591
|
+
files?: InputFile[];
|
|
4592
|
+
}
|
|
4443
4593
|
export declare enum BillingTrialStatus {
|
|
4444
4594
|
Notapplicable = "notapplicable",
|
|
4445
4595
|
None = "none",
|
|
@@ -5353,6 +5503,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5353
5503
|
* @default true
|
|
5354
5504
|
*/
|
|
5355
5505
|
metadata?: boolean;
|
|
5506
|
+
/**
|
|
5507
|
+
* If `false` is passed, content will not be computed
|
|
5508
|
+
* @default true
|
|
5509
|
+
*/
|
|
5510
|
+
computed?: boolean;
|
|
5356
5511
|
}, params?: RequestParams) => Promise<HttpResponse<Revision, Error>>;
|
|
5357
5512
|
/**
|
|
5358
5513
|
* No description
|
|
@@ -5377,6 +5532,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5377
5532
|
* @default true
|
|
5378
5533
|
*/
|
|
5379
5534
|
metadata?: boolean;
|
|
5535
|
+
/**
|
|
5536
|
+
* If `false` is passed, content will not be computed
|
|
5537
|
+
* @default true
|
|
5538
|
+
*/
|
|
5539
|
+
computed?: boolean;
|
|
5380
5540
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
5381
5541
|
pages: RevisionPage[];
|
|
5382
5542
|
}, Error>>;
|
|
@@ -5402,6 +5562,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5402
5562
|
* @default true
|
|
5403
5563
|
*/
|
|
5404
5564
|
metadata?: boolean;
|
|
5565
|
+
/**
|
|
5566
|
+
* If `false` is passed, content will not be computed
|
|
5567
|
+
* @default true
|
|
5568
|
+
*/
|
|
5569
|
+
computed?: boolean;
|
|
5405
5570
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
5406
5571
|
items: RevisionFile[];
|
|
5407
5572
|
}, Error>>;
|
|
@@ -5419,6 +5584,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5419
5584
|
* @default true
|
|
5420
5585
|
*/
|
|
5421
5586
|
metadata?: boolean;
|
|
5587
|
+
/**
|
|
5588
|
+
* If `false` is passed, content will not be computed
|
|
5589
|
+
* @default true
|
|
5590
|
+
*/
|
|
5591
|
+
computed?: boolean;
|
|
5422
5592
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionFile, Error>>;
|
|
5423
5593
|
/**
|
|
5424
5594
|
* No description
|
|
@@ -5457,6 +5627,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5457
5627
|
* @default true
|
|
5458
5628
|
*/
|
|
5459
5629
|
metadata?: boolean;
|
|
5630
|
+
/**
|
|
5631
|
+
* If `false` is passed, content will not be computed
|
|
5632
|
+
* @default true
|
|
5633
|
+
*/
|
|
5634
|
+
computed?: boolean;
|
|
5460
5635
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionPage, Error>>;
|
|
5461
5636
|
/**
|
|
5462
5637
|
* No description
|
|
@@ -5533,7 +5708,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5533
5708
|
* @default true
|
|
5534
5709
|
*/
|
|
5535
5710
|
metadata?: boolean;
|
|
5711
|
+
/**
|
|
5712
|
+
* If `false` is passed, content will not be computed
|
|
5713
|
+
* @default true
|
|
5714
|
+
*/
|
|
5715
|
+
computed?: boolean;
|
|
5536
5716
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionPageDocument | RevisionPageGroup, Error>>;
|
|
5717
|
+
/**
|
|
5718
|
+
* No description
|
|
5719
|
+
*
|
|
5720
|
+
* @name ComputePageDocument
|
|
5721
|
+
* @summary Get the document for a page in a computed content.
|
|
5722
|
+
* @request POST:/spaces/{spaceId}/content/computed/document
|
|
5723
|
+
* @secure
|
|
5724
|
+
*/
|
|
5725
|
+
computePageDocument: (spaceId: string, data: {
|
|
5726
|
+
/** Parameters for a computed content */
|
|
5727
|
+
source: ComputedContentSource;
|
|
5728
|
+
}, query?: {
|
|
5729
|
+
/** Output format for the content. */
|
|
5730
|
+
format?: "document" | "markdown";
|
|
5731
|
+
}, params?: RequestParams) => Promise<HttpResponse<Document, Error>>;
|
|
5537
5732
|
/**
|
|
5538
5733
|
* No description
|
|
5539
5734
|
*
|
|
@@ -5938,6 +6133,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5938
6133
|
* @default true
|
|
5939
6134
|
*/
|
|
5940
6135
|
metadata?: boolean;
|
|
6136
|
+
/**
|
|
6137
|
+
* If `false` is passed, content will not be computed
|
|
6138
|
+
* @default true
|
|
6139
|
+
*/
|
|
6140
|
+
computed?: boolean;
|
|
5941
6141
|
}, params?: RequestParams) => Promise<HttpResponse<Revision, Error>>;
|
|
5942
6142
|
/**
|
|
5943
6143
|
* No description
|
|
@@ -5962,6 +6162,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5962
6162
|
* @default true
|
|
5963
6163
|
*/
|
|
5964
6164
|
metadata?: boolean;
|
|
6165
|
+
/**
|
|
6166
|
+
* If `false` is passed, content will not be computed
|
|
6167
|
+
* @default true
|
|
6168
|
+
*/
|
|
6169
|
+
computed?: boolean;
|
|
5965
6170
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
5966
6171
|
pages: RevisionPage[];
|
|
5967
6172
|
}, Error>>;
|
|
@@ -5987,6 +6192,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5987
6192
|
* @default true
|
|
5988
6193
|
*/
|
|
5989
6194
|
metadata?: boolean;
|
|
6195
|
+
/**
|
|
6196
|
+
* If `false` is passed, content will not be computed
|
|
6197
|
+
* @default true
|
|
6198
|
+
*/
|
|
6199
|
+
computed?: boolean;
|
|
5990
6200
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
5991
6201
|
items: RevisionFile[];
|
|
5992
6202
|
}, Error>>;
|
|
@@ -6004,6 +6214,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6004
6214
|
* @default true
|
|
6005
6215
|
*/
|
|
6006
6216
|
metadata?: boolean;
|
|
6217
|
+
/**
|
|
6218
|
+
* If `false` is passed, content will not be computed
|
|
6219
|
+
* @default true
|
|
6220
|
+
*/
|
|
6221
|
+
computed?: boolean;
|
|
6007
6222
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionFile, Error>>;
|
|
6008
6223
|
/**
|
|
6009
6224
|
* No description
|
|
@@ -6042,6 +6257,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6042
6257
|
* @default true
|
|
6043
6258
|
*/
|
|
6044
6259
|
metadata?: boolean;
|
|
6260
|
+
/**
|
|
6261
|
+
* If `false` is passed, content will not be computed
|
|
6262
|
+
* @default true
|
|
6263
|
+
*/
|
|
6264
|
+
computed?: boolean;
|
|
6045
6265
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionPage, Error>>;
|
|
6046
6266
|
/**
|
|
6047
6267
|
* No description
|
|
@@ -6111,6 +6331,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6111
6331
|
* @default true
|
|
6112
6332
|
*/
|
|
6113
6333
|
metadata?: boolean;
|
|
6334
|
+
/**
|
|
6335
|
+
* If `false` is passed, content will not be computed
|
|
6336
|
+
* @default true
|
|
6337
|
+
*/
|
|
6338
|
+
computed?: boolean;
|
|
6114
6339
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionPageDocument | RevisionPageGroup, Error>>;
|
|
6115
6340
|
/**
|
|
6116
6341
|
* No description
|
|
@@ -6161,6 +6386,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6161
6386
|
* @default true
|
|
6162
6387
|
*/
|
|
6163
6388
|
metadata?: boolean;
|
|
6389
|
+
/**
|
|
6390
|
+
* If `false` is passed, content will not be computed
|
|
6391
|
+
* @default true
|
|
6392
|
+
*/
|
|
6393
|
+
computed?: boolean;
|
|
6164
6394
|
}, params?: RequestParams) => Promise<HttpResponse<Revision, Error>>;
|
|
6165
6395
|
/**
|
|
6166
6396
|
* No description
|
|
@@ -6176,6 +6406,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6176
6406
|
* @default true
|
|
6177
6407
|
*/
|
|
6178
6408
|
metadata?: boolean;
|
|
6409
|
+
/**
|
|
6410
|
+
* If `false` is passed, content will not be computed
|
|
6411
|
+
* @default true
|
|
6412
|
+
*/
|
|
6413
|
+
computed?: boolean;
|
|
6179
6414
|
/**
|
|
6180
6415
|
* Limit the number of changes returned
|
|
6181
6416
|
* @default 10
|
|
@@ -6196,6 +6431,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6196
6431
|
* @default true
|
|
6197
6432
|
*/
|
|
6198
6433
|
metadata?: boolean;
|
|
6434
|
+
/**
|
|
6435
|
+
* If `false` is passed, content will not be computed
|
|
6436
|
+
* @default true
|
|
6437
|
+
*/
|
|
6438
|
+
computed?: boolean;
|
|
6199
6439
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
6200
6440
|
pages: RevisionPage[];
|
|
6201
6441
|
}, Error>>;
|
|
@@ -6221,6 +6461,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6221
6461
|
* @default true
|
|
6222
6462
|
*/
|
|
6223
6463
|
metadata?: boolean;
|
|
6464
|
+
/**
|
|
6465
|
+
* If `false` is passed, content will not be computed
|
|
6466
|
+
* @default true
|
|
6467
|
+
*/
|
|
6468
|
+
computed?: boolean;
|
|
6224
6469
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
6225
6470
|
items: RevisionFile[];
|
|
6226
6471
|
}, Error>>;
|
|
@@ -6238,6 +6483,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6238
6483
|
* @default true
|
|
6239
6484
|
*/
|
|
6240
6485
|
metadata?: boolean;
|
|
6486
|
+
/**
|
|
6487
|
+
* If `false` is passed, content will not be computed
|
|
6488
|
+
* @default true
|
|
6489
|
+
*/
|
|
6490
|
+
computed?: boolean;
|
|
6241
6491
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionFile, Error>>;
|
|
6242
6492
|
/**
|
|
6243
6493
|
* No description
|
|
@@ -6255,6 +6505,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6255
6505
|
* @default true
|
|
6256
6506
|
*/
|
|
6257
6507
|
metadata?: boolean;
|
|
6508
|
+
/**
|
|
6509
|
+
* If `false` is passed, content will not be computed
|
|
6510
|
+
* @default true
|
|
6511
|
+
*/
|
|
6512
|
+
computed?: boolean;
|
|
6258
6513
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionPage, Error>>;
|
|
6259
6514
|
/**
|
|
6260
6515
|
* No description
|
|
@@ -6272,6 +6527,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6272
6527
|
* @default true
|
|
6273
6528
|
*/
|
|
6274
6529
|
metadata?: boolean;
|
|
6530
|
+
/**
|
|
6531
|
+
* If `false` is passed, content will not be computed
|
|
6532
|
+
* @default true
|
|
6533
|
+
*/
|
|
6534
|
+
computed?: boolean;
|
|
6275
6535
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionPageDocument | RevisionPageGroup, Error>>;
|
|
6276
6536
|
/**
|
|
6277
6537
|
* No description
|
|
@@ -8556,8 +8816,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8556
8816
|
createSyncedBlock: (organizationId: string, data: {
|
|
8557
8817
|
/** Title of synced block */
|
|
8558
8818
|
title?: string;
|
|
8559
|
-
/** The content of the synced block. For now, only JSON documents are supported. */
|
|
8560
|
-
content: Document;
|
|
8561
8819
|
}, params?: RequestParams) => Promise<HttpResponse<SyncedBlock, Error>>;
|
|
8562
8820
|
/**
|
|
8563
8821
|
* No description
|
|
@@ -8808,8 +9066,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8808
9066
|
visibility?: SiteVisibility;
|
|
8809
9067
|
/** Basename for the site. For e.g. api */
|
|
8810
9068
|
basename?: SiteBasename;
|
|
8811
|
-
/** ID of the site-space to be used as the default */
|
|
9069
|
+
/** ID of the site-space to be used as the default at the root level. If site has sections, this will mark the default site space in the site's default section. */
|
|
8812
9070
|
defaultSiteSpace?: string;
|
|
9071
|
+
/** ID of the site-section to be used as the default. */
|
|
9072
|
+
defaultSiteSection?: string;
|
|
8813
9073
|
}, params?: RequestParams) => Promise<HttpResponse<Site, Error>>;
|
|
8814
9074
|
/**
|
|
8815
9075
|
* No description
|
|
@@ -9226,8 +9486,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9226
9486
|
* @secure
|
|
9227
9487
|
*/
|
|
9228
9488
|
updateSiteSectionById: (organizationId: string, siteId: string, siteSectionId: string, data: {
|
|
9489
|
+
/** Title of the site section */
|
|
9490
|
+
title?: SiteSectionTitle;
|
|
9229
9491
|
/** Path to the section on the site */
|
|
9230
9492
|
path?: SiteSectionPath;
|
|
9493
|
+
/** ID of the site-space to be used as the default in this section. */
|
|
9494
|
+
defaultSiteSpace?: string;
|
|
9231
9495
|
}, params?: RequestParams) => Promise<HttpResponse<SiteSection, Error>>;
|
|
9232
9496
|
/**
|
|
9233
9497
|
* No description
|
package/dist/index.cjs
CHANGED
|
@@ -241,7 +241,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
241
241
|
|
|
242
242
|
// package.json
|
|
243
243
|
var name = "@gitbook/api";
|
|
244
|
-
var version = "0.
|
|
244
|
+
var version = "0.65.0";
|
|
245
245
|
|
|
246
246
|
// src/client.ts
|
|
247
247
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -514,6 +514,7 @@ var RevisionPageType = /* @__PURE__ */ ((RevisionPageType2) => {
|
|
|
514
514
|
RevisionPageType2["Document"] = "document";
|
|
515
515
|
RevisionPageType2["Group"] = "group";
|
|
516
516
|
RevisionPageType2["Link"] = "link";
|
|
517
|
+
RevisionPageType2["Computed"] = "computed";
|
|
517
518
|
return RevisionPageType2;
|
|
518
519
|
})(RevisionPageType || {});
|
|
519
520
|
var RevisionPageLayoutPreset = /* @__PURE__ */ ((RevisionPageLayoutPreset2) => {
|
|
@@ -1305,6 +1306,16 @@ var Api = class extends HttpClient {
|
|
|
1305
1306
|
format: "json",
|
|
1306
1307
|
...params
|
|
1307
1308
|
}),
|
|
1309
|
+
computePageDocument: (spaceId, data, query, params = {}) => this.request({
|
|
1310
|
+
path: `/spaces/${spaceId}/content/computed/document`,
|
|
1311
|
+
method: "POST",
|
|
1312
|
+
query,
|
|
1313
|
+
body: data,
|
|
1314
|
+
secure: true,
|
|
1315
|
+
type: "application/json" /* Json */,
|
|
1316
|
+
format: "json",
|
|
1317
|
+
...params
|
|
1318
|
+
}),
|
|
1308
1319
|
getDocumentById: (spaceId, documentId, query, params = {}) => this.request({
|
|
1309
1320
|
path: `/spaces/${spaceId}/documents/${documentId}`,
|
|
1310
1321
|
method: "GET",
|