@atelier201/cli 0.7.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.
@@ -3866,6 +3866,26 @@ export const API_OPERATIONS = [
3866
3866
  }
3867
3867
  ]
3868
3868
  },
3869
+ "number": {
3870
+ "anyOf": [
3871
+ {
3872
+ "type": "integer",
3873
+ "minimum": -9007199254740991,
3874
+ "maximum": 9007199254740991
3875
+ },
3876
+ {
3877
+ "type": "null"
3878
+ }
3879
+ ],
3880
+ "description": "The version's number on its site, 1 for the first save: what people call it (version 12). Null only for a version saved before numbering, never in practice."
3881
+ },
3882
+ "name": {
3883
+ "description": "The name the owner gave this version, or null.",
3884
+ "type": [
3885
+ "string",
3886
+ "null"
3887
+ ]
3888
+ },
3869
3889
  "summary": {
3870
3890
  "type": "string"
3871
3891
  },
@@ -3907,6 +3927,8 @@ export const API_OPERATIONS = [
3907
3927
  "required": [
3908
3928
  "revision",
3909
3929
  "parent",
3930
+ "number",
3931
+ "name",
3910
3932
  "summary",
3911
3933
  "origin",
3912
3934
  "author",
@@ -3930,6 +3952,20 @@ export const API_OPERATIONS = [
3930
3952
  }
3931
3953
  ]
3932
3954
  },
