@gitbook/api 0.204.0 → 0.205.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 +229 -132
- package/dist/constants.d.ts +7 -0
- package/dist/index.cjs +32 -1
- package/dist/index.js +24 -1
- package/package.json +1 -1
- package/spec/openapi.json +969 -637
- package/spec/openapi.yaml +603 -400
package/dist/client.d.ts
CHANGED
|
@@ -820,6 +820,14 @@ export declare enum BillingSwitchAction {
|
|
|
820
820
|
Downgrade = "downgrade",
|
|
821
821
|
SwitchInterval = "switch_interval"
|
|
822
822
|
}
|
|
823
|
+
/** Where AI credits come from: - `paid`: credits included in the monthly bundle - `bonus`: free credits included with the monthly bundle - `site`: credits from published paid sites - `rollover`: unused paid credits carried over from the previous period - `custom`: credits granted manually by Sales or Support */
|
|
824
|
+
export declare enum AICreditGrantType {
|
|
825
|
+
Paid = "paid",
|
|
826
|
+
Bonus = "bonus",
|
|
827
|
+
Site = "site",
|
|
828
|
+
Rollover = "rollover",
|
|
829
|
+
Custom = "custom"
|
|
830
|
+
}
|
|
823
831
|
/** Identifier of a billing meter */
|
|
824
832
|
export declare enum BillingMeter {
|
|
825
833
|
AiResponses = "ai_responses",
|
|
@@ -2067,6 +2075,24 @@ export interface DocumentInlineImage {
|
|
|
2067
2075
|
};
|
|
2068
2076
|
isVoid: true;
|
|
2069
2077
|
}
|
|
2078
|
+
export interface DocumentInlineMath {
|
|
2079
|
+
object: "inline";
|
|
2080
|
+
type: "inline-math";
|
|
2081
|
+
key?: string;
|
|
2082
|
+
data: {
|
|
2083
|
+
formula: string;
|
|
2084
|
+
};
|
|
2085
|
+
isVoid: true;
|
|
2086
|
+
}
|
|
2087
|
+
export interface DocumentInlineExpression {
|
|
2088
|
+
object: "inline";
|
|
2089
|
+
type: "expression";
|
|
2090
|
+
key?: string;
|
|
2091
|
+
data: {
|
|
2092
|
+
expression: string;
|
|
2093
|
+
};
|
|
2094
|
+
isVoid: true;
|
|
2095
|
+
}
|
|
2070
2096
|
export interface ContentRefPage {
|
|
2071
2097
|
kind: "page";
|
|
2072
2098
|
page: string;
|
|
@@ -2113,11 +2139,21 @@ export interface ContentRefOpenAPI {
|
|
|
2113
2139
|
}
|
|
2114
2140
|
/** A relative reference to content in GitBook. */
|
|
2115
2141
|
export type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace | ContentRefReusableContent | ContentRefTag | ContentRefOpenAPI;
|
|
2142
|
+
export interface DocumentInlineMention {
|
|
2143
|
+
object: "inline";
|
|
2144
|
+
type: "mention";
|
|
2145
|
+
key?: string;
|
|
2146
|
+
data: {
|
|
2147
|
+
/** A relative reference to content in GitBook. */
|
|
2148
|
+
ref: ContentRef;
|
|
2149
|
+
};
|
|
2150
|
+
isVoid: true;
|
|
2151
|
+
}
|
|
2116
2152
|
export interface DocumentInlineLink {
|
|
2117
2153
|
object: "inline";
|
|
2118
2154
|
type: "link";
|
|
2119
2155
|
key?: string;
|
|
2120
|
-
nodes: (DocumentText | DocumentInlineImage)[];
|
|
2156
|
+
nodes: (DocumentText | DocumentInlineImage | DocumentInlineMath | DocumentInlineExpression | DocumentInlineMention)[];
|
|
2121
2157
|
data: {
|
|
2122
2158
|
/** A relative reference to content in GitBook. */
|
|
2123
2159
|
ref: ContentRef;
|
|
@@ -2144,24 +2180,6 @@ export interface DocumentInlineIcon {
|
|
|
2144
2180
|
};
|
|
2145
2181
|
isVoid: true;
|
|
2146
2182
|
}
|
|
2147
|
-
export interface DocumentInlineExpression {
|
|
2148
|
-
object: "inline";
|
|
2149
|
-
type: "expression";
|
|
2150
|
-
key?: string;
|
|
2151
|
-
data: {
|
|
2152
|
-
expression: string;
|
|
2153
|
-
};
|
|
2154
|
-
isVoid: true;
|
|
2155
|
-
}
|
|
2156
|
-
export interface DocumentInlineMath {
|
|
2157
|
-
object: "inline";
|
|
2158
|
-
type: "inline-math";
|
|
2159
|
-
key?: string;
|
|
2160
|
-
data: {
|
|
2161
|
-
formula: string;
|
|
2162
|
-
};
|
|
2163
|
-
isVoid: true;
|
|
2164
|
-
}
|
|
2165
2183
|
export interface DocumentBlockParagraph {
|
|
2166
2184
|
object: "block";
|
|
2167
2185
|
type: "paragraph";
|
|
@@ -2472,11 +2490,44 @@ export interface DocumentBlockMath {
|
|
|
2472
2490
|
};
|
|
2473
2491
|
isVoid: true;
|
|
2474
2492
|
}
|
|
2493
|
+
export type Length = number | {
|
|
2494
|
+
unit: string;
|
|
2495
|
+
value: number;
|
|
2496
|
+
};
|
|
2497
|
+
export interface DocumentBlockImage {
|
|
2498
|
+
object: "block";
|
|
2499
|
+
type: "image";
|
|
2500
|
+
key?: string;
|
|
2501
|
+
data: {
|
|
2502
|
+
ref: ContentRefURL | ContentRefFile;
|
|
2503
|
+
refDark?: ContentRefURL | ContentRefFile;
|
|
2504
|
+
width?: Length;
|
|
2505
|
+
height?: Length;
|
|
2506
|
+
alt?: string;
|
|
2507
|
+
};
|
|
2508
|
+
fragments: (DocumentFragment & {
|
|
2509
|
+
fragment: "caption";
|
|
2510
|
+
nodes: DocumentBlockParagraph[];
|
|
2511
|
+
})[];
|
|
2512
|
+
isVoid: true;
|
|
2513
|
+
}
|
|
2514
|
+
export interface DocumentBlockImages {
|
|
2515
|
+
object: "block";
|
|
2516
|
+
type: "images";
|
|
2517
|
+
key?: string;
|
|
2518
|
+
data: {
|
|
2519
|
+
align?: "center" | "left" | "right";
|
|
2520
|
+
fullWidth?: boolean;
|
|
2521
|
+
withFrame?: boolean;
|
|
2522
|
+
};
|
|
2523
|
+
nodes: DocumentBlockImage[];
|
|
2524
|
+
isVoid: false;
|
|
2525
|
+
}
|
|
2475
2526
|
export interface DocumentBlockListItem {
|
|
2476
2527
|
object: "block";
|
|
2477
2528
|
type: "list-item";
|
|
2478
2529
|
key?: string;
|
|
2479
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockCode | DocumentBlockHint | DocumentBlockQuote | DocumentBlockMath | DocumentBlockTable)[];
|
|
2530
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockCode | DocumentBlockHint | DocumentBlockQuote | DocumentBlockMath | DocumentBlockTable | DocumentBlockImages)[];
|
|
2480
2531
|
isVoid?: false;
|
|
2481
2532
|
data?: {
|
|
2482
2533
|
checked?: boolean;
|
|
@@ -2549,39 +2600,6 @@ export interface DocumentBlockIf {
|
|
|
2549
2600
|
expression: string;
|
|
2550
2601
|
};
|
|
2551
2602
|
}
|
|
2552
|
-
export type Length = number | {
|
|
2553
|
-
unit: string;
|
|
2554
|
-
value: number;
|
|
2555
|
-
};
|
|
2556
|
-
export interface DocumentBlockImage {
|
|
2557
|
-
object: "block";
|
|
2558
|
-
type: "image";
|
|
2559
|
-
key?: string;
|
|
2560
|
-
data: {
|
|
2561
|
-
ref: ContentRefURL | ContentRefFile;
|
|
2562
|
-
refDark?: ContentRefURL | ContentRefFile;
|
|
2563
|
-
width?: Length;
|
|
2564
|
-
height?: Length;
|
|
2565
|
-
alt?: string;
|
|
2566
|
-
};
|
|
2567
|
-
fragments: (DocumentFragment & {
|
|
2568
|
-
fragment: "caption";
|
|
2569
|
-
nodes: DocumentBlockParagraph[];
|
|
2570
|
-
})[];
|
|
2571
|
-
isVoid: true;
|
|
2572
|
-
}
|
|
2573
|
-
export interface DocumentBlockImages {
|
|
2574
|
-
object: "block";
|
|
2575
|
-
type: "images";
|
|
2576
|
-
key?: string;
|
|
2577
|
-
data: {
|
|
2578
|
-
align?: "center" | "left" | "right";
|
|
2579
|
-
fullWidth?: boolean;
|
|
2580
|
-
withFrame?: boolean;
|
|
2581
|
-
};
|
|
2582
|
-
nodes: DocumentBlockImage[];
|
|
2583
|
-
isVoid: false;
|
|
2584
|
-
}
|
|
2585
2603
|
export interface DocumentBlockFile {
|
|
2586
2604
|
object: "block";
|
|
2587
2605
|
type: "file";
|
|
@@ -2613,6 +2631,16 @@ export interface DocumentBlockReusableContent {
|
|
|
2613
2631
|
token?: string;
|
|
2614
2632
|
};
|
|
2615
2633
|
}
|
|
2634
|
+
export interface DocumentBlockContentRef {
|
|
2635
|
+
object: "block";
|
|
2636
|
+
type: "content-ref";
|
|
2637
|
+
key?: string;
|
|
2638
|
+
data: {
|
|
2639
|
+
/** A relative reference to content in GitBook. */
|
|
2640
|
+
ref: ContentRef;
|
|
2641
|
+
};
|
|
2642
|
+
isVoid: true;
|
|
2643
|
+
}
|
|
2616
2644
|
export interface DocumentBlockExpandable {
|
|
2617
2645
|
object: "block";
|
|
2618
2646
|
type: "expandable";
|
|
@@ -2633,28 +2661,26 @@ export interface DocumentBlockExpandable {
|
|
|
2633
2661
|
fragment: "expandable-body";
|
|
2634
2662
|
type: "expandable-body";
|
|
2635
2663
|
/** @minItems 1 */
|
|
2636
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockReusableContent | DocumentBlockIntegration)[];
|
|
2664
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockIntegration | DocumentBlockStepper)[];
|
|
2637
2665
|
}))[];
|
|
2638
2666
|
meta?: {
|
|
2639
2667
|
/** Unique ID to be used in an URL for the block. */
|
|
2640
2668
|
id: string;
|
|
2641
2669
|
};
|
|
2642
2670
|
}
|
|
2643
|
-
export interface
|
|
2671
|
+
export interface DocumentBlockStepper {
|
|
2644
2672
|
object: "block";
|
|
2645
|
-
type: "
|
|
2673
|
+
type: "stepper";
|
|
2646
2674
|
key?: string;
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
};
|
|
2651
|
-
isVoid: true;
|
|
2675
|
+
nodes: DocumentBlockStepperStep[];
|
|
2676
|
+
isVoid?: false;
|
|
2677
|
+
data?: object;
|
|
2652
2678
|
}
|
|
2653
2679
|
export interface DocumentBlockTabsItem {
|
|
2654
2680
|
object: "block";
|
|
2655
2681
|
type: "tabs-item";
|
|
2656
2682
|
key?: string;
|
|
2657
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration)[];
|
|
2683
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTable | DocumentBlockExpandable | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockStepper)[];
|
|
2658
2684
|
data: {
|
|
2659
2685
|
title?: string;
|
|
2660
2686
|
/** Name of the icon */
|
|
@@ -2678,6 +2704,16 @@ export interface DocumentBlockTabs {
|
|
|
2678
2704
|
fullWidth?: boolean;
|
|
2679
2705
|
};
|
|
2680
2706
|
}
|
|
2707
|
+
export interface DocumentBlockStepperStep {
|
|
2708
|
+
object: "block";
|
|
2709
|
+
type: "stepper-step";
|
|
2710
|
+
key?: string;
|
|
2711
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockTabs | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockStepper)[];
|
|
2712
|
+
data: {
|
|
2713
|
+
icon?: string;
|
|
2714
|
+
};
|
|
2715
|
+
isVoid?: false;
|
|
2716
|
+
}
|
|
2681
2717
|
/** Pointer to an operation in the OpenAPI spec. */
|
|
2682
2718
|
export interface OpenAPIOperationPointer {
|
|
2683
2719
|
/** Path of the operation in the OpenAPI spec. */
|
|
@@ -2763,29 +2799,11 @@ export interface DocumentBlockOpenAPIWebhook {
|
|
|
2763
2799
|
id: string;
|
|
2764
2800
|
};
|
|
2765
2801
|
}
|
|
2766
|
-
export interface DocumentBlockStepperStep {
|
|
2767
|
-
object: "block";
|
|
2768
|
-
type: "stepper-step";
|
|
2769
|
-
key?: string;
|
|
2770
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockExpandable)[];
|
|
2771
|
-
data: {
|
|
2772
|
-
icon?: string;
|
|
2773
|
-
};
|
|
2774
|
-
isVoid?: false;
|
|
2775
|
-
}
|
|
2776
|
-
export interface DocumentBlockStepper {
|
|
2777
|
-
object: "block";
|
|
2778
|
-
type: "stepper";
|
|
2779
|
-
key?: string;
|
|
2780
|
-
nodes: DocumentBlockStepperStep[];
|
|
2781
|
-
isVoid?: false;
|
|
2782
|
-
data?: object;
|
|
2783
|
-
}
|
|
2784
2802
|
export interface DocumentBlockColumn {
|
|
2785
2803
|
object: "block";
|
|
2786
2804
|
type: "column";
|
|
2787
2805
|
key?: string;
|
|
2788
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockImages | DocumentBlockCode | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockContentRef | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockIntegration | DocumentBlockMath | DocumentBlockQuote | DocumentBlockTable | DocumentBlockExpandable | DocumentBlockStepper)[];
|
|
2806
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockImages | DocumentBlockCode | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockContentRef | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockIntegration | DocumentBlockMath | DocumentBlockQuote | DocumentBlockTable | DocumentBlockExpandable | DocumentBlockStepper | DocumentBlockIf)[];
|
|
2789
2807
|
isVoid?: false;
|
|
2790
2808
|
data: {
|
|
2791
2809
|
width?: Length;
|
|
@@ -2806,7 +2824,7 @@ export interface DocumentBlockUpdate {
|
|
|
2806
2824
|
object: "block";
|
|
2807
2825
|
type: "update";
|
|
2808
2826
|
key?: string;
|
|
2809
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTabs | DocumentBlockExpandable)[];
|
|
2827
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTabs | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockIf | DocumentBlockStepper)[];
|
|
2810
2828
|
data: {
|
|
2811
2829
|
date: Timestamp;
|
|
2812
2830
|
/** Array of tags. Each tag is id'ed by its slug. */
|
|
@@ -2826,21 +2844,13 @@ export interface DocumentBlockUpdates {
|
|
|
2826
2844
|
};
|
|
2827
2845
|
}
|
|
2828
2846
|
export type DocumentBlock = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockListItem | DocumentBlockDivider | DocumentBlockQuote | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockIf | DocumentBlockImages | DocumentBlockImage | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockCodeLine | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTabsItem | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockOpenAPIOperation | DocumentBlockOpenAPISchemas | DocumentBlockOpenAPIWebhook | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockStepperStep | DocumentBlockColumns | DocumentBlockColumn | DocumentBlockUpdates | DocumentBlockUpdate;
|
|
2829
|
-
export interface DocumentInlineMention {
|
|
2830
|
-
object: "inline";
|
|
2831
|
-
type: "mention";
|
|
2832
|
-
key?: string;
|
|
2833
|
-
data: {
|
|
2834
|
-
/** A relative reference to content in GitBook. */
|
|
2835
|
-
ref: ContentRef;
|
|
2836
|
-
};
|
|
2837
|
-
isVoid: true;
|
|
2838
|
-
}
|
|
2839
2847
|
/** Action to perform when an inline button is clicked. */
|
|
2840
2848
|
export type DocumentAction = {
|
|
2841
2849
|
action: "search";
|
|
2842
2850
|
/** The search query to prefill. */
|
|
2843
2851
|
query?: string;
|
|
2852
|
+
/** Where to search. `site` searches the whole site; `space` limits the search to the space the visitor is reading. */
|
|
2853
|
+
scope?: "site" | "space";
|
|
2844
2854
|
} | {
|
|
2845
2855
|
action: "ask";
|
|
2846
2856
|
/** The question to prefill. */
|
|
@@ -3279,6 +3289,26 @@ export type RevisionTypeEdits = RevisionBase & {
|
|
|
3279
3289
|
* @maxLength 100
|
|
3280
3290
|
*/
|
|
3281
3291
|
export type ChangeRequestSubject = string;
|
|
3292
|
+
/** Counts of entities grouped by how they changed relative to the change request base. */
|
|
3293
|
+
export interface ChangeRequestChangeCountsByType {
|
|
3294
|
+
/** @min 0 */
|
|
3295
|
+
added: number;
|
|
3296
|
+
/** @min 0 */
|
|
3297
|
+
modified: number;
|
|
3298
|
+
/** @min 0 */
|
|
3299
|
+
deleted: number;
|
|
3300
|
+
}
|
|
3301
|
+
/** Exact semantic entity and page-document block counts for a change request at its current head and base revisions. */
|
|
3302
|
+
export interface ChangeRequestChangeCounts {
|
|
3303
|
+
/** Counts of entities grouped by how they changed relative to the change request base. */
|
|
3304
|
+
pages: ChangeRequestChangeCountsByType;
|
|
3305
|
+
/** Counts of entities grouped by how they changed relative to the change request base. */
|
|
3306
|
+
library: ChangeRequestChangeCountsByType;
|
|
3307
|
+
/** Nested user-visible page-document block counts. Absent when `blocksOmittedReason` is set. */
|
|
3308
|
+
blocks?: ChangeRequestChangeCountsByType;
|
|
3309
|
+
/** Why `blocks` is absent: too many pages changed (`too-many-pages`), the changed pages hold too many blocks to compare within the counting budget (`too-many-blocks`; this is not a count of changed blocks), or counting ran out of time (`timeout`). Page and library counts are still exact. */
|
|
3310
|
+
blocksOmittedReason?: "too-many-pages" | "too-many-blocks" | "timeout";
|
|
3311
|
+
}
|
|
3282
3312
|
/**
|
|
3283
3313
|
* Optional title to display for the link.
|
|
3284
3314
|
* @maxLength 128
|
|
@@ -3358,6 +3388,8 @@ export interface ChangeRequest {
|
|
|
3358
3388
|
revisionMerged?: string;
|
|
3359
3389
|
/** Count of opened comments on the change request. */
|
|
3360
3390
|
comments: number;
|
|
3391
|
+
/** Change counts computed when the change request gets a new revision, for its current head and base revisions. Merged change requests keep their last computed counts. Absent until computed. */
|
|
3392
|
+
changeCounts?: ChangeRequestChangeCounts;
|
|
3361
3393
|
/** Site topic the change request was created from, when it came from one. */
|
|
3362
3394
|
siteTopic?: {
|
|
3363
3395
|
/** ID of the site associated with the change request. */
|
|
@@ -4138,10 +4170,8 @@ export interface SitePointer {
|
|
|
4138
4170
|
export type OrganizationDefaultContent = SitePointer;
|
|
4139
4171
|
/** An AI credit threshold from 5% to 50%, or null when disabled. */
|
|
4140
4172
|
export type AICreditThreshold = number | null;
|
|
4141
|
-
/** AI preferences
|
|
4173
|
+
/** AI preferences. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
|
|
4142
4174
|
export interface OrganizationAISettings {
|
|
4143
|
-
/** Whether AI features are automatically paused because credits are low. */
|
|
4144
|
-
aiPaused?: boolean;
|
|
4145
4175
|
"ai-agent"?: false;
|
|
4146
4176
|
"ai-assistant"?: false;
|
|
4147
4177
|
"ai-broken-links"?: false;
|
|
@@ -4295,8 +4325,10 @@ export interface Organization {
|
|
|
4295
4325
|
sso?: boolean;
|
|
4296
4326
|
/** If true, the organization is configured to use all our AI features. */
|
|
4297
4327
|
ai?: boolean;
|
|
4298
|
-
/** AI preferences
|
|
4328
|
+
/** AI preferences. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
|
|
4299
4329
|
aiSettings?: OrganizationAISettings;
|
|
4330
|
+
/** Whether AI features have been paused automatically due to lack of AI credits. */
|
|
4331
|
+
aiPaused?: boolean;
|
|
4300
4332
|
/** If true, invite links are enabled for this organization. */
|
|
4301
4333
|
inviteLinks: boolean;
|
|
4302
4334
|
/** Whether audit logs can currently be accessed for this organization. */
|
|
@@ -6171,8 +6203,8 @@ export interface BillingInvoicePreview {
|
|
|
6171
6203
|
adjustments: BillingInvoiceAdjustment[];
|
|
6172
6204
|
/** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
|
|
6173
6205
|
creditGrants: {
|
|
6174
|
-
/** Where
|
|
6175
|
-
type:
|
|
6206
|
+
/** Where AI credits come from: - `paid`: credits included in the monthly bundle - `bonus`: free credits included with the monthly bundle - `site`: credits from published paid sites - `rollover`: unused paid credits carried over from the previous period - `custom`: credits granted manually by Sales or Support */
|
|
6207
|
+
type: AICreditGrantType;
|
|
6176
6208
|
/** Stripe spending priority. Lower values are consumed first. */
|
|
6177
6209
|
priority?: number;
|
|
6178
6210
|
/** Credits available from this grant before the current invoice usage. */
|
|
@@ -6258,8 +6290,8 @@ export interface Credits {
|
|
|
6258
6290
|
}
|
|
6259
6291
|
/** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
|
|
6260
6292
|
export type CreditGrants = {
|
|
6261
|
-
/** Where
|
|
6262
|
-
type:
|
|
6293
|
+
/** Where AI credits come from: - `paid`: credits included in the monthly bundle - `bonus`: free credits included with the monthly bundle - `site`: credits from published paid sites - `rollover`: unused paid credits carried over from the previous period - `custom`: credits granted manually by Sales or Support */
|
|
6294
|
+
type: AICreditGrantType;
|
|
6263
6295
|
/** Stripe spending priority. Lower values are consumed first. */
|
|
6264
6296
|
priority?: number;
|
|
6265
6297
|
/** Credits available from this grant before the current invoice usage. */
|
|
@@ -8132,6 +8164,36 @@ export type YoutubeChannelId = string;
|
|
|
8132
8164
|
export type YoutubeChannelName = string;
|
|
8133
8165
|
/** A YouTube channel identifier, either a channel ID or a channel handle. */
|
|
8134
8166
|
export type YoutubeChannelPattern = YoutubeChannelId | YoutubeChannelName;
|
|
8167
|
+
export interface JiraConnectorSetupSettings {
|
|
8168
|
+
/**
|
|
8169
|
+
* Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net.
|
|
8170
|
+
* @format uri
|
|
8171
|
+
* @minLength 1
|
|
8172
|
+
* @maxLength 2048
|
|
8173
|
+
*/
|
|
8174
|
+
baseUrl: string;
|
|
8175
|
+
/**
|
|
8176
|
+
* Email of the Atlassian account whose API token is used.
|
|
8177
|
+
* @format email
|
|
8178
|
+
* @minLength 1
|
|
8179
|
+
* @maxLength 254
|
|
8180
|
+
*/
|
|
8181
|
+
apiEmail: string;
|
|
8182
|
+
/**
|
|
8183
|
+
* Atlassian API token used for outbound writes. Redacted when read back. Omit it when updating a connection to keep the stored token; required when the site URL or account email changes.
|
|
8184
|
+
* @minLength 1
|
|
8185
|
+
* @maxLength 1024
|
|
8186
|
+
*/
|
|
8187
|
+
apiToken: string;
|
|
8188
|
+
/**
|
|
8189
|
+
* Projects where GitBook handles issues. Empty means all accessible projects.
|
|
8190
|
+
* @maxItems 100
|
|
8191
|
+
* @uniqueItems true
|
|
8192
|
+
*/
|
|
8193
|
+
projectKeys?: string[];
|
|
8194
|
+
/** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
|
|
8195
|
+
statusMapping?: Record<ChangeRequestStatus, string>;
|
|
8196
|
+
}
|
|
8135
8197
|
export type ContextConnectorSetup = {
|
|
8136
8198
|
connector: "builtin:email";
|
|
8137
8199
|
} | {
|
|
@@ -8243,36 +8305,7 @@ export type ContextConnectorSetup = {
|
|
|
8243
8305
|
};
|
|
8244
8306
|
} | {
|
|
8245
8307
|
connector: "builtin:jira";
|
|
8246
|
-
setupSettings:
|
|
8247
|
-
/**
|
|
8248
|
-
* Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net.
|
|
8249
|
-
* @format uri
|
|
8250
|
-
* @minLength 1
|
|
8251
|
-
* @maxLength 2048
|
|
8252
|
-
*/
|
|
8253
|
-
baseUrl: string;
|
|
8254
|
-
/**
|
|
8255
|
-
* Email of the Atlassian account whose API token is used.
|
|
8256
|
-
* @format email
|
|
8257
|
-
* @minLength 1
|
|
8258
|
-
* @maxLength 254
|
|
8259
|
-
*/
|
|
8260
|
-
apiEmail: string;
|
|
8261
|
-
/**
|
|
8262
|
-
* Atlassian API token used for outbound writes. Redacted when read back.
|
|
8263
|
-
* @minLength 1
|
|
8264
|
-
* @maxLength 1024
|
|
8265
|
-
*/
|
|
8266
|
-
apiToken: string;
|
|
8267
|
-
/**
|
|
8268
|
-
* Projects where GitBook handles issues. Empty means all accessible projects.
|
|
8269
|
-
* @maxItems 100
|
|
8270
|
-
* @uniqueItems true
|
|
8271
|
-
*/
|
|
8272
|
-
projectKeys?: string[];
|
|
8273
|
-
/** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
|
|
8274
|
-
statusMapping?: Record<ChangeRequestStatus, string>;
|
|
8275
|
-
};
|
|
8308
|
+
setupSettings: JiraConnectorSetupSettings;
|
|
8276
8309
|
};
|
|
8277
8310
|
export type ContextConnection = {
|
|
8278
8311
|
object: "context-connection";
|
|
@@ -8322,6 +8355,34 @@ export type ContextConnection = {
|
|
|
8322
8355
|
location: string;
|
|
8323
8356
|
};
|
|
8324
8357
|
} & ContextConnectorSetup;
|
|
8358
|
+
/**
|
|
8359
|
+
* Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net.
|
|
8360
|
+
* @format uri
|
|
8361
|
+
* @minLength 1
|
|
8362
|
+
* @maxLength 2048
|
|
8363
|
+
*/
|
|
8364
|
+
export type BaseUrl = string;
|
|
8365
|
+
/**
|
|
8366
|
+
* Email of the Atlassian account whose API token is used.
|
|
8367
|
+
* @format email
|
|
8368
|
+
* @minLength 1
|
|
8369
|
+
* @maxLength 254
|
|
8370
|
+
*/
|
|
8371
|
+
export type ApiEmail = string;
|
|
8372
|
+
/**
|
|
8373
|
+
* Atlassian API token used for outbound writes. Redacted when read back. Omit it when updating a connection to keep the stored token; required when the site URL or account email changes.
|
|
8374
|
+
* @minLength 1
|
|
8375
|
+
* @maxLength 1024
|
|
8376
|
+
*/
|
|
8377
|
+
export type ApiToken = string;
|
|
8378
|
+
/**
|
|
8379
|
+
* Projects where GitBook handles issues. Empty means all accessible projects.
|
|
8380
|
+
* @maxItems 100
|
|
8381
|
+
* @uniqueItems true
|
|
8382
|
+
*/
|
|
8383
|
+
export type ProjectKeys = string[];
|
|
8384
|
+
/** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
|
|
8385
|
+
export type StatusMapping = Record<ChangeRequestStatus, string>;
|
|
8325
8386
|
export interface ContextConnectionTestResult {
|
|
8326
8387
|
object: "context-connection-test-result";
|
|
8327
8388
|
/** Whether the stored credentials authenticated successfully. */
|
|
@@ -8329,6 +8390,7 @@ export interface ContextConnectionTestResult {
|
|
|
8329
8390
|
/** A human-readable reason for the failure, when the test failed. */
|
|
8330
8391
|
error?: string;
|
|
8331
8392
|
}
|
|
8393
|
+
export type SiteChannelType = SiteCoreChannelType | SiteConfigurableChannelType;
|
|
8332
8394
|
export interface SiteTopicUsageSettings {
|
|
8333
8395
|
/** Whether to use context to propose change requests */
|
|
8334
8396
|
changeRequests: boolean;
|
|
@@ -8374,7 +8436,6 @@ export interface SiteTopic {
|
|
|
8374
8436
|
location: string;
|
|
8375
8437
|
};
|
|
8376
8438
|
}
|
|
8377
|
-
export type SiteChannelType = SiteCoreChannelType | SiteConfigurableChannelType;
|
|
8378
8439
|
export interface SiteQuestionAnswerSourceBase {
|
|
8379
8440
|
object: "site-question-answer-source";
|
|
8380
8441
|
/** The ID of the source. */
|
|
@@ -9437,6 +9498,10 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
|
9437
9498
|
column: "visitorBot";
|
|
9438
9499
|
} | {
|
|
9439
9500
|
column: "visitorLanguage";
|
|
9501
|
+
} | {
|
|
9502
|
+
column: "visitorUserAgent";
|
|
9503
|
+
} | {
|
|
9504
|
+
column: "visitorId";
|
|
9440
9505
|
} | {
|
|
9441
9506
|
column: "eventLinkTargetValue";
|
|
9442
9507
|
} | {
|
|
@@ -9602,6 +9667,12 @@ export type SiteInsightsQueryEventsValues = {
|
|
|
9602
9667
|
} | {
|
|
9603
9668
|
column: "visitorLanguage";
|
|
9604
9669
|
values: (string | null)[];
|
|
9670
|
+
} | {
|
|
9671
|
+
column: "visitorUserAgent";
|
|
9672
|
+
values: string[];
|
|
9673
|
+
} | {
|
|
9674
|
+
column: "visitorId";
|
|
9675
|
+
values: string[];
|
|
9605
9676
|
} | {
|
|
9606
9677
|
column: "eventLinkTargetDomain";
|
|
9607
9678
|
values: (string | null)[];
|
|
@@ -17458,6 +17529,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17458
17529
|
* @secure
|
|
17459
17530
|
*/
|
|
17460
17531
|
updateSiteContextConnectionById: (organizationId: EntityId, siteId: string, siteContextConnectionId: string, data: ContextConnectorSetup | {
|
|
17532
|
+
connector: "builtin:jira";
|
|
17533
|
+
/** Optional label for the connection */
|
|
17534
|
+
label?: ContextConnectionLabel;
|
|
17535
|
+
setupSettings: {
|
|
17536
|
+
/** Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net. */
|
|
17537
|
+
baseUrl: BaseUrl;
|
|
17538
|
+
/** Email of the Atlassian account whose API token is used. */
|
|
17539
|
+
apiEmail: ApiEmail;
|
|
17540
|
+
/** Atlassian API token used for outbound writes. Redacted when read back. Omit it when updating a connection to keep the stored token; required when the site URL or account email changes. */
|
|
17541
|
+
apiToken?: ApiToken;
|
|
17542
|
+
/** Projects where GitBook handles issues. Empty means all accessible projects. */
|
|
17543
|
+
projectKeys?: ProjectKeys;
|
|
17544
|
+
/** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
|
|
17545
|
+
statusMapping?: StatusMapping;
|
|
17546
|
+
};
|
|
17547
|
+
} | {
|
|
17461
17548
|
usageSettings?: ContextUsageSettings;
|
|
17462
17549
|
/** Optional label for the connection */
|
|
17463
17550
|
label?: ContextConnectionLabel;
|
|
@@ -17514,6 +17601,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17514
17601
|
from?: Timestamp;
|
|
17515
17602
|
/** Filter stats to answers created at or before this timestamp. */
|
|
17516
17603
|
to?: Timestamp;
|
|
17604
|
+
/** Filter stats by question relevance. */
|
|
17605
|
+
relevance?: SiteQuestionAnswerRelevance[];
|
|
17606
|
+
/** Filter stats by answer channel type. */
|
|
17607
|
+
channelType?: SiteChannelType[];
|
|
17608
|
+
/** Filter stats by answer resolution. */
|
|
17609
|
+
answered?: SiteQuestionAnswerResolution[];
|
|
17517
17610
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
17518
17611
|
items: SiteTopic[];
|
|
17519
17612
|
}, any>>;
|
|
@@ -18723,7 +18816,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
18723
18816
|
role?: SiteChannelRole;
|
|
18724
18817
|
}, params?: RequestParams) => Promise<HttpResponse<SiteChannel, any>>;
|
|
18725
18818
|
/**
|
|
18726
|
-
* @description Lists accessible Linear teams, GitHub repositories, Slack channels or Jira projects. Requires site admin permission. Linear, GitHub and Slack require an already-connected channel belonging to this site and matching the provider. Jira credentials
|
|
18819
|
+
* @description Lists accessible Linear teams, GitHub repositories, Slack channels or Jira projects. Requires site admin permission. Linear, GitHub and Slack require an already-connected channel belonging to this site and matching the provider. Jira uses either the credentials supplied, verified without saving a connection, or those stored on an existing Jira context connection of this site. Slack includes public channels and accessible private channels, excluding archived channels. To fetch another page, pass the opaque token from `next.page` as the `page` query parameter with the same request body. An absent `next` means there are no more pages; an empty `items` array alone does not indicate the end of the list.
|
|
18727
18820
|
*
|
|
18728
18821
|
* @tags site-channels
|
|
18729
18822
|
* @name ListSiteChannelScopes
|
|
@@ -18743,6 +18836,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
18743
18836
|
provider: "slack";
|
|
18744
18837
|
/** ID of an already-connected channel belonging to this site and matching the provider. */
|
|
18745
18838
|
siteChannelId: string;
|
|
18839
|
+
} | {
|
|
18840
|
+
provider: "jira";
|
|
18841
|
+
/** ID of a Jira context connection belonging to this site, whose stored credentials are used. */
|
|
18842
|
+
siteContextConnectionId: string;
|
|
18746
18843
|
} | {
|
|
18747
18844
|
provider: "jira";
|
|
18748
18845
|
credentials: {
|
package/dist/constants.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ export declare const BILLING_CANCELLATION_COMMENT_MIN_LENGTH = 1;
|
|
|
99
99
|
export declare const BILLING_COUPON_MAX_LENGTH = 500;
|
|
100
100
|
export declare const BILLING_COUPON_MIN_LENGTH = 1;
|
|
101
101
|
export declare const BILLING_METER_ENUM: ["ai_responses", "ai_agent_responses", "translation_words"];
|
|
102
|
+
export declare const AICREDIT_GRANT_TYPE_ENUM: ["paid", "bonus", "site", "rollover", "custom"];
|
|
102
103
|
export declare const BILLING_SWITCH_ACTION_ENUM: ["trial", "upgrade", "upgrade_passive", "downgrade", "switch_interval"];
|
|
103
104
|
export declare const AIUSAGE_INTERVAL_ENUM: ["day", "week", "month", "year"];
|
|
104
105
|
export declare const ORGANIZATION_FEATURE_ENUM: ["max-members", "ai", "ai-lens", "pdf-export", "ai-writing", "reusable-content", "translations", "members-advanced-roles", "members-teams", "members-team-owners", "security-saml", "change-requests-merge-rules"];
|
|
@@ -179,6 +180,12 @@ export declare const AISKIP_REASON_ENUM: ["ai_unavailable_for_organization", "ai
|
|
|
179
180
|
export declare const CONTEXT_SEARCH_BOOST_ENUM: ["x0.8", "x1.0", "x1.2"];
|
|
180
181
|
export declare const YOUTUBE_CHANNEL_ID_PATTERN = "^UC[A-Za-z0-9_-]{22}$";
|
|
181
182
|
export declare const YOUTUBE_CHANNEL_NAME_PATTERN = "^@[A-Za-z0-9._-]{3,100}$";
|
|
183
|
+
export declare const BASE_URL_MAX_LENGTH = 2048;
|
|
184
|
+
export declare const BASE_URL_MIN_LENGTH = 1;
|
|
185
|
+
export declare const API_EMAIL_MAX_LENGTH = 254;
|
|
186
|
+
export declare const API_EMAIL_MIN_LENGTH = 1;
|
|
187
|
+
export declare const API_TOKEN_MAX_LENGTH = 1024;
|
|
188
|
+
export declare const API_TOKEN_MIN_LENGTH = 1;
|
|
182
189
|
export declare const SITE_QUESTION_ANSWER_RELEVANCE_ENUM: ["relevant", "spam", "off-topic", "unclear"];
|
|
183
190
|
export declare const SITE_CORE_CHANNEL_TYPE_ENUM: ["site", "embed", "api"];
|
|
184
191
|
export declare const SITE_CONFIGURABLE_CHANNEL_TYPE_ENUM: ["builtin:slack", "builtin:discord", "builtin:github", "builtin:linear"];
|