apify-client 3.0.0-rc.0 → 3.0.0-rc.2

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.
Files changed (66) hide show
  1. package/README.md +10 -2
  2. package/dist/apify_api_error.d.ts +4 -3
  3. package/dist/apify_api_error.js +2 -1
  4. package/dist/apify_client.d.ts +8 -8
  5. package/dist/apify_client.js +10 -10
  6. package/dist/apify_client_error.d.ts +10 -0
  7. package/dist/apify_client_error.js +10 -0
  8. package/dist/axios.d.ts +2 -0
  9. package/dist/axios.js +1 -0
  10. package/dist/base/api_client.js +8 -20
  11. package/dist/base/resource_client.js +8 -8
  12. package/dist/body_parser.d.ts +1 -1
  13. package/dist/bundle.js +31 -30
  14. package/dist/bundle.js.map +1 -1
  15. package/dist/generated/api.d.ts +2427 -725
  16. package/dist/generated/schemas.d.ts +1868 -274
  17. package/dist/generated/schemas.js +437 -79
  18. package/dist/http_clients/axios.d.ts +35 -15
  19. package/dist/http_clients/axios.js +80 -32
  20. package/dist/http_clients/base.d.ts +105 -34
  21. package/dist/http_clients/base.js +169 -52
  22. package/dist/http_clients/fetch.d.ts +53 -0
  23. package/dist/http_clients/fetch.js +219 -0
  24. package/dist/http_clients/index.d.ts +2 -2
  25. package/dist/http_clients/index.js +1 -1
  26. package/dist/http_compressors/index.d.ts +2 -0
  27. package/dist/http_compressors/index.js +1 -0
  28. package/dist/http_compressors/resolve.d.ts +4 -3
  29. package/dist/http_compressors/resolve.js +4 -1
  30. package/dist/http_compressors/zstd.d.ts +34 -0
  31. package/dist/http_compressors/zstd.js +43 -0
  32. package/dist/index.d.ts +3 -1
  33. package/dist/index.js +2 -0
  34. package/dist/invalid_response_body_error.d.ts +5 -4
  35. package/dist/invalid_response_body_error.js +5 -4
  36. package/dist/models.d.ts +30 -61
  37. package/dist/resource_clients/actor.d.ts +33 -2
  38. package/dist/resource_clients/actor.js +46 -3
  39. package/dist/resource_clients/actor_server.d.ts +149 -0
  40. package/dist/resource_clients/actor_server.js +195 -0
  41. package/dist/resource_clients/actor_version.d.ts +7 -1
  42. package/dist/resource_clients/actor_version.js +3 -2
  43. package/dist/resource_clients/actor_version_collection.d.ts +2 -1
  44. package/dist/resource_clients/actor_version_collection.js +3 -2
  45. package/dist/resource_clients/dataset.d.ts +33 -5
  46. package/dist/resource_clients/dataset.js +12 -54
  47. package/dist/resource_clients/key_value_store.d.ts +63 -22
  48. package/dist/resource_clients/key_value_store.js +62 -19
  49. package/dist/resource_clients/log.d.ts +32 -7
  50. package/dist/resource_clients/log.js +11 -14
  51. package/dist/resource_clients/request_queue.d.ts +9 -0
  52. package/dist/resource_clients/request_queue.js +9 -6
  53. package/dist/resource_clients/run.d.ts +15 -2
  54. package/dist/resource_clients/run.js +12 -5
  55. package/dist/resource_clients/store_collection.d.ts +4 -0
  56. package/dist/resource_clients/task.js +3 -3
  57. package/dist/response_validation_error.d.ts +2 -1
  58. package/dist/response_validation_error.js +2 -1
  59. package/dist/runtime/node.js +79 -17
  60. package/dist/runtime/types.d.ts +35 -5
  61. package/dist/runtime/web.js +43 -1
  62. package/dist/schemas.d.ts +369 -3
  63. package/dist/schemas.js +25 -3
  64. package/dist/utils.d.ts +52 -27
  65. package/dist/utils.js +45 -25
  66. package/package.json +42 -30
