bem-ai-sdk 0.26.0 → 0.27.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.
Files changed (174) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +127 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +127 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +136 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +136 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/buckets.d.mts +272 -0
  12. package/resources/buckets.d.mts.map +1 -0
  13. package/resources/buckets.d.ts +272 -0
  14. package/resources/buckets.d.ts.map +1 -0
  15. package/resources/buckets.js +93 -0
  16. package/resources/buckets.js.map +1 -0
  17. package/resources/buckets.mjs +89 -0
  18. package/resources/buckets.mjs.map +1 -0
  19. package/resources/entities/entities.d.mts +516 -0
  20. package/resources/entities/entities.d.mts.map +1 -0
  21. package/resources/entities/entities.d.ts +516 -0
  22. package/resources/entities/entities.d.ts.map +1 -0
  23. package/resources/entities/entities.js +93 -0
  24. package/resources/entities/entities.js.map +1 -0
  25. package/resources/entities/entities.mjs +88 -0
  26. package/resources/entities/entities.mjs.map +1 -0
  27. package/resources/entities/index.d.mts +3 -0
  28. package/resources/entities/index.d.mts.map +1 -0
  29. package/resources/entities/index.d.ts +3 -0
  30. package/resources/entities/index.d.ts.map +1 -0
  31. package/resources/entities/index.js +9 -0
  32. package/resources/entities/index.js.map +1 -0
  33. package/resources/entities/index.mjs +4 -0
  34. package/resources/entities/index.mjs.map +1 -0
  35. package/resources/entities/synonyms.d.mts +109 -0
  36. package/resources/entities/synonyms.d.mts.map +1 -0
  37. package/resources/entities/synonyms.d.ts +109 -0
  38. package/resources/entities/synonyms.d.ts.map +1 -0
  39. package/resources/entities/synonyms.js +61 -0
  40. package/resources/entities/synonyms.js.map +1 -0
  41. package/resources/entities/synonyms.mjs +57 -0
  42. package/resources/entities/synonyms.mjs.map +1 -0
  43. package/resources/entities.d.mts +2 -0
  44. package/resources/entities.d.mts.map +1 -0
  45. package/resources/entities.d.ts +2 -0
  46. package/resources/entities.d.ts.map +1 -0
  47. package/resources/entities.js +6 -0
  48. package/resources/entities.js.map +1 -0
  49. package/resources/entities.mjs +3 -0
  50. package/resources/entities.mjs.map +1 -0
  51. package/resources/entity-types/entity-types.d.mts +302 -0
  52. package/resources/entity-types/entity-types.d.mts.map +1 -0
  53. package/resources/entity-types/entity-types.d.ts +302 -0
  54. package/resources/entity-types/entity-types.d.ts.map +1 -0
  55. package/resources/entity-types/entity-types.js +104 -0
  56. package/resources/entity-types/entity-types.js.map +1 -0
  57. package/resources/entity-types/entity-types.mjs +99 -0
  58. package/resources/entity-types/entity-types.mjs.map +1 -0
  59. package/resources/entity-types/index.d.mts +3 -0
  60. package/resources/entity-types/index.d.mts.map +1 -0
  61. package/resources/entity-types/index.d.ts +3 -0
  62. package/resources/entity-types/index.d.ts.map +1 -0
  63. package/resources/entity-types/index.js +9 -0
  64. package/resources/entity-types/index.js.map +1 -0
  65. package/resources/entity-types/index.mjs +4 -0
  66. package/resources/entity-types/index.mjs.map +1 -0
  67. package/resources/entity-types/reviewers.d.mts +136 -0
  68. package/resources/entity-types/reviewers.d.mts.map +1 -0
  69. package/resources/entity-types/reviewers.d.ts +136 -0
  70. package/resources/entity-types/reviewers.d.ts.map +1 -0
  71. package/resources/entity-types/reviewers.js +74 -0
  72. package/resources/entity-types/reviewers.js.map +1 -0
  73. package/resources/entity-types/reviewers.mjs +70 -0
  74. package/resources/entity-types/reviewers.mjs.map +1 -0
  75. package/resources/entity-types.d.mts +2 -0
  76. package/resources/entity-types.d.mts.map +1 -0
  77. package/resources/entity-types.d.ts +2 -0
  78. package/resources/entity-types.d.ts.map +1 -0
  79. package/resources/entity-types.js +6 -0
  80. package/resources/entity-types.js.map +1 -0
  81. package/resources/entity-types.mjs +3 -0
  82. package/resources/entity-types.mjs.map +1 -0
  83. package/resources/eval/eval.d.mts +4 -0
  84. package/resources/eval/eval.d.mts.map +1 -1
  85. package/resources/eval/eval.d.ts +4 -0
  86. package/resources/eval/eval.d.ts.map +1 -1
  87. package/resources/eval/eval.js +4 -0
  88. package/resources/eval/eval.js.map +1 -1
  89. package/resources/eval/eval.mjs +4 -0
  90. package/resources/eval/eval.mjs.map +1 -1
  91. package/resources/eval/index.d.mts +1 -0
  92. package/resources/eval/index.d.mts.map +1 -1
  93. package/resources/eval/index.d.ts +1 -0
  94. package/resources/eval/index.d.ts.map +1 -1
  95. package/resources/eval/index.js +3 -1
  96. package/resources/eval/index.js.map +1 -1
  97. package/resources/eval/index.mjs +1 -0
  98. package/resources/eval/index.mjs.map +1 -1
  99. package/resources/eval/score.d.mts +486 -0
  100. package/resources/eval/score.d.mts.map +1 -0
  101. package/resources/eval/score.d.ts +486 -0
  102. package/resources/eval/score.d.ts.map +1 -0
  103. package/resources/eval/score.js +126 -0
  104. package/resources/eval/score.js.map +1 -0
  105. package/resources/eval/score.mjs +122 -0
  106. package/resources/eval/score.mjs.map +1 -0
  107. package/resources/fs.d.mts +28 -0
  108. package/resources/fs.d.mts.map +1 -1
  109. package/resources/fs.d.ts +28 -0
  110. package/resources/fs.d.ts.map +1 -1
  111. package/resources/index.d.mts +6 -0
  112. package/resources/index.d.mts.map +1 -1
  113. package/resources/index.d.ts +6 -0
  114. package/resources/index.d.ts.map +1 -1
  115. package/resources/index.js +13 -1
  116. package/resources/index.js.map +1 -1
  117. package/resources/index.mjs +6 -0
  118. package/resources/index.mjs.map +1 -1
  119. package/resources/knowledge-graph.d.mts +125 -0
  120. package/resources/knowledge-graph.d.mts.map +1 -0
  121. package/resources/knowledge-graph.d.ts +125 -0
  122. package/resources/knowledge-graph.d.ts.map +1 -0
  123. package/resources/knowledge-graph.js +34 -0
  124. package/resources/knowledge-graph.js.map +1 -0
  125. package/resources/knowledge-graph.mjs +30 -0
  126. package/resources/knowledge-graph.mjs.map +1 -0
  127. package/resources/review-queue.d.mts +192 -0
  128. package/resources/review-queue.d.mts.map +1 -0
  129. package/resources/review-queue.d.ts +192 -0
  130. package/resources/review-queue.d.ts.map +1 -0
  131. package/resources/review-queue.js +49 -0
  132. package/resources/review-queue.js.map +1 -0
  133. package/resources/review-queue.mjs +45 -0
  134. package/resources/review-queue.mjs.map +1 -0
  135. package/resources/subscriptions.d.mts +14 -2
  136. package/resources/subscriptions.d.mts.map +1 -1
  137. package/resources/subscriptions.d.ts +14 -2
  138. package/resources/subscriptions.d.ts.map +1 -1
  139. package/resources/subscriptions.js +14 -2
  140. package/resources/subscriptions.js.map +1 -1
  141. package/resources/subscriptions.mjs +14 -2
  142. package/resources/subscriptions.mjs.map +1 -1
  143. package/resources/users.d.mts +62 -0
  144. package/resources/users.d.mts.map +1 -0
  145. package/resources/users.d.ts +62 -0
  146. package/resources/users.d.ts.map +1 -0
  147. package/resources/users.js +35 -0
  148. package/resources/users.js.map +1 -0
  149. package/resources/users.mjs +31 -0
  150. package/resources/users.mjs.map +1 -0
  151. package/src/client.ts +220 -3
  152. package/src/resources/buckets.ts +351 -0
  153. package/src/resources/entities/entities.ts +639 -0
  154. package/src/resources/entities/index.ts +20 -0
  155. package/src/resources/entities/synonyms.ts +140 -0
  156. package/src/resources/entities.ts +3 -0
  157. package/src/resources/entity-types/entity-types.ts +396 -0
  158. package/src/resources/entity-types/index.ts +19 -0
  159. package/src/resources/entity-types/reviewers.ts +175 -0
  160. package/src/resources/entity-types.ts +3 -0
  161. package/src/resources/eval/eval.ts +18 -0
  162. package/src/resources/eval/index.ts +7 -0
  163. package/src/resources/eval/score.ts +590 -0
  164. package/src/resources/fs.ts +30 -0
  165. package/src/resources/index.ts +40 -0
  166. package/src/resources/knowledge-graph.ts +153 -0
  167. package/src/resources/review-queue.ts +234 -0
  168. package/src/resources/subscriptions.ts +14 -2
  169. package/src/resources/users.ts +76 -0
  170. package/src/version.ts +1 -1
  171. package/version.d.mts +1 -1
  172. package/version.d.ts +1 -1
  173. package/version.js +1 -1
  174. package/version.mjs +1 -1
