@internetdata/internetdata 1.0.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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -0
  3. package/dist/client.d.ts +123 -0
  4. package/dist/client.js +253 -0
  5. package/dist/client.js.map +1 -0
  6. package/dist/errors.d.ts +29 -0
  7. package/dist/errors.js +74 -0
  8. package/dist/errors.js.map +1 -0
  9. package/dist/generated/client/client.gen.d.ts +2 -0
  10. package/dist/generated/client/client.gen.js +217 -0
  11. package/dist/generated/client/client.gen.js.map +1 -0
  12. package/dist/generated/client/index.d.ts +10 -0
  13. package/dist/generated/client/index.js +7 -0
  14. package/dist/generated/client/index.js.map +1 -0
  15. package/dist/generated/client/types.gen.d.ts +120 -0
  16. package/dist/generated/client/types.gen.js +3 -0
  17. package/dist/generated/client/types.gen.js.map +1 -0
  18. package/dist/generated/client/utils.gen.d.ts +37 -0
  19. package/dist/generated/client/utils.gen.js +229 -0
  20. package/dist/generated/client/utils.gen.js.map +1 -0
  21. package/dist/generated/client.gen.d.ts +12 -0
  22. package/dist/generated/client.gen.js +4 -0
  23. package/dist/generated/client.gen.js.map +1 -0
  24. package/dist/generated/core/auth.gen.d.ts +25 -0
  25. package/dist/generated/core/auth.gen.js +15 -0
  26. package/dist/generated/core/auth.gen.js.map +1 -0
  27. package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
  28. package/dist/generated/core/bodySerializer.gen.js +58 -0
  29. package/dist/generated/core/bodySerializer.gen.js.map +1 -0
  30. package/dist/generated/core/params.gen.d.ts +43 -0
  31. package/dist/generated/core/params.gen.js +110 -0
  32. package/dist/generated/core/params.gen.js.map +1 -0
  33. package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
  34. package/dist/generated/core/pathSerializer.gen.js +107 -0
  35. package/dist/generated/core/pathSerializer.gen.js.map +1 -0
  36. package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
  37. package/dist/generated/core/queryKeySerializer.gen.js +93 -0
  38. package/dist/generated/core/queryKeySerializer.gen.js.map +1 -0
  39. package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
  40. package/dist/generated/core/serverSentEvents.gen.js +133 -0
  41. package/dist/generated/core/serverSentEvents.gen.js.map +1 -0
  42. package/dist/generated/core/types.gen.d.ts +83 -0
  43. package/dist/generated/core/types.gen.js +3 -0
  44. package/dist/generated/core/types.gen.js.map +1 -0
  45. package/dist/generated/core/utils.gen.d.ts +19 -0
  46. package/dist/generated/core/utils.gen.js +88 -0
  47. package/dist/generated/core/utils.gen.js.map +1 -0
  48. package/dist/generated/index.d.ts +2 -0
  49. package/dist/generated/index.js +3 -0
  50. package/dist/generated/index.js.map +1 -0
  51. package/dist/generated/sdk.gen.d.ts +84 -0
  52. package/dist/generated/sdk.gen.js +116 -0
  53. package/dist/generated/sdk.gen.js.map +1 -0
  54. package/dist/generated/types.gen.d.ts +538 -0
  55. package/dist/generated/types.gen.js +3 -0
  56. package/dist/generated/types.gen.js.map +1 -0
  57. package/dist/index.d.ts +6 -0
  58. package/dist/index.js +4 -0
  59. package/dist/index.js.map +1 -0
  60. package/dist/types.d.ts +11 -0
  61. package/dist/types.js +10 -0
  62. package/dist/types.js.map +1 -0
  63. package/package.json +62 -0
