@gitbook/api 0.6.0 → 0.8.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.json CHANGED
@@ -254,7 +254,16 @@
254
254
  "required": true,
255
255
  "description": "ID of the entity in the space",
256
256
  "schema": {
257
- "type": "string"
257
+ "$ref": "#/components/schemas/EntityId"
258
+ }
259
+ },
260
+ "entityType": {
261
+ "name": "entityType",
262
+ "in": "path",
263
+ "required": true,
264
+ "description": "Type of the entity",
265
+ "schema": {
266
+ "$ref": "#/components/schemas/EntityType"
258
267
  }
259
268
  },
260
269
  "environmentName": {
@@ -486,6 +495,13 @@
486
495
  },
487
496
  "contentSecurityPolicy": {
488
497
  "$ref": "#/components/schemas/IntegrationContentSecurityPolicy"
498
+ },
499
+ "entities": {
500
+ "type": "array",
501
+ "maxItems": 100,
502
+ "items": {
503
+ "$ref": "#/components/schemas/EntityRawSchema"
504
+ }
489
505
  }
490
506
  },
491
507
  "required": [
@@ -1534,46 +1550,6 @@
1534
1550
  }
1535
1551
  ]
1536
1552
  },
1537
- "SpaceEntityEnvironments": {
1538
- "type": "array",
1539
- "description": "Environments the entity is linked to",
1540
- "minItems": 1,
1541
- "maxItems": 100,
1542
- "items": {
1543
- "type": "string"
1544
- }
1545
- },
1546
- "SpaceEntity": {
1547
- "type": "object",
1548
- "description": "Link between an integration entity and a space.",
1549
- "properties": {
1550
- "entity": {
1551
- "$ref": "#/components/schemas/IntegrationEntity"
1552
- },
1553
- "environments": {
1554
- "$ref": "#/components/schemas/SpaceEntityEnvironments"
1555
- },
1556
- "urls": {
1557
- "type": "object",
1558
- "description": "URLs associated with the object",
1559
- "properties": {
1560
- "location": {
1561
- "type": "string",
1562
- "description": "URL of the space entity in the API",
1563
- "format": "uri"
1564
- }
1565
- },
1566
- "required": [
1567
- "location"
1568
- ]
1569
- }
1570
- },
1571
- "required": [
1572
- "entity",
1573
- "environments",
1574
- "urls"
1575
- ]
1576
- },
1577
1553
  "RevisionBase": {
1578
1554
  "type": "object",
1579
1555
  "properties": {
@@ -2433,6 +2409,9 @@
2433
2409
  },
2434
2410
  "speech": {
2435
2411
  "type": "integer"
2412
+ },
2413
+ "thread.message": {
2414
+ "type": "integer"
2436
2415
  }
2437
2416
  }
2438
2417
  },
@@ -2513,6 +2492,18 @@
2513
2492
  },
2514
2493
  {
2515
2494
  "$ref": "#/components/schemas/RecordingSpeechEvent"
2495
+ },
2496
+ {
2497
+ "$ref": "#/components/schemas/RecordingThreadMessageEvent"
2498
+ },
2499
+ {
2500
+ "$ref": "#/components/schemas/RecordingFileAddedEvent"
2501
+ },
2502
+ {
2503
+ "$ref": "#/components/schemas/RecordingFileChangedEvent"
2504
+ },
2505
+ {
2506
+ "$ref": "#/components/schemas/RecordingFileRemovedEvent"
2516
2507
  }
2517
2508
  ]
2518
2509
  },
@@ -2522,7 +2513,7 @@
2522
2513
  "type": "string",
2523
2514
  "enum": [
2524
2515
  "meeting",
2525
- "conversation",
2516
+ "thread",
2526
2517
  "walkthrough"
2527
2518
  ]
2528
2519
  }
@@ -2641,6 +2632,121 @@
2641
2632
  }
2642
2633
  ]
2643
2634
  },
