@gitbook/api 0.159.0 → 0.161.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.
@@ -18,6 +18,7 @@ export declare const CARDS_IMAGE_OBJECT_FIT_ENUM: ["contain", "fill", "cover"];
18
18
  export declare const VERTICAL_ALIGNMENT_ENUM: ["top", "middle", "bottom"];
19
19
  export declare const REVISION_PAGE_SLUG_MAX_LENGTH = 100;
20
20
  export declare const REVISION_PAGE_SLUG_MIN_LENGTH = 0;
21
+ export declare const OPEN_APISPEC_VISIBILITY_ENUM: ["private", "public"];
21
22
  export declare const REVISION_PAGE_LAYOUT_OPTIONS_WIDTH_ENUM: ["default", "wide"];
22
23
  export declare const REVISION_PAGE_LAYOUT_OPTIONS_COVER_SIZE_ENUM: ["hero", "full"];
23
24
  export declare const CHANGE_REQUEST_STATUS_ENUM: ["draft", "open", "archived", "merged"];
@@ -43,7 +44,6 @@ export declare const OPEN_APISPEC_SLUG_MAX_LENGTH = 100;
43
44
  export declare const OPEN_APISPEC_SLUG_MIN_LENGTH = 1;
44
45
  export declare const OPEN_APISPEC_SLUG_PATTERN = "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$";
45
46
  export declare const OPEN_APISPEC_PROCESSING_STATE_ENUM: ["pending", "progress", "complete"];
46
- export declare const OPEN_APISPEC_VISIBILITY_ENUM: ["private", "public"];
47
47
  export declare const OPEN_APISPEC_PROCESSING_ERROR_CODE_ENUM: ["FETCH_TIMEOUT", "FETCH_ERROR", "PARSE_ERROR"];
48
48
  export declare const CONTENT_REFERENCE_STATUS_ENUM: ["ok", "broken", "in-app"];
49
49
  export declare const CONTENT_REFERENCE_RELATION_ENUM: ["reference", "dependsOn"];
@@ -133,6 +133,13 @@ export declare const SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH = 128;
133
133
  export declare const SITE_SOCIAL_ACCOUNT_HANDLE_MIN_LENGTH = 1;
134
134
  export declare const SHARE_LINK_NAME_MAX_LENGTH = 50;
135
135
  export declare const SHARE_LINK_NAME_MIN_LENGTH = 0;
136
+ export declare const CONTEXT_RECORD_TYPE_ENUM: ["ticket", "document"];
137
+ export declare const CONTEXT_RECORD_TITLE_MAX_LENGTH = 256;
138
+ export declare const CONTEXT_RECORD_TITLE_MIN_LENGTH = 1;
139
+ export declare const CONTEXT_RECORD_DESCRIPTION_MAX_LENGTH = 512;
140
+ export declare const CONTEXT_CONNECTION_LABEL_MAX_LENGTH = 128;
141
+ export declare const CONTEXT_CONNECTION_LABEL_MIN_LENGTH = 0;
142
+ export declare const CONTEXT_CONNECTION_STATUS_ENUM: ["pending", "syncing", "succeeded", "failed"];
136
143
  export declare const AIMODEL_ENUM: ["fast", "reasoning-low", "reasoning-medium", "reasoning-high"];
137
144
  export declare const SITE_INSIGHTS_DISPLAY_CONTEXT_ENUM: ["site", "embed"];
138
145
  export declare const SITE_INSIGHTS_LINK_POSITION_ENUM: ["announcement", "header", "footer", "sidebar", "content"];
