bem-ai-sdk 0.28.0 → 0.29.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 (126) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +10 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +10 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/buckets.d.mts +9 -113
  10. package/resources/buckets.d.mts.map +1 -1
  11. package/resources/buckets.d.ts +9 -113
  12. package/resources/buckets.d.ts.map +1 -1
  13. package/resources/buckets.js +3 -3
  14. package/resources/buckets.js.map +1 -1
  15. package/resources/buckets.mjs +3 -3
  16. package/resources/buckets.mjs.map +1 -1
  17. package/resources/entities/entities.d.mts +52 -103
  18. package/resources/entities/entities.d.mts.map +1 -1
  19. package/resources/entities/entities.d.ts +52 -103
  20. package/resources/entities/entities.d.ts.map +1 -1
  21. package/resources/entities/entities.js.map +1 -1
  22. package/resources/entities/entities.mjs.map +1 -1
  23. package/resources/entities/index.d.mts +1 -1
  24. package/resources/entities/index.d.mts.map +1 -1
  25. package/resources/entities/index.d.ts +1 -1
  26. package/resources/entities/index.d.ts.map +1 -1
  27. package/resources/entities/index.js.map +1 -1
  28. package/resources/entities/index.mjs.map +1 -1
  29. package/resources/entity-types/entity-types.d.mts +8 -124
  30. package/resources/entity-types/entity-types.d.mts.map +1 -1
  31. package/resources/entity-types/entity-types.d.ts +8 -124
  32. package/resources/entity-types/entity-types.d.ts.map +1 -1
  33. package/resources/entity-types/entity-types.js.map +1 -1
  34. package/resources/entity-types/entity-types.mjs.map +1 -1
  35. package/resources/entity-types/index.d.mts +2 -2
  36. package/resources/entity-types/index.d.mts.map +1 -1
  37. package/resources/entity-types/index.d.ts +2 -2
  38. package/resources/entity-types/index.d.ts.map +1 -1
  39. package/resources/entity-types/index.js.map +1 -1
  40. package/resources/entity-types/index.mjs.map +1 -1
  41. package/resources/entity-types/reviewers.d.mts +10 -39
  42. package/resources/entity-types/reviewers.d.mts.map +1 -1
  43. package/resources/entity-types/reviewers.d.ts +10 -39
  44. package/resources/entity-types/reviewers.d.ts.map +1 -1
  45. package/resources/entity-types/reviewers.js +1 -1
  46. package/resources/entity-types/reviewers.js.map +1 -1
  47. package/resources/entity-types/reviewers.mjs +1 -1
  48. package/resources/entity-types/reviewers.mjs.map +1 -1
  49. package/resources/eval/eval.d.mts +2 -2
  50. package/resources/eval/eval.d.mts.map +1 -1
  51. package/resources/eval/eval.d.ts +2 -2
  52. package/resources/eval/eval.d.ts.map +1 -1
  53. package/resources/eval/eval.js.map +1 -1
  54. package/resources/eval/eval.mjs.map +1 -1
  55. package/resources/eval/index.d.mts +1 -1
  56. package/resources/eval/index.d.mts.map +1 -1
  57. package/resources/eval/index.d.ts +1 -1
  58. package/resources/eval/index.d.ts.map +1 -1
  59. package/resources/eval/index.js.map +1 -1
  60. package/resources/eval/index.mjs.map +1 -1
  61. package/resources/eval/score.d.mts +60 -219
  62. package/resources/eval/score.d.mts.map +1 -1
  63. package/resources/eval/score.d.ts +60 -219
  64. package/resources/eval/score.d.ts.map +1 -1
  65. package/resources/eval/score.js +2 -2
  66. package/resources/eval/score.js.map +1 -1
  67. package/resources/eval/score.mjs +2 -2
  68. package/resources/eval/score.mjs.map +1 -1
  69. package/resources/functions/functions.d.mts +364 -1095
  70. package/resources/functions/functions.d.mts.map +1 -1
  71. package/resources/functions/functions.d.ts +364 -1095
  72. package/resources/functions/functions.d.ts.map +1 -1
  73. package/resources/functions/functions.js.map +1 -1
  74. package/resources/functions/functions.mjs.map +1 -1
  75. package/resources/functions/index.d.mts +1 -1
  76. package/resources/functions/index.d.mts.map +1 -1
  77. package/resources/functions/index.d.ts +1 -1
  78. package/resources/functions/index.d.ts.map +1 -1
  79. package/resources/functions/index.js.map +1 -1
  80. package/resources/functions/index.mjs.map +1 -1
  81. package/resources/functions/versions.d.mts +2 -108
  82. package/resources/functions/versions.d.mts.map +1 -1
  83. package/resources/functions/versions.d.ts +2 -108
  84. package/resources/functions/versions.d.ts.map +1 -1
  85. package/resources/index.d.mts +5 -5
  86. package/resources/index.d.mts.map +1 -1
  87. package/resources/index.d.ts +5 -5
  88. package/resources/index.d.ts.map +1 -1
  89. package/resources/index.js.map +1 -1
  90. package/resources/index.mjs.map +1 -1
  91. package/resources/outputs.d.mts +1 -1
  92. package/resources/outputs.d.mts.map +1 -1
  93. package/resources/outputs.d.ts +1 -1
  94. package/resources/outputs.d.ts.map +1 -1
  95. package/resources/views.d.mts +97 -745
  96. package/resources/views.d.mts.map +1 -1
  97. package/resources/views.d.ts +97 -745
  98. package/resources/views.d.ts.map +1 -1
  99. package/resources/workflows/workflows.d.mts +2 -19
  100. package/resources/workflows/workflows.d.mts.map +1 -1
  101. package/resources/workflows/workflows.d.ts +2 -19
  102. package/resources/workflows/workflows.d.ts.map +1 -1
  103. package/resources/workflows/workflows.js.map +1 -1
  104. package/resources/workflows/workflows.mjs.map +1 -1
  105. package/src/client.ts +38 -18
  106. package/src/resources/buckets.ts +9 -137
  107. package/src/resources/entities/entities.ts +61 -118
  108. package/src/resources/entities/index.ts +2 -0
  109. package/src/resources/entity-types/entity-types.ts +8 -151
  110. package/src/resources/entity-types/index.ts +2 -4
  111. package/src/resources/entity-types/reviewers.ts +11 -49
  112. package/src/resources/eval/eval.ts +8 -4
  113. package/src/resources/eval/index.ts +4 -2
  114. package/src/resources/eval/score.ts +66 -263
  115. package/src/resources/functions/functions.ts +411 -1249
  116. package/src/resources/functions/index.ts +8 -0
  117. package/src/resources/functions/versions.ts +2 -118
  118. package/src/resources/index.ts +19 -9
  119. package/src/resources/outputs.ts +1 -0
  120. package/src/resources/views.ts +118 -936
  121. package/src/resources/workflows/workflows.ts +2 -21
  122. package/src/version.ts +1 -1
  123. package/version.d.mts +1 -1
  124. package/version.d.ts +1 -1
  125. package/version.js +1 -1
  126. package/version.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
