Skip to content

Commit

Permalink
Prepare branch for v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreyaschorge committed Oct 29, 2024
1 parent 41866bc commit b0cbfe9
Show file tree
Hide file tree
Showing 181 changed files with 3,112 additions and 1,354 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Publish to npm 🚀"
on:
push:
branches:
- main
- v1

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion openapitools.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "6.6.0"
"version": "7.9.0"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"typescript": "^5.2.2"
},
"dependencies": {
"@openapitools/openapi-generator-cli": "^2.7.0",
"@openapitools/openapi-generator-cli": "^2.14.1",
"axios": "^1.6.2",
"semver": "^7.6.0",
"viem": "^2.21.14"
Expand Down
26 changes: 11 additions & 15 deletions src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ models/ban-record.ts
models/ban-req-body.ts
models/ban-response.ts
models/block-list-response.ts
models/block-list.ts
models/block-record.ts
models/bulk-casts-response.ts
models/bulk-follow-response.ts
Expand All @@ -51,11 +50,11 @@ models/cast-notification-type.ts
models/cast-param-type.ts
models/cast-response.ts
models/cast-viewer-context.ts
models/cast-with-interactions-all-of.ts
models/cast-with-interactions-and-conversations-all-of.ts
models/cast-with-interactions-and-conversations-ref-all-of.ts
models/cast-with-interactions-and-conversations-any-of.ts
models/cast-with-interactions-and-conversations-ref-any-of.ts
models/cast-with-interactions-and-conversations-ref.ts
models/cast-with-interactions-and-conversations.ts
models/cast-with-interactions-any-of.ts
models/cast-with-interactions-reactions.ts
models/cast-with-interactions-replies.ts
models/cast-with-interactions.ts
Expand Down Expand Up @@ -96,8 +95,8 @@ models/embed-cast-deep.ts
models/embed-cast.ts
models/embed-deep.ts
models/embed-type.ts
models/embed-url-metadata-html-all-of-oembed.ts
models/embed-url-metadata-html-all-of.ts
models/embed-url-metadata-html-any-of-oembed.ts
models/embed-url-metadata-html-any-of.ts
models/embed-url-metadata-html.ts
models/embed-url-metadata-image.ts
models/embed-url-metadata-video-stream-inner.ts
Expand Down Expand Up @@ -143,7 +142,6 @@ models/frame-validate-analytics-response.ts
models/frame-validate-analytics-total-interactors.ts
models/frame-validate-list-response.ts
models/frame.ts
models/get-casts-req-body.ts
models/hydrated-follower.ts
models/image-object.ts
models/index.ts
Expand All @@ -152,7 +150,6 @@ models/location-address.ts
models/location.ts
models/mark-notifications-as-seen-req-body.ts
models/mute-list-response.ts
models/mute-list.ts
models/mute-record.ts
models/mute-req-body.ts
models/mute-response.ts
Expand All @@ -173,20 +170,19 @@ models/notification-type.ts
models/notification.ts
models/notifications-response.ts
models/oembed-data.ts
models/oembed-link-data-all-of.ts
models/oembed-link-data-any-of.ts
models/oembed-link-data.ts
models/oembed-photo-data-all-of.ts
models/oembed-photo-data-any-of.ts
models/oembed-photo-data.ts
models/oembed-rich-data-all-of.ts
models/oembed-rich-data-any-of.ts
models/oembed-rich-data.ts
models/oembed-video-data-all-of.ts
models/oembed-video-data-any-of.ts
models/oembed-video-data.ts
models/og-object.ts
models/operation-response.ts
models/post-cast-req-body-embeds-cast-id-properties.ts
models/post-cast-req-body-embeds.ts
models/post-cast-req-body.ts
models/post-cast-response-cast-author.ts
models/post-cast-response-cast.ts
models/post-cast-response.ts
models/profile-url-pfp.ts
Expand Down Expand Up @@ -216,7 +212,7 @@ models/storage-allocation.ts
models/storage-allocations-response.ts
models/storage-object.ts
models/storage-usage-response.ts
models/subscribed-to-all-of.ts
models/subscribed-to-any-of.ts
models/subscribed-to-object.ts
models/subscribed-to-response.ts
models/subscribed-to.ts
Expand Down Expand Up @@ -264,7 +260,7 @@ models/webhook-delete-req-body.ts
models/webhook-list-response.ts
models/webhook-patch-req-body.ts
models/webhook-post-req-body.ts
models/webhook-put-req-body-all-of.ts
models/webhook-put-req-body-any-of.ts
models/webhook-put-req-body.ts
models/webhook-response.ts
models/webhook-secret.ts
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.6.0
7.9.0
22 changes: 14 additions & 8 deletions src/neynar-api/v2/openapi-farcaster/apis/action-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@


import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
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, RequestArgs, BaseAPI, RequiredError } from '../base';
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import { FarcasterActionReqBody } from '../models';
import type { FarcasterActionReqBody } from '../models';
/**
* ActionApi - axios parameter creator
* @export
Expand All @@ -37,7 +37,7 @@ export const ActionApiAxiosParamCreator = function (configuration?: Configuratio
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
publishFarcasterAction: async (apiKey: string, farcasterActionReqBody: FarcasterActionReqBody, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
publishFarcasterAction: async (apiKey: string, farcasterActionReqBody: FarcasterActionReqBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'apiKey' is not null or undefined
assertParamExists('publishFarcasterAction', 'apiKey', apiKey)
// verify required parameter 'farcasterActionReqBody' is not null or undefined
Expand All @@ -54,6 +54,9 @@ export const ActionApiAxiosParamCreator = function (configuration?: Configuratio
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

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

if (apiKey != null) {
localVarHeaderParameter['api_key'] = String(apiKey);
}
Expand Down Expand Up @@ -90,9 +93,11 @@ export const ActionApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async publishFarcasterAction(apiKey: string, farcasterActionReqBody: FarcasterActionReqBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any; }>> {
async publishFarcasterAction(apiKey: string, farcasterActionReqBody: FarcasterActionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any; }>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.publishFarcasterAction(apiKey, farcasterActionReqBody, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['ActionApi.publishFarcasterAction']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
Expand All @@ -112,7 +117,7 @@ export const ActionApiFactory = function (configuration?: Configuration, basePat
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
publishFarcasterAction(apiKey: string, farcasterActionReqBody: FarcasterActionReqBody, options?: any): AxiosPromise<{ [key: string]: any; }> {
publishFarcasterAction(apiKey: string, farcasterActionReqBody: FarcasterActionReqBody, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any; }> {
return localVarFp.publishFarcasterAction(apiKey, farcasterActionReqBody, options).then((request) => request(axios, basePath));
},
};
Expand All @@ -134,7 +139,8 @@ export class ActionApi extends BaseAPI {
* @throws {RequiredError}
* @memberof ActionApi
*/
public publishFarcasterAction(apiKey: string, farcasterActionReqBody: FarcasterActionReqBody, options?: AxiosRequestConfig) {
public publishFarcasterAction(apiKey: string, farcasterActionReqBody: FarcasterActionReqBody, options?: RawAxiosRequestConfig) {
return ActionApiFp(this.configuration).publishFarcasterAction(apiKey, farcasterActionReqBody, options).then((request) => request(this.axios, this.basePath));
}
}

