@gitbook/api 0.26.0 → 0.28.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
@@ -843,6 +843,7 @@ components:
843
843
  - site
844
844
  - oneOf:
845
845
  - type: object
846
+ title: Link
846
847
  properties:
847
848
  type:
848
849
  type: string
@@ -851,6 +852,7 @@ components:
851
852
  required:
852
853
  - type
853
854
  - type: object
855
+ title: HTML
854
856
  properties:
855
857
  type:
856
858
  type: string
@@ -957,6 +959,7 @@ components:
957
959
  - urls
958
960
  - oneOf:
959
961
  - type: object
962
+ title: Resolved
960
963
  properties:
961
964
  status:
962
965
  description: Status of the comment.
@@ -974,6 +977,7 @@ components:
974
977
  - resolvedAt
975
978
  - resolvedBy
976
979
  - type: object
980
+ title: Open
977
981
  properties:
978
982
  status:
979
983
  description: Status of the comment.
@@ -1025,6 +1029,7 @@ components:
1025
1029
  PublishedContentLookup:
1026
1030
  oneOf:
1027
1031
  - type: object
1032
+ title: Redirect
1028
1033
  properties:
1029
1034
  target:
1030
1035
  type: string
@@ -1039,6 +1044,7 @@ components:
1039
1044
  - target
1040
1045
  - redirect
1041
1046
  - type: object
1047
+ title: Content
1042
1048
  properties:
1043
1049
  space:
1044
1050
  type: string
@@ -1063,16 +1069,57 @@ components:
1063
1069
  - pathname
1064
1070
  - basePath
1065
1071
  - apiToken
1072
+ SpacePointer:
1073
+ type: object
1074
+ properties:
1075
+ type:
1076
+ type: string
1077
+ enum:
1078
+ - space
1079
+ space:
1080
+ type: string
1081
+ description: Unique identifier for the space
1082
+ required:
1083
+ - type
1084
+ - space
1085
+ CollectionPointer:
1086
+ type: object
1087
+ properties:
1088
+ type:
1089
+ type: string
1090
+ enum:
1091
+ - collection
1092
+ collection:
1093
+ type: string
1094
+ description: Unique identifier for the collection
1095
+ required:
1096
+ - type
1097
+ - collection
1098
+ ContentPosition:
1099
+ type: object
1100
+ description: Position at which to insert an item
1101
+ properties:
1102
+ before:
1103
+ oneOf:
1104
+ - $ref: "#/components/schemas/SpacePointer"
1105
+ - $ref: "#/components/schemas/CollectionPointer"
1106
+ after:
1107
+ oneOf:
1108
+ - $ref: "#/components/schemas/SpacePointer"
1109
+ - $ref: "#/components/schemas/CollectionPointer"
1066
1110
  Document:
1067
1111
  oneOf:
1068
1112
  - $ref: "#/components/schemas/MarkdownDocument"
1113
+ title: Markdown
1069
1114
  - type: object
1115
+ title: JSON Document
1070
1116
  properties:
1071
1117
  document:
1072
1118
  $ref: "#/components/schemas/JSONDocument"
1073
1119
  required:
1074
1120
  - document
1075
1121
  - type: object
1122
+ title: Empty
1076
1123
  properties: {}
1077
1124
  additionalProperties: false
1078
1125
  MarkdownDocument:
@@ -1084,6 +1131,7 @@ components:
1084
1131
  required:
1085
1132
  - markdown
1086
1133
  JSONDocument:
1134
+ type: object
1087
1135
  properties:
1088
1136
  object:
1089
1137
  type: string
@@ -1091,8 +1139,11 @@ components:
1091
1139
  - document
1092
1140
  data:
1093
1141
  type: object
1094
- properties: {}
1095
- additionalProperties: false
1142
+ properties:
1143
+ schemaVersion:
1144
+ description: The schema version of the document. If undefined, the document is considered to be of the latest schema version.
1145
+ type: integer
1146
+ additionalProperties: true
1096
1147
  nodes:
1097
1148
  type: array
1098
1149
  items:
