@headwindsimulations/api-client 1.2.1 → 1.3.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,13 @@
|
|
|
1
|
+
export declare class CpdlcMessage {
|
|
2
|
+
Logon: string;
|
|
3
|
+
From: string;
|
|
4
|
+
To: string;
|
|
5
|
+
Type: string;
|
|
6
|
+
Packet: string | null;
|
|
7
|
+
}
|
|
8
|
+
export declare class BeyondAtcResponse {
|
|
9
|
+
response: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class BeyondAtc {
|
|
12
|
+
static sendRequest(message: CpdlcMessage): Promise<BeyondAtcResponse>;
|
|
13
|
+
}
|
|
File without changes
|
|
@@ -7,5 +7,5 @@ export declare class SayIntentionsValidateResponse {
|
|
|
7
7
|
}
|
|
8
8
|
export declare class SayIntentions {
|
|
9
9
|
static sendRequest(body: any): Promise<SayIntentionsResponse>;
|
|
10
|
-
static
|
|
10
|
+
static validateKey(key: string): Promise<SayIntentionsValidateResponse>;
|
|
11
11
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -49,11 +49,11 @@ var SayIntentions = /** @class */ (function () {
|
|
|
49
49
|
function SayIntentions() {
|
|
50
50
|
}
|
|
51
51
|
SayIntentions.sendRequest = function (body) {
|
|
52
|
-
return post(new URL(
|
|
52
|
+
return post(new URL('/api/v1/sayintentions', NXApi.url), body);
|
|
53
53
|
};
|
|
54
|
-
SayIntentions.
|
|
55
|
-
var url = new URL("/api/v1/sayintentions/
|
|
56
|
-
url.searchParams.set("
|
|
54
|
+
SayIntentions.validateKey = function (key) {
|
|
55
|
+
var url = new URL("/api/v1/sayintentions/_validate", NXApi.url);
|
|
56
|
+
url.searchParams.set("key", key);
|
|
57
57
|
return get(url);
|
|
58
58
|
};
|
|
59
59
|
return SayIntentions;
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/utils/index.ts","../src/apis/Hoppie.ts","../src/apis/SayIntentions.ts","../src/index.ts"],"sourcesContent":["import axios from 'axios';\n\nexport function get<T>(url: URL, headers?: any): Promise<T> {\n return axios.get<T>(url.href, { headers })\n .then((res) => res.data);\n}\n\nexport function del(url: URL, headers?: any): Promise<void> {\n return axios.delete(url.href, { headers })\n .then((res) => res.data);\n}\n\nexport function post<T>(url: URL, body: any, headers?: any): Promise<T> {\n const headersToSend = {\n 'Content-Type': 'application/json',\n ...headers,\n };\n\n return axios.post<T>(url.href, body, { headers: headersToSend })\n .then((res) => res.data);\n}\n\nexport function put<T>(url: URL, body: any, headers?: any): Promise<T> {\n const headersToSend = {\n 'Content-Type': 'application/json',\n ...headers,\n };\n\n return axios.put<T>(url.href, body, { headers: headersToSend })\n .then((res) => res.data);\n}\n","import { NXApi } from '../index';\nimport { post } from '../utils';\n\nexport declare class HoppieResponse {\n response: string;\n}\n\nexport class Hoppie {\n public static sendRequest(body: any): Promise<HoppieResponse> {\n return post<HoppieResponse>(new URL('/api/v1/hoppie', NXApi.url), body);\n }\n}\n","import { NXApi } from \"../index\";\nimport { post, get } from \"../utils\";\n\nexport declare class SayIntentionsResponse {\n response: string;\n}\n\nexport declare class SayIntentionsValidateResponse {\n isValid: boolean;\n flightId: string;\n}\n\nexport class SayIntentions {\n public static sendRequest(body: any): Promise<SayIntentionsResponse> {\n
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/utils/index.ts","../src/apis/Hoppie.ts","../src/apis/SayIntentions.ts","../src/index.ts"],"sourcesContent":["import axios from 'axios';\n\nexport function get<T>(url: URL, headers?: any): Promise<T> {\n return axios.get<T>(url.href, { headers })\n .then((res) => res.data);\n}\n\nexport function del(url: URL, headers?: any): Promise<void> {\n return axios.delete(url.href, { headers })\n .then((res) => res.data);\n}\n\nexport function post<T>(url: URL, body: any, headers?: any): Promise<T> {\n const headersToSend = {\n 'Content-Type': 'application/json',\n ...headers,\n };\n\n return axios.post<T>(url.href, body, { headers: headersToSend })\n .then((res) => res.data);\n}\n\nexport function put<T>(url: URL, body: any, headers?: any): Promise<T> {\n const headersToSend = {\n 'Content-Type': 'application/json',\n ...headers,\n };\n\n return axios.put<T>(url.href, body, { headers: headersToSend })\n .then((res) => res.data);\n}\n","import { NXApi } from '../index';\nimport { post } from '../utils';\n\nexport declare class HoppieResponse {\n response: string;\n}\n\nexport class Hoppie {\n public static sendRequest(body: any): Promise<HoppieResponse> {\n return post<HoppieResponse>(new URL('/api/v1/hoppie', NXApi.url), body);\n }\n}\n","import { NXApi } from \"../index\";\nimport { post, get } from \"../utils\";\n\nexport declare class SayIntentionsResponse {\n response: string;\n}\n\nexport declare class SayIntentionsValidateResponse {\n isValid: boolean;\n flightId: string;\n}\n\nexport class SayIntentions {\n public static sendRequest(body: any): Promise<SayIntentionsResponse> {\n return post<SayIntentionsResponse>(new URL('/api/v1/sayintentions', NXApi.url), body);\n }\n\n public static validateKey(\n key: string\n ): Promise<SayIntentionsValidateResponse> {\n const url = new URL(\"/api/v1/sayintentions/_validate\", NXApi.url);\n url.searchParams.set(\"key\", key);\n \n return get<SayIntentionsValidateResponse>(url);\n }\n}\n\n","export class NXApi {\n public static url = new URL('https://api.headwindsim.net');\n}\n\nexport * from './apis';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;SAEgB,GAAG,CAAI,GAAQ,EAAE,OAAa;IAC1C,OAAO,KAAK,CAAC,GAAG,CAAI,GAAG,CAAC,IAAI,EAAE,EAAE,OAAO,SAAA,EAAE,CAAC;SACrC,IAAI,CAAC,UAAC,GAAG,IAAK,OAAA,GAAG,CAAC,IAAI,GAAA,CAAC,CAAC;AACjC,CAAC;SAOe,IAAI,CAAI,GAAQ,EAAE,IAAS,EAAE,OAAa;IACtD,IAAM,aAAa,cACf,cAAc,EAAE,kBAAkB,IAC/B,OAAO,CACb,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAI,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;SAC3D,IAAI,CAAC,UAAC,GAAG,IAAK,OAAA,GAAG,CAAC,IAAI,GAAA,CAAC,CAAC;AACjC;;;ICbA;KAIC;IAHiB,kBAAW,GAAzB,UAA0B,IAAS;QAC/B,OAAO,IAAI,CAAiB,IAAI,GAAG,CAAC,gBAAgB,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;KAC3E;IACL,aAAC;AAAD,CAAC;;;ICCD;KAaC;IAZe,yBAAW,GAAzB,UAA0B,IAAS;QAC/B,OAAO,IAAI,CAAwB,IAAI,GAAG,CAAC,uBAAuB,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;KACzF;IAEa,yBAAW,GAAzB,UACI,GAAW;QAEX,IAAM,GAAG,GAAG,IAAI,GAAG,CAAC,iCAAiC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QAClE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEjC,OAAO,GAAG,CAAgC,GAAG,CAAC,CAAC;KAChD;IACL,oBAAC;AAAD,CAAC;;;ICzBD;KAEC;IADiB,SAAG,GAAG,IAAI,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAC/D,YAAC;CAFD;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -57,11 +57,11 @@ var SayIntentions = /** @class */ (function () {
|
|
|
57
57
|
function SayIntentions() {
|
|
58
58
|
}
|
|
59
59
|
SayIntentions.sendRequest = function (body) {
|
|
60
|
-
return post(new URL(
|
|
60
|
+
return post(new URL('/api/v1/sayintentions', NXApi.url), body);
|
|
61
61
|
};
|
|
62
|
-
SayIntentions.
|
|
63
|
-
var url = new URL("/api/v1/sayintentions/
|
|
64
|
-
url.searchParams.set("
|
|
62
|
+
SayIntentions.validateKey = function (key) {
|
|
63
|
+
var url = new URL("/api/v1/sayintentions/_validate", NXApi.url);
|
|
64
|
+
url.searchParams.set("key", key);
|
|
65
65
|
return get(url);
|
|
66
66
|
};
|
|
67
67
|
return SayIntentions;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/utils/index.ts","../src/apis/Hoppie.ts","../src/apis/SayIntentions.ts","../src/index.ts"],"sourcesContent":["import axios from 'axios';\n\nexport function get<T>(url: URL, headers?: any): Promise<T> {\n return axios.get<T>(url.href, { headers })\n .then((res) => res.data);\n}\n\nexport function del(url: URL, headers?: any): Promise<void> {\n return axios.delete(url.href, { headers })\n .then((res) => res.data);\n}\n\nexport function post<T>(url: URL, body: any, headers?: any): Promise<T> {\n const headersToSend = {\n 'Content-Type': 'application/json',\n ...headers,\n };\n\n return axios.post<T>(url.href, body, { headers: headersToSend })\n .then((res) => res.data);\n}\n\nexport function put<T>(url: URL, body: any, headers?: any): Promise<T> {\n const headersToSend = {\n 'Content-Type': 'application/json',\n ...headers,\n };\n\n return axios.put<T>(url.href, body, { headers: headersToSend })\n .then((res) => res.data);\n}\n","import { NXApi } from '../index';\nimport { post } from '../utils';\n\nexport declare class HoppieResponse {\n response: string;\n}\n\nexport class Hoppie {\n public static sendRequest(body: any): Promise<HoppieResponse> {\n return post<HoppieResponse>(new URL('/api/v1/hoppie', NXApi.url), body);\n }\n}\n","import { NXApi } from \"../index\";\nimport { post, get } from \"../utils\";\n\nexport declare class SayIntentionsResponse {\n response: string;\n}\n\nexport declare class SayIntentionsValidateResponse {\n isValid: boolean;\n flightId: string;\n}\n\nexport class SayIntentions {\n public static sendRequest(body: any): Promise<SayIntentionsResponse> {\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/utils/index.ts","../src/apis/Hoppie.ts","../src/apis/SayIntentions.ts","../src/index.ts"],"sourcesContent":["import axios from 'axios';\n\nexport function get<T>(url: URL, headers?: any): Promise<T> {\n return axios.get<T>(url.href, { headers })\n .then((res) => res.data);\n}\n\nexport function del(url: URL, headers?: any): Promise<void> {\n return axios.delete(url.href, { headers })\n .then((res) => res.data);\n}\n\nexport function post<T>(url: URL, body: any, headers?: any): Promise<T> {\n const headersToSend = {\n 'Content-Type': 'application/json',\n ...headers,\n };\n\n return axios.post<T>(url.href, body, { headers: headersToSend })\n .then((res) => res.data);\n}\n\nexport function put<T>(url: URL, body: any, headers?: any): Promise<T> {\n const headersToSend = {\n 'Content-Type': 'application/json',\n ...headers,\n };\n\n return axios.put<T>(url.href, body, { headers: headersToSend })\n .then((res) => res.data);\n}\n","import { NXApi } from '../index';\nimport { post } from '../utils';\n\nexport declare class HoppieResponse {\n response: string;\n}\n\nexport class Hoppie {\n public static sendRequest(body: any): Promise<HoppieResponse> {\n return post<HoppieResponse>(new URL('/api/v1/hoppie', NXApi.url), body);\n }\n}\n","import { NXApi } from \"../index\";\nimport { post, get } from \"../utils\";\n\nexport declare class SayIntentionsResponse {\n response: string;\n}\n\nexport declare class SayIntentionsValidateResponse {\n isValid: boolean;\n flightId: string;\n}\n\nexport class SayIntentions {\n public static sendRequest(body: any): Promise<SayIntentionsResponse> {\n return post<SayIntentionsResponse>(new URL('/api/v1/sayintentions', NXApi.url), body);\n }\n\n public static validateKey(\n key: string\n ): Promise<SayIntentionsValidateResponse> {\n const url = new URL(\"/api/v1/sayintentions/_validate\", NXApi.url);\n url.searchParams.set(\"key\", key);\n \n return get<SayIntentionsValidateResponse>(url);\n }\n}\n\n","export class NXApi {\n public static url = new URL('https://api.headwindsim.net');\n}\n\nexport * from './apis';\n"],"names":["axios"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAEgB,GAAG,CAAI,GAAQ,EAAE,OAAa;IAC1C,OAAOA,yBAAK,CAAC,GAAG,CAAI,GAAG,CAAC,IAAI,EAAE,EAAE,OAAO,SAAA,EAAE,CAAC;SACrC,IAAI,CAAC,UAAC,GAAG,IAAK,OAAA,GAAG,CAAC,IAAI,GAAA,CAAC,CAAC;AACjC,CAAC;SAOe,IAAI,CAAI,GAAQ,EA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