@schibsted/account-sdk-browser 5.2.7 → 6.0.0-alpha.10

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.
Files changed (109) hide show
  1. package/README.md +46 -301
  2. package/dist/account-sdk.d.ts +22 -0
  3. package/dist/account.d.ts +179 -0
  4. package/dist/cache.d.ts +65 -0
  5. package/dist/config.d.ts +86 -0
  6. package/dist/globals.d.ts +11 -0
  7. package/dist/has-access-response.d.ts +2 -0
  8. package/dist/identity.d.ts +302 -0
  9. package/dist/index.d.ts +11 -0
  10. package/dist/index.js +828 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/monetization.d.ts +39 -0
  13. package/{src → dist}/object.d.ts +4 -9
  14. package/dist/popup.d.ts +9 -0
  15. package/dist/resolve-browser-window.d.ts +1 -0
  16. package/dist/rest-client.d.ts +102 -0
  17. package/dist/rest-clients.d.ts +10 -0
  18. package/dist/sdk-error.d.ts +29 -0
  19. package/dist/session-response.d.ts +54 -0
  20. package/{src/spidTalk.d.ts → dist/spid-talk.d.ts} +4 -6
  21. package/dist/types/account.d.ts +48 -0
  22. package/dist/types/common.d.ts +28 -0
  23. package/dist/types/identity.d.ts +23 -0
  24. package/dist/types/login.d.ts +125 -0
  25. package/dist/types/monetization.d.ts +26 -0
  26. package/dist/types/session.d.ts +146 -0
  27. package/dist/url.d.ts +8 -0
  28. package/dist/validate.d.ts +50 -0
  29. package/dist/version.d.ts +2 -0
  30. package/package.json +34 -52
  31. package/src/account-sdk.ts +92 -0
  32. package/src/account.ts +332 -0
  33. package/src/{cache.js → cache.ts} +53 -38
  34. package/src/{config.js → config.ts} +7 -32
  35. package/src/globals.ts +8 -0
  36. package/src/has-access-response.ts +35 -0
  37. package/src/identity.ts +1023 -0
  38. package/src/index.ts +40 -0
  39. package/src/monetization.ts +128 -0
  40. package/src/{object.js → object.ts} +9 -16
  41. package/src/popup.ts +74 -0
  42. package/src/resolve-browser-window.ts +11 -0
  43. package/src/rest-client.ts +253 -0
  44. package/src/rest-clients.ts +30 -0
  45. package/src/sdk-error.ts +61 -0
  46. package/src/session-response.ts +100 -0
  47. package/src/{spidTalk.js → spid-talk.ts} +10 -12
  48. package/src/types/account.ts +55 -0
  49. package/src/types/common.ts +32 -0
  50. package/src/types/identity.ts +26 -0
  51. package/src/types/login.ts +150 -0
  52. package/src/types/monetization.ts +29 -0
  53. package/src/types/session.ts +169 -0
  54. package/src/{url.js → url.ts} +6 -10
  55. package/src/{validate.js → validate.ts} +27 -43
  56. package/src/{version.js → version.ts} +1 -2
  57. package/es5/global.js +0 -12968
  58. package/es5/global.js.map +0 -1
  59. package/es5/global.min.js +0 -2
  60. package/es5/global.min.js.map +0 -1
  61. package/es5/identity.js +0 -12212
  62. package/es5/identity.js.map +0 -1
  63. package/es5/identity.min.js +0 -2
  64. package/es5/identity.min.js.map +0 -1
  65. package/es5/index.js +0 -12940
  66. package/es5/index.js.map +0 -1
  67. package/es5/index.min.js +0 -2
  68. package/es5/index.min.js.map +0 -1
  69. package/es5/monetization.js +0 -9176
  70. package/es5/monetization.js.map +0 -1
  71. package/es5/monetization.min.js +0 -2
  72. package/es5/monetization.min.js.map +0 -1
  73. package/es5/payment.js +0 -8853
  74. package/es5/payment.js.map +0 -1
  75. package/es5/payment.min.js +0 -2
  76. package/es5/payment.min.js.map +0 -1
  77. package/identity.d.ts +0 -1
  78. package/identity.js +0 -5
  79. package/index.d.ts +0 -4
  80. package/index.js +0 -9
  81. package/monetization.d.ts +0 -1
  82. package/monetization.js +0 -5
  83. package/payment.d.ts +0 -1
  84. package/payment.js +0 -5
  85. package/src/RESTClient.d.ts +0 -89
  86. package/src/RESTClient.js +0 -193
  87. package/src/SDKError.d.ts +0 -16
  88. package/src/SDKError.js +0 -55
  89. package/src/__mocks__/.eslintrc.yml +0 -8
  90. package/src/__mocks__/RESTClient.js +0 -54
  91. package/src/cache.d.ts +0 -64
  92. package/src/config.d.ts +0 -34
  93. package/src/es5/global.js +0 -13
  94. package/src/es5/identity.js +0 -10
  95. package/src/es5/index.js +0 -13
  96. package/src/es5/monetization.js +0 -10
  97. package/src/es5/payment.js +0 -10
  98. package/src/global-registry.js +0 -20
  99. package/src/identity.d.ts +0 -679
  100. package/src/identity.js +0 -1157
  101. package/src/monetization.d.ts +0 -80
  102. package/src/monetization.js +0 -172
  103. package/src/payment.d.ts +0 -115
  104. package/src/payment.js +0 -211
  105. package/src/popup.d.ts +0 -10
  106. package/src/popup.js +0 -59
  107. package/src/url.d.ts +0 -10
  108. package/src/validate.d.ts +0 -64
  109. package/src/version.d.ts +0 -2
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Core configuration used by the SDK.
3
+ * - `ENDPOINTS.SPiD` — SPiD endpoints per environment
4
+ * - `ENDPOINTS.BFF` — Endpoints used with new GDPR-compliant web flows
5
+ * - `ENDPOINTS.SESSION_SERVICE` — Endpoints to check global user session data
6
+ *
7
+ */
8
+ declare const config: {
9
+ readonly ENDPOINTS: {
10
+ readonly SPiD: {
11
+ readonly LOCAL: "http://id.localhost";
12
+ readonly DEV: "https://identity-dev.schibsted.com";
13
+ readonly PRE: "https://identity-pre.schibsted.com";
14
+ readonly PRO: "https://login.schibsted.com";
15
+ readonly PRO_NO: "https://payment.schibsted.no";
16
+ readonly PRO_FI: "https://login.schibsted.fi";
17
+ readonly PRO_DK: "https://login.schibsted.dk";
18
+ };
19
+ readonly BFF: {
20
+ readonly LOCAL: "http://id.localhost/authn/";
21
+ readonly DEV: "https://identity-dev.schibsted.com/authn/";
22
+ readonly PRE: "https://identity-pre.schibsted.com/authn/";
23
+ readonly PRO: "https://login.schibsted.com/authn/";
24
+ readonly PRO_NO: "https://payment.schibsted.no/authn/";
25
+ readonly PRO_FI: "https://login.schibsted.fi/authn/";
26
+ readonly PRO_DK: "https://login.schibsted.dk/authn/";
27
+ };
28
+ readonly SESSION_SERVICE: {
29
+ readonly LOCAL: "http://session-service.id.localhost";
30
+ readonly DEV: "https://session-service.identity-dev.schibsted.com";
31
+ readonly PRE: "https://session-service.identity-pre.schibsted.com";
32
+ readonly PRO: "https://session-service.login.schibsted.com";
33
+ readonly PRO_NO: "https://session-service.payment.schibsted.no";
34
+ readonly PRO_FI: "https://session-service.login.schibsted.fi";
35
+ readonly PRO_DK: "https://session-service.login.schibsted.dk";
36
+ };
37
+ };
38
+ readonly NAMESPACE: {
39
+ readonly LOCAL: "id.localhost";
40
+ readonly DEV: "schibsted.com";
41
+ readonly PRE: "schibsted.com";
42
+ readonly PRO: "schibsted.com";
43
+ readonly PRO_NO: "spid.no";
44
+ readonly PRO_FI: "schibsted.fi";
45
+ readonly PRO_DK: "schibsted.dk";
46
+ };
47
+ };
48
+ export default config;
49
+ export declare const ENDPOINTS: {
50
+ readonly SPiD: {
51
+ readonly LOCAL: "http://id.localhost";
52
+ readonly DEV: "https://identity-dev.schibsted.com";
53
+ readonly PRE: "https://identity-pre.schibsted.com";
54
+ readonly PRO: "https://login.schibsted.com";
55
+ readonly PRO_NO: "https://payment.schibsted.no";
56
+ readonly PRO_FI: "https://login.schibsted.fi";
57
+ readonly PRO_DK: "https://login.schibsted.dk";
58
+ };
59
+ readonly BFF: {
60
+ readonly LOCAL: "http://id.localhost/authn/";
61
+ readonly DEV: "https://identity-dev.schibsted.com/authn/";
62
+ readonly PRE: "https://identity-pre.schibsted.com/authn/";
63
+ readonly PRO: "https://login.schibsted.com/authn/";
64
+ readonly PRO_NO: "https://payment.schibsted.no/authn/";
65
+ readonly PRO_FI: "https://login.schibsted.fi/authn/";
66
+ readonly PRO_DK: "https://login.schibsted.dk/authn/";
67
+ };
68
+ readonly SESSION_SERVICE: {
69
+ readonly LOCAL: "http://session-service.id.localhost";
70
+ readonly DEV: "https://session-service.identity-dev.schibsted.com";
71
+ readonly PRE: "https://session-service.identity-pre.schibsted.com";
72
+ readonly PRO: "https://session-service.login.schibsted.com";
73
+ readonly PRO_NO: "https://session-service.payment.schibsted.no";
74
+ readonly PRO_FI: "https://session-service.login.schibsted.fi";
75
+ readonly PRO_DK: "https://session-service.login.schibsted.dk";
76
+ };
77
+ };
78
+ export declare const NAMESPACE: {
79
+ readonly LOCAL: "id.localhost";
80
+ readonly DEV: "schibsted.com";
81
+ readonly PRE: "schibsted.com";
82
+ readonly PRO: "schibsted.com";
83
+ readonly PRO_NO: "spid.no";
84
+ readonly PRO_FI: "schibsted.fi";
85
+ readonly PRO_DK: "schibsted.dk";
86
+ };
@@ -0,0 +1,11 @@
1
+ import { Account } from './account.js';
2
+ declare global {
3
+ interface Window {
4
+ schAccount?: Account;
5
+ SPiD?: {
6
+ Talk?: {
7
+ response?: (callbackName: string, data: unknown) => unknown;
8
+ };
9
+ };
10
+ }
11
+ }
@@ -0,0 +1,2 @@
1
+ import { HasAccessResult } from './types/monetization.js';
2
+ export declare function parseHasAccessResult(value: unknown): HasAccessResult;
@@ -0,0 +1,302 @@
1
+ import { AccountEventName } from './types/account.js';
2
+ import { IdentityOptions, VarnishCookieOptions } from './types/identity.js';
3
+ import { LoginOptions, OpenSimplifiedLoginWidget, SimplifiedLoginData, SimplifiedLoginWidgetLoginOptions, SimplifiedLoginWidgetOptions } from './types/login.js';
4
+ import { ConnectedSessionResponse, SessionResponse } from './types/session.js';
5
+ declare global {
6
+ interface Window {
7
+ openSimplifiedLoginWidget?: OpenSimplifiedLoginWidget;
8
+ }
9
+ }
10
+ /**
11
+ * Provides Identity functionalty to a web page
12
+ */
13
+ export declare class Identity {
14
+ private readonly eventTarget;
15
+ private readonly window;
16
+ private readonly clientId;
17
+ private readonly redirectUri;
18
+ private readonly env;
19
+ private readonly log?;
20
+ private readonly callbackBeforeRedirect;
21
+ private readonly sessionStorageCache;
22
+ private readonly localStorageCache;
23
+ private enableSessionCaching;
24
+ private readonly spid;
25
+ private readonly oauthService;
26
+ private readonly bffService;
27
+ private readonly sessionService;
28
+ private readonly globalSessionService;
29
+ private readonly usedSessionServiceGetSessionEndpoint;
30
+ /**
31
+ * @internal Starts as `{}` before the first `hasSession()` call, then stores the latest
32
+ * object response from hasSession().
33
+ */
34
+ private session;
35
+ private hasSessionInProgress?;
36
+ private popup?;
37
+ private setVarnishCookie?;
38
+ private varnishExpiresIn?;
39
+ private varnishCookieDomain?;
40
+ /**
41
+ * @param options
42
+ * @param options.clientId - Example: "1234567890abcdef12345678"
43
+ * @param options.sessionDomain - Example: "https://id.site.com"
44
+ * @param options.redirectUri - Example: "https://site.com"
45
+ * @param options.env - Schibsted account environment: `PRE` (default), `PRO`, `PRO_NO`, `PRO_FI` or `PRO_DK`
46
+ * @param options.log - A function that receives debug log information. If not set,
47
+ * no logging will be done
48
+ * @param options.window - window object
49
+ * @param options.callbackBeforeRedirect - callback triggered before session refresh redirect happen
50
+ * @throws {SDKError} - If any of options are invalid
51
+ */
52
+ constructor({ clientId, redirectUri, sessionDomain, env, log, window, callbackBeforeRedirect, }: IdentityOptions);
53
+ addEventListener(type: AccountEventName, listener: EventListener): void;
54
+ removeEventListener(type: AccountEventName, listener: EventListener): void;
55
+ /**
56
+ * Read tabId from session storage
57
+ * @private
58
+ */
59
+ _getTabId(): number | undefined;
60
+ /**
61
+ * Checks if getting session is blocked
62
+ * @private
63
+ *
64
+ */
65
+ _isSessionCallBlocked(): boolean;
66
+ /**
67
+ * Block calls to get session
68
+ * @private
69
+ *
70
+ */
71
+ _blockSessionCall(): void;
72
+ /**
73
+ * Unblocks calls to get session
74
+ * @private
75
+ *
76
+ */
77
+ _unblockSessionCall(): void;
78
+ /**
79
+ * Close this.popup if it exists and is open
80
+ * @private
81
+ */
82
+ _closePopup(): void;
83
+ /**
84
+ * Set the Varnish cookie (`SP_ID`) when hasSession() is called. Note that most browsers require
85
+ * that you are on a "real domain" for this to work — so, **not** `localhost`
86
+ * @param options
87
+ * @param options.expiresIn Override this to set number of seconds before the varnish
88
+ * cookie expires. The default is to use the same time that hasSession responses are cached for
89
+ * @param options.domain Override cookie domain. E.g. «vg.no» instead of «www.vg.no»
90
+ */
91
+ enableVarnishCookie(options: VarnishCookieOptions): void;
92
+ /**
93
+ * Set the Varnish cookie if configured
94
+ * @private
95
+ * @param sessionData
96
+ */
97
+ _maybeSetVarnishCookie(sessionData: object): void;
98
+ /**
99
+ * Clear the Varnish cookie if configured
100
+ * @private
101
+ */
102
+ _maybeClearVarnishCookie(): void;
103
+ /**
104
+ * Clear the Varnish cookie
105
+ * @private
106
+ */
107
+ _clearVarnishCookie(): void;
108
+ /**
109
+ * @summary Queries the hassession endpoint and returns information about the status of the user
110
+ * @remarks When we send a request to this endpoint, cookies sent along with the request
111
+ * determines the status of the user.
112
+ * @throws {SDKError} - If the call to the hasSession service fails in any way (this will happen
113
+ * if, say, the user is not logged in)
114
+ * @fires Identity#sessionUpdated
115
+ */
116
+ hasSession(): Promise<SessionResponse>;
117
+ /**
118
+ * @summary Allows the client app to check if the user is logged in to Schibsted account
119
+ * @remarks This function calls {@link Identity#hasSession} internally and thus has the side
120
+ * effect that it might perform an auto-login on the user
121
+ */
122
+ isLoggedIn(): Promise<boolean>;
123
+ /**
124
+ * Enables or disables caching for subsequent session lookups.
125
+ *
126
+ * Changing this setting does not remove an existing cached session. Use
127
+ * {@link Identity#clearCachedUserSession} to clear the cache explicitly.
128
+ */
129
+ setSessionCachingEnabled(enabled: boolean): void;
130
+ /**
131
+ * Removes the cached user session.
132
+ */
133
+ clearCachedUserSession(): void;
134
+ /**
135
+ * @summary Allows the caller to check if the current user is connected to the client_id in
136
+ * Schibsted account. Being connected means that the user has agreed for their account to be
137
+ * used by your web app and have accepted the required terms
138
+ * @remarks This function calls {@link Identity#hasSession} internally and thus has the side
139
+ * effect that it might perform an auto-login on the user
140
+ * @summary Check if the user is connected to the client_id
141
+ */
142
+ isConnected(): Promise<boolean>;
143
+ /**
144
+ * @summary Returns information about the user
145
+ * @remarks This function calls {@link Identity#hasSession} internally and thus has the side
146
+ * effect that it might perform an auto-login on the user
147
+ * @throws {SDKError} If the user isn't connected to the merchant
148
+ * @throws {SDKError} If we couldn't get the user
149
+ */
150
+ getUser(): Promise<ConnectedSessionResponse>;
151
+ /**
152
+ * @summary
153
+ * In Schibsted account, there are multiple ways of identifying a user; the `userId` or `uuid`.
154
+ * There are reasons for them all to exist. The `userId` is a numeric identifier, but
155
+ * since Schibsted account is deployed separately in Norway and Sweden, there are a lot of
156
+ * duplicates. The `userId` was introduced early, so many sites still need to use them for
157
+ * legacy reasons. The `uuid` is universally unique, and so — if we could disregard a lot of
158
+ * Schibsted components depending on the numeric `userId` — it would be a good identifier to use
159
+ * @remarks This function calls {@link Identity#hasSession} internally and thus has the side
160
+ * effect that it might perform an auto-login on the user
161
+ * @throws {SDKError} If the user isn't connected to the merchant
162
+ * @return The `userId` field (not to be confused with the `uuid`)
163
+ */
164
+ getUserId(): Promise<number>;
165
+ /**
166
+ * @function
167
+ * @summary
168
+ * Retrieves the external identifier (`externalId`) for the authenticated user.
169
+ *
170
+ * In Schibsted Account there are multiple ways of identifying users, however for integrations with
171
+ * third-parties it's recommended to use `externalId` as it does not disclose
172
+ * any critical data whilst allowing for user identification.
173
+ *
174
+ * `externalId` is merchant-scoped using a pairwise identifier (`pairId`),
175
+ * meaning the same user's ID will differ between merchants.
176
+ * Additionally, this identifier is bound to the external party provided as argument.
177
+ *
178
+ * @param externalParty
179
+ * @param optionalSuffix
180
+ * @remarks This function calls {@link Identity#hasSession} internally and thus has the side
181
+ * effect that it might perform an auto-login on the user
182
+ * @throws {SDKError} If the `pairId` is missing in user session.
183
+ * @throws {SDKError} If the `externalParty` is not defined
184
+ * @return The merchant- and 3rd-party-specific `externalId`
185
+ */
186
+ getExternalId(externalParty: string, optionalSuffix?: string): Promise<string>;
187
+ /**
188
+ * @summary Enables brands to programmatically get the current the SDRN based on the user's session.
189
+ * @remarks This function calls {@link Identity#hasSession} internally and thus has the side
190
+ * effect that it might perform an auto-login on the user
191
+ * @throws {SDKError} If the SDRN is missing in user session object.
192
+ */
193
+ getUserSDRN(): Promise<string>;
194
+ /**
195
+ * @summary In Schibsted account, there are two ways of identifying a user; the `userId` and the
196
+ * `uuid`. There are reasons for them both existing. The `userId` is a numeric identifier, but
197
+ * since Schibsted account is deployed separately in Norway and Sweden, there are a lot of
198
+ * duplicates. The `userId` was introduced early, so many sites still need to use them for
199
+ * legacy reasons. The `uuid` is universally unique, and so — if we could disregard a lot of
200
+ * Schibsted components depending on the numeric `userId` — it would be a good identifier to use
201
+ * @remarks This function calls {@link Identity#hasSession} internally and thus has the side
202
+ * effect that it might perform an auto-login on the user
203
+ * @throws {SDKError} If the user isn't connected to the merchant
204
+ * @return The `uuid` field (not to be confused with the `userId`)
205
+ */
206
+ getUserUuid(): Promise<string>;
207
+ /**
208
+ * @summary Get basic information about any user currently logged-in to their Schibsted account
209
+ * in this browser. Can be used to provide context in a continue-as prompt.
210
+ * @remarks This function relies on the global Schibsted account user session cookie, which
211
+ * is a third-party cookie and hence might be blocked by the browser (for example due to ITP in
212
+ * Safari). So there's no guarantee any data is returned, even though a user is logged-in in
213
+ * the current browser.
214
+ */
215
+ getUserContextData(): Promise<SimplifiedLoginData | null>;
216
+ /**
217
+ * If a popup is desired, this function needs to be called in response to a user event (like
218
+ * click or tap) in order to work correctly. Otherwise the popup will be blocked by the
219
+ * browser's popup blockers and has to be explicitly authorized to be shown.
220
+ * @summary Perform a login, either using a full-page redirect or a popup
221
+ * @see https://tools.ietf.org/html/rfc6749#section-4.1.1
222
+ *
223
+ * @param options
224
+ * @param options.state
225
+ * @param options.acrValues
226
+ * @param options.scope
227
+ * @param options.redirectUri
228
+ * @param options.preferPopup
229
+ * @param options.loginHint
230
+ * @param options.tag
231
+ * @param options.teaser
232
+ * @param options.maxAge
233
+ * @param options.locale
234
+ * @param options.oneStepLogin
235
+ * @param options.prompt
236
+ * @param options.xDomainId
237
+ * @param options.xEnvironmentId
238
+ * @param options.originCampaign
239
+ * @fires Identity#loginRequested
240
+ * @return - Reference to popup window if created (or `null` otherwise)
241
+ */
242
+ login({ state, acrValues, scope, redirectUri, preferPopup, loginHint, tag, teaser, maxAge, locale, oneStepLogin, prompt, xDomainId, xEnvironmentId, originCampaign, }: LoginOptions): Window | null;
243
+ /**
244
+ * @summary Retrieve the sp_id (Varnish ID)
245
+ * @remarks This function calls {@link Identity#hasSession} internally and thus has the side
246
+ * effect that it might perform an auto-login on the user
247
+ * @return - The sp_id string or null (if the server didn't return it)
248
+ */
249
+ getSpId(): Promise<string | null>;
250
+ /**
251
+ * @summary Logs the user out from the Identity platform
252
+ * @param redirectUri - Where to redirect the browser after logging out of Schibsted account
253
+ * @fires Identity#logoutRequested
254
+ */
255
+ logout(redirectUri?: string): void;
256
+ /**
257
+ * Generates the link to the new login page that'll be used in the popup or redirect flow
258
+ * @param options
259
+ * @param options.state
260
+ * @param options.acrValues
261
+ * @param options.scope
262
+ * @param options.redirectUri
263
+ * @param options.loginHint
264
+ * @param options.tag
265
+ * @param options.teaser
266
+ * @param options.maxAge
267
+ * @param options.locale
268
+ * @param options.oneStepLogin
269
+ * @param options.prompt
270
+ * @param options.xDomainId
271
+ * @param options.xEnvironmentId
272
+ * @param options.originCampaign
273
+ * @return - The url
274
+ */
275
+ loginUrl({ state, acrValues, scope, redirectUri, loginHint, tag, teaser, maxAge, locale, oneStepLogin, prompt, xDomainId, xEnvironmentId, originCampaign, }: LoginOptions): string;
276
+ /**
277
+ * The url for logging the user out
278
+ * @param redirectUri
279
+ * @return url
280
+ */
281
+ logoutUrl(redirectUri?: string): string;
282
+ /**
283
+ * The account summary page url
284
+ * @param redirectUri
285
+ */
286
+ accountUrl(redirectUri?: string): string;
287
+ /**
288
+ * Function responsible for loading and displaying simplified login widget. How often
289
+ * widget will be display is up to you. Preferred way would be to show it once per user,
290
+ * and store that info in localStorage. Widget will be display only if user is logged in to SSO.
291
+ *
292
+ * @param loginParams - the same as `options` param for login function. Login will be called on user
293
+ * continue action. `state` might be string or async function.
294
+ * @param options - additional configuration of Simplified Login Widget
295
+ * @fires Identity#simplifiedLoginOpened
296
+ * @fires Identity#simplifiedLoginCancelled
297
+ * @throws {SDKError} - If user context data is missing or the widget script cannot be loaded
298
+ * @return - will resolve to true if widget will be displayed
299
+ */
300
+ showSimplifiedLoginWidget(loginParams: SimplifiedLoginWidgetLoginOptions, options?: SimplifiedLoginWidgetOptions): Promise<boolean>;
301
+ }
302
+ export default Identity;
@@ -0,0 +1,11 @@
1
+ export { Account } from './account.js';
2
+ export { createAccountSdk, getAccountSdk } from './account-sdk.js';
3
+ export * from './globals.js';
4
+ export { default as SDKError } from './sdk-error.js';
5
+ /** session response type guards */
6
+ export { isConnectedSessionResponse, isConnectedSessionWithUserIdResponse, isSessionFailureResponse, isSessionSuccessResponse, } from './session-response.js';
7
+ export type { AccountConfig, AccountEventListener, AccountEventName, } from './types/account.js';
8
+ export type { AccountEnvironment, LogFunction } from './types/common.js';
9
+ export type { LoginOptions, SimplifiedLoginData, SimplifiedLoginWidgetLoginOptions, SimplifiedLoginWidgetOptions, } from './types/login.js';
10
+ export type { HasAccessResult } from './types/monetization.js';
11
+ export type { ConnectedSessionResponse, ConnectedSessionWithUserIdResponse, RedirectSessionResponse, SessionFailureResponse, SessionResponse, SessionSuccessResponse, SessionUserId, } from './types/session.js';