@gitbook/api 0.83.0 → 0.85.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.yaml CHANGED
@@ -760,7 +760,7 @@ paths:
760
760
  "/spaces/{spaceId}/permissions":
761
761
  post:
762
762
  operationId: inviteToSpace
763
- summary: Invite to a space (only teams supported for now)
763
+ summary: Invite to a space
764
764
  tags:
765
765
  - spaces
766
766
  security:
@@ -771,7 +771,7 @@ paths:
771
771
  "204":
772
772
  description: OK
773
773
  "404":
774
- description: No team with the provided Id
774
+ description: No team or user with the provided Id
775
775
  $ref: "#/components/responses/NotFoundError"
776
776
  default:
777
777
  $ref: "#/components/responses/UnexpectedError"
@@ -780,7 +780,7 @@ paths:
780
780
  content:
781
781
  application/json:
782
782
  schema:
783
- $ref: "#/components/schemas/InviteEmailsUsersTeamsToSpace"
783
+ $ref: "#/components/schemas/InviteUsersAndTeams"
784
784
  "/spaces/{spaceId}/permissions/teams/{teamId}":
785
785
  delete:
786
786
  operationId: removeTeamFromSpace
@@ -3246,6 +3246,30 @@ paths:
3246
3246
  $ref: "#/components/responses/PreconditionFailedError"
3247
3247
  default:
3248
3248
  $ref: "#/components/responses/UnexpectedError"
3249
+ "/collections/{collectionId}/permissions":
3250
+ post:
3251
+ operationId: inviteToCollection
3252
+ summary: Invite to a collection
3253
+ tags:
3254
+ - collections
3255
+ security:
3256
+ - user: []
3257
+ parameters:
3258
+ - $ref: "#/components/parameters/collectionId"
3259
+ responses:
3260
+ "204":
3261
+ description: OK
3262
+ "404":
3263
+ description: No team or user with the provided Id
3264
+ $ref: "#/components/responses/NotFoundError"
3265
+ default:
3266
+ $ref: "#/components/responses/UnexpectedError"
3267
+ requestBody:
3268
+ required: true
3269
+ content:
3270
+ application/json:
3271
+ schema:
3272
+ $ref: "#/components/schemas/InviteUsersAndTeams"
3249
3273
  "/collections/{collectionId}/permissions/aggregate":
3250
3274
  get:
3251
3275
  operationId: listPermissionsAggregateInCollection
@@ -4367,8 +4391,16 @@ paths:
4367
4391
  parameters:
4368
4392
  - $ref: "#/components/parameters/organizationId"
4369
4393
  responses:
4370
- "204":
4371
- description: Organization member has been updated.
4394
+ "200":
4395
+ description: Organization member has been updated. Optionally returns a JWT token to attach to the user.
4396
+ content:
4397
+ application/json:
4398
+ schema:
4399
+ type: object
4400
+ properties:
4401
+ gitbookVisitorClaims:
4402
+ description: A JTW token containing the claims to attach to this user.
4403
+ type: string
4372
4404
  default:
4373
4405
  $ref: "#/components/responses/UnexpectedError"
4374
4406
  "/orgs/{organizationId}/members/{userId}/sso":
@@ -6583,6 +6615,16 @@ paths:
6583
6615
  defaultSiteSection:
6584
6616
  type: string
6585
6617
  description: ID of the site-section to be used as the default.
6618
+ proxy:
6619
+ description: |
6620
+ Configure a proxy URL for a site. For example, you can use it to host the site on a subdirectory of your domain like `https://company.com/docs`.
6621
+ Use `null` to remove the proxy.
6622
+ oneOf:
6623
+ - $ref: "#/components/schemas/SiteProxy"
6624
+ - type: string
6625
+ nullable: true
6626
+ enum:
6627
+ - null
6586
6628
  responses:
6587
6629
  "200":
6588
6630
  description: OK
@@ -8082,6 +8124,7 @@ paths:
8082
8124
  operationId: trackViewInSiteById
8083
8125
  summary: Track a page view in a site
8084
8126
  description: Track a page view in a site.
8127
+ deprecated: true
8085
8128
  tags:
8086
8129
  - analytics
