yoto-nodejs-client 0.0.2 → 0.0.4
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 +1 -1
- package/bin/lib/cli-helpers.d.ts.map +1 -1
- package/bin/lib/cli-helpers.js +5 -5
- package/bin/refresh-token.js +6 -6
- package/bin/token-info.js +3 -3
- package/index.d.ts +4 -585
- 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 +199 -8
- 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 +14 -8
- package/lib/api-endpoints/constants.d.ts.map +1 -1
- package/lib/api-endpoints/constants.js +17 -10
- package/lib/api-endpoints/content.test.js +1 -1
- package/lib/api-endpoints/devices.d.ts +405 -117
- 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/{test-helpers.d.ts → endpoint-test-helpers.d.ts} +1 -1
- package/lib/api-endpoints/endpoint-test-helpers.d.ts.map +1 -0
- package/lib/api-endpoints/family-library-groups.test.js +1 -1
- package/lib/api-endpoints/family.test.js +1 -1
- package/lib/api-endpoints/icons.test.js +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 +348 -22
- package/lib/mqtt/client.d.ts.map +1 -1
- package/lib/mqtt/client.js +213 -31
- package/lib/mqtt/factory.d.ts +22 -4
- 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 +41 -13
- package/lib/mqtt/topics.d.ts.map +1 -1
- package/lib/mqtt/topics.js +54 -20
- package/lib/pkg.d.cts +8 -0
- package/lib/token.d.ts +21 -6
- 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 +21 -15
- package/lib/api-endpoints/test-helpers.d.ts.map +0 -1
- /package/lib/api-endpoints/{test-helpers.js → endpoint-test-helpers.js} +0 -0
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} YotoClientConstructorOptions
|
|
3
|
+
* @property {string} clientId - OAuth client ID
|
|
4
|
+
* @property {string} refreshToken - OAuth refresh token
|
|
5
|
+
* @property {string} accessToken - Initial OAuth access token (JWT)
|
|
6
|
+
* @property {(refreshedTokenData: RefreshSuccessEvent) => void | Promise<void>} onTokenRefresh - **REQUIRED** Callback invoked when tokens are refreshed. You MUST persist these tokens (to file, database, etc.) as the refresh can happen at any time during API calls. The refresh token may be rotated by the auth server. **DO NOT STUB THIS CALLBACK** - always implement proper persistence logic.
|
|
7
|
+
* @property {number} [bufferSeconds=30] - Seconds before expiration to consider token expired
|
|
8
|
+
* @property {() => void | Promise<void>} [onRefreshStart] - Optional callback invoked when token refresh starts. Defaults to console.log.
|
|
9
|
+
* @property {(error: Error) => void | Promise<void>} [onRefreshError] - Optional callback invoked when token refresh fails with a transient error. Defaults to console.warn.
|
|
10
|
+
* @property {(error: Error) => void | Promise<void>} [onInvalid] - Optional callback invoked when refresh token is permanently invalid. Defaults to console.error.
|
|
11
|
+
* @property {string} [userAgent] - Optional user agent string to identify your application
|
|
12
|
+
* @property {RequestOptions} [defaultRequestOptions] - Default undici request options for all requests (dispatcher, timeouts, etc.)
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Yoto API Client with automatic token refresh
|
|
16
|
+
*/
|
|
17
|
+
export class YotoClient {
|
|
18
|
+
/**
|
|
19
|
+
* Get authorization URL for browser-based OAuth flow
|
|
20
|
+
* @see https://yoto.dev/api/get-authorize/
|
|
21
|
+
* @param {object} params
|
|
22
|
+
* @param {string} params.clientId - OAuth client ID
|
|
23
|
+
* @param {string} params.redirectUri - Redirect URI after authorization
|
|
24
|
+
* @param {'code' | 'token' | 'id_token' | 'code token' | 'code id_token' | 'token id_token' | 'code token id_token'} params.responseType - OAuth response type
|
|
25
|
+
* @param {string} params.state - State parameter for CSRF protection
|
|
26
|
+
* @param {string} [params.audience] - Audience for the token
|
|
27
|
+
* @param {string} [params.scope] - Requested scopes
|
|
28
|
+
* @param {string} [params.nonce] - Nonce for replay attack prevention
|
|
29
|
+
* @param {'none' | 'login' | 'consent' | 'select_account'} [params.prompt] - Authorization prompt behavior
|
|
30
|
+
* @param {number} [params.maxAge] - Maximum authentication age in seconds
|
|
31
|
+
* @param {string} [params.codeChallenge] - PKCE code challenge
|
|
32
|
+
* @param {'S256' | 'plain'} [params.codeChallengeMethod] - PKCE code challenge method
|
|
33
|
+
* @returns {string} Authorization URL
|
|
34
|
+
*/
|
|
35
|
+
static getAuthorizeUrl(params: {
|
|
36
|
+
clientId: string;
|
|
37
|
+
redirectUri: string;
|
|
38
|
+
responseType: "code" | "token" | "id_token" | "code token" | "code id_token" | "token id_token" | "code token id_token";
|
|
39
|
+
state: string;
|
|
40
|
+
audience?: string | undefined;
|
|
41
|
+
scope?: string | undefined;
|
|
42
|
+
nonce?: string | undefined;
|
|
43
|
+
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
|
44
|
+
maxAge?: number | undefined;
|
|
45
|
+
codeChallenge?: string | undefined;
|
|
46
|
+
codeChallengeMethod?: "S256" | "plain" | undefined;
|
|
47
|
+
}): string;
|
|
48
|
+
/**
|
|
49
|
+
* Exchange authorization code or refresh token for access tokens
|
|
50
|
+
* @see https://yoto.dev/api/post-oauth-token/
|
|
51
|
+
* @param {object} params
|
|
52
|
+
* @param {'authorization_code' | 'refresh_token' | 'client_credentials' | 'urn:ietf:params:oauth:grant-type:device_code'} params.grantType - OAuth grant type
|
|
53
|
+
* @param {string} [params.code] - Authorization code (required for authorization_code grant)
|
|
54
|
+
* @param {string} [params.redirectUri] - Redirect URI (required for authorization_code grant if used in authorize request)
|
|
55
|
+
* @param {string} [params.refreshToken] - Refresh token (required for refresh_token grant)
|
|
56
|
+
* @param {string} [params.clientId] - OAuth client ID
|
|
57
|
+
* @param {string} [params.clientSecret] - OAuth client secret
|
|
58
|
+
* @param {string} [params.scope] - Requested scope
|
|
59
|
+
* @param {string} [params.codeVerifier] - PKCE code verifier
|
|
60
|
+
* @param {string} [params.deviceCode] - Device code (required for device_code grant)
|
|
61
|
+
* @param {string} [params.audience] - Audience for the token
|
|
62
|
+
* @returns {Promise<YotoTokenResponse>}
|
|
63
|
+
*/
|
|
64
|
+
static exchangeToken(params: {
|
|
65
|
+
grantType: "authorization_code" | "refresh_token" | "client_credentials" | "urn:ietf:params:oauth:grant-type:device_code";
|
|
66
|
+
code?: string | undefined;
|
|
67
|
+
redirectUri?: string | undefined;
|
|
68
|
+
refreshToken?: string | undefined;
|
|
69
|
+
clientId?: string | undefined;
|
|
70
|
+
clientSecret?: string | undefined;
|
|
71
|
+
scope?: string | undefined;
|
|
72
|
+
codeVerifier?: string | undefined;
|
|
73
|
+
deviceCode?: string | undefined;
|
|
74
|
+
audience?: string | undefined;
|
|
75
|
+
}): Promise<Auth.YotoTokenResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Request device code for device authorization flow
|
|
78
|
+
* @see https://yoto.dev/api/post-oauth-device-code/
|
|
79
|
+
* @param {object} params
|
|
80
|
+
* @param {string} params.clientId - OAuth client ID
|
|
81
|
+
* @param {string} [params.scope] - Requested scopes
|
|
82
|
+
* @param {string} [params.audience] - Audience for the token
|
|
83
|
+
* @returns {Promise<YotoDeviceCodeResponse>}
|
|
84
|
+
*/
|
|
85
|
+
static requestDeviceCode(params: {
|
|
86
|
+
clientId: string;
|
|
87
|
+
scope?: string | undefined;
|
|
88
|
+
audience?: string | undefined;
|
|
89
|
+
}): Promise<Auth.YotoDeviceCodeResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* Poll for device authorization completion with automatic error handling (single poll attempt).
|
|
92
|
+
* This function handles common polling errors (authorization_pending, slow_down)
|
|
93
|
+
* and only throws for unrecoverable errors (expired_token, access_denied, etc).
|
|
94
|
+
*
|
|
95
|
+
* Non-blocking - returns immediately with poll result. Suitable for:
|
|
96
|
+
* - Manual polling loops in CLI applications
|
|
97
|
+
* - Server-side endpoints that poll on behalf of clients (e.g., Homebridge UI server)
|
|
98
|
+
* - Custom UI implementations with specific polling behavior
|
|
99
|
+
*
|
|
100
|
+
* For the simplest approach (automatic polling loop), use waitForDeviceAuthorization() instead.
|
|
101
|
+
*
|
|
102
|
+
* @see https://yoto.dev/api/post-oauth-token/
|
|
103
|
+
* @param {object} params
|
|
104
|
+
* @param {string} params.deviceCode - Device code from requestDeviceCode()
|
|
105
|
+
* @param {string} params.clientId - OAuth client ID
|
|
106
|
+
* @param {string} [params.audience] - Audience for the token
|
|
107
|
+
* @param {number} [params.currentInterval=5000] - Current polling interval in milliseconds
|
|
108
|
+
* @param {string} [params.userAgent] - Optional user agent string
|
|
109
|
+
* @param {RequestOptions} [params.requestOptions] - Additional undici request options
|
|
110
|
+
* @returns {Promise<YotoDevicePollResult>} Poll result with status and data
|
|
111
|
+
* @throws {YotoAPIError} For unrecoverable errors (expired_token, access_denied, invalid_grant, etc)
|
|
112
|
+
*/
|
|
113
|
+
static pollForDeviceToken(params: {
|
|
114
|
+
deviceCode: string;
|
|
115
|
+
clientId: string;
|
|
116
|
+
audience?: string | undefined;
|
|
117
|
+
currentInterval?: number | undefined;
|
|
118
|
+
userAgent?: string | undefined;
|
|
119
|
+
requestOptions?: ({
|
|
120
|
+
dispatcher?: import("undici").Dispatcher;
|
|
121
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
122
|
+
}): Promise<Auth.YotoDevicePollResult>;
|
|
123
|
+
/**
|
|
124
|
+
* Wait for device authorization to complete with automatic polling.
|
|
125
|
+
* This function wraps the entire polling loop - just call it and await the result.
|
|
126
|
+
* It handles all polling logic internally including interval adjustments.
|
|
127
|
+
*
|
|
128
|
+
* Designed for CLI usage where you want to block until authorization completes.
|
|
129
|
+
* For UI implementations with progress feedback, use pollForDeviceToken() directly.
|
|
130
|
+
*
|
|
131
|
+
* @see https://yoto.dev/api/post-oauth-token/
|
|
132
|
+
* @param {object} params
|
|
133
|
+
* @param {string} params.deviceCode - Device code from requestDeviceCode()
|
|
134
|
+
* @param {string} params.clientId - OAuth client ID
|
|
135
|
+
* @param {string} [params.audience] - Audience for the token
|
|
136
|
+
* @param {number} [params.initialInterval=5000] - Initial polling interval in milliseconds
|
|
137
|
+
* @param {number} [params.expiresIn] - Seconds until device code expires (for timeout calculation)
|
|
138
|
+
* @param {string} [params.userAgent] - Optional user agent string
|
|
139
|
+
* @param {RequestOptions} [params.requestOptions] - Additional undici request options
|
|
140
|
+
* @param {(result: YotoDevicePollResult) => void} [params.onPoll] - Optional callback invoked after each poll attempt
|
|
141
|
+
* @returns {Promise<YotoTokenResponse>} Token response on successful authorization
|
|
142
|
+
* @throws {YotoAPIError} For unrecoverable errors (expired_token, access_denied, invalid_grant, etc)
|
|
143
|
+
* @throws {Error} If device code expires (timeout)
|
|
144
|
+
*/
|
|
145
|
+
static waitForDeviceAuthorization(params: {
|
|
146
|
+
deviceCode: string;
|
|
147
|
+
clientId: string;
|
|
148
|
+
audience?: string | undefined;
|
|
149
|
+
initialInterval?: number | undefined;
|
|
150
|
+
expiresIn?: number | undefined;
|
|
151
|
+
userAgent?: string | undefined;
|
|
152
|
+
requestOptions?: ({
|
|
153
|
+
dispatcher?: import("undici").Dispatcher;
|
|
154
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
155
|
+
onPoll?: ((result: Auth.YotoDevicePollResult) => void) | undefined;
|
|
156
|
+
}): Promise<Auth.YotoTokenResponse>;
|
|
157
|
+
/**
|
|
158
|
+
* Create a new Yoto API client
|
|
159
|
+
* @param {YotoClientConstructorOptions} options
|
|
160
|
+
*/
|
|
161
|
+
constructor({ clientId, refreshToken, accessToken, onTokenRefresh, bufferSeconds, onRefreshStart, onRefreshError, onInvalid, userAgent, defaultRequestOptions }: YotoClientConstructorOptions);
|
|
162
|
+
/**
|
|
163
|
+
* Get the underlying RefreshableToken instance
|
|
164
|
+
* @returns {RefreshableToken}
|
|
165
|
+
*/
|
|
166
|
+
get token(): RefreshableToken;
|
|
167
|
+
/**
|
|
168
|
+
* Get content/card details
|
|
169
|
+
* @see https://yoto.dev/api/getcontent/
|
|
170
|
+
* @param {object} params
|
|
171
|
+
* @param {string} params.cardId - The card/content ID
|
|
172
|
+
* @param {string} [params.timezone] - Timezone for schedule-based content
|
|
173
|
+
* @param {'full' | 'pre'} [params.signingType] - Type of URL signing
|
|
174
|
+
* @param {boolean} [params.playable] - Whether to include playback URLs
|
|
175
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
176
|
+
* @returns {Promise<YotoContentResponse>}
|
|
177
|
+
*/
|
|
178
|
+
getContent({ cardId, timezone, signingType, playable, requestOptions }: {
|
|
179
|
+
cardId: string;
|
|
180
|
+
timezone?: string | undefined;
|
|
181
|
+
signingType?: "full" | "pre" | undefined;
|
|
182
|
+
playable?: boolean | undefined;
|
|
183
|
+
requestOptions?: ({
|
|
184
|
+
dispatcher?: import("undici").Dispatcher;
|
|
185
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
186
|
+
}): Promise<Content.YotoContentResponse>;
|
|
187
|
+
/**
|
|
188
|
+
* Get user's MYO (Make Your Own) content
|
|
189
|
+
* @see https://yoto.dev/api/getusersmyocontent/
|
|
190
|
+
* @param {object} [params]
|
|
191
|
+
* @param {boolean} [params.showDeleted=false] - Include deleted content
|
|
192
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
193
|
+
* @returns {Promise<YotoMyoContentResponse>}
|
|
194
|
+
*/
|
|
195
|
+
getUserMyoContent({ showDeleted, requestOptions }?: {
|
|
196
|
+
showDeleted?: boolean | undefined;
|
|
197
|
+
requestOptions?: ({
|
|
198
|
+
dispatcher?: import("undici").Dispatcher;
|
|
199
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
200
|
+
}): Promise<Content.YotoMyoContentResponse>;
|
|
201
|
+
/**
|
|
202
|
+
* Create or update content/card
|
|
203
|
+
* @see https://yoto.dev/api/createorupdatecontent/
|
|
204
|
+
* @param {object} params
|
|
205
|
+
* @param {YotoCreateOrUpdateContentRequest} params.content - Content data to create/update
|
|
206
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
207
|
+
* @returns {Promise<YotoCreateOrUpdateContentResponse>}
|
|
208
|
+
*/
|
|
209
|
+
createOrUpdateContent({ content, requestOptions }: {
|
|
210
|
+
content: Content.YotoCreateOrUpdateContentRequest;
|
|
211
|
+
requestOptions?: ({
|
|
212
|
+
dispatcher?: import("undici").Dispatcher;
|
|
213
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
214
|
+
}): Promise<Content.YotoCreateOrUpdateContentResponse>;
|
|
215
|
+
/**
|
|
216
|
+
* Delete content/card
|
|
217
|
+
* @see https://yoto.dev/api/deletecontent/
|
|
218
|
+
* @param {object} params
|
|
219
|
+
* @param {string} params.cardId - The card/content ID to delete
|
|
220
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
221
|
+
* @returns {Promise<YotoDeleteContentResponse>}
|
|
222
|
+
*/
|
|
223
|
+
deleteContent({ cardId, requestOptions }: {
|
|
224
|
+
cardId: string;
|
|
225
|
+
requestOptions?: ({
|
|
226
|
+
dispatcher?: import("undici").Dispatcher;
|
|
227
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
228
|
+
}): Promise<Content.YotoDeleteContentResponse>;
|
|
229
|
+
/**
|
|
230
|
+
* Get all devices for authenticated user
|
|
231
|
+
* @see https://yoto.dev/api/getdevices/
|
|
232
|
+
* @param {object} [params]
|
|
233
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
234
|
+
* @returns {Promise<YotoDevicesResponse>}
|
|
235
|
+
*/
|
|
236
|
+
getDevices({ requestOptions }?: {
|
|
237
|
+
requestOptions?: ({
|
|
238
|
+
dispatcher?: import("undici").Dispatcher;
|
|
239
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
240
|
+
}): Promise<Devices.YotoDevicesResponse>;
|
|
241
|
+
/**
|
|
242
|
+
* Get device status
|
|
243
|
+
* @see https://yoto.dev/api/getdevicestatus/
|
|
244
|
+
* @param {object} params
|
|
245
|
+
* @param {string} params.deviceId - Device ID
|
|
246
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
247
|
+
* @returns {Promise<YotoDeviceStatusResponse>}
|
|
248
|
+
*/
|
|
249
|
+
getDeviceStatus({ deviceId, requestOptions }: {
|
|
250
|
+
deviceId: string;
|
|
251
|
+
requestOptions?: ({
|
|
252
|
+
dispatcher?: import("undici").Dispatcher;
|
|
253
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
254
|
+
}): Promise<Devices.YotoDeviceStatusResponse>;
|
|
255
|
+
/**
|
|
256
|
+
* Get device configuration
|
|
257
|
+
* @see https://yoto.dev/api/getdeviceconfig/
|
|
258
|
+
* @param {object} params
|
|
259
|
+
* @param {string} params.deviceId - Device ID
|
|
260
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
261
|
+
* @returns {Promise<YotoDeviceConfigResponse>}
|
|
262
|
+
*/
|
|
263
|
+
getDeviceConfig({ deviceId, requestOptions }: {
|
|
264
|
+
deviceId: string;
|
|
265
|
+
requestOptions?: ({
|
|
266
|
+
dispatcher?: import("undici").Dispatcher;
|
|
267
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
268
|
+
}): Promise<Devices.YotoDeviceConfigResponse>;
|
|
269
|
+
/**
|
|
270
|
+
* Update device configuration
|
|
271
|
+
* @see https://yoto.dev/api/updatedeviceconfig/
|
|
272
|
+
* @param {object} params
|
|
273
|
+
* @param {string} params.deviceId - Device ID
|
|
274
|
+
* @param {YotoUpdateDeviceConfigRequest} params.configUpdate - Config updates
|
|
275
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
276
|
+
* @returns {Promise<YotoUpdateDeviceConfigResponse>}
|
|
277
|
+
*/
|
|
278
|
+
updateDeviceConfig({ deviceId, configUpdate, requestOptions }: {
|
|
279
|
+
deviceId: string;
|
|
280
|
+
configUpdate: Devices.YotoUpdateDeviceConfigRequest;
|
|
281
|
+
requestOptions?: ({
|
|
282
|
+
dispatcher?: import("undici").Dispatcher;
|
|
283
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
284
|
+
}): Promise<Devices.YotoUpdateDeviceConfigResponse>;
|
|
285
|
+
/**
|
|
286
|
+
* Update device shortcuts
|
|
287
|
+
* @see https://yoto.dev/api/updateshortcutsbeta/
|
|
288
|
+
* @param {object} params
|
|
289
|
+
* @param {string} params.deviceId - Device ID
|
|
290
|
+
* @param {YotoUpdateShortcutsRequest} params.shortcutsUpdate - Shortcuts config
|
|
291
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
292
|
+
* @returns {Promise<YotoUpdateShortcutsResponse>}
|
|
293
|
+
*/
|
|
294
|
+
updateDeviceShortcuts({ deviceId, shortcutsUpdate, requestOptions }: {
|
|
295
|
+
deviceId: string;
|
|
296
|
+
shortcutsUpdate: Devices.YotoUpdateShortcutsRequest;
|
|
297
|
+
requestOptions?: ({
|
|
298
|
+
dispatcher?: import("undici").Dispatcher;
|
|
299
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
300
|
+
}): Promise<Devices.YotoUpdateShortcutsResponse>;
|
|
301
|
+
/**
|
|
302
|
+
* Send command to device
|
|
303
|
+
* @see https://yoto.dev/api/senddevicecommand/
|
|
304
|
+
* @see https://yoto.dev/players-mqtt/mqtt-docs/
|
|
305
|
+
* @param {object} params
|
|
306
|
+
* @param {string} params.deviceId - Device ID
|
|
307
|
+
* @param {YotoDeviceCommand} params.command - Command to send
|
|
308
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
309
|
+
* @returns {Promise<YotoDeviceCommandResponse>}
|
|
310
|
+
*/
|
|
311
|
+
sendDeviceCommand({ deviceId, command, requestOptions }: {
|
|
312
|
+
deviceId: string;
|
|
313
|
+
command: Devices.YotoDeviceCommand;
|
|
314
|
+
requestOptions?: ({
|
|
315
|
+
dispatcher?: import("undici").Dispatcher;
|
|
316
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
317
|
+
}): Promise<Devices.YotoDeviceCommandResponse>;
|
|
318
|
+
/**
|
|
319
|
+
* Get all family library groups
|
|
320
|
+
* @see https://yoto.dev/api/getgroups/
|
|
321
|
+
* @param {object} [params]
|
|
322
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
323
|
+
* @returns {Promise<YotoGroup[]>}
|
|
324
|
+
*/
|
|
325
|
+
getGroups({ requestOptions }?: {
|
|
326
|
+
requestOptions?: ({
|
|
327
|
+
dispatcher?: import("undici").Dispatcher;
|
|
328
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
329
|
+
}): Promise<FamilyLibraryGroups.YotoGroup[]>;
|
|
330
|
+
/**
|
|
331
|
+
* Create a family library group
|
|
332
|
+
* @see https://yoto.dev/api/createagroup/
|
|
333
|
+
* @param {object} params
|
|
334
|
+
* @param {YotoCreateGroupRequest} params.group - Group data
|
|
335
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
336
|
+
* @returns {Promise<YotoGroup>}
|
|
337
|
+
*/
|
|
338
|
+
createGroup({ group, requestOptions }: {
|
|
339
|
+
group: FamilyLibraryGroups.YotoCreateGroupRequest;
|
|
340
|
+
requestOptions?: ({
|
|
341
|
+
dispatcher?: import("undici").Dispatcher;
|
|
342
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
343
|
+
}): Promise<FamilyLibraryGroups.YotoGroup>;
|
|
344
|
+
/**
|
|
345
|
+
* Get a specific family library group
|
|
346
|
+
* @see https://yoto.dev/api/getgroup/
|
|
347
|
+
* @param {object} params
|
|
348
|
+
* @param {string} params.groupId - Group ID
|
|
349
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
350
|
+
* @returns {Promise<YotoGroup>}
|
|
351
|
+
*/
|
|
352
|
+
getGroup({ groupId, requestOptions }: {
|
|
353
|
+
groupId: string;
|
|
354
|
+
requestOptions?: ({
|
|
355
|
+
dispatcher?: import("undici").Dispatcher;
|
|
356
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
357
|
+
}): Promise<FamilyLibraryGroups.YotoGroup>;
|
|
358
|
+
/**
|
|
359
|
+
* Update a family library group
|
|
360
|
+
* @see https://yoto.dev/api/updateagroup/
|
|
361
|
+
* @param {object} params
|
|
362
|
+
* @param {string} params.groupId - Group ID
|
|
363
|
+
* @param {YotoUpdateGroupRequest} params.group - Updated group data
|
|
364
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
365
|
+
* @returns {Promise<YotoGroup>}
|
|
366
|
+
*/
|
|
367
|
+
updateGroup({ groupId, group, requestOptions }: {
|
|
368
|
+
groupId: string;
|
|
369
|
+
group: FamilyLibraryGroups.YotoUpdateGroupRequest;
|
|
370
|
+
requestOptions?: ({
|
|
371
|
+
dispatcher?: import("undici").Dispatcher;
|
|
372
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
373
|
+
}): Promise<FamilyLibraryGroups.YotoGroup>;
|
|
374
|
+
/**
|
|
375
|
+
* Delete a family library group
|
|
376
|
+
* @see https://yoto.dev/api/deleteagroup/
|
|
377
|
+
* @param {object} params
|
|
378
|
+
* @param {string} params.groupId - Group ID
|
|
379
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
380
|
+
* @returns {Promise<YotoDeleteGroupResponse>}
|
|
381
|
+
*/
|
|
382
|
+
deleteGroup({ groupId, requestOptions }: {
|
|
383
|
+
groupId: string;
|
|
384
|
+
requestOptions?: ({
|
|
385
|
+
dispatcher?: import("undici").Dispatcher;
|
|
386
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
387
|
+
}): Promise<FamilyLibraryGroups.YotoDeleteGroupResponse>;
|
|
388
|
+
/**
|
|
389
|
+
* Get all family images
|
|
390
|
+
* @see https://yoto.dev/api/getfamilyimages/
|
|
391
|
+
* @param {object} [params]
|
|
392
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
393
|
+
* @returns {Promise<YotoFamilyImagesResponse>}
|
|
394
|
+
*/
|
|
395
|
+
getFamilyImages({ requestOptions }?: {
|
|
396
|
+
requestOptions?: ({
|
|
397
|
+
dispatcher?: import("undici").Dispatcher;
|
|
398
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
399
|
+
}): Promise<Family.YotoFamilyImagesResponse>;
|
|
400
|
+
/**
|
|
401
|
+
* Get a specific family image
|
|
402
|
+
* @see https://yoto.dev/api/getafamilyimage/
|
|
403
|
+
* @param {object} params
|
|
404
|
+
* @param {string} params.imageId - Image ID
|
|
405
|
+
* @param {'640x480' | '320x320'} params.size - Image size
|
|
406
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
407
|
+
* @returns {Promise<YotoFamilyImageResponse>}
|
|
408
|
+
*/
|
|
409
|
+
getAFamilyImage({ imageId, size, requestOptions }: {
|
|
410
|
+
imageId: string;
|
|
411
|
+
size: "640x480" | "320x320";
|
|
412
|
+
requestOptions?: ({
|
|
413
|
+
dispatcher?: import("undici").Dispatcher;
|
|
414
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
415
|
+
}): Promise<Family.YotoFamilyImageResponse>;
|
|
416
|
+
/**
|
|
417
|
+
* Upload a family image
|
|
418
|
+
* @see https://yoto.dev/api/uploadafamilyimage/
|
|
419
|
+
* @param {object} params
|
|
420
|
+
* @param {Buffer} params.imageData - Image binary data
|
|
421
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
422
|
+
* @returns {Promise<YotoUploadFamilyImageResponse>}
|
|
423
|
+
*/
|
|
424
|
+
uploadAFamilyImage({ imageData, requestOptions }: {
|
|
425
|
+
imageData: Buffer;
|
|
426
|
+
requestOptions?: ({
|
|
427
|
+
dispatcher?: import("undici").Dispatcher;
|
|
428
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
429
|
+
}): Promise<Family.YotoUploadFamilyImageResponse>;
|
|
430
|
+
/**
|
|
431
|
+
* Get public Yoto icons
|
|
432
|
+
* @see https://yoto.dev/api/getpublicicons/
|
|
433
|
+
* @param {object} [params]
|
|
434
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
435
|
+
* @returns {Promise<YotoPublicIconsResponse>}
|
|
436
|
+
*/
|
|
437
|
+
getPublicIcons({ requestOptions }?: {
|
|
438
|
+
requestOptions?: ({
|
|
439
|
+
dispatcher?: import("undici").Dispatcher;
|
|
440
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
441
|
+
}): Promise<Icons.YotoPublicIconsResponse>;
|
|
442
|
+
/**
|
|
443
|
+
* Get user's custom icons
|
|
444
|
+
* @see https://yoto.dev/api/getusericons/
|
|
445
|
+
* @param {object} [params]
|
|
446
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
447
|
+
* @returns {Promise<YotoUserIconsResponse>}
|
|
448
|
+
*/
|
|
449
|
+
getUserIcons({ requestOptions }?: {
|
|
450
|
+
requestOptions?: ({
|
|
451
|
+
dispatcher?: import("undici").Dispatcher;
|
|
452
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
453
|
+
}): Promise<Icons.YotoUserIconsResponse>;
|
|
454
|
+
/**
|
|
455
|
+
* Upload a custom icon
|
|
456
|
+
* @see https://yoto.dev/api/uploadicon/
|
|
457
|
+
* @param {object} params
|
|
458
|
+
* @param {Buffer} params.imageData - Image binary data
|
|
459
|
+
* @param {boolean} [params.autoConvert=true] - Auto-convert to proper format
|
|
460
|
+
* @param {string} [params.filename] - Optional filename
|
|
461
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
462
|
+
* @returns {Promise<YotoUploadIconResponse>}
|
|
463
|
+
*/
|
|
464
|
+
uploadIcon({ imageData, autoConvert, filename, requestOptions }: {
|
|
465
|
+
imageData: Buffer;
|
|
466
|
+
autoConvert?: boolean | undefined;
|
|
467
|
+
filename?: string | undefined;
|
|
468
|
+
requestOptions?: ({
|
|
469
|
+
dispatcher?: import("undici").Dispatcher;
|
|
470
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
471
|
+
}): Promise<Icons.YotoUploadIconResponse>;
|
|
472
|
+
/**
|
|
473
|
+
* Get audio upload URL
|
|
474
|
+
* @see https://yoto.dev/api/getaudiouploadurl/
|
|
475
|
+
* @param {object} params
|
|
476
|
+
* @param {string} params.sha256 - SHA256 hash of audio file
|
|
477
|
+
* @param {string} [params.filename] - Optional filename
|
|
478
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
479
|
+
* @returns {Promise<YotoAudioUploadUrlResponse>}
|
|
480
|
+
*/
|
|
481
|
+
getAudioUploadUrl({ sha256, filename, requestOptions }: {
|
|
482
|
+
sha256: string;
|
|
483
|
+
filename?: string | undefined;
|
|
484
|
+
requestOptions?: ({
|
|
485
|
+
dispatcher?: import("undici").Dispatcher;
|
|
486
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
487
|
+
}): Promise<Media.YotoAudioUploadUrlResponse>;
|
|
488
|
+
/**
|
|
489
|
+
* Upload a cover image
|
|
490
|
+
* @see https://yoto.dev/api/uploadcoverimage/
|
|
491
|
+
* @param {object} params
|
|
492
|
+
* @param {Buffer} [params.imageData] - Image binary data
|
|
493
|
+
* @param {string} [params.imageUrl] - URL to image
|
|
494
|
+
* @param {boolean} [params.autoConvert] - Auto-convert to proper format
|
|
495
|
+
* @param {YotoCoverType} [params.coverType] - Cover image type
|
|
496
|
+
* @param {string} [params.filename] - Optional filename
|
|
497
|
+
* @param {RequestOptions} [params.requestOptions] - Request options that override defaults
|
|
498
|
+
* @returns {Promise<YotoUploadCoverImageResponse>}
|
|
499
|
+
*/
|
|
500
|
+
uploadCoverImage({ imageData, imageUrl, autoConvert, coverType, filename, requestOptions }: {
|
|
501
|
+
imageData?: Buffer<ArrayBufferLike> | undefined;
|
|
502
|
+
imageUrl?: string | undefined;
|
|
503
|
+
autoConvert?: boolean | undefined;
|
|
504
|
+
coverType?: Media.YotoCoverType | undefined;
|
|
505
|
+
filename?: string | undefined;
|
|
506
|
+
requestOptions?: ({
|
|
507
|
+
dispatcher?: import("undici").Dispatcher;
|
|
508
|
+
} & Omit<import("undici").Dispatcher.RequestOptions<unknown>, "origin" | "path" | "method"> & Partial<Pick<import("undici").Dispatcher.RequestOptions<null>, "method">>) | undefined;
|
|
509
|
+
}): Promise<Media.YotoUploadCoverImageResponse>;
|
|
510
|
+
/**
|
|
511
|
+
* Create an MQTT client for a device
|
|
512
|
+
* @param {Object} params
|
|
513
|
+
* @param {string} params.deviceId - Device ID to connect to
|
|
514
|
+
* @param {MqttClientOptions} [params.mqttOptions] - MQTT.js client options (excluding deviceId and accessToken which are provided automatically)
|
|
515
|
+
* @returns {Promise<YotoMqttClient>}
|
|
516
|
+
*/
|
|
517
|
+
createMqttClient({ deviceId, mqttOptions }: {
|
|
518
|
+
deviceId: string;
|
|
519
|
+
mqttOptions?: Partial<import("mqtt").IClientOptions> | undefined;
|
|
520
|
+
}): Promise<YotoMqttClient>;
|
|
521
|
+
#private;
|
|
522
|
+
}
|
|
523
|
+
export type YotoClientConstructorOptions = {
|
|
524
|
+
/**
|
|
525
|
+
* - OAuth client ID
|
|
526
|
+
*/
|
|
527
|
+
clientId: string;
|
|
528
|
+
/**
|
|
529
|
+
* - OAuth refresh token
|
|
530
|
+
*/
|
|
531
|
+
refreshToken: string;
|
|
532
|
+
/**
|
|
533
|
+
* - Initial OAuth access token (JWT)
|
|
534
|
+
*/
|
|
535
|
+
accessToken: string;
|
|
536
|
+
/**
|
|
537
|
+
* - **REQUIRED** Callback invoked when tokens are refreshed. You MUST persist these tokens (to file, database, etc.) as the refresh can happen at any time during API calls. The refresh token may be rotated by the auth server. **DO NOT STUB THIS CALLBACK** - always implement proper persistence logic.
|
|
538
|
+
*/
|
|
539
|
+
onTokenRefresh: (refreshedTokenData: RefreshSuccessEvent) => void | Promise<void>;
|
|
540
|
+
/**
|
|
541
|
+
* - Seconds before expiration to consider token expired
|
|
542
|
+
*/
|
|
543
|
+
bufferSeconds?: number;
|
|
544
|
+
/**
|
|
545
|
+
* - Optional callback invoked when token refresh starts. Defaults to console.log.
|
|
546
|
+
*/
|
|
547
|
+
onRefreshStart?: () => void | Promise<void>;
|
|
548
|
+
/**
|
|
549
|
+
* - Optional callback invoked when token refresh fails with a transient error. Defaults to console.warn.
|
|
550
|
+
*/
|
|
551
|
+
onRefreshError?: (error: Error) => void | Promise<void>;
|
|
552
|
+
/**
|
|
553
|
+
* - Optional callback invoked when refresh token is permanently invalid. Defaults to console.error.
|
|
554
|
+
*/
|
|
555
|
+
onInvalid?: (error: Error) => void | Promise<void>;
|
|
556
|
+
/**
|
|
557
|
+
* - Optional user agent string to identify your application
|
|
558
|
+
*/
|
|
559
|
+
userAgent?: string;
|
|
560
|
+
/**
|
|
561
|
+
* - Default undici request options for all requests (dispatcher, timeouts, etc.)
|
|
562
|
+
*/
|
|
563
|
+
defaultRequestOptions?: RequestOptions;
|
|
564
|
+
};
|
|
565
|
+
import { RefreshableToken } from './token.js';
|
|
566
|
+
import * as Content from './api-endpoints/content.js';
|
|
567
|
+
import * as Devices from './api-endpoints/devices.js';
|
|
568
|
+
import * as FamilyLibraryGroups from './api-endpoints/family-library-groups.js';
|
|
569
|
+
import * as Family from './api-endpoints/family.js';
|
|
570
|
+
import * as Icons from './api-endpoints/icons.js';
|
|
571
|
+
import * as Media from './api-endpoints/media.js';
|
|
572
|
+
import type { YotoMqttClient } from './mqtt/client.js';
|
|
573
|
+
import * as Auth from './api-endpoints/auth.js';
|
|
574
|
+
import type { RefreshSuccessEvent } from './token.js';
|
|
575
|
+
import type { RequestOptions } from './api-endpoints/helpers.js';
|
|
576
|
+
//# sourceMappingURL=api-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["api-client.js"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;GAYG;AAEH;;GAEG;AACH;IAKE;;;;;;;;;;;;;;;;OAgBG;IACH,+BAbG;QAAuB,QAAQ,EAAvB,MAAM;QACS,WAAW,EAA1B,MAAM;QAC4G,YAAY,EAA9H,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,YAAY,GAAG,eAAe,GAAG,gBAAgB,GAAG,qBAAqB;QAC1F,KAAK,EAApB,MAAM;QACU,QAAQ;QACR,KAAK;QACL,KAAK;QACoC,MAAM;QAC/C,MAAM;QACN,aAAa;QACH,mBAAmB;KACrD,GAAU,MAAM,CAIlB;IAED;;;;;;;;;;;;;;;OAeG;IACH,6BAZG;QAA+H,SAAS,EAAhI,oBAAoB,GAAG,eAAe,GAAG,oBAAoB,GAAG,8CAA8C;QAC9F,IAAI;QACJ,WAAW;QACX,YAAY;QACZ,QAAQ;QACR,YAAY;QACZ,KAAK;QACL,YAAY;QACZ,UAAU;QACV,QAAQ;KAChC,GAAU,OAAO,CAAC,sBAAiB,CAAC,CAItC;IAED;;;;;;;;OAQG;IACH,iCALG;QAAuB,QAAQ,EAAvB,MAAM;QACU,KAAK;QACL,QAAQ;KAChC,GAAU,OAAO,CAAC,2BAAsB,CAAC,CAI3C;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,kCATG;QAAuB,UAAU,EAAzB,MAAM;QACS,QAAQ,EAAvB,MAAM;QACU,QAAQ;QACR,eAAe;QACf,SAAS;QACD,cAAc;;;KAC9C,GAAU,OAAO,CAAC,yBAAoB,CAAC,CAKzC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,0CAZG;QAAuB,UAAU,EAAz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