rocket-launch-live-client 0.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,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetcher = void 0;
4
+ var https = require("node:https");
5
+ var BASE_URL = "https://fdo.rocketlaunch.live";
6
+ var fetcher = function (apiKey, endpoint, params, keyInQueryParams) {
7
+ var url = new URL("json/" + endpoint, BASE_URL);
8
+ var headers;
9
+ if (keyInQueryParams) {
10
+ params.set("key", apiKey);
11
+ }
12
+ else {
13
+ headers = { authorization: "Bearer ".concat(apiKey) };
14
+ }
15
+ params.forEach(function (v, k) { return url.searchParams.set(k, v); });
16
+ return query(url, headers);
17
+ };
18
+ exports.fetcher = fetcher;
19
+ var query = function (url, headers) {
20
+ return new Promise(function (resolve, reject) {
21
+ var req = https.get(url, { headers: headers }, function (res) {
22
+ var data = [];
23
+ res.on("data", function (chunk) { return data.push(chunk); });
24
+ res.on("end", function () {
25
+ if (res.statusCode === 200) {
26
+ var response = Buffer.concat(data).toString();
27
+ resolve(JSON.parse(response));
28
+ }
29
+ else if (res.statusCode === 404) {
30
+ reject({
31
+ error: "Resource not found",
32
+ statusCode: 404,
33
+ message: "The server returned a 404 Not Found response. Check that your API key is valid, and that you are not requesting a page number beyond the available results.",
34
+ });
35
+ }
36
+ else {
37
+ reject(res);
38
+ }
39
+ });
40
+ });
41
+ req.on("error", reject);
42
+ });
43
+ };
44
+ //# sourceMappingURL=fetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetcher.js","sourceRoot":"","sources":["../src/fetcher.ts"],"names":[],"mappings":";;;AAAA,IAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAEpC,IAAM,QAAQ,GAAG,+BAA+B,CAAC;AAE1C,IAAM,OAAO,GAAG,UACrB,MAAc,EACd,QAAgB,EAChB,MAAuB,EACvB,gBAAyB;IAEzB,IAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,GAAG,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAClD,IAAI,OAAgC,CAAC;IAErC,IAAI,gBAAgB,EAAE;QACpB,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;KAC3B;SAAM;QACL,OAAO,GAAG,EAAE,aAAa,EAAE,iBAAU,MAAM,CAAE,EAAE,CAAC;KACjD;IAED,MAAM,CAAC,OAAO,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAA1B,CAA0B,CAAC,CAAC;IAErD,OAAO,KAAK,CAAI,GAAG,EAAE,OAAO,CAAC,CAAC;AAChC,CAAC,CAAC;AAlBW,QAAA,OAAO,WAkBlB;AAEF,IAAM,KAAK,GAAG,UAAI,GAAQ,EAAE,OAAqB;IAC/C,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;QACjC,IAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,SAAA,EAAE,EAAE,UAAC,GAAG;YAC1C,IAAI,IAAI,GAAG,EAAE,CAAC;YAEd,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,UAAC,KAAK,IAAK,OAAA,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAhB,CAAgB,CAAC,CAAC;YAE5C,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE;gBACZ,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAAE;oBAC1B,IAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;oBAChD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;iBAC/B;qBAAM,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAAE;oBACjC,MAAM,CAAC;wBACL,KAAK,EAAE,oBAAoB;wBAC3B,UAAU,EAAE,GAAG;wBACf,OAAO,EACL,6JAA6J;qBAChK,CAAC,CAAC;iBACJ;qBAAM;oBACL,MAAM,CAAC,GAAG,CAAC,CAAC;iBACb;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import RLLClient from "./Client";
2
+ import { RLLClientOptions } from "./types/application";
3
+ /**
4
+ * Generate a RocketLaunch.Live client
5
+ *
6
+ * @public
7
+ * @function
8
+ *
9
+ * @param {string} apiKey - Your RocketLaunch.Live API Key
10
+ * @param {Object} [options] - Optional Client Configuration options
11
+ * @param {boolean} options.keyInQueryParams - Set to true to send your API Key via Query parameters instead of Authorization Header (not recommended)
12
+ *
13
+ * @returns {RLLCLient}
14
+ *
15
+ * @example
16
+ *
17
+ * const MY_KEY = process.env.ROCKETLAUNCH_LIVE_API_KEY
18
+ *
19
+ * const client = clientGenerator(MY_KEY, { keyInQueryParams: true })
20
+ */
21
+ declare const clientGenerator: (apiKey: string, options?: RLLClientOptions) => RLLClient;
22
+ export default clientGenerator;
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var Client_1 = require("./Client");
4
+ /**
5
+ * Generate a RocketLaunch.Live client
6
+ *
7
+ * @public
8
+ * @function
9
+ *
10
+ * @param {string} apiKey - Your RocketLaunch.Live API Key
11
+ * @param {Object} [options] - Optional Client Configuration options
12
+ * @param {boolean} options.keyInQueryParams - Set to true to send your API Key via Query parameters instead of Authorization Header (not recommended)
13
+ *
14
+ * @returns {RLLCLient}
15
+ *
16
+ * @example
17
+ *
18
+ * const MY_KEY = process.env.ROCKETLAUNCH_LIVE_API_KEY
19
+ *
20
+ * const client = clientGenerator(MY_KEY, { keyInQueryParams: true })
21
+ */
22
+ var clientGenerator = function (apiKey, options) {
23
+ return new Client_1.default(apiKey, options);
24
+ };
25
+ exports.default = clientGenerator;
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,mCAAiC;AAGjC;;;;;;;;;;;;;;;;;GAiBG;AACH,IAAM,eAAe,GAAG,UACtB,MAAc,EACd,OAA0B;IAE1B,OAAO,IAAI,gBAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
package/dist/test.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
package/dist/test.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var dotenv = require("dotenv");
4
+ dotenv.config();
5
+ var index_1 = require("./index");
6
+ var client = (0, index_1.default)(process.env.API_KEY);
7
+ var randomId = Math.floor(Math.random() * 300);
8
+ client.launches({ country_code: "CA" });
9
+ //# sourceMappingURL=test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";;AAAA,IAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,iCAA2B;AAE3B,IAAM,MAAM,GAAG,IAAA,eAAI,EAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAEzC,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;AAEjD,MAAM,CAAC,QAAQ,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC"}
@@ -0,0 +1,165 @@
1
+ import { ISO3166Alpha2 } from "./standards";
2
+ export declare enum RLLEndPoint {
3
+ COMPANIES = "companies",
4
+ LAUNCHES = "launches",
5
+ LOCATIONS = "locations",
6
+ MISSIONS = "missions",
7
+ PADS = "pads",
8
+ TAGS = "tags",
9
+ VEHICLES = "vehicles"
10
+ }
11
+ interface RLLRecord {
12
+ id: number;
13
+ }
14
+ export declare namespace RLLEntity {
15
+ interface Country {
16
+ name: string;
17
+ code: ISO3166Alpha2.CountryCode;
18
+ }
19
+ interface State {
20
+ name: string;
21
+ abbr: ISO3166Alpha2.StateCodeUS;
22
+ }
23
+ export interface Company extends RLLRecord {
24
+ country: Country;
25
+ inactive: boolean | null;
26
+ }
27
+ enum LaunchResult {
28
+ NOT_SET = -1,
29
+ FAILURE = 0,
30
+ SUCCESS = 1,
31
+ PARTIAL_FAILURE = 2,
32
+ IN_FLIGHT_ABORT_CREWED = 3
33
+ }
34
+ interface Media extends RLLRecord {
35
+ media_url: string | null;
36
+ youtube_vidid: string | null;
37
+ featured: boolean;
38
+ ldfeatured: boolean;
39
+ approved: boolean;
40
+ }
41
+ export interface Launch extends RLLRecord {
42
+ name: string;
43
+ cospar_id: string;
44
+ sort_date: string;
45
+ provider: Omit<Company, "inactive" | "country">;
46
+ vehicle: Omit<Vehicle, "company_id" | "company">;
47
+ pad: Omit<Pad, "full_name">;
48
+ missions: Omit<Mission, "launch_id">[];
49
+ mission_description: string | null;
50
+ launch_description: string;
51
+ win_open: string | null;
52
+ t0: string | null;
53
+ win_close: string | null;
54
+ est_date: {
55
+ month: number | null;
56
+ day: number | null;
57
+ year: number | null;
58
+ quarter: number | null;
59
+ };
60
+ date_str: string;
61
+ tags: Omit<Tag, "slug">[];
62
+ slug: string;
63
+ weather_summary: string | null;
64
+ weather_temp: number | null;
65
+ weather_icon: string | null;
66
+ weather_updated: string | null;
67
+ quicktext: string;
68
+ media?: Media[];
69
+ result: LaunchResult;
70
+ suborbital: boolean;
71
+ modified: string;
72
+ }
73
+ export interface Location extends RLLRecord {
74
+ name: string;
75
+ latitute: string;
76
+ latitude: string;
77
+ longitude: string;
78
+ state: State | null;
79
+ statename?: string | null;
80
+ country: Country;
81
+ pads: Omit<Pad, "location" | "country" | "state">[];
82
+ utc_offset: number;
83
+ }
84
+ export interface Mission extends RLLRecord {
85
+ name: string;
86
+ description: string | null;
87
+ launch_id: number;
88
+ company: Omit<Company, "slug" | "inactive" | "country">;
89
+ }
90
+ export interface Pad extends RLLRecord {
91
+ name: string;
92
+ full_name: string;
93
+ location: Omit<Location, "pads" | "utc_offset" | "latitute">;
94
+ }
95
+ export interface Tag extends RLLRecord {
96
+ text: string;
97
+ slug: string;
98
+ }
99
+ export interface Vehicle extends RLLRecord {
100
+ name: string;
101
+ company_id?: number;
102
+ company: Omit<Company, "slug" | "inactive" | "country">;
103
+ }
104
+ export {};
105
+ }
106
+ interface RLLBaseQueryConfig {
107
+ id?: number | string;
108
+ page?: number | string;
109
+ }
110
+ export declare namespace RLLQueryConfig {
111
+ interface Companies extends RLLBaseQueryConfig {
112
+ name?: string | number;
113
+ country_code?: ISO3166Alpha2.CountryCode;
114
+ inactive?: boolean;
115
+ }
116
+ interface Launches extends RLLBaseQueryConfig {
117
+ cospar_id?: string;
118
+ after_date?: Date | string;
119
+ before_date?: Date | string;
120
+ modified_since?: Date | string;
121
+ location_id?: number | string;
122
+ pad_id?: number | string;
123
+ provider_id?: number | string;
124
+ tag_id?: number | string;
125
+ vehicle_id?: number | string;
126
+ state_abbr?: ISO3166Alpha2.StateCodeUS;
127
+ country_code?: ISO3166Alpha2.CountryCode;
128
+ search?: string | number;
129
+ slug?: string | number;
130
+ }
131
+ interface Locations extends RLLBaseQueryConfig {
132
+ name?: string | number;
133
+ state_abbr?: ISO3166Alpha2.StateCodeUS;
134
+ country_code?: ISO3166Alpha2.CountryCode;
135
+ }
136
+ interface Missions extends RLLBaseQueryConfig {
137
+ name?: string | number;
138
+ }
139
+ interface Pads extends RLLBaseQueryConfig {
140
+ name?: string | number;
141
+ state_abbr?: ISO3166Alpha2.StateCodeUS;
142
+ country_code?: ISO3166Alpha2.CountryCode;
143
+ }
144
+ interface Tags extends RLLBaseQueryConfig {
145
+ text?: string | number;
146
+ }
147
+ interface Vehicles extends RLLBaseQueryConfig {
148
+ name?: string | number;
149
+ }
150
+ interface All extends Companies, Launches, Locations, Missions, Pads, Tags, Vehicles {
151
+ }
152
+ }
153
+ export type RLLClientOptions = {
154
+ keyInQueryParams?: boolean;
155
+ };
156
+ export type RLLResponse<T> = {
157
+ errors?: string[];
158
+ valid_auth: boolean;
159
+ count: number;
160
+ limit: number;
161
+ total: number;
162
+ last_page: number;
163
+ result: T;
164
+ };
165
+ export {};
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RLLEntity = exports.RLLEndPoint = void 0;
4
+ var RLLEndPoint;
5
+ (function (RLLEndPoint) {
6
+ RLLEndPoint["COMPANIES"] = "companies";
7
+ RLLEndPoint["LAUNCHES"] = "launches";
8
+ RLLEndPoint["LOCATIONS"] = "locations";
9
+ RLLEndPoint["MISSIONS"] = "missions";
10
+ RLLEndPoint["PADS"] = "pads";
11
+ RLLEndPoint["TAGS"] = "tags";
12
+ RLLEndPoint["VEHICLES"] = "vehicles";
13
+ })(RLLEndPoint = exports.RLLEndPoint || (exports.RLLEndPoint = {}));
14
+ var RLLEntity;
15
+ (function (RLLEntity) {
16
+ var LaunchResult;
17
+ (function (LaunchResult) {
18
+ LaunchResult[LaunchResult["NOT_SET"] = -1] = "NOT_SET";
19
+ LaunchResult[LaunchResult["FAILURE"] = 0] = "FAILURE";
20
+ LaunchResult[LaunchResult["SUCCESS"] = 1] = "SUCCESS";
21
+ LaunchResult[LaunchResult["PARTIAL_FAILURE"] = 2] = "PARTIAL_FAILURE";
22
+ LaunchResult[LaunchResult["IN_FLIGHT_ABORT_CREWED"] = 3] = "IN_FLIGHT_ABORT_CREWED";
23
+ })(LaunchResult || (LaunchResult = {}));
24
+ })(RLLEntity = exports.RLLEntity || (exports.RLLEntity = {}));
25
+ //# sourceMappingURL=application.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/types/application.ts"],"names":[],"mappings":";;;AAEA,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,oCAAqB,CAAA;IACrB,sCAAuB,CAAA;IACvB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,oCAAqB,CAAA;AACvB,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB;AAMD,IAAiB,SAAS,CAoGzB;AApGD,WAAiB,SAAS;IAgBxB,IAAK,YAMJ;IAND,WAAK,YAAY;QACf,sDAAY,CAAA;QACZ,qDAAW,CAAA;QACX,qDAAW,CAAA;QACX,qEAAmB,CAAA;QACnB,mFAA0B,CAAA;IAC5B,CAAC,EANI,YAAY,KAAZ,YAAY,QAMhB;AA8EH,CAAC,EApGgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAoGzB"}
@@ -0,0 +1,314 @@
1
+ export declare const countryCodes: {
2
+ AF: string;
3
+ AL: string;
4
+ DZ: string;
5
+ AS: string;
6
+ AD: string;
7
+ AO: string;
8
+ AI: string;
9
+ AQ: string;
10
+ AG: string;
11
+ AR: string;
12
+ AM: string;
13
+ AW: string;
14
+ AU: string;
15
+ AT: string;
16
+ AZ: string;
17
+ BS: string;
18
+ BH: string;
19
+ BD: string;
20
+ BB: string;
21
+ BY: string;
22
+ BE: string;
23
+ BZ: string;
24
+ BJ: string;
25
+ BM: string;
26
+ BT: string;
27
+ BO: string;
28
+ BQ: string;
29
+ BA: string;
30
+ BW: string;
31
+ BV: string;
32
+ BR: string;
33
+ IO: string;
34
+ BN: string;
35
+ BG: string;
36
+ BF: string;
37
+ BI: string;
38
+ CV: string;
39
+ KH: string;
40
+ CM: string;
41
+ CA: string;
42
+ KY: string;
43
+ CF: string;
44
+ TD: string;
45
+ CL: string;
46
+ CN: string;
47
+ CX: string;
48
+ CC: string;
49
+ CO: string;
50
+ KM: string;
51
+ CD: string;
52
+ CG: string;
53
+ CK: string;
54
+ CR: string;
55
+ HR: string;
56
+ CU: string;
57
+ CW: string;
58
+ CY: string;
59
+ CZ: string;
60
+ CI: string;
61
+ DK: string;
62
+ DJ: string;
63
+ DM: string;
64
+ DO: string;
65
+ EC: string;
66
+ EG: string;
67
+ SV: string;
68
+ GQ: string;
69
+ ER: string;
70
+ EE: string;
71
+ SZ: string;
72
+ ET: string;
73
+ FK: string;
74
+ FO: string;
75
+ FJ: string;
76
+ FI: string;
77
+ FR: string;
78
+ GF: string;
79
+ PF: string;
80
+ TF: string;
81
+ GA: string;
82
+ GM: string;
83
+ GE: string;
84
+ DE: string;
85
+ GH: string;
86
+ GI: string;
87
+ GR: string;
88
+ GL: string;
89
+ GD: string;
90
+ GP: string;
91
+ GU: string;
92
+ GT: string;
93
+ GG: string;
94
+ GN: string;
95
+ GW: string;
96
+ GY: string;
97
+ HT: string;
98
+ HM: string;
99
+ VA: string;
100
+ HN: string;
101
+ HK: string;
102
+ HU: string;
103
+ IS: string;
104
+ IN: string;
105
+ ID: string;
106
+ IR: string;
107
+ IQ: string;
108
+ IE: string;
109
+ IM: string;
110
+ IL: string;
111
+ IT: string;
112
+ JM: string;
113
+ JP: string;
114
+ JE: string;
115
+ JO: string;
116
+ KZ: string;
117
+ KE: string;
118
+ KI: string;
119
+ KP: string;
120
+ KR: string;
121
+ KW: string;
122
+ KG: string;
123
+ LA: string;
124
+ LV: string;
125
+ LB: string;
126
+ LS: string;
127
+ LR: string;
128
+ LY: string;
129
+ LI: string;
130
+ LT: string;
131
+ LU: string;
132
+ MO: string;
133
+ MG: string;
134
+ MW: string;
135
+ MY: string;
136
+ MV: string;
137
+ ML: string;
138
+ MT: string;
139
+ MH: string;
140
+ MQ: string;
141
+ MR: string;
142
+ MU: string;
143
+ YT: string;
144
+ MX: string;
145
+ FM: string;
146
+ MD: string;
147
+ MC: string;
148
+ MN: string;
149
+ ME: string;
150
+ MS: string;
151
+ MA: string;
152
+ MZ: string;
153
+ MM: string;
154
+ NA: string;
155
+ NR: string;
156
+ NP: string;
157
+ NL: string;
158
+ NC: string;
159
+ NZ: string;
160
+ NI: string;
161
+ NE: string;
162
+ NG: string;
163
+ NU: string;
164
+ NF: string;
165
+ MP: string;
166
+ NO: string;
167
+ OM: string;
168
+ PK: string;
169
+ PW: string;
170
+ PS: string;
171
+ PA: string;
172
+ PG: string;
173
+ PY: string;
174
+ PE: string;
175
+ PH: string;
176
+ PN: string;
177
+ PL: string;
178
+ PT: string;
179
+ PR: string;
180
+ QA: string;
181
+ MK: string;
182
+ RO: string;
183
+ RU: string;
184
+ RW: string;
185
+ RE: string;
186
+ BL: string;
187
+ SH: string;
188
+ KN: string;
189
+ LC: string;
190
+ MF: string;
191
+ PM: string;
192
+ VC: string;
193
+ WS: string;
194
+ SM: string;
195
+ ST: string;
196
+ SA: string;
197
+ SN: string;
198
+ RS: string;
199
+ SC: string;
200
+ SL: string;
201
+ SG: string;
202
+ SX: string;
203
+ SK: string;
204
+ SI: string;
205
+ SB: string;
206
+ SO: string;
207
+ ZA: string;
208
+ GS: string;
209
+ SS: string;
210
+ ES: string;
211
+ LK: string;
212
+ SD: string;
213
+ SR: string;
214
+ SJ: string;
215
+ SE: string;
216
+ CH: string;
217
+ SY: string;
218
+ TW: string;
219
+ TJ: string;
220
+ TZ: string;
221
+ TH: string;
222
+ TL: string;
223
+ TG: string;
224
+ TK: string;
225
+ TO: string;
226
+ TT: string;
227
+ TN: string;
228
+ TR: string;
229
+ TM: string;
230
+ TC: string;
231
+ TV: string;
232
+ UG: string;
233
+ UA: string;
234
+ AE: string;
235
+ GB: string;
236
+ UM: string;
237
+ US: string;
238
+ UY: string;
239
+ UZ: string;
240
+ VU: string;
241
+ VE: string;
242
+ VN: string;
243
+ VG: string;
244
+ VI: string;
245
+ WF: string;
246
+ EH: string;
247
+ YE: string;
248
+ ZM: string;
249
+ ZW: string;
250
+ AX: string;
251
+ };
252
+ export declare const usStateCodes: {
253
+ AL: string;
254
+ AK: string;
255
+ AZ: string;
256
+ AR: string;
257
+ CA: string;
258
+ CO: string;
259
+ CT: string;
260
+ DE: string;
261
+ FL: string;
262
+ GA: string;
263
+ HI: string;
264
+ ID: string;
265
+ IL: string;
266
+ IN: string;
267
+ IA: string;
268
+ KS: string;
269
+ KY: string;
270
+ LA: string;
271
+ ME: string;
272
+ MD: string;
273
+ MA: string;
274
+ MI: string;
275
+ MN: string;
276
+ MS: string;
277
+ MO: string;
278
+ MT: string;
279
+ NE: string;
280
+ NV: string;
281
+ NH: string;
282
+ NJ: string;
283
+ NM: string;
284
+ NY: string;
285
+ NC: string;
286
+ ND: string;
287
+ OH: string;
288
+ OK: string;
289
+ OR: string;
290
+ PA: string;
291
+ RI: string;
292
+ SC: string;
293
+ SD: string;
294
+ TN: string;
295
+ TX: string;
296
+ UT: string;
297
+ VT: string;
298
+ VA: string;
299
+ WA: string;
300
+ WV: string;
301
+ WI: string;
302
+ WY: string;
303
+ DC: string;
304
+ AS: string;
305
+ GU: string;
306
+ MP: string;
307
+ PR: string;
308
+ UM: string;
309
+ VI: string;
310
+ };
311
+ export declare namespace ISO3166Alpha2 {
312
+ type CountryCode = keyof typeof countryCodes;
313
+ type StateCodeUS = keyof typeof usStateCodes;
314
+ }