|
| 1 | +import { createCustomApiCallAction } from '@openops/blocks-common'; |
| 2 | +import { createBlock, Property } from '@openops/blocks-framework'; |
| 3 | +import { BlockCategory } from '@openops/shared'; |
| 4 | +import { HGAuth, hyperglanceAuth } from './lib/auth'; |
| 5 | +import { getRecommendations} from './lib/actions/getRecommendations'; |
| 6 | +import { exportTopologyForGroup } from './lib/actions/exportTopologyForGroup'; |
| 7 | +import { searchTopology } from './lib/actions/searchTopology'; |
| 8 | +import { getCollectorRecords } from './lib/actions/getCollectorRecords'; |
| 9 | +import { getCollectorRecordStatus } from './lib/actions/getCollectorRecordStatus'; |
| 10 | +import { getCollectorRecordStatistics } from './lib/actions/getCollectorRecordStatistics'; |
| 11 | + |
| 12 | +export const hyperglance = createBlock({ |
| 13 | + displayName: 'Hyperglance', |
| 14 | + auth: hyperglanceAuth, |
| 15 | + minimumSupportedRelease: '0.20.0', |
| 16 | + logoUrl: 'https://static.openops.com/blocks/hyperglance.svg', |
| 17 | + authors: [], |
| 18 | + categories: [BlockCategory.FINOPS], |
| 19 | + actions: [ |
| 20 | + exportTopologyForGroup, |
| 21 | + getCollectorRecordStatistics, |
| 22 | + getCollectorRecordStatus, |
| 23 | + getRecommendations, |
| 24 | + searchTopology, |
| 25 | + getCollectorRecords, |
| 26 | + createCustomApiCallAction({ |
| 27 | + baseUrl: (auth) => { |
| 28 | + return `${(auth as HGAuth).instanceUrl}/hgapi/`; |
| 29 | + }, |
| 30 | + auth: hyperglanceAuth, |
| 31 | + additionalProps: { |
| 32 | + documentation: Property.MarkDown({ |
| 33 | + value: |
| 34 | + 'For more information, visit the [Hyperglance API documentation](https://support.hyperglance.com/knowledge/getting-started-with-the-hyperglance-api).', |
| 35 | + }), |
| 36 | + }, |
| 37 | + name:'customHgApiCall' |
| 38 | + }), |
| 39 | + ], |
| 40 | + triggers: [], |
| 41 | +}); |
0 commit comments