Skip to content

Commit 1534fcc

Browse files
algolia-botClaraMullermillotpshortcuts
committed
feat(specs): merge composition & composition-full (generated)
algolia/api-clients-automation#5333 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clara Muller <[email protected]> Co-authored-by: Pierre Millot <[email protected]> Co-authored-by: shortcuts <[email protected]>
1 parent a9ee431 commit 1534fcc

File tree

115 files changed

+3863
-443
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+3863
-443
lines changed

src/main/scala/algoliasearch/api/CompositionClient.scala

Lines changed: 379 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/** Composition API The Algolia Composition API lets you run composed search requests on your Compositions. ## Client
2+
* libraries Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. See:
3+
* [Algolia's ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) ##
4+
* Base URLs The base URLs for requests to the Composition API are: - `https://{APPLICATION_ID}.algolia.net` -
5+
* `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search
6+
* Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both
7+
* URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** ##
8+
* Retry strategy To guarantee high availability, implement a retry strategy for all API requests using the URLs of
9+
* your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` -
10+
* `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different
11+
* DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers.
12+
* All Algolia API clients implement this retry strategy. ## Authentication To authenticate your API requests, add
13+
* these headers: - `x-algolia-application-id`. Your Algolia application ID. - `x-algolia-api-key`. An API key with the
14+
* necessary permissions to make the request. The required access control list (ACL) to make a request is listed in
15+
* each endpoint's reference. You can find your application ID and API key in the [Algolia
16+
* dashboard](https://dashboard.algolia.com/account). ## Request format Depending on the endpoint, request bodies are
17+
* either JSON objects or arrays of JSON objects, ## Parameters Parameters are passed in the request body for POST and
18+
* PUT requests. Query parameters must be
19+
* [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be
20+
* UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. ## Response status and errors The Composition API
21+
* returns JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in
22+
* the API response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are
23+
* indicated by a `5xx` status. Error responses have a `message` property with more information. ## Version The current
24+
* version of the Composition API is version 1, as indicated by the `/1/` in each endpoint's URL.
25+
*
26+
* The version of the OpenAPI document: 1.0.0
27+
*
28+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
29+
* https://openapi-generator.tech Do not edit the class manually.
30+
*/
31+
package algoliasearch.composition
32+
33+
import org.json4s._
34+
35+
sealed trait Action
36+
37+
/** Type of Composition Batch operation.
38+
*/
39+
object Action {
40+
case object Upsert extends Action {
41+
override def toString = "upsert"
42+
}
43+
case object Delete extends Action {
44+
override def toString = "delete"
45+
}
46+
val values: Seq[Action] = Seq(Upsert, Delete)
47+
48+
def withName(name: String): Action = Action.values
49+
.find(_.toString == name)
50+
.getOrElse(throw new MappingException(s"Unknown Action value: $name"))
51+
}
52+
53+
class ActionSerializer
54+
extends CustomSerializer[Action](_ =>
55+
(
56+
{
57+
case JString(value) => Action.withName(value)
58+
case JNull => null
59+
},
60+
{ case value: Action =>
61+
JString(value.toString)
62+
}
63+
)
64+
)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/** Composition API The Algolia Composition API lets you run composed search requests on your Compositions. ## Client
2+
* libraries Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. See:
3+
* [Algolia's ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) ##
4+
* Base URLs The base URLs for requests to the Composition API are: - `https://{APPLICATION_ID}.algolia.net` -
5+
* `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search
6+
* Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both
7+
* URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** ##
8+
* Retry strategy To guarantee high availability, implement a retry strategy for all API requests using the URLs of
9+
* your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` -
10+
* `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different
11+
* DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers.
12+
* All Algolia API clients implement this retry strategy. ## Authentication To authenticate your API requests, add
13+
* these headers: - `x-algolia-application-id`. Your Algolia application ID. - `x-algolia-api-key`. An API key with the
14+
* necessary permissions to make the request. The required access control list (ACL) to make a request is listed in
15+
* each endpoint's reference. You can find your application ID and API key in the [Algolia
16+
* dashboard](https://dashboard.algolia.com/account). ## Request format Depending on the endpoint, request bodies are
17+
* either JSON objects or arrays of JSON objects, ## Parameters Parameters are passed in the request body for POST and
18+
* PUT requests. Query parameters must be
19+
* [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be
20+
* UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. ## Response status and errors The Composition API
21+
* returns JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in
22+
* the API response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are
23+
* indicated by a `5xx` status. Error responses have a `message` property with more information. ## Version The current
24+
* version of the Composition API is version 1, as indicated by the `/1/` in each endpoint's URL.
25+
*
26+
* The version of the OpenAPI document: 1.0.0
27+
*
28+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
29+
* https://openapi-generator.tech Do not edit the class manually.
30+
*/
31+
package algoliasearch.composition
32+
33+
import org.json4s._
34+
35+
sealed trait AdvancedSyntaxFeatures
36+
37+
/** AdvancedSyntaxFeatures enumeration
38+
*/
39+
object AdvancedSyntaxFeatures {
40+
case object ExactPhrase extends AdvancedSyntaxFeatures {
41+
override def toString = "exactPhrase"
42+
}
43+
case object ExcludeWords extends AdvancedSyntaxFeatures {
44+
override def toString = "excludeWords"
45+
}
46+
val values: Seq[AdvancedSyntaxFeatures] = Seq(ExactPhrase, ExcludeWords)
47+
48+
def withName(name: String): AdvancedSyntaxFeatures = AdvancedSyntaxFeatures.values
49+
.find(_.toString == name)
50+
.getOrElse(throw new MappingException(s"Unknown AdvancedSyntaxFeatures value: $name"))
51+
}
52+
53+
class AdvancedSyntaxFeaturesSerializer
54+
extends CustomSerializer[AdvancedSyntaxFeatures](_ =>
55+
(
56+
{
57+
case JString(value) => AdvancedSyntaxFeatures.withName(value)
58+
case JNull => null
59+
},
60+
{ case value: AdvancedSyntaxFeatures =>
61+
JString(value.toString)
62+
}
63+
)
64+
)
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/** Composition API The Algolia Composition API lets you run composed search requests on your Compositions. ## Client
2+
* libraries Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. See:
3+
* [Algolia's ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) ##
4+
* Base URLs The base URLs for requests to the Composition API are: - `https://{APPLICATION_ID}.algolia.net` -
5+
* `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search
6+
* Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both
7+
* URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** ##
8+
* Retry strategy To guarantee high availability, implement a retry strategy for all API requests using the URLs of
9+
* your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` -
10+
* `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different
11+
* DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers.
12+
* All Algolia API clients implement this retry strategy. ## Authentication To authenticate your API requests, add
13+
* these headers: - `x-algolia-application-id`. Your Algolia application ID. - `x-algolia-api-key`. An API key with the
14+
* necessary permissions to make the request. The required access control list (ACL) to make a request is listed in
15+
* each endpoint's reference. You can find your application ID and API key in the [Algolia
16+
* dashboard](https://dashboard.algolia.com/account). ## Request format Depending on the endpoint, request bodies are
17+
* either JSON objects or arrays of JSON objects, ## Parameters Parameters are passed in the request body for POST and
18+
* PUT requests. Query parameters must be
19+
* [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be
20+
* UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. ## Response status and errors The Composition API
21+
* returns JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in
22+
* the API response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are
23+
* indicated by a `5xx` status. Error responses have a `message` property with more information. ## Version The current
24+
* version of the Composition API is version 1, as indicated by the `/1/` in each endpoint's URL.
25+
*
26+
* The version of the OpenAPI document: 1.0.0
27+
*
28+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
29+
* https://openapi-generator.tech Do not edit the class manually.
30+
*/
31+
package algoliasearch.composition
32+
33+
import org.json4s._
34+
35+
sealed trait AlternativesAsExact
36+
37+
/** AlternativesAsExact enumeration
38+
*/
39+
object AlternativesAsExact {
40+
case object IgnorePlurals extends AlternativesAsExact {
41+
override def toString = "ignorePlurals"
42+
}
43+
case object SingleWordSynonym extends AlternativesAsExact {
44+
override def toString = "singleWordSynonym"
45+
}
46+
case object MultiWordsSynonym extends AlternativesAsExact {
47+
override def toString = "multiWordsSynonym"
48+
}
49+
case object IgnoreConjugations extends AlternativesAsExact {
50+
override def toString = "ignoreConjugations"
51+
}
52+
val values: Seq[AlternativesAsExact] = Seq(IgnorePlurals, SingleWordSynonym, MultiWordsSynonym, IgnoreConjugations)
53+
54+
def withName(name: String): AlternativesAsExact = AlternativesAsExact.values
55+
.find(_.toString == name)
56+
.getOrElse(throw new MappingException(s"Unknown AlternativesAsExact value: $name"))
57+
}
58+
59+
class AlternativesAsExactSerializer
60+
extends CustomSerializer[AlternativesAsExact](_ =>
61+
(
62+
{
63+
case JString(value) => AlternativesAsExact.withName(value)
64+
case JNull => null
65+
},
66+
{ case value: AlternativesAsExact =>
67+
JString(value.toString)
68+
}
69+
)
70+
)
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/** Composition API The Algolia Composition API lets you run composed search requests on your Compositions. ## Client
2+
* libraries Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. See:
3+
* [Algolia's ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/) ##
4+
* Base URLs The base URLs for requests to the Composition API are: - `https://{APPLICATION_ID}.algolia.net` -
5+
* `https://{APPLICATION_ID}-dsn.algolia.net`. If your subscription includes a [Distributed Search
6+
* Network](https://dashboard.algolia.com/infra), this ensures that requests are sent to servers closest to users. Both
7+
* URLs provide high availability by distributing requests with load balancing. **All requests must use HTTPS.** ##
8+
* Retry strategy To guarantee high availability, implement a retry strategy for all API requests using the URLs of
9+
* your servers as fallbacks: - `https://{APPLICATION_ID}-1.algolianet.com` -
10+
* `https://{APPLICATION_ID}-2.algolianet.com` - `https://{APPLICATION_ID}-3.algolianet.com` These URLs use a different
11+
* DNS provider than the primary URLs. You should randomize this list to ensure an even load across the three servers.
12+
* All Algolia API clients implement this retry strategy. ## Authentication To authenticate your API requests, add
13+
* these headers: - `x-algolia-application-id`. Your Algolia application ID. - `x-algolia-api-key`. An API key with the
14+
* necessary permissions to make the request. The required access control list (ACL) to make a request is listed in
15+
* each endpoint's reference. You can find your application ID and API key in the [Algolia
16+
* dashboard](https://dashboard.algolia.com/account). ## Request format Depending on the endpoint, request bodies are
17+
* either JSON objects or arrays of JSON objects, ## Parameters Parameters are passed in the request body for POST and
18+
* PUT requests. Query parameters must be
19+
* [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be
20+
* UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. ## Response status and errors The Composition API
21+
* returns JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in
22+
* the API response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are
23+
* indicated by a `5xx` status. Error responses have a `message` property with more information. ## Version The current
24+
* version of the Composition API is version 1, as indicated by the `/1/` in each endpoint's URL.
25+
*
26+
* The version of the OpenAPI document: 1.0.0
27+
*
28+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
29+
* https://openapi-generator.tech Do not edit the class manually.
30+
*/
31+
package algoliasearch.composition
32+
33+
import org.json4s._
34+
35+
sealed trait Anchoring
36+
37+
/** Which part of the search query the pattern should match: - `startsWith`. The pattern must match the beginning of the
38+
* query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly.
39+
* \- `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as patterns with
40+
* `anchoring: is`.
41+
*/
42+
object Anchoring {
43+
case object Is extends Anchoring {
44+
override def toString = "is"
45+
}
46+
case object StartsWith extends Anchoring {
47+
override def toString = "startsWith"
48+
}
49+
case object EndsWith extends Anchoring {
50+
override def toString = "endsWith"
51+
}
52+
case object Contains extends Anchoring {
53+
override def toString = "contains"
54+
}
55+
val values: Seq[Anchoring] = Seq(Is, StartsWith, EndsWith, Contains)
56+
57+
def withName(name: String): Anchoring = Anchoring.values
58+
.find(_.toString == name)
59+
.getOrElse(throw new MappingException(s"Unknown Anchoring value: $name"))
60+
}
61+
62+
class AnchoringSerializer
63+
extends CustomSerializer[Anchoring](_ =>
64+
(
65+
{
66+
case JString(value) => Anchoring.withName(value)
67+
case JNull => null
68+
},
69+
{ case value: Anchoring =>
70+
JString(value.toString)
71+
}
72+
)
73+
)