+ import * as EntitiesAPI from './entities';
4
5
  import * as SynonymsAPI from './synonyms';
5
6
  import { SynonymAddParams, SynonymAddResponse, SynonymRemoveParams, Synonyms } from './synonyms';
6
7
  import { APIPromise } from '../../core/api-promise';
@@ -98,6 +99,60 @@ export class Entities extends APIResource {
98
99
  }
99
100
  }
100
101
 
102
+ /**
103
+ * A compact view of an entity sitting on the far end of a relation edge — the
104
+ * stable public id, the canonical name, and the effective type. The full entity is
105
+ * fetched separately via the entity detail / File System endpoints.
106
+ */
107
+ export interface RelatedEntity {
108
+ /**
109
+ * Stable public identifier for the entity (`ent_...`).
110
+ */
111
+ id: string;
112
+
113
+ /**
114
+ * Canonical (most descriptive) surface form of the entity.
115
+ */
116
+ canonical: string;
117
+
118
+ /**
119
+ * Hops from the queried entity. This endpoint returns direct relations, so this is
120
+ * 1 (a self-loop's far end is the queried entity itself, 0).
121
+ */
122
+ depth: number;
123
+
124
+ /**
125
+ * Effective entity type.
126
+ */
127
+ type: string;
128
+ }
129
+
130
+ /**
131
+ * The outcome of seeding one row.
132
+ */
133
+ export interface SeedRowResult {
134
+ /**
135
+ * The canonical name from the input row.
136
+ */
137
+ canonical: string;
138
+
139
+ /**
140
+ * What happened to this row: `created` (new entity), `merged-with` (matched an
141
+ * existing entity), or `rejected` (see `reason`).
142
+ */
143
+ outcome: 'created' | 'merged-with' | 'rejected';
144
+
145
+ /**
146
+ * Public ID (`ent_...`) of the created or merged entity. Absent when rejected.
147
+ */
148
+ entityID?: string;
149
+
150
+ /**
151
+ * Human-readable explanation when `outcome` is `rejected`.
152
+ */
153
+ reason?: string;
154
+ }
155
+
101
156
  /**
102
157
  * An entity record, including its curation status and assigned type.
103
158
  */
