@types/k6 0.47.3 → 0.49.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.
k6/README.md CHANGED
@@ -2,14 +2,14 @@
2
2
  > `npm install --save @types/k6`
3
3
 
4
4
  # Summary
5
- This package contains type definitions for k6 (https://k6.io/docs/).
5
+ This package contains type definitions for k6 (https://grafana.com/docs/k6/latest/).
6
6
 
7
7
  # Details
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 16 Nov 2023 00:23:37 GMT
11
+ * Last updated: Mon, 29 Jan 2024 10:07:04 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
15
- These definitions were written by [Mihail Stoykov](https://github.com/MStoykov), [Ivan](https://github.com/codebien), [Théo Crevon](https://github.com/oleiade), [Oleg Bespalov](https://github.com/olegbespalov), [Pepe Cano](https://github.com/ppcano), [Nicole van der Hoeven](https://github.com/nicolevanderhoeven), [Ankur Agarwal](https://github.com/ankur22), [İnanç Gümüş](https://github.com/inancgumus), and [Daniel Jiménez](https://github.com/ka3de).
15
+ These definitions were written by [Mihail Stoykov](https://github.com/MStoykov), [Ivan](https://github.com/codebien), [Théo Crevon](https://github.com/oleiade), [Oleg Bespalov](https://github.com/olegbespalov), [Pepe Cano](https://github.com/ppcano), [Nicole van der Hoeven](https://github.com/nicolevanderhoeven), [Ankur Agarwal](https://github.com/ankur22), [İnanç Gümüş](https://github.com/inancgumus), [Daniel Jiménez](https://github.com/ka3de), and [Joan López de la Franca Beltran](https://github.com/joanlopez).
k6/crypto.d.ts CHANGED
@@ -13,7 +13,7 @@ export function randomBytes(size: number): ArrayBuffer;
13
13
 
14
14
  /**
15
15
  * Produce HMAC.
16
- * https://k6.io/docs/javascript-api/k6-crypto/hmac-algorithm-secret-data-outputencoding/
16
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/hmac/
17
17
  * @param algorithm - Hash algorithm.
18
18
  * @param secret - Shared secret.
19
19
  * @param input - Input data.
@@ -31,7 +31,7 @@ export function hmac<OE extends OutputEncoding>(
31
31
 
32
32
  /**
33
33
  * Hash with MD4.
34
- * https://k6.io/docs/javascript-api/k6-crypto/md4-input-outputencoding/
34
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/md4/
35
35
  * @param input - Data to hash.
36
36
  * @param outputEncoding - Output encoding.
37
37
  * @returns MD4 digest.
@@ -42,7 +42,7 @@ export function md4<OE extends OutputEncoding>(input: string | ArrayBuffer, outp
42
42
 
43
43
  /**
44
44
  * Hash with MD5.
45
- * https://k6.io/docs/javascript-api/k6-crypto/md5-input-outputencoding/
45
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/md5/
46
46
  * @param input - Data to hash.
47
47
  * @param outputEncoding - Output encoding.
48
48
  * @returns MD5 digest.
@@ -53,7 +53,7 @@ export function md5<OE extends OutputEncoding>(input: string | ArrayBuffer, outp
53
53
 
54
54
  /**
55
55
  * Hash with SHA-1.
56
- * https://k6.io/docs/javascript-api/k6-crypto/sha1-input-outputencoding/
56
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/sha1/
57
57
  * @param input - Data to hash.
58
58
  * @param outputEncoding - Output encoding.
59
59
  * @returns SHA-1 digest.
@@ -64,7 +64,7 @@ export function sha1<OE extends OutputEncoding>(input: string | ArrayBuffer, out
64
64
 
65
65
  /**
66
66
  * Hash with SHA-256.
67
- * https://k6.io/docs/javascript-api/k6-crypto/sha256-input-outputencoding/
67
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/sha256/
68
68
  * @param input - Data to hash.
69
69
  * @param outputEncoding - Output encoding.
70
70
  * @returns SHA-256 digest.
@@ -75,7 +75,7 @@ export function sha256<OE extends OutputEncoding>(input: string | ArrayBuffer, o
75
75
 
76
76
  /**
77
77
  * Hash with SHA-384.
78
- * https://k6.io/docs/javascript-api/k6-crypto/sha384-input-outputencoding/
78
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/sha384/
79
79
  * @param input - Data to hash.
80
80
  * @param outputEncoding - Output encoding.
81
81
  * @returns SHA-384 digest.
@@ -86,7 +86,7 @@ export function sha384<OE extends OutputEncoding>(input: string | ArrayBuffer, o
86
86
 
87
87
  /**
88
88
  * Hash with SHA-512.
89
- * https://k6.io/docs/javascript-api/k6-crypto/sha512-input-outputencoding/
89
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/sha512/
90
90
  * @param input - Data to hash.
91
91
  * @param outputEncoding - Output encoding.
92
92
  * @returns SHA-512 digest.
@@ -97,7 +97,7 @@ export function sha512<OE extends OutputEncoding>(input: string | ArrayBuffer, o
97
97
 
98
98
  /**
99
99
  * Hash with SHA-512/224.
100
- * https://k6.io/docs/javascript-api/k6-crypto/sha512_224-input-outputencoding/
100
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/sha512_224/
101
101
  * @param input - Data to hash.
102
102
  * @param outputEncoding - Output encoding.
103
103
  * @returns SHA-512/224 digest.
@@ -108,7 +108,7 @@ export function sha512_224<OE extends OutputEncoding>(input: string | ArrayBuffe
108
108
 
109
109
  /**
110
110
  * Hash with SHA-512/256.
111
- * https://k6.io/docs/javascript-api/k6-crypto/sha512_256-input-outputencoding/
111
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/sha512_256/
112
112
  * @param input - Data to hash.
113
113
  * @param outputEncoding - Output encoding.
114
114
  * @returns SHA-512/256 digest.
@@ -119,7 +119,7 @@ export function sha512_256<OE extends OutputEncoding>(input: string | ArrayBuffe
119
119
 
120
120
  /**
121
121
  * Hash with RIPEMD-160.
122
- * https://k6.io/docs/javascript-api/k6-crypto/ripemd160-input-outputencoding/
122
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/ripemd160/
123
123
  * @param input - Data to hash.
124
124
  * @param outputEncoding - Output encoding.
125
125
  * @returns RIPEMD-160 digest.
@@ -130,7 +130,7 @@ export function ripemd160<OE extends OutputEncoding>(input: string | ArrayBuffer
130
130
 
131
131
  /**
132
132
  * Create a hashing object.
133
- * https://k6.io/docs/javascript-api/k6-crypto/createhash-algorithm/
133
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/createhash/
134
134
  * @param algorithm - Hash algorithm.
135
135
  * @returns Hashing object.
136
136
  * @example
@@ -139,7 +139,7 @@ export function createHash(algorithm: Algorithm): Hasher;
139
139
 
140
140
  /**
141
141
  * Create an HMAC hashing object.
142
- * https://k6.io/docs/javascript-api/k6-crypto/createhmac-algorithm-secret/
142
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/createhmac/
143
143
  * @param algorithm - Hash algorithm.
144
144
  * @param secret - Shared secret.
145
145
  * @returns HMAC hashing object.
@@ -186,14 +186,14 @@ export type Output<OE extends OutputEncoding> = OE extends StringEncoding ? stri
186
186
 
187
187
  /**
188
188
  * Hashing object.
189
- * https://k6.io/docs/javascript-api/k6-crypto/hasher/
189
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/hasher/
190
190
  */
191
191
  export abstract class Hasher {
192
192
  protected __brand: never;
193
193
 
194
194
  /**
195
195
  * Add more data to the string we want to create a hash of.
196
- * https://k6.io/docs/javascript-api/k6-crypto/hasher/
196
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/hasher/
197
197
  * @param input - Data to add.
198
198
  * @example
199
199
  * let hasher = crypto.createHMAC('sha256', 'a secret');
@@ -205,7 +205,7 @@ export abstract class Hasher {
205
205
 
206
206
  /**
207
207
  * Return a digest from the data added so far.
208
- * https://k6.io/docs/javascript-api/k6-crypto/hasher/
208
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/hasher/
209
209
  * @param outputEncoding - Output encoding.
210
210
  * @returns Digest of data added so far.
211
211
  * @example
@@ -219,7 +219,7 @@ export abstract class Hasher {
219
219
 
220
220
  /**
221
221
  * This module provides common hashing functionality available in the GoLang crypto package.
222
- * https://k6.io/docs/javascript-api/k6-crypto/
222
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/
223
223
  */
224
224
  declare namespace crypto {
225
225
  /**
@@ -235,7 +235,7 @@ declare namespace crypto {
235
235
 
236
236
  /**
237
237
  * Produce HMAC.
238
- * https://k6.io/docs/javascript-api/k6-crypto/hmac-algorithm-secret-data-outputencoding/
238
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/hmac/
239
239
  * @param algorithm - Hash algorithm.
240
240
  * @param secret - Shared secret.
241
241
  * @param input - Input data.
@@ -253,7 +253,7 @@ declare namespace crypto {
253
253
 
254
254
  /**
255
255
  * Hash with MD4.
256
- * https://k6.io/docs/javascript-api/k6-crypto/md4-input-outputencoding/
256
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/md4/
257
257
  * @param input - Data to hash.
258
258
  * @param outputEncoding - Output encoding.
259
259
  * @returns MD4 digest.
@@ -264,7 +264,7 @@ declare namespace crypto {
264
264
 
265
265
  /**
266
266
  * Hash with MD5.
267
- * https://k6.io/docs/javascript-api/k6-crypto/md5-input-outputencoding/
267
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/md5/
268
268
  * @param input - Data to hash.
269
269
  * @param outputEncoding - Output encoding.
270
270
  * @returns MD5 digest.
@@ -275,7 +275,7 @@ declare namespace crypto {
275
275
 
276
276
  /**
277
277
  * Hash with SHA-1.
278
- * https://k6.io/docs/javascript-api/k6-crypto/sha1-input-outputencoding/
278
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/sha1/
279
279
  * @param input - Data to hash.
280
280
  * @param outputEncoding - Output encoding.
281
281
  * @returns SHA-1 digest.
@@ -286,7 +286,7 @@ declare namespace crypto {
286
286
 
287
287
  /**
288
288
  * Hash with SHA-256.
289
- * https://k6.io/docs/javascript-api/k6-crypto/sha256-input-outputencoding/
289
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/sha256/
290
290
  * @param input - Data to hash.
291
291
  * @param outputEncoding - Output encoding.
292
292
  * @returns SHA-256 digest.
@@ -297,7 +297,7 @@ declare namespace crypto {
297
297
 
298
298
  /**
299
299
  * Hash with SHA-384.
300
- * https://k6.io/docs/javascript-api/k6-crypto/sha384-input-outputencoding/
300
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/sha384/
301
301
  * @param input - Data to hash.
302
302
  * @param outputEncoding - Output encoding.
303
303
  * @returns SHA-384 digest.
@@ -308,7 +308,7 @@ declare namespace crypto {
308
308
 
309
309
  /**
310
310
  * Hash with SHA-512.
311
- * https://k6.io/docs/javascript-api/k6-crypto/sha512-input-outputencoding/
311
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/sha512/
312
312
  * @param input - Data to hash.
313
313
  * @param outputEncoding - Output encoding.
314
314
  * @returns SHA-512 digest.
@@ -319,7 +319,7 @@ declare namespace crypto {
319
319
 
320
320
  /**
321
321
  * Hash with SHA-512/224.
322
- * https://k6.io/docs/javascript-api/k6-crypto/sha512_224-input-outputencoding/
322
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/sha512_224/
323
323
  * @param input - Data to hash.
324
324
  * @param outputEncoding - Output encoding.
325
325
  * @returns SHA-512/224 digest.
@@ -330,7 +330,7 @@ declare namespace crypto {
330
330
 
331
331
  /**
332
332
  * Hash with SHA-512/256.
333
- * https://k6.io/docs/javascript-api/k6-crypto/sha512_256-input-outputencoding/
333
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/sha512_256/
334
334
  * @param input - Data to hash.
335
335
  * @param outputEncoding - Output encoding.
336
336
  * @returns SHA-512/256 digest.
@@ -341,7 +341,7 @@ declare namespace crypto {
341
341
 
342
342
  /**
343
343
  * Hash with RIPEMD-160.
344
- * https://k6.io/docs/javascript-api/k6-crypto/ripemd160-input-outputencoding/
344
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/ripemd160/
345
345
  * @param input - Data to hash.
346
346
  * @param outputEncoding - Output encoding.
347
347
  * @returns RIPEMD-160 digest.
@@ -352,7 +352,7 @@ declare namespace crypto {
352
352
 
353
353
  /**
354
354
  * Create a hashing object.
355
- * https://k6.io/docs/javascript-api/k6-crypto/createhash-algorithm/
355
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/createhash/
356
356
  * @param algorithm - Hash algorithm.
357
357
  * @returns Hashing object.
358
358
  * @example
@@ -365,7 +365,7 @@ declare namespace crypto {
365
365
 
366
366
  /**
367
367
  * Create an HMAC hashing object.
368
- * https://k6.io/docs/javascript-api/k6-crypto/createhmac-algorithm-secret/
368
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-crypto/createhmac/
369
369
  * @param algorithm - Hash algorithm.
370
370
  * @param secret - Shared secret.
371
371
  * @returns HMAC hashing object.
k6/data.d.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  /**
2
2
  * Given a name and a function that returns an array, the SharedArray constructor returns the same array but sharing the array memory between VUs.
3
- * https://k6.io/docs/javascript-api/k6-data/sharedarray/
3
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-data/sharedarray/
4
4
  */
5
5
  export const SharedArray: {
6
6
  /**
7
7
  * Given a name and a function that returns an array, the SharedArray constructor returns the same array but sharing the array memory between VUs.
8
- * https://k6.io/docs/javascript-api/k6-data/sharedarray/
8
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-data/sharedarray/
9
9
  */
10
10
  new(name: string, callback: () => []): [];
11
11
  /**
12
12
  * Given a name and a function that returns an array, the SharedArray constructor returns the same array but sharing the array memory between VUs.
13
- * https://k6.io/docs/javascript-api/k6-data/sharedarray/
13
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-data/sharedarray/
14
14
  */
15
15
  new<T>(name: string, callback: () => T[]): T[];
16
16
  };
k6/encoding.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Base64 decode a string.
3
- * https://k6.io/docs/javascript-api/k6-encoding/b64decode-input-encoding-format/
3
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-encoding/b64decode/
4
4
  * @param input - The string to base64 decode.
5
5
  * @param encoding - Base64 variant.
6
6
  * @returns The base64 decoded version of the input string in either string or ArrayBuffer format, depending on the `format` parameter.
@@ -14,7 +14,7 @@ export function b64decode(input: string, encoding?: Base64Variant): ArrayBuffer;
14
14
 
15
15
  /**
16
16
  * Base64 decode a string.
17
- * https://k6.io/docs/javascript-api/k6-encoding/b64decode-input-encoding-format/
17
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-encoding/b64decode/
18
18
  * @param input - The string to base64 decode.
19
19
  * @param encoding - Base64 variant.
20
20
  * @param format - If 's' return the data as a string, otherwise an ArrayBuffer object .
@@ -28,7 +28,7 @@ export function b64decode(input: string, encoding: Base64Variant, format: "s"):
28
28
 
29
29
  /**
30
30
  * Base64 encode a string.
31
- * https://k6.io/docs/javascript-api/k6-encoding/b64encode-input-encoding/
31
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-encoding/b64encode/
32
32
  * @param input - String to encode or ArrayBuffer object.
33
33
  * @param encoding - Base64 variant.
34
34
  * @returns Base64 encoded string.
@@ -45,12 +45,12 @@ export type Base64Variant = "std" | "rawstd" | "url" | "rawurl";
45
45
 
46
46
  /**
47
47
  * The encoding module provides base64 encoding/decoding.
48
- * https://k6.io/docs/javascript-api/k6-encoding/
48
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-encoding/
49
49
  */
50
50
  declare namespace encoding {
51
51
  /**
52
52
  * Base64 decode a string.
53
- * https://k6.io/docs/javascript-api/k6-encoding/b64decode-input-encoding-format/
53
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-encoding/b64decode/
54
54
  * @param input - The string to base64 decode.
55
55
  * @param encoding - Base64 variant.
56
56
  * @returns The base64 decoded version of the input string in either string or ArrayBuffer format, depending on the `format` parameter.
@@ -63,7 +63,7 @@ declare namespace encoding {
63
63
  function b64decode(input: string, encoding?: Base64Variant): ArrayBuffer;
64
64
  /**
65
65
  * Base64 decode a string.
66
- * https://k6.io/docs/javascript-api/k6-encoding/b64decode-input-encoding-format/
66
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-encoding/b64decode/
67
67
  * @param input - The string to base64 decode.
68
68
  * @param encoding - Base64 variant.
69
69
  * @param format - If 's' return the data as a string, otherwise an ArrayBuffer object .
@@ -76,7 +76,7 @@ declare namespace encoding {
76
76
  function b64decode(input: string, encoding: Base64Variant, format: "s"): string;
77
77
  /**
78
78
  * Base64 decode a string.
79
- * https://k6.io/docs/javascript-api/k6-encoding/b64decode-input-encoding/
79
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-encoding/b64decode/
80
80
  * @param input - Base64 encoded string or ArrayBuffer object.
81
81
  * @param encoding - Base64 variant.
82
82
  * @returns Decoded string.
k6/execution.d.ts CHANGED
@@ -2,7 +2,7 @@ import { Options } from "./options";
2
2
 
3
3
  /*
4
4
  * The execution module provides information about the current test execution state.
5
- * https://k6.io/docs/javascript-api/k6-execution/
5
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-execution/
6
6
  */
7
7
  declare namespace execution {
8
8
  /**
@@ -67,7 +67,7 @@ declare namespace execution {
67
67
  const test: {
68
68
  /**
69
69
  * Aborts the test run with the exit code 108.
70
- * https://k6.io/docs/javascript-api/k6-execution/#test
70
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-execution/#test
71
71
  * @param input - Aborted message.
72
72
  * @example
73
73
  * import exec from "k6/execution";