@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.
- package/README.md +46 -301
- package/dist/account-sdk.d.ts +22 -0
- package/dist/account.d.ts +179 -0
- package/dist/cache.d.ts +65 -0
- package/dist/config.d.ts +86 -0
- package/dist/globals.d.ts +11 -0
- package/dist/has-access-response.d.ts +2 -0
- package/dist/identity.d.ts +302 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +828 -0
- package/dist/index.js.map +1 -0
- package/dist/monetization.d.ts +39 -0
- package/{src → dist}/object.d.ts +4 -9
- package/dist/popup.d.ts +9 -0
- package/dist/resolve-browser-window.d.ts +1 -0
- package/dist/rest-client.d.ts +102 -0
- package/dist/rest-clients.d.ts +10 -0
- package/dist/sdk-error.d.ts +29 -0
- package/dist/session-response.d.ts +54 -0
- package/{src/spidTalk.d.ts → dist/spid-talk.d.ts} +4 -6
- package/dist/types/account.d.ts +48 -0
- package/dist/types/common.d.ts +28 -0
- package/dist/types/identity.d.ts +23 -0
- package/dist/types/login.d.ts +125 -0
- package/dist/types/monetization.d.ts +26 -0
- package/dist/types/session.d.ts +146 -0
- package/dist/url.d.ts +8 -0
- package/dist/validate.d.ts +50 -0
- package/dist/version.d.ts +2 -0
- package/package.json +34 -52
- package/src/account-sdk.ts +92 -0
- package/src/account.ts +332 -0
- package/src/{cache.js → cache.ts} +53 -38
- package/src/{config.js → config.ts} +7 -32
- package/src/globals.ts +8 -0
- package/src/has-access-response.ts +35 -0
- package/src/identity.ts +1023 -0
- package/src/index.ts +40 -0
- package/src/monetization.ts +128 -0
- package/src/{object.js → object.ts} +9 -16
- package/src/popup.ts +74 -0
- package/src/resolve-browser-window.ts +11 -0
- package/src/rest-client.ts +253 -0
- package/src/rest-clients.ts +30 -0
- package/src/sdk-error.ts +61 -0
- package/src/session-response.ts +100 -0
- package/src/{spidTalk.js → spid-talk.ts} +10 -12
- package/src/types/account.ts +55 -0
- package/src/types/common.ts +32 -0
- package/src/types/identity.ts +26 -0
- package/src/types/login.ts +150 -0
- package/src/types/monetization.ts +29 -0
- package/src/types/session.ts +169 -0
- package/src/{url.js → url.ts} +6 -10
- package/src/{validate.js → validate.ts} +27 -43
- package/src/{version.js → version.ts} +1 -2
- package/es5/global.js +0 -12968
- package/es5/global.js.map +0 -1
- package/es5/global.min.js +0 -2
- package/es5/global.min.js.map +0 -1
- package/es5/identity.js +0 -12212
- package/es5/identity.js.map +0 -1
- package/es5/identity.min.js +0 -2
- package/es5/identity.min.js.map +0 -1
- package/es5/index.js +0 -12940
- package/es5/index.js.map +0 -1
- package/es5/index.min.js +0 -2
- package/es5/index.min.js.map +0 -1
- package/es5/monetization.js +0 -9176
- package/es5/monetization.js.map +0 -1
- package/es5/monetization.min.js +0 -2
- package/es5/monetization.min.js.map +0 -1
- package/es5/payment.js +0 -8853
- package/es5/payment.js.map +0 -1
- package/es5/payment.min.js +0 -2
- package/es5/payment.min.js.map +0 -1
- package/identity.d.ts +0 -1
- package/identity.js +0 -5
- package/index.d.ts +0 -4
- package/index.js +0 -9
- package/monetization.d.ts +0 -1
- package/monetization.js +0 -5
- package/payment.d.ts +0 -1
- package/payment.js +0 -5
- package/src/RESTClient.d.ts +0 -89
- package/src/RESTClient.js +0 -193
- package/src/SDKError.d.ts +0 -16
- package/src/SDKError.js +0 -55
- package/src/__mocks__/.eslintrc.yml +0 -8
- package/src/__mocks__/RESTClient.js +0 -54
- package/src/cache.d.ts +0 -64
- package/src/config.d.ts +0 -34
- package/src/es5/global.js +0 -13
- package/src/es5/identity.js +0 -10
- package/src/es5/index.js +0 -13
- package/src/es5/monetization.js +0 -10
- package/src/es5/payment.js +0 -10
- package/src/global-registry.js +0 -20
- package/src/identity.d.ts +0 -679
- package/src/identity.js +0 -1157
- package/src/monetization.d.ts +0 -80
- package/src/monetization.js +0 -172
- package/src/payment.d.ts +0 -115
- package/src/payment.js +0 -211
- package/src/popup.d.ts +0 -10
- package/src/popup.js +0 -59
- package/src/url.d.ts +0 -10
- package/src/validate.d.ts +0 -64
- package/src/version.d.ts +0 -2
package/src/validate.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A utility function that throws an SDKError if an assertion fails. It's mostly useful for
|
|
3
|
-
* validating function inputs.
|
|
4
|
-
* @memberof core
|
|
5
|
-
* @param {boolean} condition - The condition that we're asserting
|
|
6
|
-
* @param {string} [message = Assertion failed] - The error message
|
|
7
|
-
* @throws {SDKError} - If the condition is falsy it throws the appropriate error
|
|
8
|
-
* @return {void}
|
|
9
|
-
*/
|
|
10
|
-
export function assert(condition: boolean, message?: string): void;
|
|
11
|
-
/**
|
|
12
|
-
* Checks if a value is a string or not
|
|
13
|
-
* @memberof core
|
|
14
|
-
* @param {*} value - The value to check
|
|
15
|
-
* @return {boolean}
|
|
16
|
-
*/
|
|
17
|
-
export function isStr(value: any): boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Checks if a value is a non-empty string
|
|
20
|
-
* @memberof core
|
|
21
|
-
* @param {*} value - The value to check
|
|
22
|
-
* @return {boolean}
|
|
23
|
-
*/
|
|
24
|
-
export function isNonEmptyString(value: any): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* checks if a given value is an object (but not null)
|
|
27
|
-
* @memberof core
|
|
28
|
-
* @param {*} value - The value to check
|
|
29
|
-
* @return {boolean}
|
|
30
|
-
*/
|
|
31
|
-
export function isObject(value: any): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Checks if a given value is an object with at least one own key
|
|
34
|
-
* @memberof core
|
|
35
|
-
* @param {*} value - The value to check
|
|
36
|
-
* @return {boolean}
|
|
37
|
-
*/
|
|
38
|
-
export function isNonEmptyObj(value: any): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Checks if a given string is a valid URL
|
|
41
|
-
* @memberof core
|
|
42
|
-
* @param {string} value - The string to be tested
|
|
43
|
-
* @param {...string} mandatoryFields - A list of mandatory fields that should exist in the parsed
|
|
44
|
-
* URL object
|
|
45
|
-
* @return {boolean}
|
|
46
|
-
*/
|
|
47
|
-
export function isUrl(value: string, ...mandatoryFields: string[]): boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Checks if a given value is a function
|
|
50
|
-
* @memberof core
|
|
51
|
-
* @param {*} value - The value to check
|
|
52
|
-
* @return {boolean}
|
|
53
|
-
*/
|
|
54
|
-
export function isFunction(value: any): boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Checks if a string matches any of the strings in a set of possibilities
|
|
57
|
-
* @memberof core
|
|
58
|
-
* @param {string} value
|
|
59
|
-
* @param {string[]} possibilities - An array of strings that'll be used to check the string
|
|
60
|
-
* inclusion. Note that for performance reasons, we don't validate this parameter.
|
|
61
|
-
* @param {boolean} [caseSensitive=false] - Should the check be case sensitive
|
|
62
|
-
* @return {boolean}
|
|
63
|
-
*/
|
|
64
|
-
export function isStrIn(value: string, possibilities: string[], caseSensitive?: boolean): boolean;
|
package/src/version.d.ts
DELETED