@@ -49,18 +49,22 @@ 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
- export const VersionSourceType = lazySchema(() => z.enum(["SOURCE_FILES", "GIT_REPO", "TARBALL", "GITHUB_GIST", "SOURCE_CODE"]).or(z.string()));
61
- export const EnvVar = lazySchema(() => z.looseObject({
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().optional(),
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 Version = lazySchema(() => z.looseObject({
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: VersionSourceType().nullable(),
85
- envVars: z.array(EnvVar()).nullable().optional(),
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().nullable().optional(),
90
- tarballUrl: z.string().nullable().optional(),
91
- gitHubGistUrl: z.string().nullable().optional(),
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().nullable().optional(),
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(Version()).nullable().optional(),
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
166
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
136
167
  startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
137
168
  notifiedAboutFutureChangeAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
138
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(),
@@ -209,7 +243,7 @@ export const ActorResource = lazySchema(() => z.looseObject({
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
249
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
@@ -240,17 +274,6 @@ export const ActorResource = lazySchema(() => z.looseObject({
240
274
  export const ActorResponse = lazySchema(() => z.looseObject({
241
275
  data: ActorResource(),
242
276
  }));
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(),
253
- }));
254
277
  /** The name of the build tag. */
255
278
  export const UpdatedBuildProperty = lazySchema(() => z.looseObject({
256
279
  buildId: z.string(),
@@ -259,12 +282,12 @@ 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().nullable().optional(),
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(CreateOrUpdateVersionRequest()).optional(),
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(),
@@ -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,6 +339,40 @@ 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
378
  export const WebhookLastDispatch = lazySchema(() => z.looseObject({
@@ -311,29 +383,59 @@ export const WebhookLastDispatch = lazySchema(() => z.looseObject({
311
383
  export const WebhookStats = lazySchema(() => z.looseObject({
312
384
  totalDispatches: z.int().optional(),
313
385
  }));
314
- export const WebhookListItem = lazySchema(() => z.looseObject({
386
+ export const WebhookResource = lazySchema(() => z.looseObject({
315
387
  id: z.string(),
316
388
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
317
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 }),
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(),
329
409
  lastDispatch: WebhookLastDispatch().nullable().optional(),
330
410
  stats: WebhookStats().nullable().optional(),
331
411
  }));
332
- export const ListOfWebhooks = lazySchema(() => PaginationResponse().extend({
333
- items: z.array(WebhookListItem()),
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 ListOfWebhooksResponse = lazySchema(() => z.looseObject({
336
- data: ListOfWebhooks(),
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()));
@@ -342,6 +444,9 @@ 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
451
  export const BuildListItem = lazySchema(() => z.looseObject({
347
452
  id: z.string(),
@@ -350,7 +455,7 @@ export const BuildListItem = lazySchema(() => z.looseObject({
350
455
  status: ActorJobStatus(),
351
456
  startedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
352
457
  finishedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
353
- usageTotalUsd: z.number(),
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
461
  meta: BuildMeta().optional(),
@@ -372,29 +477,44 @@ 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(),
@@ -411,14 +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})$/),
415
540
  imageDigest: z.string().nullable().optional(),
416
541
  actVersion: z.looseObject({
417
542
  sourceType: VersionSourceType().optional(),
418
- buildTag: z.string().optional(),
543
+ buildTag: z.string().nullable().optional(),
419
544
  versionNumber: z.string().regex(/^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$/).optional(),
420
545
  gitRepoUrl: z.string().optional(),
421
546
  sourceFiles: z.array(SourceCodeFile()).optional(),
547
+ gitHubGistUrl: z.string().optional(),
548
+ tarballUrl: z.string().optional(),
549
+ actorPath: z.string().nullable().optional(),
422
550
  }).optional(),
423
551
  actorDefinition: ActorDefinition().nullable().optional(),
424
552
  }));
@@ -432,6 +560,14 @@ export const RunMeta = lazySchema(() => z.looseObject({
432
560
  userAgent: z.string().nullable().optional(),
433
561
  scheduleId: z.string().nullable().optional(),
434
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(),
567
+ }));
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()),
435
571
  }));
436
572
  export const RunListItem = lazySchema(() => z.looseObject({
437
573
  id: z.string(),
@@ -449,6 +585,7 @@ export const RunListItem = lazySchema(() => z.looseObject({
449
585
  defaultKeyValueStoreId: z.string(),
450
586
  defaultDatasetId: z.string(),
451
587
  defaultRequestQueueId: z.string(),
588
+ standby: RunStandby().nullable().optional(),
452
589
  }));
453
590
  export const ListOfRuns = lazySchema(() => PaginationResponse().extend({
454
591
  items: z.array(RunListItem()),
@@ -490,13 +627,26 @@ export const RunStats = lazySchema(() => z.looseObject({
490
627
  metamorph: z.int().min(0).optional(),
491
628
  computeUnits: z.number().min(0).optional(),
492
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
+ }));
493
641
  export const RunOptions = lazySchema(() => z.looseObject({
494
642
  build: z.string(),
495
643
  timeoutSecs: z.int().min(0),
496
644
  memoryMbytes: z.int().min(128).max(32768),
497
645
  diskMbytes: z.int().min(0),
646
+ restartOnError: z.boolean().nullable().optional(),
498
647
  maxItems: z.int().min(0).nullable().optional(),
499
648
  maxTotalChargeUsd: z.number().min(0).nullable().optional(),
649
+ isMaxTotalChargeUsdSetByUser: z.boolean().optional(),
500
650
  }));
501
651
  /** Defines the general access level for the resource. */
502
652
  export const GeneralAccess = lazySchema(() => z.enum(["ANYONE_WITH_ID_CAN_READ", "ANYONE_WITH_NAME_CAN_READ", "FOLLOW_USER_SETTING", "RESTRICTED"]).or(z.string()));
@@ -513,6 +663,7 @@ export const RunUsage = lazySchema(() => z.looseObject({
513
663
  DATA_TRANSFER_EXTERNAL_GBYTES: z.number().nullable().optional(),
514
664
  PROXY_RESIDENTIAL_TRANSFER_GBYTES: z.number().nullable().optional(),
515
665
  PROXY_SERPS: z.int().nullable().optional(),
666
+ PROXY_UNBLOCKER_UNITS: z.number().nullable().optional(),
516
667
  }));
517
668
  /** Resource usage costs in USD. All values are monetary amounts in US dollars. */
518
669
  export const RunUsageUsd = lazySchema(() => z.looseObject({
@@ -528,6 +679,7 @@ export const RunUsageUsd = lazySchema(() => z.looseObject({
528
679
  DATA_TRANSFER_EXTERNAL_GBYTES: z.number().nullable().optional(),
529
680
  PROXY_RESIDENTIAL_TRANSFER_GBYTES: z.number().nullable().optional(),
530
681
  PROXY_SERPS: z.number().nullable().optional(),
682
+ PROXY_UNBLOCKER_UNITS: z.number().nullable().optional(),
531
683
  }));
532
684
  /** Information about a metamorph event that occurred during the run. */
533
685
  export const RunMetamorphEvent = lazySchema(() => z.looseObject({
@@ -535,6 +687,7 @@ export const RunMetamorphEvent = lazySchema(() => z.looseObject({
535
687
  actorId: z.string(),
536
688
  buildId: z.string(),
537
689
  inputKey: z.string().nullable().optional(),
690
+ buildTags: z.array(z.string()).optional(),
538
691
  }));
539
692
  /** Represents an Actor run and its associated data. */
540
693
  export const Run = lazySchema(() => z.looseObject({
@@ -551,6 +704,14 @@ export const Run = lazySchema(() => z.looseObject({
551
704
  pricingInfo: ActorRunPricingInfo().optional(),
552
705
  stats: RunStats(),
553
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(),
554
715
  options: RunOptions(),
555
716
  buildId: z.string(),
556
717
  exitCode: z.int().nullable().optional(),
@@ -591,6 +752,7 @@ export const DatasetStats = lazySchema(() => z.looseObject({
591
752
  export const DatasetResource = lazySchema(() => z.looseObject({
592
753
  id: z.string(),
593
754
  name: z.string().nullable().optional(),
755
+ title: z.string().nullable().optional(),
594
756
  userId: z.string(),
595
757
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
596
758
  modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
@@ -665,6 +827,7 @@ export const KeyValueStoreStats = lazySchema(() => z.looseObject({
665
827
  export const KeyValueStoreResource = lazySchema(() => z.looseObject({
666
828
  id: z.string(),
667
829
  name: z.string().nullable().optional(),
830
+ title: z.string().nullable().optional(),
668
831
  userId: z.string().nullable().optional(),
669
832
  username: z.string().nullable().optional(),
670
833
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
@@ -744,6 +907,7 @@ export const RequestQueueStats = lazySchema(() => z.looseObject({
744
907
  export const RequestQueueResource = lazySchema(() => z.looseObject({
745
908
  id: QueueId(),
746
909
  name: z.string().nullable().optional(),
910
+ title: z.string().nullable().optional(),
747
911
  userId: QueueUserId(),
748
912
  actId: z.string().nullable().optional(),
749
913
  actRunId: z.string().nullable().optional(),
@@ -793,9 +957,13 @@ export const RequestBase = lazySchema(() => z.looseObject({
793
957
  }));
794
958
  /** A unique identifier assigned to the request. */
795
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()));
796
962
  /** A request stored in the request queue, including its metadata and processing state. */
797
963
  export const RequestResource = lazySchema(() => RequestBase().extend({
798
964
  id: RequestId().optional(),
965
+ lockExpiresAt: LockExpiresAt().optional(),
966
+ lockByClient: z.string().optional(),
799
967
  }).required({ id: true }));
800
968
  /** A paginated list of requests from the request queue. */
801
969
  export const ListOfRequests = lazySchema(() => z.looseObject({
@@ -897,8 +1065,6 @@ export const RequestResponse = lazySchema(() => z.looseObject({
897
1065
  export const UpdateRequestResponse = lazySchema(() => z.looseObject({
898
1066
  data: RequestRegistration(),
899
1067
  }));
900
- /** The timestamp when the lock on this request expires. */
901
- export const LockExpiresAt = lazySchema(() => z.iso.datetime({ offset: true }).pipe(z.coerce.date()));
902
1068
  /** Information about a request lock. */
903
1069
  export const RequestLockInfo = lazySchema(() => z.looseObject({
904
1070
  lockExpiresAt: LockExpiresAt(),
@@ -953,6 +1119,7 @@ export const LockedRequestQueueHeadResponse = lazySchema(() => z.looseObject({
953
1119
  }));
954
1120
  export const TaskStats = lazySchema(() => z.looseObject({
955
1121
  totalRuns: z.int().optional(),
1122
+ lastRunStartedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
956
1123
  }));
957
1124
  export const TaskListItem = lazySchema(() => z.looseObject({
958
1125
  id: z.string(),
@@ -960,11 +1127,13 @@ export const TaskListItem = lazySchema(() => z.looseObject({
960
1127
  actId: z.string(),
961
1128
  actName: z.string().nullable().optional(),
962
1129
  name: z.string(),
1130
+ title: z.string().nullable().optional(),
963
1131
  username: z.string().nullable().optional(),
964
1132
  actUsername: z.string().nullable().optional(),
965
1133
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
966
1134
  modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
967
1135
  stats: TaskStats().nullable().optional(),
1136
+ isPublic: z.boolean().optional(),
968
1137
  }));
969
1138
  export const ListOfTasks = lazySchema(() => PaginationResponse().extend({
970
1139
  items: z.array(TaskListItem()),
@@ -979,6 +1148,8 @@ export const TaskOptions = lazySchema(() => z.looseObject({
979
1148
  maxItems: z.int().nullable().optional(),
980
1149
  maxTotalChargeUsd: z.number().nullable().optional(),
981
1150
  restartOnError: z.boolean().nullable().optional(),
1151
+ isMaxTotalChargeUsdSetByUser: z.boolean().nullable().optional(),
1152
+ forcePermissionLevel: ActorPermissionLevel().nullable().optional(),
982
1153
  }));
983
1154
  /**
984
1155
  * The input configuration for the Actor task. This is a user-defined JSON object
@@ -997,6 +1168,12 @@ export const TaskPublicConfig = lazySchema(() => z.looseObject({
997
1168
  inputSchemaFields: z.array(z.string()).nullable().optional(),
998
1169
  datasetName: z.string().nullable().optional(),
999
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(),
1000
1177
  }));
1001
1178
  export const CreateTaskRequest = lazySchema(() => z.looseObject({
1002
1179
  actId: z.string(),
@@ -1013,6 +1190,7 @@ export const Task = lazySchema(() => z.looseObject({
1013
1190
  userId: z.string(),
1014
1191
  actId: z.string(),
1015
1192
  name: z.string(),
1193
+ nameLowerCase: z.string().optional(),
1016
1194
  username: z.string().nullable().optional(),
1017
1195
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1018
1196
  modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
@@ -1041,24 +1219,6 @@ export const UpdateTaskRequest = lazySchema(() => z.looseObject({
1041
1219
  publicConfig: TaskPublicConfig().optional(),
1042
1220
  isPublic: z.boolean().optional(),
1043
1221
  }));
1044
- export const WebhookResource = lazySchema(() => z.looseObject({
1045
- id: z.string(),
1046
- createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1047
- modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1048
- userId: z.string(),
1049
- isAdHoc: z.boolean().nullable().optional(),
1050
- shouldInterpolateStrings: z.boolean().nullable().optional(),
1051
- eventTypes: z.array(WebhookEventType()),
1052
- condition: WebhookCondition(),
1053
- ignoreSslErrors: z.boolean(),
1054
- doNotRetry: z.boolean().nullable().optional(),
1055
- requestUrl: z.url({ normalize: true }).nullable().optional(),
1056
- payloadTemplate: z.string().nullable().optional(),
1057
- headersTemplate: z.string().nullable().optional(),
1058
- description: z.string().nullable().optional(),
1059
- lastDispatch: WebhookLastDispatch().nullable().optional(),
1060
- stats: WebhookStats().nullable().optional(),
1061
- }));
1062
1222
  export const UpdateRunRequest = lazySchema(() => z.looseObject({
1063
1223
  runId: z.string().optional(),
1064
1224
  statusMessage: z.string().optional(),
@@ -1068,18 +1228,62 @@ export const UpdateRunRequest = lazySchema(() => z.looseObject({
1068
1228
  export const ChargeRunRequest = lazySchema(() => z.looseObject({
1069
1229
  eventName: z.string(),
1070
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(),
1071
1253
  }));
1072
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
+ }));
1073
1277
  export const ListOfKeyValueStores = lazySchema(() => PaginationResponse().extend({
1074
1278
  unnamed: z.boolean().optional(),
1075
- items: z.array(KeyValueStoreResource()),
1279
+ items: z.array(KeyValueStoreListItem()),
1076
1280
  }));
1077
1281
  export const ListOfKeyValueStoresResponse = lazySchema(() => z.looseObject({
1078
1282
  data: ListOfKeyValueStores(),
1079
1283
  }));
1080
1284
  export const DatasetListItem = lazySchema(() => z.looseObject({
1081
1285
  id: z.string(),
1082
- name: z.string(),
1286
+ name: z.string().nullable().optional(),
1083
1287
  userId: z.string(),
1084
1288
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1085
1289
  modifiedAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
@@ -1100,12 +1304,22 @@ export const ListOfDatasets = lazySchema(() => PaginationResponse().extend({
1100
1304
  export const ListOfDatasetsResponse = lazySchema(() => z.looseObject({
1101
1305
  data: ListOfDatasets(),
1102
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
+ }));
1103
1316
  /** A shortened request queue object for list responses. */
1104
1317
  export const RequestQueueListItem = lazySchema(() => z.looseObject({
1105
1318
  id: QueueId(),
1106
- name: z.string(),
1319
+ name: z.string().nullable().optional(),
1320
+ title: z.string().nullable().optional(),
1107
1321
  userId: QueueUserId(),
1108
- username: z.string(),
1322
+ username: z.string().optional(),
1109
1323
  createdAt: QueueCreatedAt(),
1110
1324
  modifiedAt: QueueModifiedAt(),
1111
1325
  accessedAt: QueueAccessedAt(),
@@ -1117,7 +1331,7 @@ export const RequestQueueListItem = lazySchema(() => z.looseObject({
1117
1331
  actRunId: z.string().nullable().optional(),
1118
1332
  hadMultipleClients: HadMultipleClients(),
1119
1333
  generalAccess: GeneralAccess().nullable().optional(),
1120
- stats: RequestQueueStats().optional(),
1334
+ stats: RequestQueueListStats().optional(),
1121
1335
  }));
1122
1336
  /** A paginated list of request queues. */
1123
1337
  export const ListOfRequestQueues = lazySchema(() => PaginationResponse().extend({
@@ -1128,6 +1342,37 @@ export const ListOfRequestQueues = lazySchema(() => PaginationResponse().extend(
1128
1342
  export const ListOfRequestQueuesResponse = lazySchema(() => z.looseObject({
1129
1343
  data: ListOfRequestQueues(),
1130
1344
  }));
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
+ }));
1131
1376
  export const CreateWebhookRequest = lazySchema(() => z.looseObject({
1132
1377
  isAdHoc: z.boolean().nullable().optional(),
1133
1378
  eventTypes: z.array(WebhookEventType()),
@@ -1159,10 +1404,16 @@ export const UpdateWebhookRequest = lazySchema(() => z.looseObject({
1159
1404
  }));
1160
1405
  /** A summary of the webhook that triggered this dispatch. */
1161
1406
  export const WebhookDispatchWebhookSummary = lazySchema(() => z.looseObject({
1407
+ _id: z.string().optional(),
1162
1408
  actionType: z.string().optional(),
1163
1409
  condition: WebhookCondition().optional(),
1164
1410
  requestUrl: z.url({ normalize: true }).nullable().optional(),
1165
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(),
1166
1417
  }));
1167
1418
  export const WebhookDispatch = lazySchema(() => z.looseObject({
1168
1419
  id: z.string(),
@@ -1184,6 +1435,7 @@ export const WebhookDispatch = lazySchema(() => z.looseObject({
1184
1435
  errorMessage: z.string().nullable().optional(),
1185
1436
  responseStatus: z.int().nullable().optional(),
1186
1437
  responseBody: z.string().nullable().optional(),
1438
+ debugPostMessage: z.record(z.string(), z.unknown()).optional(),
1187
1439
  })).optional(),
1188
1440
  }));
1189
1441
  export const WebhookDispatchResponse = lazySchema(() => z.looseObject({
@@ -1208,6 +1460,10 @@ export const ScheduleBase = lazySchema(() => z.looseObject({
1208
1460
  nextRunAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
1209
1461
  lastRunAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).nullable().optional(),
1210
1462
  }));
1463
+ /** Notification settings for this schedule. */
1464
+ export const ScheduleNotifications = lazySchema(() => z.looseObject({
1465
+ email: z.boolean().optional(),
1466
+ }));
1211
1467
  export const ScheduleListItemActionRunActor = lazySchema(() => z.looseObject({
1212
1468
  id: z.string(),
1213
1469
  type: z.literal("RUN_ACTOR"),
@@ -1220,6 +1476,9 @@ export const ScheduleListItemActionRunActorTask = lazySchema(() => z.looseObject
1220
1476
  }));
1221
1477
  export const ScheduleListItemAction = lazySchema(() => z.discriminatedUnion("type", [ScheduleListItemActionRunActor(), ScheduleListItemActionRunActorTask()]));
1222
1478
  export const ScheduleListItem = lazySchema(() => ScheduleBase().extend({
1479
+ title: z.string().nullable().optional(),
1480
+ notifications: ScheduleNotifications().optional(),
1481
+ integrationTracking: IntegrationTracking().optional(),
1223
1482
  actions: z.array(ScheduleListItemAction()),
1224
1483
  }));
1225
1484
  export const ListOfSchedules = lazySchema(() => PaginationResponse().extend({
@@ -1252,8 +1511,17 @@ export const CreateOrUpdateScheduleRequest = lazySchema(() => z.looseObject({
1252
1511
  timezone: z.string().nullable().optional(),
1253
1512
  description: z.string().nullable().optional(),
1254
1513
  title: z.string().nullable().optional(),
1514
+ notifications: ScheduleNotifications().optional(),
1255
1515
  actions: z.array(ScheduleCreateAction()).nullable().optional(),
1256
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());
1257
1525
  export const ScheduleActionRunActor = lazySchema(() => z.looseObject({
1258
1526
  id: z.string(),
1259
1527
  type: z.literal("RUN_ACTOR"),
@@ -1271,9 +1539,9 @@ export const ScheduleAction = lazySchema(() => z.discriminatedUnion("type", [Sch
1271
1539
  export const Schedule = lazySchema(() => ScheduleBase().extend({
1272
1540
  description: z.string().nullable().optional(),
1273
1541
  title: z.string().nullable().optional(),
1274
- notifications: z.looseObject({
1275
- email: z.boolean().optional(),
1276
- }).optional(),
1542
+ notifications: ScheduleNotifications().optional(),
1543
+ uiState: ScheduleUiState().optional(),
1544
+ integrationTracking: IntegrationTracking().optional(),
1277
1545
  actions: z.array(ScheduleAction()),
1278
1546
  }));
1279
1547
  export const ScheduleResponse = lazySchema(() => z.looseObject({
@@ -1298,11 +1566,15 @@ export const CurrentPricingInfo = lazySchema(() => z.looseObject({
1298
1566
  forceContainsSignificantPriceChange: z.boolean().optional(),
1299
1567
  isPPEPlatformUsagePaidByUser: z.boolean().optional(),
1300
1568
  reasonForChange: z.string().nullable().optional(),
1301
- trialMinutes: z.int().nullable().optional(),
1302
- unitName: z.string().nullable().optional(),
1303
- pricePerUnitUsd: z.number().nullable().optional(),
1304
1569
  minimalMaxTotalChargeUsd: z.number().nullable().optional(),
1305
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(),
1306
1578
  }));
1307
1579
  export const StoreActor = lazySchema(() => z.looseObject({
1308
1580
  id: z.string(),
@@ -1316,14 +1588,27 @@ export const StoreActor = lazySchema(() => z.looseObject({
1316
1588
  pictureUrl: z.string().nullable().optional(),
1317
1589
  userPictureUrl: z.url({ normalize: true }).nullable().optional(),
1318
1590
  url: z.url({ normalize: true }).nullable().optional(),
1319
- stats: ActorStats(),
1591
+ stats: z.looseObject({
1592
+ totalUsers: z.int(),
1593
+ totalRuns: z.int().optional(),
1594
+ totalUsers7Days: z.int().optional(),
1595
+ totalUsers30Days: z.int().optional(),
1596
+ totalUsers90Days: z.int().optional(),
1597
+ actorReviewRating: z.number(),
1598
+ actorReviewCount: z.int(),
1599
+ }),
1320
1600
  currentPricingInfo: CurrentPricingInfo().optional(),
1321
1601
  isWhiteListedForAgenticPayments: z.boolean().nullable().optional(),
1322
- actorReviewCount: z.int().optional(),
1323
- actorReviewRating: z.number().optional(),
1324
- bookmarkCount: z.int().optional(),
1602
+ isVerified: z.boolean().optional(),
1325
1603
  badge: z.string().nullable().optional(),
1326
1604
  readmeSummary: z.string().optional(),
1605
+ inputSchema: z.looseObject({
1606
+ type: z.string(),
1607
+ properties: z.record(z.string(), z.looseObject({
1608
+ type: z.union([z.string(), z.array(z.string())]).optional(),
1609
+ })),
1610
+ required: z.array(z.string()).optional(),
1611
+ }).optional(),
1327
1612
  }));
1328
1613
  export const ListOfStoreActors = lazySchema(() => PaginationResponse().extend({
1329
1614
  items: z.array(StoreActor()),
@@ -1348,12 +1633,14 @@ export const UserPublicInfoResponse = lazySchema(() => z.looseObject({
1348
1633
  data: UserPublicInfo(),
1349
1634
  }));
1350
1635
  export const ProxyGroup = lazySchema(() => z.looseObject({
1636
+ id: z.string().optional(),
1351
1637
  name: z.string(),
1352
1638
  description: z.string().nullable(),
1353
- availableCount: z.int(),
1639
+ availableCount: z.int().optional(),
1354
1640
  }));
1641
+ /** Proxy access info. Omitted when the user has no access to Apify Proxy. */
1355
1642
  export const ProxyResource = lazySchema(() => z.looseObject({
1356
- password: z.string(),
1643
+ password: z.string().nullable().optional(),
1357
1644
  groups: z.array(ProxyGroup()),
1358
1645
  }));
1359
1646
  /**
@@ -1388,6 +1675,17 @@ export const UserPlan = lazySchema(() => z.looseObject({
1388
1675
  maxScheduleCount: z.int().optional(),
1389
1676
  maxConcurrentActorRuns: z.int().optional(),
1390
1677
  planPricing: z.record(z.string(), z.unknown()).optional(),
1678
+ planVersion: z.number().optional(),
1679
+ legacyPlanId: z.string().optional(),
1680
+ planTags: z.array(z.string()).optional(),
1681
+ overageThresholdUsd: z.number().optional(),
1682
+ maxMonthlyUnblockerUnits: z.int().optional(),
1683
+ maxPublicActorTaskCount: z.int().optional(),
1684
+ maxPublicActorTaskCountPerActor: z.int().optional(),
1685
+ forceBillingInterval: z.string().optional(),
1686
+ personalizedSupport: z.string().nullable().optional(),
1687
+ monitoringLevel: z.enum(["STANDARD"]).or(z.string()).nullable().optional(),
1688
+ isPayingCustomer: z.boolean().optional(),
1391
1689
  }));
1392
1690
  export const EffectivePlatformFeature = lazySchema(() => z.looseObject({
1393
1691
  isEnabled: z.boolean(),
@@ -1412,16 +1710,28 @@ export const UserPrivateInfo = lazySchema(() => z.looseObject({
1412
1710
  id: z.string().optional(),
1413
1711
  username: z.string(),
1414
1712
  profile: UserProfile().optional(),
1415
- email: z.string().optional(),
1713
+ email: z.string().nullable().optional(),
1416
1714
  proxy: ProxyResource().optional(),
1417
1715
  plan: UserPlan().optional(),
1418
1716
  effectivePlatformFeatures: EffectivePlatformFeatures().optional(),
1419
1717
  createdAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()).optional(),
1420
1718
  isPaying: z.boolean().optional(),
1719
+ organizationOwnerUserId: z.string().nullable().optional(),
1421
1720
  }));
1422
1721
  export const UserPrivateInfoResponse = lazySchema(() => z.looseObject({
1423
1722
  data: UserPrivateInfo(),
1424
1723
  }));
1724
+ /** Reduced user data with only the fields Apify Proxy reads. */
1725
+ export const UserProxyInfo = lazySchema(() => z.looseObject({
1726
+ plan: z.looseObject({
1727
+ availableProxyGroups: AvailableProxyGroups(),
1728
+ }),
1729
+ effectivePlatformFeatures: EffectivePlatformFeatures(),
1730
+ isPaying: z.boolean(),
1731
+ }));
1732
+ export const UserProxyInfoResponse = lazySchema(() => z.looseObject({
1733
+ data: UserProxyInfo(),
1734
+ }));
1425
1735
  export const UsageCycle = lazySchema(() => z.looseObject({
1426
1736
  startAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
1427
1737
  endAt: z.iso.datetime({ offset: true }).pipe(z.coerce.date()),
@@ -1472,6 +1782,7 @@ export const Limits = lazySchema(() => z.looseObject({
1472
1782
  maxTeamAccountSeatCount: z.int(),
1473
1783
  dataRetentionDays: z.int(),
1474
1784
  maxScheduleCount: z.int().optional(),
1785
+ maxMonthlyUnblockerUnits: z.number().optional(),
1475
1786
  }));
1476
1787
  export const CurrentUsage = lazySchema(() => z.looseObject({
1477
1788
  monthlyUsageUsd: z.number(),
@@ -1485,6 +1796,7 @@ export const CurrentUsage = lazySchema(() => z.looseObject({
1485
1796
  activeActorJobCount: z.int(),
1486
1797
  teamAccountSeatCount: z.int(),
1487
1798
  scheduleCount: z.int().optional(),
1799
+ monthlyUnblockerUnits: z.number().optional(),
1488
1800
  }));
1489
1801
  export const AccountLimits = lazySchema(() => z.looseObject({
1490
1802
  monthlyUsageCycle: UsageCycle(),
@@ -1498,6 +1810,52 @@ export const UpdateLimitsRequest = lazySchema(() => z.looseObject({
1498
1810
  maxMonthlyUsageUsd: z.number().optional(),
1499
1811
  dataRetentionDays: z.int().optional(),
1500
1812
  }));
1813
+ /** A place the user can create a repository in, such as their own account or an organization, group or workspace they can access. */
1814
+ export const GitProviderWorkspace = lazySchema(() => z.looseObject({
1815
+ id: z.string(),
1816
+ label: z.string(),
1817
+ }));
1818
+ /** A connected git provider account the user can create repositories through. */
1819
+ export const GitProviderIntegration = lazySchema(() => z.looseObject({
1820
+ id: z.string(),
1821
+ provider: z.enum(["github", "gitlab", "bitbucket"]).or(z.string()),
1822
+ workspaces: z.array(GitProviderWorkspace()),
1823
+ addWorkspaceUrl: z.string().optional(),
1824
+ }));
1825
+ export const ListOfGitProviderIntegrationsResponse = lazySchema(() => z.looseObject({
1826
+ data: z.array(GitProviderIntegration()),
1827
+ }));
1828
+ /** A file to commit into the new repository. */
1829
+ export const GitRepoFile = lazySchema(() => z.looseObject({
1830
+ path: z.string(),
1831
+ content: z.string(),
1832
+ encoding: z.enum(["utf-8", "base64"]).or(z.string()),
1833
+ }));
1834
+ export const CreateGitRepoRequest = lazySchema(() => z.looseObject({
1835
+ workspace: z.string(),
1836
+ repoName: z.string(),
1837
+ isPrivate: z.boolean(),
1838
+ files: z.array(GitRepoFile()).optional(),
1839
+ templateArchiveUrl: z.string().optional(),
1840
+ }));
1841
+ /** URLs of a newly created repository. */
1842
+ export const GitRepo = lazySchema(() => z.looseObject({
1843
+ sshUrl: z.string(),
1844
+ httpsUrl: z.string(),
1845
+ htmlUrl: z.string(),
1846
+ }));
1847
+ export const GitRepoResponse = lazySchema(() => z.looseObject({
1848
+ data: GitRepo(),
1849
+ }));
1850
+ export const RegisterDeploymentKeyRequest = lazySchema(() => z.looseObject({
1851
+ actorId: z.string(),
1852
+ repoName: z.string(),
1853
+ }));
1854
+ export const RegisterDeploymentKeyResponse = lazySchema(() => z.looseObject({
1855
+ data: z.looseObject({
1856
+ repoName: z.string(),
1857
+ }),
1858
+ }));
1501
1859
  export const BrowserInfoResponse = lazySchema(() => z.looseObject({
1502
1860
  method: z.string(),
1503
1861
  clientIp: z.string().nullable(),