@neynar/nodejs-sdk
Version:
SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)
206 lines (205 loc) • 9.63 kB
TypeScript
/**
* Farcaster Hub API
* Perform basic queries of Farcaster state via the REST API of a Farcaster hub. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.35.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import { type RequestArgs, BaseAPI } from '../base';
import type { Message } from '../models';
import type { ValidateMessageResponse } from '../models';
/**
* MessageApi - axios parameter creator
* @export
*/
export declare const MessageApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Submit a message to the Farcaster network.
* @summary Submit signed message
* @param {File} body A Message is a delta operation on the Farcaster network. The message protobuf is an envelope that wraps a MessageData object and contains a hash and signature which can verify its authenticity.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<Message>} A promise that resolves to a `Message` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/submit-signed-message)
*
*/
publishMessage: (body: File, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Validate a message on the Farcaster network.
* @summary Validate signed message
* @param {File} body A Message is a delta operation on the Farcaster network. The message protobuf is an envelope that wraps a MessageData object and contains a hash and signature which can verify its authenticity.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<ValidateMessageResponse>} A promise that resolves to a `ValidateMessageResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/validate-message)
*
*/
validateMessage: (body: File, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* MessageApi - functional programming interface
* @export
*/
export declare const MessageApiFp: (configuration?: Configuration) => {
/**
* Submit a message to the Farcaster network.
* @summary Submit signed message
* @param {File} body A Message is a delta operation on the Farcaster network. The message protobuf is an envelope that wraps a MessageData object and contains a hash and signature which can verify its authenticity.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<Message>} A promise that resolves to a `Message` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/submit-signed-message)
*
*/
publishMessage(body: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Message>>;
/**
* Validate a message on the Farcaster network.
* @summary Validate signed message
* @param {File} body A Message is a delta operation on the Farcaster network. The message protobuf is an envelope that wraps a MessageData object and contains a hash and signature which can verify its authenticity.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<ValidateMessageResponse>} A promise that resolves to a `ValidateMessageResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/validate-message)
*
*/
validateMessage(body: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidateMessageResponse>>;
};
/**
* MessageApi - factory interface
* @export
*/
export declare const MessageApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Submit a message to the Farcaster network.
* @summary Submit signed message
* @param {MessageApiPublishMessageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<Message>} A promise that resolves to a `Message` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/submit-signed-message)
*
*/
publishMessage(requestParameters: MessageApiPublishMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Message>;
/**
* Validate a message on the Farcaster network.
* @summary Validate signed message
* @param {MessageApiValidateMessageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<ValidateMessageResponse>} A promise that resolves to a `ValidateMessageResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/validate-message)
*
*/
validateMessage(requestParameters: MessageApiValidateMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<ValidateMessageResponse>;
};
/**
* MessageApi - interface
* @export
* @interface MessageApi
*/
export interface MessageApiInterface {
/**
* Submit a message to the Farcaster network.
* @summary Submit signed message
* @param {MessageApiPublishMessageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MessageApiInterface
* @returns {Promise<Message>} A promise that resolves to a `Message` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/submit-signed-message)
*
*/
publishMessage(requestParameters: MessageApiPublishMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Message>;
/**
* Validate a message on the Farcaster network.
* @summary Validate signed message
* @param {MessageApiValidateMessageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MessageApiInterface
* @returns {Promise<ValidateMessageResponse>} A promise that resolves to a `ValidateMessageResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/validate-message)
*
*/
validateMessage(requestParameters: MessageApiValidateMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<ValidateMessageResponse>;
}
/**
* Request parameters for publishMessage operation in MessageApi.
* @export
* @interface MessageApiPublishMessageRequest
*/
export interface MessageApiPublishMessageRequest {
/**
* A Message is a delta operation on the Farcaster network. The message protobuf is an envelope that wraps a MessageData object and contains a hash and signature which can verify its authenticity.
*
*
*
* @type {File}
* @memberof MessageApiPublishMessage
*/
readonly body: File;
}
/**
* Request parameters for validateMessage operation in MessageApi.
* @export
* @interface MessageApiValidateMessageRequest
*/
export interface MessageApiValidateMessageRequest {
/**
* A Message is a delta operation on the Farcaster network. The message protobuf is an envelope that wraps a MessageData object and contains a hash and signature which can verify its authenticity.
*
*
*
* @type {File}
* @memberof MessageApiValidateMessage
*/
readonly body: File;
}
/**
* MessageApi - object-oriented interface
* @export
* @class MessageApi
* @extends {BaseAPI}
*/
export declare class MessageApi extends BaseAPI implements MessageApiInterface {
/**
* Submit a message to the Farcaster network.
* @summary Submit signed message
* @param {MessageApiPublishMessageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MessageApi
* @returns {Promise<Message>} A promise that resolves to a `Message` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/submit-signed-message)
*
*/
publishMessage(requestParameters: MessageApiPublishMessageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Message, any>>;
/**
* Validate a message on the Farcaster network.
* @summary Validate signed message
* @param {MessageApiValidateMessageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MessageApi
* @returns {Promise<ValidateMessageResponse>} A promise that resolves to a `ValidateMessageResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/validate-message)
*
*/
validateMessage(requestParameters: MessageApiValidateMessageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ValidateMessageResponse, any>>;
}