@@ -2866,8 +2917,7 @@ components:
2866
2917
  description: URL of the public version of the space. Only defined when visibility is "public".
2867
2918
  format: uri
2868
2919
  icon:
2869
- deprecated: true
2870
- description: URL of the icon of this space, if defined. Deprecated, prefer using emojis for spaces instead of icons.
2920
+ description: URL of the icon of this space, if defined.
2871
2921
  $ref: "#/components/schemas/URL"
2872
2922
  required:
2873
2923
  - app
@@ -2880,6 +2930,32 @@ components:
2880
2930
  description: ID of the parent collection.
2881
2931
  gitSync:
2882
2932
  $ref: "#/components/schemas/GitSyncState"
2933
+ visitorAuth:
2934
+ oneOf:
2935
+ - type: object
2936
+ title: Custom
2937
+ properties:
2938
+ backend:
2939
+ type: string
2940
+ description: Custom backend for Visitor Authentication
2941
+ enum:
2942
+ - custom
2943
+ required:
2944
+ - backend
2945
+ - type: object
2946
+ title: Integration
2947
+ properties:
2948
+ backend:
2949
+ type: string
2950
+ description: Integration as backend for Visitor Authentication
2951
+ enum:
2952
+ - integration
2953
+ integration:
2954
+ type: string
2955
+ description: Name of integration being used as the backend for Visitor Authentication
2956
+ required:
2957
+ - backend
2958
+ - integration
2883
2959
  required:
2884
2960
  - object
2885
2961
  - id
@@ -3650,6 +3726,10 @@ components:
3650
3726
  $ref: "#/components/schemas/OrganizationUseCase"
3651
3727
  communityType:
3652
3728
  $ref: "#/components/schemas/OrganizationCommunityType"
3729
+ defaultRole:
3730
+ $ref: "#/components/schemas/MemberRoleOrGuest"
3731
+ defaultContent:
3732
+ $ref: "#/components/schemas/OrganizationDefaultContent"
3653
3733
  urls:
3654
3734
  type: object
3655
3735
  description: URLs associated with the object
@@ -3868,6 +3948,11 @@ components:
3868
3948
  required:
3869
3949
  - organization
3870
3950
  - team
3951
+ OrganizationDefaultContent:
3952
+ description: The default content for the organization
3953
+ oneOf:
3954
+ - $ref: "#/components/schemas/SpacePointer"
3955
+ - $ref: "#/components/schemas/CollectionPointer"
3871
3956
  Capture:
3872
3957
  type: object
3873
3958
  properties:
@@ -4622,8 +4707,11 @@ components:
4622
4707
  - capture
4623
4708
  required:
4624
4709
  - type
4625
- - oneOf:
4710
+ - discriminator:
4711
+ propertyName: type
4712
+ oneOf:
4626
4713
  - type: object
4714
+ title: Page
4627
4715
  properties:
4628
4716
  type:
4629
4717
  type: string
@@ -4646,6 +4734,7 @@ components:
4646
4734
  - space
4647
4735
  - sections
4648
4736
  - type: object
4737
+ title: Entity
4649
4738
  properties:
4650
4739
  type:
4651
4740
  type: string
@@ -4664,6 +4753,7 @@ components:
4664
4753
  - entityId
4665
4754
  - entityType
4666
4755
  - type: object
4756
+ title: Snippet
4667
4757
  properties:
4668
4758
  type:
4669
4759
  type: string
@@ -4776,13 +4866,10 @@ components:
4776
4866
  description: Page entry in the content analytics.
4777
4867
  required:
4778
4868
  - page
4779
- - title
4780
4869
  - pageViews
4781
4870
  properties:
4782
4871
  page:
4783
- type: string
4784
- title:
4785
- type: string
4872
+ $ref: "#/components/schemas/RevisionPageDocument"
4786
4873
  pageViews:
4787
4874
  type: number
4788
4875
  feedbacks:
@@ -5375,6 +5462,21 @@ components:
5375
5462
  signingSecret:
5376
5463
  type: string
5377
5464
  description: Secret that can be used to verify the authenticity of incoming HTTP requests to the integration.