@@ -0,0 +1,538 @@
1
+ export type ClientOptions = {
2
+ baseUrl: 'https://internetdata.io' | (string & {});
3
+ };
4
+ export type Error = {
5
+ /**
6
+ * A machine-readable result code. Deliberately not an enum: a code
7
+ * added later must stay parseable by a client generated today.
8
+ *
9
+ */
10
+ rc: string;
11
+ };
12
+ /**
13
+ * One database FAMILY, with your organization's licence beside it. A
14
+ * licence covers the family, while a download names a specific version,
15
+ * so the ids passed to `download` and `checksum` come from `versions`.
16
+ *
17
+ */
18
+ export type Database = {
19
+ /**
20
+ * The family, e.g. `vpn_ip`. What a licence is held against.
21
+ */
22
+ base: string;
23
+ name: string;
24
+ /**
25
+ * One line on what the newest version contains.
26
+ */
27
+ summary: string;
28
+ /**
29
+ * `licensed` is a live grant, `expired` one whose term has ended, and
30
+ * `unlicensed` a database published but never bought.
31
+ *
32
+ */
33
+ standing: 'licensed' | 'expired' | 'unlicensed';
34
+ /**
35
+ * What your licence permits you to do with the data. Null when there
36
+ * is no licence.
37
+ *
38
+ */
39
+ redistribution: 'evaluation' | 'internal' | 'redistribute' | null;
40
+ starts: string | null;
41
+ /**
42
+ * Null when the licence has no end date, or when there is none.
43
+ */
44
+ expires: string | null;
45
+ /**
46
+ * Every published version of this family, oldest first. Old versions
47
+ * are frozen rather than migrated, so both stay downloadable.
48
+ *
49
+ */
50
+ versions: Array<DatabaseVersion>;
51
+ };
52
+ export type DatabaseVersion = {
53
+ /**
54
+ * The versioned id. Pass this to `download`, `checksum` and `metadata`.
55
+ */
56
+ id: string;
57
+ version: number;
58
+ summary: string;
59
+ /**
60
+ * The formats this version is BUILT in. Asking for another is a 400,
61
+ * not a gap - the `_provider` catalogs are keyed by provider id, so no
62
+ * MMDB exists for them.
63
+ *
64
+ */
65
+ formats: Array<'csvgz' | 'mmdb'>;
66
+ };
67
+ /**
68
+ * One download ATTEMPT, refusals included.
69
+ */
70
+ export type Download = {
71
+ dataset_id: string;
72
+ format: string;
73
+ outcome: 'ok' | 'unauthorized' | 'denied' | 'expired' | 'unknown' | 'unavailable';
74
+ /**
75
+ * Object size at redirect time, NOT bytes delivered: the transfer is a
76
+ * presigned redirect straight to object storage, so we never observe
77
+ * how much of it was taken.
78
+ *
79
+ */
80
+ bytes: number | null;
81
+ http_status: number | null;
82
+ /**
83
+ * The key that made the request. Null when it could not be resolved.
84
+ */
85
+ apikey_id: string | null;
86
+ client_ip: string | null;
87
+ user_agent: string | null;
88
+ created: string;
89
+ };
90
+ export type DatabaseMetadataColumn = {
91
+ name: string;
92
+ type: string;
93
+ description?: string;
94
+ };
95
+ /**
96
+ * The build document written by the exporter, served through unchanged.
97
+ */
98
+ export type DatabaseMetadata = {
99
+ id: string;
100
+ /**
101
+ * How often a new build is published.
102
+ */
103
+ update_freq?: string;
104
+ /**
105
+ * ISO-8601 date (YYYY-MM-DD) the published build was generated on.
106
+ */
107
+ updated: string;
108
+ /**
109
+ * Row count in the current build.
110
+ */
111
+ entries: number;
112
+ /**
113
+ * Columns, keyed by format.
114
+ */
115
+ schema: {
116
+ [key: string]: Array<DatabaseMetadataColumn>;
117
+ };
118
+ /**
119
+ * A few real rows, keyed by format.
120
+ */
121
+ sample?: {
122
+ [key: string]: Array<{
123
+ [key: string]: unknown;
124
+ }>;
125
+ };
126
+ /**
127
+ * Bytes per format.
128
+ */
129
+ size: {
130
+ [key: string]: number;
131
+ };
132
+ };
133
+ export type DbChecksumSuccessResponse = {
134
+ rc: 'SUCCESS';
135
+ data: DbChecksums;
136
+ };
137
+ export type DbChecksums = {
138
+ /**
139
+ * Hex-encoded MD5 digest.
140
+ */
141
+ md5: string;
142
+ /**
143
+ * Hex-encoded SHA-1 digest.
144
+ */
145
+ sha1: string;
146
+ /**
147
+ * Hex-encoded SHA-256 digest.
148
+ */
149
+ sha256: string;
150
+ /**
151
+ * Hex-encoded SHA-512 digest.
152
+ */
153
+ sha512: string;
154
+ };
155
+ export type DbMetadataSuccessResponse = {
156
+ rc: 'SUCCESS';
157
+ data: DbMetadata;
158
+ };
159
+ export type DbMetadata = {
160
+ /**
161
+ * ISO-8601 calendar date (YYYY-MM-DD) on which the currently published version was generated.
162
+ */
163
+ updated: string;
164
+ /**
165
+ * Number of data rows in the published dataset (excluding the CSV header).
166
+ */
167
+ entries: number;
168
+ /**
169
+ * Sizes in bytes of the published files, keyed by format.
170
+ */
171
+ size: {
172
+ /**
173
+ * Size of the gzipped CSV file in bytes.
174
+ */
175
+ csvgz: number;
176
+ /**
177
+ * Size of the MMDB file in bytes (omitted when the dataset has no MMDB output).
178
+ */
179
+ mmdb?: number;
180
+ };
181
+ };
182
+ export type DbInvalidApiKeyError = {
183
+ rc: 'INVALID_APIKEY';
184
+ };
185
+ export type DbInvalidFormatError = {
186
+ rc: 'INVALID_FORMAT';
187
+ };
188
+ export type DbInvalidIdError = {
189
+ rc: 'INVALID_ID';
190
+ };
191
+ export type DbUnauthorizedIdError = {
192
+ rc: 'UNAUTHORIZED_ID';
193
+ };
194
+ export type DbNotFoundError = {
195
+ rc: 'DB_NOT_FOUND';
196
+ };
197
+ /**
198
+ * Database identifier (e.g. `vpn_ip_v1`, `resproxy_provider_v1`).
199
+ */
200
+ export type DbId = string;
201
+ /**
202
+ * Database file format.
203
+ */
204
+ export type DbFormat = 'csvgz' | 'mmdb';
205
+ export type ListDatabasesData = {
206
+ body?: never;
207
+ path?: never;
208
+ query?: never;
209
+ url: '/api/v2/database/list';
210
+ };
211
+ export type ListDatabasesErrors = {
212
+ /**
213
+ * Missing or invalid bearer key, the key lacks the `db.download` scope, or
214
+ * it belongs to no organization.
215
+ * `rc`: `UNAUTHORIZED`.
216
+ *
217
+ */
218
+ 401: Error;
219
+ };
220
+ export type ListDatabasesError = ListDatabasesErrors[keyof ListDatabasesErrors];
221
+ export type ListDatabasesResponses = {
222
+ /**
223
+ * OK
224
+ */
225
+ 200: {
226
+ databases: Array<Database>;
227
+ };
228
+ };
229
+ export type ListDatabasesResponse = ListDatabasesResponses[keyof ListDatabasesResponses];
230
+ export type DownloadDatabaseV2Data = {
231
+ body?: never;
232
+ path?: never;
233
+ query: {
234
+ /**
235
+ * Database identifier (e.g. `vpn_ip_v1`, `resproxy_provider_v1`).
236
+ */
237
+ id: string;
238
+ /**
239
+ * Database file format.
240
+ */
241
+ format: 'csvgz' | 'mmdb';
242
+ };
243
+ url: '/api/v2/database/download';
244
+ };
245
+ export type DownloadDatabaseV2Errors = {
246
+ /**
247
+ * The database is not built in the requested format.
248
+ */
249
+ 400: Error;
250
+ /**
251
+ * Missing or invalid bearer key, the key lacks the `db.download` scope, or
252
+ * it belongs to no organization.
253
+ * `rc`: `UNAUTHORIZED`.
254
+ *
255
+ */
256
+ 401: Error;
257
+ /**
258
+ * Your organization holds no licence for this database, or its term has
259
+ * ended.
260
+ * `rc`: `NOT_LICENSED`, `LICENSE_EXPIRED`.
261
+ *
262
+ */
263
+ 403: Error;
264
+ /**
265
+ * No such database.
266
+ * `rc`: `UNKNOWN_DATASET`.
267
+ *
268
+ */
269
+ 404: Error;
270
+ /**
271
+ * Licensed, but the current build has not been published yet.
272
+ * `rc`: `NOT_AVAILABLE`.
273
+ *
274
+ */
275
+ 503: Error;
276
+ };
277
+ export type DownloadDatabaseV2Error = DownloadDatabaseV2Errors[keyof DownloadDatabaseV2Errors];
278
+ export type DatabaseMetadataV2Data = {
279
+ body?: never;
280
+ path?: never;
281
+ query: {
282
+ /**
283
+ * Database identifier (e.g. `vpn_ip_v1`, `resproxy_provider_v1`).
284
+ */
285
+ id: string;
286
+ };
287
+ url: '/api/v2/database/metadata';
288
+ };
289
+ export type DatabaseMetadataV2Errors = {
290
+ /**
291
+ * Missing or invalid bearer key, the key lacks the `db.download` scope, or
292
+ * it belongs to no organization.
293
+ * `rc`: `UNAUTHORIZED`.
294
+ *
295
+ */
296
+ 401: Error;
297
+ /**
298
+ * Your organization holds no licence for this database, or its term has
299
+ * ended.
300
+ * `rc`: `NOT_LICENSED`, `LICENSE_EXPIRED`.
301
+ *
302
+ */
303
+ 403: Error;
304
+ /**
305
+ * No such database.
306
+ * `rc`: `UNKNOWN_DATASET`.
307
+ *
308
+ */
309
+ 404: Error;
310
+ /**
311
+ * Licensed, but the current build has not been published yet.
312
+ * `rc`: `NOT_AVAILABLE`.
313
+ *
314
+ */
315
+ 503: Error;
316
+ };
317
+ export type DatabaseMetadataV2Error = DatabaseMetadataV2Errors[keyof DatabaseMetadataV2Errors];
318
+ export type DatabaseMetadataV2Responses = {
319
+ /**
320
+ * OK
321
+ */
322
+ 200: DatabaseMetadata;
323
+ };
324
+ export type DatabaseMetadataV2Response = DatabaseMetadataV2Responses[keyof DatabaseMetadataV2Responses];
325
+ export type DatabaseChecksumV2Data = {
326
+ body?: never;
327
+ path?: never;
328
+ query: {
329
+ /**
330
+ * Database identifier (e.g. `vpn_ip_v1`, `resproxy_provider_v1`).
331
+ */
332
+ id: string;
333
+ /**
334
+ * Database file format.
335
+ */
336
+ format: 'csvgz' | 'mmdb';
337
+ };
338
+ url: '/api/v2/database/checksum';
339
+ };
340
+ export type DatabaseChecksumV2Errors = {
341
+ /**
342
+ * The database is not built in the requested format.
343
+ */
344
+ 400: Error;
345
+ /**
346
+ * Missing or invalid bearer key, the key lacks the `db.download` scope, or
347
+ * it belongs to no organization.
348
+ * `rc`: `UNAUTHORIZED`.
349
+ *
350
+ */
351
+ 401: Error;
352
+ /**
353
+ * Your organization holds no licence for this database, or its term has
354
+ * ended.
355
+ * `rc`: `NOT_LICENSED`, `LICENSE_EXPIRED`.
356
+ *
357
+ */
358
+ 403: Error;
359
+ /**
360
+ * No such database.
361
+ * `rc`: `UNKNOWN_DATASET`.
362
+ *
363
+ */
364
+ 404: Error;
365
+ /**
366
+ * Licensed, but the current build has not been published yet.
367
+ * `rc`: `NOT_AVAILABLE`.
368
+ *
369
+ */
370
+ 503: Error;
371
+ };
372
+ export type DatabaseChecksumV2Error = DatabaseChecksumV2Errors[keyof DatabaseChecksumV2Errors];
373
+ export type DatabaseChecksumV2Responses = {
374
+ /**
375
+ * OK
376
+ */
377
+ 200: {
378
+ id: string;
379
+ format: 'csvgz' | 'mmdb';
380
+ checksums: DbChecksums;
381
+ };
382
+ };
383
+ export type DatabaseChecksumV2Response = DatabaseChecksumV2Responses[keyof DatabaseChecksumV2Responses];
384
+ export type ListDownloadsData = {
385
+ body?: never;
386
+ path?: never;
387
+ query?: {
388
+ /**
389
+ * How many attempts to return. Clamped to 200.
390
+ */
391
+ limit?: number;
392
+ };
393
+ url: '/api/v2/database/downloads';
394
+ };
395
+ export type ListDownloadsErrors = {
396
+ /**
397
+ * Missing or invalid bearer key, the key lacks the `db.download` scope, or
398
+ * it belongs to no organization.
399
+ * `rc`: `UNAUTHORIZED`.
400
+ *
401
+ */
402
+ 401: Error;
403
+ };
404
+ export type ListDownloadsError = ListDownloadsErrors[keyof ListDownloadsErrors];
405
+ export type ListDownloadsResponses = {
406
+ /**
407
+ * OK
408
+ */
409
+ 200: {
410
+ downloads: Array<Download>;
411
+ };
412
+ };
413
+ export type ListDownloadsResponse = ListDownloadsResponses[keyof ListDownloadsResponses];
414
+ export type DatabaseDownloadData = {
415
+ body?: never;
416
+ path?: never;
417
+ query: {
418
+ /**
419
+ * Database identifier (e.g. `vpn_ip_v1`, `resproxy_provider_v1`).
420
+ */
421
+ id: string;
422
+ /**
423
+ * Database file format.
424
+ */
425
+ format: 'csvgz' | 'mmdb';
426
+ };
427
+ url: '/api/v1/database/download';
428
+ };
429
+ export type DatabaseDownloadErrors = {
430
+ /**
431
+ * The request query parameters were malformed.
432
+ * Possible `rc` values: `INVALID_FORMAT`, `INVALID_ID`.
433
+ *
434
+ */
435
+ 400: DbInvalidFormatError | DbInvalidIdError;
436
+ /**
437
+ * The `apikey` query parameter was missing or not recognized.
438
+ */
439
+ 401: DbInvalidApiKeyError;
440
+ /**
441
+ * The `apikey` is valid but is not authorized for the requested database id.
442
+ */
443
+ 403: DbUnauthorizedIdError;
444
+ /**
445
+ * The requested database file does not exist on the server.
446
+ */
447
+ 404: DbNotFoundError;
448
+ };
449
+ export type DatabaseDownloadError = DatabaseDownloadErrors[keyof DatabaseDownloadErrors];
450
+ export type DatabaseDownloadResponses = {
451
+ /**
452
+ * Database file.
453
+ */
454
+ 200: Blob | File;
455
+ };
456
+ export type DatabaseDownloadResponse = DatabaseDownloadResponses[keyof DatabaseDownloadResponses];
457
+ export type DatabaseChecksumData = {
458
+ body?: never;
459
+ path?: never;
460
+ query: {
461
+ /**
462
+ * Database identifier (e.g. `vpn_ip_v1`, `resproxy_provider_v1`).
463
+ */
464
+ id: string;
465
+ /**
466
+ * Database file format.
467
+ */
468
+ format: 'csvgz' | 'mmdb';
469
+ };
470
+ url: '/api/v1/database/checksum';
471
+ };
472
+ export type DatabaseChecksumErrors = {
473
+ /**
474
+ * The request query parameters were malformed.
475
+ * Possible `rc` values: `INVALID_FORMAT`, `INVALID_ID`.
476
+ *
477
+ */
478
+ 400: DbInvalidFormatError | DbInvalidIdError;
479
+ /**
480
+ * The `apikey` query parameter was missing or not recognized.
481
+ */
482
+ 401: DbInvalidApiKeyError;
483
+ /**
484
+ * The `apikey` is valid but is not authorized for the requested database id.
485
+ */
486
+ 403: DbUnauthorizedIdError;
487
+ /**
488
+ * The requested database file does not exist on the server.
489
+ */
490
+ 404: DbNotFoundError;
491
+ };
492
+ export type DatabaseChecksumError = DatabaseChecksumErrors[keyof DatabaseChecksumErrors];
493
+ export type DatabaseChecksumResponses = {
494
+ /**
495
+ * Checksums for the requested database.
496
+ */
497
+ 200: DbChecksumSuccessResponse;
498
+ };
499
+ export type DatabaseChecksumResponse = DatabaseChecksumResponses[keyof DatabaseChecksumResponses];
500
+ export type DatabaseMetadataData = {
501
+ body?: never;
502
+ path?: never;
503
+ query: {
504
+ /**
505
+ * Database identifier (e.g. `vpn_ip_v1`, `resproxy_provider_v1`).
506
+ */
507
+ id: string;
508
+ };
509
+ url: '/api/v1/database/metadata';
510
+ };
511
+ export type DatabaseMetadataErrors = {
512
+ /**
513
+ * The request query parameters were malformed.
514
+ * Possible `rc` values: `INVALID_FORMAT`, `INVALID_ID`.
515
+ *
516
+ */
517
+ 400: DbInvalidFormatError | DbInvalidIdError;
518
+ /**
519
+ * The `apikey` query parameter was missing or not recognized.
520
+ */
521
+ 401: DbInvalidApiKeyError;
522
+ /**
523
+ * The `apikey` is valid but is not authorized for the requested database id.
524
+ */
525
+ 403: DbUnauthorizedIdError;
526
+ /**
527
+ * The requested database file does not exist on the server.
528
+ */
529
+ 404: DbNotFoundError;
530
+ };
531
+ export type DatabaseMetadataError = DatabaseMetadataErrors[keyof DatabaseMetadataErrors];
532
+ export type DatabaseMetadataResponses = {
533
+ /**
534
+ * Metadata for the requested database.
535
+ */
536
+ 200: DbMetadataSuccessResponse;
537
+ };
538
+ export type DatabaseMetadataResponse = DatabaseMetadataResponses[keyof DatabaseMetadataResponses];
@@ -0,0 +1,3 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export {};
3
+ //# sourceMappingURL=types.gen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.gen.js","sourceRoot":"","sources":["../../src/generated/types.gen.ts"],"names":[],"mappings":"AAAA,qDAAqD"}
@@ -0,0 +1,6 @@
1
+ export { InternetData, DatabaseApi, DEFAULT_BASE_URL } from './client.js';
2
+ export type { DownloadDestination, DownloadsOptions, Options } from './client.js';
3
+ export { InternetDataError } from './errors.js';
4
+ export type { ErrorKind } from './errors.js';
5
+ export { DATASET_FORMATS, REDISTRIBUTION_RIGHTS, STANDINGS } from './types.js';
6
+ export type { Database, DatabaseMetadata, DatabaseMetadataColumn, DatabaseVersion, DatasetFormat, DbChecksums, Download, Redistribution, Standing, } from './types.js';
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export { InternetData, DatabaseApi, DEFAULT_BASE_URL } from './client.js';
2
+ export { InternetDataError } from './errors.js';
3
+ export { DATASET_FORMATS, REDISTRIBUTION_RIGHTS, STANDINGS } from './types.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Database, DatabaseMetadata, DatabaseMetadataColumn, DatabaseVersion, DbChecksums, Download } from './generated/types.gen.js';
2
+ export type { Database, DatabaseMetadata, DatabaseMetadataColumn, DatabaseVersion, DbChecksums, Download, };
3
+ /** A file format one version of a database is built in. */
4
+ export type DatasetFormat = DatabaseVersion['formats'][number];
5
+ /** Where your organization's licence for a database family stands today. */
6
+ export type Standing = Database['standing'];
7
+ /** What a licence permits you to do with the data. Absent when there is no licence. */
8
+ export type Redistribution = NonNullable<Database['redistribution']>;
9
+ export declare const DATASET_FORMATS: readonly DatasetFormat[];
10
+ export declare const STANDINGS: readonly Standing[];
11
+ export declare const REDISTRIBUTION_RIGHTS: readonly Redistribution[];
package/dist/types.js ADDED
@@ -0,0 +1,10 @@
1
+ // The runtime halves of the three closed vocabularies above, for a caller that
2
+ // wants to validate or enumerate rather than switch. Each is TYPED by the
3
+ // generated union, so a value the spec does not define will not compile; that a
4
+ // value is MISSING is what the shared conformance corpus pins.
5
+ export const DATASET_FORMATS = ['csvgz', 'mmdb'];
6
+ export const STANDINGS = ['licensed', 'expired', 'unlicensed'];
7
+ export const REDISTRIBUTION_RIGHTS = [
8
+ 'evaluation', 'internal', 'redistribute',
9
+ ];
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAiBA,+EAA+E;AAC/E,0EAA0E;AAC1E,gFAAgF;AAChF,+DAA+D;AAC/D,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,SAAS,GAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;AACpF,MAAM,CAAC,MAAM,qBAAqB,GAA8B;IAC5D,YAAY,EAAE,UAAU,EAAE,cAAc;CAC3C,CAAC"}
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@internetdata/internetdata",
3
+ "version": "1.0.0",
4
+ "description": "Official Node.js client library for the InternetData API. Download, verify and inspect licensed IP database files.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "homepage": "https://internetdata.io",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/internetdata/sdk-nodejs.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/internetdata/sdk-nodejs/issues"
14
+ },
15
+ "keywords": [
16
+ "ip-database",
17
+ "ip-intelligence",
18
+ "ip-data",
19
+ "mmdb",
20
+ "maxmind-db",
21
+ "asn",
22
+ "bogon",
23
+ "vpn",
24
+ "proxy",
25
+ "hosting",
26
+ "dataset",
27
+ "download"
28
+ ],
29
+ "main": "./dist/index.js",
30
+ "types": "./dist/index.d.ts",
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/index.d.ts",
34
+ "default": "./dist/index.js"
35
+ },
36
+ "./package.json": "./package.json"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "files": [
42
+ "dist",
43
+ "README.md",
44
+ "LICENSE"
45
+ ],
46
+ "engines": {
47
+ "node": ">=22"
48
+ },
49
+ "dependencies": {
50
+ "p-retry": "^8.0.0"
51
+ },
52
+ "devDependencies": {
53
+ "@hey-api/openapi-ts": "^0.99.0",
54
+ "@types/node": "^26.2.0",
55
+ "typescript": "^5.9.3"
56
+ },
57
+ "scripts": {
58
+ "build": "rm -rf dist && openapi-ts && tsc",
59
+ "test": "pnpm run build && node --test test/*.test.mjs",
60
+ "generate": "openapi-ts"
61
+ }
62
+ }