@productcraft/flags 0.5.0 → 0.6.0

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 (48) hide show
  1. package/README.md +16 -13
  2. package/api.md +572 -4
  3. package/dist/browser/{chunk-OOX7EUCT.js → chunk-OUAC4WID.js} +584 -8
  4. package/dist/browser/chunk-OUAC4WID.js.map +1 -0
  5. package/dist/{chunk-RJIVAOBG.cjs → browser/chunk-UYL3NMDA.cjs} +584 -8
  6. package/dist/browser/chunk-UYL3NMDA.cjs.map +1 -0
  7. package/dist/browser/index.cjs +4 -4
  8. package/dist/browser/index.cjs.map +1 -1
  9. package/dist/browser/index.js +2 -2
  10. package/dist/browser/index.js.map +1 -1
  11. package/dist/browser/management.cjs +2 -2
  12. package/dist/browser/management.js +1 -1
  13. package/dist/browser/testing.cjs +845 -0
  14. package/dist/browser/testing.cjs.map +1 -1
  15. package/dist/browser/testing.js +845 -0
  16. package/dist/browser/testing.js.map +1 -1
  17. package/dist/{browser/chunk-XZK57G7L.cjs → chunk-5SDZWOUP.cjs} +584 -8
  18. package/dist/chunk-5SDZWOUP.cjs.map +1 -0
  19. package/dist/{chunk-CGVDMKEE.js → chunk-7BOM23MI.js} +3 -3
  20. package/dist/{chunk-CGVDMKEE.js.map → chunk-7BOM23MI.js.map} +1 -1
  21. package/dist/{chunk-XNJ5OX4X.js → chunk-JGSMXA3G.js} +584 -8
  22. package/dist/chunk-JGSMXA3G.js.map +1 -0
  23. package/dist/{chunk-L3AOANTB.cjs → chunk-SHMDNO4G.cjs} +3 -3
  24. package/dist/{chunk-L3AOANTB.cjs.map → chunk-SHMDNO4G.cjs.map} +1 -1
  25. package/dist/{client-BWi7PASW.d.cts → client-DVKdRqhR.d.cts} +7751 -3218
  26. package/dist/{client-BWi7PASW.d.ts → client-DVKdRqhR.d.ts} +7751 -3218
  27. package/dist/index.cjs +9 -9
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +1 -1
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.js +3 -3
  32. package/dist/index.js.map +1 -1
  33. package/dist/management.cjs +2 -2
  34. package/dist/management.d.cts +1 -1
  35. package/dist/management.d.ts +1 -1
  36. package/dist/management.js +1 -1
  37. package/dist/testing.cjs +848 -3
  38. package/dist/testing.cjs.map +1 -1
  39. package/dist/testing.d.cts +2 -2
  40. package/dist/testing.d.ts +2 -2
  41. package/dist/testing.js +846 -1
  42. package/dist/testing.js.map +1 -1
  43. package/manifest.json +316 -1
  44. package/package.json +1 -1
  45. package/dist/browser/chunk-OOX7EUCT.js.map +0 -1
  46. package/dist/browser/chunk-XZK57G7L.cjs.map +0 -1
  47. package/dist/chunk-RJIVAOBG.cjs.map +0 -1
  48. package/dist/chunk-XNJ5OX4X.js.map +0 -1
package/dist/testing.js CHANGED
@@ -1,4 +1,4 @@
1
- import { FlagsClient, setOverride } from './chunk-CGVDMKEE.js';
1
+ import { FlagsClient, setOverride } from './chunk-7BOM23MI.js';
2
2
  export { signWebhook } from '@productcraft/core';
3
3
 
4
4
  var ROUTES = [
@@ -64,6 +64,99 @@ var ROUTES = [
64
64
  ],
65
65
  pagination: { next_cursor: null, has_more: false }
66
66
  } },
