jmapcloud-ng-core-types 1.0.43 → 1.0.45

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/all-enums.ts CHANGED
@@ -314,3 +314,5 @@ export const ALL_ROLES: ROLES[] = [
314
314
  ]
315
315
 
316
316
  export const ALL_MEMBER_ROLES: MEMBER_ROLES[] = [ROLES.ORG_ADMIN, ROLES.ORG_EDITOR, ROLES.ORG_VIEWER]
317
+
318
+ export const ALL_EMPTY_VALUES: JEMPTY_VALUES[] = [JEMPTY_VALUES.PROJECT_ID, JEMPTY_VALUES.TOKEN, JEMPTY_VALUES.UUID]
package/index.ts CHANGED
@@ -562,6 +562,8 @@ export interface JQueryState {
562
562
 
563
563
  export interface JUserState extends JTokenInfo {
564
564
  isAnonymous: boolean
565
+ anonymousOrganizationId: string
566
+ anonymousProjectId: JId
565
567
  isLoggingIn: boolean
566
568
  isLoggingIntoOrganization: boolean
567
569
  isReloadingSession: boolean
@@ -958,6 +960,8 @@ export interface JUserService {
958
960
  loginWithIdentityProvider(providerId: string): void
959
961
  logout(): Promise<void>
960
962
  isLoggedIn(): boolean
963
+ isLoggedInOrAnonymous(): boolean
964
+ isAnonymous(): boolean
961
965
  getAllInfos(): JUserInfo[]
962
966
  addInfo(info: JUserInfo): void
963
967
  removeInfo(infoId: string): void
@@ -966,7 +970,6 @@ export interface JUserService {
966
970
  getMinimumPasswordLength(): number
967
971
  isPasswordCompliant(password: string): boolean
968
972
  getPasswordPolicyCompliance(password: string): JJMapPasswordPolicyCompliance
969
- isPseudoUser(): boolean
970
973
  getOrganizationId(): string
971
974
  }
972
975
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmapcloud-ng-core-types",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "description": "JMap Cloud specific version of JMap Cloud NG Core types and interfaces",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/public/core.d.ts CHANGED
@@ -6485,6 +6485,33 @@ declare namespace JMap {
6485
6485
  */
6486
6486
  function isLoggedIn(): boolean
6487
6487
 
6488
+ /**
6489
+ * ***JMap.User.isLoggedInOrAnonymous***
6490
+ *
6491
+ * Returns true if a user is logged in, or connected to a public JMap Cloud project.
6492
+ *
6493
+ * If this method returns true, it basically means that data request can be made on JMap Cloud.
6494
+ *
6495
+ * @example
6496
+ * ```ts
6497
+ * // returns true if a user is logged in, or connected to a public JMap Cloud project
6498
+ * JMap.User.isLoggedInOrAnonymous()
6499
+ * ```
6500
+ */
6501
+ function isLoggedInOrAnonymous(): boolean
6502
+
6503
+ /**
6504
+ * ***JMap.User.isAnonymous***
6505
+ *
6506
+ * Returns true if NG is connected to a public JMap Cloud project.
6507
+ *
6508
+ * @example
6509
+ * ```ts
6510
+ * // returns true if NG is connected to a public JMap Cloud project
6511
+ * JMap.User.isAnonymous()
6512
+ * ```
6513
+ */
6514
+ function isAnonymous(): boolean
6488
6515
  /**
6489
6516
  * **JMap.User.setToken**
6490
6517
  *
@@ -6682,19 +6709,6 @@ declare namespace JMap {
6682
6709
  */
6683
6710
  function getPasswordPolicyCompliance(password: string): JJMapPasswordPolicyCompliance
6684
6711
 
6685
- /**
6686
- * ***JMap.User.isPseudoUser***
6687
- *
6688
- * Returns true if the currently logged in user is a JMap pseudo user (ex: system, anonymous, etc...).
6689
- *
6690
- * @example
6691
- * ```ts
6692
- * // returns true if current user is a pseudo user
6693
- * JMap.User.isPseudoUser()
6694
- * ```
6695
- */
6696
- function isPseudoUser(): boolean
6697
-
6698
6712
  /**
6699
6713
  * ***JMap.User.getOrganizationId***
6700
6714
  *
@@ -1,3 +1,10 @@
1
+ // ALL_EMPTY_VALUES in all-enum.ts
2
+ declare const enum JEMPTY_VALUES {
3
+ PROJECT_ID = -1,
4
+ TOKEN = "-1",
5
+ UUID = "00000000-0000-0000-0000-000000000000"
6
+ }
7
+
1
8
  // ALL_OPERATING_SYSTEMS in all-enum.ts
2
9
  declare const enum JOPERATING_SYSTEMS {
3
10
  UNKNOWN = "",