58 changes: 37 additions & 21 deletions src/neynar-api/v2/openapi-farcaster/apis/ban-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@


import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
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, RequestArgs, BaseAPI, RequiredError } from '../base';
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import { BanListResponse } from '../models';
import type { BanListResponse } from '../models';
// @ts-ignore
import { BanReqBody } from '../models';
import type { BanReqBody } from '../models';
// @ts-ignore
import { BanResponse } from '../models';
import type { BanResponse } from '../models';
// @ts-ignore
import { ErrorRes } from '../models';
import type { ErrorRes } from '../models';
/**
* BanApi - axios parameter creator
* @export
Expand All @@ -43,7 +43,7 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addBan: async (apiKey: string, banReqBody: BanReqBody, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
addBan: async (apiKey: string, banReqBody: BanReqBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'apiKey' is not null or undefined
assertParamExists('addBan', 'apiKey', apiKey)
// verify required parameter 'banReqBody' is not null or undefined
Expand All @@ -60,6 +60,9 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration)
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

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

if (apiKey != null) {
localVarHeaderParameter['api_key'] = String(apiKey);
}
Expand Down Expand Up @@ -87,7 +90,7 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
banList: async (apiKey: string, limit?: number, cursor?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
banList: async (apiKey: string, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'apiKey' is not null or undefined
assertParamExists('banList', 'apiKey', apiKey)
const localVarPath = `/farcaster/ban/list`;
Expand All @@ -102,6 +105,9 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration)
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

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

if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
Expand Down Expand Up @@ -133,7 +139,7 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteBan: async (apiKey: string, banReqBody: BanReqBody, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
deleteBan: async (apiKey: string, banReqBody: BanReqBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'apiKey' is not null or undefined
assertParamExists('deleteBan', 'apiKey', apiKey)
// verify required parameter 'banReqBody' is not null or undefined
Expand All @@ -150,6 +156,9 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration)
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

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

if (apiKey != null) {
localVarHeaderParameter['api_key'] = String(apiKey);
}
Expand Down Expand Up @@ -186,9 +195,11 @@ export const BanApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async addBan(apiKey: string, banReqBody: BanReqBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BanResponse>> {
async addBan(apiKey: string, banReqBody: BanReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BanResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.addBan(apiKey, banReqBody, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['BanApi.addBan']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Fetches all FIDs that your app has banned.
Expand All @@ -199,9 +210,11 @@ export const BanApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async banList(apiKey: string, limit?: number, cursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BanListResponse>> {
async banList(apiKey: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BanListResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.banList(apiKey, limit, cursor, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['BanApi.banList']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Deletes a list of FIDs from the app associated with your API key.
Expand All @@ -211,9 +224,11 @@ export const BanApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteBan(apiKey: string, banReqBody: BanReqBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BanResponse>> {
async deleteBan(apiKey: string, banReqBody: BanReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BanResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBan(apiKey, banReqBody, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['BanApi.deleteBan']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
Expand All @@ -233,7 +248,7 @@ export const BanApiFactory = function (configuration?: Configuration, basePath?:
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addBan(apiKey: string, banReqBody: BanReqBody, options?: any): AxiosPromise<BanResponse> {
addBan(apiKey: string, banReqBody: BanReqBody, options?: RawAxiosRequestConfig): AxiosPromise<BanResponse> {
return localVarFp.addBan(apiKey, banReqBody, options).then((request) => request(axios, basePath));
},
/**
Expand All @@ -245,7 +260,7 @@ export const BanApiFactory = function (configuration?: Configuration, basePath?:
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
banList(apiKey: string, limit?: number, cursor?: string, options?: any): AxiosPromise<BanListResponse> {
banList(apiKey: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise<BanListResponse> {
return localVarFp.banList(apiKey, limit, cursor, options).then((request) => request(axios, basePath));
},
/**
Expand All @@ -256,7 +271,7 @@ export const BanApiFactory = function (configuration?: Configuration, basePath?:
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteBan(apiKey: string, banReqBody: BanReqBody, options?: any): AxiosPromise<BanResponse> {
deleteBan(apiKey: string, banReqBody: BanReqBody, options?: RawAxiosRequestConfig): AxiosPromise<BanResponse> {
return localVarFp.deleteBan(apiKey, banReqBody, options).then((request) => request(axios, basePath));
},
};
Expand All @@ -278,7 +293,7 @@ export class BanApi extends BaseAPI {
* @throws {RequiredError}
* @memberof BanApi
*/
public addBan(apiKey: string, banReqBody: BanReqBody, options?: AxiosRequestConfig) {
public addBan(apiKey: string, banReqBody: BanReqBody, options?: RawAxiosRequestConfig) {
return BanApiFp(this.configuration).addBan(apiKey, banReqBody, options).then((request) => request(this.axios, this.basePath));
}

Expand All @@ -292,7 +307,7 @@ export class BanApi extends BaseAPI {
* @throws {RequiredError}
* @memberof BanApi
*/
public banList(apiKey: string, limit?: number, cursor?: string, options?: AxiosRequestConfig) {
public banList(apiKey: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) {
return BanApiFp(this.configuration).banList(apiKey, limit, cursor, options).then((request) => request(this.axios, this.basePath));
}

Expand All @@ -305,7 +320,8 @@ export class BanApi extends BaseAPI {
* @throws {RequiredError}
* @memberof BanApi
*/
public deleteBan(apiKey: string, banReqBody: BanReqBody, options?: AxiosRequestConfig) {
public deleteBan(apiKey: string, banReqBody: BanReqBody, options?: RawAxiosRequestConfig) {
return BanApiFp(this.configuration).deleteBan(apiKey, banReqBody, options).then((request) => request(this.axios, this.basePath));
}
}

Loading

0 comments on commit b0cbfe9

Please sign in to comment.