Skip to content

Commit 764376f

Browse files
author
stlc-bot
committed
fix(access-policies): tell callers to drop policies when the feature is off (#3090)
Stainless-Generated-From: 7f8dacd805a98217000acf20c2177f0660931c5a
1 parent 5a543dc commit 764376f

24 files changed

Lines changed: 48 additions & 48 deletions

‎src/Batch/BatchSubmitParams.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ final class BatchSubmitParams implements BaseModel
4747
public Scrape|Crawl $input;
4848

4949
/**
50-
* Access policy IDs to apply to every page. A URL must pass every policy.
50+
* Access policy IDs to apply to every page. A URL must pass every policy. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
5151
*
5252
* @var list<string>|null $policies
5353
*/
@@ -144,7 +144,7 @@ public function withInput(Scrape|array|Crawl $input): self
144144
}
145145

146146
/**
147-
* Access policy IDs to apply to every page. A URL must pass every policy.
147+
* Access policy IDs to apply to every page. A URL must pass every policy. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
148148
*
149149
* @param list<string> $policies
150150
*/

‎src/Brand/BrandRetrieveParams.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ final class BrandRetrieveParams implements BaseModel
8787
public ?bool $maxSpeed;
8888

8989
/**
90-
* Access policy IDs to apply. A URL must pass every policy.
90+
* Access policy IDs to apply. A URL must pass every policy. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
9191
*
9292
* @var list<string>|null $policies
9393
*/
@@ -348,7 +348,7 @@ public function withMaxSpeed(bool $maxSpeed): self
348348
}
349349

350350
/**
351-
* Access policy IDs to apply. A URL must pass every policy.
351+
* Access policy IDs to apply. A URL must pass every policy. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
352352
*
353353
* @param list<string> $policies
354354
*/

‎src/Monitors/MonitorCreateParams.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ final class MonitorCreateParams implements BaseModel
8181
public ?string $mode;
8282

8383
/**
84-
* Access policy IDs to apply to every run.
84+
* Access policy IDs to apply to every run. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
8585
*
8686
* @var list<string>|null $policies
8787
*/
@@ -218,7 +218,7 @@ public function withMode(Mode|string $mode): self
218218
}
219219

220220
/**
221-
* Access policy IDs to apply to every run.
221+
* Access policy IDs to apply to every run. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
222222
*
223223
* @param list<string> $policies
224224
*/

‎src/Monitors/MonitorUpdateParams.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ final class MonitorUpdateParams implements BaseModel
6464
public ?string $name;
6565

6666
/**
67-
* Access policy IDs to apply to every run. Send an empty list to remove them.
67+
* Access policy IDs to apply to every run. Send an empty list to remove them. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
6868
*
6969
* @var list<string>|null $policies
7070
*/
@@ -175,7 +175,7 @@ public function withName(string $name): self
175175
}
176176

177177
/**
178-
* Access policy IDs to apply to every run. Send an empty list to remove them.
178+
* Access policy IDs to apply to every run. Send an empty list to remove them. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
179179
*
180180
* @param list<string> $policies
181181
*/

‎src/News/NewsSearchParams.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ final class NewsSearchParams implements BaseModel
6868
public ?int $limit;
6969

7070
/**
71-
* Access policy IDs to apply. A URL must pass every policy.
71+
* Access policy IDs to apply. A URL must pass every policy. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
7272
*
7373
* @var list<string>|null $policies
7474
*/
@@ -192,7 +192,7 @@ public function withLimit(int $limit): self
192192
}
193193

194194
/**
195-
* Access policy IDs to apply. A URL must pass every policy.
195+
* Access policy IDs to apply. A URL must pass every policy. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
196196
*
197197
* @param list<string> $policies
198198
*/

