@php
$parameters[] = [
'name' => 'url',
'type' => $type,
'format' => 'string',
'description' => __('Destination URL') . '.'
];
if($type) {
$parameters[] = [
'name' => 'domain_id',
'type' => 1,
'format' => 'integer',
'description' => __('Domain ID') . '.'
];
}
$parameters[] = [
'name' => 'alias',
'type' => 0,
'format' => 'string',
'description' => __('Alias') . '.'
];
$parameters[] = [
'name' => 'space_id',
'type' => 0,
'format' => 'integer',
'description' => __('Space ID') . '.'
];
$parameters[] = [
'name' => 'pixel_ids[]',
'type' => 0,
'format' => 'array',
'description' => __('Pixel IDs') . '.'
];
$parameters[] = [
'name' => 'redirect_password',
'type' => 0,
'format' => 'string',
'description' => __('Redirect password') . '.'
];
$parameters[] = [
'name' => 'sensitive_content',
'type' => 0,
'format' => 'integer',
'description' => __('Sensitive content') . '. ' . __('Possible values are: :values.', [
'values' => implode(', ', [
__(':value for :name', ['value' => '0', 'name' => ''.__('No').'']),
__(':value for :name', ['value' => '1', 'name' => ''.__('Yes').''])
])
]) . ($type ? ' ' . __('Defaults to: :value.', ['value' => '0']) : '')
];
$parameters[] = [
'name' => 'privacy',
'type' => 0,
'format' => 'integer',
'description' => __('Stats privacy') . '. ' . __('Possible values are: :values.', [
'values' => implode(', ', [
__(':value for :name', ['value' => '0', 'name' => ''.__('Public').'']),
__(':value for :name', ['value' => '1', 'name' => ''.__('Private').'']),
__(':value for :name', ['value' => '2', 'name' => ''.__('Password').''])
])
]) . ($type ? ' ' . __('Defaults to: :value.', ['value' => '0']) : '')
];
$parameters[] = [
'name' => 'password',
'type' => 0,
'format' => 'string',
'description' => __('Stats password') . '. ' . __('Only works with :field field set to :value.', ['field' => 'privacy', 'value' => '2'])
];
$parameters[] = [
'name' => 'active_period_start_at',
'type' => 0,
'format' => 'string',
'description' => __('Active period starting date in :format format.', ['format' => 'Y-m-d H:i'])
];
$parameters[] = [
'name' => 'active_period_end_at',
'type' => 0,
'format' => 'string',
'description' => __('Active period ending date in :format format.', ['format' => 'Y-m-d H:i'])
];
$parameters[] = [
'name' => 'clicks_limit',
'type' => 0,
'format' => 'integer',
'description' => __('Clicks limit') . '.'
];
$parameters[] = [
'name' => 'expiration_url',
'type' => 0,
'format' => 'string',
'description' => __('Expiration URL') . '.'
];
$parameters[] = [
'name' => 'targets_type',
'type' => 0,
'format' => 'string',
'description' => __('Targeting') . '. ' . __('Possible values are: :values.', [
'values' => implode(', ', array_map(function($value, $name) { return __(':value for :name', ['value' => '' . $value . '', 'name' => '' . $name . '']); }, array_keys(config('targets')), config('targets')))])
];
$parameters[] = [
'name' => 'targets[index][key]',
'type' => 0,
'format' => 'string',
'description' =>
__('For :field, the value must be in :format format.', ['field' => 'targets_type=country', 'format' => 'ISO 3166-1 alpha-2']) . '
' .
__('For :field, the possible values are :values.', ['field' => 'targets_type=operating_systems', 'values' => ''.implode(', ', config('operating_systems'))]) . '
' .
__('For :field, the possible values are: :values.', ['field' => 'targets_type=browsers', 'values' => ''.implode(', ', config('browsers'))]) . '
' .
__('For :field, the possible values are: :values.', ['field' => 'targets_type=devices', 'values' => ''.implode(', ', config('devices'))]) . '
' .
__('For :field, the value must be in :format format.', ['field' => 'targets_type=languages', 'format' => 'ISO 639-1 alpha-2']) . '
' .
__('For :field, the possible values are: :values.', ['field' => 'targets_type=continents', 'values' => implode(', ', array_map(function($value, $name) { return __(':value for :name', ['value' => '' . $value . '', 'name' => '' . $name . '']); }, array_keys(config('continents')), config('continents')))]) . '
'
];
$parameters[] = [
'name' => 'targets[index][value]',
'type' => 0,
'format' => 'string',
'description' => __('Destination URL') . '.'
];
@endphp
@include('developers.parameters')