skikrumb-api 2.1.12 → 2.1.13

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,11 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Read(//Users/michael/.config/nvim/**)",
5
+ "Read(//Users/michael/.config/**)",
6
+ "Read(//Users/michael/Code/skikrumb-api/**)"
7
+ ],
8
+ "deny": [],
9
+ "ask": []
10
+ }
11
+ }
package/dist/index.d.ts CHANGED
@@ -63,6 +63,16 @@ export declare const skiKrumb: (options?: {
63
63
  }>;
64
64
  getReplayData: (serialNumber: string, date: string, timezone?: string, size?: number) => Promise<any>;
65
65
  getDailyStats: (serialNumber: string, date: string, timezone?: string) => Promise<any>;
66
+ getActivityDates: (serialNumber: string, timezone?: string) => Promise<{
67
+ success: boolean;
68
+ dates?: string[] | undefined;
69
+ metadata?: {
70
+ serial_number: string;
71
+ timezone: string;
72
+ count: number;
73
+ } | undefined;
74
+ error?: any;
75
+ }>;
66
76
  getAccessibleProfiles: () => Promise<{
67
77
  success: boolean;
68
78
  accessibleProfiles: any[];
package/dist/index.js CHANGED
@@ -500,6 +500,23 @@ export const skiKrumb = (options = {
500
500
  .json();
501
501
  return response;
502
502
  };
503
+ const getActivityDates = async (serialNumber, timezone = 'America/Vancouver') => {
504
+ const requestWithAuth = ky.create({
505
+ prefixUrl: options.url,
506
+ headers: {
507
+ 'Content-Type': 'application/json',
508
+ Authorization: `Bearer ${options.apiKey}`,
509
+ 'supabase-auth-token': options.supabaseToken || '',
510
+ 'x-client': options.requestedWith,
511
+ },
512
+ });
513
+ const response = await requestWithAuth
514
+ .get(`data/activity-dates/${serialNumber}`, {
515
+ searchParams: { timezone },
516
+ })
517
+ .json();
518
+ return response;
519
+ };
503
520
  const getAccessibleProfiles = async () => {
504
521
  const requestWithAuth = ky.create({
505
522
  prefixUrl: options.url,
@@ -594,6 +611,7 @@ export const skiKrumb = (options = {
594
611
  updateFamilyShare,
595
612
  getReplayData,
596
613
  getDailyStats,
614
+ getActivityDates,
597
615
  getAccessibleProfiles,
598
616
  getLatestDeviceData,
599
617
  createRealtimeClient,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skikrumb-api",
3
- "version": "2.1.12",
3
+ "version": "2.1.13",
4
4
  "description": "Wrapper for the skiKrumb API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",