@parseapi/sdk 0.2.0 → 0.2.1
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.cjs +4 -4
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24,7 +24,7 @@ __export(index_exports, {
|
|
|
24
24
|
parseAPI: () => parseAPI
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(index_exports);
|
|
27
|
-
var VERSION = "0.2.
|
|
27
|
+
var VERSION = "0.2.1";
|
|
28
28
|
var DEFAULT_BASE_URL = "https://api.parseapi.com";
|
|
29
29
|
var DEFAULT_TIMEOUT_MS = 1e4;
|
|
30
30
|
var DEFAULT_RETRIES = 2;
|
|
@@ -206,10 +206,10 @@ function parseAPI(apiKey, options = {}) {
|
|
|
206
206
|
mx: (domain) => request(`/mx/${enc(domain)}`),
|
|
207
207
|
useragent: (ua, opts) => request("/useragent", deepQuery(opts), { "User-Agent": ua }),
|
|
208
208
|
vin: (vin, opts) => request(`/vin/${enc(vin)}`, deepQuery(opts)),
|
|
209
|
-
|
|
210
|
-
(code, opts) => request(`/
|
|
209
|
+
tariff: Object.assign(
|
|
210
|
+
(code, opts) => request(`/tariff/${enc(code)}`, { origin: opts?.origin, ...deepQuery(opts) }),
|
|
211
211
|
{
|
|
212
|
-
search: (q) => request("/
|
|
212
|
+
search: (q) => request("/tariff", { q })
|
|
213
213
|
}
|
|
214
214
|
),
|
|
215
215
|
currency: Object.assign(
|
package/dist/index.d.cts
CHANGED
|
@@ -307,6 +307,8 @@ interface Npi {
|
|
|
307
307
|
/** Exists in the CMS NPPES registry. */
|
|
308
308
|
registered: boolean | null;
|
|
309
309
|
active: boolean | null;
|
|
310
|
+
/** Date CMS deactivated the NPI, YYYY-MM-DD. Null when still active. */
|
|
311
|
+
deactivated_at: string | null;
|
|
310
312
|
/** On the OIG exclusion list. */
|
|
311
313
|
excluded: boolean | null;
|
|
312
314
|
/** individual or organization. */
|
|
@@ -444,6 +446,8 @@ interface Phone {
|
|
|
444
446
|
/** NPA-derived state code (US/CA). */
|
|
445
447
|
state: string | null;
|
|
446
448
|
state_name: string | null;
|
|
449
|
+
/** Numbering-plan IANA zone. Null when the prefix covers more than one zone, or invalid. Not the handset. */
|
|
450
|
+
timezone: string | null;
|
|
447
451
|
national: string | null;
|
|
448
452
|
international: string | null;
|
|
449
453
|
/** Always empty. The metered proves are their own endpoints: carrier, caller, hlr. */
|
|
@@ -976,7 +980,7 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
976
980
|
mx: (domain: string) => Promise<Mx>;
|
|
977
981
|
useragent: (ua: string, opts?: DeepOption) => Promise<Useragent>;
|
|
978
982
|
vin: (vin: string, opts?: DeepOption) => Promise<Vin>;
|
|
979
|
-
|
|
983
|
+
tariff: ((code: string, opts?: {
|
|
980
984
|
origin?: string;
|
|
981
985
|
} & DeepOption) => Promise<Hts>) & {
|
|
982
986
|
search: (q: string) => Promise<HtsSearch>;
|
package/dist/index.d.ts
CHANGED
|
@@ -307,6 +307,8 @@ interface Npi {
|
|
|
307
307
|
/** Exists in the CMS NPPES registry. */
|
|
308
308
|
registered: boolean | null;
|
|
309
309
|
active: boolean | null;
|
|
310
|
+
/** Date CMS deactivated the NPI, YYYY-MM-DD. Null when still active. */
|
|
311
|
+
deactivated_at: string | null;
|
|
310
312
|
/** On the OIG exclusion list. */
|
|
311
313
|
excluded: boolean | null;
|
|
312
314
|
/** individual or organization. */
|
|
@@ -444,6 +446,8 @@ interface Phone {
|
|
|
444
446
|
/** NPA-derived state code (US/CA). */
|
|
445
447
|
state: string | null;
|
|
446
448
|
state_name: string | null;
|
|
449
|
+
/** Numbering-plan IANA zone. Null when the prefix covers more than one zone, or invalid. Not the handset. */
|
|
450
|
+
timezone: string | null;
|
|
447
451
|
national: string | null;
|
|
448
452
|
international: string | null;
|
|
449
453
|
/** Always empty. The metered proves are their own endpoints: carrier, caller, hlr. */
|
|
@@ -976,7 +980,7 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
976
980
|
mx: (domain: string) => Promise<Mx>;
|
|
977
981
|
useragent: (ua: string, opts?: DeepOption) => Promise<Useragent>;
|
|
978
982
|
vin: (vin: string, opts?: DeepOption) => Promise<Vin>;
|
|
979
|
-
|
|
983
|
+
tariff: ((code: string, opts?: {
|
|
980
984
|
origin?: string;
|
|
981
985
|
} & DeepOption) => Promise<Hts>) & {
|
|
982
986
|
search: (q: string) => Promise<HtsSearch>;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
var VERSION = "0.2.
|
|
2
|
+
var VERSION = "0.2.1";
|
|
3
3
|
var DEFAULT_BASE_URL = "https://api.parseapi.com";
|
|
4
4
|
var DEFAULT_TIMEOUT_MS = 1e4;
|
|
5
5
|
var DEFAULT_RETRIES = 2;
|
|
@@ -181,10 +181,10 @@ function parseAPI(apiKey, options = {}) {
|
|
|
181
181
|
mx: (domain) => request(`/mx/${enc(domain)}`),
|
|
182
182
|
useragent: (ua, opts) => request("/useragent", deepQuery(opts), { "User-Agent": ua }),
|
|
183
183
|
vin: (vin, opts) => request(`/vin/${enc(vin)}`, deepQuery(opts)),
|
|
184
|
-
|
|
185
|
-
(code, opts) => request(`/
|
|
184
|
+
tariff: Object.assign(
|
|
185
|
+
(code, opts) => request(`/tariff/${enc(code)}`, { origin: opts?.origin, ...deepQuery(opts) }),
|
|
186
186
|
{
|
|
187
|
-
search: (q) => request("/
|
|
187
|
+
search: (q) => request("/tariff", { q })
|
|
188
188
|
}
|
|
189
189
|
),
|
|
190
190
|
currency: Object.assign(
|