skikrumb-api 1.3.0 → 1.3.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.d.ts CHANGED
@@ -5,7 +5,7 @@ export declare const skiKrumb: (options?: {
5
5
  url: string | undefined;
6
6
  }) => {
7
7
  createDevice: (deveui: string, serialNumber: string) => Promise<any>;
8
- createDeviceDownlink: (deveui: string, type?: string) => Promise<any>;
8
+ createDeviceDownlink: (userId: string, deveui: string, type?: string) => Promise<any>;
9
9
  createPaymentIntent: (form: any) => Promise<any>;
10
10
  createPrePurchaseIntent: (form: any) => Promise<any>;
11
11
  readApiKeys: () => Promise<apiKeys[]>;
package/dist/index.js CHANGED
@@ -34,9 +34,9 @@ export const skiKrumb = (options = {
34
34
  json: { deveui: deveui, serial_number: serialNumber }
35
35
  }).json();
36
36
  });
37
- const createDeviceDownlink = (deveui, type = 'beep') => __awaiter(void 0, void 0, void 0, function* () {
38
- if (!deveui || !type)
39
- throw new Error('Must pass Lora MAC (deveui) and message type');
37
+ const createDeviceDownlink = (userId_1, deveui_1, ...args_1) => __awaiter(void 0, [userId_1, deveui_1, ...args_1], void 0, function* (userId, deveui, type = 'beep') {
38
+ if (!userId || !deveui || !type)
39
+ throw new Error('Must pass userId, Lora MAC (deveui) and message type');
40
40
  let message = 'DAgAC04zKE9EPTEwKQ0K';
41
41
  switch (type) {
42
42
  case 'help-off':
@@ -48,11 +48,12 @@ export const skiKrumb = (options = {
48
48
  'content-type': 'application/json'
49
49
  },
50
50
  json: {
51
- 'device': deveui,
52
- 'data': {
53
- 'params': {
54
- 'data': message,
55
- 'port': 100
51
+ "device": deveui,
52
+ "userId": userId,
53
+ "data": {
54
+ "params": {
55
+ "data": message,
56
+ "port": 100
56
57
  }
57
58
  }
58
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skikrumb-api",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Wrapper for the skiKrumb API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "author": "",
14
14
  "license": "UNLICENSED",
15
15
  "devDependencies": {
16
- "typescript": "^5.1.6"
16
+ "typescript": "^5.7.2"
17
17
  },
18
18
  "dependencies": {
19
19
  "ky": "^0.33.3"