5465
+ deprecated: true
5466
+ signingSecrets:
5467
+ type: object
5468
+ properties:
5469
+ integration:
5470
+ type: string
5471
+ description: Secret that can be used to verify the authenticity of incoming HTTP requests to the integration.
5472
+ installation:
5473
+ type: string
5474
+ description: Secret that can be used to verify the authenticity of incoming HTTP requests to the installation.
5475
+ spaceInstallation:
5476
+ type: string
5477
+ description: Secret that can be used to verify the authenticity of incoming HTTP requests to the space installation.
5478
+ required:
5479
+ - integration
5378
5480
  apiEndpoint:
5379
5481
  type: string
5380
5482
  description: URL of the HTTP API
@@ -5393,6 +5495,7 @@ components:
5393
5495
  - apiEndpoint
5394
5496
  - apiTokens
5395
5497
  - integration
5498
+ - signingSecrets
5396
5499
  - secrets
5397
5500
  IntegrationTarget:
5398
5501
  type: string
@@ -8412,12 +8515,6 @@ components:
8412
8515
  - ok
8413
8516
  - good
8414
8517
  responses:
8415
- UnexpectedError:
8416
- description: Unexpected Error
8417
- content:
8418
- application/json:
8419
- schema:
8420
- $ref: "#/components/schemas/Error"
8421
8518
  BadRequestError:
8422
8519
  description: Bad Request
8423
8520
  content:
@@ -8440,6 +8537,28 @@ components:
8440
8537
  required:
8441
8538
  - code
8442
8539
  - message
8540
+ ConflictError:
8541
+ description: Conflict
8542
+ content:
8543
+ application/json:
8544
+ schema:
8545
+ type: object
8546
+ required:
8547
+ - error
8548
+ properties:
8549
+ error:
8550
+ type: object
8551
+ properties:
8552
+ code:
8553
+ type: integer
8554
+ format: int32
8555
+ enum:
8556
+ - 409
8557
+ message:
8558
+ type: string
8559
+ required:
8560
+ - code
8561
+ - message
8443
8562
  NotFoundError:
8444
8563
  description: Not Found
8445
8564
  content:
@@ -8462,6 +8581,12 @@ components:
8462
8581
  required:
8463
8582
  - code
8464
8583
  - message
8584
+ UnexpectedError:
8585
+ description: Unexpected Error
8586
+ content:
8587
+ application/json:
8588
+ schema:
8589
+ $ref: "#/components/schemas/Error"
8465
8590
  paths:
8466
8591
  /:
8467
8592
  get:
@@ -8670,14 +8795,46 @@ paths:
8670
8795
  content:
8671
8796
  application/json:
8672
8797
  schema:
8673
- type: object
8674
- properties:
8675
- editMode:
8676
- $ref: "#/components/schemas/SpaceEditMode"
8677
- title:
8678
- $ref: "#/components/schemas/SpaceTitle"
8679
- visibility:
8680
- $ref: "#/components/schemas/ContentVisibility"
8798
+ allOf:
8799
+ - type: object
8800
+ properties:
8801
+ editMode:
8802
+ $ref: "#/components/schemas/SpaceEditMode"
8803
+ title:
8804
+ $ref: "#/components/schemas/SpaceTitle"
8805
+ visibility:
8806
+ $ref: "#/components/schemas/ContentVisibility"
8807
+ visitorAuth:
8808
+ $ref: "#/components/schemas/Space/properties/visitorAuth"
8809
+ description: The integration property, if set, is ignored.
8810
+ - oneOf:
8811
+ - type: object
8812
+ title: Emoji
8813
+ properties:
8814
+ emoji:
8815
+ $ref: "#/components/schemas/Emoji"
8816
+ required:
8817
+ - emoji
8818
+ - type: object
8819
+ title: Icon
8820
+ properties:
8821
+ icon:
8822
+ $ref: "#/components/schemas/URL"
8823
+ required:
8824
+ - icon
8825
+ - type: object
8826
+ title: Remove icon or emoji
8827
+ properties:
8828
+ emoji:
8829
+ type: string
8830
+ nullable: true
8831
+ enum:
8832
+ - null
8833
+ icon:
8834
+ type: string
8835
+ nullable: true
8836
+ enum:
8837
+ - null
8681
8838
  responses:
