Skip to content

Commit

Permalink
Generate code with 6.6.0 openapi-generator for v2 APIs
Browse files Browse the repository at this point in the history
Generate code with 6.6.0 openapi-generator for v2 APIs
  • Loading branch information
Shreyaschorge authored Dec 4, 2023
2 parents d097119 + b94836a commit 358ddb4
Show file tree
Hide file tree
Showing 20 changed files with 106 additions and 25 deletions.
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": "1.1.0",
"version": "1.1.1",
"description": "SDK to interact with Neynar APIs (https://docs.neynar.com/)",
"main": "./build/index.js",
"types": "./build/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ models/bulk-users-response.ts
models/cast-id.ts
models/cast-notification-type.ts
models/cast-param-type.ts
models/cast-parent-author-all-of.ts
models/cast-parent-author.ts
models/cast-response.ts
models/cast-with-interactions-all-of.ts
models/cast-with-interactions-reactions.ts
models/cast-with-interactions-replies.ts
models/cast-with-interactions.ts
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.1
6.6.0
1 change: 0 additions & 1 deletion src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,4 +401,3 @@ export class CastApi extends BaseAPI {
return CastApiFp(this.configuration).postCast(apiKey, postCastReqBody, options).then((request) => request(this.axios, this.basePath));
}
}

1 change: 0 additions & 1 deletion src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,3 @@ export class FeedApi extends BaseAPI {
return FeedApiFp(this.configuration).feed(apiKey, feedType, filterType, fid, fids, parentUrl, withRecasts, limit, cursor, options).then((request) => request(this.axios, this.basePath));
}
}

1 change: 0 additions & 1 deletion src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,3 @@ export class FollowsApi extends BaseAPI {
return FollowsApiFp(this.configuration).relevantFollowers(apiKey, targetFid, viewerFid, options).then((request) => request(this.axios, this.basePath));
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,3 @@ export class NotificationsApi extends BaseAPI {
return NotificationsApiFp(this.configuration).notifications(apiKey, fid, limit, cursor, options).then((request) => request(this.axios, this.basePath));
}
}

1 change: 0 additions & 1 deletion src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,4 +331,3 @@ export class ReactionApi extends BaseAPI {
return ReactionApiFp(this.configuration).reactionsUser(apiKey, fid, type, limit, cursor, options).then((request) => request(this.axios, this.basePath));
}
}

1 change: 0 additions & 1 deletion src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,3 @@ export class SignerApi extends BaseAPI {
return SignerApiFp(this.configuration).signer(apiKey, signerUuid, options).then((request) => request(this.axios, this.basePath));
}
}

1 change: 0 additions & 1 deletion src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,3 @@ export class StorageApi extends BaseAPI {
return StorageApiFp(this.configuration).storageUsage(apiKey, fid, options).then((request) => request(this.axios, this.basePath));
}
}

1 change: 0 additions & 1 deletion src/neynar-api/v2/openapi-farcaster/apis/user-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -730,4 +730,3 @@ export class UserApi extends BaseAPI {
return UserApiFp(this.configuration).userSearch(apiKey, q, viewerFid, options).then((request) => request(this.axios, this.basePath));
}
}

2 changes: 1 addition & 1 deletion src/neynar-api/v2/openapi-farcaster/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const toPathString = function (url: URL) {
*/
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || axios.defaults.baseURL || basePath) + axiosArgs.url};
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
return axios.request<T, R>(axiosRequestArgs);
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* tslint:disable */
/* eslint-disable */
/**
* Farcaster API V2
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/



/**
*
* @export
* @interface CastParentAuthorAllOf
*/
export interface CastParentAuthorAllOf {
/**
*
* @type {string}
* @memberof CastParentAuthorAllOf
*/
'fid': string | null;
}

16 changes: 6 additions & 10 deletions src/neynar-api/v2/openapi-farcaster/models/cast-parent-author.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,14 @@
*/


// May contain unused imports in some cases
// @ts-ignore
import { CastParentAuthorAllOf } from './cast-parent-author-all-of';

/**
*
* @type CastParentAuthor
* @export
* @interface CastParentAuthor
*/
export interface CastParentAuthor {
/**
*
* @type {string}
* @memberof CastParentAuthor
*/
'fid': string | null;
}
export type CastParentAuthor = CastParentAuthorAllOf;


Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/* tslint:disable */
/* eslint-disable */
/**
* Farcaster API V2
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


// May contain unused imports in some cases
// @ts-ignore
import { CastWithInteractionsReactions } from './cast-with-interactions-reactions';
// May contain unused imports in some cases
// @ts-ignore
import { CastWithInteractionsReplies } from './cast-with-interactions-replies';
// May contain unused imports in some cases
// @ts-ignore
import { User } from './user';

/**
*
* @export
* @interface CastWithInteractionsAllOf
*/
export interface CastWithInteractionsAllOf {
/**
*
* @type {CastWithInteractionsReactions}
* @memberof CastWithInteractionsAllOf
*/
'reactions': CastWithInteractionsReactions;
/**
*
* @type {CastWithInteractionsReplies}
* @memberof CastWithInteractionsAllOf
*/
'replies': CastWithInteractionsReplies;
/**
*
* @type {string}
* @memberof CastWithInteractionsAllOf
*/
'thread_hash': string | null;
/**
*
* @type {Array<User>}
* @memberof CastWithInteractionsAllOf
*/
'mentioned_profiles': Array<User>;
}

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import { CastNotificationType } from './cast-notification-type';
import { CastParentAuthor } from './cast-parent-author';
// May contain unused imports in some cases
// @ts-ignore
import { CastWithInteractionsAllOf } from './cast-with-interactions-all-of';
// May contain unused imports in some cases
// @ts-ignore
import { CastWithInteractionsReactions } from './cast-with-interactions-reactions';
// May contain unused imports in some cases
// @ts-ignore
Expand All @@ -39,6 +42,6 @@ import { User } from './user';
* @type CastWithInteractions
* @export
*/
export type CastWithInteractions = Cast;
export type CastWithInteractions = Cast & CastWithInteractionsAllOf;


2 changes: 2 additions & 0 deletions src/neynar-api/v2/openapi-farcaster/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ export * from './cast-id';
export * from './cast-notification-type';
export * from './cast-param-type';
export * from './cast-parent-author';
export * from './cast-parent-author-all-of';
export * from './cast-response';
export * from './cast-with-interactions';
export * from './cast-with-interactions-all-of';
export * from './cast-with-interactions-reactions';
export * from './cast-with-interactions-replies';
export * from './casts-response';
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.1
6.6.0
1 change: 0 additions & 1 deletion src/neynar-api/v2/openapi-recommendation/apis/nftapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,3 @@ export class NFTApi extends BaseAPI {
return NFTApiFp(this.configuration).fetchRelevantMints(apiKey, address, contractAddress, tokenId, options).then((request) => request(this.axios, this.basePath));
}
}

2 changes: 1 addition & 1 deletion src/neynar-api/v2/openapi-recommendation/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const toPathString = function (url: URL) {
*/
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || axios.defaults.baseURL || basePath) + axiosArgs.url};
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
return axios.request<T, R>(axiosRequestArgs);
};
}

0 comments on commit 358ddb4

Please sign in to comment.