@appium/types 1.0.0 → 1.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 (64) hide show
  1. package/build/lib/capabilities.d.ts +1 -2
  2. package/build/lib/capabilities.d.ts.map +1 -1
  3. package/build/lib/{command.d.ts → command-maps.d.ts} +1 -1
  4. package/build/lib/command-maps.d.ts.map +1 -0
  5. package/build/lib/command-maps.js +4 -0
  6. package/build/lib/command-maps.js.map +1 -0
  7. package/build/lib/commands/appium.d.ts +100 -0
  8. package/build/lib/commands/appium.d.ts.map +1 -0
  9. package/build/lib/{command.js → commands/appium.js} +1 -2
  10. package/build/lib/commands/appium.js.map +1 -0
  11. package/build/lib/commands/basedriver.d.ts +370 -0
  12. package/build/lib/commands/basedriver.d.ts.map +1 -0
  13. package/build/lib/commands/basedriver.js +3 -0
  14. package/build/lib/commands/basedriver.js.map +1 -0
  15. package/build/lib/commands/index.d.ts +7 -0
  16. package/build/lib/commands/index.d.ts.map +1 -0
  17. package/build/lib/commands/index.js +23 -0
  18. package/build/lib/commands/index.js.map +1 -0
  19. package/build/lib/commands/jsonwp.d.ts +37 -0
  20. package/build/lib/commands/jsonwp.d.ts.map +1 -0
  21. package/build/lib/commands/jsonwp.js +3 -0
  22. package/build/lib/commands/jsonwp.js.map +1 -0
  23. package/build/lib/commands/mjsonwp.d.ts +65 -0
  24. package/build/lib/commands/mjsonwp.d.ts.map +1 -0
  25. package/build/lib/commands/mjsonwp.js +3 -0
  26. package/build/lib/commands/mjsonwp.js.map +1 -0
  27. package/build/lib/commands/other-protocols.d.ts +300 -0
  28. package/build/lib/commands/other-protocols.d.ts.map +1 -0
  29. package/build/lib/commands/other-protocols.js +3 -0
  30. package/build/lib/commands/other-protocols.js.map +1 -0
  31. package/build/lib/commands/webdriver.d.ts +443 -0
  32. package/build/lib/commands/webdriver.d.ts.map +1 -0
  33. package/build/lib/commands/webdriver.js +3 -0
  34. package/build/lib/commands/webdriver.js.map +1 -0
  35. package/build/lib/constraints.d.ts +19 -0
  36. package/build/lib/constraints.d.ts.map +1 -1
  37. package/build/lib/constraints.js.map +1 -1
  38. package/build/lib/driver.d.ts +9 -1056
  39. package/build/lib/driver.d.ts.map +1 -1
  40. package/build/lib/index.d.ts +2 -1
  41. package/build/lib/index.d.ts.map +1 -1
  42. package/build/lib/index.js +2 -1
  43. package/build/lib/index.js.map +1 -1
  44. package/build/lib/plugin.d.ts +1 -1
  45. package/build/lib/plugin.d.ts.map +1 -1
  46. package/build/lib/standard-caps.d.ts +8 -0
  47. package/build/lib/standard-caps.d.ts.map +1 -1
  48. package/lib/capabilities.ts +1 -2
  49. package/lib/commands/appium.ts +115 -0
  50. package/lib/commands/basedriver.ts +476 -0
  51. package/lib/commands/index.ts +6 -0
  52. package/lib/commands/jsonwp.ts +41 -0
  53. package/lib/commands/mjsonwp.ts +71 -0
  54. package/lib/commands/other-protocols.ts +387 -0
  55. package/lib/commands/webdriver.ts +511 -0
  56. package/lib/constraints.ts +18 -1
  57. package/lib/driver.ts +25 -1279
  58. package/lib/index.ts +2 -1
  59. package/lib/plugin.ts +1 -1
  60. package/lib/standard-caps.ts +8 -0
  61. package/package.json +5 -5
  62. package/build/lib/command.d.ts.map +0 -1
  63. package/build/lib/command.js.map +0 -1
  64. /package/lib/{command.ts → command-maps.ts} +0 -0
