@gitbook/api 0.58.0 → 0.60.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 +132 -15
- package/dist/index.cjs +63 -1
- package/dist/index.js +60 -1
- package/package.json +1 -1
- package/spec/openapi.json +480 -42
- package/spec/openapi.yaml +292 -30
package/dist/client.d.ts
CHANGED
|
@@ -1026,6 +1026,12 @@ export interface SyncGitRepository {
|
|
|
1026
1026
|
/** Optional metadata to store on the space about the Git provider */
|
|
1027
1027
|
gitInfo?: UpdateSpaceGitInfo;
|
|
1028
1028
|
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Name of the icon
|
|
1031
|
+
* @maxLength 50
|
|
1032
|
+
* @example "gear"
|
|
1033
|
+
*/
|
|
1034
|
+
export declare type Icon = string;
|
|
1029
1035
|
export interface RevisionPageBase {
|
|
1030
1036
|
/** Unique identifier for the page in the revision */
|
|
1031
1037
|
id: string;
|
|
@@ -1036,6 +1042,8 @@ export interface RevisionPageBase {
|
|
|
1036
1042
|
title: string;
|
|
1037
1043
|
/** Emoji of the page, if one has been set. */
|
|
1038
1044
|
emoji?: Emoji;
|
|
1045
|
+
/** Icon of the page, if one has been set. */
|
|
1046
|
+
icon?: Icon;
|
|
1039
1047
|
/** When the page was first created. Only present if page has been edited at least once. */
|
|
1040
1048
|
createdAt?: Timestamp;
|
|
1041
1049
|
/** When the page was last edited. Only present if page has been edited at least once. */
|
|
@@ -3706,11 +3714,32 @@ export declare enum SiteVisibility {
|
|
|
3706
3714
|
ShareLink = "share-link",
|
|
3707
3715
|
VisitorAuth = "visitor-auth"
|
|
3708
3716
|
}
|
|
3709
|
-
/**
|
|
3710
|
-
export
|
|
3711
|
-
|
|
3712
|
-
|
|
3717
|
+
/** Topic of the content */
|
|
3718
|
+
export declare enum SiteAdsTopic {
|
|
3719
|
+
Webdev = "webdev",
|
|
3720
|
+
Crypto = "crypto"
|
|
3713
3721
|
}
|
|
3722
|
+
export declare type SiteAds = {
|
|
3723
|
+
status: 'pending';
|
|
3724
|
+
/** True if the user can submit the site for review. */
|
|
3725
|
+
submittable: boolean;
|
|
3726
|
+
} | {
|
|
3727
|
+
status: 'in-review';
|
|
3728
|
+
/** Topic of the content */
|
|
3729
|
+
topic: SiteAdsTopic;
|
|
3730
|
+
/** The email address linked to the Ads partner account */
|
|
3731
|
+
accountEmail: string;
|
|
3732
|
+
} | {
|
|
3733
|
+
status: 'rejected';
|
|
3734
|
+
} | {
|
|
3735
|
+
status: 'live' | 'disabled';
|
|
3736
|
+
/** Topic of the content */
|
|
3737
|
+
topic: SiteAdsTopic;
|
|
3738
|
+
/** The ad network zone ID */
|
|
3739
|
+
zoneId: string;
|
|
3740
|
+
/** The email address linked to the Ads partner account */
|
|
3741
|
+
accountEmail: string;
|
|
3742
|
+
};
|
|
3714
3743
|
export interface Site {
|
|
3715
3744
|
object: 'site';
|
|
3716
3745
|
/** Unique identifier of the site */
|
|
@@ -3736,8 +3765,7 @@ export interface Site {
|
|
|
3736
3765
|
siteSpaces: number;
|
|
3737
3766
|
/** @format date-time */
|
|
3738
3767
|
createdAt: string;
|
|
3739
|
-
|
|
3740
|
-
ads?: SiteAdsConfig;
|
|
3768
|
+
ads?: SiteAds;
|
|
3741
3769
|
/** URLs associated with the object */
|
|
3742
3770
|
urls: {
|
|
3743
3771
|
/**
|
|
@@ -3780,6 +3808,13 @@ export declare type SitePublishingAuthUpdate = (VisitorAuthCustomBackend | Visit
|
|
|
3780
3808
|
*/
|
|
3781
3809
|
fallbackURL?: string;
|
|
3782
3810
|
};
|
|
3811
|
+
export declare enum CustomizationIconsStyle {
|
|
3812
|
+
Regular = "regular",
|
|
3813
|
+
Solid = "solid",
|
|
3814
|
+
Duotone = "duotone",
|
|
3815
|
+
Light = "light",
|
|
3816
|
+
Thin = "thin"
|
|
3817
|
+
}
|
|
3783
3818
|
export interface SiteCustomizationSettings {
|
|
3784
3819
|
/** Title to use for the published site. If not defined, it'll fallback to the default content title. */
|
|
3785
3820
|
title?: SiteTitle;
|
|
@@ -3788,6 +3823,7 @@ export interface SiteCustomizationSettings {
|
|
|
3788
3823
|
corners: CustomizationCorners;
|
|
3789
3824
|
font: CustomizationFont;
|
|
3790
3825
|
background: CustomizationBackground;
|
|
3826
|
+
icons: CustomizationIconsStyle;
|
|
3791
3827
|
};
|
|
3792
3828
|
internationalization: {
|
|
3793
3829
|
/** Language for the UI element */
|
|
@@ -3898,6 +3934,8 @@ export interface SiteSpaceCustomizationOverrides {
|
|
|
3898
3934
|
corners?: CustomizationCorners | null;
|
|
3899
3935
|
/** The font family to use for the content. Set to null to reset the override. */
|
|
3900
3936
|
font?: CustomizationFont | null;
|
|
3937
|
+
/** The icons style to use for the content. Set to null to reset the override. */
|
|
3938
|
+
icons?: CustomizationIconsStyle | null;
|
|
3901
3939
|
/** The style of background to use. Set to null to reset the override. */
|
|
3902
3940
|
background?: CustomizationBackground | null;
|
|
3903
3941
|
};
|
|
@@ -4625,6 +4663,14 @@ export interface CustomHostnameChannel {
|
|
|
4625
4663
|
}
|
|
4626
4664
|
/** Channel to subscribe to for API updates. */
|
|
4627
4665
|
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceBrokenLinksChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestBrokenLinksChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationCapturesChannel | OrganizationContentAuditsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationExperimentalFeaturesChannel | OrganizationSyncedBlockChannel | CommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteSpacesChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | CustomHostnameChannel;
|
|
4666
|
+
/** The status of ads on the site */
|
|
4667
|
+
export declare enum SiteAdsStatus {
|
|
4668
|
+
Pending = "pending",
|
|
4669
|
+
InReview = "in-review",
|
|
4670
|
+
Live = "live",
|
|
4671
|
+
Rejected = "rejected",
|
|
4672
|
+
Disabled = "disabled"
|
|
4673
|
+
}
|
|
4628
4674
|
export interface Seat {
|
|
4629
4675
|
object: 'seat';
|
|
4630
4676
|
/** The unique ID of the organization */
|
|
@@ -8518,6 +8564,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8518
8564
|
* @secure
|
|
8519
8565
|
*/
|
|
8520
8566
|
createSite: (organizationId: string, data: {
|
|
8567
|
+
/** The type of the site, defaults to Basic */
|
|
8568
|
+
type?: SiteType;
|
|
8521
8569
|
/** Title of the site */
|
|
8522
8570
|
title?: SiteTitle;
|
|
8523
8571
|
/**
|
|
@@ -8591,7 +8639,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8591
8639
|
* @request POST:/orgs/{organizationId}/sites/{siteId}/publish
|
|
8592
8640
|
* @secure
|
|
8593
8641
|
*/
|
|
8594
|
-
publishSite: (organizationId: string, siteId: string, params?: RequestParams) => Promise<HttpResponse<Site
|
|
8642
|
+
publishSite: (organizationId: string, siteId: string, params?: RequestParams) => Promise<HttpResponse<Site | {
|
|
8643
|
+
type: 'checkout';
|
|
8644
|
+
/** Stripe payment session ID */
|
|
8645
|
+
sessionId: string;
|
|
8646
|
+
}, Error>>;
|
|
8595
8647
|
/**
|
|
8596
8648
|
* No description
|
|
8597
8649
|
*
|
|
@@ -8742,17 +8794,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8742
8794
|
} | {
|
|
8743
8795
|
/** User must complete a checkout before publishing. */
|
|
8744
8796
|
type: 'checkout';
|
|
8745
|
-
/** Stripe payment session ID */
|
|
8746
|
-
sessionId: string;
|
|
8747
8797
|
} | {
|
|
8748
8798
|
/** User cannot publish due to lack of permissions. */
|
|
8749
8799
|
type: 'no-permissions';
|
|
8750
|
-
} | {
|
|
8751
|
-
/** User must upgrade their organization plan before publishing. */
|
|
8752
|
-
type: 'legacy-upgrade';
|
|
8753
|
-
/** The org plan to upgrade to */
|
|
8754
|
-
plan: BillingProduct;
|
|
8755
|
-
invoice?: BillingInvoicePreview;
|
|
8756
8800
|
}, Error | {
|
|
8757
8801
|
error: {
|
|
8758
8802
|
/** @format int32 */
|
|
@@ -9066,6 +9110,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9066
9110
|
* @secure
|
|
9067
9111
|
*/
|
|
9068
9112
|
getContentAnalyticsForSiteSpaceById: (organizationId: string, siteId: string, siteSpaceId: string, params?: RequestParams) => Promise<HttpResponse<AnalyticsContentPages, Error>>;
|
|
9113
|
+
/**
|
|
9114
|
+
* No description
|
|
9115
|
+
*
|
|
9116
|
+
* @tags sites
|
|
9117
|
+
* @name CreateSitesPageFeedback
|
|
9118
|
+
* @summary Create a page feedback by a visitor on a site.
|
|
9119
|
+
* @request PUT:/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/insights/pages/{pageId}/feedbacks/{visitorId}
|
|
9120
|
+
* @secure
|
|
9121
|
+
*/
|
|
9122
|
+
createSitesPageFeedback: (organizationId: string, siteId: string, siteSpaceId: string, pageId: string, visitorId: string, data: {
|
|
9123
|
+
rating: PageFeedbackRating;
|
|
9124
|
+
}, params?: RequestParams) => Promise<HttpResponse<PageFeedback, Error>>;
|
|
9069
9125
|
/**
|
|
9070
9126
|
* No description
|
|
9071
9127
|
*
|
|
@@ -9122,6 +9178,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9122
9178
|
* @secure
|
|
9123
9179
|
*/
|
|
9124
9180
|
trackViewInSiteById: (organizationId: string, siteId: string, data: SiteTrackPageView, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
9181
|
+
/**
|
|
9182
|
+
* No description
|
|
9183
|
+
*
|
|
9184
|
+
* @tags sites
|
|
9185
|
+
* @name UpdateSiteAdsById
|
|
9186
|
+
* @summary Enable, disable, or submit for review Ads on a site.
|
|
9187
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/ads
|
|
9188
|
+
* @secure
|
|
9189
|
+
*/
|
|
9190
|
+
updateSiteAdsById: (organizationId: string, siteId: string, data?: {
|
|
9191
|
+
status?: 'in-review' | 'disabled';
|
|
9192
|
+
/** Topic of the content */
|
|
9193
|
+
topic?: SiteAdsTopic;
|
|
9194
|
+
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
9125
9195
|
};
|
|
9126
9196
|
customHostnames: {
|
|
9127
9197
|
/**
|
|
@@ -9203,6 +9273,53 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9203
9273
|
};
|
|
9204
9274
|
}>>;
|
|
9205
9275
|
};
|
|
9276
|
+
ads: {
|
|
9277
|
+
/**
|
|
9278
|
+
* No description
|
|
9279
|
+
*
|
|
9280
|
+
* @tags ads
|
|
9281
|
+
* @name AdsListSites
|
|
9282
|
+
* @summary List all the sites with ads configured
|
|
9283
|
+
* @request GET:/ads/sites
|
|
9284
|
+
* @secure
|
|
9285
|
+
*/
|
|
9286
|
+
adsListSites: (query?: {
|
|
9287
|
+
/** Identifier of the page results to fetch. */
|
|
9288
|
+
page?: string;
|
|
9289
|
+
/**
|
|
9290
|
+
* The number of results per page
|
|
9291
|
+
* @min 0
|
|
9292
|
+
* @max 1000
|
|
9293
|
+
*/
|
|
9294
|
+
limit?: number;
|
|
9295
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
9296
|
+
items: {
|
|
9297
|
+
id: string;
|
|
9298
|
+
url: string;
|
|
9299
|
+
ads: SiteAds;
|
|
9300
|
+
}[];
|
|
9301
|
+
}, Error>>;
|
|
9302
|
+
/**
|
|
9303
|
+
* No description
|
|
9304
|
+
*
|
|
9305
|
+
* @tags ads
|
|
9306
|
+
* @name AdsUpdateSite
|
|
9307
|
+
* @summary Update the Ads configuration for a site
|
|
9308
|
+
* @request PATCH:/ads/sites/{siteId}
|
|
9309
|
+
* @secure
|
|
9310
|
+
*/
|
|
9311
|
+
adsUpdateSite: (siteId: string, data: {
|
|
9312
|
+
status: 'live';
|
|
9313
|
+
/** ID of the zone */
|
|
9314
|
+
zoneId: string;
|
|
9315
|
+
/** ID to fetch reporting data */
|
|
9316
|
+
reportingId: string;
|
|
9317
|
+
} | {
|
|
9318
|
+
status: 'rejected';
|
|
9319
|
+
} | {
|
|
9320
|
+
status: 'pending';
|
|
9321
|
+
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
9322
|
+
};
|
|
9206
9323
|
internal: {
|
|
9207
9324
|
/**
|
|
9208
9325
|
* No description
|
package/dist/index.cjs
CHANGED
|
@@ -203,6 +203,7 @@ __export(src_exports, {
|
|
|
203
203
|
CustomizationCorners: () => CustomizationCorners,
|
|
204
204
|
CustomizationFont: () => CustomizationFont,
|
|
205
205
|
CustomizationHeaderPreset: () => CustomizationHeaderPreset,
|
|
206
|
+
CustomizationIconsStyle: () => CustomizationIconsStyle,
|
|
206
207
|
CustomizationLocale: () => CustomizationLocale,
|
|
207
208
|
CustomizationThemeMode: () => CustomizationThemeMode,
|
|
208
209
|
GITBOOK_DEFAULT_ENDPOINT: () => GITBOOK_DEFAULT_ENDPOINT,
|
|
@@ -228,6 +229,8 @@ __export(src_exports, {
|
|
|
228
229
|
RevisionPageLayoutPreset: () => RevisionPageLayoutPreset,
|
|
229
230
|
RevisionPageType: () => RevisionPageType,
|
|
230
231
|
RevisionSemanticChangeType: () => RevisionSemanticChangeType,
|
|
232
|
+
SiteAdsStatus: () => SiteAdsStatus,
|
|
233
|
+
SiteAdsTopic: () => SiteAdsTopic,
|
|
231
234
|
SiteType: () => SiteType,
|
|
232
235
|
SiteVisibility: () => SiteVisibility,
|
|
233
236
|
SpaceBlockReason: () => SpaceBlockReason,
|
|
@@ -238,7 +241,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
238
241
|
|
|
239
242
|
// package.json
|
|
240
243
|
var name = "@gitbook/api";
|
|
241
|
-
var version = "0.
|
|
244
|
+
var version = "0.60.0";
|
|
242
245
|
|
|
243
246
|
// src/client.ts
|
|
244
247
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -669,6 +672,19 @@ var SiteVisibility = /* @__PURE__ */ ((SiteVisibility2) => {
|
|
|
669
672
|
SiteVisibility2["VisitorAuth"] = "visitor-auth";
|
|
670
673
|
return SiteVisibility2;
|
|
671
674
|
})(SiteVisibility || {});
|
|
675
|
+
var SiteAdsTopic = /* @__PURE__ */ ((SiteAdsTopic2) => {
|
|
676
|
+
SiteAdsTopic2["Webdev"] = "webdev";
|
|
677
|
+
SiteAdsTopic2["Crypto"] = "crypto";
|
|
678
|
+
return SiteAdsTopic2;
|
|
679
|
+
})(SiteAdsTopic || {});
|
|
680
|
+
var CustomizationIconsStyle = /* @__PURE__ */ ((CustomizationIconsStyle2) => {
|
|
681
|
+
CustomizationIconsStyle2["Regular"] = "regular";
|
|
682
|
+
CustomizationIconsStyle2["Solid"] = "solid";
|
|
683
|
+
CustomizationIconsStyle2["Duotone"] = "duotone";
|
|
684
|
+
CustomizationIconsStyle2["Light"] = "light";
|
|
685
|
+
CustomizationIconsStyle2["Thin"] = "thin";
|
|
686
|
+
return CustomizationIconsStyle2;
|
|
687
|
+
})(CustomizationIconsStyle || {});
|
|
672
688
|
var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
|
|
673
689
|
CustomHostnameDnsStatus2["DnsPassed"] = "dns_passed";
|
|
674
690
|
CustomHostnameDnsStatus2["DnsWrongCname"] = "dns_wrong_cname";
|
|
@@ -746,6 +762,14 @@ var APIIntegrationScope = /* @__PURE__ */ ((APIIntegrationScope2) => {
|
|
|
746
762
|
APIIntegrationScope2["IntegrationInstallationUpdate"] = "integration:installation:update";
|
|
747
763
|
return APIIntegrationScope2;
|
|
748
764
|
})(APIIntegrationScope || {});
|
|
765
|
+
var SiteAdsStatus = /* @__PURE__ */ ((SiteAdsStatus2) => {
|
|
766
|
+
SiteAdsStatus2["Pending"] = "pending";
|
|
767
|
+
SiteAdsStatus2["InReview"] = "in-review";
|
|
768
|
+
SiteAdsStatus2["Live"] = "live";
|
|
769
|
+
SiteAdsStatus2["Rejected"] = "rejected";
|
|
770
|
+
SiteAdsStatus2["Disabled"] = "disabled";
|
|
771
|
+
return SiteAdsStatus2;
|
|
772
|
+
})(SiteAdsStatus || {});
|
|
749
773
|
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
750
774
|
ContentType2["Json"] = "application/json";
|
|
751
775
|
ContentType2["FormData"] = "multipart/form-data";
|
|
@@ -3023,6 +3047,15 @@ var Api = class extends HttpClient {
|
|
|
3023
3047
|
format: "json",
|
|
3024
3048
|
...params
|
|
3025
3049
|
}),
|
|
3050
|
+
createSitesPageFeedback: (organizationId, siteId, siteSpaceId, pageId, visitorId, data, params = {}) => this.request({
|
|
3051
|
+
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/pages/${pageId}/feedbacks/${visitorId}`,
|
|
3052
|
+
method: "PUT",
|
|
3053
|
+
body: data,
|
|
3054
|
+
secure: true,
|
|
3055
|
+
type: "application/json" /* Json */,
|
|
3056
|
+
format: "json",
|
|
3057
|
+
...params
|
|
3058
|
+
}),
|
|
3026
3059
|
moveSiteSpace: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
3027
3060
|
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/move`,
|
|
3028
3061
|
method: "POST",
|
|
@@ -3047,6 +3080,14 @@ var Api = class extends HttpClient {
|
|
|
3047
3080
|
secure: true,
|
|
3048
3081
|
type: "application/json" /* Json */,
|
|
3049
3082
|
...params
|
|
3083
|
+
}),
|
|
3084
|
+
updateSiteAdsById: (organizationId, siteId, data, params = {}) => this.request({
|
|
3085
|
+
path: `/orgs/${organizationId}/sites/${siteId}/ads`,
|
|
3086
|
+
method: "POST",
|
|
3087
|
+
body: data,
|
|
3088
|
+
secure: true,
|
|
3089
|
+
type: "application/json" /* Json */,
|
|
3090
|
+
...params
|
|
3050
3091
|
})
|
|
3051
3092
|
};
|
|
3052
3093
|
this.customHostnames = {
|
|
@@ -3087,6 +3128,24 @@ var Api = class extends HttpClient {
|
|
|
3087
3128
|
...params
|
|
3088
3129
|
})
|
|
3089
3130
|
};
|
|
3131
|
+
this.ads = {
|
|
3132
|
+
adsListSites: (query, params = {}) => this.request({
|
|
3133
|
+
path: `/ads/sites`,
|
|
3134
|
+
method: "GET",
|
|
3135
|
+
query,
|
|
3136
|
+
secure: true,
|
|
3137
|
+
format: "json",
|
|
3138
|
+
...params
|
|
3139
|
+
}),
|
|
3140
|
+
adsUpdateSite: (siteId, data, params = {}) => this.request({
|
|
3141
|
+
path: `/ads/sites/${siteId}`,
|
|
3142
|
+
method: "PATCH",
|
|
3143
|
+
body: data,
|
|
3144
|
+
secure: true,
|
|
3145
|
+
type: "application/json" /* Json */,
|
|
3146
|
+
...params
|
|
3147
|
+
})
|
|
3148
|
+
};
|
|
3090
3149
|
this.internal = {
|
|
3091
3150
|
generateHiveAccessToken: (data, params = {}) => this.request({
|
|
3092
3151
|
path: `/internal/hive/token`,
|
|
@@ -3225,6 +3284,7 @@ var GitBookAPI = class extends Api {
|
|
|
3225
3284
|
CustomizationCorners,
|
|
3226
3285
|
CustomizationFont,
|
|
3227
3286
|
CustomizationHeaderPreset,
|
|
3287
|
+
CustomizationIconsStyle,
|
|
3228
3288
|
CustomizationLocale,
|
|
3229
3289
|
CustomizationThemeMode,
|
|
3230
3290
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
@@ -3250,6 +3310,8 @@ var GitBookAPI = class extends Api {
|
|
|
3250
3310
|
RevisionPageLayoutPreset,
|
|
3251
3311
|
RevisionPageType,
|
|
3252
3312
|
RevisionSemanticChangeType,
|
|
3313
|
+
SiteAdsStatus,
|
|
3314
|
+
SiteAdsTopic,
|
|
3253
3315
|
SiteType,
|
|
3254
3316
|
SiteVisibility,
|
|
3255
3317
|
SpaceBlockReason,
|
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.60.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -603,6 +603,19 @@ var SiteVisibility = /* @__PURE__ */ ((SiteVisibility2) => {
|
|
|
603
603
|
SiteVisibility2["VisitorAuth"] = "visitor-auth";
|
|
604
604
|
return SiteVisibility2;
|
|
605
605
|
})(SiteVisibility || {});
|
|
606
|
+
var SiteAdsTopic = /* @__PURE__ */ ((SiteAdsTopic2) => {
|
|
607
|
+
SiteAdsTopic2["Webdev"] = "webdev";
|
|
608
|
+
SiteAdsTopic2["Crypto"] = "crypto";
|
|
609
|
+
return SiteAdsTopic2;
|
|
610
|
+
})(SiteAdsTopic || {});
|
|
611
|
+
var CustomizationIconsStyle = /* @__PURE__ */ ((CustomizationIconsStyle2) => {
|
|
612
|
+
CustomizationIconsStyle2["Regular"] = "regular";
|
|
613
|
+
CustomizationIconsStyle2["Solid"] = "solid";
|
|
614
|
+
CustomizationIconsStyle2["Duotone"] = "duotone";
|
|
615
|
+
CustomizationIconsStyle2["Light"] = "light";
|
|
616
|
+
CustomizationIconsStyle2["Thin"] = "thin";
|
|
617
|
+
return CustomizationIconsStyle2;
|
|
618
|
+
})(CustomizationIconsStyle || {});
|
|
606
619
|
var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
|
|
607
620
|
CustomHostnameDnsStatus2["DnsPassed"] = "dns_passed";
|
|
608
621
|
CustomHostnameDnsStatus2["DnsWrongCname"] = "dns_wrong_cname";
|
|
@@ -680,6 +693,14 @@ var APIIntegrationScope = /* @__PURE__ */ ((APIIntegrationScope2) => {
|
|
|
680
693
|
APIIntegrationScope2["IntegrationInstallationUpdate"] = "integration:installation:update";
|
|
681
694
|
return APIIntegrationScope2;
|
|
682
695
|
})(APIIntegrationScope || {});
|
|
696
|
+
var SiteAdsStatus = /* @__PURE__ */ ((SiteAdsStatus2) => {
|
|
697
|
+
SiteAdsStatus2["Pending"] = "pending";
|
|
698
|
+
SiteAdsStatus2["InReview"] = "in-review";
|
|
699
|
+
SiteAdsStatus2["Live"] = "live";
|
|
700
|
+
SiteAdsStatus2["Rejected"] = "rejected";
|
|
701
|
+
SiteAdsStatus2["Disabled"] = "disabled";
|
|
702
|
+
return SiteAdsStatus2;
|
|
703
|
+
})(SiteAdsStatus || {});
|
|
683
704
|
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
684
705
|
ContentType2["Json"] = "application/json";
|
|
685
706
|
ContentType2["FormData"] = "multipart/form-data";
|
|
@@ -2957,6 +2978,15 @@ var Api = class extends HttpClient {
|
|
|
2957
2978
|
format: "json",
|
|
2958
2979
|
...params
|
|
2959
2980
|
}),
|
|
2981
|
+
createSitesPageFeedback: (organizationId, siteId, siteSpaceId, pageId, visitorId, data, params = {}) => this.request({
|
|
2982
|
+
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/pages/${pageId}/feedbacks/${visitorId}`,
|
|
2983
|
+
method: "PUT",
|
|
2984
|
+
body: data,
|
|
2985
|
+
secure: true,
|
|
2986
|
+
type: "application/json" /* Json */,
|
|
2987
|
+
format: "json",
|
|
2988
|
+
...params
|
|
2989
|
+
}),
|
|
2960
2990
|
moveSiteSpace: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
2961
2991
|
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/move`,
|
|
2962
2992
|
method: "POST",
|
|
@@ -2981,6 +3011,14 @@ var Api = class extends HttpClient {
|
|
|
2981
3011
|
secure: true,
|
|
2982
3012
|
type: "application/json" /* Json */,
|
|
2983
3013
|
...params
|
|
3014
|
+
}),
|
|
3015
|
+
updateSiteAdsById: (organizationId, siteId, data, params = {}) => this.request({
|
|
3016
|
+
path: `/orgs/${organizationId}/sites/${siteId}/ads`,
|
|
3017
|
+
method: "POST",
|
|
3018
|
+
body: data,
|
|
3019
|
+
secure: true,
|
|
3020
|
+
type: "application/json" /* Json */,
|
|
3021
|
+
...params
|
|
2984
3022
|
})
|
|
2985
3023
|
};
|
|
2986
3024
|
this.customHostnames = {
|
|
@@ -3021,6 +3059,24 @@ var Api = class extends HttpClient {
|
|
|
3021
3059
|
...params
|
|
3022
3060
|
})
|
|
3023
3061
|
};
|
|
3062
|
+
this.ads = {
|
|
3063
|
+
adsListSites: (query, params = {}) => this.request({
|
|
3064
|
+
path: `/ads/sites`,
|
|
3065
|
+
method: "GET",
|
|
3066
|
+
query,
|
|
3067
|
+
secure: true,
|
|
3068
|
+
format: "json",
|
|
3069
|
+
...params
|
|
3070
|
+
}),
|
|
3071
|
+
adsUpdateSite: (siteId, data, params = {}) => this.request({
|
|
3072
|
+
path: `/ads/sites/${siteId}`,
|
|
3073
|
+
method: "PATCH",
|
|
3074
|
+
body: data,
|
|
3075
|
+
secure: true,
|
|
3076
|
+
type: "application/json" /* Json */,
|
|
3077
|
+
...params
|
|
3078
|
+
})
|
|
3079
|
+
};
|
|
3024
3080
|
this.internal = {
|
|
3025
3081
|
generateHiveAccessToken: (data, params = {}) => this.request({
|
|
3026
3082
|
path: `/internal/hive/token`,
|
|
@@ -3158,6 +3214,7 @@ export {
|
|
|
3158
3214
|
CustomizationCorners,
|
|
3159
3215
|
CustomizationFont,
|
|
3160
3216
|
CustomizationHeaderPreset,
|
|
3217
|
+
CustomizationIconsStyle,
|
|
3161
3218
|
CustomizationLocale,
|
|
3162
3219
|
CustomizationThemeMode,
|
|
3163
3220
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
@@ -3183,6 +3240,8 @@ export {
|
|
|
3183
3240
|
RevisionPageLayoutPreset,
|
|
3184
3241
|
RevisionPageType,
|
|
3185
3242
|
RevisionSemanticChangeType,
|
|
3243
|
+
SiteAdsStatus,
|
|
3244
|
+
SiteAdsTopic,
|
|
3186
3245
|
SiteType,
|
|
3187
3246
|
SiteVisibility,
|
|
3188
3247
|
SpaceBlockReason,
|