Skip to content

Commit e0c9361

Browse files
authored
Merge pull request #30 from brand-dot-dev/release-please--branches--main--changes--next
release: 0.1.0-alpha.28
2 parents f04df40 + a5e4e1c commit e0c9361

File tree

14 files changed

+200
-83
lines changed

14 files changed

+200
-83
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.27"
2+
".": "0.1.0-alpha.28"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 15
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-737dbedd830e2c989387e90a9bb5baa3915306ecfef2e46b09d02cb1879f043c.yml
3-
openapi_spec_hash: 7bc21f4c6d5fd39c1a3b22626846ca87
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-73562e26b663cf10185b9e98966accf5f151c6d3cf99b5e060ce5a847045e383.yml
3+
openapi_spec_hash: bf5994966b84f9dda998ad5059ff8318
44
config_hash: 6f10592c7d0c3bafefc1271472283217

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 0.1.0-alpha.28 (2026-02-07)
4+
5+
Full Changelog: [v0.1.0-alpha.27...v0.1.0-alpha.28](https://github.com/brand-dot-dev/java-sdk/compare/v0.1.0-alpha.27...v0.1.0-alpha.28)
6+
7+
### Features
8+
9+
* **api:** api update ([e826166](https://github.com/brand-dot-dev/java-sdk/commit/e826166942dc6320cfdce18d760785d60eb83bb0))
10+
11+
12+
### Chores
13+
14+
* **internal:** upgrade AssertJ ([2656e0a](https://github.com/brand-dot-dev/java-sdk/commit/2656e0ae35284ad0f03187f0d58134162ab81a01))
15+
316
## 0.1.0-alpha.27 (2026-02-02)
417

518
Full Changelog: [v0.1.0-alpha.26...v0.1.0-alpha.27](https://github.com/brand-dot-dev/java-sdk/compare/v0.1.0-alpha.26...v0.1.0-alpha.27)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<!-- x-release-please-start-version -->
44

5-
[![Maven Central](https://img.shields.io/maven-central/v/com.branddev.api/brand-dev-java)](https://central.sonatype.com/artifact/com.branddev.api/brand-dev-java/0.1.0-alpha.27)
6-
[![javadoc](https://javadoc.io/badge2/com.branddev.api/brand-dev-java/0.1.0-alpha.27/javadoc.svg)](https://javadoc.io/doc/com.branddev.api/brand-dev-java/0.1.0-alpha.27)
5+
[![Maven Central](https://img.shields.io/maven-central/v/com.branddev.api/brand-dev-java)](https://central.sonatype.com/artifact/com.branddev.api/brand-dev-java/0.1.0-alpha.28)
6+
[![javadoc](https://javadoc.io/badge2/com.branddev.api/brand-dev-java/0.1.0-alpha.28/javadoc.svg)](https://javadoc.io/doc/com.branddev.api/brand-dev-java/0.1.0-alpha.28)
77

88
<!-- x-release-please-end -->
99

@@ -22,7 +22,7 @@ Use the Brand Dev MCP Server to enable AI assistants to interact with this API,
2222
2323
<!-- x-release-please-start-version -->
2424

25-
The REST API documentation can be found on [docs.brand.dev](https://docs.brand.dev/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.branddev.api/brand-dev-java/0.1.0-alpha.27).
25+
The REST API documentation can be found on [docs.brand.dev](https://docs.brand.dev/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.branddev.api/brand-dev-java/0.1.0-alpha.28).
2626

2727
<!-- x-release-please-end -->
2828

@@ -33,7 +33,7 @@ The REST API documentation can be found on [docs.brand.dev](https://docs.brand.d
3333
### Gradle
3434

3535
```kotlin
36-
implementation("com.branddev.api:brand-dev-java:0.1.0-alpha.27")
36+
implementation("com.branddev.api:brand-dev-java:0.1.0-alpha.28")
3737
```
3838

3939
### Maven
@@ -42,7 +42,7 @@ implementation("com.branddev.api:brand-dev-java:0.1.0-alpha.27")
4242
<dependency>
4343
<groupId>com.branddev.api</groupId>
4444
<artifactId>brand-dev-java</artifactId>
45-
<version>0.1.0-alpha.27</version>
45+
<version>0.1.0-alpha.28</version>
4646
</dependency>
4747
```
4848

brand-dev-java-client-okhttp/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ dependencies {
1010
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
1111

1212
testImplementation(kotlin("test"))
13-
testImplementation("org.assertj:assertj-core:3.25.3")
13+
testImplementation("org.assertj:assertj-core:3.27.7")
1414
testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.2")
1515
}

brand-dev-java-core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies {
3333
testImplementation(kotlin("test"))
3434
testImplementation(project(":brand-dev-java-client-okhttp"))
3535
testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.2")
36-
testImplementation("org.assertj:assertj-core:3.25.3")
36+
testImplementation("org.assertj:assertj-core:3.27.7")
3737
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.3")
3838
testImplementation("org.junit.jupiter:junit-jupiter-params:5.9.3")
3939
testImplementation("org.junit-pioneer:junit-pioneer:1.9.1")

brand-dev-java-core/src/main/kotlin/com/branddev/api/models/brand/BrandAiProductsParams.kt

Lines changed: 107 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import com.branddev.api.core.JsonField
77
import com.branddev.api.core.JsonMissing
88
import com.branddev.api.core.JsonValue
99
import com.branddev.api.core.Params
10-
import com.branddev.api.core.checkRequired
1110
import com.branddev.api.core.http.Headers
1211
import com.branddev.api.core.http.QueryParams
1312
import com.branddev.api.errors.BrandDevInvalidDataException
@@ -32,12 +31,23 @@ private constructor(
3231
) : Params {
3332

3433
/**
35-
* The domain name to analyze
34+
* A specific URL to use directly as the starting point for extraction without domain
35+
* resolution. Useful when you want to extract products from a specific page rather than
36+
* discovering the site's product pages automatically. Either 'domain' or 'directUrl' must be
37+
* provided, but not both.
3638
*
37-
* @throws BrandDevInvalidDataException if the JSON field has an unexpected type or is
38-
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
39+
* @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if the
40+
* server responded with an unexpected value).
41+
*/
42+
fun directUrl(): Optional<String> = body.directUrl()
43+
44+
/**
45+
* The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but not both.
46+
*
47+
* @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if the
48+
* server responded with an unexpected value).
3949
*/
40-
fun domain(): String = body.domain()
50+
fun domain(): Optional<String> = body.domain()
4151

4252
/**
4353
* Maximum number of products to extract.
@@ -57,6 +67,13 @@ private constructor(
5767
*/
5868
fun timeoutMs(): Optional<Long> = body.timeoutMs()
5969

70+
/**
71+
* Returns the raw JSON value of [directUrl].
72+
*
73+
* Unlike [directUrl], this method doesn't throw if the JSON field has an unexpected type.
74+
*/
75+
fun _directUrl(): JsonField<String> = body._directUrl()
76+
6077
/**
6178
* Returns the raw JSON value of [domain].
6279
*
@@ -90,14 +107,9 @@ private constructor(
90107

91108
companion object {
92109

93-
/**
94-
* Returns a mutable builder for constructing an instance of [BrandAiProductsParams].
95-
*
96-
* The following fields are required:
97-
* ```java
98-
* .domain()
99-
* ```
100-
*/
110+
@JvmStatic fun none(): BrandAiProductsParams = builder().build()
111+
112+
/** Returns a mutable builder for constructing an instance of [BrandAiProductsParams]. */
101113
@JvmStatic fun builder() = Builder()
102114
}
103115

@@ -120,13 +132,34 @@ private constructor(
120132
*
121133
* This is generally only useful if you are already constructing the body separately.
122134
* Otherwise, it's more convenient to use the top-level setters instead:
135+
* - [directUrl]
123136
* - [domain]
124137
* - [maxProducts]
125138
* - [timeoutMs]
126139
*/
127140
fun body(body: Body) = apply { this.body = body.toBuilder() }
128141

129-
/** The domain name to analyze */
142+
/**
143+
* A specific URL to use directly as the starting point for extraction without domain
144+
* resolution. Useful when you want to extract products from a specific page rather than
145+
* discovering the site's product pages automatically. Either 'domain' or 'directUrl' must
146+
* be provided, but not both.
147+
*/
148+
fun directUrl(directUrl: String) = apply { body.directUrl(directUrl) }
149+
150+
/**
151+
* Sets [Builder.directUrl] to an arbitrary JSON value.
152+
*
153+
* You should usually call [Builder.directUrl] with a well-typed [String] value instead.
154+
* This method is primarily for setting the field to an undocumented or not yet supported
155+
* value.
156+
*/
157+
fun directUrl(directUrl: JsonField<String>) = apply { body.directUrl(directUrl) }
158+
159+
/**
160+
* The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but not
161+
* both.
162+
*/
130163
fun domain(domain: String) = apply { body.domain(domain) }
131164

132165
/**
@@ -285,13 +318,6 @@ private constructor(
285318
* Returns an immutable instance of [BrandAiProductsParams].
286319
*
287320
* Further updates to this [Builder] will not mutate the returned instance.
288-
*
289-
* The following fields are required:
290-
* ```java
291-
* .domain()
292-
* ```
293-
*
294-
* @throws IllegalStateException if any required field is unset.
295321
*/
296322
fun build(): BrandAiProductsParams =
297323
BrandAiProductsParams(
@@ -310,6 +336,7 @@ private constructor(
310336
class Body
311337
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
312338
private constructor(
339+
private val directUrl: JsonField<String>,
313340
private val domain: JsonField<String>,
314341
private val maxProducts: JsonField<Long>,
315342
private val timeoutMs: JsonField<Long>,
@@ -318,20 +345,35 @@ private constructor(
318345

319346
@JsonCreator
320347
private constructor(
348+
@JsonProperty("directUrl")
349+
@ExcludeMissing
350+
directUrl: JsonField<String> = JsonMissing.of(),
321351
@JsonProperty("domain") @ExcludeMissing domain: JsonField<String> = JsonMissing.of(),
322352
@JsonProperty("maxProducts")
323353
@ExcludeMissing
324354
maxProducts: JsonField<Long> = JsonMissing.of(),
325355
@JsonProperty("timeoutMS") @ExcludeMissing timeoutMs: JsonField<Long> = JsonMissing.of(),
326-
) : this(domain, maxProducts, timeoutMs, mutableMapOf())
356+
) : this(directUrl, domain, maxProducts, timeoutMs, mutableMapOf())
327357

328358
/**
329-
* The domain name to analyze
359+
* A specific URL to use directly as the starting point for extraction without domain
360+
* resolution. Useful when you want to extract products from a specific page rather than
361+
* discovering the site's product pages automatically. Either 'domain' or 'directUrl' must
362+
* be provided, but not both.
330363
*
331-
* @throws BrandDevInvalidDataException if the JSON field has an unexpected type or is
332-
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
364+
* @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if
365+
* the server responded with an unexpected value).
333366
*/
334-
fun domain(): String = domain.getRequired("domain")
367+
fun directUrl(): Optional<String> = directUrl.getOptional("directUrl")
368+
369+
/**
370+
* The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but not
371+
* both.
372+
*
373+
* @throws BrandDevInvalidDataException if the JSON field has an unexpected type (e.g. if
374+
* the server responded with an unexpected value).
375+
*/
376+
fun domain(): Optional<String> = domain.getOptional("domain")
335377

336378
/**
337379
* Maximum number of products to extract.
@@ -351,6 +393,13 @@ private constructor(
351393
*/
352394
fun timeoutMs(): Optional<Long> = timeoutMs.getOptional("timeoutMS")
353395

396+
/**
397+
* Returns the raw JSON value of [directUrl].
398+
*
399+
* Unlike [directUrl], this method doesn't throw if the JSON field has an unexpected type.
400+
*/
401+
@JsonProperty("directUrl") @ExcludeMissing fun _directUrl(): JsonField<String> = directUrl
402+
354403
/**
355404
* Returns the raw JSON value of [domain].
356405
*
@@ -388,34 +437,49 @@ private constructor(
388437

389438
companion object {
390439

391-
/**
392-
* Returns a mutable builder for constructing an instance of [Body].
393-
*
394-
* The following fields are required:
395-
* ```java
396-
* .domain()
397-
* ```
398-
*/
440+
/** Returns a mutable builder for constructing an instance of [Body]. */
399441
@JvmStatic fun builder() = Builder()
400442
}
401443

402444
/** A builder for [Body]. */
403445
class Builder internal constructor() {
404446

405-
private var domain: JsonField<String>? = null
447+
private var directUrl: JsonField<String> = JsonMissing.of()
448+
private var domain: JsonField<String> = JsonMissing.of()
406449
private var maxProducts: JsonField<Long> = JsonMissing.of()
407450
private var timeoutMs: JsonField<Long> = JsonMissing.of()
408451
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
409452

410453
@JvmSynthetic
411454
internal fun from(body: Body) = apply {
455+
directUrl = body.directUrl
412456
domain = body.domain
413457
maxProducts = body.maxProducts
414458
timeoutMs = body.timeoutMs
415459
additionalProperties = body.additionalProperties.toMutableMap()
416460
}
417461

418-
/** The domain name to analyze */
462+
/**
463+
* A specific URL to use directly as the starting point for extraction without domain
464+
* resolution. Useful when you want to extract products from a specific page rather than
465+
* discovering the site's product pages automatically. Either 'domain' or 'directUrl'
466+
* must be provided, but not both.
467+
*/
468+
fun directUrl(directUrl: String) = directUrl(JsonField.of(directUrl))
469+
470+
/**
471+
* Sets [Builder.directUrl] to an arbitrary JSON value.
472+
*
473+
* You should usually call [Builder.directUrl] with a well-typed [String] value instead.
474+
* This method is primarily for setting the field to an undocumented or not yet
475+
* supported value.
476+
*/
477+
fun directUrl(directUrl: JsonField<String>) = apply { this.directUrl = directUrl }
478+
479+
/**
480+
* The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but not
481+
* both.
482+
*/
419483
fun domain(domain: String) = domain(JsonField.of(domain))
420484

421485
/**
@@ -478,21 +542,9 @@ private constructor(
478542
* Returns an immutable instance of [Body].
479543
*
480544
* Further updates to this [Builder] will not mutate the returned instance.
481-
*
482-
* The following fields are required:
483-
* ```java
484-
* .domain()
485-
* ```
486-
*
487-
* @throws IllegalStateException if any required field is unset.
488545
*/
489546
fun build(): Body =
490-
Body(
491-
checkRequired("domain", domain),
492-
maxProducts,
493-
timeoutMs,
494-
additionalProperties.toMutableMap(),
495-
)
547+
Body(directUrl, domain, maxProducts, timeoutMs, additionalProperties.toMutableMap())
496548
}
497549

498550
private var validated: Boolean = false
@@ -502,6 +554,7 @@ private constructor(
502554
return@apply
503555
}
504556

557+
directUrl()
505558
domain()
506559
maxProducts()
507560
timeoutMs()
@@ -524,7 +577,8 @@ private constructor(
524577
*/
525578
@JvmSynthetic
526579
internal fun validity(): Int =
527-
(if (domain.asKnown().isPresent) 1 else 0) +
580+
(if (directUrl.asKnown().isPresent) 1 else 0) +
581+
(if (domain.asKnown().isPresent) 1 else 0) +
528582
(if (maxProducts.asKnown().isPresent) 1 else 0) +
529583
(if (timeoutMs.asKnown().isPresent) 1 else 0)
530584

@@ -534,20 +588,21 @@ private constructor(
534588
}
535589

536590
return other is Body &&
591+
directUrl == other.directUrl &&
537592
domain == other.domain &&
538593
maxProducts == other.maxProducts &&
539594
timeoutMs == other.timeoutMs &&
540595
additionalProperties == other.additionalProperties
541596
}
542597

543598
private val hashCode: Int by lazy {
544-
Objects.hash(domain, maxProducts, timeoutMs, additionalProperties)
599+
Objects.hash(directUrl, domain, maxProducts, timeoutMs, additionalProperties)
545600
}
546601

547602
override fun hashCode(): Int = hashCode
548603

549604
override fun toString() =
550-
"Body{domain=$domain, maxProducts=$maxProducts, timeoutMs=$timeoutMs, additionalProperties=$additionalProperties}"
605+
"Body{directUrl=$directUrl, domain=$domain, maxProducts=$maxProducts, timeoutMs=$timeoutMs, additionalProperties=$additionalProperties}"
551606
}
552607

553608
override fun equals(other: Any?): Boolean {

0 commit comments

Comments
 (0)