Skip to content

Commit

Permalink
Update OAS submodule to version 2.7.0 (#262)
Browse files Browse the repository at this point in the history
* Update OAS submodule

* Update generated files

* Update package.json version to 2.7.0

---------

Co-authored-by: GitHub Actions <actions@github.com>
  • Loading branch information
manan19 and actions-user authored Dec 25, 2024
1 parent 6318f9c commit 70a9e57
Show file tree
Hide file tree
Showing 312 changed files with 678 additions and 307 deletions.
2 changes: 1 addition & 1 deletion oas
Submodule oas updated 1 files
+77 −1 src/v2/spec.yaml
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@neynar/nodejs-sdk",
"version": "2.6.1",
"version": "2.7.0",
"description": "SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)",
"main": "./build/index.js",
"types": "./build/index.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions src/api/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ apis/fname-api.ts
apis/follows-api.ts
apis/frame-api.ts
apis/login-api.ts
apis/metrics-api.ts
apis/mute-api.ts
apis/notifications-api.ts
apis/onchain-api.ts
Expand Down Expand Up @@ -69,6 +70,8 @@ models/cast-with-interactions-reactions.ts
models/cast-with-interactions-replies.ts
models/cast-with-interactions.ts
models/cast.ts
models/casts-metrics-response.ts
models/casts-metrics.ts
models/casts-response-result.ts
models/casts-response.ts
models/casts-search-response-result.ts
Expand Down
3 changes: 2 additions & 1 deletion src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.6.1
* The version of the OpenAPI document: 2.7.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand All @@ -24,6 +24,7 @@ export * from './apis/fname-api';
export * from './apis/follows-api';
export * from './apis/frame-api';
export * from './apis/login-api';
export * from './apis/metrics-api';
export * from './apis/mute-api';
export * from './apis/notifications-api';
export * from './apis/onchain-api';
Expand Down
2 changes: 1 addition & 1 deletion src/api/apis/action-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.6.1
* The version of the OpenAPI document: 2.7.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/api/apis/ban-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.6.1
* The version of the OpenAPI document: 2.7.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/api/apis/block-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.6.1
* The version of the OpenAPI document: 2.7.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/api/apis/cast-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.6.1
* The version of the OpenAPI document: 2.7.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/api/apis/channel-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.6.1
* The version of the OpenAPI document: 2.7.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/api/apis/feed-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.6.1
* The version of the OpenAPI document: 2.7.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/api/apis/fname-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.6.1
* The version of the OpenAPI document: 2.7.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/api/apis/follows-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.6.1
* The version of the OpenAPI document: 2.7.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/api/apis/frame-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.6.1
* The version of the OpenAPI document: 2.7.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/api/apis/login-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.6.1
* The version of the OpenAPI document: 2.7.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
251 changes: 251 additions & 0 deletions src/api/apis/metrics-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
/* tslint:disable */
/* eslint-disable */
/**
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.7.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 globalAxios from 'axios';
// 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, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { CastsMetricsResponse } from '../models';
// @ts-ignore
import type { ErrorRes } from '../models';
/**
* MetricsApi - axios parameter creator
* @export
*/
export const MetricsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Fetches metrics casts matching a query
* @summary Metrics for casts
* @param {string} q Query string to search for casts
* @param {FetchCastMetricsIntervalEnum} [interval] Interval of time for which to fetch metrics. Choices are &#x60;1d&#x60;, &#x60;7d&#x60;, &#x60;30d&#x60;
* @param {number} [authorFid] Fid of the user whose casts you want to search
* @param {string} [channelId] Channel ID of the casts you want to search
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<CastsMetricsResponse>} A promise that resolves to a `CastsMetricsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-metrics)
*
*/
fetchCastMetrics: async (q: string, interval?: FetchCastMetricsIntervalEnum, authorFid?: number, channelId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'q' is not null or undefined
assertParamExists('fetchCastMetrics', 'q', q)
const localVarPath = `/farcaster/cast/metrics`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}

const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication ApiKeyAuth required
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)

if (q !== undefined) {
localVarQueryParameter['q'] = q;
}

if (interval !== undefined) {
localVarQueryParameter['interval'] = interval;
}

if (authorFid !== undefined) {
localVarQueryParameter['author_fid'] = authorFid;
}

if (channelId !== undefined) {
localVarQueryParameter['channel_id'] = channelId;
}



setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};

/**
* MetricsApi - functional programming interface
* @export
*/
export const MetricsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = MetricsApiAxiosParamCreator(configuration)
return {
/**
* Fetches metrics casts matching a query
* @summary Metrics for casts
* @param {string} q Query string to search for casts
* @param {FetchCastMetricsIntervalEnum} [interval] Interval of time for which to fetch metrics. Choices are &#x60;1d&#x60;, &#x60;7d&#x60;, &#x60;30d&#x60;
* @param {number} [authorFid] Fid of the user whose casts you want to search
* @param {string} [channelId] Channel ID of the casts you want to search
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<CastsMetricsResponse>} A promise that resolves to a `CastsMetricsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-metrics)
*
*/
async fetchCastMetrics(q: string, interval?: FetchCastMetricsIntervalEnum, authorFid?: number, channelId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CastsMetricsResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.fetchCastMetrics(q, interval, authorFid, channelId, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['MetricsApi.fetchCastMetrics']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};

/**
* MetricsApi - factory interface
* @export
*/
export const MetricsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = MetricsApiFp(configuration)
return {
/**
* Fetches metrics casts matching a query
* @summary Metrics for casts
* @param {MetricsApiFetchCastMetricsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<CastsMetricsResponse>} A promise that resolves to a `CastsMetricsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-metrics)
*
*/
fetchCastMetrics(requestParameters: MetricsApiFetchCastMetricsRequest, options?: RawAxiosRequestConfig): AxiosPromise<CastsMetricsResponse> {
return localVarFp.fetchCastMetrics(requestParameters.q, requestParameters.interval, requestParameters.authorFid, requestParameters.channelId, options).then((request) => request(axios, basePath));
},
};
};

