Skip to content

Commit 9b77867

Browse files
🤖 Merge PR DefinitelyTyped#73696 [tizen-tv-webapis] Add missing getUuid method for AppCommonManager by @john-s-morgan
1 parent 430067e commit 9b77867

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

‎types/tizen-tv-webapis/index.d.ts‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,45 @@ export interface AppCommonManager {
219219
onsuccess?: SuccessCallback,
220220
onerror?: ErrorCallback,
221221
) => void;
222+
223+
/**
224+
* Provides a Universally Unique Identifier (UUID) for the device.
225+
* The value is unique per application, meaning the same device
226+
* will yield different UUIDs across different apps.
227+
*
228+
* This identifier is not intended for advertising use. Any handling
229+
* of the UUID must comply with privacy and data protection regulations,
230+
* including obtaining user consent when required.
231+
*
232+
* If your app also makes use of the Tizen Identifier for Advertising (TIFA),
233+
* you must transmit the UUID separately from TIFA data. Both identifiers
234+
* should remain logically independent throughout collection, transmission,
235+
* storage, processing, and deletion on your servers.
236+
*
237+
* @returns {string} A UUID specific to this application on the device.
238+
*
239+
* @throws {WebAPIException} SecurityError if the caller lacks the required privilege.
240+
* @throws {Error} An undefined error if the method is not supported by the firmware.
241+
*
242+
* @since 2.4
243+
* @version 1.0
244+
* @see https://developer.samsung.com/smarttv/develop/api-references/samsung-product-api-references/appcommon-api.html (for related platform info, optional)
245+
* @example
246+
* ```ts
247+
* try {
248+
* const id = tizen.systeminfo.getUuid();
249+
* console.log(id); // "550e8400-e29b-41d4-a716-446655440000"
250+
* } catch (e) {
251+
* if (e.message.indexOf('undefined')) {
252+
* console.error('getUuid() is not supported in this firmware version or device model. Consider a legacy method',e);
253+
* }
254+
* else {
255+
* console.log('SecurityError: Application does not have the privilege to call this method.',e);
256+
* }
257+
* }
258+
* ```
259+
*/
260+
getUuid: () => string;
222261
}
223262
/**
224263
* This interface defines the digital mode

‎types/tizen-tv-webapis/test/tizen-tv-webapis-tests.cjs.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414

1515
adinfo.getVersion(); // $ExpectType string
1616
appcommon.getVersion(); // $ExpectType string
17+
appcommon.getUuid(); // $ExpectType string
1718
avplay.getVersion(); // $ExpectType string
1819
avinfo.getVersion(); // $ExpectType string
1920
billing.getVersion(); // $ExpectType string

0 commit comments

Comments
 (0)