Skip to content

Commit

Permalink
Feat: usc id_list endpoint and related ref
Browse files Browse the repository at this point in the history
  • Loading branch information
utkusarioglu committed Mar 1, 2021
1 parent 75a4319 commit e8610ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/endpoints/user.endpoint.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
WithCommunityId,
CommunitySelect,
} from '../references/community.reference.types';
import type { UserCommunitySubscription_id_list_res } from '../references/user-community-subscription.reference.types';
import type { WithRequestId } from '../helpers/mixin.types';

/**
Expand Down Expand Up @@ -77,16 +78,16 @@ export interface UserEndpoint {
};

_user_community_subscription: {
_list: {
_id_list: {
_v1: Get<
'/user/:username/subscriptions/:requestId',
WithUsername & WithRequestId,
CommunitySelect[]
'/user/:userId/subscriptions/id/:requestId',
WithUserId & WithRequestId,
UserCommunitySubscription_id_list_res
>;
};
_alter: {
_v1: Post<
'user/:userId/:actionType/:communityId/:requestId',
'/user/:userId/:actionType/:communityId/:requestId',
WithUserId & WithCommunityId & WithCommunityActionTypes & WithRequestId,
{},
WithUserId & WithCommunityId & WithCommunityActionTypes
Expand Down
7 changes: 7 additions & 0 deletions src/references/user-community-subscription.reference.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ export type UserCommunitySubscriptionSelect = BuildSelect<
{},
{ user_id: 'userId'; community_id: 'communityId' }
>['Select'];

export type UserCommunitySubscription_id_list_res = BuildSelect<
UserCommunitySubscriptionPipeline,
'community_id',
{},
{ community_id: 'communityId' }
>['Select']['communityId'][];

0 comments on commit e8610ad

Please sign in to comment.