Skip to content

Commit

Permalink
feat: GET /member/invite/list
Browse files Browse the repository at this point in the history
  • Loading branch information
manan19 committed Oct 4, 2024
1 parent 69064a0 commit 12971f5
Showing 1 changed file with 107 additions and 27 deletions.
134 changes: 107 additions & 27 deletions src/v2/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1854,6 +1854,22 @@ components:
$ref: "#/components/schemas/Channel"
next:
$ref: "#/components/schemas/NextCursor"
ChannelMemberInvite:
type: object
required:
- channel_id
- role
- inviter
- invited
properties:
channel_id:
$ref: "#/components/schemas/ChannelId"
role:
$ref: "#/components/schemas/ChannelMemberRole"
inviter:
$ref: "#/components/schemas/User"
invited:
$ref: "#/components/schemas/User"
ChannelMember:
type: object
required:
Expand All @@ -1878,6 +1894,17 @@ components:
$ref: "#/components/schemas/ChannelMember"
next:
$ref: "#/components/schemas/NextCursor"
ChannelMemberInviteListResponse:
type: object
required:
- invites
properties:
invites:
type: array
items:
$ref: "#/components/schemas/ChannelMemberInvite"
next:
$ref: "#/components/schemas/NextCursor"
ChannelSearchResponse:
type: object
required:
Expand Down Expand Up @@ -5925,13 +5952,13 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/ChannelListResponse"
/farcaster/channel/member/invite:
post:
/farcaster/channel/member:
delete:
tags:
- Channel
summary: Invite a user to a channel
description: Invite a user to a channel
operationId: invite-channel-member
summary: Remove a user from a channel
description: Remove a user from a channel or a user's invite to a channel role
operationId: remove-channel-member
parameters:
- $ref: "#/components/parameters/ApiKey"
requestBody:
Expand Down Expand Up @@ -5965,12 +5992,61 @@ paths:
$ref: "#/components/responses/400Response"
"500":
$ref: "#/components/responses/500Response"
put:
/farcaster/channel/member/list:
get:
tags:
- Channel
summary: Accept or reject a channel invite
description: Accept or reject a channel invite
operationId: respond-channel-invite
summary: Retrieve a list of members in a channel
description: Retrieve a list of members in a channel
operationId: list-channel-members
parameters:
- $ref: "#/components/parameters/ApiKey"
- name: channel_id
in: query
required: true
schema:
$ref: "#/components/schemas/ChannelId"
example: "neynar"
description: Channel ID for the channel being queried
- name: fid
in: query
schema:
$ref: "#/components/schemas/Fid"
example: 194
description: FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members.
- name: limit
in: query
description: Number of results to retrieve
required: false
schema:
type: integer
default: 20
minimum: 1
maximum: 100
- name: cursor
in: query
description: Pagination cursor.
required: false
schema:
type: string
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/ChannelMemberListResponse"
"500":
$ref: "#/components/responses/500Response"
"400":
$ref: "#/components/responses/400Response"
/farcaster/channel/member/invite:
post:
tags:
- Channel
summary: Invite a user to a channel
description: Invite a user to a channel
operationId: invite-channel-member
parameters:
- $ref: "#/components/parameters/ApiKey"
requestBody:
Expand All @@ -5982,18 +6058,17 @@ paths:
required:
- signer_uuid
- channel_id
- fid
- role
- accept
properties:
signer_uuid:
$ref: "#/components/schemas/SignerUUID"
channel_id:
$ref: "#/components/schemas/ChannelId"
fid:
$ref: "#/components/schemas/Fid"
role:
$ref: "#/components/schemas/ChannelMemberRole"
accept:
type: boolean
description: Accept or reject the invite
responses:
"200":
description: Successful operation.
Expand All @@ -6005,13 +6080,12 @@ paths:
$ref: "#/components/responses/400Response"
"500":
$ref: "#/components/responses/500Response"
/farcaster/channel/member:
delete:
put:
tags:
- Channel
summary: Remove a user from a channel
description: Remove a user from a channel or a user's invite to a channel role
operationId: remove-channel-member
summary: Accept or reject a channel invite
description: Accept or reject a channel invite
operationId: respond-channel-invite
parameters:
- $ref: "#/components/parameters/ApiKey"
requestBody:
Expand All @@ -6023,17 +6097,18 @@ paths:
required:
- signer_uuid
- channel_id
- fid
- role
- accept
properties:
signer_uuid:
$ref: "#/components/schemas/SignerUUID"
channel_id:
$ref: "#/components/schemas/ChannelId"
fid:
$ref: "#/components/schemas/Fid"
role:
$ref: "#/components/schemas/ChannelMemberRole"
accept:
type: boolean
description: Accept or reject the invite
responses:
"200":
description: Successful operation.
Expand All @@ -6045,22 +6120,27 @@ paths:
$ref: "#/components/responses/400Response"
"500":
$ref: "#/components/responses/500Response"
/farcaster/channel/member/list:
/farcaster/channel/member/invite/list:
get:
tags:
- Channel
summary: Retrieve a list of members in a channel
description: Retrieve a list of members in a channel
operationId: list-channel-members
summary: Retrieve a list of invites in a channel
description: Retrieve a list of invites in a channel
operationId: list-channel-invites
parameters:
- $ref: "#/components/parameters/ApiKey"
- name: channel_id
in: query
required: true
schema:
$ref: "#/components/schemas/ChannelId"
example: "neynar"
description: Channel ID for the channel being queried
- name: invited_fid
in: query
schema:
$ref: "#/components/schemas/Fid"
example: 194
description: FID of the user being invited
- name: limit
in: query
description: Number of results to retrieve
Expand All @@ -6082,7 +6162,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ChannelMemberListResponse"
$ref: "#/components/schemas/ChannelMemberInviteListResponse"
"500":
$ref: "#/components/responses/500Response"
"400":
Expand Down

0 comments on commit 12971f5

Please sign in to comment.