@gitbook/api 0.207.0 → 0.208.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/spec/openapi.json CHANGED
@@ -4023,7 +4023,7 @@
4023
4023
  "post": {
4024
4024
  "operationId": "updateChangeRequestContent",
4025
4025
  "summary": "Apply a batch of content changes to a change request",
4026
- "description": "Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, rename, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request.\n**Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`.\n**Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time.\nTo put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `![Alt](./<ref>)` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead.\n**Reusable content** (snippets shared by several pages, Git Sync's `.gitbook/includes/`) is created with `insert_reusable_contents`, changed with `update_reusable_content` and removed with `delete_reusable_content`. A page includes one in markdown as `{% include \"/reusable-content/<reusableContentId>\" %}`; give a new one a `ref` and a page in the same batch can include it as `{% include \"./<ref>\" %}`, regardless of operation order. Created reusable contents are listed as `insertedReusableContents` when `compat=false`. An update keeps the ID, so every page including it shows the change. Deleting one leaves the includes in pages unresolved, as in the editor: remove them from those pages too. Reusable content cannot include other reusable content, so an include in its document is dropped. Unlike a link, an include that matches no reusable content of the change request (or of the batch) rejects the batch, since dropping it would remove it from the page silently.\n**Publishing an OpenAPI spec** — an OpenAPI spec belongs to the organization (see `createOpenAPISpec`) and appears in a space only through a page that renders it. Insert that page with an `insert_computed_page` change: `{ \"operation\": \"insert_computed_page\", \"title\": \"API reference\", \"computed\": { \"type\": \"builtin:openapi\", \"props\": { \"models\": true }, \"dependencies\": { \"spec\": { \"ref\": { \"kind\": \"openapi\", \"spec\": \"<spec slug>\" } } } } }`. GitBook replaces that page, at its position, with the API reference: one page per tag (or per operation with `\"grouping\": \"by-operation\"` in `props`), plus a models page when `models` is true, regenerated whenever the spec changes. Use `into` to nest the reference under an existing page. Do not recreate a spec with `insert_page`: `openapi-operation` blocks in a document only render the operations they name.\nWhen page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by:\n- Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`).\n- Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>`\n for a nested page (e.g. `/pages/guides/getting-started`).\n\n- Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page,\n or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is\n `/pages/README.md`.\n\n- Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`,\n `../other.md`, or `../README.md` (the parent page). Folder-style links without an\n extension (e.g. `./section`) resolve to that folder's page.\n\nExternal URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail.\nGitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content.\nFor change requests with frequent concurrent edits, consider `expectedRevision` to protect against overwriting changes made since your read. If the branch has changed since the supplied revision, the batch is rejected with HTTP 409 and none of the submitted changes are applied.\n**Response shape (`compat`)** — this endpoint is changing what it returns:\n- `compat=true` (current default) returns the updated change request, matching the endpoint's\n original behavior.\n\n- `compat=false` returns the updated change request **and** the list of affected pages (see\n the response schema).\n\nThe default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.",
4026
+ "description": "Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, rename, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request.\n**Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`.\n**Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time.\nTo put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `![Alt](./<ref>)` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead.\n**Reusable content** (snippets shared by several pages, Git Sync's `.gitbook/includes/`) is created with `insert_reusable_contents`, changed with `update_reusable_content` and removed with `delete_reusable_content`. A page includes one in markdown as `{% include \"/reusable-content/<reusableContentId>\" %}`; give a new one a `ref` and a page in the same batch can include it as `{% include \"./<ref>\" %}`, regardless of operation order. Created reusable contents are listed as `insertedReusableContents` when `compat=false`. An update keeps the ID, so every page including it shows the change. Deleting one leaves the includes in pages unresolved, as in the editor: remove them from those pages too. Reusable content cannot include other reusable content, so an include in its document is dropped. Unlike a link, an include that matches no reusable content of the change request (or of the batch) rejects the batch, since dropping it would remove it from the page silently.\n**Variables** (space variables, Git Sync's `.gitbook/vars.yaml`) are created with `insert_variables` and changed with `update_variable`. A variable is identified by its name, which content references as an expression: `<code class=\"expression\">space.vars.<name></code>` in markdown. Inserting a name the change request already uses, or updating one it does not, rejects the batch.\n**Publishing an OpenAPI spec** — an OpenAPI spec belongs to the organization (see `createOpenAPISpec`) and appears in a space only through a page that renders it. Insert that page with an `insert_computed_page` change: `{ \"operation\": \"insert_computed_page\", \"title\": \"API reference\", \"computed\": { \"type\": \"builtin:openapi\", \"props\": { \"models\": true }, \"dependencies\": { \"spec\": { \"ref\": { \"kind\": \"openapi\", \"spec\": \"<spec slug>\" } } } } }`. GitBook replaces that page, at its position, with the API reference: one page per tag (or per operation with `\"grouping\": \"by-operation\"` in `props`), plus a models page when `models` is true, regenerated whenever the spec changes. Use `into` to nest the reference under an existing page. Do not recreate a spec with `insert_page`: `openapi-operation` blocks in a document only render the operations they name.\nWhen page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by:\n- Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`).\n- Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>`\n for a nested page (e.g. `/pages/guides/getting-started`).\n\n- Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page,\n or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is\n `/pages/README.md`.\n\n- Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`,\n `../other.md`, or `../README.md` (the parent page). Folder-style links without an\n extension (e.g. `./section`) resolve to that folder's page.\n\nExternal URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail.\nGitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content.\nFor change requests with frequent concurrent edits, consider `expectedRevision` to protect against overwriting changes made since your read. If the branch has changed since the supplied revision, the batch is rejected with HTTP 409 and none of the submitted changes are applied.\n**Response shape (`compat`)** — this endpoint is changing what it returns:\n- `compat=true` (current default) returns the updated change request, matching the endpoint's\n original behavior.\n\n- `compat=false` returns the updated change request **and** the list of affected pages (see\n the response schema).\n\nThe default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.",
4027
4027
  "x-gitbook-mcp": {
4028
4028
  "destructive": true
4029
4029
  },
@@ -8836,6 +8836,38 @@
8836
8836
  "schema": {
8837
8837
  "type": "string"
8838
8838
  }
8839
+ },
8840
+ {
8841
+ "name": "includeFacets",
8842
+ "in": "query",
8843
+ "description": "Include matching counts for action and actor options, excluding the option's own filter.",
8844
+ "schema": {
8845
+ "type": "boolean"
8846
+ }
8847
+ },
8848
+ {
8849
+ "name": "actions",
8850
+ "in": "query",
8851
+ "description": "Include any of these action names. Combined with other filters using AND.",
8852
+ "schema": {
8853
+ "type": "array",
8854
+ "maxItems": 100,
8855
+ "items": {
8856
+ "type": "string"
8857
+ }
8858
+ }
8859
+ },
8860
+ {
8861
+ "name": "actors",
8862
+ "in": "query",
8863
+ "description": "Include any of these stable actor identifiers, including system actors. Combined with other filters using AND.",
8864
+ "schema": {
8865
+ "type": "array",
8866
+ "maxItems": 100,
8867
+ "items": {
8868
+ "type": "string"
8869
+ }
8870
+ }
8839
8871
  }
