@getzep/zep-cloud 3.0.4 → 3.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.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/errors/index.d.ts +1 -1
- package/dist/cjs/api/errors/index.js +1 -1
- package/dist/cjs/api/resources/graph/client/Client.d.ts +21 -19
- package/dist/cjs/api/resources/graph/client/Client.js +81 -62
- package/dist/cjs/api/resources/graph/client/requests/EntityTypeRequest.d.ts +2 -0
- package/dist/cjs/api/resources/graph/client/requests/GraphListEntityTypesRequest.d.ts +17 -0
- package/dist/cjs/api/resources/graph/client/requests/GraphListEntityTypesRequest.js +5 -0
- package/dist/cjs/api/resources/graph/client/requests/index.d.ts +2 -1
- package/dist/cjs/serialization/resources/graph/client/requests/EntityTypeRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/graph/client/requests/EntityTypeRequest.js +2 -0
- package/dist/cjs/serialization/resources/graph/client/requests/index.d.ts +1 -1
- package/dist/cjs/serialization/resources/graph/client/requests/index.js +3 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrapper/graph.d.ts +14 -7
- package/dist/cjs/wrapper/graph.js +12 -8
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/errors/index.d.mts +1 -1
- package/dist/esm/api/errors/index.mjs +1 -1
- package/dist/esm/api/resources/graph/client/Client.d.mts +21 -19
- package/dist/esm/api/resources/graph/client/Client.mjs +81 -62
- package/dist/esm/api/resources/graph/client/requests/EntityTypeRequest.d.mts +2 -0
- package/dist/esm/api/resources/graph/client/requests/GraphListEntityTypesRequest.d.mts +17 -0
- package/dist/esm/api/resources/graph/client/requests/GraphListEntityTypesRequest.mjs +4 -0
- package/dist/esm/api/resources/graph/client/requests/index.d.mts +2 -1
- package/dist/esm/serialization/resources/graph/client/requests/EntityTypeRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/graph/client/requests/EntityTypeRequest.mjs +2 -0
- package/dist/esm/serialization/resources/graph/client/requests/index.d.mts +1 -1
- package/dist/esm/serialization/resources/graph/client/requests/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/esm/wrapper/graph.d.mts +14 -7
- package/dist/esm/wrapper/graph.mjs +12 -8
- package/package.json +1 -1
- package/reference.md +26 -18
|
@@ -11,10 +11,11 @@ import { Graph as BaseGraph } from "../api/resources/graph/client/Client.mjs";
|
|
|
11
11
|
import { entityModelToAPISchema, edgeModelToAPISchema } from "./ontology.mjs";
|
|
12
12
|
export class Graph extends BaseGraph {
|
|
13
13
|
/**
|
|
14
|
-
* Sets the entity and edge types for
|
|
14
|
+
* Sets the entity and edge types for the specified targets, replacing any existing ones in those targets. If no targets are specified, it sets the ontology for the entire project.
|
|
15
15
|
*
|
|
16
16
|
* @param {Record<string, EntityType>} entityTypes
|
|
17
17
|
* @param {Record<string, EdgeType>} edgeTypes
|
|
18
|
+
* @param {OntologyTargets} [ontologyTargets] - The targets for which to set the ontology. Can include userIds or graphIds. If none specified, sets for the entire project.
|
|
18
19
|
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
20
|
*
|
|
20
21
|
* @throws {@link Zep.BadRequestError}
|
|
@@ -46,9 +47,9 @@ export class Graph extends BaseGraph {
|
|
|
46
47
|
* TravelDestination: travelDestinationSchema,
|
|
47
48
|
* }, {
|
|
48
49
|
* IS_TRAVELING_TO: isTravelingTo,
|
|
49
|
-
* });
|
|
50
|
+
* }, {userIds: ['user_1234']});
|
|
50
51
|
*/
|
|
51
|
-
setEntityTypes(entityTypes, edgeTypes, requestOptions) {
|
|
52
|
+
setEntityTypes(entityTypes, edgeTypes, ontologyTargets, requestOptions) {
|
|
52
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
54
|
const validatedEntityTypes = Object.keys(entityTypes).map((key) => {
|
|
54
55
|
const schema = entityTypes[key];
|
|
@@ -61,14 +62,17 @@ export class Graph extends BaseGraph {
|
|
|
61
62
|
return this.setEntityTypesInternal({
|
|
62
63
|
entityTypes: validatedEntityTypes,
|
|
63
64
|
edgeTypes: validatedEdgeTypes,
|
|
65
|
+
userIds: ontologyTargets === null || ontologyTargets === void 0 ? void 0 : ontologyTargets.userIds,
|
|
66
|
+
graphIds: ontologyTargets === null || ontologyTargets === void 0 ? void 0 : ontologyTargets.graphIds,
|
|
64
67
|
}, requestOptions);
|
|
65
68
|
});
|
|
66
69
|
}
|
|
67
70
|
/**
|
|
68
|
-
* Sets the entity and edge types for
|
|
71
|
+
* Sets the entity and edge types for the specified targets, replacing any existing ones in those targets. If no targets are specified, it sets the ontology for the entire project.
|
|
69
72
|
*
|
|
70
73
|
* @param {Record<string, EntityType>} entityTypes
|
|
71
74
|
* @param {Record<string, EdgeType>} edgeTypes
|
|
75
|
+
* @param {OntologyTargets} [ontologyTargets] - The targets for which to set the ontology. Can include userIds or graphIds. If none specified, sets for the entire project.
|
|
72
76
|
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
73
77
|
*
|
|
74
78
|
* @throws {@link Zep.BadRequestError}
|
|
@@ -96,15 +100,15 @@ export class Graph extends BaseGraph {
|
|
|
96
100
|
* ]
|
|
97
101
|
* }
|
|
98
102
|
*
|
|
99
|
-
* await client.graph.
|
|
103
|
+
* await client.graph.setEntityTypes({
|
|
100
104
|
* TravelDestination: travelDestinationSchema,
|
|
101
105
|
* }, {
|
|
102
106
|
* IS_TRAVELING_TO: isTravelingTo,
|
|
103
|
-
* });
|
|
107
|
+
* }, {userIds: ['user_1234']});
|
|
104
108
|
*/
|
|
105
|
-
setOntology(entityTypes, edgeTypes, requestOptions) {
|
|
109
|
+
setOntology(entityTypes, edgeTypes, ontologyTargets, requestOptions) {
|
|
106
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
return this.setEntityTypes(entityTypes, edgeTypes, requestOptions);
|
|
111
|
+
return this.setEntityTypes(entityTypes, edgeTypes, ontologyTargets, requestOptions);
|
|
108
112
|
});
|
|
109
113
|
}
|
|
110
114
|
}
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Graph
|
|
4
4
|
|
|
5
|
-
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">listEntityTypes</a>() -> Zep.EntityTypeResponse</code></summary>
|
|
5
|
+
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">listEntityTypes</a>({ ...params }) -> Zep.EntityTypeResponse</code></summary>
|
|
6
6
|
<dl>
|
|
7
7
|
<dd>
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<dl>
|
|
15
15
|
<dd>
|
|
16
16
|
|
|
17
|
-
Returns all entity types for a project.
|
|
17
|
+
Returns all entity types for a project, user, or graph.
|
|
18
18
|
|
|
19
19
|
</dd>
|
|
20
20
|
</dl>
|
|
@@ -46,6 +46,14 @@ await client.graph.listEntityTypes();
|
|
|
46
46
|
<dl>
|
|
47
47
|
<dd>
|
|
48
48
|
|
|
49
|
+
**request:** `Zep.GraphListEntityTypesRequest`
|
|
50
|
+
|
|
51
|
+
</dd>
|
|
52
|
+
</dl>
|
|
53
|
+
|
|
54
|
+
<dl>
|
|
55
|
+
<dd>
|
|
56
|
+
|
|
49
57
|
**requestOptions:** `Graph.RequestOptions`
|
|
50
58
|
|
|
51
59
|
</dd>
|
|
@@ -69,7 +77,7 @@ await client.graph.listEntityTypes();
|
|
|
69
77
|
<dl>
|
|
70
78
|
<dd>
|
|
71
79
|
|
|
72
|
-
Sets the entity types for
|
|
80
|
+
Sets the entity types for multiple users and graphs, replacing any existing ones.
|
|
73
81
|
|
|
74
82
|
</dd>
|
|
75
83
|
</dl>
|
|
@@ -386,7 +394,7 @@ await client.graph.clone();
|
|
|
386
394
|
</dl>
|
|
387
395
|
</details>
|
|
388
396
|
|
|
389
|
-
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">
|
|
397
|
+
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">create</a>({ ...params }) -> Zep.Graph</code></summary>
|
|
390
398
|
<dl>
|
|
391
399
|
<dd>
|
|
392
400
|
|
|
@@ -398,7 +406,7 @@ await client.graph.clone();
|
|
|
398
406
|
<dl>
|
|
399
407
|
<dd>
|
|
400
408
|
|
|
401
|
-
|
|
409
|
+
Creates a new graph.
|
|
402
410
|
|
|
403
411
|
</dd>
|
|
404
412
|
</dl>
|
|
@@ -414,8 +422,8 @@ Perform a graph search query.
|
|
|
414
422
|
<dd>
|
|
415
423
|
|
|
416
424
|
```typescript
|
|
417
|
-
await client.graph.
|
|
418
|
-
|
|
425
|
+
await client.graph.create({
|
|
426
|
+
graphId: "graph_id",
|
|
419
427
|
});
|
|
420
428
|
```
|
|
421
429
|
|
|
@@ -432,7 +440,7 @@ await client.graph.search({
|
|
|
432
440
|
<dl>
|
|
433
441
|
<dd>
|
|
434
442
|
|
|
435
|
-
**request:** `Zep.
|
|
443
|
+
**request:** `Zep.CreateGraphRequest`
|
|
436
444
|
|
|
437
445
|
</dd>
|
|
438
446
|
</dl>
|
|
@@ -451,7 +459,7 @@ await client.graph.search({
|
|
|
451
459
|
</dl>
|
|
452
460
|
</details>
|
|
453
461
|
|
|
454
|
-
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">
|
|
462
|
+
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">listAll</a>({ ...params }) -> Zep.GraphListResponse</code></summary>
|
|
455
463
|
<dl>
|
|
456
464
|
<dd>
|
|
457
465
|
|
|
@@ -463,7 +471,7 @@ await client.graph.search({
|
|
|
463
471
|
<dl>
|
|
464
472
|
<dd>
|
|
465
473
|
|
|
466
|
-
|
|
474
|
+
Returns all graphs.
|
|
467
475
|
|
|
468
476
|
</dd>
|
|
469
477
|
</dl>
|
|
@@ -479,9 +487,7 @@ Creates a new graph.
|
|
|
479
487
|
<dd>
|
|
480
488
|
|
|
481
489
|
```typescript
|
|
482
|
-
await client.graph.
|
|
483
|
-
graphId: "graph_id",
|
|
484
|
-
});
|
|
490
|
+
await client.graph.listAll();
|
|
485
491
|
```
|
|
486
492
|
|
|
487
493
|
</dd>
|
|
@@ -497,7 +503,7 @@ await client.graph.create({
|
|
|
497
503
|
<dl>
|
|
498
504
|
<dd>
|
|
499
505
|
|
|
500
|
-
**request:** `Zep.
|
|
506
|
+
**request:** `Zep.GraphListAllRequest`
|
|
501
507
|
|
|
502
508
|
</dd>
|
|
503
509
|
</dl>
|
|
@@ -516,7 +522,7 @@ await client.graph.create({
|
|
|
516
522
|
</dl>
|
|
517
523
|
</details>
|
|
518
524
|
|
|
519
|
-
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">
|
|
525
|
+
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">search</a>({ ...params }) -> Zep.GraphSearchResults</code></summary>
|
|
520
526
|
<dl>
|
|
521
527
|
<dd>
|
|
522
528
|
|
|
@@ -528,7 +534,7 @@ await client.graph.create({
|
|
|
528
534
|
<dl>
|
|
529
535
|
<dd>
|
|
530
536
|
|
|
531
|
-
|
|
537
|
+
Perform a graph search query.
|
|
532
538
|
|
|
533
539
|
</dd>
|
|
534
540
|
</dl>
|
|
@@ -544,7 +550,9 @@ Returns all graphs.
|
|
|
544
550
|
<dd>
|
|
545
551
|
|
|
546
552
|
```typescript
|
|
547
|
-
await client.graph.
|
|
553
|
+
await client.graph.search({
|
|
554
|
+
query: "query",
|
|
555
|
+
});
|
|
548
556
|
```
|
|
549
557
|
|
|
550
558
|
</dd>
|
|
@@ -560,7 +568,7 @@ await client.graph.listAll();
|
|
|
560
568
|
<dl>
|
|
561
569
|
<dd>
|
|
562
570
|
|
|
563
|
-
**request:** `Zep.
|
|
571
|
+
**request:** `Zep.GraphSearchQuery`
|
|
564
572
|
|
|
565
573
|
</dd>
|
|
566
574
|
</dl>
|