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,192 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* The reviewer-facing read surface for entity curation, available on the
|
|
6
|
+
* dashboard (JWT) only.
|
|
7
|
+
*
|
|
8
|
+
* - **`GET /v3/review-queue`** returns a cursor-paginated set of entities
|
|
9
|
+
* awaiting curation, scoped to your account+environment (and optional
|
|
10
|
+
* `bucket`). Each row is a full entity plus a small preview (up to 2) of
|
|
11
|
+
* its first mentions, so a reviewer can triage without opening every
|
|
12
|
+
* entity.
|
|
13
|
+
*
|
|
14
|
+
* Filters AND together. `status` (repeatable) defaults to the pre-terminal
|
|
15
|
+
* states `extracted` + `proposed` when omitted. `type` (repeatable `ety_…`
|
|
16
|
+
* IDs) matches the entity's *effective* type — its assigned type id, or, for
|
|
17
|
+
* entities with no assigned type, its bem-inferred type name. `assignedTo`
|
|
18
|
+
* (`me` or a `usr_…` ID) restricts to entities whose effective type the user
|
|
19
|
+
* reviews. `since` (RFC3339) filters by creation time. Pagination is
|
|
20
|
+
* cursor-based on `entityID` ascending; default limit 50, maximum 200.
|
|
21
|
+
*/
|
|
22
|
+
export declare class ReviewQueue extends APIResource {
|
|
23
|
+
/**
|
|
24
|
+
* **List entities awaiting curation, for a human reviewer's queue.**
|
|
25
|
+
*
|
|
26
|
+
* Returns a cursor-paginated set of entities scoped to your account+environment
|
|
27
|
+
* (and optional `bucket`), each carrying a small preview of its first mentions so
|
|
28
|
+
* a reviewer can triage without opening every entity. All filters AND together.
|
|
29
|
+
*
|
|
30
|
+
* - **`status`** (repeatable) restricts to the given lifecycle states. Omitting it
|
|
31
|
+
* defaults to the pre-terminal states `extracted` and `proposed`.
|
|
32
|
+
* - **`type`** (repeatable, `ety_...` IDs) matches the entity's _effective_ type:
|
|
33
|
+
* an entity matches when its assigned type is one of these IDs, or it has no
|
|
34
|
+
* assigned type and its bem-inferred type name matches one of them.
|
|
35
|
+
* - **`assignedTo`** (`me` or a `usr_...` ID) restricts to entities whose
|
|
36
|
+
* effective type the given user reviews. `me` resolves to the calling user.
|
|
37
|
+
* - **`since`** (RFC3339) restricts to entities created at or after the time.
|
|
38
|
+
*
|
|
39
|
+
* Pagination is cursor-based on `entityID` ascending; default limit is 50,
|
|
40
|
+
* maximum 200.
|
|
41
|
+
*/
|
|
42
|
+
list(query?: ReviewQueueListParams | null | undefined, options?: RequestOptions): APIPromise<ReviewQueueListResponse>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* `GET /v3/review-queue` response. Cursor-paginated by `entityID` ascending.
|
|
46
|
+
*/
|
|
47
|
+
export interface ReviewQueueListResponse {
|
|
48
|
+
/**
|
|
49
|
+
* The page of entities awaiting curation.
|
|
50
|
+
*/
|
|
51
|
+
entities: Array<ReviewQueueListResponse.Entity>;
|
|
52
|
+
/**
|
|
53
|
+
* Whether more rows exist beyond this page.
|
|
54
|
+
*/
|
|
55
|
+
hasMore: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Opaque cursor to pass as `?cursor=` for the next page. Empty when `hasMore` is
|
|
58
|
+
* false.
|
|
59
|
+
*/
|
|
60
|
+
nextCursor?: string;
|
|
61
|
+
}
|
|
62
|
+
export declare namespace ReviewQueueListResponse {
|
|
63
|
+
/**
|
|
64
|
+
* One row of the review queue: an entity plus a small preview of its mentions.
|
|
65
|
+
*/
|
|
66
|
+
interface Entity {
|
|
67
|
+
/**
|
|
68
|
+
* The canonical (longest / most descriptive) surface form.
|
|
69
|
+
*/
|
|
70
|
+
canonical: string;
|
|
71
|
+
/**
|
|
72
|
+
* When the entity was created.
|
|
73
|
+
*/
|
|
74
|
+
createdAt: string;
|
|
75
|
+
/**
|
|
76
|
+
* Public ID (`ent_...`) of the entity.
|
|
77
|
+
*/
|
|
78
|
+
entityID: string;
|
|
79
|
+
/**
|
|
80
|
+
* Total mentions across all parsed documents.
|
|
81
|
+
*/
|
|
82
|
+
mentionCount: number;
|
|
83
|
+
/**
|
|
84
|
+
* A capped preview (up to 2) of the entity's first mentions, ordered by page then
|
|
85
|
+
* time, so a reviewer can triage without opening each entity.
|
|
86
|
+
*/
|
|
87
|
+
previewMentions: Array<Entity.PreviewMention>;
|
|
88
|
+
/**
|
|
89
|
+
* Curation lifecycle state: `extracted`, `proposed`, `approved`, `rejected`.
|
|
90
|
+
*/
|
|
91
|
+
status: string;
|
|
92
|
+
/**
|
|
93
|
+
* Distinct surface forms that have resolved to this entity.
|
|
94
|
+
*/
|
|
95
|
+
surfaceForms: Array<string>;
|
|
96
|
+
/**
|
|
97
|
+
* The effective type name (assigned override if set, else bem-inferred).
|
|
98
|
+
*/
|
|
99
|
+
type: string;
|
|
100
|
+
/**
|
|
101
|
+
* When the entity was last updated.
|
|
102
|
+
*/
|
|
103
|
+
updatedAt: string;
|
|
104
|
+
/**
|
|
105
|
+
* Free-form description of the entity, when present.
|
|
106
|
+
*/
|
|
107
|
+
description?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Public ID (`ety_...`) of the customer-assigned type, when one is set.
|
|
110
|
+
*/
|
|
111
|
+
typeID?: string;
|
|
112
|
+
/**
|
|
113
|
+
* When a human approved/rejected the entity. Omitted while un-validated.
|
|
114
|
+
*/
|
|
115
|
+
validatedAt?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Public ID (`usr_...`) of the user who validated the entity, when known.
|
|
118
|
+
*/
|
|
119
|
+
validatedByUserID?: string;
|
|
120
|
+
}
|
|
121
|
+
namespace Entity {
|
|
122
|
+
/**
|
|
123
|
+
* A single per-document occurrence of an entity, used in review-queue previews.
|
|
124
|
+
*/
|
|
125
|
+
interface PreviewMention {
|
|
126
|
+
/**
|
|
127
|
+
* When this mention was recorded.
|
|
128
|
+
*/
|
|
129
|
+
createdAt: string;
|
|
130
|
+
/**
|
|
131
|
+
* Public ID (`ent_...`) of the entity this mention resolves to.
|
|
132
|
+
*/
|
|
133
|
+
entityID: string;
|
|
134
|
+
/**
|
|
135
|
+
* Public ID (`emn_...`) of this mention.
|
|
136
|
+
*/
|
|
137
|
+
mentionID: string;
|
|
138
|
+
/**
|
|
139
|
+
* 1-indexed page number within the source document.
|
|
140
|
+
*/
|
|
141
|
+
page: number;
|
|
142
|
+
/**
|
|
143
|
+
* The user-provided document handle this mention came from.
|
|
144
|
+
*/
|
|
145
|
+
referenceID: string;
|
|
146
|
+
/**
|
|
147
|
+
* The exact surface string Parse extracted on the page.
|
|
148
|
+
*/
|
|
149
|
+
surface: string;
|
|
150
|
+
/**
|
|
151
|
+
* The parse-emitted section label this mention sat under, when present.
|
|
152
|
+
*/
|
|
153
|
+
sectionLabel?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Public ID of the parse transformation that produced this mention, when known.
|
|
156
|
+
*/
|
|
157
|
+
transformationID?: string;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
export interface ReviewQueueListParams {
|
|
162
|
+
/**
|
|
163
|
+
* `me` or a `usr_...` ID — restrict to entities whose effective type that user
|
|
164
|
+
* reviews.
|
|
165
|
+
*/
|
|
166
|
+
assignedTo?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Optional bucket public ID (`bkt_...`) to scope to. Omit for all buckets.
|
|
169
|
+
*/
|
|
170
|
+
bucket?: string;
|
|
171
|
+
/**
|
|
172
|
+
* Cursor — an `entityID` defining your place in the list.
|
|
173
|
+
*/
|
|
174
|
+
cursor?: string;
|
|
175
|
+
limit?: number;
|
|
176
|
+
/**
|
|
177
|
+
* RFC3339 timestamp — restrict to entities created at or after this time.
|
|
178
|
+
*/
|
|
179
|
+
since?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Restrict to these lifecycle states. Defaults to `extracted` + `proposed`.
|
|
182
|
+
*/
|
|
183
|
+
status?: Array<string>;
|
|
184
|
+
/**
|
|
185
|
+
* Restrict to entities whose effective type is one of these `ety_...` IDs.
|
|
186
|
+
*/
|
|
187
|
+
type?: Array<string>;
|
|
188
|
+
}
|
|
189
|
+
export declare namespace ReviewQueue {
|
|
190
|
+
export { type ReviewQueueListResponse as ReviewQueueListResponse, type ReviewQueueListParams as ReviewQueueListParams, };
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=review-queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-queue.d.ts","sourceRoot":"","sources":["../src/resources/review-queue.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CACF,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAGvC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAEhD;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,UAAU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IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ReviewQueue = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
/**
|
|
7
|
+
* The reviewer-facing read surface for entity curation, available on the
|
|
8
|
+
* dashboard (JWT) only.
|
|
9
|
+
*
|
|
10
|
+
* - **`GET /v3/review-queue`** returns a cursor-paginated set of entities
|
|
11
|
+
* awaiting curation, scoped to your account+environment (and optional
|
|
12
|
+
* `bucket`). Each row is a full entity plus a small preview (up to 2) of
|
|
13
|
+
* its first mentions, so a reviewer can triage without opening every
|
|
14
|
+
* entity.
|
|
15
|
+
*
|
|
16
|
+
* Filters AND together. `status` (repeatable) defaults to the pre-terminal
|
|
17
|
+
* states `extracted` + `proposed` when omitted. `type` (repeatable `ety_…`
|
|
18
|
+
* IDs) matches the entity's *effective* type — its assigned type id, or, for
|
|
19
|
+
* entities with no assigned type, its bem-inferred type name. `assignedTo`
|
|
20
|
+
* (`me` or a `usr_…` ID) restricts to entities whose effective type the user
|
|
21
|
+
* reviews. `since` (RFC3339) filters by creation time. Pagination is
|
|
22
|
+
* cursor-based on `entityID` ascending; default limit 50, maximum 200.
|
|
23
|
+
*/
|
|
24
|
+
class ReviewQueue extends resource_1.APIResource {
|
|
25
|
+
/**
|
|
26
|
+
* **List entities awaiting curation, for a human reviewer's queue.**
|
|
27
|
+
*
|
|
28
|
+
* Returns a cursor-paginated set of entities scoped to your account+environment
|
|
29
|
+
* (and optional `bucket`), each carrying a small preview of its first mentions so
|
|
30
|
+
* a reviewer can triage without opening every entity. All filters AND together.
|
|
31
|
+
*
|
|
32
|
+
* - **`status`** (repeatable) restricts to the given lifecycle states. Omitting it
|
|
33
|
+
* defaults to the pre-terminal states `extracted` and `proposed`.
|
|
34
|
+
* - **`type`** (repeatable, `ety_...` IDs) matches the entity's _effective_ type:
|
|
35
|
+
* an entity matches when its assigned type is one of these IDs, or it has no
|
|
36
|
+
* assigned type and its bem-inferred type name matches one of them.
|
|
37
|
+
* - **`assignedTo`** (`me` or a `usr_...` ID) restricts to entities whose
|
|
38
|
+
* effective type the given user reviews. `me` resolves to the calling user.
|
|
39
|
+
* - **`since`** (RFC3339) restricts to entities created at or after the time.
|
|
40
|
+
*
|
|
41
|
+
* Pagination is cursor-based on `entityID` ascending; default limit is 50,
|
|
42
|
+
* maximum 200.
|
|
43
|
+
*/
|
|
44
|
+
list(query = {}, options) {
|
|
45
|
+
return this._client.get('/v3/review-queue', { query, ...options });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.ReviewQueue = ReviewQueue;
|
|
49
|
+
//# sourceMappingURL=review-queue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-queue.js","sourceRoot":"","sources":["../src/resources/review-queue.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CACF;AA1BD,kCA0BC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* The reviewer-facing read surface for entity curation, available on the
|
|
5
|
+
* dashboard (JWT) only.
|
|
6
|
+
*
|
|
7
|
+
* - **`GET /v3/review-queue`** returns a cursor-paginated set of entities
|
|
8
|
+
* awaiting curation, scoped to your account+environment (and optional
|
|
9
|
+
* `bucket`). Each row is a full entity plus a small preview (up to 2) of
|
|
10
|
+
* its first mentions, so a reviewer can triage without opening every
|
|
11
|
+
* entity.
|
|
12
|
+
*
|
|
13
|
+
* Filters AND together. `status` (repeatable) defaults to the pre-terminal
|
|
14
|
+
* states `extracted` + `proposed` when omitted. `type` (repeatable `ety_…`
|
|
15
|
+
* IDs) matches the entity's *effective* type — its assigned type id, or, for
|
|
16
|
+
* entities with no assigned type, its bem-inferred type name. `assignedTo`
|
|
17
|
+
* (`me` or a `usr_…` ID) restricts to entities whose effective type the user
|
|
18
|
+
* reviews. `since` (RFC3339) filters by creation time. Pagination is
|
|
19
|
+
* cursor-based on `entityID` ascending; default limit 50, maximum 200.
|
|
20
|
+
*/
|
|
21
|
+
export class ReviewQueue extends APIResource {
|
|
22
|
+
/**
|
|
23
|
+
* **List entities awaiting curation, for a human reviewer's queue.**
|
|
24
|
+
*
|
|
25
|
+
* Returns a cursor-paginated set of entities scoped to your account+environment
|
|
26
|
+
* (and optional `bucket`), each carrying a small preview of its first mentions so
|
|
27
|
+
* a reviewer can triage without opening every entity. All filters AND together.
|
|
28
|
+
*
|
|
29
|
+
* - **`status`** (repeatable) restricts to the given lifecycle states. Omitting it
|
|
30
|
+
* defaults to the pre-terminal states `extracted` and `proposed`.
|
|
31
|
+
* - **`type`** (repeatable, `ety_...` IDs) matches the entity's _effective_ type:
|
|
32
|
+
* an entity matches when its assigned type is one of these IDs, or it has no
|
|
33
|
+
* assigned type and its bem-inferred type name matches one of them.
|
|
34
|
+
* - **`assignedTo`** (`me` or a `usr_...` ID) restricts to entities whose
|
|
35
|
+
* effective type the given user reviews. `me` resolves to the calling user.
|
|
36
|
+
* - **`since`** (RFC3339) restricts to entities created at or after the time.
|
|
37
|
+
*
|
|
38
|
+
* Pagination is cursor-based on `entityID` ascending; default limit is 50,
|
|
39
|
+
* maximum 200.
|
|
40
|
+
*/
|
|
41
|
+
list(query = {}, options) {
|
|
42
|
+
return this._client.get('/v3/review-queue', { query, ...options });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=review-queue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-queue.mjs","sourceRoot":"","sources":["../src/resources/review-queue.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CACF"}
|
|
@@ -4,11 +4,23 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
4
4
|
/**
|
|
5
5
|
* Subscriptions wire up notifications for the events your functions and collections produce.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* collection (by `collectionName` or `collectionID`) and
|
|
7
|
+
* Most subscriptions target a single function (by `functionName` or `functionID`) or a single
|
|
8
|
+
* collection (by `collectionName` or `collectionID`) and select a `type` corresponding to the
|
|
9
9
|
* event you want to receive — for example `transform`, `route`, `join`, `evaluation`, `error`,
|
|
10
10
|
* `enrich`, or `collection_processing`.
|
|
11
11
|
*
|
|
12
|
+
* Entity-lifecycle events are account-wide and target no function or collection. Set `type` to
|
|
13
|
+
* one of the following and provide a `webhookURL` (these event types support webhook delivery
|
|
14
|
+
* only):
|
|
15
|
+
*
|
|
16
|
+
* - `entity_proposed` — an entity entered the `proposed` curation status (queued for review).
|
|
17
|
+
* - `entity_validated` — an entity was approved/validated by a reviewer.
|
|
18
|
+
* - `entity_rejected` — an entity was rejected by a reviewer.
|
|
19
|
+
*
|
|
20
|
+
* Each entity-lifecycle delivery is a JSON POST describing the transition (`entityID`,
|
|
21
|
+
* `typeName`, `priorStatus`, `newStatus`, optional `actorUserID` and `reason`, and a
|
|
22
|
+
* `timestamp`).
|
|
23
|
+
*
|
|
12
24
|
* Deliveries can be sent to any combination of:
|
|
13
25
|
*
|
|
14
26
|
* - `webhookURL` — HTTPS endpoint that receives a JSON POST per event.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.d.mts","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D
|
|
1
|
+
{"version":3,"file":"subscriptions.d.mts","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,E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YAAY,GACZ,OAAO,GACP,iBAAiB,GACjB,QAAQ,GACR,uBAAuB,CAAC;IAE5B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAE3B;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -4,11 +4,23 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* Subscriptions wire up notifications for the events your functions and collections produce.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* collection (by `collectionName` or `collectionID`) and
|
|
7
|
+
* Most subscriptions target a single function (by `functionName` or `functionID`) or a single
|
|
8
|
+
* collection (by `collectionName` or `collectionID`) and select a `type` corresponding to the
|
|
9
9
|
* event you want to receive — for example `transform`, `route`, `join`, `evaluation`, `error`,
|
|
10
10
|
* `enrich`, or `collection_processing`.
|
|
11
11
|
*
|
|
12
|
+
* Entity-lifecycle events are account-wide and target no function or collection. Set `type` to
|
|
13
|
+
* one of the following and provide a `webhookURL` (these event types support webhook delivery
|
|
14
|
+
* only):
|
|
15
|
+
*
|
|
16
|
+
* - `entity_proposed` — an entity entered the `proposed` curation status (queued for review).
|
|
17
|
+
* - `entity_validated` — an entity was approved/validated by a reviewer.
|
|
18
|
+
* - `entity_rejected` — an entity was rejected by a reviewer.
|
|
19
|
+
*
|
|
20
|
+
* Each entity-lifecycle delivery is a JSON POST describing the transition (`entityID`,
|
|
21
|
+
* `typeName`, `priorStatus`, `newStatus`, optional `actorUserID` and `reason`, and a
|
|
22
|
+
* `timestamp`).
|
|
23
|
+
*
|
|
12
24
|
* Deliveries can be sent to any combination of:
|
|
13
25
|
*
|
|
14
26
|
* - `webhookURL` — HTTPS endpoint that receives a JSON POST per event.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D
|
|
1
|
+
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;IAI5F;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;IAItF;;;OAGG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC;IAI7B;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;IAEf;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAE3B;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -8,11 +8,23 @@ const path_1 = require("../internal/utils/path.js");
|
|
|
8
8
|
/**
|
|
9
9
|
* Subscriptions wire up notifications for the events your functions and collections produce.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
* collection (by `collectionName` or `collectionID`) and
|
|
11
|
+
* Most subscriptions target a single function (by `functionName` or `functionID`) or a single
|
|
12
|
+
* collection (by `collectionName` or `collectionID`) and select a `type` corresponding to the
|
|
13
13
|
* event you want to receive — for example `transform`, `route`, `join`, `evaluation`, `error`,
|
|
14
14
|
* `enrich`, or `collection_processing`.
|
|
15
15
|
*
|
|
16
|
+
* Entity-lifecycle events are account-wide and target no function or collection. Set `type` to
|
|
17
|
+
* one of the following and provide a `webhookURL` (these event types support webhook delivery
|
|
18
|
+
* only):
|
|
19
|
+
*
|
|
20
|
+
* - `entity_proposed` — an entity entered the `proposed` curation status (queued for review).
|
|
21
|
+
* - `entity_validated` — an entity was approved/validated by a reviewer.
|
|
22
|
+
* - `entity_rejected` — an entity was rejected by a reviewer.
|
|
23
|
+
*
|
|
24
|
+
* Each entity-lifecycle delivery is a JSON POST describing the transition (`entityID`,
|
|
25
|
+
* `typeName`, `priorStatus`, `newStatus`, optional `actorUserID` and `reason`, and a
|
|
26
|
+
* `timestamp`).
|
|
27
|
+
*
|
|
16
28
|
* Deliveries can be sent to any combination of:
|
|
17
29
|
*
|
|
18
30
|
* - `webhookURL` — HTTPS endpoint that receives a JSON POST per event.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C
|
|
1
|
+
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;OAEG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,cAAsB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,cAAsB,EACtB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,qBAAqB,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,qBAAqB,cAAc,EAAE,EAAE;YACpE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AA9CD,sCA8CC"}
|
|
@@ -5,11 +5,23 @@ import { path } from "../internal/utils/path.mjs";
|
|
|
5
5
|
/**
|
|
6
6
|
* Subscriptions wire up notifications for the events your functions and collections produce.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
* collection (by `collectionName` or `collectionID`) and
|
|
8
|
+
* Most subscriptions target a single function (by `functionName` or `functionID`) or a single
|
|
9
|
+
* collection (by `collectionName` or `collectionID`) and select a `type` corresponding to the
|
|
10
10
|
* event you want to receive — for example `transform`, `route`, `join`, `evaluation`, `error`,
|
|
11
11
|
* `enrich`, or `collection_processing`.
|
|
12
12
|
*
|
|
13
|
+
* Entity-lifecycle events are account-wide and target no function or collection. Set `type` to
|
|
14
|
+
* one of the following and provide a `webhookURL` (these event types support webhook delivery
|
|
15
|
+
* only):
|
|
16
|
+
*
|
|
17
|
+
* - `entity_proposed` — an entity entered the `proposed` curation status (queued for review).
|
|
18
|
+
* - `entity_validated` — an entity was approved/validated by a reviewer.
|
|
19
|
+
* - `entity_rejected` — an entity was rejected by a reviewer.
|
|
20
|
+
*
|
|
21
|
+
* Each entity-lifecycle delivery is a JSON POST describing the transition (`entityID`,
|
|
22
|
+
* `typeName`, `priorStatus`, `newStatus`, optional `actorUserID` and `reason`, and a
|
|
23
|
+
* `timestamp`).
|
|
24
|
+
*
|
|
13
25
|
* Deliveries can be sent to any combination of:
|
|
14
26
|
*
|
|
15
27
|
* - `webhookURL` — HTTPS endpoint that receives a JSON POST per event.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C
|
|
1
|
+
{"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;OAEG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,cAAsB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,cAAsB,EACtB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,qBAAqB,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,qBAAqB,cAAc,EAAE,EAAE;YACpE,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Reviewer assignments link users to the entity types they are responsible
|
|
6
|
+
* for reviewing, scoped to an account+environment. These are dashboard-only
|
|
7
|
+
* endpoints: an assignment needs a user identity, which only the dashboard
|
|
8
|
+
* (JWT) surface carries.
|
|
9
|
+
*
|
|
10
|
+
* - **`POST /v3/entity-types/{typeID}/reviewers`** assigns a user as a
|
|
11
|
+
* reviewer of the type. The assignment is idempotent: re-assigning an
|
|
12
|
+
* existing reviewer returns the existing assignment. Requires the `admin`
|
|
13
|
+
* role.
|
|
14
|
+
* - **`GET /v3/entity-types/{typeID}/reviewers`** lists the users assigned
|
|
15
|
+
* to review the type, with each user's email and role. Requires the
|
|
16
|
+
* `operator` role.
|
|
17
|
+
* - **`DELETE /v3/entity-types/{typeID}/reviewers/{userID}`** removes an
|
|
18
|
+
* assignment. Requires the `admin` role.
|
|
19
|
+
* - **`GET /v3/users/{userID}/reviewer-assignments`** is the reverse lookup:
|
|
20
|
+
* the entity types a user reviews. A user may read their own assignments;
|
|
21
|
+
* reading another user's assignments requires the `admin` role.
|
|
22
|
+
*/
|
|
23
|
+
export declare class Users extends APIResource {
|
|
24
|
+
/**
|
|
25
|
+
* List a User's Reviewer Assignments
|
|
26
|
+
*/
|
|
27
|
+
listReviewerAssignments(userID: string, options?: RequestOptions): APIPromise<UserListReviewerAssignmentsResponse>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Response body for the reverse lookup of a user's reviewer assignments.
|
|
31
|
+
*/
|
|
32
|
+
export interface UserListReviewerAssignmentsResponse {
|
|
33
|
+
assignments: Array<UserListReviewerAssignmentsResponse.Assignment>;
|
|
34
|
+
}
|
|
35
|
+
export declare namespace UserListReviewerAssignmentsResponse {
|
|
36
|
+
/**
|
|
37
|
+
* One entity type a user reviews, as returned by the reverse-lookup endpoint. The
|
|
38
|
+
* type is exposed via its public ID plus its name and description.
|
|
39
|
+
*/
|
|
40
|
+
interface Assignment {
|
|
41
|
+
/**
|
|
42
|
+
* When the assignment was created (RFC 3339).
|
|
43
|
+
*/
|
|
44
|
+
createdAt: string;
|
|
45
|
+
/**
|
|
46
|
+
* The entity type's description.
|
|
47
|
+
*/
|
|
48
|
+
description: string;
|
|
49
|
+
/**
|
|
50
|
+
* The entity type's human-facing name.
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
53
|
+
/**
|
|
54
|
+
* Public ID (`ety_...`) of the entity type the user reviews.
|
|
55
|
+
*/
|
|
56
|
+
typeID: string;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export declare namespace Users {
|
|
60
|
+
export { type UserListReviewerAssignmentsResponse as UserListReviewerAssignmentsResponse };
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=users.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.d.mts","sourceRoot":"","sources":["../src/resources/users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,uBAAuB,CACrB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;CAGnD;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,WAAW,EAAE,KAAK,CAAC,mCAAmC,CAAC,UAAU,CAAC,CAAC;CACpE;AAED,yBAAiB,mCAAmC,CAAC;IACnD;;;OAGG;IACH,UAAiB,UAAU;QACzB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;KAChB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,mCAAmC,IAAI,mCAAmC,EAAE,CAAC;CAC5F"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Reviewer assignments link users to the entity types they are responsible
|
|
6
|
+
* for reviewing, scoped to an account+environment. These are dashboard-only
|
|
7
|
+
* endpoints: an assignment needs a user identity, which only the dashboard
|
|
8
|
+
* (JWT) surface carries.
|
|
9
|
+
*
|
|
10
|
+
* - **`POST /v3/entity-types/{typeID}/reviewers`** assigns a user as a
|
|
11
|
+
* reviewer of the type. The assignment is idempotent: re-assigning an
|
|
12
|
+
* existing reviewer returns the existing assignment. Requires the `admin`
|
|
13
|
+
* role.
|
|
14
|
+
* - **`GET /v3/entity-types/{typeID}/reviewers`** lists the users assigned
|
|
15
|
+
* to review the type, with each user's email and role. Requires the
|
|
16
|
+
* `operator` role.
|
|
17
|
+
* - **`DELETE /v3/entity-types/{typeID}/reviewers/{userID}`** removes an
|
|
18
|
+
* assignment. Requires the `admin` role.
|
|
19
|
+
* - **`GET /v3/users/{userID}/reviewer-assignments`** is the reverse lookup:
|
|
20
|
+
* the entity types a user reviews. A user may read their own assignments;
|
|
21
|
+
* reading another user's assignments requires the `admin` role.
|
|
22
|
+
*/
|
|
23
|
+
export declare class Users extends APIResource {
|
|
24
|
+
/**
|
|
25
|
+
* List a User's Reviewer Assignments
|
|
26
|
+
*/
|
|
27
|
+
listReviewerAssignments(userID: string, options?: RequestOptions): APIPromise<UserListReviewerAssignmentsResponse>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Response body for the reverse lookup of a user's reviewer assignments.
|
|
31
|
+
*/
|
|
32
|
+
export interface UserListReviewerAssignmentsResponse {
|
|
33
|
+
assignments: Array<UserListReviewerAssignmentsResponse.Assignment>;
|
|
34
|
+
}
|
|
35
|
+
export declare namespace UserListReviewerAssignmentsResponse {
|
|
36
|
+
/**
|
|
37
|
+
* One entity type a user reviews, as returned by the reverse-lookup endpoint. The
|
|
38
|
+
* type is exposed via its public ID plus its name and description.
|
|
39
|
+
*/
|
|
40
|
+
interface Assignment {
|
|
41
|
+
/**
|
|
42
|
+
* When the assignment was created (RFC 3339).
|
|
43
|
+
*/
|
|
44
|
+
createdAt: string;
|
|
45
|
+
/**
|
|
46
|
+
* The entity type's description.
|
|
47
|
+
*/
|
|
48
|
+
description: string;
|
|
49
|
+
/**
|
|
50
|
+
* The entity type's human-facing name.
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
53
|
+
/**
|
|
54
|
+
* Public ID (`ety_...`) of the entity type the user reviews.
|
|
55
|
+
*/
|
|
56
|
+
typeID: string;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export declare namespace Users {
|
|
60
|
+
export { type UserListReviewerAssignmentsResponse as UserListReviewerAssignmentsResponse };
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=users.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../src/resources/users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,uBAAuB,CACrB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;CAGnD;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,WAAW,EAAE,KAAK,CAAC,mCAAmC,CAAC,UAAU,CAAC,CAAC;CACpE;AAED,yBAAiB,mCAAmC,CAAC;IACnD;;;OAGG;IACH,UAAiB,UAAU;QACzB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;KAChB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,mCAAmC,IAAI,mCAAmC,EAAE,CAAC;CAC5F"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Users = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const path_1 = require("../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* Reviewer assignments link users to the entity types they are responsible
|
|
9
|
+
* for reviewing, scoped to an account+environment. These are dashboard-only
|
|
10
|
+
* endpoints: an assignment needs a user identity, which only the dashboard
|
|
11
|
+
* (JWT) surface carries.
|
|
12
|
+
*
|
|
13
|
+
* - **`POST /v3/entity-types/{typeID}/reviewers`** assigns a user as a
|
|
14
|
+
* reviewer of the type. The assignment is idempotent: re-assigning an
|
|
15
|
+
* existing reviewer returns the existing assignment. Requires the `admin`
|
|
16
|
+
* role.
|
|
17
|
+
* - **`GET /v3/entity-types/{typeID}/reviewers`** lists the users assigned
|
|
18
|
+
* to review the type, with each user's email and role. Requires the
|
|
19
|
+
* `operator` role.
|
|
20
|
+
* - **`DELETE /v3/entity-types/{typeID}/reviewers/{userID}`** removes an
|
|
21
|
+
* assignment. Requires the `admin` role.
|
|
22
|
+
* - **`GET /v3/users/{userID}/reviewer-assignments`** is the reverse lookup:
|
|
23
|
+
* the entity types a user reviews. A user may read their own assignments;
|
|
24
|
+
* reading another user's assignments requires the `admin` role.
|
|
25
|
+
*/
|
|
26
|
+
class Users extends resource_1.APIResource {
|
|
27
|
+
/**
|
|
28
|
+
* List a User's Reviewer Assignments
|
|
29
|
+
*/
|
|
30
|
+
listReviewerAssignments(userID, options) {
|
|
31
|
+
return this._client.get((0, path_1.path) `/v3/users/${userID}/reviewer-assignments`, options);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.Users = Users;
|
|
35
|
+
//# sourceMappingURL=users.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../src/resources/users.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,uBAAuB,CACrB,MAAc,EACd,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;CACF;AAVD,sBAUC"}
|