@sylphx/sdk 0.31.0 → 0.32.1

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.
Files changed (120) hide show
  1. package/README.md +131 -4
  2. package/dist/access.d.ts +146 -17
  3. package/dist/access.js +114 -8
  4. package/dist/access.js.map +1 -1
  5. package/dist/agents.d.ts +1564 -0
  6. package/dist/agents.js +1096 -0
  7. package/dist/agents.js.map +1 -0
  8. package/dist/ai.d.ts +1 -2
  9. package/dist/ai.js +2 -3
  10. package/dist/ai.js.map +1 -1
  11. package/dist/artifacts.d.ts +1 -1
  12. package/dist/artifacts.js +2 -2
  13. package/dist/assets.d.ts +447 -0
  14. package/dist/assets.js +266 -0
  15. package/dist/assets.js.map +1 -0
  16. package/dist/auth/client.d.ts +239 -0
  17. package/dist/auth/client.js +337 -0
  18. package/dist/auth/client.js.map +1 -0
  19. package/dist/auth/end-user-keys-mock.d.ts +83 -0
  20. package/dist/auth/end-user-keys-mock.js +427 -0
  21. package/dist/auth/end-user-keys-mock.js.map +1 -0
  22. package/dist/auth/end-user-keys.d.ts +219 -0
  23. package/dist/auth/end-user-keys.js +240 -0
  24. package/dist/auth/end-user-keys.js.map +1 -0
  25. package/dist/auth/verify.d.ts +38 -3
  26. package/dist/auth/verify.js +58 -8
  27. package/dist/auth/verify.js.map +1 -1
  28. package/dist/auth.d.ts +656 -9
  29. package/dist/auth.js +563 -6
  30. package/dist/auth.js.map +1 -1
  31. package/dist/billing.d.ts +99 -21
  32. package/dist/billing.js +43 -5
  33. package/dist/billing.js.map +1 -1
  34. package/dist/broker.d.ts +5 -4
  35. package/dist/broker.js +3 -3
  36. package/dist/broker.js.map +1 -1
  37. package/dist/build.d.ts +362 -29
  38. package/dist/build.js +302 -10
  39. package/dist/build.js.map +1 -1
  40. package/dist/common.d.ts +1 -1
  41. package/dist/common.js +1 -1
  42. package/dist/config/flags.d.ts +140 -0
  43. package/dist/config/flags.js +462 -0
  44. package/dist/config/flags.js.map +1 -0
  45. package/dist/config.d.ts +380 -15
  46. package/dist/config.js +283 -5
  47. package/dist/config.js.map +1 -1
  48. package/dist/connections.d.ts +6 -6
  49. package/dist/connections.js +3 -3
  50. package/dist/data.d.ts +612 -7
  51. package/dist/data.js +566 -4
  52. package/dist/data.js.map +1 -1
  53. package/dist/entitlement.d.ts +10 -8
  54. package/dist/entitlement.js +3 -4
  55. package/dist/entitlement.js.map +1 -1
  56. package/dist/events/realtime.d.ts +69 -0
  57. package/dist/events/realtime.js +107 -0
  58. package/dist/events/realtime.js.map +1 -0
  59. package/dist/events/webhooks.d.ts +40 -0
  60. package/dist/events/webhooks.js +110 -0
  61. package/dist/events/webhooks.js.map +1 -0
  62. package/dist/events.d.ts +369 -22
  63. package/dist/events.js +311 -8
  64. package/dist/events.js.map +1 -1
  65. package/dist/flags.d.ts +18 -0
  66. package/dist/flags.js +44 -0
  67. package/dist/flags.js.map +1 -0
  68. package/dist/hosting.d.ts +13 -14
  69. package/dist/hosting.js +3 -4
  70. package/dist/hosting.js.map +1 -1
  71. package/dist/ids.d.ts +987 -0
  72. package/dist/ids.js +317 -0
  73. package/dist/ids.js.map +1 -0
  74. package/dist/index.d.ts +25 -1
  75. package/dist/index.js +34 -2
  76. package/dist/index.js.map +1 -1
  77. package/dist/keys.d.ts +2 -2
  78. package/dist/keys.js +3 -3
  79. package/dist/knowledge.d.ts +1192 -0
  80. package/dist/knowledge.js +1002 -0
  81. package/dist/knowledge.js.map +1 -0
  82. package/dist/localization.d.ts +663 -0
  83. package/dist/localization.js +491 -0
  84. package/dist/localization.js.map +1 -0
  85. package/dist/methods.js +3251 -133
  86. package/dist/methods.js.map +1 -1
  87. package/dist/money.d.ts +3086 -0
  88. package/dist/money.js +2358 -0
  89. package/dist/money.js.map +1 -0
  90. package/dist/network.d.ts +4 -5
  91. package/dist/network.js +3 -4
  92. package/dist/network.js.map +1 -1
  93. package/dist/notify.d.ts +667 -125
  94. package/dist/notify.js +471 -73
  95. package/dist/notify.js.map +1 -1
  96. package/dist/observability.d.ts +322 -7
  97. package/dist/observability.js +244 -8
  98. package/dist/observability.js.map +1 -1
  99. package/dist/realtime.d.ts +404 -0
  100. package/dist/realtime.js +312 -0
  101. package/dist/realtime.js.map +1 -0
  102. package/dist/release.d.ts +14 -15
  103. package/dist/release.js +3 -4
  104. package/dist/release.js.map +1 -1
  105. package/dist/runners.d.ts +2 -3
  106. package/dist/runners.js +3 -4
  107. package/dist/runners.js.map +1 -1
  108. package/dist/runtime.d.ts +5 -1
  109. package/dist/runtime.js +7 -3
  110. package/dist/runtime.js.map +1 -1
  111. package/dist/sandboxes.d.ts +64 -20
  112. package/dist/sandboxes.js +9 -4
  113. package/dist/sandboxes.js.map +1 -1
  114. package/dist/secrets.d.ts +342 -6
  115. package/dist/secrets.js +271 -4
  116. package/dist/secrets.js.map +1 -1
  117. package/dist/workflows.d.ts +969 -15
  118. package/dist/workflows.js +815 -6
  119. package/dist/workflows.js.map +1 -1
  120. package/package.json +2 -2