src/main/scala/algoliasearch/composition/AroundPrecision.scala

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
* necessary permissions to make the request. The required access control list (ACL) to make a request is listed in
1515
* each endpoint's reference. You can find your application ID and API key in the [Algolia
1616
* dashboard](https://dashboard.algolia.com/account). ## Request format Depending on the endpoint, request bodies are
17-
* either JSON objects or arrays of JSON objects, ## Parameters Parameters are passed as query parameters for GET and
18-
* DELETE requests, and in the request body for POST and PUT requests. Query parameters must be
17+
* either JSON objects or arrays of JSON objects, ## Parameters Parameters are passed in the request body for POST and
18+
* PUT requests. Query parameters must be
1919
* [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be
20-
* UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A
21-
* comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array:
22-
* `attributesToRetrieve=%5B%22title%22,%22description%22%D` ## Response status and errors The Composition API returns
23-
* JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API
24-
* response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are
20+
* UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. ## Response status and errors The Composition API
21+
* returns JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in
22+
* the API response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are
2523
* indicated by a `5xx` status. Error responses have a `message` property with more information. ## Version The current
2624
* version of the Composition API is version 1, as indicated by the `/1/` in each endpoint's URL.
2725
*

src/main/scala/algoliasearch/composition/AroundRadius.scala

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
* necessary permissions to make the request. The required access control list (ACL) to make a request is listed in
1515
* each endpoint's reference. You can find your application ID and API key in the [Algolia
1616
* dashboard](https://dashboard.algolia.com/account). ## Request format Depending on the endpoint, request bodies are
17-
* either JSON objects or arrays of JSON objects, ## Parameters Parameters are passed as query parameters for GET and
18-
* DELETE requests, and in the request body for POST and PUT requests. Query parameters must be
17+
* either JSON objects or arrays of JSON objects, ## Parameters Parameters are passed in the request body for POST and
18+
* PUT requests. Query parameters must be
1919
* [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). Non-ASCII characters must be
20-
* UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. Arrays as query parameters must be one of: - A
21-
* comma-separated string: `attributesToRetrieve=title,description` - A URL-encoded JSON array:
22-
* `attributesToRetrieve=%5B%22title%22,%22description%22%D` ## Response status and errors The Composition API returns
23-
* JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API
24-
* response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are
20+
* UTF-8 encoded. Plus characters (`+`) are interpreted as spaces. ## Response status and errors The Composition API
21+
* returns JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in
22+
* the API response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are
2523
* indicated by a `5xx` status. Error responses have a `message` property with more information. ## Version The current
2624
* version of the Composition API is version 1, as indicated by the `/1/` in each endpoint's URL.
2725
*

0 commit comments

Comments
 (0)