@methodacting/actor-kit 0.47.0 → 0.47.1

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.
package/dist/browser.d.ts CHANGED
@@ -18,246 +18,68 @@ declare const RequestInfoSchema: z.ZodObject<{
18
18
  verifiedBot: z.ZodBoolean;
19
19
  jsDetection: z.ZodObject<{
20
20
  passed: z.ZodBoolean;
21
- }, "strip", z.ZodTypeAny, {
22
- passed: boolean;
23
- }, {
24
- passed: boolean;
25
- }>;
21
+ }, z.core.$strip>;
26
22
  staticResource: z.ZodBoolean;
27
- detectionIds: z.ZodRecord<z.ZodString, z.ZodAny>;
23
+ detectionIds: z.ZodRecord<z.ZodAny, z.core.SomeType>;
28
24
  score: z.ZodNumber;
29
- }, "strip", z.ZodTypeAny, {
30
- corporateProxy: boolean;
31
- verifiedBot: boolean;
32
- jsDetection: {
33
- passed: boolean;
34
- };
35
- staticResource: boolean;
36
- detectionIds: Record<string, any>;
37
- score: number;
38
- }, {
39
- corporateProxy: boolean;
40
- verifiedBot: boolean;
41
- jsDetection: {
42
- passed: boolean;
43
- };
44
- staticResource: boolean;
45
- detectionIds: Record<string, any>;
46
- score: number;
47
- }>;
48
- }, "strip", z.ZodTypeAny, {
49
- longitude: string;
50
- latitude: string;
51
- continent: string;
52
- country: string;
53
- city: string;
54
- timezone: string;
55
- postalCode: string;
56
- region: string;
57
- regionCode: string;
58
- metroCode: string;
59
- botManagement: {
60
- corporateProxy: boolean;
61
- verifiedBot: boolean;
62
- jsDetection: {
63
- passed: boolean;
64
- };
65
- staticResource: boolean;
66
- detectionIds: Record<string, any>;
67
- score: number;
68
- };
69
- }, {
70
- longitude: string;
71
- latitude: string;
72
- continent: string;
73
- country: string;
74
- city: string;
75
- timezone: string;
76
- postalCode: string;
77
- region: string;
78
- regionCode: string;
79
- metroCode: string;
80
- botManagement: {
81
- corporateProxy: boolean;
82
- verifiedBot: boolean;
83
- jsDetection: {
84
- passed: boolean;
85
- };
86
- staticResource: boolean;
87
- detectionIds: Record<string, any>;
88
- score: number;
89
- };
90
- }>;
25
+ }, z.core.$strip>;
26
+ }, z.core.$strip>;
91
27
  declare const CallerSchema: z.ZodObject<{
92
28
  id: z.ZodString;
93
- type: z.ZodEnum<["client", "system", "service"]>;
94
- }, "strip", z.ZodTypeAny, {
95
- type: "client" | "system" | "service";
96
- id: string;
97
- }, {
98
- type: "client" | "system" | "service";
99
- id: string;
100
- }>;
101
- declare const SystemEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
29
+ type: z.ZodEnum<{
30
+ client: "client";
31
+ system: "system";
32
+ service: "service";
33
+ }>;
34
+ }, z.core.$strip>;
35
+ declare const SystemEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
102
36
  type: z.ZodLiteral<"INITIALIZE">;
