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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/context.dev-php' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
Expand All @@ -37,7 +37,7 @@ jobs:
test:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/context.dev-php' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.4.0"
".": "2.5.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 30
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-fb56935a194e69348fecd985f7cf8b249795b46af2fb32f6c5c8ef648cf10c15.yml
openapi_spec_hash: 7260a560474283b7ad6ac5d426058ac9
config_hash: daabb160675d86b354711da1e77e5129
configured_endpoints: 32
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-242450ea46eb8c3e843fd6c4bf87e73192b5f62f6da697cd091d13c6aa7a991b.yml
openapi_spec_hash: c1c561976de1abcacede71fd5ab9b3d9
config_hash: 70e7e80b5e87f94981bee396c6cd41e8
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 2.5.0 (2026-07-22)

Full Changelog: [v2.4.0...v2.5.0](https://github.com/context-dot-dev/context-php-sdk/compare/v2.4.0...v2.5.0)

### Features

* **api:** api update ([010f4c0](https://github.com/context-dot-dev/context-php-sdk/commit/010f4c0c535137516b46f722b1d768422d4107b8))
* **api:** api update ([b81393a](https://github.com/context-dot-dev/context-php-sdk/commit/b81393a0e2ad8b2e184555a4cbefff55c9f78085))
* **api:** api update ([31e96ec](https://github.com/context-dot-dev/context-php-sdk/commit/31e96ec38f5746807e2d0bb2a58d5fee86e628c9))
* **api:** api update ([c0beeca](https://github.com/context-dot-dev/context-php-sdk/commit/c0beecafa76546b693bc4fc21ba2a5d866c3a800))
* **api:** api update ([4545026](https://github.com/context-dot-dev/context-php-sdk/commit/454502638c42c3f616a4b05182ccfadbedc4094e))
* **api:** api update ([ea009c4](https://github.com/context-dot-dev/context-php-sdk/commit/ea009c4ebae36d4f2fbe2bf2bccce55f0148dfe8))
* **api:** api update ([8e18458](https://github.com/context-dot-dev/context-php-sdk/commit/8e18458a35402f1b085547b472601a563c77ae5b))
* **api:** manual updates ([e6af5a4](https://github.com/context-dot-dev/context-php-sdk/commit/e6af5a4a974d252d12b03fa44e0e4258dd217412))
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([ffd1499](https://github.com/context-dot-dev/context-php-sdk/commit/ffd14997114f4bfc701996334a6d39a479f17b2f))

## 2.4.0 (2026-07-12)

Full Changelog: [v2.3.0...v2.4.0](https://github.com/context-dot-dev/context-php-sdk/compare/v2.3.0...v2.4.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The REST API documentation can be found on [docs.context.dev](https://docs.conte
<!-- x-release-please-start-version -->

```
composer require "context-dev/context-dev-php 2.4.0"
composer require "context-dev/context-dev-php 2.5.0"
```

<!-- x-release-please-end -->
Expand Down
30 changes: 29 additions & 1 deletion src/AI/AIExtractProductParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
* @see ContextDev\Services\AIService::extractProduct()
*
* @phpstan-type AIExtractProductParamsShape = array{
* url: string, maxAgeMs?: int|null, timeoutMs?: int|null
* url: string,
* maxAgeMs?: int|null,
* tags?: list<string>|null,
* timeoutMs?: int|null,
* }
*/
final class AIExtractProductParams implements BaseModel
Expand All @@ -37,6 +40,14 @@ final class AIExtractProductParams implements BaseModel
#[Optional]
public ?int $maxAgeMs;

/**
* Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
*
* @var list<string>|null $tags
*/
#[Optional(list: 'string')]
public ?array $tags;

/**
* Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).
*/
Expand Down Expand Up @@ -66,17 +77,21 @@ public function __construct()
* Construct an instance from the required parameters.
*
* You must use named parameters to construct any parameters with a default value.
*
* @param list<string>|null $tags
*/
public static function with(
string $url,
?int $maxAgeMs = null,
?array $tags = null,
?int $timeoutMs = null
): self {
$self = new self;

$self['url'] = $url;

null !== $maxAgeMs && $self['maxAgeMs'] = $maxAgeMs;
null !== $tags && $self['tags'] = $tags;
null !== $timeoutMs && $self['timeoutMs'] = $timeoutMs;

return $self;
Expand Down Expand Up @@ -104,6 +119,19 @@ public function withMaxAgeMs(int $maxAgeMs): self
return $self;
}

/**
* Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
*
* @param list<string> $tags
*/
public function withTags(array $tags): self
{
$self = clone $this;
$self['tags'] = $tags;

return $self;
}

/**
* Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).
*/
Expand Down
26 changes: 26 additions & 0 deletions src/AI/AIExtractProductsParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* domain: string,
* maxAgeMs?: int|null,
* maxProducts?: int|null,
* tags?: list<string>|null,
* timeoutMs?: int|null,
* directURL: string,
* }
Expand Down Expand Up @@ -47,6 +48,14 @@ final class AIExtractProductsParams implements BaseModel
#[Optional]
public ?int $maxProducts;

/**
* Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
*
* @var list<string>|null $tags
*/
#[Optional(list: 'string')]
public ?array $tags;

/**
* Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).
*/
Expand Down Expand Up @@ -82,12 +91,15 @@ public function __construct()
* Construct an instance from the required parameters.
*
* You must use named parameters to construct any parameters with a default value.
*
* @param list<string>|null $tags
*/
public static function with(
string $domain,
string $directURL,
?int $maxAgeMs = null,
?int $maxProducts = null,
?array $tags = null,
?int $timeoutMs = null,
): self {
$self = new self;
Expand All @@ -97,6 +109,7 @@ public static function with(

null !== $maxAgeMs && $self['maxAgeMs'] = $maxAgeMs;
null !== $maxProducts && $self['maxProducts'] = $maxProducts;
null !== $tags && $self['tags'] = $tags;
null !== $timeoutMs && $self['timeoutMs'] = $timeoutMs;

return $self;
Expand Down Expand Up @@ -135,6 +148,19 @@ public function withMaxProducts(int $maxProducts): self
return $self;
}

/**
* Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
*
* @param list<string> $tags
*/
public function withTags(array $tags): self
{
$self = clone $this;
$self['tags'] = $tags;

return $self;
}

/**
* Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Brand/BrandGetResponse/Brand.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ final class Brand implements BaseModel
public ?string $phone;

/**
* The primary language of the brand's website content. Detected from the HTML lang tag, page content analysis, or social media descriptions.
* Language to force for the retrieved brand data.
*
* @var value-of<PrimaryLanguage>|null $primaryLanguage
*/
Expand Down Expand Up @@ -353,7 +353,7 @@ public function withPhone(string $phone): self
}

/**
* The primary language of the brand's website content. Detected from the HTML lang tag, page content analysis, or social media descriptions.
* Language to force for the retrieved brand data.
*
* @param PrimaryLanguage|value-of<PrimaryLanguage>|null $primaryLanguage
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ enum Subindustry: string

case CREATOR_ECONOMY_INFLUENCER_PLATFORMS = 'Creator Economy & Influencer Platforms';

case ADVERTISING_ADTECH_MEDIA_BUYING = 'Advertising, Adtech & Media Buying';

case FILM_TV_PRODUCTION_STUDIOS = 'Film, TV & Production Studios';

case EVENTS_VENUES_LIVE_ENTERTAINMENT = 'Events, Venues & Live Entertainment';
Expand Down Expand Up @@ -231,6 +229,8 @@ enum Subindustry: string

case NEWS_PUBLISHING_JOURNALISM = 'News Publishing & Journalism';

case ADVERTISING_ADTECH_MEDIA_BUYING = 'Advertising, Adtech & Media Buying';

case DIGITAL_MEDIA_CONTENT_PLATFORMS = 'Digital Media & Content Platforms';

case BROADCASTING_TV_RADIO = 'Broadcasting (TV & Radio)';
Expand Down
2 changes: 1 addition & 1 deletion src/Brand/BrandGetResponse/Brand/PrimaryLanguage.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace ContextDev\Brand\BrandGetResponse\Brand;

/**
* The primary language of the brand's website content. Detected from the HTML lang tag, page content analysis, or social media descriptions.
* Language to force for the retrieved brand data.
*/
enum PrimaryLanguage: string
{
Expand Down
Loading
Loading