@smplkit/sdk 3.0.32 → 3.0.34
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 +432 -442
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +372 -189
- package/dist/index.d.ts +372 -189
- package/dist/index.js +428 -442
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -57,6 +57,36 @@ interface ListEventsPage {
|
|
|
57
57
|
/** Opaque cursor for the next page, or null if this is the last page. */
|
|
58
58
|
nextCursor: string | null;
|
|
59
59
|
}
|
|
60
|
+
interface ResourceType {
|
|
61
|
+
/** The resource_type slug. */
|
|
62
|
+
id: string;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
}
|
|
65
|
+
interface ListResourceTypesParams {
|
|
66
|
+
pageSize?: number;
|
|
67
|
+
pageAfter?: string;
|
|
68
|
+
}
|
|
69
|
+
interface ListResourceTypesPage {
|
|
70
|
+
resourceTypes: ResourceType[];
|
|
71
|
+
/** Opaque cursor for the next page, or null if this is the last page. */
|
|
72
|
+
nextCursor: string | null;
|
|
73
|
+
}
|
|
74
|
+
interface Action {
|
|
75
|
+
/** The action slug. */
|
|
76
|
+
id: string;
|
|
77
|
+
createdAt: string;
|
|
78
|
+
}
|
|
79
|
+
interface ListActionsParams {
|
|
80
|
+
/** When set, returns only the actions seen with this resource_type. */
|
|
81
|
+
filterResourceType?: string;
|
|
82
|
+
pageSize?: number;
|
|
83
|
+
pageAfter?: string;
|
|
84
|
+
}
|
|
85
|
+
interface ActionListPage {
|
|
86
|
+
actions: Action[];
|
|
87
|
+
/** Opaque cursor for the next page, or null if this is the last page. */
|
|
88
|
+
nextCursor: string | null;
|
|
89
|
+
}
|
|
60
90
|
interface HttpHeader {
|
|
61
91
|
name: string;
|
|
62
92
|
value: string;
|
|
@@ -91,7 +121,6 @@ interface Forwarder {
|
|
|
91
121
|
transform: string | null;
|
|
92
122
|
/** Header values are returned redacted on reads. */
|
|
93
123
|
http: ForwarderHttp;
|
|
94
|
-
data: Record<string, unknown>;
|
|
95
124
|
createdAt: string | null;
|
|
96
125
|
updatedAt: string | null;
|
|
97
126
|
deletedAt: string | null;
|
|
@@ -104,7 +133,6 @@ interface CreateForwarderInput {
|
|
|
104
133
|
enabled?: boolean;
|
|
105
134
|
filter?: Record<string, unknown>;
|
|
106
135
|
transform?: string;
|
|
107
|
-
data?: Record<string, unknown>;
|
|
108
136
|
}
|
|
109
137
|
interface UpdateForwarderInput extends CreateForwarderInput {
|
|
110
138
|
}
|
|
@@ -118,73 +146,31 @@ interface ListForwardersPage {
|
|
|
118
146
|
forwarders: Forwarder[];
|
|
119
147
|
nextCursor: string | null;
|
|
120
148
|
}
|
|
121
|
-
type ForwarderDeliveryStatus = "SUCCEEDED" | "FAILED" | "FILTERED_OUT" | "SKIPPED_DO_NOT_FORWARD";
|
|
122
|
-
interface ForwarderDelivery {
|
|
123
|
-
id: string;
|
|
124
|
-
forwarderId: string;
|
|
125
|
-
eventId: string;
|
|
126
|
-
attemptNumber: number;
|
|
127
|
-
status: ForwarderDeliveryStatus;
|
|
128
|
-
request: Record<string, unknown> | null;
|
|
129
|
-
responseStatus: number | null;
|
|
130
|
-
responseBody: string | null;
|
|
131
|
-
latencyMs: number | null;
|
|
132
|
-
error: string | null;
|
|
133
|
-
createdAt: string | null;
|
|
134
|
-
}
|
|
135
|
-
interface ListDeliveriesParams {
|
|
136
|
-
status?: ForwarderDeliveryStatus;
|
|
137
|
-
/** Range notation per ADR-014, e.g. `[2026-01-01T00:00:00Z,*)`. */
|
|
138
|
-
createdAtRange?: string;
|
|
139
|
-
eventId?: string;
|
|
140
|
-
pageSize?: number;
|
|
141
|
-
pageAfter?: string;
|
|
142
|
-
}
|
|
143
|
-
interface ListDeliveriesPage {
|
|
144
|
-
deliveries: ForwarderDelivery[];
|
|
145
|
-
nextCursor: string | null;
|
|
146
|
-
}
|
|
147
|
-
interface RetryFailedDeliveriesSummary {
|
|
148
|
-
attempted: number;
|
|
149
|
-
succeeded: number;
|
|
150
|
-
failed: number;
|
|
151
|
-
}
|
|
152
|
-
interface TestForwarderRequest {
|
|
153
|
-
url: string;
|
|
154
|
-
method?: string;
|
|
155
|
-
headers?: HttpHeader[];
|
|
156
|
-
body?: string | null;
|
|
157
|
-
successStatus?: string;
|
|
158
|
-
/** Capped at 30s server-side. */
|
|
159
|
-
timeoutMs?: number;
|
|
160
|
-
}
|
|
161
|
-
interface TestForwarderResult {
|
|
162
|
-
succeeded: boolean;
|
|
163
|
-
responseStatus: number | null;
|
|
164
|
-
responseHeaders: Record<string, string>;
|
|
165
|
-
responseBody: string;
|
|
166
|
-
latencyMs: number | null;
|
|
167
|
-
error: string | null;
|
|
168
|
-
}
|
|
169
149
|
|
|
170
150
|
/**
|
|
171
|
-
* Audit namespace —
|
|
151
|
+
* Audit namespace — runtime client.
|
|
152
|
+
*
|
|
153
|
+
* Public surface:
|
|
154
|
+
* client.audit.events.{record,list,get,flush}
|
|
155
|
+
* client.audit.resourceTypes.list(...)
|
|
156
|
+
* client.audit.actions.list(...)
|
|
172
157
|
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
158
|
+
* The runtime audit client owns event recording and read-side queries —
|
|
159
|
+
* fire-and-forget `record`, plus the audit-log list/get and the
|
|
160
|
+
* distinct-value listings that back the Activity tab filter dropdowns.
|
|
161
|
+
*
|
|
162
|
+
* Management-plane operations (SIEM forwarder CRUD) live on
|
|
163
|
+
* `SmplManagementClient` under `mgmt.audit.*`. ADR-047 §2.7.
|
|
178
164
|
*
|
|
179
165
|
* All HTTP work is delegated to the auto-generated openapi-fetch client
|
|
180
166
|
* over `../generated/audit.d.ts` — the wrapper does not issue raw fetch
|
|
181
167
|
* calls.
|
|
182
168
|
*/
|
|
183
169
|
|
|
184
|
-
type AuditHttp = ReturnType<typeof createClient<paths>>;
|
|
170
|
+
type AuditHttp$1 = ReturnType<typeof createClient<paths>>;
|
|
185
171
|
declare class EventsClient {
|
|
186
172
|
/** @internal */
|
|
187
|
-
readonly _http: AuditHttp;
|
|
173
|
+
readonly _http: AuditHttp$1;
|
|
188
174
|
private readonly _buffer;
|
|
189
175
|
constructor(opts: {
|
|
190
176
|
apiKey: string;
|
|
@@ -209,56 +195,35 @@ declare class EventsClient {
|
|
|
209
195
|
/** @internal */
|
|
210
196
|
_close(): Promise<void>;
|
|
211
197
|
}
|
|
212
|
-
declare class
|
|
198
|
+
declare class ResourceTypesClient {
|
|
213
199
|
private readonly _http;
|
|
214
|
-
constructor(_http: AuditHttp);
|
|
215
|
-
/**
|
|
216
|
-
*
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
list(forwarderId: string, params?: ListDeliveriesParams): Promise<ListDeliveriesPage>;
|
|
224
|
-
}
|
|
225
|
-
declare class ForwarderActionsClient {
|
|
226
|
-
private readonly _http;
|
|
227
|
-
constructor(_http: AuditHttp);
|
|
228
|
-
/** Retry every failed delivery for a forwarder. Returns a count summary. */
|
|
229
|
-
retryFailedDeliveries(forwarderId: string): Promise<RetryFailedDeliveriesSummary>;
|
|
230
|
-
}
|
|
231
|
-
declare class ForwardersClient {
|
|
232
|
-
private readonly _http;
|
|
233
|
-
readonly deliveries: DeliveriesClient;
|
|
234
|
-
readonly actions: ForwarderActionsClient;
|
|
235
|
-
constructor(_http: AuditHttp);
|
|
236
|
-
create(input: CreateForwarderInput): Promise<Forwarder>;
|
|
237
|
-
list(params?: ListForwardersParams): Promise<ListForwardersPage>;
|
|
238
|
-
get(forwarderId: string): Promise<Forwarder>;
|
|
239
|
-
update(forwarderId: string, input: UpdateForwarderInput): Promise<Forwarder>;
|
|
240
|
-
delete(forwarderId: string): Promise<void>;
|
|
200
|
+
constructor(_http: AuditHttp$1);
|
|
201
|
+
/**
|
|
202
|
+
* List the distinct `resource_type` slugs recorded for this account.
|
|
203
|
+
*
|
|
204
|
+
* Backed by a maintain-by-write side table (ADR-047 §2.5), so the
|
|
205
|
+
* response time is independent of event volume. Sorted alphabetically;
|
|
206
|
+
* cursor pagination via `pageAfter`.
|
|
207
|
+
*/
|
|
208
|
+
list(params?: ListResourceTypesParams): Promise<ListResourceTypesPage>;
|
|
241
209
|
}
|
|
242
|
-
declare class
|
|
210
|
+
declare class ActionsClient {
|
|
243
211
|
private readonly _http;
|
|
244
|
-
constructor(_http: AuditHttp);
|
|
245
|
-
/**
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
declare class FunctionsClient {
|
|
255
|
-
readonly test_forwarder: TestForwarderClient;
|
|
256
|
-
constructor(http: AuditHttp);
|
|
212
|
+
constructor(_http: AuditHttp$1);
|
|
213
|
+
/**
|
|
214
|
+
* List the distinct `action` slugs recorded for this account.
|
|
215
|
+
*
|
|
216
|
+
* Without `filterResourceType`, returns one row per distinct action.
|
|
217
|
+
* With `filterResourceType`, returns only the actions recorded with
|
|
218
|
+
* that resource_type, powering cascading-filter UIs (ADR-047 §2.5).
|
|
219
|
+
* Sorted alphabetically; cursor pagination via `pageAfter`.
|
|
220
|
+
*/
|
|
221
|
+
list(params?: ListActionsParams): Promise<ActionListPage>;
|
|
257
222
|
}
|
|
258
223
|
declare class AuditClient {
|
|
259
224
|
readonly events: EventsClient;
|
|
260
|
-
readonly
|
|
261
|
-
readonly
|
|
225
|
+
readonly resourceTypes: ResourceTypesClient;
|
|
226
|
+
readonly actions: ActionsClient;
|
|
262
227
|
constructor(opts: {
|
|
263
228
|
apiKey: string;
|
|
264
229
|
baseUrl: string;
|
|
@@ -981,6 +946,15 @@ interface components {
|
|
|
981
946
|
schemas: {
|
|
982
947
|
/**
|
|
983
948
|
* Flag
|
|
949
|
+
* @description A feature flag whose value is resolved at runtime from environment
|
|
950
|
+
* rules and a default.
|
|
951
|
+
*
|
|
952
|
+
* A flag has a value type (`BOOLEAN`, `STRING`, `NUMERIC`, or `JSON`)
|
|
953
|
+
* and either a fixed set of allowed values (constrained) or accepts
|
|
954
|
+
* any value matching the type (unconstrained). Each environment can
|
|
955
|
+
* enable or disable the flag, set its own default, and define
|
|
956
|
+
* targeting rules that override the default for specific evaluation
|
|
957
|
+
* contexts.
|
|
984
958
|
* @example {
|
|
985
959
|
* "created_at": "2026-03-27T10:00:00Z",
|
|
986
960
|
* "default": false,
|
|
@@ -993,9 +967,12 @@ interface components {
|
|
|
993
967
|
* {
|
|
994
968
|
* "description": "Beta users get dark mode",
|
|
995
969
|
* "logic": {
|
|
996
|
-
* "
|
|
997
|
-
*
|
|
998
|
-
*
|
|
970
|
+
* "==": [
|
|
971
|
+
* {
|
|
972
|
+
* "var": "customer.beta"
|
|
973
|
+
* },
|
|
974
|
+
* true
|
|
975
|
+
* ]
|
|
999
976
|
* },
|
|
1000
977
|
* "value": true
|
|
1001
978
|
* }
|
|
@@ -1026,46 +1003,61 @@ interface components {
|
|
|
1026
1003
|
Flag: {
|
|
1027
1004
|
/**
|
|
1028
1005
|
* Name
|
|
1029
|
-
* @description Human-readable display name
|
|
1006
|
+
* @description Human-readable display name for the flag.
|
|
1030
1007
|
*/
|
|
1031
1008
|
name: string;
|
|
1032
|
-
/**
|
|
1009
|
+
/**
|
|
1010
|
+
* Description
|
|
1011
|
+
* @description Human-readable description of the flag's purpose.
|
|
1012
|
+
*/
|
|
1033
1013
|
description?: string | null;
|
|
1034
1014
|
/**
|
|
1035
1015
|
* Type
|
|
1036
|
-
* @description Value type
|
|
1016
|
+
* @description Value type of the flag. Accepted case-insensitively. Changing the type cascades to `values`, `default`, and every environment's rules and default.
|
|
1017
|
+
* @enum {string}
|
|
1037
1018
|
*/
|
|
1038
|
-
type:
|
|
1019
|
+
type: "BOOLEAN" | "STRING" | "NUMERIC" | "JSON";
|
|
1039
1020
|
/**
|
|
1040
1021
|
* Default
|
|
1041
|
-
* @description Default value
|
|
1022
|
+
* @description Default value returned when no environment rule fires and the environment has no `default`. For constrained flags (non-null `values`), must equal one of the entries in the `values` array. For unconstrained flags, must match `type`.
|
|
1042
1023
|
*/
|
|
1043
1024
|
default: unknown;
|
|
1044
1025
|
/**
|
|
1045
1026
|
* Values
|
|
1046
|
-
* @description Ordered set of allowed values
|
|
1027
|
+
* @description Ordered set of allowed values for a constrained flag, or `null` for an unconstrained flag. `BOOLEAN` flags, if constrained, must declare exactly two values.
|
|
1047
1028
|
*/
|
|
1048
1029
|
values?: components["schemas"]["FlagValue"][] | null;
|
|
1049
|
-
/**
|
|
1030
|
+
/**
|
|
1031
|
+
* Environments
|
|
1032
|
+
* @description Per-environment configuration keyed by environment name (`production`, `staging`, etc.). Environments not listed fall back to the flag's global `default`.
|
|
1033
|
+
*/
|
|
1050
1034
|
environments?: {
|
|
1051
1035
|
[key: string]: components["schemas"]["FlagEnvironment"];
|
|
1052
1036
|
};
|
|
1053
1037
|
/**
|
|
1054
1038
|
* Managed
|
|
1055
|
-
* @description
|
|
1039
|
+
* @description `true` when the flag was created through the API, `false` when it was auto-discovered from a bulk-register call. Auto-discovered flags can be edited and converted to managed by setting this to `true`.
|
|
1056
1040
|
*/
|
|
1057
1041
|
managed?: boolean | null;
|
|
1058
|
-
/**
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1042
|
+
/**
|
|
1043
|
+
* Sources
|
|
1044
|
+
* @description SDK-reported observations of this flag, grouped by service and environment. Populated automatically by the bulk-register endpoint.
|
|
1045
|
+
*/
|
|
1046
|
+
readonly sources?: components["schemas"]["FlagSource"][] | null;
|
|
1047
|
+
/**
|
|
1048
|
+
* Created At
|
|
1049
|
+
* @description When the flag was created.
|
|
1050
|
+
*/
|
|
1063
1051
|
readonly created_at?: string | null;
|
|
1064
|
-
/**
|
|
1052
|
+
/**
|
|
1053
|
+
* Updated At
|
|
1054
|
+
* @description When the flag was last modified.
|
|
1055
|
+
*/
|
|
1065
1056
|
readonly updated_at?: string | null;
|
|
1066
1057
|
};
|
|
1067
1058
|
/**
|
|
1068
1059
|
* FlagBulkItem
|
|
1060
|
+
* @description One flag declaration reported by an SDK during bulk registration.
|
|
1069
1061
|
* @example {
|
|
1070
1062
|
* "default": false,
|
|
1071
1063
|
* "environment": "production",
|
|
@@ -1077,32 +1069,34 @@ interface components {
|
|
|
1077
1069
|
FlagBulkItem: {
|
|
1078
1070
|
/**
|
|
1079
1071
|
* Id
|
|
1080
|
-
* @description Flag key as declared in code
|
|
1072
|
+
* @description Flag key as declared in code. URL-safe and stable for the lifetime of the flag.
|
|
1081
1073
|
*/
|
|
1082
1074
|
id: string;
|
|
1083
1075
|
/**
|
|
1084
1076
|
* Type
|
|
1085
|
-
* @description
|
|
1077
|
+
* @description Value type the SDK declared for the flag. Accepted case-insensitively.
|
|
1078
|
+
* @enum {string}
|
|
1086
1079
|
*/
|
|
1087
|
-
type:
|
|
1080
|
+
type: "BOOLEAN" | "STRING" | "NUMERIC" | "JSON";
|
|
1088
1081
|
/**
|
|
1089
1082
|
* Default
|
|
1090
|
-
* @description Default value declared
|
|
1083
|
+
* @description Default value the SDK declared for the flag. Used to create the flag if it does not already exist.
|
|
1091
1084
|
*/
|
|
1092
1085
|
default: unknown;
|
|
1093
1086
|
/**
|
|
1094
1087
|
* Service
|
|
1095
|
-
* @description Service
|
|
1088
|
+
* @description Service reporting the declaration. Defaults to `unknown`.
|
|
1096
1089
|
*/
|
|
1097
1090
|
service?: string | null;
|
|
1098
1091
|
/**
|
|
1099
1092
|
* Environment
|
|
1100
|
-
* @description Environment
|
|
1093
|
+
* @description Environment reporting the declaration. Defaults to `unknown`.
|
|
1101
1094
|
*/
|
|
1102
1095
|
environment?: string | null;
|
|
1103
1096
|
};
|
|
1104
1097
|
/**
|
|
1105
1098
|
* FlagBulkRequest
|
|
1099
|
+
* @description Inputs to the bulk-register-flags action.
|
|
1106
1100
|
* @example {
|
|
1107
1101
|
* "flags": [
|
|
1108
1102
|
* {
|
|
@@ -1123,38 +1117,70 @@ interface components {
|
|
|
1123
1117
|
* }
|
|
1124
1118
|
*/
|
|
1125
1119
|
FlagBulkRequest: {
|
|
1126
|
-
/**
|
|
1120
|
+
/**
|
|
1121
|
+
* Flags
|
|
1122
|
+
* @description Flags reported by the SDK in this batch.
|
|
1123
|
+
*/
|
|
1127
1124
|
flags: components["schemas"]["FlagBulkItem"][];
|
|
1128
1125
|
};
|
|
1129
1126
|
/**
|
|
1130
1127
|
* FlagBulkResponse
|
|
1128
|
+
* @description Result of a bulk-register-flags action.
|
|
1131
1129
|
* @example {
|
|
1132
1130
|
* "registered": 5
|
|
1133
1131
|
* }
|
|
1134
1132
|
*/
|
|
1135
1133
|
FlagBulkResponse: {
|
|
1136
|
-
/**
|
|
1134
|
+
/**
|
|
1135
|
+
* Registered
|
|
1136
|
+
* @description Number of items in the batch that were registered or refreshed.
|
|
1137
|
+
*/
|
|
1137
1138
|
registered: number;
|
|
1138
1139
|
};
|
|
1139
|
-
/**
|
|
1140
|
+
/**
|
|
1141
|
+
* FlagEnvironment
|
|
1142
|
+
* @description Per-environment evaluation configuration for a flag.
|
|
1143
|
+
*/
|
|
1140
1144
|
FlagEnvironment: {
|
|
1141
1145
|
/**
|
|
1142
1146
|
* Enabled
|
|
1147
|
+
* @description Whether the flag is active in this environment. When `false`, evaluation skips rules and returns the flag's global `default`.
|
|
1143
1148
|
* @default true
|
|
1144
1149
|
*/
|
|
1145
1150
|
enabled: boolean;
|
|
1146
|
-
/**
|
|
1151
|
+
/**
|
|
1152
|
+
* Default
|
|
1153
|
+
* @description Environment-level default returned when no rule fires. If `null`, evaluation falls back to the flag's global `default`.
|
|
1154
|
+
*/
|
|
1147
1155
|
default?: unknown | null;
|
|
1148
|
-
/**
|
|
1156
|
+
/**
|
|
1157
|
+
* Rules
|
|
1158
|
+
* @description Targeting rules evaluated top-down. The first rule whose logic returns truthy provides the result.
|
|
1159
|
+
*/
|
|
1149
1160
|
rules?: components["schemas"]["FlagRule"][];
|
|
1150
1161
|
};
|
|
1151
|
-
/**
|
|
1162
|
+
/**
|
|
1163
|
+
* FlagListResponse
|
|
1164
|
+
* @description JSON:API collection response envelope for flags.
|
|
1165
|
+
*/
|
|
1152
1166
|
FlagListResponse: {
|
|
1153
1167
|
/** Data */
|
|
1154
1168
|
data: components["schemas"]["FlagResource"][];
|
|
1155
1169
|
};
|
|
1170
|
+
/**
|
|
1171
|
+
* FlagRequest
|
|
1172
|
+
* @description JSON:API request envelope for creating or updating a flag.
|
|
1173
|
+
*/
|
|
1174
|
+
FlagRequest: {
|
|
1175
|
+
data: components["schemas"]["FlagResource"];
|
|
1176
|
+
};
|
|
1156
1177
|
/**
|
|
1157
1178
|
* FlagResource
|
|
1179
|
+
* @description JSON:API resource envelope for a flag.
|
|
1180
|
+
*
|
|
1181
|
+
* `id` is the flag key. For create requests, `id` is required and is
|
|
1182
|
+
* chosen by the caller. For update requests, `id` may be omitted (the
|
|
1183
|
+
* server reads the key from the URL) or supplied to rename the flag.
|
|
1158
1184
|
* @example {
|
|
1159
1185
|
* "attributes": {
|
|
1160
1186
|
* "created_at": "2026-03-27T10:00:00Z",
|
|
@@ -1168,9 +1194,12 @@ interface components {
|
|
|
1168
1194
|
* {
|
|
1169
1195
|
* "description": "Beta users get dark mode",
|
|
1170
1196
|
* "logic": {
|
|
1171
|
-
* "
|
|
1172
|
-
*
|
|
1173
|
-
*
|
|
1197
|
+
* "==": [
|
|
1198
|
+
* {
|
|
1199
|
+
* "var": "customer.beta"
|
|
1200
|
+
* },
|
|
1201
|
+
* true
|
|
1202
|
+
* ]
|
|
1174
1203
|
* },
|
|
1175
1204
|
* "value": true
|
|
1176
1205
|
* }
|
|
@@ -1206,68 +1235,110 @@ interface components {
|
|
|
1206
1235
|
type: "flag";
|
|
1207
1236
|
attributes: components["schemas"]["Flag"];
|
|
1208
1237
|
};
|
|
1209
|
-
/**
|
|
1238
|
+
/**
|
|
1239
|
+
* FlagResponse
|
|
1240
|
+
* @description JSON:API single-resource response envelope for a flag.
|
|
1241
|
+
*/
|
|
1210
1242
|
FlagResponse: {
|
|
1211
1243
|
data: components["schemas"]["FlagResource"];
|
|
1212
1244
|
};
|
|
1213
|
-
/**
|
|
1245
|
+
/**
|
|
1246
|
+
* FlagRule
|
|
1247
|
+
* @description A targeting rule that overrides the default within an environment.
|
|
1248
|
+
*/
|
|
1214
1249
|
FlagRule: {
|
|
1215
|
-
/**
|
|
1250
|
+
/**
|
|
1251
|
+
* Description
|
|
1252
|
+
* @description Human-readable description of the rule.
|
|
1253
|
+
*/
|
|
1216
1254
|
description?: string | null;
|
|
1217
|
-
/**
|
|
1255
|
+
/**
|
|
1256
|
+
* Logic
|
|
1257
|
+
* @description JSON Logic expression evaluated against the evaluation context. The rule fires when the expression is truthy.
|
|
1258
|
+
*/
|
|
1218
1259
|
logic: {
|
|
1219
1260
|
[key: string]: unknown;
|
|
1220
1261
|
};
|
|
1221
|
-
/**
|
|
1262
|
+
/**
|
|
1263
|
+
* Value
|
|
1264
|
+
* @description Value returned when the rule fires. Must reference a value from the flag's `values` array (constrained flags) or match the flag's `type` (unconstrained flags).
|
|
1265
|
+
*/
|
|
1222
1266
|
value: unknown;
|
|
1223
1267
|
};
|
|
1224
1268
|
/**
|
|
1225
1269
|
* FlagSource
|
|
1226
|
-
* @
|
|
1227
|
-
*
|
|
1228
|
-
*
|
|
1229
|
-
*
|
|
1230
|
-
*
|
|
1231
|
-
*
|
|
1232
|
-
*
|
|
1233
|
-
*
|
|
1234
|
-
*
|
|
1235
|
-
* "service": "api-gateway",
|
|
1236
|
-
* "updated_at": "2026-04-17T15:30:00Z"
|
|
1237
|
-
* }
|
|
1270
|
+
* @description A record of an SDK observing a feature flag from a particular
|
|
1271
|
+
* service and environment.
|
|
1272
|
+
*
|
|
1273
|
+
* The flags service auto-registers a source the first time an SDK
|
|
1274
|
+
* reports a flag from a given service/environment pair and refreshes
|
|
1275
|
+
* `last_seen` on every subsequent report. Each source captures the
|
|
1276
|
+
* value type and default value the SDK declared in source code at
|
|
1277
|
+
* that location, which makes it possible to detect when service code
|
|
1278
|
+
* has drifted from the flag's authoritative configuration.
|
|
1238
1279
|
*/
|
|
1239
1280
|
FlagSource: {
|
|
1240
|
-
/**
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1281
|
+
/**
|
|
1282
|
+
* Service
|
|
1283
|
+
* @description Service that declared the flag.
|
|
1284
|
+
*/
|
|
1285
|
+
readonly service?: string | null;
|
|
1286
|
+
/**
|
|
1287
|
+
* Environment
|
|
1288
|
+
* @description Environment in which the service declared the flag.
|
|
1289
|
+
*/
|
|
1290
|
+
readonly environment?: string | null;
|
|
1291
|
+
/**
|
|
1292
|
+
* Declared Type
|
|
1293
|
+
* @description Value type the SDK reported when registering the flag from this service/environment. May differ from the flag's authoritative `type` if the service is running stale code.
|
|
1294
|
+
*/
|
|
1295
|
+
readonly declared_type?: ("BOOLEAN" | "STRING" | "NUMERIC" | "JSON") | null;
|
|
1296
|
+
/**
|
|
1297
|
+
* Declared Default
|
|
1298
|
+
* @description Default value the SDK reported when registering the flag from this service/environment. May differ from the flag's authoritative `default` if the service is running stale code.
|
|
1299
|
+
*/
|
|
1300
|
+
readonly declared_default?: unknown;
|
|
1301
|
+
/**
|
|
1302
|
+
* First Observed
|
|
1303
|
+
* @description When this source was first observed.
|
|
1304
|
+
*/
|
|
1245
1305
|
readonly first_observed?: string | null;
|
|
1246
|
-
/**
|
|
1306
|
+
/**
|
|
1307
|
+
* Last Seen
|
|
1308
|
+
* @description Most recent time the SDK re-registered this source.
|
|
1309
|
+
*/
|
|
1247
1310
|
readonly last_seen?: string | null;
|
|
1248
|
-
/**
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
/** Created At */
|
|
1311
|
+
/**
|
|
1312
|
+
* Created At
|
|
1313
|
+
* @description When the source record was created.
|
|
1314
|
+
*/
|
|
1253
1315
|
readonly created_at?: string | null;
|
|
1254
|
-
/**
|
|
1316
|
+
/**
|
|
1317
|
+
* Updated At
|
|
1318
|
+
* @description When the source record was last modified.
|
|
1319
|
+
*/
|
|
1255
1320
|
readonly updated_at?: string | null;
|
|
1256
1321
|
};
|
|
1257
|
-
/**
|
|
1322
|
+
/**
|
|
1323
|
+
* FlagSourceListResponse
|
|
1324
|
+
* @description JSON:API collection response envelope for flag sources.
|
|
1325
|
+
*/
|
|
1258
1326
|
FlagSourceListResponse: {
|
|
1259
1327
|
/** Data */
|
|
1260
1328
|
data: components["schemas"]["FlagSourceResource"][];
|
|
1261
1329
|
};
|
|
1262
1330
|
/**
|
|
1263
1331
|
* FlagSourceResource
|
|
1332
|
+
* @description JSON:API resource envelope for a flag source.
|
|
1333
|
+
*
|
|
1334
|
+
* `id` is the source record's UUID. Sources are not created or
|
|
1335
|
+
* modified directly — the flags service registers and refreshes them
|
|
1336
|
+
* in response to SDK bulk-register requests.
|
|
1264
1337
|
* @example {
|
|
1265
1338
|
* "attributes": {
|
|
1266
1339
|
* "created_at": "2026-04-17T10:00:00Z",
|
|
1267
|
-
* "
|
|
1268
|
-
*
|
|
1269
|
-
* "type": "BOOLEAN"
|
|
1270
|
-
* },
|
|
1340
|
+
* "declared_default": true,
|
|
1341
|
+
* "declared_type": "BOOLEAN",
|
|
1271
1342
|
* "environment": "production",
|
|
1272
1343
|
* "first_observed": "2026-04-17T10:00:00Z",
|
|
1273
1344
|
* "last_seen": "2026-04-17T15:30:00Z",
|
|
@@ -1288,46 +1359,99 @@ interface components {
|
|
|
1288
1359
|
type: "flag_source";
|
|
1289
1360
|
attributes: components["schemas"]["FlagSource"];
|
|
1290
1361
|
};
|
|
1291
|
-
/**
|
|
1362
|
+
/**
|
|
1363
|
+
* FlagValue
|
|
1364
|
+
* @description A named value in a constrained flag's value set.
|
|
1365
|
+
*/
|
|
1292
1366
|
FlagValue: {
|
|
1293
|
-
/**
|
|
1367
|
+
/**
|
|
1368
|
+
* Name
|
|
1369
|
+
* @description Human-readable label for the value.
|
|
1370
|
+
*/
|
|
1294
1371
|
name: string;
|
|
1295
|
-
/**
|
|
1372
|
+
/**
|
|
1373
|
+
* Value
|
|
1374
|
+
* @description The value itself. Must match the flag's `type`.
|
|
1375
|
+
*/
|
|
1296
1376
|
value: unknown;
|
|
1297
1377
|
};
|
|
1298
|
-
/**
|
|
1378
|
+
/**
|
|
1379
|
+
* ManualReviewItem
|
|
1380
|
+
* @description A flag rule that could not be safely modified by the bulk
|
|
1381
|
+
* remove-references action.
|
|
1382
|
+
*/
|
|
1299
1383
|
ManualReviewItem: {
|
|
1300
|
-
/**
|
|
1384
|
+
/**
|
|
1385
|
+
* Flag
|
|
1386
|
+
* @description Key of the flag containing the rule.
|
|
1387
|
+
*/
|
|
1301
1388
|
flag: string;
|
|
1302
|
-
/**
|
|
1389
|
+
/**
|
|
1390
|
+
* Environment
|
|
1391
|
+
* @description Environment containing the rule.
|
|
1392
|
+
*/
|
|
1303
1393
|
environment: string;
|
|
1304
|
-
/**
|
|
1394
|
+
/**
|
|
1395
|
+
* Rule Index
|
|
1396
|
+
* @description Position of the rule within the environment's `rules` array.
|
|
1397
|
+
*/
|
|
1305
1398
|
rule_index: number;
|
|
1306
|
-
/**
|
|
1399
|
+
/**
|
|
1400
|
+
* Reason
|
|
1401
|
+
* @description Why the rule needs manual review.
|
|
1402
|
+
*/
|
|
1307
1403
|
reason: string;
|
|
1308
1404
|
};
|
|
1309
|
-
/**
|
|
1405
|
+
/**
|
|
1406
|
+
* RemoveReferencesAttributes
|
|
1407
|
+
* @description Counts and follow-ups returned by the remove-references action.
|
|
1408
|
+
*/
|
|
1310
1409
|
RemoveReferencesAttributes: {
|
|
1311
|
-
/**
|
|
1410
|
+
/**
|
|
1411
|
+
* Flags Modified
|
|
1412
|
+
* @description Keys of flags whose rules were modified.
|
|
1413
|
+
*/
|
|
1312
1414
|
flags_modified: string[];
|
|
1313
|
-
/**
|
|
1415
|
+
/**
|
|
1416
|
+
* Rules Removed
|
|
1417
|
+
* @description Total number of rules removed across all flags.
|
|
1418
|
+
*/
|
|
1314
1419
|
rules_removed: number;
|
|
1315
|
-
/**
|
|
1420
|
+
/**
|
|
1421
|
+
* Rules Needing Manual Review
|
|
1422
|
+
* @description Rules that referenced the context but could not be removed automatically (typically because the reference is inside an `and` expression where removal would broaden the rule).
|
|
1423
|
+
*/
|
|
1316
1424
|
rules_needing_manual_review: components["schemas"]["ManualReviewItem"][];
|
|
1317
1425
|
};
|
|
1318
|
-
/**
|
|
1426
|
+
/**
|
|
1427
|
+
* RemoveReferencesRequest
|
|
1428
|
+
* @description Inputs to the remove-references action.
|
|
1429
|
+
*
|
|
1430
|
+
* Exactly one of `context` or `context_type` must be provided.
|
|
1431
|
+
*/
|
|
1319
1432
|
RemoveReferencesRequest: {
|
|
1320
|
-
/**
|
|
1433
|
+
/**
|
|
1434
|
+
* Context
|
|
1435
|
+
* @description Identifier of the context instance to remove references to, formatted as `{type}:{key}` (e.g. `customer:c-123`).
|
|
1436
|
+
*/
|
|
1321
1437
|
context?: string | null;
|
|
1322
|
-
/**
|
|
1438
|
+
/**
|
|
1439
|
+
* Context Type
|
|
1440
|
+
* @description Context type to remove all references to (any attribute of this type).
|
|
1441
|
+
*/
|
|
1323
1442
|
context_type?: string | null;
|
|
1324
1443
|
};
|
|
1325
|
-
/**
|
|
1444
|
+
/**
|
|
1445
|
+
* RemoveReferencesResultEnvelope
|
|
1446
|
+
* @description JSON:API single-resource response envelope for the
|
|
1447
|
+
* remove-references action.
|
|
1448
|
+
*/
|
|
1326
1449
|
RemoveReferencesResultEnvelope: {
|
|
1327
1450
|
data: components["schemas"]["RemoveReferencesResultResource"];
|
|
1328
1451
|
};
|
|
1329
1452
|
/**
|
|
1330
1453
|
* RemoveReferencesResultResource
|
|
1454
|
+
* @description JSON:API resource envelope for the remove-references result.
|
|
1331
1455
|
* @example {
|
|
1332
1456
|
* "attributes": {
|
|
1333
1457
|
* "flags_modified": [
|
|
@@ -1356,17 +1480,30 @@ interface components {
|
|
|
1356
1480
|
type: "remove_references_result";
|
|
1357
1481
|
attributes: components["schemas"]["RemoveReferencesAttributes"];
|
|
1358
1482
|
};
|
|
1359
|
-
/**
|
|
1483
|
+
/**
|
|
1484
|
+
* UsageAttributes
|
|
1485
|
+
* @description Usage counter for a single metered limit.
|
|
1486
|
+
*/
|
|
1360
1487
|
UsageAttributes: {
|
|
1361
|
-
/**
|
|
1488
|
+
/**
|
|
1489
|
+
* Limit Key
|
|
1490
|
+
* @description Identifier of the metered limit, e.g. `flags.items`.
|
|
1491
|
+
*/
|
|
1362
1492
|
limit_key: string;
|
|
1363
|
-
/**
|
|
1493
|
+
/**
|
|
1494
|
+
* Period
|
|
1495
|
+
* @description Period the counter covers. `current` is the only supported value.
|
|
1496
|
+
*/
|
|
1364
1497
|
period: string;
|
|
1365
|
-
/**
|
|
1498
|
+
/**
|
|
1499
|
+
* Value
|
|
1500
|
+
* @description Count for the period.
|
|
1501
|
+
*/
|
|
1366
1502
|
value: number;
|
|
1367
1503
|
};
|
|
1368
1504
|
/**
|
|
1369
1505
|
* UsageListResponse
|
|
1506
|
+
* @description JSON:API collection response envelope for usage counters.
|
|
1370
1507
|
* @example {
|
|
1371
1508
|
* "data": [
|
|
1372
1509
|
* {
|
|
@@ -1387,6 +1524,7 @@ interface components {
|
|
|
1387
1524
|
};
|
|
1388
1525
|
/**
|
|
1389
1526
|
* UsageResource
|
|
1527
|
+
* @description JSON:API resource envelope for a usage counter.
|
|
1390
1528
|
* @example {
|
|
1391
1529
|
* "attributes": {
|
|
1392
1530
|
* "limit_key": "flags.items",
|
|
@@ -2631,6 +2769,44 @@ declare class LogGroupsClient {
|
|
|
2631
2769
|
_updateGroup(group: LogGroup): Promise<LogGroup>;
|
|
2632
2770
|
}
|
|
2633
2771
|
|
|
2772
|
+
/**
|
|
2773
|
+
* Smpl Audit management surface — `mgmt.audit.*`.
|
|
2774
|
+
*
|
|
2775
|
+
* Counterpart to the runtime `AuditClient`. The runtime client owns event
|
|
2776
|
+
* recording and read-side queries; this client owns SIEM forwarder CRUD:
|
|
2777
|
+
*
|
|
2778
|
+
* mgmt.audit.forwarders.{create,get,list,update,delete}
|
|
2779
|
+
*
|
|
2780
|
+
* New audit-management capabilities should be added here, not in
|
|
2781
|
+
* `src/audit/client.ts`.
|
|
2782
|
+
*/
|
|
2783
|
+
|
|
2784
|
+
type AuditHttp = ReturnType<typeof createClient<paths>>;
|
|
2785
|
+
/** `mgmt.audit.forwarders.*` — CRUD for SIEM forwarders. */
|
|
2786
|
+
declare class ForwardersClient {
|
|
2787
|
+
private readonly _http;
|
|
2788
|
+
/** @internal */
|
|
2789
|
+
constructor(_http: AuditHttp);
|
|
2790
|
+
create(input: CreateForwarderInput): Promise<Forwarder>;
|
|
2791
|
+
list(params?: ListForwardersParams): Promise<ListForwardersPage>;
|
|
2792
|
+
get(forwarderId: string): Promise<Forwarder>;
|
|
2793
|
+
/**
|
|
2794
|
+
* Full-replace update. PUT semantics — every field is overwritten.
|
|
2795
|
+
*
|
|
2796
|
+
* Header values must be re-supplied as plaintext; the GET path
|
|
2797
|
+
* returns them in plaintext for exactly this round-trip.
|
|
2798
|
+
*/
|
|
2799
|
+
update(forwarderId: string, input: UpdateForwarderInput): Promise<Forwarder>;
|
|
2800
|
+
delete(forwarderId: string): Promise<void>;
|
|
2801
|
+
}
|
|
2802
|
+
/** `mgmt.audit.*` — management surface for the audit service. */
|
|
2803
|
+
declare class ManagementAuditClient {
|
|
2804
|
+
/** SIEM forwarder CRUD. */
|
|
2805
|
+
readonly forwarders: ForwardersClient;
|
|
2806
|
+
/** @internal */
|
|
2807
|
+
constructor(http: AuditHttp);
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2634
2810
|
type AppHttp = ReturnType<typeof createClient<___generated_app_d_ts.paths>>;
|
|
2635
2811
|
type ConfigHttp = ReturnType<typeof createClient<___generated_config_d_ts.paths>>;
|
|
2636
2812
|
type FlagsHttp = ReturnType<typeof createClient<___generated_flags_d_ts.paths>>;
|
|
@@ -2786,6 +2962,8 @@ declare class SmplManagementClient {
|
|
|
2786
2962
|
readonly loggers: LoggersClient;
|
|
2787
2963
|
/** Log group CRUD. */
|
|
2788
2964
|
readonly logGroups: LogGroupsClient;
|
|
2965
|
+
/** Audit SIEM forwarder CRUD. */
|
|
2966
|
+
readonly audit: ManagementAuditClient;
|
|
2789
2967
|
/** @internal — shared HTTP transports (so SmplClient can alias them). */
|
|
2790
2968
|
readonly _appHttp: AppHttp;
|
|
2791
2969
|
/** @internal */
|
|
@@ -2803,6 +2981,7 @@ declare class SmplManagementClient {
|
|
|
2803
2981
|
private _flagsRef;
|
|
2804
2982
|
private _loggersRef;
|
|
2805
2983
|
private _logGroupsRef;
|
|
2984
|
+
private _auditRef;
|
|
2806
2985
|
private _appHttpRef;
|
|
2807
2986
|
private _configHttpRef;
|
|
2808
2987
|
private _flagsHttpRef;
|
|
@@ -3346,8 +3525,12 @@ declare class SmplConflictError extends SmplError {
|
|
|
3346
3525
|
declare class SmplValidationError extends SmplError {
|
|
3347
3526
|
constructor(message: string, statusCode?: number, responseBody?: string, errors?: ApiErrorDetail[]);
|
|
3348
3527
|
}
|
|
3528
|
+
/** Raised when the server requires a higher plan tier (HTTP 402). */
|
|
3529
|
+
declare class SmplPaymentRequiredError extends SmplError {
|
|
3530
|
+
constructor(message: string, statusCode?: number, responseBody?: string, errors?: ApiErrorDetail[]);
|
|
3531
|
+
}
|
|
3349
3532
|
|
|
3350
3533
|
/** @deprecated Use {@link ApiErrorDetail}. */
|
|
3351
3534
|
type ApiErrorObject = ApiErrorDetail;
|
|
3352
3535
|
|
|
3353
|
-
export { AccountSettings, AccountSettingsClient, type ApiErrorDetail, type ApiErrorObject, AuditClient, type AuditEvent, type ListEventsPage as AuditEventListPage, type ListEventsParams as AuditEventListParams, BooleanFlag, Color, Config, ConfigChangeEvent, ConfigClient, ConfigEnvironment, ConfigItem, Context, ContextType, ContextTypesClient, ContextsClient, type CreateEventInput as CreateAuditEventInput, Environment, EnvironmentClassification, EnvironmentsClient, Flag, FlagChangeEvent, FlagDeclaration, FlagEnvironment, FlagRule, FlagStats, FlagValue, FlagsClient, ItemType, JsonFlag, LiveConfigProxy, LogGroup, LogLevel, Logger, LoggerChangeEvent, LoggerEnvironment, LoggerSource, type LoggingAdapter, LoggingClient, NumberFlag, Op, PinoAdapter, type PinoAdapterConfig, Rule, SharedWebSocket, SmplClient, type SmplClientOptions, SmplConflictError, SmplConnectionError, SmplError, SmplManagementClient, type SmplManagementClientOptions, SmplNotFoundError, SmplTimeoutError, SmplValidationError, SmplConflictError as SmplkitConflictError, SmplConnectionError as SmplkitConnectionError, SmplError as SmplkitError, SmplNotFoundError as SmplkitNotFoundError, SmplTimeoutError as SmplkitTimeoutError, SmplValidationError as SmplkitValidationError, StringFlag, WinstonAdapter, type WinstonAdapterConfig };
|
|
3536
|
+
export { AccountSettings, AccountSettingsClient, type ApiErrorDetail, type ApiErrorObject, type Action as AuditAction, type ActionListPage as AuditActionListPage, AuditClient, type AuditEvent, type ListEventsPage as AuditEventListPage, type ListEventsParams as AuditEventListParams, ForwardersClient as AuditForwardersClient, type ListActionsParams as AuditListActionsParams, type ListResourceTypesParams as AuditListResourceTypesParams, type ResourceType as AuditResourceType, type ListResourceTypesPage as AuditResourceTypeListPage, BooleanFlag, Color, Config, ConfigChangeEvent, ConfigClient, ConfigEnvironment, ConfigItem, Context, ContextType, ContextTypesClient, ContextsClient, type CreateEventInput as CreateAuditEventInput, Environment, EnvironmentClassification, EnvironmentsClient, Flag, FlagChangeEvent, FlagDeclaration, FlagEnvironment, FlagRule, FlagStats, FlagValue, FlagsClient, ItemType, JsonFlag, LiveConfigProxy, LogGroup, LogLevel, Logger, LoggerChangeEvent, LoggerEnvironment, LoggerSource, type LoggingAdapter, LoggingClient, ManagementAuditClient, NumberFlag, Op, PinoAdapter, type PinoAdapterConfig, Rule, SharedWebSocket, SmplClient, type SmplClientOptions, SmplConflictError, SmplConnectionError, SmplError, SmplManagementClient, type SmplManagementClientOptions, SmplNotFoundError, SmplPaymentRequiredError, SmplTimeoutError, SmplValidationError, SmplConflictError as SmplkitConflictError, SmplConnectionError as SmplkitConnectionError, SmplError as SmplkitError, SmplNotFoundError as SmplkitNotFoundError, SmplPaymentRequiredError as SmplkitPaymentRequiredError, SmplTimeoutError as SmplkitTimeoutError, SmplValidationError as SmplkitValidationError, StringFlag, WinstonAdapter, type WinstonAdapterConfig };
|