@gitbook/api 0.118.0 → 0.120.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 +105 -195
- package/dist/index.cjs +16 -66
- package/dist/index.js +16 -65
- package/package.json +1 -1
- package/spec/openapi.json +250 -621
- package/spec/openapi.yaml +147 -394
package/dist/client.d.ts
CHANGED
|
@@ -580,6 +580,15 @@ export interface DocumentInlineEmoji {
|
|
|
580
580
|
};
|
|
581
581
|
isVoid: true;
|
|
582
582
|
}
|
|
583
|
+
export interface DocumentInlineExpression {
|
|
584
|
+
object: 'inline';
|
|
585
|
+
type: 'expression';
|
|
586
|
+
key?: string;
|
|
587
|
+
data: {
|
|
588
|
+
expression: string;
|
|
589
|
+
};
|
|
590
|
+
isVoid: true;
|
|
591
|
+
}
|
|
583
592
|
export interface DocumentInlineMath {
|
|
584
593
|
object: 'inline';
|
|
585
594
|
type: 'inline-math';
|
|
@@ -597,7 +606,7 @@ export interface DocumentBlockParagraph {
|
|
|
597
606
|
isVoid?: false;
|
|
598
607
|
data?: object;
|
|
599
608
|
}
|
|
600
|
-
export type DocumentInline = DocumentInlineLink | DocumentInlineEmoji | DocumentInlineMath | DocumentInlineImage | DocumentInlineAnnotation | DocumentInlineMention | DocumentInlineButton;
|
|
609
|
+
export type DocumentInline = DocumentInlineLink | DocumentInlineEmoji | DocumentInlineExpression | DocumentInlineMath | DocumentInlineImage | DocumentInlineAnnotation | DocumentInlineMention | DocumentInlineButton;
|
|
601
610
|
export interface DocumentBlockHeading {
|
|
602
611
|
object: 'block';
|
|
603
612
|
type: 'heading-1' | 'heading-2' | 'heading-3';
|
|
@@ -1177,6 +1186,7 @@ export type RevisionPageDocument = RevisionPageBase & Document & {
|
|
|
1177
1186
|
git?: GitSyncBlob;
|
|
1178
1187
|
layout: RevisionPageLayoutOptions;
|
|
1179
1188
|
cover?: RevisionPageDocumentCover;
|
|
1189
|
+
variables?: Variables;
|
|
1180
1190
|
/**
|
|
1181
1191
|
* If true, the page is not displayed in the navigation, while still being accessible.
|
|
1182
1192
|
* @default false
|
|
@@ -1374,10 +1384,17 @@ export interface RevisionPageLayoutOptions {
|
|
|
1374
1384
|
}
|
|
1375
1385
|
export interface RevisionPageDocumentCover {
|
|
1376
1386
|
/** Content reference pointing to the source image. */
|
|
1377
|
-
ref?: ContentRefFile;
|
|
1378
|
-
/**
|
|
1387
|
+
ref?: ContentRefFile | ContentRefURL;
|
|
1388
|
+
/** Content reference pointing to the source image for dark mode. */
|
|
1389
|
+
refDark?: ContentRefFile | ContentRefURL;
|
|
1390
|
+
/**
|
|
1391
|
+
* Vertical position of the cover image.
|
|
1392
|
+
* @default 0
|
|
1393
|
+
*/
|
|
1379
1394
|
yPos: number;
|
|
1380
1395
|
}
|
|
1396
|
+
export type VariableValue = string | number | boolean;
|
|
1397
|
+
export type Variables = Record<string, VariableValue>;
|
|
1381
1398
|
/** Parameters for an OpenAPI computed document */
|
|
1382
1399
|
export type ComputedContentSourceDocumentOpenAPI = ComputedContentSourceOpenAPIBase & {
|
|
1383
1400
|
props: {
|
|
@@ -1462,6 +1479,7 @@ export interface RevisionBase {
|
|
|
1462
1479
|
pages: RevisionPage[];
|
|
1463
1480
|
files: RevisionFile[];
|
|
1464
1481
|
reusableContents: RevisionReusableContent[];
|
|
1482
|
+
variables?: Variables;
|
|
1465
1483
|
/** When the revision was created. */
|
|
1466
1484
|
createdAt: Timestamp;
|
|
1467
1485
|
/** Metadata about a potential associated git commit. */
|
|
@@ -2206,14 +2224,9 @@ export interface ChangeAttributeRevisionPageLayout {
|
|
|
2206
2224
|
before?: RevisionPageLayout;
|
|
2207
2225
|
after?: RevisionPageLayout;
|
|
2208
2226
|
}
|
|
2209
|
-
export
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
value: CustomFieldValue;
|
|
2213
|
-
}>;
|
|
2214
|
-
after?: Record<string, {
|
|
2215
|
-
value: CustomFieldValue;
|
|
2216
|
-
}>;
|
|
2227
|
+
export interface ChangeAttributeVariables {
|
|
2228
|
+
before?: Variables;
|
|
2229
|
+
after?: Variables;
|
|
2217
2230
|
}
|
|
2218
2231
|
export interface RevisionPageDocumentChangeAttributes {
|
|
2219
2232
|
title?: ChangeAttributeString;
|
|
@@ -2223,13 +2236,12 @@ export interface RevisionPageDocumentChangeAttributes {
|
|
|
2223
2236
|
cover?: ChangeAttributeRevisionPageDocumentCover;
|
|
2224
2237
|
emoji?: ChangeAttributeString;
|
|
2225
2238
|
layout?: ChangeAttributeRevisionPageLayout;
|
|
2226
|
-
|
|
2239
|
+
variables?: ChangeAttributeVariables;
|
|
2227
2240
|
}
|
|
2228
2241
|
export interface RevisionPageGroupChangeAttributes {
|
|
2229
2242
|
title?: ChangeAttributeString;
|
|
2230
2243
|
emoji?: ChangeAttributeString;
|
|
2231
2244
|
slug?: ChangeAttributeString;
|
|
2232
|
-
customFields?: ChangeAttributeCustomFields;
|
|
2233
2245
|
}
|
|
2234
2246
|
export interface ChangeAttributeContentReference {
|
|
2235
2247
|
/** A relative reference to content in GitBook. */
|
|
@@ -2241,7 +2253,6 @@ export interface RevisionPageLinkChangeAttributes {
|
|
|
2241
2253
|
title?: ChangeAttributeString;
|
|
2242
2254
|
emoji?: ChangeAttributeString;
|
|
2243
2255
|
target?: ChangeAttributeContentReference;
|
|
2244
|
-
customFields?: ChangeAttributeCustomFields;
|
|
2245
2256
|
}
|
|
2246
2257
|
export interface RevisionSemanticChangePageEdited {
|
|
2247
2258
|
type: 'page_edited';
|
|
@@ -2298,9 +2309,13 @@ export interface RevisionSemanticChangeFileDeleted {
|
|
|
2298
2309
|
type: 'file_deleted';
|
|
2299
2310
|
file: ChangedRevisionFile;
|
|
2300
2311
|
}
|
|
2301
|
-
export interface
|
|
2302
|
-
|
|
2303
|
-
|
|
2312
|
+
export interface ChangeAttributeVariable {
|
|
2313
|
+
before?: VariableValue;
|
|
2314
|
+
after?: VariableValue;
|
|
2315
|
+
}
|
|
2316
|
+
export interface RevisionSemanticChangeVariablesEdited {
|
|
2317
|
+
type: 'variables_edited';
|
|
2318
|
+
variables: Record<string, ChangeAttributeVariable>;
|
|
2304
2319
|
}
|
|
2305
2320
|
export interface ChangedRevisionReusableContent {
|
|
2306
2321
|
id: string;
|
|
@@ -2324,7 +2339,7 @@ export interface RevisionSemanticChangeReusableContentEdited {
|
|
|
2324
2339
|
reusableContent: ChangedRevisionReusableContent;
|
|
2325
2340
|
attributes: RevisionReusableContentChangeAttributes;
|
|
2326
2341
|
}
|
|
2327
|
-
export type RevisionSemanticChange = RevisionSemanticChangePageCreated | RevisionSemanticChangePageEdited | RevisionSemanticChangePageDeleted | RevisionSemanticChangePageMoved | RevisionSemanticChangeFileCreated | RevisionSemanticChangeFileEdited | RevisionSemanticChangeFileDeleted |
|
|
2342
|
+
export type RevisionSemanticChange = RevisionSemanticChangePageCreated | RevisionSemanticChangePageEdited | RevisionSemanticChangePageDeleted | RevisionSemanticChangePageMoved | RevisionSemanticChangeFileCreated | RevisionSemanticChangeFileEdited | RevisionSemanticChangeFileDeleted | RevisionSemanticChangeVariablesEdited | RevisionSemanticChangeReusableContentCreated | RevisionSemanticChangeReusableContentDeleted | RevisionSemanticChangeReusableContentEdited;
|
|
2328
2343
|
export interface RevisionSemanticChanges {
|
|
2329
2344
|
changes: RevisionSemanticChange[];
|
|
2330
2345
|
/** How many changes were omitted because above the result limit */
|
|
@@ -2612,67 +2627,6 @@ export interface SpaceIntegrationScript {
|
|
|
2612
2627
|
/** If true, the script will potentially load use cookies and visitors should be aware. */
|
|
2613
2628
|
cookies: boolean;
|
|
2614
2629
|
}
|
|
2615
|
-
/**
|
|
2616
|
-
* @minLength 1
|
|
2617
|
-
* @maxLength 50
|
|
2618
|
-
* @pattern ^[a-z_\-0-9]+$
|
|
2619
|
-
*/
|
|
2620
|
-
export type CustomFieldName = string;
|
|
2621
|
-
/** @maxLength 100 */
|
|
2622
|
-
export type CustomFieldTitle = string;
|
|
2623
|
-
/** @maxLength 200 */
|
|
2624
|
-
export type CustomFieldDescription = string;
|
|
2625
|
-
export declare enum CustomFieldType {
|
|
2626
|
-
Text = "text",
|
|
2627
|
-
Number = "number",
|
|
2628
|
-
Boolean = "boolean",
|
|
2629
|
-
Tags = "tags",
|
|
2630
|
-
SelectMulti = "select:multi",
|
|
2631
|
-
SelectSingle = "select:single"
|
|
2632
|
-
}
|
|
2633
|
-
/** @maxLength 100 */
|
|
2634
|
-
export type CustomFieldPlaceholder = string;
|
|
2635
|
-
/**
|
|
2636
|
-
* @maxItems 50
|
|
2637
|
-
* @minItems 1
|
|
2638
|
-
*/
|
|
2639
|
-
export type CustomFieldOptions = string[];
|
|
2640
|
-
/** Custom field */
|
|
2641
|
-
export interface CustomField {
|
|
2642
|
-
id: string;
|
|
2643
|
-
name: CustomFieldName;
|
|
2644
|
-
title: CustomFieldTitle;
|
|
2645
|
-
description: CustomFieldDescription;
|
|
2646
|
-
type: CustomFieldType;
|
|
2647
|
-
placeholder: CustomFieldPlaceholder;
|
|
2648
|
-
options?: CustomFieldOptions;
|
|
2649
|
-
createdAt: Timestamp;
|
|
2650
|
-
updatedAt: Timestamp;
|
|
2651
|
-
/** URLs associated with the object */
|
|
2652
|
-
urls: {
|
|
2653
|
-
/**
|
|
2654
|
-
* URL of the custom field in the API
|
|
2655
|
-
* @format uri
|
|
2656
|
-
*/
|
|
2657
|
-
location: string;
|
|
2658
|
-
};
|
|
2659
|
-
permissions?: {
|
|
2660
|
-
/** Whether the user can view the object */
|
|
2661
|
-
view: boolean;
|
|
2662
|
-
/** Whether the user can edit the object */
|
|
2663
|
-
edit: boolean;
|
|
2664
|
-
};
|
|
2665
|
-
}
|
|
2666
|
-
export type CustomFieldValues = {
|
|
2667
|
-
/** Custom field */
|
|
2668
|
-
customField: CustomField;
|
|
2669
|
-
value?: CustomFieldValue;
|
|
2670
|
-
}[];
|
|
2671
|
-
export interface UpdateCustomFieldValues {
|
|
2672
|
-
values: Record<string, {
|
|
2673
|
-
value: CustomFieldValue;
|
|
2674
|
-
}>;
|
|
2675
|
-
}
|
|
2676
2630
|
/** Secrets stored on the integration and passed at runtime. */
|
|
2677
2631
|
export type IntegrationSecrets = Record<string, string>;
|
|
2678
2632
|
export interface PublishIntegration {
|
|
@@ -4614,12 +4568,6 @@ export type BillingOperationPreviewResponse = {
|
|
|
4614
4568
|
/** User must checkout to complete the operation. */
|
|
4615
4569
|
type: 'checkout';
|
|
4616
4570
|
invoice?: BillingInvoicePreview;
|
|
4617
|
-
} | {
|
|
4618
|
-
/** User needs to go through the legacy upgrade flow. */
|
|
4619
|
-
type: 'legacy-upgrade';
|
|
4620
|
-
/** The plan the user must upgrade to. */
|
|
4621
|
-
plan: BillingProduct;
|
|
4622
|
-
invoice?: BillingInvoicePreview;
|
|
4623
4571
|
};
|
|
4624
4572
|
export type SiteAdaptiveJSONSchemaClaimsProperties = {
|
|
4625
4573
|
type: 'boolean';
|
|
@@ -4658,6 +4606,13 @@ export interface SiteAdaptiveSchema {
|
|
|
4658
4606
|
/** When the adaptive schema was updated. */
|
|
4659
4607
|
updatedAt: Timestamp;
|
|
4660
4608
|
}
|
|
4609
|
+
/** A template condition based on the site visitor schema. */
|
|
4610
|
+
export interface SiteAdaptiveTemplateCondition {
|
|
4611
|
+
/** A short description of the suggested condition. */
|
|
4612
|
+
description: string;
|
|
4613
|
+
/** The suggested condition. */
|
|
4614
|
+
condition: string;
|
|
4615
|
+
}
|
|
4661
4616
|
/**
|
|
4662
4617
|
* The theme to apply to the site. Supercedes the old header preset themes.
|
|
4663
4618
|
* - `clean`: Modern theme featuring translucency and minimally-styled elements.
|
|
@@ -6404,10 +6359,6 @@ export interface SpacePublishingCustomizationChannel {
|
|
|
6404
6359
|
channel: 'space-publishing-customization';
|
|
6405
6360
|
space: string;
|
|
6406
6361
|
}
|
|
6407
|
-
export interface SpaceCustomFieldsChannel {
|
|
6408
|
-
channel: 'space-customfields';
|
|
6409
|
-
space: string;
|
|
6410
|
-
}
|
|
6411
6362
|
export interface SpaceContentRefsChannel {
|
|
6412
6363
|
channel: 'space-content-refs';
|
|
6413
6364
|
space: string;
|
|
@@ -6416,10 +6367,6 @@ export interface SpaceIntegrationsChannel {
|
|
|
6416
6367
|
channel: 'space-integrations';
|
|
6417
6368
|
space: string;
|
|
6418
6369
|
}
|
|
6419
|
-
export interface OrganizationCustomFieldsChannel {
|
|
6420
|
-
channel: 'organization-customfields';
|
|
6421
|
-
organization: string;
|
|
6422
|
-
}
|
|
6423
6370
|
export interface UserAPITokensChannel {
|
|
6424
6371
|
channel: 'user-api-tokens';
|
|
6425
6372
|
user: string;
|
|
@@ -6697,7 +6644,7 @@ export interface AgentTasksChannel {
|
|
|
6697
6644
|
organization: string;
|
|
6698
6645
|
}
|
|
6699
6646
|
/** Channel to subscribe to for realtime updates. */
|
|
6700
|
-
export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel |
|
|
6647
|
+
export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | OrganizationOpenAPISpecsChannel | OrganizationTranslationSettingsChannel | OrganizationCustomFontsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SiteAdaptiveSchemaChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel | OpenAPISpecChannel | SubdomainChannel | TranslationSettingsChannel | AgentTaskChannel | AgentTasksChannel;
|
|
6701
6648
|
export interface GitSyncOperationChannelData {
|
|
6702
6649
|
channel: 'space-gitsync-operation';
|
|
6703
6650
|
data: GitSyncOperation;
|
|
@@ -6737,6 +6684,12 @@ export interface APIChannelMutationData {
|
|
|
6737
6684
|
}
|
|
6738
6685
|
/** Data passed through a realtime channel */
|
|
6739
6686
|
export type SubscriptionChannelData = GitSyncOperationChannelData | SpaceContentRefsChannelData | ChangeRequestContentRefsChannelData | OrganizationAIIndexationChannelData | APIChannelMutationData;
|
|
6687
|
+
/**
|
|
6688
|
+
* @minLength 1
|
|
6689
|
+
* @maxLength 50
|
|
6690
|
+
* @pattern ^[a-z_\-0-9]+$
|
|
6691
|
+
*/
|
|
6692
|
+
export type VariableName = string;
|
|
6740
6693
|
export interface CustomizationSettings {
|
|
6741
6694
|
/** Inherit customization settings from the parent collection. */
|
|
6742
6695
|
inherit: boolean;
|
|
@@ -6752,8 +6705,6 @@ export interface CustomizationSettings {
|
|
|
6752
6705
|
internationalization: {
|
|
6753
6706
|
/** Language for the UI element */
|
|
6754
6707
|
locale: CustomizationLocale;
|
|
6755
|
-
/** Inherit locale from the parent collection. */
|
|
6756
|
-
inherit: boolean;
|
|
6757
6708
|
};
|
|
6758
6709
|
favicon: CustomizationFavicon;
|
|
6759
6710
|
header: {
|
|
@@ -7544,6 +7495,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7544
7495
|
getPageById: (spaceId: string, pageId: string, query?: {
|
|
7545
7496
|
/** Output format for the content. */
|
|
7546
7497
|
format?: "document" | "markdown";
|
|
7498
|
+
/**
|
|
7499
|
+
* If `true` is passed, the document will be evaluated
|
|
7500
|
+
* @default false
|
|
7501
|
+
*/
|
|
7502
|
+
evaluated?: boolean;
|
|
7547
7503
|
/**
|
|
7548
7504
|
* If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
|
|
7549
7505
|
* @default true
|
|
@@ -7627,6 +7583,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7627
7583
|
getPageByPath: (spaceId: string, pagePath: string, query?: {
|
|
7628
7584
|
/** Output format for the content. */
|
|
7629
7585
|
format?: "document" | "markdown";
|
|
7586
|
+
/**
|
|
7587
|
+
* If `true` is passed, the document will be evaluated
|
|
7588
|
+
* @default false
|
|
7589
|
+
*/
|
|
7590
|
+
evaluated?: boolean;
|
|
7630
7591
|
/**
|
|
7631
7592
|
* If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
|
|
7632
7593
|
* @default true
|
|
@@ -8232,6 +8193,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8232
8193
|
getPageInChangeRequestById: (spaceId: string, changeRequestId: string, pageId: string, query?: {
|
|
8233
8194
|
/** Output format for the content. */
|
|
8234
8195
|
format?: "document" | "markdown";
|
|
8196
|
+
/**
|
|
8197
|
+
* If `true` is passed, the document will be evaluated
|
|
8198
|
+
* @default false
|
|
8199
|
+
*/
|
|
8200
|
+
evaluated?: boolean;
|
|
8235
8201
|
/**
|
|
8236
8202
|
* If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
|
|
8237
8203
|
* @default true
|
|
@@ -8308,6 +8274,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8308
8274
|
getPageInChangeRequestByPath: (spaceId: string, changeRequestId: string, pagePath: string, query?: {
|
|
8309
8275
|
/** Output format for the content. */
|
|
8310
8276
|
format?: "document" | "markdown";
|
|
8277
|
+
/**
|
|
8278
|
+
* If `true` is passed, the document will be evaluated
|
|
8279
|
+
* @default false
|
|
8280
|
+
*/
|
|
8281
|
+
evaluated?: boolean;
|
|
8311
8282
|
/**
|
|
8312
8283
|
* If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
|
|
8313
8284
|
* @default true
|
|
@@ -8492,6 +8463,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8492
8463
|
getPageInRevisionById: (spaceId: string, revisionId: string, pageId: string, query?: {
|
|
8493
8464
|
/** Output format for the content. */
|
|
8494
8465
|
format?: "document" | "markdown";
|
|
8466
|
+
/**
|
|
8467
|
+
* If `true` is passed, the document will be evaluated
|
|
8468
|
+
* @default false
|
|
8469
|
+
*/
|
|
8470
|
+
evaluated?: boolean;
|
|
8495
8471
|
/**
|
|
8496
8472
|
* If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
|
|
8497
8473
|
* @default true
|
|
@@ -8503,6 +8479,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8503
8479
|
*/
|
|
8504
8480
|
computed?: boolean;
|
|
8505
8481
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionPage, any>>;
|
|
8482
|
+
/**
|
|
8483
|
+
* No description
|
|
8484
|
+
*
|
|
8485
|
+
* @tags space-content
|
|
8486
|
+
* @name GetPageDocumentInRevisionById
|
|
8487
|
+
* @summary Get the document of a page in a revision
|
|
8488
|
+
* @request GET:/spaces/{spaceId}/revisions/{revisionId}/page/{pageId}/document
|
|
8489
|
+
* @secure
|
|
8490
|
+
*/
|
|
8491
|
+
getPageDocumentInRevisionById: (spaceId: string, revisionId: string, pageId: string, query?: {
|
|
8492
|
+
/**
|
|
8493
|
+
* If `true` is passed, the document will be evaluated
|
|
8494
|
+
* @default false
|
|
8495
|
+
*/
|
|
8496
|
+
evaluated?: boolean;
|
|
8497
|
+
}, params?: RequestParams) => Promise<HttpResponse<JSONDocument, any>>;
|
|
8506
8498
|
/**
|
|
8507
8499
|
* No description
|
|
8508
8500
|
*
|
|
@@ -8515,6 +8507,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8515
8507
|
getPageInRevisionByPath: (spaceId: string, revisionId: string, pagePath: string, query?: {
|
|
8516
8508
|
/** Output format for the content. */
|
|
8517
8509
|
format?: "document" | "markdown";
|
|
8510
|
+
/**
|
|
8511
|
+
* If `true` is passed, the document will be evaluated
|
|
8512
|
+
* @default false
|
|
8513
|
+
*/
|
|
8514
|
+
evaluated?: boolean;
|
|
8518
8515
|
/**
|
|
8519
8516
|
* If `false` is passed, "git" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.
|
|
8520
8517
|
* @default true
|
|
@@ -8805,26 +8802,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8805
8802
|
message: string;
|
|
8806
8803
|
};
|
|
8807
8804
|
}>>;
|
|
8808
|
-
/**
|
|
8809
|
-
* No description
|
|
8810
|
-
*
|
|
8811
|
-
* @tags custom-fields
|
|
8812
|
-
* @name GetSpaceCustomFields
|
|
8813
|
-
* @summary Get a space custom fields
|
|
8814
|
-
* @request GET:/spaces/{spaceId}/custom-fields
|
|
8815
|
-
* @secure
|
|
8816
|
-
*/
|
|
8817
|
-
getSpaceCustomFields: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<CustomFieldValues, any>>;
|
|
8818
|
-
/**
|
|
8819
|
-
* No description
|
|
8820
|
-
*
|
|
8821
|
-
* @tags custom-fields
|
|
8822
|
-
* @name UpdateSpaceCustomFields
|
|
8823
|
-
* @summary Update a space custom fields
|
|
8824
|
-
* @request PATCH:/spaces/{spaceId}/custom-fields
|
|
8825
|
-
* @secure
|
|
8826
|
-
*/
|
|
8827
|
-
updateSpaceCustomFields: (spaceId: string, data: UpdateCustomFieldValues, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
8828
8805
|
/**
|
|
8829
8806
|
* No description
|
|
8830
8807
|
*
|
|
@@ -10265,85 +10242,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10265
10242
|
/** ID of a parent collection */
|
|
10266
10243
|
parent?: string;
|
|
10267
10244
|
}, params?: RequestParams) => Promise<HttpResponse<Collection, any>>;
|
|
10268
|
-
/**
|
|
10269
|
-
* No description
|
|
10270
|
-
*
|
|
10271
|
-
* @tags custom-fields
|
|
10272
|
-
* @name ListOrganizationCustomFields
|
|
10273
|
-
* @summary List all custom fields
|
|
10274
|
-
* @request GET:/orgs/{organizationId}/custom-fields
|
|
10275
|
-
* @secure
|
|
10276
|
-
*/
|
|
10277
|
-
listOrganizationCustomFields: (organizationId: string, query?: {
|
|
10278
|
-
/** Identifier of the page results to fetch. */
|
|
10279
|
-
page?: string;
|
|
10280
|
-
/**
|
|
10281
|
-
* The number of results per page
|
|
10282
|
-
* @min 0
|
|
10283
|
-
* @max 1000
|
|
10284
|
-
*/
|
|
10285
|
-
limit?: number;
|
|
10286
|
-
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
10287
|
-
items: CustomField[];
|
|
10288
|
-
}, any>>;
|
|
10289
|
-
/**
|
|
10290
|
-
* No description
|
|
10291
|
-
*
|
|
10292
|
-
* @tags custom-fields
|
|
10293
|
-
* @name CreateOrganizationCustomField
|
|
10294
|
-
* @summary Create a custom field
|
|
10295
|
-
* @request POST:/orgs/{organizationId}/custom-fields
|
|
10296
|
-
* @secure
|
|
10297
|
-
*/
|
|
10298
|
-
createOrganizationCustomField: (organizationId: string, data: {
|
|
10299
|
-
name: CustomFieldName;
|
|
10300
|
-
type: CustomFieldType;
|
|
10301
|
-
title?: CustomFieldTitle;
|
|
10302
|
-
description?: CustomFieldDescription;
|
|
10303
|
-
placeholder?: CustomFieldPlaceholder;
|
|
10304
|
-
options?: CustomFieldOptions;
|
|
10305
|
-
}, params?: RequestParams) => Promise<HttpResponse<CustomField, any>>;
|
|
10306
|
-
/**
|
|
10307
|
-
* No description
|
|
10308
|
-
*
|
|
10309
|
-
* @tags custom-fields
|
|
10310
|
-
* @name GetOrganizationCustomFieldByName
|
|
10311
|
-
* @summary Get a custom field by its name
|
|
10312
|
-
* @request GET:/orgs/{organizationId}/custom-fields/{fieldName}
|
|
10313
|
-
* @secure
|
|
10314
|
-
*/
|
|
10315
|
-
getOrganizationCustomFieldByName: (organizationId: string, fieldName: string, params?: RequestParams) => Promise<HttpResponse<CustomField, {
|
|
10316
|
-
error: {
|
|
10317
|
-
/** @format int32 */
|
|
10318
|
-
code: 404;
|
|
10319
|
-
message: string;
|
|
10320
|
-
};
|
|
10321
|
-
}>>;
|
|
10322
|
-
/**
|
|
10323
|
-
* No description
|
|
10324
|
-
*
|
|
10325
|
-
* @tags custom-fields
|
|
10326
|
-
* @name UpdateOrganizationCustomField
|
|
10327
|
-
* @summary Update a custom field
|
|
10328
|
-
* @request PATCH:/orgs/{organizationId}/custom-fields/{fieldName}
|
|
10329
|
-
* @secure
|
|
10330
|
-
*/
|
|
10331
|
-
updateOrganizationCustomField: (organizationId: string, fieldName: string, data: {
|
|
10332
|
-
title?: CustomFieldTitle;
|
|
10333
|
-
description?: CustomFieldDescription;
|
|
10334
|
-
placeholder?: CustomFieldPlaceholder;
|
|
10335
|
-
options?: CustomFieldOptions;
|
|
10336
|
-
}, params?: RequestParams) => Promise<HttpResponse<CustomField, any>>;
|
|
10337
|
-
/**
|
|
10338
|
-
* No description
|
|
10339
|
-
*
|
|
10340
|
-
* @tags custom-fields
|
|
10341
|
-
* @name DeleteOrganizationCustomField
|
|
10342
|
-
* @summary Delete a custom field
|
|
10343
|
-
* @request DELETE:/orgs/{organizationId}/custom-fields/{fieldName}
|
|
10344
|
-
* @secure
|
|
10345
|
-
*/
|
|
10346
|
-
deleteOrganizationCustomField: (organizationId: string, fieldName: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
10347
10245
|
/**
|
|
10348
10246
|
* No description
|
|
10349
10247
|
*
|
|
@@ -11396,6 +11294,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11396
11294
|
message: string;
|
|
11397
11295
|
};
|
|
11398
11296
|
}>>;
|
|
11297
|
+
/**
|
|
11298
|
+
* No description
|
|
11299
|
+
*
|
|
11300
|
+
* @tags sites
|
|
11301
|
+
* @name ListSiteAdaptiveTemplateConditions
|
|
11302
|
+
* @summary List templates of conditions generated based on the site visitor schema that can be used in adaptive content expressions.
|
|
11303
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/adaptive-schema/template-conditions
|
|
11304
|
+
* @secure
|
|
11305
|
+
*/
|
|
11306
|
+
listSiteAdaptiveTemplateConditions: (organizationId: string, siteId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
11307
|
+
items: SiteAdaptiveTemplateCondition[];
|
|
11308
|
+
}, any>>;
|
|
11399
11309
|
/**
|
|
11400
11310
|
* @description Get the complete profile of a site in an organization to provide the published experience. It includes site, customization, structure, integration scripts etc.
|
|
11401
11311
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -199,7 +199,6 @@ __export(src_exports, {
|
|
|
199
199
|
ContentReferenceStatus: () => ContentReferenceStatus,
|
|
200
200
|
ContentType: () => ContentType,
|
|
201
201
|
ContentVisibility: () => ContentVisibility,
|
|
202
|
-
CustomFieldType: () => CustomFieldType,
|
|
203
202
|
CustomHostnameDnsStatus: () => CustomHostnameDnsStatus,
|
|
204
203
|
CustomHostnameErrorStatus: () => CustomHostnameErrorStatus,
|
|
205
204
|
CustomHostnameSslStatus: () => CustomHostnameSslStatus,
|
|
@@ -271,7 +270,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
271
270
|
|
|
272
271
|
// package.json
|
|
273
272
|
var name = "@gitbook/api";
|
|
274
|
-
var version = "0.
|
|
273
|
+
var version = "0.120.0";
|
|
275
274
|
|
|
276
275
|
// src/client.ts
|
|
277
276
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -611,15 +610,6 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
|
611
610
|
IntegrationCategory2["Other"] = "other";
|
|
612
611
|
return IntegrationCategory2;
|
|
613
612
|
})(IntegrationCategory || {});
|
|
614
|
-
var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
|
|
615
|
-
CustomFieldType2["Text"] = "text";
|
|
616
|
-
CustomFieldType2["Number"] = "number";
|
|
617
|
-
CustomFieldType2["Boolean"] = "boolean";
|
|
618
|
-
CustomFieldType2["Tags"] = "tags";
|
|
619
|
-
CustomFieldType2["SelectMulti"] = "select:multi";
|
|
620
|
-
CustomFieldType2["SelectSingle"] = "select:single";
|
|
621
|
-
return CustomFieldType2;
|
|
622
|
-
})(CustomFieldType || {});
|
|
623
613
|
var IntegrationInstallationStatus = /* @__PURE__ */ ((IntegrationInstallationStatus2) => {
|
|
624
614
|
IntegrationInstallationStatus2["Active"] = "active";
|
|
625
615
|
IntegrationInstallationStatus2["Pending"] = "pending";
|
|
@@ -1876,6 +1866,14 @@ var Api = class extends HttpClient {
|
|
|
1876
1866
|
format: "json",
|
|
1877
1867
|
...params
|
|
1878
1868
|
}),
|
|
1869
|
+
getPageDocumentInRevisionById: (spaceId, revisionId, pageId, query, params = {}) => this.request({
|
|
1870
|
+
path: `/spaces/${spaceId}/revisions/${revisionId}/page/${pageId}/document`,
|
|
1871
|
+
method: "GET",
|
|
1872
|
+
query,
|
|
1873
|
+
secure: true,
|
|
1874
|
+
format: "json",
|
|
1875
|
+
...params
|
|
1876
|
+
}),
|
|
1879
1877
|
getPageInRevisionByPath: (spaceId, revisionId, pagePath, query, params = {}) => this.request({
|
|
1880
1878
|
path: `/spaces/${spaceId}/revisions/${revisionId}/path/${pagePath}`,
|
|
1881
1879
|
method: "GET",
|
|
@@ -2018,21 +2016,6 @@ var Api = class extends HttpClient {
|
|
|
2018
2016
|
format: "json",
|
|
2019
2017
|
...params
|
|
2020
2018
|
}),
|
|
2021
|
-
getSpaceCustomFields: (spaceId, params = {}) => this.request({
|
|
2022
|
-
path: `/spaces/${spaceId}/custom-fields`,
|
|
2023
|
-
method: "GET",
|
|
2024
|
-
secure: true,
|
|
2025
|
-
format: "json",
|
|
2026
|
-
...params
|
|
2027
|
-
}),
|
|
2028
|
-
updateSpaceCustomFields: (spaceId, data, params = {}) => this.request({
|
|
2029
|
-
path: `/spaces/${spaceId}/custom-fields`,
|
|
2030
|
-
method: "PATCH",
|
|
2031
|
-
body: data,
|
|
2032
|
-
secure: true,
|
|
2033
|
-
type: "application/json" /* Json */,
|
|
2034
|
-
...params
|
|
2035
|
-
}),
|
|
2036
2019
|
getSpacePdf: (spaceId, query, params = {}) => this.request({
|
|
2037
2020
|
path: `/spaces/${spaceId}/pdf`,
|
|
2038
2021
|
method: "GET",
|
|
@@ -2643,45 +2626,6 @@ var Api = class extends HttpClient {
|
|
|
2643
2626
|
format: "json",
|
|
2644
2627
|
...params
|
|
2645
2628
|
}),
|
|
2646
|
-
listOrganizationCustomFields: (organizationId, query, params = {}) => this.request({
|
|
2647
|
-
path: `/orgs/${organizationId}/custom-fields`,
|
|
2648
|
-
method: "GET",
|
|
2649
|
-
query,
|
|
2650
|
-
secure: true,
|
|
2651
|
-
format: "json",
|
|
2652
|
-
...params
|
|
2653
|
-
}),
|
|
2654
|
-
createOrganizationCustomField: (organizationId, data, params = {}) => this.request({
|
|
2655
|
-
path: `/orgs/${organizationId}/custom-fields`,
|
|
2656
|
-
method: "POST",
|
|
2657
|
-
body: data,
|
|
2658
|
-
secure: true,
|
|
2659
|
-
type: "application/json" /* Json */,
|
|
2660
|
-
format: "json",
|
|
2661
|
-
...params
|
|
2662
|
-
}),
|
|
2663
|
-
getOrganizationCustomFieldByName: (organizationId, fieldName, params = {}) => this.request({
|
|
2664
|
-
path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
|
|
2665
|
-
method: "GET",
|
|
2666
|
-
secure: true,
|
|
2667
|
-
format: "json",
|
|
2668
|
-
...params
|
|
2669
|
-
}),
|
|
2670
|
-
updateOrganizationCustomField: (organizationId, fieldName, data, params = {}) => this.request({
|
|
2671
|
-
path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
|
|
2672
|
-
method: "PATCH",
|
|
2673
|
-
body: data,
|
|
2674
|
-
secure: true,
|
|
2675
|
-
type: "application/json" /* Json */,
|
|
2676
|
-
format: "json",
|
|
2677
|
-
...params
|
|
2678
|
-
}),
|
|
2679
|
-
deleteOrganizationCustomField: (organizationId, fieldName, params = {}) => this.request({
|
|
2680
|
-
path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
|
|
2681
|
-
method: "DELETE",
|
|
2682
|
-
secure: true,
|
|
2683
|
-
...params
|
|
2684
|
-
}),
|
|
2685
2629
|
listOrganizationIntegrations: (organizationId, query, params = {}) => this.request({
|
|
2686
2630
|
path: `/orgs/${organizationId}/integrations`,
|
|
2687
2631
|
method: "GET",
|
|
@@ -3097,6 +3041,13 @@ var Api = class extends HttpClient {
|
|
|
3097
3041
|
format: "json",
|
|
3098
3042
|
...params
|
|
3099
3043
|
}),
|
|
3044
|
+
listSiteAdaptiveTemplateConditions: (organizationId, siteId, params = {}) => this.request({
|
|
3045
|
+
path: `/orgs/${organizationId}/sites/${siteId}/adaptive-schema/template-conditions`,
|
|
3046
|
+
method: "GET",
|
|
3047
|
+
secure: true,
|
|
3048
|
+
format: "json",
|
|
3049
|
+
...params
|
|
3050
|
+
}),
|
|
3100
3051
|
getPublishedContentSite: (organizationId, siteId, query, params = {}) => this.request({
|
|
3101
3052
|
path: `/orgs/${organizationId}/sites/${siteId}/published`,
|
|
3102
3053
|
method: "GET",
|
|
@@ -3695,7 +3646,6 @@ var GitBookAPI = class extends Api {
|
|
|
3695
3646
|
ContentReferenceStatus,
|
|
3696
3647
|
ContentType,
|
|
3697
3648
|
ContentVisibility,
|
|
3698
|
-
CustomFieldType,
|
|
3699
3649
|
CustomHostnameDnsStatus,
|
|
3700
3650
|
CustomHostnameErrorStatus,
|
|
3701
3651
|
CustomHostnameSslStatus,
|