3955
+ "live_revision": {
3956
+ "anyOf": [
3957
+ {
3958
+ "type": "string",
3959
+ "minLength": 40,
3960
+ "maxLength": 40,
3961
+ "description": "A Git commit id (40 hex characters) of the site's repository."
3962
+ },
3963
+ {
3964
+ "type": "null"
3965
+ }
3966
+ ],
3967
+ "description": "The version visitors see, or null when the site is not published."
3968
+ },
3933
3969
  "next_before": {
3934
3970
  "anyOf": [
3935
3971
  {
@@ -3945,6 +3981,7 @@ export const API_OPERATIONS = [
3945
3981
  "required": [
3946
3982
  "revisions",
3947
3983
  "draft_revision",
3984
+ "live_revision",
3948
3985
  "next_before"
3949
3986
  ],
3950
3987
  "additionalProperties": false
@@ -4003,8 +4040,8 @@ export const API_OPERATIONS = [
4003
4040
  "operation_id": "compareSiteRevisions",
4004
4041
  "method": "GET",
4005
4042
  "path": "/v1/sites/{site_id}/compare",
4006
- "summary": "Compare two revisions",
4007
- "description": "The files added, modified and deleted between two revisions.",
4043
+ "summary": "Compare two versions",
4044
+ "description": "What changed between two versions (numbers or revisions): the files added, modified and deleted, the versions saved in between with their summaries, and with patch=true the changed lines of each text file.",
4008
4045
  "authentication_required": true,
4009
4046
  "scope": "sites:read",
4010
4047
  "surfaces": {
@@ -4026,10 +4063,9 @@ export const API_OPERATIONS = [
4026
4063
  "in": "query",
4027
4064
  "required": false,
4028
4065
  "schema": {
4066
+ "description": "The earlier version. Leave it out to compare `to` with the version before it: what `to` changed.",
4029
4067
  "type": "string",
4030
- "minLength": 40,
4031
- "maxLength": 40,
4032
- "description": "A Git commit id (40 hex characters) of the site's repository."
4068
+ "pattern": "^(v?\\d{1,7}|[0-9a-f]{40})$"
4033
4069
  }
4034
4070
  },
4035
4071
  {
@@ -4038,16 +4074,46 @@ export const API_OPERATIONS = [
4038
4074
  "required": true,
4039
4075
  "schema": {
4040
4076
  "type": "string",
4041
- "minLength": 40,
4042
- "maxLength": 40,
4043
- "description": "A Git commit id (40 hex characters) of the site's repository."
4077
+ "pattern": "^(v?\\d{1,7}|[0-9a-f]{40})$",
4078
+ "description": "The later version: its number (12) or its revision."
4079
+ }
4080
+ },
4081
+ {
4082
+ "name": "patch",
4083
+ "in": "query",
4084
+ "required": false,
4085
+ "schema": {
4086
+ "description": "Also return, for each text file, the changed lines and a few around them (a unified diff without its header). Git takes it from the two versions directly: the versions in between are summed up in `between`, not walked.",
4087
+ "type": "boolean"
4088
+ }
4089
+ },
4090
+ {
4091
+ "name": "max_chars",
4092
+ "in": "query",
4093
+ "required": false,
4094
+ "schema": {
4095
+ "description": "With patch: the most characters of patches returned, 60,000 by default. Files past it say patch_skipped \"budget\".",
4096
+ "type": "integer",
4097
+ "minimum": 1000,
4098
+ "maximum": 200000
4099
+ }
4100
+ },
4101
+ {
4102
+ "name": "context",
4103
+ "in": "query",
4104
+ "required": false,
4105
+ "schema": {
4106
+ "description": "With patch: unchanged lines around each change, 3 by default.",
4107
+ "type": "integer",
4108
+ "minimum": 0,
4109
+ "maximum": 10
4044
4110
  }
4045
4111
  }
4046
4112
  ],
4047
4113
  "request_body": null,
4048
4114
  "responses": {
4049
4115
  "200": {
4050
- "description": "Compare two revisions",
4116
+ "description": "Compare two versions",
4051
4117
  "content": {
4052
4118
  "application/json": {
4053
4119
  "schema": {
@@ -4076,6 +4142,87 @@ export const API_OPERATIONS = [
4076
4142
  "maxLength": 40,
4077
4143
  "description": "A Git commit id (40 hex characters) of the site's repository."
4078
4144
  },
4145
+ "from_version": {
4146
+ "anyOf": [
4147
+ {
4148
+ "type": "integer",
4149
+ "minimum": -9007199254740991,
4150
+ "maximum": 9007199254740991
4151
+ },
4152
+ {
4153
+ "type": "null"
4154
+ }
4155
+ ],
4156
+ "description": "The number of `from`, or null."
4157
+ },
4158
+ "to_version": {
4159
+ "anyOf": [
4160
+ {
4161
+ "type": "integer",
4162
+ "minimum": -9007199254740991,
4163
+ "maximum": 9007199254740991
4164
+ },
4165
+ {
4166
+ "type": "null"
4167
+ }
4168
+ ],
4169
+ "description": "The number of `to`."
4170
+ },
4171
+ "between": {
4172
+ "type": "array",
4173
+ "items": {
4174
+ "type": "object",
4175
+ "properties": {
4176
+ "number": {
4177
+ "anyOf": [
4178
+ {
4179
+ "type": "integer",
4180
+ "minimum": -9007199254740991,
4181
+ "maximum": 9007199254740991
4182
+ },
4183
+ {
4184
+ "type": "null"
4185
+ }
4186
+ ]
4187
+ },
4188
+ "name": {
4189
+ "type": [
4190
+ "string",
4191
+ "null"
4192
+ ]
4193
+ },
4194
+ "summary": {
4195
+ "type": "string"
4196
+ },
4197
+ "author": {
4198
+ "type": "string"
4199
+ },
4200
+ "origin": {
4201
+ "type": "string"
4202
+ },
4203
+ "files_changed": {
4204
+ "type": "integer",
4205
+ "minimum": -9007199254740991,
4206
+ "maximum": 9007199254740991
4207
+ },
4208
+ "created_at": {
4209
+ "type": "string",
4210
+ "description": "ISO 8601, UTC."
4211
+ }
4212
+ },
4213
+ "required": [
4214
+ "number",
4215
+ "name",
4216
+ "summary",
4217
+ "author",
4218
+ "origin",
4219
+ "files_changed",
4220
+ "created_at"
4221
+ ],
4222
+ "additionalProperties": false
4223
+ },
4224
+ "description": "Every version saved after `from` up to and including `to`, oldest first (100 at most): the story of the change."
4225
+ },
4079
4226
  "changes": {
4080
4227
  "type": "array",
4081
4228
  "items": {
@@ -4098,6 +4245,40 @@ export const API_OPERATIONS = [
4098
4245
  "string",
4099
4246
  "null"
4100
4247
  ]
4248
+ },
4249
+ "patch": {
4250
+ "description": "With patch: the changed lines, or null when patch_skipped says why.",
4251
+ "type": [
4252
+ "string",
4253
+ "null"
4254
+ ]
4255
+ },
4256
+ "patch_skipped": {
4257
+ "description": "binary (an image, a font), too_large (over 512 KB), generated (a lockfile) or budget (max_chars spent; the budget goes to content, then pages, then components and styles, then the rest).",
4258
+ "anyOf": [
4259
+ {
4260
+ "type": "string",
4261
+ "enum": [
4262
+ "binary",
4263
+ "too_large",
4264
+ "generated",
4265
+ "budget"
4266
+ ]
4267
+ },
4268
+ {
4269
+ "type": "null"
4270
+ }
4271
+ ]
4272
+ },
4273
+ "lines_added": {
4274
+ "type": "integer",
4275
+ "minimum": -9007199254740991,
4276
+ "maximum": 9007199254740991
4277
+ },
4278
+ "lines_removed": {
4279
+ "type": "integer",
4280
+ "minimum": -9007199254740991,
4281
+ "maximum": 9007199254740991
4101
4282
  }
4102
4283
  },
4103
4284
  "required": [
@@ -4108,11 +4289,18 @@ export const API_OPERATIONS = [
4108
4289
  ],
4109
4290
  "additionalProperties": false
4110
4291
  }
4292
+ },
4293
+ "truncated": {
4294
+ "description": "With patch: true when some files were left out for max_chars.",
4295
+ "type": "boolean"
4111
4296
  }
4112
4297
  },
4113
4298
  "required": [
4114
4299
  "from",
4115
4300
  "to",
4301
+ "from_version",
4302
+ "to_version",
4303
+ "between",
4116
4304
  "changes"
4117
4305
  ],
4118
4306
  "additionalProperties": false
@@ -4168,16 +4356,16 @@ export const API_OPERATIONS = [
4168
4356
  }
4169
4357
  },
4170
4358
  {
4171
- "operation_id": "restoreSiteRevision",
4172
- "method": "POST",
4173
- "path": "/v1/sites/{site_id}/revisions/{revision}/restore",
4174
- "summary": "Restore a revision",
4175
- "description": "Makes the draft's files exactly those of an earlier revision, as a NEW history entry (nothing is erased), and starts its build. Does not publish.",
4359
+ "operation_id": "updateSiteRevision",
4360
+ "method": "PATCH",
4361
+ "path": "/v1/sites/{site_id}/revisions/{revision}",
4362
+ "summary": "Name a version",
4363
+ "description": "Gives a version a name (\"Before the redesign\") or takes it away with null. Its number and its files never change. No credits, nothing published.",
4176
4364
  "authentication_required": true,
4177
4365
  "scope": "sites:write",
4178
4366
  "surfaces": {
4179
- "cli": "atelier201 history restore",
4180
- "mcp": "restore_revision"
4367
+ "cli": "atelier201 history rename",
4368
+ "mcp": "rename_revision"
4181
4369
  },
4182
4370
  "parameters": [
4183
4371
  {
@@ -4198,10 +4386,39 @@ export const API_OPERATIONS = [
4198
4386
  }
4199
4387
  }
4200
4388
  ],
4201
- "request_body": null,
4389
+ "request_body": {
4390
+ "required": true,
4391
+ "content": {
4392
+ "application/json": {
4393
+ "schema": {
4394
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4395
+ "type": "object",
4396
+ "properties": {
4397
+ "name": {
4398
+ "anyOf": [
4399
+ {
4400
+ "type": "string",
4401
+ "minLength": 1,
4402
+ "maxLength": 80
4403
+ },
4404
+ {
4405
+ "type": "null"
4406
+ }
4407
+ ],
4408
+ "description": "A name for this version (\"Before the redesign\"), up to 80 characters; null takes it away. The number stays."
4409
+ }
4410
+ },
4411
+ "required": [
4412
+ "name"
4413
+ ],
4414
+ "additionalProperties": false
4415
+ }
4416
+ }
4417
+ }
4418
+ },
4202
4419
  "responses": {
4203
4420
  "200": {
4204
- "description": "Restore a revision",
4421
+ "description": "Name a version",
4205
4422
  "content": {
4206
4423
  "application/json": {
4207
4424
  "schema": {
@@ -4212,58 +4429,243 @@ export const API_OPERATIONS = [
4212
4429
  "type": "object",
4213
4430
  "properties": {
4214
4431
  "revision": {
4215
- "type": "string"
4432
+ "type": "string",
4433
+ "minLength": 40,
4434
+ "maxLength": 40,
4435
+ "description": "A Git commit id (40 hex characters) of the site's repository."
4216
4436
  },
4217
- "changed": {
4218
- "type": "boolean"
4437
+ "parent": {
4438
+ "anyOf": [
4439
+ {
4440
+ "type": "string",
4441
+ "minLength": 40,
4442
+ "maxLength": 40,
4443
+ "description": "A Git commit id (40 hex characters) of the site's repository."
4444
+ },
4445
+ {
4446
+ "type": "null"
4447
+ }
4448
+ ]
4219
4449
  },
4220
- "build": {
4450
+ "number": {
4221
4451
  "anyOf": [
4222
4452
  {
4223
- "type": "object",
4224
- "properties": {
4225
- "id": {
4226
- "type": "string"
4227
- },
4228
- "state": {
4229
- "type": "string"
4230
- },
4231
- "next_action": {
4232
- "type": "string"
4233
- }
4234
- },
4235
- "required": [
4236
- "id",
4237
- "state",
4238
- "next_action"
4239
- ],
4240
- "additionalProperties": false
4453
+ "type": "integer",
4454
+ "minimum": -9007199254740991,
4455
+ "maximum": 9007199254740991
4241
4456
  },
4242
4457
  {
4243
4458
  "type": "null"
4244
4459
  }
4245
4460
  ],
4246
- "description": "The build this change started (or joined): the preview follows it. No build_site call needed."
4247
- }
4248
- },
4249
- "required": [
4250
- "revision",
4251
- "changed",
4252
- "build"
4253
- ],
4254
- "additionalProperties": false
4255
- },
4256
- "request_id": {
4257
- "type": "string"
4258
- }
4259
- },
4260
- "required": [
4261
- "data",
4262
- "request_id"
4263
- ]
4264
- }
4265
- }
4266
- }
4461
+ "description": "The version's number on its site, 1 for the first save: what people call it (version 12). Null only for a version saved before numbering, never in practice."
4462
+ },
4463
+ "name": {
4464
+ "description": "The name the owner gave this version, or null.",
4465
+ "type": [
4466
+ "string",
4467
+ "null"
4468
+ ]
4469
+ },
4470
+ "summary": {
4471
+ "type": "string"
4472
+ },
4473
+ "origin": {
4474
+ "type": "string"
4475
+ },
4476
+ "author": {
4477
+ "type": "string"
4478
+ },
4479
+ "files_changed": {
4480
+ "type": "integer",
4481
+ "minimum": -9007199254740991,
4482
+ "maximum": 9007199254740991
4483
+ },
4484
+ "changes": {
4485
+ "type": "array",
4486
+ "items": {
4487
+ "type": "object",
4488
+ "properties": {
4489
+ "path": {
4490
+ "type": "string"
4491
+ },
4492
+ "action": {
4493
+ "type": "string"
4494
+ }
4495
+ },
4496
+ "required": [
4497
+ "path",
4498
+ "action"
4499
+ ],
4500
+ "additionalProperties": false
4501
+ }
4502
+ },
4503
+ "created_at": {
4504
+ "type": "string",
4505
+ "description": "ISO 8601, UTC."
4506
+ }
4507
+ },
4508
+ "required": [
4509
+ "revision",
4510
+ "parent",
4511
+ "number",
4512
+ "name",
4513
+ "summary",
4514
+ "origin",
4515
+ "author",
4516
+ "files_changed",
4517
+ "changes",
4518
+ "created_at"
4519
+ ],
4520
+ "additionalProperties": false
4521
+ },
4522
+ "request_id": {
4523
+ "type": "string"
4524
+ }
4525
+ },
4526
+ "required": [
4527
+ "data",
4528
+ "request_id"
4529
+ ]
4530
+ }
4531
+ }
4532
+ }
4533
+ },
4534
+ "400": {
4535
+ "$ref": "#/components/responses/Error400"
4536
+ },
4537
+ "401": {
4538
+ "$ref": "#/components/responses/Error401"
4539
+ },
4540
+ "402": {
4541
+ "$ref": "#/components/responses/Error402"
4542
+ },
4543
+ "403": {
4544
+ "$ref": "#/components/responses/Error403"
4545
+ },
4546
+ "404": {
4547
+ "$ref": "#/components/responses/Error404"
4548
+ },
4549
+ "409": {
4550
+ "$ref": "#/components/responses/Error409"
4551
+ },
4552
+ "410": {
4553
+ "$ref": "#/components/responses/Error410"
4554
+ },
4555
+ "413": {
4556
+ "$ref": "#/components/responses/Error413"
4557
+ },
4558
+ "422": {
4559
+ "$ref": "#/components/responses/Error422"
4560
+ },
4561
+ "429": {
4562
+ "$ref": "#/components/responses/Error429"
4563
+ },
4564
+ "500": {
4565
+ "$ref": "#/components/responses/Error500"
4566
+ },
4567
+ "503": {
4568
+ "$ref": "#/components/responses/Error503"
4569
+ }
4570
+ }
4571
+ },
4572
+ {
4573
+ "operation_id": "restoreSiteRevision",
4574
+ "method": "POST",
4575
+ "path": "/v1/sites/{site_id}/revisions/{revision}/restore",
4576
+ "summary": "Restore a revision",
4577
+ "description": "Makes the draft's files exactly those of an earlier revision, as a NEW history entry (nothing is erased), and starts its build. Does not publish.",
4578
+ "authentication_required": true,
4579
+ "scope": "sites:write",
4580
+ "surfaces": {
4581
+ "cli": "atelier201 history restore",
4582
+ "mcp": "restore_revision"
4583
+ },
4584
+ "parameters": [
4585
+ {
4586
+ "name": "site_id",
4587
+ "in": "path",
4588
+ "required": true,
4589
+ "schema": {
4590
+ "type": "string"
4591
+ },
4592
+ "description": "The site's id, or its slug (the address before .atelier201.page)."
4593
+ },
4594
+ {
4595
+ "name": "revision",
4596
+ "in": "path",
4597
+ "required": true,
4598
+ "schema": {
4599
+ "type": "string"
4600
+ }
4601
+ }
4602
+ ],
4603
+ "request_body": null,
4604
+ "responses": {
4605
+ "200": {
4606
+ "description": "Restore a revision",
4607
+ "content": {
4608
+ "application/json": {
4609
+ "schema": {
4610
+ "type": "object",
4611
+ "properties": {
4612
+ "data": {
4613
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4614
+ "type": "object",
4615
+ "properties": {
4616
+ "revision": {
4617
+ "type": "string"
4618
+ },
4619
+ "changed": {
4620
+ "type": "boolean"
4621
+ },
4622
+ "build": {
4623
+ "anyOf": [
4624
+ {
4625
+ "type": "object",
4626
+ "properties": {
4627
+ "id": {
4628
+ "type": "string"
4629
+ },
4630
+ "state": {
4631
+ "type": "string"
4632
+ },
4633
+ "next_action": {
4634
+ "type": "string"
4635
+ }
4636
+ },
4637
+ "required": [
4638
+ "id",
4639
+ "state",
4640
+ "next_action"
4641
+ ],
4642
+ "additionalProperties": false
4643
+ },
4644
+ {
4645
+ "type": "null"
4646
+ }
4647
+ ],
4648
+ "description": "The build this change started (or joined): the preview follows it. No build_site call needed."
4649
+ }
4650
+ },
4651
+ "required": [
4652
+ "revision",
4653
+ "changed",
4654
+ "build"
4655
+ ],
4656
+ "additionalProperties": false
4657
+ },
4658
+ "request_id": {
4659
+ "type": "string"
4660
+ }
4661
+ },
4662
+ "required": [
4663
+ "data",
4664
+ "request_id"
4665
+ ]
4666
+ }
4667
+ }
4668
+ }
4267
4669
  },
4268
4670
  "400": {
4269
4671
  "$ref": "#/components/responses/Error400"
@@ -6180,7 +6582,7 @@ export const API_OPERATIONS = [
6180
6582
  "method": "POST",
6181
6583
  "path": "/v1/sites/{site_id}/previews",
6182
6584
  "summary": "Share a preview",
6183
- "description": "A private link that shows one build (default: the newest ready build of the draft) for 7 days (1 to 30). Anyone with the link can see it; it grants nothing else and is never indexed. The link runs sandboxed with origin `null`: Workers, browser storage and third-party APIs that refuse that origin fail there and work once published.",
6585
+ "description": "A private link that shows one build (default: the newest ready build of the draft) for 7 days (1 to 30), with an optional name saying who it is for. Anyone with the link can see it; it grants nothing else and is never indexed. The link runs sandboxed with origin `null`: Workers, browser storage and third-party APIs that refuse that origin fail there and work once published.",
6184
6586
  "authentication_required": true,
6185
6587
  "scope": "sites:write",
6186
6588
  "surfaces": {
@@ -6215,6 +6617,11 @@ export const API_OPERATIONS = [
6215
6617
  "type": "integer",
6216
6618
  "minimum": 1,
6217
6619
  "maximum": 30
6620
+ },
6621
+ "name": {
6622
+ "type": "string",
6623
+ "maxLength": 60,
6624
+ "description": "Who the link is for, so it can be told apart later (\"Marie\", \"the client\"). Empty or null: no name."
6218
6625
  }
6219
6626
  },
6220
6627
  "additionalProperties": false
@@ -6237,12 +6644,31 @@ export const API_OPERATIONS = [
6237
6644
  "id": {
6238
6645
  "type": "string"
6239
6646
  },
6647
+ "name": {
6648
+ "type": [
6649
+ "string",
6650
+ "null"
6651
+ ]
6652
+ },
6240
6653
  "url": {
6241
6654
  "type": "string"
6242
6655
  },
6243
6656
  "build_id": {
6244
6657
  "type": "string"
6245
6658
  },
6659
+ "version": {
6660
+ "anyOf": [
6661
+ {
6662
+ "type": "integer",
6663
+ "minimum": -9007199254740991,
6664
+ "maximum": 9007199254740991
6665
+ },
6666
+ {
6667
+ "type": "null"
6668
+ }
6669
+ ],
6670
+ "description": "The number of the version it shows (version 12), as in listSiteRevisions. Null when unknown."
6671
+ },
6246
6672
  "expires_at": {
6247
6673
  "type": "string",
6248
6674
  "description": "ISO 8601, UTC."
@@ -6250,8 +6676,10 @@ export const API_OPERATIONS = [
6250
6676
  },
6251
6677
  "required": [
6252
6678
  "id",
6679
+ "name",
6253
6680
  "url",
6254
6681
  "build_id",
6682
+ "version",
6255
6683
  "expires_at"
6256
6684
  ],
6257
6685
  "additionalProperties": false
@@ -6311,7 +6739,7 @@ export const API_OPERATIONS = [
6311
6739
  "method": "GET",
6312
6740
  "path": "/v1/sites/{site_id}/previews",
6313
6741
  "summary": "List preview links",
6314
- "description": "Preview links with their state: active, expired or revoked.",
6742
+ "description": "Preview links with their name and state: active, expired or revoked. A link whose build_id is not the newest ready build shows an older version: update it with build_id \"latest\".",
6315
6743
  "authentication_required": true,
6316
6744
  "scope": "sites:read",
6317
6745
  "surfaces": {
@@ -6350,9 +6778,28 @@ export const API_OPERATIONS = [
6350
6778
  "id": {
6351
6779
  "type": "string"
6352
6780
  },
6781
+ "name": {
6782
+ "type": [
6783
+ "string",
6784
+ "null"
6785
+ ]
6786
+ },
6353
6787
  "build_id": {
6354
6788
  "type": "string"
6355
6789
  },
6790
+ "version": {
6791
+ "anyOf": [
6792
+ {
6793
+ "type": "integer",
6794
+ "minimum": -9007199254740991,
6795
+ "maximum": 9007199254740991
6796
+ },
6797
+ {
6798
+ "type": "null"
6799
+ }
6800
+ ],
6801
+ "description": "The number of the version it shows (version 12), as in listSiteRevisions. Null when unknown."
6802
+ },
6356
6803
  "url": {
6357
6804
  "type": "string"
6358
6805
  },
@@ -6378,7 +6825,9 @@ export const API_OPERATIONS = [
6378
6825
  },
6379
6826
  "required": [
6380
6827
  "id",
6828
+ "name",
6381
6829
  "build_id",
6830
+ "version",
6382
6831
  "url",
6383
6832
  "purpose",
6384
6833
  "state",
@@ -6445,16 +6894,16 @@ export const API_OPERATIONS = [
6445
6894
  }
6446
6895
  },
6447
6896
  {
6448
- "operation_id": "revokeSitePreview",
6449
- "method": "DELETE",
6897
+ "operation_id": "updateSitePreview",
6898
+ "method": "PATCH",
6450
6899
  "path": "/v1/sites/{site_id}/previews/{preview_id}",
6451
- "summary": "Revoke a preview link",
6452
- "description": "The link stops working within about a minute.",
6900
+ "summary": "Change a preview link",
6901
+ "description": "Rename a shared link, make it work more days from now, or show another build at the same address (`build_id: \"latest\"`: the newest ready build of the draft). The person who has the link keeps it. A revoked link cannot be changed.",
6453
6902
  "authentication_required": true,
6454
6903
  "scope": "sites:write",
6455
6904
  "surfaces": {
6456
- "cli": "atelier201 previews revoke",
6457
- "mcp": "revoke_preview"
6905
+ "cli": "atelier201 previews update",
6906
+ "mcp": "update_preview"
6458
6907
  },
6459
6908
  "parameters": [
6460
6909
  {
@@ -6475,17 +6924,217 @@ export const API_OPERATIONS = [
6475
6924
  }
6476
6925
  }
6477
6926
  ],
6478
- "request_body": null,
6479
- "responses": {
6480
- "200": {
6481
- "description": "Revoke a preview link",
6482
- "content": {
6483
- "application/json": {
6484
- "schema": {
6485
- "type": "object",
6486
- "properties": {
6487
- "data": {
6488
- "$schema": "https://json-schema.org/draft/2020-12/schema",
6927
+ "request_body": {
6928
+ "required": true,
6929
+ "content": {
6930
+ "application/json": {
6931
+ "schema": {
6932
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
6933
+ "type": "object",
6934
+ "properties": {
6935
+ "name": {
6936
+ "anyOf": [
6937
+ {
6938
+ "type": "string",
6939
+ "maxLength": 60,
6940
+ "description": "Who the link is for, so it can be told apart later (\"Marie\", \"the client\"). Empty or null: no name."
6941
+ },
6942
+ {
6943
+ "type": "null"
6944
+ }
6945
+ ]
6946
+ },
6947
+ "days": {
6948
+ "description": "The link works this many more days, counted from now (1 to 30). Also brings back an expired link.",
6949
+ "type": "integer",
6950
+ "minimum": 1,
6951
+ "maximum": 30
6952
+ },
6953
+ "build_id": {
6954
+ "description": "Show this build at the same address. \"latest\": the newest ready build of the draft, so the person sees the latest changes without a new link.",
6955
+ "anyOf": [
6956
+ {
6957
+ "type": "string",
6958
+ "const": "latest"
6959
+ },
6960
+ {
6961
+ "type": "string",
6962
+ "format": "uuid",
6963
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
6964
+ }
6965
+ ]
6966
+ }
6967
+ },
6968
+ "additionalProperties": false
6969
+ }
6970
+ }
6971
+ }
6972
+ },
6973
+ "responses": {
6974
+ "200": {
6975
+ "description": "Change a preview link",
6976
+ "content": {
6977
+ "application/json": {
6978
+ "schema": {
6979
+ "type": "object",
6980
+ "properties": {
6981
+ "data": {
6982
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
6983
+ "type": "object",
6984
+ "properties": {
6985
+ "id": {
6986
+ "type": "string"
6987
+ },
6988
+ "name": {
6989
+ "type": [
6990
+ "string",
6991
+ "null"
6992
+ ]
6993
+ },
6994
+ "build_id": {
6995
+ "type": "string"
6996
+ },
6997
+ "version": {
6998
+ "anyOf": [
6999
+ {
7000
+ "type": "integer",
7001
+ "minimum": -9007199254740991,
7002
+ "maximum": 9007199254740991
7003
+ },
7004
+ {
7005
+ "type": "null"
7006
+ }
7007
+ ],
7008
+ "description": "The number of the version it shows (version 12), as in listSiteRevisions. Null when unknown."
7009
+ },
7010
+ "url": {
7011
+ "type": "string"
7012
+ },
7013
+ "purpose": {
7014
+ "type": "string"
7015
+ },
7016
+ "state": {
7017
+ "type": "string",
7018
+ "enum": [
7019
+ "active",
7020
+ "expired",
7021
+ "revoked"
7022
+ ]
7023
+ },
7024
+ "expires_at": {
7025
+ "type": "string",
7026
+ "description": "ISO 8601, UTC."
7027
+ },
7028
+ "created_at": {
7029
+ "type": "string",
7030
+ "description": "ISO 8601, UTC."
7031
+ }
7032
+ },
7033
+ "required": [
7034
+ "id",
7035
+ "name",
7036
+ "build_id",
7037
+ "version",
7038
+ "url",
7039
+ "purpose",
7040
+ "state",
7041
+ "expires_at",
7042
+ "created_at"
7043
+ ],
7044
+ "additionalProperties": false
7045
+ },
7046
+ "request_id": {
7047
+ "type": "string"
7048
+ }
7049
+ },
7050
+ "required": [
7051
+ "data",
7052
+ "request_id"
7053
+ ]
7054
+ }
7055
+ }
7056
+ }
7057
+ },
7058
+ "400": {
7059
+ "$ref": "#/components/responses/Error400"
7060
+ },
7061
+ "401": {
7062
+ "$ref": "#/components/responses/Error401"
7063
+ },
7064
+ "402": {
7065
+ "$ref": "#/components/responses/Error402"
7066
+ },
7067
+ "403": {
7068
+ "$ref": "#/components/responses/Error403"
7069
+ },
7070
+ "404": {
7071
+ "$ref": "#/components/responses/Error404"
7072
+ },
7073
+ "409": {
7074
+ "$ref": "#/components/responses/Error409"
7075
+ },
7076
+ "410": {
7077
+ "$ref": "#/components/responses/Error410"
7078
+ },
7079
+ "413": {
7080
+ "$ref": "#/components/responses/Error413"
7081
+ },
7082
+ "422": {
7083
+ "$ref": "#/components/responses/Error422"
7084
+ },
7085
+ "429": {
7086
+ "$ref": "#/components/responses/Error429"
7087
+ },
7088
+ "500": {
7089
+ "$ref": "#/components/responses/Error500"
7090
+ },
7091
+ "503": {
7092
+ "$ref": "#/components/responses/Error503"
7093
+ }
7094
+ }
7095
+ },
7096
+ {
7097
+ "operation_id": "revokeSitePreview",
7098
+ "method": "DELETE",
7099
+ "path": "/v1/sites/{site_id}/previews/{preview_id}",
7100
+ "summary": "Revoke a preview link",
7101
+ "description": "The link stops working within about a minute.",
7102
+ "authentication_required": true,
7103
+ "scope": "sites:write",
7104
+ "surfaces": {
7105
+ "cli": "atelier201 previews revoke",
7106
+ "mcp": "revoke_preview"
7107
+ },
7108
+ "parameters": [
7109
+ {
7110
+ "name": "site_id",
7111
+ "in": "path",
7112
+ "required": true,
7113
+ "schema": {
7114
+ "type": "string"
7115
+ },
7116
+ "description": "The site's id, or its slug (the address before .atelier201.page)."
7117
+ },
7118
+ {
7119
+ "name": "preview_id",
7120
+ "in": "path",
7121
+ "required": true,
7122
+ "schema": {
7123
+ "type": "string"
7124
+ }
7125
+ }
7126
+ ],
7127
+ "request_body": null,
7128
+ "responses": {
7129
+ "200": {
7130
+ "description": "Revoke a preview link",
7131
+ "content": {
7132
+ "application/json": {
7133
+ "schema": {
7134
+ "type": "object",
7135
+ "properties": {
7136
+ "data": {
7137
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
6489
7138
  "type": "object",
6490
7139
  "properties": {
6491
7140
  "id": {
@@ -6839,107 +7488,1105 @@ export const API_OPERATIONS = [
6839
7488
  "items": {
6840
7489
  "type": "object",
6841
7490
  "properties": {
6842
- "key": {
7491
+ "key": {
7492
+ "type": "string"
7493
+ },
7494
+ "views": {
7495
+ "type": "number"
7496
+ },
7497
+ "visitors": {
7498
+ "type": [
7499
+ "number",
7500
+ "null"
7501
+ ]
7502
+ }
7503
+ },
7504
+ "required": [
7505
+ "key",
7506
+ "views",
7507
+ "visitors"
7508
+ ],
7509
+ "additionalProperties": false
7510
+ }
7511
+ },
7512
+ "browsers": {
7513
+ "type": "array",
7514
+ "items": {
7515
+ "type": "object",
7516
+ "properties": {
7517
+ "key": {
7518
+ "type": "string"
7519
+ },
7520
+ "views": {
7521
+ "type": "number"
7522
+ },
7523
+ "visitors": {
7524
+ "type": [
7525
+ "number",
7526
+ "null"
7527
+ ]
7528
+ }
7529
+ },
7530
+ "required": [
7531
+ "key",
7532
+ "views",
7533
+ "visitors"
7534
+ ],
7535
+ "additionalProperties": false
7536
+ }
7537
+ },
7538
+ "os": {
7539
+ "type": "array",
7540
+ "items": {
7541
+ "type": "object",
7542
+ "properties": {
7543
+ "key": {
7544
+ "type": "string"
7545
+ },
7546
+ "views": {
7547
+ "type": "number"
7548
+ },
7549
+ "visitors": {
7550
+ "type": [
7551
+ "number",
7552
+ "null"
7553
+ ]
7554
+ }
7555
+ },
7556
+ "required": [
7557
+ "key",
7558
+ "views",
7559
+ "visitors"
7560
+ ],
7561
+ "additionalProperties": false
7562
+ }
7563
+ },
7564
+ "bot_views": {
7565
+ "type": "number",
7566
+ "description": "Views by bots, kept apart from every figure above."
7567
+ },
7568
+ "updated_at": {
7569
+ "description": "When the last full day was rolled up. Null before the first night.",
7570
+ "type": [
7571
+ "string",
7572
+ "null"
7573
+ ]
7574
+ }
7575
+ },
7576
+ "required": [
7577
+ "period",
7578
+ "from",
7579
+ "to",
7580
+ "visitor_counting",
7581
+ "totals",
7582
+ "previous",
7583
+ "series",
7584
+ "pages",
7585
+ "sources",
7586
+ "countries",
7587
+ "devices",
7588
+ "browsers",
7589
+ "os",
7590
+ "bot_views",
7591
+ "updated_at"
7592
+ ],
7593
+ "additionalProperties": false
7594
+ },
7595
+ "request_id": {
7596
+ "type": "string"
7597
+ }
7598
+ },
7599
+ "required": [
7600
+ "data",
7601
+ "request_id"
7602
+ ]
7603
+ }
7604
+ }
7605
+ }
7606
+ },
7607
+ "400": {
7608
+ "$ref": "#/components/responses/Error400"
7609
+ },
7610
+ "401": {
7611
+ "$ref": "#/components/responses/Error401"
7612
+ },
7613
+ "402": {
7614
+ "$ref": "#/components/responses/Error402"
7615
+ },
7616
+ "403": {
7617
+ "$ref": "#/components/responses/Error403"
7618
+ },
7619
+ "404": {
7620
+ "$ref": "#/components/responses/Error404"
7621
+ },
7622
+ "409": {
7623
+ "$ref": "#/components/responses/Error409"
7624
+ },
7625
+ "410": {
7626
+ "$ref": "#/components/responses/Error410"
7627
+ },
7628
+ "413": {
7629
+ "$ref": "#/components/responses/Error413"
7630
+ },
7631
+ "422": {
7632
+ "$ref": "#/components/responses/Error422"
7633
+ },
7634
+ "429": {
7635
+ "$ref": "#/components/responses/Error429"
7636
+ },
7637
+ "500": {
7638
+ "$ref": "#/components/responses/Error500"
7639
+ },
7640
+ "503": {
7641
+ "$ref": "#/components/responses/Error503"
7642
+ }
7643
+ }
7644
+ },
7645
+ {
7646
+ "operation_id": "getSiteConsent",
7647
+ "method": "GET",
7648
+ "path": "/v1/sites/{site_id}/consent",
7649
+ "summary": "Read a site's cookie consent",
7650
+ "description": "Costs no credits. What the live site asks visitors about, which services it holds back, which it does not know, and how many proofs are kept. Atelier201 keeps proofs; it never certifies a site as compliant.",
7651
+ "authentication_required": true,
7652
+ "scope": "sites:read",
7653
+ "surfaces": {
7654
+ "cli": "atelier201 consent status",
7655
+ "mcp": "get_site_consent"
7656
+ },
7657
+ "parameters": [
7658
+ {
7659
+ "name": "site_id",
7660
+ "in": "path",
7661
+ "required": true,
7662
+ "schema": {
7663
+ "type": "string"
7664
+ },
7665
+ "description": "The site's id, or its slug (the address before .atelier201.page)."
7666
+ }
7667
+ ],
7668
+ "request_body": null,
7669
+ "responses": {
7670
+ "200": {
7671
+ "description": "Read a site's cookie consent",
7672
+ "content": {
7673
+ "application/json": {
7674
+ "schema": {
7675
+ "type": "object",
7676
+ "properties": {
7677
+ "data": {
7678
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
7679
+ "type": "object",
7680
+ "properties": {
7681
+ "enabled": {
7682
+ "type": "boolean",
7683
+ "description": "The owner's choice. Off until someone turns it on."
7684
+ },
7685
+ "applies_at_next_publication": {
7686
+ "type": "boolean",
7687
+ "description": "The choice differs from what the live site does. It reaches visitors with the next publication."
7688
+ },
7689
+ "state": {
7690
+ "type": "string",
7691
+ "enum": [
7692
+ "not_published",
7693
+ "off",
7694
+ "nothing_to_ask",
7695
+ "asking",
7696
+ "own_tool"
7697
+ ],
7698
+ "description": "What the live site does: nothing published yet, consent off, no third party to ask about, a banner asks, or a consent tool of the owner's own."
7699
+ },
7700
+ "own_tool": {
7701
+ "description": "The owner's consent tool found in the latest build. Atelier201 then keeps no proof.",
7702
+ "type": [
7703
+ "string",
7704
+ "null"
7705
+ ]
7706
+ },
7707
+ "banner": {
7708
+ "anyOf": [
7709
+ {
7710
+ "type": "string",
7711
+ "enum": [
7712
+ "standard",
7713
+ "custom"
7714
+ ]
7715
+ },
7716
+ {
7717
+ "type": "null"
7718
+ }
7719
+ ],
7720
+ "description": "Which banner the live site shows. Null when it shows none."
7721
+ },
7722
+ "third_parties": {
7723
+ "type": "array",
7724
+ "items": {
7725
+ "type": "object",
7726
+ "properties": {
7727
+ "name": {
7728
+ "type": "string"
7729
+ },
7730
+ "category": {
7731
+ "type": "string",
7732
+ "enum": [
7733
+ "analytics",
7734
+ "marketing",
7735
+ "media",
7736
+ "none"
7737
+ ],
7738
+ "description": "What it waits for. none: it stores nothing on the device, so it asks for nothing."
7739
+ }
7740
+ },
7741
+ "required": [
7742
+ "name",
7743
+ "category"
7744
+ ],
7745
+ "additionalProperties": false
7746
+ },
7747
+ "description": "The known services in the latest build of the site, whether consent is on or off."
7748
+ },
7749
+ "unknown_hosts": {
7750
+ "type": "array",
7751
+ "items": {
7752
+ "type": "string"
7753
+ },
7754
+ "description": "Services nobody classified, in the latest build: they load for everyone until a tag says otherwise."
7755
+ },
7756
+ "categories": {
7757
+ "type": "array",
7758
+ "items": {
7759
+ "type": "string",
7760
+ "enum": [
7761
+ "analytics",
7762
+ "marketing",
7763
+ "media"
7764
+ ]
7765
+ },
7766
+ "description": "What visitors of the live site are asked about."
7767
+ },
7768
+ "addon": {
7769
+ "type": "object",
7770
+ "properties": {
7771
+ "active": {
7772
+ "type": "boolean"
7773
+ },
7774
+ "ends_at_period_end": {
7775
+ "type": "boolean"
7776
+ },
7777
+ "current_period_end": {
7778
+ "anyOf": [
7779
+ {
7780
+ "type": "string",
7781
+ "description": "ISO 8601, UTC."
7782
+ },
7783
+ {
7784
+ "type": "null"
7785
+ }
7786
+ ]
7787
+ },
7788
+ "price_eur": {
7789
+ "type": "number"
7790
+ }
7791
+ },
7792
+ "required": [
7793
+ "active",
7794
+ "ends_at_period_end",
7795
+ "current_period_end",
7796
+ "price_eur"
7797
+ ],
7798
+ "additionalProperties": false,
7799
+ "description": "The custom banner add-on. Bought in the dashboard."
7800
+ },
7801
+ "proofs": {
7802
+ "type": "object",
7803
+ "properties": {
7804
+ "total": {
7805
+ "type": "number",
7806
+ "description": "Decisions kept."
7807
+ },
7808
+ "first_at": {
7809
+ "anyOf": [
7810
+ {
7811
+ "type": "string",
7812
+ "description": "ISO 8601, UTC."
7813
+ },
7814
+ {
7815
+ "type": "null"
7816
+ }
7817
+ ]
7818
+ },
7819
+ "last_at": {
7820
+ "anyOf": [
7821
+ {
7822
+ "type": "string",
7823
+ "description": "ISO 8601, UTC."
7824
+ },
7825
+ {
7826
+ "type": "null"
7827
+ }
7828
+ ]
7829
+ },
7830
+ "last_30_days": {
7831
+ "type": "object",
7832
+ "properties": {
7833
+ "accept": {
7834
+ "type": "number"
7835
+ },
7836
+ "reject": {
7837
+ "type": "number"
7838
+ },
7839
+ "custom": {
7840
+ "type": "number"
7841
+ },
7842
+ "withdraw": {
7843
+ "type": "number"
7844
+ }
7845
+ },
7846
+ "required": [
7847
+ "accept",
7848
+ "reject",
7849
+ "custom",
7850
+ "withdraw"
7851
+ ],
7852
+ "additionalProperties": false
7853
+ },
7854
+ "versions": {
7855
+ "type": "number",
7856
+ "description": "Distinct versions of the banner and its third parties kept."
7857
+ },
7858
+ "retention_days": {
7859
+ "type": "number",
7860
+ "description": "How long a proof is kept before it is erased."
7861
+ }
7862
+ },
7863
+ "required": [
7864
+ "total",
7865
+ "first_at",
7866
+ "last_at",
7867
+ "last_30_days",
7868
+ "versions",
7869
+ "retention_days"
7870
+ ],
7871
+ "additionalProperties": false
7872
+ }
7873
+ },
7874
+ "required": [
7875
+ "enabled",
7876
+ "applies_at_next_publication",
7877
+ "state",
7878
+ "own_tool",
7879
+ "banner",
7880
+ "third_parties",
7881
+ "unknown_hosts",
7882
+ "categories",
7883
+ "addon",
7884
+ "proofs"
7885
+ ],
7886
+ "additionalProperties": false
7887
+ },
7888
+ "request_id": {
7889
+ "type": "string"
7890
+ }
7891
+ },
7892
+ "required": [
7893
+ "data",
7894
+ "request_id"
7895
+ ]
7896
+ }
7897
+ }
7898
+ }
7899
+ },
7900
+ "400": {
7901
+ "$ref": "#/components/responses/Error400"
7902
+ },
7903
+ "401": {
7904
+ "$ref": "#/components/responses/Error401"
7905
+ },
7906
+ "402": {
7907
+ "$ref": "#/components/responses/Error402"
7908
+ },
7909
+ "403": {
7910
+ "$ref": "#/components/responses/Error403"
7911
+ },
7912
+ "404": {
7913
+ "$ref": "#/components/responses/Error404"
7914
+ },
7915
+ "409": {
7916
+ "$ref": "#/components/responses/Error409"
7917
+ },
7918
+ "410": {
7919
+ "$ref": "#/components/responses/Error410"
7920
+ },
7921
+ "413": {
7922
+ "$ref": "#/components/responses/Error413"
7923
+ },
7924
+ "422": {
7925
+ "$ref": "#/components/responses/Error422"
7926
+ },
7927
+ "429": {
7928
+ "$ref": "#/components/responses/Error429"
7929
+ },
7930
+ "500": {
7931
+ "$ref": "#/components/responses/Error500"
7932
+ },
7933
+ "503": {
7934
+ "$ref": "#/components/responses/Error503"
7935
+ }
7936
+ }
7937
+ },
7938
+ {
7939
+ "operation_id": "setSiteConsent",
7940
+ "method": "PUT",
7941
+ "path": "/v1/sites/{site_id}/consent",
7942
+ "summary": "Turn a site's cookie consent on or off",
7943
+ "description": "Off until someone turns it on. On, third parties wait for each visitor's yes and each answer is kept as a proof. Off, the site asks nothing and its pages are not changed; proofs already kept stay until they expire. Starts a build; publish it to finish. No credits. Requires a workspace admin.",
7944
+ "authentication_required": true,
7945
+ "scope": "sites:write",
7946
+ "surfaces": {
7947
+ "cli": "atelier201 consent enable",
7948
+ "mcp": "set_site_consent"
7949
+ },
7950
+ "parameters": [
7951
+ {
7952
+ "name": "site_id",
7953
+ "in": "path",
7954
+ "required": true,
7955
+ "schema": {
7956
+ "type": "string"
7957
+ },
7958
+ "description": "The site's id, or its slug (the address before .atelier201.page)."
7959
+ }
7960
+ ],
7961
+ "request_body": {
7962
+ "required": true,
7963
+ "content": {
7964
+ "application/json": {
7965
+ "schema": {
7966
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
7967
+ "type": "object",
7968
+ "properties": {
7969
+ "enabled": {
7970
+ "type": "boolean",
7971
+ "description": "true: third parties wait for each visitor's yes, and each answer is kept as a proof. false: the site asks nothing and its pages are not changed."
7972
+ }
7973
+ },
7974
+ "required": [
7975
+ "enabled"
7976
+ ]
7977
+ }
7978
+ }
7979
+ }
7980
+ },
7981
+ "responses": {
7982
+ "200": {
7983
+ "description": "Turn a site's cookie consent on or off",
7984
+ "content": {
7985
+ "application/json": {
7986
+ "schema": {
7987
+ "type": "object",
7988
+ "properties": {
7989
+ "data": {
7990
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
7991
+ "type": "object",
7992
+ "properties": {
7993
+ "enabled": {
7994
+ "type": "boolean",
7995
+ "description": "The owner's choice. Off until someone turns it on."
7996
+ },
7997
+ "applies_at_next_publication": {
7998
+ "type": "boolean",
7999
+ "description": "The choice differs from what the live site does. It reaches visitors with the next publication."
8000
+ },
8001
+ "state": {
8002
+ "type": "string",
8003
+ "enum": [
8004
+ "not_published",
8005
+ "off",
8006
+ "nothing_to_ask",
8007
+ "asking",
8008
+ "own_tool"
8009
+ ],
8010
+ "description": "What the live site does: nothing published yet, consent off, no third party to ask about, a banner asks, or a consent tool of the owner's own."
8011
+ },
8012
+ "own_tool": {
8013
+ "description": "The owner's consent tool found in the latest build. Atelier201 then keeps no proof.",
8014
+ "type": [
8015
+ "string",
8016
+ "null"
8017
+ ]
8018
+ },
8019
+ "banner": {
8020
+ "anyOf": [
8021
+ {
8022
+ "type": "string",
8023
+ "enum": [
8024
+ "standard",
8025
+ "custom"
8026
+ ]
8027
+ },
8028
+ {
8029
+ "type": "null"
8030
+ }
8031
+ ],
8032
+ "description": "Which banner the live site shows. Null when it shows none."
8033
+ },
8034
+ "third_parties": {
8035
+ "type": "array",
8036
+ "items": {
8037
+ "type": "object",
8038
+ "properties": {
8039
+ "name": {
8040
+ "type": "string"
8041
+ },
8042
+ "category": {
8043
+ "type": "string",
8044
+ "enum": [
8045
+ "analytics",
8046
+ "marketing",
8047
+ "media",
8048
+ "none"
8049
+ ],
8050
+ "description": "What it waits for. none: it stores nothing on the device, so it asks for nothing."
8051
+ }
8052
+ },
8053
+ "required": [
8054
+ "name",
8055
+ "category"
8056
+ ],
8057
+ "additionalProperties": false
8058
+ },
8059
+ "description": "The known services in the latest build of the site, whether consent is on or off."
8060
+ },
8061
+ "unknown_hosts": {
8062
+ "type": "array",
8063
+ "items": {
8064
+ "type": "string"
8065
+ },
8066
+ "description": "Services nobody classified, in the latest build: they load for everyone until a tag says otherwise."
8067
+ },
8068
+ "categories": {
8069
+ "type": "array",
8070
+ "items": {
8071
+ "type": "string",
8072
+ "enum": [
8073
+ "analytics",
8074
+ "marketing",
8075
+ "media"
8076
+ ]
8077
+ },
8078
+ "description": "What visitors of the live site are asked about."
8079
+ },
8080
+ "addon": {
8081
+ "type": "object",
8082
+ "properties": {
8083
+ "active": {
8084
+ "type": "boolean"
8085
+ },
8086
+ "ends_at_period_end": {
8087
+ "type": "boolean"
8088
+ },
8089
+ "current_period_end": {
8090
+ "anyOf": [
8091
+ {
8092
+ "type": "string",
8093
+ "description": "ISO 8601, UTC."
8094
+ },
8095
+ {
8096
+ "type": "null"
8097
+ }
8098
+ ]
8099
+ },
8100
+ "price_eur": {
8101
+ "type": "number"
8102
+ }
8103
+ },
8104
+ "required": [
8105
+ "active",
8106
+ "ends_at_period_end",
8107
+ "current_period_end",
8108
+ "price_eur"
8109
+ ],
8110
+ "additionalProperties": false,
8111
+ "description": "The custom banner add-on. Bought in the dashboard."
8112
+ },
8113
+ "proofs": {
8114
+ "type": "object",
8115
+ "properties": {
8116
+ "total": {
8117
+ "type": "number",
8118
+ "description": "Decisions kept."
8119
+ },
8120
+ "first_at": {
8121
+ "anyOf": [
8122
+ {
8123
+ "type": "string",
8124
+ "description": "ISO 8601, UTC."
8125
+ },
8126
+ {
8127
+ "type": "null"
8128
+ }
8129
+ ]
8130
+ },
8131
+ "last_at": {
8132
+ "anyOf": [
8133
+ {
8134
+ "type": "string",
8135
+ "description": "ISO 8601, UTC."
8136
+ },
8137
+ {
8138
+ "type": "null"
8139
+ }
8140
+ ]
8141
+ },
8142
+ "last_30_days": {
8143
+ "type": "object",
8144
+ "properties": {
8145
+ "accept": {
8146
+ "type": "number"
8147
+ },
8148
+ "reject": {
8149
+ "type": "number"
8150
+ },
8151
+ "custom": {
8152
+ "type": "number"
8153
+ },
8154
+ "withdraw": {
8155
+ "type": "number"
8156
+ }
8157
+ },
8158
+ "required": [
8159
+ "accept",
8160
+ "reject",
8161
+ "custom",
8162
+ "withdraw"
8163
+ ],
8164
+ "additionalProperties": false
8165
+ },
8166
+ "versions": {
8167
+ "type": "number",
8168
+ "description": "Distinct versions of the banner and its third parties kept."
8169
+ },
8170
+ "retention_days": {
8171
+ "type": "number",
8172
+ "description": "How long a proof is kept before it is erased."
8173
+ }
8174
+ },
8175
+ "required": [
8176
+ "total",
8177
+ "first_at",
8178
+ "last_at",
8179
+ "last_30_days",
8180
+ "versions",
8181
+ "retention_days"
8182
+ ],
8183
+ "additionalProperties": false
8184
+ }
8185
+ },
8186
+ "required": [
8187
+ "enabled",
8188
+ "applies_at_next_publication",
8189
+ "state",
8190
+ "own_tool",
8191
+ "banner",
8192
+ "third_parties",
8193
+ "unknown_hosts",
8194
+ "categories",
8195
+ "addon",
8196
+ "proofs"
8197
+ ],
8198
+ "additionalProperties": false
8199
+ },
8200
+ "request_id": {
8201
+ "type": "string"
8202
+ }
8203
+ },
8204
+ "required": [
8205
+ "data",
8206
+ "request_id"
8207
+ ]
8208
+ }
8209
+ }
8210
+ }
8211
+ },
8212
+ "400": {
8213
+ "$ref": "#/components/responses/Error400"
8214
+ },
8215
+ "401": {
8216
+ "$ref": "#/components/responses/Error401"
8217
+ },
8218
+ "402": {
8219
+ "$ref": "#/components/responses/Error402"
8220
+ },
8221
+ "403": {
8222
+ "$ref": "#/components/responses/Error403"
8223
+ },
8224
+ "404": {
8225
+ "$ref": "#/components/responses/Error404"
8226
+ },
8227
+ "409": {
8228
+ "$ref": "#/components/responses/Error409"
8229
+ },
8230
+ "410": {
8231
+ "$ref": "#/components/responses/Error410"
8232
+ },
8233
+ "413": {
8234
+ "$ref": "#/components/responses/Error413"
8235
+ },
8236
+ "422": {
8237
+ "$ref": "#/components/responses/Error422"
8238
+ },
8239
+ "429": {
8240
+ "$ref": "#/components/responses/Error429"
8241
+ },
8242
+ "500": {
8243
+ "$ref": "#/components/responses/Error500"
8244
+ },
8245
+ "503": {
8246
+ "$ref": "#/components/responses/Error503"
8247
+ }
8248
+ }
8249
+ },
8250
+ {
8251
+ "operation_id": "listSiteConsentDecisions",
8252
+ "method": "GET",
8253
+ "path": "/v1/sites/{site_id}/consent/decisions",
8254
+ "summary": "List the consent decisions kept",
8255
+ "description": "Costs no credits. Newest first, one page at a time, or the one a visitor quotes by its reference. A decision says what a browser carrying this reference chose and when; nothing identifies the visitor.",
8256
+ "authentication_required": true,
8257
+ "scope": "sites:read",
8258
+ "surfaces": {
8259
+ "cli": "atelier201 consent decisions",
8260
+ "mcp": "list_consent_decisions"
8261
+ },
8262
+ "parameters": [
8263
+ {
8264
+ "name": "site_id",
8265
+ "in": "path",
8266
+ "required": true,
8267
+ "schema": {
8268
+ "type": "string"
8269
+ },
8270
+ "description": "The site's id, or its slug (the address before .atelier201.page)."
8271
+ },
8272
+ {
8273
+ "name": "reference",
8274
+ "in": "query",
8275
+ "required": false,
8276
+ "schema": {
8277
+ "description": "The reference a visitor quotes: finds that one decision.",
8278
+ "type": "string",
8279
+ "minLength": 16,
8280
+ "maxLength": 64
8281
+ }
8282
+ },
8283
+ {
8284
+ "name": "cursor",
8285
+ "in": "query",
8286
+ "required": false,
8287
+ "schema": {
8288
+ "description": "next_cursor of the previous page.",
8289
+ "type": "string",
8290
+ "maxLength": 128
8291
+ }
8292
+ },
8293
+ {
8294
+ "name": "limit",
8295
+ "in": "query",
8296
+ "required": false,
8297
+ "schema": {
8298
+ "description": "Decisions per page. Default 50.",
8299
+ "type": "integer",
8300
+ "minimum": 1,
8301
+ "maximum": 500
8302
+ }
8303
+ }
8304
+ ],
8305
+ "request_body": null,
8306
+ "responses": {
8307
+ "200": {
8308
+ "description": "List the consent decisions kept",
8309
+ "content": {
8310
+ "application/json": {
8311
+ "schema": {
8312
+ "type": "object",
8313
+ "properties": {
8314
+ "data": {
8315
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
8316
+ "type": "object",
8317
+ "properties": {
8318
+ "decisions": {
8319
+ "type": "array",
8320
+ "items": {
8321
+ "type": "object",
8322
+ "properties": {
8323
+ "reference": {
6843
8324
  "type": "string"
6844
8325
  },
6845
- "views": {
6846
- "type": "number"
8326
+ "at": {
8327
+ "type": "string",
8328
+ "description": "The server's date of the decision."
6847
8329
  },
6848
- "visitors": {
6849
- "type": [
6850
- "number",
6851
- "null"
8330
+ "action": {
8331
+ "type": "string",
8332
+ "enum": [
8333
+ "accept",
8334
+ "reject",
8335
+ "custom",
8336
+ "withdraw"
6852
8337
  ]
6853
- }
6854
- },
6855
- "required": [
6856
- "key",
6857
- "views",
6858
- "visitors"
6859
- ],
6860
- "additionalProperties": false
6861
- }
6862
- },
6863
- "browsers": {
6864
- "type": "array",
6865
- "items": {
6866
- "type": "object",
6867
- "properties": {
6868
- "key": {
6869
- "type": "string"
6870
8338
  },
6871
- "views": {
6872
- "type": "number"
8339
+ "granted": {
8340
+ "type": "array",
8341
+ "items": {
8342
+ "type": "string",
8343
+ "enum": [
8344
+ "analytics",
8345
+ "marketing",
8346
+ "media"
8347
+ ]
8348
+ },
8349
+ "description": "What the visitor said yes to. Empty for a refusal."
6873
8350
  },
6874
- "visitors": {
6875
- "type": [
6876
- "number",
6877
- "null"
6878
- ]
8351
+ "build_id": {
8352
+ "type": "string",
8353
+ "description": "The build that showed the banner: list_consent_versions says what it showed."
8354
+ },
8355
+ "locale": {
8356
+ "type": "string"
8357
+ },
8358
+ "country": {
8359
+ "type": "string",
8360
+ "description": "Two letters, XX when unknown. No address is ever kept."
6879
8361
  }
6880
8362
  },
6881
8363
  "required": [
6882
- "key",
6883
- "views",
6884
- "visitors"
8364
+ "reference",
8365
+ "at",
8366
+ "action",
8367
+ "granted",
8368
+ "build_id",
8369
+ "locale",
8370
+ "country"
6885
8371
  ],
6886
8372
  "additionalProperties": false
6887
8373
  }
6888
8374
  },
6889
- "os": {
8375
+ "next_cursor": {
8376
+ "type": [
8377
+ "string",
8378
+ "null"
8379
+ ]
8380
+ }
8381
+ },
8382
+ "required": [
8383
+ "decisions",
8384
+ "next_cursor"
8385
+ ],
8386
+ "additionalProperties": false
8387
+ },
8388
+ "request_id": {
8389
+ "type": "string"
8390
+ }
8391
+ },
8392
+ "required": [
8393
+ "data",
8394
+ "request_id"
8395
+ ]
8396
+ }
8397
+ }
8398
+ }
8399
+ },
8400
+ "400": {
8401
+ "$ref": "#/components/responses/Error400"
8402
+ },
8403
+ "401": {
8404
+ "$ref": "#/components/responses/Error401"
8405
+ },
8406
+ "402": {
8407
+ "$ref": "#/components/responses/Error402"
8408
+ },
8409
+ "403": {
8410
+ "$ref": "#/components/responses/Error403"
8411
+ },
8412
+ "404": {
8413
+ "$ref": "#/components/responses/Error404"
8414
+ },
8415
+ "409": {
8416
+ "$ref": "#/components/responses/Error409"
8417
+ },
8418
+ "410": {
8419
+ "$ref": "#/components/responses/Error410"
8420
+ },
8421
+ "413": {
8422
+ "$ref": "#/components/responses/Error413"
8423
+ },
8424
+ "422": {
8425
+ "$ref": "#/components/responses/Error422"
8426
+ },
8427
+ "429": {
8428
+ "$ref": "#/components/responses/Error429"
8429
+ },
8430
+ "500": {
8431
+ "$ref": "#/components/responses/Error500"
8432
+ },
8433
+ "503": {
8434
+ "$ref": "#/components/responses/Error503"
8435
+ }
8436
+ }
8437
+ },
8438
+ {
8439
+ "operation_id": "listSiteConsentVersions",
8440
+ "method": "GET",
8441
+ "path": "/v1/sites/{site_id}/consent/versions",
8442
+ "summary": "List what each publication showed",
8443
+ "description": "Costs no credits. The banner, its texts and the third parties of each publication, with its commit: what a decision was made in front of.",
8444
+ "authentication_required": true,
8445
+ "scope": "sites:read",
8446
+ "surfaces": {
8447
+ "cli": "atelier201 consent versions",
8448
+ "mcp": "list_consent_versions"
8449
+ },
8450
+ "parameters": [
8451
+ {
8452
+ "name": "site_id",
8453
+ "in": "path",
8454
+ "required": true,
8455
+ "schema": {
8456
+ "type": "string"
8457
+ },
8458
+ "description": "The site's id, or its slug (the address before .atelier201.page)."
8459
+ },
8460
+ {
8461
+ "name": "build_id",
8462
+ "in": "query",
8463
+ "required": false,
8464
+ "schema": {
8465
+ "description": "The build a decision points at. Default: the latest publications.",
8466
+ "type": "string",
8467
+ "maxLength": 64
8468
+ }
8469
+ }
8470
+ ],
8471
+ "request_body": null,
8472
+ "responses": {
8473
+ "200": {
8474
+ "description": "List what each publication showed",
8475
+ "content": {
8476
+ "application/json": {
8477
+ "schema": {
8478
+ "type": "object",
8479
+ "properties": {
8480
+ "data": {
8481
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
8482
+ "type": "object",
8483
+ "properties": {
8484
+ "versions": {
6890
8485
  "type": "array",
6891
8486
  "items": {
6892
8487
  "type": "object",
6893
8488
  "properties": {
6894
- "key": {
8489
+ "build_id": {
6895
8490
  "type": "string"
6896
8491
  },
6897
- "views": {
6898
- "type": "number"
8492
+ "hash": {
8493
+ "type": "string",
8494
+ "description": "Fingerprint of what follows: two publications showing the same thing share it."
6899
8495
  },
6900
- "visitors": {
8496
+ "commit": {
8497
+ "type": "string",
8498
+ "description": "The Git commit published."
8499
+ },
8500
+ "published_at": {
8501
+ "type": "string",
8502
+ "description": "ISO 8601, UTC."
8503
+ },
8504
+ "revision": {
8505
+ "type": "string",
8506
+ "description": "The version of Atelier201's banner and script."
8507
+ },
8508
+ "third_parties": {
8509
+ "type": "array",
8510
+ "items": {
8511
+ "type": "object",
8512
+ "properties": {
8513
+ "name": {
8514
+ "type": "string"
8515
+ },
8516
+ "category": {
8517
+ "type": "string",
8518
+ "enum": [
8519
+ "analytics",
8520
+ "marketing",
8521
+ "media",
8522
+ "none"
8523
+ ],
8524
+ "description": "What it waits for. none: it stores nothing on the device, so it asks for nothing."
8525
+ }
8526
+ },
8527
+ "required": [
8528
+ "name",
8529
+ "category"
8530
+ ],
8531
+ "additionalProperties": false
8532
+ }
8533
+ },
8534
+ "unknown_hosts": {
8535
+ "type": "array",
8536
+ "items": {
8537
+ "type": "string"
8538
+ }
8539
+ },
8540
+ "categories": {
8541
+ "type": "array",
8542
+ "items": {
8543
+ "type": "string",
8544
+ "enum": [
8545
+ "analytics",
8546
+ "marketing",
8547
+ "media"
8548
+ ]
8549
+ }
8550
+ },
8551
+ "own_tool": {
6901
8552
  "type": [
6902
- "number",
8553
+ "string",
6903
8554
  "null"
6904
8555
  ]
8556
+ },
8557
+ "custom_banner": {
8558
+ "type": "boolean"
8559
+ },
8560
+ "banners": {
8561
+ "type": "object",
8562
+ "propertyNames": {
8563
+ "type": "string"
8564
+ },
8565
+ "additionalProperties": {
8566
+ "type": "string"
8567
+ },
8568
+ "description": "The banner's markup, by language and categories."
6905
8569
  }
6906
8570
  },
6907
8571
  "required": [
6908
- "key",
6909
- "views",
6910
- "visitors"
8572
+ "build_id",
8573
+ "hash",
8574
+ "commit",
8575
+ "published_at",
8576
+ "revision",
8577
+ "third_parties",
8578
+ "unknown_hosts",
8579
+ "categories",
8580
+ "own_tool",
8581
+ "custom_banner",
8582
+ "banners"
6911
8583
  ],
6912
8584
  "additionalProperties": false
6913
8585
  }
6914
- },
6915
- "bot_views": {
6916
- "type": "number",
6917
- "description": "Views by bots, kept apart from every figure above."
6918
- },
6919
- "updated_at": {
6920
- "description": "When the last full day was rolled up. Null before the first night.",
6921
- "type": [
6922
- "string",
6923
- "null"
6924
- ]
6925
8586
  }
6926
8587
  },
6927
8588
  "required": [
6928
- "period",
6929
- "from",
6930
- "to",
6931
- "visitor_counting",
6932
- "totals",
6933
- "previous",
6934
- "series",
6935
- "pages",
6936
- "sources",
6937
- "countries",
6938
- "devices",
6939
- "browsers",
6940
- "os",
6941
- "bot_views",
6942
- "updated_at"
8589
+ "versions"
6943
8590
  ],
6944
8591
  "additionalProperties": false
6945
8592
  },
@@ -7876,6 +9523,19 @@ export const API_OPERATIONS = [
7876
9523
  "null"
7877
9524
  ]
7878
9525
  },
9526
+ "version": {
9527
+ "anyOf": [
9528
+ {
9529
+ "type": "integer",
9530
+ "minimum": -9007199254740991,
9531
+ "maximum": 9007199254740991
9532
+ },
9533
+ {
9534
+ "type": "null"
9535
+ }
9536
+ ],
9537
+ "description": "The number of the version this publication put online. Null when it took the site offline."
9538
+ },
7879
9539
  "previous_build_id": {
7880
9540
  "type": [
7881
9541
  "string",
@@ -7895,6 +9555,7 @@ export const API_OPERATIONS = [
7895
9555
  "generation",
7896
9556
  "kind",
7897
9557
  "build_id",
9558
+ "version",
7898
9559
  "previous_build_id",
7899
9560
  "author",
7900
9561
  "created_at"