Showing
1 changed file
with
21 additions
and
25 deletions
@@ -135,21 +135,20 @@ export function observableArrayReturnType(objectType: string): FunctionArgType { | @@ -135,21 +135,20 @@ export function observableArrayReturnType(objectType: string): FunctionArgType { | ||
135 | }; | 135 | }; |
136 | } | 136 | } |
137 | 137 | ||
138 | -export function observableBaseDataReturnType(objectType: string): FunctionArgType { | 138 | +export function observableBaseDataReturnType(): FunctionArgType { |
139 | return { | 139 | return { |
140 | - type: `Observable<${baseDataHref}<${objectType}>>`, | ||
141 | - description: `An <code>Observable</code> of page result as a <code>${baseDataHref}</code> holding array of <code>${objectType}</code> objects.` | 140 | + type: `Observable<${baseDataHref}<${entityIdHref}>>`, |
141 | + description: `An <code>Observable</code> of <code>${baseDataHref}</code> object.` | ||
142 | }; | 142 | }; |
143 | } | 143 | } |
144 | 144 | ||
145 | -export function observableArrayBaseDataReturnType(objectType: string): FunctionArgType { | 145 | +export function observableArrayBaseDataReturnType(): FunctionArgType { |
146 | return { | 146 | return { |
147 | - type: `Observable<Array<${baseDataHref}<${objectType}>>>`, | ||
148 | - description: `An <code>Observable</code> of page result as a <code>${baseDataHref}</code> holding array of <code>${objectType}</code> objects.` | 147 | + type: `Observable<Array<${baseDataHref}<${entityIdHref}>>>`, |
148 | + description: `An <code>Observable</code> of array of <code>${baseDataHref}</code> objects.` | ||
149 | }; | 149 | }; |
150 | } | 150 | } |
151 | 151 | ||
152 | - | ||
153 | export function observablePageDataReturnType(objectType: string): FunctionArgType { | 152 | export function observablePageDataReturnType(objectType: string): FunctionArgType { |
154 | return { | 153 | return { |
155 | type: `Observable<${pageDataHref}<${objectType}>>`, | 154 | type: `Observable<${pageDataHref}<${objectType}>>`, |
@@ -157,8 +156,6 @@ export function observablePageDataReturnType(objectType: string): FunctionArgTyp | @@ -157,8 +156,6 @@ export function observablePageDataReturnType(objectType: string): FunctionArgTyp | ||
157 | }; | 156 | }; |
158 | } | 157 | } |
159 | 158 | ||
160 | - | ||
161 | - | ||
162 | export const serviceCompletions: TbEditorCompletions = { | 159 | export const serviceCompletions: TbEditorCompletions = { |
163 | deviceService: { | 160 | deviceService: { |
164 | description: 'Device Service API<br>' + | 161 | description: 'Device Service API<br>' + |
@@ -668,7 +665,8 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -668,7 +665,8 @@ export const serviceCompletions: TbEditorCompletions = { | ||
668 | meta: 'function', | 665 | meta: 'function', |
669 | args: [ | 666 | args: [ |
670 | {name: 'tenantId', type: 'string', description: 'Id of the tenant'}, | 667 | {name: 'tenantId', type: 'string', description: 'Id of the tenant'}, |
671 | - pageLinkArg | 668 | + pageLinkArg, |
669 | + requestConfigArg | ||
672 | ], | 670 | ], |
673 | return: observablePageDataReturnType(dashboardInfoHref) | 671 | return: observablePageDataReturnType(dashboardInfoHref) |
674 | }, | 672 | }, |
@@ -729,7 +727,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -729,7 +727,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
729 | return: observableReturnType(dashboardHref) | 727 | return: observableReturnType(dashboardHref) |
730 | }, | 728 | }, |
731 | unassignDashboardFromCustomer: { | 729 | unassignDashboardFromCustomer: { |
732 | - description: 'Unassign dashboard from any customer', | 730 | + description: 'Unassign dashboard from specific customer', |
733 | meta: 'function', | 731 | meta: 'function', |
734 | args: [ | 732 | args: [ |
735 | {name: 'customerId', type: 'string', description: 'Id of the customer'}, | 733 | {name: 'customerId', type: 'string', description: 'Id of the customer'}, |
@@ -784,7 +782,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -784,7 +782,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
784 | {name: 'customerIds', type: `Array<string>`, description: 'Id of the customers'}, | 782 | {name: 'customerIds', type: `Array<string>`, description: 'Id of the customers'}, |
785 | requestConfigArg | 783 | requestConfigArg |
786 | ], | 784 | ], |
787 | - return: observableArrayReturnType(dashboardHref) | 785 | + return: observableReturnType(dashboardHref) |
788 | }, | 786 | }, |
789 | getPublicDashboardLink: { | 787 | getPublicDashboardLink: { |
790 | description: 'Get public dashboard link', | 788 | description: 'Get public dashboard link', |
@@ -855,6 +853,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -855,6 +853,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
855 | meta: 'function', | 853 | meta: 'function', |
856 | args: [ | 854 | args: [ |
857 | {name: 'user', type: userHref, description: 'User object to save'}, | 855 | {name: 'user', type: userHref, description: 'User object to save'}, |
856 | + {name: 'sendActivationMail', type: 'boolean', description: 'Send activation email', optional: true}, | ||
858 | requestConfigArg | 857 | requestConfigArg |
859 | ], | 858 | ], |
860 | return: observableReturnType(userHref) | 859 | return: observableReturnType(userHref) |
@@ -876,7 +875,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -876,7 +875,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
876 | {name: 'userCredentialsEnabled', type: 'boolean', description: 'User credentials enabled'}, | 875 | {name: 'userCredentialsEnabled', type: 'boolean', description: 'User credentials enabled'}, |
877 | requestConfigArg | 876 | requestConfigArg |
878 | ], | 877 | ], |
879 | - return: observableReturnType(userHref) | 878 | + return: observableReturnTypeVariable('any') |
880 | }, | 879 | }, |
881 | getActivationLink: { | 880 | getActivationLink: { |
882 | description: 'Get activation link by id', | 881 | description: 'Get activation link by id', |
@@ -929,7 +928,6 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -929,7 +928,6 @@ export const serviceCompletions: TbEditorCompletions = { | ||
929 | meta: 'function', | 928 | meta: 'function', |
930 | args: [ | 929 | args: [ |
931 | {name: 'entityId', type: entityIdHref, description: 'Entity Id'}, | 930 | {name: 'entityId', type: entityIdHref, description: 'Entity Id'}, |
932 | - {name: 'relationType', type: 'string', description: 'Relation type'}, | ||
933 | requestConfigArg | 931 | requestConfigArg |
934 | ], | 932 | ], |
935 | return: observableVoid() | 933 | return: observableVoid() |
@@ -1044,7 +1042,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -1044,7 +1042,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
1044 | args: [ | 1042 | args: [ |
1045 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, | 1043 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, |
1046 | {name: 'attributeScope', type: attributeScopeHref, description: 'Attribute scope'}, | 1044 | {name: 'attributeScope', type: attributeScopeHref, description: 'Attribute scope'}, |
1047 | - {name: 'attributes', type: `array<${attributeDataHref}>`, description: 'Array of the attributes'}, | 1045 | + {name: 'attributes', type: `array<${attributeDataHref}>`, description: 'Array of the attributes data'}, |
1048 | requestConfigArg | 1046 | requestConfigArg |
1049 | ], | 1047 | ], |
1050 | return: observableReturnTypeVariable('any') | 1048 | return: observableReturnTypeVariable('any') |
@@ -1054,7 +1052,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -1054,7 +1052,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
1054 | meta: 'function', | 1052 | meta: 'function', |
1055 | args: [ | 1053 | args: [ |
1056 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, | 1054 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, |
1057 | - {name: 'timeseries', type: `Array<${attributeDataHref}>>`, description: 'Array of the timeseries'}, | 1055 | + {name: 'timeseries', type: `Array<${attributeDataHref}>>`, description: 'Array of the timeseries data'}, |
1058 | {name: 'deleteAllDataForKeys', type: 'boolean', optional: true, description: 'Delete all data for keys'}, | 1056 | {name: 'deleteAllDataForKeys', type: 'boolean', optional: true, description: 'Delete all data for keys'}, |
1059 | requestConfigArg | 1057 | requestConfigArg |
1060 | ], | 1058 | ], |
@@ -1066,7 +1064,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -1066,7 +1064,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
1066 | args: [ | 1064 | args: [ |
1067 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, | 1065 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, |
1068 | {name: 'attributeScope', type: attributeScopeHref, description: 'Attribute scope'}, | 1066 | {name: 'attributeScope', type: attributeScopeHref, description: 'Attribute scope'}, |
1069 | - {name: 'attributes', type: 'Array<${attributeDataHref}>>', description: 'Array of the attributes'}, | 1067 | + {name: 'attributes', type: 'Array<${attributeDataHref}>>', description: 'Array of the attributes data'}, |
1070 | requestConfigArg | 1068 | requestConfigArg |
1071 | ], | 1069 | ], |
1072 | return: observableReturnTypeVariable('any') | 1070 | return: observableReturnTypeVariable('any') |
@@ -1077,7 +1075,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -1077,7 +1075,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
1077 | args: [ | 1075 | args: [ |
1078 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, | 1076 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, |
1079 | {name: 'timeseriesScope', type: 'string', description: 'Timeseries scope'}, | 1077 | {name: 'timeseriesScope', type: 'string', description: 'Timeseries scope'}, |
1080 | - {name: 'timeseries', type: `Array<attributeDataHref>`, description: 'Array of the timeseries'}, | 1078 | + {name: 'timeseries', type: `Array<attributeDataHref>`, description: 'Array of the timeseries data'}, |
1081 | requestConfigArg | 1079 | requestConfigArg |
1082 | ], | 1080 | ], |
1083 | return: observableReturnTypeVariable('any') | 1081 | return: observableReturnTypeVariable('any') |
@@ -1098,7 +1096,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -1098,7 +1096,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
1098 | {name: 'entityId', type: 'string', description: 'Id of the entity'}, | 1096 | {name: 'entityId', type: 'string', description: 'Id of the entity'}, |
1099 | requestConfigArg | 1097 | requestConfigArg |
1100 | ], | 1098 | ], |
1101 | - return: observableBaseDataReturnType(entityIdHref) | 1099 | + return: observableBaseDataReturnType() |
1102 | }, | 1100 | }, |
1103 | getEntities: { | 1101 | getEntities: { |
1104 | description: 'Get entities by ids', | 1102 | description: 'Get entities by ids', |
@@ -1108,7 +1106,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -1108,7 +1106,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
1108 | {name: 'entityIds', type: `Array<string>`, description: 'Ids of the entities'}, | 1106 | {name: 'entityIds', type: `Array<string>`, description: 'Ids of the entities'}, |
1109 | requestConfigArg | 1107 | requestConfigArg |
1110 | ], | 1108 | ], |
1111 | - return: observableArrayBaseDataReturnType(entityIdHref) | 1109 | + return: observableArrayBaseDataReturnType() |
1112 | }, | 1110 | }, |
1113 | getEntitiesByNameFilter: { | 1111 | getEntitiesByNameFilter: { |
1114 | description: 'Get entities by name filter', | 1112 | description: 'Get entities by name filter', |
@@ -1120,7 +1118,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -1120,7 +1118,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
1120 | {name: 'subType', type: 'string', optional: true, description: 'Subtype'}, | 1118 | {name: 'subType', type: 'string', optional: true, description: 'Subtype'}, |
1121 | requestConfigArg | 1119 | requestConfigArg |
1122 | ], | 1120 | ], |
1123 | - return: observableArrayBaseDataReturnType(entityIdHref) | 1121 | + return: observableArrayBaseDataReturnType() |
1124 | }, | 1122 | }, |
1125 | findEntityDataByQuery: { | 1123 | findEntityDataByQuery: { |
1126 | description: 'Find entity data by query', | 1124 | description: 'Find entity data by query', |
@@ -1155,7 +1153,6 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -1155,7 +1153,6 @@ export const serviceCompletions: TbEditorCompletions = { | ||
1155 | meta: 'function', | 1153 | meta: 'function', |
1156 | args: [ | 1154 | args: [ |
1157 | {name: 'filter', type: entityFilterHref, description: 'Filter for the entity'}, | 1155 | {name: 'filter', type: entityFilterHref, description: 'Filter for the entity'}, |
1158 | - {name: 'searchText', type: 'string', description: 'Search text'}, | ||
1159 | requestConfigArg | 1156 | requestConfigArg |
1160 | ], | 1157 | ], |
1161 | return: observableReturnType(entityInfoHref) | 1158 | return: observableReturnType(entityInfoHref) |
@@ -1164,8 +1161,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -1164,8 +1161,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
1164 | description: 'Get alias filter types by entity types', | 1161 | description: 'Get alias filter types by entity types', |
1165 | meta: 'function', | 1162 | meta: 'function', |
1166 | args: [ | 1163 | args: [ |
1167 | - {name: 'entityTypes', type: `Array<${entityTypeHref}|${aliasEntityTypeHref}>`, description: 'Entity types'}, | ||
1168 | - {name: 'searchText', type: 'string', description: 'Search text'} | 1164 | + {name: 'entityTypes', type: `Array<${entityTypeHref}|${aliasEntityTypeHref}>`, description: 'Entity types'} |
1169 | ], | 1165 | ], |
1170 | return: { | 1166 | return: { |
1171 | type: `Array<${aliasFilterTypeHref}$gt;`, | 1167 | type: `Array<${aliasFilterTypeHref}$gt;`, |
@@ -1354,7 +1350,7 @@ export const serviceCompletions: TbEditorCompletions = { | @@ -1354,7 +1350,7 @@ export const serviceCompletions: TbEditorCompletions = { | ||
1354 | args: [ | 1350 | args: [ |
1355 | {name: 'template', type: 'string', description: 'Template'}, | 1351 | {name: 'template', type: 'string', description: 'Template'}, |
1356 | {name: 'controller', type: customDialogComponentHref, description: 'Controller'}, | 1352 | {name: 'controller', type: customDialogComponentHref, description: 'Controller'}, |
1357 | - {name: 'data', type: 'any', description: 'Data'}, | 1353 | + {name: 'data', type: 'any', description: 'Data', optional: true}, |
1358 | ], | 1354 | ], |
1359 | return: observableReturnTypeVariable('any') | 1355 | return: observableReturnTypeVariable('any') |
1360 | }, | 1356 | }, |