apify-client 3.0.0-beta.11 → 3.0.0-beta.110
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 +16 -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 +13 -8
- package/dist/base/resource_client.js +60 -34
- 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 +3109 -987
- package/dist/generated/schemas.d.ts +2563 -957
- package/dist/generated/schemas.js +585 -229
- package/dist/http_clients/axios.d.ts +63 -0
- package/dist/http_clients/axios.js +129 -0
- package/dist/http_clients/base.d.ts +397 -0
- package/dist/http_clients/base.js +656 -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 +8 -0
- package/dist/http_compressors/index.js +3 -0
- package/dist/http_compressors/resolve.d.ts +24 -0
- package/dist/http_compressors/resolve.js +30 -0
- package/dist/http_compressors/zstd.d.ts +34 -0
- package/dist/http_compressors/zstd.js +43 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +5 -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 +177 -240
- package/dist/models.js +6 -4
- package/dist/resource_clients/actor.d.ts +104 -34
- package/dist/resource_clients/actor.js +129 -55
- package/dist/resource_clients/actor_collection.d.ts +15 -11
- package/dist/resource_clients/actor_collection.js +9 -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_server.d.ts +150 -0
- package/dist/resource_clients/actor_server.js +199 -0
- package/dist/resource_clients/actor_version.d.ts +18 -6
- package/dist/resource_clients/actor_version.js +18 -8
- package/dist/resource_clients/actor_version_collection.d.ts +9 -4
- package/dist/resource_clients/actor_version_collection.js +11 -4
- package/dist/resource_clients/build.d.ts +18 -7
- package/dist/resource_clients/build.js +33 -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 +83 -36
- package/dist/resource_clients/dataset.js +103 -109
- 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 -27
- package/dist/resource_clients/key_value_store.js +132 -50
- 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 +38 -21
- package/dist/resource_clients/log.js +139 -63
- package/dist/resource_clients/request_queue.d.ts +77 -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 +124 -30
- package/dist/resource_clients/run.js +188 -51
- 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 +15 -6
- package/dist/resource_clients/schedule.js +25 -10
- 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 +35 -12
- package/dist/resource_clients/task.js +75 -35
- 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 +16 -7
- package/dist/resource_clients/user.js +34 -16
- package/dist/resource_clients/webhook.d.ts +16 -7
- package/dist/resource_clients/webhook.js +25 -10
- 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 +87 -0
- package/dist/runtime/types.d.ts +60 -0
- package/dist/runtime/types.js +1 -0
- package/dist/runtime/web.d.ts +5 -0
- package/dist/runtime/web.js +21 -0
- package/dist/schemas.d.ts +370 -4
- package/dist/schemas.js +26 -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 +87 -61
- package/dist/utils.js +208 -162
- package/dist/wait_for_resources.d.ts +8 -0
- package/dist/wait_for_resources.js +39 -0
- package/package.json +41 -38
- 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,34 +33,38 @@ 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(),
|
|
50
50
|
}));
|
|
51
51
|
/** Machine-processable error type identifier. */
|
|
52
|
-
export const ErrorType = lazySchema(() => z.enum(["3d-secure-auth-failed", "access-right-already-exists", "action-not-found", "actor-already-rented", "actor-can-not-be-rented", "actor-disabled", "actor-is-not-rented", "actor-memory-limit-exceeded", "actor-name-exists-new-owner", "actor-name-not-unique", "actor-not-found", "actor-not-github-actor", "actor-not-public", "actor-permission-level-not-supported-for-agentic-payments", "actor-review-already-exists", "actor-run-failed", "actor-standby-not-supported-for-agentic-payments", "actor-task-name-not-unique", "agentic-payment-info-retrieval-error", "agentic-payment-information-missing", "agentic-payment-insufficient-amount", "agentic-payment-provider-internal-error", "agentic-payment-provider-unauthorized", "airtable-webhook-deprecated", "already-subscribed-to-paid-actor", "apify-plan-required-to-use-paid-actor", "apify-signup-not-allowed", "auth-method-not-supported", "authorization-server-not-found", "auto-issue-date-invalid", "background-check-required", "billing-system-error", "black-friday-plan-expired", "braintree-error", "braintree-not-linked", "braintree-operation-timed-out", "braintree-unsupported-currency", "build-not-found", "build-outdated", "cannot-add-apify-events-to-ppe-actor", "cannot-add-multiple-pricing-infos", "cannot-add-pricing-info-that-alters-past", "cannot-add-second-future-pricing-info", "cannot-build-actor-from-webhook", "cannot-change-billing-interval", "cannot-change-owner", "cannot-charge-apify-event", "cannot-charge-non-pay-per-event-actor", "cannot-comment-as-other-user", "cannot-copy-actor-task", "cannot-create-payout", "cannot-create-public-actor", "cannot-create-tax-transaction", "cannot-delete-critical-actor", "cannot-delete-invoice", "cannot-delete-paid-actor", "cannot-disable-one-time-event-for-apify-start-event", "cannot-disable-organization-with-enabled-members", "cannot-disable-user-with-subscription", "cannot-link-oauth-to-unverified-email", "cannot-metamorph-to-pay-per-result-actor", "cannot-modify-actor-pricing-too-frequently", "cannot-modify-actor-pricing-with-immediate-effect", "cannot-monetize-without-payout-billing-info", "cannot-override-paid-actor-trial", "cannot-permanently-delete-subscription", "cannot-publish-actor", "cannot-publish-actor-task", "cannot-reduce-last-full-token", "cannot-reimburse-more-than-original-charge", "cannot-reimburse-non-rental-charge", "cannot-remove-own-actor-from-recently-used", "cannot-remove-payment-method", "cannot-remove-pricing-info", "cannot-remove-running-run", "cannot-remove-user-with-public-actors", "cannot-remove-user-with-subscription", "cannot-remove-user-with-unpaid-invoice", "cannot-rename-env-var", "cannot-rent-paid-actor", "cannot-review-own-actor", "cannot-set-access-rights-for-owner", "cannot-set-is-status-message-terminal", "cannot-unpublish-critical-actor", "cannot-unpublish-paid-actor", "cannot-unpublish-profile", "cannot-update-invoice-field", "concurrent-runs-limit-exceeded", "concurrent-update-detected", "conference-token-not-found", "content-encoding-forbidden-for-html", "coupon-already-redeemed", "coupon-expired", "coupon-for-new-customers", "coupon-for-subscribed-users", "coupon-limits-are-in-conflict-with-current-limits", "coupon-max-number-of-redemptions-reached", "coupon-not-found", "coupon-not-unique", "coupons-disabled", "create-github-issue-not-allowed", "creator-plan-not-available", "cron-expression-invalid", "daily-ai-token-limit-exceeded", "daily-publication-limit-exceeded", "dataset-does-not-have-fields-schema", "dataset-does-not-have-schema", "dataset-locked", "dataset-schema-invalid", "dcr-not-supported", "default-dataset-not-found", "deleting-default-build", "deleting-unfinished-build", "email-already-taken", "email-already-taken-removed-user", "email-domain-not-allowed-for-coupon", "email-invalid", "email-not-allowed", "email-not-valid", "email-update-too-soon", "elevated-permissions-needed", "env-var-already-exists", "exchange-rate-fetch-failed", "expired-conference-token", "failed-to-charge-user", "final-invoice-negative", "full-permission-actor-blocked-for-admin", "full-permission-actor-not-approved", "github-branch-empty", "github-issue-already-exists", "github-public-key-not-found", "github-repository-not-found", "github-signature-does-not-match-payload", "github-user-not-authorized-for-issues", "gmail-not-allowed", "id-does-not-match", "incompatible-billing-interval", "incomplete-payout-billing-info", "inconsistent-currencies", "incorrect-pricing-modifier-prefix", "input-json-invalid-characters", "input-json-not-object", "input-json-too-long", "input-update-collision", "insufficient-permissions", "insufficient-permissions-to-change-field", "insufficient-security-measures", "insufficient-tax-country-evidence", "integration-auth-error", "internal-server-error", "invalid-billing-info", "invalid-billing-period-for-payout", "invalid-build", "invalid-client-key", "invalid-collection", "invalid-conference-login-password", "invalid-content-type-header", "invalid-credentials", "invalid-git-auth-token", "invalid-github-issue-url", "invalid-header", "invalid-id", "invalid-idempotency-key", "invalid-input", "invalid-input-schema", "invalid-invoice", "invalid-invoice-type", "invalid-issue-date", "invalid-label-params", "invalid-main-account-user-id", "invalid-oauth-app", "invalid-oauth-scope", "invalid-one-time-invoice", "invalid-parameter", "invalid-payout-status", "invalid-picture-url", "invalid-record-key", "invalid-request", "invalid-resource-type", "invalid-signature", "invalid-subscription-plan", "invalid-tax-number", "invalid-tax-number-format", "invalid-token", "invalid-token-type", "invalid-two-factor-code", "invalid-two-factor-code-or-recovery-code", "invalid-two-factor-recovery-code", "invalid-username", "invalid-value", "invitation-invalid-resource-type", "invitation-no-longer-valid", "invoice-canceled", "invoice-cannot-be-refunded-due-to-too-high-amount", "invoice-incomplete", "invoice-is-draft", "invoice-locked", "invoice-must-be-buffer", "invoice-not-canceled", "invoice-not-draft", "invoice-not-found", "invoice-outdated", "invoice-paid-already", "issue-already-connected-to-github", "issue-not-found", "issues-bad-request", "issuer-not-registered", "job-finished", "label-already-linked", "last-api-token", "limit-reached", "max-items-must-be-greater-than-zero", "max-metamorphs-exceeded", "max-total-charge-usd-below-minimum", "max-total-charge-usd-must-be-greater-than-zero", "method-not-allowed", "migration-disabled", "missing-actor-rights", "missing-api-token", "missing-billing-info", "missing-line-items", "missing-payment-date", "missing-payout-billing-info", "missing-proxy-password", "missing-reporting-fields", "missing-resource-name", "missing-settings", "missing-username", "monthly-usage-limit-too-low", "more-than-one-update-not-allowed", "multiple-records-found", "must-be-admin", "name-not-unique", "next-runtime-computation-failed", "no-columns-in-exported-dataset", "no-payment-attempt-for-refund-found", "no-payment-method-available", "no-team-account-seats-available", "non-temporary-email", "not-enough-usage-to-run-paid-actor", "not-implemented", "not-supported-currencies", "o-auth-service-already-connected", "o-auth-service-not-connected", "oauth-resource-access-failed", "one-time-invoice-already-marked-paid", "only-drafts-can-be-deleted", "operation-canceled", "operation-not-allowed", "operation-timed-out", "organization-cannot-own-itself", "organization-role-not-found", "overlapping-payout-billing-periods", "own-token-required", "page-not-found", "param-not-one-of", "parameter-required", "parameters-mismatched", "password-reset-email-already-sent", "password-reset-token-expired", "pay-as-you-go-without-monthly-interval", "payment-attempt-status-message-required", "payout-already-paid", "payout-canceled", "payout-invalid-state", "payout-must-be-approved-to-be-marked-paid", "payout-not-found", "payout-number-already-exists", "phone-number-invalid", "phone-number-landline", "phone-number-opted-out", "phone-verification-disabled", "platform-feature-disabled", "price-overrides-validation-failed", "pricing-model-not-supported", "promotional-plan-not-available", "proxy-auth-ip-not-unique", "public-actor-disabled", "query-timeout", "quoted-price-outdated", "rate-limit-exceeded", "recaptcha-invalid", "recaptcha-required", "record-not-found", "record-not-public", "record-or-token-not-found", "record-too-large", "redirect-uri-mismatch", "reduced-plan-not-available", "rental-charge-already-reimbursed", "rental-not-allowed", "request-aborted-prematurely", "request-handled-or-locked", "request-id-invalid", "request-queue-duplicate-requests", "request-too-large", "requested-dataset-view-does-not-exist", "resume-token-expired", "run-failed", "run-input-body-not-valid-json", "run-timeout-exceeded", "russia-is-evil", "same-user", "schedule-actor-not-found", "schedule-actor-task-not-found", "schedule-name-not-unique", "schema-validation", "schema-validation-error", "schema-validation-failed", "service-worker-registration-not-allowed", "sign-up-method-not-allowed", "slack-integration-not-custom", "socket-closed", "socket-destroyed", "store-schema-invalid", "store-terms-not-accepted", "stripe-enabled", "stripe-generic-decline", "stripe-not-enabled", "stripe-not-enabled-for-user", "tagged-build-required", "tax-country-invalid", "tax-number-invalid", "tax-number-validation-failed", "taxamo-call-failed", "taxamo-request-failed", "testing-error", "token-not-provided", "too-few-versions", "too-many-actor-tasks", "too-many-actors", "too-many-labels-on-resource", "too-many-mcp-connectors", "too-many-o-auth-apps", "too-many-organizations", "too-many-requests", "too-many-schedules", "too-many-ui-access-keys", "too-many-user-labels", "too-many-values", "too-many-versions", "too-many-webhooks", "unexpected-route", "unknown-build-tag", "unknown-payment-provider", "unsubscribe-token-invalid", "unsupported-actor-pricing-model-for-agentic-payments", "unsupported-content-encoding", "unsupported-file-type-for-issue", "unsupported-file-type-image-expected", "unsupported-file-type-text-or-json-expected", "unsupported-permission", "upcoming-subscription-bill-not-up-to-date", "user-already-exists", "user-already-verified", "user-creates-organizations-too-fast", "user-disabled", "user-email-is-disposable", "user-email-not-set", "user-email-not-verified", "user-has-no-subscription", "user-integration-not-found", "user-is-already-invited", "user-is-already-organization-member", "user-is-not-member-of-organization", "user-is-not-organization", "user-is-organization", "user-is-organization-owner", "user-is-removed", "user-not-found", "user-not-logged-in", "user-not-verified", "user-or-token-not-found", "user-plan-not-allowed-for-coupon", "user-problem-with-card", "user-record-not-found", "username-already-taken", "username-missing", "username-not-allowed", "username-removal-forbidden", "username-required", "verification-email-already-sent", "verification-token-expired", "version-already-exists", "versions-size-exceeded", "weak-password", "x402-agentic-payment-already-finalized", "x402-agentic-payment-insufficient-amount", "x402-agentic-payment-malformed-token", "x402-agentic-payment-settlement-failed", "x402-agentic-payment-settlement-in-progress", "x402-agentic-payment-settlement-stuck", "x402-agentic-payment-unauthorized", "x402-payment-required", "zero-invoice"]).or(z.string()));
|
|
52
|
+
export const ErrorType = lazySchema(() => z.enum(["3d-secure-auth-failed", "access-right-already-exists", "action-not-found", "actor-already-rented", "actor-can-not-be-rented", "actor-disabled", "actor-is-not-rented", "actor-memory-limit-exceeded", "actor-name-exists-new-owner", "actor-name-not-unique", "actor-not-found", "actor-not-github-actor", "actor-not-public", "actor-permission-level-not-supported-for-agentic-payments", "actor-review-already-exists", "actor-run-failed", "actor-standby-not-supported-for-agentic-payments", "actor-task-name-not-unique", "agentic-payment-info-retrieval-error", "agentic-payment-information-missing", "agentic-payment-insufficient-amount", "agentic-payment-provider-internal-error", "agentic-payment-provider-unauthorized", "airtable-webhook-deprecated", "already-subscribed-to-paid-actor", "apify-plan-required-to-use-paid-actor", "apify-signup-not-allowed", "auth-method-not-supported", "authorization-server-not-found", "auto-issue-date-invalid", "background-check-required", "billing-system-error", "black-friday-plan-expired", "braintree-error", "braintree-not-linked", "braintree-operation-timed-out", "braintree-unsupported-currency", "build-not-found", "build-outdated", "cannot-add-apify-events-to-ppe-actor", "cannot-add-multiple-pricing-infos", "cannot-add-pricing-info-that-alters-past", "cannot-add-second-future-pricing-info", "cannot-build-actor-from-webhook", "cannot-change-billing-interval", "cannot-change-owner", "cannot-charge-apify-event", "cannot-charge-non-pay-per-event-actor", "cannot-comment-as-other-user", "cannot-copy-actor-task", "cannot-create-payout", "cannot-create-public-actor", "cannot-create-tax-transaction", "cannot-delete-critical-actor", "cannot-delete-invoice", "cannot-delete-paid-actor", "cannot-disable-one-time-event-for-apify-start-event", "cannot-disable-organization-with-enabled-members", "cannot-disable-user-with-subscription", "cannot-link-oauth-to-unverified-email", "cannot-metamorph-to-pay-per-result-actor", "cannot-modify-actor-pricing-too-frequently", "cannot-modify-actor-pricing-with-immediate-effect", "cannot-monetize-without-payout-billing-info", "cannot-override-paid-actor-trial", "cannot-permanently-delete-subscription", "cannot-publish-actor", "cannot-publish-actor-task", "cannot-reduce-last-full-token", "cannot-reimburse-more-than-original-charge", "cannot-reimburse-non-rental-charge", "cannot-remove-own-actor-from-recently-used", "cannot-remove-payment-method", "cannot-remove-pricing-info", "cannot-remove-running-run", "cannot-remove-user-with-public-actors", "cannot-remove-user-with-subscription", "cannot-remove-user-with-unpaid-invoice", "cannot-rename-env-var", "cannot-rent-paid-actor", "cannot-review-own-actor", "cannot-set-access-rights-for-owner", "cannot-set-is-status-message-terminal", "cannot-unpublish-critical-actor", "cannot-unpublish-paid-actor", "cannot-unpublish-profile", "cannot-update-invoice-field", "concurrent-runs-limit-exceeded", "concurrent-update-detected", "conference-token-not-found", "content-encoding-forbidden-for-html", "coupon-already-redeemed", "coupon-expired", "coupon-for-new-customers", "coupon-for-subscribed-users", "coupon-limits-are-in-conflict-with-current-limits", "coupon-max-number-of-redemptions-reached", "coupon-not-found", "coupon-not-unique", "coupons-disabled", "create-github-issue-not-allowed", "creator-plan-not-available", "cron-expression-invalid", "daily-ai-token-limit-exceeded", "daily-publication-limit-exceeded", "dataset-does-not-have-fields-schema", "dataset-does-not-have-schema", "dataset-locked", "dataset-schema-invalid", "dcr-not-supported", "default-dataset-not-found", "deleting-default-build", "deleting-unfinished-build", "email-already-taken", "email-already-taken-removed-user", "email-domain-not-allowed-for-coupon", "email-invalid", "email-not-allowed", "email-not-valid", "email-update-too-soon", "elevated-permissions-needed", "env-var-already-exists", "exchange-rate-fetch-failed", "expired-conference-token", "failed-to-charge-user", "final-invoice-negative", "full-permission-actor-blocked-for-admin", "full-permission-actor-not-approved", "full-permissions-require-verified-owner", "github-branch-empty", "github-issue-already-exists", "github-public-key-not-found", "github-repository-not-found", "github-signature-does-not-match-payload", "github-user-not-authorized-for-issues", "gmail-not-allowed", "id-does-not-match", "incompatible-billing-interval", "incomplete-payout-billing-info", "inconsistent-currencies", "incorrect-pricing-modifier-prefix", "input-json-invalid-characters", "input-json-not-object", "input-json-too-long", "input-update-collision", "input-validation-timed-out", "insufficient-permissions", "insufficient-permissions-to-change-field", "insufficient-security-measures", "insufficient-tax-country-evidence", "integration-auth-error", "internal-server-error", "invalid-billing-info", "invalid-billing-period-for-payout", "invalid-build", "invalid-client-key", "invalid-collection", "invalid-conference-login-password", "invalid-content-type-header", "invalid-credentials", "invalid-git-auth-token", "invalid-github-issue-url", "invalid-header", "invalid-id", "invalid-idempotency-key", "invalid-input", "invalid-input-schema", "invalid-invoice", "invalid-invoice-type", "invalid-issue-date", "invalid-label-params", "invalid-main-account-user-id", "invalid-oauth-app", "invalid-oauth-scope", "invalid-one-time-invoice", "invalid-parameter", "invalid-payout-status", "invalid-picture-url", "invalid-record-key", "invalid-request", "invalid-resource-type", "invalid-signature", "invalid-subscription-plan", "invalid-tax-number", "invalid-tax-number-format", "invalid-token", "invalid-token-type", "invalid-two-factor-code", "invalid-two-factor-code-or-recovery-code", "invalid-two-factor-recovery-code", "invalid-username", "invalid-value", "invitation-invalid-resource-type", "invitation-no-longer-valid", "invoice-canceled", "invoice-cannot-be-refunded-due-to-too-high-amount", "invoice-incomplete", "invoice-is-draft", "invoice-locked", "invoice-must-be-buffer", "invoice-not-canceled", "invoice-not-draft", "invoice-not-found", "invoice-outdated", "invoice-paid-already", "issue-already-connected-to-github", "issue-not-found", "issues-bad-request", "issuer-not-registered", "job-finished", "label-already-linked", "last-api-token", "limit-reached", "max-items-must-be-greater-than-zero", "max-metamorphs-exceeded", "max-total-charge-usd-below-minimum", "max-total-charge-usd-must-be-greater-than-zero", "mcp-connector-actor-not-allowed", "method-not-allowed", "migration-disabled", "missing-actor-rights", "missing-api-token", "missing-billing-info", "missing-line-items", "missing-payment-date", "missing-payout-billing-info", "missing-proxy-password", "missing-reporting-fields", "missing-resource-name", "missing-settings", "missing-username", "monthly-usage-limit-too-low", "more-public-actors-require-verified-owner", "more-than-one-update-not-allowed", "multiple-records-found", "must-be-admin", "name-not-unique", "next-runtime-computation-failed", "no-columns-in-exported-dataset", "no-payment-attempt-for-refund-found", "no-payment-method-available", "no-team-account-seats-available", "non-temporary-email", "not-enough-usage-to-run-paid-actor", "not-implemented", "not-supported-currencies", "o-auth-service-already-connected", "o-auth-service-not-connected", "oauth-resource-access-failed", "one-time-invoice-already-marked-paid", "only-drafts-can-be-deleted", "operation-canceled", "operation-not-allowed", "operation-timed-out", "organization-cannot-own-itself", "organization-role-not-found", "overlapping-payout-billing-periods", "own-token-required", "page-not-found", "param-not-one-of", "parameter-required", "parameters-mismatched", "password-reset-email-already-sent", "password-reset-token-expired", "pay-as-you-go-without-monthly-interval", "payment-attempt-status-message-required", "payout-already-paid", "payout-canceled", "payout-invalid-state", "payout-must-be-approved-to-be-marked-paid", "payout-not-found", "payout-number-already-exists", "phone-number-invalid", "phone-number-landline", "phone-number-opted-out", "phone-verification-disabled", "platform-feature-disabled", "price-overrides-validation-failed", "pricing-model-not-supported", "promotional-plan-not-available", "proxy-auth-ip-not-unique", "public-actor-disabled", "query-timeout", "quoted-price-outdated", "rate-limit-exceeded", "readme-required", "recaptcha-invalid", "recaptcha-required", "record-not-found", "record-not-public", "record-or-token-not-found", "record-too-large", "redirect-uri-mismatch", "reduced-plan-not-available", "rental-charge-already-reimbursed", "rental-not-allowed", "request-aborted-prematurely", "request-handled-or-locked", "request-id-invalid", "request-queue-duplicate-requests", "request-too-large", "requested-dataset-view-does-not-exist", "resume-token-expired", "run-failed", "run-input-body-not-valid-json", "run-timeout-exceeded", "russia-is-evil", "same-user", "schedule-actor-not-found", "schedule-actor-task-not-found", "schedule-name-not-unique", "schema-validation", "schema-validation-error", "schema-validation-failed", "schemas-required", "service-worker-registration-not-allowed", "sign-up-method-not-allowed", "slack-integration-not-custom", "socket-closed", "socket-destroyed", "standby-deployment-invalid", "store-schema-invalid", "store-terms-not-accepted", "stripe-enabled", "stripe-generic-decline", "stripe-not-enabled", "stripe-not-enabled-for-user", "tagged-build-required", "tax-country-invalid", "tax-number-invalid", "tax-number-validation-failed", "taxamo-call-failed", "taxamo-request-failed", "testing-error", "token-not-provided", "too-few-versions", "too-many-actor-tasks", "too-many-actors", "too-many-labels-on-resource", "too-many-mcp-connectors", "too-many-o-auth-apps", "too-many-organizations", "too-many-public-actor-tasks-per-account", "too-many-public-actor-tasks-per-actor", "too-many-requests", "too-many-schedules", "too-many-ui-access-keys", "too-many-user-labels", "too-many-values", "too-many-versions", "too-many-webhooks", "unexpected-route", "unknown-build-tag", "unknown-payment-provider", "unsubscribe-token-invalid", "unsupported-actor-pricing-model-for-agentic-payments", "unsupported-content-encoding", "unsupported-file-type-for-issue", "unsupported-file-type-image-expected", "unsupported-file-type-text-or-json-expected", "unsupported-permission", "upcoming-subscription-bill-not-up-to-date", "user-already-exists", "user-already-verified", "user-creates-organizations-too-fast", "user-disabled", "user-email-is-disposable", "user-email-not-set", "user-email-not-verified", "user-has-no-subscription", "user-integration-not-found", "user-is-already-invited", "user-is-already-organization-member", "user-is-not-member-of-organization", "user-is-not-organization", "user-is-organization", "user-is-organization-owner", "user-is-removed", "user-not-found", "user-not-logged-in", "user-not-verified", "user-or-token-not-found", "user-plan-not-allowed-for-coupon", "user-problem-with-card", "user-record-not-found", "username-already-taken", "username-missing", "username-not-allowed", "username-removal-forbidden", "username-required", "verification-email-already-sent", "verification-token-expired", "version-already-exists", "versions-size-exceeded", "weak-password", "x402-agentic-payment-already-finalized", "x402-agentic-payment-insufficient-amount", "x402-agentic-payment-malformed-token", "x402-agentic-payment-settlement-failed", "x402-agentic-payment-settlement-in-progress", "x402-agentic-payment-settlement-stuck", "x402-agentic-payment-unauthorized", "x402-payment-required", "zero-invoice"]).or(z.string()));
|
|
53
53
|
export const ErrorDetail = lazySchema(() => z.looseObject({
|
|
54
54
|
type: ErrorType().optional(),
|
|
55
55
|
message: z.string().optional(),
|
|
56
|
+
data: z.record(z.string(), z.unknown()).optional(),
|
|
56
57
|
}));
|
|
57
58
|
export const ErrorResponse = lazySchema(() => z.looseObject({
|
|
58
59
|
error: ErrorDetail(),
|
|
59
60
|
}));
|
|
60
|
-
|
|
61
|
-
export const
|
|
61
|
+
/** Determines the permission level that the Actor requires to run. For details, see [Actor permissions](https://docs.apify.com/platform/actors/development/permissions). */
|
|
62
|
+
export const ActorPermissionLevel = lazySchema(() => z.enum(["LIMITED_PERMISSIONS", "FULL_PERMISSIONS"]).or(z.string()));
|
|
63
|
+
/** The version source types accepted in request bodies. Same as `VersionSourceType`, without `SOURCE_CODE`. */
|
|
64
|
+
export const WritableVersionSourceType = lazySchema(() => z.enum(["SOURCE_FILES", "GIT_REPO", "TARBALL", "GITHUB_GIST"]).or(z.string()));
|
|
65
|
+
export const EnvVarRequest = lazySchema(() => z.looseObject({
|
|
62
66
|
name: z.string(),
|
|
63
|
-
value: z.string()
|
|
67
|
+
value: z.string(),
|
|
64
68
|
isSecret: z.boolean().nullable().optional(),
|
|
65
69
|
}));
|
|
66
70
|
export const SourceCodeFileFormat = lazySchema(() => z.enum(["BASE64", "TEXT"]).or(z.string()));
|
|
@@ -79,26 +83,27 @@ export const SourceCodeFolder = lazySchema(() => z.looseObject({
|
|
|
79
83
|
folder: z.boolean(),
|
|
80
84
|
}));
|
|
81
85
|
export const VersionSourceFiles = lazySchema(() => z.array(z.union([SourceCodeFile(), SourceCodeFolder()])));
|
|
82
|
-
export const
|
|
86
|
+
export const CreateVersionRequest = lazySchema(() => z.looseObject({
|
|
83
87
|
versionNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/),
|
|
84
|
-
sourceType:
|
|
85
|
-
envVars: z.array(
|
|
88
|
+
sourceType: WritableVersionSourceType(),
|
|
89
|
+
envVars: z.array(EnvVarRequest()).optional(),
|
|
86
90
|
applyEnvVarsToBuild: z.boolean().nullable().optional(),
|
|
87
91
|
buildTag: z.string().nullable().optional(),
|
|
88
92
|
sourceFiles: VersionSourceFiles().optional(),
|
|
89
|
-
gitRepoUrl: z.string().
|
|
90
|
-
tarballUrl: z.string().
|
|
91
|
-
gitHubGistUrl: z.string().
|
|
93
|
+
gitRepoUrl: z.string().optional(),
|
|
94
|
+
tarballUrl: z.string().optional(),
|
|
95
|
+
gitHubGistUrl: z.string().optional(),
|
|
96
|
+
actorPath: z.string().min(1).max(255).nullable().optional(),
|
|
92
97
|
}));
|
|
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
98
|
/** The default settings applied to an Actor run. Can be overridden elsewhere. */
|
|
96
99
|
export const DefaultRunOptions = lazySchema(() => z.looseObject({
|
|
97
100
|
build: z.string().optional(),
|
|
98
101
|
timeoutSecs: z.int().optional(),
|
|
99
102
|
memoryMbytes: z.int().optional(),
|
|
100
|
-
restartOnError: z.boolean().optional(),
|
|
103
|
+
restartOnError: z.boolean().nullable().optional(),
|
|
101
104
|
maxItems: z.int().nullable().optional(),
|
|
105
|
+
maxTotalChargeUsd: z.number().nullable().optional(),
|
|
106
|
+
isMaxTotalChargeUsdSetByUser: z.boolean().nullable().optional(),
|
|
102
107
|
forcePermissionLevel: ActorPermissionLevel().nullable().optional(),
|
|
103
108
|
}));
|
|
104
109
|
export const ActorStandby = lazySchema(() => z.looseObject({
|
|
@@ -110,6 +115,9 @@ export const ActorStandby = lazySchema(() => z.looseObject({
|
|
|
110
115
|
memoryMbytes: z.int().nullable().optional(),
|
|
111
116
|
disableStandbyFieldsOverride: z.boolean().nullable().optional(),
|
|
112
117
|
shouldPassActorInput: z.boolean().nullable().optional(),
|
|
118
|
+
tenancy: z.enum(["SINGLE_TENANT", "MULTI_TENANT"]).or(z.string()).nullable().optional(),
|
|
119
|
+
isConsoleAuthEnabled: z.boolean().nullable().optional(),
|
|
120
|
+
isTokenlessEnabled: z.boolean().nullable().optional(),
|
|
113
121
|
}));
|
|
114
122
|
export const ExampleRunInput = lazySchema(() => z.looseObject({
|
|
115
123
|
body: z.string().optional(),
|
|
@@ -119,23 +127,47 @@ export const CreateActorRequest = lazySchema(() => z.looseObject({
|
|
|
119
127
|
name: z.string().nullable().optional(),
|
|
120
128
|
description: z.string().nullable().optional(),
|
|
121
129
|
title: z.string().nullable().optional(),
|
|
122
|
-
isPublic: z.boolean().
|
|
130
|
+
isPublic: z.boolean().optional(),
|
|
131
|
+
actorPermissionLevel: ActorPermissionLevel().optional(),
|
|
123
132
|
seoTitle: z.string().nullable().optional(),
|
|
124
133
|
seoDescription: z.string().nullable().optional(),
|
|
125
134
|
restartOnError: z.boolean().optional(),
|
|
126
|
-
versions: z.array(
|
|
135
|
+
versions: z.array(CreateVersionRequest()).min(1).optional(),
|
|
127
136
|
categories: z.array(z.string()).nullable().optional(),
|
|
128
137
|
defaultRunOptions: DefaultRunOptions().optional(),
|
|
129
138
|
actorStandby: ActorStandby().nullable().optional(),
|
|
130
139
|
exampleRunInput: ExampleRunInput().nullable().optional(),
|
|
131
140
|
isDeprecated: z.boolean().nullable().optional(),
|
|
132
141
|
}));
|
|
142
|
+
export const VersionSourceType = lazySchema(() => z.enum(["SOURCE_FILES", "GIT_REPO", "TARBALL", "GITHUB_GIST", "SOURCE_CODE"]).or(z.string()));
|
|
143
|
+
export const EnvVar = lazySchema(() => z.looseObject({
|
|
144
|
+
name: z.string(),
|
|
145
|
+
value: z.string().optional(),
|
|
146
|
+
isSecret: z.boolean().nullable().optional(),
|
|
147
|
+
valueHash: z.string().optional(),
|
|
148
|
+
}));
|
|
149
|
+
export const Version = lazySchema(() => z.looseObject({
|
|
150
|
+
versionNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/),
|
|
151
|
+
sourceType: VersionSourceType().nullable(),
|
|
152
|
+
envVars: z.array(EnvVar()).nullable().optional(),
|
|
153
|
+
applyEnvVarsToBuild: z.boolean().nullable().optional(),
|
|
154
|
+
buildTag: z.string().nullable().optional(),
|
|
155
|
+
sourceFiles: VersionSourceFiles().optional(),
|
|
156
|
+
gitRepoUrl: z.string().nullable().optional(),
|
|
157
|
+
tarballUrl: z.string().nullable().optional(),
|
|
158
|
+
gitHubGistUrl: z.string().nullable().optional(),
|
|
159
|
+
actorPath: z.string().min(1).max(255).nullable().optional(),
|
|
160
|
+
githubWebhookId: z.int().nullable().optional(),
|
|
161
|
+
gitlabWebhookId: z.int().nullable().optional(),
|
|
162
|
+
bitbucketWebhookId: z.string().nullable().optional(),
|
|
163
|
+
}));
|
|
133
164
|
export const CommonActorPricingInfo = lazySchema(() => z.looseObject({
|
|
134
165
|
apifyMarginPercentage: z.number(),
|
|
135
|
-
createdAt: z.date(),
|
|
136
|
-
startedAt: z.date(),
|
|
137
|
-
notifiedAboutFutureChangeAt: z.date().nullable().optional(),
|
|
138
|
-
notifiedAboutChangeAt: z.date().nullable().optional(),
|
|
166
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
167
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
168
|
+
notifiedAboutFutureChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
169
|
+
notifiedAboutChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
170
|
+
notifiedAboutRentalToPpePriceChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
139
171
|
reasonForChange: z.string().nullable().optional(),
|
|
140
172
|
isPriceChangeNotificationSuppressed: z.boolean().optional(),
|
|
141
173
|
forceContainsSignificantPriceChange: z.boolean().optional(),
|
|
@@ -159,7 +191,7 @@ export const ActorChargeEvent = lazySchema(() => z.looseObject({
|
|
|
159
191
|
eventPriceUsd: z.number().optional(),
|
|
160
192
|
eventTieredPricingUsd: TieredPricingPerEvent().optional(),
|
|
161
193
|
isPrimaryEvent: z.boolean().optional(),
|
|
162
|
-
isOneTimeEvent: z.boolean().optional(),
|
|
194
|
+
isOneTimeEvent: z.boolean().nullable().optional(),
|
|
163
195
|
}));
|
|
164
196
|
export const PayPerEventActorPricingInfo = lazySchema(() => CommonActorPricingInfo().extend({
|
|
165
197
|
pricingModel: z.literal("PAY_PER_EVENT"),
|
|
@@ -167,6 +199,7 @@ export const PayPerEventActorPricingInfo = lazySchema(() => CommonActorPricingIn
|
|
|
167
199
|
actorChargeEvents: z.record(z.string(), ActorChargeEvent()).optional(),
|
|
168
200
|
}),
|
|
169
201
|
minimalMaxTotalChargeUsd: z.number().nullable().optional(),
|
|
202
|
+
isPPEPlatformUsagePaidByUser: z.boolean().nullable().optional(),
|
|
170
203
|
}));
|
|
171
204
|
/** A single tier's price-per-dataset-item entry. */
|
|
172
205
|
export const TieredPricingPerDatasetItemEntry = lazySchema(() => z.looseObject({
|
|
@@ -183,6 +216,7 @@ export const PricePerDatasetItemActorPricingInfo = lazySchema(() => CommonActorP
|
|
|
183
216
|
pricePerUnitUsd: z.number().optional(),
|
|
184
217
|
tieredPricing: TieredPricingPerDatasetItem().optional(),
|
|
185
218
|
}));
|
|
219
|
+
/** Rental pricing model, which is no longer supported. */
|
|
186
220
|
export const FlatPricePerMonthActorPricingInfo = lazySchema(() => CommonActorPricingInfo().extend({
|
|
187
221
|
pricingModel: z.literal("FLAT_PRICE_PER_MONTH"),
|
|
188
222
|
trialMinutes: z.int(),
|
|
@@ -197,23 +231,23 @@ export const TaggedBuildInfo = lazySchema(() => z.looseObject({
|
|
|
197
231
|
buildId: z.string().optional(),
|
|
198
232
|
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
233
|
buildNumberInt: z.int().optional(),
|
|
200
|
-
finishedAt: z.date().nullable().optional(),
|
|
234
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
201
235
|
}));
|
|
202
236
|
/** A dictionary mapping build tag names (e.g., "latest", "beta") to their build information. */
|
|
203
237
|
export const TaggedBuilds = lazySchema(() => z.record(z.string(), TaggedBuildInfo().nullable()));
|
|
204
238
|
/** 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
239
|
export const ActorNotice = lazySchema(() => z.enum(["NONE", "RESIDENTIAL_PROXY_REQUIRED", "UNDER_MAINTENANCE"]).or(z.string()).nullable());
|
|
206
|
-
export const
|
|
240
|
+
export const ActorResource = lazySchema(() => z.looseObject({
|
|
207
241
|
id: z.string(),
|
|
208
242
|
userId: z.string(),
|
|
209
243
|
name: z.string(),
|
|
210
244
|
username: z.string(),
|
|
211
245
|
description: z.string().nullable().optional(),
|
|
212
|
-
restartOnError: z.boolean().optional(),
|
|
246
|
+
restartOnError: z.boolean().nullable().optional(),
|
|
213
247
|
isPublic: z.boolean(),
|
|
214
248
|
actorPermissionLevel: ActorPermissionLevel().optional(),
|
|
215
|
-
createdAt: z.date(),
|
|
216
|
-
modifiedAt: z.date(),
|
|
249
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
250
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
217
251
|
stats: ActorStats(),
|
|
218
252
|
versions: z.array(Version()),
|
|
219
253
|
pricingInfos: z.array(ActorRunPricingInfo()).optional(),
|
|
@@ -238,37 +272,26 @@ export const Actor = lazySchema(() => z.looseObject({
|
|
|
238
272
|
}));
|
|
239
273
|
/** Response containing Actor data. */
|
|
240
274
|
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(),
|
|
275
|
+
data: ActorResource(),
|
|
253
276
|
}));
|
|
254
277
|
/** The name of the build tag. */
|
|
255
|
-
export const
|
|
278
|
+
export const UpdatedBuildProperty = lazySchema(() => z.looseObject({
|
|
256
279
|
buildId: z.string(),
|
|
257
280
|
}).nullable());
|
|
258
281
|
export const UpdateActorRequest = lazySchema(() => z.looseObject({
|
|
259
282
|
name: z.string().optional(),
|
|
260
283
|
description: z.string().nullable().optional(),
|
|
261
284
|
isPublic: z.boolean().optional(),
|
|
262
|
-
actorPermissionLevel: ActorPermissionLevel().
|
|
285
|
+
actorPermissionLevel: ActorPermissionLevel().optional(),
|
|
263
286
|
seoTitle: z.string().nullable().optional(),
|
|
264
287
|
seoDescription: z.string().nullable().optional(),
|
|
265
288
|
title: z.string().nullable().optional(),
|
|
266
289
|
restartOnError: z.boolean().optional(),
|
|
267
|
-
versions: z.array(
|
|
290
|
+
versions: z.array(CreateVersionRequest()).min(1).optional(),
|
|
268
291
|
pricingInfos: z.array(ActorRunPricingInfo()).optional(),
|
|
269
292
|
categories: z.array(z.string()).nullable().optional(),
|
|
270
293
|
defaultRunOptions: DefaultRunOptions().nullable().optional(),
|
|
271
|
-
taggedBuilds: z.record(z.string(),
|
|
294
|
+
taggedBuilds: z.record(z.string(), UpdatedBuildProperty()).nullable().optional(),
|
|
272
295
|
actorStandby: ActorStandby().nullable().optional(),
|
|
273
296
|
exampleRunInput: ExampleRunInput().nullable().optional(),
|
|
274
297
|
isDeprecated: z.boolean().nullable().optional(),
|
|
@@ -283,6 +306,22 @@ export const ListOfVersionsResponse = lazySchema(() => z.looseObject({
|
|
|
283
306
|
export const VersionResponse = lazySchema(() => z.looseObject({
|
|
284
307
|
data: Version(),
|
|
285
308
|
}));
|
|
309
|
+
export const UpdateVersionRequest = lazySchema(() => z.looseObject({
|
|
310
|
+
versionNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/).optional(),
|
|
311
|
+
sourceType: WritableVersionSourceType().optional(),
|
|
312
|
+
envVars: z.array(EnvVarRequest()).optional(),
|
|
313
|
+
applyEnvVarsToBuild: z.boolean().nullable().optional(),
|
|
314
|
+
buildTag: z.string().nullable().optional(),
|
|
315
|
+
sourceFiles: VersionSourceFiles().optional(),
|
|
316
|
+
gitRepoUrl: z.string().optional(),
|
|
317
|
+
tarballUrl: z.string().optional(),
|
|
318
|
+
gitHubGistUrl: z.string().optional(),
|
|
319
|
+
actorPath: z.string().min(1).max(255).nullable().optional(),
|
|
320
|
+
}));
|
|
321
|
+
export const UpdateBuildOnPushRequest = lazySchema(() => z.looseObject({
|
|
322
|
+
providerId: z.string(),
|
|
323
|
+
enabled: z.boolean(),
|
|
324
|
+
}));
|
|
286
325
|
export const ListOfEnvVars = lazySchema(() => z.looseObject({
|
|
287
326
|
total: z.int(),
|
|
288
327
|
items: z.array(EnvVar()),
|
|
@@ -290,7 +329,6 @@ export const ListOfEnvVars = lazySchema(() => z.looseObject({
|
|
|
290
329
|
export const ListOfEnvVarsResponse = lazySchema(() => z.looseObject({
|
|
291
330
|
data: ListOfEnvVars(),
|
|
292
331
|
}));
|
|
293
|
-
export const EnvVarRequest = lazySchema(() => EnvVar().required({ value: true }));
|
|
294
332
|
export const EnvVarResponse = lazySchema(() => z.looseObject({
|
|
295
333
|
data: EnvVar(),
|
|
296
334
|
}));
|
|
@@ -301,62 +339,129 @@ export const WebhookCondition = lazySchema(() => z.looseObject({
|
|
|
301
339
|
actorTaskId: z.string().nullable().optional(),
|
|
302
340
|
actorRunId: z.string().nullable().optional(),
|
|
303
341
|
}));
|
|
342
|
+
/** Slack message configuration. Present only when `actionType` is `SLACK_MESSAGE`. */
|
|
343
|
+
export const WebhookSlackMessage = lazySchema(() => z.looseObject({
|
|
344
|
+
userIntegrationId: z.string().optional(),
|
|
345
|
+
channelId: z.string().optional(),
|
|
346
|
+
messageTemplate: z.string().optional(),
|
|
347
|
+
}));
|
|
348
|
+
/** Selects which dataset item fields are included in the output. */
|
|
349
|
+
export const WebhookDatasetTransformation = lazySchema(() => z.looseObject({
|
|
350
|
+
fields: z.array(z.string()).optional(),
|
|
351
|
+
omit: z.array(z.string()).optional(),
|
|
352
|
+
}));
|
|
353
|
+
/** Gmail email configuration. Present only when `actionType` is `GOOGLE_MAIL`. */
|
|
354
|
+
export const WebhookGoogleMail = lazySchema(() => z.looseObject({
|
|
355
|
+
userIntegrationId: z.string().optional(),
|
|
356
|
+
emailTo: z.array(z.string()).optional(),
|
|
357
|
+
subject: z.string().optional(),
|
|
358
|
+
body: z.string().optional(),
|
|
359
|
+
attachmentFormat: z.string().optional(),
|
|
360
|
+
attachmentTransformation: WebhookDatasetTransformation().optional(),
|
|
361
|
+
}));
|
|
362
|
+
/** Google Drive upload configuration. Present only when `actionType` is `GOOGLE_DRIVE`. */
|
|
363
|
+
export const WebhookGoogleDrive = lazySchema(() => z.looseObject({
|
|
364
|
+
userIntegrationId: z.string().optional(),
|
|
365
|
+
filename: z.string().optional(),
|
|
366
|
+
format: z.string().nullable().optional(),
|
|
367
|
+
transformation: WebhookDatasetTransformation().optional(),
|
|
368
|
+
}));
|
|
369
|
+
/** GitHub issue configuration. Present only when `actionType` is `GITHUB_ISSUE`. */
|
|
370
|
+
export const WebhookGithubIssue = lazySchema(() => z.looseObject({
|
|
371
|
+
userIntegrationId: z.string().optional(),
|
|
372
|
+
repository: z.string().optional(),
|
|
373
|
+
title: z.string().optional(),
|
|
374
|
+
body: z.string().optional(),
|
|
375
|
+
}));
|
|
304
376
|
/** Status of the webhook dispatch indicating whether the HTTP request was successful. */
|
|
305
377
|
export const WebhookDispatchStatus = lazySchema(() => z.enum(["ACTIVE", "SUCCEEDED", "FAILED"]).or(z.string()));
|
|
306
|
-
export const
|
|
378
|
+
export const WebhookLastDispatch = lazySchema(() => z.looseObject({
|
|
307
379
|
status: WebhookDispatchStatus(),
|
|
308
|
-
finishedAt: z.date().nullable().optional(),
|
|
309
|
-
removedAt: z.date().nullable().optional(),
|
|
380
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
381
|
+
removedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
310
382
|
}));
|
|
311
383
|
export const WebhookStats = lazySchema(() => z.looseObject({
|
|
312
384
|
totalDispatches: z.int().optional(),
|
|
313
385
|
}));
|
|
314
|
-
export const
|
|
386
|
+
export const WebhookResource = lazySchema(() => z.looseObject({
|
|
315
387
|
id: z.string(),
|
|
316
|
-
createdAt: z.date(),
|
|
317
|
-
modifiedAt: z.date(),
|
|
388
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
389
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
318
390
|
userId: z.string(),
|
|
319
391
|
isAdHoc: z.boolean().nullable().optional(),
|
|
320
|
-
isApifyIntegration: z.boolean().optional(),
|
|
321
392
|
isEnabled: z.boolean().optional(),
|
|
322
393
|
actionType: z.string().optional(),
|
|
394
|
+
isApifyIntegration: z.boolean().nullable().optional(),
|
|
323
395
|
shouldInterpolateStrings: z.boolean().nullable().optional(),
|
|
324
396
|
eventTypes: z.array(WebhookEventType()),
|
|
325
397
|
condition: WebhookCondition(),
|
|
326
398
|
ignoreSslErrors: z.boolean(),
|
|
327
|
-
doNotRetry: z.boolean(),
|
|
328
|
-
requestUrl: z.url({ normalize: true }),
|
|
329
|
-
|
|
399
|
+
doNotRetry: z.boolean().nullable().optional(),
|
|
400
|
+
requestUrl: z.url({ normalize: true }).nullable().optional(),
|
|
401
|
+
payloadTemplate: z.string().nullable().optional(),
|
|
402
|
+
headersTemplate: z.string().nullable().optional(),
|
|
403
|
+
title: z.string().nullable().optional(),
|
|
404
|
+
description: z.string().nullable().optional(),
|
|
405
|
+
slackMessage: WebhookSlackMessage().optional(),
|
|
406
|
+
googleMail: WebhookGoogleMail().optional(),
|
|
407
|
+
googleDrive: WebhookGoogleDrive().optional(),
|
|
408
|
+
githubIssue: WebhookGithubIssue().optional(),
|
|
409
|
+
lastDispatch: WebhookLastDispatch().nullable().optional(),
|
|
330
410
|
stats: WebhookStats().nullable().optional(),
|
|
331
411
|
}));
|
|
332
|
-
|
|
333
|
-
|
|
412
|
+
/** Paginated list of webhooks with all their fields, including `payloadTemplate`. */
|
|
413
|
+
export const ListOfWebhookResources = lazySchema(() => PaginationResponse().extend({
|
|
414
|
+
items: z.array(WebhookResource()),
|
|
334
415
|
}));
|
|
335
|
-
export const
|
|
336
|
-
data:
|
|
416
|
+
export const ListOfWebhookResourcesResponse = lazySchema(() => z.looseObject({
|
|
417
|
+
data: ListOfWebhookResources(),
|
|
418
|
+
}));
|
|
419
|
+
/** An OAuth connection configured on an Actor. Secret credentials are never returned. */
|
|
420
|
+
export const ActorOAuthConnection = lazySchema(() => z.looseObject({
|
|
421
|
+
_id: z.string(),
|
|
422
|
+
actorId: z.string(),
|
|
423
|
+
oAuthProviderType: z.enum(["CUSTOM", "GOOGLE"]).or(z.string()),
|
|
424
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
425
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
426
|
+
credentials: z.looseObject({
|
|
427
|
+
clientId: z.string().optional(),
|
|
428
|
+
scope: z.string().optional(),
|
|
429
|
+
label: z.string().optional(),
|
|
430
|
+
imageUrl: z.string().optional(),
|
|
431
|
+
}).optional(),
|
|
432
|
+
}));
|
|
433
|
+
export const ListOfActorOAuthConnections = lazySchema(() => z.looseObject({
|
|
434
|
+
total: z.int(),
|
|
435
|
+
items: z.array(ActorOAuthConnection()),
|
|
436
|
+
}));
|
|
437
|
+
export const ListOfActorOAuthConnectionsResponse = lazySchema(() => z.looseObject({
|
|
438
|
+
data: ListOfActorOAuthConnections(),
|
|
337
439
|
}));
|
|
338
440
|
/** Status of an Actor job (run or build). */
|
|
339
441
|
export const ActorJobStatus = lazySchema(() => z.enum(["READY", "RUNNING", "SUCCEEDED", "FAILED", "TIMING-OUT", "TIMED-OUT", "ABORTING", "ABORTED"]).or(z.string()));
|
|
340
442
|
export const RunOrigin = lazySchema(() => z.enum(["DEVELOPMENT", "WEB", "API", "SCHEDULER", "TEST", "WEBHOOK", "ACTOR", "CLI", "CI", "STANDBY", "MCP"]).or(z.string()));
|
|
341
|
-
export const
|
|
443
|
+
export const BuildMeta = lazySchema(() => z.looseObject({
|
|
342
444
|
origin: RunOrigin(),
|
|
343
445
|
clientIp: z.string().optional(),
|
|
344
446
|
userAgent: z.string().optional(),
|
|
447
|
+
githubActionsRunUrl: z.string().optional(),
|
|
448
|
+
actorRunId: z.string().optional(),
|
|
449
|
+
webhookDispatchId: z.string().optional(),
|
|
345
450
|
}));
|
|
346
|
-
export const
|
|
451
|
+
export const BuildListItem = lazySchema(() => z.looseObject({
|
|
347
452
|
id: z.string(),
|
|
348
453
|
actId: z.string().optional(),
|
|
349
454
|
userId: z.string().optional(),
|
|
350
455
|
status: ActorJobStatus(),
|
|
351
|
-
startedAt: z.date(),
|
|
352
|
-
finishedAt: z.date().nullable().optional(),
|
|
353
|
-
usageTotalUsd: z.number(),
|
|
456
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
457
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
458
|
+
usageTotalUsd: z.number().optional(),
|
|
354
459
|
buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),
|
|
355
460
|
buildNumberInt: z.int().optional(),
|
|
356
|
-
meta:
|
|
461
|
+
meta: BuildMeta().optional(),
|
|
357
462
|
}));
|
|
358
463
|
export const ListOfBuilds = lazySchema(() => PaginationResponse().extend({
|
|
359
|
-
items: z.array(
|
|
464
|
+
items: z.array(BuildListItem()),
|
|
360
465
|
}));
|
|
361
466
|
export const ListOfBuildsResponse = lazySchema(() => z.looseObject({
|
|
362
467
|
data: ListOfBuilds(),
|
|
@@ -372,38 +477,53 @@ export const BuildOptions = lazySchema(() => z.looseObject({
|
|
|
372
477
|
betaPackages: z.boolean().nullable().optional(),
|
|
373
478
|
memoryMbytes: z.int().nullable().optional(),
|
|
374
479
|
diskMbytes: z.int().nullable().optional(),
|
|
480
|
+
tag: z.string().nullable().optional(),
|
|
481
|
+
debug: z.boolean().nullable().optional(),
|
|
375
482
|
}));
|
|
376
483
|
export const BuildUsage = lazySchema(() => z.looseObject({
|
|
377
484
|
ACTOR_COMPUTE_UNITS: z.number().nullable().optional(),
|
|
378
485
|
}));
|
|
486
|
+
/** Additional information about the Actor. */
|
|
487
|
+
export const ActorDefinitionMeta = lazySchema(() => z.looseObject({
|
|
488
|
+
templateId: z.string().optional(),
|
|
489
|
+
generatedBy: z.string().optional(),
|
|
490
|
+
}));
|
|
379
491
|
/** The definition of the Actor, the full specification of this field can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/actor-json) */
|
|
380
492
|
export const ActorDefinition = lazySchema(() => z.looseObject({
|
|
381
493
|
actorSpecification: z.literal(1).optional(),
|
|
382
494
|
name: z.string().optional(),
|
|
495
|
+
title: z.string().optional(),
|
|
496
|
+
description: z.string().optional(),
|
|
383
497
|
version: z.string().regex(/^[0-9]+(\.[0-9]+)+$/).optional(),
|
|
384
498
|
buildTag: z.string().optional(),
|
|
499
|
+
meta: ActorDefinitionMeta().optional(),
|
|
385
500
|
environmentVariables: z.record(z.string(), z.string()).optional(),
|
|
386
501
|
dockerfile: z.string().optional(),
|
|
387
502
|
dockerContextDir: z.string().optional(),
|
|
388
503
|
readme: z.string().nullable().optional(),
|
|
389
504
|
input: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
505
|
+
output: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
390
506
|
changelog: z.string().nullable().optional(),
|
|
391
507
|
storages: z.looseObject({
|
|
392
508
|
dataset: z.record(z.string(), z.unknown()).optional(),
|
|
509
|
+
datasets: z.record(z.string(), z.record(z.string(), z.unknown())).optional(),
|
|
510
|
+
keyValueStore: z.record(z.string(), z.unknown()).optional(),
|
|
393
511
|
}).optional(),
|
|
394
512
|
defaultMemoryMbytes: z.union([z.string(), z.int()]).optional(),
|
|
395
513
|
minMemoryMbytes: z.int().min(128).optional(),
|
|
396
514
|
maxMemoryMbytes: z.int().min(128).optional(),
|
|
397
515
|
usesStandbyMode: z.boolean().optional(),
|
|
516
|
+
webServerSchema: z.record(z.string(), z.unknown()).optional(),
|
|
517
|
+
webServerMcpPath: z.string().optional(),
|
|
398
518
|
}));
|
|
399
519
|
export const Build = lazySchema(() => z.looseObject({
|
|
400
520
|
id: z.string(),
|
|
401
521
|
actId: z.string(),
|
|
402
522
|
userId: z.string(),
|
|
403
|
-
startedAt: z.date(),
|
|
404
|
-
finishedAt: z.date().nullable().optional(),
|
|
523
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
524
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
405
525
|
status: ActorJobStatus(),
|
|
406
|
-
meta:
|
|
526
|
+
meta: BuildMeta(),
|
|
407
527
|
stats: BuildStats().nullable().optional(),
|
|
408
528
|
options: BuildOptions().nullable().optional(),
|
|
409
529
|
usage: BuildUsage().nullable().optional(),
|
|
@@ -411,13 +531,22 @@ export const Build = lazySchema(() => z.looseObject({
|
|
|
411
531
|
usageUsd: BuildUsage().nullable().optional(),
|
|
412
532
|
inputSchema: z.string().nullable().optional(),
|
|
413
533
|
readme: z.string().nullable().optional(),
|
|
534
|
+
changelog: z.string().nullable().optional(),
|
|
535
|
+
exitCode: z.int().nullable().optional(),
|
|
536
|
+
gitCommitId: z.string().optional(),
|
|
537
|
+
gitBranchName: z.string().optional(),
|
|
538
|
+
createdByOrganizationMemberUserId: z.string().optional(),
|
|
414
539
|
buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/),
|
|
540
|
+
imageDigest: z.string().nullable().optional(),
|
|
415
541
|
actVersion: z.looseObject({
|
|
416
542
|
sourceType: VersionSourceType().optional(),
|
|
417
|
-
buildTag: z.string().optional(),
|
|
543
|
+
buildTag: z.string().nullable().optional(),
|
|
418
544
|
versionNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/).optional(),
|
|
419
545
|
gitRepoUrl: z.string().optional(),
|
|
420
546
|
sourceFiles: z.array(SourceCodeFile()).optional(),
|
|
547
|
+
gitHubGistUrl: z.string().optional(),
|
|
548
|
+
tarballUrl: z.string().optional(),
|
|
549
|
+
actorPath: z.string().nullable().optional(),
|
|
421
550
|
}).optional(),
|
|
422
551
|
actorDefinition: ActorDefinition().nullable().optional(),
|
|
423
552
|
}));
|
|
@@ -430,16 +559,24 @@ export const RunMeta = lazySchema(() => z.looseObject({
|
|
|
430
559
|
clientIp: z.string().nullable().optional(),
|
|
431
560
|
userAgent: z.string().nullable().optional(),
|
|
432
561
|
scheduleId: z.string().nullable().optional(),
|
|
433
|
-
scheduledAt: z.date().nullable().optional(),
|
|
562
|
+
scheduledAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
563
|
+
actorRunId: z.string().optional(),
|
|
564
|
+
webhookDispatchId: z.string().optional(),
|
|
565
|
+
scheduledAct2Id: z.string().optional(),
|
|
566
|
+
scheduledActorTaskId: z.string().optional(),
|
|
434
567
|
}));
|
|
435
|
-
|
|
568
|
+
/** Standby configuration of the run. Present only on Actor Standby runs. */
|
|
569
|
+
export const RunStandby = lazySchema(() => z.looseObject({
|
|
570
|
+
deployment: z.enum(["SINGLE_TENANT", "MULTI_TENANT_OWNER_PAID", "MULTI_TENANT_FREE_USERS", "MULTI_TENANT_PAYING_USERS"]).or(z.string()),
|
|
571
|
+
}));
|
|
572
|
+
export const RunListItem = lazySchema(() => z.looseObject({
|
|
436
573
|
id: z.string(),
|
|
437
574
|
actId: z.string(),
|
|
438
575
|
userId: z.string().optional(),
|
|
439
576
|
actorTaskId: z.string().nullable().optional(),
|
|
440
577
|
status: ActorJobStatus(),
|
|
441
|
-
startedAt: z.date(),
|
|
442
|
-
finishedAt: z.date().nullable().optional(),
|
|
578
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
579
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
443
580
|
buildId: z.string(),
|
|
444
581
|
buildNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])(\.[1-9][0-9]{0,4})$/).optional(),
|
|
445
582
|
buildNumberInt: z.int().optional(),
|
|
@@ -448,9 +585,10 @@ export const RunShort = lazySchema(() => z.looseObject({
|
|
|
448
585
|
defaultKeyValueStoreId: z.string(),
|
|
449
586
|
defaultDatasetId: z.string(),
|
|
450
587
|
defaultRequestQueueId: z.string(),
|
|
588
|
+
standby: RunStandby().nullable().optional(),
|
|
451
589
|
}));
|
|
452
590
|
export const ListOfRuns = lazySchema(() => PaginationResponse().extend({
|
|
453
|
-
items: z.array(
|
|
591
|
+
items: z.array(RunListItem()),
|
|
454
592
|
}));
|
|
455
593
|
export const ListOfRunsResponse = lazySchema(() => z.looseObject({
|
|
456
594
|
data: ListOfRuns(),
|
|
@@ -489,13 +627,26 @@ export const RunStats = lazySchema(() => z.looseObject({
|
|
|
489
627
|
metamorph: z.int().min(0).optional(),
|
|
490
628
|
computeUnits: z.number().min(0).optional(),
|
|
491
629
|
}));
|
|
630
|
+
/** Cost of a single pay-per-event event type charged during the run. */
|
|
631
|
+
export const RunEventUsage = lazySchema(() => z.looseObject({
|
|
632
|
+
eventTotalUsd: z.number(),
|
|
633
|
+
eventTitle: z.string(),
|
|
634
|
+
}));
|
|
635
|
+
/** Information about the third-party integration that created the resource. */
|
|
636
|
+
export const IntegrationTracking = lazySchema(() => z.looseObject({
|
|
637
|
+
platform: z.string().optional(),
|
|
638
|
+
appId: z.string().optional(),
|
|
639
|
+
isAiTool: z.boolean().optional(),
|
|
640
|
+
}));
|
|
492
641
|
export const RunOptions = lazySchema(() => z.looseObject({
|
|
493
642
|
build: z.string(),
|
|
494
643
|
timeoutSecs: z.int().min(0),
|
|
495
644
|
memoryMbytes: z.int().min(128).max(32768),
|
|
496
645
|
diskMbytes: z.int().min(0),
|
|
646
|
+
restartOnError: z.boolean().nullable().optional(),
|
|
497
647
|
maxItems: z.int().min(0).nullable().optional(),
|
|
498
648
|
maxTotalChargeUsd: z.number().min(0).nullable().optional(),
|
|
649
|
+
isMaxTotalChargeUsdSetByUser: z.boolean().optional(),
|
|
499
650
|
}));
|
|
500
651
|
/** Defines the general access level for the resource. */
|
|
501
652
|
export const GeneralAccess = lazySchema(() => z.enum(["ANYONE_WITH_ID_CAN_READ", "ANYONE_WITH_NAME_CAN_READ", "FOLLOW_USER_SETTING", "RESTRICTED"]).or(z.string()));
|
|
@@ -512,6 +663,7 @@ export const RunUsage = lazySchema(() => z.looseObject({
|
|
|
512
663
|
DATA_TRANSFER_EXTERNAL_GBYTES: z.number().nullable().optional(),
|
|
513
664
|
PROXY_RESIDENTIAL_TRANSFER_GBYTES: z.number().nullable().optional(),
|
|
514
665
|
PROXY_SERPS: z.int().nullable().optional(),
|
|
666
|
+
PROXY_UNBLOCKER_UNITS: z.number().nullable().optional(),
|
|
515
667
|
}));
|
|
516
668
|
/** Resource usage costs in USD. All values are monetary amounts in US dollars. */
|
|
517
669
|
export const RunUsageUsd = lazySchema(() => z.looseObject({
|
|
@@ -527,13 +679,15 @@ export const RunUsageUsd = lazySchema(() => z.looseObject({
|
|
|
527
679
|
DATA_TRANSFER_EXTERNAL_GBYTES: z.number().nullable().optional(),
|
|
528
680
|
PROXY_RESIDENTIAL_TRANSFER_GBYTES: z.number().nullable().optional(),
|
|
529
681
|
PROXY_SERPS: z.number().nullable().optional(),
|
|
682
|
+
PROXY_UNBLOCKER_UNITS: z.number().nullable().optional(),
|
|
530
683
|
}));
|
|
531
684
|
/** Information about a metamorph event that occurred during the run. */
|
|
532
|
-
export const
|
|
533
|
-
createdAt: z.date(),
|
|
685
|
+
export const RunMetamorphEvent = lazySchema(() => z.looseObject({
|
|
686
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
534
687
|
actorId: z.string(),
|
|
535
688
|
buildId: z.string(),
|
|
536
689
|
inputKey: z.string().nullable().optional(),
|
|
690
|
+
buildTags: z.array(z.string()).optional(),
|
|
537
691
|
}));
|
|
538
692
|
/** Represents an Actor run and its associated data. */
|
|
539
693
|
export const Run = lazySchema(() => z.looseObject({
|
|
@@ -541,8 +695,8 @@ export const Run = lazySchema(() => z.looseObject({
|
|
|
541
695
|
actId: z.string(),
|
|
542
696
|
userId: z.string(),
|
|
543
697
|
actorTaskId: z.string().nullable().optional(),
|
|
544
|
-
startedAt: z.date(),
|
|
545
|
-
finishedAt: z.date().nullable().optional(),
|
|
698
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
699
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
546
700
|
status: ActorJobStatus(),
|
|
547
701
|
statusMessage: z.string().nullable().optional(),
|
|
548
702
|
isStatusMessageTerminal: z.boolean().nullable().optional(),
|
|
@@ -550,6 +704,14 @@ export const Run = lazySchema(() => z.looseObject({
|
|
|
550
704
|
pricingInfo: ActorRunPricingInfo().optional(),
|
|
551
705
|
stats: RunStats(),
|
|
552
706
|
chargedEventCounts: z.record(z.string(), z.int()).optional(),
|
|
707
|
+
accountedChargedEventCounts: z.record(z.string(), z.int()).nullable().optional(),
|
|
708
|
+
eventUsage: z.record(z.string(), RunEventUsage()).optional(),
|
|
709
|
+
externalChargedTotalUsd: z.number().optional(),
|
|
710
|
+
standby: RunStandby().nullable().optional(),
|
|
711
|
+
integrationTracking: IntegrationTracking().optional(),
|
|
712
|
+
createdByOrganizationMemberUserId: z.string().optional(),
|
|
713
|
+
consoleUrl: z.url({ normalize: true }).optional(),
|
|
714
|
+
output: z.record(z.string(), z.url({ normalize: true })).optional(),
|
|
553
715
|
options: RunOptions(),
|
|
554
716
|
buildId: z.string(),
|
|
555
717
|
exitCode: z.int().nullable().optional(),
|
|
@@ -575,7 +737,7 @@ export const Run = lazySchema(() => z.looseObject({
|
|
|
575
737
|
usage: RunUsage().nullable().optional(),
|
|
576
738
|
usageTotalUsd: z.number().nullable().optional(),
|
|
577
739
|
usageUsd: RunUsageUsd().nullable().optional(),
|
|
578
|
-
metamorphs: z.array(
|
|
740
|
+
metamorphs: z.array(RunMetamorphEvent()).nullable().optional(),
|
|
579
741
|
platformUsageBillingModel: z.string().optional(),
|
|
580
742
|
}));
|
|
581
743
|
export const RunResponse = lazySchema(() => z.looseObject({
|
|
@@ -587,13 +749,14 @@ export const DatasetStats = lazySchema(() => z.looseObject({
|
|
|
587
749
|
storageBytes: z.int().optional(),
|
|
588
750
|
inflatedBytes: z.int().optional(),
|
|
589
751
|
}));
|
|
590
|
-
export const
|
|
752
|
+
export const DatasetResource = lazySchema(() => z.looseObject({
|
|
591
753
|
id: z.string(),
|
|
592
754
|
name: z.string().nullable().optional(),
|
|
755
|
+
title: z.string().nullable().optional(),
|
|
593
756
|
userId: z.string(),
|
|
594
|
-
createdAt: z.date(),
|
|
595
|
-
modifiedAt: z.date(),
|
|
596
|
-
accessedAt: z.date(),
|
|
757
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
758
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
759
|
+
accessedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
597
760
|
itemCount: z.int().min(0),
|
|
598
761
|
cleanItemCount: z.int().min(0),
|
|
599
762
|
actId: z.string().nullable().optional(),
|
|
@@ -608,7 +771,7 @@ export const Dataset = lazySchema(() => z.looseObject({
|
|
|
608
771
|
}));
|
|
609
772
|
/** Response containing dataset metadata. */
|
|
610
773
|
export const DatasetResponse = lazySchema(() => z.looseObject({
|
|
611
|
-
data:
|
|
774
|
+
data: DatasetResource(),
|
|
612
775
|
}));
|
|
613
776
|
export const UpdateDatasetRequest = lazySchema(() => z.looseObject({
|
|
614
777
|
name: z.string().nullable().optional(),
|
|
@@ -619,26 +782,26 @@ export const UpdateDatasetRequest = lazySchema(() => z.looseObject({
|
|
|
619
782
|
* object or an array of objects. Each object represents one dataset item.
|
|
620
783
|
*/
|
|
621
784
|
export const PutItemsRequest = lazySchema(() => z.record(z.string(), z.unknown()));
|
|
622
|
-
export const
|
|
785
|
+
export const DatasetItemValidationError = lazySchema(() => z.looseObject({
|
|
623
786
|
instancePath: z.string().optional(),
|
|
624
787
|
schemaPath: z.string().optional(),
|
|
625
788
|
keyword: z.string().optional(),
|
|
626
789
|
message: z.string().optional(),
|
|
627
790
|
params: z.record(z.string(), z.unknown()).optional(),
|
|
628
791
|
}));
|
|
629
|
-
export const
|
|
792
|
+
export const InvalidDatasetItem = lazySchema(() => z.looseObject({
|
|
630
793
|
itemPosition: z.int().optional(),
|
|
631
|
-
validationErrors: z.array(
|
|
794
|
+
validationErrors: z.array(DatasetItemValidationError()).optional(),
|
|
632
795
|
}));
|
|
633
|
-
export const
|
|
634
|
-
invalidItems: z.array(
|
|
796
|
+
export const DatasetSchemaValidationErrorData = lazySchema(() => z.looseObject({
|
|
797
|
+
invalidItems: z.array(InvalidDatasetItem()),
|
|
635
798
|
}));
|
|
636
799
|
export const DatasetSchemaValidationError = lazySchema(() => z.looseObject({
|
|
637
800
|
type: z.string().optional(),
|
|
638
801
|
message: z.string().optional(),
|
|
639
|
-
data:
|
|
802
|
+
data: DatasetSchemaValidationErrorData().optional(),
|
|
640
803
|
}));
|
|
641
|
-
export const
|
|
804
|
+
export const PutItemsErrorResponse = lazySchema(() => z.looseObject({
|
|
642
805
|
error: DatasetSchemaValidationError(),
|
|
643
806
|
}));
|
|
644
807
|
export const DatasetFieldStatistics = lazySchema(() => z.looseObject({
|
|
@@ -661,14 +824,15 @@ export const KeyValueStoreStats = lazySchema(() => z.looseObject({
|
|
|
661
824
|
s3StorageBytes: z.int().optional(),
|
|
662
825
|
storageBytes: z.int().optional(),
|
|
663
826
|
}));
|
|
664
|
-
export const
|
|
827
|
+
export const KeyValueStoreResource = lazySchema(() => z.looseObject({
|
|
665
828
|
id: z.string(),
|
|
666
829
|
name: z.string().nullable().optional(),
|
|
830
|
+
title: z.string().nullable().optional(),
|
|
667
831
|
userId: z.string().nullable().optional(),
|
|
668
832
|
username: z.string().nullable().optional(),
|
|
669
|
-
createdAt: z.date(),
|
|
670
|
-
modifiedAt: z.date(),
|
|
671
|
-
accessedAt: z.date(),
|
|
833
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
834
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
835
|
+
accessedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
672
836
|
actId: z.string().nullable().optional(),
|
|
673
837
|
actRunId: z.string().nullable().optional(),
|
|
674
838
|
consoleUrl: z.url({ normalize: true }).optional(),
|
|
@@ -681,9 +845,9 @@ export const KeyValueStore = lazySchema(() => z.looseObject({
|
|
|
681
845
|
}));
|
|
682
846
|
/** Response containing key-value store data. */
|
|
683
847
|
export const KeyValueStoreResponse = lazySchema(() => z.looseObject({
|
|
684
|
-
data:
|
|
848
|
+
data: KeyValueStoreResource(),
|
|
685
849
|
}));
|
|
686
|
-
export const
|
|
850
|
+
export const UpdateKeyValueStoreRequest = lazySchema(() => z.looseObject({
|
|
687
851
|
name: z.string().nullable().optional(),
|
|
688
852
|
generalAccess: GeneralAccess().optional(),
|
|
689
853
|
}));
|
|
@@ -718,11 +882,11 @@ export const QueueId = lazySchema(() => z.string());
|
|
|
718
882
|
/** The ID of the user who owns the request queue. */
|
|
719
883
|
export const QueueUserId = lazySchema(() => z.string());
|
|
720
884
|
/** The timestamp when the request queue was created. */
|
|
721
|
-
export const QueueCreatedAt = lazySchema(() => z.date());
|
|
885
|
+
export const QueueCreatedAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
|
|
722
886
|
/** 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());
|
|
887
|
+
export const QueueModifiedAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
|
|
724
888
|
/** The timestamp when the request queue was last accessed. */
|
|
725
|
-
export const QueueAccessedAt = lazySchema(() => z.date());
|
|
889
|
+
export const QueueAccessedAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
|
|
726
890
|
/** The total number of requests in the request queue. */
|
|
727
891
|
export const TotalRequestCount = lazySchema(() => z.int().min(0));
|
|
728
892
|
/** The number of requests that have been handled. */
|
|
@@ -740,9 +904,10 @@ export const RequestQueueStats = lazySchema(() => z.looseObject({
|
|
|
740
904
|
writeCount: z.int().optional(),
|
|
741
905
|
}));
|
|
742
906
|
/** A request queue object containing metadata and statistics. */
|
|
743
|
-
export const
|
|
907
|
+
export const RequestQueueResource = lazySchema(() => z.looseObject({
|
|
744
908
|
id: QueueId(),
|
|
745
909
|
name: z.string().nullable().optional(),
|
|
910
|
+
title: z.string().nullable().optional(),
|
|
746
911
|
userId: QueueUserId(),
|
|
747
912
|
actId: z.string().nullable().optional(),
|
|
748
913
|
actRunId: z.string().nullable().optional(),
|
|
@@ -759,7 +924,7 @@ export const RequestQueue = lazySchema(() => z.looseObject({
|
|
|
759
924
|
}));
|
|
760
925
|
/** Response containing request queue data. */
|
|
761
926
|
export const RequestQueueResponse = lazySchema(() => z.looseObject({
|
|
762
|
-
data:
|
|
927
|
+
data: RequestQueueResource(),
|
|
763
928
|
}));
|
|
764
929
|
/** Request object for updating a request queue. */
|
|
765
930
|
export const UpdateRequestQueueRequest = lazySchema(() => z.looseObject({
|
|
@@ -771,6 +936,8 @@ export const UniqueKey = lazySchema(() => z.string());
|
|
|
771
936
|
/** The URL of the request. */
|
|
772
937
|
export const RequestUrl = lazySchema(() => z.string());
|
|
773
938
|
export const HttpMethod = lazySchema(() => z.enum(["GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]).or(z.string()));
|
|
939
|
+
/** The HTTP method of the request. */
|
|
940
|
+
export const RequestMethod = lazySchema(() => HttpMethod());
|
|
774
941
|
/** The number of times this request has been retried. */
|
|
775
942
|
export const RetryCount = lazySchema(() => z.int());
|
|
776
943
|
/** Custom user data attached to the request. Can contain arbitrary fields. */
|
|
@@ -778,7 +945,7 @@ export const RequestUserData = lazySchema(() => z.record(z.string(), z.unknown()
|
|
|
778
945
|
export const RequestBase = lazySchema(() => z.looseObject({
|
|
779
946
|
uniqueKey: UniqueKey(),
|
|
780
947
|
url: RequestUrl(),
|
|
781
|
-
method:
|
|
948
|
+
method: RequestMethod().optional(),
|
|
782
949
|
retryCount: RetryCount().optional(),
|
|
783
950
|
loadedUrl: z.string().nullable().optional(),
|
|
784
951
|
payload: z.union([z.string(), z.record(z.string(), z.unknown())]).nullable().optional(),
|
|
@@ -786,17 +953,21 @@ export const RequestBase = lazySchema(() => z.looseObject({
|
|
|
786
953
|
userData: RequestUserData().optional(),
|
|
787
954
|
noRetry: z.boolean().nullable().optional(),
|
|
788
955
|
errorMessages: z.array(z.string()).nullable().optional(),
|
|
789
|
-
handledAt: z.date().nullable().optional(),
|
|
956
|
+
handledAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
790
957
|
}));
|
|
791
958
|
/** A unique identifier assigned to the request. */
|
|
792
959
|
export const RequestId = lazySchema(() => z.string());
|
|
960
|
+
/** The timestamp when the lock on this request expires. */
|
|
961
|
+
export const LockExpiresAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
|
|
793
962
|
/** A request stored in the request queue, including its metadata and processing state. */
|
|
794
|
-
export const
|
|
963
|
+
export const RequestResource = lazySchema(() => RequestBase().extend({
|
|
795
964
|
id: RequestId().optional(),
|
|
965
|
+
lockExpiresAt: LockExpiresAt().optional(),
|
|
966
|
+
lockByClient: z.string().optional(),
|
|
796
967
|
}).required({ id: true }));
|
|
797
968
|
/** A paginated list of requests from the request queue. */
|
|
798
969
|
export const ListOfRequests = lazySchema(() => z.looseObject({
|
|
799
|
-
items: z.array(
|
|
970
|
+
items: z.array(RequestResource()),
|
|
800
971
|
limit: z.int(),
|
|
801
972
|
exclusiveStartId: z.string().optional(),
|
|
802
973
|
cursor: z.string().optional(),
|
|
@@ -830,33 +1001,33 @@ export const AddedRequest = lazySchema(() => z.looseObject({
|
|
|
830
1001
|
wasAlreadyHandled: WasAlreadyHandled(),
|
|
831
1002
|
}));
|
|
832
1003
|
/** A request that failed to be processed during a request queue operation and can be retried. */
|
|
833
|
-
export const
|
|
1004
|
+
export const UnprocessedRequest = lazySchema(() => z.looseObject({
|
|
834
1005
|
id: RequestId().optional(),
|
|
835
1006
|
uniqueKey: UniqueKey(),
|
|
836
1007
|
url: RequestUrl(),
|
|
837
|
-
method:
|
|
1008
|
+
method: RequestMethod().optional(),
|
|
838
1009
|
}));
|
|
839
1010
|
/** Result of a batch add operation containing successfully processed and failed requests. */
|
|
840
1011
|
export const BatchAddResult = lazySchema(() => z.looseObject({
|
|
841
1012
|
processedRequests: z.array(AddedRequest()),
|
|
842
|
-
unprocessedRequests: z.array(
|
|
1013
|
+
unprocessedRequests: z.array(UnprocessedRequest()),
|
|
843
1014
|
}));
|
|
844
1015
|
/** Response containing the result of a batch add operation. */
|
|
845
1016
|
export const BatchAddResponse = lazySchema(() => z.looseObject({
|
|
846
1017
|
data: BatchAddResult(),
|
|
847
1018
|
}));
|
|
848
1019
|
/** A request that should be deleted, identified by its ID. */
|
|
849
|
-
export const
|
|
1020
|
+
export const RequestToDeleteById = lazySchema(() => z.looseObject({
|
|
850
1021
|
id: RequestId(),
|
|
851
1022
|
uniqueKey: UniqueKey().optional(),
|
|
852
1023
|
}));
|
|
853
1024
|
/** A request that should be deleted, identified by its unique key. */
|
|
854
|
-
export const
|
|
1025
|
+
export const RequestToDeleteByUniqueKey = lazySchema(() => z.looseObject({
|
|
855
1026
|
id: RequestId().optional(),
|
|
856
1027
|
uniqueKey: UniqueKey(),
|
|
857
1028
|
}));
|
|
858
1029
|
/** A request that should be deleted. */
|
|
859
|
-
export const
|
|
1030
|
+
export const RequestToDelete = lazySchema(() => z.union([RequestToDeleteById(), RequestToDeleteByUniqueKey()]));
|
|
860
1031
|
/** Confirmation of a request that was successfully deleted, identified by its ID. */
|
|
861
1032
|
export const DeletedRequestById = lazySchema(() => z.looseObject({
|
|
862
1033
|
uniqueKey: UniqueKey().optional(),
|
|
@@ -872,7 +1043,7 @@ export const DeletedRequest = lazySchema(() => z.union([DeletedRequestById(), De
|
|
|
872
1043
|
/** Result of a batch delete operation containing successfully deleted and failed requests. */
|
|
873
1044
|
export const BatchDeleteResult = lazySchema(() => z.looseObject({
|
|
874
1045
|
processedRequests: z.array(DeletedRequest()),
|
|
875
|
-
unprocessedRequests: z.array(
|
|
1046
|
+
unprocessedRequests: z.array(UnprocessedRequest()),
|
|
876
1047
|
}));
|
|
877
1048
|
/** Response containing the result of a batch delete operation. */
|
|
878
1049
|
export const BatchDeleteResponse = lazySchema(() => z.looseObject({
|
|
@@ -888,14 +1059,12 @@ export const UnlockRequestsResponse = lazySchema(() => z.looseObject({
|
|
|
888
1059
|
}));
|
|
889
1060
|
/** Response containing a single request from the request queue. */
|
|
890
1061
|
export const RequestResponse = lazySchema(() => z.looseObject({
|
|
891
|
-
data:
|
|
1062
|
+
data: RequestResource(),
|
|
892
1063
|
}));
|
|
893
1064
|
/** Response containing the result of updating a request in the request queue. */
|
|
894
1065
|
export const UpdateRequestResponse = lazySchema(() => z.looseObject({
|
|
895
1066
|
data: RequestRegistration(),
|
|
896
1067
|
}));
|
|
897
|
-
/** The timestamp when the lock on this request expires. */
|
|
898
|
-
export const LockExpiresAt = lazySchema(() => z.date());
|
|
899
1068
|
/** Information about a request lock. */
|
|
900
1069
|
export const RequestLockInfo = lazySchema(() => z.looseObject({
|
|
901
1070
|
lockExpiresAt: LockExpiresAt(),
|
|
@@ -907,11 +1076,11 @@ export const ProlongRequestLockResponse = lazySchema(() => z.looseObject({
|
|
|
907
1076
|
/** The maximum number of requests returned. */
|
|
908
1077
|
export const HeadLimit = lazySchema(() => z.int());
|
|
909
1078
|
/** A request from the request queue head without lock information. */
|
|
910
|
-
export const
|
|
1079
|
+
export const RequestQueueHeadItem = lazySchema(() => z.looseObject({
|
|
911
1080
|
id: RequestId(),
|
|
912
1081
|
uniqueKey: UniqueKey(),
|
|
913
1082
|
url: RequestUrl(),
|
|
914
|
-
method:
|
|
1083
|
+
method: RequestMethod().optional(),
|
|
915
1084
|
retryCount: RetryCount().optional(),
|
|
916
1085
|
}));
|
|
917
1086
|
/** A batch of requests from the request queue head without locking. */
|
|
@@ -919,18 +1088,18 @@ export const RequestQueueHead = lazySchema(() => z.looseObject({
|
|
|
919
1088
|
limit: HeadLimit(),
|
|
920
1089
|
queueModifiedAt: QueueModifiedAt(),
|
|
921
1090
|
hadMultipleClients: HadMultipleClients(),
|
|
922
|
-
items: z.array(
|
|
1091
|
+
items: z.array(RequestQueueHeadItem()),
|
|
923
1092
|
}));
|
|
924
1093
|
/** Response containing requests from the request queue head without locking. */
|
|
925
|
-
export const
|
|
1094
|
+
export const RequestQueueHeadResponse = lazySchema(() => z.looseObject({
|
|
926
1095
|
data: RequestQueueHead(),
|
|
927
1096
|
}));
|
|
928
1097
|
/** A request from the request queue head that has been locked for processing. */
|
|
929
|
-
export const
|
|
1098
|
+
export const LockedRequestQueueHeadItem = lazySchema(() => z.looseObject({
|
|
930
1099
|
id: RequestId(),
|
|
931
1100
|
uniqueKey: UniqueKey(),
|
|
932
1101
|
url: RequestUrl(),
|
|
933
|
-
method:
|
|
1102
|
+
method: RequestMethod().optional(),
|
|
934
1103
|
retryCount: RetryCount().optional(),
|
|
935
1104
|
lockExpiresAt: LockExpiresAt(),
|
|
936
1105
|
}));
|
|
@@ -942,29 +1111,32 @@ export const LockedRequestQueueHead = lazySchema(() => z.looseObject({
|
|
|
942
1111
|
clientKey: z.string().optional(),
|
|
943
1112
|
hadMultipleClients: HadMultipleClients(),
|
|
944
1113
|
lockSecs: z.int(),
|
|
945
|
-
items: z.array(
|
|
1114
|
+
items: z.array(LockedRequestQueueHeadItem()),
|
|
946
1115
|
}));
|
|
947
1116
|
/** Response containing locked requests from the request queue head. */
|
|
948
|
-
export const
|
|
1117
|
+
export const LockedRequestQueueHeadResponse = lazySchema(() => z.looseObject({
|
|
949
1118
|
data: LockedRequestQueueHead(),
|
|
950
1119
|
}));
|
|
951
1120
|
export const TaskStats = lazySchema(() => z.looseObject({
|
|
952
1121
|
totalRuns: z.int().optional(),
|
|
1122
|
+
lastRunStartedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
953
1123
|
}));
|
|
954
|
-
export const
|
|
1124
|
+
export const TaskListItem = lazySchema(() => z.looseObject({
|
|
955
1125
|
id: z.string(),
|
|
956
1126
|
userId: z.string(),
|
|
957
1127
|
actId: z.string(),
|
|
958
1128
|
actName: z.string().nullable().optional(),
|
|
959
1129
|
name: z.string(),
|
|
1130
|
+
title: z.string().nullable().optional(),
|
|
960
1131
|
username: z.string().nullable().optional(),
|
|
961
1132
|
actUsername: z.string().nullable().optional(),
|
|
962
|
-
createdAt: z.date(),
|
|
963
|
-
modifiedAt: z.date(),
|
|
1133
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1134
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
964
1135
|
stats: TaskStats().nullable().optional(),
|
|
1136
|
+
isPublic: z.boolean().optional(),
|
|
965
1137
|
}));
|
|
966
1138
|
export const ListOfTasks = lazySchema(() => PaginationResponse().extend({
|
|
967
|
-
items: z.array(
|
|
1139
|
+
items: z.array(TaskListItem()),
|
|
968
1140
|
}));
|
|
969
1141
|
export const ListOfTasksResponse = lazySchema(() => z.looseObject({
|
|
970
1142
|
data: ListOfTasks(),
|
|
@@ -976,6 +1148,8 @@ export const TaskOptions = lazySchema(() => z.looseObject({
|
|
|
976
1148
|
maxItems: z.int().nullable().optional(),
|
|
977
1149
|
maxTotalChargeUsd: z.number().nullable().optional(),
|
|
978
1150
|
restartOnError: z.boolean().nullable().optional(),
|
|
1151
|
+
isMaxTotalChargeUsdSetByUser: z.boolean().nullable().optional(),
|
|
1152
|
+
forcePermissionLevel: ActorPermissionLevel().nullable().optional(),
|
|
979
1153
|
}));
|
|
980
1154
|
/**
|
|
981
1155
|
* The input configuration for the Actor task. This is a user-defined JSON object
|
|
@@ -988,12 +1162,18 @@ export const TaskInput = lazySchema(() => z.record(z.string(), z.unknown()));
|
|
|
988
1162
|
* `publishedAt` is set and unpublished when it is `null`.
|
|
989
1163
|
*/
|
|
990
1164
|
export const TaskPublicConfig = lazySchema(() => z.looseObject({
|
|
991
|
-
publishedAt: z.date().nullable().optional(),
|
|
1165
|
+
publishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
992
1166
|
seoTitle: z.string().max(60).nullable().optional(),
|
|
993
1167
|
seoDescription: z.string().max(160).nullable().optional(),
|
|
994
1168
|
inputSchemaFields: z.array(z.string()).nullable().optional(),
|
|
995
1169
|
datasetName: z.string().nullable().optional(),
|
|
996
1170
|
datasetView: z.string().nullable().optional(),
|
|
1171
|
+
categorization: z.string().nullable().optional(),
|
|
1172
|
+
highlightedFields: z.array(z.string()).nullable().optional(),
|
|
1173
|
+
faq: z.array(z.looseObject({
|
|
1174
|
+
question: z.string(),
|
|
1175
|
+
answer: z.string(),
|
|
1176
|
+
})).nullable().optional(),
|
|
997
1177
|
}));
|
|
998
1178
|
export const CreateTaskRequest = lazySchema(() => z.looseObject({
|
|
999
1179
|
actId: z.string(),
|
|
@@ -1001,6 +1181,7 @@ export const CreateTaskRequest = lazySchema(() => z.looseObject({
|
|
|
1001
1181
|
options: TaskOptions().nullable().optional(),
|
|
1002
1182
|
input: z.union([TaskInput(), z.array(TaskInput())]).nullable().optional(),
|
|
1003
1183
|
title: z.string().nullable().optional(),
|
|
1184
|
+
description: z.string().nullable().optional(),
|
|
1004
1185
|
actorStandby: ActorStandby().nullable().optional(),
|
|
1005
1186
|
publicConfig: TaskPublicConfig().optional(),
|
|
1006
1187
|
}));
|
|
@@ -1009,14 +1190,16 @@ export const Task = lazySchema(() => z.looseObject({
|
|
|
1009
1190
|
userId: z.string(),
|
|
1010
1191
|
actId: z.string(),
|
|
1011
1192
|
name: z.string(),
|
|
1193
|
+
nameLowerCase: z.string().optional(),
|
|
1012
1194
|
username: z.string().nullable().optional(),
|
|
1013
|
-
createdAt: z.date(),
|
|
1014
|
-
modifiedAt: z.date(),
|
|
1015
|
-
removedAt: z.date().nullable().optional(),
|
|
1195
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1196
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1197
|
+
removedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1016
1198
|
stats: TaskStats().nullable().optional(),
|
|
1017
1199
|
options: TaskOptions().nullable().optional(),
|
|
1018
1200
|
input: z.union([TaskInput(), z.array(TaskInput())]).nullable().optional(),
|
|
1019
1201
|
title: z.string().nullable().optional(),
|
|
1202
|
+
description: z.string().nullable().optional(),
|
|
1020
1203
|
actorStandby: ActorStandby().nullable().optional(),
|
|
1021
1204
|
standbyUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1022
1205
|
isPublic: z.boolean().optional(),
|
|
@@ -1031,28 +1214,11 @@ export const UpdateTaskRequest = lazySchema(() => z.looseObject({
|
|
|
1031
1214
|
options: TaskOptions().nullable().optional(),
|
|
1032
1215
|
input: z.union([TaskInput(), z.array(TaskInput())]).nullable().optional(),
|
|
1033
1216
|
title: z.string().nullable().optional(),
|
|
1217
|
+
description: z.string().nullable().optional(),
|
|
1034
1218
|
actorStandby: ActorStandby().nullable().optional(),
|
|
1035
1219
|
publicConfig: TaskPublicConfig().optional(),
|
|
1036
1220
|
isPublic: z.boolean().optional(),
|
|
1037
1221
|
}));
|
|
1038
|
-
export const Webhook = lazySchema(() => z.looseObject({
|
|
1039
|
-
id: z.string(),
|
|
1040
|
-
createdAt: z.date(),
|
|
1041
|
-
modifiedAt: z.date(),
|
|
1042
|
-
userId: z.string(),
|
|
1043
|
-
isAdHoc: z.boolean().nullable().optional(),
|
|
1044
|
-
shouldInterpolateStrings: z.boolean().nullable().optional(),
|
|
1045
|
-
eventTypes: z.array(WebhookEventType()),
|
|
1046
|
-
condition: WebhookCondition(),
|
|
1047
|
-
ignoreSslErrors: z.boolean(),
|
|
1048
|
-
doNotRetry: z.boolean().nullable().optional(),
|
|
1049
|
-
requestUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1050
|
-
payloadTemplate: z.string().nullable().optional(),
|
|
1051
|
-
headersTemplate: z.string().nullable().optional(),
|
|
1052
|
-
description: z.string().nullable().optional(),
|
|
1053
|
-
lastDispatch: ExampleWebhookDispatch().nullable().optional(),
|
|
1054
|
-
stats: WebhookStats().nullable().optional(),
|
|
1055
|
-
}));
|
|
1056
1222
|
export const UpdateRunRequest = lazySchema(() => z.looseObject({
|
|
1057
1223
|
runId: z.string().optional(),
|
|
1058
1224
|
statusMessage: z.string().optional(),
|
|
@@ -1062,22 +1228,66 @@ export const UpdateRunRequest = lazySchema(() => z.looseObject({
|
|
|
1062
1228
|
export const ChargeRunRequest = lazySchema(() => z.looseObject({
|
|
1063
1229
|
eventName: z.string(),
|
|
1064
1230
|
count: z.int(),
|
|
1231
|
+
requestId: z.string().optional(),
|
|
1232
|
+
}));
|
|
1233
|
+
/** An account a user connected through an Actor OAuth connection. */
|
|
1234
|
+
export const ActorOAuthAccount = lazySchema(() => z.looseObject({
|
|
1235
|
+
_id: z.string(),
|
|
1236
|
+
userId: z.string(),
|
|
1237
|
+
connectionId: z.string(),
|
|
1238
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1239
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1240
|
+
authorizedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1241
|
+
description: z.string().nullable().optional(),
|
|
1242
|
+
data: z.record(z.string(), z.unknown()),
|
|
1243
|
+
}));
|
|
1244
|
+
export const ListOfActorOAuthAccounts = lazySchema(() => z.looseObject({
|
|
1245
|
+
total: z.int(),
|
|
1246
|
+
items: z.array(ActorOAuthAccount()),
|
|
1247
|
+
}));
|
|
1248
|
+
export const ListOfActorOAuthAccountsResponse = lazySchema(() => z.looseObject({
|
|
1249
|
+
data: ListOfActorOAuthAccounts(),
|
|
1250
|
+
}));
|
|
1251
|
+
export const ActorOAuthAccountResponse = lazySchema(() => z.looseObject({
|
|
1252
|
+
data: ActorOAuthAccount(),
|
|
1065
1253
|
}));
|
|
1066
1254
|
export const StorageOwnership = lazySchema(() => z.enum(["ownedByMe", "sharedWithMe"]).or(z.string()));
|
|
1255
|
+
export const KeyValueStoreListStats = lazySchema(() => z.looseObject({
|
|
1256
|
+
readCount: z.int().optional(),
|
|
1257
|
+
writeCount: z.int().optional(),
|
|
1258
|
+
deleteCount: z.int().optional(),
|
|
1259
|
+
listCount: z.int().optional(),
|
|
1260
|
+
s3StorageBytes: z.int().optional(),
|
|
1261
|
+
}));
|
|
1262
|
+
export const KeyValueStoreListItem = lazySchema(() => z.looseObject({
|
|
1263
|
+
id: z.string(),
|
|
1264
|
+
name: z.string().nullable().optional(),
|
|
1265
|
+
title: z.string().nullable().optional(),
|
|
1266
|
+
userId: z.string().nullable().optional(),
|
|
1267
|
+
username: z.string().nullable().optional(),
|
|
1268
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1269
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1270
|
+
accessedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1271
|
+
actId: z.string().nullable().optional(),
|
|
1272
|
+
actRunId: z.string().nullable().optional(),
|
|
1273
|
+
schema: z.union([z.record(z.string(), z.unknown()), z.string()]).nullable().optional(),
|
|
1274
|
+
generalAccess: GeneralAccess().nullable().optional(),
|
|
1275
|
+
stats: KeyValueStoreListStats().optional(),
|
|
1276
|
+
}));
|
|
1067
1277
|
export const ListOfKeyValueStores = lazySchema(() => PaginationResponse().extend({
|
|
1068
1278
|
unnamed: z.boolean().optional(),
|
|
1069
|
-
items: z.array(
|
|
1279
|
+
items: z.array(KeyValueStoreListItem()),
|
|
1070
1280
|
}));
|
|
1071
1281
|
export const ListOfKeyValueStoresResponse = lazySchema(() => z.looseObject({
|
|
1072
1282
|
data: ListOfKeyValueStores(),
|
|
1073
1283
|
}));
|
|
1074
1284
|
export const DatasetListItem = lazySchema(() => z.looseObject({
|
|
1075
1285
|
id: z.string(),
|
|
1076
|
-
name: z.string(),
|
|
1286
|
+
name: z.string().nullable().optional(),
|
|
1077
1287
|
userId: z.string(),
|
|
1078
|
-
createdAt: z.date(),
|
|
1079
|
-
modifiedAt: z.date(),
|
|
1080
|
-
accessedAt: z.date(),
|
|
1288
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1289
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1290
|
+
accessedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1081
1291
|
itemCount: z.int(),
|
|
1082
1292
|
cleanItemCount: z.int(),
|
|
1083
1293
|
actId: z.string().nullable().optional(),
|
|
@@ -1094,16 +1304,26 @@ export const ListOfDatasets = lazySchema(() => PaginationResponse().extend({
|
|
|
1094
1304
|
export const ListOfDatasetsResponse = lazySchema(() => z.looseObject({
|
|
1095
1305
|
data: ListOfDatasets(),
|
|
1096
1306
|
}));
|
|
1307
|
+
/** Statistics about request queue operations and storage, as returned in request queue lists. */
|
|
1308
|
+
export const RequestQueueListStats = lazySchema(() => z.looseObject({
|
|
1309
|
+
deleteCount: z.int().optional(),
|
|
1310
|
+
headItemReadCount: z.int().optional(),
|
|
1311
|
+
readCount: z.int().optional(),
|
|
1312
|
+
writeCount: z.int().optional(),
|
|
1313
|
+
s3StorageBytes: z.int().optional(),
|
|
1314
|
+
dynamodbStorageBytes: z.int().optional(),
|
|
1315
|
+
}));
|
|
1097
1316
|
/** A shortened request queue object for list responses. */
|
|
1098
|
-
export const
|
|
1317
|
+
export const RequestQueueListItem = lazySchema(() => z.looseObject({
|
|
1099
1318
|
id: QueueId(),
|
|
1100
|
-
name: z.string(),
|
|
1319
|
+
name: z.string().nullable().optional(),
|
|
1320
|
+
title: z.string().nullable().optional(),
|
|
1101
1321
|
userId: QueueUserId(),
|
|
1102
|
-
username: z.string(),
|
|
1322
|
+
username: z.string().optional(),
|
|
1103
1323
|
createdAt: QueueCreatedAt(),
|
|
1104
1324
|
modifiedAt: QueueModifiedAt(),
|
|
1105
1325
|
accessedAt: QueueAccessedAt(),
|
|
1106
|
-
expireAt: z.date().optional(),
|
|
1326
|
+
expireAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
1107
1327
|
totalRequestCount: TotalRequestCount(),
|
|
1108
1328
|
handledRequestCount: HandledRequestCount(),
|
|
1109
1329
|
pendingRequestCount: PendingRequestCount(),
|
|
@@ -1111,18 +1331,49 @@ export const RequestQueueShort = lazySchema(() => z.looseObject({
|
|
|
1111
1331
|
actRunId: z.string().nullable().optional(),
|
|
1112
1332
|
hadMultipleClients: HadMultipleClients(),
|
|
1113
1333
|
generalAccess: GeneralAccess().nullable().optional(),
|
|
1114
|
-
stats:
|
|
1334
|
+
stats: RequestQueueListStats().optional(),
|
|
1115
1335
|
}));
|
|
1116
1336
|
/** A paginated list of request queues. */
|
|
1117
1337
|
export const ListOfRequestQueues = lazySchema(() => PaginationResponse().extend({
|
|
1118
1338
|
unnamed: z.boolean().optional(),
|
|
1119
|
-
items: z.array(
|
|
1339
|
+
items: z.array(RequestQueueListItem()),
|
|
1120
1340
|
}));
|
|
1121
1341
|
/** Response containing a list of request queues. */
|
|
1122
1342
|
export const ListOfRequestQueuesResponse = lazySchema(() => z.looseObject({
|
|
1123
1343
|
data: ListOfRequestQueues(),
|
|
1124
1344
|
}));
|
|
1125
|
-
export const
|
|
1345
|
+
export const WebhookListItem = lazySchema(() => z.looseObject({
|
|
1346
|
+
id: z.string(),
|
|
1347
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1348
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1349
|
+
userId: z.string(),
|
|
1350
|
+
isAdHoc: z.boolean().nullable().optional(),
|
|
1351
|
+
isApifyIntegration: z.boolean().optional(),
|
|
1352
|
+
isEnabled: z.boolean().optional(),
|
|
1353
|
+
actionType: z.string().optional(),
|
|
1354
|
+
shouldInterpolateStrings: z.boolean().nullable().optional(),
|
|
1355
|
+
eventTypes: z.array(WebhookEventType()),
|
|
1356
|
+
condition: WebhookCondition(),
|
|
1357
|
+
ignoreSslErrors: z.boolean(),
|
|
1358
|
+
doNotRetry: z.boolean(),
|
|
1359
|
+
requestUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1360
|
+
headersTemplate: z.string().nullable().optional(),
|
|
1361
|
+
title: z.string().nullable().optional(),
|
|
1362
|
+
description: z.string().nullable().optional(),
|
|
1363
|
+
slackMessage: WebhookSlackMessage().optional(),
|
|
1364
|
+
googleMail: WebhookGoogleMail().optional(),
|
|
1365
|
+
googleDrive: WebhookGoogleDrive().optional(),
|
|
1366
|
+
githubIssue: WebhookGithubIssue().optional(),
|
|
1367
|
+
lastDispatch: WebhookLastDispatch().nullable().optional(),
|
|
1368
|
+
stats: WebhookStats().nullable().optional(),
|
|
1369
|
+
}));
|
|
1370
|
+
export const ListOfWebhooks = lazySchema(() => PaginationResponse().extend({
|
|
1371
|
+
items: z.array(WebhookListItem()),
|
|
1372
|
+
}));
|
|
1373
|
+
export const ListOfWebhooksResponse = lazySchema(() => z.looseObject({
|
|
1374
|
+
data: ListOfWebhooks(),
|
|
1375
|
+
}));
|
|
1376
|
+
export const CreateWebhookRequest = lazySchema(() => z.looseObject({
|
|
1126
1377
|
isAdHoc: z.boolean().nullable().optional(),
|
|
1127
1378
|
eventTypes: z.array(WebhookEventType()),
|
|
1128
1379
|
condition: WebhookCondition(),
|
|
@@ -1137,9 +1388,9 @@ export const WebhookCreate = lazySchema(() => z.looseObject({
|
|
|
1137
1388
|
}));
|
|
1138
1389
|
/** Response containing webhook data. */
|
|
1139
1390
|
export const WebhookResponse = lazySchema(() => z.looseObject({
|
|
1140
|
-
data:
|
|
1391
|
+
data: WebhookResource(),
|
|
1141
1392
|
}));
|
|
1142
|
-
export const
|
|
1393
|
+
export const UpdateWebhookRequest = lazySchema(() => z.looseObject({
|
|
1143
1394
|
isAdHoc: z.boolean().nullable().optional(),
|
|
1144
1395
|
eventTypes: z.array(WebhookEventType()).nullable().optional(),
|
|
1145
1396
|
condition: WebhookCondition().nullable().optional(),
|
|
@@ -1153,16 +1404,22 @@ export const WebhookUpdate = lazySchema(() => z.looseObject({
|
|
|
1153
1404
|
}));
|
|
1154
1405
|
/** A summary of the webhook that triggered this dispatch. */
|
|
1155
1406
|
export const WebhookDispatchWebhookSummary = lazySchema(() => z.looseObject({
|
|
1407
|
+
_id: z.string().optional(),
|
|
1156
1408
|
actionType: z.string().optional(),
|
|
1157
1409
|
condition: WebhookCondition().optional(),
|
|
1158
1410
|
requestUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1159
1411
|
isAdHoc: z.boolean().optional(),
|
|
1412
|
+
isApifyIntegration: z.boolean().nullable().optional(),
|
|
1413
|
+
slackMessage: WebhookSlackMessage().optional(),
|
|
1414
|
+
googleMail: WebhookGoogleMail().optional(),
|
|
1415
|
+
googleDrive: WebhookGoogleDrive().optional(),
|
|
1416
|
+
githubIssue: WebhookGithubIssue().optional(),
|
|
1160
1417
|
}));
|
|
1161
1418
|
export const WebhookDispatch = lazySchema(() => z.looseObject({
|
|
1162
1419
|
id: z.string(),
|
|
1163
1420
|
userId: z.string(),
|
|
1164
1421
|
webhookId: z.string(),
|
|
1165
|
-
createdAt: z.date(),
|
|
1422
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1166
1423
|
status: WebhookDispatchStatus(),
|
|
1167
1424
|
eventType: WebhookEventType(),
|
|
1168
1425
|
eventData: z.looseObject({
|
|
@@ -1173,14 +1430,15 @@ export const WebhookDispatch = lazySchema(() => z.looseObject({
|
|
|
1173
1430
|
}).nullable().optional(),
|
|
1174
1431
|
webhook: WebhookDispatchWebhookSummary().nullable().optional(),
|
|
1175
1432
|
calls: z.array(z.looseObject({
|
|
1176
|
-
startedAt: z.date().nullable().optional(),
|
|
1177
|
-
finishedAt: z.date().nullable().optional(),
|
|
1433
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1434
|
+
finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1178
1435
|
errorMessage: z.string().nullable().optional(),
|
|
1179
1436
|
responseStatus: z.int().nullable().optional(),
|
|
1180
1437
|
responseBody: z.string().nullable().optional(),
|
|
1438
|
+
debugPostMessage: z.record(z.string(), z.unknown()).optional(),
|
|
1181
1439
|
})).optional(),
|
|
1182
1440
|
}));
|
|
1183
|
-
export const
|
|
1441
|
+
export const WebhookDispatchResponse = lazySchema(() => z.looseObject({
|
|
1184
1442
|
data: WebhookDispatch(),
|
|
1185
1443
|
}));
|
|
1186
1444
|
export const ListOfWebhookDispatches = lazySchema(() => PaginationResponse().extend({
|
|
@@ -1189,9 +1447,6 @@ export const ListOfWebhookDispatches = lazySchema(() => PaginationResponse().ext
|
|
|
1189
1447
|
export const ListOfWebhookDispatchesResponse = lazySchema(() => z.looseObject({
|
|
1190
1448
|
data: ListOfWebhookDispatches(),
|
|
1191
1449
|
}));
|
|
1192
|
-
export const WebhookDispatchResponse = lazySchema(() => z.looseObject({
|
|
1193
|
-
data: WebhookDispatch(),
|
|
1194
|
-
}));
|
|
1195
1450
|
export const ScheduleBase = lazySchema(() => z.looseObject({
|
|
1196
1451
|
id: z.string(),
|
|
1197
1452
|
userId: z.string(),
|
|
@@ -1200,27 +1455,34 @@ export const ScheduleBase = lazySchema(() => z.looseObject({
|
|
|
1200
1455
|
timezone: z.string(),
|
|
1201
1456
|
isEnabled: z.boolean(),
|
|
1202
1457
|
isExclusive: z.boolean(),
|
|
1203
|
-
createdAt: z.date(),
|
|
1204
|
-
modifiedAt: z.date(),
|
|
1205
|
-
nextRunAt: z.date().nullable().optional(),
|
|
1206
|
-
lastRunAt: z.date().nullable().optional(),
|
|
1458
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1459
|
+
modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1460
|
+
nextRunAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1461
|
+
lastRunAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1207
1462
|
}));
|
|
1208
|
-
|
|
1463
|
+
/** Notification settings for this schedule. */
|
|
1464
|
+
export const ScheduleNotifications = lazySchema(() => z.looseObject({
|
|
1465
|
+
email: z.boolean().optional(),
|
|
1466
|
+
}));
|
|
1467
|
+
export const ScheduleListItemActionRunActor = lazySchema(() => z.looseObject({
|
|
1209
1468
|
id: z.string(),
|
|
1210
1469
|
type: z.literal("RUN_ACTOR"),
|
|
1211
1470
|
actorId: z.string(),
|
|
1212
1471
|
}));
|
|
1213
|
-
export const
|
|
1472
|
+
export const ScheduleListItemActionRunActorTask = lazySchema(() => z.looseObject({
|
|
1214
1473
|
id: z.string(),
|
|
1215
1474
|
type: z.literal("RUN_ACTOR_TASK"),
|
|
1216
1475
|
actorTaskId: z.string(),
|
|
1217
1476
|
}));
|
|
1218
|
-
export const
|
|
1219
|
-
export const
|
|
1220
|
-
|
|
1477
|
+
export const ScheduleListItemAction = lazySchema(() => z.discriminatedUnion("type", [ScheduleListItemActionRunActor(), ScheduleListItemActionRunActorTask()]));
|
|
1478
|
+
export const ScheduleListItem = lazySchema(() => ScheduleBase().extend({
|
|
1479
|
+
title: z.string().nullable().optional(),
|
|
1480
|
+
notifications: ScheduleNotifications().optional(),
|
|
1481
|
+
integrationTracking: IntegrationTracking().optional(),
|
|
1482
|
+
actions: z.array(ScheduleListItemAction()),
|
|
1221
1483
|
}));
|
|
1222
1484
|
export const ListOfSchedules = lazySchema(() => PaginationResponse().extend({
|
|
1223
|
-
items: z.array(
|
|
1485
|
+
items: z.array(ScheduleListItem()),
|
|
1224
1486
|
}));
|
|
1225
1487
|
export const ListOfSchedulesResponse = lazySchema(() => z.looseObject({
|
|
1226
1488
|
data: ListOfSchedules(),
|
|
@@ -1241,7 +1503,7 @@ export const ScheduleCreateActionRunActorTask = lazySchema(() => z.looseObject({
|
|
|
1241
1503
|
input: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
1242
1504
|
}));
|
|
1243
1505
|
export const ScheduleCreateAction = lazySchema(() => z.discriminatedUnion("type", [ScheduleCreateActionRunActor(), ScheduleCreateActionRunActorTask()]));
|
|
1244
|
-
export const
|
|
1506
|
+
export const CreateOrUpdateScheduleRequest = lazySchema(() => z.looseObject({
|
|
1245
1507
|
name: z.string().nullable().optional(),
|
|
1246
1508
|
isEnabled: z.boolean().nullable().optional(),
|
|
1247
1509
|
isExclusive: z.boolean().nullable().optional(),
|
|
@@ -1249,8 +1511,17 @@ export const ScheduleCreate = lazySchema(() => z.looseObject({
|
|
|
1249
1511
|
timezone: z.string().nullable().optional(),
|
|
1250
1512
|
description: z.string().nullable().optional(),
|
|
1251
1513
|
title: z.string().nullable().optional(),
|
|
1514
|
+
notifications: ScheduleNotifications().optional(),
|
|
1252
1515
|
actions: z.array(ScheduleCreateAction()).nullable().optional(),
|
|
1253
1516
|
}));
|
|
1517
|
+
/** State of the schedule editor in Apify Console. It's removed when an API update changes `cronExpression` or `timezone`, after which it is `null`. */
|
|
1518
|
+
export const ScheduleUiState = lazySchema(() => z.looseObject({
|
|
1519
|
+
version: z.int().optional(),
|
|
1520
|
+
data: z.looseObject({
|
|
1521
|
+
cronExpression: z.string().optional(),
|
|
1522
|
+
timezone: z.string().optional(),
|
|
1523
|
+
}).optional(),
|
|
1524
|
+
}).nullable());
|
|
1254
1525
|
export const ScheduleActionRunActor = lazySchema(() => z.looseObject({
|
|
1255
1526
|
id: z.string(),
|
|
1256
1527
|
type: z.literal("RUN_ACTOR"),
|
|
@@ -1268,40 +1539,44 @@ export const ScheduleAction = lazySchema(() => z.discriminatedUnion("type", [Sch
|
|
|
1268
1539
|
export const Schedule = lazySchema(() => ScheduleBase().extend({
|
|
1269
1540
|
description: z.string().nullable().optional(),
|
|
1270
1541
|
title: z.string().nullable().optional(),
|
|
1271
|
-
notifications:
|
|
1272
|
-
|
|
1273
|
-
|
|
1542
|
+
notifications: ScheduleNotifications().optional(),
|
|
1543
|
+
uiState: ScheduleUiState().optional(),
|
|
1544
|
+
integrationTracking: IntegrationTracking().optional(),
|
|
1274
1545
|
actions: z.array(ScheduleAction()),
|
|
1275
1546
|
}));
|
|
1276
1547
|
export const ScheduleResponse = lazySchema(() => z.looseObject({
|
|
1277
1548
|
data: Schedule(),
|
|
1278
1549
|
}));
|
|
1279
|
-
export const
|
|
1550
|
+
export const ScheduleLogEntry = lazySchema(() => z.looseObject({
|
|
1280
1551
|
message: z.string(),
|
|
1281
1552
|
level: z.string(),
|
|
1282
|
-
createdAt: z.date(),
|
|
1553
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1283
1554
|
}));
|
|
1284
1555
|
export const ScheduleLogResponse = lazySchema(() => z.looseObject({
|
|
1285
|
-
data: z.array(
|
|
1556
|
+
data: z.array(ScheduleLogEntry()),
|
|
1286
1557
|
}));
|
|
1287
1558
|
export const CurrentPricingInfo = lazySchema(() => z.looseObject({
|
|
1288
1559
|
pricingModel: z.string(),
|
|
1289
1560
|
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(),
|
|
1561
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
1562
|
+
startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
1563
|
+
notifiedAboutChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1564
|
+
notifiedAboutFutureChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1294
1565
|
isPriceChangeNotificationSuppressed: z.boolean().optional(),
|
|
1295
1566
|
forceContainsSignificantPriceChange: z.boolean().optional(),
|
|
1296
1567
|
isPPEPlatformUsagePaidByUser: z.boolean().optional(),
|
|
1297
1568
|
reasonForChange: z.string().nullable().optional(),
|
|
1298
|
-
trialMinutes: z.int().nullable().optional(),
|
|
1299
|
-
unitName: z.string().nullable().optional(),
|
|
1300
|
-
pricePerUnitUsd: z.number().nullable().optional(),
|
|
1301
1569
|
minimalMaxTotalChargeUsd: z.number().nullable().optional(),
|
|
1302
1570
|
pricingPerEvent: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
1571
|
+
pricePerUnitUsd: z.number().optional(),
|
|
1572
|
+
trialMinutes: z.int().optional(),
|
|
1573
|
+
unitName: z.string().optional(),
|
|
1574
|
+
tieredPricing: z.record(z.string(), z.looseObject({
|
|
1575
|
+
tieredPricePerUnitUsd: z.number().optional(),
|
|
1576
|
+
})).optional(),
|
|
1577
|
+
notifiedAboutRentalToPpePriceChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
|
|
1303
1578
|
}));
|
|
1304
|
-
export const
|
|
1579
|
+
export const StoreActor = lazySchema(() => z.looseObject({
|
|
1305
1580
|
id: z.string(),
|
|
1306
1581
|
title: z.string(),
|
|
1307
1582
|
name: z.string(),
|
|
@@ -1321,15 +1596,23 @@ export const StoreListActor = lazySchema(() => z.looseObject({
|
|
|
1321
1596
|
bookmarkCount: z.int().optional(),
|
|
1322
1597
|
badge: z.string().nullable().optional(),
|
|
1323
1598
|
readmeSummary: z.string().optional(),
|
|
1599
|
+
inputSchema: z.looseObject({
|
|
1600
|
+
type: z.string(),
|
|
1601
|
+
properties: z.record(z.string(), z.looseObject({
|
|
1602
|
+
type: z.union([z.string(), z.array(z.string())]).optional(),
|
|
1603
|
+
})),
|
|
1604
|
+
required: z.array(z.string()).optional(),
|
|
1605
|
+
}).optional(),
|
|
1324
1606
|
}));
|
|
1325
1607
|
export const ListOfStoreActors = lazySchema(() => PaginationResponse().extend({
|
|
1326
|
-
items: z.array(
|
|
1608
|
+
items: z.array(StoreActor()),
|
|
1327
1609
|
}));
|
|
1328
|
-
export const
|
|
1610
|
+
export const ListOfStoreActorsResponse = lazySchema(() => z.looseObject({
|
|
1329
1611
|
data: ListOfStoreActors(),
|
|
1330
1612
|
}));
|
|
1331
|
-
export const
|
|
1613
|
+
export const UserProfile = lazySchema(() => z.looseObject({
|
|
1332
1614
|
bio: z.string().nullable().optional(),
|
|
1615
|
+
readme: z.string().nullable().optional(),
|
|
1333
1616
|
name: z.string().optional(),
|
|
1334
1617
|
pictureUrl: z.url({ normalize: true }).nullable().optional(),
|
|
1335
1618
|
githubUsername: z.string().nullable().optional(),
|
|
@@ -1338,18 +1621,20 @@ export const Profile = lazySchema(() => z.looseObject({
|
|
|
1338
1621
|
}));
|
|
1339
1622
|
export const UserPublicInfo = lazySchema(() => z.looseObject({
|
|
1340
1623
|
username: z.string(),
|
|
1341
|
-
profile:
|
|
1624
|
+
profile: UserProfile().optional(),
|
|
1342
1625
|
}));
|
|
1343
|
-
export const
|
|
1626
|
+
export const UserPublicInfoResponse = lazySchema(() => z.looseObject({
|
|
1344
1627
|
data: UserPublicInfo(),
|
|
1345
1628
|
}));
|
|
1346
1629
|
export const ProxyGroup = lazySchema(() => z.looseObject({
|
|
1630
|
+
id: z.string().optional(),
|
|
1347
1631
|
name: z.string(),
|
|
1348
1632
|
description: z.string().nullable(),
|
|
1349
|
-
availableCount: z.int(),
|
|
1633
|
+
availableCount: z.int().optional(),
|
|
1350
1634
|
}));
|
|
1351
|
-
|
|
1352
|
-
|
|
1635
|
+
/** Proxy access info. Omitted when the user has no access to Apify Proxy. */
|
|
1636
|
+
export const ProxyResource = lazySchema(() => z.looseObject({
|
|
1637
|
+
password: z.string().nullable().optional(),
|
|
1353
1638
|
groups: z.array(ProxyGroup()),
|
|
1354
1639
|
}));
|
|
1355
1640
|
/**
|
|
@@ -1358,7 +1643,7 @@ export const Proxy = lazySchema(() => z.looseObject({
|
|
|
1358
1643
|
* the count of available proxies.
|
|
1359
1644
|
*/
|
|
1360
1645
|
export const AvailableProxyGroups = lazySchema(() => z.record(z.string(), z.int()));
|
|
1361
|
-
export const
|
|
1646
|
+
export const UserPlan = lazySchema(() => z.looseObject({
|
|
1362
1647
|
id: z.string().optional(),
|
|
1363
1648
|
description: z.string().optional(),
|
|
1364
1649
|
isEnabled: z.boolean().optional(),
|
|
@@ -1384,13 +1669,24 @@ export const Plan = lazySchema(() => z.looseObject({
|
|
|
1384
1669
|
maxScheduleCount: z.int().optional(),
|
|
1385
1670
|
maxConcurrentActorRuns: z.int().optional(),
|
|
1386
1671
|
planPricing: z.record(z.string(), z.unknown()).optional(),
|
|
1672
|
+
planVersion: z.number().optional(),
|
|
1673
|
+
legacyPlanId: z.string().optional(),
|
|
1674
|
+
planTags: z.array(z.string()).optional(),
|
|
1675
|
+
overageThresholdUsd: z.number().optional(),
|
|
1676
|
+
maxMonthlyUnblockerUnits: z.int().optional(),
|
|
1677
|
+
maxPublicActorTaskCount: z.int().optional(),
|
|
1678
|
+
maxPublicActorTaskCountPerActor: z.int().optional(),
|
|
1679
|
+
forceBillingInterval: z.string().optional(),
|
|
1680
|
+
personalizedSupport: z.string().nullable().optional(),
|
|
1681
|
+
monitoringLevel: z.enum(["STANDARD"]).or(z.string()).nullable().optional(),
|
|
1682
|
+
isPayingCustomer: z.boolean().optional(),
|
|
1387
1683
|
}));
|
|
1388
1684
|
export const EffectivePlatformFeature = lazySchema(() => z.looseObject({
|
|
1389
1685
|
isEnabled: z.boolean(),
|
|
1390
1686
|
disabledReason: z.string().nullable(),
|
|
1391
1687
|
disabledReasonType: z.string().nullable(),
|
|
1392
1688
|
isTrial: z.boolean(),
|
|
1393
|
-
trialExpirationAt: z.date().nullable(),
|
|
1689
|
+
trialExpirationAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable(),
|
|
1394
1690
|
}));
|
|
1395
1691
|
export const EffectivePlatformFeatures = lazySchema(() => z.looseObject({
|
|
1396
1692
|
ACTORS: EffectivePlatformFeature(),
|
|
@@ -1407,22 +1703,34 @@ export const EffectivePlatformFeatures = lazySchema(() => z.looseObject({
|
|
|
1407
1703
|
export const UserPrivateInfo = lazySchema(() => z.looseObject({
|
|
1408
1704
|
id: z.string().optional(),
|
|
1409
1705
|
username: z.string(),
|
|
1410
|
-
profile:
|
|
1411
|
-
email: z.string().optional(),
|
|
1412
|
-
proxy:
|
|
1413
|
-
plan:
|
|
1706
|
+
profile: UserProfile().optional(),
|
|
1707
|
+
email: z.string().nullable().optional(),
|
|
1708
|
+
proxy: ProxyResource().optional(),
|
|
1709
|
+
plan: UserPlan().optional(),
|
|
1414
1710
|
effectivePlatformFeatures: EffectivePlatformFeatures().optional(),
|
|
1415
|
-
createdAt: z.date().optional(),
|
|
1711
|
+
createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
|
|
1416
1712
|
isPaying: z.boolean().optional(),
|
|
1713
|
+
organizationOwnerUserId: z.string().nullable().optional(),
|
|
1417
1714
|
}));
|
|
1418
|
-
export const
|
|
1715
|
+
export const UserPrivateInfoResponse = lazySchema(() => z.looseObject({
|
|
1419
1716
|
data: UserPrivateInfo(),
|
|
1420
1717
|
}));
|
|
1718
|
+
/** Reduced user data with only the fields Apify Proxy reads. */
|
|
1719
|
+
export const UserProxyInfo = lazySchema(() => z.looseObject({
|
|
1720
|
+
plan: z.looseObject({
|
|
1721
|
+
availableProxyGroups: AvailableProxyGroups(),
|
|
1722
|
+
}),
|
|
1723
|
+
effectivePlatformFeatures: EffectivePlatformFeatures(),
|
|
1724
|
+
isPaying: z.boolean(),
|
|
1725
|
+
}));
|
|
1726
|
+
export const UserProxyInfoResponse = lazySchema(() => z.looseObject({
|
|
1727
|
+
data: UserProxyInfo(),
|
|
1728
|
+
}));
|
|
1421
1729
|
export const UsageCycle = lazySchema(() => z.looseObject({
|
|
1422
|
-
startAt: z.date(),
|
|
1423
|
-
endAt: z.date(),
|
|
1730
|
+
startAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1731
|
+
endAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1424
1732
|
}));
|
|
1425
|
-
export const
|
|
1733
|
+
export const PriceTier = lazySchema(() => z.looseObject({
|
|
1426
1734
|
quantityAbove: z.number(),
|
|
1427
1735
|
discountPercent: z.number(),
|
|
1428
1736
|
tierQuantity: z.number(),
|
|
@@ -1434,21 +1742,21 @@ export const UsageItem = lazySchema(() => z.looseObject({
|
|
|
1434
1742
|
baseAmountUsd: z.number(),
|
|
1435
1743
|
baseUnitPriceUsd: z.number().optional(),
|
|
1436
1744
|
amountAfterVolumeDiscountUsd: z.number().optional(),
|
|
1437
|
-
priceTiers: z.array(
|
|
1745
|
+
priceTiers: z.array(PriceTier()).optional(),
|
|
1438
1746
|
}));
|
|
1439
1747
|
/** A map of usage item names (e.g., ACTOR_COMPUTE_UNITS) to their usage details. */
|
|
1440
1748
|
export const MonthlyServiceUsage = lazySchema(() => z.record(z.string(), UsageItem()));
|
|
1441
1749
|
/** A map of service usage item names to their usage details. */
|
|
1442
1750
|
export const ServiceUsage = lazySchema(() => z.record(z.string(), UsageItem()));
|
|
1443
|
-
export const
|
|
1444
|
-
date: z.date(),
|
|
1751
|
+
export const DailyServiceUsage = lazySchema(() => z.looseObject({
|
|
1752
|
+
date: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
|
|
1445
1753
|
serviceUsage: ServiceUsage(),
|
|
1446
1754
|
totalUsageCreditsUsd: z.number(),
|
|
1447
1755
|
}));
|
|
1448
1756
|
export const MonthlyUsage = lazySchema(() => z.looseObject({
|
|
1449
1757
|
usageCycle: UsageCycle(),
|
|
1450
1758
|
monthlyServiceUsage: MonthlyServiceUsage(),
|
|
1451
|
-
dailyServiceUsages: z.array(
|
|
1759
|
+
dailyServiceUsages: z.array(DailyServiceUsage()),
|
|
1452
1760
|
totalUsageCreditsUsdBeforeVolumeDiscount: z.number(),
|
|
1453
1761
|
totalUsageCreditsUsdAfterVolumeDiscount: z.number(),
|
|
1454
1762
|
}));
|
|
@@ -1468,8 +1776,9 @@ export const Limits = lazySchema(() => z.looseObject({
|
|
|
1468
1776
|
maxTeamAccountSeatCount: z.int(),
|
|
1469
1777
|
dataRetentionDays: z.int(),
|
|
1470
1778
|
maxScheduleCount: z.int().optional(),
|
|
1779
|
+
maxMonthlyUnblockerUnits: z.number().optional(),
|
|
1471
1780
|
}));
|
|
1472
|
-
export const
|
|
1781
|
+
export const CurrentUsage = lazySchema(() => z.looseObject({
|
|
1473
1782
|
monthlyUsageUsd: z.number(),
|
|
1474
1783
|
monthlyActorComputeUnits: z.number(),
|
|
1475
1784
|
monthlyExternalDataTransferGbytes: z.number(),
|
|
@@ -1481,19 +1790,66 @@ export const Current = lazySchema(() => z.looseObject({
|
|
|
1481
1790
|
activeActorJobCount: z.int(),
|
|
1482
1791
|
teamAccountSeatCount: z.int(),
|
|
1483
1792
|
scheduleCount: z.int().optional(),
|
|
1793
|
+
monthlyUnblockerUnits: z.number().optional(),
|
|
1484
1794
|
}));
|
|
1485
1795
|
export const AccountLimits = lazySchema(() => z.looseObject({
|
|
1486
1796
|
monthlyUsageCycle: UsageCycle(),
|
|
1487
1797
|
limits: Limits(),
|
|
1488
|
-
current:
|
|
1798
|
+
current: CurrentUsage(),
|
|
1489
1799
|
}));
|
|
1490
|
-
export const
|
|
1800
|
+
export const AccountLimitsResponse = lazySchema(() => z.looseObject({
|
|
1491
1801
|
data: AccountLimits(),
|
|
1492
1802
|
}));
|
|
1493
1803
|
export const UpdateLimitsRequest = lazySchema(() => z.looseObject({
|
|
1494
1804
|
maxMonthlyUsageUsd: z.number().optional(),
|
|
1495
1805
|
dataRetentionDays: z.int().optional(),
|
|
1496
1806
|
}));
|
|
1807
|
+
/** A place the user can create a repository in, such as their own account or an organization, group or workspace they can access. */
|
|
1808
|
+
export const GitProviderWorkspace = lazySchema(() => z.looseObject({
|
|
1809
|
+
id: z.string(),
|
|
1810
|
+
label: z.string(),
|
|
1811
|
+
}));
|
|
1812
|
+
/** A connected git provider account the user can create repositories through. */
|
|
1813
|
+
export const GitProviderIntegration = lazySchema(() => z.looseObject({
|
|
1814
|
+
id: z.string(),
|
|
1815
|
+
provider: z.enum(["github", "gitlab", "bitbucket"]).or(z.string()),
|
|
1816
|
+
workspaces: z.array(GitProviderWorkspace()),
|
|
1817
|
+
addWorkspaceUrl: z.string().optional(),
|
|
1818
|
+
}));
|
|
1819
|
+
export const ListOfGitProviderIntegrationsResponse = lazySchema(() => z.looseObject({
|
|
1820
|
+
data: z.array(GitProviderIntegration()),
|
|
1821
|
+
}));
|
|
1822
|
+
/** A file to commit into the new repository. */
|
|
1823
|
+
export const GitRepoFile = lazySchema(() => z.looseObject({
|
|
1824
|
+
path: z.string(),
|
|
1825
|
+
content: z.string(),
|
|
1826
|
+
encoding: z.enum(["utf-8", "base64"]).or(z.string()),
|
|
1827
|
+
}));
|
|
1828
|
+
export const CreateGitRepoRequest = lazySchema(() => z.looseObject({
|
|
1829
|
+
workspace: z.string(),
|
|
1830
|
+
repoName: z.string(),
|
|
1831
|
+
isPrivate: z.boolean(),
|
|
1832
|
+
files: z.array(GitRepoFile()).optional(),
|
|
1833
|
+
templateArchiveUrl: z.string().optional(),
|
|
1834
|
+
}));
|
|
1835
|
+
/** URLs of a newly created repository. */
|
|
1836
|
+
export const GitRepo = lazySchema(() => z.looseObject({
|
|
1837
|
+
sshUrl: z.string(),
|
|
1838
|
+
httpsUrl: z.string(),
|
|
1839
|
+
htmlUrl: z.string(),
|
|
1840
|
+
}));
|
|
1841
|
+
export const GitRepoResponse = lazySchema(() => z.looseObject({
|
|
1842
|
+
data: GitRepo(),
|
|
1843
|
+
}));
|
|
1844
|
+
export const RegisterDeploymentKeyRequest = lazySchema(() => z.looseObject({
|
|
1845
|
+
actorId: z.string(),
|
|
1846
|
+
repoName: z.string(),
|
|
1847
|
+
}));
|
|
1848
|
+
export const RegisterDeploymentKeyResponse = lazySchema(() => z.looseObject({
|
|
1849
|
+
data: z.looseObject({
|
|
1850
|
+
repoName: z.string(),
|
|
1851
|
+
}),
|
|
1852
|
+
}));
|
|
1497
1853
|
export const BrowserInfoResponse = lazySchema(() => z.looseObject({
|
|
1498
1854
|
method: z.string(),
|
|
1499
1855
|
clientIp: z.string().nullable(),
|
|
@@ -1502,20 +1858,20 @@ export const BrowserInfoResponse = lazySchema(() => z.looseObject({
|
|
|
1502
1858
|
headers: z.record(z.string(), z.union([z.string(), z.array(z.string())])).optional(),
|
|
1503
1859
|
rawHeaders: z.array(z.string()).optional(),
|
|
1504
1860
|
}));
|
|
1505
|
-
export const
|
|
1861
|
+
export const EncodeAndSignResult = lazySchema(() => z.looseObject({
|
|
1506
1862
|
encoded: z.string(),
|
|
1507
1863
|
}));
|
|
1508
1864
|
export const EncodeAndSignResponse = lazySchema(() => z.looseObject({
|
|
1509
|
-
data:
|
|
1865
|
+
data: EncodeAndSignResult(),
|
|
1510
1866
|
}));
|
|
1511
1867
|
export const DecodeAndVerifyRequest = lazySchema(() => z.looseObject({
|
|
1512
1868
|
encoded: z.string(),
|
|
1513
1869
|
}));
|
|
1514
|
-
export const
|
|
1870
|
+
export const DecodeAndVerifyResult = lazySchema(() => z.looseObject({
|
|
1515
1871
|
decoded: z.unknown(),
|
|
1516
1872
|
encodedByUserId: z.string().nullable(),
|
|
1517
1873
|
isVerifiedUser: z.boolean(),
|
|
1518
1874
|
}));
|
|
1519
1875
|
export const DecodeAndVerifyResponse = lazySchema(() => z.looseObject({
|
|
1520
|
-
data:
|
|
1876
|
+
data: DecodeAndVerifyResult(),
|
|
1521
1877
|
}));
|