@andesine/sdk 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.
package/openapi.json CHANGED
@@ -4169,7 +4169,7 @@
4169
4169
  "required": ["variant", "format", "byteSize", "width", "height", "url", "expiresAt"]
4170
4170
  },
4171
4171
  "AssetFileFormat": { "enum": ["jpeg", "png", "webp"], "type": "string" },
4172
- "AssetVariant": { "enum": ["thumbnail", "display"], "type": "string" },
4172
+ "AssetVariant": { "enum": ["thumbnail", "display", "source"], "type": "string" },
4173
4173
  "AssetSearchResult": {
4174
4174
  "type": "object",
4175
4175
  "properties": {
@@ -11698,6 +11698,10 @@
11698
11698
  "name": { "type": "string", "description": "Registry name" },
11699
11699
  "version": { "type": "string", "description": "Active version" },
11700
11700
  "workspaceID": { "type": "string", "pattern": "^ws_[A-Za-z\\d]{1,22}$" },
11701
+ "workspacePlan": {
11702
+ "type": "string",
11703
+ "description": "The workspace's effective plan, e.g. free or pro; pro when the instance has no billing"
11704
+ },
11701
11705
  "state": {
11702
11706
  "enum": ["active", "disabled", "uninstalled"],
11703
11707
  "type": "string",
@@ -11719,7 +11723,15 @@
11719
11723
  "description": "Why the extension is disabled; null when it is active or uninstalled"
11720
11724
  }
11721
11725
  },
11722
- "required": ["id", "name", "version", "workspaceID", "state", "disabledReason"]
11726
+ "required": [
11727
+ "id",
11728
+ "name",
11729
+ "version",
11730
+ "workspaceID",
11731
+ "workspacePlan",
11732
+ "state",
11733
+ "disabledReason"
11734
+ ]
11723
11735
  }
11724
11736
  }
11725
11737
  }
@@ -11996,7 +12008,7 @@
11996
12008
  "post": {
11997
12009
  "operationId": "extensions.verifySession",
11998
12010
  "summary": "Verify a session token",
11999
- "description": "Verifies a session token from the extension frontend and returns its member. Tokens of other extensions, expired tokens, and tokens of an earlier extension generation fail with NOT_FOUND.",
12011
+ "description": "Verifies a session token from the extension frontend and returns its member. Tokens of other extensions, expired tokens, and tokens of an earlier extension generation fail with NOT_FOUND. checks evaluates collection and entry actions for the member, in collections the extension can read (restricted collections included), so the backend can authorize the member's request.",
12000
12012
  "tags": ["extensions"],
12001
12013
  "requestBody": {
12002
12014
  "required": true,
@@ -12004,7 +12016,68 @@
12004
12016
  "application/json": {
12005
12017
  "schema": {
12006
12018
  "type": "object",
12007
- "properties": { "token": { "type": "string", "minLength": 1, "maxLength": 200 } },
12019
+ "properties": {
12020
+ "token": { "type": "string", "minLength": 1, "maxLength": 200 },
12021
+ "checks": {
12022
+ "type": "array",
12023
+ "maxItems": 10,
12024
+ "items": {
12025
+ "type": "object",
12026
+ "properties": {
12027
+ "collectionID": {
12028
+ "anyOf": [
12029
+ { "type": "string", "pattern": "^coll_[A-Za-z\\d]{1,22}$" },
12030
+ { "type": "null" }
12031
+ ],
12032
+ "description": "Collection to check; null for the top level"
12033
+ },
12034
+ "actions": {
12035
+ "type": "array",
12036
+ "minItems": 1,
12037
+ "maxItems": 12,
12038
+ "items": {
12039
+ "anyOf": [
12040
+ {
12041
+ "enum": [
12042
+ "collection:read",
12043
+ "collection:create-child",
12044
+ "collection:update",
12045
+ "collection:move",
12046
+ "collection:delete",
12047
+ "collection:set-restricted",
12048
+ "collection:manage-restricted-access",
12049
+ "collection:set-publishing",
12050
+ "publishing:publish-tree",
12051
+ "publishing:unpublish-tree"
12052
+ ],
12053
+ "type": "string"
12054
+ },
12055
+ {
12056
+ "enum": [
12057
+ "entry:create",
12058
+ "entry:read",
12059
+ "entry:update",
12060
+ "entry:move",
12061
+ "entry:delete",
12062
+ "version:read",
12063
+ "version:create",
12064
+ "version:update",
12065
+ "version:revert",
12066
+ "publishing:read",
12067
+ "publishing:publish",
12068
+ "publishing:unpublish"
12069
+ ],
12070
+ "type": "string"
12071
+ }
12072
+ ]
12073
+ },
12074
+ "description": "Collection and entry actions that the member must be able to take"
12075
+ }
12076
+ },
12077
+ "required": ["collectionID", "actions"]
12078
+ }
12079
+ }
12080
+ },
12008
12081
  "required": ["token"]
12009
12082
  }
12010
12083
  }
@@ -12019,6 +12092,10 @@
12019
12092
  "type": "object",
12020
12093
  "properties": {
12021
12094
  "workspaceID": { "type": "string", "pattern": "^ws_[A-Za-z\\d]{1,22}$" },
12095
+ "workspacePlan": {
12096
+ "type": "string",
12097
+ "description": "The workspace's effective plan, e.g. free or pro; pro when the instance has no billing"
12098
+ },
12022
12099
  "version": {
12023
12100
  "type": "string",
12024
12101
  "description": "The extension version the session was issued for"
@@ -12043,9 +12120,69 @@
12043
12120
  }
12044
12121
  },
12045
12122
  "required": ["id", "userID", "profile"]
12123
+ },
12124
+ "checks": {
12125
+ "type": "array",
12126
+ "items": {
12127
+ "type": "object",
12128
+ "properties": {
12129
+ "collectionID": {
12130
+ "anyOf": [
12131
+ { "type": "string", "pattern": "^coll_[A-Za-z\\d]{1,22}$" },
12132
+ { "type": "null" }
12133
+ ]
12134
+ },
12135
+ "allowed": {
12136
+ "type": "boolean",
12137
+ "description": "Whether the member and the extension can take every action"
12138
+ },
12139
+ "denied": {
12140
+ "type": "array",
12141
+ "items": {
12142
+ "anyOf": [
12143
+ {
12144
+ "enum": [
12145
+ "collection:read",
12146
+ "collection:create-child",
12147
+ "collection:update",
12148
+ "collection:move",
12149
+ "collection:delete",
12150
+ "collection:set-restricted",
12151
+ "collection:manage-restricted-access",
12152
+ "collection:set-publishing",
12153
+ "publishing:publish-tree",
12154
+ "publishing:unpublish-tree"
12155
+ ],
12156
+ "type": "string"
12157
+ },
12158
+ {
12159
+ "enum": [
12160
+ "entry:create",
12161
+ "entry:read",
12162
+ "entry:update",
12163
+ "entry:move",
12164
+ "entry:delete",
12165
+ "version:read",
12166
+ "version:create",
12167
+ "version:update",
12168
+ "version:revert",
12169
+ "publishing:read",
12170
+ "publishing:publish",
12171
+ "publishing:unpublish"
12172
+ ],
12173
+ "type": "string"
12174
+ }
12175
+ ]
12176
+ },
12177
+ "description": "Actions that are not allowed"
12178
+ }
12179
+ },
12180
+ "required": ["collectionID", "allowed", "denied"]
12181
+ },
12182
+ "description": "Results of the requested checks, in their order"
12046
12183
  }
12047
12184
  },
12048
- "required": ["workspaceID", "version", "member"]
12185
+ "required": ["workspaceID", "workspacePlan", "version", "member", "checks"]
12049
12186
  }
12050
12187
  }
12051
12188
  }
@@ -16029,27 +16166,12 @@
16029
16166
  "security": [{ "extensionToken": [] }]
16030
16167
  }
16031
16168
  },