‎src/ServiceContracts/BatchContract.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function getResults(
111111
* @api
112112
*
113113
* @param InputShape $input body param: Choose a URL list or a site crawl
114-
* @param list<string> $policies Body param: Access policy IDs to apply to every page. A URL must pass every policy.
114+
* @param list<string> $policies Body param: Access policy IDs to apply to every page. A URL must pass every policy. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
115115
* @param list<string> $tags Body param: Tags stored on the batch. Filter the batch list by them later.
116116
* @param Webhook|WebhookShape $webhook Body param: Where to send the batch's final-status event. Omit `retry` for one attempt; `{}` uses the default retry schedule.
117117
* @param string $webhookURL Body param: Legacy URL notified when the batch finishes. Preserves one best-effort attempt. Cannot be combined with webhook.

‎src/ServiceContracts/BrandContract.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ interface BrandContract
3939
* @param ForceLanguage|value-of<ForceLanguage>|null $forceLanguage
4040
* @param int $maxAgeMs Maximum age of cached brand data in ms. Defaults to 3 months; clamped to 0–1 year. `0` refreshes.
4141
* @param bool $maxSpeed Optional parameter to optimize the API call for maximum speed. When set to true, the API will skip time-consuming operations for faster response at the cost of less comprehensive data.
42-
* @param list<string> $policies Access policy IDs to apply. A URL must pass every policy.
42+
* @param list<string> $policies Access policy IDs to apply. A URL must pass every policy. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
4343
* @param list<string> $tags labels for filtering usage in the dashboard
4444
* @param TimeoutOpts|TimeoutOptsShape $timeoutOpts request deadline and what to return when it passes
4545
* @param Zdr|value-of<Zdr> $zdr `enabled` disables request logs and traces and omits request and response content from usage logs. Brand data and hosted assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.

‎src/ServiceContracts/MonitorsContract.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ interface MonitorsContract
5656
* @param TargetShape $target what to watch: a page, a sitemap, data extracted from a site, or web search results
5757
* @param ChangeDetectionShape $changeDetection How changes are judged. Defaults to `semantic` for extract and search targets and page targets with `instructions`, otherwise `exact`.
5858
* @param Mode|value-of<Mode> $mode Always `web`. Optional.
59-
* @param list<string> $policies access policy IDs to apply to every run
59+
* @param list<string> $policies Access policy IDs to apply to every run. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
6060
* @param Schedule|ScheduleShape $schedule Run the monitor on a fixed interval defined by a frequency and a unit, e.g. every 6 hours or every 2 days. The total interval (frequency × unit) must be between 10 minutes and 1 year.
6161
* @param list<string> $tags labels for filtering monitors, their changes, and their usage
6262
* @param Webhook|WebhookShape|null $webhook Webhook destination and delivery settings. Null means no webhook is configured.
@@ -95,7 +95,7 @@ public function retrieve(
9595
* @param string $monitorID ID of the monitor
9696
* @param ChangeDetectionShape1 $changeDetection How changes are judged. Defaults to `semantic` for extract and search targets and page targets with `instructions`, otherwise `exact`.
9797
* @param string $name display name for the monitor
98-
* @param list<string> $policies Access policy IDs to apply to every run. Send an empty list to remove them.
98+
* @param list<string> $policies Access policy IDs to apply to every run. Send an empty list to remove them. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
9999
* @param \ContextDev\Monitors\MonitorUpdateParams\Schedule|ScheduleShape1 $schedule Run the monitor on a fixed interval defined by a frequency and a unit, e.g. every 6 hours or every 2 days. The total interval (frequency × unit) must be between 10 minutes and 1 year.
100100
* @param Status|value-of<Status> $status set `paused` to stop scheduled runs or `active` to resume them
101101
* @param list<string> $tags labels for filtering monitors, their changes, and their usage

‎src/ServiceContracts/NewsContract.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface NewsContract
2727
* @param string|null $cursor opaque next_cursor from the previous response, or null for the first page
2828
* @param FilterBy|FilterByShape $filterBy Optional result filters. Use at most one of sourceDomain, sourceCountry, articleLanguage, or articleType. A date range may accompany that category; date.from must not exceed date.to.
2929
* @param int $limit Maximum results to return. Defaults to 10.
30-
* @param list<string> $policies Access policy IDs to apply. A URL must pass every policy.
30+
* @param list<string> $policies Access policy IDs to apply. A URL must pass every policy. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
3131
* @param SortBy|SortByShape $sortBy Result ordering. Defaults to newest for entity searches. Natural-language searches are always ordered by relevance.
3232
* @param list<string> $tags labels for filtering usage in the dashboard
3333
* @param RequestOpts|null $requestOptions

‎src/ServiceContracts/UtilityContract.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface UtilityContract
2424
*
2525
* @param IdentifierShape $identifier Identifier of the target to prefetch. Provide exactly one of domain or email.
2626
* @param Type|value-of<Type> $type data to prefetch
27-
* @param list<string> $policies Access policy IDs to apply. A URL must pass every policy.
27+
* @param list<string> $policies Access policy IDs to apply. A URL must pass every policy. Leave it out unless access policies are enabled for your organization; otherwise the request fails with `ACCESS_POLICIES_NOT_ENABLED`.
2828
* @param list<string> $tags labels for filtering usage in the dashboard
2929
* @param TimeoutOpts|TimeoutOptsShape $timeoutOpts request deadline and what to return when it passes
3030
* @param RequestOpts|null $requestOptions

0 commit comments

Comments
 (0)