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.
- package/CHANGELOG.md +14 -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 +516 -0
- package/resources/entities/entities.d.mts.map +1 -0
- package/resources/entities/entities.d.ts +516 -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/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/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 +125 -0
- package/resources/knowledge-graph.d.mts.map +1 -0
- package/resources/knowledge-graph.d.ts +125 -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/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/src/client.ts +220 -3
- package/src/resources/buckets.ts +351 -0
- package/src/resources/entities/entities.ts +639 -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/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/index.ts +40 -0
- package/src/resources/knowledge-graph.ts +153 -0
- package/src/resources/review-queue.ts +234 -0
- package/src/resources/subscriptions.ts +14 -2
- package/src/resources/users.ts +76 -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,153 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Read the cross-document knowledge graph — the canonical entities and the
|
|
9
|
+
* directed relations between them that the Parse pipeline populates when
|
|
10
|
+
* `linkAcrossDocuments` is enabled.
|
|
11
|
+
*
|
|
12
|
+
* - **`GET /v3/entities/{id}/relations`** returns the inbound and outbound
|
|
13
|
+
* edges incident to one entity, split by direction. Supports
|
|
14
|
+
* `direction`, an exact `relationType` filter, and cursor pagination over
|
|
15
|
+
* edges. A merged-away entity id transparently resolves to its surviving
|
|
16
|
+
* canonical entity.
|
|
17
|
+
* - **`GET /v3/knowledge-graph`** returns the graph as `{ nodes, edges }`,
|
|
18
|
+
* paginating over edges. The `nodes` for a page are the distinct endpoint
|
|
19
|
+
* entities of that page's edges (both endpoints of every edge are
|
|
20
|
+
* included). Filter with `type[]`, `since`, and `search`; an edge is
|
|
21
|
+
* returned only when both of its endpoints survive the entity filters.
|
|
22
|
+
*
|
|
23
|
+
* Both endpoints take an optional `bucket` (`bkt_...`) to scope the read to
|
|
24
|
+
* a single bucket; omit it for the unscoped account+environment view.
|
|
25
|
+
*/
|
|
26
|
+
export class KnowledgeGraph extends APIResource {
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve the Knowledge Graph
|
|
29
|
+
*/
|
|
30
|
+
retrieve(
|
|
31
|
+
query: KnowledgeGraphRetrieveParams | null | undefined = {},
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): APIPromise<KnowledgeGraphRetrieveResponse> {
|
|
34
|
+
return this._client.get('/v3/knowledge-graph', { query, ...options });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Response body for `GET /v3/knowledge-graph`. Pagination is over edges; `nodes`
|
|
40
|
+
* are the distinct endpoint entities of the returned edge page (both endpoints of
|
|
41
|
+
* every edge are included).
|
|
42
|
+
*/
|
|
43
|
+
export interface KnowledgeGraphRetrieveResponse {
|
|
44
|
+
/**
|
|
45
|
+
* The page of edges.
|
|
46
|
+
*/
|
|
47
|
+
edges: Array<KnowledgeGraphRetrieveResponse.Edge>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Distinct endpoint entities of the returned edge page.
|
|
51
|
+
*/
|
|
52
|
+
nodes: Array<KnowledgeGraphRetrieveResponse.Node>;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Opaque cursor for the next page of edges, or absent on the last page. Pass it
|
|
56
|
+
* back as `cursor`.
|
|
57
|
+
*/
|
|
58
|
+
nextCursor?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export namespace KnowledgeGraphRetrieveResponse {
|
|
62
|
+
/**
|
|
63
|
+
* One directed edge between two entities, addressed by their public ids.
|
|
64
|
+
*/
|
|
65
|
+
export interface Edge {
|
|
66
|
+
/**
|
|
67
|
+
* How many times this edge has been observed.
|
|
68
|
+
*/
|
|
69
|
+
mentionCount: number;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Free-form relation label.
|
|
73
|
+
*/
|
|
74
|
+
relationType: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Source entity public id (`ent_...`).
|
|
78
|
+
*/
|
|
79
|
+
sourceId: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Target entity public id (`ent_...`).
|
|
83
|
+
*/
|
|
84
|
+
targetId: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* One entity node in the knowledge graph.
|
|
89
|
+
*/
|
|
90
|
+
export interface Node {
|
|
91
|
+
/**
|
|
92
|
+
* Stable public identifier for the entity (`ent_...`).
|
|
93
|
+
*/
|
|
94
|
+
id: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Canonical (most descriptive) surface form.
|
|
98
|
+
*/
|
|
99
|
+
canonical: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Total mentions of this entity across all parsed documents.
|
|
103
|
+
*/
|
|
104
|
+
mentionCount: number;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Effective entity type.
|
|
108
|
+
*/
|
|
109
|
+
type: string;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface KnowledgeGraphRetrieveParams {
|
|
114
|
+
/**
|
|
115
|
+
* Optional bucket public ID (`bkt_...`) to scope the read to one bucket. Omit for
|
|
116
|
+
* the unscoped (all account+environment) view.
|
|
117
|
+
*/
|
|
118
|
+
bucket?: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Cursor: return edges whose KSUID sorts after this value.
|
|
122
|
+
*/
|
|
123
|
+
cursor?: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Maximum number of edges per page (default 50, max 200).
|
|
127
|
+
*/
|
|
128
|
+
limit?: number;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Case-insensitive substring match on canonical names. Both endpoints of an edge
|
|
132
|
+
* must match for the edge (and its nodes) to be returned.
|
|
133
|
+
*/
|
|
134
|
+
search?: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Only edges created at/after this RFC 3339 timestamp.
|
|
138
|
+
*/
|
|
139
|
+
since?: string;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Restrict to entities of these types. An edge is returned only when BOTH of its
|
|
143
|
+
* endpoints survive the type filter.
|
|
144
|
+
*/
|
|
145
|
+
type?: Array<string>;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export declare namespace KnowledgeGraph {
|
|
149
|
+
export {
|
|
150
|
+
type KnowledgeGraphRetrieveResponse as KnowledgeGraphRetrieveResponse,
|
|
151
|
+
type KnowledgeGraphRetrieveParams as KnowledgeGraphRetrieveParams,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The reviewer-facing read surface for entity curation, available on the
|
|
9
|
+
* dashboard (JWT) only.
|
|
10
|
+
*
|
|
11
|
+
* - **`GET /v3/review-queue`** returns a cursor-paginated set of entities
|
|
12
|
+
* awaiting curation, scoped to your account+environment (and optional
|
|
13
|
+
* `bucket`). Each row is a full entity plus a small preview (up to 2) of
|
|
14
|
+
* its first mentions, so a reviewer can triage without opening every
|
|
15
|
+
* entity.
|
|
16
|
+
*
|
|
17
|
+
* Filters AND together. `status` (repeatable) defaults to the pre-terminal
|
|
18
|
+
* states `extracted` + `proposed` when omitted. `type` (repeatable `ety_…`
|
|
19
|
+
* IDs) matches the entity's *effective* type — its assigned type id, or, for
|
|
20
|
+
* entities with no assigned type, its bem-inferred type name. `assignedTo`
|
|
21
|
+
* (`me` or a `usr_…` ID) restricts to entities whose effective type the user
|
|
22
|
+
* reviews. `since` (RFC3339) filters by creation time. Pagination is
|
|
23
|
+
* cursor-based on `entityID` ascending; default limit 50, maximum 200.
|
|
24
|
+
*/
|
|
25
|
+
export class ReviewQueue extends APIResource {
|
|
26
|
+
/**
|
|
27
|
+
* **List entities awaiting curation, for a human reviewer's queue.**
|
|
28
|
+
*
|
|
29
|
+
* Returns a cursor-paginated set of entities scoped to your account+environment
|
|
30
|
+
* (and optional `bucket`), each carrying a small preview of its first mentions so
|
|
31
|
+
* a reviewer can triage without opening every entity. All filters AND together.
|
|
32
|
+
*
|
|
33
|
+
* - **`status`** (repeatable) restricts to the given lifecycle states. Omitting it
|
|
34
|
+
* defaults to the pre-terminal states `extracted` and `proposed`.
|
|
35
|
+
* - **`type`** (repeatable, `ety_...` IDs) matches the entity's _effective_ type:
|
|
36
|
+
* an entity matches when its assigned type is one of these IDs, or it has no
|
|
37
|
+
* assigned type and its bem-inferred type name matches one of them.
|
|
38
|
+
* - **`assignedTo`** (`me` or a `usr_...` ID) restricts to entities whose
|
|
39
|
+
* effective type the given user reviews. `me` resolves to the calling user.
|
|
40
|
+
* - **`since`** (RFC3339) restricts to entities created at or after the time.
|
|
41
|
+
*
|
|
42
|
+
* Pagination is cursor-based on `entityID` ascending; default limit is 50,
|
|
43
|
+
* maximum 200.
|
|
44
|
+
*/
|
|
45
|
+
list(
|
|
46
|
+
query: ReviewQueueListParams | null | undefined = {},
|
|
47
|
+
options?: RequestOptions,
|
|
48
|
+
): APIPromise<ReviewQueueListResponse> {
|
|
49
|
+
return this._client.get('/v3/review-queue', { query, ...options });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* `GET /v3/review-queue` response. Cursor-paginated by `entityID` ascending.
|
|
55
|
+
*/
|
|
56
|
+
export interface ReviewQueueListResponse {
|
|
57
|
+
/**
|
|
58
|
+
* The page of entities awaiting curation.
|
|
59
|
+
*/
|
|
60
|
+
entities: Array<ReviewQueueListResponse.Entity>;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Whether more rows exist beyond this page.
|
|
64
|
+
*/
|
|
65
|
+
hasMore: boolean;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Opaque cursor to pass as `?cursor=` for the next page. Empty when `hasMore` is
|
|
69
|
+
* false.
|
|
70
|
+
*/
|
|
71
|
+
nextCursor?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export namespace ReviewQueueListResponse {
|
|
75
|
+
/**
|
|
76
|
+
* One row of the review queue: an entity plus a small preview of its mentions.
|
|
77
|
+
*/
|
|
78
|
+
export interface Entity {
|
|
79
|
+
/**
|
|
80
|
+
* The canonical (longest / most descriptive) surface form.
|
|
81
|
+
*/
|
|
82
|
+
canonical: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* When the entity was created.
|
|
86
|
+
*/
|
|
87
|
+
createdAt: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Public ID (`ent_...`) of the entity.
|
|
91
|
+
*/
|
|
92
|
+
entityID: string;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Total mentions across all parsed documents.
|
|
96
|
+
*/
|
|
97
|
+
mentionCount: number;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* A capped preview (up to 2) of the entity's first mentions, ordered by page then
|
|
101
|
+
* time, so a reviewer can triage without opening each entity.
|
|
102
|
+
*/
|
|
103
|
+
previewMentions: Array<Entity.PreviewMention>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Curation lifecycle state: `extracted`, `proposed`, `approved`, `rejected`.
|
|
107
|
+
*/
|
|
108
|
+
status: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Distinct surface forms that have resolved to this entity.
|
|
112
|
+
*/
|
|
113
|
+
surfaceForms: Array<string>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The effective type name (assigned override if set, else bem-inferred).
|
|
117
|
+
*/
|
|
118
|
+
type: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* When the entity was last updated.
|
|
122
|
+
*/
|
|
123
|
+
updatedAt: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Free-form description of the entity, when present.
|
|
127
|
+
*/
|
|
128
|
+
description?: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Public ID (`ety_...`) of the customer-assigned type, when one is set.
|
|
132
|
+
*/
|
|
133
|
+
typeID?: string;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* When a human approved/rejected the entity. Omitted while un-validated.
|
|
137
|
+
*/
|
|
138
|
+
validatedAt?: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Public ID (`usr_...`) of the user who validated the entity, when known.
|
|
142
|
+
*/
|
|
143
|
+
validatedByUserID?: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export namespace Entity {
|
|
147
|
+
/**
|
|
148
|
+
* A single per-document occurrence of an entity, used in review-queue previews.
|
|
149
|
+
*/
|
|
150
|
+
export interface PreviewMention {
|
|
151
|
+
/**
|
|
152
|
+
* When this mention was recorded.
|
|
153
|
+
*/
|
|
154
|
+
createdAt: string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Public ID (`ent_...`) of the entity this mention resolves to.
|
|
158
|
+
*/
|
|
159
|
+
entityID: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Public ID (`emn_...`) of this mention.
|
|
163
|
+
*/
|
|
164
|
+
mentionID: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* 1-indexed page number within the source document.
|
|
168
|
+
*/
|
|
169
|
+
page: number;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The user-provided document handle this mention came from.
|
|
173
|
+
*/
|
|
174
|
+
referenceID: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The exact surface string Parse extracted on the page.
|
|
178
|
+
*/
|
|
179
|
+
surface: string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The parse-emitted section label this mention sat under, when present.
|
|
183
|
+
*/
|
|
184
|
+
sectionLabel?: string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Public ID of the parse transformation that produced this mention, when known.
|
|
188
|
+
*/
|
|
189
|
+
transformationID?: string;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface ReviewQueueListParams {
|
|
195
|
+
/**
|
|
196
|
+
* `me` or a `usr_...` ID — restrict to entities whose effective type that user
|
|
197
|
+
* reviews.
|
|
198
|
+
*/
|
|
199
|
+
assignedTo?: string;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Optional bucket public ID (`bkt_...`) to scope to. Omit for all buckets.
|
|
203
|
+
*/
|
|
204
|
+
bucket?: string;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Cursor — an `entityID` defining your place in the list.
|
|
208
|
+
*/
|
|
209
|
+
cursor?: string;
|
|
210
|
+
|
|
211
|
+
limit?: number;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* RFC3339 timestamp — restrict to entities created at or after this time.
|
|
215
|
+
*/
|
|
216
|
+
since?: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Restrict to these lifecycle states. Defaults to `extracted` + `proposed`.
|
|
220
|
+
*/
|
|
221
|
+
status?: Array<string>;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Restrict to entities whose effective type is one of these `ety_...` IDs.
|
|
225
|
+
*/
|
|
226
|
+
type?: Array<string>;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export declare namespace ReviewQueue {
|
|
230
|
+
export {
|
|
231
|
+
type ReviewQueueListResponse as ReviewQueueListResponse,
|
|
232
|
+
type ReviewQueueListParams as ReviewQueueListParams,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
@@ -9,11 +9,23 @@ import { path } from '../internal/utils/path';
|
|
|
9
9
|
/**
|
|
10
10
|
* Subscriptions wire up notifications for the events your functions and collections produce.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* collection (by `collectionName` or `collectionID`) and
|
|
12
|
+
* Most subscriptions target a single function (by `functionName` or `functionID`) or a single
|
|
13
|
+
* collection (by `collectionName` or `collectionID`) and select a `type` corresponding to the
|
|
14
14
|
* event you want to receive — for example `transform`, `route`, `join`, `evaluation`, `error`,
|
|
15
15
|
* `enrich`, or `collection_processing`.
|
|
16
16
|
*
|
|
17
|
+
* Entity-lifecycle events are account-wide and target no function or collection. Set `type` to
|
|
18
|
+
* one of the following and provide a `webhookURL` (these event types support webhook delivery
|
|
19
|
+
* only):
|
|
20
|
+
*
|
|
21
|
+
* - `entity_proposed` — an entity entered the `proposed` curation status (queued for review).
|
|
22
|
+
* - `entity_validated` — an entity was approved/validated by a reviewer.
|
|
23
|
+
* - `entity_rejected` — an entity was rejected by a reviewer.
|
|
24
|
+
*
|
|
25
|
+
* Each entity-lifecycle delivery is a JSON POST describing the transition (`entityID`,
|
|
26
|
+
* `typeName`, `priorStatus`, `newStatus`, optional `actorUserID` and `reason`, and a
|
|
27
|
+
* `timestamp`).
|
|
28
|
+
*
|
|
17
29
|
* Deliveries can be sent to any combination of:
|
|
18
30
|
*
|
|
19
31
|
* - `webhookURL` — HTTPS endpoint that receives a JSON POST per event.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Reviewer assignments link users to the entity types they are responsible
|
|
10
|
+
* for reviewing, scoped to an account+environment. These are dashboard-only
|
|
11
|
+
* endpoints: an assignment needs a user identity, which only the dashboard
|
|
12
|
+
* (JWT) surface carries.
|
|
13
|
+
*
|
|
14
|
+
* - **`POST /v3/entity-types/{typeID}/reviewers`** assigns a user as a
|
|
15
|
+
* reviewer of the type. The assignment is idempotent: re-assigning an
|
|
16
|
+
* existing reviewer returns the existing assignment. Requires the `admin`
|
|
17
|
+
* role.
|
|
18
|
+
* - **`GET /v3/entity-types/{typeID}/reviewers`** lists the users assigned
|
|
19
|
+
* to review the type, with each user's email and role. Requires the
|
|
20
|
+
* `operator` role.
|
|
21
|
+
* - **`DELETE /v3/entity-types/{typeID}/reviewers/{userID}`** removes an
|
|
22
|
+
* assignment. Requires the `admin` role.
|
|
23
|
+
* - **`GET /v3/users/{userID}/reviewer-assignments`** is the reverse lookup:
|
|
24
|
+
* the entity types a user reviews. A user may read their own assignments;
|
|
25
|
+
* reading another user's assignments requires the `admin` role.
|
|
26
|
+
*/
|
|
27
|
+
export class Users extends APIResource {
|
|
28
|
+
/**
|
|
29
|
+
* List a User's Reviewer Assignments
|
|
30
|
+
*/
|
|
31
|
+
listReviewerAssignments(
|
|
32
|
+
userID: string,
|
|
33
|
+
options?: RequestOptions,
|
|
34
|
+
): APIPromise<UserListReviewerAssignmentsResponse> {
|
|
35
|
+
return this._client.get(path`/v3/users/${userID}/reviewer-assignments`, options);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Response body for the reverse lookup of a user's reviewer assignments.
|
|
41
|
+
*/
|
|
42
|
+
export interface UserListReviewerAssignmentsResponse {
|
|
43
|
+
assignments: Array<UserListReviewerAssignmentsResponse.Assignment>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export namespace UserListReviewerAssignmentsResponse {
|
|
47
|
+
/**
|
|
48
|
+
* One entity type a user reviews, as returned by the reverse-lookup endpoint. The
|
|
49
|
+
* type is exposed via its public ID plus its name and description.
|
|
50
|
+
*/
|
|
51
|
+
export interface Assignment {
|
|
52
|
+
/**
|
|
53
|
+
* When the assignment was created (RFC 3339).
|
|
54
|
+
*/
|
|
55
|
+
createdAt: string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The entity type's description.
|
|
59
|
+
*/
|
|
60
|
+
description: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The entity type's human-facing name.
|
|
64
|
+
*/
|
|
65
|
+
name: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Public ID (`ety_...`) of the entity type the user reviews.
|
|
69
|
+
*/
|
|
70
|
+
typeID: string;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export declare namespace Users {
|
|
75
|
+
export { type UserListReviewerAssignmentsResponse as UserListReviewerAssignmentsResponse };
|
|
76
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.27.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.27.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.27.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.27.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|