@nebula-ai/sdk 1.5.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -6
- package/dist/index.cjs +138 -79
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +210 -80
- package/dist/index.d.ts +210 -80
- package/dist/index.js +138 -79
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,11 +7,20 @@ health.
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
+
# Stable
|
|
10
11
|
npm install @nebula-ai/sdk
|
|
11
|
-
#
|
|
12
|
-
|
|
12
|
+
# Preview (next iteration, RC versions)
|
|
13
|
+
npm install @nebula-ai/sdk@next
|
|
13
14
|
```
|
|
14
15
|
|
|
16
|
+
> **Pre-launch:** The public surface is still being shaped. Plain
|
|
17
|
+
> semver releases (`1.6.0`, `1.7.0`, …) are stable and published to
|
|
18
|
+
> the `latest` dist-tag. Iteration happens on the `next` dist-tag
|
|
19
|
+
> as pre-release versions (`1.6.0-rc.1`, `-rc.2`, …). Caret ranges
|
|
20
|
+
> like `^1.6.0` never auto-pick pre-releases — semver excludes them
|
|
21
|
+
> unless you explicitly opt in. Stable consumers are insulated from
|
|
22
|
+
> the iteration channel by default.
|
|
23
|
+
|
|
15
24
|
## Quick start
|
|
16
25
|
|
|
17
26
|
```ts
|
|
@@ -38,10 +47,17 @@ a `memory_id` is present); prefer the resource methods for everything else.
|
|
|
38
47
|
|
|
39
48
|
## Auth
|
|
40
49
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
Pass either `apiKey` (for Nebula API keys) or `bearerToken` (for JWTs)
|
|
51
|
+
when constructing the client. If you pass an opaque-looking token via
|
|
52
|
+
`apiKey` (one that isn't prefixed with `key_` or `neb_`), the DX layer
|
|
53
|
+
automatically routes it through the `Authorization: Bearer` header
|
|
54
|
+
instead — handy when your app exchanges a workspace token for the SDK
|
|
55
|
+
and doesn't want to think about which header to use.
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
new Nebula({ apiKey: process.env.NEBULA_API_KEY });
|
|
59
|
+
new Nebula({ bearerToken: process.env.NEBULA_BEARER_TOKEN });
|
|
60
|
+
```
|
|
45
61
|
|
|
46
62
|
## Errors
|
|
47
63
|
|
package/dist/index.cjs
CHANGED
|
@@ -285,9 +285,8 @@ var ClientResource = class {
|
|
|
285
285
|
this.core = core;
|
|
286
286
|
}
|
|
287
287
|
/**
|
|
288
|
-
*
|
|
289
288
|
* Health probe
|
|
290
|
-
*
|
|
289
|
+
*
|
|
291
290
|
* Lightweight liveness probe. Returns a 200 with a fixed message when the API process is up. Does not verify downstream dependencies (database, storage, workers) — use the internal status endpoints for those.
|
|
292
291
|
* @operationId client.health
|
|
293
292
|
* @endpoint GET /v1/health
|
|
@@ -311,12 +310,11 @@ var CollectionsResource = class {
|
|
|
311
310
|
this.core = core;
|
|
312
311
|
}
|
|
313
312
|
/**
|
|
314
|
-
*
|
|
315
313
|
* Create a new collection
|
|
316
|
-
*
|
|
314
|
+
*
|
|
317
315
|
* Create a new collection and automatically add the creating user
|
|
318
316
|
* to it.
|
|
319
|
-
*
|
|
317
|
+
*
|
|
320
318
|
* This endpoint allows authenticated users to create a new collection
|
|
321
319
|
* with a specified name and optional description. The user creating
|
|
322
320
|
* the collection is automatically added as a member.
|
|
@@ -335,11 +333,10 @@ var CollectionsResource = class {
|
|
|
335
333
|
})).results;
|
|
336
334
|
}
|
|
337
335
|
/**
|
|
338
|
-
*
|
|
339
336
|
* Delete collection
|
|
340
|
-
*
|
|
337
|
+
*
|
|
341
338
|
* Delete an existing collection.
|
|
342
|
-
*
|
|
339
|
+
*
|
|
343
340
|
* This endpoint allows deletion of a collection identified by its
|
|
344
341
|
* UUID. The user must have appropriate permissions to delete the
|
|
345
342
|
* collection. Deleting a collection removes all associations but does
|
|
@@ -358,16 +355,15 @@ var CollectionsResource = class {
|
|
|
358
355
|
})).results;
|
|
359
356
|
}
|
|
360
357
|
/**
|
|
361
|
-
*
|
|
362
358
|
* List collections
|
|
363
|
-
*
|
|
359
|
+
*
|
|
364
360
|
* Returns a cursor-paginated list of collections the authenticated
|
|
365
361
|
* user has access to.
|
|
366
|
-
*
|
|
362
|
+
*
|
|
367
363
|
* Results can be filtered by providing specific collection IDs.
|
|
368
364
|
* Regular users will only see collections they own or have access to.
|
|
369
365
|
* Superusers can see all collections.
|
|
370
|
-
*
|
|
366
|
+
*
|
|
371
367
|
* The collections are returned in order of last modification, with
|
|
372
368
|
* most recent first.
|
|
373
369
|
* @operationId collections.list
|
|
@@ -391,11 +387,10 @@ var CollectionsResource = class {
|
|
|
391
387
|
});
|
|
392
388
|
}
|
|
393
389
|
/**
|
|
394
|
-
*
|
|
395
390
|
* Get collection details
|
|
396
|
-
*
|
|
391
|
+
*
|
|
397
392
|
* Get details of a specific collection.
|
|
398
|
-
*
|
|
393
|
+
*
|
|
399
394
|
* This endpoint retrieves detailed information about a single
|
|
400
395
|
* collection identified by its UUID. The user must have access to the
|
|
401
396
|
* collection to view its details.
|
|
@@ -413,11 +408,10 @@ var CollectionsResource = class {
|
|
|
413
408
|
})).results;
|
|
414
409
|
}
|
|
415
410
|
/**
|
|
416
|
-
*
|
|
417
411
|
* Get a collection by name
|
|
418
|
-
*
|
|
412
|
+
*
|
|
419
413
|
* Retrieve a collection by its (owner_id, name) combination.
|
|
420
|
-
*
|
|
414
|
+
*
|
|
421
415
|
* The authenticated user can only fetch collections they own, or, if
|
|
422
416
|
* superuser, from anyone.
|
|
423
417
|
* @operationId collections.retrieveByName
|
|
@@ -434,11 +428,10 @@ var CollectionsResource = class {
|
|
|
434
428
|
})).results;
|
|
435
429
|
}
|
|
436
430
|
/**
|
|
437
|
-
*
|
|
438
431
|
* Update collection
|
|
439
|
-
*
|
|
432
|
+
*
|
|
440
433
|
* Update an existing collection's configuration.
|
|
441
|
-
*
|
|
434
|
+
*
|
|
442
435
|
* This endpoint allows updating the name, description, and access settings of an
|
|
443
436
|
* existing collection. The user must have appropriate permissions to
|
|
444
437
|
* modify the collection.
|
|
@@ -465,9 +458,8 @@ var ConnectorsResource = class {
|
|
|
465
458
|
this.core = core;
|
|
466
459
|
}
|
|
467
460
|
/**
|
|
468
|
-
*
|
|
469
461
|
* Start OAuth connection flow
|
|
470
|
-
*
|
|
462
|
+
*
|
|
471
463
|
* Start the OAuth connection flow for the given external provider. Returns the authorization URL the user should visit to grant Nebula access. After consent the provider redirects back to Nebula and the connection becomes active.
|
|
472
464
|
* @operationId connectors.connect
|
|
473
465
|
* @endpoint POST /v1/connectors/{provider}/connect
|
|
@@ -484,9 +476,8 @@ var ConnectorsResource = class {
|
|
|
484
476
|
})).results;
|
|
485
477
|
}
|
|
486
478
|
/**
|
|
487
|
-
*
|
|
488
479
|
* Disconnect an external data source
|
|
489
|
-
*
|
|
480
|
+
*
|
|
490
481
|
* Disconnect the named connection, revoking the stored OAuth credentials and stopping future syncs. Optionally pass `delete_memories=true` to also remove every memory this connection had ingested.
|
|
491
482
|
* @operationId connectors.disconnect
|
|
492
483
|
* @endpoint DELETE /v1/connectors/{connection_id}
|
|
@@ -502,9 +493,8 @@ var ConnectorsResource = class {
|
|
|
502
493
|
})).results;
|
|
503
494
|
}
|
|
504
495
|
/**
|
|
505
|
-
*
|
|
506
496
|
* List active connections for a collection
|
|
507
|
-
*
|
|
497
|
+
*
|
|
508
498
|
* Return every connector connection associated with the given collection, with encrypted credentials redacted. Useful for showing the user which third-party data sources are wired up to a collection.
|
|
509
499
|
* @operationId connectors.list
|
|
510
500
|
* @endpoint GET /v1/connectors
|
|
@@ -520,9 +510,8 @@ var ConnectorsResource = class {
|
|
|
520
510
|
})).results;
|
|
521
511
|
}
|
|
522
512
|
/**
|
|
523
|
-
*
|
|
524
513
|
* List available connector providers
|
|
525
|
-
*
|
|
514
|
+
*
|
|
526
515
|
* Return the set of connector provider identifiers (e.g. `google_drive`, `slack`) that this Nebula instance is configured to expose. Pass one of these to `POST /connectors/{provider}/connect` to start an OAuth flow.
|
|
527
516
|
* @operationId connectors.listProviders
|
|
528
517
|
* @endpoint GET /v1/connectors/providers
|
|
@@ -538,9 +527,8 @@ var ConnectorsResource = class {
|
|
|
538
527
|
})).results;
|
|
539
528
|
}
|
|
540
529
|
/**
|
|
541
|
-
*
|
|
542
530
|
* Get a single connection by ID
|
|
543
|
-
*
|
|
531
|
+
*
|
|
544
532
|
* Fetch a single connector connection by its UUID. Returns the connection metadata plus whether the underlying subscription is active. Encrypted credentials are never returned to clients.
|
|
545
533
|
* @operationId connectors.retrieve
|
|
546
534
|
* @endpoint GET /v1/connectors/{connection_id}
|
|
@@ -556,9 +544,8 @@ var ConnectorsResource = class {
|
|
|
556
544
|
})).results;
|
|
557
545
|
}
|
|
558
546
|
/**
|
|
559
|
-
*
|
|
560
547
|
* Manually trigger a sync
|
|
561
|
-
*
|
|
548
|
+
*
|
|
562
549
|
* Schedule an immediate sync for an active connection, bypassing the normal cadence. Returns 409 if a sync is already in progress and 400 if the connection isn't in the `active` state.
|
|
563
550
|
* @operationId connectors.sync
|
|
564
551
|
* @endpoint POST /v1/connectors/{connection_id}/sync
|
|
@@ -582,15 +569,14 @@ var MemoriesResource = class {
|
|
|
582
569
|
this.core = core;
|
|
583
570
|
}
|
|
584
571
|
/**
|
|
585
|
-
*
|
|
586
572
|
* Append content to an engram
|
|
587
|
-
*
|
|
573
|
+
*
|
|
588
574
|
* Append content to an existing engram.
|
|
589
|
-
*
|
|
575
|
+
*
|
|
590
576
|
* **For conversation engrams:**
|
|
591
577
|
* - Provide `messages` array with content, role, and optional metadata
|
|
592
578
|
* - Works like `/conversations/{id}/messages` endpoint
|
|
593
|
-
*
|
|
579
|
+
*
|
|
594
580
|
* **For document engrams:**
|
|
595
581
|
* - Provide either `raw_text` or `chunks` to append additional content
|
|
596
582
|
* - Content will be processed and added to the engram
|
|
@@ -609,11 +595,10 @@ var MemoriesResource = class {
|
|
|
609
595
|
})).results;
|
|
610
596
|
}
|
|
611
597
|
/**
|
|
612
|
-
*
|
|
613
598
|
* Create a new memory (conversation or document)
|
|
614
|
-
*
|
|
599
|
+
*
|
|
615
600
|
* Create a new memory (conversation or document) using clean JSON body.
|
|
616
|
-
*
|
|
601
|
+
*
|
|
617
602
|
* - Use `collection_id` (UUID)
|
|
618
603
|
* - `kind` is optional and inferred from payload shape:
|
|
619
604
|
* - If `messages` present -> conversation
|
|
@@ -636,19 +621,18 @@ var MemoriesResource = class {
|
|
|
636
621
|
})).results;
|
|
637
622
|
}
|
|
638
623
|
/**
|
|
639
|
-
*
|
|
640
624
|
* Get presigned URL for large file upload
|
|
641
|
-
*
|
|
625
|
+
*
|
|
642
626
|
* Get a presigned URL for uploading large files directly to S3.
|
|
643
|
-
*
|
|
627
|
+
*
|
|
644
628
|
* Use this for files larger than 5MB that cannot be sent inline as base64.
|
|
645
629
|
* After uploading, reference the file in memory creation using S3FileReference.
|
|
646
|
-
*
|
|
630
|
+
*
|
|
647
631
|
* Args:
|
|
648
632
|
* filename: Original filename (e.g., "image.jpg")
|
|
649
633
|
* content_type: MIME type (e.g., "image/jpeg", "application/pdf")
|
|
650
634
|
* file_size: Expected file size in bytes (max 100MB)
|
|
651
|
-
*
|
|
635
|
+
*
|
|
652
636
|
* Returns:
|
|
653
637
|
* dict with:
|
|
654
638
|
* - upload_url: Presigned URL for PUT request (expires in 1 hour)
|
|
@@ -675,13 +659,12 @@ var MemoriesResource = class {
|
|
|
675
659
|
})).results;
|
|
676
660
|
}
|
|
677
661
|
/**
|
|
678
|
-
*
|
|
679
662
|
* Delete an engram
|
|
680
|
-
*
|
|
663
|
+
*
|
|
681
664
|
* Delete a specific engram with graph awareness. All chunks corresponding to the
|
|
682
665
|
* engram are deleted, and graph components (entities/relationships) are updated
|
|
683
666
|
* or deleted based on remaining chunk references from other engrams.
|
|
684
|
-
*
|
|
667
|
+
*
|
|
685
668
|
* This method now properly handles graph components and maintains graph integrity
|
|
686
669
|
* for search operations.
|
|
687
670
|
* @operationId memories.delete
|
|
@@ -698,17 +681,16 @@ var MemoriesResource = class {
|
|
|
698
681
|
})).results;
|
|
699
682
|
}
|
|
700
683
|
/**
|
|
701
|
-
*
|
|
702
684
|
* Delete one or more engrams
|
|
703
|
-
*
|
|
685
|
+
*
|
|
704
686
|
* Delete one or more engrams.
|
|
705
|
-
*
|
|
687
|
+
*
|
|
706
688
|
* This endpoint efficiently handles both single and batch deletions.
|
|
707
689
|
* When multiple IDs are provided, it uses optimized batch operations.
|
|
708
|
-
*
|
|
690
|
+
*
|
|
709
691
|
* Args:
|
|
710
692
|
* ids: Either a single UUID or a list of UUIDs to delete
|
|
711
|
-
*
|
|
693
|
+
*
|
|
712
694
|
* Returns:
|
|
713
695
|
* For single deletion: boolean success response
|
|
714
696
|
* For batch deletion: detailed results with successful and failed deletions
|
|
@@ -727,9 +709,8 @@ var MemoriesResource = class {
|
|
|
727
709
|
});
|
|
728
710
|
}
|
|
729
711
|
/**
|
|
730
|
-
*
|
|
731
712
|
* Delete a previously uploaded S3 file
|
|
732
|
-
*
|
|
713
|
+
*
|
|
733
714
|
* Delete a file from S3 that was uploaded via a presigned URL.
|
|
734
715
|
* Verifies the caller owns the file via S3 object metadata.
|
|
735
716
|
* @operationId memories.deleteUpload
|
|
@@ -746,16 +727,15 @@ var MemoriesResource = class {
|
|
|
746
727
|
})).results;
|
|
747
728
|
}
|
|
748
729
|
/**
|
|
749
|
-
*
|
|
750
730
|
* List engrams
|
|
751
|
-
*
|
|
731
|
+
*
|
|
752
732
|
* Returns a cursor-paginated list of engrams the authenticated user
|
|
753
733
|
* has access to.
|
|
754
|
-
*
|
|
734
|
+
*
|
|
755
735
|
* Results can be filtered by providing specific engram IDs or collection IDs.
|
|
756
736
|
* Regular users will only see engrams they own or have access to through
|
|
757
737
|
* collections. Superusers can see all engrams.
|
|
758
|
-
*
|
|
738
|
+
*
|
|
759
739
|
* The engrams are returned in order of creation time, most recent
|
|
760
740
|
* first. The response includes the engram's text field if available.
|
|
761
741
|
* @operationId memories.list
|
|
@@ -781,11 +761,10 @@ var MemoriesResource = class {
|
|
|
781
761
|
});
|
|
782
762
|
}
|
|
783
763
|
/**
|
|
784
|
-
*
|
|
785
764
|
* Recall workflow patterns by intent
|
|
786
|
-
*
|
|
765
|
+
*
|
|
787
766
|
* Workflow-pattern recall over 5 intents.
|
|
788
|
-
*
|
|
767
|
+
*
|
|
789
768
|
* * ``cursor`` -- match the caller's anchor against pattern
|
|
790
769
|
* canonical states, return ranked patterns + position.
|
|
791
770
|
* * ``predict`` -- like cursor but include the predicted next
|
|
@@ -809,15 +788,14 @@ var MemoriesResource = class {
|
|
|
809
788
|
})).results;
|
|
810
789
|
}
|
|
811
790
|
/**
|
|
812
|
-
*
|
|
813
791
|
* Retrieve an engram
|
|
814
|
-
*
|
|
792
|
+
*
|
|
815
793
|
* Retrieves detailed information about a specific engram by its
|
|
816
794
|
* ID.
|
|
817
|
-
*
|
|
795
|
+
*
|
|
818
796
|
* This endpoint returns the engram's metadata, status, and system information. It does not
|
|
819
797
|
* return the engram's content - use the `/engrams/{id}/download` endpoint for that.
|
|
820
|
-
*
|
|
798
|
+
*
|
|
821
799
|
* Users can only retrieve engrams they own or have access to through collections.
|
|
822
800
|
* Superusers can retrieve any engram.
|
|
823
801
|
* @operationId memories.retrieve
|
|
@@ -834,14 +812,13 @@ var MemoriesResource = class {
|
|
|
834
812
|
})).results;
|
|
835
813
|
}
|
|
836
814
|
/**
|
|
837
|
-
*
|
|
838
815
|
* Search memories
|
|
839
|
-
*
|
|
816
|
+
*
|
|
840
817
|
* Perform a search query across your memories.
|
|
841
|
-
*
|
|
818
|
+
*
|
|
842
819
|
* **Standard mode** (collection_ids or readable-scope search): returns hierarchical MemoryRecall
|
|
843
820
|
* with semantics, episodes, procedures, and sources.
|
|
844
|
-
*
|
|
821
|
+
*
|
|
845
822
|
* **Snapshot mode** (snapshot field): returns graph-search results with
|
|
846
823
|
* {entities, relationships} from stateless in-memory traversal.
|
|
847
824
|
* @operationId memories.search
|
|
@@ -859,20 +836,19 @@ var MemoriesResource = class {
|
|
|
859
836
|
})).results;
|
|
860
837
|
}
|
|
861
838
|
/**
|
|
862
|
-
*
|
|
863
839
|
* Update a memory
|
|
864
|
-
*
|
|
840
|
+
*
|
|
865
841
|
* Update memory-level properties including name, metadata, and collection associations.
|
|
866
|
-
*
|
|
842
|
+
*
|
|
867
843
|
* This endpoint allows updating properties of an entire memory (document or conversation)
|
|
868
844
|
* without modifying its content:
|
|
869
845
|
* - **name**: Updates the authoritative engram title
|
|
870
846
|
* - **metadata**: Can replace or merge with existing metadata
|
|
871
847
|
* - **collection_ids**: Updates authoritative engram collection associations
|
|
872
|
-
*
|
|
848
|
+
*
|
|
873
849
|
* Users can only update memories they own or have access to through collections.
|
|
874
850
|
* At least one collection association must be maintained.
|
|
875
|
-
*
|
|
851
|
+
*
|
|
876
852
|
* If collection_id is provided and the engram is shared across collections, a copy-on-write
|
|
877
853
|
* will be performed to create a collection-specific copy before modification.
|
|
878
854
|
* @operationId memories.update
|
|
@@ -898,9 +874,8 @@ var SnapshotsResource = class {
|
|
|
898
874
|
this.core = core;
|
|
899
875
|
}
|
|
900
876
|
/**
|
|
901
|
-
*
|
|
902
877
|
* Export a collection snapshot
|
|
903
|
-
*
|
|
878
|
+
*
|
|
904
879
|
* Export a collection's full graph state as a
|
|
905
880
|
* portable SnapshotEnvelope.
|
|
906
881
|
* @operationId snapshots.export
|
|
@@ -918,9 +893,8 @@ var SnapshotsResource = class {
|
|
|
918
893
|
})).results;
|
|
919
894
|
}
|
|
920
895
|
/**
|
|
921
|
-
*
|
|
922
896
|
* Import a snapshot into an ephemeral collection
|
|
923
|
-
*
|
|
897
|
+
*
|
|
924
898
|
* Import a SnapshotEnvelope into an ephemeral
|
|
925
899
|
* collection. Returns the ephemeral collection UUID.
|
|
926
900
|
* @operationId snapshots.import
|
|
@@ -939,6 +913,89 @@ var SnapshotsResource = class {
|
|
|
939
913
|
}
|
|
940
914
|
};
|
|
941
915
|
//#endregion
|
|
916
|
+
//#region src/resources/workspaces.ts
|
|
917
|
+
var WorkspacesResource = class {
|
|
918
|
+
core;
|
|
919
|
+
constructor(core) {
|
|
920
|
+
this.core = core;
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* Create workspace storage target
|
|
924
|
+
*
|
|
925
|
+
* Register a customer S3 bucket for hosted BYOC storage.
|
|
926
|
+
* @operationId workspaces.createStorageTarget
|
|
927
|
+
* @endpoint POST /v1/workspaces/{workspace_id}/storage-targets
|
|
928
|
+
*/
|
|
929
|
+
async createStorageTarget(params, options) {
|
|
930
|
+
return (await this.core.request({
|
|
931
|
+
method: "POST",
|
|
932
|
+
path: "/v1/workspaces/{workspace_id}/storage-targets",
|
|
933
|
+
pathParams: { workspace_id: params.workspaceId },
|
|
934
|
+
query: void 0,
|
|
935
|
+
body: params.body,
|
|
936
|
+
idempotent: false,
|
|
937
|
+
signal: options?.signal
|
|
938
|
+
})).results;
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Disable workspace storage target
|
|
942
|
+
*
|
|
943
|
+
* Disable a customer storage target for future collection binds.
|
|
944
|
+
* @operationId workspaces.disableStorageTarget
|
|
945
|
+
* @endpoint DELETE /v1/workspaces/{workspace_id}/storage-targets/{target_id}
|
|
946
|
+
*/
|
|
947
|
+
async disableStorageTarget(params, options) {
|
|
948
|
+
return (await this.core.request({
|
|
949
|
+
method: "DELETE",
|
|
950
|
+
path: "/v1/workspaces/{workspace_id}/storage-targets/{target_id}",
|
|
951
|
+
pathParams: {
|
|
952
|
+
workspace_id: params.workspaceId,
|
|
953
|
+
target_id: params.targetId
|
|
954
|
+
},
|
|
955
|
+
query: void 0,
|
|
956
|
+
idempotent: false,
|
|
957
|
+
signal: options?.signal
|
|
958
|
+
})).results;
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* List workspace storage targets
|
|
962
|
+
*
|
|
963
|
+
* List customer-owned object storage targets for a workspace.
|
|
964
|
+
* @operationId workspaces.listStorageTargets
|
|
965
|
+
* @endpoint GET /v1/workspaces/{workspace_id}/storage-targets
|
|
966
|
+
*/
|
|
967
|
+
async listStorageTargets(workspaceId, options) {
|
|
968
|
+
return (await this.core.request({
|
|
969
|
+
method: "GET",
|
|
970
|
+
path: "/v1/workspaces/{workspace_id}/storage-targets",
|
|
971
|
+
pathParams: { workspace_id: workspaceId },
|
|
972
|
+
query: void 0,
|
|
973
|
+
idempotent: true,
|
|
974
|
+
signal: options?.signal
|
|
975
|
+
})).results;
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
978
|
+
* Validate workspace storage target
|
|
979
|
+
*
|
|
980
|
+
* Probe a customer storage target and mark it active on success.
|
|
981
|
+
* @operationId workspaces.validateStorageTarget
|
|
982
|
+
* @endpoint POST /v1/workspaces/{workspace_id}/storage-targets/{target_id}/validate
|
|
983
|
+
*/
|
|
984
|
+
async validateStorageTarget(params, options) {
|
|
985
|
+
return (await this.core.request({
|
|
986
|
+
method: "POST",
|
|
987
|
+
path: "/v1/workspaces/{workspace_id}/storage-targets/{target_id}/validate",
|
|
988
|
+
pathParams: {
|
|
989
|
+
workspace_id: params.workspaceId,
|
|
990
|
+
target_id: params.targetId
|
|
991
|
+
},
|
|
992
|
+
query: void 0,
|
|
993
|
+
idempotent: false,
|
|
994
|
+
signal: options?.signal
|
|
995
|
+
})).results;
|
|
996
|
+
}
|
|
997
|
+
};
|
|
998
|
+
//#endregion
|
|
942
999
|
//#region src/client.ts
|
|
943
1000
|
var NebulaClient = class {
|
|
944
1001
|
core;
|
|
@@ -947,6 +1004,7 @@ var NebulaClient = class {
|
|
|
947
1004
|
connectors;
|
|
948
1005
|
memories;
|
|
949
1006
|
snapshots;
|
|
1007
|
+
workspaces;
|
|
950
1008
|
constructor(options = {}) {
|
|
951
1009
|
this.core = new NebulaCore(options);
|
|
952
1010
|
this.client = new ClientResource(this.core);
|
|
@@ -954,6 +1012,7 @@ var NebulaClient = class {
|
|
|
954
1012
|
this.connectors = new ConnectorsResource(this.core);
|
|
955
1013
|
this.memories = new MemoriesResource(this.core);
|
|
956
1014
|
this.snapshots = new SnapshotsResource(this.core);
|
|
1015
|
+
this.workspaces = new WorkspacesResource(this.core);
|
|
957
1016
|
}
|
|
958
1017
|
};
|
|
959
1018
|
//#endregion
|