@gitbook/api 0.139.0 → 0.141.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 +164 -77
- package/dist/index.cjs +12 -14
- package/dist/index.js +12 -14
- package/package.json +1 -1
- package/spec/openapi.json +551 -188
- package/spec/openapi.yaml +368 -126
package/dist/client.d.ts
CHANGED
|
@@ -93,6 +93,47 @@ export declare enum SpaceEditMode {
|
|
|
93
93
|
Live = "live",
|
|
94
94
|
Locked = "locked"
|
|
95
95
|
}
|
|
96
|
+
/** The merge rules inherits from the organization configuration. */
|
|
97
|
+
export interface MergeRulesConfigurationInherit {
|
|
98
|
+
type: 'inherit';
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Expression to evaluate
|
|
102
|
+
* @minLength 0
|
|
103
|
+
* @maxLength 1024
|
|
104
|
+
*/
|
|
105
|
+
export type Expression = string;
|
|
106
|
+
/** The merge rule is written in the advanced custom expression syntax. */
|
|
107
|
+
export type MergeRule = {
|
|
108
|
+
rule: 'require_specific_reviewers';
|
|
109
|
+
/** List of user IDs. */
|
|
110
|
+
users: string[];
|
|
111
|
+
} | {
|
|
112
|
+
rule: 'require_one_of_specific_reviewers';
|
|
113
|
+
/** List of user IDs. */
|
|
114
|
+
users: string[];
|
|
115
|
+
} | {
|
|
116
|
+
rule: 'allow_bypass';
|
|
117
|
+
/** List of user IDs. */
|
|
118
|
+
users: string[];
|
|
119
|
+
} | {
|
|
120
|
+
rule: 'require_at_least_one_review' | 'require_all_reviews_approved' | 'require_agent_review' | 'require_up_to_date_change_request' | 'require_change_request_subject' | 'require_change_request_description';
|
|
121
|
+
} | {
|
|
122
|
+
rule: 'custom';
|
|
123
|
+
/** Expression to evaluate */
|
|
124
|
+
expression: Expression;
|
|
125
|
+
};
|
|
126
|
+
/** The merge rules are composed of individual rules that must all pass. */
|
|
127
|
+
export interface MergeRulesConfigurationRules {
|
|
128
|
+
type: 'rules';
|
|
129
|
+
rules: MergeRule[];
|
|
130
|
+
}
|
|
131
|
+
/** The merge rules are disabled, change requests can be merged without review. */
|
|
132
|
+
export interface MergeRulesConfigurationNone {
|
|
133
|
+
type: 'none';
|
|
134
|
+
}
|
|
135
|
+
export type MergeRulesStandaloneConfiguration = MergeRulesConfigurationRules | MergeRulesConfigurationNone;
|
|
136
|
+
export type MergeRulesSpaceConfiguration = MergeRulesConfigurationInherit | MergeRulesStandaloneConfiguration;
|
|
96
137
|
export declare enum TranslationLanguage {
|
|
97
138
|
En = "en",
|
|
98
139
|
Fr = "fr",
|
|
@@ -214,6 +255,7 @@ export interface Space {
|
|
|
214
255
|
* * `locked`: All edits are locked for this space.
|
|
215
256
|
*/
|
|
216
257
|
editMode?: SpaceEditMode;
|
|
258
|
+
mergeRules: MergeRulesSpaceConfiguration;
|
|
217
259
|
/** URLs associated with the object */
|
|
218
260
|
urls: {
|
|
219
261
|
/**
|
|
@@ -1825,6 +1867,7 @@ export interface Organization {
|
|
|
1825
1867
|
plan: BillingProduct;
|
|
1826
1868
|
/** Billing details, only available for org members. */
|
|
1827
1869
|
billing?: OrganizationBilling;
|
|
1870
|
+
mergeRules: MergeRulesStandaloneConfiguration;
|
|
1828
1871
|
/** URLs associated with the object */
|
|
1829
1872
|
urls: {
|
|
1830
1873
|
/**
|
|
@@ -2032,6 +2075,13 @@ export declare enum OpenAPISpecProcessingErrorCode {
|
|
|
2032
2075
|
FETCH_ERROR = "FETCH_ERROR",
|
|
2033
2076
|
PARSE_ERROR = "PARSE_ERROR"
|
|
2034
2077
|
}
|
|
2078
|
+
/** OpenAPI error object. */
|
|
2079
|
+
export interface OpenAPIErrorObject {
|
|
2080
|
+
/** Description of the error. */
|
|
2081
|
+
message: string;
|
|
2082
|
+
/** Unique code of the error. */
|
|
2083
|
+
code?: string;
|
|
2084
|
+
}
|
|
2035
2085
|
export interface OpenAPISpec {
|
|
2036
2086
|
/** The object type, which is always "openapi-spec" */
|
|
2037
2087
|
object: 'openapi-spec';
|
|
@@ -2058,6 +2108,7 @@ export interface OpenAPISpec {
|
|
|
2058
2108
|
lastProcessedAt?: Timestamp;
|
|
2059
2109
|
/** OpenAPI processing error code */
|
|
2060
2110
|
lastProcessErrorCode?: OpenAPISpecProcessingErrorCode;
|
|
2111
|
+
lastProcessedErrors?: OpenAPIErrorObject[];
|
|
2061
2112
|
/** The set of permissions for the OpenAPI specification. */
|
|
2062
2113
|
permissions: {
|
|
2063
2114
|
/** Can the user view the specification. */
|
|
@@ -2329,6 +2380,7 @@ export interface UserContributor {
|
|
|
2329
2380
|
updatedAt: Timestamp;
|
|
2330
2381
|
count: number;
|
|
2331
2382
|
user: User;
|
|
2383
|
+
actionType: 'edit' | 'comment';
|
|
2332
2384
|
}
|
|
2333
2385
|
export declare enum RevisionPageType {
|
|
2334
2386
|
Document = "document",
|
|
@@ -2544,15 +2596,11 @@ export declare enum IntegrationVisibility {
|
|
|
2544
2596
|
Unlisted = "unlisted"
|
|
2545
2597
|
}
|
|
2546
2598
|
export declare enum IntegrationScope {
|
|
2547
|
-
SpaceViewsRead = "space:views:read",
|
|
2548
2599
|
SpaceContentRead = "space:content:read",
|
|
2549
2600
|
SpaceContentWrite = "space:content:write",
|
|
2550
2601
|
SpaceMetadataRead = "space:metadata:read",
|
|
2551
2602
|
SpaceMetadataWrite = "space:metadata:write",
|
|
2552
|
-
SpaceScriptInject = "space:script:inject",
|
|
2553
|
-
SpaceScriptCookies = "space:script:cookies",
|
|
2554
2603
|
SpaceGitSync = "space:git:sync",
|
|
2555
|
-
SpaceVisitorAuth = "space:visitor:auth",
|
|
2556
2604
|
SiteMetadataRead = "site:metadata:read",
|
|
2557
2605
|
SiteViewsRead = "site:views:read",
|
|
2558
2606
|
SiteScriptInject = "site:script:inject",
|
|
@@ -2560,7 +2608,6 @@ export declare enum IntegrationScope {
|
|
|
2560
2608
|
SiteVisitorAuth = "site:visitor:auth",
|
|
2561
2609
|
SiteAdaptiveRead = "site:adaptive:read",
|
|
2562
2610
|
SiteAdaptiveWrite = "site:adaptive:write",
|
|
2563
|
-
SiteAiAsk = "site:ai:ask",
|
|
2564
2611
|
OpenapiRead = "openapi:read",
|
|
2565
2612
|
OpenapiWrite = "openapi:write",
|
|
2566
2613
|
ConversationsIngest = "conversations:ingest"
|
|
@@ -2761,14 +2808,6 @@ export type SpaceIntegrationBlocks = {
|
|
|
2761
2808
|
name: string;
|
|
2762
2809
|
blocks: IntegrationBlock[];
|
|
2763
2810
|
}[];
|
|
2764
|
-
export interface SpaceIntegrationScript {
|
|
2765
|
-
/** Script URL to load. */
|
|
2766
|
-
script: URL;
|
|
2767
|
-
/** Content Security Policy to secure the loading of this script. */
|
|
2768
|
-
contentSecurityPolicy?: string;
|
|
2769
|
-
/** If true, the script will potentially load use cookies and visitors should be aware. */
|
|
2770
|
-
cookies: boolean;
|
|
2771
|
-
}
|
|
2772
2811
|
/** Secrets stored on the integration and passed at runtime. */
|
|
2773
2812
|
export type IntegrationSecrets = Record<string, string>;
|
|
2774
2813
|
export interface PublishIntegration {
|
|
@@ -2960,29 +2999,6 @@ export type SiteInstallationDeletedEvent = SiteEvent & {
|
|
|
2960
2999
|
configuration?: object;
|
|
2961
3000
|
};
|
|
2962
3001
|
};
|
|
2963
|
-
/** Event received when a page has been visited. */
|
|
2964
|
-
export type SpaceViewEvent = SpaceEvent & {
|
|
2965
|
-
type: 'space_view';
|
|
2966
|
-
/** Unique identifier of the visited page. */
|
|
2967
|
-
pageId?: string;
|
|
2968
|
-
/** Analytics info on the GitBook's content visitor. */
|
|
2969
|
-
visitor: {
|
|
2970
|
-
/** GitBook's unique identifier of the visitor. */
|
|
2971
|
-
anonymousId: string;
|
|
2972
|
-
/** The visitors cookies. */
|
|
2973
|
-
cookies: Record<string, string>;
|
|
2974
|
-
/** User-agent of the visitor. */
|
|
2975
|
-
userAgent: string;
|
|
2976
|
-
/** IP address of the visitor. */
|
|
2977
|
-
ip: string;
|
|
2978
|
-
/** Language of the visitor. */
|
|
2979
|
-
language?: string;
|
|
2980
|
-
};
|
|
2981
|
-
/** The GitBook content's URL visited (including URL params). */
|
|
2982
|
-
url: string;
|
|
2983
|
-
/** The URL of referrer that linked to the page. */
|
|
2984
|
-
referrer: string;
|
|
2985
|
-
};
|
|
2986
3002
|
/** Event received when a page has been visited on a site. */
|
|
2987
3003
|
export type SiteViewEvent = SiteEvent & {
|
|
2988
3004
|
type: 'site_view';
|
|
@@ -3081,11 +3097,11 @@ export type FetchEvent = BaseEvent & {
|
|
|
3081
3097
|
request: FetchRequest;
|
|
3082
3098
|
};
|
|
3083
3099
|
/** Common properties for all events related to fetching a published script from an installation */
|
|
3084
|
-
export type FetchPublishedScriptEvent =
|
|
3100
|
+
export type FetchPublishedScriptEvent = SiteEvent & {
|
|
3085
3101
|
type: 'fetch_published_script';
|
|
3086
3102
|
};
|
|
3087
3103
|
/** Common properties for all events related to authenticated access from an installation */
|
|
3088
|
-
export type FetchVisitorAuthenticationEvent =
|
|
3104
|
+
export type FetchVisitorAuthenticationEvent = SiteEvent & {
|
|
3089
3105
|
type: 'fetch_visitor_authentication';
|
|
3090
3106
|
location?: string;
|
|
3091
3107
|
};
|
|
@@ -3167,7 +3183,7 @@ export type ContentComputeRevisionEvent = ContentComputeEvent & {
|
|
|
3167
3183
|
type: 'content_compute_revision';
|
|
3168
3184
|
};
|
|
3169
3185
|
/** Any event that can be received from GitBook. */
|
|
3170
|
-
export type Event = InstallationSetupEvent | InstallationDeletedEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent | SiteInstallationSetupEvent | SiteInstallationDeletedEvent |
|
|
3186
|
+
export type Event = InstallationSetupEvent | InstallationDeletedEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent | SiteInstallationSetupEvent | SiteInstallationDeletedEvent | SiteViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | FetchEvent | FetchPublishedScriptEvent | FetchVisitorAuthenticationEvent | UIRenderEvent | ContentComputeDocumentEvent | ContentComputeRevisionEvent;
|
|
3171
3187
|
export interface IntegrationEvent {
|
|
3172
3188
|
/** Unique ID of the event. */
|
|
3173
3189
|
id: string;
|
|
@@ -3836,11 +3852,6 @@ export type SiteSectionDescription = string;
|
|
|
3836
3852
|
* @maxLength 100
|
|
3837
3853
|
*/
|
|
3838
3854
|
export type SiteSectionPath = string;
|
|
3839
|
-
/**
|
|
3840
|
-
* @minLength 1
|
|
3841
|
-
* @maxLength 1024
|
|
3842
|
-
*/
|
|
3843
|
-
export type Condition = string;
|
|
3844
3855
|
/**
|
|
3845
3856
|
* Path to the space on the site
|
|
3846
3857
|
* @minLength 1
|
|
@@ -3861,7 +3872,7 @@ export interface SiteSpace {
|
|
|
3861
3872
|
/** Whether this is the default space for the site */
|
|
3862
3873
|
default?: boolean;
|
|
3863
3874
|
/** Conditional expression used to evaluate whether the site space should be shown to the site's visitor. */
|
|
3864
|
-
condition?:
|
|
3875
|
+
condition?: Expression;
|
|
3865
3876
|
/** Whether the space has advanced customization feature enabled */
|
|
3866
3877
|
hasAdvancedCustomizationFeature?: boolean;
|
|
3867
3878
|
/** URLs associated with the object */
|
|
@@ -3887,7 +3898,7 @@ export interface SiteSection {
|
|
|
3887
3898
|
/** Path to the section on the site */
|
|
3888
3899
|
path: SiteSectionPath;
|
|
3889
3900
|
/** Conditional expression used to evaluate whether the site section should be shown to the site's visitor. */
|
|
3890
|
-
condition?:
|
|
3901
|
+
condition?: Expression;
|
|
3891
3902
|
/** ID of the section group the section belongs to in the site */
|
|
3892
3903
|
sectionGroup?: string;
|
|
3893
3904
|
siteSpaces: SiteSpace[];
|
|
@@ -4209,6 +4220,11 @@ export type CreateSpace = {
|
|
|
4209
4220
|
} | {
|
|
4210
4221
|
computedSource: ComputedContentSourceRevision;
|
|
4211
4222
|
}));
|
|
4223
|
+
/** An installed integration with its current status */
|
|
4224
|
+
export interface InstalledIntegration {
|
|
4225
|
+
status: IntegrationInstallationStatus;
|
|
4226
|
+
integration: Integration;
|
|
4227
|
+
}
|
|
4212
4228
|
/**
|
|
4213
4229
|
* @minLength 1
|
|
4214
4230
|
* @maxLength 30
|
|
@@ -4797,6 +4813,30 @@ export type CustomizationFontDefinition = CustomizationFontDefinitionInput & {
|
|
|
4797
4813
|
* @maxLength 512
|
|
4798
4814
|
*/
|
|
4799
4815
|
export type StorageFileKey = string;
|
|
4816
|
+
export interface ContentImportSource {
|
|
4817
|
+
type: 'website';
|
|
4818
|
+
url: URL;
|
|
4819
|
+
}
|
|
4820
|
+
export interface ChangeRequestPointer {
|
|
4821
|
+
type: 'change-request';
|
|
4822
|
+
/** Unique identifier for the space */
|
|
4823
|
+
space: string;
|
|
4824
|
+
/** Unique identifier for the change request */
|
|
4825
|
+
changeRequest: string;
|
|
4826
|
+
}
|
|
4827
|
+
export type ContentImportTarget = SpacePointer | ChangeRequestPointer;
|
|
4828
|
+
export interface ContentImportRun {
|
|
4829
|
+
/** Unique ID of the import */
|
|
4830
|
+
id: string;
|
|
4831
|
+
/** Date when the import has started */
|
|
4832
|
+
startedAt?: Timestamp;
|
|
4833
|
+
/** Filled when the imported is in status "completed" */
|
|
4834
|
+
completedAt?: Timestamp;
|
|
4835
|
+
/** Status of the import */
|
|
4836
|
+
status: 'pending' | 'in-progress' | 'completed' | 'failed' | 'cancelled';
|
|
4837
|
+
/** Ids of the imported pages */
|
|
4838
|
+
pages?: string[];
|
|
4839
|
+
}
|
|
4800
4840
|
/** A response to a request to preview a paid operation or action. A user might preview an operation before executing it to see which billing steps would be required (if any). This schema defines the response of that preview request. */
|
|
4801
4841
|
export type BillingOperationPreviewResponse = {
|
|
4802
4842
|
/** User can go ahead with the operation without any additional steps. Their subscription will be updated to reflect the new changes. */
|
|
@@ -5020,7 +5060,7 @@ export interface CustomizationHeaderItem {
|
|
|
5020
5060
|
to: ContentRef | null;
|
|
5021
5061
|
links: CustomizationContentLink[];
|
|
5022
5062
|
/** Conditional expression used to evaluate whether the header item should be shown to the site's visitor. */
|
|
5023
|
-
condition?:
|
|
5063
|
+
condition?: Expression;
|
|
5024
5064
|
}
|
|
5025
5065
|
export interface CustomizationFooterGroup {
|
|
5026
5066
|
title: string;
|
|
@@ -5049,8 +5089,7 @@ export declare enum CustomizationThemeMode {
|
|
|
5049
5089
|
export declare enum CustomizationAIMode {
|
|
5050
5090
|
None = "none",
|
|
5051
5091
|
Search = "search",
|
|
5052
|
-
Assistant = "assistant"
|
|
5053
|
-
Integration = "integration"
|
|
5092
|
+
Assistant = "assistant"
|
|
5054
5093
|
}
|
|
5055
5094
|
/**
|
|
5056
5095
|
* How external links should open when clicked.
|
|
@@ -5165,8 +5204,6 @@ export interface SiteCustomizationSettings {
|
|
|
5165
5204
|
};
|
|
5166
5205
|
ai: {
|
|
5167
5206
|
mode: CustomizationAIMode;
|
|
5168
|
-
/** The integration to use for the AI features on the site. Only required if mode is set to "integration". */
|
|
5169
|
-
integrationId?: string;
|
|
5170
5207
|
};
|
|
5171
5208
|
advancedCustomization: {
|
|
5172
5209
|
/** If true, Advanced customization is enabled */
|
|
@@ -5181,6 +5218,8 @@ export interface SiteCustomizationSettings {
|
|
|
5181
5218
|
externalAI: boolean;
|
|
5182
5219
|
/** Whether the copy and open the markdown version of the page should be available in the page menu. */
|
|
5183
5220
|
markdown: boolean;
|
|
5221
|
+
/** Whether an action to connect to the docs using the MCP server should be available in the page menu. */
|
|
5222
|
+
mcp: boolean;
|
|
5184
5223
|
};
|
|
5185
5224
|
externalLinks: {
|
|
5186
5225
|
/**
|
|
@@ -5298,6 +5337,12 @@ export type SitePublishingAuthUpdate = (VisitorAuthCustomBackend | VisitorAuthIn
|
|
|
5298
5337
|
export type SiteSearchScope = {
|
|
5299
5338
|
/** Search across all sections of a site, only including the default content of each section. This scope is wide and shallow. You may optionally specify a list of additional site spaces to search in alongside the default content. */
|
|
5300
5339
|
mode: 'default';
|
|
5340
|
+
/** The ID of the site space that must always be included in the search results. The language of this site space will be used to match other site spaces with the same language, if applicable. */
|
|
5341
|
+
currentSiteSpace?: string;
|
|
5342
|
+
/**
|
|
5343
|
+
* Site spaces to include in search results in addition to default site spaces. This is deprecated and will be removed soon. Please use 'currentSiteSpace' instead.
|
|
5344
|
+
* @deprecated
|
|
5345
|
+
*/
|
|
5301
5346
|
includedSiteSpaces?: string[];
|
|
5302
5347
|
} | {
|
|
5303
5348
|
/** Only search in the provided site spaces. */
|
|
@@ -6723,6 +6768,14 @@ export interface IntegrationEnvironment {
|
|
|
6723
6768
|
installation?: string;
|
|
6724
6769
|
};
|
|
6725
6770
|
}
|
|
6771
|
+
export interface SpaceIntegrationScript {
|
|
6772
|
+
/** Script URL to load. */
|
|
6773
|
+
script: URL;
|
|
6774
|
+
/** Content Security Policy to secure the loading of this script. */
|
|
6775
|
+
contentSecurityPolicy?: string;
|
|
6776
|
+
/** If true, the script will potentially load use cookies and visitors should be aware. */
|
|
6777
|
+
cookies: boolean;
|
|
6778
|
+
}
|
|
6726
6779
|
/** Response expected for an event of type `content_compute_document`. */
|
|
6727
6780
|
export interface ContentComputeDocumentEventResponse {
|
|
6728
6781
|
document: Document;
|
|
@@ -7097,8 +7150,12 @@ export interface AgentTasksChannel {
|
|
|
7097
7150
|
/** The ID of the organization. */
|
|
7098
7151
|
organization: string;
|
|
7099
7152
|
}
|
|
7153
|
+
export interface ImportRunChannel {
|
|
7154
|
+
channel: 'import-run';
|
|
7155
|
+
runId: string;
|
|
7156
|
+
}
|
|
7100
7157
|
/** Channel to subscribe to for realtime updates. */
|
|
7101
|
-
export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | OrganizationOpenAPISpecsChannel | OrganizationTranslationsChannel | OrganizationTranslationsGlossaryChannel | OrganizationCustomFontsChannel | OrganizationChangeRequestsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SiteAdaptiveSchemaChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteMcpServersChannel | SiteMcpServerChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncOperationChannel | OpenAPISpecChannel | SubdomainChannel | TranslationChannel | TranslationRunChannel | AgentTaskChannel | AgentTasksChannel;
|
|
7158
|
+
export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | OrganizationOpenAPISpecsChannel | OrganizationTranslationsChannel | OrganizationTranslationsGlossaryChannel | OrganizationCustomFontsChannel | OrganizationChangeRequestsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SiteAdaptiveSchemaChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteMcpServersChannel | SiteMcpServerChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncOperationChannel | OpenAPISpecChannel | SubdomainChannel | TranslationChannel | TranslationRunChannel | AgentTaskChannel | AgentTasksChannel | ImportRunChannel;
|
|
7102
7159
|
export interface TranslationRunChannelData {
|
|
7103
7160
|
channel: 'translation-run';
|
|
7104
7161
|
data: {
|
|
@@ -7108,6 +7165,10 @@ export interface TranslationRunChannelData {
|
|
|
7108
7165
|
updatedAt: Timestamp;
|
|
7109
7166
|
};
|
|
7110
7167
|
}
|
|
7168
|
+
export interface ImportRunChannelData {
|
|
7169
|
+
channel: 'import-run';
|
|
7170
|
+
data: ContentImportRun;
|
|
7171
|
+
}
|
|
7111
7172
|
export interface GitSyncOperationChannelData {
|
|
7112
7173
|
channel: 'space-gitsync-operation';
|
|
7113
7174
|
data: GitSyncOperation;
|
|
@@ -7146,7 +7207,7 @@ export interface APIChannelMutationData {
|
|
|
7146
7207
|
};
|
|
7147
7208
|
}
|
|
7148
7209
|
/** Data passed through a realtime channel */
|
|
7149
|
-
export type SubscriptionChannelData = GitSyncOperationChannelData | SpaceContentRefsChannelData | ChangeRequestContentRefsChannelData | OrganizationAIIndexationChannelData | TranslationRunChannelData | APIChannelMutationData;
|
|
7210
|
+
export type SubscriptionChannelData = GitSyncOperationChannelData | SpaceContentRefsChannelData | ChangeRequestContentRefsChannelData | OrganizationAIIndexationChannelData | TranslationRunChannelData | ImportRunChannelData | APIChannelMutationData;
|
|
7150
7211
|
export type SiteAdaptiveDeterministicJSONSchemaClaimsProperties = SiteAdaptiveDeterministicJSONSchemaPrimitives | {
|
|
7151
7212
|
type: 'object';
|
|
7152
7213
|
description: string;
|
|
@@ -7227,6 +7288,15 @@ export interface AgentStreamState {
|
|
|
7227
7288
|
state: AgentState;
|
|
7228
7289
|
}
|
|
7229
7290
|
export type AgentStream = AgentStreamMessages | AgentStreamMessageResponse | AgentStreamState;
|
|
7291
|
+
/** Context available when evaluating merge rules expressions. */
|
|
7292
|
+
export interface MergeRulesEvaluationContext {
|
|
7293
|
+
space: Space;
|
|
7294
|
+
changeRequest: ChangeRequest;
|
|
7295
|
+
/** The reviews posted on the change request. */
|
|
7296
|
+
reviews: ChangeRequestReview[];
|
|
7297
|
+
/** The user who is attempting to merge the change request. */
|
|
7298
|
+
actor: User;
|
|
7299
|
+
}
|
|
7230
7300
|
export type RequestSpaceTrackPageView = SpaceTrackPageView;
|
|
7231
7301
|
export type RequestSiteTrackPageView = SiteTrackPageView;
|
|
7232
7302
|
export type RequestPublishIntegration = PublishIntegration;
|
|
@@ -7425,6 +7495,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7425
7495
|
/** Default level for a piece of content */
|
|
7426
7496
|
defaultLevel?: DefaultLevel;
|
|
7427
7497
|
language?: TranslationLanguage;
|
|
7498
|
+
mergeRules?: MergeRulesSpaceConfiguration;
|
|
7428
7499
|
} & ({
|
|
7429
7500
|
/** Unicode codepoint or character of the emoji */
|
|
7430
7501
|
emoji: Emoji;
|
|
@@ -8116,6 +8187,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8116
8187
|
* @default "open"
|
|
8117
8188
|
*/
|
|
8118
8189
|
status?: ChangeRequestStatus;
|
|
8190
|
+
/** If defined, only change requests created by this user will be returned. */
|
|
8191
|
+
creator?: string;
|
|
8119
8192
|
/** If defined, only change requests with contributions from this user will be returned. */
|
|
8120
8193
|
contributor?: string;
|
|
8121
8194
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
@@ -9248,22 +9321,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9248
9321
|
message: string;
|
|
9249
9322
|
};
|
|
9250
9323
|
}>>;
|
|
9251
|
-
/**
|
|
9252
|
-
* No description
|
|
9253
|
-
*
|
|
9254
|
-
* @tags space-integrations
|
|
9255
|
-
* @name ListSpaceIntegrationScripts
|
|
9256
|
-
* @summary List all the scripts to embed in published content for a space
|
|
9257
|
-
* @request GET:/spaces/{spaceId}/integration-scripts
|
|
9258
|
-
* @secure
|
|
9259
|
-
*/
|
|
9260
|
-
listSpaceIntegrationScripts: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<SpaceIntegrationScript[], {
|
|
9261
|
-
error: {
|
|
9262
|
-
/** @format int32 */
|
|
9263
|
-
code: 400;
|
|
9264
|
-
message: string;
|
|
9265
|
-
};
|
|
9266
|
-
}>>;
|
|
9267
9324
|
/**
|
|
9268
9325
|
* No description
|
|
9269
9326
|
*
|
|
@@ -10214,6 +10271,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10214
10271
|
sso?: boolean;
|
|
10215
10272
|
ai?: boolean;
|
|
10216
10273
|
inviteLinks?: boolean;
|
|
10274
|
+
mergeRules?: MergeRulesStandaloneConfiguration;
|
|
10217
10275
|
}, params?: RequestParams) => Promise<HttpResponse<Organization, {
|
|
10218
10276
|
error: {
|
|
10219
10277
|
/** @format int32 */
|
|
@@ -10661,6 +10719,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10661
10719
|
* @default "open"
|
|
10662
10720
|
*/
|
|
10663
10721
|
status?: ChangeRequestStatus;
|
|
10722
|
+
/** If defined, only change requests created by this user will be returned. */
|
|
10723
|
+
creator?: string;
|
|
10664
10724
|
/** If defined, only change requests with contributions from this user will be returned. */
|
|
10665
10725
|
contributor?: string;
|
|
10666
10726
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
@@ -10842,13 +10902,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10842
10902
|
* @max 1000
|
|
10843
10903
|
*/
|
|
10844
10904
|
limit?: number;
|
|
10845
|
-
/**
|
|
10846
|
-
|
|
10905
|
+
/**
|
|
10906
|
+
* Filter installations by their target (organization, space, or site). When not provided, defaults to organization-level installations for backwards compatibility
|
|
10907
|
+
* @default "organization"
|
|
10908
|
+
*/
|
|
10909
|
+
target?: "organization" | "space" | "site";
|
|
10847
10910
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
10848
|
-
items:
|
|
10849
|
-
status: IntegrationInstallationStatus;
|
|
10850
|
-
integration: Integration;
|
|
10851
|
-
}[];
|
|
10911
|
+
items: InstalledIntegration[];
|
|
10852
10912
|
}, any>>;
|
|
10853
10913
|
/**
|
|
10854
10914
|
* @description Lists SAML providers configured for the specified organization.
|
|
@@ -12282,7 +12342,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12282
12342
|
/** ID of the site-space to be used as the default in this section. */
|
|
12283
12343
|
defaultSiteSpace?: string;
|
|
12284
12344
|
/** Conditional expression used to evaluate whether the site section should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
|
|
12285
|
-
condition?:
|
|
12345
|
+
condition?: Expression | null;
|
|
12286
12346
|
icon?: Icon | null;
|
|
12287
12347
|
description?: SiteSectionDescription | null;
|
|
12288
12348
|
}, params?: RequestParams) => Promise<HttpResponse<SiteSection, any>>;
|
|
@@ -12396,7 +12456,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12396
12456
|
/** Path to the space on the site */
|
|
12397
12457
|
path?: SiteSpacePath;
|
|
12398
12458
|
/** Conditional expression used to evaluate whether the site space should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
|
|
12399
|
-
condition?:
|
|
12459
|
+
condition?: Expression | null;
|
|
12400
12460
|
/** The content that this site space points to. If not set, the space will remain unchanged. */
|
|
12401
12461
|
spaceId?: string;
|
|
12402
12462
|
}, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
|
|
@@ -12911,6 +12971,33 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12911
12971
|
*/
|
|
12912
12972
|
deleteSiteMcpServerById: (organizationId: string, siteId: string, siteMcpServerId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
12913
12973
|
};
|
|
12974
|
+
org: {
|
|
12975
|
+
/**
|
|
12976
|
+
* No description
|
|
12977
|
+
*
|
|
12978
|
+
* @tags imports
|
|
12979
|
+
* @name StartImportRun
|
|
12980
|
+
* @summary Import content into a space from a website
|
|
12981
|
+
* @request POST:/org/{organizationId}/imports
|
|
12982
|
+
* @secure
|
|
12983
|
+
*/
|
|
12984
|
+
startImportRun: (organizationId: string, data: {
|
|
12985
|
+
source: ContentImportSource;
|
|
12986
|
+
target: ContentImportTarget;
|
|
12987
|
+
}, params?: RequestParams) => Promise<HttpResponse<ContentImportRun, {
|
|
12988
|
+
error: {
|
|
12989
|
+
/** @format int32 */
|
|
12990
|
+
code: 400;
|
|
12991
|
+
message: string;
|
|
12992
|
+
};
|
|
12993
|
+
} | {
|
|
12994
|
+
error: {
|
|
12995
|
+
/** @format int32 */
|
|
12996
|
+
code: 404;
|
|
12997
|
+
message: string;
|
|
12998
|
+
};
|
|
12999
|
+
}>>;
|
|
13000
|
+
};
|
|
12914
13001
|
subdomains: {
|
|
12915
13002
|
/**
|
|
12916
13003
|
* No description
|
package/dist/index.cjs
CHANGED
|
@@ -282,7 +282,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
282
282
|
|
|
283
283
|
// package.json
|
|
284
284
|
var name = "@gitbook/api";
|
|
285
|
-
var version = "0.
|
|
285
|
+
var version = "0.141.0";
|
|
286
286
|
|
|
287
287
|
// src/client.ts
|
|
288
288
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -611,15 +611,11 @@ var IntegrationVisibility = /* @__PURE__ */ ((IntegrationVisibility2) => {
|
|
|
611
611
|
return IntegrationVisibility2;
|
|
612
612
|
})(IntegrationVisibility || {});
|
|
613
613
|
var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
614
|
-
IntegrationScope2["SpaceViewsRead"] = "space:views:read";
|
|
615
614
|
IntegrationScope2["SpaceContentRead"] = "space:content:read";
|
|
616
615
|
IntegrationScope2["SpaceContentWrite"] = "space:content:write";
|
|
617
616
|
IntegrationScope2["SpaceMetadataRead"] = "space:metadata:read";
|
|
618
617
|
IntegrationScope2["SpaceMetadataWrite"] = "space:metadata:write";
|
|
619
|
-
IntegrationScope2["SpaceScriptInject"] = "space:script:inject";
|
|
620
|
-
IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
|
|
621
618
|
IntegrationScope2["SpaceGitSync"] = "space:git:sync";
|
|
622
|
-
IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
|
|
623
619
|
IntegrationScope2["SiteMetadataRead"] = "site:metadata:read";
|
|
624
620
|
IntegrationScope2["SiteViewsRead"] = "site:views:read";
|
|
625
621
|
IntegrationScope2["SiteScriptInject"] = "site:script:inject";
|
|
@@ -627,7 +623,6 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
627
623
|
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
628
624
|
IntegrationScope2["SiteAdaptiveRead"] = "site:adaptive:read";
|
|
629
625
|
IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
|
|
630
|
-
IntegrationScope2["SiteAiAsk"] = "site:ai:ask";
|
|
631
626
|
IntegrationScope2["OpenapiRead"] = "openapi:read";
|
|
632
627
|
IntegrationScope2["OpenapiWrite"] = "openapi:write";
|
|
633
628
|
IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
|
|
@@ -901,7 +896,6 @@ var CustomizationAIMode = /* @__PURE__ */ ((CustomizationAIMode2) => {
|
|
|
901
896
|
CustomizationAIMode2["None"] = "none";
|
|
902
897
|
CustomizationAIMode2["Search"] = "search";
|
|
903
898
|
CustomizationAIMode2["Assistant"] = "assistant";
|
|
904
|
-
CustomizationAIMode2["Integration"] = "integration";
|
|
905
899
|
return CustomizationAIMode2;
|
|
906
900
|
})(CustomizationAIMode || {});
|
|
907
901
|
var SiteExternalLinksTarget = /* @__PURE__ */ ((SiteExternalLinksTarget2) => {
|
|
@@ -2153,13 +2147,6 @@ var Api = class extends HttpClient {
|
|
|
2153
2147
|
format: "json",
|
|
2154
2148
|
...params
|
|
2155
2149
|
}),
|
|
2156
|
-
listSpaceIntegrationScripts: (spaceId, params = {}) => this.request({
|
|
2157
|
-
path: `/spaces/${spaceId}/integration-scripts`,
|
|
2158
|
-
method: "GET",
|
|
2159
|
-
secure: true,
|
|
2160
|
-
format: "json",
|
|
2161
|
-
...params
|
|
2162
|
-
}),
|
|
2163
2150
|
getSpacePdf: (spaceId, query, params = {}) => this.request({
|
|
2164
2151
|
path: `/spaces/${spaceId}/pdf`,
|
|
2165
2152
|
method: "GET",
|
|
@@ -3669,6 +3656,17 @@ var Api = class extends HttpClient {
|
|
|
3669
3656
|
...params
|
|
3670
3657
|
})
|
|
3671
3658
|
};
|
|
3659
|
+
org = {
|
|
3660
|
+
startImportRun: (organizationId, data, params = {}) => this.request({
|
|
3661
|
+
path: `/org/${organizationId}/imports`,
|
|
3662
|
+
method: "POST",
|
|
3663
|
+
body: data,
|
|
3664
|
+
secure: true,
|
|
3665
|
+
type: "application/json" /* Json */,
|
|
3666
|
+
format: "json",
|
|
3667
|
+
...params
|
|
3668
|
+
})
|
|
3669
|
+
};
|
|
3672
3670
|
subdomains = {
|
|
3673
3671
|
getSubdomain: (subdomain, params = {}) => this.request({
|
|
3674
3672
|
path: `/subdomains/${subdomain}`,
|
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.141.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -501,15 +501,11 @@ var IntegrationVisibility = /* @__PURE__ */ ((IntegrationVisibility2) => {
|
|
|
501
501
|
return IntegrationVisibility2;
|
|
502
502
|
})(IntegrationVisibility || {});
|
|
503
503
|
var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
504
|
-
IntegrationScope2["SpaceViewsRead"] = "space:views:read";
|
|
505
504
|
IntegrationScope2["SpaceContentRead"] = "space:content:read";
|
|
506
505
|
IntegrationScope2["SpaceContentWrite"] = "space:content:write";
|
|
507
506
|
IntegrationScope2["SpaceMetadataRead"] = "space:metadata:read";
|
|
508
507
|
IntegrationScope2["SpaceMetadataWrite"] = "space:metadata:write";
|
|
509
|
-
IntegrationScope2["SpaceScriptInject"] = "space:script:inject";
|
|
510
|
-
IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
|
|
511
508
|
IntegrationScope2["SpaceGitSync"] = "space:git:sync";
|
|
512
|
-
IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
|
|
513
509
|
IntegrationScope2["SiteMetadataRead"] = "site:metadata:read";
|
|
514
510
|
IntegrationScope2["SiteViewsRead"] = "site:views:read";
|
|
515
511
|
IntegrationScope2["SiteScriptInject"] = "site:script:inject";
|
|
@@ -517,7 +513,6 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
517
513
|
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
518
514
|
IntegrationScope2["SiteAdaptiveRead"] = "site:adaptive:read";
|
|
519
515
|
IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
|
|
520
|
-
IntegrationScope2["SiteAiAsk"] = "site:ai:ask";
|
|
521
516
|
IntegrationScope2["OpenapiRead"] = "openapi:read";
|
|
522
517
|
IntegrationScope2["OpenapiWrite"] = "openapi:write";
|
|
523
518
|
IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
|
|
@@ -791,7 +786,6 @@ var CustomizationAIMode = /* @__PURE__ */ ((CustomizationAIMode2) => {
|
|
|
791
786
|
CustomizationAIMode2["None"] = "none";
|
|
792
787
|
CustomizationAIMode2["Search"] = "search";
|
|
793
788
|
CustomizationAIMode2["Assistant"] = "assistant";
|
|
794
|
-
CustomizationAIMode2["Integration"] = "integration";
|
|
795
789
|
return CustomizationAIMode2;
|
|
796
790
|
})(CustomizationAIMode || {});
|
|
797
791
|
var SiteExternalLinksTarget = /* @__PURE__ */ ((SiteExternalLinksTarget2) => {
|
|
@@ -2043,13 +2037,6 @@ var Api = class extends HttpClient {
|
|
|
2043
2037
|
format: "json",
|
|
2044
2038
|
...params
|
|
2045
2039
|
}),
|
|
2046
|
-
listSpaceIntegrationScripts: (spaceId, params = {}) => this.request({
|
|
2047
|
-
path: `/spaces/${spaceId}/integration-scripts`,
|
|
2048
|
-
method: "GET",
|
|
2049
|
-
secure: true,
|
|
2050
|
-
format: "json",
|
|
2051
|
-
...params
|
|
2052
|
-
}),
|
|
2053
2040
|
getSpacePdf: (spaceId, query, params = {}) => this.request({
|
|
2054
2041
|
path: `/spaces/${spaceId}/pdf`,
|
|
2055
2042
|
method: "GET",
|
|
@@ -3559,6 +3546,17 @@ var Api = class extends HttpClient {
|
|
|
3559
3546
|
...params
|
|
3560
3547
|
})
|
|
3561
3548
|
};
|
|
3549
|
+
org = {
|
|
3550
|
+
startImportRun: (organizationId, data, params = {}) => this.request({
|
|
3551
|
+
path: `/org/${organizationId}/imports`,
|
|
3552
|
+
method: "POST",
|
|
3553
|
+
body: data,
|
|
3554
|
+
secure: true,
|
|
3555
|
+
type: "application/json" /* Json */,
|
|
3556
|
+
format: "json",
|
|
3557
|
+
...params
|
|
3558
|
+
})
|
|
3559
|
+
};
|
|
3562
3560
|
subdomains = {
|
|
3563
3561
|
getSubdomain: (subdomain, params = {}) => this.request({
|
|
3564
3562
|
path: `/subdomains/${subdomain}`,
|