diff --git a/ui-ngx/src/app/shared/models/ace/service-completion.models.ts b/ui-ngx/src/app/shared/models/ace/service-completion.models.ts index 5efc428194..709d670e6b 100644 --- a/ui-ngx/src/app/shared/models/ace/service-completion.models.ts +++ b/ui-ngx/src/app/shared/models/ace/service-completion.models.ts @@ -102,6 +102,10 @@ export const customDialogComponentHref = 'Resource info'; +export const bulkImportResultHref = 'Bulk import result'; + +export const bulkImportRequestHref = 'Bulk import request'; + export const pageLinkArg: FunctionArg = { name: 'pageLink', type: 'PageLink', @@ -366,27 +370,6 @@ export const serviceCompletions: TbEditorCompletions = { meta: 'service', type: 'AssetService', 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', @@ -414,53 +397,80 @@ export const serviceCompletions: TbEditorCompletions = { ], return: observableReturnType(assetInfoHref) }, - saveAsset: { - description: 'Save asset', + getTenantAssets: { + description: 'Get assets for the tenant, filtered by type if provided', meta: 'function', args: [ - {name: 'asset', type: assetHref, description: 'Asset object to save'}, + pageLinkArg, + { name: 'type', type: 'string', description: 'Optional asset type filter' }, requestConfigArg ], - return: observableReturnType(assetHref) + return: observablePageDataReturnType(assetHref) }, - deleteAsset: { - description: 'Delete asset by id', + getCustomerAssets: { + description: 'Get assets for a specific customer, filtered by type if provided', meta: 'function', args: [ - {name: 'assetId', type: 'string', description: 'Id of the asset'}, + { name: 'customerId', type: 'string', description: 'Customer ID' }, + pageLinkArg, + { name: 'type', type: 'string', description: 'Optional asset type filter' }, requestConfigArg ], - return: observableVoid() + return: observablePageDataReturnType(assetHref) }, - getAssetTypes: { - description: 'Get all available assets types', + getUserAssets: { + description: 'Get assets associated with the user, filtered by type if provided', meta: 'function', args: [ + pageLinkArg, + { name: 'type', type: 'string', description: 'Optional asset type filter' }, requestConfigArg ], - return: observableArrayReturnType('EntitySubtype') + return: observablePageDataReturnType(assetHref) }, - makeAssetPublic: { - description: 'Make asset public (available from public dashboard)', + getAllAssetInfos: { + description: 'Get all asset information with optional customer inclusion', meta: 'function', args: [ - {name: 'assetId', type: 'string', description: 'Id of the asset'}, + { name: 'includeCustomers', type: 'boolean', description: 'Whether to include customers in the result' }, + pageLinkArg, + { name: 'assetProfileId', type: 'string', description: 'Optional asset profile ID' }, requestConfigArg ], - return: observableReturnType(assetHref) + return: observablePageDataReturnType(assetInfoHref) }, - assignAssetToCustomer: { - description: 'Assign asset to specific customer', + getCustomerAssetInfos: { + description: 'Get customer asset information with optional customer inclusion', meta: 'function', args: [ - {name: 'customerId', type: 'string', description: 'Id of the customer'}, - {name: 'assetId', type: 'string', description: 'Id of the asset'}, + { 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) + }, + bulkImportAssets: { + description: 'Bulk import assets with provided entities data', + meta: 'function', + args: [ + { name: 'entitiesData', type: bulkImportRequestHref, description: 'Data for bulk importing assets' }, + requestConfigArg + ], + return: observableReturnType(bulkImportResultHref) + }, + saveAsset: { + description: 'Save asset', + meta: 'function', + args: [ + {name: 'asset', type: assetHref, description: 'Asset object to save'}, requestConfigArg ], return: observableReturnType(assetHref) }, - unassignAssetFromCustomer: { - description: 'Unassign asset from any customer', + deleteAsset: { + description: 'Delete asset by id', meta: 'function', args: [ {name: 'assetId', type: 'string', description: 'Id of the asset'}, @@ -468,6 +478,14 @@ export const serviceCompletions: TbEditorCompletions = { ], return: observableVoid() }, + getAssetTypes: { + description: 'Get all available assets types', + meta: 'function', + args: [ + requestConfigArg + ], + return: observableArrayReturnType('EntitySubtype') + }, findByQuery: { description: 'Find assets by search query', meta: 'function',