8087
8130
  - sites
@@ -8099,6 +8142,34 @@ paths:
8099
8142
  application/json:
8100
8143
  schema:
8101
8144
  $ref: "#/components/schemas/SiteTrackPageView"
8145
+ "/orgs/{organizationId}/sites/{siteId}/insights/events":
8146
+ post:
8147
+ operationId: trackEventsInSiteById
8148
+ summary: Track events in a site.
8149
+ description: Track events in a site.
8150
+ tags:
8151
+ - sites
8152
+ parameters:
8153
+ - $ref: "#/components/parameters/organizationId"
8154
+ - $ref: "#/components/parameters/siteId"
8155
+ responses:
8156
+ "204":
8157
+ description: Events have been tracked.
8158
+ default:
8159
+ $ref: "#/components/responses/UnexpectedError"
8160
+ requestBody:
8161
+ required: true
8162
+ content:
8163
+ application/json:
8164
+ schema:
8165
+ type: object
8166
+ properties:
8167
+ events:
8168
+ type: array
8169
+ items:
8170
+ $ref: "#/components/schemas/SiteInsightsEvent"
8171
+ required:
8172
+ - events
8102
8173
  "/orgs/{organizationId}/sites/{siteId}/insights/ads":
8103
8174
  get:
8104
8175
  operationId: getAdsInsightsForSiteById
@@ -10951,7 +11022,20 @@ components:
10951
11022
  - object
10952
11023
  - type
10953
11024
  - nodes
10954
- DocumentBlockSwagger:
11025
+ OpenAPIOperationPointer:
11026
+ type: object
11027
+ description: Pointer to an operation in the OpenAPI spec.
11028
+ properties:
11029
+ path:
11030
+ type: string
11031
+ description: Path of the operation in the OpenAPI spec.
11032
+ method:
11033
+ type: string
11034
+ description: HTTP method of the operation in the OpenAPI spec.
11035
+ required:
11036
+ - path
11037
+ - method
11038
+ DocumentBlockOpenAPI:
10955
11039
  type: object
10956
11040
  properties:
10957
11041
  object:
@@ -10965,24 +11049,20 @@ components:
10965
11049
  key:
10966
11050
  type: string
10967
11051
  data:
10968
- type: object
10969
- properties:
10970
- ref:
10971
- oneOf:
10972
- - $ref: "#/components/schemas/ContentRefFile"
10973
- path:
10974
- type: string
10975
- description: Path of the operation in the OpenAPI spec.
10976
- method:
10977
- type: string
10978
- description: HTTP method of the operation in the OpenAPI spec.
10979
- expanded:
10980
- type: boolean
10981
- description: If true, the block is opened by default.
10982
- fullWidth:
10983
- type: boolean
10984
- required:
10985
- - ref
11052
+ allOf:
11053
+ - $ref: "#/components/schemas/OpenAPIOperationPointer"
11054
+ - type: object
11055
+ properties:
11056
+ ref:
11057
+ oneOf:
11058
+ - $ref: "#/components/schemas/ContentRefFile"
11059
+ expanded:
11060
+ type: boolean
11061
+ description: If true, the block is opened by default.
11062
+ fullWidth:
11063
+ type: boolean
11064
+ required:
11065
+ - ref
10986
11066
  isVoid:
10987
11067
  type: boolean
10988
11068
  enum:
@@ -11114,7 +11194,7 @@ components:
11114
11194
  - $ref: "#/components/schemas/DocumentBlockExpandable"
11115
11195
  - $ref: "#/components/schemas/DocumentBlockTabs"
11116
11196
  - $ref: "#/components/schemas/DocumentBlockTable"
11117
- - $ref: "#/components/schemas/DocumentBlockSwagger"
11197
+ - $ref: "#/components/schemas/DocumentBlockOpenAPI"
11118
11198
  - $ref: "#/components/schemas/DocumentBlockContentRef"
11119
11199
  - $ref: "#/components/schemas/DocumentBlockIntegration"
11120
11200
  - $ref: "#/components/schemas/DocumentBlockReusableContent"
@@ -12225,19 +12305,34 @@ components:
12225
12305
  - visitor
12226
12306
  - url
12227
12307
  - referrer