@@ -158,7 +165,7 @@ export declare const CLOUDFLARE_HOSTNAME_TLSVALIDATION_METHOD_ENUM: ["http", "tx
158
165
  export declare const SHA256_MAX_LENGTH = 64;
159
166
  export declare const SHA256_MIN_LENGTH = 64;
160
167
  export declare const GIT_BOOK_USERS_ENUM: ["gitbook:agent"];
161
- export declare const REVISION_SEMANTIC_CHANGE_TYPE_ENUM: ["page_created", "page_edited", "page_deleted", "page_moved", "file_created", "file_edited", "file_deleted", "custom_fields_edited"];
168
+ export declare const REVISION_SEMANTIC_CHANGE_TYPE_ENUM: ["page_created", "page_edited", "page_deleted", "page_moved", "file_created", "file_edited", "file_deleted", "custom_fields_edited", "tag_created", "tag_deleted", "tag_edited"];
162
169
  export declare const GIT_SYNC_OPERATION_STATE_ENUM: ["running", "failure", "success"];
163
170
  export declare const GIT_SYNC_OPERATION_DIRECTION_ENUM: ["export", "import"];
164
171
  export declare const GIT_SYNC_OPERATION_STAGE_ENUM: ["repo_fetch", "config_check", "content_process", "finalize"];
package/dist/index.cjs CHANGED
@@ -222,6 +222,13 @@ __export(src_exports, {
222
222
  CONTENT_REFERENCE_RELATION_ENUM: () => CONTENT_REFERENCE_RELATION_ENUM,
223
223
  CONTENT_REFERENCE_STATUS_ENUM: () => CONTENT_REFERENCE_STATUS_ENUM,
224
224
  CONTENT_VISIBILITY_ENUM: () => CONTENT_VISIBILITY_ENUM,
225
+ CONTEXT_CONNECTION_LABEL_MAX_LENGTH: () => CONTEXT_CONNECTION_LABEL_MAX_LENGTH,
226
+ CONTEXT_CONNECTION_LABEL_MIN_LENGTH: () => CONTEXT_CONNECTION_LABEL_MIN_LENGTH,
227
+ CONTEXT_CONNECTION_STATUS_ENUM: () => CONTEXT_CONNECTION_STATUS_ENUM,
228
+ CONTEXT_RECORD_DESCRIPTION_MAX_LENGTH: () => CONTEXT_RECORD_DESCRIPTION_MAX_LENGTH,
229
+ CONTEXT_RECORD_TITLE_MAX_LENGTH: () => CONTEXT_RECORD_TITLE_MAX_LENGTH,
230
+ CONTEXT_RECORD_TITLE_MIN_LENGTH: () => CONTEXT_RECORD_TITLE_MIN_LENGTH,
231
+ CONTEXT_RECORD_TYPE_ENUM: () => CONTEXT_RECORD_TYPE_ENUM,
225
232
  CONVERSATION_ISSUE_IMPACT_ENUM: () => CONVERSATION_ISSUE_IMPACT_ENUM,
226
233
  CUSTOMIZATION_AIMODE_ENUM: () => CUSTOMIZATION_AIMODE_ENUM,
227
234
  CUSTOMIZATION_ANNOUNCEMENT_MESSAGE_MAX_LENGTH: () => CUSTOMIZATION_ANNOUNCEMENT_MESSAGE_MAX_LENGTH,
@@ -259,6 +266,8 @@ __export(src_exports, {
259
266
  ContentReferenceStatus: () => ContentReferenceStatus,
260
267
  ContentType: () => ContentType,
261
268
  ContentVisibility: () => ContentVisibility,
269
+ ContextConnectionStatus: () => ContextConnectionStatus,
270
+ ContextRecordType: () => ContextRecordType,
262
271
  ConversationIssueImpact: () => ConversationIssueImpact,
263
272
  CustomHostnameDnsStatus: () => CustomHostnameDnsStatus,
264
273
  CustomHostnameErrorStatus: () => CustomHostnameErrorStatus,
@@ -455,7 +464,7 @@ module.exports = __toCommonJS(src_exports);
455
464
 
456
465
  // package.json
457
466
  var name = "@gitbook/api";
458
- var version = "0.159.0";
467
+ var version = "0.161.0";
459
468
 
460
469
  // src/client.ts
461
470
  var import_event_iterator = __toESM(require_node(), 1);
@@ -665,6 +674,11 @@ var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
665
674
  VerticalAlignment2["Bottom"] = "bottom";
666
675
  return VerticalAlignment2;
667
676
  })(VerticalAlignment || {});
677
+ var OpenAPISpecVisibility = /* @__PURE__ */ ((OpenAPISpecVisibility2) => {
678
+ OpenAPISpecVisibility2["Private"] = "private";
679
+ OpenAPISpecVisibility2["Public"] = "public";
680
+ return OpenAPISpecVisibility2;
681
+ })(OpenAPISpecVisibility || {});
668
682
  var RevisionPageLayoutOptionsWidth = /* @__PURE__ */ ((RevisionPageLayoutOptionsWidth2) => {
669
683
  RevisionPageLayoutOptionsWidth2["Default"] = "default";
670
684
  RevisionPageLayoutOptionsWidth2["Wide"] = "wide";
@@ -742,11 +756,6 @@ var OpenAPISpecProcessingState = /* @__PURE__ */ ((OpenAPISpecProcessingState2)
742
756
  OpenAPISpecProcessingState2["Complete"] = "complete";
743
757
  return OpenAPISpecProcessingState2;
744
758
  })(OpenAPISpecProcessingState || {});
745
- var OpenAPISpecVisibility = /* @__PURE__ */ ((OpenAPISpecVisibility2) => {
746
- OpenAPISpecVisibility2["Private"] = "private";
747
- OpenAPISpecVisibility2["Public"] = "public";
748
- return OpenAPISpecVisibility2;
749
- })(OpenAPISpecVisibility || {});
750
759
  var OpenAPISpecProcessingErrorCode = /* @__PURE__ */ ((OpenAPISpecProcessingErrorCode2) => {
751
760
  OpenAPISpecProcessingErrorCode2["FETCH_TIMEOUT"] = "FETCH_TIMEOUT";
752
761
  OpenAPISpecProcessingErrorCode2["FETCH_ERROR"] = "FETCH_ERROR";
@@ -1186,6 +1195,18 @@ var SiteSocialAccountPlatform = /* @__PURE__ */ ((SiteSocialAccountPlatform2) =>
1186
1195
  SiteSocialAccountPlatform2["Medium"] = "medium";
1187
1196
  return SiteSocialAccountPlatform2;
1188
1197
  })(SiteSocialAccountPlatform || {});
1198
+ var ContextRecordType = /* @__PURE__ */ ((ContextRecordType2) => {
1199
+ ContextRecordType2["Ticket"] = "ticket";
1200
+ ContextRecordType2["Document"] = "document";
1201
+ return ContextRecordType2;
1202
+ })(ContextRecordType || {});
1203
+ var ContextConnectionStatus = /* @__PURE__ */ ((ContextConnectionStatus2) => {
1204
+ ContextConnectionStatus2["Pending"] = "pending";
1205
+ ContextConnectionStatus2["Syncing"] = "syncing";
1206
+ ContextConnectionStatus2["Succeeded"] = "succeeded";
1207
+ ContextConnectionStatus2["Failed"] = "failed";
1208
+ return ContextConnectionStatus2;
1209
+ })(ContextConnectionStatus || {});
1189
1210
  var AIModel = /* @__PURE__ */ ((AIModel2) => {
1190
1211
  AIModel2["Fast"] = "fast";
1191
1212
  AIModel2["ReasoningLow"] = "reasoning-low";
@@ -1349,6 +1370,9 @@ var RevisionSemanticChangeType = /* @__PURE__ */ ((RevisionSemanticChangeType2)
1349
1370
  RevisionSemanticChangeType2["FileEdited"] = "file_edited";
1350
1371
  RevisionSemanticChangeType2["FileDeleted"] = "file_deleted";
1351
1372
  RevisionSemanticChangeType2["CustomFieldsEdited"] = "custom_fields_edited";
1373
+ RevisionSemanticChangeType2["TagCreated"] = "tag_created";
1374
+ RevisionSemanticChangeType2["TagDeleted"] = "tag_deleted";
1375
+ RevisionSemanticChangeType2["TagEdited"] = "tag_edited";
1352
1376
  return RevisionSemanticChangeType2;
1353
1377
  })(RevisionSemanticChangeType || {});
1354
1378
  var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
@@ -3767,6 +3791,91 @@ var Api = class extends HttpClient {
3767
3791
  secure: true,
3768
3792
  ...params
3769
3793
  }),
3794
+ listSiteContextRecords: (organizationId, siteId, query, params = {}) => this.request({
3795
+ path: `/orgs/${organizationId}/sites/${siteId}/context-records`,
3796
+ method: "GET",
3797
+ query,
3798
+ secure: true,
3799
+ format: "json",
3800
+ ...params
3801
+ }),
3802
+ upsertSiteContextRecords: (organizationId, siteId, data, params = {}) => this.request({
3803
+ path: `/orgs/${organizationId}/sites/${siteId}/context-records`,
3804
+ method: "PUT",
3805
+ body: data,
3806
+ secure: true,
3807
+ type: "application/json" /* Json */,
3808
+ ...params
3809
+ }),
3810
+ listSiteContextConnections: (organizationId, siteId, query, params = {}) => this.request({
3811
+ path: `/orgs/${organizationId}/sites/${siteId}/context-connections`,
3812
+ method: "GET",
3813
+ query,
3814
+ secure: true,
3815
+ format: "json",
3816
+ ...params
3817
+ }),
3818
+ createSiteContextConnection: (organizationId, siteId, data, params = {}) => this.request({
3819
+ path: `/orgs/${organizationId}/sites/${siteId}/context-connections`,
3820
+ method: "POST",
3821
+ body: data,
3822
+ secure: true,
3823
+ type: "application/json" /* Json */,
3824
+ format: "json",
3825
+ ...params
3826
+ }),
3827
+ getSiteContextConnectionById: (organizationId, siteId, siteContextConnectionId, params = {}) => this.request({
3828
+ path: `/orgs/${organizationId}/sites/${siteId}/context-connections/${siteContextConnectionId}`,
3829
+ method: "GET",
3830
+ secure: true,
3831
+ format: "json",
3832
+ ...params
3833
+ }),
3834
+ updateSiteContextConnectionById: (organizationId, siteId, siteContextConnectionId, data, params = {}) => this.request({
3835
+ path: `/orgs/${organizationId}/sites/${siteId}/context-connections/${siteContextConnectionId}`,
3836
+ method: "PATCH",
3837
+ body: data,
3838
+ secure: true,
3839
+ type: "application/json" /* Json */,
3840
+ format: "json",
3841
+ ...params
3842
+ }),
3843
+ deleteSiteContextConnectionById: (organizationId, siteId, siteContextConnectionId, params = {}) => this.request({
3844
+ path: `/orgs/${organizationId}/sites/${siteId}/context-connections/${siteContextConnectionId}`,
3845
+ method: "DELETE",
3846
+ secure: true,
3847
+ ...params
3848
+ }),
3849
+ syncSiteContextConnection: (organizationId, siteId, siteContextConnectionId, params = {}) => this.request({
3850
+ path: `/orgs/${organizationId}/sites/${siteId}/context-connections/${siteContextConnectionId}/sync`,
3851
+ method: "POST",
3852
+ secure: true,
3853
+ ...params
3854
+ }),
3855
+ listSiteContextTopics: (organizationId, siteId, query, params = {}) => this.request({
3856
+ path: `/orgs/${organizationId}/sites/${siteId}/context-topics`,
3857
+ method: "GET",
3858
+ query,
3859
+ secure: true,
3860
+ format: "json",
3861
+ ...params
3862
+ }),
3863
+ getSiteContextTopicById: (organizationId, siteId, siteContextTopicId, params = {}) => this.request({
3864
+ path: `/orgs/${organizationId}/sites/${siteId}/context-topics/${siteContextTopicId}`,
3865
+ method: "GET",
3866
+ secure: true,
3867
+ format: "json",
3868
+ ...params
3869
+ }),
3870
+ updateSiteContextTopicById: (organizationId, siteId, siteContextTopicId, data, params = {}) => this.request({
3871
+ path: `/orgs/${organizationId}/sites/${siteId}/context-topics/${siteContextTopicId}`,
3872
+ method: "PATCH",
3873
+ body: data,
3874
+ secure: true,
3875
+ type: "application/json" /* Json */,
3876
+ format: "json",
3877
+ ...params
3878
+ }),
3770
3879
  updateSiteSpaceById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
3771
3880
  path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}`,
3772
3881
  method: "PATCH",
@@ -3832,6 +3941,14 @@ var Api = class extends HttpClient {
3832
3941
  format: "json",
3833
3942
  ...params
3834
3943
  }),
3944
+ inviteToSite: (organizationId, siteId, data, params = {}) => this.request({
3945
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions`,
3946
+ method: "POST",
3947
+ body: data,
3948
+ secure: true,
3949
+ type: "application/json" /* Json */,
3950
+ ...params
3951
+ }),
3835
3952
  listPermissionsAggregateInSite: (organizationId, siteId, query, params = {}) => this.request({
3836
3953
  path: `/orgs/${organizationId}/sites/${siteId}/permissions/aggregate`,
3837
3954
  method: "GET",
@@ -3840,6 +3957,50 @@ var Api = class extends HttpClient {
3840
3957
  format: "json",
3841
3958
  ...params
3842
3959
  }),
3960
+ listUserPermissionsInSite: (organizationId, siteId, query, params = {}) => this.request({
3961
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/users`,
3962
+ method: "GET",
3963
+ query,
3964
+ secure: true,
3965
+ format: "json",
3966
+ ...params
3967
+ }),
3968
+ updateUserPermissionInSite: (organizationId, siteId, userId, data, params = {}) => this.request({
3969
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/users/${userId}`,
3970
+ method: "PATCH",
3971
+ body: data,
3972
+ secure: true,
3973
+ type: "application/json" /* Json */,
3974
+ ...params
3975
+ }),
3976
+ removeUserFromSite: (organizationId, siteId, userId, params = {}) => this.request({
3977
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/users/${userId}`,
3978
+ method: "DELETE",
3979
+ secure: true,
3980
+ ...params
3981
+ }),
3982
+ listTeamPermissionsInSite: (organizationId, siteId, query, params = {}) => this.request({
3983
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/teams`,
3984
+ method: "GET",
3985
+ query,
3986
+ secure: true,
3987
+ format: "json",
3988
+ ...params
3989
+ }),
3990
+ updateTeamPermissionInSite: (organizationId, siteId, teamId, data, params = {}) => this.request({
3991
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/teams/${teamId}`,
3992
+ method: "PATCH",
3993
+ body: data,
3994
+ secure: true,
3995
+ type: "application/json" /* Json */,
3996
+ ...params
3997
+ }),
3998
+ removeTeamFromSite: (organizationId, siteId, teamId, params = {}) => this.request({
3999
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/teams/${teamId}`,
4000
+ method: "DELETE",
4001
+ secure: true,
4002
+ ...params
4003
+ }),
3843
4004
  streamAiResponseInSite: (organizationId, siteId, data, params = {}) => this.streamRequest({
3844
4005
  path: `/orgs/${organizationId}/sites/${siteId}/ai/response`,
3845
4006
  method: "POST",
@@ -4108,6 +4269,7 @@ var CARDS_IMAGE_OBJECT_FIT_ENUM = ["contain", "fill", "cover"];
4108
4269
  var VERTICAL_ALIGNMENT_ENUM = ["top", "middle", "bottom"];
4109
4270
  var REVISION_PAGE_SLUG_MAX_LENGTH = 100;
4110
4271
  var REVISION_PAGE_SLUG_MIN_LENGTH = 0;
4272
+ var OPEN_APISPEC_VISIBILITY_ENUM = ["private", "public"];
4111
4273
  var REVISION_PAGE_LAYOUT_OPTIONS_WIDTH_ENUM = ["default", "wide"];
4112
4274
  var REVISION_PAGE_LAYOUT_OPTIONS_COVER_SIZE_ENUM = ["hero", "full"];
4113
4275
  var CHANGE_REQUEST_STATUS_ENUM = ["draft", "open", "archived", "merged"];
@@ -4133,7 +4295,6 @@ var OPEN_APISPEC_SLUG_MAX_LENGTH = 100;
4133
4295
  var OPEN_APISPEC_SLUG_MIN_LENGTH = 1;
4134
4296
  var OPEN_APISPEC_SLUG_PATTERN = "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$";
4135
4297
  var OPEN_APISPEC_PROCESSING_STATE_ENUM = ["pending", "progress", "complete"];
4136
- var OPEN_APISPEC_VISIBILITY_ENUM = ["private", "public"];
4137
4298
  var OPEN_APISPEC_PROCESSING_ERROR_CODE_ENUM = ["FETCH_TIMEOUT", "FETCH_ERROR", "PARSE_ERROR"];
4138
4299
  var CONTENT_REFERENCE_STATUS_ENUM = ["ok", "broken", "in-app"];
4139
4300
  var CONTENT_REFERENCE_RELATION_ENUM = ["reference", "dependsOn"];
@@ -4223,6 +4384,13 @@ var SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH = 128;
4223
4384
  var SITE_SOCIAL_ACCOUNT_HANDLE_MIN_LENGTH = 1;
4224
4385
  var SHARE_LINK_NAME_MAX_LENGTH = 50;
4225
4386
  var SHARE_LINK_NAME_MIN_LENGTH = 0;
4387
+ var CONTEXT_RECORD_TYPE_ENUM = ["ticket", "document"];
4388
+ var CONTEXT_RECORD_TITLE_MAX_LENGTH = 256;
4389
+ var CONTEXT_RECORD_TITLE_MIN_LENGTH = 1;
4390
+ var CONTEXT_RECORD_DESCRIPTION_MAX_LENGTH = 512;
4391
+ var CONTEXT_CONNECTION_LABEL_MAX_LENGTH = 128;
4392
+ var CONTEXT_CONNECTION_LABEL_MIN_LENGTH = 0;
4393
+ var CONTEXT_CONNECTION_STATUS_ENUM = ["pending", "syncing", "succeeded", "failed"];
4226
4394
  var AIMODEL_ENUM = ["fast", "reasoning-low", "reasoning-medium", "reasoning-high"];
4227
4395
  var SITE_INSIGHTS_DISPLAY_CONTEXT_ENUM = ["site", "embed"];
4228
4396
  var SITE_INSIGHTS_LINK_POSITION_ENUM = ["announcement", "header", "footer", "sidebar", "content"];
@@ -4248,7 +4416,7 @@ var CLOUDFLARE_HOSTNAME_TLSVALIDATION_METHOD_ENUM = ["http", "txt", "email"];
4248
4416
  var SHA256_MAX_LENGTH = 64;
4249
4417
  var SHA256_MIN_LENGTH = 64;
4250
4418
  var GIT_BOOK_USERS_ENUM = ["gitbook:agent"];
4251
- var REVISION_SEMANTIC_CHANGE_TYPE_ENUM = ["page_created", "page_edited", "page_deleted", "page_moved", "file_created", "file_edited", "file_deleted", "custom_fields_edited"];
4419
+ var REVISION_SEMANTIC_CHANGE_TYPE_ENUM = ["page_created", "page_edited", "page_deleted", "page_moved", "file_created", "file_edited", "file_deleted", "custom_fields_edited", "tag_created", "tag_deleted", "tag_edited"];
4252
4420
  var GIT_SYNC_OPERATION_STATE_ENUM = ["running", "failure", "success"];
4253
4421
  var GIT_SYNC_OPERATION_DIRECTION_ENUM = ["export", "import"];
4254
4422
  var GIT_SYNC_OPERATION_STAGE_ENUM = ["repo_fetch", "config_check", "content_process", "finalize"];
@@ -4370,6 +4538,13 @@ var GitBookAPI = class extends Api {
4370
4538
  CONTENT_REFERENCE_RELATION_ENUM,
4371
4539
  CONTENT_REFERENCE_STATUS_ENUM,
4372
4540
  CONTENT_VISIBILITY_ENUM,
4541
+ CONTEXT_CONNECTION_LABEL_MAX_LENGTH,
4542
+ CONTEXT_CONNECTION_LABEL_MIN_LENGTH,
4543
+ CONTEXT_CONNECTION_STATUS_ENUM,
4544
+ CONTEXT_RECORD_DESCRIPTION_MAX_LENGTH,
4545
+ CONTEXT_RECORD_TITLE_MAX_LENGTH,
4546
+ CONTEXT_RECORD_TITLE_MIN_LENGTH,
4547
+ CONTEXT_RECORD_TYPE_ENUM,
4373
4548
  CONVERSATION_ISSUE_IMPACT_ENUM,
4374
4549
  CUSTOMIZATION_AIMODE_ENUM,
4375
4550
  CUSTOMIZATION_ANNOUNCEMENT_MESSAGE_MAX_LENGTH,
@@ -4407,6 +4582,8 @@ var GitBookAPI = class extends Api {
4407
4582
  ContentReferenceStatus,
4408
4583
  ContentType,
4409
4584
  ContentVisibility,
4585
+ ContextConnectionStatus,
4586
+ ContextRecordType,
4410
4587
  ConversationIssueImpact,
4411
4588
  CustomHostnameDnsStatus,
4412
4589
  CustomHostnameErrorStatus,
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.159.0";
175
+ var version = "0.161.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -382,6 +382,11 @@ var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
382
382
  VerticalAlignment2["Bottom"] = "bottom";
383
383
  return VerticalAlignment2;
384
384
  })(VerticalAlignment || {});
385
+ var OpenAPISpecVisibility = /* @__PURE__ */ ((OpenAPISpecVisibility2) => {
386
+ OpenAPISpecVisibility2["Private"] = "private";
387
+ OpenAPISpecVisibility2["Public"] = "public";
388
+ return OpenAPISpecVisibility2;
389
+ })(OpenAPISpecVisibility || {});
385
390
  var RevisionPageLayoutOptionsWidth = /* @__PURE__ */ ((RevisionPageLayoutOptionsWidth2) => {
386
391
  RevisionPageLayoutOptionsWidth2["Default"] = "default";
387
392
  RevisionPageLayoutOptionsWidth2["Wide"] = "wide";
@@ -459,11 +464,6 @@ var OpenAPISpecProcessingState = /* @__PURE__ */ ((OpenAPISpecProcessingState2)
459
464
  OpenAPISpecProcessingState2["Complete"] = "complete";
460
465
  return OpenAPISpecProcessingState2;
461
466
  })(OpenAPISpecProcessingState || {});
462
- var OpenAPISpecVisibility = /* @__PURE__ */ ((OpenAPISpecVisibility2) => {
463
- OpenAPISpecVisibility2["Private"] = "private";
464
- OpenAPISpecVisibility2["Public"] = "public";
465
- return OpenAPISpecVisibility2;
466
- })(OpenAPISpecVisibility || {});
467
467
  var OpenAPISpecProcessingErrorCode = /* @__PURE__ */ ((OpenAPISpecProcessingErrorCode2) => {
468
468
  OpenAPISpecProcessingErrorCode2["FETCH_TIMEOUT"] = "FETCH_TIMEOUT";
469
469
  OpenAPISpecProcessingErrorCode2["FETCH_ERROR"] = "FETCH_ERROR";
@@ -903,6 +903,18 @@ var SiteSocialAccountPlatform = /* @__PURE__ */ ((SiteSocialAccountPlatform2) =>
903
903
  SiteSocialAccountPlatform2["Medium"] = "medium";
904
904
  return SiteSocialAccountPlatform2;
905
905
  })(SiteSocialAccountPlatform || {});
906
+ var ContextRecordType = /* @__PURE__ */ ((ContextRecordType2) => {
907
+ ContextRecordType2["Ticket"] = "ticket";
908
+ ContextRecordType2["Document"] = "document";
909
+ return ContextRecordType2;
910
+ })(ContextRecordType || {});
911
+ var ContextConnectionStatus = /* @__PURE__ */ ((ContextConnectionStatus2) => {
912
+ ContextConnectionStatus2["Pending"] = "pending";
913
+ ContextConnectionStatus2["Syncing"] = "syncing";
914
+ ContextConnectionStatus2["Succeeded"] = "succeeded";
915
+ ContextConnectionStatus2["Failed"] = "failed";
916
+ return ContextConnectionStatus2;
917
+ })(ContextConnectionStatus || {});
906
918
  var AIModel = /* @__PURE__ */ ((AIModel2) => {
907
919
  AIModel2["Fast"] = "fast";
908
920
  AIModel2["ReasoningLow"] = "reasoning-low";
@@ -1066,6 +1078,9 @@ var RevisionSemanticChangeType = /* @__PURE__ */ ((RevisionSemanticChangeType2)
1066
1078
  RevisionSemanticChangeType2["FileEdited"] = "file_edited";
1067
1079
  RevisionSemanticChangeType2["FileDeleted"] = "file_deleted";
1068
1080
  RevisionSemanticChangeType2["CustomFieldsEdited"] = "custom_fields_edited";
1081
+ RevisionSemanticChangeType2["TagCreated"] = "tag_created";
1082
+ RevisionSemanticChangeType2["TagDeleted"] = "tag_deleted";
1083
+ RevisionSemanticChangeType2["TagEdited"] = "tag_edited";
1069
1084
  return RevisionSemanticChangeType2;
1070
1085
  })(RevisionSemanticChangeType || {});
1071
1086
  var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
@@ -3484,6 +3499,91 @@ var Api = class extends HttpClient {
3484
3499
  secure: true,
3485
3500
  ...params
3486
3501
  }),
3502
+ listSiteContextRecords: (organizationId, siteId, query, params = {}) => this.request({
3503
+ path: `/orgs/${organizationId}/sites/${siteId}/context-records`,
3504
+ method: "GET",
3505
+ query,
3506
+ secure: true,
3507
+ format: "json",
3508
+ ...params
3509
+ }),
3510
+ upsertSiteContextRecords: (organizationId, siteId, data, params = {}) => this.request({
3511
+ path: `/orgs/${organizationId}/sites/${siteId}/context-records`,
3512
+ method: "PUT",
3513
+ body: data,
3514
+ secure: true,
3515
+ type: "application/json" /* Json */,
3516
+ ...params
3517
+ }),
3518
+ listSiteContextConnections: (organizationId, siteId, query, params = {}) => this.request({
3519
+ path: `/orgs/${organizationId}/sites/${siteId}/context-connections`,
3520
+ method: "GET",
3521
+ query,
3522
+ secure: true,
3523
+ format: "json",
3524
+ ...params
3525
+ }),
3526
+ createSiteContextConnection: (organizationId, siteId, data, params = {}) => this.request({
3527
+ path: `/orgs/${organizationId}/sites/${siteId}/context-connections`,
3528
+ method: "POST",
3529
+ body: data,
3530
+ secure: true,
3531
+ type: "application/json" /* Json */,
3532
+ format: "json",
3533
+ ...params
3534
+ }),
3535
+ getSiteContextConnectionById: (organizationId, siteId, siteContextConnectionId, params = {}) => this.request({
3536
+ path: `/orgs/${organizationId}/sites/${siteId}/context-connections/${siteContextConnectionId}`,
3537
+ method: "GET",
3538
+ secure: true,
3539
+ format: "json",
3540
+ ...params
3541
+ }),
3542
+ updateSiteContextConnectionById: (organizationId, siteId, siteContextConnectionId, data, params = {}) => this.request({
3543
+ path: `/orgs/${organizationId}/sites/${siteId}/context-connections/${siteContextConnectionId}`,
3544
+ method: "PATCH",
3545
+ body: data,
3546
+ secure: true,
3547
+ type: "application/json" /* Json */,
3548
+ format: "json",
3549
+ ...params
3550
+ }),
3551
+ deleteSiteContextConnectionById: (organizationId, siteId, siteContextConnectionId, params = {}) => this.request({
3552
+ path: `/orgs/${organizationId}/sites/${siteId}/context-connections/${siteContextConnectionId}`,
3553
+ method: "DELETE",
3554
+ secure: true,
3555
+ ...params
3556
+ }),
3557
+ syncSiteContextConnection: (organizationId, siteId, siteContextConnectionId, params = {}) => this.request({
3558
+ path: `/orgs/${organizationId}/sites/${siteId}/context-connections/${siteContextConnectionId}/sync`,
3559
+ method: "POST",
3560
+ secure: true,
3561
+ ...params
3562
+ }),
3563
+ listSiteContextTopics: (organizationId, siteId, query, params = {}) => this.request({
3564
+ path: `/orgs/${organizationId}/sites/${siteId}/context-topics`,
3565
+ method: "GET",
3566
+ query,
3567
+ secure: true,
3568
+ format: "json",
3569
+ ...params
3570
+ }),
3571
+ getSiteContextTopicById: (organizationId, siteId, siteContextTopicId, params = {}) => this.request({
3572
+ path: `/orgs/${organizationId}/sites/${siteId}/context-topics/${siteContextTopicId}`,
3573
+ method: "GET",
3574
+ secure: true,
3575
+ format: "json",
3576
+ ...params
3577
+ }),
3578
+ updateSiteContextTopicById: (organizationId, siteId, siteContextTopicId, data, params = {}) => this.request({
3579
+ path: `/orgs/${organizationId}/sites/${siteId}/context-topics/${siteContextTopicId}`,
3580
+ method: "PATCH",
3581
+ body: data,
3582
+ secure: true,
3583
+ type: "application/json" /* Json */,
3584
+ format: "json",
3585
+ ...params
3586
+ }),
3487
3587
  updateSiteSpaceById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
3488
3588
  path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}`,
3489
3589
  method: "PATCH",
@@ -3549,6 +3649,14 @@ var Api = class extends HttpClient {
3549
3649
  format: "json",
3550
3650
  ...params
3551
3651
  }),
3652
+ inviteToSite: (organizationId, siteId, data, params = {}) => this.request({
3653
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions`,
3654
+ method: "POST",
3655
+ body: data,
3656
+ secure: true,
3657
+ type: "application/json" /* Json */,
3658
+ ...params
3659
+ }),
3552
3660
  listPermissionsAggregateInSite: (organizationId, siteId, query, params = {}) => this.request({
3553
3661
  path: `/orgs/${organizationId}/sites/${siteId}/permissions/aggregate`,
3554
3662
  method: "GET",
@@ -3557,6 +3665,50 @@ var Api = class extends HttpClient {
3557
3665
  format: "json",
3558
3666
  ...params
3559
3667
  }),
3668
+ listUserPermissionsInSite: (organizationId, siteId, query, params = {}) => this.request({
3669
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/users`,
3670
+ method: "GET",
3671
+ query,
3672
+ secure: true,
3673
+ format: "json",
3674
+ ...params
3675
+ }),
3676
+ updateUserPermissionInSite: (organizationId, siteId, userId, data, params = {}) => this.request({
3677
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/users/${userId}`,
3678
+ method: "PATCH",
3679
+ body: data,
3680
+ secure: true,
3681
+ type: "application/json" /* Json */,
3682
+ ...params
3683
+ }),
3684
+ removeUserFromSite: (organizationId, siteId, userId, params = {}) => this.request({
3685
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/users/${userId}`,
3686
+ method: "DELETE",
3687
+ secure: true,
3688
+ ...params
3689
+ }),
3690
+ listTeamPermissionsInSite: (organizationId, siteId, query, params = {}) => this.request({
3691
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/teams`,
3692
+ method: "GET",
3693
+ query,
3694
+ secure: true,
3695
+ format: "json",
3696
+ ...params
3697
+ }),
3698
+ updateTeamPermissionInSite: (organizationId, siteId, teamId, data, params = {}) => this.request({
3699
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/teams/${teamId}`,
3700
+ method: "PATCH",
3701
+ body: data,
3702
+ secure: true,
3703
+ type: "application/json" /* Json */,
3704
+ ...params
3705
+ }),
3706
+ removeTeamFromSite: (organizationId, siteId, teamId, params = {}) => this.request({
3707
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/teams/${teamId}`,
3708
+ method: "DELETE",
3709
+ secure: true,
3710
+ ...params
3711
+ }),
3560
3712
  streamAiResponseInSite: (organizationId, siteId, data, params = {}) => this.streamRequest({
3561
3713
  path: `/orgs/${organizationId}/sites/${siteId}/ai/response`,
3562
3714
  method: "POST",
@@ -3825,6 +3977,7 @@ var CARDS_IMAGE_OBJECT_FIT_ENUM = ["contain", "fill", "cover"];
3825
3977
  var VERTICAL_ALIGNMENT_ENUM = ["top", "middle", "bottom"];
3826
3978
  var REVISION_PAGE_SLUG_MAX_LENGTH = 100;
3827
3979
  var REVISION_PAGE_SLUG_MIN_LENGTH = 0;
3980
+ var OPEN_APISPEC_VISIBILITY_ENUM = ["private", "public"];
3828
3981
  var REVISION_PAGE_LAYOUT_OPTIONS_WIDTH_ENUM = ["default", "wide"];
3829
3982
  var REVISION_PAGE_LAYOUT_OPTIONS_COVER_SIZE_ENUM = ["hero", "full"];
3830
3983
  var CHANGE_REQUEST_STATUS_ENUM = ["draft", "open", "archived", "merged"];
@@ -3850,7 +4003,6 @@ var OPEN_APISPEC_SLUG_MAX_LENGTH = 100;
3850
4003
  var OPEN_APISPEC_SLUG_MIN_LENGTH = 1;
3851
4004
  var OPEN_APISPEC_SLUG_PATTERN = "^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$";
3852
4005
  var OPEN_APISPEC_PROCESSING_STATE_ENUM = ["pending", "progress", "complete"];
3853
- var OPEN_APISPEC_VISIBILITY_ENUM = ["private", "public"];
3854
4006
  var OPEN_APISPEC_PROCESSING_ERROR_CODE_ENUM = ["FETCH_TIMEOUT", "FETCH_ERROR", "PARSE_ERROR"];
3855
4007
  var CONTENT_REFERENCE_STATUS_ENUM = ["ok", "broken", "in-app"];
3856
4008
  var CONTENT_REFERENCE_RELATION_ENUM = ["reference", "dependsOn"];
@@ -3940,6 +4092,13 @@ var SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH = 128;
3940
4092
  var SITE_SOCIAL_ACCOUNT_HANDLE_MIN_LENGTH = 1;
3941
4093
  var SHARE_LINK_NAME_MAX_LENGTH = 50;
3942
4094
  var SHARE_LINK_NAME_MIN_LENGTH = 0;
4095
+ var CONTEXT_RECORD_TYPE_ENUM = ["ticket", "document"];
4096
+ var CONTEXT_RECORD_TITLE_MAX_LENGTH = 256;
4097
+ var CONTEXT_RECORD_TITLE_MIN_LENGTH = 1;
4098
+ var CONTEXT_RECORD_DESCRIPTION_MAX_LENGTH = 512;
4099
+ var CONTEXT_CONNECTION_LABEL_MAX_LENGTH = 128;
4100
+ var CONTEXT_CONNECTION_LABEL_MIN_LENGTH = 0;
4101
+ var CONTEXT_CONNECTION_STATUS_ENUM = ["pending", "syncing", "succeeded", "failed"];
3943
4102
  var AIMODEL_ENUM = ["fast", "reasoning-low", "reasoning-medium", "reasoning-high"];
3944
4103
  var SITE_INSIGHTS_DISPLAY_CONTEXT_ENUM = ["site", "embed"];
3945
4104
  var SITE_INSIGHTS_LINK_POSITION_ENUM = ["announcement", "header", "footer", "sidebar", "content"];
@@ -3965,7 +4124,7 @@ var CLOUDFLARE_HOSTNAME_TLSVALIDATION_METHOD_ENUM = ["http", "txt", "email"];
3965
4124
  var SHA256_MAX_LENGTH = 64;
3966
4125
  var SHA256_MIN_LENGTH = 64;
3967
4126
  var GIT_BOOK_USERS_ENUM = ["gitbook:agent"];
3968
- var REVISION_SEMANTIC_CHANGE_TYPE_ENUM = ["page_created", "page_edited", "page_deleted", "page_moved", "file_created", "file_edited", "file_deleted", "custom_fields_edited"];
4127
+ var REVISION_SEMANTIC_CHANGE_TYPE_ENUM = ["page_created", "page_edited", "page_deleted", "page_moved", "file_created", "file_edited", "file_deleted", "custom_fields_edited", "tag_created", "tag_deleted", "tag_edited"];
3969
4128
  var GIT_SYNC_OPERATION_STATE_ENUM = ["running", "failure", "success"];
3970
4129
  var GIT_SYNC_OPERATION_DIRECTION_ENUM = ["export", "import"];
3971
4130
  var GIT_SYNC_OPERATION_STAGE_ENUM = ["repo_fetch", "config_check", "content_process", "finalize"];
@@ -4086,6 +4245,13 @@ export {
4086
4245
  CONTENT_REFERENCE_RELATION_ENUM,
4087
4246
  CONTENT_REFERENCE_STATUS_ENUM,
4088
4247
  CONTENT_VISIBILITY_ENUM,
4248
+ CONTEXT_CONNECTION_LABEL_MAX_LENGTH,
4249
+ CONTEXT_CONNECTION_LABEL_MIN_LENGTH,
4250
+ CONTEXT_CONNECTION_STATUS_ENUM,
4251
+ CONTEXT_RECORD_DESCRIPTION_MAX_LENGTH,
4252
+ CONTEXT_RECORD_TITLE_MAX_LENGTH,
4253
+ CONTEXT_RECORD_TITLE_MIN_LENGTH,
4254
+ CONTEXT_RECORD_TYPE_ENUM,
4089
4255
  CONVERSATION_ISSUE_IMPACT_ENUM,
4090
4256
  CUSTOMIZATION_AIMODE_ENUM,
4091
4257
  CUSTOMIZATION_ANNOUNCEMENT_MESSAGE_MAX_LENGTH,
@@ -4123,6 +4289,8 @@ export {
4123
4289
  ContentReferenceStatus,
4124
4290
  ContentType,
4125
4291
  ContentVisibility,
4292
+ ContextConnectionStatus,
4293
+ ContextRecordType,
4126
4294
  ConversationIssueImpact,
4127
4295
  CustomHostnameDnsStatus,
4128
4296
  CustomHostnameErrorStatus,
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.159.0",
7
+ "version": "0.161.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
@@ -48,5 +48,9 @@
48
48
  },
49
49
  "./spec/openapi.json": "./spec/openapi.json",
50
50
  "./spec/openapi.yaml": "./spec/openapi.yaml"
51
+ },
52
+ "publishConfig": {
53
+ "access": "public",
54
+ "registry": "https://registry.npmjs.org/"
51
55
  }
52
56
  }