Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ internal static partial class ActorsActorPutCommandApiCommand
Description = @"A list of categories that best define the Actor. Reflected in Apify Store's search and filtering options.",
};

private static Option<global::System.Collections.Generic.Dictionary<string, global::Apify.BuildTag?>?> TaggedBuilds { get; } = new(
private static Option<global::System.Collections.Generic.Dictionary<string, global::Apify.UpdatedBuildProperty?>?> TaggedBuilds { get; } = new(
name: @"--tagged-builds")
{
Description = @"A dictionary that maps tag names to specific builds. For details, see [Update build tags](#update-build-tags).",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Apify.CLI.Commands;

internal sealed record ScheduleCreateOptionSet(
internal sealed record CreateOrUpdateScheduleRequestOptionSet(
Option<string?> NameOption,
Option<bool?> IsEnabled,
Option<bool?> IsExclusive,
Expand All @@ -13,12 +13,12 @@ internal sealed record ScheduleCreateOptionSet(
Option<string?> DescriptionOption,
Option<string?> Title)
{
public static ScheduleCreateOptionSet Create(string? prefix = null)
public static CreateOrUpdateScheduleRequestOptionSet Create(string? prefix = null)
{
var normalizedPrefix = string.IsNullOrWhiteSpace(prefix)
? string.Empty
: prefix.Trim().Trim('-') + "-";
return new ScheduleCreateOptionSet(
return new CreateOrUpdateScheduleRequestOptionSet(
NameOption: new Option<string?>($"--{normalizedPrefix}name")
{
Description = @"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal static partial class DefaultKeyValueStoreActorRunKeyValueStorePutComman
{
Description = @"Actor run ID.",
};
private static readonly UpdateStoreRequestOptionSet UpdateStoreRequestOptionSetOptions = UpdateStoreRequestOptionSet.Create();
private static readonly UpdateKeyValueStoreRequestOptionSet UpdateKeyValueStoreRequestOptionSetOptions = UpdateKeyValueStoreRequestOptionSet.Create();
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
Expand Down Expand Up @@ -61,8 +61,8 @@ passed in the PUT payload.
This endpoint is a shortcut for getting the run's `defaultKeyValueStoreId` and then using the
[Update store](/api/v2/key-value-store-put) endpoint.
");
command.Arguments.Add(RunId); command.Options.Add(UpdateStoreRequestOptionSetOptions.NameOption);
command.Options.Add(UpdateStoreRequestOptionSetOptions.GeneralAccess);
command.Arguments.Add(RunId); command.Options.Add(UpdateKeyValueStoreRequestOptionSetOptions.NameOption);
command.Options.Add(UpdateKeyValueStoreRequestOptionSetOptions.GeneralAccess);
command.Options.Add(Input);
command.Options.Add(RequestJson);
command.Options.Add(RequestFile);
Expand All @@ -81,15 +81,15 @@ [Update store](/api/v2/key-value-store-put) endpoint.
command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) =>
await CliRuntime.RunAsync(async () =>
{
var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync<global::Apify.UpdateStoreRequest>(
var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync<global::Apify.UpdateKeyValueStoreRequest>(
parseResult,
Input,
RequestJson,
RequestFile,
global::Apify.SourceGenerationContext.Default,
cancellationToken).ConfigureAwait(false);
var runId = parseResult.GetRequiredValue(RunId); var name = CliRuntime.WasSpecified(parseResult, UpdateStoreRequestOptionSetOptions.NameOption) ? parseResult.GetValue(UpdateStoreRequestOptionSetOptions.NameOption) : (__requestBase is { } __NameBaseValue ? __NameBaseValue.Name : default);
var generalAccess = CliRuntime.WasSpecified(parseResult, UpdateStoreRequestOptionSetOptions.GeneralAccess) ? parseResult.GetValue(UpdateStoreRequestOptionSetOptions.GeneralAccess) : (__requestBase is { } __GeneralAccessBaseValue ? __GeneralAccessBaseValue.GeneralAccess : default);
var runId = parseResult.GetRequiredValue(RunId); var name = CliRuntime.WasSpecified(parseResult, UpdateKeyValueStoreRequestOptionSetOptions.NameOption) ? parseResult.GetValue(UpdateKeyValueStoreRequestOptionSetOptions.NameOption) : (__requestBase is { } __NameBaseValue ? __NameBaseValue.Name : default);
var generalAccess = CliRuntime.WasSpecified(parseResult, UpdateKeyValueStoreRequestOptionSetOptions.GeneralAccess) ? parseResult.GetValue(UpdateKeyValueStoreRequestOptionSetOptions.GeneralAccess) : (__requestBase is { } __GeneralAccessBaseValue ? __GeneralAccessBaseValue.GeneralAccess : default);
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ determine whether the queue was accessed by multiple clients. If
",
};

private static string FormatResponse(ParseResult parseResult, global::Apify.HeadResponse value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
private static string FormatResponse(ParseResult parseResult, global::Apify.RequestQueueHeadResponse value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
{
string? text = null;
CustomizeResponseText(parseResult, value, ref text);
Expand All @@ -48,7 +48,7 @@ private static string FormatResponse(ParseResult parseResult, global::Apify.Head
return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints);
}

static partial void CustomizeResponseText(ParseResult parseResult, global::Apify.HeadResponse value, ref string? text);
static partial void CustomizeResponseText(ParseResult parseResult, global::Apify.RequestQueueHeadResponse value, ref string? text);
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ determine whether the queue was accessed by multiple clients. If
",
};

private static string FormatResponse(ParseResult parseResult, global::Apify.HeadAndLockResponse value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
private static string FormatResponse(ParseResult parseResult, global::Apify.LockedRequestQueueHeadResponse value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
{
string? text = null;
CustomizeResponseText(parseResult, value, ref text);
Expand All @@ -55,7 +55,7 @@ private static string FormatResponse(ParseResult parseResult, global::Apify.Head
return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints);
}

static partial void CustomizeResponseText(ParseResult parseResult, global::Apify.HeadAndLockResponse value, ref string? text);
static partial void CustomizeResponseText(ParseResult parseResult, global::Apify.LockedRequestQueueHeadResponse value, ref string? text);
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ await CliRuntime.RunAsync(async () =>
var runId = parseResult.GetRequiredValue(RunId);
var contentType = parseResult.GetRequiredValue(ContentType);
var clientKey = parseResult.GetValue(ClientKey);
var request = await CliRuntime.ReadRequestAsync<global::System.Collections.Generic.IList<global::Apify.RequestDraftDelete>>(
var request = await CliRuntime.ReadRequestAsync<global::System.Collections.Generic.IList<global::Apify.RequestToDelete>>(
parseResult,
Input,
RequestJson,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal static partial class LastActorRunSDefaultKeyValueStoreActorRunsLastKeyV
{
Description = @"Filter for the run origin, i.e. the means by which the run was started.",
};
private static readonly UpdateStoreRequestOptionSet UpdateStoreRequestOptionSetOptions = UpdateStoreRequestOptionSet.Create();
private static readonly UpdateKeyValueStoreRequestOptionSet UpdateKeyValueStoreRequestOptionSetOptions = UpdateKeyValueStoreRequestOptionSet.Create();
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
Expand Down Expand Up @@ -75,8 +75,8 @@ [Update store](/api/v2/key-value-store-put) endpoint.
");
command.Arguments.Add(ActorId);
command.Options.Add(Status);
command.Options.Add(Origin); command.Options.Add(UpdateStoreRequestOptionSetOptions.NameOption);
command.Options.Add(UpdateStoreRequestOptionSetOptions.GeneralAccess);
command.Options.Add(Origin); command.Options.Add(UpdateKeyValueStoreRequestOptionSetOptions.NameOption);
command.Options.Add(UpdateKeyValueStoreRequestOptionSetOptions.GeneralAccess);
command.Options.Add(Input);
command.Options.Add(RequestJson);
command.Options.Add(RequestFile);
Expand All @@ -95,7 +95,7 @@ [Update store](/api/v2/key-value-store-put) endpoint.
command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) =>
await CliRuntime.RunAsync(async () =>
{
var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync<global::Apify.UpdateStoreRequest>(
var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync<global::Apify.UpdateKeyValueStoreRequest>(
parseResult,
Input,
RequestJson,
Expand All @@ -104,8 +104,8 @@ await CliRuntime.RunAsync(async () =>
cancellationToken).ConfigureAwait(false);
var actorId = parseResult.GetRequiredValue(ActorId);
var status = parseResult.GetValue(Status);
var origin = parseResult.GetValue(Origin); var name = CliRuntime.WasSpecified(parseResult, UpdateStoreRequestOptionSetOptions.NameOption) ? parseResult.GetValue(UpdateStoreRequestOptionSetOptions.NameOption) : (__requestBase is { } __NameBaseValue ? __NameBaseValue.Name : default);
var generalAccess = CliRuntime.WasSpecified(parseResult, UpdateStoreRequestOptionSetOptions.GeneralAccess) ? parseResult.GetValue(UpdateStoreRequestOptionSetOptions.GeneralAccess) : (__requestBase is { } __GeneralAccessBaseValue ? __GeneralAccessBaseValue.GeneralAccess : default);
var origin = parseResult.GetValue(Origin); var name = CliRuntime.WasSpecified(parseResult, UpdateKeyValueStoreRequestOptionSetOptions.NameOption) ? parseResult.GetValue(UpdateKeyValueStoreRequestOptionSetOptions.NameOption) : (__requestBase is { } __NameBaseValue ? __NameBaseValue.Name : default);
var generalAccess = CliRuntime.WasSpecified(parseResult, UpdateKeyValueStoreRequestOptionSetOptions.GeneralAccess) ? parseResult.GetValue(UpdateKeyValueStoreRequestOptionSetOptions.GeneralAccess) : (__requestBase is { } __GeneralAccessBaseValue ? __GeneralAccessBaseValue.GeneralAccess : default);
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ determine whether the queue was accessed by multiple clients. If
",
};

private static string FormatResponse(ParseResult parseResult, global::Apify.HeadResponse value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
private static string FormatResponse(ParseResult parseResult, global::Apify.RequestQueueHeadResponse value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
{
string? text = null;
CustomizeResponseText(parseResult, value, ref text);
Expand All @@ -60,7 +60,7 @@ private static string FormatResponse(ParseResult parseResult, global::Apify.Head
return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints);
}

static partial void CustomizeResponseText(ParseResult parseResult, global::Apify.HeadResponse value, ref string? text);
static partial void CustomizeResponseText(ParseResult parseResult, global::Apify.RequestQueueHeadResponse value, ref string? text);
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ determine whether the queue was accessed by multiple clients. If
",
};

private static string FormatResponse(ParseResult parseResult, global::Apify.HeadAndLockResponse value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
private static string FormatResponse(ParseResult parseResult, global::Apify.LockedRequestQueueHeadResponse value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
{
string? text = null;
CustomizeResponseText(parseResult, value, ref text);
Expand All @@ -67,7 +67,7 @@ private static string FormatResponse(ParseResult parseResult, global::Apify.Head
return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints);
}

static partial void CustomizeResponseText(ParseResult parseResult, global::Apify.HeadAndLockResponse value, ref string? text);
static partial void CustomizeResponseText(ParseResult parseResult, global::Apify.LockedRequestQueueHeadResponse value, ref string? text);
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ await CliRuntime.RunAsync(async () =>
var origin = parseResult.GetValue(Origin);
var contentType = parseResult.GetRequiredValue(ContentType);
var clientKey = parseResult.GetValue(ClientKey);
var request = await CliRuntime.ReadRequestAsync<global::System.Collections.Generic.IList<global::Apify.RequestDraftDelete>>(
var request = await CliRuntime.ReadRequestAsync<global::System.Collections.Generic.IList<global::Apify.RequestToDelete>>(
parseResult,
Input,
RequestJson,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal static partial class LastActorTaskRunSDefaultKeyValueStoreActorTaskRuns
{
Description = @"Filter for the run origin, i.e. the means by which the run was started.",
};
private static readonly UpdateStoreRequestOptionSet UpdateStoreRequestOptionSetOptions = UpdateStoreRequestOptionSet.Create();
private static readonly UpdateKeyValueStoreRequestOptionSet UpdateKeyValueStoreRequestOptionSetOptions = UpdateKeyValueStoreRequestOptionSet.Create();
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
Expand Down Expand Up @@ -74,8 +74,8 @@ [Update store](/api/v2/key-value-store-put) endpoint.
");
command.Arguments.Add(ActorTaskId);
command.Options.Add(Status);
command.Options.Add(Origin); command.Options.Add(UpdateStoreRequestOptionSetOptions.NameOption);
command.Options.Add(UpdateStoreRequestOptionSetOptions.GeneralAccess);
command.Options.Add(Origin); command.Options.Add(UpdateKeyValueStoreRequestOptionSetOptions.NameOption);
command.Options.Add(UpdateKeyValueStoreRequestOptionSetOptions.GeneralAccess);
command.Options.Add(Input);
command.Options.Add(RequestJson);
command.Options.Add(RequestFile);
Expand All @@ -94,7 +94,7 @@ [Update store](/api/v2/key-value-store-put) endpoint.
command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) =>
await CliRuntime.RunAsync(async () =>
{
var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync<global::Apify.UpdateStoreRequest>(
var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync<global::Apify.UpdateKeyValueStoreRequest>(
parseResult,
Input,
RequestJson,
Expand All @@ -103,8 +103,8 @@ await CliRuntime.RunAsync(async () =>
cancellationToken).ConfigureAwait(false);
var actorTaskId = parseResult.GetRequiredValue(ActorTaskId);
var status = parseResult.GetValue(Status);
var origin = parseResult.GetValue(Origin); var name = CliRuntime.WasSpecified(parseResult, UpdateStoreRequestOptionSetOptions.NameOption) ? parseResult.GetValue(UpdateStoreRequestOptionSetOptions.NameOption) : (__requestBase is { } __NameBaseValue ? __NameBaseValue.Name : default);
var generalAccess = CliRuntime.WasSpecified(parseResult, UpdateStoreRequestOptionSetOptions.GeneralAccess) ? parseResult.GetValue(UpdateStoreRequestOptionSetOptions.GeneralAccess) : (__requestBase is { } __GeneralAccessBaseValue ? __GeneralAccessBaseValue.GeneralAccess : default);
var origin = parseResult.GetValue(Origin); var name = CliRuntime.WasSpecified(parseResult, UpdateKeyValueStoreRequestOptionSetOptions.NameOption) ? parseResult.GetValue(UpdateKeyValueStoreRequestOptionSetOptions.NameOption) : (__requestBase is { } __NameBaseValue ? __NameBaseValue.Name : default);
var generalAccess = CliRuntime.WasSpecified(parseResult, UpdateKeyValueStoreRequestOptionSetOptions.GeneralAccess) ? parseResult.GetValue(UpdateKeyValueStoreRequestOptionSetOptions.GeneralAccess) : (__requestBase is { } __GeneralAccessBaseValue ? __GeneralAccessBaseValue.GeneralAccess : default);
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


Expand Down
Loading
Loading