8682
8839
  "200":
8683
8840
  description: The space has been updated
@@ -8761,6 +8918,86 @@ paths:
8761
8918
  $ref: "#/components/schemas/Space"
8762
8919
  default:
8763
8920
  $ref: "#/components/responses/UnexpectedError"
8921
+ "/spaces/{spaceId}/move":
8922
+ post:
8923
+ operationId: moveSpace
8924
+ summary: Move a space to a new position.
8925
+ tags:
8926
+ - spaces
8927
+ security:
8928
+ - user: []
8929
+ parameters:
8930
+ - $ref: "#/components/parameters/spaceId"
8931
+ requestBody:
8932
+ required: true
8933
+ content:
8934
+ application/json:
8935
+ schema:
8936
+ type: object
8937
+ minProperties: 1
8938
+ properties:
8939
+ parent:
8940
+ description: The unique id of the parent collection
8941
+ type: string
8942
+ nullable: true
8943
+ position:
8944
+ description: Where to move the space. By default, it will be moved at the end.
8945
+ $ref: "#/components/schemas/ContentPosition"
8946
+ responses:
8947
+ "200":
8948
+ description: Space moved
8949
+ content:
8950
+ application/json:
8951
+ schema:
8952
+ $ref: "#/components/schemas/Space"
8953
+ "400":
8954
+ description: Invalid position space or collection provided
8955
+ $ref: "#/components/responses/BadRequestError"
8956
+ "404":
8957
+ description: No matching Space found for given ID
8958
+ $ref: "#/components/responses/NotFoundError"
8959
+ "409":
8960
+ description: Operation would not result in any update
8961
+ $ref: "#/components/responses/ConflictError"
8962
+ default:
8963
+ $ref: "#/components/responses/UnexpectedError"
8964
+ "/spaces/{spaceId}/transfer":
8965
+ post:
8966
+ operationId: transferSpace
8967
+ summary: Transfer a space to another organization, collection or both.
8968
+ tags:
8969
+ - spaces
8970
+ security:
8971
+ - user: []
8972
+ parameters:
8973
+ - $ref: "#/components/parameters/spaceId"
8974
+ requestBody:
8975
+ required: true
8976
+ content:
8977
+ application/json:
8978
+ schema:
8979
+ type: object
8980
+ properties:
8981
+ organization:
8982
+ type: string
8983
+ description: The unique id of the target organization
8984
+ required:
8985
+ - organization
8986
+ responses:
8987
+ "200":
8988
+ description: Space transferred
8989
+ content:
8990
+ application/json:
8991
+ schema:
8992
+ $ref: "#/components/schemas/Space"
8993
+ "404":
8994
+ description: No matching Space found for given ID
8995
+ $ref: "#/components/responses/NotFoundError"
8996
+ "409":
8997
+ description: Transfer would not result in any update
8998
+ $ref: "#/components/responses/ConflictError"
8999
+ default:
9000
+ $ref: "#/components/responses/UnexpectedError"
8764
9001
  "/spaces/{spaceId}/search":
8765
9002
  get:
8766
9003
  operationId: searchSpaceContent
@@ -10818,6 +11055,86 @@ paths:
10818
11055
  $ref: "#/components/schemas/Space"
10819
11056
  default:
10820
11057
  $ref: "#/components/responses/UnexpectedError"
