@atelier201/cli 0.14.0 → 0.15.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/README.md +4 -0
- package/dist/api-types.generated.js.map +1 -1
- package/dist/commands/api.js +10 -1
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/content.js +1 -1
- package/dist/commands/content.js.map +1 -1
- package/dist/commands/settings.js +58 -0
- package/dist/commands/settings.js.map +1 -0
- package/dist/http.js +12 -1
- package/dist/http.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/operations.generated.js +730 -155
- package/dist/operations.generated.js.map +1 -1
- package/package.json +1 -1
|
@@ -17352,6 +17352,42 @@ export const API_OPERATIONS = [
|
|
|
17352
17352
|
],
|
|
17353
17353
|
"additionalProperties": {}
|
|
17354
17354
|
}
|
|
17355
|
+
},
|
|
17356
|
+
"settings": {
|
|
17357
|
+
"description": "The settings the owner sees, as site.config.json declares them: get_site_settings reads them with their values.",
|
|
17358
|
+
"type": "array",
|
|
17359
|
+
"items": {
|
|
17360
|
+
"type": "object",
|
|
17361
|
+
"properties": {
|
|
17362
|
+
"id": {
|
|
17363
|
+
"type": "string"
|
|
17364
|
+
},
|
|
17365
|
+
"label": {
|
|
17366
|
+
"type": "string"
|
|
17367
|
+
},
|
|
17368
|
+
"fields": {
|
|
17369
|
+
"type": "array",
|
|
17370
|
+
"items": {
|
|
17371
|
+
"type": "object",
|
|
17372
|
+
"properties": {
|
|
17373
|
+
"field": {
|
|
17374
|
+
"type": "string"
|
|
17375
|
+
}
|
|
17376
|
+
},
|
|
17377
|
+
"required": [
|
|
17378
|
+
"field"
|
|
17379
|
+
],
|
|
17380
|
+
"additionalProperties": {}
|
|
17381
|
+
}
|
|
17382
|
+
}
|
|
17383
|
+
},
|
|
17384
|
+
"required": [
|
|
17385
|
+
"id",
|
|
17386
|
+
"label",
|
|
17387
|
+
"fields"
|
|
17388
|
+
],
|
|
17389
|
+
"additionalProperties": {}
|
|
17390
|
+
}
|
|
17355
17391
|
}
|
|
17356
17392
|
},
|
|
17357
17393
|
"required": [
|
|
@@ -18506,16 +18542,16 @@ export const API_OPERATIONS = [
|
|
|
18506
18542
|
}
|
|
18507
18543
|
},
|
|
18508
18544
|
{
|
|
18509
|
-
"operation_id": "
|
|
18510
|
-
"method": "
|
|
18511
|
-
"path": "/v1/sites/{site_id}/
|
|
18512
|
-
"summary": "
|
|
18513
|
-
"description": "
|
|
18545
|
+
"operation_id": "getSiteSettings",
|
|
18546
|
+
"method": "GET",
|
|
18547
|
+
"path": "/v1/sites/{site_id}/settings",
|
|
18548
|
+
"summary": "Read the site's settings",
|
|
18549
|
+
"description": "The settings the owner sees in Content, Customize: sections the site's agent chose, each field with its address (<singleton>:<JSON pointer>), label, widget (color, font, image, select...) and current value. Empty when the site declares none (site.config.json, `settings`). Costs nothing.",
|
|
18514
18550
|
"authentication_required": true,
|
|
18515
|
-
"scope": "sites:
|
|
18551
|
+
"scope": "sites:read",
|
|
18516
18552
|
"surfaces": {
|
|
18517
|
-
"cli": "atelier201
|
|
18518
|
-
"mcp": "
|
|
18553
|
+
"cli": "atelier201 settings get",
|
|
18554
|
+
"mcp": "get_site_settings"
|
|
18519
18555
|
},
|
|
18520
18556
|
"parameters": [
|
|
18521
18557
|
{
|
|
@@ -18528,52 +18564,10 @@ export const API_OPERATIONS = [
|
|
|
18528
18564
|
"description": "The site's id, or its slug (the address before .atelier201.page)."
|
|
18529
18565
|
}
|
|
18530
18566
|
],
|
|
18531
|
-
"request_body":
|
|
18532
|
-
"required": true,
|
|
18533
|
-
"content": {
|
|
18534
|
-
"application/json": {
|
|
18535
|
-
"schema": {
|
|
18536
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
18537
|
-
"type": "object",
|
|
18538
|
-
"properties": {
|
|
18539
|
-
"find": {
|
|
18540
|
-
"type": "string",
|
|
18541
|
-
"minLength": 1,
|
|
18542
|
-
"maxLength": 2000,
|
|
18543
|
-
"description": "The text to change, exactly as it reads on the page or in the file (case and punctuation included)."
|
|
18544
|
-
},
|
|
18545
|
-
"replace": {
|
|
18546
|
-
"type": "string",
|
|
18547
|
-
"maxLength": 5000,
|
|
18548
|
-
"description": "The new text. Empty removes the passage."
|
|
18549
|
-
},
|
|
18550
|
-
"path": {
|
|
18551
|
-
"description": "Only in this file (or glob, e.g. src/pages/*.astro), when the text appears in several.",
|
|
18552
|
-
"type": "string",
|
|
18553
|
-
"maxLength": 300
|
|
18554
|
-
},
|
|
18555
|
-
"all": {
|
|
18556
|
-
"description": "Change every occurrence (a renamed product, a new phone number). Default: refuse when the text appears more than once.",
|
|
18557
|
-
"type": "boolean"
|
|
18558
|
-
},
|
|
18559
|
-
"summary": {
|
|
18560
|
-
"description": "One sentence for the history. Default: Change \"<text>\".",
|
|
18561
|
-
"type": "string",
|
|
18562
|
-
"maxLength": 200
|
|
18563
|
-
}
|
|
18564
|
-
},
|
|
18565
|
-
"required": [
|
|
18566
|
-
"find",
|
|
18567
|
-
"replace"
|
|
18568
|
-
],
|
|
18569
|
-
"additionalProperties": false
|
|
18570
|
-
}
|
|
18571
|
-
}
|
|
18572
|
-
}
|
|
18573
|
-
},
|
|
18567
|
+
"request_body": null,
|
|
18574
18568
|
"responses": {
|
|
18575
18569
|
"200": {
|
|
18576
|
-
"description": "
|
|
18570
|
+
"description": "Read the site's settings",
|
|
18577
18571
|
"content": {
|
|
18578
18572
|
"application/json": {
|
|
18579
18573
|
"schema": {
|
|
@@ -18583,40 +18577,7 @@ export const API_OPERATIONS = [
|
|
|
18583
18577
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
18584
18578
|
"type": "object",
|
|
18585
18579
|
"properties": {
|
|
18586
|
-
"replaced": {
|
|
18587
|
-
"type": "integer",
|
|
18588
|
-
"minimum": -9007199254740991,
|
|
18589
|
-
"maximum": 9007199254740991,
|
|
18590
|
-
"description": "How many occurrences changed."
|
|
18591
|
-
},
|
|
18592
|
-
"files": {
|
|
18593
|
-
"type": "array",
|
|
18594
|
-
"items": {
|
|
18595
|
-
"type": "object",
|
|
18596
|
-
"properties": {
|
|
18597
|
-
"path": {
|
|
18598
|
-
"type": "string"
|
|
18599
|
-
},
|
|
18600
|
-
"occurrences": {
|
|
18601
|
-
"type": "integer",
|
|
18602
|
-
"minimum": -9007199254740991,
|
|
18603
|
-
"maximum": 9007199254740991
|
|
18604
|
-
}
|
|
18605
|
-
},
|
|
18606
|
-
"required": [
|
|
18607
|
-
"path",
|
|
18608
|
-
"occurrences"
|
|
18609
|
-
],
|
|
18610
|
-
"additionalProperties": false
|
|
18611
|
-
}
|
|
18612
|
-
},
|
|
18613
18580
|
"revision": {
|
|
18614
|
-
"type": "string",
|
|
18615
|
-
"minLength": 40,
|
|
18616
|
-
"maxLength": 40,
|
|
18617
|
-
"description": "A Git commit id (40 hex characters) of the site's repository."
|
|
18618
|
-
},
|
|
18619
|
-
"parent": {
|
|
18620
18581
|
"anyOf": [
|
|
18621
18582
|
{
|
|
18622
18583
|
"type": "string",
|
|
@@ -18629,69 +18590,120 @@ export const API_OPERATIONS = [
|
|
|
18629
18590
|
}
|
|
18630
18591
|
]
|
|
18631
18592
|
},
|
|
18632
|
-
"
|
|
18633
|
-
"type": "boolean"
|
|
18634
|
-
},
|
|
18635
|
-
"changes": {
|
|
18593
|
+
"sections": {
|
|
18636
18594
|
"type": "array",
|
|
18637
18595
|
"items": {
|
|
18638
18596
|
"type": "object",
|
|
18639
18597
|
"properties": {
|
|
18640
|
-
"
|
|
18598
|
+
"id": {
|
|
18641
18599
|
"type": "string"
|
|
18642
18600
|
},
|
|
18643
|
-
"
|
|
18601
|
+
"label": {
|
|
18644
18602
|
"type": "string"
|
|
18603
|
+
},
|
|
18604
|
+
"description": {
|
|
18605
|
+
"type": [
|
|
18606
|
+
"string",
|
|
18607
|
+
"null"
|
|
18608
|
+
]
|
|
18609
|
+
},
|
|
18610
|
+
"icon": {
|
|
18611
|
+
"type": [
|
|
18612
|
+
"string",
|
|
18613
|
+
"null"
|
|
18614
|
+
]
|
|
18615
|
+
},
|
|
18616
|
+
"fields": {
|
|
18617
|
+
"type": "array",
|
|
18618
|
+
"items": {
|
|
18619
|
+
"type": "object",
|
|
18620
|
+
"properties": {
|
|
18621
|
+
"field": {
|
|
18622
|
+
"type": "string",
|
|
18623
|
+
"description": "The address, <singleton>:<JSON pointer>, as on the page: theme:/colors/primary."
|
|
18624
|
+
},
|
|
18625
|
+
"label": {
|
|
18626
|
+
"type": "string"
|
|
18627
|
+
},
|
|
18628
|
+
"description": {
|
|
18629
|
+
"type": [
|
|
18630
|
+
"string",
|
|
18631
|
+
"null"
|
|
18632
|
+
]
|
|
18633
|
+
},
|
|
18634
|
+
"widget": {
|
|
18635
|
+
"type": "string",
|
|
18636
|
+
"enum": [
|
|
18637
|
+
"text",
|
|
18638
|
+
"longtext",
|
|
18639
|
+
"color",
|
|
18640
|
+
"font",
|
|
18641
|
+
"image",
|
|
18642
|
+
"url",
|
|
18643
|
+
"email",
|
|
18644
|
+
"number",
|
|
18645
|
+
"toggle",
|
|
18646
|
+
"select",
|
|
18647
|
+
"date",
|
|
18648
|
+
"list",
|
|
18649
|
+
"group"
|
|
18650
|
+
],
|
|
18651
|
+
"description": "How the editor shows it: a colour picker for color, the font catalogue for font, the media library for image, a list for select."
|
|
18652
|
+
},
|
|
18653
|
+
"options": {
|
|
18654
|
+
"anyOf": [
|
|
18655
|
+
{
|
|
18656
|
+
"type": "array",
|
|
18657
|
+
"items": {
|
|
18658
|
+
"type": "string"
|
|
18659
|
+
}
|
|
18660
|
+
},
|
|
18661
|
+
{
|
|
18662
|
+
"type": "null"
|
|
18663
|
+
}
|
|
18664
|
+
],
|
|
18665
|
+
"description": "The choices of a select."
|
|
18666
|
+
},
|
|
18667
|
+
"required": {
|
|
18668
|
+
"type": "boolean"
|
|
18669
|
+
},
|
|
18670
|
+
"value": {
|
|
18671
|
+
"description": "The current value; null when the singleton does not have it yet."
|
|
18672
|
+
},
|
|
18673
|
+
"hash": {
|
|
18674
|
+
"type": "string",
|
|
18675
|
+
"description": "The singleton file's hash: send it back in expected_hashes to refuse a change made meanwhile."
|
|
18676
|
+
}
|
|
18677
|
+
},
|
|
18678
|
+
"required": [
|
|
18679
|
+
"field",
|
|
18680
|
+
"label",
|
|
18681
|
+
"description",
|
|
18682
|
+
"widget",
|
|
18683
|
+
"options",
|
|
18684
|
+
"required",
|
|
18685
|
+
"value",
|
|
18686
|
+
"hash"
|
|
18687
|
+
],
|
|
18688
|
+
"additionalProperties": false
|
|
18689
|
+
}
|
|
18645
18690
|
}
|
|
18646
18691
|
},
|
|
18647
18692
|
"required": [
|
|
18648
|
-
"
|
|
18649
|
-
"
|
|
18693
|
+
"id",
|
|
18694
|
+
"label",
|
|
18695
|
+
"description",
|
|
18696
|
+
"icon",
|
|
18697
|
+
"fields"
|
|
18650
18698
|
],
|
|
18651
18699
|
"additionalProperties": false
|
|
18652
|
-
}
|
|
18653
|
-
|
|
18654
|
-
"build": {
|
|
18655
|
-
"anyOf": [
|
|
18656
|
-
{
|
|
18657
|
-
"type": "object",
|
|
18658
|
-
"properties": {
|
|
18659
|
-
"id": {
|
|
18660
|
-
"type": "string"
|
|
18661
|
-
},
|
|
18662
|
-
"state": {
|
|
18663
|
-
"type": "string"
|
|
18664
|
-
},
|
|
18665
|
-
"next_action": {
|
|
18666
|
-
"type": "string"
|
|
18667
|
-
}
|
|
18668
|
-
},
|
|
18669
|
-
"required": [
|
|
18670
|
-
"id",
|
|
18671
|
-
"state",
|
|
18672
|
-
"next_action"
|
|
18673
|
-
],
|
|
18674
|
-
"additionalProperties": false
|
|
18675
|
-
},
|
|
18676
|
-
{
|
|
18677
|
-
"type": "null"
|
|
18678
|
-
}
|
|
18679
|
-
],
|
|
18680
|
-
"description": "The build this change started (or joined): the preview follows it. No build_site call needed."
|
|
18681
|
-
},
|
|
18682
|
-
"next_action": {
|
|
18683
|
-
"type": "string"
|
|
18700
|
+
},
|
|
18701
|
+
"description": "In the order the site declares them. Empty when the site exposes no settings: they are declared in site.config.json (the settings manual)."
|
|
18684
18702
|
}
|
|
18685
18703
|
},
|
|
18686
18704
|
"required": [
|
|
18687
|
-
"replaced",
|
|
18688
|
-
"files",
|
|
18689
18705
|
"revision",
|
|
18690
|
-
"
|
|
18691
|
-
"changed",
|
|
18692
|
-
"changes",
|
|
18693
|
-
"build",
|
|
18694
|
-
"next_action"
|
|
18706
|
+
"sections"
|
|
18695
18707
|
],
|
|
18696
18708
|
"additionalProperties": false
|
|
18697
18709
|
},
|
|
@@ -18746,16 +18758,16 @@ export const API_OPERATIONS = [
|
|
|
18746
18758
|
}
|
|
18747
18759
|
},
|
|
18748
18760
|
{
|
|
18749
|
-
"operation_id": "
|
|
18750
|
-
"method": "
|
|
18751
|
-
"path": "/v1/sites/{site_id}/
|
|
18752
|
-
"summary": "Change
|
|
18753
|
-
"description": "Sets
|
|
18761
|
+
"operation_id": "updateSiteSettings",
|
|
18762
|
+
"method": "PATCH",
|
|
18763
|
+
"path": "/v1/sites/{site_id}/settings",
|
|
18764
|
+
"summary": "Change several settings at once",
|
|
18765
|
+
"description": "Sets settings getSiteSettings listed, in ONE history entry, each singleton validated after the change, and starts the build. Only declared settings: another field is changed with setContentField. Costs no credits; changes the draft only.",
|
|
18754
18766
|
"authentication_required": true,
|
|
18755
18767
|
"scope": "sites:write",
|
|
18756
18768
|
"surfaces": {
|
|
18757
|
-
"cli": "atelier201
|
|
18758
|
-
"mcp": "
|
|
18769
|
+
"cli": "atelier201 settings set",
|
|
18770
|
+
"mcp": "update_site_settings"
|
|
18759
18771
|
},
|
|
18760
18772
|
"parameters": [
|
|
18761
18773
|
{
|
|
@@ -18776,21 +18788,576 @@ export const API_OPERATIONS = [
|
|
|
18776
18788
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
18777
18789
|
"type": "object",
|
|
18778
18790
|
"properties": {
|
|
18779
|
-
"
|
|
18780
|
-
"
|
|
18781
|
-
"
|
|
18782
|
-
"
|
|
18783
|
-
"
|
|
18784
|
-
|
|
18785
|
-
|
|
18786
|
-
|
|
18787
|
-
|
|
18788
|
-
|
|
18789
|
-
|
|
18790
|
-
|
|
18791
|
-
|
|
18792
|
-
"
|
|
18793
|
-
},
|
|
18791
|
+
"values": {
|
|
18792
|
+
"minItems": 1,
|
|
18793
|
+
"maxItems": 100,
|
|
18794
|
+
"type": "array",
|
|
18795
|
+
"items": {
|
|
18796
|
+
"type": "object",
|
|
18797
|
+
"properties": {
|
|
18798
|
+
"field": {
|
|
18799
|
+
"type": "string",
|
|
18800
|
+
"minLength": 3,
|
|
18801
|
+
"maxLength": 200,
|
|
18802
|
+
"description": "A setting's address, as get_site_settings lists it."
|
|
18803
|
+
},
|
|
18804
|
+
"value": {}
|
|
18805
|
+
},
|
|
18806
|
+
"required": [
|
|
18807
|
+
"field",
|
|
18808
|
+
"value"
|
|
18809
|
+
],
|
|
18810
|
+
"additionalProperties": false
|
|
18811
|
+
},
|
|
18812
|
+
"description": "The settings to change, with their new values. Only listed settings; another field of a singleton is changed with set_field."
|
|
18813
|
+
},
|
|
18814
|
+
"expected_hashes": {
|
|
18815
|
+
"description": "By singleton, the hash get_site_settings returned: the change is refused if that file changed meanwhile.",
|
|
18816
|
+
"type": "object",
|
|
18817
|
+
"propertyNames": {
|
|
18818
|
+
"type": "string"
|
|
18819
|
+
},
|
|
18820
|
+
"additionalProperties": {
|
|
18821
|
+
"type": "string"
|
|
18822
|
+
}
|
|
18823
|
+
}
|
|
18824
|
+
},
|
|
18825
|
+
"required": [
|
|
18826
|
+
"values"
|
|
18827
|
+
],
|
|
18828
|
+
"additionalProperties": false
|
|
18829
|
+
}
|
|
18830
|
+
}
|
|
18831
|
+
}
|
|
18832
|
+
},
|
|
18833
|
+
"responses": {
|
|
18834
|
+
"200": {
|
|
18835
|
+
"description": "Change several settings at once",
|
|
18836
|
+
"content": {
|
|
18837
|
+
"application/json": {
|
|
18838
|
+
"schema": {
|
|
18839
|
+
"type": "object",
|
|
18840
|
+
"properties": {
|
|
18841
|
+
"data": {
|
|
18842
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
18843
|
+
"type": "object",
|
|
18844
|
+
"properties": {
|
|
18845
|
+
"updated": {
|
|
18846
|
+
"type": "array",
|
|
18847
|
+
"items": {
|
|
18848
|
+
"type": "string"
|
|
18849
|
+
},
|
|
18850
|
+
"description": "The addresses whose value changed."
|
|
18851
|
+
},
|
|
18852
|
+
"revision": {
|
|
18853
|
+
"type": "string",
|
|
18854
|
+
"minLength": 40,
|
|
18855
|
+
"maxLength": 40,
|
|
18856
|
+
"description": "A Git commit id (40 hex characters) of the site's repository."
|
|
18857
|
+
},
|
|
18858
|
+
"changed": {
|
|
18859
|
+
"type": "boolean"
|
|
18860
|
+
},
|
|
18861
|
+
"build": {
|
|
18862
|
+
"anyOf": [
|
|
18863
|
+
{
|
|
18864
|
+
"type": "object",
|
|
18865
|
+
"properties": {
|
|
18866
|
+
"id": {
|
|
18867
|
+
"type": "string"
|
|
18868
|
+
},
|
|
18869
|
+
"site_id": {
|
|
18870
|
+
"type": "string"
|
|
18871
|
+
},
|
|
18872
|
+
"revision": {
|
|
18873
|
+
"type": "string",
|
|
18874
|
+
"minLength": 40,
|
|
18875
|
+
"maxLength": 40,
|
|
18876
|
+
"description": "A Git commit id (40 hex characters) of the site's repository."
|
|
18877
|
+
},
|
|
18878
|
+
"state": {
|
|
18879
|
+
"type": "string",
|
|
18880
|
+
"enum": [
|
|
18881
|
+
"queued",
|
|
18882
|
+
"building",
|
|
18883
|
+
"collecting",
|
|
18884
|
+
"ready",
|
|
18885
|
+
"failed",
|
|
18886
|
+
"cancelled"
|
|
18887
|
+
]
|
|
18888
|
+
},
|
|
18889
|
+
"target_origin": {
|
|
18890
|
+
"type": "string"
|
|
18891
|
+
},
|
|
18892
|
+
"profile": {
|
|
18893
|
+
"type": "string",
|
|
18894
|
+
"enum": [
|
|
18895
|
+
"standard",
|
|
18896
|
+
"guest-demo"
|
|
18897
|
+
]
|
|
18898
|
+
},
|
|
18899
|
+
"file_count": {
|
|
18900
|
+
"anyOf": [
|
|
18901
|
+
{
|
|
18902
|
+
"type": "integer",
|
|
18903
|
+
"minimum": -9007199254740991,
|
|
18904
|
+
"maximum": 9007199254740991
|
|
18905
|
+
},
|
|
18906
|
+
{
|
|
18907
|
+
"type": "null"
|
|
18908
|
+
}
|
|
18909
|
+
]
|
|
18910
|
+
},
|
|
18911
|
+
"total_bytes": {
|
|
18912
|
+
"anyOf": [
|
|
18913
|
+
{
|
|
18914
|
+
"type": "integer",
|
|
18915
|
+
"minimum": -9007199254740991,
|
|
18916
|
+
"maximum": 9007199254740991
|
|
18917
|
+
},
|
|
18918
|
+
{
|
|
18919
|
+
"type": "null"
|
|
18920
|
+
}
|
|
18921
|
+
]
|
|
18922
|
+
},
|
|
18923
|
+
"duration_ms": {
|
|
18924
|
+
"anyOf": [
|
|
18925
|
+
{
|
|
18926
|
+
"type": "integer",
|
|
18927
|
+
"minimum": -9007199254740991,
|
|
18928
|
+
"maximum": 9007199254740991
|
|
18929
|
+
},
|
|
18930
|
+
{
|
|
18931
|
+
"type": "null"
|
|
18932
|
+
}
|
|
18933
|
+
]
|
|
18934
|
+
},
|
|
18935
|
+
"error": {
|
|
18936
|
+
"anyOf": [
|
|
18937
|
+
{
|
|
18938
|
+
"type": "object",
|
|
18939
|
+
"properties": {
|
|
18940
|
+
"code": {
|
|
18941
|
+
"type": "string"
|
|
18942
|
+
},
|
|
18943
|
+
"message": {
|
|
18944
|
+
"type": [
|
|
18945
|
+
"string",
|
|
18946
|
+
"null"
|
|
18947
|
+
]
|
|
18948
|
+
}
|
|
18949
|
+
},
|
|
18950
|
+
"required": [
|
|
18951
|
+
"code",
|
|
18952
|
+
"message"
|
|
18953
|
+
],
|
|
18954
|
+
"additionalProperties": false
|
|
18955
|
+
},
|
|
18956
|
+
{
|
|
18957
|
+
"type": "null"
|
|
18958
|
+
}
|
|
18959
|
+
]
|
|
18960
|
+
},
|
|
18961
|
+
"warnings": {
|
|
18962
|
+
"type": "array",
|
|
18963
|
+
"items": {
|
|
18964
|
+
"type": "string"
|
|
18965
|
+
}
|
|
18966
|
+
},
|
|
18967
|
+
"created_at": {
|
|
18968
|
+
"type": "string",
|
|
18969
|
+
"description": "ISO 8601, UTC."
|
|
18970
|
+
},
|
|
18971
|
+
"started_at": {
|
|
18972
|
+
"anyOf": [
|
|
18973
|
+
{
|
|
18974
|
+
"type": "string",
|
|
18975
|
+
"description": "ISO 8601, UTC."
|
|
18976
|
+
},
|
|
18977
|
+
{
|
|
18978
|
+
"type": "null"
|
|
18979
|
+
}
|
|
18980
|
+
]
|
|
18981
|
+
},
|
|
18982
|
+
"finished_at": {
|
|
18983
|
+
"anyOf": [
|
|
18984
|
+
{
|
|
18985
|
+
"type": "string",
|
|
18986
|
+
"description": "ISO 8601, UTC."
|
|
18987
|
+
},
|
|
18988
|
+
{
|
|
18989
|
+
"type": "null"
|
|
18990
|
+
}
|
|
18991
|
+
]
|
|
18992
|
+
}
|
|
18993
|
+
},
|
|
18994
|
+
"required": [
|
|
18995
|
+
"id",
|
|
18996
|
+
"site_id",
|
|
18997
|
+
"revision",
|
|
18998
|
+
"state",
|
|
18999
|
+
"target_origin",
|
|
19000
|
+
"profile",
|
|
19001
|
+
"file_count",
|
|
19002
|
+
"total_bytes",
|
|
19003
|
+
"duration_ms",
|
|
19004
|
+
"error",
|
|
19005
|
+
"warnings",
|
|
19006
|
+
"created_at",
|
|
19007
|
+
"started_at",
|
|
19008
|
+
"finished_at"
|
|
19009
|
+
],
|
|
19010
|
+
"additionalProperties": false
|
|
19011
|
+
},
|
|
19012
|
+
{
|
|
19013
|
+
"type": "null"
|
|
19014
|
+
}
|
|
19015
|
+
]
|
|
19016
|
+
}
|
|
19017
|
+
},
|
|
19018
|
+
"required": [
|
|
19019
|
+
"updated",
|
|
19020
|
+
"revision",
|
|
19021
|
+
"changed"
|
|
19022
|
+
],
|
|
19023
|
+
"additionalProperties": {}
|
|
19024
|
+
},
|
|
19025
|
+
"request_id": {
|
|
19026
|
+
"type": "string"
|
|
19027
|
+
}
|
|
19028
|
+
},
|
|
19029
|
+
"required": [
|
|
19030
|
+
"data",
|
|
19031
|
+
"request_id"
|
|
19032
|
+
]
|
|
19033
|
+
}
|
|
19034
|
+
}
|
|
19035
|
+
}
|
|
19036
|
+
},
|
|
19037
|
+
"400": {
|
|
19038
|
+
"$ref": "#/components/responses/Error400"
|
|
19039
|
+
},
|
|
19040
|
+
"401": {
|
|
19041
|
+
"$ref": "#/components/responses/Error401"
|
|
19042
|
+
},
|
|
19043
|
+
"402": {
|
|
19044
|
+
"$ref": "#/components/responses/Error402"
|
|
19045
|
+
},
|
|
19046
|
+
"403": {
|
|
19047
|
+
"$ref": "#/components/responses/Error403"
|
|
19048
|
+
},
|
|
19049
|
+
"404": {
|
|
19050
|
+
"$ref": "#/components/responses/Error404"
|
|
19051
|
+
},
|
|
19052
|
+
"409": {
|
|
19053
|
+
"$ref": "#/components/responses/Error409"
|
|
19054
|
+
},
|
|
19055
|
+
"410": {
|
|
19056
|
+
"$ref": "#/components/responses/Error410"
|
|
19057
|
+
},
|
|
19058
|
+
"413": {
|
|
19059
|
+
"$ref": "#/components/responses/Error413"
|
|
19060
|
+
},
|
|
19061
|
+
"422": {
|
|
19062
|
+
"$ref": "#/components/responses/Error422"
|
|
19063
|
+
},
|
|
19064
|
+
"429": {
|
|
19065
|
+
"$ref": "#/components/responses/Error429"
|
|
19066
|
+
},
|
|
19067
|
+
"500": {
|
|
19068
|
+
"$ref": "#/components/responses/Error500"
|
|
19069
|
+
},
|
|
19070
|
+
"503": {
|
|
19071
|
+
"$ref": "#/components/responses/Error503"
|
|
19072
|
+
}
|
|
19073
|
+
}
|
|
19074
|
+
},
|
|
19075
|
+
{
|
|
19076
|
+
"operation_id": "replaceSiteText",
|
|
19077
|
+
"method": "POST",
|
|
19078
|
+
"path": "/v1/sites/{site_id}/text:replace",
|
|
19079
|
+
"summary": "Change a text wherever it is written",
|
|
19080
|
+
"description": "Finds `find` in the site's sources (content files and code, under src/), replaces it with `replace`, commits ONE history entry and starts the build. Refused with 404 when the text is not written as such, and with 409 when it appears more than once unless `path` narrows it or `all` is true. JSON content keeps its escaping and stays valid. Costs no credits; changes the draft only.",
|
|
19081
|
+
"authentication_required": true,
|
|
19082
|
+
"scope": "sites:write",
|
|
19083
|
+
"surfaces": {
|
|
19084
|
+
"cli": "atelier201 content replace",
|
|
19085
|
+
"mcp": "edit_text"
|
|
19086
|
+
},
|
|
19087
|
+
"parameters": [
|
|
19088
|
+
{
|
|
19089
|
+
"name": "site_id",
|
|
19090
|
+
"in": "path",
|
|
19091
|
+
"required": true,
|
|
19092
|
+
"schema": {
|
|
19093
|
+
"type": "string"
|
|
19094
|
+
},
|
|
19095
|
+
"description": "The site's id, or its slug (the address before .atelier201.page)."
|
|
19096
|
+
}
|
|
19097
|
+
],
|
|
19098
|
+
"request_body": {
|
|
19099
|
+
"required": true,
|
|
19100
|
+
"content": {
|
|
19101
|
+
"application/json": {
|
|
19102
|
+
"schema": {
|
|
19103
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
19104
|
+
"type": "object",
|
|
19105
|
+
"properties": {
|
|
19106
|
+
"find": {
|
|
19107
|
+
"type": "string",
|
|
19108
|
+
"minLength": 1,
|
|
19109
|
+
"maxLength": 2000,
|
|
19110
|
+
"description": "The text to change, exactly as it reads on the page or in the file (case and punctuation included)."
|
|
19111
|
+
},
|
|
19112
|
+
"replace": {
|
|
19113
|
+
"type": "string",
|
|
19114
|
+
"maxLength": 5000,
|
|
19115
|
+
"description": "The new text. Empty removes the passage."
|
|
19116
|
+
},
|
|
19117
|
+
"path": {
|
|
19118
|
+
"description": "Only in this file (or glob, e.g. src/pages/*.astro), when the text appears in several.",
|
|
19119
|
+
"type": "string",
|
|
19120
|
+
"maxLength": 300
|
|
19121
|
+
},
|
|
19122
|
+
"all": {
|
|
19123
|
+
"description": "Change every occurrence (a renamed product, a new phone number). Default: refuse when the text appears more than once.",
|
|
19124
|
+
"type": "boolean"
|
|
19125
|
+
},
|
|
19126
|
+
"summary": {
|
|
19127
|
+
"description": "One sentence for the history. Default: Change \"<text>\".",
|
|
19128
|
+
"type": "string",
|
|
19129
|
+
"maxLength": 200
|
|
19130
|
+
}
|
|
19131
|
+
},
|
|
19132
|
+
"required": [
|
|
19133
|
+
"find",
|
|
19134
|
+
"replace"
|
|
19135
|
+
],
|
|
19136
|
+
"additionalProperties": false
|
|
19137
|
+
}
|
|
19138
|
+
}
|
|
19139
|
+
}
|
|
19140
|
+
},
|
|
19141
|
+
"responses": {
|
|
19142
|
+
"200": {
|
|
19143
|
+
"description": "Change a text wherever it is written",
|
|
19144
|
+
"content": {
|
|
19145
|
+
"application/json": {
|
|
19146
|
+
"schema": {
|
|
19147
|
+
"type": "object",
|
|
19148
|
+
"properties": {
|
|
19149
|
+
"data": {
|
|
19150
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
19151
|
+
"type": "object",
|
|
19152
|
+
"properties": {
|
|
19153
|
+
"replaced": {
|
|
19154
|
+
"type": "integer",
|
|
19155
|
+
"minimum": -9007199254740991,
|
|
19156
|
+
"maximum": 9007199254740991,
|
|
19157
|
+
"description": "How many occurrences changed."
|
|
19158
|
+
},
|
|
19159
|
+
"files": {
|
|
19160
|
+
"type": "array",
|
|
19161
|
+
"items": {
|
|
19162
|
+
"type": "object",
|
|
19163
|
+
"properties": {
|
|
19164
|
+
"path": {
|
|
19165
|
+
"type": "string"
|
|
19166
|
+
},
|
|
19167
|
+
"occurrences": {
|
|
19168
|
+
"type": "integer",
|
|
19169
|
+
"minimum": -9007199254740991,
|
|
19170
|
+
"maximum": 9007199254740991
|
|
19171
|
+
}
|
|
19172
|
+
},
|
|
19173
|
+
"required": [
|
|
19174
|
+
"path",
|
|
19175
|
+
"occurrences"
|
|
19176
|
+
],
|
|
19177
|
+
"additionalProperties": false
|
|
19178
|
+
}
|
|
19179
|
+
},
|
|
19180
|
+
"revision": {
|
|
19181
|
+
"type": "string",
|
|
19182
|
+
"minLength": 40,
|
|
19183
|
+
"maxLength": 40,
|
|
19184
|
+
"description": "A Git commit id (40 hex characters) of the site's repository."
|
|
19185
|
+
},
|
|
19186
|
+
"parent": {
|
|
19187
|
+
"anyOf": [
|
|
19188
|
+
{
|
|
19189
|
+
"type": "string",
|
|
19190
|
+
"minLength": 40,
|
|
19191
|
+
"maxLength": 40,
|
|
19192
|
+
"description": "A Git commit id (40 hex characters) of the site's repository."
|
|
19193
|
+
},
|
|
19194
|
+
{
|
|
19195
|
+
"type": "null"
|
|
19196
|
+
}
|
|
19197
|
+
]
|
|
19198
|
+
},
|
|
19199
|
+
"changed": {
|
|
19200
|
+
"type": "boolean"
|
|
19201
|
+
},
|
|
19202
|
+
"changes": {
|
|
19203
|
+
"type": "array",
|
|
19204
|
+
"items": {
|
|
19205
|
+
"type": "object",
|
|
19206
|
+
"properties": {
|
|
19207
|
+
"path": {
|
|
19208
|
+
"type": "string"
|
|
19209
|
+
},
|
|
19210
|
+
"action": {
|
|
19211
|
+
"type": "string"
|
|
19212
|
+
}
|
|
19213
|
+
},
|
|
19214
|
+
"required": [
|
|
19215
|
+
"path",
|
|
19216
|
+
"action"
|
|
19217
|
+
],
|
|
19218
|
+
"additionalProperties": false
|
|
19219
|
+
}
|
|
19220
|
+
},
|
|
19221
|
+
"build": {
|
|
19222
|
+
"anyOf": [
|
|
19223
|
+
{
|
|
19224
|
+
"type": "object",
|
|
19225
|
+
"properties": {
|
|
19226
|
+
"id": {
|
|
19227
|
+
"type": "string"
|
|
19228
|
+
},
|
|
19229
|
+
"state": {
|
|
19230
|
+
"type": "string"
|
|
19231
|
+
},
|
|
19232
|
+
"next_action": {
|
|
19233
|
+
"type": "string"
|
|
19234
|
+
}
|
|
19235
|
+
},
|
|
19236
|
+
"required": [
|
|
19237
|
+
"id",
|
|
19238
|
+
"state",
|
|
19239
|
+
"next_action"
|
|
19240
|
+
],
|
|
19241
|
+
"additionalProperties": false
|
|
19242
|
+
},
|
|
19243
|
+
{
|
|
19244
|
+
"type": "null"
|
|
19245
|
+
}
|
|
19246
|
+
],
|
|
19247
|
+
"description": "The build this change started (or joined): the preview follows it. No build_site call needed."
|
|
19248
|
+
},
|
|
19249
|
+
"next_action": {
|
|
19250
|
+
"type": "string"
|
|
19251
|
+
}
|
|
19252
|
+
},
|
|
19253
|
+
"required": [
|
|
19254
|
+
"replaced",
|
|
19255
|
+
"files",
|
|
19256
|
+
"revision",
|
|
19257
|
+
"parent",
|
|
19258
|
+
"changed",
|
|
19259
|
+
"changes",
|
|
19260
|
+
"build",
|
|
19261
|
+
"next_action"
|
|
19262
|
+
],
|
|
19263
|
+
"additionalProperties": false
|
|
19264
|
+
},
|
|
19265
|
+
"request_id": {
|
|
19266
|
+
"type": "string"
|
|
19267
|
+
}
|
|
19268
|
+
},
|
|
19269
|
+
"required": [
|
|
19270
|
+
"data",
|
|
19271
|
+
"request_id"
|
|
19272
|
+
]
|
|
19273
|
+
}
|
|
19274
|
+
}
|
|
19275
|
+
}
|
|
19276
|
+
},
|
|
19277
|
+
"400": {
|
|
19278
|
+
"$ref": "#/components/responses/Error400"
|
|
19279
|
+
},
|
|
19280
|
+
"401": {
|
|
19281
|
+
"$ref": "#/components/responses/Error401"
|
|
19282
|
+
},
|
|
19283
|
+
"402": {
|
|
19284
|
+
"$ref": "#/components/responses/Error402"
|
|
19285
|
+
},
|
|
19286
|
+
"403": {
|
|
19287
|
+
"$ref": "#/components/responses/Error403"
|
|
19288
|
+
},
|
|
19289
|
+
"404": {
|
|
19290
|
+
"$ref": "#/components/responses/Error404"
|
|
19291
|
+
},
|
|
19292
|
+
"409": {
|
|
19293
|
+
"$ref": "#/components/responses/Error409"
|
|
19294
|
+
},
|
|
19295
|
+
"410": {
|
|
19296
|
+
"$ref": "#/components/responses/Error410"
|
|
19297
|
+
},
|
|
19298
|
+
"413": {
|
|
19299
|
+
"$ref": "#/components/responses/Error413"
|
|
19300
|
+
},
|
|
19301
|
+
"422": {
|
|
19302
|
+
"$ref": "#/components/responses/Error422"
|
|
19303
|
+
},
|
|
19304
|
+
"429": {
|
|
19305
|
+
"$ref": "#/components/responses/Error429"
|
|
19306
|
+
},
|
|
19307
|
+
"500": {
|
|
19308
|
+
"$ref": "#/components/responses/Error500"
|
|
19309
|
+
},
|
|
19310
|
+
"503": {
|
|
19311
|
+
"$ref": "#/components/responses/Error503"
|
|
19312
|
+
}
|
|
19313
|
+
}
|
|
19314
|
+
},
|
|
19315
|
+
{
|
|
19316
|
+
"operation_id": "setContentField",
|
|
19317
|
+
"method": "POST",
|
|
19318
|
+
"path": "/v1/sites/{site_id}/fields",
|
|
19319
|
+
"summary": "Change one field",
|
|
19320
|
+
"description": "Sets one existing field of a singleton, addressed as on the page (`business:/hours/2/close`), or of an entry (`menu/sourdough:/price`): the rest stays as it is. Validated, one history entry.",
|
|
19321
|
+
"authentication_required": true,
|
|
19322
|
+
"scope": "sites:write",
|
|
19323
|
+
"surfaces": {
|
|
19324
|
+
"cli": "atelier201 content set",
|
|
19325
|
+
"mcp": "set_field"
|
|
19326
|
+
},
|
|
19327
|
+
"parameters": [
|
|
19328
|
+
{
|
|
19329
|
+
"name": "site_id",
|
|
19330
|
+
"in": "path",
|
|
19331
|
+
"required": true,
|
|
19332
|
+
"schema": {
|
|
19333
|
+
"type": "string"
|
|
19334
|
+
},
|
|
19335
|
+
"description": "The site's id, or its slug (the address before .atelier201.page)."
|
|
19336
|
+
}
|
|
19337
|
+
],
|
|
19338
|
+
"request_body": {
|
|
19339
|
+
"required": true,
|
|
19340
|
+
"content": {
|
|
19341
|
+
"application/json": {
|
|
19342
|
+
"schema": {
|
|
19343
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
19344
|
+
"type": "object",
|
|
19345
|
+
"properties": {
|
|
19346
|
+
"address": {
|
|
19347
|
+
"type": "string",
|
|
19348
|
+
"minLength": 3,
|
|
19349
|
+
"maxLength": 200,
|
|
19350
|
+
"description": "<singleton>:<JSON pointer>, as the page's data-atelier201-field attribute says, e.g. business:/hours/2/close; or <list>/<slug>:<JSON pointer> for one field of an entry, e.g. menu/sourdough:/price."
|
|
19351
|
+
},
|
|
19352
|
+
"value": {
|
|
19353
|
+
"anyOf": [
|
|
19354
|
+
{
|
|
19355
|
+
"type": "string",
|
|
19356
|
+
"maxLength": 5000
|
|
19357
|
+
},
|
|
19358
|
+
{
|
|
19359
|
+
"type": "number"
|
|
19360
|
+
},
|
|
18794
19361
|
{
|
|
18795
19362
|
"type": "boolean"
|
|
18796
19363
|
}
|
|
@@ -18825,6 +19392,15 @@ export const API_OPERATIONS = [
|
|
|
18825
19392
|
"type": "object",
|
|
18826
19393
|
"properties": {
|
|
18827
19394
|
"singleton": {
|
|
19395
|
+
"description": "The singleton changed, for a singleton's field.",
|
|
19396
|
+
"type": "string"
|
|
19397
|
+
},
|
|
19398
|
+
"collection": {
|
|
19399
|
+
"description": "The list, for an entry's field.",
|
|
19400
|
+
"type": "string"
|
|
19401
|
+
},
|
|
19402
|
+
"slug": {
|
|
19403
|
+
"description": "The entry, for an entry's field.",
|
|
18828
19404
|
"type": "string"
|
|
18829
19405
|
},
|
|
18830
19406
|
"revision": {
|
|
@@ -18838,7 +19414,6 @@ export const API_OPERATIONS = [
|
|
|
18838
19414
|
}
|
|
18839
19415
|
},
|
|
18840
19416
|
"required": [
|
|
18841
|
-
"singleton",
|
|
18842
19417
|
"revision",
|
|
18843
19418
|
"changed"
|
|
18844
19419
|
],
|