Correct services arguments
This commit is contained in:
parent
156f7d6ae7
commit
f7b867a10c
@ -135,21 +135,20 @@ export function observableArrayReturnType(objectType: string): FunctionArgType {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function observableBaseDataReturnType(objectType: string): FunctionArgType {
|
export function observableBaseDataReturnType(): FunctionArgType {
|
||||||
return {
|
return {
|
||||||
type: `Observable<${baseDataHref}<${objectType}>>`,
|
type: `Observable<${baseDataHref}<${entityIdHref}>>`,
|
||||||
description: `An <code>Observable</code> of page result as a <code>${baseDataHref}</code> holding array of <code>${objectType}</code> objects.`
|
description: `An <code>Observable</code> of <code>${baseDataHref}</code> object.`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function observableArrayBaseDataReturnType(objectType: string): FunctionArgType {
|
export function observableArrayBaseDataReturnType(): FunctionArgType {
|
||||||
return {
|
return {
|
||||||
type: `Observable<Array<${baseDataHref}<${objectType}>>>`,
|
type: `Observable<Array<${baseDataHref}<${entityIdHref}>>>`,
|
||||||
description: `An <code>Observable</code> of page result as a <code>${baseDataHref}</code> holding array of <code>${objectType}</code> objects.`
|
description: `An <code>Observable</code> of array of <code>${baseDataHref}</code> objects.`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function observablePageDataReturnType(objectType: string): FunctionArgType {
|
export function observablePageDataReturnType(objectType: string): FunctionArgType {
|
||||||
return {
|
return {
|
||||||
type: `Observable<${pageDataHref}<${objectType}>>`,
|
type: `Observable<${pageDataHref}<${objectType}>>`,
|
||||||
@ -157,8 +156,6 @@ export function observablePageDataReturnType(objectType: string): FunctionArgTyp
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const serviceCompletions: TbEditorCompletions = {
|
export const serviceCompletions: TbEditorCompletions = {
|
||||||
deviceService: {
|
deviceService: {
|
||||||
description: 'Device Service API<br>' +
|
description: 'Device Service API<br>' +
|
||||||
@ -668,7 +665,8 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
meta: 'function',
|
meta: 'function',
|
||||||
args: [
|
args: [
|
||||||
{name: 'tenantId', type: 'string', description: 'Id of the tenant'},
|
{name: 'tenantId', type: 'string', description: 'Id of the tenant'},
|
||||||
pageLinkArg
|
pageLinkArg,
|
||||||
|
requestConfigArg
|
||||||
],
|
],
|
||||||
return: observablePageDataReturnType(dashboardInfoHref)
|
return: observablePageDataReturnType(dashboardInfoHref)
|
||||||
},
|
},
|
||||||
@ -729,7 +727,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
return: observableReturnType(dashboardHref)
|
return: observableReturnType(dashboardHref)
|
||||||
},
|
},
|
||||||
unassignDashboardFromCustomer: {
|
unassignDashboardFromCustomer: {
|
||||||
description: 'Unassign dashboard from any customer',
|
description: 'Unassign dashboard from specific customer',
|
||||||
meta: 'function',
|
meta: 'function',
|
||||||
args: [
|
args: [
|
||||||
{name: 'customerId', type: 'string', description: 'Id of the customer'},
|
{name: 'customerId', type: 'string', description: 'Id of the customer'},
|
||||||
@ -784,7 +782,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
{name: 'customerIds', type: `Array<string>`, description: 'Id of the customers'},
|
{name: 'customerIds', type: `Array<string>`, description: 'Id of the customers'},
|
||||||
requestConfigArg
|
requestConfigArg
|
||||||
],
|
],
|
||||||
return: observableArrayReturnType(dashboardHref)
|
return: observableReturnType(dashboardHref)
|
||||||
},
|
},
|
||||||
getPublicDashboardLink: {
|
getPublicDashboardLink: {
|
||||||
description: 'Get public dashboard link',
|
description: 'Get public dashboard link',
|
||||||
@ -855,6 +853,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
meta: 'function',
|
meta: 'function',
|
||||||
args: [
|
args: [
|
||||||
{name: 'user', type: userHref, description: 'User object to save'},
|
{name: 'user', type: userHref, description: 'User object to save'},
|
||||||
|
{name: 'sendActivationMail', type: 'boolean', description: 'Send activation email', optional: true},
|
||||||
requestConfigArg
|
requestConfigArg
|
||||||
],
|
],
|
||||||
return: observableReturnType(userHref)
|
return: observableReturnType(userHref)
|
||||||
@ -876,7 +875,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
{name: 'userCredentialsEnabled', type: 'boolean', description: 'User credentials enabled'},
|
{name: 'userCredentialsEnabled', type: 'boolean', description: 'User credentials enabled'},
|
||||||
requestConfigArg
|
requestConfigArg
|
||||||
],
|
],
|
||||||
return: observableReturnType(userHref)
|
return: observableReturnTypeVariable('any')
|
||||||
},
|
},
|
||||||
getActivationLink: {
|
getActivationLink: {
|
||||||
description: 'Get activation link by id',
|
description: 'Get activation link by id',
|
||||||
@ -929,7 +928,6 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
meta: 'function',
|
meta: 'function',
|
||||||
args: [
|
args: [
|
||||||
{name: 'entityId', type: entityIdHref, description: 'Entity Id'},
|
{name: 'entityId', type: entityIdHref, description: 'Entity Id'},
|
||||||
{name: 'relationType', type: 'string', description: 'Relation type'},
|
|
||||||
requestConfigArg
|
requestConfigArg
|
||||||
],
|
],
|
||||||
return: observableVoid()
|
return: observableVoid()
|
||||||
@ -1044,7 +1042,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
args: [
|
args: [
|
||||||
{name: 'entityId', type: entityIdHref, description: 'Id of the entity'},
|
{name: 'entityId', type: entityIdHref, description: 'Id of the entity'},
|
||||||
{name: 'attributeScope', type: attributeScopeHref, description: 'Attribute scope'},
|
{name: 'attributeScope', type: attributeScopeHref, description: 'Attribute scope'},
|
||||||
{name: 'attributes', type: `array<${attributeDataHref}>`, description: 'Array of the attributes'},
|
{name: 'attributes', type: `array<${attributeDataHref}>`, description: 'Array of the attributes data'},
|
||||||
requestConfigArg
|
requestConfigArg
|
||||||
],
|
],
|
||||||
return: observableReturnTypeVariable('any')
|
return: observableReturnTypeVariable('any')
|
||||||
@ -1054,7 +1052,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
meta: 'function',
|
meta: 'function',
|
||||||
args: [
|
args: [
|
||||||
{name: 'entityId', type: entityIdHref, description: 'Id of the entity'},
|
{name: 'entityId', type: entityIdHref, description: 'Id of the entity'},
|
||||||
{name: 'timeseries', type: `Array<${attributeDataHref}>>`, description: 'Array of the timeseries'},
|
{name: 'timeseries', type: `Array<${attributeDataHref}>>`, description: 'Array of the timeseries data'},
|
||||||
{name: 'deleteAllDataForKeys', type: 'boolean', optional: true, description: 'Delete all data for keys'},
|
{name: 'deleteAllDataForKeys', type: 'boolean', optional: true, description: 'Delete all data for keys'},
|
||||||
requestConfigArg
|
requestConfigArg
|
||||||
],
|
],
|
||||||
@ -1066,7 +1064,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
args: [
|
args: [
|
||||||
{name: 'entityId', type: entityIdHref, description: 'Id of the entity'},
|
{name: 'entityId', type: entityIdHref, description: 'Id of the entity'},
|
||||||
{name: 'attributeScope', type: attributeScopeHref, description: 'Attribute scope'},
|
{name: 'attributeScope', type: attributeScopeHref, description: 'Attribute scope'},
|
||||||
{name: 'attributes', type: 'Array<${attributeDataHref}>>', description: 'Array of the attributes'},
|
{name: 'attributes', type: 'Array<${attributeDataHref}>>', description: 'Array of the attributes data'},
|
||||||
requestConfigArg
|
requestConfigArg
|
||||||
],
|
],
|
||||||
return: observableReturnTypeVariable('any')
|
return: observableReturnTypeVariable('any')
|
||||||
@ -1077,7 +1075,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
args: [
|
args: [
|
||||||
{name: 'entityId', type: entityIdHref, description: 'Id of the entity'},
|
{name: 'entityId', type: entityIdHref, description: 'Id of the entity'},
|
||||||
{name: 'timeseriesScope', type: 'string', description: 'Timeseries scope'},
|
{name: 'timeseriesScope', type: 'string', description: 'Timeseries scope'},
|
||||||
{name: 'timeseries', type: `Array<attributeDataHref>`, description: 'Array of the timeseries'},
|
{name: 'timeseries', type: `Array<attributeDataHref>`, description: 'Array of the timeseries data'},
|
||||||
requestConfigArg
|
requestConfigArg
|
||||||
],
|
],
|
||||||
return: observableReturnTypeVariable('any')
|
return: observableReturnTypeVariable('any')
|
||||||
@ -1098,7 +1096,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
{name: 'entityId', type: 'string', description: 'Id of the entity'},
|
{name: 'entityId', type: 'string', description: 'Id of the entity'},
|
||||||
requestConfigArg
|
requestConfigArg
|
||||||
],
|
],
|
||||||
return: observableBaseDataReturnType(entityIdHref)
|
return: observableBaseDataReturnType()
|
||||||
},
|
},
|
||||||
getEntities: {
|
getEntities: {
|
||||||
description: 'Get entities by ids',
|
description: 'Get entities by ids',
|
||||||
@ -1108,7 +1106,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
{name: 'entityIds', type: `Array<string>`, description: 'Ids of the entities'},
|
{name: 'entityIds', type: `Array<string>`, description: 'Ids of the entities'},
|
||||||
requestConfigArg
|
requestConfigArg
|
||||||
],
|
],
|
||||||
return: observableArrayBaseDataReturnType(entityIdHref)
|
return: observableArrayBaseDataReturnType()
|
||||||
},
|
},
|
||||||
getEntitiesByNameFilter: {
|
getEntitiesByNameFilter: {
|
||||||
description: 'Get entities by name filter',
|
description: 'Get entities by name filter',
|
||||||
@ -1120,7 +1118,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
{name: 'subType', type: 'string', optional: true, description: 'Subtype'},
|
{name: 'subType', type: 'string', optional: true, description: 'Subtype'},
|
||||||
requestConfigArg
|
requestConfigArg
|
||||||
],
|
],
|
||||||
return: observableArrayBaseDataReturnType(entityIdHref)
|
return: observableArrayBaseDataReturnType()
|
||||||
},
|
},
|
||||||
findEntityDataByQuery: {
|
findEntityDataByQuery: {
|
||||||
description: 'Find entity data by query',
|
description: 'Find entity data by query',
|
||||||
@ -1155,7 +1153,6 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
meta: 'function',
|
meta: 'function',
|
||||||
args: [
|
args: [
|
||||||
{name: 'filter', type: entityFilterHref, description: 'Filter for the entity'},
|
{name: 'filter', type: entityFilterHref, description: 'Filter for the entity'},
|
||||||
{name: 'searchText', type: 'string', description: 'Search text'},
|
|
||||||
requestConfigArg
|
requestConfigArg
|
||||||
],
|
],
|
||||||
return: observableReturnType(entityInfoHref)
|
return: observableReturnType(entityInfoHref)
|
||||||
@ -1164,8 +1161,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
description: 'Get alias filter types by entity types',
|
description: 'Get alias filter types by entity types',
|
||||||
meta: 'function',
|
meta: 'function',
|
||||||
args: [
|
args: [
|
||||||
{name: 'entityTypes', type: `Array<${entityTypeHref}|${aliasEntityTypeHref}>`, description: 'Entity types'},
|
{name: 'entityTypes', type: `Array<${entityTypeHref}|${aliasEntityTypeHref}>`, description: 'Entity types'}
|
||||||
{name: 'searchText', type: 'string', description: 'Search text'}
|
|
||||||
],
|
],
|
||||||
return: {
|
return: {
|
||||||
type: `Array<${aliasFilterTypeHref}$gt;`,
|
type: `Array<${aliasFilterTypeHref}$gt;`,
|
||||||
@ -1354,7 +1350,7 @@ export const serviceCompletions: TbEditorCompletions = {
|
|||||||
args: [
|
args: [
|
||||||
{name: 'template', type: 'string', description: 'Template'},
|
{name: 'template', type: 'string', description: 'Template'},
|
||||||
{name: 'controller', type: customDialogComponentHref, description: 'Controller'},
|
{name: 'controller', type: customDialogComponentHref, description: 'Controller'},
|
||||||
{name: 'data', type: 'any', description: 'Data'},
|
{name: 'data', type: 'any', description: 'Data', optional: true},
|
||||||
],
|
],
|
||||||
return: observableReturnTypeVariable('any')
|
return: observableReturnTypeVariable('any')
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user