@@ -0,0 +1,443 @@
1
+ import type { ActionSequence } from '../action';
2
+ import type { Element } from '../util';
3
+ /**
4
+ * Interface for all standard WebDriver Classic commands proxied to the external driver.
5
+ */
6
+ export interface IWDClassicCommands {
7
+ /**
8
+ * Navigate to a given url
9
+ * @see {@link https://w3c.github.io/webdriver/#navigate-to}
10
+ *
11
+ * @param url - the url
12
+ */
13
+ setUrl?(url: string): Promise<void>;
14
+ /**
15
+ * Get the current url
16
+ * @see {@link https://w3c.github.io/webdriver/#get-current-url}
17
+ *
18
+ * @returns The url
19
+ */
20
+ getUrl?(): Promise<string>;
21
+ /**
22
+ * Navigate back in the page history
23
+ * @see {@link https://w3c.github.io/webdriver/#back}
24
+ */
25
+ back?(): Promise<void>;
26
+ /**
27
+ * Navigate forward in the page history
28
+ * @see {@link https://w3c.github.io/webdriver/#forward}
29
+ */
30
+ forward?(): Promise<void>;
31
+ /**
32
+ * Refresh the page
33
+ * @see {@link https://w3c.github.io/webdriver/#refresh}
34
+ */
35
+ refresh?(): Promise<void>;
36
+ /**
37
+ * Get the current page title
38
+ * @see {@link https://w3c.github.io/webdriver/#get-title}
39
+ *
40
+ * @returns The title
41
+ *
42
+ * @example
43
+ * ```js
44
+ * await driver.getTitle()
45
+ * ```
46
+ * ```py
47
+ * driver.title
48
+ * ```
49
+ * ```java
50
+ * driver.getTitle();
51
+ * ```
52
+ */
53
+ title?(): Promise<string>;
54
+ /**
55
+ * Get the handle (id) associated with the current browser window
56
+ * @see {@link https://w3c.github.io/webdriver/#get-window-handle}
57
+ *
58
+ * @returns The handle string
59
+ */
60
+ getWindowHandle?(): Promise<string>;
61
+ /**
62
+ * Close the current browsing context (window)
63
+ * @see {@link https://w3c.github.io/webdriver/#close-window}
64
+ *
65
+ * @returns An array of window handles representing currently-open windows
66
+ */
67
+ closeWindow?(): Promise<string[]>;
68
+ /**
69
+ * Switch to a specified window
70
+ * @see {@link https://w3c.github.io/webdriver/#switch-to-window}
71
+ *
72
+ * @param handle - the window handle of the window to make active
73
+ */
74
+ setWindow?(handle: string): Promise<void>;
75
+ /**
76
+ * Get a set of handles representing open browser windows
77
+ * @see {@link https://w3c.github.io/webdriver/#get-window-handles}
78
+ *
79
+ * @returns An array of window handles representing currently-open windows
80
+ */
81
+ getWindowHandles?(): Promise<string[]>;
82
+ /**
83
+ * Create a new browser window
84
+ * @see {@link https://w3c.github.io/webdriver/#new-window}
85
+ *
86
+ * @param type - a hint to the driver whether to create a "tab" or "window"
87
+ *
88
+ * @returns An object containing the handle of the newly created window and its type
89
+ */
90
+ createNewWindow?(type?: NewWindowType): Promise<NewWindow>;
91
+ /**
92
+ * Switch the current browsing context to a frame
93
+ * @see {@link https://w3c.github.io/webdriver/#switch-to-frame}
94
+ *
95
+ * @param id - the frame id, index, or `null` (indicating the top-level context)
96
+ */
97
+ setFrame?(id: null | number | string): Promise<void>;
98
+ /**
99
+ * Set the current browsing context to the parent of the current context
100
+ * @see {@link https://w3c.github.io/webdriver/#switch-to-parent-frame}
101
+ */
102
+ switchToParentFrame?(): Promise<void>;
103
+ /**
104
+ * Get the size and position of the current window
105
+ * @see {@link https://w3c.github.io/webdriver/#get-window-rect}
106
+ *
107
+ * @returns A `Rect` JSON object with x, y, width, and height properties
108
+ */
109
+ getWindowRect?(): Promise<Rect>;
110
+ /**
111
+ * Set the current window's size and position
112
+ * @see {@link https://w3c.github.io/webdriver/#set-window-rect}
113
+ *
114
+ * @param x - the screen coordinate for the new left edge of the window
115
+ * @param y - the screen coordinate for the new top edge of the window
116
+ * @param width - the width in pixels to resize the window to
117
+ * @param height - the height in pixels to resize the window to
118
+ *
119
+ * @returns The actual `Rect` of the window after running the command
120
+ */
121
+ setWindowRect?(x: number, y: number, width: number, height: number): Promise<Rect>;
122
+ /**
123
+ * Run the window-manager specific 'maximize' operation on the current window
124
+ * @see {@link https://w3c.github.io/webdriver/#maximize-window}
125
+ *
126
+ * @returns The actual `Rect` of the window after running the command
127
+ */
128
+ maximizeWindow?(): Promise<Rect>;
129
+ /**
130
+ * Run the window-manager specific 'minimize' operation on the current window
131
+ * @see {@link https://w3c.github.io/webdriver/#minimize-window}
132
+ *
133
+ * @returns The actual `Rect` of the window after running the command
134
+ */
135
+ minimizeWindow?(): Promise<Rect>;
136
+ /**
137
+ * Put the current window into full screen mode
138
+ * @see {@link https://w3c.github.io/webdriver/#fullscreen-window}
139
+ *
140
+ * @returns The actual `Rect` of the window after running the command
141
+ */
142
+ fullScreenWindow?(): Promise<Rect>;
143
+ /**
144
+ * Get the active element
145
+ * @see {@link https://w3c.github.io/webdriver/#get-active-element}
146
+ *
147
+ * @returns The JSON object encapsulating the active element reference
148
+ */
149
+ active?(): Promise<Element>;
150
+ /**
151
+ * Get the shadow root of an element
152
+ * @see {@link https://w3c.github.io/webdriver/#get-element-shadow-root}
153
+ *
154
+ * @param elementId - the id of the element to retrieve the shadow root for
155
+ *
156
+ * @returns The shadow root for an element, as an element
157
+ */
158
+ elementShadowRoot?(elementId: string): Promise<Element>;
159
+ /**
160
+ * Determine if the reference element is selected or not
161
+ * @see {@link https://w3c.github.io/webdriver/#is-element-selected}
162
+ *
163
+ * @param elementId - the id of the element
164
+ *
165
+ * @returns True if the element is selected, False otherwise
166
+ */
167
+ elementSelected?(elementId: string): Promise<boolean>;
168
+ /**
169
+ * Retrieve the value of an element's attribute
170
+ * @see {@link https://w3c.github.io/webdriver/#get-element-attribute}
171
+ *
172
+ * @param name - the attribute name
173
+ * @param elementId - the id of the element
174
+ *
175
+ * @returns The attribute value
176
+ */
177
+ getAttribute?(name: string, elementId: string): Promise<string | null>;
178
+ /**
179
+ * Retrieve the value of a named property of an element's JS object
180
+ * @see {@link https://w3c.github.io/webdriver/#get-element-property}
181
+ *
182
+ * @param name - the object property name
183
+ * @param elementId - the id of the element
184
+ *
185
+ * @returns The property value
186
+ */
187
+ getProperty?(name: string, elementId: string): Promise<string | null>;
188
+ /**
189
+ * Retrieve the value of a CSS property of an element
190
+ * @see {@link https://w3c.github.io/webdriver/#get-element-css-value}
191
+ *
192
+ * @param name - the CSS property name
193
+ * @param elementId - the id of the element
194
+ *
195
+ * @returns The property value
196
+ */
197
+ getCssProperty?(name: string, elementId: string): Promise<string>;
198
+ /**
199
+ * Get the text of an element as rendered
200
+ * @see {@link https://w3c.github.io/webdriver/#get-element-text}
201
+ *
202
+ * @param elementId - the id of the element
203
+ *
204
+ * @returns The text rendered for the element
205
+ */
206
+ getText?(elementId: string): Promise<string>;
207
+ /**
208
+ * Get the tag name of an element
209
+ * @see {@link https://w3c.github.io/webdriver/#get-element-tag-name}
210
+ *
211
+ * @param elementId - the id of the element
212
+ *
213
+ * @returns The tag name
214
+ */
215
+ getName?(elementId: string): Promise<string>;
216
+ /**
217
+ * Get the dimensions and position of an element
218
+ * @see {@link https://w3c.github.io/webdriver/#get-element-rect}
219
+ *
220
+ * @param elementId - the id of the element
221
+ *
222
+ * @returns The Rect object containing x, y, width, and height properties
223
+ */
224
+ getElementRect?(elementId: string): Promise<Rect>;
225
+ /**
226
+ * Determine whether an element is enabled
227
+ * @see {@link https://w3c.github.io/webdriver/#is-element-enabled}
228
+ *
229
+ * @param elementId - the id of the element
230
+ *
231
+ * @returns True if the element is enabled, False otherwise
232
+ */
233
+ elementEnabled?(elementId: string): Promise<boolean>;
234
+ /**
235
+ * Get the WAI-ARIA role of an element
236
+ * @see {@link https://w3c.github.io/webdriver/#get-computed-role}
237
+ *
238
+ * @param elementId - the id of the element
239
+ *
240
+ * @returns The role
241
+ */
242
+ getComputedRole?(elementId: string): Promise<string | null>;
243
+ /**
244
+ * Get the accessible name/label of an element
245
+ * @see {@link https://w3c.github.io/webdriver/#get-computed-label}
246
+ *
247
+ * @param elementId - the id of the element
248
+ *
249
+ * @returns The accessible name
250
+ */
251
+ getComputedLabel?(elementId: string): Promise<string | null>;
252
+ /**
253
+ * Determine whether an element is displayed
254
+ * @see {@link https://w3c.github.io/webdriver/#element-displayedness}
255
+ *
256
+ * @param elementId - the id of the element
257
+ *
258
+ * @returns True if any part of the element is rendered within the viewport, False otherwise
259
+ */
260
+ elementDisplayed?(elementId: string): Promise<boolean>;
261
+ /**
262
+ * Click/tap an element
263
+ * @see {@link https://w3c.github.io/webdriver/#element-click}
264
+ *
265
+ * @param elementId - the id of the element
266
+ */
267
+ click?(elementId: string): Promise<void>;
268
+ /**
269
+ * Clear the text/value of an editable element
270
+ * @see {@link https://w3c.github.io/webdriver/#element-clear}
271
+ *
272
+ * @param elementId - the id of the element
273
+ */
274
+ clear?(elementId: string): Promise<void>;
275
+ /**
276
+ * Send keystrokes to an element (or otherwise set its value)
277
+ * @see {@link https://w3c.github.io/webdriver/#element-send-keys}
278
+ *
279
+ * @param text - the text to send to the element
280
+ * @param elementId - the id of the element
281
+ */
282
+ setValue?(text: string, elementId: string): Promise<void>;
283
+ /**
284
+ * Execute JavaScript (or some other kind of script) in the browser/app context
285
+ * @see {@link https://w3c.github.io/webdriver/#execute-script}
286
+ *
287
+ * @param script - the string to be evaluated as the script, which will be made the body of an
288
+ * anonymous function in the case of JS
289
+ * @param args - the list of arguments to be applied to the script as a function
290
+ *
291
+ * @returns The return value of the script execution
292
+ */
293
+ execute?(script: string, args: unknown[]): Promise<unknown>;
294
+ /**
295
+ * Execute JavaScript (or some other kind of script) in the browser/app context, asynchronously
296
+ * @see {@link https://w3c.github.io/webdriver/#execute-async-script}
297
+ *
298
+ * @param script - the string to be evaluated as the script, which will be made the body of an
299
+ * anonymous function in the case of JS
300
+ * @param args - the list of arguments to be applied to the script as a function
301
+ *
302
+ * @returns The promise resolution of the return value of the script execution (or an error
303
+ * object if the promise is rejected)
304
+ */
305
+ executeAsync?(script: string, args: unknown[]): Promise<unknown>;
306
+ /**
307
+ * Get all cookies known to the browsing context
308
+ * @see {@link https://w3c.github.io/webdriver/#get-all-cookies}
309
+ *
310
+ * @returns A list of serialized cookies
311
+ */
312
+ getCookies?(): Promise<Cookie[]>;
313
+ /**
314
+ * Get a cookie by name
315
+ * @see {@link https://w3c.github.io/webdriver/#get-named-cookie}
316
+ *
317
+ * @param name - the name of the cookie
318
+ *
319
+ * @returns A serialized cookie
320
+ */
321
+ getCookie?(name: string): Promise<Cookie>;
322
+ /**
323
+ * Add a cookie to the browsing context
324
+ * @see {@link https://w3c.github.io/webdriver/#add-cookie}
325
+ *
326
+ * @param cookie - the cookie data including properties like name, value, path, domain,
327
+ * secure, httpOnly, expiry, and samesite
328
+ */
329
+ setCookie?(cookie: Cookie): Promise<void>;
330
+ /**
331
+ * Delete a named cookie
332
+ * @see {@link https://w3c.github.io/webdriver/#delete-cookie}
333
+ *
334
+ * @param name - the name of the cookie to delete
335
+ */
336
+ deleteCookie?(name: string): Promise<void>;
337
+ /**
338
+ * Delete all cookies
339
+ * @see {@link https://w3c.github.io/webdriver/#delete-all-cookies}
340
+ */
341
+ deleteCookies?(): Promise<void>;
342
+ /**
343
+ * Perform touch or keyboard actions
344
+ * @see {@link https://w3c.github.io/webdriver/#perform-actions}
345
+ *
346
+ * @param actions - the action sequence
347
+ */
348
+ performActions?(actions: ActionSequence[]): Promise<void>;
349
+ /**
350
+ * Release all keys or buttons that are currently pressed
351
+ * @see {@link https://w3c.github.io/webdriver/#release-actions}
352
+ */
353
+ releaseActions?(): Promise<void>;
354
+ /**
355
+ * Dismiss a simple dialog/alert
356
+ * @see {@link https://w3c.github.io/webdriver/#dismiss-alert}
357
+ */
358
+ postDismissAlert?(): Promise<void>;
359
+ /**
360
+ * Accept a simple dialog/alert
361
+ * @see {@link https://w3c.github.io/webdriver/#accept-alert}
362
+ */
363
+ postAcceptAlert?(): Promise<void>;
364
+ /**
365
+ * Get the text of the displayed alert
366
+ * @see {@link https://w3c.github.io/webdriver/#get-alert-text}
367
+ *
368
+ * @returns The text of the alert
369
+ */
370
+ getAlertText?(): Promise<string | null>;
371
+ /**
372
+ * Set the text field of an alert prompt
373
+ * @see {@link https://w3c.github.io/webdriver/#send-alert-text}
374
+ *
375
+ * @param text - the text to send to the prompt
376
+ */
377
+ setAlertText?(text: string): Promise<void>;
378
+ /**
379
+ * Get a screenshot of the current document as rendered
380
+ * @see {@link https://w3c.github.io/webdriver/#take-screenshot}
381
+ *
382
+ * @returns A base64-encoded string representing the PNG image data
383
+ */
384
+ getScreenshot?(): Promise<string>;
385
+ /**
386
+ * Get an image of a single element as rendered on screen
387
+ * @see {@link https://w3c.github.io/webdriver/#take-element-screenshot}
388
+ *
389
+ * @param elementId - the id of the element
390
+ *
391
+ * @returns A base64-encoded string representing the PNG image data for the element rect
392
+ */
393
+ getElementScreenshot?(elementId: string): Promise<string>;
394
+ /**
395
+ * Print the page by rendering it as a PDF document
396
+ * @see {@link https://w3c.github.io/webdriver/#print-page}
397
+ *
398
+ * @param orientation - the orientation of the page ("portrait" or "landscape")
399
+ * @param scale - the page scale, between 0.1 and 2
400
+ * @param background - whether to include background images
401
+ * @param page - the width and height of the printed page
402
+ * @param margin - the margins of the printed page
403
+ * @param shrinkToFit - whether to resize page contents to match {@linkcode PrintPageSize.width}
404
+ * @param pageRanges - array of page numbers and/or page ranges (dash-separated strings) to be printed
405
+ *
406
+ * @returns A base64-encoded string representing the PDF document
407
+ */
408
+ printPage?(orientation?: string, scale?: number, background?: boolean, page?: PrintPageSize, margin?: PrintPageMargins, shrinkToFit?: boolean, pageRanges?: (number | string)[]): Promise<string>;
409
+ }
410
+ export type NewWindowType = 'tab' | 'window';
411
+ export interface NewWindow {
412
+ handle: string;
413
+ type: NewWindowType;
414
+ }
415
+ export interface Rect {
416
+ x: number;
417
+ y: number;
418
+ width: number;
419
+ height: number;
420
+ }
421
+ export type Size = Pick<Rect, 'width' | 'height'>;
422
+ export type Position = Pick<Rect, 'x' | 'y'>;
423
+ export interface Cookie {
424
+ name: string;
425
+ value: string;
426
+ path?: string;
427
+ domain?: string;
428
+ secure?: boolean;
429
+ httpOnly?: boolean;
430
+ expiry?: number;
431
+ sameSite?: 'Lax' | 'Strict';
432
+ }
433
+ export interface PrintPageSize {
434
+ width?: number;
435
+ height?: number;
436
+ }
437
+ export interface PrintPageMargins {
438
+ top?: number;
439
+ bottom?: number;
440
+ left?: number;
441
+ right?: number;
442
+ }
443
+ //# sourceMappingURL=webdriver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webdriver.d.ts","sourceRoot":"","sources":["../../../lib/commands/webdriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC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AI,EAAE,aAAa,CAAC;CACrB;AAGD,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;AAGlD,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;AAE7C,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=webdriver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webdriver.js","sourceRoot":"","sources":["../../../lib/commands/webdriver.ts"],"names":[],"mappings":""}
@@ -1,3 +1,22 @@
1
+ /**
2
+ * A collection of constraints describing the allowed capabilities for a driver.
3
+ */
4
+ export type Constraints = {
5
+ readonly [name: string]: Constraint;
6
+ };
7
+ export interface Constraint {
8
+ readonly presence?: boolean | Readonly<{
9
+ allowEmpty: boolean;
10
+ }>;
11
+ readonly isString?: boolean;
12
+ readonly isNumber?: boolean;
13
+ readonly isBoolean?: boolean;
14
+ readonly isObject?: boolean;
15
+ readonly isArray?: boolean;
16
+ readonly deprecated?: boolean;
17
+ readonly inclusion?: Readonly<[string, ...string[]]>;
18
+ readonly inclusionCaseInsensitive?: Readonly<[string, ...string[]]>;
19
+ }
1
20
  export declare const BASE_DESIRED_CAP_CONSTRAINTS: {
2
21
  readonly platformName: {
3
22
  readonly presence: true;
@@ -1 +1 @@
1
- {"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../lib/constraints.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDT,CAAC;AAEjC,MAAM,MAAM,wBAAwB,GAAG,OAAO,4BAA4B,CAAC"}
1
+ {"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../lib/constraints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;CACrC,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,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AI;KAChB;IACD,4BAA4B,EAAE;QAC5B,SAAS,EAAE,IAAI;KAChB;CAC6B,CAAC"}
1
+ {"version":3,"file":"constraints.js","sourceRoot":"","sources":["../../lib/constraints.ts"],"names":[],"mappings":";;;AAmBa,QAAA,4BAA4B,GAAG;IAC1C,YAAY,EAAE;QACZ,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;KACf;IACD,GAAG,EAAE;QACH,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,IAAI;KAChB;IACD,iBAAiB,EAAE;QACjB,QAAQ,EAAE,IAAI;KACf;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,SAAS,EAAE,IAAI;KAChB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACX,SAAS,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC;KACrC;IACD,WAAW,EAAE;QACX,SAAS,EAAE,IAAI;KAChB;IACD,OAAO,EAAE;QACP,SAAS,EAAE,IAAI;KAChB;IACD,SAAS,EAAE;QACT,SAAS,EAAE,IAAI;KAChB;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,IAAI;KAChB;IACD,4BAA4B,EAAE;QAC5B,SAAS,EAAE,IAAI;KAChB;CAC6B,CAAC"}