/**
* MetricsApi - interface
* @export
* @interface MetricsApi
*/
export interface MetricsApiInterface {
/**
* Fetches metrics casts matching a query
* @summary Metrics for casts
* @param {MetricsApiFetchCastMetricsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsApiInterface
* @returns {Promise<CastsMetricsResponse>} A promise that resolves to a `CastsMetricsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-metrics)
*
*/
fetchCastMetrics(requestParameters: MetricsApiFetchCastMetricsRequest, options?: RawAxiosRequestConfig): AxiosPromise<CastsMetricsResponse>;

}

/**
* Request parameters for fetchCastMetrics operation in MetricsApi.
* @export
* @interface MetricsApiFetchCastMetricsRequest
*/
export interface MetricsApiFetchCastMetricsRequest {
/**
* Query string to search for casts
*
*
*
* @type {string}
* @memberof MetricsApiFetchCastMetrics
*/
readonly q: string

/**
* Interval of time for which to fetch metrics. Choices are &#x60;1d&#x60;, &#x60;7d&#x60;, &#x60;30d&#x60;
*
*
*
* @type {'1d' | '7d' | '30d'}
* @memberof MetricsApiFetchCastMetrics
*/
readonly interval?: FetchCastMetricsIntervalEnum

/**
* Fid of the user whose casts you want to search
*
*
*
* @type {number}
* @memberof MetricsApiFetchCastMetrics
*/
readonly authorFid?: number

/**
* Channel ID of the casts you want to search
*
*
*
* @type {string}
* @memberof MetricsApiFetchCastMetrics
*/
readonly channelId?: string
}

/**
* MetricsApi - object-oriented interface
* @export
* @class MetricsApi
* @extends {BaseAPI}
*/
export class MetricsApi extends BaseAPI implements MetricsApiInterface {
/**
* Fetches metrics casts matching a query
* @summary Metrics for casts
* @param {MetricsApiFetchCastMetricsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsApi
* @returns {Promise<CastsMetricsResponse>} A promise that resolves to a `CastsMetricsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-metrics)
*
*/
public fetchCastMetrics(requestParameters: MetricsApiFetchCastMetricsRequest, options?: RawAxiosRequestConfig) {
return MetricsApiFp(this.configuration).fetchCastMetrics(requestParameters.q, requestParameters.interval, requestParameters.authorFid, requestParameters.channelId, options).then((request) => request(this.axios, this.basePath));
}
}

/**
* @export
*/
export const FetchCastMetricsIntervalEnum = {
_1d: '1d',
_7d: '7d',
_30d: '30d'
} as const;
export type FetchCastMetricsIntervalEnum = typeof FetchCastMetricsIntervalEnum[keyof typeof FetchCastMetricsIntervalEnum];
2 changes: 1 addition & 1 deletion src/api/apis/mute-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.6.1
* The version of the OpenAPI document: 2.7.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Loading

0 comments on commit 70a9e57

Please sign in to comment.