2635
+ "RecordingThreadMessageEvent": {
2636
+ "allOf": [
2637
+ {
2638
+ "$ref": "#/components/schemas/BaseRecordingEvent"
2639
+ },
2640
+ {
2641
+ "type": "object",
2642
+ "properties": {
2643
+ "type": {
2644
+ "type": "string",
2645
+ "enum": [
2646
+ "thread.message"
2647
+ ]
2648
+ },
2649
+ "isFirst": {
2650
+ "type": "boolean"
2651
+ },
2652
+ "text": {
2653
+ "type": "string"
2654
+ }
2655
+ },
2656
+ "required": [
2657
+ "type",
2658
+ "text"
2659
+ ]
2660
+ }
2661
+ ]
2662
+ },
2663
+ "RecordingFileAddedEvent": {
2664
+ "allOf": [
2665
+ {
2666
+ "$ref": "#/components/schemas/BaseRecordingEvent"
2667
+ },
2668
+ {
2669
+ "type": "object",
2670
+ "properties": {
2671
+ "type": {
2672
+ "type": "string",
2673
+ "enum": [
2674
+ "file.added"
2675
+ ]
2676
+ },
2677
+ "filename": {
2678
+ "type": "string"
2679
+ },
2680
+ "fileSnapshot": {
2681
+ "type": "string"
2682
+ }
2683
+ },
2684
+ "required": [
2685
+ "type",
2686
+ "filename",
2687
+ "fileSnapshot"
2688
+ ]
2689
+ }
2690
+ ]
2691
+ },
2692
+ "RecordingFileChangedEvent": {
2693
+ "allOf": [
2694
+ {
2695
+ "$ref": "#/components/schemas/BaseRecordingEvent"
2696
+ },
2697
+ {
2698
+ "type": "object",
2699
+ "properties": {
2700
+ "type": {
2701
+ "type": "string",
2702
+ "enum": [
2703
+ "file.changed"
2704
+ ]
2705
+ },
2706
+ "filename": {
2707
+ "type": "string"
2708
+ },
2709
+ "fileDiff": {
2710
+ "type": "string"
2711
+ }
2712
+ },
2713
+ "required": [
2714
+ "type",
2715
+ "filename",
2716
+ "fileDiff"
2717
+ ]
2718
+ }
2719
+ ]
2720
+ },
2721
+ "RecordingFileRemovedEvent": {
2722
+ "allOf": [
2723
+ {
2724
+ "$ref": "#/components/schemas/BaseRecordingEvent"
2725
+ },
2726
+ {
2727
+ "type": "object",
2728
+ "properties": {
2729
+ "type": {
2730
+ "type": "string",
2731
+ "enum": [
2732
+ "file.removed"
2733
+ ]
2734
+ },
2735
+ "filename": {
2736
+ "type": "string"
2737
+ },
2738
+ "fileSnapshot": {
2739
+ "type": "string"
2740
+ }
2741
+ },
2742
+ "required": [
2743
+ "type",
2744
+ "filename",
2745
+ "fileSnapshot"
2746
+ ]
2747
+ }
2748
+ ]
2749
+ },
2644
2750
  "ChangeRequest": {
2645
2751
  "type": "object",
2646
2752
  "properties": {
@@ -3382,6 +3488,10 @@
3382
3488
  "type": "string",
3383
3489
  "description": "Unique named identifier for the integration"
3384
3490
  },
3491
+ "version": {
3492
+ "type": "number",
3493
+ "description": "Version of the integration"
3494
+ },
3385
3495
  "title": {
3386
3496
  "$ref": "#/components/schemas/IntegrationTitle"
3387
3497
  },
@@ -3455,6 +3565,7 @@
3455
3565
  "required": [
3456
3566
  "object",
3457
3567
  "name",
3568
+ "version",
3458
3569
  "title",
3459
3570
  "scopes",
3460
3571
  "categories",
@@ -3490,7 +3601,7 @@
3490
3601
  "IntegrationScope": {
3491
3602
  "type": "string",
3492
3603
  "enum": [
3493
- "organization:entities:write",
3604
+ "entities:write",
3494
3605
  "recording:write",
3495
3606
  "space:views:read",
3496
3607
  "space:content:read",
@@ -3686,6 +3797,7 @@
3686
3797
  "collaboration",
3687
3798
  "marketing",
3688
3799
  "content",
3800
+ "gitsync",
3689
3801
  "other"
3690
3802
  ]
3691
3803
  },
@@ -3902,6 +4014,14 @@
3902
4014
  "type": "object",
3903
4015
  "description": "Installation of an integration at a space level",
3904
4016
  "properties": {
4017
+ "integration": {
4018
+ "description": "Unique name identifier of the integration",
4019
+ "type": "string"
4020
+ },
4021
+ "installation": {
4022
+ "description": "ID of the integration installation",
4023
+ "type": "string"
4024
+ },
3905
4025
  "space": {
3906
4026
  "description": "ID of the space the integration is installed on.",
3907
4027
  "type": "string"
@@ -3932,6 +4052,8 @@
3932
4052
  }
3933
4053
  },
3934
4054
  "required": [
4055
+ "integration",
4056
+ "installation",
3935
4057
  "space",
3936
4058
  "status",
3937
4059
  "configuration",
@@ -3977,6 +4099,10 @@
3977
4099
  "secrets": {
3978
4100
  "$ref": "#/components/schemas/IntegrationSecrets"
3979
4101
  },
4102
+ "signingSecret": {
4103
+ "type": "string",
4104
+ "description": "Secret that can be used to verify the authenticity of incoming HTTP requests to the integration."
4105
+ },
3980
4106
  "apiEndpoint": {
3981
4107
  "type": "string",
3982
4108
  "description": "URL of the HTTP API"
@@ -4156,34 +4282,16 @@
4156
4282
  }
4157
4283
  }
4158
4284
  },
4159
- "UpsertIntegrationEntity": {
4285
+ "UpsertEntity": {
4160
4286
  "type": "object",
4161
4287
  "description": "Entity to create or update in an integration's installation.",
4162
4288
  "properties": {
4163
4289
  "entityId": {
4164
- "type": "string",
4165
- "description": "Unique ID of the entity in the context of the integration's installation"
4166
- },
4167
- "title": {
4168
- "type": "string",
4169
- "description": "Title of the entity",
4170
- "minLength": 1,
4171
- "maxLength": 60
4172
- },
4173
- "description": {
4174
- "type": "string",
4175
- "description": "Longer text description of the entity",
4176
- "minLength": 0,
4177
- "maxLength": 256
4178
- },
4179
- "target": {
4180
- "type": "string",
4181
- "description": "URL to open the entity",
4182
- "format": "uri"
4290
+ "$ref": "#/components/schemas/EntityId"
4183
4291
  },
4184
- "metadata": {
4292
+ "properties": {
4185
4293
  "type": "object",
4186
- "description": "Metadata stored by the integration on the entity",
4294
+ "description": "Map of values stored as properties on the entity",
4187
4295
  "additionalProperties": {
4188
4296
  "oneOf": [
4189
4297
  {
@@ -4194,6 +4302,17 @@
4194
4302
  },
4195
4303
  {
4196
4304
  "type": "boolean"
4305
+ },
4306
+ {
4307
+ "type": "object",
4308
+ "properties": {
4309
+ "entityId": {
4310
+ "type": "string"
4311
+ }
4312
+ },
4313
+ "required": [
4314
+ "entityId"
4315
+ ]
4197
4316
  }
4198
4317
  ]
4199
4318
  }
@@ -4201,66 +4320,381 @@
4201
4320
  },
4202
4321
  "required": [
4203
4322
  "entityId",
4204
- "title",
4205
- "description",
4206
- "metadata",
4207
- "target"
4323
+ "properties"
4208
4324
  ]
4209
4325
  },
4210
- "IntegrationEntity": {
4326
+ "Entity": {
4211
4327
  "allOf": [
4212
4328
  {
4213
- "$ref": "#/components/schemas/UpsertIntegrationEntity"
4329
+ "$ref": "#/components/schemas/UpsertEntity"
4214
4330
  },
4215
4331
  {
4216
4332
  "type": "object",
4217
- "description": "Entity created and managed by an integration, representing a resource on an external service.",
4333
+ "description": "Entity created and managed by an integration, representing an external element.",
4218
4334
  "properties": {
4219
4335
  "id": {
4220
4336
  "type": "string",
4221
4337
  "description": "Unique ID for the entity in GitBook"
4222
4338
  },
4223
- "integration": {
4224
- "type": "string",
4225
- "description": "ID of the integration."
4339
+ "type": {
4340
+ "$ref": "#/components/schemas/EntityType"
4341
+ },
4342
+ "urls": {
4343
+ "type": "object",
4344
+ "description": "URLs associated with the object",
4345
+ "properties": {
4346
+ "location": {
4347
+ "type": "string",
4348
+ "description": "URL of the entity in the API",
4349
+ "format": "uri"
4350
+ }
4351
+ },
4352
+ "required": [
4353
+ "location"
4354
+ ]
4226
4355
  }
4227
4356
  },
4228
4357
  "required": [
4229
4358
  "id",
4230
- "integration"
4359
+ "type",
4360
+ "urls"
4231
4361
  ]
4232
4362
  }
4233
4363
  ]
4234
4364
  },
4235
- "Event": {
4236
- "description": "Any event that can be received from GitBook.",
4237
- "oneOf": [
4238
- {
4239
- "$ref": "#/components/schemas/InstallationSetupEvent"
4240
- },
4241
- {
4242
- "$ref": "#/components/schemas/SpaceInstallationSetupEvent"
4243
- },
4244
- {
4245
- "$ref": "#/components/schemas/SpaceViewEvent"
4246
- },
4247
- {
4248
- "$ref": "#/components/schemas/SpaceContentUpdatedEvent"
4249
- },
4250
- {
4251
- "$ref": "#/components/schemas/SpaceGitSyncCompletedEvent"
4252
- },
4253
- {
4254
- "$ref": "#/components/schemas/SpaceGitSyncStartedEvent"
4365
+ "EntityType": {
4366
+ "type": "string",
4367
+ "description": "Type of an entity",
4368
+ "minLength": 1,
4369
+ "maxLength": 64
4370
+ },
4371
+ "EntityId": {
4372
+ "type": "string",
4373
+ "description": "Unique ID of the entity in the context of the integration's entity type",
4374
+ "minLength": 1,
4375
+ "maxLength": 256
4376
+ },
4377
+ "EntitySchemaTitle": {
4378
+ "type": "string",
4379
+ "maxLength": 50
4380
+ },
4381
+ "EntityRawSchema": {
4382
+ "type": "object",
4383
+ "description": "Schema for a type of entities",
4384
+ "properties": {
4385
+ "type": {
4386
+ "$ref": "#/components/schemas/EntityType"
4255
4387
  },
4256
- {
4257
- "$ref": "#/components/schemas/SpaceVisibilityUpdatedEvent"
4388
+ "title": {
4389
+ "type": "object",
4390
+ "description": "Title of the entity type",
4391
+ "properties": {
4392
+ "singular": {
4393
+ "$ref": "#/components/schemas/EntitySchemaTitle"
4394
+ },
4395
+ "plural": {
4396
+ "$ref": "#/components/schemas/EntitySchemaTitle"
4397
+ }
4398
+ },
4399
+ "required": [
4400
+ "singular",
4401
+ "plural"
4402
+ ]
4258
4403
  },
4404
+ "properties": {
4405
+ "type": "array",
4406
+ "description": "Ordered list of all properties stored in entities.",
4407
+ "items": {
4408
+ "$ref": "#/components/schemas/EntityPropertySchema"
4409
+ }
4410
+ }
4411
+ },
4412
+ "required": [
4413
+ "type",
4414
+ "title",
4415
+ "properties"
4416
+ ]
4417
+ },
4418
+ "EntitySchema": {
4419
+ "allOf": [
4259
4420
  {
4260
- "$ref": "#/components/schemas/FetchEvent"
4421
+ "$ref": "#/components/schemas/EntityRawSchema"
4261
4422
  },
4262
4423
  {
4263
- "$ref": "#/components/schemas/FetchPublishedScriptEvent"
4424
+ "type": "object",
4425
+ "properties": {
4426
+ "entities": {
4427
+ "description": "Count of entities created in this schema.",
4428
+ "type": "number"
4429
+ },
4430
+ "integration": {
4431
+ "description": "Integration managing this schema.",
4432
+ "$ref": "#/components/schemas/Integration"
4433
+ },
4434
+ "urls": {
4435
+ "type": "object",
4436
+ "description": "URLs associated with the object",
4437
+ "properties": {
4438
+ "location": {
4439
+ "type": "string",
4440
+ "description": "URL of the entity schema in the API",
4441
+ "format": "uri"
4442
+ }
4443
+ },
4444
+ "required": [
4445
+ "location"
4446
+ ]
4447
+ }
4448
+ },
4449
+ "required": [
4450
+ "entities",
4451
+ "urls"
4452
+ ]
4453
+ }
4454
+ ]
4455
+ },
4456
+ "EntityPropertySchema": {
4457
+ "allOf": [
4458
+ {
4459
+ "type": "object",
4460
+ "properties": {
4461
+ "name": {
4462
+ "type": "string",
4463
+ "description": "Name of the property in the object"
4464
+ },
4465
+ "title": {
4466
+ "type": "string",
4467
+ "description": "Title displayed to the users"
4468
+ },
4469
+ "description": {
4470
+ "type": "string",
4471
+ "description": "Description of the property"
4472
+ },
4473
+ "deprecated": {
4474
+ "type": "boolean",
4475
+ "description": "If true, the property is no longer required and not taken into consideration"
4476
+ }
4477
+ },
4478
+ "required": [
4479
+ "name",
4480
+ "title"
4481
+ ]
4482
+ },
4483
+ {
4484
+ "oneOf": [
4485
+ {
4486
+ "type": "object",
4487
+ "properties": {
4488
+ "type": {
4489
+ "type": "string",
4490
+ "enum": [
4491
+ "text"
4492
+ ]
4493
+ },
4494
+ "role": {
4495
+ "type": "string",
4496
+ "enum": [
4497
+ "title"
4498
+ ]
4499
+ }
4500
+ },
4501
+ "required": [
4502
+ "type"
4503
+ ]
4504
+ },
4505
+ {
4506
+ "type": "object",
4507
+ "properties": {
4508
+ "type": {
4509
+ "type": "string",
4510
+ "enum": [
4511
+ "longtext"
4512
+ ]
4513
+ },
4514
+ "role": {
4515
+ "type": "string",
4516
+ "enum": [
4517
+ "body"
4518
+ ]
4519
+ }
4520
+ },
4521
+ "required": [
4522
+ "type"
4523
+ ]
4524
+ },
4525
+ {
4526
+ "type": "object",
4527
+ "properties": {
4528
+ "type": {
4529
+ "type": "string",
4530
+ "enum": [
4531
+ "url"
4532
+ ]
4533
+ },
4534
+ "role": {
4535
+ "type": "string",
4536
+ "enum": [
4537
+ "target",
4538
+ "icon"
4539
+ ]
4540
+ }
4541
+ },
4542
+ "required": [
4543
+ "type"
4544
+ ]
4545
+ },
4546
+ {
4547
+ "type": "object",
4548
+ "properties": {
4549
+ "type": {
4550
+ "type": "string",
4551
+ "enum": [
4552
+ "number"
4553
+ ]
4554
+ }
4555
+ },
4556
+ "required": [
4557
+ "type"
4558
+ ]
4559
+ },
4560
+ {
4561
+ "type": "object",
4562
+ "properties": {
4563
+ "type": {
4564
+ "type": "string",
4565
+ "enum": [
4566
+ "boolean"
4567
+ ]
4568
+ }
4569
+ },
4570
+ "required": [
4571
+ "type"
4572
+ ]
4573
+ },
4574
+ {
4575
+ "type": "object",
4576
+ "properties": {
4577
+ "type": {
4578
+ "type": "string",
4579
+ "enum": [
4580
+ "enum"
4581
+ ]
4582
+ },
4583
+ "values": {
4584
+ "type": "array",
4585
+ "items": {
4586
+ "type": "object",
4587
+ "properties": {
4588
+ "label": {
4589
+ "type": "string"
4590
+ },
4591
+ "value": {
4592
+ "type": "string"
4593
+ }
4594
+ },
4595
+ "required": [
4596
+ "label",
4597
+ "value"
4598
+ ]
4599
+ }
4600
+ }
4601
+ },
4602
+ "required": [
4603
+ "type",
4604
+ "values"
4605
+ ]
4606
+ },
4607
+ {
4608
+ "type": "object",
4609
+ "properties": {
4610
+ "type": {
4611
+ "type": "string",
4612
+ "enum": [
4613
+ "date"
4614
+ ]
4615
+ }
4616
+ },
4617
+ "required": [
4618
+ "type"
4619
+ ]
4620
+ },
4621
+ {
4622
+ "type": "object",
4623
+ "properties": {
4624
+ "type": {
4625
+ "type": "string",
4626
+ "enum": [
4627
+ "user"
4628
+ ]
4629
+ }
4630
+ },
4631
+ "required": [
4632
+ "type"
4633
+ ]
4634
+ },
4635
+ {
4636
+ "type": "object",
4637
+ "description": "reference to another entity, creating a relation",
4638
+ "properties": {
4639
+ "type": {
4640
+ "type": "string",
4641
+ "enum": [
4642
+ "relation"
4643
+ ]
4644
+ },
4645
+ "entity": {
4646
+ "type": "object",
4647
+ "properties": {
4648
+ "type": {
4649
+ "$ref": "#/components/schemas/EntityType"
4650
+ }
4651
+ },
4652
+ "required": [
4653
+ "type"
4654
+ ]
4655
+ }
4656
+ },
4657
+ "required": [
4658
+ "type",
4659
+ "entity"
4660
+ ]
4661
+ }
4662
+ ]
4663
+ }
4664
+ ]
4665
+ },
4666
+ "Event": {
4667
+ "description": "Any event that can be received from GitBook.",
4668
+ "oneOf": [
4669
+ {
4670
+ "$ref": "#/components/schemas/InstallationSetupEvent"
4671
+ },
4672
+ {
4673
+ "$ref": "#/components/schemas/SpaceInstallationSetupEvent"
4674
+ },
4675
+ {
4676
+ "$ref": "#/components/schemas/SpaceInstallationDeletedEvent"
4677
+ },
4678
+ {
4679
+ "$ref": "#/components/schemas/SpaceViewEvent"
4680
+ },
4681
+ {
4682
+ "$ref": "#/components/schemas/SpaceContentUpdatedEvent"
4683
+ },
4684
+ {
4685
+ "$ref": "#/components/schemas/SpaceGitSyncCompletedEvent"
4686
+ },
4687
+ {
4688
+ "$ref": "#/components/schemas/SpaceGitSyncStartedEvent"
4689
+ },
4690
+ {
4691
+ "$ref": "#/components/schemas/SpaceVisibilityUpdatedEvent"
4692
+ },
4693
+ {
4694
+ "$ref": "#/components/schemas/FetchEvent"
4695
+ },
4696
+ {
4697
+ "$ref": "#/components/schemas/FetchPublishedScriptEvent"
4264
4698
  },
4265
4699
  {
4266
4700
  "$ref": "#/components/schemas/UIRenderEvent"
@@ -4412,43 +4846,76 @@
4412
4846
  }
4413
4847
  ]
4414
4848
  },
4415
- "SpaceViewEvent": {
4849
+ "SpaceInstallationDeletedEvent": {
4416
4850
  "allOf": [
4417
4851
  {
4418
4852
  "$ref": "#/components/schemas/SpaceEvent"
4419
4853
  },
4420
4854
  {
4421
4855
  "type": "object",
4422
- "description": "Event received when a page has been visited.",
4856
+ "description": "Event received when integration has been uninstalled from a space.",
4423
4857
  "properties": {
4424
4858
  "type": {
4425
4859
  "type": "string",
4426
4860
  "enum": [
4427
- "space_view"
4861
+ "space_installation_deleted"
4428
4862
  ]
4429
4863
  },
4430
- "pageId": {
4431
- "type": "string",
4432
- "description": "Unique identifier of the visited page."
4433
- },
4434
- "visitor": {
4864
+ "previous": {
4435
4865
  "type": "object",
4436
- "description": "Analytics info on the GitBook's content visitor.",
4866
+ "description": "The state of the Space installation before it was deleted.",
4437
4867
  "properties": {
4438
- "anonymousId": {
4439
- "type": "string",
4440
- "description": "GitBook's unique identifier of the visitor."
4441
- },
4442
- "cookies": {
4868
+ "configuration": {
4443
4869
  "type": "object",
4444
- "description": "The visitors cookies.",
4445
- "additionalProperties": {
4446
- "type": "string"
4447
- }
4448
- },
4449
- "userAgent": {
4450
- "type": "string",
4451
- "description": "User-agent of the visitor."
4870
+ "description": "The previous configuration of the Space installation."
4871
+ }
4872
+ }
4873
+ }
4874
+ },
4875
+ "required": [
4876
+ "type",
4877
+ "previous"
4878
+ ]
4879
+ }
4880
+ ]
4881
+ },
4882
+ "SpaceViewEvent": {
4883
+ "allOf": [
4884
+ {
4885
+ "$ref": "#/components/schemas/SpaceEvent"
4886
+ },
4887
+ {
4888
+ "type": "object",
4889
+ "description": "Event received when a page has been visited.",
4890
+ "properties": {
4891
+ "type": {
4892
+ "type": "string",
4893
+ "enum": [
4894
+ "space_view"
4895
+ ]
4896
+ },
4897
+ "pageId": {
4898
+ "type": "string",
4899
+ "description": "Unique identifier of the visited page."
4900
+ },
4901
+ "visitor": {
4902
+ "type": "object",
4903
+ "description": "Analytics info on the GitBook's content visitor.",
4904
+ "properties": {
4905
+ "anonymousId": {
4906
+ "type": "string",
4907
+ "description": "GitBook's unique identifier of the visitor."
4908
+ },
4909
+ "cookies": {
4910
+ "type": "object",
4911
+ "description": "The visitors cookies.",
4912
+ "additionalProperties": {
4913
+ "type": "string"
4914
+ }
4915
+ },
4916
+ "userAgent": {
4917
+ "type": "string",
4918
+ "description": "User-agent of the visitor."
4452
4919
  },
4453
4920
  "ip": {
4454
4921
  "type": "string",
@@ -5915,7 +6382,8 @@
5915
6382
  "warning",
5916
6383
  "link",
5917
6384
  "link-external",
5918
- "eye"
6385
+ "eye",
6386
+ "lock"
5919
6387
  ]
5920
6388
  },
5921
6389
  "ContentKitModal": {
@@ -6249,10 +6717,17 @@
6249
6717
  ]
6250
6718
  },
6251
6719
  "children": {
6252
- "type": "array",
6253
- "items": {
6254
- "type": "string"
6255
- }
6720
+ "oneOf": [
6721
+ {
6722
+ "type": "string"
6723
+ },
6724
+ {
6725
+ "type": "array",
6726
+ "items": {
6727
+ "type": "string"
6728
+ }
6729
+ }
6730
+ ]
6256
6731
  }
6257
6732
  },
6258
6733
  "required": [
@@ -6747,6 +7222,9 @@
6747
7222
  {
6748
7223
  "$ref": "#/components/schemas/OrganizationEntitiesChannel"
6749
7224
  },
7225
+ {
7226
+ "$ref": "#/components/schemas/OrganizationSchemasChannel"
7227
+ },
6750
7228
  {
6751
7229
  "$ref": "#/components/schemas/OrganizationRecordingsChannel"
6752
7230
  },
@@ -7224,7 +7702,7 @@
7224
7702
  },
7225
7703
  "OrganizationEntitiesChannel": {
7226
7704
  "type": "object",
7227
- "description": "Subscription channel for all integration entities in an organization.",
7705
+ "description": "Subscription channel for entities in an organization.",
7228
7706
  "properties": {
7229
7707
  "channel": {
7230
7708
  "type": "string",
@@ -7232,6 +7710,29 @@
7232
7710
  "organization-entities"
7233
7711
  ]
7234
7712
  },
7713
+ "organization": {
7714
+ "type": "string"
7715
+ },
7716
+ "entityType": {
7717
+ "type": "string"
7718
+ }
7719
+ },
7720
+ "required": [
7721
+ "channel",
7722
+ "organization",
7723
+ "entityType"
7724
+ ]
7725
+ },
7726
+ "OrganizationSchemasChannel": {
7727
+ "type": "object",
7728
+ "description": "Subscription channel for all entity schemas in an organization.",
7729
+ "properties": {
7730
+ "channel": {
7731
+ "type": "string",
7732
+ "enum": [
7733
+ "organization-schemas"
7734
+ ]
7735
+ },
7235
7736
  "organization": {
7236
7737
  "type": "string"
7237
7738
  }
@@ -7296,6 +7797,12 @@
7296
7797
  "type": {
7297
7798
  "$ref": "#/components/schemas/CustomFieldType"
7298
7799
  },
7800
+ "placeholder": {
7801
+ "$ref": "#/components/schemas/CustomFieldPlaceholder"
7802
+ },
7803
+ "options": {
7804
+ "$ref": "#/components/schemas/CustomFieldOptions"
7805
+ },
7299
7806
  "createdAt": {
7300
7807
  "$ref": "#/components/schemas/Date"
7301
7808
  },
@@ -7322,6 +7829,7 @@
7322
7829
  "name",
7323
7830
  "title",
7324
7831
  "description",
7832
+ "placeholder",
7325
7833
  "type",
7326
7834
  "createdAt",
7327
7835
  "updatedAt",
@@ -7330,7 +7838,7 @@
7330
7838
  },
7331
7839
  "CustomFieldName": {
7332
7840
  "type": "string",
7333
- "pattern": "^[a-zA-Z_\\-0-9]+$",
7841
+ "pattern": "^[a-z_\\-0-9]+$",
7334
7842
  "minLength": 1,
7335
7843
  "maxLength": 50
7336
7844
  },
@@ -7347,7 +7855,10 @@
7347
7855
  "enum": [
7348
7856
  "text",
7349
7857
  "number",
7350
- "boolean"
7858
+ "boolean",
7859
+ "tags",
7860
+ "select:multi",
7861
+ "select:single"
7351
7862
  ]
7352
7863
  },
7353
7864
  "CustomFieldValue": {
@@ -7361,6 +7872,13 @@
7361
7872
  },
7362
7873
  {
7363
7874
  "type": "boolean"
7875
+ },
7876
+ {
7877
+ "type": "array",
7878
+ "items": {
7879
+ "type": "string",
7880
+ "maxLength": 256
7881
+ }
7364
7882
  }
7365
7883
  ]
7366
7884
  },
@@ -7405,6 +7923,20 @@
7405
7923
  "values"
7406
7924
  ]
7407
7925
  },
7926
+ "CustomFieldOptions": {
7927
+ "type": "array",
7928
+ "minItems": 1,
7929
+ "maxItems": 50,
7930
+ "items": {
7931
+ "type": "string",
7932
+ "minLength": 1,
7933
+ "maxLength": 40
7934
+ }
7935
+ },
7936
+ "CustomFieldPlaceholder": {
7937
+ "type": "string",
7938
+ "maxLength": 100
7939
+ },
7408
7940
  "Environment": {
7409
7941
  "type": "object",
7410
7942
  "description": "An environment",
@@ -11174,22 +11706,21 @@
11174
11706
  }
11175
11707
  }
11176
11708
  },
11177
- "/spaces/{spaceId}/entities": {
11709
+ "/collections/{collectionId}": {
11178
11710
  "get": {
11179
- "operationId": "listSpaceEntities",
11180
- "summary": "List all entities linked to a space",
11711
+ "operationId": "getCollectionById",
11712
+ "summary": "Get the details about a collection using its ID",
11181
11713
  "tags": [
11182
- "spaces"
11714
+ "collections"
11183
11715
  ],
11184
- "parameters": [
11185
- {
11186
- "$ref": "#/components/parameters/spaceId"
11187
- },
11716
+ "security": [
11188
11717
  {
11189
- "$ref": "#/components/parameters/listPage"
11190
- },
11718
+ "user": []
11719
+ }
11720
+ ],
11721
+ "parameters": [
11191
11722
  {
11192
- "$ref": "#/components/parameters/listLimit"
11723
+ "$ref": "#/components/parameters/collectionId"
11193
11724
  }
11194
11725
  ],
11195
11726
  "responses": {
@@ -11198,25 +11729,7 @@
11198
11729
  "content": {
11199
11730
  "application/json": {
11200
11731
  "schema": {
11201
- "allOf": [
11202
- {
11203
- "$ref": "#/components/schemas/List"
11204
- },
11205
- {
11206
- "type": "object",
11207
- "required": [
11208
- "items"
11209
- ],
11210
- "properties": {
11211
- "items": {
11212
- "type": "array",
11213
- "items": {
11214
- "$ref": "#/components/schemas/SpaceEntity"
11215
- }
11216
- }
11217
- }
11218
- }
11219
- ]
11732
+ "$ref": "#/components/schemas/Collection"
11220
11733
  }
11221
11734
  }
11222
11735
  }
@@ -11226,15 +11739,20 @@
11226
11739
  }
11227
11740
  }
11228
11741
  },
11229
- "post": {
11230
- "operationId": "addSpaceEntities",
11231
- "summary": "Link the space to entities",
11742
+ "patch": {
11743
+ "operationId": "updateCollectionById",
11744
+ "summary": "Update the details of a collection",
11232
11745
  "tags": [
11233
- "spaces"
11746
+ "collections"
11747
+ ],
11748
+ "security": [
11749
+ {
11750
+ "user": []
11751
+ }
11234
11752
  ],
11235
11753
  "parameters": [
11236
11754
  {
11237
- "$ref": "#/components/parameters/spaceId"
11755
+ "$ref": "#/components/parameters/collectionId"
11238
11756
  }
11239
11757
  ],
11240
11758
  "requestBody": {
@@ -11243,40 +11761,9 @@
11243
11761
  "application/json": {
11244
11762
  "schema": {
11245
11763
  "type": "object",
11246
- "required": [
11247
- "entities"
11248
- ],
11249
11764
  "properties": {
11250
- "entities": {
11251
- "type": "array",
11252
- "description": "Array of entities to link to the space",
11253
- "minItems": 1,
11254
- "maxItems": 10,
11255
- "items": {
11256
- "type": "object",
11257
- "properties": {
11258
- "integration": {
11259
- "type": "string",
11260
- "description": "ID of the integration owning the entity"
11261
- },
11262
- "entityId": {
11263
- "type": "string",
11264
- "description": "ID of the entity in the integration"
11265
- },
11266
- "environments": {
11267
- "type": "array",
11268
- "description": "Environments the entity is linked to",
11269
- "items": {
11270
- "type": "string"
11271
- }
11272
- }
11273
- },
11274
- "required": [
11275
- "integration",
11276
- "entityId",
11277
- "environments"
11278
- ]
11279
- }
11765
+ "visibility": {
11766
+ "$ref": "#/components/schemas/ContentVisibility"
11280
11767
  }
11281
11768
  }
11282
11769
  }
@@ -11284,8 +11771,15 @@
11284
11771
  }
11285
11772
  },
11286
11773
  "responses": {
11287
- "204": {
11288
- "description": "OK"
11774
+ "200": {
11775
+ "description": "The collection has been updated",
11776
+ "content": {
11777
+ "application/json": {
11778
+ "schema": {
11779
+ "$ref": "#/components/schemas/Collection"
11780
+ }
11781
+ }
11782
+ }
11289
11783
  },
11290
11784
  "default": {
11291
11785
  "$ref": "#/components/responses/UnexpectedError"
@@ -11293,22 +11787,27 @@
11293
11787
  }
11294
11788
  }
11295
11789
  },
11296
- "/spaces/{spaceId}/entities/{integrationName}/{entityId}": {
11790
+ "/collections/{collectionId}/spaces": {
11297
11791
  "get": {
11298
- "operationId": "getSpaceEntity",
11299
- "summary": "Get a space entity",
11792
+ "operationId": "listSpacesInCollectionById",
11793
+ "summary": "List all the spaces in a collection by its ID.",
11300
11794
  "tags": [
11301
- "spaces"
11795
+ "collections"
11796
+ ],
11797
+ "security": [
11798
+ {
11799
+ "user": []
11800
+ }
11302
11801
  ],
11303
11802
  "parameters": [
11304
11803
  {
11305
- "$ref": "#/components/parameters/spaceId"
11804
+ "$ref": "#/components/parameters/collectionId"
11306
11805
  },
11307
11806
  {
11308
- "$ref": "#/components/parameters/integrationName"
11807
+ "$ref": "#/components/parameters/listPage"
11309
11808
  },
11310
11809
  {
11311
- "$ref": "#/components/parameters/entityId"
11810
+ "$ref": "#/components/parameters/listLimit"
11312
11811
  }
11313
11812
  ],
11314
11813
  "responses": {
@@ -11317,7 +11816,25 @@
11317
11816
  "content": {
11318
11817
  "application/json": {
11319
11818
  "schema": {
11320
- "$ref": "#/components/schemas/SpaceEntity"
11819
+ "allOf": [
11820
+ {
11821
+ "$ref": "#/components/schemas/List"
11822
+ },
11823
+ {
11824
+ "type": "object",
11825
+ "required": [
11826
+ "items"
11827
+ ],
11828
+ "properties": {
11829
+ "items": {
11830
+ "type": "array",
11831
+ "items": {
11832
+ "$ref": "#/components/schemas/Space"
11833
+ }
11834
+ }
11835
+ }
11836
+ }
11837
+ ]
11321
11838
  }
11322
11839
  }
11323
11840
  }
@@ -11326,247 +11843,38 @@
11326
11843
  "$ref": "#/components/responses/UnexpectedError"
11327
11844
  }
11328
11845
  }
11329
- },
11330
- "patch": {
11331
- "operationId": "updateSpaceEntity",
11332
- "summary": "Update a space entity",
11846
+ }
11847
+ },
11848
+ "/collections/{collectionId}/permissions/aggregate": {
11849
+ "get": {
11850
+ "operationId": "listPermissionsAggregateInCollection",
11851
+ "summary": "List permissions for all users in a collection.",
11333
11852
  "tags": [
11853
+ "permissions",
11334
11854
  "spaces"
11335
11855
  ],
11856
+ "security": [
11857
+ {
11858
+ "user": []
11859
+ }
11860
+ ],
11336
11861
  "parameters": [
11337
11862
  {
11338
- "$ref": "#/components/parameters/spaceId"
11863
+ "$ref": "#/components/parameters/collectionId"
11339
11864
  },
11340
11865
  {
11341
- "$ref": "#/components/parameters/integrationName"
11866
+ "$ref": "#/components/parameters/listPage"
11342
11867
  },
11343
11868
  {
11344
- "$ref": "#/components/parameters/entityId"
11345
- }
11346
- ],
11347
- "requestBody": {
11348
- "required": true,
11349
- "content": {
11350
- "application/json": {
11351
- "schema": {
11352
- "type": "object",
11353
- "required": [
11354
- "environments"
11355
- ],
11356
- "properties": {
11357
- "environments": {
11358
- "$ref": "#/components/schemas/SpaceEntityEnvironments"
11359
- }
11360
- }
11361
- }
11362
- }
11363
- }
11364
- },
11365
- "responses": {
11366
- "204": {
11367
- "description": "Space entity has been updated"
11368
- },
11369
- "default": {
11370
- "$ref": "#/components/responses/UnexpectedError"
11371
- }
11372
- }
11373
- },
11374
- "delete": {
11375
- "operationId": "deleteSpaceEntity",
11376
- "summary": "Delete a space entity",
11377
- "tags": [
11378
- "spaces"
11379
- ],
11380
- "parameters": [
11381
- {
11382
- "$ref": "#/components/parameters/spaceId"
11383
- },
11384
- {
11385
- "$ref": "#/components/parameters/integrationName"
11386
- },
11387
- {
11388
- "$ref": "#/components/parameters/entityId"
11389
- }
11390
- ],
11391
- "responses": {
11392
- "204": {
11393
- "description": "Space entity has been deleted"
11394
- },
11395
- "default": {
11396
- "$ref": "#/components/responses/UnexpectedError"
11397
- }
11398
- }
11399
- }
11400
- },
11401
- "/collections/{collectionId}": {
11402
- "get": {
11403
- "operationId": "getCollectionById",
11404
- "summary": "Get the details about a collection using its ID",
11405
- "tags": [
11406
- "collections"
11407
- ],
11408
- "security": [
11409
- {
11410
- "user": []
11411
- }
11412
- ],
11413
- "parameters": [
11414
- {
11415
- "$ref": "#/components/parameters/collectionId"
11416
- }
11417
- ],
11418
- "responses": {
11419
- "200": {
11420
- "description": "OK",
11421
- "content": {
11422
- "application/json": {
11423
- "schema": {
11424
- "$ref": "#/components/schemas/Collection"
11425
- }
11426
- }
11427
- }
11428
- },
11429
- "default": {
11430
- "$ref": "#/components/responses/UnexpectedError"
11431
- }
11432
- }
11433
- },
11434
- "patch": {
11435
- "operationId": "updateCollectionById",
11436
- "summary": "Update the details of a collection",
11437
- "tags": [
11438
- "collections"
11439
- ],
11440
- "security": [
11441
- {
11442
- "user": []
11443
- }
11444
- ],
11445
- "parameters": [
11446
- {
11447
- "$ref": "#/components/parameters/collectionId"
11448
- }
11449
- ],
11450
- "requestBody": {
11451
- "required": true,
11452
- "content": {
11453
- "application/json": {
11454
- "schema": {
11455
- "type": "object",
11456
- "properties": {
11457
- "visibility": {
11458
- "$ref": "#/components/schemas/ContentVisibility"
11459
- }
11460
- }
11461
- }
11462
- }
11463
- }
11464
- },
11465
- "responses": {
11466
- "200": {
11467
- "description": "The collection has been updated",
11468
- "content": {
11469
- "application/json": {
11470
- "schema": {
11471
- "$ref": "#/components/schemas/Collection"
11472
- }
11473
- }
11474
- }
11475
- },
11476
- "default": {
11477
- "$ref": "#/components/responses/UnexpectedError"
11478
- }
11479
- }
11480
- }
11481
- },
11482
- "/collections/{collectionId}/spaces": {
11483
- "get": {
11484
- "operationId": "listSpacesInCollectionById",
11485
- "summary": "List all the spaces in a collection by its ID.",
11486
- "tags": [
11487
- "collections"
11488
- ],
11489
- "security": [
11490
- {
11491
- "user": []
11492
- }
11493
- ],
11494
- "parameters": [
11495
- {
11496
- "$ref": "#/components/parameters/collectionId"
11497
- },
11498
- {
11499
- "$ref": "#/components/parameters/listPage"
11500
- },
11501
- {
11502
- "$ref": "#/components/parameters/listLimit"
11503
- }
11504
- ],
11505
- "responses": {
11506
- "200": {
11507
- "description": "OK",
11508
- "content": {
11509
- "application/json": {
11510
- "schema": {
11511
- "allOf": [
11512
- {
11513
- "$ref": "#/components/schemas/List"
11514
- },
11515
- {
11516
- "type": "object",
11517
- "required": [
11518
- "items"
11519
- ],
11520
- "properties": {
11521
- "items": {
11522
- "type": "array",
11523
- "items": {
11524
- "$ref": "#/components/schemas/Space"
11525
- }
11526
- }
11527
- }
11528
- }
11529
- ]
11530
- }
11531
- }
11532
- }
11533
- },
11534
- "default": {
11535
- "$ref": "#/components/responses/UnexpectedError"
11536
- }
11537
- }
11538
- }
11539
- },
11540
- "/collections/{collectionId}/permissions/aggregate": {
11541
- "get": {
11542
- "operationId": "listPermissionsAggregateInCollection",
11543
- "summary": "List permissions for all users in a collection.",
11544
- "tags": [
11545
- "permissions",
11546
- "spaces"
11547
- ],
11548
- "security": [
11549
- {
11550
- "user": []
11551
- }
11552
- ],
11553
- "parameters": [
11554
- {
11555
- "$ref": "#/components/parameters/collectionId"
11556
- },
11557
- {
11558
- "$ref": "#/components/parameters/listPage"
11559
- },
11560
- {
11561
- "$ref": "#/components/parameters/listLimit"
11562
- },
11563
- {
11564
- "name": "role",
11565
- "in": "query",
11566
- "description": "If defined, only members with this role will be returned.",
11567
- "schema": {
11568
- "$ref": "#/components/schemas/MemberRole"
11569
- }
11869
+ "$ref": "#/components/parameters/listLimit"
11870
+ },
11871
+ {
11872
+ "name": "role",
11873
+ "in": "query",
11874
+ "description": "If defined, only members with this role will be returned.",
11875
+ "schema": {
11876
+ "$ref": "#/components/schemas/MemberRole"
11877
+ }
11570
11878
  }
11571
11879
  ],
11572
11880
  "responses": {
@@ -12299,6 +12607,61 @@
12299
12607
  }
12300
12608
  }
12301
12609
  },
12610
+ "/integrations/{integrationName}/tasks": {
12611
+ "post": {
12612
+ "operationId": "queueIntegrationTask",
12613
+ "summary": "Queue a task for an integration to be executed later",
12614
+ "tags": [
12615
+ "integrations"
12616
+ ],
12617
+ "security": [
12618
+ {
12619
+ "integration": []
12620
+ }
12621
+ ],
12622
+ "parameters": [
12623
+ {
12624
+ "$ref": "#/components/parameters/integrationName"
12625
+ }
12626
+ ],
12627
+ "requestBody": {
12628
+ "required": true,
12629
+ "content": {
12630
+ "application/json": {
12631
+ "schema": {
12632
+ "type": "object",
12633
+ "properties": {
12634
+ "task": {
12635
+ "type": "object",
12636
+ "description": "Payload for the integration task"
12637
+ },
12638
+ "schedule": {
12639
+ "type": "number",
12640
+ "description": "Number of seconds to wait before executing the task, defaults to 0",
12641
+ "minimum": 0,
12642
+ "maximum": 86400
12643
+ }
12644
+ },
12645
+ "required": [
12646
+ "task"
12647
+ ]
12648
+ }
12649
+ }
12650
+ }
12651
+ },
12652
+ "responses": {
12653
+ "204": {
12654
+ "description": "Integration task created successfully"
12655
+ },
12656
+ "404": {
12657
+ "$ref": "#/components/responses/NotFoundError"
12658
+ },
12659
+ "default": {
12660
+ "$ref": "#/components/responses/UnexpectedError"
12661
+ }
12662
+ }
12663
+ }
12664
+ },
12302
12665
  "/integrations/{integrationName}/installations/{installationId}": {
12303
12666
  "get": {
12304
12667
  "operationId": "getIntegrationInstallationById",
@@ -12517,9 +12880,12 @@
12517
12880
  }
12518
12881
  },
12519
12882
  "/integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}": {
12520
- "patch": {
12521
- "operationId": "updateIntegrationSpaceInstallation",
12522
- "summary": "Update external IDs and configurations of an integration's installation for a space",
12883
+ "get": {
12884
+ "operationId": "getIntegrationSpaceInstallation",
12885
+ "summary": "Get a specific integration's space installation",
12886
+ "tags": [
12887
+ "integrations"
12888
+ ],
12523
12889
  "parameters": [
12524
12890
  {
12525
12891
  "$ref": "#/components/parameters/integrationName"
@@ -12533,7 +12899,7 @@
12533
12899
  ],
12534
12900
  "responses": {
12535
12901
  "200": {
12536
- "description": "The space installation has been updated.",
12902
+ "description": "Integration space installation",
12537
12903
  "content": {
12538
12904
  "application/json": {
12539
12905
  "schema": {
@@ -12542,24 +12908,17 @@
12542
12908
  }
12543
12909
  }
12544
12910
  },
12911
+ "404": {
12912
+ "$ref": "#/components/responses/NotFoundError"
12913
+ },
12545
12914
  "default": {
12546
12915
  "$ref": "#/components/responses/UnexpectedError"
12547
12916
  }
12548
- },
12549
- "requestBody": {
12550
- "required": true,
12551
- "content": {
12552
- "application/json": {
12553
- "schema": {
12554
- "$ref": "#/components/schemas/RequestUpdateIntegrationInstallation"
12555
- }
12556
- }
12557
- }
12558
12917
  }
12559
12918
  },
12560
- "delete": {
12561
- "operationId": "uninstallIntegrationFromSpace",
12562
- "summary": "Uninstall the integration from a space",
12919
+ "patch": {
12920
+ "operationId": "updateIntegrationSpaceInstallation",
12921
+ "summary": "Update external IDs and configurations of an integration's installation for a space",
12563
12922
  "parameters": [
12564
12923
  {
12565
12924
  "$ref": "#/components/parameters/integrationName"
@@ -12571,121 +12930,49 @@
12571
12930
  "$ref": "#/components/parameters/spaceId"
12572
12931
  }
12573
12932
  ],
12574
- "responses": {
12575
- "204": {
12576
- "description": "The space installation has been deleted."
12577
- },
12578
- "default": {
12579
- "$ref": "#/components/responses/UnexpectedError"
12580
- }
12581
- }
12582
- }
12583
- },
12584
- "/integrations/{integrationName}/installations/{installationId}/entities": {
12585
- "get": {
12586
- "operationId": "getIntegrationEntities",
12587
- "summary": "List entities managed by an integration in an installation.",
12588
- "tags": [
12589
- "integrations"
12590
- ],
12591
- "security": [
12592
- {
12593
- "integration-installation": []
12594
- }
12595
- ],
12596
- "parameters": [
12597
- {
12598
- "$ref": "#/components/parameters/integrationName"
12599
- },
12600
- {
12601
- "$ref": "#/components/parameters/installationId"
12602
- }
12603
- ],
12604
12933
  "responses": {
12605
12934
  "200": {
12606
- "description": "Entity",
12935
+ "description": "The space installation has been updated.",
12607
12936
  "content": {
12608
12937
  "application/json": {
12609
12938
  "schema": {
12610
- "allOf": [
12611
- {
12612
- "$ref": "#/components/schemas/List"
12613
- },
12614
- {
12615
- "type": "object",
12616
- "required": [
12617
- "items"
12618
- ],
12619
- "properties": {
12620
- "items": {
12621
- "type": "array",
12622
- "items": {
12623
- "$ref": "#/components/schemas/IntegrationEntity"
12624
- }
12625
- }
12626
- }
12627
- }
12628
- ]
12939
+ "$ref": "#/components/schemas/IntegrationSpaceInstallation"
12629
12940
  }
12630
12941
  }
12631
12942
  }
12632
12943
  },
12633
- "404": {
12634
- "$ref": "#/components/responses/NotFoundError"
12635
- },
12636
12944
  "default": {
12637
12945
  "$ref": "#/components/responses/UnexpectedError"
12638
12946
  }
12947
+ },
12948
+ "requestBody": {
12949
+ "required": true,
12950
+ "content": {
12951
+ "application/json": {
12952
+ "schema": {
12953
+ "$ref": "#/components/schemas/RequestUpdateIntegrationInstallation"
12954
+ }
12955
+ }
12956
+ }
12639
12957
  }
12640
12958
  },
12641
- "post": {
12642
- "operationId": "syncIntegrationEntities",
12643
- "summary": "Update all entities for an integration installation.",
12644
- "description": "Update all entities for an integration installation. Entities will be created and updated, missing entities will be deleted.",
12645
- "tags": [
12646
- "integrations"
12647
- ],
12648
- "security": [
12649
- {
12650
- "integration-installation": []
12651
- }
12652
- ],
12959
+ "delete": {
12960
+ "operationId": "uninstallIntegrationFromSpace",
12961
+ "summary": "Uninstall the integration from a space",
12653
12962
  "parameters": [
12654
12963
  {
12655
12964
  "$ref": "#/components/parameters/integrationName"
12656
12965
  },
12657
12966
  {
12658
12967
  "$ref": "#/components/parameters/installationId"
12968
+ },
12969
+ {
12970
+ "$ref": "#/components/parameters/spaceId"
12659
12971
  }
12660
12972
  ],
12661
- "requestBody": {
12662
- "required": true,
12663
- "content": {
12664
- "application/json": {
12665
- "schema": {
12666
- "type": "object",
12667
- "required": [
12668
- "entities"
12669
- ],
12670
- "properties": {
12671
- "entities": {
12672
- "type": "array",
12673
- "description": "Array of entities to synchronize. Entities will be created and updated, missing entities will be deleted.",
12674
- "items": {
12675
- "$ref": "#/components/schemas/UpsertIntegrationEntity"
12676
- }
12677
- }
12678
- }
12679
- }
12680
- }
12681
- }
12682
- },
12683
12973
  "responses": {
12684
12974
  "204": {
12685
- "description": "Entities have been updated"
12686
- },
12687
- "404": {
12688
- "$ref": "#/components/responses/NotFoundError"
12975
+ "description": "The space installation has been deleted."
12689
12976
  },
12690
12977
  "default": {
12691
12978
  "$ref": "#/components/responses/UnexpectedError"
@@ -14338,23 +14625,398 @@
14338
14625
  {
14339
14626
  "$ref": "#/components/parameters/organizationId"
14340
14627
  }
14341
- ],
14628
+ ],
14629
+ "responses": {
14630
+ "200": {
14631
+ "description": "Directory Sync has been properly initialized for the organization.",
14632
+ "content": {
14633
+ "application/json": {
14634
+ "schema": {
14635
+ "type": "object",
14636
+ "required": [
14637
+ "setupUrl"
14638
+ ],
14639
+ "properties": {
14640
+ "setupUrl": {
14641
+ "description": "The URL to navigate to to continue Directory Sync setup.",
14642
+ "type": "string"
14643
+ }
14644
+ }
14645
+ }
14646
+ }
14647
+ }
14648
+ },
14649
+ "default": {
14650
+ "$ref": "#/components/responses/UnexpectedError"
14651
+ }
14652
+ }
14653
+ }
14654
+ },
14655
+ "/orgs/{organizationId}/dsync/groups": {
14656
+ "get": {
14657
+ "operationId": "listDirectorySyncGroups",
14658
+ "summary": "Lists the groups exposed to the synced Directory on an organization.",
14659
+ "tags": [
14660
+ "organizations",
14661
+ "dsync"
14662
+ ],
14663
+ "security": [
14664
+ {
14665
+ "user-internal": []
14666
+ }
14667
+ ],
14668
+ "parameters": [
14669
+ {
14670
+ "$ref": "#/components/parameters/organizationId"
14671
+ }
14672
+ ],
14673
+ "responses": {
14674
+ "200": {
14675
+ "description": "A list of all of a Directory's group configured for the given identity provider.\nOnly groups pushed to the SCIM sync will be listed in this result.\n",
14676
+ "content": {
14677
+ "application/json": {
14678
+ "schema": {
14679
+ "type": "object",
14680
+ "description": "All the groups.",
14681
+ "required": [
14682
+ "groups"
14683
+ ],
14684
+ "properties": {
14685
+ "groups": {
14686
+ "type": "array",
14687
+ "items": {
14688
+ "$ref": "#/components/schemas/OrganizationDirectorySyncGroup"
14689
+ }
14690
+ }
14691
+ }
14692
+ }
14693
+ }
14694
+ }
14695
+ },
14696
+ "default": {
14697
+ "$ref": "#/components/responses/UnexpectedError"
14698
+ }
14699
+ }
14700
+ }
14701
+ },
14702
+ "/orgs/{organizationId}/dsync/teams": {
14703
+ "post": {
14704
+ "operationId": "syncDirectorySyncGroupsToTeams",
14705
+ "summary": "Syncs a list of group/team unique identifiers pairs together.",
14706
+ "description": "Each pair will lead the team being synced to the group (unless it is already synced to another) and the members of the group will then be synced to the team.\nEach sync is independent, the endpoint will still succeed if some of the syncs fail.\nCheck the response to know more about the success or failure of the entire sync.\n",
14707
+ "tags": [
14708
+ "organizations",
14709
+ "dsync"
14710
+ ],
14711
+ "security": [
14712
+ {
14713
+ "user-internal": []
14714
+ }
14715
+ ],
14716
+ "parameters": [
14717
+ {
14718
+ "$ref": "#/components/parameters/organizationId"
14719
+ }
14720
+ ],
14721
+ "requestBody": {
14722
+ "required": true,
14723
+ "content": {
14724
+ "application/json": {
14725
+ "schema": {
14726
+ "type": "object",
14727
+ "description": "Parameters for syncing a list of Directory Sync groups to a GitBook team, syncing all members of those groups to the assigned teams.\nThe endpoint can be used for one or many groups to team syncs.\n",
14728
+ "required": [
14729
+ "to_sync"
14730
+ ],
14731
+ "properties": {
14732
+ "to_sync": {
14733
+ "type": "array",
14734
+ "description": "A list of groups to teams pairs to sync.\nThe group_id is required and the team_id is optional.\nIf the latter is omitted, a new team will be created from the group's data.\n",
14735
+ "items": {
14736
+ "type": "object",
14737
+ "required": [
14738
+ "group_id"
14739
+ ],
14740
+ "properties": {
14741
+ "group_id": {
14742
+ "type": "string",
14743
+ "description": "The unique identifier of the group for the given identity provider."
14744
+ },
14745
+ "team_id": {
14746
+ "type": "string",
14747
+ "description": "The unique identifier of the team for the given identity provider."
14748
+ }
14749
+ }
14750
+ }
14751
+ }
14752
+ }
14753
+ }
14754
+ }
14755
+ }
14756
+ },
14757
+ "responses": {
14758
+ "200": {
14759
+ "description": "A list of the results of the synchronization.\nThis will return regardless of the status of the sync.\nCheck the content to know if the sync was successful.\n",
14760
+ "content": {
14761
+ "application/json": {
14762
+ "schema": {
14763
+ "type": "object",
14764
+ "required": [
14765
+ "synced"
14766
+ ],
14767
+ "properties": {
14768
+ "synced": {
14769
+ "type": "array",
14770
+ "description": "The list of synced pairs, mapped to the original pairs given to the sync parameters.\nEither the group_id and team_id will be defined, or the error will be defined to describe why it failed.\nUse the success parameter to know if the pair sync was sucessful or not.\n",
14771
+ "items": {
14772
+ "$ref": "#/components/schemas/OrganizationDirectorySyncGroupTeamStatus"
14773
+ }
14774
+ }
14775
+ }
14776
+ }
14777
+ }
14778
+ }
14779
+ },
14780
+ "default": {
14781
+ "$ref": "#/components/responses/UnexpectedError"
14782
+ }
14783
+ }
14784
+ }
14785
+ },
14786
+ "/orgs/{organizationId}/custom-fields": {
14787
+ "get": {
14788
+ "operationId": "listOrganizationCustomFields",
14789
+ "summary": "Get the custom fields for spaces in an organization",
14790
+ "tags": [
14791
+ "organizations"
14792
+ ],
14793
+ "security": [
14794
+ {
14795
+ "user": []
14796
+ }
14797
+ ],
14798
+ "parameters": [
14799
+ {
14800
+ "$ref": "#/components/parameters/organizationId"
14801
+ },
14802
+ {
14803
+ "$ref": "#/components/parameters/listPage"
14804
+ },
14805
+ {
14806
+ "$ref": "#/components/parameters/listLimit"
14807
+ }
14808
+ ],
14809
+ "responses": {
14810
+ "200": {
14811
+ "description": "OK",
14812
+ "content": {
14813
+ "application/json": {
14814
+ "schema": {
14815
+ "allOf": [
14816
+ {
14817
+ "$ref": "#/components/schemas/List"
14818
+ },
14819
+ {
14820
+ "type": "object",
14821
+ "required": [
14822
+ "items"
14823
+ ],
14824
+ "properties": {
14825
+ "items": {
14826
+ "type": "array",
14827
+ "items": {
14828
+ "$ref": "#/components/schemas/CustomField"
14829
+ }
14830
+ }
14831
+ }
14832
+ }
14833
+ ]
14834
+ }
14835
+ }
14836
+ }
14837
+ },
14838
+ "default": {
14839
+ "$ref": "#/components/responses/UnexpectedError"
14840
+ }
14841
+ }
14842
+ },
14843
+ "post": {
14844
+ "operationId": "createOrganizationCustomField",
14845
+ "summary": "Create a new custom field in an orgamization",
14846
+ "tags": [
14847
+ "organizations"
14848
+ ],
14849
+ "security": [
14850
+ {
14851
+ "user": []
14852
+ }
14853
+ ],
14854
+ "parameters": [
14855
+ {
14856
+ "$ref": "#/components/parameters/organizationId"
14857
+ }
14858
+ ],
14859
+ "requestBody": {
14860
+ "required": true,
14861
+ "content": {
14862
+ "application/json": {
14863
+ "schema": {
14864
+ "type": "object",
14865
+ "properties": {
14866
+ "name": {
14867
+ "$ref": "#/components/schemas/CustomFieldName"
14868
+ },
14869
+ "type": {
14870
+ "$ref": "#/components/schemas/CustomFieldType"
14871
+ },
14872
+ "title": {
14873
+ "$ref": "#/components/schemas/CustomFieldTitle"
14874
+ },
14875
+ "description": {
14876
+ "$ref": "#/components/schemas/CustomFieldDescription"
14877
+ },
14878
+ "placeholder": {
14879
+ "$ref": "#/components/schemas/CustomFieldPlaceholder"
14880
+ },
14881
+ "options": {
14882
+ "$ref": "#/components/schemas/CustomFieldOptions"
14883
+ }
14884
+ },
14885
+ "required": [
14886
+ "name",
14887
+ "type"
14888
+ ]
14889
+ }
14890
+ }
14891
+ }
14892
+ },
14893
+ "responses": {
14894
+ "201": {
14895
+ "description": "Custom field created",
14896
+ "headers": {
14897
+ "Location": {
14898
+ "description": "API URL for the newly created custom field",
14899
+ "schema": {
14900
+ "type": "string"
14901
+ }
14902
+ }
14903
+ },
14904
+ "content": {
14905
+ "application/json": {
14906
+ "schema": {
14907
+ "$ref": "#/components/schemas/CustomField"
14908
+ }
14909
+ }
14910
+ }
14911
+ },
14912
+ "default": {
14913
+ "$ref": "#/components/responses/UnexpectedError"
14914
+ }
14915
+ }
14916
+ }
14917
+ },
14918
+ "/orgs/{organizationId}/custom-fields/{fieldName}": {
14919
+ "get": {
14920
+ "operationId": "getOrganizationCustomFieldByName",
14921
+ "summary": "Get a custom field by its name",
14922
+ "tags": [
14923
+ "organizations"
14924
+ ],
14925
+ "security": [
14926
+ {
14927
+ "user": []
14928
+ }
14929
+ ],
14930
+ "parameters": [
14931
+ {
14932
+ "$ref": "#/components/parameters/organizationId"
14933
+ },
14934
+ {
14935
+ "name": "fieldName",
14936
+ "in": "path",
14937
+ "required": true,
14938
+ "description": "The name of the custom field",
14939
+ "schema": {
14940
+ "type": "string"
14941
+ }
14942
+ }
14943
+ ],
14944
+ "responses": {
14945
+ "200": {
14946
+ "description": "OK",
14947
+ "content": {
14948
+ "application/json": {
14949
+ "schema": {
14950
+ "$ref": "#/components/schemas/CustomField"
14951
+ }
14952
+ }
14953
+ }
14954
+ },
14955
+ "404": {
14956
+ "description": "No matching custom field found",
14957
+ "$ref": "#/components/responses/NotFoundError"
14958
+ },
14959
+ "default": {
14960
+ "$ref": "#/components/responses/UnexpectedError"
14961
+ }
14962
+ }
14963
+ },
14964
+ "patch": {
14965
+ "operationId": "updateOrganizationCustomField",
14966
+ "summary": "Update a custom field in an organization",
14967
+ "tags": [
14968
+ "organizations"
14969
+ ],
14970
+ "security": [
14971
+ {
14972
+ "user": []
14973
+ }
14974
+ ],
14975
+ "parameters": [
14976
+ {
14977
+ "$ref": "#/components/parameters/organizationId"
14978
+ },
14979
+ {
14980
+ "name": "fieldName",
14981
+ "in": "path",
14982
+ "required": true,
14983
+ "description": "The name of the custom field",
14984
+ "schema": {
14985
+ "type": "string"
14986
+ }
14987
+ }
14988
+ ],
14989
+ "requestBody": {
14990
+ "required": true,
14991
+ "content": {
14992
+ "application/json": {
14993
+ "schema": {
14994
+ "type": "object",
14995
+ "properties": {
14996
+ "title": {
14997
+ "$ref": "#/components/schemas/CustomFieldTitle"
14998
+ },
14999
+ "description": {
15000
+ "$ref": "#/components/schemas/CustomFieldDescription"
15001
+ },
15002
+ "placeholder": {
15003
+ "$ref": "#/components/schemas/CustomFieldPlaceholder"
15004
+ },
15005
+ "options": {
15006
+ "$ref": "#/components/schemas/CustomFieldOptions"
15007
+ }
15008
+ }
15009
+ }
15010
+ }
15011
+ }
15012
+ },
14342
15013
  "responses": {
14343
15014
  "200": {
14344
- "description": "Directory Sync has been properly initialized for the organization.",
15015
+ "description": "OK",
14345
15016
  "content": {
14346
15017
  "application/json": {
14347
15018
  "schema": {
14348
- "type": "object",
14349
- "required": [
14350
- "setupUrl"
14351
- ],
14352
- "properties": {
14353
- "setupUrl": {
14354
- "description": "The URL to navigate to to continue Directory Sync setup.",
14355
- "type": "string"
14356
- }
14357
- }
15019
+ "$ref": "#/components/schemas/CustomField"
14358
15020
  }
14359
15021
  }
14360
15022
  }
@@ -14363,48 +15025,35 @@
14363
15025
  "$ref": "#/components/responses/UnexpectedError"
14364
15026
  }
14365
15027
  }
14366
- }
14367
- },
14368
- "/orgs/{organizationId}/dsync/groups": {
14369
- "get": {
14370
- "operationId": "listDirectorySyncGroups",
14371
- "summary": "Lists the groups exposed to the synced Directory on an organization.",
15028
+ },
15029
+ "delete": {
15030
+ "operationId": "deleteOrganizationCustomField",
15031
+ "summary": "Delete a custom field in an organization",
14372
15032
  "tags": [
14373
- "organizations",
14374
- "dsync"
15033
+ "organizations"
14375
15034
  ],
14376
15035
  "security": [
14377
15036
  {
14378
- "user-internal": []
15037
+ "user": []
14379
15038
  }
14380
15039
  ],
14381
15040
  "parameters": [
14382
15041
  {
14383
15042
  "$ref": "#/components/parameters/organizationId"
15043
+ },
15044
+ {
15045
+ "name": "fieldName",
15046
+ "in": "path",
15047
+ "required": true,
15048
+ "description": "The name of the custom field",
15049
+ "schema": {
15050
+ "type": "string"
15051
+ }
14384
15052
  }
14385
15053
  ],
14386
15054
  "responses": {
14387
- "200": {
14388
- "description": "A list of all of a Directory's group configured for the given identity provider.\nOnly groups pushed to the SCIM sync will be listed in this result.\n",
14389
- "content": {
14390
- "application/json": {
14391
- "schema": {
14392
- "type": "object",
14393
- "description": "All the groups.",
14394
- "required": [
14395
- "groups"
14396
- ],
14397
- "properties": {
14398
- "groups": {
14399
- "type": "array",
14400
- "items": {
14401
- "$ref": "#/components/schemas/OrganizationDirectorySyncGroup"
14402
- }
14403
- }
14404
- }
14405
- }
14406
- }
14407
- }
15055
+ "204": {
15056
+ "description": "Custom field has been deleted"
14408
15057
  },
14409
15058
  "default": {
14410
15059
  "$ref": "#/components/responses/UnexpectedError"
@@ -14412,80 +15061,49 @@
14412
15061
  }
14413
15062
  }
14414
15063
  },
14415
- "/orgs/{organizationId}/dsync/teams": {
14416
- "post": {
14417
- "operationId": "syncDirectorySyncGroupsToTeams",
14418
- "summary": "Syncs a list of group/team unique identifiers pairs together.",
14419
- "description": "Each pair will lead the team being synced to the group (unless it is already synced to another) and the members of the group will then be synced to the team.\nEach sync is independent, the endpoint will still succeed if some of the syncs fail.\nCheck the response to know more about the success or failure of the entire sync.\n",
15064
+ "/orgs/{organizationId}/space-relations": {
15065
+ "get": {
15066
+ "operationId": "listSpaceRelationsInOrganization",
15067
+ "summary": "List all relations between spaces in an organization",
14420
15068
  "tags": [
14421
- "organizations",
14422
- "dsync"
14423
- ],
14424
- "security": [
14425
- {
14426
- "user-internal": []
14427
- }
15069
+ "spaces"
14428
15070
  ],
14429
15071
  "parameters": [
14430
15072
  {
14431
15073
  "$ref": "#/components/parameters/organizationId"
15074
+ },
15075
+ {
15076
+ "$ref": "#/components/parameters/listPage"
15077
+ },
15078
+ {
15079
+ "$ref": "#/components/parameters/listLimit"
14432
15080
  }
14433
15081
  ],
14434
- "requestBody": {
14435
- "required": true,
14436
- "content": {
14437
- "application/json": {
14438
- "schema": {
14439
- "type": "object",
14440
- "description": "Parameters for syncing a list of Directory Sync groups to a GitBook team, syncing all members of those groups to the assigned teams.\nThe endpoint can be used for one or many groups to team syncs.\n",
14441
- "required": [
14442
- "to_sync"
14443
- ],
14444
- "properties": {
14445
- "to_sync": {
14446
- "type": "array",
14447
- "description": "A list of groups to teams pairs to sync.\nThe group_id is required and the team_id is optional.\nIf the latter is omitted, a new team will be created from the group's data.\n",
14448
- "items": {
14449
- "type": "object",
14450
- "required": [
14451
- "group_id"
14452
- ],
14453
- "properties": {
14454
- "group_id": {
14455
- "type": "string",
14456
- "description": "The unique identifier of the group for the given identity provider."
14457
- },
14458
- "team_id": {
14459
- "type": "string",
14460
- "description": "The unique identifier of the team for the given identity provider."
14461
- }
14462
- }
14463
- }
14464
- }
14465
- }
14466
- }
14467
- }
14468
- }
14469
- },
14470
15082
  "responses": {
14471
15083
  "200": {
14472
- "description": "A list of the results of the synchronization.\nThis will return regardless of the status of the sync.\nCheck the content to know if the sync was successful.\n",
15084
+ "description": "OK",
14473
15085
  "content": {
14474
15086
  "application/json": {
14475
15087
  "schema": {
14476
- "type": "object",
14477
- "required": [
14478
- "synced"
14479
- ],
14480
- "properties": {
14481
- "synced": {
14482
- "type": "array",
14483
- "description": "The list of synced pairs, mapped to the original pairs given to the sync parameters.\nEither the group_id and team_id will be defined, or the error will be defined to describe why it failed.\nUse the success parameter to know if the pair sync was sucessful or not.\n",
14484
- "items": {
14485
- "$ref": "#/components/schemas/OrganizationDirectorySyncGroupTeamStatus"
15088
+ "allOf": [
15089
+ {
15090
+ "$ref": "#/components/schemas/List"
15091
+ },
15092
+ {
15093
+ "type": "object",
15094
+ "required": [
15095
+ "items"
15096
+ ],
15097
+ "properties": {
15098
+ "items": {
15099
+ "type": "array",
15100
+ "items": {
15101
+ "$ref": "#/components/schemas/SpaceRelationPair"
15102
+ }
15103
+ }
14486
15104
  }
14487
15105
  }
14488
- }
15106
+ ]
14489
15107
  }
14490
15108
  }
14491
15109
  }
@@ -14496,12 +15114,13 @@
14496
15114
  }
14497
15115
  }
14498
15116
  },
14499
- "/orgs/{organizationId}/custom-fields": {
15117
+ "/orgs/{organizationId}/environments": {
14500
15118
  "get": {
14501
- "operationId": "listOrganizationCustomFields",
14502
- "summary": "Get the custom fields for spaces in an organization",
15119
+ "operationId": "listEnvironments",
15120
+ "summary": "Get the environments in an organization",
14503
15121
  "tags": [
14504
- "organizations"
15122
+ "organizations",
15123
+ "environments"
14505
15124
  ],
14506
15125
  "security": [
14507
15126
  {
@@ -14531,14 +15150,11 @@
14531
15150
  },
14532
15151
  {
14533
15152
  "type": "object",
14534
- "required": [
14535
- "items"
14536
- ],
14537
15153
  "properties": {
14538
15154
  "items": {
14539
15155
  "type": "array",
14540
15156
  "items": {
14541
- "$ref": "#/components/schemas/CustomField"
15157
+ "$ref": "#/components/schemas/Environment"
14542
15158
  }
14543
15159
  }
14544
15160
  }
@@ -14547,17 +15163,15 @@
14547
15163
  }
14548
15164
  }
14549
15165
  }
14550
- },
14551
- "default": {
14552
- "$ref": "#/components/responses/UnexpectedError"
14553
15166
  }
14554
15167
  }
14555
15168
  },
14556
15169
  "post": {
14557
- "operationId": "createOrganizationCustomField",
14558
- "summary": "Create a new custom field in an orgamization",
15170
+ "operationId": "createEnvironment",
15171
+ "summary": "Create a new environment within an organization",
14559
15172
  "tags": [
14560
- "organizations"
15173
+ "organizations",
15174
+ "environments"
14561
15175
  ],
14562
15176
  "security": [
14563
15177
  {
@@ -14574,35 +15188,17 @@
14574
15188
  "content": {
14575
15189
  "application/json": {
14576
15190
  "schema": {
14577
- "type": "object",
14578
- "properties": {
14579
- "name": {
14580
- "$ref": "#/components/schemas/CustomFieldName"
14581
- },
14582
- "type": {
14583
- "$ref": "#/components/schemas/CustomFieldType"
14584
- },
14585
- "title": {
14586
- "$ref": "#/components/schemas/CustomFieldTitle"
14587
- },
14588
- "description": {
14589
- "$ref": "#/components/schemas/CustomFieldDescription"
14590
- }
14591
- },
14592
- "required": [
14593
- "name",
14594
- "type"
14595
- ]
15191
+ "$ref": "#/components/schemas/CreateEnvironment"
14596
15192
  }
14597
15193
  }
14598
15194
  }
14599
15195
  },
14600
15196
  "responses": {
14601
15197
  "201": {
14602
- "description": "Custom field created",
15198
+ "description": "OK",
14603
15199
  "headers": {
14604
15200
  "Location": {
14605
- "description": "API URL for the newly created custom field",
15201
+ "description": "API URL for the newly created environment",
14606
15202
  "schema": {
14607
15203
  "type": "string"
14608
15204
  }
@@ -14611,7 +15207,7 @@
14611
15207
  "content": {
14612
15208
  "application/json": {
14613
15209
  "schema": {
14614
- "$ref": "#/components/schemas/CustomField"
15210
+ "$ref": "#/components/schemas/Environment"
14615
15211
  }
14616
15212
  }
14617
15213
  }
@@ -14622,12 +15218,13 @@
14622
15218
  }
14623
15219
  }
14624
15220
  },
14625
- "/orgs/{organizationId}/custom-fields/{fieldName}": {
15221
+ "/orgs/{organizationId}/environments/{environmentName}": {
14626
15222
  "get": {
14627
- "operationId": "getOrganizationCustomFieldByName",
14628
- "summary": "Get a custom field by its name",
15223
+ "operationId": "getEnvironmentByName",
15224
+ "summary": "Get an environment by its name",
14629
15225
  "tags": [
14630
- "organizations"
15226
+ "organizations",
15227
+ "environments"
14631
15228
  ],
14632
15229
  "security": [
14633
15230
  {
@@ -14639,13 +15236,7 @@
14639
15236
  "$ref": "#/components/parameters/organizationId"
14640
15237
  },
14641
15238
  {
14642
- "name": "fieldName",
14643
- "in": "path",
14644
- "required": true,
14645
- "description": "The name of the custom field",
14646
- "schema": {
14647
- "type": "string"
14648
- }
15239
+ "$ref": "#/components/parameters/environmentName"
14649
15240
  }
14650
15241
  ],
14651
15242
  "responses": {
@@ -14654,13 +15245,13 @@
14654
15245
  "content": {
14655
15246
  "application/json": {
14656
15247
  "schema": {
14657
- "$ref": "#/components/schemas/CustomField"
15248
+ "$ref": "#/components/schemas/Environment"
14658
15249
  }
14659
15250
  }
14660
15251
  }
14661
15252
  },
14662
15253
  "404": {
14663
- "description": "No matching custom field found",
15254
+ "description": "No matching environment found",
14664
15255
  "$ref": "#/components/responses/NotFoundError"
14665
15256
  },
14666
15257
  "default": {
@@ -14669,10 +15260,11 @@
14669
15260
  }
14670
15261
  },
14671
15262
  "patch": {
14672
- "operationId": "updateOrganizationCustomField",
14673
- "summary": "Update a custom field in an organization",
15263
+ "operationId": "updateEnvironment",
15264
+ "summary": "Update an existing environment within an organization",
14674
15265
  "tags": [
14675
- "organizations"
15266
+ "organizations",
15267
+ "environments"
14676
15268
  ],
14677
15269
  "security": [
14678
15270
  {
@@ -14684,13 +15276,7 @@
14684
15276
  "$ref": "#/components/parameters/organizationId"
14685
15277
  },
14686
15278
  {
14687
- "name": "fieldName",
14688
- "in": "path",
14689
- "required": true,
14690
- "description": "The name of the custom field",
14691
- "schema": {
14692
- "type": "string"
14693
- }
15279
+ "$ref": "#/components/parameters/environmentName"
14694
15280
  }
14695
15281
  ],
14696
15282
  "requestBody": {
@@ -14698,15 +15284,7 @@
14698
15284
  "content": {
14699
15285
  "application/json": {
14700
15286
  "schema": {
14701
- "type": "object",
14702
- "properties": {
14703
- "title": {
14704
- "$ref": "#/components/schemas/CustomFieldTitle"
14705
- },
14706
- "description": {
14707
- "$ref": "#/components/schemas/CustomFieldDescription"
14708
- }
14709
- }
15287
+ "$ref": "#/components/schemas/UpdateEnvironment"
14710
15288
  }
14711
15289
  }
14712
15290
  }
@@ -14717,7 +15295,7 @@
14717
15295
  "content": {
14718
15296
  "application/json": {
14719
15297
  "schema": {
14720
- "$ref": "#/components/schemas/CustomField"
15298
+ "$ref": "#/components/schemas/Environment"
14721
15299
  }
14722
15300
  }
14723
15301
  }
@@ -14728,10 +15306,11 @@
14728
15306
  }
14729
15307
  },
14730
15308
  "delete": {
14731
- "operationId": "deleteOrganizationCustomField",
14732
- "summary": "Delete a custom field in an organization",
15309
+ "operationId": "deleteEnvironment",
15310
+ "summary": "Delete an environment in an organization",
14733
15311
  "tags": [
14734
- "organizations"
15312
+ "organizations",
15313
+ "environments"
14735
15314
  ],
14736
15315
  "security": [
14737
15316
  {
@@ -14743,18 +15322,12 @@
14743
15322
  "$ref": "#/components/parameters/organizationId"
14744
15323
  },
14745
15324
  {
14746
- "name": "fieldName",
14747
- "in": "path",
14748
- "required": true,
14749
- "description": "The name of the custom field",
14750
- "schema": {
14751
- "type": "string"
14752
- }
15325
+ "$ref": "#/components/parameters/environmentName"
14753
15326
  }
14754
15327
  ],
14755
15328
  "responses": {
14756
15329
  "204": {
14757
- "description": "Custom field has been deleted"
15330
+ "description": "Environment has been deleted"
14758
15331
  },
14759
15332
  "default": {
14760
15333
  "$ref": "#/components/responses/UnexpectedError"
@@ -14762,12 +15335,17 @@
14762
15335
  }
14763
15336
  }
14764
15337
  },
14765
- "/orgs/{organizationId}/space-relations": {
15338
+ "/orgs/{organizationId}/schemas": {
14766
15339
  "get": {
14767
- "operationId": "listSpaceRelationsInOrganization",
14768
- "summary": "List all relations between spaces in an organization",
15340
+ "operationId": "listEntitySchemas",
15341
+ "summary": "List the entity schemas in an organization.",
14769
15342
  "tags": [
14770
- "spaces"
15343
+ "organizations"
15344
+ ],
15345
+ "security": [
15346
+ {
15347
+ "user": []
15348
+ }
14771
15349
  ],
14772
15350
  "parameters": [
14773
15351
  {
@@ -14799,7 +15377,7 @@
14799
15377
  "items": {
14800
15378
  "type": "array",
14801
15379
  "items": {
14802
- "$ref": "#/components/schemas/SpaceRelationPair"
15380
+ "$ref": "#/components/schemas/EntitySchema"
14803
15381
  }
14804
15382
  }
14805
15383
  }
@@ -14815,22 +15393,24 @@
14815
15393
  }
14816
15394
  }
14817
15395
  },
14818
- "/orgs/{organizationId}/entities": {
15396
+ "/orgs/{organizationId}/schemas/{entityType}": {
14819
15397
  "get": {
14820
- "operationId": "listEntitiesInOrganization",
14821
- "summary": "List all entities in an organization.",
15398
+ "operationId": "getEntitySchema",
15399
+ "summary": "Get an entity schema by its type.",
14822
15400
  "tags": [
14823
- "spaces"
15401
+ "organizations"
15402
+ ],
15403
+ "security": [
15404
+ {
15405
+ "user": []
15406
+ }
14824
15407
  ],
14825
15408
  "parameters": [
14826
15409
  {
14827
15410
  "$ref": "#/components/parameters/organizationId"
14828
15411
  },
14829
15412
  {
14830
- "$ref": "#/components/parameters/listPage"
14831
- },
14832
- {
14833
- "$ref": "#/components/parameters/listLimit"
15413
+ "$ref": "#/components/parameters/entityType"
14834
15414
  }
14835
15415
  ],
14836
15416
  "responses": {
@@ -14839,25 +15419,7 @@
14839
15419
  "content": {
14840
15420
  "application/json": {
14841
15421
  "schema": {
14842
- "allOf": [
14843
- {
14844
- "$ref": "#/components/schemas/List"
14845
- },
14846
- {
14847
- "type": "object",
14848
- "required": [
14849
- "items"
14850
- ],
14851
- "properties": {
14852
- "items": {
14853
- "type": "array",
14854
- "items": {
14855
- "$ref": "#/components/schemas/IntegrationEntity"
14856
- }
14857
- }
14858
- }
14859
- }
14860
- ]
15422
+ "$ref": "#/components/schemas/EntitySchema"
14861
15423
  }
14862
15424
  }
14863
15425
  }
@@ -14866,15 +15428,12 @@
14866
15428
  "$ref": "#/components/responses/UnexpectedError"
14867
15429
  }
14868
15430
  }
14869
- }
14870
- },
14871
- "/orgs/{organizationId}/environments": {
14872
- "get": {
14873
- "operationId": "listEnvironments",
14874
- "summary": "Get the environments in an organization",
15431
+ },
15432
+ "put": {
15433
+ "operationId": "setEntitySchema",
15434
+ "summary": "Create or update an entity schema.",
14875
15435
  "tags": [
14876
- "organizations",
14877
- "environments"
15436
+ "organizations"
14878
15437
  ],
14879
15438
  "security": [
14880
15439
  {
@@ -14886,46 +15445,33 @@
14886
15445
  "$ref": "#/components/parameters/organizationId"
14887
15446
  },
14888
15447
  {
14889
- "$ref": "#/components/parameters/listPage"
14890
- },
14891
- {
14892
- "$ref": "#/components/parameters/listLimit"
15448
+ "$ref": "#/components/parameters/entityType"
14893
15449
  }
14894
15450
  ],
14895
- "responses": {
14896
- "200": {
14897
- "description": "OK",
14898
- "content": {
14899
- "application/json": {
14900
- "schema": {
14901
- "allOf": [
14902
- {
14903
- "$ref": "#/components/schemas/List"
14904
- },
14905
- {
14906
- "type": "object",
14907
- "properties": {
14908
- "items": {
14909
- "type": "array",
14910
- "items": {
14911
- "$ref": "#/components/schemas/Environment"
14912
- }
14913
- }
14914
- }
14915
- }
14916
- ]
14917
- }
15451
+ "requestBody": {
15452
+ "required": true,
15453
+ "content": {
15454
+ "application/json": {
15455
+ "schema": {
15456
+ "$ref": "#/components/schemas/EntityRawSchema"
14918
15457
  }
14919
15458
  }
14920
15459
  }
15460
+ },
15461
+ "responses": {
15462
+ "204": {
15463
+ "description": "OK"
15464
+ },
15465
+ "default": {
15466
+ "$ref": "#/components/responses/UnexpectedError"
15467
+ }
14921
15468
  }
14922
15469
  },
14923
- "post": {
14924
- "operationId": "createEnvironment",
14925
- "summary": "Create a new environment within an organization",
15470
+ "delete": {
15471
+ "operationId": "deleteEntitySchema",
15472
+ "summary": "Delete an entity schema.",
14926
15473
  "tags": [
14927
- "organizations",
14928
- "environments"
15474
+ "organizations"
14929
15475
  ],
14930
15476
  "security": [
14931
15477
  {
@@ -14935,36 +15481,14 @@
14935
15481
  "parameters": [
14936
15482
  {
14937
15483
  "$ref": "#/components/parameters/organizationId"
15484
+ },
15485
+ {
15486
+ "$ref": "#/components/parameters/entityType"
14938
15487
  }
14939
15488
  ],
14940
- "requestBody": {
14941
- "required": true,
14942
- "content": {
14943
- "application/json": {
14944
- "schema": {
14945
- "$ref": "#/components/schemas/CreateEnvironment"
14946
- }
14947
- }
14948
- }
14949
- },
14950
15489
  "responses": {
14951
- "201": {
14952
- "description": "OK",
14953
- "headers": {
14954
- "Location": {
14955
- "description": "API URL for the newly created environment",
14956
- "schema": {
14957
- "type": "string"
14958
- }
14959
- }
14960
- },
14961
- "content": {
14962
- "application/json": {
14963
- "schema": {
14964
- "$ref": "#/components/schemas/Environment"
14965
- }
14966
- }
14967
- }
15490
+ "204": {
15491
+ "description": "OK"
14968
15492
  },
14969
15493
  "default": {
14970
15494
  "$ref": "#/components/responses/UnexpectedError"
@@ -14972,13 +15496,12 @@
14972
15496
  }
14973
15497
  }
14974
15498
  },
14975
- "/orgs/{organizationId}/environments/{environmentName}": {
15499
+ "/orgs/{organizationId}/schemas/{entityType}/entities": {
14976
15500
  "get": {
14977
- "operationId": "getEnvironmentByName",
14978
- "summary": "Get an environment by its name",
15501
+ "operationId": "listSchemaEntities",
15502
+ "summary": "List entities in an organization for a given type.",
14979
15503
  "tags": [
14980
- "organizations",
14981
- "environments"
15504
+ "organizations"
14982
15505
  ],
14983
15506
  "security": [
14984
15507
  {
@@ -14990,7 +15513,21 @@
14990
15513
  "$ref": "#/components/parameters/organizationId"
14991
15514
  },
14992
15515
  {
14993
- "$ref": "#/components/parameters/environmentName"
15516
+ "$ref": "#/components/parameters/entityType"
15517
+ },
15518
+ {
15519
+ "$ref": "#/components/parameters/listPage"
15520
+ },
15521
+ {
15522
+ "$ref": "#/components/parameters/listLimit"
15523
+ },
15524
+ {
15525
+ "name": "query",
15526
+ "in": "query",
15527
+ "description": "Query to filter entities with, ex: a == 'something' && b >= 10",
15528
+ "schema": {
15529
+ "type": "string"
15530
+ }
14994
15531
  }
14995
15532
  ],
14996
15533
  "responses": {
@@ -14999,26 +15536,39 @@
14999
15536
  "content": {
15000
15537
  "application/json": {
15001
15538
  "schema": {
15002
- "$ref": "#/components/schemas/Environment"
15539
+ "allOf": [
15540
+ {
15541
+ "$ref": "#/components/schemas/List"
15542
+ },
15543
+ {
15544
+ "type": "object",
15545
+ "required": [
15546
+ "items"
15547
+ ],
15548
+ "properties": {
15549
+ "items": {
15550
+ "type": "array",
15551
+ "items": {
15552
+ "$ref": "#/components/schemas/Entity"
15553
+ }
15554
+ }
15555
+ }
15556
+ }
15557
+ ]
15003
15558
  }
15004
15559
  }
15005
15560
  }
15006
15561
  },
15007
- "404": {
15008
- "description": "No matching environment found",
15009
- "$ref": "#/components/responses/NotFoundError"
15010
- },
15011
15562
  "default": {
15012
15563
  "$ref": "#/components/responses/UnexpectedError"
15013
15564
  }
15014
15565
  }
15015
15566
  },
15016
- "patch": {
15017
- "operationId": "updateEnvironment",
15018
- "summary": "Update an existing environment within an organization",
15567
+ "put": {
15568
+ "operationId": "upsertSchemaEntities",
15569
+ "summary": "Update/Create/Delete entities in a schema.",
15019
15570
  "tags": [
15020
- "organizations",
15021
- "environments"
15571
+ "organizations"
15022
15572
  ],
15023
15573
  "security": [
15024
15574
  {
@@ -15030,7 +15580,7 @@
15030
15580
  "$ref": "#/components/parameters/organizationId"
15031
15581
  },
15032
15582
  {
15033
- "$ref": "#/components/parameters/environmentName"
15583
+ "$ref": "#/components/parameters/entityType"
15034
15584
  }
15035
15585
  ],
15036
15586
  "requestBody": {
@@ -15038,33 +15588,51 @@
15038
15588
  "content": {
15039
15589
  "application/json": {
15040
15590
  "schema": {
15041
- "$ref": "#/components/schemas/UpdateEnvironment"
15591
+ "type": "object",
15592
+ "properties": {
15593
+ "delete": {
15594
+ "oneOf": [
15595
+ {
15596
+ "type": "boolean",
15597
+ "description": "If true, all entities not listed in the requests will be deleted"
15598
+ },
15599
+ {
15600
+ "type": "array",
15601
+ "description": "List of entityIds to delete",
15602
+ "items": {
15603
+ "$ref": "#/components/schemas/EntityId"
15604
+ }
15605
+ }
15606
+ ]
15607
+ },
15608
+ "entities": {
15609
+ "type": "array",
15610
+ "description": "Array of entities to create/update.",
15611
+ "items": {
15612
+ "$ref": "#/components/schemas/UpsertEntity"
15613
+ }
15614
+ }
15615
+ }
15042
15616
  }
15043
15617
  }
15044
15618
  }
15045
15619
  },
15046
15620
  "responses": {
15047
- "200": {
15048
- "description": "OK",
15049
- "content": {
15050
- "application/json": {
15051
- "schema": {
15052
- "$ref": "#/components/schemas/Environment"
15053
- }
15054
- }
15055
- }
15621
+ "204": {
15622
+ "description": "OK"
15056
15623
  },
15057
15624
  "default": {
15058
15625
  "$ref": "#/components/responses/UnexpectedError"
15059
15626
  }
15060
15627
  }
15061
- },
15062
- "delete": {
15063
- "operationId": "deleteEnvironment",
15064
- "summary": "Delete an environment in an organization",
15628
+ }
15629
+ },
15630
+ "/orgs/{organizationId}/schemas/{entityType}/entities/{entityId}": {
15631
+ "get": {
15632
+ "operationId": "getEntity",
15633
+ "summary": "Get an entity using its ID.",
15065
15634
  "tags": [
15066
- "organizations",
15067
- "environments"
15635
+ "organizations"
15068
15636
  ],
15069
15637
  "security": [
15070
15638
  {
@@ -15076,12 +15644,22 @@
15076
15644
  "$ref": "#/components/parameters/organizationId"
15077
15645
  },
15078
15646
  {
15079
- "$ref": "#/components/parameters/environmentName"
15647
+ "$ref": "#/components/parameters/entityType"
15648
+ },
15649
+ {
15650
+ "$ref": "#/components/parameters/entityId"
15080
15651
  }
15081
15652
  ],
15082
15653
  "responses": {
15083
- "204": {
15084
- "description": "Environment has been deleted"
15654
+ "200": {
15655
+ "description": "OK",
15656
+ "content": {
15657
+ "application/json": {
15658
+ "schema": {
15659
+ "$ref": "#/components/schemas/Entity"
15660
+ }
15661
+ }
15662
+ }
15085
15663
  },
15086
15664
  "default": {
15087
15665
  "$ref": "#/components/responses/UnexpectedError"
@@ -15348,7 +15926,22 @@
15348
15926
  "content": {
15349
15927
  "application/json": {
15350
15928
  "schema": {
15351
- "$ref": "#/components/schemas/RecordingOutput"
15929
+ "type": "object",
15930
+ "properties": {
15931
+ "recording": {
15932
+ "$ref": "#/components/schemas/RecordingOutput"
15933
+ },
15934
+ "followupQuestions": {
15935
+ "description": "Example questions that would be answered by the content of this recording.",
15936
+ "type": "array",
15937
+ "items": {
15938
+ "type": "string"
15939
+ }
15940
+ }
15941
+ },
15942
+ "required": [
15943
+ "recording"
15944
+ ]
15352
15945
  }
15353
15946
  }
15354
15947
  }