@gitbook/api 0.37.0 → 0.39.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 +203 -8
- package/dist/index.cjs +37 -1
- package/dist/index.js +36 -1
- package/package.json +1 -1
- package/spec/openapi.json +783 -53
- package/spec/openapi.yaml +441 -12
package/dist/client.d.ts
CHANGED
|
@@ -1076,7 +1076,6 @@ export interface ContentRefSnippet {
|
|
|
1076
1076
|
export interface ContentRefSyncedBlock {
|
|
1077
1077
|
kind: 'synced-block';
|
|
1078
1078
|
syncedBlock: string;
|
|
1079
|
-
organization: string;
|
|
1080
1079
|
}
|
|
1081
1080
|
/** An absolute reference to content in GitBook. */
|
|
1082
1081
|
export declare type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationSnippet | ContentLocationSyncedBlock;
|
|
@@ -1089,6 +1088,7 @@ export interface ContentLocationFile {
|
|
|
1089
1088
|
organization: Organization;
|
|
1090
1089
|
space: Space;
|
|
1091
1090
|
changeRequest?: ChangeRequest;
|
|
1091
|
+
revision?: Revision;
|
|
1092
1092
|
file: RevisionFile;
|
|
1093
1093
|
}
|
|
1094
1094
|
export interface ContentLocationPage {
|
|
@@ -1097,7 +1097,11 @@ export interface ContentLocationPage {
|
|
|
1097
1097
|
page: RevisionPage;
|
|
1098
1098
|
space: Space;
|
|
1099
1099
|
changeRequest?: ChangeRequest;
|
|
1100
|
+
revision?: Revision;
|
|
1101
|
+
/** The anchor within the page. */
|
|
1100
1102
|
anchor?: string;
|
|
1103
|
+
/** The node id within the page. */
|
|
1104
|
+
node?: string;
|
|
1101
1105
|
}
|
|
1102
1106
|
export interface ContentLocationUser {
|
|
1103
1107
|
kind: 'user';
|
|
@@ -1998,7 +2002,6 @@ export interface SyncedBlock {
|
|
|
1998
2002
|
/** URL of the synced block in the API */
|
|
1999
2003
|
location: URL;
|
|
2000
2004
|
};
|
|
2001
|
-
files?: RevisionFile[];
|
|
2002
2005
|
}
|
|
2003
2006
|
/** Content audit relation */
|
|
2004
2007
|
export interface ContentAuditRelation {
|
|
@@ -2547,6 +2550,7 @@ export declare enum IntegrationScope {
|
|
|
2547
2550
|
SpaceScriptCookies = "space:script:cookies",
|
|
2548
2551
|
SpaceGitSync = "space:git:sync",
|
|
2549
2552
|
SpaceVisitorAuth = "space:visitor:auth",
|
|
2553
|
+
SiteScriptInject = "site:script:inject",
|
|
2550
2554
|
SiteVisitorAuth = "site:visitor:auth"
|
|
2551
2555
|
}
|
|
2552
2556
|
/** A search string to filter integrations by name */
|
|
@@ -2620,6 +2624,11 @@ export declare enum IntegrationInstallationSpaceSelection {
|
|
|
2620
2624
|
All = "all",
|
|
2621
2625
|
Selected = "selected"
|
|
2622
2626
|
}
|
|
2627
|
+
/** Describe whether all sites have been selected or there's a selection involved */
|
|
2628
|
+
export declare enum IntegrationInstallationSiteSelection {
|
|
2629
|
+
All = "all",
|
|
2630
|
+
Selected = "selected"
|
|
2631
|
+
}
|
|
2623
2632
|
export declare enum IntegrationCategory {
|
|
2624
2633
|
Analytics = "analytics",
|
|
2625
2634
|
Captures = "captures",
|
|
@@ -2632,6 +2641,7 @@ export declare enum IntegrationCategory {
|
|
|
2632
2641
|
export interface IntegrationConfigurations {
|
|
2633
2642
|
account?: IntegrationConfiguration;
|
|
2634
2643
|
space?: IntegrationConfiguration;
|
|
2644
|
+
site?: IntegrationConfiguration;
|
|
2635
2645
|
}
|
|
2636
2646
|
export declare type IntegrationConfiguration = IntegrationConfigurationSchema | IntegrationConfigurationComponent;
|
|
2637
2647
|
/** Schema for a configuration */
|
|
@@ -2776,6 +2786,8 @@ export interface IntegrationEnvironment {
|
|
|
2776
2786
|
installation?: IntegrationInstallation;
|
|
2777
2787
|
/** Installation of an integration at a space level */
|
|
2778
2788
|
spaceInstallation?: IntegrationSpaceInstallation;
|
|
2789
|
+
/** Installation of an integration at a site level */
|
|
2790
|
+
siteInstallation?: IntegrationSiteInstallation;
|
|
2779
2791
|
/** Secrets stored on the integration and passed at runtime. */
|
|
2780
2792
|
secrets: IntegrationSecrets;
|
|
2781
2793
|
/**
|
|
@@ -2790,6 +2802,8 @@ export interface IntegrationEnvironment {
|
|
|
2790
2802
|
installation?: string;
|
|
2791
2803
|
/** Secret that can be used to verify the authenticity of incoming HTTP requests to the space installation. */
|
|
2792
2804
|
spaceInstallation?: string;
|
|
2805
|
+
/** Secret that can be used to verify the authenticity of incoming HTTP requests to the site installation. */
|
|
2806
|
+
siteInstallation?: string;
|
|
2793
2807
|
};
|
|
2794
2808
|
/** URL of the HTTP API */
|
|
2795
2809
|
apiEndpoint: string;
|
|
@@ -2971,7 +2985,23 @@ export declare type EntityPropertySchema = {
|
|
|
2971
2985
|
};
|
|
2972
2986
|
});
|
|
2973
2987
|
/** Any event that can be received from GitBook. */
|
|
2974
|
-
export declare type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent |
|
|
2988
|
+
export declare type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent | (SiteEvent & {
|
|
2989
|
+
type: 'site_installation_setup';
|
|
2990
|
+
status: IntegrationInstallationStatus;
|
|
2991
|
+
/** The state of the site installation before it was updated. */
|
|
2992
|
+
previous?: {
|
|
2993
|
+
status: IntegrationInstallationStatus;
|
|
2994
|
+
/** The previous configuration of the site installation. */
|
|
2995
|
+
configuration?: object;
|
|
2996
|
+
};
|
|
2997
|
+
}) | (SiteEvent & {
|
|
2998
|
+
type: 'site_installation_deleted';
|
|
2999
|
+
/** The state of the site installation before it was deleted. */
|
|
3000
|
+
previous: {
|
|
3001
|
+
/** The previous configuration of the site installation. */
|
|
3002
|
+
configuration?: object;
|
|
3003
|
+
};
|
|
3004
|
+
}) | SiteViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | FetchEvent | FetchPublishedScriptEvent | FetchVisitorAuthenticationEvent | UIRenderEvent;
|
|
2975
3005
|
/** Common properties for all events. */
|
|
2976
3006
|
export interface BaseEvent {
|
|
2977
3007
|
/** Unique identifier for the event. */
|
|
@@ -2989,6 +3019,11 @@ export declare type SpaceEvent = InstallationEvent & {
|
|
|
2989
3019
|
/** ID of the space */
|
|
2990
3020
|
spaceId: string;
|
|
2991
3021
|
};
|
|
3022
|
+
/** Common properties for all events related to a specific site. */
|
|
3023
|
+
export declare type SiteEvent = InstallationEvent & {
|
|
3024
|
+
/** ID of the site */
|
|
3025
|
+
siteId: string;
|
|
3026
|
+
};
|
|
2992
3027
|
/** Event received when integration has been installed or updated. */
|
|
2993
3028
|
export declare type InstallationSetupEvent = InstallationEvent & {
|
|
2994
3029
|
type: 'installation_setup';
|
|
@@ -3020,8 +3055,9 @@ export declare type SpaceInstallationDeletedEvent = SpaceEvent & {
|
|
|
3020
3055
|
configuration?: object;
|
|
3021
3056
|
};
|
|
3022
3057
|
};
|
|
3058
|
+
export declare type SpaceViewEvent = SiteViewEvent;
|
|
3023
3059
|
/** Event received when a page has been visited. */
|
|
3024
|
-
export declare type
|
|
3060
|
+
export declare type SiteViewEvent = SpaceEvent & {
|
|
3025
3061
|
type: 'space_view';
|
|
3026
3062
|
/** Unique identifier of the visited page. */
|
|
3027
3063
|
pageId?: string;
|
|
@@ -3099,6 +3135,8 @@ export interface FetchRequest {
|
|
|
3099
3135
|
export declare type FetchEvent = BaseEvent & {
|
|
3100
3136
|
/** The space ID, if requests are specific to a single space */
|
|
3101
3137
|
spaceId?: string;
|
|
3138
|
+
/** The site ID, if requests are specific to a single site */
|
|
3139
|
+
siteId?: string;
|
|
3102
3140
|
/** The installation ID, if requests are specific to a single installation */
|
|
3103
3141
|
installationId?: string;
|
|
3104
3142
|
auth?: {
|
|
@@ -3109,16 +3147,16 @@ export declare type FetchEvent = BaseEvent & {
|
|
|
3109
3147
|
request: FetchRequest;
|
|
3110
3148
|
};
|
|
3111
3149
|
/** Common properties for all events related to fetching a published script from an installation */
|
|
3112
|
-
export declare type FetchPublishedScriptEvent = SpaceEvent & {
|
|
3150
|
+
export declare type FetchPublishedScriptEvent = (SpaceEvent | SiteEvent) & {
|
|
3113
3151
|
type: 'fetch_published_script';
|
|
3114
3152
|
};
|
|
3115
3153
|
/** Common properties for all events related to visitor authentication from an installation */
|
|
3116
|
-
export declare type FetchVisitorAuthenticationEvent = SpaceEvent & {
|
|
3154
|
+
export declare type FetchVisitorAuthenticationEvent = (SpaceEvent | SiteEvent) & {
|
|
3117
3155
|
type: 'fetch_visitor_authentication';
|
|
3118
3156
|
location?: string;
|
|
3119
3157
|
};
|
|
3120
3158
|
/** Event generated when rendering a UI */
|
|
3121
|
-
export declare type UIRenderEvent = (SpaceEvent | InstallationEvent) & {
|
|
3159
|
+
export declare type UIRenderEvent = (SpaceEvent | SiteEvent | InstallationEvent) & {
|
|
3122
3160
|
auth?: {
|
|
3123
3161
|
/** The user's ID. */
|
|
3124
3162
|
userId: string;
|
|
@@ -3144,6 +3182,10 @@ export interface BillingPortal {
|
|
|
3144
3182
|
}
|
|
3145
3183
|
/** Name of the product */
|
|
3146
3184
|
export declare enum BillingProduct {
|
|
3185
|
+
Free2024 = "free_2024",
|
|
3186
|
+
Plus2024 = "plus_2024",
|
|
3187
|
+
Pro2024 = "pro_2024",
|
|
3188
|
+
Enterprise2024 = "enterprise_2024",
|
|
3147
3189
|
Free = "free",
|
|
3148
3190
|
Plus = "plus",
|
|
3149
3191
|
Pro = "pro",
|
|
@@ -4225,7 +4267,7 @@ export interface Site {
|
|
|
4225
4267
|
/** Custom hostname for the site, for e.g. docs.mycompany.com */
|
|
4226
4268
|
hostname?: SiteHostname;
|
|
4227
4269
|
/** Basename for the site. For e.g. api */
|
|
4228
|
-
basename
|
|
4270
|
+
basename?: SiteBasename;
|
|
4229
4271
|
/**
|
|
4230
4272
|
* * `public`: Anyone can access the site, and the site is indexed by search engines.
|
|
4231
4273
|
* * `unlisted`: Anyone can access the site, and the site is not indexed by search engines
|
|
@@ -4329,6 +4371,90 @@ export interface SiteCustomizationSettings {
|
|
|
4329
4371
|
url?: URL;
|
|
4330
4372
|
};
|
|
4331
4373
|
}
|
|
4374
|
+
export interface SiteSpaceCustomizationOverrides {
|
|
4375
|
+
styling?: {
|
|
4376
|
+
/** The primary color used for links and UI text. Set to null to reset the override. */
|
|
4377
|
+
primaryColor?: CustomizationThemedColor | null;
|
|
4378
|
+
/** The style of the corners to use. Set to null to reset the override. */
|
|
4379
|
+
corners?: CustomizationCorners | null;
|
|
4380
|
+
/** The font family to use for the content. Set to null to reset the override. */
|
|
4381
|
+
font?: CustomizationFont | null;
|
|
4382
|
+
/** The style of background to use. Set to null to reset the override. */
|
|
4383
|
+
background?: CustomizationBackground | null;
|
|
4384
|
+
};
|
|
4385
|
+
internationalization?: {
|
|
4386
|
+
/** The locale to use for the non-custom elements of the UI. Set to null to reset the override. */
|
|
4387
|
+
locale: CustomizationLocale | null;
|
|
4388
|
+
};
|
|
4389
|
+
/** The favicon to use. Set to null to reset the override. */
|
|
4390
|
+
favicon?: {
|
|
4391
|
+
icon: CustomizationThemedURL;
|
|
4392
|
+
} | {
|
|
4393
|
+
/** Unicode codepoint or character of the emoji */
|
|
4394
|
+
emoji: Emoji;
|
|
4395
|
+
} | object | null;
|
|
4396
|
+
header?: {
|
|
4397
|
+
/** The theme preset to use. Set to null to reset the override. */
|
|
4398
|
+
preset?: CustomizationHeaderPreset | null;
|
|
4399
|
+
/** The header logo to use. Set to null to reset the override. */
|
|
4400
|
+
logo?: CustomizationThemedURL | null;
|
|
4401
|
+
/** The background color used in the header. Set to null to reset the override. */
|
|
4402
|
+
backgroundColor?: CustomizationThemedColor | null;
|
|
4403
|
+
/** The color used by the links in the header. Set to null to reset the override. */
|
|
4404
|
+
linkColor?: CustomizationThemedColor | null;
|
|
4405
|
+
/** The links that are displayed in the header. Set to null to reset the override. */
|
|
4406
|
+
links?: CustomizationHeaderLink[] | null;
|
|
4407
|
+
};
|
|
4408
|
+
footer?: {
|
|
4409
|
+
/** The logo displayed in the footer. Set to null to reset the override. */
|
|
4410
|
+
logo?: CustomizationThemedURL | null;
|
|
4411
|
+
/** The links groups that are displayed in the footer. Set to null to reset the override. */
|
|
4412
|
+
groups?: CustomizationFooterGroup[] | null;
|
|
4413
|
+
/**
|
|
4414
|
+
* The copyright text that is displayed in the footer. Set to null to reset the override.
|
|
4415
|
+
* @maxLength 300
|
|
4416
|
+
*/
|
|
4417
|
+
copyright?: string | null;
|
|
4418
|
+
};
|
|
4419
|
+
themes?: {
|
|
4420
|
+
/** The theme mode default value. Set to null to reset the override. */
|
|
4421
|
+
default?: CustomizationThemeMode | null;
|
|
4422
|
+
/** Should the reader be able to switch between dark and light mode. Set to null to reset the override. */
|
|
4423
|
+
toggeable?: boolean | null;
|
|
4424
|
+
};
|
|
4425
|
+
pdf?: {
|
|
4426
|
+
/** If true, PDF export is enabled for the published site. Set to null to reset the override. */
|
|
4427
|
+
enabled: boolean | null;
|
|
4428
|
+
};
|
|
4429
|
+
feedback?: {
|
|
4430
|
+
/** If true, feedback gathering is enabled. Set to null to reset the override. */
|
|
4431
|
+
enabled: boolean | null;
|
|
4432
|
+
};
|
|
4433
|
+
aiSearch?: {
|
|
4434
|
+
/** If true, AI search is enabled. Set to null to reset the override. */
|
|
4435
|
+
enabled: boolean | null;
|
|
4436
|
+
};
|
|
4437
|
+
git?: {
|
|
4438
|
+
/** Whether the published site should show a link to edit the content on the git provider set up in the Git Sync. Set to null to reset the override. */
|
|
4439
|
+
showEditLink: boolean | null;
|
|
4440
|
+
};
|
|
4441
|
+
pagination?: {
|
|
4442
|
+
/** Whether the pagination navigation should be displayed on pages. Set to null to reset the override. */
|
|
4443
|
+
enabled: boolean | null;
|
|
4444
|
+
};
|
|
4445
|
+
trademark?: {
|
|
4446
|
+
/** Whether the GitBook trademark ("Powered by GitBook") should be visible. Set to null to reset the override. */
|
|
4447
|
+
enabled: boolean | null;
|
|
4448
|
+
};
|
|
4449
|
+
privacyPolicy?: {
|
|
4450
|
+
/** The custom link to the privacy policy. Set to null to reset the override. */
|
|
4451
|
+
url?: URL | null;
|
|
4452
|
+
};
|
|
4453
|
+
socialPreview?: {
|
|
4454
|
+
/** The URL for the social preview image. Set to null to reset the override. */
|
|
4455
|
+
url?: URL | null;
|
|
4456
|
+
};
|
|
4457
|
+
}
|
|
4332
4458
|
/**
|
|
4333
4459
|
* * `public`: Anyone can access the site, and the site is indexed by search engines.
|
|
4334
4460
|
* * `unlisted`: Anyone can access the site, and the site is not indexed by search engines
|
|
@@ -5146,6 +5272,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5146
5272
|
updateChangeRequestById: (spaceId: string, changeRequestId: string, data: {
|
|
5147
5273
|
/** Subject of the change request */
|
|
5148
5274
|
subject?: ChangeRequestSubject;
|
|
5275
|
+
status?: 'draft' | 'open' | 'archived';
|
|
5149
5276
|
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, Error>>;
|
|
5150
5277
|
/**
|
|
5151
5278
|
* No description
|
|
@@ -8101,6 +8228,19 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8101
8228
|
/** A new title for the Synced Block. */
|
|
8102
8229
|
title?: string;
|
|
8103
8230
|
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
8231
|
+
/**
|
|
8232
|
+
* No description
|
|
8233
|
+
*
|
|
8234
|
+
* @tags organizations
|
|
8235
|
+
* @name GetSyncedBlockContent
|
|
8236
|
+
* @summary Get a synced block content
|
|
8237
|
+
* @request GET:/orgs/{organizationId}/synced-blocks/{syncedBlockId}/content
|
|
8238
|
+
* @secure
|
|
8239
|
+
*/
|
|
8240
|
+
getSyncedBlockContent: (organizationId: string, syncedBlockId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
8241
|
+
document: JSONDocument;
|
|
8242
|
+
files: RevisionFile[];
|
|
8243
|
+
}, Error>>;
|
|
8104
8244
|
/**
|
|
8105
8245
|
* No description
|
|
8106
8246
|
*
|
|
@@ -8544,6 +8684,59 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8544
8684
|
message: string;
|
|
8545
8685
|
};
|
|
8546
8686
|
}>>;
|
|
8687
|
+
/**
|
|
8688
|
+
* No description
|
|
8689
|
+
*
|
|
8690
|
+
* @tags sites
|
|
8691
|
+
* @name OverrideSiteSpaceCustomizationById
|
|
8692
|
+
* @summary Override the customization configuration for a site space.
|
|
8693
|
+
* @request PATCH:/orgs/{organizationId}/sites/{siteId}/spaces/{siteSpaceId}/customization
|
|
8694
|
+
* @secure
|
|
8695
|
+
*/
|
|
8696
|
+
overrideSiteSpaceCustomizationById: (organizationId: string, siteId: string, siteSpaceId: string, data: SiteSpaceCustomizationOverrides, params?: RequestParams) => Promise<HttpResponse<SiteCustomizationSettings, Error | {
|
|
8697
|
+
error: {
|
|
8698
|
+
/** @format int32 */
|
|
8699
|
+
code: 400;
|
|
8700
|
+
message: string;
|
|
8701
|
+
};
|
|
8702
|
+
}>>;
|
|
8703
|
+
/**
|
|
8704
|
+
* No description
|
|
8705
|
+
*
|
|
8706
|
+
* @tags permissions, sites
|
|
8707
|
+
* @name ListPermissionsAggregateInSite
|
|
8708
|
+
* @summary List permissions for all users of a site.
|
|
8709
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/permissions/aggregate
|
|
8710
|
+
* @secure
|
|
8711
|
+
*/
|
|
8712
|
+
listPermissionsAggregateInSite: (organizationId: string, siteId: string, query?: {
|
|
8713
|
+
/** Identifier of the page results to fetch. */
|
|
8714
|
+
page?: string;
|
|
8715
|
+
/**
|
|
8716
|
+
* The number of results per page
|
|
8717
|
+
* @min 0
|
|
8718
|
+
* @max 1000
|
|
8719
|
+
*/
|
|
8720
|
+
limit?: number;
|
|
8721
|
+
/** If defined, only members with this role will be returned. */
|
|
8722
|
+
role?: MemberRole;
|
|
8723
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
8724
|
+
items: {
|
|
8725
|
+
/**
|
|
8726
|
+
* "The role of a member in an organization.
|
|
8727
|
+
* "admin": Can administrate the content: create, delete spaces, ...
|
|
8728
|
+
* "create": Can create content.
|
|
8729
|
+
* "review": Can review content.
|
|
8730
|
+
* "edit": Can edit the content (live or change requests).
|
|
8731
|
+
* "comment": Can access the content and its discussions.
|
|
8732
|
+
* "read": Can access the content, but cannot update it in any way.
|
|
8733
|
+
*/
|
|
8734
|
+
permission: MemberRole;
|
|
8735
|
+
user: User;
|
|
8736
|
+
/** The content or organization that enforced this permission level. */
|
|
8737
|
+
origin: SpacePointer;
|
|
8738
|
+
}[];
|
|
8739
|
+
}, Error>>;
|
|
8547
8740
|
/**
|
|
8548
8741
|
* No description
|
|
8549
8742
|
*
|
|
@@ -8760,7 +8953,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8760
8953
|
* @secure
|
|
8761
8954
|
*/
|
|
8762
8955
|
generateHiveAccessToken: (data?: {
|
|
8956
|
+
/** @deprecated */
|
|
8763
8957
|
spaces?: string[];
|
|
8958
|
+
contentIds?: string[];
|
|
8764
8959
|
}, params?: RequestParams) => Promise<HttpResponse<HiveAccessToken, Error>>;
|
|
8765
8960
|
};
|
|
8766
8961
|
urls: {
|
package/dist/index.cjs
CHANGED
|
@@ -212,6 +212,7 @@ __export(src_exports, {
|
|
|
212
212
|
HttpClient: () => HttpClient,
|
|
213
213
|
ImportContentSource: () => ImportContentSource,
|
|
214
214
|
IntegrationCategory: () => IntegrationCategory,
|
|
215
|
+
IntegrationInstallationSiteSelection: () => IntegrationInstallationSiteSelection,
|
|
215
216
|
IntegrationInstallationSpaceSelection: () => IntegrationInstallationSpaceSelection,
|
|
216
217
|
IntegrationInstallationStatus: () => IntegrationInstallationStatus,
|
|
217
218
|
IntegrationScope: () => IntegrationScope,
|
|
@@ -238,7 +239,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
238
239
|
|
|
239
240
|
// package.json
|
|
240
241
|
var name = "@gitbook/api";
|
|
241
|
-
var version = "0.
|
|
242
|
+
var version = "0.39.0";
|
|
242
243
|
|
|
243
244
|
// src/client.ts
|
|
244
245
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -514,6 +515,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
514
515
|
IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
|
|
515
516
|
IntegrationScope2["SpaceGitSync"] = "space:git:sync";
|
|
516
517
|
IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
|
|
518
|
+
IntegrationScope2["SiteScriptInject"] = "site:script:inject";
|
|
517
519
|
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
518
520
|
return IntegrationScope2;
|
|
519
521
|
})(IntegrationScope || {});
|
|
@@ -522,6 +524,11 @@ var IntegrationInstallationSpaceSelection = /* @__PURE__ */ ((IntegrationInstall
|
|
|
522
524
|
IntegrationInstallationSpaceSelection2["Selected"] = "selected";
|
|
523
525
|
return IntegrationInstallationSpaceSelection2;
|
|
524
526
|
})(IntegrationInstallationSpaceSelection || {});
|
|
527
|
+
var IntegrationInstallationSiteSelection = /* @__PURE__ */ ((IntegrationInstallationSiteSelection2) => {
|
|
528
|
+
IntegrationInstallationSiteSelection2["All"] = "all";
|
|
529
|
+
IntegrationInstallationSiteSelection2["Selected"] = "selected";
|
|
530
|
+
return IntegrationInstallationSiteSelection2;
|
|
531
|
+
})(IntegrationInstallationSiteSelection || {});
|
|
525
532
|
var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
526
533
|
IntegrationCategory2["Analytics"] = "analytics";
|
|
527
534
|
IntegrationCategory2["Captures"] = "captures";
|
|
@@ -555,6 +562,10 @@ var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
|
|
|
555
562
|
return BillingInterval2;
|
|
556
563
|
})(BillingInterval || {});
|
|
557
564
|
var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
|
|
565
|
+
BillingProduct2["Free2024"] = "free_2024";
|
|
566
|
+
BillingProduct2["Plus2024"] = "plus_2024";
|
|
567
|
+
BillingProduct2["Pro2024"] = "pro_2024";
|
|
568
|
+
BillingProduct2["Enterprise2024"] = "enterprise_2024";
|
|
558
569
|
BillingProduct2["Free"] = "free";
|
|
559
570
|
BillingProduct2["Plus"] = "plus";
|
|
560
571
|
BillingProduct2["Pro"] = "pro";
|
|
@@ -2704,6 +2715,13 @@ var Api = class extends HttpClient {
|
|
|
2704
2715
|
type: "application/json" /* Json */,
|
|
2705
2716
|
...params
|
|
2706
2717
|
}),
|
|
2718
|
+
getSyncedBlockContent: (organizationId, syncedBlockId, params = {}) => this.request({
|
|
2719
|
+
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/content`,
|
|
2720
|
+
method: "GET",
|
|
2721
|
+
secure: true,
|
|
2722
|
+
format: "json",
|
|
2723
|
+
...params
|
|
2724
|
+
}),
|
|
2707
2725
|
getSyncedBlockBacklinks: (organizationId, syncedBlockId, query, params = {}) => this.request({
|
|
2708
2726
|
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/backlinks`,
|
|
2709
2727
|
method: "GET",
|
|
@@ -2916,6 +2934,23 @@ var Api = class extends HttpClient {
|
|
|
2916
2934
|
format: "json",
|
|
2917
2935
|
...params
|
|
2918
2936
|
}),
|
|
2937
|
+
overrideSiteSpaceCustomizationById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
2938
|
+
path: `/orgs/${organizationId}/sites/${siteId}/spaces/${siteSpaceId}/customization`,
|
|
2939
|
+
method: "PATCH",
|
|
2940
|
+
body: data,
|
|
2941
|
+
secure: true,
|
|
2942
|
+
type: "application/json" /* Json */,
|
|
2943
|
+
format: "json",
|
|
2944
|
+
...params
|
|
2945
|
+
}),
|
|
2946
|
+
listPermissionsAggregateInSite: (organizationId, siteId, query, params = {}) => this.request({
|
|
2947
|
+
path: `/orgs/${organizationId}/sites/${siteId}/permissions/aggregate`,
|
|
2948
|
+
method: "GET",
|
|
2949
|
+
query,
|
|
2950
|
+
secure: true,
|
|
2951
|
+
format: "json",
|
|
2952
|
+
...params
|
|
2953
|
+
}),
|
|
2919
2954
|
listSeatsInOrganizationById: (organizationId, params = {}) => this.request({
|
|
2920
2955
|
path: `/orgs/${organizationId}/seats`,
|
|
2921
2956
|
method: "GET",
|
|
@@ -3160,6 +3195,7 @@ var GitBookAPI = class extends Api {
|
|
|
3160
3195
|
HttpClient,
|
|
3161
3196
|
ImportContentSource,
|
|
3162
3197
|
IntegrationCategory,
|
|
3198
|
+
IntegrationInstallationSiteSelection,
|
|
3163
3199
|
IntegrationInstallationSpaceSelection,
|
|
3164
3200
|
IntegrationInstallationStatus,
|
|
3165
3201
|
IntegrationScope,
|
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.39.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -448,6 +448,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
448
448
|
IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
|
|
449
449
|
IntegrationScope2["SpaceGitSync"] = "space:git:sync";
|
|
450
450
|
IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
|
|
451
|
+
IntegrationScope2["SiteScriptInject"] = "site:script:inject";
|
|
451
452
|
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
452
453
|
return IntegrationScope2;
|
|
453
454
|
})(IntegrationScope || {});
|
|
@@ -456,6 +457,11 @@ var IntegrationInstallationSpaceSelection = /* @__PURE__ */ ((IntegrationInstall
|
|
|
456
457
|
IntegrationInstallationSpaceSelection2["Selected"] = "selected";
|
|
457
458
|
return IntegrationInstallationSpaceSelection2;
|
|
458
459
|
})(IntegrationInstallationSpaceSelection || {});
|
|
460
|
+
var IntegrationInstallationSiteSelection = /* @__PURE__ */ ((IntegrationInstallationSiteSelection2) => {
|
|
461
|
+
IntegrationInstallationSiteSelection2["All"] = "all";
|
|
462
|
+
IntegrationInstallationSiteSelection2["Selected"] = "selected";
|
|
463
|
+
return IntegrationInstallationSiteSelection2;
|
|
464
|
+
})(IntegrationInstallationSiteSelection || {});
|
|
459
465
|
var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
460
466
|
IntegrationCategory2["Analytics"] = "analytics";
|
|
461
467
|
IntegrationCategory2["Captures"] = "captures";
|
|
@@ -489,6 +495,10 @@ var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
|
|
|
489
495
|
return BillingInterval2;
|
|
490
496
|
})(BillingInterval || {});
|
|
491
497
|
var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
|
|
498
|
+
BillingProduct2["Free2024"] = "free_2024";
|
|
499
|
+
BillingProduct2["Plus2024"] = "plus_2024";
|
|
500
|
+
BillingProduct2["Pro2024"] = "pro_2024";
|
|
501
|
+
BillingProduct2["Enterprise2024"] = "enterprise_2024";
|
|
492
502
|
BillingProduct2["Free"] = "free";
|
|
493
503
|
BillingProduct2["Plus"] = "plus";
|
|
494
504
|
BillingProduct2["Pro"] = "pro";
|
|
@@ -2638,6 +2648,13 @@ var Api = class extends HttpClient {
|
|
|
2638
2648
|
type: "application/json" /* Json */,
|
|
2639
2649
|
...params
|
|
2640
2650
|
}),
|
|
2651
|
+
getSyncedBlockContent: (organizationId, syncedBlockId, params = {}) => this.request({
|
|
2652
|
+
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/content`,
|
|
2653
|
+
method: "GET",
|
|
2654
|
+
secure: true,
|
|
2655
|
+
format: "json",
|
|
2656
|
+
...params
|
|
2657
|
+
}),
|
|
2641
2658
|
getSyncedBlockBacklinks: (organizationId, syncedBlockId, query, params = {}) => this.request({
|
|
2642
2659
|
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/backlinks`,
|
|
2643
2660
|
method: "GET",
|
|
@@ -2850,6 +2867,23 @@ var Api = class extends HttpClient {
|
|
|
2850
2867
|
format: "json",
|
|
2851
2868
|
...params
|
|
2852
2869
|
}),
|
|
2870
|
+
overrideSiteSpaceCustomizationById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
2871
|
+
path: `/orgs/${organizationId}/sites/${siteId}/spaces/${siteSpaceId}/customization`,
|
|
2872
|
+
method: "PATCH",
|
|
2873
|
+
body: data,
|
|
2874
|
+
secure: true,
|
|
2875
|
+
type: "application/json" /* Json */,
|
|
2876
|
+
format: "json",
|
|
2877
|
+
...params
|
|
2878
|
+
}),
|
|
2879
|
+
listPermissionsAggregateInSite: (organizationId, siteId, query, params = {}) => this.request({
|
|
2880
|
+
path: `/orgs/${organizationId}/sites/${siteId}/permissions/aggregate`,
|
|
2881
|
+
method: "GET",
|
|
2882
|
+
query,
|
|
2883
|
+
secure: true,
|
|
2884
|
+
format: "json",
|
|
2885
|
+
...params
|
|
2886
|
+
}),
|
|
2853
2887
|
listSeatsInOrganizationById: (organizationId, params = {}) => this.request({
|
|
2854
2888
|
path: `/orgs/${organizationId}/seats`,
|
|
2855
2889
|
method: "GET",
|
|
@@ -3093,6 +3127,7 @@ export {
|
|
|
3093
3127
|
HttpClient,
|
|
3094
3128
|
ImportContentSource,
|
|
3095
3129
|
IntegrationCategory,
|
|
3130
|
+
IntegrationInstallationSiteSelection,
|
|
3096
3131
|
IntegrationInstallationSpaceSelection,
|
|
3097
3132
|
IntegrationInstallationStatus,
|
|
3098
3133
|
IntegrationScope,
|