@gatling.io/core 0.1.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 (109) hide show
  1. package/package.json +24 -0
  2. package/target/assertions.d.ts +214 -0
  3. package/target/assertions.js +63 -0
  4. package/target/body.d.ts +150 -0
  5. package/target/body.js +33 -0
  6. package/target/checks/builder.d.ts +10 -0
  7. package/target/checks/builder.js +7 -0
  8. package/target/checks/captureGroup.d.ts +15 -0
  9. package/target/checks/captureGroup.js +9 -0
  10. package/target/checks/condition.d.ts +19 -0
  11. package/target/checks/condition.js +7 -0
  12. package/target/checks/final.d.ts +23 -0
  13. package/target/checks/final.js +10 -0
  14. package/target/checks/find.d.ts +17 -0
  15. package/target/checks/find.js +9 -0
  16. package/target/checks/index.d.ts +408 -0
  17. package/target/checks/index.js +181 -0
  18. package/target/checks/jsonOfTypeFind.d.ts +56 -0
  19. package/target/checks/jsonOfTypeFind.js +16 -0
  20. package/target/checks/jsonOfTypeMultipleFind.d.ts +56 -0
  21. package/target/checks/jsonOfTypeMultipleFind.js +16 -0
  22. package/target/checks/multipleFind.d.ts +57 -0
  23. package/target/checks/multipleFind.js +26 -0
  24. package/target/checks/validate.d.ts +242 -0
  25. package/target/checks/validate.js +50 -0
  26. package/target/closedInjection.d.ts +33 -0
  27. package/target/closedInjection.js +38 -0
  28. package/target/common.d.ts +3 -0
  29. package/target/common.js +2 -0
  30. package/target/feeders.d.ts +203 -0
  31. package/target/feeders.js +74 -0
  32. package/target/filters.d.ts +31 -0
  33. package/target/filters.js +32 -0
  34. package/target/gatlingJvm/app.d.ts +4 -0
  35. package/target/gatlingJvm/app.js +2 -0
  36. package/target/gatlingJvm/callbacks.d.ts +9 -0
  37. package/target/gatlingJvm/callbacks.js +14 -0
  38. package/target/gatlingJvm/collections.d.ts +1 -0
  39. package/target/gatlingJvm/collections.js +31 -0
  40. package/target/index.d.ts +115 -0
  41. package/target/index.js +56 -0
  42. package/target/openInjection.d.ts +51 -0
  43. package/target/openInjection.js +62 -0
  44. package/target/population.d.ts +82 -0
  45. package/target/population.js +22 -0
  46. package/target/protocol.d.ts +5 -0
  47. package/target/protocol.js +3 -0
  48. package/target/scenario.d.ts +10 -0
  49. package/target/scenario.js +17 -0
  50. package/target/session.d.ts +28 -0
  51. package/target/session.js +42 -0
  52. package/target/structure/asLongAs.d.ts +74 -0
  53. package/target/structure/asLongAs.js +47 -0
  54. package/target/structure/asLongAsDuring.d.ts +221 -0
  55. package/target/structure/asLongAsDuring.js +92 -0
  56. package/target/structure/choices.d.ts +18 -0
  57. package/target/structure/choices.js +21 -0
  58. package/target/structure/doIf.d.ts +83 -0
  59. package/target/structure/doIf.js +39 -0
  60. package/target/structure/doIfOrElse.d.ts +86 -0
  61. package/target/structure/doIfOrElse.js +42 -0
  62. package/target/structure/doSwitch.d.ts +27 -0
  63. package/target/structure/doSwitch.js +13 -0
  64. package/target/structure/doSwitchOrElse.d.ts +34 -0
  65. package/target/structure/doSwitchOrElse.js +16 -0
  66. package/target/structure/doWhile.d.ts +28 -0
  67. package/target/structure/doWhile.js +28 -0
  68. package/target/structure/doWhileDuring.d.ts +225 -0
  69. package/target/structure/doWhileDuring.js +92 -0
  70. package/target/structure/during.d.ts +123 -0
  71. package/target/structure/during.js +60 -0
  72. package/target/structure/errors.d.ts +121 -0
  73. package/target/structure/errors.js +42 -0
  74. package/target/structure/execs.d.ts +46 -0
  75. package/target/structure/execs.js +15 -0
  76. package/target/structure/feeds.d.ts +42 -0
  77. package/target/structure/feeds.js +21 -0
  78. package/target/structure/forEach.d.ts +38 -0
  79. package/target/structure/forEach.js +34 -0
  80. package/target/structure/forever.d.ts +16 -0
  81. package/target/structure/forever.js +7 -0
  82. package/target/structure/groups.d.ts +17 -0
  83. package/target/structure/groups.js +9 -0
  84. package/target/structure/index.d.ts +64 -0
  85. package/target/structure/index.js +97 -0
  86. package/target/structure/jvmStructureBuilder.d.ts +28 -0
  87. package/target/structure/jvmStructureBuilder.js +3 -0
  88. package/target/structure/on.d.ts +12 -0
  89. package/target/structure/on.js +7 -0
  90. package/target/structure/paces.d.ts +101 -0
  91. package/target/structure/paces.js +58 -0
  92. package/target/structure/pauses.d.ts +127 -0
  93. package/target/structure/pauses.js +92 -0
  94. package/target/structure/randomSwitch.d.ts +19 -0
  95. package/target/structure/randomSwitch.js +9 -0
  96. package/target/structure/randomSwitchOrElse.d.ts +23 -0
  97. package/target/structure/randomSwitchOrElse.js +12 -0
  98. package/target/structure/rendezVous.d.ts +15 -0
  99. package/target/structure/rendezVous.js +6 -0
  100. package/target/structure/repeat.d.ts +34 -0
  101. package/target/structure/repeat.js +34 -0
  102. package/target/structure/roundRobinSwitch.d.ts +18 -0
  103. package/target/structure/roundRobinSwitch.js +9 -0
  104. package/target/structure/uniformRandomSwitch.d.ts +18 -0
  105. package/target/structure/uniformRandomSwitch.js +9 -0
  106. package/target/throttling.d.ts +43 -0
  107. package/target/throttling.js +36 -0
  108. package/target/utils/duration.d.ts +7 -0
  109. package/target/utils/duration.js +21 -0