12228
- InviteEmailsUsersTeamsToSpace:
12308
+ InviteUsersAndTeams:
12229
12309
  type: object
12230
12310
  properties:
12231
- teams:
12232
- type: array
12233
- items:
12234
- type: string
12235
- description: The ID of the team to be invited
12236
12311
  role:
12237
- description: Role to set on the team.
12312
+ description: Role to set.
12238
12313
  $ref: "#/components/schemas/MemberRoleOrGuest"
12314
+ anyOf:
12315
+ - type: object
12316
+ properties:
12317
+ teams:
12318
+ type: array
12319
+ minItems: 1
12320
+ items:
12321
+ type: string
12322
+ description: The ID of the team to be invited
12323
+ required:
12324
+ - teams
12325
+ - type: object
12326
+ properties:
12327
+ users:
12328
+ type: array
12329
+ minItems: 1
12330
+ items:
12331
+ type: string
12332
+ description: The ID of the user to be invited
12333
+ required:
12334
+ - users
12239
12335
  required:
12240
- - teams
12241
12336
  - role
12242
12337
  RevisionPageGroup:
12243
12338
  allOf:
@@ -15482,7 +15577,6 @@ components:
15482
15577
  - visitor
15483
15578
  - url
15484
15579
  - referrer
15485
- - spaceId
15486
15580
  SpaceContentUpdatedEvent:
15487
15581
  allOf:
15488
15582
  - $ref: "#/components/schemas/SpaceEvent"
@@ -16829,11 +16923,17 @@ components:
16829
16923
  type: string
16830
16924
  description: Custom hostname for the site, for e.g. docs.mycompany.com
16831
16925
  pattern: ^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$
16926
+ maxLength: 512
16832
16927
  SiteBasename:
16833
16928
  type: string
16834
16929
  description: Basename for the site. For e.g. api
16835
16930
  minLength: 1
16836
16931
  maxLength: 100
16932
+ SiteProxy:
16933
+ type: string
16934
+ description: Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.
16935
+ pattern: ^([\w-]+\.)*[\w-]+\.[a-zA-Z]{2,}(\/[\w-]+)+$
16936
+ maxLength: 512
16837
16937
  SiteVisibility:
16838
16938
  type: string
16839
16939
  description: |
@@ -16929,6 +17029,8 @@ components:
16929
17029
  $ref: "#/components/schemas/SiteHostname"
16930
17030
  basename:
16931
17031
  $ref: "#/components/schemas/SiteBasename"
17032
+ proxy:
17033
+ $ref: "#/components/schemas/SiteProxy"
16932
17034
  visibility:
16933
17035
  $ref: "#/components/schemas/SiteVisibility"
16934
17036
  published:
@@ -18679,6 +18781,276 @@ components:
18679
18781
  type: string
18680
18782
  required:
18681
18783
  - siteSpaceId