8840
8872
  ],
8841
8873
  "responses": {
@@ -8851,6 +8883,27 @@
8851
8883
  {
8852
8884
  "type": "object",
8853
8885
  "properties": {
8886
+ "facets": {
8887
+ "type": "object",
8888
+ "required": [
8889
+ "actions",
8890
+ "actors"
8891
+ ],
8892
+ "properties": {
8893
+ "actions": {
8894
+ "type": "object",
8895
+ "additionalProperties": {
8896
+ "type": "integer"
8897
+ }
8898
+ },
8899
+ "actors": {
8900
+ "type": "object",
8901
+ "additionalProperties": {
8902
+ "type": "integer"
8903
+ }
8904
+ }
8905
+ }
8906
+ },
8854
8907
  "items": {
8855
8908
  "type": "array",
8856
8909
  "items": {
@@ -9015,6 +9068,7 @@
9015
9068
  "operationId": "listMembersInOrganizationById",
9016
9069
  "x-gitbook-mcp": true,
9017
9070
  "summary": "List all organization members",
9071
+ "description": "Lists the members of the organization. Guests can list members too, but the list they get leaves out every guest, themselves included, and filtering by the `guest` role returns no one.",
9018
9072
  "tags": [
9019
9073
  "organization-members"
9020
9074
  ],
@@ -9088,6 +9142,7 @@
9088
9142
  "operationId": "getMemberInOrganizationById",
9089
9143
  "x-gitbook-mcp": true,
9090
9144
  "summary": "Get an organization member by its ID",
9145
+ "description": "Returns a member of the organization. Guests can get any member who isn't a guest, and themselves. Another guest is reported as not found.",
9091
9146
  "tags": [
9092
9147
  "organization-members",
9093
9148
  "critical"
@@ -18438,7 +18493,7 @@
18438
18493
  "post": {
18439
18494
  "operationId": "applySiteFindingAction",
18440
18495
  "summary": "Apply an action to a finding",
18441
- "description": "Applies one of the `actions` a finding lists, with the site permission it gives: resolve, dismiss or reopen it, or act on a broken link's redirect. Returns 409 when the finding doesn't allow the action now.",
18496
+ "description": "Applies one of the `actions` a finding lists, with the site permission it gives: resolve, dismiss or reopen it, act on a broken link's redirect, or reject the change request GitBook drafted for an outbound link. Returns 409 when the finding doesn't allow the action now.",
18442
18497
  "x-gitbook-mcp": {
18443
18498
  "destructive": true
18444
18499
  },
@@ -19730,6 +19785,121 @@
19730
19785
  }
19731
19786
  }
19732
19787
  },
19788
+ "/orgs/{organizationId}/sites/{siteId}/question-timeline": {
19789
+ "get": {
19790
+ "operationId": "getSiteQuestionTimeline",
19791
+ "summary": "Get Ask AI answers over time for a site",
19792
+ "description": "Returns how many answers the site's Ask AI assistant gave, and to how many visitors, in each UTC bucket of the interval between `from` and `to`, optionally filtered by topic, relevance, channel, visitor type or resolution. Buckets without answers are omitted.",
19793
+ "x-gitbook-mcp": true,
19794
+ "tags": [
19795
+ "site-questions"
19796
+ ],
19797
+ "security": [
19798
+ {
19799
+ "user": []
19800
+ },
19801
+ {
19802
+ "oauth": [
19803
+ "site:insights:read"
19804
+ ]
19805
+ }
19806
+ ],
19807
+ "parameters": [
19808
+ {
19809
+ "$ref": "#/components/parameters/organizationId"
19810
+ },
19811
+ {
19812
+ "$ref": "#/components/parameters/siteId"
19813
+ },
19814
+ {
19815
+ "name": "from",
19816
+ "in": "query",
19817
+ "required": true,
19818
+ "description": "Count answers created at or after this timestamp.",
19819
+ "schema": {
19820
+ "$ref": "#/components/schemas/Timestamp"
19821
+ }
19822
+ },
19823
+ {
19824
+ "name": "to",
19825
+ "in": "query",
19826
+ "required": true,
19827
+ "description": "Count answers created at or before this timestamp.",
19828
+ "schema": {
19829
+ "$ref": "#/components/schemas/Timestamp"
19830
+ }
19831
+ },
19832
+ {
19833
+ "name": "interval",
19834
+ "in": "query",
19835
+ "required": true,
19836
+ "description": "Size of each bucket. An hourly timeline covers at most 31 days.",
19837
+ "schema": {
19838
+ "$ref": "#/components/schemas/SiteQuestionTimelineInterval"
19839
+ }
19840
+ },
19841
+ {
19842
+ "name": "topic",
19843
+ "in": "query",
19844
+ "description": "Filter answers by associated site topic IDs.",
19845
+ "schema": {
19846
+ "type": "array",
19847
+ "items": {
19848
+ "type": "string"
19849
+ }
19850
+ }
19851
+ },
19852
+ {
19853
+ "name": "relevance",
19854
+ "in": "query",
19855
+ "description": "Filter answers by question relevance.",
19856
+ "schema": {
19857
+ "type": "array",
19858
+ "items": {
19859
+ "$ref": "#/components/schemas/SiteQuestionAnswerRelevance"
19860
+ }
19861
+ }
19862
+ },
19863
+ {
19864
+ "name": "channelType",
19865
+ "in": "query",
19866
+ "description": "Filter answers by channel type.",
19867
+ "schema": {
19868
+ "type": "array",
19869
+ "items": {
19870
+ "$ref": "#/components/schemas/SiteChannelType"
19871
+ }
19872
+ }
19873
+ },
19874
+ {
19875
+ "$ref": "#/components/parameters/siteQuestionVisitorType"
19876
+ },
19877
+ {
19878
+ "name": "answered",
19879
+ "in": "query",
19880
+ "description": "Filter answers by resolution.",
19881
+ "schema": {
19882
+ "type": "array",
19883
+ "items": {
19884
+ "$ref": "#/components/schemas/SiteQuestionAnswerResolution"
19885
+ }
19886
+ }
19887
+ }
19888
+ ],
19889
+ "responses": {
19890
+ "200": {
19891
+ "description": "OK",
19892
+ "content": {
19893
+ "application/json": {
19894
+ "schema": {
19895
+ "$ref": "#/components/schemas/SiteQuestionTimeline"
19896
+ }
19897
+ }
19898
+ }
19899
+ }
19900
+ }
19901
+ }
19902
+ },
19733
19903
  "/orgs/{organizationId}/sites/{siteId}/answers": {
19734
19904
  "get": {
19735
19905
  "operationId": "listSiteQuestionAnswers",
@@ -20400,6 +20570,17 @@
20400
20570
  }
20401
20571
  ]
20402
20572
  },
20573
+ "secondaryColor": {
20574
+ "description": "The secondary brand color used for secondary buttons and content colored with `$secondary`. Set to null to reset the override.",
20575
+ "oneOf": [
20576
+ {
20577
+ "$ref": "#/components/schemas/CustomizationThemedColor"
20578
+ },
20579
+ {
20580
+ "type": "null"
20581
+ }
20582
+ ]
20583
+ },
20403
20584
  "infoColor": {
20404
20585
  "description": "Used for informational messages and neutral alerts. Set to null to reset the override.",
20405
20586
  "oneOf": [
@@ -27607,6 +27788,7 @@
27607
27788
  "violet",
27608
27789
  "cyan",
27609
27790
  "$primary",
27791
+ "$secondary",
27610
27792
  "$info",
27611
27793
  "$success",
27612
27794
  "$warning",
@@ -33084,7 +33266,7 @@
33084
33266
  ]
33085
33267
  },
33086
33268
  "VariableValue": {
33087
- "oneOf": [
33269
+ "anyOf": [
33088
33270
  {
33089
33271
  "type": "string",
33090
33272
  "maxLength": 256
@@ -35455,6 +35637,90 @@
35455
35637
  "reusableContent": "reusable_content_id"
35456
35638
  }
35457
35639
  },
35640
+ "VariableName": {
35641
+ "type": "string",
35642
+ "description": "Name of a variable, referenced in content as `space.vars.<name>`. It starts with a letter, `_` or `$` and contains only letters, digits, `_` and `$`.",
35643
+ "minLength": 1,
35644
+ "maxLength": 64,
35645
+ "pattern": "^[a-zA-Z_$][a-zA-Z0-9_$]*$"
35646
+ },
35647
+ "ChangeRequestContentChangeInsertVariables": {
35648
+ "type": "object",
35649
+ "description": "Create space variables in the change request (Git Sync's `.gitbook/vars.yaml`). Content references one as an expression, `<code class=\"expression\">space.vars.<name></code>` in markdown, which renders the variable's value.",
35650
+ "required": [
35651
+ "operation",
35652
+ "variables"
35653
+ ],
35654
+ "properties": {
35655
+ "operation": {
35656
+ "type": "string",
35657
+ "enum": [
35658
+ "insert_variables"
35659
+ ]
35660
+ },
35661
+ "variables": {
35662
+ "type": "array",
35663
+ "minItems": 1,
35664
+ "maxItems": 50,
35665
+ "items": {
35666
+ "type": "object",
35667
+ "description": "A variable to create. Its name must not already be used by a space variable of the change request.",
35668
+ "required": [
35669
+ "name",
35670
+ "value"
35671
+ ],
35672
+ "properties": {
35673
+ "name": {
35674
+ "$ref": "#/components/schemas/VariableName"
35675
+ },
35676
+ "value": {
35677
+ "description": "Value of the variable.",
35678
+ "$ref": "#/components/schemas/VariableValue"
35679
+ }
35680
+ }
35681
+ }
35682
+ }
35683
+ },
35684
+ "example": {
35685
+ "operation": "insert_variables",
35686
+ "variables": [
35687
+ {
35688
+ "name": "version",
35689
+ "value": "2.0"
35690
+ }
35691
+ ]
35692
+ }
35693
+ },
35694
+ "ChangeRequestContentChangeUpdateVariable": {
35695
+ "type": "object",
35696
+ "description": "Change the value of an existing space variable. Every expression referencing it shows the new value.",
35697
+ "required": [
35698
+ "operation",
35699
+ "variable",
35700
+ "value"
35701
+ ],
35702
+ "properties": {
35703
+ "operation": {
35704
+ "type": "string",
35705
+ "enum": [
35706
+ "update_variable"
35707
+ ]
35708
+ },
35709
+ "variable": {
35710
+ "description": "Name of the variable to update.",
35711
+ "$ref": "#/components/schemas/VariableName"
35712
+ },
35713
+ "value": {
35714
+ "description": "New value of the variable.",
35715
+ "$ref": "#/components/schemas/VariableValue"
35716
+ }
35717
+ },
35718
+ "example": {
35719
+ "operation": "update_variable",
35720
+ "variable": "version",
35721
+ "value": "2.1"
35722
+ }
35723
+ },
35458
35724
  "ChangeRequestContentChange": {
35459
35725
  "oneOf": [
35460
35726
  {
@@ -35483,6 +35749,12 @@
35483
35749
  },
35484
35750
  {
35485
35751
  "$ref": "#/components/schemas/ChangeRequestContentChangeDeleteReusableContent"
35752
+ },
35753
+ {
35754
+ "$ref": "#/components/schemas/ChangeRequestContentChangeInsertVariables"
35755
+ },
35756
+ {
35757
+ "$ref": "#/components/schemas/ChangeRequestContentChangeUpdateVariable"
35486
35758
  }
35487
35759
  ],
35488
35760
  "discriminator": {
@@ -35496,7 +35768,9 @@
35496
35768
  "insert_computed_page": "#/components/schemas/ChangeRequestContentChangeInsertComputedPage",
35497
35769
  "insert_reusable_contents": "#/components/schemas/ChangeRequestContentChangeInsertReusableContents",
35498
35770
  "update_reusable_content": "#/components/schemas/ChangeRequestContentChangeUpdateReusableContent",
35499
- "delete_reusable_content": "#/components/schemas/ChangeRequestContentChangeDeleteReusableContent"
35771
+ "delete_reusable_content": "#/components/schemas/ChangeRequestContentChangeDeleteReusableContent",
35772
+ "insert_variables": "#/components/schemas/ChangeRequestContentChangeInsertVariables",
35773
+ "update_variable": "#/components/schemas/ChangeRequestContentChangeUpdateVariable"
35500
35774
  }
35501
35775
  }
35502
35776
  },
@@ -47118,6 +47392,10 @@
47118
47392
  "primaryColor": {
47119
47393
  "$ref": "#/components/schemas/CustomizationThemedColor"
47120
47394
  },
47395
+ "secondaryColor": {
47396
+ "description": "Secondary brand color, used for secondary buttons and for content colored with `$secondary`. When not set, these elements use the neutral colors of the site.",
47397
+ "$ref": "#/components/schemas/CustomizationThemedColor"
47398
+ },
47121
47399
  "tint": {
47122
47400
  "$ref": "#/components/schemas/CustomizationTint"
47123
47401
  },
@@ -48828,7 +49106,7 @@
48828
49106
  },
48829
49107
  "SiteFindingState": {
48830
49108
  "type": "string",
48831
- "description": "Where a link finding stands, from its status and what GitBook did with it.\n - `open` needs a fix.\n - `awaiting-approval` has a redirect GitBook drafted at its path, waiting to be approved or rejected.\n - `resolved` was fixed or closed: `servingRedirect` says whether a live redirect serves its path.\n - `ignored` was dismissed.\n",
49109
+ "description": "Where a link finding stands, from its status and what GitBook did with it.\n - `open` needs a fix.\n - `awaiting-approval` has a fix GitBook drafted, waiting to be approved or rejected: a redirect at a `broken-link` finding's path, or an unmerged change request for an `outbound-link-error` finding (`awaitingChangeRequest`).\n - `resolved` was fixed or closed: `servingRedirect` says whether a live redirect serves its path.\n - `ignored` was dismissed.\n",
48832
49110
  "enum": [
48833
49111
  "open",
48834
49112
  "awaiting-approval",
@@ -48888,9 +49166,33 @@
48888
49166
  "createdByAgent"
48889
49167
  ]
48890
49168
  },
49169
+ "SiteFindingAwaitingChangeRequest": {
49170
+ "type": "object",
49171
+ "title": "Awaiting change request",
49172
+ "description": "The change request GitBook drafted to fix an `outbound-link-error` finding, waiting to be approved or rejected. Approving it means merging it. Reject it with `applySiteFindingAction`.",
49173
+ "properties": {
49174
+ "space": {
49175
+ "type": "string",
49176
+ "description": "ID of the space the change request is in."
49177
+ },
49178
+ "changeRequest": {
49179
+ "type": "string",
49180
+ "description": "ID of the change request."
49181
+ },
49182
+ "findings": {
49183
+ "type": "number",
49184
+ "description": "Number of open outbound links on the site the change request fixes."
49185
+ }
49186
+ },
49187
+ "required": [
49188
+ "space",
49189
+ "changeRequest",
49190
+ "findings"
49191
+ ]
49192
+ },
48891
49193
  "SiteFindingAction": {
48892
49194
  "type": "string",
48893
- "description": "An action that moves a finding to another state. A finding's `actions` lists the ones it allows.\n - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding.\n - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again.\n - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.\n - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.\n - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.\n - `ignore` dismisses it.\n - `restore` reopens a dismissed finding.\n",
49195
+ "description": "An action that moves a finding to another state. A finding's `actions` lists the ones it allows.\n - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding. A change request GitBook drafted for an outbound link is approved by merging it.\n - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again. For an outbound link, it archives the change request GitBook drafted (`awaitingChangeRequest`) and unlinks every link it fixes. They are open again, marked `undone`, and GitBook won't draft a fix for them again.\n - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.\n - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.\n - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.\n - `ignore` dismisses it.\n - `restore` reopens a dismissed finding.\n",
48894
49196
  "enum": [
48895
49197
  "approve",
48896
49198
  "reject",
@@ -49096,6 +49398,9 @@
49096
49398
  "servingRedirect": {
49097
49399
  "$ref": "#/components/schemas/SiteFindingServingRedirect"
49098
49400
  },
49401
+ "awaitingChangeRequest": {
49402
+ "$ref": "#/components/schemas/SiteFindingAwaitingChangeRequest"
49403
+ },
49099
49404
  "actions": {
49100
49405
  "type": "array",
49101
49406
  "description": "Actions the finding allows now, applied with `applySiteFindingAction`.",
@@ -50583,6 +50888,53 @@
50583
50888
  "propertyName": "type"
50584
50889
  }
50585
50890
  },
50891
+ "SiteQuestionTimelineInterval": {
50892
+ "type": "string",
50893
+ "description": "Size of a timeline bucket. Weeks start on Sunday, and every bucket is in UTC.",
50894
+ "enum": [
50895
+ "hour",
50896
+ "day",
50897
+ "week",
50898
+ "month"
50899
+ ]
50900
+ },
50901
+ "SiteQuestionTimelineBucket": {
50902
+ "type": "object",
50903
+ "properties": {
50904
+ "time": {
50905
+ "description": "Start of the bucket.",
50906
+ "$ref": "#/components/schemas/Timestamp"
50907
+ },
50908
+ "answers": {
50909
+ "type": "number",
50910
+ "description": "Count of answers given during the bucket."
50911
+ },
50912
+ "visitors": {
50913
+ "type": "number",
50914
+ "description": "Count of distinct visitors who received those answers."
50915
+ }
50916
+ },
50917
+ "required": [
50918
+ "time",
50919
+ "answers",
50920
+ "visitors"
50921
+ ]
50922
+ },
50923
+ "SiteQuestionTimeline": {
50924
+ "type": "object",
50925
+ "description": "Ask AI answers counted per bucket, oldest first.",
50926
+ "properties": {
50927
+ "items": {
50928
+ "type": "array",
50929
+ "items": {
50930
+ "$ref": "#/components/schemas/SiteQuestionTimelineBucket"
50931
+ }
50932
+ }
50933
+ },
50934
+ "required": [
50935
+ "items"
50936
+ ]
50937
+ },
50586
50938
  "SiteQuestionAnswerHelpfulness": {
50587
50939
  "type": "string",
50588
50940
  "description": "Helpfulness of the response for the end user need.",