jmapserver-ng-core-types 2.8.3 → 2.9.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/index.ts CHANGED
@@ -799,6 +799,7 @@ export interface JProjectService {
799
799
  hasProjectActivated(): boolean
800
800
  getActiveProject(): JProject
801
801
  activateById(projectId: JId): JProject
802
+ refreshById(projectId: JId): Promise<JProject>
802
803
  activateByName(projectName: string): JProject
803
804
  deactivate(): void
804
805
  getAllProjects(): Promise<JProject[]>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmapserver-ng-core-types",
3
- "version": "2.8.3",
3
+ "version": "2.9.0",
4
4
  "description": "JMap Server specific version of JMap Server NG Core types and interfaces",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/public/core.d.ts CHANGED
@@ -5713,6 +5713,30 @@ declare namespace JMap {
5713
5713
  */
5714
5714
  function activateById(projectId: JId): JProject
5715
5715
 
5716
+ /**
5717
+ * **JMap.Project.refreshById**
5718
+ *
5719
+ * Refreshes a project. This will refresh the project information from the server, or add it to the list of projects in NG if not already present, but will not refresh the project's layers if the map is already loaded.
5720
+ * This method is reserved for internal usage, you should not need to call it.
5721
+ *
5722
+ * User session rigths are checked server side and an error is thrown if user doesn't have the access right for the project.
5723
+ *
5724
+ * @throws Error missing project id or if project is not found
5725
+ * @param projectId The JMap project id
5726
+ * @return a promise that is resolved when the project has been loaded successfully
5727
+ * @example
5728
+ * ```ts
5729
+ * try {
5730
+ * // refresh project id=2
5731
+ * const project = JMap.Project.refreshById(2)
5732
+ * console.info(`Project id=${project.id} has been refreshed.`, project)
5733
+ * } catch (error) {
5734
+ * console.error(`Cannot refresh the project : ${error}`)
5735
+ * }
5736
+ * ```
5737
+ */
5738
+ function refreshById(projectId: JId): Promise<JProject>
5739
+
5716
5740
  /**
5717
5741
  * **JMap.Project.activateByName**
5718
5742
  *