@oursprivacy/platform-sdk 1.61.0 → 1.62.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 (64) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client.d.mts +5 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/attribution-reports.d.mts +1400 -0
  12. package/resources/attribution-reports.d.mts.map +1 -0
  13. package/resources/attribution-reports.d.ts +1400 -0
  14. package/resources/attribution-reports.d.ts.map +1 -0
  15. package/resources/attribution-reports.js +116 -0
  16. package/resources/attribution-reports.js.map +1 -0
  17. package/resources/attribution-reports.mjs +112 -0
  18. package/resources/attribution-reports.mjs.map +1 -0
  19. package/resources/experiment-variants.d.mts +84 -93
  20. package/resources/experiment-variants.d.mts.map +1 -1
  21. package/resources/experiment-variants.d.ts +84 -93
  22. package/resources/experiment-variants.d.ts.map +1 -1
  23. package/resources/experiment-variants.js +3 -1
  24. package/resources/experiment-variants.js.map +1 -1
  25. package/resources/experiment-variants.mjs +3 -1
  26. package/resources/experiment-variants.mjs.map +1 -1
  27. package/resources/experiments.d.mts +50 -65
  28. package/resources/experiments.d.mts.map +1 -1
  29. package/resources/experiments.d.ts +50 -65
  30. package/resources/experiments.d.ts.map +1 -1
  31. package/resources/index.d.mts +2 -1
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +2 -1
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js +3 -1
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +1 -0
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/videos.d.mts +17 -5
  40. package/resources/videos.d.mts.map +1 -1
  41. package/resources/videos.d.ts +17 -5
  42. package/resources/videos.d.ts.map +1 -1
  43. package/resources/videos.js +2 -2
  44. package/resources/videos.mjs +2 -2
  45. package/resources/web-scanners.d.mts +84 -32
  46. package/resources/web-scanners.d.mts.map +1 -1
  47. package/resources/web-scanners.d.ts +84 -32
  48. package/resources/web-scanners.d.ts.map +1 -1
  49. package/resources/web-scanners.js +34 -18
  50. package/resources/web-scanners.js.map +1 -1
  51. package/resources/web-scanners.mjs +34 -18
  52. package/resources/web-scanners.mjs.map +1 -1
  53. package/src/client.ts +49 -0
  54. package/src/resources/attribution-reports.ts +2294 -0
  55. package/src/resources/experiment-variants.ts +84 -93
  56. package/src/resources/experiments.ts +50 -65
  57. package/src/resources/index.ts +23 -0
  58. package/src/resources/videos.ts +243 -5
  59. package/src/resources/web-scanners.ts +100 -31
  60. package/src/version.ts +1 -1
  61. package/version.d.mts +1 -1
  62. package/version.d.ts +1 -1
  63. package/version.js +1 -1
  64. package/version.mjs +1 -1