103
37
  caller: z.ZodObject<{
104
38
  type: z.ZodLiteral<"system">;
105
39
  id: z.ZodString;
106
- }, "strip", z.ZodTypeAny, {
107
- type: "system";
108
- id: string;
109
- }, {
110
- type: "system";
111
- id: string;
112
- }>;
113
- }, "strip", z.ZodTypeAny, {
114
- type: "INITIALIZE";
115
- caller: {
116
- type: "system";
117
- id: string;
118
- };
119
- }, {
120
- type: "INITIALIZE";
121
- caller: {
122
- type: "system";
123
- id: string;
124
- };
125
- }>, z.ZodObject<{
40
+ }, z.core.$strip>;
41
+ }, z.core.$strip>, z.ZodObject<{
126
42
  type: z.ZodLiteral<"CONNECT">;
127
43
  caller: z.ZodObject<{
128
44
  type: z.ZodLiteral<"system">;
129
45
  id: z.ZodString;
130
- }, "strip", z.ZodTypeAny, {
131
- type: "system";
132
- id: string;
133
- }, {
134
- type: "system";
135
- id: string;
136
- }>;
46
+ }, z.core.$strip>;
137
47
  connectingCaller: z.ZodObject<{
138
48
  id: z.ZodString;
139
- type: z.ZodEnum<["client", "system", "service"]>;
140
- }, "strip", z.ZodTypeAny, {
141
- type: "client" | "system" | "service";
142
- id: string;
143
- }, {
144
- type: "client" | "system" | "service";
145
- id: string;
146
- }>;
147
- }, "strip", z.ZodTypeAny, {
148
- type: "CONNECT";
149
- caller: {
150
- type: "system";
151
- id: string;
152
- };
153
- connectingCaller: {
154
- type: "client" | "system" | "service";
155
- id: string;
156
- };
157
- }, {
158
- type: "CONNECT";
159
- caller: {
160
- type: "system";
161
- id: string;
162
- };
163
- connectingCaller: {
164
- type: "client" | "system" | "service";
165
- id: string;
166
- };
167
- }>, z.ZodObject<{
49
+ type: z.ZodEnum<{
50
+ client: "client";
51
+ system: "system";
52
+ service: "service";
53
+ }>;
54
+ }, z.core.$strip>;
55
+ }, z.core.$strip>, z.ZodObject<{
168
56
  type: z.ZodLiteral<"DISCONNECT">;
169
57
  caller: z.ZodObject<{
170
58
  type: z.ZodLiteral<"system">;
171
59
  id: z.ZodString;
172
- }, "strip", z.ZodTypeAny, {
173
- type: "system";
174
- id: string;
175
- }, {
176
- type: "system";
177
- id: string;
178
- }>;
60
+ }, z.core.$strip>;
179
61
  disconnectingCaller: z.ZodObject<{
180
62
  id: z.ZodString;
181
- type: z.ZodEnum<["client", "system", "service"]>;
182
- }, "strip", z.ZodTypeAny, {
183
- type: "client" | "system" | "service";
184
- id: string;
185
- }, {
186
- type: "client" | "system" | "service";
187
- id: string;
188
- }>;
189
- }, "strip", z.ZodTypeAny, {
190
- type: "DISCONNECT";
191
- caller: {
192
- type: "system";
193
- id: string;
194
- };
195
- disconnectingCaller: {
196
- type: "client" | "system" | "service";
197
- id: string;
198
- };
199
- }, {
200
- type: "DISCONNECT";
201
- caller: {
202
- type: "system";
203
- id: string;
204
- };
205
- disconnectingCaller: {
206
- type: "client" | "system" | "service";
207
- id: string;
208
- };
209
- }>, z.ZodObject<{
63
+ type: z.ZodEnum<{
64
+ client: "client";
65
+ system: "system";
66
+ service: "service";
67
+ }>;
68
+ }, z.core.$strip>;
69
+ }, z.core.$strip>, z.ZodObject<{
210
70
  type: z.ZodLiteral<"RESUME">;
211
71
  caller: z.ZodObject<{
212
72
  type: z.ZodLiteral<"system">;
213
73
  id: z.ZodString;
214
- }, "strip", z.ZodTypeAny, {
215
- type: "system";
216
- id: string;
217
- }, {
218
- type: "system";
219
- id: string;
220
- }>;
221
- }, "strip", z.ZodTypeAny, {
222
- type: "RESUME";
223
- caller: {
224
- type: "system";
225
- id: string;
226
- };
227
- }, {
228
- type: "RESUME";
229
- caller: {
230
- type: "system";
231
- id: string;
232
- };
233
- }>, z.ZodObject<{
74
+ }, z.core.$strip>;
75
+ }, z.core.$strip>, z.ZodObject<{
234
76
  type: z.ZodLiteral<"MIGRATE">;
235
77
  caller: z.ZodObject<{
236
78
  type: z.ZodLiteral<"system">;
237
79
  id: z.ZodString;
238
- }, "strip", z.ZodTypeAny, {
239
- type: "system";
240
- id: string;
241
- }, {
242
- type: "system";
243
- id: string;
244
- }>;
245
- operations: z.ZodArray<z.ZodAny, "many">;
246
- }, "strip", z.ZodTypeAny, {
247
- type: "MIGRATE";
248
- caller: {
249
- type: "system";
250
- id: string;
251
- };
252
- operations: any[];
253
- }, {
254
- type: "MIGRATE";
255
- caller: {
256
- type: "system";
257
- id: string;
258
- };
259
- operations: any[];
260
- }>]>;
80
+ }, z.core.$strip>;
81
+ operations: z.ZodArray<z.ZodAny>;
82
+ }, z.core.$strip>], "type">;
261
83
 
