@intuned/runtime-dev 1.2.0-cli.5 → 1.2.0-cli.6

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.
@@ -25,15 +25,146 @@ export interface RunAutomationResponse {
25
25
  status: number;
26
26
  body: RunAutomationResult;
27
27
  }
28
+ export declare const runApiStorageStateSchema: z.ZodObject<{
29
+ cookies: z.ZodArray<z.ZodObject<{
30
+ name: z.ZodString;
31
+ value: z.ZodString;
32
+ domain: z.ZodString;
33
+ path: z.ZodString;
34
+ expires: z.ZodNumber;
35
+ httpOnly: z.ZodBoolean;
36
+ secure: z.ZodBoolean;
37
+ sameSite: z.ZodEnum<["Strict", "Lax", "None"]>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ value: string;
40
+ name: string;
41
+ path: string;
42
+ domain: string;
43
+ expires: number;
44
+ httpOnly: boolean;
45
+ secure: boolean;
46
+ sameSite: "Strict" | "Lax" | "None";
47
+ }, {
48
+ value: string;
49
+ name: string;
50
+ path: string;
51
+ domain: string;
52
+ expires: number;
53
+ httpOnly: boolean;
54
+ secure: boolean;
55
+ sameSite: "Strict" | "Lax" | "None";
56
+ }>, "many">;
57
+ origins: z.ZodArray<z.ZodObject<{
58
+ origin: z.ZodString;
59
+ localStorage: z.ZodArray<z.ZodObject<{
60
+ name: z.ZodString;
61
+ value: z.ZodString;
62
+ }, "strip", z.ZodTypeAny, {
63
+ value: string;
64
+ name: string;
65
+ }, {
66
+ value: string;
67
+ name: string;
68
+ }>, "many">;
69
+ }, "strip", z.ZodTypeAny, {
70
+ origin: string;
71
+ localStorage: {
72
+ value: string;
73
+ name: string;
74
+ }[];
75
+ }, {
76
+ origin: string;
77
+ localStorage: {
78
+ value: string;
79
+ name: string;
80
+ }[];
81
+ }>, "many">;
82
+ sessionStorage: z.ZodOptional<z.ZodArray<z.ZodObject<{
83
+ origin: z.ZodString;
84
+ sessionStorage: z.ZodArray<z.ZodObject<{
85
+ name: z.ZodString;
86
+ value: z.ZodString;
87
+ }, "strip", z.ZodTypeAny, {
88
+ value: string;
89
+ name: string;
90
+ }, {
91
+ value: string;
92
+ name: string;
93
+ }>, "many">;
94
+ }, "strip", z.ZodTypeAny, {
95
+ sessionStorage: {
96
+ value: string;
97
+ name: string;
98
+ }[];
99
+ origin: string;
100
+ }, {
101
+ sessionStorage: {
102
+ value: string;
103
+ name: string;
104
+ }[];
105
+ origin: string;
106
+ }>, "many">>;
107
+ }, "strip", z.ZodTypeAny, {
108
+ cookies: {
109
+ value: string;
110
+ name: string;
111
+ path: string;
112
+ domain: string;
113
+ expires: number;
114
+ httpOnly: boolean;
115
+ secure: boolean;
116
+ sameSite: "Strict" | "Lax" | "None";
117
+ }[];
118
+ origins: {
119
+ origin: string;
120
+ localStorage: {
121
+ value: string;
122
+ name: string;
123
+ }[];
124
+ }[];
125
+ sessionStorage?: {
126
+ sessionStorage: {
127
+ value: string;
128
+ name: string;
129
+ }[];
130
+ origin: string;
131
+ }[] | undefined;
132
+ }, {
133
+ cookies: {
134
+ value: string;
135
+ name: string;
136
+ path: string;
137
+ domain: string;
138
+ expires: number;
139
+ httpOnly: boolean;
140
+ secure: boolean;
141
+ sameSite: "Strict" | "Lax" | "None";
142
+ }[];
143
+ origins: {
144
+ origin: string;
145
+ localStorage: {
146
+ value: string;
147
+ name: string;
148
+ }[];
149
+ }[];
150
+ sessionStorage?: {
151
+ sessionStorage: {
152
+ value: string;
153
+ name: string;
154
+ }[];
155
+ origin: string;
156
+ }[] | undefined;
157
+ }>;
158
+ export type RunApiStorageState = z.input<typeof runApiStorageStateSchema>;
28
159
  export declare const runApiSessionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