@@ -170,7 +225,7 @@ export interface EntityBulkCreateResponse {
170
225
  /**
171
226
  * Per-row outcomes, in request order.
172
227
  */
173
- results: Array<EntityBulkCreateResponse.Result>;
228
+ results: Array<SeedRowResult>;
174
229
 
175
230
  /**
176
231
  * Per-outcome tally across a batch.
@@ -179,32 +234,6 @@ export interface EntityBulkCreateResponse {
179
234
  }
180
235
 
181
236
  export namespace EntityBulkCreateResponse {
182
- /**
183
- * The outcome of seeding one row.
184
- */
185
- export interface Result {
186
- /**
187
- * The canonical name from the input row.
188
- */
189
- canonical: string;
190
-
191
- /**
192
- * What happened to this row: `created` (new entity), `merged-with` (matched an
193
- * existing entity), or `rejected` (see `reason`).
194
- */
195
- outcome: 'created' | 'merged-with' | 'rejected';
196
-
197
- /**
198
- * Public ID (`ent_...`) of the created or merged entity. Absent when rejected.
199
- */
200
- entityID?: string;
201
-
202
- /**
203
- * Human-readable explanation when `outcome` is `rejected`.
204
- */
205
- reason?: string;
206
- }
207
-
208
237
  /**
209
238
  * Per-outcome tally across a batch.
210
239
  */
@@ -330,37 +359,7 @@ export namespace EntityRetrieveRelationsResponse {
330
359
  * stable public id, the canonical name, and the effective type. The full entity is
331
360
  * fetched separately via the entity detail / File System endpoints.
332
361
  */
333
- sourceEntity: Inbound.SourceEntity;
334
- }
335
-
336
- export namespace Inbound {
337
- /**
338
- * A compact view of an entity sitting on the far end of a relation edge — the
339
- * stable public id, the canonical name, and the effective type. The full entity is
340
- * fetched separately via the entity detail / File System endpoints.
341
- */
342
- export interface SourceEntity {
343
- /**
344
- * Stable public identifier for the entity (`ent_...`).
345
- */
346
- id: string;
347
-
348
- /**
349
- * Canonical (most descriptive) surface form of the entity.
350
- */
351
- canonical: string;
352
-
353
- /**
354
- * Hops from the queried entity. This endpoint returns direct relations, so this is
355
- * 1 (a self-loop's far end is the queried entity itself, 0).
356
- */
357
- depth: number;
358
-
359
- /**
360
- * Effective entity type.
361
- */
362
- type: string;
363
- }
362
+ sourceEntity: EntitiesAPI.RelatedEntity;
364
363
  }
365
364
 
366
365
  /**
@@ -387,37 +386,7 @@ export namespace EntityRetrieveRelationsResponse {
387
386
  * stable public id, the canonical name, and the effective type. The full entity is
388
387
  * fetched separately via the entity detail / File System endpoints.
389
388
  */
390
- targetEntity: Outbound.TargetEntity;
391
- }
392
-
393
- export namespace Outbound {
394
- /**
395
- * A compact view of an entity sitting on the far end of a relation edge — the
396
- * stable public id, the canonical name, and the effective type. The full entity is
397
- * fetched separately via the entity detail / File System endpoints.
398
- */
399
- export interface TargetEntity {
400
- /**
401
- * Stable public identifier for the entity (`ent_...`).
402
- */
403
- id: string;
404
-
405
- /**
406
- * Canonical (most descriptive) surface form of the entity.
407
- */
408
- canonical: string;
409
-
410
- /**
411
- * Hops from the queried entity. This endpoint returns direct relations, so this is
412
- * 1 (a self-loop's far end is the queried entity itself, 0).
413
- */
414
- depth: number;
415
-
416
- /**
417
- * Effective entity type.
418
- */
419
- type: string;
420
- }
389
+ targetEntity: EntitiesAPI.RelatedEntity;
421
390
  }
