@pushwoosh/session-store 2.4.0 → 2.5.0
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/dist/entities/account.d.ts +43 -45
- package/dist/entities/account.d.ts.map +1 -1
- package/dist/entities/counters.d.ts +2 -4
- package/dist/entities/counters.d.ts.map +1 -1
- package/dist/entities/permissions.d.ts +2 -4
- package/dist/entities/permissions.d.ts.map +1 -1
- package/dist/entities/platforms.d.ts +2 -4
- package/dist/entities/platforms.d.ts.map +1 -1
- package/dist/entities/user.d.ts +2 -5
- package/dist/entities/user.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/session-store.d.ts +16 -10
- package/dist/session-store.d.ts.map +1 -1
- package/dist/session-store.helpers.d.ts +0 -2
- package/dist/session-store.helpers.d.ts.map +1 -1
- package/dist/session-store.types.d.ts +2 -2
- package/dist/session-store.types.d.ts.map +1 -1
- package/package.json +5 -10
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
type AuthInfoAccountAsObject = ReturnType<RpcServiceClientInstances['accounts']['AuthInfoAccount']['toObject']>;
|
|
1
|
+
import { type Account as AuthInfoAccount } from '@pushwoosh/rpc-v2-http-api-data/accounts_get_auth_info';
|
|
3
2
|
export declare enum ProductType {
|
|
4
3
|
FREE = "Free",
|
|
5
4
|
DEVELOPER = "Developer",
|
|
@@ -7,90 +6,89 @@ export declare enum ProductType {
|
|
|
7
6
|
ENTERPRISE = "Enterprise"
|
|
8
7
|
}
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
9
|
+
* Account information
|
|
11
10
|
*/
|
|
12
11
|
export declare class Account {
|
|
13
|
-
/** ID
|
|
12
|
+
/** Account ID */
|
|
14
13
|
readonly id: number;
|
|
15
|
-
/**
|
|
14
|
+
/** Account name */
|
|
16
15
|
readonly name: string;
|
|
17
|
-
/**
|
|
16
|
+
/** Account domain */
|
|
18
17
|
readonly domain: string;
|
|
19
|
-
/**
|
|
20
|
-
readonly registrationDate:
|
|
21
|
-
/**
|
|
18
|
+
/** Account registration date */
|
|
19
|
+
readonly registrationDate: Date;
|
|
20
|
+
/** Presence of an active subscription */
|
|
22
21
|
readonly hasActiveOrder: boolean;
|
|
23
|
-
/**
|
|
22
|
+
/** Billing information */
|
|
24
23
|
readonly billing: {
|
|
25
|
-
/**
|
|
24
|
+
/** Company name */
|
|
26
25
|
readonly companyName: string | undefined;
|
|
27
|
-
/**
|
|
26
|
+
/** Company name */
|
|
28
27
|
readonly accountCompanyName: string | undefined;
|
|
29
|
-
/**
|
|
28
|
+
/** Country */
|
|
30
29
|
readonly companyCountry: string | undefined;
|
|
31
|
-
/**
|
|
30
|
+
/** Country code */
|
|
32
31
|
readonly companyCountryCode: string | undefined;
|
|
33
|
-
/**
|
|
32
|
+
/** State (only for USA) */
|
|
34
33
|
readonly companyState: string | undefined;
|
|
35
|
-
/**
|
|
34
|
+
/** State code (only for USA) */
|
|
36
35
|
readonly companyStateCode: string | undefined;
|
|
37
|
-
/**
|
|
36
|
+
/** City */
|
|
38
37
|
readonly companyCity: string | undefined;
|
|
39
|
-
/**
|
|
38
|
+
/** Street */
|
|
40
39
|
readonly companyStreet: string | undefined;
|
|
41
|
-
/**
|
|
40
|
+
/** Postal code */
|
|
42
41
|
readonly companyZip: string | undefined;
|
|
43
|
-
/**
|
|
42
|
+
/** Phone number */
|
|
44
43
|
readonly companyPhone: string | undefined;
|
|
45
|
-
/**
|
|
44
|
+
/** Company VAT number */
|
|
46
45
|
readonly companyVAT: string | undefined;
|
|
47
|
-
/**
|
|
46
|
+
/** Used as purchase number */
|
|
48
47
|
readonly companyNumber: string | undefined;
|
|
49
|
-
/**
|
|
48
|
+
/** Primary contact first name */
|
|
50
49
|
readonly primaryPersonFirstName: string | undefined;
|
|
51
|
-
/**
|
|
50
|
+
/** Primary contact last name */
|
|
52
51
|
readonly primaryPersonLastName: string | undefined;
|
|
53
|
-
/**
|
|
52
|
+
/** Primary contact email */
|
|
54
53
|
readonly primaryPersonEmail: string | undefined;
|
|
55
|
-
/**
|
|
54
|
+
/** Secondary contact first name */
|
|
56
55
|
readonly secondaryPersonFirstName: string | undefined;
|
|
57
|
-
/**
|
|
56
|
+
/** Secondary contact last name */
|
|
58
57
|
readonly secondaryPersonLastName: string | undefined;
|
|
59
|
-
/**
|
|
58
|
+
/** Secondary contact email */
|
|
60
59
|
readonly secondaryPersonEmail: string | undefined;
|
|
61
|
-
/**
|
|
60
|
+
/** Industry */
|
|
62
61
|
readonly industry: string | undefined;
|
|
63
|
-
/**
|
|
62
|
+
/** Department */
|
|
64
63
|
readonly department: string | undefined;
|
|
65
|
-
/**
|
|
64
|
+
/** Additional contact emails */
|
|
66
65
|
readonly additionalEmails: string | undefined;
|
|
67
66
|
};
|
|
68
|
-
/**
|
|
67
|
+
/** Purchased subscription type */
|
|
69
68
|
readonly productType: ProductType;
|
|
70
|
-
/**
|
|
69
|
+
/** Subscription plan name. Just a string to display in settings */
|
|
71
70
|
readonly productName: string;
|
|
72
|
-
/**
|
|
71
|
+
/** Is the account enterprise */
|
|
73
72
|
readonly isEnterprise: boolean;
|
|
74
|
-
/**
|
|
73
|
+
/** Subscription expiry date */
|
|
75
74
|
readonly expiryDate: string;
|
|
76
|
-
/**
|
|
75
|
+
/** Is the account frozen */
|
|
77
76
|
readonly isFrozen: boolean;
|
|
78
|
-
/**
|
|
77
|
+
/** Has the device limit been reached */
|
|
79
78
|
readonly isDeviceLimitReached: boolean;
|
|
80
|
-
/**
|
|
79
|
+
/** Account statistics */
|
|
81
80
|
readonly statistics: {
|
|
82
|
-
/**
|
|
81
|
+
/** Number of subscribers */
|
|
83
82
|
readonly totalSubscribers: number;
|
|
84
|
-
/**
|
|
83
|
+
/** Number of devices that can receive push notifications */
|
|
85
84
|
readonly pushAvailableSubscribers: number;
|
|
86
|
-
/**
|
|
85
|
+
/** Number of devices that cannot receive push notifications */
|
|
87
86
|
readonly pushNotAvailableSubscribers: number;
|
|
88
|
-
/**
|
|
87
|
+
/** Free email quota update date */
|
|
89
88
|
readonly freeEmailsQuotaUpdateDate: string | undefined;
|
|
90
|
-
/**
|
|
89
|
+
/** Paid email quota expiry date */
|
|
91
90
|
readonly paidEmailsQuotaExpiryDate: string | undefined;
|
|
92
91
|
};
|
|
93
|
-
constructor(accountData:
|
|
92
|
+
constructor(accountData: AuthInfoAccount);
|
|
94
93
|
}
|
|
95
|
-
export {};
|
|
96
94
|
//# sourceMappingURL=account.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/entities/account.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/entities/account.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,IAAI,eAAe,EAChC,MAAM,wDAAwD,CAAC;AAIhE,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,UAAU,eAAe;CAC1B;AAED;;GAEG;AACH,qBAAa,OAAO;IAClB,iBAAiB;IACjB,SAAgB,EAAE,EAAE,MAAM,CAAC;IAE3B,mBAAmB;IACnB,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B,qBAAqB;IACrB,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,gCAAgC;IAChC,SAAgB,gBAAgB,EAAE,IAAI,CAAC;IAEvC,yCAAyC;IACzC,SAAgB,cAAc,EAAE,OAAO,CAAC;IAExC,0BAA0B;IAC1B,SAAgB,OAAO,EAAE;QACvB,mBAAmB;QACnB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;QAEzC,mBAAmB;QACnB,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;QAEhD,cAAc;QACd,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;QAE5C,mBAAmB;QACnB,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;QAEhD,2BAA2B;QAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;QAE1C,gCAAgC;QAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;QAE9C,WAAW;QACX,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;QAEzC,aAAa;QACb,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;QAE3C,kBAAkB;QAClB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;QAExC,mBAAmB;QACnB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;QAE1C,yBAAyB;QACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;QAExC,8BAA8B;QAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;QAE3C,iCAAiC;QACjC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC;QAEpD,gCAAgC;QAChC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;QAEnD,4BAA4B;QAC5B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;QAEhD,mCAAmC;QACnC,QAAQ,CAAC,wBAAwB,EAAE,MAAM,GAAG,SAAS,CAAC;QAEtD,kCAAkC;QAClC,QAAQ,CAAC,uBAAuB,EAAE,MAAM,GAAG,SAAS,CAAC;QAErD,8BAA8B;QAC9B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;QAElD,eAAe;QACf,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;QAEtC,iBAAiB;QACjB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;QAExC,gCAAgC;QAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;KAC/C,CAAC;IAEF,kCAAkC;IAClC,SAAgB,WAAW,EAAE,WAAW,CAAC;IAEzC,mEAAmE;IACnE,SAAgB,WAAW,EAAE,MAAM,CAAC;IAEpC,gCAAgC;IAChC,SAAgB,YAAY,EAAE,OAAO,CAAC;IAEtC,+BAA+B;IAC/B,SAAgB,UAAU,EAAE,MAAM,CAAC;IAEnC,4BAA4B;IAC5B,SAAgB,QAAQ,EAAE,OAAO,CAAC;IAElC,wCAAwC;IACxC,SAAgB,oBAAoB,EAAE,OAAO,CAAC;IAE9C,yBAAyB;IACzB,SAAgB,UAAU,EAAE;QAC1B,4BAA4B;QAC5B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;QAElC,4DAA4D;QAC5D,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;QAE1C,+DAA+D;QAC/D,QAAQ,CAAC,2BAA2B,EAAE,MAAM,CAAC;QAE7C,mCAAmC;QACnC,QAAQ,CAAC,yBAAyB,EAAE,MAAM,GAAG,SAAS,CAAC;QAEvD,mCAAmC;QACnC,QAAQ,CAAC,yBAAyB,EAAE,MAAM,GAAG,SAAS,CAAC;KACxD,CAAC;gBAEU,WAAW,EAAE,eAAe;CAmDzC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
type AuthInfoAccountAsObject = ReturnType<RpcServiceClientInstances['accounts']['AuthInfoAccount']['toObject']>;
|
|
1
|
+
import { type Account as AuthInfoAccount } from '@pushwoosh/rpc-v2-http-api-data/accounts_get_auth_info';
|
|
3
2
|
/**
|
|
4
3
|
* Account owner's counters
|
|
5
4
|
*/
|
|
@@ -38,7 +37,6 @@ export declare class Counters {
|
|
|
38
37
|
readonly totalRssFeedsCount: number;
|
|
39
38
|
/** Number of existing "Test Devices" */
|
|
40
39
|
readonly totalTestDevicesCount: number;
|
|
41
|
-
constructor(accountData:
|
|
40
|
+
constructor(accountData: AuthInfoAccount);
|
|
42
41
|
}
|
|
43
|
-
export {};
|
|
44
42
|
//# sourceMappingURL=counters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"counters.d.ts","sourceRoot":"","sources":["../../src/entities/counters.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"counters.d.ts","sourceRoot":"","sources":["../../src/entities/counters.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,IAAI,eAAe,EAChC,MAAM,wDAAwD,CAAC;AAEhE;;GAEG;AACH,qBAAa,QAAQ;IACnB,wCAAwC;IACxC,SAAgB,sBAAsB,EAAE,MAAM,CAAC;IAE/C,8CAA8C;IAC9C,SAAgB,2BAA2B,EAAE,MAAM,CAAC;IAEpD,qCAAqC;IACrC,SAAgB,mBAAmB,EAAE,MAAM,CAAC;IAE5C,gCAAgC;IAChC,SAAgB,cAAc,EAAE,MAAM,CAAC;IAEvC,mCAAmC;IACnC,SAAgB,iBAAiB,EAAE,MAAM,CAAC;IAE1C,kCAAkC;IAClC,SAAgB,gBAAgB,EAAE,MAAM,CAAC;IAEzC,sCAAsC;IACtC,SAAgB,mBAAmB,EAAE,MAAM,CAAC;IAE5C,mCAAmC;IACnC,SAAgB,gBAAgB,EAAE,MAAM,CAAC;IAEzC,4CAA4C;IAC5C,SAAgB,iBAAiB,EAAE,MAAM,CAAC;IAE1C,oDAAoD;IACpD,SAAgB,eAAe,EAAE,MAAM,CAAC;IAExC,yCAAyC;IACzC,SAAgB,wBAAwB,EAAE,MAAM,CAAC;IAEjD,mCAAmC;IACnC,SAAgB,iBAAiB,EAAE,MAAM,CAAC;IAE1C,uCAAuC;IACvC,SAAgB,oBAAoB,EAAE,MAAM,CAAC;IAE7C,oCAAoC;IACpC,SAAgB,kBAAkB,EAAE,MAAM,CAAC;IAE3C,sCAAsC;IACtC,SAAgB,mBAAmB,EAAE,MAAM,CAAC;IAE5C,qCAAqC;IACrC,SAAgB,kBAAkB,EAAE,MAAM,CAAC;IAE3C,wCAAwC;IACxC,SAAgB,qBAAqB,EAAE,MAAM,CAAC;gBAElC,WAAW,EAAE,eAAe;CAmBzC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
type AuthInfoAccountAsObject = ReturnType<RpcServiceClientInstances['accounts']['AuthInfoAccount']['toObject']>;
|
|
1
|
+
import { type Account as AuthInfoAccount } from '@pushwoosh/rpc-v2-http-api-data/accounts_get_auth_info';
|
|
3
2
|
/**
|
|
4
3
|
* Permissions for using the functionality from the account owner's side
|
|
5
4
|
*/
|
|
@@ -46,7 +45,6 @@ export declare class Permissions {
|
|
|
46
45
|
readonly canSeeEmailTemplates: boolean;
|
|
47
46
|
/** Can the user edit email templates */
|
|
48
47
|
readonly canModifyEmailTemplates: boolean;
|
|
49
|
-
constructor(account:
|
|
48
|
+
constructor(account: AuthInfoAccount);
|
|
50
49
|
}
|
|
51
|
-
export {};
|
|
52
50
|
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/entities/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/entities/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,IAAI,eAAe,EAChC,MAAM,wDAAwD,CAAC;AAEhE;;GAEG;AACH,qBAAa,WAAW;IACtB,sCAAsC;IACtC,SAAgB,cAAc,EAAE,OAAO,CAAC;IAExC,2CAA2C;IAC3C,SAAgB,qBAAqB,EAAE,OAAO,CAAC;IAE/C,wCAAwC;IACxC,SAAgB,qBAAqB,EAAE,OAAO,CAAC;IAE/C,sDAAsD;IACtD,SAAgB,yBAAyB,EAAE,OAAO,CAAC;IAEnD,8CAA8C;IAC9C,SAAgB,iBAAiB,EAAE,OAAO,CAAC;IAE3C,qCAAqC;IACrC,SAAgB,kBAAkB,EAAE,OAAO,CAAC;IAE5C,qCAAqC;IACrC,SAAgB,qBAAqB,EAAE,OAAO,CAAC;IAE/C,2CAA2C;IAC3C,SAAgB,uBAAuB,EAAE,OAAO,CAAC;IAEjD,2CAA2C;IAC3C,SAAgB,0BAA0B,EAAE,OAAO,CAAC;IAEpD,sCAAsC;IACtC,SAAgB,cAAc,EAAE,OAAO,CAAC;IAExC,+CAA+C;IAC/C,SAAgB,iBAAiB,EAAE,OAAO,CAAC;IAE3C,iCAAiC;IACjC,SAAgB,eAAe,EAAE,OAAO,CAAC;IAEzC,6BAA6B;IAC7B,SAAgB,UAAU,EAAE,OAAO,CAAC;IAEpC,6BAA6B;IAC7B,SAAgB,aAAa,EAAE,OAAO,CAAC;IAEvC,iCAAiC;IACjC,SAAgB,cAAc,EAAE,OAAO,CAAC;IAExC,iCAAiC;IACjC,SAAgB,iBAAiB,EAAE,OAAO,CAAC;IAE3C,mCAAmC;IACnC,SAAgB,eAAe,EAAE,OAAO,CAAC;IAEzC,mCAAmC;IACnC,SAAgB,kBAAkB,EAAE,OAAO,CAAC;IAE5C,gCAAgC;IAChC,SAAgB,YAAY,EAAE,OAAO,CAAC;IAEtC,wCAAwC;IACxC,SAAgB,oBAAoB,EAAE,OAAO,CAAC;IAE9C,wCAAwC;IACxC,SAAgB,uBAAuB,EAAE,OAAO,CAAC;gBAErC,OAAO,EAAE,eAAe;CAqCrC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
type AuthInfoAccountAsObject = ReturnType<RpcServiceClientInstances['accounts']['AuthInfoAccount']['toObject']>;
|
|
1
|
+
import { type Account as AuthInfoAccount } from '@pushwoosh/rpc-v2-http-api-data/accounts_get_auth_info';
|
|
3
2
|
/**
|
|
4
3
|
* Platform identifier.
|
|
5
4
|
*/
|
|
@@ -62,7 +61,7 @@ export declare class Platforms {
|
|
|
62
61
|
* Array of available platforms.
|
|
63
62
|
*/
|
|
64
63
|
readonly available: Array<Platform>;
|
|
65
|
-
constructor(accountData:
|
|
64
|
+
constructor(accountData: AuthInfoAccount);
|
|
66
65
|
/**
|
|
67
66
|
* Check if the platform is available for use.
|
|
68
67
|
*
|
|
@@ -71,5 +70,4 @@ export declare class Platforms {
|
|
|
71
70
|
*/
|
|
72
71
|
checkIsAvailablePlatform: (platform: Platform) => boolean;
|
|
73
72
|
}
|
|
74
|
-
export {};
|
|
75
73
|
//# sourceMappingURL=platforms.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platforms.d.ts","sourceRoot":"","sources":["../../src/entities/platforms.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"platforms.d.ts","sourceRoot":"","sources":["../../src/entities/platforms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,IAAI,eAAe,EAChC,MAAM,wDAAwD,CAAC;AAEhE;;GAEG;AACH,oBAAY,QAAQ;IAClB,GAAG,IAAI;IAEP,OAAO,IAAI;IAIX,MAAM,IAAI;IACV,OAAO,IAAI;IACX,MAAM,IAAI;IACV,MAAM,KAAK;IACX,MAAM,KAAK;IACX,OAAO,KAAK;IACZ,EAAE,KAAK;IACP,KAAK,KAAK;IAEV,KAAK,KAAK;IACV,MAAM,KAAK;IACX,GAAG,KAAK;IACR,MAAM,KAAK;IAEX,QAAQ,KAAK;CACd;AAED;;GAEG;AACH,oBAAY,YAAY;IACtB,GAAG,QAAQ;IAEX,OAAO,YAAY;IAInB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,EAAE,sBAAsB;IACxB,KAAK,UAAU;IAEf,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,MAAM,WAAW;IAEjB,QAAQ,aAAa;CACtB;AAED;;GAEG;AACH,qBAAa,SAAS;IACpB;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAKjC;IAEF;;;;;OAKG;IACH,OAAc,eAAe,aAAc,QAAQ,KAAG,MAAM,CAQ1D;IAEF;;OAEG;IACH,SAAgB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;gBAE/B,WAAW,EAAE,eAAe;IAKxC;;;;;OAKG;IACI,wBAAwB,aAAc,QAAQ,KAAG,OAAO,CAE7D;CACH"}
|
package/dist/entities/user.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
type AuthInfoAccountAsObject = ReturnType<RpcServiceClientInstances['accounts']['AuthInfoAccount']['toObject']>;
|
|
3
|
-
type AuthInfoUserAsObject = ReturnType<RpcServiceClientInstances['accounts']['AuthInfoUser']['toObject']>;
|
|
1
|
+
import { type Account as AuthInfoAccount, type User as AuthInfoUser } from '@pushwoosh/rpc-v2-http-api-data/accounts_get_auth_info';
|
|
4
2
|
/**
|
|
5
3
|
* User information
|
|
6
4
|
*/
|
|
@@ -23,7 +21,6 @@ export declare class User {
|
|
|
23
21
|
readonly intercomUserHash: string;
|
|
24
22
|
/** Is the user subscribed to newsletters */
|
|
25
23
|
readonly isSubscribedForNewsletters: boolean;
|
|
26
|
-
constructor(accountData:
|
|
24
|
+
constructor(accountData: AuthInfoAccount, userData: AuthInfoUser);
|
|
27
25
|
}
|
|
28
|
-
export {};
|
|
29
26
|
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/entities/user.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/entities/user.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,IAAI,eAAe,EAC/B,KAAK,IAAI,IAAI,YAAY,EAC1B,MAAM,wDAAwD,CAAC;AAEhE;;GAEG;AACH,qBAAa,IAAI;IACf,gBAAgB;IAChB,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B,iBAAiB;IACjB,SAAgB,KAAK,EAAE,MAAM,CAAC;IAE9B,yBAAyB;IACzB,SAAgB,QAAQ,EAAE,OAAO,CAAC;IAElC,sCAAsC;IACtC,SAAgB,OAAO,EAAE,OAAO,CAAC;IAEjC,oBAAoB;IACpB,SAAgB,QAAQ,EAAE,MAAM,CAAC;IAEjC,2BAA2B;IAC3B,SAAgB,cAAc,EAAE,MAAM,CAAC;IAEvC,6CAA6C;IAC7C,SAAgB,YAAY,EAAE,MAAM,CAAC;IAErC,+CAA+C;IAC/C,SAAgB,gBAAgB,EAAE,MAAM,CAAC;IAEzC,4CAA4C;IAC5C,SAAgB,0BAA0B,EAAE,OAAO,CAAC;gBAExC,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY;CAkBjE"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tslib"),require("rxjs"),require("@pushwoosh/grpc-bridge")):"function"==typeof define&&define.amd?define(["tslib","rxjs","@pushwoosh/grpc-bridge"],e):"object"==typeof exports?exports["@pushwoosh/session-store"]=e(require("tslib"),require("rxjs"),require("@pushwoosh/grpc-bridge")):t["@pushwoosh/session-store"]=e(t.tslib,t.rxjs,t["@pushwoosh/grpc-bridge"])}(self,((t,e,s)=>(()=>{var r={1157:t=>{"use strict";t.exports=s},3961:t=>{"use strict";t.exports=e},5652:e=>{"use strict";e.exports=t},8628:(t,e,s)=>{t.exports=s(6343)},3981:(t,e,s)=>{t.exports=s(6462)},1362:(t,e,s)=>{"use strict";s(9748);var r=s(1747);t.exports=r("Array","includes")},6880:(t,e,s)=>{"use strict";var r=s(8280),i=s(1362),o=s(4378),n=Array.prototype,a=String.prototype;t.exports=function(t){var e=t.includes;return t===n||r(n,t)&&e===n.includes?i:"string"==typeof t||t===a||r(a,t)&&e===a.includes?o:e}},9929:(t,e,s)=>{"use strict";s(9502);var r=s(2046);t.exports=r.parseFloat},4378:(t,e,s)=>{"use strict";s(9770);var r=s(1747);t.exports=r("String","includes")},2159:(t,e,s)=>{"use strict";var r=s(2250),i=s(4640),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a function")}},2156:t=>{"use strict";t.exports=function(){}},6624:(t,e,s)=>{"use strict";var r=s(6285),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not an object")}},4436:(t,e,s)=>{"use strict";var r=s(7374),i=s(4849),o=s(575),n=function(t){return function(e,s,n){var a=r(e),u=o(a);if(0===u)return!t&&-1;var l,c=i(n,u);if(t&&s!=s){for(;u>c;)if((l=a[c++])!=l)return!0}else for(;u>c;c++)if((t||c in a)&&a[c]===s)return t||c||0;return!t&&-1}};t.exports={includes:n(!0),indexOf:n(!1)}},5807:(t,e,s)=>{"use strict";var r=s(1907),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},3948:(t,e,s)=>{"use strict";var r=s(2623),i=s(2250),o=s(5807),n=s(6264)("toStringTag"),a=Object,u="Arguments"===o(function(){return arguments}());t.exports=r?o:function(t){var e,s,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(s=function(t,e){try{return t[e]}catch(t){}}(e=a(t),n))?s:u?o(e):"Object"===(r=o(e))&&i(e.callee)?"Arguments":r}},5735:(t,e,s)=>{"use strict";var r=s(6264)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(s){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},1626:(t,e,s)=>{"use strict";var r=s(9447),i=s(4284),o=s(5817);t.exports=r?function(t,e,s){return i.f(t,e,o(1,s))}:function(t,e,s){return t[e]=s,t}},5817:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2532:(t,e,s)=>{"use strict";var r=s(1010),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(s){r[t]=e}return e}},9447:(t,e,s)=>{"use strict";var r=s(8828);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:(t,e,s)=>{"use strict";var r=s(1010),i=s(6285),o=r.document,n=i(o)&&i(o.createElement);t.exports=function(t){return n?o.createElement(t):{}}},4723:t=>{"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},5683:(t,e,s)=>{"use strict";var r,i,o=s(1010),n=s(4723),a=o.process,u=o.Deno,l=a&&a.versions||u&&u.version,c=l&&l.v8;c&&(i=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&n&&(!(r=n.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=n.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},1091:(t,e,s)=>{"use strict";var r=s(1010),i=s(6024),o=s(2361),n=s(2250),a=s(3846).f,u=s(7463),l=s(2046),c=s(8311),p=s(1626),h=s(9724);s(6128);var d=function(t){var e=function(s,r,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(s);case 2:return new t(s,r)}return new t(s,r,o)}return i(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var s,i,f,m,v,g,b,y,x,w=t.target,S=t.global,A=t.stat,C=t.proto,M=S?r:A?r[w]:r[w]&&r[w].prototype,O=S?l:l[w]||p(l,w,{})[w],E=O.prototype;for(m in e)i=!(s=u(S?m:w+(A?".":"#")+m,t.forced))&&M&&h(M,m),g=O[m],i&&(b=t.dontCallGetSet?(x=a(M,m))&&x.value:M[m]),v=i&&b?b:e[m],(s||C||typeof g!=typeof v)&&(y=t.bind&&i?c(v,r):t.wrap&&i?d(v):C&&n(v)?o(v):v,(t.sham||v&&v.sham||g&&g.sham)&&p(y,"sham",!0),p(O,m,y),C&&(h(l,f=w+"Prototype")||p(l,f,{}),p(l[f],m,v),t.real&&E&&(s||!E[m])&&p(E,m,v)))}},8828:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},6024:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype,o=i.apply,n=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?n.bind(o):function(){return n.apply(o,arguments)})},8311:(t,e,s)=>{"use strict";var r=s(2361),i=s(2159),o=s(1505),n=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?n(t,e):function(){return t.apply(e,arguments)}}},1505:(t,e,s)=>{"use strict";var r=s(8828);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},3930:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},2361:(t,e,s)=>{"use strict";var r=s(5807),i=s(1907);t.exports=function(t){if("Function"===r(t))return i(t)}},1907:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype,o=i.call,n=r&&i.bind.bind(o,o);t.exports=r?n:function(t){return function(){return o.apply(t,arguments)}}},1747:(t,e,s)=>{"use strict";var r=s(1010),i=s(2046);t.exports=function(t,e){var s=i[t+"Prototype"],o=s&&s[e];if(o)return o;var n=r[t],a=n&&n.prototype;return a&&a[e]}},5582:(t,e,s)=>{"use strict";var r=s(2046),i=s(1010),o=s(2250),n=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?n(r[t])||n(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},9367:(t,e,s)=>{"use strict";var r=s(2159),i=s(7136);t.exports=function(t,e){var s=t[e];return i(s)?void 0:r(s)}},1010:function(t,e,s){"use strict";var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof s.g&&s.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724:(t,e,s)=>{"use strict";var r=s(1907),i=s(9298),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3648:(t,e,s)=>{"use strict";var r=s(9447),i=s(8828),o=s(9552);t.exports=!r&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},6946:(t,e,s)=>{"use strict";var r=s(1907),i=s(8828),o=s(5807),n=Object,a=r("".split);t.exports=i((function(){return!n("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?a(t,""):n(t)}:n},2250:t=>{"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},7463:(t,e,s)=>{"use strict";var r=s(8828),i=s(2250),o=/#|\.prototype\./,n=function(t,e){var s=u[a(t)];return s===c||s!==l&&(i(e)?r(e):!!e)},a=n.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=n.data={},l=n.NATIVE="N",c=n.POLYFILL="P";t.exports=n},7136:t=>{"use strict";t.exports=function(t){return null==t}},6285:(t,e,s)=>{"use strict";var r=s(2250);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},7376:t=>{"use strict";t.exports=!0},2087:(t,e,s)=>{"use strict";var r=s(6285),i=s(5807),o=s(6264)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"===i(t))}},5594:(t,e,s)=>{"use strict";var r=s(5582),i=s(2250),o=s(8280),n=s(1175),a=Object;t.exports=n?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},575:(t,e,s)=>{"use strict";var r=s(3121);t.exports=function(t){return r(t.length)}},1176:t=>{"use strict";var e=Math.ceil,s=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?s:e)(r)}},2074:(t,e,s)=>{"use strict";var r=s(2087),i=TypeError;t.exports=function(t){if(r(t))throw new i("The method doesn't accept regular expressions");return t}},7213:(t,e,s)=>{"use strict";var r=s(1010),i=s(8828),o=s(1907),n=s(160),a=s(5993).trim,u=s(6395),l=o("".charAt),c=r.parseFloat,p=r.Symbol,h=p&&p.iterator,d=1/c(u+"-0")!=-1/0||h&&!i((function(){c(Object(h))}));t.exports=d?function(t){var e=a(n(t)),s=c(e);return 0===s&&"-"===l(e,0)?-0:s}:c},4284:(t,e,s)=>{"use strict";var r=s(9447),i=s(3648),o=s(8661),n=s(6624),a=s(470),u=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,p="enumerable",h="configurable",d="writable";e.f=r?o?function(t,e,s){if(n(t),e=a(e),n(s),"function"==typeof t&&"prototype"===e&&"value"in s&&d in s&&!s[d]){var r=c(t,e);r&&r[d]&&(t[e]=s.value,s={configurable:h in s?s[h]:r[h],enumerable:p in s?s[p]:r[p],writable:!1})}return l(t,e,s)}:l:function(t,e,s){if(n(t),e=a(e),n(s),i)try{return l(t,e,s)}catch(t){}if("get"in s||"set"in s)throw new u("Accessors not supported");return"value"in s&&(t[e]=s.value),t}},3846:(t,e,s)=>{"use strict";var r=s(9447),i=s(3930),o=s(2574),n=s(5817),a=s(7374),u=s(470),l=s(9724),c=s(3648),p=Object.getOwnPropertyDescriptor;e.f=r?p:function(t,e){if(t=a(t),e=u(e),c)try{return p(t,e)}catch(t){}if(l(t,e))return n(!i(o.f,t,e),t[e])}},8280:(t,e,s)=>{"use strict";var r=s(1907);t.exports=r({}.isPrototypeOf)},2574:(t,e)=>{"use strict";var s={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!s.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:s},581:(t,e,s)=>{"use strict";var r=s(3930),i=s(2250),o=s(6285),n=TypeError;t.exports=function(t,e){var s,a;if("string"===e&&i(s=t.toString)&&!o(a=r(s,t)))return a;if(i(s=t.valueOf)&&!o(a=r(s,t)))return a;if("string"!==e&&i(s=t.toString)&&!o(a=r(s,t)))return a;throw new n("Can't convert object to primitive value")}},2046:t=>{"use strict";t.exports={}},4239:(t,e,s)=>{"use strict";var r=s(7136),i=TypeError;t.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}},6128:(t,e,s)=>{"use strict";var r=s(7376),i=s(1010),o=s(2532),n="__core-js_shared__",a=t.exports=i[n]||o(n,{});(a.versions||(a.versions=[])).push({version:"3.37.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5816:(t,e,s)=>{"use strict";var r=s(6128);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},5993:(t,e,s)=>{"use strict";var r=s(1907),i=s(4239),o=s(160),n=s(6395),a=r("".replace),u=RegExp("^["+n+"]+"),l=RegExp("(^|[^"+n+"])["+n+"]+$"),c=function(t){return function(e){var s=o(i(e));return 1&t&&(s=a(s,u,"")),2&t&&(s=a(s,l,"$1")),s}};t.exports={start:c(1),end:c(2),trim:c(3)}},9846:(t,e,s)=>{"use strict";var r=s(5683),i=s(8828),o=s(1010).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},4849:(t,e,s)=>{"use strict";var r=s(5482),i=Math.max,o=Math.min;t.exports=function(t,e){var s=r(t);return s<0?i(s+e,0):o(s,e)}},7374:(t,e,s)=>{"use strict";var r=s(6946),i=s(4239);t.exports=function(t){return r(i(t))}},5482:(t,e,s)=>{"use strict";var r=s(1176);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},3121:(t,e,s)=>{"use strict";var r=s(5482),i=Math.min;t.exports=function(t){var e=r(t);return e>0?i(e,9007199254740991):0}},9298:(t,e,s)=>{"use strict";var r=s(4239),i=Object;t.exports=function(t){return i(r(t))}},6028:(t,e,s)=>{"use strict";var r=s(3930),i=s(6285),o=s(5594),n=s(9367),a=s(581),u=s(6264),l=TypeError,c=u("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var s,u=n(t,c);if(u){if(void 0===e&&(e="default"),s=r(u,t,e),!i(s)||o(s))return s;throw new l("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},470:(t,e,s)=>{"use strict";var r=s(6028),i=s(5594);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},2623:(t,e,s)=>{"use strict";var r={};r[s(6264)("toStringTag")]="z",t.exports="[object z]"===String(r)},160:(t,e,s)=>{"use strict";var r=s(3948),i=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},4640:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},6499:(t,e,s)=>{"use strict";var r=s(1907),i=0,o=Math.random(),n=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+n(++i+o,36)}},1175:(t,e,s)=>{"use strict";var r=s(9846);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:(t,e,s)=>{"use strict";var r=s(9447),i=s(8828);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},6264:(t,e,s)=>{"use strict";var r=s(1010),i=s(5816),o=s(9724),n=s(6499),a=s(9846),u=s(1175),l=r.Symbol,c=i("wks"),p=u?l.for||l:l&&l.withoutSetter||n;t.exports=function(t){return o(c,t)||(c[t]=a&&o(l,t)?l[t]:p("Symbol."+t)),c[t]}},6395:t=>{"use strict";t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},9748:(t,e,s)=>{"use strict";var r=s(1091),i=s(4436).includes,o=s(8828),n=s(2156);r({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("includes")},9502:(t,e,s)=>{"use strict";var r=s(1091),i=s(7213);r({global:!0,forced:parseFloat!==i},{parseFloat:i})},9770:(t,e,s)=>{"use strict";var r=s(1091),i=s(1907),o=s(2074),n=s(4239),a=s(160),u=s(5735),l=i("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~l(a(n(this)),a(o(t)),arguments.length>1?arguments[1]:void 0)}})},6343:(t,e,s)=>{"use strict";var r=s(6880);t.exports=r},6462:(t,e,s)=>{"use strict";var r=s(9929);t.exports=r}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var s=i[t]={exports:{}};return r[t].call(s.exports,s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var s in e)o.o(e,s)&&!o.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";o.r(n),o.d(n,{Account:()=>r,Counters:()=>p,Permissions:()=>i,Platform:()=>e,PlatformName:()=>s,Platforms:()=>l,ProductType:()=>t,Restrictions:()=>c,SessionStore:()=>x,User:()=>f});var t;!function(t){t.FREE="Free",t.DEVELOPER="Developer",t.MARKETING="Marketing",t.ENTERPRISE="Enterprise"}(t||(t={}));var e,s,r=function(t){var e,s,r,i,o,n,a,u,l,c,p,h,d,f,m,v,g,b,y,x,w,S,A,C,M;this.id=t.id,this.name=t.name,this.domain=t.domain,this.registrationDate=(S=t.registrationDate,A=(null==S?void 0:S.seconds)||0,C=(null==S?void 0:S.nanos)||0,new Date(1e3*A+C/1e6).toISOString()),this.hasActiveOrder=t.hasActiveOrder,this.billing={companyName:null===(e=t.billingAddress)||void 0===e?void 0:e.companyName,accountCompanyName:null===(s=t.billingAddress)||void 0===s?void 0:s.accountCompanyName,companyCountry:null===(r=t.billingAddress)||void 0===r?void 0:r.country,companyCountryCode:null===(i=t.billingAddress)||void 0===i?void 0:i.countryCode,companyState:null===(o=t.billingAddress)||void 0===o?void 0:o.state,companyStateCode:null===(n=t.billingAddress)||void 0===n?void 0:n.stateCode,companyCity:null===(a=t.billingAddress)||void 0===a?void 0:a.city,companyStreet:null===(u=t.billingAddress)||void 0===u?void 0:u.street,companyZip:null===(l=t.billingAddress)||void 0===l?void 0:l.zipCode,companyPhone:null===(c=t.billingAddress)||void 0===c?void 0:c.phone,companyVAT:null===(p=t.billingAddress)||void 0===p?void 0:p.vatNumber,companyNumber:null===(h=t.billingAddress)||void 0===h?void 0:h.companyNumber,primaryPersonFirstName:null===(d=t.billingAddress)||void 0===d?void 0:d.firstName,primaryPersonLastName:null===(f=t.billingAddress)||void 0===f?void 0:f.lastName,primaryPersonEmail:null===(m=t.billingAddress)||void 0===m?void 0:m.paymentEmail,secondaryPersonFirstName:null===(v=t.billingAddress)||void 0===v?void 0:v.secondaryPersonFirstName,secondaryPersonLastName:null===(g=t.billingAddress)||void 0===g?void 0:g.secondaryPersonLastName,secondaryPersonEmail:null===(b=t.billingAddress)||void 0===b?void 0:b.secondaryPersonEmail,industry:null===(y=t.billingAddress)||void 0===y?void 0:y.industry,department:null===(x=t.billingAddress)||void 0===x?void 0:x.department,additionalEmails:(M=null===(w=t.billingAddress)||void 0===w?void 0:w.additionalEmailsList,M?M.join(", "):"")},this.productType=t.productType,this.productName=t.restriction,this.isEnterprise=t.isEnterprise,this.expiryDate=t.expireDate,this.isFrozen=t.frozen,this.isDeviceLimitReached=t.isDeviceLimitReached,this.statistics={totalSubscribers:t.pushNotAvailableSubscribers+t.pushAvailableSubscribers,pushAvailableSubscribers:t.pushAvailableSubscribers,pushNotAvailableSubscribers:t.pushNotAvailableSubscribers,freeEmailsQuotaUpdateDate:t.freeEmailLimitUpdateDate,paidEmailsQuotaExpiryDate:t.paidEmailExpireDate},Object.freeze(this.billing),Object.freeze(this.statistics),Object.freeze(this)},i=function(t){this.hasSuperRights=t.aceSuperRight,this.canManageSubscription=t.aceManageSubscription,this.canManageAccessTokens=t.aceSeeApiAccess,this.canManageDomainsAndEmails=t.aceDomainAndEmailVerification,this.canManageSubUsers=t.aceManageUsers,this.canSeeApplications=t.aceSeeApplications,this.canModifyApplications=t.aceModifyApplications,this.canSeeApplicationGroups=t.aceSeeAppGroups,this.canModifyApplicationGroups=t.aceModifyAppGroups,this.canSeeMessages=t.aceSeeMessages,this.canModifyMessages=t.aceModifyMessages&&this.canSeeMessages,this.canSendMessages=t.aceSendMessages&&this.canSeeMessages,this.canSeeTags=t.aceSeeTags,this.canModifyTags=t.aceModifyTags,this.canSeeSegments=t.aceSeeFilters&&this.canSeeTags,this.canModifySegments=t.aceModifyFilters&&this.canSeeTags,this.canSeeRichMedia=t.aceSeeRichMedia&&this.canSeeTags&&this.canSeeSegments,this.canModifyRichMedia=t.aceModifyRichMedia&&this.canSeeTags&&this.canSeeSegments,this.canSeeInApps=this.canSeeTags&&this.canSeeSegments&&this.canSeeRichMedia,this.canSeeEmailTemplates=t.aceSeeEmailTemplates&&this.canSeeTags,this.canModifyEmailTemplates=t.aceModifyEmailTemplates&&this.canSeeTags,Object.freeze(this)},a=o(8628),u=o.n(a);!function(t){t[t.IOS=1]="IOS",t[t.ANDROID=3]="ANDROID",t[t.MAC_OS=7]="MAC_OS",t[t.WINDOWS=8]="WINDOWS",t[t.AMAZON=9]="AMAZON",t[t.SAFARI=10]="SAFARI",t[t.CHROME=11]="CHROME",t[t.FIREFOX=12]="FIREFOX",t[t.IE=13]="IE",t[t.EMAIL=14]="EMAIL",t[t.BAIDU=16]="BAIDU",t[t.HUAWEI=17]="HUAWEI",t[t.SMS=18]="SMS",t[t.XIAOMI=19]="XIAOMI",t[t.WHATSAPP=21]="WHATSAPP"}(e||(e={})),function(t){t.IOS="iOS",t.ANDROID="Android",t.MAC_OS="Mac OS",t.WINDOWS="Windows",t.AMAZON="Amazon",t.SAFARI="Safari",t.CHROME="Chrome",t.FIREFOX="Firefox",t.IE="Internet Explorer",t.EMAIL="Email",t.BAIDU="Baidu",t.HUAWEI="Huawei",t.SMS="SMS",t.XIAOMI="Xiaomi",t.WHATSAPP="WhatsApp"}(s||(s={}));var l=function(){function t(e){var s=this;this.checkIsAvailablePlatform=function(t){var e;return u()(e=s.available).call(e,t)},this.available=t.filterAllowPlatforms(e.allowedPlatformsList),Object.freeze(this)}return t.filterAllowPlatforms=function(t){var s=Object.values(e);return t.filter((function(t){return u()(s).call(s,t)}))},t.getPlatformName=function(t){var r=Object.keys(s).find((function(s){return e[s]===t}));return r?s[r]:"Unknown platform!"},t}(),c=function(t){var e=t.restrictions;this.allowUseSubUsers=e.maxusers>1,this.maxUsersCount=e.maxusers,this.allowUseBaiduAndroid=e.allowbaiduandroidplatformusage,this.maxDevicesCount=e.maxdevices,this.maxApplicationsCount=e.maxapps,this.maxApplicationGroupsCount=e.maxapplicationgroups,this.allowUseApplicationGroups=this.maxApplicationGroupsCount>1,this.maxCampaignsCount=e.maxcampaigns,this.allowUseCampaigns=this.maxCampaignsCount>1,this.maxTagsCount=e.maxtags,this.allowUseTags=this.maxTagsCount>0,this.allowUseUserSpecificTags=e.maxuserspecifictags>0,this.maxFiltersCount=e.maxfilters,this.maxFastFiltersCount=e.maxpreparedfilters,this.allowUseFilters=this.maxFiltersCount>0,this.allowUseFiltersCompiling=e.allowcompilefilter,this.allowUseFiltersWithTagNotSet=e.allowtagnotsetfilter,this.maxEventsCount=e.maxevents,this.allowUseEvents=this.maxEventsCount>0,this.maxRichMediaCount=e.maxrichmedia,this.allowUseRichMedia=this.maxRichMediaCount>0,this.maxInAppsCount=e.maxinapps,this.allowUseInApps=this.maxInAppsCount>0,this.maxMailsCount=e.maxverifyingemails,this.maxDomainsCount=e.maxverifyingdomains,this.maxEmailTemplatesCount=e.maxemailtemplates,this.allowUseEmailPlatform=this.maxEmailTemplatesCount>0,this.maxPresetsCount=e.maxpresets,this.allowUsePresets=this.maxPresetsCount>0,this.maxAutoPushesCount=e.maxautopushes,this.allowUseAutoPushes=this.maxAutoPushesCount>0,this.allowUseGeozones=e.allowgeozoneapi,this.allowUseSendToGeozones=e.allowsendtogeozone,this.maxGeozonesCount=e.maxgeozones,this.maxGeozoneRange=e.maxgeozonerange,this.minGeozoneRange=50,this.maxDeepLinksCount=e.maxdeeplinks,this.allowUseDeepLinks=this.maxDeepLinksCount>0,this.maxTwitterFeedsCount=e.maxtwitterfeeds,this.allowUseTwitterFeeds=this.maxTwitterFeedsCount>0,this.maxRssFeedsCount=e.maxrssfeeds,this.allowUseRssFeeds=this.maxRssFeedsCount>0,this.allowUseRssFeedsCustomPollingInterval=e.allowcustomrsspollinginterval,this.maxTestDevicesCount=e.maxtestdevices,this.allowUseTestDevices=this.maxTestDevicesCount>0,this.allowUseAccessTokens=e.allowapi,this.allowUseDataKeys=e.allowcustomdata,this.allowUseStatistics=e.allowstatsaccess,this.allowUseScheduling=e.allowscheduling,this.allowUseIOSAutoConfig=e.allowautoconfig,this.allowUseTwoFactorAuth=e.allowtwofactorauth,this.allowUseSendMessageByCsv=e.allowcsvmessage,this.allowUseAbTests=e.allowabtests,this.allowUseHtmlPages=!1,this.allowUseRemotePage=e.allowremotepage,this.allowUseIOSCategories=e.maxioscategories>0,this.allowUseGoalTracking=e.allowgoaltracking,this.allowUseGetMessageLog=e.allowapigetmessagelog,this.allowUseIEPlatform=e.allowieplatformusage,this.allowUseDebugMode=e.allowdebugmode,this.allowUseUninstallTracking=e.allowtrackuninstalls,this.allowUseFrequencyCapping=e.allowfrequencycapping,this.allowUseInbox=e.allowinbox,this.maxInboxTtlDays=e.maxinboxttldays,this.allowUseSendExternalAndroidStatistics=e.allowsendexternalstats,this.allowUseGDPR=e.allowgdpr,this.sendRateMin=e.minsendrate,this.sendRateMax=e.maxsendrate,this.messageHistoryStoriedPeriodInDays=e.messagehistorystoreperiod,this.allowShowDeliveryStatistics=e.allowshowdeliverystatistics,this.allowBestTimeToSend=e.allowbesttimetosend,this.allowSegmentsGroups=e.allowsegmentsgroups,this.allowEventSegmentation=e.alloweventsegmentation,this.allowCustomerJourney=e.allowcustomerjourney,this.allowEventsFunnel=e.alloweventsfunnel,this.isEnabledBackup=e.allowbackup,this.allowChannelsSection=e.allowchannelssection,this.allowUseSMSPlatform=e.allowcjsms,this.allowUseWhatsAppPlatform=e.allowwhatsapp,Object.freeze(this)},p=function(t){this.totalApplicationsCount=t.applicationsCount,this.totalApplicationGroupsCount=t.appGroupsCount,this.totalCampaignsCount=t.campaignsCount,this.totalTagsCount=t.tagsCount,this.totalFiltersCount=t.filtersCount,this.totalEventsCount=t.eventsCount,this.totalRichMediaCount=t.richMediaCount,this.totalInAppsCount=t.inAppsCount,this.totalDomainsCount=t.accountDomainsCount,this.totalMailsCount=t.accountMailsCount,this.totalEmailTemplatesCount=t.emailTemplatesCount,this.totalPresetsCount=t.presetsCount,this.totalAutoPushesCount=t.autoPushesCount,this.totalGeozonesCount=t.geoZonesCount,this.totalDeepLinksCount=t.deeplinksCount,this.totalRssFeedsCount=t.rssFeedsCount,this.totalTestDevicesCount=t.testDevicesCount},h=o(3981),d=o.n(h),f=function(t,e){this.name=e.username,this.email=e.email,this.isActive=e.isActive,this.isOwner=t.admin,this.timezone=e.timezone,this.timezoneOffset=60*d()(e.timezoneOffset),this.accountCount=e.accountsCount,this.intercomUserHash=e.intercomUserHash,this.isSubscribedForNewsletters=e.allowNewsletters,Object.freeze(this)},m=o(5652),v=o(3961),g=o(1157).rpcServiceClient.accounts,b=g.GetAuthInfoServiceClient,y=g.GetAuthInfoRequest,x=function(t){var e=this;this.updateSubject=function(t,s){e.subject.next({account:new r(t),counters:new p(t),platforms:new l(t),permissions:new i(t),restrictions:new c(t),user:new f(t,s)})},this.load=function(){return(0,m.__awaiter)(e,void 0,void 0,(function(){var t,e,s,r,i,o;return(0,m.__generator)(this,(function(n){switch(n.label){case 0:return t=this.grpcClient.createServiceClient(b),e=new y,[4,t.getAuthInfo(e,{})];case 1:return s=n.sent(),r=s.toObject(),i=r.account,o=r.user,[2,[i,o]]}}))}))},this.update=function(){return(0,m.__awaiter)(e,void 0,void 0,(function(){var t,e,s;return(0,m.__generator)(this,(function(r){switch(r.label){case 0:return[4,this.load()];case 1:return t=r.sent(),e=t[0],s=t[1],this.updateSubject(e,s),[2]}}))}))},this.subscribe=function(t){return e.subject.subscribe(t)},this.grpcClient=t,this.subject=new v.ReplaySubject(1)}})(),n})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tslib"),require("rxjs")):"function"==typeof define&&define.amd?define(["tslib","rxjs"],e):"object"==typeof exports?exports["@pushwoosh/session-store"]=e(require("tslib"),require("rxjs")):t["@pushwoosh/session-store"]=e(t.tslib,t.rxjs)}(self,((t,e)=>(()=>{var s={3961:t=>{"use strict";t.exports=e},5652:e=>{"use strict";e.exports=t},8628:(t,e,s)=>{t.exports=s(6343)},3981:(t,e,s)=>{t.exports=s(6462)},1362:(t,e,s)=>{"use strict";s(9748);var r=s(1747);t.exports=r("Array","includes")},6880:(t,e,s)=>{"use strict";var r=s(8280),i=s(1362),o=s(4378),n=Array.prototype,a=String.prototype;t.exports=function(t){var e=t.includes;return t===n||r(n,t)&&e===n.includes?i:"string"==typeof t||t===a||r(a,t)&&e===a.includes?o:e}},9929:(t,e,s)=>{"use strict";s(9502);var r=s(2046);t.exports=r.parseFloat},4378:(t,e,s)=>{"use strict";s(9770);var r=s(1747);t.exports=r("String","includes")},2159:(t,e,s)=>{"use strict";var r=s(2250),i=s(4640),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a function")}},2156:t=>{"use strict";t.exports=function(){}},6624:(t,e,s)=>{"use strict";var r=s(6285),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not an object")}},4436:(t,e,s)=>{"use strict";var r=s(7374),i=s(4849),o=s(575),n=function(t){return function(e,s,n){var a=r(e),u=o(a);if(0===u)return!t&&-1;var l,c=i(n,u);if(t&&s!=s){for(;u>c;)if((l=a[c++])!=l)return!0}else for(;u>c;c++)if((t||c in a)&&a[c]===s)return t||c||0;return!t&&-1}};t.exports={includes:n(!0),indexOf:n(!1)}},5807:(t,e,s)=>{"use strict";var r=s(1907),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},3948:(t,e,s)=>{"use strict";var r=s(2623),i=s(2250),o=s(5807),n=s(6264)("toStringTag"),a=Object,u="Arguments"===o(function(){return arguments}());t.exports=r?o:function(t){var e,s,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(s=function(t,e){try{return t[e]}catch(t){}}(e=a(t),n))?s:u?o(e):"Object"===(r=o(e))&&i(e.callee)?"Arguments":r}},5735:(t,e,s)=>{"use strict";var r=s(6264)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(s){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},1626:(t,e,s)=>{"use strict";var r=s(9447),i=s(4284),o=s(5817);t.exports=r?function(t,e,s){return i.f(t,e,o(1,s))}:function(t,e,s){return t[e]=s,t}},5817:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2532:(t,e,s)=>{"use strict";var r=s(5951),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(s){r[t]=e}return e}},9447:(t,e,s)=>{"use strict";var r=s(8828);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:(t,e,s)=>{"use strict";var r=s(5951),i=s(6285),o=r.document,n=i(o)&&i(o.createElement);t.exports=function(t){return n?o.createElement(t):{}}},6794:(t,e,s)=>{"use strict";var r=s(5951).navigator,i=r&&r.userAgent;t.exports=i?String(i):""},798:(t,e,s)=>{"use strict";var r,i,o=s(5951),n=s(6794),a=o.process,u=o.Deno,l=a&&a.versions||u&&u.version,c=l&&l.v8;c&&(i=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&n&&(!(r=n.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=n.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},1091:(t,e,s)=>{"use strict";var r=s(5951),i=s(6024),o=s(2361),n=s(2250),a=s(3846).f,u=s(7463),l=s(2046),c=s(8311),p=s(1626),h=s(9724);s(6128);var d=function(t){var e=function(s,r,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(s);case 2:return new t(s,r)}return new t(s,r,o)}return i(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var s,i,f,m,v,g,b,y,x,A=t.target,w=t.global,S=t.stat,C=t.proto,M=w?r:S?r[A]:r[A]&&r[A].prototype,E=w?l:l[A]||p(l,A,{})[A],T=E.prototype;for(m in e)i=!(s=u(w?m:A+(S?".":"#")+m,t.forced))&&M&&h(M,m),g=E[m],i&&(b=t.dontCallGetSet?(x=a(M,m))&&x.value:M[m]),v=i&&b?b:e[m],(s||C||typeof g!=typeof v)&&(y=t.bind&&i?c(v,r):t.wrap&&i?d(v):C&&n(v)?o(v):v,(t.sham||v&&v.sham||g&&g.sham)&&p(y,"sham",!0),p(E,m,y),C&&(h(l,f=A+"Prototype")||p(l,f,{}),p(l[f],m,v),t.real&&T&&(s||!T[m])&&p(T,m,v)))}},8828:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},6024:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype,o=i.apply,n=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?n.bind(o):function(){return n.apply(o,arguments)})},8311:(t,e,s)=>{"use strict";var r=s(2361),i=s(2159),o=s(1505),n=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?n(t,e):function(){return t.apply(e,arguments)}}},1505:(t,e,s)=>{"use strict";var r=s(8828);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},3930:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},2361:(t,e,s)=>{"use strict";var r=s(5807),i=s(1907);t.exports=function(t){if("Function"===r(t))return i(t)}},1907:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype,o=i.call,n=r&&i.bind.bind(o,o);t.exports=r?n:function(t){return function(){return o.apply(t,arguments)}}},1747:(t,e,s)=>{"use strict";var r=s(5951),i=s(2046);t.exports=function(t,e){var s=i[t+"Prototype"],o=s&&s[e];if(o)return o;var n=r[t],a=n&&n.prototype;return a&&a[e]}},5582:(t,e,s)=>{"use strict";var r=s(2046),i=s(5951),o=s(2250),n=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?n(r[t])||n(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},9367:(t,e,s)=>{"use strict";var r=s(2159),i=s(7136);t.exports=function(t,e){var s=t[e];return i(s)?void 0:r(s)}},5951:function(t,e,s){"use strict";var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof s.g&&s.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724:(t,e,s)=>{"use strict";var r=s(1907),i=s(9298),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3648:(t,e,s)=>{"use strict";var r=s(9447),i=s(8828),o=s(9552);t.exports=!r&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},6946:(t,e,s)=>{"use strict";var r=s(1907),i=s(8828),o=s(5807),n=Object,a=r("".split);t.exports=i((function(){return!n("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?a(t,""):n(t)}:n},2250:t=>{"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},7463:(t,e,s)=>{"use strict";var r=s(8828),i=s(2250),o=/#|\.prototype\./,n=function(t,e){var s=u[a(t)];return s===c||s!==l&&(i(e)?r(e):!!e)},a=n.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=n.data={},l=n.NATIVE="N",c=n.POLYFILL="P";t.exports=n},7136:t=>{"use strict";t.exports=function(t){return null==t}},6285:(t,e,s)=>{"use strict";var r=s(2250);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},7376:t=>{"use strict";t.exports=!0},2087:(t,e,s)=>{"use strict";var r=s(6285),i=s(5807),o=s(6264)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"===i(t))}},5594:(t,e,s)=>{"use strict";var r=s(5582),i=s(2250),o=s(8280),n=s(1175),a=Object;t.exports=n?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},575:(t,e,s)=>{"use strict";var r=s(3121);t.exports=function(t){return r(t.length)}},1176:t=>{"use strict";var e=Math.ceil,s=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?s:e)(r)}},2074:(t,e,s)=>{"use strict";var r=s(2087),i=TypeError;t.exports=function(t){if(r(t))throw new i("The method doesn't accept regular expressions");return t}},7213:(t,e,s)=>{"use strict";var r=s(5951),i=s(8828),o=s(1907),n=s(160),a=s(5993).trim,u=s(6395),l=o("".charAt),c=r.parseFloat,p=r.Symbol,h=p&&p.iterator,d=1/c(u+"-0")!=-1/0||h&&!i((function(){c(Object(h))}));t.exports=d?function(t){var e=a(n(t)),s=c(e);return 0===s&&"-"===l(e,0)?-0:s}:c},4284:(t,e,s)=>{"use strict";var r=s(9447),i=s(3648),o=s(8661),n=s(6624),a=s(470),u=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,p="enumerable",h="configurable",d="writable";e.f=r?o?function(t,e,s){if(n(t),e=a(e),n(s),"function"==typeof t&&"prototype"===e&&"value"in s&&d in s&&!s[d]){var r=c(t,e);r&&r[d]&&(t[e]=s.value,s={configurable:h in s?s[h]:r[h],enumerable:p in s?s[p]:r[p],writable:!1})}return l(t,e,s)}:l:function(t,e,s){if(n(t),e=a(e),n(s),i)try{return l(t,e,s)}catch(t){}if("get"in s||"set"in s)throw new u("Accessors not supported");return"value"in s&&(t[e]=s.value),t}},3846:(t,e,s)=>{"use strict";var r=s(9447),i=s(3930),o=s(2574),n=s(5817),a=s(7374),u=s(470),l=s(9724),c=s(3648),p=Object.getOwnPropertyDescriptor;e.f=r?p:function(t,e){if(t=a(t),e=u(e),c)try{return p(t,e)}catch(t){}if(l(t,e))return n(!i(o.f,t,e),t[e])}},8280:(t,e,s)=>{"use strict";var r=s(1907);t.exports=r({}.isPrototypeOf)},2574:(t,e)=>{"use strict";var s={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!s.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:s},581:(t,e,s)=>{"use strict";var r=s(3930),i=s(2250),o=s(6285),n=TypeError;t.exports=function(t,e){var s,a;if("string"===e&&i(s=t.toString)&&!o(a=r(s,t)))return a;if(i(s=t.valueOf)&&!o(a=r(s,t)))return a;if("string"!==e&&i(s=t.toString)&&!o(a=r(s,t)))return a;throw new n("Can't convert object to primitive value")}},2046:t=>{"use strict";t.exports={}},4239:(t,e,s)=>{"use strict";var r=s(7136),i=TypeError;t.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}},6128:(t,e,s)=>{"use strict";var r=s(7376),i=s(5951),o=s(2532),n="__core-js_shared__",a=t.exports=i[n]||o(n,{});(a.versions||(a.versions=[])).push({version:"3.39.0",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5816:(t,e,s)=>{"use strict";var r=s(6128);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},5993:(t,e,s)=>{"use strict";var r=s(1907),i=s(4239),o=s(160),n=s(6395),a=r("".replace),u=RegExp("^["+n+"]+"),l=RegExp("(^|[^"+n+"])["+n+"]+$"),c=function(t){return function(e){var s=o(i(e));return 1&t&&(s=a(s,u,"")),2&t&&(s=a(s,l,"$1")),s}};t.exports={start:c(1),end:c(2),trim:c(3)}},9846:(t,e,s)=>{"use strict";var r=s(798),i=s(8828),o=s(5951).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},4849:(t,e,s)=>{"use strict";var r=s(5482),i=Math.max,o=Math.min;t.exports=function(t,e){var s=r(t);return s<0?i(s+e,0):o(s,e)}},7374:(t,e,s)=>{"use strict";var r=s(6946),i=s(4239);t.exports=function(t){return r(i(t))}},5482:(t,e,s)=>{"use strict";var r=s(1176);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},3121:(t,e,s)=>{"use strict";var r=s(5482),i=Math.min;t.exports=function(t){var e=r(t);return e>0?i(e,9007199254740991):0}},9298:(t,e,s)=>{"use strict";var r=s(4239),i=Object;t.exports=function(t){return i(r(t))}},6028:(t,e,s)=>{"use strict";var r=s(3930),i=s(6285),o=s(5594),n=s(9367),a=s(581),u=s(6264),l=TypeError,c=u("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var s,u=n(t,c);if(u){if(void 0===e&&(e="default"),s=r(u,t,e),!i(s)||o(s))return s;throw new l("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},470:(t,e,s)=>{"use strict";var r=s(6028),i=s(5594);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},2623:(t,e,s)=>{"use strict";var r={};r[s(6264)("toStringTag")]="z",t.exports="[object z]"===String(r)},160:(t,e,s)=>{"use strict";var r=s(3948),i=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},4640:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},6499:(t,e,s)=>{"use strict";var r=s(1907),i=0,o=Math.random(),n=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+n(++i+o,36)}},1175:(t,e,s)=>{"use strict";var r=s(9846);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:(t,e,s)=>{"use strict";var r=s(9447),i=s(8828);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},6264:(t,e,s)=>{"use strict";var r=s(5951),i=s(5816),o=s(9724),n=s(6499),a=s(9846),u=s(1175),l=r.Symbol,c=i("wks"),p=u?l.for||l:l&&l.withoutSetter||n;t.exports=function(t){return o(c,t)||(c[t]=a&&o(l,t)?l[t]:p("Symbol."+t)),c[t]}},6395:t=>{"use strict";t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},9748:(t,e,s)=>{"use strict";var r=s(1091),i=s(4436).includes,o=s(8828),n=s(2156);r({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("includes")},9502:(t,e,s)=>{"use strict";var r=s(1091),i=s(7213);r({global:!0,forced:parseFloat!==i},{parseFloat:i})},9770:(t,e,s)=>{"use strict";var r=s(1091),i=s(1907),o=s(2074),n=s(4239),a=s(160),u=s(5735),l=i("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~l(a(n(this)),a(o(t)),arguments.length>1?arguments[1]:void 0)}})},6343:(t,e,s)=>{"use strict";var r=s(6880);t.exports=r},6462:(t,e,s)=>{"use strict";var r=s(9929);t.exports=r}},r={};function i(t){var e=r[t];if(void 0!==e)return e.exports;var o=r[t]={exports:{}};return s[t].call(o.exports,o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{"use strict";i.r(o),i.d(o,{Account:()=>r,Counters:()=>p,Permissions:()=>n,Platform:()=>e,PlatformName:()=>s,Platforms:()=>l,ProductType:()=>t,Restrictions:()=>c,SessionStore:()=>g,User:()=>f});var t;!function(t){t.FREE="Free",t.DEVELOPER="Developer",t.MARKETING="Marketing",t.ENTERPRISE="Enterprise"}(t||(t={}));var e,s,r=function(t){var e,s,r,i,o,n,a,u,l,c,p,h,d,f,m,v,g,b,y,x,A;this.id=t.id,this.name=t.name,this.domain=t.domain,this.registrationDate=t.registrationDate,this.hasActiveOrder=t.hasActiveOrder,this.billing={companyName:null===(e=t.billingAddress)||void 0===e?void 0:e.companyName,accountCompanyName:null===(s=t.billingAddress)||void 0===s?void 0:s.accountCompanyName,companyCountry:null===(r=t.billingAddress)||void 0===r?void 0:r.country,companyCountryCode:null===(i=t.billingAddress)||void 0===i?void 0:i.countryCode,companyState:null===(o=t.billingAddress)||void 0===o?void 0:o.state,companyStateCode:null===(n=t.billingAddress)||void 0===n?void 0:n.stateCode,companyCity:null===(a=t.billingAddress)||void 0===a?void 0:a.city,companyStreet:null===(u=t.billingAddress)||void 0===u?void 0:u.street,companyZip:null===(l=t.billingAddress)||void 0===l?void 0:l.zipCode,companyPhone:null===(c=t.billingAddress)||void 0===c?void 0:c.phone,companyVAT:null===(p=t.billingAddress)||void 0===p?void 0:p.vatNumber,companyNumber:null===(h=t.billingAddress)||void 0===h?void 0:h.companyNumber,primaryPersonFirstName:null===(d=t.billingAddress)||void 0===d?void 0:d.firstName,primaryPersonLastName:null===(f=t.billingAddress)||void 0===f?void 0:f.lastName,primaryPersonEmail:null===(m=t.billingAddress)||void 0===m?void 0:m.paymentEmail,secondaryPersonFirstName:null===(v=t.billingAddress)||void 0===v?void 0:v.secondaryPersonFirstName,secondaryPersonLastName:null===(g=t.billingAddress)||void 0===g?void 0:g.secondaryPersonLastName,secondaryPersonEmail:null===(b=t.billingAddress)||void 0===b?void 0:b.secondaryPersonEmail,industry:null===(y=t.billingAddress)||void 0===y?void 0:y.industry,department:null===(x=t.billingAddress)||void 0===x?void 0:x.department,additionalEmails:(A=t.billingAddress.additionalEmails,A?A.join(", "):"")},this.productType=t.productType,this.productName=t.restriction,this.isEnterprise=t.isEnterprise,this.expiryDate=t.expireDate,this.isFrozen=t.frozen,this.isDeviceLimitReached=t.isDeviceLimitReached,this.statistics={totalSubscribers:t.pushNotAvailableSubscribers+t.pushAvailableSubscribers,pushAvailableSubscribers:t.pushAvailableSubscribers,pushNotAvailableSubscribers:t.pushNotAvailableSubscribers,freeEmailsQuotaUpdateDate:t.freeEmailLimitUpdateDate,paidEmailsQuotaExpiryDate:t.paidEmailExpireDate},Object.freeze(this.billing),Object.freeze(this.statistics),Object.freeze(this)},n=function(t){this.hasSuperRights=t.aceSuperRight,this.canManageSubscription=t.aceManageSubscription,this.canManageAccessTokens=t.aceSeeApiAccess,this.canManageDomainsAndEmails=t.aceDomainAndEmailVerification,this.canManageSubUsers=t.aceManageUsers,this.canSeeApplications=t.aceSeeApplications,this.canModifyApplications=t.aceModifyApplications,this.canSeeApplicationGroups=t.aceSeeAppGroups,this.canModifyApplicationGroups=t.aceModifyAppGroups,this.canSeeMessages=t.aceSeeMessages,this.canModifyMessages=t.aceModifyMessages&&this.canSeeMessages,this.canSendMessages=t.aceSendMessages&&this.canSeeMessages,this.canSeeTags=t.aceSeeTags,this.canModifyTags=t.aceModifyTags,this.canSeeSegments=t.aceSeeFilters&&this.canSeeTags,this.canModifySegments=t.aceModifyFilters&&this.canSeeTags,this.canSeeRichMedia=t.aceSeeRichMedia&&this.canSeeTags&&this.canSeeSegments,this.canModifyRichMedia=t.aceModifyRichMedia&&this.canSeeTags&&this.canSeeSegments,this.canSeeInApps=this.canSeeTags&&this.canSeeSegments&&this.canSeeRichMedia,this.canSeeEmailTemplates=t.aceSeeEmailTemplates&&this.canSeeTags,this.canModifyEmailTemplates=t.aceModifyEmailTemplates&&this.canSeeTags,Object.freeze(this)},a=i(8628),u=i.n(a);!function(t){t[t.IOS=1]="IOS",t[t.ANDROID=3]="ANDROID",t[t.MAC_OS=7]="MAC_OS",t[t.WINDOWS=8]="WINDOWS",t[t.AMAZON=9]="AMAZON",t[t.SAFARI=10]="SAFARI",t[t.CHROME=11]="CHROME",t[t.FIREFOX=12]="FIREFOX",t[t.IE=13]="IE",t[t.EMAIL=14]="EMAIL",t[t.BAIDU=16]="BAIDU",t[t.HUAWEI=17]="HUAWEI",t[t.SMS=18]="SMS",t[t.XIAOMI=19]="XIAOMI",t[t.WHATSAPP=21]="WHATSAPP"}(e||(e={})),function(t){t.IOS="iOS",t.ANDROID="Android",t.MAC_OS="Mac OS",t.WINDOWS="Windows",t.AMAZON="Amazon",t.SAFARI="Safari",t.CHROME="Chrome",t.FIREFOX="Firefox",t.IE="Internet Explorer",t.EMAIL="Email",t.BAIDU="Baidu",t.HUAWEI="Huawei",t.SMS="SMS",t.XIAOMI="Xiaomi",t.WHATSAPP="WhatsApp"}(s||(s={}));var l=function(){function t(e){var s=this;this.checkIsAvailablePlatform=function(t){var e;return u()(e=s.available).call(e,t)},this.available=t.filterAllowPlatforms(e.allowedPlatforms),Object.freeze(this)}return t.filterAllowPlatforms=function(t){var s=Object.values(e);return t.filter((function(t){return u()(s).call(s,t)}))},t.getPlatformName=function(t){var r=Object.keys(s).find((function(s){return e[s]===t}));return r?s[r]:"Unknown platform!"},t}(),c=function(t){var e=t.restrictions;this.allowUseSubUsers=e.MaxUsers>1,this.maxUsersCount=e.MaxUsers,this.allowUseBaiduAndroid=e.AllowBaiduAndroidPlatformUsage,this.maxDevicesCount=e.MaxDevices,this.maxApplicationsCount=e.MaxApps,this.maxApplicationGroupsCount=e.MaxApplicationGroups,this.allowUseApplicationGroups=this.maxApplicationGroupsCount>1,this.maxCampaignsCount=e.MaxCampaigns,this.allowUseCampaigns=this.maxCampaignsCount>1,this.maxTagsCount=e.MaxTags,this.allowUseTags=this.maxTagsCount>0,this.allowUseUserSpecificTags=e.MaxUserSpecificTags>0,this.maxFiltersCount=e.MaxFilters,this.maxFastFiltersCount=e.MaxPreparedFilters,this.allowUseFilters=this.maxFiltersCount>0,this.allowUseFiltersCompiling=e.AllowCompileFilter,this.allowUseFiltersWithTagNotSet=e.AllowTagNotSetFilter,this.maxEventsCount=e.MaxEvents,this.allowUseEvents=this.maxEventsCount>0,this.maxRichMediaCount=e.MaxRichmedia,this.allowUseRichMedia=this.maxRichMediaCount>0,this.maxInAppsCount=e.MaxInapps,this.allowUseInApps=this.maxInAppsCount>0,this.maxMailsCount=e.MaxVerifyingEmails,this.maxDomainsCount=e.MaxVerifyingDomains,this.maxEmailTemplatesCount=e.MaxEmailTemplates,this.allowUseEmailPlatform=this.maxEmailTemplatesCount>0,this.maxPresetsCount=e.MaxPresets,this.allowUsePresets=this.maxPresetsCount>0,this.maxAutoPushesCount=e.MaxAutoPushes,this.allowUseAutoPushes=this.maxAutoPushesCount>0,this.allowUseGeozones=e.AllowGeozoneApi,this.allowUseSendToGeozones=e.AllowSendToGeozone,this.maxGeozonesCount=e.MaxGeozones,this.maxGeozoneRange=e.MaxGeozoneRange,this.minGeozoneRange=50,this.maxDeepLinksCount=e.MaxDeeplinks,this.allowUseDeepLinks=this.maxDeepLinksCount>0,this.maxTwitterFeedsCount=e.MaxTwitterFeeds,this.allowUseTwitterFeeds=this.maxTwitterFeedsCount>0,this.maxRssFeedsCount=e.MaxRssFeeds,this.allowUseRssFeeds=this.maxRssFeedsCount>0,this.allowUseRssFeedsCustomPollingInterval=e.AllowCustomRssPollingInterval,this.maxTestDevicesCount=e.MaxTestDevices,this.allowUseTestDevices=this.maxTestDevicesCount>0,this.allowUseAccessTokens=e.AllowApi,this.allowUseDataKeys=e.AllowCustomData,this.allowUseStatistics=e.AllowStatsAccess,this.allowUseScheduling=e.AllowScheduling,this.allowUseIOSAutoConfig=e.AllowAutoConfig,this.allowUseTwoFactorAuth=e.AllowTwoFactorAuth,this.allowUseSendMessageByCsv=e.AllowCsvMessage,this.allowUseAbTests=e.AllowABTests,this.allowUseHtmlPages=!1,this.allowUseRemotePage=e.AllowRemotePage,this.allowUseIOSCategories=e.MaxIOSCategories>0,this.allowUseGoalTracking=e.AllowGoalTracking,this.allowUseGetMessageLog=e.AllowApiGetMessageLog,this.allowUseIEPlatform=e.AllowIePlatformUsage,this.allowUseDebugMode=e.AllowDebugMode,this.allowUseUninstallTracking=e.AllowTrackUninstalls,this.allowUseFrequencyCapping=e.AllowFrequencyCapping,this.allowUseInbox=e.AllowInbox,this.maxInboxTtlDays=e.MaxInboxTtlDays,this.allowUseSendExternalAndroidStatistics=e.AllowSendExternalStats,this.allowUseGDPR=e.AllowGdpr,this.sendRateMin=e.MinSendRate,this.sendRateMax=e.MaxSendRate,this.messageHistoryStoriedPeriodInDays=e.MessageHistoryStorePeriod,this.allowShowDeliveryStatistics=e.AllowShowDeliveryStatistics,this.allowBestTimeToSend=e.AllowBestTimeToSend,this.allowSegmentsGroups=e.AllowSegmentsGroups,this.allowEventSegmentation=e.AllowEventSegmentation,this.allowCustomerJourney=e.AllowCustomerJourney,this.allowEventsFunnel=e.AllowEventsFunnel,this.isEnabledBackup=e.AllowBackup,this.allowChannelsSection=e.AllowChannelsSection,this.allowUseSMSPlatform=e.AllowCjSMS,this.allowUseWhatsAppPlatform=e.AllowWhatsApp,Object.freeze(this)},p=function(t){this.totalApplicationsCount=t.applicationsCount,this.totalApplicationGroupsCount=t.appGroupsCount,this.totalCampaignsCount=t.campaignsCount,this.totalTagsCount=t.tagsCount,this.totalFiltersCount=t.filtersCount,this.totalEventsCount=t.eventsCount,this.totalRichMediaCount=t.richMediaCount,this.totalInAppsCount=t.inAppsCount,this.totalDomainsCount=t.accountDomainsCount,this.totalMailsCount=t.accountMailsCount,this.totalEmailTemplatesCount=t.emailTemplatesCount,this.totalPresetsCount=t.presetsCount,this.totalAutoPushesCount=t.autoPushesCount,this.totalGeozonesCount=t.geoZonesCount,this.totalDeepLinksCount=t.deeplinksCount,this.totalRssFeedsCount=t.rssFeedsCount,this.totalTestDevicesCount=t.testDevicesCount},h=i(3981),d=i.n(h),f=function(t,e){this.name=e.username,this.email=e.email,this.isActive=e.isActive,this.isOwner=t.admin,this.timezone=e.timezone,this.timezoneOffset=60*d()(e.timezoneOffset),this.accountCount=e.accountsCount,this.intercomUserHash=e.intercomUserHash,this.isSubscribedForNewsletters=e.allowNewsletters,Object.freeze(this)},m=i(5652),v=i(3961),g=function(t){var e=this;this.updateSubject=function(t,s){var i={account:new r(t),counters:new p(t),platforms:new l(t),permissions:new n(t),restrictions:new c(t),user:new f(t,s)};e.lastSession=i,e.subject.next(i)},this.load=function(){return(0,m.__awaiter)(e,void 0,void 0,(function(){var t,e,s;return(0,m.__generator)(this,(function(r){switch(r.label){case 0:return[4,this.rpcGateway.getAuthInfo.GetAuthInfo({})];case 1:return t=r.sent(),e=t.account,s=t.user,[2,[e,s]]}}))}))},this.update=function(){return(0,m.__awaiter)(e,void 0,void 0,(function(){var t,e,s;return(0,m.__generator)(this,(function(r){switch(r.label){case 0:return[4,this.load()];case 1:return t=r.sent(),e=t[0],s=t[1],this.updateSubject(e,s),[2]}}))}))},this.subscribe=function(t){return e.subject.subscribe(t)},this.getLastSession=function(){return e.lastSession},this.rpcGateway=t,this.subject=new v.ReplaySubject(1)}})(),o})()));
|
|
2
2
|
//# sourceMappingURL=index.js.map
|