apify-client 3.0.0-beta.8 → 3.0.0-rc.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.
- package/README.md +10 -2
- package/dist/apify_api_error.d.ts +11 -26
- package/dist/apify_api_error.js +31 -22
- package/dist/apify_client.d.ts +125 -10
- package/dist/apify_client.js +133 -48
- package/dist/base/api_client.d.ts +7 -7
- package/dist/base/api_client.js +36 -24
- package/dist/base/resource_client.d.ts +21 -8
- package/dist/base/resource_client.js +67 -33
- package/dist/base/resource_collection_client.d.ts +12 -4
- package/dist/base/resource_collection_client.js +34 -11
- package/dist/body_parser.d.ts +3 -4
- package/dist/body_parser.js +19 -26
- package/dist/bundle.js +27 -22
- package/dist/bundle.js.map +1 -1
- package/dist/generated/api.d.ts +785 -290
- package/dist/generated/schemas.d.ts +720 -747
- package/dist/generated/schemas.js +166 -162
- package/dist/http_clients/axios.d.ts +60 -0
- package/dist/http_clients/axios.js +117 -0
- package/dist/http_clients/base.d.ts +331 -0
- package/dist/http_clients/base.js +563 -0
- package/dist/http_clients/index.d.ts +4 -0
- package/dist/http_clients/index.js +2 -0
- package/dist/http_compressors/base.d.ts +40 -0
- package/dist/http_compressors/base.js +9 -0
- package/dist/http_compressors/brotli.d.ts +33 -0
- package/dist/http_compressors/brotli.js +39 -0
- package/dist/http_compressors/gzip.d.ts +33 -0
- package/dist/http_compressors/gzip.js +39 -0
- package/dist/http_compressors/index.d.ts +6 -0
- package/dist/http_compressors/index.js +2 -0
- package/dist/http_compressors/resolve.d.ts +23 -0
- package/dist/http_compressors/resolve.js +27 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3 -1
- package/dist/invalid_response_body_error.d.ts +13 -0
- package/dist/invalid_response_body_error.js +17 -0
- package/dist/models.d.ts +162 -194
- package/dist/models.js +6 -4
- package/dist/resource_clients/actor.d.ts +74 -34
- package/dist/resource_clients/actor.js +87 -56
- package/dist/resource_clients/actor_collection.d.ts +18 -12
- package/dist/resource_clients/actor_collection.js +11 -3
- package/dist/resource_clients/actor_env_var.d.ts +11 -4
- package/dist/resource_clients/actor_env_var.js +16 -6
- package/dist/resource_clients/actor_env_var_collection.d.ts +9 -4
- package/dist/resource_clients/actor_env_var_collection.js +11 -4
- package/dist/resource_clients/actor_version.d.ts +20 -5
- package/dist/resource_clients/actor_version.js +19 -9
- package/dist/resource_clients/actor_version_collection.d.ts +11 -4
- package/dist/resource_clients/actor_version_collection.js +13 -4
- package/dist/resource_clients/build.d.ts +20 -7
- package/dist/resource_clients/build.js +35 -15
- package/dist/resource_clients/build_collection.d.ts +7 -5
- package/dist/resource_clients/build_collection.js +4 -1
- package/dist/resource_clients/dataset.d.ts +53 -35
- package/dist/resource_clients/dataset.js +105 -80
- package/dist/resource_clients/dataset_collection.d.ts +10 -6
- package/dist/resource_clients/dataset_collection.js +13 -2
- package/dist/resource_clients/key_value_store.d.ts +62 -20
- package/dist/resource_clients/key_value_store.js +78 -40
- package/dist/resource_clients/key_value_store_collection.d.ts +10 -6
- package/dist/resource_clients/key_value_store_collection.js +13 -2
- package/dist/resource_clients/log.d.ts +13 -20
- package/dist/resource_clients/log.js +141 -59
- package/dist/resource_clients/request_queue.d.ts +68 -31
- package/dist/resource_clients/request_queue.js +173 -91
- package/dist/resource_clients/request_queue_collection.d.ts +9 -5
- package/dist/resource_clients/request_queue_collection.js +9 -3
- package/dist/resource_clients/run.d.ts +119 -28
- package/dist/resource_clients/run.js +190 -49
- package/dist/resource_clients/run_collection.d.ts +5 -3
- package/dist/resource_clients/run_collection.js +4 -1
- package/dist/resource_clients/schedule.d.ts +16 -7
- package/dist/resource_clients/schedule.js +30 -22
- package/dist/resource_clients/schedule_collection.d.ts +6 -2
- package/dist/resource_clients/schedule_collection.js +9 -3
- package/dist/resource_clients/store_collection.d.ts +6 -4
- package/dist/resource_clients/store_collection.js +4 -1
- package/dist/resource_clients/task.d.ts +36 -13
- package/dist/resource_clients/task.js +79 -46
- package/dist/resource_clients/task_collection.d.ts +9 -5
- package/dist/resource_clients/task_collection.js +9 -3
- package/dist/resource_clients/user.d.ts +19 -10
- package/dist/resource_clients/user.js +42 -38
- package/dist/resource_clients/webhook.d.ts +17 -8
- package/dist/resource_clients/webhook.js +30 -22
- package/dist/resource_clients/webhook_collection.d.ts +8 -4
- package/dist/resource_clients/webhook_collection.js +9 -3
- package/dist/resource_clients/webhook_dispatch.d.ts +4 -1
- package/dist/resource_clients/webhook_dispatch.js +7 -2
- package/dist/resource_clients/webhook_dispatch_collection.d.ts +3 -1
- package/dist/resource_clients/webhook_dispatch_collection.js +4 -1
- package/dist/runtime/node.d.ts +6 -0
- package/dist/runtime/node.js +49 -0
- package/dist/runtime/types.d.ts +52 -0
- package/dist/runtime/types.js +1 -0
- package/dist/runtime/web.d.ts +5 -0
- package/dist/runtime/web.js +18 -0
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +1 -1
- package/dist/statistics.d.ts +1 -6
- package/dist/statistics.js +2 -2
- package/dist/timeouts.d.ts +84 -0
- package/dist/timeouts.js +37 -0
- package/dist/timezones.d.ts +1 -1
- package/dist/utils.d.ts +82 -45
- package/dist/utils.js +197 -146
- package/dist/wait_for_resources.d.ts +8 -0
- package/dist/wait_for_resources.js +39 -0
- package/package.json +32 -29
- package/dist/http_client.d.ts +0 -88
- package/dist/http_client.js +0 -255
- package/dist/interceptors.d.ts +0 -19
- package/dist/interceptors.js +0 -105
|
@@ -21,7 +21,7 @@ export const ActorStats = lazySchema(() => z.looseObject({
|
|
|
21
21
|
totalUsers30Days: z.int().optional(),
|
|
22
22
|
totalUsers90Days: z.int().optional(),
|
|
23
23
|
totalMetamorphs: z.int().optional(),
|
|
24
|
-
lastRunStartedAt: z.date().optional(),
|
|
24
|
+
lastRunStartedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
25
25
|
actorReviewCount: z.int().optional(),
|
|
26
26
|
actorReviewRating: z.number().optional(),
|
|
27
27
|
bookmarkCount: z.int().optional(),
|
|
@@ -33,17 +33,17 @@ export const ActorStats = lazySchema(() => z.looseObject({
|
|
|
33
33
|
TOTAL: z.int().optional(),
|
|
34
34
|
}).optional(),
|
|
35
35
|
}));
|
|
36
|
-
export const
|
|
36
|
+
export const ActorListItem = lazySchema(() => z.looseObject({
|
|
37
37
|
id: z.string(),
|
|
38
|
-
createdAt: z.date(),
|
|
39
|
-
modifiedAt: z.date(),
|
|
38
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
39
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
40
40
|
name: z.string(),
|
|
41
41
|
username: z.string(),
|
|
42
42
|
title: z.string().optional(),
|
|
43
43
|
stats: ActorStats().nullable().optional(),
|
|
44
44
|
}));
|
|
45
45
|
export const ListOfActors = lazySchema(() => PaginationResponse().extend({
|
|
46
|
-
items: z.array(
|
|
46
|
+
items: z.array(ActorListItem()),
|
|
47
47
|
}));
|
|
48
48
|
export const ListOfActorsResponse = lazySchema(() => z.looseObject({
|
|
49
49
|
data: ListOfActors(),
|
|
@@ -132,10 +132,10 @@ export const CreateActorRequest = lazySchema(() => z.looseObject({
|
|
|
132
132
|
}));
|
|
133
133
|
export const CommonActorPricingInfo = lazySchema(() => z.looseObject({
|
|
134
134
|
apifyMarginPercentage: z.number(),
|
|
135
|
-
createdAt: z.date(),
|
|
136
|
-
startedAt: z.date(),
|
|
137
|
-
notifiedAboutFutureChangeAt: z.date().nullable().optional(),
|
|
138
|
-
notifiedAboutChangeAt: z.date().nullable().optional(),
|
|
135
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
136
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
137
|
+
notifiedAboutFutureChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
138
|
+
notifiedAboutChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
139
139
|
reasonForChange: z.string().nullable().optional(),
|
|
140
140
|
isPriceChangeNotificationSuppressed: z.boolean().optional(),
|
|
141
141
|
forceContainsSignificantPriceChange: z.boolean().optional(),
|
|
@@ -197,13 +197,13 @@ export const TaggedBuildInfo = lazySchema(() => z.looseObject({
|
|
|
197
197
|
buildId: z.string().optional(),
|
|
198
198
|
buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).nullable().optional(),
|
|
199
199
|
buildNumberInt: z.int().optional(),
|
|
200
|
-
finishedAt: z.date().nullable().optional(),
|
|
200
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
201
201
|
}));
|
|
202
202
|
/** A dictionary mapping build tag names (e.g., "latest", "beta") to their build information. */
|
|
203
203
|
export const TaggedBuilds = lazySchema(() => z.record(z.string(), TaggedBuildInfo().nullable()));
|
|
204
204
|
/** A warning displayed on the Actor's page in Apify Store and Console. Can be set by the Actor's developer or automatically by Apify's quality checks. */
|
|
205
205
|
export const ActorNotice = lazySchema(() => z.enum(["NONE", "RESIDENTIAL_PROXY_REQUIRED", "UNDER_MAINTENANCE"]).or(z.string()).nullable());
|
|
206
|
-
export const
|
|
206
|
+
export const ActorResource = lazySchema(() => z.looseObject({
|
|
207
207
|
id: z.string(),
|
|
208
208
|
userId: z.string(),
|
|
209
209
|
name: z.string(),
|
|
@@ -212,8 +212,8 @@ export const Actor = lazySchema(() => z.looseObject({
|
|
|
212
212
|
restartOnError: z.boolean().optional(),
|
|
213
213
|
isPublic: z.boolean(),
|
|
214
214
|
actorPermissionLevel: ActorPermissionLevel().optional(),
|
|
215
|
-
createdAt: z.date(),
|
|
216
|
-
modifiedAt: z.date(),
|
|
215
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
216
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
217
217
|
stats: ActorStats(),
|
|
218
218
|
versions: z.array(Version()),
|
|
219
219
|
pricingInfos: z.array(ActorRunPricingInfo()).optional(),
|
|
@@ -238,7 +238,7 @@ export const Actor = lazySchema(() => z.looseObject({
|
|
|
238
238
|
}));
|
|
239
239
|
/** Response containing Actor data. */
|
|
240
240
|
export const ActorResponse = lazySchema(() => z.looseObject({
|
|
241
|
-
data:
|
|
241
|
+
data: ActorResource(),
|
|
242
242
|
}));
|
|
243
243
|
export const CreateOrUpdateVersionRequest = lazySchema(() => z.looseObject({
|
|
244
244
|
versionNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/).nullable().optional(),
|
|
@@ -252,7 +252,7 @@ export const CreateOrUpdateVersionRequest = lazySchema(() => z.looseObject({
|
|
|
252
252
|
gitHubGistUrl: z.string().nullable().optional(),
|
|
253
253
|
}));
|
|
254
254
|
/** The name of the build tag. */
|
|
255
|
-
export const
|
|
255
|
+
export const UpdatedBuildProperty = lazySchema(() => z.looseObject({
|
|
256
256
|
buildId: z.string(),
|
|
257
257
|
}).nullable());
|
|
258
258
|
export const UpdateActorRequest = lazySchema(() => z.looseObject({
|
|
@@ -268,7 +268,7 @@ export const UpdateActorRequest = lazySchema(() => z.looseObject({
|
|
|
268
268
|
pricingInfos: z.array(ActorRunPricingInfo()).optional(),
|
|
269
269
|
categories: z.array(z.string()).nullable().optional(),
|
|
270
270
|
defaultRunOptions: DefaultRunOptions().nullable().optional(),
|
|
271
|
-
taggedBuilds: z.record(z.string(),
|
|
271
|
+
taggedBuilds: z.record(z.string(), UpdatedBuildProperty()).nullable().optional(),
|
|
272
272
|
actorStandby: ActorStandby().nullable().optional(),
|
|
273
273
|
exampleRunInput: ExampleRunInput().nullable().optional(),
|
|
274
274
|
isDeprecated: z.boolean().nullable().optional(),
|
|
@@ -303,18 +303,18 @@ export const WebhookCondition = lazySchema(() => z.looseObject({
|
|
|
303
303
|
}));
|
|
304
304
|
/** Status of the webhook dispatch indicating whether the HTTP request was successful. */
|
|
305
305
|
export const WebhookDispatchStatus = lazySchema(() => z.enum(["ACTIVE", "SUCCEEDED", "FAILED"]).or(z.string()));
|
|
306
|
-
export const
|
|
306
|
+
export const WebhookLastDispatch = lazySchema(() => z.looseObject({
|
|
307
307
|
status: WebhookDispatchStatus(),
|
|
308
|
-
finishedAt: z.date().nullable().optional(),
|
|
309
|
-
removedAt: z.date().nullable().optional(),
|
|
308
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
309
|
+
removedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
310
310
|
}));
|
|
311
311
|
export const WebhookStats = lazySchema(() => z.looseObject({
|
|
312
312
|
totalDispatches: z.int().optional(),
|
|
313
313
|
}));
|
|
314
|
-
export const
|
|
314
|
+
export const WebhookListItem = lazySchema(() => z.looseObject({
|
|
315
315
|
id: z.string(),
|
|
316
|
-
createdAt: z.date(),
|
|
317
|
-
modifiedAt: z.date(),
|
|
316
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
317
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
318
318
|
userId: z.string(),
|
|
319
319
|
isAdHoc: z.boolean().nullable().optional(),
|
|
320
320
|
isApifyIntegration: z.boolean().optional(),
|
|
@@ -326,11 +326,11 @@ export const WebhookShort = lazySchema(() => z.looseObject({
|
|
|
326
326
|
ignoreSslErrors: z.boolean(),
|
|
327
327
|
doNotRetry: z.boolean(),
|
|
328
328
|
requestUrl: z.url({ normalize: true }),
|
|
329
|
-
lastDispatch:
|
|
329
|
+
lastDispatch: WebhookLastDispatch().nullable().optional(),
|
|
330
330
|
stats: WebhookStats().nullable().optional(),
|
|
331
331
|
}));
|
|
332
332
|
export const ListOfWebhooks = lazySchema(() => PaginationResponse().extend({
|
|
333
|
-
items: z.array(
|
|
333
|
+
items: z.array(WebhookListItem()),
|
|
334
334
|
}));
|
|
335
335
|
export const ListOfWebhooksResponse = lazySchema(() => z.looseObject({
|
|
336
336
|
data: ListOfWebhooks(),
|
|
@@ -338,25 +338,25 @@ export const ListOfWebhooksResponse = lazySchema(() => z.looseObject({
|
|
|
338
338
|
/** Status of an Actor job (run or build). */
|
|
339
339
|
export const ActorJobStatus = lazySchema(() => z.enum(["READY", "RUNNING", "SUCCEEDED", "FAILED", "TIMING-OUT", "TIMED-OUT", "ABORTING", "ABORTED"]).or(z.string()));
|
|
340
340
|
export const RunOrigin = lazySchema(() => z.enum(["DEVELOPMENT", "WEB", "API", "SCHEDULER", "TEST", "WEBHOOK", "ACTOR", "CLI", "CI", "STANDBY", "MCP"]).or(z.string()));
|
|
341
|
-
export const
|
|
341
|
+
export const BuildMeta = lazySchema(() => z.looseObject({
|
|
342
342
|
origin: RunOrigin(),
|
|
343
343
|
clientIp: z.string().optional(),
|
|
344
344
|
userAgent: z.string().optional(),
|
|
345
345
|
}));
|
|
346
|
-
export const
|
|
346
|
+
export const BuildListItem = lazySchema(() => z.looseObject({
|
|
347
347
|
id: z.string(),
|
|
348
348
|
actId: z.string().optional(),
|
|
349
349
|
userId: z.string().optional(),
|
|
350
350
|
status: ActorJobStatus(),
|
|
351
|
-
startedAt: z.date(),
|
|
352
|
-
finishedAt: z.date().nullable().optional(),
|
|
351
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
352
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
353
353
|
usageTotalUsd: z.number(),
|
|
354
354
|
buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),
|
|
355
355
|
buildNumberInt: z.int().optional(),
|
|
356
|
-
meta:
|
|
356
|
+
meta: BuildMeta().optional(),
|
|
357
357
|
}));
|
|
358
358
|
export const ListOfBuilds = lazySchema(() => PaginationResponse().extend({
|
|
359
|
-
items: z.array(
|
|
359
|
+
items: z.array(BuildListItem()),
|
|
360
360
|
}));
|
|
361
361
|
export const ListOfBuildsResponse = lazySchema(() => z.looseObject({
|
|
362
362
|
data: ListOfBuilds(),
|
|
@@ -400,10 +400,10 @@ export const Build = lazySchema(() => z.looseObject({
|
|
|
400
400
|
id: z.string(),
|
|
401
401
|
actId: z.string(),
|
|
402
402
|
userId: z.string(),
|
|
403
|
-
startedAt: z.date(),
|
|
404
|
-
finishedAt: z.date().nullable().optional(),
|
|
403
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
404
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
405
405
|
status: ActorJobStatus(),
|
|
406
|
-
meta:
|
|
406
|
+
meta: BuildMeta(),
|
|
407
407
|
stats: BuildStats().nullable().optional(),
|
|
408
408
|
options: BuildOptions().nullable().optional(),
|
|
409
409
|
usage: BuildUsage().nullable().optional(),
|
|
@@ -412,6 +412,7 @@ export const Build = lazySchema(() => z.looseObject({
|
|
|
412
412
|
inputSchema: z.string().nullable().optional(),
|
|
413
413
|
readme: z.string().nullable().optional(),
|
|
414
414
|
buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),
|
|
415
|
+
imageDigest: z.string().nullable().optional(),
|
|
415
416
|
actVersion: z.looseObject({
|
|
416
417
|
sourceType: VersionSourceType().optional(),
|
|
417
418
|
buildTag: z.string().optional(),
|
|
@@ -430,16 +431,16 @@ export const RunMeta = lazySchema(() => z.looseObject({
|
|
|
430
431
|
clientIp: z.string().nullable().optional(),
|
|
431
432
|
userAgent: z.string().nullable().optional(),
|
|
432
433
|
scheduleId: z.string().nullable().optional(),
|
|
433
|
-
scheduledAt: z.date().nullable().optional(),
|
|
434
|
+
scheduledAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
434
435
|
}));
|
|
435
|
-
export const
|
|
436
|
+
export const RunListItem = lazySchema(() => z.looseObject({
|
|
436
437
|
id: z.string(),
|
|
437
438
|
actId: z.string(),
|
|
438
439
|
userId: z.string().optional(),
|
|
439
440
|
actorTaskId: z.string().nullable().optional(),
|
|
440
441
|
status: ActorJobStatus(),
|
|
441
|
-
startedAt: z.date(),
|
|
442
|
-
finishedAt: z.date().nullable().optional(),
|
|
442
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
443
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
443
444
|
buildId: z.string(),
|
|
444
445
|
buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).optional(),
|
|
445
446
|
buildNumberInt: z.int().optional(),
|
|
@@ -450,7 +451,7 @@ export const RunShort = lazySchema(() => z.looseObject({
|
|
|
450
451
|
defaultRequestQueueId: z.string(),
|
|
451
452
|
}));
|
|
452
453
|
export const ListOfRuns = lazySchema(() => PaginationResponse().extend({
|
|
453
|
-
items: z.array(
|
|
454
|
+
items: z.array(RunListItem()),
|
|
454
455
|
}));
|
|
455
456
|
export const ListOfRunsResponse = lazySchema(() => z.looseObject({
|
|
456
457
|
data: ListOfRuns(),
|
|
@@ -529,8 +530,8 @@ export const RunUsageUsd = lazySchema(() => z.looseObject({
|
|
|
529
530
|
PROXY_SERPS: z.number().nullable().optional(),
|
|
530
531
|
}));
|
|
531
532
|
/** Information about a metamorph event that occurred during the run. */
|
|
532
|
-
export const
|
|
533
|
-
createdAt: z.date(),
|
|
533
|
+
export const RunMetamorphEvent = lazySchema(() => z.looseObject({
|
|
534
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
534
535
|
actorId: z.string(),
|
|
535
536
|
buildId: z.string(),
|
|
536
537
|
inputKey: z.string().nullable().optional(),
|
|
@@ -541,8 +542,8 @@ export const Run = lazySchema(() => z.looseObject({
|
|
|
541
542
|
actId: z.string(),
|
|
542
543
|
userId: z.string(),
|
|
543
544
|
actorTaskId: z.string().nullable().optional(),
|
|
544
|
-
startedAt: z.date(),
|
|
545
|
-
finishedAt: z.date().nullable().optional(),
|
|
545
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
546
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
546
547
|
status: ActorJobStatus(),
|
|
547
548
|
statusMessage: z.string().nullable().optional(),
|
|
548
549
|
isStatusMessageTerminal: z.boolean().nullable().optional(),
|
|
@@ -575,7 +576,7 @@ export const Run = lazySchema(() => z.looseObject({
|
|
|
575
576
|
usage: RunUsage().nullable().optional(),
|
|
576
577
|
usageTotalUsd: z.number().nullable().optional(),
|
|
577
578
|
usageUsd: RunUsageUsd().nullable().optional(),
|
|
578
|
-
metamorphs: z.array(
|
|
579
|
+
metamorphs: z.array(RunMetamorphEvent()).nullable().optional(),
|
|
579
580
|
platformUsageBillingModel: z.string().optional(),
|
|
580
581
|
}));
|
|
581
582
|
export const RunResponse = lazySchema(() => z.looseObject({
|
|
@@ -587,13 +588,13 @@ export const DatasetStats = lazySchema(() => z.looseObject({
|
|
|
587
588
|
storageBytes: z.int().optional(),
|
|
588
589
|
inflatedBytes: z.int().optional(),
|
|
589
590
|
}));
|
|
590
|
-
export const
|
|
591
|
+
export const DatasetResource = lazySchema(() => z.looseObject({
|
|
591
592
|
id: z.string(),
|
|
592
593
|
name: z.string().nullable().optional(),
|
|
593
594
|
userId: z.string(),
|
|
594
|
-
createdAt: z.date(),
|
|
595
|
-
modifiedAt: z.date(),
|
|
596
|
-
accessedAt: z.date(),
|
|
595
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
596
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
597
|
+
accessedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
597
598
|
itemCount: z.int().min(0),
|
|
598
599
|
cleanItemCount: z.int().min(0),
|
|
599
600
|
actId: z.string().nullable().optional(),
|
|
@@ -608,7 +609,7 @@ export const Dataset = lazySchema(() => z.looseObject({
|
|
|
608
609
|
}));
|
|
609
610
|
/** Response containing dataset metadata. */
|
|
610
611
|
export const DatasetResponse = lazySchema(() => z.looseObject({
|
|
611
|
-
data:
|
|
612
|
+
data: DatasetResource(),
|
|
612
613
|
}));
|
|
613
614
|
export const UpdateDatasetRequest = lazySchema(() => z.looseObject({
|
|
614
615
|
name: z.string().nullable().optional(),
|
|
@@ -619,26 +620,26 @@ export const UpdateDatasetRequest = lazySchema(() => z.looseObject({
|
|
|
619
620
|
* object or an array of objects. Each object represents one dataset item.
|
|
620
621
|
*/
|
|
621
622
|
export const PutItemsRequest = lazySchema(() => z.record(z.string(), z.unknown()));
|
|
622
|
-
export const
|
|
623
|
+
export const DatasetItemValidationError = lazySchema(() => z.looseObject({
|
|
623
624
|
instancePath: z.string().optional(),
|
|
624
625
|
schemaPath: z.string().optional(),
|
|
625
626
|
keyword: z.string().optional(),
|
|
626
627
|
message: z.string().optional(),
|
|
627
628
|
params: z.record(z.string(), z.unknown()).optional(),
|
|
628
629
|
}));
|
|
629
|
-
export const
|
|
630
|
+
export const InvalidDatasetItem = lazySchema(() => z.looseObject({
|
|
630
631
|
itemPosition: z.int().optional(),
|
|
631
|
-
validationErrors: z.array(
|
|
632
|
+
validationErrors: z.array(DatasetItemValidationError()).optional(),
|
|
632
633
|
}));
|
|
633
|
-
export const
|
|
634
|
-
invalidItems: z.array(
|
|
634
|
+
export const DatasetSchemaValidationErrorData = lazySchema(() => z.looseObject({
|
|
635
|
+
invalidItems: z.array(InvalidDatasetItem()),
|
|
635
636
|
}));
|
|
636
637
|
export const DatasetSchemaValidationError = lazySchema(() => z.looseObject({
|
|
637
638
|
type: z.string().optional(),
|
|
638
639
|
message: z.string().optional(),
|
|
639
|
-
data:
|
|
640
|
+
data: DatasetSchemaValidationErrorData().optional(),
|
|
640
641
|
}));
|
|
641
|
-
export const
|
|
642
|
+
export const PutItemsErrorResponse = lazySchema(() => z.looseObject({
|
|
642
643
|
error: DatasetSchemaValidationError(),
|
|
643
644
|
}));
|
|
644
645
|
export const DatasetFieldStatistics = lazySchema(() => z.looseObject({
|
|
@@ -661,14 +662,14 @@ export const KeyValueStoreStats = lazySchema(() => z.looseObject({
|
|
|
661
662
|
s3StorageBytes: z.int().optional(),
|
|
662
663
|
storageBytes: z.int().optional(),
|
|
663
664
|
}));
|
|
664
|
-
export const
|
|
665
|
+
export const KeyValueStoreResource = lazySchema(() => z.looseObject({
|
|
665
666
|
id: z.string(),
|
|
666
667
|
name: z.string().nullable().optional(),
|
|
667
668
|
userId: z.string().nullable().optional(),
|
|
668
669
|
username: z.string().nullable().optional(),
|
|
669
|
-
createdAt: z.date(),
|
|
670
|
-
modifiedAt: z.date(),
|
|
671
|
-
accessedAt: z.date(),
|
|
670
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
671
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
672
|
+
accessedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
672
673
|
actId: z.string().nullable().optional(),
|
|
673
674
|
actRunId: z.string().nullable().optional(),
|
|
674
675
|
consoleUrl: z.url({ normalize: true }).optional(),
|
|
@@ -681,9 +682,9 @@ export const KeyValueStore = lazySchema(() => z.looseObject({
|
|
|
681
682
|
}));
|
|
682
683
|
/** Response containing key-value store data. */
|
|
683
684
|
export const KeyValueStoreResponse = lazySchema(() => z.looseObject({
|
|
684
|
-
data:
|
|
685
|
+
data: KeyValueStoreResource(),
|
|
685
686
|
}));
|
|
686
|
-
export const
|
|
687
|
+
export const UpdateKeyValueStoreRequest = lazySchema(() => z.looseObject({
|
|
687
688
|
name: z.string().nullable().optional(),
|
|
688
689
|
generalAccess: GeneralAccess().optional(),
|
|
689
690
|
}));
|
|
@@ -718,11 +719,11 @@ export const QueueId = lazySchema(() => z.string());
|
|
|
718
719
|
/** The ID of the user who owns the request queue. */
|
|
719
720
|
export const QueueUserId = lazySchema(() => z.string());
|
|
720
721
|
/** The timestamp when the request queue was created. */
|
|
721
|
-
export const QueueCreatedAt = lazySchema(() => z.date());
|
|
722
|
+
export const QueueCreatedAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
|
|
722
723
|
/** The timestamp when the request queue was last modified. Modifications include adding, updating, or removing requests, as well as locking or unlocking requests in the request queue. */
|
|
723
|
-
export const QueueModifiedAt = lazySchema(() => z.date());
|
|
724
|
+
export const QueueModifiedAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
|
|
724
725
|
/** The timestamp when the request queue was last accessed. */
|
|
725
|
-
export const QueueAccessedAt = lazySchema(() => z.date());
|
|
726
|
+
export const QueueAccessedAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
|
|
726
727
|
/** The total number of requests in the request queue. */
|
|
727
728
|
export const TotalRequestCount = lazySchema(() => z.int().min(0));
|
|
728
729
|
/** The number of requests that have been handled. */
|
|
@@ -740,7 +741,7 @@ export const RequestQueueStats = lazySchema(() => z.looseObject({
|
|
|
740
741
|
writeCount: z.int().optional(),
|
|
741
742
|
}));
|
|
742
743
|
/** A request queue object containing metadata and statistics. */
|
|
743
|
-
export const
|
|
744
|
+
export const RequestQueueResource = lazySchema(() => z.looseObject({
|
|
744
745
|
id: QueueId(),
|
|
745
746
|
name: z.string().nullable().optional(),
|
|
746
747
|
userId: QueueUserId(),
|
|
@@ -759,7 +760,7 @@ export const RequestQueue = lazySchema(() => z.looseObject({
|
|
|
759
760
|
}));
|
|
760
761
|
/** Response containing request queue data. */
|
|
761
762
|
export const RequestQueueResponse = lazySchema(() => z.looseObject({
|
|
762
|
-
data:
|
|
763
|
+
data: RequestQueueResource(),
|
|
763
764
|
}));
|
|
764
765
|
/** Request object for updating a request queue. */
|
|
765
766
|
export const UpdateRequestQueueRequest = lazySchema(() => z.looseObject({
|
|
@@ -771,6 +772,8 @@ export const UniqueKey = lazySchema(() => z.string());
|
|
|
771
772
|
/** The URL of the request. */
|
|
772
773
|
export const RequestUrl = lazySchema(() => z.string());
|
|
773
774
|
export const HttpMethod = lazySchema(() => z.enum(["GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]).or(z.string()));
|
|
775
|
+
/** The HTTP method of the request. */
|
|
776
|
+
export const RequestMethod = lazySchema(() => HttpMethod());
|
|
774
777
|
/** The number of times this request has been retried. */
|
|
775
778
|
export const RetryCount = lazySchema(() => z.int());
|
|
776
779
|
/** Custom user data attached to the request. Can contain arbitrary fields. */
|
|
@@ -778,7 +781,7 @@ export const RequestUserData = lazySchema(() => z.record(z.string(), z.unknown()
|
|
|
778
781
|
export const RequestBase = lazySchema(() => z.looseObject({
|
|
779
782
|
uniqueKey: UniqueKey(),
|
|
780
783
|
url: RequestUrl(),
|
|
781
|
-
method:
|
|
784
|
+
method: RequestMethod().optional(),
|
|
782
785
|
retryCount: RetryCount().optional(),
|
|
783
786
|
loadedUrl: z.string().nullable().optional(),
|
|
784
787
|
payload: z.union([z.string(), z.record(z.string(), z.unknown())]).nullable().optional(),
|
|
@@ -786,17 +789,17 @@ export const RequestBase = lazySchema(() => z.looseObject({
|
|
|
786
789
|
userData: RequestUserData().optional(),
|
|
787
790
|
noRetry: z.boolean().nullable().optional(),
|
|
788
791
|
errorMessages: z.array(z.string()).nullable().optional(),
|
|
789
|
-
handledAt: z.date().nullable().optional(),
|
|
792
|
+
handledAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
790
793
|
}));
|
|
791
794
|
/** A unique identifier assigned to the request. */
|
|
792
795
|
export const RequestId = lazySchema(() => z.string());
|
|
793
796
|
/** A request stored in the request queue, including its metadata and processing state. */
|
|
794
|
-
export const
|
|
797
|
+
export const RequestResource = lazySchema(() => RequestBase().extend({
|
|
795
798
|
id: RequestId().optional(),
|
|
796
799
|
}).required({ id: true }));
|
|
797
800
|
/** A paginated list of requests from the request queue. */
|
|
798
801
|
export const ListOfRequests = lazySchema(() => z.looseObject({
|
|
799
|
-
items: z.array(
|
|
802
|
+
items: z.array(RequestResource()),
|
|
800
803
|
limit: z.int(),
|
|
801
804
|
exclusiveStartId: z.string().optional(),
|
|
802
805
|
cursor: z.string().optional(),
|
|
@@ -830,33 +833,33 @@ export const AddedRequest = lazySchema(() => z.looseObject({
|
|
|
830
833
|
wasAlreadyHandled: WasAlreadyHandled(),
|
|
831
834
|
}));
|
|
832
835
|
/** A request that failed to be processed during a request queue operation and can be retried. */
|
|
833
|
-
export const
|
|
836
|
+
export const UnprocessedRequest = lazySchema(() => z.looseObject({
|
|
834
837
|
id: RequestId().optional(),
|
|
835
838
|
uniqueKey: UniqueKey(),
|
|
836
839
|
url: RequestUrl(),
|
|
837
|
-
method:
|
|
840
|
+
method: RequestMethod().optional(),
|
|
838
841
|
}));
|
|
839
842
|
/** Result of a batch add operation containing successfully processed and failed requests. */
|
|
840
843
|
export const BatchAddResult = lazySchema(() => z.looseObject({
|
|
841
844
|
processedRequests: z.array(AddedRequest()),
|
|
842
|
-
unprocessedRequests: z.array(
|
|
845
|
+
unprocessedRequests: z.array(UnprocessedRequest()),
|
|
843
846
|
}));
|
|
844
847
|
/** Response containing the result of a batch add operation. */
|
|
845
848
|
export const BatchAddResponse = lazySchema(() => z.looseObject({
|
|
846
849
|
data: BatchAddResult(),
|
|
847
850
|
}));
|
|
848
851
|
/** A request that should be deleted, identified by its ID. */
|
|
849
|
-
export const
|
|
852
|
+
export const RequestToDeleteById = lazySchema(() => z.looseObject({
|
|
850
853
|
id: RequestId(),
|
|
851
854
|
uniqueKey: UniqueKey().optional(),
|
|
852
855
|
}));
|
|
853
856
|
/** A request that should be deleted, identified by its unique key. */
|
|
854
|
-
export const
|
|
857
|
+
export const RequestToDeleteByUniqueKey = lazySchema(() => z.looseObject({
|
|
855
858
|
id: RequestId().optional(),
|
|
856
859
|
uniqueKey: UniqueKey(),
|
|
857
860
|
}));
|
|
858
861
|
/** A request that should be deleted. */
|
|
859
|
-
export const
|
|
862
|
+
export const RequestToDelete = lazySchema(() => z.union([RequestToDeleteById(), RequestToDeleteByUniqueKey()]));
|
|
860
863
|
/** Confirmation of a request that was successfully deleted, identified by its ID. */
|
|
861
864
|
export const DeletedRequestById = lazySchema(() => z.looseObject({
|
|
862
865
|
uniqueKey: UniqueKey().optional(),
|
|
@@ -872,7 +875,7 @@ export const DeletedRequest = lazySchema(() => z.union([DeletedRequestById(), De
|
|
|
872
875
|
/** Result of a batch delete operation containing successfully deleted and failed requests. */
|
|
873
876
|
export const BatchDeleteResult = lazySchema(() => z.looseObject({
|
|
874
877
|
processedRequests: z.array(DeletedRequest()),
|
|
875
|
-
unprocessedRequests: z.array(
|
|
878
|
+
unprocessedRequests: z.array(UnprocessedRequest()),
|
|
876
879
|
}));
|
|
877
880
|
/** Response containing the result of a batch delete operation. */
|
|
878
881
|
export const BatchDeleteResponse = lazySchema(() => z.looseObject({
|
|
@@ -888,14 +891,14 @@ export const UnlockRequestsResponse = lazySchema(() => z.looseObject({
|
|
|
888
891
|
}));
|
|
889
892
|
/** Response containing a single request from the request queue. */
|
|
890
893
|
export const RequestResponse = lazySchema(() => z.looseObject({
|
|
891
|
-
data:
|
|
894
|
+
data: RequestResource(),
|
|
892
895
|
}));
|
|
893
896
|
/** Response containing the result of updating a request in the request queue. */
|
|
894
897
|
export const UpdateRequestResponse = lazySchema(() => z.looseObject({
|
|
895
898
|
data: RequestRegistration(),
|
|
896
899
|
}));
|
|
897
900
|
/** The timestamp when the lock on this request expires. */
|
|
898
|
-
export const LockExpiresAt = lazySchema(() => z.date());
|
|
901
|
+
export const LockExpiresAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
|
|
899
902
|
/** Information about a request lock. */
|
|
900
903
|
export const RequestLockInfo = lazySchema(() => z.looseObject({
|
|
901
904
|
lockExpiresAt: LockExpiresAt(),
|
|
@@ -907,11 +910,11 @@ export const ProlongRequestLockResponse = lazySchema(() => z.looseObject({
|
|
|
907
910
|
/** The maximum number of requests returned. */
|
|
908
911
|
export const HeadLimit = lazySchema(() => z.int());
|
|
909
912
|
/** A request from the request queue head without lock information. */
|
|
910
|
-
export const
|
|
913
|
+
export const RequestQueueHeadItem = lazySchema(() => z.looseObject({
|
|
911
914
|
id: RequestId(),
|
|
912
915
|
uniqueKey: UniqueKey(),
|
|
913
916
|
url: RequestUrl(),
|
|
914
|
-
method:
|
|
917
|
+
method: RequestMethod().optional(),
|
|
915
918
|
retryCount: RetryCount().optional(),
|
|
916
919
|
}));
|
|
917
920
|
/** A batch of requests from the request queue head without locking. */
|
|
@@ -919,18 +922,18 @@ export const RequestQueueHead = lazySchema(() => z.looseObject({
|
|
|
919
922
|
limit: HeadLimit(),
|
|
920
923
|
queueModifiedAt: QueueModifiedAt(),
|
|
921
924
|
hadMultipleClients: HadMultipleClients(),
|
|
922
|
-
items: z.array(
|
|
925
|
+
items: z.array(RequestQueueHeadItem()),
|
|
923
926
|
}));
|
|
924
927
|
/** Response containing requests from the request queue head without locking. */
|
|
925
|
-
export const
|
|
928
|
+
export const RequestQueueHeadResponse = lazySchema(() => z.looseObject({
|
|
926
929
|
data: RequestQueueHead(),
|
|
927
930
|
}));
|
|
928
931
|
/** A request from the request queue head that has been locked for processing. */
|
|
929
|
-
export const
|
|
932
|
+
export const LockedRequestQueueHeadItem = lazySchema(() => z.looseObject({
|
|
930
933
|
id: RequestId(),
|
|
931
934
|
uniqueKey: UniqueKey(),
|
|
932
935
|
url: RequestUrl(),
|
|
933
|
-
method:
|
|
936
|
+
method: RequestMethod().optional(),
|
|
934
937
|
retryCount: RetryCount().optional(),
|
|
935
938
|
lockExpiresAt: LockExpiresAt(),
|
|
936
939
|
}));
|
|
@@ -942,16 +945,16 @@ export const LockedRequestQueueHead = lazySchema(() => z.looseObject({
|
|
|
942
945
|
clientKey: z.string().optional(),
|
|
943
946
|
hadMultipleClients: HadMultipleClients(),
|
|
944
947
|
lockSecs: z.int(),
|
|
945
|
-
items: z.array(
|
|
948
|
+
items: z.array(LockedRequestQueueHeadItem()),
|
|
946
949
|
}));
|
|
947
950
|
/** Response containing locked requests from the request queue head. */
|
|
948
|
-
export const
|
|
951
|
+
export const LockedRequestQueueHeadResponse = lazySchema(() => z.looseObject({
|
|
949
952
|
data: LockedRequestQueueHead(),
|
|
950
953
|
}));
|
|
951
954
|
export const TaskStats = lazySchema(() => z.looseObject({
|
|
952
955
|
totalRuns: z.int().optional(),
|
|
953
956
|
}));
|
|
954
|
-
export const
|
|
957
|
+
export const TaskListItem = lazySchema(() => z.looseObject({
|
|
955
958
|
id: z.string(),
|
|
956
959
|
userId: z.string(),
|
|
957
960
|
actId: z.string(),
|
|
@@ -959,12 +962,12 @@ export const TaskShort = lazySchema(() => z.looseObject({
|
|
|
959
962
|
name: z.string(),
|
|
960
963
|
username: z.string().nullable().optional(),
|
|
961
964
|
actUsername: z.string().nullable().optional(),
|
|
962
|
-
createdAt: z.date(),
|
|
963
|
-
modifiedAt: z.date(),
|
|
965
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
966
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
964
967
|
stats: TaskStats().nullable().optional(),
|
|
965
968
|
}));
|
|
966
969
|
export const ListOfTasks = lazySchema(() => PaginationResponse().extend({
|
|
967
|
-
items: z.array(
|
|
970
|
+
items: z.array(TaskListItem()),
|
|
968
971
|
}));
|
|
969
972
|
export const ListOfTasksResponse = lazySchema(() => z.looseObject({
|
|
970
973
|
data: ListOfTasks(),
|
|
@@ -988,7 +991,7 @@ export const TaskInput = lazySchema(() => z.record(z.string(), z.unknown()));
|
|
|
988
991
|
* `publishedAt` is set and unpublished when it is `null`.
|
|
989
992
|
*/
|
|
990
993
|
export const TaskPublicConfig = lazySchema(() => z.looseObject({
|
|
991
|
-
publishedAt: z.date().nullable().optional(),
|
|
994
|
+
publishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
992
995
|
seoTitle: z.string().max(60).nullable().optional(),
|
|
993
996
|
seoDescription: z.string().max(160).nullable().optional(),
|
|
994
997
|
inputSchemaFields: z.array(z.string()).nullable().optional(),
|
|
@@ -1001,6 +1004,7 @@ export const CreateTaskRequest = lazySchema(() => z.looseObject({
|
|
|
1001
1004
|
options: TaskOptions().nullable().optional(),
|
|
1002
1005
|
input: z.union([TaskInput(), z.array(TaskInput())]).nullable().optional(),
|
|
1003
1006
|
title: z.string().nullable().optional(),
|
|
1007
|
+
description: z.string().nullable().optional(),
|
|
1004
1008
|
actorStandby: ActorStandby().nullable().optional(),
|
|
1005
1009
|
publicConfig: TaskPublicConfig().optional(),
|
|
1006
1010
|
}));
|
|
@@ -1010,13 +1014,14 @@ export const Task = lazySchema(() => z.looseObject({
|
|
|
1010
1014
|
actId: z.string(),
|
|
1011
1015
|
name: z.string(),
|
|
1012
1016
|
username: z.string().nullable().optional(),
|
|
1013
|
-
createdAt: z.date(),
|
|
1014
|
-
modifiedAt: z.date(),
|
|
1015
|
-
removedAt: z.date().nullable().optional(),
|
|
1017
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1018
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1019
|
+
removedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1016
1020
|
stats: TaskStats().nullable().optional(),
|
|
1017
1021
|
options: TaskOptions().nullable().optional(),
|
|
1018
1022
|
input: z.union([TaskInput(), z.array(TaskInput())]).nullable().optional(),
|
|
1019
1023
|
title: z.string().nullable().optional(),
|
|
1024
|
+
description: z.string().nullable().optional(),
|
|
1020
1025
|
actorStandby: ActorStandby().nullable().optional(),
|
|
1021
1026
|
standbyUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1022
1027
|
isPublic: z.boolean().optional(),
|
|
@@ -1031,14 +1036,15 @@ export const UpdateTaskRequest = lazySchema(() => z.looseObject({
|
|
|
1031
1036
|
options: TaskOptions().nullable().optional(),
|
|
1032
1037
|
input: z.union([TaskInput(), z.array(TaskInput())]).nullable().optional(),
|
|
1033
1038
|
title: z.string().nullable().optional(),
|
|
1039
|
+
description: z.string().nullable().optional(),
|
|
1034
1040
|
actorStandby: ActorStandby().nullable().optional(),
|
|
1035
1041
|
publicConfig: TaskPublicConfig().optional(),
|
|
1036
1042
|
isPublic: z.boolean().optional(),
|
|
1037
1043
|
}));
|
|
1038
|
-
export const
|
|
1044
|
+
export const WebhookResource = lazySchema(() => z.looseObject({
|
|
1039
1045
|
id: z.string(),
|
|
1040
|
-
createdAt: z.date(),
|
|
1041
|
-
modifiedAt: z.date(),
|
|
1046
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1047
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1042
1048
|
userId: z.string(),
|
|
1043
1049
|
isAdHoc: z.boolean().nullable().optional(),
|
|
1044
1050
|
shouldInterpolateStrings: z.boolean().nullable().optional(),
|
|
@@ -1050,7 +1056,7 @@ export const Webhook = lazySchema(() => z.looseObject({
|
|
|
1050
1056
|
payloadTemplate: z.string().nullable().optional(),
|
|
1051
1057
|
headersTemplate: z.string().nullable().optional(),
|
|
1052
1058
|
description: z.string().nullable().optional(),
|
|
1053
|
-
lastDispatch:
|
|
1059
|
+
lastDispatch: WebhookLastDispatch().nullable().optional(),
|
|
1054
1060
|
stats: WebhookStats().nullable().optional(),
|
|
1055
1061
|
}));
|
|
1056
1062
|
export const UpdateRunRequest = lazySchema(() => z.looseObject({
|
|
@@ -1066,7 +1072,7 @@ export const ChargeRunRequest = lazySchema(() => z.looseObject({
|
|
|
1066
1072
|
export const StorageOwnership = lazySchema(() => z.enum(["ownedByMe", "sharedWithMe"]).or(z.string()));
|
|
1067
1073
|
export const ListOfKeyValueStores = lazySchema(() => PaginationResponse().extend({
|
|
1068
1074
|
unnamed: z.boolean().optional(),
|
|
1069
|
-
items: z.array(
|
|
1075
|
+
items: z.array(KeyValueStoreResource()),
|
|
1070
1076
|
}));
|
|
1071
1077
|
export const ListOfKeyValueStoresResponse = lazySchema(() => z.looseObject({
|
|
1072
1078
|
data: ListOfKeyValueStores(),
|
|
@@ -1075,9 +1081,9 @@ export const DatasetListItem = lazySchema(() => z.looseObject({
|
|
|
1075
1081
|
id: z.string(),
|
|
1076
1082
|
name: z.string(),
|
|
1077
1083
|
userId: z.string(),
|
|
1078
|
-
createdAt: z.date(),
|
|
1079
|
-
modifiedAt: z.date(),
|
|
1080
|
-
accessedAt: z.date(),
|
|
1084
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1085
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1086
|
+
accessedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1081
1087
|
itemCount: z.int(),
|
|
1082
1088
|
cleanItemCount: z.int(),
|
|
1083
1089
|
actId: z.string().nullable().optional(),
|
|
@@ -1095,7 +1101,7 @@ export const ListOfDatasetsResponse = lazySchema(() => z.looseObject({
|
|
|
1095
1101
|
data: ListOfDatasets(),
|
|
1096
1102
|
}));
|
|
1097
1103
|
/** A shortened request queue object for list responses. */
|
|
1098
|
-
export const
|
|
1104
|
+
export const RequestQueueListItem = lazySchema(() => z.looseObject({
|
|
1099
1105
|
id: QueueId(),
|
|
1100
1106
|
name: z.string(),
|
|
1101
1107
|
userId: QueueUserId(),
|
|
@@ -1103,7 +1109,7 @@ export const RequestQueueShort = lazySchema(() => z.looseObject({
|
|
|
1103
1109
|
createdAt: QueueCreatedAt(),
|
|
1104
1110
|
modifiedAt: QueueModifiedAt(),
|
|
1105
1111
|
accessedAt: QueueAccessedAt(),
|
|
1106
|
-
expireAt: z.date().optional(),
|
|
1112
|
+
expireAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
1107
1113
|
totalRequestCount: TotalRequestCount(),
|
|
1108
1114
|
handledRequestCount: HandledRequestCount(),
|
|
1109
1115
|
pendingRequestCount: PendingRequestCount(),
|
|
@@ -1116,13 +1122,13 @@ export const RequestQueueShort = lazySchema(() => z.looseObject({
|
|
|
1116
1122
|
/** A paginated list of request queues. */
|
|
1117
1123
|
export const ListOfRequestQueues = lazySchema(() => PaginationResponse().extend({
|
|
1118
1124
|
unnamed: z.boolean().optional(),
|
|
1119
|
-
items: z.array(
|
|
1125
|
+
items: z.array(RequestQueueListItem()),
|
|
1120
1126
|
}));
|
|
1121
1127
|
/** Response containing a list of request queues. */
|
|
1122
1128
|
export const ListOfRequestQueuesResponse = lazySchema(() => z.looseObject({
|
|
1123
1129
|
data: ListOfRequestQueues(),
|
|
1124
1130
|
}));
|
|
1125
|
-
export const
|
|
1131
|
+
export const CreateWebhookRequest = lazySchema(() => z.looseObject({
|
|
1126
1132
|
isAdHoc: z.boolean().nullable().optional(),
|
|
1127
1133
|
eventTypes: z.array(WebhookEventType()),
|
|
1128
1134
|
condition: WebhookCondition(),
|
|
@@ -1137,9 +1143,9 @@ export const WebhookCreate = lazySchema(() => z.looseObject({
|
|
|
1137
1143
|
}));
|
|
1138
1144
|
/** Response containing webhook data. */
|
|
1139
1145
|
export const WebhookResponse = lazySchema(() => z.looseObject({
|
|
1140
|
-
data:
|
|
1146
|
+
data: WebhookResource(),
|
|
1141
1147
|
}));
|
|
1142
|
-
export const
|
|
1148
|
+
export const UpdateWebhookRequest = lazySchema(() => z.looseObject({
|
|
1143
1149
|
isAdHoc: z.boolean().nullable().optional(),
|
|
1144
1150
|
eventTypes: z.array(WebhookEventType()).nullable().optional(),
|
|
1145
1151
|
condition: WebhookCondition().nullable().optional(),
|
|
@@ -1162,7 +1168,7 @@ export const WebhookDispatch = lazySchema(() => z.looseObject({
|
|
|
1162
1168
|
id: z.string(),
|
|
1163
1169
|
userId: z.string(),
|
|
1164
1170
|
webhookId: z.string(),
|
|
1165
|
-
createdAt: z.date(),
|
|
1171
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1166
1172
|
status: WebhookDispatchStatus(),
|
|
1167
1173
|
eventType: WebhookEventType(),
|
|
1168
1174
|
eventData: z.looseObject({
|
|
@@ -1173,14 +1179,14 @@ export const WebhookDispatch = lazySchema(() => z.looseObject({
|
|
|
1173
1179
|
}).nullable().optional(),
|
|
1174
1180
|
webhook: WebhookDispatchWebhookSummary().nullable().optional(),
|
|
1175
1181
|
calls: z.array(z.looseObject({
|
|
1176
|
-
startedAt: z.date().nullable().optional(),
|
|
1177
|
-
finishedAt: z.date().nullable().optional(),
|
|
1182
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1183
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1178
1184
|
errorMessage: z.string().nullable().optional(),
|
|
1179
1185
|
responseStatus: z.int().nullable().optional(),
|
|
1180
1186
|
responseBody: z.string().nullable().optional(),
|
|
1181
1187
|
})).optional(),
|
|
1182
1188
|
}));
|
|
1183
|
-
export const
|
|
1189
|
+
export const WebhookDispatchResponse = lazySchema(() => z.looseObject({
|
|
1184
1190
|
data: WebhookDispatch(),
|
|
1185
1191
|
}));
|
|
1186
1192
|
export const ListOfWebhookDispatches = lazySchema(() => PaginationResponse().extend({
|
|
@@ -1189,9 +1195,6 @@ export const ListOfWebhookDispatches = lazySchema(() => PaginationResponse().ext
|
|
|
1189
1195
|
export const ListOfWebhookDispatchesResponse = lazySchema(() => z.looseObject({
|
|
1190
1196
|
data: ListOfWebhookDispatches(),
|
|
1191
1197
|
}));
|
|
1192
|
-
export const WebhookDispatchResponse = lazySchema(() => z.looseObject({
|
|
1193
|
-
data: WebhookDispatch(),
|
|
1194
|
-
}));
|
|
1195
1198
|
export const ScheduleBase = lazySchema(() => z.looseObject({
|
|
1196
1199
|
id: z.string(),
|
|
1197
1200
|
userId: z.string(),
|
|
@@ -1200,27 +1203,27 @@ export const ScheduleBase = lazySchema(() => z.looseObject({
|
|
|
1200
1203
|
timezone: z.string(),
|
|
1201
1204
|
isEnabled: z.boolean(),
|
|
1202
1205
|
isExclusive: z.boolean(),
|
|
1203
|
-
createdAt: z.date(),
|
|
1204
|
-
modifiedAt: z.date(),
|
|
1205
|
-
nextRunAt: z.date().nullable().optional(),
|
|
1206
|
-
lastRunAt: z.date().nullable().optional(),
|
|
1206
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1207
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1208
|
+
nextRunAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1209
|
+
lastRunAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1207
1210
|
}));
|
|
1208
|
-
export const
|
|
1211
|
+
export const ScheduleListItemActionRunActor = lazySchema(() => z.looseObject({
|
|
1209
1212
|
id: z.string(),
|
|
1210
1213
|
type: z.literal("RUN_ACTOR"),
|
|
1211
1214
|
actorId: z.string(),
|
|
1212
1215
|
}));
|
|
1213
|
-
export const
|
|
1216
|
+
export const ScheduleListItemActionRunActorTask = lazySchema(() => z.looseObject({
|
|
1214
1217
|
id: z.string(),
|
|
1215
1218
|
type: z.literal("RUN_ACTOR_TASK"),
|
|
1216
1219
|
actorTaskId: z.string(),
|
|
1217
1220
|
}));
|
|
1218
|
-
export const
|
|
1219
|
-
export const
|
|
1220
|
-
actions: z.array(
|
|
1221
|
+
export const ScheduleListItemAction = lazySchema(() => z.discriminatedUnion("type", [ScheduleListItemActionRunActor(), ScheduleListItemActionRunActorTask()]));
|
|
1222
|
+
export const ScheduleListItem = lazySchema(() => ScheduleBase().extend({
|
|
1223
|
+
actions: z.array(ScheduleListItemAction()),
|
|
1221
1224
|
}));
|
|
1222
1225
|
export const ListOfSchedules = lazySchema(() => PaginationResponse().extend({
|
|
1223
|
-
items: z.array(
|
|
1226
|
+
items: z.array(ScheduleListItem()),
|
|
1224
1227
|
}));
|
|
1225
1228
|
export const ListOfSchedulesResponse = lazySchema(() => z.looseObject({
|
|
1226
1229
|
data: ListOfSchedules(),
|
|
@@ -1241,7 +1244,7 @@ export const ScheduleCreateActionRunActorTask = lazySchema(() => z.looseObject({
|
|
|
1241
1244
|
input: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
1242
1245
|
}));
|
|
1243
1246
|
export const ScheduleCreateAction = lazySchema(() => z.discriminatedUnion("type", [ScheduleCreateActionRunActor(), ScheduleCreateActionRunActorTask()]));
|
|
1244
|
-
export const
|
|
1247
|
+
export const CreateOrUpdateScheduleRequest = lazySchema(() => z.looseObject({
|
|
1245
1248
|
name: z.string().nullable().optional(),
|
|
1246
1249
|
isEnabled: z.boolean().nullable().optional(),
|
|
1247
1250
|
isExclusive: z.boolean().nullable().optional(),
|
|
@@ -1276,21 +1279,21 @@ export const Schedule = lazySchema(() => ScheduleBase().extend({
|
|
|
1276
1279
|
export const ScheduleResponse = lazySchema(() => z.looseObject({
|
|
1277
1280
|
data: Schedule(),
|
|
1278
1281
|
}));
|
|
1279
|
-
export const
|
|
1282
|
+
export const ScheduleLogEntry = lazySchema(() => z.looseObject({
|
|
1280
1283
|
message: z.string(),
|
|
1281
1284
|
level: z.string(),
|
|
1282
|
-
createdAt: z.date(),
|
|
1285
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1283
1286
|
}));
|
|
1284
1287
|
export const ScheduleLogResponse = lazySchema(() => z.looseObject({
|
|
1285
|
-
data: z.array(
|
|
1288
|
+
data: z.array(ScheduleLogEntry()),
|
|
1286
1289
|
}));
|
|
1287
1290
|
export const CurrentPricingInfo = lazySchema(() => z.looseObject({
|
|
1288
1291
|
pricingModel: z.string(),
|
|
1289
1292
|
apifyMarginPercentage: z.number().optional(),
|
|
1290
|
-
createdAt: z.date().optional(),
|
|
1291
|
-
startedAt: z.date().optional(),
|
|
1292
|
-
notifiedAboutChangeAt: z.date().nullable().optional(),
|
|
1293
|
-
notifiedAboutFutureChangeAt: z.date().nullable().optional(),
|
|
1293
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
1294
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
1295
|
+
notifiedAboutChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1296
|
+
notifiedAboutFutureChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1294
1297
|
isPriceChangeNotificationSuppressed: z.boolean().optional(),
|
|
1295
1298
|
forceContainsSignificantPriceChange: z.boolean().optional(),
|
|
1296
1299
|
isPPEPlatformUsagePaidByUser: z.boolean().optional(),
|
|
@@ -1301,7 +1304,7 @@ export const CurrentPricingInfo = lazySchema(() => z.looseObject({
|
|
|
1301
1304
|
minimalMaxTotalChargeUsd: z.number().nullable().optional(),
|
|
1302
1305
|
pricingPerEvent: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
1303
1306
|
}));
|
|
1304
|
-
export const
|
|
1307
|
+
export const StoreActor = lazySchema(() => z.looseObject({
|
|
1305
1308
|
id: z.string(),
|
|
1306
1309
|
title: z.string(),
|
|
1307
1310
|
name: z.string(),
|
|
@@ -1323,13 +1326,14 @@ export const StoreListActor = lazySchema(() => z.looseObject({
|
|
|
1323
1326
|
readmeSummary: z.string().optional(),
|
|
1324
1327
|
}));
|
|
1325
1328
|
export const ListOfStoreActors = lazySchema(() => PaginationResponse().extend({
|
|
1326
|
-
items: z.array(
|
|
1329
|
+
items: z.array(StoreActor()),
|
|
1327
1330
|
}));
|
|
1328
|
-
export const
|
|
1331
|
+
export const ListOfStoreActorsResponse = lazySchema(() => z.looseObject({
|
|
1329
1332
|
data: ListOfStoreActors(),
|
|
1330
1333
|
}));
|
|
1331
|
-
export const
|
|
1334
|
+
export const UserProfile = lazySchema(() => z.looseObject({
|
|
1332
1335
|
bio: z.string().nullable().optional(),
|
|
1336
|
+
readme: z.string().nullable().optional(),
|
|
1333
1337
|
name: z.string().optional(),
|
|
1334
1338
|
pictureUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1335
1339
|
githubUsername: z.string().nullable().optional(),
|
|
@@ -1338,9 +1342,9 @@ export const Profile = lazySchema(() => z.looseObject({
|
|
|
1338
1342
|
}));
|
|
1339
1343
|
export const UserPublicInfo = lazySchema(() => z.looseObject({
|
|
1340
1344
|
username: z.string(),
|
|
1341
|
-
profile:
|
|
1345
|
+
profile: UserProfile().optional(),
|
|
1342
1346
|
}));
|
|
1343
|
-
export const
|
|
1347
|
+
export const UserPublicInfoResponse = lazySchema(() => z.looseObject({
|
|
1344
1348
|
data: UserPublicInfo(),
|
|
1345
1349
|
}));
|
|
1346
1350
|
export const ProxyGroup = lazySchema(() => z.looseObject({
|
|
@@ -1348,7 +1352,7 @@ export const ProxyGroup = lazySchema(() => z.looseObject({
|
|
|
1348
1352
|
description: z.string().nullable(),
|
|
1349
1353
|
availableCount: z.int(),
|
|
1350
1354
|
}));
|
|
1351
|
-
export const
|
|
1355
|
+
export const ProxyResource = lazySchema(() => z.looseObject({
|
|
1352
1356
|
password: z.string(),
|
|
1353
1357
|
groups: z.array(ProxyGroup()),
|
|
1354
1358
|
}));
|
|
@@ -1358,7 +1362,7 @@ export const Proxy = lazySchema(() => z.looseObject({
|
|
|
1358
1362
|
* the count of available proxies.
|
|
1359
1363
|
*/
|
|
1360
1364
|
export const AvailableProxyGroups = lazySchema(() => z.record(z.string(), z.int()));
|
|
1361
|
-
export const
|
|
1365
|
+
export const UserPlan = lazySchema(() => z.looseObject({
|
|
1362
1366
|
id: z.string().optional(),
|
|
1363
1367
|
description: z.string().optional(),
|
|
1364
1368
|
isEnabled: z.boolean().optional(),
|
|
@@ -1390,7 +1394,7 @@ export const EffectivePlatformFeature = lazySchema(() => z.looseObject({
|
|
|
1390
1394
|
disabledReason: z.string().nullable(),
|
|
1391
1395
|
disabledReasonType: z.string().nullable(),
|
|
1392
1396
|
isTrial: z.boolean(),
|
|
1393
|
-
trialExpirationAt: z.date().nullable(),
|
|
1397
|
+
trialExpirationAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable(),
|
|
1394
1398
|
}));
|
|
1395
1399
|
export const EffectivePlatformFeatures = lazySchema(() => z.looseObject({
|
|
1396
1400
|
ACTORS: EffectivePlatformFeature(),
|
|
@@ -1407,22 +1411,22 @@ export const EffectivePlatformFeatures = lazySchema(() => z.looseObject({
|
|
|
1407
1411
|
export const UserPrivateInfo = lazySchema(() => z.looseObject({
|
|
1408
1412
|
id: z.string().optional(),
|
|
1409
1413
|
username: z.string(),
|
|
1410
|
-
profile:
|
|
1414
|
+
profile: UserProfile().optional(),
|
|
1411
1415
|
email: z.string().optional(),
|
|
1412
|
-
proxy:
|
|
1413
|
-
plan:
|
|
1416
|
+
proxy: ProxyResource().optional(),
|
|
1417
|
+
plan: UserPlan().optional(),
|
|
1414
1418
|
effectivePlatformFeatures: EffectivePlatformFeatures().optional(),
|
|
1415
|
-
createdAt: z.date().optional(),
|
|
1419
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
1416
1420
|
isPaying: z.boolean().optional(),
|
|
1417
1421
|
}));
|
|
1418
|
-
export const
|
|
1422
|
+
export const UserPrivateInfoResponse = lazySchema(() => z.looseObject({
|
|
1419
1423
|
data: UserPrivateInfo(),
|
|
1420
1424
|
}));
|
|
1421
1425
|
export const UsageCycle = lazySchema(() => z.looseObject({
|
|
1422
|
-
startAt: z.date(),
|
|
1423
|
-
endAt: z.date(),
|
|
1426
|
+
startAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1427
|
+
endAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1424
1428
|
}));
|
|
1425
|
-
export const
|
|
1429
|
+
export const PriceTier = lazySchema(() => z.looseObject({
|
|
1426
1430
|
quantityAbove: z.number(),
|
|
1427
1431
|
discountPercent: z.number(),
|
|
1428
1432
|
tierQuantity: z.number(),
|
|
@@ -1434,21 +1438,21 @@ export const UsageItem = lazySchema(() => z.looseObject({
|
|
|
1434
1438
|
baseAmountUsd: z.number(),
|
|
1435
1439
|
baseUnitPriceUsd: z.number().optional(),
|
|
1436
1440
|
amountAfterVolumeDiscountUsd: z.number().optional(),
|
|
1437
|
-
priceTiers: z.array(
|
|
1441
|
+
priceTiers: z.array(PriceTier()).optional(),
|
|
1438
1442
|
}));
|
|
1439
1443
|
/** A map of usage item names (e.g., ACTOR_COMPUTE_UNITS) to their usage details. */
|
|
1440
1444
|
export const MonthlyServiceUsage = lazySchema(() => z.record(z.string(), UsageItem()));
|
|
1441
1445
|
/** A map of service usage item names to their usage details. */
|
|
1442
1446
|
export const ServiceUsage = lazySchema(() => z.record(z.string(), UsageItem()));
|
|
1443
|
-
export const
|
|
1444
|
-
date: z.date(),
|
|
1447
|
+
export const DailyServiceUsage = lazySchema(() => z.looseObject({
|
|
1448
|
+
date: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1445
1449
|
serviceUsage: ServiceUsage(),
|
|
1446
1450
|
totalUsageCreditsUsd: z.number(),
|
|
1447
1451
|
}));
|
|
1448
1452
|
export const MonthlyUsage = lazySchema(() => z.looseObject({
|
|
1449
1453
|
usageCycle: UsageCycle(),
|
|
1450
1454
|
monthlyServiceUsage: MonthlyServiceUsage(),
|
|
1451
|
-
dailyServiceUsages: z.array(
|
|
1455
|
+
dailyServiceUsages: z.array(DailyServiceUsage()),
|
|
1452
1456
|
totalUsageCreditsUsdBeforeVolumeDiscount: z.number(),
|
|
1453
1457
|
totalUsageCreditsUsdAfterVolumeDiscount: z.number(),
|
|
1454
1458
|
}));
|
|
@@ -1469,7 +1473,7 @@ export const Limits = lazySchema(() => z.looseObject({
|
|
|
1469
1473
|
dataRetentionDays: z.int(),
|
|
1470
1474
|
maxScheduleCount: z.int().optional(),
|
|
1471
1475
|
}));
|
|
1472
|
-
export const
|
|
1476
|
+
export const CurrentUsage = lazySchema(() => z.looseObject({
|
|
1473
1477
|
monthlyUsageUsd: z.number(),
|
|
1474
1478
|
monthlyActorComputeUnits: z.number(),
|
|
1475
1479
|
monthlyExternalDataTransferGbytes: z.number(),
|
|
@@ -1485,9 +1489,9 @@ export const Current = lazySchema(() => z.looseObject({
|
|
|
1485
1489
|
export const AccountLimits = lazySchema(() => z.looseObject({
|
|
1486
1490
|
monthlyUsageCycle: UsageCycle(),
|
|
1487
1491
|
limits: Limits(),
|
|
1488
|
-
current:
|
|
1492
|
+
current: CurrentUsage(),
|
|
1489
1493
|
}));
|
|
1490
|
-
export const
|
|
1494
|
+
export const AccountLimitsResponse = lazySchema(() => z.looseObject({
|
|
1491
1495
|
data: AccountLimits(),
|
|
1492
1496
|
}));
|
|
1493
1497
|
export const UpdateLimitsRequest = lazySchema(() => z.looseObject({
|
|
@@ -1502,20 +1506,20 @@ export const BrowserInfoResponse = lazySchema(() => z.looseObject({
|
|
|
1502
1506
|
headers: z.record(z.string(), z.union([z.string(), z.array(z.string())])).optional(),
|
|
1503
1507
|
rawHeaders: z.array(z.string()).optional(),
|
|
1504
1508
|
}));
|
|
1505
|
-
export const
|
|
1509
|
+
export const EncodeAndSignResult = lazySchema(() => z.looseObject({
|
|
1506
1510
|
encoded: z.string(),
|
|
1507
1511
|
}));
|
|
1508
1512
|
export const EncodeAndSignResponse = lazySchema(() => z.looseObject({
|
|
1509
|
-
data:
|
|
1513
|
+
data: EncodeAndSignResult(),
|
|
1510
1514
|
}));
|
|
1511
1515
|
export const DecodeAndVerifyRequest = lazySchema(() => z.looseObject({
|
|
1512
1516
|
encoded: z.string(),
|
|
1513
1517
|
}));
|
|
1514
|
-
export const
|
|
1518
|
+
export const DecodeAndVerifyResult = lazySchema(() => z.looseObject({
|
|
1515
1519
|
decoded: z.unknown(),
|
|
1516
1520
|
encodedByUserId: z.string().nullable(),
|
|
1517
1521
|
isVerifiedUser: z.boolean(),
|
|
1518
1522
|
}));
|
|
1519
1523
|
export const DecodeAndVerifyResponse = lazySchema(() => z.looseObject({
|
|
1520
|
-
data:
|
|
1524
|
+
data: DecodeAndVerifyResult(),
|
|
1521
1525
|
}));
|