jmapcloud-ng-core-types 1.0.3 → 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 +1 -7
- package/index.ts +8 -8
- package/package.json +1 -1
- package/public/core.d.ts +48 -57
- package/public/jmap/server.d.ts +6 -18
- package/public/jmap/user.d.ts +2 -5
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
|
|
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[]
|
|
@@ -501,6 +500,8 @@ export interface JMapState {
|
|
|
501
500
|
scaleControlPosition: JMAP_POSITIONS
|
|
502
501
|
distanceUnit: JMAP_DISTANCE_UNITS
|
|
503
502
|
isNavigationHistoryControlVisible: boolean
|
|
503
|
+
isTerrainAvailable: boolean
|
|
504
|
+
isTerrainActive: boolean
|
|
504
505
|
isScaleControlVisible: boolean
|
|
505
506
|
isMapRotationControlVisible: boolean
|
|
506
507
|
isInfoControlVisible: boolean
|
|
@@ -691,6 +692,9 @@ export interface JMapService {
|
|
|
691
692
|
getZoom(): number
|
|
692
693
|
getMaplibreSourceIdByJMapLayerId(layerId: JId): string
|
|
693
694
|
isScaleControlVisible(): boolean
|
|
695
|
+
isTerrainAvailable(): boolean
|
|
696
|
+
isTerrainActive(): boolean
|
|
697
|
+
setTerrainActive(active: boolean): void
|
|
694
698
|
setScaleControlVisibility(isVisible: boolean, position?: JMAP_POSITIONS): void
|
|
695
699
|
setScaleControlUnits(units: "imperial" | "metric" | "nautical"): void
|
|
696
700
|
setScaleControlPosition(position: JMAP_POSITIONS): void
|
|
@@ -930,9 +934,7 @@ export interface JUserService {
|
|
|
930
934
|
changeFullName(newFullName: string): Promise<void>
|
|
931
935
|
getMinimumPasswordLength(): number
|
|
932
936
|
isPasswordCompliant(password: string): boolean
|
|
933
|
-
getPasswordPolicyCompliance(
|
|
934
|
-
password: string
|
|
935
|
-
): JJMapServerPasswordPolicyCompliance | JJMapCloudPasswordPolicyCompliance
|
|
937
|
+
getPasswordPolicyCompliance(password: string): JJMapPasswordPolicyCompliance
|
|
936
938
|
isPseudoUser(): boolean
|
|
937
939
|
getOrganizationId(): string
|
|
938
940
|
}
|
|
@@ -975,10 +977,8 @@ export interface JExtensionService {
|
|
|
975
977
|
export interface JServerService {
|
|
976
978
|
isReady(): boolean
|
|
977
979
|
getVersion(): JServerVersion
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
isLegacy(): boolean
|
|
981
|
-
getMinimumVersion(): JMinimumServerVersion
|
|
980
|
+
//TODO: JIRA JMAP8-1655
|
|
981
|
+
getMinimumVersion(): JServerVersion
|
|
982
982
|
isMinimumVersionRespected(serverInfo?: JServerInfo): boolean
|
|
983
983
|
getShortVersion(): string
|
|
984
984
|
isStandardLoginAvailable(): boolean
|
package/package.json
CHANGED
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**
|
|
@@ -3101,6 +3046,52 @@ declare namespace JMap {
|
|
|
3101
3046
|
*/
|
|
3102
3047
|
function isScaleControlVisible(): boolean
|
|
3103
3048
|
|
|
3049
|
+
/**
|
|
3050
|
+
* ***JMap.Map.isTerrainAvailable***
|
|
3051
|
+
*
|
|
3052
|
+
* Returns true if the map is associated with a terrain.
|
|
3053
|
+
*
|
|
3054
|
+
* @example ```ts
|
|
3055
|
+
*
|
|
3056
|
+
* // returns true if the map is associated with a terrain
|
|
3057
|
+
* JMap.Map.isTerrainAvailable()
|
|
3058
|
+
* ```
|
|
3059
|
+
*/
|
|
3060
|
+
function isTerrainAvailable(): boolean
|
|
3061
|
+
|
|
3062
|
+
/**
|
|
3063
|
+
* ***JMap.Map.isTerrainActive***
|
|
3064
|
+
*
|
|
3065
|
+
* Returns true if the map is associated with an active terrain, false otherwise.
|
|
3066
|
+
*
|
|
3067
|
+
* @example ```ts
|
|
3068
|
+
*
|
|
3069
|
+
* // returns true if the map is associated with an active terrain, false otherwise
|
|
3070
|
+
* JMap.Map.isTerrainActive()
|
|
3071
|
+
* ```
|
|
3072
|
+
*/
|
|
3073
|
+
function isTerrainActive(): boolean
|
|
3074
|
+
|
|
3075
|
+
/**
|
|
3076
|
+
* ***JMap.Map.setTerrainActive***
|
|
3077
|
+
*
|
|
3078
|
+
* Returns true if the map is associated with a terrain.
|
|
3079
|
+
*
|
|
3080
|
+
* @param active whether to activate or deactivate the terrain
|
|
3081
|
+
* @throws Error is no terrain is available
|
|
3082
|
+
*
|
|
3083
|
+
* @example ```ts
|
|
3084
|
+
*
|
|
3085
|
+
* // returns true if the map is associated with a terrain
|
|
3086
|
+
* if(JMap.Map.isTerrainAvailable()){
|
|
3087
|
+
* JMap.Map.setTerrainActive(true)
|
|
3088
|
+
* }else{
|
|
3089
|
+
* console.log("no terrain available")
|
|
3090
|
+
* }
|
|
3091
|
+
* ```
|
|
3092
|
+
*/
|
|
3093
|
+
function setTerrainActive(active: boolean): void
|
|
3094
|
+
|
|
3104
3095
|
/**
|
|
3105
3096
|
* ***JMap.Map.setScaleControlVisibility***
|
|
3106
3097
|
*
|
|
@@ -6466,7 +6457,7 @@ declare namespace JMap {
|
|
|
6466
6457
|
/**
|
|
6467
6458
|
* ***JMap.User.getPasswordPolicyCompliance***
|
|
6468
6459
|
*
|
|
6469
|
-
* Returns an object describing the password compliance with the platform's password policy (
|
|
6460
|
+
* Returns an object describing the password compliance with the platform's password policy ( JMap Cloud)
|
|
6470
6461
|
*
|
|
6471
6462
|
* @example ```ts
|
|
6472
6463
|
*
|
|
@@ -6485,7 +6476,7 @@ declare namespace JMap {
|
|
|
6485
6476
|
*/
|
|
6486
6477
|
function getPasswordPolicyCompliance(
|
|
6487
6478
|
password: string
|
|
6488
|
-
):
|
|
6479
|
+
): JJMapPasswordPolicyCompliance
|
|
6489
6480
|
|
|
6490
6481
|
/**
|
|
6491
6482
|
* ***JMap.User.isPseudoUser***
|
package/public/jmap/server.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
25
|
-
[id: string]:
|
|
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
|
-
|
|
33
|
-
saasServiceById?: JServerSaasServiceById
|
|
26
|
+
serviceById?: JServerServiceById
|
|
34
27
|
}
|
|
35
28
|
|
|
36
|
-
declare interface
|
|
29
|
+
declare interface JServerService {
|
|
37
30
|
id: string
|
|
38
31
|
name: string
|
|
39
32
|
version: string
|
|
40
|
-
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
|
package/public/jmap/user.d.ts
CHANGED
|
@@ -79,15 +79,12 @@ declare interface JOrganizationExternalApiKey {
|
|
|
79
79
|
type: JORGANIZATION_EXTERNAL_API_KEY_TYPES
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
declare interface
|
|
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
|