@@ -76,7 +76,9 @@ export class ExperimentVariants extends APIResource {
76
76
  * @example
77
77
  * ```ts
78
78
  * const experimentVariant =
79
- * await client.experimentVariants.update('id');
79
+ * await client.experimentVariants.update(
80
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
81
+ * );
80
82
  * ```
81
83
  */
82
84
  update(
@@ -126,8 +128,8 @@ export interface ExperimentVariantListResponse {
126
128
  name: string;
127
129
 
128
130
  /**
129
- * Relative traffic weight used when assigning visitors among variants in an active
130
- * experiment.
131
+ * Share of the experiment's traffic as a percentage (0–100). Weights across all
132
+ * variants total 100; the control's weight is the remainder after the treatments.
131
133
  */
132
134
  weight: number;
133
135
 
@@ -177,31 +179,28 @@ export namespace ExperimentVariantListResponse {
177
179
  * Canonical action payload. For `setText` / `setHtml` / `customCss` / `customJs` /
178
180
  * `setImage` / `insertBefore` / `insertAfter` this is the literal
179
181
  * text/HTML/CSS/JS/URL. For `setStyle` and `setAttribute` it is a JSON-stringified
180
- * `{key: value}` object — prefer the structured `styles` / `attribute` fields
181
- * below to avoid manual JSON encoding.
182
+ * `{key: value}` object; the structured `styles` / `attribute` fields carry the
183
+ * same data.
182
184
  */
183
185
  value: string;
184
186
 
185
187
  /**
186
- * Populated on read for `setAttribute` modifications, parsed from `value`.
187
- * Customers may also send this field instead of a JSON-stringified `value` on
188
- * write — see `domModificationInputSchema`.
188
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
189
+ * also be sent instead of a JSON-stringified `value` on write.
189
190
  */
190
191
  attribute?: DomModification.Attribute | null;
191
192
 
192
193
  /**
193
- * Populated on read for `setStyle` modifications, parsed from `value`. Customers
194
- * may also send this field instead of a JSON-stringified `value` on write — see
195
- * `domModificationInputSchema`.
194
+ * Populated on read for `setStyle` modifications, parsed from `value`. May also be
195
+ * sent instead of a JSON-stringified `value` on write.
196
196
  */
197
197
  styles?: Array<DomModification.Style> | null;
198
198
  }
199
199
 
200
200
  export namespace DomModification {
201
201
  /**
202
- * Populated on read for `setAttribute` modifications, parsed from `value`.
203
- * Customers may also send this field instead of a JSON-stringified `value` on
204
- * write — see `domModificationInputSchema`.
202
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
203
+ * also be sent instead of a JSON-stringified `value` on write.
205
204
  */
206
205
  export interface Attribute {
207
206
  /**
@@ -251,8 +250,8 @@ export interface ExperimentVariantCreateResponse {
251
250
  name: string;
252
251
 
253
252
  /**
254
- * Relative traffic weight used when assigning visitors among variants in an active
255
- * experiment.
253
+ * Share of the experiment's traffic as a percentage (0–100). Weights across all
254
+ * variants total 100; the control's weight is the remainder after the treatments.
256
255
  */
257
256
  weight: number;
258
257
 
@@ -302,31 +301,28 @@ export namespace ExperimentVariantCreateResponse {
302
301
  * Canonical action payload. For `setText` / `setHtml` / `customCss` / `customJs` /
303
302
  * `setImage` / `insertBefore` / `insertAfter` this is the literal
304
303
  * text/HTML/CSS/JS/URL. For `setStyle` and `setAttribute` it is a JSON-stringified
305
- * `{key: value}` object — prefer the structured `styles` / `attribute` fields
306
- * below to avoid manual JSON encoding.
304
+ * `{key: value}` object; the structured `styles` / `attribute` fields carry the
305
+ * same data.
307
306
  */
308
307
  value: string;
309
308
 
310
309
  /**
311
- * Populated on read for `setAttribute` modifications, parsed from `value`.
312
- * Customers may also send this field instead of a JSON-stringified `value` on
313
- * write — see `domModificationInputSchema`.
310
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
311
+ * also be sent instead of a JSON-stringified `value` on write.
314
312
  */
315
313
  attribute?: DomModification.Attribute | null;
316
314
 
317
315
  /**
318
- * Populated on read for `setStyle` modifications, parsed from `value`. Customers
319
- * may also send this field instead of a JSON-stringified `value` on write — see
320
- * `domModificationInputSchema`.
316
+ * Populated on read for `setStyle` modifications, parsed from `value`. May also be
317
+ * sent instead of a JSON-stringified `value` on write.
321
318
  */
322
319
  styles?: Array<DomModification.Style> | null;
323
320
  }
324
321
 
325
322
  export namespace DomModification {
326
323
  /**
327
- * Populated on read for `setAttribute` modifications, parsed from `value`.
328
- * Customers may also send this field instead of a JSON-stringified `value` on
329
- * write — see `domModificationInputSchema`.
324
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
325
+ * also be sent instead of a JSON-stringified `value` on write.
330
326
  */
331
327
  export interface Attribute {
332
328
  /**
@@ -376,8 +372,8 @@ export interface ExperimentVariantRetrieveResponse {
376
372
  name: string;
377
373
 
378
374
  /**
379
- * Relative traffic weight used when assigning visitors among variants in an active
380
- * experiment.
375
+ * Share of the experiment's traffic as a percentage (0–100). Weights across all
376
+ * variants total 100; the control's weight is the remainder after the treatments.
381
377
  */
382
378
  weight: number;
383
379
 
@@ -427,31 +423,28 @@ export namespace ExperimentVariantRetrieveResponse {
427
423
  * Canonical action payload. For `setText` / `setHtml` / `customCss` / `customJs` /
428
424
  * `setImage` / `insertBefore` / `insertAfter` this is the literal
429
425
  * text/HTML/CSS/JS/URL. For `setStyle` and `setAttribute` it is a JSON-stringified
430
- * `{key: value}` object — prefer the structured `styles` / `attribute` fields
431
- * below to avoid manual JSON encoding.
426
+ * `{key: value}` object; the structured `styles` / `attribute` fields carry the
427
+ * same data.
432
428
  */
433
429
  value: string;
434
430
 
435
431
  /**
436
- * Populated on read for `setAttribute` modifications, parsed from `value`.
437
- * Customers may also send this field instead of a JSON-stringified `value` on
438
- * write — see `domModificationInputSchema`.
432
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
433
+ * also be sent instead of a JSON-stringified `value` on write.
439
434
  */
440
435
  attribute?: DomModification.Attribute | null;
441
436
 
442
437
  /**
443
- * Populated on read for `setStyle` modifications, parsed from `value`. Customers
444
- * may also send this field instead of a JSON-stringified `value` on write — see
445
- * `domModificationInputSchema`.
438
+ * Populated on read for `setStyle` modifications, parsed from `value`. May also be
439
+ * sent instead of a JSON-stringified `value` on write.
446
440
  */
447
441
  styles?: Array<DomModification.Style> | null;
448
442
  }
449
443
 
450
444
  export namespace DomModification {
451
445
  /**
452
- * Populated on read for `setAttribute` modifications, parsed from `value`.
453
- * Customers may also send this field instead of a JSON-stringified `value` on
454
- * write — see `domModificationInputSchema`.
446
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
447
+ * also be sent instead of a JSON-stringified `value` on write.
455
448
  */
456
449
  export interface Attribute {
457
450
  /**
@@ -501,8 +494,8 @@ export interface ExperimentVariantUpdateResponse {
501
494
  name: string;
502
495
 
503
496
  /**
504
- * Relative traffic weight used when assigning visitors among variants in an active
505
- * experiment.
497
+ * Share of the experiment's traffic as a percentage (0–100). Weights across all
498
+ * variants total 100; the control's weight is the remainder after the treatments.
506
499
  */
507
500
  weight: number;
508
501
 
@@ -552,31 +545,28 @@ export namespace ExperimentVariantUpdateResponse {
552
545
  * Canonical action payload. For `setText` / `setHtml` / `customCss` / `customJs` /
553
546
  * `setImage` / `insertBefore` / `insertAfter` this is the literal
554
547
  * text/HTML/CSS/JS/URL. For `setStyle` and `setAttribute` it is a JSON-stringified
555
- * `{key: value}` object — prefer the structured `styles` / `attribute` fields
556
- * below to avoid manual JSON encoding.
548
+ * `{key: value}` object; the structured `styles` / `attribute` fields carry the
549
+ * same data.
557
550
  */
558
551
  value: string;
559
552
 
560
553
  /**
561
- * Populated on read for `setAttribute` modifications, parsed from `value`.
562
- * Customers may also send this field instead of a JSON-stringified `value` on
563
- * write — see `domModificationInputSchema`.
554
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
555
+ * also be sent instead of a JSON-stringified `value` on write.
564
556
  */
565
557
  attribute?: DomModification.Attribute | null;
566
558
 
567
559
  /**
568
- * Populated on read for `setStyle` modifications, parsed from `value`. Customers
569
- * may also send this field instead of a JSON-stringified `value` on write — see
570
- * `domModificationInputSchema`.
560
+ * Populated on read for `setStyle` modifications, parsed from `value`. May also be
561
+ * sent instead of a JSON-stringified `value` on write.
571
562
  */
572
563
  styles?: Array<DomModification.Style> | null;
573
564
  }
574
565
 
575
566
  export namespace DomModification {
576
567
  /**
577
- * Populated on read for `setAttribute` modifications, parsed from `value`.
578
- * Customers may also send this field instead of a JSON-stringified `value` on
579
- * write — see `domModificationInputSchema`.
568
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
569
+ * also be sent instead of a JSON-stringified `value` on write.
580
570
  */
581
571
  export interface Attribute {
582
572
  /**
@@ -626,8 +616,8 @@ export interface ExperimentVariantDeleteResponse {
626
616
  name: string;
627
617
 
628
618
  /**
629
- * Relative traffic weight used when assigning visitors among variants in an active
630
- * experiment.
619
+ * Share of the experiment's traffic as a percentage (0–100). Weights across all
620
+ * variants total 100; the control's weight is the remainder after the treatments.
631
621
  */
632
622
  weight: number;
633
623
 
@@ -677,31 +667,28 @@ export namespace ExperimentVariantDeleteResponse {
677
667
  * Canonical action payload. For `setText` / `setHtml` / `customCss` / `customJs` /
678
668
  * `setImage` / `insertBefore` / `insertAfter` this is the literal
679
669
  * text/HTML/CSS/JS/URL. For `setStyle` and `setAttribute` it is a JSON-stringified
680
- * `{key: value}` object — prefer the structured `styles` / `attribute` fields
681
- * below to avoid manual JSON encoding.
670
+ * `{key: value}` object; the structured `styles` / `attribute` fields carry the
671
+ * same data.
682
672
  */
683
673
  value: string;
684
674
 
685
675
  /**
686
- * Populated on read for `setAttribute` modifications, parsed from `value`.
687
- * Customers may also send this field instead of a JSON-stringified `value` on
688
- * write — see `domModificationInputSchema`.
676
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
677
+ * also be sent instead of a JSON-stringified `value` on write.
689
678
  */
690
679
  attribute?: DomModification.Attribute | null;
691
680
 
692
681
  /**
693
- * Populated on read for `setStyle` modifications, parsed from `value`. Customers
694
- * may also send this field instead of a JSON-stringified `value` on write — see
695
- * `domModificationInputSchema`.
682
+ * Populated on read for `setStyle` modifications, parsed from `value`. May also be
683
+ * sent instead of a JSON-stringified `value` on write.
696
684
  */
697
685
  styles?: Array<DomModification.Style> | null;
698
686
  }
699
687
 
700
688
  export namespace DomModification {
701
689
  /**
702
- * Populated on read for `setAttribute` modifications, parsed from `value`.
703
- * Customers may also send this field instead of a JSON-stringified `value` on
704
- * write — see `domModificationInputSchema`.
690
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
691
+ * also be sent instead of a JSON-stringified `value` on write.
705
692
  */
706
693
  export interface Attribute {
707
694
  /**
@@ -748,12 +735,12 @@ export interface ExperimentVariantCreateParams {
748
735
  name: string;
749
736
 
750
737
  /**
751
- * Traffic weight for this variant as a percentage (0–100). Treatment weights are
752
- * percentages of the split and must total 99% or less to leave room for the
753
- * auto-created control; the control is the remainder (100 − Σ treatment weights,
754
- * always ≥ 1%). A personalization experience always serves its first non-control
755
- * treatment to matching visitors, regardless of traffic allocation or variant
756
- * weights.
738
+ * This treatment's share of the experiment's traffic as a whole-number percentage
739
+ * (0–100), not a relative weight. Treatment weights must total 99 or less; the
740
+ * auto-created control receives the remainder (100 − the treatment total, always
741
+ * at least 1). For a 50/50 test, send `weight: 50`. A personalization experience
742
+ * always serves its first non-control treatment to matching visitors, regardless
743
+ * of traffic allocation or variant weights.
757
744
  */
758
745
  weight: number;
759
746
 
@@ -764,12 +751,10 @@ export interface ExperimentVariantCreateParams {
764
751
  domModifications?: Array<ExperimentVariantCreateParams.DomModification> | null;
765
752
 
766
753
  /**
767
- * Mark this variant as the experiment control. Defaults to `false`. The API
768
- * rejects the request with 409 if the experiment already has a control variant.
769
- * Every experiment keeps exactly one control whose weight is the auto-derived
770
- * remainder of the split, so the control cannot be cleared while it would leave
771
- * the treatments at 100% (no room for a control). DELETE on the control
772
- * returns 409.
754
+ * Mark this variant as the experiment control. Defaults to `false`. Every
755
+ * experiment already has an auto-created control that cannot be demoted or
756
+ * deleted, so creating a second control is rejected with 409; edit the existing
757
+ * control instead.
773
758
  */
774
759
  isControl?: boolean | null;
775
760
 
@@ -838,8 +823,8 @@ export namespace ExperimentVariantCreateParams {
838
823
  * Canonical action payload. For `setText` / `setHtml` / `customCss` / `customJs` /
839
824
  * `setImage` / `insertBefore` / `insertAfter` this is the literal
840
825
  * text/HTML/CSS/JS/URL. For `setStyle` and `setAttribute` it is a JSON-stringified
841
- * `{key: value}` object — or you can supply the structured `styles` / `attribute`
842
- * field instead and the server will normalize.
826
+ * `{key: value}` object — or supply the structured `styles` / `attribute` field
827
+ * instead and the server will normalize.
843
828
  */
844
829
  value?: string | null;
845
830
  }
@@ -883,10 +868,9 @@ export interface ExperimentVariantUpdateParams {
883
868
  domModifications?: Array<ExperimentVariantUpdateParams.DomModification> | null;
884
869
 
885
870
  /**
886
- * Promote or demote this variant as the control. Promoting a second variant while
887
- * another already has `isControl: true` is rejected with 409. Demoting the control
888
- * (`isControl: false`) is rejected — an experiment must always keep a control.
889
- * Null leaves the control flag unchanged.
871
+ * Promote this variant to control. Rejected with 409 while another variant is the
872
+ * control, and demoting the control (`false`) is rejected because an experiment
873
+ * must always keep one. Null leaves the control flag unchanged.
890
874
  */
891
875
  isControl?: boolean | null;
892
876
 
@@ -903,17 +887,24 @@ export interface ExperimentVariantUpdateParams {
903
887
  redirectUrl?: string | null;
904
888
 
905
889
  /**
906
- * Updated variant delivery mechanism. `dom_modifications` mutates the current page
907
- * in-place; `redirect` sends the visitor to a different URL — pick based on
908
- * whether the _page_ or the _content_ is the variable. Changing this also requires
909
- * updating the matching payload field (`redirectUrl` or `domModifications`).
890
+ * Updated delivery mechanism. Variant delivery mechanism. `dom_modifications`
891
+ * mutates the current page in-place at SDK runtime — use it for
892
+ * copy/style/image/HTML changes that keep visitors on the same URL (headline copy
893
+ * tests, button color, hero image swap). `redirect` routes the visitor to a
894
+ * different URL entirely — use it for landing-page A/B tests, alternate pricing
895
+ * pages, or any test where the _page itself_ is the variable. They are not
896
+ * interchangeable: a redirect variant cannot also tweak DOM, and a
897
+ * dom_modifications variant cannot send the visitor elsewhere. Changing this also
898
+ * requires updating the matching payload field (`redirectUrl` or
899
+ * `domModifications`).
910
900
  */
911
901
  variantType?: 'dom_modifications' | 'redirect' | null;
912
902
 
913
903
  /**
914
- * Updated traffic weight as a percentage (0–100). The control variant weight is
915
- * derived from the treatments (it is the remainder of the split) and cannot be set
916
- * directly.
904
+ * Updated share of the experiment's traffic as a whole-number percentage (0–100),
905
+ * not a relative weight. Treatment weights must total 99 or less. The control's
906
+ * weight is the remainder of the split and cannot be set directly; change a
907
+ * treatment instead. Omitted or null keeps the saved weight.
917
908
  */
918
909
  weight?: number | null;
919
910
  }
@@ -963,8 +954,8 @@ export namespace ExperimentVariantUpdateParams {
963
954
  * Canonical action payload. For `setText` / `setHtml` / `customCss` / `customJs` /
964
955
  * `setImage` / `insertBefore` / `insertAfter` this is the literal
965
956
  * text/HTML/CSS/JS/URL. For `setStyle` and `setAttribute` it is a JSON-stringified
966
- * `{key: value}` object — or you can supply the structured `styles` / `attribute`
967
- * field instead and the server will normalize.
957
+ * `{key: value}` object — or supply the structured `styles` / `attribute` field
958
+ * instead and the server will normalize.
968
959
  */
969
960
  value?: string | null;
970
961
  }
@@ -499,8 +499,8 @@ export namespace ExperimentListResponse {
499
499
  name: string;
500
500
 
501
501
  /**
502
- * Relative traffic weight used when assigning visitors among variants in an active
503
- * experiment.
502
+ * Share of the experiment's traffic as a percentage (0–100). Weights across all
503
+ * variants total 100; the control's weight is the remainder after the treatments.
504
504
  */
505
505
  weight: number;
506
506
 
@@ -550,31 +550,28 @@ export namespace ExperimentListResponse {
550
550
  * Canonical action payload. For `setText` / `setHtml` / `customCss` / `customJs` /
551
551
  * `setImage` / `insertBefore` / `insertAfter` this is the literal
552
552
  * text/HTML/CSS/JS/URL. For `setStyle` and `setAttribute` it is a JSON-stringified
553
- * `{key: value}` object — prefer the structured `styles` / `attribute` fields
554
- * below to avoid manual JSON encoding.
553
+ * `{key: value}` object; the structured `styles` / `attribute` fields carry the
554
+ * same data.
555
555
  */
556
556
  value: string;
557
557
 
558
558
  /**
559
- * Populated on read for `setAttribute` modifications, parsed from `value`.
560
- * Customers may also send this field instead of a JSON-stringified `value` on
561
- * write — see `domModificationInputSchema`.
559
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
560
+ * also be sent instead of a JSON-stringified `value` on write.
562
561
  */
563
562
  attribute?: DomModification.Attribute | null;
564
563
 
565
564
  /**
566
- * Populated on read for `setStyle` modifications, parsed from `value`. Customers
567
- * may also send this field instead of a JSON-stringified `value` on write — see
568
- * `domModificationInputSchema`.
565
+ * Populated on read for `setStyle` modifications, parsed from `value`. May also be
566
+ * sent instead of a JSON-stringified `value` on write.
569
567
  */
570
568
  styles?: Array<DomModification.Style> | null;
571
569
  }
572
570
 
573
571
  export namespace DomModification {
574
572
  /**
575
- * Populated on read for `setAttribute` modifications, parsed from `value`.
576
- * Customers may also send this field instead of a JSON-stringified `value` on
577
- * write — see `domModificationInputSchema`.
573
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
574
+ * also be sent instead of a JSON-stringified `value` on write.
578
575
  */
579
576
  export interface Attribute {
580
577
  /**
@@ -1462,8 +1459,8 @@ export namespace ExperimentCreateResponse {
1462
1459
  name: string;
1463
1460
 
1464
1461
  /**
1465
- * Relative traffic weight used when assigning visitors among variants in an active
1466
- * experiment.
1462
+ * Share of the experiment's traffic as a percentage (0–100). Weights across all
1463
+ * variants total 100; the control's weight is the remainder after the treatments.
1467
1464
  */
1468
1465
  weight: number;
1469
1466
 
@@ -1513,31 +1510,28 @@ export namespace ExperimentCreateResponse {
1513
1510
  * Canonical action payload. For `setText` / `setHtml` / `customCss` / `customJs` /
1514
1511
  * `setImage` / `insertBefore` / `insertAfter` this is the literal
1515
1512
  * text/HTML/CSS/JS/URL. For `setStyle` and `setAttribute` it is a JSON-stringified
1516
- * `{key: value}` object — prefer the structured `styles` / `attribute` fields
1517
- * below to avoid manual JSON encoding.
1513
+ * `{key: value}` object; the structured `styles` / `attribute` fields carry the
1514
+ * same data.
1518
1515
  */
1519
1516
  value: string;
1520
1517
 
1521
1518
  /**
1522
- * Populated on read for `setAttribute` modifications, parsed from `value`.
1523
- * Customers may also send this field instead of a JSON-stringified `value` on
1524
- * write — see `domModificationInputSchema`.
1519
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
1520
+ * also be sent instead of a JSON-stringified `value` on write.
1525
1521
  */
1526
1522
  attribute?: DomModification.Attribute | null;
1527
1523
 
1528
1524
  /**
1529
- * Populated on read for `setStyle` modifications, parsed from `value`. Customers
1530
- * may also send this field instead of a JSON-stringified `value` on write — see
1531
- * `domModificationInputSchema`.
1525
+ * Populated on read for `setStyle` modifications, parsed from `value`. May also be
1526
+ * sent instead of a JSON-stringified `value` on write.
1532
1527
  */
1533
1528
  styles?: Array<DomModification.Style> | null;
1534
1529
  }
1535
1530
 
1536
1531
  export namespace DomModification {
1537
1532
  /**
1538
- * Populated on read for `setAttribute` modifications, parsed from `value`.
1539
- * Customers may also send this field instead of a JSON-stringified `value` on
1540
- * write — see `domModificationInputSchema`.
1533
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
1534
+ * also be sent instead of a JSON-stringified `value` on write.
1541
1535
  */
1542
1536
  export interface Attribute {
1543
1537
  /**
@@ -2425,8 +2419,8 @@ export namespace ExperimentRetrieveResponse {
2425
2419
  name: string;
2426
2420
 
2427
2421
  /**
2428
- * Relative traffic weight used when assigning visitors among variants in an active
2429
- * experiment.
2422
+ * Share of the experiment's traffic as a percentage (0–100). Weights across all
2423
+ * variants total 100; the control's weight is the remainder after the treatments.
2430
2424
  */
2431
2425
  weight: number;
2432
2426
 
@@ -2476,31 +2470,28 @@ export namespace ExperimentRetrieveResponse {
2476
2470
  * Canonical action payload. For `setText` / `setHtml` / `customCss` / `customJs` /
2477
2471
  * `setImage` / `insertBefore` / `insertAfter` this is the literal
2478
2472
  * text/HTML/CSS/JS/URL. For `setStyle` and `setAttribute` it is a JSON-stringified
2479
- * `{key: value}` object — prefer the structured `styles` / `attribute` fields
2480
- * below to avoid manual JSON encoding.
2473
+ * `{key: value}` object; the structured `styles` / `attribute` fields carry the
2474
+ * same data.
2481
2475
  */
2482
2476
  value: string;
2483
2477
 
2484
2478
  /**
2485
- * Populated on read for `setAttribute` modifications, parsed from `value`.
2486
- * Customers may also send this field instead of a JSON-stringified `value` on
2487
- * write — see `domModificationInputSchema`.
2479
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
2480
+ * also be sent instead of a JSON-stringified `value` on write.
2488
2481
  */
2489
2482
  attribute?: DomModification.Attribute | null;
2490
2483
 
2491
2484
  /**
2492
- * Populated on read for `setStyle` modifications, parsed from `value`. Customers
2493
- * may also send this field instead of a JSON-stringified `value` on write — see
2494
- * `domModificationInputSchema`.
2485
+ * Populated on read for `setStyle` modifications, parsed from `value`. May also be
2486
+ * sent instead of a JSON-stringified `value` on write.
2495
2487
  */
2496
2488
  styles?: Array<DomModification.Style> | null;
2497
2489
  }
2498
2490
 
2499
2491
  export namespace DomModification {
2500
2492
  /**
2501
- * Populated on read for `setAttribute` modifications, parsed from `value`.
2502
- * Customers may also send this field instead of a JSON-stringified `value` on
2503
- * write — see `domModificationInputSchema`.
2493
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
2494
+ * also be sent instead of a JSON-stringified `value` on write.
2504
2495
  */
2505
2496
  export interface Attribute {
2506
2497
  /**
@@ -3388,8 +3379,8 @@ export namespace ExperimentUpdateResponse {
3388
3379
  name: string;
3389
3380
 
3390
3381
  /**
3391
- * Relative traffic weight used when assigning visitors among variants in an active
3392
- * experiment.
3382
+ * Share of the experiment's traffic as a percentage (0–100). Weights across all
3383
+ * variants total 100; the control's weight is the remainder after the treatments.
3393
3384
  */
3394
3385
  weight: number;
3395
3386
 
@@ -3439,31 +3430,28 @@ export namespace ExperimentUpdateResponse {
3439
3430
  * Canonical action payload. For `setText` / `setHtml` / `customCss` / `customJs` /
3440
3431
  * `setImage` / `insertBefore` / `insertAfter` this is the literal
3441
3432
  * text/HTML/CSS/JS/URL. For `setStyle` and `setAttribute` it is a JSON-stringified
3442
- * `{key: value}` object — prefer the structured `styles` / `attribute` fields
3443
- * below to avoid manual JSON encoding.
3433
+ * `{key: value}` object; the structured `styles` / `attribute` fields carry the
3434
+ * same data.
3444
3435
  */
3445
3436
  value: string;
3446
3437
 
3447
3438
  /**
3448
- * Populated on read for `setAttribute` modifications, parsed from `value`.
3449
- * Customers may also send this field instead of a JSON-stringified `value` on
3450
- * write — see `domModificationInputSchema`.
3439
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
3440
+ * also be sent instead of a JSON-stringified `value` on write.
3451
3441
  */
3452
3442
  attribute?: DomModification.Attribute | null;
3453
3443
 
3454
3444
  /**
3455
- * Populated on read for `setStyle` modifications, parsed from `value`. Customers
3456
- * may also send this field instead of a JSON-stringified `value` on write — see
3457
- * `domModificationInputSchema`.
3445
+ * Populated on read for `setStyle` modifications, parsed from `value`. May also be
3446
+ * sent instead of a JSON-stringified `value` on write.
3458
3447
  */
3459
3448
  styles?: Array<DomModification.Style> | null;
3460
3449
  }
3461
3450
 
3462
3451
  export namespace DomModification {
3463
3452
  /**
3464
- * Populated on read for `setAttribute` modifications, parsed from `value`.
3465
- * Customers may also send this field instead of a JSON-stringified `value` on
3466
- * write — see `domModificationInputSchema`.
3453
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
3454
+ * also be sent instead of a JSON-stringified `value` on write.
3467
3455
  */
3468
3456
  export interface Attribute {
3469
3457
  /**
@@ -4356,8 +4344,8 @@ export namespace ExperimentDuplicateResponse {
4356
4344
  name: string;
4357
4345
 
4358
4346
  /**
4359
- * Relative traffic weight used when assigning visitors among variants in an active
4360
- * experiment.
4347
+ * Share of the experiment's traffic as a percentage (0–100). Weights across all
4348
+ * variants total 100; the control's weight is the remainder after the treatments.
4361
4349
  */
4362
4350
  weight: number;
4363
4351
 
@@ -4407,31 +4395,28 @@ export namespace ExperimentDuplicateResponse {
4407
4395
  * Canonical action payload. For `setText` / `setHtml` / `customCss` / `customJs` /
4408
4396
  * `setImage` / `insertBefore` / `insertAfter` this is the literal
4409
4397
  * text/HTML/CSS/JS/URL. For `setStyle` and `setAttribute` it is a JSON-stringified
4410
- * `{key: value}` object — prefer the structured `styles` / `attribute` fields
4411
- * below to avoid manual JSON encoding.
4398
+ * `{key: value}` object; the structured `styles` / `attribute` fields carry the
4399
+ * same data.
4412
4400
  */
4413
4401
  value: string;
4414
4402
 
4415
4403
  /**
4416
- * Populated on read for `setAttribute` modifications, parsed from `value`.
4417
- * Customers may also send this field instead of a JSON-stringified `value` on
4418
- * write — see `domModificationInputSchema`.
4404
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
4405
+ * also be sent instead of a JSON-stringified `value` on write.
4419
4406
  */
4420
4407
  attribute?: DomModification.Attribute | null;
4421
4408
 
4422
4409
  /**
4423
- * Populated on read for `setStyle` modifications, parsed from `value`. Customers
4424
- * may also send this field instead of a JSON-stringified `value` on write — see
4425
- * `domModificationInputSchema`.
4410
+ * Populated on read for `setStyle` modifications, parsed from `value`. May also be
4411
+ * sent instead of a JSON-stringified `value` on write.
4426
4412
  */
4427
4413
  styles?: Array<DomModification.Style> | null;
4428
4414
  }
4429
4415
 
4430
4416
  export namespace DomModification {
4431
4417
  /**
4432
- * Populated on read for `setAttribute` modifications, parsed from `value`.
4433
- * Customers may also send this field instead of a JSON-stringified `value` on
4434
- * write — see `domModificationInputSchema`.
4418
+ * Populated on read for `setAttribute` modifications, parsed from `value`. May
4419
+ * also be sent instead of a JSON-stringified `value` on write.
4435
4420
  */
4436
4421
  export interface Attribute {
4437
4422
  /**