16032
- "/extensions/self/storage/entry": {
16169
+ "/extensions/self/publishable-keys": {
16033
16170
  "get": {
16034
- "operationId": "extensions.getSelfStorageEntry",
16035
- "summary": "Get a storage entry",
16036
- "description": "Returns an entry of the extension's storage, or NOT_FOUND.",
16171
+ "operationId": "extensions.listSelfPublishableKeys",
16172
+ "summary": "List managed publishable keys",
16173
+ "description": "Lists the publishable keys that the extension manages. Requires the publishable-keys permission.",
16037
16174
  "tags": ["extensions"],
16038
- "parameters": [
16039
- {
16040
- "name": "key",
16041
- "in": "query",
16042
- "required": true,
16043
- "schema": {
16044
- "type": "string",
16045
- "minLength": 1,
16046
- "maxLength": 256,
16047
- "pattern": "^\\P{Cc}+$"
16048
- },
16049
- "allowEmptyValue": true,
16050
- "allowReserved": true
16051
- }
16052
- ],
16053
16175
  "responses": {
16054
16176
  "200": {
16055
16177
  "description": "OK",
@@ -16058,53 +16180,80 @@
16058
16180
  "schema": {
16059
16181
  "type": "object",
16060
16182
  "properties": {
16061
- "key": { "type": "string" },
16062
- "value": {
16063
- "anyOf": [
16064
- { "type": "string" },
16065
- { "type": "number" },
16066
- { "type": "boolean" },
16067
- { "type": "null" },
16068
- {
16069
- "type": "array",
16070
- "items": {
16071
- "anyOf": [
16072
- { "type": "string" },
16073
- { "type": "number" },
16074
- { "type": "boolean" },
16075
- { "type": "null" },
16076
- { "type": "array", "items": { "anyOf": [{}, { "type": "null" }] } },
16077
- {
16078
- "type": "object",
16079
- "propertyNames": { "type": "string" },
16080
- "additionalProperties": {}
16081
- }
16082
- ]
16183
+ "data": {
16184
+ "type": "array",
16185
+ "items": {
16186
+ "type": "object",
16187
+ "properties": {
16188
+ "id": {
16189
+ "type": "string",
16190
+ "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$",
16191
+ "description": "The ID of the API key"
16192
+ },
16193
+ "name": { "type": "string", "description": "The name for the API key" },
16194
+ "permissions": {
16195
+ "type": "array",
16196
+ "items": {
16197
+ "enum": [
16198
+ "entries",
16199
+ "read:entries",
16200
+ "versions",
16201
+ "read:versions",
16202
+ "publishing",
16203
+ "read:publishing",
16204
+ "collections",
16205
+ "read:collections",
16206
+ "memberships",
16207
+ "read:memberships",
16208
+ "roles",
16209
+ "read:roles",
16210
+ "webhooks",
16211
+ "read:webhooks",
16212
+ "ai-answers"
16213
+ ],
16214
+ "type": "string"
16215
+ },
16216
+ "description": "The permissions of the API key"
16217
+ },
16218
+ "collectionIDs": {
16219
+ "type": "array",
16220
+ "items": { "type": "string", "pattern": "^coll_[A-Za-z\\d]{1,22}$" },
16221
+ "description": "Publishable keys: the collections, with their descendants, that the key can read; none for all"
16222
+ },
16223
+ "allowedOrigins": {
16224
+ "type": "array",
16225
+ "items": { "type": "string" },
16226
+ "description": "Publishable keys: the browser origins that can use the key, with localhost"
16227
+ },
16228
+ "createdAt": {
16229
+ "type": "string",
16230
+ "format": "date-time",
16231
+ "description": "The creation date"
16232
+ },
16233
+ "updatedAt": {
16234
+ "type": "string",
16235
+ "format": "date-time",
16236
+ "description": "The last update date"
16237
+ },
16238
+ "value": {
16239
+ "type": "string",
16240
+ "description": "The raw key, which is public"
16083
16241
  }
16084
16242
  },
16085
- {
16086
- "type": "object",
16087
- "propertyNames": { "type": "string" },
16088
- "additionalProperties": {
16089
- "anyOf": [
16090
- { "type": "string" },
16091
- { "type": "number" },
16092
- { "type": "boolean" },
16093
- { "type": "null" },
16094
- { "type": "array", "items": { "anyOf": [{}, { "type": "null" }] } },
16095
- {
16096
- "type": "object",
16097
- "propertyNames": { "type": "string" },
16098
- "additionalProperties": {}
16099
- }
16100
- ]
16101
- }
16102
- }
16103
- ]
16104
- },
16105
- "updatedAt": { "type": "string", "format": "date-time" }
16243
+ "required": [
16244
+ "id",
16245
+ "name",
16246
+ "permissions",
16247
+ "collectionIDs",
16248
+ "allowedOrigins",
16249
+ "createdAt",
16250
+ "updatedAt",
16251
+ "value"
16252
+ ]
16253
+ }
16254
+ }
16106
16255
  },
16107
- "required": ["key", "value", "updatedAt"]
16256
+ "required": ["data"]
16108
16257
  }
16109
16258
  }
16110
16259
  }
@@ -16376,10 +16525,10 @@
16376
16525
  },
16377
16526
  "security": [{ "extensionToken": [] }]
16378
16527
  },
16379
- "put": {
16380
- "operationId": "extensions.setSelfStorageEntry",
16381
- "summary": "Set a storage entry",
16382
- "description": "Creates or replaces an entry of the extension's storage. Values are JSON up to 128 KiB; the storage holds up to 10,000 entries and 10 MiB.",
16528
+ "post": {
16529
+ "operationId": "extensions.createSelfPublishableKey",
16530
+ "summary": "Create a managed publishable key",
16531
+ "description": "Creates a publishable key that the extension manages: read:publishing, and ai-answers with answers. Its collections must be readable by the extension. Members see it in API settings and can only delete it. It stops working while the extension is disabled or revoked; losing the permission or read:publishing, or uninstalling, deletes it, and losing ai-answers removes that permission. Up to 10 keys per installation. Requires the publishable-keys permission.",
16383
16532
  "tags": ["extensions"],
16384
16533
  "requestBody": {
16385
16534
  "required": true,
@@ -16388,57 +16537,36 @@
16388
16537
  "schema": {
16389
16538
  "type": "object",
16390
16539
  "properties": {
16391
- "key": {
16540
+ "name": {
16392
16541
  "type": "string",
16393
16542
  "minLength": 1,
16394
- "maxLength": 256,
16395
- "pattern": "^\\P{Cc}+$"
16543
+ "maxLength": 100,
16544
+ "description": "A name shown in API settings"
16396
16545
  },
16397
- "value": {
16398
- "anyOf": [
16399
- { "type": "string" },
16400
- { "type": "number" },
16401
- { "type": "boolean" },
16402
- { "type": "null" },
16403
- {
16404
- "type": "array",
16405
- "items": {
16406
- "anyOf": [
16407
- { "type": "string" },
16408
- { "type": "number" },
16409
- { "type": "boolean" },
16410
- { "type": "null" },
16411
- { "type": "array", "items": {} },
16412
- {
16413
- "type": "object",
16414
- "propertyNames": { "type": "string" },
16415
- "additionalProperties": {}
16416
- }
16417
- ]
16418
- }
16419
- },
16420
- {
16421
- "type": "object",
16422
- "propertyNames": { "type": "string" },
16423
- "additionalProperties": {
16424
- "anyOf": [
16425
- { "type": "string" },
16426
- { "type": "number" },
16427
- { "type": "boolean" },
16428
- { "type": "null" },
16429
- { "type": "array", "items": {} },
16430
- {
16431
- "type": "object",
16432
- "propertyNames": { "type": "string" },
16433
- "additionalProperties": {}
16434
- }
16435
- ]
16436
- }
16437
- }
16438
- ]
16546
+ "collectionIDs": {
16547
+ "type": "array",
16548
+ "minItems": 1,
16549
+ "maxItems": 20,
16550
+ "items": { "type": "string", "pattern": "^coll_[A-Za-z\\d]{1,22}$" },
16551
+ "description": "Collections, with their descendants, that the key can read"
16552
+ },
16553
+ "allowedOrigins": {
16554
+ "type": "array",
16555
+ "minItems": 1,
16556
+ "maxItems": 20,
16557
+ "items": {
16558
+ "type": "string",
16559
+ "pattern": "^https?:\\/\\/[a-z\\d.-]+(?::\\d{1,5})?$"
16560
+ },
16561
+ "description": "Browser origins that can use the key, besides localhost"
16562
+ },
16563
+ "answers": {
16564
+ "type": "boolean",
16565
+ "description": "Whether the key can ask for AI answers; needs the extension's ai-answers permission",
16566
+ "default": false
16439
16567
  }
16440
16568
  },
16441
- "required": ["key", "value"]
16569
+ "required": ["name", "collectionIDs", "allowedOrigins"]
16442
16570
  }
16443
16571
  }
16444
16572
  }
@@ -16451,10 +16579,68 @@
16451
16579
  "schema": {
16452
16580
  "type": "object",
16453
16581
  "properties": {
16454
- "key": { "type": "string" },
16455
- "updatedAt": { "type": "string", "format": "date-time" }
16582
+ "id": {
16583
+ "type": "string",
16584
+ "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$",
16585
+ "description": "The ID of the API key"
16586
+ },
16587
+ "name": { "type": "string", "description": "The name for the API key" },
16588
+ "permissions": {
16589
+ "type": "array",
16590
+ "items": {
16591
+ "enum": [
16592
+ "entries",
16593
+ "read:entries",
16594
+ "versions",
16595
+ "read:versions",
16596
+ "publishing",
16597
+ "read:publishing",
16598
+ "collections",
16599
+ "read:collections",
16600
+ "memberships",
16601
+ "read:memberships",
16602
+ "roles",
16603
+ "read:roles",
16604
+ "webhooks",
16605
+ "read:webhooks",
16606
+ "ai-answers"
16607
+ ],
16608
+ "type": "string"
16609
+ },
16610
+ "description": "The permissions of the API key"
16611
+ },
16612
+ "collectionIDs": {
16613
+ "type": "array",
16614
+ "items": { "type": "string", "pattern": "^coll_[A-Za-z\\d]{1,22}$" },
16615
+ "description": "Publishable keys: the collections, with their descendants, that the key can read; none for all"
16616
+ },
16617
+ "allowedOrigins": {
16618
+ "type": "array",
16619
+ "items": { "type": "string" },
16620
+ "description": "Publishable keys: the browser origins that can use the key, with localhost"
16621
+ },
16622
+ "createdAt": {
16623
+ "type": "string",
16624
+ "format": "date-time",
16625
+ "description": "The creation date"
16626
+ },
16627
+ "updatedAt": {
16628
+ "type": "string",
16629
+ "format": "date-time",
16630
+ "description": "The last update date"
16631
+ },
16632
+ "value": { "type": "string", "description": "The raw key, which is public" }
16456
16633
  },
16457
- "required": ["key", "updatedAt"]
16634
+ "required": [
16635
+ "id",
16636
+ "name",
16637
+ "permissions",
16638
+ "collectionIDs",
16639
+ "allowedOrigins",
16640
+ "createdAt",
16641
+ "updatedAt",
16642
+ "value"
16643
+ ]
16458
16644
  }
16459
16645
  }
16460
16646
  }
@@ -16725,27 +16911,61 @@
16725
16911
  }
16726
16912
  },
16727
16913
  "security": [{ "extensionToken": [] }]
16728
- },
16729
- "delete": {
16730
- "operationId": "extensions.deleteSelfStorageEntry",
16731
- "summary": "Delete a storage entry",
16732
- "description": "Deletes an entry of the extension's storage, if it exists.",
16914
+ }
16915
+ },
16916
+ "/extensions/self/publishable-keys/{keyID}": {
16917
+ "patch": {
16918
+ "operationId": "extensions.updateSelfPublishableKey",
16919
+ "summary": "Update a managed publishable key",
16920
+ "description": "Changes the name, collections, origins, or AI answers of a key that the extension manages. Requires the publishable-keys permission.",
16733
16921
  "tags": ["extensions"],
16734
16922
  "parameters": [
16735
16923
  {
16736
- "name": "key",
16737
- "in": "query",
16924
+ "name": "keyID",
16925
+ "in": "path",
16738
16926
  "required": true,
16739
- "schema": {
16740
- "type": "string",
16741
- "minLength": 1,
16742
- "maxLength": 256,
16743
- "pattern": "^\\P{Cc}+$"
16744
- },
16745
- "allowEmptyValue": true,
16746
- "allowReserved": true
16927
+ "schema": { "type": "string", "pattern": "^adn_[A-Za-z\\d]{1,22}$" }
16747
16928
  }
16748
16929
  ],
16930
+ "requestBody": {
16931
+ "required": false,
16932
+ "content": {
16933
+ "application/json": {
16934
+ "schema": {
16935
+ "type": "object",
16936
+ "properties": {
16937
+ "name": {
16938
+ "type": "string",
16939
+ "minLength": 1,
16940
+ "maxLength": 100,
16941
+ "description": "A name shown in API settings"
16942
+ },
16943
+ "collectionIDs": {
16944
+ "type": "array",
16945
+ "minItems": 1,
16946
+ "maxItems": 20,
16947
+ "items": { "type": "string", "pattern": "^coll_[A-Za-z\\d]{1,22}$" },
16948
+ "description": "Collections, with their descendants, that the key can read"
16949
+ },
16950
+ "allowedOrigins": {
16951
+ "type": "array",
16952
+ "minItems": 1,
16953
+ "maxItems": 20,
16954
+ "items": {
16955
+ "type": "string",
16956
+ "pattern": "^https?:\\/\\/[a-z\\d.-]+(?::\\d{1,5})?$"
16957
+ },
16958
+ "description": "Browser origins that can use the key, besides localhost"
16959
+ },
16960
+ "answers": {
16961
+ "type": "boolean",
16962
+ "description": "Whether the key can ask for AI answers; needs the extension's ai-answers permission"
16963
+ }
16964
+ }
16965
+ }
16966
+ }
16967
+ }
16968
+ },
16749
16969
  "responses": {
16750
16970
  "200": {
16751
16971
  "description": "OK",
@@ -16753,8 +16973,69 @@
16753
16973
  "application/json": {
16754
16974
  "schema": {
16755
16975
  "type": "object",
16756
- "properties": { "deleted": { "type": "boolean" } },
16757
- "required": ["deleted"]
16976
+ "properties": {
16977
+ "id": {
16978
+ "type": "string",
16979
+ "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$",
16980
+ "description": "The ID of the API key"
16981
+ },
16982
+ "name": { "type": "string", "description": "The name for the API key" },
16983
+ "permissions": {
16984
+ "type": "array",
16985
+ "items": {
16986
+ "enum": [
16987
+ "entries",
16988
+ "read:entries",
16989
+ "versions",
16990
+ "read:versions",
16991
+ "publishing",
16992
+ "read:publishing",
16993
+ "collections",
16994
+ "read:collections",
16995
+ "memberships",
16996
+ "read:memberships",
16997
+ "roles",
16998
+ "read:roles",
16999
+ "webhooks",
17000
+ "read:webhooks",
17001
+ "ai-answers"
17002
+ ],
17003
+ "type": "string"
17004
+ },
17005
+ "description": "The permissions of the API key"
17006
+ },
17007
+ "collectionIDs": {
17008
+ "type": "array",
17009
+ "items": { "type": "string", "pattern": "^coll_[A-Za-z\\d]{1,22}$" },
17010
+ "description": "Publishable keys: the collections, with their descendants, that the key can read; none for all"
17011
+ },
17012
+ "allowedOrigins": {
17013
+ "type": "array",
17014
+ "items": { "type": "string" },
17015
+ "description": "Publishable keys: the browser origins that can use the key, with localhost"
17016
+ },
17017
+ "createdAt": {
17018
+ "type": "string",
17019
+ "format": "date-time",
17020
+ "description": "The creation date"
17021
+ },
17022
+ "updatedAt": {
17023
+ "type": "string",
17024
+ "format": "date-time",
17025
+ "description": "The last update date"
17026
+ },
17027
+ "value": { "type": "string", "description": "The raw key, which is public" }
17028
+ },
17029
+ "required": [
17030
+ "id",
17031
+ "name",
17032
+ "permissions",
17033
+ "collectionIDs",
17034
+ "allowedOrigins",
17035
+ "createdAt",
17036
+ "updatedAt",
17037
+ "value"
17038
+ ]
16758
17039
  }
16759
17040
  }
16760
17041
  }
@@ -17025,41 +17306,18 @@
17025
17306
  }
17026
17307
  },
17027
17308
  "security": [{ "extensionToken": [] }]
17028
- }
17029
- },
17030
- "/extensions/self/storage": {
17031
- "get": {
17032
- "operationId": "extensions.listSelfStorageEntries",
17033
- "summary": "List storage entries",
17034
- "description": "Lists the extension's storage entries in key order, optionally with a key prefix. A page ends early when its values reach 192 KiB.",
17309
+ },
17310
+ "delete": {
17311
+ "operationId": "extensions.deleteSelfPublishableKey",
17312
+ "summary": "Delete a managed publishable key",
17313
+ "description": "Deletes a key that the extension manages, if it exists. Requires the publishable-keys permission.",
17035
17314
  "tags": ["extensions"],
17036
17315
  "parameters": [
17037
17316
  {
17038
- "name": "prefix",
17039
- "in": "query",
17040
- "schema": { "type": "string", "maxLength": 256 },
17041
- "allowEmptyValue": true,
17042
- "allowReserved": true
17043
- },
17044
- {
17045
- "name": "after",
17046
- "in": "query",
17047
- "schema": {
17048
- "type": "string",
17049
- "minLength": 1,
17050
- "maxLength": 256,
17051
- "pattern": "^\\P{Cc}+$",
17052
- "description": "Return entries after this key"
17053
- },
17054
- "allowEmptyValue": true,
17055
- "allowReserved": true
17056
- },
17057
- {
17058
- "name": "limit",
17059
- "in": "query",
17060
- "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 100 },
17061
- "allowEmptyValue": true,
17062
- "allowReserved": true
17317
+ "name": "keyID",
17318
+ "in": "path",
17319
+ "required": true,
17320
+ "schema": { "type": "string", "pattern": "^adn_[A-Za-z\\d]{1,22}$" }
17063
17321
  }
17064
17322
  ],
17065
17323
  "responses": {
@@ -17069,70 +17327,8 @@
17069
17327
  "application/json": {
17070
17328
  "schema": {
17071
17329
  "type": "object",
17072
- "properties": {
17073
- "data": {
17074
- "type": "array",
17075
- "items": {
17076
- "type": "object",
17077
- "properties": {
17078
- "key": { "type": "string" },
17079
- "value": {
17080
- "anyOf": [
17081
- { "type": "string" },
17082
- { "type": "number" },
17083
- { "type": "boolean" },
17084
- { "type": "null" },
17085
- {
17086
- "type": "array",
17087
- "items": {
17088
- "anyOf": [
17089
- { "type": "string" },
17090
- { "type": "number" },
17091
- { "type": "boolean" },
17092
- { "type": "null" },
17093
- {
17094
- "type": "array",
17095
- "items": { "anyOf": [{}, { "type": "null" }] }
17096
- },
17097
- {
17098
- "type": "object",
17099
- "propertyNames": { "type": "string" },
17100
- "additionalProperties": {}
17101
- }
17102
- ]
17103
- }
17104
- },
17105
- {
17106
- "type": "object",
17107
- "propertyNames": { "type": "string" },
17108
- "additionalProperties": {
17109
- "anyOf": [
17110
- { "type": "string" },
17111
- { "type": "number" },
17112
- { "type": "boolean" },
17113
- { "type": "null" },
17114
- {
17115
- "type": "array",
17116
- "items": { "anyOf": [{}, { "type": "null" }] }
17117
- },
17118
- {
17119
- "type": "object",
17120
- "propertyNames": { "type": "string" },
17121
- "additionalProperties": {}
17122
- }
17123
- ]
17124
- }
17125
- }
17126
- ]
17127
- },
17128
- "updatedAt": { "type": "string", "format": "date-time" }
17129
- },
17130
- "required": ["key", "value", "updatedAt"]
17131
- }
17132
- },
17133
- "hasMore": { "type": "boolean" }
17134
- },
17135
- "required": ["data", "hasMore"]
17330
+ "properties": { "deleted": { "type": "boolean" } },
17331
+ "required": ["deleted"]
17136
17332
  }
17137
17333
  }
17138
17334
  }
@@ -17284,7 +17480,2359 @@
17284
17480
  "message": { "type": "string", "default": "Conflict" },
17285
17481
  "data": { "$ref": "#/components/schemas/ErrorData" }
17286
17482
  },
17287
- "required": ["defined", "code", "status", "message"]
17483
+ "required": ["defined", "code", "status", "message"]
17484
+ },
17485
+ {
17486
+ "type": "object",
17487
+ "properties": {
17488
+ "defined": { "const": false },
17489
+ "code": { "type": "string" },
17490
+ "status": { "type": "number" },
17491
+ "message": { "type": "string" },
17492
+ "data": {}
17493
+ },
17494
+ "required": ["defined", "code", "status", "message"]
17495
+ }
17496
+ ]
17497
+ }
17498
+ }
17499
+ }
17500
+ },
17501
+ "429": {
17502
+ "description": "429",
17503
+ "content": {
17504
+ "application/json": {
17505
+ "schema": {
17506
+ "oneOf": [
17507
+ {
17508
+ "type": "object",
17509
+ "properties": {
17510
+ "defined": { "const": true },
17511
+ "code": { "const": "TOO_MANY_REQUESTS" },
17512
+ "status": { "const": 429 },
17513
+ "message": { "type": "string", "default": "Too Many Requests" },
17514
+ "data": { "$ref": "#/components/schemas/RateLimitErrorData" }
17515
+ },
17516
+ "required": ["defined", "code", "status", "message"]
17517
+ },
17518
+ {
17519
+ "type": "object",
17520
+ "properties": {
17521
+ "defined": { "const": false },
17522
+ "code": { "type": "string" },
17523
+ "status": { "type": "number" },
17524
+ "message": { "type": "string" },
17525
+ "data": {}
17526
+ },
17527
+ "required": ["defined", "code", "status", "message"]
17528
+ }
17529
+ ]
17530
+ }
17531
+ }
17532
+ }
17533
+ },
17534
+ "500": {
17535
+ "description": "500",
17536
+ "content": {
17537
+ "application/json": {
17538
+ "schema": {
17539
+ "oneOf": [
17540
+ {
17541
+ "type": "object",
17542
+ "properties": {
17543
+ "defined": { "const": true },
17544
+ "code": { "const": "INTERNAL_SERVER_ERROR" },
17545
+ "status": { "const": 500 },
17546
+ "message": { "type": "string", "default": "Internal Server Error" },
17547
+ "data": { "$ref": "#/components/schemas/ErrorData" }
17548
+ },
17549
+ "required": ["defined", "code", "status", "message"]
17550
+ },
17551
+ {
17552
+ "type": "object",
17553
+ "properties": {
17554
+ "defined": { "const": false },
17555
+ "code": { "type": "string" },
17556
+ "status": { "type": "number" },
17557
+ "message": { "type": "string" },
17558
+ "data": {}
17559
+ },
17560
+ "required": ["defined", "code", "status", "message"]
17561
+ }
17562
+ ]
17563
+ }
17564
+ }
17565
+ }
17566
+ },
17567
+ "503": {
17568
+ "description": "503",
17569
+ "content": {
17570
+ "application/json": {
17571
+ "schema": {
17572
+ "oneOf": [
17573
+ {
17574
+ "type": "object",
17575
+ "properties": {
17576
+ "defined": { "const": true },
17577
+ "code": { "const": "SERVICE_UNAVAILABLE" },
17578
+ "status": { "const": 503 },
17579
+ "message": { "type": "string", "default": "Service Unavailable" },
17580
+ "data": { "$ref": "#/components/schemas/ErrorData" }
17581
+ },
17582
+ "required": ["defined", "code", "status", "message"]
17583
+ },
17584
+ {
17585
+ "type": "object",
17586
+ "properties": {
17587
+ "defined": { "const": false },
17588
+ "code": { "type": "string" },
17589
+ "status": { "type": "number" },
17590
+ "message": { "type": "string" },
17591
+ "data": {}
17592
+ },
17593
+ "required": ["defined", "code", "status", "message"]
17594
+ }
17595
+ ]
17596
+ }
17597
+ }
17598
+ }
17599
+ }
17600
+ },
17601
+ "security": [{ "extensionToken": [] }]
17602
+ }
17603
+ },
17604
+ "/extensions/self/storage/entry": {
17605
+ "get": {
17606
+ "operationId": "extensions.getSelfStorageEntry",
17607
+ "summary": "Get a storage entry",
17608
+ "description": "Returns an entry of the extension's storage, or NOT_FOUND.",
17609
+ "tags": ["extensions"],
17610
+ "parameters": [
17611
+ {
17612
+ "name": "key",
17613
+ "in": "query",
17614
+ "required": true,
17615
+ "schema": {
17616
+ "type": "string",
17617
+ "minLength": 1,
17618
+ "maxLength": 256,
17619
+ "pattern": "^\\P{Cc}+$"
17620
+ },
17621
+ "allowEmptyValue": true,
17622
+ "allowReserved": true
17623
+ }
17624
+ ],
17625
+ "responses": {
17626
+ "200": {
17627
+ "description": "OK",
17628
+ "content": {
17629
+ "application/json": {
17630
+ "schema": {
17631
+ "type": "object",
17632
+ "properties": {
17633
+ "key": { "type": "string" },
17634
+ "value": {
17635
+ "anyOf": [
17636
+ { "type": "string" },
17637
+ { "type": "number" },
17638
+ { "type": "boolean" },
17639
+ { "type": "null" },
17640
+ {
17641
+ "type": "array",
17642
+ "items": {
17643
+ "anyOf": [
17644
+ { "type": "string" },
17645
+ { "type": "number" },
17646
+ { "type": "boolean" },
17647
+ { "type": "null" },
17648
+ { "type": "array", "items": { "anyOf": [{}, { "type": "null" }] } },
17649
+ {
17650
+ "type": "object",
17651
+ "propertyNames": { "type": "string" },
17652
+ "additionalProperties": {}
17653
+ }
17654
+ ]
17655
+ }
17656
+ },
17657
+ {
17658
+ "type": "object",
17659
+ "propertyNames": { "type": "string" },
17660
+ "additionalProperties": {
17661
+ "anyOf": [
17662
+ { "type": "string" },
17663
+ { "type": "number" },
17664
+ { "type": "boolean" },
17665
+ { "type": "null" },
17666
+ { "type": "array", "items": { "anyOf": [{}, { "type": "null" }] } },
17667
+ {
17668
+ "type": "object",
17669
+ "propertyNames": { "type": "string" },
17670
+ "additionalProperties": {}
17671
+ }
17672
+ ]
17673
+ }
17674
+ }
17675
+ ]
17676
+ },
17677
+ "updatedAt": { "type": "string", "format": "date-time" }
17678
+ },
17679
+ "required": ["key", "value", "updatedAt"]
17680
+ }
17681
+ }
17682
+ }
17683
+ },
17684
+ "400": {
17685
+ "description": "400",
17686
+ "content": {
17687
+ "application/json": {
17688
+ "schema": {
17689
+ "oneOf": [
17690
+ {
17691
+ "type": "object",
17692
+ "properties": {
17693
+ "defined": { "const": true },
17694
+ "code": { "const": "BAD_REQUEST" },
17695
+ "status": { "const": 400 },
17696
+ "message": { "type": "string", "default": "Bad Request" },
17697
+ "data": { "$ref": "#/components/schemas/ValidationErrorData" }
17698
+ },
17699
+ "required": ["defined", "code", "status", "message"]
17700
+ },
17701
+ {
17702
+ "type": "object",
17703
+ "properties": {
17704
+ "defined": { "const": false },
17705
+ "code": { "type": "string" },
17706
+ "status": { "type": "number" },
17707
+ "message": { "type": "string" },
17708
+ "data": {}
17709
+ },
17710
+ "required": ["defined", "code", "status", "message"]
17711
+ }
17712
+ ]
17713
+ }
17714
+ }
17715
+ }
17716
+ },
17717
+ "401": {
17718
+ "description": "401",
17719
+ "content": {
17720
+ "application/json": {
17721
+ "schema": {
17722
+ "oneOf": [
17723
+ {
17724
+ "type": "object",
17725
+ "properties": {
17726
+ "defined": { "const": true },
17727
+ "code": { "const": "UNAUTHORIZED" },
17728
+ "status": { "const": 401 },
17729
+ "message": { "type": "string", "default": "Unauthorized" },
17730
+ "data": { "$ref": "#/components/schemas/ErrorData" }
17731
+ },
17732
+ "required": ["defined", "code", "status", "message"]
17733
+ },
17734
+ {
17735
+ "type": "object",
17736
+ "properties": {
17737
+ "defined": { "const": false },
17738
+ "code": { "type": "string" },
17739
+ "status": { "type": "number" },
17740
+ "message": { "type": "string" },
17741
+ "data": {}
17742
+ },
17743
+ "required": ["defined", "code", "status", "message"]
17744
+ }
17745
+ ]
17746
+ }
17747
+ }
17748
+ }
17749
+ },
17750
+ "403": {
17751
+ "description": "403",
17752
+ "content": {
17753
+ "application/json": {
17754
+ "schema": {
17755
+ "oneOf": [
17756
+ {
17757
+ "type": "object",
17758
+ "properties": {
17759
+ "defined": { "const": true },
17760
+ "code": { "const": "FORBIDDEN" },
17761
+ "status": { "const": 403 },
17762
+ "message": { "type": "string", "default": "Forbidden" },
17763
+ "data": { "$ref": "#/components/schemas/ForbiddenErrorData" }
17764
+ },
17765
+ "required": ["defined", "code", "status", "message"]
17766
+ },
17767
+ {
17768
+ "type": "object",
17769
+ "properties": {
17770
+ "defined": { "const": false },
17771
+ "code": { "type": "string" },
17772
+ "status": { "type": "number" },
17773
+ "message": { "type": "string" },
17774
+ "data": {}
17775
+ },
17776
+ "required": ["defined", "code", "status", "message"]
17777
+ }
17778
+ ]
17779
+ }
17780
+ }
17781
+ }
17782
+ },
17783
+ "404": {
17784
+ "description": "404",
17785
+ "content": {
17786
+ "application/json": {
17787
+ "schema": {
17788
+ "oneOf": [
17789
+ {
17790
+ "type": "object",
17791
+ "properties": {
17792
+ "defined": { "const": true },
17793
+ "code": { "const": "NOT_FOUND" },
17794
+ "status": { "const": 404 },
17795
+ "message": { "type": "string", "default": "Not Found" },
17796
+ "data": { "$ref": "#/components/schemas/ErrorData" }
17797
+ },
17798
+ "required": ["defined", "code", "status", "message"]
17799
+ },
17800
+ {
17801
+ "type": "object",
17802
+ "properties": {
17803
+ "defined": { "const": false },
17804
+ "code": { "type": "string" },
17805
+ "status": { "type": "number" },
17806
+ "message": { "type": "string" },
17807
+ "data": {}
17808
+ },
17809
+ "required": ["defined", "code", "status", "message"]
17810
+ }
17811
+ ]
17812
+ }
17813
+ }
17814
+ }
17815
+ },
17816
+ "409": {
17817
+ "description": "409",
17818
+ "content": {
17819
+ "application/json": {
17820
+ "schema": {
17821
+ "oneOf": [
17822
+ {
17823
+ "type": "object",
17824
+ "properties": {
17825
+ "defined": { "const": true },
17826
+ "code": { "const": "CONFLICT" },
17827
+ "status": { "const": 409 },
17828
+ "message": { "type": "string", "default": "Conflict" },
17829
+ "data": { "$ref": "#/components/schemas/ErrorData" }
17830
+ },
17831
+ "required": ["defined", "code", "status", "message"]
17832
+ },
17833
+ {
17834
+ "type": "object",
17835
+ "properties": {
17836
+ "defined": { "const": false },
17837
+ "code": { "type": "string" },
17838
+ "status": { "type": "number" },
17839
+ "message": { "type": "string" },
17840
+ "data": {}
17841
+ },
17842
+ "required": ["defined", "code", "status", "message"]
17843
+ }
17844
+ ]
17845
+ }
17846
+ }
17847
+ }
17848
+ },
17849
+ "429": {
17850
+ "description": "429",
17851
+ "content": {
17852
+ "application/json": {
17853
+ "schema": {
17854
+ "oneOf": [
17855
+ {
17856
+ "type": "object",
17857
+ "properties": {
17858
+ "defined": { "const": true },
17859
+ "code": { "const": "TOO_MANY_REQUESTS" },
17860
+ "status": { "const": 429 },
17861
+ "message": { "type": "string", "default": "Too Many Requests" },
17862
+ "data": { "$ref": "#/components/schemas/RateLimitErrorData" }
17863
+ },
17864
+ "required": ["defined", "code", "status", "message"]
17865
+ },
17866
+ {
17867
+ "type": "object",
17868
+ "properties": {
17869
+ "defined": { "const": false },
17870
+ "code": { "type": "string" },
17871
+ "status": { "type": "number" },
17872
+ "message": { "type": "string" },
17873
+ "data": {}
17874
+ },
17875
+ "required": ["defined", "code", "status", "message"]
17876
+ }
17877
+ ]
17878
+ }
17879
+ }
17880
+ }
17881
+ },
17882
+ "500": {
17883
+ "description": "500",
17884
+ "content": {
17885
+ "application/json": {
17886
+ "schema": {
17887
+ "oneOf": [
17888
+ {
17889
+ "type": "object",
17890
+ "properties": {
17891
+ "defined": { "const": true },
17892
+ "code": { "const": "INTERNAL_SERVER_ERROR" },
17893
+ "status": { "const": 500 },
17894
+ "message": { "type": "string", "default": "Internal Server Error" },
17895
+ "data": { "$ref": "#/components/schemas/ErrorData" }
17896
+ },
17897
+ "required": ["defined", "code", "status", "message"]
17898
+ },
17899
+ {
17900
+ "type": "object",
17901
+ "properties": {
17902
+ "defined": { "const": false },
17903
+ "code": { "type": "string" },
17904
+ "status": { "type": "number" },
17905
+ "message": { "type": "string" },
17906
+ "data": {}
17907
+ },
17908
+ "required": ["defined", "code", "status", "message"]
17909
+ }
17910
+ ]
17911
+ }
17912
+ }
17913
+ }
17914
+ },
17915
+ "503": {
17916
+ "description": "503",
17917
+ "content": {
17918
+ "application/json": {
17919
+ "schema": {
17920
+ "oneOf": [
17921
+ {
17922
+ "type": "object",
17923
+ "properties": {
17924
+ "defined": { "const": true },
17925
+ "code": { "const": "SERVICE_UNAVAILABLE" },
17926
+ "status": { "const": 503 },
17927
+ "message": { "type": "string", "default": "Service Unavailable" },
17928
+ "data": { "$ref": "#/components/schemas/ErrorData" }
17929
+ },
17930
+ "required": ["defined", "code", "status", "message"]
17931
+ },
17932
+ {
17933
+ "type": "object",
17934
+ "properties": {
17935
+ "defined": { "const": false },
17936
+ "code": { "type": "string" },
17937
+ "status": { "type": "number" },
17938
+ "message": { "type": "string" },
17939
+ "data": {}
17940
+ },
17941
+ "required": ["defined", "code", "status", "message"]
17942
+ }
17943
+ ]
17944
+ }
17945
+ }
17946
+ }
17947
+ }
17948
+ },
17949
+ "security": [{ "extensionToken": [] }]
17950
+ },
17951
+ "put": {
17952
+ "operationId": "extensions.setSelfStorageEntry",
17953
+ "summary": "Set a storage entry",
17954
+ "description": "Creates or replaces an entry of the extension's storage. Values are JSON up to 128 KiB; the storage holds up to 10,000 entries and 10 MiB.",
17955
+ "tags": ["extensions"],
17956
+ "requestBody": {
17957
+ "required": true,
17958
+ "content": {
17959
+ "application/json": {
17960
+ "schema": {
17961
+ "type": "object",
17962
+ "properties": {
17963
+ "key": {
17964
+ "type": "string",
17965
+ "minLength": 1,
17966
+ "maxLength": 256,
17967
+ "pattern": "^\\P{Cc}+$"
17968
+ },
17969
+ "value": {
17970
+ "anyOf": [
17971
+ { "type": "string" },
17972
+ { "type": "number" },
17973
+ { "type": "boolean" },
17974
+ { "type": "null" },
17975
+ {
17976
+ "type": "array",
17977
+ "items": {
17978
+ "anyOf": [
17979
+ { "type": "string" },
17980
+ { "type": "number" },
17981
+ { "type": "boolean" },
17982
+ { "type": "null" },
17983
+ { "type": "array", "items": {} },
17984
+ {
17985
+ "type": "object",
17986
+ "propertyNames": { "type": "string" },
17987
+ "additionalProperties": {}
17988
+ }
17989
+ ]
17990
+ }
17991
+ },
17992
+ {
17993
+ "type": "object",
17994
+ "propertyNames": { "type": "string" },
17995
+ "additionalProperties": {
17996
+ "anyOf": [
17997
+ { "type": "string" },
17998
+ { "type": "number" },
17999
+ { "type": "boolean" },
18000
+ { "type": "null" },
18001
+ { "type": "array", "items": {} },
18002
+ {
18003
+ "type": "object",
18004
+ "propertyNames": { "type": "string" },
18005
+ "additionalProperties": {}
18006
+ }
18007
+ ]
18008
+ }
18009
+ }
18010
+ ]
18011
+ }
18012
+ },
18013
+ "required": ["key", "value"]
18014
+ }
18015
+ }
18016
+ }
18017
+ },
18018
+ "responses": {
18019
+ "200": {
18020
+ "description": "OK",
18021
+ "content": {
18022
+ "application/json": {
18023
+ "schema": {
18024
+ "type": "object",
18025
+ "properties": {
18026
+ "key": { "type": "string" },
18027
+ "updatedAt": { "type": "string", "format": "date-time" }
18028
+ },
18029
+ "required": ["key", "updatedAt"]
18030
+ }
18031
+ }
18032
+ }
18033
+ },
18034
+ "400": {
18035
+ "description": "400",
18036
+ "content": {
18037
+ "application/json": {
18038
+ "schema": {
18039
+ "oneOf": [
18040
+ {
18041
+ "type": "object",
18042
+ "properties": {
18043
+ "defined": { "const": true },
18044
+ "code": { "const": "BAD_REQUEST" },
18045
+ "status": { "const": 400 },
18046
+ "message": { "type": "string", "default": "Bad Request" },
18047
+ "data": { "$ref": "#/components/schemas/ValidationErrorData" }
18048
+ },
18049
+ "required": ["defined", "code", "status", "message"]
18050
+ },
18051
+ {
18052
+ "type": "object",
18053
+ "properties": {
18054
+ "defined": { "const": false },
18055
+ "code": { "type": "string" },
18056
+ "status": { "type": "number" },
18057
+ "message": { "type": "string" },
18058
+ "data": {}
18059
+ },
18060
+ "required": ["defined", "code", "status", "message"]
18061
+ }
18062
+ ]
18063
+ }
18064
+ }
18065
+ }
18066
+ },
18067
+ "401": {
18068
+ "description": "401",
18069
+ "content": {
18070
+ "application/json": {
18071
+ "schema": {
18072
+ "oneOf": [
18073
+ {
18074
+ "type": "object",
18075
+ "properties": {
18076
+ "defined": { "const": true },
18077
+ "code": { "const": "UNAUTHORIZED" },
18078
+ "status": { "const": 401 },
18079
+ "message": { "type": "string", "default": "Unauthorized" },
18080
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18081
+ },
18082
+ "required": ["defined", "code", "status", "message"]
18083
+ },
18084
+ {
18085
+ "type": "object",
18086
+ "properties": {
18087
+ "defined": { "const": false },
18088
+ "code": { "type": "string" },
18089
+ "status": { "type": "number" },
18090
+ "message": { "type": "string" },
18091
+ "data": {}
18092
+ },
18093
+ "required": ["defined", "code", "status", "message"]
18094
+ }
18095
+ ]
18096
+ }
18097
+ }
18098
+ }
18099
+ },
18100
+ "403": {
18101
+ "description": "403",
18102
+ "content": {
18103
+ "application/json": {
18104
+ "schema": {
18105
+ "oneOf": [
18106
+ {
18107
+ "type": "object",
18108
+ "properties": {
18109
+ "defined": { "const": true },
18110
+ "code": { "const": "FORBIDDEN" },
18111
+ "status": { "const": 403 },
18112
+ "message": { "type": "string", "default": "Forbidden" },
18113
+ "data": { "$ref": "#/components/schemas/ForbiddenErrorData" }
18114
+ },
18115
+ "required": ["defined", "code", "status", "message"]
18116
+ },
18117
+ {
18118
+ "type": "object",
18119
+ "properties": {
18120
+ "defined": { "const": false },
18121
+ "code": { "type": "string" },
18122
+ "status": { "type": "number" },
18123
+ "message": { "type": "string" },
18124
+ "data": {}
18125
+ },
18126
+ "required": ["defined", "code", "status", "message"]
18127
+ }
18128
+ ]
18129
+ }
18130
+ }
18131
+ }
18132
+ },
18133
+ "404": {
18134
+ "description": "404",
18135
+ "content": {
18136
+ "application/json": {
18137
+ "schema": {
18138
+ "oneOf": [
18139
+ {
18140
+ "type": "object",
18141
+ "properties": {
18142
+ "defined": { "const": true },
18143
+ "code": { "const": "NOT_FOUND" },
18144
+ "status": { "const": 404 },
18145
+ "message": { "type": "string", "default": "Not Found" },
18146
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18147
+ },
18148
+ "required": ["defined", "code", "status", "message"]
18149
+ },
18150
+ {
18151
+ "type": "object",
18152
+ "properties": {
18153
+ "defined": { "const": false },
18154
+ "code": { "type": "string" },
18155
+ "status": { "type": "number" },
18156
+ "message": { "type": "string" },
18157
+ "data": {}
18158
+ },
18159
+ "required": ["defined", "code", "status", "message"]
18160
+ }
18161
+ ]
18162
+ }
18163
+ }
18164
+ }
18165
+ },
18166
+ "409": {
18167
+ "description": "409",
18168
+ "content": {
18169
+ "application/json": {
18170
+ "schema": {
18171
+ "oneOf": [
18172
+ {
18173
+ "type": "object",
18174
+ "properties": {
18175
+ "defined": { "const": true },
18176
+ "code": { "const": "CONFLICT" },
18177
+ "status": { "const": 409 },
18178
+ "message": { "type": "string", "default": "Conflict" },
18179
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18180
+ },
18181
+ "required": ["defined", "code", "status", "message"]
18182
+ },
18183
+ {
18184
+ "type": "object",
18185
+ "properties": {
18186
+ "defined": { "const": false },
18187
+ "code": { "type": "string" },
18188
+ "status": { "type": "number" },
18189
+ "message": { "type": "string" },
18190
+ "data": {}
18191
+ },
18192
+ "required": ["defined", "code", "status", "message"]
18193
+ }
18194
+ ]
18195
+ }
18196
+ }
18197
+ }
18198
+ },
18199
+ "429": {
18200
+ "description": "429",
18201
+ "content": {
18202
+ "application/json": {
18203
+ "schema": {
18204
+ "oneOf": [
18205
+ {
18206
+ "type": "object",
18207
+ "properties": {
18208
+ "defined": { "const": true },
18209
+ "code": { "const": "TOO_MANY_REQUESTS" },
18210
+ "status": { "const": 429 },
18211
+ "message": { "type": "string", "default": "Too Many Requests" },
18212
+ "data": { "$ref": "#/components/schemas/RateLimitErrorData" }
18213
+ },
18214
+ "required": ["defined", "code", "status", "message"]
18215
+ },
18216
+ {
18217
+ "type": "object",
18218
+ "properties": {
18219
+ "defined": { "const": false },
18220
+ "code": { "type": "string" },
18221
+ "status": { "type": "number" },
18222
+ "message": { "type": "string" },
18223
+ "data": {}
18224
+ },
18225
+ "required": ["defined", "code", "status", "message"]
18226
+ }
18227
+ ]
18228
+ }
18229
+ }
18230
+ }
18231
+ },
18232
+ "500": {
18233
+ "description": "500",
18234
+ "content": {
18235
+ "application/json": {
18236
+ "schema": {
18237
+ "oneOf": [
18238
+ {
18239
+ "type": "object",
18240
+ "properties": {
18241
+ "defined": { "const": true },
18242
+ "code": { "const": "INTERNAL_SERVER_ERROR" },
18243
+ "status": { "const": 500 },
18244
+ "message": { "type": "string", "default": "Internal Server Error" },
18245
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18246
+ },
18247
+ "required": ["defined", "code", "status", "message"]
18248
+ },
18249
+ {
18250
+ "type": "object",
18251
+ "properties": {
18252
+ "defined": { "const": false },
18253
+ "code": { "type": "string" },
18254
+ "status": { "type": "number" },
18255
+ "message": { "type": "string" },
18256
+ "data": {}
18257
+ },
18258
+ "required": ["defined", "code", "status", "message"]
18259
+ }
18260
+ ]
18261
+ }
18262
+ }
18263
+ }
18264
+ },
18265
+ "503": {
18266
+ "description": "503",
18267
+ "content": {
18268
+ "application/json": {
18269
+ "schema": {
18270
+ "oneOf": [
18271
+ {
18272
+ "type": "object",
18273
+ "properties": {
18274
+ "defined": { "const": true },
18275
+ "code": { "const": "SERVICE_UNAVAILABLE" },
18276
+ "status": { "const": 503 },
18277
+ "message": { "type": "string", "default": "Service Unavailable" },
18278
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18279
+ },
18280
+ "required": ["defined", "code", "status", "message"]
18281
+ },
18282
+ {
18283
+ "type": "object",
18284
+ "properties": {
18285
+ "defined": { "const": false },
18286
+ "code": { "type": "string" },
18287
+ "status": { "type": "number" },
18288
+ "message": { "type": "string" },
18289
+ "data": {}
18290
+ },
18291
+ "required": ["defined", "code", "status", "message"]
18292
+ }
18293
+ ]
18294
+ }
18295
+ }
18296
+ }
18297
+ }
18298
+ },
18299
+ "security": [{ "extensionToken": [] }]
18300
+ },
18301
+ "delete": {
18302
+ "operationId": "extensions.deleteSelfStorageEntry",
18303
+ "summary": "Delete a storage entry",
18304
+ "description": "Deletes an entry of the extension's storage, if it exists.",
18305
+ "tags": ["extensions"],
18306
+ "parameters": [
18307
+ {
18308
+ "name": "key",
18309
+ "in": "query",
18310
+ "required": true,
18311
+ "schema": {
18312
+ "type": "string",
18313
+ "minLength": 1,
18314
+ "maxLength": 256,
18315
+ "pattern": "^\\P{Cc}+$"
18316
+ },
18317
+ "allowEmptyValue": true,
18318
+ "allowReserved": true
18319
+ }
18320
+ ],
18321
+ "responses": {
18322
+ "200": {
18323
+ "description": "OK",
18324
+ "content": {
18325
+ "application/json": {
18326
+ "schema": {
18327
+ "type": "object",
18328
+ "properties": { "deleted": { "type": "boolean" } },
18329
+ "required": ["deleted"]
18330
+ }
18331
+ }
18332
+ }
18333
+ },
18334
+ "400": {
18335
+ "description": "400",
18336
+ "content": {
18337
+ "application/json": {
18338
+ "schema": {
18339
+ "oneOf": [
18340
+ {
18341
+ "type": "object",
18342
+ "properties": {
18343
+ "defined": { "const": true },
18344
+ "code": { "const": "BAD_REQUEST" },
18345
+ "status": { "const": 400 },
18346
+ "message": { "type": "string", "default": "Bad Request" },
18347
+ "data": { "$ref": "#/components/schemas/ValidationErrorData" }
18348
+ },
18349
+ "required": ["defined", "code", "status", "message"]
18350
+ },
18351
+ {
18352
+ "type": "object",
18353
+ "properties": {
18354
+ "defined": { "const": false },
18355
+ "code": { "type": "string" },
18356
+ "status": { "type": "number" },
18357
+ "message": { "type": "string" },
18358
+ "data": {}
18359
+ },
18360
+ "required": ["defined", "code", "status", "message"]
18361
+ }
18362
+ ]
18363
+ }
18364
+ }
18365
+ }
18366
+ },
18367
+ "401": {
18368
+ "description": "401",
18369
+ "content": {
18370
+ "application/json": {
18371
+ "schema": {
18372
+ "oneOf": [
18373
+ {
18374
+ "type": "object",
18375
+ "properties": {
18376
+ "defined": { "const": true },
18377
+ "code": { "const": "UNAUTHORIZED" },
18378
+ "status": { "const": 401 },
18379
+ "message": { "type": "string", "default": "Unauthorized" },
18380
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18381
+ },
18382
+ "required": ["defined", "code", "status", "message"]
18383
+ },
18384
+ {
18385
+ "type": "object",
18386
+ "properties": {
18387
+ "defined": { "const": false },
18388
+ "code": { "type": "string" },
18389
+ "status": { "type": "number" },
18390
+ "message": { "type": "string" },
18391
+ "data": {}
18392
+ },
18393
+ "required": ["defined", "code", "status", "message"]
18394
+ }
18395
+ ]
18396
+ }
18397
+ }
18398
+ }
18399
+ },
18400
+ "403": {
18401
+ "description": "403",
18402
+ "content": {
18403
+ "application/json": {
18404
+ "schema": {
18405
+ "oneOf": [
18406
+ {
18407
+ "type": "object",
18408
+ "properties": {
18409
+ "defined": { "const": true },
18410
+ "code": { "const": "FORBIDDEN" },
18411
+ "status": { "const": 403 },
18412
+ "message": { "type": "string", "default": "Forbidden" },
18413
+ "data": { "$ref": "#/components/schemas/ForbiddenErrorData" }
18414
+ },
18415
+ "required": ["defined", "code", "status", "message"]
18416
+ },
18417
+ {
18418
+ "type": "object",
18419
+ "properties": {
18420
+ "defined": { "const": false },
18421
+ "code": { "type": "string" },
18422
+ "status": { "type": "number" },
18423
+ "message": { "type": "string" },
18424
+ "data": {}
18425
+ },
18426
+ "required": ["defined", "code", "status", "message"]
18427
+ }
18428
+ ]
18429
+ }
18430
+ }
18431
+ }
18432
+ },
18433
+ "404": {
18434
+ "description": "404",
18435
+ "content": {
18436
+ "application/json": {
18437
+ "schema": {
18438
+ "oneOf": [
18439
+ {
18440
+ "type": "object",
18441
+ "properties": {
18442
+ "defined": { "const": true },
18443
+ "code": { "const": "NOT_FOUND" },
18444
+ "status": { "const": 404 },
18445
+ "message": { "type": "string", "default": "Not Found" },
18446
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18447
+ },
18448
+ "required": ["defined", "code", "status", "message"]
18449
+ },
18450
+ {
18451
+ "type": "object",
18452
+ "properties": {
18453
+ "defined": { "const": false },
18454
+ "code": { "type": "string" },
18455
+ "status": { "type": "number" },
18456
+ "message": { "type": "string" },
18457
+ "data": {}
18458
+ },
18459
+ "required": ["defined", "code", "status", "message"]
18460
+ }
18461
+ ]
18462
+ }
18463
+ }
18464
+ }
18465
+ },
18466
+ "409": {
18467
+ "description": "409",
18468
+ "content": {
18469
+ "application/json": {
18470
+ "schema": {
18471
+ "oneOf": [
18472
+ {
18473
+ "type": "object",
18474
+ "properties": {
18475
+ "defined": { "const": true },
18476
+ "code": { "const": "CONFLICT" },
18477
+ "status": { "const": 409 },
18478
+ "message": { "type": "string", "default": "Conflict" },
18479
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18480
+ },
18481
+ "required": ["defined", "code", "status", "message"]
18482
+ },
18483
+ {
18484
+ "type": "object",
18485
+ "properties": {
18486
+ "defined": { "const": false },
18487
+ "code": { "type": "string" },
18488
+ "status": { "type": "number" },
18489
+ "message": { "type": "string" },
18490
+ "data": {}
18491
+ },
18492
+ "required": ["defined", "code", "status", "message"]
18493
+ }
18494
+ ]
18495
+ }
18496
+ }
18497
+ }
18498
+ },
18499
+ "429": {
18500
+ "description": "429",
18501
+ "content": {
18502
+ "application/json": {
18503
+ "schema": {
18504
+ "oneOf": [
18505
+ {
18506
+ "type": "object",
18507
+ "properties": {
18508
+ "defined": { "const": true },
18509
+ "code": { "const": "TOO_MANY_REQUESTS" },
18510
+ "status": { "const": 429 },
18511
+ "message": { "type": "string", "default": "Too Many Requests" },
18512
+ "data": { "$ref": "#/components/schemas/RateLimitErrorData" }
18513
+ },
18514
+ "required": ["defined", "code", "status", "message"]
18515
+ },
18516
+ {
18517
+ "type": "object",
18518
+ "properties": {
18519
+ "defined": { "const": false },
18520
+ "code": { "type": "string" },
18521
+ "status": { "type": "number" },
18522
+ "message": { "type": "string" },
18523
+ "data": {}
18524
+ },
18525
+ "required": ["defined", "code", "status", "message"]
18526
+ }
18527
+ ]
18528
+ }
18529
+ }
18530
+ }
18531
+ },
18532
+ "500": {
18533
+ "description": "500",
18534
+ "content": {
18535
+ "application/json": {
18536
+ "schema": {
18537
+ "oneOf": [
18538
+ {
18539
+ "type": "object",
18540
+ "properties": {
18541
+ "defined": { "const": true },
18542
+ "code": { "const": "INTERNAL_SERVER_ERROR" },
18543
+ "status": { "const": 500 },
18544
+ "message": { "type": "string", "default": "Internal Server Error" },
18545
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18546
+ },
18547
+ "required": ["defined", "code", "status", "message"]
18548
+ },
18549
+ {
18550
+ "type": "object",
18551
+ "properties": {
18552
+ "defined": { "const": false },
18553
+ "code": { "type": "string" },
18554
+ "status": { "type": "number" },
18555
+ "message": { "type": "string" },
18556
+ "data": {}
18557
+ },
18558
+ "required": ["defined", "code", "status", "message"]
18559
+ }
18560
+ ]
18561
+ }
18562
+ }
18563
+ }
18564
+ },
18565
+ "503": {
18566
+ "description": "503",
18567
+ "content": {
18568
+ "application/json": {
18569
+ "schema": {
18570
+ "oneOf": [
18571
+ {
18572
+ "type": "object",
18573
+ "properties": {
18574
+ "defined": { "const": true },
18575
+ "code": { "const": "SERVICE_UNAVAILABLE" },
18576
+ "status": { "const": 503 },
18577
+ "message": { "type": "string", "default": "Service Unavailable" },
18578
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18579
+ },
18580
+ "required": ["defined", "code", "status", "message"]
18581
+ },
18582
+ {
18583
+ "type": "object",
18584
+ "properties": {
18585
+ "defined": { "const": false },
18586
+ "code": { "type": "string" },
18587
+ "status": { "type": "number" },
18588
+ "message": { "type": "string" },
18589
+ "data": {}
18590
+ },
18591
+ "required": ["defined", "code", "status", "message"]
18592
+ }
18593
+ ]
18594
+ }
18595
+ }
18596
+ }
18597
+ }
18598
+ },
18599
+ "security": [{ "extensionToken": [] }]
18600
+ }
18601
+ },
18602
+ "/extensions/self/storage": {
18603
+ "get": {
18604
+ "operationId": "extensions.listSelfStorageEntries",
18605
+ "summary": "List storage entries",
18606
+ "description": "Lists the extension's storage entries in key order, optionally with a key prefix. A page ends early when its values reach 192 KiB.",
18607
+ "tags": ["extensions"],
18608
+ "parameters": [
18609
+ {
18610
+ "name": "prefix",
18611
+ "in": "query",
18612
+ "schema": { "type": "string", "maxLength": 256 },
18613
+ "allowEmptyValue": true,
18614
+ "allowReserved": true
18615
+ },
18616
+ {
18617
+ "name": "after",
18618
+ "in": "query",
18619
+ "schema": {
18620
+ "type": "string",
18621
+ "minLength": 1,
18622
+ "maxLength": 256,
18623
+ "pattern": "^\\P{Cc}+$",
18624
+ "description": "Return entries after this key"
18625
+ },
18626
+ "allowEmptyValue": true,
18627
+ "allowReserved": true
18628
+ },
18629
+ {
18630
+ "name": "limit",
18631
+ "in": "query",
18632
+ "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 100 },
18633
+ "allowEmptyValue": true,
18634
+ "allowReserved": true
18635
+ }
18636
+ ],
18637
+ "responses": {
18638
+ "200": {
18639
+ "description": "OK",
18640
+ "content": {
18641
+ "application/json": {
18642
+ "schema": {
18643
+ "type": "object",
18644
+ "properties": {
18645
+ "data": {
18646
+ "type": "array",
18647
+ "items": {
18648
+ "type": "object",
18649
+ "properties": {
18650
+ "key": { "type": "string" },
18651
+ "value": {
18652
+ "anyOf": [
18653
+ { "type": "string" },
18654
+ { "type": "number" },
18655
+ { "type": "boolean" },
18656
+ { "type": "null" },
18657
+ {
18658
+ "type": "array",
18659
+ "items": {
18660
+ "anyOf": [
18661
+ { "type": "string" },
18662
+ { "type": "number" },
18663
+ { "type": "boolean" },
18664
+ { "type": "null" },
18665
+ {
18666
+ "type": "array",
18667
+ "items": { "anyOf": [{}, { "type": "null" }] }
18668
+ },
18669
+ {
18670
+ "type": "object",
18671
+ "propertyNames": { "type": "string" },
18672
+ "additionalProperties": {}
18673
+ }
18674
+ ]
18675
+ }
18676
+ },
18677
+ {
18678
+ "type": "object",
18679
+ "propertyNames": { "type": "string" },
18680
+ "additionalProperties": {
18681
+ "anyOf": [
18682
+ { "type": "string" },
18683
+ { "type": "number" },
18684
+ { "type": "boolean" },
18685
+ { "type": "null" },
18686
+ {
18687
+ "type": "array",
18688
+ "items": { "anyOf": [{}, { "type": "null" }] }
18689
+ },
18690
+ {
18691
+ "type": "object",
18692
+ "propertyNames": { "type": "string" },
18693
+ "additionalProperties": {}
18694
+ }
18695
+ ]
18696
+ }
18697
+ }
18698
+ ]
18699
+ },
18700
+ "updatedAt": { "type": "string", "format": "date-time" }
18701
+ },
18702
+ "required": ["key", "value", "updatedAt"]
18703
+ }
18704
+ },
18705
+ "hasMore": { "type": "boolean" }
18706
+ },
18707
+ "required": ["data", "hasMore"]
18708
+ }
18709
+ }
18710
+ }
18711
+ },
18712
+ "400": {
18713
+ "description": "400",
18714
+ "content": {
18715
+ "application/json": {
18716
+ "schema": {
18717
+ "oneOf": [
18718
+ {
18719
+ "type": "object",
18720
+ "properties": {
18721
+ "defined": { "const": true },
18722
+ "code": { "const": "BAD_REQUEST" },
18723
+ "status": { "const": 400 },
18724
+ "message": { "type": "string", "default": "Bad Request" },
18725
+ "data": { "$ref": "#/components/schemas/ValidationErrorData" }
18726
+ },
18727
+ "required": ["defined", "code", "status", "message"]
18728
+ },
18729
+ {
18730
+ "type": "object",
18731
+ "properties": {
18732
+ "defined": { "const": false },
18733
+ "code": { "type": "string" },
18734
+ "status": { "type": "number" },
18735
+ "message": { "type": "string" },
18736
+ "data": {}
18737
+ },
18738
+ "required": ["defined", "code", "status", "message"]
18739
+ }
18740
+ ]
18741
+ }
18742
+ }
18743
+ }
18744
+ },
18745
+ "401": {
18746
+ "description": "401",
18747
+ "content": {
18748
+ "application/json": {
18749
+ "schema": {
18750
+ "oneOf": [
18751
+ {
18752
+ "type": "object",
18753
+ "properties": {
18754
+ "defined": { "const": true },
18755
+ "code": { "const": "UNAUTHORIZED" },
18756
+ "status": { "const": 401 },
18757
+ "message": { "type": "string", "default": "Unauthorized" },
18758
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18759
+ },
18760
+ "required": ["defined", "code", "status", "message"]
18761
+ },
18762
+ {
18763
+ "type": "object",
18764
+ "properties": {
18765
+ "defined": { "const": false },
18766
+ "code": { "type": "string" },
18767
+ "status": { "type": "number" },
18768
+ "message": { "type": "string" },
18769
+ "data": {}
18770
+ },
18771
+ "required": ["defined", "code", "status", "message"]
18772
+ }
18773
+ ]
18774
+ }
18775
+ }
18776
+ }
18777
+ },
18778
+ "403": {
18779
+ "description": "403",
18780
+ "content": {
18781
+ "application/json": {
18782
+ "schema": {
18783
+ "oneOf": [
18784
+ {
18785
+ "type": "object",
18786
+ "properties": {
18787
+ "defined": { "const": true },
18788
+ "code": { "const": "FORBIDDEN" },
18789
+ "status": { "const": 403 },
18790
+ "message": { "type": "string", "default": "Forbidden" },
18791
+ "data": { "$ref": "#/components/schemas/ForbiddenErrorData" }
18792
+ },
18793
+ "required": ["defined", "code", "status", "message"]
18794
+ },
18795
+ {
18796
+ "type": "object",
18797
+ "properties": {
18798
+ "defined": { "const": false },
18799
+ "code": { "type": "string" },
18800
+ "status": { "type": "number" },
18801
+ "message": { "type": "string" },
18802
+ "data": {}
18803
+ },
18804
+ "required": ["defined", "code", "status", "message"]
18805
+ }
18806
+ ]
18807
+ }
18808
+ }
18809
+ }
18810
+ },
18811
+ "404": {
18812
+ "description": "404",
18813
+ "content": {
18814
+ "application/json": {
18815
+ "schema": {
18816
+ "oneOf": [
18817
+ {
18818
+ "type": "object",
18819
+ "properties": {
18820
+ "defined": { "const": true },
18821
+ "code": { "const": "NOT_FOUND" },
18822
+ "status": { "const": 404 },
18823
+ "message": { "type": "string", "default": "Not Found" },
18824
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18825
+ },
18826
+ "required": ["defined", "code", "status", "message"]
18827
+ },
18828
+ {
18829
+ "type": "object",
18830
+ "properties": {
18831
+ "defined": { "const": false },
18832
+ "code": { "type": "string" },
18833
+ "status": { "type": "number" },
18834
+ "message": { "type": "string" },
18835
+ "data": {}
18836
+ },
18837
+ "required": ["defined", "code", "status", "message"]
18838
+ }
18839
+ ]
18840
+ }
18841
+ }
18842
+ }
18843
+ },
18844
+ "409": {
18845
+ "description": "409",
18846
+ "content": {
18847
+ "application/json": {
18848
+ "schema": {
18849
+ "oneOf": [
18850
+ {
18851
+ "type": "object",
18852
+ "properties": {
18853
+ "defined": { "const": true },
18854
+ "code": { "const": "CONFLICT" },
18855
+ "status": { "const": 409 },
18856
+ "message": { "type": "string", "default": "Conflict" },
18857
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18858
+ },
18859
+ "required": ["defined", "code", "status", "message"]
18860
+ },
18861
+ {
18862
+ "type": "object",
18863
+ "properties": {
18864
+ "defined": { "const": false },
18865
+ "code": { "type": "string" },
18866
+ "status": { "type": "number" },
18867
+ "message": { "type": "string" },
18868
+ "data": {}
18869
+ },
18870
+ "required": ["defined", "code", "status", "message"]
18871
+ }
18872
+ ]
18873
+ }
18874
+ }
18875
+ }
18876
+ },
18877
+ "429": {
18878
+ "description": "429",
18879
+ "content": {
18880
+ "application/json": {
18881
+ "schema": {
18882
+ "oneOf": [
18883
+ {
18884
+ "type": "object",
18885
+ "properties": {
18886
+ "defined": { "const": true },
18887
+ "code": { "const": "TOO_MANY_REQUESTS" },
18888
+ "status": { "const": 429 },
18889
+ "message": { "type": "string", "default": "Too Many Requests" },
18890
+ "data": { "$ref": "#/components/schemas/RateLimitErrorData" }
18891
+ },
18892
+ "required": ["defined", "code", "status", "message"]
18893
+ },
18894
+ {
18895
+ "type": "object",
18896
+ "properties": {
18897
+ "defined": { "const": false },
18898
+ "code": { "type": "string" },
18899
+ "status": { "type": "number" },
18900
+ "message": { "type": "string" },
18901
+ "data": {}
18902
+ },
18903
+ "required": ["defined", "code", "status", "message"]
18904
+ }
18905
+ ]
18906
+ }
18907
+ }
18908
+ }
18909
+ },
18910
+ "500": {
18911
+ "description": "500",
18912
+ "content": {
18913
+ "application/json": {
18914
+ "schema": {
18915
+ "oneOf": [
18916
+ {
18917
+ "type": "object",
18918
+ "properties": {
18919
+ "defined": { "const": true },
18920
+ "code": { "const": "INTERNAL_SERVER_ERROR" },
18921
+ "status": { "const": 500 },
18922
+ "message": { "type": "string", "default": "Internal Server Error" },
18923
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18924
+ },
18925
+ "required": ["defined", "code", "status", "message"]
18926
+ },
18927
+ {
18928
+ "type": "object",
18929
+ "properties": {
18930
+ "defined": { "const": false },
18931
+ "code": { "type": "string" },
18932
+ "status": { "type": "number" },
18933
+ "message": { "type": "string" },
18934
+ "data": {}
18935
+ },
18936
+ "required": ["defined", "code", "status", "message"]
18937
+ }
18938
+ ]
18939
+ }
18940
+ }
18941
+ }
18942
+ },
18943
+ "503": {
18944
+ "description": "503",
18945
+ "content": {
18946
+ "application/json": {
18947
+ "schema": {
18948
+ "oneOf": [
18949
+ {
18950
+ "type": "object",
18951
+ "properties": {
18952
+ "defined": { "const": true },
18953
+ "code": { "const": "SERVICE_UNAVAILABLE" },
18954
+ "status": { "const": 503 },
18955
+ "message": { "type": "string", "default": "Service Unavailable" },
18956
+ "data": { "$ref": "#/components/schemas/ErrorData" }
18957
+ },
18958
+ "required": ["defined", "code", "status", "message"]
18959
+ },
18960
+ {
18961
+ "type": "object",
18962
+ "properties": {
18963
+ "defined": { "const": false },
18964
+ "code": { "type": "string" },
18965
+ "status": { "type": "number" },
18966
+ "message": { "type": "string" },
18967
+ "data": {}
18968
+ },
18969
+ "required": ["defined", "code", "status", "message"]
18970
+ }
18971
+ ]
18972
+ }
18973
+ }
18974
+ }
18975
+ }
18976
+ },
18977
+ "security": [{ "extensionToken": [] }]
18978
+ }
18979
+ },
18980
+ "/extensions/elements": {
18981
+ "get": {
18982
+ "operationId": "extensions.listElements",
18983
+ "summary": "List custom elements",
18984
+ "description": "The custom elements that the workspace's active extensions draw in the editor, e.g. Tabs: their props, whether they have content, which child blocks their content accepts, and the elements that belong inside them. Write them in MDX as <Name prop=\"value\">content</Name>. The editor guides edits by these rules and offers a clean-up; the API doesn't enforce them.\n\nRequired API key permissions: read:entries. Write permissions also grant read access for the same resource.",
18985
+ "tags": ["extensions"],
18986
+ "responses": {
18987
+ "200": {
18988
+ "description": "OK",
18989
+ "content": {
18990
+ "application/json": {
18991
+ "schema": {
18992
+ "type": "array",
18993
+ "items": {
18994
+ "type": "object",
18995
+ "properties": {
18996
+ "element": { "type": "string" },
18997
+ "name": { "type": "string" },
18998
+ "description": { "type": "string" },
18999
+ "content": {
19000
+ "type": "boolean",
19001
+ "description": "False for an element without content, written as <Name />"
19002
+ },
19003
+ "accepts": {
19004
+ "type": "object",
19005
+ "properties": {
19006
+ "elements": {
19007
+ "type": "array",
19008
+ "maxItems": 20,
19009
+ "items": {
19010
+ "type": "string",
19011
+ "maxLength": 100,
19012
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:\\.[A-Za-z][A-Za-z0-9_-]*)*$"
19013
+ }
19014
+ },
19015
+ "blocks": {
19016
+ "type": "array",
19017
+ "maxItems": 11,
19018
+ "items": { "type": "string" }
19019
+ }
19020
+ },
19021
+ "additionalProperties": false,
19022
+ "description": "The direct child blocks that its content accepts; without it, any blocks"
19023
+ },
19024
+ "rejects": {
19025
+ "type": "object",
19026
+ "properties": {
19027
+ "elements": {
19028
+ "type": "array",
19029
+ "maxItems": 20,
19030
+ "items": {
19031
+ "type": "string",
19032
+ "maxLength": 100,
19033
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:\\.[A-Za-z][A-Za-z0-9_-]*)*$"
19034
+ }
19035
+ },
19036
+ "blocks": {
19037
+ "type": "array",
19038
+ "maxItems": 11,
19039
+ "items": { "type": "string" }
19040
+ }
19041
+ },
19042
+ "additionalProperties": false,
19043
+ "description": "The direct child blocks that its content doesn't accept, even if `accepts` lists them"
19044
+ },
19045
+ "props": {
19046
+ "type": "array",
19047
+ "maxItems": 20,
19048
+ "items": {
19049
+ "anyOf": [
19050
+ {
19051
+ "type": "object",
19052
+ "properties": {
19053
+ "name": {
19054
+ "type": "string",
19055
+ "maxLength": 100,
19056
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
19057
+ },
19058
+ "title": { "type": "string", "minLength": 1, "maxLength": 60 },
19059
+ "description": {
19060
+ "type": "string",
19061
+ "minLength": 1,
19062
+ "maxLength": 200
19063
+ },
19064
+ "type": { "const": "string" },
19065
+ "enum": {
19066
+ "type": "array",
19067
+ "minItems": 1,
19068
+ "maxItems": 20,
19069
+ "items": { "type": "string", "minLength": 1, "maxLength": 100 }
19070
+ },
19071
+ "control": {
19072
+ "enum": ["input", "textarea", "icon", "link", "select", "toggle"],
19073
+ "type": "string"
19074
+ },
19075
+ "placeholder": {
19076
+ "type": "string",
19077
+ "minLength": 1,
19078
+ "maxLength": 100
19079
+ },
19080
+ "minLength": { "type": "integer", "minimum": 0, "maximum": 10000 },
19081
+ "maxLength": { "type": "integer", "minimum": 1, "maximum": 10000 },
19082
+ "default": { "type": "string" }
19083
+ },
19084
+ "required": ["name", "type"],
19085
+ "additionalProperties": false
19086
+ },
19087
+ {
19088
+ "type": "object",
19089
+ "properties": {
19090
+ "name": {
19091
+ "type": "string",
19092
+ "maxLength": 100,
19093
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
19094
+ },
19095
+ "title": { "type": "string", "minLength": 1, "maxLength": 60 },
19096
+ "description": {
19097
+ "type": "string",
19098
+ "minLength": 1,
19099
+ "maxLength": 200
19100
+ },
19101
+ "type": { "enum": ["number", "integer"], "type": "string" },
19102
+ "minimum": { "type": "number" },
19103
+ "maximum": { "type": "number" },
19104
+ "default": { "type": "number" }
19105
+ },
19106
+ "required": ["name", "type"],
19107
+ "additionalProperties": false
19108
+ },
19109
+ {
19110
+ "type": "object",
19111
+ "properties": {
19112
+ "name": {
19113
+ "type": "string",
19114
+ "maxLength": 100,
19115
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
19116
+ },
19117
+ "title": { "type": "string", "minLength": 1, "maxLength": 60 },
19118
+ "description": {
19119
+ "type": "string",
19120
+ "minLength": 1,
19121
+ "maxLength": 200
19122
+ },
19123
+ "type": { "const": "boolean" },
19124
+ "default": { "type": "boolean" }
19125
+ },
19126
+ "required": ["name", "type"],
19127
+ "additionalProperties": false
19128
+ }
19129
+ ]
19130
+ },
19131
+ "description": "The props, with their defaults, which a new element gets"
19132
+ },
19133
+ "extension": {
19134
+ "type": "string",
19135
+ "description": "The extension that renders it, e.g. andesine/pages"
19136
+ },
19137
+ "children": {
19138
+ "type": "array",
19139
+ "items": {
19140
+ "type": "object",
19141
+ "properties": {
19142
+ "element": { "type": "string" },
19143
+ "name": { "type": "string" },
19144
+ "description": { "type": "string" },
19145
+ "content": {
19146
+ "type": "boolean",
19147
+ "description": "False for an element without content, written as <Name />"
19148
+ },
19149
+ "accepts": {
19150
+ "type": "object",
19151
+ "properties": {
19152
+ "elements": {
19153
+ "type": "array",
19154
+ "maxItems": 20,
19155
+ "items": {
19156
+ "type": "string",
19157
+ "maxLength": 100,
19158
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:\\.[A-Za-z][A-Za-z0-9_-]*)*$"
19159
+ }
19160
+ },
19161
+ "blocks": {
19162
+ "type": "array",
19163
+ "maxItems": 11,
19164
+ "items": { "type": "string" }
19165
+ }
19166
+ },
19167
+ "additionalProperties": false,
19168
+ "description": "The direct child blocks that its content accepts; without it, any blocks"
19169
+ },
19170
+ "rejects": {
19171
+ "type": "object",
19172
+ "properties": {
19173
+ "elements": {
19174
+ "type": "array",
19175
+ "maxItems": 20,
19176
+ "items": {
19177
+ "type": "string",
19178
+ "maxLength": 100,
19179
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]*(?:\\.[A-Za-z][A-Za-z0-9_-]*)*$"
19180
+ }
19181
+ },
19182
+ "blocks": {
19183
+ "type": "array",
19184
+ "maxItems": 11,
19185
+ "items": { "type": "string" }
19186
+ }
19187
+ },
19188
+ "additionalProperties": false,
19189
+ "description": "The direct child blocks that its content doesn't accept, even if `accepts` lists them"
19190
+ },
19191
+ "props": {
19192
+ "type": "array",
19193
+ "maxItems": 20,
19194
+ "items": {
19195
+ "anyOf": [
19196
+ {
19197
+ "type": "object",
19198
+ "properties": {
19199
+ "name": {
19200
+ "type": "string",
19201
+ "maxLength": 100,
19202
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
19203
+ },
19204
+ "title": {
19205
+ "type": "string",
19206
+ "minLength": 1,
19207
+ "maxLength": 60
19208
+ },
19209
+ "description": {
19210
+ "type": "string",
19211
+ "minLength": 1,
19212
+ "maxLength": 200
19213
+ },
19214
+ "type": { "const": "string" },
19215
+ "enum": {
19216
+ "type": "array",
19217
+ "minItems": 1,
19218
+ "maxItems": 20,
19219
+ "items": {
19220
+ "type": "string",
19221
+ "minLength": 1,
19222
+ "maxLength": 100
19223
+ }
19224
+ },
19225
+ "control": {
19226
+ "enum": [
19227
+ "input",
19228
+ "textarea",
19229
+ "icon",
19230
+ "link",
19231
+ "select",
19232
+ "toggle"
19233
+ ],
19234
+ "type": "string"
19235
+ },
19236
+ "placeholder": {
19237
+ "type": "string",
19238
+ "minLength": 1,
19239
+ "maxLength": 100
19240
+ },
19241
+ "minLength": {
19242
+ "type": "integer",
19243
+ "minimum": 0,
19244
+ "maximum": 10000
19245
+ },
19246
+ "maxLength": {
19247
+ "type": "integer",
19248
+ "minimum": 1,
19249
+ "maximum": 10000
19250
+ },
19251
+ "default": { "type": "string" }
19252
+ },
19253
+ "required": ["name", "type"],
19254
+ "additionalProperties": false
19255
+ },
19256
+ {
19257
+ "type": "object",
19258
+ "properties": {
19259
+ "name": {
19260
+ "type": "string",
19261
+ "maxLength": 100,
19262
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
19263
+ },
19264
+ "title": {
19265
+ "type": "string",
19266
+ "minLength": 1,
19267
+ "maxLength": 60
19268
+ },
19269
+ "description": {
19270
+ "type": "string",
19271
+ "minLength": 1,
19272
+ "maxLength": 200
19273
+ },
19274
+ "type": { "enum": ["number", "integer"], "type": "string" },
19275
+ "minimum": { "type": "number" },
19276
+ "maximum": { "type": "number" },
19277
+ "default": { "type": "number" }
19278
+ },
19279
+ "required": ["name", "type"],
19280
+ "additionalProperties": false
19281
+ },
19282
+ {
19283
+ "type": "object",
19284
+ "properties": {
19285
+ "name": {
19286
+ "type": "string",
19287
+ "maxLength": 100,
19288
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
19289
+ },
19290
+ "title": {
19291
+ "type": "string",
19292
+ "minLength": 1,
19293
+ "maxLength": 60
19294
+ },
19295
+ "description": {
19296
+ "type": "string",
19297
+ "minLength": 1,
19298
+ "maxLength": 200
19299
+ },
19300
+ "type": { "const": "boolean" },
19301
+ "default": { "type": "boolean" }
19302
+ },
19303
+ "required": ["name", "type"],
19304
+ "additionalProperties": false
19305
+ }
19306
+ ]
19307
+ },
19308
+ "description": "The props, with their defaults, which a new element gets"
19309
+ }
19310
+ },
19311
+ "required": ["element", "content"]
19312
+ },
19313
+ "description": "Elements that belong inside this one, e.g. Tab in Tabs"
19314
+ }
19315
+ },
19316
+ "required": ["element", "name", "content", "extension", "children"]
19317
+ }
19318
+ }
19319
+ }
19320
+ }
19321
+ },
19322
+ "400": {
19323
+ "description": "400",
19324
+ "content": {
19325
+ "application/json": {
19326
+ "schema": {
19327
+ "oneOf": [
19328
+ {
19329
+ "type": "object",
19330
+ "properties": {
19331
+ "defined": { "const": true },
19332
+ "code": { "const": "BAD_REQUEST" },
19333
+ "status": { "const": 400 },
19334
+ "message": { "type": "string", "default": "Bad Request" },
19335
+ "data": { "$ref": "#/components/schemas/ValidationErrorData" }
19336
+ },
19337
+ "required": ["defined", "code", "status", "message"]
19338
+ },
19339
+ {
19340
+ "type": "object",
19341
+ "properties": {
19342
+ "defined": { "const": false },
19343
+ "code": { "type": "string" },
19344
+ "status": { "type": "number" },
19345
+ "message": { "type": "string" },
19346
+ "data": {}
19347
+ },
19348
+ "required": ["defined", "code", "status", "message"]
19349
+ }
19350
+ ]
19351
+ }
19352
+ }
19353
+ }
19354
+ },
19355
+ "401": {
19356
+ "description": "401",
19357
+ "content": {
19358
+ "application/json": {
19359
+ "schema": {
19360
+ "oneOf": [
19361
+ {
19362
+ "type": "object",
19363
+ "properties": {
19364
+ "defined": { "const": true },
19365
+ "code": { "const": "UNAUTHORIZED" },
19366
+ "status": { "const": 401 },
19367
+ "message": { "type": "string", "default": "Unauthorized" },
19368
+ "data": { "$ref": "#/components/schemas/ErrorData" }
19369
+ },
19370
+ "required": ["defined", "code", "status", "message"]
19371
+ },
19372
+ {
19373
+ "type": "object",
19374
+ "properties": {
19375
+ "defined": { "const": false },
19376
+ "code": { "type": "string" },
19377
+ "status": { "type": "number" },
19378
+ "message": { "type": "string" },
19379
+ "data": {}
19380
+ },
19381
+ "required": ["defined", "code", "status", "message"]
19382
+ }
19383
+ ]
19384
+ }
19385
+ }
19386
+ }
19387
+ },
19388
+ "403": {
19389
+ "description": "403",
19390
+ "content": {
19391
+ "application/json": {
19392
+ "schema": {
19393
+ "oneOf": [
19394
+ {
19395
+ "type": "object",
19396
+ "properties": {
19397
+ "defined": { "const": true },
19398
+ "code": { "const": "FORBIDDEN" },
19399
+ "status": { "const": 403 },
19400
+ "message": { "type": "string", "default": "Forbidden" },
19401
+ "data": { "$ref": "#/components/schemas/ForbiddenErrorData" }
19402
+ },
19403
+ "required": ["defined", "code", "status", "message"]
19404
+ },
19405
+ {
19406
+ "type": "object",
19407
+ "properties": {
19408
+ "defined": { "const": false },
19409
+ "code": { "type": "string" },
19410
+ "status": { "type": "number" },
19411
+ "message": { "type": "string" },
19412
+ "data": {}
19413
+ },
19414
+ "required": ["defined", "code", "status", "message"]
19415
+ }
19416
+ ]
19417
+ }
19418
+ }
19419
+ }
19420
+ },
19421
+ "404": {
19422
+ "description": "404",
19423
+ "content": {
19424
+ "application/json": {
19425
+ "schema": {
19426
+ "oneOf": [
19427
+ {
19428
+ "type": "object",
19429
+ "properties": {
19430
+ "defined": { "const": true },
19431
+ "code": { "const": "NOT_FOUND" },
19432
+ "status": { "const": 404 },
19433
+ "message": { "type": "string", "default": "Not Found" },
19434
+ "data": { "$ref": "#/components/schemas/ErrorData" }
19435
+ },
19436
+ "required": ["defined", "code", "status", "message"]
19437
+ },
19438
+ {
19439
+ "type": "object",
19440
+ "properties": {
19441
+ "defined": { "const": false },
19442
+ "code": { "type": "string" },
19443
+ "status": { "type": "number" },
19444
+ "message": { "type": "string" },
19445
+ "data": {}
19446
+ },
19447
+ "required": ["defined", "code", "status", "message"]
19448
+ }
19449
+ ]
19450
+ }
19451
+ }
19452
+ }
19453
+ },
19454
+ "409": {
19455
+ "description": "409",
19456
+ "content": {
19457
+ "application/json": {
19458
+ "schema": {
19459
+ "oneOf": [
19460
+ {
19461
+ "type": "object",
19462
+ "properties": {
19463
+ "defined": { "const": true },
19464
+ "code": { "const": "CONFLICT" },
19465
+ "status": { "const": 409 },
19466
+ "message": { "type": "string", "default": "Conflict" },
19467
+ "data": { "$ref": "#/components/schemas/ErrorData" }
19468
+ },
19469
+ "required": ["defined", "code", "status", "message"]
19470
+ },
19471
+ {
19472
+ "type": "object",
19473
+ "properties": {
19474
+ "defined": { "const": false },
19475
+ "code": { "type": "string" },
19476
+ "status": { "type": "number" },
19477
+ "message": { "type": "string" },
19478
+ "data": {}
19479
+ },
19480
+ "required": ["defined", "code", "status", "message"]
19481
+ }
19482
+ ]
19483
+ }
19484
+ }
19485
+ }
19486
+ },
19487
+ "429": {
19488
+ "description": "429",
19489
+ "content": {
19490
+ "application/json": {
19491
+ "schema": {
19492
+ "oneOf": [
19493
+ {
19494
+ "type": "object",
19495
+ "properties": {
19496
+ "defined": { "const": true },
19497
+ "code": { "const": "TOO_MANY_REQUESTS" },
19498
+ "status": { "const": 429 },
19499
+ "message": { "type": "string", "default": "Too Many Requests" },
19500
+ "data": { "$ref": "#/components/schemas/RateLimitErrorData" }
19501
+ },
19502
+ "required": ["defined", "code", "status", "message"]
19503
+ },
19504
+ {
19505
+ "type": "object",
19506
+ "properties": {
19507
+ "defined": { "const": false },
19508
+ "code": { "type": "string" },
19509
+ "status": { "type": "number" },
19510
+ "message": { "type": "string" },
19511
+ "data": {}
19512
+ },
19513
+ "required": ["defined", "code", "status", "message"]
19514
+ }
19515
+ ]
19516
+ }
19517
+ }
19518
+ }
19519
+ },
19520
+ "500": {
19521
+ "description": "500",
19522
+ "content": {
19523
+ "application/json": {
19524
+ "schema": {
19525
+ "oneOf": [
19526
+ {
19527
+ "type": "object",
19528
+ "properties": {
19529
+ "defined": { "const": true },
19530
+ "code": { "const": "INTERNAL_SERVER_ERROR" },
19531
+ "status": { "const": 500 },
19532
+ "message": { "type": "string", "default": "Internal Server Error" },
19533
+ "data": { "$ref": "#/components/schemas/ErrorData" }
19534
+ },
19535
+ "required": ["defined", "code", "status", "message"]
19536
+ },
19537
+ {
19538
+ "type": "object",
19539
+ "properties": {
19540
+ "defined": { "const": false },
19541
+ "code": { "type": "string" },
19542
+ "status": { "type": "number" },
19543
+ "message": { "type": "string" },
19544
+ "data": {}
19545
+ },
19546
+ "required": ["defined", "code", "status", "message"]
19547
+ }
19548
+ ]
19549
+ }
19550
+ }
19551
+ }
19552
+ },
19553
+ "503": {
19554
+ "description": "503",
19555
+ "content": {
19556
+ "application/json": {
19557
+ "schema": {
19558
+ "oneOf": [
19559
+ {
19560
+ "type": "object",
19561
+ "properties": {
19562
+ "defined": { "const": true },
19563
+ "code": { "const": "SERVICE_UNAVAILABLE" },
19564
+ "status": { "const": 503 },
19565
+ "message": { "type": "string", "default": "Service Unavailable" },
19566
+ "data": { "$ref": "#/components/schemas/ErrorData" }
19567
+ },
19568
+ "required": ["defined", "code", "status", "message"]
19569
+ },
19570
+ {
19571
+ "type": "object",
19572
+ "properties": {
19573
+ "defined": { "const": false },
19574
+ "code": { "type": "string" },
19575
+ "status": { "type": "number" },
19576
+ "message": { "type": "string" },
19577
+ "data": {}
19578
+ },
19579
+ "required": ["defined", "code", "status", "message"]
19580
+ }
19581
+ ]
19582
+ }
19583
+ }
19584
+ }
19585
+ }
19586
+ },
19587
+ "parameters": [
19588
+ {
19589
+ "name": "x-workspace-id",
19590
+ "in": "header",
19591
+ "required": false,
19592
+ "schema": { "type": "string" },
19593
+ "description": "Required for OAuth: ID of the workspace to access. API keys use their own workspace."
19594
+ }
19595
+ ]
19596
+ }
19597
+ },
19598
+ "/collections": {
19599
+ "post": {
19600
+ "operationId": "collections.create",
19601
+ "summary": "Create a collection",
19602
+ "description": "Creates a child collection. Without parentID, uses the workspace root. The name defaults to Untitled. Creation selects an available sibling name with a numeric suffix when needed. Names are trimmed and NFC-normalized. Derived URL slugs must be unique across sibling entries and collections, including case and punctuation variants. Names cannot contain a slash or equal a single dot or two dots. Restricted collections require a session with restricted_collections permission and the Pro plan; API keys cannot create them.\n\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.",
19603
+ "tags": ["collections"],
19604
+ "requestBody": {
19605
+ "required": true,
19606
+ "content": {
19607
+ "application/json": {
19608
+ "schema": {
19609
+ "type": "object",
19610
+ "properties": {
19611
+ "id": {
19612
+ "type": "string",
19613
+ "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$",
19614
+ "description": "ID of the collection"
19615
+ },
19616
+ "name": {
19617
+ "type": "string",
19618
+ "minLength": 1,
19619
+ "maxLength": 300,
19620
+ "description": "Name of the collection"
19621
+ },
19622
+ "parentID": {
19623
+ "type": "string",
19624
+ "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$",
19625
+ "description": "ID of the parent collection"
19626
+ },
19627
+ "parentPath": {
19628
+ "type": "string",
19629
+ "description": "Name path of the parent collection"
19630
+ },
19631
+ "parentSlugPath": {
19632
+ "type": "string",
19633
+ "description": "Slug path of the parent collection"
19634
+ },
19635
+ "restricted": {
19636
+ "type": "boolean",
19637
+ "description": "Whether to restrict access to the collection tree"
19638
+ }
19639
+ }
19640
+ },
19641
+ "example": { "name": "Documentation", "parentID": "coll_example" }
19642
+ }
19643
+ }
19644
+ },
19645
+ "responses": {
19646
+ "200": {
19647
+ "description": "OK",
19648
+ "content": {
19649
+ "application/json": { "schema": { "$ref": "#/components/schemas/Collection" } }
19650
+ }
19651
+ },
19652
+ "400": {
19653
+ "description": "400",
19654
+ "content": {
19655
+ "application/json": {
19656
+ "schema": {
19657
+ "oneOf": [
19658
+ {
19659
+ "type": "object",
19660
+ "properties": {
19661
+ "defined": { "const": true },
19662
+ "code": { "const": "BAD_REQUEST" },
19663
+ "status": { "const": 400 },
19664
+ "message": { "type": "string", "default": "Bad Request" },
19665
+ "data": { "$ref": "#/components/schemas/ValidationErrorData" }
19666
+ },
19667
+ "required": ["defined", "code", "status", "message"]
19668
+ },
19669
+ {
19670
+ "type": "object",
19671
+ "properties": {
19672
+ "defined": { "const": false },
19673
+ "code": { "type": "string" },
19674
+ "status": { "type": "number" },
19675
+ "message": { "type": "string" },
19676
+ "data": {}
19677
+ },
19678
+ "required": ["defined", "code", "status", "message"]
19679
+ }
19680
+ ]
19681
+ }
19682
+ }
19683
+ }
19684
+ },
19685
+ "401": {
19686
+ "description": "401",
19687
+ "content": {
19688
+ "application/json": {
19689
+ "schema": {
19690
+ "oneOf": [
19691
+ {
19692
+ "type": "object",
19693
+ "properties": {
19694
+ "defined": { "const": true },
19695
+ "code": { "const": "UNAUTHORIZED" },
19696
+ "status": { "const": 401 },
19697
+ "message": { "type": "string", "default": "Unauthorized" },
19698
+ "data": { "$ref": "#/components/schemas/ErrorData" }
19699
+ },
19700
+ "required": ["defined", "code", "status", "message"]
19701
+ },
19702
+ {
19703
+ "type": "object",
19704
+ "properties": {
19705
+ "defined": { "const": false },
19706
+ "code": { "type": "string" },
19707
+ "status": { "type": "number" },
19708
+ "message": { "type": "string" },
19709
+ "data": {}
19710
+ },
19711
+ "required": ["defined", "code", "status", "message"]
19712
+ }
19713
+ ]
19714
+ }
19715
+ }
19716
+ }
19717
+ },
19718
+ "403": {
19719
+ "description": "403",
19720
+ "content": {
19721
+ "application/json": {
19722
+ "schema": {
19723
+ "oneOf": [
19724
+ {
19725
+ "type": "object",
19726
+ "properties": {
19727
+ "defined": { "const": true },
19728
+ "code": { "const": "FORBIDDEN" },
19729
+ "status": { "const": 403 },
19730
+ "message": { "type": "string", "default": "Forbidden" },
19731
+ "data": { "$ref": "#/components/schemas/ForbiddenErrorData" }
19732
+ },
19733
+ "required": ["defined", "code", "status", "message"]
19734
+ },
19735
+ {
19736
+ "type": "object",
19737
+ "properties": {
19738
+ "defined": { "const": false },
19739
+ "code": { "type": "string" },
19740
+ "status": { "type": "number" },
19741
+ "message": { "type": "string" },
19742
+ "data": {}
19743
+ },
19744
+ "required": ["defined", "code", "status", "message"]
19745
+ }
19746
+ ]
19747
+ }
19748
+ }
19749
+ }
19750
+ },
19751
+ "404": {
19752
+ "description": "404",
19753
+ "content": {
19754
+ "application/json": {
19755
+ "schema": {
19756
+ "oneOf": [
19757
+ {
19758
+ "type": "object",
19759
+ "properties": {
19760
+ "defined": { "const": true },
19761
+ "code": { "const": "NOT_FOUND" },
19762
+ "status": { "const": 404 },
19763
+ "message": { "type": "string", "default": "Not Found" },
19764
+ "data": { "$ref": "#/components/schemas/ErrorData" }
19765
+ },
19766
+ "required": ["defined", "code", "status", "message"]
19767
+ },
19768
+ {
19769
+ "type": "object",
19770
+ "properties": {
19771
+ "defined": { "const": false },
19772
+ "code": { "type": "string" },
19773
+ "status": { "type": "number" },
19774
+ "message": { "type": "string" },
19775
+ "data": {}
19776
+ },
19777
+ "required": ["defined", "code", "status", "message"]
19778
+ }
19779
+ ]
19780
+ }
19781
+ }
19782
+ }
19783
+ },
19784
+ "409": {
19785
+ "description": "409",
19786
+ "content": {
19787
+ "application/json": {
19788
+ "schema": {
19789
+ "oneOf": [
19790
+ {
19791
+ "type": "object",
19792
+ "properties": {
19793
+ "defined": { "const": true },
19794
+ "code": { "const": "CONFLICT" },
19795
+ "status": { "const": 409 },
19796
+ "message": { "type": "string", "default": "Conflict" },
19797
+ "data": { "$ref": "#/components/schemas/ErrorData" }
19798
+ },
19799
+ "required": ["defined", "code", "status", "message"]
19800
+ },
19801
+ {
19802
+ "type": "object",
19803
+ "properties": {
19804
+ "defined": { "const": true },
19805
+ "code": { "const": "CONTENT_NAME_CONFLICT" },
19806
+ "status": { "const": 409 },
19807
+ "message": { "type": "string", "default": "CONTENT_NAME_CONFLICT" },
19808
+ "data": { "$ref": "#/components/schemas/ContentNameConflictErrorData" }
19809
+ },
19810
+ "required": ["defined", "code", "status", "message", "data"]
19811
+ },
19812
+ {
19813
+ "type": "object",
19814
+ "properties": {
19815
+ "defined": { "const": true },
19816
+ "code": { "const": "SCHEMA_FIELD_KEY_CONFLICT" },
19817
+ "status": { "const": 409 },
19818
+ "message": { "type": "string", "default": "SCHEMA_FIELD_KEY_CONFLICT" },
19819
+ "data": { "$ref": "#/components/schemas/SchemaFieldKeyConflictErrorData" }
19820
+ },
19821
+ "required": ["defined", "code", "status", "message", "data"]
19822
+ },
19823
+ {
19824
+ "type": "object",
19825
+ "properties": {
19826
+ "defined": { "const": true },
19827
+ "code": { "const": "SCHEMA_MIGRATION_IN_PROGRESS" },
19828
+ "status": { "const": 409 },
19829
+ "message": {
19830
+ "type": "string",
19831
+ "default": "A schema migration is in progress for this collection"
19832
+ },
19833
+ "data": { "$ref": "#/components/schemas/SchemaMigrationErrorData" }
19834
+ },
19835
+ "required": ["defined", "code", "status", "message", "data"]
17288
19836
  },
17289
19837
  {
17290
19838
  "type": "object",
@@ -17402,14 +19950,23 @@
17402
19950
  }
17403
19951
  }
17404
19952
  },
17405
- "security": [{ "extensionToken": [] }]
19953
+ "parameters": [
19954
+ {
19955
+ "name": "x-workspace-id",
19956
+ "in": "header",
19957
+ "required": false,
19958
+ "schema": { "type": "string" },
19959
+ "description": "Required for OAuth: ID of the workspace to access. API keys use their own workspace."
19960
+ }
19961
+ ],
19962
+ "x-sdk-example": { "name": "Documentation", "parentID": "coll_example" }
17406
19963
  }
17407
19964
  },
17408
- "/collections": {
19965
+ "/collections/bulk/delete": {
17409
19966
  "post": {
17410
- "operationId": "collections.create",
17411
- "summary": "Create a collection",
17412
- "description": "Creates a child collection. Without parentID, uses the workspace root. The name defaults to Untitled. Creation selects an available sibling name with a numeric suffix when needed. Names are trimmed and NFC-normalized. Derived URL slugs must be unique across sibling entries and collections, including case and punctuation variants. Names cannot contain a slash or equal a single dot or two dots. Restricted collections require a session with restricted_collections permission and the Pro plan; API keys cannot create them.\n\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.",
19967
+ "operationId": "collections.bulkDelete",
19968
+ "summary": "Delete collection trees",
19969
+ "description": "Soft-deletes the selected collections, their descendants, and their entries. The workspace root cannot be deleted. An active schema migration can block this action.\n\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.",
17413
19970
  "tags": ["collections"],
17414
19971
  "requestBody": {
17415
19972
  "required": true,
@@ -17418,37 +19975,17 @@
17418
19975
  "schema": {
17419
19976
  "type": "object",
17420
19977
  "properties": {
17421
- "id": {
17422
- "type": "string",
17423
- "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$",
17424
- "description": "ID of the collection"
17425
- },
17426
- "name": {
17427
- "type": "string",
17428
- "minLength": 1,
17429
- "maxLength": 300,
17430
- "description": "Name of the collection"
17431
- },
17432
- "parentID": {
17433
- "type": "string",
17434
- "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$",
17435
- "description": "ID of the parent collection"
17436
- },
17437
- "parentPath": {
17438
- "type": "string",
17439
- "description": "Name path of the parent collection"
17440
- },
17441
- "parentSlugPath": {
17442
- "type": "string",
17443
- "description": "Slug path of the parent collection"
17444
- },
17445
- "restricted": {
17446
- "type": "boolean",
17447
- "description": "Whether to restrict access to the collection tree"
19978
+ "ids": {
19979
+ "type": "array",
19980
+ "minItems": 1,
19981
+ "maxItems": 100,
19982
+ "items": { "type": "string", "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$" },
19983
+ "description": "IDs of the collections to delete"
17448
19984
  }
17449
- }
19985
+ },
19986
+ "required": ["ids"]
17450
19987
  },
17451
- "example": { "name": "Documentation", "parentID": "coll_example" }
19988
+ "example": { "ids": ["coll_example"] }
17452
19989
  }
17453
19990
  }
17454
19991
  },
@@ -17456,7 +19993,7 @@
17456
19993
  "200": {
17457
19994
  "description": "OK",
17458
19995
  "content": {
17459
- "application/json": { "schema": { "$ref": "#/components/schemas/Collection" } }
19996
+ "application/json": { "schema": { "anyOf": [{ "not": {} }, { "not": {} }] } }
17460
19997
  }
17461
19998
  },
17462
19999
  "400": {
@@ -17608,17 +20145,6 @@
17608
20145
  },
17609
20146
  "required": ["defined", "code", "status", "message"]
17610
20147
  },
17611
- {
17612
- "type": "object",
17613
- "properties": {
17614
- "defined": { "const": true },
17615
- "code": { "const": "CONTENT_NAME_CONFLICT" },
17616
- "status": { "const": 409 },
17617
- "message": { "type": "string", "default": "CONTENT_NAME_CONFLICT" },
17618
- "data": { "$ref": "#/components/schemas/ContentNameConflictErrorData" }
17619
- },
17620
- "required": ["defined", "code", "status", "message", "data"]
17621
- },
17622
20148
  {
17623
20149
  "type": "object",
17624
20150
  "properties": {
@@ -17769,36 +20295,35 @@
17769
20295
  "description": "Required for OAuth: ID of the workspace to access. API keys use their own workspace."
17770
20296
  }
17771
20297
  ],
17772
- "x-sdk-example": { "name": "Documentation", "parentID": "coll_example" }
20298
+ "x-sdk-example": { "ids": ["coll_example"] }
17773
20299
  }
17774
20300
  },
17775
- "/collections/bulk/delete": {
17776
- "post": {
17777
- "operationId": "collections.bulkDelete",
17778
- "summary": "Delete collection trees",
17779
- "description": "Soft-deletes the selected collections, their descendants, and their entries. The workspace root cannot be deleted. An active schema migration can block this action.\n\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.",
20301
+ "/collections/{id}": {
20302
+ "delete": {
20303
+ "operationId": "collections.delete",
20304
+ "summary": "Delete a collection tree",
20305
+ "description": "Soft-deletes the collection, its descendants, and their entries. The workspace root cannot be deleted. An active schema migration can block this action.\n\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.",
17780
20306
  "tags": ["collections"],
17781
- "requestBody": {
17782
- "required": true,
17783
- "content": {
17784
- "application/json": {
17785
- "schema": {
17786
- "type": "object",
17787
- "properties": {
17788
- "ids": {
17789
- "type": "array",
17790
- "minItems": 1,
17791
- "maxItems": 100,
17792
- "items": { "type": "string", "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$" },
17793
- "description": "IDs of the collections to delete"
17794
- }
17795
- },
17796
- "required": ["ids"]
17797
- },
17798
- "example": { "ids": ["coll_example"] }
17799
- }
20307
+ "parameters": [
20308
+ {
20309
+ "name": "id",
20310
+ "in": "path",
20311
+ "required": true,
20312
+ "schema": {
20313
+ "type": "string",
20314
+ "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$",
20315
+ "description": "ID of the collection to delete"
20316
+ },
20317
+ "example": "coll_example"
20318
+ },
20319
+ {
20320
+ "name": "x-workspace-id",
20321
+ "in": "header",
20322
+ "required": false,
20323
+ "schema": { "type": "string" },
20324
+ "description": "Required for OAuth: ID of the workspace to access. API keys use their own workspace."
17800
20325
  }
17801
- },
20326
+ ],
17802
20327
  "responses": {
17803
20328
  "200": {
17804
20329
  "description": "OK",
@@ -18096,23 +20621,12 @@
18096
20621
  }
18097
20622
  }
18098
20623
  },
18099
- "parameters": [
18100
- {
18101
- "name": "x-workspace-id",
18102
- "in": "header",
18103
- "required": false,
18104
- "schema": { "type": "string" },
18105
- "description": "Required for OAuth: ID of the workspace to access. API keys use their own workspace."
18106
- }
18107
- ],
18108
- "x-sdk-example": { "ids": ["coll_example"] }
18109
- }
18110
- },
18111
- "/collections/{id}": {
18112
- "delete": {
18113
- "operationId": "collections.delete",
18114
- "summary": "Delete a collection tree",
18115
- "description": "Soft-deletes the collection, its descendants, and their entries. The workspace root cannot be deleted. An active schema migration can block this action.\n\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.",
20624
+ "x-sdk-example": { "id": "coll_example" }
20625
+ },
20626
+ "put": {
20627
+ "operationId": "collections.update",
20628
+ "summary": "Rename a collection",
20629
+ "description": "Updates the collection name. Rejects names already used by a sibling entry or collection. An active schema migration can block this action.\n\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.",
18116
20630
  "tags": ["collections"],
18117
20631
  "parameters": [
18118
20632
  {
@@ -18122,7 +20636,7 @@
18122
20636
  "schema": {
18123
20637
  "type": "string",
18124
20638
  "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$",
18125
- "description": "ID of the collection to delete"
20639
+ "description": "ID of the collection to be updated"
18126
20640
  },
18127
20641
  "example": "coll_example"
18128
20642
  },
@@ -18134,6 +20648,31 @@
18134
20648
  "description": "Required for OAuth: ID of the workspace to access. API keys use their own workspace."
18135
20649
  }
18136
20650
  ],
20651
+ "requestBody": {
20652
+ "required": false,
20653
+ "content": {
20654
+ "application/json": {
20655
+ "schema": {
20656
+ "type": "object",
20657
+ "properties": {
20658
+ "name": {
20659
+ "type": "string",
20660
+ "minLength": 1,
20661
+ "maxLength": 300,
20662
+ "description": "New name of the collection"
20663
+ },
20664
+ "expectedName": {
20665
+ "type": "string",
20666
+ "minLength": 1,
20667
+ "maxLength": 300,
20668
+ "description": "Name the collection must still have"
20669
+ }
20670
+ }
20671
+ },
20672
+ "example": { "name": "Guides" }
20673
+ }
20674
+ }
20675
+ },
18137
20676
  "responses": {
18138
20677
  "200": {
18139
20678
  "description": "OK",
@@ -18290,6 +20829,46 @@
18290
20829
  },
18291
20830
  "required": ["defined", "code", "status", "message"]
18292
20831
  },
20832
+ {
20833
+ "type": "object",
20834
+ "properties": {
20835
+ "defined": { "const": true },
20836
+ "code": { "const": "CONTENT_PRECONDITION_FAILED" },
20837
+ "status": { "const": 409 },
20838
+ "message": { "type": "string", "default": "CONTENT_PRECONDITION_FAILED" },
20839
+ "data": {
20840
+ "type": "object",
20841
+ "properties": {
20842
+ "hints": {
20843
+ "type": "array",
20844
+ "items": { "type": "string" },
20845
+ "description": "Suggested next steps. Wording can change; use error codes and structured data for program logic."
20846
+ },
20847
+ "field": {
20848
+ "type": "string",
20849
+ "description": "Expected field that didn't match"
20850
+ },
20851
+ "current": {
20852
+ "anyOf": [{ "type": "string" }, { "type": "null" }],
20853
+ "description": "Current value of the field"
20854
+ }
20855
+ },
20856
+ "required": ["field", "current"]
20857
+ }
20858
+ },
20859
+ "required": ["defined", "code", "status", "message", "data"]
20860
+ },
20861
+ {
20862
+ "type": "object",
20863
+ "properties": {
20864
+ "defined": { "const": true },
20865
+ "code": { "const": "CONTENT_NAME_CONFLICT" },
20866
+ "status": { "const": 409 },
20867
+ "message": { "type": "string", "default": "CONTENT_NAME_CONFLICT" },
20868
+ "data": { "$ref": "#/components/schemas/ContentNameConflictErrorData" }
20869
+ },
20870
+ "required": ["defined", "code", "status", "message", "data"]
20871
+ },
18293
20872
  {
18294
20873
  "type": "object",
18295
20874
  "properties": {
@@ -18431,12 +21010,14 @@
18431
21010
  }
18432
21011
  }
18433
21012
  },
18434
- "x-sdk-example": { "id": "coll_example" }
18435
- },
18436
- "put": {
18437
- "operationId": "collections.update",
18438
- "summary": "Rename a collection",
18439
- "description": "Updates the collection name. Rejects names already used by a sibling entry or collection. An active schema migration can block this action.\n\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.",
21013
+ "x-sdk-example": { "id": "coll_example", "name": "Guides" }
21014
+ }
21015
+ },
21016
+ "/collections/{id}/move": {
21017
+ "post": {
21018
+ "operationId": "collections.move",
21019
+ "summary": "Move a collection",
21020
+ "description": "Moves the collection to another parent or position. Without a new parent, it stays in its parent. Without index, it keeps its position in the same parent and goes last in a new one. Rejects names already used in the new parent. A move that changes the schema can start a schema migration, which needs confirmedDataLoss when it can remove content.\n\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.",
18440
21021
  "tags": ["collections"],
18441
21022
  "parameters": [
18442
21023
  {
@@ -18446,7 +21027,7 @@
18446
21027
  "schema": {
18447
21028
  "type": "string",
18448
21029
  "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$",
18449
- "description": "ID of the collection to be updated"
21030
+ "description": "ID of the collection to be moved"
18450
21031
  },
18451
21032
  "example": "coll_example"
18452
21033
  },
@@ -18465,21 +21046,42 @@
18465
21046
  "schema": {
18466
21047
  "type": "object",
18467
21048
  "properties": {
18468
- "name": {
21049
+ "newParentID": {
21050
+ "anyOf": [
21051
+ { "type": "string", "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$" },
21052
+ { "type": "null" }
21053
+ ],
21054
+ "description": "ID of the new parent collection, or null for the top level"
21055
+ },
21056
+ "newParentPath": {
18469
21057
  "type": "string",
18470
- "minLength": 1,
18471
- "maxLength": 300,
18472
- "description": "New name of the collection"
21058
+ "description": "Name path of the new parent collection; / is the top level"
21059
+ },
21060
+ "newParentSlugPath": {
21061
+ "type": "string",
21062
+ "description": "Slug path of the new parent collection; / is the top level"
21063
+ },
21064
+ "expectedParentID": {
21065
+ "anyOf": [
21066
+ { "type": "string", "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$" },
21067
+ { "type": "null" }
21068
+ ],
21069
+ "description": "ID of the parent that must still contain the collection, or null for the top level"
21070
+ },
21071
+ "index": {
21072
+ "type": "integer",
21073
+ "minimum": 0,
21074
+ "maximum": 9007199254740991,
21075
+ "description": "New zero-based index in the parent collection's descendants array"
18473
21076
  },
18474
- "expectedName": {
18475
- "type": "string",
18476
- "minLength": 1,
18477
- "maxLength": 300,
18478
- "description": "Name the collection must still have"
21077
+ "confirmedDataLoss": {
21078
+ "type": "boolean",
21079
+ "default": false,
21080
+ "description": "Confirmation that a schema migration caused by the move can remove content"
18479
21081
  }
18480
21082
  }
18481
21083
  },
18482
- "example": { "name": "Guides" }
21084
+ "example": { "newParentID": "coll_parent" }
18483
21085
  }
18484
21086
  }
18485
21087
  },
@@ -18487,7 +21089,21 @@
18487
21089
  "200": {
18488
21090
  "description": "OK",
18489
21091
  "content": {
18490
- "application/json": { "schema": { "anyOf": [{ "not": {} }, { "not": {} }] } }
21092
+ "application/json": {
21093
+ "schema": {
21094
+ "type": "object",
21095
+ "properties": {
21096
+ "migrationID": {
21097
+ "anyOf": [
21098
+ { "type": "string", "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$" },
21099
+ { "type": "null" }
21100
+ ]
21101
+ },
21102
+ "totalEntries": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
21103
+ },
21104
+ "required": ["migrationID", "totalEntries"]
21105
+ }
21106
+ }
18491
21107
  }
18492
21108
  },
18493
21109
  "400": {
@@ -18639,35 +21255,6 @@
18639
21255
  },
18640
21256
  "required": ["defined", "code", "status", "message"]
18641
21257
  },
18642
- {
18643
- "type": "object",
18644
- "properties": {
18645
- "defined": { "const": true },
18646
- "code": { "const": "CONTENT_PRECONDITION_FAILED" },
18647
- "status": { "const": 409 },
18648
- "message": { "type": "string", "default": "CONTENT_PRECONDITION_FAILED" },
18649
- "data": {
18650
- "type": "object",
18651
- "properties": {
18652
- "hints": {
18653
- "type": "array",
18654
- "items": { "type": "string" },
18655
- "description": "Suggested next steps. Wording can change; use error codes and structured data for program logic."
18656
- },
18657
- "field": {
18658
- "type": "string",
18659
- "description": "Expected field that didn't match"
18660
- },
18661
- "current": {
18662
- "anyOf": [{ "type": "string" }, { "type": "null" }],
18663
- "description": "Current value of the field"
18664
- }
18665
- },
18666
- "required": ["field", "current"]
18667
- }
18668
- },
18669
- "required": ["defined", "code", "status", "message", "data"]
18670
- },
18671
21258
  {
18672
21259
  "type": "object",
18673
21260
  "properties": {
@@ -18704,6 +21291,35 @@
18704
21291
  },
18705
21292
  "required": ["defined", "code", "status", "message", "data"]
18706
21293
  },
21294
+ {
21295
+ "type": "object",
21296
+ "properties": {
21297
+ "defined": { "const": true },
21298
+ "code": { "const": "CONTENT_PRECONDITION_FAILED" },
21299
+ "status": { "const": 409 },
21300
+ "message": { "type": "string", "default": "CONTENT_PRECONDITION_FAILED" },
21301
+ "data": {
21302
+ "type": "object",
21303
+ "properties": {
21304
+ "hints": {
21305
+ "type": "array",
21306
+ "items": { "type": "string" },
21307
+ "description": "Suggested next steps. Wording can change; use error codes and structured data for program logic."
21308
+ },
21309
+ "field": {
21310
+ "type": "string",
21311
+ "description": "Expected field that didn't match"
21312
+ },
21313
+ "current": {
21314
+ "anyOf": [{ "type": "string" }, { "type": "null" }],
21315
+ "description": "Current value of the field"
21316
+ }
21317
+ },
21318
+ "required": ["field", "current"]
21319
+ }
21320
+ },
21321
+ "required": ["defined", "code", "status", "message", "data"]
21322
+ },
18707
21323
  {
18708
21324
  "type": "object",
18709
21325
  "properties": {
@@ -18820,26 +21436,43 @@
18820
21436
  }
18821
21437
  }
18822
21438
  },
18823
- "x-sdk-example": { "id": "coll_example", "name": "Guides" }
21439
+ "x-sdk-example": { "id": "coll_example", "newParentID": "coll_parent" }
18824
21440
  }
18825
21441
  },
