Skip to content

Commit

Permalink
fix: types for users.getSubscriptions (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbell authored Aug 10, 2023
1 parent 6d56c7f commit 88d1251
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/resources/users/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ import { Knock } from "../../knock";
import {
BulkIdentifyUser,
IdentifyProperties,
ListSubscriptionsOptions,
ListUserOptions,
User,
UserFeedOptions,
} from "./interfaces";
import { ObjectSubscription } from "../objects/interfaces";

export class Users {
constructor(readonly knock: Knock) {}
Expand Down Expand Up @@ -378,8 +380,8 @@ export class Users {

async getSubscriptions(
userId: string,
filteringOptions: ListSchedulesProps = {},
): Promise<PaginatedEntriesResponse<Schedule>> {
filteringOptions: ListSubscriptionsOptions = {},
): Promise<PaginatedEntriesResponse<ObjectSubscription>> {
if (!userId) {
throw new Error(`Incomplete arguments. You must provide a 'userId'`);
}
Expand Down
2 changes: 2 additions & 0 deletions src/resources/users/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ export interface ListUserOptions extends PaginationOptions {
email?: string;
user_id?: string;
}

export interface ListSubscriptionsOptions extends PaginationOptions {}

0 comments on commit 88d1251

Please sign in to comment.