@smplkit/sdk 3.0.56 → 3.0.57
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/dist/index.cjs +26 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.js +26 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -304,20 +304,20 @@ declare class Forwarder {
|
|
|
304
304
|
*/
|
|
305
305
|
filter: Record<string, unknown> | null;
|
|
306
306
|
/**
|
|
307
|
-
* Optional template applied to each event before delivery.
|
|
308
|
-
*
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
*
|
|
307
|
+
* Optional template applied to each event before delivery. The wire
|
|
308
|
+
* schema widens to arbitrary JSON to leave room for future transform
|
|
309
|
+
* engines carrying structured templates; for
|
|
310
|
+
* {@link TransformType.JSONATA} the value must be a JSONata
|
|
311
|
+
* expression string. `null` delivers the event JSON as-is.
|
|
312
312
|
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
313
|
+
* {@link transform} and {@link transformType} travel as a pair —
|
|
314
|
+
* both set, or both `null`. The SDK enforces this at save time.
|
|
315
315
|
*/
|
|
316
316
|
transform: unknown;
|
|
317
317
|
/**
|
|
318
318
|
* Engine used to evaluate {@link transform}. Required whenever
|
|
319
|
-
* {@link transform} is set. Today only
|
|
320
|
-
* is supported.
|
|
319
|
+
* {@link transform} is set, forbidden when it isn't. Today only
|
|
320
|
+
* {@link TransformType.JSONATA} is supported.
|
|
321
321
|
*/
|
|
322
322
|
transformType: TransformType | null;
|
|
323
323
|
/**
|
|
@@ -3210,15 +3210,15 @@ declare class ForwardersClient implements ForwarderModelClient {
|
|
|
3210
3210
|
* don't match are recorded as
|
|
3211
3211
|
* `filtered_out` deliveries.
|
|
3212
3212
|
* @param fields.transformType Engine used to evaluate `transform`.
|
|
3213
|
-
*
|
|
3214
|
-
*
|
|
3215
|
-
*
|
|
3213
|
+
* Today only {@link TransformType.JSONATA}
|
|
3214
|
+
* is supported. Must be supplied together
|
|
3215
|
+
* with `transform` (both or neither).
|
|
3216
3216
|
* @param fields.transform Optional template applied to each
|
|
3217
3217
|
* event before delivery. The value is
|
|
3218
|
-
* arbitrary JSON — for JSONATA,
|
|
3219
|
-
*
|
|
3220
|
-
*
|
|
3221
|
-
* `
|
|
3218
|
+
* arbitrary JSON — for JSONATA, it
|
|
3219
|
+
* must be a string containing a JSONata
|
|
3220
|
+
* expression. Must be supplied together
|
|
3221
|
+
* with `transformType` (both or neither).
|
|
3222
3222
|
*/
|
|
3223
3223
|
new(fields: {
|
|
3224
3224
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -304,20 +304,20 @@ declare class Forwarder {
|
|
|
304
304
|
*/
|
|
305
305
|
filter: Record<string, unknown> | null;
|
|
306
306
|
/**
|
|
307
|
-
* Optional template applied to each event before delivery.
|
|
308
|
-
*
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
*
|
|
307
|
+
* Optional template applied to each event before delivery. The wire
|
|
308
|
+
* schema widens to arbitrary JSON to leave room for future transform
|
|
309
|
+
* engines carrying structured templates; for
|
|
310
|
+
* {@link TransformType.JSONATA} the value must be a JSONata
|
|
311
|
+
* expression string. `null` delivers the event JSON as-is.
|
|
312
312
|
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
313
|
+
* {@link transform} and {@link transformType} travel as a pair —
|
|
314
|
+
* both set, or both `null`. The SDK enforces this at save time.
|
|
315
315
|
*/
|
|
316
316
|
transform: unknown;
|
|
317
317
|
/**
|
|
318
318
|
* Engine used to evaluate {@link transform}. Required whenever
|
|
319
|
-
* {@link transform} is set. Today only
|
|
320
|
-
* is supported.
|
|
319
|
+
* {@link transform} is set, forbidden when it isn't. Today only
|
|
320
|
+
* {@link TransformType.JSONATA} is supported.
|
|
321
321
|
*/
|
|
322
322
|
transformType: TransformType | null;
|
|
323
323
|
/**
|
|
@@ -3210,15 +3210,15 @@ declare class ForwardersClient implements ForwarderModelClient {
|
|
|
3210
3210
|
* don't match are recorded as
|
|
3211
3211
|
* `filtered_out` deliveries.
|
|
3212
3212
|
* @param fields.transformType Engine used to evaluate `transform`.
|
|
3213
|
-
*
|
|
3214
|
-
*
|
|
3215
|
-
*
|
|
3213
|
+
* Today only {@link TransformType.JSONATA}
|
|
3214
|
+
* is supported. Must be supplied together
|
|
3215
|
+
* with `transform` (both or neither).
|
|
3216
3216
|
* @param fields.transform Optional template applied to each
|
|
3217
3217
|
* event before delivery. The value is
|
|
3218
|
-
* arbitrary JSON — for JSONATA,
|
|
3219
|
-
*
|
|
3220
|
-
*
|
|
3221
|
-
* `
|
|
3218
|
+
* arbitrary JSON — for JSONATA, it
|
|
3219
|
+
* must be a string containing a JSONata
|
|
3220
|
+
* expression. Must be supplied together
|
|
3221
|
+
* with `transformType` (both or neither).
|
|
3222
3222
|
*/
|
|
3223
3223
|
new(fields: {
|
|
3224
3224
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -19893,20 +19893,20 @@ var Forwarder = class {
|
|
|
19893
19893
|
*/
|
|
19894
19894
|
filter;
|
|
19895
19895
|
/**
|
|
19896
|
-
* Optional template applied to each event before delivery.
|
|
19897
|
-
*
|
|
19898
|
-
*
|
|
19899
|
-
*
|
|
19900
|
-
*
|
|
19896
|
+
* Optional template applied to each event before delivery. The wire
|
|
19897
|
+
* schema widens to arbitrary JSON to leave room for future transform
|
|
19898
|
+
* engines carrying structured templates; for
|
|
19899
|
+
* {@link TransformType.JSONATA} the value must be a JSONata
|
|
19900
|
+
* expression string. `null` delivers the event JSON as-is.
|
|
19901
19901
|
*
|
|
19902
|
-
*
|
|
19903
|
-
*
|
|
19902
|
+
* {@link transform} and {@link transformType} travel as a pair —
|
|
19903
|
+
* both set, or both `null`. The SDK enforces this at save time.
|
|
19904
19904
|
*/
|
|
19905
19905
|
transform;
|
|
19906
19906
|
/**
|
|
19907
19907
|
* Engine used to evaluate {@link transform}. Required whenever
|
|
19908
|
-
* {@link transform} is set. Today only
|
|
19909
|
-
* is supported.
|
|
19908
|
+
* {@link transform} is set, forbidden when it isn't. Today only
|
|
19909
|
+
* {@link TransformType.JSONATA} is supported.
|
|
19910
19910
|
*/
|
|
19911
19911
|
transformType;
|
|
19912
19912
|
/**
|
|
@@ -20038,10 +20038,18 @@ function _forwarderAttrs(forwarder) {
|
|
|
20038
20038
|
attrs.filter = forwarder.filter;
|
|
20039
20039
|
}
|
|
20040
20040
|
const hasTransform = forwarder.transform !== null && forwarder.transform !== void 0;
|
|
20041
|
-
|
|
20042
|
-
|
|
20041
|
+
const hasTransformType = forwarder.transformType !== null && forwarder.transformType !== void 0;
|
|
20042
|
+
if (hasTransform !== hasTransformType) {
|
|
20043
|
+
throw new Error(
|
|
20044
|
+
"Forwarder.transform and Forwarder.transformType must be set together (or both unset)"
|
|
20045
|
+
);
|
|
20043
20046
|
}
|
|
20044
20047
|
if (hasTransform) {
|
|
20048
|
+
if (forwarder.transformType === "JSONATA" /* JSONATA */ && typeof forwarder.transform !== "string") {
|
|
20049
|
+
throw new Error(
|
|
20050
|
+
"Forwarder.transform must be a string when Forwarder.transformType is JSONATA"
|
|
20051
|
+
);
|
|
20052
|
+
}
|
|
20045
20053
|
attrs.transform_type = forwarder.transformType;
|
|
20046
20054
|
attrs.transform = forwarder.transform;
|
|
20047
20055
|
}
|
|
@@ -20086,15 +20094,15 @@ var ForwardersClient = class {
|
|
|
20086
20094
|
* don't match are recorded as
|
|
20087
20095
|
* `filtered_out` deliveries.
|
|
20088
20096
|
* @param fields.transformType Engine used to evaluate `transform`.
|
|
20089
|
-
*
|
|
20090
|
-
*
|
|
20091
|
-
*
|
|
20097
|
+
* Today only {@link TransformType.JSONATA}
|
|
20098
|
+
* is supported. Must be supplied together
|
|
20099
|
+
* with `transform` (both or neither).
|
|
20092
20100
|
* @param fields.transform Optional template applied to each
|
|
20093
20101
|
* event before delivery. The value is
|
|
20094
|
-
* arbitrary JSON — for JSONATA,
|
|
20095
|
-
*
|
|
20096
|
-
*
|
|
20097
|
-
* `
|
|
20102
|
+
* arbitrary JSON — for JSONATA, it
|
|
20103
|
+
* must be a string containing a JSONata
|
|
20104
|
+
* expression. Must be supplied together
|
|
20105
|
+
* with `transformType` (both or neither).
|
|
20098
20106
|
*/
|
|
20099
20107
|
new(fields) {
|
|
20100
20108
|
return new Forwarder(this, {
|