@arke-institute/sdk 2.0.0 → 2.1.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.
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Source: Arke v1 API
8
8
  * Version: 1.0.0
9
- * Generated: 2025-12-29T18:40:11.377Z
9
+ * Generated: 2025-12-30T18:35:49.017Z
10
10
  */
11
11
  type paths = {
12
12
  "/auth/register": {
@@ -1675,7 +1675,7 @@ type paths = {
1675
1675
  };
1676
1676
  /**
1677
1677
  * Update entity
1678
- * @description Updates any entity. Properties and relationships are replaced (not merged). Note: entity:update on a collection requires collection:update permission.
1678
+ * @description Updates any entity with merge semantics. Properties are deep merged, relationships use upsert semantics. Use properties_remove and relationships_remove for deletions. Note: entity:update on a collection requires collection:update permission.
1679
1679
  */
1680
1680
  put: {
1681
1681
  parameters: {
@@ -4586,25 +4586,68 @@ type components = {
4586
4586
  * @example Added Chapter 42: The Whiteness of the Whale
4587
4587
  */
4588
4588
  note?: string;
4589
+ /**
4590
+ * @description Updated display name
4591
+ * @example Captain Ahab
4592
+ */
4593
+ label?: string;
4589
4594
  /**
4590
4595
  * @description Properties to merge with existing (partial update)
4591
4596
  * @example {
4592
- * "label": "Captain Ahab",
4593
4597
  * "bio": "Commander of the Pequod, hunter of the white whale"
4594
4598
  * }
4595
4599
  */
4596
4600
  properties?: {
4597
4601
  [key: string]: unknown;
4598
4602
  };
4599
- /** @description Relationships to set (replaces existing) */
4600
- relationships?: {
4603
+ /** @description Relationships to add or update */
4604
+ relationships_add?: {
4605
+ /**
4606
+ * @description Relationship predicate (e.g., "admin", "contains", "collection")
4607
+ * @example admin
4608
+ */
4601
4609
  predicate: string;
4610
+ /**
4611
+ * @description Target entity ID
4612
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
4613
+ */
4602
4614
  peer: string;
4615
+ /**
4616
+ * @description Target entity type hint
4617
+ * @example user
4618
+ */
4603
4619
  peer_type?: string;
4620
+ /**
4621
+ * @description Target entity label hint
4622
+ * @example Captain Ahab
4623
+ */
4604
4624
  peer_label?: string;
4625
+ /**
4626
+ * @description Properties to add/update on this relationship (deep merged if relationship exists)
4627
+ * @example {
4628
+ * "expires_at": "2025-12-31T00:00:00Z"
4629
+ * }
4630
+ */
4605
4631
  properties?: {
4606
4632
  [key: string]: unknown;
4607
4633
  };
4634
+ /** @description Properties to remove from this relationship (string array or nested object) */
4635
+ properties_remove?: string[] | {
4636
+ [key: string]: unknown;
4637
+ };
4638
+ }[];
4639
+ /** @description Relationships to remove */
4640
+ relationships_remove?: {
4641
+ /**
4642
+ * @description Relationship predicate
4643
+ * @example viewer
4644
+ */
4645
+ predicate: string;
4646
+ /**
4647
+ * @description Target entity ID. If omitted, removes ALL relationships with this predicate.
4648
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
4649
+ */
4650
+ peer?: string;
4608
4651
  }[];
4609
4652
  };
4610
4653
  CreateApiKeyResponse: {
@@ -4725,6 +4768,10 @@ type components = {
4725
4768
  roles?: {
4726
4769
  [key: string]: string[];
4727
4770
  };
4771
+ /** @description Additional properties to store */
4772
+ properties?: {
4773
+ [key: string]: unknown;
4774
+ };
4728
4775
  /** @description Initial relationships */
4729
4776
  relationships?: {
4730
4777
  predicate: string;
@@ -4763,6 +4810,59 @@ type components = {
4763
4810
  * @description Updated display image URL
4764
4811
  */
4765
4812
  display_image_url?: string;
4813
+ /** @description Additional properties to merge */
4814
+ properties?: {
4815
+ [key: string]: unknown;
4816
+ };
4817
+ /** @description Relationships to add or update */
4818
+ relationships_add?: {
4819
+ /**
4820
+ * @description Relationship predicate (e.g., "admin", "contains", "collection")
4821
+ * @example admin
4822
+ */
4823
+ predicate: string;
4824
+ /**
4825
+ * @description Target entity ID
4826
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
4827
+ */
4828
+ peer: string;
4829
+ /**
4830
+ * @description Target entity type hint
4831
+ * @example user
4832
+ */
4833
+ peer_type?: string;
4834
+ /**
4835
+ * @description Target entity label hint
4836
+ * @example Captain Ahab
4837
+ */
4838
+ peer_label?: string;
4839
+ /**
4840
+ * @description Properties to add/update on this relationship (deep merged if relationship exists)
4841
+ * @example {
4842
+ * "expires_at": "2025-12-31T00:00:00Z"
4843
+ * }
4844
+ */
4845
+ properties?: {
4846
+ [key: string]: unknown;
4847
+ };
4848
+ /** @description Properties to remove from this relationship (string array or nested object) */
4849
+ properties_remove?: string[] | {
4850
+ [key: string]: unknown;
4851
+ };
4852
+ }[];
4853
+ /** @description Relationships to remove */
4854
+ relationships_remove?: {
4855
+ /**
4856
+ * @description Relationship predicate
4857
+ * @example viewer
4858
+ */
4859
+ predicate: string;
4860
+ /**
4861
+ * @description Target entity ID. If omitted, removes ALL relationships with this predicate.
4862
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
4863
+ */
4864
+ peer?: string;
4865
+ }[];
4766
4866
  };
4767
4867
  RoleResponse: {
4768
4868
  /**
@@ -5087,24 +5187,74 @@ type components = {
5087
5187
  */
5088
5188
  note?: string;
5089
5189
  /**
5090
- * @description Updated properties (replaces all existing properties)
5190
+ * @description Properties to add or update (deep merged with existing)
5091
5191
  * @example {
5092
5192
  * "label": "Chapter 1: Loomings (Revised)",
5093
- * "author": "Herman Melville"
5193
+ * "metadata": {
5194
+ * "status": "reviewed"
5195
+ * }
5094
5196
  * }
5095
5197
  */
5096
5198
  properties?: {
5097
5199
  [key: string]: unknown;
5098
5200
  };
5099
- /** @description Updated relationships (replaces all existing relationships) */
5100
- relationships?: {
5201
+ /**
5202
+ * @description Properties to remove (string array or nested object)
5203
+ * @example [
5204
+ * "deprecated_field"
5205
+ * ]
5206
+ */
5207
+ properties_remove?: string[] | {
5208
+ [key: string]: unknown;
5209
+ };
5210
+ /** @description Relationships to add or update (upsert semantics) */
5211
+ relationships_add?: {
5212
+ /**
5213
+ * @description Relationship predicate (e.g., "admin", "contains", "collection")
5214
+ * @example admin
5215
+ */
5101
5216
  predicate: string;
5217
+ /**
5218
+ * @description Target entity ID
5219
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
5220
+ */
5102
5221
  peer: string;
5222
+ /**
5223
+ * @description Target entity type hint
5224
+ * @example user
5225
+ */
5103
5226
  peer_type?: string;
5227
+ /**
5228
+ * @description Target entity label hint
5229
+ * @example Captain Ahab
5230
+ */
5104
5231
  peer_label?: string;
5232
+ /**
5233
+ * @description Properties to add/update on this relationship (deep merged if relationship exists)
5234
+ * @example {
5235
+ * "expires_at": "2025-12-31T00:00:00Z"
5236
+ * }
5237
+ */
5105
5238
  properties?: {
5106
5239
  [key: string]: unknown;
5107
5240
  };
5241
+ /** @description Properties to remove from this relationship (string array or nested object) */
5242
+ properties_remove?: string[] | {
5243
+ [key: string]: unknown;
5244
+ };
5245
+ }[];
5246
+ /** @description Relationships to remove */
5247
+ relationships_remove?: {
5248
+ /**
5249
+ * @description Relationship predicate
5250
+ * @example viewer
5251
+ */
5252
+ predicate: string;
5253
+ /**
5254
+ * @description Target entity ID. If omitted, removes ALL relationships with this predicate.
5255
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
5256
+ */
5257
+ peer?: string;
5108
5258
  }[];
5109
5259
  /**
5110
5260
  * @description Components to add or update (key → CID)
@@ -5297,7 +5447,27 @@ type components = {
5297
5447
  */
5298
5448
  description?: string;
5299
5449
  /**
5300
- * @description Collection to add this file to (for permissions)
5450
+ * @description Additional properties to store
5451
+ * @example {
5452
+ * "source": "upload",
5453
+ * "category": "financial"
5454
+ * }
5455
+ */
5456
+ properties?: {
5457
+ [key: string]: unknown;
5458
+ };
5459
+ /** @description Relationships to create */
5460
+ relationships?: {
5461
+ predicate: string;
5462
+ peer: string;
5463
+ peer_type?: string;
5464
+ peer_label?: string;
5465
+ properties?: {
5466
+ [key: string]: unknown;
5467
+ };
5468
+ }[];
5469
+ /**
5470
+ * @description Collection to add this file to (for permissions). Shortcut for adding a collection relationship.
5301
5471
  * @example 01KDETYWYWM0MJVKM8DK3AEXPY
5302
5472
  */
5303
5473
  collection?: string;
@@ -5366,7 +5536,7 @@ type components = {
5366
5536
  /** @description New description */
5367
5537
  description?: string;
5368
5538
  /**
5369
- * @description Additional properties to merge into the file metadata (e.g., log_data)
5539
+ * @description Additional properties to merge into the file metadata
5370
5540
  * @example {
5371
5541
  * "log_data": {
5372
5542
  * "status": "done",
@@ -5374,9 +5544,58 @@ type components = {
5374
5544
  * }
5375
5545
  * }
5376
5546
  */
5377
- extra_properties?: {
5547
+ properties?: {
5378
5548
  [key: string]: unknown;
5379
5549
  };
5550
+ /** @description Relationships to add or update */
5551
+ relationships_add?: {
5552
+ /**
5553
+ * @description Relationship predicate (e.g., "admin", "contains", "collection")
5554
+ * @example admin
5555
+ */
5556
+ predicate: string;
5557
+ /**
5558
+ * @description Target entity ID
5559
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
5560
+ */
5561
+ peer: string;
5562
+ /**
5563
+ * @description Target entity type hint
5564
+ * @example user
5565
+ */
5566
+ peer_type?: string;
5567
+ /**
5568
+ * @description Target entity label hint
5569
+ * @example Captain Ahab
5570
+ */
5571
+ peer_label?: string;
5572
+ /**
5573
+ * @description Properties to add/update on this relationship (deep merged if relationship exists)
5574
+ * @example {
5575
+ * "expires_at": "2025-12-31T00:00:00Z"
5576
+ * }
5577
+ */
5578
+ properties?: {
5579
+ [key: string]: unknown;
5580
+ };
5581
+ /** @description Properties to remove from this relationship (string array or nested object) */
5582
+ properties_remove?: string[] | {
5583
+ [key: string]: unknown;
5584
+ };
5585
+ }[];
5586
+ /** @description Relationships to remove */
5587
+ relationships_remove?: {
5588
+ /**
5589
+ * @description Relationship predicate
5590
+ * @example viewer
5591
+ */
5592
+ predicate: string;
5593
+ /**
5594
+ * @description Target entity ID. If omitted, removes ALL relationships with this predicate.
5595
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
5596
+ */
5597
+ peer?: string;
5598
+ }[];
5380
5599
  };
5381
5600
  ReuploadFileResponse: components["schemas"]["UpdateFileResponse"] & {
5382
5601
  /**
@@ -5491,8 +5710,22 @@ type components = {
5491
5710
  metadata?: {
5492
5711
  [key: string]: unknown;
5493
5712
  };
5713
+ /** @description Additional properties to store */
5714
+ properties?: {
5715
+ [key: string]: unknown;
5716
+ };
5717
+ /** @description Relationships to create */
5718
+ relationships?: {
5719
+ predicate: string;
5720
+ peer: string;
5721
+ peer_type?: string;
5722
+ peer_label?: string;
5723
+ properties?: {
5724
+ [key: string]: unknown;
5725
+ };
5726
+ }[];
5494
5727
  /**
5495
- * @description Collection to add folder to (for permissions)
5728
+ * @description Collection to add folder to (for permissions). Shortcut for adding a collection relationship.
5496
5729
  * @example 01KDETYWYWM0MJVKM8DK3AEXPY
5497
5730
  */
5498
5731
  collection?: string;
@@ -5530,10 +5763,63 @@ type components = {
5530
5763
  description?: string;
5531
5764
  /** @description New rich description */
5532
5765
  rich_description?: string;
5533
- /** @description New metadata (replaces existing) */
5766
+ /** @description New metadata (deep merged) */
5534
5767
  metadata?: {
5535
5768
  [key: string]: unknown;
5536
5769
  };
5770
+ /** @description Additional properties to merge */
5771
+ properties?: {
5772
+ [key: string]: unknown;
5773
+ };
5774
+ /** @description Relationships to add or update */
5775
+ relationships_add?: {
5776
+ /**
5777
+ * @description Relationship predicate (e.g., "admin", "contains", "collection")
5778
+ * @example admin
5779
+ */
5780
+ predicate: string;
5781
+ /**
5782
+ * @description Target entity ID
5783
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
5784
+ */
5785
+ peer: string;
5786
+ /**
5787
+ * @description Target entity type hint
5788
+ * @example user
5789
+ */
5790
+ peer_type?: string;
5791
+ /**
5792
+ * @description Target entity label hint
5793
+ * @example Captain Ahab
5794
+ */
5795
+ peer_label?: string;
5796
+ /**
5797
+ * @description Properties to add/update on this relationship (deep merged if relationship exists)
5798
+ * @example {
5799
+ * "expires_at": "2025-12-31T00:00:00Z"
5800
+ * }
5801
+ */
5802
+ properties?: {
5803
+ [key: string]: unknown;
5804
+ };
5805
+ /** @description Properties to remove from this relationship (string array or nested object) */
5806
+ properties_remove?: string[] | {
5807
+ [key: string]: unknown;
5808
+ };
5809
+ }[];
5810
+ /** @description Relationships to remove */
5811
+ relationships_remove?: {
5812
+ /**
5813
+ * @description Relationship predicate
5814
+ * @example viewer
5815
+ */
5816
+ predicate: string;
5817
+ /**
5818
+ * @description Target entity ID. If omitted, removes ALL relationships with this predicate.
5819
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
5820
+ */
5821
+ peer?: string;
5822
+ }[];
5537
5823
  };
5538
5824
  AddChildResponse: {
5539
5825
  folder: components["schemas"]["FolderResponse"] & unknown;
@@ -5672,7 +5958,7 @@ type components = {
5672
5958
  */
5673
5959
  note?: string;
5674
5960
  /**
5675
- * @description Parent folder ID to add
5961
+ * @description Parent folder or collection ID to add
5676
5962
  * @example 01KDETYWYWM0MJVKM8DK3AEXPY
5677
5963
  */
5678
5964
  parent_id: string;
@@ -5952,11 +6238,6 @@ type components = {
5952
6238
  * @example OCR Processor
5953
6239
  */
5954
6240
  label: string;
5955
- /**
5956
- * @description Agent description
5957
- * @example Extracts text from scanned documents using OCR
5958
- */
5959
- description?: string;
5960
6241
  /**
5961
6242
  * Format: uri
5962
6243
  * @description Agent service base URL
@@ -5972,6 +6253,13 @@ type components = {
5972
6253
  * ]
5973
6254
  */
5974
6255
  actions_required: string[];
6256
+ /** @description Collection to place agent in */
6257
+ collection: string;
6258
+ /**
6259
+ * @description Agent description
6260
+ * @example Extracts text from scanned documents using OCR
6261
+ */
6262
+ description?: string;
5975
6263
  /** @description Sub-agents used by this orchestrator */
5976
6264
  uses_agents?: components["schemas"]["SubAgentRef"][];
5977
6265
  /** @description JSON Schema for input validation */
@@ -5982,8 +6270,20 @@ type components = {
5982
6270
  output_schema?: {
5983
6271
  [key: string]: unknown;
5984
6272
  };
5985
- /** @description Collection to place agent in */
5986
- collection: string;
6273
+ /** @description Additional properties to store */
6274
+ properties?: {
6275
+ [key: string]: unknown;
6276
+ };
6277
+ /** @description Relationships to create */
6278
+ relationships?: {
6279
+ predicate: string;
6280
+ peer: string;
6281
+ peer_type?: string;
6282
+ peer_label?: string;
6283
+ properties?: {
6284
+ [key: string]: unknown;
6285
+ };
6286
+ }[];
5987
6287
  };
5988
6288
  AgentUpdateResponse: components["schemas"]["AgentResponse"] & {
5989
6289
  /**
@@ -6021,6 +6321,12 @@ type components = {
6021
6321
  * ]
6022
6322
  */
6023
6323
  actions_required?: string[];
6324
+ /**
6325
+ * @description Agent status
6326
+ * @example development
6327
+ * @enum {string}
6328
+ */
6329
+ status?: "development" | "active" | "disabled";
6024
6330
  /** @description Updated sub-agents */
6025
6331
  uses_agents?: components["schemas"]["SubAgentRef"][];
6026
6332
  /** @description Updated input schema */
@@ -6031,12 +6337,59 @@ type components = {
6031
6337
  output_schema?: {
6032
6338
  [key: string]: unknown;
6033
6339
  };
6034
- /**
6035
- * @description Agent status
6036
- * @example development
6037
- * @enum {string}
6038
- */
6039
- status?: "development" | "active" | "disabled";
6340
+ /** @description Additional properties to merge */
6341
+ properties?: {
6342
+ [key: string]: unknown;
6343
+ };
6344
+ /** @description Relationships to add or update */
6345
+ relationships_add?: {
6346
+ /**
6347
+ * @description Relationship predicate (e.g., "admin", "contains", "collection")
6348
+ * @example admin
6349
+ */
6350
+ predicate: string;
6351
+ /**
6352
+ * @description Target entity ID
6353
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
6354
+ */
6355
+ peer: string;
6356
+ /**
6357
+ * @description Target entity type hint
6358
+ * @example user
6359
+ */
6360
+ peer_type?: string;
6361
+ /**
6362
+ * @description Target entity label hint
6363
+ * @example Captain Ahab
6364
+ */
6365
+ peer_label?: string;
6366
+ /**
6367
+ * @description Properties to add/update on this relationship (deep merged if relationship exists)
6368
+ * @example {
6369
+ * "expires_at": "2025-12-31T00:00:00Z"
6370
+ * }
6371
+ */
6372
+ properties?: {
6373
+ [key: string]: unknown;
6374
+ };
6375
+ /** @description Properties to remove from this relationship (string array or nested object) */
6376
+ properties_remove?: string[] | {
6377
+ [key: string]: unknown;
6378
+ };
6379
+ }[];
6380
+ /** @description Relationships to remove */
6381
+ relationships_remove?: {
6382
+ /**
6383
+ * @description Relationship predicate
6384
+ * @example viewer
6385
+ */
6386
+ predicate: string;
6387
+ /**
6388
+ * @description Target entity ID. If omitted, removes ALL relationships with this predicate.
6389
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
6390
+ */
6391
+ peer?: string;
6392
+ }[];
6040
6393
  };
6041
6394
  InvokeGrant: {
6042
6395
  agent: {