mcutils-js-api 2.0.6 → 2.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { ErrorResponse } from "./types/response/error-response";
2
- import type { IpLookupResponse } from "./types/response/ip-lookup-response";
2
+ import type { IpLookup } from "./types/response/ip-lookup-response";
3
3
  import type { BedrockServer } from "./types/server/impl/bedrock-server";
4
4
  import type { JavaServer } from "./types/server/impl/java-server";
5
5
  import type { CachedPlayer } from "./types/cache/cached-player";
@@ -51,7 +51,7 @@ export declare class McUtilsAPI {
51
51
  * @returns the IP lookup response or the error (if one occurred)
52
52
  */
53
53
  fetchIpLookup(query: string): Promise<{
54
- data?: IpLookupResponse;
54
+ data?: IpLookup;
55
55
  error?: ErrorResponse;
56
56
  }>;
57
57
  /**
@@ -1,7 +1,8 @@
1
1
  import type { GeoLocation } from "../server/server";
2
2
  import type { AsnLookup } from "../server/server";
3
- export type IpLookupResponse = {
3
+ export type IpLookup = {
4
4
  ip: string;
5
- location: GeoLocation | null;
6
- asn: AsnLookup | null;
5
+ reverseDns?: string;
6
+ location?: GeoLocation | null;
7
+ asn?: AsnLookup | null;
7
8
  };
@@ -7,6 +7,7 @@ export interface Server extends Cache {
7
7
  motd: ServerMotd;
8
8
  players: ServerPlayers;
9
9
  records: DnsRecord[];
10
+ reverseDns?: string;
10
11
  location?: GeoLocation | null;
11
12
  asn?: AsnLookup | null;
12
13
  }
@@ -37,6 +38,8 @@ export type GeoLocation = {
37
38
  countryCode: string;
38
39
  region: string;
39
40
  city: string;
41
+ timeZone: string;
42
+ postalCode: string;
40
43
  latitude: number;
41
44
  longitude: number;
42
45
  flagUrl: string;
@@ -44,4 +47,5 @@ export type GeoLocation = {
44
47
  export type AsnLookup = {
45
48
  asn: string;
46
49
  asnOrg: string;
50
+ cidr: string;
47
51
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcutils-js-api",
3
- "version": "2.0.6",
3
+ "version": "2.0.11",
4
4
  "module": "dist/index.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",