@arke-institute/sdk 2.3.10 → 2.3.12
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 +414 -7
- package/dist/generated/index.d.ts +414 -7
- package/openapi/spec.json +798 -3
- 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-14T16:34:47.055Z
|
|
10
10
|
*/
|
|
11
11
|
type paths = {
|
|
12
12
|
"/auth/register": {
|
|
@@ -2484,6 +2484,219 @@ type paths = {
|
|
|
2484
2484
|
patch?: never;
|
|
2485
2485
|
trace?: never;
|
|
2486
2486
|
};
|
|
2487
|
+
"/entities/{id}/diff": {
|
|
2488
|
+
parameters: {
|
|
2489
|
+
query?: never;
|
|
2490
|
+
header?: never;
|
|
2491
|
+
path?: never;
|
|
2492
|
+
cookie?: never;
|
|
2493
|
+
};
|
|
2494
|
+
/**
|
|
2495
|
+
* Get diff between entity versions
|
|
2496
|
+
* @description Computes the difference between two versions of an entity.
|
|
2497
|
+
*
|
|
2498
|
+
* Query parameters:
|
|
2499
|
+
* - `from`: CID of the "from" version (defaults to prev of "to" version)
|
|
2500
|
+
* - `to`: CID of the "to" version (defaults to current tip)
|
|
2501
|
+
* - `format`: Output format - "semantic" (default) or "patch" (RFC 6902)
|
|
2502
|
+
*
|
|
2503
|
+
* Modes:
|
|
2504
|
+
* - No params: Compare current tip with its previous version
|
|
2505
|
+
* - `to` only: Compare that version with its prev
|
|
2506
|
+
* - `from` only: Compare from that version to current tip
|
|
2507
|
+
* - Both: Compare any two versions
|
|
2508
|
+
*
|
|
2509
|
+
* For version 1 entities (no previous version), "from" is null and all content appears as added.
|
|
2510
|
+
*/
|
|
2511
|
+
get: {
|
|
2512
|
+
parameters: {
|
|
2513
|
+
query?: {
|
|
2514
|
+
/** @description CID of the "from" version. Defaults to prev of "to" version. */
|
|
2515
|
+
from?: string;
|
|
2516
|
+
/** @description CID of the "to" version. Defaults to current tip. */
|
|
2517
|
+
to?: string;
|
|
2518
|
+
/** @description Output format: "semantic" (default) or "patch" (RFC 6902) */
|
|
2519
|
+
format?: "semantic" | "patch";
|
|
2520
|
+
};
|
|
2521
|
+
header?: never;
|
|
2522
|
+
path: {
|
|
2523
|
+
/** @description Entity ID (ULID) */
|
|
2524
|
+
id: string;
|
|
2525
|
+
};
|
|
2526
|
+
cookie?: never;
|
|
2527
|
+
};
|
|
2528
|
+
requestBody?: never;
|
|
2529
|
+
responses: {
|
|
2530
|
+
/** @description Diff computed */
|
|
2531
|
+
200: {
|
|
2532
|
+
headers: {
|
|
2533
|
+
[name: string]: unknown;
|
|
2534
|
+
};
|
|
2535
|
+
content: {
|
|
2536
|
+
"application/json": components["schemas"]["DiffResponse"];
|
|
2537
|
+
};
|
|
2538
|
+
};
|
|
2539
|
+
/** @description Bad Request - Invalid input */
|
|
2540
|
+
400: {
|
|
2541
|
+
headers: {
|
|
2542
|
+
[name: string]: unknown;
|
|
2543
|
+
};
|
|
2544
|
+
content: {
|
|
2545
|
+
/**
|
|
2546
|
+
* @example {
|
|
2547
|
+
* "error": "Validation failed",
|
|
2548
|
+
* "details": {
|
|
2549
|
+
* "issues": [
|
|
2550
|
+
* {
|
|
2551
|
+
* "path": [
|
|
2552
|
+
* "properties",
|
|
2553
|
+
* "label"
|
|
2554
|
+
* ],
|
|
2555
|
+
* "message": "Required"
|
|
2556
|
+
* }
|
|
2557
|
+
* ]
|
|
2558
|
+
* }
|
|
2559
|
+
* }
|
|
2560
|
+
*/
|
|
2561
|
+
"application/json": components["schemas"]["ValidationErrorResponse"];
|
|
2562
|
+
};
|
|
2563
|
+
};
|
|
2564
|
+
/** @description Forbidden - Insufficient permissions */
|
|
2565
|
+
403: {
|
|
2566
|
+
headers: {
|
|
2567
|
+
[name: string]: unknown;
|
|
2568
|
+
};
|
|
2569
|
+
content: {
|
|
2570
|
+
/**
|
|
2571
|
+
* @example {
|
|
2572
|
+
* "error": "Forbidden: You do not have permission to perform this action"
|
|
2573
|
+
* }
|
|
2574
|
+
*/
|
|
2575
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2576
|
+
};
|
|
2577
|
+
};
|
|
2578
|
+
/** @description Not Found - Resource does not exist */
|
|
2579
|
+
404: {
|
|
2580
|
+
headers: {
|
|
2581
|
+
[name: string]: unknown;
|
|
2582
|
+
};
|
|
2583
|
+
content: {
|
|
2584
|
+
/**
|
|
2585
|
+
* @example {
|
|
2586
|
+
* "error": "Entity not found"
|
|
2587
|
+
* }
|
|
2588
|
+
*/
|
|
2589
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2590
|
+
};
|
|
2591
|
+
};
|
|
2592
|
+
};
|
|
2593
|
+
};
|
|
2594
|
+
put?: never;
|
|
2595
|
+
post?: never;
|
|
2596
|
+
delete?: never;
|
|
2597
|
+
options?: never;
|
|
2598
|
+
head?: never;
|
|
2599
|
+
patch?: never;
|
|
2600
|
+
trace?: never;
|
|
2601
|
+
};
|
|
2602
|
+
"/entities/{id}/permissions": {
|
|
2603
|
+
parameters: {
|
|
2604
|
+
query?: never;
|
|
2605
|
+
header?: never;
|
|
2606
|
+
path?: never;
|
|
2607
|
+
cookie?: never;
|
|
2608
|
+
};
|
|
2609
|
+
/**
|
|
2610
|
+
* Get your permissions for an entity
|
|
2611
|
+
* @description Returns the list of actions you can perform on this entity.
|
|
2612
|
+
*
|
|
2613
|
+
* The response includes:
|
|
2614
|
+
* - `allowed_actions`: Concrete actions you can perform (no wildcards)
|
|
2615
|
+
* - `resolution`: How permissions were determined
|
|
2616
|
+
*
|
|
2617
|
+
* Resolution methods:
|
|
2618
|
+
* - `collection`: Permissions from your role in the parent collection
|
|
2619
|
+
* - `self`: You are checking your own user entity (self-ownership)
|
|
2620
|
+
* - `open_season`: Entity is not in any collection (publicly accessible)
|
|
2621
|
+
*
|
|
2622
|
+
* Actions are filtered to only those relevant to the entity type:
|
|
2623
|
+
* - For files: entity:* and file:* actions
|
|
2624
|
+
* - For collections: entity:* and collection:* actions
|
|
2625
|
+
* - etc.
|
|
2626
|
+
*/
|
|
2627
|
+
get: {
|
|
2628
|
+
parameters: {
|
|
2629
|
+
query?: never;
|
|
2630
|
+
header?: never;
|
|
2631
|
+
path: {
|
|
2632
|
+
/** @description Entity ID (ULID) */
|
|
2633
|
+
id: string;
|
|
2634
|
+
};
|
|
2635
|
+
cookie?: never;
|
|
2636
|
+
};
|
|
2637
|
+
requestBody?: never;
|
|
2638
|
+
responses: {
|
|
2639
|
+
/** @description Permissions retrieved */
|
|
2640
|
+
200: {
|
|
2641
|
+
headers: {
|
|
2642
|
+
[name: string]: unknown;
|
|
2643
|
+
};
|
|
2644
|
+
content: {
|
|
2645
|
+
"application/json": components["schemas"]["EntityPermissionsResponse"];
|
|
2646
|
+
};
|
|
2647
|
+
};
|
|
2648
|
+
/** @description Unauthorized - Missing or invalid authentication */
|
|
2649
|
+
401: {
|
|
2650
|
+
headers: {
|
|
2651
|
+
[name: string]: unknown;
|
|
2652
|
+
};
|
|
2653
|
+
content: {
|
|
2654
|
+
/**
|
|
2655
|
+
* @example {
|
|
2656
|
+
* "error": "Unauthorized: Missing or invalid authentication token"
|
|
2657
|
+
* }
|
|
2658
|
+
*/
|
|
2659
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2660
|
+
};
|
|
2661
|
+
};
|
|
2662
|
+
/** @description Forbidden - Insufficient permissions */
|
|
2663
|
+
403: {
|
|
2664
|
+
headers: {
|
|
2665
|
+
[name: string]: unknown;
|
|
2666
|
+
};
|
|
2667
|
+
content: {
|
|
2668
|
+
/**
|
|
2669
|
+
* @example {
|
|
2670
|
+
* "error": "Forbidden: You do not have permission to perform this action"
|
|
2671
|
+
* }
|
|
2672
|
+
*/
|
|
2673
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2674
|
+
};
|
|
2675
|
+
};
|
|
2676
|
+
/** @description Not Found - Resource does not exist */
|
|
2677
|
+
404: {
|
|
2678
|
+
headers: {
|
|
2679
|
+
[name: string]: unknown;
|
|
2680
|
+
};
|
|
2681
|
+
content: {
|
|
2682
|
+
/**
|
|
2683
|
+
* @example {
|
|
2684
|
+
* "error": "Entity not found"
|
|
2685
|
+
* }
|
|
2686
|
+
*/
|
|
2687
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2688
|
+
};
|
|
2689
|
+
};
|
|
2690
|
+
};
|
|
2691
|
+
};
|
|
2692
|
+
put?: never;
|
|
2693
|
+
post?: never;
|
|
2694
|
+
delete?: never;
|
|
2695
|
+
options?: never;
|
|
2696
|
+
head?: never;
|
|
2697
|
+
patch?: never;
|
|
2698
|
+
trace?: never;
|
|
2699
|
+
};
|
|
2487
2700
|
"/relationships": {
|
|
2488
2701
|
parameters: {
|
|
2489
2702
|
query?: never;
|
|
@@ -5838,9 +6051,23 @@ type paths = {
|
|
|
5838
6051
|
* ## Query Syntax
|
|
5839
6052
|
*
|
|
5840
6053
|
* ```
|
|
5841
|
-
* ENTRY_POINT [ENTRY_FILTER] [-[RELATION]{DEPTH}-> TARGET_FILTER]...
|
|
6054
|
+
* [SCOPE_PREFIX] ENTRY_POINT [ENTRY_FILTER] [-[RELATION]{DEPTH}-> TARGET_FILTER]...
|
|
5842
6055
|
* ```
|
|
5843
6056
|
*
|
|
6057
|
+
* ## Scope Prefixes
|
|
6058
|
+
*
|
|
6059
|
+
* Control where semantic search looks for entry points. Default is discovery mode.
|
|
6060
|
+
*
|
|
6061
|
+
* | Prefix | Description | Example |
|
|
6062
|
+
* |--------|-------------|---------|
|
|
6063
|
+
* | (none) | **Discovery mode** (default) - find relevant collections, then search within each | `"medical notes"` |
|
|
6064
|
+
* | `@:collections` | Search for collections themselves | `@:collections "columbia archives"` |
|
|
6065
|
+
* | `@:collection(id)` | Search within a specific collection | `@:collection(01JCOLL123) "meeting"` |
|
|
6066
|
+
* | `@:discover` | Explicit discovery mode | `@:discover "research papers"` |
|
|
6067
|
+
* | `@:public` | Search public domain only | `@:public "orphaned data"` |
|
|
6068
|
+
*
|
|
6069
|
+
* **Note:** Graph traversal (hops) is always cross-collection regardless of scope.
|
|
6070
|
+
*
|
|
5844
6071
|
* ### Entry Points
|
|
5845
6072
|
*
|
|
5846
6073
|
* | Syntax | Description | Example |
|
|
@@ -5862,10 +6089,11 @@ type paths = {
|
|
|
5862
6089
|
* ### Examples
|
|
5863
6090
|
*
|
|
5864
6091
|
* ```
|
|
5865
|
-
* "george washington" #
|
|
5866
|
-
* "
|
|
5867
|
-
* "
|
|
5868
|
-
*
|
|
6092
|
+
* "george washington" # Discovery mode (default)
|
|
6093
|
+
* @:collections "columbia university" # Find collections
|
|
6094
|
+
* @:collection(01JCOLL123) "faculty meeting" # Within specific collection
|
|
6095
|
+
* @:discover "alice" -[*]{,2}-> type:person # Discover, then traverse
|
|
6096
|
+
* @01KE4ZY... -[*]{,2}-> type:person # From exact entity
|
|
5869
6097
|
* ```
|
|
5870
6098
|
*/
|
|
5871
6099
|
post: {
|
|
@@ -7842,6 +8070,180 @@ type components = {
|
|
|
7842
8070
|
/** @description Whether results were truncated due to limit */
|
|
7843
8071
|
truncated: boolean;
|
|
7844
8072
|
};
|
|
8073
|
+
/** @description Metadata about the "from" version (null for version 1) */
|
|
8074
|
+
VersionMeta: {
|
|
8075
|
+
/**
|
|
8076
|
+
* @description Content Identifier (CID) - content-addressed hash
|
|
8077
|
+
* @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
|
|
8078
|
+
*/
|
|
8079
|
+
cid: string;
|
|
8080
|
+
/**
|
|
8081
|
+
* @description Entity version number
|
|
8082
|
+
* @example 1
|
|
8083
|
+
*/
|
|
8084
|
+
ver: number;
|
|
8085
|
+
/**
|
|
8086
|
+
* Format: date-time
|
|
8087
|
+
* @description ISO 8601 datetime
|
|
8088
|
+
* @example 2025-12-26T12:00:00.000Z
|
|
8089
|
+
*/
|
|
8090
|
+
ts: string;
|
|
8091
|
+
} | null;
|
|
8092
|
+
PropertyChange: {
|
|
8093
|
+
/** @description Previous value */
|
|
8094
|
+
from?: unknown;
|
|
8095
|
+
/** @description New value */
|
|
8096
|
+
to?: unknown;
|
|
8097
|
+
};
|
|
8098
|
+
PropertiesChanges: {
|
|
8099
|
+
/**
|
|
8100
|
+
* @description Properties that were added
|
|
8101
|
+
* @example {
|
|
8102
|
+
* "email": "new@example.com"
|
|
8103
|
+
* }
|
|
8104
|
+
*/
|
|
8105
|
+
added: {
|
|
8106
|
+
[key: string]: unknown;
|
|
8107
|
+
};
|
|
8108
|
+
/**
|
|
8109
|
+
* @description Properties that were removed (includes old values)
|
|
8110
|
+
* @example {
|
|
8111
|
+
* "deprecated_field": "old value"
|
|
8112
|
+
* }
|
|
8113
|
+
*/
|
|
8114
|
+
removed: {
|
|
8115
|
+
[key: string]: unknown;
|
|
8116
|
+
};
|
|
8117
|
+
/**
|
|
8118
|
+
* @description Properties that changed
|
|
8119
|
+
* @example {
|
|
8120
|
+
* "name": {
|
|
8121
|
+
* "from": "Old Name",
|
|
8122
|
+
* "to": "New Name"
|
|
8123
|
+
* }
|
|
8124
|
+
* }
|
|
8125
|
+
*/
|
|
8126
|
+
changed: {
|
|
8127
|
+
[key: string]: components["schemas"]["PropertyChange"];
|
|
8128
|
+
};
|
|
8129
|
+
};
|
|
8130
|
+
RelationshipChange: {
|
|
8131
|
+
predicate: string;
|
|
8132
|
+
peer: string;
|
|
8133
|
+
peer_type?: string;
|
|
8134
|
+
peer_label?: string;
|
|
8135
|
+
properties: components["schemas"]["PropertyChange"];
|
|
8136
|
+
};
|
|
8137
|
+
RelationshipsChanges: {
|
|
8138
|
+
/** @description Relationships that were added */
|
|
8139
|
+
added: {
|
|
8140
|
+
predicate: string;
|
|
8141
|
+
peer: string;
|
|
8142
|
+
peer_type?: string;
|
|
8143
|
+
peer_label?: string;
|
|
8144
|
+
properties?: {
|
|
8145
|
+
[key: string]: unknown;
|
|
8146
|
+
};
|
|
8147
|
+
}[];
|
|
8148
|
+
/** @description Relationships that were removed */
|
|
8149
|
+
removed: {
|
|
8150
|
+
predicate: string;
|
|
8151
|
+
peer: string;
|
|
8152
|
+
peer_type?: string;
|
|
8153
|
+
peer_label?: string;
|
|
8154
|
+
properties?: {
|
|
8155
|
+
[key: string]: unknown;
|
|
8156
|
+
};
|
|
8157
|
+
}[];
|
|
8158
|
+
/** @description Relationships with changed properties */
|
|
8159
|
+
changed: components["schemas"]["RelationshipChange"][];
|
|
8160
|
+
};
|
|
8161
|
+
SemanticChanges: {
|
|
8162
|
+
properties: components["schemas"]["PropertiesChanges"];
|
|
8163
|
+
relationships: components["schemas"]["RelationshipsChanges"];
|
|
8164
|
+
};
|
|
8165
|
+
SemanticDiffResponse: {
|
|
8166
|
+
/**
|
|
8167
|
+
* @description Entity ID (ULID format)
|
|
8168
|
+
* @example 01KDETYWYWM0MJVKM8DK3AEXPY
|
|
8169
|
+
*/
|
|
8170
|
+
entity_id: string;
|
|
8171
|
+
from: components["schemas"]["VersionMeta"];
|
|
8172
|
+
to: components["schemas"]["VersionMeta"];
|
|
8173
|
+
/** @enum {string} */
|
|
8174
|
+
format: "semantic";
|
|
8175
|
+
changes: components["schemas"]["SemanticChanges"];
|
|
8176
|
+
};
|
|
8177
|
+
PatchOperation: {
|
|
8178
|
+
/** @enum {string} */
|
|
8179
|
+
op: "add";
|
|
8180
|
+
path: string;
|
|
8181
|
+
value?: unknown;
|
|
8182
|
+
} | {
|
|
8183
|
+
/** @enum {string} */
|
|
8184
|
+
op: "remove";
|
|
8185
|
+
path: string;
|
|
8186
|
+
} | {
|
|
8187
|
+
/** @enum {string} */
|
|
8188
|
+
op: "replace";
|
|
8189
|
+
path: string;
|
|
8190
|
+
value?: unknown;
|
|
8191
|
+
};
|
|
8192
|
+
PatchDiffResponse: {
|
|
8193
|
+
/**
|
|
8194
|
+
* @description Entity ID (ULID format)
|
|
8195
|
+
* @example 01KDETYWYWM0MJVKM8DK3AEXPY
|
|
8196
|
+
*/
|
|
8197
|
+
entity_id: string;
|
|
8198
|
+
from: components["schemas"]["VersionMeta"];
|
|
8199
|
+
to: components["schemas"]["VersionMeta"];
|
|
8200
|
+
/** @enum {string} */
|
|
8201
|
+
format: "patch";
|
|
8202
|
+
/** @description RFC 6902 JSON Patch operations */
|
|
8203
|
+
patch: components["schemas"]["PatchOperation"][];
|
|
8204
|
+
};
|
|
8205
|
+
DiffResponse: components["schemas"]["SemanticDiffResponse"] | components["schemas"]["PatchDiffResponse"];
|
|
8206
|
+
/** @description How permissions were resolved */
|
|
8207
|
+
PermissionResolution: {
|
|
8208
|
+
/**
|
|
8209
|
+
* @description How permissions were resolved
|
|
8210
|
+
* @example collection
|
|
8211
|
+
* @enum {string}
|
|
8212
|
+
*/
|
|
8213
|
+
method: "collection" | "self" | "open_season";
|
|
8214
|
+
/**
|
|
8215
|
+
* @description Collection ID if permissions come from a collection role
|
|
8216
|
+
* @example 01KDETYWYWM0MJVKM8DK3AEXPY
|
|
8217
|
+
*/
|
|
8218
|
+
collection_id?: string;
|
|
8219
|
+
/**
|
|
8220
|
+
* @description Role name in the collection
|
|
8221
|
+
* @example editor
|
|
8222
|
+
*/
|
|
8223
|
+
role?: string;
|
|
8224
|
+
};
|
|
8225
|
+
EntityPermissionsResponse: {
|
|
8226
|
+
/**
|
|
8227
|
+
* @description The entity ID
|
|
8228
|
+
* @example 01KDETYWYWM0MJVKM8DK3AEXPY
|
|
8229
|
+
*/
|
|
8230
|
+
entity_id: string;
|
|
8231
|
+
/**
|
|
8232
|
+
* @description The entity type
|
|
8233
|
+
* @example file
|
|
8234
|
+
*/
|
|
8235
|
+
entity_type: string;
|
|
8236
|
+
/**
|
|
8237
|
+
* @description Actions the user can perform on this entity
|
|
8238
|
+
* @example [
|
|
8239
|
+
* "entity:view",
|
|
8240
|
+
* "entity:update",
|
|
8241
|
+
* "file:download"
|
|
8242
|
+
* ]
|
|
8243
|
+
*/
|
|
8244
|
+
allowed_actions: string[];
|
|
8245
|
+
resolution: components["schemas"]["PermissionResolution"];
|
|
8246
|
+
};
|
|
7845
8247
|
AddRelationshipResponse: {
|
|
7846
8248
|
source: components["schemas"]["EntityResponse"] & unknown;
|
|
7847
8249
|
target?: components["schemas"]["EntityResponse"] & unknown;
|
|
@@ -9517,7 +9919,12 @@ type components = {
|
|
|
9517
9919
|
};
|
|
9518
9920
|
};
|
|
9519
9921
|
responses: never;
|
|
9520
|
-
parameters:
|
|
9922
|
+
parameters: {
|
|
9923
|
+
/** @description Target network. Use `test` for isolated test data with II-prefixed IDs. */
|
|
9924
|
+
"X-Arke-Network": "main" | "test";
|
|
9925
|
+
/** @description User entity ID for service accounts acting on behalf of a user. Only valid with `role: service` authentication. */
|
|
9926
|
+
"X-On-Behalf-Of": string;
|
|
9927
|
+
};
|
|
9521
9928
|
requestBodies: never;
|
|
9522
9929
|
headers: never;
|
|
9523
9930
|
pathItems: never;
|