@@ -0,0 +1,302 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as ReviewersAPI from "./reviewers.mjs";
3
+ import { ReviewerAssignParams, ReviewerAssignResponse, ReviewerListResponse, ReviewerRemoveParams, Reviewers } from "./reviewers.mjs";
4
+ import { APIPromise } from "../../core/api-promise.mjs";
5
+ import { RequestOptions } from "../../internal/request-options.mjs";
6
+ /**
7
+ * Entity Types are the customer-defined taxonomy for the knowledge graph,
8
+ * scoped to an account+environment. Each type has a unique, immutable name
9
+ * and can be organised into hierarchies via `parentTypeID`. A type may
10
+ * carry per-type structured attribute metadata in `attributeSchema` (for
11
+ * example `{"unit": "mg", "range": [0, 100]}`).
12
+ *
13
+ * Use these endpoints to create, list, fetch, update, and delete entity
14
+ * types:
15
+ *
16
+ * - **`POST /v3/entity-types`** creates a type, optionally under a parent.
17
+ * - **`GET /v3/entity-types`** lists types with cursor pagination
18
+ * (`startingAfter` / `endingBefore` over `typeID`) and an optional
19
+ * `parentTypeId` filter for direct children.
20
+ * - **`PATCH /v3/entity-types/{typeID}`** updates `description`,
21
+ * `parentTypeID`, and/or `attributeSchema`. The `name` is immutable.
22
+ * - **`DELETE /v3/entity-types/{typeID}`** soft-deletes a type. The request
23
+ * is rejected with `409 Conflict` while any live entity is assigned to
24
+ * the type or any live child type points at it.
25
+ */
26
+ export declare class EntityTypes extends APIResource {
27
+ reviewers: ReviewersAPI.Reviewers;
28
+ /**
29
+ * Create an Entity Type
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const entityType = await client.entityTypes.create({
34
+ * name: 'Drug',
35
+ * description: 'A pharmaceutical compound',
36
+ * });
37
+ * ```
38
+ */
39
+ create(body: EntityTypeCreateParams, options?: RequestOptions): APIPromise<EntityTypeCreateResponse>;
40
+ /**
41
+ * Get an Entity Type
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const entityType = await client.entityTypes.retrieve(
46
+ * 'typeID',
47
+ * );
48
+ * ```
49
+ */
50
+ retrieve(typeID: string, options?: RequestOptions): APIPromise<EntityTypeRetrieveResponse>;
51
+ /**
52
+ * Update an Entity Type
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const entityType = await client.entityTypes.update(
57
+ * 'typeID',
58
+ * );
59
+ * ```
60
+ */
61
+ update(typeID: string, body: EntityTypeUpdateParams, options?: RequestOptions): APIPromise<EntityTypeUpdateResponse>;
62
+ /**
63
+ * List Entity Types
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * const entityTypes = await client.entityTypes.list();
68
+ * ```
69
+ */
70
+ list(query?: EntityTypeListParams | null | undefined, options?: RequestOptions): APIPromise<EntityTypeListResponse>;
71
+ /**
72
+ * Delete an Entity Type
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * await client.entityTypes.delete('typeID');
77
+ * ```
78
+ */
79
+ delete(typeID: string, options?: RequestOptions): APIPromise<void>;
80
+ }
81
+ /**
82
+ * An EntityType is a customer-defined type in the knowledge-graph taxonomy, scoped
83
+ * to an account+environment. Types may be organised into hierarchies via
84
+ * `parentTypeID`, and may carry per-type structured attribute metadata in
85
+ * `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
86
+ */
87
+ export interface EntityTypeCreateResponse {
88
+ /**
89
+ * Creation timestamp (RFC 3339).
90
+ */
91
+ createdAt: string;
92
+ /**
93
+ * Optional human-facing note about the type.
94
+ */
95
+ description: string;
96
+ /**
97
+ * Human-facing type name. Unique within an account+environment, and immutable once
98
+ * set.
99
+ */
100
+ name: string;
101
+ /**
102
+ * Public ID (`ety_...`) of the parent type, or an empty string when the type is
103
+ * top-level.
104
+ */
105
+ parentTypeID: string;
106
+ /**
107
+ * Stable public identifier for the entity type (`ety_...`).
108
+ */
109
+ typeID: string;
110
+ /**
111
+ * Last-update timestamp (RFC 3339).
112
+ */
113
+ updatedAt: string;
114
+ /**
115
+ * Optional per-type structured attribute metadata.
116
+ */
117
+ attributeSchema?: unknown;
118
+ }
119
+ /**
120
+ * An EntityType is a customer-defined type in the knowledge-graph taxonomy, scoped
121
+ * to an account+environment. Types may be organised into hierarchies via
122
+ * `parentTypeID`, and may carry per-type structured attribute metadata in
123
+ * `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
124
+ */
125
+ export interface EntityTypeRetrieveResponse {
126
+ /**
127
+ * Creation timestamp (RFC 3339).
128
+ */
129
+ createdAt: string;
130
+ /**
131
+ * Optional human-facing note about the type.
132
+ */
133
+ description: string;
134
+ /**
135
+ * Human-facing type name. Unique within an account+environment, and immutable once
136
+ * set.
137
+ */
138
+ name: string;
139
+ /**
140
+ * Public ID (`ety_...`) of the parent type, or an empty string when the type is
141
+ * top-level.
142
+ */
143
+ parentTypeID: string;
144
+ /**
145
+ * Stable public identifier for the entity type (`ety_...`).
146
+ */
147
+ typeID: string;
148
+ /**
149
+ * Last-update timestamp (RFC 3339).
150
+ */
151
+ updatedAt: string;
152
+ /**
153
+ * Optional per-type structured attribute metadata.
154
+ */
155
+ attributeSchema?: unknown;
156
+ }
157
+ /**
158
+ * An EntityType is a customer-defined type in the knowledge-graph taxonomy, scoped
159
+ * to an account+environment. Types may be organised into hierarchies via
160
+ * `parentTypeID`, and may carry per-type structured attribute metadata in
161
+ * `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
162
+ */
163
+ export interface EntityTypeUpdateResponse {
164
+ /**
165
+ * Creation timestamp (RFC 3339).
166
+ */
167
+ createdAt: string;
168
+ /**
169
+ * Optional human-facing note about the type.
170
+ */
171
+ description: string;
172
+ /**
173
+ * Human-facing type name. Unique within an account+environment, and immutable once
174
+ * set.
175
+ */
176
+ name: string;
177
+ /**
178
+ * Public ID (`ety_...`) of the parent type, or an empty string when the type is
179
+ * top-level.
180
+ */
181
+ parentTypeID: string;
182
+ /**
183
+ * Stable public identifier for the entity type (`ety_...`).
184
+ */
185
+ typeID: string;
186
+ /**
187
+ * Last-update timestamp (RFC 3339).
188
+ */
189
+ updatedAt: string;
190
+ /**
191
+ * Optional per-type structured attribute metadata.
192
+ */
193
+ attributeSchema?: unknown;
194
+ }
195
+ /**
196
+ * Response body for listing entity types.
197
+ */
198
+ export interface EntityTypeListResponse {
199
+ entityTypes: Array<EntityTypeListResponse.EntityType>;
200
+ /**
201
+ * Total number of entity types matching the query, ignoring pagination.
202
+ */
203
+ totalCount: number;
204
+ }
205
+ export declare namespace EntityTypeListResponse {
206
+ /**
207
+ * An EntityType is a customer-defined type in the knowledge-graph taxonomy, scoped
208
+ * to an account+environment. Types may be organised into hierarchies via
209
+ * `parentTypeID`, and may carry per-type structured attribute metadata in
210
+ * `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
211
+ */
212
+ interface EntityType {
213
+ /**
214
+ * Creation timestamp (RFC 3339).
215
+ */
216
+ createdAt: string;
217
+ /**
218
+ * Optional human-facing note about the type.
219
+ */
220
+ description: string;
221
+ /**
222
+ * Human-facing type name. Unique within an account+environment, and immutable once
223
+ * set.
224
+ */
225
+ name: string;
226
+ /**
227
+ * Public ID (`ety_...`) of the parent type, or an empty string when the type is
228
+ * top-level.
229
+ */
230
+ parentTypeID: string;
231
+ /**
232
+ * Stable public identifier for the entity type (`ety_...`).
233
+ */
234
+ typeID: string;
235
+ /**
236
+ * Last-update timestamp (RFC 3339).
237
+ */
238
+ updatedAt: string;
239
+ /**
240
+ * Optional per-type structured attribute metadata.
241
+ */
242
+ attributeSchema?: unknown;
243
+ }
244
+ }
245
+ export interface EntityTypeCreateParams {
246
+ /**
247
+ * Type name. Required and unique within the account+environment.
248
+ */
249
+ name: string;
250
+ /**
251
+ * Optional per-type structured attribute metadata.
252
+ */
253
+ attributeSchema?: unknown;
254
+ /**
255
+ * Optional description.
256
+ */
257
+ description?: string;
258
+ /**
259
+ * Optional public ID (`ety_...`) of the parent type. Must belong to the same
260
+ * account+environment.
261
+ */
262
+ parentTypeID?: string;
263
+ }
264
+ export interface EntityTypeUpdateParams {
265
+ /**
266
+ * New per-type structured attribute metadata.
267
+ */
268
+ attributeSchema?: unknown;
269
+ /**
270
+ * New description.
271
+ */
272
+ description?: string;
273
+ /**
274
+ * New parent type public ID (`ety_...`), or an empty string to clear the parent
275
+ * (promote to top-level). Must belong to the same account+environment and may not
276
+ * be the type itself.
277
+ */
278
+ parentTypeID?: string;
279
+ }
280
+ export interface EntityTypeListParams {
281
+ /**
282
+ * Cursor: return types whose `typeID` sorts before this value.
283
+ */
284
+ endingBefore?: string;
285
+ /**
286
+ * Maximum number of entity types to return (default 50, max 200).
287
+ */
288
+ limit?: number;
289
+ /**
290
+ * Filter to the direct children of this parent type (`ety_...`).
291
+ */
292
+ parentTypeId?: string;
293
+ /**
294
+ * Cursor: return types whose `typeID` sorts after this value.
295
+ */
296
+ startingAfter?: string;
297
+ }
298
+ export declare namespace EntityTypes {
299
+ export { type EntityTypeCreateResponse as EntityTypeCreateResponse, type EntityTypeRetrieveResponse as EntityTypeRetrieveResponse, type EntityTypeUpdateResponse as EntityTypeUpdateResponse, type EntityTypeListResponse as EntityTypeListResponse, type EntityTypeCreateParams as EntityTypeCreateParams, type EntityTypeUpdateParams as EntityTypeUpdateParams, type EntityTypeListParams as EntityTypeListParams, };
300
+ export { Reviewers as Reviewers, type ReviewerListResponse as ReviewerListResponse, type ReviewerAssignResponse as ReviewerAssignResponse, type ReviewerAssignParams as ReviewerAssignParams, type ReviewerRemoveParams as ReviewerRemoveParams, };
301
+ }
302
+ //# sourceMappingURL=entity-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-types.d.mts","sourceRoot":"","sources":["../../src/resources/entity-types/entity-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,YAAY,wBAAoB;AAC5C,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACV,wBAAoB;AACrB,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;;;;;;;;;;;;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H,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAID,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,SAAS,IAAI,SAAS,EACtB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -0,0 +1,302 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as ReviewersAPI from "./reviewers.js";
3
+ import { ReviewerAssignParams, ReviewerAssignResponse, ReviewerListResponse, ReviewerRemoveParams, Reviewers } from "./reviewers.js";
4
+ import { APIPromise } from "../../core/api-promise.js";
5
+ import { RequestOptions } from "../../internal/request-options.js";
6
+ /**
7
+ * Entity Types are the customer-defined taxonomy for the knowledge graph,
8
+ * scoped to an account+environment. Each type has a unique, immutable name
9
+ * and can be organised into hierarchies via `parentTypeID`. A type may
10
+ * carry per-type structured attribute metadata in `attributeSchema` (for
11
+ * example `{"unit": "mg", "range": [0, 100]}`).
12
+ *
13
+ * Use these endpoints to create, list, fetch, update, and delete entity
14
+ * types:
15
+ *
16
+ * - **`POST /v3/entity-types`** creates a type, optionally under a parent.
17
+ * - **`GET /v3/entity-types`** lists types with cursor pagination
18
+ * (`startingAfter` / `endingBefore` over `typeID`) and an optional
19
+ * `parentTypeId` filter for direct children.
20
+ * - **`PATCH /v3/entity-types/{typeID}`** updates `description`,
21
+ * `parentTypeID`, and/or `attributeSchema`. The `name` is immutable.
22
+ * - **`DELETE /v3/entity-types/{typeID}`** soft-deletes a type. The request
23
+ * is rejected with `409 Conflict` while any live entity is assigned to
24
+ * the type or any live child type points at it.
25
+ */
26
+ export declare class EntityTypes extends APIResource {
27
+ reviewers: ReviewersAPI.Reviewers;
28
+ /**
29
+ * Create an Entity Type
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const entityType = await client.entityTypes.create({
34
+ * name: 'Drug',
35
+ * description: 'A pharmaceutical compound',
36
+ * });
37
+ * ```
38
+ */
39
+ create(body: EntityTypeCreateParams, options?: RequestOptions): APIPromise<EntityTypeCreateResponse>;
40
+ /**
41
+ * Get an Entity Type
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const entityType = await client.entityTypes.retrieve(
46
+ * 'typeID',
47
+ * );
48
+ * ```
49
+ */
50
+ retrieve(typeID: string, options?: RequestOptions): APIPromise<EntityTypeRetrieveResponse>;
51
+ /**
52
+ * Update an Entity Type
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const entityType = await client.entityTypes.update(
57
+ * 'typeID',
58
+ * );
59
+ * ```
60
+ */
61
+ update(typeID: string, body: EntityTypeUpdateParams, options?: RequestOptions): APIPromise<EntityTypeUpdateResponse>;
62
+ /**
63
+ * List Entity Types
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * const entityTypes = await client.entityTypes.list();
68
+ * ```
69
+ */
70
+ list(query?: EntityTypeListParams | null | undefined, options?: RequestOptions): APIPromise<EntityTypeListResponse>;
71
+ /**
72
+ * Delete an Entity Type
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * await client.entityTypes.delete('typeID');
77
+ * ```
78
+ */
79
+ delete(typeID: string, options?: RequestOptions): APIPromise<void>;
80
+ }
81
+ /**
82
+ * An EntityType is a customer-defined type in the knowledge-graph taxonomy, scoped
83
+ * to an account+environment. Types may be organised into hierarchies via
84
+ * `parentTypeID`, and may carry per-type structured attribute metadata in
85
+ * `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
86
+ */
87
+ export interface EntityTypeCreateResponse {
88
+ /**
89
+ * Creation timestamp (RFC 3339).
90
+ */
91
+ createdAt: string;
92
+ /**
93
+ * Optional human-facing note about the type.
94
+ */
95
+ description: string;
96
+ /**
97
+ * Human-facing type name. Unique within an account+environment, and immutable once
98
+ * set.
99
+ */
100
+ name: string;
101
+ /**
102
+ * Public ID (`ety_...`) of the parent type, or an empty string when the type is
103
+ * top-level.
104
+ */
105
+ parentTypeID: string;
106
+ /**
107
+ * Stable public identifier for the entity type (`ety_...`).
108
+ */
109
+ typeID: string;
110
+ /**
111
+ * Last-update timestamp (RFC 3339).
112
+ */
113
+ updatedAt: string;
114
+ /**
115
+ * Optional per-type structured attribute metadata.
116
+ */
117
+ attributeSchema?: unknown;
118
+ }
119
+ /**
120
+ * An EntityType is a customer-defined type in the knowledge-graph taxonomy, scoped
121
+ * to an account+environment. Types may be organised into hierarchies via
122
+ * `parentTypeID`, and may carry per-type structured attribute metadata in
123
+ * `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
124
+ */
125
+ export interface EntityTypeRetrieveResponse {
126
+ /**
127
+ * Creation timestamp (RFC 3339).
128
+ */
129
+ createdAt: string;
130
+ /**
131
+ * Optional human-facing note about the type.
132
+ */
133
+ description: string;
134
+ /**
135
+ * Human-facing type name. Unique within an account+environment, and immutable once
136
+ * set.
137
+ */
138
+ name: string;
139
+ /**
140
+ * Public ID (`ety_...`) of the parent type, or an empty string when the type is
141
+ * top-level.
142
+ */
143
+ parentTypeID: string;
144
+ /**
145
+ * Stable public identifier for the entity type (`ety_...`).
146
+ */
147
+ typeID: string;
148
+ /**
149
+ * Last-update timestamp (RFC 3339).
150
+ */
151
+ updatedAt: string;
152
+ /**
153
+ * Optional per-type structured attribute metadata.
154
+ */
155
+ attributeSchema?: unknown;
156
+ }
157
+ /**
158
+ * An EntityType is a customer-defined type in the knowledge-graph taxonomy, scoped
159
+ * to an account+environment. Types may be organised into hierarchies via
160
+ * `parentTypeID`, and may carry per-type structured attribute metadata in
161
+ * `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
162
+ */
163
+ export interface EntityTypeUpdateResponse {
164
+ /**
165
+ * Creation timestamp (RFC 3339).
166
+ */
167
+ createdAt: string;
168
+ /**
169
+ * Optional human-facing note about the type.
170
+ */
171
+ description: string;
172
+ /**
173
+ * Human-facing type name. Unique within an account+environment, and immutable once
174
+ * set.
175
+ */
176
+ name: string;
177
+ /**
178
+ * Public ID (`ety_...`) of the parent type, or an empty string when the type is
179
+ * top-level.
180
+ */
181
+ parentTypeID: string;
182
+ /**
183
+ * Stable public identifier for the entity type (`ety_...`).
184
+ */
185
+ typeID: string;
186
+ /**
187
+ * Last-update timestamp (RFC 3339).
188
+ */
189
+ updatedAt: string;
190
+ /**
191
+ * Optional per-type structured attribute metadata.
192
+ */
193
+ attributeSchema?: unknown;
194
+ }
195
+ /**
196
+ * Response body for listing entity types.
197
+ */
198
+ export interface EntityTypeListResponse {
199
+ entityTypes: Array<EntityTypeListResponse.EntityType>;
200
+ /**
201
+ * Total number of entity types matching the query, ignoring pagination.
202
+ */
203
+ totalCount: number;
204
+ }
205
+ export declare namespace EntityTypeListResponse {
206
+ /**
207
+ * An EntityType is a customer-defined type in the knowledge-graph taxonomy, scoped
208
+ * to an account+environment. Types may be organised into hierarchies via
209
+ * `parentTypeID`, and may carry per-type structured attribute metadata in
210
+ * `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
211
+ */
212
+ interface EntityType {
213
+ /**
214
+ * Creation timestamp (RFC 3339).
215
+ */
216
+ createdAt: string;
217
+ /**
218
+ * Optional human-facing note about the type.
219
+ */
220
+ description: string;
221
+ /**
222
+ * Human-facing type name. Unique within an account+environment, and immutable once
223
+ * set.
224
+ */
225
+ name: string;
226
+ /**
227
+ * Public ID (`ety_...`) of the parent type, or an empty string when the type is
228
+ * top-level.
229
+ */
230
+ parentTypeID: string;
231
+ /**
232
+ * Stable public identifier for the entity type (`ety_...`).
233
+ */
234
+ typeID: string;
235
+ /**
236
+ * Last-update timestamp (RFC 3339).
237
+ */
238
+ updatedAt: string;
239
+ /**
240
+ * Optional per-type structured attribute metadata.
241
+ */
242
+ attributeSchema?: unknown;
243
+ }
244
+ }
245
+ export interface EntityTypeCreateParams {
246
+ /**
247
+ * Type name. Required and unique within the account+environment.
248
+ */
249
+ name: string;
250
+ /**
251
+ * Optional per-type structured attribute metadata.
252
+ */
253
+ attributeSchema?: unknown;
254
+ /**
255
+ * Optional description.
256
+ */
257
+ description?: string;
258
+ /**
259
+ * Optional public ID (`ety_...`) of the parent type. Must belong to the same
260
+ * account+environment.
261
+ */
262
+ parentTypeID?: string;
263
+ }
264
+ export interface EntityTypeUpdateParams {
265
+ /**
266
+ * New per-type structured attribute metadata.
267
+ */
268
+ attributeSchema?: unknown;
269
+ /**
270
+ * New description.
271
+ */
272
+ description?: string;
273
+ /**
274
+ * New parent type public ID (`ety_...`), or an empty string to clear the parent
275
+ * (promote to top-level). Must belong to the same account+environment and may not
276
+ * be the type itself.
277
+ */
278
+ parentTypeID?: string;
279
+ }
280
+ export interface EntityTypeListParams {
281
+ /**
282
+ * Cursor: return types whose `typeID` sorts before this value.
283
+ */
284
+ endingBefore?: string;
285
+ /**
286
+ * Maximum number of entity types to return (default 50, max 200).
287
+ */
288
+ limit?: number;
289
+ /**
290
+ * Filter to the direct children of this parent type (`ety_...`).
291
+ */
292
+ parentTypeId?: string;
293
+ /**
294
+ * Cursor: return types whose `typeID` sorts after this value.
295
+ */
296
+ startingAfter?: string;
297
+ }
298
+ export declare namespace EntityTypes {
299
+ export { type EntityTypeCreateResponse as EntityTypeCreateResponse, type EntityTypeRetrieveResponse as EntityTypeRetrieveResponse, type EntityTypeUpdateResponse as EntityTypeUpdateResponse, type EntityTypeListResponse as EntityTypeListResponse, type EntityTypeCreateParams as EntityTypeCreateParams, type EntityTypeUpdateParams as EntityTypeUpdateParams, type EntityTypeListParams as EntityTypeListParams, };
300
+ export { Reviewers as Reviewers, type ReviewerListResponse as ReviewerListResponse, type ReviewerAssignResponse as ReviewerAssignResponse, type ReviewerAssignParams as ReviewerAssignParams, type ReviewerRemoveParams as ReviewerRemoveParams, };
301
+ }
302
+ //# sourceMappingURL=entity-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-types.d.ts","sourceRoot":"","sources":["../../src/resources/entity-types/entity-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,YAAY,uBAAoB;AAC5C,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACV,uBAAoB;AACrB,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,SAAS,EAAE,YAAY,CAAC,SAAS,CAA4C;IAE7E;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAIpG;;;;;;;;;OASG;IACH,QAAQ,CAAC,MAAM,EA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