@gitbook/api 0.85.0 → 0.87.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
@@ -335,6 +335,7 @@ export interface DocumentTableDefinitionBase {
335
335
  export type DocumentTableDefinitionText = DocumentTableDefinitionBase & {
336
336
  type: 'text';
337
337
  textAlignment: 'center' | 'right' | 'left';
338
+ verticalAlignment?: 'top' | 'middle' | 'bottom';
338
339
  };
339
340
  export type DocumentTableDefinitionNumber = DocumentTableDefinitionBase & {
340
341
  type: 'number';
@@ -4595,12 +4596,18 @@ export type SiteInsightsEventAskQuestion = SiteInsightsEventBase & {
4595
4596
  /** Question being asked. */
4596
4597
  query: string;
4597
4598
  };
4599
+ export declare enum SiteInsightsLinkPosition {
4600
+ Header = "header",
4601
+ Footer = "footer",
4602
+ Sidebar = "sidebar",
4603
+ Content = "content"
4604
+ }
4598
4605
  export type SiteInsightsEventLinkClick = SiteInsightsEventBase & {
4599
4606
  type: 'link_click';
4600
4607
  link: {
4601
4608
  /** A relative reference to content in GitBook. */
4602
4609
  target: ContentRef;
4603
- position: 'header' | 'footer' | 'sidebar' | 'content';
4610
+ position: SiteInsightsLinkPosition;
4604
4611
  };
4605
4612
  };
4606
4613
  export type SiteInsightsEventAPIClientOpen = SiteInsightsEventBase & {
@@ -4614,6 +4621,254 @@ export type SiteInsightsEventAPIClientRequest = SiteInsightsEventBase & {
4614
4621
  operation: OpenAPIOperationPointer;
4615
4622
  };
4616
4623
  export type SiteInsightsEvent = SiteInsightsEventPageView | SiteInsightsEventSearchOpen | SiteInsightsEventSearchTypeQuery | SiteInsightsEventSearchOpenResult | SiteInsightsEventPagePostFeedback | SiteInsightsEventAskQuestion | SiteInsightsEventLinkClick | SiteInsightsEventAPIClientOpen | SiteInsightsEventAPIClientRequest;
4624
+ export declare enum SiteInsightsEventType {
4625
+ PageView = "page_view",
4626
+ SearchOpen = "search_open",
4627
+ SearchTypeQuery = "search_type_query",
4628
+ SearchOpenResult = "search_open_result",
4629
+ PagePostFeedback = "page_post_feedback",
4630
+ AskQuestion = "ask_question",
4631
+ LinkClick = "link_click",
4632
+ ApiClientOpen = "api_client_open",
4633
+ ApiClientRequest = "api_client_request"
4634
+ }
4635
+ export declare enum SiteInsightsVisitorBrowser {
4636
+ Chrome = "chrome",
4637
+ Firefox = "firefox",
4638
+ Safari = "safari",
4639
+ Edge = "edge",
4640
+ Ie = "ie",
4641
+ Opera = "opera",
4642
+ Unknown = "unknown"
4643
+ }
4644
+ export declare enum SiteInsightsVisitorDevice {
4645
+ Desktop = "desktop",
4646
+ Tablet = "tablet",
4647
+ Mobile = "mobile",
4648
+ Unknown = "unknown"
4649
+ }
4650
+ export declare enum SiteInsightsVisitorOS {
4651
+ Windows = "windows",
4652
+ Macos = "macos",
4653
+ Linux = "linux",
4654
+ Android = "android",
4655
+ Ios = "ios",
4656
+ Unknown = "unknown"
4657
+ }
4658
+ export declare enum SiteInsightsVisitorBot {
4659
+ Unknown = "unknown",
4660
+ Googlebot = "googlebot",
4661
+ Bingbot = "bingbot",
4662
+ Duckduckbot = "duckduckbot",
4663
+ Facebookbot = "facebookbot",
4664
+ Applebot = "applebot",
4665
+ Chatgpt = "chatgpt",
4666
+ Anthropic = "anthropic"
4667
+ }
4668
+ export type SiteInsightsQueryEventsValues = {
4669
+ column: 'datetime';
4670
+ values: Timestamp[];
4671
+ } | {
4672
+ column: 'eventsCount';
4673
+ values: number[];
4674
+ } | {
4675
+ column: 'sessionsCount';
4676
+ values: number[];
4677
+ } | {
4678
+ column: 'visitorsCount';
4679
+ values: number[];
4680
+ } | {
4681
+ column: 'eventType';
4682
+ values: SiteInsightsEventType[];
4683
+ } | {
4684
+ column: 'visitorClaim';
4685
+ claim: string;
4686
+ values: string[];
4687
+ } | {
4688
+ column: 'visitorClaimProperty';
4689
+ values: string[];
4690
+ } | {
4691
+ column: 'visitorBrowser';
4692
+ values: SiteInsightsVisitorBrowser[];
4693
+ } | {
4694
+ column: 'visitorDevice';
4695
+ values: SiteInsightsVisitorDevice[];
4696
+ } | {
4697
+ column: 'visitorOS';
4698
+ values: SiteInsightsVisitorOS[];
4699
+ } | {
4700
+ column: 'visitorBot';
4701
+ values: SiteInsightsVisitorBot[];
4702
+ } | {
4703
+ column: 'eventLinkTargetValue';
4704
+ values: ContentRef[];
4705
+ } | {
4706
+ column: 'eventLinkTargetKind';
4707
+ values: ('url' | 'page' | 'file' | 'anchor' | 'space' | 'collection' | 'user' | 'reusable-content')[];
4708
+ } | {
4709
+ column: 'eventLinkPosition';
4710
+ values: SiteInsightsLinkPosition[];
4711
+ } | {
4712
+ column: 'siteSection';
4713
+ values: (string | null)[];
4714
+ } | {
4715
+ column: 'siteSpace';
4716
+ values: (string | null)[];
4717
+ } | {
4718
+ column: 'siteShareKey';
4719
+ values: (string | null)[];
4720
+ } | {
4721
+ column: 'page';
4722
+ values: {
4723
+ page: string | null;
4724
+ space: string;
4725
+ }[];
4726
+ } | {
4727
+ column: 'visitorGeoCountry';
4728
+ values: (string | null)[];
4729
+ } | {
4730
+ column: 'visitorLanguage';
4731
+ values: (string | null)[];
4732
+ } | {
4733
+ column: 'eventLinkTargetDomain';
4734
+ values: (string | null)[];
4735
+ } | {
4736
+ column: 'eventAPIOperationPath';
4737
+ values: (string | null)[];
4738
+ } | {
4739
+ column: 'eventAPIOperationMethod';
4740
+ values: (string | null)[];
4741
+ } | {
4742
+ column: 'eventSearchQuery';
4743
+ values: string[];
4744
+ } | {
4745
+ column: 'pageFeedbackRating';
4746
+ values: {
4747
+ ok: number;
4748
+ good: number;
4749
+ bad: number;
4750
+ }[];
4751
+ } | {
4752
+ column: 'referrer';
4753
+ values: string[];
4754
+ } | {
4755
+ column: 'referrerDomain';
4756
+ values: string[];
4757
+ } | {
4758
+ column: 'utmSource';
4759
+ values: string[];
4760
+ } | {
4761
+ column: 'utmMedium';
4762
+ values: string[];
4763
+ } | {
4764
+ column: 'utmCampaign';
4765
+ values: string[];
4766
+ } | {
4767
+ column: 'utmTerm';
4768
+ values: string[];
4769
+ } | {
4770
+ column: 'utmContent';
4771
+ values: string[];
4772
+ };
4773
+ export declare enum SiteInsightsQueryOperator {
4774
+ In = "in",
4775
+ NotIn = "notIn",
4776
+ GreaterThan = "greaterThan",
4777
+ GreaterThanOrEqual = "greaterThanOrEqual",
4778
+ LessThan = "lessThan",
4779
+ LessThanOrEqual = "lessThanOrEqual"
4780
+ }
4781
+ export type SiteInsightsQueryEventsFilter = SiteInsightsQueryEventsValues & {
4782
+ operator?: SiteInsightsQueryOperator;
4783
+ };
4784
+ export interface SiteInsightsQueryDateTimeColumn {
4785
+ column: 'datetime';
4786
+ interval?: 'hour' | 'day' | 'week' | 'month';
4787
+ }
4788
+ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
4789
+ column: 'eventType';
4790
+ } | {
4791
+ column: 'eventsCount';
4792
+ } | {
4793
+ column: 'sessionsCount';
4794
+ } | {
4795
+ column: 'visitorsCount';
4796
+ } | {
4797
+ column: 'siteSection';
4798
+ } | {
4799
+ column: 'siteSpace';
4800
+ } | {
4801
+ column: 'siteShareKey';
4802
+ } | {
4803
+ column: 'page';
4804
+ } | {
4805
+ column: 'visitorGeoCountry';
4806
+ } | {
4807
+ column: 'visitorDevice';
4808
+ } | {
4809
+ column: 'visitorBrowser';
4810
+ } | {
4811
+ column: 'visitorOS';
4812
+ } | {
4813
+ column: 'visitorBot';
4814
+ } | {
4815
+ column: 'visitorLanguage';
4816
+ } | {
4817
+ column: 'eventLinkTargetValue';
4818
+ } | {
4819
+ column: 'eventLinkTargetKind';
4820
+ } | {
4821
+ column: 'eventLinkTargetDomain';
4822
+ } | {
4823
+ column: 'eventLinkPosition';
4824
+ } | {
4825
+ column: 'eventAPIOperationPath';
4826
+ } | {
4827
+ column: 'eventAPIOperationMethod';
4828
+ } | {
4829
+ column: 'eventSearchQuery';
4830
+ } | {
4831
+ column: 'pageFeedbackRating';
4832
+ } | {
4833
+ column: 'referrer';
4834
+ } | {
4835
+ column: 'referrerDomain';
4836
+ } | {
4837
+ column: 'utmSource';
4838
+ } | {
4839
+ column: 'utmMedium';
4840
+ } | {
4841
+ column: 'utmCampaign';
4842
+ } | {
4843
+ column: 'utmTerm';
4844
+ } | {
4845
+ column: 'utmContent';
4846
+ } | {
4847
+ column: 'visitorClaimProperty';
4848
+ } | {
4849
+ column: 'visitorClaim';
4850
+ claim: string;
4851
+ };
4852
+ export declare enum SiteInsightsQueryRange {
4853
+ LastYear = "lastYear",
4854
+ Last3Months = "last3Months",
4855
+ Last30Days = "last30Days",
4856
+ Last7Days = "last7Days",
4857
+ Last24Hours = "last24Hours"
4858
+ }
4859
+ export interface SiteInsightsQueryEventsAggregation {
4860
+ where?: SiteInsightsQueryEventsFilter[];
4861
+ /** @minItems 1 */
4862
+ groupBy: SiteInsightsQueryEventsColumn[];
4863
+ order?: {
4864
+ by: SiteInsightsQueryEventsColumn;
4865
+ direction: 'asc' | 'desc';
4866
+ };
4867
+ range: SiteInsightsQueryRange;
4868
+ }
4869
+ export interface SiteInsightsQueryEventsAggregationResult {
4870
+ columns: SiteInsightsQueryEventsValues[];
4871
+ }
4617
4872
  /**
4618
4873
  * The interval for grouping the results
4619
4874
  * @default "week"
@@ -10463,6 +10718,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10463
10718
  trackEventsInSiteById: (organizationId: string, siteId: string, data: {
10464
10719
  events: SiteInsightsEvent[];
10465
10720
  }, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
10721
+ /**
10722
+ * No description
10723
+ *
10724
+ * @tags sites
10725
+ * @name AggregateSiteEvents
10726
+ * @summary Query and aggregate events in a site.
10727
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/insights/events/aggregate
10728
+ * @secure
10729
+ */
10730
+ aggregateSiteEvents: (organizationId: string, siteId: string, data: SiteInsightsQueryEventsAggregation, params?: RequestParams) => Promise<HttpResponse<SiteInsightsQueryEventsAggregationResult, any>>;
10466
10731
  /**
10467
10732
  * No description
10468
10733
  *
package/dist/index.cjs CHANGED
@@ -243,6 +243,14 @@ __export(src_exports, {
243
243
  RevisionSemanticChangeType: () => RevisionSemanticChangeType,
244
244
  SiteAdsStatus: () => SiteAdsStatus,
245
245
  SiteAdsTopic: () => SiteAdsTopic,
246
+ SiteInsightsEventType: () => SiteInsightsEventType,
247
+ SiteInsightsLinkPosition: () => SiteInsightsLinkPosition,
248
+ SiteInsightsQueryOperator: () => SiteInsightsQueryOperator,
249
+ SiteInsightsQueryRange: () => SiteInsightsQueryRange,
250
+ SiteInsightsVisitorBot: () => SiteInsightsVisitorBot,
251
+ SiteInsightsVisitorBrowser: () => SiteInsightsVisitorBrowser,
252
+ SiteInsightsVisitorDevice: () => SiteInsightsVisitorDevice,
253
+ SiteInsightsVisitorOS: () => SiteInsightsVisitorOS,
246
254
  SiteType: () => SiteType,
247
255
  SiteVisibility: () => SiteVisibility,
248
256
  SpaceBlockReason: () => SpaceBlockReason,
@@ -253,7 +261,7 @@ module.exports = __toCommonJS(src_exports);
253
261
 
254
262
  // package.json
255
263
  var name = "@gitbook/api";
256
- var version = "0.85.0";
264
+ var version = "0.87.0";
257
265
 
258
266
  // src/client.ts
259
267
  var import_event_iterator = __toESM(require_node(), 1);
@@ -743,6 +751,79 @@ var CustomizationSidebarListStyle = /* @__PURE__ */ ((CustomizationSidebarListSt
743
751
  CustomizationSidebarListStyle2["Line"] = "line";
744
752
  return CustomizationSidebarListStyle2;
745
753
  })(CustomizationSidebarListStyle || {});
754
+ var SiteInsightsLinkPosition = /* @__PURE__ */ ((SiteInsightsLinkPosition2) => {
755
+ SiteInsightsLinkPosition2["Header"] = "header";
756
+ SiteInsightsLinkPosition2["Footer"] = "footer";
757
+ SiteInsightsLinkPosition2["Sidebar"] = "sidebar";
758
+ SiteInsightsLinkPosition2["Content"] = "content";
759
+ return SiteInsightsLinkPosition2;
760
+ })(SiteInsightsLinkPosition || {});
761
+ var SiteInsightsEventType = /* @__PURE__ */ ((SiteInsightsEventType2) => {
762
+ SiteInsightsEventType2["PageView"] = "page_view";
763
+ SiteInsightsEventType2["SearchOpen"] = "search_open";
764
+ SiteInsightsEventType2["SearchTypeQuery"] = "search_type_query";
765
+ SiteInsightsEventType2["SearchOpenResult"] = "search_open_result";
766
+ SiteInsightsEventType2["PagePostFeedback"] = "page_post_feedback";
767
+ SiteInsightsEventType2["AskQuestion"] = "ask_question";
768
+ SiteInsightsEventType2["LinkClick"] = "link_click";
769
+ SiteInsightsEventType2["ApiClientOpen"] = "api_client_open";
770
+ SiteInsightsEventType2["ApiClientRequest"] = "api_client_request";
771
+ return SiteInsightsEventType2;
772
+ })(SiteInsightsEventType || {});
773
+ var SiteInsightsVisitorBrowser = /* @__PURE__ */ ((SiteInsightsVisitorBrowser2) => {
774
+ SiteInsightsVisitorBrowser2["Chrome"] = "chrome";
775
+ SiteInsightsVisitorBrowser2["Firefox"] = "firefox";
776
+ SiteInsightsVisitorBrowser2["Safari"] = "safari";
777
+ SiteInsightsVisitorBrowser2["Edge"] = "edge";
778
+ SiteInsightsVisitorBrowser2["Ie"] = "ie";
779
+ SiteInsightsVisitorBrowser2["Opera"] = "opera";
780
+ SiteInsightsVisitorBrowser2["Unknown"] = "unknown";
781
+ return SiteInsightsVisitorBrowser2;
782
+ })(SiteInsightsVisitorBrowser || {});
783
+ var SiteInsightsVisitorDevice = /* @__PURE__ */ ((SiteInsightsVisitorDevice2) => {
784
+ SiteInsightsVisitorDevice2["Desktop"] = "desktop";
785
+ SiteInsightsVisitorDevice2["Tablet"] = "tablet";
786
+ SiteInsightsVisitorDevice2["Mobile"] = "mobile";
787
+ SiteInsightsVisitorDevice2["Unknown"] = "unknown";
788
+ return SiteInsightsVisitorDevice2;
789
+ })(SiteInsightsVisitorDevice || {});
790
+ var SiteInsightsVisitorOS = /* @__PURE__ */ ((SiteInsightsVisitorOS2) => {
791
+ SiteInsightsVisitorOS2["Windows"] = "windows";
792
+ SiteInsightsVisitorOS2["Macos"] = "macos";
793
+ SiteInsightsVisitorOS2["Linux"] = "linux";
794
+ SiteInsightsVisitorOS2["Android"] = "android";
795
+ SiteInsightsVisitorOS2["Ios"] = "ios";
796
+ SiteInsightsVisitorOS2["Unknown"] = "unknown";
797
+ return SiteInsightsVisitorOS2;
798
+ })(SiteInsightsVisitorOS || {});
799
+ var SiteInsightsVisitorBot = /* @__PURE__ */ ((SiteInsightsVisitorBot2) => {
800
+ SiteInsightsVisitorBot2["Unknown"] = "unknown";
801
+ SiteInsightsVisitorBot2["Googlebot"] = "googlebot";
802
+ SiteInsightsVisitorBot2["Bingbot"] = "bingbot";
803
+ SiteInsightsVisitorBot2["Duckduckbot"] = "duckduckbot";
804
+ SiteInsightsVisitorBot2["Facebookbot"] = "facebookbot";
805
+ SiteInsightsVisitorBot2["Applebot"] = "applebot";
806
+ SiteInsightsVisitorBot2["Chatgpt"] = "chatgpt";
807
+ SiteInsightsVisitorBot2["Anthropic"] = "anthropic";
808
+ return SiteInsightsVisitorBot2;
809
+ })(SiteInsightsVisitorBot || {});
810
+ var SiteInsightsQueryOperator = /* @__PURE__ */ ((SiteInsightsQueryOperator2) => {
811
+ SiteInsightsQueryOperator2["In"] = "in";
812
+ SiteInsightsQueryOperator2["NotIn"] = "notIn";
813
+ SiteInsightsQueryOperator2["GreaterThan"] = "greaterThan";
814
+ SiteInsightsQueryOperator2["GreaterThanOrEqual"] = "greaterThanOrEqual";
815
+ SiteInsightsQueryOperator2["LessThan"] = "lessThan";
816
+ SiteInsightsQueryOperator2["LessThanOrEqual"] = "lessThanOrEqual";
817
+ return SiteInsightsQueryOperator2;
818
+ })(SiteInsightsQueryOperator || {});
819
+ var SiteInsightsQueryRange = /* @__PURE__ */ ((SiteInsightsQueryRange2) => {
820
+ SiteInsightsQueryRange2["LastYear"] = "lastYear";
821
+ SiteInsightsQueryRange2["Last3Months"] = "last3Months";
822
+ SiteInsightsQueryRange2["Last30Days"] = "last30Days";
823
+ SiteInsightsQueryRange2["Last7Days"] = "last7Days";
824
+ SiteInsightsQueryRange2["Last24Hours"] = "last24Hours";
825
+ return SiteInsightsQueryRange2;
826
+ })(SiteInsightsQueryRange || {});
746
827
  var InsightsInterval = /* @__PURE__ */ ((InsightsInterval2) => {
747
828
  InsightsInterval2["Day"] = "day";
748
829
  InsightsInterval2["Week"] = "week";
@@ -3233,6 +3314,15 @@ var Api = class extends HttpClient {
3233
3314
  type: "application/json" /* Json */,
3234
3315
  ...params
3235
3316
  }),
3317
+ aggregateSiteEvents: (organizationId, siteId, data, params = {}) => this.request({
3318
+ path: `/orgs/${organizationId}/sites/${siteId}/insights/events/aggregate`,
3319
+ method: "POST",
3320
+ body: data,
3321
+ secure: true,
3322
+ type: "application/json" /* Json */,
3323
+ format: "json",
3324
+ ...params
3325
+ }),
3236
3326
  getAdsInsightsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
3237
3327
  path: `/orgs/${organizationId}/sites/${siteId}/insights/ads`,
3238
3328
  method: "GET",
@@ -3536,6 +3626,14 @@ var GitBookAPI = class extends Api {
3536
3626
  RevisionSemanticChangeType,
3537
3627
  SiteAdsStatus,
3538
3628
  SiteAdsTopic,
3629
+ SiteInsightsEventType,
3630
+ SiteInsightsLinkPosition,
3631
+ SiteInsightsQueryOperator,
3632
+ SiteInsightsQueryRange,
3633
+ SiteInsightsVisitorBot,
3634
+ SiteInsightsVisitorBrowser,
3635
+ SiteInsightsVisitorDevice,
3636
+ SiteInsightsVisitorOS,
3539
3637
  SiteType,
3540
3638
  SiteVisibility,
3541
3639
  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.85.0";
175
+ var version = "0.87.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -662,6 +662,79 @@ var CustomizationSidebarListStyle = /* @__PURE__ */ ((CustomizationSidebarListSt
662
662
  CustomizationSidebarListStyle2["Line"] = "line";
663
663
  return CustomizationSidebarListStyle2;
664
664
  })(CustomizationSidebarListStyle || {});
665
+ var SiteInsightsLinkPosition = /* @__PURE__ */ ((SiteInsightsLinkPosition2) => {
666
+ SiteInsightsLinkPosition2["Header"] = "header";
667
+ SiteInsightsLinkPosition2["Footer"] = "footer";
668
+ SiteInsightsLinkPosition2["Sidebar"] = "sidebar";
669
+ SiteInsightsLinkPosition2["Content"] = "content";
670
+ return SiteInsightsLinkPosition2;
671
+ })(SiteInsightsLinkPosition || {});
672
+ var SiteInsightsEventType = /* @__PURE__ */ ((SiteInsightsEventType2) => {
673
+ SiteInsightsEventType2["PageView"] = "page_view";
674
+ SiteInsightsEventType2["SearchOpen"] = "search_open";
675
+ SiteInsightsEventType2["SearchTypeQuery"] = "search_type_query";
676
+ SiteInsightsEventType2["SearchOpenResult"] = "search_open_result";
677
+ SiteInsightsEventType2["PagePostFeedback"] = "page_post_feedback";
678
+ SiteInsightsEventType2["AskQuestion"] = "ask_question";
679
+ SiteInsightsEventType2["LinkClick"] = "link_click";
680
+ SiteInsightsEventType2["ApiClientOpen"] = "api_client_open";
681
+ SiteInsightsEventType2["ApiClientRequest"] = "api_client_request";
682
+ return SiteInsightsEventType2;
683
+ })(SiteInsightsEventType || {});
684
+ var SiteInsightsVisitorBrowser = /* @__PURE__ */ ((SiteInsightsVisitorBrowser2) => {
685
+ SiteInsightsVisitorBrowser2["Chrome"] = "chrome";
686
+ SiteInsightsVisitorBrowser2["Firefox"] = "firefox";
687
+ SiteInsightsVisitorBrowser2["Safari"] = "safari";
688
+ SiteInsightsVisitorBrowser2["Edge"] = "edge";
689
+ SiteInsightsVisitorBrowser2["Ie"] = "ie";
690
+ SiteInsightsVisitorBrowser2["Opera"] = "opera";
691
+ SiteInsightsVisitorBrowser2["Unknown"] = "unknown";
692
+ return SiteInsightsVisitorBrowser2;
693
+ })(SiteInsightsVisitorBrowser || {});
694
+ var SiteInsightsVisitorDevice = /* @__PURE__ */ ((SiteInsightsVisitorDevice2) => {
695
+ SiteInsightsVisitorDevice2["Desktop"] = "desktop";
696
+ SiteInsightsVisitorDevice2["Tablet"] = "tablet";
697
+ SiteInsightsVisitorDevice2["Mobile"] = "mobile";
698
+ SiteInsightsVisitorDevice2["Unknown"] = "unknown";
699
+ return SiteInsightsVisitorDevice2;
700
+ })(SiteInsightsVisitorDevice || {});
701
+ var SiteInsightsVisitorOS = /* @__PURE__ */ ((SiteInsightsVisitorOS2) => {
702
+ SiteInsightsVisitorOS2["Windows"] = "windows";
703
+ SiteInsightsVisitorOS2["Macos"] = "macos";
704
+ SiteInsightsVisitorOS2["Linux"] = "linux";
705
+ SiteInsightsVisitorOS2["Android"] = "android";
706
+ SiteInsightsVisitorOS2["Ios"] = "ios";
707
+ SiteInsightsVisitorOS2["Unknown"] = "unknown";
708
+ return SiteInsightsVisitorOS2;
709
+ })(SiteInsightsVisitorOS || {});
710
+ var SiteInsightsVisitorBot = /* @__PURE__ */ ((SiteInsightsVisitorBot2) => {
711
+ SiteInsightsVisitorBot2["Unknown"] = "unknown";
712
+ SiteInsightsVisitorBot2["Googlebot"] = "googlebot";
713
+ SiteInsightsVisitorBot2["Bingbot"] = "bingbot";
714
+ SiteInsightsVisitorBot2["Duckduckbot"] = "duckduckbot";
715
+ SiteInsightsVisitorBot2["Facebookbot"] = "facebookbot";
716
+ SiteInsightsVisitorBot2["Applebot"] = "applebot";
717
+ SiteInsightsVisitorBot2["Chatgpt"] = "chatgpt";
718
+ SiteInsightsVisitorBot2["Anthropic"] = "anthropic";
719
+ return SiteInsightsVisitorBot2;
720
+ })(SiteInsightsVisitorBot || {});
721
+ var SiteInsightsQueryOperator = /* @__PURE__ */ ((SiteInsightsQueryOperator2) => {
722
+ SiteInsightsQueryOperator2["In"] = "in";
723
+ SiteInsightsQueryOperator2["NotIn"] = "notIn";
724
+ SiteInsightsQueryOperator2["GreaterThan"] = "greaterThan";
725
+ SiteInsightsQueryOperator2["GreaterThanOrEqual"] = "greaterThanOrEqual";
726
+ SiteInsightsQueryOperator2["LessThan"] = "lessThan";
727
+ SiteInsightsQueryOperator2["LessThanOrEqual"] = "lessThanOrEqual";
728
+ return SiteInsightsQueryOperator2;
729
+ })(SiteInsightsQueryOperator || {});
730
+ var SiteInsightsQueryRange = /* @__PURE__ */ ((SiteInsightsQueryRange2) => {
731
+ SiteInsightsQueryRange2["LastYear"] = "lastYear";
732
+ SiteInsightsQueryRange2["Last3Months"] = "last3Months";
733
+ SiteInsightsQueryRange2["Last30Days"] = "last30Days";
734
+ SiteInsightsQueryRange2["Last7Days"] = "last7Days";
735
+ SiteInsightsQueryRange2["Last24Hours"] = "last24Hours";
736
+ return SiteInsightsQueryRange2;
737
+ })(SiteInsightsQueryRange || {});
665
738
  var InsightsInterval = /* @__PURE__ */ ((InsightsInterval2) => {
666
739
  InsightsInterval2["Day"] = "day";
667
740
  InsightsInterval2["Week"] = "week";
@@ -3152,6 +3225,15 @@ var Api = class extends HttpClient {
3152
3225
  type: "application/json" /* Json */,
3153
3226
  ...params
3154
3227
  }),
3228
+ aggregateSiteEvents: (organizationId, siteId, data, params = {}) => this.request({
3229
+ path: `/orgs/${organizationId}/sites/${siteId}/insights/events/aggregate`,
3230
+ method: "POST",
3231
+ body: data,
3232
+ secure: true,
3233
+ type: "application/json" /* Json */,
3234
+ format: "json",
3235
+ ...params
3236
+ }),
3155
3237
  getAdsInsightsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
3156
3238
  path: `/orgs/${organizationId}/sites/${siteId}/insights/ads`,
3157
3239
  method: "GET",
@@ -3454,6 +3536,14 @@ export {
3454
3536
  RevisionSemanticChangeType,
3455
3537
  SiteAdsStatus,
3456
3538
  SiteAdsTopic,
3539
+ SiteInsightsEventType,
3540
+ SiteInsightsLinkPosition,
3541
+ SiteInsightsQueryOperator,
3542
+ SiteInsightsQueryRange,
3543
+ SiteInsightsVisitorBot,
3544
+ SiteInsightsVisitorBrowser,
3545
+ SiteInsightsVisitorDevice,
3546
+ SiteInsightsVisitorOS,
3457
3547
  SiteType,
3458
3548
  SiteVisibility,
3459
3549
  SpaceBlockReason,
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.85.0",
7
+ "version": "0.87.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",