@smplkit/sdk 3.0.54 → 3.0.56
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 +46 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -37
- package/dist/index.d.ts +63 -37
- package/dist/index.js +46 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -22,20 +22,21 @@ interface AuditEvent {
|
|
|
22
22
|
/** ISO-8601-with-offset timestamp of when the audit service ingested the event. */
|
|
23
23
|
createdAt: string;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* `"
|
|
25
|
+
* Kind of actor that caused the event — e.g. `"USER"`, `"API_KEY"`,
|
|
26
|
+
* `"SYSTEM"`, or any label the caller chose. `null` when the caller
|
|
27
|
+
* did not supply one; the audit service never backfills.
|
|
27
28
|
*/
|
|
28
|
-
actorType: string;
|
|
29
|
+
actorType: string | null;
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
31
|
+
* Identifier of the actor that caused the event. Free-form — any
|
|
32
|
+
* identifier scheme is accepted. `null` when not supplied.
|
|
32
33
|
*/
|
|
33
34
|
actorId: string | null;
|
|
34
35
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
36
|
+
* Human-readable label for the actor (e.g. an email address or API
|
|
37
|
+
* key name). `null` when not supplied.
|
|
37
38
|
*/
|
|
38
|
-
actorLabel: string;
|
|
39
|
+
actorLabel: string | null;
|
|
39
40
|
/**
|
|
40
41
|
* Free-form per-event payload defined by the customer. Surfaced on
|
|
41
42
|
* the audit-event resource as a structured JSONB column.
|
|
@@ -61,6 +62,17 @@ interface CreateEventInput {
|
|
|
61
62
|
resourceId: string;
|
|
62
63
|
/** Defaults to server-side `now()` if omitted. */
|
|
63
64
|
occurredAt?: Date | string;
|
|
65
|
+
/**
|
|
66
|
+
* Free-form label for the kind of actor that caused the event (e.g.
|
|
67
|
+
* `"USER"`, `"API_KEY"`, `"SYSTEM"`, or any custom value). The audit
|
|
68
|
+
* service never backfills this from the request credential — supply
|
|
69
|
+
* it explicitly when you want the event attributed.
|
|
70
|
+
*/
|
|
71
|
+
actorType?: string;
|
|
72
|
+
/** Free-form identifier of the actor. Any string scheme is accepted. */
|
|
73
|
+
actorId?: string;
|
|
74
|
+
/** Human-readable label for the actor (e.g. email or API key name). */
|
|
75
|
+
actorLabel?: string;
|
|
64
76
|
/**
|
|
65
77
|
* Free-form contextual JSON. To record a resource snapshot, nest it
|
|
66
78
|
* inside `data` — smplkit's internal convention is `data.snapshot`,
|
|
@@ -293,14 +305,19 @@ declare class Forwarder {
|
|
|
293
305
|
filter: Record<string, unknown> | null;
|
|
294
306
|
/**
|
|
295
307
|
* Optional template applied to each event before delivery. Shape
|
|
296
|
-
* depends on {@link transformType}; for
|
|
297
|
-
* expression string
|
|
308
|
+
* depends on {@link transformType}; for {@link TransformType.JSONATA}
|
|
309
|
+
* the value is a JSONata expression string, but the wire schema
|
|
310
|
+
* widens to arbitrary JSON to leave room for future transform engines
|
|
311
|
+
* carrying structured templates. `null` delivers the event JSON as-is.
|
|
312
|
+
*
|
|
313
|
+
* Whenever {@link transform} is set, {@link transformType} must also
|
|
314
|
+
* be set; the SDK enforces this at save time.
|
|
298
315
|
*/
|
|
299
|
-
transform:
|
|
316
|
+
transform: unknown;
|
|
300
317
|
/**
|
|
301
|
-
* Engine used to evaluate {@link transform}.
|
|
302
|
-
*
|
|
303
|
-
*
|
|
318
|
+
* Engine used to evaluate {@link transform}. Required whenever
|
|
319
|
+
* {@link transform} is set. Today only {@link TransformType.JSONATA}
|
|
320
|
+
* is supported.
|
|
304
321
|
*/
|
|
305
322
|
transformType: TransformType | null;
|
|
306
323
|
/**
|
|
@@ -324,7 +341,7 @@ declare class Forwarder {
|
|
|
324
341
|
enabled?: boolean;
|
|
325
342
|
description?: string | null;
|
|
326
343
|
filter?: Record<string, unknown> | null;
|
|
327
|
-
transform?:
|
|
344
|
+
transform?: unknown;
|
|
328
345
|
transformType?: TransformType | null;
|
|
329
346
|
createdAt?: string | null;
|
|
330
347
|
updatedAt?: string | null;
|
|
@@ -2849,18 +2866,19 @@ declare class ManagementFlagsClient {
|
|
|
2849
2866
|
/**
|
|
2850
2867
|
* Log severity levels used by the Smpl Logging service.
|
|
2851
2868
|
*
|
|
2852
|
-
* Members are declared in
|
|
2853
|
-
*
|
|
2854
|
-
*
|
|
2869
|
+
* Members are declared in increasing order of severity per the
|
|
2870
|
+
* convention of every major JS/TS logging library (winston, bunyan,
|
|
2871
|
+
* pino, npm). `SILENT` is the all-suppressing sentinel and sits at
|
|
2872
|
+
* the end.
|
|
2855
2873
|
*/
|
|
2856
2874
|
declare enum LogLevel {
|
|
2875
|
+
TRACE = "TRACE",
|
|
2857
2876
|
DEBUG = "DEBUG",
|
|
2877
|
+
INFO = "INFO",
|
|
2878
|
+
WARN = "WARN",
|
|
2858
2879
|
ERROR = "ERROR",
|
|
2859
2880
|
FATAL = "FATAL",
|
|
2860
|
-
|
|
2861
|
-
SILENT = "SILENT",
|
|
2862
|
-
TRACE = "TRACE",
|
|
2863
|
-
WARN = "WARN"
|
|
2881
|
+
SILENT = "SILENT"
|
|
2864
2882
|
}
|
|
2865
2883
|
/**
|
|
2866
2884
|
* Describes a logger effective-level change. Frozen — fields cannot be
|
|
@@ -3180,20 +3198,27 @@ declare class ForwardersClient implements ForwarderModelClient {
|
|
|
3180
3198
|
* Construct an unsaved {@link Forwarder}. Call {@link Forwarder.save}
|
|
3181
3199
|
* to persist.
|
|
3182
3200
|
*
|
|
3183
|
-
* @param fields.name
|
|
3184
|
-
* @param fields.forwarderType
|
|
3185
|
-
* @param fields.configuration
|
|
3186
|
-
*
|
|
3187
|
-
*
|
|
3188
|
-
*
|
|
3189
|
-
* @param fields.enabled
|
|
3190
|
-
* @param fields.description
|
|
3191
|
-
* @param fields.filter
|
|
3192
|
-
*
|
|
3193
|
-
*
|
|
3194
|
-
* @param fields.
|
|
3195
|
-
*
|
|
3196
|
-
*
|
|
3201
|
+
* @param fields.name Display name. Free-form.
|
|
3202
|
+
* @param fields.forwarderType Destination type — see {@link ForwarderType}.
|
|
3203
|
+
* @param fields.configuration Destination HTTP request configuration.
|
|
3204
|
+
* Headers carry credentials and are
|
|
3205
|
+
* encrypted at rest server-side; reads
|
|
3206
|
+
* return them redacted.
|
|
3207
|
+
* @param fields.enabled Whether the forwarder is active. Defaults true.
|
|
3208
|
+
* @param fields.description Optional free-text description.
|
|
3209
|
+
* @param fields.filter Optional JSON Logic filter; events that
|
|
3210
|
+
* don't match are recorded as
|
|
3211
|
+
* `filtered_out` deliveries.
|
|
3212
|
+
* @param fields.transformType Engine used to evaluate `transform`.
|
|
3213
|
+
* Required whenever `transform` is set;
|
|
3214
|
+
* today only {@link TransformType.JSONATA}
|
|
3215
|
+
* is supported.
|
|
3216
|
+
* @param fields.transform Optional template applied to each
|
|
3217
|
+
* event before delivery. The value is
|
|
3218
|
+
* arbitrary JSON — for JSONATA, supply
|
|
3219
|
+
* an expression string; future engines
|
|
3220
|
+
* may accept other shapes. Omit (or pass
|
|
3221
|
+
* `null`) to deliver events unchanged.
|
|
3197
3222
|
*/
|
|
3198
3223
|
new(fields: {
|
|
3199
3224
|
name: string;
|
|
@@ -3202,7 +3227,8 @@ declare class ForwardersClient implements ForwarderModelClient {
|
|
|
3202
3227
|
enabled?: boolean;
|
|
3203
3228
|
description?: string | null;
|
|
3204
3229
|
filter?: Record<string, unknown> | null;
|
|
3205
|
-
|
|
3230
|
+
transformType?: TransformType | null;
|
|
3231
|
+
transform?: unknown;
|
|
3206
3232
|
}): Forwarder;
|
|
3207
3233
|
/**
|
|
3208
3234
|
* List forwarders for the authenticated account.
|
package/dist/index.d.ts
CHANGED
|
@@ -22,20 +22,21 @@ interface AuditEvent {
|
|
|
22
22
|
/** ISO-8601-with-offset timestamp of when the audit service ingested the event. */
|
|
23
23
|
createdAt: string;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* `"
|
|
25
|
+
* Kind of actor that caused the event — e.g. `"USER"`, `"API_KEY"`,
|
|
26
|
+
* `"SYSTEM"`, or any label the caller chose. `null` when the caller
|
|
27
|
+
* did not supply one; the audit service never backfills.
|
|
27
28
|
*/
|
|
28
|
-
actorType: string;
|
|
29
|
+
actorType: string | null;
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
31
|
+
* Identifier of the actor that caused the event. Free-form — any
|
|
32
|
+
* identifier scheme is accepted. `null` when not supplied.
|
|
32
33
|
*/
|
|
33
34
|
actorId: string | null;
|
|
34
35
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
36
|
+
* Human-readable label for the actor (e.g. an email address or API
|
|
37
|
+
* key name). `null` when not supplied.
|
|
37
38
|
*/
|
|
38
|
-
actorLabel: string;
|
|
39
|
+
actorLabel: string | null;
|
|
39
40
|
/**
|
|
40
41
|
* Free-form per-event payload defined by the customer. Surfaced on
|
|
41
42
|
* the audit-event resource as a structured JSONB column.
|
|
@@ -61,6 +62,17 @@ interface CreateEventInput {
|
|
|
61
62
|
resourceId: string;
|
|
62
63
|
/** Defaults to server-side `now()` if omitted. */
|
|
63
64
|
occurredAt?: Date | string;
|
|
65
|
+
/**
|
|
66
|
+
* Free-form label for the kind of actor that caused the event (e.g.
|
|
67
|
+
* `"USER"`, `"API_KEY"`, `"SYSTEM"`, or any custom value). The audit
|
|
68
|
+
* service never backfills this from the request credential — supply
|
|
69
|
+
* it explicitly when you want the event attributed.
|
|
70
|
+
*/
|
|
71
|
+
actorType?: string;
|
|
72
|
+
/** Free-form identifier of the actor. Any string scheme is accepted. */
|
|
73
|
+
actorId?: string;
|
|
74
|
+
/** Human-readable label for the actor (e.g. email or API key name). */
|
|
75
|
+
actorLabel?: string;
|
|
64
76
|
/**
|
|
65
77
|
* Free-form contextual JSON. To record a resource snapshot, nest it
|
|
66
78
|
* inside `data` — smplkit's internal convention is `data.snapshot`,
|
|
@@ -293,14 +305,19 @@ declare class Forwarder {
|
|
|
293
305
|
filter: Record<string, unknown> | null;
|
|
294
306
|
/**
|
|
295
307
|
* Optional template applied to each event before delivery. Shape
|
|
296
|
-
* depends on {@link transformType}; for
|
|
297
|
-
* expression string
|
|
308
|
+
* depends on {@link transformType}; for {@link TransformType.JSONATA}
|
|
309
|
+
* the value is a JSONata expression string, but the wire schema
|
|
310
|
+
* widens to arbitrary JSON to leave room for future transform engines
|
|
311
|
+
* carrying structured templates. `null` delivers the event JSON as-is.
|
|
312
|
+
*
|
|
313
|
+
* Whenever {@link transform} is set, {@link transformType} must also
|
|
314
|
+
* be set; the SDK enforces this at save time.
|
|
298
315
|
*/
|
|
299
|
-
transform:
|
|
316
|
+
transform: unknown;
|
|
300
317
|
/**
|
|
301
|
-
* Engine used to evaluate {@link transform}.
|
|
302
|
-
*
|
|
303
|
-
*
|
|
318
|
+
* Engine used to evaluate {@link transform}. Required whenever
|
|
319
|
+
* {@link transform} is set. Today only {@link TransformType.JSONATA}
|
|
320
|
+
* is supported.
|
|
304
321
|
*/
|
|
305
322
|
transformType: TransformType | null;
|
|
306
323
|
/**
|
|
@@ -324,7 +341,7 @@ declare class Forwarder {
|
|
|
324
341
|
enabled?: boolean;
|
|
325
342
|
description?: string | null;
|
|
326
343
|
filter?: Record<string, unknown> | null;
|
|
327
|
-
transform?:
|
|
344
|
+
transform?: unknown;
|
|
328
345
|
transformType?: TransformType | null;
|
|
329
346
|
createdAt?: string | null;
|
|
330
347
|
updatedAt?: string | null;
|
|
@@ -2849,18 +2866,19 @@ declare class ManagementFlagsClient {
|
|
|
2849
2866
|
/**
|
|
2850
2867
|
* Log severity levels used by the Smpl Logging service.
|
|
2851
2868
|
*
|
|
2852
|
-
* Members are declared in
|
|
2853
|
-
*
|
|
2854
|
-
*
|
|
2869
|
+
* Members are declared in increasing order of severity per the
|
|
2870
|
+
* convention of every major JS/TS logging library (winston, bunyan,
|
|
2871
|
+
* pino, npm). `SILENT` is the all-suppressing sentinel and sits at
|
|
2872
|
+
* the end.
|
|
2855
2873
|
*/
|
|
2856
2874
|
declare enum LogLevel {
|
|
2875
|
+
TRACE = "TRACE",
|
|
2857
2876
|
DEBUG = "DEBUG",
|
|
2877
|
+
INFO = "INFO",
|
|
2878
|
+
WARN = "WARN",
|
|
2858
2879
|
ERROR = "ERROR",
|
|
2859
2880
|
FATAL = "FATAL",
|
|
2860
|
-
|
|
2861
|
-
SILENT = "SILENT",
|
|
2862
|
-
TRACE = "TRACE",
|
|
2863
|
-
WARN = "WARN"
|
|
2881
|
+
SILENT = "SILENT"
|
|
2864
2882
|
}
|
|
2865
2883
|
/**
|
|
2866
2884
|
* Describes a logger effective-level change. Frozen — fields cannot be
|
|
@@ -3180,20 +3198,27 @@ declare class ForwardersClient implements ForwarderModelClient {
|
|
|
3180
3198
|
* Construct an unsaved {@link Forwarder}. Call {@link Forwarder.save}
|
|
3181
3199
|
* to persist.
|
|
3182
3200
|
*
|
|
3183
|
-
* @param fields.name
|
|
3184
|
-
* @param fields.forwarderType
|
|
3185
|
-
* @param fields.configuration
|
|
3186
|
-
*
|
|
3187
|
-
*
|
|
3188
|
-
*
|
|
3189
|
-
* @param fields.enabled
|
|
3190
|
-
* @param fields.description
|
|
3191
|
-
* @param fields.filter
|
|
3192
|
-
*
|
|
3193
|
-
*
|
|
3194
|
-
* @param fields.
|
|
3195
|
-
*
|
|
3196
|
-
*
|
|
3201
|
+
* @param fields.name Display name. Free-form.
|
|
3202
|
+
* @param fields.forwarderType Destination type — see {@link ForwarderType}.
|
|
3203
|
+
* @param fields.configuration Destination HTTP request configuration.
|
|
3204
|
+
* Headers carry credentials and are
|
|
3205
|
+
* encrypted at rest server-side; reads
|
|
3206
|
+
* return them redacted.
|
|
3207
|
+
* @param fields.enabled Whether the forwarder is active. Defaults true.
|
|
3208
|
+
* @param fields.description Optional free-text description.
|
|
3209
|
+
* @param fields.filter Optional JSON Logic filter; events that
|
|
3210
|
+
* don't match are recorded as
|
|
3211
|
+
* `filtered_out` deliveries.
|
|
3212
|
+
* @param fields.transformType Engine used to evaluate `transform`.
|
|
3213
|
+
* Required whenever `transform` is set;
|
|
3214
|
+
* today only {@link TransformType.JSONATA}
|
|
3215
|
+
* is supported.
|
|
3216
|
+
* @param fields.transform Optional template applied to each
|
|
3217
|
+
* event before delivery. The value is
|
|
3218
|
+
* arbitrary JSON — for JSONATA, supply
|
|
3219
|
+
* an expression string; future engines
|
|
3220
|
+
* may accept other shapes. Omit (or pass
|
|
3221
|
+
* `null`) to deliver events unchanged.
|
|
3197
3222
|
*/
|
|
3198
3223
|
new(fields: {
|
|
3199
3224
|
name: string;
|
|
@@ -3202,7 +3227,8 @@ declare class ForwardersClient implements ForwarderModelClient {
|
|
|
3202
3227
|
enabled?: boolean;
|
|
3203
3228
|
description?: string | null;
|
|
3204
3229
|
filter?: Record<string, unknown> | null;
|
|
3205
|
-
|
|
3230
|
+
transformType?: TransformType | null;
|
|
3231
|
+
transform?: unknown;
|
|
3206
3232
|
}): Forwarder;
|
|
3207
3233
|
/**
|
|
3208
3234
|
* List forwarders for the authenticated account.
|
package/dist/index.js
CHANGED
|
@@ -16856,6 +16856,9 @@ function _eventBodyFromInput(input) {
|
|
|
16856
16856
|
if (input.occurredAt !== void 0) {
|
|
16857
16857
|
attrs.occurred_at = input.occurredAt instanceof Date ? input.occurredAt.toISOString() : input.occurredAt;
|
|
16858
16858
|
}
|
|
16859
|
+
if (input.actorType !== void 0) attrs.actor_type = input.actorType;
|
|
16860
|
+
if (input.actorId !== void 0) attrs.actor_id = input.actorId;
|
|
16861
|
+
if (input.actorLabel !== void 0) attrs.actor_label = input.actorLabel;
|
|
16859
16862
|
if (input.data !== void 0) {
|
|
16860
16863
|
attrs.data = input.data;
|
|
16861
16864
|
}
|
|
@@ -16870,9 +16873,9 @@ function _eventFromResource(resource) {
|
|
|
16870
16873
|
resourceId: String(attrs.resource_id ?? ""),
|
|
16871
16874
|
occurredAt: String(attrs.occurred_at ?? ""),
|
|
16872
16875
|
createdAt: String(attrs.created_at ?? ""),
|
|
16873
|
-
actorType:
|
|
16876
|
+
actorType: attrs.actor_type ?? null,
|
|
16874
16877
|
actorId: attrs.actor_id ?? null,
|
|
16875
|
-
actorLabel:
|
|
16878
|
+
actorLabel: attrs.actor_label ?? null,
|
|
16876
16879
|
data: attrs.data ?? {},
|
|
16877
16880
|
idempotencyKey: String(attrs.idempotency_key ?? ""),
|
|
16878
16881
|
doNotForward: Boolean(attrs.do_not_forward ?? false)
|
|
@@ -19208,13 +19211,13 @@ function _coerceValues(values) {
|
|
|
19208
19211
|
|
|
19209
19212
|
// src/logging/types.ts
|
|
19210
19213
|
var LogLevel = /* @__PURE__ */ ((LogLevel5) => {
|
|
19214
|
+
LogLevel5["TRACE"] = "TRACE";
|
|
19211
19215
|
LogLevel5["DEBUG"] = "DEBUG";
|
|
19216
|
+
LogLevel5["INFO"] = "INFO";
|
|
19217
|
+
LogLevel5["WARN"] = "WARN";
|
|
19212
19218
|
LogLevel5["ERROR"] = "ERROR";
|
|
19213
19219
|
LogLevel5["FATAL"] = "FATAL";
|
|
19214
|
-
LogLevel5["INFO"] = "INFO";
|
|
19215
19220
|
LogLevel5["SILENT"] = "SILENT";
|
|
19216
|
-
LogLevel5["TRACE"] = "TRACE";
|
|
19217
|
-
LogLevel5["WARN"] = "WARN";
|
|
19218
19221
|
return LogLevel5;
|
|
19219
19222
|
})(LogLevel || {});
|
|
19220
19223
|
var LoggerChangeEvent = class {
|
|
@@ -19891,14 +19894,19 @@ var Forwarder = class {
|
|
|
19891
19894
|
filter;
|
|
19892
19895
|
/**
|
|
19893
19896
|
* Optional template applied to each event before delivery. Shape
|
|
19894
|
-
* depends on {@link transformType}; for
|
|
19895
|
-
* expression string
|
|
19897
|
+
* depends on {@link transformType}; for {@link TransformType.JSONATA}
|
|
19898
|
+
* the value is a JSONata expression string, but the wire schema
|
|
19899
|
+
* widens to arbitrary JSON to leave room for future transform engines
|
|
19900
|
+
* carrying structured templates. `null` delivers the event JSON as-is.
|
|
19901
|
+
*
|
|
19902
|
+
* Whenever {@link transform} is set, {@link transformType} must also
|
|
19903
|
+
* be set; the SDK enforces this at save time.
|
|
19896
19904
|
*/
|
|
19897
19905
|
transform;
|
|
19898
19906
|
/**
|
|
19899
|
-
* Engine used to evaluate {@link transform}.
|
|
19900
|
-
*
|
|
19901
|
-
*
|
|
19907
|
+
* Engine used to evaluate {@link transform}. Required whenever
|
|
19908
|
+
* {@link transform} is set. Today only {@link TransformType.JSONATA}
|
|
19909
|
+
* is supported.
|
|
19902
19910
|
*/
|
|
19903
19911
|
transformType;
|
|
19904
19912
|
/**
|
|
@@ -20029,8 +20037,12 @@ function _forwarderAttrs(forwarder) {
|
|
|
20029
20037
|
if (forwarder.filter !== null) {
|
|
20030
20038
|
attrs.filter = forwarder.filter;
|
|
20031
20039
|
}
|
|
20032
|
-
|
|
20033
|
-
|
|
20040
|
+
const hasTransform = forwarder.transform !== null && forwarder.transform !== void 0;
|
|
20041
|
+
if (hasTransform && forwarder.transformType === null) {
|
|
20042
|
+
throw new Error("Forwarder.transform requires Forwarder.transformType to be set");
|
|
20043
|
+
}
|
|
20044
|
+
if (hasTransform) {
|
|
20045
|
+
attrs.transform_type = forwarder.transformType;
|
|
20034
20046
|
attrs.transform = forwarder.transform;
|
|
20035
20047
|
}
|
|
20036
20048
|
return attrs;
|
|
@@ -20062,20 +20074,27 @@ var ForwardersClient = class {
|
|
|
20062
20074
|
* Construct an unsaved {@link Forwarder}. Call {@link Forwarder.save}
|
|
20063
20075
|
* to persist.
|
|
20064
20076
|
*
|
|
20065
|
-
* @param fields.name
|
|
20066
|
-
* @param fields.forwarderType
|
|
20067
|
-
* @param fields.configuration
|
|
20068
|
-
*
|
|
20069
|
-
*
|
|
20070
|
-
*
|
|
20071
|
-
* @param fields.enabled
|
|
20072
|
-
* @param fields.description
|
|
20073
|
-
* @param fields.filter
|
|
20074
|
-
*
|
|
20075
|
-
*
|
|
20076
|
-
* @param fields.
|
|
20077
|
-
*
|
|
20078
|
-
*
|
|
20077
|
+
* @param fields.name Display name. Free-form.
|
|
20078
|
+
* @param fields.forwarderType Destination type — see {@link ForwarderType}.
|
|
20079
|
+
* @param fields.configuration Destination HTTP request configuration.
|
|
20080
|
+
* Headers carry credentials and are
|
|
20081
|
+
* encrypted at rest server-side; reads
|
|
20082
|
+
* return them redacted.
|
|
20083
|
+
* @param fields.enabled Whether the forwarder is active. Defaults true.
|
|
20084
|
+
* @param fields.description Optional free-text description.
|
|
20085
|
+
* @param fields.filter Optional JSON Logic filter; events that
|
|
20086
|
+
* don't match are recorded as
|
|
20087
|
+
* `filtered_out` deliveries.
|
|
20088
|
+
* @param fields.transformType Engine used to evaluate `transform`.
|
|
20089
|
+
* Required whenever `transform` is set;
|
|
20090
|
+
* today only {@link TransformType.JSONATA}
|
|
20091
|
+
* is supported.
|
|
20092
|
+
* @param fields.transform Optional template applied to each
|
|
20093
|
+
* event before delivery. The value is
|
|
20094
|
+
* arbitrary JSON — for JSONATA, supply
|
|
20095
|
+
* an expression string; future engines
|
|
20096
|
+
* may accept other shapes. Omit (or pass
|
|
20097
|
+
* `null`) to deliver events unchanged.
|
|
20079
20098
|
*/
|
|
20080
20099
|
new(fields) {
|
|
20081
20100
|
return new Forwarder(this, {
|
|
@@ -20085,6 +20104,7 @@ var ForwardersClient = class {
|
|
|
20085
20104
|
enabled: fields.enabled,
|
|
20086
20105
|
description: fields.description,
|
|
20087
20106
|
filter: fields.filter,
|
|
20107
|
+
transformType: fields.transformType,
|
|
20088
20108
|
transform: fields.transform
|
|
20089
20109
|
});
|
|
20090
20110
|
}
|