29
160
  type: z.ZodLiteral<"file">;
30
161
  path: z.ZodString;
31
162
  }, "strip", z.ZodTypeAny, {
32
- type: "file";
33
163
  path: string;
34
- }, {
35
164
  type: "file";
165
+ }, {
36
166
  path: string;
167
+ type: "file";
37
168
  }>, z.ZodObject<{
38
169
  type: z.ZodLiteral<"state">;
39
170
  state: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -255,11 +386,11 @@ export declare const runApiParametersSchema: z.ZodObject<{
255
386
  type: z.ZodLiteral<"file">;
256
387
  path: z.ZodString;
257
388
  }, "strip", z.ZodTypeAny, {
258
- type: "file";
259
389
  path: string;
260
- }, {
261
390
  type: "file";
391
+ }, {
262
392
  path: string;
393
+ type: "file";
263
394
  }>, z.ZodObject<{
264
395
  type: z.ZodLiteral<"state">;
265
396
  state: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -452,8 +583,8 @@ export declare const runApiParametersSchema: z.ZodObject<{
452
583
  runCheck: z.ZodDefault<z.ZodBoolean>;
453
584
  }, "strip", z.ZodTypeAny, {
454
585
  session: {
455
- type: "file";
456
586
  path: string;
587
+ type: "file";
457
588
  } | {
458
589
  type: "state";
459
590
  state?: {
@@ -486,8 +617,8 @@ export declare const runApiParametersSchema: z.ZodObject<{
486
617
  runCheck: boolean;
487
618
  }, {
488
619
  session: {
489
- type: "file";
490
620
  path: string;
621
+ type: "file";
491
622
  } | {
492
623
  type: "state";
493
624
  state?: {
@@ -592,8 +723,8 @@ export declare const runApiParametersSchema: z.ZodObject<{
592
723
  retrieveSession: boolean;
593
724
  auth?: {
594
725
  session: {
595
- type: "file";
596
726
  path: string;
727
+ type: "file";
597
728
  } | {
598
729
  type: "state";
599
730
  state?: {
@@ -638,8 +769,8 @@ export declare const runApiParametersSchema: z.ZodObject<{
638
769
  } | undefined;
639
770
  auth?: {
640
771
  session: {
641
- type: "file";
642
772
  path: string;
773
+ type: "file";
643
774
  } | {
644
775
  type: "state";
645
776
  state?: {
@@ -703,6 +834,6 @@ export type RunApiResultOk<R = any> = {
703
834
  extendedPayloads?: Payload[];
704
835
  };
705
836
  export type RunApiResultWithSessionOk<R = any> = RunApiResultOk<R> & {
706
- session: StorageState;
837
+ session: RunApiStorageState;
707
838
  };
708
839
  export type RunApiResult<R = any, FullResult extends RunApiResultOk<R> = RunApiResultOk<R>> = Result<FullResult, RunAutomationError>;
@@ -3,40 +3,41 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.runApiSessionSchema = exports.runApiParametersSchema = void 0;
6
+ exports.runApiStorageStateSchema = exports.runApiSessionSchema = exports.runApiParametersSchema = void 0;
7
7
  var _zod = _interopRequireDefault(require("zod"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const runApiStorageStateSchema = exports.runApiStorageStateSchema = _zod.default.object({
10
+ cookies: _zod.default.array(_zod.default.object({
11
+ name: _zod.default.string(),
12
+ value: _zod.default.string(),
13
+ domain: _zod.default.string(),
14
+ path: _zod.default.string(),
15
+ expires: _zod.default.number(),
16
+ httpOnly: _zod.default.boolean(),
17
+ secure: _zod.default.boolean(),
18
+ sameSite: _zod.default.enum(["Strict", "Lax", "None"])
19
+ })),
20
+ origins: _zod.default.array(_zod.default.object({
21
+ origin: _zod.default.string(),
22
+ localStorage: _zod.default.array(_zod.default.object({
23
+ name: _zod.default.string(),
24
+ value: _zod.default.string()
25
+ }))
26
+ })),
27
+ sessionStorage: _zod.default.array(_zod.default.object({
28
+ origin: _zod.default.string(),
29
+ sessionStorage: _zod.default.array(_zod.default.object({
30
+ name: _zod.default.string(),
31
+ value: _zod.default.string()
32
+ }))
33
+ })).optional()
34
+ });
9
35
  const runApiSessionSchema = exports.runApiSessionSchema = _zod.default.discriminatedUnion("type", [_zod.default.object({
10
36
  type: _zod.default.literal("file"),
11
37
  path: _zod.default.string()
12
38
  }), _zod.default.object({
13
39
  type: _zod.default.literal("state"),
14
- state: _zod.default.object({
15
- cookies: _zod.default.array(_zod.default.object({
16
- name: _zod.default.string(),
17
- value: _zod.default.string(),
18
- domain: _zod.default.string(),
19
- path: _zod.default.string(),
20
- expires: _zod.default.number(),
21
- httpOnly: _zod.default.boolean(),
22
- secure: _zod.default.boolean(),
23
- sameSite: _zod.default.enum(["Strict", "Lax", "None"])
24
- })),
25
- origins: _zod.default.array(_zod.default.object({
26
- origin: _zod.default.string(),
27
- localStorage: _zod.default.array(_zod.default.object({
28
- name: _zod.default.string(),
29
- value: _zod.default.string()
30
- }))
31
- })),
32
- sessionStorage: _zod.default.array(_zod.default.object({
33
- origin: _zod.default.string(),
34
- sessionStorage: _zod.default.array(_zod.default.object({
35
- name: _zod.default.string(),
36
- value: _zod.default.string()
37
- }))
38
- })).optional()
39
- }).nullable().optional()
40
+ state: runApiStorageStateSchema.nullable().optional()
40
41
  })]);
41
42
  const runApiParametersSchema = exports.runApiParametersSchema = _zod.default.object({
42
43
  automationFunction: _zod.default.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "1.2.0-cli.5",
3
+ "version": "1.2.0-cli.6",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -118,6 +118,7 @@
118
118
  "eslint-plugin-deprecation": "^1.3.3",
119
119
  "eslint-plugin-prettier": "^4.2.1",
120
120
  "msw": "^2.1.2",
121
+ "playwright": "1.44.1",
121
122
  "typedoc": "^0.25.13",
122
123
  "typedoc-plugin-frontmatter": "^1.0.0",
123
124
  "typedoc-plugin-markdown": "^4.0.2",
package/tsconfig.json CHANGED
@@ -12,7 +12,8 @@
12
12
  "sourceMap": false,
13
13
  "declaration": true,
14
14
  "emitDeclarationOnly": false,
15
- "skipLibCheck": true
15
+ "skipLibCheck": true,
16
+ "types": ["vitest/globals"]
16
17
  },
17
18
  "include": [
18
19
  "src/**/*.ts",
File without changes
@@ -1 +0,0 @@
1
- "use strict";
File without changes
@@ -1 +0,0 @@
1
- "use strict";
File without changes
@@ -1 +0,0 @@
1
- "use strict";
File without changes
@@ -1 +0,0 @@
1
- "use strict";