@gitbook/api 0.12.0 → 0.14.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 +274 -26
- package/dist/index.cjs +94 -0
- package/dist/index.js +89 -0
- package/package.json +1 -1
- package/spec/openapi.json +1022 -126
- package/spec/openapi.yaml +604 -46
package/dist/client.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ export interface List {
|
|
|
15
15
|
* @format uri
|
|
16
16
|
*/
|
|
17
17
|
export declare type URL = string;
|
|
18
|
+
/**
|
|
19
|
+
* @pattern ^#(?:[0-9a-fA-F]{3}){1,2}$
|
|
20
|
+
*/
|
|
21
|
+
export declare type Color = string;
|
|
18
22
|
/**
|
|
19
23
|
* @format date
|
|
20
24
|
*/
|
|
@@ -400,20 +404,22 @@ export interface JSONDocument {
|
|
|
400
404
|
data: object;
|
|
401
405
|
nodes: DocumentBlocksTopLevels[];
|
|
402
406
|
}
|
|
403
|
-
export declare type
|
|
404
|
-
export declare type
|
|
405
|
-
export interface
|
|
407
|
+
export declare 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;
|
|
408
|
+
export declare type DocumentInline = DocumentInlineLink | DocumentInlineEmoji | DocumentInlineMath | DocumentInlineImage | DocumentInlineAnnotation | DocumentInlineMention;
|
|
409
|
+
export interface DocumentText {
|
|
406
410
|
object: 'text';
|
|
407
411
|
key?: string;
|
|
408
412
|
leaves: DocumentTextLeaf[];
|
|
409
413
|
}
|
|
410
|
-
export interface
|
|
414
|
+
export interface DocumentFragment {
|
|
411
415
|
object: 'fragment';
|
|
412
416
|
key?: string;
|
|
413
417
|
fragment?: string;
|
|
414
418
|
type?: string;
|
|
415
419
|
nodes: DocumentBlocksEssentials[];
|
|
416
420
|
}
|
|
421
|
+
export declare type DocumentBlocksEssentials = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockDivider;
|
|
422
|
+
export declare type DocumentBlocksTopLevels = DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTable | DocumentBlockSwagger | DocumentBlockContentRef | DocumentBlockIntegration;
|
|
417
423
|
export interface DocumentTextLeaf {
|
|
418
424
|
object: 'leaf';
|
|
419
425
|
text: string;
|
|
@@ -448,7 +454,7 @@ export interface DocumentInlineLink {
|
|
|
448
454
|
object: 'inline';
|
|
449
455
|
type: 'link';
|
|
450
456
|
key?: string;
|
|
451
|
-
nodes: (
|
|
457
|
+
nodes: (DocumentText | DocumentInlineImage)[];
|
|
452
458
|
data: {
|
|
453
459
|
ref: ContentRef;
|
|
454
460
|
};
|
|
@@ -497,20 +503,19 @@ export interface DocumentInlineAnnotation {
|
|
|
497
503
|
object: 'inline';
|
|
498
504
|
type: 'annotation';
|
|
499
505
|
key?: string;
|
|
500
|
-
fragments: (
|
|
506
|
+
fragments: (DocumentFragment & {
|
|
501
507
|
type: 'annotation-body';
|
|
502
508
|
nodes: (DocumentBlocksEssentials | DocumentBlockCode)[];
|
|
503
509
|
})[];
|
|
504
|
-
isVoid:
|
|
505
|
-
nodes:
|
|
510
|
+
isVoid: false;
|
|
511
|
+
nodes: DocumentText[];
|
|
506
512
|
data?: object;
|
|
507
513
|
}
|
|
508
|
-
export declare type DocumentInlinesRich = DocumentNodeText | DocumentInlineLink | DocumentInlineEmoji | DocumentInlineMath | DocumentInlineImage | DocumentInlineAnnotation | DocumentInlineMention;
|
|
509
514
|
export interface DocumentBlockParagraph {
|
|
510
515
|
object: 'block';
|
|
511
516
|
type: 'paragraph';
|
|
512
517
|
key?: string;
|
|
513
|
-
nodes:
|
|
518
|
+
nodes: (DocumentInline | DocumentText)[];
|
|
514
519
|
isVoid?: false;
|
|
515
520
|
data?: object;
|
|
516
521
|
}
|
|
@@ -518,7 +523,7 @@ export interface DocumentBlockHeading {
|
|
|
518
523
|
object: 'block';
|
|
519
524
|
type: 'heading-1' | 'heading-2' | 'heading-3';
|
|
520
525
|
key?: string;
|
|
521
|
-
nodes:
|
|
526
|
+
nodes: (DocumentInline | DocumentText)[];
|
|
522
527
|
data: {
|
|
523
528
|
id?: string;
|
|
524
529
|
};
|
|
@@ -567,7 +572,7 @@ export interface DocumentBlockListTasks {
|
|
|
567
572
|
object: 'block';
|
|
568
573
|
type: 'list-tasks';
|
|
569
574
|
key?: string;
|
|
570
|
-
nodes:
|
|
575
|
+
nodes: DocumentBlockListItem[];
|
|
571
576
|
isVoid?: false;
|
|
572
577
|
data?: object;
|
|
573
578
|
}
|
|
@@ -577,13 +582,10 @@ export interface DocumentBlockListItem {
|
|
|
577
582
|
key?: string;
|
|
578
583
|
nodes: DocumentBlocksEssentials[];
|
|
579
584
|
isVoid?: false;
|
|
580
|
-
data?:
|
|
581
|
-
|
|
582
|
-
export declare type DocumentBlockTaskListItem = DocumentBlockListItem & {
|
|
583
|
-
data: {
|
|
584
|
-
checked: boolean;
|
|
585
|
+
data?: {
|
|
586
|
+
checked?: boolean;
|
|
585
587
|
};
|
|
586
|
-
}
|
|
588
|
+
}
|
|
587
589
|
export interface DocumentBlockImages {
|
|
588
590
|
object: 'block';
|
|
589
591
|
type: 'images';
|
|
@@ -607,8 +609,9 @@ export interface DocumentBlockImage {
|
|
|
607
609
|
value: number;
|
|
608
610
|
};
|
|
609
611
|
height?: any;
|
|
612
|
+
alt?: string;
|
|
610
613
|
};
|
|
611
|
-
fragments: (
|
|
614
|
+
fragments: (DocumentFragment & {
|
|
612
615
|
type: 'caption';
|
|
613
616
|
nodes: DocumentBlockParagraph[];
|
|
614
617
|
})[];
|
|
@@ -660,7 +663,7 @@ export interface DocumentBlockCodeLine {
|
|
|
660
663
|
object: 'block';
|
|
661
664
|
type: 'code-line';
|
|
662
665
|
key?: string;
|
|
663
|
-
nodes: (
|
|
666
|
+
nodes: (DocumentText | DocumentInlineAnnotation)[];
|
|
664
667
|
data: {
|
|
665
668
|
highlighted?: boolean;
|
|
666
669
|
};
|
|
@@ -681,11 +684,11 @@ export interface DocumentBlockExpandable {
|
|
|
681
684
|
key?: string;
|
|
682
685
|
isVoid: true;
|
|
683
686
|
data: object;
|
|
684
|
-
fragments: ((
|
|
687
|
+
fragments: ((DocumentFragment & {
|
|
685
688
|
fragment: 'expandable-title';
|
|
686
689
|
type: 'expandable-title';
|
|
687
690
|
nodes: DocumentBlockParagraph[];
|
|
688
|
-
}) | (
|
|
691
|
+
}) | (DocumentFragment & {
|
|
689
692
|
fragment: 'expandable-body';
|
|
690
693
|
type: 'expandable-body';
|
|
691
694
|
nodes: (DocumentBlocksEssentials | DocumentBlockCode)[];
|
|
@@ -729,7 +732,7 @@ export interface DocumentBlockTable {
|
|
|
729
732
|
definition: Record<string, DocumentTableDefinition>;
|
|
730
733
|
fullWidth?: boolean;
|
|
731
734
|
};
|
|
732
|
-
fragments:
|
|
735
|
+
fragments: DocumentFragment[];
|
|
733
736
|
}
|
|
734
737
|
export interface DocumentTableRecord {
|
|
735
738
|
orderIndex: string;
|
|
@@ -978,6 +981,7 @@ export declare type RevisionPageGroup = RevisionPageBase & {
|
|
|
978
981
|
export declare type RevisionPageLink = RevisionPageBase & {
|
|
979
982
|
kind: 'link';
|
|
980
983
|
type: 'link';
|
|
984
|
+
target: ContentRef;
|
|
981
985
|
href?: string;
|
|
982
986
|
};
|
|
983
987
|
export interface RevisionFile {
|
|
@@ -1590,10 +1594,17 @@ export interface Collection {
|
|
|
1590
1594
|
*/
|
|
1591
1595
|
visibility: ContentVisibility;
|
|
1592
1596
|
publishingType?: 'variants';
|
|
1593
|
-
/** ID of the
|
|
1594
|
-
|
|
1597
|
+
/** ID of the organization owning this collection */
|
|
1598
|
+
organization: string;
|
|
1599
|
+
/** ID of the parent collection, if any */
|
|
1600
|
+
parent?: string;
|
|
1595
1601
|
/** ID of the parent collection, if any */
|
|
1596
1602
|
collection?: string;
|
|
1603
|
+
/** URLs associated with the object */
|
|
1604
|
+
urls: {
|
|
1605
|
+
location: string;
|
|
1606
|
+
app: string;
|
|
1607
|
+
};
|
|
1597
1608
|
}
|
|
1598
1609
|
export interface Integration {
|
|
1599
1610
|
object: 'integration';
|
|
@@ -2320,6 +2331,30 @@ export interface UserImpersonationInfo {
|
|
|
2320
2331
|
authURL: string;
|
|
2321
2332
|
impersonatorId: string;
|
|
2322
2333
|
}
|
|
2334
|
+
/**
|
|
2335
|
+
* All the permissions of a user
|
|
2336
|
+
*/
|
|
2337
|
+
export interface UserPermissions {
|
|
2338
|
+
updatedAt: Date;
|
|
2339
|
+
searchKey: string;
|
|
2340
|
+
organizations: Record<string, {
|
|
2341
|
+
role: MemberRoleOrGuest;
|
|
2342
|
+
teams: Record<string, {
|
|
2343
|
+
role: TeamMemberRole;
|
|
2344
|
+
}>;
|
|
2345
|
+
disabled?: boolean;
|
|
2346
|
+
}>;
|
|
2347
|
+
collections: Record<string, {
|
|
2348
|
+
organization: string;
|
|
2349
|
+
level: MemberRoleOrGuest;
|
|
2350
|
+
collection?: string;
|
|
2351
|
+
}>;
|
|
2352
|
+
spaces: Record<string, {
|
|
2353
|
+
organization: string;
|
|
2354
|
+
level: MemberRoleOrGuest;
|
|
2355
|
+
collection?: string;
|
|
2356
|
+
}>;
|
|
2357
|
+
}
|
|
2323
2358
|
/**
|
|
2324
2359
|
* The GitBook User risk evaluation.
|
|
2325
2360
|
*/
|
|
@@ -2755,7 +2790,7 @@ export interface ContentKitURL {
|
|
|
2755
2790
|
/**
|
|
2756
2791
|
* Channel to subscribe to for API updates.
|
|
2757
2792
|
*/
|
|
2758
|
-
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserProfileChannel | ChangeRequestReviewsChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | {
|
|
2793
|
+
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserProfileChannel | ChangeRequestReviewsChannel | CollectionPublishingCustomizationChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | {
|
|
2759
2794
|
channel: 'space-comments';
|
|
2760
2795
|
space: string;
|
|
2761
2796
|
changeRequest?: string;
|
|
@@ -2788,6 +2823,10 @@ export interface SpacePublishingAuthChannel {
|
|
|
2788
2823
|
channel: 'space-publishing-auth';
|
|
2789
2824
|
space: string;
|
|
2790
2825
|
}
|
|
2826
|
+
export interface SpacePublishingCustomizationChannel {
|
|
2827
|
+
channel: 'space-publishing-customization';
|
|
2828
|
+
space: string;
|
|
2829
|
+
}
|
|
2791
2830
|
export interface SpaceEntitiesChannel {
|
|
2792
2831
|
channel: 'space-entities';
|
|
2793
2832
|
space: string;
|
|
@@ -2812,6 +2851,10 @@ export interface UserProfileChannel {
|
|
|
2812
2851
|
channel: 'user-profile';
|
|
2813
2852
|
user: string;
|
|
2814
2853
|
}
|
|
2854
|
+
export interface CollectionPublishingCustomizationChannel {
|
|
2855
|
+
channel: 'collection-publishing-customization';
|
|
2856
|
+
collection: string;
|
|
2857
|
+
}
|
|
2815
2858
|
export interface ChangeRequestReviewsChannel {
|
|
2816
2859
|
channel: 'space-change-request-reviews';
|
|
2817
2860
|
space: string;
|
|
@@ -2857,6 +2900,13 @@ export interface OrganizationSpacesChannel {
|
|
|
2857
2900
|
channel: 'organization-spaces';
|
|
2858
2901
|
organization: string;
|
|
2859
2902
|
}
|
|
2903
|
+
/**
|
|
2904
|
+
* Subscription channel for changes in collections in an organization.
|
|
2905
|
+
*/
|
|
2906
|
+
export interface OrganizationCollectionsChannel {
|
|
2907
|
+
channel: 'organization-collections';
|
|
2908
|
+
organization: string;
|
|
2909
|
+
}
|
|
2860
2910
|
/**
|
|
2861
2911
|
* Subscription channel for entities in an organization.
|
|
2862
2912
|
*/
|
|
@@ -2948,6 +2998,131 @@ export interface UpdateCustomFieldValues {
|
|
|
2948
2998
|
}
|
|
2949
2999
|
export declare type CustomFieldOptions = string[];
|
|
2950
3000
|
export declare type CustomFieldPlaceholder = string;
|
|
3001
|
+
export interface CustomizationSettings {
|
|
3002
|
+
/** Inherit customization settings from the parent collection. */
|
|
3003
|
+
inherit: boolean;
|
|
3004
|
+
/** Title to use for the published content. If not defined, it'll fallback to the content title. */
|
|
3005
|
+
title?: string;
|
|
3006
|
+
styling: {
|
|
3007
|
+
primaryColor: CustomizationThemedColor;
|
|
3008
|
+
corners: CustomizationCorners;
|
|
3009
|
+
font: CustomizationFont;
|
|
3010
|
+
};
|
|
3011
|
+
internationalization: {
|
|
3012
|
+
locale: CustomizationLocale;
|
|
3013
|
+
inherit: boolean;
|
|
3014
|
+
};
|
|
3015
|
+
favicon: {
|
|
3016
|
+
icon: CustomizationThemedURL;
|
|
3017
|
+
} | {
|
|
3018
|
+
emoji: Emoji;
|
|
3019
|
+
} | object;
|
|
3020
|
+
header: {
|
|
3021
|
+
preset: CustomizationHeaderPreset;
|
|
3022
|
+
logo?: CustomizationThemedURL;
|
|
3023
|
+
backgroundColor?: CustomizationThemedColor;
|
|
3024
|
+
linkColor?: CustomizationThemedColor;
|
|
3025
|
+
links: CustomizationHeaderLink[];
|
|
3026
|
+
};
|
|
3027
|
+
footer: {
|
|
3028
|
+
logo?: CustomizationThemedURL;
|
|
3029
|
+
groups: CustomizationFooterGroup[];
|
|
3030
|
+
copyright?: string;
|
|
3031
|
+
};
|
|
3032
|
+
themes: {
|
|
3033
|
+
default: CustomizationThemeMode;
|
|
3034
|
+
toggeable: boolean;
|
|
3035
|
+
};
|
|
3036
|
+
pdf: {
|
|
3037
|
+
enabled: boolean;
|
|
3038
|
+
};
|
|
3039
|
+
feedback: {
|
|
3040
|
+
enabled: boolean;
|
|
3041
|
+
};
|
|
3042
|
+
aiSearch: {
|
|
3043
|
+
enabled: boolean;
|
|
3044
|
+
};
|
|
3045
|
+
git: {
|
|
3046
|
+
showEditLink: boolean;
|
|
3047
|
+
};
|
|
3048
|
+
pagination: {
|
|
3049
|
+
enabled: boolean;
|
|
3050
|
+
};
|
|
3051
|
+
trademark: {
|
|
3052
|
+
enabled: boolean;
|
|
3053
|
+
};
|
|
3054
|
+
privacyPolicy: {
|
|
3055
|
+
url?: URL;
|
|
3056
|
+
};
|
|
3057
|
+
socialPreview: {
|
|
3058
|
+
url?: URL;
|
|
3059
|
+
};
|
|
3060
|
+
}
|
|
3061
|
+
export declare type CustomizationCollectionSettings = CustomizationSettings & {
|
|
3062
|
+
collection: {
|
|
3063
|
+
defaultSpace?: string;
|
|
3064
|
+
};
|
|
3065
|
+
};
|
|
3066
|
+
/**
|
|
3067
|
+
* Language for the UI element
|
|
3068
|
+
*/
|
|
3069
|
+
export declare enum CustomizationLocale {
|
|
3070
|
+
En = "en",
|
|
3071
|
+
Fr = "fr",
|
|
3072
|
+
Es = "es",
|
|
3073
|
+
Zh = "zh",
|
|
3074
|
+
Ja = "ja"
|
|
3075
|
+
}
|
|
3076
|
+
export declare enum CustomizationFont {
|
|
3077
|
+
Inter = "Inter",
|
|
3078
|
+
Roboto = "Roboto",
|
|
3079
|
+
RobotoSlab = "RobotoSlab",
|
|
3080
|
+
OpenSans = "OpenSans",
|
|
3081
|
+
SourceSansPro = "SourceSansPro",
|
|
3082
|
+
Lato = "Lato",
|
|
3083
|
+
Ubuntu = "Ubuntu",
|
|
3084
|
+
Raleway = "Raleway",
|
|
3085
|
+
Merriweather = "Merriweather",
|
|
3086
|
+
Overpass = "Overpass",
|
|
3087
|
+
NotoSans = "NotoSans",
|
|
3088
|
+
IBMPlexSerif = "IBMPlexSerif",
|
|
3089
|
+
Poppins = "Poppins",
|
|
3090
|
+
FiraSans = "FiraSans"
|
|
3091
|
+
}
|
|
3092
|
+
export declare enum CustomizationHeaderPreset {
|
|
3093
|
+
Default = "default",
|
|
3094
|
+
Bold = "bold",
|
|
3095
|
+
Contrast = "contrast",
|
|
3096
|
+
Custom = "custom",
|
|
3097
|
+
None = "none"
|
|
3098
|
+
}
|
|
3099
|
+
export declare enum CustomizationThemeMode {
|
|
3100
|
+
Light = "light",
|
|
3101
|
+
Dark = "dark"
|
|
3102
|
+
}
|
|
3103
|
+
export declare type CustomizationHeaderLink = CustomizationContentLink & {
|
|
3104
|
+
links?: CustomizationContentLink[];
|
|
3105
|
+
};
|
|
3106
|
+
export interface CustomizationContentLink {
|
|
3107
|
+
title: string;
|
|
3108
|
+
to: ContentRef;
|
|
3109
|
+
}
|
|
3110
|
+
export interface CustomizationFooterGroup {
|
|
3111
|
+
title: string;
|
|
3112
|
+
links: CustomizationContentLink[];
|
|
3113
|
+
}
|
|
3114
|
+
export declare enum CustomizationCorners {
|
|
3115
|
+
Straight = "straight",
|
|
3116
|
+
Rounded = "rounded"
|
|
3117
|
+
}
|
|
3118
|
+
export interface CustomizationThemedURL {
|
|
3119
|
+
light: URL;
|
|
3120
|
+
dark: URL;
|
|
3121
|
+
}
|
|
3122
|
+
export interface CustomizationThemedColor {
|
|
3123
|
+
light: Color;
|
|
3124
|
+
dark: Color;
|
|
3125
|
+
}
|
|
2951
3126
|
export declare type QueryParamsType = Record<string | number, any>;
|
|
2952
3127
|
export declare type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
|
|
2953
3128
|
export interface FullRequestParams extends Omit<RequestInit, 'body'> {
|
|
@@ -3846,6 +4021,36 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
3846
4021
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
3847
4022
|
items: UserContentPermission[];
|
|
3848
4023
|
}, Error>>;
|
|
4024
|
+
/**
|
|
4025
|
+
* No description
|
|
4026
|
+
*
|
|
4027
|
+
* @tags spaces
|
|
4028
|
+
* @name GetSpacePublishingCustomizationById
|
|
4029
|
+
* @summary Get the publishing customization configuration for a space.
|
|
4030
|
+
* @request GET:/spaces/{spaceId}/publishing/customization
|
|
4031
|
+
* @secure
|
|
4032
|
+
*/
|
|
4033
|
+
getSpacePublishingCustomizationById: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<CustomizationSettings, Error | {
|
|
4034
|
+
error: {
|
|
4035
|
+
code: 400;
|
|
4036
|
+
message: string;
|
|
4037
|
+
};
|
|
4038
|
+
}>>;
|
|
4039
|
+
/**
|
|
4040
|
+
* No description
|
|
4041
|
+
*
|
|
4042
|
+
* @tags spaces
|
|
4043
|
+
* @name UpdateSpacePublishingCustomizationById
|
|
4044
|
+
* @summary Update the publishing customization configuration for a space.
|
|
4045
|
+
* @request PUT:/spaces/{spaceId}/publishing/customization
|
|
4046
|
+
* @secure
|
|
4047
|
+
*/
|
|
4048
|
+
updateSpacePublishingCustomizationById: (spaceId: string, data: CustomizationSettings, params?: RequestParams) => Promise<HttpResponse<CustomizationSettings, Error | {
|
|
4049
|
+
error: {
|
|
4050
|
+
code: 400;
|
|
4051
|
+
message: string;
|
|
4052
|
+
};
|
|
4053
|
+
}>>;
|
|
3849
4054
|
/**
|
|
3850
4055
|
* No description
|
|
3851
4056
|
*
|
|
@@ -3996,6 +4201,36 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
3996
4201
|
message: string;
|
|
3997
4202
|
};
|
|
3998
4203
|
}>>;
|
|
4204
|
+
/**
|
|
4205
|
+
* No description
|
|
4206
|
+
*
|
|
4207
|
+
* @tags collections
|
|
4208
|
+
* @name GetCollectionPublishingCustomizationById
|
|
4209
|
+
* @summary Get the publishing customization configuration for a collection.
|
|
4210
|
+
* @request GET:/collections/{collectionId}/publishing/customization
|
|
4211
|
+
* @secure
|
|
4212
|
+
*/
|
|
4213
|
+
getCollectionPublishingCustomizationById: (collectionId: string, params?: RequestParams) => Promise<HttpResponse<CustomizationCollectionSettings, Error | {
|
|
4214
|
+
error: {
|
|
4215
|
+
code: 400;
|
|
4216
|
+
message: string;
|
|
4217
|
+
};
|
|
4218
|
+
}>>;
|
|
4219
|
+
/**
|
|
4220
|
+
* No description
|
|
4221
|
+
*
|
|
4222
|
+
* @tags collections
|
|
4223
|
+
* @name UpdateCollectionPublishingCustomizationById
|
|
4224
|
+
* @summary Update the publishing customization configuration for a collection.
|
|
4225
|
+
* @request PUT:/collections/{collectionId}/publishing/customization
|
|
4226
|
+
* @secure
|
|
4227
|
+
*/
|
|
4228
|
+
updateCollectionPublishingCustomizationById: (collectionId: string, data: CustomizationCollectionSettings, params?: RequestParams) => Promise<HttpResponse<CustomizationCollectionSettings, Error | {
|
|
4229
|
+
error: {
|
|
4230
|
+
code: 400;
|
|
4231
|
+
message: string;
|
|
4232
|
+
};
|
|
4233
|
+
}>>;
|
|
3999
4234
|
};
|
|
4000
4235
|
integrations: {
|
|
4001
4236
|
/**
|
|
@@ -4728,6 +4963,19 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4728
4963
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
4729
4964
|
items: Collection[];
|
|
4730
4965
|
}, Error>>;
|
|
4966
|
+
/**
|
|
4967
|
+
* No description
|
|
4968
|
+
*
|
|
4969
|
+
* @tags collections
|
|
4970
|
+
* @name CreateCollection
|
|
4971
|
+
* @summary Create an organization collection
|
|
4972
|
+
* @request POST:/orgs/{organizationId}/collections
|
|
4973
|
+
* @secure
|
|
4974
|
+
*/
|
|
4975
|
+
createCollection: (organizationId: string, data: {
|
|
4976
|
+
title?: string;
|
|
4977
|
+
parent?: string;
|
|
4978
|
+
}, params?: RequestParams) => Promise<HttpResponse<Collection, Error>>;
|
|
4731
4979
|
/**
|
|
4732
4980
|
* No description
|
|
4733
4981
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -34,6 +34,11 @@ __export(src_exports, {
|
|
|
34
34
|
ContentType: () => ContentType,
|
|
35
35
|
ContentVisibility: () => ContentVisibility,
|
|
36
36
|
CustomFieldType: () => CustomFieldType,
|
|
37
|
+
CustomizationCorners: () => CustomizationCorners,
|
|
38
|
+
CustomizationFont: () => CustomizationFont,
|
|
39
|
+
CustomizationHeaderPreset: () => CustomizationHeaderPreset,
|
|
40
|
+
CustomizationLocale: () => CustomizationLocale,
|
|
41
|
+
CustomizationThemeMode: () => CustomizationThemeMode,
|
|
37
42
|
GITBOOK_DEFAULT_ENDPOINT: () => GITBOOK_DEFAULT_ENDPOINT,
|
|
38
43
|
GitBookAPI: () => GitBookAPI,
|
|
39
44
|
GitSyncOperationState: () => GitSyncOperationState,
|
|
@@ -268,6 +273,49 @@ var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
|
|
|
268
273
|
CustomFieldType2["SelectSingle"] = "select:single";
|
|
269
274
|
return CustomFieldType2;
|
|
270
275
|
})(CustomFieldType || {});
|
|
276
|
+
var CustomizationLocale = /* @__PURE__ */ ((CustomizationLocale2) => {
|
|
277
|
+
CustomizationLocale2["En"] = "en";
|
|
278
|
+
CustomizationLocale2["Fr"] = "fr";
|
|
279
|
+
CustomizationLocale2["Es"] = "es";
|
|
280
|
+
CustomizationLocale2["Zh"] = "zh";
|
|
281
|
+
CustomizationLocale2["Ja"] = "ja";
|
|
282
|
+
return CustomizationLocale2;
|
|
283
|
+
})(CustomizationLocale || {});
|
|
284
|
+
var CustomizationFont = /* @__PURE__ */ ((CustomizationFont2) => {
|
|
285
|
+
CustomizationFont2["Inter"] = "Inter";
|
|
286
|
+
CustomizationFont2["Roboto"] = "Roboto";
|
|
287
|
+
CustomizationFont2["RobotoSlab"] = "RobotoSlab";
|
|
288
|
+
CustomizationFont2["OpenSans"] = "OpenSans";
|
|
289
|
+
CustomizationFont2["SourceSansPro"] = "SourceSansPro";
|
|
290
|
+
CustomizationFont2["Lato"] = "Lato";
|
|
291
|
+
CustomizationFont2["Ubuntu"] = "Ubuntu";
|
|
292
|
+
CustomizationFont2["Raleway"] = "Raleway";
|
|
293
|
+
CustomizationFont2["Merriweather"] = "Merriweather";
|
|
294
|
+
CustomizationFont2["Overpass"] = "Overpass";
|
|
295
|
+
CustomizationFont2["NotoSans"] = "NotoSans";
|
|
296
|
+
CustomizationFont2["IBMPlexSerif"] = "IBMPlexSerif";
|
|
297
|
+
CustomizationFont2["Poppins"] = "Poppins";
|
|
298
|
+
CustomizationFont2["FiraSans"] = "FiraSans";
|
|
299
|
+
return CustomizationFont2;
|
|
300
|
+
})(CustomizationFont || {});
|
|
301
|
+
var CustomizationHeaderPreset = /* @__PURE__ */ ((CustomizationHeaderPreset2) => {
|
|
302
|
+
CustomizationHeaderPreset2["Default"] = "default";
|
|
303
|
+
CustomizationHeaderPreset2["Bold"] = "bold";
|
|
304
|
+
CustomizationHeaderPreset2["Contrast"] = "contrast";
|
|
305
|
+
CustomizationHeaderPreset2["Custom"] = "custom";
|
|
306
|
+
CustomizationHeaderPreset2["None"] = "none";
|
|
307
|
+
return CustomizationHeaderPreset2;
|
|
308
|
+
})(CustomizationHeaderPreset || {});
|
|
309
|
+
var CustomizationThemeMode = /* @__PURE__ */ ((CustomizationThemeMode2) => {
|
|
310
|
+
CustomizationThemeMode2["Light"] = "light";
|
|
311
|
+
CustomizationThemeMode2["Dark"] = "dark";
|
|
312
|
+
return CustomizationThemeMode2;
|
|
313
|
+
})(CustomizationThemeMode || {});
|
|
314
|
+
var CustomizationCorners = /* @__PURE__ */ ((CustomizationCorners2) => {
|
|
315
|
+
CustomizationCorners2["Straight"] = "straight";
|
|
316
|
+
CustomizationCorners2["Rounded"] = "rounded";
|
|
317
|
+
return CustomizationCorners2;
|
|
318
|
+
})(CustomizationCorners || {});
|
|
271
319
|
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
272
320
|
ContentType2["Json"] = "application/json";
|
|
273
321
|
ContentType2["FormData"] = "multipart/form-data";
|
|
@@ -964,6 +1012,22 @@ var Api = class extends HttpClient {
|
|
|
964
1012
|
format: "json",
|
|
965
1013
|
...params
|
|
966
1014
|
}),
|
|
1015
|
+
getSpacePublishingCustomizationById: (spaceId, params = {}) => this.request({
|
|
1016
|
+
path: `/spaces/${spaceId}/publishing/customization`,
|
|
1017
|
+
method: "GET",
|
|
1018
|
+
secure: true,
|
|
1019
|
+
format: "json",
|
|
1020
|
+
...params
|
|
1021
|
+
}),
|
|
1022
|
+
updateSpacePublishingCustomizationById: (spaceId, data, params = {}) => this.request({
|
|
1023
|
+
path: `/spaces/${spaceId}/publishing/customization`,
|
|
1024
|
+
method: "PUT",
|
|
1025
|
+
body: data,
|
|
1026
|
+
secure: true,
|
|
1027
|
+
type: "application/json" /* Json */,
|
|
1028
|
+
format: "json",
|
|
1029
|
+
...params
|
|
1030
|
+
}),
|
|
967
1031
|
getSpacePublishingAuthById: (spaceId, params = {}) => this.request({
|
|
968
1032
|
path: `/spaces/${spaceId}/publishing/auth`,
|
|
969
1033
|
method: "GET",
|
|
@@ -1053,6 +1117,22 @@ var Api = class extends HttpClient {
|
|
|
1053
1117
|
type: "application/json" /* Json */,
|
|
1054
1118
|
format: "json",
|
|
1055
1119
|
...params
|
|
1120
|
+
}),
|
|
1121
|
+
getCollectionPublishingCustomizationById: (collectionId, params = {}) => this.request({
|
|
1122
|
+
path: `/collections/${collectionId}/publishing/customization`,
|
|
1123
|
+
method: "GET",
|
|
1124
|
+
secure: true,
|
|
1125
|
+
format: "json",
|
|
1126
|
+
...params
|
|
1127
|
+
}),
|
|
1128
|
+
updateCollectionPublishingCustomizationById: (collectionId, data, params = {}) => this.request({
|
|
1129
|
+
path: `/collections/${collectionId}/publishing/customization`,
|
|
1130
|
+
method: "PUT",
|
|
1131
|
+
body: data,
|
|
1132
|
+
secure: true,
|
|
1133
|
+
type: "application/json" /* Json */,
|
|
1134
|
+
format: "json",
|
|
1135
|
+
...params
|
|
1056
1136
|
})
|
|
1057
1137
|
};
|
|
1058
1138
|
this.integrations = {
|
|
@@ -1478,6 +1558,15 @@ var Api = class extends HttpClient {
|
|
|
1478
1558
|
format: "json",
|
|
1479
1559
|
...params
|
|
1480
1560
|
}),
|
|
1561
|
+
createCollection: (organizationId, data, params = {}) => this.request({
|
|
1562
|
+
path: `/orgs/${organizationId}/collections`,
|
|
1563
|
+
method: "POST",
|
|
1564
|
+
body: data,
|
|
1565
|
+
secure: true,
|
|
1566
|
+
type: "application/json" /* Json */,
|
|
1567
|
+
format: "json",
|
|
1568
|
+
...params
|
|
1569
|
+
}),
|
|
1481
1570
|
setupDirectorySync: (organizationId, params = {}) => this.request({
|
|
1482
1571
|
path: `/orgs/${organizationId}/dsync`,
|
|
1483
1572
|
method: "POST",
|
|
@@ -1781,6 +1870,11 @@ var GitBookAPI = class extends Api {
|
|
|
1781
1870
|
ContentType,
|
|
1782
1871
|
ContentVisibility,
|
|
1783
1872
|
CustomFieldType,
|
|
1873
|
+
CustomizationCorners,
|
|
1874
|
+
CustomizationFont,
|
|
1875
|
+
CustomizationHeaderPreset,
|
|
1876
|
+
CustomizationLocale,
|
|
1877
|
+
CustomizationThemeMode,
|
|
1784
1878
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
1785
1879
|
GitBookAPI,
|
|
1786
1880
|
GitSyncOperationState,
|