package/dist/config.d.ts CHANGED
@@ -1,6 +1,33 @@
1
1
  import * as runtime from './runtime.js';
2
2
  import './common.js';
3
3
  import type * as common from './common.js';
4
+ /**
5
+ * A ConfigChange is one committed change to a flag or segment of an
6
+ * environment: the audit trail, kept after the flag or segment is deleted.
7
+ */
8
+ export interface ConfigChange {
9
+ /**
10
+ * `orgs/{org}/projects/{project}/envs/{env}/config_changes/{config_change}`;
11
+ * ids sort in commit order.
12
+ */
13
+ name?: string;
14
+ /** `chg_<cell><ulid>`. */
15
+ readonly uid?: string;
16
+ /** Resource metadata; `create_time` is when the change committed. */
17
+ readonly meta?: common.ResourceMeta;
18
+ /** The flag or segment changed. */
19
+ readonly target?: string;
20
+ /** What happened to it. */
21
+ readonly action?: ConfigChangeAction;
22
+ /** The target's generation after the change. */
23
+ readonly targetGeneration?: string;
24
+ /** The target's spec after the change, as JSON; empty for a delete. */
25
+ readonly spec?: Record<string, unknown>;
26
+ /** Who made it: `key:<key id>`, or `user:<id>` from the console. */
27
+ readonly principal?: string;
28
+ /** The request that made it (`Sylphx-Request-Id`). */
29
+ readonly originRequestId?: string;
30
+ }
4
31
  /**
5
32
  * A ConfigFlag is one typed configuration value or feature flag of an
6
33
  * environment: a default, targeting rules, and percentage rollouts.
@@ -20,6 +47,20 @@ export interface ConfigFlag {
20
47
  /** Observed state. */
21
48
  readonly status?: ConfigFlagStatus;
22
49
  }
50
+ /** ConfigFlagEvaluation is one flag's value for one context. */
51
+ export interface ConfigFlagEvaluation {
52
+ /** The flag's id. */
53
+ configFlag?: string;
54
+ /** The value; null when the flag does not exist. */
55
+ value?: unknown;
56
+ /** Why this value. */
57
+ reason?: EvaluationReason;
58
+ /**
59
+ * The index in `spec.rules` of the rule that matched, for TARGETING_MATCH
60
+ * and SPLIT.
61
+ */
62
+ ruleIndex?: number;
63
+ }
23
64
  /** ConfigFlagSpec is the caller-writable state of a ConfigFlag. */
