jmapcloud-ng-core-types 1.1.37 → 1.1.39
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/README.md +2 -7
- package/index.d.ts +42 -18
- package/package.json +1 -1
- package/public/core.d.ts +102 -24
- package/public/jmap/attachment.d.ts +1 -0
- package/public/jmap/extension.d.ts +2 -2
- package/public/jmap/layer.d.ts +2 -0
- package/public/jmap/map.d.ts +1 -1
- package/public/jmap/startup-options.d.ts +3 -3
- package/public/jmap/table.d.ts +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
# jmapcloud-ng-core-types
|
|
2
|
-
|
|
3
|
-
Don't rename the NPM script named ***pub*** for ***publish***.
|
|
4
|
-
|
|
5
|
-
If a NMP script called ***publish*** exists, NPM will launch it when we publish.
|
|
6
|
-
|
|
7
|
-
As ***pub*** launch a command that publish the package on NMP, it would make a loop if it was named ***publish*** ... so don't.
|
|
2
|
+
JMap Cloud NG Core
|
|
8
3
|
|
|
9
4
|
The latest version of the JMap Cloud NG Core Javascript API documentation is available <a href="https://k2geospatial.github.io/jmapcloud-frontend/jmapcloud-ng-core-types/latest" target="_blank">here</a>.
|
|
10
5
|
|
|
11
|
-
Examples and user documentation
|
|
6
|
+
Examples and user documentation are available <a href="https://docs.jmapcloud.io/en/jmap-ng/jmap-ng-developer-documentation" target="_blank">here</a>.
|
|
12
7
|
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="./public/global-aliases.d.ts" />
|
|
2
2
|
import { Feature, FeatureCollection, LineString, MultiLineString, Point, Polygon } from "geojson"
|
|
3
|
-
import { JAttribute, JDataSource, JDataSourceType, JForm as JFormJMC } from "jmapcloud-types"
|
|
3
|
+
import { JAttribute, JDataSource, JDataSourceType, JForm as JFormJMC, JRelationship } from "jmapcloud-types"
|
|
4
4
|
import type * as maplibregl from "maplibre-gl"
|
|
5
5
|
import { Action, Store } from "redux"
|
|
6
6
|
import { JDataSourceData, JDataSourceDataParams, JDataSourcePermissions } from "./public/jmap/datasource.ts"
|
|
@@ -405,13 +405,22 @@ export interface JFormJMCService {
|
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
export interface JAttachmentService {
|
|
408
|
-
getByItemId(dataSourceId: JId, itemId: JId): Promise<JAttachment[]>
|
|
409
|
-
create(dataSourceId: string, params: JCreateAttachmentParams): Promise<string>
|
|
410
|
-
remove(dataSourceId: string, attachmentId: string): Promise<string>
|
|
411
|
-
update(
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
408
|
+
getByItemId(dataSourceId: JId, dataSourceOrganizationId: string, itemId: JId): Promise<JAttachment[]>
|
|
409
|
+
create(dataSourceId: string, dataSourceOrganizationId: string, params: JCreateAttachmentParams): Promise<string>
|
|
410
|
+
remove(dataSourceId: string, dataSourceOrganizationId: string, attachmentId: string): Promise<string>
|
|
411
|
+
update(
|
|
412
|
+
dataSourceId: string,
|
|
413
|
+
dataSourceOrganizationId: string,
|
|
414
|
+
attachmentId: string,
|
|
415
|
+
params: JUpdateAttachmentParams
|
|
416
|
+
): Promise<string>
|
|
417
|
+
download(
|
|
418
|
+
dataSourceId: string,
|
|
419
|
+
dataSourceOrganizationId: string,
|
|
420
|
+
attachmentId: string
|
|
421
|
+
): Promise<{ data: Blob; headers: any }>
|
|
422
|
+
downloadToDevice(attachment: JAttachmentFile, dataSourceId: string, dataSourceOrganizationId: string): Promise<void>
|
|
423
|
+
previewAttachments(attachment: JAttachmentFile, dataSourceId: string, dataSourceOrganizationId: string): Promise<void>
|
|
415
424
|
}
|
|
416
425
|
|
|
417
426
|
export interface JFormService {
|
|
@@ -740,21 +749,36 @@ export interface JLayerService {
|
|
|
740
749
|
}
|
|
741
750
|
|
|
742
751
|
export interface JDataSourceService {
|
|
743
|
-
getAttributes(dataSourceId: JId): Promise<JAttribute[]>
|
|
744
|
-
getById(dataSourceId: JId): Promise<JDataSource>
|
|
745
|
-
getData(
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
752
|
+
getAttributes(dataSourceId: JId, dataSourceOrganizationId: string): Promise<JAttribute[]>
|
|
753
|
+
getById(dataSourceId: JId, dataSourceOrganizationId: string): Promise<JDataSource>
|
|
754
|
+
getData(
|
|
755
|
+
dataSourceId: JId,
|
|
756
|
+
dataSourceOrganizationId: string,
|
|
757
|
+
params: JDataSourceDataParams,
|
|
758
|
+
dataSourceType?: JDataSourceType
|
|
759
|
+
): Promise<JDataSourceData>
|
|
760
|
+
getPermissions(dataSourceId: JId, dataSourceOrganizationId: string): Promise<JDataSourcePermissions>
|
|
761
|
+
createRow(
|
|
762
|
+
dataSourceId: JId,
|
|
763
|
+
dataSourceOrganizationId: string,
|
|
764
|
+
row: { [key: string]: any }
|
|
765
|
+
): Promise<{ id: JId; links: any[] }>
|
|
766
|
+
updateRow(dataSourceId: JId, dataSourceOrganizationId: string, rowId: JId, row: { [key: string]: any }): Promise<void>
|
|
767
|
+
deleteRow(dataSourceId: JId, dataSourceOrganizationId: string, rowId: JId): Promise<void>
|
|
750
768
|
updateFeatureProperties(
|
|
751
769
|
dataSourceId: JId,
|
|
770
|
+
dataSourceOrganizationId: string,
|
|
752
771
|
featureId: JId,
|
|
753
772
|
properties: { [key: string]: any }
|
|
754
773
|
): Promise<GeoJSON.Feature>
|
|
755
|
-
deleteFeature(dataSourceId: JId, featureId: JId): Promise<JId>
|
|
756
|
-
getFeature(dataSourceId: string, featureId: number): Promise<GeoJSON.Feature>
|
|
757
|
-
getRow(dataSourceId: string, rowId: number): Promise<{ [key: string]: any }>
|
|
774
|
+
deleteFeature(dataSourceId: JId, dataSourceOrganizationId: string, featureId: JId): Promise<JId>
|
|
775
|
+
getFeature(dataSourceId: string, dataSourceOrganizationId: string, featureId: number): Promise<GeoJSON.Feature>
|
|
776
|
+
getRow(dataSourceId: string, dataSourceOrganizationId: string, rowId: number): Promise<{ [key: string]: any }>
|
|
777
|
+
getRelationship(
|
|
778
|
+
dataSourceId: string,
|
|
779
|
+
dataSourceOrganizationId: string,
|
|
780
|
+
relationshipId: string
|
|
781
|
+
): Promise<JRelationship>
|
|
758
782
|
}
|
|
759
783
|
|
|
760
784
|
export interface JTableService {
|
package/package.json
CHANGED
package/public/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JAttribute } from "jmapcloud-types"
|
|
1
|
+
import { JAttribute, JDataSource, JRelationship } from "jmapcloud-types"
|
|
2
2
|
import type { Action, Store } from "redux"
|
|
3
3
|
import type { JRequestConfig } from "./jmap/ajax.d.ts"
|
|
4
4
|
import type {
|
|
@@ -181,7 +181,7 @@ export {}
|
|
|
181
181
|
/**
|
|
182
182
|
* This is the JMap Cloud NG Core library API documentation.
|
|
183
183
|
*
|
|
184
|
-
* Examples are availables <a href="https://
|
|
184
|
+
* Examples are availables <a href="https://docs.jmapcloud.io/en/jmap-ng/jmap-ng-developer-documentation/examples" target="_blank">here</a>.
|
|
185
185
|
*
|
|
186
186
|
* You can customize JMap Cloud NG Core library by providing startup options ({@link JCoreOptions}).
|
|
187
187
|
*
|
|
@@ -5351,15 +5351,15 @@ export namespace JMap {
|
|
|
5351
5351
|
* @example
|
|
5352
5352
|
* ```ts
|
|
5353
5353
|
* // Add a link attribution on the map.
|
|
5354
|
-
* JMap.Map.Attribution.addSingle({ id: "link-test", text: "© HelloWorld", href:"https://k2geospatial.com/jmap-
|
|
5354
|
+
* JMap.Map.Attribution.addSingle({ id: "link-test", text: "© HelloWorld", href:"https://www.k2geospatial.com/fr/jmap#jmap-cloud"})
|
|
5355
5355
|
*
|
|
5356
5356
|
* // Add a text attribution on the map
|
|
5357
5357
|
* JMap.Map.Attribution.addSingle({ id: "text-test", text: "© HelloWorld"})
|
|
5358
5358
|
*
|
|
5359
5359
|
* // Add a image attribution on the map.
|
|
5360
5360
|
* JMap.Map.Attribution.addSingle({id: "test-image",
|
|
5361
|
-
* imageUrl: "https://
|
|
5362
|
-
* href: "https://k2geospatial.com/jmap-
|
|
5361
|
+
* imageUrl: "https://cdn.prod.website-files.com/6329d1de889a14271e633a0e/6329e0ef8ada6a3fecd3e61f_K2%20LOGOTYPE%20BLANC.svg",
|
|
5362
|
+
* href: "https://www.k2geospatial.com/fr/jmap#jmap-cloud"})
|
|
5363
5363
|
* ```
|
|
5364
5364
|
*/
|
|
5365
5365
|
function addSingle(attribution: JMapAttribution): void
|
|
@@ -5375,7 +5375,7 @@ export namespace JMap {
|
|
|
5375
5375
|
* // Add two custom attributions on the map.
|
|
5376
5376
|
* JMap.Map.Attribution.addMultiple([{ id: "custom-attribution-0",
|
|
5377
5377
|
* text: "© K2Geospatial",
|
|
5378
|
-
* href: "https://k2geospatial.com/jmap-
|
|
5378
|
+
* href: "https://www.k2geospatial.com/fr/jmap#jmap-cloud" },
|
|
5379
5379
|
* { id: "custom-attribution-1",
|
|
5380
5380
|
* text: "© StackOverflow",
|
|
5381
5381
|
* href: "https://stackoverflow.com/" }])
|
|
@@ -9663,6 +9663,7 @@ export namespace JMap {
|
|
|
9663
9663
|
* Fetches every attachment linked to a specific **item** (row) of a data source.
|
|
9664
9664
|
*
|
|
9665
9665
|
* @param dataSourceId the data source identifier that contains the item
|
|
9666
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9666
9667
|
* @param itemId the identifier of the item whose attachments you want
|
|
9667
9668
|
* @example
|
|
9668
9669
|
* ```ts
|
|
@@ -9672,13 +9673,14 @@ export namespace JMap {
|
|
|
9672
9673
|
* .catch(error => console.error("An error occurred while fetching attachments", error))
|
|
9673
9674
|
* ```
|
|
9674
9675
|
*/
|
|
9675
|
-
function getByItemId(dataSourceId: JId, itemId: JId): Promise<JAttachment[]>
|
|
9676
|
+
function getByItemId(dataSourceId: JId, dataSourceOrganizationId: string, itemId: JId): Promise<JAttachment[]>
|
|
9676
9677
|
/**
|
|
9677
9678
|
* ***JMap.Attachment.create***
|
|
9678
9679
|
*
|
|
9679
9680
|
* Creates a new attachment for a data source item. The payload can represent either a file upload (`file`) or a URL attachment (`url`).
|
|
9680
9681
|
*
|
|
9681
9682
|
* @param dataSourceId the data source identifier that will receive the attachment
|
|
9683
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9682
9684
|
* @param params see {@link JCreateAttachmentParams} (includes the `itemId`)
|
|
9683
9685
|
* @example
|
|
9684
9686
|
* ```ts
|
|
@@ -9704,13 +9706,18 @@ export namespace JMap {
|
|
|
9704
9706
|
* .catch(error => console.error("Attachment creation failed", error))
|
|
9705
9707
|
* ```
|
|
9706
9708
|
*/
|
|
9707
|
-
function create(
|
|
9709
|
+
function create(
|
|
9710
|
+
dataSourceId: string,
|
|
9711
|
+
dataSourceOrganizationId: string,
|
|
9712
|
+
params: JCreateAttachmentParams
|
|
9713
|
+
): Promise<string>
|
|
9708
9714
|
/**
|
|
9709
9715
|
* ***JMap.Attachment.remove***
|
|
9710
9716
|
*
|
|
9711
9717
|
* Deletes an attachment previously created on a data source.
|
|
9712
9718
|
*
|
|
9713
9719
|
* @param dataSourceId the JMap data source id
|
|
9720
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9714
9721
|
* @param attachmentId the attachment identifier to remove
|
|
9715
9722
|
* @example
|
|
9716
9723
|
* ```ts
|
|
@@ -9720,13 +9727,14 @@ export namespace JMap {
|
|
|
9720
9727
|
* .catch(error => console.error("Failed to remove attachment", error))
|
|
9721
9728
|
* ```
|
|
9722
9729
|
*/
|
|
9723
|
-
function remove(dataSourceId: string, attachmentId: string): Promise<string>
|
|
9730
|
+
function remove(dataSourceId: string, dataSourceOrganizationId: string, attachmentId: string): Promise<string>
|
|
9724
9731
|
/**
|
|
9725
9732
|
* ***JMap.Attachment.update***
|
|
9726
9733
|
*
|
|
9727
9734
|
* Updates the metadata (subject, description, URL) of an existing attachment.
|
|
9728
9735
|
*
|
|
9729
9736
|
* @param dataSourceId the JMap data source id
|
|
9737
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9730
9738
|
* @param attachmentId the attachment identifier to update
|
|
9731
9739
|
* @param params partial attachment payload containing the new values
|
|
9732
9740
|
* @example
|
|
@@ -9741,13 +9749,19 @@ export namespace JMap {
|
|
|
9741
9749
|
* .catch(error => console.error("Failed to update attachment", error))
|
|
9742
9750
|
* ```
|
|
9743
9751
|
*/
|
|
9744
|
-
function update(
|
|
9752
|
+
function update(
|
|
9753
|
+
dataSourceId: string,
|
|
9754
|
+
dataSourceOrganizationId: string,
|
|
9755
|
+
attachmentId: string,
|
|
9756
|
+
params: JUpdateAttachmentParams
|
|
9757
|
+
): Promise<string>
|
|
9745
9758
|
/**
|
|
9746
9759
|
* ***JMap.Attachment.download***
|
|
9747
9760
|
*
|
|
9748
9761
|
* Downloads an attachment and returns the raw binary data plus the HTTP headers sent by the server.
|
|
9749
9762
|
*
|
|
9750
9763
|
* @param dataSourceId the JMap data source id
|
|
9764
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9751
9765
|
* @param attachmentId the attachment to download
|
|
9752
9766
|
* @example
|
|
9753
9767
|
* ```ts
|
|
@@ -9759,6 +9773,7 @@ export namespace JMap {
|
|
|
9759
9773
|
*/
|
|
9760
9774
|
function download(
|
|
9761
9775
|
dataSourceId: string,
|
|
9776
|
+
dataSourceOrganizationId: string,
|
|
9762
9777
|
attachmentId: string
|
|
9763
9778
|
): Promise<{
|
|
9764
9779
|
data: Blob
|
|
@@ -9771,6 +9786,7 @@ export namespace JMap {
|
|
|
9771
9786
|
*
|
|
9772
9787
|
* @param attachment the attachment to download
|
|
9773
9788
|
* @param dataSourceId the JMap data source id
|
|
9789
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9774
9790
|
* @example
|
|
9775
9791
|
* ```ts
|
|
9776
9792
|
* JMap.Attachment
|
|
@@ -9790,7 +9806,11 @@ export namespace JMap {
|
|
|
9790
9806
|
* .catch(error => console.error("Download failed", error))
|
|
9791
9807
|
* ```
|
|
9792
9808
|
*/
|
|
9793
|
-
function downloadToDevice(
|
|
9809
|
+
function downloadToDevice(
|
|
9810
|
+
attachment: JAttachmentFile,
|
|
9811
|
+
dataSourceId: string,
|
|
9812
|
+
dataSourceOrganizationId: string
|
|
9813
|
+
): Promise<void>
|
|
9794
9814
|
/**
|
|
9795
9815
|
* ***JMap.Attachment.previewAttachments***
|
|
9796
9816
|
*
|
|
@@ -9800,6 +9820,7 @@ export namespace JMap {
|
|
|
9800
9820
|
*
|
|
9801
9821
|
* @param attachment the attachment to download
|
|
9802
9822
|
* @param dataSourceId the JMap data source id
|
|
9823
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9803
9824
|
* @example
|
|
9804
9825
|
* ```ts
|
|
9805
9826
|
* JMap.Attachment
|
|
@@ -9819,7 +9840,11 @@ export namespace JMap {
|
|
|
9819
9840
|
* .catch(error => console.error("Preview failed", error))
|
|
9820
9841
|
* ```
|
|
9821
9842
|
*/
|
|
9822
|
-
function previewAttachments(
|
|
9843
|
+
function previewAttachments(
|
|
9844
|
+
attachment: JAttachmentFile,
|
|
9845
|
+
dataSourceId: string,
|
|
9846
|
+
dataSourceOrganizationId: string
|
|
9847
|
+
): Promise<void>
|
|
9823
9848
|
}
|
|
9824
9849
|
/**
|
|
9825
9850
|
* **JMap.DataSource**
|
|
@@ -9833,6 +9858,7 @@ export namespace JMap {
|
|
|
9833
9858
|
* Returns the attributes for a given datasource.
|
|
9834
9859
|
*
|
|
9835
9860
|
* @param dataSourceId the datasource id
|
|
9861
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9836
9862
|
* @throws if dataSourceId not valid or dataSource not found
|
|
9837
9863
|
* @example
|
|
9838
9864
|
* ```ts
|
|
@@ -9840,22 +9866,23 @@ export namespace JMap {
|
|
|
9840
9866
|
* JMap.DataSource.getAttributes("be4552e1-d89d-48ec-a417-7b99d14b4d7b")
|
|
9841
9867
|
* ```
|
|
9842
9868
|
**/
|
|
9843
|
-
function getAttributes(dataSourceId: JId): Promise<JAttribute[]>
|
|
9869
|
+
function getAttributes(dataSourceId: JId, dataSourceOrganizationId: string): Promise<JAttribute[]>
|
|
9844
9870
|
|
|
9845
9871
|
/**
|
|
9846
9872
|
* **JMap.DataSource.getById**
|
|
9847
9873
|
*
|
|
9848
9874
|
* Returns the datasource, for a given id.
|
|
9849
9875
|
*
|
|
9850
|
-
* @param dataSourceId
|
|
9851
|
-
* @
|
|
9876
|
+
* @param dataSourceId the id of the data source
|
|
9877
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9878
|
+
* @throws if dataSourceId not valid or not found
|
|
9852
9879
|
* @example
|
|
9853
9880
|
* ```ts
|
|
9854
9881
|
* // Returns dataSource, with id="be4552e1-d89d-48ec-a417-7b99d14b4d7b"
|
|
9855
9882
|
* JMap.DataSource.getById("be4552e1-d89d-48ec-a417-7b99d14b4d7b")
|
|
9856
9883
|
* ```
|
|
9857
9884
|
**/
|
|
9858
|
-
function getById(dataSourceId: JId): Promise<
|
|
9885
|
+
function getById(dataSourceId: JId, dataSourceOrganizationId: string): Promise<JDataSource>
|
|
9859
9886
|
|
|
9860
9887
|
/**
|
|
9861
9888
|
* **JMap.DataSource.getData**
|
|
@@ -9865,6 +9892,7 @@ export namespace JMap {
|
|
|
9865
9892
|
* @throws {Error} If no data source is found for the given ID.
|
|
9866
9893
|
*
|
|
9867
9894
|
* @param {JId} dataSourceId - The datasource id.
|
|
9895
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9868
9896
|
* @param {JDataSourceDataParams} params - Includes the following optional parameters: startIndex, limit, filter, sort.
|
|
9869
9897
|
* startIndex: The starting index for data retrieval (zero-based).
|
|
9870
9898
|
* limit: The maximum number of records to retrieve.
|
|
@@ -9883,7 +9911,12 @@ export namespace JMap {
|
|
|
9883
9911
|
* });
|
|
9884
9912
|
* ```
|
|
9885
9913
|
*/
|
|
9886
|
-
function getData(
|
|
9914
|
+
function getData(
|
|
9915
|
+
dataSourceId: JId,
|
|
9916
|
+
dataSourceOrganizationId: string,
|
|
9917
|
+
params: JDataSourceDataParams,
|
|
9918
|
+
dataSourceType?: any
|
|
9919
|
+
): Promise<JDataSourceData>
|
|
9887
9920
|
|
|
9888
9921
|
/**
|
|
9889
9922
|
* **JMap.DataSource.getPermissions**
|
|
@@ -9891,6 +9924,7 @@ export namespace JMap {
|
|
|
9891
9924
|
* Returns the permissions, for a given dataSource id.
|
|
9892
9925
|
*
|
|
9893
9926
|
* @param dataSourceId
|
|
9927
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9894
9928
|
* @throws if dataSourceId not valid
|
|
9895
9929
|
* @example
|
|
9896
9930
|
* ```ts
|
|
@@ -9898,7 +9932,7 @@ export namespace JMap {
|
|
|
9898
9932
|
* JMap.DataSource.getPermissions("be4552e1-d89d-48ec-a417-7b99d14b4d7b")
|
|
9899
9933
|
* ```
|
|
9900
9934
|
**/
|
|
9901
|
-
function getPermissions(dataSourceId: JId): Promise<JDataSourcePermissions>
|
|
9935
|
+
function getPermissions(dataSourceId: JId, dataSourceOrganizationId: string): Promise<JDataSourcePermissions>
|
|
9902
9936
|
|
|
9903
9937
|
/**
|
|
9904
9938
|
* **JMap.DataSource.createRow**
|
|
@@ -9906,13 +9940,18 @@ export namespace JMap {
|
|
|
9906
9940
|
* Creates a new row in a tabular datasource.
|
|
9907
9941
|
*
|
|
9908
9942
|
* @param dataSourceId
|
|
9943
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9909
9944
|
* @param row
|
|
9910
9945
|
* @example
|
|
9911
9946
|
* ```ts
|
|
9912
9947
|
* JMap.DataSource.createRow("be4552e1-d89d-48ec-a417-7b99d14b4d7b", { NAME: "New row" })
|
|
9913
9948
|
* ```
|
|
9914
9949
|
**/
|
|
9915
|
-
function createRow(
|
|
9950
|
+
function createRow(
|
|
9951
|
+
dataSourceId: JId,
|
|
9952
|
+
dataSourceOrganizationId: string,
|
|
9953
|
+
row: { [key: string]: any }
|
|
9954
|
+
): Promise<{ id: JId; links: any[] }>
|
|
9916
9955
|
|
|
9917
9956
|
/**
|
|
9918
9957
|
* **JMap.DataSource.updateRow**
|
|
@@ -9920,6 +9959,7 @@ export namespace JMap {
|
|
|
9920
9959
|
* Updates a row in a tabular datasource.
|
|
9921
9960
|
*
|
|
9922
9961
|
* @param dataSourceId
|
|
9962
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9923
9963
|
* @param rowId
|
|
9924
9964
|
* @param row
|
|
9925
9965
|
* @example
|
|
@@ -9927,7 +9967,12 @@ export namespace JMap {
|
|
|
9927
9967
|
* JMap.DataSource.updateRow("be4552e1-d89d-48ec-a417-7b99d14b4d7b", 12, { NAME: "Updated" })
|
|
9928
9968
|
* ```
|
|
9929
9969
|
**/
|
|
9930
|
-
function updateRow(
|
|
9970
|
+
function updateRow(
|
|
9971
|
+
dataSourceId: JId,
|
|
9972
|
+
dataSourceOrganizationId: string,
|
|
9973
|
+
rowId: JId,
|
|
9974
|
+
row: { [key: string]: any }
|
|
9975
|
+
): Promise<void>
|
|
9931
9976
|
|
|
9932
9977
|
/**
|
|
9933
9978
|
* **JMap.DataSource.deleteRow**
|
|
@@ -9935,13 +9980,14 @@ export namespace JMap {
|
|
|
9935
9980
|
* Deletes a row from a tabular datasource.
|
|
9936
9981
|
*
|
|
9937
9982
|
* @param dataSourceId
|
|
9983
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9938
9984
|
* @param rowId
|
|
9939
9985
|
* @example
|
|
9940
9986
|
* ```ts
|
|
9941
9987
|
* JMap.DataSource.deleteRow("be4552e1-d89d-48ec-a417-7b99d14b4d7b", 12)
|
|
9942
9988
|
* ```
|
|
9943
9989
|
**/
|
|
9944
|
-
function deleteRow(dataSourceId: JId, rowId: JId): Promise<void>
|
|
9990
|
+
function deleteRow(dataSourceId: JId, dataSourceOrganizationId: string, rowId: JId): Promise<void>
|
|
9945
9991
|
|
|
9946
9992
|
/**
|
|
9947
9993
|
* **JMap.DataSource.updateFeatureProperties**
|
|
@@ -9949,6 +9995,7 @@ export namespace JMap {
|
|
|
9949
9995
|
* Updates properties for a feature in a spatial datasource.
|
|
9950
9996
|
*
|
|
9951
9997
|
* @param dataSourceId
|
|
9998
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9952
9999
|
* @param featureId
|
|
9953
10000
|
* @param properties
|
|
9954
10001
|
* @example
|
|
@@ -9962,6 +10009,7 @@ export namespace JMap {
|
|
|
9962
10009
|
**/
|
|
9963
10010
|
function updateFeatureProperties(
|
|
9964
10011
|
dataSourceId: JId,
|
|
10012
|
+
dataSourceOrganizationId: string,
|
|
9965
10013
|
featureId: JId,
|
|
9966
10014
|
properties: { [key: string]: any }
|
|
9967
10015
|
): Promise<GeoJSON.Feature>
|
|
@@ -9972,13 +10020,14 @@ export namespace JMap {
|
|
|
9972
10020
|
* Deletes a spatial feature from a spatial datasource.
|
|
9973
10021
|
*
|
|
9974
10022
|
* @param dataSourceId
|
|
10023
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9975
10024
|
* @param featureId
|
|
9976
10025
|
* @example
|
|
9977
10026
|
* ```ts
|
|
9978
10027
|
* JMap.DataSource.deleteFeature("be4552e1-d89d-48ec-a417-7b99d14b4d7b", 42)
|
|
9979
10028
|
* ```
|
|
9980
10029
|
**/
|
|
9981
|
-
function deleteFeature(dataSourceId: JId, featureId: JId): Promise<JId>
|
|
10030
|
+
function deleteFeature(dataSourceId: JId, dataSourceOrganizationId: string, featureId: JId): Promise<JId>
|
|
9982
10031
|
|
|
9983
10032
|
/**
|
|
9984
10033
|
* **JMap.DataSource.getFeature**
|
|
@@ -9986,13 +10035,18 @@ export namespace JMap {
|
|
|
9986
10035
|
* Returns a spatial feature for a datasource.
|
|
9987
10036
|
*
|
|
9988
10037
|
* @param dataSourceId
|
|
10038
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
9989
10039
|
* @param featureId
|
|
9990
10040
|
* @example
|
|
9991
10041
|
* ```ts
|
|
9992
10042
|
* JMap.DataSource.getFeature("be4552e1-d89d-48ec-a417-7b99d14b4d7b", 42)
|
|
9993
10043
|
* ```
|
|
9994
10044
|
**/
|
|
9995
|
-
function getFeature(
|
|
10045
|
+
function getFeature(
|
|
10046
|
+
dataSourceId: string,
|
|
10047
|
+
dataSourceOrganizationId: string,
|
|
10048
|
+
featureId: number
|
|
10049
|
+
): Promise<GeoJSON.Feature>
|
|
9996
10050
|
|
|
9997
10051
|
/**
|
|
9998
10052
|
* **JMap.DataSource.getRow**
|
|
@@ -10000,13 +10054,37 @@ export namespace JMap {
|
|
|
10000
10054
|
* Returns a row for a tabular datasource.
|
|
10001
10055
|
*
|
|
10002
10056
|
* @param dataSourceId
|
|
10057
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
10003
10058
|
* @param rowId
|
|
10004
10059
|
* @example
|
|
10005
10060
|
* ```ts
|
|
10006
10061
|
* JMap.DataSource.getRow("be4552e1-d89d-48ec-a417-7b99d14b4d7b", 12)
|
|
10007
10062
|
* ```
|
|
10008
10063
|
**/
|
|
10009
|
-
function getRow(
|
|
10064
|
+
function getRow(
|
|
10065
|
+
dataSourceId: string,
|
|
10066
|
+
dataSourceOrganizationId: string,
|
|
10067
|
+
rowId: number
|
|
10068
|
+
): Promise<{ [key: string]: any }>
|
|
10069
|
+
|
|
10070
|
+
/**
|
|
10071
|
+
* **JMap.DataSource.getRelationship**
|
|
10072
|
+
*
|
|
10073
|
+
* Returns a relationship for a given data source.
|
|
10074
|
+
*
|
|
10075
|
+
* @param dataSourceId the id of the data source
|
|
10076
|
+
* @param dataSourceOrganizationId the id of the organization to which the data source belongs
|
|
10077
|
+
* @param relationshipId the id of the relationship to fetch
|
|
10078
|
+
* @example
|
|
10079
|
+
* ```ts
|
|
10080
|
+
* JMap.DataSource.getRelationship("be4552e1-d89d-48ec-a417-7b99d14b4d7b", "ja49j9e1-d89d-48ec-a417-7b99d14b4d7b", "ke4759e1-d89d-48ec-a417-7b99d14b4d7b")
|
|
10081
|
+
* ```
|
|
10082
|
+
**/
|
|
10083
|
+
function getRelationship(
|
|
10084
|
+
dataSourceId: string,
|
|
10085
|
+
dataSourceOrganizationId: string,
|
|
10086
|
+
relationshipId: string
|
|
10087
|
+
): Promise<JRelationship>
|
|
10010
10088
|
}
|
|
10011
10089
|
|
|
10012
10090
|
/**
|
|
@@ -117,7 +117,7 @@ export interface JCoreExtension {
|
|
|
117
117
|
startBeforeMapIsReady?: boolean
|
|
118
118
|
/**
|
|
119
119
|
* You can provide a translation bundle for your extesion. All translations will be handled by the JMap Cloud NG
|
|
120
|
-
* translation engine. See [JMap.Language.addBundle](../functions/
|
|
120
|
+
* translation engine. See [JMap.Language.addBundle](../functions/JMap_Cloud_NG_Core___API.JMap.Language.addBundle.html) for more details on bundles
|
|
121
121
|
*/
|
|
122
122
|
translationBundle?: JTranslationBundle
|
|
123
123
|
/**
|
|
@@ -151,7 +151,7 @@ export interface JCoreExtension {
|
|
|
151
151
|
*
|
|
152
152
|
* Like that you can develop UI component that react to the redux state changes.
|
|
153
153
|
*
|
|
154
|
-
* You can get the data store using this function
|
|
154
|
+
* You can get the data store using this function: [JMap.getDataStore](../functions/JMap_Cloud_NG_Core___API.JMap.getDataStore.html), and then dispatch
|
|
155
155
|
* your own actions.
|
|
156
156
|
*
|
|
157
157
|
* A redux reducer is a pure JS function that take the current reducer state (can be undefined first time)
|
package/public/jmap/layer.d.ts
CHANGED
|
@@ -303,6 +303,7 @@ export interface JLayer extends JLayerTreeElement {
|
|
|
303
303
|
defaultMetadatas: JLayerMetadata[]
|
|
304
304
|
metadataSections: JLayerMetadataSection[]
|
|
305
305
|
attributes: JLayerAttribute[]
|
|
306
|
+
JMCAttributes: JAttribute[]
|
|
306
307
|
mouseOver: JMapMouseOver
|
|
307
308
|
minimumZoom: number | undefined
|
|
308
309
|
maximumZoom: number | undefined
|
|
@@ -321,6 +322,7 @@ export interface JLayer extends JLayerTreeElement {
|
|
|
321
322
|
hasInformationReport: boolean
|
|
322
323
|
informationReports: JLayerInformationReport[]
|
|
323
324
|
spatialDataSourceId: string
|
|
325
|
+
spatialDataSourceOrganizationId: string
|
|
324
326
|
spatialDataSourceAttributes: JAttribute[] | null
|
|
325
327
|
selectionStyleId: string
|
|
326
328
|
// dynamicFilter: JDynamicFilter
|
package/public/jmap/map.d.ts
CHANGED
|
@@ -316,7 +316,7 @@ export interface JCoreOptions {
|
|
|
316
316
|
* Specifying ***token*** will automatically activate {@link JCoreOptions.legacyAuthentication}
|
|
317
317
|
*
|
|
318
318
|
* To get a refresh token, you can use the JMap Rest API on your JMap Cloud Server.
|
|
319
|
-
* See [JMap.User.setToken](
|
|
319
|
+
* See [JMap.User.setToken](../functions/JMap_Cloud_NG_Core___API.JMap.User.setToken.html) for detailed examples on how to fetch a token through JMap's REST API.
|
|
320
320
|
*
|
|
321
321
|
* So to start the library using the fetched token you can configure your startup options like this :
|
|
322
322
|
* ```html
|
|
@@ -458,7 +458,7 @@ export interface JCoreOptions {
|
|
|
458
458
|
/**
|
|
459
459
|
* If set to any of the locales supported by JMap, will define the default locale, bypassing browser or user-defined locale.
|
|
460
460
|
*
|
|
461
|
-
* Supported locales
|
|
461
|
+
* Supported locales can be retrieved by calling [JMap.Language.getLocales](../functions/JMap_Cloud_NG_Core___API.JMap.Language.getLocales.html)
|
|
462
462
|
*/
|
|
463
463
|
locale?: string
|
|
464
464
|
/**
|
|
@@ -516,7 +516,7 @@ export interface JCoreOptions {
|
|
|
516
516
|
*
|
|
517
517
|
* If provided, will use the corresponding basemap as the default basemap.
|
|
518
518
|
*
|
|
519
|
-
* If the id is unknown, will do nothing. To get all basemaps ids in the project, use [JMap.Map.Basemap.getAllIds](
|
|
519
|
+
* If the id is unknown, will do nothing. To get all basemaps ids in the project, use [JMap.Map.Basemap.getAllIds](../functions/JMap_Cloud_NG_Core___API.JMap.Map.Basemap.getAllIds.html)
|
|
520
520
|
*
|
|
521
521
|
* Using the id "none" will use no basemap at startup.
|
|
522
522
|
*
|
package/public/jmap/table.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export interface JServerTable extends Omit<JTable, "permissions"> {
|
|
|
17
17
|
|
|
18
18
|
export interface JTable {
|
|
19
19
|
id: string
|
|
20
|
-
organizationId: string
|
|
21
20
|
projectId: string
|
|
22
21
|
name: string
|
|
23
22
|
attributes: JAttribute[]
|
|
@@ -25,6 +24,7 @@ export interface JTable {
|
|
|
25
24
|
listed: boolean
|
|
26
25
|
description: JLocaleTranslation
|
|
27
26
|
dataSourceId: string
|
|
27
|
+
dataSourceOrganizationId: string
|
|
28
28
|
allowClientSideEditing: boolean
|
|
29
29
|
permissions: JTablePermissions
|
|
30
30
|
baseFilter?: JAnyFilterCondition
|