@gitbook/api 0.139.0 → 0.140.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 +162 -77
- package/dist/index.cjs +12 -14
- package/dist/index.js +12 -14
- package/package.json +1 -1
- package/spec/openapi.json +545 -186
- package/spec/openapi.yaml +365 -122
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
|
+
error?: 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 */
|
|
@@ -5298,6 +5335,12 @@ export type SitePublishingAuthUpdate = (VisitorAuthCustomBackend | VisitorAuthIn
|
|
|
5298
5335
|
export type SiteSearchScope = {
|
|
5299
5336
|
/** 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
5337
|
mode: 'default';
|
|
5338
|
+
/** 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. */
|
|
5339
|
+
currentSiteSpace?: string;
|
|
5340
|
+
/**
|
|
5341
|
+
* 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.
|
|
5342
|
+
* @deprecated
|
|
5343
|
+
*/
|
|
5301
5344
|
includedSiteSpaces?: string[];
|
|
5302
5345
|
} | {
|
|
5303
5346
|
/** Only search in the provided site spaces. */
|
|
@@ -6723,6 +6766,14 @@ export interface IntegrationEnvironment {
|
|
|
6723
6766
|
installation?: string;
|
|
6724
6767
|
};
|
|
6725
6768
|
}
|
|
6769
|
+
export interface SpaceIntegrationScript {
|
|
6770
|
+
/** Script URL to load. */
|
|
6771
|
+
script: URL;
|
|
6772
|
+
/** Content Security Policy to secure the loading of this script. */
|
|
6773
|
+
contentSecurityPolicy?: string;
|
|
6774
|
+
/** If true, the script will potentially load use cookies and visitors should be aware. */
|
|
6775
|
+
cookies: boolean;
|
|
6776
|
+
}
|
|
6726
6777
|
/** Response expected for an event of type `content_compute_document`. */
|
|
6727
6778
|
export interface ContentComputeDocumentEventResponse {
|
|
6728
6779
|
document: Document;
|
|
@@ -7097,8 +7148,12 @@ export interface AgentTasksChannel {
|
|
|
7097
7148
|
/** The ID of the organization. */
|
|
7098
7149
|
organization: string;
|
|
7099
7150
|
}
|
|
7151
|
+
export interface ImportRunChannel {
|
|
7152
|
+
channel: 'import-run';
|
|
7153
|
+
runId: string;
|
|
7154
|
+
}
|
|
7100
7155
|
/** 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;
|
|
7156
|
+
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
7157
|
export interface TranslationRunChannelData {
|
|
7103
7158
|
channel: 'translation-run';
|
|
7104
7159
|
data: {
|
|
@@ -7108,6 +7163,10 @@ export interface TranslationRunChannelData {
|
|
|
7108
7163
|
updatedAt: Timestamp;
|
|
7109
7164
|
};
|
|
7110
7165
|
}
|
|
7166
|
+
export interface ImportRunChannelData {
|
|
7167
|
+
channel: 'import-run';
|
|
7168
|
+
data: ContentImportRun;
|
|
7169
|
+
}
|
|
7111
7170
|
export interface GitSyncOperationChannelData {
|
|
7112
7171
|
channel: 'space-gitsync-operation';
|
|
7113
7172
|
data: GitSyncOperation;
|
|
@@ -7146,7 +7205,7 @@ export interface APIChannelMutationData {
|
|
|
7146
7205
|
};
|
|
7147
7206
|
}
|
|
7148
7207
|
/** Data passed through a realtime channel */
|
|
7149
|
-
export type SubscriptionChannelData = GitSyncOperationChannelData | SpaceContentRefsChannelData | ChangeRequestContentRefsChannelData | OrganizationAIIndexationChannelData | TranslationRunChannelData | APIChannelMutationData;
|
|
7208
|
+
export type SubscriptionChannelData = GitSyncOperationChannelData | SpaceContentRefsChannelData | ChangeRequestContentRefsChannelData | OrganizationAIIndexationChannelData | TranslationRunChannelData | ImportRunChannelData | APIChannelMutationData;
|
|
7150
7209
|
export type SiteAdaptiveDeterministicJSONSchemaClaimsProperties = SiteAdaptiveDeterministicJSONSchemaPrimitives | {
|
|
7151
7210
|
type: 'object';
|
|
7152
7211
|
description: string;
|
|
@@ -7227,6 +7286,15 @@ export interface AgentStreamState {
|
|
|
7227
7286
|
state: AgentState;
|
|
7228
7287
|
}
|
|
7229
7288
|
export type AgentStream = AgentStreamMessages | AgentStreamMessageResponse | AgentStreamState;
|
|
7289
|
+
/** Context available when evaluating merge rules expressions. */
|
|
7290
|
+
export interface MergeRulesEvaluationContext {
|
|
7291
|
+
space: Space;
|
|
7292
|
+
changeRequest: ChangeRequest;
|
|
7293
|
+
/** The reviews posted on the change request. */
|
|
7294
|
+
reviews: ChangeRequestReview[];
|
|
7295
|
+
/** The user who is attempting to merge the change request. */
|
|
7296
|
+
actor: User;
|
|
7297
|
+
}
|
|
7230
7298
|
export type RequestSpaceTrackPageView = SpaceTrackPageView;
|
|
7231
7299
|
export type RequestSiteTrackPageView = SiteTrackPageView;
|
|
7232
7300
|
export type RequestPublishIntegration = PublishIntegration;
|
|
@@ -7425,6 +7493,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7425
7493
|
/** Default level for a piece of content */
|
|
7426
7494
|
defaultLevel?: DefaultLevel;
|
|
7427
7495
|
language?: TranslationLanguage;
|
|
7496
|
+
mergeRules?: MergeRulesSpaceConfiguration;
|
|
7428
7497
|
} & ({
|
|
7429
7498
|
/** Unicode codepoint or character of the emoji */
|
|
7430
7499
|
emoji: Emoji;
|
|
@@ -8116,6 +8185,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8116
8185
|
* @default "open"
|
|
8117
8186
|
*/
|
|
8118
8187
|
status?: ChangeRequestStatus;
|
|
8188
|
+
/** If defined, only change requests created by this user will be returned. */
|
|
8189
|
+
creator?: string;
|
|
8119
8190
|
/** If defined, only change requests with contributions from this user will be returned. */
|
|
8120
8191
|
contributor?: string;
|
|
8121
8192
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
@@ -9248,22 +9319,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9248
9319
|
message: string;
|
|
9249
9320
|
};
|
|
9250
9321
|
}>>;
|
|
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
9322
|
/**
|
|
9268
9323
|
* No description
|
|
9269
9324
|
*
|
|
@@ -10214,6 +10269,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10214
10269
|
sso?: boolean;
|
|
10215
10270
|
ai?: boolean;
|
|
10216
10271
|
inviteLinks?: boolean;
|
|
10272
|
+
mergeRules?: MergeRulesStandaloneConfiguration;
|
|
10217
10273
|
}, params?: RequestParams) => Promise<HttpResponse<Organization, {
|
|
10218
10274
|
error: {
|
|
10219
10275
|
/** @format int32 */
|
|
@@ -10661,6 +10717,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10661
10717
|
* @default "open"
|
|
10662
10718
|
*/
|
|
10663
10719
|
status?: ChangeRequestStatus;
|
|
10720
|
+
/** If defined, only change requests created by this user will be returned. */
|
|
10721
|
+
creator?: string;
|
|
10664
10722
|
/** If defined, only change requests with contributions from this user will be returned. */
|
|
10665
10723
|
contributor?: string;
|
|
10666
10724
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
@@ -10842,13 +10900,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10842
10900
|
* @max 1000
|
|
10843
10901
|
*/
|
|
10844
10902
|
limit?: number;
|
|
10845
|
-
/**
|
|
10846
|
-
|
|
10903
|
+
/**
|
|
10904
|
+
* Filter installations by their target (organization, space, or site). When not provided, defaults to organization-level installations for backwards compatibility
|
|
10905
|
+
* @default "organization"
|
|
10906
|
+
*/
|
|
10907
|
+
target?: "organization" | "space" | "site";
|
|
10847
10908
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
10848
|
-
items:
|
|
10849
|
-
status: IntegrationInstallationStatus;
|
|
10850
|
-
integration: Integration;
|
|
10851
|
-
}[];
|
|
10909
|
+
items: InstalledIntegration[];
|
|
10852
10910
|
}, any>>;
|
|
10853
10911
|
/**
|
|
10854
10912
|
* @description Lists SAML providers configured for the specified organization.
|
|
@@ -12282,7 +12340,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12282
12340
|
/** ID of the site-space to be used as the default in this section. */
|
|
12283
12341
|
defaultSiteSpace?: string;
|
|
12284
12342
|
/** 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?:
|
|
12343
|
+
condition?: Expression | null;
|
|
12286
12344
|
icon?: Icon | null;
|
|
12287
12345
|
description?: SiteSectionDescription | null;
|
|
12288
12346
|
}, params?: RequestParams) => Promise<HttpResponse<SiteSection, any>>;
|
|
@@ -12396,7 +12454,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12396
12454
|
/** Path to the space on the site */
|
|
12397
12455
|
path?: SiteSpacePath;
|
|
12398
12456
|
/** 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?:
|
|
12457
|
+
condition?: Expression | null;
|
|
12400
12458
|
/** The content that this site space points to. If not set, the space will remain unchanged. */
|
|
12401
12459
|
spaceId?: string;
|
|
12402
12460
|
}, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
|
|
@@ -12911,6 +12969,33 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12911
12969
|
*/
|
|
12912
12970
|
deleteSiteMcpServerById: (organizationId: string, siteId: string, siteMcpServerId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
12913
12971
|
};
|
|
12972
|
+
org: {
|
|
12973
|
+
/**
|
|
12974
|
+
* No description
|
|
12975
|
+
*
|
|
12976
|
+
* @tags imports
|
|
12977
|
+
* @name StartImportRun
|
|
12978
|
+
* @summary Import content into a space from a website
|
|
12979
|
+
* @request POST:/org/{organizationId}/imports
|
|
12980
|
+
* @secure
|
|
12981
|
+
*/
|
|
12982
|
+
startImportRun: (organizationId: string, data: {
|
|
12983
|
+
source: ContentImportSource;
|
|
12984
|
+
target: ContentImportTarget;
|
|
12985
|
+
}, params?: RequestParams) => Promise<HttpResponse<ContentImportRun, {
|
|
12986
|
+
error: {
|
|
12987
|
+
/** @format int32 */
|
|
12988
|
+
code: 400;
|
|
12989
|
+
message: string;
|
|
12990
|
+
};
|
|
12991
|
+
} | {
|
|
12992
|
+
error: {
|
|
12993
|
+
/** @format int32 */
|
|
12994
|
+
code: 404;
|
|
12995
|
+
message: string;
|
|
12996
|
+
};
|
|
12997
|
+
}>>;
|
|
12998
|
+
};
|
|
12914
12999
|
subdomains: {
|
|
12915
13000
|
/**
|
|
12916
13001
|
* 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.140.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.140.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}`,
|