@gitbook/api 0.0.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.
@@ -0,0 +1,2648 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "GitBook API",
5
+ "description": "The GitBook API",
6
+ "termsOfService": "https://policies.gitbook.com",
7
+ "contact": {
8
+ "name": "API Support",
9
+ "url": "https://gitbook.com/support",
10
+ "email": "support@gitbook.com"
11
+ },
12
+ "version": "0.0.1-beta"
13
+ },
14
+ "servers": [
15
+ {
16
+ "url": "{host}/v1",
17
+ "variables": {
18
+ "host": {
19
+ "default": "https://api.gitbook.com"
20
+ }
21
+ }
22
+ }
23
+ ],
24
+ "security": [
25
+ {
26
+ "PersonalAccessToken": []
27
+ }
28
+ ],
29
+ "components": {
30
+ "securitySchemes": {
31
+ "PersonalAccessToken": {
32
+ "type": "http",
33
+ "scheme": "bearer"
34
+ }
35
+ },
36
+ "parameters": {
37
+ "spaceId": {
38
+ "name": "spaceId",
39
+ "in": "path",
40
+ "required": true,
41
+ "description": "The unique id of the space",
42
+ "schema": {
43
+ "type": "string"
44
+ }
45
+ },
46
+ "integrationName": {
47
+ "name": "integrationName",
48
+ "in": "path",
49
+ "required": true,
50
+ "description": "Name of the integration",
51
+ "schema": {
52
+ "type": "string"
53
+ }
54
+ },
55
+ "installationId": {
56
+ "name": "installationId",
57
+ "in": "path",
58
+ "required": true,
59
+ "description": "Identifier of the installation",
60
+ "schema": {
61
+ "type": "string"
62
+ }
63
+ }
64
+ },
65
+ "schemas": {
66
+ "Error": {
67
+ "type": "object",
68
+ "required": [
69
+ "code",
70
+ "message"
71
+ ],
72
+ "properties": {
73
+ "code": {
74
+ "type": "integer",
75
+ "format": "int32"
76
+ },
77
+ "message": {
78
+ "type": "string"
79
+ }
80
+ }
81
+ },
82
+ "RequestSpaceTrackPageView": {
83
+ "type": "object",
84
+ "properties": {
85
+ "pageId": {
86
+ "type": "string",
87
+ "description": "Unique identifier of the page"
88
+ },
89
+ "visitorId": {
90
+ "type": "string",
91
+ "description": "Unique identifier of the visitor"
92
+ }
93
+ },
94
+ "required": [
95
+ "pageId",
96
+ "visitorId"
97
+ ]
98
+ },
99
+ "RequestPublishIntegration": {
100
+ "type": "object",
101
+ "properties": {
102
+ "icon": {
103
+ "type": "string",
104
+ "description": "Base64 content of the icon"
105
+ },
106
+ "title": {
107
+ "type": "string",
108
+ "description": "Title of the integration",
109
+ "minLength": 2,
110
+ "maxLength": 30
111
+ },
112
+ "description": {
113
+ "type": "string",
114
+ "description": "Title of the integration",
115
+ "maxLength": 100
116
+ },
117
+ "summary": {
118
+ "type": "string",
119
+ "description": "Long form markdown summary of the integration",
120
+ "maxLength": 500
121
+ },
122
+ "visibility": {
123
+ "type": "string",
124
+ "enum": [
125
+ "public",
126
+ "private"
127
+ ]
128
+ },
129
+ "scopes": {
130
+ "type": "array",
131
+ "description": "Permissions that should be granted to the integration",
132
+ "items": {
133
+ "type": "string",
134
+ "enum": [
135
+ "space:views",
136
+ "space:content"
137
+ ]
138
+ }
139
+ },
140
+ "categories": {
141
+ "type": "array",
142
+ "description": "Categories for which the integration is listed in the marketplace",
143
+ "items": {
144
+ "type": "string",
145
+ "enum": [
146
+ "analytics",
147
+ "collaboration",
148
+ "other"
149
+ ]
150
+ }
151
+ },
152
+ "configurations": {
153
+ "type": "object",
154
+ "properties": {
155
+ "space": {
156
+ "type": "object",
157
+ "properties": {
158
+ "properties": {
159
+ "type": "object",
160
+ "additionalProperties": {
161
+ "allOf": [
162
+ {
163
+ "type": "object",
164
+ "properties": {
165
+ "type": {
166
+ "type": "string"
167
+ },
168
+ "title": {
169
+ "type": "string",
170
+ "maxLength": 30
171
+ },
172
+ "description": {
173
+ "type": "string",
174
+ "maxLength": 100
175
+ }
176
+ }
177
+ },
178
+ {
179
+ "oneOf": [
180
+ {
181
+ "type": "object",
182
+ "properties": {
183
+ "type": {
184
+ "type": "string",
185
+ "enum": [
186
+ "string"
187
+ ]
188
+ },
189
+ "default": {
190
+ "type": "string"
191
+ }
192
+ }
193
+ },
194
+ {
195
+ "type": "object",
196
+ "properties": {
197
+ "type": {
198
+ "type": "string",
199
+ "enum": [
200
+ "number"
201
+ ]
202
+ },
203
+ "default": {
204
+ "type": "number"
205
+ }
206
+ }
207
+ },
208
+ {
209
+ "type": "object",
210
+ "properties": {
211
+ "type": {
212
+ "type": "string",
213
+ "enum": [
214
+ "boolean"
215
+ ]
216
+ },
217
+ "default": {
218
+ "type": "boolean"
219
+ }
220
+ }
221
+ },
222
+ {
223
+ "type": "object",
224
+ "properties": {
225
+ "type": {
226
+ "type": "string",
227
+ "enum": [
228
+ "button"
229
+ ]
230
+ },
231
+ "callback_url": {
232
+ "type": "string"
233
+ },
234
+ "button_text": {
235
+ "type": "string"
236
+ }
237
+ },
238
+ "required": [
239
+ "callback_url",
240
+ "button_text"
241
+ ]
242
+ }
243
+ ]
244
+ }
245
+ ]
246
+ }
247
+ }
248
+ },
249
+ "required": [
250
+ "properties"
251
+ ]
252
+ }
253
+ }
254
+ },
255
+ "script": {
256
+ "type": "string",
257
+ "description": "Content of the script to use"
258
+ },
259
+ "secrets": {
260
+ "type": "object",
261
+ "description": "Secrets stored on the integration and passed at runtime.",
262
+ "properties": {},
263
+ "maxProperties": 20,
264
+ "additionalProperties": {
265
+ "type": "string"
266
+ }
267
+ }
268
+ },
269
+ "required": [
270
+ "title",
271
+ "description",
272
+ "script",
273
+ "scopes"
274
+ ]
275
+ },
276
+ "RequestUpdateIntegrationInstallation": {
277
+ "type": "object",
278
+ "properties": {
279
+ "status": {
280
+ "type": "string",
281
+ "enum": [
282
+ "active",
283
+ "pending",
284
+ "paused"
285
+ ]
286
+ },
287
+ "configurations": {
288
+ "type": "object",
289
+ "properties": {
290
+ "space": {
291
+ "type": "object"
292
+ }
293
+ }
294
+ }
295
+ }
296
+ },
297
+ "User": {
298
+ "type": "object",
299
+ "properties": {
300
+ "id": {
301
+ "type": "string"
302
+ },
303
+ "displayName": {
304
+ "type": "string"
305
+ },
306
+ "email": {
307
+ "type": "string"
308
+ }
309
+ },
310
+ "required": [
311
+ "id",
312
+ "displayName"
313
+ ]
314
+ },
315
+ "Space": {
316
+ "type": "object",
317
+ "properties": {
318
+ "id": {
319
+ "type": "string",
320
+ "description": "Unique identifier for the space"
321
+ },
322
+ "title": {
323
+ "type": "string",
324
+ "description": "Title of the space",
325
+ "minLength": 0,
326
+ "maxLength": 100
327
+ }
328
+ },
329
+ "required": [
330
+ "id",
331
+ "title"
332
+ ]
333
+ },
334
+ "Integration": {
335
+ "type": "object",
336
+ "properties": {
337
+ "name": {
338
+ "type": "string",
339
+ "description": "Unique named identifier for the integration"
340
+ },
341
+ "title": {
342
+ "type": "string",
343
+ "description": "Title of the integration",
344
+ "minLength": 2,
345
+ "maxLength": 30
346
+ },
347
+ "description": {
348
+ "type": "string",
349
+ "description": "Title of the integration",
350
+ "maxLength": 100
351
+ },
352
+ "summary": {
353
+ "type": "string",
354
+ "description": "Long form markdown summary of the integration",
355
+ "maxLength": 500
356
+ },
357
+ "script": {
358
+ "type": "string",
359
+ "description": "Content of the script to run."
360
+ },
361
+ "visibility": {
362
+ "type": "string",
363
+ "enum": [
364
+ "public",
365
+ "private"
366
+ ]
367
+ },
368
+ "scopes": {
369
+ "type": "array",
370
+ "description": "Permissions that should be granted to the integration",
371
+ "items": {
372
+ "type": "string",
373
+ "enum": [
374
+ "space:views",
375
+ "space:content"
376
+ ]
377
+ }
378
+ },
379
+ "categories": {
380
+ "type": "array",
381
+ "description": "Categories for which the integration is listed in the marketplace",
382
+ "items": {
383
+ "type": "string",
384
+ "enum": [
385
+ "analytics",
386
+ "collaboration",
387
+ "other"
388
+ ]
389
+ }
390
+ },
391
+ "configurations": {
392
+ "type": "object",
393
+ "properties": {
394
+ "space": {
395
+ "type": "object",
396
+ "properties": {
397
+ "properties": {
398
+ "type": "object",
399
+ "additionalProperties": {
400
+ "allOf": [
401
+ {
402
+ "type": "object",
403
+ "properties": {
404
+ "type": {
405
+ "type": "string"
406
+ },
407
+ "title": {
408
+ "type": "string",
409
+ "maxLength": 30
410
+ },
411
+ "description": {
412
+ "type": "string",
413
+ "maxLength": 100
414
+ }
415
+ }
416
+ },
417
+ {
418
+ "oneOf": [
419
+ {
420
+ "type": "object",
421
+ "properties": {
422
+ "type": {
423
+ "type": "string",
424
+ "enum": [
425
+ "string"
426
+ ]
427
+ },
428
+ "default": {
429
+ "type": "string"
430
+ }
431
+ }
432
+ },
433
+ {
434
+ "type": "object",
435
+ "properties": {
436
+ "type": {
437
+ "type": "string",
438
+ "enum": [
439
+ "number"
440
+ ]
441
+ },
442
+ "default": {
443
+ "type": "number"
444
+ }
445
+ }
446
+ },
447
+ {
448
+ "type": "object",
449
+ "properties": {
450
+ "type": {
451
+ "type": "string",
452
+ "enum": [
453
+ "boolean"
454
+ ]
455
+ },
456
+ "default": {
457
+ "type": "boolean"
458
+ }
459
+ }
460
+ },
461
+ {
462
+ "type": "object",
463
+ "properties": {
464
+ "type": {
465
+ "type": "string",
466
+ "enum": [
467
+ "button"
468
+ ]
469
+ },
470
+ "callback_url": {
471
+ "type": "string"
472
+ },
473
+ "button_text": {
474
+ "type": "string"
475
+ }
476
+ },
477
+ "required": [
478
+ "callback_url",
479
+ "button_text"
480
+ ]
481
+ }
482
+ ]
483
+ }
484
+ ]
485
+ }
486
+ }
487
+ },
488
+ "required": [
489
+ "properties"
490
+ ]
491
+ }
492
+ }
493
+ }
494
+ },
495
+ "required": [
496
+ "name",
497
+ "title",
498
+ "scopes",
499
+ "script",
500
+ "categories",
501
+ "visibility"
502
+ ]
503
+ },
504
+ "IntegrationScope": {
505
+ "type": "string",
506
+ "enum": [
507
+ "space:views",
508
+ "space:content"
509
+ ]
510
+ },
511
+ "IntegrationCategory": {
512
+ "type": "string",
513
+ "enum": [
514
+ "analytics",
515
+ "collaboration",
516
+ "other"
517
+ ]
518
+ },
519
+ "IntegrationConfigurations": {
520
+ "type": "object",
521
+ "properties": {
522
+ "space": {
523
+ "type": "object",
524
+ "properties": {
525
+ "properties": {
526
+ "type": "object",
527
+ "additionalProperties": {
528
+ "allOf": [
529
+ {
530
+ "type": "object",
531
+ "properties": {
532
+ "type": {
533
+ "type": "string"
534
+ },
535
+ "title": {
536
+ "type": "string",
537
+ "maxLength": 30
538
+ },
539
+ "description": {
540
+ "type": "string",
541
+ "maxLength": 100
542
+ }
543
+ }
544
+ },
545
+ {
546
+ "oneOf": [
547
+ {
548
+ "type": "object",
549
+ "properties": {
550
+ "type": {
551
+ "type": "string",
552
+ "enum": [
553
+ "string"
554
+ ]
555
+ },
556
+ "default": {
557
+ "type": "string"
558
+ }
559
+ }
560
+ },
561
+ {
562
+ "type": "object",
563
+ "properties": {
564
+ "type": {
565
+ "type": "string",
566
+ "enum": [
567
+ "number"
568
+ ]
569
+ },
570
+ "default": {
571
+ "type": "number"
572
+ }
573
+ }
574
+ },
575
+ {
576
+ "type": "object",
577
+ "properties": {
578
+ "type": {
579
+ "type": "string",
580
+ "enum": [
581
+ "boolean"
582
+ ]
583
+ },
584
+ "default": {
585
+ "type": "boolean"
586
+ }
587
+ }
588
+ },
589
+ {
590
+ "type": "object",
591
+ "properties": {
592
+ "type": {
593
+ "type": "string",
594
+ "enum": [
595
+ "button"
596
+ ]
597
+ },
598
+ "callback_url": {
599
+ "type": "string"
600
+ },
601
+ "button_text": {
602
+ "type": "string"
603
+ }
604
+ },
605
+ "required": [
606
+ "callback_url",
607
+ "button_text"
608
+ ]
609
+ }
610
+ ]
611
+ }
612
+ ]
613
+ }
614
+ }
615
+ },
616
+ "required": [
617
+ "properties"
618
+ ]
619
+ }
620
+ }
621
+ },
622
+ "IntegrationConfiguration": {
623
+ "type": "object",
624
+ "properties": {
625
+ "properties": {
626
+ "type": "object",
627
+ "additionalProperties": {
628
+ "allOf": [
629
+ {
630
+ "type": "object",
631
+ "properties": {
632
+ "type": {
633
+ "type": "string"
634
+ },
635
+ "title": {
636
+ "type": "string",
637
+ "maxLength": 30
638
+ },
639
+ "description": {
640
+ "type": "string",
641
+ "maxLength": 100
642
+ }
643
+ }
644
+ },
645
+ {
646
+ "oneOf": [
647
+ {
648
+ "type": "object",
649
+ "properties": {
650
+ "type": {
651
+ "type": "string",
652
+ "enum": [
653
+ "string"
654
+ ]
655
+ },
656
+ "default": {
657
+ "type": "string"
658
+ }
659
+ }
660
+ },
661
+ {
662
+ "type": "object",
663
+ "properties": {
664
+ "type": {
665
+ "type": "string",
666
+ "enum": [
667
+ "number"
668
+ ]
669
+ },
670
+ "default": {
671
+ "type": "number"
672
+ }
673
+ }
674
+ },
675
+ {
676
+ "type": "object",
677
+ "properties": {
678
+ "type": {
679
+ "type": "string",
680
+ "enum": [
681
+ "boolean"
682
+ ]
683
+ },
684
+ "default": {
685
+ "type": "boolean"
686
+ }
687
+ }
688
+ },
689
+ {
690
+ "type": "object",
691
+ "properties": {
692
+ "type": {
693
+ "type": "string",
694
+ "enum": [
695
+ "button"
696
+ ]
697
+ },
698
+ "callback_url": {
699
+ "type": "string"
700
+ },
701
+ "button_text": {
702
+ "type": "string"
703
+ }
704
+ },
705
+ "required": [
706
+ "callback_url",
707
+ "button_text"
708
+ ]
709
+ }
710
+ ]
711
+ }
712
+ ]
713
+ }
714
+ }
715
+ },
716
+ "required": [
717
+ "properties"
718
+ ]
719
+ },
720
+ "IntegrationVisibility": {
721
+ "type": "string",
722
+ "enum": [
723
+ "public",
724
+ "private"
725
+ ]
726
+ },
727
+ "IntegrationInstallation": {
728
+ "type": "object",
729
+ "properties": {
730
+ "id": {
731
+ "type": "string"
732
+ },
733
+ "status": {
734
+ "type": "string",
735
+ "enum": [
736
+ "active",
737
+ "pending",
738
+ "paused"
739
+ ]
740
+ },
741
+ "configurations": {
742
+ "type": "object",
743
+ "properties": {
744
+ "space": {
745
+ "type": "object"
746
+ }
747
+ }
748
+ }
749
+ },
750
+ "required": [
751
+ "id",
752
+ "status"
753
+ ]
754
+ },
755
+ "IntegrationInstallationStatus": {
756
+ "type": "string",
757
+ "enum": [
758
+ "active",
759
+ "pending",
760
+ "paused"
761
+ ]
762
+ },
763
+ "IntegrationSecrets": {
764
+ "type": "object",
765
+ "description": "Secrets stored on the integration and passed at runtime.",
766
+ "properties": {},
767
+ "maxProperties": 20,
768
+ "additionalProperties": {
769
+ "type": "string"
770
+ }
771
+ },
772
+ "IntegrationEnvironment": {
773
+ "type": "object",
774
+ "description": "Runtime environment provided during the execution of integration's code.",
775
+ "properties": {
776
+ "apiEndpoint": {
777
+ "type": "string",
778
+ "description": "URL of the HTTP API"
779
+ },
780
+ "authToken": {
781
+ "type": "string",
782
+ "description": "Authentication token to use with the HTTP API"
783
+ },
784
+ "integration": {
785
+ "type": "object",
786
+ "properties": {
787
+ "name": {
788
+ "type": "string",
789
+ "description": "Unique named identifier for the integration"
790
+ },
791
+ "title": {
792
+ "type": "string",
793
+ "description": "Title of the integration",
794
+ "minLength": 2,
795
+ "maxLength": 30
796
+ },
797
+ "description": {
798
+ "type": "string",
799
+ "description": "Title of the integration",
800
+ "maxLength": 100
801
+ },
802
+ "summary": {
803
+ "type": "string",
804
+ "description": "Long form markdown summary of the integration",
805
+ "maxLength": 500
806
+ },
807
+ "script": {
808
+ "type": "string",
809
+ "description": "Content of the script to run."
810
+ },
811
+ "visibility": {
812
+ "type": "string",
813
+ "enum": [
814
+ "public",
815
+ "private"
816
+ ]
817
+ },
818
+ "scopes": {
819
+ "type": "array",
820
+ "description": "Permissions that should be granted to the integration",
821
+ "items": {
822
+ "type": "string",
823
+ "enum": [
824
+ "space:views",
825
+ "space:content"
826
+ ]
827
+ }
828
+ },
829
+ "categories": {
830
+ "type": "array",
831
+ "description": "Categories for which the integration is listed in the marketplace",
832
+ "items": {
833
+ "type": "string",
834
+ "enum": [
835
+ "analytics",
836
+ "collaboration",
837
+ "other"
838
+ ]
839
+ }
840
+ },
841
+ "configurations": {
842
+ "type": "object",
843
+ "properties": {
844
+ "space": {
845
+ "type": "object",
846
+ "properties": {
847
+ "properties": {
848
+ "type": "object",
849
+ "additionalProperties": {
850
+ "allOf": [
851
+ {
852
+ "type": "object",
853
+ "properties": {
854
+ "type": {
855
+ "type": "string"
856
+ },
857
+ "title": {
858
+ "type": "string",
859
+ "maxLength": 30
860
+ },
861
+ "description": {
862
+ "type": "string",
863
+ "maxLength": 100
864
+ }
865
+ }
866
+ },
867
+ {
868
+ "oneOf": [
869
+ {
870
+ "type": "object",
871
+ "properties": {
872
+ "type": {
873
+ "type": "string",
874
+ "enum": [
875
+ "string"
876
+ ]
877
+ },
878
+ "default": {
879
+ "type": "string"
880
+ }
881
+ }
882
+ },
883
+ {
884
+ "type": "object",
885
+ "properties": {
886
+ "type": {
887
+ "type": "string",
888
+ "enum": [
889
+ "number"
890
+ ]
891
+ },
892
+ "default": {
893
+ "type": "number"
894
+ }
895
+ }
896
+ },
897
+ {
898
+ "type": "object",
899
+ "properties": {
900
+ "type": {
901
+ "type": "string",
902
+ "enum": [
903
+ "boolean"
904
+ ]
905
+ },
906
+ "default": {
907
+ "type": "boolean"
908
+ }
909
+ }
910
+ },
911
+ {
912
+ "type": "object",
913
+ "properties": {
914
+ "type": {
915
+ "type": "string",
916
+ "enum": [
917
+ "button"
918
+ ]
919
+ },
920
+ "callback_url": {
921
+ "type": "string"
922
+ },
923
+ "button_text": {
924
+ "type": "string"
925
+ }
926
+ },
927
+ "required": [
928
+ "callback_url",
929
+ "button_text"
930
+ ]
931
+ }
932
+ ]
933
+ }
934
+ ]
935
+ }
936
+ }
937
+ },
938
+ "required": [
939
+ "properties"
940
+ ]
941
+ }
942
+ }
943
+ }
944
+ },
945
+ "required": [
946
+ "name",
947
+ "title",
948
+ "scopes",
949
+ "script",
950
+ "categories",
951
+ "visibility"
952
+ ]
953
+ },
954
+ "installation": {
955
+ "type": "object",
956
+ "properties": {
957
+ "id": {
958
+ "type": "string"
959
+ },
960
+ "status": {
961
+ "type": "string",
962
+ "enum": [
963
+ "active",
964
+ "pending",
965
+ "paused"
966
+ ]
967
+ },
968
+ "configurations": {
969
+ "type": "object",
970
+ "properties": {
971
+ "space": {
972
+ "type": "object"
973
+ }
974
+ }
975
+ }
976
+ },
977
+ "required": [
978
+ "id",
979
+ "status"
980
+ ]
981
+ },
982
+ "secrets": {
983
+ "type": "object",
984
+ "description": "Secrets stored on the integration and passed at runtime.",
985
+ "properties": {},
986
+ "maxProperties": 20,
987
+ "additionalProperties": {
988
+ "type": "string"
989
+ }
990
+ }
991
+ },
992
+ "required": [
993
+ "apiEndpoint",
994
+ "authToken",
995
+ "integration",
996
+ "installation",
997
+ "secrets"
998
+ ]
999
+ },
1000
+ "Event": {
1001
+ "description": "Any event that can be received from GitBook.",
1002
+ "oneOf": [
1003
+ {
1004
+ "allOf": [
1005
+ {
1006
+ "allOf": [
1007
+ {
1008
+ "allOf": [
1009
+ {
1010
+ "description": "Common properties for all events.",
1011
+ "type": "object",
1012
+ "properties": {
1013
+ "eventId": {
1014
+ "description": "Unique identifier for the event.",
1015
+ "type": "string"
1016
+ },
1017
+ "type": {
1018
+ "description": "Type of the event.",
1019
+ "type": "string"
1020
+ }
1021
+ },
1022
+ "required": [
1023
+ "eventId",
1024
+ "type"
1025
+ ]
1026
+ },
1027
+ {
1028
+ "type": "object",
1029
+ "description": "Common properties for all events related to an installation",
1030
+ "properties": {
1031
+ "installationId": {
1032
+ "type": "string",
1033
+ "description": "ID of the integration installation"
1034
+ }
1035
+ },
1036
+ "required": [
1037
+ "installationId"
1038
+ ]
1039
+ }
1040
+ ]
1041
+ },
1042
+ {
1043
+ "type": "object",
1044
+ "description": "Common properties for all events related to a specific space.",
1045
+ "properties": {
1046
+ "spaceId": {
1047
+ "type": "string",
1048
+ "description": "ID of the space"
1049
+ }
1050
+ },
1051
+ "required": [
1052
+ "spaceId"
1053
+ ]
1054
+ }
1055
+ ]
1056
+ },
1057
+ {
1058
+ "type": "object",
1059
+ "description": "Event received when integration has been installed.",
1060
+ "properties": {
1061
+ "type": {
1062
+ "type": "string",
1063
+ "enum": [
1064
+ "installation:setup"
1065
+ ]
1066
+ },
1067
+ "status": {
1068
+ "type": "string",
1069
+ "enum": [
1070
+ "active",
1071
+ "pending",
1072
+ "paused"
1073
+ ]
1074
+ }
1075
+ },
1076
+ "required": [
1077
+ "type",
1078
+ "status"
1079
+ ]
1080
+ }
1081
+ ]
1082
+ },
1083
+ {
1084
+ "allOf": [
1085
+ {
1086
+ "allOf": [
1087
+ {
1088
+ "allOf": [
1089
+ {
1090
+ "description": "Common properties for all events.",
1091
+ "type": "object",
1092
+ "properties": {
1093
+ "eventId": {
1094
+ "description": "Unique identifier for the event.",
1095
+ "type": "string"
1096
+ },
1097
+ "type": {
1098
+ "description": "Type of the event.",
1099
+ "type": "string"
1100
+ }
1101
+ },
1102
+ "required": [
1103
+ "eventId",
1104
+ "type"
1105
+ ]
1106
+ },
1107
+ {
1108
+ "type": "object",
1109
+ "description": "Common properties for all events related to an installation",
1110
+ "properties": {
1111
+ "installationId": {
1112
+ "type": "string",
1113
+ "description": "ID of the integration installation"
1114
+ }
1115
+ },
1116
+ "required": [
1117
+ "installationId"
1118
+ ]
1119
+ }
1120
+ ]
1121
+ },
1122
+ {
1123
+ "type": "object",
1124
+ "description": "Common properties for all events related to a specific space.",
1125
+ "properties": {
1126
+ "spaceId": {
1127
+ "type": "string",
1128
+ "description": "ID of the space"
1129
+ }
1130
+ },
1131
+ "required": [
1132
+ "spaceId"
1133
+ ]
1134
+ }
1135
+ ]
1136
+ },
1137
+ {
1138
+ "type": "object",
1139
+ "description": "Event received when a page has been visited.",
1140
+ "properties": {
1141
+ "type": {
1142
+ "type": "string",
1143
+ "enum": [
1144
+ "space:view"
1145
+ ]
1146
+ },
1147
+ "pageId": {
1148
+ "type": "string",
1149
+ "description": "Unique identifier of the visited page."
1150
+ },
1151
+ "visitorId": {
1152
+ "type": "string",
1153
+ "description": "Unique identifier for the visitor session."
1154
+ },
1155
+ "visitorIp": {
1156
+ "type": "string",
1157
+ "description": "IP address of the visitor."
1158
+ },
1159
+ "visitorUserAgent": {
1160
+ "type": "string",
1161
+ "description": "User-agent of the visitor."
1162
+ }
1163
+ },
1164
+ "required": [
1165
+ "type",
1166
+ "visitorId",
1167
+ "visitorIp",
1168
+ "visitorUserAgent"
1169
+ ]
1170
+ }
1171
+ ]
1172
+ },
1173
+ {
1174
+ "allOf": [
1175
+ {
1176
+ "allOf": [
1177
+ {
1178
+ "allOf": [
1179
+ {
1180
+ "description": "Common properties for all events.",
1181
+ "type": "object",
1182
+ "properties": {
1183
+ "eventId": {
1184
+ "description": "Unique identifier for the event.",
1185
+ "type": "string"
1186
+ },
1187
+ "type": {
1188
+ "description": "Type of the event.",
1189
+ "type": "string"
1190
+ }
1191
+ },
1192
+ "required": [
1193
+ "eventId",
1194
+ "type"
1195
+ ]
1196
+ },
1197
+ {
1198
+ "type": "object",
1199
+ "description": "Common properties for all events related to an installation",
1200
+ "properties": {
1201
+ "installationId": {
1202
+ "type": "string",
1203
+ "description": "ID of the integration installation"
1204
+ }
1205
+ },
1206
+ "required": [
1207
+ "installationId"
1208
+ ]
1209
+ }
1210
+ ]
1211
+ },
1212
+ {
1213
+ "type": "object",
1214
+ "description": "Common properties for all events related to a specific space.",
1215
+ "properties": {
1216
+ "spaceId": {
1217
+ "type": "string",
1218
+ "description": "ID of the space"
1219
+ }
1220
+ },
1221
+ "required": [
1222
+ "spaceId"
1223
+ ]
1224
+ }
1225
+ ]
1226
+ },
1227
+ {
1228
+ "type": "object",
1229
+ "description": "Event when the primary content of a space has been updated.",
1230
+ "properties": {
1231
+ "type": {
1232
+ "type": "string",
1233
+ "enum": [
1234
+ "space:content:updated"
1235
+ ]
1236
+ },
1237
+ "revisionId": {
1238
+ "type": "string",
1239
+ "description": "Unique identifier of the new content revision"
1240
+ }
1241
+ },
1242
+ "required": [
1243
+ "type",
1244
+ "revisionId"
1245
+ ]
1246
+ }
1247
+ ]
1248
+ },
1249
+ {
1250
+ "allOf": [
1251
+ {
1252
+ "allOf": [
1253
+ {
1254
+ "description": "Common properties for all events.",
1255
+ "type": "object",
1256
+ "properties": {
1257
+ "eventId": {
1258
+ "description": "Unique identifier for the event.",
1259
+ "type": "string"
1260
+ },
1261
+ "type": {
1262
+ "description": "Type of the event.",
1263
+ "type": "string"
1264
+ }
1265
+ },
1266
+ "required": [
1267
+ "eventId",
1268
+ "type"
1269
+ ]
1270
+ },
1271
+ {
1272
+ "type": "object",
1273
+ "description": "Common properties for all events related to an installation",
1274
+ "properties": {
1275
+ "installationId": {
1276
+ "type": "string",
1277
+ "description": "ID of the integration installation"
1278
+ }
1279
+ },
1280
+ "required": [
1281
+ "installationId"
1282
+ ]
1283
+ }
1284
+ ]
1285
+ },
1286
+ {
1287
+ "type": "object",
1288
+ "description": "Event representing an incoming HTTP request.",
1289
+ "properties": {
1290
+ "type": {
1291
+ "type": "string",
1292
+ "enum": [
1293
+ "fetch"
1294
+ ]
1295
+ },
1296
+ "request": {
1297
+ "type": "object",
1298
+ "properties": {
1299
+ "method": {
1300
+ "type": "string",
1301
+ "enum": [
1302
+ "post",
1303
+ "get",
1304
+ "put",
1305
+ "delete"
1306
+ ]
1307
+ },
1308
+ "url": {
1309
+ "type": "string"
1310
+ },
1311
+ "body": {
1312
+ "type": "string"
1313
+ },
1314
+ "headers": {
1315
+ "type": "object",
1316
+ "additionalProperties": {
1317
+ "type": "string"
1318
+ }
1319
+ }
1320
+ },
1321
+ "required": [
1322
+ "method",
1323
+ "url",
1324
+ "headers"
1325
+ ]
1326
+ }
1327
+ },
1328
+ "required": [
1329
+ "type",
1330
+ "request"
1331
+ ]
1332
+ }
1333
+ ]
1334
+ }
1335
+ ],
1336
+ "discriminator": {
1337
+ "propertyName": "type"
1338
+ }
1339
+ },
1340
+ "BaseEvent": {
1341
+ "description": "Common properties for all events.",
1342
+ "type": "object",
1343
+ "properties": {
1344
+ "eventId": {
1345
+ "description": "Unique identifier for the event.",
1346
+ "type": "string"
1347
+ },
1348
+ "type": {
1349
+ "description": "Type of the event.",
1350
+ "type": "string"
1351
+ }
1352
+ },
1353
+ "required": [
1354
+ "eventId",
1355
+ "type"
1356
+ ]
1357
+ },
1358
+ "InstallationEvent": {
1359
+ "allOf": [
1360
+ {
1361
+ "description": "Common properties for all events.",
1362
+ "type": "object",
1363
+ "properties": {
1364
+ "eventId": {
1365
+ "description": "Unique identifier for the event.",
1366
+ "type": "string"
1367
+ },
1368
+ "type": {
1369
+ "description": "Type of the event.",
1370
+ "type": "string"
1371
+ }
1372
+ },
1373
+ "required": [
1374
+ "eventId",
1375
+ "type"
1376
+ ]
1377
+ },
1378
+ {
1379
+ "type": "object",
1380
+ "description": "Common properties for all events related to an installation",
1381
+ "properties": {
1382
+ "installationId": {
1383
+ "type": "string",
1384
+ "description": "ID of the integration installation"
1385
+ }
1386
+ },
1387
+ "required": [
1388
+ "installationId"
1389
+ ]
1390
+ }
1391
+ ]
1392
+ },
1393
+ "SpaceEvent": {
1394
+ "allOf": [
1395
+ {
1396
+ "allOf": [
1397
+ {
1398
+ "description": "Common properties for all events.",
1399
+ "type": "object",
1400
+ "properties": {
1401
+ "eventId": {
1402
+ "description": "Unique identifier for the event.",
1403
+ "type": "string"
1404
+ },
1405
+ "type": {
1406
+ "description": "Type of the event.",
1407
+ "type": "string"
1408
+ }
1409
+ },
1410
+ "required": [
1411
+ "eventId",
1412
+ "type"
1413
+ ]
1414
+ },
1415
+ {
1416
+ "type": "object",
1417
+ "description": "Common properties for all events related to an installation",
1418
+ "properties": {
1419
+ "installationId": {
1420
+ "type": "string",
1421
+ "description": "ID of the integration installation"
1422
+ }
1423
+ },
1424
+ "required": [
1425
+ "installationId"
1426
+ ]
1427
+ }
1428
+ ]
1429
+ },
1430
+ {
1431
+ "type": "object",
1432
+ "description": "Common properties for all events related to a specific space.",
1433
+ "properties": {
1434
+ "spaceId": {
1435
+ "type": "string",
1436
+ "description": "ID of the space"
1437
+ }
1438
+ },
1439
+ "required": [
1440
+ "spaceId"
1441
+ ]
1442
+ }
1443
+ ]
1444
+ },
1445
+ "InstallationSetupEvent": {
1446
+ "allOf": [
1447
+ {
1448
+ "allOf": [
1449
+ {
1450
+ "allOf": [
1451
+ {
1452
+ "description": "Common properties for all events.",
1453
+ "type": "object",
1454
+ "properties": {
1455
+ "eventId": {
1456
+ "description": "Unique identifier for the event.",
1457
+ "type": "string"
1458
+ },
1459
+ "type": {
1460
+ "description": "Type of the event.",
1461
+ "type": "string"
1462
+ }
1463
+ },
1464
+ "required": [
1465
+ "eventId",
1466
+ "type"
1467
+ ]
1468
+ },
1469
+ {
1470
+ "type": "object",
1471
+ "description": "Common properties for all events related to an installation",
1472
+ "properties": {
1473
+ "installationId": {
1474
+ "type": "string",
1475
+ "description": "ID of the integration installation"
1476
+ }
1477
+ },
1478
+ "required": [
1479
+ "installationId"
1480
+ ]
1481
+ }
1482
+ ]
1483
+ },
1484
+ {
1485
+ "type": "object",
1486
+ "description": "Common properties for all events related to a specific space.",
1487
+ "properties": {
1488
+ "spaceId": {
1489
+ "type": "string",
1490
+ "description": "ID of the space"
1491
+ }
1492
+ },
1493
+ "required": [
1494
+ "spaceId"
1495
+ ]
1496
+ }
1497
+ ]
1498
+ },
1499
+ {
1500
+ "type": "object",
1501
+ "description": "Event received when integration has been installed.",
1502
+ "properties": {
1503
+ "type": {
1504
+ "type": "string",
1505
+ "enum": [
1506
+ "installation:setup"
1507
+ ]
1508
+ },
1509
+ "status": {
1510
+ "type": "string",
1511
+ "enum": [
1512
+ "active",
1513
+ "pending",
1514
+ "paused"
1515
+ ]
1516
+ }
1517
+ },
1518
+ "required": [
1519
+ "type",
1520
+ "status"
1521
+ ]
1522
+ }
1523
+ ]
1524
+ },
1525
+ "SpaceViewEvent": {
1526
+ "allOf": [
1527
+ {
1528
+ "allOf": [
1529
+ {
1530
+ "allOf": [
1531
+ {
1532
+ "description": "Common properties for all events.",
1533
+ "type": "object",
1534
+ "properties": {
1535
+ "eventId": {
1536
+ "description": "Unique identifier for the event.",
1537
+ "type": "string"
1538
+ },
1539
+ "type": {
1540
+ "description": "Type of the event.",
1541
+ "type": "string"
1542
+ }
1543
+ },
1544
+ "required": [
1545
+ "eventId",
1546
+ "type"
1547
+ ]
1548
+ },
1549
+ {
1550
+ "type": "object",
1551
+ "description": "Common properties for all events related to an installation",
1552
+ "properties": {
1553
+ "installationId": {
1554
+ "type": "string",
1555
+ "description": "ID of the integration installation"
1556
+ }
1557
+ },
1558
+ "required": [
1559
+ "installationId"
1560
+ ]
1561
+ }
1562
+ ]
1563
+ },
1564
+ {
1565
+ "type": "object",
1566
+ "description": "Common properties for all events related to a specific space.",
1567
+ "properties": {
1568
+ "spaceId": {
1569
+ "type": "string",
1570
+ "description": "ID of the space"
1571
+ }
1572
+ },
1573
+ "required": [
1574
+ "spaceId"
1575
+ ]
1576
+ }
1577
+ ]
1578
+ },
1579
+ {
1580
+ "type": "object",
1581
+ "description": "Event received when a page has been visited.",
1582
+ "properties": {
1583
+ "type": {
1584
+ "type": "string",
1585
+ "enum": [
1586
+ "space:view"
1587
+ ]
1588
+ },
1589
+ "pageId": {
1590
+ "type": "string",
1591
+ "description": "Unique identifier of the visited page."
1592
+ },
1593
+ "visitorId": {
1594
+ "type": "string",
1595
+ "description": "Unique identifier for the visitor session."
1596
+ },
1597
+ "visitorIp": {
1598
+ "type": "string",
1599
+ "description": "IP address of the visitor."
1600
+ },
1601
+ "visitorUserAgent": {
1602
+ "type": "string",
1603
+ "description": "User-agent of the visitor."
1604
+ }
1605
+ },
1606
+ "required": [
1607
+ "type",
1608
+ "visitorId",
1609
+ "visitorIp",
1610
+ "visitorUserAgent"
1611
+ ]
1612
+ }
1613
+ ]
1614
+ },
1615
+ "SpaceContentUpdatedEvent": {
1616
+ "allOf": [
1617
+ {
1618
+ "allOf": [
1619
+ {
1620
+ "allOf": [
1621
+ {
1622
+ "description": "Common properties for all events.",
1623
+ "type": "object",
1624
+ "properties": {
1625
+ "eventId": {
1626
+ "description": "Unique identifier for the event.",
1627
+ "type": "string"
1628
+ },
1629
+ "type": {
1630
+ "description": "Type of the event.",
1631
+ "type": "string"
1632
+ }
1633
+ },
1634
+ "required": [
1635
+ "eventId",
1636
+ "type"
1637
+ ]
1638
+ },
1639
+ {
1640
+ "type": "object",
1641
+ "description": "Common properties for all events related to an installation",
1642
+ "properties": {
1643
+ "installationId": {
1644
+ "type": "string",
1645
+ "description": "ID of the integration installation"
1646
+ }
1647
+ },
1648
+ "required": [
1649
+ "installationId"
1650
+ ]
1651
+ }
1652
+ ]
1653
+ },
1654
+ {
1655
+ "type": "object",
1656
+ "description": "Common properties for all events related to a specific space.",
1657
+ "properties": {
1658
+ "spaceId": {
1659
+ "type": "string",
1660
+ "description": "ID of the space"
1661
+ }
1662
+ },
1663
+ "required": [
1664
+ "spaceId"
1665
+ ]
1666
+ }
1667
+ ]
1668
+ },
1669
+ {
1670
+ "type": "object",
1671
+ "description": "Event when the primary content of a space has been updated.",
1672
+ "properties": {
1673
+ "type": {
1674
+ "type": "string",
1675
+ "enum": [
1676
+ "space:content:updated"
1677
+ ]
1678
+ },
1679
+ "revisionId": {
1680
+ "type": "string",
1681
+ "description": "Unique identifier of the new content revision"
1682
+ }
1683
+ },
1684
+ "required": [
1685
+ "type",
1686
+ "revisionId"
1687
+ ]
1688
+ }
1689
+ ]
1690
+ },
1691
+ "FetchRequest": {
1692
+ "type": "object",
1693
+ "properties": {
1694
+ "method": {
1695
+ "type": "string",
1696
+ "enum": [
1697
+ "post",
1698
+ "get",
1699
+ "put",
1700
+ "delete"
1701
+ ]
1702
+ },
1703
+ "url": {
1704
+ "type": "string"
1705
+ },
1706
+ "body": {
1707
+ "type": "string"
1708
+ },
1709
+ "headers": {
1710
+ "type": "object",
1711
+ "additionalProperties": {
1712
+ "type": "string"
1713
+ }
1714
+ }
1715
+ },
1716
+ "required": [
1717
+ "method",
1718
+ "url",
1719
+ "headers"
1720
+ ]
1721
+ },
1722
+ "FetchResponse": {
1723
+ "type": "object",
1724
+ "properties": {
1725
+ "status": {
1726
+ "type": "number"
1727
+ },
1728
+ "body": {
1729
+ "type": "string"
1730
+ },
1731
+ "headers": {
1732
+ "type": "object",
1733
+ "additionalProperties": {
1734
+ "type": "string"
1735
+ }
1736
+ }
1737
+ },
1738
+ "required": [
1739
+ "status",
1740
+ "body",
1741
+ "headers"
1742
+ ]
1743
+ },
1744
+ "FetchEvent": {
1745
+ "allOf": [
1746
+ {
1747
+ "allOf": [
1748
+ {
1749
+ "description": "Common properties for all events.",
1750
+ "type": "object",
1751
+ "properties": {
1752
+ "eventId": {
1753
+ "description": "Unique identifier for the event.",
1754
+ "type": "string"
1755
+ },
1756
+ "type": {
1757
+ "description": "Type of the event.",
1758
+ "type": "string"
1759
+ }
1760
+ },
1761
+ "required": [
1762
+ "eventId",
1763
+ "type"
1764
+ ]
1765
+ },
1766
+ {
1767
+ "type": "object",
1768
+ "description": "Common properties for all events related to an installation",
1769
+ "properties": {
1770
+ "installationId": {
1771
+ "type": "string",
1772
+ "description": "ID of the integration installation"
1773
+ }
1774
+ },
1775
+ "required": [
1776
+ "installationId"
1777
+ ]
1778
+ }
1779
+ ]
1780
+ },
1781
+ {
1782
+ "type": "object",
1783
+ "description": "Event representing an incoming HTTP request.",
1784
+ "properties": {
1785
+ "type": {
1786
+ "type": "string",
1787
+ "enum": [
1788
+ "fetch"
1789
+ ]
1790
+ },
1791
+ "request": {
1792
+ "type": "object",
1793
+ "properties": {
1794
+ "method": {
1795
+ "type": "string",
1796
+ "enum": [
1797
+ "post",
1798
+ "get",
1799
+ "put",
1800
+ "delete"
1801
+ ]
1802
+ },
1803
+ "url": {
1804
+ "type": "string"
1805
+ },
1806
+ "body": {
1807
+ "type": "string"
1808
+ },
1809
+ "headers": {
1810
+ "type": "object",
1811
+ "additionalProperties": {
1812
+ "type": "string"
1813
+ }
1814
+ }
1815
+ },
1816
+ "required": [
1817
+ "method",
1818
+ "url",
1819
+ "headers"
1820
+ ]
1821
+ }
1822
+ },
1823
+ "required": [
1824
+ "type",
1825
+ "request"
1826
+ ]
1827
+ }
1828
+ ]
1829
+ }
1830
+ },
1831
+ "responses": {
1832
+ "UnexpectedError": {
1833
+ "description": "unexpected error",
1834
+ "content": {
1835
+ "application/json": {
1836
+ "schema": {
1837
+ "type": "object",
1838
+ "required": [
1839
+ "code",
1840
+ "message"
1841
+ ],
1842
+ "properties": {
1843
+ "code": {
1844
+ "type": "integer",
1845
+ "format": "int32"
1846
+ },
1847
+ "message": {
1848
+ "type": "string"
1849
+ }
1850
+ }
1851
+ }
1852
+ }
1853
+ }
1854
+ },
1855
+ "EmptyResponse": {
1856
+ "description": "unexpected error",
1857
+ "content": {
1858
+ "application/json": {
1859
+ "schema": {
1860
+ "type": "object",
1861
+ "properties": {}
1862
+ }
1863
+ }
1864
+ }
1865
+ }
1866
+ }
1867
+ },
1868
+ "paths": {
1869
+ "/user": {
1870
+ "get": {
1871
+ "operationId": "getAuthenticated",
1872
+ "summary": "Get profile of authenticated user",
1873
+ "responses": {
1874
+ "200": {
1875
+ "description": "OK",
1876
+ "content": {
1877
+ "application/json": {
1878
+ "schema": {
1879
+ "type": "object",
1880
+ "properties": {
1881
+ "id": {
1882
+ "type": "string"
1883
+ },
1884
+ "displayName": {
1885
+ "type": "string"
1886
+ },
1887
+ "email": {
1888
+ "type": "string"
1889
+ }
1890
+ },
1891
+ "required": [
1892
+ "id",
1893
+ "displayName"
1894
+ ]
1895
+ }
1896
+ }
1897
+ }
1898
+ },
1899
+ "default": {
1900
+ "description": "unexpected error",
1901
+ "content": {
1902
+ "application/json": {
1903
+ "schema": {
1904
+ "type": "object",
1905
+ "required": [
1906
+ "code",
1907
+ "message"
1908
+ ],
1909
+ "properties": {
1910
+ "code": {
1911
+ "type": "integer",
1912
+ "format": "int32"
1913
+ },
1914
+ "message": {
1915
+ "type": "string"
1916
+ }
1917
+ }
1918
+ }
1919
+ }
1920
+ }
1921
+ }
1922
+ }
1923
+ }
1924
+ },
1925
+ "/spaces/{spaceId}": {
1926
+ "get": {
1927
+ "operationId": "getSpace",
1928
+ "summary": "Get the details about a space",
1929
+ "parameters": [
1930
+ {
1931
+ "name": "spaceId",
1932
+ "in": "path",
1933
+ "required": true,
1934
+ "description": "The unique id of the space",
1935
+ "schema": {
1936
+ "type": "string"
1937
+ }
1938
+ }
1939
+ ],
1940
+ "responses": {
1941
+ "200": {
1942
+ "description": "OK",
1943
+ "content": {
1944
+ "application/json": {
1945
+ "schema": {
1946
+ "type": "object",
1947
+ "properties": {
1948
+ "id": {
1949
+ "type": "string",
1950
+ "description": "Unique identifier for the space"
1951
+ },
1952
+ "title": {
1953
+ "type": "string",
1954
+ "description": "Title of the space",
1955
+ "minLength": 0,
1956
+ "maxLength": 100
1957
+ }
1958
+ },
1959
+ "required": [
1960
+ "id",
1961
+ "title"
1962
+ ]
1963
+ }
1964
+ }
1965
+ }
1966
+ },
1967
+ "default": {
1968
+ "description": "unexpected error",
1969
+ "content": {
1970
+ "application/json": {
1971
+ "schema": {
1972
+ "type": "object",
1973
+ "required": [
1974
+ "code",
1975
+ "message"
1976
+ ],
1977
+ "properties": {
1978
+ "code": {
1979
+ "type": "integer",
1980
+ "format": "int32"
1981
+ },
1982
+ "message": {
1983
+ "type": "string"
1984
+ }
1985
+ }
1986
+ }
1987
+ }
1988
+ }
1989
+ }
1990
+ }
1991
+ }
1992
+ },
1993
+ "/spaces/{spaceId}/views": {
1994
+ "post": {
1995
+ "operationId": "trackPageView",
1996
+ "description": "Track a page view on a space",
1997
+ "parameters": [
1998
+ {
1999
+ "name": "spaceId",
2000
+ "in": "path",
2001
+ "required": true,
2002
+ "description": "The unique id of the space",
2003
+ "schema": {
2004
+ "type": "string"
2005
+ }
2006
+ }
2007
+ ],
2008
+ "responses": {
2009
+ "200": {
2010
+ "description": "unexpected error",
2011
+ "content": {
2012
+ "application/json": {
2013
+ "schema": {
2014
+ "type": "object",
2015
+ "properties": {}
2016
+ }
2017
+ }
2018
+ }
2019
+ },
2020
+ "default": {
2021
+ "description": "unexpected error",
2022
+ "content": {
2023
+ "application/json": {
2024
+ "schema": {
2025
+ "type": "object",
2026
+ "required": [
2027
+ "code",
2028
+ "message"
2029
+ ],
2030
+ "properties": {
2031
+ "code": {
2032
+ "type": "integer",
2033
+ "format": "int32"
2034
+ },
2035
+ "message": {
2036
+ "type": "string"
2037
+ }
2038
+ }
2039
+ }
2040
+ }
2041
+ }
2042
+ }
2043
+ },
2044
+ "requestBody": {
2045
+ "required": true,
2046
+ "content": {
2047
+ "application/json": {
2048
+ "schema": {
2049
+ "type": "object",
2050
+ "properties": {
2051
+ "pageId": {
2052
+ "type": "string",
2053
+ "description": "Unique identifier of the page"
2054
+ },
2055
+ "visitorId": {
2056
+ "type": "string",
2057
+ "description": "Unique identifier of the visitor"
2058
+ }
2059
+ },
2060
+ "required": [
2061
+ "pageId",
2062
+ "visitorId"
2063
+ ]
2064
+ }
2065
+ }
2066
+ }
2067
+ }
2068
+ }
2069
+ },
2070
+ "/integrations/{integrationName}": {
2071
+ "post": {
2072
+ "operationId": "publish",
2073
+ "summary": "Publish an integration",
2074
+ "parameters": [
2075
+ {
2076
+ "name": "integrationName",
2077
+ "in": "path",
2078
+ "required": true,
2079
+ "description": "Name of the integration",
2080
+ "schema": {
2081
+ "type": "string"
2082
+ }
2083
+ }
2084
+ ],
2085
+ "responses": {
2086
+ "200": {
2087
+ "description": "OK",
2088
+ "content": {
2089
+ "application/json": {
2090
+ "schema": {
2091
+ "type": "object",
2092
+ "properties": {
2093
+ "name": {
2094
+ "type": "string",
2095
+ "description": "Unique named identifier for the integration"
2096
+ },
2097
+ "title": {
2098
+ "type": "string",
2099
+ "description": "Title of the integration",
2100
+ "minLength": 2,
2101
+ "maxLength": 30
2102
+ },
2103
+ "description": {
2104
+ "type": "string",
2105
+ "description": "Title of the integration",
2106
+ "maxLength": 100
2107
+ },
2108
+ "summary": {
2109
+ "type": "string",
2110
+ "description": "Long form markdown summary of the integration",
2111
+ "maxLength": 500
2112
+ },
2113
+ "script": {
2114
+ "type": "string",
2115
+ "description": "Content of the script to run."
2116
+ },
2117
+ "visibility": {
2118
+ "type": "string",
2119
+ "enum": [
2120
+ "public",
2121
+ "private"
2122
+ ]
2123
+ },
2124
+ "scopes": {
2125
+ "type": "array",
2126
+ "description": "Permissions that should be granted to the integration",
2127
+ "items": {
2128
+ "type": "string",
2129
+ "enum": [
2130
+ "space:views",
2131
+ "space:content"
2132
+ ]
2133
+ }
2134
+ },
2135
+ "categories": {
2136
+ "type": "array",
2137
+ "description": "Categories for which the integration is listed in the marketplace",
2138
+ "items": {
2139
+ "type": "string",
2140
+ "enum": [
2141
+ "analytics",
2142
+ "collaboration",
2143
+ "other"
2144
+ ]
2145
+ }
2146
+ },
2147
+ "configurations": {
2148
+ "type": "object",
2149
+ "properties": {
2150
+ "space": {
2151
+ "type": "object",
2152
+ "properties": {
2153
+ "properties": {
2154
+ "type": "object",
2155
+ "additionalProperties": {
2156
+ "allOf": [
2157
+ {
2158
+ "type": "object",
2159
+ "properties": {
2160
+ "type": {
2161
+ "type": "string"
2162
+ },
2163
+ "title": {
2164
+ "type": "string",
2165
+ "maxLength": 30
2166
+ },
2167
+ "description": {
2168
+ "type": "string",
2169
+ "maxLength": 100
2170
+ }
2171
+ }
2172
+ },
2173
+ {
2174
+ "oneOf": [
2175
+ {
2176
+ "type": "object",
2177
+ "properties": {
2178
+ "type": {
2179
+ "type": "string",
2180
+ "enum": [
2181
+ "string"
2182
+ ]
2183
+ },
2184
+ "default": {
2185
+ "type": "string"
2186
+ }
2187
+ }
2188
+ },
2189
+ {
2190
+ "type": "object",
2191
+ "properties": {
2192
+ "type": {
2193
+ "type": "string",
2194
+ "enum": [
2195
+ "number"
2196
+ ]
2197
+ },
2198
+ "default": {
2199
+ "type": "number"
2200
+ }
2201
+ }
2202
+ },
2203
+ {
2204
+ "type": "object",
2205
+ "properties": {
2206
+ "type": {
2207
+ "type": "string",
2208
+ "enum": [
2209
+ "boolean"
2210
+ ]
2211
+ },
2212
+ "default": {
2213
+ "type": "boolean"
2214
+ }
2215
+ }
2216
+ },
2217
+ {
2218
+ "type": "object",
2219
+ "properties": {
2220
+ "type": {
2221
+ "type": "string",
2222
+ "enum": [
2223
+ "button"
2224
+ ]
2225
+ },
2226
+ "callback_url": {
2227
+ "type": "string"
2228
+ },
2229
+ "button_text": {
2230
+ "type": "string"
2231
+ }
2232
+ },
2233
+ "required": [
2234
+ "callback_url",
2235
+ "button_text"
2236
+ ]
2237
+ }
2238
+ ]
2239
+ }
2240
+ ]
2241
+ }
2242
+ }
2243
+ },
2244
+ "required": [
2245
+ "properties"
2246
+ ]
2247
+ }
2248
+ }
2249
+ }
2250
+ },
2251
+ "required": [
2252
+ "name",
2253
+ "title",
2254
+ "scopes",
2255
+ "script",
2256
+ "categories",
2257
+ "visibility"
2258
+ ]
2259
+ }
2260
+ }
2261
+ }
2262
+ },
2263
+ "default": {
2264
+ "description": "unexpected error",
2265
+ "content": {
2266
+ "application/json": {
2267
+ "schema": {
2268
+ "type": "object",
2269
+ "required": [
2270
+ "code",
2271
+ "message"
2272
+ ],
2273
+ "properties": {
2274
+ "code": {
2275
+ "type": "integer",
2276
+ "format": "int32"
2277
+ },
2278
+ "message": {
2279
+ "type": "string"
2280
+ }
2281
+ }
2282
+ }
2283
+ }
2284
+ }
2285
+ }
2286
+ },
2287
+ "requestBody": {
2288
+ "required": true,
2289
+ "content": {
2290
+ "application/json": {
2291
+ "schema": {
2292
+ "type": "object",
2293
+ "properties": {
2294
+ "icon": {
2295
+ "type": "string",
2296
+ "description": "Base64 content of the icon"
2297
+ },
2298
+ "title": {
2299
+ "type": "string",
2300
+ "description": "Title of the integration",
2301
+ "minLength": 2,
2302
+ "maxLength": 30
2303
+ },
2304
+ "description": {
2305
+ "type": "string",
2306
+ "description": "Title of the integration",
2307
+ "maxLength": 100
2308
+ },
2309
+ "summary": {
2310
+ "type": "string",
2311
+ "description": "Long form markdown summary of the integration",
2312
+ "maxLength": 500
2313
+ },
2314
+ "visibility": {
2315
+ "type": "string",
2316
+ "enum": [
2317
+ "public",
2318
+ "private"
2319
+ ]
2320
+ },
2321
+ "scopes": {
2322
+ "type": "array",
2323
+ "description": "Permissions that should be granted to the integration",
2324
+ "items": {
2325
+ "type": "string",
2326
+ "enum": [
2327
+ "space:views",
2328
+ "space:content"
2329
+ ]
2330
+ }
2331
+ },
2332
+ "categories": {
2333
+ "type": "array",
2334
+ "description": "Categories for which the integration is listed in the marketplace",
2335
+ "items": {
2336
+ "type": "string",
2337
+ "enum": [
2338
+ "analytics",
2339
+ "collaboration",
2340
+ "other"
2341
+ ]
2342
+ }
2343
+ },
2344
+ "configurations": {
2345
+ "type": "object",
2346
+ "properties": {
2347
+ "space": {
2348
+ "type": "object",
2349
+ "properties": {
2350
+ "properties": {
2351
+ "type": "object",
2352
+ "additionalProperties": {
2353
+ "allOf": [
2354
+ {
2355
+ "type": "object",
2356
+ "properties": {
2357
+ "type": {
2358
+ "type": "string"
2359
+ },
2360
+ "title": {
2361
+ "type": "string",
2362
+ "maxLength": 30
2363
+ },
2364
+ "description": {
2365
+ "type": "string",
2366
+ "maxLength": 100
2367
+ }
2368
+ }
2369
+ },
2370
+ {
2371
+ "oneOf": [
2372
+ {
2373
+ "type": "object",
2374
+ "properties": {
2375
+ "type": {
2376
+ "type": "string",
2377
+ "enum": [
2378
+ "string"
2379
+ ]
2380
+ },
2381
+ "default": {
2382
+ "type": "string"
2383
+ }
2384
+ }
2385
+ },
2386
+ {
2387
+ "type": "object",
2388
+ "properties": {
2389
+ "type": {
2390
+ "type": "string",
2391
+ "enum": [
2392
+ "number"
2393
+ ]
2394
+ },
2395
+ "default": {
2396
+ "type": "number"
2397
+ }
2398
+ }
2399
+ },
2400
+ {
2401
+ "type": "object",
2402
+ "properties": {
2403
+ "type": {
2404
+ "type": "string",
2405
+ "enum": [
2406
+ "boolean"
2407
+ ]
2408
+ },
2409
+ "default": {
2410
+ "type": "boolean"
2411
+ }
2412
+ }
2413
+ },
2414
+ {
2415
+ "type": "object",
2416
+ "properties": {
2417
+ "type": {
2418
+ "type": "string",
2419
+ "enum": [
2420
+ "button"
2421
+ ]
2422
+ },
2423
+ "callback_url": {
2424
+ "type": "string"
2425
+ },
2426
+ "button_text": {
2427
+ "type": "string"
2428
+ }
2429
+ },
2430
+ "required": [
2431
+ "callback_url",
2432
+ "button_text"
2433
+ ]
2434
+ }
2435
+ ]
2436
+ }
2437
+ ]
2438
+ }
2439
+ }
2440
+ },
2441
+ "required": [
2442
+ "properties"
2443
+ ]
2444
+ }
2445
+ }
2446
+ },
2447
+ "script": {
2448
+ "type": "string",
2449
+ "description": "Content of the script to use"
2450
+ },
2451
+ "secrets": {
2452
+ "type": "object",
2453
+ "description": "Secrets stored on the integration and passed at runtime.",
2454
+ "properties": {},
2455
+ "maxProperties": 20,
2456
+ "additionalProperties": {
2457
+ "type": "string"
2458
+ }
2459
+ }
2460
+ },
2461
+ "required": [
2462
+ "title",
2463
+ "description",
2464
+ "script",
2465
+ "scopes"
2466
+ ]
2467
+ }
2468
+ }
2469
+ }
2470
+ }
2471
+ }
2472
+ },
2473
+ "/integrations/{integrationName}/installations/{installationId}": {
2474
+ "get": {
2475
+ "operationId": "getInstallation",
2476
+ "summary": "Get the status and configurations of an integration's installation",
2477
+ "parameters": [
2478
+ {
2479
+ "name": "integrationName",
2480
+ "in": "path",
2481
+ "required": true,
2482
+ "description": "Name of the integration",
2483
+ "schema": {
2484
+ "type": "string"
2485
+ }
2486
+ },
2487
+ {
2488
+ "name": "installationId",
2489
+ "in": "path",
2490
+ "required": true,
2491
+ "description": "Identifier of the installation",
2492
+ "schema": {
2493
+ "type": "string"
2494
+ }
2495
+ }
2496
+ ],
2497
+ "responses": {
2498
+ "200": {
2499
+ "description": "OK",
2500
+ "content": {
2501
+ "application/json": {
2502
+ "schema": {
2503
+ "type": "object",
2504
+ "properties": {
2505
+ "id": {
2506
+ "type": "string"
2507
+ },
2508
+ "status": {
2509
+ "type": "string",
2510
+ "enum": [
2511
+ "active",
2512
+ "pending",
2513
+ "paused"
2514
+ ]
2515
+ },
2516
+ "configurations": {
2517
+ "type": "object",
2518
+ "properties": {
2519
+ "space": {
2520
+ "type": "object"
2521
+ }
2522
+ }
2523
+ }
2524
+ },
2525
+ "required": [
2526
+ "id",
2527
+ "status"
2528
+ ]
2529
+ }
2530
+ }
2531
+ }
2532
+ },
2533
+ "default": {
2534
+ "description": "unexpected error",
2535
+ "content": {
2536
+ "application/json": {
2537
+ "schema": {
2538
+ "type": "object",
2539
+ "required": [
2540
+ "code",
2541
+ "message"
2542
+ ],
2543
+ "properties": {
2544
+ "code": {
2545
+ "type": "integer",
2546
+ "format": "int32"
2547
+ },
2548
+ "message": {
2549
+ "type": "string"
2550
+ }
2551
+ }
2552
+ }
2553
+ }
2554
+ }
2555
+ }
2556
+ }
2557
+ },
2558
+ "patch": {
2559
+ "operationId": "updateInstallation",
2560
+ "summary": "Update status and configurations of an integration's installation",
2561
+ "parameters": [
2562
+ {
2563
+ "name": "integrationName",
2564
+ "in": "path",
2565
+ "required": true,
2566
+ "description": "Name of the integration",
2567
+ "schema": {
2568
+ "type": "string"
2569
+ }
2570
+ },
2571
+ {
2572
+ "name": "installationId",
2573
+ "in": "path",
2574
+ "required": true,
2575
+ "description": "Identifier of the installation",
2576
+ "schema": {
2577
+ "type": "string"
2578
+ }
2579
+ }
2580
+ ],
2581
+ "responses": {
2582
+ "200": {
2583
+ "description": "unexpected error",
2584
+ "content": {
2585
+ "application/json": {
2586
+ "schema": {
2587
+ "type": "object",
2588
+ "properties": {}
2589
+ }
2590
+ }
2591
+ }
2592
+ },
2593
+ "default": {
2594
+ "description": "unexpected error",
2595
+ "content": {
2596
+ "application/json": {
2597
+ "schema": {
2598
+ "type": "object",
2599
+ "required": [
2600
+ "code",
2601
+ "message"
2602
+ ],
2603
+ "properties": {
2604
+ "code": {
2605
+ "type": "integer",
2606
+ "format": "int32"
2607
+ },
2608
+ "message": {
2609
+ "type": "string"
2610
+ }
2611
+ }
2612
+ }
2613
+ }
2614
+ }
2615
+ }
2616
+ },
2617
+ "requestBody": {
2618
+ "required": true,
2619
+ "content": {
2620
+ "application/json": {
2621
+ "schema": {
2622
+ "type": "object",
2623
+ "properties": {
2624
+ "status": {
2625
+ "type": "string",
2626
+ "enum": [
2627
+ "active",
2628
+ "pending",
2629
+ "paused"
2630
+ ]
2631
+ },
2632
+ "configurations": {
2633
+ "type": "object",
2634
+ "properties": {
2635
+ "space": {
2636
+ "type": "object"
2637
+ }
2638
+ }
2639
+ }
2640
+ }
2641
+ }
2642
+ }
2643
+ }
2644
+ }
2645
+ }
2646
+ }
2647
+ }
2648
+ }