From 956bcf89e51ab13d9f83be09561d688650030083 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 19:20:50 +0000 Subject: [PATCH] fix: resolve tslint errors Co-Authored-By: Christopher Bell --- src/common/fetchClient.ts | 2 +- src/common/interfaces.ts | 2 -- src/knock.ts | 8 +++++--- src/resources/messages/interfaces.ts | 2 +- src/resources/objects/interfaces.ts | 2 +- src/resources/users/interfaces.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/common/fetchClient.ts b/src/common/fetchClient.ts index 1d9a26b..3778596 100644 --- a/src/common/fetchClient.ts +++ b/src/common/fetchClient.ts @@ -27,7 +27,7 @@ const defaultConfig: FetchClientConfig = { headers: {}, }; -export default class FetchClient { +export class FetchClient { config: FetchClientConfig; constructor(config?: FetchClientConfig) { diff --git a/src/common/interfaces.ts b/src/common/interfaces.ts index de8a7da..afefa70 100644 --- a/src/common/interfaces.ts +++ b/src/common/interfaces.ts @@ -37,8 +37,6 @@ export interface ChannelData { data: T; } -export interface SetChannelDataProperties {} - type PageInfo = { before: string; after: string; diff --git a/src/knock.ts b/src/knock.ts index 22392e4..6d679db 100644 --- a/src/knock.ts +++ b/src/knock.ts @@ -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, @@ -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} A JWT token that can be used to authenticate requests to the Knock API (e.g. by passing into the 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} A JWT token that can be used to authenticate requests to the Knock API + * (e.g. by passing into the component) */ static async signUserToken(userId: string, options?: SignUserTokenOptions) { const signingKey = prepareSigningKey(options?.signingKey); diff --git a/src/resources/messages/interfaces.ts b/src/resources/messages/interfaces.ts index 1d6eba5..7f65428 100644 --- a/src/resources/messages/interfaces.ts +++ b/src/resources/messages/interfaces.ts @@ -45,7 +45,7 @@ export interface ListMessagesOptions extends PaginationOptions { channel_id?: string; message_ids?: string[]; trigger_data?: Record; - workflow_categories?: String[]; + workflow_categories?: string[]; "inserted_at.gt"?: string; "inserted_at.gte"?: string; "inserted_at.lt"?: string; diff --git a/src/resources/objects/interfaces.ts b/src/resources/objects/interfaces.ts index a37a46a..60f294b 100644 --- a/src/resources/objects/interfaces.ts +++ b/src/resources/objects/interfaces.ts @@ -36,7 +36,7 @@ export interface BulkAddSubscriptionsOption { } export interface ListObjectOptions extends PaginationOptions { - include?: Array<"preferences">; + include?: "preferences"[]; } export interface ListObjectSubscriptionsOptions extends PaginationOptions { diff --git a/src/resources/users/interfaces.ts b/src/resources/users/interfaces.ts index adf3986..1136b59 100644 --- a/src/resources/users/interfaces.ts +++ b/src/resources/users/interfaces.ts @@ -34,7 +34,7 @@ export interface UserFeedOptions extends PaginationOptions { } export interface ListUserOptions extends PaginationOptions { - include?: Array<"preferences">; + include?: "preferences"[]; } export interface ListSubscriptionsOptions extends PaginationOptions {