18826
- "/collections/{id}/move": {
18827
- "post": {
18828
- "operationId": "collections.move",
18829
- "summary": "Move a collection",
18830
- "description": "Moves the collection to another parent or position. Without a new parent, it stays in its parent. Without index, it keeps its position in the same parent and goes last in a new one. Rejects names already used in the new parent. A move that changes the schema can start a schema migration, which needs confirmedDataLoss when it can remove content.\n\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.",
21442
+ "/collections/get": {
21443
+ "get": {
21444
+ "operationId": "collections.get",
21445
+ "summary": "Get a collection",
21446
+ "description": "Returns one collection by collectionID, collectionPath, or collectionSlugPath, with its name, path, and ancestors.\n\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.",
18831
21447
  "tags": ["collections"],
18832
21448
  "parameters": [
18833
21449
  {
18834
- "name": "id",
18835
- "in": "path",
18836
- "required": true,
21450
+ "name": "collectionID",
21451
+ "in": "query",
21452
+ "schema": { "type": "string", "pattern": "^coll_[A-Za-z\\d]{1,22}$" },
21453
+ "allowEmptyValue": true,
21454
+ "allowReserved": true,
21455
+ "example": "coll_example"
21456
+ },
21457
+ {
21458
+ "name": "collectionPath",
21459
+ "in": "query",
18837
21460
  "schema": {
18838
21461
  "type": "string",
18839
- "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$",
18840
- "description": "ID of the collection to be moved"
21462
+ "description": "Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK."
18841
21463
  },
18842
- "example": "coll_example"
21464
+ "allowEmptyValue": true,
21465
+ "allowReserved": true
21466
+ },
21467
+ {
21468
+ "name": "collectionSlugPath",
21469
+ "in": "query",
21470
+ "schema": {
21471
+ "type": "string",
21472
+ "description": "Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding."
21473
+ },
21474
+ "allowEmptyValue": true,
21475
+ "allowReserved": true
18843
21476
  },
18844
21477
  {
18845
21478
  "name": "x-workspace-id",
@@ -18849,71 +21482,11 @@
18849
21482
  "description": "Required for OAuth: ID of the workspace to access. API keys use their own workspace."
18850
21483
  }
18851
21484
  ],
18852
- "requestBody": {
18853
- "required": false,
18854
- "content": {
18855
- "application/json": {
18856
- "schema": {
18857
- "type": "object",
18858
- "properties": {
18859
- "newParentID": {
18860
- "anyOf": [
18861
- { "type": "string", "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$" },
18862
- { "type": "null" }
18863
- ],
18864
- "description": "ID of the new parent collection, or null for the top level"
18865
- },
18866
- "newParentPath": {
18867
- "type": "string",
18868
- "description": "Name path of the new parent collection; / is the top level"
18869
- },
18870
- "newParentSlugPath": {
18871
- "type": "string",
18872
- "description": "Slug path of the new parent collection; / is the top level"
18873
- },
18874
- "expectedParentID": {
18875
- "anyOf": [
18876
- { "type": "string", "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$" },
18877
- { "type": "null" }
18878
- ],
18879
- "description": "ID of the parent that must still contain the collection, or null for the top level"
18880
- },
18881
- "index": {
18882
- "type": "integer",
18883
- "minimum": 0,
18884
- "maximum": 9007199254740991,
18885
- "description": "New zero-based index in the parent collection's descendants array"
18886
- },
18887
- "confirmedDataLoss": {
18888
- "type": "boolean",
18889
- "default": false,
18890
- "description": "Confirmation that a schema migration caused by the move can remove content"
18891
- }
18892
- }
18893
- },
18894
- "example": { "newParentID": "coll_parent" }
18895
- }
18896
- }
18897
- },
18898
21485
  "responses": {
18899
21486
  "200": {
18900
21487
  "description": "OK",
18901
21488
  "content": {
18902
- "application/json": {
18903
- "schema": {
18904
- "type": "object",
18905
- "properties": {
18906
- "migrationID": {
18907
- "anyOf": [
18908
- { "type": "string", "pattern": "^(?:\\w+?_[A-Za-z\\d]{1,22})$" },
18909
- { "type": "null" }
18910
- ]
18911
- },
18912
- "totalEntries": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
18913
- },
18914
- "required": ["migrationID", "totalEntries"]
18915
- }
18916
- }
21489
+ "application/json": { "schema": { "$ref": "#/components/schemas/Collection" } }
18917
21490
  }
18918
21491
  },
18919
21492
  "400": {
@@ -19065,71 +21638,6 @@
19065
21638
  },
19066
21639
  "required": ["defined", "code", "status", "message"]
19067
21640
  },
19068
- {
19069
- "type": "object",
19070
- "properties": {
19071
- "defined": { "const": true },
19072
- "code": { "const": "CONTENT_NAME_CONFLICT" },
19073
- "status": { "const": 409 },
19074
- "message": { "type": "string", "default": "CONTENT_NAME_CONFLICT" },
19075
- "data": { "$ref": "#/components/schemas/ContentNameConflictErrorData" }
19076
- },
19077
- "required": ["defined", "code", "status", "message", "data"]
19078
- },
19079
- {
19080
- "type": "object",
19081
- "properties": {
19082
- "defined": { "const": true },
19083
- "code": { "const": "SCHEMA_FIELD_KEY_CONFLICT" },
19084
- "status": { "const": 409 },
19085
- "message": { "type": "string", "default": "SCHEMA_FIELD_KEY_CONFLICT" },
19086
- "data": { "$ref": "#/components/schemas/SchemaFieldKeyConflictErrorData" }
19087
- },
19088
- "required": ["defined", "code", "status", "message", "data"]
19089
- },
19090
- {
19091
- "type": "object",
19092
- "properties": {
19093
- "defined": { "const": true },
19094
- "code": { "const": "SCHEMA_MIGRATION_IN_PROGRESS" },
19095
- "status": { "const": 409 },
19096
- "message": {
19097
- "type": "string",
19098
- "default": "A schema migration is in progress for this collection"
19099
- },
19100
- "data": { "$ref": "#/components/schemas/SchemaMigrationErrorData" }
19101
- },
19102
- "required": ["defined", "code", "status", "message", "data"]
19103
- },
19104
- {
19105
- "type": "object",
19106
- "properties": {
19107
- "defined": { "const": true },
19108
- "code": { "const": "CONTENT_PRECONDITION_FAILED" },
19109
- "status": { "const": 409 },
19110
- "message": { "type": "string", "default": "CONTENT_PRECONDITION_FAILED" },
19111
- "data": {
19112
- "type": "object",
19113
- "properties": {
19114
- "hints": {
19115
- "type": "array",
19116
- "items": { "type": "string" },
19117
- "description": "Suggested next steps. Wording can change; use error codes and structured data for program logic."
19118
- },
19119
- "field": {
19120
- "type": "string",
19121
- "description": "Expected field that didn't match"
19122
- },
19123
- "current": {
19124
- "anyOf": [{ "type": "string" }, { "type": "null" }],
19125
- "description": "Current value of the field"
19126
- }
19127
- },
19128
- "required": ["field", "current"]
19129
- }
19130
- },
19131
- "required": ["defined", "code", "status", "message", "data"]
19132
- },
19133
21641
  {
19134
21642
  "type": "object",
19135
21643
  "properties": {
@@ -19246,7 +21754,7 @@
19246
21754
  }
19247
21755
  }
19248
21756
  },
19249
- "x-sdk-example": { "id": "coll_example", "newParentID": "coll_parent" }
21757
+ "x-sdk-example": { "collectionID": "coll_example" }
19250
21758
  }
19251
21759
  },
19252
21760
  "/collections/list": {
@@ -20779,7 +23287,7 @@
20779
23287
  "name": "variant",
20780
23288
  "in": "path",
20781
23289
  "required": true,
20782
- "schema": { "enum": ["thumbnail", "display"], "type": "string" },
23290
+ "schema": { "enum": ["thumbnail", "display", "source"], "type": "string" },
20783
23291
  "example": "display"
20784
23292
  }
20785
23293
  ],