262
84
  type EnvWithDurableObjects = {
263
85
  ACTOR_KIT_SECRET: string;
package/dist/index.d.ts CHANGED
@@ -8,43 +8,15 @@ declare const BotManagementSchema: z.ZodObject<{
8
8
  verifiedBot: z.ZodBoolean;
9
9
  jsDetection: z.ZodObject<{
10
10
  passed: z.ZodBoolean;
11
- }, "strip", z.ZodTypeAny, {
12
- passed: boolean;
13
- }, {
14
- passed: boolean;
15
- }>;
11
+ }, z.core.$strip>;
16
12
  staticResource: z.ZodBoolean;
17
- detectionIds: z.ZodRecord<z.ZodString, z.ZodAny>;
13
+ detectionIds: z.ZodRecord<z.ZodAny, z.core.SomeType>;
18
14
  score: z.ZodNumber;
19
- }, "strip", z.ZodTypeAny, {
20
- corporateProxy: boolean;
21
- verifiedBot: boolean;
22
- jsDetection: {
23
- passed: boolean;
24
- };
25
- staticResource: boolean;
26
- detectionIds: Record<string, any>;
27
- score: number;
28
- }, {
29
- corporateProxy: boolean;
30
- verifiedBot: boolean;
31
- jsDetection: {
32
- passed: boolean;
33
- };
34
- staticResource: boolean;
35
- detectionIds: Record<string, any>;
36
- score: number;
37
- }>;
15
+ }, z.core.$strip>;
38
16
  declare const EnvironmentSchema: z.ZodObject<{
39
17
  ACTOR_KIT_SECRET: z.ZodString;
40
18
  ACTOR_KIT_HOST: z.ZodString;
41
- }, "strip", z.ZodTypeAny, {
42
- ACTOR_KIT_SECRET: string;
43
- ACTOR_KIT_HOST: string;
44
- }, {
45
- ACTOR_KIT_SECRET: string;
46
- ACTOR_KIT_HOST: string;
47
- }>;
19
+ }, z.core.$strip>;
48
20
  declare const RequestInfoSchema: z.ZodObject<{
49
21
  longitude: z.ZodString;
50
22
  latitude: z.ZodString;
@@ -61,258 +33,80 @@ declare const RequestInfoSchema: z.ZodObject<{
61
33
  verifiedBot: z.ZodBoolean;
62
34
  jsDetection: z.ZodObject<{
63
35
  passed: z.ZodBoolean;
64
- }, "strip", z.ZodTypeAny, {
65
- passed: boolean;
66
- }, {
67
- passed: boolean;
68
- }>;
36
+ }, z.core.$strip>;
69
37
  staticResource: z.ZodBoolean;
70
- detectionIds: z.ZodRecord<z.ZodString, z.ZodAny>;
38
+ detectionIds: z.ZodRecord<z.ZodAny, z.core.SomeType>;
71
39
  score: z.ZodNumber;
72
- }, "strip", z.ZodTypeAny, {
73
- corporateProxy: boolean;
74
- verifiedBot: boolean;
75
- jsDetection: {
76
- passed: boolean;
77
- };
78
- staticResource: boolean;
79
- detectionIds: Record<string, any>;
80
- score: number;
81
- }, {
82
- corporateProxy: boolean;
83
- verifiedBot: boolean;
84
- jsDetection: {
85
- passed: boolean;
86
- };
87
- staticResource: boolean;
88
- detectionIds: Record<string, any>;
89
- score: number;
90
- }>;
91
- }, "strip", z.ZodTypeAny, {
92
- longitude: string;
93
- latitude: string;
94
- continent: string;
95
- country: string;
96
- city: string;
97
- timezone: string;
98
- postalCode: string;
99
- region: string;
100
- regionCode: string;
101
- metroCode: string;
102
- botManagement: {
103
- corporateProxy: boolean;
104
- verifiedBot: boolean;
105
- jsDetection: {
106
- passed: boolean;
107
- };
108
- staticResource: boolean;
109
- detectionIds: Record<string, any>;
110
- score: number;
111
- };
112
- }, {
113
- longitude: string;
114
- latitude: string;
115
- continent: string;
116
- country: string;
117
- city: string;
118
- timezone: string;
119
- postalCode: string;
120
- region: string;
121
- regionCode: string;
122
- metroCode: string;
123
- botManagement: {
124
- corporateProxy: boolean;
125
- verifiedBot: boolean;
126
- jsDetection: {
127
- passed: boolean;
128
- };
129
- staticResource: boolean;
130
- detectionIds: Record<string, any>;
131
- score: number;
132
- };
133
- }>;
40
+ }, z.core.$strip>;
41
+ }, z.core.$strip>;
134
42
  declare const CallerSchema: z.ZodObject<{
135
43
  id: z.ZodString;
136
- type: z.ZodEnum<["client", "system", "service"]>;
137
- }, "strip", z.ZodTypeAny, {
138
- type: "client" | "system" | "service";
139
- id: string;
140
- }, {
141
- type: "client" | "system" | "service";
142
- id: string;
143
- }>;
44
+ type: z.ZodEnum<{
45
+ client: "client";
46
+ system: "system";
47
+ service: "service";
48
+ }>;
49
+ }, z.core.$strip>;
144
50
  declare const AnyEventSchema: z.ZodObject<{
145
51
  type: z.ZodString;
146
- }, "strip", z.ZodTypeAny, {
147
- type: string;
148
- }, {
149
- type: string;
150
- }>;
151
- declare const SystemEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
52
+ }, z.core.$strip>;
53
+ declare const SystemEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
152
54
  type: z.ZodLiteral<"INITIALIZE">;
