@gitbook/api 0.91.0 → 0.92.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 +180 -63
- package/dist/index.cjs +47 -11
- package/dist/index.js +47 -11
- package/package.json +1 -1
- package/spec/openapi.json +593 -173
- package/spec/openapi.yaml +391 -126
package/dist/client.d.ts
CHANGED
|
@@ -609,7 +609,7 @@ export interface DocumentBlockOpenAPI {
|
|
|
609
609
|
type: 'swagger';
|
|
610
610
|
key?: string;
|
|
611
611
|
data: OpenAPIOperationPointer & {
|
|
612
|
-
ref: ContentRefFile;
|
|
612
|
+
ref: ContentRefFile | ContentRefURL;
|
|
613
613
|
/** If true, the block is opened by default. */
|
|
614
614
|
expanded?: boolean;
|
|
615
615
|
fullWidth?: boolean;
|
|
@@ -1100,7 +1100,17 @@ export type RevisionPageLink = RevisionPageBase & {
|
|
|
1100
1100
|
*/
|
|
1101
1101
|
hidden?: boolean;
|
|
1102
1102
|
};
|
|
1103
|
-
export type
|
|
1103
|
+
export type ComputedContentDependencyRef = ContentRefSpace;
|
|
1104
|
+
/** Dependency for a computation, with its resolved value. */
|
|
1105
|
+
export type ComputedContentDependencyValue = {
|
|
1106
|
+
ref: ContentRefSpace;
|
|
1107
|
+
/** See `Space` schema component. */
|
|
1108
|
+
value: {
|
|
1109
|
+
object: 'space';
|
|
1110
|
+
id: string;
|
|
1111
|
+
revision: string;
|
|
1112
|
+
} | null;
|
|
1113
|
+
};
|
|
1104
1114
|
/** Parameters for a computed content */
|
|
1105
1115
|
export interface ComputedContentSource {
|
|
1106
1116
|
/** Name of the integration */
|
|
@@ -1109,8 +1119,14 @@ export interface ComputedContentSource {
|
|
|
1109
1119
|
source: string;
|
|
1110
1120
|
/** Properties to be passed to the computation */
|
|
1111
1121
|
props: PlainObject;
|
|
1112
|
-
/**
|
|
1113
|
-
|
|
1122
|
+
/**
|
|
1123
|
+
* Dependencies the computation depends on.
|
|
1124
|
+
* The state of the dependencies will be passed to the computation.
|
|
1125
|
+
* When the dependency's targets are updated, the computation will be updated.
|
|
1126
|
+
*/
|
|
1127
|
+
dependencies?: Record<string, {
|
|
1128
|
+
ref: ComputedContentDependencyRef;
|
|
1129
|
+
} | ComputedContentDependencyValue>;
|
|
1114
1130
|
}
|
|
1115
1131
|
export type RevisionPageComputed = RevisionPageBase & {
|
|
1116
1132
|
type: 'computed';
|
|
@@ -3112,6 +3128,8 @@ export type ContentComputeEvent = SpaceEvent & {
|
|
|
3112
3128
|
sourceId: string;
|
|
3113
3129
|
/** Properties passed to the rendering. */
|
|
3114
3130
|
props: PlainObject;
|
|
3131
|
+
/** Dependencies of the computation. */
|
|
3132
|
+
dependencies: Record<string, ComputedContentDependencyValue>;
|
|
3115
3133
|
};
|
|
3116
3134
|
/**
|
|
3117
3135
|
* Event generated when computing the document of a pages.
|
|
@@ -3692,6 +3710,12 @@ export interface CreateOrganization {
|
|
|
3692
3710
|
* @maxLength 128
|
|
3693
3711
|
*/
|
|
3694
3712
|
export type SiteSectionTitle = string;
|
|
3713
|
+
/**
|
|
3714
|
+
* Description of the site section
|
|
3715
|
+
* @minLength 0
|
|
3716
|
+
* @maxLength 256
|
|
3717
|
+
*/
|
|
3718
|
+
export type SiteSectionDescription = string;
|
|
3695
3719
|
/**
|
|
3696
3720
|
* Path to the section on the site
|
|
3697
3721
|
* @minLength 1
|
|
@@ -3742,6 +3766,8 @@ export interface SiteSection {
|
|
|
3742
3766
|
id: string;
|
|
3743
3767
|
/** Title of the site section */
|
|
3744
3768
|
title: SiteSectionTitle;
|
|
3769
|
+
/** Description of the site section */
|
|
3770
|
+
description?: SiteSectionDescription;
|
|
3745
3771
|
/** Whether this is the default section for the site */
|
|
3746
3772
|
default?: boolean;
|
|
3747
3773
|
/** Path to the section on the site */
|
|
@@ -3762,9 +3788,27 @@ export interface SiteSection {
|
|
|
3762
3788
|
/** Name of the icon */
|
|
3763
3789
|
icon?: Icon;
|
|
3764
3790
|
}
|
|
3791
|
+
/**
|
|
3792
|
+
* Title of the site section group
|
|
3793
|
+
* @minLength 1
|
|
3794
|
+
* @maxLength 100
|
|
3795
|
+
*/
|
|
3796
|
+
export type SiteSectionGroupTitle = string;
|
|
3797
|
+
export interface SiteSectionGroup {
|
|
3798
|
+
/** The object type, which is always "site-section-group" */
|
|
3799
|
+
object: 'site-section-group';
|
|
3800
|
+
/** Unique identifier of the site section group */
|
|
3801
|
+
id: string;
|
|
3802
|
+
/** Title of the site section group */
|
|
3803
|
+
title: SiteSectionGroupTitle;
|
|
3804
|
+
/** List of site section ids that are members of the group */
|
|
3805
|
+
sections: SiteSection[];
|
|
3806
|
+
/** Name of the icon */
|
|
3807
|
+
icon?: Icon;
|
|
3808
|
+
}
|
|
3765
3809
|
export type SiteStructure = {
|
|
3766
3810
|
type: 'sections';
|
|
3767
|
-
structure: SiteSection[];
|
|
3811
|
+
structure: (SiteSection | SiteSectionGroup)[];
|
|
3768
3812
|
} | {
|
|
3769
3813
|
type: 'siteSpaces';
|
|
3770
3814
|
structure: SiteSpace[];
|
|
@@ -3961,6 +4005,24 @@ export type BillingUpgrade = {
|
|
|
3961
4005
|
} | {
|
|
3962
4006
|
result: 'interval_changed';
|
|
3963
4007
|
};
|
|
4008
|
+
export interface MigrateOrganizationParameters {
|
|
4009
|
+
/** The desired billing interval */
|
|
4010
|
+
interval: BillingInterval;
|
|
4011
|
+
/** The new product to upgrade to */
|
|
4012
|
+
product: 'free_2024' | 'plus_2024' | 'pro_2024';
|
|
4013
|
+
/** Changes to apply to the organization and its sites before upgrading */
|
|
4014
|
+
changes: {
|
|
4015
|
+
/** A list of member identifiers to be removed */
|
|
4016
|
+
removeMembers: string[];
|
|
4017
|
+
/** A list of site updates to be applied before upgrading. If a site is not present in this list, it'll be upgraded to whichever type matches its features and its published status will be unchanged. When downgrading to a lower type all relevant paid features will be disabled before applying the new type. */
|
|
4018
|
+
updateSites: {
|
|
4019
|
+
/** The site identifier */
|
|
4020
|
+
id: string;
|
|
4021
|
+
/** The site type to migrate to */
|
|
4022
|
+
type: SiteType;
|
|
4023
|
+
}[];
|
|
4024
|
+
};
|
|
4025
|
+
}
|
|
3964
4026
|
/** These are all the features we check to determine the new pricing site type. */
|
|
3965
4027
|
export declare enum SiteToMigrateFeature {
|
|
3966
4028
|
Sections = "sections",
|
|
@@ -4476,24 +4538,6 @@ export type SitePublishingAuthUpdate = (VisitorAuthCustomBackend | VisitorAuthIn
|
|
|
4476
4538
|
*/
|
|
4477
4539
|
fallbackURL?: string;
|
|
4478
4540
|
};
|
|
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
4541
|
export type SiteSearchScope = {
|
|
4498
4542
|
/** 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
4543
|
mode: 'default';
|
|
@@ -4511,6 +4555,16 @@ export type SiteSpaceCustomizationSettings = SiteCustomizationSettings & {
|
|
|
4511
4555
|
/** Indicates whether the site customization settings have been overridden. */
|
|
4512
4556
|
hasOverrides: boolean;
|
|
4513
4557
|
};
|
|
4558
|
+
export interface SiteSectionGroupPointer {
|
|
4559
|
+
type: 'site-section' | 'site-section-group';
|
|
4560
|
+
/** Unique identifier for the site section */
|
|
4561
|
+
id: string;
|
|
4562
|
+
}
|
|
4563
|
+
/** Position at which to move the site section group. */
|
|
4564
|
+
export interface SiteSectionGroupMovePosition {
|
|
4565
|
+
before?: SiteSectionGroupPointer;
|
|
4566
|
+
after?: SiteSectionGroupPointer;
|
|
4567
|
+
}
|
|
4514
4568
|
export interface SiteSectionPointer {
|
|
4515
4569
|
type: 'site-section';
|
|
4516
4570
|
/** Unique identifier for the site section */
|
|
@@ -5388,6 +5442,10 @@ export interface ContentPublishingAuth {
|
|
|
5388
5442
|
fallbackURL?: string;
|
|
5389
5443
|
}
|
|
5390
5444
|
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;
|
|
5445
|
+
/** Dependency for a computation, before its resolution. */
|
|
5446
|
+
export interface ComputedContentDependency {
|
|
5447
|
+
ref: ComputedContentDependencyRef;
|
|
5448
|
+
}
|
|
5391
5449
|
export type InputPageBase = {
|
|
5392
5450
|
/**
|
|
5393
5451
|
* Optional unique identifier for the page.
|
|
@@ -6066,6 +6124,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6066
6124
|
* @name SearchContent
|
|
6067
6125
|
* @summary Search content across spaces that is accessible by the currently authenticated target
|
|
6068
6126
|
* @request GET:/search
|
|
6127
|
+
* @deprecated
|
|
6069
6128
|
* @secure
|
|
6070
6129
|
*/
|
|
6071
6130
|
searchContent: (query: {
|
|
@@ -6107,6 +6166,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6107
6166
|
* @name AskQuery
|
|
6108
6167
|
* @summary Ask a question to an AI across spaces that is accessible by the currently authenticated target.
|
|
6109
6168
|
* @request POST:/search/ask
|
|
6169
|
+
* @deprecated
|
|
6110
6170
|
* @secure
|
|
6111
6171
|
*/
|
|
6112
6172
|
askQuery: (data: SearchAIQuery, query?: {
|
|
@@ -6388,6 +6448,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6388
6448
|
* @name GetRecommendedQuestionsInSpace
|
|
6389
6449
|
* @summary Get a list of questions that can be asked in a space.
|
|
6390
6450
|
* @request GET:/spaces/{spaceId}/search/questions
|
|
6451
|
+
* @deprecated
|
|
6391
6452
|
* @secure
|
|
6392
6453
|
*/
|
|
6393
6454
|
getRecommendedQuestionsInSpace: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<SearchAIRecommendedQuestions, Error>>;
|
|
@@ -6397,6 +6458,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6397
6458
|
* @name StreamRecommendedQuestionsInSpace
|
|
6398
6459
|
* @summary Stream a list of questions that can be asked in a space.
|
|
6399
6460
|
* @request GET:/spaces/{spaceId}/search/questions/stream
|
|
6461
|
+
* @deprecated
|
|
6400
6462
|
* @secure
|
|
6401
6463
|
*/
|
|
6402
6464
|
streamRecommendedQuestionsInSpace: (spaceId: string, params?: RequestParams) => EventIterator<SearchAIRecommendedQuestionStream>;
|
|
@@ -6443,6 +6505,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6443
6505
|
* @name GetContentAnalyticsForSpaceById
|
|
6444
6506
|
* @summary Get content analytics for a given space.
|
|
6445
6507
|
* @request GET:/spaces/{spaceId}/insights/content
|
|
6508
|
+
* @deprecated
|
|
6446
6509
|
* @secure
|
|
6447
6510
|
*/
|
|
6448
6511
|
getContentAnalyticsForSpaceById: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<AnalyticsContentPages, Error>>;
|
|
@@ -6453,6 +6516,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6453
6516
|
* @name GetSearchAnalyticsForSpaceById
|
|
6454
6517
|
* @summary Get an overview of the top search queries in a space.
|
|
6455
6518
|
* @request GET:/spaces/{spaceId}/insights/search
|
|
6519
|
+
* @deprecated
|
|
6456
6520
|
* @secure
|
|
6457
6521
|
*/
|
|
6458
6522
|
getSearchAnalyticsForSpaceById: (spaceId: string, query?: {
|
|
@@ -6465,6 +6529,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6465
6529
|
* @name GetTrafficAnalyticsForSpaceById
|
|
6466
6530
|
* @summary Get traffic page views for a given space
|
|
6467
6531
|
* @request GET:/spaces/{spaceId}/insights/traffic
|
|
6532
|
+
* @deprecated
|
|
6468
6533
|
* @secure
|
|
6469
6534
|
*/
|
|
6470
6535
|
getTrafficAnalyticsForSpaceById: (spaceId: string, query?: {
|
|
@@ -6477,6 +6542,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6477
6542
|
* @name TrackViewInSpaceById
|
|
6478
6543
|
* @summary Track a page view in a space
|
|
6479
6544
|
* @request POST:/spaces/{spaceId}/insights/track_view
|
|
6545
|
+
* @deprecated
|
|
6480
6546
|
* @secure
|
|
6481
6547
|
*/
|
|
6482
6548
|
trackViewInSpaceById: (spaceId: string, data: SpaceTrackPageView, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
@@ -6887,29 +6953,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6887
6953
|
* No description
|
|
6888
6954
|
*
|
|
6889
6955
|
* @name GetComputedDocument
|
|
6890
|
-
* @summary
|
|
6891
|
-
* @request
|
|
6956
|
+
* @summary Generate a document for a page in a computed content.
|
|
6957
|
+
* @request POST:/spaces/{spaceId}/content/computed/document
|
|
6892
6958
|
* @secure
|
|
6893
6959
|
*/
|
|
6894
|
-
getComputedDocument: (spaceId: string,
|
|
6960
|
+
getComputedDocument: (spaceId: string, data: {
|
|
6961
|
+
/** Parameters for a computed content */
|
|
6962
|
+
source: ComputedContentSource;
|
|
6963
|
+
}, query?: {
|
|
6895
6964
|
/** Output format for the content. */
|
|
6896
6965
|
format?: "document" | "markdown";
|
|
6897
|
-
/** LZ-string compressed JSON request */
|
|
6898
|
-
request: string;
|
|
6899
6966
|
}, params?: RequestParams) => Promise<HttpResponse<Document, Error>>;
|
|
6900
6967
|
/**
|
|
6901
6968
|
* No description
|
|
6902
6969
|
*
|
|
6903
|
-
* @name
|
|
6904
|
-
* @summary Get the computed
|
|
6905
|
-
* @request
|
|
6970
|
+
* @name GetComputedRevision
|
|
6971
|
+
* @summary Get the computed content for a source in a computed content.
|
|
6972
|
+
* @request POST:/spaces/{spaceId}/content/computed/revision
|
|
6906
6973
|
* @secure
|
|
6907
6974
|
*/
|
|
6908
|
-
|
|
6909
|
-
/**
|
|
6910
|
-
|
|
6911
|
-
/** LZ-string compressed JSON request */
|
|
6912
|
-
request: string;
|
|
6975
|
+
getComputedRevision: (spaceId: string, data: {
|
|
6976
|
+
/** Parameters for a computed content */
|
|
6977
|
+
source: ComputedContentSource;
|
|
6913
6978
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
6914
6979
|
pages: RevisionPage[];
|
|
6915
6980
|
files: RevisionFile[];
|
|
@@ -9439,41 +9504,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9439
9504
|
* @request POST:/orgs/{organizationId}/billing/migrate
|
|
9440
9505
|
* @secure
|
|
9441
9506
|
*/
|
|
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>>;
|
|
9507
|
+
migrateOrganizationPlan: (organizationId: string, data: MigrateOrganizationParameters, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
9460
9508
|
/**
|
|
9461
9509
|
* No description
|
|
9462
9510
|
*
|
|
9463
9511
|
* @tags organizations
|
|
9464
9512
|
* @name PreviewMigrateOrganizationPlan
|
|
9465
9513
|
* @summary Preview a migration of an organization to new pricing.
|
|
9466
|
-
* @request
|
|
9514
|
+
* @request POST:/orgs/{organizationId}/billing/migrate/preview
|
|
9467
9515
|
* @secure
|
|
9468
9516
|
*/
|
|
9469
|
-
previewMigrateOrganizationPlan: (organizationId: string,
|
|
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<{
|
|
9517
|
+
previewMigrateOrganizationPlan: (organizationId: string, data: MigrateOrganizationParameters, params?: RequestParams) => Promise<HttpResponse<{
|
|
9477
9518
|
totals: {
|
|
9478
9519
|
/** Count of all members */
|
|
9479
9520
|
members: number;
|
|
@@ -10094,6 +10135,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10094
10135
|
* @name ListSnippets
|
|
10095
10136
|
* @summary Lists snippets.
|
|
10096
10137
|
* @request GET:/orgs/{organizationId}/snippets
|
|
10138
|
+
* @deprecated
|
|
10097
10139
|
* @secure
|
|
10098
10140
|
*/
|
|
10099
10141
|
listSnippets: (organizationId: string, query?: {
|
|
@@ -10117,6 +10159,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10117
10159
|
* @name CreateSnippet
|
|
10118
10160
|
* @summary Create a new snippet
|
|
10119
10161
|
* @request POST:/orgs/{organizationId}/snippets
|
|
10162
|
+
* @deprecated
|
|
10120
10163
|
* @secure
|
|
10121
10164
|
*/
|
|
10122
10165
|
createSnippet: (organizationId: string, data: object, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
|
|
@@ -10127,6 +10170,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10127
10170
|
* @name GetSnippet
|
|
10128
10171
|
* @summary Get a snippet by its ID
|
|
10129
10172
|
* @request GET:/orgs/{organizationId}/snippets/{snippetId}
|
|
10173
|
+
* @deprecated
|
|
10130
10174
|
* @secure
|
|
10131
10175
|
*/
|
|
10132
10176
|
getSnippet: (organizationId: string, snippetId: string, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
|
|
@@ -10147,6 +10191,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10147
10191
|
* @name UpdateSnippet
|
|
10148
10192
|
* @summary Update an existing snippet.
|
|
10149
10193
|
* @request PUT:/orgs/{organizationId}/snippets/{snippetId}
|
|
10194
|
+
* @deprecated
|
|
10150
10195
|
* @secure
|
|
10151
10196
|
*/
|
|
10152
10197
|
updateSnippet: (organizationId: string, snippetId: string, data: UpdateSnippetSchema, params?: RequestParams) => Promise<HttpResponse<Snippet, Error>>;
|
|
@@ -10157,6 +10202,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10157
10202
|
* @name MoveSnippet
|
|
10158
10203
|
* @summary Move a snippet into a destination. The snippet will be archived in the process.
|
|
10159
10204
|
* @request POST:/orgs/{organizationId}/snippets/{snippetId}/move
|
|
10205
|
+
* @deprecated
|
|
10160
10206
|
* @secure
|
|
10161
10207
|
*/
|
|
10162
10208
|
moveSnippet: (organizationId: string, snippetId: string, data: {
|
|
@@ -10182,6 +10228,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10182
10228
|
* @name GetSnippetSuggestedLocations
|
|
10183
10229
|
* @summary Return possible snippet locations in an organization based on the current user.
|
|
10184
10230
|
* @request GET:/orgs/{organizationId}/snippets/{snippetId}/move
|
|
10231
|
+
* @deprecated
|
|
10185
10232
|
* @secure
|
|
10186
10233
|
*/
|
|
10187
10234
|
getSnippetSuggestedLocations: (organizationId: string, snippetId: string, query?: {
|
|
@@ -10761,6 +10808,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10761
10808
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
10762
10809
|
items: SiteSpace[];
|
|
10763
10810
|
}, Error>>;
|
|
10811
|
+
/**
|
|
10812
|
+
* No description
|
|
10813
|
+
*
|
|
10814
|
+
* @tags sites
|
|
10815
|
+
* @name ListSiteSectionGroups
|
|
10816
|
+
* @summary List all the section groups under a site in an organization
|
|
10817
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/section-groups
|
|
10818
|
+
* @secure
|
|
10819
|
+
*/
|
|
10820
|
+
listSiteSectionGroups: (organizationId: string, siteId: string, query?: {
|
|
10821
|
+
/** Identifier of the page results to fetch. */
|
|
10822
|
+
page?: string;
|
|
10823
|
+
/**
|
|
10824
|
+
* The number of results per page
|
|
10825
|
+
* @min 0
|
|
10826
|
+
* @max 1000
|
|
10827
|
+
*/
|
|
10828
|
+
limit?: number;
|
|
10829
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
10830
|
+
items: SiteSectionGroup[];
|
|
10831
|
+
}, Error>>;
|
|
10764
10832
|
/**
|
|
10765
10833
|
* No description
|
|
10766
10834
|
*
|
|
@@ -10800,6 +10868,29 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10800
10868
|
* @secure
|
|
10801
10869
|
*/
|
|
10802
10870
|
deleteSiteSectionGroupById: (organizationId: string, siteId: string, siteSectionGroupId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
10871
|
+
/**
|
|
10872
|
+
* No description
|
|
10873
|
+
*
|
|
10874
|
+
* @tags sites
|
|
10875
|
+
* @name AddSectionToGroup
|
|
10876
|
+
* @summary Add a section to a section group
|
|
10877
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/sections
|
|
10878
|
+
* @secure
|
|
10879
|
+
*/
|
|
10880
|
+
addSectionToGroup: (organizationId: string, siteId: string, siteSectionGroupId: string, data: {
|
|
10881
|
+
/** ID of the section to add to the section group */
|
|
10882
|
+
sectionId: string;
|
|
10883
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, Error>>;
|
|
10884
|
+
/**
|
|
10885
|
+
* No description
|
|
10886
|
+
*
|
|
10887
|
+
* @tags sites
|
|
10888
|
+
* @name RemoveSectionFromGroup
|
|
10889
|
+
* @summary Remove a section from a section group
|
|
10890
|
+
* @request DELETE:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/sections/{siteSectionId}
|
|
10891
|
+
* @secure
|
|
10892
|
+
*/
|
|
10893
|
+
removeSectionFromGroup: (organizationId: string, siteId: string, siteSectionGroupId: string, siteSectionId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
10803
10894
|
/**
|
|
10804
10895
|
* No description
|
|
10805
10896
|
*
|
|
@@ -10860,6 +10951,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10860
10951
|
/** 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
10952
|
condition?: Condition | null;
|
|
10862
10953
|
icon?: Icon | null;
|
|
10954
|
+
description?: SiteSectionDescription | null;
|
|
10863
10955
|
}, params?: RequestParams) => Promise<HttpResponse<SiteSection, Error>>;
|
|
10864
10956
|
/**
|
|
10865
10957
|
* No description
|
|
@@ -11161,6 +11253,31 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11161
11253
|
createSitesPageFeedback: (organizationId: string, siteId: string, siteSpaceId: string, pageId: string, visitorId: string, data: {
|
|
11162
11254
|
rating: PageFeedbackRating;
|
|
11163
11255
|
}, params?: RequestParams) => Promise<HttpResponse<PageFeedback, Error>>;
|
|
11256
|
+
/**
|
|
11257
|
+
* No description
|
|
11258
|
+
*
|
|
11259
|
+
* @tags sites
|
|
11260
|
+
* @name MoveSiteSectionGroup
|
|
11261
|
+
* @summary Move a site section group to a new position in the site.
|
|
11262
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/move
|
|
11263
|
+
* @secure
|
|
11264
|
+
*/
|
|
11265
|
+
moveSiteSectionGroup: (organizationId: string, siteId: string, siteSectionGroupId: string, data: {
|
|
11266
|
+
/** The position where to move the site section group. When not provided the site section group is moved at the end of the site. */
|
|
11267
|
+
position?: SiteSectionGroupMovePosition;
|
|
11268
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, Error | {
|
|
11269
|
+
error: {
|
|
11270
|
+
/** @format int32 */
|
|
11271
|
+
code: 400;
|
|
11272
|
+
message: string;
|
|
11273
|
+
};
|
|
11274
|
+
} | {
|
|
11275
|
+
error: {
|
|
11276
|
+
/** @format int32 */
|
|
11277
|
+
code: 404;
|
|
11278
|
+
message: string;
|
|
11279
|
+
};
|
|
11280
|
+
}>>;
|
|
11164
11281
|
/**
|
|
11165
11282
|
* No description
|
|
11166
11283
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -265,7 +265,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
265
265
|
|
|
266
266
|
// package.json
|
|
267
267
|
var name = "@gitbook/api";
|
|
268
|
-
var version = "0.
|
|
268
|
+
var version = "0.92.0";
|
|
269
269
|
|
|
270
270
|
// src/client.ts
|
|
271
271
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -1550,19 +1550,22 @@ var Api = class extends HttpClient {
|
|
|
1550
1550
|
format: "json",
|
|
1551
1551
|
...params
|
|
1552
1552
|
}),
|
|
1553
|
-
getComputedDocument: (spaceId, query, params = {}) => this.request({
|
|
1553
|
+
getComputedDocument: (spaceId, data, query, params = {}) => this.request({
|
|
1554
1554
|
path: `/spaces/${spaceId}/content/computed/document`,
|
|
1555
|
-
method: "
|
|
1555
|
+
method: "POST",
|
|
1556
1556
|
query,
|
|
1557
|
+
body: data,
|
|
1557
1558
|
secure: true,
|
|
1559
|
+
type: "application/json" /* Json */,
|
|
1558
1560
|
format: "json",
|
|
1559
1561
|
...params
|
|
1560
1562
|
}),
|
|
1561
|
-
|
|
1562
|
-
path: `/spaces/${spaceId}/content/computed/
|
|
1563
|
-
method: "
|
|
1564
|
-
|
|
1563
|
+
getComputedRevision: (spaceId, data, params = {}) => this.request({
|
|
1564
|
+
path: `/spaces/${spaceId}/content/computed/revision`,
|
|
1565
|
+
method: "POST",
|
|
1566
|
+
body: data,
|
|
1565
1567
|
secure: true,
|
|
1568
|
+
type: "application/json" /* Json */,
|
|
1566
1569
|
format: "json",
|
|
1567
1570
|
...params
|
|
1568
1571
|
}),
|
|
@@ -2695,11 +2698,12 @@ var Api = class extends HttpClient {
|
|
|
2695
2698
|
type: "application/json" /* Json */,
|
|
2696
2699
|
...params
|
|
2697
2700
|
}),
|
|
2698
|
-
previewMigrateOrganizationPlan: (organizationId,
|
|
2699
|
-
path: `/orgs/${organizationId}/billing/migrate`,
|
|
2700
|
-
method: "
|
|
2701
|
-
|
|
2701
|
+
previewMigrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
|
|
2702
|
+
path: `/orgs/${organizationId}/billing/migrate/preview`,
|
|
2703
|
+
method: "POST",
|
|
2704
|
+
body: data,
|
|
2702
2705
|
secure: true,
|
|
2706
|
+
type: "application/json" /* Json */,
|
|
2703
2707
|
format: "json",
|
|
2704
2708
|
...params
|
|
2705
2709
|
}),
|
|
@@ -3283,6 +3287,14 @@ var Api = class extends HttpClient {
|
|
|
3283
3287
|
format: "json",
|
|
3284
3288
|
...params
|
|
3285
3289
|
}),
|
|
3290
|
+
listSiteSectionGroups: (organizationId, siteId, query, params = {}) => this.request({
|
|
3291
|
+
path: `/orgs/${organizationId}/sites/${siteId}/section-groups`,
|
|
3292
|
+
method: "GET",
|
|
3293
|
+
query,
|
|
3294
|
+
secure: true,
|
|
3295
|
+
format: "json",
|
|
3296
|
+
...params
|
|
3297
|
+
}),
|
|
3286
3298
|
addSectionGroupToSite: (organizationId, siteId, data, params = {}) => this.request({
|
|
3287
3299
|
path: `/orgs/${organizationId}/sites/${siteId}/section-groups`,
|
|
3288
3300
|
method: "POST",
|
|
@@ -3307,6 +3319,21 @@ var Api = class extends HttpClient {
|
|
|
3307
3319
|
secure: true,
|
|
3308
3320
|
...params
|
|
3309
3321
|
}),
|
|
3322
|
+
addSectionToGroup: (organizationId, siteId, siteSectionGroupId, data, params = {}) => this.request({
|
|
3323
|
+
path: `/orgs/${organizationId}/sites/${siteId}/section-groups/${siteSectionGroupId}/sections`,
|
|
3324
|
+
method: "POST",
|
|
3325
|
+
body: data,
|
|
3326
|
+
secure: true,
|
|
3327
|
+
type: "application/json" /* Json */,
|
|
3328
|
+
format: "json",
|
|
3329
|
+
...params
|
|
3330
|
+
}),
|
|
3331
|
+
removeSectionFromGroup: (organizationId, siteId, siteSectionGroupId, siteSectionId, params = {}) => this.request({
|
|
3332
|
+
path: `/orgs/${organizationId}/sites/${siteId}/section-groups/${siteSectionGroupId}/sections/${siteSectionId}`,
|
|
3333
|
+
method: "DELETE",
|
|
3334
|
+
secure: true,
|
|
3335
|
+
...params
|
|
3336
|
+
}),
|
|
3310
3337
|
addSectionToSite: (organizationId, siteId, data, params = {}) => this.request({
|
|
3311
3338
|
path: `/orgs/${organizationId}/sites/${siteId}/sections`,
|
|
3312
3339
|
method: "POST",
|
|
@@ -3426,6 +3453,15 @@ var Api = class extends HttpClient {
|
|
|
3426
3453
|
format: "json",
|
|
3427
3454
|
...params
|
|
3428
3455
|
}),
|
|
3456
|
+
moveSiteSectionGroup: (organizationId, siteId, siteSectionGroupId, data, params = {}) => this.request({
|
|
3457
|
+
path: `/orgs/${organizationId}/sites/${siteId}/section-groups/${siteSectionGroupId}/move`,
|
|
3458
|
+
method: "POST",
|
|
3459
|
+
body: data,
|
|
3460
|
+
secure: true,
|
|
3461
|
+
type: "application/json" /* Json */,
|
|
3462
|
+
format: "json",
|
|
3463
|
+
...params
|
|
3464
|
+
}),
|
|
3429
3465
|
moveSiteSection: (organizationId, siteId, siteSectionId, data, params = {}) => this.request({
|
|
3430
3466
|
path: `/orgs/${organizationId}/sites/${siteId}/sections/${siteSectionId}/move`,
|
|
3431
3467
|
method: "POST",
|