@gitbook/api 0.122.0 → 0.124.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
@@ -2360,6 +2360,8 @@ export interface RevisionSemanticChangeReusableContentEdited {
2360
2360
  }
2361
2361
  export type RevisionSemanticChange = RevisionSemanticChangePageCreated | RevisionSemanticChangePageEdited | RevisionSemanticChangePageDeleted | RevisionSemanticChangePageMoved | RevisionSemanticChangeFileCreated | RevisionSemanticChangeFileEdited | RevisionSemanticChangeFileDeleted | RevisionSemanticChangeVariablesEdited | RevisionSemanticChangeReusableContentCreated | RevisionSemanticChangeReusableContentDeleted | RevisionSemanticChangeReusableContentEdited;
2362
2362
  export interface RevisionSemanticChanges {
2363
+ /** The change request object that initiated the changes in the case of a merge revision. */
2364
+ mergedFrom?: ChangeRequest;
2363
2365
  changes: RevisionSemanticChange[];
2364
2366
  /** How many changes were omitted because above the result limit */
2365
2367
  more?: number;
@@ -3314,6 +3316,7 @@ export declare enum ContentKitIcon {
3314
3316
  Link = "link",
3315
3317
  LinkExternal = "link-external",
3316
3318
  Eye = "eye",
3319
+ EyeOff = "eye-off",
3317
3320
  Lock = "lock",
3318
3321
  Check = "check",
3319
3322
  CheckCircle = "check-circle"
@@ -4829,6 +4832,15 @@ export declare enum CustomizationThemeMode {
4829
4832
  Light = "light",
4830
4833
  Dark = "dark"
4831
4834
  }
4835
+ /**
4836
+ * How external links should open when clicked.
4837
+ * - `self`: External links open in the current tab.
4838
+ * - `blank`: External links open in a new browser tab.
4839
+ */
4840
+ export declare enum SiteExternalLinksTarget {
4841
+ Self = "self",
4842
+ Blank = "blank"
4843
+ }
4832
4844
  export interface SiteCustomizationSettings {
4833
4845
  /** Title to use for the published site. If not defined, it'll fallback to the default content title. */
4834
4846
  title?: SiteTitle;
@@ -4947,6 +4959,14 @@ export interface SiteCustomizationSettings {
4947
4959
  /** Whether the published site should show a link to edit the content on the git provider set up in the Git Sync */
4948
4960
  showEditLink: boolean;
4949
4961
  };
4962
+ externalLinks: {
4963
+ /**
4964
+ * How external links should open when clicked.
4965
+ * - `self`: External links open in the current tab.
4966
+ * - `blank`: External links open in a new browser tab.
4967
+ */
4968
+ target: SiteExternalLinksTarget;
4969
+ };
4950
4970
  pagination: {
4951
4971
  /** Whether the pagination navigation should be displayed on pages. */
4952
4972
  enabled: boolean;
@@ -12005,6 +12025,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12005
12025
  /** Whether the published site should show a link to edit the content on the git provider set up in the Git Sync. Set to null to reset the override. */
12006
12026
  showEditLink: boolean | null;
12007
12027
  };
12028
+ externalLinks?: {
12029
+ /** How external links should open. Set to null to reset the override. */
12030
+ target: SiteExternalLinksTarget | null;
12031
+ };
12008
12032
  pagination?: {
12009
12033
  /** Whether the pagination navigation should be displayed on pages. Set to null to reset the override. */
12010
12034
  enabled: boolean | null;
@@ -12163,6 +12187,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12163
12187
  /** Tools provided to the AI */
12164
12188
  tools?: AIToolCapabilities;
12165
12189
  }, params?: RequestParams) => EventIterator<AIStreamResponse>;
12190
+ /**
12191
+ * @description Experimental operation to get an existing AI response in a site.
12192
+ *
12193
+ * @tags sites
12194
+ * @name StreamExistingAiResponseInSite
12195
+ * @summary Get an existing AI response in a site
12196
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/ai/response/{responseId}
12197
+ * @secure
12198
+ */
12199
+ streamExistingAiResponseInSite: (organizationId: string, siteId: string, responseId: string, params?: RequestParams) => EventIterator<AIStreamResponse>;
12166
12200
  /**
12167
12201
  * No description
12168
12202
  *
package/dist/index.cjs CHANGED
@@ -249,6 +249,7 @@ __export(src_exports, {
249
249
  SiteAdsTopic: () => SiteAdsTopic,
250
250
  SiteAgentsContext: () => SiteAgentsContext,
251
251
  SiteCustomizationFeature: () => SiteCustomizationFeature,
252
+ SiteExternalLinksTarget: () => SiteExternalLinksTarget,
252
253
  SiteFeatureKey: () => SiteFeatureKey,
253
254
  SiteInsightsAdPlacement: () => SiteInsightsAdPlacement,
254
255
  SiteInsightsEventType: () => SiteInsightsEventType,
@@ -272,7 +273,7 @@ module.exports = __toCommonJS(src_exports);
272
273
 
273
274
  // package.json
274
275
  var name = "@gitbook/api";
275
- var version = "0.122.0";
276
+ var version = "0.124.0";
276
277
 
277
278
  // src/client.ts
278
279
  var import_event_iterator = __toESM(require_node(), 1);
@@ -716,6 +717,7 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
716
717
  ContentKitIcon2["Link"] = "link";
717
718
  ContentKitIcon2["LinkExternal"] = "link-external";
718
719
  ContentKitIcon2["Eye"] = "eye";
720
+ ContentKitIcon2["EyeOff"] = "eye-off";
719
721
  ContentKitIcon2["Lock"] = "lock";
720
722
  ContentKitIcon2["Check"] = "check";
721
723
  ContentKitIcon2["CheckCircle"] = "check-circle";
@@ -846,6 +848,11 @@ var CustomizationThemeMode = /* @__PURE__ */ ((CustomizationThemeMode2) => {
846
848
  CustomizationThemeMode2["Dark"] = "dark";
847
849
  return CustomizationThemeMode2;
848
850
  })(CustomizationThemeMode || {});
851
+ var SiteExternalLinksTarget = /* @__PURE__ */ ((SiteExternalLinksTarget2) => {
852
+ SiteExternalLinksTarget2["Self"] = "self";
853
+ SiteExternalLinksTarget2["Blank"] = "blank";
854
+ return SiteExternalLinksTarget2;
855
+ })(SiteExternalLinksTarget || {});
849
856
  var AIMessageRole = /* @__PURE__ */ ((AIMessageRole2) => {
850
857
  AIMessageRole2["User"] = "user";
851
858
  AIMessageRole2["Assistant"] = "assistant";
@@ -3428,6 +3435,12 @@ var Api = class extends HttpClient {
3428
3435
  type: "application/json" /* Json */,
3429
3436
  ...params
3430
3437
  }),
3438
+ streamExistingAiResponseInSite: (organizationId, siteId, responseId, params = {}) => this.streamRequest({
3439
+ path: `/orgs/${organizationId}/sites/${siteId}/ai/response/${responseId}`,
3440
+ method: "GET",
3441
+ secure: true,
3442
+ ...params
3443
+ }),
3431
3444
  trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3432
3445
  path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
3433
3446
  method: "POST",
@@ -3749,6 +3762,7 @@ var GitBookAPI = class extends Api {
3749
3762
  SiteAdsTopic,
3750
3763
  SiteAgentsContext,
3751
3764
  SiteCustomizationFeature,
3765
+ SiteExternalLinksTarget,
3752
3766
  SiteFeatureKey,
3753
3767
  SiteInsightsAdPlacement,
3754
3768
  SiteInsightsEventType,
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.122.0";
175
+ var version = "0.124.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -616,6 +616,7 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
616
616
  ContentKitIcon2["Link"] = "link";
617
617
  ContentKitIcon2["LinkExternal"] = "link-external";
618
618
  ContentKitIcon2["Eye"] = "eye";
619
+ ContentKitIcon2["EyeOff"] = "eye-off";
619
620
  ContentKitIcon2["Lock"] = "lock";
620
621
  ContentKitIcon2["Check"] = "check";
621
622
  ContentKitIcon2["CheckCircle"] = "check-circle";
@@ -746,6 +747,11 @@ var CustomizationThemeMode = /* @__PURE__ */ ((CustomizationThemeMode2) => {
746
747
  CustomizationThemeMode2["Dark"] = "dark";
747
748
  return CustomizationThemeMode2;
748
749
  })(CustomizationThemeMode || {});
750
+ var SiteExternalLinksTarget = /* @__PURE__ */ ((SiteExternalLinksTarget2) => {
751
+ SiteExternalLinksTarget2["Self"] = "self";
752
+ SiteExternalLinksTarget2["Blank"] = "blank";
753
+ return SiteExternalLinksTarget2;
754
+ })(SiteExternalLinksTarget || {});
749
755
  var AIMessageRole = /* @__PURE__ */ ((AIMessageRole2) => {
750
756
  AIMessageRole2["User"] = "user";
751
757
  AIMessageRole2["Assistant"] = "assistant";
@@ -3328,6 +3334,12 @@ var Api = class extends HttpClient {
3328
3334
  type: "application/json" /* Json */,
3329
3335
  ...params
3330
3336
  }),
3337
+ streamExistingAiResponseInSite: (organizationId, siteId, responseId, params = {}) => this.streamRequest({
3338
+ path: `/orgs/${organizationId}/sites/${siteId}/ai/response/${responseId}`,
3339
+ method: "GET",
3340
+ secure: true,
3341
+ ...params
3342
+ }),
3331
3343
  trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3332
3344
  path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
3333
3345
  method: "POST",
@@ -3648,6 +3660,7 @@ export {
3648
3660
  SiteAdsTopic,
3649
3661
  SiteAgentsContext,
3650
3662
  SiteCustomizationFeature,
3663
+ SiteExternalLinksTarget,
3651
3664
  SiteFeatureKey,
3652
3665
  SiteInsightsAdPlacement,
3653
3666
  SiteInsightsEventType,
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.122.0",
7
+ "version": "0.124.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -14373,6 +14373,29 @@
14373
14373
  "showEditLink"
14374
14374
  ]
14375
14375
  },
14376
+ "externalLinks": {
14377
+ "type": "object",
14378
+ "properties": {
14379
+ "target": {
14380
+ "description": "How external links should open. Set to null to reset the override.",
14381
+ "oneOf": [
14382
+ {
14383
+ "$ref": "#/components/schemas/SiteExternalLinksTarget"
14384
+ },
14385
+ {
14386
+ "type": "string",
14387
+ "nullable": true,
14388
+ "enum": [
14389
+ null
14390
+ ]
14391
+ }
14392
+ ]
14393
+ }
14394
+ },
14395
+ "required": [
14396
+ "target"
14397
+ ]
14398
+ },
14376
14399
  "pagination": {
14377
14400
  "type": "object",
14378
14401
  "properties": {
@@ -14808,6 +14831,51 @@
14808
14831
  }
14809
14832
  }
14810
14833
  },
14834
+ "/orgs/{organizationId}/sites/{siteId}/ai/response/{responseId}": {
14835
+ "get": {
14836
+ "operationId": "streamExistingAIResponseInSite",
14837
+ "summary": "Get an existing AI response in a site",
14838
+ "description": "Experimental operation to get an existing AI response in a site.\n",
14839
+ "tags": [
14840
+ "sites"
14841
+ ],
14842
+ "x-internal": true,
14843
+ "security": [
14844
+ {
14845
+ "user": []
14846
+ }
14847
+ ],
14848
+ "parameters": [
14849
+ {
14850
+ "$ref": "#/components/parameters/organizationId"
14851
+ },
14852
+ {
14853
+ "$ref": "#/components/parameters/siteId"
14854
+ },
14855
+ {
14856
+ "name": "responseId",
14857
+ "in": "path",
14858
+ "required": true,
14859
+ "description": "The unique id of the AI response",
14860
+ "schema": {
14861
+ "type": "string"
14862
+ }
14863
+ }
14864
+ ],
14865
+ "responses": {
14866
+ "200": {
14867
+ "description": "OK",
14868
+ "content": {
14869
+ "text/event-stream": {
14870
+ "schema": {
14871
+ "$ref": "#/components/schemas/AIStreamResponse"
14872
+ }
14873
+ }
14874
+ }
14875
+ }
14876
+ }
14877
+ }
14878
+ },
14811
14879
  "/orgs/{organizationId}/sites/{siteId}/insights/events": {
14812
14880
  "post": {
14813
14881
  "operationId": "trackEventsInSiteById",
@@ -24903,6 +24971,10 @@
24903
24971
  "RevisionSemanticChanges": {
24904
24972
  "type": "object",
24905
24973
  "properties": {
24974
+ "mergedFrom": {
24975
+ "description": "The change request object that initiated the changes in the case of a merge revision.",
24976
+ "$ref": "#/components/schemas/ChangeRequest"
24977
+ },
24906
24978
  "changes": {
24907
24979
  "type": "array",
24908
24980
  "items": {
@@ -27493,6 +27565,7 @@
27493
27565
  "link",
27494
27566
  "link-external",
27495
27567
  "eye",
27568
+ "eye-off",
27496
27569
  "lock",
27497
27570
  "check",
27498
27571
  "check-circle"
@@ -31914,6 +31987,14 @@
31914
31987
  "dark"
31915
31988
  ]
31916
31989
  },
31990
+ "SiteExternalLinksTarget": {
31991
+ "type": "string",
31992
+ "description": "How external links should open when clicked.\n- `self`: External links open in the current tab.\n- `blank`: External links open in a new browser tab.\n",
31993
+ "enum": [
31994
+ "self",
31995
+ "blank"
31996
+ ]
31997
+ },
31917
31998
  "SiteCustomizationSettings": {
31918
31999
  "type": "object",
31919
32000
  "properties": {
@@ -32166,6 +32247,17 @@
32166
32247
  "showEditLink"
32167
32248
  ]
32168
32249
  },
32250
+ "externalLinks": {
32251
+ "type": "object",
32252
+ "properties": {
32253
+ "target": {
32254
+ "$ref": "#/components/schemas/SiteExternalLinksTarget"
32255
+ }
32256
+ },
32257
+ "required": [
32258
+ "target"
32259
+ ]
32260
+ },
32169
32261
  "pagination": {
32170
32262
  "type": "object",
32171
32263
  "properties": {
@@ -32232,6 +32324,7 @@
32232
32324
  "aiSearch",
32233
32325
  "advancedCustomization",
32234
32326
  "trademark",
32327
+ "externalLinks",
32235
32328
  "pagination",
32236
32329
  "git",
32237
32330
  "privacyPolicy",
package/spec/openapi.yaml CHANGED
@@ -8108,6 +8108,19 @@ paths:
8108
8108
  nullable: true
8109
8109
  required:
8110
8110
  - showEditLink
8111
+ externalLinks:
8112
+ type: object
8113
+ properties:
8114
+ target:
8115
+ description: How external links should open. Set to null to reset the override.
8116
+ oneOf:
8117
+ - $ref: "#/components/schemas/SiteExternalLinksTarget"
8118
+ - type: string
8119
+ nullable: true
8120
+ enum:
8121
+ - null
8122
+ required:
8123
+ - target
8111
8124
  pagination:
8112
8125
  type: object
8113
8126
  properties:
@@ -8354,6 +8367,33 @@ paths:
8354
8367
  text/event-stream:
8355
8368
  schema:
8356
8369
  $ref: "#/components/schemas/AIStreamResponse"
8370
+ "/orgs/{organizationId}/sites/{siteId}/ai/response/{responseId}":
8371
+ get:
8372
+ operationId: streamExistingAIResponseInSite
8373
+ summary: Get an existing AI response in a site
8374
+ description: |
8375
+ Experimental operation to get an existing AI response in a site.
8376
+ tags:
8377
+ - sites
8378
+ x-internal: true
8379
+ security:
8380
+ - user: []
8381
+ parameters:
8382
+ - $ref: "#/components/parameters/organizationId"
8383
+ - $ref: "#/components/parameters/siteId"
8384
+ - name: responseId
8385
+ in: path
8386
+ required: true
8387
+ description: The unique id of the AI response
8388
+ schema:
8389
+ type: string
8390
+ responses:
8391
+ "200":
8392
+ description: OK
8393
+ content:
8394
+ text/event-stream:
8395
+ schema:
8396
+ $ref: "#/components/schemas/AIStreamResponse"
8357
8397
  "/orgs/{organizationId}/sites/{siteId}/insights/events":
8358
8398
  post:
8359
8399
  operationId: trackEventsInSiteById
@@ -14909,6 +14949,9 @@ components:
14909
14949
  RevisionSemanticChanges:
14910
14950
  type: object
14911
14951
  properties:
14952
+ mergedFrom:
14953
+ description: The change request object that initiated the changes in the case of a merge revision.
14954
+ $ref: "#/components/schemas/ChangeRequest"
14912
14955
  changes:
14913
14956
  type: array
14914
14957
  items:
@@ -16638,6 +16681,7 @@ components:
16638
16681
  - link
16639
16682
  - link-external
16640
16683
  - eye
16684
+ - eye-off
16641
16685
  - lock
16642
16686
  - check
16643
16687
  - check-circle
@@ -19658,6 +19702,15 @@ components:
19658
19702
  enum:
19659
19703
  - light
19660
19704
  - dark
19705
+ SiteExternalLinksTarget:
19706
+ type: string
19707
+ description: |
19708
+ How external links should open when clicked.
19709
+ - `self`: External links open in the current tab.
19710
+ - `blank`: External links open in a new browser tab.
19711
+ enum:
19712
+ - self
19713
+ - blank
19661
19714
  SiteCustomizationSettings:
19662
19715
  type: object
19663
19716
  properties:
@@ -19834,6 +19887,13 @@ components:
19834
19887
  description: Whether the published site should show a link to edit the content on the git provider set up in the Git Sync
19835
19888
  required:
19836
19889
  - showEditLink
19890
+ externalLinks:
19891
+ type: object
19892
+ properties:
19893
+ target:
19894
+ $ref: "#/components/schemas/SiteExternalLinksTarget"
19895
+ required:
19896
+ - target
19837
19897
  pagination:
19838
19898
  type: object
19839
19899
  properties:
@@ -19881,6 +19941,7 @@ components:
19881
19941
  - aiSearch
19882
19942
  - advancedCustomization
19883
19943
  - trademark
19944
+ - externalLinks
19884
19945
  - pagination
19885
19946
  - git
19886
19947
  - privacyPolicy