@gitbook/api 0.43.0 → 0.44.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 CHANGED
@@ -68,6 +68,38 @@ export interface RequestSpaceTrackPageView {
68
68
  /** The URL of referrer that linked to the page. */
69
69
  referrer: string;
70
70
  }
71
+ export interface RequestSiteTrackPageView {
72
+ /** Unique identifier of the page. */
73
+ pageId?: string;
74
+ /** Unique identifier of the space. */
75
+ spaceId: string;
76
+ /** Analytics info on the GitBook's content visitor. */
77
+ visitor: {
78
+ /** GitBook's unique identifier of the visitor. */
79
+ anonymousId: string;
80
+ /** The visitors cookies. */
81
+ cookies: Record<string, string>;
82
+ /**
83
+ * IP address of the visitor.
84
+ * If undefined, it'll default to the IP executing the request.
85
+ */
86
+ ip?: string;
87
+ /**
88
+ * User-agent of the visitor.
89
+ * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
90
+ */
91
+ userAgent: string;
92
+ /**
93
+ * Language of the visitor.
94
+ * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
95
+ */
96
+ language?: string;
97
+ };
98
+ /** The GitBook content's URL visited (including URL params). */
99
+ url: string;
100
+ /** The URL of referrer that linked to the page. */
101
+ referrer: string;
102
+ }
71
103
  export interface RequestPublishIntegration {
72
104
  /**
73
105
  * Base64 content of the icon
@@ -405,6 +437,9 @@ export declare type Embed = {
405
437
  } | {
406
438
  type: 'rich';
407
439
  html: string;
440
+ } | {
441
+ type: 'integration';
442
+ block: IntegrationBlock;
408
443
  });
409
444
  export declare type Comment = {
410
445
  /** Type of Object, always equals to "comment" */
@@ -2569,6 +2604,7 @@ export declare enum IntegrationScope {
2569
2604
  SpaceScriptCookies = "space:script:cookies",
2570
2605
  SpaceGitSync = "space:git:sync",
2571
2606
  SpaceVisitorAuth = "space:visitor:auth",
2607
+ SiteViewsRead = "site:views:read",
2572
2608
  SiteScriptInject = "site:script:inject",
2573
2609
  SiteScriptCookies = "site:script:cookies",
2574
2610
  SiteVisitorAuth = "site:visitor:auth"
@@ -2704,6 +2740,8 @@ export interface IntegrationInstallation {
2704
2740
  status: IntegrationInstallationStatus;
2705
2741
  /** Describe whether all spaces have been selected or there's a selection involved */
2706
2742
  space_selection: IntegrationInstallationSpaceSelection;
2743
+ /** Describe whether all sites have been selected or there's a selection involved */
2744
+ site_selection: IntegrationInstallationSiteSelection;
2707
2745
  /** Count of spaces, the installation is managing */
2708
2746
  spaces: number;
2709
2747
  /** Configuration of the integration at the account level */
@@ -3013,23 +3051,7 @@ export declare type EntityPropertySchema = {
3013
3051
  };
3014
3052
  });
3015
3053
  /** Any event that can be received from GitBook. */
3016
- export declare type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent | (SiteEvent & {
3017
- type: 'site_installation_setup';
3018
- status: IntegrationInstallationStatus;
3019
- /** The state of the site installation before it was updated. */
3020
- previous?: {
3021
- status: IntegrationInstallationStatus;
3022
- /** The previous configuration of the site installation. */
3023
- configuration?: object;
3024
- };
3025
- }) | (SiteEvent & {
3026
- type: 'site_installation_deleted';
3027
- /** The state of the site installation before it was deleted. */
3028
- previous: {
3029
- /** The previous configuration of the site installation. */
3030
- configuration?: object;
3031
- };
3032
- }) | SiteViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | FetchEvent | FetchPublishedScriptEvent | FetchVisitorAuthenticationEvent | UIRenderEvent;
3054
+ export declare type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent | SiteInstallationSetupEvent | SiteInstallationDeletedEvent | SpaceViewEvent | SiteViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | FetchEvent | FetchPublishedScriptEvent | FetchVisitorAuthenticationEvent | UIRenderEvent;
3033
3055
  /** Common properties for all events. */
3034
3056
  export interface BaseEvent {
3035
3057
  /** Unique identifier for the event. */
@@ -3083,9 +3105,28 @@ export declare type SpaceInstallationDeletedEvent = SpaceEvent & {
3083
3105
  configuration?: object;
3084
3106
  };
3085
3107
  };
3086
- export declare type SpaceViewEvent = SiteViewEvent;
3108
+ /** Event received when integration has been installed or updated on a site. */
3109
+ export declare type SiteInstallationSetupEvent = SiteEvent & {
3110
+ type: 'site_installation_setup';
3111
+ status: IntegrationInstallationStatus;
3112
+ /** The state of the site installation before it was updated. */
3113
+ previous?: {
3114
+ status: IntegrationInstallationStatus;
3115
+ /** The previous configuration of the site installation. */
3116
+ configuration?: object;
3117
+ };
3118
+ };
3119
+ /** Event received when integration has been uninstalled from a site. */
3120
+ export declare type SiteInstallationDeletedEvent = SiteEvent & {
3121
+ type: 'site_installation_deleted';
3122
+ /** The state of the site installation before it was deleted. */
3123
+ previous: {
3124
+ /** The previous configuration of the site installation. */
3125
+ configuration?: object;
3126
+ };
3127
+ };
3087
3128
  /** Event received when a page has been visited. */
3088
- export declare type SiteViewEvent = SpaceEvent & {
3129
+ export declare type SpaceViewEvent = SpaceEvent & {
3089
3130
  type: 'space_view';
3090
3131
  /** Unique identifier of the visited page. */
3091
3132
  pageId?: string;
@@ -3107,6 +3148,31 @@ export declare type SiteViewEvent = SpaceEvent & {
3107
3148
  /** The URL of referrer that linked to the page. */
3108
3149
  referrer: string;
3109
3150
  };
3151
+ /** Event received when a page has been visited on a site. */
3152
+ export declare type SiteViewEvent = SiteEvent & {
3153
+ type: 'site_view';
3154
+ /** Unique identifier of the visited space in the site. */
3155
+ spaceId: string;
3156
+ /** Unique identifier of the visited page. */
3157
+ pageId?: string;
3158
+ /** Analytics info on the GitBook's content visitor. */
3159
+ visitor: {
3160
+ /** GitBook's unique identifier of the visitor. */
3161
+ anonymousId: string;
3162
+ /** The visitors cookies. */
3163
+ cookies: Record<string, string>;
3164
+ /** User-agent of the visitor. */
3165
+ userAgent: string;
3166
+ /** IP address of the visitor. */
3167
+ ip: string;
3168
+ /** Language of the visitor. */
3169
+ language?: string;
3170
+ };
3171
+ /** The GitBook content's URL visited (including URL params). */
3172
+ url: string;
3173
+ /** The URL of referrer that linked to the page. */
3174
+ referrer: string;
3175
+ };
3110
3176
  /** Event when the primary content of a space has been updated. */
3111
3177
  export declare type SpaceContentUpdatedEvent = SpaceEvent & {
3112
3178
  type: 'space_content_updated';
@@ -3213,15 +3279,14 @@ export declare enum BillingProduct {
3213
3279
  Free2024 = "free_2024",
3214
3280
  Plus2024 = "plus_2024",
3215
3281
  Pro2024 = "pro_2024",
3216
- Enterprise2024 = "enterprise_2024",
3282
+ Enterprise = "enterprise",
3217
3283
  Free = "free",
3218
3284
  Plus = "plus",
3219
3285
  Pro = "pro",
3220
3286
  Team = "team",
3221
3287
  Business = "business",
3222
3288
  Legacy = "legacy",
3223
- Startup = "startup",
3224
- Enterprise = "enterprise"
3289
+ Startup = "startup"
3225
3290
  }
3226
3291
  export declare type BillingUpgrade = {
3227
3292
  result: 'checkout';
@@ -3440,7 +3505,7 @@ export interface ContentKitContextBase {
3440
3505
  theme: 'dark' | 'light';
3441
3506
  }
3442
3507
  /** Object representing the context in which a ContentKit component is rendered. */
3443
- export declare type ContentKitContext = ContentKitContextConfigurationAccount | ContentKitContextConfigurationSpace | ContentKitContextDocument;
3508
+ export declare type ContentKitContext = ContentKitContextConfigurationAccount | ContentKitContextConfigurationSpace | ContentKitContextConfigurationSite | ContentKitContextDocument;
3444
3509
  /** Context while rendering in an account installation's configuration. */
3445
3510
  export declare type ContentKitContextConfigurationAccount = ContentKitContextBase & {
3446
3511
  type: 'configuration_account';
@@ -3453,6 +3518,12 @@ export declare type ContentKitContextConfigurationSpace = ContentKitContextBase
3453
3518
  /** ID of the space the space-installation configuration is in. */
3454
3519
  spaceId: string;
3455
3520
  };
3521
+ /** Context while rendering in a site-installation's configuration. */
3522
+ export declare type ContentKitContextConfigurationSite = ContentKitContextBase & {
3523
+ type: 'configuration_site';
3524
+ /** ID of the site the site-installation configuration is in. */
3525
+ siteId: string;
3526
+ };
3456
3527
  /** Context while rendering in a document. */
3457
3528
  export declare type ContentKitContextDocument = ContentKitContextBase & {
3458
3529
  type: 'document';
@@ -3810,7 +3881,7 @@ export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel
3810
3881
  space: string;
3811
3882
  changeRequest?: string;
3812
3883
  comment: string;
3813
- } | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | SiteChannel | SiteCustomizationChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteSpacesChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | CustomHostnameChannel;
3884
+ } | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteSpacesChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | CustomHostnameChannel;
3814
3885
  export interface SpaceInfoChannel {
3815
3886
  channel: 'space';
3816
3887
  space: string;
@@ -3996,6 +4067,10 @@ export interface SiteCustomizationChannel {
3996
4067
  channel: 'site-customization';
3997
4068
  site: string;
3998
4069
  }
4070
+ export interface SiteIntegrationsChannel {
4071
+ channel: 'site-integrations';
4072
+ site: string;
4073
+ }
3999
4074
  export interface SitePublishingAuthChannel {
4000
4075
  channel: 'site-publishing-auth';
4001
4076
  site: string;
@@ -4258,6 +4333,14 @@ export interface ShareLink {
4258
4333
  /** Name of the share link */
4259
4334
  name?: ShareLinkName;
4260
4335
  active?: boolean;
4336
+ /** URLs associated with the object */
4337
+ urls: {
4338
+ /**
4339
+ * URL of the published version of the share-link.
4340
+ * @format uri
4341
+ */
4342
+ published?: string;
4343
+ };
4261
4344
  }
4262
4345
  /**
4263
4346
  * Name of the share link
@@ -4555,7 +4638,8 @@ export declare enum SiteSubscriptionStatus {
4555
4638
  }
4556
4639
  export declare enum SiteSubscriptionType {
4557
4640
  Basic = "basic",
4558
- Premium = "premium"
4641
+ Premium = "premium",
4642
+ PremiumVa = "premium_va"
4559
4643
  }
4560
4644
  export interface SiteSubscription {
4561
4645
  type: SiteSubscriptionType;
@@ -4929,6 +5013,19 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4929
5013
  message: string;
4930
5014
  };
4931
5015
  }>>;
5016
+ /**
5017
+ * No description
5018
+ *
5019
+ * @tags spaces
5020
+ * @name GetEmbedByUrlInSpace
5021
+ * @summary Resolve a URL to an embed in a given space
5022
+ * @request GET:/spaces/{spaceId}/embed
5023
+ * @secure
5024
+ */
5025
+ getEmbedByUrlInSpace: (spaceId: string, query: {
5026
+ /** URL to resolve */
5027
+ url: string;
5028
+ }, params?: RequestParams) => Promise<HttpResponse<Embed, Error>>;
4932
5029
  /**
4933
5030
  * No description
4934
5031
  *
@@ -8602,12 +8699,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8602
8699
  * No description
8603
8700
  *
8604
8701
  * @tags sites
8605
- * @name GetSitePublishingAuthSettings
8702
+ * @name GetSitePublishingAuthById
8606
8703
  * @summary Get the publishing authentication settings for a site.
8607
8704
  * @request GET:/orgs/{organizationId}/sites/{siteId}/publishing/auth
8608
8705
  * @secure
8609
8706
  */
8610
- getSitePublishingAuthSettings: (organizationId: string, siteId: string, params?: RequestParams) => Promise<HttpResponse<SitePublishingAuth, Error | {
8707
+ getSitePublishingAuthById: (organizationId: string, siteId: string, params?: RequestParams) => Promise<HttpResponse<SitePublishingAuth, Error | {
8611
8708
  error: {
8612
8709
  /** @format int32 */
8613
8710
  code: 400;
@@ -8618,12 +8715,33 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8618
8715
  * No description
8619
8716
  *
8620
8717
  * @tags sites
8621
- * @name UpdateSitePublishingAuthSettings
8718
+ * @name UpdateSitePublishingAuthById
8622
8719
  * @summary Update the publishing authentication settings for a site.
8623
8720
  * @request PATCH:/orgs/{organizationId}/sites/{siteId}/publishing/auth
8624
8721
  * @secure
8625
8722
  */
8626
- updateSitePublishingAuthSettings: (organizationId: string, siteId: string, data: SitePublishingAuthUpdate, params?: RequestParams) => Promise<HttpResponse<SitePublishingAuth, Error | {
8723
+ updateSitePublishingAuthById: (organizationId: string, siteId: string, data: SitePublishingAuthUpdate, params?: RequestParams) => Promise<HttpResponse<SitePublishingAuth, Error | {
8724
+ error: {
8725
+ /** @format int32 */
8726
+ code: 400;
8727
+ message: string;
8728
+ };
8729
+ }>>;
8730
+ /**
8731
+ * No description
8732
+ *
8733
+ * @tags sites
8734
+ * @name GetSitePublishingPreviewById
8735
+ * @summary Get a URL to preview the published content of a site. The URL will be valid for 1 hour.
8736
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/publishing/preview
8737
+ * @secure
8738
+ */
8739
+ getSitePublishingPreviewById: (organizationId: string, siteId: string, query?: {
8740
+ /** ID of the site-space to preview. If not provided, the default site-space will be used. */
8741
+ siteSpace?: string;
8742
+ }, params?: RequestParams) => Promise<HttpResponse<{
8743
+ url: URL;
8744
+ }, Error | {
8627
8745
  error: {
8628
8746
  /** @format int32 */
8629
8747
  code: 400;
@@ -8665,7 +8783,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8665
8783
  /**
8666
8784
  * No description
8667
8785
  *
8668
- * @tags sites
8786
+ * @tags integrations, sites
8669
8787
  * @name ListSiteIntegrationScripts
8670
8788
  * @summary List the scripts to embed in published content for a site.
8671
8789
  * @request GET:/orgs/{organizationId}/sites/{siteId}/integration-scripts
@@ -8678,6 +8796,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8678
8796
  message: string;
8679
8797
  };
8680
8798
  }>>;
8799
+ /**
8800
+ * No description
8801
+ *
8802
+ * @tags integrations, sites
8803
+ * @name ListSiteIntegrations
8804
+ * @summary List integrations enabled in a site.
8805
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/integrations
8806
+ * @secure
8807
+ */
8808
+ listSiteIntegrations: (organizationId: string, siteId: string, query?: {
8809
+ /** A search string to filter integrations by name */
8810
+ search?: any;
8811
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
8812
+ items: Integration[];
8813
+ }, Error>>;
8681
8814
  /**
8682
8815
  * No description
8683
8816
  *
@@ -8829,6 +8962,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8829
8962
  origin: SpacePointer;
8830
8963
  }[];
8831
8964
  }, Error>>;
8965
+ /**
8966
+ * @description Track a page view in a site.
8967
+ *
8968
+ * @tags analytics, sites
8969
+ * @name TrackViewInSiteById
8970
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/insights/track_view
8971
+ * @secure
8972
+ */
8973
+ trackViewInSiteById: (organizationId: string, siteId: string, data: RequestSiteTrackPageView, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
8832
8974
  };
8833
8975
  customHostnames: {
8834
8976
  /**
package/dist/index.cjs CHANGED
@@ -239,7 +239,7 @@ module.exports = __toCommonJS(src_exports);
239
239
 
240
240
  // package.json
241
241
  var name = "@gitbook/api";
242
- var version = "0.43.0";
242
+ var version = "0.44.0";
243
243
 
244
244
  // src/client.ts
245
245
  var import_event_iterator = __toESM(require_node(), 1);
@@ -515,6 +515,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
515
515
  IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
516
516
  IntegrationScope2["SpaceGitSync"] = "space:git:sync";
517
517
  IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
518
+ IntegrationScope2["SiteViewsRead"] = "site:views:read";
518
519
  IntegrationScope2["SiteScriptInject"] = "site:script:inject";
519
520
  IntegrationScope2["SiteScriptCookies"] = "site:script:cookies";
520
521
  IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
@@ -566,7 +567,7 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
566
567
  BillingProduct2["Free2024"] = "free_2024";
567
568
  BillingProduct2["Plus2024"] = "plus_2024";
568
569
  BillingProduct2["Pro2024"] = "pro_2024";
569
- BillingProduct2["Enterprise2024"] = "enterprise_2024";
570
+ BillingProduct2["Enterprise"] = "enterprise";
570
571
  BillingProduct2["Free"] = "free";
571
572
  BillingProduct2["Plus"] = "plus";
572
573
  BillingProduct2["Pro"] = "pro";
@@ -574,7 +575,6 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
574
575
  BillingProduct2["Business"] = "business";
575
576
  BillingProduct2["Legacy"] = "legacy";
576
577
  BillingProduct2["Startup"] = "startup";
577
- BillingProduct2["Enterprise"] = "enterprise";
578
578
  return BillingProduct2;
579
579
  })(BillingProduct || {});
580
580
  var APIIntegrationScope = /* @__PURE__ */ ((APIIntegrationScope2) => {
@@ -720,6 +720,7 @@ var SiteSubscriptionStatus = /* @__PURE__ */ ((SiteSubscriptionStatus2) => {
720
720
  var SiteSubscriptionType = /* @__PURE__ */ ((SiteSubscriptionType2) => {
721
721
  SiteSubscriptionType2["Basic"] = "basic";
722
722
  SiteSubscriptionType2["Premium"] = "premium";
723
+ SiteSubscriptionType2["PremiumVa"] = "premium_va";
723
724
  return SiteSubscriptionType2;
724
725
  })(SiteSubscriptionType || {});
725
726
  var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
@@ -1060,6 +1061,14 @@ var Api = class extends HttpClient {
1060
1061
  format: "json",
1061
1062
  ...params
1062
1063
  }),
1064
+ getEmbedByUrlInSpace: (spaceId, query, params = {}) => this.request({
1065
+ path: `/spaces/${spaceId}/embed`,
1066
+ method: "GET",
1067
+ query,
1068
+ secure: true,
1069
+ format: "json",
1070
+ ...params
1071
+ }),
1063
1072
  searchSpaceContent: (spaceId, query, params = {}) => this.request({
1064
1073
  path: `/spaces/${spaceId}/search`,
1065
1074
  method: "GET",
@@ -2857,14 +2866,14 @@ var Api = class extends HttpClient {
2857
2866
  secure: true,
2858
2867
  ...params
2859
2868
  }),
2860
- getSitePublishingAuthSettings: (organizationId, siteId, params = {}) => this.request({
2869
+ getSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
2861
2870
  path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
2862
2871
  method: "GET",
2863
2872
  secure: true,
2864
2873
  format: "json",
2865
2874
  ...params
2866
2875
  }),
2867
- updateSitePublishingAuthSettings: (organizationId, siteId, data, params = {}) => this.request({
2876
+ updateSitePublishingAuthById: (organizationId, siteId, data, params = {}) => this.request({
2868
2877
  path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
2869
2878
  method: "PATCH",
2870
2879
  body: data,
@@ -2873,6 +2882,14 @@ var Api = class extends HttpClient {
2873
2882
  format: "json",
2874
2883
  ...params
2875
2884
  }),
2885
+ getSitePublishingPreviewById: (organizationId, siteId, query, params = {}) => this.request({
2886
+ path: `/orgs/${organizationId}/sites/${siteId}/publishing/preview`,
2887
+ method: "GET",
2888
+ query,
2889
+ secure: true,
2890
+ format: "json",
2891
+ ...params
2892
+ }),
2876
2893
  getSiteCustomizationById: (organizationId, siteId, params = {}) => this.request({
2877
2894
  path: `/orgs/${organizationId}/sites/${siteId}/customization`,
2878
2895
  method: "GET",
@@ -2896,6 +2913,14 @@ var Api = class extends HttpClient {
2896
2913
  format: "json",
2897
2914
  ...params
2898
2915
  }),
2916
+ listSiteIntegrations: (organizationId, siteId, query, params = {}) => this.request({
2917
+ path: `/orgs/${organizationId}/sites/${siteId}/integrations`,
2918
+ method: "GET",
2919
+ query,
2920
+ secure: true,
2921
+ format: "json",
2922
+ ...params
2923
+ }),
2899
2924
  addSpaceToSite: (organizationId, siteId, data, params = {}) => this.request({
2900
2925
  path: `/orgs/${organizationId}/sites/${siteId}/spaces`,
2901
2926
  method: "POST",
@@ -2960,6 +2985,14 @@ var Api = class extends HttpClient {
2960
2985
  secure: true,
2961
2986
  format: "json",
2962
2987
  ...params
2988
+ }),
2989
+ trackViewInSiteById: (organizationId, siteId, data, params = {}) => this.request({
2990
+ path: `/orgs/${organizationId}/sites/${siteId}/insights/track_view`,
2991
+ method: "POST",
2992
+ body: data,
2993
+ secure: true,
2994
+ type: "application/json" /* Json */,
2995
+ ...params
2963
2996
  })
2964
2997
  };
2965
2998
  this.customHostnames = {
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.43.0";
175
+ var version = "0.44.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["SiteViewsRead"] = "site:views:read";
451
452
  IntegrationScope2["SiteScriptInject"] = "site:script:inject";
452
453
  IntegrationScope2["SiteScriptCookies"] = "site:script:cookies";
453
454
  IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
@@ -499,7 +500,7 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
499
500
  BillingProduct2["Free2024"] = "free_2024";
500
501
  BillingProduct2["Plus2024"] = "plus_2024";
501
502
  BillingProduct2["Pro2024"] = "pro_2024";
502
- BillingProduct2["Enterprise2024"] = "enterprise_2024";
503
+ BillingProduct2["Enterprise"] = "enterprise";
503
504
  BillingProduct2["Free"] = "free";
504
505
  BillingProduct2["Plus"] = "plus";
505
506
  BillingProduct2["Pro"] = "pro";
@@ -507,7 +508,6 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
507
508
  BillingProduct2["Business"] = "business";
508
509
  BillingProduct2["Legacy"] = "legacy";
509
510
  BillingProduct2["Startup"] = "startup";
510
- BillingProduct2["Enterprise"] = "enterprise";
511
511
  return BillingProduct2;
512
512
  })(BillingProduct || {});
513
513
  var APIIntegrationScope = /* @__PURE__ */ ((APIIntegrationScope2) => {
@@ -653,6 +653,7 @@ var SiteSubscriptionStatus = /* @__PURE__ */ ((SiteSubscriptionStatus2) => {
653
653
  var SiteSubscriptionType = /* @__PURE__ */ ((SiteSubscriptionType2) => {
654
654
  SiteSubscriptionType2["Basic"] = "basic";
655
655
  SiteSubscriptionType2["Premium"] = "premium";
656
+ SiteSubscriptionType2["PremiumVa"] = "premium_va";
656
657
  return SiteSubscriptionType2;
657
658
  })(SiteSubscriptionType || {});
658
659
  var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
@@ -993,6 +994,14 @@ var Api = class extends HttpClient {
993
994
  format: "json",
994
995
  ...params
995
996
  }),
997
+ getEmbedByUrlInSpace: (spaceId, query, params = {}) => this.request({
998
+ path: `/spaces/${spaceId}/embed`,
999
+ method: "GET",
1000
+ query,
1001
+ secure: true,
1002
+ format: "json",
1003
+ ...params
1004
+ }),
996
1005
  searchSpaceContent: (spaceId, query, params = {}) => this.request({
997
1006
  path: `/spaces/${spaceId}/search`,
998
1007
  method: "GET",
@@ -2790,14 +2799,14 @@ var Api = class extends HttpClient {
2790
2799
  secure: true,
2791
2800
  ...params
2792
2801
  }),
2793
- getSitePublishingAuthSettings: (organizationId, siteId, params = {}) => this.request({
2802
+ getSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
2794
2803
  path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
2795
2804
  method: "GET",
2796
2805
  secure: true,
2797
2806
  format: "json",
2798
2807
  ...params
2799
2808
  }),
2800
- updateSitePublishingAuthSettings: (organizationId, siteId, data, params = {}) => this.request({
2809
+ updateSitePublishingAuthById: (organizationId, siteId, data, params = {}) => this.request({
2801
2810
  path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
2802
2811
  method: "PATCH",
2803
2812
  body: data,
@@ -2806,6 +2815,14 @@ var Api = class extends HttpClient {
2806
2815
  format: "json",
2807
2816
  ...params
2808
2817
  }),
2818
+ getSitePublishingPreviewById: (organizationId, siteId, query, params = {}) => this.request({
2819
+ path: `/orgs/${organizationId}/sites/${siteId}/publishing/preview`,
2820
+ method: "GET",
2821
+ query,
2822
+ secure: true,
2823
+ format: "json",
2824
+ ...params
2825
+ }),
2809
2826
  getSiteCustomizationById: (organizationId, siteId, params = {}) => this.request({
2810
2827
  path: `/orgs/${organizationId}/sites/${siteId}/customization`,
2811
2828
  method: "GET",
@@ -2829,6 +2846,14 @@ var Api = class extends HttpClient {
2829
2846
  format: "json",
2830
2847
  ...params
2831
2848
  }),
2849
+ listSiteIntegrations: (organizationId, siteId, query, params = {}) => this.request({
2850
+ path: `/orgs/${organizationId}/sites/${siteId}/integrations`,
2851
+ method: "GET",
2852
+ query,
2853
+ secure: true,
2854
+ format: "json",
2855
+ ...params
2856
+ }),
2832
2857
  addSpaceToSite: (organizationId, siteId, data, params = {}) => this.request({
2833
2858
  path: `/orgs/${organizationId}/sites/${siteId}/spaces`,
2834
2859
  method: "POST",
@@ -2893,6 +2918,14 @@ var Api = class extends HttpClient {
2893
2918
  secure: true,
2894
2919
  format: "json",
2895
2920
  ...params
2921
+ }),
2922
+ trackViewInSiteById: (organizationId, siteId, data, params = {}) => this.request({
2923
+ path: `/orgs/${organizationId}/sites/${siteId}/insights/track_view`,
2924
+ method: "POST",
2925
+ body: data,
2926
+ secure: true,
2927
+ type: "application/json" /* Json */,
2928
+ ...params
2896
2929
  })
2897
2930
  };
2898
2931
  this.customHostnames = {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
- "version": "0.43.0",
7
+ "version": "0.44.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",