@xyo-network/dns 4.0.2 → 4.1.0

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.
@@ -0,0 +1,82 @@
1
+ declare const DnsRecordType: {
2
+ readonly A: 1;
3
+ readonly AAAA: 28;
4
+ readonly CAA: 257;
5
+ readonly CNAME: 5;
6
+ readonly DNAME: 39;
7
+ readonly MX: 15;
8
+ readonly NS: 2;
9
+ readonly PTR: 12;
10
+ readonly SOA: 6;
11
+ readonly SPF: 99;
12
+ readonly SRV: 33;
13
+ readonly TXT: 16;
14
+ };
15
+ type DnsRecordType = typeof DnsRecordType[keyof typeof DnsRecordType];
16
+
17
+ declare const DnsReturnCode: {
18
+ NoError: number;
19
+ QueryFormatError: number;
20
+ ServerFailed: number;
21
+ DomainDoesNotExist: number;
22
+ NotImplemented: number;
23
+ Refused: number;
24
+ NameShouldNotExist: number;
25
+ RRSetShouldNotExist: number;
26
+ NotAuthoritative: number;
27
+ NotInZone: number;
28
+ };
29
+ type DnsReturnCode = typeof DnsReturnCode[keyof typeof DnsReturnCode];
30
+
31
+ /**
32
+ * Checks if a domain exists (resolves using DNS)
33
+ * @param domain - string
34
+ * @returns boolean
35
+ */
36
+ declare const domainExists: (domain?: string) => Promise<boolean>;
37
+ //# sourceMappingURL=domainExists.d.ts.map
38
+
39
+ interface GoogleDnsResultAnswer {
40
+ TTL?: number;
41
+ data?: string;
42
+ name?: string;
43
+ type?: DnsRecordType;
44
+ }
45
+
46
+ interface GoogleDnsResultQuestion {
47
+ cd?: boolean;
48
+ ct?: string;
49
+ do?: boolean;
50
+ edns_client_subnet?: string;
51
+ name?: string;
52
+ random_padding?: string;
53
+ type?: DnsRecordType;
54
+ }
55
+
56
+ interface GoogleDnsResult {
57
+ AD?: boolean;
58
+ Answer?: GoogleDnsResultAnswer[];
59
+ Authority?: GoogleDnsResultAnswer[];
60
+ CD?: boolean;
61
+ Comment?: string;
62
+ Question?: GoogleDnsResultQuestion[];
63
+ RA?: boolean;
64
+ RD?: boolean;
65
+ Status?: DnsReturnCode;
66
+ TC?: boolean;
67
+ edns_client_subnet?: string;
68
+ }
69
+
70
+ /**
71
+ * Resolves DNS information (resolves using DNS)
72
+ * @param domain - string
73
+ * @returns GoogleDnsResult
74
+ */
75
+ declare const domainResolve: (domain?: string, type?: DnsRecordType) => Promise<GoogleDnsResult | undefined>;
76
+ //# sourceMappingURL=domainResolve.d.ts.map
77
+
78
+ declare const googleDnsOverHttps: (name: string, type?: DnsRecordType) => Promise<GoogleDnsResult>;
79
+ //# sourceMappingURL=googleDnsOverHttps.d.ts.map
80
+
81
+ export { DnsRecordType, DnsReturnCode, domainExists, domainResolve, googleDnsOverHttps };
82
+ export type { GoogleDnsResult, GoogleDnsResultAnswer, GoogleDnsResultQuestion };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/dns",
3
- "version": "4.0.2",
3
+ "version": "4.1.0",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -21,19 +21,19 @@
21
21
  "type": "module",
22
22
  "exports": {
23
23
  ".": {
24
- "types": "./dist/types/index.d.ts",
24
+ "types": "./dist/neutral/index.d.ts",
25
25
  "default": "./dist/neutral/index.mjs"
26
26
  },
27
27
  "./package.json": "./package.json"
28
28
  },
29
29
  "module": "dist/neutral/index.mjs",
30
- "types": "dist/types/index.d.ts",
30
+ "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/axios": "^4.12.33"
32
+ "@xylabs/axios": "^4.13.15"
33
33
  },
34
34
  "devDependencies": {
35
- "@xylabs/ts-scripts-yarn3": "^6.5.12",
36
- "@xylabs/tsconfig": "^6.5.12",
35
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.20",
36
+ "@xylabs/tsconfig": "^7.0.0-rc.20",
37
37
  "typescript": "^5.8.3"
38
38
  },
39
39
  "publishConfig": {
File without changes
File without changes
File without changes