|
|
|
@ -102,10 +102,6 @@ export const customDialogComponentHref = '<a href="https://github.com/thingsboar |
|
|
|
|
|
|
|
export const resourceInfoHref = '<a href="https://github.com/thingsboard/thingsboard/blob/b033b51712244d08e0f5e0beb8be60c9f8fa4cd2/ui-ngx/src/app/shared/models/resource.models.ts#L51" target="_blank">Resource info</a>'; |
|
|
|
|
|
|
|
export const bulkImportResultHref = '<a href="https://github.com/thingsboard/thingsboard/blob/1abaa6f1188e5adc80912e7475ccb6347a822c8d/ui-ngx/src/app/shared/import-export/import-export.models.ts#L135" target="_blank">Bulk import result</a>'; |
|
|
|
|
|
|
|
export const bulkImportRequestHref = '<a href="https://github.com/thingsboard/thingsboard/blob/1abaa6f1188e5adc80912e7475ccb6347a822c8d/ui-ngx/src/app/shared/import-export/import-export.models.ts#L125" target="_blank">Bulk import request</a>'; |
|
|
|
|
|
|
|
export const pageLinkArg: FunctionArg = { |
|
|
|
name: 'pageLink', |
|
|
|
type: '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/page/page-link.ts#L68" target="_blank">PageLink</a>', |
|
|
|
@ -370,6 +366,27 @@ export const serviceCompletions: TbEditorCompletions = { |
|
|
|
meta: 'service', |
|
|
|
type: '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/core/http/asset.service.ts#L29" target="_blank">AssetService</a>', |
|
|
|
children: { |
|
|
|
getTenantAssetInfos: { |
|
|
|
description: 'Get tenant assets', |
|
|
|
meta: 'function', |
|
|
|
args: [ |
|
|
|
pageLinkArg, |
|
|
|
{name: 'type', type: 'string', optional: true, description: 'Asset type'}, |
|
|
|
requestConfigArg |
|
|
|
], |
|
|
|
return: observablePageDataReturnType(assetInfoHref) |
|
|
|
}, |
|
|
|
getCustomerAssetInfos: { |
|
|
|
description: 'Get customer assets', |
|
|
|
meta: 'function', |
|
|
|
args: [ |
|
|
|
{name: 'customerId', type: 'string', description: 'Id of the customer'}, |
|
|
|
pageLinkArg, |
|
|
|
{name: 'type', type: 'string', optional: true, description: 'Asset type'}, |
|
|
|
requestConfigArg |
|
|
|
], |
|
|
|
return: observablePageDataReturnType(assetInfoHref) |
|
|
|
}, |
|
|
|
getAsset: { |
|
|
|
description: 'Get asset by id', |
|
|
|
meta: 'function', |
|
|
|
@ -397,80 +414,53 @@ export const serviceCompletions: TbEditorCompletions = { |
|
|
|
], |
|
|
|
return: observableReturnType(assetInfoHref) |
|
|
|
}, |
|
|
|
getTenantAssets: { |
|
|
|
description: 'Get assets for the tenant, filtered by type if provided', |
|
|
|
meta: 'function', |
|
|
|
args: [ |
|
|
|
pageLinkArg, |
|
|
|
{ name: 'type', type: 'string', description: 'Optional asset type filter' }, |
|
|
|
requestConfigArg |
|
|
|
], |
|
|
|
return: observablePageDataReturnType(assetHref) |
|
|
|
}, |
|
|
|
getCustomerAssets: { |
|
|
|
description: 'Get assets for a specific customer, filtered by type if provided', |
|
|
|
meta: 'function', |
|
|
|
args: [ |
|
|
|
{ name: 'customerId', type: 'string', description: 'Customer ID' }, |
|
|
|
pageLinkArg, |
|
|
|
{ name: 'type', type: 'string', description: 'Optional asset type filter' }, |
|
|
|
requestConfigArg |
|
|
|
], |
|
|
|
return: observablePageDataReturnType(assetHref) |
|
|
|
}, |
|
|
|
getUserAssets: { |
|
|
|
description: 'Get assets associated with the user, filtered by type if provided', |
|
|
|
saveAsset: { |
|
|
|
description: 'Save asset', |
|
|
|
meta: 'function', |
|
|
|
args: [ |
|
|
|
pageLinkArg, |
|
|
|
{ name: 'type', type: 'string', description: 'Optional asset type filter' }, |
|
|
|
{name: 'asset', type: assetHref, description: 'Asset object to save'}, |
|
|
|
requestConfigArg |
|
|
|
], |
|
|
|
return: observablePageDataReturnType(assetHref) |
|
|
|
return: observableReturnType(assetHref) |
|
|
|
}, |
|
|
|
getAllAssetInfos: { |
|
|
|
description: 'Get all asset information with optional customer inclusion', |
|
|
|
deleteAsset: { |
|
|
|
description: 'Delete asset by id', |
|
|
|
meta: 'function', |
|
|
|
args: [ |
|
|
|
{ name: 'includeCustomers', type: 'boolean', description: 'Whether to include customers in the result' }, |
|
|
|
pageLinkArg, |
|
|
|
{ name: 'assetProfileId', type: 'string', description: 'Optional asset profile ID' }, |
|
|
|
{name: 'assetId', type: 'string', description: 'Id of the asset'}, |
|
|
|
requestConfigArg |
|
|
|
], |
|
|
|
return: observablePageDataReturnType(assetInfoHref) |
|
|
|
return: observableVoid() |
|
|
|
}, |
|
|
|
getCustomerAssetInfos: { |
|
|
|
description: 'Get customer asset information with optional customer inclusion', |
|
|
|
getAssetTypes: { |
|
|
|
description: 'Get all available assets types', |
|
|
|
meta: 'function', |
|
|
|
args: [ |
|
|
|
{ name: 'includeCustomers', type: 'boolean', description: 'Whether to include customers in the result' }, |
|
|
|
{ name: 'customerId', type: 'string', description: 'Customer ID' }, |
|
|
|
pageLinkArg, |
|
|
|
{ name: 'assetProfileId', type: 'string', description: 'Optional asset profile ID' }, |
|
|
|
requestConfigArg |
|
|
|
], |
|
|
|
return: observablePageDataReturnType(assetInfoHref) |
|
|
|
return: observableArrayReturnType('<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/entity-type.models.ts#L295" target="_blank">EntitySubtype</a>') |
|
|
|
}, |
|
|
|
bulkImportAssets: { |
|
|
|
description: 'Bulk import assets with provided entities data', |
|
|
|
makeAssetPublic: { |
|
|
|
description: 'Make asset public (available from public dashboard)', |
|
|
|
meta: 'function', |
|
|
|
args: [ |
|
|
|
{ name: 'entitiesData', type: bulkImportRequestHref, description: 'Data for bulk importing assets' }, |
|
|
|
{name: 'assetId', type: 'string', description: 'Id of the asset'}, |
|
|
|
requestConfigArg |
|
|
|
], |
|
|
|
return: observableReturnType(bulkImportResultHref) |
|
|
|
return: observableReturnType(assetHref) |
|
|
|
}, |
|
|
|
saveAsset: { |
|
|
|
description: 'Save asset', |
|
|
|
assignAssetToCustomer: { |
|
|
|
description: 'Assign asset to specific customer', |
|
|
|
meta: 'function', |
|
|
|
args: [ |
|
|
|
{name: 'asset', type: assetHref, description: 'Asset object to save'}, |
|
|
|
{name: 'customerId', type: 'string', description: 'Id of the customer'}, |
|
|
|
{name: 'assetId', type: 'string', description: 'Id of the asset'}, |
|
|
|
requestConfigArg |
|
|
|
], |
|
|
|
return: observableReturnType(assetHref) |
|
|
|
}, |
|
|
|
deleteAsset: { |
|
|
|
description: 'Delete asset by id', |
|
|
|
unassignAssetFromCustomer: { |
|
|
|
description: 'Unassign asset from any customer', |
|
|
|
meta: 'function', |
|
|
|
args: [ |
|
|
|
{name: 'assetId', type: 'string', description: 'Id of the asset'}, |
|
|
|
@ -478,14 +468,6 @@ export const serviceCompletions: TbEditorCompletions = { |
|
|
|
], |
|
|
|
return: observableVoid() |
|
|
|
}, |
|
|
|
getAssetTypes: { |
|
|
|
description: 'Get all available assets types', |
|
|
|
meta: 'function', |
|
|
|
args: [ |
|
|
|
requestConfigArg |
|
|
|
], |
|
|
|
return: observableArrayReturnType('<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/entity-type.models.ts#L295" target="_blank">EntitySubtype</a>') |
|
|
|
}, |
|
|
|
findByQuery: { |
|
|
|
description: 'Find assets by search query', |
|
|
|
meta: 'function', |
|
|
|
|