@gitbook/api 0.27.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:
@@ -2882,6 +2933,7 @@ components:
2882
2933
  visitorAuth:
2883
2934
  oneOf:
2884
2935
  - type: object
2936
+ title: Custom
2885
2937
  properties:
2886
2938
  backend:
2887
2939
  type: string
@@ -2891,6 +2943,7 @@ components:
2891
2943
  required:
2892
2944
  - backend
2893
2945
  - type: object
2946
+ title: Integration
2894
2947
  properties:
2895
2948
  backend:
2896
2949
  type: string
@@ -3673,6 +3726,10 @@ components:
3673
3726
  $ref: "#/components/schemas/OrganizationUseCase"
3674
3727
  communityType:
3675
3728
  $ref: "#/components/schemas/OrganizationCommunityType"
3729
+ defaultRole:
3730
+ $ref: "#/components/schemas/MemberRoleOrGuest"
3731
+ defaultContent:
3732
+ $ref: "#/components/schemas/OrganizationDefaultContent"
3676
3733
  urls:
3677
3734
  type: object
3678
3735
  description: URLs associated with the object
@@ -3891,6 +3948,11 @@ components:
3891
3948
  required:
3892
3949
  - organization
3893
3950
  - team
3951
+ OrganizationDefaultContent:
3952
+ description: The default content for the organization
3953
+ oneOf:
3954
+ - $ref: "#/components/schemas/SpacePointer"
3955
+ - $ref: "#/components/schemas/CollectionPointer"
3894
3956
  Capture:
3895
3957
  type: object
3896
3958
  properties:
@@ -4645,8 +4707,11 @@ components:
4645
4707
  - capture
4646
4708
  required:
4647
4709
  - type
4648
- - oneOf:
4710
+ - discriminator:
4711
+ propertyName: type
4712
+ oneOf:
4649
4713
  - type: object
4714
+ title: Page
4650
4715
  properties:
4651
4716
  type:
4652
4717
  type: string
@@ -4669,6 +4734,7 @@ components:
4669
4734
  - space
4670
4735
  - sections
4671
4736
  - type: object
4737
+ title: Entity
4672
4738
  properties:
4673
4739
  type:
4674
4740
  type: string
@@ -4687,6 +4753,7 @@ components:
4687
4753
  - entityId
4688
4754
  - entityType
4689
4755
  - type: object
4756
+ title: Snippet
4690
4757
  properties:
4691
4758
  type:
4692
4759
  type: string
@@ -4799,13 +4866,10 @@ components:
4799
4866
  description: Page entry in the content analytics.
4800
4867
  required:
4801
4868
  - page
4802
- - title
4803
4869
  - pageViews
4804
4870
  properties:
4805
4871
  page:
4806
- type: string
4807
- title:
4808
- type: string
4872
+ $ref: "#/components/schemas/RevisionPageDocument"
4809
4873
  pageViews:
4810
4874
  type: number
4811
4875
  feedbacks:
@@ -5398,6 +5462,21 @@ components:
5398
5462
  signingSecret:
5399
5463
  type: string
5400
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
5401
5480
  apiEndpoint:
5402
5481
  type: string
5403
5482
  description: URL of the HTTP API
@@ -5416,6 +5495,7 @@ components:
5416
5495
  - apiEndpoint
5417
5496
  - apiTokens
5418
5497
  - integration
5498
+ - signingSecrets
5419
5499
  - secrets
5420
5500
  IntegrationTarget:
5421
5501
  type: string
@@ -8435,12 +8515,6 @@ components:
8435
8515
  - ok
8436
8516
  - good
8437
8517
  responses:
8438
- UnexpectedError:
8439
- description: Unexpected Error
8440
- content:
8441
- application/json:
8442
- schema:
8443
- $ref: "#/components/schemas/Error"
8444
8518
  BadRequestError:
8445
8519
  description: Bad Request
8446
8520
  content:
@@ -8463,6 +8537,28 @@ components:
8463
8537
  required:
8464
8538
  - code
8465
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
8466
8562
  NotFoundError:
8467
8563
  description: Not Found
8468
8564
  content:
@@ -8485,6 +8581,12 @@ components:
8485
8581
  required:
8486
8582
  - code
8487
8583
  - message
8584
+ UnexpectedError:
8585
+ description: Unexpected Error
8586
+ content:
8587
+ application/json:
8588
+ schema:
8589
+ $ref: "#/components/schemas/Error"
8488
8590
  paths:
8489
8591
  /:
8490
8592
  get:
@@ -8707,18 +8809,21 @@ paths:
8707
8809
  description: The integration property, if set, is ignored.
8708
8810
  - oneOf:
8709
8811
  - type: object
8812
+ title: Emoji
8710
8813
  properties:
8711
8814
  emoji:
8712
8815
  $ref: "#/components/schemas/Emoji"
8713
8816
  required:
8714
8817
  - emoji
8715
8818
  - type: object
8819
+ title: Icon
8716
8820
  properties:
8717
8821
  icon:
8718
8822
  $ref: "#/components/schemas/URL"
8719
8823
  required:
8720
8824
  - icon
8721
8825
  - type: object
8826
+ title: Remove icon or emoji
8722
8827
  properties:
8723
8828
  emoji:
8724
8829
  type: string
@@ -8813,6 +8918,86 @@ paths:
8813
8918
  $ref: "#/components/schemas/Space"
8814
8919
  default:
8815
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"
8816
9001
  "/spaces/{spaceId}/search":
8817
9002
  get:
8818
9003
  operationId: searchSpaceContent
@@ -10870,6 +11055,86 @@ paths:
10870
11055
  $ref: "#/components/schemas/Space"
10871
11056
  default:
10872
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"
10873
11138
  "/collections/{collectionId}/permissions/aggregate":
10874
11139
  get:
10875
11140
  operationId: listPermissionsAggregateInCollection
@@ -11695,6 +11960,47 @@ paths:
11695
11960
  $ref: "#/components/responses/NotFoundError"
11696
11961
  default:
11697
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"
11698
12004
  "/orgs/{organizationId}/members":
11699
12005
  get:
11700
12006
  operationId: listMembersInOrganizationById