@arke-institute/sdk 2.3.13 → 2.5.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/dist/generated/index.d.cts +837 -30
- package/dist/generated/index.d.ts +837 -30
- package/openapi/spec.json +1173 -91
- 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-25T03:52:16.348Z
|
|
10
10
|
*/
|
|
11
11
|
type paths = {
|
|
12
12
|
"/ops-reference": {
|
|
@@ -708,6 +708,17 @@ type paths = {
|
|
|
708
708
|
* - Results use cosine similarity scores (0-1)
|
|
709
709
|
* - Scores are comparable across collections
|
|
710
710
|
*
|
|
711
|
+
* ## Entity Expansion
|
|
712
|
+
*
|
|
713
|
+
* Use `expand` in the request body to fetch entity data inline with search results:
|
|
714
|
+
*
|
|
715
|
+
* - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
|
|
716
|
+
* - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
|
|
717
|
+
* - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
|
|
718
|
+
*
|
|
719
|
+
* Preview mode is recommended for most use cases. Full expansion can result in large payloads.
|
|
720
|
+
* Gracefully handles deleted or inaccessible entities (returns results without expansion data).
|
|
721
|
+
*
|
|
711
722
|
*
|
|
712
723
|
* ---
|
|
713
724
|
* **Permission:** `search:execute`
|
|
@@ -1848,6 +1859,18 @@ type paths = {
|
|
|
1848
1859
|
*
|
|
1849
1860
|
* Supports pagination and optional type filtering. Results are ordered by creation date (newest first).
|
|
1850
1861
|
*
|
|
1862
|
+
* **Expansion Modes:**
|
|
1863
|
+
*
|
|
1864
|
+
* By default, returns lightweight summaries from GraphDB (pi, type, label, timestamps).
|
|
1865
|
+
*
|
|
1866
|
+
* Use the `expand` parameter to hydrate entity data from storage:
|
|
1867
|
+
*
|
|
1868
|
+
* - **`?expand=preview`**: Adds `preview` field with fresh lightweight data (label, truncated description/text, timestamps). ~5-10KB per entity.
|
|
1869
|
+
*
|
|
1870
|
+
* - **`?expand=full`**: Adds `entity` field with complete manifest (all properties, relationships, version history). ~20-50KB per entity.
|
|
1871
|
+
*
|
|
1872
|
+
* **Performance Note:** Expansion requires fetching each entity from storage. Limited to 100 entities per request. Use smaller `limit` values when expanding.
|
|
1873
|
+
*
|
|
1851
1874
|
* ---
|
|
1852
1875
|
* **Permission:** `collection:view`
|
|
1853
1876
|
* **Auth:** optional
|
|
@@ -1858,6 +1881,7 @@ type paths = {
|
|
|
1858
1881
|
type?: string;
|
|
1859
1882
|
limit?: number;
|
|
1860
1883
|
offset?: number | null;
|
|
1884
|
+
expand?: "preview" | "full";
|
|
1861
1885
|
};
|
|
1862
1886
|
header?: never;
|
|
1863
1887
|
path: {
|
|
@@ -2051,13 +2075,64 @@ type paths = {
|
|
|
2051
2075
|
* Get entity by ID
|
|
2052
2076
|
* @description Returns any entity by ID. Permission check uses parent collection if entity belongs to one.
|
|
2053
2077
|
*
|
|
2078
|
+
* **Relationship Expansion:**
|
|
2079
|
+
*
|
|
2080
|
+
* Use the `expand=relationships[:mode]` query parameter to hydrate relationship peer data:
|
|
2081
|
+
*
|
|
2082
|
+
* - **No expansion (default)**: Returns relationships with stored `peer_label`/`peer_type` (may be stale)
|
|
2083
|
+
* ```json
|
|
2084
|
+
* { "predicate": "contains", "peer": "01KDOC...", "peer_label": "Old Label" }
|
|
2085
|
+
* ```
|
|
2086
|
+
*
|
|
2087
|
+
* - **`?expand=relationships:preview`**: Adds `peer_preview` with fresh lightweight data (id, type, label, truncated description/text, timestamps)
|
|
2088
|
+
* ```json
|
|
2089
|
+
* {
|
|
2090
|
+
* "predicate": "contains",
|
|
2091
|
+
* "peer": "01KDOC...",
|
|
2092
|
+
* "peer_label": "Old Label",
|
|
2093
|
+
* "peer_preview": {
|
|
2094
|
+
* "id": "01KDOC...",
|
|
2095
|
+
* "type": "document",
|
|
2096
|
+
* "label": "Updated Label",
|
|
2097
|
+
* "description_preview": "This is a document with...",
|
|
2098
|
+
* "created_at": "2025-01-15T10:00:00Z",
|
|
2099
|
+
* "updated_at": "2025-01-20T14:30:00Z"
|
|
2100
|
+
* }
|
|
2101
|
+
* }
|
|
2102
|
+
* ```
|
|
2103
|
+
*
|
|
2104
|
+
* - **`?expand=relationships:full`**: Adds `peer_entity` with complete entity manifest (all properties, relationships, version history)
|
|
2105
|
+
* ```json
|
|
2106
|
+
* {
|
|
2107
|
+
* "predicate": "contains",
|
|
2108
|
+
* "peer": "01KDOC...",
|
|
2109
|
+
* "peer_label": "Old Label",
|
|
2110
|
+
* "peer_entity": {
|
|
2111
|
+
* "id": "01KDOC...",
|
|
2112
|
+
* "cid": "bafyrei...",
|
|
2113
|
+
* "type": "document",
|
|
2114
|
+
* "properties": { "label": "Updated Label", "text": "..." },
|
|
2115
|
+
* "relationships": [...],
|
|
2116
|
+
* "ver": 3,
|
|
2117
|
+
* "created_at": "2025-01-15T10:00:00Z",
|
|
2118
|
+
* "ts": 1737380000000,
|
|
2119
|
+
* "edited_by": { "user_id": "01JUSER...", "method": "manual" }
|
|
2120
|
+
* }
|
|
2121
|
+
* }
|
|
2122
|
+
* ```
|
|
2123
|
+
*
|
|
2124
|
+
* **Performance:** Preview expansion is recommended for most use cases. Full expansion with many large entities can result in multi-MB payloads.
|
|
2125
|
+
*
|
|
2054
2126
|
* ---
|
|
2055
2127
|
* **Permission:** `entity:view`
|
|
2056
2128
|
* **Auth:** optional
|
|
2057
2129
|
*/
|
|
2058
2130
|
get: {
|
|
2059
2131
|
parameters: {
|
|
2060
|
-
query?:
|
|
2132
|
+
query?: {
|
|
2133
|
+
/** @description Comma-separated list of fields to expand. Supports: relationships[:preview|full] */
|
|
2134
|
+
expand?: string;
|
|
2135
|
+
};
|
|
2061
2136
|
header?: never;
|
|
2062
2137
|
path: {
|
|
2063
2138
|
/** @description Entity ID (ULID) */
|
|
@@ -2371,6 +2446,88 @@ type paths = {
|
|
|
2371
2446
|
patch?: never;
|
|
2372
2447
|
trace?: never;
|
|
2373
2448
|
};
|
|
2449
|
+
"/entities/{id}/preview": {
|
|
2450
|
+
parameters: {
|
|
2451
|
+
query?: never;
|
|
2452
|
+
header?: never;
|
|
2453
|
+
path?: never;
|
|
2454
|
+
cookie?: never;
|
|
2455
|
+
};
|
|
2456
|
+
/**
|
|
2457
|
+
* Get entity preview
|
|
2458
|
+
* @description Returns lightweight preview data for an entity. Useful for:
|
|
2459
|
+
* - Link previews and hover cards
|
|
2460
|
+
* - Relationship metadata freshness (vs stale peer_label)
|
|
2461
|
+
* - AI context management (smaller payloads)
|
|
2462
|
+
* - Search result enhancement
|
|
2463
|
+
*
|
|
2464
|
+
* Returns: id, type, label, collection_pi, description_preview (200 chars), text_preview (200 chars), timestamps.
|
|
2465
|
+
*
|
|
2466
|
+
* **Performance:** Single KV fetch, ~40-60ms response time, typically <1KB payload.
|
|
2467
|
+
*
|
|
2468
|
+
* ---
|
|
2469
|
+
* **Permission:** `entity:view`
|
|
2470
|
+
* **Auth:** optional
|
|
2471
|
+
*/
|
|
2472
|
+
get: {
|
|
2473
|
+
parameters: {
|
|
2474
|
+
query?: never;
|
|
2475
|
+
header?: never;
|
|
2476
|
+
path: {
|
|
2477
|
+
/** @description Entity ID (ULID) */
|
|
2478
|
+
id: string;
|
|
2479
|
+
};
|
|
2480
|
+
cookie?: never;
|
|
2481
|
+
};
|
|
2482
|
+
requestBody?: never;
|
|
2483
|
+
responses: {
|
|
2484
|
+
/** @description Entity preview data */
|
|
2485
|
+
200: {
|
|
2486
|
+
headers: {
|
|
2487
|
+
[name: string]: unknown;
|
|
2488
|
+
};
|
|
2489
|
+
content: {
|
|
2490
|
+
"application/json": components["schemas"]["EntityPreview"];
|
|
2491
|
+
};
|
|
2492
|
+
};
|
|
2493
|
+
/** @description Forbidden - Insufficient permissions */
|
|
2494
|
+
403: {
|
|
2495
|
+
headers: {
|
|
2496
|
+
[name: string]: unknown;
|
|
2497
|
+
};
|
|
2498
|
+
content: {
|
|
2499
|
+
/**
|
|
2500
|
+
* @example {
|
|
2501
|
+
* "error": "Forbidden: You do not have permission to perform this action"
|
|
2502
|
+
* }
|
|
2503
|
+
*/
|
|
2504
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2505
|
+
};
|
|
2506
|
+
};
|
|
2507
|
+
/** @description Not Found - Resource does not exist */
|
|
2508
|
+
404: {
|
|
2509
|
+
headers: {
|
|
2510
|
+
[name: string]: unknown;
|
|
2511
|
+
};
|
|
2512
|
+
content: {
|
|
2513
|
+
/**
|
|
2514
|
+
* @example {
|
|
2515
|
+
* "error": "Entity not found"
|
|
2516
|
+
* }
|
|
2517
|
+
*/
|
|
2518
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2519
|
+
};
|
|
2520
|
+
};
|
|
2521
|
+
};
|
|
2522
|
+
};
|
|
2523
|
+
put?: never;
|
|
2524
|
+
post?: never;
|
|
2525
|
+
delete?: never;
|
|
2526
|
+
options?: never;
|
|
2527
|
+
head?: never;
|
|
2528
|
+
patch?: never;
|
|
2529
|
+
trace?: never;
|
|
2530
|
+
};
|
|
2374
2531
|
"/entities/{id}/tip": {
|
|
2375
2532
|
parameters: {
|
|
2376
2533
|
query?: never;
|
|
@@ -2431,6 +2588,172 @@ type paths = {
|
|
|
2431
2588
|
patch?: never;
|
|
2432
2589
|
trace?: never;
|
|
2433
2590
|
};
|
|
2591
|
+
"/entities/{id}/cascade": {
|
|
2592
|
+
parameters: {
|
|
2593
|
+
query?: never;
|
|
2594
|
+
header?: never;
|
|
2595
|
+
path?: never;
|
|
2596
|
+
cookie?: never;
|
|
2597
|
+
};
|
|
2598
|
+
get?: never;
|
|
2599
|
+
put?: never;
|
|
2600
|
+
post?: never;
|
|
2601
|
+
/**
|
|
2602
|
+
* Cascade delete entity and related entities
|
|
2603
|
+
* @description Deletes an entity and all related entities matching predicate patterns within a scoped collection.
|
|
2604
|
+
*
|
|
2605
|
+
* **Permission Model:**
|
|
2606
|
+
* - Requires `entity:delete` permission on the specified `collection_id`
|
|
2607
|
+
* - Single permission check at the start (not per-entity)
|
|
2608
|
+
* - Individual entity type permissions are NOT checked during cascade
|
|
2609
|
+
*
|
|
2610
|
+
* **Cascade Rules:**
|
|
2611
|
+
* - `collection` predicate NEVER cascades (hard rule - protects collection structure)
|
|
2612
|
+
* - Only entities in the specified collection are deleted
|
|
2613
|
+
* - Entities outside the collection are skipped (reported in `skipped` array)
|
|
2614
|
+
*
|
|
2615
|
+
* **Predicate Patterns:**
|
|
2616
|
+
* - `"child"` - exact match only
|
|
2617
|
+
* - `"has_*"` - matches has_document, has_image, etc.
|
|
2618
|
+
* - `"*_copy"` - matches file_copy, document_copy, etc.
|
|
2619
|
+
* - `"*"` - matches ALL predicates (except collection)
|
|
2620
|
+
*
|
|
2621
|
+
* **Traversal:**
|
|
2622
|
+
* - BFS traversal with parallel processing per depth layer
|
|
2623
|
+
* - Max depth: 20 (default: 10)
|
|
2624
|
+
* - Optional `edited_by_filter` to only delete entities created by a specific actor (useful for agent cleanup)
|
|
2625
|
+
*
|
|
2626
|
+
* **CAS Handling:**
|
|
2627
|
+
* - Root entity uses the provided `expect_tip`
|
|
2628
|
+
* - Child entities use re-fetch + single retry strategy
|
|
2629
|
+
* - CAS conflicts are reported as skipped (not failures)
|
|
2630
|
+
*
|
|
2631
|
+
* **Response:**
|
|
2632
|
+
* - Lists all deleted entities with their depth from root
|
|
2633
|
+
* - Lists skipped entities with reasons
|
|
2634
|
+
* - Provides summary statistics
|
|
2635
|
+
*
|
|
2636
|
+
* ---
|
|
2637
|
+
* **Permission:** `entity:delete`
|
|
2638
|
+
* **Auth:** required
|
|
2639
|
+
*/
|
|
2640
|
+
delete: {
|
|
2641
|
+
parameters: {
|
|
2642
|
+
query?: never;
|
|
2643
|
+
header?: never;
|
|
2644
|
+
path: {
|
|
2645
|
+
/** @description Entity ID (ULID) */
|
|
2646
|
+
id: string;
|
|
2647
|
+
};
|
|
2648
|
+
cookie?: never;
|
|
2649
|
+
};
|
|
2650
|
+
requestBody?: {
|
|
2651
|
+
content: {
|
|
2652
|
+
"application/json": components["schemas"]["CascadeDeleteRequest"];
|
|
2653
|
+
};
|
|
2654
|
+
};
|
|
2655
|
+
responses: {
|
|
2656
|
+
/** @description Cascade delete completed */
|
|
2657
|
+
200: {
|
|
2658
|
+
headers: {
|
|
2659
|
+
[name: string]: unknown;
|
|
2660
|
+
};
|
|
2661
|
+
content: {
|
|
2662
|
+
"application/json": components["schemas"]["CascadeDeleteResponse"];
|
|
2663
|
+
};
|
|
2664
|
+
};
|
|
2665
|
+
/** @description Bad Request - Invalid input */
|
|
2666
|
+
400: {
|
|
2667
|
+
headers: {
|
|
2668
|
+
[name: string]: unknown;
|
|
2669
|
+
};
|
|
2670
|
+
content: {
|
|
2671
|
+
/**
|
|
2672
|
+
* @example {
|
|
2673
|
+
* "error": "Validation failed",
|
|
2674
|
+
* "details": {
|
|
2675
|
+
* "issues": [
|
|
2676
|
+
* {
|
|
2677
|
+
* "path": [
|
|
2678
|
+
* "properties",
|
|
2679
|
+
* "label"
|
|
2680
|
+
* ],
|
|
2681
|
+
* "message": "Required"
|
|
2682
|
+
* }
|
|
2683
|
+
* ]
|
|
2684
|
+
* }
|
|
2685
|
+
* }
|
|
2686
|
+
*/
|
|
2687
|
+
"application/json": components["schemas"]["ValidationErrorResponse"];
|
|
2688
|
+
};
|
|
2689
|
+
};
|
|
2690
|
+
/** @description Unauthorized - Missing or invalid authentication */
|
|
2691
|
+
401: {
|
|
2692
|
+
headers: {
|
|
2693
|
+
[name: string]: unknown;
|
|
2694
|
+
};
|
|
2695
|
+
content: {
|
|
2696
|
+
/**
|
|
2697
|
+
* @example {
|
|
2698
|
+
* "error": "Unauthorized: Missing or invalid authentication token"
|
|
2699
|
+
* }
|
|
2700
|
+
*/
|
|
2701
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2702
|
+
};
|
|
2703
|
+
};
|
|
2704
|
+
/** @description Forbidden - Insufficient permissions */
|
|
2705
|
+
403: {
|
|
2706
|
+
headers: {
|
|
2707
|
+
[name: string]: unknown;
|
|
2708
|
+
};
|
|
2709
|
+
content: {
|
|
2710
|
+
/**
|
|
2711
|
+
* @example {
|
|
2712
|
+
* "error": "Forbidden: You do not have permission to perform this action"
|
|
2713
|
+
* }
|
|
2714
|
+
*/
|
|
2715
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2716
|
+
};
|
|
2717
|
+
};
|
|
2718
|
+
/** @description Not Found - Resource does not exist */
|
|
2719
|
+
404: {
|
|
2720
|
+
headers: {
|
|
2721
|
+
[name: string]: unknown;
|
|
2722
|
+
};
|
|
2723
|
+
content: {
|
|
2724
|
+
/**
|
|
2725
|
+
* @example {
|
|
2726
|
+
* "error": "Entity not found"
|
|
2727
|
+
* }
|
|
2728
|
+
*/
|
|
2729
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2730
|
+
};
|
|
2731
|
+
};
|
|
2732
|
+
/** @description Conflict - CAS validation failed (entity was modified) */
|
|
2733
|
+
409: {
|
|
2734
|
+
headers: {
|
|
2735
|
+
[name: string]: unknown;
|
|
2736
|
+
};
|
|
2737
|
+
content: {
|
|
2738
|
+
/**
|
|
2739
|
+
* @example {
|
|
2740
|
+
* "error": "Conflict: entity was modified",
|
|
2741
|
+
* "details": {
|
|
2742
|
+
* "expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
|
|
2743
|
+
* "actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
|
|
2744
|
+
* }
|
|
2745
|
+
* }
|
|
2746
|
+
*/
|
|
2747
|
+
"application/json": components["schemas"]["CASErrorResponse"];
|
|
2748
|
+
};
|
|
2749
|
+
};
|
|
2750
|
+
};
|
|
2751
|
+
};
|
|
2752
|
+
options?: never;
|
|
2753
|
+
head?: never;
|
|
2754
|
+
patch?: never;
|
|
2755
|
+
trace?: never;
|
|
2756
|
+
};
|
|
2434
2757
|
"/entities/{id}/restore": {
|
|
2435
2758
|
parameters: {
|
|
2436
2759
|
query?: never;
|
|
@@ -6452,13 +6775,28 @@ type paths = {
|
|
|
6452
6775
|
*
|
|
6453
6776
|
* Use this when you know both endpoints and want to discover how they connect - for example, finding the chain of relationships between a person and a document.
|
|
6454
6777
|
*
|
|
6778
|
+
* **Entity Expansion (default: preview):**
|
|
6779
|
+
* - Omit `expand` or use `?expand=preview` - Lightweight previews for all path entities
|
|
6780
|
+
* - `?expand=full` - Complete entity manifests (use with caution)
|
|
6781
|
+
* - `?expand=none` - Disable expansion (graph metadata only)
|
|
6782
|
+
*
|
|
6783
|
+
* **Performance Warning:** 100 paths can reference 400-800 unique entities, adding 5-10s latency with expansion.
|
|
6784
|
+
*
|
|
6785
|
+
* **Recommendations:**
|
|
6786
|
+
* - Use `limit: 10-20` when using expansion
|
|
6787
|
+
* - Prefer preview over full
|
|
6788
|
+
* - Use `expand=none` for large result sets, then fetch specific entities separately
|
|
6789
|
+
*
|
|
6455
6790
|
* ---
|
|
6456
6791
|
* **Permission:** `graph:query`
|
|
6457
6792
|
* **Auth:** required
|
|
6458
6793
|
*/
|
|
6459
6794
|
post: {
|
|
6460
6795
|
parameters: {
|
|
6461
|
-
query?:
|
|
6796
|
+
query?: {
|
|
6797
|
+
/** @description Entity expansion mode. Omit for preview (default), "full" for complete manifests, "none" to disable */
|
|
6798
|
+
expand?: "preview" | "full" | "none";
|
|
6799
|
+
};
|
|
6462
6800
|
header?: never;
|
|
6463
6801
|
path?: never;
|
|
6464
6802
|
cookie?: never;
|
|
@@ -6526,13 +6864,23 @@ type paths = {
|
|
|
6526
6864
|
*
|
|
6527
6865
|
* **When to use this vs POST /query:** This endpoint returns exhaustive, unranked results - all reachable entities up to the limit. Use `POST /query` when you want relevance-ranked results combining semantic similarity with graph structure. Use this endpoint when you need comprehensive graph exploration from known entity IDs.
|
|
6528
6866
|
*
|
|
6867
|
+
* **Target Expansion (default: preview):**
|
|
6868
|
+
* - Omit `expand` or use `?expand=preview` - Lightweight target previews
|
|
6869
|
+
* - `?expand=full` - Complete target manifests
|
|
6870
|
+
* - `?expand=none` - Disable expansion (graph metadata only)
|
|
6871
|
+
*
|
|
6872
|
+
* **Performance:** With 100 targets, expansion adds ~1s.
|
|
6873
|
+
*
|
|
6529
6874
|
* ---
|
|
6530
6875
|
* **Permission:** `graph:query`
|
|
6531
6876
|
* **Auth:** required
|
|
6532
6877
|
*/
|
|
6533
6878
|
post: {
|
|
6534
6879
|
parameters: {
|
|
6535
|
-
query?:
|
|
6880
|
+
query?: {
|
|
6881
|
+
/** @description Entity expansion mode. Omit for preview (default), "full" for complete manifests, "none" to disable */
|
|
6882
|
+
expand?: "preview" | "full" | "none";
|
|
6883
|
+
};
|
|
6536
6884
|
header?: never;
|
|
6537
6885
|
path?: never;
|
|
6538
6886
|
cookie?: never;
|
|
@@ -6596,13 +6944,23 @@ type paths = {
|
|
|
6596
6944
|
* Get entity from graph
|
|
6597
6945
|
* @description Get entity details with all relationships from the graph database. Unlike the entity manifest, this includes both outgoing and incoming relationships - showing not just what this entity links to, but also what links to it.
|
|
6598
6946
|
*
|
|
6947
|
+
* **Peer Expansion (default: preview):**
|
|
6948
|
+
* - Omit `expand` or use `?expand=preview` - Lightweight peer previews
|
|
6949
|
+
* - `?expand=full` - Complete peer manifests
|
|
6950
|
+
* - `?expand=none` - Disable expansion (graph metadata only)
|
|
6951
|
+
*
|
|
6952
|
+
* **Performance:** With 50 peers, expansion adds ~500ms.
|
|
6953
|
+
*
|
|
6599
6954
|
* ---
|
|
6600
6955
|
* **Permission:** `graph:query`
|
|
6601
6956
|
* **Auth:** required
|
|
6602
6957
|
*/
|
|
6603
6958
|
get: {
|
|
6604
6959
|
parameters: {
|
|
6605
|
-
query?:
|
|
6960
|
+
query?: {
|
|
6961
|
+
/** @description Entity expansion mode. Omit for preview (default), "full" for complete manifests, "none" to disable */
|
|
6962
|
+
expand?: "preview" | "full" | "none";
|
|
6963
|
+
};
|
|
6606
6964
|
header?: never;
|
|
6607
6965
|
path: {
|
|
6608
6966
|
/** @description Entity ID (ULID) */
|
|
@@ -6716,6 +7074,23 @@ type paths = {
|
|
|
6716
7074
|
* @01KE4ZY... -[*]{,2}-> type:person # From exact entity
|
|
6717
7075
|
* ```
|
|
6718
7076
|
*
|
|
7077
|
+
* ## Entity Expansion
|
|
7078
|
+
*
|
|
7079
|
+
* Control how much entity data is included in results via the `expand` parameter.
|
|
7080
|
+
*
|
|
7081
|
+
* | Value | Description | Use Case |
|
|
7082
|
+
* |-------|-------------|----------|
|
|
7083
|
+
* | (omitted) | **Preview** (default) - lightweight preview data | Best balance of detail and payload size |
|
|
7084
|
+
* | `preview` | Same as omitted - lightweight preview data | Explicit preview mode |
|
|
7085
|
+
* | `full` | Complete entity manifest | When you need all properties, relationships, versions |
|
|
7086
|
+
* | `none` | No expansion - Pinecone metadata only | Fastest response, smallest payload |
|
|
7087
|
+
*
|
|
7088
|
+
* **Preview mode** includes: label, truncated description/text (200 chars), created_at, updated_at.
|
|
7089
|
+
*
|
|
7090
|
+
* **Full mode** includes: all properties, relationships, version info, CID.
|
|
7091
|
+
*
|
|
7092
|
+
* Both result entities and path step entities are expanded.
|
|
7093
|
+
*
|
|
6719
7094
|
*
|
|
6720
7095
|
* ---
|
|
6721
7096
|
* **Permission:** `query:execute`
|
|
@@ -6791,6 +7166,17 @@ type paths = {
|
|
|
6791
7166
|
*
|
|
6792
7167
|
* Uses the collection's weighted centroid vector (combination of description and entity embeddings) to find related collections.
|
|
6793
7168
|
*
|
|
7169
|
+
* **Entity Expansion:**
|
|
7170
|
+
*
|
|
7171
|
+
* Use `expand` in the request body to fetch entity data inline with search results:
|
|
7172
|
+
*
|
|
7173
|
+
* - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
|
|
7174
|
+
* - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
|
|
7175
|
+
* - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
|
|
7176
|
+
*
|
|
7177
|
+
* Preview mode is recommended for most use cases. Full expansion can result in large payloads.
|
|
7178
|
+
* Gracefully handles deleted or inaccessible entities (returns results without expansion data).
|
|
7179
|
+
*
|
|
6794
7180
|
* ---
|
|
6795
7181
|
* **Permission:** `search:similar`
|
|
6796
7182
|
* **Auth:** required
|
|
@@ -6817,6 +7203,12 @@ type paths = {
|
|
|
6817
7203
|
* @default false
|
|
6818
7204
|
*/
|
|
6819
7205
|
refresh?: boolean;
|
|
7206
|
+
/**
|
|
7207
|
+
* @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
|
|
7208
|
+
* @example preview
|
|
7209
|
+
* @enum {string}
|
|
7210
|
+
*/
|
|
7211
|
+
expand?: "preview" | "full" | "none";
|
|
6820
7212
|
};
|
|
6821
7213
|
};
|
|
6822
7214
|
};
|
|
@@ -6834,6 +7226,8 @@ type paths = {
|
|
|
6834
7226
|
score: number;
|
|
6835
7227
|
created_at?: string;
|
|
6836
7228
|
updated_at?: string;
|
|
7229
|
+
entity_preview?: components["schemas"]["EntityPreview"] & unknown;
|
|
7230
|
+
entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
6837
7231
|
}[];
|
|
6838
7232
|
metadata: {
|
|
6839
7233
|
source_pi: string;
|
|
@@ -6926,6 +7320,17 @@ type paths = {
|
|
|
6926
7320
|
* 2. Then searches within each collection for similar items
|
|
6927
7321
|
* 3. Aggregates and ranks results with diversity weighting
|
|
6928
7322
|
*
|
|
7323
|
+
* **Entity Expansion:**
|
|
7324
|
+
*
|
|
7325
|
+
* Use `expand` in the request body to fetch entity data inline with search results:
|
|
7326
|
+
*
|
|
7327
|
+
* - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
|
|
7328
|
+
* - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
|
|
7329
|
+
* - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
|
|
7330
|
+
*
|
|
7331
|
+
* Preview mode is recommended for most use cases. Full expansion can result in large payloads.
|
|
7332
|
+
* Gracefully handles deleted or inaccessible entities (returns results without expansion data).
|
|
7333
|
+
*
|
|
6929
7334
|
* ---
|
|
6930
7335
|
* **Permission:** `search:similar`
|
|
6931
7336
|
* **Auth:** required
|
|
@@ -6969,6 +7374,12 @@ type paths = {
|
|
|
6969
7374
|
* @default false
|
|
6970
7375
|
*/
|
|
6971
7376
|
refresh?: boolean;
|
|
7377
|
+
/**
|
|
7378
|
+
* @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
|
|
7379
|
+
* @example preview
|
|
7380
|
+
* @enum {string}
|
|
7381
|
+
*/
|
|
7382
|
+
expand?: "preview" | "full" | "none";
|
|
6972
7383
|
};
|
|
6973
7384
|
};
|
|
6974
7385
|
};
|
|
@@ -6988,6 +7399,8 @@ type paths = {
|
|
|
6988
7399
|
score: number;
|
|
6989
7400
|
created_at?: string;
|
|
6990
7401
|
updated_at?: string;
|
|
7402
|
+
entity_preview?: components["schemas"]["EntityPreview"] & unknown;
|
|
7403
|
+
entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
6991
7404
|
}[];
|
|
6992
7405
|
metadata: {
|
|
6993
7406
|
source_pi: string;
|
|
@@ -7078,6 +7491,17 @@ type paths = {
|
|
|
7078
7491
|
*
|
|
7079
7492
|
* Use this endpoint to discover collections about a topic. Results are ranked by semantic similarity to your query.
|
|
7080
7493
|
*
|
|
7494
|
+
* **Entity Expansion:**
|
|
7495
|
+
*
|
|
7496
|
+
* Use `expand` in the request body to fetch entity data inline with search results:
|
|
7497
|
+
*
|
|
7498
|
+
* - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
|
|
7499
|
+
* - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
|
|
7500
|
+
* - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
|
|
7501
|
+
*
|
|
7502
|
+
* Preview mode is recommended for most use cases. Full expansion can result in large payloads.
|
|
7503
|
+
* Gracefully handles deleted or inaccessible entities (returns results without expansion data).
|
|
7504
|
+
*
|
|
7081
7505
|
* ---
|
|
7082
7506
|
* **Permission:** `search:query`
|
|
7083
7507
|
* **Auth:** required
|
|
@@ -7101,6 +7525,12 @@ type paths = {
|
|
|
7101
7525
|
limit?: number;
|
|
7102
7526
|
/** @description Filter by collection types */
|
|
7103
7527
|
types?: string[];
|
|
7528
|
+
/**
|
|
7529
|
+
* @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
|
|
7530
|
+
* @example preview
|
|
7531
|
+
* @enum {string}
|
|
7532
|
+
*/
|
|
7533
|
+
expand?: "preview" | "full" | "none";
|
|
7104
7534
|
};
|
|
7105
7535
|
};
|
|
7106
7536
|
};
|
|
@@ -7119,6 +7549,8 @@ type paths = {
|
|
|
7119
7549
|
score: number;
|
|
7120
7550
|
created_at?: string;
|
|
7121
7551
|
updated_at?: string;
|
|
7552
|
+
entity_preview?: components["schemas"]["EntityPreview"] & unknown;
|
|
7553
|
+
entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
7122
7554
|
}[];
|
|
7123
7555
|
metadata: {
|
|
7124
7556
|
query: string;
|
|
@@ -7192,6 +7624,17 @@ type paths = {
|
|
|
7192
7624
|
*
|
|
7193
7625
|
* Use this endpoint to discover agents across the network. Only active agents are returned. Results are ranked by semantic similarity to your query based on agent descriptions and capabilities.
|
|
7194
7626
|
*
|
|
7627
|
+
* **Entity Expansion:**
|
|
7628
|
+
*
|
|
7629
|
+
* Use `expand` in the request body to fetch entity data inline with search results:
|
|
7630
|
+
*
|
|
7631
|
+
* - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
|
|
7632
|
+
* - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
|
|
7633
|
+
* - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
|
|
7634
|
+
*
|
|
7635
|
+
* Preview mode is recommended for most use cases. Full expansion can result in large payloads.
|
|
7636
|
+
* Gracefully handles deleted or inaccessible entities (returns results without expansion data).
|
|
7637
|
+
*
|
|
7195
7638
|
* ---
|
|
7196
7639
|
* **Permission:** `search:query`
|
|
7197
7640
|
* **Auth:** required
|
|
@@ -7213,6 +7656,12 @@ type paths = {
|
|
|
7213
7656
|
* @default 10
|
|
7214
7657
|
*/
|
|
7215
7658
|
limit?: number;
|
|
7659
|
+
/**
|
|
7660
|
+
* @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
|
|
7661
|
+
* @example preview
|
|
7662
|
+
* @enum {string}
|
|
7663
|
+
*/
|
|
7664
|
+
expand?: "preview" | "full" | "none";
|
|
7216
7665
|
};
|
|
7217
7666
|
};
|
|
7218
7667
|
};
|
|
@@ -7232,6 +7681,8 @@ type paths = {
|
|
|
7232
7681
|
status?: string;
|
|
7233
7682
|
created_at?: string;
|
|
7234
7683
|
updated_at?: string;
|
|
7684
|
+
entity_preview?: components["schemas"]["EntityPreview"] & unknown;
|
|
7685
|
+
entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
7235
7686
|
}[];
|
|
7236
7687
|
metadata: {
|
|
7237
7688
|
query: string;
|
|
@@ -7307,6 +7758,17 @@ type paths = {
|
|
|
7307
7758
|
*
|
|
7308
7759
|
* Use `per_collection_limit` to ensure result diversity when searching multiple collections.
|
|
7309
7760
|
*
|
|
7761
|
+
* **Entity Expansion:**
|
|
7762
|
+
*
|
|
7763
|
+
* Use `expand` in the request body to fetch entity data inline with search results:
|
|
7764
|
+
*
|
|
7765
|
+
* - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
|
|
7766
|
+
* - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
|
|
7767
|
+
* - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
|
|
7768
|
+
*
|
|
7769
|
+
* Preview mode is recommended for most use cases. Full expansion can result in large payloads.
|
|
7770
|
+
* Gracefully handles deleted or inaccessible entities (returns results without expansion data).
|
|
7771
|
+
*
|
|
7310
7772
|
* ---
|
|
7311
7773
|
* **Permission:** `search:query`
|
|
7312
7774
|
* **Auth:** required
|
|
@@ -7336,6 +7798,12 @@ type paths = {
|
|
|
7336
7798
|
types?: string[];
|
|
7337
7799
|
/** @description Max results per collection for diversity */
|
|
7338
7800
|
per_collection_limit?: number;
|
|
7801
|
+
/**
|
|
7802
|
+
* @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
|
|
7803
|
+
* @example preview
|
|
7804
|
+
* @enum {string}
|
|
7805
|
+
*/
|
|
7806
|
+
expand?: "preview" | "full" | "none";
|
|
7339
7807
|
};
|
|
7340
7808
|
};
|
|
7341
7809
|
};
|
|
@@ -7355,6 +7823,8 @@ type paths = {
|
|
|
7355
7823
|
collection_pi: string;
|
|
7356
7824
|
created_at?: string;
|
|
7357
7825
|
updated_at?: string;
|
|
7826
|
+
entity_preview?: components["schemas"]["EntityPreview"] & unknown;
|
|
7827
|
+
entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
7358
7828
|
}[];
|
|
7359
7829
|
metadata: {
|
|
7360
7830
|
collection_pis: string[];
|
|
@@ -7435,6 +7905,17 @@ type paths = {
|
|
|
7435
7905
|
*
|
|
7436
7906
|
* Great for exploration and AI agents navigating the network.
|
|
7437
7907
|
*
|
|
7908
|
+
* **Entity Expansion:**
|
|
7909
|
+
*
|
|
7910
|
+
* Use `expand` in the request body to fetch entity data inline with search results:
|
|
7911
|
+
*
|
|
7912
|
+
* - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
|
|
7913
|
+
* - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
|
|
7914
|
+
* - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
|
|
7915
|
+
*
|
|
7916
|
+
* Preview mode is recommended for most use cases. Full expansion can result in large payloads.
|
|
7917
|
+
* Gracefully handles deleted or inaccessible entities (returns results without expansion data).
|
|
7918
|
+
*
|
|
7438
7919
|
* ---
|
|
7439
7920
|
* **Permission:** `search:query`
|
|
7440
7921
|
* **Auth:** required
|
|
@@ -7468,6 +7949,12 @@ type paths = {
|
|
|
7468
7949
|
* @default 5
|
|
7469
7950
|
*/
|
|
7470
7951
|
per_collection_limit?: number;
|
|
7952
|
+
/**
|
|
7953
|
+
* @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
|
|
7954
|
+
* @example preview
|
|
7955
|
+
* @enum {string}
|
|
7956
|
+
*/
|
|
7957
|
+
expand?: "preview" | "full" | "none";
|
|
7471
7958
|
};
|
|
7472
7959
|
};
|
|
7473
7960
|
};
|
|
@@ -7487,6 +7974,8 @@ type paths = {
|
|
|
7487
7974
|
collection_pi: string;
|
|
7488
7975
|
created_at?: string;
|
|
7489
7976
|
updated_at?: string;
|
|
7977
|
+
entity_preview?: components["schemas"]["EntityPreview"] & unknown;
|
|
7978
|
+
entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
7490
7979
|
}[];
|
|
7491
7980
|
metadata: {
|
|
7492
7981
|
query: string;
|
|
@@ -8370,6 +8859,60 @@ type components = {
|
|
|
8370
8859
|
has_more: boolean;
|
|
8371
8860
|
};
|
|
8372
8861
|
};
|
|
8862
|
+
/**
|
|
8863
|
+
* @description Lightweight entity preview with fresh data. Included by default (expand: "preview").
|
|
8864
|
+
* @example {
|
|
8865
|
+
* "id": "01KDETYWYWM0MJVKM8DK3AEXPY",
|
|
8866
|
+
* "type": "file",
|
|
8867
|
+
* "label": "Research Paper.pdf",
|
|
8868
|
+
* "collection_pi": "01JCOLLECTION123456789AB",
|
|
8869
|
+
* "description_preview": "A comprehensive study on distributed systems architecture...",
|
|
8870
|
+
* "created_at": "2026-01-12T00:00:00.000Z",
|
|
8871
|
+
* "updated_at": "2026-01-12T10:30:00.000Z"
|
|
8872
|
+
* }
|
|
8873
|
+
*/
|
|
8874
|
+
EntityPreview: {
|
|
8875
|
+
/**
|
|
8876
|
+
* @description Entity ID (persistent identifier)
|
|
8877
|
+
* @example 01KDETYWYWM0MJVKM8DK3AEXPY
|
|
8878
|
+
*/
|
|
8879
|
+
id: string;
|
|
8880
|
+
/**
|
|
8881
|
+
* @description Entity type
|
|
8882
|
+
* @example document
|
|
8883
|
+
*/
|
|
8884
|
+
type: string;
|
|
8885
|
+
/**
|
|
8886
|
+
* @description Entity label (from properties.label, filename, or name)
|
|
8887
|
+
* @example Research Paper.pdf
|
|
8888
|
+
*/
|
|
8889
|
+
label: string;
|
|
8890
|
+
/**
|
|
8891
|
+
* @description Collection ID this entity belongs to
|
|
8892
|
+
* @example 01JCOLLECTION123456789ABCD
|
|
8893
|
+
*/
|
|
8894
|
+
collection_pi?: string;
|
|
8895
|
+
/**
|
|
8896
|
+
* @description Truncated description (max 200 chars + "...")
|
|
8897
|
+
* @example This document contains research findings from the 2025 study on entity management systems. It covers key architectural decisions and performance benchmarks...
|
|
8898
|
+
*/
|
|
8899
|
+
description_preview?: string;
|
|
8900
|
+
/**
|
|
8901
|
+
* @description Truncated text content (max 200 chars + "...")
|
|
8902
|
+
* @example Introduction: The rise of decentralized entity management systems has created new challenges for data integrity and consistency. This paper explores...
|
|
8903
|
+
*/
|
|
8904
|
+
text_preview?: string;
|
|
8905
|
+
/**
|
|
8906
|
+
* @description Entity creation timestamp (ISO 8601)
|
|
8907
|
+
* @example 2025-01-15T10:00:00.000Z
|
|
8908
|
+
*/
|
|
8909
|
+
created_at: string;
|
|
8910
|
+
/**
|
|
8911
|
+
* @description Last update timestamp (ISO 8601)
|
|
8912
|
+
* @example 2025-01-20T14:30:00.000Z
|
|
8913
|
+
*/
|
|
8914
|
+
updated_at: string;
|
|
8915
|
+
};
|
|
8373
8916
|
SearchResultItem: {
|
|
8374
8917
|
/**
|
|
8375
8918
|
* @description Entity persistent identifier
|
|
@@ -8406,6 +8949,8 @@ type components = {
|
|
|
8406
8949
|
* @example 2026-01-12T10:30:00.000Z
|
|
8407
8950
|
*/
|
|
8408
8951
|
updated_at?: string;
|
|
8952
|
+
entity_preview?: components["schemas"]["EntityPreview"];
|
|
8953
|
+
entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
8409
8954
|
};
|
|
8410
8955
|
/** @description Search metadata and statistics */
|
|
8411
8956
|
SearchMetadata: {
|
|
@@ -8456,6 +9001,12 @@ type components = {
|
|
|
8456
9001
|
* @example 50
|
|
8457
9002
|
*/
|
|
8458
9003
|
limit: number;
|
|
9004
|
+
/**
|
|
9005
|
+
* @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
|
|
9006
|
+
* @example preview
|
|
9007
|
+
* @enum {string}
|
|
9008
|
+
*/
|
|
9009
|
+
expand?: "preview" | "full" | "none";
|
|
8459
9010
|
};
|
|
8460
9011
|
CollectionResponse: components["schemas"]["EntityResponse"] & {
|
|
8461
9012
|
/** @enum {string} */
|
|
@@ -8829,7 +9380,7 @@ type components = {
|
|
|
8829
9380
|
*/
|
|
8830
9381
|
type: string;
|
|
8831
9382
|
/**
|
|
8832
|
-
* @description Entity display label
|
|
9383
|
+
* @description Entity display label (from GraphDB, may be stale)
|
|
8833
9384
|
* @example My Document
|
|
8834
9385
|
*/
|
|
8835
9386
|
label: string;
|
|
@@ -8840,9 +9391,11 @@ type components = {
|
|
|
8840
9391
|
created_at: string;
|
|
8841
9392
|
/**
|
|
8842
9393
|
* Format: date-time
|
|
8843
|
-
* @description When the entity was last updated
|
|
9394
|
+
* @description When the entity was last updated (from GraphDB)
|
|
8844
9395
|
*/
|
|
8845
9396
|
updated_at: string;
|
|
9397
|
+
preview?: components["schemas"]["EntityPreview"] & unknown;
|
|
9398
|
+
entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
8846
9399
|
};
|
|
8847
9400
|
CollectionEntitiesResponse: {
|
|
8848
9401
|
/** @description Collection ID */
|
|
@@ -9101,6 +9654,110 @@ type components = {
|
|
|
9101
9654
|
*/
|
|
9102
9655
|
reason?: string;
|
|
9103
9656
|
};
|
|
9657
|
+
CascadeDeletedEntity: {
|
|
9658
|
+
/**
|
|
9659
|
+
* @description Entity ID (ULID format)
|
|
9660
|
+
* @example 01KDETYWYWM0MJVKM8DK3AEXPY
|
|
9661
|
+
*/
|
|
9662
|
+
id: string;
|
|
9663
|
+
/**
|
|
9664
|
+
* @description Content Identifier (CID) - content-addressed hash
|
|
9665
|
+
* @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
|
|
9666
|
+
*/
|
|
9667
|
+
cid: string;
|
|
9668
|
+
/**
|
|
9669
|
+
* @description Entity type
|
|
9670
|
+
* @example file
|
|
9671
|
+
*/
|
|
9672
|
+
type: string;
|
|
9673
|
+
/**
|
|
9674
|
+
* @description Depth from root entity at which this entity was found
|
|
9675
|
+
* @example 1
|
|
9676
|
+
*/
|
|
9677
|
+
depth: number;
|
|
9678
|
+
};
|
|
9679
|
+
CascadeSkippedEntity: {
|
|
9680
|
+
/**
|
|
9681
|
+
* @description Entity ID (ULID format)
|
|
9682
|
+
* @example 01KDETYWYWM0MJVKM8DK3AEXPY
|
|
9683
|
+
*/
|
|
9684
|
+
id: string;
|
|
9685
|
+
/**
|
|
9686
|
+
* @description Entity type
|
|
9687
|
+
* @example file
|
|
9688
|
+
*/
|
|
9689
|
+
type: string;
|
|
9690
|
+
/**
|
|
9691
|
+
* @description Reason an entity was skipped during cascade delete
|
|
9692
|
+
* @enum {string}
|
|
9693
|
+
*/
|
|
9694
|
+
reason: "not_in_collection" | "already_deleted" | "edited_by_mismatch" | "cas_conflict";
|
|
9695
|
+
};
|
|
9696
|
+
CascadeDeleteResponse: {
|
|
9697
|
+
root: components["schemas"]["EntityDeletedResponse"] & unknown;
|
|
9698
|
+
/** @description Entities successfully deleted (ordered by depth, deepest first) */
|
|
9699
|
+
deleted: components["schemas"]["CascadeDeletedEntity"][];
|
|
9700
|
+
/** @description Entities skipped during traversal with reasons */
|
|
9701
|
+
skipped: components["schemas"]["CascadeSkippedEntity"][];
|
|
9702
|
+
/** @description Summary statistics for the cascade delete operation */
|
|
9703
|
+
summary: {
|
|
9704
|
+
/** @description Total entities visited during BFS traversal */
|
|
9705
|
+
total_traversed: number;
|
|
9706
|
+
/** @description Total entities successfully deleted (excluding root) */
|
|
9707
|
+
total_deleted: number;
|
|
9708
|
+
/** @description Total entities skipped during traversal */
|
|
9709
|
+
total_skipped: number;
|
|
9710
|
+
/** @description Maximum depth reached during traversal */
|
|
9711
|
+
max_depth_reached: number;
|
|
9712
|
+
};
|
|
9713
|
+
};
|
|
9714
|
+
CascadeDeleteRequest: {
|
|
9715
|
+
/**
|
|
9716
|
+
* @description Current tip CID for CAS validation. Request fails with 409 if this does not match.
|
|
9717
|
+
* @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
|
|
9718
|
+
*/
|
|
9719
|
+
expect_tip: string;
|
|
9720
|
+
/**
|
|
9721
|
+
* @description Optional note describing this change
|
|
9722
|
+
* @example Added Chapter 42: The Whiteness of the Whale
|
|
9723
|
+
*/
|
|
9724
|
+
note?: string;
|
|
9725
|
+
/**
|
|
9726
|
+
* @description Collection to scope the cascade delete. Only entities in this collection will be deleted. Permission check is performed on this collection.
|
|
9727
|
+
* @example 01KDETYWYWM0MJVKM8DK3AEXPY
|
|
9728
|
+
*/
|
|
9729
|
+
collection_id: string;
|
|
9730
|
+
/**
|
|
9731
|
+
* @description Predicate patterns to follow during cascade traversal. Supports wildcards:
|
|
9732
|
+
* - `"child"` - exact match only
|
|
9733
|
+
* - `"has_*"` - matches has_document, has_image, etc.
|
|
9734
|
+
* - `"*_copy"` - matches file_copy, document_copy, etc.
|
|
9735
|
+
* - `"*"` - matches ALL predicates
|
|
9736
|
+
*
|
|
9737
|
+
* **Important:** The `collection` predicate NEVER cascades, even if `"*"` is specified. This protects the collection structure from accidental deletion.
|
|
9738
|
+
* @example [
|
|
9739
|
+
* "child",
|
|
9740
|
+
* "has_*"
|
|
9741
|
+
* ]
|
|
9742
|
+
*/
|
|
9743
|
+
cascade_predicates: string[];
|
|
9744
|
+
/**
|
|
9745
|
+
* @description Only delete entities where edited_by.user_id matches this PI. Useful for cleaning up entities created by a specific agent.
|
|
9746
|
+
* @example 01KAGENTXXXXXXXXXXXXXXXX
|
|
9747
|
+
*/
|
|
9748
|
+
edited_by_filter?: string;
|
|
9749
|
+
/**
|
|
9750
|
+
* @description Maximum relationship depth to traverse (default: 10, max: 20)
|
|
9751
|
+
* @default 10
|
|
9752
|
+
* @example 10
|
|
9753
|
+
*/
|
|
9754
|
+
max_depth: number;
|
|
9755
|
+
/**
|
|
9756
|
+
* @description Reason for deleting the entities (applied to all deleted entities)
|
|
9757
|
+
* @example Cleanup after agent task
|
|
9758
|
+
*/
|
|
9759
|
+
reason?: string;
|
|
9760
|
+
};
|
|
9104
9761
|
EntityUpdateResponse: components["schemas"]["EntityResponse"] & {
|
|
9105
9762
|
/**
|
|
9106
9763
|
* @description Previous version CID
|
|
@@ -10847,6 +11504,35 @@ type components = {
|
|
|
10847
11504
|
*/
|
|
10848
11505
|
cursor: number;
|
|
10849
11506
|
};
|
|
11507
|
+
/**
|
|
11508
|
+
* @example {
|
|
11509
|
+
* "subject_pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
|
|
11510
|
+
* "subject_label": "Project Folder",
|
|
11511
|
+
* "subject_type": "folder",
|
|
11512
|
+
* "subject_preview": {
|
|
11513
|
+
* "id": "01KE4ZY69F9R40E88PK9S0TQRQ",
|
|
11514
|
+
* "type": "folder",
|
|
11515
|
+
* "label": "Project Folder",
|
|
11516
|
+
* "collection_pi": "01JCOLLECTION123456789ABCD",
|
|
11517
|
+
* "description_preview": "Main project folder containing research documents...",
|
|
11518
|
+
* "created_at": "2025-01-10T08:00:00.000Z",
|
|
11519
|
+
* "updated_at": "2025-01-18T16:45:00.000Z"
|
|
11520
|
+
* },
|
|
11521
|
+
* "predicate": "contains",
|
|
11522
|
+
* "object_pi": "01KE506KZGD8M2P1XK3VNQT4YR",
|
|
11523
|
+
* "object_label": "Research Paper.pdf",
|
|
11524
|
+
* "object_type": "file",
|
|
11525
|
+
* "object_preview": {
|
|
11526
|
+
* "id": "01KE506KZGD8M2P1XK3VNQT4YR",
|
|
11527
|
+
* "type": "file",
|
|
11528
|
+
* "label": "Research Paper.pdf",
|
|
11529
|
+
* "collection_pi": "01JCOLLECTION123456789ABCD",
|
|
11530
|
+
* "description_preview": "Analysis of entity management patterns and best practices...",
|
|
11531
|
+
* "created_at": "2025-01-15T10:00:00.000Z",
|
|
11532
|
+
* "updated_at": "2025-01-20T14:30:00.000Z"
|
|
11533
|
+
* }
|
|
11534
|
+
* }
|
|
11535
|
+
*/
|
|
10850
11536
|
PathEdge: {
|
|
10851
11537
|
/**
|
|
10852
11538
|
* @description Source entity PI
|
|
@@ -10857,6 +11543,8 @@ type components = {
|
|
|
10857
11543
|
subject_label: string;
|
|
10858
11544
|
/** @description Source entity type */
|
|
10859
11545
|
subject_type: string;
|
|
11546
|
+
subject_preview?: components["schemas"]["EntityPreview"] & unknown;
|
|
11547
|
+
subject_entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
10860
11548
|
/** @description Relationship predicate */
|
|
10861
11549
|
predicate: string;
|
|
10862
11550
|
/**
|
|
@@ -10868,6 +11556,8 @@ type components = {
|
|
|
10868
11556
|
object_label: string;
|
|
10869
11557
|
/** @description Target entity type */
|
|
10870
11558
|
object_type: string;
|
|
11559
|
+
object_preview?: components["schemas"]["EntityPreview"] & unknown;
|
|
11560
|
+
object_entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
10871
11561
|
};
|
|
10872
11562
|
PathResult: {
|
|
10873
11563
|
/**
|
|
@@ -10924,6 +11614,25 @@ type components = {
|
|
|
10924
11614
|
*/
|
|
10925
11615
|
limit: number;
|
|
10926
11616
|
};
|
|
11617
|
+
/**
|
|
11618
|
+
* @example {
|
|
11619
|
+
* "source_pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
|
|
11620
|
+
* "target_pi": "01KE506KZGD8M2P1XK3VNQT4YR",
|
|
11621
|
+
* "target_label": "Research Paper.pdf",
|
|
11622
|
+
* "target_type": "file",
|
|
11623
|
+
* "length": 1,
|
|
11624
|
+
* "edges": [],
|
|
11625
|
+
* "target_preview": {
|
|
11626
|
+
* "id": "01KE506KZGD8M2P1XK3VNQT4YR",
|
|
11627
|
+
* "type": "file",
|
|
11628
|
+
* "label": "Research Paper.pdf",
|
|
11629
|
+
* "collection_pi": "01JCOLLECTION123456789ABCD",
|
|
11630
|
+
* "description_preview": "Analysis of entity management patterns and best practices...",
|
|
11631
|
+
* "created_at": "2025-01-15T10:00:00.000Z",
|
|
11632
|
+
* "updated_at": "2025-01-20T14:30:00.000Z"
|
|
11633
|
+
* }
|
|
11634
|
+
* }
|
|
11635
|
+
*/
|
|
10927
11636
|
ReachableResult: {
|
|
10928
11637
|
/**
|
|
10929
11638
|
* @description Entity ID (ULID format)
|
|
@@ -10940,6 +11649,8 @@ type components = {
|
|
|
10940
11649
|
/** @description Path length (number of hops) */
|
|
10941
11650
|
length: number;
|
|
10942
11651
|
edges: components["schemas"]["PathEdge"][];
|
|
11652
|
+
target_preview?: components["schemas"]["EntityPreview"] & unknown;
|
|
11653
|
+
target_entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
10943
11654
|
};
|
|
10944
11655
|
PathsReachableResponse: {
|
|
10945
11656
|
results: components["schemas"]["ReachableResult"][];
|
|
@@ -10979,6 +11690,25 @@ type components = {
|
|
|
10979
11690
|
*/
|
|
10980
11691
|
limit: number;
|
|
10981
11692
|
};
|
|
11693
|
+
/**
|
|
11694
|
+
* @example {
|
|
11695
|
+
* "direction": "outgoing",
|
|
11696
|
+
* "predicate": "contains",
|
|
11697
|
+
* "peer_pi": "01KE506KZGD8M2P1XK3VNQT4YR",
|
|
11698
|
+
* "peer_type": "file",
|
|
11699
|
+
* "peer_label": "Research Paper.pdf",
|
|
11700
|
+
* "properties": {},
|
|
11701
|
+
* "peer_preview": {
|
|
11702
|
+
* "id": "01KE506KZGD8M2P1XK3VNQT4YR",
|
|
11703
|
+
* "type": "file",
|
|
11704
|
+
* "label": "Research Paper.pdf",
|
|
11705
|
+
* "collection_pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
|
|
11706
|
+
* "description_preview": "Analysis of entity management patterns and best practices...",
|
|
11707
|
+
* "created_at": "2025-01-15T10:00:00.000Z",
|
|
11708
|
+
* "updated_at": "2025-01-20T14:30:00.000Z"
|
|
11709
|
+
* }
|
|
11710
|
+
* }
|
|
11711
|
+
*/
|
|
10982
11712
|
RelationshipInfo: {
|
|
10983
11713
|
/** @enum {string} */
|
|
10984
11714
|
direction: "outgoing" | "incoming";
|
|
@@ -10993,7 +11723,38 @@ type components = {
|
|
|
10993
11723
|
properties: {
|
|
10994
11724
|
[key: string]: unknown;
|
|
10995
11725
|
};
|
|
11726
|
+
peer_preview?: components["schemas"]["EntityPreview"] & unknown;
|
|
11727
|
+
peer_entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
10996
11728
|
};
|
|
11729
|
+
/**
|
|
11730
|
+
* @example {
|
|
11731
|
+
* "pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
|
|
11732
|
+
* "type": "folder",
|
|
11733
|
+
* "label": "Project Folder",
|
|
11734
|
+
* "collection_pi": "01JCOLLECTION123456789ABCD",
|
|
11735
|
+
* "created_at": "2025-01-10T08:00:00.000Z",
|
|
11736
|
+
* "updated_at": "2025-01-18T16:45:00.000Z",
|
|
11737
|
+
* "relationships": [
|
|
11738
|
+
* {
|
|
11739
|
+
* "direction": "outgoing",
|
|
11740
|
+
* "predicate": "contains",
|
|
11741
|
+
* "peer_pi": "01KE506KZGD8M2P1XK3VNQT4YR",
|
|
11742
|
+
* "peer_type": "file",
|
|
11743
|
+
* "peer_label": "Research Paper.pdf",
|
|
11744
|
+
* "properties": {},
|
|
11745
|
+
* "peer_preview": {
|
|
11746
|
+
* "id": "01KE506KZGD8M2P1XK3VNQT4YR",
|
|
11747
|
+
* "type": "file",
|
|
11748
|
+
* "label": "Research Paper.pdf",
|
|
11749
|
+
* "collection_pi": "01JCOLLECTION123456789ABCD",
|
|
11750
|
+
* "description_preview": "Analysis of entity management patterns and best practices...",
|
|
11751
|
+
* "created_at": "2025-01-15T10:00:00.000Z",
|
|
11752
|
+
* "updated_at": "2025-01-20T14:30:00.000Z"
|
|
11753
|
+
* }
|
|
11754
|
+
* }
|
|
11755
|
+
* ]
|
|
11756
|
+
* }
|
|
11757
|
+
*/
|
|
10997
11758
|
GraphEntityResponse: {
|
|
10998
11759
|
/**
|
|
10999
11760
|
* @description Entity ID (ULID format)
|
|
@@ -11009,34 +11770,30 @@ type components = {
|
|
|
11009
11770
|
updated_at: string;
|
|
11010
11771
|
relationships: components["schemas"]["RelationshipInfo"][];
|
|
11011
11772
|
};
|
|
11012
|
-
QueryEntity: {
|
|
11013
|
-
/**
|
|
11014
|
-
* @description Entity ID (ULID format)
|
|
11015
|
-
* @example 01KDETYWYWM0MJVKM8DK3AEXPY
|
|
11016
|
-
*/
|
|
11017
|
-
pi: string;
|
|
11018
|
-
type: string;
|
|
11019
|
-
label: string;
|
|
11020
|
-
collection_pi: string | null;
|
|
11021
|
-
};
|
|
11022
|
-
EntityStep: {
|
|
11023
|
-
entity: string;
|
|
11024
|
-
label?: string;
|
|
11025
|
-
type?: string;
|
|
11026
|
-
score?: number;
|
|
11027
|
-
};
|
|
11028
11773
|
EdgeStep: {
|
|
11029
11774
|
edge: string;
|
|
11030
11775
|
/** @enum {string} */
|
|
11031
11776
|
direction: "outgoing" | "incoming";
|
|
11032
11777
|
score?: number;
|
|
11033
11778
|
};
|
|
11034
|
-
PathStep:
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11779
|
+
PathStep: {
|
|
11780
|
+
/**
|
|
11781
|
+
* @description Entity ID
|
|
11782
|
+
* @example 01KPERSON_EINSTEIN
|
|
11783
|
+
*/
|
|
11784
|
+
entity: string;
|
|
11785
|
+
/** @example Albert Einstein */
|
|
11786
|
+
label?: string;
|
|
11787
|
+
/** @example person */
|
|
11788
|
+
type?: string;
|
|
11789
|
+
/**
|
|
11790
|
+
* @description Semantic similarity score (0-1)
|
|
11791
|
+
* @example 0.92
|
|
11792
|
+
*/
|
|
11793
|
+
score?: number;
|
|
11794
|
+
preview_data?: components["schemas"]["EntityPreview"] & unknown;
|
|
11795
|
+
full_entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
11796
|
+
} | components["schemas"]["EdgeStep"];
|
|
11040
11797
|
QueryMetadata: {
|
|
11041
11798
|
query: string;
|
|
11042
11799
|
hops: number;
|
|
@@ -11051,7 +11808,48 @@ type components = {
|
|
|
11051
11808
|
stopped_at_hop?: number;
|
|
11052
11809
|
};
|
|
11053
11810
|
QueryResponse: {
|
|
11054
|
-
results:
|
|
11811
|
+
results: {
|
|
11812
|
+
/**
|
|
11813
|
+
* @description Query result entity with optional expansion data
|
|
11814
|
+
* @example {
|
|
11815
|
+
* "pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
|
|
11816
|
+
* "type": "person",
|
|
11817
|
+
* "label": "Albert Einstein",
|
|
11818
|
+
* "collection_pi": "01JCOLL_RESEARCH",
|
|
11819
|
+
* "preview_data": {
|
|
11820
|
+
* "id": "01KE4ZY69F9R40E88PK9S0TQRQ",
|
|
11821
|
+
* "type": "person",
|
|
11822
|
+
* "label": "Albert Einstein",
|
|
11823
|
+
* "collection_pi": "01JCOLL_RESEARCH",
|
|
11824
|
+
* "description_preview": "German-born theoretical physicist who developed the theory of relativity...",
|
|
11825
|
+
* "created_at": "2025-01-15T10:00:00.000Z",
|
|
11826
|
+
* "updated_at": "2025-01-20T14:30:00.000Z"
|
|
11827
|
+
* }
|
|
11828
|
+
* }
|
|
11829
|
+
*/
|
|
11830
|
+
entity: {
|
|
11831
|
+
/**
|
|
11832
|
+
* @description Entity ID (ULID format)
|
|
11833
|
+
* @example 01KDETYWYWM0MJVKM8DK3AEXPY
|
|
11834
|
+
*/
|
|
11835
|
+
pi: string;
|
|
11836
|
+
/** @example person */
|
|
11837
|
+
type: string;
|
|
11838
|
+
/** @example Albert Einstein */
|
|
11839
|
+
label: string;
|
|
11840
|
+
/** @example 01JCOLL_RESEARCH */
|
|
11841
|
+
collection_pi: string | null;
|
|
11842
|
+
preview_data?: components["schemas"]["EntityPreview"] & unknown;
|
|
11843
|
+
full_entity?: components["schemas"]["EntityResponse"] & unknown;
|
|
11844
|
+
};
|
|
11845
|
+
/** @description Path from entry point to result entity (empty for zero-hop queries) */
|
|
11846
|
+
path: components["schemas"]["PathStep"][];
|
|
11847
|
+
/**
|
|
11848
|
+
* @description Combined relevance score (semantic similarity + path length)
|
|
11849
|
+
* @example 0.89
|
|
11850
|
+
*/
|
|
11851
|
+
score: number;
|
|
11852
|
+
}[];
|
|
11055
11853
|
metadata: components["schemas"]["QueryMetadata"];
|
|
11056
11854
|
};
|
|
11057
11855
|
QueryRequest: {
|
|
@@ -11076,6 +11874,15 @@ type components = {
|
|
|
11076
11874
|
* @example 01JCOLL_MEDICAL
|
|
11077
11875
|
*/
|
|
11078
11876
|
collection?: string;
|
|
11877
|
+
/**
|
|
11878
|
+
* @description Control entity expansion in results and path steps.
|
|
11879
|
+
* - **omitted/preview** (default): Attach lightweight preview data (label, timestamps, truncated description/text)
|
|
11880
|
+
* - **full**: Attach complete entity manifest (all properties, relationships, version info)
|
|
11881
|
+
* - **none**: No expansion - return only Pinecone metadata (fastest, smallest payload)
|
|
11882
|
+
* @example preview
|
|
11883
|
+
* @enum {string}
|
|
11884
|
+
*/
|
|
11885
|
+
expand?: "none" | "preview" | "full";
|
|
11079
11886
|
};
|
|
11080
11887
|
TextPart: {
|
|
11081
11888
|
/** @enum {string} */
|