@gitbook/api 0.81.0 → 0.83.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 +207 -0
- package/dist/index.cjs +65 -1
- package/dist/index.js +59 -1
- package/package.json +1 -1
- package/spec/openapi.json +551 -2
- package/spec/openapi.yaml +366 -0
package/dist/client.d.ts
CHANGED
|
@@ -2175,6 +2175,25 @@ export interface UserContributor {
|
|
|
2175
2175
|
count: number;
|
|
2176
2176
|
user: User;
|
|
2177
2177
|
}
|
|
2178
|
+
/**
|
|
2179
|
+
* The status of the session.
|
|
2180
|
+
* - pending: The session is pending for input from the user.
|
|
2181
|
+
* - running: The session is being processed by GitBook.
|
|
2182
|
+
* - failed: The session processing has failed.
|
|
2183
|
+
*/
|
|
2184
|
+
export declare enum ChangeRequestBrainstormStatus {
|
|
2185
|
+
Pending = "pending",
|
|
2186
|
+
Failed = "failed",
|
|
2187
|
+
Running = "running"
|
|
2188
|
+
}
|
|
2189
|
+
export declare enum ChangeRequestBrainstormActor {
|
|
2190
|
+
User = "user",
|
|
2191
|
+
Agent = "agent"
|
|
2192
|
+
}
|
|
2193
|
+
export interface ChangeRequestBrainstormContext {
|
|
2194
|
+
/** Path of the page the user is currently viewing. */
|
|
2195
|
+
page: string;
|
|
2196
|
+
}
|
|
2178
2197
|
export declare enum RevisionPageType {
|
|
2179
2198
|
Document = "document",
|
|
2180
2199
|
Group = "group",
|
|
@@ -2187,6 +2206,111 @@ export interface ChangedRevisionPage {
|
|
|
2187
2206
|
title: string;
|
|
2188
2207
|
path?: string;
|
|
2189
2208
|
}
|
|
2209
|
+
export type ChangeRequestBrainstormLog = {
|
|
2210
|
+
tool: 'get-page';
|
|
2211
|
+
intent: string;
|
|
2212
|
+
page: ChangedRevisionPage;
|
|
2213
|
+
} | {
|
|
2214
|
+
tool: 'search-keyword';
|
|
2215
|
+
intent: string;
|
|
2216
|
+
query: string;
|
|
2217
|
+
} | {
|
|
2218
|
+
tool: 'search-semantic';
|
|
2219
|
+
intent: string;
|
|
2220
|
+
query: string;
|
|
2221
|
+
} | {
|
|
2222
|
+
tool: 'create-page';
|
|
2223
|
+
page: ChangedRevisionPage;
|
|
2224
|
+
} | {
|
|
2225
|
+
tool: 'delete-page';
|
|
2226
|
+
page: ChangedRevisionPage;
|
|
2227
|
+
} | {
|
|
2228
|
+
tool: 'edit-page';
|
|
2229
|
+
page: ChangedRevisionPage;
|
|
2230
|
+
};
|
|
2231
|
+
/**
|
|
2232
|
+
* The status of the plan.
|
|
2233
|
+
* - pending: The task is pending for input from the user.
|
|
2234
|
+
* - running: The task is being processed by GitBook.
|
|
2235
|
+
* - failed: The task processing has failed.
|
|
2236
|
+
* - completed: The task has been completed.
|
|
2237
|
+
*/
|
|
2238
|
+
export declare enum ChangeRequestBrainstormPlanStatus {
|
|
2239
|
+
Pending = "pending",
|
|
2240
|
+
Failed = "failed",
|
|
2241
|
+
Running = "running",
|
|
2242
|
+
Completed = "completed"
|
|
2243
|
+
}
|
|
2244
|
+
/**
|
|
2245
|
+
* @minLength 1
|
|
2246
|
+
* @maxLength 100
|
|
2247
|
+
*/
|
|
2248
|
+
export type ChangeRequestBrainstormPlanStepTitle = string;
|
|
2249
|
+
export declare enum ChangeRequestBrainstormPlanStepStatus {
|
|
2250
|
+
Pending = "pending",
|
|
2251
|
+
Succeeded = "succeeded",
|
|
2252
|
+
Failed = "failed",
|
|
2253
|
+
Running = "running"
|
|
2254
|
+
}
|
|
2255
|
+
export interface ChangeRequestBrainstormPlanStep {
|
|
2256
|
+
title: ChangeRequestBrainstormPlanStepTitle;
|
|
2257
|
+
status: ChangeRequestBrainstormPlanStepStatus;
|
|
2258
|
+
instruction: JSONDocument;
|
|
2259
|
+
/** Logs related to the implementation phase of the step. */
|
|
2260
|
+
implementation?: {
|
|
2261
|
+
/** A summary of the execution phase. */
|
|
2262
|
+
summary?: JSONDocument;
|
|
2263
|
+
/** Logs related to the execution phase of the step. */
|
|
2264
|
+
logs: ChangeRequestBrainstormLog[];
|
|
2265
|
+
};
|
|
2266
|
+
}
|
|
2267
|
+
export interface ChangeRequestBrainstormPlan {
|
|
2268
|
+
/**
|
|
2269
|
+
* The status of the plan.
|
|
2270
|
+
* - pending: The task is pending for input from the user.
|
|
2271
|
+
* - running: The task is being processed by GitBook.
|
|
2272
|
+
* - failed: The task processing has failed.
|
|
2273
|
+
* - completed: The task has been completed.
|
|
2274
|
+
*/
|
|
2275
|
+
status: ChangeRequestBrainstormPlanStatus;
|
|
2276
|
+
/** The title of the plan. */
|
|
2277
|
+
title: string;
|
|
2278
|
+
/** The steps of the plan to execute the plan. */
|
|
2279
|
+
steps: ChangeRequestBrainstormPlanStep[];
|
|
2280
|
+
context?: ChangeRequestBrainstormContext;
|
|
2281
|
+
}
|
|
2282
|
+
export interface ChangeRequestBrainstormAttachmentPlan {
|
|
2283
|
+
type: 'plan';
|
|
2284
|
+
plan: ChangeRequestBrainstormPlan;
|
|
2285
|
+
}
|
|
2286
|
+
export interface ChangeRequestBrainstormAttachmentMessage {
|
|
2287
|
+
type: 'message';
|
|
2288
|
+
suggestions: string[];
|
|
2289
|
+
}
|
|
2290
|
+
export type ChangeRequestBrainstormAttachment = ChangeRequestBrainstormAttachmentPlan | ChangeRequestBrainstormAttachmentMessage;
|
|
2291
|
+
export interface ChangeRequestBrainstormMessage {
|
|
2292
|
+
/** The unique identifier of the chat message. */
|
|
2293
|
+
id: string;
|
|
2294
|
+
actor: ChangeRequestBrainstormActor;
|
|
2295
|
+
message: JSONDocument;
|
|
2296
|
+
context?: ChangeRequestBrainstormContext;
|
|
2297
|
+
/** Logs related to the processing of the message. */
|
|
2298
|
+
logs?: ChangeRequestBrainstormLog[];
|
|
2299
|
+
attachment?: ChangeRequestBrainstormAttachment;
|
|
2300
|
+
}
|
|
2301
|
+
export interface ChangeRequestBrainstormSession {
|
|
2302
|
+
/** The unique identifier of the session. */
|
|
2303
|
+
id: string;
|
|
2304
|
+
/**
|
|
2305
|
+
* The status of the session.
|
|
2306
|
+
* - pending: The session is pending for input from the user.
|
|
2307
|
+
* - running: The session is being processed by GitBook.
|
|
2308
|
+
* - failed: The session processing has failed.
|
|
2309
|
+
*/
|
|
2310
|
+
status: ChangeRequestBrainstormStatus;
|
|
2311
|
+
/** Conversation messages related to the brainstorming phase of the task. */
|
|
2312
|
+
messages: ChangeRequestBrainstormMessage[];
|
|
2313
|
+
}
|
|
2190
2314
|
export interface RevisionSemanticChangePageCreated {
|
|
2191
2315
|
type: 'page_created';
|
|
2192
2316
|
page: ChangedRevisionPage;
|
|
@@ -2383,6 +2507,10 @@ export declare enum CustomizationFont {
|
|
|
2383
2507
|
Poppins = "Poppins",
|
|
2384
2508
|
FiraSans = "FiraSans"
|
|
2385
2509
|
}
|
|
2510
|
+
/**
|
|
2511
|
+
* The background style has been deprecated and will be removed in a future release. Use the `tint` settings instead.
|
|
2512
|
+
* @deprecated
|
|
2513
|
+
*/
|
|
2386
2514
|
export declare enum CustomizationBackground {
|
|
2387
2515
|
Plain = "plain",
|
|
2388
2516
|
Match = "match"
|
|
@@ -2438,6 +2566,7 @@ export interface CustomizationSettings {
|
|
|
2438
2566
|
primaryColor: CustomizationThemedColor;
|
|
2439
2567
|
corners: CustomizationCorners;
|
|
2440
2568
|
font: CustomizationFont;
|
|
2569
|
+
/** The background style has been deprecated and will be removed in a future release. Use the `tint` settings instead. */
|
|
2441
2570
|
background?: CustomizationBackground;
|
|
2442
2571
|
};
|
|
2443
2572
|
internationalization: {
|
|
@@ -4104,6 +4233,24 @@ export declare enum CustomizationIconsStyle {
|
|
|
4104
4233
|
Light = "light",
|
|
4105
4234
|
Thin = "thin"
|
|
4106
4235
|
}
|
|
4236
|
+
/**
|
|
4237
|
+
* - `default`: No background, content sits directly against sidebar edge.
|
|
4238
|
+
* - `filled`: Muted background color that extends to sidebar edges.
|
|
4239
|
+
*/
|
|
4240
|
+
export declare enum CustomizationSidebarBackgroundStyle {
|
|
4241
|
+
Default = "default",
|
|
4242
|
+
Filled = "filled"
|
|
4243
|
+
}
|
|
4244
|
+
/**
|
|
4245
|
+
* - `default`: Simple list items without special styling, groups are inset with a line.
|
|
4246
|
+
* - `pill`: Rounded capsule shape around selected/active items.
|
|
4247
|
+
* - `line`: Continuous line next to all items, with coloured line part for selected/active items.
|
|
4248
|
+
*/
|
|
4249
|
+
export declare enum CustomizationSidebarListStyle {
|
|
4250
|
+
Default = "default",
|
|
4251
|
+
Pill = "pill",
|
|
4252
|
+
Line = "line"
|
|
4253
|
+
}
|
|
4107
4254
|
export interface SiteCustomizationSettings {
|
|
4108
4255
|
/** Title to use for the published site. If not defined, it'll fallback to the default content title. */
|
|
4109
4256
|
title?: SiteTitle;
|
|
@@ -4112,8 +4259,25 @@ export interface SiteCustomizationSettings {
|
|
|
4112
4259
|
tint?: CustomizationTint;
|
|
4113
4260
|
corners: CustomizationCorners;
|
|
4114
4261
|
font: CustomizationFont;
|
|
4262
|
+
/**
|
|
4263
|
+
* The background style has been deprecated and will be removed in a future release. Use the `tint` settings instead.
|
|
4264
|
+
* @deprecated
|
|
4265
|
+
*/
|
|
4115
4266
|
background: CustomizationBackground;
|
|
4116
4267
|
icons: CustomizationIconsStyle;
|
|
4268
|
+
sidebar: {
|
|
4269
|
+
/**
|
|
4270
|
+
* - `default`: No background, content sits directly against sidebar edge.
|
|
4271
|
+
* - `filled`: Muted background color that extends to sidebar edges.
|
|
4272
|
+
*/
|
|
4273
|
+
background: CustomizationSidebarBackgroundStyle;
|
|
4274
|
+
/**
|
|
4275
|
+
* - `default`: Simple list items without special styling, groups are inset with a line.
|
|
4276
|
+
* - `pill`: Rounded capsule shape around selected/active items.
|
|
4277
|
+
* - `line`: Continuous line next to all items, with coloured line part for selected/active items.
|
|
4278
|
+
*/
|
|
4279
|
+
list: CustomizationSidebarListStyle;
|
|
4280
|
+
};
|
|
4117
4281
|
};
|
|
4118
4282
|
internationalization: {
|
|
4119
4283
|
/** Language for the UI element */
|
|
@@ -6731,6 +6895,32 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6731
6895
|
/** Temporary URL to print the content. The URL will work for 1h. */
|
|
6732
6896
|
url: URL;
|
|
6733
6897
|
}, Error>>;
|
|
6898
|
+
/**
|
|
6899
|
+
* No description
|
|
6900
|
+
*
|
|
6901
|
+
* @tags spaces
|
|
6902
|
+
* @name StreamBrainstormChangeRequest
|
|
6903
|
+
* @summary Brainstorm with AI on a change request and stream the results as a Server-Sent Events.
|
|
6904
|
+
* @request POST:/spaces/{spaceId}/change-requests/{changeRequestId}/task/brainstorm
|
|
6905
|
+
* @secure
|
|
6906
|
+
*/
|
|
6907
|
+
streamBrainstormChangeRequest: (spaceId: string, changeRequestId: string, data: {
|
|
6908
|
+
/** Brainstorming session */
|
|
6909
|
+
session: ChangeRequestBrainstormSession;
|
|
6910
|
+
}, params?: RequestParams) => EventIterator<ChangeRequestBrainstormSession>;
|
|
6911
|
+
/**
|
|
6912
|
+
* No description
|
|
6913
|
+
*
|
|
6914
|
+
* @tags spaces
|
|
6915
|
+
* @name StreamImplementChangeRequestTask
|
|
6916
|
+
* @summary Implement a task on a change request and stream the results as a Server-Sent Events.
|
|
6917
|
+
* @request POST:/spaces/{spaceId}/change-requests/{changeRequestId}/task/implement
|
|
6918
|
+
* @secure
|
|
6919
|
+
*/
|
|
6920
|
+
streamImplementChangeRequestTask: (spaceId: string, changeRequestId: string, data: {
|
|
6921
|
+
/** Plan to run. */
|
|
6922
|
+
plan: ChangeRequestBrainstormPlan;
|
|
6923
|
+
}, params?: RequestParams) => EventIterator<ChangeRequestBrainstormPlan>;
|
|
6734
6924
|
/**
|
|
6735
6925
|
* No description
|
|
6736
6926
|
*
|
|
@@ -8131,6 +8321,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8131
8321
|
* @max 1000
|
|
8132
8322
|
*/
|
|
8133
8323
|
limit?: number;
|
|
8324
|
+
/**
|
|
8325
|
+
* An order for the items in the list
|
|
8326
|
+
* @default "desc"
|
|
8327
|
+
*/
|
|
8328
|
+
order?: "asc" | "desc";
|
|
8134
8329
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
8135
8330
|
items: MemberContentPermission[];
|
|
8136
8331
|
}, Error>>;
|
|
@@ -9553,6 +9748,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9553
9748
|
getSitePublishingPreviewById: (organizationId: string, siteId: string, query?: {
|
|
9554
9749
|
/** ID of the site-space to preview. If not provided, the default site-space will be used. */
|
|
9555
9750
|
siteSpace?: string;
|
|
9751
|
+
/** Rison encoded string of attributes/assertions about the visitor for which we want to preview the site. */
|
|
9752
|
+
claims?: string;
|
|
9556
9753
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
9557
9754
|
url: URL;
|
|
9558
9755
|
}, Error | {
|
|
@@ -9893,6 +10090,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9893
10090
|
font?: CustomizationFont | null;
|
|
9894
10091
|
/** The icons style to use for the content. Set to null to reset the override. */
|
|
9895
10092
|
icons?: CustomizationIconsStyle | null;
|
|
10093
|
+
/** Various styles for the sidebar. Each can be Set to null to reset the override. */
|
|
10094
|
+
sidebar?: {
|
|
10095
|
+
background?: CustomizationSidebarBackgroundStyle | null;
|
|
10096
|
+
list?: CustomizationSidebarListStyle | null;
|
|
10097
|
+
};
|
|
9896
10098
|
/** The style of background to use. Set to null to reset the override. */
|
|
9897
10099
|
background?: CustomizationBackground | null;
|
|
9898
10100
|
};
|
|
@@ -10443,6 +10645,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10443
10645
|
url: URL;
|
|
10444
10646
|
/** JWT token generated for a visitor auth session */
|
|
10445
10647
|
visitorAuthToken?: string;
|
|
10648
|
+
/**
|
|
10649
|
+
* When true redirects the user to the authentication/fallback URL if the visitor auth token is invalid
|
|
10650
|
+
* @default false
|
|
10651
|
+
*/
|
|
10652
|
+
redirectOnError?: boolean;
|
|
10446
10653
|
}, params?: RequestParams) => Promise<HttpResponse<PublishedSiteContentLookup, Error | {
|
|
10447
10654
|
error: {
|
|
10448
10655
|
/** @format int32 */
|
package/dist/index.cjs
CHANGED
|
@@ -186,6 +186,10 @@ __export(src_exports, {
|
|
|
186
186
|
BillingInterval: () => BillingInterval,
|
|
187
187
|
BillingProduct: () => BillingProduct,
|
|
188
188
|
BillingTrialStatus: () => BillingTrialStatus,
|
|
189
|
+
ChangeRequestBrainstormActor: () => ChangeRequestBrainstormActor,
|
|
190
|
+
ChangeRequestBrainstormPlanStatus: () => ChangeRequestBrainstormPlanStatus,
|
|
191
|
+
ChangeRequestBrainstormPlanStepStatus: () => ChangeRequestBrainstormPlanStepStatus,
|
|
192
|
+
ChangeRequestBrainstormStatus: () => ChangeRequestBrainstormStatus,
|
|
189
193
|
ChangeRequestReviewStatus: () => ChangeRequestReviewStatus,
|
|
190
194
|
ChangeRequestStatus: () => ChangeRequestStatus,
|
|
191
195
|
CloudflareHostnameStatus: () => CloudflareHostnameStatus,
|
|
@@ -206,6 +210,8 @@ __export(src_exports, {
|
|
|
206
210
|
CustomizationHeaderPreset: () => CustomizationHeaderPreset,
|
|
207
211
|
CustomizationIconsStyle: () => CustomizationIconsStyle,
|
|
208
212
|
CustomizationLocale: () => CustomizationLocale,
|
|
213
|
+
CustomizationSidebarBackgroundStyle: () => CustomizationSidebarBackgroundStyle,
|
|
214
|
+
CustomizationSidebarListStyle: () => CustomizationSidebarListStyle,
|
|
209
215
|
CustomizationThemeMode: () => CustomizationThemeMode,
|
|
210
216
|
GITBOOK_DEFAULT_ENDPOINT: () => GITBOOK_DEFAULT_ENDPOINT,
|
|
211
217
|
GitBookAPI: () => GitBookAPI,
|
|
@@ -247,7 +253,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
247
253
|
|
|
248
254
|
// package.json
|
|
249
255
|
var name = "@gitbook/api";
|
|
250
|
-
var version = "0.
|
|
256
|
+
var version = "0.83.0";
|
|
251
257
|
|
|
252
258
|
// src/client.ts
|
|
253
259
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -547,6 +553,17 @@ var ChangeRequestReviewStatus = /* @__PURE__ */ ((ChangeRequestReviewStatus2) =>
|
|
|
547
553
|
ChangeRequestReviewStatus2["Approved"] = "approved";
|
|
548
554
|
return ChangeRequestReviewStatus2;
|
|
549
555
|
})(ChangeRequestReviewStatus || {});
|
|
556
|
+
var ChangeRequestBrainstormStatus = /* @__PURE__ */ ((ChangeRequestBrainstormStatus2) => {
|
|
557
|
+
ChangeRequestBrainstormStatus2["Pending"] = "pending";
|
|
558
|
+
ChangeRequestBrainstormStatus2["Failed"] = "failed";
|
|
559
|
+
ChangeRequestBrainstormStatus2["Running"] = "running";
|
|
560
|
+
return ChangeRequestBrainstormStatus2;
|
|
561
|
+
})(ChangeRequestBrainstormStatus || {});
|
|
562
|
+
var ChangeRequestBrainstormActor = /* @__PURE__ */ ((ChangeRequestBrainstormActor2) => {
|
|
563
|
+
ChangeRequestBrainstormActor2["User"] = "user";
|
|
564
|
+
ChangeRequestBrainstormActor2["Agent"] = "agent";
|
|
565
|
+
return ChangeRequestBrainstormActor2;
|
|
566
|
+
})(ChangeRequestBrainstormActor || {});
|
|
550
567
|
var RevisionPageType = /* @__PURE__ */ ((RevisionPageType2) => {
|
|
551
568
|
RevisionPageType2["Document"] = "document";
|
|
552
569
|
RevisionPageType2["Group"] = "group";
|
|
@@ -554,6 +571,20 @@ var RevisionPageType = /* @__PURE__ */ ((RevisionPageType2) => {
|
|
|
554
571
|
RevisionPageType2["Computed"] = "computed";
|
|
555
572
|
return RevisionPageType2;
|
|
556
573
|
})(RevisionPageType || {});
|
|
574
|
+
var ChangeRequestBrainstormPlanStatus = /* @__PURE__ */ ((ChangeRequestBrainstormPlanStatus2) => {
|
|
575
|
+
ChangeRequestBrainstormPlanStatus2["Pending"] = "pending";
|
|
576
|
+
ChangeRequestBrainstormPlanStatus2["Failed"] = "failed";
|
|
577
|
+
ChangeRequestBrainstormPlanStatus2["Running"] = "running";
|
|
578
|
+
ChangeRequestBrainstormPlanStatus2["Completed"] = "completed";
|
|
579
|
+
return ChangeRequestBrainstormPlanStatus2;
|
|
580
|
+
})(ChangeRequestBrainstormPlanStatus || {});
|
|
581
|
+
var ChangeRequestBrainstormPlanStepStatus = /* @__PURE__ */ ((ChangeRequestBrainstormPlanStepStatus2) => {
|
|
582
|
+
ChangeRequestBrainstormPlanStepStatus2["Pending"] = "pending";
|
|
583
|
+
ChangeRequestBrainstormPlanStepStatus2["Succeeded"] = "succeeded";
|
|
584
|
+
ChangeRequestBrainstormPlanStepStatus2["Failed"] = "failed";
|
|
585
|
+
ChangeRequestBrainstormPlanStepStatus2["Running"] = "running";
|
|
586
|
+
return ChangeRequestBrainstormPlanStepStatus2;
|
|
587
|
+
})(ChangeRequestBrainstormPlanStepStatus || {});
|
|
557
588
|
var RevisionPageLayoutPreset = /* @__PURE__ */ ((RevisionPageLayoutPreset2) => {
|
|
558
589
|
RevisionPageLayoutPreset2["Docs"] = "docs";
|
|
559
590
|
RevisionPageLayoutPreset2["Editorial"] = "editorial";
|
|
@@ -701,6 +732,17 @@ var CustomizationIconsStyle = /* @__PURE__ */ ((CustomizationIconsStyle2) => {
|
|
|
701
732
|
CustomizationIconsStyle2["Thin"] = "thin";
|
|
702
733
|
return CustomizationIconsStyle2;
|
|
703
734
|
})(CustomizationIconsStyle || {});
|
|
735
|
+
var CustomizationSidebarBackgroundStyle = /* @__PURE__ */ ((CustomizationSidebarBackgroundStyle2) => {
|
|
736
|
+
CustomizationSidebarBackgroundStyle2["Default"] = "default";
|
|
737
|
+
CustomizationSidebarBackgroundStyle2["Filled"] = "filled";
|
|
738
|
+
return CustomizationSidebarBackgroundStyle2;
|
|
739
|
+
})(CustomizationSidebarBackgroundStyle || {});
|
|
740
|
+
var CustomizationSidebarListStyle = /* @__PURE__ */ ((CustomizationSidebarListStyle2) => {
|
|
741
|
+
CustomizationSidebarListStyle2["Default"] = "default";
|
|
742
|
+
CustomizationSidebarListStyle2["Pill"] = "pill";
|
|
743
|
+
CustomizationSidebarListStyle2["Line"] = "line";
|
|
744
|
+
return CustomizationSidebarListStyle2;
|
|
745
|
+
})(CustomizationSidebarListStyle || {});
|
|
704
746
|
var InsightsInterval = /* @__PURE__ */ ((InsightsInterval2) => {
|
|
705
747
|
InsightsInterval2["Day"] = "day";
|
|
706
748
|
InsightsInterval2["Week"] = "week";
|
|
@@ -1669,6 +1711,22 @@ var Api = class extends HttpClient {
|
|
|
1669
1711
|
format: "json",
|
|
1670
1712
|
...params
|
|
1671
1713
|
}),
|
|
1714
|
+
streamBrainstormChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.streamRequest({
|
|
1715
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/task/brainstorm`,
|
|
1716
|
+
method: "POST",
|
|
1717
|
+
body: data,
|
|
1718
|
+
secure: true,
|
|
1719
|
+
type: "application/json" /* Json */,
|
|
1720
|
+
...params
|
|
1721
|
+
}),
|
|
1722
|
+
streamImplementChangeRequestTask: (spaceId, changeRequestId, data, params = {}) => this.streamRequest({
|
|
1723
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/task/implement`,
|
|
1724
|
+
method: "POST",
|
|
1725
|
+
body: data,
|
|
1726
|
+
secure: true,
|
|
1727
|
+
type: "application/json" /* Json */,
|
|
1728
|
+
...params
|
|
1729
|
+
}),
|
|
1672
1730
|
getRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
|
|
1673
1731
|
path: `/spaces/${spaceId}/revisions/${revisionId}`,
|
|
1674
1732
|
method: "GET",
|
|
@@ -3404,6 +3462,10 @@ var GitBookAPI = class extends Api {
|
|
|
3404
3462
|
BillingInterval,
|
|
3405
3463
|
BillingProduct,
|
|
3406
3464
|
BillingTrialStatus,
|
|
3465
|
+
ChangeRequestBrainstormActor,
|
|
3466
|
+
ChangeRequestBrainstormPlanStatus,
|
|
3467
|
+
ChangeRequestBrainstormPlanStepStatus,
|
|
3468
|
+
ChangeRequestBrainstormStatus,
|
|
3407
3469
|
ChangeRequestReviewStatus,
|
|
3408
3470
|
ChangeRequestStatus,
|
|
3409
3471
|
CloudflareHostnameStatus,
|
|
@@ -3424,6 +3486,8 @@ var GitBookAPI = class extends Api {
|
|
|
3424
3486
|
CustomizationHeaderPreset,
|
|
3425
3487
|
CustomizationIconsStyle,
|
|
3426
3488
|
CustomizationLocale,
|
|
3489
|
+
CustomizationSidebarBackgroundStyle,
|
|
3490
|
+
CustomizationSidebarListStyle,
|
|
3427
3491
|
CustomizationThemeMode,
|
|
3428
3492
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
3429
3493
|
GitBookAPI,
|
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.83.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -472,6 +472,17 @@ var ChangeRequestReviewStatus = /* @__PURE__ */ ((ChangeRequestReviewStatus2) =>
|
|
|
472
472
|
ChangeRequestReviewStatus2["Approved"] = "approved";
|
|
473
473
|
return ChangeRequestReviewStatus2;
|
|
474
474
|
})(ChangeRequestReviewStatus || {});
|
|
475
|
+
var ChangeRequestBrainstormStatus = /* @__PURE__ */ ((ChangeRequestBrainstormStatus2) => {
|
|
476
|
+
ChangeRequestBrainstormStatus2["Pending"] = "pending";
|
|
477
|
+
ChangeRequestBrainstormStatus2["Failed"] = "failed";
|
|
478
|
+
ChangeRequestBrainstormStatus2["Running"] = "running";
|
|
479
|
+
return ChangeRequestBrainstormStatus2;
|
|
480
|
+
})(ChangeRequestBrainstormStatus || {});
|
|
481
|
+
var ChangeRequestBrainstormActor = /* @__PURE__ */ ((ChangeRequestBrainstormActor2) => {
|
|
482
|
+
ChangeRequestBrainstormActor2["User"] = "user";
|
|
483
|
+
ChangeRequestBrainstormActor2["Agent"] = "agent";
|
|
484
|
+
return ChangeRequestBrainstormActor2;
|
|
485
|
+
})(ChangeRequestBrainstormActor || {});
|
|
475
486
|
var RevisionPageType = /* @__PURE__ */ ((RevisionPageType2) => {
|
|
476
487
|
RevisionPageType2["Document"] = "document";
|
|
477
488
|
RevisionPageType2["Group"] = "group";
|
|
@@ -479,6 +490,20 @@ var RevisionPageType = /* @__PURE__ */ ((RevisionPageType2) => {
|
|
|
479
490
|
RevisionPageType2["Computed"] = "computed";
|
|
480
491
|
return RevisionPageType2;
|
|
481
492
|
})(RevisionPageType || {});
|
|
493
|
+
var ChangeRequestBrainstormPlanStatus = /* @__PURE__ */ ((ChangeRequestBrainstormPlanStatus2) => {
|
|
494
|
+
ChangeRequestBrainstormPlanStatus2["Pending"] = "pending";
|
|
495
|
+
ChangeRequestBrainstormPlanStatus2["Failed"] = "failed";
|
|
496
|
+
ChangeRequestBrainstormPlanStatus2["Running"] = "running";
|
|
497
|
+
ChangeRequestBrainstormPlanStatus2["Completed"] = "completed";
|
|
498
|
+
return ChangeRequestBrainstormPlanStatus2;
|
|
499
|
+
})(ChangeRequestBrainstormPlanStatus || {});
|
|
500
|
+
var ChangeRequestBrainstormPlanStepStatus = /* @__PURE__ */ ((ChangeRequestBrainstormPlanStepStatus2) => {
|
|
501
|
+
ChangeRequestBrainstormPlanStepStatus2["Pending"] = "pending";
|
|
502
|
+
ChangeRequestBrainstormPlanStepStatus2["Succeeded"] = "succeeded";
|
|
503
|
+
ChangeRequestBrainstormPlanStepStatus2["Failed"] = "failed";
|
|
504
|
+
ChangeRequestBrainstormPlanStepStatus2["Running"] = "running";
|
|
505
|
+
return ChangeRequestBrainstormPlanStepStatus2;
|
|
506
|
+
})(ChangeRequestBrainstormPlanStepStatus || {});
|
|
482
507
|
var RevisionPageLayoutPreset = /* @__PURE__ */ ((RevisionPageLayoutPreset2) => {
|
|
483
508
|
RevisionPageLayoutPreset2["Docs"] = "docs";
|
|
484
509
|
RevisionPageLayoutPreset2["Editorial"] = "editorial";
|
|
@@ -626,6 +651,17 @@ var CustomizationIconsStyle = /* @__PURE__ */ ((CustomizationIconsStyle2) => {
|
|
|
626
651
|
CustomizationIconsStyle2["Thin"] = "thin";
|
|
627
652
|
return CustomizationIconsStyle2;
|
|
628
653
|
})(CustomizationIconsStyle || {});
|
|
654
|
+
var CustomizationSidebarBackgroundStyle = /* @__PURE__ */ ((CustomizationSidebarBackgroundStyle2) => {
|
|
655
|
+
CustomizationSidebarBackgroundStyle2["Default"] = "default";
|
|
656
|
+
CustomizationSidebarBackgroundStyle2["Filled"] = "filled";
|
|
657
|
+
return CustomizationSidebarBackgroundStyle2;
|
|
658
|
+
})(CustomizationSidebarBackgroundStyle || {});
|
|
659
|
+
var CustomizationSidebarListStyle = /* @__PURE__ */ ((CustomizationSidebarListStyle2) => {
|
|
660
|
+
CustomizationSidebarListStyle2["Default"] = "default";
|
|
661
|
+
CustomizationSidebarListStyle2["Pill"] = "pill";
|
|
662
|
+
CustomizationSidebarListStyle2["Line"] = "line";
|
|
663
|
+
return CustomizationSidebarListStyle2;
|
|
664
|
+
})(CustomizationSidebarListStyle || {});
|
|
629
665
|
var InsightsInterval = /* @__PURE__ */ ((InsightsInterval2) => {
|
|
630
666
|
InsightsInterval2["Day"] = "day";
|
|
631
667
|
InsightsInterval2["Week"] = "week";
|
|
@@ -1594,6 +1630,22 @@ var Api = class extends HttpClient {
|
|
|
1594
1630
|
format: "json",
|
|
1595
1631
|
...params
|
|
1596
1632
|
}),
|
|
1633
|
+
streamBrainstormChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.streamRequest({
|
|
1634
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/task/brainstorm`,
|
|
1635
|
+
method: "POST",
|
|
1636
|
+
body: data,
|
|
1637
|
+
secure: true,
|
|
1638
|
+
type: "application/json" /* Json */,
|
|
1639
|
+
...params
|
|
1640
|
+
}),
|
|
1641
|
+
streamImplementChangeRequestTask: (spaceId, changeRequestId, data, params = {}) => this.streamRequest({
|
|
1642
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/task/implement`,
|
|
1643
|
+
method: "POST",
|
|
1644
|
+
body: data,
|
|
1645
|
+
secure: true,
|
|
1646
|
+
type: "application/json" /* Json */,
|
|
1647
|
+
...params
|
|
1648
|
+
}),
|
|
1597
1649
|
getRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
|
|
1598
1650
|
path: `/spaces/${spaceId}/revisions/${revisionId}`,
|
|
1599
1651
|
method: "GET",
|
|
@@ -3328,6 +3380,10 @@ export {
|
|
|
3328
3380
|
BillingInterval,
|
|
3329
3381
|
BillingProduct,
|
|
3330
3382
|
BillingTrialStatus,
|
|
3383
|
+
ChangeRequestBrainstormActor,
|
|
3384
|
+
ChangeRequestBrainstormPlanStatus,
|
|
3385
|
+
ChangeRequestBrainstormPlanStepStatus,
|
|
3386
|
+
ChangeRequestBrainstormStatus,
|
|
3331
3387
|
ChangeRequestReviewStatus,
|
|
3332
3388
|
ChangeRequestStatus,
|
|
3333
3389
|
CloudflareHostnameStatus,
|
|
@@ -3348,6 +3404,8 @@ export {
|
|
|
3348
3404
|
CustomizationHeaderPreset,
|
|
3349
3405
|
CustomizationIconsStyle,
|
|
3350
3406
|
CustomizationLocale,
|
|
3407
|
+
CustomizationSidebarBackgroundStyle,
|
|
3408
|
+
CustomizationSidebarListStyle,
|
|
3351
3409
|
CustomizationThemeMode,
|
|
3352
3410
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
3353
3411
|
GitBookAPI,
|