153
55
  caller: z.ZodObject<{
154
56
  type: z.ZodLiteral<"system">;
155
57
  id: z.ZodString;
156
- }, "strip", z.ZodTypeAny, {
157
- type: "system";
158
- id: string;
159
- }, {
160
- type: "system";
161
- id: string;
162
- }>;
163
- }, "strip", z.ZodTypeAny, {
164
- type: "INITIALIZE";
165
- caller: {
166
- type: "system";
167
- id: string;
168
- };
169
- }, {
170
- type: "INITIALIZE";
171
- caller: {
172
- type: "system";
173
- id: string;
174
- };
175
- }>, z.ZodObject<{
58
+ }, z.core.$strip>;
59
+ }, z.core.$strip>, z.ZodObject<{
176
60
  type: z.ZodLiteral<"CONNECT">;
177
61
  caller: z.ZodObject<{
178
62
  type: z.ZodLiteral<"system">;
179
63
  id: z.ZodString;
180
- }, "strip", z.ZodTypeAny, {
181
- type: "system";
182
- id: string;
183
- }, {
184
- type: "system";
185
- id: string;
186
- }>;
64
+ }, z.core.$strip>;
187
65
  connectingCaller: z.ZodObject<{
188
66
  id: z.ZodString;
189
- type: z.ZodEnum<["client", "system", "service"]>;
190
- }, "strip", z.ZodTypeAny, {
191
- type: "client" | "system" | "service";
192
- id: string;
193
- }, {
194
- type: "client" | "system" | "service";
195
- id: string;
196
- }>;
197
- }, "strip", z.ZodTypeAny, {
198
- type: "CONNECT";
199
- caller: {
200
- type: "system";
201
- id: string;
202
- };
203
- connectingCaller: {
204
- type: "client" | "system" | "service";
205
- id: string;
206
- };
207
- }, {
208
- type: "CONNECT";
209
- caller: {
210
- type: "system";
211
- id: string;
212
- };
213
- connectingCaller: {
214
- type: "client" | "system" | "service";
215
- id: string;
216
- };
217
- }>, z.ZodObject<{
67
+ type: z.ZodEnum<{
68
+ client: "client";
69
+ system: "system";
70
+ service: "service";
71
+ }>;
72
+ }, z.core.$strip>;
73
+ }, z.core.$strip>, z.ZodObject<{
218
74
  type: z.ZodLiteral<"DISCONNECT">;
219
75
  caller: z.ZodObject<{
220
76
  type: z.ZodLiteral<"system">;
221
77
  id: z.ZodString;
222
- }, "strip", z.ZodTypeAny, {
223
- type: "system";
224
- id: string;
225
- }, {
226
- type: "system";
227
- id: string;
228
- }>;
78
+ }, z.core.$strip>;
229
79
  disconnectingCaller: z.ZodObject<{
230
80
  id: z.ZodString;
231
- type: z.ZodEnum<["client", "system", "service"]>;
232
- }, "strip", z.ZodTypeAny, {
233
- type: "client" | "system" | "service";
234
- id: string;
235
- }, {
236
- type: "client" | "system" | "service";
237
- id: string;
238
- }>;
239
- }, "strip", z.ZodTypeAny, {
240
- type: "DISCONNECT";
241
- caller: {
242
- type: "system";
243
- id: string;
244
- };
245
- disconnectingCaller: {
246
- type: "client" | "system" | "service";
247
- id: string;
248
- };
249
- }, {
250
- type: "DISCONNECT";
251
- caller: {
252
- type: "system";
253
- id: string;
254
- };
255
- disconnectingCaller: {
256
- type: "client" | "system" | "service";
257
- id: string;
258
- };
259
- }>, z.ZodObject<{
81
+ type: z.ZodEnum<{
82
+ client: "client";
83
+ system: "system";
84
+ service: "service";
85
+ }>;
86
+ }, z.core.$strip>;
87
+ }, z.core.$strip>, z.ZodObject<{
260
88
  type: z.ZodLiteral<"RESUME">;
261
89
  caller: z.ZodObject<{
262
90
  type: z.ZodLiteral<"system">;
263
91
  id: z.ZodString;
264
- }, "strip", z.ZodTypeAny, {
265
- type: "system";
266
- id: string;
267
- }, {
268
- type: "system";
269
- id: string;
270
- }>;
271
- }, "strip", z.ZodTypeAny, {
272
- type: "RESUME";
273
- caller: {
274
- type: "system";
275
- id: string;
276
- };
277
- }, {
278
- type: "RESUME";
279
- caller: {
280
- type: "system";
281
- id: string;
282
- };
283
- }>, z.ZodObject<{
92
+ }, z.core.$strip>;
93
+ }, z.core.$strip>, z.ZodObject<{
284
94
  type: z.ZodLiteral<"MIGRATE">;
285
95
  caller: z.ZodObject<{
286
96
  type: z.ZodLiteral<"system">;
287
97
  id: z.ZodString;
288
- }, "strip", z.ZodTypeAny, {
289
- type: "system";
290
- id: string;
291
- }, {
292
- type: "system";
293
- id: string;
294
- }>;
295
- operations: z.ZodArray<z.ZodAny, "many">;
296
- }, "strip", z.ZodTypeAny, {
297
- type: "MIGRATE";
298
- caller: {
299
- type: "system";
300
- id: string;
301
- };
302
- operations: any[];
303
- }, {
304
- type: "MIGRATE";
305
- caller: {
306
- type: "system";
307
- id: string;
308
- };
309
- operations: any[];
310
- }>]>;
311
- declare const CallerIdTypeSchema: z.ZodEnum<["client", "service", "system"]>;
312
- declare const CallerStringSchema: z.ZodEffects<z.ZodString, {
98
+ }, z.core.$strip>;
99
+ operations: z.ZodArray<z.ZodAny>;
100
+ }, z.core.$strip>], "type">;
101
+ declare const CallerIdTypeSchema: z.ZodEnum<{
102
+ client: "client";
103
+ system: "system";
104
+ service: "service";
105
+ }>;
106
+ declare const CallerStringSchema: z.ZodPipe<z.ZodString, z.ZodTransform<{
313
107
  type: "client" | "system" | "service";
314
108
  id: string;
315
- }, string>;
109
+ }, string>>;
316
110
 
317
111
  interface AlarmRecord {
318
112
  id: string;
@@ -355,7 +149,7 @@ interface Snapshot {
355
149
  checksum?: string;
356
150
  }
357
151
  declare class ActorKitStorage {
358
- private storage;
152
+ private readonly storage;
359
153
  private initialized;
360
154
  private sql;
361
155
  constructor(storage: DurableObjectStorage);