UNPKG

jack-kafka-instance-sdk

Version:
170 lines (169 loc) 11.4 kB
/** * Kafka Instance API * API for interacting with Kafka Instance. Includes Produce, Consume and Admin APIs * * The version of the OpenAPI document: 0.14.1-SNAPSHOT * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; import { RequestArgs, BaseAPI } from '../base'; import { Record } from '../model'; import { RecordIncludedProperty } from '../model'; import { RecordList } from '../model'; /** * RecordsApi - axios parameter creator * @export */ export declare const RecordsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Consume a limited number of records from a topic, optionally specifying a partition and an absolute offset or timestamp as the starting point for message retrieval. * @summary Consume records from a topic * @param {string} topicName Topic name * @param {Array<RecordIncludedProperty>} [include] List of properties to include for each record in the response * @param {number} [limit] Limit the number of records fetched and returned * @param {number} [maxValueLength] Maximum length of string values returned in the response. Values with a length that exceeds this parameter will be truncated. When this parameter is not included in the request, the full string values will be returned. * @param {number} [offset] Retrieve messages with an offset equal to or greater than this offset. If both &#x60;timestamp&#x60; and &#x60;offset&#x60; are requested, &#x60;timestamp&#x60; is given preference. * @param {number} [partition] Retrieve messages only from this partition * @param {any} [timestamp] Retrieve messages with a timestamp equal to or later than this timestamp. If both &#x60;timestamp&#x60; and &#x60;offset&#x60; are requested, &#x60;timestamp&#x60; is given preference. * @param {*} [options] Override http request option. * @throws {RequiredError} */ consumeRecords: (topicName: string, include?: Array<RecordIncludedProperty>, limit?: number, maxValueLength?: number, offset?: number, partition?: number, timestamp?: any, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Produce (write) a single record to a topic. * @summary Send a record to a topic * @param {string} topicName Topic name * @param {Record} record * @param {*} [options] Override http request option. * @throws {RequiredError} */ produceRecord: (topicName: string, record: Record, options?: AxiosRequestConfig) => Promise<RequestArgs>; }; /** * RecordsApi - functional programming interface * @export */ export declare const RecordsApiFp: (configuration?: Configuration) => { /** * Consume a limited number of records from a topic, optionally specifying a partition and an absolute offset or timestamp as the starting point for message retrieval. * @summary Consume records from a topic * @param {string} topicName Topic name * @param {Array<RecordIncludedProperty>} [include] List of properties to include for each record in the response * @param {number} [limit] Limit the number of records fetched and returned * @param {number} [maxValueLength] Maximum length of string values returned in the response. Values with a length that exceeds this parameter will be truncated. When this parameter is not included in the request, the full string values will be returned. * @param {number} [offset] Retrieve messages with an offset equal to or greater than this offset. If both &#x60;timestamp&#x60; and &#x60;offset&#x60; are requested, &#x60;timestamp&#x60; is given preference. * @param {number} [partition] Retrieve messages only from this partition * @param {any} [timestamp] Retrieve messages with a timestamp equal to or later than this timestamp. If both &#x60;timestamp&#x60; and &#x60;offset&#x60; are requested, &#x60;timestamp&#x60; is given preference. * @param {*} [options] Override http request option. * @throws {RequiredError} */ consumeRecords(topicName: string, include?: Array<RecordIncludedProperty>, limit?: number, maxValueLength?: number, offset?: number, partition?: number, timestamp?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RecordList>>; /** * Produce (write) a single record to a topic. * @summary Send a record to a topic * @param {string} topicName Topic name * @param {Record} record * @param {*} [options] Override http request option. * @throws {RequiredError} */ produceRecord(topicName: string, record: Record, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Record>>; }; /** * RecordsApi - factory interface * @export */ export declare const RecordsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Consume a limited number of records from a topic, optionally specifying a partition and an absolute offset or timestamp as the starting point for message retrieval. * @summary Consume records from a topic * @param {string} topicName Topic name * @param {Array<RecordIncludedProperty>} [include] List of properties to include for each record in the response * @param {number} [limit] Limit the number of records fetched and returned * @param {number} [maxValueLength] Maximum length of string values returned in the response. Values with a length that exceeds this parameter will be truncated. When this parameter is not included in the request, the full string values will be returned. * @param {number} [offset] Retrieve messages with an offset equal to or greater than this offset. If both &#x60;timestamp&#x60; and &#x60;offset&#x60; are requested, &#x60;timestamp&#x60; is given preference. * @param {number} [partition] Retrieve messages only from this partition * @param {any} [timestamp] Retrieve messages with a timestamp equal to or later than this timestamp. If both &#x60;timestamp&#x60; and &#x60;offset&#x60; are requested, &#x60;timestamp&#x60; is given preference. * @param {*} [options] Override http request option. * @throws {RequiredError} */ consumeRecords(topicName: string, include?: Array<RecordIncludedProperty>, limit?: number, maxValueLength?: number, offset?: number, partition?: number, timestamp?: any, options?: any): AxiosPromise<RecordList>; /** * Produce (write) a single record to a topic. * @summary Send a record to a topic * @param {string} topicName Topic name * @param {Record} record * @param {*} [options] Override http request option. * @throws {RequiredError} */ produceRecord(topicName: string, record: Record, options?: any): AxiosPromise<Record>; }; /** * RecordsApi - interface * @export * @interface RecordsApi */ export interface RecordsApiInterface { /** * Consume a limited number of records from a topic, optionally specifying a partition and an absolute offset or timestamp as the starting point for message retrieval. * @summary Consume records from a topic * @param {string} topicName Topic name * @param {Array<RecordIncludedProperty>} [include] List of properties to include for each record in the response * @param {number} [limit] Limit the number of records fetched and returned * @param {number} [maxValueLength] Maximum length of string values returned in the response. Values with a length that exceeds this parameter will be truncated. When this parameter is not included in the request, the full string values will be returned. * @param {number} [offset] Retrieve messages with an offset equal to or greater than this offset. If both &#x60;timestamp&#x60; and &#x60;offset&#x60; are requested, &#x60;timestamp&#x60; is given preference. * @param {number} [partition] Retrieve messages only from this partition * @param {any} [timestamp] Retrieve messages with a timestamp equal to or later than this timestamp. If both &#x60;timestamp&#x60; and &#x60;offset&#x60; are requested, &#x60;timestamp&#x60; is given preference. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RecordsApiInterface */ consumeRecords(topicName: string, include?: Array<RecordIncludedProperty>, limit?: number, maxValueLength?: number, offset?: number, partition?: number, timestamp?: any, options?: AxiosRequestConfig): AxiosPromise<RecordList>; /** * Produce (write) a single record to a topic. * @summary Send a record to a topic * @param {string} topicName Topic name * @param {Record} record * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RecordsApiInterface */ produceRecord(topicName: string, record: Record, options?: AxiosRequestConfig): AxiosPromise<Record>; } /** * RecordsApi - object-oriented interface * @export * @class RecordsApi * @extends {BaseAPI} */ export declare class RecordsApi extends BaseAPI implements RecordsApiInterface { /** * Consume a limited number of records from a topic, optionally specifying a partition and an absolute offset or timestamp as the starting point for message retrieval. * @summary Consume records from a topic * @param {string} topicName Topic name * @param {Array<RecordIncludedProperty>} [include] List of properties to include for each record in the response * @param {number} [limit] Limit the number of records fetched and returned * @param {number} [maxValueLength] Maximum length of string values returned in the response. Values with a length that exceeds this parameter will be truncated. When this parameter is not included in the request, the full string values will be returned. * @param {number} [offset] Retrieve messages with an offset equal to or greater than this offset. If both &#x60;timestamp&#x60; and &#x60;offset&#x60; are requested, &#x60;timestamp&#x60; is given preference. * @param {number} [partition] Retrieve messages only from this partition * @param {any} [timestamp] Retrieve messages with a timestamp equal to or later than this timestamp. If both &#x60;timestamp&#x60; and &#x60;offset&#x60; are requested, &#x60;timestamp&#x60; is given preference. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RecordsApi */ consumeRecords(topicName: string, include?: Array<RecordIncludedProperty>, limit?: number, maxValueLength?: number, offset?: number, partition?: number, timestamp?: any, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RecordList, any>>; /** * Produce (write) a single record to a topic. * @summary Send a record to a topic * @param {string} topicName Topic name * @param {Record} record * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RecordsApi */ produceRecord(topicName: string, record: Record, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Record, any>>; }