-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regen code to fix variables type, add accountId param (#56)
- pin generator at v6.0.1 - update package version to 5.0.0 - regen code - update wrappers
- Loading branch information
Showing
108 changed files
with
674 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
FROM openapitools/openapi-generator-cli@sha256:bc3f07ee4032923c7158b1a4a59aadd1861c6b4227c58d8ded5ee2b6c075bf72 | ||
FROM openapitools/openapi-generator-cli@sha256:c49d9c99124fe2ad94ccef54cc6d3362592e7ca29006a8cf01337ab10d1c01f4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@sajari/sdk-node", | ||
"version": "4.6.2", | ||
"version": "5.0.0", | ||
"repository": "[email protected]:github.com/sajari/sdk-node.git", | ||
"author": "Search.io", | ||
"license": "MIT", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5.4.0 | ||
6.1.0-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/** | ||
* Search.io API | ||
* Search.io offers a search and discovery service with Neuralsearch®, the world\'s first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. | ||
* Search.io offers a search and discovery service with Neuralsearch®, the world\'s first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. # Authentication <!-- ReDoc-Inject: <SecurityDefinitions> --> # Rate limiting The Search.io API employs a number of safeguards against bursts of incoming traffic to help maximize its stability. Users who send many requests in quick succession may see error responses that show up as HTTP status code `429`. For the [UpsertRecord](/docs/api#operation/UpsertRecord) call, Search.io allows up to 175 write operations per second. Treat these limits as maximums and don\'t generate unnecessary load. See [Handling limiting gracefully](/docs/api/#section/Rate-limiting/Handling-limiting-gracefully) for advice on handling `429`s. We may reduce limits to prevent abuse. ## Common causes and mitigations Rate limiting can occur under a variety of conditions, but it\'s most common in these scenarios: - Running a large volume of closely-spaced requests. Often this is part of a user\'s long-running reindex job. When engaging in these activities, you should try to control the request rate (see [Handling limiting gracefully](/docs/api/#section/Rate-limiting/Handling-limiting-gracefully)). - Running batch operations in parallel. Often [BatchUpsertRecords](/docs/api#operation/BatchUpsertRecords) is used as part of a user\'s long-running reindex job. A batch of records of size `N` passed to [BatchUpsertRecords](/docs/api#operation/BatchUpsertRecords) is counted as `N` [UpsertRecord](/docs/api#operation/UpsertRecord) calls for the purposes of rate limiting, as opposed to a single call. Treat batch API calls as a convenience rather than a way to get more write throughput. ## Handling limiting gracefully A basic technique for integrations to gracefully handle limiting is to watch for `429` HTTP status codes and build in a retry mechanism. The retry mechanism should follow an exponential backoff schedule to reduce request volume when necessary. We also recommend building some randomness into the backoff schedule to avoid a [thundering herd effect](https://en.wikipedia.org/wiki/Thundering_herd_problem). | ||
* | ||
* The version of the OpenAPI document: v4 | ||
* The version of the OpenAPI document: 4.0.0 | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
|
@@ -122,10 +122,12 @@ export class CollectionsApi { | |
* @summary Create collection | ||
* @param collectionId The ID to use for the collection. This must start with an alphanumeric character followed by one or more alphanumeric or `-` characters. Strictly speaking, it must match the regular expression: `^[A-Za-z][A-Za-z0-9\\-]*$`. | ||
* @param collection Details of the collection to create. | ||
* @param accountId The account that owns the collection, e.g. `1618535966441231024`. | ||
*/ | ||
public async createCollection( | ||
collectionId: string, | ||
collection: Collection, | ||
accountId?: string, | ||
options: { headers: { [name: string]: string } } = { headers: {} } | ||
): Promise<{ response: http.IncomingMessage; body: Collection }> { | ||
const localVarPath = this.basePath + "/v4/collections"; | ||
|
@@ -164,6 +166,10 @@ export class CollectionsApi { | |
); | ||
} | ||
|
||
localVarHeaderParams["Account-Id"] = ObjectSerializer.serialize( | ||
accountId, | ||
"string" | ||
); | ||
(<any>Object).assign(localVarHeaderParams, options.headers); | ||
|
||
let localVarUseFormData = false; | ||
|
@@ -232,9 +238,11 @@ export class CollectionsApi { | |
* Delete a collection and all of its associated data. > Note: This operation cannot be reversed. | ||
* @summary Delete collection | ||
* @param collectionId The collection to delete, e.g. `my-collection`. | ||
* @param accountId The account that owns the collection, e.g. `1618535966441231024`. | ||
*/ | ||
public async deleteCollection( | ||
collectionId: string, | ||
accountId?: string, | ||
options: { headers: { [name: string]: string } } = { headers: {} } | ||
): Promise<{ response: http.IncomingMessage; body: any }> { | ||
const localVarPath = | ||
|
@@ -264,6 +272,10 @@ export class CollectionsApi { | |
); | ||
} | ||
|
||
localVarHeaderParams["Account-Id"] = ObjectSerializer.serialize( | ||
accountId, | ||
"string" | ||
); | ||
(<any>Object).assign(localVarHeaderParams, options.headers); | ||
|
||
let localVarUseFormData = false; | ||
|
@@ -441,9 +453,13 @@ export class CollectionsApi { | |
* Retrieve the details of a collection. | ||
* @summary Get collection | ||
* @param collectionId The collection to retrieve, e.g. `my-collection`. | ||
* @param accountId The account that owns the collection, e.g. `1618535966441231024`. | ||
* @param view The amount of information to include in the retrieved pipeline. - BASIC: Include basic information including display name and domains. This is the default value (for both [ListCollections](/docs/api#operation/ListCollections) and [GetCollection](/docs/api#operation/GetCollection)). - FULL: Include the information from `BASIC`, plus full collection details like disk usage. | ||
*/ | ||
public async getCollection( | ||
collectionId: string, | ||
accountId?: string, | ||
view?: "VIEW_UNSPECIFIED" | "BASIC" | "FULL", | ||
options: { headers: { [name: string]: string } } = { headers: {} } | ||
): Promise<{ response: http.IncomingMessage; body: Collection }> { | ||
const localVarPath = | ||
|
@@ -473,6 +489,17 @@ export class CollectionsApi { | |
); | ||
} | ||
|
||
if (view !== undefined) { | ||
localVarQueryParameters["view"] = ObjectSerializer.serialize( | ||
view, | ||
"'VIEW_UNSPECIFIED' | 'BASIC' | 'FULL'" | ||
); | ||
} | ||
|
||
localVarHeaderParams["Account-Id"] = ObjectSerializer.serialize( | ||
accountId, | ||
"string" | ||
); | ||
(<any>Object).assign(localVarHeaderParams, options.headers); | ||
|
||
let localVarUseFormData = false; | ||
|
@@ -539,12 +566,16 @@ export class CollectionsApi { | |
/** | ||
* Retrieve a list of collections in an account. | ||
* @summary List collections | ||
* @param accountId The account that owns this set of collections, e.g. `1618535966441231024`. | ||
* @param pageSize The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections are returned. The maximum value is 100; values above 100 are coerced to 100. | ||
* @param pageToken A page token, received from a previous [ListCollections](/docs/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/docs/api#operation/ListCollections) must match the call that provided the page token. | ||
* @param view The amount of information to include in each retrieved collection. - BASIC: Include basic information including display name and domains. This is the default value (for both [ListCollections](/docs/api#operation/ListCollections) and [GetCollection](/docs/api#operation/GetCollection)). - FULL: Include the information from `BASIC`, plus full collection details like disk usage. | ||
*/ | ||
public async listCollections( | ||
accountId?: string, | ||
pageSize?: number, | ||
pageToken?: string, | ||
view?: "VIEW_UNSPECIFIED" | "BASIC" | "FULL", | ||
options: { headers: { [name: string]: string } } = { headers: {} } | ||
): Promise<{ | ||
response: http.IncomingMessage; | ||
|
@@ -579,6 +610,17 @@ export class CollectionsApi { | |
); | ||
} | ||
|
||
if (view !== undefined) { | ||
localVarQueryParameters["view"] = ObjectSerializer.serialize( | ||
view, | ||
"'VIEW_UNSPECIFIED' | 'BASIC' | 'FULL'" | ||
); | ||
} | ||
|
||
localVarHeaderParams["Account-Id"] = ObjectSerializer.serialize( | ||
accountId, | ||
"string" | ||
); | ||
(<any>Object).assign(localVarHeaderParams, options.headers); | ||
|
||
let localVarUseFormData = false; | ||
|
@@ -651,10 +693,12 @@ export class CollectionsApi { | |
* @summary Query collection | ||
* @param collectionId The collection to query, e.g. `my-collection`. | ||
* @param queryCollectionRequest | ||
* @param accountId The account that owns the collection, e.g. `1618535966441231024`. Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. | ||
*/ | ||
public async queryCollection( | ||
collectionId: string, | ||
queryCollectionRequest: QueryCollectionRequest, | ||
accountId?: string, | ||
options: { headers: { [name: string]: string } } = { headers: {} } | ||
): Promise<{ | ||
response: http.IncomingMessage; | ||
|
@@ -697,6 +741,10 @@ export class CollectionsApi { | |
); | ||
} | ||
|
||
localVarHeaderParams["Account-Id"] = ObjectSerializer.serialize( | ||
accountId, | ||
"string" | ||
); | ||
(<any>Object).assign(localVarHeaderParams, options.headers); | ||
|
||
let localVarUseFormData = false; | ||
|
@@ -891,7 +939,7 @@ export class CollectionsApi { | |
}); | ||
} | ||
/** | ||
* Track an analytics event when a user interacts with an object returned by a [QueryCollection](/docs/api/#operation/QueryCollection) request. An analytics event can be tracked for the following objects: - Results - Promotion banners - Redirects Note: You must pass an `Account-Id` header. | ||
* Track an analytics event when a user interacts with an object returned by a [QueryCollection](/docs/api/#operation/QueryCollection) request. An analytics event can be tracked for the following objects: - Results - Promotion banners - Redirects When tracking redirect events, set `type` to `redirect`. - **Note:** You must pass an `Account-Id` header. - **Note:** One of `result_id`, `banner_id` or `redirect_id` are required. | ||
* @summary Track event | ||
* @param accountId The account that owns the collection, e.g. `1618535966441231024`. | ||
* @param collectionId The collection to track the event against, e.g. `my-collection`. | ||
|
@@ -1016,13 +1064,15 @@ export class CollectionsApi { | |
* Update the details of a collection. | ||
* @summary Update collection | ||
* @param collectionId The collection to update, e.g. `my-collection`. | ||
* @param updateMask The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`. For each field that you want to update, provide a corresponding value in the collection object containing the new value. | ||
* @param collection The details of the collection to update. | ||
* @param accountId The account that owns the collection, e.g. `1618535966441231024`. | ||
* @param updateMask The list of fields to update, separated by a comma, e.g. `authorized_query_domains,display_name`. Each field should be in snake case. For each field that you want to update, provide a corresponding value in the collection object containing the new value. | ||
*/ | ||
public async updateCollection( | ||
collectionId: string, | ||
updateMask: string, | ||
collection: Collection, | ||
accountId?: string, | ||
updateMask?: string, | ||
options: { headers: { [name: string]: string } } = { headers: {} } | ||
): Promise<{ response: http.IncomingMessage; body: Collection }> { | ||
const localVarPath = | ||
|
@@ -1052,13 +1102,6 @@ export class CollectionsApi { | |
); | ||
} | ||
|
||
// verify required parameter 'updateMask' is not null or undefined | ||
if (updateMask === null || updateMask === undefined) { | ||
throw new Error( | ||
"Required parameter updateMask was null or undefined when calling updateCollection." | ||
); | ||
} | ||
|
||
// verify required parameter 'collection' is not null or undefined | ||
if (collection === null || collection === undefined) { | ||
throw new Error( | ||
|
@@ -1073,6 +1116,10 @@ export class CollectionsApi { | |
); | ||
} | ||
|
||
localVarHeaderParams["Account-Id"] = ObjectSerializer.serialize( | ||
accountId, | ||
"string" | ||
); | ||
(<any>Object).assign(localVarHeaderParams, options.headers); | ||
|
||
let localVarUseFormData = false; | ||
|
Oops, something went wrong.