apify-client 3.0.0-beta.7 → 3.0.0-beta.71
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 +13 -27
- package/dist/apify_api_error.js +33 -23
- package/dist/apify_client.d.ts +125 -10
- package/dist/apify_client.js +133 -48
- package/dist/apify_client_error.d.ts +10 -0
- package/dist/apify_client_error.js +10 -0
- package/dist/base/api_client.d.ts +7 -7
- package/dist/base/api_client.js +36 -36
- 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 +918 -372
- package/dist/generated/schemas.d.ts +889 -871
- package/dist/generated/schemas.js +234 -209
- 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 +5 -1
- package/dist/index.js +4 -1
- package/dist/invalid_response_body_error.d.ts +14 -0
- package/dist/invalid_response_body_error.js +18 -0
- package/dist/models.d.ts +167 -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 +81 -36
- package/dist/resource_clients/dataset.js +109 -120
- 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 +101 -23
- package/dist/resource_clients/key_value_store.js +121 -45
- 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 +40 -21
- package/dist/resource_clients/log.js +144 -66
- package/dist/resource_clients/request_queue.d.ts +76 -31
- package/dist/resource_clients/request_queue.js +178 -93
- 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/response_validation_error.d.ts +2 -1
- package/dist/response_validation_error.js +2 -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 +201 -4
- package/dist/schemas.js +19 -4
- 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 +88 -57
- package/dist/utils.js +219 -157
- 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(),
|
|
@@ -57,10 +57,13 @@ export const ErrorDetail = lazySchema(() => z.looseObject({
|
|
|
57
57
|
export const ErrorResponse = lazySchema(() => z.looseObject({
|
|
58
58
|
error: ErrorDetail(),
|
|
59
59
|
}));
|
|
60
|
-
|
|
61
|
-
export const
|
|
60
|
+
/** Determines the permission level that the Actor requires to run. For details, see [Actor permissions](https://docs.apify.com/platform/actors/development/permissions). */
|
|
61
|
+
export const ActorPermissionLevel = lazySchema(() => z.enum(["LIMITED_PERMISSIONS", "FULL_PERMISSIONS"]).or(z.string()));
|
|
62
|
+
/** The version source types accepted in request bodies. Same as `VersionSourceType`, without `SOURCE_CODE`. */
|
|
63
|
+
export const WritableVersionSourceType = lazySchema(() => z.enum(["SOURCE_FILES", "GIT_REPO", "TARBALL", "GITHUB_GIST"]).or(z.string()));
|
|
64
|
+
export const EnvVarRequest = lazySchema(() => z.looseObject({
|
|
62
65
|
name: z.string(),
|
|
63
|
-
value: z.string()
|
|
66
|
+
value: z.string(),
|
|
64
67
|
isSecret: z.boolean().nullable().optional(),
|
|
65
68
|
}));
|
|
66
69
|
export const SourceCodeFileFormat = lazySchema(() => z.enum(["BASE64", "TEXT"]).or(z.string()));
|
|
@@ -79,19 +82,17 @@ export const SourceCodeFolder = lazySchema(() => z.looseObject({
|
|
|
79
82
|
folder: z.boolean(),
|
|
80
83
|
}));
|
|
81
84
|
export const VersionSourceFiles = lazySchema(() => z.array(z.union([SourceCodeFile(), SourceCodeFolder()])));
|
|
82
|
-
export const
|
|
85
|
+
export const CreateVersionRequest = lazySchema(() => z.looseObject({
|
|
83
86
|
versionNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/),
|
|
84
|
-
sourceType:
|
|
85
|
-
envVars: z.array(
|
|
87
|
+
sourceType: WritableVersionSourceType(),
|
|
88
|
+
envVars: z.array(EnvVarRequest()).optional(),
|
|
86
89
|
applyEnvVarsToBuild: z.boolean().nullable().optional(),
|
|
87
90
|
buildTag: z.string().nullable().optional(),
|
|
88
91
|
sourceFiles: VersionSourceFiles().optional(),
|
|
89
|
-
gitRepoUrl: z.string().
|
|
90
|
-
tarballUrl: z.string().
|
|
91
|
-
gitHubGistUrl: z.string().
|
|
92
|
+
gitRepoUrl: z.string().optional(),
|
|
93
|
+
tarballUrl: z.string().optional(),
|
|
94
|
+
gitHubGistUrl: z.string().optional(),
|
|
92
95
|
}));
|
|
93
|
-
/** Determines the permission level that the Actor requires to run. For details, see [Actor permissions](https://docs.apify.com/platform/actors/development/permissions). */
|
|
94
|
-
export const ActorPermissionLevel = lazySchema(() => z.enum(["LIMITED_PERMISSIONS", "FULL_PERMISSIONS"]).or(z.string()));
|
|
95
96
|
/** The default settings applied to an Actor run. Can be overridden elsewhere. */
|
|
96
97
|
export const DefaultRunOptions = lazySchema(() => z.looseObject({
|
|
97
98
|
build: z.string().optional(),
|
|
@@ -119,23 +120,41 @@ export const CreateActorRequest = lazySchema(() => z.looseObject({
|
|
|
119
120
|
name: z.string().nullable().optional(),
|
|
120
121
|
description: z.string().nullable().optional(),
|
|
121
122
|
title: z.string().nullable().optional(),
|
|
122
|
-
isPublic: z.boolean().
|
|
123
|
+
isPublic: z.boolean().optional(),
|
|
124
|
+
actorPermissionLevel: ActorPermissionLevel().optional(),
|
|
123
125
|
seoTitle: z.string().nullable().optional(),
|
|
124
126
|
seoDescription: z.string().nullable().optional(),
|
|
125
127
|
restartOnError: z.boolean().optional(),
|
|
126
|
-
versions: z.array(
|
|
128
|
+
versions: z.array(CreateVersionRequest()).min(1).optional(),
|
|
127
129
|
categories: z.array(z.string()).nullable().optional(),
|
|
128
130
|
defaultRunOptions: DefaultRunOptions().optional(),
|
|
129
131
|
actorStandby: ActorStandby().nullable().optional(),
|
|
130
132
|
exampleRunInput: ExampleRunInput().nullable().optional(),
|
|
131
133
|
isDeprecated: z.boolean().nullable().optional(),
|
|
132
134
|
}));
|
|
135
|
+
export const VersionSourceType = lazySchema(() => z.enum(["SOURCE_FILES", "GIT_REPO", "TARBALL", "GITHUB_GIST", "SOURCE_CODE"]).or(z.string()));
|
|
136
|
+
export const EnvVar = lazySchema(() => z.looseObject({
|
|
137
|
+
name: z.string(),
|
|
138
|
+
value: z.string().optional(),
|
|
139
|
+
isSecret: z.boolean().nullable().optional(),
|
|
140
|
+
}));
|
|
141
|
+
export const Version = lazySchema(() => z.looseObject({
|
|
142
|
+
versionNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/),
|
|
143
|
+
sourceType: VersionSourceType().nullable(),
|
|
144
|
+
envVars: z.array(EnvVar()).nullable().optional(),
|
|
145
|
+
applyEnvVarsToBuild: z.boolean().nullable().optional(),
|
|
146
|
+
buildTag: z.string().nullable().optional(),
|
|
147
|
+
sourceFiles: VersionSourceFiles().optional(),
|
|
148
|
+
gitRepoUrl: z.string().nullable().optional(),
|
|
149
|
+
tarballUrl: z.string().nullable().optional(),
|
|
150
|
+
gitHubGistUrl: z.string().nullable().optional(),
|
|
151
|
+
}));
|
|
133
152
|
export const CommonActorPricingInfo = lazySchema(() => z.looseObject({
|
|
134
153
|
apifyMarginPercentage: z.number(),
|
|
135
|
-
createdAt: z.date(),
|
|
136
|
-
startedAt: z.date(),
|
|
137
|
-
notifiedAboutFutureChangeAt: z.date().nullable().optional(),
|
|
138
|
-
notifiedAboutChangeAt: z.date().nullable().optional(),
|
|
154
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
155
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
156
|
+
notifiedAboutFutureChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
157
|
+
notifiedAboutChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
139
158
|
reasonForChange: z.string().nullable().optional(),
|
|
140
159
|
isPriceChangeNotificationSuppressed: z.boolean().optional(),
|
|
141
160
|
forceContainsSignificantPriceChange: z.boolean().optional(),
|
|
@@ -197,13 +216,13 @@ export const TaggedBuildInfo = lazySchema(() => z.looseObject({
|
|
|
197
216
|
buildId: z.string().optional(),
|
|
198
217
|
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
218
|
buildNumberInt: z.int().optional(),
|
|
200
|
-
finishedAt: z.date().nullable().optional(),
|
|
219
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
201
220
|
}));
|
|
202
221
|
/** A dictionary mapping build tag names (e.g., "latest", "beta") to their build information. */
|
|
203
222
|
export const TaggedBuilds = lazySchema(() => z.record(z.string(), TaggedBuildInfo().nullable()));
|
|
204
223
|
/** 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
224
|
export const ActorNotice = lazySchema(() => z.enum(["NONE", "RESIDENTIAL_PROXY_REQUIRED", "UNDER_MAINTENANCE"]).or(z.string()).nullable());
|
|
206
|
-
export const
|
|
225
|
+
export const ActorResource = lazySchema(() => z.looseObject({
|
|
207
226
|
id: z.string(),
|
|
208
227
|
userId: z.string(),
|
|
209
228
|
name: z.string(),
|
|
@@ -212,8 +231,8 @@ export const Actor = lazySchema(() => z.looseObject({
|
|
|
212
231
|
restartOnError: z.boolean().optional(),
|
|
213
232
|
isPublic: z.boolean(),
|
|
214
233
|
actorPermissionLevel: ActorPermissionLevel().optional(),
|
|
215
|
-
createdAt: z.date(),
|
|
216
|
-
modifiedAt: z.date(),
|
|
234
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
235
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
217
236
|
stats: ActorStats(),
|
|
218
237
|
versions: z.array(Version()),
|
|
219
238
|
pricingInfos: z.array(ActorRunPricingInfo()).optional(),
|
|
@@ -238,37 +257,26 @@ export const Actor = lazySchema(() => z.looseObject({
|
|
|
238
257
|
}));
|
|
239
258
|
/** Response containing Actor data. */
|
|
240
259
|
export const ActorResponse = lazySchema(() => z.looseObject({
|
|
241
|
-
data:
|
|
242
|
-
}));
|
|
243
|
-
export const CreateOrUpdateVersionRequest = lazySchema(() => z.looseObject({
|
|
244
|
-
versionNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/).nullable().optional(),
|
|
245
|
-
sourceType: VersionSourceType().nullable().optional(),
|
|
246
|
-
envVars: z.array(EnvVar()).nullable().optional(),
|
|
247
|
-
applyEnvVarsToBuild: z.boolean().nullable().optional(),
|
|
248
|
-
buildTag: z.string().nullable().optional(),
|
|
249
|
-
sourceFiles: VersionSourceFiles().optional(),
|
|
250
|
-
gitRepoUrl: z.string().nullable().optional(),
|
|
251
|
-
tarballUrl: z.string().nullable().optional(),
|
|
252
|
-
gitHubGistUrl: z.string().nullable().optional(),
|
|
260
|
+
data: ActorResource(),
|
|
253
261
|
}));
|
|
254
262
|
/** The name of the build tag. */
|
|
255
|
-
export const
|
|
263
|
+
export const UpdatedBuildProperty = lazySchema(() => z.looseObject({
|
|
256
264
|
buildId: z.string(),
|
|
257
265
|
}).nullable());
|
|
258
266
|
export const UpdateActorRequest = lazySchema(() => z.looseObject({
|
|
259
267
|
name: z.string().optional(),
|
|
260
268
|
description: z.string().nullable().optional(),
|
|
261
269
|
isPublic: z.boolean().optional(),
|
|
262
|
-
actorPermissionLevel: ActorPermissionLevel().
|
|
270
|
+
actorPermissionLevel: ActorPermissionLevel().optional(),
|
|
263
271
|
seoTitle: z.string().nullable().optional(),
|
|
264
272
|
seoDescription: z.string().nullable().optional(),
|
|
265
273
|
title: z.string().nullable().optional(),
|
|
266
274
|
restartOnError: z.boolean().optional(),
|
|
267
|
-
versions: z.array(
|
|
275
|
+
versions: z.array(CreateVersionRequest()).min(1).optional(),
|
|
268
276
|
pricingInfos: z.array(ActorRunPricingInfo()).optional(),
|
|
269
277
|
categories: z.array(z.string()).nullable().optional(),
|
|
270
278
|
defaultRunOptions: DefaultRunOptions().nullable().optional(),
|
|
271
|
-
taggedBuilds: z.record(z.string(),
|
|
279
|
+
taggedBuilds: z.record(z.string(), UpdatedBuildProperty()).nullable().optional(),
|
|
272
280
|
actorStandby: ActorStandby().nullable().optional(),
|
|
273
281
|
exampleRunInput: ExampleRunInput().nullable().optional(),
|
|
274
282
|
isDeprecated: z.boolean().nullable().optional(),
|
|
@@ -283,6 +291,17 @@ export const ListOfVersionsResponse = lazySchema(() => z.looseObject({
|
|
|
283
291
|
export const VersionResponse = lazySchema(() => z.looseObject({
|
|
284
292
|
data: Version(),
|
|
285
293
|
}));
|
|
294
|
+
export const UpdateVersionRequest = lazySchema(() => z.looseObject({
|
|
295
|
+
versionNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/).optional(),
|
|
296
|
+
sourceType: WritableVersionSourceType().optional(),
|
|
297
|
+
envVars: z.array(EnvVarRequest()).optional(),
|
|
298
|
+
applyEnvVarsToBuild: z.boolean().nullable().optional(),
|
|
299
|
+
buildTag: z.string().nullable().optional(),
|
|
300
|
+
sourceFiles: VersionSourceFiles().optional(),
|
|
301
|
+
gitRepoUrl: z.string().optional(),
|
|
302
|
+
tarballUrl: z.string().optional(),
|
|
303
|
+
gitHubGistUrl: z.string().optional(),
|
|
304
|
+
}));
|
|
286
305
|
export const ListOfEnvVars = lazySchema(() => z.looseObject({
|
|
287
306
|
total: z.int(),
|
|
288
307
|
items: z.array(EnvVar()),
|
|
@@ -290,7 +309,6 @@ export const ListOfEnvVars = lazySchema(() => z.looseObject({
|
|
|
290
309
|
export const ListOfEnvVarsResponse = lazySchema(() => z.looseObject({
|
|
291
310
|
data: ListOfEnvVars(),
|
|
292
311
|
}));
|
|
293
|
-
export const EnvVarRequest = lazySchema(() => EnvVar().required({ value: true }));
|
|
294
312
|
export const EnvVarResponse = lazySchema(() => z.looseObject({
|
|
295
313
|
data: EnvVar(),
|
|
296
314
|
}));
|
|
@@ -303,18 +321,18 @@ export const WebhookCondition = lazySchema(() => z.looseObject({
|
|
|
303
321
|
}));
|
|
304
322
|
/** Status of the webhook dispatch indicating whether the HTTP request was successful. */
|
|
305
323
|
export const WebhookDispatchStatus = lazySchema(() => z.enum(["ACTIVE", "SUCCEEDED", "FAILED"]).or(z.string()));
|
|
306
|
-
export const
|
|
324
|
+
export const WebhookLastDispatch = lazySchema(() => z.looseObject({
|
|
307
325
|
status: WebhookDispatchStatus(),
|
|
308
|
-
finishedAt: z.date().nullable().optional(),
|
|
309
|
-
removedAt: z.date().nullable().optional(),
|
|
326
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
327
|
+
removedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
310
328
|
}));
|
|
311
329
|
export const WebhookStats = lazySchema(() => z.looseObject({
|
|
312
330
|
totalDispatches: z.int().optional(),
|
|
313
331
|
}));
|
|
314
|
-
export const
|
|
332
|
+
export const WebhookListItem = lazySchema(() => z.looseObject({
|
|
315
333
|
id: z.string(),
|
|
316
|
-
createdAt: z.date(),
|
|
317
|
-
modifiedAt: z.date(),
|
|
334
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
335
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
318
336
|
userId: z.string(),
|
|
319
337
|
isAdHoc: z.boolean().nullable().optional(),
|
|
320
338
|
isApifyIntegration: z.boolean().optional(),
|
|
@@ -325,12 +343,12 @@ export const WebhookShort = lazySchema(() => z.looseObject({
|
|
|
325
343
|
condition: WebhookCondition(),
|
|
326
344
|
ignoreSslErrors: z.boolean(),
|
|
327
345
|
doNotRetry: z.boolean(),
|
|
328
|
-
requestUrl: z.
|
|
329
|
-
lastDispatch:
|
|
346
|
+
requestUrl: z.url({ normalize: true }),
|
|
347
|
+
lastDispatch: WebhookLastDispatch().nullable().optional(),
|
|
330
348
|
stats: WebhookStats().nullable().optional(),
|
|
331
349
|
}));
|
|
332
350
|
export const ListOfWebhooks = lazySchema(() => PaginationResponse().extend({
|
|
333
|
-
items: z.array(
|
|
351
|
+
items: z.array(WebhookListItem()),
|
|
334
352
|
}));
|
|
335
353
|
export const ListOfWebhooksResponse = lazySchema(() => z.looseObject({
|
|
336
354
|
data: ListOfWebhooks(),
|
|
@@ -338,25 +356,25 @@ export const ListOfWebhooksResponse = lazySchema(() => z.looseObject({
|
|
|
338
356
|
/** Status of an Actor job (run or build). */
|
|
339
357
|
export const ActorJobStatus = lazySchema(() => z.enum(["READY", "RUNNING", "SUCCEEDED", "FAILED", "TIMING-OUT", "TIMED-OUT", "ABORTING", "ABORTED"]).or(z.string()));
|
|
340
358
|
export const RunOrigin = lazySchema(() => z.enum(["DEVELOPMENT", "WEB", "API", "SCHEDULER", "TEST", "WEBHOOK", "ACTOR", "CLI", "CI", "STANDBY", "MCP"]).or(z.string()));
|
|
341
|
-
export const
|
|
359
|
+
export const BuildMeta = lazySchema(() => z.looseObject({
|
|
342
360
|
origin: RunOrigin(),
|
|
343
361
|
clientIp: z.string().optional(),
|
|
344
362
|
userAgent: z.string().optional(),
|
|
345
363
|
}));
|
|
346
|
-
export const
|
|
364
|
+
export const BuildListItem = lazySchema(() => z.looseObject({
|
|
347
365
|
id: z.string(),
|
|
348
366
|
actId: z.string().optional(),
|
|
349
367
|
userId: z.string().optional(),
|
|
350
368
|
status: ActorJobStatus(),
|
|
351
|
-
startedAt: z.date(),
|
|
352
|
-
finishedAt: z.date().nullable().optional(),
|
|
369
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
370
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
353
371
|
usageTotalUsd: z.number(),
|
|
354
372
|
buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),
|
|
355
373
|
buildNumberInt: z.int().optional(),
|
|
356
|
-
meta:
|
|
374
|
+
meta: BuildMeta().optional(),
|
|
357
375
|
}));
|
|
358
376
|
export const ListOfBuilds = lazySchema(() => PaginationResponse().extend({
|
|
359
|
-
items: z.array(
|
|
377
|
+
items: z.array(BuildListItem()),
|
|
360
378
|
}));
|
|
361
379
|
export const ListOfBuildsResponse = lazySchema(() => z.looseObject({
|
|
362
380
|
data: ListOfBuilds(),
|
|
@@ -400,10 +418,10 @@ export const Build = lazySchema(() => z.looseObject({
|
|
|
400
418
|
id: z.string(),
|
|
401
419
|
actId: z.string(),
|
|
402
420
|
userId: z.string(),
|
|
403
|
-
startedAt: z.date(),
|
|
404
|
-
finishedAt: z.date().nullable().optional(),
|
|
421
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
422
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
405
423
|
status: ActorJobStatus(),
|
|
406
|
-
meta:
|
|
424
|
+
meta: BuildMeta(),
|
|
407
425
|
stats: BuildStats().nullable().optional(),
|
|
408
426
|
options: BuildOptions().nullable().optional(),
|
|
409
427
|
usage: BuildUsage().nullable().optional(),
|
|
@@ -412,6 +430,7 @@ export const Build = lazySchema(() => z.looseObject({
|
|
|
412
430
|
inputSchema: z.string().nullable().optional(),
|
|
413
431
|
readme: z.string().nullable().optional(),
|
|
414
432
|
buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),
|
|
433
|
+
imageDigest: z.string().nullable().optional(),
|
|
415
434
|
actVersion: z.looseObject({
|
|
416
435
|
sourceType: VersionSourceType().optional(),
|
|
417
436
|
buildTag: z.string().optional(),
|
|
@@ -430,16 +449,16 @@ export const RunMeta = lazySchema(() => z.looseObject({
|
|
|
430
449
|
clientIp: z.string().nullable().optional(),
|
|
431
450
|
userAgent: z.string().nullable().optional(),
|
|
432
451
|
scheduleId: z.string().nullable().optional(),
|
|
433
|
-
scheduledAt: z.date().nullable().optional(),
|
|
452
|
+
scheduledAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
434
453
|
}));
|
|
435
|
-
export const
|
|
454
|
+
export const RunListItem = lazySchema(() => z.looseObject({
|
|
436
455
|
id: z.string(),
|
|
437
456
|
actId: z.string(),
|
|
438
457
|
userId: z.string().optional(),
|
|
439
458
|
actorTaskId: z.string().nullable().optional(),
|
|
440
459
|
status: ActorJobStatus(),
|
|
441
|
-
startedAt: z.date(),
|
|
442
|
-
finishedAt: z.date().nullable().optional(),
|
|
460
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
461
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
443
462
|
buildId: z.string(),
|
|
444
463
|
buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).optional(),
|
|
445
464
|
buildNumberInt: z.int().optional(),
|
|
@@ -450,7 +469,7 @@ export const RunShort = lazySchema(() => z.looseObject({
|
|
|
450
469
|
defaultRequestQueueId: z.string(),
|
|
451
470
|
}));
|
|
452
471
|
export const ListOfRuns = lazySchema(() => PaginationResponse().extend({
|
|
453
|
-
items: z.array(
|
|
472
|
+
items: z.array(RunListItem()),
|
|
454
473
|
}));
|
|
455
474
|
export const ListOfRunsResponse = lazySchema(() => z.looseObject({
|
|
456
475
|
data: ListOfRuns(),
|
|
@@ -529,8 +548,8 @@ export const RunUsageUsd = lazySchema(() => z.looseObject({
|
|
|
529
548
|
PROXY_SERPS: z.number().nullable().optional(),
|
|
530
549
|
}));
|
|
531
550
|
/** Information about a metamorph event that occurred during the run. */
|
|
532
|
-
export const
|
|
533
|
-
createdAt: z.date(),
|
|
551
|
+
export const RunMetamorphEvent = lazySchema(() => z.looseObject({
|
|
552
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
534
553
|
actorId: z.string(),
|
|
535
554
|
buildId: z.string(),
|
|
536
555
|
inputKey: z.string().nullable().optional(),
|
|
@@ -541,8 +560,8 @@ export const Run = lazySchema(() => z.looseObject({
|
|
|
541
560
|
actId: z.string(),
|
|
542
561
|
userId: z.string(),
|
|
543
562
|
actorTaskId: z.string().nullable().optional(),
|
|
544
|
-
startedAt: z.date(),
|
|
545
|
-
finishedAt: z.date().nullable().optional(),
|
|
563
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
564
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
546
565
|
status: ActorJobStatus(),
|
|
547
566
|
statusMessage: z.string().nullable().optional(),
|
|
548
567
|
isStatusMessageTerminal: z.boolean().nullable().optional(),
|
|
@@ -569,13 +588,13 @@ export const Run = lazySchema(() => z.looseObject({
|
|
|
569
588
|
}).catchall(z.string()).optional(),
|
|
570
589
|
}).optional(),
|
|
571
590
|
buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).nullable().optional(),
|
|
572
|
-
containerUrl: z.
|
|
591
|
+
containerUrl: z.url({ normalize: true }).optional(),
|
|
573
592
|
isContainerServerReady: z.boolean().nullable().optional(),
|
|
574
593
|
gitBranchName: z.string().nullable().optional(),
|
|
575
594
|
usage: RunUsage().nullable().optional(),
|
|
576
595
|
usageTotalUsd: z.number().nullable().optional(),
|
|
577
596
|
usageUsd: RunUsageUsd().nullable().optional(),
|
|
578
|
-
metamorphs: z.array(
|
|
597
|
+
metamorphs: z.array(RunMetamorphEvent()).nullable().optional(),
|
|
579
598
|
platformUsageBillingModel: z.string().optional(),
|
|
580
599
|
}));
|
|
581
600
|
export const RunResponse = lazySchema(() => z.looseObject({
|
|
@@ -587,28 +606,28 @@ export const DatasetStats = lazySchema(() => z.looseObject({
|
|
|
587
606
|
storageBytes: z.int().optional(),
|
|
588
607
|
inflatedBytes: z.int().optional(),
|
|
589
608
|
}));
|
|
590
|
-
export const
|
|
609
|
+
export const DatasetResource = lazySchema(() => z.looseObject({
|
|
591
610
|
id: z.string(),
|
|
592
611
|
name: z.string().nullable().optional(),
|
|
593
612
|
userId: z.string(),
|
|
594
|
-
createdAt: z.date(),
|
|
595
|
-
modifiedAt: z.date(),
|
|
596
|
-
accessedAt: z.date(),
|
|
613
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
614
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
615
|
+
accessedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
597
616
|
itemCount: z.int().min(0),
|
|
598
617
|
cleanItemCount: z.int().min(0),
|
|
599
618
|
actId: z.string().nullable().optional(),
|
|
600
619
|
actRunId: z.string().nullable().optional(),
|
|
601
620
|
fields: z.array(z.string()).nullable().optional(),
|
|
602
621
|
schema: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
603
|
-
consoleUrl: z.
|
|
604
|
-
itemsPublicUrl: z.
|
|
622
|
+
consoleUrl: z.url({ normalize: true }),
|
|
623
|
+
itemsPublicUrl: z.url({ normalize: true }).optional(),
|
|
605
624
|
urlSigningSecretKey: z.string().nullable().optional(),
|
|
606
625
|
generalAccess: GeneralAccess().nullable().optional(),
|
|
607
626
|
stats: DatasetStats().optional(),
|
|
608
627
|
}));
|
|
609
628
|
/** Response containing dataset metadata. */
|
|
610
629
|
export const DatasetResponse = lazySchema(() => z.looseObject({
|
|
611
|
-
data:
|
|
630
|
+
data: DatasetResource(),
|
|
612
631
|
}));
|
|
613
632
|
export const UpdateDatasetRequest = lazySchema(() => z.looseObject({
|
|
614
633
|
name: z.string().nullable().optional(),
|
|
@@ -619,26 +638,26 @@ export const UpdateDatasetRequest = lazySchema(() => z.looseObject({
|
|
|
619
638
|
* object or an array of objects. Each object represents one dataset item.
|
|
620
639
|
*/
|
|
621
640
|
export const PutItemsRequest = lazySchema(() => z.record(z.string(), z.unknown()));
|
|
622
|
-
export const
|
|
641
|
+
export const DatasetItemValidationError = lazySchema(() => z.looseObject({
|
|
623
642
|
instancePath: z.string().optional(),
|
|
624
643
|
schemaPath: z.string().optional(),
|
|
625
644
|
keyword: z.string().optional(),
|
|
626
645
|
message: z.string().optional(),
|
|
627
646
|
params: z.record(z.string(), z.unknown()).optional(),
|
|
628
647
|
}));
|
|
629
|
-
export const
|
|
648
|
+
export const InvalidDatasetItem = lazySchema(() => z.looseObject({
|
|
630
649
|
itemPosition: z.int().optional(),
|
|
631
|
-
validationErrors: z.array(
|
|
650
|
+
validationErrors: z.array(DatasetItemValidationError()).optional(),
|
|
632
651
|
}));
|
|
633
|
-
export const
|
|
634
|
-
invalidItems: z.array(
|
|
652
|
+
export const DatasetSchemaValidationErrorData = lazySchema(() => z.looseObject({
|
|
653
|
+
invalidItems: z.array(InvalidDatasetItem()),
|
|
635
654
|
}));
|
|
636
655
|
export const DatasetSchemaValidationError = lazySchema(() => z.looseObject({
|
|
637
656
|
type: z.string().optional(),
|
|
638
657
|
message: z.string().optional(),
|
|
639
|
-
data:
|
|
658
|
+
data: DatasetSchemaValidationErrorData().optional(),
|
|
640
659
|
}));
|
|
641
|
-
export const
|
|
660
|
+
export const PutItemsErrorResponse = lazySchema(() => z.looseObject({
|
|
642
661
|
error: DatasetSchemaValidationError(),
|
|
643
662
|
}));
|
|
644
663
|
export const DatasetFieldStatistics = lazySchema(() => z.looseObject({
|
|
@@ -661,19 +680,19 @@ export const KeyValueStoreStats = lazySchema(() => z.looseObject({
|
|
|
661
680
|
s3StorageBytes: z.int().optional(),
|
|
662
681
|
storageBytes: z.int().optional(),
|
|
663
682
|
}));
|
|
664
|
-
export const
|
|
683
|
+
export const KeyValueStoreResource = lazySchema(() => z.looseObject({
|
|
665
684
|
id: z.string(),
|
|
666
685
|
name: z.string().nullable().optional(),
|
|
667
686
|
userId: z.string().nullable().optional(),
|
|
668
687
|
username: z.string().nullable().optional(),
|
|
669
|
-
createdAt: z.date(),
|
|
670
|
-
modifiedAt: z.date(),
|
|
671
|
-
accessedAt: z.date(),
|
|
688
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
689
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
690
|
+
accessedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
672
691
|
actId: z.string().nullable().optional(),
|
|
673
692
|
actRunId: z.string().nullable().optional(),
|
|
674
|
-
consoleUrl: z.
|
|
675
|
-
keysPublicUrl: z.
|
|
676
|
-
recordsPublicUrl: z.
|
|
693
|
+
consoleUrl: z.url({ normalize: true }).optional(),
|
|
694
|
+
keysPublicUrl: z.url({ normalize: true }).optional(),
|
|
695
|
+
recordsPublicUrl: z.url({ normalize: true }).optional(),
|
|
677
696
|
schema: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
678
697
|
urlSigningSecretKey: z.string().nullable().optional(),
|
|
679
698
|
generalAccess: GeneralAccess().nullable().optional(),
|
|
@@ -681,16 +700,16 @@ export const KeyValueStore = lazySchema(() => z.looseObject({
|
|
|
681
700
|
}));
|
|
682
701
|
/** Response containing key-value store data. */
|
|
683
702
|
export const KeyValueStoreResponse = lazySchema(() => z.looseObject({
|
|
684
|
-
data:
|
|
703
|
+
data: KeyValueStoreResource(),
|
|
685
704
|
}));
|
|
686
|
-
export const
|
|
705
|
+
export const UpdateKeyValueStoreRequest = lazySchema(() => z.looseObject({
|
|
687
706
|
name: z.string().nullable().optional(),
|
|
688
707
|
generalAccess: GeneralAccess().optional(),
|
|
689
708
|
}));
|
|
690
709
|
export const KeyValueStoreKey = lazySchema(() => z.looseObject({
|
|
691
710
|
key: z.string(),
|
|
692
711
|
size: z.int(),
|
|
693
|
-
recordPublicUrl: z.
|
|
712
|
+
recordPublicUrl: z.url({ normalize: true }),
|
|
694
713
|
}));
|
|
695
714
|
export const ListOfKeys = lazySchema(() => z.looseObject({
|
|
696
715
|
items: z.array(KeyValueStoreKey()),
|
|
@@ -718,11 +737,11 @@ export const QueueId = lazySchema(() => z.string());
|
|
|
718
737
|
/** The ID of the user who owns the request queue. */
|
|
719
738
|
export const QueueUserId = lazySchema(() => z.string());
|
|
720
739
|
/** The timestamp when the request queue was created. */
|
|
721
|
-
export const QueueCreatedAt = lazySchema(() => z.date());
|
|
740
|
+
export const QueueCreatedAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
|
|
722
741
|
/** 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());
|
|
742
|
+
export const QueueModifiedAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
|
|
724
743
|
/** The timestamp when the request queue was last accessed. */
|
|
725
|
-
export const QueueAccessedAt = lazySchema(() => z.date());
|
|
744
|
+
export const QueueAccessedAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
|
|
726
745
|
/** The total number of requests in the request queue. */
|
|
727
746
|
export const TotalRequestCount = lazySchema(() => z.int().min(0));
|
|
728
747
|
/** The number of requests that have been handled. */
|
|
@@ -740,7 +759,7 @@ export const RequestQueueStats = lazySchema(() => z.looseObject({
|
|
|
740
759
|
writeCount: z.int().optional(),
|
|
741
760
|
}));
|
|
742
761
|
/** A request queue object containing metadata and statistics. */
|
|
743
|
-
export const
|
|
762
|
+
export const RequestQueueResource = lazySchema(() => z.looseObject({
|
|
744
763
|
id: QueueId(),
|
|
745
764
|
name: z.string().nullable().optional(),
|
|
746
765
|
userId: QueueUserId(),
|
|
@@ -753,13 +772,13 @@ export const RequestQueue = lazySchema(() => z.looseObject({
|
|
|
753
772
|
handledRequestCount: HandledRequestCount(),
|
|
754
773
|
pendingRequestCount: PendingRequestCount(),
|
|
755
774
|
hadMultipleClients: HadMultipleClients(),
|
|
756
|
-
consoleUrl: z.
|
|
775
|
+
consoleUrl: z.url({ normalize: true }),
|
|
757
776
|
stats: RequestQueueStats().optional(),
|
|
758
777
|
generalAccess: GeneralAccess().nullable().optional(),
|
|
759
778
|
}));
|
|
760
779
|
/** Response containing request queue data. */
|
|
761
780
|
export const RequestQueueResponse = lazySchema(() => z.looseObject({
|
|
762
|
-
data:
|
|
781
|
+
data: RequestQueueResource(),
|
|
763
782
|
}));
|
|
764
783
|
/** Request object for updating a request queue. */
|
|
765
784
|
export const UpdateRequestQueueRequest = lazySchema(() => z.looseObject({
|
|
@@ -771,6 +790,8 @@ export const UniqueKey = lazySchema(() => z.string());
|
|
|
771
790
|
/** The URL of the request. */
|
|
772
791
|
export const RequestUrl = lazySchema(() => z.string());
|
|
773
792
|
export const HttpMethod = lazySchema(() => z.enum(["GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]).or(z.string()));
|
|
793
|
+
/** The HTTP method of the request. */
|
|
794
|
+
export const RequestMethod = lazySchema(() => HttpMethod());
|
|
774
795
|
/** The number of times this request has been retried. */
|
|
775
796
|
export const RetryCount = lazySchema(() => z.int());
|
|
776
797
|
/** Custom user data attached to the request. Can contain arbitrary fields. */
|
|
@@ -778,7 +799,7 @@ export const RequestUserData = lazySchema(() => z.record(z.string(), z.unknown()
|
|
|
778
799
|
export const RequestBase = lazySchema(() => z.looseObject({
|
|
779
800
|
uniqueKey: UniqueKey(),
|
|
780
801
|
url: RequestUrl(),
|
|
781
|
-
method:
|
|
802
|
+
method: RequestMethod().optional(),
|
|
782
803
|
retryCount: RetryCount().optional(),
|
|
783
804
|
loadedUrl: z.string().nullable().optional(),
|
|
784
805
|
payload: z.union([z.string(), z.record(z.string(), z.unknown())]).nullable().optional(),
|
|
@@ -786,17 +807,17 @@ export const RequestBase = lazySchema(() => z.looseObject({
|
|
|
786
807
|
userData: RequestUserData().optional(),
|
|
787
808
|
noRetry: z.boolean().nullable().optional(),
|
|
788
809
|
errorMessages: z.array(z.string()).nullable().optional(),
|
|
789
|
-
handledAt: z.date().nullable().optional(),
|
|
810
|
+
handledAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
790
811
|
}));
|
|
791
812
|
/** A unique identifier assigned to the request. */
|
|
792
813
|
export const RequestId = lazySchema(() => z.string());
|
|
793
814
|
/** A request stored in the request queue, including its metadata and processing state. */
|
|
794
|
-
export const
|
|
815
|
+
export const RequestResource = lazySchema(() => RequestBase().extend({
|
|
795
816
|
id: RequestId().optional(),
|
|
796
817
|
}).required({ id: true }));
|
|
797
818
|
/** A paginated list of requests from the request queue. */
|
|
798
819
|
export const ListOfRequests = lazySchema(() => z.looseObject({
|
|
799
|
-
items: z.array(
|
|
820
|
+
items: z.array(RequestResource()),
|
|
800
821
|
limit: z.int(),
|
|
801
822
|
exclusiveStartId: z.string().optional(),
|
|
802
823
|
cursor: z.string().optional(),
|
|
@@ -830,33 +851,33 @@ export const AddedRequest = lazySchema(() => z.looseObject({
|
|
|
830
851
|
wasAlreadyHandled: WasAlreadyHandled(),
|
|
831
852
|
}));
|
|
832
853
|
/** A request that failed to be processed during a request queue operation and can be retried. */
|
|
833
|
-
export const
|
|
854
|
+
export const UnprocessedRequest = lazySchema(() => z.looseObject({
|
|
834
855
|
id: RequestId().optional(),
|
|
835
856
|
uniqueKey: UniqueKey(),
|
|
836
857
|
url: RequestUrl(),
|
|
837
|
-
method:
|
|
858
|
+
method: RequestMethod().optional(),
|
|
838
859
|
}));
|
|
839
860
|
/** Result of a batch add operation containing successfully processed and failed requests. */
|
|
840
861
|
export const BatchAddResult = lazySchema(() => z.looseObject({
|
|
841
862
|
processedRequests: z.array(AddedRequest()),
|
|
842
|
-
unprocessedRequests: z.array(
|
|
863
|
+
unprocessedRequests: z.array(UnprocessedRequest()),
|
|
843
864
|
}));
|
|
844
865
|
/** Response containing the result of a batch add operation. */
|
|
845
866
|
export const BatchAddResponse = lazySchema(() => z.looseObject({
|
|
846
867
|
data: BatchAddResult(),
|
|
847
868
|
}));
|
|
848
869
|
/** A request that should be deleted, identified by its ID. */
|
|
849
|
-
export const
|
|
870
|
+
export const RequestToDeleteById = lazySchema(() => z.looseObject({
|
|
850
871
|
id: RequestId(),
|
|
851
872
|
uniqueKey: UniqueKey().optional(),
|
|
852
873
|
}));
|
|
853
874
|
/** A request that should be deleted, identified by its unique key. */
|
|
854
|
-
export const
|
|
875
|
+
export const RequestToDeleteByUniqueKey = lazySchema(() => z.looseObject({
|
|
855
876
|
id: RequestId().optional(),
|
|
856
877
|
uniqueKey: UniqueKey(),
|
|
857
878
|
}));
|
|
858
879
|
/** A request that should be deleted. */
|
|
859
|
-
export const
|
|
880
|
+
export const RequestToDelete = lazySchema(() => z.union([RequestToDeleteById(), RequestToDeleteByUniqueKey()]));
|
|
860
881
|
/** Confirmation of a request that was successfully deleted, identified by its ID. */
|
|
861
882
|
export const DeletedRequestById = lazySchema(() => z.looseObject({
|
|
862
883
|
uniqueKey: UniqueKey().optional(),
|
|
@@ -872,7 +893,7 @@ export const DeletedRequest = lazySchema(() => z.union([DeletedRequestById(), De
|
|
|
872
893
|
/** Result of a batch delete operation containing successfully deleted and failed requests. */
|
|
873
894
|
export const BatchDeleteResult = lazySchema(() => z.looseObject({
|
|
874
895
|
processedRequests: z.array(DeletedRequest()),
|
|
875
|
-
unprocessedRequests: z.array(
|
|
896
|
+
unprocessedRequests: z.array(UnprocessedRequest()),
|
|
876
897
|
}));
|
|
877
898
|
/** Response containing the result of a batch delete operation. */
|
|
878
899
|
export const BatchDeleteResponse = lazySchema(() => z.looseObject({
|
|
@@ -888,14 +909,14 @@ export const UnlockRequestsResponse = lazySchema(() => z.looseObject({
|
|
|
888
909
|
}));
|
|
889
910
|
/** Response containing a single request from the request queue. */
|
|
890
911
|
export const RequestResponse = lazySchema(() => z.looseObject({
|
|
891
|
-
data:
|
|
912
|
+
data: RequestResource(),
|
|
892
913
|
}));
|
|
893
914
|
/** Response containing the result of updating a request in the request queue. */
|
|
894
915
|
export const UpdateRequestResponse = lazySchema(() => z.looseObject({
|
|
895
916
|
data: RequestRegistration(),
|
|
896
917
|
}));
|
|
897
918
|
/** The timestamp when the lock on this request expires. */
|
|
898
|
-
export const LockExpiresAt = lazySchema(() => z.date());
|
|
919
|
+
export const LockExpiresAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
|
|
899
920
|
/** Information about a request lock. */
|
|
900
921
|
export const RequestLockInfo = lazySchema(() => z.looseObject({
|
|
901
922
|
lockExpiresAt: LockExpiresAt(),
|
|
@@ -907,11 +928,11 @@ export const ProlongRequestLockResponse = lazySchema(() => z.looseObject({
|
|
|
907
928
|
/** The maximum number of requests returned. */
|
|
908
929
|
export const HeadLimit = lazySchema(() => z.int());
|
|
909
930
|
/** A request from the request queue head without lock information. */
|
|
910
|
-
export const
|
|
931
|
+
export const RequestQueueHeadItem = lazySchema(() => z.looseObject({
|
|
911
932
|
id: RequestId(),
|
|
912
933
|
uniqueKey: UniqueKey(),
|
|
913
934
|
url: RequestUrl(),
|
|
914
|
-
method:
|
|
935
|
+
method: RequestMethod().optional(),
|
|
915
936
|
retryCount: RetryCount().optional(),
|
|
916
937
|
}));
|
|
917
938
|
/** A batch of requests from the request queue head without locking. */
|
|
@@ -919,18 +940,18 @@ export const RequestQueueHead = lazySchema(() => z.looseObject({
|
|
|
919
940
|
limit: HeadLimit(),
|
|
920
941
|
queueModifiedAt: QueueModifiedAt(),
|
|
921
942
|
hadMultipleClients: HadMultipleClients(),
|
|
922
|
-
items: z.array(
|
|
943
|
+
items: z.array(RequestQueueHeadItem()),
|
|
923
944
|
}));
|
|
924
945
|
/** Response containing requests from the request queue head without locking. */
|
|
925
|
-
export const
|
|
946
|
+
export const RequestQueueHeadResponse = lazySchema(() => z.looseObject({
|
|
926
947
|
data: RequestQueueHead(),
|
|
927
948
|
}));
|
|
928
949
|
/** A request from the request queue head that has been locked for processing. */
|
|
929
|
-
export const
|
|
950
|
+
export const LockedRequestQueueHeadItem = lazySchema(() => z.looseObject({
|
|
930
951
|
id: RequestId(),
|
|
931
952
|
uniqueKey: UniqueKey(),
|
|
932
953
|
url: RequestUrl(),
|
|
933
|
-
method:
|
|
954
|
+
method: RequestMethod().optional(),
|
|
934
955
|
retryCount: RetryCount().optional(),
|
|
935
956
|
lockExpiresAt: LockExpiresAt(),
|
|
936
957
|
}));
|
|
@@ -942,16 +963,16 @@ export const LockedRequestQueueHead = lazySchema(() => z.looseObject({
|
|
|
942
963
|
clientKey: z.string().optional(),
|
|
943
964
|
hadMultipleClients: HadMultipleClients(),
|
|
944
965
|
lockSecs: z.int(),
|
|
945
|
-
items: z.array(
|
|
966
|
+
items: z.array(LockedRequestQueueHeadItem()),
|
|
946
967
|
}));
|
|
947
968
|
/** Response containing locked requests from the request queue head. */
|
|
948
|
-
export const
|
|
969
|
+
export const LockedRequestQueueHeadResponse = lazySchema(() => z.looseObject({
|
|
949
970
|
data: LockedRequestQueueHead(),
|
|
950
971
|
}));
|
|
951
972
|
export const TaskStats = lazySchema(() => z.looseObject({
|
|
952
973
|
totalRuns: z.int().optional(),
|
|
953
974
|
}));
|
|
954
|
-
export const
|
|
975
|
+
export const TaskListItem = lazySchema(() => z.looseObject({
|
|
955
976
|
id: z.string(),
|
|
956
977
|
userId: z.string(),
|
|
957
978
|
actId: z.string(),
|
|
@@ -959,12 +980,12 @@ export const TaskShort = lazySchema(() => z.looseObject({
|
|
|
959
980
|
name: z.string(),
|
|
960
981
|
username: z.string().nullable().optional(),
|
|
961
982
|
actUsername: z.string().nullable().optional(),
|
|
962
|
-
createdAt: z.date(),
|
|
963
|
-
modifiedAt: z.date(),
|
|
983
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
984
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
964
985
|
stats: TaskStats().nullable().optional(),
|
|
965
986
|
}));
|
|
966
987
|
export const ListOfTasks = lazySchema(() => PaginationResponse().extend({
|
|
967
|
-
items: z.array(
|
|
988
|
+
items: z.array(TaskListItem()),
|
|
968
989
|
}));
|
|
969
990
|
export const ListOfTasksResponse = lazySchema(() => z.looseObject({
|
|
970
991
|
data: ListOfTasks(),
|
|
@@ -988,7 +1009,7 @@ export const TaskInput = lazySchema(() => z.record(z.string(), z.unknown()));
|
|
|
988
1009
|
* `publishedAt` is set and unpublished when it is `null`.
|
|
989
1010
|
*/
|
|
990
1011
|
export const TaskPublicConfig = lazySchema(() => z.looseObject({
|
|
991
|
-
publishedAt: z.date().nullable().optional(),
|
|
1012
|
+
publishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
992
1013
|
seoTitle: z.string().max(60).nullable().optional(),
|
|
993
1014
|
seoDescription: z.string().max(160).nullable().optional(),
|
|
994
1015
|
inputSchemaFields: z.array(z.string()).nullable().optional(),
|
|
@@ -1001,6 +1022,7 @@ export const CreateTaskRequest = lazySchema(() => z.looseObject({
|
|
|
1001
1022
|
options: TaskOptions().nullable().optional(),
|
|
1002
1023
|
input: z.union([TaskInput(), z.array(TaskInput())]).nullable().optional(),
|
|
1003
1024
|
title: z.string().nullable().optional(),
|
|
1025
|
+
description: z.string().nullable().optional(),
|
|
1004
1026
|
actorStandby: ActorStandby().nullable().optional(),
|
|
1005
1027
|
publicConfig: TaskPublicConfig().optional(),
|
|
1006
1028
|
}));
|
|
@@ -1010,15 +1032,16 @@ export const Task = lazySchema(() => z.looseObject({
|
|
|
1010
1032
|
actId: z.string(),
|
|
1011
1033
|
name: z.string(),
|
|
1012
1034
|
username: z.string().nullable().optional(),
|
|
1013
|
-
createdAt: z.date(),
|
|
1014
|
-
modifiedAt: z.date(),
|
|
1015
|
-
removedAt: z.date().nullable().optional(),
|
|
1035
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1036
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1037
|
+
removedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1016
1038
|
stats: TaskStats().nullable().optional(),
|
|
1017
1039
|
options: TaskOptions().nullable().optional(),
|
|
1018
1040
|
input: z.union([TaskInput(), z.array(TaskInput())]).nullable().optional(),
|
|
1019
1041
|
title: z.string().nullable().optional(),
|
|
1042
|
+
description: z.string().nullable().optional(),
|
|
1020
1043
|
actorStandby: ActorStandby().nullable().optional(),
|
|
1021
|
-
standbyUrl: z.
|
|
1044
|
+
standbyUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1022
1045
|
isPublic: z.boolean().optional(),
|
|
1023
1046
|
publicConfig: TaskPublicConfig().nullable().optional(),
|
|
1024
1047
|
}));
|
|
@@ -1031,14 +1054,15 @@ export const UpdateTaskRequest = lazySchema(() => z.looseObject({
|
|
|
1031
1054
|
options: TaskOptions().nullable().optional(),
|
|
1032
1055
|
input: z.union([TaskInput(), z.array(TaskInput())]).nullable().optional(),
|
|
1033
1056
|
title: z.string().nullable().optional(),
|
|
1057
|
+
description: z.string().nullable().optional(),
|
|
1034
1058
|
actorStandby: ActorStandby().nullable().optional(),
|
|
1035
1059
|
publicConfig: TaskPublicConfig().optional(),
|
|
1036
1060
|
isPublic: z.boolean().optional(),
|
|
1037
1061
|
}));
|
|
1038
|
-
export const
|
|
1062
|
+
export const WebhookResource = lazySchema(() => z.looseObject({
|
|
1039
1063
|
id: z.string(),
|
|
1040
|
-
createdAt: z.date(),
|
|
1041
|
-
modifiedAt: z.date(),
|
|
1064
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1065
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1042
1066
|
userId: z.string(),
|
|
1043
1067
|
isAdHoc: z.boolean().nullable().optional(),
|
|
1044
1068
|
shouldInterpolateStrings: z.boolean().nullable().optional(),
|
|
@@ -1046,11 +1070,11 @@ export const Webhook = lazySchema(() => z.looseObject({
|
|
|
1046
1070
|
condition: WebhookCondition(),
|
|
1047
1071
|
ignoreSslErrors: z.boolean(),
|
|
1048
1072
|
doNotRetry: z.boolean().nullable().optional(),
|
|
1049
|
-
requestUrl: z.
|
|
1073
|
+
requestUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1050
1074
|
payloadTemplate: z.string().nullable().optional(),
|
|
1051
1075
|
headersTemplate: z.string().nullable().optional(),
|
|
1052
1076
|
description: z.string().nullable().optional(),
|
|
1053
|
-
lastDispatch:
|
|
1077
|
+
lastDispatch: WebhookLastDispatch().nullable().optional(),
|
|
1054
1078
|
stats: WebhookStats().nullable().optional(),
|
|
1055
1079
|
}));
|
|
1056
1080
|
export const UpdateRunRequest = lazySchema(() => z.looseObject({
|
|
@@ -1066,7 +1090,7 @@ export const ChargeRunRequest = lazySchema(() => z.looseObject({
|
|
|
1066
1090
|
export const StorageOwnership = lazySchema(() => z.enum(["ownedByMe", "sharedWithMe"]).or(z.string()));
|
|
1067
1091
|
export const ListOfKeyValueStores = lazySchema(() => PaginationResponse().extend({
|
|
1068
1092
|
unnamed: z.boolean().optional(),
|
|
1069
|
-
items: z.array(
|
|
1093
|
+
items: z.array(KeyValueStoreResource()),
|
|
1070
1094
|
}));
|
|
1071
1095
|
export const ListOfKeyValueStoresResponse = lazySchema(() => z.looseObject({
|
|
1072
1096
|
data: ListOfKeyValueStores(),
|
|
@@ -1075,9 +1099,9 @@ export const DatasetListItem = lazySchema(() => z.looseObject({
|
|
|
1075
1099
|
id: z.string(),
|
|
1076
1100
|
name: z.string(),
|
|
1077
1101
|
userId: z.string(),
|
|
1078
|
-
createdAt: z.date(),
|
|
1079
|
-
modifiedAt: z.date(),
|
|
1080
|
-
accessedAt: z.date(),
|
|
1102
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1103
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1104
|
+
accessedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1081
1105
|
itemCount: z.int(),
|
|
1082
1106
|
cleanItemCount: z.int(),
|
|
1083
1107
|
actId: z.string().nullable().optional(),
|
|
@@ -1095,7 +1119,7 @@ export const ListOfDatasetsResponse = lazySchema(() => z.looseObject({
|
|
|
1095
1119
|
data: ListOfDatasets(),
|
|
1096
1120
|
}));
|
|
1097
1121
|
/** A shortened request queue object for list responses. */
|
|
1098
|
-
export const
|
|
1122
|
+
export const RequestQueueListItem = lazySchema(() => z.looseObject({
|
|
1099
1123
|
id: QueueId(),
|
|
1100
1124
|
name: z.string(),
|
|
1101
1125
|
userId: QueueUserId(),
|
|
@@ -1103,7 +1127,7 @@ export const RequestQueueShort = lazySchema(() => z.looseObject({
|
|
|
1103
1127
|
createdAt: QueueCreatedAt(),
|
|
1104
1128
|
modifiedAt: QueueModifiedAt(),
|
|
1105
1129
|
accessedAt: QueueAccessedAt(),
|
|
1106
|
-
expireAt: z.date().optional(),
|
|
1130
|
+
expireAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
1107
1131
|
totalRequestCount: TotalRequestCount(),
|
|
1108
1132
|
handledRequestCount: HandledRequestCount(),
|
|
1109
1133
|
pendingRequestCount: PendingRequestCount(),
|
|
@@ -1116,13 +1140,13 @@ export const RequestQueueShort = lazySchema(() => z.looseObject({
|
|
|
1116
1140
|
/** A paginated list of request queues. */
|
|
1117
1141
|
export const ListOfRequestQueues = lazySchema(() => PaginationResponse().extend({
|
|
1118
1142
|
unnamed: z.boolean().optional(),
|
|
1119
|
-
items: z.array(
|
|
1143
|
+
items: z.array(RequestQueueListItem()),
|
|
1120
1144
|
}));
|
|
1121
1145
|
/** Response containing a list of request queues. */
|
|
1122
1146
|
export const ListOfRequestQueuesResponse = lazySchema(() => z.looseObject({
|
|
1123
1147
|
data: ListOfRequestQueues(),
|
|
1124
1148
|
}));
|
|
1125
|
-
export const
|
|
1149
|
+
export const CreateWebhookRequest = lazySchema(() => z.looseObject({
|
|
1126
1150
|
isAdHoc: z.boolean().nullable().optional(),
|
|
1127
1151
|
eventTypes: z.array(WebhookEventType()),
|
|
1128
1152
|
condition: WebhookCondition(),
|
|
@@ -1137,15 +1161,15 @@ export const WebhookCreate = lazySchema(() => z.looseObject({
|
|
|
1137
1161
|
}));
|
|
1138
1162
|
/** Response containing webhook data. */
|
|
1139
1163
|
export const WebhookResponse = lazySchema(() => z.looseObject({
|
|
1140
|
-
data:
|
|
1164
|
+
data: WebhookResource(),
|
|
1141
1165
|
}));
|
|
1142
|
-
export const
|
|
1166
|
+
export const UpdateWebhookRequest = lazySchema(() => z.looseObject({
|
|
1143
1167
|
isAdHoc: z.boolean().nullable().optional(),
|
|
1144
1168
|
eventTypes: z.array(WebhookEventType()).nullable().optional(),
|
|
1145
1169
|
condition: WebhookCondition().nullable().optional(),
|
|
1146
1170
|
ignoreSslErrors: z.boolean().nullable().optional(),
|
|
1147
1171
|
doNotRetry: z.boolean().nullable().optional(),
|
|
1148
|
-
requestUrl: z.
|
|
1172
|
+
requestUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1149
1173
|
payloadTemplate: z.string().nullable().optional(),
|
|
1150
1174
|
headersTemplate: z.string().nullable().optional(),
|
|
1151
1175
|
description: z.string().nullable().optional(),
|
|
@@ -1155,14 +1179,14 @@ export const WebhookUpdate = lazySchema(() => z.looseObject({
|
|
|
1155
1179
|
export const WebhookDispatchWebhookSummary = lazySchema(() => z.looseObject({
|
|
1156
1180
|
actionType: z.string().optional(),
|
|
1157
1181
|
condition: WebhookCondition().optional(),
|
|
1158
|
-
requestUrl: z.
|
|
1182
|
+
requestUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1159
1183
|
isAdHoc: z.boolean().optional(),
|
|
1160
1184
|
}));
|
|
1161
1185
|
export const WebhookDispatch = lazySchema(() => z.looseObject({
|
|
1162
1186
|
id: z.string(),
|
|
1163
1187
|
userId: z.string(),
|
|
1164
1188
|
webhookId: z.string(),
|
|
1165
|
-
createdAt: z.date(),
|
|
1189
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1166
1190
|
status: WebhookDispatchStatus(),
|
|
1167
1191
|
eventType: WebhookEventType(),
|
|
1168
1192
|
eventData: z.looseObject({
|
|
@@ -1173,14 +1197,14 @@ export const WebhookDispatch = lazySchema(() => z.looseObject({
|
|
|
1173
1197
|
}).nullable().optional(),
|
|
1174
1198
|
webhook: WebhookDispatchWebhookSummary().nullable().optional(),
|
|
1175
1199
|
calls: z.array(z.looseObject({
|
|
1176
|
-
startedAt: z.date().nullable().optional(),
|
|
1177
|
-
finishedAt: z.date().nullable().optional(),
|
|
1200
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1201
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1178
1202
|
errorMessage: z.string().nullable().optional(),
|
|
1179
1203
|
responseStatus: z.int().nullable().optional(),
|
|
1180
1204
|
responseBody: z.string().nullable().optional(),
|
|
1181
1205
|
})).optional(),
|
|
1182
1206
|
}));
|
|
1183
|
-
export const
|
|
1207
|
+
export const WebhookDispatchResponse = lazySchema(() => z.looseObject({
|
|
1184
1208
|
data: WebhookDispatch(),
|
|
1185
1209
|
}));
|
|
1186
1210
|
export const ListOfWebhookDispatches = lazySchema(() => PaginationResponse().extend({
|
|
@@ -1189,9 +1213,6 @@ export const ListOfWebhookDispatches = lazySchema(() => PaginationResponse().ext
|
|
|
1189
1213
|
export const ListOfWebhookDispatchesResponse = lazySchema(() => z.looseObject({
|
|
1190
1214
|
data: ListOfWebhookDispatches(),
|
|
1191
1215
|
}));
|
|
1192
|
-
export const WebhookDispatchResponse = lazySchema(() => z.looseObject({
|
|
1193
|
-
data: WebhookDispatch(),
|
|
1194
|
-
}));
|
|
1195
1216
|
export const ScheduleBase = lazySchema(() => z.looseObject({
|
|
1196
1217
|
id: z.string(),
|
|
1197
1218
|
userId: z.string(),
|
|
@@ -1200,31 +1221,35 @@ export const ScheduleBase = lazySchema(() => z.looseObject({
|
|
|
1200
1221
|
timezone: z.string(),
|
|
1201
1222
|
isEnabled: z.boolean(),
|
|
1202
1223
|
isExclusive: z.boolean(),
|
|
1203
|
-
createdAt: z.date(),
|
|
1204
|
-
modifiedAt: z.date(),
|
|
1205
|
-
nextRunAt: z.date().nullable().optional(),
|
|
1206
|
-
lastRunAt: z.date().nullable().optional(),
|
|
1224
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1225
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1226
|
+
nextRunAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1227
|
+
lastRunAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1207
1228
|
}));
|
|
1208
|
-
export const
|
|
1229
|
+
export const ScheduleListItemActionRunActor = lazySchema(() => z.looseObject({
|
|
1209
1230
|
id: z.string(),
|
|
1210
1231
|
type: z.literal("RUN_ACTOR"),
|
|
1211
1232
|
actorId: z.string(),
|
|
1212
1233
|
}));
|
|
1213
|
-
export const
|
|
1234
|
+
export const ScheduleListItemActionRunActorTask = lazySchema(() => z.looseObject({
|
|
1214
1235
|
id: z.string(),
|
|
1215
1236
|
type: z.literal("RUN_ACTOR_TASK"),
|
|
1216
1237
|
actorTaskId: z.string(),
|
|
1217
1238
|
}));
|
|
1218
|
-
export const
|
|
1219
|
-
export const
|
|
1220
|
-
actions: z.array(
|
|
1239
|
+
export const ScheduleListItemAction = lazySchema(() => z.discriminatedUnion("type", [ScheduleListItemActionRunActor(), ScheduleListItemActionRunActorTask()]));
|
|
1240
|
+
export const ScheduleListItem = lazySchema(() => ScheduleBase().extend({
|
|
1241
|
+
actions: z.array(ScheduleListItemAction()),
|
|
1221
1242
|
}));
|
|
1222
1243
|
export const ListOfSchedules = lazySchema(() => PaginationResponse().extend({
|
|
1223
|
-
items: z.array(
|
|
1244
|
+
items: z.array(ScheduleListItem()),
|
|
1224
1245
|
}));
|
|
1225
1246
|
export const ListOfSchedulesResponse = lazySchema(() => z.looseObject({
|
|
1226
1247
|
data: ListOfSchedules(),
|
|
1227
1248
|
}));
|
|
1249
|
+
/** Notification settings for this schedule. */
|
|
1250
|
+
export const ScheduleNotifications = lazySchema(() => z.looseObject({
|
|
1251
|
+
email: z.boolean().optional(),
|
|
1252
|
+
}));
|
|
1228
1253
|
export const ScheduleActionRunInput = lazySchema(() => z.looseObject({
|
|
1229
1254
|
body: z.string().nullable().optional(),
|
|
1230
1255
|
contentType: z.string().nullable().optional(),
|
|
@@ -1241,7 +1266,7 @@ export const ScheduleCreateActionRunActorTask = lazySchema(() => z.looseObject({
|
|
|
1241
1266
|
input: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
1242
1267
|
}));
|
|
1243
1268
|
export const ScheduleCreateAction = lazySchema(() => z.discriminatedUnion("type", [ScheduleCreateActionRunActor(), ScheduleCreateActionRunActorTask()]));
|
|
1244
|
-
export const
|
|
1269
|
+
export const CreateOrUpdateScheduleRequest = lazySchema(() => z.looseObject({
|
|
1245
1270
|
name: z.string().nullable().optional(),
|
|
1246
1271
|
isEnabled: z.boolean().nullable().optional(),
|
|
1247
1272
|
isExclusive: z.boolean().nullable().optional(),
|
|
@@ -1249,6 +1274,7 @@ export const ScheduleCreate = lazySchema(() => z.looseObject({
|
|
|
1249
1274
|
timezone: z.string().nullable().optional(),
|
|
1250
1275
|
description: z.string().nullable().optional(),
|
|
1251
1276
|
title: z.string().nullable().optional(),
|
|
1277
|
+
notifications: ScheduleNotifications().optional(),
|
|
1252
1278
|
actions: z.array(ScheduleCreateAction()).nullable().optional(),
|
|
1253
1279
|
}));
|
|
1254
1280
|
export const ScheduleActionRunActor = lazySchema(() => z.looseObject({
|
|
@@ -1268,29 +1294,27 @@ export const ScheduleAction = lazySchema(() => z.discriminatedUnion("type", [Sch
|
|
|
1268
1294
|
export const Schedule = lazySchema(() => ScheduleBase().extend({
|
|
1269
1295
|
description: z.string().nullable().optional(),
|
|
1270
1296
|
title: z.string().nullable().optional(),
|
|
1271
|
-
notifications:
|
|
1272
|
-
email: z.boolean().optional(),
|
|
1273
|
-
}).optional(),
|
|
1297
|
+
notifications: ScheduleNotifications().optional(),
|
|
1274
1298
|
actions: z.array(ScheduleAction()),
|
|
1275
1299
|
}));
|
|
1276
1300
|
export const ScheduleResponse = lazySchema(() => z.looseObject({
|
|
1277
1301
|
data: Schedule(),
|
|
1278
1302
|
}));
|
|
1279
|
-
export const
|
|
1303
|
+
export const ScheduleLogEntry = lazySchema(() => z.looseObject({
|
|
1280
1304
|
message: z.string(),
|
|
1281
1305
|
level: z.string(),
|
|
1282
|
-
createdAt: z.date(),
|
|
1306
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1283
1307
|
}));
|
|
1284
1308
|
export const ScheduleLogResponse = lazySchema(() => z.looseObject({
|
|
1285
|
-
data: z.array(
|
|
1309
|
+
data: z.array(ScheduleLogEntry()),
|
|
1286
1310
|
}));
|
|
1287
1311
|
export const CurrentPricingInfo = lazySchema(() => z.looseObject({
|
|
1288
1312
|
pricingModel: z.string(),
|
|
1289
1313
|
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(),
|
|
1314
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
1315
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
1316
|
+
notifiedAboutChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1317
|
+
notifiedAboutFutureChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1294
1318
|
isPriceChangeNotificationSuppressed: z.boolean().optional(),
|
|
1295
1319
|
forceContainsSignificantPriceChange: z.boolean().optional(),
|
|
1296
1320
|
isPPEPlatformUsagePaidByUser: z.boolean().optional(),
|
|
@@ -1301,7 +1325,7 @@ export const CurrentPricingInfo = lazySchema(() => z.looseObject({
|
|
|
1301
1325
|
minimalMaxTotalChargeUsd: z.number().nullable().optional(),
|
|
1302
1326
|
pricingPerEvent: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
1303
1327
|
}));
|
|
1304
|
-
export const
|
|
1328
|
+
export const StoreActor = lazySchema(() => z.looseObject({
|
|
1305
1329
|
id: z.string(),
|
|
1306
1330
|
title: z.string(),
|
|
1307
1331
|
name: z.string(),
|
|
@@ -1311,8 +1335,8 @@ export const StoreListActor = lazySchema(() => z.looseObject({
|
|
|
1311
1335
|
categories: z.array(z.string()).optional(),
|
|
1312
1336
|
notice: ActorNotice().optional(),
|
|
1313
1337
|
pictureUrl: z.string().nullable().optional(),
|
|
1314
|
-
userPictureUrl: z.
|
|
1315
|
-
url: z.
|
|
1338
|
+
userPictureUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1339
|
+
url: z.url({ normalize: true }).nullable().optional(),
|
|
1316
1340
|
stats: ActorStats(),
|
|
1317
1341
|
currentPricingInfo: CurrentPricingInfo().optional(),
|
|
1318
1342
|
isWhiteListedForAgenticPayments: z.boolean().nullable().optional(),
|
|
@@ -1323,24 +1347,25 @@ export const StoreListActor = lazySchema(() => z.looseObject({
|
|
|
1323
1347
|
readmeSummary: z.string().optional(),
|
|
1324
1348
|
}));
|
|
1325
1349
|
export const ListOfStoreActors = lazySchema(() => PaginationResponse().extend({
|
|
1326
|
-
items: z.array(
|
|
1350
|
+
items: z.array(StoreActor()),
|
|
1327
1351
|
}));
|
|
1328
|
-
export const
|
|
1352
|
+
export const ListOfStoreActorsResponse = lazySchema(() => z.looseObject({
|
|
1329
1353
|
data: ListOfStoreActors(),
|
|
1330
1354
|
}));
|
|
1331
|
-
export const
|
|
1355
|
+
export const UserProfile = lazySchema(() => z.looseObject({
|
|
1332
1356
|
bio: z.string().nullable().optional(),
|
|
1357
|
+
readme: z.string().nullable().optional(),
|
|
1333
1358
|
name: z.string().optional(),
|
|
1334
|
-
pictureUrl: z.
|
|
1359
|
+
pictureUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1335
1360
|
githubUsername: z.string().nullable().optional(),
|
|
1336
|
-
websiteUrl: z.
|
|
1361
|
+
websiteUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1337
1362
|
twitterUsername: z.string().nullable().optional(),
|
|
1338
1363
|
}));
|
|
1339
1364
|
export const UserPublicInfo = lazySchema(() => z.looseObject({
|
|
1340
1365
|
username: z.string(),
|
|
1341
|
-
profile:
|
|
1366
|
+
profile: UserProfile().optional(),
|
|
1342
1367
|
}));
|
|
1343
|
-
export const
|
|
1368
|
+
export const UserPublicInfoResponse = lazySchema(() => z.looseObject({
|
|
1344
1369
|
data: UserPublicInfo(),
|
|
1345
1370
|
}));
|
|
1346
1371
|
export const ProxyGroup = lazySchema(() => z.looseObject({
|
|
@@ -1348,7 +1373,7 @@ export const ProxyGroup = lazySchema(() => z.looseObject({
|
|
|
1348
1373
|
description: z.string().nullable(),
|
|
1349
1374
|
availableCount: z.int(),
|
|
1350
1375
|
}));
|
|
1351
|
-
export const
|
|
1376
|
+
export const ProxyResource = lazySchema(() => z.looseObject({
|
|
1352
1377
|
password: z.string(),
|
|
1353
1378
|
groups: z.array(ProxyGroup()),
|
|
1354
1379
|
}));
|
|
@@ -1358,7 +1383,7 @@ export const Proxy = lazySchema(() => z.looseObject({
|
|
|
1358
1383
|
* the count of available proxies.
|
|
1359
1384
|
*/
|
|
1360
1385
|
export const AvailableProxyGroups = lazySchema(() => z.record(z.string(), z.int()));
|
|
1361
|
-
export const
|
|
1386
|
+
export const UserPlan = lazySchema(() => z.looseObject({
|
|
1362
1387
|
id: z.string().optional(),
|
|
1363
1388
|
description: z.string().optional(),
|
|
1364
1389
|
isEnabled: z.boolean().optional(),
|
|
@@ -1390,7 +1415,7 @@ export const EffectivePlatformFeature = lazySchema(() => z.looseObject({
|
|
|
1390
1415
|
disabledReason: z.string().nullable(),
|
|
1391
1416
|
disabledReasonType: z.string().nullable(),
|
|
1392
1417
|
isTrial: z.boolean(),
|
|
1393
|
-
trialExpirationAt: z.date().nullable(),
|
|
1418
|
+
trialExpirationAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable(),
|
|
1394
1419
|
}));
|
|
1395
1420
|
export const EffectivePlatformFeatures = lazySchema(() => z.looseObject({
|
|
1396
1421
|
ACTORS: EffectivePlatformFeature(),
|
|
@@ -1407,22 +1432,22 @@ export const EffectivePlatformFeatures = lazySchema(() => z.looseObject({
|
|
|
1407
1432
|
export const UserPrivateInfo = lazySchema(() => z.looseObject({
|
|
1408
1433
|
id: z.string().optional(),
|
|
1409
1434
|
username: z.string(),
|
|
1410
|
-
profile:
|
|
1435
|
+
profile: UserProfile().optional(),
|
|
1411
1436
|
email: z.string().optional(),
|
|
1412
|
-
proxy:
|
|
1413
|
-
plan:
|
|
1437
|
+
proxy: ProxyResource().optional(),
|
|
1438
|
+
plan: UserPlan().optional(),
|
|
1414
1439
|
effectivePlatformFeatures: EffectivePlatformFeatures().optional(),
|
|
1415
|
-
createdAt: z.date().optional(),
|
|
1440
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
1416
1441
|
isPaying: z.boolean().optional(),
|
|
1417
1442
|
}));
|
|
1418
|
-
export const
|
|
1443
|
+
export const UserPrivateInfoResponse = lazySchema(() => z.looseObject({
|
|
1419
1444
|
data: UserPrivateInfo(),
|
|
1420
1445
|
}));
|
|
1421
1446
|
export const UsageCycle = lazySchema(() => z.looseObject({
|
|
1422
|
-
startAt: z.date(),
|
|
1423
|
-
endAt: z.date(),
|
|
1447
|
+
startAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1448
|
+
endAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1424
1449
|
}));
|
|
1425
|
-
export const
|
|
1450
|
+
export const PriceTier = lazySchema(() => z.looseObject({
|
|
1426
1451
|
quantityAbove: z.number(),
|
|
1427
1452
|
discountPercent: z.number(),
|
|
1428
1453
|
tierQuantity: z.number(),
|
|
@@ -1434,21 +1459,21 @@ export const UsageItem = lazySchema(() => z.looseObject({
|
|
|
1434
1459
|
baseAmountUsd: z.number(),
|
|
1435
1460
|
baseUnitPriceUsd: z.number().optional(),
|
|
1436
1461
|
amountAfterVolumeDiscountUsd: z.number().optional(),
|
|
1437
|
-
priceTiers: z.array(
|
|
1462
|
+
priceTiers: z.array(PriceTier()).optional(),
|
|
1438
1463
|
}));
|
|
1439
1464
|
/** A map of usage item names (e.g., ACTOR_COMPUTE_UNITS) to their usage details. */
|
|
1440
1465
|
export const MonthlyServiceUsage = lazySchema(() => z.record(z.string(), UsageItem()));
|
|
1441
1466
|
/** A map of service usage item names to their usage details. */
|
|
1442
1467
|
export const ServiceUsage = lazySchema(() => z.record(z.string(), UsageItem()));
|
|
1443
|
-
export const
|
|
1444
|
-
date: z.date(),
|
|
1468
|
+
export const DailyServiceUsage = lazySchema(() => z.looseObject({
|
|
1469
|
+
date: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1445
1470
|
serviceUsage: ServiceUsage(),
|
|
1446
1471
|
totalUsageCreditsUsd: z.number(),
|
|
1447
1472
|
}));
|
|
1448
1473
|
export const MonthlyUsage = lazySchema(() => z.looseObject({
|
|
1449
1474
|
usageCycle: UsageCycle(),
|
|
1450
1475
|
monthlyServiceUsage: MonthlyServiceUsage(),
|
|
1451
|
-
dailyServiceUsages: z.array(
|
|
1476
|
+
dailyServiceUsages: z.array(DailyServiceUsage()),
|
|
1452
1477
|
totalUsageCreditsUsdBeforeVolumeDiscount: z.number(),
|
|
1453
1478
|
totalUsageCreditsUsdAfterVolumeDiscount: z.number(),
|
|
1454
1479
|
}));
|
|
@@ -1469,7 +1494,7 @@ export const Limits = lazySchema(() => z.looseObject({
|
|
|
1469
1494
|
dataRetentionDays: z.int(),
|
|
1470
1495
|
maxScheduleCount: z.int().optional(),
|
|
1471
1496
|
}));
|
|
1472
|
-
export const
|
|
1497
|
+
export const CurrentUsage = lazySchema(() => z.looseObject({
|
|
1473
1498
|
monthlyUsageUsd: z.number(),
|
|
1474
1499
|
monthlyActorComputeUnits: z.number(),
|
|
1475
1500
|
monthlyExternalDataTransferGbytes: z.number(),
|
|
@@ -1485,9 +1510,9 @@ export const Current = lazySchema(() => z.looseObject({
|
|
|
1485
1510
|
export const AccountLimits = lazySchema(() => z.looseObject({
|
|
1486
1511
|
monthlyUsageCycle: UsageCycle(),
|
|
1487
1512
|
limits: Limits(),
|
|
1488
|
-
current:
|
|
1513
|
+
current: CurrentUsage(),
|
|
1489
1514
|
}));
|
|
1490
|
-
export const
|
|
1515
|
+
export const AccountLimitsResponse = lazySchema(() => z.looseObject({
|
|
1491
1516
|
data: AccountLimits(),
|
|
1492
1517
|
}));
|
|
1493
1518
|
export const UpdateLimitsRequest = lazySchema(() => z.looseObject({
|
|
@@ -1502,20 +1527,20 @@ export const BrowserInfoResponse = lazySchema(() => z.looseObject({
|
|
|
1502
1527
|
headers: z.record(z.string(), z.union([z.string(), z.array(z.string())])).optional(),
|
|
1503
1528
|
rawHeaders: z.array(z.string()).optional(),
|
|
1504
1529
|
}));
|
|
1505
|
-
export const
|
|
1530
|
+
export const EncodeAndSignResult = lazySchema(() => z.looseObject({
|
|
1506
1531
|
encoded: z.string(),
|
|
1507
1532
|
}));
|
|
1508
1533
|
export const EncodeAndSignResponse = lazySchema(() => z.looseObject({
|
|
1509
|
-
data:
|
|
1534
|
+
data: EncodeAndSignResult(),
|
|
1510
1535
|
}));
|
|
1511
1536
|
export const DecodeAndVerifyRequest = lazySchema(() => z.looseObject({
|
|
1512
1537
|
encoded: z.string(),
|
|
1513
1538
|
}));
|
|
1514
|
-
export const
|
|
1539
|
+
export const DecodeAndVerifyResult = lazySchema(() => z.looseObject({
|
|
1515
1540
|
decoded: z.unknown(),
|
|
1516
1541
|
encodedByUserId: z.string().nullable(),
|
|
1517
1542
|
isVerifiedUser: z.boolean(),
|
|
1518
1543
|
}));
|
|
1519
1544
|
export const DecodeAndVerifyResponse = lazySchema(() => z.looseObject({
|
|
1520
|
-
data:
|
|
1545
|
+
data: DecodeAndVerifyResult(),
|
|
1521
1546
|
}));
|