@papr/memory 1.16.0 → 1.18.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/CHANGELOG.md +53 -0
- package/README.md +29 -0
- package/client.d.mts +14 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +14 -4
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/internal/tslib.js +22 -22
- package/internal/utils/values.js +3 -3
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +3 -3
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/document.d.mts +119 -0
- package/resources/document.d.mts.map +1 -0
- package/resources/document.d.ts +119 -0
- package/resources/document.d.ts.map +1 -0
- package/resources/document.js +40 -0
- package/resources/document.js.map +1 -0
- package/resources/document.mjs +36 -0
- package/resources/document.mjs.map +1 -0
- package/resources/feedback.d.mts +20 -0
- package/resources/feedback.d.mts.map +1 -1
- package/resources/feedback.d.ts +20 -0
- package/resources/feedback.d.ts.map +1 -1
- package/resources/graphql.d.mts +52 -0
- package/resources/graphql.d.mts.map +1 -0
- package/resources/graphql.d.ts +52 -0
- package/resources/graphql.d.ts.map +1 -0
- package/resources/graphql.js +54 -0
- package/resources/graphql.js.map +1 -0
- package/resources/graphql.mjs +50 -0
- package/resources/graphql.mjs.map +1 -0
- package/resources/index.d.mts +6 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/memory.d.mts +373 -270
- package/resources/memory.d.mts.map +1 -1
- package/resources/memory.d.ts +373 -270
- package/resources/memory.d.ts.map +1 -1
- package/resources/memory.js +29 -4
- package/resources/memory.js.map +1 -1
- package/resources/memory.mjs +29 -4
- package/resources/memory.mjs.map +1 -1
- package/resources/schemas.d.mts +404 -0
- package/resources/schemas.d.mts.map +1 -0
- package/resources/schemas.d.ts +404 -0
- package/resources/schemas.d.ts.map +1 -0
- package/resources/schemas.js +127 -0
- package/resources/schemas.js.map +1 -0
- package/resources/schemas.mjs +123 -0
- package/resources/schemas.mjs.map +1 -0
- package/resources/shared.d.mts +10 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +10 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/user.d.mts +1 -18
- package/resources/user.d.mts.map +1 -1
- package/resources/user.d.ts +1 -18
- package/resources/user.d.ts.map +1 -1
- package/resources/user.js +0 -11
- package/resources/user.js.map +1 -1
- package/resources/user.mjs +0 -11
- package/resources/user.mjs.map +1 -1
- package/src/client.ts +61 -2
- package/src/internal/to-file.ts +1 -1
- package/src/internal/utils/values.ts +3 -3
- package/src/resources/document.ts +164 -0
- package/src/resources/feedback.ts +24 -0
- package/src/resources/graphql.ts +65 -0
- package/src/resources/index.ts +24 -1
- package/src/resources/memory.ts +418 -492
- package/src/resources/schemas.ts +541 -0
- package/src/resources/shared.ts +14 -0
- package/src/resources/user.ts +0 -23
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Schemas extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new user-defined graph schema.
|
|
11
|
+
*
|
|
12
|
+
* This endpoint allows users to define custom node types and relationships for their knowledge graph.
|
|
13
|
+
* The schema will be validated and stored for use in future memory extractions.
|
|
14
|
+
*
|
|
15
|
+
* **Features:**
|
|
16
|
+
* - Define custom node types with properties and validation rules
|
|
17
|
+
* - Define custom relationship types with constraints
|
|
18
|
+
* - Automatic validation against system schemas
|
|
19
|
+
* - Support for different scopes (personal, workspace, organization)
|
|
20
|
+
* - **Enum support**: Use `enum_values` to restrict property values to a predefined list (max 10 values)
|
|
21
|
+
* - **Auto-indexing**: Required properties are automatically indexed in Neo4j for optimal query performance
|
|
22
|
+
*
|
|
23
|
+
* **Property Types & Validation:**
|
|
24
|
+
* - `string`: Text values with optional `enum_values`, `min_length`, `max_length`, `pattern`
|
|
25
|
+
* - `integer`: Whole numbers with optional `min_value`, `max_value`
|
|
26
|
+
* - `float`: Decimal numbers with optional `min_value`, `max_value`
|
|
27
|
+
* - `boolean`: True/false values
|
|
28
|
+
* - `datetime`: ISO 8601 timestamp strings
|
|
29
|
+
* - `array`: Lists of values
|
|
30
|
+
* - `object`: Complex nested objects
|
|
31
|
+
*
|
|
32
|
+
* **Enum Values:**
|
|
33
|
+
* - Add `enum_values` to any string property to restrict values to a predefined list
|
|
34
|
+
* - Maximum 10 enum values allowed per property
|
|
35
|
+
* - Use with `default` to set a default enum value
|
|
36
|
+
* - Example: `"enum_values": ["small", "medium", "large"]`
|
|
37
|
+
*
|
|
38
|
+
* **When to Use Enums:**
|
|
39
|
+
* - Limited, well-defined options (≤10 values): sizes, statuses, categories, priorities
|
|
40
|
+
* - Controlled vocabularies: "active/inactive", "high/medium/low", "bronze/silver/gold"
|
|
41
|
+
* - When you want exact matching and no variations
|
|
42
|
+
*
|
|
43
|
+
* **When to Avoid Enums:**
|
|
44
|
+
* - Open-ended text fields: names, titles, descriptions, addresses
|
|
45
|
+
* - Large sets of options (>10): countries, cities, product models
|
|
46
|
+
* - When you want semantic similarity matching for entity resolution
|
|
47
|
+
* - Dynamic or frequently changing value sets
|
|
48
|
+
*
|
|
49
|
+
* **Unique Identifiers & Entity Resolution:**
|
|
50
|
+
* - Properties marked as `unique_identifiers` are used for entity deduplication and merging
|
|
51
|
+
* - **With enum_values**: Exact matching is used - entities with the same enum value are considered identical
|
|
52
|
+
* - **Without enum_values**: Semantic similarity matching is used - entities with similar meanings are automatically merged
|
|
53
|
+
* - Example: A "name" unique_identifier without enums will merge "Apple Inc" and "Apple Inc." as the same entity
|
|
54
|
+
* - Example: A "sku" unique_identifier with enums will only merge entities with exactly matching SKU codes
|
|
55
|
+
* - Use enums for unique_identifiers when you have a limited, predefined set of values (≤10 options)
|
|
56
|
+
* - Avoid enums for unique_identifiers when you have broad, open-ended values or >10 possible options
|
|
57
|
+
* - **Best practices**: Use enums for controlled vocabularies (status codes, categories), avoid for open text (company names, product titles)
|
|
58
|
+
* - **In the example above**: "name" uses semantic similarity (open-ended), "sku" uses exact matching (controlled set)
|
|
59
|
+
*
|
|
60
|
+
* **LLM-Friendly Descriptions:**
|
|
61
|
+
* - Write detailed property descriptions that guide the LLM on expected formats and usage
|
|
62
|
+
* - Include examples of typical values (e.g., "Product name, typically 2-4 words like 'iPhone 15 Pro'")
|
|
63
|
+
* - Specify data formats and constraints clearly (e.g., "Price in USD as decimal number")
|
|
64
|
+
* - For enums, explain when to use each option (e.g., "use 'new' for brand new items")
|
|
65
|
+
*
|
|
66
|
+
* **Authentication Required**:
|
|
67
|
+
* One of the following authentication methods must be used:
|
|
68
|
+
* - Bearer token in `Authorization` header
|
|
69
|
+
* - API Key in `X-API-Key` header
|
|
70
|
+
* - Session token in `X-Session-Token` header
|
|
71
|
+
*
|
|
72
|
+
* **Required Headers**:
|
|
73
|
+
* - Content-Type: application/json
|
|
74
|
+
* - X-Client-Type: (e.g., 'papr_plugin', 'browser_extension')
|
|
75
|
+
*/
|
|
76
|
+
create(body: SchemaCreateParams, options?: RequestOptions): APIPromise<SchemaCreateResponse> {
|
|
77
|
+
return this._client.post('/v1/schemas', { body, ...options });
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get a specific schema by ID.
|
|
82
|
+
*
|
|
83
|
+
* Returns the complete schema definition including node types, relationship types,
|
|
84
|
+
* and metadata. User must have read access to the schema.
|
|
85
|
+
*/
|
|
86
|
+
retrieve(schemaID: string, options?: RequestOptions): APIPromise<SchemaRetrieveResponse> {
|
|
87
|
+
return this._client.get(path`/v1/schemas/${schemaID}`, options);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Update an existing schema.
|
|
92
|
+
*
|
|
93
|
+
* Allows modification of schema properties, node types, and relationship types.
|
|
94
|
+
* User must have write access to the schema. Updates create a new version
|
|
95
|
+
* while preserving the existing data.
|
|
96
|
+
*/
|
|
97
|
+
update(
|
|
98
|
+
schemaID: string,
|
|
99
|
+
params: SchemaUpdateParams,
|
|
100
|
+
options?: RequestOptions,
|
|
101
|
+
): APIPromise<SchemaUpdateResponse> {
|
|
102
|
+
const { body } = params;
|
|
103
|
+
return this._client.put(path`/v1/schemas/${schemaID}`, { body: body, ...options });
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* List all schemas accessible to the authenticated user.
|
|
108
|
+
*
|
|
109
|
+
* Returns schemas that the user owns or has read access to, including:
|
|
110
|
+
* - Personal schemas created by the user
|
|
111
|
+
* - Workspace schemas shared within the user's workspace
|
|
112
|
+
* - Organization schemas available to the user's organization
|
|
113
|
+
*
|
|
114
|
+
* **Authentication Required**:
|
|
115
|
+
* One of the following authentication methods must be used:
|
|
116
|
+
* - Bearer token in `Authorization` header
|
|
117
|
+
* - API Key in `X-API-Key` header
|
|
118
|
+
* - Session token in `X-Session-Token` header
|
|
119
|
+
*/
|
|
120
|
+
list(
|
|
121
|
+
query: SchemaListParams | null | undefined = {},
|
|
122
|
+
options?: RequestOptions,
|
|
123
|
+
): APIPromise<SchemaListResponse> {
|
|
124
|
+
return this._client.get('/v1/schemas', { query, ...options });
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Delete a schema.
|
|
129
|
+
*
|
|
130
|
+
* Soft deletes the schema by marking it as archived. The schema data and
|
|
131
|
+
* associated graph nodes/relationships are preserved for data integrity.
|
|
132
|
+
* User must have write access to the schema.
|
|
133
|
+
*/
|
|
134
|
+
delete(schemaID: string, options?: RequestOptions): APIPromise<unknown> {
|
|
135
|
+
return this._client.delete(path`/v1/schemas/${schemaID}`, options);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Complete user-defined graph schema
|
|
141
|
+
*/
|
|
142
|
+
export interface UserGraphSchemaOutput {
|
|
143
|
+
name: string;
|
|
144
|
+
|
|
145
|
+
id?: string;
|
|
146
|
+
|
|
147
|
+
created_at?: string;
|
|
148
|
+
|
|
149
|
+
description?: string | null;
|
|
150
|
+
|
|
151
|
+
last_used_at?: string | null;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Custom node types (max 15 per schema)
|
|
155
|
+
*/
|
|
156
|
+
node_types?: { [key: string]: UserGraphSchemaOutput.NodeTypes };
|
|
157
|
+
|
|
158
|
+
organization_id?: string | null;
|
|
159
|
+
|
|
160
|
+
read_access?: Array<string>;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Custom relationship types (max 20 per schema)
|
|
164
|
+
*/
|
|
165
|
+
relationship_types?: { [key: string]: UserGraphSchemaOutput.RelationshipTypes };
|
|
166
|
+
|
|
167
|
+
scope?: 'personal' | 'workspace' | 'organization';
|
|
168
|
+
|
|
169
|
+
status?: 'draft' | 'active' | 'deprecated' | 'archived';
|
|
170
|
+
|
|
171
|
+
updated_at?: string | null;
|
|
172
|
+
|
|
173
|
+
usage_count?: number;
|
|
174
|
+
|
|
175
|
+
user_id?: string | { [key: string]: unknown } | null;
|
|
176
|
+
|
|
177
|
+
version?: string;
|
|
178
|
+
|
|
179
|
+
workspace_id?: string | { [key: string]: unknown } | null;
|
|
180
|
+
|
|
181
|
+
write_access?: Array<string>;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export namespace UserGraphSchemaOutput {
|
|
185
|
+
/**
|
|
186
|
+
* User-defined node type
|
|
187
|
+
*/
|
|
188
|
+
export interface NodeTypes {
|
|
189
|
+
label: string;
|
|
190
|
+
|
|
191
|
+
name: string;
|
|
192
|
+
|
|
193
|
+
color?: string | null;
|
|
194
|
+
|
|
195
|
+
description?: string | null;
|
|
196
|
+
|
|
197
|
+
icon?: string | null;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Node properties (max 15 per node type)
|
|
201
|
+
*/
|
|
202
|
+
properties?: { [key: string]: NodeTypes.Properties };
|
|
203
|
+
|
|
204
|
+
required_properties?: Array<string>;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Properties that uniquely identify this node type. Used for MERGE operations to
|
|
208
|
+
* avoid duplicates. Example: ['name', 'email'] for Customer nodes.
|
|
209
|
+
*/
|
|
210
|
+
unique_identifiers?: Array<string>;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export namespace NodeTypes {
|
|
214
|
+
/**
|
|
215
|
+
* Property definition for nodes/relationships
|
|
216
|
+
*/
|
|
217
|
+
export interface Properties {
|
|
218
|
+
type: 'string' | 'integer' | 'float' | 'boolean' | 'array' | 'datetime' | 'object';
|
|
219
|
+
|
|
220
|
+
default?: unknown;
|
|
221
|
+
|
|
222
|
+
description?: string | null;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* List of allowed enum values (max 10)
|
|
226
|
+
*/
|
|
227
|
+
enum_values?: Array<string> | null;
|
|
228
|
+
|
|
229
|
+
max_length?: number | null;
|
|
230
|
+
|
|
231
|
+
max_value?: number | null;
|
|
232
|
+
|
|
233
|
+
min_length?: number | null;
|
|
234
|
+
|
|
235
|
+
min_value?: number | null;
|
|
236
|
+
|
|
237
|
+
pattern?: string | null;
|
|
238
|
+
|
|
239
|
+
required?: boolean;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* User-defined relationship type
|
|
245
|
+
*/
|
|
246
|
+
export interface RelationshipTypes {
|
|
247
|
+
allowed_source_types: Array<string>;
|
|
248
|
+
|
|
249
|
+
allowed_target_types: Array<string>;
|
|
250
|
+
|
|
251
|
+
label: string;
|
|
252
|
+
|
|
253
|
+
name: string;
|
|
254
|
+
|
|
255
|
+
cardinality?: 'one-to-one' | 'one-to-many' | 'many-to-many';
|
|
256
|
+
|
|
257
|
+
color?: string | null;
|
|
258
|
+
|
|
259
|
+
description?: string | null;
|
|
260
|
+
|
|
261
|
+
properties?: { [key: string]: RelationshipTypes.Properties };
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export namespace RelationshipTypes {
|
|
265
|
+
/**
|
|
266
|
+
* Property definition for nodes/relationships
|
|
267
|
+
*/
|
|
268
|
+
export interface Properties {
|
|
269
|
+
type: 'string' | 'integer' | 'float' | 'boolean' | 'array' | 'datetime' | 'object';
|
|
270
|
+
|
|
271
|
+
default?: unknown;
|
|
272
|
+
|
|
273
|
+
description?: string | null;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* List of allowed enum values (max 10)
|
|
277
|
+
*/
|
|
278
|
+
enum_values?: Array<string> | null;
|
|
279
|
+
|
|
280
|
+
max_length?: number | null;
|
|
281
|
+
|
|
282
|
+
max_value?: number | null;
|
|
283
|
+
|
|
284
|
+
min_length?: number | null;
|
|
285
|
+
|
|
286
|
+
min_value?: number | null;
|
|
287
|
+
|
|
288
|
+
pattern?: string | null;
|
|
289
|
+
|
|
290
|
+
required?: boolean;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Response model for schema operations
|
|
297
|
+
*/
|
|
298
|
+
export interface SchemaCreateResponse {
|
|
299
|
+
success: boolean;
|
|
300
|
+
|
|
301
|
+
code?: number;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Complete user-defined graph schema
|
|
305
|
+
*/
|
|
306
|
+
data?: UserGraphSchemaOutput | null;
|
|
307
|
+
|
|
308
|
+
error?: string | null;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Response model for schema operations
|
|
313
|
+
*/
|
|
314
|
+
export interface SchemaRetrieveResponse {
|
|
315
|
+
success: boolean;
|
|
316
|
+
|
|
317
|
+
code?: number;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Complete user-defined graph schema
|
|
321
|
+
*/
|
|
322
|
+
data?: UserGraphSchemaOutput | null;
|
|
323
|
+
|
|
324
|
+
error?: string | null;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Response model for schema operations
|
|
329
|
+
*/
|
|
330
|
+
export interface SchemaUpdateResponse {
|
|
331
|
+
success: boolean;
|
|
332
|
+
|
|
333
|
+
code?: number;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Complete user-defined graph schema
|
|
337
|
+
*/
|
|
338
|
+
data?: UserGraphSchemaOutput | null;
|
|
339
|
+
|
|
340
|
+
error?: string | null;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Response model for listing schemas
|
|
345
|
+
*/
|
|
346
|
+
export interface SchemaListResponse {
|
|
347
|
+
success: boolean;
|
|
348
|
+
|
|
349
|
+
code?: number;
|
|
350
|
+
|
|
351
|
+
data?: Array<UserGraphSchemaOutput> | null;
|
|
352
|
+
|
|
353
|
+
error?: string | null;
|
|
354
|
+
|
|
355
|
+
total?: number;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export type SchemaDeleteResponse = unknown;
|
|
359
|
+
|
|
360
|
+
export interface SchemaCreateParams {
|
|
361
|
+
name: string;
|
|
362
|
+
|
|
363
|
+
id?: string;
|
|
364
|
+
|
|
365
|
+
created_at?: string;
|
|
366
|
+
|
|
367
|
+
description?: string | null;
|
|
368
|
+
|
|
369
|
+
last_used_at?: string | null;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Custom node types (max 15 per schema)
|
|
373
|
+
*/
|
|
374
|
+
node_types?: { [key: string]: SchemaCreateParams.NodeTypes };
|
|
375
|
+
|
|
376
|
+
organization_id?: string | null;
|
|
377
|
+
|
|
378
|
+
read_access?: Array<string>;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Custom relationship types (max 20 per schema)
|
|
382
|
+
*/
|
|
383
|
+
relationship_types?: { [key: string]: SchemaCreateParams.RelationshipTypes };
|
|
384
|
+
|
|
385
|
+
scope?: 'personal' | 'workspace' | 'organization';
|
|
386
|
+
|
|
387
|
+
status?: 'draft' | 'active' | 'deprecated' | 'archived';
|
|
388
|
+
|
|
389
|
+
updated_at?: string | null;
|
|
390
|
+
|
|
391
|
+
usage_count?: number;
|
|
392
|
+
|
|
393
|
+
user_id?: string | { [key: string]: unknown } | null;
|
|
394
|
+
|
|
395
|
+
version?: string;
|
|
396
|
+
|
|
397
|
+
workspace_id?: string | { [key: string]: unknown } | null;
|
|
398
|
+
|
|
399
|
+
write_access?: Array<string>;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export namespace SchemaCreateParams {
|
|
403
|
+
/**
|
|
404
|
+
* User-defined node type
|
|
405
|
+
*/
|
|
406
|
+
export interface NodeTypes {
|
|
407
|
+
label: string;
|
|
408
|
+
|
|
409
|
+
name: string;
|
|
410
|
+
|
|
411
|
+
color?: string | null;
|
|
412
|
+
|
|
413
|
+
description?: string | null;
|
|
414
|
+
|
|
415
|
+
icon?: string | null;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Node properties (max 15 per node type)
|
|
419
|
+
*/
|
|
420
|
+
properties?: { [key: string]: NodeTypes.Properties };
|
|
421
|
+
|
|
422
|
+
required_properties?: Array<string>;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Properties that uniquely identify this node type. Used for MERGE operations to
|
|
426
|
+
* avoid duplicates. Example: ['name', 'email'] for Customer nodes.
|
|
427
|
+
*/
|
|
428
|
+
unique_identifiers?: Array<string>;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export namespace NodeTypes {
|
|
432
|
+
/**
|
|
433
|
+
* Property definition for nodes/relationships
|
|
434
|
+
*/
|
|
435
|
+
export interface Properties {
|
|
436
|
+
type: 'string' | 'integer' | 'float' | 'boolean' | 'array' | 'datetime' | 'object';
|
|
437
|
+
|
|
438
|
+
default?: unknown;
|
|
439
|
+
|
|
440
|
+
description?: string | null;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* List of allowed enum values (max 10)
|
|
444
|
+
*/
|
|
445
|
+
enum_values?: Array<string> | null;
|
|
446
|
+
|
|
447
|
+
max_length?: number | null;
|
|
448
|
+
|
|
449
|
+
max_value?: number | null;
|
|
450
|
+
|
|
451
|
+
min_length?: number | null;
|
|
452
|
+
|
|
453
|
+
min_value?: number | null;
|
|
454
|
+
|
|
455
|
+
pattern?: string | null;
|
|
456
|
+
|
|
457
|
+
required?: boolean;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* User-defined relationship type
|
|
463
|
+
*/
|
|
464
|
+
export interface RelationshipTypes {
|
|
465
|
+
allowed_source_types: Array<string>;
|
|
466
|
+
|
|
467
|
+
allowed_target_types: Array<string>;
|
|
468
|
+
|
|
469
|
+
label: string;
|
|
470
|
+
|
|
471
|
+
name: string;
|
|
472
|
+
|
|
473
|
+
cardinality?: 'one-to-one' | 'one-to-many' | 'many-to-many';
|
|
474
|
+
|
|
475
|
+
color?: string | null;
|
|
476
|
+
|
|
477
|
+
description?: string | null;
|
|
478
|
+
|
|
479
|
+
properties?: { [key: string]: RelationshipTypes.Properties };
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export namespace RelationshipTypes {
|
|
483
|
+
/**
|
|
484
|
+
* Property definition for nodes/relationships
|
|
485
|
+
*/
|
|
486
|
+
export interface Properties {
|
|
487
|
+
type: 'string' | 'integer' | 'float' | 'boolean' | 'array' | 'datetime' | 'object';
|
|
488
|
+
|
|
489
|
+
default?: unknown;
|
|
490
|
+
|
|
491
|
+
description?: string | null;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* List of allowed enum values (max 10)
|
|
495
|
+
*/
|
|
496
|
+
enum_values?: Array<string> | null;
|
|
497
|
+
|
|
498
|
+
max_length?: number | null;
|
|
499
|
+
|
|
500
|
+
max_value?: number | null;
|
|
501
|
+
|
|
502
|
+
min_length?: number | null;
|
|
503
|
+
|
|
504
|
+
min_value?: number | null;
|
|
505
|
+
|
|
506
|
+
pattern?: string | null;
|
|
507
|
+
|
|
508
|
+
required?: boolean;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export interface SchemaUpdateParams {
|
|
514
|
+
body: { [key: string]: unknown };
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export interface SchemaListParams {
|
|
518
|
+
/**
|
|
519
|
+
* Filter by status (draft, active, deprecated, archived)
|
|
520
|
+
*/
|
|
521
|
+
status_filter?: string | null;
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Filter by workspace ID
|
|
525
|
+
*/
|
|
526
|
+
workspace_id?: string | null;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
export declare namespace Schemas {
|
|
530
|
+
export {
|
|
531
|
+
type UserGraphSchemaOutput as UserGraphSchemaOutput,
|
|
532
|
+
type SchemaCreateResponse as SchemaCreateResponse,
|
|
533
|
+
type SchemaRetrieveResponse as SchemaRetrieveResponse,
|
|
534
|
+
type SchemaUpdateResponse as SchemaUpdateResponse,
|
|
535
|
+
type SchemaListResponse as SchemaListResponse,
|
|
536
|
+
type SchemaDeleteResponse as SchemaDeleteResponse,
|
|
537
|
+
type SchemaCreateParams as SchemaCreateParams,
|
|
538
|
+
type SchemaUpdateParams as SchemaUpdateParams,
|
|
539
|
+
type SchemaListParams as SchemaListParams,
|
|
540
|
+
};
|
|
541
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Response model for a single memory item in add_memory response
|
|
5
|
+
*/
|
|
6
|
+
export interface AddMemoryItem {
|
|
7
|
+
createdAt: string;
|
|
8
|
+
|
|
9
|
+
memoryId: string;
|
|
10
|
+
|
|
11
|
+
objectId: string;
|
|
12
|
+
|
|
13
|
+
memoryChunkIds?: Array<string>;
|
|
14
|
+
}
|
package/src/resources/user.ts
CHANGED
|
@@ -21,18 +21,6 @@ export class User extends APIResource {
|
|
|
21
21
|
return this._client.post('/v1/user', { body, ...options });
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* Update user details by user_id (\_User.objectId) and developer association
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* const userResponse = await client.user.update('user_id');
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
update(userID: string, body: UserUpdateParams, options?: RequestOptions): APIPromise<UserResponse> {
|
|
33
|
-
return this._client.put(path`/v1/user/${userID}`, { body, ...options });
|
|
34
|
-
}
|
|
35
|
-
|
|
36
24
|
/**
|
|
37
25
|
* List users for a developer
|
|
38
26
|
*
|
|
@@ -217,16 +205,6 @@ export interface UserCreateParams {
|
|
|
217
205
|
type?: UserType;
|
|
218
206
|
}
|
|
219
207
|
|
|
220
|
-
export interface UserUpdateParams {
|
|
221
|
-
email?: string | null;
|
|
222
|
-
|
|
223
|
-
external_id?: string | null;
|
|
224
|
-
|
|
225
|
-
metadata?: { [key: string]: unknown } | null;
|
|
226
|
-
|
|
227
|
-
type?: UserType | null;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
208
|
export interface UserListParams {
|
|
231
209
|
email?: string | null;
|
|
232
210
|
|
|
@@ -271,7 +249,6 @@ export declare namespace User {
|
|
|
271
249
|
type UserDeleteResponse as UserDeleteResponse,
|
|
272
250
|
type UserCreateBatchResponse as UserCreateBatchResponse,
|
|
273
251
|
type UserCreateParams as UserCreateParams,
|
|
274
|
-
type UserUpdateParams as UserUpdateParams,
|
|
275
252
|
type UserListParams as UserListParams,
|
|
276
253
|
type UserDeleteParams as UserDeleteParams,
|
|
277
254
|
type UserCreateBatchParams as UserCreateBatchParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.18.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.18.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.18.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.18.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|