yoto-nodejs-client 0.0.1 → 0.0.3
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/README.md +523 -30
- package/bin/auth.js +36 -46
- package/bin/content.js +0 -0
- package/bin/device-model.d.ts +3 -0
- package/bin/device-model.d.ts.map +1 -0
- package/bin/device-model.js +360 -0
- package/bin/device-tui.TODO.md +125 -0
- package/bin/device-tui.d.ts +31 -0
- package/bin/device-tui.d.ts.map +1 -0
- package/bin/device-tui.js +1123 -0
- package/bin/devices.js +166 -28
- package/bin/groups.js +0 -0
- package/bin/icons.js +0 -0
- package/bin/lib/cli-helpers.d.ts +33 -1
- package/bin/lib/cli-helpers.d.ts.map +1 -1
- package/bin/lib/cli-helpers.js +5 -5
- package/bin/lib/token-helpers.d.ts +32 -0
- package/bin/lib/token-helpers.d.ts.map +1 -1
- package/bin/refresh-token.js +6 -6
- package/bin/token-info.js +3 -3
- package/index.d.ts +4 -217
- package/index.d.ts.map +1 -1
- package/index.js +11 -689
- package/lib/api-client.d.ts +576 -0
- package/lib/api-client.d.ts.map +1 -0
- package/lib/api-client.js +681 -0
- package/lib/api-endpoints/auth.d.ts +280 -4
- package/lib/api-endpoints/auth.d.ts.map +1 -1
- package/lib/api-endpoints/auth.js +224 -7
- package/lib/api-endpoints/auth.test.js +54 -2
- package/lib/api-endpoints/constants.d.ts +30 -2
- package/lib/api-endpoints/constants.d.ts.map +1 -1
- package/lib/api-endpoints/constants.js +17 -10
- package/lib/api-endpoints/content.d.ts +760 -0
- package/lib/api-endpoints/content.d.ts.map +1 -1
- package/lib/api-endpoints/content.test.js +1 -1
- package/lib/api-endpoints/devices.d.ts +917 -48
- package/lib/api-endpoints/devices.d.ts.map +1 -1
- package/lib/api-endpoints/devices.js +114 -52
- package/lib/api-endpoints/devices.test.js +1 -1
- package/lib/api-endpoints/endpoint-test-helpers.d.ts +28 -0
- package/lib/api-endpoints/endpoint-test-helpers.d.ts.map +1 -0
- package/lib/api-endpoints/family-library-groups.d.ts +187 -0
- package/lib/api-endpoints/family-library-groups.d.ts.map +1 -1
- package/lib/api-endpoints/family-library-groups.test.js +1 -1
- package/lib/api-endpoints/family.d.ts +88 -0
- package/lib/api-endpoints/family.d.ts.map +1 -1
- package/lib/api-endpoints/family.test.js +1 -1
- package/lib/api-endpoints/helpers.d.ts +37 -3
- package/lib/api-endpoints/helpers.d.ts.map +1 -1
- package/lib/api-endpoints/icons.d.ts +196 -0
- package/lib/api-endpoints/icons.d.ts.map +1 -1
- package/lib/api-endpoints/icons.test.js +1 -1
- package/lib/api-endpoints/media.d.ts +83 -0
- package/lib/api-endpoints/media.d.ts.map +1 -1
- package/lib/helpers/power-state.d.ts +53 -0
- package/lib/helpers/power-state.d.ts.map +1 -0
- package/lib/helpers/power-state.js +73 -0
- package/lib/helpers/power-state.test.js +100 -0
- package/lib/helpers/temperature.d.ts +24 -0
- package/lib/helpers/temperature.d.ts.map +1 -0
- package/lib/helpers/temperature.js +61 -0
- package/lib/helpers/temperature.test.js +58 -0
- package/lib/helpers/typed-keys.d.ts +7 -0
- package/lib/helpers/typed-keys.d.ts.map +1 -0
- package/lib/helpers/typed-keys.js +8 -0
- package/lib/mqtt/client.d.ts +610 -7
- package/lib/mqtt/client.d.ts.map +1 -1
- package/lib/mqtt/client.js +213 -31
- package/lib/mqtt/commands.d.ts +195 -0
- package/lib/mqtt/commands.d.ts.map +1 -1
- package/lib/mqtt/factory.d.ts +62 -1
- package/lib/mqtt/factory.d.ts.map +1 -1
- package/lib/mqtt/factory.js +27 -5
- package/lib/mqtt/mqtt.test.js +85 -28
- package/lib/mqtt/topics.d.ts +186 -1
- package/lib/mqtt/topics.d.ts.map +1 -1
- package/lib/mqtt/topics.js +54 -20
- package/lib/pkg.d.cts +9 -0
- package/lib/token.d.ts +106 -3
- package/lib/token.d.ts.map +1 -1
- package/lib/token.js +30 -23
- package/lib/yoto-account.d.ts +163 -0
- package/lib/yoto-account.d.ts.map +1 -0
- package/lib/yoto-account.js +340 -0
- package/lib/yoto-device.d.ts +656 -0
- package/lib/yoto-device.d.ts.map +1 -0
- package/lib/yoto-device.js +2850 -0
- package/package.json +22 -15
- package/lib/api-endpoints/test-helpers.d.ts +0 -7
- package/lib/api-endpoints/test-helpers.d.ts.map +0 -1
- /package/lib/api-endpoints/{test-helpers.js → endpoint-test-helpers.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["devices.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["devices.js"],"names":[],"mappings":"AAaA;;;;GAIG;AAEH;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;GAQG;AACH,uEALG;IAAyB,WAAW,EAA3B,MAAM;IACW,SAAS;IACD,cAAc;;;CAChD,GAAS,OAAO,CAAC,mBAAmB,CAAC,CAkBvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH;;;;;;;;;GASG;AACH,sFANG;IAAyB,WAAW,EAA3B,MAAM;IACU,QAAQ,EAAxB,MAAM;IACW,SAAS;IACD,cAAc;;;CAChD,GAAS,OAAO,CAAC,wBAAwB,CAAC,CAmB5C;AAED;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH;;;;;GAKG;AAEH;;;;;GAKG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;GASG;AACH,sFANG;IAAyB,WAAW,EAA3B,MAAM;IACU,QAAQ,EAAxB,MAAM;IACW,SAAS;IACD,cAAc;;;CAChD,GAAS,OAAO,CAAC,wBAAwB,CAAC,CAmB5C;AAED;;;;;GAKG;AAEH;;;;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;;;YACN,OAAO,CAAC,gBAAgB,CAAC;;;;;;YAMzB,MAAM;;;;;;eAyCN,mBAAmB;;;;;;YAMnB,MAAM;;;;;;YA0CN,MAAM;;;;;;gCAOP,iBAAiB,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,oBAAoB,GAAG,yBAAyB,GAAG,EAAE;uCA1aF,qBAAqB;wCAArB,qBAAqB;2CAArB,qBAAqB;0CAArB,qBAAqB;0CAArB,qBAAqB;+CAArB,qBAAqB"}
|
|
@@ -63,38 +63,38 @@ export async function getDevices ({
|
|
|
63
63
|
* @see https://yoto.dev/api/getdevicestatus/
|
|
64
64
|
* @typedef {Object} YotoDeviceStatusResponse
|
|
65
65
|
* @property {string} deviceId - Unique identifier of the device
|
|
66
|
-
* @property {string}
|
|
67
|
-
* @property {number}
|
|
68
|
-
* @property {number}
|
|
69
|
-
* @property {number}
|
|
70
|
-
* @property {number}
|
|
71
|
-
* @property {number}
|
|
72
|
-
* @property {0 | 1 | 2}
|
|
73
|
-
* @property {-1 | 0 | 1}
|
|
74
|
-
* @property {number}
|
|
75
|
-
* @property {string}
|
|
76
|
-
* @property {number}
|
|
77
|
-
* @property {boolean}
|
|
78
|
-
* @property {boolean}
|
|
79
|
-
* @property {boolean}
|
|
80
|
-
* @property {boolean}
|
|
81
|
-
* @property {number}
|
|
82
|
-
* @property {boolean}
|
|
83
|
-
* @property {string}
|
|
84
|
-
* @property {string}
|
|
85
|
-
* @property {number}
|
|
86
|
-
* @property {string | null}
|
|
87
|
-
* @property {0 | 1 | 2 | 3}
|
|
88
|
-
* @property {number}
|
|
89
|
-
* @property {number}
|
|
90
|
-
* @property {
|
|
91
|
-
* @property {number}
|
|
92
|
-
* @property {string}
|
|
93
|
-
* @property {number}
|
|
94
|
-
* @property {number}
|
|
95
|
-
* @property {number}
|
|
96
|
-
* @property {number}
|
|
97
|
-
* @property {number}
|
|
66
|
+
* @property {string} activeCard - Active card on the device (can be 'none')
|
|
67
|
+
* @property {number} ambientLightSensorReading - Reading from ambient light sensor
|
|
68
|
+
* @property {number} averageDownloadSpeedBytesSecond - Average download speed in bytes per second
|
|
69
|
+
* @property {number} batteryLevelPercentage - Battery level in percentage
|
|
70
|
+
* @property {number} batteryLevelPercentageRaw - Raw battery level percentage
|
|
71
|
+
* @property {number} buzzErrors - Number of buzz errors
|
|
72
|
+
* @property {0 | 1 | 2} cardInsertionState - Card insertion state from API (0=none, 1=physical, 2=remote) - converted to CardInsertionState string union in YotoDeviceStatus
|
|
73
|
+
* @property {-1 | 0 | 1} dayMode - Day mode status (-1=unknown, 0=night, 1=day)
|
|
74
|
+
* @property {number} errorsLogged - Number of errors logged
|
|
75
|
+
* @property {string} firmwareVersion - Firmware version (e.g., 'v2.23.2')
|
|
76
|
+
* @property {number} freeDiskSpaceBytes - Free disk space in bytes
|
|
77
|
+
* @property {boolean} isAudioDeviceConnected - Whether audio device is connected
|
|
78
|
+
* @property {boolean} isBackgroundDownloadActive - Whether background download is active
|
|
79
|
+
* @property {boolean} isBluetoothAudioConnected - Whether Bluetooth audio is connected
|
|
80
|
+
* @property {boolean} isCharging - Whether device is currently charging
|
|
81
|
+
* @property {number} isNfcLocked - NFC lock status
|
|
82
|
+
* @property {boolean} isOnline - Whether device is currently online
|
|
83
|
+
* @property {string} networkSsid - Network SSID device is connected to
|
|
84
|
+
* @property {string} nightlightMode - Current nightlight color (HTTP returns 'off' or '0x000000'; MQTT provides actual hex color like '0xff5733')
|
|
85
|
+
* @property {number} playingSource - Currently playing source
|
|
86
|
+
* @property {string | null} powerCapabilities - Power capabilities (e.g., '0x02')
|
|
87
|
+
* @property {0 | 1 | 2 | 3} powerSource - Power source (0=battery, 1=V2 dock, 2=USB-C, 3=Qi)
|
|
88
|
+
* @property {number} systemVolumePercentage - System/max volume in percentage (0-100, represents 0-16 hardware scale, maps to volumeMax in events)
|
|
89
|
+
* @property {number} taskWatchdogTimeoutCount - Task watchdog timeout count
|
|
90
|
+
* @property {string | number} temperatureCelcius - Temperature in Celsius (can be number or string like "0" or "notSupported") - Note: API misspells "Celsius"
|
|
91
|
+
* @property {number} totalDiskSpaceBytes - Total disk space in bytes
|
|
92
|
+
* @property {string} updatedAt - Timestamp of last update
|
|
93
|
+
* @property {number} uptime - Uptime of the device in seconds
|
|
94
|
+
* @property {number} userVolumePercentage - User volume in percentage (0-100, represents 0-16 hardware scale, maps to volume in events)
|
|
95
|
+
* @property {number} utcOffsetSeconds - UTC offset in seconds
|
|
96
|
+
* @property {number} utcTime - UTC time as Unix timestamp
|
|
97
|
+
* @property {number} wifiStrength - WiFi connection strength in decibels
|
|
98
98
|
*/
|
|
99
99
|
|
|
100
100
|
/**
|
|
@@ -152,45 +152,107 @@ export async function getDeviceStatus ({
|
|
|
152
152
|
* @property {string} releaseChannelId - Release channel identifier
|
|
153
153
|
* @property {string} releaseChannelVersion - Release channel version
|
|
154
154
|
* @property {string} fwVersion - Firmware version (undocumented)
|
|
155
|
-
* @property {
|
|
156
|
-
* @property {YotoDeviceShortcuts}
|
|
155
|
+
* @property {YotoDeviceFullStatus} status - Comprehensive device status object (undocumented)
|
|
156
|
+
* @property {YotoDeviceShortcuts} shortcuts - Button shortcuts configuration (beta feature)
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Comprehensive device status from HTTP config endpoint (undocumented)
|
|
161
|
+
* Contains both user-facing fields and low-level hardware/diagnostic data
|
|
162
|
+
* Note: Many fields are nullable when device hasn't synced settings yet
|
|
163
|
+
* @typedef {Object} YotoDeviceFullStatus
|
|
164
|
+
* @property {string} activeCard - Active card ID or 'none'
|
|
165
|
+
* @property {number | null} aliveTime - Total time device has been alive
|
|
166
|
+
* @property {number} als - Ambient light sensor reading
|
|
167
|
+
* @property {number | null} battery - Raw battery voltage
|
|
168
|
+
* @property {number} batteryLevel - Battery level percentage
|
|
169
|
+
* @property {number} batteryLevelRaw - Raw battery level percentage
|
|
170
|
+
* @property {number | null} batteryRemaining - Battery remaining time estimate
|
|
171
|
+
* @property {0 | 1} bgDownload - Background download status (0 or 1)
|
|
172
|
+
* @property {0 | 1} bluetoothHp - Bluetooth headphones enabled (0 or 1)
|
|
173
|
+
* @property {number} buzzErrors - Number of buzz errors
|
|
174
|
+
* @property {number} bytesPS - Bytes per second transfer rate
|
|
175
|
+
* @property {0 | 1 | 2} cardInserted - Card insertion state (0=none, 1=physical, 2=remote)
|
|
176
|
+
* @property {number | null} chgStatLevel - Charge state level
|
|
177
|
+
* @property {0 | 1} charging - Charging state (0 or 1)
|
|
178
|
+
* @property {-1 | 0 | 1} day - Day mode (0=night, 1=day, -1=unknown)
|
|
179
|
+
* @property {number | null} dayBright - Day brightness setting
|
|
180
|
+
* @property {number | null} dbatTimeout - DBAT timeout value
|
|
181
|
+
* @property {string} deviceId - Device unique identifier
|
|
182
|
+
* @property {number | null} dnowBrightness - Current display brightness
|
|
183
|
+
* @property {number} errorsLogged - Number of errors logged
|
|
184
|
+
* @property {any} failData - Failure data (null if none)
|
|
185
|
+
* @property {any} failReason - Failure reason (null if none)
|
|
186
|
+
* @property {number | null} free - Free memory in bytes
|
|
187
|
+
* @property {number | null} free32 - Free 32-bit memory pool
|
|
188
|
+
* @property {number} freeDisk - Free disk space in bytes
|
|
189
|
+
* @property {number | null} freeDMA - Free DMA memory
|
|
190
|
+
* @property {string} fwVersion - Firmware version
|
|
191
|
+
* @property {0 | 1} headphones - Headphones connected (0 or 1)
|
|
192
|
+
* @property {string | null} lastSeenAt - Last seen timestamp
|
|
193
|
+
* @property {number | null} missedLogs - Number of missed log entries
|
|
194
|
+
* @property {string} nfcErrs - NFC errors (e.g., 'n/a')
|
|
195
|
+
* @property {number} nfcLock - NFC lock status
|
|
196
|
+
* @property {number | null} nightBright - Night brightness setting
|
|
197
|
+
* @property {string} nightlightMode - Current nightlight color (hex color like '0xff5733' or 'off')
|
|
198
|
+
* @property {number} playingStatus - Playing status code
|
|
199
|
+
* @property {string | null} powerCaps - Power capabilities
|
|
200
|
+
* @property {0 | 1 | 2 | 3} powerSrc - Power source (0=battery, 1=V2 dock, 2=USB-C, 3=Qi)
|
|
201
|
+
* @property {number | null} qiOtp - Qi OTP value
|
|
202
|
+
* @property {string | null} sd_info - SD card information
|
|
203
|
+
* @property {string | null} shutDown - Shutdown reason ('nA' = running, 'userShutdown' = powered off, etc.)
|
|
204
|
+
* @property {number | null} shutdownTimeout - Shutdown timeout in seconds
|
|
205
|
+
* @property {string} ssid - WiFi SSID
|
|
206
|
+
* @property {number | null} statusVersion - Status version number
|
|
207
|
+
* @property {string} temp - Temperature readings (format: 'value1:value2' or 'value1:notSupported')
|
|
208
|
+
* @property {'12' | '24' | null} timeFormat - Time format ('12' or '24')
|
|
209
|
+
* @property {number} totalDisk - Total disk space in bytes
|
|
210
|
+
* @property {number} twdt - Task watchdog timeout count
|
|
211
|
+
* @property {string} updatedAt - Last update timestamp (ISO 8601)
|
|
212
|
+
* @property {number} upTime - Uptime in seconds
|
|
213
|
+
* @property {number} userVolume - User volume setting (0-100 percentage, represents 0-16 hardware scale, maps to volume in events)
|
|
214
|
+
* @property {number} utcOffset - UTC offset in seconds
|
|
215
|
+
* @property {number} utcTime - UTC time as Unix timestamp
|
|
216
|
+
* @property {number} volume - System/max volume level (0-100 percentage, represents 0-16 hardware scale, maps to volumeMax in events)
|
|
217
|
+
* @property {number | null} wifiRestarts - Number of WiFi restarts
|
|
218
|
+
* @property {number} wifiStrength - WiFi signal strength in dBm
|
|
157
219
|
*/
|
|
158
220
|
|
|
159
221
|
/**
|
|
160
222
|
* @see https://yoto.dev/api/getdeviceconfig/
|
|
161
223
|
* @typedef {Object} YotoDeviceConfig
|
|
162
|
-
* @property {string[]}
|
|
224
|
+
* @property {string[]} alarms - Array of alarm strings in comma-separated format (e.g., '1111111,1100,5WsQg,,,8')
|
|
163
225
|
* @property {string} ambientColour - Ambient light color (hex code)
|
|
164
226
|
* @property {string} bluetoothEnabled - Bluetooth enabled state ('0' or '1')
|
|
165
227
|
* @property {boolean} btHeadphonesEnabled - Bluetooth headphones enabled
|
|
166
|
-
* @property {string}
|
|
167
|
-
* @property {string} dayDisplayBrightness - Day display brightness (e.g., 'auto')
|
|
168
|
-
* @property {string} dayTime - Day mode start time (e.g., '07:
|
|
228
|
+
* @property {string} clockFace - Clock face style (e.g., 'digital-sun')
|
|
229
|
+
* @property {string} dayDisplayBrightness - Day display brightness (e.g., 'auto', '100')
|
|
230
|
+
* @property {string} dayTime - Day mode start time (e.g., '07:00')
|
|
169
231
|
* @property {string} dayYotoDaily - Day mode Yoto Daily card path
|
|
170
232
|
* @property {string} dayYotoRadio - Day mode Yoto Radio card path
|
|
171
|
-
* @property {string}
|
|
172
|
-
* @property {string}
|
|
233
|
+
* @property {string} daySoundsOff - Day sounds off setting ('0' or '1') (undocumented)
|
|
234
|
+
* @property {string} displayDimBrightness - Display dim brightness level (undocumented)
|
|
173
235
|
* @property {string} displayDimTimeout - Display dim timeout in seconds
|
|
174
236
|
* @property {boolean} headphonesVolumeLimited - Whether headphones volume is limited
|
|
175
|
-
* @property {string}
|
|
176
|
-
* @property {string}
|
|
177
|
-
* @property {string}
|
|
237
|
+
* @property {string} hourFormat - Hour format ('12' or '24') (undocumented)
|
|
238
|
+
* @property {string} logLevel - Log level (e.g., 'none') (undocumented)
|
|
239
|
+
* @property {string} locale - Device locale (e.g., 'en') (undocumented)
|
|
178
240
|
* @property {string} maxVolumeLimit - Maximum volume limit
|
|
179
241
|
* @property {string} nightAmbientColour - Night ambient light color (hex code)
|
|
180
242
|
* @property {string} nightDisplayBrightness - Night display brightness
|
|
181
243
|
* @property {string} nightMaxVolumeLimit - Night maximum volume limit
|
|
182
|
-
* @property {string} nightTime - Night mode start time (e.g., '19:
|
|
244
|
+
* @property {string} nightTime - Night mode start time (e.g., '19:20')
|
|
183
245
|
* @property {string} nightYotoDaily - Night mode Yoto Daily card path
|
|
184
|
-
* @property {string} nightYotoRadio - Night mode Yoto Radio card path
|
|
185
|
-
* @property {string}
|
|
186
|
-
* @property {boolean}
|
|
187
|
-
* @property {boolean}
|
|
246
|
+
* @property {string} nightYotoRadio - Night mode Yoto Radio card path (can be '0' for none)
|
|
247
|
+
* @property {string} nightSoundsOff - Night sounds off setting ('0' or '1') (undocumented)
|
|
248
|
+
* @property {boolean} pausePowerButton - Pause on power button press (undocumented)
|
|
249
|
+
* @property {boolean} pauseVolumeDown - Pause on volume down (undocumented)
|
|
188
250
|
* @property {boolean} repeatAll - Whether repeat all is enabled
|
|
189
|
-
* @property {boolean}
|
|
251
|
+
* @property {boolean} showDiagnostics - Show diagnostics (undocumented)
|
|
190
252
|
* @property {string} shutdownTimeout - Shutdown timeout in seconds
|
|
191
|
-
* @property {string}
|
|
192
|
-
* @property {string}
|
|
193
|
-
* @property {string}
|
|
253
|
+
* @property {string} systemVolume - System volume level (e.g., '100') (undocumented)
|
|
254
|
+
* @property {string} timezone - Timezone setting (empty string if not set) (undocumented)
|
|
255
|
+
* @property {string} volumeLevel - Volume level preset (e.g., 'safe') (undocumented)
|
|
194
256
|
*/
|
|
195
257
|
|
|
196
258
|
/**
|
|
@@ -2,7 +2,7 @@ import test from 'node:test'
|
|
|
2
2
|
import assert from 'node:assert'
|
|
3
3
|
import { getDevices, getDeviceStatus, getDeviceConfig } from './devices.js'
|
|
4
4
|
import { YotoAPIError } from './helpers.js'
|
|
5
|
-
import { loadTestTokens, logResponse } from './test-helpers.js'
|
|
5
|
+
import { loadTestTokens, logResponse } from './endpoint-test-helpers.js'
|
|
6
6
|
|
|
7
7
|
const { accessToken } = loadTestTokens()
|
|
8
8
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Load tokens from .env file for testing
|
|
3
|
+
* @returns {{accessToken: string, refreshToken: string, clientId: string}}
|
|
4
|
+
*/
|
|
5
|
+
export function loadTestTokens(): {
|
|
6
|
+
accessToken: string;
|
|
7
|
+
refreshToken: string;
|
|
8
|
+
clientId: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Log API response for type verification and documentation.
|
|
12
|
+
*
|
|
13
|
+
* This is a first-class testing feature, not temporary debug code.
|
|
14
|
+
* It helps with:
|
|
15
|
+
* - Writing new tests by showing actual API response structure
|
|
16
|
+
* - Verifying type definitions match reality
|
|
17
|
+
* - Debugging test failures
|
|
18
|
+
* - Documenting API behavior
|
|
19
|
+
*
|
|
20
|
+
* @param {string} label - Descriptive label for the response (e.g., 'GET DEVICES')
|
|
21
|
+
* @param {any} response - The API response object to log
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* const devices = await getDevices({ token })
|
|
25
|
+
* logResponse('GET DEVICES', devices)
|
|
26
|
+
*/
|
|
27
|
+
export function logResponse(label: string, response: any): void;
|
|
28
|
+
//# sourceMappingURL=endpoint-test-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoint-test-helpers.d.ts","sourceRoot":"","sources":["endpoint-test-helpers.js"],"names":[],"mappings":"AAMA;;;GAGG;AACH,kCAFa;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAiCzE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,mCAPW,MAAM,YACN,GAAG,QASb"}
|
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://yoto.dev/api/getgroups/
|
|
3
|
+
* @typedef {Object} YotoGroupsResponse
|
|
4
|
+
* @property {YotoGroup[]} groups - Array of family library groups
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @see https://yoto.dev/api/getgroups/
|
|
8
|
+
* @typedef {Object} YotoGroup
|
|
9
|
+
* @property {string} id - Group identifier
|
|
10
|
+
* @property {string} name - Group name (e.g., "My Favourites")
|
|
11
|
+
* @property {string} familyId - Associated family ID
|
|
12
|
+
* @property {string} imageId - ID for the group image (can be uploaded family image hash or preset like "fp-cards")
|
|
13
|
+
* @property {string} imageUrl - CDN URL to the group image
|
|
14
|
+
* @property {YotoGroupItem[]} items - Array of content items in the group
|
|
15
|
+
* @property {any[]} cards - Array of card objects
|
|
16
|
+
* @property {string} createdAt - ISO 8601 timestamp when group was created
|
|
17
|
+
* @property {string} lastModifiedAt - ISO 8601 timestamp when group was last updated
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* @see https://yoto.dev/api/getgroups/
|
|
21
|
+
* @typedef {Object} YotoGroupItem
|
|
22
|
+
* @property {string} contentId - ID of the card content
|
|
23
|
+
* @property {string} addedAt - ISO 8601 timestamp when item was added to group
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves all family library groups for the authenticated user's family.
|
|
27
|
+
* Returns an empty array if no groups exist.
|
|
28
|
+
* @see https://yoto.dev/api/getgroups/
|
|
29
|
+
* @param {object} options
|
|
30
|
+
* @param {string} options.accessToken The API token to request with
|
|
31
|
+
* @param {string} [options.userAgent] Optional user agent string
|
|
32
|
+
* @param {RequestOptions} [options.requestOptions] Additional undici request options
|
|
33
|
+
* @return {Promise<YotoGroup[]>} Array of family library groups
|
|
34
|
+
* @example
|
|
35
|
+
* import { getGroups } from 'yoto-nodejs-client'
|
|
36
|
+
*
|
|
37
|
+
* const groups = await getGroups({
|
|
38
|
+
* accessToken
|
|
39
|
+
* })
|
|
40
|
+
*
|
|
41
|
+
* console.log('Groups:', groups.length)
|
|
42
|
+
* groups.forEach(group => {
|
|
43
|
+
* console.log(`${group.name}: ${group.items.length} items`)
|
|
44
|
+
* })
|
|
45
|
+
*/
|
|
1
46
|
export function getGroups({ accessToken, userAgent, requestOptions }: {
|
|
2
47
|
accessToken: string;
|
|
3
48
|
userAgent?: string | undefined;
|
|
@@ -5,6 +50,42 @@ export function getGroups({ accessToken, userAgent, requestOptions }: {
|
|
|
5
50
|
dispatcher?: import("undici").Dispatcher;
|
|
6
51
|
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
7
52
|
}): Promise<YotoGroup[]>;
|
|
53
|
+
/**
|
|
54
|
+
* @see https://yoto.dev/api/createagroup/
|
|
55
|
+
* @typedef {Object} YotoCreateGroupRequest
|
|
56
|
+
* @property {string} name - Group name (max 100 characters, UTF-8 supported)
|
|
57
|
+
* @property {string} imageId - Image ID (preset like "fp-cards" or uploaded image hash)
|
|
58
|
+
* @property {YotoGroupItemInput[]} items - Array of content items (can be empty, order preserved)
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* @see https://yoto.dev/api/createagroup/
|
|
62
|
+
* @typedef {Object} YotoGroupItemInput
|
|
63
|
+
* @property {string} contentId - ID of the card content to add to group
|
|
64
|
+
*/
|
|
65
|
+
/**
|
|
66
|
+
* Creates a new group in the family library.
|
|
67
|
+
* Max 20 groups per family. ContentIds must be in family's library (invalid ones filtered out).
|
|
68
|
+
* @see https://yoto.dev/api/createagroup/
|
|
69
|
+
* @param {object} options
|
|
70
|
+
* @param {string} options.token The API token to request with
|
|
71
|
+
* @param {YotoCreateGroupRequest} options.group The group data to create
|
|
72
|
+
* @param {string} [options.userAgent] Optional user agent string
|
|
73
|
+
* @param {RequestOptions} [options.requestOptions] Additional undici request options
|
|
74
|
+
* @return {Promise<YotoGroup>} The created group with populated cards array
|
|
75
|
+
* @example
|
|
76
|
+
* import { createGroup } from 'yoto-nodejs-client'
|
|
77
|
+
*
|
|
78
|
+
* const group = await createGroup({
|
|
79
|
+
* token: accessToken,
|
|
80
|
+
* group: {
|
|
81
|
+
* name: 'My Favourites',
|
|
82
|
+
* imageId: 'fp-cards',
|
|
83
|
+
* items: [
|
|
84
|
+
* { contentId: '37KwQ' }
|
|
85
|
+
* ]
|
|
86
|
+
* }
|
|
87
|
+
* })
|
|
88
|
+
*/
|
|
8
89
|
export function createGroup({ token, userAgent, group, requestOptions }: {
|
|
9
90
|
token: string;
|
|
10
91
|
group: YotoCreateGroupRequest;
|
|
@@ -13,6 +94,17 @@ export function createGroup({ token, userAgent, group, requestOptions }: {
|
|
|
13
94
|
dispatcher?: import("undici").Dispatcher;
|
|
14
95
|
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
15
96
|
}): Promise<YotoGroup>;
|
|
97
|
+
/**
|
|
98
|
+
* Retrieves a specific group by ID.
|
|
99
|
+
* Returns 404 if group doesn't exist or belongs to another family.
|
|
100
|
+
* @see https://yoto.dev/api/getagroup/
|
|
101
|
+
* @param {object} options
|
|
102
|
+
* @param {string} options.accessToken The API token to request with
|
|
103
|
+
* @param {string} options.groupId The group ID to retrieve
|
|
104
|
+
* @param {string} [options.userAgent] Optional user agent string
|
|
105
|
+
* @param {RequestOptions} [options.requestOptions] Additional undici request options
|
|
106
|
+
* @return {Promise<YotoGroup>} The requested group with populated cards array
|
|
107
|
+
*/
|
|
16
108
|
export function getGroup({ accessToken, userAgent, groupId, requestOptions }: {
|
|
17
109
|
accessToken: string;
|
|
18
110
|
groupId: string;
|
|
@@ -21,6 +113,25 @@ export function getGroup({ accessToken, userAgent, groupId, requestOptions }: {
|
|
|
21
113
|
dispatcher?: import("undici").Dispatcher;
|
|
22
114
|
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
23
115
|
}): Promise<YotoGroup>;
|
|
116
|
+
/**
|
|
117
|
+
* @see https://yoto.dev/api/updateagroup/
|
|
118
|
+
* @typedef {Object} YotoUpdateGroupRequest
|
|
119
|
+
* @property {string} name - Group name (max 100 characters, UTF-8 supported)
|
|
120
|
+
* @property {string} imageId - Image ID (preset like "fp-cards" or uploaded image hash)
|
|
121
|
+
* @property {YotoGroupItemInput[]} items - Array of content items (replaces entire array)
|
|
122
|
+
*/
|
|
123
|
+
/**
|
|
124
|
+
* Updates an existing group.
|
|
125
|
+
* Can only update groups owned by family. Returns 404 if doesn't exist or owned by another family.
|
|
126
|
+
* @see https://yoto.dev/api/updateagroup/
|
|
127
|
+
* @param {object} options
|
|
128
|
+
* @param {string} options.accessToken The API token to request with
|
|
129
|
+
* @param {string} options.groupId The group ID to update
|
|
130
|
+
* @param {YotoUpdateGroupRequest} options.group The updated group data
|
|
131
|
+
* @param {string} [options.userAgent] Optional user agent string
|
|
132
|
+
* @param {RequestOptions} [options.requestOptions] Additional undici request options
|
|
133
|
+
* @return {Promise<YotoGroup>} The updated group with populated cards array
|
|
134
|
+
*/
|
|
24
135
|
export function updateGroup({ accessToken, userAgent, groupId, group, requestOptions }: {
|
|
25
136
|
accessToken: string;
|
|
26
137
|
groupId: string;
|
|
@@ -30,6 +141,22 @@ export function updateGroup({ accessToken, userAgent, groupId, group, requestOpt
|
|
|
30
141
|
dispatcher?: import("undici").Dispatcher;
|
|
31
142
|
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
32
143
|
}): Promise<YotoGroup>;
|
|
144
|
+
/**
|
|
145
|
+
* @see https://yoto.dev/api/deleteagroup/
|
|
146
|
+
* @typedef {Object} YotoDeleteGroupResponse
|
|
147
|
+
* @property {string} id - The ID of the deleted group
|
|
148
|
+
*/
|
|
149
|
+
/**
|
|
150
|
+
* Deletes a group permanently (hard delete, cannot be recovered).
|
|
151
|
+
* Content remains in family library. Returns 404 if doesn't exist or owned by another family.
|
|
152
|
+
* @see https://yoto.dev/api/deleteagroup/
|
|
153
|
+
* @param {object} options
|
|
154
|
+
* @param {string} options.accessToken The API token to request with
|
|
155
|
+
* @param {string} options.groupId The group ID to delete
|
|
156
|
+
* @param {string} [options.userAgent] Optional user agent string
|
|
157
|
+
* @param {RequestOptions} [options.requestOptions] Additional undici request options
|
|
158
|
+
* @return {Promise<YotoDeleteGroupResponse>} Confirmation with deleted group ID
|
|
159
|
+
*/
|
|
33
160
|
export function deleteGroup({ accessToken, userAgent, groupId, requestOptions }: {
|
|
34
161
|
accessToken: string;
|
|
35
162
|
groupId: string;
|
|
@@ -39,37 +166,97 @@ export function deleteGroup({ accessToken, userAgent, groupId, requestOptions }:
|
|
|
39
166
|
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
40
167
|
}): Promise<YotoDeleteGroupResponse>;
|
|
41
168
|
export type YotoGroupsResponse = {
|
|
169
|
+
/**
|
|
170
|
+
* - Array of family library groups
|
|
171
|
+
*/
|
|
42
172
|
groups: YotoGroup[];
|
|
43
173
|
};
|
|
44
174
|
export type YotoGroup = {
|
|
175
|
+
/**
|
|
176
|
+
* - Group identifier
|
|
177
|
+
*/
|
|
45
178
|
id: string;
|
|
179
|
+
/**
|
|
180
|
+
* - Group name (e.g., "My Favourites")
|
|
181
|
+
*/
|
|
46
182
|
name: string;
|
|
183
|
+
/**
|
|
184
|
+
* - Associated family ID
|
|
185
|
+
*/
|
|
47
186
|
familyId: string;
|
|
187
|
+
/**
|
|
188
|
+
* - ID for the group image (can be uploaded family image hash or preset like "fp-cards")
|
|
189
|
+
*/
|
|
48
190
|
imageId: string;
|
|
191
|
+
/**
|
|
192
|
+
* - CDN URL to the group image
|
|
193
|
+
*/
|
|
49
194
|
imageUrl: string;
|
|
195
|
+
/**
|
|
196
|
+
* - Array of content items in the group
|
|
197
|
+
*/
|
|
50
198
|
items: YotoGroupItem[];
|
|
199
|
+
/**
|
|
200
|
+
* - Array of card objects
|
|
201
|
+
*/
|
|
51
202
|
cards: any[];
|
|
203
|
+
/**
|
|
204
|
+
* - ISO 8601 timestamp when group was created
|
|
205
|
+
*/
|
|
52
206
|
createdAt: string;
|
|
207
|
+
/**
|
|
208
|
+
* - ISO 8601 timestamp when group was last updated
|
|
209
|
+
*/
|
|
53
210
|
lastModifiedAt: string;
|
|
54
211
|
};
|
|
55
212
|
export type YotoGroupItem = {
|
|
213
|
+
/**
|
|
214
|
+
* - ID of the card content
|
|
215
|
+
*/
|
|
56
216
|
contentId: string;
|
|
217
|
+
/**
|
|
218
|
+
* - ISO 8601 timestamp when item was added to group
|
|
219
|
+
*/
|
|
57
220
|
addedAt: string;
|
|
58
221
|
};
|
|
59
222
|
export type YotoCreateGroupRequest = {
|
|
223
|
+
/**
|
|
224
|
+
* - Group name (max 100 characters, UTF-8 supported)
|
|
225
|
+
*/
|
|
60
226
|
name: string;
|
|
227
|
+
/**
|
|
228
|
+
* - Image ID (preset like "fp-cards" or uploaded image hash)
|
|
229
|
+
*/
|
|
61
230
|
imageId: string;
|
|
231
|
+
/**
|
|
232
|
+
* - Array of content items (can be empty, order preserved)
|
|
233
|
+
*/
|
|
62
234
|
items: YotoGroupItemInput[];
|
|
63
235
|
};
|
|
64
236
|
export type YotoGroupItemInput = {
|
|
237
|
+
/**
|
|
238
|
+
* - ID of the card content to add to group
|
|
239
|
+
*/
|
|
65
240
|
contentId: string;
|
|
66
241
|
};
|
|
67
242
|
export type YotoUpdateGroupRequest = {
|
|
243
|
+
/**
|
|
244
|
+
* - Group name (max 100 characters, UTF-8 supported)
|
|
245
|
+
*/
|
|
68
246
|
name: string;
|
|
247
|
+
/**
|
|
248
|
+
* - Image ID (preset like "fp-cards" or uploaded image hash)
|
|
249
|
+
*/
|
|
69
250
|
imageId: string;
|
|
251
|
+
/**
|
|
252
|
+
* - Array of content items (replaces entire array)
|
|
253
|
+
*/
|
|
70
254
|
items: YotoGroupItemInput[];
|
|
71
255
|
};
|
|
72
256
|
export type YotoDeleteGroupResponse = {
|
|
257
|
+
/**
|
|
258
|
+
* - The ID of the deleted group
|
|
259
|
+
*/
|
|
73
260
|
id: string;
|
|
74
261
|
};
|
|
75
262
|
//# sourceMappingURL=family-library-groups.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"family-library-groups.d.ts","sourceRoot":"","sources":["family-library-groups.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"family-library-groups.d.ts","sourceRoot":"","sources":["family-library-groups.js"],"names":[],"mappings":"AAWA;;;;GAIG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,sEAhBG;IAAyB,WAAW,EAA3B,MAAM;IACW,SAAS;IACD,cAAc;;;CAChD,GAAS,OAAO,CAAC,SAAS,EAAE,CAAC,CA6B/B;AAED;;;;;;GAMG;AAEH;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,yEAnBG;IAAyB,KAAK,EAArB,MAAM;IAC0B,KAAK,EAArC,sBAAsB;IACL,SAAS;IACD,cAAc;;;CAChD,GAAS,OAAO,CAAC,SAAS,CAAC,CAoC7B;AAED;;;;;;;;;;GAUG;AACH,8EANG;IAAyB,WAAW,EAA3B,MAAM;IACU,OAAO,EAAvB,MAAM;IACW,SAAS;IACD,cAAc;;;CAChD,GAAS,OAAO,CAAC,SAAS,CAAC,CAmB7B;AAED;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,wFAPG;IAAyB,WAAW,EAA3B,MAAM;IACU,OAAO,EAAvB,MAAM;IAC0B,KAAK,EAArC,sBAAsB;IACL,SAAS;IACD,cAAc;;;CAChD,GAAS,OAAO,CAAC,SAAS,CAAC,CAwB7B;AAED;;;;GAIG;AAEH;;;;;;;;;;GAUG;AACH,iFANG;IAAyB,WAAW,EAA3B,MAAM;IACU,OAAO,EAAvB,MAAM;IACW,SAAS;IACD,cAAc;;;CAChD,GAAS,OAAO,CAAC,uBAAuB,CAAC,CAmB3C;;;;;YAxOa,SAAS,EAAE;;;;;;QAMX,MAAM;;;;UACN,MAAM;;;;cACN,MAAM;;;;aACN,MAAM;;;;cACN,MAAM;;;;WACN,aAAa,EAAE;;;;WACf,GAAG,EAAE;;;;eACL,MAAM;;;;oBACN,MAAM;;;;;;eAMN,MAAM;;;;aACN,MAAM;;;;;;UA6CN,MAAM;;;;aACN,MAAM;;;;WACN,kBAAkB,EAAE;;;;;;eAMpB,MAAM;;;;;;UAmFN,MAAM;;;;aACN,MAAM;;;;WACN,kBAAkB,EAAE;;;;;;QA0CpB,MAAM"}
|
|
@@ -2,7 +2,7 @@ import test from 'node:test'
|
|
|
2
2
|
import assert from 'node:assert'
|
|
3
3
|
import { getGroups, createGroup, getGroup, updateGroup, deleteGroup } from './family-library-groups.js'
|
|
4
4
|
import { YotoAPIError } from './helpers.js'
|
|
5
|
-
import { loadTestTokens, logResponse } from './test-helpers.js'
|
|
5
|
+
import { loadTestTokens, logResponse } from './endpoint-test-helpers.js'
|
|
6
6
|
|
|
7
7
|
const { accessToken } = loadTestTokens()
|
|
8
8
|
|