Skip to content

Commit

Permalink
Changes to how typings are exported (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbberry committed Mar 4, 2021
1 parent 2bb947e commit be0f946
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
3 changes: 3 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# Change Log

## 3.0.9
- A change to how typings are used, properly exports via dist/typings

## 3.0.8
- Change docs URL
- Fix typos in a few method docs
Expand Down
2 changes: 1 addition & 1 deletion 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": "@top-gg/sdk",
"version": "3.0.8",
"version": "3.0.9",
"description": "Official Top.gg Node SDK",
"main": "./dist/index.js",
"scripts": {
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
import './typings'

export * from './structs/Api'
export * from './structs/Webhook'
2 changes: 2 additions & 0 deletions src/structs/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import ApiError from '../utils/ApiError'
import qs from 'querystring'
import { EventEmitter } from 'events'

import { Snowflake, BotStats, BotInfo, UserInfo, BotsResponse, ShortUser, BotsQuery } from '../typings'

interface APIOptions {
/**
* Top.gg Token
Expand Down
2 changes: 2 additions & 0 deletions src/structs/Webhook.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import getBody from 'raw-body'
import qs from 'querystring'

import { WebhookPayload } from '../typings'

/**
* Top.gg Webhook
* @example
Expand Down
16 changes: 8 additions & 8 deletions src/typings.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Discord ID
*/
type Snowflake = string
export type Snowflake = string

interface BotInfo {
export interface BotInfo {
/**
* The id of the bot
*/
Expand Down Expand Up @@ -99,7 +99,7 @@ interface BotInfo {
donatebotguildid: Snowflake
}

interface BotStats {
export interface BotStats {
/**
* The amount of servers the bot is in
*/
Expand All @@ -118,7 +118,7 @@ interface BotStats {
shardCount?: number
}

interface UserInfo {
export interface UserInfo {
/**
* The id of the user
*/
Expand Down Expand Up @@ -198,7 +198,7 @@ interface UserInfo {
admin: boolean
}

interface BotsQuery {
export interface BotsQuery {
/**
* The amount of bots to return. Max. 500
*/
Expand All @@ -223,7 +223,7 @@ interface BotsQuery {
fields?: string[]|string
}

interface BotsResponse {
export interface BotsResponse {
/**
* The matching bots
*/
Expand All @@ -246,7 +246,7 @@ interface BotsResponse {
total: number
}

interface ShortUser {
export interface ShortUser {
/**
* User's ID
*/
Expand All @@ -265,7 +265,7 @@ interface ShortUser {
avatar: string
}

interface WebhookPayload {
export interface WebhookPayload {
/**
* If webhook is a bot: ID of the bot that received a vote
*/
Expand Down

0 comments on commit be0f946

Please sign in to comment.