@larc-iu/plaid-client 0.2.0-alpha.3 → 0.2.0-alpha.30
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/README.md +39 -0
- package/package.json +13 -6
- package/src/apiAnnotations.d.ts +508 -0
- package/src/apiAnnotations.js +543 -0
- package/src/apiDocuments.d.ts +569 -0
- package/src/apiDocuments.js +551 -0
- package/src/apiLayers.d.ts +369 -0
- package/src/apiLayers.js +222 -0
- package/src/apiMessages.d.ts +293 -0
- package/src/apiMessages.js +265 -0
- package/src/apiPeople.d.ts +626 -0
- package/src/apiPeople.js +698 -0
- package/src/apiProject.d.ts +761 -0
- package/src/apiProject.js +774 -0
- package/src/apiServer.d.ts +455 -0
- package/src/apiServer.js +422 -0
- package/src/apiVocab.d.ts +456 -0
- package/src/apiVocab.js +425 -0
- package/src/batch.d.ts +54 -0
- package/src/batch.js +323 -0
- package/src/batchRef.d.ts +30 -0
- package/src/batchRef.js +128 -0
- package/src/client.d.ts +1321 -0
- package/src/client.js +743 -0
- package/src/codepoint.d.ts +94 -0
- package/src/codepoint.js +131 -1
- package/src/constraints.d.ts +85 -0
- package/src/constraints.js +112 -0
- package/src/created.d.ts +2 -0
- package/src/created.js +29 -0
- package/src/documentLock.d.ts +172 -0
- package/src/documentLock.js +384 -0
- package/src/entryForms.d.ts +63 -0
- package/src/entryForms.js +152 -0
- package/src/events.d.ts +60 -0
- package/src/events.js +271 -0
- package/src/families.d.ts +349 -0
- package/src/families.js +396 -0
- package/src/http.d.ts +233 -0
- package/src/http.js +809 -93
- package/src/ids.d.ts +26 -0
- package/src/ids.js +96 -0
- package/src/index.d.ts +101 -0
- package/src/index.js +183 -2105
- package/src/metadataOps.d.ts +15 -0
- package/src/metadataOps.js +124 -0
- package/src/operations.d.ts +36 -0
- package/src/operations.js +164 -0
- package/src/pagination.d.ts +49 -0
- package/src/pagination.js +20 -53
- package/src/provenance.d.ts +243 -0
- package/src/provenance.js +458 -36
- package/src/replayed.d.ts +3 -0
- package/src/replayed.js +31 -0
- package/src/requester.d.ts +60 -0
- package/src/requester.js +74 -0
- package/src/roles.d.ts +104 -0
- package/src/roles.js +64 -2
- package/src/serviceSchema.d.ts +337 -0
- package/src/serviceSchema.js +177 -60
- package/src/services.d.ts +319 -0
- package/src/services.js +742 -58
- package/src/sse.d.ts +30 -0
- package/src/sse.js +80 -3
- package/src/testing.d.ts +128 -0
- package/src/testing.js +379 -0
- package/src/textEdits.d.ts +59 -0
- package/src/textEdits.js +234 -0
- package/src/transforms.d.ts +25 -0
- package/src/transforms.js +11 -1
- package/src/types.d.ts +867 -0
- package/src/types.js +663 -0
- package/index.d.ts +0 -532
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import("./types.js").TextEditOp} TextEditOp
|
|
3
|
+
* @typedef {import("./types.js").TextGap} TextGap
|
|
4
|
+
* @typedef {import("./types.js").MetadataOp} MetadataOp
|
|
5
|
+
* @typedef {import("./types.js").LayerConstraint} LayerConstraint
|
|
6
|
+
* @typedef {import("./types.js").ConstraintWriteOptions} ConstraintWriteOptions
|
|
7
|
+
* @typedef {import("./types.js").ConstraintViolation} ConstraintViolation
|
|
8
|
+
* @typedef {import("./types.js").Requester} Requester
|
|
9
|
+
* @typedef {import("./types.js").BatchRef} BatchRef
|
|
10
|
+
* @typedef {import("./types.js").ServiceParam} ServiceParam
|
|
11
|
+
* @typedef {import("./types.js").ServiceInfo} ServiceInfo
|
|
12
|
+
* @typedef {import("./types.js").DiscoveredService} DiscoveredService
|
|
13
|
+
* @typedef {import("./types.js").ResponseHelper} ResponseHelper
|
|
14
|
+
* @typedef {import("./types.js").ServiceRegistration} ServiceRegistration
|
|
15
|
+
* @typedef {import("./types.js").ServiceStatusEvent} ServiceStatusEvent
|
|
16
|
+
* @typedef {import("./types.js").OperationGroupsBundle} OperationGroupsBundle
|
|
17
|
+
* @typedef {import("./types.js").PlaidClientOptions} PlaidClientOptions
|
|
18
|
+
* @typedef {import("./types.js").OperationKind} OperationKind
|
|
19
|
+
* @typedef {import("./types.js").KeySeed} KeySeed
|
|
20
|
+
* @typedef {import("./types.js").PlaidBatch} PlaidBatch
|
|
21
|
+
* @typedef {import("./types.js").AuditPageOptions} AuditPageOptions
|
|
22
|
+
* @typedef {import("./types.js").VocabItemRestoreSummary} VocabItemRestoreSummary
|
|
23
|
+
* @typedef {import("./types.js").UserDataEntry} UserDataEntry
|
|
24
|
+
* @typedef {import("./types.js").AdminUserDataEntry} AdminUserDataEntry
|
|
25
|
+
* @typedef {import("./types.js").ActivityTallyRow} ActivityTallyRow
|
|
26
|
+
* @typedef {import("./types.js").ConstraintRepair} ConstraintRepair
|
|
27
|
+
* @typedef {import("./types.js").ValueSetRule} ValueSetRule
|
|
28
|
+
* @typedef {import("./types.js").RefusedValues} RefusedValues
|
|
29
|
+
* @typedef {import("./types.js").CommentableType} CommentableType
|
|
30
|
+
* @typedef {import("./types.js").Comment} Comment
|
|
31
|
+
* @typedef {import("./types.js").Guideline} Guideline
|
|
32
|
+
* @typedef {import("./types.js").ClientEventType} ClientEventType
|
|
33
|
+
* @typedef {import("./types.js").ClientEvent} ClientEvent
|
|
34
|
+
* @typedef {import("./types.js").Invite} Invite
|
|
35
|
+
* @typedef {import("./types.js").ServerLimits} ServerLimits
|
|
36
|
+
* @typedef {import("./types.js").ServerHealth} ServerHealth
|
|
37
|
+
* @typedef {import("./types.js").RateLimitBucket} RateLimitBucket
|
|
38
|
+
* @typedef {import("./types.js").RateLimitSnapshot} RateLimitSnapshot
|
|
39
|
+
* @typedef {import("./types.js").BackupStatus} BackupStatus
|
|
40
|
+
* @typedef {import("./types.js").ServerReport} ServerReport
|
|
41
|
+
* @typedef {import("./types.js").LiveLog} LiveLog
|
|
42
|
+
* @typedef {import("./types.js").SSEConnection} SSEConnection
|
|
43
|
+
* @typedef {import("./types.js").SSEStats} SSEStats
|
|
44
|
+
* @typedef {import("./types.js").AtomicValue} AtomicValue
|
|
45
|
+
* @typedef {import("./types.js").Created} Created
|
|
46
|
+
* @typedef {import("./types.js").Project} Project
|
|
47
|
+
* @typedef {import("./types.js").ProjectTextLayer} ProjectTextLayer
|
|
48
|
+
* @typedef {import("./types.js").ProjectTokenLayer} ProjectTokenLayer
|
|
49
|
+
* @typedef {import("./types.js").ProjectSpanLayer} ProjectSpanLayer
|
|
50
|
+
* @typedef {import("./types.js").ProjectRelationLayer} ProjectRelationLayer
|
|
51
|
+
* @typedef {import("./types.js").ProjectVocab} ProjectVocab
|
|
52
|
+
* @typedef {import("./types.js").PlaidDocument} PlaidDocument
|
|
53
|
+
* @typedef {import("./types.js").DocumentTextLayer} DocumentTextLayer
|
|
54
|
+
* @typedef {import("./types.js").DocumentTokenLayer} DocumentTokenLayer
|
|
55
|
+
* @typedef {import("./types.js").DocumentSpanLayer} DocumentSpanLayer
|
|
56
|
+
* @typedef {import("./types.js").PlaidText} PlaidText
|
|
57
|
+
* @typedef {import("./types.js").TextReshape} TextReshape
|
|
58
|
+
* @typedef {import("./types.js").Token} Token
|
|
59
|
+
* @typedef {import("./types.js").Span} Span
|
|
60
|
+
* @typedef {import("./types.js").Relation} Relation
|
|
61
|
+
* @typedef {import("./types.js").VocabItem} VocabItem
|
|
62
|
+
* @typedef {import("./types.js").VocabLink} VocabLink
|
|
63
|
+
* @typedef {import("./types.js").VocabLayer} VocabLayer
|
|
64
|
+
* @typedef {import("./types.js").TextLayer} TextLayer
|
|
65
|
+
* @typedef {import("./types.js").TokenLayer} TokenLayer
|
|
66
|
+
* @typedef {import("./types.js").SpanLayer} SpanLayer
|
|
67
|
+
* @typedef {import("./types.js").RelationLayer} RelationLayer
|
|
68
|
+
* @typedef {import("./types.js").MetadataRecords} MetadataRecords
|
|
69
|
+
* @typedef {import("./types.js").LayerRecords} LayerRecords
|
|
70
|
+
* @typedef {import("./types.js").User} User
|
|
71
|
+
* @typedef {import("./types.js").ProjectListEntry} ProjectListEntry
|
|
72
|
+
* @typedef {import("./types.js").DocumentListEntry} DocumentListEntry
|
|
73
|
+
* @typedef {import("./types.js").ApiToken} ApiToken
|
|
74
|
+
* @typedef {import("./types.js").AuditUser} AuditUser
|
|
75
|
+
* @typedef {import("./types.js").AuditTarget} AuditTarget
|
|
76
|
+
* @typedef {import("./types.js").AuditOp} AuditOp
|
|
77
|
+
* @typedef {import("./types.js").AuditEntry} AuditEntry
|
|
78
|
+
* @typedef {import("./types.js").LockGrant} LockGrant
|
|
79
|
+
* @typedef {import("./types.js").DocumentRestoreSummary} DocumentRestoreSummary
|
|
80
|
+
* @typedef {import("./types.js").RestoreCounts} RestoreCounts
|
|
81
|
+
* @typedef {import("./types.js").OperationGroup} OperationGroup
|
|
82
|
+
* @typedef {import("./types.js").QueryResult} QueryResult
|
|
83
|
+
*/
|
|
84
|
+
/**
|
|
85
|
+
* @template [T=any]
|
|
86
|
+
* @typedef {import("./types.js").Page<T>} Page
|
|
87
|
+
*/
|
|
88
|
+
/** @param {import("./client.js").PlaidClient} client */
|
|
89
|
+
export function serverApi(client: import("./client.js").PlaidClient): {
|
|
90
|
+
/**
|
|
91
|
+
* This server's version and the limits it enforces, e.g.
|
|
92
|
+
* `{ limits: { mediaFileBytes, jsonBodyBytes, batchOperations, … } }`.
|
|
93
|
+
* Sizes are in bytes. Unauthenticated.
|
|
94
|
+
* @returns {Promise<{limits: ServerLimits}>}
|
|
95
|
+
*/
|
|
96
|
+
info: () => Promise<{
|
|
97
|
+
limits: ServerLimits;
|
|
98
|
+
}>;
|
|
99
|
+
/**
|
|
100
|
+
* Read `GET /info` again and resolve to it. Until it answers, a reader
|
|
101
|
+
* waits for it. The facts known before are kept when the server does
|
|
102
|
+
* not answer, and the error is thrown.
|
|
103
|
+
* @returns {Promise<{limits: ServerLimits}>}
|
|
104
|
+
*/
|
|
105
|
+
refresh: () => Promise<{
|
|
106
|
+
limits: ServerLimits;
|
|
107
|
+
}>;
|
|
108
|
+
/**
|
|
109
|
+
* Just the limits, which is what a caller almost always wants.
|
|
110
|
+
* @returns {Promise<ServerLimits>}
|
|
111
|
+
*/
|
|
112
|
+
limits: () => Promise<ServerLimits>;
|
|
113
|
+
/**
|
|
114
|
+
* Liveness, version and database size. Unauthenticated, and served
|
|
115
|
+
* outside the REST router at /health, so it answers even while the API
|
|
116
|
+
* is refusing requests. Never cached — the point is that it is current.
|
|
117
|
+
* @returns {Promise<ServerHealth>}
|
|
118
|
+
*/
|
|
119
|
+
health: () => Promise<ServerHealth>;
|
|
120
|
+
};
|
|
121
|
+
/** @param {import("./client.js").PlaidClient} client */
|
|
122
|
+
export function adminApi(client: import("./client.js").PlaidClient): {
|
|
123
|
+
/**
|
|
124
|
+
* Everything about the server in one read: version and JVM uptime,
|
|
125
|
+
* database size and per-table row counts, media directory usage, backup
|
|
126
|
+
* configuration and the backups on disk, and the settings an operator
|
|
127
|
+
* gets asked to confirm. Carries no secrets. Runs a count per table and
|
|
128
|
+
* walks the media directory, so open it, do not poll it. Admin only.
|
|
129
|
+
* @returns {Promise<ServerReport>}
|
|
130
|
+
*/
|
|
131
|
+
server: () => Promise<ServerReport>;
|
|
132
|
+
/**
|
|
133
|
+
* Take a database backup right now, outside the nightly schedule.
|
|
134
|
+
* Resolves to the backup block with `ok` reporting whether the snapshot
|
|
135
|
+
* succeeded. Uses VACUUM INTO, which only reads, so it is safe while
|
|
136
|
+
* people are working. Admin only.
|
|
137
|
+
*
|
|
138
|
+
* The server answers once the backup is written, which takes minutes on
|
|
139
|
+
* a large database, so this waits up to `BACKUP_TIMEOUT_MS` (30 minutes)
|
|
140
|
+
* rather than the client's usual timeout. A proxy in front of the server
|
|
141
|
+
* may still give up first (a 504): the backup goes on, and its file
|
|
142
|
+
* shows in `server().backup.backups` once it is written.
|
|
143
|
+
* @returns {Promise<BackupStatus>}
|
|
144
|
+
*
|
|
145
|
+
* outOfBand, as every admin action on the server itself is: none of them
|
|
146
|
+
* writes project data (see the note at the top of http.js).
|
|
147
|
+
*/
|
|
148
|
+
backup: () => Promise<BackupStatus>;
|
|
149
|
+
/**
|
|
150
|
+
* Documents currently held by an editing lock, with who holds each and
|
|
151
|
+
* when it expires on its own. Admin only.
|
|
152
|
+
* @returns {Promise<{entries: Array<{documentId: string, userId: string, expiresAt: number}>}>}
|
|
153
|
+
*/
|
|
154
|
+
locks: () => Promise<{
|
|
155
|
+
entries: Array<{
|
|
156
|
+
documentId: string;
|
|
157
|
+
userId: string;
|
|
158
|
+
expiresAt: number;
|
|
159
|
+
}>;
|
|
160
|
+
}>;
|
|
161
|
+
/**
|
|
162
|
+
* Drop the lock on a document whoever holds it. Idempotent. For a client
|
|
163
|
+
* that went away without releasing one. Admin only.
|
|
164
|
+
* @param {string} documentId - The document ID
|
|
165
|
+
* @returns {Promise<{result: string}>}
|
|
166
|
+
*/
|
|
167
|
+
releaseLock: (documentId: string) => Promise<{
|
|
168
|
+
result: string;
|
|
169
|
+
}>;
|
|
170
|
+
/**
|
|
171
|
+
* Live login and invite rate-limit buckets: the address, the account
|
|
172
|
+
* where there is one, failures inside the window, the limit, and whether
|
|
173
|
+
* it is currently blocking. Admin only.
|
|
174
|
+
* @returns {Promise<RateLimitSnapshot>}
|
|
175
|
+
*/
|
|
176
|
+
rateLimits: () => Promise<RateLimitSnapshot>;
|
|
177
|
+
/**
|
|
178
|
+
* Forget recorded rate-limit failures. With `ip`, clears that address,
|
|
179
|
+
* narrowed to one account with `userId`. With neither, clears every
|
|
180
|
+
* bucket. Only ever unblocks. Admin only.
|
|
181
|
+
* @param {object} [opts]
|
|
182
|
+
* @param {string} [opts.ip] - Clear only this address
|
|
183
|
+
* @param {string} [opts.userId] - Narrow to one account on that address
|
|
184
|
+
* @returns {Promise<{result: string}>}
|
|
185
|
+
*/
|
|
186
|
+
clearRateLimits: ({ ip, userId }?: {
|
|
187
|
+
ip?: string;
|
|
188
|
+
userId?: string;
|
|
189
|
+
}) => Promise<{
|
|
190
|
+
result: string;
|
|
191
|
+
}>;
|
|
192
|
+
/**
|
|
193
|
+
* What the server has logged, structured and filtered, from an in-memory
|
|
194
|
+
* buffer kept whether or not a log file is configured. `requests` is one
|
|
195
|
+
* entry per HTTP request (method, path, status, duration, and who made
|
|
196
|
+
* it), `events` is everything else, with a stack trace where there was
|
|
197
|
+
* one. They are buffered separately so a burst of requests cannot evict
|
|
198
|
+
* an error. Both come newest first, `matched` counts what passed the
|
|
199
|
+
* filters, and request `stats` describe the filtered set. Covers Plaid's
|
|
200
|
+
* own log stream since the last restart: for library messages and older
|
|
201
|
+
* history, see `logFile`. Admin only.
|
|
202
|
+
* @param {object} [opts]
|
|
203
|
+
* @param {number} [opts.limit] - Max entries per kind (default 200, max 2000)
|
|
204
|
+
* @param {string} [opts.q] - Substring of any field, case-insensitive
|
|
205
|
+
* @param {string} [opts.level] - Minimum level for events, e.g. "warn"
|
|
206
|
+
* @param {string} [opts.status] - "2xx".."5xx", an exact code, or "failures"
|
|
207
|
+
* @param {string} [opts.user] - Only requests made by this account
|
|
208
|
+
* @param {string} [opts.method] - Only requests with this HTTP method
|
|
209
|
+
* @returns {Promise<LiveLog>}
|
|
210
|
+
*/
|
|
211
|
+
logs: ({ limit, q, level, status, user, method }?: {
|
|
212
|
+
limit?: number;
|
|
213
|
+
q?: string;
|
|
214
|
+
level?: string;
|
|
215
|
+
status?: string;
|
|
216
|
+
user?: string;
|
|
217
|
+
method?: string;
|
|
218
|
+
}) => Promise<LiveLog>;
|
|
219
|
+
/**
|
|
220
|
+
* The tail of the configured log file, as text lines. The only place
|
|
221
|
+
* third-party library messages and anything from before the last restart
|
|
222
|
+
* can be read. Resolves with an `error` string instead of lines when no
|
|
223
|
+
* log file is configured or it does not exist yet. Admin only.
|
|
224
|
+
* @param {object} [opts]
|
|
225
|
+
* @param {number} [opts.lines] - How many lines (default 200, max 2000)
|
|
226
|
+
* @returns {Promise<{file: (string|null), lines: string[], error?: string}>}
|
|
227
|
+
*/
|
|
228
|
+
logFile: ({ lines }?: {
|
|
229
|
+
lines?: number;
|
|
230
|
+
}) => Promise<{
|
|
231
|
+
file: (string | null);
|
|
232
|
+
lines: string[];
|
|
233
|
+
error?: string;
|
|
234
|
+
}>;
|
|
235
|
+
/**
|
|
236
|
+
* Private user-data entries across every account, each carrying its
|
|
237
|
+
* `userId`. `/users/:userId/data` has always been owner-or-admin; this
|
|
238
|
+
* is the same reach across accounts at once. Transparently follows
|
|
239
|
+
* pagination cursors and returns the full flat array. Admin only.
|
|
240
|
+
*
|
|
241
|
+
* Narrow with `prefix` (the literal head of a key) and/or `pattern`, a
|
|
242
|
+
* GLOB over the whole key (`*` any run, `?` one character) — the way to
|
|
243
|
+
* ask for a key convention identified by a segment in the middle, e.g.
|
|
244
|
+
* `igt:assistant:*:meta:*`. Values come only with `includeValues`, and
|
|
245
|
+
* are recased like any other body (see `userData.put`).
|
|
246
|
+
* @param {object} [opts]
|
|
247
|
+
* @param {string} [opts.prefix] - Only keys starting with this
|
|
248
|
+
* @param {string} [opts.pattern] - Only keys matching this GLOB
|
|
249
|
+
* @param {boolean} [opts.includeValues] - Also return each entry's value
|
|
250
|
+
* @returns {Promise<AdminUserDataEntry[]>}
|
|
251
|
+
*/
|
|
252
|
+
userData: ({ prefix, pattern, includeValues }?: {
|
|
253
|
+
prefix?: string;
|
|
254
|
+
pattern?: string;
|
|
255
|
+
includeValues?: boolean;
|
|
256
|
+
}) => Promise<AdminUserDataEntry[]>;
|
|
257
|
+
/**
|
|
258
|
+
* One page of private user-data entries across accounts, ordered by
|
|
259
|
+
* (user, key). Admin only.
|
|
260
|
+
* @param {object} [opts]
|
|
261
|
+
* @param {string} [opts.prefix] - Only keys starting with this
|
|
262
|
+
* @param {string} [opts.pattern] - Only keys matching this GLOB
|
|
263
|
+
* @param {boolean} [opts.includeValues] - Also return each entry's value
|
|
264
|
+
* @param {number} [opts.limit] - Page size (1..1000; server default 100)
|
|
265
|
+
* @param {string} [opts.cursor] - Opaque cursor from a previous page
|
|
266
|
+
* @returns {Promise<Page<AdminUserDataEntry>>}
|
|
267
|
+
*/
|
|
268
|
+
userDataPage: ({ prefix, pattern, includeValues, limit, cursor }?: {
|
|
269
|
+
prefix?: string;
|
|
270
|
+
pattern?: string;
|
|
271
|
+
includeValues?: boolean;
|
|
272
|
+
limit?: number;
|
|
273
|
+
cursor?: string;
|
|
274
|
+
}) => Promise<Page<AdminUserDataEntry>>;
|
|
275
|
+
};
|
|
276
|
+
/** @param {import("./client.js").PlaidClient} client */
|
|
277
|
+
export function auditApi(client: import("./client.js").PlaidClient): {
|
|
278
|
+
/**
|
|
279
|
+
* The audit log across every project, oldest first. Same fold, window
|
|
280
|
+
* and op-type filter as the per-project read, with the entity scope
|
|
281
|
+
* dropped. Admin only. Transparently follows pagination cursors and
|
|
282
|
+
* returns the full flat array.
|
|
283
|
+
* @param {object} [opts]
|
|
284
|
+
* @param {string} [opts.startTime] - Only operations at or after this instant
|
|
285
|
+
* @param {string} [opts.endTime] - Only operations at or before this instant
|
|
286
|
+
* @param {string[]|string} [opts.opTypes] - Only these op types (e.g.
|
|
287
|
+
* `['span-layer/create']`). An entry appears when one of its operations
|
|
288
|
+
* matches, carrying only the ones that did.
|
|
289
|
+
* @param {string[]|string} [opts.kinds] - Only the entries of operations
|
|
290
|
+
* of these kinds (e.g. `['review']`), each whole
|
|
291
|
+
* @returns {Promise<AuditEntry[]>}
|
|
292
|
+
*/
|
|
293
|
+
list: ({ startTime, endTime, opTypes, kinds }?: {
|
|
294
|
+
startTime?: string;
|
|
295
|
+
endTime?: string;
|
|
296
|
+
opTypes?: string[] | string;
|
|
297
|
+
kinds?: string[] | string;
|
|
298
|
+
}) => Promise<AuditEntry[]>;
|
|
299
|
+
/**
|
|
300
|
+
* Fetch a single page of the instance-wide audit log. Admin only.
|
|
301
|
+
* @param {object} [opts]
|
|
302
|
+
* @param {string} [opts.startTime] - Only entries at or after this instant
|
|
303
|
+
* @param {string} [opts.endTime] - Only entries at or before this instant
|
|
304
|
+
* @param {string[]|string} [opts.opTypes] - Only these op types
|
|
305
|
+
* @param {OperationKind[]|string} [opts.kinds] - Only the entries of operations of these kinds, each whole
|
|
306
|
+
* @param {"asc"|"desc"} [opts.order] - "desc" pages newest-first, which
|
|
307
|
+
* is what a feed wants. A cursor belongs to the direction that made it.
|
|
308
|
+
* @param {number} [opts.limit] - Page size (1..1000; server default 100)
|
|
309
|
+
* @param {string} [opts.cursor] - Opaque cursor from a previous page
|
|
310
|
+
* @param {number} [opts.opsLimit] - Keep only each entry's oldest N
|
|
311
|
+
* operations in `ops` (1..1000). `opCount` on every entry says how
|
|
312
|
+
* many it has
|
|
313
|
+
* @param {string} [opts.entryId] - Read only this entry, not a page
|
|
314
|
+
* @returns {Promise<Page<AuditEntry>>}
|
|
315
|
+
*/
|
|
316
|
+
listPage: ({ startTime, endTime, opTypes, kinds, order, limit, cursor, opsLimit, entryId }?: {
|
|
317
|
+
startTime?: string;
|
|
318
|
+
endTime?: string;
|
|
319
|
+
opTypes?: string[] | string;
|
|
320
|
+
kinds?: OperationKind[] | string;
|
|
321
|
+
order?: "asc" | "desc";
|
|
322
|
+
limit?: number;
|
|
323
|
+
cursor?: string;
|
|
324
|
+
opsLimit?: number;
|
|
325
|
+
entryId?: string;
|
|
326
|
+
}) => Promise<Page<AuditEntry>>;
|
|
327
|
+
/**
|
|
328
|
+
* Async-iterate the instance-wide audit log page by page. Admin only.
|
|
329
|
+
* @param {object} [opts]
|
|
330
|
+
* @param {string} [opts.startTime] - Only entries at or after this instant
|
|
331
|
+
* @param {string} [opts.endTime] - Only entries at or before this instant
|
|
332
|
+
* @param {string[]|string} [opts.opTypes] - Only these op types
|
|
333
|
+
* @param {OperationKind[]|string} [opts.kinds] - Only the entries of operations of these kinds, each whole
|
|
334
|
+
* @param {number} [opts.pageSize] - Per-request page size
|
|
335
|
+
* @returns {AsyncGenerator<AuditEntry[]>}
|
|
336
|
+
*/
|
|
337
|
+
iterPages: ({ startTime, endTime, opTypes, kinds, pageSize }?: {
|
|
338
|
+
startTime?: string;
|
|
339
|
+
endTime?: string;
|
|
340
|
+
opTypes?: string[] | string;
|
|
341
|
+
kinds?: OperationKind[] | string;
|
|
342
|
+
pageSize?: number;
|
|
343
|
+
}) => AsyncGenerator<AuditEntry[]>;
|
|
344
|
+
/**
|
|
345
|
+
* Per-user activity counts. `changes` is the number of logical actions,
|
|
346
|
+
* folded the way the audit feed folds them, so one "Confirm word
|
|
347
|
+
* analysis" counts once however many rows it wrote; `operations` is the
|
|
348
|
+
* unfolded row count. Only users who did something appear — subtract
|
|
349
|
+
* from the roster you already hold to find the ones who did not.
|
|
350
|
+
*
|
|
351
|
+
* With `projectId`, scoped to that project and open to its maintainers.
|
|
352
|
+
* Without one, instance-wide and admin only.
|
|
353
|
+
* @param {object} [opts]
|
|
354
|
+
* @param {string} [opts.projectId] - Scope to one project
|
|
355
|
+
* @param {string} [opts.startTime] - Only count at or after this instant
|
|
356
|
+
* @param {string} [opts.endTime] - Only count at or before this instant
|
|
357
|
+
* @param {boolean} [opts.daily] - Also return `byDay`, a list of
|
|
358
|
+
* `{date, changes}` per user, oldest first, at the cost of a second
|
|
359
|
+
* grouped scan
|
|
360
|
+
* @returns {Promise<ActivityTallyRow[]>}
|
|
361
|
+
*/
|
|
362
|
+
tally: ({ projectId, startTime, endTime, daily }?: {
|
|
363
|
+
projectId?: string;
|
|
364
|
+
startTime?: string;
|
|
365
|
+
endTime?: string;
|
|
366
|
+
daily?: boolean;
|
|
367
|
+
}) => Promise<ActivityTallyRow[]>;
|
|
368
|
+
};
|
|
369
|
+
/**
|
|
370
|
+
* How long `admin.backup()` waits for the server to finish writing a backup:
|
|
371
|
+
* minutes on a large database, past the usual per-request timeout.
|
|
372
|
+
*/
|
|
373
|
+
export const BACKUP_TIMEOUT_MS: number;
|
|
374
|
+
export type TextEditOp = import("./types.js").TextEditOp;
|
|
375
|
+
export type TextGap = import("./types.js").TextGap;
|
|
376
|
+
export type MetadataOp = import("./types.js").MetadataOp;
|
|
377
|
+
export type LayerConstraint = import("./types.js").LayerConstraint;
|
|
378
|
+
export type ConstraintWriteOptions = import("./types.js").ConstraintWriteOptions;
|
|
379
|
+
export type ConstraintViolation = import("./types.js").ConstraintViolation;
|
|
380
|
+
export type Requester = import("./types.js").Requester;
|
|
381
|
+
export type BatchRef = import("./types.js").BatchRef;
|
|
382
|
+
export type ServiceParam = import("./types.js").ServiceParam;
|
|
383
|
+
export type ServiceInfo = import("./types.js").ServiceInfo;
|
|
384
|
+
export type DiscoveredService = import("./types.js").DiscoveredService;
|
|
385
|
+
export type ResponseHelper = import("./types.js").ResponseHelper;
|
|
386
|
+
export type ServiceRegistration = import("./types.js").ServiceRegistration;
|
|
387
|
+
export type ServiceStatusEvent = import("./types.js").ServiceStatusEvent;
|
|
388
|
+
export type OperationGroupsBundle = import("./types.js").OperationGroupsBundle;
|
|
389
|
+
export type PlaidClientOptions = import("./types.js").PlaidClientOptions;
|
|
390
|
+
export type OperationKind = import("./types.js").OperationKind;
|
|
391
|
+
export type KeySeed = import("./types.js").KeySeed;
|
|
392
|
+
export type PlaidBatch = import("./types.js").PlaidBatch;
|
|
393
|
+
export type AuditPageOptions = import("./types.js").AuditPageOptions;
|
|
394
|
+
export type VocabItemRestoreSummary = import("./types.js").VocabItemRestoreSummary;
|
|
395
|
+
export type UserDataEntry = import("./types.js").UserDataEntry;
|
|
396
|
+
export type AdminUserDataEntry = import("./types.js").AdminUserDataEntry;
|
|
397
|
+
export type ActivityTallyRow = import("./types.js").ActivityTallyRow;
|
|
398
|
+
export type ConstraintRepair = import("./types.js").ConstraintRepair;
|
|
399
|
+
export type ValueSetRule = import("./types.js").ValueSetRule;
|
|
400
|
+
export type RefusedValues = import("./types.js").RefusedValues;
|
|
401
|
+
export type CommentableType = import("./types.js").CommentableType;
|
|
402
|
+
export type Comment = import("./types.js").Comment;
|
|
403
|
+
export type Guideline = import("./types.js").Guideline;
|
|
404
|
+
export type ClientEventType = import("./types.js").ClientEventType;
|
|
405
|
+
export type ClientEvent = import("./types.js").ClientEvent;
|
|
406
|
+
export type Invite = import("./types.js").Invite;
|
|
407
|
+
export type ServerLimits = import("./types.js").ServerLimits;
|
|
408
|
+
export type ServerHealth = import("./types.js").ServerHealth;
|
|
409
|
+
export type RateLimitBucket = import("./types.js").RateLimitBucket;
|
|
410
|
+
export type RateLimitSnapshot = import("./types.js").RateLimitSnapshot;
|
|
411
|
+
export type BackupStatus = import("./types.js").BackupStatus;
|
|
412
|
+
export type ServerReport = import("./types.js").ServerReport;
|
|
413
|
+
export type LiveLog = import("./types.js").LiveLog;
|
|
414
|
+
export type SSEConnection = import("./types.js").SSEConnection;
|
|
415
|
+
export type SSEStats = import("./types.js").SSEStats;
|
|
416
|
+
export type AtomicValue = import("./types.js").AtomicValue;
|
|
417
|
+
export type Created = import("./types.js").Created;
|
|
418
|
+
export type Project = import("./types.js").Project;
|
|
419
|
+
export type ProjectTextLayer = import("./types.js").ProjectTextLayer;
|
|
420
|
+
export type ProjectTokenLayer = import("./types.js").ProjectTokenLayer;
|
|
421
|
+
export type ProjectSpanLayer = import("./types.js").ProjectSpanLayer;
|
|
422
|
+
export type ProjectRelationLayer = import("./types.js").ProjectRelationLayer;
|
|
423
|
+
export type ProjectVocab = import("./types.js").ProjectVocab;
|
|
424
|
+
export type PlaidDocument = import("./types.js").PlaidDocument;
|
|
425
|
+
export type DocumentTextLayer = import("./types.js").DocumentTextLayer;
|
|
426
|
+
export type DocumentTokenLayer = import("./types.js").DocumentTokenLayer;
|
|
427
|
+
export type DocumentSpanLayer = import("./types.js").DocumentSpanLayer;
|
|
428
|
+
export type PlaidText = import("./types.js").PlaidText;
|
|
429
|
+
export type TextReshape = import("./types.js").TextReshape;
|
|
430
|
+
export type Token = import("./types.js").Token;
|
|
431
|
+
export type Span = import("./types.js").Span;
|
|
432
|
+
export type Relation = import("./types.js").Relation;
|
|
433
|
+
export type VocabItem = import("./types.js").VocabItem;
|
|
434
|
+
export type VocabLink = import("./types.js").VocabLink;
|
|
435
|
+
export type VocabLayer = import("./types.js").VocabLayer;
|
|
436
|
+
export type TextLayer = import("./types.js").TextLayer;
|
|
437
|
+
export type TokenLayer = import("./types.js").TokenLayer;
|
|
438
|
+
export type SpanLayer = import("./types.js").SpanLayer;
|
|
439
|
+
export type RelationLayer = import("./types.js").RelationLayer;
|
|
440
|
+
export type MetadataRecords = import("./types.js").MetadataRecords;
|
|
441
|
+
export type LayerRecords = import("./types.js").LayerRecords;
|
|
442
|
+
export type User = import("./types.js").User;
|
|
443
|
+
export type ProjectListEntry = import("./types.js").ProjectListEntry;
|
|
444
|
+
export type DocumentListEntry = import("./types.js").DocumentListEntry;
|
|
445
|
+
export type ApiToken = import("./types.js").ApiToken;
|
|
446
|
+
export type AuditUser = import("./types.js").AuditUser;
|
|
447
|
+
export type AuditTarget = import("./types.js").AuditTarget;
|
|
448
|
+
export type AuditOp = import("./types.js").AuditOp;
|
|
449
|
+
export type AuditEntry = import("./types.js").AuditEntry;
|
|
450
|
+
export type LockGrant = import("./types.js").LockGrant;
|
|
451
|
+
export type DocumentRestoreSummary = import("./types.js").DocumentRestoreSummary;
|
|
452
|
+
export type RestoreCounts = import("./types.js").RestoreCounts;
|
|
453
|
+
export type OperationGroup = import("./types.js").OperationGroup;
|
|
454
|
+
export type QueryResult = import("./types.js").QueryResult;
|
|
455
|
+
export type Page<T = any> = import("./types.js").Page<T>;
|