@arke-institute/sdk 2.3.2 → 2.3.4
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/generated/index.d.cts +138 -11
- package/dist/generated/index.d.ts +138 -11
- package/openapi/spec.json +192 -9
- package/openapi/version.json +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Source: Arke v1 API
|
|
8
8
|
* Version: 1.0.0
|
|
9
|
-
* Generated: 2026-01-
|
|
9
|
+
* Generated: 2026-01-05T14:48:23.714Z
|
|
10
10
|
*/
|
|
11
11
|
type paths = {
|
|
12
12
|
"/auth/register": {
|
|
@@ -1497,6 +1497,89 @@ type paths = {
|
|
|
1497
1497
|
patch?: never;
|
|
1498
1498
|
trace?: never;
|
|
1499
1499
|
};
|
|
1500
|
+
"/collections/{id}/entities": {
|
|
1501
|
+
parameters: {
|
|
1502
|
+
query?: never;
|
|
1503
|
+
header?: never;
|
|
1504
|
+
path?: never;
|
|
1505
|
+
cookie?: never;
|
|
1506
|
+
};
|
|
1507
|
+
/**
|
|
1508
|
+
* List entities in a collection
|
|
1509
|
+
* @description Returns entities belonging to this collection from the graph database.
|
|
1510
|
+
*
|
|
1511
|
+
* Supports pagination and optional type filtering. Results are ordered by creation date (newest first).
|
|
1512
|
+
*/
|
|
1513
|
+
get: {
|
|
1514
|
+
parameters: {
|
|
1515
|
+
query?: {
|
|
1516
|
+
type?: string;
|
|
1517
|
+
limit?: number;
|
|
1518
|
+
offset?: number | null;
|
|
1519
|
+
};
|
|
1520
|
+
header?: never;
|
|
1521
|
+
path: {
|
|
1522
|
+
/** @description Entity ID (ULID) */
|
|
1523
|
+
id: string;
|
|
1524
|
+
};
|
|
1525
|
+
cookie?: never;
|
|
1526
|
+
};
|
|
1527
|
+
requestBody?: never;
|
|
1528
|
+
responses: {
|
|
1529
|
+
/** @description Entities in collection */
|
|
1530
|
+
200: {
|
|
1531
|
+
headers: {
|
|
1532
|
+
[name: string]: unknown;
|
|
1533
|
+
};
|
|
1534
|
+
content: {
|
|
1535
|
+
"application/json": components["schemas"]["CollectionEntitiesResponse"];
|
|
1536
|
+
};
|
|
1537
|
+
};
|
|
1538
|
+
/** @description Forbidden - Insufficient permissions */
|
|
1539
|
+
403: {
|
|
1540
|
+
headers: {
|
|
1541
|
+
[name: string]: unknown;
|
|
1542
|
+
};
|
|
1543
|
+
content: {
|
|
1544
|
+
/**
|
|
1545
|
+
* @example {
|
|
1546
|
+
* "error": "Forbidden: You do not have permission to perform this action"
|
|
1547
|
+
* }
|
|
1548
|
+
*/
|
|
1549
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1550
|
+
};
|
|
1551
|
+
};
|
|
1552
|
+
/** @description Not Found - Resource does not exist */
|
|
1553
|
+
404: {
|
|
1554
|
+
headers: {
|
|
1555
|
+
[name: string]: unknown;
|
|
1556
|
+
};
|
|
1557
|
+
content: {
|
|
1558
|
+
/**
|
|
1559
|
+
* @example {
|
|
1560
|
+
* "error": "Entity not found"
|
|
1561
|
+
* }
|
|
1562
|
+
*/
|
|
1563
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1564
|
+
};
|
|
1565
|
+
};
|
|
1566
|
+
/** @description GraphDB service unavailable */
|
|
1567
|
+
503: {
|
|
1568
|
+
headers: {
|
|
1569
|
+
[name: string]: unknown;
|
|
1570
|
+
};
|
|
1571
|
+
content?: never;
|
|
1572
|
+
};
|
|
1573
|
+
};
|
|
1574
|
+
};
|
|
1575
|
+
put?: never;
|
|
1576
|
+
post?: never;
|
|
1577
|
+
delete?: never;
|
|
1578
|
+
options?: never;
|
|
1579
|
+
head?: never;
|
|
1580
|
+
patch?: never;
|
|
1581
|
+
trace?: never;
|
|
1582
|
+
};
|
|
1500
1583
|
"/entities": {
|
|
1501
1584
|
parameters: {
|
|
1502
1585
|
query?: never;
|
|
@@ -4936,12 +5019,17 @@ type paths = {
|
|
|
4936
5019
|
* @description Returns a cursor-based list of entity change events for client synchronization.
|
|
4937
5020
|
*
|
|
4938
5021
|
* **Usage:**
|
|
4939
|
-
* -
|
|
4940
|
-
* - Use
|
|
4941
|
-
* - Poll
|
|
5022
|
+
* - Call without cursor to get newest events
|
|
5023
|
+
* - Use returned `cursor` as `?cursor=` to get older events
|
|
5024
|
+
* - Poll without cursor periodically to check for new events
|
|
5025
|
+
*
|
|
5026
|
+
* **Sync flow:**
|
|
5027
|
+
* 1. Initial: `GET /events` → get newest, save highest `id` as high-water mark
|
|
5028
|
+
* 2. Paginate: `GET /events?cursor=X` → get older events until `has_more=false`
|
|
5029
|
+
* 3. Poll: `GET /events` → if newest `id` > high-water mark, process new events
|
|
4942
5030
|
*
|
|
4943
5031
|
* **Event data:**
|
|
4944
|
-
* - `id`: Auto-increment ID
|
|
5032
|
+
* - `id`: Auto-increment ID
|
|
4945
5033
|
* - `pi`: Entity ID that changed
|
|
4946
5034
|
* - `cid`: New manifest CID
|
|
4947
5035
|
* - `ts`: ISO timestamp
|
|
@@ -4951,8 +5039,8 @@ type paths = {
|
|
|
4951
5039
|
get: {
|
|
4952
5040
|
parameters: {
|
|
4953
5041
|
query?: {
|
|
4954
|
-
/** @description Return events
|
|
4955
|
-
|
|
5042
|
+
/** @description Return events older than this id (from previous response cursor) */
|
|
5043
|
+
cursor?: number;
|
|
4956
5044
|
/** @description Maximum number of events to return (default: 100, max: 1000) */
|
|
4957
5045
|
limit?: number;
|
|
4958
5046
|
/** @description Network to query (default: main) */
|
|
@@ -5613,6 +5701,45 @@ type components = {
|
|
|
5613
5701
|
*/
|
|
5614
5702
|
entity_id: string;
|
|
5615
5703
|
};
|
|
5704
|
+
CollectionEntitySummary: {
|
|
5705
|
+
/** @description Entity persistent identifier */
|
|
5706
|
+
pi: string;
|
|
5707
|
+
/**
|
|
5708
|
+
* @description Entity type
|
|
5709
|
+
* @example document
|
|
5710
|
+
*/
|
|
5711
|
+
type: string;
|
|
5712
|
+
/**
|
|
5713
|
+
* @description Entity display label
|
|
5714
|
+
* @example My Document
|
|
5715
|
+
*/
|
|
5716
|
+
label: string;
|
|
5717
|
+
/**
|
|
5718
|
+
* Format: date-time
|
|
5719
|
+
* @description When the entity was created
|
|
5720
|
+
*/
|
|
5721
|
+
created_at: string;
|
|
5722
|
+
/**
|
|
5723
|
+
* Format: date-time
|
|
5724
|
+
* @description When the entity was last updated
|
|
5725
|
+
*/
|
|
5726
|
+
updated_at: string;
|
|
5727
|
+
};
|
|
5728
|
+
CollectionEntitiesResponse: {
|
|
5729
|
+
/** @description Collection ID */
|
|
5730
|
+
collection_id: string;
|
|
5731
|
+
/** @description Entities in this collection */
|
|
5732
|
+
entities: components["schemas"]["CollectionEntitySummary"][];
|
|
5733
|
+
/** @description Pagination info */
|
|
5734
|
+
pagination: {
|
|
5735
|
+
/** @description Current offset */
|
|
5736
|
+
offset: number;
|
|
5737
|
+
/** @description Requested limit */
|
|
5738
|
+
limit: number;
|
|
5739
|
+
/** @description Number of entities returned */
|
|
5740
|
+
count: number;
|
|
5741
|
+
};
|
|
5742
|
+
};
|
|
5616
5743
|
EntityCreatedResponse: {
|
|
5617
5744
|
/**
|
|
5618
5745
|
* @description Entity ID (ULID format)
|
|
@@ -7093,16 +7220,16 @@ type components = {
|
|
|
7093
7220
|
ts: string;
|
|
7094
7221
|
};
|
|
7095
7222
|
EventsListResponse: {
|
|
7096
|
-
/** @description List of events */
|
|
7223
|
+
/** @description List of events (newest first) */
|
|
7097
7224
|
events: components["schemas"]["Event"][];
|
|
7098
7225
|
/**
|
|
7099
|
-
* @description Whether there are more events available
|
|
7226
|
+
* @description Whether there are more (older) events available
|
|
7100
7227
|
* @example true
|
|
7101
7228
|
*/
|
|
7102
7229
|
has_more: boolean;
|
|
7103
7230
|
/**
|
|
7104
|
-
* @description Cursor for the next page (pass as ?
|
|
7105
|
-
* @example
|
|
7231
|
+
* @description Cursor for the next page (oldest id in batch, pass as ?cursor= for older events)
|
|
7232
|
+
* @example 12340
|
|
7106
7233
|
*/
|
|
7107
7234
|
cursor: number;
|
|
7108
7235
|
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Source: Arke v1 API
|
|
8
8
|
* Version: 1.0.0
|
|
9
|
-
* Generated: 2026-01-
|
|
9
|
+
* Generated: 2026-01-05T14:48:23.714Z
|
|
10
10
|
*/
|
|
11
11
|
type paths = {
|
|
12
12
|
"/auth/register": {
|
|
@@ -1497,6 +1497,89 @@ type paths = {
|
|
|
1497
1497
|
patch?: never;
|
|
1498
1498
|
trace?: never;
|
|
1499
1499
|
};
|
|
1500
|
+
"/collections/{id}/entities": {
|
|
1501
|
+
parameters: {
|
|
1502
|
+
query?: never;
|
|
1503
|
+
header?: never;
|
|
1504
|
+
path?: never;
|
|
1505
|
+
cookie?: never;
|
|
1506
|
+
};
|
|
1507
|
+
/**
|
|
1508
|
+
* List entities in a collection
|
|
1509
|
+
* @description Returns entities belonging to this collection from the graph database.
|
|
1510
|
+
*
|
|
1511
|
+
* Supports pagination and optional type filtering. Results are ordered by creation date (newest first).
|
|
1512
|
+
*/
|
|
1513
|
+
get: {
|
|
1514
|
+
parameters: {
|
|
1515
|
+
query?: {
|
|
1516
|
+
type?: string;
|
|
1517
|
+
limit?: number;
|
|
1518
|
+
offset?: number | null;
|
|
1519
|
+
};
|
|
1520
|
+
header?: never;
|
|
1521
|
+
path: {
|
|
1522
|
+
/** @description Entity ID (ULID) */
|
|
1523
|
+
id: string;
|
|
1524
|
+
};
|
|
1525
|
+
cookie?: never;
|
|
1526
|
+
};
|
|
1527
|
+
requestBody?: never;
|
|
1528
|
+
responses: {
|
|
1529
|
+
/** @description Entities in collection */
|
|
1530
|
+
200: {
|
|
1531
|
+
headers: {
|
|
1532
|
+
[name: string]: unknown;
|
|
1533
|
+
};
|
|
1534
|
+
content: {
|
|
1535
|
+
"application/json": components["schemas"]["CollectionEntitiesResponse"];
|
|
1536
|
+
};
|
|
1537
|
+
};
|
|
1538
|
+
/** @description Forbidden - Insufficient permissions */
|
|
1539
|
+
403: {
|
|
1540
|
+
headers: {
|
|
1541
|
+
[name: string]: unknown;
|
|
1542
|
+
};
|
|
1543
|
+
content: {
|
|
1544
|
+
/**
|
|
1545
|
+
* @example {
|
|
1546
|
+
* "error": "Forbidden: You do not have permission to perform this action"
|
|
1547
|
+
* }
|
|
1548
|
+
*/
|
|
1549
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1550
|
+
};
|
|
1551
|
+
};
|
|
1552
|
+
/** @description Not Found - Resource does not exist */
|
|
1553
|
+
404: {
|
|
1554
|
+
headers: {
|
|
1555
|
+
[name: string]: unknown;
|
|
1556
|
+
};
|
|
1557
|
+
content: {
|
|
1558
|
+
/**
|
|
1559
|
+
* @example {
|
|
1560
|
+
* "error": "Entity not found"
|
|
1561
|
+
* }
|
|
1562
|
+
*/
|
|
1563
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1564
|
+
};
|
|
1565
|
+
};
|
|
1566
|
+
/** @description GraphDB service unavailable */
|
|
1567
|
+
503: {
|
|
1568
|
+
headers: {
|
|
1569
|
+
[name: string]: unknown;
|
|
1570
|
+
};
|
|
1571
|
+
content?: never;
|
|
1572
|
+
};
|
|
1573
|
+
};
|
|
1574
|
+
};
|
|
1575
|
+
put?: never;
|
|
1576
|
+
post?: never;
|
|
1577
|
+
delete?: never;
|
|
1578
|
+
options?: never;
|
|
1579
|
+
head?: never;
|
|
1580
|
+
patch?: never;
|
|
1581
|
+
trace?: never;
|
|
1582
|
+
};
|
|
1500
1583
|
"/entities": {
|
|
1501
1584
|
parameters: {
|
|
1502
1585
|
query?: never;
|
|
@@ -4936,12 +5019,17 @@ type paths = {
|
|
|
4936
5019
|
* @description Returns a cursor-based list of entity change events for client synchronization.
|
|
4937
5020
|
*
|
|
4938
5021
|
* **Usage:**
|
|
4939
|
-
* -
|
|
4940
|
-
* - Use
|
|
4941
|
-
* - Poll
|
|
5022
|
+
* - Call without cursor to get newest events
|
|
5023
|
+
* - Use returned `cursor` as `?cursor=` to get older events
|
|
5024
|
+
* - Poll without cursor periodically to check for new events
|
|
5025
|
+
*
|
|
5026
|
+
* **Sync flow:**
|
|
5027
|
+
* 1. Initial: `GET /events` → get newest, save highest `id` as high-water mark
|
|
5028
|
+
* 2. Paginate: `GET /events?cursor=X` → get older events until `has_more=false`
|
|
5029
|
+
* 3. Poll: `GET /events` → if newest `id` > high-water mark, process new events
|
|
4942
5030
|
*
|
|
4943
5031
|
* **Event data:**
|
|
4944
|
-
* - `id`: Auto-increment ID
|
|
5032
|
+
* - `id`: Auto-increment ID
|
|
4945
5033
|
* - `pi`: Entity ID that changed
|
|
4946
5034
|
* - `cid`: New manifest CID
|
|
4947
5035
|
* - `ts`: ISO timestamp
|
|
@@ -4951,8 +5039,8 @@ type paths = {
|
|
|
4951
5039
|
get: {
|
|
4952
5040
|
parameters: {
|
|
4953
5041
|
query?: {
|
|
4954
|
-
/** @description Return events
|
|
4955
|
-
|
|
5042
|
+
/** @description Return events older than this id (from previous response cursor) */
|
|
5043
|
+
cursor?: number;
|
|
4956
5044
|
/** @description Maximum number of events to return (default: 100, max: 1000) */
|
|
4957
5045
|
limit?: number;
|
|
4958
5046
|
/** @description Network to query (default: main) */
|
|
@@ -5613,6 +5701,45 @@ type components = {
|
|
|
5613
5701
|
*/
|
|
5614
5702
|
entity_id: string;
|
|
5615
5703
|
};
|
|
5704
|
+
CollectionEntitySummary: {
|
|
5705
|
+
/** @description Entity persistent identifier */
|
|
5706
|
+
pi: string;
|
|
5707
|
+
/**
|
|
5708
|
+
* @description Entity type
|
|
5709
|
+
* @example document
|
|
5710
|
+
*/
|
|
5711
|
+
type: string;
|
|
5712
|
+
/**
|
|
5713
|
+
* @description Entity display label
|
|
5714
|
+
* @example My Document
|
|
5715
|
+
*/
|
|
5716
|
+
label: string;
|
|
5717
|
+
/**
|
|
5718
|
+
* Format: date-time
|
|
5719
|
+
* @description When the entity was created
|
|
5720
|
+
*/
|
|
5721
|
+
created_at: string;
|
|
5722
|
+
/**
|
|
5723
|
+
* Format: date-time
|
|
5724
|
+
* @description When the entity was last updated
|
|
5725
|
+
*/
|
|
5726
|
+
updated_at: string;
|
|
5727
|
+
};
|
|
5728
|
+
CollectionEntitiesResponse: {
|
|
5729
|
+
/** @description Collection ID */
|
|
5730
|
+
collection_id: string;
|
|
5731
|
+
/** @description Entities in this collection */
|
|
5732
|
+
entities: components["schemas"]["CollectionEntitySummary"][];
|
|
5733
|
+
/** @description Pagination info */
|
|
5734
|
+
pagination: {
|
|
5735
|
+
/** @description Current offset */
|
|
5736
|
+
offset: number;
|
|
5737
|
+
/** @description Requested limit */
|
|
5738
|
+
limit: number;
|
|
5739
|
+
/** @description Number of entities returned */
|
|
5740
|
+
count: number;
|
|
5741
|
+
};
|
|
5742
|
+
};
|
|
5616
5743
|
EntityCreatedResponse: {
|
|
5617
5744
|
/**
|
|
5618
5745
|
* @description Entity ID (ULID format)
|
|
@@ -7093,16 +7220,16 @@ type components = {
|
|
|
7093
7220
|
ts: string;
|
|
7094
7221
|
};
|
|
7095
7222
|
EventsListResponse: {
|
|
7096
|
-
/** @description List of events */
|
|
7223
|
+
/** @description List of events (newest first) */
|
|
7097
7224
|
events: components["schemas"]["Event"][];
|
|
7098
7225
|
/**
|
|
7099
|
-
* @description Whether there are more events available
|
|
7226
|
+
* @description Whether there are more (older) events available
|
|
7100
7227
|
* @example true
|
|
7101
7228
|
*/
|
|
7102
7229
|
has_more: boolean;
|
|
7103
7230
|
/**
|
|
7104
|
-
* @description Cursor for the next page (pass as ?
|
|
7105
|
-
* @example
|
|
7231
|
+
* @description Cursor for the next page (oldest id in batch, pass as ?cursor= for older events)
|
|
7232
|
+
* @example 12340
|
|
7106
7233
|
*/
|
|
7107
7234
|
cursor: number;
|
|
7108
7235
|
};
|
package/openapi/spec.json
CHANGED
|
@@ -1329,6 +1329,88 @@
|
|
|
1329
1329
|
"entity_id"
|
|
1330
1330
|
]
|
|
1331
1331
|
},
|
|
1332
|
+
"CollectionEntitySummary": {
|
|
1333
|
+
"type": "object",
|
|
1334
|
+
"properties": {
|
|
1335
|
+
"pi": {
|
|
1336
|
+
"type": "string",
|
|
1337
|
+
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
1338
|
+
"description": "Entity persistent identifier"
|
|
1339
|
+
},
|
|
1340
|
+
"type": {
|
|
1341
|
+
"type": "string",
|
|
1342
|
+
"description": "Entity type",
|
|
1343
|
+
"example": "document"
|
|
1344
|
+
},
|
|
1345
|
+
"label": {
|
|
1346
|
+
"type": "string",
|
|
1347
|
+
"description": "Entity display label",
|
|
1348
|
+
"example": "My Document"
|
|
1349
|
+
},
|
|
1350
|
+
"created_at": {
|
|
1351
|
+
"type": "string",
|
|
1352
|
+
"format": "date-time",
|
|
1353
|
+
"description": "When the entity was created"
|
|
1354
|
+
},
|
|
1355
|
+
"updated_at": {
|
|
1356
|
+
"type": "string",
|
|
1357
|
+
"format": "date-time",
|
|
1358
|
+
"description": "When the entity was last updated"
|
|
1359
|
+
}
|
|
1360
|
+
},
|
|
1361
|
+
"required": [
|
|
1362
|
+
"pi",
|
|
1363
|
+
"type",
|
|
1364
|
+
"label",
|
|
1365
|
+
"created_at",
|
|
1366
|
+
"updated_at"
|
|
1367
|
+
]
|
|
1368
|
+
},
|
|
1369
|
+
"CollectionEntitiesResponse": {
|
|
1370
|
+
"type": "object",
|
|
1371
|
+
"properties": {
|
|
1372
|
+
"collection_id": {
|
|
1373
|
+
"type": "string",
|
|
1374
|
+
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
1375
|
+
"description": "Collection ID"
|
|
1376
|
+
},
|
|
1377
|
+
"entities": {
|
|
1378
|
+
"type": "array",
|
|
1379
|
+
"items": {
|
|
1380
|
+
"$ref": "#/components/schemas/CollectionEntitySummary"
|
|
1381
|
+
},
|
|
1382
|
+
"description": "Entities in this collection"
|
|
1383
|
+
},
|
|
1384
|
+
"pagination": {
|
|
1385
|
+
"type": "object",
|
|
1386
|
+
"properties": {
|
|
1387
|
+
"offset": {
|
|
1388
|
+
"type": "integer",
|
|
1389
|
+
"description": "Current offset"
|
|
1390
|
+
},
|
|
1391
|
+
"limit": {
|
|
1392
|
+
"type": "integer",
|
|
1393
|
+
"description": "Requested limit"
|
|
1394
|
+
},
|
|
1395
|
+
"count": {
|
|
1396
|
+
"type": "integer",
|
|
1397
|
+
"description": "Number of entities returned"
|
|
1398
|
+
}
|
|
1399
|
+
},
|
|
1400
|
+
"required": [
|
|
1401
|
+
"offset",
|
|
1402
|
+
"limit",
|
|
1403
|
+
"count"
|
|
1404
|
+
],
|
|
1405
|
+
"description": "Pagination info"
|
|
1406
|
+
}
|
|
1407
|
+
},
|
|
1408
|
+
"required": [
|
|
1409
|
+
"collection_id",
|
|
1410
|
+
"entities",
|
|
1411
|
+
"pagination"
|
|
1412
|
+
]
|
|
1413
|
+
},
|
|
1332
1414
|
"EntityCreatedResponse": {
|
|
1333
1415
|
"type": "object",
|
|
1334
1416
|
"properties": {
|
|
@@ -4448,17 +4530,17 @@
|
|
|
4448
4530
|
"items": {
|
|
4449
4531
|
"$ref": "#/components/schemas/Event"
|
|
4450
4532
|
},
|
|
4451
|
-
"description": "List of events"
|
|
4533
|
+
"description": "List of events (newest first)"
|
|
4452
4534
|
},
|
|
4453
4535
|
"has_more": {
|
|
4454
4536
|
"type": "boolean",
|
|
4455
|
-
"description": "Whether there are more events available",
|
|
4537
|
+
"description": "Whether there are more (older) events available",
|
|
4456
4538
|
"example": true
|
|
4457
4539
|
},
|
|
4458
4540
|
"cursor": {
|
|
4459
4541
|
"type": "integer",
|
|
4460
|
-
"description": "Cursor for the next page (pass as ?
|
|
4461
|
-
"example":
|
|
4542
|
+
"description": "Cursor for the next page (oldest id in batch, pass as ?cursor= for older events)",
|
|
4543
|
+
"example": 12340
|
|
4462
4544
|
}
|
|
4463
4545
|
},
|
|
4464
4546
|
"required": [
|
|
@@ -5983,6 +6065,108 @@
|
|
|
5983
6065
|
}
|
|
5984
6066
|
}
|
|
5985
6067
|
},
|
|
6068
|
+
"/collections/{id}/entities": {
|
|
6069
|
+
"get": {
|
|
6070
|
+
"tags": [
|
|
6071
|
+
"Collections"
|
|
6072
|
+
],
|
|
6073
|
+
"summary": "List entities in a collection",
|
|
6074
|
+
"description": "Returns entities belonging to this collection from the graph database.\n\nSupports pagination and optional type filtering. Results are ordered by creation date (newest first).",
|
|
6075
|
+
"x-arke-action": "collection:view",
|
|
6076
|
+
"x-arke-auth": "optional",
|
|
6077
|
+
"parameters": [
|
|
6078
|
+
{
|
|
6079
|
+
"schema": {
|
|
6080
|
+
"type": "string",
|
|
6081
|
+
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
6082
|
+
"description": "Entity ID (ULID format)",
|
|
6083
|
+
"example": "01KDETYWYWM0MJVKM8DK3AEXPY"
|
|
6084
|
+
},
|
|
6085
|
+
"required": true,
|
|
6086
|
+
"description": "Entity ID (ULID)",
|
|
6087
|
+
"name": "id",
|
|
6088
|
+
"in": "path"
|
|
6089
|
+
},
|
|
6090
|
+
{
|
|
6091
|
+
"schema": {
|
|
6092
|
+
"type": "string",
|
|
6093
|
+
"description": "Filter entities by type",
|
|
6094
|
+
"example": "document"
|
|
6095
|
+
},
|
|
6096
|
+
"required": false,
|
|
6097
|
+
"name": "type",
|
|
6098
|
+
"in": "query"
|
|
6099
|
+
},
|
|
6100
|
+
{
|
|
6101
|
+
"schema": {
|
|
6102
|
+
"type": "integer",
|
|
6103
|
+
"minimum": 1,
|
|
6104
|
+
"maximum": 10000,
|
|
6105
|
+
"default": 1000,
|
|
6106
|
+
"description": "Maximum number of entities to return",
|
|
6107
|
+
"example": 100
|
|
6108
|
+
},
|
|
6109
|
+
"required": false,
|
|
6110
|
+
"name": "limit",
|
|
6111
|
+
"in": "query"
|
|
6112
|
+
},
|
|
6113
|
+
{
|
|
6114
|
+
"schema": {
|
|
6115
|
+
"type": "integer",
|
|
6116
|
+
"nullable": true,
|
|
6117
|
+
"minimum": 0,
|
|
6118
|
+
"default": 0,
|
|
6119
|
+
"description": "Number of entities to skip",
|
|
6120
|
+
"example": 0
|
|
6121
|
+
},
|
|
6122
|
+
"required": false,
|
|
6123
|
+
"name": "offset",
|
|
6124
|
+
"in": "query"
|
|
6125
|
+
}
|
|
6126
|
+
],
|
|
6127
|
+
"responses": {
|
|
6128
|
+
"200": {
|
|
6129
|
+
"description": "Entities in collection",
|
|
6130
|
+
"content": {
|
|
6131
|
+
"application/json": {
|
|
6132
|
+
"schema": {
|
|
6133
|
+
"$ref": "#/components/schemas/CollectionEntitiesResponse"
|
|
6134
|
+
}
|
|
6135
|
+
}
|
|
6136
|
+
}
|
|
6137
|
+
},
|
|
6138
|
+
"403": {
|
|
6139
|
+
"description": "Forbidden - Insufficient permissions",
|
|
6140
|
+
"content": {
|
|
6141
|
+
"application/json": {
|
|
6142
|
+
"schema": {
|
|
6143
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
6144
|
+
},
|
|
6145
|
+
"example": {
|
|
6146
|
+
"error": "Forbidden: You do not have permission to perform this action"
|
|
6147
|
+
}
|
|
6148
|
+
}
|
|
6149
|
+
}
|
|
6150
|
+
},
|
|
6151
|
+
"404": {
|
|
6152
|
+
"description": "Not Found - Resource does not exist",
|
|
6153
|
+
"content": {
|
|
6154
|
+
"application/json": {
|
|
6155
|
+
"schema": {
|
|
6156
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
6157
|
+
},
|
|
6158
|
+
"example": {
|
|
6159
|
+
"error": "Entity not found"
|
|
6160
|
+
}
|
|
6161
|
+
}
|
|
6162
|
+
}
|
|
6163
|
+
},
|
|
6164
|
+
"503": {
|
|
6165
|
+
"description": "GraphDB service unavailable"
|
|
6166
|
+
}
|
|
6167
|
+
}
|
|
6168
|
+
}
|
|
6169
|
+
},
|
|
5986
6170
|
"/entities": {
|
|
5987
6171
|
"post": {
|
|
5988
6172
|
"tags": [
|
|
@@ -9325,20 +9509,19 @@
|
|
|
9325
9509
|
"Events"
|
|
9326
9510
|
],
|
|
9327
9511
|
"summary": "List entity change events",
|
|
9328
|
-
"description": "Returns a cursor-based list of entity change events for client synchronization.\n\n**Usage:**\n-
|
|
9512
|
+
"description": "Returns a cursor-based list of entity change events for client synchronization.\n\n**Usage:**\n- Call without cursor to get newest events\n- Use returned `cursor` as `?cursor=` to get older events\n- Poll without cursor periodically to check for new events\n\n**Sync flow:**\n1. Initial: `GET /events` → get newest, save highest `id` as high-water mark\n2. Paginate: `GET /events?cursor=X` → get older events until `has_more=false`\n3. Poll: `GET /events` → if newest `id` > high-water mark, process new events\n\n**Event data:**\n- `id`: Auto-increment ID\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.",
|
|
9329
9513
|
"x-arke-action": "events:list",
|
|
9330
9514
|
"x-arke-auth": "none",
|
|
9331
9515
|
"parameters": [
|
|
9332
9516
|
{
|
|
9333
9517
|
"schema": {
|
|
9334
9518
|
"type": "integer",
|
|
9335
|
-
"
|
|
9336
|
-
"minimum": 0,
|
|
9519
|
+
"minimum": 1,
|
|
9337
9520
|
"example": 12345
|
|
9338
9521
|
},
|
|
9339
9522
|
"required": false,
|
|
9340
|
-
"description": "Return events
|
|
9341
|
-
"name": "
|
|
9523
|
+
"description": "Return events older than this id (from previous response cursor)",
|
|
9524
|
+
"name": "cursor",
|
|
9342
9525
|
"in": "query"
|
|
9343
9526
|
},
|
|
9344
9527
|
{
|
package/openapi/version.json
CHANGED