@gitbook/api 0.162.0 → 0.164.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/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.162.0";
175
+ var version = "0.164.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -669,7 +669,6 @@ var BillingSwitchAction = /* @__PURE__ */ ((BillingSwitchAction2) => {
669
669
  BillingSwitchAction2["Upgrade"] = "upgrade";
670
670
  BillingSwitchAction2["UpgradePassive"] = "upgrade_passive";
671
671
  BillingSwitchAction2["Downgrade"] = "downgrade";
672
- BillingSwitchAction2["UndoCancel"] = "undo_cancel";
673
672
  BillingSwitchAction2["SwitchInterval"] = "switch_interval";
674
673
  return BillingSwitchAction2;
675
674
  })(BillingSwitchAction || {});
@@ -915,6 +914,14 @@ var ContextConnectionStatus = /* @__PURE__ */ ((ContextConnectionStatus2) => {
915
914
  ContextConnectionStatus2["Failed"] = "failed";
916
915
  return ContextConnectionStatus2;
917
916
  })(ContextConnectionStatus || {});
917
+ var SiteQuestionType = /* @__PURE__ */ ((SiteQuestionType2) => {
918
+ SiteQuestionType2["Exploring"] = "exploring";
919
+ SiteQuestionType2["HowTo"] = "how-to";
920
+ SiteQuestionType2["Troubleshooting"] = "troubleshooting";
921
+ SiteQuestionType2["Reference"] = "reference";
922
+ SiteQuestionType2["Unknown"] = "unknown";
923
+ return SiteQuestionType2;
924
+ })(SiteQuestionType || {});
918
925
  var SiteQuestionAnswerResolution = /* @__PURE__ */ ((SiteQuestionAnswerResolution2) => {
919
926
  SiteQuestionAnswerResolution2["No"] = "no";
920
927
  SiteQuestionAnswerResolution2["Partially"] = "partially";
@@ -3539,6 +3546,13 @@ var Api = class extends HttpClient {
3539
3546
  type: "application/json" /* Json */,
3540
3547
  ...params
3541
3548
  }),
3549
+ getSiteContextRecordById: (organizationId, siteId, siteContextRecordId, params = {}) => this.request({
3550
+ path: `/orgs/${organizationId}/sites/${siteId}/context-records/${siteContextRecordId}`,
3551
+ method: "GET",
3552
+ secure: true,
3553
+ format: "json",
3554
+ ...params
3555
+ }),
3542
3556
  listSiteContextConnections: (organizationId, siteId, query, params = {}) => this.request({
3543
3557
  path: `/orgs/${organizationId}/sites/${siteId}/context-connections`,
3544
3558
  method: "GET",
@@ -3584,23 +3598,22 @@ var Api = class extends HttpClient {
3584
3598
  secure: true,
3585
3599
  ...params
3586
3600
  }),
3587
- listSiteContextTopics: (organizationId, siteId, query, params = {}) => this.request({
3588
- path: `/orgs/${organizationId}/sites/${siteId}/context-topics`,
3601
+ listSiteTopics: (organizationId, siteId, params = {}) => this.request({
3602
+ path: `/orgs/${organizationId}/sites/${siteId}/topics`,
3589
3603
  method: "GET",
3590
- query,
3591
3604
  secure: true,
3592
3605
  format: "json",
3593
3606
  ...params
3594
3607
  }),
3595
- getSiteContextTopicById: (organizationId, siteId, siteContextTopicId, params = {}) => this.request({
3596
- path: `/orgs/${organizationId}/sites/${siteId}/context-topics/${siteContextTopicId}`,
3608
+ getSiteTopicById: (organizationId, siteId, siteTopicId, params = {}) => this.request({
3609
+ path: `/orgs/${organizationId}/sites/${siteId}/topics/${siteTopicId}`,
3597
3610
  method: "GET",
3598
3611
  secure: true,
3599
3612
  format: "json",
3600
3613
  ...params
3601
3614
  }),
3602
- updateSiteContextTopicById: (organizationId, siteId, siteContextTopicId, data, params = {}) => this.request({
3603
- path: `/orgs/${organizationId}/sites/${siteId}/context-topics/${siteContextTopicId}`,
3615
+ updateSiteTopicById: (organizationId, siteId, siteTopicId, data, params = {}) => this.request({
3616
+ path: `/orgs/${organizationId}/sites/${siteId}/topics/${siteTopicId}`,
3604
3617
  method: "PATCH",
3605
3618
  body: data,
3606
3619
  secure: true,
@@ -3820,6 +3833,15 @@ var Api = class extends HttpClient {
3820
3833
  format: "json",
3821
3834
  ...params
3822
3835
  }),
3836
+ bulkUpsertSiteRedirects: (organizationId, siteId, data, params = {}) => this.request({
3837
+ path: `/orgs/${organizationId}/sites/${siteId}/redirects`,
3838
+ method: "PUT",
3839
+ body: data,
3840
+ secure: true,
3841
+ type: "application/json" /* Json */,
3842
+ format: "json",
3843
+ ...params
3844
+ }),
3823
3845
  listSiteRedirects: (organizationId, siteId, query, params = {}) => this.request({
3824
3846
  path: `/orgs/${organizationId}/sites/${siteId}/redirects`,
3825
3847
  method: "GET",
@@ -4113,7 +4135,9 @@ var SITE_SPACE_PATH_MIN_LENGTH = 1;
4113
4135
  var SITE_SECTION_GROUP_TITLE_MAX_LENGTH = 100;
4114
4136
  var SITE_SECTION_GROUP_TITLE_MIN_LENGTH = 1;
4115
4137
  var TEAM_MEMBER_ROLE_ENUM = ["owner", "member"];
4116
- var BILLING_SWITCH_ACTION_ENUM = ["trial", "upgrade", "upgrade_passive", "downgrade", "undo_cancel", "switch_interval"];
4138
+ var BILLING_COUPON_MAX_LENGTH = 500;
4139
+ var BILLING_COUPON_MIN_LENGTH = 1;
4140
+ var BILLING_SWITCH_ACTION_ENUM = ["trial", "upgrade", "upgrade_passive", "downgrade", "switch_interval"];
4117
4141
  var BILLING_METER_ENUM = ["ai_responses", "ai_agent_responses", "translation_words"];
4118
4142
  var SAMLPROVIDER_LABEL_MAX_LENGTH = 30;
4119
4143
  var SAMLPROVIDER_LABEL_MIN_LENGTH = 1;
@@ -4162,6 +4186,7 @@ var CONTEXT_RECORD_DESCRIPTION_MAX_LENGTH = 512;
4162
4186
  var CONTEXT_CONNECTION_LABEL_MAX_LENGTH = 128;
4163
4187
  var CONTEXT_CONNECTION_LABEL_MIN_LENGTH = 0;
4164
4188
  var CONTEXT_CONNECTION_STATUS_ENUM = ["pending", "syncing", "succeeded", "failed"];
4189
+ var SITE_QUESTION_TYPE_ENUM = ["exploring", "how-to", "troubleshooting", "reference", "unknown"];
4165
4190
  var SITE_QUESTION_ANSWER_RESOLUTION_ENUM = ["no", "partially", "yes"];
4166
4191
  var SITE_QUESTION_ANSWER_CONFIDENCE_ENUM = ["low", "medium", "high"];
4167
4192
  var SITE_QUESTION_ANSWER_RELEVANCE_ENUM = ["relevant", "spam", "off-topic", "unclear"];
@@ -4179,7 +4204,7 @@ var SITE_INSIGHTS_VISITOR_BOT_ENUM = ["unknown", "googlebot", "bingbot", "duckdu
4179
4204
  var SITE_INSIGHTS_QUERY_OPERATOR_ENUM = ["in", "notIn", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"];
4180
4205
  var SITE_INSIGHTS_QUERY_RANGE_PRESET_ENUM = ["lastYear", "last3Months", "last30Days", "last7Days", "last24Hours"];
4181
4206
  var SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH = 512;
4182
- var SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*$";
4207
+ var SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
4183
4208
  var SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
4184
4209
  var SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
4185
4210
  var CUSTOM_HOSTNAME_DNS_STATUS_ENUM = ["dns_passed", "dns_wrong_cname", "dns_no_cname", "dns_cloudflare_proxied", "dns_wrong_caa"];
@@ -4279,6 +4304,8 @@ export {
4279
4304
  APITOKEN_LABEL_MAX_LENGTH,
4280
4305
  AgentStatus,
4281
4306
  Api,
4307
+ BILLING_COUPON_MAX_LENGTH,
4308
+ BILLING_COUPON_MIN_LENGTH,
4282
4309
  BILLING_INTERVAL_ENUM,
4283
4310
  BILLING_METER_ENUM,
4284
4311
  BILLING_PRODUCT_ENUM,
@@ -4497,6 +4524,7 @@ export {
4497
4524
  SITE_QUESTION_ANSWER_RELEVANCE_ENUM,
4498
4525
  SITE_QUESTION_ANSWER_RESOLUTION_ENUM,
4499
4526
  SITE_QUESTION_ANSWER_SOURCE_TYPE_ENUM,
4527
+ SITE_QUESTION_TYPE_ENUM,
4500
4528
  SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH,
4501
4529
  SITE_REDIRECT_SOURCE_PATH_PATTERN,
4502
4530
  SITE_SECTION_DESCRIPTION_MAX_LENGTH,
@@ -4542,6 +4570,7 @@ export {
4542
4570
  SiteQuestionAnswerRelevance,
4543
4571
  SiteQuestionAnswerResolution,
4544
4572
  SiteQuestionAnswerSourceType,
4573
+ SiteQuestionType,
4545
4574
  SiteSocialAccountPlatform,
4546
4575
  SiteType,
4547
4576
  SiteVisibility,
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.162.0",
7
+ "version": "0.164.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",