@arke-institute/sdk 2.2.0 → 2.3.1
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/dist/{crypto-El5Z3bNI.d.cts → crypto-BddSiyPC.d.cts} +3 -3
- package/dist/{crypto-7c990p-j.d.ts → crypto-Dz2ktRy4.d.ts} +3 -3
- package/dist/generated/index.d.cts +447 -202
- package/dist/generated/index.d.ts +447 -202
- package/dist/index.cjs +23 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +23 -96
- package/dist/index.js.map +1 -1
- package/dist/operations/index.cjs +41 -100
- package/dist/operations/index.cjs.map +1 -1
- package/dist/operations/index.d.cts +14 -11
- package/dist/operations/index.d.ts +14 -11
- package/dist/operations/index.js +41 -100
- package/dist/operations/index.js.map +1 -1
- package/openapi/spec.json +656 -378
- package/openapi/version.json +1 -1
- package/package.json +1 -1
package/openapi/spec.json
CHANGED
|
@@ -1673,6 +1673,135 @@
|
|
|
1673
1673
|
"expect_tip"
|
|
1674
1674
|
]
|
|
1675
1675
|
},
|
|
1676
|
+
"EntityDeletedResponse": {
|
|
1677
|
+
"type": "object",
|
|
1678
|
+
"properties": {
|
|
1679
|
+
"id": {
|
|
1680
|
+
"type": "string",
|
|
1681
|
+
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
1682
|
+
"description": "Entity ID (ULID format)",
|
|
1683
|
+
"example": "01KDETYWYWM0MJVKM8DK3AEXPY"
|
|
1684
|
+
},
|
|
1685
|
+
"cid": {
|
|
1686
|
+
"type": "string",
|
|
1687
|
+
"minLength": 1,
|
|
1688
|
+
"description": "IPFS Content Identifier (CID)",
|
|
1689
|
+
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
1690
|
+
},
|
|
1691
|
+
"deleted_at": {
|
|
1692
|
+
"type": "string",
|
|
1693
|
+
"format": "date-time",
|
|
1694
|
+
"description": "ISO timestamp when the entity was deleted"
|
|
1695
|
+
},
|
|
1696
|
+
"ver": {
|
|
1697
|
+
"type": "integer",
|
|
1698
|
+
"minimum": 0,
|
|
1699
|
+
"exclusiveMinimum": true,
|
|
1700
|
+
"description": "Entity version number",
|
|
1701
|
+
"example": 1
|
|
1702
|
+
},
|
|
1703
|
+
"prev_cid": {
|
|
1704
|
+
"type": "string",
|
|
1705
|
+
"minLength": 1,
|
|
1706
|
+
"description": "IPFS Content Identifier (CID)",
|
|
1707
|
+
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
1708
|
+
}
|
|
1709
|
+
},
|
|
1710
|
+
"required": [
|
|
1711
|
+
"id",
|
|
1712
|
+
"cid",
|
|
1713
|
+
"deleted_at",
|
|
1714
|
+
"ver",
|
|
1715
|
+
"prev_cid"
|
|
1716
|
+
]
|
|
1717
|
+
},
|
|
1718
|
+
"DeleteEntityRequest": {
|
|
1719
|
+
"type": "object",
|
|
1720
|
+
"properties": {
|
|
1721
|
+
"expect_tip": {
|
|
1722
|
+
"type": "string",
|
|
1723
|
+
"minLength": 1,
|
|
1724
|
+
"description": "Current tip CID for CAS validation. Request fails with 409 if this does not match.",
|
|
1725
|
+
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
1726
|
+
},
|
|
1727
|
+
"note": {
|
|
1728
|
+
"type": "string",
|
|
1729
|
+
"description": "Optional note describing this change",
|
|
1730
|
+
"example": "Added Chapter 42: The Whiteness of the Whale"
|
|
1731
|
+
},
|
|
1732
|
+
"reason": {
|
|
1733
|
+
"type": "string",
|
|
1734
|
+
"maxLength": 500,
|
|
1735
|
+
"description": "Reason for deleting the entity",
|
|
1736
|
+
"example": "Duplicate entry"
|
|
1737
|
+
}
|
|
1738
|
+
},
|
|
1739
|
+
"required": [
|
|
1740
|
+
"expect_tip"
|
|
1741
|
+
]
|
|
1742
|
+
},
|
|
1743
|
+
"EntityUpdateResponse": {
|
|
1744
|
+
"allOf": [
|
|
1745
|
+
{
|
|
1746
|
+
"$ref": "#/components/schemas/EntityResponse"
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
"type": "object",
|
|
1750
|
+
"properties": {
|
|
1751
|
+
"prev_cid": {
|
|
1752
|
+
"type": "string",
|
|
1753
|
+
"minLength": 1,
|
|
1754
|
+
"description": "Previous version CID",
|
|
1755
|
+
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
1756
|
+
}
|
|
1757
|
+
},
|
|
1758
|
+
"required": [
|
|
1759
|
+
"prev_cid"
|
|
1760
|
+
]
|
|
1761
|
+
}
|
|
1762
|
+
]
|
|
1763
|
+
},
|
|
1764
|
+
"EntityRestoredResponse": {
|
|
1765
|
+
"allOf": [
|
|
1766
|
+
{
|
|
1767
|
+
"$ref": "#/components/schemas/EntityUpdateResponse"
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
"type": "object",
|
|
1771
|
+
"properties": {
|
|
1772
|
+
"restored_from_ver": {
|
|
1773
|
+
"type": "integer",
|
|
1774
|
+
"minimum": 0,
|
|
1775
|
+
"exclusiveMinimum": true,
|
|
1776
|
+
"description": "The version number that was restored from",
|
|
1777
|
+
"example": 1
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
"required": [
|
|
1781
|
+
"restored_from_ver"
|
|
1782
|
+
]
|
|
1783
|
+
}
|
|
1784
|
+
]
|
|
1785
|
+
},
|
|
1786
|
+
"RestoreEntityRequest": {
|
|
1787
|
+
"type": "object",
|
|
1788
|
+
"properties": {
|
|
1789
|
+
"expect_tip": {
|
|
1790
|
+
"type": "string",
|
|
1791
|
+
"minLength": 1,
|
|
1792
|
+
"description": "Current tip CID for CAS validation. Request fails with 409 if this does not match.",
|
|
1793
|
+
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
1794
|
+
},
|
|
1795
|
+
"note": {
|
|
1796
|
+
"type": "string",
|
|
1797
|
+
"description": "Optional note describing this change",
|
|
1798
|
+
"example": "Added Chapter 42: The Whiteness of the Whale"
|
|
1799
|
+
}
|
|
1800
|
+
},
|
|
1801
|
+
"required": [
|
|
1802
|
+
"expect_tip"
|
|
1803
|
+
]
|
|
1804
|
+
},
|
|
1676
1805
|
"AddRelationshipResponse": {
|
|
1677
1806
|
"type": "object",
|
|
1678
1807
|
"properties": {
|
|
@@ -1929,18 +2058,6 @@
|
|
|
1929
2058
|
"exclusiveMinimum": true,
|
|
1930
2059
|
"description": "Unix timestamp in milliseconds",
|
|
1931
2060
|
"example": 1735214400000
|
|
1932
|
-
},
|
|
1933
|
-
"upload_url": {
|
|
1934
|
-
"type": "string",
|
|
1935
|
-
"format": "uri",
|
|
1936
|
-
"description": "Presigned S3 URL for uploading file content",
|
|
1937
|
-
"example": "https://arke-blocks.s3.amazonaws.com/01JFILE123.../v1?X-Amz-..."
|
|
1938
|
-
},
|
|
1939
|
-
"upload_expires_at": {
|
|
1940
|
-
"type": "string",
|
|
1941
|
-
"format": "date-time",
|
|
1942
|
-
"description": "When the upload URL expires (15 minutes)",
|
|
1943
|
-
"example": "2025-12-26T12:00:00.000Z"
|
|
1944
2061
|
}
|
|
1945
2062
|
},
|
|
1946
2063
|
"required": [
|
|
@@ -1951,9 +2068,7 @@
|
|
|
1951
2068
|
"relationships",
|
|
1952
2069
|
"ver",
|
|
1953
2070
|
"created_at",
|
|
1954
|
-
"ts"
|
|
1955
|
-
"upload_url",
|
|
1956
|
-
"upload_expires_at"
|
|
2071
|
+
"ts"
|
|
1957
2072
|
]
|
|
1958
2073
|
},
|
|
1959
2074
|
"CreateFileRequest": {
|
|
@@ -1962,7 +2077,7 @@
|
|
|
1962
2077
|
"key": {
|
|
1963
2078
|
"type": "string",
|
|
1964
2079
|
"minLength": 1,
|
|
1965
|
-
"description": "Storage key in
|
|
2080
|
+
"description": "Storage key in R2. Best practice: use the CID.",
|
|
1966
2081
|
"example": "bafkreiabc123..."
|
|
1967
2082
|
},
|
|
1968
2083
|
"filename": {
|
|
@@ -1980,14 +2095,9 @@
|
|
|
1980
2095
|
"size": {
|
|
1981
2096
|
"type": "integer",
|
|
1982
2097
|
"minimum": 0,
|
|
1983
|
-
"description": "
|
|
2098
|
+
"description": "Expected file size in bytes (verified on upload)",
|
|
1984
2099
|
"example": 1048576
|
|
1985
2100
|
},
|
|
1986
|
-
"cid": {
|
|
1987
|
-
"type": "string",
|
|
1988
|
-
"description": "Content identifier (CID). Not verified, just metadata.",
|
|
1989
|
-
"example": "bafkreiabc123..."
|
|
1990
|
-
},
|
|
1991
2101
|
"description": {
|
|
1992
2102
|
"type": "string",
|
|
1993
2103
|
"description": "Description of the file",
|
|
@@ -2075,43 +2185,31 @@
|
|
|
2075
2185
|
}
|
|
2076
2186
|
]
|
|
2077
2187
|
},
|
|
2078
|
-
"
|
|
2079
|
-
"
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
"type": "string",
|
|
2083
|
-
"format": "uri",
|
|
2084
|
-
"description": "Presigned S3 URL for downloading file content",
|
|
2085
|
-
"example": "https://arke-blocks.s3.amazonaws.com/01JFILE123.../v1?X-Amz-..."
|
|
2086
|
-
},
|
|
2087
|
-
"expires_at": {
|
|
2088
|
-
"type": "string",
|
|
2089
|
-
"format": "date-time",
|
|
2090
|
-
"description": "When the download URL expires (5 minutes)",
|
|
2091
|
-
"example": "2025-12-26T12:00:00.000Z"
|
|
2092
|
-
},
|
|
2093
|
-
"filename": {
|
|
2094
|
-
"type": "string",
|
|
2095
|
-
"description": "Filename for download",
|
|
2096
|
-
"example": "document.pdf"
|
|
2097
|
-
},
|
|
2098
|
-
"content_type": {
|
|
2099
|
-
"type": "string",
|
|
2100
|
-
"description": "MIME type of the file",
|
|
2101
|
-
"example": "application/pdf"
|
|
2188
|
+
"UploadContentResponse": {
|
|
2189
|
+
"allOf": [
|
|
2190
|
+
{
|
|
2191
|
+
"$ref": "#/components/schemas/EntityResponse"
|
|
2102
2192
|
},
|
|
2103
|
-
|
|
2104
|
-
"type": "
|
|
2105
|
-
"
|
|
2106
|
-
|
|
2193
|
+
{
|
|
2194
|
+
"type": "object",
|
|
2195
|
+
"properties": {
|
|
2196
|
+
"type": {
|
|
2197
|
+
"type": "string",
|
|
2198
|
+
"enum": [
|
|
2199
|
+
"file"
|
|
2200
|
+
]
|
|
2201
|
+
},
|
|
2202
|
+
"prev_cid": {
|
|
2203
|
+
"type": "string",
|
|
2204
|
+
"minLength": 1,
|
|
2205
|
+
"description": "Previous version CID",
|
|
2206
|
+
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
2207
|
+
}
|
|
2208
|
+
},
|
|
2209
|
+
"required": [
|
|
2210
|
+
"prev_cid"
|
|
2211
|
+
]
|
|
2107
2212
|
}
|
|
2108
|
-
},
|
|
2109
|
-
"required": [
|
|
2110
|
-
"download_url",
|
|
2111
|
-
"expires_at",
|
|
2112
|
-
"filename",
|
|
2113
|
-
"content_type",
|
|
2114
|
-
"size"
|
|
2115
2213
|
]
|
|
2116
2214
|
},
|
|
2117
2215
|
"UpdateFileResponse": {
|
|
@@ -2269,7 +2367,7 @@
|
|
|
2269
2367
|
"key": {
|
|
2270
2368
|
"type": "string",
|
|
2271
2369
|
"minLength": 1,
|
|
2272
|
-
"description": "New storage key. Must already exist in
|
|
2370
|
+
"description": "New storage key. Must already exist in R2 (for regression to old version)."
|
|
2273
2371
|
},
|
|
2274
2372
|
"filename": {
|
|
2275
2373
|
"type": "string",
|
|
@@ -2286,10 +2384,6 @@
|
|
|
2286
2384
|
"minimum": 0,
|
|
2287
2385
|
"description": "New file size in bytes"
|
|
2288
2386
|
},
|
|
2289
|
-
"cid": {
|
|
2290
|
-
"type": "string",
|
|
2291
|
-
"description": "New content identifier"
|
|
2292
|
-
},
|
|
2293
2387
|
"description": {
|
|
2294
2388
|
"type": "string",
|
|
2295
2389
|
"description": "New description"
|
|
@@ -2302,26 +2396,20 @@
|
|
|
2302
2396
|
"ReuploadFileResponse": {
|
|
2303
2397
|
"allOf": [
|
|
2304
2398
|
{
|
|
2305
|
-
"$ref": "#/components/schemas/
|
|
2399
|
+
"$ref": "#/components/schemas/FileResponse"
|
|
2306
2400
|
},
|
|
2307
2401
|
{
|
|
2308
2402
|
"type": "object",
|
|
2309
2403
|
"properties": {
|
|
2310
|
-
"
|
|
2311
|
-
"type": "string",
|
|
2312
|
-
"format": "uri",
|
|
2313
|
-
"description": "Presigned S3 URL for uploading new file content"
|
|
2314
|
-
},
|
|
2315
|
-
"upload_expires_at": {
|
|
2404
|
+
"prev_cid": {
|
|
2316
2405
|
"type": "string",
|
|
2317
|
-
"
|
|
2318
|
-
"description": "
|
|
2319
|
-
"example": "
|
|
2406
|
+
"minLength": 1,
|
|
2407
|
+
"description": "Previous version CID",
|
|
2408
|
+
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
2320
2409
|
}
|
|
2321
2410
|
},
|
|
2322
2411
|
"required": [
|
|
2323
|
-
"
|
|
2324
|
-
"upload_expires_at"
|
|
2412
|
+
"prev_cid"
|
|
2325
2413
|
]
|
|
2326
2414
|
}
|
|
2327
2415
|
]
|
|
@@ -2343,7 +2431,7 @@
|
|
|
2343
2431
|
"key": {
|
|
2344
2432
|
"type": "string",
|
|
2345
2433
|
"minLength": 1,
|
|
2346
|
-
"description": "New storage key. Must NOT already exist in
|
|
2434
|
+
"description": "New storage key. Must NOT already exist in R2.",
|
|
2347
2435
|
"example": "v2"
|
|
2348
2436
|
},
|
|
2349
2437
|
"content_type": {
|
|
@@ -2355,7 +2443,7 @@
|
|
|
2355
2443
|
"size": {
|
|
2356
2444
|
"type": "integer",
|
|
2357
2445
|
"minimum": 0,
|
|
2358
|
-
"description": "
|
|
2446
|
+
"description": "Expected size of the new file in bytes (verified on upload)",
|
|
2359
2447
|
"example": 2097152
|
|
2360
2448
|
},
|
|
2361
2449
|
"filename": {
|
|
@@ -2363,10 +2451,6 @@
|
|
|
2363
2451
|
"minLength": 1,
|
|
2364
2452
|
"description": "New filename (optional, keeps current if not provided)"
|
|
2365
2453
|
},
|
|
2366
|
-
"cid": {
|
|
2367
|
-
"type": "string",
|
|
2368
|
-
"description": "Content identifier for new file"
|
|
2369
|
-
},
|
|
2370
2454
|
"description": {
|
|
2371
2455
|
"type": "string",
|
|
2372
2456
|
"description": "New description"
|
|
@@ -2379,51 +2463,6 @@
|
|
|
2379
2463
|
"size"
|
|
2380
2464
|
]
|
|
2381
2465
|
},
|
|
2382
|
-
"ConfirmUploadResponse": {
|
|
2383
|
-
"allOf": [
|
|
2384
|
-
{
|
|
2385
|
-
"$ref": "#/components/schemas/FileResponse"
|
|
2386
|
-
},
|
|
2387
|
-
{
|
|
2388
|
-
"type": "object",
|
|
2389
|
-
"properties": {
|
|
2390
|
-
"prev_cid": {
|
|
2391
|
-
"type": "string",
|
|
2392
|
-
"minLength": 1,
|
|
2393
|
-
"description": "Previous version CID. Not present if upload was already confirmed.",
|
|
2394
|
-
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
2395
|
-
},
|
|
2396
|
-
"already_confirmed": {
|
|
2397
|
-
"type": "boolean",
|
|
2398
|
-
"description": "True if upload was already confirmed. Entity was not modified.",
|
|
2399
|
-
"example": false
|
|
2400
|
-
}
|
|
2401
|
-
},
|
|
2402
|
-
"required": [
|
|
2403
|
-
"already_confirmed"
|
|
2404
|
-
]
|
|
2405
|
-
}
|
|
2406
|
-
]
|
|
2407
|
-
},
|
|
2408
|
-
"ConfirmUploadRequest": {
|
|
2409
|
-
"type": "object",
|
|
2410
|
-
"properties": {
|
|
2411
|
-
"expect_tip": {
|
|
2412
|
-
"type": "string",
|
|
2413
|
-
"minLength": 1,
|
|
2414
|
-
"description": "Current tip CID for CAS validation. Request fails with 409 if this does not match.",
|
|
2415
|
-
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
2416
|
-
},
|
|
2417
|
-
"note": {
|
|
2418
|
-
"type": "string",
|
|
2419
|
-
"description": "Optional note describing this change",
|
|
2420
|
-
"example": "Added Chapter 42: The Whiteness of the Whale"
|
|
2421
|
-
}
|
|
2422
|
-
},
|
|
2423
|
-
"required": [
|
|
2424
|
-
"expect_tip"
|
|
2425
|
-
]
|
|
2426
|
-
},
|
|
2427
2466
|
"CreateFolderResponse": {
|
|
2428
2467
|
"type": "object",
|
|
2429
2468
|
"properties": {
|
|
@@ -4084,25 +4123,6 @@
|
|
|
4084
4123
|
"grants_needed"
|
|
4085
4124
|
]
|
|
4086
4125
|
},
|
|
4087
|
-
"AgentLogRef": {
|
|
4088
|
-
"type": "object",
|
|
4089
|
-
"properties": {
|
|
4090
|
-
"pi": {
|
|
4091
|
-
"type": "string",
|
|
4092
|
-
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$"
|
|
4093
|
-
},
|
|
4094
|
-
"type": {
|
|
4095
|
-
"type": "string",
|
|
4096
|
-
"enum": [
|
|
4097
|
-
"file"
|
|
4098
|
-
]
|
|
4099
|
-
}
|
|
4100
|
-
},
|
|
4101
|
-
"required": [
|
|
4102
|
-
"pi",
|
|
4103
|
-
"type"
|
|
4104
|
-
]
|
|
4105
|
-
},
|
|
4106
4126
|
"InvokeGrantResult": {
|
|
4107
4127
|
"type": "object",
|
|
4108
4128
|
"properties": {
|
|
@@ -4142,8 +4162,10 @@
|
|
|
4142
4162
|
"description": "Unique job identifier",
|
|
4143
4163
|
"example": "job_01JEXAMPLEID12345678901"
|
|
4144
4164
|
},
|
|
4145
|
-
"
|
|
4146
|
-
"
|
|
4165
|
+
"job_collection": {
|
|
4166
|
+
"type": "string",
|
|
4167
|
+
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
4168
|
+
"description": "The job collection where agent writes logs"
|
|
4147
4169
|
},
|
|
4148
4170
|
"grants": {
|
|
4149
4171
|
"type": "array",
|
|
@@ -4165,7 +4187,7 @@
|
|
|
4165
4187
|
"required": [
|
|
4166
4188
|
"status",
|
|
4167
4189
|
"job_id",
|
|
4168
|
-
"
|
|
4190
|
+
"job_collection",
|
|
4169
4191
|
"grants",
|
|
4170
4192
|
"target_cid",
|
|
4171
4193
|
"expires_at"
|
|
@@ -4231,6 +4253,11 @@
|
|
|
4231
4253
|
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
4232
4254
|
"description": "Target collection ID to operate on"
|
|
4233
4255
|
},
|
|
4256
|
+
"job_collection": {
|
|
4257
|
+
"type": "string",
|
|
4258
|
+
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
4259
|
+
"description": "Job collection where agent should write logs. If not provided, creates new root collection."
|
|
4260
|
+
},
|
|
4234
4261
|
"input": {
|
|
4235
4262
|
"type": "object",
|
|
4236
4263
|
"additionalProperties": {
|
|
@@ -4366,99 +4393,64 @@
|
|
|
4366
4393
|
"keys"
|
|
4367
4394
|
]
|
|
4368
4395
|
},
|
|
4369
|
-
"
|
|
4396
|
+
"Event": {
|
|
4370
4397
|
"type": "object",
|
|
4371
4398
|
"properties": {
|
|
4372
|
-
"
|
|
4373
|
-
"type": "
|
|
4374
|
-
"
|
|
4375
|
-
"
|
|
4376
|
-
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
4377
|
-
},
|
|
4378
|
-
"type": {
|
|
4379
|
-
"type": "string",
|
|
4380
|
-
"enum": [
|
|
4381
|
-
"create",
|
|
4382
|
-
"update"
|
|
4383
|
-
],
|
|
4384
|
-
"description": "Type of entity change event",
|
|
4385
|
-
"example": "create"
|
|
4399
|
+
"id": {
|
|
4400
|
+
"type": "integer",
|
|
4401
|
+
"description": "Auto-increment event ID (use as cursor)",
|
|
4402
|
+
"example": 12346
|
|
4386
4403
|
},
|
|
4387
4404
|
"pi": {
|
|
4388
4405
|
"type": "string",
|
|
4389
4406
|
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
4390
|
-
"description": "Entity ID that
|
|
4407
|
+
"description": "Entity ID that changed",
|
|
4391
4408
|
"example": "01KDETYWYWM0MJVKM8DK3AEXPY"
|
|
4392
4409
|
},
|
|
4393
|
-
"
|
|
4394
|
-
"type": "integer",
|
|
4395
|
-
"minimum": 0,
|
|
4396
|
-
"exclusiveMinimum": true,
|
|
4397
|
-
"description": "Entity version number",
|
|
4398
|
-
"example": 1
|
|
4399
|
-
},
|
|
4400
|
-
"tip_cid": {
|
|
4410
|
+
"cid": {
|
|
4401
4411
|
"type": "string",
|
|
4402
4412
|
"minLength": 1,
|
|
4403
|
-
"description": "
|
|
4413
|
+
"description": "New manifest CID",
|
|
4404
4414
|
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
4405
4415
|
},
|
|
4406
4416
|
"ts": {
|
|
4407
4417
|
"type": "string",
|
|
4408
|
-
"
|
|
4409
|
-
"
|
|
4410
|
-
"example": "2025-12-26T12:00:00.000Z"
|
|
4418
|
+
"description": "ISO timestamp of the event",
|
|
4419
|
+
"example": "2025-01-15T12:00:01Z"
|
|
4411
4420
|
}
|
|
4412
4421
|
},
|
|
4413
4422
|
"required": [
|
|
4414
|
-
"
|
|
4415
|
-
"type",
|
|
4423
|
+
"id",
|
|
4416
4424
|
"pi",
|
|
4417
|
-
"
|
|
4418
|
-
"tip_cid",
|
|
4425
|
+
"cid",
|
|
4419
4426
|
"ts"
|
|
4420
4427
|
]
|
|
4421
4428
|
},
|
|
4422
4429
|
"EventsListResponse": {
|
|
4423
4430
|
"type": "object",
|
|
4424
4431
|
"properties": {
|
|
4425
|
-
"
|
|
4432
|
+
"events": {
|
|
4426
4433
|
"type": "array",
|
|
4427
4434
|
"items": {
|
|
4428
|
-
"$ref": "#/components/schemas/
|
|
4435
|
+
"$ref": "#/components/schemas/Event"
|
|
4429
4436
|
},
|
|
4430
|
-
"description": "
|
|
4431
|
-
},
|
|
4432
|
-
"total_events": {
|
|
4433
|
-
"type": "integer",
|
|
4434
|
-
"minimum": 0,
|
|
4435
|
-
"description": "Total events in the event chain",
|
|
4436
|
-
"example": 1542
|
|
4437
|
-
},
|
|
4438
|
-
"total_pis": {
|
|
4439
|
-
"type": "integer",
|
|
4440
|
-
"minimum": 0,
|
|
4441
|
-
"description": "Total unique entity IDs across all events",
|
|
4442
|
-
"example": 987
|
|
4437
|
+
"description": "List of events"
|
|
4443
4438
|
},
|
|
4444
4439
|
"has_more": {
|
|
4445
4440
|
"type": "boolean",
|
|
4446
|
-
"description": "Whether more events
|
|
4441
|
+
"description": "Whether there are more events available",
|
|
4442
|
+
"example": true
|
|
4447
4443
|
},
|
|
4448
|
-
"
|
|
4449
|
-
"type": "
|
|
4450
|
-
"
|
|
4451
|
-
"
|
|
4452
|
-
"description": "CID to use as \"cursor\" parameter for next page",
|
|
4453
|
-
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
4444
|
+
"cursor": {
|
|
4445
|
+
"type": "integer",
|
|
4446
|
+
"description": "Cursor for the next page (pass as ?after= parameter)",
|
|
4447
|
+
"example": 12347
|
|
4454
4448
|
}
|
|
4455
4449
|
},
|
|
4456
4450
|
"required": [
|
|
4457
|
-
"
|
|
4458
|
-
"total_events",
|
|
4459
|
-
"total_pis",
|
|
4451
|
+
"events",
|
|
4460
4452
|
"has_more",
|
|
4461
|
-
"
|
|
4453
|
+
"cursor"
|
|
4462
4454
|
]
|
|
4463
4455
|
}
|
|
4464
4456
|
},
|
|
@@ -5995,18 +5987,326 @@
|
|
|
5995
5987
|
"content": {
|
|
5996
5988
|
"application/json": {
|
|
5997
5989
|
"schema": {
|
|
5998
|
-
"$ref": "#/components/schemas/CreateEntityRequest"
|
|
5990
|
+
"$ref": "#/components/schemas/CreateEntityRequest"
|
|
5991
|
+
}
|
|
5992
|
+
}
|
|
5993
|
+
}
|
|
5994
|
+
},
|
|
5995
|
+
"responses": {
|
|
5996
|
+
"201": {
|
|
5997
|
+
"description": "Entity created",
|
|
5998
|
+
"content": {
|
|
5999
|
+
"application/json": {
|
|
6000
|
+
"schema": {
|
|
6001
|
+
"$ref": "#/components/schemas/EntityCreatedResponse"
|
|
6002
|
+
}
|
|
6003
|
+
}
|
|
6004
|
+
}
|
|
6005
|
+
},
|
|
6006
|
+
"400": {
|
|
6007
|
+
"description": "Bad Request - Invalid input",
|
|
6008
|
+
"content": {
|
|
6009
|
+
"application/json": {
|
|
6010
|
+
"schema": {
|
|
6011
|
+
"$ref": "#/components/schemas/ValidationErrorResponse"
|
|
6012
|
+
},
|
|
6013
|
+
"example": {
|
|
6014
|
+
"error": "Validation failed",
|
|
6015
|
+
"details": {
|
|
6016
|
+
"issues": [
|
|
6017
|
+
{
|
|
6018
|
+
"path": [
|
|
6019
|
+
"properties",
|
|
6020
|
+
"label"
|
|
6021
|
+
],
|
|
6022
|
+
"message": "Required"
|
|
6023
|
+
}
|
|
6024
|
+
]
|
|
6025
|
+
}
|
|
6026
|
+
}
|
|
6027
|
+
}
|
|
6028
|
+
}
|
|
6029
|
+
},
|
|
6030
|
+
"401": {
|
|
6031
|
+
"description": "Unauthorized - Missing or invalid authentication",
|
|
6032
|
+
"content": {
|
|
6033
|
+
"application/json": {
|
|
6034
|
+
"schema": {
|
|
6035
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
6036
|
+
},
|
|
6037
|
+
"example": {
|
|
6038
|
+
"error": "Unauthorized: Missing or invalid authentication token"
|
|
6039
|
+
}
|
|
6040
|
+
}
|
|
6041
|
+
}
|
|
6042
|
+
},
|
|
6043
|
+
"403": {
|
|
6044
|
+
"description": "Forbidden - Insufficient permissions",
|
|
6045
|
+
"content": {
|
|
6046
|
+
"application/json": {
|
|
6047
|
+
"schema": {
|
|
6048
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
6049
|
+
},
|
|
6050
|
+
"example": {
|
|
6051
|
+
"error": "Forbidden: You do not have permission to perform this action"
|
|
6052
|
+
}
|
|
6053
|
+
}
|
|
6054
|
+
}
|
|
6055
|
+
},
|
|
6056
|
+
"409": {
|
|
6057
|
+
"description": "Conflict - CAS validation failed (entity was modified)",
|
|
6058
|
+
"content": {
|
|
6059
|
+
"application/json": {
|
|
6060
|
+
"schema": {
|
|
6061
|
+
"$ref": "#/components/schemas/CASErrorResponse"
|
|
6062
|
+
},
|
|
6063
|
+
"example": {
|
|
6064
|
+
"error": "Conflict: entity was modified",
|
|
6065
|
+
"details": {
|
|
6066
|
+
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
|
|
6067
|
+
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
|
|
6068
|
+
}
|
|
6069
|
+
}
|
|
6070
|
+
}
|
|
6071
|
+
}
|
|
6072
|
+
}
|
|
6073
|
+
}
|
|
6074
|
+
}
|
|
6075
|
+
},
|
|
6076
|
+
"/entities/{id}": {
|
|
6077
|
+
"get": {
|
|
6078
|
+
"tags": [
|
|
6079
|
+
"Entities"
|
|
6080
|
+
],
|
|
6081
|
+
"summary": "Get entity by ID",
|
|
6082
|
+
"description": "Returns any entity by ID. Permission check uses parent collection if entity belongs to one.",
|
|
6083
|
+
"x-arke-action": "entity:view",
|
|
6084
|
+
"x-arke-auth": "optional",
|
|
6085
|
+
"parameters": [
|
|
6086
|
+
{
|
|
6087
|
+
"schema": {
|
|
6088
|
+
"type": "string",
|
|
6089
|
+
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
6090
|
+
"description": "Entity ID (ULID format)",
|
|
6091
|
+
"example": "01KDETYWYWM0MJVKM8DK3AEXPY"
|
|
6092
|
+
},
|
|
6093
|
+
"required": true,
|
|
6094
|
+
"description": "Entity ID (ULID)",
|
|
6095
|
+
"name": "id",
|
|
6096
|
+
"in": "path"
|
|
6097
|
+
}
|
|
6098
|
+
],
|
|
6099
|
+
"responses": {
|
|
6100
|
+
"200": {
|
|
6101
|
+
"description": "Entity found",
|
|
6102
|
+
"content": {
|
|
6103
|
+
"application/json": {
|
|
6104
|
+
"schema": {
|
|
6105
|
+
"$ref": "#/components/schemas/EntityResponse"
|
|
6106
|
+
}
|
|
6107
|
+
}
|
|
6108
|
+
}
|
|
6109
|
+
},
|
|
6110
|
+
"403": {
|
|
6111
|
+
"description": "Forbidden - Insufficient permissions",
|
|
6112
|
+
"content": {
|
|
6113
|
+
"application/json": {
|
|
6114
|
+
"schema": {
|
|
6115
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
6116
|
+
},
|
|
6117
|
+
"example": {
|
|
6118
|
+
"error": "Forbidden: You do not have permission to perform this action"
|
|
6119
|
+
}
|
|
6120
|
+
}
|
|
6121
|
+
}
|
|
6122
|
+
},
|
|
6123
|
+
"404": {
|
|
6124
|
+
"description": "Not Found - Resource does not exist",
|
|
6125
|
+
"content": {
|
|
6126
|
+
"application/json": {
|
|
6127
|
+
"schema": {
|
|
6128
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
6129
|
+
},
|
|
6130
|
+
"example": {
|
|
6131
|
+
"error": "Entity not found"
|
|
6132
|
+
}
|
|
6133
|
+
}
|
|
6134
|
+
}
|
|
6135
|
+
}
|
|
6136
|
+
}
|
|
6137
|
+
},
|
|
6138
|
+
"put": {
|
|
6139
|
+
"tags": [
|
|
6140
|
+
"Entities"
|
|
6141
|
+
],
|
|
6142
|
+
"summary": "Update entity",
|
|
6143
|
+
"description": "Updates any entity with merge semantics. Properties are deep merged, relationships use upsert semantics. Use properties_remove and relationships_remove for deletions. Note: entity:update on a collection requires collection:update permission.",
|
|
6144
|
+
"x-arke-action": "entity:update",
|
|
6145
|
+
"x-arke-auth": "required",
|
|
6146
|
+
"security": [
|
|
6147
|
+
{
|
|
6148
|
+
"bearerAuth": []
|
|
6149
|
+
}
|
|
6150
|
+
],
|
|
6151
|
+
"parameters": [
|
|
6152
|
+
{
|
|
6153
|
+
"schema": {
|
|
6154
|
+
"type": "string",
|
|
6155
|
+
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
6156
|
+
"description": "Entity ID (ULID format)",
|
|
6157
|
+
"example": "01KDETYWYWM0MJVKM8DK3AEXPY"
|
|
6158
|
+
},
|
|
6159
|
+
"required": true,
|
|
6160
|
+
"description": "Entity ID (ULID)",
|
|
6161
|
+
"name": "id",
|
|
6162
|
+
"in": "path"
|
|
6163
|
+
}
|
|
6164
|
+
],
|
|
6165
|
+
"requestBody": {
|
|
6166
|
+
"content": {
|
|
6167
|
+
"application/json": {
|
|
6168
|
+
"schema": {
|
|
6169
|
+
"$ref": "#/components/schemas/UpdateEntityRequest"
|
|
6170
|
+
}
|
|
6171
|
+
}
|
|
6172
|
+
}
|
|
6173
|
+
},
|
|
6174
|
+
"responses": {
|
|
6175
|
+
"200": {
|
|
6176
|
+
"description": "Entity updated",
|
|
6177
|
+
"content": {
|
|
6178
|
+
"application/json": {
|
|
6179
|
+
"schema": {
|
|
6180
|
+
"$ref": "#/components/schemas/EntityUpdatedResponse"
|
|
6181
|
+
}
|
|
6182
|
+
}
|
|
6183
|
+
}
|
|
6184
|
+
},
|
|
6185
|
+
"400": {
|
|
6186
|
+
"description": "Bad Request - Invalid input",
|
|
6187
|
+
"content": {
|
|
6188
|
+
"application/json": {
|
|
6189
|
+
"schema": {
|
|
6190
|
+
"$ref": "#/components/schemas/ValidationErrorResponse"
|
|
6191
|
+
},
|
|
6192
|
+
"example": {
|
|
6193
|
+
"error": "Validation failed",
|
|
6194
|
+
"details": {
|
|
6195
|
+
"issues": [
|
|
6196
|
+
{
|
|
6197
|
+
"path": [
|
|
6198
|
+
"properties",
|
|
6199
|
+
"label"
|
|
6200
|
+
],
|
|
6201
|
+
"message": "Required"
|
|
6202
|
+
}
|
|
6203
|
+
]
|
|
6204
|
+
}
|
|
6205
|
+
}
|
|
6206
|
+
}
|
|
6207
|
+
}
|
|
6208
|
+
},
|
|
6209
|
+
"401": {
|
|
6210
|
+
"description": "Unauthorized - Missing or invalid authentication",
|
|
6211
|
+
"content": {
|
|
6212
|
+
"application/json": {
|
|
6213
|
+
"schema": {
|
|
6214
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
6215
|
+
},
|
|
6216
|
+
"example": {
|
|
6217
|
+
"error": "Unauthorized: Missing or invalid authentication token"
|
|
6218
|
+
}
|
|
6219
|
+
}
|
|
6220
|
+
}
|
|
6221
|
+
},
|
|
6222
|
+
"403": {
|
|
6223
|
+
"description": "Forbidden - Insufficient permissions",
|
|
6224
|
+
"content": {
|
|
6225
|
+
"application/json": {
|
|
6226
|
+
"schema": {
|
|
6227
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
6228
|
+
},
|
|
6229
|
+
"example": {
|
|
6230
|
+
"error": "Forbidden: You do not have permission to perform this action"
|
|
6231
|
+
}
|
|
6232
|
+
}
|
|
6233
|
+
}
|
|
6234
|
+
},
|
|
6235
|
+
"404": {
|
|
6236
|
+
"description": "Not Found - Resource does not exist",
|
|
6237
|
+
"content": {
|
|
6238
|
+
"application/json": {
|
|
6239
|
+
"schema": {
|
|
6240
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
6241
|
+
},
|
|
6242
|
+
"example": {
|
|
6243
|
+
"error": "Entity not found"
|
|
6244
|
+
}
|
|
6245
|
+
}
|
|
6246
|
+
}
|
|
6247
|
+
},
|
|
6248
|
+
"409": {
|
|
6249
|
+
"description": "Conflict - CAS validation failed (entity was modified)",
|
|
6250
|
+
"content": {
|
|
6251
|
+
"application/json": {
|
|
6252
|
+
"schema": {
|
|
6253
|
+
"$ref": "#/components/schemas/CASErrorResponse"
|
|
6254
|
+
},
|
|
6255
|
+
"example": {
|
|
6256
|
+
"error": "Conflict: entity was modified",
|
|
6257
|
+
"details": {
|
|
6258
|
+
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
|
|
6259
|
+
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
|
|
6260
|
+
}
|
|
6261
|
+
}
|
|
6262
|
+
}
|
|
6263
|
+
}
|
|
6264
|
+
}
|
|
6265
|
+
}
|
|
6266
|
+
},
|
|
6267
|
+
"delete": {
|
|
6268
|
+
"tags": [
|
|
6269
|
+
"Entities"
|
|
6270
|
+
],
|
|
6271
|
+
"summary": "Delete entity",
|
|
6272
|
+
"description": "Soft-deletes an entity by creating a tombstone version. The entity can be restored later via POST /entities/:id/restore. Note: entity:delete on a collection requires collection:delete permission.",
|
|
6273
|
+
"x-arke-action": "entity:delete",
|
|
6274
|
+
"x-arke-auth": "required",
|
|
6275
|
+
"security": [
|
|
6276
|
+
{
|
|
6277
|
+
"bearerAuth": []
|
|
6278
|
+
}
|
|
6279
|
+
],
|
|
6280
|
+
"parameters": [
|
|
6281
|
+
{
|
|
6282
|
+
"schema": {
|
|
6283
|
+
"type": "string",
|
|
6284
|
+
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
6285
|
+
"description": "Entity ID (ULID format)",
|
|
6286
|
+
"example": "01KDETYWYWM0MJVKM8DK3AEXPY"
|
|
6287
|
+
},
|
|
6288
|
+
"required": true,
|
|
6289
|
+
"description": "Entity ID (ULID)",
|
|
6290
|
+
"name": "id",
|
|
6291
|
+
"in": "path"
|
|
6292
|
+
}
|
|
6293
|
+
],
|
|
6294
|
+
"requestBody": {
|
|
6295
|
+
"content": {
|
|
6296
|
+
"application/json": {
|
|
6297
|
+
"schema": {
|
|
6298
|
+
"$ref": "#/components/schemas/DeleteEntityRequest"
|
|
5999
6299
|
}
|
|
6000
6300
|
}
|
|
6001
6301
|
}
|
|
6002
6302
|
},
|
|
6003
6303
|
"responses": {
|
|
6004
|
-
"
|
|
6005
|
-
"description": "Entity
|
|
6304
|
+
"200": {
|
|
6305
|
+
"description": "Entity deleted",
|
|
6006
6306
|
"content": {
|
|
6007
6307
|
"application/json": {
|
|
6008
6308
|
"schema": {
|
|
6009
|
-
"$ref": "#/components/schemas/
|
|
6309
|
+
"$ref": "#/components/schemas/EntityDeletedResponse"
|
|
6010
6310
|
}
|
|
6011
6311
|
}
|
|
6012
6312
|
}
|
|
@@ -6061,95 +6361,47 @@
|
|
|
6061
6361
|
}
|
|
6062
6362
|
}
|
|
6063
6363
|
},
|
|
6064
|
-
"
|
|
6065
|
-
"description": "
|
|
6066
|
-
"content": {
|
|
6067
|
-
"application/json": {
|
|
6068
|
-
"schema": {
|
|
6069
|
-
"$ref": "#/components/schemas/CASErrorResponse"
|
|
6070
|
-
},
|
|
6071
|
-
"example": {
|
|
6072
|
-
"error": "Conflict: entity was modified",
|
|
6073
|
-
"details": {
|
|
6074
|
-
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
|
|
6075
|
-
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
|
|
6076
|
-
}
|
|
6077
|
-
}
|
|
6078
|
-
}
|
|
6079
|
-
}
|
|
6080
|
-
}
|
|
6081
|
-
}
|
|
6082
|
-
}
|
|
6083
|
-
},
|
|
6084
|
-
"/entities/{id}": {
|
|
6085
|
-
"get": {
|
|
6086
|
-
"tags": [
|
|
6087
|
-
"Entities"
|
|
6088
|
-
],
|
|
6089
|
-
"summary": "Get entity by ID",
|
|
6090
|
-
"description": "Returns any entity by ID. Permission check uses parent collection if entity belongs to one.",
|
|
6091
|
-
"x-arke-action": "entity:view",
|
|
6092
|
-
"x-arke-auth": "optional",
|
|
6093
|
-
"parameters": [
|
|
6094
|
-
{
|
|
6095
|
-
"schema": {
|
|
6096
|
-
"type": "string",
|
|
6097
|
-
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
6098
|
-
"description": "Entity ID (ULID format)",
|
|
6099
|
-
"example": "01KDETYWYWM0MJVKM8DK3AEXPY"
|
|
6100
|
-
},
|
|
6101
|
-
"required": true,
|
|
6102
|
-
"description": "Entity ID (ULID)",
|
|
6103
|
-
"name": "id",
|
|
6104
|
-
"in": "path"
|
|
6105
|
-
}
|
|
6106
|
-
],
|
|
6107
|
-
"responses": {
|
|
6108
|
-
"200": {
|
|
6109
|
-
"description": "Entity found",
|
|
6110
|
-
"content": {
|
|
6111
|
-
"application/json": {
|
|
6112
|
-
"schema": {
|
|
6113
|
-
"$ref": "#/components/schemas/EntityResponse"
|
|
6114
|
-
}
|
|
6115
|
-
}
|
|
6116
|
-
}
|
|
6117
|
-
},
|
|
6118
|
-
"403": {
|
|
6119
|
-
"description": "Forbidden - Insufficient permissions",
|
|
6364
|
+
"404": {
|
|
6365
|
+
"description": "Not Found - Resource does not exist",
|
|
6120
6366
|
"content": {
|
|
6121
6367
|
"application/json": {
|
|
6122
6368
|
"schema": {
|
|
6123
6369
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
6124
6370
|
},
|
|
6125
6371
|
"example": {
|
|
6126
|
-
"error": "
|
|
6372
|
+
"error": "Entity not found"
|
|
6127
6373
|
}
|
|
6128
6374
|
}
|
|
6129
6375
|
}
|
|
6130
6376
|
},
|
|
6131
|
-
"
|
|
6132
|
-
"description": "
|
|
6377
|
+
"409": {
|
|
6378
|
+
"description": "Conflict - CAS validation failed (entity was modified)",
|
|
6133
6379
|
"content": {
|
|
6134
6380
|
"application/json": {
|
|
6135
6381
|
"schema": {
|
|
6136
|
-
"$ref": "#/components/schemas/
|
|
6382
|
+
"$ref": "#/components/schemas/CASErrorResponse"
|
|
6137
6383
|
},
|
|
6138
6384
|
"example": {
|
|
6139
|
-
"error": "
|
|
6385
|
+
"error": "Conflict: entity was modified",
|
|
6386
|
+
"details": {
|
|
6387
|
+
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
|
|
6388
|
+
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
|
|
6389
|
+
}
|
|
6140
6390
|
}
|
|
6141
6391
|
}
|
|
6142
6392
|
}
|
|
6143
6393
|
}
|
|
6144
6394
|
}
|
|
6145
|
-
}
|
|
6146
|
-
|
|
6395
|
+
}
|
|
6396
|
+
},
|
|
6397
|
+
"/entities/{id}/restore": {
|
|
6398
|
+
"post": {
|
|
6147
6399
|
"tags": [
|
|
6148
6400
|
"Entities"
|
|
6149
6401
|
],
|
|
6150
|
-
"summary": "
|
|
6151
|
-
"description": "
|
|
6152
|
-
"x-arke-action": "entity:
|
|
6402
|
+
"summary": "Restore deleted entity",
|
|
6403
|
+
"description": "Restores a deleted entity by finding the last non-deleted version and creating a new version from it. Note: entity:restore on a collection requires collection:restore permission.",
|
|
6404
|
+
"x-arke-action": "entity:restore",
|
|
6153
6405
|
"x-arke-auth": "required",
|
|
6154
6406
|
"security": [
|
|
6155
6407
|
{
|
|
@@ -6174,18 +6426,18 @@
|
|
|
6174
6426
|
"content": {
|
|
6175
6427
|
"application/json": {
|
|
6176
6428
|
"schema": {
|
|
6177
|
-
"$ref": "#/components/schemas/
|
|
6429
|
+
"$ref": "#/components/schemas/RestoreEntityRequest"
|
|
6178
6430
|
}
|
|
6179
6431
|
}
|
|
6180
6432
|
}
|
|
6181
6433
|
},
|
|
6182
6434
|
"responses": {
|
|
6183
6435
|
"200": {
|
|
6184
|
-
"description": "Entity
|
|
6436
|
+
"description": "Entity restored",
|
|
6185
6437
|
"content": {
|
|
6186
6438
|
"application/json": {
|
|
6187
6439
|
"schema": {
|
|
6188
|
-
"$ref": "#/components/schemas/
|
|
6440
|
+
"$ref": "#/components/schemas/EntityRestoredResponse"
|
|
6189
6441
|
}
|
|
6190
6442
|
}
|
|
6191
6443
|
}
|
|
@@ -6511,7 +6763,7 @@
|
|
|
6511
6763
|
"Files"
|
|
6512
6764
|
],
|
|
6513
6765
|
"summary": "Create file entity",
|
|
6514
|
-
"description": "Creates a new file entity
|
|
6766
|
+
"description": "Creates a new file entity.\n\n## Flow\n1. Call this endpoint with file metadata (key, filename, content_type, size)\n2. Receive entity data (uploaded: false)\n3. POST the file content to /{id}/content\n4. Entity will be updated with uploaded: true and verified CID\n\n## Key Best Practice\nUse a unique identifier as the key (e.g., version number, timestamp).\nThe actual CID is computed during upload.",
|
|
6515
6767
|
"x-arke-action": "file:create",
|
|
6516
6768
|
"x-arke-auth": "required",
|
|
6517
6769
|
"security": [
|
|
@@ -6615,7 +6867,7 @@
|
|
|
6615
6867
|
"Files"
|
|
6616
6868
|
],
|
|
6617
6869
|
"summary": "Get file metadata",
|
|
6618
|
-
"description": "Returns file entity metadata. Use /
|
|
6870
|
+
"description": "Returns file entity metadata. Use /{id}/content to download the file content.",
|
|
6619
6871
|
"x-arke-action": "file:view",
|
|
6620
6872
|
"x-arke-auth": "optional",
|
|
6621
6873
|
"parameters": [
|
|
@@ -6676,7 +6928,7 @@
|
|
|
6676
6928
|
"Files"
|
|
6677
6929
|
],
|
|
6678
6930
|
"summary": "Update file metadata",
|
|
6679
|
-
"description": "Updates file metadata without changing the file content.\n\n## Key Changes\nThe key can be changed, but ONLY to a key that already exists in
|
|
6931
|
+
"description": "Updates file metadata without changing the file content.\n\n## Key Changes\nThe key can be changed, but ONLY to a key that already exists in R2.\nThis allows \"regressing\" to a previous file version.\n\nTo upload a new file, use POST /{id}/reupload instead.",
|
|
6680
6932
|
"x-arke-action": "file:update",
|
|
6681
6933
|
"x-arke-auth": "required",
|
|
6682
6934
|
"security": [
|
|
@@ -6801,77 +7053,14 @@
|
|
|
6801
7053
|
}
|
|
6802
7054
|
}
|
|
6803
7055
|
},
|
|
6804
|
-
"/files/{id}/
|
|
6805
|
-
"get": {
|
|
6806
|
-
"tags": [
|
|
6807
|
-
"Files"
|
|
6808
|
-
],
|
|
6809
|
-
"summary": "Get download URL",
|
|
6810
|
-
"description": "Returns a presigned URL for downloading the file content. URL expires in 5 minutes.",
|
|
6811
|
-
"x-arke-action": "file:download",
|
|
6812
|
-
"x-arke-auth": "optional",
|
|
6813
|
-
"parameters": [
|
|
6814
|
-
{
|
|
6815
|
-
"schema": {
|
|
6816
|
-
"type": "string",
|
|
6817
|
-
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
6818
|
-
"description": "Entity ID (ULID format)",
|
|
6819
|
-
"example": "01KDETYWYWM0MJVKM8DK3AEXPY"
|
|
6820
|
-
},
|
|
6821
|
-
"required": true,
|
|
6822
|
-
"description": "Entity ID (ULID)",
|
|
6823
|
-
"name": "id",
|
|
6824
|
-
"in": "path"
|
|
6825
|
-
}
|
|
6826
|
-
],
|
|
6827
|
-
"responses": {
|
|
6828
|
-
"200": {
|
|
6829
|
-
"description": "Download URL generated",
|
|
6830
|
-
"content": {
|
|
6831
|
-
"application/json": {
|
|
6832
|
-
"schema": {
|
|
6833
|
-
"$ref": "#/components/schemas/DownloadResponse"
|
|
6834
|
-
}
|
|
6835
|
-
}
|
|
6836
|
-
}
|
|
6837
|
-
},
|
|
6838
|
-
"403": {
|
|
6839
|
-
"description": "Forbidden - Insufficient permissions",
|
|
6840
|
-
"content": {
|
|
6841
|
-
"application/json": {
|
|
6842
|
-
"schema": {
|
|
6843
|
-
"$ref": "#/components/schemas/ErrorResponse"
|
|
6844
|
-
},
|
|
6845
|
-
"example": {
|
|
6846
|
-
"error": "Forbidden: You do not have permission to perform this action"
|
|
6847
|
-
}
|
|
6848
|
-
}
|
|
6849
|
-
}
|
|
6850
|
-
},
|
|
6851
|
-
"404": {
|
|
6852
|
-
"description": "Not Found - Resource does not exist",
|
|
6853
|
-
"content": {
|
|
6854
|
-
"application/json": {
|
|
6855
|
-
"schema": {
|
|
6856
|
-
"$ref": "#/components/schemas/ErrorResponse"
|
|
6857
|
-
},
|
|
6858
|
-
"example": {
|
|
6859
|
-
"error": "Entity not found"
|
|
6860
|
-
}
|
|
6861
|
-
}
|
|
6862
|
-
}
|
|
6863
|
-
}
|
|
6864
|
-
}
|
|
6865
|
-
}
|
|
6866
|
-
},
|
|
6867
|
-
"/files/{id}/reupload": {
|
|
7056
|
+
"/files/{id}/content": {
|
|
6868
7057
|
"post": {
|
|
6869
7058
|
"tags": [
|
|
6870
7059
|
"Files"
|
|
6871
7060
|
],
|
|
6872
|
-
"summary": "Upload
|
|
6873
|
-
"description": "Uploads
|
|
6874
|
-
"x-arke-action": "file:
|
|
7061
|
+
"summary": "Upload file content",
|
|
7062
|
+
"description": "Uploads the binary content for a file entity.\n\n## Request\n- Content-Type: The MIME type of the file (must match entity's content_type)\n- Body: Binary file content (streaming supported)\n\n## Limits\n- Maximum file size: 500 MB\n\n## Behavior\n- Streams content directly to R2\n- Computes CID from file bytes\n- Updates entity with uploaded: true, verified size, and computed CID\n- Atomic operation - either fully succeeds or fails\n\n## Idempotency\nRe-uploading content for an already-uploaded file will fail with 409 Conflict.\nUse POST /{id}/reupload first to create a new version.",
|
|
7063
|
+
"x-arke-action": "file:upload",
|
|
6875
7064
|
"x-arke-auth": "required",
|
|
6876
7065
|
"security": [
|
|
6877
7066
|
{
|
|
@@ -6892,22 +7081,13 @@
|
|
|
6892
7081
|
"in": "path"
|
|
6893
7082
|
}
|
|
6894
7083
|
],
|
|
6895
|
-
"requestBody": {
|
|
6896
|
-
"content": {
|
|
6897
|
-
"application/json": {
|
|
6898
|
-
"schema": {
|
|
6899
|
-
"$ref": "#/components/schemas/ReuploadFileRequest"
|
|
6900
|
-
}
|
|
6901
|
-
}
|
|
6902
|
-
}
|
|
6903
|
-
},
|
|
6904
7084
|
"responses": {
|
|
6905
7085
|
"200": {
|
|
6906
|
-
"description": "File
|
|
7086
|
+
"description": "File content uploaded",
|
|
6907
7087
|
"content": {
|
|
6908
7088
|
"application/json": {
|
|
6909
7089
|
"schema": {
|
|
6910
|
-
"$ref": "#/components/schemas/
|
|
7090
|
+
"$ref": "#/components/schemas/UploadContentResponse"
|
|
6911
7091
|
}
|
|
6912
7092
|
}
|
|
6913
7093
|
}
|
|
@@ -6991,18 +7171,103 @@
|
|
|
6991
7171
|
}
|
|
6992
7172
|
}
|
|
6993
7173
|
}
|
|
7174
|
+
},
|
|
7175
|
+
"413": {
|
|
7176
|
+
"description": "File too large (max 500 MB)",
|
|
7177
|
+
"content": {
|
|
7178
|
+
"application/json": {
|
|
7179
|
+
"schema": {
|
|
7180
|
+
"$ref": "#/components/schemas/ValidationErrorResponse"
|
|
7181
|
+
}
|
|
7182
|
+
}
|
|
7183
|
+
}
|
|
7184
|
+
},
|
|
7185
|
+
"500": {
|
|
7186
|
+
"description": "Internal Server Error",
|
|
7187
|
+
"content": {
|
|
7188
|
+
"application/json": {
|
|
7189
|
+
"schema": {
|
|
7190
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
7191
|
+
},
|
|
7192
|
+
"example": {
|
|
7193
|
+
"error": "Internal server error"
|
|
7194
|
+
}
|
|
7195
|
+
}
|
|
7196
|
+
}
|
|
7197
|
+
}
|
|
7198
|
+
}
|
|
7199
|
+
},
|
|
7200
|
+
"get": {
|
|
7201
|
+
"tags": [
|
|
7202
|
+
"Files"
|
|
7203
|
+
],
|
|
7204
|
+
"summary": "Download file content",
|
|
7205
|
+
"description": "Downloads the binary content of a file entity.\n\n## Response Headers\n- Content-Type: The MIME type of the file\n- Content-Length: File size in bytes\n- Content-Disposition: attachment; filename=\"original_filename\"\n\n## Streaming\nResponse is streamed directly from R2 storage.",
|
|
7206
|
+
"x-arke-action": "file:download",
|
|
7207
|
+
"x-arke-auth": "optional",
|
|
7208
|
+
"parameters": [
|
|
7209
|
+
{
|
|
7210
|
+
"schema": {
|
|
7211
|
+
"type": "string",
|
|
7212
|
+
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
7213
|
+
"description": "Entity ID (ULID format)",
|
|
7214
|
+
"example": "01KDETYWYWM0MJVKM8DK3AEXPY"
|
|
7215
|
+
},
|
|
7216
|
+
"required": true,
|
|
7217
|
+
"description": "Entity ID (ULID)",
|
|
7218
|
+
"name": "id",
|
|
7219
|
+
"in": "path"
|
|
7220
|
+
}
|
|
7221
|
+
],
|
|
7222
|
+
"responses": {
|
|
7223
|
+
"200": {
|
|
7224
|
+
"description": "File content",
|
|
7225
|
+
"content": {
|
|
7226
|
+
"application/octet-stream": {
|
|
7227
|
+
"schema": {
|
|
7228
|
+
"type": "string",
|
|
7229
|
+
"format": "binary"
|
|
7230
|
+
}
|
|
7231
|
+
}
|
|
7232
|
+
}
|
|
7233
|
+
},
|
|
7234
|
+
"403": {
|
|
7235
|
+
"description": "Forbidden - Insufficient permissions",
|
|
7236
|
+
"content": {
|
|
7237
|
+
"application/json": {
|
|
7238
|
+
"schema": {
|
|
7239
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
7240
|
+
},
|
|
7241
|
+
"example": {
|
|
7242
|
+
"error": "Forbidden: You do not have permission to perform this action"
|
|
7243
|
+
}
|
|
7244
|
+
}
|
|
7245
|
+
}
|
|
7246
|
+
},
|
|
7247
|
+
"404": {
|
|
7248
|
+
"description": "Not Found - Resource does not exist",
|
|
7249
|
+
"content": {
|
|
7250
|
+
"application/json": {
|
|
7251
|
+
"schema": {
|
|
7252
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
7253
|
+
},
|
|
7254
|
+
"example": {
|
|
7255
|
+
"error": "Entity not found"
|
|
7256
|
+
}
|
|
7257
|
+
}
|
|
7258
|
+
}
|
|
6994
7259
|
}
|
|
6995
7260
|
}
|
|
6996
7261
|
}
|
|
6997
7262
|
},
|
|
6998
|
-
"/files/{id}/
|
|
7263
|
+
"/files/{id}/reupload": {
|
|
6999
7264
|
"post": {
|
|
7000
7265
|
"tags": [
|
|
7001
7266
|
"Files"
|
|
7002
7267
|
],
|
|
7003
|
-
"summary": "
|
|
7004
|
-
"description": "
|
|
7005
|
-
"x-arke-action": "file:
|
|
7268
|
+
"summary": "Prepare for new file version",
|
|
7269
|
+
"description": "Prepares the entity for uploading a new file version.\n\n## Flow\n1. Call this endpoint with new key and file metadata\n2. Receive updated entity (uploaded: false)\n3. POST the new file content to /{id}/content\n4. Entity will be updated with uploaded: true and verified CID\n\n## Key Requirement\nThe new key must NOT already exist in R2 (no overwrites).\nPrevious file versions remain accessible via manifest history.",
|
|
7270
|
+
"x-arke-action": "file:reupload",
|
|
7006
7271
|
"x-arke-auth": "required",
|
|
7007
7272
|
"security": [
|
|
7008
7273
|
{
|
|
@@ -7027,18 +7292,18 @@
|
|
|
7027
7292
|
"content": {
|
|
7028
7293
|
"application/json": {
|
|
7029
7294
|
"schema": {
|
|
7030
|
-
"$ref": "#/components/schemas/
|
|
7295
|
+
"$ref": "#/components/schemas/ReuploadFileRequest"
|
|
7031
7296
|
}
|
|
7032
7297
|
}
|
|
7033
7298
|
}
|
|
7034
7299
|
},
|
|
7035
7300
|
"responses": {
|
|
7036
7301
|
"200": {
|
|
7037
|
-
"description": "
|
|
7302
|
+
"description": "Ready for new file version upload",
|
|
7038
7303
|
"content": {
|
|
7039
7304
|
"application/json": {
|
|
7040
7305
|
"schema": {
|
|
7041
|
-
"$ref": "#/components/schemas/
|
|
7306
|
+
"$ref": "#/components/schemas/ReuploadFileResponse"
|
|
7042
7307
|
}
|
|
7043
7308
|
}
|
|
7044
7309
|
}
|
|
@@ -8982,40 +9247,53 @@
|
|
|
8982
9247
|
"tags": [
|
|
8983
9248
|
"Events"
|
|
8984
9249
|
],
|
|
8985
|
-
"summary": "List events",
|
|
8986
|
-
"description": "Returns
|
|
9250
|
+
"summary": "List entity change events",
|
|
9251
|
+
"description": "Returns a cursor-based list of entity change events for client synchronization.\n\n**Usage:**\n- Start with `?after=0` to get all events\n- Use the returned `cursor` as `?after=` for the next page\n- Poll periodically (e.g., every 10s) to stay in sync\n\n**Event data:**\n- `id`: Auto-increment ID (use as cursor)\n- `pi`: Entity ID that changed\n- `cid`: New manifest CID\n- `ts`: ISO timestamp\n\nEvents are ephemeral (30-day rolling window) - for full sync, use snapshots.",
|
|
8987
9252
|
"x-arke-action": "events:list",
|
|
8988
9253
|
"x-arke-auth": "none",
|
|
8989
9254
|
"parameters": [
|
|
9255
|
+
{
|
|
9256
|
+
"schema": {
|
|
9257
|
+
"type": "integer",
|
|
9258
|
+
"nullable": true,
|
|
9259
|
+
"minimum": 0,
|
|
9260
|
+
"example": 12345
|
|
9261
|
+
},
|
|
9262
|
+
"required": false,
|
|
9263
|
+
"description": "Return events with id > after (cursor for pagination)",
|
|
9264
|
+
"name": "after",
|
|
9265
|
+
"in": "query"
|
|
9266
|
+
},
|
|
8990
9267
|
{
|
|
8991
9268
|
"schema": {
|
|
8992
9269
|
"type": "integer",
|
|
8993
9270
|
"minimum": 1,
|
|
8994
|
-
"maximum":
|
|
8995
|
-
"
|
|
8996
|
-
"example": 50
|
|
9271
|
+
"maximum": 1000,
|
|
9272
|
+
"example": 100
|
|
8997
9273
|
},
|
|
8998
9274
|
"required": false,
|
|
8999
|
-
"description": "Maximum events to return (
|
|
9275
|
+
"description": "Maximum number of events to return (default: 100, max: 1000)",
|
|
9000
9276
|
"name": "limit",
|
|
9001
9277
|
"in": "query"
|
|
9002
9278
|
},
|
|
9003
9279
|
{
|
|
9004
9280
|
"schema": {
|
|
9005
9281
|
"type": "string",
|
|
9006
|
-
"
|
|
9007
|
-
|
|
9008
|
-
|
|
9282
|
+
"enum": [
|
|
9283
|
+
"main",
|
|
9284
|
+
"test"
|
|
9285
|
+
],
|
|
9286
|
+
"example": "main"
|
|
9009
9287
|
},
|
|
9010
9288
|
"required": false,
|
|
9011
|
-
"description": "
|
|
9012
|
-
"name": "
|
|
9289
|
+
"description": "Network to query (default: main)",
|
|
9290
|
+
"name": "network",
|
|
9013
9291
|
"in": "query"
|
|
9014
9292
|
}
|
|
9015
9293
|
],
|
|
9016
9294
|
"responses": {
|
|
9017
9295
|
"200": {
|
|
9018
|
-
"description": "
|
|
9296
|
+
"description": "Events list",
|
|
9019
9297
|
"content": {
|
|
9020
9298
|
"application/json": {
|
|
9021
9299
|
"schema": {
|