Skip to content

Commit

Permalink
Merge pull request #212 from neynarxyz/val/neyn-3473-add-channel-cont…
Browse files Browse the repository at this point in the history
…ext-to-sdk

feat: add context for viewers and authors w.r.t. channels
  • Loading branch information
Shreyaschorge authored Oct 23, 2024
2 parents c1d79c0 + 040306a commit 985bfff
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ models/channel-response-bulk.ts
models/channel-response.ts
models/channel-search-response.ts
models/channel-type.ts
models/channel-user-context.ts
models/channel-viewer-context.ts
models/channel.ts
models/conflict-error-res.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import { CastWithInteractionsReplies } from './cast-with-interactions-replies';
import { ChannelOrDehydratedChannel } from './channel-or-dehydrated-channel';
// May contain unused imports in some cases
// @ts-ignore
import { ChannelUserContext } from './channel-user-context';
// May contain unused imports in some cases
// @ts-ignore
import { Frame } from './frame';
// May contain unused imports in some cases
// @ts-ignore
Expand Down Expand Up @@ -80,5 +83,11 @@ export interface CastWithInteractionsAllOf {
* @memberof CastWithInteractionsAllOf
*/
'viewer_context'?: CastViewerContext;
/**
*
* @type {ChannelUserContext}
* @memberof CastWithInteractionsAllOf
*/
'author_channel_context'?: ChannelUserContext;
}

Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ import { CastWithInteractionsReplies } from './cast-with-interactions-replies';
import { ChannelOrDehydratedChannel } from './channel-or-dehydrated-channel';
// May contain unused imports in some cases
// @ts-ignore
import { ChannelUserContext } from './channel-user-context';
// May contain unused imports in some cases
// @ts-ignore
import { Embed } from './embed';
// May contain unused imports in some cases
// @ts-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ import { CastWithInteractionsReplies } from './cast-with-interactions-replies';
import { ChannelOrDehydratedChannel } from './channel-or-dehydrated-channel';
// May contain unused imports in some cases
// @ts-ignore
import { ChannelUserContext } from './channel-user-context';
// May contain unused imports in some cases
// @ts-ignore
import { Embed } from './embed';
// May contain unused imports in some cases
// @ts-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ import { CastWithInteractionsReplies } from './cast-with-interactions-replies';
import { ChannelOrDehydratedChannel } from './channel-or-dehydrated-channel';
// May contain unused imports in some cases
// @ts-ignore
import { ChannelUserContext } from './channel-user-context';
// May contain unused imports in some cases
// @ts-ignore
import { Embed } from './embed';
// May contain unused imports in some cases
// @ts-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Channel } from './channel';
import { ChannelExternalLink } from './channel-external-link';
// May contain unused imports in some cases
// @ts-ignore
import { ChannelViewerContext } from './channel-viewer-context';
import { ChannelUserContext } from './channel-user-context';
// May contain unused imports in some cases
// @ts-ignore
import { DehydratedChannel } from './dehydrated-channel';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Channel } from './channel';
import { ChannelExternalLink } from './channel-external-link';
// May contain unused imports in some cases
// @ts-ignore
import { ChannelViewerContext } from './channel-viewer-context';
import { ChannelUserContext } from './channel-user-context';
// May contain unused imports in some cases
// @ts-ignore
import { DehydratedChannel } from './dehydrated-channel';
Expand Down
41 changes: 41 additions & 0 deletions src/neynar-api/v2/openapi-farcaster/models/channel-user-context.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/* 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 { ChannelMemberRole } from './channel-member-role';

/**
* Adds context on the viewer\'s or author\'s role in the channel.
* @export
* @interface ChannelUserContext
*/
export interface ChannelUserContext {
/**
* Indicates if the user is following the channel.
* @type {boolean}
* @memberof ChannelUserContext
*/
'following': boolean;
/**
*
* @type {ChannelMemberRole}
* @memberof ChannelUserContext
*/
'role'?: ChannelMemberRole;
}



6 changes: 3 additions & 3 deletions src/neynar-api/v2/openapi-farcaster/models/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { ChannelExternalLink } from './channel-external-link';
// May contain unused imports in some cases
// @ts-ignore
import { ChannelViewerContext } from './channel-viewer-context';
import { ChannelUserContext } from './channel-user-context';
// May contain unused imports in some cases
// @ts-ignore
import { User } from './user';
Expand Down Expand Up @@ -128,10 +128,10 @@ export interface Channel {
'hosts'?: Array<User>;
/**
*
* @type {ChannelViewerContext}
* @type {ChannelUserContext}
* @memberof Channel
*/
'viewer_context'?: ChannelViewerContext;
'viewer_context'?: ChannelUserContext;
}

export const ChannelObjectEnum = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
*/


// May contain unused imports in some cases
// @ts-ignore
import { ChannelUserContext } from './channel-user-context';

/**
*
Expand Down Expand Up @@ -44,6 +47,12 @@ export interface DehydratedChannel {
* @memberof DehydratedChannel
*/
'image_url'?: string;
/**
*
* @type {ChannelUserContext}
* @memberof DehydratedChannel
*/
'viewer_context'?: ChannelUserContext;
}

export const DehydratedChannelObjectEnum = {
Expand Down
1 change: 1 addition & 0 deletions src/neynar-api/v2/openapi-farcaster/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export * from './channel-response';
export * from './channel-response-bulk';
export * from './channel-search-response';
export * from './channel-type';
export * from './channel-user-context';
export * from './channel-viewer-context';
export * from './conflict-error-res';
export * from './conversation';
Expand Down
2 changes: 1 addition & 1 deletion src/oas
Submodule oas updated 1 files
+17 −1 src/v2/spec.yaml

0 comments on commit 985bfff

Please sign in to comment.