422
391
  }
423
392
 
@@ -463,35 +432,7 @@ export interface EntityRetrieveSeedStatusResponse {
463
432
  /**
464
433
  * Per-row outcomes. Present only once `status` is `completed`.
465
434
  */
466
- results?: Array<EntityRetrieveSeedStatusResponse.Result>;
467
- }
468
-
469
- export namespace EntityRetrieveSeedStatusResponse {
470
- /**
471
- * The outcome of seeding one row.
472
- */
473
- export interface Result {
474
- /**
475
- * The canonical name from the input row.
476
- */
477
- canonical: string;
478
-
479
- /**
480
- * What happened to this row: `created` (new entity), `merged-with` (matched an
481
- * existing entity), or `rejected` (see `reason`).
482
- */
483
- outcome: 'created' | 'merged-with' | 'rejected';
484
-
485
- /**
486
- * Public ID (`ent_...`) of the created or merged entity. Absent when rejected.
487
- */
488
- entityID?: string;
489
-
490
- /**
491
- * Human-readable explanation when `outcome` is `rejected`.
492
- */
493
- reason?: string;
494
- }
435
+ results?: Array<SeedRowResult>;
495
436
  }
496
437
 
497
438
  export interface EntityUpdateParams {
@@ -631,6 +572,8 @@ Entities.Synonyms = Synonyms;
631
572
 
632
573
  export declare namespace Entities {
633
574
  export {
575
+ type RelatedEntity as RelatedEntity,
576
+ type SeedRowResult as SeedRowResult,
634
577
  type EntityUpdateResponse as EntityUpdateResponse,
635
578
  type EntityBulkCreateResponse as EntityBulkCreateResponse,
636
579
  type EntityBulkValidateResponse as EntityBulkValidateResponse,
@@ -2,6 +2,8 @@
2
2
 
3
3
  export {
4
4
  Entities,
5
+ type RelatedEntity,
6
+ type SeedRowResult,
5
7
  type EntityUpdateResponse,
6
8
  type EntityBulkCreateResponse,
7
9
  type EntityBulkValidateResponse,
@@ -3,8 +3,8 @@
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as ReviewersAPI from './reviewers';
5
5
  import {
6
+ Reviewer,
6
7
  ReviewerAssignParams,
7
- ReviewerAssignResponse,
8
8
  ReviewerListResponse,
9
9
  ReviewerRemoveParams,
10
10
  Reviewers,
@@ -48,7 +48,7 @@ export class EntityTypes extends APIResource {
48
48
  * });
49
49
  * ```
50
50
  */
51
- create(body: EntityTypeCreateParams, options?: RequestOptions): APIPromise<EntityTypeCreateResponse> {
51
+ create(body: EntityTypeCreateParams, options?: RequestOptions): APIPromise<EntityType> {
52
52
  return this._client.post('/v3/entity-types', { body, ...options });
53
53
  }
54
54
 
@@ -62,7 +62,7 @@ export class EntityTypes extends APIResource {
62
62
  * );
63
63
  * ```
64
64
  */
65
- retrieve(typeID: string, options?: RequestOptions): APIPromise<EntityTypeRetrieveResponse> {
65
+ retrieve(typeID: string, options?: RequestOptions): APIPromise<EntityType> {
66
66
  return this._client.get(path`/v3/entity-types/${typeID}`, options);
67
67
  }
68
68
 
@@ -76,11 +76,7 @@ export class EntityTypes extends APIResource {
76
76
  * );
77
77
  * ```
78
78
  */
79
- update(
80
- typeID: string,
81
- body: EntityTypeUpdateParams,
82
- options?: RequestOptions,
83
- ): APIPromise<EntityTypeUpdateResponse> {
79
+ update(typeID: string, body: EntityTypeUpdateParams, options?: RequestOptions): APIPromise<EntityType> {
84
80
  return this._client.patch(path`/v3/entity-types/${typeID}`, { body, ...options });
85
81
  }
86
82
 
@@ -121,97 +117,7 @@ export class EntityTypes extends APIResource {
121
117
  * `parentTypeID`, and may carry per-type structured attribute metadata in
122
118
  * `attributeSchema` (for example `{"unit": "mg", "range": [0, 100]}`).
123
119
  */
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 {
120
+ export interface EntityType {
215
121
  /**
216
122
  * Creation timestamp (RFC 3339).
217
123
  */
@@ -254,7 +160,7 @@ export interface EntityTypeUpdateResponse {
254
160
  * Response body for listing entity types.
255
161
  */
256
162
  export interface EntityTypeListResponse {
257
- entityTypes: Array<EntityTypeListResponse.EntityType>;
163
+ entityTypes: Array<EntityType>;
258
164
 
259
165
  /**
260
166
  * Total number of entity types matching the query, ignoring pagination.
@@ -262,53 +168,6 @@ export interface EntityTypeListResponse {
262
168
  totalCount: number;
263
169
  }
264
170
 
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
171
  export interface EntityTypeCreateParams {
313
172
  /**
314
173
  * Type name. Required and unique within the account+environment.
@@ -377,9 +236,7 @@ EntityTypes.Reviewers = Reviewers;
377
236
 
378
237
  export declare namespace EntityTypes {
379
238
  export {
380
- type EntityTypeCreateResponse as EntityTypeCreateResponse,
381
- type EntityTypeRetrieveResponse as EntityTypeRetrieveResponse,
382
- type EntityTypeUpdateResponse as EntityTypeUpdateResponse,
239
+ type EntityType as EntityType,
383
240
  type EntityTypeListResponse as EntityTypeListResponse,
384
241
  type EntityTypeCreateParams as EntityTypeCreateParams,
385
242
  type EntityTypeUpdateParams as EntityTypeUpdateParams,
@@ -388,8 +245,8 @@ export declare namespace EntityTypes {
388
245
 
389
246
  export {
390
247
  Reviewers as Reviewers,
248
+ type Reviewer as Reviewer,
391
249
  type ReviewerListResponse as ReviewerListResponse,
392
- type ReviewerAssignResponse as ReviewerAssignResponse,
393
250
  type ReviewerAssignParams as ReviewerAssignParams,
394
251
  type ReviewerRemoveParams as ReviewerRemoveParams,
395
252
  };
@@ -2,9 +2,7 @@
2
2
 
3
3
  export {
4
4
  EntityTypes,
5
- type EntityTypeCreateResponse,
6
- type EntityTypeRetrieveResponse,
7
- type EntityTypeUpdateResponse,
5
+ type EntityType,
8
6
  type EntityTypeListResponse,
9
7
  type EntityTypeCreateParams,
10
8
  type EntityTypeUpdateParams,
@@ -12,8 +10,8 @@ export {
12
10
  } from './entity-types';
13
11
  export {
14
12
  Reviewers,
13
+ type Reviewer,
15
14
  type ReviewerListResponse,
16
- type ReviewerAssignResponse,
17
15
  type ReviewerAssignParams,
18
16
  type ReviewerRemoveParams,
19
17
  } from './reviewers';
@@ -45,17 +45,13 @@ export class Reviewers extends APIResource {
45
45
  *
46
46
  * @example
47
47
  * ```ts
48
- * const response = await client.entityTypes.reviewers.assign(
48
+ * const reviewer = await client.entityTypes.reviewers.assign(
49
49
  * 'typeID',
50
50
  * { userID: 'usr_2xyz...' },
51
51
  * );
52
52
  * ```
53
53
  */
54
- assign(
55
- typeID: string,
56
- body: ReviewerAssignParams,
57
- options?: RequestOptions,
58
- ): APIPromise<ReviewerAssignResponse> {
54
+ assign(typeID: string, body: ReviewerAssignParams, options?: RequestOptions): APIPromise<Reviewer> {
59
55
  return this._client.post(path`/v3/entity-types/${typeID}/reviewers`, { body, ...options });
60
56
  }
61
57
 
@@ -78,53 +74,12 @@ export class Reviewers extends APIResource {
78
74
  }
79
75
  }
80
76
 
81
- /**
82
- * Response body for listing the reviewers of an entity type.
83
- */
84
- export interface ReviewerListResponse {
85
- reviewers: Array<ReviewerListResponse.Reviewer>;
86
- }
87
-
88
- export namespace ReviewerListResponse {
89
- /**
90
- * A reviewer assignment links a user to an entity type they are responsible for
91
- * reviewing. The assignment is scoped to an account+environment and is unique per
92
- * (entity type, user).
93
- */
94
- export interface Reviewer {
95
- /**
96
- * When the assignment was created (RFC 3339).
97
- */
98
- createdAt: string;
99
-
100
- /**
101
- * The assigned user's email.
102
- */
103
- email: string;
104
-
105
- /**
106
- * Stable public identifier for the assignment (`etr_...`).
107
- */
108
- reviewerID: string;
109
-
110
- /**
111
- * The assigned user's account role (for example `operator`, `admin`).
112
- */
113
- role: string;
114
-
115
- /**
116
- * Public identifier of the assigned user (`usr_...`).
117
- */
118
- userID: string;
119
- }
120
- }
121
-
122
77
  /**
123
78
  * A reviewer assignment links a user to an entity type they are responsible for
124
79
  * reviewing. The assignment is scoped to an account+environment and is unique per
125
80
  * (entity type, user).
126
81
  */
127
- export interface ReviewerAssignResponse {
82
+ export interface Reviewer {
128
83
  /**
129
84
  * When the assignment was created (RFC 3339).
130
85
  */
@@ -151,6 +106,13 @@ export interface ReviewerAssignResponse {
151
106
  userID: string;
152
107
  }
153
108
 
109
+ /**
110
+ * Response body for listing the reviewers of an entity type.
111
+ */
112
+ export interface ReviewerListResponse {
113
+ reviewers: Array<Reviewer>;
114
+ }
115
+
154
116
  export interface ReviewerAssignParams {
155
117
  /**
156
118
  * Public ID (`usr_...`) of the user to assign. Must belong to the account.
@@ -167,8 +129,8 @@ export interface ReviewerRemoveParams {
167
129
 
168
130
  export declare namespace Reviewers {
169
131
  export {
132
+ type Reviewer as Reviewer,
170
133
  type ReviewerListResponse as ReviewerListResponse,
171
- type ReviewerAssignResponse as ReviewerAssignResponse,
172
134
  type ReviewerAssignParams as ReviewerAssignParams,
173
135
  type ReviewerRemoveParams as ReviewerRemoveParams,
174
136
  };
@@ -5,11 +5,13 @@ import * as ResultsAPI from './results';
5
5
  import { EvaluationResults, ResultRetrieveResultsParams, Results } from './results';
6
6
  import * as ScoreAPI from './score';
7
7
  import {
8
+ EvalMatchConfig,
9
+ EvalScoreRun,
10
+ EvalScoreRunStatus,
11
+ FileInput,
8
12
  Score,
9
- ScoreCancelResponse,
10
13
  ScoreCreateParams,
11
14
  ScoreCreateResponse,
12
- ScoreRetrieveResponse,
13
15
  } from './score';
14
16
  import { APIPromise } from '../../core/api-promise';
15
17
  import { RequestOptions } from '../../internal/request-options';
@@ -144,9 +146,11 @@ export declare namespace Eval {
144
146
 
145
147
  export {
146
148
  Score as Score,
149
+ type EvalMatchConfig as EvalMatchConfig,
150
+ type EvalScoreRun as EvalScoreRun,
151
+ type EvalScoreRunStatus as EvalScoreRunStatus,
152
+ type FileInput as FileInput,
147
153
  type ScoreCreateResponse as ScoreCreateResponse,
148
- type ScoreRetrieveResponse as ScoreRetrieveResponse,
149
- type ScoreCancelResponse as ScoreCancelResponse,
150
154
  type ScoreCreateParams as ScoreCreateParams,
151
155
  };
152
156
  }
@@ -4,8 +4,10 @@ export { Eval, type EvalTriggerEvaluationResponse, type EvalTriggerEvaluationPar
4
4
  export { Results, type EvaluationResults, type ResultRetrieveResultsParams } from './results';
5
5
  export {
6
6
  Score,
7
+ type EvalMatchConfig,
8
+ type EvalScoreRun,
9
+ type EvalScoreRunStatus,
10
+ type FileInput,
7
11
  type ScoreCreateResponse,
8
- type ScoreRetrieveResponse,
9
- type ScoreCancelResponse,
10
12
  type ScoreCreateParams,
11
13
  } from './score';