diff --git a/CHANGELOG.md b/CHANGELOG.md index 1741404..5f15268 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## 0.11.0 + +- Updated to the Apify OpenAPI specification `v2-2026-12-03T122505Z`: regenerated the embedded + response schemas (more nullable fields, reduced `stats` of a Store Actor). +- Added `ActorStoreListItem.UserFullName`, `Description`, `Categories`, `IsVerified`, and `Stats`. +- Added `StoreCollectionClient.SearchAsync`, `StoreSearchOptions`, and `StoreSearchResult` for the Store search, which + the API answers with one page of at most 100 Actors and cannot be paged. +- **Breaking:** removed `StoreListOptions.Search` (use `SearchAsync`), `AllowsAgenticUsers` (no longer in the + specification), and `SortBy` (the API ignores it; Actors come in Store order, so sort the results on the client). + `IterateAsync` no longer searches. +- Added `RunClient.GetStreamedLog(toLog, since)` and `StreamedLog.LastRedirectedAt`. A log stream that breaks off + while the run goes on is reopened, and the redirection continues after the last redirected message. +- An error that a streamed log cannot recover from now ends the redirection with a warning on the standard error + output instead of failing `StreamedLog.StopAsync` and `CallAsync`. +- Documented that a signed public URL of a dataset or key list grants read access to all of it, and that its options + only set the default shape of the response. +- `ActorVersionCollectionClient.CreateAsync` and `ActorVersionClient.UpdateAsync` use the `Long` timeout tier. + ## 0.10.1 - Updated to the Apify OpenAPI specification `v2-2026-11-18T151559Z`. User responses with the reduced shape that diff --git a/docs/actors.md b/docs/actors.md index e2ed340..4c0f6ca 100644 --- a/docs/actors.md +++ b/docs/actors.md @@ -213,14 +213,15 @@ collection clients these methods take no filtering/paging options. - `IterateAsync()` → `IAsyncEnumerable`: iterate the versions; exists for API parity with the other collection iterators (the endpoint has only the one page). - `CreateAsync(object version)`: create a version from any JSON-serializable definition. Returns - `ActorVersion`. + `ActorVersion`. Uses the `Long` timeout tier, since the version can carry its source files. ### Single version: `client.Actor(id).Version(versionNumber)` → `ActorVersionClient` `versionNumber` is the version identifier (e.g. `0.1`). - `GetAsync()` → `ActorVersion?` (null if not found). -- `UpdateAsync(object newFields)` → `ActorVersion`: update with any JSON-serializable set of fields. +- `UpdateAsync(object newFields)` → `ActorVersion`: update with any JSON-serializable set of fields. Uses the `Long` + timeout tier, since the version can carry its source files. - `DeleteAsync()`. - `EnvVars()` → `ActorEnvVarCollectionClient`: this version's environment-variable collection. - `EnvVar(string name)` → `ActorEnvVarClient`: a single environment variable of this version. diff --git a/docs/misc.md b/docs/misc.md index 4c10b5c..1d75fc7 100644 --- a/docs/misc.md +++ b/docs/misc.md @@ -5,28 +5,38 @@ ## Apify Store: `client.Store()` -Browse public Actors in the [Apify Store](https://apify.com/store). +Browse and search public Actors in [Apify Store](https://apify.com/store). The API serves the Store in two +ways, and the client has one set of methods for each. -- `ListAsync(StoreListOptions? options = null)` → `PaginationList` (one page). -- `IterateAsync(StoreListOptions? options = null)` → `IAsyncEnumerable` (lazy, all - pages; `Limit` caps the total number of Actors yielded and `ChunkSize` sets the page size). +- `ListAsync(StoreListOptions? options = null)` → `PaginationList` (one page, in Store order). +- `IterateAsync(StoreListOptions? options = null)` → `IAsyncEnumerable` (lazy, all pages; + `Limit` caps the total number of Actors yielded and `ChunkSize` sets the page size). +- `SearchAsync(StoreSearchOptions options)` → `StoreSearchResult`: the Actors that match a query best, by relevance. -`StoreListOptions` fields: +`StoreListOptions` and `StoreSearchOptions` share the filters `Category`, `Username`, `PricingModel`, +`IncludeUnrunnableActors`, `IncludeInputSchema`, and `ResponseFormat`. `StoreListOptions` fields: | Field | Type | Description | |---|---|---| | `Offset` | `int?` | Number of Actors to skip from the start. | -| `Limit` | `int?` | Maximum number of Actors to return (for `IterateAsync`, in total across all pages). | +| `Limit` | `int?` | Maximum number of Actors to return (for `IterateAsync`, in total across all pages). The API's maximum is 1000. | | `ChunkSize` | `int?` | Page size used by `IterateAsync` (positive; the smaller of this and the remaining `Limit` is requested per call). Never sent to the API. | -| `Search` | `string?` | Full-text search string to filter Actors by. | -| `SortBy` | `string?` | Field to sort by (e.g. `popularity`, `newest`). | -| `Category` | `string?` | Restrict results to a Store category. | +| `Category` | `string?` | Restrict results to Store category IDs, comma-separated and case-insensitive (for example `AI_AND_ML,ECOMMERCE`); an Actor has to match all of them. An unknown category fails with a `400` error. | | `Username` | `string?` | Restrict results to a given owner's Actors. | | `PricingModel` | `string?` | Filter by pricing model (`FREE`, `PRICE_PER_DATASET_ITEM`, `PAY_PER_EVENT`; the rental model `FLAT_PRICE_PER_MONTH` is no longer supported). | -| `IncludeUnrunnableActors` | `bool?` | Include Actors that cannot currently be run. | -| `AllowsAgenticUsers` | `bool?` | Only Actors that permit agentic (automated) users. | -| `IncludeInputSchema` | `bool?` | Include each Actor's compact `inputSchema` (read it with `Get("inputSchema")`). The API then caps `limit` at 10, so iteration requests pages of at most 10. | -| `ResponseFormat` | `string?` | Requested response format. | +| `IncludeUnrunnableActors` | `bool?` | Include Actors that are not safe to run automatically, such as Actors of developers who have not passed KYC or full-permission Actors without a large user base. They are left out by default. | +| `IncludeInputSchema` | `bool?` | Include each Actor's compact `inputSchema` (read it with `Get("inputSchema")`). The API rejects a `limit` above 10 with a `400` error, so `ListAsync` with a larger `Limit` fails, and iteration requests pages of at most 10. | +| `ResponseFormat` | `string?` | `full` (default) returns the complete response. `agent` returns a reduced field set for LLM consumers: `id`, `title`, `name`, `username`, `description`, `notice`, `badge`, `categories`, and minimal `stats`. | + +The API answers a search with one page of at most 100 Actors, ordered by relevance. It ignores `offset`, and it +reports the number of Actors returned as the total. A search therefore cannot be paged or iterated, and +`SearchAsync` makes one request. It throws `ArgumentException` for a missing or empty `Search` and +`ArgumentOutOfRangeException` for a zero or negative `Limit`, before sending any request. + +`StoreSearchOptions` has `Search` (required), `Limit` (the API's default and maximum is 100), and the shared filters. +With `IncludeInputSchema` the API rejects a `Limit` above 10 with a `400` error. `StoreSearchResult` has `Items` +(best match first) and `Limit`, the number of Actors the API allowed. When `Items` holds that many, more Actors may +match, so narrow the query with a more specific `Search` or with the filters. ```csharp using System; @@ -34,7 +44,8 @@ using Apify.Client; using Apify.Client.Options; var client = new ApifyClient("my-api-token"); -await foreach (var item in client.Store().IterateAsync(new StoreListOptions { Search = "crawler", Limit = 50 })) +var result = await client.Store().SearchAsync(new StoreSearchOptions { Search = "crawler", Limit = 50 }); +foreach (var item in result.Items) { Console.WriteLine(item.Name); } diff --git a/docs/models.md b/docs/models.md index 8af45ef..aa5783e 100644 --- a/docs/models.md +++ b/docs/models.md @@ -114,6 +114,11 @@ An entry returned when browsing the Apify Store. | `Name` | `string?` | The Actor's technical name. | | `Username` | `string?` | Username of the Actor's owner. | | `Title` | `string?` | Human-readable title. | +| `UserFullName` | `string?` | Full name of the Actor's owner. | +| `Description` | `string?` | The Actor's description. | +| `Categories` | `IReadOnlyList?` | Store category IDs of the Actor. | +| `IsVerified` | `bool?` | Whether the Actor's developer has a verified identity. | +| `Stats` | `JsonObject?` | Usage statistics and Store metrics: `totalUsers`, `totalRuns`, `totalUsers7Days`, `totalUsers30Days`, `totalUsers90Days`, `actorReviewRating`, and `actorReviewCount`. | ## `ActorTask` diff --git a/docs/runs.md b/docs/runs.md index d313661..d40ceaa 100644 --- a/docs/runs.md +++ b/docs/runs.md @@ -42,6 +42,17 @@ collections, not by task runs). - `GetStreamedLog(Action toLog, bool fromStart = true)` → `StreamedLog`: redirects the run's live log to `toLog` one complete message at a time. Call `Start()` to begin and `StopAsync()` (or dispose) to end. `fromStart: false` skips messages older than the helper's creation. +- `GetStreamedLog(Action toLog, DateTimeOffset? since)` → `StreamedLog`: redirects only the messages logged at + `since` or later (`null` redirects the whole log). `StreamedLog.LastRedirectedAt` is the timestamp of the last + redirected message. To continue the redirection after a restart, save it and pass it as `since`: messages logged at + exactly that time are redirected again, and passing one millisecond later could skip messages that share that + millisecond but were not redirected yet. + +With either overload, and with the `log` argument of `CallAsync`, a log stream that breaks off while the run goes +on is reopened after a one-second pause, and the messages already redirected are skipped. The reopened stream +downloads the whole log again, because the API cannot start from a given point. An error the redirection cannot +recover from, such as a failed reopen, ends it with a warning on the standard error output and does not fail the +call. ### Option and charge types diff --git a/docs/storages.md b/docs/storages.md index 87a869f..466c718 100644 --- a/docs/storages.md +++ b/docs/storages.md @@ -41,7 +41,7 @@ reached from a run (`client.Run(id).Dataset()`, `.KeyValueStore()`, `.RequestQue serialization). Anything else, such as a bare number or an array of non-objects, throws `ArgumentException` before a request is sent, because the API accepts only objects. - `GetStatisticsAsync()` → `JsonObject` (throws if the dataset does not exist). -- `CreateItemsPublicUrlAsync(DatasetListItemsOptions? options = null, int? expiresInSecs = null, DownloadItemsFormat? format = null)` → `string` (a signed public URL; `format` defaults to `Json`; `expiresInSecs` must be positive, leave it out for a URL that never expires, otherwise `ArgumentOutOfRangeException` is thrown before any request). +- `CreateItemsPublicUrlAsync(DatasetListItemsOptions? options = null, int? expiresInSecs = null, DownloadItemsFormat? format = null)` → `string` (a signed public URL; it grants read access to the whole dataset until it expires, and the options only set the default shape of the response, which anyone holding the URL can change; `format` defaults to `Json`; `expiresInSecs` must be positive, leave it out for a URL that never expires, otherwise `ArgumentOutOfRangeException` is thrown before any request). `DatasetListItemsOptions` selects and reshapes items: `Offset`/`Limit` (pagination: `Limit` is the number of dataset rows read, in total across pages when iterating; `0` or unset means no cap), `ChunkSize` (the page @@ -116,7 +116,7 @@ await csvStream.CopyToAsync(file); `SetRecordJsonAsync(string key, object? value)` (serializes `value` to JSON bytes). - `DeleteRecordAsync(string key)`. - `GetRecordPublicUrlAsync(string key)` → `string` and - `CreateKeysPublicUrlAsync(ListKeysOptions? options = null, int? expiresInSecs = null)` → `string` (both signed public URLs; `expiresInSecs` must be positive, leave it out for a URL that never expires, otherwise `ArgumentOutOfRangeException` is thrown before any request). + `CreateKeysPublicUrlAsync(ListKeysOptions? options = null, int? expiresInSecs = null)` → `string` (both signed public URLs; the keys URL grants read access to the full key list until it expires, and its options only set the default shape of the response, which anyone holding the URL can change; `expiresInSecs` must be positive, leave it out for a URL that never expires, otherwise `ArgumentOutOfRangeException` is thrown before any request). `ListKeysOptions` fields: `Limit` (page size), `ExclusiveStartKey` (start after this key), `Prefix` (only keys with this prefix), `Collection` (a named record collection), and `Signature` diff --git a/src/Apify.Client/Apify.Client.csproj b/src/Apify.Client/Apify.Client.csproj index 6b3fdbe..9051b75 100644 --- a/src/Apify.Client/Apify.Client.csproj +++ b/src/Apify.Client/Apify.Client.csproj @@ -6,7 +6,7 @@ Apify.Client - 0.10.1 + 0.11.0 Apify Apify Apify API client for .NET diff --git a/src/Apify.Client/ApifyClientVersion.cs b/src/Apify.Client/ApifyClientVersion.cs index cd853b6..af343d6 100644 --- a/src/Apify.Client/ApifyClientVersion.cs +++ b/src/Apify.Client/ApifyClientVersion.cs @@ -14,11 +14,11 @@ public static class ApifyClientVersion /// The semantic version of this client library (see https://semver.org/). Changes to the public /// interface other than additive ones are considered breaking changes. /// - public const string ClientVersion = "0.10.1"; + public const string ClientVersion = "0.11.0"; /// /// The version of the Apify OpenAPI specification this client was generated and verified against. /// Corresponds to the info.version field of the Apify OpenAPI document. /// - public const string ApiSpecVersion = "v2-2026-11-18T151559Z"; + public const string ApiSpecVersion = "v2-2026-12-03T122505Z"; } diff --git a/src/Apify.Client/Internal/PagedIteration.cs b/src/Apify.Client/Internal/PagedIteration.cs index e245588..0bfd4ed 100644 --- a/src/Apify.Client/Internal/PagedIteration.cs +++ b/src/Apify.Client/Internal/PagedIteration.cs @@ -29,7 +29,7 @@ internal static class PagedIteration /// The most items (or rows, see ) across all pages, or null/0 for no cap. /// /// Whether counts the rows scanned (dataset items) rather than the items returned - /// (listings, where the API can scan more rows than it returns, such as the Store dropping Actors the caller cannot run). + /// (listings, where the API can scan more rows than it returns, such as the Store dropping Actors that are not safe to run automatically). /// /// The most rows to request per call, or null for the API default. /// Fetches one page given its offset and limit (null limit: leave it out). diff --git a/src/Apify.Client/Internal/ResponseSchemas.json b/src/Apify.Client/Internal/ResponseSchemas.json index 3b320d8..2149479 100644 --- a/src/Apify.Client/Internal/ResponseSchemas.json +++ b/src/Apify.Client/Internal/ResponseSchemas.json @@ -1 +1 @@ -{"operations":{"DELETE /v2/actor-runs/{runId}/request-queue/requests/batch":{"$ref":"#/components/schemas/BatchDeleteResponse"},"DELETE /v2/actor-tasks/{actorTaskId}":{"type":"object"},"DELETE /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests/batch":{"$ref":"#/components/schemas/BatchDeleteResponse"},"DELETE /v2/actors/{actorId}":{"type":"object"},"DELETE /v2/actors/{actorId}/runs/last/request-queue/requests/batch":{"$ref":"#/components/schemas/BatchDeleteResponse"},"DELETE /v2/actors/{actorId}/versions/{versionNumber}":{"type":"object"},"DELETE /v2/actors/{actorId}/versions/{versionNumber}/env-vars/{envVarName}":{"type":"object"},"DELETE /v2/browser-info":{"$ref":"#/components/schemas/BrowserInfoResponse"},"DELETE /v2/request-queues/{queueId}/requests/batch":{"$ref":"#/components/schemas/BatchDeleteResponse"},"DELETE /v2/schedules/{scheduleId}":{"type":"object"},"DELETE /v2/webhooks/{webhookId}":{"type":"object"},"GET /v2/actor-builds":{"$ref":"#/components/schemas/ListOfBuildsResponse"},"GET /v2/actor-builds/{buildId}":{"allOf":[{"$ref":"#/components/schemas/BuildResponse"}]},"GET /v2/actor-builds/{buildId}/openapi.json":{"type":"object"},"GET /v2/actor-oauth-accounts/{accountId}":{"$ref":"#/components/schemas/ActorOAuthAccountResponse"},"GET /v2/actor-oauth-accounts/{connectionId}/accounts":{"$ref":"#/components/schemas/ListOfActorOAuthAccountsResponse"},"GET /v2/actor-runs":{"allOf":[{"$ref":"#/components/schemas/ListOfRunsResponse"}]},"GET /v2/actor-runs/{runId}":{"allOf":[{"$ref":"#/components/schemas/RunResponse"}]},"GET /v2/actor-runs/{runId}/dataset":{"$ref":"#/components/schemas/DatasetResponse"},"GET /v2/actor-runs/{runId}/dataset/items":{"items":{"type":"object"},"type":"array"},"GET /v2/actor-runs/{runId}/dataset/statistics":{"$ref":"#/components/schemas/DatasetStatisticsResponse"},"GET /v2/actor-runs/{runId}/key-value-store":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"GET /v2/actor-runs/{runId}/key-value-store/keys":{"$ref":"#/components/schemas/ListOfKeysResponse"},"GET /v2/actor-runs/{runId}/key-value-store/records/{recordKey}":{"$ref":"#/components/schemas/RecordResponse"},"GET /v2/actor-runs/{runId}/request-queue":{"$ref":"#/components/schemas/RequestQueueResponse"},"GET /v2/actor-runs/{runId}/request-queue/head":{"$ref":"#/components/schemas/RequestQueueHeadResponse"},"GET /v2/actor-runs/{runId}/request-queue/requests":{"$ref":"#/components/schemas/ListOfRequestsResponse"},"GET /v2/actor-runs/{runId}/request-queue/requests/{requestId}":{"$ref":"#/components/schemas/RequestResponse"},"GET /v2/actor-tasks":{"$ref":"#/components/schemas/ListOfTasksResponse"},"GET /v2/actor-tasks/{actorTaskId}":{"properties":{"data":{"$ref":"#/components/schemas/Task"}},"required":["data"],"type":"object"},"GET /v2/actor-tasks/{actorTaskId}/input":{"type":"object"},"GET /v2/actor-tasks/{actorTaskId}/run-sync":{"type":"object"},"GET /v2/actor-tasks/{actorTaskId}/run-sync-get-dataset-items":{"type":"object"},"GET /v2/actor-tasks/{actorTaskId}/runs":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/RunListItem"},"type":"array"}},"required":["items"],"type":"object"}]}},"required":["data"],"type":"object"},"GET /v2/actor-tasks/{actorTaskId}/runs/last":{"properties":{"data":{"$ref":"#/components/schemas/Run"}},"required":["data"],"type":"object"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/dataset":{"$ref":"#/components/schemas/DatasetResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/dataset/items":{"items":{"type":"object"},"type":"array"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/dataset/statistics":{"$ref":"#/components/schemas/DatasetStatisticsResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/key-value-store":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/key-value-store/keys":{"$ref":"#/components/schemas/ListOfKeysResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/key-value-store/records/{recordKey}":{"$ref":"#/components/schemas/RecordResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/request-queue":{"$ref":"#/components/schemas/RequestQueueResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/head":{"$ref":"#/components/schemas/RequestQueueHeadResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests":{"$ref":"#/components/schemas/ListOfRequestsResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests/{requestId}":{"$ref":"#/components/schemas/RequestResponse"},"GET /v2/actor-tasks/{actorTaskId}/webhooks":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookResource"},"type":"array"}},"required":["items"],"type":"object"}]}},"required":["data"],"type":"object"},"GET /v2/actors":{"$ref":"#/components/schemas/ListOfActorsResponse"},"GET /v2/actors/{actorId}":{"$ref":"#/components/schemas/ActorResponse"},"GET /v2/actors/{actorId}/builds":{"$ref":"#/components/schemas/ListOfBuildsResponse"},"GET /v2/actors/{actorId}/builds/default":{"$ref":"#/components/schemas/BuildResponse"},"GET /v2/actors/{actorId}/builds/{buildId}":{"$ref":"#/components/schemas/BuildResponse"},"GET /v2/actors/{actorId}/builds/{buildId}/openapi.json":{"type":"object"},"GET /v2/actors/{actorId}/oauth-connections":{"$ref":"#/components/schemas/ListOfActorOAuthConnectionsResponse"},"GET /v2/actors/{actorId}/run-sync":{"type":"object"},"GET /v2/actors/{actorId}/run-sync-get-dataset-items":{"items":{"type":"object"},"type":"array"},"GET /v2/actors/{actorId}/runs":{"$ref":"#/components/schemas/ListOfRunsResponse"},"GET /v2/actors/{actorId}/runs/last":{"$ref":"#/components/schemas/RunResponse"},"GET /v2/actors/{actorId}/runs/last/dataset":{"$ref":"#/components/schemas/DatasetResponse"},"GET /v2/actors/{actorId}/runs/last/dataset/items":{"items":{"type":"object"},"type":"array"},"GET /v2/actors/{actorId}/runs/last/dataset/statistics":{"$ref":"#/components/schemas/DatasetStatisticsResponse"},"GET /v2/actors/{actorId}/runs/last/key-value-store":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"GET /v2/actors/{actorId}/runs/last/key-value-store/keys":{"$ref":"#/components/schemas/ListOfKeysResponse"},"GET /v2/actors/{actorId}/runs/last/key-value-store/records/{recordKey}":{"$ref":"#/components/schemas/RecordResponse"},"GET /v2/actors/{actorId}/runs/last/request-queue":{"$ref":"#/components/schemas/RequestQueueResponse"},"GET /v2/actors/{actorId}/runs/last/request-queue/head":{"$ref":"#/components/schemas/RequestQueueHeadResponse"},"GET /v2/actors/{actorId}/runs/last/request-queue/requests":{"$ref":"#/components/schemas/ListOfRequestsResponse"},"GET /v2/actors/{actorId}/runs/last/request-queue/requests/{requestId}":{"$ref":"#/components/schemas/RequestResponse"},"GET /v2/actors/{actorId}/runs/{runId}":{"$ref":"#/components/schemas/RunResponse"},"GET /v2/actors/{actorId}/versions":{"$ref":"#/components/schemas/ListOfVersionsResponse"},"GET /v2/actors/{actorId}/versions/{versionNumber}":{"$ref":"#/components/schemas/VersionResponse"},"GET /v2/actors/{actorId}/versions/{versionNumber}/env-vars":{"$ref":"#/components/schemas/ListOfEnvVarsResponse"},"GET /v2/actors/{actorId}/versions/{versionNumber}/env-vars/{envVarName}":{"$ref":"#/components/schemas/EnvVarResponse"},"GET /v2/actors/{actorId}/webhooks":{"$ref":"#/components/schemas/ListOfWebhookResourcesResponse"},"GET /v2/browser-info":{"$ref":"#/components/schemas/BrowserInfoResponse"},"GET /v2/datasets":{"$ref":"#/components/schemas/ListOfDatasetsResponse"},"GET /v2/datasets/{datasetId}":{"$ref":"#/components/schemas/DatasetResponse"},"GET /v2/datasets/{datasetId}/items":{"items":{"type":"object"},"type":"array"},"GET /v2/datasets/{datasetId}/statistics":{"$ref":"#/components/schemas/DatasetStatisticsResponse"},"GET /v2/integrations/git":{"$ref":"#/components/schemas/ListOfGitProviderIntegrationsResponse"},"GET /v2/key-value-stores":{"$ref":"#/components/schemas/ListOfKeyValueStoresResponse"},"GET /v2/key-value-stores/{storeId}":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"GET /v2/key-value-stores/{storeId}/keys":{"$ref":"#/components/schemas/ListOfKeysResponse"},"GET /v2/key-value-stores/{storeId}/records/{recordKey}":{"$ref":"#/components/schemas/RecordResponse"},"GET /v2/request-queues":{"$ref":"#/components/schemas/ListOfRequestQueuesResponse"},"GET /v2/request-queues/{queueId}":{"$ref":"#/components/schemas/RequestQueueResponse"},"GET /v2/request-queues/{queueId}/head":{"$ref":"#/components/schemas/RequestQueueHeadResponse"},"GET /v2/request-queues/{queueId}/requests":{"$ref":"#/components/schemas/ListOfRequestsResponse"},"GET /v2/request-queues/{queueId}/requests/{requestId}":{"$ref":"#/components/schemas/RequestResponse"},"GET /v2/schedules":{"$ref":"#/components/schemas/ListOfSchedulesResponse"},"GET /v2/schedules/{scheduleId}":{"$ref":"#/components/schemas/ScheduleResponse"},"GET /v2/schedules/{scheduleId}/log":{"$ref":"#/components/schemas/ScheduleLogResponse"},"GET /v2/store":{"$ref":"#/components/schemas/ListOfStoreActorsResponse"},"GET /v2/users/me":{"anyOf":[{"$ref":"#/components/schemas/UserPrivateInfoResponse"},{"$ref":"#/components/schemas/UserProxyInfoResponse"}]},"GET /v2/users/me/limits":{"$ref":"#/components/schemas/AccountLimitsResponse"},"GET /v2/users/me/usage/monthly":{"$ref":"#/components/schemas/MonthlyUsageResponse"},"GET /v2/users/{userId}":{"anyOf":[{"$ref":"#/components/schemas/UserPublicInfoResponse"},{"$ref":"#/components/schemas/UserPrivateInfoResponse"},{"$ref":"#/components/schemas/UserProxyInfoResponse"}]},"GET /v2/users/{userId}/limits":{"$ref":"#/components/schemas/AccountLimitsResponse"},"GET /v2/users/{userId}/usage/monthly":{"$ref":"#/components/schemas/MonthlyUsageResponse"},"GET /v2/webhook-dispatches":{"$ref":"#/components/schemas/ListOfWebhookDispatchesResponse"},"GET /v2/webhook-dispatches/{dispatchId}":{"$ref":"#/components/schemas/WebhookDispatchResponse"},"GET /v2/webhooks":{"$ref":"#/components/schemas/ListOfWebhooksResponse"},"GET /v2/webhooks/{webhookId}":{"$ref":"#/components/schemas/WebhookResponse"},"GET /v2/webhooks/{webhookId}/dispatches":{"$ref":"#/components/schemas/ListOfWebhookDispatchesResponse"},"POST /v2/actor-builds/{buildId}/abort":{"allOf":[{"$ref":"#/components/schemas/BuildResponse"}]},"POST /v2/actor-runs/{runId}/abort":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actor-runs/{runId}/charge":{"type":"object"},"POST /v2/actor-runs/{runId}/dataset/items":{"type":"object"},"POST /v2/actor-runs/{runId}/key-value-store/records/{recordKey}":{"type":"object"},"POST /v2/actor-runs/{runId}/metamorph":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actor-runs/{runId}/reboot":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actor-runs/{runId}/request-queue/head/lock":{"$ref":"#/components/schemas/LockedRequestQueueHeadResponse"},"POST /v2/actor-runs/{runId}/request-queue/requests":{"$ref":"#/components/schemas/AddRequestResponse"},"POST /v2/actor-runs/{runId}/request-queue/requests/batch":{"$ref":"#/components/schemas/BatchAddResponse"},"POST /v2/actor-runs/{runId}/request-queue/requests/unlock":{"$ref":"#/components/schemas/UnlockRequestsResponse"},"POST /v2/actor-runs/{runId}/resurrect":{"allOf":[{"$ref":"#/components/schemas/RunResponse"}]},"POST /v2/actor-tasks":{"$ref":"#/components/schemas/TaskResponse"},"POST /v2/actor-tasks/{actorTaskId}/run-sync":{"type":"object"},"POST /v2/actor-tasks/{actorTaskId}/run-sync-get-dataset-items":{"type":"object"},"POST /v2/actor-tasks/{actorTaskId}/runs":{"properties":{"data":{"$ref":"#/components/schemas/Run"}},"required":["data"],"type":"object"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/abort":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/dataset/items":{"type":"object"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/key-value-store/records/{recordKey}":{"type":"object"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/metamorph":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/reboot":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/head/lock":{"$ref":"#/components/schemas/LockedRequestQueueHeadResponse"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests":{"$ref":"#/components/schemas/AddRequestResponse"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests/batch":{"$ref":"#/components/schemas/BatchAddResponse"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests/unlock":{"$ref":"#/components/schemas/UnlockRequestsResponse"},"POST /v2/actors":{"$ref":"#/components/schemas/ActorResponse"},"POST /v2/actors/{actorId}/builds":{"$ref":"#/components/schemas/BuildResponse"},"POST /v2/actors/{actorId}/builds/{buildId}/abort":{"$ref":"#/components/schemas/BuildResponse"},"POST /v2/actors/{actorId}/run-sync":{"type":"object"},"POST /v2/actors/{actorId}/run-sync-get-dataset-items":{"items":{"type":"object"},"type":"array"},"POST /v2/actors/{actorId}/runs":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actors/{actorId}/runs/last/abort":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actors/{actorId}/runs/last/dataset/items":{"type":"object"},"POST /v2/actors/{actorId}/runs/last/key-value-store/records/{recordKey}":{"type":"object"},"POST /v2/actors/{actorId}/runs/last/metamorph":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actors/{actorId}/runs/last/reboot":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actors/{actorId}/runs/last/request-queue/head/lock":{"$ref":"#/components/schemas/LockedRequestQueueHeadResponse"},"POST /v2/actors/{actorId}/runs/last/request-queue/requests":{"$ref":"#/components/schemas/AddRequestResponse"},"POST /v2/actors/{actorId}/runs/last/request-queue/requests/batch":{"$ref":"#/components/schemas/BatchAddResponse"},"POST /v2/actors/{actorId}/runs/last/request-queue/requests/unlock":{"$ref":"#/components/schemas/UnlockRequestsResponse"},"POST /v2/actors/{actorId}/runs/{runId}/abort":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actors/{actorId}/runs/{runId}/metamorph":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actors/{actorId}/runs/{runId}/resurrect":{"allOf":[{"$ref":"#/components/schemas/RunResponse"}]},"POST /v2/actors/{actorId}/validate-input":{"properties":{"valid":{"type":"boolean"}},"required":["valid"],"type":"object"},"POST /v2/actors/{actorId}/versions":{"$ref":"#/components/schemas/VersionResponse"},"POST /v2/actors/{actorId}/versions/{versionNumber}":{"$ref":"#/components/schemas/VersionResponse"},"POST /v2/actors/{actorId}/versions/{versionNumber}/env-vars":{"$ref":"#/components/schemas/EnvVarResponse"},"POST /v2/actors/{actorId}/versions/{versionNumber}/env-vars/{envVarName}":{"$ref":"#/components/schemas/EnvVarResponse"},"POST /v2/browser-info":{"$ref":"#/components/schemas/BrowserInfoResponse"},"POST /v2/datasets":{"$ref":"#/components/schemas/DatasetResponse"},"POST /v2/datasets/{datasetId}/items":{"type":"object"},"POST /v2/integrations/git/{providerId}/create-repo":{"$ref":"#/components/schemas/GitRepoResponse"},"POST /v2/integrations/git/{providerId}/register-deployment-key":{"$ref":"#/components/schemas/RegisterDeploymentKeyResponse"},"POST /v2/key-value-stores":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"POST /v2/key-value-stores/{storeId}/records/{recordKey}":{"type":"object"},"POST /v2/request-queues":{"$ref":"#/components/schemas/RequestQueueResponse"},"POST /v2/request-queues/{queueId}/head/lock":{"$ref":"#/components/schemas/LockedRequestQueueHeadResponse"},"POST /v2/request-queues/{queueId}/requests":{"$ref":"#/components/schemas/AddRequestResponse"},"POST /v2/request-queues/{queueId}/requests/batch":{"$ref":"#/components/schemas/BatchAddResponse"},"POST /v2/request-queues/{queueId}/requests/unlock":{"$ref":"#/components/schemas/UnlockRequestsResponse"},"POST /v2/schedules":{"$ref":"#/components/schemas/ScheduleResponse"},"POST /v2/schedules/{scheduleId}/invoke":{"type":"object"},"POST /v2/tools/decode-and-verify":{"$ref":"#/components/schemas/DecodeAndVerifyResponse"},"POST /v2/tools/encode-and-sign":{"$ref":"#/components/schemas/EncodeAndSignResponse"},"POST /v2/webhooks":{"$ref":"#/components/schemas/WebhookResponse"},"POST /v2/webhooks/{webhookId}/test":{"$ref":"#/components/schemas/WebhookDispatchResponse"},"PUT /v2/actor-runs/{runId}":{"$ref":"#/components/schemas/RunResponse"},"PUT /v2/actor-runs/{runId}/dataset":{"$ref":"#/components/schemas/DatasetResponse"},"PUT /v2/actor-runs/{runId}/key-value-store":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"PUT /v2/actor-runs/{runId}/key-value-store/records/{recordKey}":{"type":"object"},"PUT /v2/actor-runs/{runId}/request-queue":{"$ref":"#/components/schemas/RequestQueueResponse"},"PUT /v2/actor-runs/{runId}/request-queue/requests/{requestId}":{"$ref":"#/components/schemas/UpdateRequestResponse"},"PUT /v2/actor-runs/{runId}/request-queue/requests/{requestId}/lock":{"$ref":"#/components/schemas/ProlongRequestLockResponse"},"PUT /v2/actor-tasks/{actorTaskId}":{"properties":{"data":{"$ref":"#/components/schemas/Task"}},"required":["data"],"type":"object"},"PUT /v2/actor-tasks/{actorTaskId}/input":{"type":"object"},"PUT /v2/actor-tasks/{actorTaskId}/runs/last/dataset":{"$ref":"#/components/schemas/DatasetResponse"},"PUT /v2/actor-tasks/{actorTaskId}/runs/last/key-value-store":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"PUT /v2/actor-tasks/{actorTaskId}/runs/last/key-value-store/records/{recordKey}":{"type":"object"},"PUT /v2/actor-tasks/{actorTaskId}/runs/last/request-queue":{"$ref":"#/components/schemas/RequestQueueResponse"},"PUT /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests/{requestId}":{"$ref":"#/components/schemas/UpdateRequestResponse"},"PUT /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests/{requestId}/lock":{"$ref":"#/components/schemas/ProlongRequestLockResponse"},"PUT /v2/actors/{actorId}":{"$ref":"#/components/schemas/ActorResponse"},"PUT /v2/actors/{actorId}/runs/last/dataset":{"$ref":"#/components/schemas/DatasetResponse"},"PUT /v2/actors/{actorId}/runs/last/key-value-store":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"PUT /v2/actors/{actorId}/runs/last/key-value-store/records/{recordKey}":{"type":"object"},"PUT /v2/actors/{actorId}/runs/last/request-queue":{"$ref":"#/components/schemas/RequestQueueResponse"},"PUT /v2/actors/{actorId}/runs/last/request-queue/requests/{requestId}":{"$ref":"#/components/schemas/UpdateRequestResponse"},"PUT /v2/actors/{actorId}/runs/last/request-queue/requests/{requestId}/lock":{"$ref":"#/components/schemas/ProlongRequestLockResponse"},"PUT /v2/actors/{actorId}/versions/{versionNumber}":{"$ref":"#/components/schemas/VersionResponse"},"PUT /v2/actors/{actorId}/versions/{versionNumber}/env-vars/{envVarName}":{"$ref":"#/components/schemas/EnvVarResponse"},"PUT /v2/browser-info":{"$ref":"#/components/schemas/BrowserInfoResponse"},"PUT /v2/datasets/{datasetId}":{"$ref":"#/components/schemas/DatasetResponse"},"PUT /v2/key-value-stores/{storeId}":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"PUT /v2/key-value-stores/{storeId}/records/{recordKey}":{"type":"object"},"PUT /v2/request-queues/{queueId}":{"$ref":"#/components/schemas/RequestQueueResponse"},"PUT /v2/request-queues/{queueId}/requests/{requestId}":{"$ref":"#/components/schemas/UpdateRequestResponse"},"PUT /v2/request-queues/{queueId}/requests/{requestId}/lock":{"$ref":"#/components/schemas/ProlongRequestLockResponse"},"PUT /v2/schedules/{scheduleId}":{"$ref":"#/components/schemas/ScheduleResponse"},"PUT /v2/users/me/limits":{"type":"object"},"PUT /v2/users/{userId}/limits":{"type":"object"},"PUT /v2/webhooks/{webhookId}":{"$ref":"#/components/schemas/WebhookResponse"}},"schemas":{"AccountLimits":{"properties":{"current":{"$ref":"#/components/schemas/CurrentUsage"},"limits":{"$ref":"#/components/schemas/Limits"},"monthlyUsageCycle":{"$ref":"#/components/schemas/UsageCycle"}},"required":["monthlyUsageCycle","limits","current"],"type":"object"},"AccountLimitsResponse":{"properties":{"data":{"$ref":"#/components/schemas/AccountLimits"}},"required":["data"],"type":"object"},"ActorDefinition":{"properties":{"actorSpecification":{"type":"integer"},"buildTag":{"type":"string"},"changelog":{"type":["string","null"]},"defaultMemoryMbytes":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":{"type":"string"},"dockerContextDir":{"type":"string"},"dockerfile":{"type":"string"},"environmentVariables":{"type":"object"},"input":{"type":["object","null"]},"maxMemoryMbytes":{"minimum":128,"type":"integer"},"meta":{"$ref":"#/components/schemas/ActorDefinitionMeta"},"minMemoryMbytes":{"minimum":128,"type":"integer"},"name":{"type":"string"},"output":{"type":["object","null"]},"readme":{"type":["string","null"]},"storages":{"properties":{"dataset":{"type":"object"},"datasets":{"type":"object"},"keyValueStore":{"type":"object"}},"type":"object"},"title":{"type":"string"},"usesStandbyMode":{"type":"boolean"},"version":{"pattern":"^[0-9]+(\\.[0-9]+)+$","type":"string"},"webServerMcpPath":{"type":"string"},"webServerSchema":{"type":"object"}},"type":"object"},"ActorDefinitionMeta":{"properties":{"generatedBy":{"type":"string"},"templateId":{"type":"string"}},"type":"object"},"ActorJobStatus":{"type":"string"},"ActorListItem":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"stats":{"anyOf":[{"$ref":"#/components/schemas/ActorStats"},{"type":"null"}]},"title":{"type":"string"},"username":{"type":"string"}},"required":["id","createdAt","modifiedAt","name","username"],"type":"object"},"ActorNotice":{"type":["string","null"]},"ActorOAuthAccount":{"properties":{"_id":{"type":"string"},"authorizedAt":{"format":"date-time","type":["string","null"]},"connectionId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"data":{"type":"object"},"description":{"type":["string","null"]},"modifiedAt":{"format":"date-time","type":"string"},"userId":{"type":"string"}},"required":["_id","userId","connectionId","createdAt","modifiedAt","data"],"type":"object"},"ActorOAuthAccountResponse":{"properties":{"data":{"$ref":"#/components/schemas/ActorOAuthAccount"}},"required":["data"],"type":"object"},"ActorOAuthConnection":{"properties":{"_id":{"type":"string"},"actorId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"credentials":{"properties":{"clientId":{"type":"string"},"imageUrl":{"type":"string"},"label":{"type":"string"},"scope":{"type":"string"}},"type":"object"},"modifiedAt":{"format":"date-time","type":"string"},"oAuthProviderType":{"type":"string"}},"required":["_id","actorId","oAuthProviderType","createdAt","modifiedAt"],"type":"object"},"ActorPermissionLevel":{"type":"string"},"ActorResource":{"properties":{"actorPermissionLevel":{"$ref":"#/components/schemas/ActorPermissionLevel"},"actorStandby":{"anyOf":[{"$ref":"#/components/schemas/ActorStandby"},{"type":"null"}]},"categories":{"items":{"type":"string"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"defaultRunOptions":{"$ref":"#/components/schemas/DefaultRunOptions"},"deploymentKey":{"type":"string"},"description":{"type":["string","null"]},"exampleRunInput":{"anyOf":[{"$ref":"#/components/schemas/ExampleRunInput"},{"type":"null"}]},"hasNoDataset":{"type":"boolean"},"id":{"type":"string"},"isCritical":{"type":"boolean"},"isDeprecated":{"type":["boolean","null"]},"isGeneric":{"type":"boolean"},"isPublic":{"type":"boolean"},"isSourceCodeHidden":{"type":"boolean"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"notice":{"$ref":"#/components/schemas/ActorNotice"},"pictureUrl":{"type":["string","null"]},"pricingInfos":{"items":{"$ref":"#/components/schemas/ActorRunPricingInfo"},"type":"array"},"readmeSummary":{"type":"string"},"restartOnError":{"type":["boolean","null"]},"seoDescription":{"type":["string","null"]},"seoTitle":{"type":["string","null"]},"standbyUrl":{"type":["string","null"]},"stats":{"$ref":"#/components/schemas/ActorStats"},"taggedBuilds":{"anyOf":[{"$ref":"#/components/schemas/TaggedBuilds"},{"type":"null"}]},"title":{"type":["string","null"]},"userId":{"type":"string"},"username":{"type":"string"},"versions":{"items":{"$ref":"#/components/schemas/Version"},"type":"array"}},"required":["id","userId","name","username","isPublic","createdAt","modifiedAt","stats","versions","defaultRunOptions"],"type":"object"},"ActorResponse":{"properties":{"data":{"$ref":"#/components/schemas/ActorResource"}},"required":["data"],"type":"object"},"ActorRunPricingInfo":{"oneOf":[{"$ref":"#/components/schemas/PayPerEventActorPricingInfo"},{"$ref":"#/components/schemas/PricePerDatasetItemActorPricingInfo"},{"$ref":"#/components/schemas/FlatPricePerMonthActorPricingInfo"},{"$ref":"#/components/schemas/FreeActorPricingInfo"}]},"ActorStandby":{"properties":{"build":{"type":["string","null"]},"desiredRequestsPerActorRun":{"type":["integer","null"]},"disableStandbyFieldsOverride":{"type":["boolean","null"]},"idleTimeoutSecs":{"type":["integer","null"]},"isConsoleAuthEnabled":{"type":["boolean","null"]},"isEnabled":{"type":["boolean","null"]},"isTokenlessEnabled":{"type":["boolean","null"]},"maxRequestsPerActorRun":{"type":["integer","null"]},"memoryMbytes":{"type":["integer","null"]},"shouldPassActorInput":{"type":["boolean","null"]},"tenancy":{"type":["string","null"]}},"type":"object"},"ActorStats":{"properties":{"actorReviewCount":{"type":"integer"},"actorReviewRating":{"type":"number"},"bookmarkCount":{"type":"integer"},"lastRunStartedAt":{"format":"date-time","type":"string"},"publicActorRunStats30Days":{"properties":{"ABORTED":{"type":"integer"},"FAILED":{"type":"integer"},"SUCCEEDED":{"type":"integer"},"TIMED-OUT":{"type":"integer"},"TOTAL":{"type":"integer"}},"type":"object"},"totalBuilds":{"type":"integer"},"totalMetamorphs":{"type":"integer"},"totalRuns":{"type":"integer"},"totalUsers":{"type":"integer"},"totalUsers30Days":{"type":"integer"},"totalUsers7Days":{"type":"integer"},"totalUsers90Days":{"type":"integer"}},"type":"object"},"AddRequestResponse":{"properties":{"data":{"$ref":"#/components/schemas/RequestRegistration"}},"required":["data"],"type":"object"},"AddedRequest":{"properties":{"requestId":{"$ref":"#/components/schemas/RequestId"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"},"wasAlreadyHandled":{"$ref":"#/components/schemas/WasAlreadyHandled"},"wasAlreadyPresent":{"$ref":"#/components/schemas/WasAlreadyPresent"}},"required":["requestId","uniqueKey","wasAlreadyHandled","wasAlreadyPresent"],"type":"object"},"AvailableProxyGroups":{"type":"object"},"BatchAddResponse":{"properties":{"data":{"$ref":"#/components/schemas/BatchAddResult"}},"required":["data"],"type":"object"},"BatchAddResult":{"properties":{"processedRequests":{"items":{"$ref":"#/components/schemas/AddedRequest"},"type":"array"},"unprocessedRequests":{"items":{"$ref":"#/components/schemas/UnprocessedRequest"},"type":"array"}},"required":["processedRequests","unprocessedRequests"],"type":"object"},"BatchDeleteResponse":{"properties":{"data":{"$ref":"#/components/schemas/BatchDeleteResult"}},"required":["data"],"type":"object"},"BatchDeleteResult":{"properties":{"processedRequests":{"items":{"$ref":"#/components/schemas/DeletedRequest"},"type":"array"},"unprocessedRequests":{"items":{"$ref":"#/components/schemas/UnprocessedRequest"},"type":"array"}},"required":["processedRequests","unprocessedRequests"],"type":"object"},"BrowserInfoResponse":{"properties":{"bodyLength":{"type":"integer"},"clientIp":{"type":["string","null"]},"countryCode":{"type":["string","null"]},"headers":{"type":"object"},"method":{"type":"string"},"rawHeaders":{"items":{"type":"string"},"type":"array"}},"required":["method","clientIp","countryCode","bodyLength"],"type":"object"},"Build":{"properties":{"actId":{"type":"string"},"actVersion":{"properties":{"actorPath":{"type":["string","null"]},"buildTag":{"type":["string","null"]},"gitHubGistUrl":{"type":"string"},"gitRepoUrl":{"type":"string"},"sourceFiles":{"items":{"$ref":"#/components/schemas/SourceCodeFile"},"type":"array"},"sourceType":{"$ref":"#/components/schemas/VersionSourceType"},"tarballUrl":{"type":"string"},"versionNumber":{"pattern":"^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])$","type":"string"}},"type":"object"},"actorDefinition":{"anyOf":[{"$ref":"#/components/schemas/ActorDefinition"},{"type":"null"}]},"buildNumber":{"pattern":"^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$","type":"string"},"changelog":{"type":["string","null"]},"createdByOrganizationMemberUserId":{"type":"string"},"exitCode":{"type":["integer","null"]},"finishedAt":{"format":"date-time","type":["string","null"]},"gitBranchName":{"type":"string"},"gitCommitId":{"type":"string"},"id":{"type":"string"},"imageDigest":{"type":["string","null"]},"inputSchema":{"type":["string","null"]},"meta":{"$ref":"#/components/schemas/BuildMeta"},"options":{"anyOf":[{"$ref":"#/components/schemas/BuildOptions"},{"type":"null"}]},"readme":{"type":["string","null"]},"startedAt":{"format":"date-time","type":"string"},"stats":{"anyOf":[{"$ref":"#/components/schemas/BuildStats"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/ActorJobStatus"},"usage":{"anyOf":[{"$ref":"#/components/schemas/BuildUsage"},{"type":"null"}]},"usageTotalUsd":{"type":["number","null"]},"usageUsd":{"anyOf":[{"$ref":"#/components/schemas/BuildUsage"},{"type":"null"}]},"userId":{"type":"string"}},"required":["id","actId","userId","startedAt","status","meta","buildNumber"],"type":"object"},"BuildListItem":{"properties":{"actId":{"type":"string"},"buildNumber":{"pattern":"^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$","type":"string"},"buildNumberInt":{"type":"integer"},"finishedAt":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"meta":{"$ref":"#/components/schemas/BuildMeta"},"startedAt":{"format":"date-time","type":"string"},"status":{"$ref":"#/components/schemas/ActorJobStatus"},"usageTotalUsd":{"type":"number"},"userId":{"type":"string"}},"required":["id","status","startedAt","buildNumber"],"type":"object"},"BuildMeta":{"properties":{"actorRunId":{"type":"string"},"clientIp":{"type":["string"]},"githubActionsRunUrl":{"type":"string"},"origin":{"$ref":"#/components/schemas/RunOrigin"},"userAgent":{"type":["string"]},"webhookDispatchId":{"type":"string"}},"required":["origin"],"type":"object"},"BuildOptions":{"properties":{"betaPackages":{"type":["boolean","null"]},"debug":{"type":["boolean","null"]},"diskMbytes":{"type":["integer","null"]},"memoryMbytes":{"type":["integer","null"]},"tag":{"type":["string","null"]},"useCache":{"type":["boolean","null"]}},"type":"object"},"BuildResponse":{"properties":{"data":{"$ref":"#/components/schemas/Build"}},"required":["data"],"type":"object"},"BuildStats":{"properties":{"computeUnits":{"type":"number"},"durationMillis":{"type":"integer"},"imageSizeBytes":{"type":["integer","null"]},"runTimeSecs":{"type":"number"}},"type":"object"},"BuildUsage":{"properties":{"ACTOR_COMPUTE_UNITS":{"type":["number","null"]}},"type":"object"},"CommonActorPricingInfo":{"properties":{"apifyMarginPercentage":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"forceContainsSignificantPriceChange":{"type":"boolean"},"isPriceChangeNotificationSuppressed":{"type":"boolean"},"notifiedAboutChangeAt":{"format":"date-time","type":["string","null"]},"notifiedAboutFutureChangeAt":{"format":"date-time","type":["string","null"]},"notifiedAboutRentalToPpePriceChangeAt":{"format":"date-time","type":["string","null"]},"reasonForChange":{"type":["string","null"]},"startedAt":{"format":"date-time","type":"string"}},"required":["apifyMarginPercentage","createdAt","startedAt"],"type":"object"},"CurrentPricingInfo":{"properties":{"apifyMarginPercentage":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"forceContainsSignificantPriceChange":{"type":"boolean"},"isPPEPlatformUsagePaidByUser":{"type":"boolean"},"isPriceChangeNotificationSuppressed":{"type":"boolean"},"minimalMaxTotalChargeUsd":{"type":["number","null"]},"notifiedAboutChangeAt":{"format":"date-time","type":["string","null"]},"notifiedAboutFutureChangeAt":{"format":"date-time","type":["string","null"]},"notifiedAboutRentalToPpePriceChangeAt":{"format":"date-time","type":["string","null"]},"pricePerUnitUsd":{"type":"number"},"pricingModel":{"type":"string"},"pricingPerEvent":{"type":["object","null"]},"reasonForChange":{"type":["string","null"]},"startedAt":{"format":"date-time","type":"string"},"tieredPricing":{"type":"object"},"trialMinutes":{"type":"integer"},"unitName":{"type":"string"}},"required":["pricingModel"],"type":"object"},"CurrentUsage":{"properties":{"activeActorJobCount":{"type":"integer"},"actorCount":{"type":"integer"},"actorMemoryGbytes":{"type":"number"},"actorTaskCount":{"type":"integer"},"monthlyActorComputeUnits":{"type":"number"},"monthlyExternalDataTransferGbytes":{"type":"number"},"monthlyProxySerps":{"type":"integer"},"monthlyResidentialProxyGbytes":{"type":"number"},"monthlyUnblockerUnits":{"type":"number"},"monthlyUsageUsd":{"type":"number"},"scheduleCount":{"type":"integer"},"teamAccountSeatCount":{"type":"integer"}},"required":["monthlyUsageUsd","monthlyActorComputeUnits","monthlyExternalDataTransferGbytes","monthlyProxySerps","monthlyResidentialProxyGbytes","actorMemoryGbytes","actorCount","actorTaskCount","activeActorJobCount","teamAccountSeatCount"],"type":"object"},"DailyServiceUsage":{"properties":{"date":{"format":"date-time","type":"string"},"serviceUsage":{"$ref":"#/components/schemas/ServiceUsage"},"totalUsageCreditsUsd":{"type":"number"}},"required":["date","serviceUsage","totalUsageCreditsUsd"],"type":"object"},"DatasetListItem":{"properties":{"accessedAt":{"format":"date-time","type":"string"},"actId":{"type":["string","null"]},"actRunId":{"type":["string","null"]},"cleanItemCount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"id":{"type":"string"},"itemCount":{"type":"integer"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":["string","null"]},"stats":{"$ref":"#/components/schemas/DatasetStats"},"title":{"type":["string","null"]},"userId":{"type":"string"},"username":{"type":"string"}},"required":["id","userId","createdAt","modifiedAt","accessedAt","itemCount","cleanItemCount"],"type":"object"},"DatasetResource":{"properties":{"accessedAt":{"format":"date-time","type":"string"},"actId":{"type":["string","null"]},"actRunId":{"type":["string","null"]},"cleanItemCount":{"minimum":0,"type":"integer"},"consoleUrl":{"format":"uri","type":"string"},"createdAt":{"format":"date-time","type":"string"},"fields":{"items":{"type":"string"},"type":["array","null"]},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"id":{"type":"string"},"itemCount":{"minimum":0,"type":"integer"},"itemsPublicUrl":{"format":"uri","type":"string"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":["string","null"]},"schema":{"type":["object","null"]},"stats":{"$ref":"#/components/schemas/DatasetStats"},"title":{"type":["string","null"]},"urlSigningSecretKey":{"type":["string","null"]},"userId":{"type":"string"}},"required":["id","userId","createdAt","modifiedAt","accessedAt","itemCount","cleanItemCount","consoleUrl"],"type":"object"},"DatasetResponse":{"properties":{"data":{"$ref":"#/components/schemas/DatasetResource"}},"required":["data"],"type":"object"},"DatasetStatistics":{"properties":{"fieldStatistics":{"type":["object","null"]}},"type":"object"},"DatasetStatisticsResponse":{"properties":{"data":{"$ref":"#/components/schemas/DatasetStatistics"}},"required":["data"],"type":"object"},"DatasetStats":{"properties":{"inflatedBytes":{"type":"integer"},"readCount":{"type":"integer"},"storageBytes":{"type":"integer"},"writeCount":{"type":"integer"}},"type":"object"},"DecodeAndVerifyResponse":{"properties":{"data":{"$ref":"#/components/schemas/DecodeAndVerifyResult"}},"required":["data"],"type":"object"},"DecodeAndVerifyResult":{"properties":{"decoded":{},"encodedByUserId":{"type":["string","null"]},"isVerifiedUser":{"type":"boolean"}},"required":["decoded","encodedByUserId","isVerifiedUser"],"type":"object"},"DefaultRunOptions":{"properties":{"build":{"type":"string"},"forcePermissionLevel":{"anyOf":[{"$ref":"#/components/schemas/ActorPermissionLevel"},{"type":"null"}]},"isMaxTotalChargeUsdSetByUser":{"type":["boolean","null"]},"maxItems":{"type":["integer","null"]},"maxTotalChargeUsd":{"type":["number","null"]},"memoryMbytes":{"type":"integer"},"restartOnError":{"type":["boolean","null"]},"timeoutSecs":{"type":"integer"}},"type":"object"},"DeletedRequest":{"anyOf":[{"$ref":"#/components/schemas/DeletedRequestById"},{"$ref":"#/components/schemas/DeletedRequestByUniqueKey"}]},"DeletedRequestById":{"properties":{"id":{"$ref":"#/components/schemas/RequestId"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"}},"required":["id"],"type":"object"},"DeletedRequestByUniqueKey":{"properties":{"id":{"$ref":"#/components/schemas/RequestId"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"}},"required":["uniqueKey"],"type":"object"},"EffectivePlatformFeature":{"properties":{"disabledReason":{"type":["string","null"]},"disabledReasonType":{"type":["string","null"]},"isEnabled":{"type":"boolean"},"isTrial":{"type":"boolean"},"trialExpirationAt":{"format":"date-time","type":["string","null"]}},"required":["isEnabled","disabledReason","disabledReasonType","isTrial","trialExpirationAt"],"type":"object"},"EffectivePlatformFeatures":{"properties":{"ACTORS":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"ACTORS_PUBLIC_ALL":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"ACTORS_PUBLIC_DEVELOPER":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"PROXY":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"PROXY_EXTERNAL_ACCESS":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"PROXY_RESIDENTIAL":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"PROXY_SERPS":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"SCHEDULER":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"STORAGE":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"WEBHOOKS":{"$ref":"#/components/schemas/EffectivePlatformFeature"}},"required":["ACTORS","STORAGE","SCHEDULER","PROXY","PROXY_EXTERNAL_ACCESS","PROXY_RESIDENTIAL","PROXY_SERPS","WEBHOOKS","ACTORS_PUBLIC_ALL","ACTORS_PUBLIC_DEVELOPER"],"type":"object"},"EncodeAndSignResponse":{"properties":{"data":{"$ref":"#/components/schemas/EncodeAndSignResult"}},"required":["data"],"type":"object"},"EncodeAndSignResult":{"properties":{"encoded":{"type":"string"}},"required":["encoded"],"type":"object"},"EnvVar":{"properties":{"isSecret":{"type":["boolean","null"]},"name":{"type":"string"},"value":{"type":"string"},"valueHash":{"type":"string"}},"required":["name"],"type":"object"},"EnvVarResponse":{"properties":{"data":{"$ref":"#/components/schemas/EnvVar"}},"required":["data"],"type":"object"},"ExampleRunInput":{"properties":{"body":{"type":"string"},"contentType":{"type":"string"}},"type":"object"},"FlatPricePerMonthActorPricingInfo":{"allOf":[{"$ref":"#/components/schemas/CommonActorPricingInfo"},{"properties":{"pricePerUnitUsd":{"type":"number"},"pricingModel":{"type":"string"},"trialMinutes":{"type":"integer"}},"required":["pricingModel","pricePerUnitUsd","trialMinutes"],"type":"object"}]},"FreeActorPricingInfo":{"allOf":[{"$ref":"#/components/schemas/CommonActorPricingInfo"},{"properties":{"pricingModel":{"type":"string"}},"required":["pricingModel"],"type":"object"}]},"GeneralAccess":{"type":"string"},"GitProviderIntegration":{"properties":{"addWorkspaceUrl":{"type":"string"},"id":{"type":"string"},"provider":{"type":"string"},"workspaces":{"items":{"$ref":"#/components/schemas/GitProviderWorkspace"},"type":"array"}},"required":["id","provider","workspaces"],"type":"object"},"GitProviderWorkspace":{"properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"type":"object"},"GitRepo":{"properties":{"htmlUrl":{"type":"string"},"httpsUrl":{"type":"string"},"sshUrl":{"type":"string"}},"required":["sshUrl","httpsUrl","htmlUrl"],"type":"object"},"GitRepoResponse":{"properties":{"data":{"$ref":"#/components/schemas/GitRepo"}},"required":["data"],"type":"object"},"HadMultipleClients":{"type":"boolean"},"HandledRequestCount":{"minimum":0,"type":"integer"},"HeadLimit":{"type":"integer"},"HttpMethod":{"type":"string"},"IntegrationTracking":{"properties":{"appId":{"type":"string"},"isAiTool":{"type":"boolean"},"platform":{"type":"string"}},"type":"object"},"KeyValueStoreKey":{"properties":{"key":{"type":"string"},"recordPublicUrl":{"format":"uri","type":"string"},"size":{"type":"integer"}},"required":["key","size","recordPublicUrl"],"type":"object"},"KeyValueStoreListItem":{"properties":{"accessedAt":{"format":"date-time","type":"string"},"actId":{"type":["string","null"]},"actRunId":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"id":{"type":"string"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":["string","null"]},"schema":{"type":["object","string","null"]},"stats":{"$ref":"#/components/schemas/KeyValueStoreListStats"},"title":{"type":["string","null"]},"userId":{"type":["string","null"]},"username":{"type":["string","null"]}},"required":["id","createdAt","modifiedAt","accessedAt"],"type":"object"},"KeyValueStoreListStats":{"properties":{"deleteCount":{"type":"integer"},"listCount":{"type":"integer"},"readCount":{"type":"integer"},"s3StorageBytes":{"type":"integer"},"writeCount":{"type":"integer"}},"type":"object"},"KeyValueStoreResource":{"properties":{"accessedAt":{"format":"date-time","type":"string"},"actId":{"type":["string","null"]},"actRunId":{"type":["string","null"]},"consoleUrl":{"format":"uri","type":"string"},"createdAt":{"format":"date-time","type":"string"},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"id":{"type":"string"},"keysPublicUrl":{"format":"uri","type":"string"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":["string","null"]},"recordsPublicUrl":{"format":"uri","type":"string"},"schema":{"type":["object","null"]},"stats":{"$ref":"#/components/schemas/KeyValueStoreStats"},"title":{"type":["string","null"]},"urlSigningSecretKey":{"type":["string","null"]},"userId":{"type":["string","null"]},"username":{"type":["string","null"]}},"required":["id","createdAt","modifiedAt","accessedAt"],"type":"object"},"KeyValueStoreResponse":{"properties":{"data":{"$ref":"#/components/schemas/KeyValueStoreResource"}},"required":["data"],"type":"object"},"KeyValueStoreStats":{"properties":{"deleteCount":{"type":"integer"},"listCount":{"type":"integer"},"readCount":{"type":"integer"},"s3StorageBytes":{"type":"integer"},"storageBytes":{"type":"integer"},"writeCount":{"type":"integer"}},"type":"object"},"Limits":{"properties":{"dataRetentionDays":{"type":"integer"},"maxActorCount":{"type":"integer"},"maxActorMemoryGbytes":{"type":"number"},"maxActorTaskCount":{"type":"integer"},"maxConcurrentActorJobs":{"type":"integer"},"maxMonthlyActorComputeUnits":{"type":"number"},"maxMonthlyExternalDataTransferGbytes":{"type":"number"},"maxMonthlyProxySerps":{"type":"integer"},"maxMonthlyResidentialProxyGbytes":{"type":"number"},"maxMonthlyUnblockerUnits":{"type":"number"},"maxMonthlyUsageUsd":{"type":"number"},"maxScheduleCount":{"type":"integer"},"maxTeamAccountSeatCount":{"type":"integer"}},"required":["maxMonthlyUsageUsd","maxMonthlyActorComputeUnits","maxMonthlyExternalDataTransferGbytes","maxMonthlyProxySerps","maxMonthlyResidentialProxyGbytes","maxActorMemoryGbytes","maxActorCount","maxActorTaskCount","maxConcurrentActorJobs","maxTeamAccountSeatCount","dataRetentionDays"],"type":"object"},"ListOfActorOAuthAccounts":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActorOAuthAccount"},"type":"array"},"total":{"type":"integer"}},"required":["total","items"],"type":"object"},"ListOfActorOAuthAccountsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfActorOAuthAccounts"}},"required":["data"],"type":"object"},"ListOfActorOAuthConnections":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActorOAuthConnection"},"type":"array"},"total":{"type":"integer"}},"required":["total","items"],"type":"object"},"ListOfActorOAuthConnectionsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfActorOAuthConnections"}},"required":["data"],"type":"object"},"ListOfActors":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActorListItem"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfActorsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfActors"}},"required":["data"],"type":"object"},"ListOfBuilds":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/BuildListItem"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfBuildsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfBuilds"}},"required":["data"],"type":"object"},"ListOfDatasets":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/DatasetListItem"},"type":"array"},"unnamed":{"type":"boolean"}},"required":["items"],"type":"object"}]},"ListOfDatasetsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfDatasets"}},"required":["data"],"type":"object"},"ListOfEnvVars":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EnvVar"},"type":"array"},"total":{"type":"integer"}},"required":["total","items"],"type":"object"},"ListOfEnvVarsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfEnvVars"}},"required":["data"],"type":"object"},"ListOfGitProviderIntegrationsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GitProviderIntegration"},"type":"array"}},"required":["data"],"type":"object"},"ListOfKeyValueStores":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/KeyValueStoreListItem"},"type":"array"},"unnamed":{"type":"boolean"}},"required":["items"],"type":"object"}]},"ListOfKeyValueStoresResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfKeyValueStores"}},"required":["data"],"type":"object"},"ListOfKeys":{"properties":{"count":{"type":"integer"},"exclusiveStartKey":{"type":["string","null"]},"isTruncated":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/KeyValueStoreKey"},"type":"array"},"limit":{"type":"integer"},"nextExclusiveStartKey":{"type":["string","null"]}},"required":["items","count","limit","isTruncated"],"type":"object"},"ListOfKeysResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfKeys"}},"required":["data"],"type":"object"},"ListOfRequestQueues":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/RequestQueueListItem"},"type":"array"},"unnamed":{"type":"boolean"}},"required":["items"],"type":"object"}]},"ListOfRequestQueuesResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfRequestQueues"}},"required":["data"],"type":"object"},"ListOfRequests":{"properties":{"cursor":{"type":"string"},"exclusiveStartId":{"type":"string"},"items":{"items":{"$ref":"#/components/schemas/RequestResource"},"type":"array"},"limit":{"type":"integer"},"nextCursor":{"type":"string"}},"required":["items","limit"],"type":"object"},"ListOfRequestsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfRequests"}},"required":["data"],"type":"object"},"ListOfRuns":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/RunListItem"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfRunsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfRuns"}},"required":["data"],"type":"object"},"ListOfSchedules":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/ScheduleListItem"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfSchedulesResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfSchedules"}},"required":["data"],"type":"object"},"ListOfStoreActors":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/StoreActor"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfStoreActorsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfStoreActors"}},"required":["data"],"type":"object"},"ListOfTasks":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaskListItem"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfTasksResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfTasks"}},"required":["data"],"type":"object"},"ListOfVersions":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Version"},"type":"array"},"total":{"type":"integer"}},"required":["total","items"],"type":"object"},"ListOfVersionsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfVersions"}},"required":["data"],"type":"object"},"ListOfWebhookDispatches":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookDispatch"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfWebhookDispatchesResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfWebhookDispatches"}},"required":["data"],"type":"object"},"ListOfWebhookResources":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookResource"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfWebhookResourcesResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfWebhookResources"}},"required":["data"],"type":"object"},"ListOfWebhooks":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookListItem"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfWebhooksResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfWebhooks"}},"required":["data"],"type":"object"},"LockExpiresAt":{"format":"date-time","type":"string"},"LockedRequestQueueHead":{"properties":{"clientKey":{"type":"string"},"hadMultipleClients":{"$ref":"#/components/schemas/HadMultipleClients"},"items":{"items":{"$ref":"#/components/schemas/LockedRequestQueueHeadItem"},"type":"array"},"limit":{"$ref":"#/components/schemas/HeadLimit"},"lockSecs":{"type":"integer"},"queueHasLockedRequests":{"type":"boolean"},"queueModifiedAt":{"$ref":"#/components/schemas/QueueModifiedAt"}},"required":["limit","queueModifiedAt","hadMultipleClients","lockSecs","items"],"type":"object"},"LockedRequestQueueHeadItem":{"properties":{"id":{"$ref":"#/components/schemas/RequestId"},"lockExpiresAt":{"$ref":"#/components/schemas/LockExpiresAt"},"method":{"$ref":"#/components/schemas/RequestMethod"},"retryCount":{"$ref":"#/components/schemas/RetryCount"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"},"url":{"$ref":"#/components/schemas/RequestUrl"}},"required":["id","uniqueKey","url","lockExpiresAt"],"type":"object"},"LockedRequestQueueHeadResponse":{"properties":{"data":{"$ref":"#/components/schemas/LockedRequestQueueHead"}},"required":["data"],"type":"object"},"MonthlyServiceUsage":{"type":"object"},"MonthlyUsage":{"properties":{"dailyServiceUsages":{"items":{"$ref":"#/components/schemas/DailyServiceUsage"},"type":"array"},"monthlyServiceUsage":{"$ref":"#/components/schemas/MonthlyServiceUsage"},"totalUsageCreditsUsdAfterVolumeDiscount":{"type":"number"},"totalUsageCreditsUsdBeforeVolumeDiscount":{"type":"number"},"usageCycle":{"$ref":"#/components/schemas/UsageCycle"}},"required":["usageCycle","monthlyServiceUsage","dailyServiceUsages","totalUsageCreditsUsdBeforeVolumeDiscount","totalUsageCreditsUsdAfterVolumeDiscount"],"type":"object"},"MonthlyUsageResponse":{"properties":{"data":{"$ref":"#/components/schemas/MonthlyUsage"}},"required":["data"],"type":"object"},"PaginationResponse":{"properties":{"count":{"minimum":0,"type":"integer"},"desc":{"type":"boolean"},"limit":{"minimum":1,"type":"integer"},"offset":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["total","offset","limit","desc","count"],"type":"object"},"PayPerEventActorPricingInfo":{"allOf":[{"$ref":"#/components/schemas/CommonActorPricingInfo"},{"properties":{"isPPEPlatformUsagePaidByUser":{"type":["boolean","null"]},"minimalMaxTotalChargeUsd":{"type":["number","null"]},"pricingModel":{"type":"string"},"pricingPerEvent":{"properties":{"actorChargeEvents":{"type":"object"}},"type":"object"}},"required":["pricingModel","pricingPerEvent"],"type":"object"}]},"PendingRequestCount":{"type":"integer"},"PricePerDatasetItemActorPricingInfo":{"allOf":[{"$ref":"#/components/schemas/CommonActorPricingInfo"},{"properties":{"pricePerUnitUsd":{"type":"number"},"pricingModel":{"type":"string"},"tieredPricing":{"$ref":"#/components/schemas/TieredPricingPerDatasetItem"},"unitName":{"type":"string"}},"required":["pricingModel","unitName"],"type":"object"}]},"ProlongRequestLockResponse":{"properties":{"data":{"$ref":"#/components/schemas/RequestLockInfo"}},"required":["data"],"type":"object"},"ProxyGroup":{"properties":{"availableCount":{"type":"integer"},"description":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["name","description"],"type":"object"},"ProxyResource":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/ProxyGroup"},"type":"array"},"password":{"type":["string","null"]}},"required":["groups"],"type":"object"},"QueueAccessedAt":{"format":"date-time","type":"string"},"QueueCreatedAt":{"format":"date-time","type":"string"},"QueueId":{"type":"string"},"QueueModifiedAt":{"format":"date-time","type":"string"},"QueueUserId":{"type":"string"},"RecordResponse":{"type":"object"},"RegisterDeploymentKeyResponse":{"properties":{"data":{"properties":{"repoName":{"type":"string"}},"required":["repoName"],"type":"object"}},"required":["data"],"type":"object"},"RequestBase":{"properties":{"errorMessages":{"items":{"type":"string"},"type":["array","null"]},"handledAt":{"format":"date-time","type":["string","null"]},"headers":{"type":["object","null"]},"loadedUrl":{"type":["string","null"]},"method":{"$ref":"#/components/schemas/RequestMethod"},"noRetry":{"type":["boolean","null"]},"payload":{"type":["string","object","null"]},"retryCount":{"$ref":"#/components/schemas/RetryCount"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"},"url":{"$ref":"#/components/schemas/RequestUrl"},"userData":{"$ref":"#/components/schemas/RequestUserData"}},"required":["uniqueKey","url"],"type":"object"},"RequestId":{"type":"string"},"RequestLockInfo":{"properties":{"lockExpiresAt":{"$ref":"#/components/schemas/LockExpiresAt"}},"required":["lockExpiresAt"],"type":"object"},"RequestMethod":{"$ref":"#/components/schemas/HttpMethod"},"RequestQueueHead":{"properties":{"hadMultipleClients":{"$ref":"#/components/schemas/HadMultipleClients"},"items":{"items":{"$ref":"#/components/schemas/RequestQueueHeadItem"},"type":"array"},"limit":{"$ref":"#/components/schemas/HeadLimit"},"queueModifiedAt":{"$ref":"#/components/schemas/QueueModifiedAt"}},"required":["limit","queueModifiedAt","hadMultipleClients","items"],"type":"object"},"RequestQueueHeadItem":{"properties":{"id":{"$ref":"#/components/schemas/RequestId"},"method":{"$ref":"#/components/schemas/RequestMethod"},"retryCount":{"$ref":"#/components/schemas/RetryCount"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"},"url":{"$ref":"#/components/schemas/RequestUrl"}},"required":["id","uniqueKey","url"],"type":"object"},"RequestQueueHeadResponse":{"properties":{"data":{"$ref":"#/components/schemas/RequestQueueHead"}},"required":["data"],"type":"object"},"RequestQueueListItem":{"properties":{"accessedAt":{"$ref":"#/components/schemas/QueueAccessedAt"},"actId":{"type":["string","null"]},"actRunId":{"type":["string","null"]},"createdAt":{"$ref":"#/components/schemas/QueueCreatedAt"},"expireAt":{"format":"date-time","type":"string"},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"hadMultipleClients":{"$ref":"#/components/schemas/HadMultipleClients"},"handledRequestCount":{"$ref":"#/components/schemas/HandledRequestCount"},"id":{"$ref":"#/components/schemas/QueueId"},"modifiedAt":{"$ref":"#/components/schemas/QueueModifiedAt"},"name":{"type":["string","null"]},"pendingRequestCount":{"$ref":"#/components/schemas/PendingRequestCount"},"stats":{"$ref":"#/components/schemas/RequestQueueListStats"},"title":{"type":["string","null"]},"totalRequestCount":{"$ref":"#/components/schemas/TotalRequestCount"},"userId":{"$ref":"#/components/schemas/QueueUserId"},"username":{"type":"string"}},"required":["id","userId","createdAt","modifiedAt","accessedAt","totalRequestCount","handledRequestCount","pendingRequestCount","hadMultipleClients"],"type":"object"},"RequestQueueListStats":{"properties":{"deleteCount":{"type":"integer"},"dynamodbStorageBytes":{"type":"integer"},"headItemReadCount":{"type":"integer"},"readCount":{"type":"integer"},"s3StorageBytes":{"type":"integer"},"writeCount":{"type":"integer"}},"type":"object"},"RequestQueueResource":{"properties":{"accessedAt":{"$ref":"#/components/schemas/QueueAccessedAt"},"actId":{"type":["string","null"]},"actRunId":{"type":["string","null"]},"consoleUrl":{"format":"uri","type":"string"},"createdAt":{"$ref":"#/components/schemas/QueueCreatedAt"},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"hadMultipleClients":{"$ref":"#/components/schemas/HadMultipleClients"},"handledRequestCount":{"$ref":"#/components/schemas/HandledRequestCount"},"id":{"$ref":"#/components/schemas/QueueId"},"modifiedAt":{"$ref":"#/components/schemas/QueueModifiedAt"},"name":{"type":["string","null"]},"pendingRequestCount":{"$ref":"#/components/schemas/PendingRequestCount"},"stats":{"$ref":"#/components/schemas/RequestQueueStats"},"title":{"type":["string","null"]},"totalRequestCount":{"$ref":"#/components/schemas/TotalRequestCount"},"userId":{"$ref":"#/components/schemas/QueueUserId"}},"required":["id","userId","createdAt","modifiedAt","accessedAt","totalRequestCount","handledRequestCount","pendingRequestCount","hadMultipleClients","consoleUrl"],"type":"object"},"RequestQueueResponse":{"properties":{"data":{"$ref":"#/components/schemas/RequestQueueResource"}},"required":["data"],"type":"object"},"RequestQueueStats":{"properties":{"deleteCount":{"type":"integer"},"headItemReadCount":{"type":"integer"},"readCount":{"type":"integer"},"storageBytes":{"type":"integer"},"writeCount":{"type":"integer"}},"type":"object"},"RequestRegistration":{"properties":{"requestId":{"$ref":"#/components/schemas/RequestId"},"wasAlreadyHandled":{"$ref":"#/components/schemas/WasAlreadyHandled"},"wasAlreadyPresent":{"$ref":"#/components/schemas/WasAlreadyPresent"}},"required":["requestId","wasAlreadyPresent","wasAlreadyHandled"],"type":"object"},"RequestResource":{"allOf":[{"$ref":"#/components/schemas/RequestBase","required":["id"]},{"properties":{"id":{"$ref":"#/components/schemas/RequestId"},"lockByClient":{"type":"string"},"lockExpiresAt":{"$ref":"#/components/schemas/LockExpiresAt"}}}]},"RequestResponse":{"properties":{"data":{"$ref":"#/components/schemas/RequestResource"}},"required":["data"],"type":"object"},"RequestUrl":{"type":"string"},"RequestUserData":{"type":"object"},"RetryCount":{"type":"integer"},"Run":{"properties":{"accountedChargedEventCounts":{"type":["object","null"]},"actId":{"type":"string"},"actorTaskId":{"type":["string","null"]},"buildId":{"type":"string"},"buildNumber":{"pattern":"^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$","type":["string","null"]},"chargedEventCounts":{"type":"object"},"consoleUrl":{"format":"uri","type":"string"},"containerUrl":{"format":"uri","type":"string"},"createdByOrganizationMemberUserId":{"type":"string"},"defaultDatasetId":{"type":"string"},"defaultKeyValueStoreId":{"type":"string"},"defaultRequestQueueId":{"type":"string"},"eventUsage":{"type":"object"},"exitCode":{"type":["integer","null"]},"externalChargedTotalUsd":{"type":"number"},"finishedAt":{"format":"date-time","type":["string","null"]},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"gitBranchName":{"type":["string","null"]},"id":{"type":"string"},"integrationTracking":{"$ref":"#/components/schemas/IntegrationTracking"},"isContainerServerReady":{"type":["boolean","null"]},"isStatusMessageTerminal":{"type":["boolean","null"]},"meta":{"$ref":"#/components/schemas/RunMeta"},"metamorphs":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunMetamorphEvent"},"type":"array"},{"type":"null"}]},"options":{"$ref":"#/components/schemas/RunOptions"},"output":{"type":"object"},"platformUsageBillingModel":{"type":"string"},"pricingInfo":{"$ref":"#/components/schemas/ActorRunPricingInfo"},"standby":{"anyOf":[{"$ref":"#/components/schemas/RunStandby"},{"type":"null"}]},"startedAt":{"format":"date-time","type":"string"},"stats":{"$ref":"#/components/schemas/RunStats"},"status":{"$ref":"#/components/schemas/ActorJobStatus"},"statusMessage":{"type":["string","null"]},"storageIds":{"properties":{"datasets":{"properties":{"default":{"type":"string"}},"type":"object"},"keyValueStores":{"properties":{"default":{"type":"string"}},"type":"object"},"requestQueues":{"properties":{"default":{"type":"string"}},"type":"object"}},"type":"object"},"usage":{"anyOf":[{"$ref":"#/components/schemas/RunUsage"},{"type":"null"}]},"usageTotalUsd":{"type":["number","null"]},"usageUsd":{"anyOf":[{"$ref":"#/components/schemas/RunUsageUsd"},{"type":"null"}]},"userId":{"type":"string"}},"required":["id","actId","userId","startedAt","status","meta","stats","options","buildId","defaultKeyValueStoreId","defaultDatasetId","defaultRequestQueueId"],"type":"object"},"RunListItem":{"properties":{"actId":{"type":"string"},"actorTaskId":{"type":["string","null"]},"buildId":{"type":"string"},"buildNumber":{"pattern":"^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$","type":"string"},"buildNumberInt":{"type":"integer"},"defaultDatasetId":{"type":"string"},"defaultKeyValueStoreId":{"type":"string"},"defaultRequestQueueId":{"type":"string"},"finishedAt":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"meta":{"$ref":"#/components/schemas/RunMeta"},"standby":{"anyOf":[{"$ref":"#/components/schemas/RunStandby"},{"type":"null"}]},"startedAt":{"format":"date-time","type":"string"},"status":{"$ref":"#/components/schemas/ActorJobStatus"},"usageTotalUsd":{"type":"number"},"userId":{"type":"string"}},"required":["id","actId","status","startedAt","buildId","meta","usageTotalUsd","defaultKeyValueStoreId","defaultDatasetId","defaultRequestQueueId"],"type":"object"},"RunMeta":{"properties":{"actorRunId":{"type":"string"},"clientIp":{"type":["string","null"]},"origin":{"$ref":"#/components/schemas/RunOrigin"},"scheduleId":{"type":["string","null"]},"scheduledAct2Id":{"type":"string"},"scheduledActorTaskId":{"type":"string"},"scheduledAt":{"format":"date-time","type":["string","null"]},"userAgent":{"type":["string","null"]},"webhookDispatchId":{"type":"string"}},"required":["origin"],"type":"object"},"RunMetamorphEvent":{"properties":{"actorId":{"type":"string"},"buildId":{"type":"string"},"buildTags":{"items":{"type":"string"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"inputKey":{"type":["string","null"]}},"required":["createdAt","actorId","buildId"],"type":"object"},"RunOptions":{"properties":{"build":{"type":"string"},"diskMbytes":{"minimum":0,"type":"integer"},"isMaxTotalChargeUsdSetByUser":{"type":"boolean"},"maxItems":{"minimum":0,"type":["integer","null"]},"maxTotalChargeUsd":{"minimum":0,"type":["number","null"]},"memoryMbytes":{"maximum":32768,"minimum":128,"type":"integer"},"restartOnError":{"type":["boolean","null"]},"timeoutSecs":{"minimum":0,"type":"integer"}},"required":["build","timeoutSecs","memoryMbytes","diskMbytes"],"type":"object"},"RunOrigin":{"type":"string"},"RunResponse":{"properties":{"data":{"$ref":"#/components/schemas/Run"}},"required":["data"],"type":"object"},"RunStandby":{"properties":{"deployment":{"type":"string"}},"required":["deployment"],"type":"object"},"RunStats":{"properties":{"computeUnits":{"minimum":0,"type":"number"},"cpuAvgUsage":{"type":"number"},"cpuCurrentUsage":{"type":"number"},"cpuMaxUsage":{"type":"number"},"durationMillis":{"minimum":0,"type":"integer"},"inputBodyLen":{"minimum":0,"type":["integer","null"]},"memAvgBytes":{"type":"number"},"memCurrentBytes":{"minimum":0,"type":"integer"},"memMaxBytes":{"minimum":0,"type":"integer"},"metamorph":{"minimum":0,"type":"integer"},"migrationCount":{"minimum":0,"type":"integer"},"netRxBytes":{"minimum":0,"type":"integer"},"netTxBytes":{"minimum":0,"type":"integer"},"rebootCount":{"minimum":0,"type":"integer"},"restartCount":{"minimum":0,"type":"integer"},"resurrectCount":{"minimum":0,"type":"integer"},"runTimeSecs":{"minimum":0,"type":"number"}},"type":"object"},"RunUsage":{"properties":{"ACTOR_COMPUTE_UNITS":{"type":["number","null"]},"DATASET_READS":{"type":["integer","null"]},"DATASET_WRITES":{"type":["integer","null"]},"DATA_TRANSFER_EXTERNAL_GBYTES":{"type":["number","null"]},"DATA_TRANSFER_INTERNAL_GBYTES":{"type":["number","null"]},"KEY_VALUE_STORE_LISTS":{"type":["integer","null"]},"KEY_VALUE_STORE_READS":{"type":["integer","null"]},"KEY_VALUE_STORE_WRITES":{"type":["integer","null"]},"PROXY_RESIDENTIAL_TRANSFER_GBYTES":{"type":["number","null"]},"PROXY_SERPS":{"type":["integer","null"]},"PROXY_UNBLOCKER_UNITS":{"type":["number","null"]},"REQUEST_QUEUE_READS":{"type":["integer","null"]},"REQUEST_QUEUE_WRITES":{"type":["integer","null"]}},"type":"object"},"RunUsageUsd":{"properties":{"ACTOR_COMPUTE_UNITS":{"type":["number","null"]},"DATASET_READS":{"type":["number","null"]},"DATASET_WRITES":{"type":["number","null"]},"DATA_TRANSFER_EXTERNAL_GBYTES":{"type":["number","null"]},"DATA_TRANSFER_INTERNAL_GBYTES":{"type":["number","null"]},"KEY_VALUE_STORE_LISTS":{"type":["number","null"]},"KEY_VALUE_STORE_READS":{"type":["number","null"]},"KEY_VALUE_STORE_WRITES":{"type":["number","null"]},"PROXY_RESIDENTIAL_TRANSFER_GBYTES":{"type":["number","null"]},"PROXY_SERPS":{"type":["number","null"]},"PROXY_UNBLOCKER_UNITS":{"type":["number","null"]},"REQUEST_QUEUE_READS":{"type":["number","null"]},"REQUEST_QUEUE_WRITES":{"type":["number","null"]}},"type":"object"},"Schedule":{"allOf":[{"$ref":"#/components/schemas/ScheduleBase"},{"properties":{"actions":{"items":{"$ref":"#/components/schemas/ScheduleAction"},"type":"array"},"description":{"type":["string","null"]},"integrationTracking":{"$ref":"#/components/schemas/IntegrationTracking"},"notifications":{"$ref":"#/components/schemas/ScheduleNotifications"},"title":{"type":["string","null"]},"uiState":{"$ref":"#/components/schemas/ScheduleUiState"}},"required":["actions"],"type":"object"}]},"ScheduleAction":{"oneOf":[{"$ref":"#/components/schemas/ScheduleActionRunActor"},{"$ref":"#/components/schemas/ScheduleActionRunActorTask"}]},"ScheduleActionRunActor":{"properties":{"actorId":{"type":"string"},"id":{"type":"string"},"runInput":{"anyOf":[{"$ref":"#/components/schemas/ScheduleActionRunInput"},{"type":"null"}]},"runOptions":{"anyOf":[{"$ref":"#/components/schemas/TaskOptions"},{"type":"null"}]},"type":{}},"required":["id","type","actorId"],"type":"object"},"ScheduleActionRunActorTask":{"properties":{"actorTaskId":{"type":"string"},"id":{"type":"string"},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"type":{}},"required":["id","type","actorTaskId"],"type":"object"},"ScheduleActionRunInput":{"properties":{"body":{"type":["string","null"]},"contentType":{"type":["string","null"]}},"type":"object"},"ScheduleBase":{"properties":{"createdAt":{"format":"date-time","type":"string"},"cronExpression":{"type":"string"},"id":{"type":"string"},"isEnabled":{"type":"boolean"},"isExclusive":{"type":"boolean"},"lastRunAt":{"format":"date-time","type":["string","null"]},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"nextRunAt":{"format":"date-time","type":["string","null"]},"timezone":{"type":"string"},"userId":{"type":"string"}},"required":["id","userId","name","cronExpression","timezone","isEnabled","isExclusive","createdAt","modifiedAt"],"type":"object"},"ScheduleListItem":{"allOf":[{"$ref":"#/components/schemas/ScheduleBase"},{"properties":{"actions":{"items":{"$ref":"#/components/schemas/ScheduleListItemAction"},"type":"array"},"integrationTracking":{"$ref":"#/components/schemas/IntegrationTracking"},"notifications":{"$ref":"#/components/schemas/ScheduleNotifications"},"title":{"type":["string","null"]}},"required":["actions"],"type":"object"}]},"ScheduleListItemAction":{"oneOf":[{"$ref":"#/components/schemas/ScheduleListItemActionRunActor"},{"$ref":"#/components/schemas/ScheduleListItemActionRunActorTask"}]},"ScheduleListItemActionRunActor":{"properties":{"actorId":{"type":"string"},"id":{"type":"string"},"type":{}},"required":["id","type","actorId"],"type":"object"},"ScheduleListItemActionRunActorTask":{"properties":{"actorTaskId":{"type":"string"},"id":{"type":"string"},"type":{}},"required":["id","type","actorTaskId"],"type":"object"},"ScheduleLogEntry":{"properties":{"createdAt":{"format":"date-time","type":"string"},"level":{"type":"string"},"message":{"type":"string"}},"required":["message","level","createdAt"],"type":"object"},"ScheduleLogResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ScheduleLogEntry"},"type":"array"}},"required":["data"],"type":"object"},"ScheduleNotifications":{"properties":{"email":{"type":"boolean"}},"type":"object"},"ScheduleResponse":{"properties":{"data":{"$ref":"#/components/schemas/Schedule"}},"required":["data"],"type":"object"},"ScheduleUiState":{"properties":{"data":{"properties":{"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"type":"object"},"version":{"type":"integer"}},"type":["object","null"]},"ServiceUsage":{"type":"object"},"SourceCodeFile":{"properties":{"content":{"type":"string"},"format":{"$ref":"#/components/schemas/SourceCodeFileFormat"},"name":{"type":"string"}},"required":["name"],"type":"object"},"SourceCodeFileFormat":{"type":"string"},"SourceCodeFolder":{"properties":{"folder":{"type":"boolean"},"name":{"type":"string"}},"required":["name","folder"],"type":"object"},"StoreActor":{"properties":{"actorReviewCount":{"type":"integer"},"actorReviewRating":{"type":"number"},"badge":{"type":["string","null"]},"bookmarkCount":{"type":"integer"},"categories":{"items":{"type":"string"},"type":"array"},"currentPricingInfo":{"$ref":"#/components/schemas/CurrentPricingInfo"},"description":{"type":["string","null"]},"id":{"type":"string"},"inputSchema":{"properties":{"properties":{"type":"object"},"required":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"}},"required":["type","properties"],"type":"object"},"isWhiteListedForAgenticPayments":{"type":["boolean","null"]},"name":{"type":"string"},"notice":{"$ref":"#/components/schemas/ActorNotice"},"pictureUrl":{"type":["string","null"]},"readmeSummary":{"type":"string"},"stats":{"$ref":"#/components/schemas/ActorStats"},"title":{"type":"string"},"url":{"format":"uri","type":["string","null"]},"userFullName":{"type":["string","null"]},"userPictureUrl":{"format":"uri","type":["string","null"]},"username":{"type":"string"}},"required":["id","title","name","username","stats"],"type":"object"},"TaggedBuilds":{"type":"object"},"Task":{"properties":{"actId":{"type":"string"},"actorStandby":{"anyOf":[{"$ref":"#/components/schemas/ActorStandby"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/TaskInput"},{"items":{"$ref":"#/components/schemas/TaskInput"},"type":"array"},{"type":"null"}]},"isPublic":{"type":"boolean"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"nameLowerCase":{"type":"string"},"options":{"anyOf":[{"$ref":"#/components/schemas/TaskOptions"},{"type":"null"}]},"publicConfig":{"anyOf":[{"$ref":"#/components/schemas/TaskPublicConfig"},{"type":"null"}]},"removedAt":{"format":"date-time","type":["string","null"]},"standbyUrl":{"format":"uri","type":["string","null"]},"stats":{"anyOf":[{"$ref":"#/components/schemas/TaskStats"},{"type":"null"}]},"title":{"type":["string","null"]},"userId":{"type":"string"},"username":{"type":["string","null"]}},"required":["id","userId","actId","name","createdAt","modifiedAt"],"type":"object"},"TaskInput":{"type":"object"},"TaskListItem":{"properties":{"actId":{"type":"string"},"actName":{"type":["string","null"]},"actUsername":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"isPublic":{"type":"boolean"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"stats":{"anyOf":[{"$ref":"#/components/schemas/TaskStats"},{"type":"null"}]},"title":{"type":["string","null"]},"userId":{"type":"string"},"username":{"type":["string","null"]}},"required":["id","userId","actId","name","createdAt","modifiedAt"],"type":"object"},"TaskOptions":{"properties":{"build":{"type":["string","null"]},"forcePermissionLevel":{"anyOf":[{"$ref":"#/components/schemas/ActorPermissionLevel"},{"type":"null"}]},"isMaxTotalChargeUsdSetByUser":{"type":["boolean","null"]},"maxItems":{"type":["integer","null"]},"maxTotalChargeUsd":{"type":["number","null"]},"memoryMbytes":{"type":["integer","null"]},"restartOnError":{"type":["boolean","null"]},"timeoutSecs":{"type":["integer","null"]}},"type":"object"},"TaskPublicConfig":{"properties":{"categorization":{"type":["string","null"]},"datasetName":{"type":["string","null"]},"datasetView":{"type":["string","null"]},"faq":{"items":{"properties":{"answer":{"type":"string"},"question":{"type":"string"}},"required":["question","answer"],"type":"object"},"type":["array","null"]},"highlightedFields":{"items":{"type":"string"},"type":["array","null"]},"inputSchemaFields":{"items":{"type":"string"},"type":["array","null"]},"publishedAt":{"format":"date-time","type":["string","null"]},"seoDescription":{"maxLength":160,"type":["string","null"]},"seoTitle":{"maxLength":60,"type":["string","null"]}},"type":"object"},"TaskResponse":{"properties":{"data":{"$ref":"#/components/schemas/Task"}},"required":["data"],"type":"object"},"TaskStats":{"properties":{"lastRunStartedAt":{"format":"date-time","type":["string","null"]},"totalRuns":{"type":"integer"}},"type":"object"},"TieredPricingPerDatasetItem":{"type":"object"},"TotalRequestCount":{"minimum":0,"type":"integer"},"UniqueKey":{"type":"string"},"UnlockRequestsResponse":{"properties":{"data":{"$ref":"#/components/schemas/UnlockRequestsResult"}},"required":["data"],"type":"object"},"UnlockRequestsResult":{"properties":{"unlockedCount":{"type":"integer"}},"required":["unlockedCount"],"type":"object"},"UnprocessedRequest":{"properties":{"id":{"$ref":"#/components/schemas/RequestId"},"method":{"$ref":"#/components/schemas/RequestMethod"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"},"url":{"$ref":"#/components/schemas/RequestUrl"}},"required":["uniqueKey","url"],"type":"object"},"UpdateRequestResponse":{"properties":{"data":{"$ref":"#/components/schemas/RequestRegistration"}},"required":["data"],"type":"object"},"UsageCycle":{"properties":{"endAt":{"format":"date-time","type":"string"},"startAt":{"format":"date-time","type":"string"}},"required":["startAt","endAt"],"type":"object"},"UserPlan":{"properties":{"apiRateLimitBoosts":{"type":"integer"},"availableAddOns":{"items":{"type":"string"},"type":"array"},"availableProxyGroups":{"$ref":"#/components/schemas/AvailableProxyGroups"},"dataRetentionDays":{"type":"integer"},"description":{"type":"string"},"enabledPlatformFeatures":{"items":{"type":"string"},"type":"array"},"forceBillingInterval":{"type":"string"},"id":{"type":"string"},"isEnabled":{"type":"boolean"},"isPayingCustomer":{"type":"boolean"},"legacyPlanId":{"type":"string"},"maxActorCount":{"type":"integer"},"maxActorMemoryGbytes":{"type":"number"},"maxActorTaskCount":{"type":"integer"},"maxConcurrentActorRuns":{"type":"integer"},"maxMonthlyActorComputeUnits":{"type":"number"},"maxMonthlyExternalDataTransferGbytes":{"type":"number"},"maxMonthlyProxySerps":{"type":"integer"},"maxMonthlyResidentialProxyGbytes":{"type":"number"},"maxMonthlyUnblockerUnits":{"type":"integer"},"maxMonthlyUsageUsd":{"type":"number"},"maxPublicActorTaskCount":{"type":"integer"},"maxPublicActorTaskCountPerActor":{"type":"integer"},"maxScheduleCount":{"type":"integer"},"monitoringLevel":{"type":["string","null"]},"monthlyBasePriceUsd":{"type":"number"},"monthlyUsageCreditsUsd":{"type":"number"},"overageThresholdUsd":{"type":"number"},"personalizedSupport":{"type":["string","null"]},"planPricing":{"type":"object"},"planTags":{"items":{"type":"string"},"type":"array"},"planVersion":{"type":"number"},"supportLevel":{"type":"string"},"teamAccountSeatCount":{"type":"integer"},"tier":{"type":"string"},"usageDiscountPercent":{"type":"number"}},"required":["availableProxyGroups"],"type":"object"},"UserPrivateInfo":{"properties":{"createdAt":{"format":"date-time","type":"string"},"effectivePlatformFeatures":{"$ref":"#/components/schemas/EffectivePlatformFeatures"},"email":{"format":"email","type":["string","null"]},"id":{"type":"string"},"isPaying":{"type":"boolean"},"organizationOwnerUserId":{"type":["string","null"]},"plan":{"$ref":"#/components/schemas/UserPlan"},"profile":{"$ref":"#/components/schemas/UserProfile"},"proxy":{"$ref":"#/components/schemas/ProxyResource"},"username":{"type":"string"}},"required":["username"],"type":"object"},"UserPrivateInfoResponse":{"properties":{"data":{"$ref":"#/components/schemas/UserPrivateInfo"}},"required":["data"],"type":"object"},"UserProfile":{"properties":{"bio":{"type":["string","null"]},"githubUsername":{"type":["string","null"]},"name":{"type":"string"},"pictureUrl":{"format":"uri","type":["string","null"]},"readme":{"type":["string","null"]},"twitterUsername":{"type":["string","null"]},"websiteUrl":{"format":"uri","type":["string","null"]}},"type":"object"},"UserProxyInfo":{"properties":{"effectivePlatformFeatures":{"$ref":"#/components/schemas/EffectivePlatformFeatures"},"isPaying":{"type":"boolean"},"plan":{"properties":{"availableProxyGroups":{"$ref":"#/components/schemas/AvailableProxyGroups"}},"required":["availableProxyGroups"],"type":"object"}},"required":["plan","effectivePlatformFeatures","isPaying"],"type":"object"},"UserProxyInfoResponse":{"properties":{"data":{"$ref":"#/components/schemas/UserProxyInfo"}},"required":["data"],"type":"object"},"UserPublicInfo":{"properties":{"profile":{"$ref":"#/components/schemas/UserProfile"},"username":{"type":"string"}},"required":["username"],"type":"object"},"UserPublicInfoResponse":{"properties":{"data":{"$ref":"#/components/schemas/UserPublicInfo"}},"required":["data"],"type":"object"},"Version":{"properties":{"actorPath":{"maxLength":255,"minLength":1,"type":["string","null"]},"applyEnvVarsToBuild":{"type":["boolean","null"]},"bitbucketWebhookId":{"type":["string","null"]},"buildTag":{"type":["string","null"]},"envVars":{"anyOf":[{"items":{"$ref":"#/components/schemas/EnvVar"},"type":"array"},{"type":"null"}]},"gitHubGistUrl":{"type":["string","null"]},"gitRepoUrl":{"type":["string","null"]},"githubWebhookId":{"type":["integer","null"]},"gitlabWebhookId":{"type":["integer","null"]},"sourceFiles":{"$ref":"#/components/schemas/VersionSourceFiles"},"sourceType":{"anyOf":[{"$ref":"#/components/schemas/VersionSourceType"},{"type":"null"}]},"tarballUrl":{"type":["string","null"]},"versionNumber":{"pattern":"^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])$","type":"string"}},"required":["versionNumber","sourceType"],"type":"object"},"VersionResponse":{"properties":{"data":{"$ref":"#/components/schemas/Version"}},"required":["data"],"type":"object"},"VersionSourceFiles":{"items":{"anyOf":[{"$ref":"#/components/schemas/SourceCodeFile"},{"$ref":"#/components/schemas/SourceCodeFolder"}]},"type":"array"},"VersionSourceType":{"type":"string"},"WasAlreadyHandled":{"type":"boolean"},"WasAlreadyPresent":{"type":"boolean"},"WebhookCondition":{"properties":{"actorId":{"type":["string","null"]},"actorRunId":{"type":["string","null"]},"actorTaskId":{"type":["string","null"]}},"type":"object"},"WebhookDatasetTransformation":{"properties":{"fields":{"items":{"type":"string"},"type":"array"},"omit":{"items":{"type":"string"},"type":"array"}},"type":"object"},"WebhookDispatch":{"properties":{"calls":{"items":{"properties":{"debugPostMessage":{"type":"object"},"errorMessage":{"type":["string","null"]},"finishedAt":{"format":"date-time","type":["string","null"]},"responseBody":{"type":["string","null"]},"responseStatus":{"type":["integer","null"]},"startedAt":{"format":"date-time","type":["string","null"]}},"type":"object"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"eventData":{"properties":{"actorBuildId":{"type":"string"},"actorId":{"type":"string"},"actorRunId":{"type":"string"},"actorTaskId":{"type":["string","null"]}},"required":["actorId"],"type":["object","null"]},"eventType":{"$ref":"#/components/schemas/WebhookEventType"},"id":{"type":"string"},"status":{"$ref":"#/components/schemas/WebhookDispatchStatus"},"userId":{"type":"string"},"webhook":{"anyOf":[{"$ref":"#/components/schemas/WebhookDispatchWebhookSummary"},{"type":"null"}]},"webhookId":{"type":"string"}},"required":["id","userId","webhookId","createdAt","status","eventType"],"type":"object"},"WebhookDispatchResponse":{"properties":{"data":{"$ref":"#/components/schemas/WebhookDispatch"}},"required":["data"],"type":"object"},"WebhookDispatchStatus":{"type":"string"},"WebhookDispatchWebhookSummary":{"properties":{"_id":{"type":"string"},"actionType":{"type":"string"},"condition":{"$ref":"#/components/schemas/WebhookCondition"},"githubIssue":{"$ref":"#/components/schemas/WebhookGithubIssue"},"googleDrive":{"$ref":"#/components/schemas/WebhookGoogleDrive"},"googleMail":{"$ref":"#/components/schemas/WebhookGoogleMail"},"isAdHoc":{"type":"boolean"},"isApifyIntegration":{"type":["boolean","null"]},"requestUrl":{"format":"uri","type":["string","null"]},"slackMessage":{"$ref":"#/components/schemas/WebhookSlackMessage"}},"type":"object"},"WebhookEventType":{"type":"string"},"WebhookGithubIssue":{"properties":{"body":{"type":"string"},"repository":{"type":"string"},"title":{"type":"string"},"userIntegrationId":{"type":"string"}},"type":"object"},"WebhookGoogleDrive":{"properties":{"filename":{"type":"string"},"format":{"type":["string","null"]},"transformation":{"$ref":"#/components/schemas/WebhookDatasetTransformation"},"userIntegrationId":{"type":"string"}},"type":"object"},"WebhookGoogleMail":{"properties":{"attachmentFormat":{"type":"string"},"attachmentTransformation":{"$ref":"#/components/schemas/WebhookDatasetTransformation"},"body":{"type":"string"},"emailTo":{"items":{"type":"string"},"type":"array"},"subject":{"type":"string"},"userIntegrationId":{"type":"string"}},"type":"object"},"WebhookLastDispatch":{"properties":{"finishedAt":{"format":"date-time","type":["string","null"]},"removedAt":{"format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/WebhookDispatchStatus"}},"required":["status"],"type":"object"},"WebhookListItem":{"properties":{"actionType":{"type":"string"},"condition":{"$ref":"#/components/schemas/WebhookCondition"},"createdAt":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"doNotRetry":{"type":"boolean"},"eventTypes":{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array"},"githubIssue":{"$ref":"#/components/schemas/WebhookGithubIssue"},"googleDrive":{"$ref":"#/components/schemas/WebhookGoogleDrive"},"googleMail":{"$ref":"#/components/schemas/WebhookGoogleMail"},"headersTemplate":{"type":["string","null"]},"id":{"type":"string"},"ignoreSslErrors":{"type":"boolean"},"isAdHoc":{"type":["boolean","null"]},"isApifyIntegration":{"type":"boolean"},"isEnabled":{"type":"boolean"},"lastDispatch":{"anyOf":[{"$ref":"#/components/schemas/WebhookLastDispatch"},{"type":"null"}]},"modifiedAt":{"format":"date-time","type":"string"},"requestUrl":{"format":"uri","type":["string","null"]},"shouldInterpolateStrings":{"type":["boolean","null"]},"slackMessage":{"$ref":"#/components/schemas/WebhookSlackMessage"},"stats":{"anyOf":[{"$ref":"#/components/schemas/WebhookStats"},{"type":"null"}]},"title":{"type":["string","null"]},"userId":{"type":"string"}},"required":["id","createdAt","modifiedAt","userId","eventTypes","condition","ignoreSslErrors","doNotRetry"],"type":"object"},"WebhookResource":{"properties":{"actionType":{"type":"string"},"condition":{"$ref":"#/components/schemas/WebhookCondition"},"createdAt":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"doNotRetry":{"type":["boolean","null"]},"eventTypes":{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array"},"githubIssue":{"$ref":"#/components/schemas/WebhookGithubIssue"},"googleDrive":{"$ref":"#/components/schemas/WebhookGoogleDrive"},"googleMail":{"$ref":"#/components/schemas/WebhookGoogleMail"},"headersTemplate":{"type":["string","null"]},"id":{"type":"string"},"ignoreSslErrors":{"type":"boolean"},"isAdHoc":{"type":["boolean","null"]},"isApifyIntegration":{"type":["boolean","null"]},"isEnabled":{"type":"boolean"},"lastDispatch":{"anyOf":[{"$ref":"#/components/schemas/WebhookLastDispatch"},{"type":"null"}]},"modifiedAt":{"format":"date-time","type":"string"},"payloadTemplate":{"type":["string","null"]},"requestUrl":{"format":"uri","type":["string","null"]},"shouldInterpolateStrings":{"type":["boolean","null"]},"slackMessage":{"$ref":"#/components/schemas/WebhookSlackMessage"},"stats":{"anyOf":[{"$ref":"#/components/schemas/WebhookStats"},{"type":"null"}]},"title":{"type":["string","null"]},"userId":{"type":"string"}},"required":["id","createdAt","modifiedAt","userId","eventTypes","condition","ignoreSslErrors"],"type":"object"},"WebhookResponse":{"properties":{"data":{"$ref":"#/components/schemas/WebhookResource"}},"required":["data"],"type":"object"},"WebhookSlackMessage":{"properties":{"channelId":{"type":"string"},"messageTemplate":{"type":"string"},"userIntegrationId":{"type":"string"}},"type":"object"},"WebhookStats":{"properties":{"totalDispatches":{"type":"integer"}},"type":"object"}},"specVersion":"v2-2026-11-18T151559Z"} +{"operations":{"DELETE /v2/actor-runs/{runId}/request-queue/requests/batch":{"$ref":"#/components/schemas/BatchDeleteResponse"},"DELETE /v2/actor-tasks/{actorTaskId}":{"type":"object"},"DELETE /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests/batch":{"$ref":"#/components/schemas/BatchDeleteResponse"},"DELETE /v2/actors/{actorId}":{"type":"object"},"DELETE /v2/actors/{actorId}/runs/last/request-queue/requests/batch":{"$ref":"#/components/schemas/BatchDeleteResponse"},"DELETE /v2/actors/{actorId}/versions/{versionNumber}":{"type":"object"},"DELETE /v2/actors/{actorId}/versions/{versionNumber}/env-vars/{envVarName}":{"type":"object"},"DELETE /v2/browser-info":{"$ref":"#/components/schemas/BrowserInfoResponse"},"DELETE /v2/request-queues/{queueId}/requests/batch":{"$ref":"#/components/schemas/BatchDeleteResponse"},"DELETE /v2/schedules/{scheduleId}":{"type":"object"},"DELETE /v2/webhooks/{webhookId}":{"type":"object"},"GET /v2/actor-builds":{"$ref":"#/components/schemas/ListOfBuildsResponse"},"GET /v2/actor-builds/{buildId}":{"allOf":[{"$ref":"#/components/schemas/BuildResponse"}]},"GET /v2/actor-builds/{buildId}/openapi.json":{"type":"object"},"GET /v2/actor-oauth-accounts/{accountId}":{"$ref":"#/components/schemas/ActorOAuthAccountResponse"},"GET /v2/actor-oauth-accounts/{connectionId}/accounts":{"$ref":"#/components/schemas/ListOfActorOAuthAccountsResponse"},"GET /v2/actor-runs":{"allOf":[{"$ref":"#/components/schemas/ListOfRunsResponse"}]},"GET /v2/actor-runs/{runId}":{"allOf":[{"$ref":"#/components/schemas/RunResponse"}]},"GET /v2/actor-runs/{runId}/dataset":{"$ref":"#/components/schemas/DatasetResponse"},"GET /v2/actor-runs/{runId}/dataset/items":{"items":{"type":"object"},"type":"array"},"GET /v2/actor-runs/{runId}/dataset/statistics":{"$ref":"#/components/schemas/DatasetStatisticsResponse"},"GET /v2/actor-runs/{runId}/key-value-store":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"GET /v2/actor-runs/{runId}/key-value-store/keys":{"$ref":"#/components/schemas/ListOfKeysResponse"},"GET /v2/actor-runs/{runId}/key-value-store/records/{recordKey}":{"$ref":"#/components/schemas/RecordResponse"},"GET /v2/actor-runs/{runId}/request-queue":{"$ref":"#/components/schemas/RequestQueueResponse"},"GET /v2/actor-runs/{runId}/request-queue/head":{"$ref":"#/components/schemas/RequestQueueHeadResponse"},"GET /v2/actor-runs/{runId}/request-queue/requests":{"$ref":"#/components/schemas/ListOfRequestsResponse"},"GET /v2/actor-runs/{runId}/request-queue/requests/{requestId}":{"$ref":"#/components/schemas/RequestResponse"},"GET /v2/actor-tasks":{"$ref":"#/components/schemas/ListOfTasksResponse"},"GET /v2/actor-tasks/{actorTaskId}":{"properties":{"data":{"$ref":"#/components/schemas/Task"}},"required":["data"],"type":"object"},"GET /v2/actor-tasks/{actorTaskId}/input":{"type":"object"},"GET /v2/actor-tasks/{actorTaskId}/run-sync":{"type":"object"},"GET /v2/actor-tasks/{actorTaskId}/run-sync-get-dataset-items":{"type":"object"},"GET /v2/actor-tasks/{actorTaskId}/runs":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/RunListItem"},"type":"array"}},"required":["items"],"type":"object"}]}},"required":["data"],"type":"object"},"GET /v2/actor-tasks/{actorTaskId}/runs/last":{"properties":{"data":{"$ref":"#/components/schemas/Run"}},"required":["data"],"type":"object"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/dataset":{"$ref":"#/components/schemas/DatasetResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/dataset/items":{"items":{"type":"object"},"type":"array"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/dataset/statistics":{"$ref":"#/components/schemas/DatasetStatisticsResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/key-value-store":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/key-value-store/keys":{"$ref":"#/components/schemas/ListOfKeysResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/key-value-store/records/{recordKey}":{"$ref":"#/components/schemas/RecordResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/request-queue":{"$ref":"#/components/schemas/RequestQueueResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/head":{"$ref":"#/components/schemas/RequestQueueHeadResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests":{"$ref":"#/components/schemas/ListOfRequestsResponse"},"GET /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests/{requestId}":{"$ref":"#/components/schemas/RequestResponse"},"GET /v2/actor-tasks/{actorTaskId}/webhooks":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookResource"},"type":"array"}},"required":["items"],"type":"object"}]}},"required":["data"],"type":"object"},"GET /v2/actors":{"$ref":"#/components/schemas/ListOfActorsResponse"},"GET /v2/actors/{actorId}":{"$ref":"#/components/schemas/ActorResponse"},"GET /v2/actors/{actorId}/builds":{"$ref":"#/components/schemas/ListOfBuildsResponse"},"GET /v2/actors/{actorId}/builds/default":{"$ref":"#/components/schemas/BuildResponse"},"GET /v2/actors/{actorId}/builds/{buildId}":{"$ref":"#/components/schemas/BuildResponse"},"GET /v2/actors/{actorId}/builds/{buildId}/openapi.json":{"type":"object"},"GET /v2/actors/{actorId}/oauth-connections":{"$ref":"#/components/schemas/ListOfActorOAuthConnectionsResponse"},"GET /v2/actors/{actorId}/run-sync":{"type":"object"},"GET /v2/actors/{actorId}/run-sync-get-dataset-items":{"items":{"type":"object"},"type":"array"},"GET /v2/actors/{actorId}/runs":{"$ref":"#/components/schemas/ListOfRunsResponse"},"GET /v2/actors/{actorId}/runs/last":{"$ref":"#/components/schemas/RunResponse"},"GET /v2/actors/{actorId}/runs/last/dataset":{"$ref":"#/components/schemas/DatasetResponse"},"GET /v2/actors/{actorId}/runs/last/dataset/items":{"items":{"type":"object"},"type":"array"},"GET /v2/actors/{actorId}/runs/last/dataset/statistics":{"$ref":"#/components/schemas/DatasetStatisticsResponse"},"GET /v2/actors/{actorId}/runs/last/key-value-store":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"GET /v2/actors/{actorId}/runs/last/key-value-store/keys":{"$ref":"#/components/schemas/ListOfKeysResponse"},"GET /v2/actors/{actorId}/runs/last/key-value-store/records/{recordKey}":{"$ref":"#/components/schemas/RecordResponse"},"GET /v2/actors/{actorId}/runs/last/request-queue":{"$ref":"#/components/schemas/RequestQueueResponse"},"GET /v2/actors/{actorId}/runs/last/request-queue/head":{"$ref":"#/components/schemas/RequestQueueHeadResponse"},"GET /v2/actors/{actorId}/runs/last/request-queue/requests":{"$ref":"#/components/schemas/ListOfRequestsResponse"},"GET /v2/actors/{actorId}/runs/last/request-queue/requests/{requestId}":{"$ref":"#/components/schemas/RequestResponse"},"GET /v2/actors/{actorId}/runs/{runId}":{"$ref":"#/components/schemas/RunResponse"},"GET /v2/actors/{actorId}/versions":{"$ref":"#/components/schemas/ListOfVersionsResponse"},"GET /v2/actors/{actorId}/versions/{versionNumber}":{"$ref":"#/components/schemas/VersionResponse"},"GET /v2/actors/{actorId}/versions/{versionNumber}/env-vars":{"$ref":"#/components/schemas/ListOfEnvVarsResponse"},"GET /v2/actors/{actorId}/versions/{versionNumber}/env-vars/{envVarName}":{"$ref":"#/components/schemas/EnvVarResponse"},"GET /v2/actors/{actorId}/webhooks":{"$ref":"#/components/schemas/ListOfWebhookResourcesResponse"},"GET /v2/browser-info":{"$ref":"#/components/schemas/BrowserInfoResponse"},"GET /v2/datasets":{"$ref":"#/components/schemas/ListOfDatasetsResponse"},"GET /v2/datasets/{datasetId}":{"$ref":"#/components/schemas/DatasetResponse"},"GET /v2/datasets/{datasetId}/items":{"items":{"type":"object"},"type":"array"},"GET /v2/datasets/{datasetId}/statistics":{"$ref":"#/components/schemas/DatasetStatisticsResponse"},"GET /v2/integrations/git":{"$ref":"#/components/schemas/ListOfGitProviderIntegrationsResponse"},"GET /v2/key-value-stores":{"$ref":"#/components/schemas/ListOfKeyValueStoresResponse"},"GET /v2/key-value-stores/{storeId}":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"GET /v2/key-value-stores/{storeId}/keys":{"$ref":"#/components/schemas/ListOfKeysResponse"},"GET /v2/key-value-stores/{storeId}/records/{recordKey}":{"$ref":"#/components/schemas/RecordResponse"},"GET /v2/request-queues":{"$ref":"#/components/schemas/ListOfRequestQueuesResponse"},"GET /v2/request-queues/{queueId}":{"$ref":"#/components/schemas/RequestQueueResponse"},"GET /v2/request-queues/{queueId}/head":{"$ref":"#/components/schemas/RequestQueueHeadResponse"},"GET /v2/request-queues/{queueId}/requests":{"$ref":"#/components/schemas/ListOfRequestsResponse"},"GET /v2/request-queues/{queueId}/requests/{requestId}":{"$ref":"#/components/schemas/RequestResponse"},"GET /v2/schedules":{"$ref":"#/components/schemas/ListOfSchedulesResponse"},"GET /v2/schedules/{scheduleId}":{"$ref":"#/components/schemas/ScheduleResponse"},"GET /v2/schedules/{scheduleId}/log":{"$ref":"#/components/schemas/ScheduleLogResponse"},"GET /v2/store":{"$ref":"#/components/schemas/ListOfStoreActorsResponse"},"GET /v2/users/me":{"anyOf":[{"$ref":"#/components/schemas/UserPrivateInfoResponse"},{"$ref":"#/components/schemas/UserProxyInfoResponse"}]},"GET /v2/users/me/limits":{"$ref":"#/components/schemas/AccountLimitsResponse"},"GET /v2/users/me/usage/monthly":{"$ref":"#/components/schemas/MonthlyUsageResponse"},"GET /v2/users/{userId}":{"anyOf":[{"$ref":"#/components/schemas/UserPublicInfoResponse"},{"$ref":"#/components/schemas/UserPrivateInfoResponse"},{"$ref":"#/components/schemas/UserProxyInfoResponse"}]},"GET /v2/users/{userId}/limits":{"$ref":"#/components/schemas/AccountLimitsResponse"},"GET /v2/users/{userId}/usage/monthly":{"$ref":"#/components/schemas/MonthlyUsageResponse"},"GET /v2/webhook-dispatches":{"$ref":"#/components/schemas/ListOfWebhookDispatchesResponse"},"GET /v2/webhook-dispatches/{dispatchId}":{"$ref":"#/components/schemas/WebhookDispatchResponse"},"GET /v2/webhooks":{"$ref":"#/components/schemas/ListOfWebhooksResponse"},"GET /v2/webhooks/{webhookId}":{"$ref":"#/components/schemas/WebhookResponse"},"GET /v2/webhooks/{webhookId}/dispatches":{"$ref":"#/components/schemas/ListOfWebhookDispatchesResponse"},"POST /v2/actor-builds/{buildId}/abort":{"allOf":[{"$ref":"#/components/schemas/BuildResponse"}]},"POST /v2/actor-runs/{runId}/abort":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actor-runs/{runId}/charge":{"type":"object"},"POST /v2/actor-runs/{runId}/dataset/items":{"type":"object"},"POST /v2/actor-runs/{runId}/key-value-store/records/{recordKey}":{"type":"object"},"POST /v2/actor-runs/{runId}/metamorph":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actor-runs/{runId}/reboot":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actor-runs/{runId}/request-queue/head/lock":{"$ref":"#/components/schemas/LockedRequestQueueHeadResponse"},"POST /v2/actor-runs/{runId}/request-queue/requests":{"$ref":"#/components/schemas/AddRequestResponse"},"POST /v2/actor-runs/{runId}/request-queue/requests/batch":{"$ref":"#/components/schemas/BatchAddResponse"},"POST /v2/actor-runs/{runId}/request-queue/requests/unlock":{"$ref":"#/components/schemas/UnlockRequestsResponse"},"POST /v2/actor-runs/{runId}/resurrect":{"allOf":[{"$ref":"#/components/schemas/RunResponse"}]},"POST /v2/actor-tasks":{"$ref":"#/components/schemas/TaskResponse"},"POST /v2/actor-tasks/{actorTaskId}/run-sync":{"type":"object"},"POST /v2/actor-tasks/{actorTaskId}/run-sync-get-dataset-items":{"type":"object"},"POST /v2/actor-tasks/{actorTaskId}/runs":{"properties":{"data":{"$ref":"#/components/schemas/Run"}},"required":["data"],"type":"object"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/abort":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/dataset/items":{"type":"object"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/key-value-store/records/{recordKey}":{"type":"object"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/metamorph":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/reboot":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/head/lock":{"$ref":"#/components/schemas/LockedRequestQueueHeadResponse"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests":{"$ref":"#/components/schemas/AddRequestResponse"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests/batch":{"$ref":"#/components/schemas/BatchAddResponse"},"POST /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests/unlock":{"$ref":"#/components/schemas/UnlockRequestsResponse"},"POST /v2/actors":{"$ref":"#/components/schemas/ActorResponse"},"POST /v2/actors/{actorId}/builds":{"$ref":"#/components/schemas/BuildResponse"},"POST /v2/actors/{actorId}/builds/{buildId}/abort":{"$ref":"#/components/schemas/BuildResponse"},"POST /v2/actors/{actorId}/run-sync":{"type":"object"},"POST /v2/actors/{actorId}/run-sync-get-dataset-items":{"items":{"type":"object"},"type":"array"},"POST /v2/actors/{actorId}/runs":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actors/{actorId}/runs/last/abort":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actors/{actorId}/runs/last/dataset/items":{"type":"object"},"POST /v2/actors/{actorId}/runs/last/key-value-store/records/{recordKey}":{"type":"object"},"POST /v2/actors/{actorId}/runs/last/metamorph":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actors/{actorId}/runs/last/reboot":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actors/{actorId}/runs/last/request-queue/head/lock":{"$ref":"#/components/schemas/LockedRequestQueueHeadResponse"},"POST /v2/actors/{actorId}/runs/last/request-queue/requests":{"$ref":"#/components/schemas/AddRequestResponse"},"POST /v2/actors/{actorId}/runs/last/request-queue/requests/batch":{"$ref":"#/components/schemas/BatchAddResponse"},"POST /v2/actors/{actorId}/runs/last/request-queue/requests/unlock":{"$ref":"#/components/schemas/UnlockRequestsResponse"},"POST /v2/actors/{actorId}/runs/{runId}/abort":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actors/{actorId}/runs/{runId}/metamorph":{"$ref":"#/components/schemas/RunResponse"},"POST /v2/actors/{actorId}/runs/{runId}/resurrect":{"allOf":[{"$ref":"#/components/schemas/RunResponse"}]},"POST /v2/actors/{actorId}/validate-input":{"properties":{"valid":{"type":"boolean"}},"required":["valid"],"type":"object"},"POST /v2/actors/{actorId}/versions":{"$ref":"#/components/schemas/VersionResponse"},"POST /v2/actors/{actorId}/versions/{versionNumber}":{"$ref":"#/components/schemas/VersionResponse"},"POST /v2/actors/{actorId}/versions/{versionNumber}/env-vars":{"$ref":"#/components/schemas/EnvVarResponse"},"POST /v2/actors/{actorId}/versions/{versionNumber}/env-vars/{envVarName}":{"$ref":"#/components/schemas/EnvVarResponse"},"POST /v2/browser-info":{"$ref":"#/components/schemas/BrowserInfoResponse"},"POST /v2/datasets":{"$ref":"#/components/schemas/DatasetResponse"},"POST /v2/datasets/{datasetId}/items":{"type":"object"},"POST /v2/integrations/git/{providerId}/create-repo":{"$ref":"#/components/schemas/GitRepoResponse"},"POST /v2/integrations/git/{providerId}/register-deployment-key":{"$ref":"#/components/schemas/RegisterDeploymentKeyResponse"},"POST /v2/key-value-stores":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"POST /v2/key-value-stores/{storeId}/records/{recordKey}":{"type":"object"},"POST /v2/request-queues":{"$ref":"#/components/schemas/RequestQueueResponse"},"POST /v2/request-queues/{queueId}/head/lock":{"$ref":"#/components/schemas/LockedRequestQueueHeadResponse"},"POST /v2/request-queues/{queueId}/requests":{"$ref":"#/components/schemas/AddRequestResponse"},"POST /v2/request-queues/{queueId}/requests/batch":{"$ref":"#/components/schemas/BatchAddResponse"},"POST /v2/request-queues/{queueId}/requests/unlock":{"$ref":"#/components/schemas/UnlockRequestsResponse"},"POST /v2/schedules":{"$ref":"#/components/schemas/ScheduleResponse"},"POST /v2/schedules/{scheduleId}/invoke":{"type":"object"},"POST /v2/tools/decode-and-verify":{"$ref":"#/components/schemas/DecodeAndVerifyResponse"},"POST /v2/tools/encode-and-sign":{"$ref":"#/components/schemas/EncodeAndSignResponse"},"POST /v2/webhooks":{"$ref":"#/components/schemas/WebhookResponse"},"POST /v2/webhooks/{webhookId}/test":{"$ref":"#/components/schemas/WebhookDispatchResponse"},"PUT /v2/actor-runs/{runId}":{"$ref":"#/components/schemas/RunResponse"},"PUT /v2/actor-runs/{runId}/dataset":{"$ref":"#/components/schemas/DatasetResponse"},"PUT /v2/actor-runs/{runId}/key-value-store":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"PUT /v2/actor-runs/{runId}/key-value-store/records/{recordKey}":{"type":"object"},"PUT /v2/actor-runs/{runId}/request-queue":{"$ref":"#/components/schemas/RequestQueueResponse"},"PUT /v2/actor-runs/{runId}/request-queue/requests/{requestId}":{"$ref":"#/components/schemas/UpdateRequestResponse"},"PUT /v2/actor-runs/{runId}/request-queue/requests/{requestId}/lock":{"$ref":"#/components/schemas/ProlongRequestLockResponse"},"PUT /v2/actor-tasks/{actorTaskId}":{"properties":{"data":{"$ref":"#/components/schemas/Task"}},"required":["data"],"type":"object"},"PUT /v2/actor-tasks/{actorTaskId}/input":{"type":"object"},"PUT /v2/actor-tasks/{actorTaskId}/runs/last/dataset":{"$ref":"#/components/schemas/DatasetResponse"},"PUT /v2/actor-tasks/{actorTaskId}/runs/last/key-value-store":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"PUT /v2/actor-tasks/{actorTaskId}/runs/last/key-value-store/records/{recordKey}":{"type":"object"},"PUT /v2/actor-tasks/{actorTaskId}/runs/last/request-queue":{"$ref":"#/components/schemas/RequestQueueResponse"},"PUT /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests/{requestId}":{"$ref":"#/components/schemas/UpdateRequestResponse"},"PUT /v2/actor-tasks/{actorTaskId}/runs/last/request-queue/requests/{requestId}/lock":{"$ref":"#/components/schemas/ProlongRequestLockResponse"},"PUT /v2/actors/{actorId}":{"$ref":"#/components/schemas/ActorResponse"},"PUT /v2/actors/{actorId}/runs/last/dataset":{"$ref":"#/components/schemas/DatasetResponse"},"PUT /v2/actors/{actorId}/runs/last/key-value-store":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"PUT /v2/actors/{actorId}/runs/last/key-value-store/records/{recordKey}":{"type":"object"},"PUT /v2/actors/{actorId}/runs/last/request-queue":{"$ref":"#/components/schemas/RequestQueueResponse"},"PUT /v2/actors/{actorId}/runs/last/request-queue/requests/{requestId}":{"$ref":"#/components/schemas/UpdateRequestResponse"},"PUT /v2/actors/{actorId}/runs/last/request-queue/requests/{requestId}/lock":{"$ref":"#/components/schemas/ProlongRequestLockResponse"},"PUT /v2/actors/{actorId}/versions/{versionNumber}":{"$ref":"#/components/schemas/VersionResponse"},"PUT /v2/actors/{actorId}/versions/{versionNumber}/env-vars/{envVarName}":{"$ref":"#/components/schemas/EnvVarResponse"},"PUT /v2/browser-info":{"$ref":"#/components/schemas/BrowserInfoResponse"},"PUT /v2/datasets/{datasetId}":{"$ref":"#/components/schemas/DatasetResponse"},"PUT /v2/key-value-stores/{storeId}":{"$ref":"#/components/schemas/KeyValueStoreResponse"},"PUT /v2/key-value-stores/{storeId}/records/{recordKey}":{"type":"object"},"PUT /v2/request-queues/{queueId}":{"$ref":"#/components/schemas/RequestQueueResponse"},"PUT /v2/request-queues/{queueId}/requests/{requestId}":{"$ref":"#/components/schemas/UpdateRequestResponse"},"PUT /v2/request-queues/{queueId}/requests/{requestId}/lock":{"$ref":"#/components/schemas/ProlongRequestLockResponse"},"PUT /v2/schedules/{scheduleId}":{"$ref":"#/components/schemas/ScheduleResponse"},"PUT /v2/users/me/limits":{"type":"object"},"PUT /v2/users/{userId}/limits":{"type":"object"},"PUT /v2/webhooks/{webhookId}":{"$ref":"#/components/schemas/WebhookResponse"}},"schemas":{"AccountLimits":{"properties":{"current":{"$ref":"#/components/schemas/CurrentUsage"},"limits":{"$ref":"#/components/schemas/Limits"},"monthlyUsageCycle":{"$ref":"#/components/schemas/UsageCycle"}},"required":["monthlyUsageCycle","limits","current"],"type":"object"},"AccountLimitsResponse":{"properties":{"data":{"$ref":"#/components/schemas/AccountLimits"}},"required":["data"],"type":"object"},"ActorDefinition":{"properties":{"actorSpecification":{"type":"integer"},"buildTag":{"type":"string"},"changelog":{"type":["string","null"]},"defaultMemoryMbytes":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":{"type":"string"},"dockerContextDir":{"type":"string"},"dockerfile":{"type":"string"},"environmentVariables":{"type":"object"},"input":{"type":["object","null"]},"maxMemoryMbytes":{"minimum":128,"type":"integer"},"meta":{"$ref":"#/components/schemas/ActorDefinitionMeta"},"minMemoryMbytes":{"minimum":128,"type":"integer"},"name":{"type":"string"},"output":{"type":["object","null"]},"readme":{"type":["string","null"]},"storages":{"properties":{"dataset":{"type":"object"},"datasets":{"type":"object"},"keyValueStore":{"type":"object"}},"type":"object"},"title":{"type":"string"},"usesStandbyMode":{"type":"boolean"},"version":{"pattern":"^[0-9]+(\\.[0-9]+)+$","type":"string"},"webServerMcpPath":{"type":"string"},"webServerSchema":{"type":"object"}},"type":"object"},"ActorDefinitionMeta":{"properties":{"generatedBy":{"type":"string"},"templateId":{"type":"string"}},"type":"object"},"ActorJobStatus":{"type":"string"},"ActorListItem":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"stats":{"anyOf":[{"$ref":"#/components/schemas/ActorStats"},{"type":"null"}]},"title":{"type":"string"},"username":{"type":"string"}},"required":["id","createdAt","modifiedAt","name","username"],"type":"object"},"ActorNotice":{"type":["string","null"]},"ActorOAuthAccount":{"properties":{"_id":{"type":"string"},"authorizedAt":{"format":"date-time","type":["string","null"]},"connectionId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"data":{"type":"object"},"description":{"type":["string","null"]},"modifiedAt":{"format":"date-time","type":"string"},"userId":{"type":"string"}},"required":["_id","userId","connectionId","createdAt","modifiedAt","data"],"type":"object"},"ActorOAuthAccountResponse":{"properties":{"data":{"$ref":"#/components/schemas/ActorOAuthAccount"}},"required":["data"],"type":"object"},"ActorOAuthConnection":{"properties":{"_id":{"type":"string"},"actorId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"credentials":{"properties":{"clientId":{"type":"string"},"imageUrl":{"type":"string"},"label":{"type":"string"},"scope":{"type":"string"}},"type":"object"},"modifiedAt":{"format":"date-time","type":"string"},"oAuthProviderType":{"type":"string"}},"required":["_id","actorId","oAuthProviderType","createdAt","modifiedAt"],"type":"object"},"ActorPermissionLevel":{"type":"string"},"ActorResource":{"properties":{"actorPermissionLevel":{"$ref":"#/components/schemas/ActorPermissionLevel"},"actorStandby":{"anyOf":[{"$ref":"#/components/schemas/ActorStandby"},{"type":"null"}]},"categories":{"items":{"type":"string"},"type":["array","null"]},"createdAt":{"format":"date-time","type":"string"},"defaultRunOptions":{"$ref":"#/components/schemas/DefaultRunOptions"},"deploymentKey":{"type":"string"},"description":{"type":["string","null"]},"exampleRunInput":{"anyOf":[{"$ref":"#/components/schemas/ExampleRunInput"},{"type":"null"}]},"hasNoDataset":{"type":"boolean"},"id":{"type":"string"},"isCritical":{"type":"boolean"},"isDeprecated":{"type":["boolean","null"]},"isGeneric":{"type":"boolean"},"isPublic":{"type":"boolean"},"isSourceCodeHidden":{"type":"boolean"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"notice":{"$ref":"#/components/schemas/ActorNotice"},"pictureUrl":{"type":["string","null"]},"pricingInfos":{"items":{"$ref":"#/components/schemas/ActorRunPricingInfo"},"type":"array"},"readmeSummary":{"type":"string"},"restartOnError":{"type":["boolean","null"]},"seoDescription":{"type":["string","null"]},"seoTitle":{"type":["string","null"]},"standbyUrl":{"type":["string","null"]},"stats":{"$ref":"#/components/schemas/ActorStats"},"taggedBuilds":{"anyOf":[{"$ref":"#/components/schemas/TaggedBuilds"},{"type":"null"}]},"title":{"type":["string","null"]},"userId":{"type":"string"},"username":{"type":"string"},"versions":{"items":{"$ref":"#/components/schemas/Version"},"type":"array"}},"required":["id","userId","name","username","isPublic","createdAt","modifiedAt","stats","versions","defaultRunOptions"],"type":"object"},"ActorResponse":{"properties":{"data":{"$ref":"#/components/schemas/ActorResource"}},"required":["data"],"type":"object"},"ActorRunPricingInfo":{"oneOf":[{"$ref":"#/components/schemas/PayPerEventActorPricingInfo"},{"$ref":"#/components/schemas/PricePerDatasetItemActorPricingInfo"},{"$ref":"#/components/schemas/FlatPricePerMonthActorPricingInfo"},{"$ref":"#/components/schemas/FreeActorPricingInfo"}]},"ActorStandby":{"properties":{"build":{"type":["string","null"]},"desiredRequestsPerActorRun":{"type":["integer","null"]},"disableStandbyFieldsOverride":{"type":["boolean","null"]},"idleTimeoutSecs":{"type":["integer","null"]},"isConsoleAuthEnabled":{"type":["boolean","null"]},"isEnabled":{"type":["boolean","null"]},"isTokenlessEnabled":{"type":["boolean","null"]},"maxRequestsPerActorRun":{"type":["integer","null"]},"memoryMbytes":{"type":["integer","null"]},"shouldPassActorInput":{"type":["boolean","null"]},"tenancy":{"type":["string","null"]}},"type":"object"},"ActorStats":{"properties":{"actorReviewCount":{"type":"integer"},"actorReviewRating":{"type":"number"},"bookmarkCount":{"type":"integer"},"lastRunStartedAt":{"format":"date-time","type":"string"},"publicActorRunStats30Days":{"properties":{"ABORTED":{"type":"integer"},"FAILED":{"type":"integer"},"SUCCEEDED":{"type":"integer"},"TIMED-OUT":{"type":"integer"},"TOTAL":{"type":"integer"}},"type":"object"},"totalBuilds":{"type":"integer"},"totalMetamorphs":{"type":"integer"},"totalRuns":{"type":"integer"},"totalUsers":{"type":"integer"},"totalUsers30Days":{"type":"integer"},"totalUsers7Days":{"type":"integer"},"totalUsers90Days":{"type":"integer"}},"type":"object"},"AddRequestResponse":{"properties":{"data":{"$ref":"#/components/schemas/RequestRegistration"}},"required":["data"],"type":"object"},"AddedRequest":{"properties":{"requestId":{"$ref":"#/components/schemas/RequestId"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"},"wasAlreadyHandled":{"$ref":"#/components/schemas/WasAlreadyHandled"},"wasAlreadyPresent":{"$ref":"#/components/schemas/WasAlreadyPresent"}},"required":["requestId","uniqueKey","wasAlreadyHandled","wasAlreadyPresent"],"type":"object"},"AvailableProxyGroups":{"type":"object"},"BatchAddResponse":{"properties":{"data":{"$ref":"#/components/schemas/BatchAddResult"}},"required":["data"],"type":"object"},"BatchAddResult":{"properties":{"processedRequests":{"items":{"$ref":"#/components/schemas/AddedRequest"},"type":"array"},"unprocessedRequests":{"items":{"$ref":"#/components/schemas/UnprocessedRequest"},"type":"array"}},"required":["processedRequests","unprocessedRequests"],"type":"object"},"BatchDeleteResponse":{"properties":{"data":{"$ref":"#/components/schemas/BatchDeleteResult"}},"required":["data"],"type":"object"},"BatchDeleteResult":{"properties":{"processedRequests":{"items":{"$ref":"#/components/schemas/DeletedRequest"},"type":"array"},"unprocessedRequests":{"items":{"$ref":"#/components/schemas/UnprocessedRequest"},"type":"array"}},"required":["processedRequests","unprocessedRequests"],"type":"object"},"BrowserInfoResponse":{"properties":{"bodyLength":{"type":"integer"},"clientIp":{"type":["string","null"]},"countryCode":{"type":["string","null"]},"headers":{"type":"object"},"method":{"type":"string"},"rawHeaders":{"items":{"type":"string"},"type":"array"}},"required":["method","clientIp","countryCode","bodyLength"],"type":"object"},"Build":{"properties":{"actId":{"type":"string"},"actVersion":{"properties":{"actorPath":{"type":["string","null"]},"buildTag":{"type":["string","null"]},"gitHubGistUrl":{"type":"string"},"gitRepoUrl":{"type":"string"},"sourceFiles":{"items":{"$ref":"#/components/schemas/SourceCodeFile"},"type":"array"},"sourceType":{"$ref":"#/components/schemas/VersionSourceType"},"tarballUrl":{"type":"string"},"versionNumber":{"pattern":"^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])$","type":"string"}},"type":"object"},"actorDefinition":{"anyOf":[{"$ref":"#/components/schemas/ActorDefinition"},{"type":"null"}]},"buildNumber":{"pattern":"^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$","type":"string"},"changelog":{"type":["string","null"]},"createdByOrganizationMemberUserId":{"type":"string"},"exitCode":{"type":["integer","null"]},"finishedAt":{"format":"date-time","type":["string","null"]},"gitBranchName":{"type":"string"},"gitCommitId":{"type":"string"},"id":{"type":"string"},"imageDigest":{"type":["string","null"]},"inputSchema":{"type":["string","null"]},"meta":{"$ref":"#/components/schemas/BuildMeta"},"options":{"anyOf":[{"$ref":"#/components/schemas/BuildOptions"},{"type":"null"}]},"readme":{"type":["string","null"]},"startedAt":{"format":"date-time","type":"string"},"stats":{"anyOf":[{"$ref":"#/components/schemas/BuildStats"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/ActorJobStatus"},"usage":{"anyOf":[{"$ref":"#/components/schemas/BuildUsage"},{"type":"null"}]},"usageTotalUsd":{"type":["number","null"]},"usageUsd":{"anyOf":[{"$ref":"#/components/schemas/BuildUsage"},{"type":"null"}]},"userId":{"type":"string"}},"required":["id","actId","userId","startedAt","status","meta","buildNumber"],"type":"object"},"BuildListItem":{"properties":{"actId":{"type":"string"},"buildNumber":{"pattern":"^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$","type":"string"},"buildNumberInt":{"type":"integer"},"finishedAt":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"meta":{"$ref":"#/components/schemas/BuildMeta"},"startedAt":{"format":"date-time","type":"string"},"status":{"$ref":"#/components/schemas/ActorJobStatus"},"usageTotalUsd":{"type":"number"},"userId":{"type":"string"}},"required":["id","status","startedAt","buildNumber"],"type":"object"},"BuildMeta":{"properties":{"actorRunId":{"type":"string"},"clientIp":{"type":["string"]},"githubActionsRunUrl":{"type":"string"},"origin":{"$ref":"#/components/schemas/RunOrigin"},"userAgent":{"type":["string"]},"webhookDispatchId":{"type":"string"}},"required":["origin"],"type":"object"},"BuildOptions":{"properties":{"betaPackages":{"type":["boolean","null"]},"debug":{"type":["boolean","null"]},"diskMbytes":{"type":["integer","null"]},"memoryMbytes":{"type":["integer","null"]},"tag":{"type":["string","null"]},"useCache":{"type":["boolean","null"]}},"type":"object"},"BuildResponse":{"properties":{"data":{"$ref":"#/components/schemas/Build"}},"required":["data"],"type":"object"},"BuildStats":{"properties":{"computeUnits":{"type":"number"},"durationMillis":{"type":"integer"},"imageSizeBytes":{"type":["integer","null"]},"runTimeSecs":{"type":"number"}},"type":"object"},"BuildUsage":{"properties":{"ACTOR_COMPUTE_UNITS":{"type":["number","null"]}},"type":"object"},"CommonActorPricingInfo":{"properties":{"apifyMarginPercentage":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"forceContainsSignificantPriceChange":{"type":"boolean"},"isPriceChangeNotificationSuppressed":{"type":"boolean"},"notifiedAboutChangeAt":{"format":"date-time","type":["string","null"]},"notifiedAboutFutureChangeAt":{"format":"date-time","type":["string","null"]},"notifiedAboutRentalToPpePriceChangeAt":{"format":"date-time","type":["string","null"]},"reasonForChange":{"type":["string","null"]},"startedAt":{"format":"date-time","type":"string"}},"required":["apifyMarginPercentage","createdAt","startedAt"],"type":"object"},"CurrentPricingInfo":{"properties":{"apifyMarginPercentage":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"forceContainsSignificantPriceChange":{"type":"boolean"},"isPPEPlatformUsagePaidByUser":{"type":"boolean"},"isPriceChangeNotificationSuppressed":{"type":"boolean"},"minimalMaxTotalChargeUsd":{"type":["number","null"]},"notifiedAboutChangeAt":{"format":"date-time","type":["string","null"]},"notifiedAboutFutureChangeAt":{"format":"date-time","type":["string","null"]},"notifiedAboutRentalToPpePriceChangeAt":{"format":"date-time","type":["string","null"]},"pricePerUnitUsd":{"type":"number"},"pricingModel":{"type":"string"},"pricingPerEvent":{"type":["object","null"]},"reasonForChange":{"type":["string","null"]},"startedAt":{"format":"date-time","type":"string"},"tieredPricing":{"type":"object"},"trialMinutes":{"type":["integer","null"]},"unitName":{"type":"string"}},"required":["pricingModel"],"type":"object"},"CurrentUsage":{"properties":{"activeActorJobCount":{"type":"integer"},"actorCount":{"type":"integer"},"actorMemoryGbytes":{"type":"number"},"actorTaskCount":{"type":"integer"},"monthlyActorComputeUnits":{"type":"number"},"monthlyExternalDataTransferGbytes":{"type":"number"},"monthlyProxySerps":{"type":"integer"},"monthlyResidentialProxyGbytes":{"type":"number"},"monthlyUnblockerUnits":{"type":"number"},"monthlyUsageUsd":{"type":"number"},"scheduleCount":{"type":"integer"},"teamAccountSeatCount":{"type":"integer"}},"required":["monthlyUsageUsd","monthlyActorComputeUnits","monthlyExternalDataTransferGbytes","monthlyProxySerps","monthlyResidentialProxyGbytes","actorMemoryGbytes","actorCount","actorTaskCount","activeActorJobCount","teamAccountSeatCount"],"type":"object"},"DailyServiceUsage":{"properties":{"date":{"format":"date-time","type":"string"},"serviceUsage":{"$ref":"#/components/schemas/ServiceUsage"},"totalUsageCreditsUsd":{"type":"number"}},"required":["date","serviceUsage","totalUsageCreditsUsd"],"type":"object"},"DatasetListItem":{"properties":{"accessedAt":{"format":"date-time","type":"string"},"actId":{"type":["string","null"]},"actRunId":{"type":["string","null"]},"cleanItemCount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"id":{"type":"string"},"itemCount":{"type":"integer"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":["string","null"]},"stats":{"$ref":"#/components/schemas/DatasetStats"},"title":{"type":["string","null"]},"userId":{"type":"string"},"username":{"type":"string"}},"required":["id","userId","createdAt","modifiedAt","accessedAt","itemCount","cleanItemCount"],"type":"object"},"DatasetResource":{"properties":{"accessedAt":{"format":"date-time","type":"string"},"actId":{"type":["string","null"]},"actRunId":{"type":["string","null"]},"cleanItemCount":{"minimum":0,"type":"integer"},"consoleUrl":{"format":"uri","type":"string"},"createdAt":{"format":"date-time","type":"string"},"fields":{"items":{"type":"string"},"type":["array","null"]},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"id":{"type":"string"},"itemCount":{"minimum":0,"type":"integer"},"itemsPublicUrl":{"format":"uri","type":"string"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":["string","null"]},"schema":{"type":["object","null"]},"stats":{"$ref":"#/components/schemas/DatasetStats"},"title":{"type":["string","null"]},"urlSigningSecretKey":{"type":["string","null"]},"userId":{"type":"string"}},"required":["id","userId","createdAt","modifiedAt","accessedAt","itemCount","cleanItemCount","consoleUrl"],"type":"object"},"DatasetResponse":{"properties":{"data":{"$ref":"#/components/schemas/DatasetResource"}},"required":["data"],"type":"object"},"DatasetStatistics":{"properties":{"fieldStatistics":{"type":["object","null"]}},"type":"object"},"DatasetStatisticsResponse":{"properties":{"data":{"$ref":"#/components/schemas/DatasetStatistics"}},"required":["data"],"type":"object"},"DatasetStats":{"properties":{"inflatedBytes":{"type":"integer"},"readCount":{"type":"integer"},"storageBytes":{"type":"integer"},"writeCount":{"type":"integer"}},"type":"object"},"DecodeAndVerifyResponse":{"properties":{"data":{"$ref":"#/components/schemas/DecodeAndVerifyResult"}},"required":["data"],"type":"object"},"DecodeAndVerifyResult":{"properties":{"decoded":{},"encodedByUserId":{"type":["string","null"]},"isVerifiedUser":{"type":"boolean"}},"required":["decoded","encodedByUserId","isVerifiedUser"],"type":"object"},"DefaultRunOptions":{"properties":{"build":{"type":"string"},"forcePermissionLevel":{"anyOf":[{"$ref":"#/components/schemas/ActorPermissionLevel"},{"type":"null"}]},"isMaxTotalChargeUsdSetByUser":{"type":["boolean","null"]},"maxItems":{"type":["integer","null"]},"maxTotalChargeUsd":{"type":["number","null"]},"memoryMbytes":{"type":"integer"},"restartOnError":{"type":["boolean","null"]},"timeoutSecs":{"type":"integer"}},"type":"object"},"DeletedRequest":{"anyOf":[{"$ref":"#/components/schemas/DeletedRequestById"},{"$ref":"#/components/schemas/DeletedRequestByUniqueKey"}]},"DeletedRequestById":{"properties":{"id":{"$ref":"#/components/schemas/RequestId"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"}},"required":["id"],"type":"object"},"DeletedRequestByUniqueKey":{"properties":{"id":{"$ref":"#/components/schemas/RequestId"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"}},"required":["uniqueKey"],"type":"object"},"EffectivePlatformFeature":{"properties":{"disabledReason":{"type":["string","null"]},"disabledReasonType":{"type":["string","null"]},"isEnabled":{"type":"boolean"},"isTrial":{"type":"boolean"},"trialExpirationAt":{"format":"date-time","type":["string","null"]}},"required":["isEnabled","disabledReason","disabledReasonType","isTrial","trialExpirationAt"],"type":"object"},"EffectivePlatformFeatures":{"properties":{"ACTORS":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"ACTORS_PUBLIC_ALL":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"ACTORS_PUBLIC_DEVELOPER":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"PROXY":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"PROXY_EXTERNAL_ACCESS":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"PROXY_RESIDENTIAL":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"PROXY_SERPS":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"SCHEDULER":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"STORAGE":{"$ref":"#/components/schemas/EffectivePlatformFeature"},"WEBHOOKS":{"$ref":"#/components/schemas/EffectivePlatformFeature"}},"required":["ACTORS","STORAGE","SCHEDULER","PROXY","PROXY_EXTERNAL_ACCESS","PROXY_RESIDENTIAL","PROXY_SERPS","WEBHOOKS","ACTORS_PUBLIC_ALL","ACTORS_PUBLIC_DEVELOPER"],"type":"object"},"EncodeAndSignResponse":{"properties":{"data":{"$ref":"#/components/schemas/EncodeAndSignResult"}},"required":["data"],"type":"object"},"EncodeAndSignResult":{"properties":{"encoded":{"type":"string"}},"required":["encoded"],"type":"object"},"EnvVar":{"properties":{"isSecret":{"type":["boolean","null"]},"name":{"type":"string"},"value":{"type":"string"},"valueHash":{"type":"string"}},"required":["name"],"type":"object"},"EnvVarResponse":{"properties":{"data":{"$ref":"#/components/schemas/EnvVar"}},"required":["data"],"type":"object"},"ExampleRunInput":{"properties":{"body":{"type":"string"},"contentType":{"type":"string"}},"type":"object"},"FlatPricePerMonthActorPricingInfo":{"allOf":[{"$ref":"#/components/schemas/CommonActorPricingInfo"},{"properties":{"pricePerUnitUsd":{"type":"number"},"pricingModel":{"type":"string"},"trialMinutes":{"type":"integer"}},"required":["pricingModel","pricePerUnitUsd","trialMinutes"],"type":"object"}]},"FreeActorPricingInfo":{"allOf":[{"$ref":"#/components/schemas/CommonActorPricingInfo"},{"properties":{"pricingModel":{"type":"string"}},"required":["pricingModel"],"type":"object"}]},"GeneralAccess":{"type":"string"},"GitProviderIntegration":{"properties":{"addWorkspaceUrl":{"type":"string"},"id":{"type":"string"},"provider":{"type":"string"},"workspaces":{"items":{"$ref":"#/components/schemas/GitProviderWorkspace"},"type":"array"}},"required":["id","provider","workspaces"],"type":"object"},"GitProviderWorkspace":{"properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"type":"object"},"GitRepo":{"properties":{"htmlUrl":{"type":"string"},"httpsUrl":{"type":"string"},"sshUrl":{"type":"string"}},"required":["sshUrl","httpsUrl","htmlUrl"],"type":"object"},"GitRepoResponse":{"properties":{"data":{"$ref":"#/components/schemas/GitRepo"}},"required":["data"],"type":"object"},"HadMultipleClients":{"type":"boolean"},"HandledRequestCount":{"minimum":0,"type":"integer"},"HeadLimit":{"type":"integer"},"HttpMethod":{"type":"string"},"IntegrationTracking":{"properties":{"appId":{"type":["string","null"]},"isAiTool":{"type":"boolean"},"platform":{"type":["string","null"]}},"type":"object"},"KeyValueStoreKey":{"properties":{"key":{"type":"string"},"recordPublicUrl":{"format":"uri","type":"string"},"size":{"type":"integer"}},"required":["key","size","recordPublicUrl"],"type":"object"},"KeyValueStoreListItem":{"properties":{"accessedAt":{"format":"date-time","type":"string"},"actId":{"type":["string","null"]},"actRunId":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"id":{"type":"string"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":["string","null"]},"schema":{"type":["object","string","null"]},"stats":{"$ref":"#/components/schemas/KeyValueStoreListStats"},"title":{"type":["string","null"]},"userId":{"type":["string","null"]},"username":{"type":["string","null"]}},"required":["id","createdAt","modifiedAt","accessedAt"],"type":"object"},"KeyValueStoreListStats":{"properties":{"deleteCount":{"type":"integer"},"listCount":{"type":"integer"},"readCount":{"type":"integer"},"s3StorageBytes":{"type":"integer"},"writeCount":{"type":"integer"}},"type":"object"},"KeyValueStoreResource":{"properties":{"accessedAt":{"format":"date-time","type":"string"},"actId":{"type":["string","null"]},"actRunId":{"type":["string","null"]},"consoleUrl":{"format":"uri","type":"string"},"createdAt":{"format":"date-time","type":"string"},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"id":{"type":"string"},"keysPublicUrl":{"format":"uri","type":"string"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":["string","null"]},"recordsPublicUrl":{"format":"uri","type":"string"},"schema":{"type":["object","null"]},"stats":{"$ref":"#/components/schemas/KeyValueStoreStats"},"title":{"type":["string","null"]},"urlSigningSecretKey":{"type":["string","null"]},"userId":{"type":["string","null"]},"username":{"type":["string","null"]}},"required":["id","createdAt","modifiedAt","accessedAt"],"type":"object"},"KeyValueStoreResponse":{"properties":{"data":{"$ref":"#/components/schemas/KeyValueStoreResource"}},"required":["data"],"type":"object"},"KeyValueStoreStats":{"properties":{"deleteCount":{"type":"integer"},"listCount":{"type":"integer"},"readCount":{"type":"integer"},"s3StorageBytes":{"type":"integer"},"storageBytes":{"type":"integer"},"writeCount":{"type":"integer"}},"type":"object"},"Limits":{"properties":{"dataRetentionDays":{"type":"integer"},"maxActorCount":{"type":"integer"},"maxActorMemoryGbytes":{"type":"number"},"maxActorTaskCount":{"type":"integer"},"maxConcurrentActorJobs":{"type":"integer"},"maxMonthlyActorComputeUnits":{"type":"number"},"maxMonthlyExternalDataTransferGbytes":{"type":"number"},"maxMonthlyProxySerps":{"type":"integer"},"maxMonthlyResidentialProxyGbytes":{"type":"number"},"maxMonthlyUnblockerUnits":{"type":"number"},"maxMonthlyUsageUsd":{"type":"number"},"maxScheduleCount":{"type":"integer"},"maxTeamAccountSeatCount":{"type":"integer"}},"required":["maxMonthlyUsageUsd","maxMonthlyActorComputeUnits","maxMonthlyExternalDataTransferGbytes","maxMonthlyProxySerps","maxMonthlyResidentialProxyGbytes","maxActorMemoryGbytes","maxActorCount","maxActorTaskCount","maxConcurrentActorJobs","maxTeamAccountSeatCount","dataRetentionDays"],"type":"object"},"ListOfActorOAuthAccounts":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActorOAuthAccount"},"type":"array"},"total":{"type":"integer"}},"required":["total","items"],"type":"object"},"ListOfActorOAuthAccountsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfActorOAuthAccounts"}},"required":["data"],"type":"object"},"ListOfActorOAuthConnections":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActorOAuthConnection"},"type":"array"},"total":{"type":"integer"}},"required":["total","items"],"type":"object"},"ListOfActorOAuthConnectionsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfActorOAuthConnections"}},"required":["data"],"type":"object"},"ListOfActors":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActorListItem"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfActorsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfActors"}},"required":["data"],"type":"object"},"ListOfBuilds":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/BuildListItem"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfBuildsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfBuilds"}},"required":["data"],"type":"object"},"ListOfDatasets":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/DatasetListItem"},"type":"array"},"unnamed":{"type":"boolean"}},"required":["items"],"type":"object"}]},"ListOfDatasetsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfDatasets"}},"required":["data"],"type":"object"},"ListOfEnvVars":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EnvVar"},"type":"array"},"total":{"type":"integer"}},"required":["total","items"],"type":"object"},"ListOfEnvVarsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfEnvVars"}},"required":["data"],"type":"object"},"ListOfGitProviderIntegrationsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GitProviderIntegration"},"type":"array"}},"required":["data"],"type":"object"},"ListOfKeyValueStores":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/KeyValueStoreListItem"},"type":"array"},"unnamed":{"type":"boolean"}},"required":["items"],"type":"object"}]},"ListOfKeyValueStoresResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfKeyValueStores"}},"required":["data"],"type":"object"},"ListOfKeys":{"properties":{"count":{"type":"integer"},"exclusiveStartKey":{"type":["string","null"]},"isTruncated":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/KeyValueStoreKey"},"type":"array"},"limit":{"type":"integer"},"nextExclusiveStartKey":{"type":["string","null"]}},"required":["items","count","limit","isTruncated"],"type":"object"},"ListOfKeysResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfKeys"}},"required":["data"],"type":"object"},"ListOfRequestQueues":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/RequestQueueListItem"},"type":"array"},"unnamed":{"type":"boolean"}},"required":["items"],"type":"object"}]},"ListOfRequestQueuesResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfRequestQueues"}},"required":["data"],"type":"object"},"ListOfRequests":{"properties":{"cursor":{"type":"string"},"exclusiveStartId":{"type":"string"},"items":{"items":{"$ref":"#/components/schemas/RequestResource"},"type":"array"},"limit":{"type":"integer"},"nextCursor":{"type":"string"}},"required":["items","limit"],"type":"object"},"ListOfRequestsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfRequests"}},"required":["data"],"type":"object"},"ListOfRuns":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/RunListItem"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfRunsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfRuns"}},"required":["data"],"type":"object"},"ListOfSchedules":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/ScheduleListItem"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfSchedulesResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfSchedules"}},"required":["data"],"type":"object"},"ListOfStoreActors":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/StoreActor"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfStoreActorsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfStoreActors"}},"required":["data"],"type":"object"},"ListOfTasks":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaskListItem"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfTasksResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfTasks"}},"required":["data"],"type":"object"},"ListOfVersions":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Version"},"type":"array"},"total":{"type":"integer"}},"required":["total","items"],"type":"object"},"ListOfVersionsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfVersions"}},"required":["data"],"type":"object"},"ListOfWebhookDispatches":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookDispatch"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfWebhookDispatchesResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfWebhookDispatches"}},"required":["data"],"type":"object"},"ListOfWebhookResources":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookResource"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfWebhookResourcesResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfWebhookResources"}},"required":["data"],"type":"object"},"ListOfWebhooks":{"allOf":[{"$ref":"#/components/schemas/PaginationResponse"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookListItem"},"type":"array"}},"required":["items"],"type":"object"}]},"ListOfWebhooksResponse":{"properties":{"data":{"$ref":"#/components/schemas/ListOfWebhooks"}},"required":["data"],"type":"object"},"LockExpiresAt":{"format":"date-time","type":"string"},"LockedRequestQueueHead":{"properties":{"clientKey":{"type":"string"},"hadMultipleClients":{"$ref":"#/components/schemas/HadMultipleClients"},"items":{"items":{"$ref":"#/components/schemas/LockedRequestQueueHeadItem"},"type":"array"},"limit":{"$ref":"#/components/schemas/HeadLimit"},"lockSecs":{"type":"integer"},"queueHasLockedRequests":{"type":"boolean"},"queueModifiedAt":{"$ref":"#/components/schemas/QueueModifiedAt"}},"required":["limit","queueModifiedAt","hadMultipleClients","lockSecs","items"],"type":"object"},"LockedRequestQueueHeadItem":{"properties":{"id":{"$ref":"#/components/schemas/RequestId"},"lockExpiresAt":{"$ref":"#/components/schemas/LockExpiresAt"},"method":{"$ref":"#/components/schemas/RequestMethod"},"retryCount":{"$ref":"#/components/schemas/RetryCount"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"},"url":{"$ref":"#/components/schemas/RequestUrl"}},"required":["id","uniqueKey","url","lockExpiresAt"],"type":"object"},"LockedRequestQueueHeadResponse":{"properties":{"data":{"$ref":"#/components/schemas/LockedRequestQueueHead"}},"required":["data"],"type":"object"},"MonthlyServiceUsage":{"type":"object"},"MonthlyUsage":{"properties":{"dailyServiceUsages":{"items":{"$ref":"#/components/schemas/DailyServiceUsage"},"type":"array"},"monthlyServiceUsage":{"$ref":"#/components/schemas/MonthlyServiceUsage"},"totalUsageCreditsUsdAfterVolumeDiscount":{"type":"number"},"totalUsageCreditsUsdBeforeVolumeDiscount":{"type":"number"},"usageCycle":{"$ref":"#/components/schemas/UsageCycle"}},"required":["usageCycle","monthlyServiceUsage","dailyServiceUsages","totalUsageCreditsUsdBeforeVolumeDiscount","totalUsageCreditsUsdAfterVolumeDiscount"],"type":"object"},"MonthlyUsageResponse":{"properties":{"data":{"$ref":"#/components/schemas/MonthlyUsage"}},"required":["data"],"type":"object"},"PaginationResponse":{"properties":{"count":{"minimum":0,"type":"integer"},"desc":{"type":"boolean"},"limit":{"minimum":1,"type":"integer"},"offset":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["total","offset","limit","desc","count"],"type":"object"},"PayPerEventActorPricingInfo":{"allOf":[{"$ref":"#/components/schemas/CommonActorPricingInfo"},{"properties":{"isPPEPlatformUsagePaidByUser":{"type":["boolean","null"]},"minimalMaxTotalChargeUsd":{"type":["number","null"]},"pricingModel":{"type":"string"},"pricingPerEvent":{"properties":{"actorChargeEvents":{"type":"object"}},"type":"object"}},"required":["pricingModel","pricingPerEvent"],"type":"object"}]},"PendingRequestCount":{"type":"integer"},"PricePerDatasetItemActorPricingInfo":{"allOf":[{"$ref":"#/components/schemas/CommonActorPricingInfo"},{"properties":{"pricePerUnitUsd":{"type":"number"},"pricingModel":{"type":"string"},"tieredPricing":{"$ref":"#/components/schemas/TieredPricingPerDatasetItem"},"unitName":{"type":"string"}},"required":["pricingModel","unitName"],"type":"object"}]},"ProlongRequestLockResponse":{"properties":{"data":{"$ref":"#/components/schemas/RequestLockInfo"}},"required":["data"],"type":"object"},"ProxyGroup":{"properties":{"availableCount":{"type":"integer"},"description":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["name","description"],"type":"object"},"ProxyResource":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/ProxyGroup"},"type":"array"},"password":{"type":["string","null"]}},"required":["groups"],"type":"object"},"QueueAccessedAt":{"format":"date-time","type":"string"},"QueueCreatedAt":{"format":"date-time","type":"string"},"QueueId":{"type":"string"},"QueueModifiedAt":{"format":"date-time","type":"string"},"QueueUserId":{"type":"string"},"RecordResponse":{"type":"object"},"RegisterDeploymentKeyResponse":{"properties":{"data":{"properties":{"repoName":{"type":"string"}},"required":["repoName"],"type":"object"}},"required":["data"],"type":"object"},"RequestBase":{"properties":{"errorMessages":{"items":{"type":"string"},"type":["array","null"]},"handledAt":{"format":"date-time","type":["string","null"]},"headers":{"type":["object","null"]},"loadedUrl":{"type":["string","null"]},"method":{"$ref":"#/components/schemas/RequestMethod"},"noRetry":{"type":["boolean","null"]},"payload":{"type":["string","object","null"]},"retryCount":{"$ref":"#/components/schemas/RetryCount"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"},"url":{"$ref":"#/components/schemas/RequestUrl"},"userData":{"$ref":"#/components/schemas/RequestUserData"}},"required":["uniqueKey","url"],"type":"object"},"RequestId":{"type":"string"},"RequestLockInfo":{"properties":{"lockExpiresAt":{"$ref":"#/components/schemas/LockExpiresAt"}},"required":["lockExpiresAt"],"type":"object"},"RequestMethod":{"$ref":"#/components/schemas/HttpMethod"},"RequestQueueHead":{"properties":{"hadMultipleClients":{"$ref":"#/components/schemas/HadMultipleClients"},"items":{"items":{"$ref":"#/components/schemas/RequestQueueHeadItem"},"type":"array"},"limit":{"$ref":"#/components/schemas/HeadLimit"},"queueModifiedAt":{"$ref":"#/components/schemas/QueueModifiedAt"}},"required":["limit","queueModifiedAt","hadMultipleClients","items"],"type":"object"},"RequestQueueHeadItem":{"properties":{"id":{"$ref":"#/components/schemas/RequestId"},"method":{"$ref":"#/components/schemas/RequestMethod"},"retryCount":{"$ref":"#/components/schemas/RetryCount"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"},"url":{"$ref":"#/components/schemas/RequestUrl"}},"required":["id","uniqueKey","url"],"type":"object"},"RequestQueueHeadResponse":{"properties":{"data":{"$ref":"#/components/schemas/RequestQueueHead"}},"required":["data"],"type":"object"},"RequestQueueListItem":{"properties":{"accessedAt":{"$ref":"#/components/schemas/QueueAccessedAt"},"actId":{"type":["string","null"]},"actRunId":{"type":["string","null"]},"createdAt":{"$ref":"#/components/schemas/QueueCreatedAt"},"expireAt":{"format":"date-time","type":"string"},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"hadMultipleClients":{"$ref":"#/components/schemas/HadMultipleClients"},"handledRequestCount":{"$ref":"#/components/schemas/HandledRequestCount"},"id":{"$ref":"#/components/schemas/QueueId"},"modifiedAt":{"$ref":"#/components/schemas/QueueModifiedAt"},"name":{"type":["string","null"]},"pendingRequestCount":{"$ref":"#/components/schemas/PendingRequestCount"},"stats":{"$ref":"#/components/schemas/RequestQueueListStats"},"title":{"type":["string","null"]},"totalRequestCount":{"$ref":"#/components/schemas/TotalRequestCount"},"userId":{"$ref":"#/components/schemas/QueueUserId"},"username":{"type":"string"}},"required":["id","userId","createdAt","modifiedAt","accessedAt","totalRequestCount","handledRequestCount","pendingRequestCount","hadMultipleClients"],"type":"object"},"RequestQueueListStats":{"properties":{"deleteCount":{"type":"integer"},"dynamodbStorageBytes":{"type":"integer"},"headItemReadCount":{"type":"integer"},"readCount":{"type":"integer"},"s3StorageBytes":{"type":"integer"},"writeCount":{"type":"integer"}},"type":"object"},"RequestQueueResource":{"properties":{"accessedAt":{"$ref":"#/components/schemas/QueueAccessedAt"},"actId":{"type":["string","null"]},"actRunId":{"type":["string","null"]},"consoleUrl":{"format":"uri","type":"string"},"createdAt":{"$ref":"#/components/schemas/QueueCreatedAt"},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"hadMultipleClients":{"$ref":"#/components/schemas/HadMultipleClients"},"handledRequestCount":{"$ref":"#/components/schemas/HandledRequestCount"},"id":{"$ref":"#/components/schemas/QueueId"},"modifiedAt":{"$ref":"#/components/schemas/QueueModifiedAt"},"name":{"type":["string","null"]},"pendingRequestCount":{"$ref":"#/components/schemas/PendingRequestCount"},"stats":{"$ref":"#/components/schemas/RequestQueueStats"},"title":{"type":["string","null"]},"totalRequestCount":{"$ref":"#/components/schemas/TotalRequestCount"},"userId":{"$ref":"#/components/schemas/QueueUserId"}},"required":["id","userId","createdAt","modifiedAt","accessedAt","totalRequestCount","handledRequestCount","pendingRequestCount","hadMultipleClients","consoleUrl"],"type":"object"},"RequestQueueResponse":{"properties":{"data":{"$ref":"#/components/schemas/RequestQueueResource"}},"required":["data"],"type":"object"},"RequestQueueStats":{"properties":{"deleteCount":{"type":"integer"},"headItemReadCount":{"type":"integer"},"readCount":{"type":"integer"},"storageBytes":{"type":"integer"},"writeCount":{"type":"integer"}},"type":"object"},"RequestRegistration":{"properties":{"requestId":{"$ref":"#/components/schemas/RequestId"},"wasAlreadyHandled":{"$ref":"#/components/schemas/WasAlreadyHandled"},"wasAlreadyPresent":{"$ref":"#/components/schemas/WasAlreadyPresent"}},"required":["requestId","wasAlreadyPresent","wasAlreadyHandled"],"type":"object"},"RequestResource":{"allOf":[{"$ref":"#/components/schemas/RequestBase","required":["id"]},{"properties":{"id":{"$ref":"#/components/schemas/RequestId"},"lockByClient":{"type":"string"},"lockExpiresAt":{"$ref":"#/components/schemas/LockExpiresAt"}}}]},"RequestResponse":{"properties":{"data":{"$ref":"#/components/schemas/RequestResource"}},"required":["data"],"type":"object"},"RequestUrl":{"type":"string"},"RequestUserData":{"type":"object"},"RetryCount":{"type":"integer"},"Run":{"properties":{"accountedChargedEventCounts":{"type":["object","null"]},"actId":{"type":"string"},"actorTaskId":{"type":["string","null"]},"buildId":{"type":"string"},"buildNumber":{"pattern":"^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$","type":["string","null"]},"chargedEventCounts":{"type":"object"},"consoleUrl":{"format":"uri","type":"string"},"containerUrl":{"format":"uri","type":"string"},"createdByOrganizationMemberUserId":{"type":"string"},"defaultDatasetId":{"type":"string"},"defaultKeyValueStoreId":{"type":"string"},"defaultRequestQueueId":{"type":"string"},"eventUsage":{"type":"object"},"exitCode":{"type":["integer","null"]},"externalChargedTotalUsd":{"type":"number"},"finishedAt":{"format":"date-time","type":["string","null"]},"generalAccess":{"anyOf":[{"$ref":"#/components/schemas/GeneralAccess"},{"type":"null"}]},"gitBranchName":{"type":["string","null"]},"id":{"type":"string"},"integrationTracking":{"$ref":"#/components/schemas/IntegrationTracking"},"isContainerServerReady":{"type":["boolean","null"]},"isStatusMessageTerminal":{"type":["boolean","null"]},"meta":{"$ref":"#/components/schemas/RunMeta"},"metamorphs":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunMetamorphEvent"},"type":"array"},{"type":"null"}]},"options":{"$ref":"#/components/schemas/RunOptions"},"output":{"type":"object"},"platformUsageBillingModel":{"type":"string"},"pricingInfo":{"$ref":"#/components/schemas/ActorRunPricingInfo"},"standby":{"anyOf":[{"$ref":"#/components/schemas/RunStandby"},{"type":"null"}]},"startedAt":{"format":"date-time","type":"string"},"stats":{"$ref":"#/components/schemas/RunStats"},"status":{"$ref":"#/components/schemas/ActorJobStatus"},"statusMessage":{"type":["string","null"]},"storageIds":{"properties":{"datasets":{"properties":{"default":{"type":"string"}},"type":"object"},"keyValueStores":{"properties":{"default":{"type":"string"}},"type":"object"},"requestQueues":{"properties":{"default":{"type":"string"}},"type":"object"}},"type":"object"},"usage":{"anyOf":[{"$ref":"#/components/schemas/RunUsage"},{"type":"null"}]},"usageTotalUsd":{"type":["number","null"]},"usageUsd":{"anyOf":[{"$ref":"#/components/schemas/RunUsageUsd"},{"type":"null"}]},"userId":{"type":"string"}},"required":["id","actId","userId","startedAt","status","meta","stats","options","buildId","defaultKeyValueStoreId","defaultDatasetId","defaultRequestQueueId"],"type":"object"},"RunListItem":{"properties":{"actId":{"type":"string"},"actorTaskId":{"type":["string","null"]},"buildId":{"type":"string"},"buildNumber":{"pattern":"^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$","type":"string"},"buildNumberInt":{"type":"integer"},"defaultDatasetId":{"type":"string"},"defaultKeyValueStoreId":{"type":"string"},"defaultRequestQueueId":{"type":"string"},"finishedAt":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"meta":{"$ref":"#/components/schemas/RunMeta"},"standby":{"anyOf":[{"$ref":"#/components/schemas/RunStandby"},{"type":"null"}]},"startedAt":{"format":"date-time","type":"string"},"status":{"$ref":"#/components/schemas/ActorJobStatus"},"usageTotalUsd":{"type":"number"},"userId":{"type":"string"}},"required":["id","actId","status","startedAt","buildId","meta","usageTotalUsd","defaultKeyValueStoreId","defaultDatasetId","defaultRequestQueueId"],"type":"object"},"RunMeta":{"properties":{"actorRunId":{"type":"string"},"clientIp":{"type":["string","null"]},"origin":{"$ref":"#/components/schemas/RunOrigin"},"scheduleId":{"type":["string","null"]},"scheduledAct2Id":{"type":"string"},"scheduledActorTaskId":{"type":"string"},"scheduledAt":{"format":"date-time","type":["string","null"]},"userAgent":{"type":["string","null"]},"webhookDispatchId":{"type":"string"}},"required":["origin"],"type":"object"},"RunMetamorphEvent":{"properties":{"actorId":{"type":"string"},"buildId":{"type":"string"},"buildTags":{"items":{"type":"string"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"inputKey":{"type":["string","null"]}},"required":["createdAt","actorId","buildId"],"type":"object"},"RunOptions":{"properties":{"build":{"type":"string"},"diskMbytes":{"minimum":0,"type":"integer"},"isMaxTotalChargeUsdSetByUser":{"type":"boolean"},"maxItems":{"minimum":0,"type":["integer","null"]},"maxTotalChargeUsd":{"minimum":0,"type":["number","null"]},"memoryMbytes":{"maximum":32768,"minimum":128,"type":"integer"},"restartOnError":{"type":["boolean","null"]},"timeoutSecs":{"minimum":0,"type":"integer"}},"required":["build","timeoutSecs","memoryMbytes","diskMbytes"],"type":"object"},"RunOrigin":{"type":"string"},"RunResponse":{"properties":{"data":{"$ref":"#/components/schemas/Run"}},"required":["data"],"type":"object"},"RunStandby":{"properties":{"deployment":{"type":"string"}},"required":["deployment"],"type":"object"},"RunStats":{"properties":{"computeUnits":{"minimum":0,"type":"number"},"cpuAvgUsage":{"type":"number"},"cpuCurrentUsage":{"type":"number"},"cpuMaxUsage":{"type":"number"},"durationMillis":{"minimum":0,"type":"integer"},"inputBodyLen":{"minimum":0,"type":["integer","null"]},"memAvgBytes":{"type":"number"},"memCurrentBytes":{"minimum":0,"type":"integer"},"memMaxBytes":{"minimum":0,"type":"integer"},"metamorph":{"minimum":0,"type":"integer"},"migrationCount":{"minimum":0,"type":"integer"},"netRxBytes":{"minimum":0,"type":"integer"},"netTxBytes":{"minimum":0,"type":"integer"},"rebootCount":{"minimum":0,"type":"integer"},"restartCount":{"minimum":0,"type":"integer"},"resurrectCount":{"minimum":0,"type":"integer"},"runTimeSecs":{"minimum":0,"type":"number"}},"type":"object"},"RunUsage":{"properties":{"ACTOR_COMPUTE_UNITS":{"type":["number","null"]},"DATASET_READS":{"type":["integer","null"]},"DATASET_WRITES":{"type":["integer","null"]},"DATA_TRANSFER_EXTERNAL_GBYTES":{"type":["number","null"]},"DATA_TRANSFER_INTERNAL_GBYTES":{"type":["number","null"]},"KEY_VALUE_STORE_LISTS":{"type":["integer","null"]},"KEY_VALUE_STORE_READS":{"type":["integer","null"]},"KEY_VALUE_STORE_WRITES":{"type":["integer","null"]},"PROXY_RESIDENTIAL_TRANSFER_GBYTES":{"type":["number","null"]},"PROXY_SERPS":{"type":["integer","null"]},"PROXY_UNBLOCKER_UNITS":{"type":["number","null"]},"REQUEST_QUEUE_READS":{"type":["integer","null"]},"REQUEST_QUEUE_WRITES":{"type":["integer","null"]}},"type":"object"},"RunUsageUsd":{"properties":{"ACTOR_COMPUTE_UNITS":{"type":["number","null"]},"DATASET_READS":{"type":["number","null"]},"DATASET_WRITES":{"type":["number","null"]},"DATA_TRANSFER_EXTERNAL_GBYTES":{"type":["number","null"]},"DATA_TRANSFER_INTERNAL_GBYTES":{"type":["number","null"]},"KEY_VALUE_STORE_LISTS":{"type":["number","null"]},"KEY_VALUE_STORE_READS":{"type":["number","null"]},"KEY_VALUE_STORE_WRITES":{"type":["number","null"]},"PROXY_RESIDENTIAL_TRANSFER_GBYTES":{"type":["number","null"]},"PROXY_SERPS":{"type":["number","null"]},"PROXY_UNBLOCKER_UNITS":{"type":["number","null"]},"REQUEST_QUEUE_READS":{"type":["number","null"]},"REQUEST_QUEUE_WRITES":{"type":["number","null"]}},"type":"object"},"Schedule":{"allOf":[{"$ref":"#/components/schemas/ScheduleBase"},{"properties":{"actions":{"items":{"$ref":"#/components/schemas/ScheduleAction"},"type":"array"},"description":{"type":["string","null"]},"integrationTracking":{"$ref":"#/components/schemas/IntegrationTracking"},"notifications":{"$ref":"#/components/schemas/ScheduleNotifications"},"title":{"type":["string","null"]},"uiState":{"$ref":"#/components/schemas/ScheduleUiState"}},"required":["actions"],"type":"object"}]},"ScheduleAction":{"oneOf":[{"$ref":"#/components/schemas/ScheduleActionRunActor"},{"$ref":"#/components/schemas/ScheduleActionRunActorTask"}]},"ScheduleActionRunActor":{"properties":{"actorId":{"type":"string"},"id":{"type":"string"},"runInput":{"anyOf":[{"$ref":"#/components/schemas/ScheduleActionRunInput"},{"type":"null"}]},"runOptions":{"anyOf":[{"$ref":"#/components/schemas/TaskOptions"},{"type":"null"}]},"type":{}},"required":["id","type","actorId"],"type":"object"},"ScheduleActionRunActorTask":{"properties":{"actorTaskId":{"type":"string"},"id":{"type":"string"},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"type":{}},"required":["id","type","actorTaskId"],"type":"object"},"ScheduleActionRunInput":{"properties":{"body":{"type":["string","null"]},"contentType":{"type":["string","null"]}},"type":"object"},"ScheduleBase":{"properties":{"createdAt":{"format":"date-time","type":"string"},"cronExpression":{"type":"string"},"id":{"type":"string"},"isEnabled":{"type":"boolean"},"isExclusive":{"type":"boolean"},"lastRunAt":{"format":"date-time","type":["string","null"]},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"nextRunAt":{"format":"date-time","type":["string","null"]},"timezone":{"type":"string"},"userId":{"type":"string"}},"required":["id","userId","name","cronExpression","timezone","isEnabled","isExclusive","createdAt","modifiedAt"],"type":"object"},"ScheduleListItem":{"allOf":[{"$ref":"#/components/schemas/ScheduleBase"},{"properties":{"actions":{"items":{"$ref":"#/components/schemas/ScheduleListItemAction"},"type":"array"},"integrationTracking":{"$ref":"#/components/schemas/IntegrationTracking"},"notifications":{"$ref":"#/components/schemas/ScheduleNotifications"},"title":{"type":["string","null"]}},"required":["actions"],"type":"object"}]},"ScheduleListItemAction":{"oneOf":[{"$ref":"#/components/schemas/ScheduleListItemActionRunActor"},{"$ref":"#/components/schemas/ScheduleListItemActionRunActorTask"}]},"ScheduleListItemActionRunActor":{"properties":{"actorId":{"type":"string"},"id":{"type":"string"},"type":{}},"required":["id","type","actorId"],"type":"object"},"ScheduleListItemActionRunActorTask":{"properties":{"actorTaskId":{"type":"string"},"id":{"type":"string"},"type":{}},"required":["id","type","actorTaskId"],"type":"object"},"ScheduleLogEntry":{"properties":{"createdAt":{"format":"date-time","type":"string"},"level":{"type":"string"},"message":{"type":"string"}},"required":["message","level","createdAt"],"type":"object"},"ScheduleLogResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ScheduleLogEntry"},"type":"array"}},"required":["data"],"type":"object"},"ScheduleNotifications":{"properties":{"email":{"type":"boolean"}},"type":"object"},"ScheduleResponse":{"properties":{"data":{"$ref":"#/components/schemas/Schedule"}},"required":["data"],"type":"object"},"ScheduleUiState":{"properties":{"data":{"properties":{"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"type":"object"},"version":{"type":"integer"}},"type":["object","null"]},"ServiceUsage":{"type":"object"},"SourceCodeFile":{"properties":{"content":{"type":["string","null"]},"format":{"$ref":"#/components/schemas/SourceCodeFileFormat"},"name":{"type":"string"}},"required":["name"],"type":"object"},"SourceCodeFileFormat":{"type":"string"},"SourceCodeFolder":{"properties":{"folder":{"type":"boolean"},"name":{"type":"string"}},"required":["name","folder"],"type":"object"},"StoreActor":{"properties":{"badge":{"type":["string","null"]},"categories":{"items":{"type":"string"},"type":["array","null"]},"currentPricingInfo":{"$ref":"#/components/schemas/CurrentPricingInfo"},"description":{"type":["string","null"]},"id":{"type":"string"},"inputSchema":{"properties":{"properties":{"type":"object"},"required":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"}},"required":["type","properties"],"type":"object"},"isVerified":{"type":"boolean"},"name":{"type":"string"},"notice":{"$ref":"#/components/schemas/ActorNotice"},"pictureUrl":{"type":["string","null"]},"readmeSummary":{"type":"string"},"stats":{"properties":{"actorReviewCount":{"type":"integer"},"actorReviewRating":{"type":"number"},"totalRuns":{"type":"integer"},"totalUsers":{"type":"integer"},"totalUsers30Days":{"type":"integer"},"totalUsers7Days":{"type":"integer"},"totalUsers90Days":{"type":"integer"}},"required":["totalUsers","actorReviewRating","actorReviewCount"],"type":"object"},"title":{"type":"string"},"url":{"format":"uri","type":["string","null"]},"userFullName":{"type":["string","null"]},"userPictureUrl":{"format":"uri","type":["string","null"]},"username":{"type":"string"}},"required":["id","title","name","username","stats"],"type":"object"},"TaggedBuilds":{"type":"object"},"Task":{"properties":{"actId":{"type":"string"},"actorStandby":{"anyOf":[{"$ref":"#/components/schemas/ActorStandby"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/TaskInput"},{"items":{"$ref":"#/components/schemas/TaskInput"},"type":"array"},{"type":"null"}]},"isPublic":{"type":"boolean"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"nameLowerCase":{"type":"string"},"options":{"anyOf":[{"$ref":"#/components/schemas/TaskOptions"},{"type":"null"}]},"publicConfig":{"anyOf":[{"$ref":"#/components/schemas/TaskPublicConfig"},{"type":"null"}]},"removedAt":{"format":"date-time","type":["string","null"]},"standbyUrl":{"format":"uri","type":["string","null"]},"stats":{"anyOf":[{"$ref":"#/components/schemas/TaskStats"},{"type":"null"}]},"title":{"type":["string","null"]},"userId":{"type":"string"},"username":{"type":["string","null"]}},"required":["id","userId","actId","name","createdAt","modifiedAt"],"type":"object"},"TaskInput":{"type":"object"},"TaskListItem":{"properties":{"actId":{"type":"string"},"actName":{"type":["string","null"]},"actUsername":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"isPublic":{"type":"boolean"},"modifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"stats":{"anyOf":[{"$ref":"#/components/schemas/TaskStats"},{"type":"null"}]},"title":{"type":["string","null"]},"userId":{"type":"string"},"username":{"type":["string","null"]}},"required":["id","userId","actId","name","createdAt","modifiedAt"],"type":"object"},"TaskOptions":{"properties":{"build":{"type":["string","null"]},"forcePermissionLevel":{"anyOf":[{"$ref":"#/components/schemas/ActorPermissionLevel"},{"type":"null"}]},"isMaxTotalChargeUsdSetByUser":{"type":["boolean","null"]},"maxItems":{"type":["integer","null"]},"maxTotalChargeUsd":{"type":["number","null"]},"memoryMbytes":{"type":["integer","null"]},"restartOnError":{"type":["boolean","null"]},"timeoutSecs":{"type":["integer","null"]}},"type":"object"},"TaskPublicConfig":{"properties":{"categorization":{"type":["string","null"]},"datasetName":{"type":["string","null"]},"datasetView":{"type":["string","null"]},"faq":{"items":{"properties":{"answer":{"type":"string"},"question":{"type":"string"}},"required":["question","answer"],"type":"object"},"type":["array","null"]},"highlightedFields":{"items":{"type":"string"},"type":["array","null"]},"inputSchemaFields":{"items":{"type":"string"},"type":["array","null"]},"publishedAt":{"format":"date-time","type":["string","null"]},"seoDescription":{"maxLength":160,"type":["string","null"]},"seoTitle":{"maxLength":60,"type":["string","null"]}},"type":"object"},"TaskResponse":{"properties":{"data":{"$ref":"#/components/schemas/Task"}},"required":["data"],"type":"object"},"TaskStats":{"properties":{"lastRunStartedAt":{"format":"date-time","type":["string","null"]},"totalRuns":{"type":"integer"}},"type":"object"},"TieredPricingPerDatasetItem":{"type":"object"},"TotalRequestCount":{"minimum":0,"type":"integer"},"UniqueKey":{"type":"string"},"UnlockRequestsResponse":{"properties":{"data":{"$ref":"#/components/schemas/UnlockRequestsResult"}},"required":["data"],"type":"object"},"UnlockRequestsResult":{"properties":{"unlockedCount":{"type":"integer"}},"required":["unlockedCount"],"type":"object"},"UnprocessedRequest":{"properties":{"id":{"$ref":"#/components/schemas/RequestId"},"method":{"$ref":"#/components/schemas/RequestMethod"},"uniqueKey":{"$ref":"#/components/schemas/UniqueKey"},"url":{"$ref":"#/components/schemas/RequestUrl"}},"required":["uniqueKey","url"],"type":"object"},"UpdateRequestResponse":{"properties":{"data":{"$ref":"#/components/schemas/RequestRegistration"}},"required":["data"],"type":"object"},"UsageCycle":{"properties":{"endAt":{"format":"date-time","type":"string"},"startAt":{"format":"date-time","type":"string"}},"required":["startAt","endAt"],"type":"object"},"UserPlan":{"properties":{"apiRateLimitBoosts":{"type":"integer"},"availableAddOns":{"items":{"type":"string"},"type":"array"},"availableProxyGroups":{"$ref":"#/components/schemas/AvailableProxyGroups"},"dataRetentionDays":{"type":"integer"},"description":{"type":"string"},"enabledPlatformFeatures":{"items":{"type":"string"},"type":"array"},"forceBillingInterval":{"type":"string"},"id":{"type":"string"},"isEnabled":{"type":"boolean"},"isPayingCustomer":{"type":"boolean"},"legacyPlanId":{"type":"string"},"maxActorCount":{"type":"integer"},"maxActorMemoryGbytes":{"type":"number"},"maxActorTaskCount":{"type":"integer"},"maxConcurrentActorRuns":{"type":"integer"},"maxMonthlyActorComputeUnits":{"type":"number"},"maxMonthlyExternalDataTransferGbytes":{"type":"number"},"maxMonthlyProxySerps":{"type":"integer"},"maxMonthlyResidentialProxyGbytes":{"type":"number"},"maxMonthlyUnblockerUnits":{"type":"integer"},"maxMonthlyUsageUsd":{"type":"number"},"maxPublicActorTaskCount":{"type":"integer"},"maxPublicActorTaskCountPerActor":{"type":"integer"},"maxScheduleCount":{"type":"integer"},"monitoringLevel":{"type":["string","null"]},"monthlyBasePriceUsd":{"type":"number"},"monthlyUsageCreditsUsd":{"type":"number"},"overageThresholdUsd":{"type":"number"},"personalizedSupport":{"type":["string","null"]},"planPricing":{"type":"object"},"planTags":{"items":{"type":"string"},"type":"array"},"planVersion":{"type":"number"},"supportLevel":{"type":"string"},"teamAccountSeatCount":{"type":"integer"},"tier":{"type":"string"},"usageDiscountPercent":{"type":"number"}},"required":["availableProxyGroups"],"type":"object"},"UserPrivateInfo":{"properties":{"createdAt":{"format":"date-time","type":"string"},"effectivePlatformFeatures":{"$ref":"#/components/schemas/EffectivePlatformFeatures"},"email":{"format":"email","type":["string","null"]},"id":{"type":"string"},"isPaying":{"type":"boolean"},"organizationOwnerUserId":{"type":["string","null"]},"plan":{"$ref":"#/components/schemas/UserPlan"},"profile":{"$ref":"#/components/schemas/UserProfile"},"proxy":{"$ref":"#/components/schemas/ProxyResource"},"username":{"type":"string"}},"required":["username"],"type":"object"},"UserPrivateInfoResponse":{"properties":{"data":{"$ref":"#/components/schemas/UserPrivateInfo"}},"required":["data"],"type":"object"},"UserProfile":{"properties":{"bio":{"type":["string","null"]},"githubUsername":{"type":["string","null"]},"name":{"type":"string"},"pictureUrl":{"format":"uri","type":["string","null"]},"readme":{"type":["string","null"]},"twitterUsername":{"type":["string","null"]},"websiteUrl":{"format":"uri","type":["string","null"]}},"type":"object"},"UserProxyInfo":{"properties":{"effectivePlatformFeatures":{"$ref":"#/components/schemas/EffectivePlatformFeatures"},"isPaying":{"type":"boolean"},"plan":{"properties":{"availableProxyGroups":{"$ref":"#/components/schemas/AvailableProxyGroups"}},"required":["availableProxyGroups"],"type":"object"}},"required":["plan","effectivePlatformFeatures","isPaying"],"type":"object"},"UserProxyInfoResponse":{"properties":{"data":{"$ref":"#/components/schemas/UserProxyInfo"}},"required":["data"],"type":"object"},"UserPublicInfo":{"properties":{"profile":{"$ref":"#/components/schemas/UserProfile"},"username":{"type":"string"}},"required":["username"],"type":"object"},"UserPublicInfoResponse":{"properties":{"data":{"$ref":"#/components/schemas/UserPublicInfo"}},"required":["data"],"type":"object"},"Version":{"properties":{"actorPath":{"maxLength":255,"minLength":1,"type":["string","null"]},"applyEnvVarsToBuild":{"type":["boolean","null"]},"bitbucketWebhookId":{"type":["string","null"]},"buildTag":{"type":["string","null"]},"envVars":{"anyOf":[{"items":{"$ref":"#/components/schemas/EnvVar"},"type":"array"},{"type":"null"}]},"gitHubGistUrl":{"type":["string","null"]},"gitRepoUrl":{"type":["string","null"]},"githubWebhookId":{"type":["integer","null"]},"gitlabWebhookId":{"type":["integer","null"]},"sourceFiles":{"$ref":"#/components/schemas/VersionSourceFiles"},"sourceType":{"anyOf":[{"$ref":"#/components/schemas/VersionSourceType"},{"type":"null"}]},"tarballUrl":{"type":["string","null"]},"versionNumber":{"pattern":"^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])$","type":"string"}},"required":["versionNumber","sourceType"],"type":"object"},"VersionResponse":{"properties":{"data":{"$ref":"#/components/schemas/Version"}},"required":["data"],"type":"object"},"VersionSourceFiles":{"items":{"anyOf":[{"$ref":"#/components/schemas/SourceCodeFile"},{"$ref":"#/components/schemas/SourceCodeFolder"}]},"type":"array"},"VersionSourceType":{"type":"string"},"WasAlreadyHandled":{"type":"boolean"},"WasAlreadyPresent":{"type":"boolean"},"WebhookCondition":{"properties":{"actorId":{"type":["string","null"]},"actorRunId":{"type":["string","null"]},"actorTaskId":{"type":["string","null"]}},"type":"object"},"WebhookDatasetTransformation":{"properties":{"fields":{"items":{"type":"string"},"type":"array"},"omit":{"items":{"type":"string"},"type":"array"}},"type":"object"},"WebhookDispatch":{"properties":{"calls":{"items":{"properties":{"debugPostMessage":{"type":"object"},"errorMessage":{"type":["string","null"]},"finishedAt":{"format":"date-time","type":["string","null"]},"responseBody":{"type":["string","null"]},"responseStatus":{"type":["integer","null"]},"startedAt":{"format":"date-time","type":["string","null"]}},"type":"object"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"eventData":{"properties":{"actorBuildId":{"type":"string"},"actorId":{"type":"string"},"actorRunId":{"type":"string"},"actorTaskId":{"type":["string","null"]}},"required":["actorId"],"type":["object","null"]},"eventType":{"$ref":"#/components/schemas/WebhookEventType"},"id":{"type":"string"},"status":{"$ref":"#/components/schemas/WebhookDispatchStatus"},"userId":{"type":"string"},"webhook":{"anyOf":[{"$ref":"#/components/schemas/WebhookDispatchWebhookSummary"},{"type":"null"}]},"webhookId":{"type":"string"}},"required":["id","userId","webhookId","createdAt","status","eventType"],"type":"object"},"WebhookDispatchResponse":{"properties":{"data":{"$ref":"#/components/schemas/WebhookDispatch"}},"required":["data"],"type":"object"},"WebhookDispatchStatus":{"type":"string"},"WebhookDispatchWebhookSummary":{"properties":{"_id":{"type":"string"},"actionType":{"type":"string"},"condition":{"$ref":"#/components/schemas/WebhookCondition"},"githubIssue":{"$ref":"#/components/schemas/WebhookGithubIssue"},"googleDrive":{"$ref":"#/components/schemas/WebhookGoogleDrive"},"googleMail":{"$ref":"#/components/schemas/WebhookGoogleMail"},"isAdHoc":{"type":"boolean"},"isApifyIntegration":{"type":["boolean","null"]},"requestUrl":{"format":"uri","type":["string","null"]},"slackMessage":{"$ref":"#/components/schemas/WebhookSlackMessage"}},"type":"object"},"WebhookEventType":{"type":"string"},"WebhookGithubIssue":{"properties":{"body":{"type":"string"},"repository":{"type":"string"},"title":{"type":"string"},"userIntegrationId":{"type":"string"}},"type":"object"},"WebhookGoogleDrive":{"properties":{"filename":{"type":"string"},"format":{"type":["string","null"]},"transformation":{"$ref":"#/components/schemas/WebhookDatasetTransformation"},"userIntegrationId":{"type":"string"}},"type":"object"},"WebhookGoogleMail":{"properties":{"attachmentFormat":{"type":["string","null"]},"attachmentTransformation":{"$ref":"#/components/schemas/WebhookDatasetTransformation"},"body":{"type":"string"},"emailTo":{"items":{"type":"string"},"type":"array"},"subject":{"type":"string"},"userIntegrationId":{"type":"string"}},"type":"object"},"WebhookLastDispatch":{"properties":{"finishedAt":{"format":"date-time","type":["string","null"]},"removedAt":{"format":"date-time","type":["string","null"]},"status":{"$ref":"#/components/schemas/WebhookDispatchStatus"}},"required":["status"],"type":"object"},"WebhookListItem":{"properties":{"actionType":{"type":"string"},"condition":{"$ref":"#/components/schemas/WebhookCondition"},"createdAt":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"doNotRetry":{"type":"boolean"},"eventTypes":{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array"},"githubIssue":{"$ref":"#/components/schemas/WebhookGithubIssue"},"googleDrive":{"$ref":"#/components/schemas/WebhookGoogleDrive"},"googleMail":{"$ref":"#/components/schemas/WebhookGoogleMail"},"headersTemplate":{"type":["string","null"]},"id":{"type":"string"},"ignoreSslErrors":{"type":"boolean"},"isAdHoc":{"type":["boolean","null"]},"isApifyIntegration":{"type":"boolean"},"isEnabled":{"type":"boolean"},"lastDispatch":{"anyOf":[{"$ref":"#/components/schemas/WebhookLastDispatch"},{"type":"null"}]},"modifiedAt":{"format":"date-time","type":"string"},"requestUrl":{"format":"uri","type":["string","null"]},"shouldInterpolateStrings":{"type":["boolean","null"]},"slackMessage":{"$ref":"#/components/schemas/WebhookSlackMessage"},"stats":{"anyOf":[{"$ref":"#/components/schemas/WebhookStats"},{"type":"null"}]},"title":{"type":["string","null"]},"userId":{"type":"string"}},"required":["id","createdAt","modifiedAt","userId","eventTypes","condition","ignoreSslErrors","doNotRetry"],"type":"object"},"WebhookResource":{"properties":{"actionType":{"type":"string"},"condition":{"$ref":"#/components/schemas/WebhookCondition"},"createdAt":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"doNotRetry":{"type":["boolean","null"]},"eventTypes":{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array"},"githubIssue":{"$ref":"#/components/schemas/WebhookGithubIssue"},"googleDrive":{"$ref":"#/components/schemas/WebhookGoogleDrive"},"googleMail":{"$ref":"#/components/schemas/WebhookGoogleMail"},"headersTemplate":{"type":["string","null"]},"id":{"type":"string"},"ignoreSslErrors":{"type":"boolean"},"isAdHoc":{"type":["boolean","null"]},"isApifyIntegration":{"type":["boolean","null"]},"isEnabled":{"type":"boolean"},"lastDispatch":{"anyOf":[{"$ref":"#/components/schemas/WebhookLastDispatch"},{"type":"null"}]},"modifiedAt":{"format":"date-time","type":"string"},"payloadTemplate":{"type":["string","null"]},"requestUrl":{"format":"uri","type":["string","null"]},"shouldInterpolateStrings":{"type":["boolean","null"]},"slackMessage":{"$ref":"#/components/schemas/WebhookSlackMessage"},"stats":{"anyOf":[{"$ref":"#/components/schemas/WebhookStats"},{"type":"null"}]},"title":{"type":["string","null"]},"userId":{"type":"string"}},"required":["id","createdAt","modifiedAt","userId","eventTypes","condition","ignoreSslErrors"],"type":"object"},"WebhookResponse":{"properties":{"data":{"$ref":"#/components/schemas/WebhookResource"}},"required":["data"],"type":"object"},"WebhookSlackMessage":{"properties":{"channelId":{"type":"string"},"messageTemplate":{"type":"string"},"userIntegrationId":{"type":"string"}},"type":"object"},"WebhookStats":{"properties":{"totalDispatches":{"type":"integer"}},"type":"object"}},"specVersion":"v2-2026-12-03T122505Z"} diff --git a/src/Apify.Client/Models/ActorStoreListItem.cs b/src/Apify.Client/Models/ActorStoreListItem.cs index dde8e52..ff72412 100644 --- a/src/Apify.Client/Models/ActorStoreListItem.cs +++ b/src/Apify.Client/Models/ActorStoreListItem.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Text.Json.Nodes; namespace Apify.Client.Models; @@ -23,4 +24,23 @@ public ActorStoreListItem(JsonObject data) /// The human-readable title. public string? Title => GetString("title"); + + /// The full name of the Actor's owner. + public string? UserFullName => GetString("userFullName"); + + /// The Actor's description. + public string? Description => GetString("description"); + + /// The IDs of the Store categories of the Actor (null if the API reports none). + public IReadOnlyList? Categories => GetStringList("categories"); + + /// Whether the Actor's developer has a verified identity. + public bool? IsVerified => GetBool("isVerified"); + + /// + /// The Actor's usage statistics and Store metrics: totalUsers, totalRuns, totalUsers7Days, + /// totalUsers30Days, totalUsers90Days, actorReviewRating, and actorReviewCount. The Store + /// endpoint returns this reduced set instead of the full Actor statistics. + /// + public JsonObject? Stats => Get("stats") as JsonObject; } diff --git a/src/Apify.Client/Models/StoreSearchResult.cs b/src/Apify.Client/Models/StoreSearchResult.cs new file mode 100644 index 0000000..e89187d --- /dev/null +++ b/src/Apify.Client/Models/StoreSearchResult.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; +using System.Text.Json.Nodes; + +namespace Apify.Client.Models; + +/// +/// The single page of results of a Store search. This result exposes no total, offset, or count, because for a search the +/// API fills them with values that would read as the number of matches and a position to continue from. +/// +public sealed class StoreSearchResult +{ + private StoreSearchResult(IReadOnlyList items, long limit) + { + Items = items; + Limit = limit; + } + + /// Builds a result from the decoded paginated response object. + /// The decoded response object. + internal static StoreSearchResult FromData(JsonNode? data) + { + var page = PaginationList.FromData(data, static d => new ActorStoreListItem(d)); + return new StoreSearchResult(page.Items, page.Limit); + } + + /// The Actors matching the query, best match first. + public IReadOnlyList Items { get; } + + /// + /// The maximum number of Actors the API allowed in this result: the requested limit, or the API's maximum when none or + /// a larger one was requested. When holds that many, more Actors may match the query than were + /// returned, so narrow it with a more specific query or with the filters. + /// + public long Limit { get; } +} diff --git a/src/Apify.Client/Options/StoreFilterOptions.cs b/src/Apify.Client/Options/StoreFilterOptions.cs new file mode 100644 index 0000000..dcab2e8 --- /dev/null +++ b/src/Apify.Client/Options/StoreFilterOptions.cs @@ -0,0 +1,60 @@ +using Apify.Client.Internal; + +namespace Apify.Client.Options; + +/// The filters that and share. +public abstract class StoreFilterOptions +{ + /// The API's maximum limit while is set. + public const int MaxPageLimitWithInputSchema = 10; + + // Only the two options classes of this assembly derive from it. + internal StoreFilterOptions() + { + } + + /// + /// Filter Actors by category. Accepts one or more category IDs separated by commas, case-insensitive, such as + /// AI_AND_ML,ECOMMERCE, and an Actor has to match all of them. An unknown category fails with a 400 error. + /// + public string? Category { get; init; } + + /// Filter Actors by owner username. + public string? Username { get; init; } + + /// + /// Filter Actors by pricing model (FREE, PRICE_PER_DATASET_ITEM, + /// PAY_PER_EVENT). The rental model (FLAT_PRICE_PER_MONTH) is no longer supported. + /// + public string? PricingModel { get; init; } + + /// + /// By default, results leave out Actors that are not safe to run automatically, such as Actors of developers who have + /// not passed KYC or full-permission Actors without a large user base. true includes them. + /// + public bool? IncludeUnrunnableActors { get; init; } + + /// + /// Include each Actor's inputSchema, a compact form of the input schema of its default build (property types and + /// required properties). The API rejects a limit above + /// with a 400 error, so a call with a larger Limit fails. + /// + public bool? IncludeInputSchema { get; init; } + + /// + /// The shape of the response. full (default) is the complete response. agent is a reduced field set for + /// LLM consumers: id, title, name, username, description, notice, badge, + /// categories, and minimal stats. + /// + public string? ResponseFormat { get; init; } + + internal void AppendFilters(QueryParams q) + { + q.AddString("category", Category) + .AddString("username", Username) + .AddString("pricingModel", PricingModel) + .AddBool("includeUnrunnableActors", IncludeUnrunnableActors) + .AddBool("includeInputSchema", IncludeInputSchema) + .AddString("responseFormat", ResponseFormat); + } +} diff --git a/src/Apify.Client/Options/StoreListOptions.cs b/src/Apify.Client/Options/StoreListOptions.cs index 1dca04f..2151957 100644 --- a/src/Apify.Client/Options/StoreListOptions.cs +++ b/src/Apify.Client/Options/StoreListOptions.cs @@ -3,58 +3,29 @@ namespace Apify.Client.Options; -/// Options for listing/iterating the Apify Store (GET /v2/store). -public sealed class StoreListOptions +/// +/// Options for listing or iterating Apify Store in Store order (GET /v2/store). To find Actors by a text query, use +/// with StoreCollectionClient.SearchAsync. +/// +public sealed class StoreListOptions : StoreFilterOptions { /// Number of Actors to skip. public int? Offset { get; init; } - /// Maximum number of Actors to return (when iterating, in total across all pages). + /// + /// Maximum number of Actors to return (when iterating, in total across all pages). The API's default and maximum page + /// size is 1000, and it reduces a larger value to that. With the API + /// rejects a value above . + /// public int? Limit { get; init; } /// /// Maximum items requested per API call when iterating, which must be positive. It sizes the pages and is never sent to - /// the API; the page size is the smaller of this and the remaining Limit. Defaults to the API's page size. + /// the API; the page size is the smaller of this and the remaining Limit. Defaults to the API's page size, and + /// iteration requests pages of at most while the input schema is included. /// public int? ChunkSize { get; init; } - /// Full-text search query. - public string? Search { get; init; } - - /// The sort field (e.g. popularity, newest). - public string? SortBy { get; init; } - - /// Filter Actors by category. - public string? Category { get; init; } - - /// Filter Actors by owner username. - public string? Username { get; init; } - - /// - /// Filter Actors by pricing model (FREE, PRICE_PER_DATASET_ITEM, - /// PAY_PER_EVENT). The rental model (FLAT_PRICE_PER_MONTH) is no longer supported. - /// - public string? PricingModel { get; init; } - - /// Include Actors the current user cannot run. - public bool? IncludeUnrunnableActors { get; init; } - - /// Filter to Actors that allow agentic users. - public bool? AllowsAgenticUsers { get; init; } - - /// - /// Include each Actor's inputSchema, a compact form of the input schema of its default build (property types and - /// required properties). The API then caps limit at , and iteration - /// requests pages of at most that size. - /// - public bool? IncludeInputSchema { get; init; } - - /// The API's maximum page size while is set. - public const int MaxPageLimitWithInputSchema = 10; - - /// The response format (full, agent). - public string? ResponseFormat { get; init; } - /// The page size iteration requests: the caller's , capped at the API's maximum while the input schema is included. internal int? IterationChunkSize() => IncludeInputSchema is true ? Math.Min(ChunkSize ?? MaxPageLimitWithInputSchema, MaxPageLimitWithInputSchema) : ChunkSize; @@ -62,15 +33,7 @@ public sealed class StoreListOptions internal void AppendTo(QueryParams q) { q.AddInt("offset", Offset) - .AddInt("limit", Limit) - .AddString("search", Search) - .AddString("sortBy", SortBy) - .AddString("category", Category) - .AddString("username", Username) - .AddString("pricingModel", PricingModel) - .AddBool("includeUnrunnableActors", IncludeUnrunnableActors) - .AddBool("allowsAgenticUsers", AllowsAgenticUsers) - .AddBool("includeInputSchema", IncludeInputSchema) - .AddString("responseFormat", ResponseFormat); + .AddInt("limit", Limit); + AppendFilters(q); } } diff --git a/src/Apify.Client/Options/StoreSearchOptions.cs b/src/Apify.Client/Options/StoreSearchOptions.cs new file mode 100644 index 0000000..9bb95ab --- /dev/null +++ b/src/Apify.Client/Options/StoreSearchOptions.cs @@ -0,0 +1,28 @@ +using Apify.Client.Internal; + +namespace Apify.Client.Options; + +/// +/// Options for searching Apify Store (GET /v2/store with a search query). The API answers a search with one page +/// of at most 100 Actors, ordered by relevance, and ignores offset, so there is no offset, chunk size, or iteration. +/// To go through the whole Store, use with StoreCollectionClient.IterateAsync. +/// +public sealed class StoreSearchOptions : StoreFilterOptions +{ + /// Text to search for. Required, and it must not be empty, because the API answers an empty search with the Store listing. + public string? Search { get; init; } + + /// + /// Maximum number of Actors to return, which must be positive. The API's default and maximum is 100, and it reduces a + /// larger value to that. While is set, the API rejects a value above + /// with a 400 error. + /// + public int? Limit { get; init; } + + internal void AppendTo(QueryParams q) + { + q.AddString("search", Search) + .AddInt("limit", Limit); + AppendFilters(q); + } +} diff --git a/src/Apify.Client/Resources/ActorVersionClient.cs b/src/Apify.Client/Resources/ActorVersionClient.cs index e74ff1c..67f3f65 100644 --- a/src/Apify.Client/Resources/ActorVersionClient.cs +++ b/src/Apify.Client/Resources/ActorVersionClient.cs @@ -32,12 +32,15 @@ internal ActorVersionClient(HttpClientCore http, string actorUrl, string version return data is JsonObject obj ? new ActorVersion(obj) : null; } - /// Updates the version with the given fields and returns the updated object. + /// + /// Updates the version with the given fields and returns the updated object. The call uses the Long timeout tier, + /// because the version can carry its source files. + /// /// Any JSON-serializable set of fields to update. /// A token to cancel the request. public async Task UpdateAsync(object newFields, CancellationToken cancellationToken = default) { - return new ActorVersion(await _ctx.UpdateResourceAsync("", newFields, RequestTier.Short, cancellationToken).ConfigureAwait(false)); + return new ActorVersion(await _ctx.UpdateResourceAsync("", newFields, RequestTier.Long, cancellationToken).ConfigureAwait(false)); } /// Deletes the version. diff --git a/src/Apify.Client/Resources/ActorVersionCollectionClient.cs b/src/Apify.Client/Resources/ActorVersionCollectionClient.cs index 2482200..e9a22a0 100644 --- a/src/Apify.Client/Resources/ActorVersionCollectionClient.cs +++ b/src/Apify.Client/Resources/ActorVersionCollectionClient.cs @@ -25,12 +25,14 @@ public Task> ListAsync(CancellationToken cancellati return _ctx.ListResourceAsync("", new QueryParams(), static d => new ActorVersion(d), RequestTier.Short, cancellationToken); } - /// Creates a new Actor version. + /// + /// Creates a new Actor version. The call uses the Long timeout tier, because the version can carry its source files. + /// /// Any JSON-serializable version definition. /// A token to cancel the request. public async Task CreateAsync(object version, CancellationToken cancellationToken = default) { - return new ActorVersion(await _ctx.CreateResourceAsync(new QueryParams(), version, RequestTier.Short, cancellationToken).ConfigureAwait(false)); + return new ActorVersion(await _ctx.CreateResourceAsync(new QueryParams(), version, RequestTier.Long, cancellationToken).ConfigureAwait(false)); } /// diff --git a/src/Apify.Client/Resources/DatasetClient.cs b/src/Apify.Client/Resources/DatasetClient.cs index 890444c..3050f07 100644 --- a/src/Apify.Client/Resources/DatasetClient.cs +++ b/src/Apify.Client/Resources/DatasetClient.cs @@ -271,9 +271,11 @@ public async Task GetStatisticsAsync(CancellationToken cancellationT /// Builds a public URL for downloading the dataset's items. /// /// For a private dataset (one with a URL-signing secret key), the URL carries an HMAC-SHA256 signature, so it works - /// without an API token. + /// without an API token. The signature covers only the dataset ID and the expiry, so the URL grants read access to the + /// whole dataset until it expires. The are plain query parameters that set only the default + /// shape of the response, and anyone holding the URL can change or remove them. /// - /// Optional item filtering and projection, forwarded into the URL. + /// Optional item filtering and projection, set as the URL's default query parameters. /// Expiry of a signed URL in seconds; must be positive. Omit it for a URL that never expires. /// The format served by the URL (null for ). /// A token to cancel the request. diff --git a/src/Apify.Client/Resources/KeyValueStoreClient.cs b/src/Apify.Client/Resources/KeyValueStoreClient.cs index dbb32cd..de7cd82 100644 --- a/src/Apify.Client/Resources/KeyValueStoreClient.cs +++ b/src/Apify.Client/Resources/KeyValueStoreClient.cs @@ -252,10 +252,12 @@ public async Task GetRecordPublicUrlAsync(string key, CancellationToken } /// - /// Builds a public URL for listing the store's keys, forwarding the filters into the URL. As with - /// , a private store's URL is signed. + /// Builds a public URL for listing the store's keys. As with , a private store's URL + /// is signed. The signature covers only the store ID and the expiry, so the URL grants read access to the full key list + /// until it expires. The are plain query parameters that set only the default shape of the + /// response, and anyone holding the URL can change or remove them. /// - /// Optional key-listing filters forwarded into the URL. + /// Optional key-listing filters, set as the URL's default query parameters. /// Expiry of a signed URL in seconds; must be positive. Omit it for a URL that never expires. /// A token to cancel the request. public async Task CreateKeysPublicUrlAsync(ListKeysOptions? options = null, int? expiresInSecs = null, CancellationToken cancellationToken = default) diff --git a/src/Apify.Client/Resources/RunClient.cs b/src/Apify.Client/Resources/RunClient.cs index 47596cd..da317e8 100644 --- a/src/Apify.Client/Resources/RunClient.cs +++ b/src/Apify.Client/Resources/RunClient.cs @@ -382,7 +382,7 @@ private static async Task IsDatasetExhaustedAsync(DatasetClient datasetCli public LogClient Log() => LogClient.Nested(_http, _ctx.SubUrl(""), _ctx.BaseParams, _ctx.RequestTimeout); /// - /// Opens a live stream of the run's raw log bytes; the caller disposes it. Prefer to + /// Opens a live stream of the run's raw log bytes; the caller disposes it. Prefer to /// redirect the log to a sink. /// /// A token to cancel the request. @@ -404,9 +404,21 @@ public async Task GetStreamedLogAsync(CancellationToken cancellationToke /// /// /// If true (default), redirect the whole log; if false, skip messages older than the moment of this call. + /// To continue from a given time, use . /// public StreamedLog GetStreamedLog(Action toLog, bool fromStart = true) - => new(Log(), toLog, fromStart); + => new(Log(), toLog, fromStart ? null : DateTimeOffset.UtcNow); + + /// + /// Creates a like , redirecting only the + /// messages logged at or later. Redirecting only the recent messages suits long-running Actors, + /// such as Server Actors. If the log stream is cut off while the run goes on, it is reopened and the redirection continues + /// after the last redirected message (). + /// + /// The sink for each complete message, used as it is (see the other overload). + /// The time from which to redirect; null redirects the whole log. + public StreamedLog GetStreamedLog(Action toLog, DateTimeOffset? since) + => new(Log(), toLog, since); /// /// Returns this client with the timeout of every subsequent call set to , overriding the diff --git a/src/Apify.Client/Resources/StoreCollectionClient.cs b/src/Apify.Client/Resources/StoreCollectionClient.cs index 986b161..407b05e 100644 --- a/src/Apify.Client/Resources/StoreCollectionClient.cs +++ b/src/Apify.Client/Resources/StoreCollectionClient.cs @@ -8,7 +8,7 @@ namespace Apify.Client.Resources; -/// A client for browsing the Apify Store (GET /v2/store). +/// A client for browsing and searching Apify Store (GET /v2/store). public sealed class StoreCollectionClient { private readonly ResourceContext _ctx; @@ -18,7 +18,7 @@ internal StoreCollectionClient(HttpClientCore http, string baseUrl) _ctx = ResourceContext.Collection(http, baseUrl, "store"); } - /// Returns a single page of Store Actors matching the options. + /// Returns a single page of Store Actors in Store order matching the options. To search by text, use . /// Optional listing filters and pagination. /// A token to cancel the request. public Task> ListAsync(StoreListOptions? options = null, CancellationToken cancellationToken = default) @@ -42,6 +42,31 @@ public IAsyncEnumerable IterateAsync(StoreListOptions? optio return _ctx.IterateListAsync("", q, options.Offset ?? 0, options.Limit, options.IterationChunkSize(), static d => new ActorStoreListItem(d), RequestTier.Medium, cancellationToken); } + /// + /// Searches the Store and returns the Actors that match the query best, ordered by relevance. The API answers a search with + /// a single page of at most 100 Actors, with no next page and no total number of matches, so a result holding as many Actors as + /// can be cut off. Narrow the query or use the filters. To go through the whole Store, + /// use . + /// + /// The query, the filters, and the number of results. Search is required. + /// A token to cancel the request. + /// Search is missing or empty. + /// Limit is zero or negative. + public async Task SearchAsync(StoreSearchOptions options, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(options); + ArgumentException.ThrowIfNullOrEmpty(options.Search, "Search"); + if (options.Limit is { } limit) + { + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(limit, "Limit"); + } + + var q = new QueryParams(); + options.AppendTo(q); + var response = await _ctx.GetResourceRequiredAsync("", q, RequestTier.Medium, cancellationToken).ConfigureAwait(false); + return StoreSearchResult.FromData(response); + } + /// /// Returns this client with the timeout of every subsequent call set to , overriding the /// tier default (see "Timeout tiers" in docs/README.md). means no timeout. A value above diff --git a/src/Apify.Client/StreamedLog.cs b/src/Apify.Client/StreamedLog.cs index d658d73..770a5ad 100644 --- a/src/Apify.Client/StreamedLog.cs +++ b/src/Apify.Client/StreamedLog.cs @@ -1,6 +1,7 @@ using System; using System.Globalization; using System.IO; +using System.Net.Http; using System.Text; using System.Text.RegularExpressions; using System.Threading; @@ -17,7 +18,9 @@ namespace Apify.Client; /// /// /// Each callback argument is one complete, trimmed message. Redirection runs on a background task started by -/// and drained by or disposal. +/// and drained by or disposal. A log stream that breaks off while the run +/// goes on is reopened, and the redirection continues after . An error the redirection cannot +/// recover from ends it with a warning on the standard error output and does not fail the caller. /// public sealed class StreamedLog : IAsyncDisposable { @@ -41,33 +44,66 @@ public sealed class StreamedLog : IAsyncDisposable /// Longest pause between reopens of an empty log stream. private const int EmptyStreamMaxRetryMillis = 5_000; + /// + /// Pause before reopening a log stream that broke off after it had delivered data. A stream that has carried no data + /// for several minutes is cut off even though the run goes on, while the stream of a finished log ends without an error. + /// + private const int BrokenStreamReopenMillis = 1_000; + private readonly LogClient _logClient; private readonly Action _toLog; - private readonly DateTimeOffset? _relevancyTimeLimit; + private readonly DateTimeOffset? _since; private readonly object _lock = new(); + // Written by the redirection task and read through LastRedirectedAt, so both use _lock. + private DateTimeOffset? _lastRedirectedAt; + + // How many redirected messages carry _lastRedirectedAt. Several messages can share a millisecond. + private int _redirectedAtLastTimestamp; + + // A reopened stream replays the messages before _replayedUntil, and the first _replaySkipCount messages at it. + private DateTimeOffset? _replayedUntil; + private int _replaySkipCount; + + private bool _receivedData; private CancellationTokenSource? _cts; private Task? _streamingTask; - internal StreamedLog(LogClient logClient, Action toLog, bool fromStart) + internal StreamedLog(LogClient logClient, Action toLog, DateTimeOffset? since) { _logClient = logClient; _toLog = toLog; - // With fromStart false, ignore messages from before this helper was created. - _relevancyTimeLimit = fromStart ? null : DateTimeOffset.UtcNow; + _since = since; + } + + /// + /// The timestamp of the last redirected log message, or null if nothing has been redirected yet. To continue the + /// redirection after a restart, pass it as since to . + /// Messages logged at exactly that time are redirected again, and passing one millisecond later could skip messages that + /// share that millisecond but were not redirected yet. + /// + public DateTimeOffset? LastRedirectedAt + { + get + { + lock (_lock) + { + return _lastRedirectedAt; + } + } } /// /// Pass this as the log argument of ActorClient.CallAsync or TaskClient.CallAsync to write the run's /// log to the standard output with the prefix <Actor name> runId:<id> -> , as the reference client - /// does by default. Only CallAsync recognizes it; uses a sink as it is, so + /// does by default. Only CallAsync recognizes it; uses a sink as it is, so /// use there. /// public static readonly Action DefaultConsole = static message => Console.Out.WriteLine(message); /// /// Creates a sink that writes each message on one line with the prefix <Actor name> runId:<id> -> , - /// for a run that is already known (). + /// for a run that is already known (). /// /// The run ID shown in the prefix. /// The Actor name shown in the prefix; omitted when null or empty. @@ -89,6 +125,7 @@ public void Start() throw new InvalidOperationException("Log streaming is already active."); } + _receivedData = false; _cts = new CancellationTokenSource(); _streamingTask = StreamLogAsync(_cts.Token); } @@ -130,41 +167,42 @@ public async Task StopAsync() /// public async ValueTask DisposeAsync() => await StopAsync().ConfigureAwait(false); + /// + /// Opens the log stream and redirects it until it ends or redirection stops. The API serves the log of a run that has + /// not logged anything yet as an empty stream that ends at once, so the stream is reopened until the first bytes arrive. + /// A stream that broke off after it had delivered data is reopened too. A stream that ends without an error after + /// delivering data carried the whole log of a finished run. + /// private async Task StreamLogAsync(CancellationToken cancellationToken) { var buffer = new StringBuilder(); - var sawAnyBytes = false; var retryMillis = EmptyStreamInitialRetryMillis; try { - while (!sawAnyBytes) + while (true) { // _logClient is the run's or build's nested client, which throws on a 404 instead of returning null. using var stream = (await _logClient.StreamAsync(new LogOptions { Raw = true }, cancellationToken).ConfigureAwait(false))!; - using var reader = new StreamReader(stream, Encoding.UTF8); - - var chunk = new char[ReadChunkChars]; - int read; - while ((read = await reader.ReadAsync(chunk.AsMemory(0, chunk.Length), cancellationToken).ConfigureAwait(false)) > 0) + var brokeOff = await RedirectLogStreamAsync(stream, buffer, cancellationToken).ConfigureAwait(false); + if (_receivedData && !brokeOff) { - sawAnyBytes = true; - buffer.Append(chunk, 0, read); - FlushMessages(buffer, flushRemainder: false); + break; } - if (sawAnyBytes) + if (_receivedData) { - break; + await Task.Delay(TimeSpan.FromMilliseconds(BrokenStreamReopenMillis), cancellationToken).ConfigureAwait(false); + } + else + { + // Otherwise the log of a run still queued when streaming started would never be redirected. + await Task.Delay(TimeSpan.FromMilliseconds(retryMillis), cancellationToken).ConfigureAwait(false); + retryMillis = Math.Min(retryMillis * 2, EmptyStreamMaxRetryMillis); } - - // A run that has not logged anything yet is served as an empty stream that closes at once, so reopen it with growing - // backoff until the first bytes arrive. Otherwise the log of a run still queued when streaming started would never be redirected. - await Task.Delay(TimeSpan.FromMilliseconds(retryMillis), cancellationToken).ConfigureAwait(false); - retryMillis = Math.Min(retryMillis * 2, EmptyStreamMaxRetryMillis); } } - catch (OperationCanceledException) when (!sawAnyBytes) + catch (OperationCanceledException) when (!_receivedData) { // Stopped before the run logged anything (for example it was queued): fetch whatever log exists in one plain request. // Best effort, so a failure must not turn a clean stop into an exception. @@ -178,10 +216,123 @@ private async Task StreamLogAsync(CancellationToken cancellationToken) // Leave the buffer as it is; the log is not redirected for this stop. } } + catch (Exception ex) when (ex is not OperationCanceledException) + { + // As in the reference client, a failure the redirection cannot recover from ends it without failing the caller, + // because CallAsync stops the redirection after the run has finished. + WarnRedirectionStopped(ex); + + // Nothing in the buffer is worth redirecting after an unrecoverable error, and when the sink failed in the middle of + // a flush the buffer still holds the messages before the failing one, which the flush below would repeat. + buffer.Clear(); + } finally { // Emit what is left: a message without a trailing newline, or the fallback fetched above. - FlushMessages(buffer, flushRemainder: true); + try + { + FlushMessages(buffer, flushRemainder: true); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + WarnRedirectionStopped(ex); + } + } + } + + private static void WarnRedirectionStopped(Exception ex) + => Console.Error.WriteLine("Log redirection stopped due to error: " + ex.Message); + + /// + /// Redirects one log stream until it ends. Returns whether it broke off and has to be opened again. A reopened stream + /// replays the log from its start, because the API cannot continue a stream from a given point. + /// + private async Task RedirectLogStreamAsync(Stream stream, StringBuilder buffer, CancellationToken cancellationToken) + { + using var reader = new StreamReader(stream, Encoding.UTF8); + var chunk = new char[ReadChunkChars]; + try + { + int read; + while ((read = await reader.ReadAsync(chunk.AsMemory(0, chunk.Length), cancellationToken).ConfigureAwait(false)) > 0) + { + _receivedData = true; + buffer.Append(chunk, 0, read); + FlushMessages(buffer, flushRemainder: false); + } + + return false; + } + catch (Exception ex) when (_receivedData && !cancellationToken.IsCancellationRequested && ex is IOException or HttpRequestException) + { + // A transport failure after data means the connection was cut, not that the log ended. + if (!ReplayCaughtUp()) + { + // The reopened stream broke off again before it got as far as the stream before it. Reopening it again could + // replay the same part forever, so redirection ends with the warning of StreamLogAsync. + throw; + } + + // The last message in the buffer may be incomplete. The reopened stream replays it. + buffer.Clear(); + lock (_lock) + { + _replayedUntil = _lastRedirectedAt; + _replaySkipCount = _redirectedAtLastTimestamp; + } + + return true; + } + } + + /// Whether the current stream got at least as far as the stream before it. + private bool ReplayCaughtUp() + { + lock (_lock) + { + return _replayedUntil is null || _replaySkipCount == 0; + } + } + + /// Whether a message of a reopened stream was already redirected before the stream was reopened. + private bool IsReplayed(DateTimeOffset logTime) + { + lock (_lock) + { + if (_replayedUntil is null) + { + return false; + } + + if (logTime < _replayedUntil) + { + return true; + } + + if (logTime == _replayedUntil && _replaySkipCount > 0) + { + _replaySkipCount--; + return true; + } + + _replayedUntil = null; + return false; + } + } + + private void RememberRedirected(DateTimeOffset logTime) + { + lock (_lock) + { + if (logTime == _lastRedirectedAt) + { + _redirectedAtLastTimestamp++; + } + else + { + _lastRedirectedAt = logTime; + _redirectedAtLastTimestamp = 1; + } } } @@ -225,27 +376,34 @@ private void FlushMessages(StringBuilder buffer, bool flushRemainder) } /// - /// Writes one message to the sink. Blank messages are dropped, and so are messages older than this helper when - /// fromStart is off. + /// Writes one message to the sink. Blank messages are dropped, and so are messages that a reopened stream replays and + /// messages older than since. /// private void EmitMessage(string message, string? timestamp) { - if (_relevancyTimeLimit is not null - && timestamp is not null + DateTimeOffset? logTime = null; + if (timestamp is not null && DateTimeOffset.TryParse( timestamp, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal, - out var logTime) - && logTime < _relevancyTimeLimit.Value) + out var parsed)) { - return; + logTime = parsed; + if (IsReplayed(parsed) || (_since is not null && parsed < _since.Value)) + { + return; + } } var trimmed = message.Trim(); if (trimmed.Length > 0) { _toLog(trimmed); + if (logTime is not null) + { + RememberRedirected(logTime.Value); + } } } } diff --git a/tests/Apify.Client.Tests/Integration/StoreIntegrationTests.cs b/tests/Apify.Client.Tests/Integration/StoreIntegrationTests.cs index 691439f..e471ad6 100644 --- a/tests/Apify.Client.Tests/Integration/StoreIntegrationTests.cs +++ b/tests/Apify.Client.Tests/Integration/StoreIntegrationTests.cs @@ -1,3 +1,4 @@ +using System; using System.Threading.Tasks; using Apify.Client.Options; using Xunit; @@ -50,9 +51,84 @@ public async Task IterateStoreStopsAtLimit() public async Task ListStoreWithInputSchema() { var client = RequireClient(); - var page = await client.Store().ListAsync(new StoreListOptions { IncludeInputSchema = true, Limit = StoreListOptions.MaxPageLimitWithInputSchema }); + var page = await client.Store().ListAsync(new StoreListOptions { IncludeInputSchema = true, Limit = StoreFilterOptions.MaxPageLimitWithInputSchema }); Assert.NotEmpty(page.Items); Assert.Contains(page.Items, static item => item.Get("inputSchema") is not null); } + + [SkippableFact] + public async Task ListStoreExposesTheStoreStats() + { + var client = RequireClient(); + var page = await client.Store().ListAsync(new StoreListOptions { Limit = 5 }); + + Assert.NotEmpty(page.Items); + Assert.All(page.Items, static item => + { + Assert.NotNull(item.Stats); + Assert.NotNull(item.Stats["totalUsers"]); + Assert.NotNull(item.Stats["actorReviewCount"]); + }); + Assert.Contains(page.Items, static item => !string.IsNullOrEmpty(item.UserFullName)); + Assert.Contains(page.Items, static item => !string.IsNullOrEmpty(item.Description)); + Assert.Contains(page.Items, static item => item.IsVerified is not null); + } + + [SkippableFact] + public async Task ListStoreByCategory() + { + var client = RequireClient(); + var page = await client.Store().ListAsync(new StoreListOptions { Category = "AI_AND_ML", Limit = 5 }); + + Assert.NotEmpty(page.Items); + Assert.All(page.Items, static item => Assert.Contains("AI_AND_ML", item.Categories ?? Array.Empty())); + } + + [SkippableFact] + public async Task SearchStoreReturnsASinglePage() + { + var client = RequireClient(); + var result = await client.Store().SearchAsync(new StoreSearchOptions { Search = "web scraper" }); + + Assert.NotEmpty(result.Items); + Assert.True(result.Items.Count <= 100); + Assert.True(result.Limit > 0); + Assert.All(result.Items, static item => Assert.False(string.IsNullOrEmpty(item.Id))); + } + + [SkippableFact] + public async Task SearchStoreIsBoundedByLimit() + { + var client = RequireClient(); + var result = await client.Store().SearchAsync(new StoreSearchOptions { Search = "web scraper", Limit = 30 }); + + Assert.Equal(30, result.Items.Count); + Assert.Equal(30, result.Limit); + } + + [SkippableFact] + public async Task SearchStoreWithFilters() + { + var client = RequireClient(); + var result = await client.Store().SearchAsync(new StoreSearchOptions { Search = "scraper", Username = "apify", Limit = 5 }); + + Assert.NotEmpty(result.Items); + Assert.All(result.Items, static item => Assert.Equal("apify", item.Username)); + } + + [SkippableFact] + public async Task SearchStoreWithInputSchema() + { + var client = RequireClient(); + var result = await client.Store().SearchAsync(new StoreSearchOptions + { + Search = "web scraper", + IncludeInputSchema = true, + Limit = StoreFilterOptions.MaxPageLimitWithInputSchema, + }); + + Assert.NotEmpty(result.Items); + Assert.Contains(result.Items, static item => item.Get("inputSchema") is not null); + } } diff --git a/tests/Apify.Client.Tests/Unit/ChunkSizeTests.cs b/tests/Apify.Client.Tests/Unit/ChunkSizeTests.cs index 3f84b5d..a78c8a3 100644 --- a/tests/Apify.Client.Tests/Unit/ChunkSizeTests.cs +++ b/tests/Apify.Client.Tests/Unit/ChunkSizeTests.cs @@ -169,8 +169,8 @@ public async Task StoreIterationSizesPagesByChunkSizeAndCapsTotalAtLimit() [Fact] public async Task StoreIterationAdvancesByTheRowsScannedNotTheItemsReturned() { - // The Store listing drops Actors the caller cannot run after applying offset and limit, so a page that - // scanned 3 rows can return only 2 Actors. The next page must start after all 3 rows. + // The Store listing drops Actors that are not safe to run automatically after applying offset and limit, so a + // page that scanned 3 rows can return only 2 Actors. The next page must start after all 3 rows. var transport = new MockTransport() .QueueResponse(200, SpecFixtures.PageWithCount(9, 3, SpecFixtures.StoreItem("a"), SpecFixtures.StoreItem("b"))) .QueueResponse(200, SpecFixtures.Page(9)); diff --git a/tests/Apify.Client.Tests/Unit/ClientOptionsAndStatsTests.cs b/tests/Apify.Client.Tests/Unit/ClientOptionsAndStatsTests.cs index 0f9bdba..3206371 100644 --- a/tests/Apify.Client.Tests/Unit/ClientOptionsAndStatsTests.cs +++ b/tests/Apify.Client.Tests/Unit/ClientOptionsAndStatsTests.cs @@ -13,7 +13,7 @@ namespace Apify.Client.Tests.Unit; /// -/// Tests that swap the process-wide run alone: xUnit runs a collection that disables +/// Tests that swap the process-wide or run alone: xUnit runs a collection that disables /// parallelization after all the parallel ones have finished, so no other test writes to the captured writer. /// [CollectionDefinition(Name, DisableParallelization = true)] @@ -140,6 +140,26 @@ public async Task LongTierUsesTimeoutLongSecsWhileOverridesAreCappedAtTimeoutSec Assert.Equal(100.0, transport.Timeouts[1]); } + [Fact] + public async Task ActorVersionCreateAndUpdateUseTheLongTier() + { + // A version can carry its source files, so creating and updating it is an upload. + const string version = "{\"data\":{\"versionNumber\":\"0.1\",\"sourceType\":\"SOURCE_FILES\",\"sourceFiles\":[]}}"; + var transport = new MockTransport().QueueResponse(200, version).QueueResponse(200, version).QueueResponse(200, version); + var client = Client(transport, o => + { + o.TimeoutSecs = 100; + o.TimeoutLongSecs = 20; + o.TimeoutShortSecs = 3; + }); + + await client.Actor("a1").Versions().CreateAsync(new { versionNumber = "0.1" }); + await client.Actor("a1").Version("0.1").UpdateAsync(new { buildTag = "latest" }); + await client.Actor("a1").Version("0.1").GetAsync(); + + Assert.Equal(new[] { 20.0, 20.0, 3.0 }, transport.Timeouts); + } + [Fact] public async Task LongTierDefaultsToTimeoutSecs() { @@ -210,9 +230,17 @@ public async Task InvalidKeyAndRequestIdErrorsNameTheCallersParameter() /// Answers by URL so the concurrent log stream and the run polling cannot race on a queue. private sealed class RoutingTransport : IHttpTransport { + /// Makes every log request fail like a dropped connection. + public bool FailLog { get; init; } + public Task SendAsync(HttpRequestMessage request, TimeSpan timeout, bool streaming, CancellationToken cancellationToken) { var url = request.RequestUri!.AbsolutePath; + if (FailLog && url.EndsWith("/log", StringComparison.Ordinal)) + { + throw new ApifyTransportException("mock connection failure", null, isTimeout: false); + } + var body = url switch { _ when url.EndsWith("/log", StringComparison.Ordinal) => "2024-01-02T03:04:05.678Z hello from the run\n", @@ -242,4 +270,25 @@ public async Task CallAsyncWithTheDefaultConsoleSinkRedirectsTheLogWithTheRefere Assert.Equal("my-actor runId:run1 -> 2024-01-02T03:04:05.678Z hello from the run\n", writer.ToString()); } + + [Fact] + public async Task CallAsyncReturnsTheRunWhenTheLogStreamFails() + { + var client = new ApifyClient(new ApifyClientOptions { Token = "t", HttpTransport = new RoutingTransport { FailLog = true } }); + var original = Console.Error; + var warnings = new StringWriter(); + Console.SetError(warnings); + try + { + var run = await client.Actor("a").CallAsync(log: static _ => { }); + + Assert.Equal("run1", run.Id); + } + finally + { + Console.SetError(original); + } + + Assert.Contains("Log redirection stopped due to error", warnings.ToString(), StringComparison.Ordinal); + } } diff --git a/tests/Apify.Client.Tests/Unit/MockTransport.cs b/tests/Apify.Client.Tests/Unit/MockTransport.cs index a40baae..4dcee38 100644 --- a/tests/Apify.Client.Tests/Unit/MockTransport.cs +++ b/tests/Apify.Client.Tests/Unit/MockTransport.cs @@ -49,7 +49,7 @@ internal RecordedRequest(string method, string uri, string body, byte[] bodyByte /// public sealed class MockTransport : IHttpTransport { - private sealed record QueueEntry(bool IsError, bool Timeout, int Status, string Body, IReadOnlyDictionary? Headers); + private sealed record QueueEntry(bool IsError, bool Timeout, int Status, string Body, IReadOnlyDictionary? Headers, bool BreaksAfterBody = false); private readonly Queue _queue = new(); private readonly object _lock = new(); @@ -78,6 +78,13 @@ public MockTransport QueueResponse(int status, string body = "", IReadOnlyDictio return this; } + /// Queues a 200 whose body stream delivers and then fails with an , like a cut connection. + public MockTransport QueueStreamBrokenAfter(string body) + { + _queue.Enqueue(new QueueEntry(false, false, 200, body, null, BreaksAfterBody: true)); + return this; + } + public MockTransport QueueError(bool timeout = false) { _queue.Enqueue(new QueueEntry(true, timeout, 0, string.Empty, null)); @@ -154,7 +161,9 @@ public async Task SendAsync(HttpRequestMessage request, Tim var response = new HttpResponseMessage((HttpStatusCode)entry.Status) { - Content = new StringContent(entry.Body), + Content = entry.BreaksAfterBody + ? new StreamContent(new BrokenStream(System.Text.Encoding.UTF8.GetBytes(entry.Body))) + : new StringContent(entry.Body), }; if (entry.Headers is not null) { @@ -178,6 +187,50 @@ public async Task SendAsync(HttpRequestMessage request, Tim } } + /// A read-only stream that serves its bytes and then throws an . + private sealed class BrokenStream : System.IO.Stream + { + private readonly System.IO.MemoryStream _inner; + + public BrokenStream(byte[] bytes) => _inner = new System.IO.MemoryStream(bytes); + + public override bool CanRead => true; + + public override bool CanSeek => false; + + public override bool CanWrite => false; + + public override long Length => throw new NotSupportedException(); + + public override long Position + { + get => throw new NotSupportedException(); + set => throw new NotSupportedException(); + } + + public override int Read(byte[] buffer, int offset, int count) + { + var read = _inner.Read(buffer, offset, count); + return read > 0 ? read : throw new System.IO.IOException("mock connection cut"); + } + + public override ValueTask ReadAsync(Memory buffer, CancellationToken cancellationToken = default) + { + var read = _inner.Read(buffer.Span); + return read > 0 ? new ValueTask(read) : throw new System.IO.IOException("mock connection cut"); + } + + public override void Flush() + { + } + + public override long Seek(long offset, System.IO.SeekOrigin origin) => throw new NotSupportedException(); + + public override void SetLength(long value) => throw new NotSupportedException(); + + public override void Write(byte[] buffer, int offset, int count) => throw new NotSupportedException(); + } + /// Decompresses a request body per its Content-Encoding (br/gzip), or returns it unchanged. private static byte[] Decompress(byte[] bytes, string? encoding) { diff --git a/tests/Apify.Client.Tests/Unit/ModelAccessorTests.cs b/tests/Apify.Client.Tests/Unit/ModelAccessorTests.cs index 16f749d..4565463 100644 --- a/tests/Apify.Client.Tests/Unit/ModelAccessorTests.cs +++ b/tests/Apify.Client.Tests/Unit/ModelAccessorTests.cs @@ -138,6 +138,28 @@ public void ActorVersionExposesItsActorPath() Assert.Equal("actors/typescript-actor", version.ActorPath); } + [Fact] + public void ActorStoreListItemExposesTheStoreFields() + { + var item = new ActorStoreListItem(JsonNode.Parse( + "{\"userFullName\":\"Jane Doe\",\"description\":\"d\",\"categories\":[\"AI_AND_ML\",\"ECOMMERCE\"],\"isVerified\":true," + + "\"stats\":{\"totalUsers\":6,\"actorReviewRating\":4.7,\"actorReviewCount\":69}}")!.AsObject()); + + Assert.Equal("Jane Doe", item.UserFullName); + Assert.Equal("d", item.Description); + Assert.Equal(new[] { "AI_AND_ML", "ECOMMERCE" }, item.Categories); + Assert.True(item.IsVerified); + Assert.Equal(69, item.Stats!["actorReviewCount"]!.GetValue()); + } + + [Fact] + public void ActorStoreListItemWithNullOrNoCategoriesHasNone() + { + Assert.Null(new ActorStoreListItem(JsonNode.Parse("{\"categories\":null}")!.AsObject()).Categories); + Assert.Null(new ActorStoreListItem(new JsonObject()).Categories); + Assert.Null(new ActorStoreListItem(new JsonObject()).IsVerified); + } + [Fact] public void ActorVersionWithNullOrNoActorPathHasNone() { diff --git a/tests/Apify.Client.Tests/Unit/RequestShapeTests.cs b/tests/Apify.Client.Tests/Unit/RequestShapeTests.cs index 4dbdf61..8a6c11d 100644 --- a/tests/Apify.Client.Tests/Unit/RequestShapeTests.cs +++ b/tests/Apify.Client.Tests/Unit/RequestShapeTests.cs @@ -805,4 +805,87 @@ public async Task StoreListSendsIncludeInputSchema() Assert.Contains("includeInputSchema=1", transport.LastRequest.Uri, StringComparison.Ordinal); } + + [Fact] + public async Task StoreListAndIterationNeverSendSortBy() + { + // The API ignores sortBy on the Store, so the client has no option for it and sends none. + var transport = new MockTransport().QueueResponse(200, SpecFixtures.Page(0)).QueueResponse(200, SpecFixtures.Page(0)); + var options = new StoreListOptions { Limit = 5, Category = "AI_AND_ML", Username = "apify", PricingModel = "FREE" }; + + await Client(transport).Store().ListAsync(options); + await foreach (var unused in Client(transport).Store().IterateAsync(options)) + { + } + + Assert.Equal(2, transport.CallCount); + Assert.All(transport.Received, request => Assert.DoesNotContain("sortBy", request.Uri, StringComparison.OrdinalIgnoreCase)); + } + + [Fact] + public async Task StoreSearchSendsTheQueryTheLimitAndTheFiltersButNoOffset() + { + var transport = new MockTransport().QueueResponse(200, SpecFixtures.Page(0)); + + await Client(transport).Store().SearchAsync(new StoreSearchOptions + { + Search = "web scraper", + Limit = 10, + Category = "AI_AND_ML", + Username = "apify", + PricingModel = "FREE", + IncludeUnrunnableActors = true, + IncludeInputSchema = true, + }); + + var uri = transport.LastRequest.Uri; + Assert.Equal(1, transport.CallCount); + Assert.Contains("search=web scraper", Uri.UnescapeDataString(uri).Replace("+", " ", StringComparison.Ordinal), StringComparison.Ordinal); + Assert.Contains("limit=10", uri, StringComparison.Ordinal); + Assert.Contains("category=AI_AND_ML", uri, StringComparison.Ordinal); + Assert.Contains("username=apify", uri, StringComparison.Ordinal); + Assert.Contains("pricingModel=FREE", uri, StringComparison.Ordinal); + Assert.Contains("includeUnrunnableActors=1", uri, StringComparison.Ordinal); + Assert.Contains("includeInputSchema=1", uri, StringComparison.Ordinal); + Assert.DoesNotContain("offset", uri, StringComparison.Ordinal); + Assert.DoesNotContain("sortBy", uri, StringComparison.Ordinal); + } + + [Fact] + public async Task StoreSearchReturnsTheItemsAndTheLimitOnly() + { + // A search fills total and count with the number of returned Actors, which is why the result does not expose them. + var transport = new MockTransport().QueueResponse(200, SpecFixtures.Page(2, SpecFixtures.StoreItem("a"), SpecFixtures.StoreItem("b"))); + + var result = await Client(transport).Store().SearchAsync(new StoreSearchOptions { Search = "scraper" }); + + Assert.Equal(new[] { "a", "b" }, new[] { result.Items[0].Id, result.Items[1].Id }); + Assert.Equal(2, result.Items.Count); + Assert.Equal(1000, result.Limit); + Assert.Equal(1, transport.CallCount); + } + + [Theory] + [InlineData(null)] + [InlineData("")] + public async Task StoreSearchRejectsAMissingQueryBeforeAnyRequest(string? search) + { + var transport = new MockTransport(); + + await Assert.ThrowsAnyAsync(() => Client(transport).Store().SearchAsync(new StoreSearchOptions { Search = search })); + + Assert.Equal(0, transport.CallCount); + } + + [Theory] + [InlineData(0)] + [InlineData(-1)] + public async Task StoreSearchRejectsANonPositiveLimitBeforeAnyRequest(int limit) + { + var transport = new MockTransport(); + + await Assert.ThrowsAsync(() => Client(transport).Store().SearchAsync(new StoreSearchOptions { Search = "scraper", Limit = limit })); + + Assert.Equal(0, transport.CallCount); + } } diff --git a/tests/Apify.Client.Tests/Unit/ResponseSchemaTests.cs b/tests/Apify.Client.Tests/Unit/ResponseSchemaTests.cs index 2e86870..769b2a2 100644 --- a/tests/Apify.Client.Tests/Unit/ResponseSchemaTests.cs +++ b/tests/Apify.Client.Tests/Unit/ResponseSchemaTests.cs @@ -96,6 +96,24 @@ public void ProxyInfoIsAcceptedAsAUserResponse(string path) Assert.Empty(Issues("GET", path, body)); } + [Fact] + public void StoreActorMayHaveNullCategories() + { + var item = SpecFixtures.StoreItem("a").Replace("\"stats\"", "\"categories\":null,\"isVerified\":false,\"stats\"", StringComparison.Ordinal); + + Assert.Empty(Issues("GET", "/v2/store", SpecFixtures.Page(1, item))); + } + + [Fact] + public void StoreActorStatsHaveToCarryTheReviewMetrics() + { + var item = SpecFixtures.StoreItem("a").Replace("\"stats\":{\"totalUsers\":6,\"actorReviewRating\":4.7,\"actorReviewCount\":69}", "\"stats\":{}", StringComparison.Ordinal); + + var issues = Issues("GET", "/v2/store", SpecFixtures.Page(1, item)); + + Assert.Contains("$.data.items[0].stats.actorReviewRating: required property is missing", issues); + } + [Fact] public void NullIsRejectedWhereTheSpecDoesNotAllowIt() { diff --git a/tests/Apify.Client.Tests/Unit/SpecFixtures.cs b/tests/Apify.Client.Tests/Unit/SpecFixtures.cs index bd98277..331042a 100644 --- a/tests/Apify.Client.Tests/Unit/SpecFixtures.cs +++ b/tests/Apify.Client.Tests/Unit/SpecFixtures.cs @@ -40,7 +40,7 @@ public static string ScheduleItem(string id) /// An item of the Store collection. public static string StoreItem(string id) - => "{\"id\":\"" + id + "\",\"title\":\"t\",\"name\":\"n\",\"username\":\"u\",\"stats\":{}}"; + => "{\"id\":\"" + id + "\",\"title\":\"t\",\"name\":\"n\",\"username\":\"u\",\"stats\":{\"totalUsers\":6,\"actorReviewRating\":4.7,\"actorReviewCount\":69}}"; /// A page of Actors listing the given IDs. public static string ActorPage(int total, params string[] ids) => Page(total, ids.Select(ActorItem).ToArray()); diff --git a/tests/Apify.Client.Tests/Unit/StreamedLogTests.cs b/tests/Apify.Client.Tests/Unit/StreamedLogTests.cs index a02606e..2da15fe 100644 --- a/tests/Apify.Client.Tests/Unit/StreamedLogTests.cs +++ b/tests/Apify.Client.Tests/Unit/StreamedLogTests.cs @@ -1,11 +1,13 @@ using System; using System.Collections.Generic; +using System.IO; using System.Threading.Tasks; using Xunit; namespace Apify.Client.Tests.Unit; [Trait("Category", "Unit")] +[Collection(ProcessConsoleTests.Name)] public sealed class StreamedLogTests { private const string LogBody = @@ -169,4 +171,207 @@ public async Task StoppingBeforeAnyBytesArriveFallsBackToAOneShotGet() Assert.Equal(3, messages.Count); Assert.Equal(2, transport.CallCount); } + + private const int PollAttempts = 400; + private const int PollDelayMillis = 10; + + private static async Task WaitForCallsAsync(MockTransport transport, int expectedCalls) + { + // A reopen follows a one-second pause, so wait for the request and then give the redirection a moment to finish. + for (var i = 0; i < PollAttempts && transport.CallCount < expectedCalls; i++) + { + await Task.Delay(PollDelayMillis * 10); + } + + await Task.Delay(PollDelayMillis * 5); + } + + private static async Task StartAsync(MockTransport transport, List messages, int expectedCount, DateTimeOffset? since = null) + { + var streamedLog = Client(transport).Run("run1").GetStreamedLog( + m => + { + lock (messages) + { + messages.Add(m); + } + }, + since); + streamedLog.Start(); + for (var i = 0; i < PollAttempts; i++) + { + await Task.Delay(PollDelayMillis); + lock (messages) + { + if (messages.Count >= expectedCount) + { + break; + } + } + } + + return streamedLog; + } + + [Fact] + public async Task ReopensAStreamThatBrokeOffAndSkipsTheMessagesAlreadyRedirected() + { + // The first stream is cut after two complete messages and an incomplete third. The reopened stream replays the whole + // log, so the two redirected messages must not repeat and the cut-off one must arrive complete. + var transport = new MockTransport() + .QueueStreamBrokenAfter( + "2024-01-02T03:04:05.678Z first message\n" + + "2024-01-02T03:04:06.789Z second message\n" + + "2024-01-02T03:04:07.890Z thi") + .QueueResponse(200, LogBody + "2024-01-02T03:04:08.900Z fourth message\n"); + + var messages = new List(); + var streamedLog = await StartAsync(transport, messages, expectedCount: 4); + await streamedLog.StopAsync(); + + Assert.Equal( + new[] + { + "2024-01-02T03:04:05.678Z first message", + "2024-01-02T03:04:06.789Z second message", + "2024-01-02T03:04:07.890Z third message", + "2024-01-02T03:04:08.900Z fourth message", + }, + messages); + Assert.Equal(2, transport.CallCount); + } + + [Fact] + public async Task ReopenedStreamSkipsOnlyAsManyMessagesAsItRedirectedAtASharedTimestamp() + { + // Two messages share one millisecond and only the first was redirected before the cut. + var transport = new MockTransport() + .QueueStreamBrokenAfter( + "2024-01-02T03:04:05.678Z first\n" + + "2024-01-02T03:04:06.789Z second a\n" + + "2024-01-02T03:04:06.789Z sec") + .QueueResponse( + 200, + "2024-01-02T03:04:05.678Z first\n" + + "2024-01-02T03:04:06.789Z second a\n" + + "2024-01-02T03:04:06.789Z second b\n" + + "2024-01-02T03:04:07.890Z third\n"); + + var messages = new List(); + var streamedLog = await StartAsync(transport, messages, expectedCount: 4); + await streamedLog.StopAsync(); + + Assert.Equal(4, messages.Count); + Assert.Equal("2024-01-02T03:04:06.789Z second b", messages[2]); + } + + [Fact] + public async Task SinceSkipsOlderMessagesAndLastRedirectedAtIsTheNewestRedirected() + { + var transport = new MockTransport().QueueResponse(200, LogBody); + + var messages = new List(); + var streamedLog = await StartAsync(transport, messages, expectedCount: 2, since: new DateTimeOffset(2024, 1, 2, 3, 4, 6, 789, TimeSpan.Zero)); + await streamedLog.StopAsync(); + + Assert.Equal(new[] { "2024-01-02T03:04:06.789Z second message", "2024-01-02T03:04:07.890Z third message" }, messages); + Assert.Equal(new DateTimeOffset(2024, 1, 2, 3, 4, 7, 890, TimeSpan.Zero), streamedLog.LastRedirectedAt); + } + + [Fact] + public async Task AStreamThatBreaksOffBeforeAnyDataEndsTheRedirectionWithoutFailingStop() + { + var transport = new MockTransport().QueueStreamBrokenAfter(string.Empty); + + var streamedLog = Client(transport).Run("run1").GetStreamedLog(_ => { }); + streamedLog.Start(); + await Task.Delay(100); + + await streamedLog.StopAsync(); + } + + [Fact] + public async Task AFailedReopenEndsTheRedirectionWithoutFailingStop() + { + var transport = new MockTransport() + .QueueStreamBrokenAfter("2024-01-02T03:04:05.678Z first message\n2024-01-02T03:04:06.789Z second") + .QueueError(); + + var messages = new List(); + var streamedLog = await StartAsync(transport, messages, expectedCount: 1); + await WaitForCallsAsync(transport, 2); + await streamedLog.StopAsync(); + + Assert.Equal(new[] { "2024-01-02T03:04:05.678Z first message" }, messages); + Assert.Equal(2, transport.CallCount); + } + + [Fact] + public async Task AReopenedStreamThatBreaksOffBeforeCatchingUpEndsTheRedirectionWithoutFailingStop() + { + var transport = new MockTransport() + .QueueStreamBrokenAfter("2024-01-02T03:04:05.678Z first message\n2024-01-02T03:04:06.789Z second\n2024-01-02T03:04:07.890Z third") + .QueueStreamBrokenAfter("2024-01-02T03:04:05.678Z first message\n") + .QueueResponse(200, LogBody); + + var messages = new List(); + var streamedLog = await StartAsync(transport, messages, expectedCount: 2); + await WaitForCallsAsync(transport, 2); + await streamedLog.StopAsync(); + + Assert.Equal(new[] { "2024-01-02T03:04:05.678Z first message", "2024-01-02T03:04:06.789Z second" }, messages); + Assert.Equal(2, transport.CallCount); + } + + [Fact] + public async Task ASinkThatAlwaysThrowsDoesNotFailStop() + { + var transport = new MockTransport().QueueResponse(200, LogBody); + + var calls = 0; + var original = Console.Error; + var warnings = new StringWriter(); + Console.SetError(warnings); + try + { + var streamedLog = Client(transport).Run("run1").GetStreamedLog(_ => throw new InvalidOperationException("sink failed" + ++calls)); + streamedLog.Start(); + await Task.Delay(100); + + await streamedLog.StopAsync(); + } + finally + { + Console.SetError(original); + } + + Assert.Equal(1, calls); + Assert.Contains("Log redirection stopped due to error: sink failed1", warnings.ToString(), StringComparison.Ordinal); + } + + [Fact] + public async Task ASinkThatThrowsOnceRedirectsNoMessageTwice() + { + var transport = new MockTransport().QueueResponse(200, LogBody); + + var messages = new List(); + var failed = false; + var streamedLog = Client(transport).Run("run1").GetStreamedLog( + m => + { + if (m.EndsWith("second message", StringComparison.Ordinal) && !failed) + { + failed = true; + throw new InvalidOperationException("sink failed"); + } + + messages.Add(m); + }); + streamedLog.Start(); + await Task.Delay(100); + + await streamedLog.StopAsync(); + + Assert.Equal(new[] { "2024-01-02T03:04:05.678Z first message" }, messages); + } }