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,122 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Monitor, evaluate, and iterate on the quality of every function in your
|
|
6
|
+
* environment. Function Accuracy bundles two complementary loops:
|
|
7
|
+
*
|
|
8
|
+
* ## Evaluations (`/v3/eval`)
|
|
9
|
+
*
|
|
10
|
+
* Trigger and retrieve per-transformation evaluations. Evaluations run
|
|
11
|
+
* asynchronously and score each transformation's output against the
|
|
12
|
+
* function's schema for confidence, per-field hallucination detection,
|
|
13
|
+
* and relevance. Supported for `extract`, `transform`, `analyze`, and
|
|
14
|
+
* `join` events.
|
|
15
|
+
*
|
|
16
|
+
* 1. **Trigger** — `POST /v3/eval` queues jobs for a batch of transformation IDs.
|
|
17
|
+
* 2. **Poll** — `GET /v3/eval/results` returns the current state of each
|
|
18
|
+
* requested ID, partitioned into `results`, `pending`, and `failed`.
|
|
19
|
+
* Accepts either `eventIDs` (preferred) or `transformationIDs` as a
|
|
20
|
+
* comma-separated query parameter, and always keys the response by
|
|
21
|
+
* event KSUID.
|
|
22
|
+
*
|
|
23
|
+
* Up to 100 IDs may be submitted per request.
|
|
24
|
+
*
|
|
25
|
+
* ## Metrics, review, regression (`/v3/functions/{metrics,review,regression,compare}`)
|
|
26
|
+
*
|
|
27
|
+
* Roll evaluation results and user corrections up into actionable
|
|
28
|
+
* function-level signal:
|
|
29
|
+
*
|
|
30
|
+
* - **`GET /v3/functions/metrics`** — aggregate accuracy, precision,
|
|
31
|
+
* recall, F1, and confusion-matrix counts per function.
|
|
32
|
+
* - **`POST /v3/functions/review`** — sample-size estimation,
|
|
33
|
+
* confidence-bucketed distribution, PR-AUC, and per-threshold
|
|
34
|
+
* confidence intervals (Wald or Wilson) for picking review cutoffs.
|
|
35
|
+
* - **`POST /v3/functions/regression`** — replay corrected historical
|
|
36
|
+
* inputs against a new function version, producing a labeled
|
|
37
|
+
* regression dataset.
|
|
38
|
+
* - **`POST /v3/functions/regression/corrections`** — propagate
|
|
39
|
+
* baseline corrections onto the regression dataset so it can be
|
|
40
|
+
* scored.
|
|
41
|
+
* - **`POST /v3/functions/compare`** — compute aggregate and
|
|
42
|
+
* field-level lift between any two versions, optionally scoped to
|
|
43
|
+
* the regression dataset.
|
|
44
|
+
*
|
|
45
|
+
* All five endpoints support `extract` end-to-end on both the vision
|
|
46
|
+
* and OCR paths, alongside the legacy `transform` / `analyze` / `join`
|
|
47
|
+
* types.
|
|
48
|
+
*/
|
|
49
|
+
export class Score extends APIResource {
|
|
50
|
+
/**
|
|
51
|
+
* **Score a function against a list of (input, expected) pairs.**
|
|
52
|
+
*
|
|
53
|
+
* Submits a batch of `(input, expected)` pairs, runs the named function over each
|
|
54
|
+
* input, and returns per-pair + aggregate accuracy metrics comparing the
|
|
55
|
+
* function's actual output to the provided expected JSON.
|
|
56
|
+
*
|
|
57
|
+
* Scoring runs asynchronously. The response carries a `scoreRunID`; poll
|
|
58
|
+
* `GET /v3/eval/score/{scoreRunID}` until `status` is one of `completed`, `error`,
|
|
59
|
+
* or `cancelled`.
|
|
60
|
+
*
|
|
61
|
+
* `matchConfig` controls comparator behavior:
|
|
62
|
+
*
|
|
63
|
+
* - `numericTolerance`: relative tolerance for numeric fields (0 = exact)
|
|
64
|
+
* - `stringMatch`: `exact` (default) or `fuzzy` (Levenshtein ratio)
|
|
65
|
+
* - `arrayMatch`: `by-index` (default; only mode in P0)
|
|
66
|
+
* - `ignorePaths`: JSON Pointer paths to skip, supports `*` wildcards
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const score = await client.eval.score.create({
|
|
71
|
+
* functionName: 'functionName',
|
|
72
|
+
* pairs: [
|
|
73
|
+
* {
|
|
74
|
+
* expected: {},
|
|
75
|
+
* input: {
|
|
76
|
+
* inputContent: 'inputContent',
|
|
77
|
+
* inputType: 'csv',
|
|
78
|
+
* },
|
|
79
|
+
* },
|
|
80
|
+
* ],
|
|
81
|
+
* });
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
create(body, options) {
|
|
85
|
+
return this._client.post('/v3/eval/score', { body, ...options });
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* **Get the status and per-pair results of a score run.**
|
|
89
|
+
*
|
|
90
|
+
* Returns `aggregate` only once `status` reaches `completed`. `perPair` is
|
|
91
|
+
* populated incrementally — each pair's `fieldResults` appears as its underlying
|
|
92
|
+
* function call terminates.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* const score = await client.eval.score.retrieve(
|
|
97
|
+
* 'scoreRunID',
|
|
98
|
+
* );
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
retrieve(scoreRunID, options) {
|
|
102
|
+
return this._client.get(path `/v3/eval/score/${scoreRunID}`, options);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* **Cancel an in-flight score run.**
|
|
106
|
+
*
|
|
107
|
+
* Transitions the run to `cancelled`. Function calls already in flight are allowed
|
|
108
|
+
* to finish (best-effort cancellation via the job queue); results from completed
|
|
109
|
+
* pairs may still appear in subsequent GETs.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const response = await client.eval.score.cancel(
|
|
114
|
+
* 'scoreRunID',
|
|
115
|
+
* );
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
cancel(scoreRunID, options) {
|
|
119
|
+
return this._client.post(path `/v3/eval/score/${scoreRunID}/cancel`, options);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=score.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score.mjs","sourceRoot":"","sources":["../../src/resources/eval/score.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,UAAkB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,UAAkB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,UAAU,SAAS,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;CACF"}
|
package/resources/fs.d.mts
CHANGED
|
@@ -212,6 +212,12 @@ export interface FNavigateParams {
|
|
|
212
212
|
* pointing at the toggle.
|
|
213
213
|
*/
|
|
214
214
|
op: FsOp;
|
|
215
|
+
/**
|
|
216
|
+
* Request-scoping concerns that are orthogonal to the op itself. Carried on a
|
|
217
|
+
* `context` object so future scoping hints (e.g. as-of timestamps, read
|
|
218
|
+
* consistency) can slot in without reshaping the op-specific fields.
|
|
219
|
+
*/
|
|
220
|
+
context?: FNavigateParams.Context;
|
|
215
221
|
/**
|
|
216
222
|
* When true, return only the hit count without snippet payload. Cheaper than
|
|
217
223
|
* fetching matches when the agent only wants a yes/no.
|
|
@@ -270,6 +276,28 @@ export interface FNavigateParams {
|
|
|
270
276
|
select?: Array<string>;
|
|
271
277
|
}
|
|
272
278
|
export declare namespace FNavigateParams {
|
|
279
|
+
/**
|
|
280
|
+
* Request-scoping concerns that are orthogonal to the op itself. Carried on a
|
|
281
|
+
* `context` object so future scoping hints (e.g. as-of timestamps, read
|
|
282
|
+
* consistency) can slot in without reshaping the op-specific fields.
|
|
283
|
+
*/
|
|
284
|
+
interface Context {
|
|
285
|
+
/**
|
|
286
|
+
* Bucket KSUID (prefix `bkt_`) to scope the request to — a named partition of the
|
|
287
|
+
* knowledge graph within the caller's account+environment.
|
|
288
|
+
*
|
|
289
|
+
* **Optional.** Omitting it (or passing an empty value) leaves the request
|
|
290
|
+
* UNSCOPED: memory-level reads (`find` / `open` / `xref`) return entities across
|
|
291
|
+
* every bucket in the account+environment, so pre-bucket callers keep their
|
|
292
|
+
* original all-entities behavior unchanged. (Writes are different: a parse call
|
|
293
|
+
* with no bucket targets the account default bucket.) When a bucket IS supplied,
|
|
294
|
+
* memory-level ops return only entities in that bucket; doc-level ops
|
|
295
|
+
* (`ls`/`cat`/`head`/`stat`/`grep`) are unaffected either way — documents are not
|
|
296
|
+
* bucket-partitioned. A bucket that does not belong to the caller's
|
|
297
|
+
* account+environment is rejected.
|
|
298
|
+
*/
|
|
299
|
+
bucket?: string;
|
|
300
|
+
}
|
|
273
301
|
/**
|
|
274
302
|
* Filter options for `op=ls` and `op=find`.
|
|
275
303
|
*/
|
package/resources/fs.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.mts","sourceRoot":"","sources":["../src/resources/fs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,EAAG,SAAQ,WAAW;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyEG;IACH,QAAQ,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;CAGzF;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtF;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,EAAE,EAAE,IAAI,CAAC;IAET;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,EAAE,EAAE,IAAI,CAAC;IAET;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEp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I,EACjB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
package/resources/fs.d.ts
CHANGED
|
@@ -212,6 +212,12 @@ export interface FNavigateParams {
|
|
|
212
212
|
* pointing at the toggle.
|
|
213
213
|
*/
|
|
214
214
|
op: FsOp;
|
|
215
|
+
/**
|
|
216
|
+
* Request-scoping concerns that are orthogonal to the op itself. Carried on a
|
|
217
|
+
* `context` object so future scoping hints (e.g. as-of timestamps, read
|
|
218
|
+
* consistency) can slot in without reshaping the op-specific fields.
|
|
219
|
+
*/
|
|
220
|
+
context?: FNavigateParams.Context;
|
|
215
221
|
/**
|
|
216
222
|
* When true, return only the hit count without snippet payload. Cheaper than
|
|
217
223
|
* fetching matches when the agent only wants a yes/no.
|
|
@@ -270,6 +276,28 @@ export interface FNavigateParams {
|
|
|
270
276
|
select?: Array<string>;
|
|
271
277
|
}
|
|
272
278
|
export declare namespace FNavigateParams {
|
|
279
|
+
/**
|
|
280
|
+
* Request-scoping concerns that are orthogonal to the op itself. Carried on a
|
|
281
|
+
* `context` object so future scoping hints (e.g. as-of timestamps, read
|
|
282
|
+
* consistency) can slot in without reshaping the op-specific fields.
|
|
283
|
+
*/
|
|
284
|
+
interface Context {
|
|
285
|
+
/**
|
|
286
|
+
* Bucket KSUID (prefix `bkt_`) to scope the request to — a named partition of the
|
|
287
|
+
* knowledge graph within the caller's account+environment.
|
|
288
|
+
*
|
|
289
|
+
* **Optional.** Omitting it (or passing an empty value) leaves the request
|
|
290
|
+
* UNSCOPED: memory-level reads (`find` / `open` / `xref`) return entities across
|
|
291
|
+
* every bucket in the account+environment, so pre-bucket callers keep their
|
|
292
|
+
* original all-entities behavior unchanged. (Writes are different: a parse call
|
|
293
|
+
* with no bucket targets the account default bucket.) When a bucket IS supplied,
|
|
294
|
+
* memory-level ops return only entities in that bucket; doc-level ops
|
|
295
|
+
* (`ls`/`cat`/`head`/`stat`/`grep`) are unaffected either way — documents are not
|
|
296
|
+
* bucket-partitioned. A bucket that does not belong to the caller's
|
|
297
|
+
* account+environment is rejected.
|
|
298
|
+
*/
|
|
299
|
+
bucket?: string;
|
|
300
|
+
}
|
|
273
301
|
/**
|
|
274
302
|
* Filter options for `op=ls` and `op=find`.
|
|
275
303
|
*/
|
package/resources/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../src/resources/fs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,EAAG,SAAQ,WAAW;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyEG;IACH,QAAQ,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;CAGzF;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtF;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,EAAE,EAAE,IAAI,CAAC;IAET;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB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QACH,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;KAC9B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EACL,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -16,8 +16,8 @@ export declare class Functions extends APIResource {
|
|
|
16
16
|
/**
|
|
17
17
|
* **Create a function.**
|
|
18
18
|
*
|
|
19
|
-
* The function type
|
|
20
|
-
* `
|
|
19
|
+
* The function `type` determines which configuration fields are required — see the
|
|
20
|
+
* `CreateFunctionV3` discriminated union and
|
|
21
21
|
* [Function types overview](/guide/function-types/overview) for the per-type
|
|
22
22
|
* contract.
|
|
23
23
|
*
|
|
@@ -261,7 +261,7 @@ export declare namespace ClassificationListItem {
|
|
|
261
261
|
/**
|
|
262
262
|
* V3 wire form of the classify function create payload.
|
|
263
263
|
*/
|
|
264
|
-
export type CreateFunction = CreateFunction.ExtractFunction | CreateFunction.ClassifyFunction | CreateFunction.SendFunction | CreateFunction.SplitFunction | CreateFunction.JoinFunction | CreateFunction.PayloadShapingFunction | CreateFunction.EnrichFunction | CreateFunction.ParseFunction;
|
|
264
|
+
export type CreateFunction = CreateFunction.ExtractFunction | CreateFunction.ClassifyFunction | CreateFunction.SendFunction | CreateFunction.SplitFunction | CreateFunction.JoinFunction | CreateFunction.PayloadShapingFunction | CreateFunction.EnrichFunction | CreateFunction.ParseFunction | CreateFunction.RenderFunction;
|
|
265
265
|
export declare namespace CreateFunction {
|
|
266
266
|
interface ExtractFunction {
|
|
267
267
|
/**
|
|
@@ -553,6 +553,55 @@ export declare namespace CreateFunction {
|
|
|
553
553
|
enableBoundingBoxes?: boolean;
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
+
interface RenderFunction {
|
|
557
|
+
/**
|
|
558
|
+
* Name of function. Must be UNIQUE on a per-environment basis.
|
|
559
|
+
*/
|
|
560
|
+
functionName: string;
|
|
561
|
+
/**
|
|
562
|
+
* Request-side render configuration. Carries the template document as
|
|
563
|
+
* base64-encoded `.docx` bytes: the server validates them, stores the template,
|
|
564
|
+
* and derives the placeholder/style-id contract at create/update time, so clients
|
|
565
|
+
* never submit `placeholders` or `styleIds`. The response shape (`RenderConfig`)
|
|
566
|
+
* returns the derived contract.
|
|
567
|
+
*/
|
|
568
|
+
renderConfig: RenderFunction.RenderConfig;
|
|
569
|
+
type: 'render';
|
|
570
|
+
/**
|
|
571
|
+
* Display name of function. Human-readable name to help you identify the function.
|
|
572
|
+
*/
|
|
573
|
+
displayName?: string;
|
|
574
|
+
/**
|
|
575
|
+
* Array of tags to categorize and organize functions.
|
|
576
|
+
*/
|
|
577
|
+
tags?: Array<string>;
|
|
578
|
+
}
|
|
579
|
+
namespace RenderFunction {
|
|
580
|
+
/**
|
|
581
|
+
* Request-side render configuration. Carries the template document as
|
|
582
|
+
* base64-encoded `.docx` bytes: the server validates them, stores the template,
|
|
583
|
+
* and derives the placeholder/style-id contract at create/update time, so clients
|
|
584
|
+
* never submit `placeholders` or `styleIds`. The response shape (`RenderConfig`)
|
|
585
|
+
* returns the derived contract.
|
|
586
|
+
*/
|
|
587
|
+
interface RenderConfig {
|
|
588
|
+
template: RenderConfig.Template;
|
|
589
|
+
}
|
|
590
|
+
namespace RenderConfig {
|
|
591
|
+
interface Template {
|
|
592
|
+
/**
|
|
593
|
+
* Base64-encoded `.docx` bytes. In the Bem CLI, use `@path/to/file` to embed it
|
|
594
|
+
* automatically.
|
|
595
|
+
*/
|
|
596
|
+
base64: string;
|
|
597
|
+
/**
|
|
598
|
+
* Original upload filename (e.g. `contract.docx`), stored for display only. Does
|
|
599
|
+
* not affect where the template is stored.
|
|
600
|
+
*/
|
|
601
|
+
name?: string;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
556
605
|
}
|
|
557
606
|
/**
|
|
558
607
|
* Configuration for an enrich function.
|
|
@@ -875,7 +924,7 @@ export interface EnrichStep {
|
|
|
875
924
|
* `classify` in place of `route`. Legacy `transform` and `analyze` functions
|
|
876
925
|
* remain readable via V3.
|
|
877
926
|
*/
|
|
878
|
-
export type Function = Function.TransformFunction | Function.ExtractFunction | Function.AnalyzeFunction | Function.ClassifyFunction | Function.SendFunction | Function.SplitFunction | Function.JoinFunction | Function.PayloadShapingFunction | Function.EnrichFunction | Function.ParseFunction;
|
|
927
|
+
export type Function = Function.TransformFunction | Function.ExtractFunction | Function.AnalyzeFunction | Function.ClassifyFunction | Function.SendFunction | Function.SplitFunction | Function.JoinFunction | Function.PayloadShapingFunction | Function.EnrichFunction | Function.ParseFunction | Function.RenderFunction;
|
|
879
928
|
export declare namespace Function {
|
|
880
929
|
interface TransformFunction {
|
|
881
930
|
/**
|
|
@@ -1418,6 +1467,134 @@ export declare namespace Function {
|
|
|
1418
1467
|
enableBoundingBoxes?: boolean;
|
|
1419
1468
|
}
|
|
1420
1469
|
}
|
|
1470
|
+
interface RenderFunction {
|
|
1471
|
+
/**
|
|
1472
|
+
* Unique identifier of function.
|
|
1473
|
+
*/
|
|
1474
|
+
functionID: string;
|
|
1475
|
+
/**
|
|
1476
|
+
* Name of function. Must be UNIQUE on a per-environment basis.
|
|
1477
|
+
*/
|
|
1478
|
+
functionName: string;
|
|
1479
|
+
type: 'render';
|
|
1480
|
+
/**
|
|
1481
|
+
* Version number of function.
|
|
1482
|
+
*/
|
|
1483
|
+
versionNum: number;
|
|
1484
|
+
/**
|
|
1485
|
+
* Audit trail information for the function.
|
|
1486
|
+
*/
|
|
1487
|
+
audit?: FunctionsAPI.FunctionAudit;
|
|
1488
|
+
/**
|
|
1489
|
+
* Display name of function. Human-readable name to help you identify the function.
|
|
1490
|
+
*/
|
|
1491
|
+
displayName?: string;
|
|
1492
|
+
/**
|
|
1493
|
+
* Per-version configuration for a Render function.
|
|
1494
|
+
*
|
|
1495
|
+
* Render emits a `.docx` from schema-typed JSON by composing the JSON into a
|
|
1496
|
+
* `.docx` template. The template document is stored server-side; this response
|
|
1497
|
+
* exposes only the contract derived from it. Schema validation runs internally in
|
|
1498
|
+
* the ML service against the bundled core schema; no customer-supplied schema
|
|
1499
|
+
* rides this surface.
|
|
1500
|
+
*/
|
|
1501
|
+
renderConfig?: RenderFunction.RenderConfig;
|
|
1502
|
+
/**
|
|
1503
|
+
* Array of tags to categorize and organize functions.
|
|
1504
|
+
*/
|
|
1505
|
+
tags?: Array<string>;
|
|
1506
|
+
/**
|
|
1507
|
+
* List of workflows that use this function.
|
|
1508
|
+
*/
|
|
1509
|
+
usedInWorkflows?: Array<FunctionsAPI.WorkflowUsageInfo>;
|
|
1510
|
+
}
|
|
1511
|
+
namespace RenderFunction {
|
|
1512
|
+
/**
|
|
1513
|
+
* Per-version configuration for a Render function.
|
|
1514
|
+
*
|
|
1515
|
+
* Render emits a `.docx` from schema-typed JSON by composing the JSON into a
|
|
1516
|
+
* `.docx` template. The template document is stored server-side; this response
|
|
1517
|
+
* exposes only the contract derived from it. Schema validation runs internally in
|
|
1518
|
+
* the ML service against the bundled core schema; no customer-supplied schema
|
|
1519
|
+
* rides this surface.
|
|
1520
|
+
*/
|
|
1521
|
+
interface RenderConfig {
|
|
1522
|
+
/**
|
|
1523
|
+
* The uploaded template: its filename, a short-lived presigned download URL, and
|
|
1524
|
+
* the placeholder/style contract derived from it. Absent on configs created before
|
|
1525
|
+
* template capture existed.
|
|
1526
|
+
*/
|
|
1527
|
+
template?: RenderConfig.Template;
|
|
1528
|
+
}
|
|
1529
|
+
namespace RenderConfig {
|
|
1530
|
+
/**
|
|
1531
|
+
* The uploaded template: its filename, a short-lived presigned download URL, and
|
|
1532
|
+
* the placeholder/style contract derived from it. Absent on configs created before
|
|
1533
|
+
* template capture existed.
|
|
1534
|
+
*/
|
|
1535
|
+
interface Template {
|
|
1536
|
+
/**
|
|
1537
|
+
* Short-lived presigned URL to download the stored `.docx`. The private storage
|
|
1538
|
+
* location is never exposed.
|
|
1539
|
+
*/
|
|
1540
|
+
downloadURL?: string;
|
|
1541
|
+
/**
|
|
1542
|
+
* Supported list kinds (`decimal`, `bullet`) the template's `numbering.xml`
|
|
1543
|
+
* defines an `abstractNum` for. Empty means the template can hold no list, so any
|
|
1544
|
+
* list primitive will fail at render.
|
|
1545
|
+
*/
|
|
1546
|
+
listKinds?: Array<'decimal' | 'bullet'>;
|
|
1547
|
+
/**
|
|
1548
|
+
* Original filename of the uploaded template (e.g. `contract.docx`), echoed back
|
|
1549
|
+
* for display. Absent on templates uploaded before the filename was captured.
|
|
1550
|
+
*/
|
|
1551
|
+
name?: string;
|
|
1552
|
+
/**
|
|
1553
|
+
* The placeholder contract a Render template declares, grouped by how each
|
|
1554
|
+
* placeholder is filled. Derived from the template at create/update time by
|
|
1555
|
+
* scanning its `docxtpl` tags; not user-supplied.
|
|
1556
|
+
*
|
|
1557
|
+
* - `stringKeys`: bare string placeholders (`{{ key }}`) filled with a single
|
|
1558
|
+
* value.
|
|
1559
|
+
* - `blockKeys`: wrapped-primitive placeholders (`{{p key }}`) — bind one core
|
|
1560
|
+
* primitive (paragraph, table, image, or list). The placeholder's own paragraph
|
|
1561
|
+
* dissolves and is replaced by the rendered subdocument's blocks, rather than
|
|
1562
|
+
* substituting text inline.
|
|
1563
|
+
*/
|
|
1564
|
+
placeholders?: Template.Placeholders;
|
|
1565
|
+
/**
|
|
1566
|
+
* Paragraph/character style IDs the uploaded template defines and the rendered
|
|
1567
|
+
* output can reference. Derived from the template's `styles.xml` at create/update
|
|
1568
|
+
* time.
|
|
1569
|
+
*/
|
|
1570
|
+
styleIds?: Array<string>;
|
|
1571
|
+
/**
|
|
1572
|
+
* Style IDs whose type is table — the styles a `table` primitive's required
|
|
1573
|
+
* `styleId` can name. Empty means the template defines no table style, so any
|
|
1574
|
+
* table primitive will fail at render.
|
|
1575
|
+
*/
|
|
1576
|
+
tableStyleIds?: Array<string>;
|
|
1577
|
+
}
|
|
1578
|
+
namespace Template {
|
|
1579
|
+
/**
|
|
1580
|
+
* The placeholder contract a Render template declares, grouped by how each
|
|
1581
|
+
* placeholder is filled. Derived from the template at create/update time by
|
|
1582
|
+
* scanning its `docxtpl` tags; not user-supplied.
|
|
1583
|
+
*
|
|
1584
|
+
* - `stringKeys`: bare string placeholders (`{{ key }}`) filled with a single
|
|
1585
|
+
* value.
|
|
1586
|
+
* - `blockKeys`: wrapped-primitive placeholders (`{{p key }}`) — bind one core
|
|
1587
|
+
* primitive (paragraph, table, image, or list). The placeholder's own paragraph
|
|
1588
|
+
* dissolves and is replaced by the rendered subdocument's blocks, rather than
|
|
1589
|
+
* substituting text inline.
|
|
1590
|
+
*/
|
|
1591
|
+
interface Placeholders {
|
|
1592
|
+
blockKeys: Array<string>;
|
|
1593
|
+
stringKeys: Array<string>;
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1421
1598
|
}
|
|
1422
1599
|
export interface FunctionAudit {
|
|
1423
1600
|
/**
|
|
@@ -1449,7 +1626,7 @@ export interface FunctionResponse {
|
|
|
1449
1626
|
/**
|
|
1450
1627
|
* The type of the function.
|
|
1451
1628
|
*/
|
|
1452
|
-
export type FunctionType = 'transform' | 'extract' | 'route' | 'classify' | 'send' | 'split' | 'join' | 'analyze' | 'payload_shaping' | 'enrich' | 'parse';
|
|
1629
|
+
export type FunctionType = 'transform' | 'extract' | 'route' | 'classify' | 'send' | 'split' | 'join' | 'analyze' | 'payload_shaping' | 'enrich' | 'parse' | 'render';
|
|
1453
1630
|
export interface ListFunctionsResponse {
|
|
1454
1631
|
functions?: Array<Function>;
|
|
1455
1632
|
/**
|
|
@@ -1465,6 +1642,12 @@ export interface ListFunctionsResponse {
|
|
|
1465
1642
|
* output concern) and cross-document memory linking (an environment-wide concern).
|
|
1466
1643
|
*/
|
|
1467
1644
|
export interface ParseConfig {
|
|
1645
|
+
/**
|
|
1646
|
+
* Optional bucket NAME that parse-extracted entities land in when no call-level
|
|
1647
|
+
* bucket is supplied. Lower precedence than a call-level bucket, higher than the
|
|
1648
|
+
* account+environment default.
|
|
1649
|
+
*/
|
|
1650
|
+
defaultBucket?: string;
|
|
1468
1651
|
/**
|
|
1469
1652
|
* When true, extract named entities (people, organizations, products, studies,
|
|
1470
1653
|
* identifiers, etc.) and the relationships between them, and dedupe by canonical
|
|
@@ -1520,7 +1703,7 @@ export interface SplitFunctionSemanticPageItemClass {
|
|
|
1520
1703
|
* unions (existing classify functions are returned from V2 GET endpoints
|
|
1521
1704
|
* verbatim).V3 wire form of the classify function upsert payload.
|
|
1522
1705
|
*/
|
|
1523
|
-
export type UpdateFunction = UpdateFunction.ExtractFunction | UpdateFunction.ClassifyFunction | UpdateFunction.SendFunction | UpdateFunction.SplitFunction | UpdateFunction.JoinFunction | UpdateFunction.PayloadShapingFunction | UpdateFunction.UpsertEnrichFunction | UpdateFunction.ParseFunction;
|
|
1706
|
+
export type UpdateFunction = UpdateFunction.ExtractFunction | UpdateFunction.ClassifyFunction | UpdateFunction.SendFunction | UpdateFunction.SplitFunction | UpdateFunction.JoinFunction | UpdateFunction.PayloadShapingFunction | UpdateFunction.UpsertEnrichFunction | UpdateFunction.ParseFunction | UpdateFunction.RenderFunction;
|
|
1524
1707
|
export declare namespace UpdateFunction {
|
|
1525
1708
|
interface ExtractFunction {
|
|
1526
1709
|
type: 'extract';
|
|
@@ -1819,6 +2002,55 @@ export declare namespace UpdateFunction {
|
|
|
1819
2002
|
enableBoundingBoxes?: boolean;
|
|
1820
2003
|
}
|
|
1821
2004
|
}
|
|
2005
|
+
interface RenderFunction {
|
|
2006
|
+
type: 'render';
|
|
2007
|
+
/**
|
|
2008
|
+
* Display name of function. Human-readable name to help you identify the function.
|
|
2009
|
+
*/
|
|
2010
|
+
displayName?: string;
|
|
2011
|
+
/**
|
|
2012
|
+
* Name of function. Must be UNIQUE on a per-environment basis.
|
|
2013
|
+
*/
|
|
2014
|
+
functionName?: string;
|
|
2015
|
+
/**
|
|
2016
|
+
* Request-side render configuration. Carries the template document as
|
|
2017
|
+
* base64-encoded `.docx` bytes: the server validates them, stores the template,
|
|
2018
|
+
* and derives the placeholder/style-id contract at create/update time, so clients
|
|
2019
|
+
* never submit `placeholders` or `styleIds`. The response shape (`RenderConfig`)
|
|
2020
|
+
* returns the derived contract.
|
|
2021
|
+
*/
|
|
2022
|
+
renderConfig?: RenderFunction.RenderConfig;
|
|
2023
|
+
/**
|
|
2024
|
+
* Array of tags to categorize and organize functions.
|
|
2025
|
+
*/
|
|
2026
|
+
tags?: Array<string>;
|
|
2027
|
+
}
|
|
2028
|
+
namespace RenderFunction {
|
|
2029
|
+
/**
|
|
2030
|
+
* Request-side render configuration. Carries the template document as
|
|
2031
|
+
* base64-encoded `.docx` bytes: the server validates them, stores the template,
|
|
2032
|
+
* and derives the placeholder/style-id contract at create/update time, so clients
|
|
2033
|
+
* never submit `placeholders` or `styleIds`. The response shape (`RenderConfig`)
|
|
2034
|
+
* returns the derived contract.
|
|
2035
|
+
*/
|
|
2036
|
+
interface RenderConfig {
|
|
2037
|
+
template: RenderConfig.Template;
|
|
2038
|
+
}
|
|
2039
|
+
namespace RenderConfig {
|
|
2040
|
+
interface Template {
|
|
2041
|
+
/**
|
|
2042
|
+
* Base64-encoded `.docx` bytes. In the Bem CLI, use `@path/to/file` to embed it
|
|
2043
|
+
* automatically.
|
|
2044
|
+
*/
|
|
2045
|
+
base64: string;
|
|
2046
|
+
/**
|
|
2047
|
+
* Original upload filename (e.g. `contract.docx`), stored for display only. Does
|
|
2048
|
+
* not affect where the template is stored.
|
|
2049
|
+
*/
|
|
2050
|
+
name?: string;
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
1822
2054
|
}
|
|
1823
2055
|
export interface UserActionSummary {
|
|
1824
2056
|
/**
|
|
@@ -2907,7 +3139,7 @@ export declare namespace FunctionGetMetricsResponse {
|
|
|
2907
3139
|
}
|
|
2908
3140
|
}
|
|
2909
3141
|
}
|
|
2910
|
-
export type FunctionCreateParams = FunctionCreateParams.CreateExtractFunction | FunctionCreateParams.CreateClassifyFunction | FunctionCreateParams.CreateSendFunction | FunctionCreateParams.CreateSplitFunction | FunctionCreateParams.CreateJoinFunction | FunctionCreateParams.CreatePayloadShapingFunction | FunctionCreateParams.CreateEnrichFunction | FunctionCreateParams.CreateParseFunction;
|
|
3142
|
+
export type FunctionCreateParams = FunctionCreateParams.CreateExtractFunction | FunctionCreateParams.CreateClassifyFunction | FunctionCreateParams.CreateSendFunction | FunctionCreateParams.CreateSplitFunction | FunctionCreateParams.CreateJoinFunction | FunctionCreateParams.CreatePayloadShapingFunction | FunctionCreateParams.CreateEnrichFunction | FunctionCreateParams.CreateParseFunction | FunctionCreateParams.CreateRenderFunction;
|
|
2911
3143
|
export declare namespace FunctionCreateParams {
|
|
2912
3144
|
interface CreateExtractFunction {
|
|
2913
3145
|
/**
|
|
@@ -3196,8 +3428,57 @@ export declare namespace FunctionCreateParams {
|
|
|
3196
3428
|
enableBoundingBoxes?: boolean;
|
|
3197
3429
|
}
|
|
3198
3430
|
}
|
|
3431
|
+
interface CreateRenderFunction {
|
|
3432
|
+
/**
|
|
3433
|
+
* Name of function. Must be UNIQUE on a per-environment basis.
|
|
3434
|
+
*/
|
|
3435
|
+
functionName: string;
|
|
3436
|
+
/**
|
|
3437
|
+
* Request-side render configuration. Carries the template document as
|
|
3438
|
+
* base64-encoded `.docx` bytes: the server validates them, stores the template,
|
|
3439
|
+
* and derives the placeholder/style-id contract at create/update time, so clients
|
|
3440
|
+
* never submit `placeholders` or `styleIds`. The response shape (`RenderConfig`)
|
|
3441
|
+
* returns the derived contract.
|
|
3442
|
+
*/
|
|
3443
|
+
renderConfig: CreateRenderFunction.RenderConfig;
|
|
3444
|
+
type: 'render';
|
|
3445
|
+
/**
|
|
3446
|
+
* Display name of function. Human-readable name to help you identify the function.
|
|
3447
|
+
*/
|
|
3448
|
+
displayName?: string;
|
|
3449
|
+
/**
|
|
3450
|
+
* Array of tags to categorize and organize functions.
|
|
3451
|
+
*/
|
|
3452
|
+
tags?: Array<string>;
|
|
3453
|
+
}
|
|
3454
|
+
namespace CreateRenderFunction {
|
|
3455
|
+
/**
|
|
3456
|
+
* Request-side render configuration. Carries the template document as
|
|
3457
|
+
* base64-encoded `.docx` bytes: the server validates them, stores the template,
|
|
3458
|
+
* and derives the placeholder/style-id contract at create/update time, so clients
|
|
3459
|
+
* never submit `placeholders` or `styleIds`. The response shape (`RenderConfig`)
|
|
3460
|
+
* returns the derived contract.
|
|
3461
|
+
*/
|
|
3462
|
+
interface RenderConfig {
|
|
3463
|
+
template: RenderConfig.Template;
|
|
3464
|
+
}
|
|
3465
|
+
namespace RenderConfig {
|
|
3466
|
+
interface Template {
|
|
3467
|
+
/**
|
|
3468
|
+
* Base64-encoded `.docx` bytes. In the Bem CLI, use `@path/to/file` to embed it
|
|
3469
|
+
* automatically.
|
|
3470
|
+
*/
|
|
3471
|
+
base64: string;
|
|
3472
|
+
/**
|
|
3473
|
+
* Original upload filename (e.g. `contract.docx`), stored for display only. Does
|
|
3474
|
+
* not affect where the template is stored.
|
|
3475
|
+
*/
|
|
3476
|
+
name?: string;
|
|
3477
|
+
}
|
|
3478
|
+
}
|
|
3479
|
+
}
|
|
3199
3480
|
}
|
|
3200
|
-
export type FunctionUpdateParams = FunctionUpdateParams.UpsertExtractFunction | FunctionUpdateParams.UpsertClassifyFunction | FunctionUpdateParams.UpsertSendFunction | FunctionUpdateParams.UpsertSplitFunction | FunctionUpdateParams.UpsertJoinFunction | FunctionUpdateParams.UpsertPayloadShapingFunction | FunctionUpdateParams.UpsertEnrichFunction | FunctionUpdateParams.UpsertParseFunction;
|
|
3481
|
+
export type FunctionUpdateParams = FunctionUpdateParams.UpsertExtractFunction | FunctionUpdateParams.UpsertClassifyFunction | FunctionUpdateParams.UpsertSendFunction | FunctionUpdateParams.UpsertSplitFunction | FunctionUpdateParams.UpsertJoinFunction | FunctionUpdateParams.UpsertPayloadShapingFunction | FunctionUpdateParams.UpsertEnrichFunction | FunctionUpdateParams.UpsertParseFunction | FunctionUpdateParams.UpsertRenderFunction;
|
|
3201
3482
|
export declare namespace FunctionUpdateParams {
|
|
3202
3483
|
interface UpsertExtractFunction {
|
|
3203
3484
|
type: 'extract';
|
|
@@ -3474,6 +3755,55 @@ export declare namespace FunctionUpdateParams {
|
|
|
3474
3755
|
enableBoundingBoxes?: boolean;
|
|
3475
3756
|
}
|
|
3476
3757
|
}
|
|
3758
|
+
interface UpsertRenderFunction {
|
|
3759
|
+
type: 'render';
|
|
3760
|
+
/**
|
|
3761
|
+
* Display name of function. Human-readable name to help you identify the function.
|
|
3762
|
+
*/
|
|
3763
|
+
displayName?: string;
|
|
3764
|
+
/**
|
|
3765
|
+
* Name of function. Must be UNIQUE on a per-environment basis.
|
|
3766
|
+
*/
|
|
3767
|
+
functionName?: string;
|
|
3768
|
+
/**
|
|
3769
|
+
* Request-side render configuration. Carries the template document as
|
|
3770
|
+
* base64-encoded `.docx` bytes: the server validates them, stores the template,
|
|
3771
|
+
* and derives the placeholder/style-id contract at create/update time, so clients
|
|
3772
|
+
* never submit `placeholders` or `styleIds`. The response shape (`RenderConfig`)
|
|
3773
|
+
* returns the derived contract.
|
|
3774
|
+
*/
|
|
3775
|
+
renderConfig?: UpsertRenderFunction.RenderConfig;
|
|
3776
|
+
/**
|
|
3777
|
+
* Array of tags to categorize and organize functions.
|
|
3778
|
+
*/
|
|
3779
|
+
tags?: Array<string>;
|
|
3780
|
+
}
|
|
3781
|
+
namespace UpsertRenderFunction {
|
|
3782
|
+
/**
|
|
3783
|
+
* Request-side render configuration. Carries the template document as
|
|
3784
|
+
* base64-encoded `.docx` bytes: the server validates them, stores the template,
|
|
3785
|
+
* and derives the placeholder/style-id contract at create/update time, so clients
|
|
3786
|
+
* never submit `placeholders` or `styleIds`. The response shape (`RenderConfig`)
|
|
3787
|
+
* returns the derived contract.
|
|
3788
|
+
*/
|
|
3789
|
+
interface RenderConfig {
|
|
3790
|
+
template: RenderConfig.Template;
|
|
3791
|
+
}
|
|
3792
|
+
namespace RenderConfig {
|
|
3793
|
+
interface Template {
|
|
3794
|
+
/**
|
|
3795
|
+
* Base64-encoded `.docx` bytes. In the Bem CLI, use `@path/to/file` to embed it
|
|
3796
|
+
* automatically.
|
|
3797
|
+
*/
|
|
3798
|
+
base64: string;
|
|
3799
|
+
/**
|
|
3800
|
+
* Original upload filename (e.g. `contract.docx`), stored for display only. Does
|
|
3801
|
+
* not affect where the template is stored.
|
|
3802
|
+
*/
|
|
3803
|
+
name?: string;
|
|
3804
|
+
}
|
|
3805
|
+
}
|
|
3806
|
+
}
|
|
3477
3807
|
}
|
|
3478
3808
|
export interface FunctionListParams extends FunctionsPageParams {
|
|
3479
3809
|
displayName?: string;
|