jmapcloud-ng-core-types 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/all-enums.ts CHANGED
@@ -278,13 +278,7 @@ export const ALL_MAP_RASTER_SCHEME_TYPES: JMAP_RASTER_SCHEME_TYPES[] = [
278
278
  JMAP_RASTER_SCHEME_TYPES.XYZ
279
279
  ]
280
280
 
281
- export const ALL_SERVER_TYPES: JSERVER_TYPES[] = [JSERVER_TYPES.LEGACY, JSERVER_TYPES.SAAS]
282
-
283
- export const ALL_SERVER_SAAS_STATUS: JSERVER_SAAS_STATUS[] = [
284
- JSERVER_SAAS_STATUS.STARTING,
285
- JSERVER_SAAS_STATUS.UP,
286
- JSERVER_SAAS_STATUS.DOWN
287
- ]
281
+ export const ALL_SERVER_STATUS: JSERVER_STATUS[] = [JSERVER_STATUS.STARTING, JSERVER_STATUS.UP, JSERVER_STATUS.DOWN]
288
282
 
289
283
  export const ALL_JORGANIZATION_EXTERNAL_API_KEY_TYPES: JORGANIZATION_EXTERNAL_API_KEY_TYPES[] = [
290
284
  JORGANIZATION_EXTERNAL_API_KEY_TYPES.MAPBOX_ACCESS_TOKEN
package/index.ts CHANGED
@@ -181,7 +181,6 @@ export interface JGeolocationService {
181
181
  }
182
182
 
183
183
  export interface JQueryService {
184
- initializeQueryFormById(layerId: JId, queryId: string): Promise<JQuery>
185
184
  getAllGroups(): JQueryGroup[]
186
185
  groupExist(groupId: JId): boolean
187
186
  getQueriesByLayerId(layerId: JId): JQuery[]
@@ -935,9 +934,7 @@ export interface JUserService {
935
934
  changeFullName(newFullName: string): Promise<void>
936
935
  getMinimumPasswordLength(): number
937
936
  isPasswordCompliant(password: string): boolean
938
- getPasswordPolicyCompliance(
939
- password: string
940
- ): JJMapServerPasswordPolicyCompliance | JJMapCloudPasswordPolicyCompliance
937
+ getPasswordPolicyCompliance(password: string): JJMapPasswordPolicyCompliance
941
938
  isPseudoUser(): boolean
942
939
  getOrganizationId(): string
943
940
  }
@@ -980,10 +977,8 @@ export interface JExtensionService {
980
977
  export interface JServerService {
981
978
  isReady(): boolean
982
979
  getVersion(): JServerVersion
983
- getType(): JSERVER_TYPES
984
- isSaas(): boolean
985
- isLegacy(): boolean
986
- getMinimumVersion(): JMinimumServerVersion
980
+ //TODO: JIRA JMAP8-1655
981
+ getMinimumVersion(): JServerVersion
987
982
  isMinimumVersionRespected(serverInfo?: JServerInfo): boolean
988
983
  getShortVersion(): string
989
984
  isStandardLoginAvailable(): boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmapcloud-ng-core-types",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
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
@@ -129,61 +129,6 @@ declare namespace JMap {
129
129
  */
130
130
  function getVersion(): JServerVersion
131
131
 
132
- /**
133
- * **JMap.Server.getType**
134
- *
135
- * Returns the server type.
136
- *
137
- * @throws if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.
138
- * @example ```ts
139
- *
140
- * // display the server type, "legacy" (JMap 7) or "saas" (JMap Cloud)
141
- * console.log(`Server type is "${JMap.Server.getType()}"`)
142
- * ```
143
- */
144
- function getType(): JSERVER_TYPES
145
-
146
- /**
147
- * **JMap.Server.isSaas**
148
- *
149
- * Returns true if the server is a JMap Cloud instance.
150
- *
151
- * @throws if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.
152
- * @example ```ts
153
- *
154
- * // display the type of server
155
- * console.log(`Server type is "${JMap.Server.isSaas() ? 'JMap Cloud' : 'JMap 7'}"`)
156
- * ```
157
- */
158
- function isSaas(): boolean
159
-
160
- /**
161
- * **JMap.Server.isLegacy**
162
- *
163
- * Returns true if the server is a JMap 7 instance.
164
- *
165
- * @throws if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.
166
- * @example ```ts
167
- *
168
- * // display the type of server
169
- * console.log(`Server type is "${JMap.Server.isLegacy() ? 'JMap 7' : 'JMap Cloud'}"`)
170
- * ```
171
- */
172
- function isLegacy(): boolean
173
-
174
- /**
175
- * **JMap.Server.getMinimumVersion**
176
- *
177
- * Returns the minimum server version required by NG to work fine.
178
- *
179
- * @throws if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.
180
- * @example ```ts
181
- *
182
- * // returns the minimum server version required by NG to work fine
183
- * JMap.Server.getMinimumVersion()
184
- * ```
185
- */
186
- function getMinimumVersion(): JMinimumServerVersion
187
132
 
188
133
  /**
189
134
  * **JMap.Server.isMinimumVersionRespected**
@@ -6512,7 +6457,7 @@ declare namespace JMap {
6512
6457
  /**
6513
6458
  * ***JMap.User.getPasswordPolicyCompliance***
6514
6459
  *
6515
- * Returns an object describing the password compliance with the platform's password policy (JMap Server or JMap Cloud)
6460
+ * Returns an object describing the password compliance with the platform's password policy ( JMap Cloud)
6516
6461
  *
6517
6462
  * @example ```ts
6518
6463
  *
@@ -6531,7 +6476,7 @@ declare namespace JMap {
6531
6476
  */
6532
6477
  function getPasswordPolicyCompliance(
6533
6478
  password: string
6534
- ): JJMapServerPasswordPolicyCompliance | JJMapCloudPasswordPolicyCompliance
6479
+ ): JJMapPasswordPolicyCompliance
6535
6480
 
6536
6481
  /**
6537
6482
  * ***JMap.User.isPseudoUser***
@@ -1,11 +1,5 @@
1
- // ALL_SERVER_TYPES in all-enum.ts
2
- declare const enum JSERVER_TYPES {
3
- LEGACY = "legacy",
4
- SAAS = "saas"
5
- }
6
-
7
1
  // ALL_SERVER_SAAS_STATUS in all-enum.ts
8
- declare const enum JSERVER_SAAS_STATUS {
2
+ declare const enum JSERVER_STATUS {
9
3
  STARTING = "STARTING",
10
4
  UP = "UP",
11
5
  DOWN = "DOWN"
@@ -21,23 +15,22 @@ declare interface JServerIdentityProviderById {
21
15
  [id: string]: JServerAnyIdentityProvider
22
16
  }
23
17
 
24
- declare interface JServerSaasServiceById {
25
- [id: string]: JServerSaasService
18
+ declare interface JServerServiceById {
19
+ [id: string]: JServerService
26
20
  }
27
21
 
28
22
  declare interface JServerInfo {
29
23
  identityProviderById: JServerIdentityProviderById
30
24
  standardLoginAvailable: boolean
31
25
  version: JServerVersion
32
- type: JSERVER_TYPES
33
- saasServiceById?: JServerSaasServiceById
26
+ serviceById?: JServerServiceById
34
27
  }
35
28
 
36
- declare interface JServerSaasService {
29
+ declare interface JServerService {
37
30
  id: string
38
31
  name: string
39
32
  version: string
40
- status: JSERVER_SAAS_STATUS
33
+ status: JSERVER_STATUS
41
34
  restBaseUrl: string
42
35
  }
43
36
 
@@ -68,11 +61,6 @@ declare interface JServerVersion {
68
61
  buildNumber: number
69
62
  }
70
63
 
71
- declare interface JMinimumServerVersion {
72
- legacy: JServerVersion
73
- saas: JServerVersion
74
- }
75
-
76
64
  declare interface JServerInfoReadyEventParams {
77
65
  serverInfo: JServerInfo
78
66
  isMinimumVersionRespected: boolean
@@ -79,15 +79,12 @@ declare interface JOrganizationExternalApiKey {
79
79
  type: JORGANIZATION_EXTERNAL_API_KEY_TYPES
80
80
  }
81
81
 
82
- declare interface JJMapServerPasswordPolicyCompliance {
83
- hasMinimumLength: boolean
84
- }
85
-
86
- declare interface JJMapCloudPasswordPolicyCompliance extends JJMapServerPasswordPolicyCompliance {
82
+ declare interface JJMapPasswordPolicyCompliance {
87
83
  hasLowercaseLetters: boolean
88
84
  hasUppercaseLetters: boolean
89
85
  hasNumbers: boolean
90
86
  hasSpecialCharacters: boolean
87
+ hasMinimumLength: boolean
91
88
  }
92
89
 
93
90
  // ALL_JORGANIZATION_EXTERNAL_API_KEY_TYPES in all-enum.ts