@gitbook/api 0.169.0 → 0.170.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
@@ -4339,6 +4339,11 @@ export interface Site {
4339
4339
  * @format uri
4340
4340
  */
4341
4341
  preview: string;
4342
+ /**
4343
+ * URL of the login endpoint for visitors to authenticate with the site auth backend.
4344
+ * @format uri
4345
+ */
4346
+ login?: string;
4342
4347
  };
4343
4348
  }
4344
4349
  export type IntegrationSiteInstallation = IntegrationContentInstallationBase & {
@@ -4711,8 +4716,8 @@ export interface CreateOrganization {
4711
4716
  * @maxLength 128
4712
4717
  */
4713
4718
  export type SiteSectionTitle = string;
4714
- /** Localized string value, keyed by locale. Contains overrides for non-default languages only. */
4715
- export type LocalizedString = Record<TranslationLanguage, string>;
4719
+ /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
4720
+ export type LocalizedTitle = Record<TranslationLanguage, string>;
4716
4721
  /**
4717
4722
  * Description of the site section
4718
4723
  * @minLength 0
@@ -4744,8 +4749,8 @@ export interface SiteSpace {
4744
4749
  section?: string;
4745
4750
  space: Space;
4746
4751
  title: string;
4747
- /** Localized string value, keyed by locale. Contains overrides for non-default languages only. */
4748
- localizedTitle?: LocalizedString;
4752
+ /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
4753
+ localizedTitle?: LocalizedTitle;
4749
4754
  /** Whether this is the default space for the site */
4750
4755
  default?: boolean;
4751
4756
  /** Conditional expression used to evaluate whether the site space should be shown to the site's visitor. */
@@ -4770,8 +4775,8 @@ export interface SiteSection {
4770
4775
  id: string;
4771
4776
  /** Title of the site section */
4772
4777
  title: SiteSectionTitle;
4773
- /** Localized string value, keyed by locale. Contains overrides for non-default languages only. */
4774
- localizedTitle?: LocalizedString;
4778
+ /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
4779
+ localizedTitle?: LocalizedTitle;
4775
4780
  /** Description of the site section */
4776
4781
  description?: SiteSectionDescription;
4777
4782
  /** Localized section description value, keyed by locale. Contains overrides for non-default languages only. */
@@ -4809,8 +4814,8 @@ export interface SiteSectionGroup {
4809
4814
  id: string;
4810
4815
  /** Title of the site section group */
4811
4816
  title: SiteSectionGroupTitle;
4812
- /** Localized string value, keyed by locale. Contains overrides for non-default languages only. */
4813
- localizedTitle?: LocalizedString;
4817
+ /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
4818
+ localizedTitle?: LocalizedTitle;
4814
4819
  /**
4815
4820
  * List of site section ids that are members of the group. Use `children` instead.
4816
4821
  * @deprecated
@@ -5001,8 +5006,8 @@ export interface UpgradeOrganizationBilling {
5001
5006
  reason?: string;
5002
5007
  /** Coupon or promotion code to apply to the subscription */
5003
5008
  coupon?: BillingCoupon;
5004
- /** Mode to use for the upgrade (default value is `commit`): - `auto`: user is redirect to checkout if possible, other a preview of the auto-upgrade is returned. - `commit`: a checkout session is returned or an auto-upgrade is done - `preview`: a preview invoice is always returned */
5005
- mode?: "auto" | "commit" | "preview";
5009
+ /** Mode to use for the upgrade (default value is `commit`): - `commit`: a checkout session is returned or the upgrade is applied directly - `preview`: a preview invoice is always returned */
5010
+ mode?: "commit" | "preview";
5006
5011
  }
5007
5012
  export interface BillingInvoicePreview {
5008
5013
  /** Amount of the invoice */
@@ -13322,8 +13327,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13322
13327
  updateSiteSectionGroupById: (organizationId: EntityId, siteId: string, siteSectionGroupId: string, data: {
13323
13328
  /** Title of the site section group */
13324
13329
  title?: SiteSectionGroupTitle;
13325
- /** Localized string value, keyed by locale. Contains overrides for non-default languages only. */
13326
- localizedTitle?: LocalizedString;
13330
+ /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
13331
+ localizedTitle?: LocalizedTitle;
13327
13332
  icon?: Icon | null;
13328
13333
  }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, any>>;
13329
13334
  /**
@@ -13409,8 +13414,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13409
13414
  updateSiteSectionById: (organizationId: EntityId, siteId: string, siteSectionId: string, data: {
13410
13415
  /** Title of the site section */
13411
13416
  title?: SiteSectionTitle;
13412
- /** Localized string value, keyed by locale. Contains overrides for non-default languages only. */
13413
- localizedTitle?: LocalizedString;
13417
+ /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
13418
+ localizedTitle?: LocalizedTitle;
13414
13419
  /** Path to the section on the site */
13415
13420
  path?: SiteSectionPath;
13416
13421
  /** ID of the site-space to be used as the default in this section. */
@@ -13863,6 +13868,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13863
13868
  type?: SiteQuestionType;
13864
13869
  /** Filter questions by answer resolution. */
13865
13870
  answered?: SiteQuestionAnswerResolution;
13871
+ /** Filter questions by associated site topic ID. */
13872
+ topic?: string;
13866
13873
  /** Identifier of the page results to fetch. */
13867
13874
  page?: string;
13868
13875
  /**
@@ -14067,7 +14074,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14067
14074
  /** Title to use for the published site variant. If not defined, the title will not be changed. If set to null, the title will be unset and will fallback to the content title. */
14068
14075
  title?: SiteTitle | null;
14069
14076
  /** Localized titles for the site variant, keyed by locale. If not defined, the localized title will not be changed. If set to null, all localized titles will be removed. */
14070
- localizedTitle?: LocalizedString | null;
14077
+ localizedTitle?: LocalizedTitle | null;
14071
14078
  styling?: {
14072
14079
  /** The site theme. Set to null to reset the override. */
14073
14080
  theme?: CustomizationTheme | null;
package/dist/index.cjs CHANGED
@@ -486,7 +486,7 @@ module.exports = __toCommonJS(src_exports);
486
486
 
487
487
  // package.json
488
488
  var name = "@gitbook/api";
489
- var version = "0.169.0";
489
+ var version = "0.170.0";
490
490
 
491
491
  // src/client.ts
492
492
  var import_event_iterator = __toESM(require_node(), 1);
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.169.0";
175
+ var version = "0.170.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
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.169.0",
7
+ "version": "0.170.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -13156,7 +13156,7 @@
13156
13156
  "$ref": "#/components/schemas/SiteSectionGroupTitle"
13157
13157
  },
13158
13158
  "localizedTitle": {
13159
- "$ref": "#/components/schemas/LocalizedString"
13159
+ "$ref": "#/components/schemas/LocalizedTitle"
13160
13160
  },
13161
13161
  "icon": {
13162
13162
  "oneOf": [
@@ -13492,7 +13492,7 @@
13492
13492
  "$ref": "#/components/schemas/SiteSectionTitle"
13493
13493
  },
13494
13494
  "localizedTitle": {
13495
- "$ref": "#/components/schemas/LocalizedString"
13495
+ "$ref": "#/components/schemas/LocalizedTitle"
13496
13496
  },
13497
13497
  "path": {
13498
13498
  "$ref": "#/components/schemas/SiteSectionPath"
@@ -15003,6 +15003,14 @@
15003
15003
  "$ref": "#/components/schemas/SiteQuestionAnswerResolution"
15004
15004
  }
15005
15005
  },
15006
+ {
15007
+ "name": "topic",
15008
+ "in": "query",
15009
+ "description": "Filter questions by associated site topic ID.",
15010
+ "schema": {
15011
+ "type": "string"
15012
+ }
15013
+ },
15006
15014
  {
15007
15015
  "$ref": "#/components/parameters/listPage"
15008
15016
  },
@@ -15661,7 +15669,7 @@
15661
15669
  "description": "Localized titles for the site variant, keyed by locale. If not defined, the localized title will not be changed. If set to null, all localized titles will be removed.",
15662
15670
  "oneOf": [
15663
15671
  {
15664
- "$ref": "#/components/schemas/LocalizedString"
15672
+ "$ref": "#/components/schemas/LocalizedTitle"
15665
15673
  },
15666
15674
  {
15667
15675
  "type": "null"
@@ -31567,6 +31575,11 @@
31567
31575
  "type": "string",
31568
31576
  "description": "URL of the preview version of the site.",
31569
31577
  "format": "uri"
31578
+ },
31579
+ "login": {
31580
+ "type": "string",
31581
+ "description": "URL of the login endpoint for visitors to authenticate with the site auth backend.\n",
31582
+ "format": "uri"
31570
31583
  }
31571
31584
  },
31572
31585
  "required": [
@@ -33034,10 +33047,9 @@
33034
33047
  "minLength": 2,
33035
33048
  "maxLength": 128
33036
33049
  },
33037
- "LocalizedString": {
33050
+ "LocalizedTitle": {
33038
33051
  "type": "object",
33039
- "description": "Localized string value, keyed by locale. Contains overrides for non-default languages only.",
33040
- "x-typescript": "Partial<Record<TranslationLanguage, string>>",
33052
+ "description": "Localized title value, keyed by locale. Contains overrides for non-default languages only.",
33041
33053
  "additionalProperties": {
33042
33054
  "type": "string",
33043
33055
  "maxLength": 128
@@ -33055,7 +33067,6 @@
33055
33067
  "LocalizedSectionDescription": {
33056
33068
  "type": "object",
33057
33069
  "description": "Localized section description value, keyed by locale. Contains overrides for non-default languages only.",
33058
- "x-typescript": "Partial<Record<TranslationLanguage, string>>",
33059
33070
  "additionalProperties": {
33060
33071
  "type": "string",
33061
33072
  "maxLength": 256
@@ -33104,7 +33115,7 @@
33104
33115
  "type": "string"
33105
33116
  },
33106
33117
  "localizedTitle": {
33107
- "$ref": "#/components/schemas/LocalizedString"
33118
+ "$ref": "#/components/schemas/LocalizedTitle"
33108
33119
  },
33109
33120
  "default": {
33110
33121
  "type": "boolean",
@@ -33161,7 +33172,7 @@
33161
33172
  "$ref": "#/components/schemas/SiteSectionTitle"
33162
33173
  },
33163
33174
  "localizedTitle": {
33164
- "$ref": "#/components/schemas/LocalizedString"
33175
+ "$ref": "#/components/schemas/LocalizedTitle"
33165
33176
  },
33166
33177
  "description": {
33167
33178
  "$ref": "#/components/schemas/SiteSectionDescription"
@@ -33238,7 +33249,7 @@
33238
33249
  "$ref": "#/components/schemas/SiteSectionGroupTitle"
33239
33250
  },
33240
33251
  "localizedTitle": {
33241
- "$ref": "#/components/schemas/LocalizedString"
33252
+ "$ref": "#/components/schemas/LocalizedTitle"
33242
33253
  },
33243
33254
  "sections": {
33244
33255
  "type": "array",
@@ -33848,9 +33859,8 @@
33848
33859
  },
33849
33860
  "mode": {
33850
33861
  "type": "string",
33851
- "description": "Mode to use for the upgrade (default value is `commit`): - `auto`: user is redirect to checkout if possible, other a preview of the auto-upgrade is returned. - `commit`: a checkout session is returned or an auto-upgrade is done - `preview`: a preview invoice is always returned\n",
33862
+ "description": "Mode to use for the upgrade (default value is `commit`): - `commit`: a checkout session is returned or the upgrade is applied directly - `preview`: a preview invoice is always returned\n",
33852
33863
  "enum": [
33853
- "auto",
33854
33864
  "commit",
33855
33865
  "preview"
33856
33866
  ]
package/spec/openapi.yaml CHANGED
@@ -7470,7 +7470,7 @@ paths:
7470
7470
  title:
7471
7471
  $ref: "#/components/schemas/SiteSectionGroupTitle"
7472
7472
  localizedTitle:
7473
- $ref: "#/components/schemas/LocalizedString"
7473
+ $ref: "#/components/schemas/LocalizedTitle"
7474
7474
  icon:
7475
7475
  oneOf:
7476
7476
  - $ref: "#/components/schemas/Icon"
@@ -7646,7 +7646,7 @@ paths:
7646
7646
  title:
7647
7647
  $ref: "#/components/schemas/SiteSectionTitle"
7648
7648
  localizedTitle:
7649
- $ref: "#/components/schemas/LocalizedString"
7649
+ $ref: "#/components/schemas/LocalizedTitle"
7650
7650
  path:
7651
7651
  $ref: "#/components/schemas/SiteSectionPath"
7652
7652
  defaultSiteSpace:
@@ -8449,6 +8449,11 @@ paths:
8449
8449
  description: Filter questions by answer resolution.
8450
8450
  schema:
8451
8451
  $ref: "#/components/schemas/SiteQuestionAnswerResolution"
8452
+ - name: topic
8453
+ in: query
8454
+ description: Filter questions by associated site topic ID.
8455
+ schema:
8456
+ type: string
8452
8457
  - $ref: "#/components/parameters/listPage"
8453
8458
  - $ref: "#/components/parameters/listLimit"
8454
8459
  responses:
@@ -8801,7 +8806,7 @@ paths:
8801
8806
  localizedTitle:
8802
8807
  description: Localized titles for the site variant, keyed by locale. If not defined, the localized title will not be changed. If set to null, all localized titles will be removed.
8803
8808
  oneOf:
8804
- - $ref: "#/components/schemas/LocalizedString"
8809
+ - $ref: "#/components/schemas/LocalizedTitle"
8805
8810
  - type: "null"
8806
8811
  styling:
8807
8812
  type: object
@@ -19004,6 +19009,11 @@ components:
19004
19009
  type: string
19005
19010
  description: URL of the preview version of the site.
19006
19011
  format: uri
19012
+ login:
19013
+ type: string
19014
+ description: |
19015
+ URL of the login endpoint for visitors to authenticate with the site auth backend.
19016
+ format: uri
19007
19017
  required:
19008
19018
  - app
19009
19019
  - location
@@ -19926,10 +19936,9 @@ components:
19926
19936
  description: Title of the site section
19927
19937
  minLength: 2
19928
19938
  maxLength: 128
19929
- LocalizedString:
19939
+ LocalizedTitle:
19930
19940
  type: object
19931
- description: Localized string value, keyed by locale. Contains overrides for non-default languages only.
19932
- x-typescript: Partial<Record<TranslationLanguage, string>>
19941
+ description: Localized title value, keyed by locale. Contains overrides for non-default languages only.
19933
19942
  additionalProperties:
19934
19943
  type: string
19935
19944
  maxLength: 128
@@ -19943,7 +19952,6 @@ components:
19943
19952
  LocalizedSectionDescription:
19944
19953
  type: object
19945
19954
  description: Localized section description value, keyed by locale. Contains overrides for non-default languages only.
19946
- x-typescript: Partial<Record<TranslationLanguage, string>>
19947
19955
  additionalProperties:
19948
19956
  type: string
19949
19957
  maxLength: 256
@@ -19980,7 +19988,7 @@ components:
19980
19988
  title:
19981
19989
  type: string
19982
19990
  localizedTitle:
19983
- $ref: "#/components/schemas/LocalizedString"
19991
+ $ref: "#/components/schemas/LocalizedTitle"
19984
19992
  default:
19985
19993
  type: boolean
19986
19994
  description: Whether this is the default space for the site
@@ -20022,7 +20030,7 @@ components:
20022
20030
  title:
20023
20031
  $ref: "#/components/schemas/SiteSectionTitle"
20024
20032
  localizedTitle:
20025
- $ref: "#/components/schemas/LocalizedString"
20033
+ $ref: "#/components/schemas/LocalizedTitle"
20026
20034
  description:
20027
20035
  $ref: "#/components/schemas/SiteSectionDescription"
20028
20036
  localizedDescription:
@@ -20078,7 +20086,7 @@ components:
20078
20086
  title:
20079
20087
  $ref: "#/components/schemas/SiteSectionGroupTitle"
20080
20088
  localizedTitle:
20081
- $ref: "#/components/schemas/LocalizedString"
20089
+ $ref: "#/components/schemas/LocalizedTitle"
20082
20090
  sections:
20083
20091
  type: array
20084
20092
  deprecated: true
@@ -20487,9 +20495,8 @@ components:
20487
20495
  mode:
20488
20496
  type: string
20489
20497
  description: |
20490
- Mode to use for the upgrade (default value is `commit`): - `auto`: user is redirect to checkout if possible, other a preview of the auto-upgrade is returned. - `commit`: a checkout session is returned or an auto-upgrade is done - `preview`: a preview invoice is always returned
20498
+ Mode to use for the upgrade (default value is `commit`): - `commit`: a checkout session is returned or the upgrade is applied directly - `preview`: a preview invoice is always returned
20491
20499
  enum:
20492
- - auto
20493
20500
  - commit
20494
20501
  - preview
20495
20502
  required: