/* tslint:disable */ /* eslint-disable */ /** * Emil PublicAPI * The Emil Public API description * * The version of the OpenAPI document: 1.0 * Contact: kontakt@emil.de * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore import { FilterNamedRangeResponseClass } from '../models'; // URLSearchParams not necessarily used // @ts-ignore import { URL, URLSearchParams } from 'url'; const FormData = require('form-data'); /** * NamedRangesApi - axios parameter creator * @export */ export const NamedRangesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Returns a list of named range file records you have previously created. The named range file records are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. * @summary List named range file records * @param {string} productSlug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id. * @param {string} name Name of Named Range. * @param {string} [authorization] Bearer Token * @param {number} [productVersionId] The product version id of the product version to be used for the lead. The product version id will be validated if the \'validate\' flag is set to true. * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10. * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list. * @param {string} [filters] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. * @param {string} [search] Search the list by any field. * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC. * @param {*} [options] Override http request option. * @throws {RequiredError} */ filterNamedRange: async (productSlug: string, name: string, authorization?: string, productVersionId?: number, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'productSlug' is not null or undefined assertParamExists('filterNamedRange', 'productSlug', productSlug) // verify required parameter 'name' is not null or undefined assertParamExists('filterNamedRange', 'name', name) const localVarPath = `/publicapi/v1/named-ranges/records`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (productSlug !== undefined) { localVarQueryParameter['productSlug'] = productSlug; } if (productVersionId !== undefined) { localVarQueryParameter['productVersionId'] = productVersionId; } if (name !== undefined) { localVarQueryParameter['name'] = name; } if (pageSize !== undefined) { localVarQueryParameter['pageSize'] = pageSize; } if (pageToken !== undefined) { localVarQueryParameter['pageToken'] = pageToken; } if (filters !== undefined) { localVarQueryParameter['filters'] = filters; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (order !== undefined) { localVarQueryParameter['order'] = order; } if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) { localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * NamedRangesApi - functional programming interface * @export */ export const NamedRangesApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = NamedRangesApiAxiosParamCreator(configuration) return { /** * Returns a list of named range file records you have previously created. The named range file records are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. * @summary List named range file records * @param {string} productSlug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id. * @param {string} name Name of Named Range. * @param {string} [authorization] Bearer Token * @param {number} [productVersionId] The product version id of the product version to be used for the lead. The product version id will be validated if the \'validate\' flag is set to true. * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10. * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list. * @param {string} [filters] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. * @param {string} [search] Search the list by any field. * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async filterNamedRange(productSlug: string, name: string, authorization?: string, productVersionId?: number, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.filterNamedRange(productSlug, name, authorization, productVersionId, pageSize, pageToken, filters, search, order, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * NamedRangesApi - factory interface * @export */ export const NamedRangesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = NamedRangesApiFp(configuration) return { /** * Returns a list of named range file records you have previously created. The named range file records are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. * @summary List named range file records * @param {string} productSlug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id. * @param {string} name Name of Named Range. * @param {string} [authorization] Bearer Token * @param {number} [productVersionId] The product version id of the product version to be used for the lead. The product version id will be validated if the \'validate\' flag is set to true. * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10. * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list. * @param {string} [filters] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. * @param {string} [search] Search the list by any field. * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC. * @param {*} [options] Override http request option. * @throws {RequiredError} */ filterNamedRange(productSlug: string, name: string, authorization?: string, productVersionId?: number, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options?: any): AxiosPromise { return localVarFp.filterNamedRange(productSlug, name, authorization, productVersionId, pageSize, pageToken, filters, search, order, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for filterNamedRange operation in NamedRangesApi. * @export * @interface NamedRangesApiFilterNamedRangeRequest */ export interface NamedRangesApiFilterNamedRangeRequest { /** * A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id. * @type {string} * @memberof NamedRangesApiFilterNamedRange */ readonly productSlug: string /** * Name of Named Range. * @type {string} * @memberof NamedRangesApiFilterNamedRange */ readonly name: string /** * Bearer Token * @type {string} * @memberof NamedRangesApiFilterNamedRange */ readonly authorization?: string /** * The product version id of the product version to be used for the lead. The product version id will be validated if the \'validate\' flag is set to true. * @type {number} * @memberof NamedRangesApiFilterNamedRange */ readonly productVersionId?: number /** * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10. * @type {number} * @memberof NamedRangesApiFilterNamedRange */ readonly pageSize?: number /** * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list. * @type {string} * @memberof NamedRangesApiFilterNamedRange */ readonly pageToken?: string /** * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. * @type {string} * @memberof NamedRangesApiFilterNamedRange */ readonly filters?: string /** * Search the list by any field. * @type {string} * @memberof NamedRangesApiFilterNamedRange */ readonly search?: string /** * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC. * @type {string} * @memberof NamedRangesApiFilterNamedRange */ readonly order?: string } /** * NamedRangesApi - object-oriented interface * @export * @class NamedRangesApi * @extends {BaseAPI} */ export class NamedRangesApi extends BaseAPI { /** * Returns a list of named range file records you have previously created. The named range file records are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. * @summary List named range file records * @param {NamedRangesApiFilterNamedRangeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NamedRangesApi */ public filterNamedRange(requestParameters: NamedRangesApiFilterNamedRangeRequest, options?: AxiosRequestConfig) { return NamedRangesApiFp(this.configuration).filterNamedRange(requestParameters.productSlug, requestParameters.name, requestParameters.authorization, requestParameters.productVersionId, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filters, requestParameters.search, requestParameters.order, options).then((request) => request(this.axios, this.basePath)); } }