From a641aa4adb9f3fd81d92d2a08a51e82719835bd2 Mon Sep 17 00:00:00 2001 From: Shreyaschorge Date: Mon, 4 Dec 2023 10:16:53 +0530 Subject: [PATCH 1/2] Generate code with v6.6.0 openapi-generator --- .../.openapi-generator/FILES | 2 + .../.openapi-generator/VERSION | 2 +- .../v2/openapi-farcaster/apis/cast-api.ts | 1 - .../v2/openapi-farcaster/apis/feed-api.ts | 1 - .../v2/openapi-farcaster/apis/follows-api.ts | 1 - .../apis/notifications-api.ts | 1 - .../v2/openapi-farcaster/apis/reaction-api.ts | 1 - .../v2/openapi-farcaster/apis/signer-api.ts | 1 - .../v2/openapi-farcaster/apis/storage-api.ts | 1 - .../v2/openapi-farcaster/apis/user-api.ts | 1 - src/neynar-api/v2/openapi-farcaster/common.ts | 2 +- .../models/cast-parent-author-all-of.ts | 30 ++++++++++ .../models/cast-parent-author.ts | 16 ++---- .../models/cast-with-interactions-all-of.ts | 57 +++++++++++++++++++ .../models/cast-with-interactions.ts | 5 +- .../v2/openapi-farcaster/models/index.ts | 2 + .../.openapi-generator/VERSION | 2 +- .../v2/openapi-recommendation/apis/nftapi.ts | 1 - .../v2/openapi-recommendation/common.ts | 2 +- 19 files changed, 105 insertions(+), 24 deletions(-) create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-parent-author-all-of.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts diff --git a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES index 678a3318..8573a2ce 100644 --- a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES +++ b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES @@ -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 diff --git a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/VERSION b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/VERSION index 73a86b19..cd802a1e 100644 --- a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/VERSION +++ b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +6.6.0 \ No newline at end of file diff --git a/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts index 1caf02e0..72b68105 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts @@ -401,4 +401,3 @@ export class CastApi extends BaseAPI { return CastApiFp(this.configuration).postCast(apiKey, postCastReqBody, options).then((request) => request(this.axios, this.basePath)); } } - diff --git a/src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts index 8ece6713..0ede2c5a 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts @@ -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)); } } - diff --git a/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts index 65d21f3a..3dc7dadb 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts @@ -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)); } } - diff --git a/src/neynar-api/v2/openapi-farcaster/apis/notifications-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/notifications-api.ts index 0edeb864..31f54dc4 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/notifications-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/notifications-api.ts @@ -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)); } } - diff --git a/src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts index c5e5e0bf..f27cda1a 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts @@ -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)); } } - diff --git a/src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts index 030f480e..f5ecd7c5 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts @@ -292,4 +292,3 @@ export class SignerApi extends BaseAPI { return SignerApiFp(this.configuration).signer(apiKey, signerUuid, options).then((request) => request(this.axios, this.basePath)); } } - diff --git a/src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts index 441d26ec..86590852 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts @@ -223,4 +223,3 @@ export class StorageApi extends BaseAPI { return StorageApiFp(this.configuration).storageUsage(apiKey, fid, options).then((request) => request(this.axios, this.basePath)); } } - diff --git a/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts index ec829efb..4c6d5980 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts @@ -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)); } } - diff --git a/src/neynar-api/v2/openapi-farcaster/common.ts b/src/neynar-api/v2/openapi-farcaster/common.ts index 5be4c9d2..784bdaad 100644 --- a/src/neynar-api/v2/openapi-farcaster/common.ts +++ b/src/neynar-api/v2/openapi-farcaster/common.ts @@ -144,7 +144,7 @@ export const toPathString = function (url: URL) { */ export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { return >(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(axiosRequestArgs); }; } diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-parent-author-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-parent-author-all-of.ts new file mode 100644 index 00000000..c76a977f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-parent-author-all-of.ts @@ -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; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-parent-author.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-parent-author.ts index 94fa06d1..bd910926 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/cast-parent-author.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-parent-author.ts @@ -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; + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts new file mode 100644 index 00000000..74dce06a --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts @@ -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} + * @memberof CastWithInteractionsAllOf + */ + 'mentioned_profiles': Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts index 09368ba5..edd274aa 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts @@ -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 @@ -39,6 +42,6 @@ import { User } from './user'; * @type CastWithInteractions * @export */ -export type CastWithInteractions = Cast; +export type CastWithInteractions = Cast & CastWithInteractionsAllOf; diff --git a/src/neynar-api/v2/openapi-farcaster/models/index.ts b/src/neynar-api/v2/openapi-farcaster/models/index.ts index 56c7ddcc..04dd1906 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/index.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/index.ts @@ -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'; diff --git a/src/neynar-api/v2/openapi-recommendation/.openapi-generator/VERSION b/src/neynar-api/v2/openapi-recommendation/.openapi-generator/VERSION index 73a86b19..cd802a1e 100644 --- a/src/neynar-api/v2/openapi-recommendation/.openapi-generator/VERSION +++ b/src/neynar-api/v2/openapi-recommendation/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +6.6.0 \ No newline at end of file diff --git a/src/neynar-api/v2/openapi-recommendation/apis/nftapi.ts b/src/neynar-api/v2/openapi-recommendation/apis/nftapi.ts index f2abf4a1..91d12636 100644 --- a/src/neynar-api/v2/openapi-recommendation/apis/nftapi.ts +++ b/src/neynar-api/v2/openapi-recommendation/apis/nftapi.ts @@ -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)); } } - diff --git a/src/neynar-api/v2/openapi-recommendation/common.ts b/src/neynar-api/v2/openapi-recommendation/common.ts index 8cd7382d..6d81906c 100644 --- a/src/neynar-api/v2/openapi-recommendation/common.ts +++ b/src/neynar-api/v2/openapi-recommendation/common.ts @@ -144,7 +144,7 @@ export const toPathString = function (url: URL) { */ export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { return >(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(axiosRequestArgs); }; } From b94836a44592fd4e482afac649518a14716285ef Mon Sep 17 00:00:00 2001 From: Shreyaschorge Date: Mon, 4 Dec 2023 10:18:41 +0530 Subject: [PATCH 2/2] Patch update: v1.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 606f5f44..74d0cbec 100644 --- a/package.json +++ b/package.json @@ -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",