@gitbook/api 0.25.0 → 0.26.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 +93 -47
- package/dist/index.cjs +8 -0
- package/dist/index.js +7 -0
- package/package.json +1 -1
- package/spec/openapi.json +145 -46
- package/spec/openapi.yaml +112 -43
package/spec/openapi.yaml
CHANGED
|
@@ -280,12 +280,12 @@ components:
|
|
|
280
280
|
Color:
|
|
281
281
|
type: string
|
|
282
282
|
pattern: ^#(?:[0-9a-fA-F]{3}){1,2}$
|
|
283
|
-
|
|
283
|
+
Timestamp:
|
|
284
284
|
type: string
|
|
285
|
-
format: date
|
|
285
|
+
format: date-time
|
|
286
286
|
Emoji:
|
|
287
287
|
type: string
|
|
288
|
-
maxLength:
|
|
288
|
+
maxLength: 50
|
|
289
289
|
description: Unicode codepoint or character of the emoji
|
|
290
290
|
example: 🎉
|
|
291
291
|
EmojiReaction:
|
|
@@ -307,7 +307,7 @@ components:
|
|
|
307
307
|
user:
|
|
308
308
|
$ref: "#/components/schemas/User"
|
|
309
309
|
reactedAt:
|
|
310
|
-
$ref: "#/components/schemas/
|
|
310
|
+
$ref: "#/components/schemas/Timestamp"
|
|
311
311
|
required:
|
|
312
312
|
- user
|
|
313
313
|
- reactedAt
|
|
@@ -500,6 +500,10 @@ components:
|
|
|
500
500
|
repoProjectDirectory:
|
|
501
501
|
type: string
|
|
502
502
|
description: Path to a root directory for the project in the repository.
|
|
503
|
+
timestamp:
|
|
504
|
+
description: |
|
|
505
|
+
The timestamp of the event that triggered this import. It ensures that Git sync import and export operations are executed in the same order on GitBook and on the remote repository.
|
|
506
|
+
$ref: "#/components/schemas/Timestamp"
|
|
503
507
|
force:
|
|
504
508
|
type: boolean
|
|
505
509
|
standalone:
|
|
@@ -535,6 +539,10 @@ components:
|
|
|
535
539
|
repoProjectDirectory:
|
|
536
540
|
type: string
|
|
537
541
|
description: Path to a root directory for the project in the repository.
|
|
542
|
+
timestamp:
|
|
543
|
+
description: |
|
|
544
|
+
The timestamp of the event that triggered this export. It ensures that Git sync import and export operations are executed in the same order on GitBook and on the remote repository.
|
|
545
|
+
$ref: "#/components/schemas/Timestamp"
|
|
538
546
|
force:
|
|
539
547
|
type: boolean
|
|
540
548
|
gitInfo:
|
|
@@ -720,7 +728,7 @@ components:
|
|
|
720
728
|
type: string
|
|
721
729
|
description: The API token name.
|
|
722
730
|
createdAt:
|
|
723
|
-
$ref: "#/components/schemas/
|
|
731
|
+
$ref: "#/components/schemas/Timestamp"
|
|
724
732
|
description: The API token creation date.
|
|
725
733
|
required:
|
|
726
734
|
- id
|
|
@@ -773,7 +781,7 @@ components:
|
|
|
773
781
|
description: Contributor towards content.
|
|
774
782
|
properties:
|
|
775
783
|
updatedAt:
|
|
776
|
-
$ref: "#/components/schemas/
|
|
784
|
+
$ref: "#/components/schemas/Timestamp"
|
|
777
785
|
count:
|
|
778
786
|
type: integer
|
|
779
787
|
user:
|
|
@@ -870,10 +878,10 @@ components:
|
|
|
870
878
|
$ref: "#/components/schemas/User"
|
|
871
879
|
postedAt:
|
|
872
880
|
description: When the comment was posted.
|
|
873
|
-
$ref: "#/components/schemas/
|
|
881
|
+
$ref: "#/components/schemas/Timestamp"
|
|
874
882
|
editedAt:
|
|
875
883
|
description: Date when the comment was edited, if it has been edited.
|
|
876
|
-
$ref: "#/components/schemas/
|
|
884
|
+
$ref: "#/components/schemas/Timestamp"
|
|
877
885
|
reactions:
|
|
878
886
|
description: Any emoji reactions to the comment.
|
|
879
887
|
$ref: "#/components/schemas/EmojiReactions"
|
|
@@ -957,7 +965,7 @@ components:
|
|
|
957
965
|
- resolved
|
|
958
966
|
resolvedAt:
|
|
959
967
|
description: If the comment has been resolved, the date at which it was resolved. If this field is not defined, the comment is not resolved.
|
|
960
|
-
$ref: "#/components/schemas/
|
|
968
|
+
$ref: "#/components/schemas/Timestamp"
|
|
961
969
|
resolvedBy:
|
|
962
970
|
description: If the comment has been resolved, the user who resolved it. If this field is not defined, the comment is not resolved.
|
|
963
971
|
$ref: "#/components/schemas/User"
|
|
@@ -988,10 +996,10 @@ components:
|
|
|
988
996
|
postedBy:
|
|
989
997
|
$ref: "#/components/schemas/User"
|
|
990
998
|
postedAt:
|
|
991
|
-
$ref: "#/components/schemas/
|
|
999
|
+
$ref: "#/components/schemas/Timestamp"
|
|
992
1000
|
editedAt:
|
|
993
1001
|
description: Date when the reply was edited, if it has been edited.
|
|
994
|
-
$ref: "#/components/schemas/
|
|
1002
|
+
$ref: "#/components/schemas/Timestamp"
|
|
995
1003
|
reactions:
|
|
996
1004
|
$ref: "#/components/schemas/EmojiReactions"
|
|
997
1005
|
body:
|
|
@@ -2702,6 +2710,7 @@ components:
|
|
|
2702
2710
|
- $ref: "#/components/schemas/ContentRefUser"
|
|
2703
2711
|
- $ref: "#/components/schemas/ContentRefCollection"
|
|
2704
2712
|
- $ref: "#/components/schemas/ContentRefSpace"
|
|
2713
|
+
- $ref: "#/components/schemas/ContentRefSnippet"
|
|
2705
2714
|
ContentRefURL:
|
|
2706
2715
|
type: object
|
|
2707
2716
|
properties:
|
|
@@ -2795,6 +2804,21 @@ components:
|
|
|
2795
2804
|
required:
|
|
2796
2805
|
- kind
|
|
2797
2806
|
- space
|
|
2807
|
+
ContentRefSnippet:
|
|
2808
|
+
type: object
|
|
2809
|
+
properties:
|
|
2810
|
+
kind:
|
|
2811
|
+
type: string
|
|
2812
|
+
enum:
|
|
2813
|
+
- snippet
|
|
2814
|
+
snippet:
|
|
2815
|
+
type: string
|
|
2816
|
+
organization:
|
|
2817
|
+
type: string
|
|
2818
|
+
required:
|
|
2819
|
+
- kind
|
|
2820
|
+
- snippet
|
|
2821
|
+
- organization
|
|
2798
2822
|
Space:
|
|
2799
2823
|
type: object
|
|
2800
2824
|
properties:
|
|
@@ -2807,21 +2831,20 @@ components:
|
|
|
2807
2831
|
type: string
|
|
2808
2832
|
description: Unique identifier for the space
|
|
2809
2833
|
title:
|
|
2810
|
-
|
|
2811
|
-
description: Title of the space
|
|
2812
|
-
minLength: 0
|
|
2813
|
-
maxLength: 100
|
|
2834
|
+
$ref: "#/components/schemas/SpaceTitle"
|
|
2814
2835
|
emoji:
|
|
2815
2836
|
description: An emoji for this space. It'll match the emoji shown in the GitBook app.
|
|
2816
2837
|
$ref: "#/components/schemas/Emoji"
|
|
2817
2838
|
visibility:
|
|
2818
2839
|
$ref: "#/components/schemas/ContentVisibility"
|
|
2819
2840
|
createdAt:
|
|
2820
|
-
$ref: "#/components/schemas/
|
|
2841
|
+
$ref: "#/components/schemas/Timestamp"
|
|
2821
2842
|
updatedAt:
|
|
2822
|
-
$ref: "#/components/schemas/
|
|
2843
|
+
$ref: "#/components/schemas/Timestamp"
|
|
2823
2844
|
deletedAt:
|
|
2824
|
-
$ref: "#/components/schemas/
|
|
2845
|
+
$ref: "#/components/schemas/Timestamp"
|
|
2846
|
+
editMode:
|
|
2847
|
+
$ref: "#/components/schemas/SpaceEditMode"
|
|
2825
2848
|
urls:
|
|
2826
2849
|
type: object
|
|
2827
2850
|
description: URLs associated with the object
|
|
@@ -2868,6 +2891,20 @@ components:
|
|
|
2868
2891
|
- createdAt
|
|
2869
2892
|
- updatedAt
|
|
2870
2893
|
- urls
|
|
2894
|
+
SpaceEditMode:
|
|
2895
|
+
type: string
|
|
2896
|
+
description: |
|
|
2897
|
+
Determines how a Space can be edited.
|
|
2898
|
+
* `live`: Users can directly edit the space
|
|
2899
|
+
* `locked`: All edits are locked for this space.
|
|
2900
|
+
enum:
|
|
2901
|
+
- live
|
|
2902
|
+
- locked
|
|
2903
|
+
SpaceTitle:
|
|
2904
|
+
type: string
|
|
2905
|
+
description: Title of the space
|
|
2906
|
+
minLength: 1
|
|
2907
|
+
maxLength: 50
|
|
2871
2908
|
RevisionBase:
|
|
2872
2909
|
type: object
|
|
2873
2910
|
properties:
|
|
@@ -2892,6 +2929,9 @@ components:
|
|
|
2892
2929
|
type: array
|
|
2893
2930
|
items:
|
|
2894
2931
|
$ref: "#/components/schemas/RevisionFile"
|
|
2932
|
+
createdAt:
|
|
2933
|
+
description: When the revision was created.
|
|
2934
|
+
$ref: "#/components/schemas/Timestamp"
|
|
2895
2935
|
git:
|
|
2896
2936
|
description: Metadata about a potential associated git commit.
|
|
2897
2937
|
$ref: "#/components/schemas/GitSyncCommit"
|
|
@@ -2919,6 +2959,7 @@ components:
|
|
|
2919
2959
|
- pages
|
|
2920
2960
|
- files
|
|
2921
2961
|
- urls
|
|
2962
|
+
- createdAt
|
|
2922
2963
|
RevisionTypeMerge:
|
|
2923
2964
|
allOf:
|
|
2924
2965
|
- $ref: "#/components/schemas/RevisionBase"
|
|
@@ -3000,10 +3041,10 @@ components:
|
|
|
3000
3041
|
$ref: "#/components/schemas/Emoji"
|
|
3001
3042
|
createdAt:
|
|
3002
3043
|
description: When the page was first created. Only present if page has been edited at least once.
|
|
3003
|
-
$ref: "#/components/schemas/
|
|
3044
|
+
$ref: "#/components/schemas/Timestamp"
|
|
3004
3045
|
updatedAt:
|
|
3005
3046
|
description: When the page was last edited. Only present if page has been edited at least once.
|
|
3006
|
-
$ref: "#/components/schemas/
|
|
3047
|
+
$ref: "#/components/schemas/Timestamp"
|
|
3007
3048
|
required:
|
|
3008
3049
|
- id
|
|
3009
3050
|
- title
|
|
@@ -3528,23 +3569,22 @@ components:
|
|
|
3528
3569
|
description: The URL to the repository tree, used when rendering public content.
|
|
3529
3570
|
updatedAt:
|
|
3530
3571
|
description: When the Git provider details were last updated
|
|
3531
|
-
$ref: "#/components/schemas/
|
|
3572
|
+
$ref: "#/components/schemas/Timestamp"
|
|
3532
3573
|
GitSyncOperation:
|
|
3533
3574
|
type: object
|
|
3534
3575
|
properties:
|
|
3535
3576
|
state:
|
|
3536
3577
|
$ref: "#/components/schemas/GitSyncOperationState"
|
|
3537
3578
|
startedAt:
|
|
3538
|
-
$ref: "#/components/schemas/
|
|
3579
|
+
$ref: "#/components/schemas/Timestamp"
|
|
3539
3580
|
completedAt:
|
|
3540
3581
|
description: Date when the operation was successful (when state is `success`)
|
|
3541
|
-
$ref: "#/components/schemas/
|
|
3582
|
+
$ref: "#/components/schemas/Timestamp"
|
|
3542
3583
|
error:
|
|
3543
3584
|
type: string
|
|
3544
3585
|
description: Error details, defined if state is `failure`.
|
|
3545
3586
|
required:
|
|
3546
3587
|
- state
|
|
3547
|
-
- startedAt
|
|
3548
3588
|
GitSyncOperationState:
|
|
3549
3589
|
type: string
|
|
3550
3590
|
description: |
|
|
@@ -3746,10 +3786,10 @@ components:
|
|
|
3746
3786
|
description: Whatever the membership of this user is disabled and prevent them from accessing content.
|
|
3747
3787
|
joinedAt:
|
|
3748
3788
|
description: Date at which the user joined the organization.
|
|
3749
|
-
$ref: "#/components/schemas/
|
|
3789
|
+
$ref: "#/components/schemas/Timestamp"
|
|
3750
3790
|
lastSeenAt:
|
|
3751
3791
|
description: Date at which the user was last seen active in the organization.
|
|
3752
|
-
$ref: "#/components/schemas/
|
|
3792
|
+
$ref: "#/components/schemas/Timestamp"
|
|
3753
3793
|
sso:
|
|
3754
3794
|
type: boolean
|
|
3755
3795
|
description: Whether the user can login with SSO.
|
|
@@ -3788,7 +3828,7 @@ components:
|
|
|
3788
3828
|
description: Count of spaces this team has access to.
|
|
3789
3829
|
createdAt:
|
|
3790
3830
|
description: Date at which the team was created.
|
|
3791
|
-
$ref: "#/components/schemas/
|
|
3831
|
+
$ref: "#/components/schemas/Timestamp"
|
|
3792
3832
|
required:
|
|
3793
3833
|
- object
|
|
3794
3834
|
- id
|
|
@@ -4069,6 +4109,9 @@ components:
|
|
|
4069
4109
|
id:
|
|
4070
4110
|
type: string
|
|
4071
4111
|
description: Unique identifier for the snippet
|
|
4112
|
+
organization:
|
|
4113
|
+
type: string
|
|
4114
|
+
description: ID of the organization owning this snippet
|
|
4072
4115
|
createdAt:
|
|
4073
4116
|
type: string
|
|
4074
4117
|
format: date-time
|
|
@@ -4125,6 +4168,7 @@ components:
|
|
|
4125
4168
|
- app
|
|
4126
4169
|
required:
|
|
4127
4170
|
- id
|
|
4171
|
+
- organization
|
|
4128
4172
|
- source
|
|
4129
4173
|
- createdAt
|
|
4130
4174
|
- archived
|
|
@@ -4161,7 +4205,7 @@ components:
|
|
|
4161
4205
|
$ref: "#/components/schemas/ContentAuditRelationStatus"
|
|
4162
4206
|
createdAt:
|
|
4163
4207
|
description: The date at which the relation was created
|
|
4164
|
-
$ref: "#/components/schemas/
|
|
4208
|
+
$ref: "#/components/schemas/Timestamp"
|
|
4165
4209
|
required:
|
|
4166
4210
|
- id
|
|
4167
4211
|
- sources
|
|
@@ -4233,9 +4277,9 @@ components:
|
|
|
4233
4277
|
createdBy:
|
|
4234
4278
|
$ref: "#/components/schemas/User"
|
|
4235
4279
|
createdAt:
|
|
4236
|
-
$ref: "#/components/schemas/
|
|
4280
|
+
$ref: "#/components/schemas/Timestamp"
|
|
4237
4281
|
updatedAt:
|
|
4238
|
-
$ref: "#/components/schemas/
|
|
4282
|
+
$ref: "#/components/schemas/Timestamp"
|
|
4239
4283
|
urls:
|
|
4240
4284
|
type: object
|
|
4241
4285
|
description: URLs associated with the object
|
|
@@ -4289,9 +4333,9 @@ components:
|
|
|
4289
4333
|
comment:
|
|
4290
4334
|
$ref: "#/components/schemas/Comment"
|
|
4291
4335
|
createdAt:
|
|
4292
|
-
$ref: "#/components/schemas/
|
|
4336
|
+
$ref: "#/components/schemas/Timestamp"
|
|
4293
4337
|
updatedAt:
|
|
4294
|
-
$ref: "#/components/schemas/
|
|
4338
|
+
$ref: "#/components/schemas/Timestamp"
|
|
4295
4339
|
required:
|
|
4296
4340
|
- object
|
|
4297
4341
|
- id
|
|
@@ -4323,7 +4367,7 @@ components:
|
|
|
4323
4367
|
description: The user who made the request.
|
|
4324
4368
|
$ref: "#/components/schemas/User"
|
|
4325
4369
|
createdAt:
|
|
4326
|
-
$ref: "#/components/schemas/
|
|
4370
|
+
$ref: "#/components/schemas/Timestamp"
|
|
4327
4371
|
required:
|
|
4328
4372
|
- object
|
|
4329
4373
|
- revision
|
|
@@ -4970,6 +5014,7 @@ components:
|
|
|
4970
5014
|
- space:script:inject
|
|
4971
5015
|
- space:script:cookies
|
|
4972
5016
|
- space:git:sync
|
|
5017
|
+
- space:visitor:auth
|
|
4973
5018
|
IntegrationCategories:
|
|
4974
5019
|
type: array
|
|
4975
5020
|
description: Categories for which the integration is listed in the marketplace
|
|
@@ -5050,7 +5095,7 @@ components:
|
|
|
5050
5095
|
type: string
|
|
5051
5096
|
description: Unique ID of the integration installation.
|
|
5052
5097
|
createdAt:
|
|
5053
|
-
$ref: "#/components/schemas/
|
|
5098
|
+
$ref: "#/components/schemas/Timestamp"
|
|
5054
5099
|
payload:
|
|
5055
5100
|
$ref: "#/components/schemas/Event"
|
|
5056
5101
|
status:
|
|
@@ -5072,7 +5117,7 @@ components:
|
|
|
5072
5117
|
description: The message of the log entry.
|
|
5073
5118
|
type: string
|
|
5074
5119
|
timestamp:
|
|
5075
|
-
$ref: "#/components/schemas/
|
|
5120
|
+
$ref: "#/components/schemas/Timestamp"
|
|
5076
5121
|
level:
|
|
5077
5122
|
description: The level of the log entry.
|
|
5078
5123
|
type: string
|
|
@@ -5216,9 +5261,9 @@ components:
|
|
|
5216
5261
|
configuration:
|
|
5217
5262
|
$ref: "#/components/schemas/IntegrationInstallationConfiguration"
|
|
5218
5263
|
createdAt:
|
|
5219
|
-
$ref: "#/components/schemas/
|
|
5264
|
+
$ref: "#/components/schemas/Timestamp"
|
|
5220
5265
|
updatedAt:
|
|
5221
|
-
$ref: "#/components/schemas/
|
|
5266
|
+
$ref: "#/components/schemas/Timestamp"
|
|
5222
5267
|
urls:
|
|
5223
5268
|
type: object
|
|
5224
5269
|
description: URLs associated with the object
|
|
@@ -5723,6 +5768,7 @@ components:
|
|
|
5723
5768
|
- $ref: "#/components/schemas/SpaceVisibilityUpdatedEvent"
|
|
5724
5769
|
- $ref: "#/components/schemas/FetchEvent"
|
|
5725
5770
|
- $ref: "#/components/schemas/FetchPublishedScriptEvent"
|
|
5771
|
+
- $ref: "#/components/schemas/FetchVisitorAuthenticationEvent"
|
|
5726
5772
|
- $ref: "#/components/schemas/UIRenderEvent"
|
|
5727
5773
|
discriminator:
|
|
5728
5774
|
propertyName: type
|
|
@@ -6024,6 +6070,20 @@ components:
|
|
|
6024
6070
|
- fetch_published_script
|
|
6025
6071
|
required:
|
|
6026
6072
|
- type
|
|
6073
|
+
FetchVisitorAuthenticationEvent:
|
|
6074
|
+
allOf:
|
|
6075
|
+
- $ref: "#/components/schemas/SpaceEvent"
|
|
6076
|
+
- type: object
|
|
6077
|
+
description: Common properties for all events related to visitor authentication from an installation
|
|
6078
|
+
properties:
|
|
6079
|
+
type:
|
|
6080
|
+
type: string
|
|
6081
|
+
enum:
|
|
6082
|
+
- fetch_visitor_authentication
|
|
6083
|
+
location:
|
|
6084
|
+
type: string
|
|
6085
|
+
required:
|
|
6086
|
+
- type
|
|
6027
6087
|
UIRenderEvent:
|
|
6028
6088
|
allOf:
|
|
6029
6089
|
- oneOf:
|
|
@@ -6154,9 +6214,9 @@ components:
|
|
|
6154
6214
|
amount:
|
|
6155
6215
|
type: number
|
|
6156
6216
|
periodStart:
|
|
6157
|
-
$ref: "#/components/schemas/
|
|
6217
|
+
$ref: "#/components/schemas/Timestamp"
|
|
6158
6218
|
periodEnd:
|
|
6159
|
-
$ref: "#/components/schemas/
|
|
6219
|
+
$ref: "#/components/schemas/Timestamp"
|
|
6160
6220
|
required:
|
|
6161
6221
|
- amount
|
|
6162
6222
|
- description
|
|
@@ -6356,7 +6416,7 @@ components:
|
|
|
6356
6416
|
description: All the permissions of a user
|
|
6357
6417
|
properties:
|
|
6358
6418
|
updatedAt:
|
|
6359
|
-
$ref: "#/components/schemas/
|
|
6419
|
+
$ref: "#/components/schemas/Timestamp"
|
|
6360
6420
|
searchKey:
|
|
6361
6421
|
type: string
|
|
6362
6422
|
organizations:
|
|
@@ -7944,9 +8004,9 @@ components:
|
|
|
7944
8004
|
options:
|
|
7945
8005
|
$ref: "#/components/schemas/CustomFieldOptions"
|
|
7946
8006
|
createdAt:
|
|
7947
|
-
$ref: "#/components/schemas/
|
|
8007
|
+
$ref: "#/components/schemas/Timestamp"
|
|
7948
8008
|
updatedAt:
|
|
7949
|
-
$ref: "#/components/schemas/
|
|
8009
|
+
$ref: "#/components/schemas/Timestamp"
|
|
7950
8010
|
urls:
|
|
7951
8011
|
type: object
|
|
7952
8012
|
description: URLs associated with the object
|
|
@@ -8324,7 +8384,7 @@ components:
|
|
|
8324
8384
|
rating:
|
|
8325
8385
|
$ref: "#/components/schemas/PageFeedbackRating"
|
|
8326
8386
|
createdAt:
|
|
8327
|
-
$ref: "#/components/schemas/
|
|
8387
|
+
$ref: "#/components/schemas/Timestamp"
|
|
8328
8388
|
revision:
|
|
8329
8389
|
type: string
|
|
8330
8390
|
description: ID of the revision when the rating was created
|
|
@@ -8612,6 +8672,10 @@ paths:
|
|
|
8612
8672
|
schema:
|
|
8613
8673
|
type: object
|
|
8614
8674
|
properties:
|
|
8675
|
+
editMode:
|
|
8676
|
+
$ref: "#/components/schemas/SpaceEditMode"
|
|
8677
|
+
title:
|
|
8678
|
+
$ref: "#/components/schemas/SpaceTitle"
|
|
8615
8679
|
visibility:
|
|
8616
8680
|
$ref: "#/components/schemas/ContentVisibility"
|
|
8617
8681
|
responses:
|
|
@@ -13361,6 +13425,11 @@ paths:
|
|
|
13361
13425
|
description: If specified, only locations under the given pageId will be returned. You must specify a spaceId too. If pageId is not specified, GitBook will suggest pages at the top level.
|
|
13362
13426
|
schema:
|
|
13363
13427
|
type: string
|
|
13428
|
+
- name: search
|
|
13429
|
+
in: query
|
|
13430
|
+
description: If specified, only locations matching the search query will be returned.
|
|
13431
|
+
schema:
|
|
13432
|
+
type: string
|
|
13364
13433
|
responses:
|
|
13365
13434
|
"200":
|
|
13366
13435
|
description: A paginated list of suggested snippet locations.
|