@gitbook/api 0.132.0 → 0.134.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
@@ -277,6 +277,8 @@ export interface Space {
277
277
  merge: boolean;
278
278
  /** Can the user review change requests. */
279
279
  review: boolean;
280
+ /** Can the user install integrations in the space. */
281
+ installIntegration: boolean;
280
282
  };
281
283
  }
282
284
  export interface SpacePointer {
@@ -780,6 +782,8 @@ export interface DocumentTableViewCards {
780
782
  targetDefinition?: string;
781
783
  /** Definition ID to use as a cover image */
782
784
  coverDefinition?: string;
785
+ /** Definition ID to use as a dark mode cover image */
786
+ coverDefinitionDark?: string;
783
787
  /** Should we display the column title or not */
784
788
  hideColumnTitle?: boolean;
785
789
  }
@@ -827,7 +831,10 @@ export type DocumentTableDefinitionSelect = DocumentTableDefinitionBase & {
827
831
  export type DocumentTableDefinitionContentRef = DocumentTableDefinitionBase & {
828
832
  type: 'content-ref';
829
833
  };
830
- export type DocumentTableDefinition = DocumentTableDefinitionText | DocumentTableDefinitionNumber | DocumentTableDefinitionCheckbox | DocumentTableDefinitionFiles | DocumentTableDefinitionUsers | DocumentTableDefinitionRating | DocumentTableDefinitionSelect | DocumentTableDefinitionContentRef;
834
+ export type DocumentTableDefinitionImage = DocumentTableDefinitionBase & {
835
+ type: 'image';
836
+ };
837
+ export type DocumentTableDefinition = DocumentTableDefinitionText | DocumentTableDefinitionNumber | DocumentTableDefinitionCheckbox | DocumentTableDefinitionFiles | DocumentTableDefinitionUsers | DocumentTableDefinitionRating | DocumentTableDefinitionSelect | DocumentTableDefinitionContentRef | DocumentTableDefinitionImage;
831
838
  export interface DocumentFragment {
832
839
  object: 'fragment';
833
840
  key?: string;
@@ -1862,6 +1869,8 @@ export interface Organization {
1862
1869
  listIntegrations: boolean;
1863
1870
  /** Can the user list the integration installations in the organization. */
1864
1871
  listInstallations: boolean;
1872
+ /** Can the user install integrations in the organization. */
1873
+ installIntegration: boolean;
1865
1874
  };
1866
1875
  }
1867
1876
  export interface ContentLocationRevisionContext {
@@ -2717,8 +2726,6 @@ export interface Integration {
2717
2726
  /** The set of permissions for the integration */
2718
2727
  permissions: {
2719
2728
  admin: boolean;
2720
- /** Integration can be installed whatever the permissions of the user. */
2721
- install: boolean;
2722
2729
  };
2723
2730
  /**
2724
2731
  * Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
@@ -11257,6 +11264,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11257
11264
  * @secure
11258
11265
  */
11259
11266
  deleteTranslation: (organizationId: string, translationId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
11267
+ /**
11268
+ * No description
11269
+ *
11270
+ * @tags translations
11271
+ * @name RunTranslation
11272
+ * @summary Run a translation again
11273
+ * @request POST:/orgs/{organizationId}/translations/{translationId}/run
11274
+ * @secure
11275
+ */
11276
+ runTranslation: (organizationId: string, translationId: string, params?: RequestParams) => Promise<HttpResponse<void, {
11277
+ error: {
11278
+ /** @format int32 */
11279
+ code: 404;
11280
+ message: string;
11281
+ };
11282
+ }>>;
11260
11283
  /**
11261
11284
  * No description
11262
11285
  *
@@ -12168,7 +12191,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12168
12191
  * @secure
12169
12192
  */
12170
12193
  streamRecommendedQuestionsInSite: (organizationId: string, siteId: string, query?: {
12171
- /** The ID of the space to filter the recommended questions for. */
12194
+ /** The ID of the site space to filter the recommended questions for. */
12195
+ siteSpaceId?: string;
12196
+ /**
12197
+ * The ID of the space to filter the recommended questions for.
12198
+ * @deprecated
12199
+ */
12172
12200
  spaceId?: string;
12173
12201
  }, params?: RequestParams) => EventIterator<SearchAIRecommendedQuestionStream>;
12174
12202
  /**
package/dist/index.cjs CHANGED
@@ -279,7 +279,7 @@ module.exports = __toCommonJS(src_exports);
279
279
 
280
280
  // package.json
281
281
  var name = "@gitbook/api";
282
- var version = "0.132.0";
282
+ var version = "0.134.0";
283
283
 
284
284
  // src/client.ts
285
285
  var import_event_iterator = __toESM(require_node(), 1);
@@ -3038,6 +3038,12 @@ var Api = class extends HttpClient {
3038
3038
  secure: true,
3039
3039
  ...params
3040
3040
  }),
3041
+ runTranslation: (organizationId, translationId, params = {}) => this.request({
3042
+ path: `/orgs/${organizationId}/translations/${translationId}/run`,
3043
+ method: "POST",
3044
+ secure: true,
3045
+ ...params
3046
+ }),
3041
3047
  listGlossaryEntries: (organizationId, query, params = {}) => this.request({
3042
3048
  path: `/orgs/${organizationId}/translations-glossary`,
3043
3049
  method: "GET",
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.132.0";
175
+ var version = "0.134.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -2931,6 +2931,12 @@ var Api = class extends HttpClient {
2931
2931
  secure: true,
2932
2932
  ...params
2933
2933
  }),
2934
+ runTranslation: (organizationId, translationId, params = {}) => this.request({
2935
+ path: `/orgs/${organizationId}/translations/${translationId}/run`,
2936
+ method: "POST",
2937
+ secure: true,
2938
+ ...params
2939
+ }),
2934
2940
  listGlossaryEntries: (organizationId, query, params = {}) => this.request({
2935
2941
  path: `/orgs/${organizationId}/translations-glossary`,
2936
2942
  method: "GET",
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.132.0",
7
+ "version": "0.134.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -11184,6 +11184,37 @@
11184
11184
  }
11185
11185
  }
11186
11186
  },
11187
+ "/orgs/{organizationId}/translations/{translationId}/run": {
11188
+ "post": {
11189
+ "operationId": "runTranslation",
11190
+ "summary": "Run a translation again",
11191
+ "tags": [
11192
+ "translations"
11193
+ ],
11194
+ "security": [
11195
+ {
11196
+ "user": []
11197
+ }
11198
+ ],
11199
+ "parameters": [
11200
+ {
11201
+ "$ref": "#/components/parameters/organizationId"
11202
+ },
11203
+ {
11204
+ "$ref": "#/components/parameters/translationId"
11205
+ }
11206
+ ],
11207
+ "responses": {
11208
+ "204": {
11209
+ "description": "Translation run triggered"
11210
+ },
11211
+ "404": {
11212
+ "description": "No matching translation found",
11213
+ "$ref": "#/components/responses/NotFoundError"
11214
+ }
11215
+ }
11216
+ }
11217
+ },
11187
11218
  "/orgs/{organizationId}/translations-glossary": {
11188
11219
  "get": {
11189
11220
  "operationId": "listGlossaryEntries",
@@ -13921,10 +13952,19 @@
13921
13952
  {
13922
13953
  "$ref": "#/components/parameters/siteId"
13923
13954
  },
13955
+ {
13956
+ "name": "siteSpaceId",
13957
+ "in": "query",
13958
+ "description": "The ID of the site space to filter the recommended questions for.",
13959
+ "schema": {
13960
+ "type": "string"
13961
+ }
13962
+ },
13924
13963
  {
13925
13964
  "name": "spaceId",
13926
13965
  "in": "query",
13927
13966
  "description": "The ID of the space to filter the recommended questions for.",
13967
+ "deprecated": true,
13928
13968
  "schema": {
13929
13969
  "type": "string"
13930
13970
  }
@@ -17520,6 +17560,10 @@
17520
17560
  "review": {
17521
17561
  "type": "boolean",
17522
17562
  "description": "Can the user review change requests."
17563
+ },
17564
+ "installIntegration": {
17565
+ "type": "boolean",
17566
+ "description": "Can the user install integrations in the space."
17523
17567
  }
17524
17568
  },
17525
17569
  "required": [
@@ -17531,7 +17575,8 @@
17531
17575
  "triggerGitSync",
17532
17576
  "comment",
17533
17577
  "merge",
17534
- "review"
17578
+ "review",
17579
+ "installIntegration"
17535
17580
  ]
17536
17581
  }
17537
17582
  },
@@ -19539,6 +19584,10 @@
19539
19584
  "type": "string",
19540
19585
  "description": "Definition ID to use as a cover image"
19541
19586
  },
19587
+ "coverDefinitionDark": {
19588
+ "type": "string",
19589
+ "description": "Definition ID to use as a dark mode cover image"
19590
+ },
19542
19591
  "hideColumnTitle": {
19543
19592
  "type": "boolean",
19544
19593
  "description": "Should we display the column title or not"
@@ -19826,6 +19875,27 @@
19826
19875
  }
19827
19876
  ]
19828
19877
  },
19878
+ "DocumentTableDefinitionImage": {
19879
+ "allOf": [
19880
+ {
19881
+ "$ref": "#/components/schemas/DocumentTableDefinitionBase"
19882
+ },
19883
+ {
19884
+ "type": "object",
19885
+ "properties": {
19886
+ "type": {
19887
+ "type": "string",
19888
+ "enum": [
19889
+ "image"
19890
+ ]
19891
+ }
19892
+ },
19893
+ "required": [
19894
+ "type"
19895
+ ]
19896
+ }
19897
+ ]
19898
+ },
19829
19899
  "DocumentTableDefinition": {
19830
19900
  "oneOf": [
19831
19901
  {
@@ -19851,6 +19921,9 @@
19851
19921
  },
19852
19922
  {
19853
19923
  "$ref": "#/components/schemas/DocumentTableDefinitionContentRef"
19924
+ },
19925
+ {
19926
+ "$ref": "#/components/schemas/DocumentTableDefinitionImage"
19854
19927
  }
19855
19928
  ]
19856
19929
  },
@@ -23916,6 +23989,10 @@
23916
23989
  "listInstallations": {
23917
23990
  "type": "boolean",
23918
23991
  "description": "Can the user list the integration installations in the organization."
23992
+ },
23993
+ "installIntegration": {
23994
+ "type": "boolean",
23995
+ "description": "Can the user install integrations in the organization."
23919
23996
  }
23920
23997
  },
23921
23998
  "required": [
@@ -23929,7 +24006,8 @@
23929
24006
  "listMembers",
23930
24007
  "listTeams",
23931
24008
  "listIntegrations",
23932
- "listInstallations"
24009
+ "listInstallations",
24010
+ "installIntegration"
23933
24011
  ]
23934
24012
  }
23935
24013
  },
@@ -26350,15 +26428,10 @@
26350
26428
  "properties": {
26351
26429
  "admin": {
26352
26430
  "type": "boolean"
26353
- },
26354
- "install": {
26355
- "description": "Integration can be installed whatever the permissions of the user.",
26356
- "type": "boolean"
26357
26431
  }
26358
26432
  },
26359
26433
  "required": [
26360
- "admin",
26361
- "install"
26434
+ "admin"
26362
26435
  ]
26363
26436
  },
26364
26437
  "contentSecurityPolicy": {
package/spec/openapi.yaml CHANGED
@@ -6344,6 +6344,23 @@ paths:
6344
6344
  description: Translation did not exist
6345
6345
  "205":
6346
6346
  description: Translation has been deleted
6347
+ "/orgs/{organizationId}/translations/{translationId}/run":
6348
+ post:
6349
+ operationId: runTranslation
6350
+ summary: Run a translation again
6351
+ tags:
6352
+ - translations
6353
+ security:
6354
+ - user: []
6355
+ parameters:
6356
+ - $ref: "#/components/parameters/organizationId"
6357
+ - $ref: "#/components/parameters/translationId"
6358
+ responses:
6359
+ "204":
6360
+ description: Translation run triggered
6361
+ "404":
6362
+ description: No matching translation found
6363
+ $ref: "#/components/responses/NotFoundError"
6347
6364
  "/orgs/{organizationId}/translations-glossary":
6348
6365
  get:
6349
6366
  operationId: listGlossaryEntries
@@ -7872,9 +7889,15 @@ paths:
7872
7889
  parameters:
7873
7890
  - $ref: "#/components/parameters/organizationId"
7874
7891
  - $ref: "#/components/parameters/siteId"
7892
+ - name: siteSpaceId
7893
+ in: query
7894
+ description: The ID of the site space to filter the recommended questions for.
7895
+ schema:
7896
+ type: string
7875
7897
  - name: spaceId
7876
7898
  in: query
7877
7899
  description: The ID of the space to filter the recommended questions for.
7900
+ deprecated: true
7878
7901
  schema:
7879
7902
  type: string
7880
7903
  responses:
@@ -10131,6 +10154,9 @@ components:
10131
10154
  review:
10132
10155
  type: boolean
10133
10156
  description: Can the user review change requests.
10157
+ installIntegration:
10158
+ type: boolean
10159
+ description: Can the user install integrations in the space.
10134
10160
  required:
10135
10161
  - view
10136
10162
  - access
@@ -10141,6 +10167,7 @@ components:
10141
10167
  - comment
10142
10168
  - merge
10143
10169
  - review
10170
+ - installIntegration
10144
10171
  required:
10145
10172
  - object
10146
10173
  - id
@@ -11471,6 +11498,9 @@ components:
11471
11498
  coverDefinition:
11472
11499
  type: string
11473
11500
  description: Definition ID to use as a cover image
11501
+ coverDefinitionDark:
11502
+ type: string
11503
+ description: Definition ID to use as a dark mode cover image
11474
11504
  hideColumnTitle:
11475
11505
  type: boolean
11476
11506
  description: Should we display the column title or not
@@ -11636,6 +11666,17 @@ components:
11636
11666
  - content-ref
11637
11667
  required:
11638
11668
  - type
11669
+ DocumentTableDefinitionImage:
11670
+ allOf:
11671
+ - $ref: "#/components/schemas/DocumentTableDefinitionBase"
11672
+ - type: object
11673
+ properties:
11674
+ type:
11675
+ type: string
11676
+ enum:
11677
+ - image
11678
+ required:
11679
+ - type
11639
11680
  DocumentTableDefinition:
11640
11681
  oneOf:
11641
11682
  - $ref: "#/components/schemas/DocumentTableDefinitionText"
@@ -11646,6 +11687,7 @@ components:
11646
11687
  - $ref: "#/components/schemas/DocumentTableDefinitionRating"
11647
11688
  - $ref: "#/components/schemas/DocumentTableDefinitionSelect"
11648
11689
  - $ref: "#/components/schemas/DocumentTableDefinitionContentRef"
11690
+ - $ref: "#/components/schemas/DocumentTableDefinitionImage"
11649
11691
  DocumentFragment:
11650
11692
  type: object
11651
11693
  properties:
@@ -14202,6 +14244,9 @@ components:
14202
14244
  listInstallations:
14203
14245
  type: boolean
14204
14246
  description: Can the user list the integration installations in the organization.
14247
+ installIntegration:
14248
+ type: boolean
14249
+ description: Can the user install integrations in the organization.
14205
14250
  required:
14206
14251
  - view
14207
14252
  - admin
@@ -14214,6 +14259,7 @@ components:
14214
14259
  - listTeams
14215
14260
  - listIntegrations
14216
14261
  - listInstallations
14262
+ - installIntegration
14217
14263
  required:
14218
14264
  - object
14219
14265
  - id
@@ -15867,12 +15913,8 @@ components:
15867
15913
  properties:
15868
15914
  admin:
15869
15915
  type: boolean
15870
- install:
15871
- description: Integration can be installed whatever the permissions of the user.
15872
- type: boolean
15873
15916
  required:
15874
15917
  - admin
15875
- - install
15876
15918
  contentSecurityPolicy:
15877
15919
  $ref: "#/components/schemas/IntegrationContentSecurityPolicy"
15878
15920
  required: