skikrumb-api 1.3.7 → 1.3.9
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.d.ts +1 -0
- package/dist/index.js +13 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const skiKrumb: (options?: {
|
|
|
7
7
|
}) => {
|
|
8
8
|
createDevice: (deveui: string, serialNumber: string) => Promise<any>;
|
|
9
9
|
createDeviceDownlink: (userId: string, deveui: string, type?: string) => Promise<any>;
|
|
10
|
+
sendMobileLocation: (payload: any) => Promise<any>;
|
|
10
11
|
createPaymentIntent: (form: any) => Promise<any>;
|
|
11
12
|
createPrePurchaseIntent: (form: any) => Promise<any>;
|
|
12
13
|
getPaymentIntent: (clientSecret: string) => Promise<any>;
|
package/dist/index.js
CHANGED
|
@@ -67,6 +67,18 @@ export const skiKrumb = (options = {
|
|
|
67
67
|
})
|
|
68
68
|
.json();
|
|
69
69
|
});
|
|
70
|
+
const sendMobileLocation = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
|
+
if (!payload)
|
|
72
|
+
throw new Error('Payload is required');
|
|
73
|
+
return yield api
|
|
74
|
+
.post(`${options.url}/devices/location/mobile`, {
|
|
75
|
+
headers: {
|
|
76
|
+
'content-type': 'application/json',
|
|
77
|
+
},
|
|
78
|
+
json: payload,
|
|
79
|
+
})
|
|
80
|
+
.json();
|
|
81
|
+
});
|
|
70
82
|
const createPaymentIntent = (form) => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
83
|
if (!form)
|
|
72
84
|
throw new Error('Form values not posted.');
|
|
@@ -185,6 +197,7 @@ export const skiKrumb = (options = {
|
|
|
185
197
|
return {
|
|
186
198
|
createDevice,
|
|
187
199
|
createDeviceDownlink,
|
|
200
|
+
sendMobileLocation,
|
|
188
201
|
createPaymentIntent,
|
|
189
202
|
createPrePurchaseIntent,
|
|
190
203
|
getPaymentIntent,
|