@@ -0,0 +1,408 @@
1
+ import { Session, SessionTo } from "../session";
2
+ import { CheckBuilderCaptureGroup } from "./captureGroup";
3
+ import { CheckBuilderFind } from "./find";
4
+ import { CheckBuilderJsonOfTypeFind } from "./jsonOfTypeFind";
5
+ import { CheckBuilderJsonOfTypeMultipleFind } from "./jsonOfTypeMultipleFind";
6
+ import { CheckBuilderMultipleFind } from "./multipleFind";
7
+ export * from "./builder";
8
+ export * from "./captureGroup";
9
+ export * from "./condition";
10
+ export * from "./final";
11
+ export * from "./find";
12
+ export * from "./jsonOfTypeFind";
13
+ export * from "./jsonOfTypeMultipleFind";
14
+ export * from "./multipleFind";
15
+ export * from "./validate";
16
+ /**
17
+ * Bootstrap a new bodyString check that extracts the full response message body as a String.
18
+ * Encoding is either the one provided in the message (eg Content-Type charset attribute in HTTP),
19
+ * or the one defined in gatling.conf.
20
+ *
21
+ * Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
22
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
23
+ * error.
24
+ *
25
+ * @returns the next DSL step
26
+ */
27
+ export declare const bodyString: () => CheckBuilderFind<string>;
28
+ /**
29
+ * Bootstrap a new bodyBytes check that extracts the full response message body as a byte array.
30
+ *
31
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
32
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
33
+ * error.
34
+ *
35
+ * @returns the next DSL step
36
+ */
37
+ export declare const bodyBytes: () => CheckBuilderFind<number[]>;
38
+ /**
39
+ * Bootstrap a new bodyLength check that extracts the full response message body's binary length.
40
+ *
41
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
42
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
43
+ * error.
44
+ *
45
+ * @returns the next DSL step
46
+ */
47
+ export declare const bodyLength: () => CheckBuilderFind<number>;
48
+ export interface SubstringFunction {
49
+ /**
50
+ * Bootstrap a new substring check that extracts the indexes of the occurrences of a pattern in
51
+ * the response's body String. Encoding is either the one provided in the message (eg Content-Type
52
+ * charset attribute in HTTP), or the one defined in gatling.conf.
53
+ *
54
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
55
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
56
+ * error
57
+ *
58
+ * @param pattern - the searched pattern, expressed as a Gatling Expression Language String
59
+ * @returns the next DSL step
60
+ */
61
+ (pattern: string): CheckBuilderMultipleFind<number>;
62
+ /**
63
+ * Bootstrap a new substring check that extracts the indexes of the occurrences of a pattern in
64
+ * the response's body String. Encoding is either the one provided in the message (eg Content-Type
65
+ * charset attribute in HTTP), or the one defined in gatling.conf.
66
+ *
67
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
68
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
69
+ * error
70
+ *
71
+ * @param pattern - the searched pattern, expressed as a function
72
+ * @returns the next DSL step
73
+ */
74
+ (pattern: SessionTo<string>): CheckBuilderMultipleFind<number>;
75
+ }
76
+ export declare const substring: SubstringFunction;
77
+ export interface XpathFunction {
78
+ /**
79
+ * Bootstrap a new xpath check that extracts nodes with a <a
80
+ * href="https://en.wikipedia.org/wiki/XPath">XPath</a> from response's body <a
81
+ * href="https://en.wikipedia.org/wiki/XML">XML</a> document. Encoding is either the one provided
82
+ * in the message (eg Content-Type charset attribute in HTTP), or the one defined in gatling.conf.
83
+ *
84
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
85
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
86
+ * error
87
+ *
88
+ * @param path - the searched path, expressed as a Gatling Expression Language String
89
+ * @returns the next DSL step
90
+ */
91
+ (path: string): CheckBuilderMultipleFind<string>;
92
+ /**
93
+ * Bootstrap a new xpath check that extracts nodes with a <a
94
+ * href="https://en.wikipedia.org/wiki/XPath">XPath</a> from response's body <a
95
+ * href="https://en.wikipedia.org/wiki/XML">XML</a> document. Encoding is either the one provided
96
+ * in the message (eg Content-Type charset attribute in HTTP), or the one defined in gatling.conf.
97
+ *
98
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
99
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
100
+ * error
101
+ *
102
+ * @param path - the searched path, expressed as a function
103
+ * @returns the next DSL step
104
+ */
105
+ (path: SessionTo<string>): CheckBuilderMultipleFind<string>;
106
+ /**
107
+ * Bootstrap a new xpath check that extracts nodes with a <a
108
+ * href="https://en.wikipedia.org/wiki/XPath">XPath</a> from response's body <a
109
+ * href="https://en.wikipedia.org/wiki/XML">XML</a> document. Encoding is either the one provided
110
+ * in the message (eg Content-Type charset attribute in HTTP), or the one defined in gatling.conf.
111
+ *
112
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
113
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
114
+ * error
115
+ *
116
+ * @param path - the searched path, expressed as a Gatling Expression Language String
117
+ * @param namespaces - the XML <a href="https://en.wikipedia.org/wiki/XML_namespace">namespaces</a>
118
+ * used in the document
119
+ * @returns the next DSL step
120
+ */
121
+ (path: string, namespaces: Record<string, string>): CheckBuilderMultipleFind<string>;
122
+ /**
123
+ * Bootstrap a new xpath check that extracts nodes with a <a
124
+ * href="https://en.wikipedia.org/wiki/XPath">XPath</a> from response's body <a
125
+ * href="https://en.wikipedia.org/wiki/XML">XML</a> document. Encoding is either the one provided
126
+ * in the message (eg Content-Type charset attribute in HTTP), or the one defined in gatling.conf.
127
+ *
128
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
129
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
130
+ * error
131
+ *
132
+ * @param path - the searched path, expressed as a function
133
+ * @param namespaces - the XML <a href="https://en.wikipedia.org/wiki/XML_namespace">namespaces</a>
134
+ * used in the document
135
+ * @returns the next DSL step
136
+ */
137
+ (path: SessionTo<string>, namespaces: Record<string, string>): CheckBuilderMultipleFind<string>;
138
+ }
139
+ export declare const xpath: XpathFunction;
140
+ export interface CssFunction {
141
+ /**
142
+ * Bootstrap a new css check that extracts nodes with a <a
143
+ * href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors">CSS Selector</a> from
144
+ * response's body HTML document. Encoding is either the one provided in the message (eg
145
+ * Content-Type charset attribute in HTTP), or the one defined in gatling.conf.
146
+ *
147
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
148
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
149
+ * error
150
+ *
151
+ * @param selector - the searched selector, expressed as a Gatling Expression Language String
152
+ * @returns the next DSL step
153
+ */
154
+ (selector: string): CheckBuilderMultipleFind<string>;
155
+ /**
156
+ * Bootstrap a new css check that extracts nodes with a <a
157
+ * href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors">CSS Selector</a> from
158
+ * response's body HTML document. Encoding is either the one provided in the message (eg
159
+ * Content-Type charset attribute in HTTP), or the one defined in gatling.conf.
160
+ *
161
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
162
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
163
+ * error
164
+ *
165
+ * @param selector - the searched selector, expressed as a function
166
+ * @returns the next DSL step
167
+ */
168
+ (selector: SessionTo<string>): CheckBuilderMultipleFind<string>;
169
+ /**
170
+ * Bootstrap a new css check that extracts nodes with a <a
171
+ * href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors">CSS Selector</a> from
172
+ * response's body HTML document. Encoding is either the one provided in the message (eg
173
+ * Content-Type charset attribute in HTTP), or the one defined in gatling.conf.
174
+ *
175
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
176
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
177
+ * error
178
+ *
179
+ * @param selector - the searched selector, expressed as a Gatling Expression Language String
180
+ * @param nodeAttribute - the attribute of the selected nodes to capture, if not the node itself
181
+ * @returns the next DSL step
182
+ */
183
+ (selector: string, nodeAttribute: string): CheckBuilderMultipleFind<string>;
184
+ /**
185
+ * Bootstrap a new css check that extracts nodes with a <a
186
+ * href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors">CSS Selector</a> from
187
+ * response's body HTML document. Encoding is either the one provided in the message (eg
188
+ * Content-Type charset attribute in HTTP), or the one defined in gatling.conf.
189
+ *
190
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
191
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
192
+ * error
193
+ *
194
+ * @param selector - the searched selector, expressed as a function
195
+ * @param nodeAttribute - the attribute of the selected nodes to capture, if not the node itself
196
+ * @returns the next DSL step
197
+ */
198
+ (selector: SessionTo<string>, nodeAttribute: string): CheckBuilderMultipleFind<string>;
199
+ }
200
+ export declare const css: CssFunction;
201
+ export interface FormFunction {
202
+ /**
203
+ * Bootstrap a new form check that extracts an HTML form's input nodes with a <a
204
+ * href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors">CSS Selector</a> from
205
+ * response's body HTML document. Encoding is either the one provided in the message (eg
206
+ * Content-Type charset attribute in HTTP), or the one defined in gatling.conf.
207
+ *
208
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
209
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
210
+ * error
211
+ *
212
+ * @param selector - the searched selector, expressed as a Gatling Expression Language String
213
+ * @returns the next DSL step
214
+ */
215
+ (selector: string): CheckBuilderMultipleFind<Record<string, unknown>>;
216
+ /**
217
+ * Bootstrap a new form check that extracts an HTML form's input nodes with a <a
218
+ * href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors">CSS Selector</a> from
219
+ * response's body HTML document. Encoding is either the one provided in the message (eg
220
+ * Content-Type charset attribute in HTTP), or the one defined in gatling.conf.
221
+ *
222
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
223
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
224
+ * error
225
+ *
226
+ * @param selector - the searched selector, expressed as a function
227
+ * @returns the next DSL step
228
+ */
229
+ (selector: SessionTo<string>): CheckBuilderMultipleFind<Record<string, unknown>>;
230
+ }
231
+ export declare const form: FormFunction;
232
+ export interface JsonPathFunction {
233
+ /**
234
+ * Bootstrap a new jsonPath check that extracts nodes with a <a
235
+ * href="https://goessner.net/articles/JsonPath/">JsonPath</a> path from response's body JSON
236
+ * tree.
237
+ *
238
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
239
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
240
+ * {@link IllegalArgumentException}
241
+ *
242
+ * @param path - the searched path, expressed as a Gatling Expression Language String
243
+ * @returns the next DSL step
244
+ */
245
+ (path: string): CheckBuilderJsonOfTypeMultipleFind;
246
+ /**
247
+ * Bootstrap a new jsonPath check that extracts nodes with a <a
248
+ * href="https://goessner.net/articles/JsonPath/">JsonPath</a> path from response's body JSON
249
+ * tree.
250
+ *
251
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
252
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
253
+ * {@link IllegalArgumentException}
254
+ *
255
+ * @param path - the searched path, expressed as a function
256
+ * @returns the next DSL step
257
+ */
258
+ (path: (session: Session) => string): CheckBuilderJsonOfTypeMultipleFind;
259
+ }
260
+ export declare const jsonPath: JsonPathFunction;
261
+ export interface JmesPathFunction {
262
+ /**
263
+ * Bootstrap a new jmesPath check that extracts nodes with a <a
264
+ * href="https://jmespath.org/">JMESPath</a> path from response's body JSON tree.
265
+ *
266
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
267
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
268
+ * {@link IllegalArgumentException}
269
+ *
270
+ * @param path - the searched path, expressed as a Gatling Expression Language String
271
+ * @returns the next DSL step
272
+ */
273
+ (path: string): CheckBuilderJsonOfTypeFind;
274
+ /**
275
+ * Bootstrap a new jmesPath check that extracts nodes with a <a
276
+ * href="https://jmespath.org/">JMESPath</a> path from response's body JSON tree.
277
+ *
278
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
279
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
280
+ * {@link IllegalArgumentException}
281
+ *
282
+ * @param path - the searched path, expressed as a function
283
+ * @returns the next DSL step
284
+ */
285
+ (path: (session: Session) => string): CheckBuilderJsonOfTypeFind;
286
+ }
287
+ export declare const jmesPath: JmesPathFunction;
288
+ export interface JsonpJsonPathFunction {
289
+ /**
290
+ * Bootstrap a new jsonpJsonPath check that extracts nodes with a <a
291
+ * href="https://goessner.net/articles/JsonPath/">JsonPath</a> path from response's body <a
292
+ * href="https://en.wikipedia.org/wiki/JSONP">JSONP</a> payload.
293
+ *
294
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
295
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
296
+ * {@link IllegalArgumentException}
297
+ *
298
+ * @param path - the searched path, expressed as a Gatling Expression Language String
299
+ * @returns the next DSL step
300
+ */
301
+ (path: string): CheckBuilderJsonOfTypeMultipleFind;
302
+ /**
303
+ * Bootstrap a new jsonpJsonPath check that extracts nodes with a <a
304
+ * href="https://goessner.net/articles/JsonPath/">JsonPath</a> path from response's body <a
305
+ * href="https://en.wikipedia.org/wiki/JSONP">JSONP</a> payload.
306
+ *
307
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
308
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
309
+ * {@link IllegalArgumentException}
310
+ *
311
+ * @param path - the searched path, expressed as a function
312
+ * @returns the next DSL step
313
+ */
314
+ (path: (session: Session) => string): CheckBuilderJsonOfTypeMultipleFind;
315
+ }
316
+ export declare const jsonpJsonPath: JsonpJsonPathFunction;
317
+ export interface JsonpJmesPathFunction {
318
+ /**
319
+ * Bootstrap a new jsonpJmesPath check that extracts nodes with a <a
320
+ * href="https://jmespath.org/">JMESPath</a> path from response's body JSON <a
321
+ * href="https://en.wikipedia.org/wiki/JSONP">JSONP</a> payload.
322
+ *
323
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
324
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
325
+ * {@link IllegalArgumentException}
326
+ *
327
+ * @param path - the searched path, expressed as a Gatling Expression Language String
328
+ * @returns the next DSL step
329
+ */
330
+ (path: string): CheckBuilderJsonOfTypeFind;
331
+ /**
332
+ * Bootstrap a new jsonpJmesPath check that extracts nodes with a <a
333
+ * href="https://jmespath.org/">JMESPath</a> path from response's body JSON <a
334
+ * href="https://en.wikipedia.org/wiki/JSONP">JSONP</a> payload.
335
+ *
336
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
337
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
338
+ * {@link IllegalArgumentException}
339
+ *
340
+ * @param path - the searched path, expressed as a function
341
+ * @returns the next DSL step
342
+ */
343
+ (path: (session: Session) => string): CheckBuilderJsonOfTypeFind;
344
+ }
345
+ export declare const jsonpJmesPath: JsonpJmesPathFunction;
346
+ export interface RegexFunction {
347
+ /**
348
+ * Bootstrap a new regex check that extracts capture groups with a <a
349
+ * href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html">Java Regular
350
+ * Expression</a> from response's body String. Encoding is either the one provided in the message
351
+ * (eg Content-Type charset attribute in HTTP), or the one defined in gatling.conf.
352
+ *
353
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
354
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
355
+ * {@link IllegalArgumentException}
356
+ *
357
+ * @param pattern the searched pattern, expressed as a Gatling Expression Language String
358
+ * @return the next DSL step
359
+ */
360
+ (pattern: string): CheckBuilderCaptureGroup;
361
+ /**
362
+ * Bootstrap a new regex check that extracts capture groups with a <a
363
+ * href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html">Java Regular
364
+ * Expression</a> from response's body String. Encoding is either the one provided in the message
365
+ * (eg Content-Type charset attribute in HTTP), or the one defined in gatling.conf.
366
+ *
367
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
368
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
369
+ * {@link IllegalArgumentException}
370
+ *
371
+ * @param pattern the searched pattern, expressed as a function
372
+ * @return the next DSL step
373
+ */
374
+ (pattern: (session: Session) => string): CheckBuilderCaptureGroup;
375
+ }
376
+ export declare const regex: RegexFunction;
377
+ /**
378
+ * Bootstrap a new md5 check that extracts the <a href="https://en.wikipedia.org/wiki/MD5">MD5</a>
379
+ * checksum of the response's body.
380
+ *
381
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
382
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
383
+ * error
384
+ *
385
+ * @returns the next DSL step
386
+ */
387
+ export declare const md5: () => CheckBuilderFind<string>;
388
+ /**
389
+ * Bootstrap a new sha1 check that extracts the <a
390
+ * href="https://en.wikipedia.org/wiki/SHA-1">SHA-1</a> checksum of the response's body.
391
+ *
392
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
393
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
394
+ * error
395
+ *
396
+ * @returns the next DSL step
397
+ */
398
+ export declare const sha1: () => CheckBuilderFind<string>;
399
+ /**
400
+ * Bootstrap a new responseTimeInMillis check that extracts the response time of the request.
401
+ *
402
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
403
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
404
+ * error
405
+ *
406
+ * @returns the next DSL step
407
+ */
408
+ export declare const responseTimeInMillis: () => CheckBuilderFind<number>;
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.responseTimeInMillis = exports.sha1 = exports.md5 = exports.regex = exports.jsonpJmesPath = exports.jsonpJsonPath = exports.jmesPath = exports.jsonPath = exports.form = exports.css = exports.xpath = exports.substring = exports.bodyLength = exports.bodyBytes = exports.bodyString = void 0;
18
+ const jvm_types_1 = require("@gatling.io/jvm-types");
19
+ const callbacks_1 = require("../gatlingJvm/callbacks");
20
+ const session_1 = require("../session");
21
+ const captureGroup_1 = require("./captureGroup");
22
+ const final_1 = require("./final");
23
+ const find_1 = require("./find");
24
+ const jsonOfTypeFind_1 = require("./jsonOfTypeFind");
25
+ const jsonOfTypeMultipleFind_1 = require("./jsonOfTypeMultipleFind");
26
+ const multipleFind_1 = require("./multipleFind");
27
+ __exportStar(require("./builder"), exports);
28
+ __exportStar(require("./captureGroup"), exports);
29
+ __exportStar(require("./condition"), exports);
30
+ __exportStar(require("./final"), exports);
31
+ __exportStar(require("./find"), exports);
32
+ __exportStar(require("./jsonOfTypeFind"), exports);
33
+ __exportStar(require("./jsonOfTypeMultipleFind"), exports);
34
+ __exportStar(require("./multipleFind"), exports);
35
+ __exportStar(require("./validate"), exports);
36
+ /**
37
+ * Bootstrap a new bodyString check that extracts the full response message body as a String.
38
+ * Encoding is either the one provided in the message (eg Content-Type charset attribute in HTTP),
39
+ * or the one defined in gatling.conf.
40
+ *
41
+ * Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
42
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
43
+ * error.
44
+ *
45
+ * @returns the next DSL step
46
+ */
47
+ const bodyString = () => (0, find_1.wrapCheckBuilderFind)(jvm_types_1.CoreDsl.bodyString());
48
+ exports.bodyString = bodyString;
49
+ /**
50
+ * Bootstrap a new bodyBytes check that extracts the full response message body as a byte array.
51
+ *
52
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
53
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
54
+ * error.
55
+ *
56
+ * @returns the next DSL step
57
+ */
58
+ const bodyBytes = () => ({
59
+ ...(0, find_1.wrapCheckBuilderFind)(jvm_types_1.CoreDsl.bodyBytes()),
60
+ is: (expected) => (0, final_1.wrapCheckBuilderFinal)(typeof expected === "function"
61
+ ? jvm_types_1.CoreDsl.bodyBytes().is((0, callbacks_1.wrapByteArrayCallback)((0, session_1.underlyingSessionTo)(expected)))
62
+ : jvm_types_1.CoreDsl.bodyBytes().is((0, callbacks_1.wrapByteArray)(expected))),
63
+ not: (expected) => (0, final_1.wrapCheckBuilderFinal)(typeof expected === "function"
64
+ ? jvm_types_1.CoreDsl.bodyBytes().not((0, callbacks_1.wrapByteArrayCallback)((0, session_1.underlyingSessionTo)(expected)))
65
+ : jvm_types_1.CoreDsl.bodyBytes().not((0, callbacks_1.wrapByteArray)(expected)))
66
+ });
67
+ exports.bodyBytes = bodyBytes;
68
+ /**
69
+ * Bootstrap a new bodyLength check that extracts the full response message body's binary length.
70
+ *
71
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
72
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
73
+ * error.
74
+ *
75
+ * @returns the next DSL step
76
+ */
77
+ const bodyLength = () => (0, find_1.wrapCheckBuilderFind)(jvm_types_1.CoreDsl.bodyLength());
78
+ exports.bodyLength = bodyLength;
79
+ const substring = (pattern) => (0, multipleFind_1.wrapCheckBuilderMultipleFind)((typeof pattern === "function"
80
+ ? jvm_types_1.CoreDsl.substring((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(pattern)))
81
+ : jvm_types_1.CoreDsl.substring(pattern)));
82
+ exports.substring = substring;
83
+ const xpath = (path, namespaces) => {
84
+ if (typeof path === "function") {
85
+ if (namespaces !== undefined) {
86
+ return (0, multipleFind_1.wrapCheckBuilderMultipleFind)(jvm_types_1.CoreDsl.xpath((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(path)), namespaces)); // TODO change type of java.util.Map in java2typescript
87
+ }
88
+ else {
89
+ return (0, multipleFind_1.wrapCheckBuilderMultipleFind)(jvm_types_1.CoreDsl.xpath((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(path))));
90
+ }
91
+ }
92
+ else {
93
+ if (namespaces !== undefined) {
94
+ return (0, multipleFind_1.wrapCheckBuilderMultipleFind)(jvm_types_1.CoreDsl.xpath(path, namespaces)); // TODO change type of java.util.Map in java2typescript
95
+ }
96
+ else {
97
+ return (0, multipleFind_1.wrapCheckBuilderMultipleFind)(jvm_types_1.CoreDsl.xpath(path));
98
+ }
99
+ }
100
+ };
101
+ exports.xpath = xpath;
102
+ const css = (selector, nodeAttribute) => {
103
+ if (typeof selector === "function") {
104
+ if (nodeAttribute !== undefined) {
105
+ return (0, multipleFind_1.wrapCheckBuilderMultipleFind)(jvm_types_1.CoreDsl.css((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(selector)), nodeAttribute));
106
+ }
107
+ else {
108
+ return (0, multipleFind_1.wrapCheckBuilderMultipleFind)(jvm_types_1.CoreDsl.css((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(selector))));
109
+ }
110
+ }
111
+ else {
112
+ if (nodeAttribute !== undefined) {
113
+ return (0, multipleFind_1.wrapCheckBuilderMultipleFind)(jvm_types_1.CoreDsl.css(selector, nodeAttribute));
114
+ }
115
+ else {
116
+ return (0, multipleFind_1.wrapCheckBuilderMultipleFind)(jvm_types_1.CoreDsl.css(selector));
117
+ }
118
+ }
119
+ };
120
+ exports.css = css;
121
+ // TODO check what type the values in the Map actually have, and if they are usable in Javascript
122
+ const form = (selector) => (0, multipleFind_1.wrapCheckBuilderMultipleFind)((typeof selector === "function"
123
+ ? jvm_types_1.CoreDsl.form((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(selector)))
124
+ : jvm_types_1.CoreDsl.form(selector)) // TODO change type of java.util.Map in java2typescript
125
+ );
126
+ exports.form = form;
127
+ const jsonPath = (path) => (0, jsonOfTypeMultipleFind_1.wrapCheckBuilderJsonOfTypeMultipleFind)(typeof path === "function"
128
+ ? jvm_types_1.CoreDsl.jsonPath((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(path)))
129
+ : jvm_types_1.CoreDsl.jsonPath(path));
130
+ exports.jsonPath = jsonPath;
131
+ const jmesPath = (path) => (0, jsonOfTypeFind_1.wrapCheckBuilderJsonOfTypeFind)(typeof path === "function"
132
+ ? jvm_types_1.CoreDsl.jmesPath((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(path)))
133
+ : jvm_types_1.CoreDsl.jmesPath(path));
134
+ exports.jmesPath = jmesPath;
135
+ const jsonpJsonPath = (path) => (0, jsonOfTypeMultipleFind_1.wrapCheckBuilderJsonOfTypeMultipleFind)(typeof path === "function"
136
+ ? jvm_types_1.CoreDsl.jsonpJsonPath((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(path)))
137
+ : jvm_types_1.CoreDsl.jsonpJsonPath(path));
138
+ exports.jsonpJsonPath = jsonpJsonPath;
139
+ const jsonpJmesPath = (path) => (0, jsonOfTypeFind_1.wrapCheckBuilderJsonOfTypeFind)(typeof path === "function"
140
+ ? jvm_types_1.CoreDsl.jsonpJmesPath((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(path)))
141
+ : jvm_types_1.CoreDsl.jsonpJmesPath(path));
142
+ exports.jsonpJmesPath = jsonpJmesPath;
143
+ const regex = (pattern) => (0, captureGroup_1.wrapCheckBuilderCaptureGroup)(typeof pattern === "function"
144
+ ? jvm_types_1.CoreDsl.regex((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(pattern)))
145
+ : jvm_types_1.CoreDsl.regex(pattern));
146
+ exports.regex = regex;
147
+ /**
148
+ * Bootstrap a new md5 check that extracts the <a href="https://en.wikipedia.org/wiki/MD5">MD5</a>
149
+ * checksum of the response's body.
150
+ *
151
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
152
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
153
+ * error
154
+ *
155
+ * @returns the next DSL step
156
+ */
157
+ const md5 = () => (0, find_1.wrapCheckBuilderFind)(jvm_types_1.CoreDsl.md5());
158
+ exports.md5 = md5;
159
+ /**
160
+ * Bootstrap a new sha1 check that extracts the <a
161
+ * href="https://en.wikipedia.org/wiki/SHA-1">SHA-1</a> checksum of the response's body.
162
+ *
163
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
164
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
165
+ * error
166
+ *
167
+ * @returns the next DSL step
168
+ */
169
+ const sha1 = () => (0, find_1.wrapCheckBuilderFind)(jvm_types_1.CoreDsl.sha1());
170
+ exports.sha1 = sha1;
171
+ /**
172
+ * Bootstrap a new responseTimeInMillis check that extracts the response time of the request.
173
+ *
174
+ * <p>Note: On contrary to the Scala DSL, the compiler can't check the availability of this check
175
+ * type for your protocol. If the protocol you're using doesn't support it, you'll get a runtime
176
+ * error
177
+ *
178
+ * @returns the next DSL step
179
+ */
180
+ const responseTimeInMillis = () => (0, find_1.wrapCheckBuilderFind)(jvm_types_1.CoreDsl.responseTimeInMillis());
181
+ exports.responseTimeInMillis = responseTimeInMillis;
@@ -0,0 +1,56 @@
1
+ import { CheckBuilderFind } from "./find";
2
+ import JvmCheckBuilderJsonOfTypeFind = io.gatling.javaapi.core.CheckBuilder$JsonOfTypeFind;
3
+ /**
4
+ * A special {@link CheckBuilderFind<string>} that works on JSON
5
+ */
6
+ export interface CheckBuilderJsonOfTypeFind extends CheckBuilderFind<string> {
7
+ /**
8
+ * Define that the extracted value is a String
9
+ *
10
+ * @returns a new CheckBuilderFind
11
+ */
12
+ ofString(): CheckBuilderFind<string>;
13
+ /**
14
+ * Define that the extracted value is a Boolean
15
+ *
16
+ * @returns a new CheckBuilderFind
17
+ */
18
+ ofBoolean(): CheckBuilderFind<boolean>;
19
+ /**
20
+ * Define that the extracted value is an Integer
21
+ *
22
+ * @returns a new CheckBuilderFind
23
+ */
24
+ ofInt(): CheckBuilderFind<number>;
25
+ /**
26
+ * Define that the extracted value is a Long
27
+ *
28
+ * @returns a new CheckBuilderFind
29
+ */
30
+ ofLong(): CheckBuilderFind<number>;
31
+ /**
32
+ * Define that the extracted value is a Double
33
+ *
34
+ * @returns a new CheckBuilderFind
35
+ */
36
+ ofDouble(): CheckBuilderFind<number>;
37
+ /**
38
+ * Define that the extracted value is a List (a JSON array)
39
+ *
40
+ * @returns a new CheckBuilderFind
41
+ */
42
+ ofList(): CheckBuilderFind<unknown[]>;
43
+ /**
44
+ * Define that the extracted value is a Map (a JSON object)
45
+ *
46
+ * @returns a new CheckBuilderFind
47
+ */
48
+ ofMap(): CheckBuilderFind<Record<string, unknown>>;
49
+ /**
50
+ * Define that the extracted value is an untyped object
51
+ *
52
+ * @returns a new CheckBuilderFind
53
+ */
54
+ ofObject(): CheckBuilderFind<unknown>;
55
+ }
56
+ export declare const wrapCheckBuilderJsonOfTypeFind: (_underlying: JvmCheckBuilderJsonOfTypeFind) => CheckBuilderJsonOfTypeFind;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.wrapCheckBuilderJsonOfTypeFind = void 0;
4
+ const find_1 = require("./find");
5
+ const wrapCheckBuilderJsonOfTypeFind = (_underlying) => ({
6
+ ...(0, find_1.wrapCheckBuilderFind)(_underlying),
7
+ ofString: () => (0, find_1.wrapCheckBuilderFind)(_underlying.ofString()),
8
+ ofBoolean: () => (0, find_1.wrapCheckBuilderFind)(_underlying.ofBoolean()),
9
+ ofInt: () => (0, find_1.wrapCheckBuilderFind)(_underlying.ofInt()),
10
+ ofLong: () => (0, find_1.wrapCheckBuilderFind)(_underlying.ofLong()),
11
+ ofDouble: () => (0, find_1.wrapCheckBuilderFind)(_underlying.ofDouble()),
12
+ ofList: () => (0, find_1.wrapCheckBuilderFind)(_underlying.ofList()),
13
+ ofMap: () => (0, find_1.wrapCheckBuilderFind)(_underlying.ofMap()),
14
+ ofObject: () => (0, find_1.wrapCheckBuilderFind)(_underlying.ofObject())
15
+ });
16
+ exports.wrapCheckBuilderJsonOfTypeFind = wrapCheckBuilderJsonOfTypeFind;