18784
+ SiteInsightsEventSession:
18785
+ type: object
18786
+ description: Analytics info on the GitBook's site session.
18787
+ properties:
18788
+ visitorId:
18789
+ type: string
18790
+ description: GitBook's unique identifier of the visitor.
18791
+ sessionId:
18792
+ type: string
18793
+ description: GitBook's unique identifier of the visitor's session.
18794
+ cookies:
18795
+ type: object
18796
+ description: The visitors cookies.
18797
+ additionalProperties:
18798
+ type: string
18799
+ ip:
18800
+ type: string
18801
+ description: |
18802
+ IP address of the visitor.
18803
+ If not defined, it'll default to the IP executing the request.
18804
+ userAgent:
18805
+ type: string
18806
+ description: |
18807
+ User-agent of the visitor.
18808
+ https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
18809
+ language:
18810
+ type: string
18811
+ nullable: true
18812
+ description: |
18813
+ Language of the visitor.
18814
+ https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
18815
+ referrer:
18816
+ description: Referrer of the session
18817
+ oneOf:
18818
+ - type: string
18819
+ nullable: true
18820
+ enum:
18821
+ - null
18822
+ - ""
18823
+ - $ref: "#/components/schemas/URL"
18824
+ visitorAuthToken:
18825
+ type: string
18826
+ nullable: true
18827
+ description: |
18828
+ Authentication token of the visitor.
18829
+ This is used to identify the visitor with adaptive content.
18830
+ required:
18831
+ - visitorId
18832
+ - sessionId
18833
+ - cookies
18834
+ - userAgent
18835
+ - language
18836
+ - referrer
18837
+ SiteInsightsEventLocation:
18838
+ type: object
18839
+ description: Location of the event.
18840
+ properties:
18841
+ url:
18842
+ description: URL of the location.
18843
+ $ref: "#/components/schemas/URL"
18844
+ siteSection:
18845
+ type: string
18846
+ description: ID of the concerned site section.
18847
+ nullable: true
18848
+ siteSpace:
18849
+ type: string
18850
+ description: ID of the concerned site space.
18851
+ nullable: true
18852
+ siteShareKey:
18853
+ type: string
18854
+ description: ID of the concerned site share key.
18855
+ nullable: true
18856
+ space:
18857
+ type: string
18858
+ description: ID of the concerned space.
18859
+ nullable: true
18860
+ revision:
18861
+ type: string
18862
+ description: ID of the concerned revision.
18863
+ nullable: true
18864
+ page:
18865
+ type: string
18866
+ description: ID of the concerned page.
18867
+ nullable: true
18868
+ required:
18869
+ - url
18870
+ - siteSection
18871
+ - siteSpace
18872
+ - siteShareKey
18873
+ - page
18874
+ - space
18875
+ - revision
18876
+ SiteInsightsEventBase:
18877
+ type: object
18878
+ properties:
18879
+ session:
18880
+ $ref: "#/components/schemas/SiteInsightsEventSession"
18881
+ location:
18882
+ $ref: "#/components/schemas/SiteInsightsEventLocation"
18883
+ timestamp:
18884
+ description: Optional timestamp of the event. If not provided, the current timestamp will be used.
18885
+ $ref: "#/components/schemas/Timestamp"
18886
+ required:
18887
+ - session
18888
+ - location
18889
+ SiteInsightsEventPageView:
18890
+ allOf:
18891
+ - $ref: "#/components/schemas/SiteInsightsEventBase"
18892
+ - type: object
18893
+ properties:
18894
+ type:
18895
+ type: string
18896
+ enum:
18897
+ - page_view
18898
+ required:
18899
+ - type
18900
+ SiteInsightsEventSearchOpen:
18901
+ allOf:
18902
+ - $ref: "#/components/schemas/SiteInsightsEventBase"
18903
+ - type: object
18904
+ properties:
18905
+ type:
18906
+ type: string
18907
+ enum:
18908
+ - search_open
18909
+ required:
18910
+ - type
18911
+ SiteInsightsEventSearchTypeQuery:
18912
+ allOf:
18913
+ - $ref: "#/components/schemas/SiteInsightsEventBase"
18914
+ - type: object
18915
+ properties:
18916
+ type:
18917
+ type: string
18918
+ enum:
18919
+ - search_type_query
18920
+ query:
18921
+ type: string
18922
+ description: Query of the search.
18923
+ required:
18924
+ - type
18925
+ - query
18926
+ SiteInsightsEventSearchOpenResult:
18927
+ allOf:
18928
+ - $ref: "#/components/schemas/SiteInsightsEventBase"
18929
+ - type: object
18930
+ properties:
18931
+ type:
18932
+ type: string
18933
+ enum:
18934
+ - search_open_result
18935
+ query:
18936
+ type: string
18937
+ description: Query of the search.
18938
+ result:
18939
+ type: object
18940
+ properties:
18941
+ spaceId:
18942
+ type: string
18943
+ description: ID of the concerned space.
18944
+ pageId:
18945
+ type: string
18946
+ description: ID of the concerned page.
18947
+ required:
18948
+ - spaceId
18949
+ - pageId
18950
+ required:
18951
+ - type
18952
+ - query
18953
+ - result
18954
+ SiteInsightsEventPagePostFeedback:
18955
+ allOf:
18956
+ - $ref: "#/components/schemas/SiteInsightsEventBase"
18957
+ - type: object
18958
+ properties:
18959
+ type:
18960
+ type: string
18961
+ enum:
18962
+ - page_post_feedback
18963
+ feedback:
18964
+ type: object
18965
+ properties:
18966
+ rating:
18967
+ $ref: "#/components/schemas/PageFeedbackRating"
18968
+ required:
18969
+ - rating
18970
+ required:
18971
+ - type
18972
+ - feedback
18973
+ SiteInsightsEventAskQuestion:
18974
+ allOf:
18975
+ - $ref: "#/components/schemas/SiteInsightsEventBase"
18976
+ - type: object
18977
+ properties:
18978
+ type:
18979
+ type: string
18980
+ enum:
18981
+ - ask_question
18982
+ query:
18983
+ type: string
18984
+ description: Question being asked.
18985
+ required:
18986
+ - type
18987
+ - query
18988
+ SiteInsightsEventLinkClick:
18989
+ allOf:
18990
+ - $ref: "#/components/schemas/SiteInsightsEventBase"
18991
+ - type: object
18992
+ properties:
18993
+ type:
18994
+ type: string
18995
+ enum:
18996
+ - link_click
18997
+ link:
18998
+ type: object
18999
+ properties:
19000
+ target:
19001
+ $ref: "#/components/schemas/ContentRef"
19002
+ position:
19003
+ type: string
19004
+ enum:
19005
+ - header
19006
+ - footer
19007
+ - sidebar
19008
+ - content
19009
+ required:
19010
+ - target
19011
+ - position
19012
+ required:
19013
+ - type
19014
+ - link
19015
+ SiteInsightsEventAPIClientOpen:
19016
+ allOf:
19017
+ - $ref: "#/components/schemas/SiteInsightsEventBase"
19018
+ - type: object
19019
+ properties:
19020
+ type:
19021
+ type: string
19022
+ enum:
19023
+ - api_client_open
19024
+ operation:
19025
+ $ref: "#/components/schemas/OpenAPIOperationPointer"
19026
+ required:
19027
+ - type
19028
+ - operation
19029
+ SiteInsightsEventAPIClientRequest:
19030
+ allOf:
19031
+ - $ref: "#/components/schemas/SiteInsightsEventBase"
19032
+ - type: object
19033
+ properties:
19034
+ type:
19035
+ type: string
19036
+ enum:
19037
+ - api_client_request
19038
+ operation:
19039
+ $ref: "#/components/schemas/OpenAPIOperationPointer"
19040
+ required:
19041
+ - type
19042
+ - operation
19043
+ SiteInsightsEvent:
19044
+ oneOf:
19045
+ - $ref: "#/components/schemas/SiteInsightsEventPageView"
19046
+ - $ref: "#/components/schemas/SiteInsightsEventSearchOpen"
19047
+ - $ref: "#/components/schemas/SiteInsightsEventSearchTypeQuery"
19048
+ - $ref: "#/components/schemas/SiteInsightsEventSearchOpenResult"
19049
+ - $ref: "#/components/schemas/SiteInsightsEventPagePostFeedback"
19050
+ - $ref: "#/components/schemas/SiteInsightsEventAskQuestion"
19051
+ - $ref: "#/components/schemas/SiteInsightsEventLinkClick"
19052
+ - $ref: "#/components/schemas/SiteInsightsEventAPIClientOpen"
19053
+ - $ref: "#/components/schemas/SiteInsightsEventAPIClientRequest"
18682
19054
  InsightsInterval:
18683
19055
  type: string
18684
19056
  description: The interval for grouping the results
@@ -19365,7 +19737,7 @@ components:
19365
19737
  - $ref: "#/components/schemas/DocumentBlockTabs"
19366
19738
  - $ref: "#/components/schemas/DocumentBlockTabsItem"
19367
19739
  - $ref: "#/components/schemas/DocumentBlockTable"
19368
- - $ref: "#/components/schemas/DocumentBlockSwagger"
19740
+ - $ref: "#/components/schemas/DocumentBlockOpenAPI"
19369
19741
  - $ref: "#/components/schemas/DocumentBlockContentRef"
19370
19742
  - $ref: "#/components/schemas/DocumentBlockIntegration"
19371
19743
  - $ref: "#/components/schemas/DocumentBlockReusableContent"