11058
+ "/collections/{collectionId}/move":
11059
+ post:
11060
+ operationId: moveCollection
11061
+ summary: Move a collection to a new position.
11062
+ tags:
11063
+ - collections
11064
+ security:
11065
+ - user: []
11066
+ parameters:
11067
+ - $ref: "#/components/parameters/collectionId"
11068
+ requestBody:
11069
+ required: true
11070
+ content:
11071
+ application/json:
11072
+ schema:
11073
+ type: object
11074
+ minProperties: 1
11075
+ properties:
11076
+ parent:
11077
+ description: The unique id of the parent collection
11078
+ type: string
11079
+ nullable: true
11080
+ position:
11081
+ description: Where to move the collection. By default, it will be moved at the end.
11082
+ $ref: "#/components/schemas/ContentPosition"
11083
+ responses:
11084
+ "200":
11085
+ description: Collection moved
11086
+ content:
11087
+ application/json:
11088
+ schema:
11089
+ $ref: "#/components/schemas/Collection"
11090
+ "400":
11091
+ description: Invalid position space or collection provided
11092
+ $ref: "#/components/responses/BadRequestError"
11093
+ "404":
11094
+ description: No matching Collection found for given ID
11095
+ $ref: "#/components/responses/NotFoundError"
11096
+ "409":
11097
+ description: Operation would not result in any update
11098
+ $ref: "#/components/responses/ConflictError"
11099
+ default:
11100
+ $ref: "#/components/responses/UnexpectedError"
11101
+ "/collections/{collectionId}/transfer":
11102
+ post:
11103
+ operationId: transferCollection
11104
+ summary: Transfer a collection to another organization.
11105
+ tags:
11106
+ - collections
11107
+ security:
11108
+ - user: []
11109
+ parameters:
11110
+ - $ref: "#/components/parameters/collectionId"
11111
+ requestBody:
11112
+ required: true
11113
+ content:
11114
+ application/json:
11115
+ schema:
11116
+ type: object
11117
+ properties:
11118
+ organization:
11119
+ type: string
11120
+ description: The unique id of the target organization
11121
+ required:
11122
+ - organization
11123
+ responses:
11124
+ "200":
11125
+ description: Collection transferred
11126
+ content:
11127
+ application/json:
11128
+ schema:
11129
+ $ref: "#/components/schemas/Collection"
11130
+ "404":
11131
+ description: No matching Collection found for given ID
11132
+ $ref: "#/components/responses/NotFoundError"
11133
+ "409":
11134
+ description: Transfer would not result in any update
11135
+ $ref: "#/components/responses/ConflictError"
11136
+ default:
11137
+ $ref: "#/components/responses/UnexpectedError"
10821
11138
  "/collections/{collectionId}/permissions/aggregate":
10822
11139
  get:
10823
11140
  operationId: listPermissionsAggregateInCollection
@@ -11643,6 +11960,47 @@ paths:
11643
11960
  $ref: "#/components/responses/NotFoundError"
11644
11961
  default:
11645
11962
  $ref: "#/components/responses/UnexpectedError"
11963
+ patch:
11964
+ operationId: updateOrganizationById
11965
+ summary: Update an organization by its ID
11966
+ tags:
11967
+ - organizations
11968
+ security:
11969
+ - user: []
11970
+ parameters:
11971
+ - $ref: "#/components/parameters/organizationId"
11972
+ requestBody:
11973
+ required: true
11974
+ content:
11975
+ application/json:
11976
+ schema:
11977
+ type: object
11978
+ properties:
11979
+ title:
11980
+ $ref: "#/components/schemas/OrganizationTitle"
11981
+ emailDomains:
11982
+ $ref: "#/components/schemas/OrganizationEmailDomains"
11983
+ defaultRole:
11984
+ $ref: "#/components/schemas/MemberRoleOrGuest"
11985
+ defaultContent:
11986
+ oneOf:
11987
+ - $ref: "#/components/schemas/OrganizationDefaultContent"
11988
+ - type: string
11989
+ nullable: true
11990
+ enum:
11991
+ - null
11992
+ responses:
11993
+ "200":
11994
+ description: The organization has been updated
11995
+ content:
11996
+ application/json:
11997
+ schema:
11998
+ $ref: "#/components/schemas/Organization"
11999
+ "400":
12000
+ description: Invalid default content space or collection provided
12001
+ $ref: "#/components/responses/BadRequestError"
12002
+ default:
12003
+ $ref: "#/components/responses/UnexpectedError"
11646
12004
  "/orgs/{organizationId}/members":
11647
12005
  get:
11648
12006
  operationId: listMembersInOrganizationById