@schibsted/account-sdk-browser 4.8.3 → 4.8.5
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/es5/global.js +1 -1
- package/es5/global.js.map +1 -1
- package/es5/global.min.js +1 -1
- package/es5/global.min.js.map +1 -1
- package/es5/identity.js +1 -1
- package/es5/identity.js.map +1 -1
- package/es5/identity.min.js +1 -1
- package/es5/identity.min.js.map +1 -1
- package/es5/index.js +1 -1
- package/es5/index.js.map +1 -1
- package/es5/index.min.js +1 -1
- package/es5/index.min.js.map +1 -1
- package/es5/monetization.js +1 -1
- package/es5/monetization.js.map +1 -1
- package/es5/monetization.min.js +1 -1
- package/es5/monetization.min.js.map +1 -1
- package/package.json +1 -1
- package/src/identity.d.ts +32 -2
- package/src/monetization.d.ts +1 -1
- package/src/payment.d.ts +1 -1
- package/src/version.js +1 -1
package/package.json
CHANGED
package/src/identity.d.ts
CHANGED
|
@@ -220,6 +220,36 @@ export class Identity extends TinyEmitter {
|
|
|
220
220
|
* @return {Promise<SimplifiedLoginData|null>}
|
|
221
221
|
*/
|
|
222
222
|
getUserContextData(): Promise<SimplifiedLoginData | null>;
|
|
223
|
+
/**
|
|
224
|
+
* @async
|
|
225
|
+
* @function
|
|
226
|
+
* @summary
|
|
227
|
+
* Retrieves the external identifier (`externalId`) for the authenticated user.
|
|
228
|
+
*
|
|
229
|
+
* In Schibsted Account there are multiple ways of identifying users, however for integrations with
|
|
230
|
+
* third-parties it's recommended to use `externalId` as it does not disclose
|
|
231
|
+
* any critical data whilst allowing for user identification.
|
|
232
|
+
*
|
|
233
|
+
* `externalId` is merchant-scoped using a pairwise identifier (`pairId`),
|
|
234
|
+
* meaning the same user's ID will differ between merchants.
|
|
235
|
+
* Additionally, this identifier is bound to the external party provided as argument.
|
|
236
|
+
*
|
|
237
|
+
* @description This function calls {@link Identity#hasSession} internally and thus has the side
|
|
238
|
+
* effect that it might perform an auto-login on the user
|
|
239
|
+
* @throws {SDKError} If the `pairId` is missing in user session.
|
|
240
|
+
* @throws {SDKError} If the `externalParty` is not defined
|
|
241
|
+
* @return {Promise<string>} The merchant- and 3rd-party-specific `externalId`
|
|
242
|
+
*/
|
|
243
|
+
getExternalId(externalParty: string, optionalSuffix?: string): Promise<string>;
|
|
244
|
+
/**
|
|
245
|
+
* @async
|
|
246
|
+
* @summary Enables brands to programmatically get the current the SDRN based on the user's session.
|
|
247
|
+
* @description This function calls {@link Identity#hasSession} internally and thus has the side
|
|
248
|
+
* effect that it might perform an auto-login on the user
|
|
249
|
+
* @throws {SDKError} If the SDRN is missing in user session object.
|
|
250
|
+
* @returns {Promise<string>}
|
|
251
|
+
*/
|
|
252
|
+
getUserSDRN(): Promise<string>;
|
|
223
253
|
/**
|
|
224
254
|
* If a popup is desired, this function needs to be called in response to a user event (like
|
|
225
255
|
* click or tap) in order to work correctly. Otherwise the popup will be blocked by the
|
|
@@ -580,5 +610,5 @@ export type SimplifiedLoginWidgetOptions = {
|
|
|
580
610
|
*/
|
|
581
611
|
locale?: "nb"|"sv"|"fi"|"da"|"en";
|
|
582
612
|
};
|
|
583
|
-
import RESTClient from "./RESTClient";
|
|
584
|
-
import SDKError from "./SDKError";
|
|
613
|
+
import RESTClient from "./RESTClient.js";
|
|
614
|
+
import SDKError from "./SDKError.js";
|
package/src/monetization.d.ts
CHANGED
package/src/payment.d.ts
CHANGED
package/src/version.js
CHANGED