@gitbook/api 0.70.0 → 0.72.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 +159 -30
- package/dist/index.cjs +34 -1
- package/dist/index.js +34 -1
- package/package.json +1 -1
- package/spec/openapi.json +477 -90
- package/spec/openapi.yaml +291 -64
package/dist/client.d.ts
CHANGED
|
@@ -1184,29 +1184,32 @@ export interface RevisionPageDocumentCover {
|
|
|
1184
1184
|
/** Vertical position of the cover image. */
|
|
1185
1185
|
yPos: number;
|
|
1186
1186
|
}
|
|
1187
|
+
/** A score breakdown for a specific page. */
|
|
1188
|
+
export interface AnalyticsFeedbacksPageScore {
|
|
1189
|
+
/** Score based on each rating (+1 for 'good', -0.5 for 'ok', -2 for 'bad'). */
|
|
1190
|
+
score: number;
|
|
1191
|
+
/** Total number of ratings done by end users. */
|
|
1192
|
+
total: number;
|
|
1193
|
+
/**
|
|
1194
|
+
* Summary of the rating based on the score ('good', 'ok', or 'bad')
|
|
1195
|
+
* @deprecated
|
|
1196
|
+
*/
|
|
1197
|
+
rating: string;
|
|
1198
|
+
/** Score multiplied by the number of ratings to give more importance to highly rated content. */
|
|
1199
|
+
ponderedScore: number;
|
|
1200
|
+
/** Number of 'bad' ratings. */
|
|
1201
|
+
bad: number;
|
|
1202
|
+
/** Number of 'ok' ratings. */
|
|
1203
|
+
ok: number;
|
|
1204
|
+
/** Number of 'good' ratings. */
|
|
1205
|
+
good: number;
|
|
1206
|
+
}
|
|
1187
1207
|
/** Page entry in the content analytics. */
|
|
1188
1208
|
export interface AnalyticsContentPage {
|
|
1189
1209
|
page: RevisionPageDocument;
|
|
1190
1210
|
pageViews: number;
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
score: number;
|
|
1194
|
-
/** Total number of ratings done by end users. */
|
|
1195
|
-
total: number;
|
|
1196
|
-
/**
|
|
1197
|
-
* Summary of the rating based on the score ('good', 'ok', or 'bad')
|
|
1198
|
-
* @deprecated
|
|
1199
|
-
*/
|
|
1200
|
-
rating: string;
|
|
1201
|
-
/** Score multiplied by the number of ratings to give more importance to highly rated content. */
|
|
1202
|
-
ponderedScore: number;
|
|
1203
|
-
/** Number of 'bad' ratings. */
|
|
1204
|
-
bad: number;
|
|
1205
|
-
/** Number of 'ok' ratings. */
|
|
1206
|
-
ok: number;
|
|
1207
|
-
/** Number of 'good' ratings. */
|
|
1208
|
-
good: number;
|
|
1209
|
-
};
|
|
1211
|
+
/** A score breakdown for a specific page. */
|
|
1212
|
+
feedbacks?: AnalyticsFeedbacksPageScore;
|
|
1210
1213
|
}
|
|
1211
1214
|
export interface AnalyticsContentPages {
|
|
1212
1215
|
pages: AnalyticsContentPage[];
|
|
@@ -1323,6 +1326,12 @@ export interface RevisionFile {
|
|
|
1323
1326
|
};
|
|
1324
1327
|
git?: GitSyncBlob;
|
|
1325
1328
|
}
|
|
1329
|
+
export interface RevisionReusableContent {
|
|
1330
|
+
id: string;
|
|
1331
|
+
title: string;
|
|
1332
|
+
document?: string;
|
|
1333
|
+
git?: GitSyncBlob;
|
|
1334
|
+
}
|
|
1326
1335
|
export interface GitSyncCommit {
|
|
1327
1336
|
/** SHA for the commit */
|
|
1328
1337
|
oid: string;
|
|
@@ -1344,6 +1353,7 @@ export interface RevisionBase {
|
|
|
1344
1353
|
parents: string[];
|
|
1345
1354
|
pages: RevisionPage[];
|
|
1346
1355
|
files: RevisionFile[];
|
|
1356
|
+
reusableContents: RevisionReusableContent[];
|
|
1347
1357
|
/** When the revision was created. */
|
|
1348
1358
|
createdAt: Timestamp;
|
|
1349
1359
|
/** Metadata about a potential associated git commit. */
|
|
@@ -1961,8 +1971,15 @@ export interface ContentLocationSyncedBlock {
|
|
|
1961
1971
|
organization: Organization;
|
|
1962
1972
|
syncedBlock: SyncedBlock;
|
|
1963
1973
|
}
|
|
1974
|
+
export interface ContentLocationReusableContent {
|
|
1975
|
+
kind: 'reusable-content';
|
|
1976
|
+
organization: Organization;
|
|
1977
|
+
space: Space;
|
|
1978
|
+
versionContext?: ContentLocationRevisionContext | ContentLocationChangeRequestContext;
|
|
1979
|
+
reusableContent: RevisionReusableContent;
|
|
1980
|
+
}
|
|
1964
1981
|
/** An absolute reference to content in GitBook. */
|
|
1965
|
-
export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationSnippet | ContentLocationSyncedBlock;
|
|
1982
|
+
export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationSnippet | ContentLocationSyncedBlock | ContentLocationReusableContent;
|
|
1966
1983
|
/**
|
|
1967
1984
|
* Text to display to represent the reference. Possible values include:
|
|
1968
1985
|
* - `ok` - No problems detected for this content reference.
|
|
@@ -4123,6 +4140,13 @@ export interface SiteSection {
|
|
|
4123
4140
|
published?: string;
|
|
4124
4141
|
};
|
|
4125
4142
|
}
|
|
4143
|
+
export type SiteStructure = {
|
|
4144
|
+
type: 'sections';
|
|
4145
|
+
structure: SiteSection[];
|
|
4146
|
+
} | {
|
|
4147
|
+
type: 'siteSpaces';
|
|
4148
|
+
structure: SiteSpace[];
|
|
4149
|
+
};
|
|
4126
4150
|
export type SitePublishingAuth = (VisitorAuthCustomBackend | VisitorAuthIntegrationBackend) & {
|
|
4127
4151
|
/** Type of Object, always equals to "publishing-auth" */
|
|
4128
4152
|
object: 'publishing-auth';
|
|
@@ -4234,6 +4258,16 @@ export interface SiteIntegrationScript {
|
|
|
4234
4258
|
/** If true, the script will potentially load use cookies and visitors should be aware. */
|
|
4235
4259
|
cookies: boolean;
|
|
4236
4260
|
}
|
|
4261
|
+
export interface SiteSectionPointer {
|
|
4262
|
+
type: 'site-section';
|
|
4263
|
+
/** Unique identifier for the site section */
|
|
4264
|
+
siteSection: string;
|
|
4265
|
+
}
|
|
4266
|
+
/** Position at which to move the site section to. */
|
|
4267
|
+
export interface SiteSectionMovePosition {
|
|
4268
|
+
before?: SiteSectionPointer;
|
|
4269
|
+
after?: SiteSectionPointer;
|
|
4270
|
+
}
|
|
4237
4271
|
export interface SiteSpacePointer {
|
|
4238
4272
|
type: 'site-space';
|
|
4239
4273
|
/** Unique identifier for the site space */
|
|
@@ -4973,6 +5007,11 @@ export interface SiteSpacesChannel {
|
|
|
4973
5007
|
channel: 'site-spaces';
|
|
4974
5008
|
site: string;
|
|
4975
5009
|
}
|
|
5010
|
+
/** Subscription channel for changes in site structure in an organization. */
|
|
5011
|
+
export interface SiteStructureChannel {
|
|
5012
|
+
channel: 'site-structure';
|
|
5013
|
+
site: string;
|
|
5014
|
+
}
|
|
4976
5015
|
export interface SitePublishingAuthChannel {
|
|
4977
5016
|
channel: 'site-publishing-auth';
|
|
4978
5017
|
site: string;
|
|
@@ -5002,7 +5041,7 @@ export interface CustomHostnameChannel {
|
|
|
5002
5041
|
customHostname: string;
|
|
5003
5042
|
}
|
|
5004
5043
|
/** Channel to subscribe to for API updates. */
|
|
5005
|
-
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 | OrganizationSyncedBlocksChannel | OrganizationSyncedBlockChannel | CommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteSpacesChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionsChannel | SiteSectionChannel | CustomHostnameChannel;
|
|
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 | OrganizationSyncedBlocksChannel | OrganizationSyncedBlockChannel | CommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteSpacesChannel | SiteStructureChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionsChannel | SiteSectionChannel | CustomHostnameChannel;
|
|
5006
5045
|
/** The status of ads on the site */
|
|
5007
5046
|
export declare enum SiteAdsStatus {
|
|
5008
5047
|
Pending = "pending",
|
|
@@ -5818,6 +5857,26 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5818
5857
|
*/
|
|
5819
5858
|
computed?: boolean;
|
|
5820
5859
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionPageDocument | RevisionPageGroup, Error>>;
|
|
5860
|
+
/**
|
|
5861
|
+
* No description
|
|
5862
|
+
*
|
|
5863
|
+
* @name GetReusableContentById
|
|
5864
|
+
* @summary Get a reusable content by its ID in the main revision of a space
|
|
5865
|
+
* @request GET:/spaces/{spaceId}/content/reusable-contents/{reusableContentId}
|
|
5866
|
+
* @secure
|
|
5867
|
+
*/
|
|
5868
|
+
getReusableContentById: (spaceId: string, reusableContentId: string, query?: {
|
|
5869
|
+
/**
|
|
5870
|
+
* If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
|
|
5871
|
+
* @default true
|
|
5872
|
+
*/
|
|
5873
|
+
metadata?: boolean;
|
|
5874
|
+
/**
|
|
5875
|
+
* If `false` is passed, content will not be computed
|
|
5876
|
+
* @default true
|
|
5877
|
+
*/
|
|
5878
|
+
computed?: boolean;
|
|
5879
|
+
}, params?: RequestParams) => Promise<HttpResponse<RevisionReusableContent, Error>>;
|
|
5821
5880
|
/**
|
|
5822
5881
|
* No description
|
|
5823
5882
|
*
|
|
@@ -6457,6 +6516,26 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6457
6516
|
*/
|
|
6458
6517
|
computed?: boolean;
|
|
6459
6518
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionPageDocument | RevisionPageGroup, Error>>;
|
|
6519
|
+
/**
|
|
6520
|
+
* No description
|
|
6521
|
+
*
|
|
6522
|
+
* @name GetReusableContentInChangeRequestById
|
|
6523
|
+
* @summary Get a reusable content by its ID in the content of a change request
|
|
6524
|
+
* @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/content/reusable-contents/{reusableContentId}
|
|
6525
|
+
* @secure
|
|
6526
|
+
*/
|
|
6527
|
+
getReusableContentInChangeRequestById: (spaceId: string, changeRequestId: string, reusableContentId: string, query?: {
|
|
6528
|
+
/**
|
|
6529
|
+
* If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
|
|
6530
|
+
* @default true
|
|
6531
|
+
*/
|
|
6532
|
+
metadata?: boolean;
|
|
6533
|
+
/**
|
|
6534
|
+
* If `false` is passed, content will not be computed
|
|
6535
|
+
* @default true
|
|
6536
|
+
*/
|
|
6537
|
+
computed?: boolean;
|
|
6538
|
+
}, params?: RequestParams) => Promise<HttpResponse<RevisionReusableContent, Error>>;
|
|
6460
6539
|
/**
|
|
6461
6540
|
* No description
|
|
6462
6541
|
*
|
|
@@ -6672,6 +6751,26 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6672
6751
|
*/
|
|
6673
6752
|
computed?: boolean;
|
|
6674
6753
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionPageDocument | RevisionPageGroup, Error>>;
|
|
6754
|
+
/**
|
|
6755
|
+
* No description
|
|
6756
|
+
*
|
|
6757
|
+
* @name GetReusableContentInRevisionById
|
|
6758
|
+
* @summary Get reusbale content in a revision by its ID
|
|
6759
|
+
* @request GET:/spaces/{spaceId}/revisions/{revisionId}/reusable-contents/{reusableContentId}
|
|
6760
|
+
* @secure
|
|
6761
|
+
*/
|
|
6762
|
+
getReusableContentInRevisionById: (spaceId: string, revisionId: string, reusableContentId: string, query?: {
|
|
6763
|
+
/**
|
|
6764
|
+
* If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
|
|
6765
|
+
* @default true
|
|
6766
|
+
*/
|
|
6767
|
+
metadata?: boolean;
|
|
6768
|
+
/**
|
|
6769
|
+
* If `false` is passed, content will not be computed
|
|
6770
|
+
* @default true
|
|
6771
|
+
*/
|
|
6772
|
+
computed?: boolean;
|
|
6773
|
+
}, params?: RequestParams) => Promise<HttpResponse<RevisionReusableContent, Error>>;
|
|
6675
6774
|
/**
|
|
6676
6775
|
* No description
|
|
6677
6776
|
*
|
|
@@ -9364,13 +9463,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9364
9463
|
getSiteStructure: (organizationId: string, siteId: string, query?: {
|
|
9365
9464
|
/** For sites published via share-links, the share key is useful to resolve published URLs. */
|
|
9366
9465
|
shareKey?: string;
|
|
9367
|
-
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
9368
|
-
type?: "sections";
|
|
9369
|
-
structure?: SiteSection[];
|
|
9370
|
-
} | {
|
|
9371
|
-
type?: "siteSpaces";
|
|
9372
|
-
structure?: SiteSpace[];
|
|
9373
|
-
}, Error | {
|
|
9466
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteStructure, Error | {
|
|
9374
9467
|
error: {
|
|
9375
9468
|
/** @format int32 */
|
|
9376
9469
|
code: 404;
|
|
@@ -9701,9 +9794,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9701
9794
|
* @secure
|
|
9702
9795
|
*/
|
|
9703
9796
|
searchSiteContent: (organizationId: string, siteId: string, data: {
|
|
9704
|
-
|
|
9797
|
+
/** Search only in the site spaces provided */
|
|
9798
|
+
mode?: "specific";
|
|
9705
9799
|
/** @minLength 1 */
|
|
9706
|
-
siteSpaceIds
|
|
9800
|
+
siteSpaceIds: string[];
|
|
9801
|
+
query: string;
|
|
9802
|
+
} | {
|
|
9803
|
+
/** Search in the current site space and all section's defaults */
|
|
9804
|
+
mode: "current";
|
|
9805
|
+
siteSpaceId: string;
|
|
9806
|
+
query: string;
|
|
9807
|
+
} | {
|
|
9808
|
+
/** search in all site-spaces */
|
|
9809
|
+
mode: "all";
|
|
9810
|
+
query: string;
|
|
9707
9811
|
}, query?: {
|
|
9708
9812
|
/** Identifier of the page results to fetch. */
|
|
9709
9813
|
page?: string;
|
|
@@ -9908,6 +10012,31 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9908
10012
|
createSitesPageFeedback: (organizationId: string, siteId: string, siteSpaceId: string, pageId: string, visitorId: string, data: {
|
|
9909
10013
|
rating: PageFeedbackRating;
|
|
9910
10014
|
}, params?: RequestParams) => Promise<HttpResponse<PageFeedback, Error>>;
|
|
10015
|
+
/**
|
|
10016
|
+
* No description
|
|
10017
|
+
*
|
|
10018
|
+
* @tags sites
|
|
10019
|
+
* @name MoveSiteSection
|
|
10020
|
+
* @summary Move a site section to a new position in the site.
|
|
10021
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/sections/{siteSectionId}/move
|
|
10022
|
+
* @secure
|
|
10023
|
+
*/
|
|
10024
|
+
moveSiteSection: (organizationId: string, siteId: string, siteSectionId: string, data: {
|
|
10025
|
+
/** The position where to move the site section. When not provided the site section is moved at the end of the site. */
|
|
10026
|
+
position?: SiteSectionMovePosition;
|
|
10027
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteSection, Error | {
|
|
10028
|
+
error: {
|
|
10029
|
+
/** @format int32 */
|
|
10030
|
+
code: 400;
|
|
10031
|
+
message: string;
|
|
10032
|
+
};
|
|
10033
|
+
} | {
|
|
10034
|
+
error: {
|
|
10035
|
+
/** @format int32 */
|
|
10036
|
+
code: 404;
|
|
10037
|
+
message: string;
|
|
10038
|
+
};
|
|
10039
|
+
}>>;
|
|
9911
10040
|
/**
|
|
9912
10041
|
* No description
|
|
9913
10042
|
*
|
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.72.0";
|
|
246
246
|
|
|
247
247
|
// src/client.ts
|
|
248
248
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -1315,6 +1315,14 @@ var Api = class extends HttpClient {
|
|
|
1315
1315
|
format: "json",
|
|
1316
1316
|
...params
|
|
1317
1317
|
}),
|
|
1318
|
+
getReusableContentById: (spaceId, reusableContentId, query, params = {}) => this.request({
|
|
1319
|
+
path: `/spaces/${spaceId}/content/reusable-contents/${reusableContentId}`,
|
|
1320
|
+
method: "GET",
|
|
1321
|
+
query,
|
|
1322
|
+
secure: true,
|
|
1323
|
+
format: "json",
|
|
1324
|
+
...params
|
|
1325
|
+
}),
|
|
1318
1326
|
getComputedDocument: (spaceId, query, params = {}) => this.request({
|
|
1319
1327
|
path: `/spaces/${spaceId}/content/computed/document`,
|
|
1320
1328
|
method: "GET",
|
|
@@ -1606,6 +1614,14 @@ var Api = class extends HttpClient {
|
|
|
1606
1614
|
format: "json",
|
|
1607
1615
|
...params
|
|
1608
1616
|
}),
|
|
1617
|
+
getReusableContentInChangeRequestById: (spaceId, changeRequestId, reusableContentId, query, params = {}) => this.request({
|
|
1618
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/reusable-contents/${reusableContentId}`,
|
|
1619
|
+
method: "GET",
|
|
1620
|
+
query,
|
|
1621
|
+
secure: true,
|
|
1622
|
+
format: "json",
|
|
1623
|
+
...params
|
|
1624
|
+
}),
|
|
1609
1625
|
touchContentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
|
|
1610
1626
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/touched-content`,
|
|
1611
1627
|
method: "POST",
|
|
@@ -1686,6 +1702,14 @@ var Api = class extends HttpClient {
|
|
|
1686
1702
|
format: "json",
|
|
1687
1703
|
...params
|
|
1688
1704
|
}),
|
|
1705
|
+
getReusableContentInRevisionById: (spaceId, revisionId, reusableContentId, query, params = {}) => this.request({
|
|
1706
|
+
path: `/spaces/${spaceId}/revisions/${revisionId}/reusable-contents/${reusableContentId}`,
|
|
1707
|
+
method: "GET",
|
|
1708
|
+
query,
|
|
1709
|
+
secure: true,
|
|
1710
|
+
format: "json",
|
|
1711
|
+
...params
|
|
1712
|
+
}),
|
|
1689
1713
|
listCommentsInSpace: (spaceId, query, params = {}) => this.request({
|
|
1690
1714
|
path: `/spaces/${spaceId}/comments`,
|
|
1691
1715
|
method: "GET",
|
|
@@ -3173,6 +3197,15 @@ var Api = class extends HttpClient {
|
|
|
3173
3197
|
format: "json",
|
|
3174
3198
|
...params
|
|
3175
3199
|
}),
|
|
3200
|
+
moveSiteSection: (organizationId, siteId, siteSectionId, data, params = {}) => this.request({
|
|
3201
|
+
path: `/orgs/${organizationId}/sites/${siteId}/sections/${siteSectionId}/move`,
|
|
3202
|
+
method: "POST",
|
|
3203
|
+
body: data,
|
|
3204
|
+
secure: true,
|
|
3205
|
+
type: "application/json" /* Json */,
|
|
3206
|
+
format: "json",
|
|
3207
|
+
...params
|
|
3208
|
+
}),
|
|
3176
3209
|
moveSiteSpace: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
3177
3210
|
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/move`,
|
|
3178
3211
|
method: "POST",
|
package/dist/index.js
CHANGED
|
@@ -172,7 +172,7 @@ var require_node = __commonJS({
|
|
|
172
172
|
|
|
173
173
|
// package.json
|
|
174
174
|
var name = "@gitbook/api";
|
|
175
|
-
var version = "0.
|
|
175
|
+
var version = "0.72.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -1245,6 +1245,14 @@ var Api = class extends HttpClient {
|
|
|
1245
1245
|
format: "json",
|
|
1246
1246
|
...params
|
|
1247
1247
|
}),
|
|
1248
|
+
getReusableContentById: (spaceId, reusableContentId, query, params = {}) => this.request({
|
|
1249
|
+
path: `/spaces/${spaceId}/content/reusable-contents/${reusableContentId}`,
|
|
1250
|
+
method: "GET",
|
|
1251
|
+
query,
|
|
1252
|
+
secure: true,
|
|
1253
|
+
format: "json",
|
|
1254
|
+
...params
|
|
1255
|
+
}),
|
|
1248
1256
|
getComputedDocument: (spaceId, query, params = {}) => this.request({
|
|
1249
1257
|
path: `/spaces/${spaceId}/content/computed/document`,
|
|
1250
1258
|
method: "GET",
|
|
@@ -1536,6 +1544,14 @@ var Api = class extends HttpClient {
|
|
|
1536
1544
|
format: "json",
|
|
1537
1545
|
...params
|
|
1538
1546
|
}),
|
|
1547
|
+
getReusableContentInChangeRequestById: (spaceId, changeRequestId, reusableContentId, query, params = {}) => this.request({
|
|
1548
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/reusable-contents/${reusableContentId}`,
|
|
1549
|
+
method: "GET",
|
|
1550
|
+
query,
|
|
1551
|
+
secure: true,
|
|
1552
|
+
format: "json",
|
|
1553
|
+
...params
|
|
1554
|
+
}),
|
|
1539
1555
|
touchContentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
|
|
1540
1556
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/touched-content`,
|
|
1541
1557
|
method: "POST",
|
|
@@ -1616,6 +1632,14 @@ var Api = class extends HttpClient {
|
|
|
1616
1632
|
format: "json",
|
|
1617
1633
|
...params
|
|
1618
1634
|
}),
|
|
1635
|
+
getReusableContentInRevisionById: (spaceId, revisionId, reusableContentId, query, params = {}) => this.request({
|
|
1636
|
+
path: `/spaces/${spaceId}/revisions/${revisionId}/reusable-contents/${reusableContentId}`,
|
|
1637
|
+
method: "GET",
|
|
1638
|
+
query,
|
|
1639
|
+
secure: true,
|
|
1640
|
+
format: "json",
|
|
1641
|
+
...params
|
|
1642
|
+
}),
|
|
1619
1643
|
listCommentsInSpace: (spaceId, query, params = {}) => this.request({
|
|
1620
1644
|
path: `/spaces/${spaceId}/comments`,
|
|
1621
1645
|
method: "GET",
|
|
@@ -3103,6 +3127,15 @@ var Api = class extends HttpClient {
|
|
|
3103
3127
|
format: "json",
|
|
3104
3128
|
...params
|
|
3105
3129
|
}),
|
|
3130
|
+
moveSiteSection: (organizationId, siteId, siteSectionId, data, params = {}) => this.request({
|
|
3131
|
+
path: `/orgs/${organizationId}/sites/${siteId}/sections/${siteSectionId}/move`,
|
|
3132
|
+
method: "POST",
|
|
3133
|
+
body: data,
|
|
3134
|
+
secure: true,
|
|
3135
|
+
type: "application/json" /* Json */,
|
|
3136
|
+
format: "json",
|
|
3137
|
+
...params
|
|
3138
|
+
}),
|
|
3106
3139
|
moveSiteSpace: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
3107
3140
|
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/move`,
|
|
3108
3141
|
method: "POST",
|