bem-ai-sdk 0.24.0 → 0.26.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 +16 -0
- package/package.json +1 -1
- package/resources/functions/functions.d.mts +433 -109
- package/resources/functions/functions.d.mts.map +1 -1
- package/resources/functions/functions.d.ts +433 -109
- package/resources/functions/functions.d.ts.map +1 -1
- package/resources/functions/functions.js.map +1 -1
- package/resources/functions/functions.mjs.map +1 -1
- package/resources/functions/versions.d.mts +45 -13
- package/resources/functions/versions.d.mts.map +1 -1
- package/resources/functions/versions.d.ts +45 -13
- package/resources/functions/versions.d.ts.map +1 -1
- package/src/resources/functions/functions.ts +460 -111
- package/src/resources/functions/versions.ts +47 -13
- 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
|
@@ -539,31 +539,38 @@ export namespace FunctionVersion {
|
|
|
539
539
|
|
|
540
540
|
export interface EnrichFunctionVersion {
|
|
541
541
|
/**
|
|
542
|
-
* Configuration for enrich function
|
|
542
|
+
* Configuration for an enrich function.
|
|
543
543
|
*
|
|
544
544
|
* **How Enrich Functions Work:**
|
|
545
545
|
*
|
|
546
|
-
* Enrich functions
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
*
|
|
546
|
+
* Enrich functions augment JSON input with data from external sources. They take
|
|
547
|
+
* JSON input (typically from a previous function), extract specified fields, fetch
|
|
548
|
+
* or search for matching data, and inject the results back into the JSON.
|
|
549
|
+
*
|
|
550
|
+
* **Data Sources:**
|
|
551
|
+
*
|
|
552
|
+
* - **Collections** (`source: "collection"`): Vector/keyword search against a BEM
|
|
553
|
+
* collection. Best for semantic matching against pre-indexed documents.
|
|
554
|
+
* - **Endpoints** (`source: "endpoint"`): HTTP call to any user-provided REST API.
|
|
555
|
+
* Best for looking up live data from CRMs, ERPs, or other external systems.
|
|
556
|
+
* Optionally uses LLM agent reasoning to rank candidates returned by the
|
|
557
|
+
* endpoint.
|
|
550
558
|
*
|
|
551
559
|
* **Input Requirements:**
|
|
552
560
|
*
|
|
553
|
-
* - Must receive JSON input (typically
|
|
554
|
-
* - Can be chained after transform or other functions that produce JSON output
|
|
561
|
+
* - Must receive JSON input (typically from a previous function's output)
|
|
555
562
|
*
|
|
556
563
|
* **Example Use Cases:**
|
|
557
564
|
*
|
|
558
|
-
* - Match product descriptions to SKU codes from a product catalog
|
|
559
|
-
* - Enrich customer data with account
|
|
560
|
-
* -
|
|
565
|
+
* - Match product descriptions to SKU codes from a product catalog collection
|
|
566
|
+
* - Enrich customer data with account details from a CRM endpoint
|
|
567
|
+
* - Use LLM agent reasoning to fuzzy-match line item descriptions to catalog
|
|
568
|
+
* products
|
|
561
569
|
*
|
|
562
570
|
* **Configuration:**
|
|
563
571
|
*
|
|
564
|
-
* - Define
|
|
565
|
-
* -
|
|
566
|
-
* - Steps are executed sequentially
|
|
572
|
+
* - Define named endpoints (for endpoint-source steps)
|
|
573
|
+
* - Define one or more enrichment steps; steps are executed sequentially
|
|
567
574
|
*/
|
|
568
575
|
config: FunctionsAPI.EnrichConfig;
|
|
569
576
|
|
|
@@ -703,6 +710,13 @@ export namespace FunctionVersion {
|
|
|
703
710
|
*/
|
|
704
711
|
displayName?: string;
|
|
705
712
|
|
|
713
|
+
/**
|
|
714
|
+
* Cross-cutting toggles for Parse functions. Mirrors the `extraConfig` surface on
|
|
715
|
+
* Extract / Join — separated from `parseConfig` so the per-call Parse output shape
|
|
716
|
+
* stays distinct from operator-level execution flags.
|
|
717
|
+
*/
|
|
718
|
+
extraConfig?: ParseFunctionVersion.ExtraConfig;
|
|
719
|
+
|
|
706
720
|
/**
|
|
707
721
|
* Per-version configuration for a Parse function.
|
|
708
722
|
*
|
|
@@ -722,6 +736,26 @@ export namespace FunctionVersion {
|
|
|
722
736
|
*/
|
|
723
737
|
usedInWorkflows?: Array<FunctionsAPI.WorkflowUsageInfo>;
|
|
724
738
|
}
|
|
739
|
+
|
|
740
|
+
export namespace ParseFunctionVersion {
|
|
741
|
+
/**
|
|
742
|
+
* Cross-cutting toggles for Parse functions. Mirrors the `extraConfig` surface on
|
|
743
|
+
* Extract / Join — separated from `parseConfig` so the per-call Parse output shape
|
|
744
|
+
* stays distinct from operator-level execution flags.
|
|
745
|
+
*/
|
|
746
|
+
export interface ExtraConfig {
|
|
747
|
+
/**
|
|
748
|
+
* When true, return per-section and per-entity-mention coordinates in the parse
|
|
749
|
+
* event's `fieldBoundingBoxes` map (same shape as Extract: JSON Pointer key →
|
|
750
|
+
* array of `{page, left, top, width, height}` with coordinates normalized to [0,
|
|
751
|
+
* 1]). Keys are `/sections/{N}` and `/entities/{N}/occurrences/{M}` into the parse
|
|
752
|
+
* output. Only applies to the open-ended discovery path (no `schema`) and to
|
|
753
|
+
* vision input types. Bedrock-backed parse functions silently return an empty map
|
|
754
|
+
* (no native bbox support). Defaults to false.
|
|
755
|
+
*/
|
|
756
|
+
enableBoundingBoxes?: boolean;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
725
759
|
}
|
|
726
760
|
|
|
727
761
|
export interface ListFunctionVersionsResponse {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.26.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.26.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.26.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.26.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|