@smplkit/sdk 3.0.52 → 3.0.53
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 +245 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +337 -84
- package/dist/index.d.ts +337 -84
- package/dist/index.js +245 -57
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -5,25 +5,61 @@ import createClient from 'openapi-fetch';
|
|
|
5
5
|
*
|
|
6
6
|
* ADR-047 §2.3.1.
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* A single audit event as returned by the audit service. ADR-047 §2.3.1.
|
|
10
|
+
*/
|
|
8
11
|
interface AuditEvent {
|
|
12
|
+
/** Server-assigned UUID for this event. */
|
|
9
13
|
id: string;
|
|
14
|
+
/** Action slug — e.g. `"user.created"`, `"invoice.paid"`. */
|
|
10
15
|
action: string;
|
|
16
|
+
/** Type of resource the action operated on — e.g. `"invoice"`. */
|
|
11
17
|
resourceType: string;
|
|
18
|
+
/** Customer-facing id of the resource the action operated on. */
|
|
12
19
|
resourceId: string;
|
|
20
|
+
/** ISO-8601-with-offset timestamp of when the action actually happened. */
|
|
13
21
|
occurredAt: string;
|
|
22
|
+
/** ISO-8601-with-offset timestamp of when the audit service ingested the event. */
|
|
14
23
|
createdAt: string;
|
|
24
|
+
/**
|
|
25
|
+
* Type of the actor that performed the action (`"user"`, `"api_key"`,
|
|
26
|
+
* `"system"`, …). Empty string when unknown.
|
|
27
|
+
*/
|
|
15
28
|
actorType: string;
|
|
29
|
+
/**
|
|
30
|
+
* UUID of the actor, when the actor is a tracked entity
|
|
31
|
+
* (user, api_key). `null` for system actors or anonymous events.
|
|
32
|
+
*/
|
|
16
33
|
actorId: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Display label for the actor — typically a name or email. Empty
|
|
36
|
+
* string when unknown.
|
|
37
|
+
*/
|
|
17
38
|
actorLabel: string;
|
|
39
|
+
/**
|
|
40
|
+
* Free-form per-event payload defined by the customer. Surfaced on
|
|
41
|
+
* the audit-event resource as a structured JSONB column.
|
|
42
|
+
*/
|
|
18
43
|
data: Record<string, unknown>;
|
|
44
|
+
/** Customer-supplied dedupe key. Empty when the customer didn't supply one. */
|
|
19
45
|
idempotencyKey: string;
|
|
46
|
+
/**
|
|
47
|
+
* When `true`, the audit service records the event but skips SIEM
|
|
48
|
+
* forwarder delivery regardless of any matching forwarder filter.
|
|
49
|
+
*/
|
|
20
50
|
doNotForward: boolean;
|
|
21
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Inputs for `client.audit.events.record(...)`.
|
|
54
|
+
*/
|
|
22
55
|
interface CreateEventInput {
|
|
56
|
+
/** Action slug — e.g. `"invoice.paid"`. */
|
|
23
57
|
action: string;
|
|
58
|
+
/** Type of resource the action operated on. */
|
|
24
59
|
resourceType: string;
|
|
60
|
+
/** Customer-facing id of the resource. */
|
|
25
61
|
resourceId: string;
|
|
26
|
-
/** Defaults to server-side now() if omitted. */
|
|
62
|
+
/** Defaults to server-side `now()` if omitted. */
|
|
27
63
|
occurredAt?: Date | string;
|
|
28
64
|
/**
|
|
29
65
|
* Free-form contextual JSON. To record a resource snapshot, nest it
|
|
@@ -34,34 +70,57 @@ interface CreateEventInput {
|
|
|
34
70
|
/** Optional caller-supplied idempotency key. Server derives one from event content if absent. */
|
|
35
71
|
idempotencyKey?: string;
|
|
36
72
|
/**
|
|
37
|
-
* When true
|
|
38
|
-
* it through any configured SIEM forwarder. A
|
|
39
|
-
* delivery row is recorded for each enabled
|
|
40
|
-
* visible in the forwarder delivery log.
|
|
73
|
+
* When `true`, the audit service records the event normally but does
|
|
74
|
+
* NOT POST it through any configured SIEM forwarder. A
|
|
75
|
+
* `skipped_do_not_forward` delivery row is recorded for each enabled
|
|
76
|
+
* forwarder so the skip is visible in the forwarder delivery log.
|
|
41
77
|
*/
|
|
42
78
|
doNotForward?: boolean;
|
|
43
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Parameters accepted by `client.audit.events.list(...)`. Cursor
|
|
82
|
+
* paginated per ADR-014; pass {@link pageAfter} from the prior page's
|
|
83
|
+
* `nextCursor` to walk forward.
|
|
84
|
+
*/
|
|
44
85
|
interface ListEventsParams {
|
|
86
|
+
/** Filter to this action slug. */
|
|
45
87
|
action?: string;
|
|
88
|
+
/** Filter to this resource_type slug. */
|
|
46
89
|
resourceType?: string;
|
|
90
|
+
/** Filter to this resource id. */
|
|
47
91
|
resourceId?: string;
|
|
92
|
+
/** Filter to this actor type. */
|
|
48
93
|
actorType?: string;
|
|
94
|
+
/** Filter to this actor id. */
|
|
49
95
|
actorId?: string;
|
|
50
|
-
/** Range notation per ADR-014, e.g. `[2026-01-01T00:00:00Z,*)`. */
|
|
96
|
+
/** Range notation per ADR-014, e.g. `"[2026-01-01T00:00:00Z,*)"`. */
|
|
51
97
|
occurredAtRange?: string;
|
|
98
|
+
/** Items per page (1–1000). Defaults to 1000. */
|
|
52
99
|
pageSize?: number;
|
|
100
|
+
/** Opaque cursor returned by the prior page's `nextCursor`. */
|
|
53
101
|
pageAfter?: string;
|
|
54
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Page of events returned by `client.audit.events.list(...)`.
|
|
105
|
+
*/
|
|
55
106
|
interface ListEventsPage {
|
|
107
|
+
/** Events on this page, newest first. */
|
|
56
108
|
events: AuditEvent[];
|
|
57
|
-
/** Opaque cursor for the next page, or null if this is the last page. */
|
|
109
|
+
/** Opaque cursor for the next page, or `null` if this is the last page. */
|
|
58
110
|
nextCursor: string | null;
|
|
59
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* A distinct `resource_type` slug seen for the account.
|
|
114
|
+
*/
|
|
60
115
|
interface ResourceType {
|
|
61
|
-
/** The resource_type slug. */
|
|
116
|
+
/** The resource_type slug, surfaced as the JSON:API resource id. */
|
|
62
117
|
id: string;
|
|
118
|
+
/** ISO-8601 timestamp of the earliest sighting for the account. */
|
|
63
119
|
createdAt: string;
|
|
64
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Parameters accepted by `client.audit.resourceTypes.list(...)`.
|
|
123
|
+
*/
|
|
65
124
|
interface ListResourceTypesParams {
|
|
66
125
|
/** 1-based page number to return. Defaults to 1. */
|
|
67
126
|
pageNumber?: number;
|
|
@@ -70,15 +129,32 @@ interface ListResourceTypesParams {
|
|
|
70
129
|
/** Include `total` and `totalPages` in {@link Pagination}. Defaults to false. */
|
|
71
130
|
metaTotal?: boolean;
|
|
72
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Page of resource types returned by
|
|
134
|
+
* `client.audit.resourceTypes.list(...)`.
|
|
135
|
+
*/
|
|
73
136
|
interface ListResourceTypesPage {
|
|
137
|
+
/** Resource types on this page, alphabetically sorted. */
|
|
74
138
|
resourceTypes: ResourceType[];
|
|
139
|
+
/** Pagination metadata. */
|
|
75
140
|
pagination: Pagination;
|
|
76
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* A distinct action slug seen for the account.
|
|
144
|
+
*/
|
|
77
145
|
interface Action {
|
|
78
|
-
/** The action slug. */
|
|
146
|
+
/** The action slug, surfaced as the JSON:API resource id. */
|
|
79
147
|
id: string;
|
|
148
|
+
/**
|
|
149
|
+
* ISO-8601 timestamp of the earliest sighting for the account. When
|
|
150
|
+
* the list call was filtered by `resourceType`, this is the first
|
|
151
|
+
* sighting of that specific (action, resource_type) pair.
|
|
152
|
+
*/
|
|
80
153
|
createdAt: string;
|
|
81
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Parameters accepted by `client.audit.actions.list(...)`.
|
|
157
|
+
*/
|
|
82
158
|
interface ListActionsParams {
|
|
83
159
|
/** When set, returns only the actions seen with this resource_type. */
|
|
84
160
|
filterResourceType?: string;
|
|
@@ -89,91 +165,204 @@ interface ListActionsParams {
|
|
|
89
165
|
/** Include `total` and `totalPages` in {@link Pagination}. Defaults to false. */
|
|
90
166
|
metaTotal?: boolean;
|
|
91
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* Page of actions returned by `client.audit.actions.list(...)`.
|
|
170
|
+
*/
|
|
92
171
|
interface ActionListPage {
|
|
172
|
+
/** Actions on this page, alphabetically sorted. */
|
|
93
173
|
actions: Action[];
|
|
174
|
+
/** Pagination metadata. */
|
|
94
175
|
pagination: Pagination;
|
|
95
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* A single name/value HTTP header on a forwarder destination.
|
|
179
|
+
*/
|
|
96
180
|
interface HttpHeader {
|
|
181
|
+
/** Header name (e.g. `"Authorization"`, `"DD-API-KEY"`). */
|
|
97
182
|
name: string;
|
|
183
|
+
/**
|
|
184
|
+
* Header value, plaintext on writes. The audit service encrypts values
|
|
185
|
+
* at rest; reads return them as `"<redacted>"`.
|
|
186
|
+
*/
|
|
98
187
|
value: string;
|
|
99
188
|
}
|
|
100
189
|
/**
|
|
101
190
|
* Supported SIEM forwarder destination types.
|
|
102
191
|
*
|
|
103
|
-
* ADR-047 §2.12. Mirrors the OpenAPI
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
192
|
+
* ADR-047 §2.12. Mirrors the audit service's OpenAPI `ForwarderType`
|
|
193
|
+
* enum so callers get autocomplete and the compiler rejects typos at
|
|
194
|
+
* build time. The available types are real-time HTTP destinations
|
|
195
|
+
* sharing one outbound plumbing path. Object-storage archival (S3, GCS,
|
|
196
|
+
* etc.) has different operational shape (batching, IAM, lifecycle
|
|
197
|
+
* policies) and will get its own type if customer demand warrants.
|
|
198
|
+
*/
|
|
199
|
+
declare enum ForwarderType {
|
|
200
|
+
DATADOG = "DATADOG",
|
|
201
|
+
ELASTIC = "ELASTIC",
|
|
202
|
+
HONEYCOMB = "HONEYCOMB",
|
|
203
|
+
HTTP = "HTTP",
|
|
204
|
+
NEW_RELIC = "NEW_RELIC",
|
|
205
|
+
SPLUNK_HEC = "SPLUNK_HEC",
|
|
206
|
+
SUMO_LOGIC = "SUMO_LOGIC"
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* HTTP verb used by a forwarder's outbound delivery.
|
|
210
|
+
*
|
|
211
|
+
* Mirrors the audit service's OpenAPI `HttpConfigurationMethod` enum so
|
|
212
|
+
* callers get autocomplete and a typed value back from
|
|
213
|
+
* `forwarder.configuration.method`.
|
|
214
|
+
*/
|
|
215
|
+
declare enum HttpMethod {
|
|
216
|
+
DELETE = "DELETE",
|
|
217
|
+
GET = "GET",
|
|
218
|
+
PATCH = "PATCH",
|
|
219
|
+
POST = "POST",
|
|
220
|
+
PUT = "PUT"
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Engine used to evaluate {@link Forwarder.transform}. Must be set
|
|
224
|
+
* whenever `transform` is set. Today only `JSONATA` is supported.
|
|
107
225
|
*/
|
|
108
|
-
|
|
226
|
+
declare enum TransformType {
|
|
227
|
+
JSONATA = "JSONATA"
|
|
228
|
+
}
|
|
109
229
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
230
|
+
* Forwarder destination HTTP request shape.
|
|
231
|
+
*
|
|
232
|
+
* Today every destination type uses HTTP; future transports (FTP, SQS,
|
|
233
|
+
* ...) will join this as members of a discriminated union under
|
|
234
|
+
* {@link Forwarder.configuration}.
|
|
113
235
|
*/
|
|
114
|
-
|
|
115
|
-
/** HTTP
|
|
116
|
-
method:
|
|
117
|
-
/** Destination URL. */
|
|
236
|
+
declare class HttpConfiguration {
|
|
237
|
+
/** HTTP verb used for delivery. Defaults to {@link HttpMethod.POST}. */
|
|
238
|
+
method: HttpMethod;
|
|
239
|
+
/** Destination URL the audit service POSTs each event to. */
|
|
118
240
|
url: string;
|
|
119
|
-
/**
|
|
241
|
+
/**
|
|
242
|
+
* Headers attached to every outbound request. Values carry credentials
|
|
243
|
+
* and are encrypted at rest server-side; reads return them redacted.
|
|
244
|
+
*/
|
|
120
245
|
headers: HttpHeader[];
|
|
121
246
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
247
|
+
* Status the destination must return for delivery to count as success
|
|
248
|
+
* — either an exact code (`"200"`, `"204"`) or a status class
|
|
249
|
+
* (`"2xx"`, `"4xx"`). Defaults to `"2xx"`.
|
|
124
250
|
*/
|
|
125
251
|
successStatus: string;
|
|
252
|
+
constructor(fields?: {
|
|
253
|
+
method?: HttpMethod;
|
|
254
|
+
url?: string;
|
|
255
|
+
headers?: HttpHeader[];
|
|
256
|
+
successStatus?: string;
|
|
257
|
+
});
|
|
126
258
|
}
|
|
127
259
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
260
|
+
* A SIEM streaming forwarder configured on the customer's account.
|
|
261
|
+
*
|
|
262
|
+
* Active-record style: mutate fields directly and call {@link save} to
|
|
263
|
+
* persist, or {@link delete} to remove. Header values in
|
|
264
|
+
* `configuration.headers` are always returned redacted on reads — the
|
|
265
|
+
* GET path on the audit API replaces every header value with
|
|
266
|
+
* `"<redacted>"`. Re-supply the real values before calling {@link save}
|
|
267
|
+
* (the SDK does not cache them client-side).
|
|
130
268
|
*/
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
269
|
+
declare class Forwarder {
|
|
270
|
+
/**
|
|
271
|
+
* Server-assigned UUID for this forwarder. `null` until {@link save}
|
|
272
|
+
* has run for the first time.
|
|
273
|
+
*/
|
|
274
|
+
id: string | null;
|
|
275
|
+
/** Display name. Free-form. */
|
|
135
276
|
name: string;
|
|
136
|
-
/**
|
|
137
|
-
description: string | null;
|
|
277
|
+
/** Destination type — see {@link ForwarderType}. */
|
|
138
278
|
forwarderType: ForwarderType;
|
|
279
|
+
/** Destination request configuration. */
|
|
280
|
+
configuration: HttpConfiguration;
|
|
281
|
+
/**
|
|
282
|
+
* When `false`, the audit service skips delivery for this forwarder
|
|
283
|
+
* but still records `filtered_out` deliveries.
|
|
284
|
+
*/
|
|
139
285
|
enabled: boolean;
|
|
286
|
+
/** Optional free-text description. */
|
|
287
|
+
description: string | null;
|
|
288
|
+
/**
|
|
289
|
+
* Optional JSON Logic expression evaluated per event. When set, events
|
|
290
|
+
* that don't match are recorded as `filtered_out` deliveries instead
|
|
291
|
+
* of being POSTed to the destination.
|
|
292
|
+
*/
|
|
140
293
|
filter: Record<string, unknown> | null;
|
|
141
294
|
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
295
|
+
* Optional template applied to each event before delivery. Shape
|
|
296
|
+
* depends on {@link transformType}; for `"JSONATA"`, a JSONata
|
|
297
|
+
* expression string. `null` delivers the event JSON as-is.
|
|
144
298
|
*/
|
|
145
|
-
|
|
299
|
+
transform: string | null;
|
|
146
300
|
/**
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
301
|
+
* Engine used to evaluate {@link transform}. Currently only
|
|
302
|
+
* `"JSONATA"` is supported. Auto-filled by the SDK whenever
|
|
303
|
+
* {@link transform} is set on save.
|
|
150
304
|
*/
|
|
151
|
-
|
|
305
|
+
transformType: TransformType | null;
|
|
152
306
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
307
|
+
* When the audit service first persisted this forwarder. `null` for
|
|
308
|
+
* an unsaved instance.
|
|
155
309
|
*/
|
|
156
|
-
configuration: HttpConfiguration;
|
|
157
310
|
createdAt: string | null;
|
|
311
|
+
/** When this forwarder was last mutated. */
|
|
158
312
|
updatedAt: string | null;
|
|
313
|
+
/** Soft-delete timestamp. `null` for live forwarders. */
|
|
159
314
|
deletedAt: string | null;
|
|
315
|
+
/** Monotonic version counter; bumped on every server-side write. */
|
|
160
316
|
version: number | null;
|
|
317
|
+
/** @internal */
|
|
318
|
+
_client: ForwarderModelClient | null;
|
|
319
|
+
constructor(client: ForwarderModelClient | null, fields: {
|
|
320
|
+
id?: string | null;
|
|
321
|
+
name: string;
|
|
322
|
+
forwarderType: ForwarderType;
|
|
323
|
+
configuration: HttpConfiguration;
|
|
324
|
+
enabled?: boolean;
|
|
325
|
+
description?: string | null;
|
|
326
|
+
filter?: Record<string, unknown> | null;
|
|
327
|
+
transform?: string | null;
|
|
328
|
+
transformType?: TransformType | null;
|
|
329
|
+
createdAt?: string | null;
|
|
330
|
+
updatedAt?: string | null;
|
|
331
|
+
deletedAt?: string | null;
|
|
332
|
+
version?: number | null;
|
|
333
|
+
});
|
|
334
|
+
/**
|
|
335
|
+
* Create or update this forwarder on the server.
|
|
336
|
+
*
|
|
337
|
+
* Upsert behavior is driven by {@link createdAt}: a forwarder with
|
|
338
|
+
* no `createdAt` is created (POST); otherwise it's full-replace
|
|
339
|
+
* updated (PUT). After the call, every field is refreshed from the
|
|
340
|
+
* server response (including newly-assigned `id`, `createdAt`,
|
|
341
|
+
* `updatedAt`, `version`).
|
|
342
|
+
*/
|
|
343
|
+
save(): Promise<void>;
|
|
344
|
+
/** Soft-delete this forwarder on the server. */
|
|
345
|
+
delete(): Promise<void>;
|
|
346
|
+
/** @internal Copy every server-authoritative field from `other` onto self. */
|
|
347
|
+
_apply(other: Forwarder): void;
|
|
161
348
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
transform?: unknown;
|
|
172
|
-
}
|
|
173
|
-
interface UpdateForwarderInput extends CreateForwarderInput {
|
|
349
|
+
/**
|
|
350
|
+
* @internal Minimal interface that `Forwarder.save()` / `.delete()`
|
|
351
|
+
* call back into. Implemented by `ForwardersClient` in
|
|
352
|
+
* `src/management/audit.ts`.
|
|
353
|
+
*/
|
|
354
|
+
interface ForwarderModelClient {
|
|
355
|
+
_createForwarder(forwarder: Forwarder): Promise<Forwarder>;
|
|
356
|
+
_updateForwarder(forwarder: Forwarder): Promise<Forwarder>;
|
|
357
|
+
_deleteForwarder(id: string): Promise<void>;
|
|
174
358
|
}
|
|
359
|
+
/**
|
|
360
|
+
* Parameters accepted by `mgmt.audit.forwarders.list(...)`.
|
|
361
|
+
*/
|
|
175
362
|
interface ListForwardersParams {
|
|
363
|
+
/** Filter to a single forwarder type. */
|
|
176
364
|
forwarderType?: ForwarderType;
|
|
365
|
+
/** Filter to forwarders matching this enabled state. */
|
|
177
366
|
enabled?: boolean;
|
|
178
367
|
/** 1-based page number to return. Defaults to 1. */
|
|
179
368
|
pageNumber?: number;
|
|
@@ -182,8 +371,13 @@ interface ListForwardersParams {
|
|
|
182
371
|
/** Include `total` and `totalPages` in {@link Pagination}. Defaults to false. */
|
|
183
372
|
metaTotal?: boolean;
|
|
184
373
|
}
|
|
374
|
+
/**
|
|
375
|
+
* Page of forwarders returned by `mgmt.audit.forwarders.list(...)`.
|
|
376
|
+
*/
|
|
185
377
|
interface ListForwardersPage {
|
|
378
|
+
/** Forwarders on this page, in server-defined order. */
|
|
186
379
|
forwarders: Forwarder[];
|
|
380
|
+
/** Pagination metadata (`page`, `size`, optional `total`/`totalPages`). */
|
|
187
381
|
pagination: Pagination;
|
|
188
382
|
}
|
|
189
383
|
/**
|
|
@@ -1700,16 +1894,17 @@ interface components {
|
|
|
1700
1894
|
/**
|
|
1701
1895
|
* Shared types for the management namespace.
|
|
1702
1896
|
*/
|
|
1703
|
-
/**
|
|
1897
|
+
/**
|
|
1898
|
+
* Whether an environment participates in the canonical ordering.
|
|
1704
1899
|
*
|
|
1705
|
-
*
|
|
1706
|
-
* staging, development, etc.) and appear in the environment_order list.
|
|
1707
|
-
* AD_HOC environments are transient targets (preview branches,
|
|
1900
|
+
* `AD_HOC` environments are transient targets (preview branches,
|
|
1708
1901
|
* developer sandboxes) that are excluded from the standard ordering.
|
|
1902
|
+
* `STANDARD` environments are the customer's deploy targets (production,
|
|
1903
|
+
* staging, development, etc.) and appear in the environment_order list.
|
|
1709
1904
|
*/
|
|
1710
1905
|
declare enum EnvironmentClassification {
|
|
1711
|
-
|
|
1712
|
-
|
|
1906
|
+
AD_HOC = "AD_HOC",
|
|
1907
|
+
STANDARD = "STANDARD"
|
|
1713
1908
|
}
|
|
1714
1909
|
/**
|
|
1715
1910
|
* A color, expressed as a CSS hex string.
|
|
@@ -1869,14 +2064,14 @@ declare class AccountSettings {
|
|
|
1869
2064
|
* can validate calls. Raw strings are still accepted for flexibility.
|
|
1870
2065
|
*/
|
|
1871
2066
|
declare enum Op {
|
|
2067
|
+
CONTAINS = "contains",
|
|
1872
2068
|
EQ = "==",
|
|
1873
|
-
NEQ = "!=",
|
|
1874
|
-
LT = "<",
|
|
1875
|
-
LTE = "<=",
|
|
1876
2069
|
GT = ">",
|
|
1877
2070
|
GTE = ">=",
|
|
1878
2071
|
IN = "in",
|
|
1879
|
-
|
|
2072
|
+
LT = "<",
|
|
2073
|
+
LTE = "<=",
|
|
2074
|
+
NEQ = "!="
|
|
1880
2075
|
}
|
|
1881
2076
|
/** @internal */
|
|
1882
2077
|
interface ContextClient {
|
|
@@ -1997,10 +2192,10 @@ declare class Rule {
|
|
|
1997
2192
|
*/
|
|
1998
2193
|
/** Type of a {@link ConfigItem} value. */
|
|
1999
2194
|
declare enum ItemType {
|
|
2000
|
-
STRING = "STRING",
|
|
2001
|
-
NUMBER = "NUMBER",
|
|
2002
2195
|
BOOLEAN = "BOOLEAN",
|
|
2003
|
-
JSON = "JSON"
|
|
2196
|
+
JSON = "JSON",
|
|
2197
|
+
NUMBER = "NUMBER",
|
|
2198
|
+
STRING = "STRING"
|
|
2004
2199
|
}
|
|
2005
2200
|
/** @internal Config client surface used by the active-record `Config.save`/`delete`. */
|
|
2006
2201
|
interface ConfigModelClient {
|
|
@@ -2651,15 +2846,21 @@ declare class ManagementFlagsClient {
|
|
|
2651
2846
|
/**
|
|
2652
2847
|
* Public types for the Logging SDK.
|
|
2653
2848
|
*/
|
|
2654
|
-
/**
|
|
2849
|
+
/**
|
|
2850
|
+
* Log severity levels used by the Smpl Logging service.
|
|
2851
|
+
*
|
|
2852
|
+
* Members are declared in alphabetical order. Severity ordering is not
|
|
2853
|
+
* derived from declaration order — it lives in the framework adapter
|
|
2854
|
+
* code that maps these to each framework's native numeric level.
|
|
2855
|
+
*/
|
|
2655
2856
|
declare enum LogLevel {
|
|
2656
|
-
TRACE = "TRACE",
|
|
2657
2857
|
DEBUG = "DEBUG",
|
|
2658
|
-
INFO = "INFO",
|
|
2659
|
-
WARN = "WARN",
|
|
2660
2858
|
ERROR = "ERROR",
|
|
2661
2859
|
FATAL = "FATAL",
|
|
2662
|
-
|
|
2860
|
+
INFO = "INFO",
|
|
2861
|
+
SILENT = "SILENT",
|
|
2862
|
+
TRACE = "TRACE",
|
|
2863
|
+
WARN = "WARN"
|
|
2663
2864
|
}
|
|
2664
2865
|
/**
|
|
2665
2866
|
* Describes a logger effective-level change. Frozen — fields cannot be
|
|
@@ -2956,32 +3157,84 @@ declare class LogGroupsClient {
|
|
|
2956
3157
|
/**
|
|
2957
3158
|
* Smpl Audit management surface — `mgmt.audit.*`.
|
|
2958
3159
|
*
|
|
2959
|
-
* Counterpart to the runtime `AuditClient`. The runtime client owns
|
|
2960
|
-
* recording and read-side queries; this client owns SIEM
|
|
3160
|
+
* Counterpart to the runtime `AuditClient`. The runtime client owns
|
|
3161
|
+
* event recording and read-side queries; this client owns SIEM
|
|
3162
|
+
* forwarder CRUD via the active-record {@link Forwarder} model:
|
|
2961
3163
|
*
|
|
2962
|
-
* mgmt.audit.forwarders.{
|
|
3164
|
+
* mgmt.audit.forwarders.{new,get,list,delete}
|
|
3165
|
+
* Forwarder.{save,delete}
|
|
2963
3166
|
*
|
|
2964
3167
|
* New audit-management capabilities should be added here, not in
|
|
2965
3168
|
* `src/audit/client.ts`.
|
|
2966
3169
|
*/
|
|
2967
3170
|
|
|
2968
3171
|
type AuditHttp = ReturnType<typeof createClient<paths>>;
|
|
2969
|
-
/**
|
|
2970
|
-
|
|
3172
|
+
/**
|
|
3173
|
+
* `mgmt.audit.forwarders.*` — active-record CRUD for SIEM forwarders.
|
|
3174
|
+
*/
|
|
3175
|
+
declare class ForwardersClient implements ForwarderModelClient {
|
|
2971
3176
|
private readonly _http;
|
|
2972
3177
|
/** @internal */
|
|
2973
3178
|
constructor(_http: AuditHttp);
|
|
2974
|
-
create(input: CreateForwarderInput): Promise<Forwarder>;
|
|
2975
|
-
list(params?: ListForwardersParams): Promise<ListForwardersPage>;
|
|
2976
|
-
get(forwarderId: string): Promise<Forwarder>;
|
|
2977
3179
|
/**
|
|
2978
|
-
*
|
|
3180
|
+
* Construct an unsaved {@link Forwarder}. Call {@link Forwarder.save}
|
|
3181
|
+
* to persist.
|
|
3182
|
+
*
|
|
3183
|
+
* @param fields.name Display name. Free-form.
|
|
3184
|
+
* @param fields.forwarderType Destination type — see {@link ForwarderType}.
|
|
3185
|
+
* @param fields.configuration Destination HTTP request configuration.
|
|
3186
|
+
* Headers carry credentials and are
|
|
3187
|
+
* encrypted at rest server-side; reads
|
|
3188
|
+
* return them redacted.
|
|
3189
|
+
* @param fields.enabled Whether the forwarder is active. Defaults true.
|
|
3190
|
+
* @param fields.description Optional free-text description.
|
|
3191
|
+
* @param fields.filter Optional JSON Logic filter; events that
|
|
3192
|
+
* don't match are recorded as
|
|
3193
|
+
* `filtered_out` deliveries.
|
|
3194
|
+
* @param fields.transform Optional JSONata template applied to
|
|
3195
|
+
* the event payload before POST. `null`
|
|
3196
|
+
* delivers the event as-is.
|
|
3197
|
+
*/
|
|
3198
|
+
new(fields: {
|
|
3199
|
+
name: string;
|
|
3200
|
+
forwarderType: ForwarderType;
|
|
3201
|
+
configuration: HttpConfiguration;
|
|
3202
|
+
enabled?: boolean;
|
|
3203
|
+
description?: string | null;
|
|
3204
|
+
filter?: Record<string, unknown> | null;
|
|
3205
|
+
transform?: string | null;
|
|
3206
|
+
}): Forwarder;
|
|
3207
|
+
/**
|
|
3208
|
+
* List forwarders for the authenticated account.
|
|
2979
3209
|
*
|
|
2980
|
-
*
|
|
2981
|
-
*
|
|
3210
|
+
* Offset paginated per ADR-014: pass {@link ListForwardersParams.pageNumber}
|
|
3211
|
+
* (1-based) and {@link ListForwardersParams.pageSize} (default 1000,
|
|
3212
|
+
* max 1000). Pass `metaTotal=true` to populate `total` and `totalPages`
|
|
3213
|
+
* in the returned `pagination` (costs an extra `COUNT` query
|
|
3214
|
+
* server-side).
|
|
2982
3215
|
*/
|
|
2983
|
-
|
|
3216
|
+
list(params?: ListForwardersParams): Promise<ListForwardersPage>;
|
|
3217
|
+
/**
|
|
3218
|
+
* Fetch a single forwarder by id. The returned instance is bound to
|
|
3219
|
+
* this client so {@link Forwarder.save} and {@link Forwarder.delete}
|
|
3220
|
+
* round-trip back here.
|
|
3221
|
+
*/
|
|
3222
|
+
get(forwarderId: string): Promise<Forwarder>;
|
|
3223
|
+
/** Soft-delete a forwarder by id. */
|
|
2984
3224
|
delete(forwarderId: string): Promise<void>;
|
|
3225
|
+
/**
|
|
3226
|
+
* @internal Called by `Forwarder.save()` on unsaved instances.
|
|
3227
|
+
*/
|
|
3228
|
+
_createForwarder(forwarder: Forwarder): Promise<Forwarder>;
|
|
3229
|
+
/**
|
|
3230
|
+
* @internal Full-replace PUT. Called by `Forwarder.save()` on
|
|
3231
|
+
* instances that already have a `createdAt`. Header values must be
|
|
3232
|
+
* re-supplied as plaintext; the GET path redacts them, so a PUT body
|
|
3233
|
+
* containing `"<redacted>"` would persist that literal.
|
|
3234
|
+
*/
|
|
3235
|
+
_updateForwarder(forwarder: Forwarder): Promise<Forwarder>;
|
|
3236
|
+
/** @internal Called by `Forwarder.delete()`. */
|
|
3237
|
+
_deleteForwarder(id: string): Promise<void>;
|
|
2985
3238
|
}
|
|
2986
3239
|
/** `mgmt.audit.*` — management surface for the audit service. */
|
|
2987
3240
|
declare class ManagementAuditClient {
|