Skip to content
Merged
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
6 changes: 4 additions & 2 deletions lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
DeliveryOptionsForEmail,
DeliveryOptionsForInappWeb,
PostUserRequest,
SlackChannel,
SlackUser,
User,
UserAccountMetadata,
WS_REGION
Expand Down Expand Up @@ -68,10 +70,10 @@
generic(
method: 'GET' | 'POST' | 'PATCH' | 'DELETE',
resource: string,
data?: any

Check warning on line 73 in lib/client.ts

View workflow job for this annotation

GitHub Actions / pull_request_pipeline

Unexpected any. Specify a different type
): Promise<any>;

Check warning on line 74 in lib/client.ts

View workflow job for this annotation

GitHub Actions / pull_request_pipeline

Unexpected any. Specify a different type
getNotifications(before: string, count: number): Promise<any>;

Check warning on line 75 in lib/client.ts

View workflow job for this annotation

GitHub Actions / pull_request_pipeline

Unexpected any. Specify a different type
patchNotifications(params: any): Promise<any>;

Check warning on line 76 in lib/client.ts

View workflow job for this annotation

GitHub Actions / pull_request_pipeline

Unexpected any. Specify a different type

Check warning on line 76 in lib/client.ts

View workflow job for this annotation

GitHub Actions / pull_request_pipeline

Unexpected any. Specify a different type
getPreferences(): Promise<GetPreferencesResponse>;
postPreferences(
params: Array<{
Expand All @@ -83,7 +85,7 @@
| DeliveryOptionsForInappWeb
| BaseDeliveryOptions;
}>
): Promise<any>;

Check warning on line 88 in lib/client.ts

View workflow job for this annotation

GitHub Actions / pull_request_pipeline

Unexpected any. Specify a different type
postUser(params: PostUserRequest): Promise<any>;
getUserAccountMetadata(): Promise<{
userAccountMetadata: UserAccountMetadata;
Expand Down Expand Up @@ -130,8 +132,8 @@
slack: {
getOAuthUrl: (props?: { destinationUrl?: string }) => string;
getChannels: () => Promise<{
channels: Record<string, string>;
users: Record<string, string>;
channels: SlackChannel[];
users: SlackUser[];
}>;
setChannel: (channelId: string) => Promise<void>;
};
Expand Down
71 changes: 71 additions & 0 deletions lib/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,74 @@ export interface UserAccountMetadata {
environmentVapidPublicKey: string;
hasWebPushEnabled: boolean;
}

/* Slack Types Start */
export interface SlackChannel {
context_team_id?: string;
conversation_host_id?: string;
created?: number;
creator?: string;
id?: string;
internal_team_ids?: string[];
is_archived?: boolean;
is_channel?: boolean;
is_ext_shared?: boolean;
is_general?: boolean;
is_global_shared?: boolean;
is_group?: boolean;
is_im?: boolean;
is_member?: boolean;
is_moved?: number;
is_mpim?: boolean;
is_org_default?: boolean;
is_org_mandatory?: boolean;
is_org_shared?: boolean;
is_pending_ext_shared?: boolean;
is_private?: boolean;
is_shared?: boolean;
is_user_deleted?: boolean;
name?: string;
name_normalized?: string;
num_members?: number;
pending_connected_team_ids?: string[];
pending_shared?: string[];
previous_names?: string[];
priority?: number;
properties?: unknown;
purpose?: unknown;
shared_team_ids?: string[];
topic?: unknown;
unlinked?: number;
updated?: number;
user?: string;
}

export interface SlackUser {
color?: string;
deleted?: boolean;
enterprise_user?: unknown;
has_2fa?: boolean;
id?: string;
is_admin?: boolean;
is_app_user?: boolean;
is_bot?: boolean;
is_connector_bot?: boolean;
is_email_confirmed?: boolean;
is_invited_user?: boolean;
is_owner?: boolean;
is_primary_owner?: boolean;
is_restricted?: boolean;
is_ultra_restricted?: boolean;
is_workflow_bot?: boolean;
locale?: string;
name?: string;
profile?: unknown;
real_name?: string;
team_id?: string;
two_factor_type?: string;
tz?: string;
tz_label?: string;
tz_offset?: number;
updated?: number;
who_can_share_contact_card?: string;
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@notificationapi/core",
"version": "1.0.1",
"version": "1.0.2",
"type": "module",
"main": "dist/main.js",
"types": "dist/main.d.ts",
Expand Down
Loading