@empiricalrun/playwright-utils 0.65.1 → 0.66.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.
@@ -799,6 +799,58 @@ export interface paths {
799
799
  patch?: never;
800
800
  trace?: never;
801
801
  };
802
+ "/api/kv": {
803
+ parameters: {
804
+ query?: never;
805
+ header?: never;
806
+ path?: never;
807
+ cookie?: never;
808
+ };
809
+ /**
810
+ * List KV entries
811
+ * @description Lists unexpired entries in key order, optionally filtered by key prefix. Values are omitted unless `include_values=true`; a page with values ends early once it holds about 8 MB, so always follow `next_cursor`.
812
+ */
813
+ get: operations["listKvEntries"];
814
+ put?: never;
815
+ post?: never;
816
+ delete?: never;
817
+ options?: never;
818
+ head?: never;
819
+ patch?: never;
820
+ trace?: never;
821
+ };
822
+ "/api/kv/{key}": {
823
+ parameters: {
824
+ query?: never;
825
+ header?: never;
826
+ path?: never;
827
+ cookie?: never;
828
+ };
829
+ /**
830
+ * Get a KV entry
831
+ * @description Returns the entry stored under `key`, if it has not expired.
832
+ */
833
+ get: operations["getKvEntry"];
834
+ /**
835
+ * Write a KV entry
836
+ * @description Creates or replaces the entry under `key` with a required TTL. Send `If-None-Match: *` to create only (e.g. acquire a lock) or `If-Match: <version>` to replace only an unchanged entry.
837
+ */
838
+ put: operations["putKvEntry"];
839
+ post?: never;
840
+ /**
841
+ * Delete a KV entry
842
+ * @description Deletes the entry under `key`. Send `If-Match: <version>` to delete only an unchanged entry (e.g. release a lock you still hold).
843
+ */
844
+ delete: operations["deleteKvEntry"];
845
+ options?: never;
846
+ head?: never;
847
+ /**
848
+ * Refresh a KV entry's TTL
849
+ * @description Resets the entry's TTL without resending its value, e.g. to extend a lock lease. Send `If-Match: <version>` to refresh only an unchanged entry.
850
+ */
851
+ patch: operations["refreshKvEntry"];
852
+ trace?: never;
853
+ };
802
854
  "/api/v1/analytics/test-cases": {
803
855
  parameters: {
804
856
  query?: never;
@@ -5839,12 +5891,14 @@ export interface paths {
5839
5891
  };
5840
5892
  /**
5841
5893
  * ⚙️ Read project KV value
5894
+ * @deprecated
5842
5895
  * @description Reads a value from the scoped project's KV namespace.
5843
5896
  */
5844
5897
  get: operations["getProjectKv"];
5845
5898
  put?: never;
5846
5899
  /**
5847
5900
  * ⚙️ Write project KV value
5901
+ * @deprecated
5848
5902
  * @description Writes a value into the scoped project's KV namespace with a bounded TTL.
5849
5903
  */
5850
5904
  post: operations["setProjectKv"];
@@ -10380,6 +10434,109 @@ export interface components {
10380
10434
  /** @description Error detail when ingestion fails. */
10381
10435
  error?: unknown;
10382
10436
  };
10437
+ KvEntry: {
10438
+ /** @description Key, 1-512 characters from `A-Z a-z 0-9 . _ : -`. Use `:` to namespace keys, e.g. `pw-lock:1234:user-settings`. */
10439
+ key: string;
10440
+ /** @description The stored JSON value. Omitted from list responses unless `include_values=true`. */
10441
+ value?: (string | number | boolean | unknown[] | {
10442
+ [key: string]: unknown;
10443
+ }) | null;
10444
+ /** @description Increments on every write. Send it as `If-Match` to make a write conditional. */
10445
+ version: number;
10446
+ /**
10447
+ * Format: date-time
10448
+ * @description ISO 8601 timestamp when the entry expires.
10449
+ */
10450
+ expires_at: string;
10451
+ /**
10452
+ * Format: date-time
10453
+ * @description ISO 8601 timestamp when the entry was first written.
10454
+ */
10455
+ created_at: string;
10456
+ /**
10457
+ * Format: date-time
10458
+ * @description ISO 8601 timestamp of the latest write or TTL refresh.
10459
+ */
10460
+ updated_at: string;
10461
+ written_by: components["schemas"]["KvWriter"];
10462
+ };
10463
+ KvEntryResponse: {
10464
+ /** @description Response payload. */
10465
+ data: {
10466
+ entry: components["schemas"]["KvEntry"];
10467
+ };
10468
+ };
10469
+ KvListResponse: {
10470
+ /** @description Response payload. */
10471
+ data: {
10472
+ entries: components["schemas"]["KvEntry"][];
10473
+ /** @description Pass as `cursor` to load the next page; `null` at the end. */
10474
+ next_cursor: string | null;
10475
+ };
10476
+ };
10477
+ KvPreconditionFailedResponse: {
10478
+ /** @description Always null for error responses. */
10479
+ data: unknown;
10480
+ /** @description Error details with the current entry. */
10481
+ error: {
10482
+ /** @description Human-readable error message. */
10483
+ message: string;
10484
+ /** @description The entry as it is now, or `null` if the key does not exist. */
10485
+ current: {
10486
+ /** @description Key, 1-512 characters from `A-Z a-z 0-9 . _ : -`. Use `:` to namespace keys, e.g. `pw-lock:1234:user-settings`. */
10487
+ key: string;
10488
+ /** @description The stored JSON value. Omitted from list responses unless `include_values=true`. */
10489
+ value?: (string | number | boolean | unknown[] | {
10490
+ [key: string]: unknown;
10491
+ }) | null;
10492
+ /** @description Increments on every write. Send it as `If-Match` to make a write conditional. */
10493
+ version: number;
10494
+ /**
10495
+ * Format: date-time
10496
+ * @description ISO 8601 timestamp when the entry expires.
10497
+ */
10498
+ expires_at: string;
10499
+ /**
10500
+ * Format: date-time
10501
+ * @description ISO 8601 timestamp when the entry was first written.
10502
+ */
10503
+ created_at: string;
10504
+ /**
10505
+ * Format: date-time
10506
+ * @description ISO 8601 timestamp of the latest write or TTL refresh.
10507
+ */
10508
+ updated_at: string;
10509
+ written_by: components["schemas"]["KvWriter"];
10510
+ } | null;
10511
+ };
10512
+ };
10513
+ /** @description Who last wrote or refreshed the entry. */
10514
+ KvWriter: {
10515
+ /** @enum {string} */
10516
+ kind: "user";
10517
+ /** @description User ID. */
10518
+ id: string;
10519
+ } | {
10520
+ /** @enum {string} */
10521
+ kind: "chat_session";
10522
+ /** @description Chat session ID. */
10523
+ id: string;
10524
+ } | {
10525
+ /** @enum {string} */
10526
+ kind: "test_run";
10527
+ /** @description Test run ID. */
10528
+ id: string;
10529
+ } | {
10530
+ /** @enum {string} */
10531
+ kind: "api_key";
10532
+ /** @description Project API key ID. */
10533
+ id: string;
10534
+ } | {
10535
+ /** @enum {string} */
10536
+ kind: "system";
10537
+ /** @description Service name, when known. */
10538
+ id: string | null;
10539
+ };
10383
10540
  LastPassPerEnvEntry: {
10384
10541
  /** @description Environment ID the test last passed in. */
10385
10542
  environment_id: string;
@@ -11816,6 +11973,10 @@ export interface components {
11816
11973
  } | null;
11817
11974
  source_run_id?: number | null;
11818
11975
  };
11976
+ PatchKvEntryRequest: {
11977
+ /** @description Time-to-live in seconds (max 30 days). */
11978
+ ttl: number;
11979
+ };
11819
11980
  PatchProjectResponse: {
11820
11981
  /** @description Always true. */
11821
11982
  success: boolean;
@@ -12446,6 +12607,14 @@ export interface components {
12446
12607
  /** @description Rules that do not affect how Empirical merges, e.g. "Blocks force pushes". */
12447
12608
  other_rules: string[];
12448
12609
  };
12610
+ PutKvEntryRequest: {
12611
+ /** @description JSON value to store (max 1 MB serialized). */
12612
+ value: (string | number | boolean | unknown[] | {
12613
+ [key: string]: unknown;
12614
+ }) | null;
12615
+ /** @description Time-to-live in seconds (max 30 days). */
12616
+ ttl: number;
12617
+ };
12449
12618
  PutRunManifestRequest: {
12450
12619
  /** @description Structured scheduled tests. */
12451
12620
  tests: {
@@ -18608,6 +18777,314 @@ export interface operations {
18608
18777
  };
18609
18778
  };
18610
18779
  };
18780
+ listKvEntries: {
18781
+ parameters: {
18782
+ query?: {
18783
+ /** @description Only return keys that start with this prefix. */
18784
+ prefix?: string;
18785
+ /** @description Pass a previous page's `next_cursor` to continue listing. */
18786
+ cursor?: string;
18787
+ /** @description Maximum entries to return (max 1000). */
18788
+ limit?: number;
18789
+ /** @description Include each entry's value. */
18790
+ include_values?: "true" | "false";
18791
+ };
18792
+ header?: never;
18793
+ path?: never;
18794
+ cookie?: never;
18795
+ };
18796
+ requestBody?: never;
18797
+ responses: {
18798
+ /** @description A page of entries. */
18799
+ 200: {
18800
+ headers: {
18801
+ [name: string]: unknown;
18802
+ };
18803
+ content: {
18804
+ "application/json": components["schemas"]["KvListResponse"];
18805
+ };
18806
+ };
18807
+ /** @description Invalid request. */
18808
+ 400: {
18809
+ headers: {
18810
+ [name: string]: unknown;
18811
+ };
18812
+ content: {
18813
+ "application/json": components["schemas"]["ErrorResponse"];
18814
+ };
18815
+ };
18816
+ /** @description KV store not configured. */
18817
+ 503: {
18818
+ headers: {
18819
+ [name: string]: unknown;
18820
+ };
18821
+ content: {
18822
+ "application/json": components["schemas"]["ErrorResponse"];
18823
+ };
18824
+ };
18825
+ };
18826
+ };
18827
+ getKvEntry: {
18828
+ parameters: {
18829
+ query?: never;
18830
+ header?: never;
18831
+ path: {
18832
+ /** @description Key, 1-512 characters from `A-Z a-z 0-9 . _ : -`. Use `:` to namespace keys, e.g. `pw-lock:1234:user-settings`. */
18833
+ key: string;
18834
+ };
18835
+ cookie?: never;
18836
+ };
18837
+ requestBody?: never;
18838
+ responses: {
18839
+ /** @description The entry. */
18840
+ 200: {
18841
+ headers: {
18842
+ /** @description The entry's `version`, for use in `If-Match`. */
18843
+ ETag: string;
18844
+ [name: string]: unknown;
18845
+ };
18846
+ content: {
18847
+ "application/json": components["schemas"]["KvEntryResponse"];
18848
+ };
18849
+ };
18850
+ /** @description Invalid key. */
18851
+ 400: {
18852
+ headers: {
18853
+ [name: string]: unknown;
18854
+ };
18855
+ content: {
18856
+ "application/json": components["schemas"]["ErrorResponse"];
18857
+ };
18858
+ };
18859
+ /** @description No entry under this key. */
18860
+ 404: {
18861
+ headers: {
18862
+ [name: string]: unknown;
18863
+ };
18864
+ content: {
18865
+ "application/json": components["schemas"]["ErrorResponse"];
18866
+ };
18867
+ };
18868
+ /** @description KV store not configured. */
18869
+ 503: {
18870
+ headers: {
18871
+ [name: string]: unknown;
18872
+ };
18873
+ content: {
18874
+ "application/json": components["schemas"]["ErrorResponse"];
18875
+ };
18876
+ };
18877
+ };
18878
+ };
18879
+ putKvEntry: {
18880
+ parameters: {
18881
+ query?: never;
18882
+ header?: {
18883
+ /** @description Apply only if the entry's current `version` equals this value (its `ETag`). */
18884
+ "if-match"?: string;
18885
+ /** @description Send `*` to write only if the key does not exist. */
18886
+ "if-none-match"?: "*";
18887
+ };
18888
+ path: {
18889
+ /** @description Key, 1-512 characters from `A-Z a-z 0-9 . _ : -`. Use `:` to namespace keys, e.g. `pw-lock:1234:user-settings`. */
18890
+ key: string;
18891
+ };
18892
+ cookie?: never;
18893
+ };
18894
+ requestBody?: {
18895
+ content: {
18896
+ "application/json": components["schemas"]["PutKvEntryRequest"];
18897
+ };
18898
+ };
18899
+ responses: {
18900
+ /** @description The entry was replaced. */
18901
+ 200: {
18902
+ headers: {
18903
+ /** @description The entry's `version`, for use in `If-Match`. */
18904
+ ETag: string;
18905
+ [name: string]: unknown;
18906
+ };
18907
+ content: {
18908
+ "application/json": components["schemas"]["KvEntryResponse"];
18909
+ };
18910
+ };
18911
+ /** @description The entry was created. */
18912
+ 201: {
18913
+ headers: {
18914
+ /** @description The entry's `version`, for use in `If-Match`. */
18915
+ ETag: string;
18916
+ [name: string]: unknown;
18917
+ };
18918
+ content: {
18919
+ "application/json": components["schemas"]["KvEntryResponse"];
18920
+ };
18921
+ };
18922
+ /** @description Invalid request. */
18923
+ 400: {
18924
+ headers: {
18925
+ [name: string]: unknown;
18926
+ };
18927
+ content: {
18928
+ "application/json": components["schemas"]["ErrorResponse"];
18929
+ };
18930
+ };
18931
+ /** @description The `If-Match` or `If-None-Match` condition did not hold. */
18932
+ 412: {
18933
+ headers: {
18934
+ [name: string]: unknown;
18935
+ };
18936
+ content: {
18937
+ "application/json": components["schemas"]["KvPreconditionFailedResponse"];
18938
+ };
18939
+ };
18940
+ /** @description Value larger than 1 MB. */
18941
+ 413: {
18942
+ headers: {
18943
+ [name: string]: unknown;
18944
+ };
18945
+ content: {
18946
+ "application/json": components["schemas"]["ErrorResponse"];
18947
+ };
18948
+ };
18949
+ /** @description KV store not configured. */
18950
+ 503: {
18951
+ headers: {
18952
+ [name: string]: unknown;
18953
+ };
18954
+ content: {
18955
+ "application/json": components["schemas"]["ErrorResponse"];
18956
+ };
18957
+ };
18958
+ };
18959
+ };
18960
+ deleteKvEntry: {
18961
+ parameters: {
18962
+ query?: never;
18963
+ header?: {
18964
+ /** @description Apply only if the entry's current `version` equals this value (its `ETag`). */
18965
+ "if-match"?: string;
18966
+ };
18967
+ path: {
18968
+ /** @description Key, 1-512 characters from `A-Z a-z 0-9 . _ : -`. Use `:` to namespace keys, e.g. `pw-lock:1234:user-settings`. */
18969
+ key: string;
18970
+ };
18971
+ cookie?: never;
18972
+ };
18973
+ requestBody?: never;
18974
+ responses: {
18975
+ /** @description Deleted. */
18976
+ 204: {
18977
+ headers: {
18978
+ [name: string]: unknown;
18979
+ };
18980
+ content?: never;
18981
+ };
18982
+ /** @description Invalid request. */
18983
+ 400: {
18984
+ headers: {
18985
+ [name: string]: unknown;
18986
+ };
18987
+ content: {
18988
+ "application/json": components["schemas"]["ErrorResponse"];
18989
+ };
18990
+ };
18991
+ /** @description No entry under this key. */
18992
+ 404: {
18993
+ headers: {
18994
+ [name: string]: unknown;
18995
+ };
18996
+ content: {
18997
+ "application/json": components["schemas"]["ErrorResponse"];
18998
+ };
18999
+ };
19000
+ /** @description The `If-Match` or `If-None-Match` condition did not hold. */
19001
+ 412: {
19002
+ headers: {
19003
+ [name: string]: unknown;
19004
+ };
19005
+ content: {
19006
+ "application/json": components["schemas"]["KvPreconditionFailedResponse"];
19007
+ };
19008
+ };
19009
+ /** @description KV store not configured. */
19010
+ 503: {
19011
+ headers: {
19012
+ [name: string]: unknown;
19013
+ };
19014
+ content: {
19015
+ "application/json": components["schemas"]["ErrorResponse"];
19016
+ };
19017
+ };
19018
+ };
19019
+ };
19020
+ refreshKvEntry: {
19021
+ parameters: {
19022
+ query?: never;
19023
+ header?: {
19024
+ /** @description Apply only if the entry's current `version` equals this value (its `ETag`). */
19025
+ "if-match"?: string;
19026
+ };
19027
+ path: {
19028
+ /** @description Key, 1-512 characters from `A-Z a-z 0-9 . _ : -`. Use `:` to namespace keys, e.g. `pw-lock:1234:user-settings`. */
19029
+ key: string;
19030
+ };
19031
+ cookie?: never;
19032
+ };
19033
+ requestBody?: {
19034
+ content: {
19035
+ "application/json": components["schemas"]["PatchKvEntryRequest"];
19036
+ };
19037
+ };
19038
+ responses: {
19039
+ /** @description The refreshed entry. */
19040
+ 200: {
19041
+ headers: {
19042
+ /** @description The entry's `version`, for use in `If-Match`. */
19043
+ ETag: string;
19044
+ [name: string]: unknown;
19045
+ };
19046
+ content: {
19047
+ "application/json": components["schemas"]["KvEntryResponse"];
19048
+ };
19049
+ };
19050
+ /** @description Invalid request. */
19051
+ 400: {
19052
+ headers: {
19053
+ [name: string]: unknown;
19054
+ };
19055
+ content: {
19056
+ "application/json": components["schemas"]["ErrorResponse"];
19057
+ };
19058
+ };
19059
+ /** @description No entry under this key. */
19060
+ 404: {
19061
+ headers: {
19062
+ [name: string]: unknown;
19063
+ };
19064
+ content: {
19065
+ "application/json": components["schemas"]["ErrorResponse"];
19066
+ };
19067
+ };
19068
+ /** @description The `If-Match` or `If-None-Match` condition did not hold. */
19069
+ 412: {
19070
+ headers: {
19071
+ [name: string]: unknown;
19072
+ };
19073
+ content: {
19074
+ "application/json": components["schemas"]["KvPreconditionFailedResponse"];
19075
+ };
19076
+ };
19077
+ /** @description KV store not configured. */
19078
+ 503: {
19079
+ headers: {
19080
+ [name: string]: unknown;
19081
+ };
19082
+ content: {
19083
+ "application/json": components["schemas"]["ErrorResponse"];
19084
+ };
19085
+ };
19086
+ };
19087
+ };
18611
19088
  listTestCasesAnalyticsV1: {
18612
19089
  parameters: {
18613
19090
  query?: {
@@ -32554,7 +33031,7 @@ export interface operations {
32554
33031
  key: string;
32555
33032
  /** @description JSON value to store. */
32556
33033
  value?: unknown;
32557
- /** @description Time-to-live in seconds (max 2 days). */
33034
+ /** @description Time-to-live in seconds (max 30 days). */
32558
33035
  ttl: number;
32559
33036
  };
32560
33037
  };
@@ -32578,7 +33055,7 @@ export interface operations {
32578
33055
  "application/json": components["schemas"]["ErrorResponse"];
32579
33056
  };
32580
33057
  };
32581
- /** @description Value larger than 2 MB. */
33058
+ /** @description Value larger than 1 MB. */
32582
33059
  413: {
32583
33060
  headers: {
32584
33061
  [name: string]: unknown;