Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve tslint errors #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/fetchClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const defaultConfig: FetchClientConfig = {
headers: {},
};

export default class FetchClient {
export class FetchClient {
config: FetchClientConfig;

constructor(config?: FetchClientConfig) {
Expand Down
2 changes: 0 additions & 2 deletions src/common/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ export interface ChannelData<T = CommonMetadata> {
data: T;
}

export interface SetChannelDataProperties {}

type PageInfo = {
before: string;
after: string;
Expand Down
8 changes: 5 additions & 3 deletions src/knock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { BulkOperations } from "./resources/bulk_operations";
import { Objects } from "./resources/objects";
import { Messages } from "./resources/messages";
import { Tenants } from "./resources/tenants";
import FetchClient, { FetchResponse } from "./common/fetchClient";
import { FetchClient, FetchResponse } from "./common/fetchClient";
import {
TokenEntity,
TokenGrant,
Expand Down Expand Up @@ -87,8 +87,10 @@ class Knock {
* For more information, visit https://docs.knock.app/in-app-ui/security-and-authentication#authentication-with-enhanced-security-enabled
*
* @param userId {string} The ID of the user that needs a token, e.g. the user viewing an in-app feed.
* @param options Optionally specify the signing key to use (in PEM or base-64 encoded format), and how long the token should be valid for in seconds
* @returns {Promise<string>} A JWT token that can be used to authenticate requests to the Knock API (e.g. by passing into the <KnockFeedProvider /> component)
* @param options Optionally specify the signing key to use (in PEM or base-64 encoded format),
* and how long the token should be valid for in seconds
* @returns {Promise<string>} A JWT token that can be used to authenticate requests to the Knock API
* (e.g. by passing into the <KnockFeedProvider /> component)
*/
static async signUserToken(userId: string, options?: SignUserTokenOptions) {
const signingKey = prepareSigningKey(options?.signingKey);
Expand Down
2 changes: 1 addition & 1 deletion src/resources/messages/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface ListMessagesOptions extends PaginationOptions {
channel_id?: string;
message_ids?: string[];
trigger_data?: Record<string, any>;
workflow_categories?: String[];
workflow_categories?: string[];
"inserted_at.gt"?: string;
"inserted_at.gte"?: string;
"inserted_at.lt"?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/resources/objects/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface BulkAddSubscriptionsOption<T = CommonMetadata> {
}

export interface ListObjectOptions extends PaginationOptions {
include?: Array<"preferences">;
include?: "preferences"[];
}

export interface ListObjectSubscriptionsOptions extends PaginationOptions {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/users/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface UserFeedOptions extends PaginationOptions {
}

export interface ListUserOptions extends PaginationOptions {
include?: Array<"preferences">;
include?: "preferences"[];
}

export interface ListSubscriptionsOptions extends PaginationOptions {
Expand Down
Loading