24
65
  export interface ConfigFlagSpec {
25
66
  /** The type every value of the flag has. */
@@ -35,6 +76,12 @@ export interface ConfigFlagSpec {
35
76
  rules?: TargetingRule[];
36
77
  /** What the flag is for. */
37
78
  description?: string;
79
+ /**
80
+ * Publishable keys (browsers, mobile apps) may evaluate it with
81
+ * `config_flags:evaluate`; default false, so a server-only flag's value
82
+ * never reaches a device. Secret keys evaluate every flag.
83
+ */
84
+ clientVisible?: boolean;
38
85
  }
39
86
  /** ConfigFlagStatus is the observed state of a ConfigFlag. */
40
87
  export interface ConfigFlagStatus {
@@ -49,11 +96,53 @@ export interface ConfigFlagStatus {
49
96
  readonly wave?: number;
50
97
  /** How many waves the change takes. */
51
98
  readonly waveCount?: number;
52
- /** How many Cells serve the current generation. */
99
+ /** How many cells serve the current generation. */
53
100
  readonly updatedCellCount?: number;
54
- /** How many Cells the environment spans. */
101
+ /** How many cells the environment spans. */
55
102
  readonly cellCount?: number;
56
103
  }
104
+ /**
105
+ * A ConfigSegment is a reusable audience of an environment: subjects listed
106
+ * by id, and conditions over the evaluation context. Flag rules refer to it
107
+ * with IN_SEGMENT, so one change to the audience reaches every flag.
108
+ */
109
+ export interface ConfigSegment {
110
+ /**
111
+ * `orgs/{org}/projects/{project}/envs/{env}/config_segments/{config_segment}`;
112
+ * the id is what IN_SEGMENT names.
113
+ */
114
+ name?: string;
115
+ /** `seg_<cell><ulid>`. */
116
+ readonly uid?: string;
117
+ /** Resource metadata. */
118
+ meta?: common.ResourceMeta;
119
+ /** Desired state. */
120
+ spec?: ConfigSegmentSpec;
121
+ /** Observed state. */
122
+ readonly status?: ConfigSegmentStatus;
123
+ }
124
+ /**
125
+ * ConfigSegmentSpec is who is in a segment: `excluded` never; `included`
126
+ * always; otherwise an evaluation whose conditions all hold. A segment
127
+ * without conditions holds only its `included` subjects.
128
+ */
129
+ export interface ConfigSegmentSpec {
130
+ /** Subjects always in the segment, by `user_id` or `anonymous_id`. */
131
+ included?: string[];
132
+ /** Subjects never in the segment, whatever else holds. */
133
+ excluded?: string[];
134
+ /** Conditions over the evaluation context; all must hold. */
135
+ conditions?: TargetingCondition[];
136
+ /** Who the segment is. */
137
+ description?: string;
138
+ }
139
+ /** ConfigSegmentStatus is the observed state of a ConfigSegment. */
140
+ export interface ConfigSegmentStatus {
141
+ /** The generation this status was computed from. */
142
+ readonly observedGeneration?: string;
143
+ /** Ready. */
144
+ readonly conditions?: common.Condition[];
145
+ }
57
146
  /** The request of CreateConfigFlag. */
58
147
  export interface CreateConfigFlagRequest {
59
148
  /** The environment to create in. */
@@ -68,6 +157,17 @@ export interface CreateConfigFlagRequest {
68
157
  /** Validate and return the result without writing anything. */
69
158
  validateOnly?: boolean;
70
159
  }
160
+ /** The request of CreateConfigSegment. */
161
+ export interface CreateConfigSegmentRequest {
162
+ /** The environment to create in. */
163
+ parent: string;
164
+ /** The config segment to create; only spec is read. */
165
+ configSegment: ConfigSegment;
166
+ /** The id of the new config segment, what IN_SEGMENT names. */
167
+ configSegmentId: string;
168
+ /** Validate and return the result without writing anything. */
169
+ validateOnly?: boolean;
170
+ }
71
171
  /** The request of DeleteConfigFlag. */
72
172
  export interface DeleteConfigFlagRequest {
73
173
  /** The name of the config flag to delete. */
@@ -77,11 +177,80 @@ export interface DeleteConfigFlagRequest {
77
177
  /** Validate without deleting anything. */
78
178
  validateOnly?: boolean;
79
179
  }
180
+ /** The request of DeleteConfigSegment. */
181
+ export interface DeleteConfigSegmentRequest {
182
+ /** The name of the config segment to delete. */
183
+ name: string;
184
+ /** Delete only if the current etag matches. */
185
+ etag?: string;
186
+ /** Validate without deleting anything. */
187
+ validateOnly?: boolean;
188
+ }
189
+ /** The request of EvaluateConfigFlags. */
190
+ export interface EvaluateConfigFlagsRequest {
191
+ /** The environment whose flags are evaluated. */
192
+ parent: string;
193
+ /** Who and what the evaluation is for. */
194
+ context?: EvaluationContext;
195
+ /**
196
+ * The ids of the flags to evaluate; empty evaluates every flag of the
197
+ * environment. An unknown id answers reason NOT_FOUND.
198
+ */
199
+ configFlags?: string[];
200
+ }
201
+ /** The response of EvaluateConfigFlags. */
202
+ export interface EvaluateConfigFlagsResponse {
203
+ /** One per requested flag, or per flag of the environment, by id. */
204
+ evaluations?: ConfigFlagEvaluation[];
205
+ }
206
+ /** EvaluationContext is what targeting rules and percentages read. */
207
+ export interface EvaluationContext {
208
+ /** The signed-in user; the default bucketing subject. */
209
+ userId?: string;
210
+ /**
211
+ * A stable id of a device or visitor; the bucketing subject when there is
212
+ * no `user_id`.
213
+ */
214
+ anonymousId?: string;
215
+ /**
216
+ * Anything else rules compare, for example `plan`, `country`,
217
+ * `app_version`.
218
+ */
219
+ attributes?: Record<string, unknown>;
220
+ }
221
+ /** The request of GetConfigChange. */
222
+ export interface GetConfigChangeRequest {
223
+ /** The name of the config change to get. */
224
+ name: string;
225
+ }
80
226
  /** The request of GetConfigFlag. */
81
227
  export interface GetConfigFlagRequest {
82
228
  /** The name of the config flag to get. */
83
229
  name: string;
84
230
  }
231
+ /** The request of GetConfigSegment. */
232
+ export interface GetConfigSegmentRequest {
233
+ /** The name of the config segment to get. */
234
+ name: string;
235
+ }
236
+ /** The request of ListConfigChanges. */
237
+ export interface ListConfigChangesRequest {
238
+ /** The environment to list in. */
239
+ parent: string;
240
+ /** At most this many; default 50, clamped to 1000. */
241
+ pageSize?: number;
242
+ /** `next_page_token` of the previous page. */
243
+ pageToken?: string;
244
+ /** AIP-160 filter; `target = "<flag or segment name>"` is supported. */
245
+ filter?: string;
246
+ }
247
+ /** The response of ListConfigChanges, newest first. */
248
+ export interface ListConfigChangesResponse {
249
+ /** The page. */
250
+ configChanges?: ConfigChange[];
251
+ /** The token of the next page; empty on the last page. */
252
+ nextPageToken?: string;
253
+ }
85
254
  /** The request of ListConfigFlags. */
86
255
  export interface ListConfigFlagsRequest {
87
256
  /** The environment to list in. */
@@ -102,30 +271,109 @@ export interface ListConfigFlagsResponse {
102
271
  /** The token of the next page; empty on the last page. */
103
272
  nextPageToken?: string;
104
273
  }
274
+ /** The request of ListConfigSegments. */
275
+ export interface ListConfigSegmentsRequest {
276
+ /** The environment to list in. */
277
+ parent: string;
278
+ /** At most this many; default 50, clamped to 1000. */
279
+ pageSize?: number;
280
+ /** `next_page_token` of the previous page. */
281
+ pageToken?: string;
282
+ }
283
+ /** The response of ListConfigSegments. */
284
+ export interface ListConfigSegmentsResponse {
285
+ /** The page. */
286
+ configSegments?: ConfigSegment[];
287
+ /** The token of the next page; empty on the last page. */
288
+ nextPageToken?: string;
289
+ }
290
+ /** The request of SnapshotConfigFlags. */
291
+ export interface SnapshotConfigFlagsRequest {
292
+ /** The environment. */
293
+ parent: string;
294
+ /**
295
+ * The `etag` of the snapshot the caller holds; unchanged answers
296
+ * `not_modified`.
297
+ */
298
+ ifNoneMatch?: string;
299
+ }
105
300
  /**
106
- * TargetingRule serves a value to evaluations that match a condition, to a
107
- * stable percentage of them.
301
+ * The response of SnapshotConfigFlags: an environment's whole ruleset, what
302
+ * a local evaluator needs, at one version.
108
303
  */
109
- export interface TargetingRule {
304
+ export interface SnapshotConfigFlagsResponse {
305
+ /** The version of this ruleset; changes with any flag or segment. */
306
+ etag?: string;
307
+ /**
308
+ * True when `if_none_match` is this ruleset's etag; nothing else is set
309
+ * then.
310
+ */
311
+ notModified?: boolean;
312
+ /** Every flag of the environment. */
313
+ configFlags?: ConfigFlag[];
314
+ /** Every segment of the environment. */
315
+ configSegments?: ConfigSegment[];
316
+ /** How long the caller waits before polling again. */
317
+ pollInterval?: string;
318
+ }
319
+ /**
320
+ * TargetingCondition compares one attribute of the evaluation context with a
321
+ * value. The public contract is structured rather than an expression
322
+ * language (CEL): every SDK evaluates rules locally, and a small table of
323
+ * operators is the same in Rust, TypeScript and any later SDK without an
324
+ * expression runtime in each; a write is checked field by field against the
325
+ * schema; a console and an agent edit fields, not source text; and
326
+ * evaluation cost is bounded by the rule's size, with no program to run.
327
+ * The operators are the ones customers already used.
328
+ */
329
+ export interface TargetingCondition {
330
+ /**
331
+ * `user_id`, `anonymous_id`, or a path into the context's `attributes`,
332
+ * dot-separated (`plan`, `device.os`). Required, except with IN_SEGMENT and
333
+ * NOT_IN_SEGMENT.
334
+ */
335
+ attribute?: string;
336
+ /** The comparison. */
337
+ operator?: ConditionOperator;
110
338
  /**
111
- * A CEL expression over the evaluation context, for example
112
- * `ctx.region == "hk" && ctx.plan == "pro"`.
339
+ * The value compared with; a list for IN and NOT_IN, a string for the
340
+ * string, regular expression and semantic version operators.
113
341
  */
114
- condition?: string;
342
+ value?: unknown;
343
+ }
344
+ /**
345
+ * TargetingRule serves a value to evaluations that match its conditions, to
346
+ * a stable percentage of them.
347
+ *
348
+ * Percentages use one bucket per flag and evaluation subject: bucket =
349
+ * FNV-1a 32-bit of the UTF-8 string `{config_flag}:{subject}`, mod 100,
350
+ * where `{config_flag}` is the flag's id and `{subject}` the value of
351
+ * `bucket_attribute`. A rule matches when bucket < percentage. The bucket
352
+ * does not depend on the rule, so rules on the same attribute split
353
+ * cumulatively: 30/30/40 across three values is three rules at 30, 60 and
354
+ * 100, and a subject keeps its bucket when the percentage grows.
355
+ */
356
+ export interface TargetingRule {
115
357
  /** The value served when the rule matches; of the flag's type. */
116
358
  value?: unknown;
117
359
  /**
118
- * The share of matching evaluations served `value`, from 0 to 100;
360
+ * Serve `value` to evaluations whose bucket is below this, from 0 to 100;
119
361
  * default 100. The rest fall through to the next rule.
120
362
  */
121
363
  percentage?: number;
122
364
  /**
123
- * The context attribute hashed to pick the stable percentage, for example
124
- * `user_id`; default the evaluation's subject.
365
+ * The context attribute hashed for the bucket: `user_id`, `anonymous_id`,
366
+ * or an attribute path; default `user_id`, else `anonymous_id`. An
367
+ * evaluation without it never matches a rule below 100 percent.
125
368
  */
126
369
  bucketAttribute?: string;
127
370
  /** What the rule is for. */
128
371
  description?: string;
372
+ /**
373
+ * Conditions over the evaluation context; all must hold. None matches
374
+ * every evaluation.
375
+ */
376
+ conditions?: TargetingCondition[];
129
377
  }
130
378
  /** The request of UpdateConfigFlag. */
131
379
  export interface UpdateConfigFlagRequest {
@@ -136,17 +384,42 @@ export interface UpdateConfigFlagRequest {
136
384
  /** Validate and return the result without writing anything. */
137
385
  validateOnly?: boolean;
138
386
  }
387
+ /** The request of UpdateConfigSegment. */
388
+ export interface UpdateConfigSegmentRequest {
389
+ /** The config segment to update; `name` identifies it. */
390
+ configSegment: ConfigSegment;
391
+ /** The fields to write; unset writes every populated field. */
392
+ updateMask?: string;
393
+ /** Validate and return the result without writing anything. */
394
+ validateOnly?: boolean;
395
+ }
396
+ /**
397
+ * ConditionOperator is how a TargetingCondition compares. A missing
398
+ * attribute matches only NOT_CONTAINS, NOT_IN and NOT_IN_SEGMENT.
399
+ */
400
+ export type ConditionOperator = 'equals' | 'not_equals' | 'greater_than' | 'greater_or_equal' | 'less_than' | 'less_or_equal' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'matches' | 'semver_greater_than' | 'semver_greater_or_equal' | 'semver_less_than' | 'semver_less_or_equal' | 'in_segment' | 'not_in_segment' | (string & {});
401
+ /** ConfigChangeAction is what a ConfigChange did. */
402
+ export type ConfigChangeAction = 'create' | 'update' | 'delete' | (string & {});
139
403
  /** ConfigValueType is the type of a ConfigFlag's values. */
140
404
  export type ConfigValueType = 'bool' | 'string' | 'int64' | 'double' | 'json' | (string & {});
141
405
  /**
142
- * ConfigService is Kernel Config: dynamic configuration and feature flags
143
- * evaluated in the Cell from the Cell Snapshot.
406
+ * EvaluationReason is why an evaluation answered its value (OpenFeature's
407
+ * reasons).
408
+ */
409
+ export type EvaluationReason = 'targeting_match' | 'split' | 'default' | 'disabled' | 'not_found' | (string & {});
410
+ /**
411
+ * ConfigService is Sylphx Config: dynamic configuration and feature flags
412
+ * evaluated in each cell from that cell's snapshot.
144
413
  *
145
414
  * Namespace of Sylphx Config on `Sylphx`.
146
415
  */
147
416
  export declare class ConfigApi {
148
417
  /** The `config_flags` collection. */
149
418
  readonly configFlags: ConfigFlagsCollection;
419
+ /** The `config_segments` collection. */
420
+ readonly configSegments: ConfigSegmentsCollection;
421
+ /** The `config_changes` collection. */
422
+ readonly configChanges: ConfigChangesCollection;
150
423
  constructor(client: runtime.Client);
151
424
  }
152
425
  /** `config_flags` of Sylphx Config: Resource type `config.sylphx.com/ConfigFlag`. */
@@ -172,7 +445,7 @@ export declare class ConfigFlagsCollection {
172
445
  /** Every item of every page of `list`. */
173
446
  listAll(request: ListConfigFlagsRequest): AsyncGenerator<ConfigFlag>;
174
447
  /**
175
- * Creates a config flag; the Operation is done when every Cell serves it.
448
+ * Creates a config flag; the Operation is done when every cell serves it.
176
449
  *
177
450
  * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/config_flags` · permission `config:write` · effect `write`
178
451
  *
@@ -180,7 +453,8 @@ export declare class ConfigFlagsCollection {
180
453
  */
181
454
  create(request: CreateConfigFlagRequest): Promise<runtime.Operation<ConfigFlag>>;
182
455
  /**
183
- * Updates a config flag; the change rolls out in waves and the Operation is done when every Cell serves it.
456
+ * Updates a config flag; the change rolls out in waves and the Operation is
457
+ * done when every cell serves it.
184
458
  *
185
459
  * `PATCH /v1/{config_flag.name=orgs/*\/projects/*\/envs/*\/config_flags/*}` · permission `config:write` · effect `write`
186
460
  *
@@ -195,4 +469,95 @@ export declare class ConfigFlagsCollection {
195
469
  * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
196
470
  */
197
471
  delete(request: DeleteConfigFlagRequest): Promise<runtime.Operation<Record<string, never>>>;
472
+ /**
473
+ * Evaluates config flags of an environment for one evaluation context:
474
+ * each flag's value, and why. Browsers and mobile apps call it with a
475
+ * publishable key holding `config:evaluate`, which reads values, never
476
+ * rules.
477
+ *
478
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/config_flags:evaluate` · permission `config:evaluate` · effect `read`
479
+ *
480
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
481
+ */
482
+ evaluate(request: EvaluateConfigFlagsRequest): Promise<EvaluateConfigFlagsResponse>;
483
+ /**
484
+ * The environment's flags and segments in one read, for SDKs that
485
+ * evaluate locally. Poll it with `if_none_match` set to the last `etag`:
486
+ * an unchanged ruleset answers `not_modified` and nothing else.
487
+ *
488
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/config_flags:snapshot` · permission `config:read` · effect `read`
489
+ *
490
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`.
491
+ */
492
+ snapshot(request: SnapshotConfigFlagsRequest): Promise<SnapshotConfigFlagsResponse>;
493
+ }
494
+ /** `config_segments` of Sylphx Config: Resource type `config.sylphx.com/ConfigSegment`. */
495
+ export declare class ConfigSegmentsCollection {
496
+ private readonly client;
497
+ constructor(client: runtime.Client);
498
+ /**
499
+ * Gets a config segment.
500
+ *
501
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/config_segments/*}` · permission `config:read` · effect `read`
502
+ *
503
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
504
+ */
505
+ get(request: GetConfigSegmentRequest): Promise<ConfigSegment>;
506
+ /**
507
+ * Lists config segments in an environment.
508
+ *
509
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/config_segments` · permission `config:read` · effect `read`
510
+ *
511
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
512
+ */
513
+ list(request: ListConfigSegmentsRequest): Promise<ListConfigSegmentsResponse>;
514
+ /** Every item of every page of `list`. */
515
+ listAll(request: ListConfigSegmentsRequest): AsyncGenerator<ConfigSegment>;
516
+ /**
517
+ * Creates a config segment.
518
+ *
519
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/config_segments` · permission `config:write` · effect `write`
520
+ *
521
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
522
+ */
523
+ create(request: CreateConfigSegmentRequest): Promise<runtime.Operation<ConfigSegment>>;
524
+ /**
525
+ * Updates a config segment; every flag naming it follows.
526
+ *
527
+ * `PATCH /v1/{config_segment.name=orgs/*\/projects/*\/envs/*\/config_segments/*}` · permission `config:write` · effect `write`
528
+ *
529
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
530
+ */
531
+ update(request: UpdateConfigSegmentRequest): Promise<runtime.Operation<ConfigSegment>>;
532
+ /**
533
+ * Deletes a config segment; refused while a flag names it.
534
+ *
535
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/config_segments/*}` · permission `config:write` · effect `destructive`
536
+ *
537
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
538
+ */
539
+ delete(request: DeleteConfigSegmentRequest): Promise<runtime.Operation<Record<string, never>>>;
540
+ }
541
+ /** `config_changes` of Sylphx Config: Resource type `config.sylphx.com/ConfigChange`. */
542
+ export declare class ConfigChangesCollection {
543
+ private readonly client;
544
+ constructor(client: runtime.Client);
545
+ /**
546
+ * Gets a config change.
547
+ *
548
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/config_changes/*}` · permission `config:read` · effect `read`
549
+ *
550
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
551
+ */
552
+ get(request: GetConfigChangeRequest): Promise<ConfigChange>;
553
+ /**
554
+ * Lists config changes in an environment.
555
+ *
556
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/config_changes` · permission `config:read` · effect `read`
557
+ *
558
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
559
+ */
560
+ list(request: ListConfigChangesRequest): Promise<ListConfigChangesResponse>;
561
+ /** Every item of every page of `list`. */
562
+ listAll(request: ListConfigChangesRequest): AsyncGenerator<ConfigChange>;
198
563
  }