@@ -99,6 +99,33 @@ declare namespace Adjust {
9999 state : string
100100 }
101101
102+ /**
103+ * @deprecated
104+ */
105+ type UrlStartegyLiterals = 'china' | 'india' ;
106+
107+ interface UrlStrategyConfig {
108+ /** The country or countries of data residence, or the endpoints to which you want to send SDK traffic. */
109+ domains : Array < string > ;
110+
111+ /** Whether the source should prefix a subdomain. */
112+ useSubdomains : boolean ;
113+
114+ /** Whether the domain should be used for data residency. */
115+ isDataResidency ?: boolean ;
116+ }
117+
118+ interface ThirdPartySharingOptions {
119+ isEnabled : boolean ;
120+ granularOptions : Record < string , Record < string , string > > ;
121+ partnerSharingSettings : Record < string , Record < string , boolean > > ;
122+ }
123+
124+ class ThirdPartySharing implements ThirdPartySharingOptions {
125+ public addGranularOption ( partnerName : string , key : string , value : string )
126+ public addPartnerSharingSetting ( partnerName : string , key : string , value : boolean )
127+ }
128+
102129 interface InitOptions {
103130
104131 /** Required to initialise SDK instance, please make sure to provide valid app token. */
@@ -122,19 +149,26 @@ declare namespace Adjust {
122149 eventDeduplicationListLimit ?: number ;
123150
124151 /** Optional. By default all requests go to Adjust's endpoints. You are able to redirect all requests to your custom
125- * endpoint. */
152+ * endpoint.
153+ *
154+ * @deprecated use {@link urlStrategy} property instead
155+ */
126156 customUrl ?: string ;
127157
128158 /** Optional. The data residency feature allows you to choose the country in which Adjust will store your data. This
129159 * is useful if you are operating in a country with strict privacy requirements. When you set up data residency,
130- * Adjust will store your data in a data center located in the region your have chosen. */
160+ * Adjust will store your data in a data center located in the region your have chosen.
161+ *
162+ * @deprecated use {@link urlStrategy} property instead
163+ */
131164 dataResidency ?: 'EU' | 'TR' | 'US' ;
132165
133- /** Optional. The Adjust SDK can use the url strategy setting to prioritise regional endpoints. */
134- urlStrategy ?: 'india' | 'china' ;
166+ /** Optional. The URL strategy feature allows you to set either:
167+ * - The country in which Adjust stores your data (data residency).
168+ * - The endpoint to which the Adjust SDK sends traffic (URL strategy).*/
169+ urlStrategy ?: UrlStartegyLiterals | UrlStrategyConfig ;
135170
136- /**
137- * Optional. A custom namespace for SDK data storage. If not set then default one is used.
171+ /** Optional. A custom namespace for SDK data storage. If not set then default one is used.
138172 * It's useful when there are multiple applications on the same domain to allow SDK distinguish storages and don't
139173 * mix the data up.
140174 *
@@ -169,8 +203,7 @@ declare namespace Adjust {
169203 */
170204 logLevel ?: LogLevel ;
171205
172- /**
173- * Optional. Query selector to define html container if you want to see your logs directly on the screen. This could
206+ /** Optional. Query selector to define html container if you want to see your logs directly on the screen. This could
174207 * be useful when testing on mobile devices.
175208 *
176209 * @example
@@ -206,19 +239,33 @@ declare namespace Adjust {
206239 *
207240 * @example
208241 * const attribution = Adjust.getAttribution();
242+ *
243+ * @deprecated Use {@link waitForAttribution} instead
209244 */
210245 function getAttribution ( ) : Attribution | undefined
211246
247+ /**
248+ * Returns a promise which resolves when current attribution information becomes available
249+ */
250+ function waitForAttribution ( ) : Promise < Attribution >
251+
212252 /**
213253 * Get web_uuid - a unique ID of user generated per subdomain and per browser
214254 *
215255 * @returns `web_uuid` if available or `undefined` otherwise
216256 *
217257 * @example
218258 * const webUuid = Adjust.getWebUUID();
259+ *
260+ * @deprecated Use {@link waitForWebUUID} instead
219261 */
220262 function getWebUUID ( ) : string | undefined
221263
264+ /**
265+ * Returns a promise which resolves when `web_uuid` becomes available
266+ */
267+ function waitForWebUUID ( ) : Promise < string >
268+
222269 /**
223270 * Set referrer manually. Please note that `referrer` should be URL-encoded.
224271 *
@@ -369,59 +416,15 @@ declare namespace Adjust {
369416 *
370417 * Marketing Opt-out, which is disabling third-party sharing ability. This method will notify our backed in the same
371418 * manner as it does for GDPR Forget me.
419+ *
420+ * @deprecated Use {@link trackThirdPartySharing} instead
372421 */
373422 function disableThirdPartySharing ( ) : void
374423
375- interface SmartBannerOptions {
376-
377- /** Web token to initialise Smart Banner */
378- webToken : string ;
379-
380- /** Optional. Logging level used by SDK instance. By default this param is set to `error`. We highly recommend that
381- * you use `verbose` when testing in order to see precise logs and to make sure integration is done properly.
382- * Here are more details about each log level:
383- * - `verbose` - will print detailed messages in case of certain actions
384- * - `info` - will print only basic info messages, warnings and errors
385- * - `warning` - will print only warning and error messages
386- * - `error` - will print only error message
387- * - `none` - won't print anything
388- */
389- logLevel ?: LogLevel ;
390-
391- /** Optional. The data residency feature allows you to choose the country in which Adjust will store your data. This
392- * is useful if you are operating in a country with strict privacy requirements. When you set up data residency,
393- * Adjust will store your data in a data center located in the region your have chosen. */
394- dataResidency ?: 'EU' | 'TR' | 'US' ;
395-
396- /** Optional. Callback which is called when SmartBanner view is created and shown. */
397- onCreated ?: ( ) => any ;
398-
399- /** Optional. Callback which is called when SmartBanner is being dismissed with a closing button on it. */
400- onDismissed ?: ( ) => any ;
401- }
402-
403424 /**
404- * Initiate Smart Banner.
405- *
406- * This method gets Smart Banner data and creates Smart Banner UI.
407- *
408- * @param {SmartBannerOptions } options Options to initiate Smart Banner.
409- *
410- * @example
411- * Adjust.initSmartBanner({
412- * webToken: 'YOUR_WEB_TOKEN',
413- * logLevel: 'verbose'
414- * });
415- *
416- * @example
417- * Adjust.initSmartBanner({
418- * webToken: 'YOUR_WEB_TOKEN',
419- * logLevel: 'error',
420- * dataResidency: 'EU',
421- * });
425+ * Track third party sharing
422426 */
423- function initSmartBanner ( options : SmartBannerOptions ) : void
424-
427+ function trackThirdPartySharing ( adjustThirdPartySharing : ThirdPartySharingOptions ) : void
425428}
426429
427430export default Adjust
0 commit comments