bem-ai-sdk 0.26.0 → 0.28.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 +25 -0
- package/client.d.mts +127 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +127 -2
- package/client.d.ts.map +1 -1
- package/client.js +136 -3
- package/client.js.map +1 -1
- package/client.mjs +136 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/buckets.d.mts +272 -0
- package/resources/buckets.d.mts.map +1 -0
- package/resources/buckets.d.ts +272 -0
- package/resources/buckets.d.ts.map +1 -0
- package/resources/buckets.js +93 -0
- package/resources/buckets.js.map +1 -0
- package/resources/buckets.mjs +89 -0
- package/resources/buckets.mjs.map +1 -0
- package/resources/entities/entities.d.mts +526 -0
- package/resources/entities/entities.d.mts.map +1 -0
- package/resources/entities/entities.d.ts +526 -0
- package/resources/entities/entities.d.ts.map +1 -0
- package/resources/entities/entities.js +93 -0
- package/resources/entities/entities.js.map +1 -0
- package/resources/entities/entities.mjs +88 -0
- package/resources/entities/entities.mjs.map +1 -0
- package/resources/entities/index.d.mts +3 -0
- package/resources/entities/index.d.mts.map +1 -0
- package/resources/entities/index.d.ts +3 -0
- package/resources/entities/index.d.ts.map +1 -0
- package/resources/entities/index.js +9 -0
- package/resources/entities/index.js.map +1 -0
- package/resources/entities/index.mjs +4 -0
- package/resources/entities/index.mjs.map +1 -0
- package/resources/entities/synonyms.d.mts +109 -0
- package/resources/entities/synonyms.d.mts.map +1 -0
- package/resources/entities/synonyms.d.ts +109 -0
- package/resources/entities/synonyms.d.ts.map +1 -0
- package/resources/entities/synonyms.js +61 -0
- package/resources/entities/synonyms.js.map +1 -0
- package/resources/entities/synonyms.mjs +57 -0
- package/resources/entities/synonyms.mjs.map +1 -0
- package/resources/entities.d.mts +2 -0
- package/resources/entities.d.mts.map +1 -0
- package/resources/entities.d.ts +2 -0
- package/resources/entities.d.ts.map +1 -0
- package/resources/entities.js +6 -0
- package/resources/entities.js.map +1 -0
- package/resources/entities.mjs +3 -0
- package/resources/entities.mjs.map +1 -0
- package/resources/entity-types/entity-types.d.mts +302 -0
- package/resources/entity-types/entity-types.d.mts.map +1 -0
- package/resources/entity-types/entity-types.d.ts +302 -0
- package/resources/entity-types/entity-types.d.ts.map +1 -0
- package/resources/entity-types/entity-types.js +104 -0
- package/resources/entity-types/entity-types.js.map +1 -0
- package/resources/entity-types/entity-types.mjs +99 -0
- package/resources/entity-types/entity-types.mjs.map +1 -0
- package/resources/entity-types/index.d.mts +3 -0
- package/resources/entity-types/index.d.mts.map +1 -0
- package/resources/entity-types/index.d.ts +3 -0
- package/resources/entity-types/index.d.ts.map +1 -0
- package/resources/entity-types/index.js +9 -0
- package/resources/entity-types/index.js.map +1 -0
- package/resources/entity-types/index.mjs +4 -0
- package/resources/entity-types/index.mjs.map +1 -0
- package/resources/entity-types/reviewers.d.mts +136 -0
- package/resources/entity-types/reviewers.d.mts.map +1 -0
- package/resources/entity-types/reviewers.d.ts +136 -0
- package/resources/entity-types/reviewers.d.ts.map +1 -0
- package/resources/entity-types/reviewers.js +74 -0
- package/resources/entity-types/reviewers.js.map +1 -0
- package/resources/entity-types/reviewers.mjs +70 -0
- package/resources/entity-types/reviewers.mjs.map +1 -0
- package/resources/entity-types.d.mts +2 -0
- package/resources/entity-types.d.mts.map +1 -0
- package/resources/entity-types.d.ts +2 -0
- package/resources/entity-types.d.ts.map +1 -0
- package/resources/entity-types.js +6 -0
- package/resources/entity-types.js.map +1 -0
- package/resources/entity-types.mjs +3 -0
- package/resources/entity-types.mjs.map +1 -0
- package/resources/errors.d.mts +9 -0
- package/resources/errors.d.mts.map +1 -1
- package/resources/errors.d.ts +9 -0
- package/resources/errors.d.ts.map +1 -1
- package/resources/eval/eval.d.mts +4 -0
- package/resources/eval/eval.d.mts.map +1 -1
- package/resources/eval/eval.d.ts +4 -0
- package/resources/eval/eval.d.ts.map +1 -1
- package/resources/eval/eval.js +4 -0
- package/resources/eval/eval.js.map +1 -1
- package/resources/eval/eval.mjs +4 -0
- package/resources/eval/eval.mjs.map +1 -1
- package/resources/eval/index.d.mts +1 -0
- package/resources/eval/index.d.mts.map +1 -1
- package/resources/eval/index.d.ts +1 -0
- package/resources/eval/index.d.ts.map +1 -1
- package/resources/eval/index.js +3 -1
- package/resources/eval/index.js.map +1 -1
- package/resources/eval/index.mjs +1 -0
- package/resources/eval/index.mjs.map +1 -1
- package/resources/eval/score.d.mts +486 -0
- package/resources/eval/score.d.mts.map +1 -0
- package/resources/eval/score.d.ts +486 -0
- package/resources/eval/score.d.ts.map +1 -0
- package/resources/eval/score.js +126 -0
- package/resources/eval/score.js.map +1 -0
- package/resources/eval/score.mjs +122 -0
- package/resources/eval/score.mjs.map +1 -0
- package/resources/fs.d.mts +28 -0
- package/resources/fs.d.mts.map +1 -1
- package/resources/fs.d.ts +28 -0
- package/resources/fs.d.ts.map +1 -1
- package/resources/functions/functions.d.mts +338 -8
- package/resources/functions/functions.d.mts.map +1 -1
- package/resources/functions/functions.d.ts +338 -8
- package/resources/functions/functions.d.ts.map +1 -1
- package/resources/functions/functions.js +2 -2
- package/resources/functions/functions.js.map +1 -1
- package/resources/functions/functions.mjs +2 -2
- package/resources/functions/functions.mjs.map +1 -1
- package/resources/functions/versions.d.mts +133 -1
- package/resources/functions/versions.d.mts.map +1 -1
- package/resources/functions/versions.d.ts +133 -1
- package/resources/functions/versions.d.ts.map +1 -1
- package/resources/index.d.mts +6 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +13 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -0
- package/resources/index.mjs.map +1 -1
- package/resources/knowledge-graph.d.mts +143 -0
- package/resources/knowledge-graph.d.mts.map +1 -0
- package/resources/knowledge-graph.d.ts +143 -0
- package/resources/knowledge-graph.d.ts.map +1 -0
- package/resources/knowledge-graph.js +34 -0
- package/resources/knowledge-graph.js.map +1 -0
- package/resources/knowledge-graph.mjs +30 -0
- package/resources/knowledge-graph.mjs.map +1 -0
- package/resources/outputs.d.mts +80 -2
- package/resources/outputs.d.mts.map +1 -1
- package/resources/outputs.d.ts +80 -2
- package/resources/outputs.d.ts.map +1 -1
- package/resources/review-queue.d.mts +192 -0
- package/resources/review-queue.d.mts.map +1 -0
- package/resources/review-queue.d.ts +192 -0
- package/resources/review-queue.d.ts.map +1 -0
- package/resources/review-queue.js +49 -0
- package/resources/review-queue.js.map +1 -0
- package/resources/review-queue.mjs +45 -0
- package/resources/review-queue.mjs.map +1 -0
- package/resources/subscriptions.d.mts +14 -2
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +14 -2
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +14 -2
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +14 -2
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/users.d.mts +62 -0
- package/resources/users.d.mts.map +1 -0
- package/resources/users.d.ts +62 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +35 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +31 -0
- package/resources/users.mjs.map +1 -0
- package/resources/workflows/workflows.d.mts +8 -0
- package/resources/workflows/workflows.d.mts.map +1 -1
- package/resources/workflows/workflows.d.ts +8 -0
- package/resources/workflows/workflows.d.ts.map +1 -1
- package/resources/workflows/workflows.js.map +1 -1
- package/resources/workflows/workflows.mjs.map +1 -1
- package/src/client.ts +220 -3
- package/src/resources/buckets.ts +351 -0
- package/src/resources/entities/entities.ts +651 -0
- package/src/resources/entities/index.ts +20 -0
- package/src/resources/entities/synonyms.ts +140 -0
- package/src/resources/entities.ts +3 -0
- package/src/resources/entity-types/entity-types.ts +396 -0
- package/src/resources/entity-types/index.ts +19 -0
- package/src/resources/entity-types/reviewers.ts +175 -0
- package/src/resources/entity-types.ts +3 -0
- package/src/resources/errors.ts +10 -0
- package/src/resources/eval/eval.ts +18 -0
- package/src/resources/eval/index.ts +7 -0
- package/src/resources/eval/score.ts +590 -0
- package/src/resources/fs.ts +30 -0
- package/src/resources/functions/functions.ts +395 -8
- package/src/resources/functions/versions.ts +153 -1
- package/src/resources/index.ts +40 -0
- package/src/resources/knowledge-graph.ts +174 -0
- package/src/resources/outputs.ts +101 -1
- package/src/resources/review-queue.ts +234 -0
- package/src/resources/subscriptions.ts +14 -2
- package/src/resources/users.ts +76 -0
- package/src/resources/workflows/workflows.ts +9 -0
- 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,140 @@
|
|
|
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 { buildHeaders } from '../../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Manage the human-readable surface forms (synonyms) attached to a canonical
|
|
11
|
+
* entity. Synonyms feed the matcher's exact-match path, so adding the right
|
|
12
|
+
* synonyms improves cross-document entity resolution.
|
|
13
|
+
*
|
|
14
|
+
* - **`POST /v3/entities/{id}/synonyms`** attaches a `customer_defined`
|
|
15
|
+
* synonym. If the same normalized form already exists as an `extracted`
|
|
16
|
+
* synonym, it is upgraded to `customer_defined` (so the matcher weights it
|
|
17
|
+
* higher); an existing customer/SME synonym is returned unchanged.
|
|
18
|
+
* - **`DELETE /v3/entities/{id}/synonyms/{synonymID}`** soft-deletes a
|
|
19
|
+
* synonym. Only `customer_defined` and `sme_approved` synonyms are
|
|
20
|
+
* deletable; `extracted` synonyms are resolver-owned and the request is
|
|
21
|
+
* rejected with `409 Conflict`.
|
|
22
|
+
*
|
|
23
|
+
* A merged-away entity id transparently resolves to its surviving canonical
|
|
24
|
+
* entity, so a synonym added to a stale id lands on the entity that persists.
|
|
25
|
+
*/
|
|
26
|
+
export class Synonyms extends APIResource {
|
|
27
|
+
/**
|
|
28
|
+
* Add a Synonym to an Entity
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const response = await client.entities.synonyms.add('id', {
|
|
33
|
+
* text: 'ACME Corporation',
|
|
34
|
+
* locale: 'en-US',
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
add(id: string, params: SynonymAddParams, options?: RequestOptions): APIPromise<SynonymAddResponse> {
|
|
39
|
+
const { bucket, ...body } = params;
|
|
40
|
+
return this._client.post(path`/v3/entities/${id}/synonyms`, { query: { bucket }, body, ...options });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Remove a Synonym from an Entity
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* await client.entities.synonyms.remove('synonymID', {
|
|
49
|
+
* id: 'id',
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
remove(synonymID: string, params: SynonymRemoveParams, options?: RequestOptions): APIPromise<void> {
|
|
54
|
+
const { id, bucket } = params;
|
|
55
|
+
return this._client.delete(path`/v3/entities/${id}/synonyms/${synonymID}`, {
|
|
56
|
+
query: { bucket },
|
|
57
|
+
...options,
|
|
58
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* One synonym attached to an entity.
|
|
65
|
+
*/
|
|
66
|
+
export interface SynonymAddResponse {
|
|
67
|
+
/**
|
|
68
|
+
* Creation timestamp of the synonym (RFC 3339).
|
|
69
|
+
*/
|
|
70
|
+
createdAt: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Lowercased, whitespace-folded form of `text`.
|
|
74
|
+
*/
|
|
75
|
+
normalizedText: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Provenance of the synonym. `customer_defined` and `sme_approved` synonyms are
|
|
79
|
+
* deletable; `extracted` synonyms are resolver-owned and cannot be deleted.
|
|
80
|
+
*/
|
|
81
|
+
source: 'extracted' | 'customer_defined' | 'sme_approved';
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Stable public identifier for the synonym (`esn_...`).
|
|
85
|
+
*/
|
|
86
|
+
synonymID: string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The human-readable synonym as authored.
|
|
90
|
+
*/
|
|
91
|
+
text: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Optional BCP 47 locale tag, when one was supplied.
|
|
95
|
+
*/
|
|
96
|
+
locale?: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface SynonymAddParams {
|
|
100
|
+
/**
|
|
101
|
+
* Body param: The human-readable synonym surface form to attach (e.g. `Acme Corp`,
|
|
102
|
+
* `ACME`). It is normalized (lowercased, whitespace-folded) for the uniqueness key
|
|
103
|
+
* and the matcher's exact-match path.
|
|
104
|
+
*/
|
|
105
|
+
text: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Query param: Optional bucket public ID (`bkt_...`) to scope the entity lookup to
|
|
109
|
+
* one bucket. Omit for the unscoped (all account+environment) view.
|
|
110
|
+
*/
|
|
111
|
+
bucket?: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Body param: Optional BCP 47 locale tag (e.g. `en-US`) for language-specific
|
|
115
|
+
* synonyms.
|
|
116
|
+
*/
|
|
117
|
+
locale?: string;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface SynonymRemoveParams {
|
|
121
|
+
/**
|
|
122
|
+
* Path param: Entity public ID (`ent_...`). A merged-away id resolves to the
|
|
123
|
+
* surviving entity.
|
|
124
|
+
*/
|
|
125
|
+
id: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Query param: Optional bucket public ID (`bkt_...`) to scope the entity lookup to
|
|
129
|
+
* one bucket. Omit for the unscoped (all account+environment) view.
|
|
130
|
+
*/
|
|
131
|
+
bucket?: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export declare namespace Synonyms {
|
|
135
|
+
export {
|
|
136
|
+
type SynonymAddResponse as SynonymAddResponse,
|
|
137
|
+
type SynonymAddParams as SynonymAddParams,
|
|
138
|
+
type SynonymRemoveParams as SynonymRemoveParams,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as ReviewersAPI from './reviewers';
|
|
5
|
+
import {
|
|
6
|
+
ReviewerAssignParams,
|
|
7
|
+
ReviewerAssignResponse,
|
|
8
|
+
ReviewerListResponse,
|
|
9
|
+
ReviewerRemoveParams,
|
|
10
|
+
Reviewers,
|
|
11
|
+
} from './reviewers';
|
|
12
|
+
import { APIPromise } from '../../core/api-promise';
|
|
13
|
+
import { buildHeaders } from '../../internal/headers';
|
|
14
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
15
|
+
import { path } from '../../internal/utils/path';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Entity Types are the customer-defined taxonomy for the knowledge graph,
|
|
19
|
+
* scoped to an account+environment. Each type has a unique, immutable name
|
|
20
|
+
* and can be organised into hierarchies via `parentTypeID`. A type may
|
|
21
|
+
* carry per-type structured attribute metadata in `attributeSchema` (for
|
|
22
|
+
* example `{"unit": "mg", "range": [0, 100]}`).
|
|
23
|
+
*
|
|
24
|
+
* Use these endpoints to create, list, fetch, update, and delete entity
|
|
25
|
+
* types:
|
|
26
|
+
*
|
|
27
|
+
* - **`POST /v3/entity-types`** creates a type, optionally under a parent.
|
|
28
|
+
* - **`GET /v3/entity-types`** lists types with cursor pagination
|
|
29
|
+
* (`startingAfter` / `endingBefore` over `typeID`) and an optional
|
|
30
|
+
* `parentTypeId` filter for direct children.
|
|
31
|
+
* - **`PATCH /v3/entity-types/{typeID}`** updates `description`,
|
|
32
|
+
* `parentTypeID`, and/or `attributeSchema`. The `name` is immutable.
|
|
33
|
+
* - **`DELETE /v3/entity-types/{typeID}`** soft-deletes a type. The request
|
|
34
|
+
* is rejected with `409 Conflict` while any live entity is assigned to
|
|
35
|
+
* the type or any live child type points at it.
|
|
36
|
+
*/
|
|
37
|
+
export class EntityTypes extends APIResource {
|
|
38
|
+
reviewers: ReviewersAPI.Reviewers = new ReviewersAPI.Reviewers(this._client);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Create an Entity Type
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const entityType = await client.entityTypes.create({
|
|
46
|
+
* name: 'Drug',
|
|
47
|
+
* description: 'A pharmaceutical compound',
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
create(body: EntityTypeCreateParams, options?: RequestOptions): APIPromise<EntityTypeCreateResponse> {
|
|
52
|
+
return this._client.post('/v3/entity-types', { body, ...options });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get an Entity Type
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const entityType = await client.entityTypes.retrieve(
|
|
61
|
+
* 'typeID',
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
retrieve(typeID: string, options?: RequestOptions): APIPromise<EntityTypeRetrieveResponse> {
|
|
66
|
+
return this._client.get(path`/v3/entity-types/${typeID}`, options);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Update an Entity Type
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const entityType = await client.entityTypes.update(
|
|
75
|
+
* 'typeID',
|
|
76
|
+
* );
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
update(
|
|
80
|
+
typeID: string,
|
|
81
|
+
body: EntityTypeUpdateParams,
|
|
82
|
+
options?: RequestOptions,
|
|
83
|
+
): APIPromise<EntityTypeUpdateResponse> {
|
|
84
|
+
return this._client.patch(path`/v3/entity-types/${typeID}`, { body, ...options });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* List Entity Types
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const entityTypes = await client.entityTypes.list();
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
list(
|
|
96
|
+
query: EntityTypeListParams | null | undefined = {},
|
|
97
|
+
options?: RequestOptions,
|
|
98
|
+
): APIPromise<EntityTypeListResponse> {
|
|
99
|
+
return this._client.get('/v3/entity-types', { query, ...options });
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Delete an Entity Type
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```ts
|
|
107
|
+
* await client.entityTypes.delete('typeID');
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
delete(typeID: string, options?: RequestOptions): APIPromise<void> {
|
|
111
|
+
return this._client.delete(path`/v3/entity-types/${typeID}`, {
|
|
112
|
+
...options,
|
|
113
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* An EntityType is a customer-defined type in the knowledge-graph taxonomy, scoped
|
|
120
|
+
* to an account+environment. Types may be organised into hierarchies via
|
|
121
|
+
* `parentTypeID`, and may carry per-type structured attribute metadata in
|
|
122
|
+
* `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
|
|
123
|
+
*/
|
|
124
|
+
export interface EntityTypeCreateResponse {
|
|
125
|
+
/**
|
|
126
|
+
* Creation timestamp (RFC 3339).
|
|
127
|
+
*/
|
|
128
|
+
createdAt: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Optional human-facing note about the type.
|
|
132
|
+
*/
|
|
133
|
+
description: string;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Human-facing type name. Unique within an account+environment, and immutable once
|
|
137
|
+
* set.
|
|
138
|
+
*/
|
|
139
|
+
name: string;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Public ID (`ety_...`) of the parent type, or an empty string when the type is
|
|
143
|
+
* top-level.
|
|
144
|
+
*/
|
|
145
|
+
parentTypeID: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Stable public identifier for the entity type (`ety_...`).
|
|
149
|
+
*/
|
|
150
|
+
typeID: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Last-update timestamp (RFC 3339).
|
|
154
|
+
*/
|
|
155
|
+
updatedAt: string;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Optional per-type structured attribute metadata.
|
|
159
|
+
*/
|
|
160
|
+
attributeSchema?: unknown;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* An EntityType is a customer-defined type in the knowledge-graph taxonomy, scoped
|
|
165
|
+
* to an account+environment. Types may be organised into hierarchies via
|
|
166
|
+
* `parentTypeID`, and may carry per-type structured attribute metadata in
|
|
167
|
+
* `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
|
|
168
|
+
*/
|
|
169
|
+
export interface EntityTypeRetrieveResponse {
|
|
170
|
+
/**
|
|
171
|
+
* Creation timestamp (RFC 3339).
|
|
172
|
+
*/
|
|
173
|
+
createdAt: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Optional human-facing note about the type.
|
|
177
|
+
*/
|
|
178
|
+
description: string;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Human-facing type name. Unique within an account+environment, and immutable once
|
|
182
|
+
* set.
|
|
183
|
+
*/
|
|
184
|
+
name: string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Public ID (`ety_...`) of the parent type, or an empty string when the type is
|
|
188
|
+
* top-level.
|
|
189
|
+
*/
|
|
190
|
+
parentTypeID: string;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Stable public identifier for the entity type (`ety_...`).
|
|
194
|
+
*/
|
|
195
|
+
typeID: string;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Last-update timestamp (RFC 3339).
|
|
199
|
+
*/
|
|
200
|
+
updatedAt: string;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Optional per-type structured attribute metadata.
|
|
204
|
+
*/
|
|
205
|
+
attributeSchema?: unknown;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* An EntityType is a customer-defined type in the knowledge-graph taxonomy, scoped
|
|
210
|
+
* to an account+environment. Types may be organised into hierarchies via
|
|
211
|
+
* `parentTypeID`, and may carry per-type structured attribute metadata in
|
|
212
|
+
* `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
|
|
213
|
+
*/
|
|
214
|
+
export interface EntityTypeUpdateResponse {
|
|
215
|
+
/**
|
|
216
|
+
* Creation timestamp (RFC 3339).
|
|
217
|
+
*/
|
|
218
|
+
createdAt: string;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Optional human-facing note about the type.
|
|
222
|
+
*/
|
|
223
|
+
description: string;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Human-facing type name. Unique within an account+environment, and immutable once
|
|
227
|
+
* set.
|
|
228
|
+
*/
|
|
229
|
+
name: string;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Public ID (`ety_...`) of the parent type, or an empty string when the type is
|
|
233
|
+
* top-level.
|
|
234
|
+
*/
|
|
235
|
+
parentTypeID: string;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Stable public identifier for the entity type (`ety_...`).
|
|
239
|
+
*/
|
|
240
|
+
typeID: string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Last-update timestamp (RFC 3339).
|
|
244
|
+
*/
|
|
245
|
+
updatedAt: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Optional per-type structured attribute metadata.
|
|
249
|
+
*/
|
|
250
|
+
attributeSchema?: unknown;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Response body for listing entity types.
|
|
255
|
+
*/
|
|
256
|
+
export interface EntityTypeListResponse {
|
|
257
|
+
entityTypes: Array<EntityTypeListResponse.EntityType>;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Total number of entity types matching the query, ignoring pagination.
|
|
261
|
+
*/
|
|
262
|
+
totalCount: number;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export namespace EntityTypeListResponse {
|
|
266
|
+
/**
|
|
267
|
+
* An EntityType is a customer-defined type in the knowledge-graph taxonomy, scoped
|
|
268
|
+
* to an account+environment. Types may be organised into hierarchies via
|
|
269
|
+
* `parentTypeID`, and may carry per-type structured attribute metadata in
|
|
270
|
+
* `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
|
|
271
|
+
*/
|
|
272
|
+
export interface EntityType {
|
|
273
|
+
/**
|
|
274
|
+
* Creation timestamp (RFC 3339).
|
|
275
|
+
*/
|
|
276
|
+
createdAt: string;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Optional human-facing note about the type.
|
|
280
|
+
*/
|
|
281
|
+
description: string;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Human-facing type name. Unique within an account+environment, and immutable once
|
|
285
|
+
* set.
|
|
286
|
+
*/
|
|
287
|
+
name: string;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Public ID (`ety_...`) of the parent type, or an empty string when the type is
|
|
291
|
+
* top-level.
|
|
292
|
+
*/
|
|
293
|
+
parentTypeID: string;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Stable public identifier for the entity type (`ety_...`).
|
|
297
|
+
*/
|
|
298
|
+
typeID: string;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Last-update timestamp (RFC 3339).
|
|
302
|
+
*/
|
|
303
|
+
updatedAt: string;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Optional per-type structured attribute metadata.
|
|
307
|
+
*/
|
|
308
|
+
attributeSchema?: unknown;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export interface EntityTypeCreateParams {
|
|
313
|
+
/**
|
|
314
|
+
* Type name. Required and unique within the account+environment.
|
|
315
|
+
*/
|
|
316
|
+
name: string;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Optional per-type structured attribute metadata.
|
|
320
|
+
*/
|
|
321
|
+
attributeSchema?: unknown;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Optional description.
|
|
325
|
+
*/
|
|
326
|
+
description?: string;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Optional public ID (`ety_...`) of the parent type. Must belong to the same
|
|
330
|
+
* account+environment.
|
|
331
|
+
*/
|
|
332
|
+
parentTypeID?: string;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export interface EntityTypeUpdateParams {
|
|
336
|
+
/**
|
|
337
|
+
* New per-type structured attribute metadata.
|
|
338
|
+
*/
|
|
339
|
+
attributeSchema?: unknown;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* New description.
|
|
343
|
+
*/
|
|
344
|
+
description?: string;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* New parent type public ID (`ety_...`), or an empty string to clear the parent
|
|
348
|
+
* (promote to top-level). Must belong to the same account+environment and may not
|
|
349
|
+
* be the type itself.
|
|
350
|
+
*/
|
|
351
|
+
parentTypeID?: string;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface EntityTypeListParams {
|
|
355
|
+
/**
|
|
356
|
+
* Cursor: return types whose `typeID` sorts before this value.
|
|
357
|
+
*/
|
|
358
|
+
endingBefore?: string;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Maximum number of entity types to return (default 50, max 200).
|
|
362
|
+
*/
|
|
363
|
+
limit?: number;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Filter to the direct children of this parent type (`ety_...`).
|
|
367
|
+
*/
|
|
368
|
+
parentTypeId?: string;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Cursor: return types whose `typeID` sorts after this value.
|
|
372
|
+
*/
|
|
373
|
+
startingAfter?: string;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
EntityTypes.Reviewers = Reviewers;
|
|
377
|
+
|
|
378
|
+
export declare namespace EntityTypes {
|
|
379
|
+
export {
|
|
380
|
+
type EntityTypeCreateResponse as EntityTypeCreateResponse,
|
|
381
|
+
type EntityTypeRetrieveResponse as EntityTypeRetrieveResponse,
|
|
382
|
+
type EntityTypeUpdateResponse as EntityTypeUpdateResponse,
|
|
383
|
+
type EntityTypeListResponse as EntityTypeListResponse,
|
|
384
|
+
type EntityTypeCreateParams as EntityTypeCreateParams,
|
|
385
|
+
type EntityTypeUpdateParams as EntityTypeUpdateParams,
|
|
386
|
+
type EntityTypeListParams as EntityTypeListParams,
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
export {
|
|
390
|
+
Reviewers as Reviewers,
|
|
391
|
+
type ReviewerListResponse as ReviewerListResponse,
|
|
392
|
+
type ReviewerAssignResponse as ReviewerAssignResponse,
|
|
393
|
+
type ReviewerAssignParams as ReviewerAssignParams,
|
|
394
|
+
type ReviewerRemoveParams as ReviewerRemoveParams,
|
|
395
|
+
};
|
|
396
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
EntityTypes,
|
|
5
|
+
type EntityTypeCreateResponse,
|
|
6
|
+
type EntityTypeRetrieveResponse,
|
|
7
|
+
type EntityTypeUpdateResponse,
|
|
8
|
+
type EntityTypeListResponse,
|
|
9
|
+
type EntityTypeCreateParams,
|
|
10
|
+
type EntityTypeUpdateParams,
|
|
11
|
+
type EntityTypeListParams,
|
|
12
|
+
} from './entity-types';
|
|
13
|
+
export {
|
|
14
|
+
Reviewers,
|
|
15
|
+
type ReviewerListResponse,
|
|
16
|
+
type ReviewerAssignResponse,
|
|
17
|
+
type ReviewerAssignParams,
|
|
18
|
+
type ReviewerRemoveParams,
|
|
19
|
+
} from './reviewers';
|