67
+ { op: "scheduledChanges.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/scheduled-changes$/, status: 200, contentType: "application/json", body: {
68
+ data: [
69
+ {
70
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
71
+ base_version: 7,
72
+ change_request_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
73
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
74
+ created_at: "2026-01-01T00:00:00.000Z",
75
+ created_by: {
76
+ client_id: null,
77
+ id: "pak_01HZX3",
78
+ is_agent: true,
79
+ label: "release-bot",
80
+ on_behalf_of_user_id: null,
81
+ type: "api_key"
82
+ },
83
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
84
+ environment_key: "production",
85
+ executed_at: "2026-01-01T00:00:00.000Z",
86
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
87
+ last_error: {
88
+ at: "2026-01-01T00:00:00.000Z",
89
+ code: "VERSION_CONFLICT",
90
+ message: "The value changed since the change was scheduled."
91
+ },
92
+ note: "Launch at 09:00",
93
+ operation: "patch",
94
+ payload: {},
95
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
96
+ run_at: "2026-01-01T00:00:00.000Z",
97
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
98
+ setting_key: "new_checkout",
99
+ status: "pending",
100
+ updated_at: "2026-01-01T00:00:00.000Z",
101
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
102
+ }
103
+ ],
104
+ pagination: { next_cursor: null, has_more: false }
105
+ } },
106
+ { op: "changeRequests.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/change-requests$/, status: 200, contentType: "application/json", body: {
107
+ data: [
108
+ {
109
+ after: {},
110
+ applied_at: "2026-01-01T00:00:00.000Z",
111
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
112
+ approvals: 0,
113
+ author: {
114
+ client_id: null,
115
+ id: "pak_01HZX3",
116
+ is_agent: true,
117
+ label: "release-bot",
118
+ on_behalf_of_user_id: null,
119
+ type: "api_key"
120
+ },
121
+ base_version: 7,
122
+ before: {},
123
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
124
+ created_at: "2026-01-01T00:00:00.000Z",
125
+ current_version: 7,
126
+ diff: [{ op: "add", path: "/rules/1/percentages/0/percentage", value: 25 }],
127
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
128
+ environment_key: "production",
129
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
130
+ kind: "value",
131
+ last_error: {
132
+ at: "2026-01-01T00:00:00.000Z",
133
+ code: "VERSION_CONFLICT",
134
+ message: "The value changed since the change was scheduled."
135
+ },
136
+ note: "Turn on for everyone",
137
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
138
+ required_approvals: 1,
139
+ reviews: [
140
+ {
141
+ created_at: "2026-01-01T00:00:00.000Z",
142
+ decision: "approved",
143
+ note: "Looks good",
144
+ reviewer_id: "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
145
+ reviewer_label: "ada@example.com"
146
+ }
147
+ ],
148
+ scheduled_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
149
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
150
+ setting_key: "new_checkout",
151
+ stale: false,
152
+ status: "pending",
153
+ summary: ["value false \u2192 true"],
154
+ updated_at: "2026-01-01T00:00:00.000Z",
155
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
156
+ }
157
+ ],
158
+ pagination: { next_cursor: null, has_more: false }
159
+ } },
67
160
  { op: "webhooks.events.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/events$/, status: 200, contentType: "application/json", body: {
68
161
  data: [
69
162
  {
@@ -108,6 +201,7 @@ var ROUTES = [
108
201
  description: "",
109
202
  environments: [
110
203
  {
204
+ approval_policy: "agents",
111
205
  color: "#c92a2a",
112
206
  created_at: "2026-01-01T00:00:00.000Z",
113
207
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
@@ -117,6 +211,7 @@ var ROUTES = [
117
211
  project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
118
212
  protected: true,
119
213
  require_note: false,
214
+ required_approvals: 1,
120
215
  updated_at: "2026-01-01T00:00:00.000Z",
121
216
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
122
217
  }
@@ -124,6 +219,8 @@ var ROUTES = [
124
219
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
125
220
  name: "Storefront",
126
221
  ordinal: 0,
222
+ stale_after_days: 30,
223
+ stale_digest: true,
127
224
  updated_at: "2026-01-01T00:00:00.000Z",
128
225
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
129
226
  } },
@@ -147,6 +244,7 @@ var ROUTES = [
147
244
  description: "",
148
245
  environments: [
149
246
  {
247
+ approval_policy: "agents",
150
248
  color: "#c92a2a",
151
249
  created_at: "2026-01-01T00:00:00.000Z",
152
250
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
@@ -156,6 +254,7 @@ var ROUTES = [
156
254
  project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
157
255
  protected: true,
158
256
  require_note: false,
257
+ required_approvals: 1,
159
258
  updated_at: "2026-01-01T00:00:00.000Z",
160
259
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
161
260
  }
@@ -163,6 +262,8 @@ var ROUTES = [
163
262
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
164
263
  name: "Storefront",
165
264
  ordinal: 0,
265
+ stale_after_days: 30,
266
+ stale_digest: true,
166
267
  updated_at: "2026-01-01T00:00:00.000Z",
167
268
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
168
269
  }
@@ -190,6 +291,7 @@ var ROUTES = [
190
291
  description: "",
191
292
  environments: [
192
293
  {
294
+ approval_policy: "agents",
193
295
  color: "#c92a2a",
194
296
  created_at: "2026-01-01T00:00:00.000Z",
195
297
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
@@ -199,6 +301,7 @@ var ROUTES = [
199
301
  project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
200
302
  protected: true,
201
303
  require_note: false,
304
+ required_approvals: 1,
202
305
  updated_at: "2026-01-01T00:00:00.000Z",
203
306
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
204
307
  }
@@ -206,6 +309,8 @@ var ROUTES = [
206
309
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
207
310
  name: "Storefront",
208
311
  ordinal: 0,
312
+ stale_after_days: 30,
313
+ stale_digest: true,
209
314
  updated_at: "2026-01-01T00:00:00.000Z",
210
315
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
211
316
  },
@@ -253,6 +358,43 @@ var ROUTES = [
253
358
  projects: 1
254
359
  }
255
360
  } },
361
+ { op: "ramps.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/ramps$/, status: 200, contentType: "application/json", body: {
362
+ data: [
363
+ {
364
+ change_request_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
365
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
366
+ created_at: "2026-01-01T00:00:00.000Z",
367
+ created_by: {
368
+ client_id: null,
369
+ id: "pak_01HZX3",
370
+ is_agent: true,
371
+ label: "release-bot",
372
+ on_behalf_of_user_id: null,
373
+ type: "api_key"
374
+ },
375
+ current_percentage: 25,
376
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
377
+ environment_key: "production",
378
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
379
+ last_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
380
+ last_error: {
381
+ at: "2026-01-01T00:00:00.000Z",
382
+ code: "VERSION_CONFLICT",
383
+ message: "The value changed since the change was scheduled."
384
+ },
385
+ note: "Ramp the new checkout",
386
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
387
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
388
+ setting_key: "new_checkout",
389
+ status: "active",
390
+ steps: [{ applied: false, at: "2026-01-01T00:00:00.000Z", percentage: 25 }],
391
+ updated_at: "2026-01-01T00:00:00.000Z",
392
+ value: true,
393
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
394
+ }
395
+ ],
396
+ pagination: { next_cursor: null, has_more: false }
397
+ } },
256
398
  { op: "stats.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/stats$/, status: 200, contentType: "application/json", body: {
257
399
  changes_last_week: 12,
258
400
  configs: 2,
@@ -296,6 +438,139 @@ var ROUTES = [
296
438
  updated_at: "2026-01-01T00:00:00.000Z",
297
439
  url: "https://api.acme.com/webhooks"
298
440
  } },
441
+ { op: "projects.staleFlags.sendDigest", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/projects\/[^\/]+\/stale-flags\/digest$/, status: 202, contentType: "application/json", body: { digests_queued: 2, stale_flags: 4 } },
442
+ { op: "changeRequests.schedule", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/change-requests\/[^\/]+\/schedule$/, status: 200, contentType: "application/json", body: {
443
+ after: {},
444
+ applied_at: "2026-01-01T00:00:00.000Z",
445
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
446
+ approvals: 0,
447
+ author: {
448
+ client_id: null,
449
+ id: "pak_01HZX3",
450
+ is_agent: true,
451
+ label: "release-bot",
452
+ on_behalf_of_user_id: null,
453
+ type: "api_key"
454
+ },
455
+ base_version: 7,
456
+ before: {},
457
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
458
+ created_at: "2026-01-01T00:00:00.000Z",
459
+ current_version: 7,
460
+ diff: [{ op: "add", path: "/rules/1/percentages/0/percentage", value: 25 }],
461
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
462
+ environment_key: "production",
463
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
464
+ kind: "value",
465
+ last_error: {
466
+ at: "2026-01-01T00:00:00.000Z",
467
+ code: "VERSION_CONFLICT",
468
+ message: "The value changed since the change was scheduled."
469
+ },
470
+ note: "Turn on for everyone",
471
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
472
+ required_approvals: 1,
473
+ reviews: [
474
+ {
475
+ created_at: "2026-01-01T00:00:00.000Z",
476
+ decision: "approved",
477
+ note: "Looks good",
478
+ reviewer_id: "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
479
+ reviewer_label: "ada@example.com"
480
+ }
481
+ ],
482
+ scheduled_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
483
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
484
+ setting_key: "new_checkout",
485
+ stale: false,
486
+ status: "pending",
487
+ summary: ["value false \u2192 true"],
488
+ updated_at: "2026-01-01T00:00:00.000Z",
489
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
490
+ } },
491
+ { op: "scheduledChanges.cancel", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/scheduled-changes\/[^\/]+\/cancel$/, status: 200, contentType: "application/json", body: {
492
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
493
+ base_version: 7,
494
+ change_request_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
495
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
496
+ created_at: "2026-01-01T00:00:00.000Z",
497
+ created_by: {
498
+ client_id: null,
499
+ id: "pak_01HZX3",
500
+ is_agent: true,
501
+ label: "release-bot",
502
+ on_behalf_of_user_id: null,
503
+ type: "api_key"
504
+ },
505
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
506
+ environment_key: "production",
507
+ executed_at: "2026-01-01T00:00:00.000Z",
508
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
509
+ last_error: {
510
+ at: "2026-01-01T00:00:00.000Z",
511
+ code: "VERSION_CONFLICT",
512
+ message: "The value changed since the change was scheduled."
513
+ },
514
+ note: "Launch at 09:00",
515
+ operation: "patch",
516
+ payload: {},
517
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
518
+ run_at: "2026-01-01T00:00:00.000Z",
519
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
520
+ setting_key: "new_checkout",
521
+ status: "pending",
522
+ updated_at: "2026-01-01T00:00:00.000Z",
523
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
524
+ } },
525
+ { op: "changeRequests.approve", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/change-requests\/[^\/]+\/approve$/, status: 200, contentType: "application/json", body: {
526
+ after: {},
527
+ applied_at: "2026-01-01T00:00:00.000Z",
528
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
529
+ approvals: 0,
530
+ author: {
531
+ client_id: null,
532
+ id: "pak_01HZX3",
533
+ is_agent: true,
534
+ label: "release-bot",
535
+ on_behalf_of_user_id: null,
536
+ type: "api_key"
537
+ },
538
+ base_version: 7,
539
+ before: {},
540
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
541
+ created_at: "2026-01-01T00:00:00.000Z",
542
+ current_version: 7,
543
+ diff: [{ op: "add", path: "/rules/1/percentages/0/percentage", value: 25 }],
544
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
545
+ environment_key: "production",
546
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
547
+ kind: "value",
548
+ last_error: {
549
+ at: "2026-01-01T00:00:00.000Z",
550
+ code: "VERSION_CONFLICT",
551
+ message: "The value changed since the change was scheduled."
552
+ },
553
+ note: "Turn on for everyone",
554
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
555
+ required_approvals: 1,
556
+ reviews: [
557
+ {
558
+ created_at: "2026-01-01T00:00:00.000Z",
559
+ decision: "approved",
560
+ note: "Looks good",
561
+ reviewer_id: "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
562
+ reviewer_label: "ada@example.com"
563
+ }
564
+ ],
565
+ scheduled_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
566
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
567
+ setting_key: "new_checkout",
568
+ stale: false,
569
+ status: "pending",
570
+ summary: ["value false \u2192 true"],
571
+ updated_at: "2026-01-01T00:00:00.000Z",
572
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
573
+ } },
299
574
  { op: "projects.changes.export", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/projects\/[^\/]+\/changes\/export$/, status: 200, contentType: "application/x-ndjson", body: "" },
300
575
  { op: "webhooks.endpoints.test", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/endpoints\/[^\/]+\/test$/, status: 200, contentType: "application/json", body: {
301
576
  attempt_number: 1,
@@ -312,6 +587,153 @@ var ROUTES = [
312
587
  trigger: "automatic",
313
588
  url: "https://example.com"
314
589
  } },
590
+ { op: "changeRequests.cancel", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/change-requests\/[^\/]+\/cancel$/, status: 200, contentType: "application/json", body: {
591
+ after: {},
592
+ applied_at: "2026-01-01T00:00:00.000Z",
593
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
594
+ approvals: 0,
595
+ author: {
596
+ client_id: null,
597
+ id: "pak_01HZX3",
598
+ is_agent: true,
599
+ label: "release-bot",
600
+ on_behalf_of_user_id: null,
601
+ type: "api_key"
602
+ },
603
+ base_version: 7,
604
+ before: {},
605
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
606
+ created_at: "2026-01-01T00:00:00.000Z",
607
+ current_version: 7,
608
+ diff: [{ op: "add", path: "/rules/1/percentages/0/percentage", value: 25 }],
609
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
610
+ environment_key: "production",
611
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
612
+ kind: "value",
613
+ last_error: {
614
+ at: "2026-01-01T00:00:00.000Z",
615
+ code: "VERSION_CONFLICT",
616
+ message: "The value changed since the change was scheduled."
617
+ },
618
+ note: "Turn on for everyone",
619
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
620
+ required_approvals: 1,
621
+ reviews: [
622
+ {
623
+ created_at: "2026-01-01T00:00:00.000Z",
624
+ decision: "approved",
625
+ note: "Looks good",
626
+ reviewer_id: "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
627
+ reviewer_label: "ada@example.com"
628
+ }
629
+ ],
630
+ scheduled_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
631
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
632
+ setting_key: "new_checkout",
633
+ stale: false,
634
+ status: "pending",
635
+ summary: ["value false \u2192 true"],
636
+ updated_at: "2026-01-01T00:00:00.000Z",
637
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
638
+ } },
639
+ { op: "changeRequests.rebase", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/change-requests\/[^\/]+\/rebase$/, status: 200, contentType: "application/json", body: {
640
+ after: {},
641
+ applied_at: "2026-01-01T00:00:00.000Z",
642
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
643
+ approvals: 0,
644
+ author: {
645
+ client_id: null,
646
+ id: "pak_01HZX3",
647
+ is_agent: true,
648
+ label: "release-bot",
649
+ on_behalf_of_user_id: null,
650
+ type: "api_key"
651
+ },
652
+ base_version: 7,
653
+ before: {},
654
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
655
+ created_at: "2026-01-01T00:00:00.000Z",
656
+ current_version: 7,
657
+ diff: [{ op: "add", path: "/rules/1/percentages/0/percentage", value: 25 }],
658
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
659
+ environment_key: "production",
660
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
661
+ kind: "value",
662
+ last_error: {
663
+ at: "2026-01-01T00:00:00.000Z",
664
+ code: "VERSION_CONFLICT",
665
+ message: "The value changed since the change was scheduled."
666
+ },
667
+ note: "Turn on for everyone",
668
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
669
+ required_approvals: 1,
670
+ reviews: [
671
+ {
672
+ created_at: "2026-01-01T00:00:00.000Z",
673
+ decision: "approved",
674
+ note: "Looks good",
675
+ reviewer_id: "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
676
+ reviewer_label: "ada@example.com"
677
+ }
678
+ ],
679
+ scheduled_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
680
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
681
+ setting_key: "new_checkout",
682
+ stale: false,
683
+ status: "pending",
684
+ summary: ["value false \u2192 true"],
685
+ updated_at: "2026-01-01T00:00:00.000Z",
686
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
687
+ } },
688
+ { op: "changeRequests.reject", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/change-requests\/[^\/]+\/reject$/, status: 200, contentType: "application/json", body: {
689
+ after: {},
690
+ applied_at: "2026-01-01T00:00:00.000Z",
691
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
692
+ approvals: 0,
693
+ author: {
694
+ client_id: null,
695
+ id: "pak_01HZX3",
696
+ is_agent: true,
697
+ label: "release-bot",
698
+ on_behalf_of_user_id: null,
699
+ type: "api_key"
700
+ },
701
+ base_version: 7,
702
+ before: {},
703
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
704
+ created_at: "2026-01-01T00:00:00.000Z",
705
+ current_version: 7,
706
+ diff: [{ op: "add", path: "/rules/1/percentages/0/percentage", value: 25 }],
707
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
708
+ environment_key: "production",
709
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
710
+ kind: "value",
711
+ last_error: {
712
+ at: "2026-01-01T00:00:00.000Z",
713
+ code: "VERSION_CONFLICT",
714
+ message: "The value changed since the change was scheduled."
715
+ },
716
+ note: "Turn on for everyone",
717
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
718
+ required_approvals: 1,
719
+ reviews: [
720
+ {
721
+ created_at: "2026-01-01T00:00:00.000Z",
722
+ decision: "approved",
723
+ note: "Looks good",
724
+ reviewer_id: "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
725
+ reviewer_label: "ada@example.com"
726
+ }
727
+ ],
728
+ scheduled_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
729
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
730
+ setting_key: "new_checkout",
731
+ stale: false,
732
+ status: "pending",
733
+ summary: ["value false \u2192 true"],
734
+ updated_at: "2026-01-01T00:00:00.000Z",
735
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
736
+ } },
315
737
  { op: "webhooks.events.replay", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/events\/[^\/]+\/replay$/, status: 200, contentType: "application/json", body: {
316
738
  attempts: [
317
739
  {
@@ -332,7 +754,57 @@ var ROUTES = [
332
754
  ],
333
755
  event_id: "string"
334
756
  } },
757
+ { op: "changeRequests.apply", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/change-requests\/[^\/]+\/apply$/, status: 200, contentType: "application/json", body: {
758
+ after: {},
759
+ applied_at: "2026-01-01T00:00:00.000Z",
760
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
761
+ approvals: 0,
762
+ author: {
763
+ client_id: null,
764
+ id: "pak_01HZX3",
765
+ is_agent: true,
766
+ label: "release-bot",
767
+ on_behalf_of_user_id: null,
768
+ type: "api_key"
769
+ },
770
+ base_version: 7,
771
+ before: {},
772
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
773
+ created_at: "2026-01-01T00:00:00.000Z",
774
+ current_version: 7,
775
+ diff: [{ op: "add", path: "/rules/1/percentages/0/percentage", value: 25 }],
776
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
777
+ environment_key: "production",
778
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
779
+ kind: "value",
780
+ last_error: {
781
+ at: "2026-01-01T00:00:00.000Z",
782
+ code: "VERSION_CONFLICT",
783
+ message: "The value changed since the change was scheduled."
784
+ },
785
+ note: "Turn on for everyone",
786
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
787
+ required_approvals: 1,
788
+ reviews: [
789
+ {
790
+ created_at: "2026-01-01T00:00:00.000Z",
791
+ decision: "approved",
792
+ note: "Looks good",
793
+ reviewer_id: "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
794
+ reviewer_label: "ada@example.com"
795
+ }
796
+ ],
797
+ scheduled_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
798
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
799
+ setting_key: "new_checkout",
800
+ stale: false,
801
+ status: "pending",
802
+ summary: ["value false \u2192 true"],
803
+ updated_at: "2026-01-01T00:00:00.000Z",
804
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
805
+ } },
335
806
  { op: "projects.environments.create", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/projects\/[^\/]+\/environments$/, status: 201, contentType: "application/json", body: {
807
+ approval_policy: "agents",
336
808
  color: "#c92a2a",
337
809
  created_at: "2026-01-01T00:00:00.000Z",
338
810
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
@@ -342,12 +814,14 @@ var ROUTES = [
342
814
  project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
343
815
  protected: true,
344
816
  require_note: false,
817
+ required_approvals: 1,
345
818
  updated_at: "2026-01-01T00:00:00.000Z",
346
819
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
347
820
  } },
348
821
  { op: "projects.environments.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/projects\/[^\/]+\/environments$/, status: 200, contentType: "application/json", body: {
349
822
  data: [
350
823
  {
824
+ approval_policy: "agents",
351
825
  color: "#c92a2a",
352
826
  created_at: "2026-01-01T00:00:00.000Z",
353
827
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
@@ -357,6 +831,7 @@ var ROUTES = [
357
831
  project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
358
832
  protected: true,
359
833
  require_note: false,
834
+ required_approvals: 1,
360
835
  updated_at: "2026-01-01T00:00:00.000Z",
361
836
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
362
837
  }
@@ -375,6 +850,38 @@ var ROUTES = [
375
850
  }
376
851
  ]
377
852
  } },
853
+ { op: "projects.staleFlags.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/projects\/[^\/]+\/stale-flags$/, status: 200, contentType: "application/json", body: {
854
+ data: [
855
+ {
856
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
857
+ config_key: "main",
858
+ days_since_change: 64,
859
+ environments: [
860
+ {
861
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
862
+ environment_key: "production",
863
+ has_targeting: false,
864
+ updated_at: "2026-01-01T00:00:00.000Z",
865
+ value: true
866
+ }
867
+ ],
868
+ key: "new_checkout",
869
+ last_changed_at: "2026-01-01T00:00:00.000Z",
870
+ lifecycle: "temporary",
871
+ name: "New checkout",
872
+ owner_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
873
+ prerequisite_of: 0,
874
+ reasons: ["no_recent_change", "rolled_out"],
875
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
876
+ suggested_value: true,
877
+ tags: ["checkout"],
878
+ type: "boolean"
879
+ }
880
+ ],
881
+ days: 30,
882
+ evaluation_data: "not_collected",
883
+ pagination: { next_cursor: null, has_more: false }
884
+ } },
378
885
  { op: "webhooks.endpoints.delete", method: "DELETE", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/endpoints\/[^\/]+$/, status: 204, contentType: null, body: null },
379
886
  { op: "webhooks.endpoints.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/endpoints\/[^\/]+$/, status: 200, contentType: "application/json", body: {
380
887
  config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
@@ -491,6 +998,40 @@ var ROUTES = [
491
998
  ],
492
999
  pagination: { next_cursor: null, has_more: false }
493
1000
  } },
1001
+ { op: "scheduledChanges.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/scheduled-changes\/[^\/]+$/, status: 200, contentType: "application/json", body: {
1002
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1003
+ base_version: 7,
1004
+ change_request_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1005
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1006
+ created_at: "2026-01-01T00:00:00.000Z",
1007
+ created_by: {
1008
+ client_id: null,
1009
+ id: "pak_01HZX3",
1010
+ is_agent: true,
1011
+ label: "release-bot",
1012
+ on_behalf_of_user_id: null,
1013
+ type: "api_key"
1014
+ },
1015
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1016
+ environment_key: "production",
1017
+ executed_at: "2026-01-01T00:00:00.000Z",
1018
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1019
+ last_error: {
1020
+ at: "2026-01-01T00:00:00.000Z",
1021
+ code: "VERSION_CONFLICT",
1022
+ message: "The value changed since the change was scheduled."
1023
+ },
1024
+ note: "Launch at 09:00",
1025
+ operation: "patch",
1026
+ payload: {},
1027
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1028
+ run_at: "2026-01-01T00:00:00.000Z",
1029
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1030
+ setting_key: "new_checkout",
1031
+ status: "pending",
1032
+ updated_at: "2026-01-01T00:00:00.000Z",
1033
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
1034
+ } },
494
1035
  { op: "configs.settings.create", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/configs\/[^\/]+\/settings$/, status: 201, contentType: "application/json", body: {
495
1036
  config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
496
1037
  created_at: "2026-01-01T00:00:00.000Z",
@@ -623,6 +1164,55 @@ var ROUTES = [
623
1164
  ],
624
1165
  pagination: { next_cursor: null, has_more: false }
625
1166
  } },
1167
+ { op: "changeRequests.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/change-requests\/[^\/]+$/, status: 200, contentType: "application/json", body: {
1168
+ after: {},
1169
+ applied_at: "2026-01-01T00:00:00.000Z",
1170
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1171
+ approvals: 0,
1172
+ author: {
1173
+ client_id: null,
1174
+ id: "pak_01HZX3",
1175
+ is_agent: true,
1176
+ label: "release-bot",
1177
+ on_behalf_of_user_id: null,
1178
+ type: "api_key"
1179
+ },
1180
+ base_version: 7,
1181
+ before: {},
1182
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1183
+ created_at: "2026-01-01T00:00:00.000Z",
1184
+ current_version: 7,
1185
+ diff: [{ op: "add", path: "/rules/1/percentages/0/percentage", value: 25 }],
1186
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1187
+ environment_key: "production",
1188
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1189
+ kind: "value",
1190
+ last_error: {
1191
+ at: "2026-01-01T00:00:00.000Z",
1192
+ code: "VERSION_CONFLICT",
1193
+ message: "The value changed since the change was scheduled."
1194
+ },
1195
+ note: "Turn on for everyone",
1196
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1197
+ required_approvals: 1,
1198
+ reviews: [
1199
+ {
1200
+ created_at: "2026-01-01T00:00:00.000Z",
1201
+ decision: "approved",
1202
+ note: "Looks good",
1203
+ reviewer_id: "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
1204
+ reviewer_label: "ada@example.com"
1205
+ }
1206
+ ],
1207
+ scheduled_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1208
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1209
+ setting_key: "new_checkout",
1210
+ stale: false,
1211
+ status: "pending",
1212
+ summary: ["value false \u2192 true"],
1213
+ updated_at: "2026-01-01T00:00:00.000Z",
1214
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
1215
+ } },
626
1216
  { op: "configs.compare", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/configs\/[^\/]+\/compare$/, status: 200, contentType: "application/json", body: {
627
1217
  data: [
628
1218
  {
@@ -738,6 +1328,102 @@ var ROUTES = [
738
1328
  size_bytes: 1,
739
1329
  summary: ["Production: value false \u2192 true"]
740
1330
  } },
1331
+ { op: "ramps.cancel", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/ramps\/[^\/]+\/cancel$/, status: 200, contentType: "application/json", body: {
1332
+ change_request_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1333
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1334
+ created_at: "2026-01-01T00:00:00.000Z",
1335
+ created_by: {
1336
+ client_id: null,
1337
+ id: "pak_01HZX3",
1338
+ is_agent: true,
1339
+ label: "release-bot",
1340
+ on_behalf_of_user_id: null,
1341
+ type: "api_key"
1342
+ },
1343
+ current_percentage: 25,
1344
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1345
+ environment_key: "production",
1346
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1347
+ last_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1348
+ last_error: {
1349
+ at: "2026-01-01T00:00:00.000Z",
1350
+ code: "VERSION_CONFLICT",
1351
+ message: "The value changed since the change was scheduled."
1352
+ },
1353
+ note: "Ramp the new checkout",
1354
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1355
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1356
+ setting_key: "new_checkout",
1357
+ status: "active",
1358
+ steps: [{ applied: false, at: "2026-01-01T00:00:00.000Z", percentage: 25 }],
1359
+ updated_at: "2026-01-01T00:00:00.000Z",
1360
+ value: true,
1361
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
1362
+ } },
1363
+ { op: "ramps.resume", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/ramps\/[^\/]+\/resume$/, status: 200, contentType: "application/json", body: {
1364
+ change_request_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1365
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1366
+ created_at: "2026-01-01T00:00:00.000Z",
1367
+ created_by: {
1368
+ client_id: null,
1369
+ id: "pak_01HZX3",
1370
+ is_agent: true,
1371
+ label: "release-bot",
1372
+ on_behalf_of_user_id: null,
1373
+ type: "api_key"
1374
+ },
1375
+ current_percentage: 25,
1376
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1377
+ environment_key: "production",
1378
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1379
+ last_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1380
+ last_error: {
1381
+ at: "2026-01-01T00:00:00.000Z",
1382
+ code: "VERSION_CONFLICT",
1383
+ message: "The value changed since the change was scheduled."
1384
+ },
1385
+ note: "Ramp the new checkout",
1386
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1387
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1388
+ setting_key: "new_checkout",
1389
+ status: "active",
1390
+ steps: [{ applied: false, at: "2026-01-01T00:00:00.000Z", percentage: 25 }],
1391
+ updated_at: "2026-01-01T00:00:00.000Z",
1392
+ value: true,
1393
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
1394
+ } },
1395
+ { op: "ramps.pause", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/ramps\/[^\/]+\/pause$/, status: 200, contentType: "application/json", body: {
1396
+ change_request_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1397
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1398
+ created_at: "2026-01-01T00:00:00.000Z",
1399
+ created_by: {
1400
+ client_id: null,
1401
+ id: "pak_01HZX3",
1402
+ is_agent: true,
1403
+ label: "release-bot",
1404
+ on_behalf_of_user_id: null,
1405
+ type: "api_key"
1406
+ },
1407
+ current_percentage: 25,
1408
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1409
+ environment_key: "production",
1410
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1411
+ last_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1412
+ last_error: {
1413
+ at: "2026-01-01T00:00:00.000Z",
1414
+ code: "VERSION_CONFLICT",
1415
+ message: "The value changed since the change was scheduled."
1416
+ },
1417
+ note: "Ramp the new checkout",
1418
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1419
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1420
+ setting_key: "new_checkout",
1421
+ status: "active",
1422
+ steps: [{ applied: false, at: "2026-01-01T00:00:00.000Z", percentage: 25 }],
1423
+ updated_at: "2026-01-01T00:00:00.000Z",
1424
+ value: true,
1425
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
1426
+ } },
741
1427
  { op: "projects.delete", method: "DELETE", pattern: /^\/v1\/workspaces\/[^\/]+\/projects\/[^\/]+$/, status: 204, contentType: null, body: null },
742
1428
  { op: "projects.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/projects\/[^\/]+$/, status: 200, contentType: "application/json", body: {
743
1429
  configs: [
@@ -757,6 +1443,7 @@ var ROUTES = [
757
1443
  description: "",
758
1444
  environments: [
759
1445
  {
1446
+ approval_policy: "agents",
760
1447
  color: "#c92a2a",
761
1448
  created_at: "2026-01-01T00:00:00.000Z",
762
1449
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
@@ -766,6 +1453,7 @@ var ROUTES = [
766
1453
  project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
767
1454
  protected: true,
768
1455
  require_note: false,
1456
+ required_approvals: 1,
769
1457
  updated_at: "2026-01-01T00:00:00.000Z",
770
1458
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
771
1459
  }
@@ -773,6 +1461,8 @@ var ROUTES = [
773
1461
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
774
1462
  name: "Storefront",
775
1463
  ordinal: 0,
1464
+ stale_after_days: 30,
1465
+ stale_digest: true,
776
1466
  updated_at: "2026-01-01T00:00:00.000Z",
777
1467
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
778
1468
  } },
@@ -794,6 +1484,7 @@ var ROUTES = [
794
1484
  description: "",
795
1485
  environments: [
796
1486
  {
1487
+ approval_policy: "agents",
797
1488
  color: "#c92a2a",
798
1489
  created_at: "2026-01-01T00:00:00.000Z",
799
1490
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
@@ -803,6 +1494,7 @@ var ROUTES = [
803
1494
  project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
804
1495
  protected: true,
805
1496
  require_note: false,
1497
+ required_approvals: 1,
806
1498
  updated_at: "2026-01-01T00:00:00.000Z",
807
1499
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
808
1500
  }
@@ -810,6 +1502,8 @@ var ROUTES = [
810
1502
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
811
1503
  name: "Storefront",
812
1504
  ordinal: 0,
1505
+ stale_after_days: 30,
1506
+ stale_digest: true,
813
1507
  updated_at: "2026-01-01T00:00:00.000Z",
814
1508
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
815
1509
  } },
@@ -1035,6 +1729,38 @@ var ROUTES = [
1035
1729
  updated_at: "2026-01-01T00:00:00.000Z",
1036
1730
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
1037
1731
  } },
1732
+ { op: "ramps.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/ramps\/[^\/]+$/, status: 200, contentType: "application/json", body: {
1733
+ change_request_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1734
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1735
+ created_at: "2026-01-01T00:00:00.000Z",
1736
+ created_by: {
1737
+ client_id: null,
1738
+ id: "pak_01HZX3",
1739
+ is_agent: true,
1740
+ label: "release-bot",
1741
+ on_behalf_of_user_id: null,
1742
+ type: "api_key"
1743
+ },
1744
+ current_percentage: 25,
1745
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1746
+ environment_key: "production",
1747
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1748
+ last_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1749
+ last_error: {
1750
+ at: "2026-01-01T00:00:00.000Z",
1751
+ code: "VERSION_CONFLICT",
1752
+ message: "The value changed since the change was scheduled."
1753
+ },
1754
+ note: "Ramp the new checkout",
1755
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1756
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1757
+ setting_key: "new_checkout",
1758
+ status: "active",
1759
+ steps: [{ applied: false, at: "2026-01-01T00:00:00.000Z", percentage: 25 }],
1760
+ updated_at: "2026-01-01T00:00:00.000Z",
1761
+ value: true,
1762
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
1763
+ } },
1038
1764
  { op: "configs.environments.sdkKeys.endGracePeriod", method: "DELETE", pattern: /^\/v1\/workspaces\/[^\/]+\/configs\/[^\/]+\/environments\/[^\/]+\/sdk-keys\/secondary$/, status: 200, contentType: "application/json", body: {
1039
1765
  data: [
1040
1766
  {
@@ -1069,6 +1795,89 @@ var ROUTES = [
1069
1795
  }
1070
1796
  ]
1071
1797
  } },
1798
+ { op: "settings.values.scheduledChanges.create", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/settings\/[^\/]+\/values\/[^\/]+\/scheduled-changes$/, status: 201, contentType: "application/json", body: {
1799
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1800
+ base_version: 7,
1801
+ change_request_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1802
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1803
+ created_at: "2026-01-01T00:00:00.000Z",
1804
+ created_by: {
1805
+ client_id: null,
1806
+ id: "pak_01HZX3",
1807
+ is_agent: true,
1808
+ label: "release-bot",
1809
+ on_behalf_of_user_id: null,
1810
+ type: "api_key"
1811
+ },
1812
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1813
+ environment_key: "production",
1814
+ executed_at: "2026-01-01T00:00:00.000Z",
1815
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1816
+ last_error: {
1817
+ at: "2026-01-01T00:00:00.000Z",
1818
+ code: "VERSION_CONFLICT",
1819
+ message: "The value changed since the change was scheduled."
1820
+ },
1821
+ note: "Launch at 09:00",
1822
+ operation: "patch",
1823
+ payload: {},
1824
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1825
+ run_at: "2026-01-01T00:00:00.000Z",
1826
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1827
+ setting_key: "new_checkout",
1828
+ status: "pending",
1829
+ updated_at: "2026-01-01T00:00:00.000Z",
1830
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
1831
+ } },
1832
+ { op: "settings.values.changeRequests.create", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/settings\/[^\/]+\/values\/[^\/]+\/change-requests$/, status: 201, contentType: "application/json", body: {
1833
+ after: {},
1834
+ applied_at: "2026-01-01T00:00:00.000Z",
1835
+ applied_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1836
+ approvals: 0,
1837
+ author: {
1838
+ client_id: null,
1839
+ id: "pak_01HZX3",
1840
+ is_agent: true,
1841
+ label: "release-bot",
1842
+ on_behalf_of_user_id: null,
1843
+ type: "api_key"
1844
+ },
1845
+ base_version: 7,
1846
+ before: {},
1847
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1848
+ created_at: "2026-01-01T00:00:00.000Z",
1849
+ current_version: 7,
1850
+ diff: [{ op: "add", path: "/rules/1/percentages/0/percentage", value: 25 }],
1851
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1852
+ environment_key: "production",
1853
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1854
+ kind: "value",
1855
+ last_error: {
1856
+ at: "2026-01-01T00:00:00.000Z",
1857
+ code: "VERSION_CONFLICT",
1858
+ message: "The value changed since the change was scheduled."
1859
+ },
1860
+ note: "Turn on for everyone",
1861
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1862
+ required_approvals: 1,
1863
+ reviews: [
1864
+ {
1865
+ created_at: "2026-01-01T00:00:00.000Z",
1866
+ decision: "approved",
1867
+ note: "Looks good",
1868
+ reviewer_id: "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
1869
+ reviewer_label: "ada@example.com"
1870
+ }
1871
+ ],
1872
+ scheduled_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1873
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1874
+ setting_key: "new_checkout",
1875
+ stale: false,
1876
+ status: "pending",
1877
+ summary: ["value false \u2192 true"],
1878
+ updated_at: "2026-01-01T00:00:00.000Z",
1879
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
1880
+ } },
1072
1881
  { op: "configs.environments.revisions.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/configs\/[^\/]+\/environments\/[^\/]+\/revisions$/, status: 200, contentType: "application/json", body: {
1073
1882
  data: [
1074
1883
  {
@@ -1187,6 +1996,7 @@ var ROUTES = [
1187
1996
  } },
1188
1997
  { op: "projects.environments.delete", method: "DELETE", pattern: /^\/v1\/workspaces\/[^\/]+\/projects\/[^\/]+\/environments\/[^\/]+$/, status: 204, contentType: null, body: null },
1189
1998
  { op: "projects.environments.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/projects\/[^\/]+\/environments\/[^\/]+$/, status: 200, contentType: "application/json", body: {
1999
+ approval_policy: "agents",
1190
2000
  color: "#c92a2a",
1191
2001
  created_at: "2026-01-01T00:00:00.000Z",
1192
2002
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
@@ -1196,10 +2006,12 @@ var ROUTES = [
1196
2006
  project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1197
2007
  protected: true,
1198
2008
  require_note: false,
2009
+ required_approvals: 1,
1199
2010
  updated_at: "2026-01-01T00:00:00.000Z",
1200
2011
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
1201
2012
  } },
1202
2013
  { op: "projects.environments.update", method: "PATCH", pattern: /^\/v1\/workspaces\/[^\/]+\/projects\/[^\/]+\/environments\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2014
+ approval_policy: "agents",
1203
2015
  color: "#c92a2a",
1204
2016
  created_at: "2026-01-01T00:00:00.000Z",
1205
2017
  id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
@@ -1209,7 +2021,40 @@ var ROUTES = [
1209
2021
  project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1210
2022
  protected: true,
1211
2023
  require_note: false,
2024
+ required_approvals: 1,
2025
+ updated_at: "2026-01-01T00:00:00.000Z",
2026
+ workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
2027
+ } },
2028
+ { op: "settings.values.ramps.create", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/settings\/[^\/]+\/values\/[^\/]+\/ramps$/, status: 201, contentType: "application/json", body: {
2029
+ change_request_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2030
+ config_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2031
+ created_at: "2026-01-01T00:00:00.000Z",
2032
+ created_by: {
2033
+ client_id: null,
2034
+ id: "pak_01HZX3",
2035
+ is_agent: true,
2036
+ label: "release-bot",
2037
+ on_behalf_of_user_id: null,
2038
+ type: "api_key"
2039
+ },
2040
+ current_percentage: 25,
2041
+ environment_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2042
+ environment_key: "production",
2043
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2044
+ last_change_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2045
+ last_error: {
2046
+ at: "2026-01-01T00:00:00.000Z",
2047
+ code: "VERSION_CONFLICT",
2048
+ message: "The value changed since the change was scheduled."
2049
+ },
2050
+ note: "Ramp the new checkout",
2051
+ project_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2052
+ setting_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2053
+ setting_key: "new_checkout",
2054
+ status: "active",
2055
+ steps: [{ applied: false, at: "2026-01-01T00:00:00.000Z", percentage: 25 }],
1212
2056
  updated_at: "2026-01-01T00:00:00.000Z",
2057
+ value: true,
1213
2058
  workspace_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b"
1214
2059
  } },
1215
2060
  { op: "settings.values.replace", method: "PUT", pattern: /^\/v1\/workspaces\/[^\/]+\/settings\/[^\/]+\/values\/[^\/]+$/, status: 200, contentType: "application/json", body: {