@gitbook/api 0.155.0 → 0.157.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
@@ -1100,7 +1100,7 @@ export interface DocumentBlockExpandable {
1100
1100
  fragment: 'expandable-body';
1101
1101
  type: 'expandable-body';
1102
1102
  /** @minItems 1 */
1103
- nodes: (DocumentBlocksEssentials | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockQuote | DocumentBlockReusableContent)[];
1103
+ nodes: (DocumentBlocksEssentials | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockQuote | DocumentBlockReusableContent)[];
1104
1104
  }))[];
1105
1105
  meta?: {
1106
1106
  /** Unique ID to be used in an URL for the block. */
@@ -2758,11 +2758,17 @@ export interface IntegrationContentSource {
2758
2758
  /** ContentKit component for configuration */
2759
2759
  configuration: IntegrationConfigurationComponent;
2760
2760
  }
2761
+ /**
2762
+ * Property title for an integration configuration property
2763
+ * @minLength 2
2764
+ * @maxLength 50
2765
+ */
2766
+ export type IntegrationPropertyTitle = string;
2761
2767
  /** Schema for a configuration */
2762
2768
  export interface IntegrationConfigurationSchema {
2763
2769
  properties: Record<string, {
2764
- /** @maxLength 30 */
2765
- title?: string;
2770
+ /** Property title for an integration configuration property */
2771
+ title?: IntegrationPropertyTitle;
2766
2772
  /** @maxLength 100 */
2767
2773
  description?: string;
2768
2774
  } & ({
@@ -5614,7 +5620,14 @@ export interface AIAttachmentImage {
5614
5620
  type: 'image';
5615
5621
  url: URL;
5616
5622
  }
5617
- export type AIAttachment = AIAttachmentImage;
5623
+ export interface AIAttachmentFile {
5624
+ type: 'file';
5625
+ url: URL;
5626
+ /** Name of the file. */
5627
+ filename: string;
5628
+ contentType: 'application/pdf';
5629
+ }
5630
+ export type AIAttachment = AIAttachmentImage | AIAttachmentFile;
5618
5631
  /** Input version of an AI message. */
5619
5632
  export interface AIMessageInput {
5620
5633
  role: 'user';
@@ -5749,6 +5762,13 @@ export interface AIToolCallGetPages {
5749
5762
  /** The revision ID of the space. */
5750
5763
  revisionId: string;
5751
5764
  }
5765
+ export interface AIToolCallGetReusableContents {
5766
+ tool: 'getReusableContents';
5767
+ /** The ID of the space being accessed. */
5768
+ spaceId: string;
5769
+ /** The revision ID of the space. */
5770
+ revisionId: string;
5771
+ }
5752
5772
  /** Result of a search */
5753
5773
  export interface AIToolCallSearchResult {
5754
5774
  /** The ID of the space */
@@ -5905,7 +5925,7 @@ export interface AIToolCallOther {
5905
5925
  /** Summary of a generic tool call. */
5906
5926
  summary: AIToolCallOtherSummary;
5907
5927
  }
5908
- export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetPages | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallCreateChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
5928
+ export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallCreateChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
5909
5929
  /** Message emitted by the server to indicate that the AI has called a tool. */
5910
5930
  export interface AIStreamResponseToolCall {
5911
5931
  type: 'response_tool_call';
@@ -7606,6 +7626,7 @@ export type DocumentTextBackgroundColor = DocumentTextColor;
7606
7626
  export type SpaceVisitorAuth = VisitorAuth;
7607
7627
  export type SpaceVisitorAuthCustomBackend = VisitorAuthCustomBackend;
7608
7628
  export type SpaceVisitorAuthIntegrationBackend = VisitorAuthIntegrationBackend;
7629
+ export type IngegrationPropertyTitle = IntegrationPropertyTitle;
7609
7630
  export type UserPermissions = Index;
7610
7631
  export type SiteRedirectDestinationSpace = SiteRedirectDestinationSiteSpace;
7611
7632
  export type OpenAPISpecSourceURL = URL;
@@ -59,6 +59,8 @@ export declare const INTEGRATION_TARGET_ENUM: ["all", "site", "space", "organiza
59
59
  export declare const INTEGRATION_VISIBILITY_ENUM: ["public", "private", "unlisted"];
60
60
  export declare const INTEGRATION_SCOPE_ENUM: ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:adaptive:read", "site:adaptive:write", "openapi:read", "openapi:write", "conversations:ingest"];
61
61
  export declare const INTEGRATION_CATEGORY_ENUM: ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
62
+ export declare const INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
63
+ export declare const INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
62
64
  export declare const INTEGRATION_INSTALLATION_STATUS_ENUM: ["active", "pending", "paused"];
63
65
  export declare const INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM: ["all", "selected"];
64
66
  export declare const INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM: ["all", "selected"];
package/dist/index.cjs CHANGED
@@ -304,6 +304,8 @@ __export(src_exports, {
304
304
  INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM: () => INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM,
305
305
  INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM: () => INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM,
306
306
  INTEGRATION_INSTALLATION_STATUS_ENUM: () => INTEGRATION_INSTALLATION_STATUS_ENUM,
307
+ INTEGRATION_PROPERTY_TITLE_MAX_LENGTH: () => INTEGRATION_PROPERTY_TITLE_MAX_LENGTH,
308
+ INTEGRATION_PROPERTY_TITLE_MIN_LENGTH: () => INTEGRATION_PROPERTY_TITLE_MIN_LENGTH,
307
309
  INTEGRATION_SCOPE_ENUM: () => INTEGRATION_SCOPE_ENUM,
308
310
  INTEGRATION_SUMMARY_MAX_LENGTH: () => INTEGRATION_SUMMARY_MAX_LENGTH,
309
311
  INTEGRATION_TARGET_ENUM: () => INTEGRATION_TARGET_ENUM,
@@ -447,7 +449,7 @@ module.exports = __toCommonJS(src_exports);
447
449
 
448
450
  // package.json
449
451
  var name = "@gitbook/api";
450
- var version = "0.155.0";
452
+ var version = "0.157.0";
451
453
 
452
454
  // src/client.ts
453
455
  var import_event_iterator = __toESM(require_node(), 1);
@@ -4057,6 +4059,8 @@ var INTEGRATION_TARGET_ENUM = ["all", "site", "space", "organization"];
4057
4059
  var INTEGRATION_VISIBILITY_ENUM = ["public", "private", "unlisted"];
4058
4060
  var INTEGRATION_SCOPE_ENUM = ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:adaptive:read", "site:adaptive:write", "openapi:read", "openapi:write", "conversations:ingest"];
4059
4061
  var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
4062
+ var INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
4063
+ var INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
4060
4064
  var INTEGRATION_INSTALLATION_STATUS_ENUM = ["active", "pending", "paused"];
4061
4065
  var INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM = ["all", "selected"];
4062
4066
  var INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM = ["all", "selected"];
@@ -4354,6 +4358,8 @@ var GitBookAPI = class extends Api {
4354
4358
  INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM,
4355
4359
  INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM,
4356
4360
  INTEGRATION_INSTALLATION_STATUS_ENUM,
4361
+ INTEGRATION_PROPERTY_TITLE_MAX_LENGTH,
4362
+ INTEGRATION_PROPERTY_TITLE_MIN_LENGTH,
4357
4363
  INTEGRATION_SCOPE_ENUM,
4358
4364
  INTEGRATION_SUMMARY_MAX_LENGTH,
4359
4365
  INTEGRATION_TARGET_ENUM,
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.155.0";
175
+ var version = "0.157.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -3782,6 +3782,8 @@ var INTEGRATION_TARGET_ENUM = ["all", "site", "space", "organization"];
3782
3782
  var INTEGRATION_VISIBILITY_ENUM = ["public", "private", "unlisted"];
3783
3783
  var INTEGRATION_SCOPE_ENUM = ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:adaptive:read", "site:adaptive:write", "openapi:read", "openapi:write", "conversations:ingest"];
3784
3784
  var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
3785
+ var INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
3786
+ var INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
3785
3787
  var INTEGRATION_INSTALLATION_STATUS_ENUM = ["active", "pending", "paused"];
3786
3788
  var INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM = ["all", "selected"];
3787
3789
  var INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM = ["all", "selected"];
@@ -4078,6 +4080,8 @@ export {
4078
4080
  INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM,
4079
4081
  INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM,
4080
4082
  INTEGRATION_INSTALLATION_STATUS_ENUM,
4083
+ INTEGRATION_PROPERTY_TITLE_MAX_LENGTH,
4084
+ INTEGRATION_PROPERTY_TITLE_MIN_LENGTH,
4081
4085
  INTEGRATION_SCOPE_ENUM,
4082
4086
  INTEGRATION_SUMMARY_MAX_LENGTH,
4083
4087
  INTEGRATION_TARGET_ENUM,
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.155.0",
7
+ "version": "0.157.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -21540,6 +21540,9 @@
21540
21540
  {
21541
21541
  "$ref": "#/components/schemas/DocumentBlocksEssentials"
21542
21542
  },
21543
+ {
21544
+ "$ref": "#/components/schemas/DocumentBlockFile"
21545
+ },
21543
21546
  {
21544
21547
  "$ref": "#/components/schemas/DocumentBlockImages"
21545
21548
  },
@@ -27058,6 +27061,12 @@
27058
27061
  "configuration"
27059
27062
  ]
27060
27063
  },
27064
+ "IntegrationPropertyTitle": {
27065
+ "type": "string",
27066
+ "description": "Property title for an integration configuration property",
27067
+ "minLength": 2,
27068
+ "maxLength": 50
27069
+ },
27061
27070
  "IntegrationConfigurationSchema": {
27062
27071
  "type": "object",
27063
27072
  "description": "Schema for a configuration",
@@ -27070,8 +27079,7 @@
27070
27079
  "type": "object",
27071
27080
  "properties": {
27072
27081
  "title": {
27073
- "type": "string",
27074
- "maxLength": 30
27082
+ "$ref": "#/components/schemas/IntegrationPropertyTitle"
27075
27083
  },
27076
27084
  "description": {
27077
27085
  "type": "string",
@@ -35263,10 +35271,43 @@
35263
35271
  "url"
35264
35272
  ]
35265
35273
  },
35274
+ "AIAttachmentFile": {
35275
+ "type": "object",
35276
+ "properties": {
35277
+ "type": {
35278
+ "type": "string",
35279
+ "enum": [
35280
+ "file"
35281
+ ]
35282
+ },
35283
+ "url": {
35284
+ "$ref": "#/components/schemas/URL"
35285
+ },
35286
+ "filename": {
35287
+ "type": "string",
35288
+ "description": "Name of the file."
35289
+ },
35290
+ "contentType": {
35291
+ "type": "string",
35292
+ "enum": [
35293
+ "application/pdf"
35294
+ ]
35295
+ }
35296
+ },
35297
+ "required": [
35298
+ "type",
35299
+ "url",
35300
+ "filename",
35301
+ "contentType"
35302
+ ]
35303
+ },
35266
35304
  "AIAttachment": {
35267
35305
  "oneOf": [
35268
35306
  {
35269
35307
  "$ref": "#/components/schemas/AIAttachmentImage"
35308
+ },
35309
+ {
35310
+ "$ref": "#/components/schemas/AIAttachmentFile"
35270
35311
  }
35271
35312
  ]
35272
35313
  },
@@ -35694,6 +35735,30 @@
35694
35735
  "revisionId"
35695
35736
  ]
35696
35737
  },
35738
+ "AIToolCallGetReusableContents": {
35739
+ "type": "object",
35740
+ "properties": {
35741
+ "tool": {
35742
+ "type": "string",
35743
+ "enum": [
35744
+ "getReusableContents"
35745
+ ]
35746
+ },
35747
+ "spaceId": {
35748
+ "type": "string",
35749
+ "description": "The ID of the space being accessed."
35750
+ },
35751
+ "revisionId": {
35752
+ "type": "string",
35753
+ "description": "The revision ID of the space."
35754
+ }
35755
+ },
35756
+ "required": [
35757
+ "tool",
35758
+ "spaceId",
35759
+ "revisionId"
35760
+ ]
35761
+ },
35697
35762
  "AIToolCallSearchResult": {
35698
35763
  "type": "object",
35699
35764
  "description": "Result of a search",
@@ -36212,6 +36277,9 @@
36212
36277
  {
36213
36278
  "$ref": "#/components/schemas/AIToolCallGetPages"
36214
36279
  },
36280
+ {
36281
+ "$ref": "#/components/schemas/AIToolCallGetReusableContents"
36282
+ },
36215
36283
  {
36216
36284
  "$ref": "#/components/schemas/AIToolCallSearch"
36217
36285
  },
@@ -42902,6 +42970,9 @@
42902
42970
  "SpaceVisitorAuthIntegrationBackend": {
42903
42971
  "$ref": "#/components/schemas/VisitorAuthIntegrationBackend"
42904
42972
  },
42973
+ "IngegrationPropertyTitle": {
42974
+ "$ref": "#/components/schemas/IntegrationPropertyTitle"
42975
+ },
42905
42976
  "UserPermissions": {
42906
42977
  "$ref": "#/components/schemas/_index"
42907
42978
  },
package/spec/openapi.yaml CHANGED
@@ -12689,6 +12689,7 @@ components:
12689
12689
  items:
12690
12690
  oneOf:
12691
12691
  - $ref: "#/components/schemas/DocumentBlocksEssentials"
12692
+ - $ref: "#/components/schemas/DocumentBlockFile"
12692
12693
  - $ref: "#/components/schemas/DocumentBlockImages"
12693
12694
  - $ref: "#/components/schemas/DocumentBlockCode"
12694
12695
  - $ref: "#/components/schemas/DocumentBlockTable"
@@ -16281,6 +16282,11 @@ components:
16281
16282
  - id
16282
16283
  - title
16283
16284
  - configuration
16285
+ IntegrationPropertyTitle:
16286
+ type: string
16287
+ description: Property title for an integration configuration property
16288
+ minLength: 2
16289
+ maxLength: 50
16284
16290
  IntegrationConfigurationSchema:
16285
16291
  type: object
16286
16292
  description: Schema for a configuration
@@ -16292,8 +16298,7 @@ components:
16292
16298
  - type: object
16293
16299
  properties:
16294
16300
  title:
16295
- type: string
16296
- maxLength: 30
16301
+ $ref: "#/components/schemas/IntegrationPropertyTitle"
16297
16302
  description:
16298
16303
  type: string
16299
16304
  maxLength: 100
@@ -21812,9 +21817,31 @@ components:
21812
21817
  required:
21813
21818
  - type
21814
21819
  - url
21820
+ AIAttachmentFile:
21821
+ type: object
21822
+ properties:
21823
+ type:
21824
+ type: string
21825
+ enum:
21826
+ - file
21827
+ url:
21828
+ $ref: "#/components/schemas/URL"
21829
+ filename:
21830
+ type: string
21831
+ description: Name of the file.
21832
+ contentType:
21833
+ type: string
21834
+ enum:
21835
+ - application/pdf
21836
+ required:
21837
+ - type
21838
+ - url
21839
+ - filename
21840
+ - contentType
21815
21841
  AIAttachment:
21816
21842
  oneOf:
21817
21843
  - $ref: "#/components/schemas/AIAttachmentImage"
21844
+ - $ref: "#/components/schemas/AIAttachmentFile"
21818
21845
  AIMessageInput:
21819
21846
  type: object
21820
21847
  description: Input version of an AI message.
@@ -22122,6 +22149,23 @@ components:
22122
22149
  - tool
22123
22150
  - spaceId
22124
22151
  - revisionId
22152
+ AIToolCallGetReusableContents:
22153
+ type: object
22154
+ properties:
22155
+ tool:
22156
+ type: string
22157
+ enum:
22158
+ - getReusableContents
22159
+ spaceId:
22160
+ type: string
22161
+ description: The ID of the space being accessed.
22162
+ revisionId:
22163
+ type: string
22164
+ description: The revision ID of the space.
22165
+ required:
22166
+ - tool
22167
+ - spaceId
22168
+ - revisionId
22125
22169
  AIToolCallSearchResult:
22126
22170
  type: object
22127
22171
  description: Result of a search
@@ -22494,6 +22538,7 @@ components:
22494
22538
  oneOf:
22495
22539
  - $ref: "#/components/schemas/AIToolCallGetPageContent"
22496
22540
  - $ref: "#/components/schemas/AIToolCallGetPages"
22541
+ - $ref: "#/components/schemas/AIToolCallGetReusableContents"
22497
22542
  - $ref: "#/components/schemas/AIToolCallSearch"
22498
22543
  - $ref: "#/components/schemas/AIToolCallEditPage"
22499
22544
  - $ref: "#/components/schemas/AIToolCallCreatePage"
@@ -26803,6 +26848,8 @@ components:
26803
26848
  $ref: "#/components/schemas/VisitorAuthCustomBackend"
26804
26849
  SpaceVisitorAuthIntegrationBackend:
26805
26850
  $ref: "#/components/schemas/VisitorAuthIntegrationBackend"
26851
+ IngegrationPropertyTitle:
26852
+ $ref: "#/components/schemas/IntegrationPropertyTitle"
26806
26853
  UserPermissions:
26807
26854
  $ref: "#/components/schemas/_index"
26808
26855
  SiteRedirectDestinationSpace: