@gitbook/api 0.72.0 → 0.74.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 +28 -286
- package/dist/index.cjs +1 -86
- package/dist/index.js +1 -86
- package/package.json +1 -1
- package/spec/openapi.json +105 -1004
- package/spec/openapi.yaml +32 -571
package/dist/client.d.ts
CHANGED
|
@@ -145,16 +145,12 @@ export interface ContentRefSnippet {
|
|
|
145
145
|
snippet: string;
|
|
146
146
|
organization: string;
|
|
147
147
|
}
|
|
148
|
-
export interface ContentRefSyncedBlock {
|
|
149
|
-
kind: 'synced-block';
|
|
150
|
-
syncedBlock: string;
|
|
151
|
-
}
|
|
152
148
|
export interface ContentRefReusableContent {
|
|
153
149
|
kind: 'reusable-content';
|
|
154
150
|
reusableContent: string;
|
|
155
151
|
}
|
|
156
152
|
/** A relative reference to content in GitBook. */
|
|
157
|
-
export type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace | ContentRefSnippet |
|
|
153
|
+
export type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace | ContentRefSnippet | ContentRefReusableContent;
|
|
158
154
|
export interface DocumentInlineLink {
|
|
159
155
|
object: 'inline';
|
|
160
156
|
type: 'link';
|
|
@@ -616,19 +612,6 @@ export interface DocumentBlockSwagger {
|
|
|
616
612
|
id: string;
|
|
617
613
|
};
|
|
618
614
|
}
|
|
619
|
-
export interface DocumentBlockSyncedBlock {
|
|
620
|
-
object: 'block';
|
|
621
|
-
type: 'synced-block';
|
|
622
|
-
key?: string;
|
|
623
|
-
data: {
|
|
624
|
-
ref: ContentRefSyncedBlock;
|
|
625
|
-
};
|
|
626
|
-
meta?: {
|
|
627
|
-
/** API Token to use to fetch the synced block from the API. */
|
|
628
|
-
apiToken: string;
|
|
629
|
-
};
|
|
630
|
-
isVoid: true;
|
|
631
|
-
}
|
|
632
615
|
export interface DocumentBlockReusableContent {
|
|
633
616
|
object: 'block';
|
|
634
617
|
type: 'reusable-content';
|
|
@@ -656,7 +639,7 @@ export interface DocumentBlockStepper {
|
|
|
656
639
|
isVoid?: false;
|
|
657
640
|
data?: object;
|
|
658
641
|
}
|
|
659
|
-
export type DocumentBlocksTopLevels = DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTable | DocumentBlockSwagger | DocumentBlockContentRef | DocumentBlockIntegration |
|
|
642
|
+
export type DocumentBlocksTopLevels = DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTable | DocumentBlockSwagger | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper;
|
|
660
643
|
export interface JSONDocument {
|
|
661
644
|
object: 'document';
|
|
662
645
|
data: {
|
|
@@ -1037,30 +1020,6 @@ export interface ExportToGitRepository {
|
|
|
1037
1020
|
/** Optional metadata to store on the space about the Git provider */
|
|
1038
1021
|
gitInfo?: UpdateSpaceGitInfo;
|
|
1039
1022
|
}
|
|
1040
|
-
export interface SyncGitRepository {
|
|
1041
|
-
/** Git ref in the format "refs/heads/main" */
|
|
1042
|
-
ref: string;
|
|
1043
|
-
/** URL of the Git repository used for synchronization. It can contain basic auth credentials. */
|
|
1044
|
-
repoURL: string;
|
|
1045
|
-
/** URL to use as a prefix for external file references. */
|
|
1046
|
-
repoTreeURL: string;
|
|
1047
|
-
/** URL to use as a prefix for the commit URL. */
|
|
1048
|
-
repoCommitURL: string;
|
|
1049
|
-
/** Path to a root directory for the project in the repository. */
|
|
1050
|
-
repoProjectDirectory?: string;
|
|
1051
|
-
/** Template message for the commit generated during the synchronization. */
|
|
1052
|
-
commitMessageTemplate: string;
|
|
1053
|
-
/** If true, the synchronization of the ref will generate a revision without updating the space primary content. */
|
|
1054
|
-
standalone?: boolean;
|
|
1055
|
-
/** Whether to force the synchronization */
|
|
1056
|
-
force?: {
|
|
1057
|
-
priority: 'gitbook' | 'git';
|
|
1058
|
-
};
|
|
1059
|
-
/** The timestamp of the event. It ensures the synchronize operations are executed in the same order on GitBook and on the remote repository. */
|
|
1060
|
-
timestamp?: Timestamp;
|
|
1061
|
-
/** Optional metadata to store on the space about the Git provider */
|
|
1062
|
-
gitInfo?: UpdateSpaceGitInfo;
|
|
1063
|
-
}
|
|
1064
1023
|
/**
|
|
1065
1024
|
* Name of the icon
|
|
1066
1025
|
* @maxLength 50
|
|
@@ -1935,42 +1894,6 @@ export interface ContentLocationSnippet {
|
|
|
1935
1894
|
organization: Organization;
|
|
1936
1895
|
snippet: Snippet;
|
|
1937
1896
|
}
|
|
1938
|
-
export interface SyncedBlock {
|
|
1939
|
-
/** Unique identifier for the synced block */
|
|
1940
|
-
id: string;
|
|
1941
|
-
/** ID of the organization owning this synced block */
|
|
1942
|
-
organization: string;
|
|
1943
|
-
/** @format date-time */
|
|
1944
|
-
createdAt: string;
|
|
1945
|
-
createdBy: User;
|
|
1946
|
-
/**
|
|
1947
|
-
* Title describing the synced block.
|
|
1948
|
-
* @maxLength 100
|
|
1949
|
-
*/
|
|
1950
|
-
title?: string;
|
|
1951
|
-
/**
|
|
1952
|
-
* Description of the synced block.
|
|
1953
|
-
* @maxLength 500
|
|
1954
|
-
*/
|
|
1955
|
-
description?: string;
|
|
1956
|
-
/** Usage of synced block */
|
|
1957
|
-
usage: {
|
|
1958
|
-
/** Number of spaces where the synced block is used in */
|
|
1959
|
-
spaces: number;
|
|
1960
|
-
};
|
|
1961
|
-
/** URLs associated with the object */
|
|
1962
|
-
urls: {
|
|
1963
|
-
/** URL of the synced block in the API */
|
|
1964
|
-
location: URL;
|
|
1965
|
-
/** URL of the synced block in the app */
|
|
1966
|
-
app: URL;
|
|
1967
|
-
};
|
|
1968
|
-
}
|
|
1969
|
-
export interface ContentLocationSyncedBlock {
|
|
1970
|
-
kind: 'synced-block';
|
|
1971
|
-
organization: Organization;
|
|
1972
|
-
syncedBlock: SyncedBlock;
|
|
1973
|
-
}
|
|
1974
1897
|
export interface ContentLocationReusableContent {
|
|
1975
1898
|
kind: 'reusable-content';
|
|
1976
1899
|
organization: Organization;
|
|
@@ -1979,7 +1902,7 @@ export interface ContentLocationReusableContent {
|
|
|
1979
1902
|
reusableContent: RevisionReusableContent;
|
|
1980
1903
|
}
|
|
1981
1904
|
/** An absolute reference to content in GitBook. */
|
|
1982
|
-
export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationSnippet |
|
|
1905
|
+
export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationSnippet | ContentLocationReusableContent;
|
|
1983
1906
|
/**
|
|
1984
1907
|
* Text to display to represent the reference. Possible values include:
|
|
1985
1908
|
* - `ok` - No problems detected for this content reference.
|
|
@@ -2845,8 +2768,13 @@ export type SpaceViewEvent = SpaceEvent & {
|
|
|
2845
2768
|
/** Event received when a page has been visited on a site. */
|
|
2846
2769
|
export type SiteViewEvent = SiteEvent & {
|
|
2847
2770
|
type: 'site_view';
|
|
2848
|
-
/**
|
|
2771
|
+
/**
|
|
2772
|
+
* Unique identifier of the visited space in the site.
|
|
2773
|
+
* @deprecated
|
|
2774
|
+
*/
|
|
2849
2775
|
spaceId: string;
|
|
2776
|
+
/** The site-space that was viewed */
|
|
2777
|
+
siteSpaceId?: string;
|
|
2850
2778
|
/** Unique identifier of the visited page. */
|
|
2851
2779
|
pageId?: string;
|
|
2852
2780
|
/** Analytics info on the GitBook's content visitor. */
|
|
@@ -4296,6 +4224,8 @@ export interface SiteTrackPageView {
|
|
|
4296
4224
|
pageId?: string;
|
|
4297
4225
|
/** Unique identifier of the space. */
|
|
4298
4226
|
spaceId: string;
|
|
4227
|
+
/** The site-space that was viewed */
|
|
4228
|
+
siteSpaceId?: string;
|
|
4299
4229
|
/** Analytics info on the GitBook's content visitor. */
|
|
4300
4230
|
visitor: {
|
|
4301
4231
|
/** GitBook's unique identifier of the visitor. */
|
|
@@ -4323,6 +4253,19 @@ export interface SiteTrackPageView {
|
|
|
4323
4253
|
/** The URL of referrer that linked to the page. */
|
|
4324
4254
|
referrer: string;
|
|
4325
4255
|
}
|
|
4256
|
+
/** Page entry in the content insights. */
|
|
4257
|
+
export interface InsightsContentPage {
|
|
4258
|
+
/** Unique identifier for the page in the revision */
|
|
4259
|
+
id: string;
|
|
4260
|
+
/** Title of the page */
|
|
4261
|
+
title: string;
|
|
4262
|
+
/** Complete path to access the page in the revision. */
|
|
4263
|
+
path?: string;
|
|
4264
|
+
/** Emoji of the page, if one has been set. */
|
|
4265
|
+
emoji?: Emoji;
|
|
4266
|
+
/** Icon of the page, if one has been set. */
|
|
4267
|
+
icon?: Icon;
|
|
4268
|
+
}
|
|
4326
4269
|
export interface SiteAdsStats {
|
|
4327
4270
|
impressions: number;
|
|
4328
4271
|
clicks: number;
|
|
@@ -4599,7 +4542,7 @@ export interface ContentPublishingAuth {
|
|
|
4599
4542
|
*/
|
|
4600
4543
|
fallbackURL?: string;
|
|
4601
4544
|
}
|
|
4602
|
-
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 |
|
|
4545
|
+
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 | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockStepperStep;
|
|
4603
4546
|
export type InputPageBase = {
|
|
4604
4547
|
/**
|
|
4605
4548
|
* Optional unique identifier for the page.
|
|
@@ -4763,6 +4706,8 @@ export type SiteAPIToken = ContentAPIBaseToken & {
|
|
|
4763
4706
|
site: string;
|
|
4764
4707
|
/** ID of the site-space to be used when using this token for rendering published content. */
|
|
4765
4708
|
siteSpace: string;
|
|
4709
|
+
/** ID of the site-section to be used when using this token for rendering published content. Only defined for section sites. */
|
|
4710
|
+
siteSection?: string;
|
|
4766
4711
|
/** ID of the space to be used when using this token for rendering published content. */
|
|
4767
4712
|
space: string;
|
|
4768
4713
|
};
|
|
@@ -4915,16 +4860,6 @@ export interface OrganizationExperimentalFeaturesChannel {
|
|
|
4915
4860
|
channel: 'organization-experimental-features';
|
|
4916
4861
|
organization: string;
|
|
4917
4862
|
}
|
|
4918
|
-
/** Subscription channel for changes in synced blocks in an organization. */
|
|
4919
|
-
export interface OrganizationSyncedBlocksChannel {
|
|
4920
|
-
channel: 'organization-synced-blocks';
|
|
4921
|
-
organization: string;
|
|
4922
|
-
}
|
|
4923
|
-
export interface OrganizationSyncedBlockChannel {
|
|
4924
|
-
channel: 'organization-synced-block';
|
|
4925
|
-
organization: string;
|
|
4926
|
-
syncedBlock: string;
|
|
4927
|
-
}
|
|
4928
4863
|
export interface CommentsChannel {
|
|
4929
4864
|
channel: 'space-comments';
|
|
4930
4865
|
space: string;
|
|
@@ -5002,11 +4937,6 @@ export interface SiteSpaceCustomizationChannel {
|
|
|
5002
4937
|
site: string;
|
|
5003
4938
|
siteSpace: string;
|
|
5004
4939
|
}
|
|
5005
|
-
/** Subscription channel for changes in site spaces in an organization. */
|
|
5006
|
-
export interface SiteSpacesChannel {
|
|
5007
|
-
channel: 'site-spaces';
|
|
5008
|
-
site: string;
|
|
5009
|
-
}
|
|
5010
4940
|
/** Subscription channel for changes in site structure in an organization. */
|
|
5011
4941
|
export interface SiteStructureChannel {
|
|
5012
4942
|
channel: 'site-structure';
|
|
@@ -5026,11 +4956,6 @@ export interface SiteShareLinkChannel {
|
|
|
5026
4956
|
site: string;
|
|
5027
4957
|
siteShareLink: string;
|
|
5028
4958
|
}
|
|
5029
|
-
/** Subscription channel for changes in site sections in an organization. */
|
|
5030
|
-
export interface SiteSectionsChannel {
|
|
5031
|
-
channel: 'site-sections';
|
|
5032
|
-
site: string;
|
|
5033
|
-
}
|
|
5034
4959
|
export interface SiteSectionChannel {
|
|
5035
4960
|
channel: 'site-section';
|
|
5036
4961
|
site: string;
|
|
@@ -5041,7 +4966,7 @@ export interface CustomHostnameChannel {
|
|
|
5041
4966
|
customHostname: string;
|
|
5042
4967
|
}
|
|
5043
4968
|
/** Channel to subscribe to for API updates. */
|
|
5044
|
-
export type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceBrokenLinksChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestBrokenLinksChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationExperimentalFeaturesChannel |
|
|
4969
|
+
export type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceBrokenLinksChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestBrokenLinksChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationExperimentalFeaturesChannel | CommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel;
|
|
5045
4970
|
/** The status of ads on the site */
|
|
5046
4971
|
export declare enum SiteAdsStatus {
|
|
5047
4972
|
Pending = "pending",
|
|
@@ -5070,7 +4995,6 @@ export type RequestUpdateIntegrationSiteInstallation = UpdateIntegrationSiteInst
|
|
|
5070
4995
|
export type RequestUpgradeOrganizationBilling = UpgradeOrganizationBilling;
|
|
5071
4996
|
export type RequestInviteUsersToOrganization = InviteUsersToOrganization;
|
|
5072
4997
|
export type RequestImportGitRepository = ImportGitRepository;
|
|
5073
|
-
export type RequestSyncGitRepository = SyncGitRepository;
|
|
5074
4998
|
export type RequestExportToGitRepository = ExportToGitRepository;
|
|
5075
4999
|
export type RequestImportContent = ImportContent;
|
|
5076
5000
|
export type RequestCreateSpace = CreateSpace;
|
|
@@ -5524,16 +5448,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5524
5448
|
* @secure
|
|
5525
5449
|
*/
|
|
5526
5450
|
exportToGitRepository: (spaceId: string, data: ExportToGitRepository, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
5527
|
-
/**
|
|
5528
|
-
* No description
|
|
5529
|
-
*
|
|
5530
|
-
* @tags spaces
|
|
5531
|
-
* @name SyncGitRepository
|
|
5532
|
-
* @summary Synchronize a Git repository with the space content.
|
|
5533
|
-
* @request POST:/spaces/{spaceId}/git/sync
|
|
5534
|
-
* @secure
|
|
5535
|
-
*/
|
|
5536
|
-
syncGitRepository: (spaceId: string, data: SyncGitRepository, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
5537
5451
|
/**
|
|
5538
5452
|
* No description
|
|
5539
5453
|
*
|
|
@@ -6536,23 +6450,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6536
6450
|
*/
|
|
6537
6451
|
computed?: boolean;
|
|
6538
6452
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionReusableContent, Error>>;
|
|
6539
|
-
/**
|
|
6540
|
-
* No description
|
|
6541
|
-
*
|
|
6542
|
-
* @tags spaces
|
|
6543
|
-
* @name TouchContentInChangeRequest
|
|
6544
|
-
* @summary Touch Hive content, marking it as modified as part of this change request.
|
|
6545
|
-
* @request POST:/spaces/{spaceId}/change-requests/{changeRequestId}/touched-content
|
|
6546
|
-
* @secure
|
|
6547
|
-
*/
|
|
6548
|
-
touchContentInChangeRequest: (spaceId: string, changeRequestId: string, data: {
|
|
6549
|
-
/** The content id of the touched content. */
|
|
6550
|
-
contentId: string;
|
|
6551
|
-
/** The branch id of the touched content. */
|
|
6552
|
-
branchId: string;
|
|
6553
|
-
/** The relation of the touched content to the change request. */
|
|
6554
|
-
relation: "synced-block";
|
|
6555
|
-
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, Error>>;
|
|
6556
6453
|
/**
|
|
6557
6454
|
* No description
|
|
6558
6455
|
*
|
|
@@ -6571,25 +6468,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6571
6468
|
/** Temporary URL to print the content. The URL will work for 1h. */
|
|
6572
6469
|
url: URL;
|
|
6573
6470
|
}, Error>>;
|
|
6574
|
-
/**
|
|
6575
|
-
* No description
|
|
6576
|
-
*
|
|
6577
|
-
* @tags spaces
|
|
6578
|
-
* @name GetSyncedBlockContentInChangeRequest
|
|
6579
|
-
* @summary Get the content of a synced block in the context of a change request.
|
|
6580
|
-
* @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/synced-blocks/{syncedBlockId}/content
|
|
6581
|
-
* @secure
|
|
6582
|
-
*/
|
|
6583
|
-
getSyncedBlockContentInChangeRequest: (spaceId: string, changeRequestId: string, syncedBlockId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
6584
|
-
document: JSONDocument;
|
|
6585
|
-
files: RevisionFile[];
|
|
6586
|
-
}, Error | {
|
|
6587
|
-
error: {
|
|
6588
|
-
/** @format int32 */
|
|
6589
|
-
code: 404;
|
|
6590
|
-
message: string;
|
|
6591
|
-
};
|
|
6592
|
-
}>>;
|
|
6593
6471
|
/**
|
|
6594
6472
|
* No description
|
|
6595
6473
|
*
|
|
@@ -9063,142 +8941,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9063
8941
|
parentPage?: RevisionPageDocument | RevisionPageGroup;
|
|
9064
8942
|
}[];
|
|
9065
8943
|
}, Error>>;
|
|
9066
|
-
/**
|
|
9067
|
-
* No description
|
|
9068
|
-
*
|
|
9069
|
-
* @tags organizations
|
|
9070
|
-
* @name ListSyncedBlocks
|
|
9071
|
-
* @summary List all the synced blocks created in an organization
|
|
9072
|
-
* @request GET:/orgs/{organizationId}/synced-blocks
|
|
9073
|
-
* @secure
|
|
9074
|
-
*/
|
|
9075
|
-
listSyncedBlocks: (organizationId: string, query?: {
|
|
9076
|
-
/** Identifier of the page results to fetch. */
|
|
9077
|
-
page?: string;
|
|
9078
|
-
/**
|
|
9079
|
-
* The number of results per page
|
|
9080
|
-
* @min 0
|
|
9081
|
-
* @max 1000
|
|
9082
|
-
*/
|
|
9083
|
-
limit?: number;
|
|
9084
|
-
/** A list of IDs to filter the synced blocks. */
|
|
9085
|
-
ids?: string[];
|
|
9086
|
-
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
9087
|
-
items: SyncedBlock[];
|
|
9088
|
-
}, Error>>;
|
|
9089
|
-
/**
|
|
9090
|
-
* No description
|
|
9091
|
-
*
|
|
9092
|
-
* @tags organizations
|
|
9093
|
-
* @name CreateSyncedBlock
|
|
9094
|
-
* @summary Create a new synced block
|
|
9095
|
-
* @request POST:/orgs/{organizationId}/synced-blocks
|
|
9096
|
-
* @secure
|
|
9097
|
-
*/
|
|
9098
|
-
createSyncedBlock: (organizationId: string, data: {
|
|
9099
|
-
/** Title of synced block */
|
|
9100
|
-
title?: string;
|
|
9101
|
-
}, params?: RequestParams) => Promise<HttpResponse<SyncedBlock, Error>>;
|
|
9102
|
-
/**
|
|
9103
|
-
* No description
|
|
9104
|
-
*
|
|
9105
|
-
* @tags organizations
|
|
9106
|
-
* @name GetSyncedBlock
|
|
9107
|
-
* @summary Get a synced block by its ID
|
|
9108
|
-
* @request GET:/orgs/{organizationId}/synced-blocks/{syncedBlockId}
|
|
9109
|
-
* @secure
|
|
9110
|
-
*/
|
|
9111
|
-
getSyncedBlock: (organizationId: string, syncedBlockId: string, params?: RequestParams) => Promise<HttpResponse<SyncedBlock, Error>>;
|
|
9112
|
-
/**
|
|
9113
|
-
* No description
|
|
9114
|
-
*
|
|
9115
|
-
* @tags organizations
|
|
9116
|
-
* @name UpdateSyncedBlock
|
|
9117
|
-
* @summary Update an existing synced block.
|
|
9118
|
-
* @request PATCH:/orgs/{organizationId}/synced-blocks/{syncedBlockId}
|
|
9119
|
-
* @secure
|
|
9120
|
-
*/
|
|
9121
|
-
updateSyncedBlock: (organizationId: string, syncedBlockId: string, data: {
|
|
9122
|
-
/** A new title for the Synced Block. */
|
|
9123
|
-
title?: string;
|
|
9124
|
-
/** A new description for the Synced Block. */
|
|
9125
|
-
description?: string;
|
|
9126
|
-
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
9127
|
-
/**
|
|
9128
|
-
* No description
|
|
9129
|
-
*
|
|
9130
|
-
* @tags organizations
|
|
9131
|
-
* @name DeleteSyncedBlock
|
|
9132
|
-
* @summary Delete a synced block by its ID
|
|
9133
|
-
* @request DELETE:/orgs/{organizationId}/synced-blocks/{syncedBlockId}
|
|
9134
|
-
* @secure
|
|
9135
|
-
*/
|
|
9136
|
-
deleteSyncedBlock: (organizationId: string, syncedBlockId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
9137
|
-
/**
|
|
9138
|
-
* No description
|
|
9139
|
-
*
|
|
9140
|
-
* @tags organizations
|
|
9141
|
-
* @name GetSyncedBlockContent
|
|
9142
|
-
* @summary Get the content of a synced block.
|
|
9143
|
-
* @request GET:/orgs/{organizationId}/synced-blocks/{syncedBlockId}/content
|
|
9144
|
-
* @secure
|
|
9145
|
-
*/
|
|
9146
|
-
getSyncedBlockContent: (organizationId: string, syncedBlockId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
9147
|
-
document: JSONDocument;
|
|
9148
|
-
files: RevisionFile[];
|
|
9149
|
-
}, Error | {
|
|
9150
|
-
error: {
|
|
9151
|
-
/** @format int32 */
|
|
9152
|
-
code: 404;
|
|
9153
|
-
message: string;
|
|
9154
|
-
};
|
|
9155
|
-
}>>;
|
|
9156
|
-
/**
|
|
9157
|
-
* No description
|
|
9158
|
-
*
|
|
9159
|
-
* @tags organizations
|
|
9160
|
-
* @name ListSyncedBlockBacklinks
|
|
9161
|
-
* @summary Get a list of pages that reference this synced block.
|
|
9162
|
-
* @request GET:/orgs/{organizationId}/synced-blocks/{syncedBlockId}/backlinks
|
|
9163
|
-
* @secure
|
|
9164
|
-
*/
|
|
9165
|
-
listSyncedBlockBacklinks: (organizationId: string, syncedBlockId: string, query?: {
|
|
9166
|
-
/** Identifier of the page results to fetch. */
|
|
9167
|
-
page?: string;
|
|
9168
|
-
/**
|
|
9169
|
-
* The number of results per page
|
|
9170
|
-
* @min 0
|
|
9171
|
-
* @max 1000
|
|
9172
|
-
*/
|
|
9173
|
-
limit?: number;
|
|
9174
|
-
/** Filter backlinks relative to a change request. */
|
|
9175
|
-
changeRequestId?: string;
|
|
9176
|
-
/** Filter backlinks relative to a space. */
|
|
9177
|
-
spaceId?: string;
|
|
9178
|
-
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
9179
|
-
items: ContentLocationPage[];
|
|
9180
|
-
}, Error>>;
|
|
9181
|
-
/**
|
|
9182
|
-
* No description
|
|
9183
|
-
*
|
|
9184
|
-
* @tags organizations
|
|
9185
|
-
* @name ListSyncedBlockSpaces
|
|
9186
|
-
* @summary Get a list of spaces that reference this synced block.
|
|
9187
|
-
* @request GET:/orgs/{organizationId}/synced-blocks/{syncedBlockId}/usage/spaces
|
|
9188
|
-
* @secure
|
|
9189
|
-
*/
|
|
9190
|
-
listSyncedBlockSpaces: (organizationId: string, syncedBlockId: string, query?: {
|
|
9191
|
-
/** Identifier of the page results to fetch. */
|
|
9192
|
-
page?: string;
|
|
9193
|
-
/**
|
|
9194
|
-
* The number of results per page
|
|
9195
|
-
* @min 0
|
|
9196
|
-
* @max 1000
|
|
9197
|
-
*/
|
|
9198
|
-
limit?: number;
|
|
9199
|
-
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
9200
|
-
items: Space[];
|
|
9201
|
-
}, Error>>;
|
|
9202
8944
|
/**
|
|
9203
8945
|
* No description
|
|
9204
8946
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -242,7 +242,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
242
242
|
|
|
243
243
|
// package.json
|
|
244
244
|
var name = "@gitbook/api";
|
|
245
|
-
var version = "0.
|
|
245
|
+
var version = "0.74.0";
|
|
246
246
|
|
|
247
247
|
// src/client.ts
|
|
248
248
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -1165,14 +1165,6 @@ var Api = class extends HttpClient {
|
|
|
1165
1165
|
type: "application/json" /* Json */,
|
|
1166
1166
|
...params
|
|
1167
1167
|
}),
|
|
1168
|
-
syncGitRepository: (spaceId, data, params = {}) => this.request({
|
|
1169
|
-
path: `/spaces/${spaceId}/git/sync`,
|
|
1170
|
-
method: "POST",
|
|
1171
|
-
body: data,
|
|
1172
|
-
secure: true,
|
|
1173
|
-
type: "application/json" /* Json */,
|
|
1174
|
-
...params
|
|
1175
|
-
}),
|
|
1176
1168
|
getSpaceGitInfo: (spaceId, params = {}) => this.request({
|
|
1177
1169
|
path: `/spaces/${spaceId}/git/info`,
|
|
1178
1170
|
method: "GET",
|
|
@@ -1622,15 +1614,6 @@ var Api = class extends HttpClient {
|
|
|
1622
1614
|
format: "json",
|
|
1623
1615
|
...params
|
|
1624
1616
|
}),
|
|
1625
|
-
touchContentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
|
|
1626
|
-
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/touched-content`,
|
|
1627
|
-
method: "POST",
|
|
1628
|
-
body: data,
|
|
1629
|
-
secure: true,
|
|
1630
|
-
type: "application/json" /* Json */,
|
|
1631
|
-
format: "json",
|
|
1632
|
-
...params
|
|
1633
|
-
}),
|
|
1634
1617
|
getChangeRequestPdf: (spaceId, changeRequestId, query, params = {}) => this.request({
|
|
1635
1618
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/pdf`,
|
|
1636
1619
|
method: "GET",
|
|
@@ -1639,13 +1622,6 @@ var Api = class extends HttpClient {
|
|
|
1639
1622
|
format: "json",
|
|
1640
1623
|
...params
|
|
1641
1624
|
}),
|
|
1642
|
-
getSyncedBlockContentInChangeRequest: (spaceId, changeRequestId, syncedBlockId, params = {}) => this.request({
|
|
1643
|
-
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/synced-blocks/${syncedBlockId}/content`,
|
|
1644
|
-
method: "GET",
|
|
1645
|
-
secure: true,
|
|
1646
|
-
format: "json",
|
|
1647
|
-
...params
|
|
1648
|
-
}),
|
|
1649
1625
|
getRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
|
|
1650
1626
|
path: `/spaces/${spaceId}/revisions/${revisionId}`,
|
|
1651
1627
|
method: "GET",
|
|
@@ -2802,67 +2778,6 @@ var Api = class extends HttpClient {
|
|
|
2802
2778
|
format: "json",
|
|
2803
2779
|
...params
|
|
2804
2780
|
}),
|
|
2805
|
-
listSyncedBlocks: (organizationId, query, params = {}) => this.request({
|
|
2806
|
-
path: `/orgs/${organizationId}/synced-blocks`,
|
|
2807
|
-
method: "GET",
|
|
2808
|
-
query,
|
|
2809
|
-
secure: true,
|
|
2810
|
-
format: "json",
|
|
2811
|
-
...params
|
|
2812
|
-
}),
|
|
2813
|
-
createSyncedBlock: (organizationId, data, params = {}) => this.request({
|
|
2814
|
-
path: `/orgs/${organizationId}/synced-blocks`,
|
|
2815
|
-
method: "POST",
|
|
2816
|
-
body: data,
|
|
2817
|
-
secure: true,
|
|
2818
|
-
type: "application/json" /* Json */,
|
|
2819
|
-
format: "json",
|
|
2820
|
-
...params
|
|
2821
|
-
}),
|
|
2822
|
-
getSyncedBlock: (organizationId, syncedBlockId, params = {}) => this.request({
|
|
2823
|
-
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
|
|
2824
|
-
method: "GET",
|
|
2825
|
-
secure: true,
|
|
2826
|
-
format: "json",
|
|
2827
|
-
...params
|
|
2828
|
-
}),
|
|
2829
|
-
updateSyncedBlock: (organizationId, syncedBlockId, data, params = {}) => this.request({
|
|
2830
|
-
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
|
|
2831
|
-
method: "PATCH",
|
|
2832
|
-
body: data,
|
|
2833
|
-
secure: true,
|
|
2834
|
-
type: "application/json" /* Json */,
|
|
2835
|
-
...params
|
|
2836
|
-
}),
|
|
2837
|
-
deleteSyncedBlock: (organizationId, syncedBlockId, params = {}) => this.request({
|
|
2838
|
-
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
|
|
2839
|
-
method: "DELETE",
|
|
2840
|
-
secure: true,
|
|
2841
|
-
...params
|
|
2842
|
-
}),
|
|
2843
|
-
getSyncedBlockContent: (organizationId, syncedBlockId, params = {}) => this.request({
|
|
2844
|
-
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/content`,
|
|
2845
|
-
method: "GET",
|
|
2846
|
-
secure: true,
|
|
2847
|
-
format: "json",
|
|
2848
|
-
...params
|
|
2849
|
-
}),
|
|
2850
|
-
listSyncedBlockBacklinks: (organizationId, syncedBlockId, query, params = {}) => this.request({
|
|
2851
|
-
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/backlinks`,
|
|
2852
|
-
method: "GET",
|
|
2853
|
-
query,
|
|
2854
|
-
secure: true,
|
|
2855
|
-
format: "json",
|
|
2856
|
-
...params
|
|
2857
|
-
}),
|
|
2858
|
-
listSyncedBlockSpaces: (organizationId, syncedBlockId, query, params = {}) => this.request({
|
|
2859
|
-
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/usage/spaces`,
|
|
2860
|
-
method: "GET",
|
|
2861
|
-
query,
|
|
2862
|
-
secure: true,
|
|
2863
|
-
format: "json",
|
|
2864
|
-
...params
|
|
2865
|
-
}),
|
|
2866
2781
|
askInOrganization: (organizationId, data, query, params = {}) => this.request({
|
|
2867
2782
|
path: `/orgs/${organizationId}/ask`,
|
|
2868
2783
|
method: "POST",
|