@gitbook/api 0.84.0 → 0.86.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 +301 -11
- package/dist/index.cjs +99 -1
- package/dist/index.js +91 -1
- package/package.json +1 -1
- package/spec/openapi.json +1545 -29
- package/spec/openapi.yaml +961 -22
package/dist/client.d.ts
CHANGED
|
@@ -592,16 +592,19 @@ export interface DocumentBlockTabs {
|
|
|
592
592
|
isVoid?: false;
|
|
593
593
|
data?: object;
|
|
594
594
|
}
|
|
595
|
-
|
|
595
|
+
/** Pointer to an operation in the OpenAPI spec. */
|
|
596
|
+
export interface OpenAPIOperationPointer {
|
|
597
|
+
/** Path of the operation in the OpenAPI spec. */
|
|
598
|
+
path: string;
|
|
599
|
+
/** HTTP method of the operation in the OpenAPI spec. */
|
|
600
|
+
method: string;
|
|
601
|
+
}
|
|
602
|
+
export interface DocumentBlockOpenAPI {
|
|
596
603
|
object: 'block';
|
|
597
604
|
type: 'swagger';
|
|
598
605
|
key?: string;
|
|
599
|
-
data: {
|
|
606
|
+
data: OpenAPIOperationPointer & {
|
|
600
607
|
ref: ContentRefFile;
|
|
601
|
-
/** Path of the operation in the OpenAPI spec. */
|
|
602
|
-
path?: string;
|
|
603
|
-
/** HTTP method of the operation in the OpenAPI spec. */
|
|
604
|
-
method?: string;
|
|
605
608
|
/** If true, the block is opened by default. */
|
|
606
609
|
expanded?: boolean;
|
|
607
610
|
fullWidth?: boolean;
|
|
@@ -639,7 +642,7 @@ export interface DocumentBlockStepper {
|
|
|
639
642
|
isVoid?: false;
|
|
640
643
|
data?: object;
|
|
641
644
|
}
|
|
642
|
-
export type DocumentBlocksTopLevels = DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTable |
|
|
645
|
+
export type DocumentBlocksTopLevels = DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper;
|
|
643
646
|
export interface JSONDocument {
|
|
644
647
|
object: 'document';
|
|
645
648
|
data: {
|
|
@@ -4526,8 +4529,13 @@ export interface SiteInsightsEventSession {
|
|
|
4526
4529
|
* https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
|
|
4527
4530
|
*/
|
|
4528
4531
|
language: string | null;
|
|
4529
|
-
/** Referrer of the
|
|
4530
|
-
referrer: null | URL;
|
|
4532
|
+
/** Referrer of the session */
|
|
4533
|
+
referrer: '' | null | URL;
|
|
4534
|
+
/**
|
|
4535
|
+
* Authentication token of the visitor.
|
|
4536
|
+
* This is used to identify the visitor with adaptive content.
|
|
4537
|
+
*/
|
|
4538
|
+
visitorAuthToken?: string | null;
|
|
4531
4539
|
}
|
|
4532
4540
|
/** Location of the event. */
|
|
4533
4541
|
export interface SiteInsightsEventLocation {
|
|
@@ -4587,7 +4595,279 @@ export type SiteInsightsEventAskQuestion = SiteInsightsEventBase & {
|
|
|
4587
4595
|
/** Question being asked. */
|
|
4588
4596
|
query: string;
|
|
4589
4597
|
};
|
|
4590
|
-
export
|
|
4598
|
+
export declare enum SiteInsightsLinkPosition {
|
|
4599
|
+
Header = "header",
|
|
4600
|
+
Footer = "footer",
|
|
4601
|
+
Sidebar = "sidebar",
|
|
4602
|
+
Content = "content"
|
|
4603
|
+
}
|
|
4604
|
+
export type SiteInsightsEventLinkClick = SiteInsightsEventBase & {
|
|
4605
|
+
type: 'link_click';
|
|
4606
|
+
link: {
|
|
4607
|
+
/** A relative reference to content in GitBook. */
|
|
4608
|
+
target: ContentRef;
|
|
4609
|
+
position: SiteInsightsLinkPosition;
|
|
4610
|
+
};
|
|
4611
|
+
};
|
|
4612
|
+
export type SiteInsightsEventAPIClientOpen = SiteInsightsEventBase & {
|
|
4613
|
+
type: 'api_client_open';
|
|
4614
|
+
/** Pointer to an operation in the OpenAPI spec. */
|
|
4615
|
+
operation: OpenAPIOperationPointer;
|
|
4616
|
+
};
|
|
4617
|
+
export type SiteInsightsEventAPIClientRequest = SiteInsightsEventBase & {
|
|
4618
|
+
type: 'api_client_request';
|
|
4619
|
+
/** Pointer to an operation in the OpenAPI spec. */
|
|
4620
|
+
operation: OpenAPIOperationPointer;
|
|
4621
|
+
};
|
|
4622
|
+
export type SiteInsightsEvent = SiteInsightsEventPageView | SiteInsightsEventSearchOpen | SiteInsightsEventSearchTypeQuery | SiteInsightsEventSearchOpenResult | SiteInsightsEventPagePostFeedback | SiteInsightsEventAskQuestion | SiteInsightsEventLinkClick | SiteInsightsEventAPIClientOpen | SiteInsightsEventAPIClientRequest;
|
|
4623
|
+
export declare enum SiteInsightsEventType {
|
|
4624
|
+
PageView = "page_view",
|
|
4625
|
+
SearchOpen = "search_open",
|
|
4626
|
+
SearchTypeQuery = "search_type_query",
|
|
4627
|
+
SearchOpenResult = "search_open_result",
|
|
4628
|
+
PagePostFeedback = "page_post_feedback",
|
|
4629
|
+
AskQuestion = "ask_question",
|
|
4630
|
+
LinkClick = "link_click",
|
|
4631
|
+
ApiClientOpen = "api_client_open",
|
|
4632
|
+
ApiClientRequest = "api_client_request"
|
|
4633
|
+
}
|
|
4634
|
+
export declare enum SiteInsightsVisitorBrowser {
|
|
4635
|
+
Chrome = "chrome",
|
|
4636
|
+
Firefox = "firefox",
|
|
4637
|
+
Safari = "safari",
|
|
4638
|
+
Edge = "edge",
|
|
4639
|
+
Ie = "ie",
|
|
4640
|
+
Opera = "opera",
|
|
4641
|
+
Unknown = "unknown"
|
|
4642
|
+
}
|
|
4643
|
+
export declare enum SiteInsightsVisitorDevice {
|
|
4644
|
+
Desktop = "desktop",
|
|
4645
|
+
Tablet = "tablet",
|
|
4646
|
+
Mobile = "mobile",
|
|
4647
|
+
Unknown = "unknown"
|
|
4648
|
+
}
|
|
4649
|
+
export declare enum SiteInsightsVisitorOS {
|
|
4650
|
+
Windows = "windows",
|
|
4651
|
+
Macos = "macos",
|
|
4652
|
+
Linux = "linux",
|
|
4653
|
+
Android = "android",
|
|
4654
|
+
Ios = "ios",
|
|
4655
|
+
Unknown = "unknown"
|
|
4656
|
+
}
|
|
4657
|
+
export declare enum SiteInsightsVisitorBot {
|
|
4658
|
+
Unknown = "unknown",
|
|
4659
|
+
Googlebot = "googlebot",
|
|
4660
|
+
Bingbot = "bingbot",
|
|
4661
|
+
Duckduckbot = "duckduckbot",
|
|
4662
|
+
Facebookbot = "facebookbot",
|
|
4663
|
+
Applebot = "applebot",
|
|
4664
|
+
Chatgpt = "chatgpt",
|
|
4665
|
+
Anthropic = "anthropic"
|
|
4666
|
+
}
|
|
4667
|
+
export type SiteInsightsQueryEventsValues = {
|
|
4668
|
+
column: 'datetime';
|
|
4669
|
+
values: Timestamp[];
|
|
4670
|
+
} | {
|
|
4671
|
+
column: 'eventsCount';
|
|
4672
|
+
values: number[];
|
|
4673
|
+
} | {
|
|
4674
|
+
column: 'sessionsCount';
|
|
4675
|
+
values: number[];
|
|
4676
|
+
} | {
|
|
4677
|
+
column: 'visitorsCount';
|
|
4678
|
+
values: number[];
|
|
4679
|
+
} | {
|
|
4680
|
+
column: 'eventType';
|
|
4681
|
+
values: SiteInsightsEventType[];
|
|
4682
|
+
} | {
|
|
4683
|
+
column: 'visitorClaim';
|
|
4684
|
+
claim: string;
|
|
4685
|
+
values: string[];
|
|
4686
|
+
} | {
|
|
4687
|
+
column: 'visitorClaimProperty';
|
|
4688
|
+
values: string[];
|
|
4689
|
+
} | {
|
|
4690
|
+
column: 'visitorBrowser';
|
|
4691
|
+
values: SiteInsightsVisitorBrowser[];
|
|
4692
|
+
} | {
|
|
4693
|
+
column: 'visitorDevice';
|
|
4694
|
+
values: SiteInsightsVisitorDevice[];
|
|
4695
|
+
} | {
|
|
4696
|
+
column: 'visitorOS';
|
|
4697
|
+
values: SiteInsightsVisitorOS[];
|
|
4698
|
+
} | {
|
|
4699
|
+
column: 'visitorBot';
|
|
4700
|
+
values: SiteInsightsVisitorBot[];
|
|
4701
|
+
} | {
|
|
4702
|
+
column: 'eventLinkTargetValue';
|
|
4703
|
+
values: ContentRef[];
|
|
4704
|
+
} | {
|
|
4705
|
+
column: 'eventLinkTargetKind';
|
|
4706
|
+
values: ('url' | 'page' | 'file' | 'anchor' | 'space' | 'collection' | 'user' | 'reusable-content')[];
|
|
4707
|
+
} | {
|
|
4708
|
+
column: 'eventLinkPosition';
|
|
4709
|
+
values: SiteInsightsLinkPosition[];
|
|
4710
|
+
} | {
|
|
4711
|
+
column: 'siteSection';
|
|
4712
|
+
values: (string | null)[];
|
|
4713
|
+
} | {
|
|
4714
|
+
column: 'siteSpace';
|
|
4715
|
+
values: (string | null)[];
|
|
4716
|
+
} | {
|
|
4717
|
+
column: 'siteShareKey';
|
|
4718
|
+
values: (string | null)[];
|
|
4719
|
+
} | {
|
|
4720
|
+
column: 'page';
|
|
4721
|
+
values: {
|
|
4722
|
+
page: string | null;
|
|
4723
|
+
space: string;
|
|
4724
|
+
}[];
|
|
4725
|
+
} | {
|
|
4726
|
+
column: 'visitorGeoCountry';
|
|
4727
|
+
values: (string | null)[];
|
|
4728
|
+
} | {
|
|
4729
|
+
column: 'visitorLanguage';
|
|
4730
|
+
values: (string | null)[];
|
|
4731
|
+
} | {
|
|
4732
|
+
column: 'eventLinkTargetDomain';
|
|
4733
|
+
values: (string | null)[];
|
|
4734
|
+
} | {
|
|
4735
|
+
column: 'eventAPIOperationPath';
|
|
4736
|
+
values: (string | null)[];
|
|
4737
|
+
} | {
|
|
4738
|
+
column: 'eventAPIOperationMethod';
|
|
4739
|
+
values: (string | null)[];
|
|
4740
|
+
} | {
|
|
4741
|
+
column: 'eventSearchQuery';
|
|
4742
|
+
values: string[];
|
|
4743
|
+
} | {
|
|
4744
|
+
column: 'pageFeedbackRating';
|
|
4745
|
+
values: {
|
|
4746
|
+
ok: number;
|
|
4747
|
+
good: number;
|
|
4748
|
+
bad: number;
|
|
4749
|
+
}[];
|
|
4750
|
+
} | {
|
|
4751
|
+
column: 'referrer';
|
|
4752
|
+
values: string[];
|
|
4753
|
+
} | {
|
|
4754
|
+
column: 'referrerDomain';
|
|
4755
|
+
values: string[];
|
|
4756
|
+
} | {
|
|
4757
|
+
column: 'utmSource';
|
|
4758
|
+
values: string[];
|
|
4759
|
+
} | {
|
|
4760
|
+
column: 'utmMedium';
|
|
4761
|
+
values: string[];
|
|
4762
|
+
} | {
|
|
4763
|
+
column: 'utmCampaign';
|
|
4764
|
+
values: string[];
|
|
4765
|
+
} | {
|
|
4766
|
+
column: 'utmTerm';
|
|
4767
|
+
values: string[];
|
|
4768
|
+
} | {
|
|
4769
|
+
column: 'utmContent';
|
|
4770
|
+
values: string[];
|
|
4771
|
+
};
|
|
4772
|
+
export declare enum SiteInsightsQueryOperator {
|
|
4773
|
+
In = "in",
|
|
4774
|
+
NotIn = "notIn",
|
|
4775
|
+
GreaterThan = "greaterThan",
|
|
4776
|
+
GreaterThanOrEqual = "greaterThanOrEqual",
|
|
4777
|
+
LessThan = "lessThan",
|
|
4778
|
+
LessThanOrEqual = "lessThanOrEqual"
|
|
4779
|
+
}
|
|
4780
|
+
export type SiteInsightsQueryEventsFilter = SiteInsightsQueryEventsValues & {
|
|
4781
|
+
operator?: SiteInsightsQueryOperator;
|
|
4782
|
+
};
|
|
4783
|
+
export interface SiteInsightsQueryDateTimeColumn {
|
|
4784
|
+
column: 'datetime';
|
|
4785
|
+
interval?: 'hour' | 'day' | 'week' | 'month';
|
|
4786
|
+
}
|
|
4787
|
+
export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
4788
|
+
column: 'eventType';
|
|
4789
|
+
} | {
|
|
4790
|
+
column: 'eventsCount';
|
|
4791
|
+
} | {
|
|
4792
|
+
column: 'sessionsCount';
|
|
4793
|
+
} | {
|
|
4794
|
+
column: 'visitorsCount';
|
|
4795
|
+
} | {
|
|
4796
|
+
column: 'siteSection';
|
|
4797
|
+
} | {
|
|
4798
|
+
column: 'siteSpace';
|
|
4799
|
+
} | {
|
|
4800
|
+
column: 'siteShareKey';
|
|
4801
|
+
} | {
|
|
4802
|
+
column: 'page';
|
|
4803
|
+
} | {
|
|
4804
|
+
column: 'visitorGeoCountry';
|
|
4805
|
+
} | {
|
|
4806
|
+
column: 'visitorDevice';
|
|
4807
|
+
} | {
|
|
4808
|
+
column: 'visitorBrowser';
|
|
4809
|
+
} | {
|
|
4810
|
+
column: 'visitorOS';
|
|
4811
|
+
} | {
|
|
4812
|
+
column: 'visitorBot';
|
|
4813
|
+
} | {
|
|
4814
|
+
column: 'visitorLanguage';
|
|
4815
|
+
} | {
|
|
4816
|
+
column: 'eventLinkTargetValue';
|
|
4817
|
+
} | {
|
|
4818
|
+
column: 'eventLinkTargetKind';
|
|
4819
|
+
} | {
|
|
4820
|
+
column: 'eventLinkTargetDomain';
|
|
4821
|
+
} | {
|
|
4822
|
+
column: 'eventLinkPosition';
|
|
4823
|
+
} | {
|
|
4824
|
+
column: 'eventAPIOperationPath';
|
|
4825
|
+
} | {
|
|
4826
|
+
column: 'eventAPIOperationMethod';
|
|
4827
|
+
} | {
|
|
4828
|
+
column: 'eventSearchQuery';
|
|
4829
|
+
} | {
|
|
4830
|
+
column: 'pageFeedbackRating';
|
|
4831
|
+
} | {
|
|
4832
|
+
column: 'referrer';
|
|
4833
|
+
} | {
|
|
4834
|
+
column: 'referrerDomain';
|
|
4835
|
+
} | {
|
|
4836
|
+
column: 'utmSource';
|
|
4837
|
+
} | {
|
|
4838
|
+
column: 'utmMedium';
|
|
4839
|
+
} | {
|
|
4840
|
+
column: 'utmCampaign';
|
|
4841
|
+
} | {
|
|
4842
|
+
column: 'utmTerm';
|
|
4843
|
+
} | {
|
|
4844
|
+
column: 'utmContent';
|
|
4845
|
+
} | {
|
|
4846
|
+
column: 'visitorClaimProperty';
|
|
4847
|
+
} | {
|
|
4848
|
+
column: 'visitorClaim';
|
|
4849
|
+
claim: string;
|
|
4850
|
+
};
|
|
4851
|
+
export declare enum SiteInsightsQueryRange {
|
|
4852
|
+
LastYear = "lastYear",
|
|
4853
|
+
Last3Months = "last3Months",
|
|
4854
|
+
Last30Days = "last30Days",
|
|
4855
|
+
Last7Days = "last7Days",
|
|
4856
|
+
Last24Hours = "last24Hours"
|
|
4857
|
+
}
|
|
4858
|
+
export interface SiteInsightsQueryEventsAggregation {
|
|
4859
|
+
where?: SiteInsightsQueryEventsFilter[];
|
|
4860
|
+
/** @minItems 1 */
|
|
4861
|
+
groupBy: SiteInsightsQueryEventsColumn[];
|
|
4862
|
+
order?: {
|
|
4863
|
+
by: SiteInsightsQueryEventsColumn;
|
|
4864
|
+
direction: 'asc' | 'desc';
|
|
4865
|
+
};
|
|
4866
|
+
range: SiteInsightsQueryRange;
|
|
4867
|
+
}
|
|
4868
|
+
export interface SiteInsightsQueryEventsAggregationResult {
|
|
4869
|
+
columns: SiteInsightsQueryEventsValues[];
|
|
4870
|
+
}
|
|
4591
4871
|
/**
|
|
4592
4872
|
* The interval for grouping the results
|
|
4593
4873
|
* @default "week"
|
|
@@ -4935,7 +5215,7 @@ export interface ContentPublishingAuth {
|
|
|
4935
5215
|
*/
|
|
4936
5216
|
fallbackURL?: string;
|
|
4937
5217
|
}
|
|
4938
|
-
export type DocumentBlock = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockListItem | DocumentBlockDivider | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockImage | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockCodeLine | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTabsItem | DocumentBlockTable |
|
|
5218
|
+
export type DocumentBlock = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockListItem | DocumentBlockDivider | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockImage | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockCodeLine | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTabsItem | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockStepperStep;
|
|
4939
5219
|
export type InputPageBase = {
|
|
4940
5220
|
/**
|
|
4941
5221
|
* Optional unique identifier for the page.
|
|
@@ -10437,6 +10717,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10437
10717
|
trackEventsInSiteById: (organizationId: string, siteId: string, data: {
|
|
10438
10718
|
events: SiteInsightsEvent[];
|
|
10439
10719
|
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
10720
|
+
/**
|
|
10721
|
+
* No description
|
|
10722
|
+
*
|
|
10723
|
+
* @tags sites
|
|
10724
|
+
* @name AggregateSiteEvents
|
|
10725
|
+
* @summary Query and aggregate events in a site.
|
|
10726
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/insights/events/aggregate
|
|
10727
|
+
* @secure
|
|
10728
|
+
*/
|
|
10729
|
+
aggregateSiteEvents: (organizationId: string, siteId: string, data: SiteInsightsQueryEventsAggregation, params?: RequestParams) => Promise<HttpResponse<SiteInsightsQueryEventsAggregationResult, any>>;
|
|
10440
10730
|
/**
|
|
10441
10731
|
* No description
|
|
10442
10732
|
*
|
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.
|
|
264
|
+
var version = "0.86.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.
|
|
175
|
+
var version = "0.86.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,
|