@gitbook/api 0.24.0 → 0.26.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 CHANGED
@@ -17,11 +17,11 @@ export interface List {
17
17
  export declare type URL = string;
18
18
  /** @pattern ^#(?:[0-9a-fA-F]{3}){1,2}$ */
19
19
  export declare type Color = string;
20
- /** @format date */
21
- export declare type Date = string;
20
+ /** @format date-time */
21
+ export declare type Timestamp = string;
22
22
  /**
23
23
  * Unicode codepoint or character of the emoji
24
- * @maxLength 20
24
+ * @maxLength 50
25
25
  * @example "🎉"
26
26
  */
27
27
  export declare type Emoji = string;
@@ -34,21 +34,34 @@ export interface EmojiReaction {
34
34
  /** The users who reacted with this emoji */
35
35
  users: {
36
36
  user: User;
37
- reactedAt: Date;
37
+ reactedAt: Timestamp;
38
38
  }[];
39
39
  }
40
40
  export declare type EmojiReactions = EmojiReaction[];
41
41
  export interface RequestSpaceTrackPageView {
42
42
  /** Unique identifier of the page. */
43
- pageId: string;
43
+ pageId?: string;
44
44
  /** Analytics info on the GitBook's content visitor. */
45
45
  visitor: {
46
46
  /** GitBook's unique identifier of the visitor. */
47
47
  anonymousId: string;
48
48
  /** The visitors cookies. */
49
49
  cookies: Record<string, string>;
50
- /** User-agent of the visitor. */
50
+ /**
51
+ * IP address of the visitor.
52
+ * If undefined, it'll default to the IP executing the request.
53
+ */
54
+ ip?: string;
55
+ /**
56
+ * User-agent of the visitor.
57
+ * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
58
+ */
51
59
  userAgent: string;
60
+ /**
61
+ * Language of the visitor.
62
+ * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
63
+ */
64
+ language?: string;
52
65
  };
53
66
  /** The GitBook content's URL visited (including URL params). */
54
67
  url: string;
@@ -138,6 +151,8 @@ export interface RequestImportGitRepository {
138
151
  repoCommitURL?: string;
139
152
  /** Path to a root directory for the project in the repository. */
140
153
  repoProjectDirectory?: string;
154
+ /** The timestamp of the event that triggered this import. It ensures that Git sync import and export operations are executed in the same order on GitBook and on the remote repository. */
155
+ timestamp?: Timestamp;
141
156
  force?: boolean;
142
157
  /** If true, the import will generate a revision without updating the space primary content. */
143
158
  standalone?: boolean;
@@ -159,6 +174,8 @@ export interface RequestExportToGitRepository {
159
174
  repoCommitURL?: string;
160
175
  /** Path to a root directory for the project in the repository. */
161
176
  repoProjectDirectory?: string;
177
+ /** The timestamp of the event that triggered this export. It ensures that Git sync import and export operations are executed in the same order on GitBook and on the remote repository. */
178
+ timestamp?: Timestamp;
162
179
  force?: boolean;
163
180
  /** Optional metadata to store on the space about the Git provider */
164
181
  gitInfo?: RequestUpdateSpaceGitInfo;
@@ -269,7 +286,7 @@ export interface UserAPIToken {
269
286
  /** The API token name. */
270
287
  label: string;
271
288
  /** The API token creation date. */
272
- createdAt: Date;
289
+ createdAt: Timestamp;
273
290
  }
274
291
  /** The API token details, including the token itself. */
275
292
  export declare type UserAPITokenExtended = UserAPIToken & {
@@ -301,7 +318,7 @@ export declare enum ContentVisibility {
301
318
  }
302
319
  /** Contributor towards content. */
303
320
  export interface UserContributor {
304
- updatedAt: Date;
321
+ updatedAt: Timestamp;
305
322
  count: number;
306
323
  user: User;
307
324
  }
@@ -344,9 +361,9 @@ export declare type Comment = {
344
361
  /** The user who posted the comment. */
345
362
  postedBy: User;
346
363
  /** When the comment was posted. */
347
- postedAt: Date;
364
+ postedAt: Timestamp;
348
365
  /** Date when the comment was edited, if it has been edited. */
349
- editedAt?: Date;
366
+ editedAt?: Timestamp;
350
367
  /** Any emoji reactions to the comment. */
351
368
  reactions: EmojiReactions;
352
369
  /** The number of replies to this comment. */
@@ -388,7 +405,7 @@ export declare type Comment = {
388
405
  /** Status of the comment. */
389
406
  status: 'resolved';
390
407
  /** If the comment has been resolved, the date at which it was resolved. If this field is not defined, the comment is not resolved. */
391
- resolvedAt: Date;
408
+ resolvedAt: Timestamp;
392
409
  /** If the comment has been resolved, the user who resolved it. If this field is not defined, the comment is not resolved. */
393
410
  resolvedBy: User;
394
411
  } | {
@@ -401,9 +418,9 @@ export interface CommentReply {
401
418
  /** Unique identifier for the reply. */
402
419
  id: string;
403
420
  postedBy: User;
404
- postedAt: Date;
421
+ postedAt: Timestamp;
405
422
  /** Date when the reply was edited, if it has been edited. */
406
- editedAt?: Date;
423
+ editedAt?: Timestamp;
407
424
  reactions: EmojiReactions;
408
425
  body: Document;
409
426
  /** URLs associated with the object */
@@ -925,7 +942,7 @@ export interface DocumentBlockDivider {
925
942
  isVoid: true;
926
943
  data: object;
927
944
  }
928
- export declare type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace;
945
+ export declare type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace | ContentRefSnippet;
929
946
  export interface ContentRefURL {
930
947
  kind: 'url';
931
948
  url: string;
@@ -960,17 +977,20 @@ export interface ContentRefSpace {
960
977
  kind: 'space';
961
978
  space: string;
962
979
  }
980
+ export interface ContentRefSnippet {
981
+ kind: 'snippet';
982
+ snippet: string;
983
+ organization: string;
984
+ }
963
985
  export interface Space {
964
986
  /** Type of Object, always equals to "space" */
965
987
  object: 'space';
966
988
  /** Unique identifier for the space */
967
989
  id: string;
968
- /**
969
- * Title of the space
970
- * @minLength 0
971
- * @maxLength 100
972
- */
973
- title: string;
990
+ /** Title of the space */
991
+ title: SpaceTitle;
992
+ /** An emoji for this space. It'll match the emoji shown in the GitBook app. */
993
+ emoji: Emoji;
974
994
  /**
975
995
  * * `public`: Anyone can access the content, and the content is indexed by search engines.
976
996
  * * `unlisted`: Anyone can access the content, and the content is not indexed by search engines
@@ -981,9 +1001,15 @@ export interface Space {
981
1001
  * * `private`: Authorized members can access the content.
982
1002
  */
983
1003
  visibility: ContentVisibility;
984
- createdAt: Date;
985
- updatedAt: Date;
986
- deletedAt?: Date;
1004
+ createdAt: Timestamp;
1005
+ updatedAt: Timestamp;
1006
+ deletedAt?: Timestamp;
1007
+ /**
1008
+ * Determines how a Space can be edited.
1009
+ * * `live`: Users can directly edit the space
1010
+ * * `locked`: All edits are locked for this space.
1011
+ */
1012
+ editMode?: SpaceEditMode;
987
1013
  /** URLs associated with the object */
988
1014
  urls: {
989
1015
  /**
@@ -1006,6 +1032,11 @@ export interface Space {
1006
1032
  * @format uri
1007
1033
  */
1008
1034
  public?: string;
1035
+ /**
1036
+ * URL of the icon of this space, if defined. Deprecated, prefer using emojis for spaces instead of icons.
1037
+ * @deprecated
1038
+ */
1039
+ icon?: URL;
1009
1040
  };
1010
1041
  /** ID of the organization owning this space */
1011
1042
  organization: string;
@@ -1013,6 +1044,21 @@ export interface Space {
1013
1044
  parent?: string;
1014
1045
  gitSync?: GitSyncState;
1015
1046
  }
1047
+ /**
1048
+ * Determines how a Space can be edited.
1049
+ * * `live`: Users can directly edit the space
1050
+ * * `locked`: All edits are locked for this space.
1051
+ */
1052
+ export declare enum SpaceEditMode {
1053
+ Live = "live",
1054
+ Locked = "locked"
1055
+ }
1056
+ /**
1057
+ * Title of the space
1058
+ * @minLength 1
1059
+ * @maxLength 50
1060
+ */
1061
+ export declare type SpaceTitle = string;
1016
1062
  export interface RevisionBase {
1017
1063
  /** Type of Object, always equals to "revision" */
1018
1064
  object: 'revision';
@@ -1022,6 +1068,8 @@ export interface RevisionBase {
1022
1068
  parents: string[];
1023
1069
  pages: RevisionPage[];
1024
1070
  files: RevisionFile[];
1071
+ /** When the revision was created. */
1072
+ createdAt: Timestamp;
1025
1073
  /** Metadata about a potential associated git commit. */
1026
1074
  git?: GitSyncCommit;
1027
1075
  urls: {
@@ -1069,10 +1117,12 @@ export interface RevisionPageBase {
1069
1117
  * @maxLength 100
1070
1118
  */
1071
1119
  title: string;
1120
+ /** Emoji of the page, if one has been set. */
1121
+ emoji?: Emoji;
1072
1122
  /** When the page was first created. Only present if page has been edited at least once. */
1073
- createdAt?: Date;
1123
+ createdAt?: Timestamp;
1074
1124
  /** When the page was last edited. Only present if page has been edited at least once. */
1075
- updatedAt?: Date;
1125
+ updatedAt?: Timestamp;
1076
1126
  }
1077
1127
  export declare type RevisionPageDocument = RevisionPageBase & Document & {
1078
1128
  /** @deprecated */
@@ -1311,7 +1361,7 @@ export interface GitSyncState {
1311
1361
  /** The URL to the repository tree, used when rendering public content. */
1312
1362
  url?: string;
1313
1363
  /** When the Git provider details were last updated */
1314
- updatedAt?: Date;
1364
+ updatedAt?: Timestamp;
1315
1365
  }
1316
1366
  export interface GitSyncOperation {
1317
1367
  /**
@@ -1320,9 +1370,9 @@ export interface GitSyncOperation {
1320
1370
  * * `success`: The operation was successful
1321
1371
  */
1322
1372
  state: GitSyncOperationState;
1323
- startedAt: Date;
1373
+ startedAt?: Timestamp;
1324
1374
  /** Date when the operation was successful (when state is `success`) */
1325
- completedAt?: Date;
1375
+ completedAt?: Timestamp;
1326
1376
  /** Error details, defined if state is `failure`. */
1327
1377
  error?: string;
1328
1378
  }
@@ -1449,9 +1499,9 @@ export interface OrganizationMember {
1449
1499
  /** Whatever the membership of this user is disabled and prevent them from accessing content. */
1450
1500
  disabled: boolean;
1451
1501
  /** Date at which the user joined the organization. */
1452
- joinedAt: Date;
1502
+ joinedAt: Timestamp;
1453
1503
  /** Date at which the user was last seen active in the organization. */
1454
- lastSeenAt?: Date;
1504
+ lastSeenAt?: Timestamp;
1455
1505
  /** Whether the user can login with SSO. */
1456
1506
  sso: boolean;
1457
1507
  spaces: number;
@@ -1469,7 +1519,7 @@ export interface OrganizationTeam {
1469
1519
  /** Count of spaces this team has access to. */
1470
1520
  spaces: number;
1471
1521
  /** Date at which the team was created. */
1472
- createdAt: Date;
1522
+ createdAt: Timestamp;
1473
1523
  }
1474
1524
  /**
1475
1525
  * Title of the team
@@ -1613,6 +1663,8 @@ export interface UpdateCaptureSchema {
1613
1663
  export declare type Snippet = Document & {
1614
1664
  /** Unique identifier for the snippet */
1615
1665
  id: string;
1666
+ /** ID of the organization owning this snippet */
1667
+ organization: string;
1616
1668
  /** @format date-time */
1617
1669
  createdAt: string;
1618
1670
  /**
@@ -1669,7 +1721,7 @@ export interface ContentAuditRelation {
1669
1721
  /** The status of the relation */
1670
1722
  status: ContentAuditRelationStatus;
1671
1723
  /** The date at which the relation was created */
1672
- createdAt: Date;
1724
+ createdAt: Timestamp;
1673
1725
  }
1674
1726
  /** The type of the relation between the sources */
1675
1727
  export declare enum ContentAuditRelationType {
@@ -1708,8 +1760,8 @@ export interface ChangeRequest {
1708
1760
  */
1709
1761
  subject: string;
1710
1762
  createdBy: User;
1711
- createdAt: Date;
1712
- updatedAt: Date;
1763
+ createdAt: Timestamp;
1764
+ updatedAt: Timestamp;
1713
1765
  /** URLs associated with the object */
1714
1766
  urls: {
1715
1767
  /**
@@ -1739,8 +1791,8 @@ export interface ChangeRequestReview {
1739
1791
  /** The status of the review. */
1740
1792
  status: ChangeRequestReviewStatus;
1741
1793
  comment?: Comment;
1742
- createdAt: Date;
1743
- updatedAt: Date;
1794
+ createdAt: Timestamp;
1795
+ updatedAt: Timestamp;
1744
1796
  }
1745
1797
  /** Status of a change request review. */
1746
1798
  export declare enum ChangeRequestReviewStatus {
@@ -1754,7 +1806,7 @@ export declare type ChangeRequestRequestedReviewer = {
1754
1806
  revision: string;
1755
1807
  /** The user who made the request. */
1756
1808
  requestedBy: User;
1757
- createdAt: Date;
1809
+ createdAt: Timestamp;
1758
1810
  } & ({
1759
1811
  kind: 'user';
1760
1812
  /** The user who was requested to review. */
@@ -2133,7 +2185,8 @@ export declare enum IntegrationScope {
2133
2185
  SpaceMetadataWrite = "space:metadata:write",
2134
2186
  SpaceScriptInject = "space:script:inject",
2135
2187
  SpaceScriptCookies = "space:script:cookies",
2136
- SpaceGitSync = "space:git:sync"
2188
+ SpaceGitSync = "space:git:sync",
2189
+ SpaceVisitorAuth = "space:visitor:auth"
2137
2190
  }
2138
2191
  /** Categories for which the integration is listed in the marketplace */
2139
2192
  export declare type IntegrationCategories = IntegrationCategory[];
@@ -2183,7 +2236,7 @@ export interface IntegrationEvent {
2183
2236
  integrationId: string;
2184
2237
  /** Unique ID of the integration installation. */
2185
2238
  installationId?: string;
2186
- createdAt: Date;
2239
+ createdAt: Timestamp;
2187
2240
  /** Any event that can be received from GitBook. */
2188
2241
  payload: Event;
2189
2242
  /** Status of the event. */
@@ -2192,7 +2245,7 @@ export interface IntegrationEvent {
2192
2245
  export interface IntegrationEventLog {
2193
2246
  /** The message of the log entry. */
2194
2247
  message?: string;
2195
- timestamp?: Date;
2248
+ timestamp?: Timestamp;
2196
2249
  /** The level of the log entry. */
2197
2250
  level?: 'debug' | 'info' | 'warn' | 'error';
2198
2251
  }
@@ -2262,8 +2315,8 @@ export interface IntegrationInstallation {
2262
2315
  spaces: number;
2263
2316
  /** Configuration of the integration at the account level */
2264
2317
  configuration: IntegrationInstallationConfiguration;
2265
- createdAt: Date;
2266
- updatedAt: Date;
2318
+ createdAt: Timestamp;
2319
+ updatedAt: Timestamp;
2267
2320
  /** URLs associated with the object */
2268
2321
  urls: {
2269
2322
  /**
@@ -2517,7 +2570,7 @@ export declare type EntityPropertySchema = {
2517
2570
  };
2518
2571
  });
2519
2572
  /** Any event that can be received from GitBook. */
2520
- export declare type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent | SpaceViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | FetchEvent | FetchPublishedScriptEvent | UIRenderEvent;
2573
+ export declare type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent | SpaceViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | FetchEvent | FetchPublishedScriptEvent | FetchVisitorAuthenticationEvent | UIRenderEvent;
2521
2574
  /** Common properties for all events. */
2522
2575
  export interface BaseEvent {
2523
2576
  /** Unique identifier for the event. */
@@ -2581,6 +2634,8 @@ export declare type SpaceViewEvent = SpaceEvent & {
2581
2634
  userAgent: string;
2582
2635
  /** IP address of the visitor. */
2583
2636
  ip: string;
2637
+ /** Language of the visitor. */
2638
+ language?: string;
2584
2639
  };
2585
2640
  /** The GitBook content's URL visited (including URL params). */
2586
2641
  url: string;
@@ -2656,6 +2711,11 @@ export declare type FetchEvent = BaseEvent & {
2656
2711
  export declare type FetchPublishedScriptEvent = SpaceEvent & {
2657
2712
  type: 'fetch_published_script';
2658
2713
  };
2714
+ /** Common properties for all events related to visitor authentication from an installation */
2715
+ export declare type FetchVisitorAuthenticationEvent = SpaceEvent & {
2716
+ type: 'fetch_visitor_authentication';
2717
+ location?: string;
2718
+ };
2659
2719
  /** Event generated when rendering a UI */
2660
2720
  export declare type UIRenderEvent = (SpaceEvent | InstallationEvent) & {
2661
2721
  auth?: {
@@ -2717,8 +2777,8 @@ export interface BillingInvoicePreview {
2717
2777
  lines: {
2718
2778
  description: string;
2719
2779
  amount: number;
2720
- periodStart: Date;
2721
- periodEnd: Date;
2780
+ periodStart: Timestamp;
2781
+ periodEnd: Timestamp;
2722
2782
  }[];
2723
2783
  }
2724
2784
  export declare enum APIIntegrationScope {
@@ -2824,7 +2884,7 @@ export interface UserImpersonationInfo {
2824
2884
  }
2825
2885
  /** All the permissions of a user */
2826
2886
  export interface UserPermissions {
2827
- updatedAt: Date;
2887
+ updatedAt: Timestamp;
2828
2888
  searchKey: string;
2829
2889
  organizations: Record<string, {
2830
2890
  /** The role of a member in an organization, null for guests */
@@ -3417,8 +3477,8 @@ export interface CustomField {
3417
3477
  type: CustomFieldType;
3418
3478
  placeholder: CustomFieldPlaceholder;
3419
3479
  options?: CustomFieldOptions;
3420
- createdAt: Date;
3421
- updatedAt: Date;
3480
+ createdAt: Timestamp;
3481
+ updatedAt: Timestamp;
3422
3482
  /** URLs associated with the object */
3423
3483
  urls: {
3424
3484
  /**
@@ -3605,7 +3665,7 @@ export interface PageFeedback {
3605
3665
  object: 'page-feedback';
3606
3666
  visitorId: string;
3607
3667
  rating: PageFeedbackRating;
3608
- createdAt: Date;
3668
+ createdAt: Timestamp;
3609
3669
  /** ID of the revision when the rating was created */
3610
3670
  revision: string;
3611
3671
  /** URLs associated with the object */
@@ -3813,6 +3873,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
3813
3873
  * @secure
3814
3874
  */
3815
3875
  updateSpaceById: (spaceId: string, data: {
3876
+ /**
3877
+ * Determines how a Space can be edited.
3878
+ * * `live`: Users can directly edit the space
3879
+ * * `locked`: All edits are locked for this space.
3880
+ */
3881
+ editMode?: SpaceEditMode;
3882
+ /** Title of the space */
3883
+ title?: SpaceTitle;
3816
3884
  /**
3817
3885
  * * `public`: Anyone can access the content, and the content is indexed by search engines.
3818
3886
  * * `unlisted`: Anyone can access the content, and the content is not indexed by search engines
@@ -4881,6 +4949,24 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4881
4949
  createPageFeedback: (spaceId: string, pageId: string, visitorId: string, data: {
4882
4950
  rating: PageFeedbackRating;
4883
4951
  }, params?: RequestParams) => Promise<HttpResponse<PageFeedback, Error>>;
4952
+ /**
4953
+ * No description
4954
+ *
4955
+ * @tags spaces
4956
+ * @name GetSpacePdf
4957
+ * @summary Generate a URL to export the content of the space as a PDF.
4958
+ * @request GET:/spaces/{spaceId}/pdf
4959
+ * @secure
4960
+ */
4961
+ getSpacePdf: (spaceId: string, query?: {
4962
+ /** Generate a PDF only for the provided page. */
4963
+ only?: boolean;
4964
+ /** ID of a specific page to generate a PDF for. */
4965
+ page?: string;
4966
+ }, params?: RequestParams) => Promise<HttpResponse<{
4967
+ /** Temporary URL to print the content. The URL will work for 1h. */
4968
+ url: URL;
4969
+ }, Error>>;
4884
4970
  };
4885
4971
  collections: {
4886
4972
  /**
@@ -6344,6 +6430,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6344
6430
  spaceId?: string;
6345
6431
  /** If specified, only locations under the given pageId will be returned. You must specify a spaceId too. If pageId is not specified, GitBook will suggest pages at the top level. */
6346
6432
  pageId?: string;
6433
+ /** If specified, only locations matching the search query will be returned. */
6434
+ search?: string;
6347
6435
  }, params?: RequestParams) => Promise<HttpResponse<List & {
6348
6436
  items: {
6349
6437
  /** If defined and true, this location was suggested by GitBook AI. */
package/dist/index.cjs CHANGED
@@ -63,6 +63,7 @@ __export(src_exports, {
63
63
  RevisionPageLayoutPreset: () => RevisionPageLayoutPreset,
64
64
  RevisionPageType: () => RevisionPageType,
65
65
  RevisionSemanticChangeType: () => RevisionSemanticChangeType,
66
+ SpaceEditMode: () => SpaceEditMode,
66
67
  TeamMemberRole: () => TeamMemberRole
67
68
  });
68
69
  module.exports = __toCommonJS(src_exports);
@@ -77,6 +78,11 @@ var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
77
78
  ContentVisibility2["Private"] = "private";
78
79
  return ContentVisibility2;
79
80
  })(ContentVisibility || {});
81
+ var SpaceEditMode = /* @__PURE__ */ ((SpaceEditMode2) => {
82
+ SpaceEditMode2["Live"] = "live";
83
+ SpaceEditMode2["Locked"] = "locked";
84
+ return SpaceEditMode2;
85
+ })(SpaceEditMode || {});
80
86
  var RevisionPageLayoutOptionsCoverSize = /* @__PURE__ */ ((RevisionPageLayoutOptionsCoverSize2) => {
81
87
  RevisionPageLayoutOptionsCoverSize2["Hero"] = "hero";
82
88
  RevisionPageLayoutOptionsCoverSize2["Full"] = "full";
@@ -206,6 +212,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
206
212
  IntegrationScope2["SpaceScriptInject"] = "space:script:inject";
207
213
  IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
208
214
  IntegrationScope2["SpaceGitSync"] = "space:git:sync";
215
+ IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
209
216
  return IntegrationScope2;
210
217
  })(IntegrationScope || {});
211
218
  var IntegrationInstallationSpaceSelection = /* @__PURE__ */ ((IntegrationInstallationSpaceSelection2) => {
@@ -1216,6 +1223,14 @@ var Api = class extends HttpClient {
1216
1223
  type: "application/json" /* Json */,
1217
1224
  format: "json",
1218
1225
  ...params
1226
+ }),
1227
+ getSpacePdf: (spaceId, query, params = {}) => this.request({
1228
+ path: `/spaces/${spaceId}/pdf`,
1229
+ method: "GET",
1230
+ query,
1231
+ secure: true,
1232
+ format: "json",
1233
+ ...params
1219
1234
  })
1220
1235
  };
1221
1236
  this.collections = {
@@ -2169,5 +2184,6 @@ var GitBookAPI = class extends Api {
2169
2184
  RevisionPageLayoutPreset,
2170
2185
  RevisionPageType,
2171
2186
  RevisionSemanticChangeType,
2187
+ SpaceEditMode,
2172
2188
  TeamMemberRole
2173
2189
  });
package/dist/index.js CHANGED
@@ -8,6 +8,11 @@ var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
8
8
  ContentVisibility2["Private"] = "private";
9
9
  return ContentVisibility2;
10
10
  })(ContentVisibility || {});
11
+ var SpaceEditMode = /* @__PURE__ */ ((SpaceEditMode2) => {
12
+ SpaceEditMode2["Live"] = "live";
13
+ SpaceEditMode2["Locked"] = "locked";
14
+ return SpaceEditMode2;
15
+ })(SpaceEditMode || {});
11
16
  var RevisionPageLayoutOptionsCoverSize = /* @__PURE__ */ ((RevisionPageLayoutOptionsCoverSize2) => {
12
17
  RevisionPageLayoutOptionsCoverSize2["Hero"] = "hero";
13
18
  RevisionPageLayoutOptionsCoverSize2["Full"] = "full";
@@ -137,6 +142,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
137
142
  IntegrationScope2["SpaceScriptInject"] = "space:script:inject";
138
143
  IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
139
144
  IntegrationScope2["SpaceGitSync"] = "space:git:sync";
145
+ IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
140
146
  return IntegrationScope2;
141
147
  })(IntegrationScope || {});
142
148
  var IntegrationInstallationSpaceSelection = /* @__PURE__ */ ((IntegrationInstallationSpaceSelection2) => {
@@ -1147,6 +1153,14 @@ var Api = class extends HttpClient {
1147
1153
  type: "application/json" /* Json */,
1148
1154
  format: "json",
1149
1155
  ...params
1156
+ }),
1157
+ getSpacePdf: (spaceId, query, params = {}) => this.request({
1158
+ path: `/spaces/${spaceId}/pdf`,
1159
+ method: "GET",
1160
+ query,
1161
+ secure: true,
1162
+ format: "json",
1163
+ ...params
1150
1164
  })
1151
1165
  };
1152
1166
  this.collections = {
@@ -2099,5 +2113,6 @@ export {
2099
2113
  RevisionPageLayoutPreset,
2100
2114
  RevisionPageType,
2101
2115
  RevisionSemanticChangeType,
2116
+ SpaceEditMode,
2102
2117
  TeamMemberRole
2103
2118
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
- "version": "0.24.0",
7
+ "version": "0.26.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",