jmapcloud-ng-core-types 1.0.49 → 1.0.50
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 +5 -1
- package/package.json +1 -1
- package/public/core.d.ts +76 -6
- package/public/jmap/formJMC.d.ts +1 -1
- package/public/jmap/layer.d.ts +1 -0
- package/public/jmap/table.d.ts +9 -1
package/index.ts
CHANGED
|
@@ -593,7 +593,7 @@ export interface JServerState extends JServerInfo {
|
|
|
593
593
|
export type JHistoryListener = (oldValue: string | undefined, newValue: string | undefined) => void
|
|
594
594
|
|
|
595
595
|
export interface JFormJMCService {
|
|
596
|
-
getJsonForm(
|
|
596
|
+
getJsonForm(dataSourceId: string): Promise<JJsonFormSchemas>
|
|
597
597
|
getForm(layerId: string): Promise<JFormJMC>
|
|
598
598
|
}
|
|
599
599
|
|
|
@@ -924,6 +924,10 @@ export interface JLayerService {
|
|
|
924
924
|
export interface JTableService {
|
|
925
925
|
getTables(): JTable[]
|
|
926
926
|
getTableData(dataSourceId: JId, params: JTableDataParams): Promise<JTableData>
|
|
927
|
+
getById(tableId: JId): JTable
|
|
928
|
+
createRow(dataSourceId: JId, row: { [key: string]: any }): Promise<void>
|
|
929
|
+
updateRow(dataSourceId: JId, rowId: number, row: { [key: string]: any }): Promise<void>
|
|
930
|
+
deleteRow(dataSourceId: JId, rowId: number): Promise<void>
|
|
927
931
|
}
|
|
928
932
|
|
|
929
933
|
export interface JLayerSearchService {
|
package/package.json
CHANGED
package/public/core.d.ts
CHANGED
|
@@ -10262,23 +10262,23 @@ declare namespace JMap {
|
|
|
10262
10262
|
/**
|
|
10263
10263
|
* ***JMap.FormJMC.getJsonForm***
|
|
10264
10264
|
*
|
|
10265
|
-
* Returns the jsonForm schema and uiSchema for a
|
|
10265
|
+
* Returns the jsonForm schema and uiSchema for a data source.
|
|
10266
10266
|
*
|
|
10267
|
-
* fetch the attributes of a
|
|
10267
|
+
* fetch the attributes of a data source and then builds and returns the schema and uiSchema required for jsonForms. The schemas will be null if there is no attributes on the data source
|
|
10268
10268
|
*
|
|
10269
|
-
* @param
|
|
10269
|
+
* @param dataSourceId the JMap data source id
|
|
10270
10270
|
* @example
|
|
10271
10271
|
* ```ts
|
|
10272
|
-
* // returns the schema and uiSchema for
|
|
10272
|
+
* // returns the schema and uiSchema for data source id=f47ac10b-58cc-4372-a567-0e02b2c3d479
|
|
10273
10273
|
|
|
10274
10274
|
|
|
10275
10275
|
* JMap.FormJMC
|
|
10276
10276
|
* .getJsonForm("f47ac10b-58cc-4372-a567-0e02b2c3d479")
|
|
10277
|
-
* .then(schemas => console.log("jsonForms schemas of
|
|
10277
|
+
* .then(schemas => console.log("jsonForms schemas of data source f47ac10b-58cc-4372-a567-0e02b2c3d479", schemas))
|
|
10278
10278
|
* .catch(error => console.error("An error occurred when getting jsonForm schema", error))
|
|
10279
10279
|
* ```
|
|
10280
10280
|
*/
|
|
10281
|
-
function getJsonForm(
|
|
10281
|
+
function getJsonForm(dataSourceId: JId): Promise<JJsonFormSchemas>
|
|
10282
10282
|
|
|
10283
10283
|
/**
|
|
10284
10284
|
* ***JMap.FormJMC.getForm***
|
|
@@ -12786,5 +12786,75 @@ declare namespace JMap {
|
|
|
12786
12786
|
* ```
|
|
12787
12787
|
*/
|
|
12788
12788
|
function getTableData(dataSourceId: JId, params: JTableDataParams): Promise<JTableData>
|
|
12789
|
+
|
|
12790
|
+
/**
|
|
12791
|
+
* **JMap.Table.getById**
|
|
12792
|
+
*
|
|
12793
|
+
* Returns the JMap table having the id.
|
|
12794
|
+
*
|
|
12795
|
+
* @throws Error if no table found for the id
|
|
12796
|
+
* @param tableId The JMap table id
|
|
12797
|
+
* @example
|
|
12798
|
+
* ```ts
|
|
12799
|
+
* // returns the JMap table id=3
|
|
12800
|
+
* JMap.Table.getById(3)
|
|
12801
|
+
* ```
|
|
12802
|
+
*/
|
|
12803
|
+
function getById(tableId: JId): JTable
|
|
12804
|
+
|
|
12805
|
+
/**
|
|
12806
|
+
* **JMap.Table.createRow**
|
|
12807
|
+
*
|
|
12808
|
+
* Create a row from a table
|
|
12809
|
+
*
|
|
12810
|
+
* @param {JId} dataSourceId - The Id of the data source.
|
|
12811
|
+
* @param {{ [key: string]: any }} row - the data of the row to be updated.
|
|
12812
|
+
*
|
|
12813
|
+
* @returns {Promise<void>}
|
|
12814
|
+
*
|
|
12815
|
+
* @example
|
|
12816
|
+
* ```ts
|
|
12817
|
+
* // Create a row in the dataSet with id : "be4552e1-d89d-48ec-a417-7b99d14b4d7b" with the data: {city: Montreal, country:Canada}.
|
|
12818
|
+
* JMap.Table.createRow("be4552e1-d89d-48ec-a417-7b99d14b4d7b", {city: "Montreal", country: "Canada"});
|
|
12819
|
+
* ```
|
|
12820
|
+
*/
|
|
12821
|
+
function createRow(dataSourceId: JId, row: { [key: string]: any }): Promise<void>
|
|
12822
|
+
|
|
12823
|
+
/**
|
|
12824
|
+
* **JMap.Table.updateRow**
|
|
12825
|
+
*
|
|
12826
|
+
* Update a row from a table
|
|
12827
|
+
*
|
|
12828
|
+
* @param {JId} dataSourceId - The ID of the data source.
|
|
12829
|
+
* @param {number} rowId - Id of the row to be updated.
|
|
12830
|
+
* @param {{ [key: string]: any }} row - the data of the row to be updated.
|
|
12831
|
+
*
|
|
12832
|
+
* @returns {Promise<void>}
|
|
12833
|
+
*
|
|
12834
|
+
* @example
|
|
12835
|
+
* ```ts
|
|
12836
|
+
* // Update the row with an id of 3086627 from the dataSet with id : "be4552e1-d89d-48ec-a417-7b99d14b4d7b".
|
|
12837
|
+
* JMap.Table.updateRow("be4552e1-d89d-48ec-a417-7b99d14b4d7b", 3086627, {city: "Montreal", country: "Canada"});
|
|
12838
|
+
* ```
|
|
12839
|
+
*/
|
|
12840
|
+
function updateRow(dataSourceId: JId, rowId: number, row: { [key: string]: any }): Promise<void>
|
|
12841
|
+
|
|
12842
|
+
/**
|
|
12843
|
+
* **JMap.Table.deleteRow**
|
|
12844
|
+
*
|
|
12845
|
+
* Delete a row from a table
|
|
12846
|
+
*
|
|
12847
|
+
* @param {JId} dataSourceId - The ID of the JMap data source.
|
|
12848
|
+
* @param {number} rowId - Id of the row to be updated.
|
|
12849
|
+
*
|
|
12850
|
+
* @returns {Promise<void>}
|
|
12851
|
+
*
|
|
12852
|
+
* @example
|
|
12853
|
+
* ```ts
|
|
12854
|
+
* // Delete the row with an id of 3086627 from the dataSet with id : "be4552e1-d89d-48ec-a417-7b99d14b4d7b"
|
|
12855
|
+
* JMap.Table.deleteRow("be4552e1-d89d-48ec-a417-7b99d14b4d7b", 3086627);
|
|
12856
|
+
* ```
|
|
12857
|
+
*/
|
|
12858
|
+
function deleteRow(dataSourceId: JId, rowId: number): Promise<void>
|
|
12789
12859
|
}
|
|
12790
12860
|
}
|
package/public/jmap/formJMC.d.ts
CHANGED
package/public/jmap/layer.d.ts
CHANGED
package/public/jmap/table.d.ts
CHANGED
|
@@ -2,10 +2,11 @@ declare interface JTable {
|
|
|
2
2
|
id: string
|
|
3
3
|
organizationId: string
|
|
4
4
|
projectId: string
|
|
5
|
-
name:
|
|
5
|
+
name: string
|
|
6
6
|
description: JLocaleTranslation
|
|
7
7
|
dataSourceId: string
|
|
8
8
|
allowClientSideEditing: boolean
|
|
9
|
+
permissions: JTablePermissions
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
declare interface JTableData {
|
|
@@ -21,3 +22,10 @@ declare interface JTableDataParams {
|
|
|
21
22
|
filter?: string
|
|
22
23
|
sort?: string
|
|
23
24
|
}
|
|
25
|
+
|
|
26
|
+
declare interface JTablePermissions {
|
|
27
|
+
EXTRACT_ROW: boolean
|
|
28
|
+
CREATE_ROW: boolean
|
|
29
|
+
EDIT_ROW: boolean
|
|
30
|
+
DELETE_ROW: boolean
|
|
31
|
+
}
|