diff --git a/.eslintrc.json b/.eslintrc.json index a313bded55..8d6d18f2b1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,7 +1,7 @@ { "root": true, "ignorePatterns": ["**/*", "deploy/**/*"], - "plugins": ["@nx"], + "plugins": ["@nx", "@openops/block-style"], "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx", "*.json"], @@ -51,6 +51,12 @@ "jest": true }, "rules": {} + }, + { + "files": ["packages/blocks/**/*.ts"], + "rules": { + "@openops/block-style/block-style-guide": "error" + } } ], "settings": { @@ -65,5 +71,8 @@ "project": ["tsconfig.json", "package/tsconfig.json"] } } + }, + "plugins": { + "@openops/block-style": "./tools/eslint-rules" } } diff --git a/packages/blocks/ai/src/lib/actions/ai-step.ts b/packages/blocks/ai/src/lib/actions/ai-step.ts index 6568938150..73a673f21a 100644 --- a/packages/blocks/ai/src/lib/actions/ai-step.ts +++ b/packages/blocks/ai/src/lib/actions/ai-step.ts @@ -64,7 +64,7 @@ export const aiStep = createAction({ required: true, }), additionalInput: Property.Array({ - displayName: 'Additional input', + displayName: 'Additional Input', description: 'Array of inputs to use for analysis or transformation', required: false, }), diff --git a/packages/blocks/anodot/src/lib/api-filters/annual-savings-property.ts b/packages/blocks/anodot/src/lib/api-filters/annual-savings-property.ts index b2510d454a..246e896883 100644 --- a/packages/blocks/anodot/src/lib/api-filters/annual-savings-property.ts +++ b/packages/blocks/anodot/src/lib/api-filters/annual-savings-property.ts @@ -3,14 +3,14 @@ import { Property } from '@openops/blocks-framework'; export function annualSavingsProperty() { return { useAnnualSavings: Property.Checkbox({ - displayName: 'Filter by annual savings', + displayName: 'Filter by Annual Savings', required: false, }), annualSavingsProperty: Property.DynamicProperties({ - displayName: 'Annual savings greater than', + displayName: 'Annual Savings Greater Than', description: - 'Only get recommendations where the annual savings are greater than.', + 'Only get recommendations where the annual savings are greater than', required: true, refreshers: ['useAnnualSavings'], props: async ({ useAnnualSavings }): Promise<{ [key: string]: any }> => { @@ -20,9 +20,9 @@ export function annualSavingsProperty() { return { annualSavingsMin: Property.Number({ - displayName: 'Annual savings greater than', + displayName: 'Annual Savings Greater Than', description: - 'Only get recommendations where the annual savings are greater than.', + 'Only get recommendations where the annual savings are greater than', required: true, }), }; diff --git a/packages/blocks/anodot/src/lib/api-filters/category-property.ts b/packages/blocks/anodot/src/lib/api-filters/category-property.ts index 8424912720..919e1d0677 100644 --- a/packages/blocks/anodot/src/lib/api-filters/category-property.ts +++ b/packages/blocks/anodot/src/lib/api-filters/category-property.ts @@ -2,8 +2,8 @@ import { Property } from '@openops/blocks-framework'; export function categoryProperty() { return Property.StaticMultiSelectDropdown({ - displayName: 'Category id', - description: 'Get only recommendations from the selected category.', + displayName: 'Category Id', + description: 'Get only recommendations from the selected category', required: false, options: { disabled: false, diff --git a/packages/blocks/anodot/src/lib/api-filters/closed-and-done-recommendations-property.ts b/packages/blocks/anodot/src/lib/api-filters/closed-and-done-recommendations-property.ts index 79e1b2faea..d9d65bfe2c 100644 --- a/packages/blocks/anodot/src/lib/api-filters/closed-and-done-recommendations-property.ts +++ b/packages/blocks/anodot/src/lib/api-filters/closed-and-done-recommendations-property.ts @@ -3,8 +3,8 @@ import { dateProperty, operatorProperty } from './property-helpers'; export function closedAndDoneRecommendationsProperty() { return Property.DynamicProperties({ - displayName: 'Date filters for closed and done recommendations', - description: 'Filter closed and done recommendations by date range.', + displayName: 'Date Filters for Closed and Done Recommendations', + description: 'Filter closed and done recommendations by date range', required: true, refreshers: ['statusFilter'], props: async ({ statusFilter }): Promise<{ [key: string]: any }> => { diff --git a/packages/blocks/anodot/src/lib/api-filters/custom-status-property.ts b/packages/blocks/anodot/src/lib/api-filters/custom-status-property.ts index df7bd58efa..197dad6d67 100644 --- a/packages/blocks/anodot/src/lib/api-filters/custom-status-property.ts +++ b/packages/blocks/anodot/src/lib/api-filters/custom-status-property.ts @@ -3,9 +3,9 @@ import { booleanProperty } from './property-helpers'; export function customStatusProperty() { return Property.DynamicProperties({ - displayName: 'Custom status properties', + displayName: 'Custom Status Properties', description: - 'User defined conditions as set in the "is open" and "user status" fields, with logical "and" between them.', + 'User defined conditions as set in the "is open" and "user status" fields, with logical "and" between them', required: true, refreshers: ['statusFilter'], props: async ({ statusFilter }): Promise<{ [key: string]: any }> => { diff --git a/packages/blocks/anodot/src/lib/api-filters/list-filter-property.ts b/packages/blocks/anodot/src/lib/api-filters/list-filter-property.ts index 8a40f58e84..e3faeda5b4 100644 --- a/packages/blocks/anodot/src/lib/api-filters/list-filter-property.ts +++ b/packages/blocks/anodot/src/lib/api-filters/list-filter-property.ts @@ -33,7 +33,7 @@ export function listFilterProperty( eq: Property.Array({ displayName: `(${displayName}) Values`, - description: 'List of values ​​to be checked.', + description: 'List of values ​​to be checked', required: true, }), }; diff --git a/packages/blocks/anodot/src/lib/api-filters/opened-recommendations-property.ts b/packages/blocks/anodot/src/lib/api-filters/opened-recommendations-property.ts index 209e0c767b..8545a665e8 100644 --- a/packages/blocks/anodot/src/lib/api-filters/opened-recommendations-property.ts +++ b/packages/blocks/anodot/src/lib/api-filters/opened-recommendations-property.ts @@ -3,8 +3,8 @@ import { dateProperty } from './property-helpers'; export function openedRecommendationsProperty() { return Property.DynamicProperties({ - displayName: 'Date filters for open recommendations', - description: 'Filter open recommendations by date range.', + displayName: 'Date Filters for Open Recommendations', + description: 'Filter open recommendations by date range', required: true, refreshers: [], props: async (): Promise<{ [key: string]: any }> => { diff --git a/packages/blocks/anodot/src/lib/api-filters/status-property.ts b/packages/blocks/anodot/src/lib/api-filters/status-property.ts index 20593b32c8..0034e55a96 100644 --- a/packages/blocks/anodot/src/lib/api-filters/status-property.ts +++ b/packages/blocks/anodot/src/lib/api-filters/status-property.ts @@ -3,7 +3,7 @@ import { Property } from '@openops/blocks-framework'; export function statusProperty() { return Property.StaticDropdown({ displayName: 'Status', - description: 'Define what status of recommendations should be displayed.', + description: 'Define what status of recommendations should be displayed', options: { options: statusFilters, }, diff --git a/packages/blocks/anodot/src/lib/api-filters/tags-property.ts b/packages/blocks/anodot/src/lib/api-filters/tags-property.ts index 1e6ceee8d3..3dcd508060 100644 --- a/packages/blocks/anodot/src/lib/api-filters/tags-property.ts +++ b/packages/blocks/anodot/src/lib/api-filters/tags-property.ts @@ -33,19 +33,19 @@ export function tagsProperty( tag: Property.LongText({ displayName: `(${propertyName}) Tag`, - description: '', + description: 'Tag name to filter by', required: true, }), eq: Property.Array({ - displayName: `(${propertyName}) Equal values`, - description: 'List of values ​​to be checked for equality.', + displayName: `(${propertyname}) Equal Values`, + description: 'List of values ​​to be checked for equality', required: false, }), like: Property.Array({ - displayName: `(${propertyName}) Like values`, - description: 'List of values ​​​​to check if they are like.', + displayName: `(${propertyname}) Like Values`, + description: 'List of values ​​​​to check if they are like', required: false, }), diff --git a/packages/blocks/anodot/src/lib/api-filters/virtual-tags-property.ts b/packages/blocks/anodot/src/lib/api-filters/virtual-tags-property.ts index 84d8d67e87..b07a8534f0 100644 --- a/packages/blocks/anodot/src/lib/api-filters/virtual-tags-property.ts +++ b/packages/blocks/anodot/src/lib/api-filters/virtual-tags-property.ts @@ -3,12 +3,12 @@ import { Property } from '@openops/blocks-framework'; export function virtualTagsProperty() { return { useVirtualTag: Property.Checkbox({ - displayName: 'Filter by virtual tags', + displayName: 'Filter by Virtual Tags', required: false, }), virtualTag: Property.DynamicProperties({ - displayName: 'Virtual tag filters', - description: 'Each virtual tag represents a collection of custom tags.', + displayName: 'Virtual Tag Filters', + description: 'Each virtual tag represents a collection of custom tags', required: true, refreshers: ['useVirtualTag'], props: async ({ useVirtualTag }): Promise<{ [key: string]: any }> => { @@ -18,20 +18,20 @@ export function virtualTagsProperty() { return { uuid: Property.LongText({ - displayName: '(Virtual tag) uuid', - description: '', + displayName: '(Virtual Tag) UUID', + description: 'UUID of the virtual tag to filter by', required: true, }), eq: Property.Array({ - displayName: '(Virtual tag) Equal values', - description: 'List of values ​​to be checked for equality.', + displayName: '(Virtual Tag) Equal Values', + description: 'List of values ​​to be checked for equality', required: false, }), like: Property.Array({ - displayName: '(Virtual tag) Like values', - description: 'List of values ​​​​to check if they are like.', + displayName: '(Virtual Tag) Like Values', + description: 'List of values ​​​​to check if they are like', required: false, }), }; diff --git a/packages/blocks/anodot/src/lib/comments/add-comment-action.ts b/packages/blocks/anodot/src/lib/comments/add-comment-action.ts index 3f7d6801ec..72f218aab6 100644 --- a/packages/blocks/anodot/src/lib/comments/add-comment-action.ts +++ b/packages/blocks/anodot/src/lib/comments/add-comment-action.ts @@ -21,7 +21,7 @@ export const addCommentAction = createAction({ required: true, }), comment: Property.LongText({ - displayName: 'Comment text', + displayName: 'Comment Text', required: true, }), }, diff --git a/packages/blocks/anodot/src/lib/comments/update-comment-action.ts b/packages/blocks/anodot/src/lib/comments/update-comment-action.ts index 10cd99f8b0..139bf42b05 100644 --- a/packages/blocks/anodot/src/lib/comments/update-comment-action.ts +++ b/packages/blocks/anodot/src/lib/comments/update-comment-action.ts @@ -25,7 +25,7 @@ export const updateCommentAction = createAction({ required: true, }), comment: Property.LongText({ - displayName: 'Comment text', + displayName: 'Comment Text', required: true, }), }, diff --git a/packages/blocks/anodot/src/lib/get-recommendations-action-custom.ts b/packages/blocks/anodot/src/lib/get-recommendations-action-custom.ts index 8ed64667e4..11dd8a14de 100644 --- a/packages/blocks/anodot/src/lib/get-recommendations-action-custom.ts +++ b/packages/blocks/anodot/src/lib/get-recommendations-action-custom.ts @@ -29,7 +29,7 @@ export const getRecommendationsCustomAction = createAction({ auth: anadotAuth, name: 'get_recommendations', description: 'Get custom Umbrella recommendations', - displayName: 'Get Recommendations (custom settings)', + displayName: 'Get Recommendations (Custom Filters)', isWriteAction: false, props: { accounts: accountProperty(), diff --git a/packages/blocks/anodot/src/lib/update-user-status-action.ts b/packages/blocks/anodot/src/lib/update-user-status-action.ts index 9452786d37..7d0d1aee82 100644 --- a/packages/blocks/anodot/src/lib/update-user-status-action.ts +++ b/packages/blocks/anodot/src/lib/update-user-status-action.ts @@ -39,7 +39,7 @@ export const updateUserStatusAction = createAction({ }), actionParams: Property.DynamicProperties({ displayName: 'Action Parameters', - description: 'Additional parameters based on the selected user status.', + description: 'Additional parameters based on the selected user status', required: true, refreshers: ['userStatus'], props: async (props): Promise<{ [key: string]: any }> => { @@ -49,13 +49,13 @@ export const updateUserStatusAction = createAction({ label_add: Property.LongText({ displayName: 'Add Labels', description: - 'A comma seperated list of labels to add to the recommendation.', + 'A comma seperated list of labels to add to the recommendation', required: false, }), label_delete: Property.LongText({ displayName: 'Delete Labels', description: - 'A comma seperated list of labels to remove from the recommendation.', + 'A comma seperated list of labels to remove from the recommendation', required: false, }), }; @@ -63,7 +63,7 @@ export const updateUserStatusAction = createAction({ return { comment: Property.LongText({ displayName: 'Comment', - description: 'Comment explaining why the action is excluded.', + description: 'Comment explaining why the action is excluded', required: true, }), until: Property.LongText({ diff --git a/packages/blocks/approval/src/lib/actions/wait-for-approval.ts b/packages/blocks/approval/src/lib/actions/wait-for-approval.ts index 6fabe84c74..cda9478858 100644 --- a/packages/blocks/approval/src/lib/actions/wait-for-approval.ts +++ b/packages/blocks/approval/src/lib/actions/wait-for-approval.ts @@ -4,7 +4,7 @@ import { ExecutionType } from '@openops/shared'; export const waitForApprovalLink = createAction({ name: 'wait_for_approval', displayName: 'Wait for Approval', - description: 'Pauses the flow and wait for the approval from the user', + description: 'Pause the flow and wait for approval from the user', isWriteAction: false, props: {}, errorHandlingOptions: { diff --git a/packages/blocks/archera/src/lib/actions/apply-plan.ts b/packages/blocks/archera/src/lib/actions/apply-plan.ts index 9b5439663f..c729e385f1 100644 --- a/packages/blocks/archera/src/lib/actions/apply-plan.ts +++ b/packages/blocks/archera/src/lib/actions/apply-plan.ts @@ -11,7 +11,7 @@ export const applyCommitmentPlanAction = createAction({ props: { planId: Property.ShortText({ displayName: 'Plan ID', - description: 'The UUID of the commitment plan to apply.', + description: 'The UUID of the commitment plan to apply', required: true, }), }, diff --git a/packages/blocks/archera/src/lib/actions/get-commitment-inventory.ts b/packages/blocks/archera/src/lib/actions/get-commitment-inventory.ts index b2b958edd2..eb733a6af4 100644 --- a/packages/blocks/archera/src/lib/actions/get-commitment-inventory.ts +++ b/packages/blocks/archera/src/lib/actions/get-commitment-inventory.ts @@ -11,7 +11,7 @@ export const getCommitmentsInventoryAction = createAction({ props: { provider: Property.StaticDropdown({ displayName: 'Provider', - description: 'The cloud provider to fetch commitments for.', + description: 'The cloud provider to fetch commitments for', required: true, options: { options: [ @@ -26,23 +26,23 @@ export const getCommitmentsInventoryAction = createAction({ startDate: Property.ShortText({ displayName: 'Start Date', description: - 'The start date for the commitment inventory query (Format: yyyy-MM-dd).', + 'The start date for the commitment inventory query (Format: yyyy-MM-dd)', required: true, }), endDate: Property.ShortText({ displayName: 'End Date', description: - 'The end date for the commitment inventory query (Format: yyyy-MM-dd).', + 'The end date for the commitment inventory query (Format: yyyy-MM-dd)', required: true, }), search: Property.ShortText({ displayName: 'Search', - description: 'Search term to filter commitments.', + description: 'Search term to filter commitments', required: false, }), orderBy: Property.StaticDropdown({ displayName: 'Order By', - description: 'Field to order results by.', + description: 'Field to order results by', required: false, options: { options: [ @@ -67,19 +67,19 @@ export const getCommitmentsInventoryAction = createAction({ }), desc: Property.Checkbox({ displayName: 'Descending Order', - description: 'Sort in descending order.', + description: 'Sort in descending order', required: false, defaultValue: true, }), page: Property.Number({ displayName: 'Page', - description: 'Page number for pagination.', + description: 'Page number for pagination', required: false, defaultValue: 1, }), pageSize: Property.Number({ displayName: 'Page Size', - description: 'Number of items per page (1-10000).', + description: 'Number of items per page (1-10000)', required: false, defaultValue: 10, }), diff --git a/packages/blocks/archera/src/lib/actions/get-commitment-plan.ts b/packages/blocks/archera/src/lib/actions/get-commitment-plan.ts index 162524d1b7..8d495032b6 100644 --- a/packages/blocks/archera/src/lib/actions/get-commitment-plan.ts +++ b/packages/blocks/archera/src/lib/actions/get-commitment-plan.ts @@ -11,7 +11,7 @@ export const getCommitmentPlanAction = createAction({ props: { planId: Property.ShortText({ displayName: 'Plan ID', - description: 'The UUID of the commitment plan to retrieve.', + description: 'The UUID of the commitment plan to get', required: true, }), }, diff --git a/packages/blocks/archera/src/lib/actions/get-default-plans.ts b/packages/blocks/archera/src/lib/actions/get-default-plans.ts index e4f5875a4f..9f3321c565 100644 --- a/packages/blocks/archera/src/lib/actions/get-default-plans.ts +++ b/packages/blocks/archera/src/lib/actions/get-default-plans.ts @@ -12,7 +12,7 @@ export const getDefaultCommitmentPlansAction = createAction({ props: { provider: Property.StaticDropdown({ displayName: 'Provider', - description: 'The cloud provider to fetch default commitment plans for.', + description: 'The cloud provider to fetch default commitment plans for', required: true, options: { options: [ diff --git a/packages/blocks/archera/src/lib/actions/get-metrics.ts b/packages/blocks/archera/src/lib/actions/get-metrics.ts index 8d4c42b086..ef685acab9 100644 --- a/packages/blocks/archera/src/lib/actions/get-metrics.ts +++ b/packages/blocks/archera/src/lib/actions/get-metrics.ts @@ -11,7 +11,7 @@ export const getMetricsAction = createAction({ props: { provider: Property.StaticDropdown({ displayName: 'Provider', - description: 'The cloud provider to fetch metrics for.', + description: 'The cloud provider to fetch metrics for', required: true, options: { options: [ diff --git a/packages/blocks/archera/src/lib/actions/get-recommendations-action.ts b/packages/blocks/archera/src/lib/actions/get-recommendations-action.ts index a0ea434718..d3664ef904 100644 --- a/packages/blocks/archera/src/lib/actions/get-recommendations-action.ts +++ b/packages/blocks/archera/src/lib/actions/get-recommendations-action.ts @@ -11,7 +11,7 @@ export const getRecommendedPlan = createAction({ props: { provider: Property.StaticDropdown({ displayName: 'Provider', - description: 'The cloud provider to fetch recommendations for.', + description: 'The cloud provider to fetch recommendations for', required: true, options: { options: [ diff --git a/packages/blocks/aws-athena/src/lib/actions/query-athena-action.ts b/packages/blocks/aws-athena/src/lib/actions/query-athena-action.ts index a6119237d8..0e69d552dc 100644 --- a/packages/blocks/aws-athena/src/lib/actions/query-athena-action.ts +++ b/packages/blocks/aws-athena/src/lib/actions/query-athena-action.ts @@ -10,13 +10,13 @@ import { export const runAthenaQueryAction = createAction({ auth: amazonAuth, name: 'athena_query', - description: 'Query Athena database', - displayName: 'Query Athena database', + description: 'Execute SQL queries on AWS Athena database', + displayName: 'Query Athena Database', isWriteAction: false, props: { query: Property.LongText({ displayName: 'Query', - description: 'Query to run on the Athena database.', + description: 'Query to run on the Athena database', supportsAI: true, required: true, }), diff --git a/packages/blocks/aws-compute-optimizer/src/lib/actions/ebs-get-recommendations-action.ts b/packages/blocks/aws-compute-optimizer/src/lib/actions/ebs-get-recommendations-action.ts index 5b4ec0a25a..8602c98312 100644 --- a/packages/blocks/aws-compute-optimizer/src/lib/actions/ebs-get-recommendations-action.ts +++ b/packages/blocks/aws-compute-optimizer/src/lib/actions/ebs-get-recommendations-action.ts @@ -29,7 +29,7 @@ export const ebsGetRecommendationsAction = createAction({ props: { accounts: getAwsAccountsMultiSelectDropdown().accounts, recommendationType: Property.StaticDropdown({ - displayName: 'Recommendations type', + displayName: 'Recommendations Type', description: 'Type of recommendations to collect', options: { options: [ @@ -59,7 +59,7 @@ export const ebsGetRecommendationsAction = createAction({ const dropdownState = getRegionsDropdownState(); props['regions'] = Property.StaticMultiSelectDropdown({ displayName: 'Regions', - description: 'A list of AWS regions.', + description: 'A list of AWS regions', required: true, options: dropdownState, }); diff --git a/packages/blocks/aws-compute-optimizer/src/lib/actions/ec2-get-recommendations-action.ts b/packages/blocks/aws-compute-optimizer/src/lib/actions/ec2-get-recommendations-action.ts index 6d2e49f8c1..b963d9ef2f 100644 --- a/packages/blocks/aws-compute-optimizer/src/lib/actions/ec2-get-recommendations-action.ts +++ b/packages/blocks/aws-compute-optimizer/src/lib/actions/ec2-get-recommendations-action.ts @@ -29,7 +29,7 @@ export const ec2GetRecommendationsAction = createAction({ props: { accounts: getAwsAccountsMultiSelectDropdown().accounts, recommendationType: Property.StaticDropdown({ - displayName: 'Recommendations type', + displayName: 'Recommendations Type', description: 'Type of recommendations to collect', options: { options: [ @@ -62,7 +62,7 @@ export const ec2GetRecommendationsAction = createAction({ const dropdownState = getRegionsDropdownState(); props['regions'] = Property.StaticMultiSelectDropdown({ displayName: 'Regions', - description: 'A list of AWS regions.', + description: 'A list of AWS regions', required: true, options: dropdownState, }); diff --git a/packages/blocks/aws-compute-optimizer/src/lib/common/ebs-recommendations-builder.ts b/packages/blocks/aws-compute-optimizer/src/lib/common/ebs-recommendations-builder.ts index cc7f3ebe6f..a1e333ab1f 100644 --- a/packages/blocks/aws-compute-optimizer/src/lib/common/ebs-recommendations-builder.ts +++ b/packages/blocks/aws-compute-optimizer/src/lib/common/ebs-recommendations-builder.ts @@ -18,9 +18,10 @@ import { } from './get-recommendations'; import { RecommendationsBuilder } from './recommendations-builder'; -export class EbsRecommendationsBuilder - implements RecommendationsBuilder -{ +export class EbsRecommendationsBuilder implements RecommendationsBuilder< + EBSFinding, + VolumeRecommendation +> { recommendationType: any; findingType: EBSFinding; credentials: any; diff --git a/packages/blocks/aws-compute-optimizer/src/lib/common/ec2-recommendations-builder.ts b/packages/blocks/aws-compute-optimizer/src/lib/common/ec2-recommendations-builder.ts index bcff2809d2..969e6bff34 100644 --- a/packages/blocks/aws-compute-optimizer/src/lib/common/ec2-recommendations-builder.ts +++ b/packages/blocks/aws-compute-optimizer/src/lib/common/ec2-recommendations-builder.ts @@ -18,9 +18,10 @@ import { } from './get-recommendations'; import { RecommendationsBuilder } from './recommendations-builder'; -export class Ec2RecommendationsBuilder - implements RecommendationsBuilder -{ +export class Ec2RecommendationsBuilder implements RecommendationsBuilder< + Finding, + AwsRecommendation +> { recommendationType: string; findingType: Finding; credentials: any; diff --git a/packages/blocks/aws/src/lib/actions/ebs/ebs-modify-volume-action.ts b/packages/blocks/aws/src/lib/actions/ebs/ebs-modify-volume-action.ts index e23e05dec0..1907af9535 100644 --- a/packages/blocks/aws/src/lib/actions/ebs/ebs-modify-volume-action.ts +++ b/packages/blocks/aws/src/lib/actions/ebs/ebs-modify-volume-action.ts @@ -25,7 +25,7 @@ export const ebsModifyVolumeAction = createAction({ required: true, }), changeVolumeType: Property.Checkbox({ - displayName: 'Change volume type', + displayName: 'Change Volume Type', required: false, }), newVolumeType: Property.DynamicProperties({ @@ -39,7 +39,7 @@ export const ebsModifyVolumeAction = createAction({ return { newVolumeType: Property.StaticDropdown({ - displayName: 'New volume type', + displayName: 'New Volume Type', options: { options: Object.keys(VolumeType).map((x) => ({ label: x, @@ -52,7 +52,7 @@ export const ebsModifyVolumeAction = createAction({ }, }), changeVolumeSize: Property.Checkbox({ - displayName: 'Change volume size', + displayName: 'Change Volume Size', required: false, }), newVolumeSize: Property.DynamicProperties({ @@ -65,7 +65,7 @@ export const ebsModifyVolumeAction = createAction({ } return { newVolumeSize: Property.Number({ - displayName: 'New volume size (GB)', + displayName: 'New Volume Size (GB)', required: false, validators: [Validators.minValue(1), Validators.maxValue(70369)], // max size is 64 TiB }), @@ -73,7 +73,7 @@ export const ebsModifyVolumeAction = createAction({ }, }), changeVolumeIops: Property.Checkbox({ - displayName: 'Change volume IOPS', + displayName: 'Change Volume IOPS', required: false, }), newVolumeIops: Property.DynamicProperties({ @@ -86,7 +86,7 @@ export const ebsModifyVolumeAction = createAction({ } return { newVolumeIops: Property.Number({ - displayName: 'New volume IOPS', + displayName: 'New Volume IOPS', required: false, validators: [Validators.minValue(100), Validators.maxValue(256000)], }), @@ -94,7 +94,7 @@ export const ebsModifyVolumeAction = createAction({ }, }), changeVolumeThroughput: Property.Checkbox({ - displayName: 'Change volume throughput', + displayName: 'Change Volume Throughput', required: false, }), newVolumeThroughput: Property.DynamicProperties({ @@ -107,7 +107,7 @@ export const ebsModifyVolumeAction = createAction({ } return { newVolumeThroughput: Property.Number({ - displayName: 'New volume throughput (MB/s)', + displayName: 'New Volume Throughput (MB/s)', required: false, validators: [Validators.minValue(128), Validators.maxValue(1000)], }), diff --git a/packages/blocks/aws/src/lib/actions/ec2/ec2-modify-instance-action.ts b/packages/blocks/aws/src/lib/actions/ec2/ec2-modify-instance-action.ts index 096d1dd7a2..d262996646 100644 --- a/packages/blocks/aws/src/lib/actions/ec2/ec2-modify-instance-action.ts +++ b/packages/blocks/aws/src/lib/actions/ec2/ec2-modify-instance-action.ts @@ -23,8 +23,8 @@ export const ec2ModifyInstanceAction = createAction({ required: true, }), modifiers: Property.DynamicProperties({ - displayName: '', - description: '', + displayName: 'Modifiers', + description: 'Configuration modifiers for the EC2 instance', required: true, refreshers: [], props: async () => { @@ -34,7 +34,7 @@ export const ec2ModifyInstanceAction = createAction({ required: true, properties: { attributeName: Property.StaticDropdown({ - displayName: 'Attribute name', + displayName: 'Attribute Name', required: true, options: { options: [ @@ -50,7 +50,7 @@ export const ec2ModifyInstanceAction = createAction({ }, }), attributeValue: Property.DynamicProperties({ - displayName: 'New field value', + displayName: 'New Field Value', required: true, refreshers: ['attributeName'], props: async ({ @@ -125,7 +125,7 @@ function getPropertyWithAttributeName(attributeName: string) { return Property.Checkbox({ displayName: 'Disable API Stop', description: - 'Indicates whether an instance is enabled for stop protection.', + 'Indicates whether an instance is enabled for stop protection', required: true, }); } @@ -139,9 +139,9 @@ function getPropertyWithAttributeName(attributeName: string) { } case 'EnaSupport': { return Property.Checkbox({ - displayName: 'Enable ENA support', + displayName: 'Enable ENA Support', description: - 'Set to true to enable enhanced networking with ENA for the instance.', + 'Set to true to enable enhanced networking with ENA for the instance', required: true, }); } @@ -149,13 +149,13 @@ function getPropertyWithAttributeName(attributeName: string) { return Property.Checkbox({ displayName: 'Enable SR-IOV Net Support', description: - 'Sets the SR-IOV Net Support to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.', + 'Sets the SR-IOV Net Support to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance', required: true, }); } case 'InstanceType': { return Property.StaticDropdown({ - displayName: 'New instance type', + displayName: 'New Instance Type', options: { options: Object.entries(_InstanceType).map(([key, value]) => ({ label: value, @@ -193,7 +193,7 @@ function getPropertyWithAttributeName(attributeName: string) { } case 'RamDisk': { return Property.LongText({ - displayName: 'New ram disk', + displayName: 'New Ram Disk', required: true, }); } diff --git a/packages/blocks/aws/src/lib/actions/get-price-action.ts b/packages/blocks/aws/src/lib/actions/get-price-action.ts index f3b67360a5..b9cd5d8fc0 100644 --- a/packages/blocks/aws/src/lib/actions/get-price-action.ts +++ b/packages/blocks/aws/src/lib/actions/get-price-action.ts @@ -63,8 +63,8 @@ export const getPriceAction = createAction({ }, }), queryFilters: Property.DynamicProperties({ - displayName: '', - description: '', + displayName: 'Query Filters', + description: 'Dynamic filters for AWS pricing query', required: true, refreshers: ['auth', 'service'], props: async ({ auth, service }, { input }) => { @@ -79,7 +79,7 @@ export const getPriceAction = createAction({ displayName: 'Filters', properties: { attributeName: Property.StaticDropdown({ - displayName: 'Attribute name', + displayName: 'Attribute Name', required: true, options: { options: attributeNames.map((attribute) => ({ @@ -89,7 +89,7 @@ export const getPriceAction = createAction({ }, }), attributeValue: Property.Dropdown({ - displayName: 'Attribute value', + displayName: 'Attribute Value', required: true, refreshers: ['attributeName'], options: async () => { diff --git a/packages/blocks/aws/src/lib/actions/rds/rds-create-snapshot-action.ts b/packages/blocks/aws/src/lib/actions/rds/rds-create-snapshot-action.ts index 4bdba412fc..bfd278d9e5 100644 --- a/packages/blocks/aws/src/lib/actions/rds/rds-create-snapshot-action.ts +++ b/packages/blocks/aws/src/lib/actions/rds/rds-create-snapshot-action.ts @@ -24,7 +24,7 @@ export const rdsCreateSnapshotAction = createAction({ snapshotId: Property.LongText({ displayName: 'Snapshot Id', description: - 'If not provided, it will be automatically generated using the DB instance ID combined with the current timestamp.', + 'If not provided, it will be automatically generated using the DB instance ID combined with the current timestamp', required: false, }), tags: Property.Object({ diff --git a/packages/blocks/aws/src/lib/actions/ssm/ssm-generate-runbook-link-action.ts b/packages/blocks/aws/src/lib/actions/ssm/ssm-generate-runbook-link-action.ts index 21f1a8ee52..feb504fa37 100644 --- a/packages/blocks/aws/src/lib/actions/ssm/ssm-generate-runbook-link-action.ts +++ b/packages/blocks/aws/src/lib/actions/ssm/ssm-generate-runbook-link-action.ts @@ -21,12 +21,12 @@ export const ssmGenerateRunbookLinkAction = createAction({ props: { region: Property.ShortText({ displayName: 'Region', - description: 'AWS region (defaults to the region from authentication).', + description: 'AWS region (defaults to the region from authentication)', required: false, }), owner: Property.StaticDropdown({ displayName: 'Owner', - description: 'Source/owner of the runbook (Automation document).', + description: 'Source/owner of the runbook (Automation document)', required: true, options: { options: [ diff --git a/packages/blocks/azure/src/lib/actions/azure-advisor-action.ts b/packages/blocks/azure/src/lib/actions/azure-advisor-action.ts index 05d88f3d9b..2772d0f961 100644 --- a/packages/blocks/azure/src/lib/actions/azure-advisor-action.ts +++ b/packages/blocks/azure/src/lib/actions/azure-advisor-action.ts @@ -14,8 +14,8 @@ export const advisorAction = createAction({ useHostSession: getUseHostSessionProperty('Azure', 'az login'), subscriptions: subDropdown, filterBySelection: Property.StaticDropdown({ - displayName: 'Choose filter', - description: `Select whether to filter by resource group, resource IDs, or neither.`, + displayName: 'Choose Filter', + description: `Select whether to filter by resource group, resource IDs, or neither`, required: true, options: { options: [ @@ -25,7 +25,7 @@ export const advisorAction = createAction({ value: { resourceIds: Property.Array({ displayName: 'Resource IDs', - description: 'One or more resource IDs (space-delimited).', + description: 'One or more resource IDs (space-delimited)', required: true, }), }, @@ -35,7 +35,7 @@ export const advisorAction = createAction({ value: { resourceGroup: Property.ShortText({ displayName: 'Resource Group', - description: 'Name of a resource group.', + description: 'Name of a resource group', required: true, }), }, diff --git a/packages/blocks/azure/src/lib/actions/azure-resource-graph-action.ts b/packages/blocks/azure/src/lib/actions/azure-resource-graph-action.ts index 0a4f27b9fd..da64f85226 100644 --- a/packages/blocks/azure/src/lib/actions/azure-resource-graph-action.ts +++ b/packages/blocks/azure/src/lib/actions/azure-resource-graph-action.ts @@ -90,7 +90,7 @@ export const azureResourceGraphAction = createAction({ props: { query: Property.LongText({ displayName: 'KQL Query', - description: 'The Kusto Query Language (KQL) query to execute.', + description: 'The Kusto Query Language (KQL) query to execute', required: true, }), useHostSession: getUseHostSessionProperty('Azure', 'az login'), diff --git a/packages/blocks/azure/src/lib/actions/custom-azure-api-action.ts b/packages/blocks/azure/src/lib/actions/custom-azure-api-action.ts index c797669dc2..ea9f4c0891 100644 --- a/packages/blocks/azure/src/lib/actions/custom-azure-api-action.ts +++ b/packages/blocks/azure/src/lib/actions/custom-azure-api-action.ts @@ -7,7 +7,7 @@ import { getSubscriptionsDropdownForHostSession } from '../common-properties'; export const customAzureApiCallAction = createCustomApiCallAction({ auth: azureAuth, name: 'custom_azure_api_call', - description: 'Make a custom REST API call to Azure.', + description: 'Make a custom REST API call to Azure', displayName: 'Custom Azure API Call', baseUrl: () => 'https://management.azure.com/?api-version=2025-04-01', additionalProps: { diff --git a/packages/blocks/azure/src/lib/common-properties.ts b/packages/blocks/azure/src/lib/common-properties.ts index c7d6477963..d489084695 100644 --- a/packages/blocks/azure/src/lib/common-properties.ts +++ b/packages/blocks/azure/src/lib/common-properties.ts @@ -116,9 +116,8 @@ export function createSubscriptionDynamicProperty( if (useHost) { dropdown = await getSubscriptionsDropdown(auth, config); } else { - const staticDropdown = await getAzureSubscriptionsStaticDropdown( - auth, - ); + const staticDropdown = + await getAzureSubscriptionsStaticDropdown(auth); dropdown = createSubscriptionDropdown(config, staticDropdown.options); } diff --git a/packages/blocks/cloudability/src/lib/actions/get-recommendations-action.ts b/packages/blocks/cloudability/src/lib/actions/get-recommendations-action.ts index 95e672c546..bebd1e7862 100644 --- a/packages/blocks/cloudability/src/lib/actions/get-recommendations-action.ts +++ b/packages/blocks/cloudability/src/lib/actions/get-recommendations-action.ts @@ -14,7 +14,7 @@ import { export const getRecommendationsAction = createAction({ name: `cloudability_get_recommendations`, displayName: `Get Recommendations`, - description: `Get Recommendations`, + description: `Get cost optimization recommendations from Cloudability`, auth: cloudabilityAuth, isWriteAction: false, props: { @@ -23,7 +23,7 @@ export const getRecommendationsAction = createAction({ duration: Property.StaticDropdown({ displayName: 'Look-Back Period', description: - 'The look back period in days, used for calculating the recommendations.', + 'The look back period in days used for calculating the recommendations', required: true, defaultValue: Duration.TenDay, options: { @@ -35,7 +35,7 @@ export const getRecommendationsAction = createAction({ }), basis: Property.StaticDropdown({ displayName: 'Cost Basis', - description: 'The cost basis for the recommendations.', + description: 'The cost basis for the recommendations', required: true, defaultValue: CostBasis.OnDemand, options: { @@ -47,7 +47,7 @@ export const getRecommendationsAction = createAction({ }), snoozedFilter: Property.StaticDropdown({ displayName: 'Recommendations Status', - description: 'Whether to include recommendations that have been snoozed.', + description: 'Whether to include recommendations that have been snoozed', required: true, defaultValue: SnoozedFilter.NO_SNOOZED, options: { @@ -63,7 +63,7 @@ export const getRecommendationsAction = createAction({ }), limit: Property.ShortText({ displayName: 'Limit', - description: 'The maximum number of recommendations to return.', + description: 'The maximum number of recommendations to return', required: false, }), additionalFilters: Property.Array({ diff --git a/packages/blocks/cloudability/src/lib/actions/snooze-recommendations-action.ts b/packages/blocks/cloudability/src/lib/actions/snooze-recommendations-action.ts index 75340be6f7..6a426c6c4b 100644 --- a/packages/blocks/cloudability/src/lib/actions/snooze-recommendations-action.ts +++ b/packages/blocks/cloudability/src/lib/actions/snooze-recommendations-action.ts @@ -9,7 +9,7 @@ import { snoozeRecommendations, Vendor } from '../common/recommendations-api'; export const snoozeRecommendationAction = createAction({ name: `cloudability_snooze_recommendations`, displayName: `Snooze Recommendations`, - description: `Snooze Recommendations`, + description: `Temporarily suppress recommendations from appearing`, auth: cloudabilityAuth, isWriteAction: true, props: { @@ -17,12 +17,12 @@ export const snoozeRecommendationAction = createAction({ ...getRecommendationTypesProperty(), accountId: Property.ShortText({ displayName: 'Account ID', - description: 'The ID of the account to which the recommendation belongs.', + description: 'The ID of the account to which the recommendation belongs', required: true, }), resourceIds: Property.Array({ displayName: 'Resource IDs', - description: 'The IDs of the resources to snooze recommendations for.', + description: 'The IDs of the resources to snooze recommendations for', required: true, }), snoozeUntil: Property.ShortText({ diff --git a/packages/blocks/cloudability/src/lib/actions/unsnooze-recommendations-action.ts b/packages/blocks/cloudability/src/lib/actions/unsnooze-recommendations-action.ts index dc425845d7..425a1e42db 100644 --- a/packages/blocks/cloudability/src/lib/actions/unsnooze-recommendations-action.ts +++ b/packages/blocks/cloudability/src/lib/actions/unsnooze-recommendations-action.ts @@ -9,7 +9,7 @@ import { unsnoozeRecommendations, Vendor } from '../common/recommendations-api'; export const unsnoozeRecommendationAction = createAction({ name: `cloudability_unsnooze_recommendations`, displayName: `Unsnooze Recommendations`, - description: `Unsnooze Recommendations`, + description: `Re-enable previously snoozed recommendations`, auth: cloudabilityAuth, isWriteAction: true, props: { @@ -17,12 +17,12 @@ export const unsnoozeRecommendationAction = createAction({ ...getRecommendationTypesProperty(), accountId: Property.ShortText({ displayName: 'Account ID', - description: 'The ID of the account to which the recommendation belongs.', + description: 'The ID of the account to which the recommendation belongs', required: true, }), resourceIds: Property.Array({ displayName: 'Resource IDs', - description: 'The IDs of the resources to unsnooze recommendations for.', + description: 'The IDs of the resources to unsnooze recommendations for', required: true, }), }, diff --git a/packages/blocks/cloudability/src/lib/common/common-properties.ts b/packages/blocks/cloudability/src/lib/common/common-properties.ts index fb2ae7cf42..d01da9242e 100644 --- a/packages/blocks/cloudability/src/lib/common/common-properties.ts +++ b/packages/blocks/cloudability/src/lib/common/common-properties.ts @@ -5,7 +5,7 @@ export function getVendorsProperty() { return { vendor: Property.StaticDropdown({ displayName: 'Vendor Type', - description: 'The cloud vendor for which to fetch recommendations.', + description: 'The cloud vendor for which to fetch recommendations', required: true, options: { options: Object.values(Vendor).map((v) => ({ @@ -21,7 +21,7 @@ export function getRecommendationTypesProperty() { return { recommendationType: Property.Dropdown({ displayName: 'Recommendation Type', - description: 'The type of recommendations to fetch.', + description: 'The type of recommendations to fetch', required: true, refreshers: ['vendor'], options: async ({ vendor }) => { diff --git a/packages/blocks/cloudfix/src/lib/actions/create-change-requests-action.ts b/packages/blocks/cloudfix/src/lib/actions/create-change-requests-action.ts index 39bdd7293e..c8ff8b40a8 100644 --- a/packages/blocks/cloudfix/src/lib/actions/create-change-requests-action.ts +++ b/packages/blocks/cloudfix/src/lib/actions/create-change-requests-action.ts @@ -18,7 +18,7 @@ export const createChangeRequestsAction = createAction({ required: true, }), executeOnSchedule: Property.Checkbox({ - displayName: 'Execute on schedule', + displayName: 'Execute on Schedule', description: 'Whether to execute the change requests on schedule', required: false, defaultValue: false, diff --git a/packages/blocks/cloudfix/src/lib/actions/get-recommendations-action.ts b/packages/blocks/cloudfix/src/lib/actions/get-recommendations-action.ts index c674fdad9e..d4d8779409 100644 --- a/packages/blocks/cloudfix/src/lib/actions/get-recommendations-action.ts +++ b/packages/blocks/cloudfix/src/lib/actions/get-recommendations-action.ts @@ -11,7 +11,7 @@ export const getRecommendationsAction = createAction({ isWriteAction: false, props: { status: Property.StaticMultiSelectDropdown({ - displayName: 'Status filter', + displayName: 'Status Filter', description: 'Filter recommendations by status', required: false, options: { @@ -60,7 +60,7 @@ export const getRecommendationsAction = createAction({ defaultValue: 'scheduledAt', }), sortOrder: Property.StaticDropdown({ - displayName: 'Sort order', + displayName: 'Sort Order', description: 'The order to sort the recommendations', required: false, options: { @@ -72,23 +72,23 @@ export const getRecommendationsAction = createAction({ defaultValue: 'DESC', }), includeParameters: Property.Checkbox({ - displayName: 'Include parameters', + displayName: 'Include Parameters', description: 'Whether to include parameters in the response', required: false, }), finderFixerId: Property.ShortText({ - displayName: 'Finder fixer ID', + displayName: 'Finder Fixer Id', description: 'The ID of the finder fixer', required: false, }), pageNumber: Property.Number({ - displayName: 'Page number', + displayName: 'Page Number', description: 'The page number for pagination (starts from 1)', required: false, defaultValue: 1, }), pageLimit: Property.Number({ - displayName: 'Page limit', + displayName: 'Page Limit', description: 'The maximum number of recommendations per page', required: false, defaultValue: 200, diff --git a/packages/blocks/cloudfix/src/lib/actions/postpone-recommendations-action.ts b/packages/blocks/cloudfix/src/lib/actions/postpone-recommendations-action.ts index fdb13f8ad3..693502270d 100644 --- a/packages/blocks/cloudfix/src/lib/actions/postpone-recommendations-action.ts +++ b/packages/blocks/cloudfix/src/lib/actions/postpone-recommendations-action.ts @@ -16,7 +16,7 @@ export const postponeRecommendationsAction = createAction({ required: true, }), postponeUntil: Property.DateTime({ - displayName: 'Postpone until', + displayName: 'Postpone Until', description: 'The date and time until which to postpone the recommendations. Format ISO yyyy-mm-ddT00:00:00.000Z.', required: true, diff --git a/packages/blocks/cloudfix/src/lib/common/auth.ts b/packages/blocks/cloudfix/src/lib/common/auth.ts index 1d35b7605f..f18bb3d46d 100644 --- a/packages/blocks/cloudfix/src/lib/common/auth.ts +++ b/packages/blocks/cloudfix/src/lib/common/auth.ts @@ -23,7 +23,7 @@ export const cloudfixAuth = BlockAuth.CustomAuth({ }), apiKey: Property.SecretText({ required: true, - displayName: 'API token', + displayName: 'API Token', description: 'The API token to use to connect to CloudFix', }), }, diff --git a/packages/blocks/cloudformation/src/lib/get/get-stack.ts b/packages/blocks/cloudformation/src/lib/get/get-stack.ts index 65089a0159..aa97c17ef6 100644 --- a/packages/blocks/cloudformation/src/lib/get/get-stack.ts +++ b/packages/blocks/cloudformation/src/lib/get/get-stack.ts @@ -10,14 +10,14 @@ import { getCloudFormationTemplate } from '../get-template'; export const getStack = createAction({ auth: amazonAuth, name: 'get_stack_template', - displayName: 'Get CloudFormation template', + displayName: 'Get CloudFormation Template', description: - 'Get the CloudFormation stack template that matches the given arn.', + 'Get the CloudFormation stack template that matches the given arn', isWriteAction: false, props: { arn: Property.ShortText({ displayName: 'ARN', - description: 'The ARN of the stack to fetch.', + description: 'The ARN of the stack to fetch', required: true, }), }, diff --git a/packages/blocks/cloudformation/src/lib/modify/delete-resource-from-template.ts b/packages/blocks/cloudformation/src/lib/modify/delete-resource-from-template.ts index 60f58902d3..3b7dc1b708 100644 --- a/packages/blocks/cloudformation/src/lib/modify/delete-resource-from-template.ts +++ b/packages/blocks/cloudformation/src/lib/modify/delete-resource-from-template.ts @@ -6,12 +6,12 @@ export const deleteResourceFromTemplate = createAction({ auth: BlockAuth.None(), requireAuth: false, name: 'delete_resource', - displayName: 'Delete resource', + displayName: 'Delete Resource', description: 'Delete a resource from a given CloudFormation template', isWriteAction: true, props: { template: Property.LongText({ - displayName: 'CloudFormation template', + displayName: 'CloudFormation Template', required: true, }), diff --git a/packages/blocks/cloudformation/src/lib/modify/logical-id-dropdown.ts b/packages/blocks/cloudformation/src/lib/modify/logical-id-dropdown.ts index 79a9dc5a5d..da06d2fd47 100644 --- a/packages/blocks/cloudformation/src/lib/modify/logical-id-dropdown.ts +++ b/packages/blocks/cloudformation/src/lib/modify/logical-id-dropdown.ts @@ -10,7 +10,7 @@ const ValidResourceTypes = [ export function getLogicalIdDropdown() { return Property.Dropdown({ displayName: 'Logical Id', - description: 'Logical Id of the resource to be deleted.', + description: 'Logical Id of the resource to be deleted', refreshers: ['template'], required: true, options: async ({ template }) => { diff --git a/packages/blocks/cloudformation/src/lib/modify/modify-template.ts b/packages/blocks/cloudformation/src/lib/modify/modify-template.ts index 572f5db46a..dd5c00e342 100644 --- a/packages/blocks/cloudformation/src/lib/modify/modify-template.ts +++ b/packages/blocks/cloudformation/src/lib/modify/modify-template.ts @@ -7,13 +7,13 @@ export const modifyTemplate = createAction({ auth: BlockAuth.None(), requireAuth: false, name: 'update_cloudformation_file', - displayName: 'Update resource properties', + displayName: 'Update Resource Properties', description: 'Update properties of a resource in a given CloudFormation template', isWriteAction: true, props: { template: Property.LongText({ - displayName: 'CloudFormation template', + displayName: 'CloudFormation Template', required: true, }), diff --git a/packages/blocks/cloudformation/src/lib/modify/resource-properties.ts b/packages/blocks/cloudformation/src/lib/modify/resource-properties.ts index 224c0f287d..43b246b59f 100644 --- a/packages/blocks/cloudformation/src/lib/modify/resource-properties.ts +++ b/packages/blocks/cloudformation/src/lib/modify/resource-properties.ts @@ -7,8 +7,8 @@ import { export function getResourceProperties() { return Property.DynamicProperties({ - displayName: '', - description: '', + displayName: 'Resource Properties', + description: 'CloudFormation resource properties to modify', required: true, refreshers: ['template', 'logicalId'], props: async ({ template, logicalId }) => { @@ -35,13 +35,13 @@ export function getResourceProperties() { return { updates: Property.Array({ - displayName: 'Intended modifications', + displayName: 'Intended Modifications', required: true, properties: { propertyName: propertyNameDropdown, propertyValue: Property.ShortText({ - displayName: 'Property value', - description: 'The new value for the property.', + displayName: 'Property Value', + description: 'The new value for the property', required: true, }), }, diff --git a/packages/blocks/cloudformation/src/lib/update/update-stack.ts b/packages/blocks/cloudformation/src/lib/update/update-stack.ts index bfb0f83dec..988973ca4a 100644 --- a/packages/blocks/cloudformation/src/lib/update/update-stack.ts +++ b/packages/blocks/cloudformation/src/lib/update/update-stack.ts @@ -13,20 +13,19 @@ import { applyTemplateUpdate } from '../apply-template-update'; export const updateStack = createAction({ auth: amazonAuth, name: 'apply_template', - displayName: 'Apply CloudFormation template', - description: 'Update the CloudFormation template that matches the given ARN.', + displayName: 'Apply CloudFormation Template', + description: 'Update the CloudFormation template that matches the given ARN', riskLevel: RiskLevel.HIGH, isWriteAction: true, props: { arn: Property.ShortText({ displayName: 'ARN', - description: 'The ARN of the stack to update.', + description: 'The ARN of the stack to update', required: true, }), template: Property.LongText({ - displayName: 'Updated CloudFormation template', - description: - 'CloudFormation template with the new changes to be applied.', + displayName: 'Updated CloudFormation Template', + description: 'CloudFormation template with the new changes to be applied', required: true, }), ...waitForProperties(), diff --git a/packages/blocks/cloudhealth/src/lib/actions/get-asset-perspectives.ts b/packages/blocks/cloudhealth/src/lib/actions/get-asset-perspectives.ts index 1ef424c5dd..c263d6dfa5 100644 --- a/packages/blocks/cloudhealth/src/lib/actions/get-asset-perspectives.ts +++ b/packages/blocks/cloudhealth/src/lib/actions/get-asset-perspectives.ts @@ -8,13 +8,13 @@ import { searchAssets } from '../common/search-assets'; export const getAssetPerspectivesAction = createAction({ name: 'cloudhealth_get_asset_perspectives', displayName: 'Get Asset Perspectives', - description: 'Retrieve perspectives for a specific asset', + description: 'Get perspectives for a specific asset', auth: cloudhealthAuth, isWriteAction: false, props: { assetType: Property.Dropdown({ displayName: 'Asset Type', - description: 'The type of asset to fetch metadata for.', + description: 'The type of asset to fetch metadata for', required: true, refreshers: ['auth'], options: async ({ auth }: any) => { @@ -122,11 +122,14 @@ function getAssetPerspectives(asset: any): Record { .map((s) => s.trim()) .filter(Boolean); - const perspectivesAsObject = perspectives.reduce((acc, item) => { - const [key, ...rest] = item.split(':'); - acc[key.trim()] = rest.join(':').trim(); - return acc; - }, {} as Record); + const perspectivesAsObject = perspectives.reduce( + (acc, item) => { + const [key, ...rest] = item.split(':'); + acc[key.trim()] = rest.join(':').trim(); + return acc; + }, + {} as Record, + ); return perspectivesAsObject; } diff --git a/packages/blocks/cloudhealth/src/lib/actions/get-aws-accounts-action.ts b/packages/blocks/cloudhealth/src/lib/actions/get-aws-accounts-action.ts index b87c6f7a60..f1c93e2746 100644 --- a/packages/blocks/cloudhealth/src/lib/actions/get-aws-accounts-action.ts +++ b/packages/blocks/cloudhealth/src/lib/actions/get-aws-accounts-action.ts @@ -5,7 +5,7 @@ import { getAwsAccounts } from '../common/get-aws-accounts'; export const getAwsAccountsAction = createAction({ name: 'cloudhealth_get_aws_accounts', displayName: 'Get AWS Accounts', - description: 'Retrieve a list of AWS accounts', + description: 'Get a list of AWS accounts', auth: cloudhealthAuth, isWriteAction: false, props: {}, diff --git a/packages/blocks/cloudhealth/src/lib/actions/get-azure-subscriptions-action.ts b/packages/blocks/cloudhealth/src/lib/actions/get-azure-subscriptions-action.ts index a16fabf9e0..5c0a3304cb 100644 --- a/packages/blocks/cloudhealth/src/lib/actions/get-azure-subscriptions-action.ts +++ b/packages/blocks/cloudhealth/src/lib/actions/get-azure-subscriptions-action.ts @@ -5,7 +5,7 @@ import { getAzureSubscriptions } from '../common/get-azure-subscriptions'; export const getAzureSubscriptionsAction = createAction({ name: 'cloudhealth_get_azure_subscriptions', displayName: 'Get Azure Subscriptions', - description: 'Retrieve a list of Azure subscriptions', + description: 'Get a list of Azure subscriptions', auth: cloudhealthAuth, isWriteAction: false, props: {}, diff --git a/packages/blocks/cloudhealth/src/lib/actions/get-gcp-projections-action.ts b/packages/blocks/cloudhealth/src/lib/actions/get-gcp-projections-action.ts index 40537770f4..860d74afe4 100644 --- a/packages/blocks/cloudhealth/src/lib/actions/get-gcp-projections-action.ts +++ b/packages/blocks/cloudhealth/src/lib/actions/get-gcp-projections-action.ts @@ -5,7 +5,7 @@ import { getGcpProjects } from '../common/get-gcp-projects'; export const getGcpProjectsAction = createAction({ name: 'cloudhealth_get_gcp_projects', displayName: 'Get GCP Projects', - description: 'Retrieve a list of GCP projects', + description: 'Get a list of GCP projects', auth: cloudhealthAuth, isWriteAction: false, props: {}, diff --git a/packages/blocks/cloudhealth/src/lib/actions/get-recommendations-action.ts b/packages/blocks/cloudhealth/src/lib/actions/get-recommendations-action.ts index e95374ee08..d808dca6ca 100644 --- a/packages/blocks/cloudhealth/src/lib/actions/get-recommendations-action.ts +++ b/packages/blocks/cloudhealth/src/lib/actions/get-recommendations-action.ts @@ -9,13 +9,13 @@ import { export const getRecommendationsAction = createAction({ name: 'cloudhealth_get_recommendations', displayName: 'Get Recommendations', - description: 'Get Recommendations', + description: 'Get cost optimization recommendations from CloudHealth', auth: cloudhealthAuth, isWriteAction: false, props: { recommendationType: Property.StaticDropdown({ displayName: 'Recommendation Type', - description: 'The type of recommendation to fetch.', + description: 'The type of recommendation to fetch', required: true, options: { options: Object.entries(ASSET_CONFIGS).map(([key, value]) => ({ @@ -26,7 +26,7 @@ export const getRecommendationsAction = createAction({ }), evaluationDuration: Property.StaticDropdown({ displayName: 'Evaluation Duration', - description: 'The duration for which to get the recommendations.', + description: 'The duration for which to get the recommendations', required: true, options: { options: [ @@ -41,7 +41,7 @@ export const getRecommendationsAction = createAction({ }), limit: Property.Number({ displayName: 'Limit', - description: 'The maximum number of recommendations to return.', + description: 'The maximum number of recommendations to return', required: false, defaultValue: undefined, }), diff --git a/packages/blocks/cloudhealth/src/lib/actions/remove-tag-asset-action.ts b/packages/blocks/cloudhealth/src/lib/actions/remove-tag-asset-action.ts index 68364651c9..3a44733dca 100644 --- a/packages/blocks/cloudhealth/src/lib/actions/remove-tag-asset-action.ts +++ b/packages/blocks/cloudhealth/src/lib/actions/remove-tag-asset-action.ts @@ -7,13 +7,13 @@ import { safeFetch } from '../common/safe-fetch'; export const removeTagAssetAction = createAction({ name: 'cloudhealth_remove_tag_asset', displayName: 'Remove Asset Tags', - description: 'Remove Asset Tags', + description: 'Remove tags from CloudHealth assets', auth: cloudhealthAuth, isWriteAction: true, props: { assetType: Property.Dropdown({ displayName: 'Asset Type', - description: 'The type of asset to tag.', + description: 'The type of asset to tag', required: true, refreshers: ['auth'], options: async ({ auth }: any) => { @@ -43,7 +43,7 @@ export const removeTagAssetAction = createAction({ }), assetId: Property.Number({ displayName: 'Asset ID', - description: 'The ID of the asset to tag.', + description: 'The ID of the asset to tag', required: true, }), tags: Property.Array({ diff --git a/packages/blocks/cloudhealth/src/lib/actions/search-assets-action.ts b/packages/blocks/cloudhealth/src/lib/actions/search-assets-action.ts index b030b94d3a..04d51664d7 100644 --- a/packages/blocks/cloudhealth/src/lib/actions/search-assets-action.ts +++ b/packages/blocks/cloudhealth/src/lib/actions/search-assets-action.ts @@ -8,13 +8,13 @@ import { searchAssets } from '../common/search-assets'; export const searchAssetsAction = createAction({ name: 'cloudhealth_search_assets', displayName: 'Search Assets', - description: 'Retrieve assets that match specific criteria', + description: 'Get assets that match specific criteria', auth: cloudhealthAuth, isWriteAction: false, props: { assetType: Property.Dropdown({ displayName: 'Asset Type', - description: 'The type of asset to fetch metadata for.', + description: 'The type of asset to fetch metadata for', required: true, refreshers: ['auth'], options: async ({ auth }: any) => { @@ -61,11 +61,11 @@ export const searchAssetsAction = createAction({ ); properties['fields'] = Property.Array({ - displayName: 'Fields to filter by', + displayName: 'Fields to Filter by', required: false, properties: { fieldName: Property.StaticDropdown({ - displayName: 'Field name', + displayName: 'Field Name', required: true, options: { error: error, @@ -77,7 +77,7 @@ export const searchAssetsAction = createAction({ }, }), value: Property.ShortText({ - displayName: 'Value to search for', + displayName: 'Value to Search for', required: true, }), }, diff --git a/packages/blocks/cloudhealth/src/lib/actions/tag-asset-action.ts b/packages/blocks/cloudhealth/src/lib/actions/tag-asset-action.ts index 115bc3d0c0..f1ef90a55e 100644 --- a/packages/blocks/cloudhealth/src/lib/actions/tag-asset-action.ts +++ b/packages/blocks/cloudhealth/src/lib/actions/tag-asset-action.ts @@ -7,13 +7,13 @@ import { safeFetch } from '../common/safe-fetch'; export const tagAssetAction = createAction({ name: 'cloudhealth_tag_asset', displayName: 'Add or Update Asset Tags', - description: 'Add or Update Asset Tags', + description: 'Add or modify tags on CloudHealth assets', auth: cloudhealthAuth, isWriteAction: true, props: { assetType: Property.Dropdown({ displayName: 'Asset Type', - description: 'The type of asset to tag.', + description: 'The type of asset to tag', required: true, refreshers: ['auth'], options: async ({ auth }: any) => { @@ -43,7 +43,7 @@ export const tagAssetAction = createAction({ }), assetId: Property.Number({ displayName: 'Asset ID', - description: 'The ID of the asset to tag.', + description: 'The ID of the asset to tag', required: true, }), tags: Property.Object({ diff --git a/packages/blocks/common/src/lib/helpers/index.ts b/packages/blocks/common/src/lib/helpers/index.ts index 2b1f3b3e55..68a0f58aaf 100644 --- a/packages/blocks/common/src/lib/helpers/index.ts +++ b/packages/blocks/common/src/lib/helpers/index.ts @@ -87,7 +87,7 @@ export function createCustomApiCallAction({ headers: Property.Object({ displayName: 'Headers', description: - 'Authorization headers are injected automatically from your connection.', + 'Authorization headers are injected automatically from your connection', required: false, }), queryParams: Property.Object({ @@ -103,7 +103,7 @@ export function createCustomApiCallAction({ required: false, }), timeout: Property.Number({ - displayName: 'Timeout (in seconds)', + displayName: 'Timeout (in Seconds)', required: false, }), }, diff --git a/packages/blocks/common/src/lib/http/core/delegating-authentication-converter.ts b/packages/blocks/common/src/lib/http/core/delegating-authentication-converter.ts index 8f9d8b6f7f..cb7a9baa70 100644 --- a/packages/blocks/common/src/lib/http/core/delegating-authentication-converter.ts +++ b/packages/blocks/common/src/lib/http/core/delegating-authentication-converter.ts @@ -7,9 +7,7 @@ import { import { HttpHeader } from './http-header'; import type { HttpHeaders } from './http-headers'; -export class DelegatingAuthenticationConverter - implements AuthenticationConverter -{ +export class DelegatingAuthenticationConverter implements AuthenticationConverter { private readonly converters: Record< AuthenticationType, AuthenticationConverter @@ -31,9 +29,7 @@ export class DelegatingAuthenticationConverter } } -class BearerTokenAuthenticationConverter - implements AuthenticationConverter -{ +class BearerTokenAuthenticationConverter implements AuthenticationConverter { convert( authentication: BearerTokenAuthentication, headers: HttpHeaders, @@ -43,9 +39,7 @@ class BearerTokenAuthenticationConverter } } -class BasicTokenAuthenticationConverter - implements AuthenticationConverter -{ +class BasicTokenAuthenticationConverter implements AuthenticationConverter { convert( authentication: BasicAuthentication, headers: HttpHeaders, diff --git a/packages/blocks/databricks/src/lib/actions/execute-sql-statement.ts b/packages/blocks/databricks/src/lib/actions/execute-sql-statement.ts index eba8b3435a..91dc197dd5 100644 --- a/packages/blocks/databricks/src/lib/actions/execute-sql-statement.ts +++ b/packages/blocks/databricks/src/lib/actions/execute-sql-statement.ts @@ -13,15 +13,15 @@ import { workspaceDeploymentName } from '../common/workspace-deployment-name'; export const executeSqlStatement = createAction({ name: 'executeSqlStatement', auth: databricksAuth, - displayName: 'Execute SQL statement', + displayName: 'Execute SQL Statement', description: - 'Run a SQL query in a Databricks workspace and retrieve results using a specified warehouse.', + 'Run an SQL query in a Databricks workspace and retrieve results using a specified warehouse', isWriteAction: true, props: { workspaceDeploymentName: workspaceDeploymentName, warehouseId: warehouseId, sqlText: Property.LongText({ - displayName: 'SQL query', + displayName: 'SQL Query', required: true, description: 'The SQL statement to execute. You can use named parameters like `:name` or numbered placeholders like `:1`, `:2`, etc.', @@ -34,7 +34,7 @@ export const executeSqlStatement = createAction({ 'Optional parameter values to bind to the SQL query. Use a key-value structure where keys match named parameters or position indices.', }), timeout: Property.Number({ - displayName: 'Query timeout', + displayName: 'Query Timeout', description: 'Maximum number of seconds to wait for a query to complete before timing out. Min value is 5', required: true, diff --git a/packages/blocks/databricks/src/lib/actions/run-job.ts b/packages/blocks/databricks/src/lib/actions/run-job.ts index ba9f1f3c50..0d22f25094 100644 --- a/packages/blocks/databricks/src/lib/actions/run-job.ts +++ b/packages/blocks/databricks/src/lib/actions/run-job.ts @@ -10,8 +10,7 @@ export const runJob = createAction({ name: 'runJob', auth: databricksAuth, displayName: 'Run Databricks Job', - description: - 'Triggers an existing job in the specified Databricks workspace.', + description: 'Trigger an existing job in the specified Databricks workspace', isWriteAction: true, props: { workspaceDeploymentName: workspaceDeploymentName, @@ -19,12 +18,12 @@ export const runJob = createAction({ parameters: Property.Object({ displayName: 'Parameters', required: false, - description: 'Optional parameter values to bind job.', + description: 'Optional parameter values to bind job', }), timeout: Property.Number({ - displayName: 'Job timeout', + displayName: 'Job Timeout', description: - 'Maximum number of seconds to wait for all task in the job to complete before timing out.', + 'Maximum number of seconds to wait for all task in the job to complete before timing out', required: true, validators: [Validators.number, Validators.minValue(0)], defaultValue: 50, diff --git a/packages/blocks/date-helper/src/lib/actions/date-difference.ts b/packages/blocks/date-helper/src/lib/actions/date-difference.ts index 493397e3d0..dd8727428d 100644 --- a/packages/blocks/date-helper/src/lib/actions/date-difference.ts +++ b/packages/blocks/date-helper/src/lib/actions/date-difference.ts @@ -29,7 +29,7 @@ export const dateDifferenceAction = createAction({ required: true, }), startDateFormat: Property.StaticDropdown({ - displayName: 'Starting date format', + displayName: 'Starting Date Format', description: timeFormatDescription, options: { options: optionalTimeFormats, @@ -43,7 +43,7 @@ export const dateDifferenceAction = createAction({ required: true, }), endDateFormat: Property.StaticDropdown({ - displayName: 'Ending date format', + displayName: 'Ending Date Format', description: timeFormatDescription, options: { options: optionalTimeFormats, diff --git a/packages/blocks/date-helper/src/lib/actions/format-date.ts b/packages/blocks/date-helper/src/lib/actions/format-date.ts index 706613fad6..b235b41372 100644 --- a/packages/blocks/date-helper/src/lib/actions/format-date.ts +++ b/packages/blocks/date-helper/src/lib/actions/format-date.ts @@ -10,7 +10,7 @@ import { export const formatDateAction = createAction({ name: 'format_date', displayName: 'Format Date', - description: 'Converts a date from one format to another', + description: 'Convert a date from one format to another', errorHandlingOptions: { continueOnFailure: { hide: true, diff --git a/packages/blocks/date-helper/src/lib/actions/next-day-of-week.ts b/packages/blocks/date-helper/src/lib/actions/next-day-of-week.ts index f345d1d0de..b436461cfd 100644 --- a/packages/blocks/date-helper/src/lib/actions/next-day-of-week.ts +++ b/packages/blocks/date-helper/src/lib/actions/next-day-of-week.ts @@ -25,7 +25,7 @@ export const nextDayofWeek = createAction({ weekday: Property.StaticDropdown({ displayName: 'Weekday', description: - 'The weekday that you would like to get the date and time of.', + 'The weekday that you would like to get the date and time of', options: { options: [ { label: 'Sunday', value: 0 }, @@ -50,7 +50,7 @@ export const nextDayofWeek = createAction({ currentTime: Property.Checkbox({ displayName: 'Use Current Time', description: - 'If checked, the current time will be used instead of the time specified above.', + 'If checked, the current time will be used instead of the time specified above', required: false, defaultValue: false, }), diff --git a/packages/blocks/date-helper/src/lib/actions/next-day-of-year.ts b/packages/blocks/date-helper/src/lib/actions/next-day-of-year.ts index f3208a430f..edd12b5619 100644 --- a/packages/blocks/date-helper/src/lib/actions/next-day-of-year.ts +++ b/packages/blocks/date-helper/src/lib/actions/next-day-of-year.ts @@ -24,7 +24,7 @@ export const nextDayofYear = createAction({ props: { month: Property.StaticDropdown({ displayName: 'Month', - description: 'The month that you would like to get the date and time of.', + description: 'The month that you would like to get the date and time of', options: { options: [ { label: 'January', value: 1 }, @@ -46,7 +46,7 @@ export const nextDayofYear = createAction({ day: Property.Number({ displayName: 'Day of Month', description: - 'The day of the month that you would like to get the date and time of.', + 'The day of the month that you would like to get the date and time of', required: true, defaultValue: 1, validators: [Validators.minValue(1), Validators.maxValue(31)], @@ -62,7 +62,7 @@ export const nextDayofYear = createAction({ currentTime: Property.Checkbox({ displayName: 'Use Current Time', description: - 'If checked, the current time will be used instead of the time specified above.', + 'If checked, the current time will be used instead of the time specified above', required: false, defaultValue: false, }), diff --git a/packages/blocks/file-helper/src/index.ts b/packages/blocks/file-helper/src/index.ts index 9d41674097..a81d4bf05f 100644 --- a/packages/blocks/file-helper/src/index.ts +++ b/packages/blocks/file-helper/src/index.ts @@ -4,7 +4,7 @@ import { readFileAction } from './lib/actions/read-file'; export const filesHelper = createBlock({ displayName: 'File Operations', - description: 'Read file content and return it in different formats.', + description: 'Read file content and return it in different formats', auth: BlockAuth.None(), minimumSupportedRelease: '0.9.0', logoUrl: 'https://static.openops.com/blocks/file-operations.svg', diff --git a/packages/blocks/file-helper/src/lib/actions/create-file.ts b/packages/blocks/file-helper/src/lib/actions/create-file.ts index 58ad40156c..20243c4270 100644 --- a/packages/blocks/file-helper/src/lib/actions/create-file.ts +++ b/packages/blocks/file-helper/src/lib/actions/create-file.ts @@ -2,12 +2,12 @@ import { createAction, Property } from '@openops/blocks-framework'; export const createFile = createAction({ name: 'createFile', - displayName: 'Create file', + displayName: 'Create File', description: 'Create file from UTF-8 content', isWriteAction: false, props: { content: Property.LongText({ displayName: 'Content', required: true }), - fileName: Property.ShortText({ displayName: 'File name', required: true }), + fileName: Property.ShortText({ displayName: 'File Name', required: true }), }, async run({ propsValue, files }) { const fileUrl = await files.write({ diff --git a/packages/blocks/file-helper/src/lib/actions/read-file.ts b/packages/blocks/file-helper/src/lib/actions/read-file.ts index db5b5ffbf8..1197703c23 100644 --- a/packages/blocks/file-helper/src/lib/actions/read-file.ts +++ b/packages/blocks/file-helper/src/lib/actions/read-file.ts @@ -24,7 +24,7 @@ export const readFileAction = createAction({ required: true, }), readOptions: Property.StaticDropdown({ - displayName: 'Output format', + displayName: 'Output Format', description: 'The output format', required: true, options: { diff --git a/packages/blocks/finout/src/lib/actions/get-cost-guard-recommendations-action.ts b/packages/blocks/finout/src/lib/actions/get-cost-guard-recommendations-action.ts index 1af8784a4b..04b441c61a 100644 --- a/packages/blocks/finout/src/lib/actions/get-cost-guard-recommendations-action.ts +++ b/packages/blocks/finout/src/lib/actions/get-cost-guard-recommendations-action.ts @@ -5,7 +5,8 @@ import { getScanRecommendations, getScans } from '../common/cost-guard'; export const getCostGuardRecommendationsAction = createAction({ name: 'finout_get_cost_guard_recommendations', displayName: 'Get CostGuard Recommendations', - description: 'Get CostGuard Recommendations', + description: + 'Retrieve cost optimization recommendations from Finout CostGuard', auth: finoutAuth, isWriteAction: false, props: { diff --git a/packages/blocks/finout/src/lib/actions/get-view-data-action.ts b/packages/blocks/finout/src/lib/actions/get-view-data-action.ts index 719322581b..06ff14dfd7 100644 --- a/packages/blocks/finout/src/lib/actions/get-view-data-action.ts +++ b/packages/blocks/finout/src/lib/actions/get-view-data-action.ts @@ -5,7 +5,7 @@ import { getView, getViews } from '../common/views'; export const getViewDataAction = createAction({ name: 'finout_get_view_data', displayName: 'Get View Data', - description: 'Retrieve view data', + description: 'Get data from a Finout view', auth: finoutAuth, isWriteAction: false, props: { diff --git a/packages/blocks/finout/src/lib/actions/get-virtual-tags-action.ts b/packages/blocks/finout/src/lib/actions/get-virtual-tags-action.ts index 062aca434c..55fd42cec0 100644 --- a/packages/blocks/finout/src/lib/actions/get-virtual-tags-action.ts +++ b/packages/blocks/finout/src/lib/actions/get-virtual-tags-action.ts @@ -5,7 +5,7 @@ import { getVirtualTags } from '../common/virtual-tags'; export const getVirtualTagValuesAction = createAction({ name: 'finout_get_virtual_tags', displayName: 'Get Virtual Tag Values', - description: 'Retrieve virtual tags and their values', + description: 'Get virtual tags and their values', auth: finoutAuth, isWriteAction: false, props: { diff --git a/packages/blocks/flexera-one/src/lib/actions/get-incidents-action.ts b/packages/blocks/flexera-one/src/lib/actions/get-incidents-action.ts index 87cf6bf460..acb8ed3076 100644 --- a/packages/blocks/flexera-one/src/lib/actions/get-incidents-action.ts +++ b/packages/blocks/flexera-one/src/lib/actions/get-incidents-action.ts @@ -5,13 +5,13 @@ import { getIncident } from '../common/governance-api'; export const getIncidentAction = createAction({ auth: flexeraAuth, name: 'flexera_get_incident', - description: 'Get Incident', + description: 'Get details of a specific incident from Flexera', displayName: 'Get Incident', isWriteAction: false, props: { incidentId: Property.ShortText({ displayName: 'Incident ID', - description: 'The ID of the incident to get.', + description: 'The ID of the incident to get', required: true, }), }, diff --git a/packages/blocks/flexera-one/src/lib/actions/get-recommendations-action.ts b/packages/blocks/flexera-one/src/lib/actions/get-recommendations-action.ts index 6db23d3510..74c7dc8f84 100644 --- a/packages/blocks/flexera-one/src/lib/actions/get-recommendations-action.ts +++ b/packages/blocks/flexera-one/src/lib/actions/get-recommendations-action.ts @@ -6,13 +6,13 @@ import { getActiveRecommendations } from '../common/recommendations-api'; export const getActiveRecommendationsAction = createAction({ auth: flexeraAuth, name: 'flexera_get_active_recommendations', - description: 'Get Active Recommendations', + description: 'Get current active recommendations from Flexera policies', displayName: 'Get Active Recommendations', isWriteAction: false, props: { policySet: Property.Dropdown({ displayName: 'Policy Set', - description: 'The policy set to use for getting recommendations.', + description: 'The policy set to use for getting recommendations', required: true, refreshers: ['auth'], options: async ({ auth }) => { @@ -44,7 +44,7 @@ export const getActiveRecommendationsAction = createAction({ }), provider: Property.StaticDropdown({ displayName: 'Filter by Provider', - description: 'Filter recommendations by cloud provider.', + description: 'Filter recommendations by cloud provider', required: false, options: { options: [ diff --git a/packages/blocks/flexera-one/src/lib/auth.ts b/packages/blocks/flexera-one/src/lib/auth.ts index cd6175e92d..60fb00dba6 100644 --- a/packages/blocks/flexera-one/src/lib/auth.ts +++ b/packages/blocks/flexera-one/src/lib/auth.ts @@ -15,7 +15,7 @@ export const flexeraAuth = BlockAuth.CustomAuth({ props: { appRegion: Property.StaticDropdown({ displayName: 'App Region', - description: `Select the region where your Flexera application is hosted.`, + description: `Select the region where your Flexera application is hosted`, required: true, options: { options: [ @@ -33,12 +33,12 @@ export const flexeraAuth = BlockAuth.CustomAuth({ }), orgId: Property.ShortText({ displayName: 'Organization ID', - description: 'The organization ID to use for Flexera API calls.', + description: 'The organization ID to use for Flexera API calls', required: true, }), projectId: Property.ShortText({ displayName: 'Project ID', - description: 'The project ID to use for Flexera API calls.', + description: 'The project ID to use for Flexera API calls', required: true, }), }, diff --git a/packages/blocks/flexera/src/lib/actions/get-clusters-action.ts b/packages/blocks/flexera/src/lib/actions/get-clusters-action.ts index e4fb5e1974..9eb35a9fff 100644 --- a/packages/blocks/flexera/src/lib/actions/get-clusters-action.ts +++ b/packages/blocks/flexera/src/lib/actions/get-clusters-action.ts @@ -5,13 +5,13 @@ import { flexeraSpotAuth } from '../../auth'; export const getClustersAction = createAction({ auth: flexeraSpotAuth, name: 'flexera_get_clusters', - description: 'Get Clusters', + description: 'Get clusters from Flexera Spot', displayName: 'Get Clusters', isWriteAction: false, props: { accountId: Property.Dropdown({ displayName: 'Account', - description: 'The account to get clusters from.', + description: 'The account to get clusters from', required: true, refreshers: ['auth'], options: async ({ auth }: any) => { diff --git a/packages/blocks/framework/src/lib/action/action.ts b/packages/blocks/framework/src/lib/action/action.ts index 6763c2a3b4..306259df72 100644 --- a/packages/blocks/framework/src/lib/action/action.ts +++ b/packages/blocks/framework/src/lib/action/action.ts @@ -47,8 +47,7 @@ type CreateActionParams< export class IAction< BlockAuth extends BlockAuthProperty, ActionProps extends InputPropertyMap, -> implements ActionBase -{ +> implements ActionBase { constructor( public readonly name: string, public readonly displayName: string, diff --git a/packages/blocks/framework/src/lib/block-metadata.ts b/packages/blocks/framework/src/lib/block-metadata.ts index 494932b2fd..6a70d74e52 100644 --- a/packages/blocks/framework/src/lib/block-metadata.ts +++ b/packages/blocks/framework/src/lib/block-metadata.ts @@ -70,7 +70,7 @@ export const ActionBase = Type.Object({ }), description: Type.String({ description: - 'A concise explanation of the block’s purpose, capabilities, and core functionality.', + 'A concise explanation of the block’s purpose, capabilities, and core functionality', }), riskLevel: Type.Optional(Type.Enum(RiskLevel)), props: BlockPropertyMap, diff --git a/packages/blocks/framework/src/lib/block.ts b/packages/blocks/framework/src/lib/block.ts index 68a33cdee3..76307aeefe 100644 --- a/packages/blocks/framework/src/lib/block.ts +++ b/packages/blocks/framework/src/lib/block.ts @@ -8,9 +8,9 @@ import { BlockBaseDetails, BlockMetadata } from './block-metadata'; import { BlockAuthProperty } from './property/authentication'; import { Trigger } from './trigger/trigger'; -export class Block - implements Omit -{ +export class Block< + BlockAuth extends BlockAuthProperty = BlockAuthProperty, +> implements Omit { private readonly _actions: Record = {}; private readonly _triggers: Record = {}; diff --git a/packages/blocks/framework/src/lib/context.ts b/packages/blocks/framework/src/lib/context.ts index 98fee1b402..37a3bf47a3 100644 --- a/packages/blocks/framework/src/lib/context.ts +++ b/packages/blocks/framework/src/lib/context.ts @@ -76,12 +76,12 @@ export type TriggerHookContext< > = S extends TriggerStrategy.APP_WEBHOOK ? AppWebhookTriggerHookContext : S extends TriggerStrategy.POLLING - ? PollingTriggerHookContext - : S extends TriggerStrategy.SCHEDULED - ? ScheduledTriggerHookContext - : S extends TriggerStrategy.WEBHOOK - ? WebhookTriggerHookContext - : never; + ? PollingTriggerHookContext + : S extends TriggerStrategy.SCHEDULED + ? ScheduledTriggerHookContext + : S extends TriggerStrategy.WEBHOOK + ? WebhookTriggerHookContext + : never; export type TestOrRunHookContext< BlockAuth extends BlockAuthProperty, diff --git a/packages/blocks/framework/src/lib/property/index.ts b/packages/blocks/framework/src/lib/property/index.ts index d2b8ac4b2d..7eb8f7ec3f 100644 --- a/packages/blocks/framework/src/lib/property/index.ts +++ b/packages/blocks/framework/src/lib/property/index.ts @@ -52,11 +52,11 @@ export type BlockProperty = InputProperty | BlockAuthProperty; export const BlockPropertyMap = Type.Record( Type.String({ - description: 'Unique property name within the block.', + description: 'Unique property name within the block', }), BlockProperty, { - description: 'A mapping of property keys to their definitions.', + description: 'A mapping of property keys to their definitions', }, ); export interface BlockPropertyMap { @@ -71,8 +71,8 @@ export interface InputPropertyMap { export type BlockPropValueSchema = T extends undefined ? undefined : T extends { required: true } - ? T['valueSchema'] - : T['valueSchema'] | undefined; + ? T['valueSchema'] + : T['valueSchema'] | undefined; export type StaticPropsValue = { [P in keyof T]: BlockPropValueSchema; diff --git a/packages/blocks/framework/src/lib/property/input/common.ts b/packages/blocks/framework/src/lib/property/input/common.ts index 3e6bbdff0a..9d0026bc8b 100644 --- a/packages/blocks/framework/src/lib/property/input/common.ts +++ b/packages/blocks/framework/src/lib/property/input/common.ts @@ -41,26 +41,26 @@ export type TPropertyValue< defaultValue?: U extends PropertyType.ARRAY ? unknown[] : U extends PropertyType.JSON - ? object - : U extends PropertyType.CHECKBOX - ? boolean - : U extends PropertyType.LONG_TEXT - ? string - : U extends PropertyType.SHORT_TEXT - ? string - : U extends PropertyType.NUMBER - ? number - : U extends PropertyType.DROPDOWN - ? unknown - : U extends PropertyType.MULTI_SELECT_DROPDOWN - ? unknown[] - : U extends PropertyType.STATIC_MULTI_SELECT_DROPDOWN - ? unknown[] - : U extends PropertyType.STATIC_DROPDOWN - ? unknown - : U extends PropertyType.DATE_TIME - ? string - : U extends PropertyType.FILE - ? WorkflowFile - : unknown; + ? object + : U extends PropertyType.CHECKBOX + ? boolean + : U extends PropertyType.LONG_TEXT + ? string + : U extends PropertyType.SHORT_TEXT + ? string + : U extends PropertyType.NUMBER + ? number + : U extends PropertyType.DROPDOWN + ? unknown + : U extends PropertyType.MULTI_SELECT_DROPDOWN + ? unknown[] + : U extends PropertyType.STATIC_MULTI_SELECT_DROPDOWN + ? unknown[] + : U extends PropertyType.STATIC_DROPDOWN + ? unknown + : U extends PropertyType.DATE_TIME + ? string + : U extends PropertyType.FILE + ? WorkflowFile + : unknown; }; diff --git a/packages/blocks/framework/src/lib/trigger/trigger.ts b/packages/blocks/framework/src/lib/trigger/trigger.ts index 3a9ce9f62a..40bd9cadea 100644 --- a/packages/blocks/framework/src/lib/trigger/trigger.ts +++ b/packages/blocks/framework/src/lib/trigger/trigger.ts @@ -108,8 +108,7 @@ export class ITrigger< TS extends TriggerStrategy, BlockAuth extends BlockAuthProperty, TriggerProps extends InputPropertyMap, -> implements TriggerBase -{ +> implements TriggerBase { constructor( public readonly name: string, public readonly displayName: string, diff --git a/packages/blocks/github/src/lib/actions/create-pull-request-action.ts b/packages/blocks/github/src/lib/actions/create-pull-request-action.ts index da06b654e8..49c01c2fa2 100644 --- a/packages/blocks/github/src/lib/actions/create-pull-request-action.ts +++ b/packages/blocks/github/src/lib/actions/create-pull-request-action.ts @@ -17,30 +17,30 @@ export const createPullRequestAction = createAction({ auth: auth, name: 'create_pull_request_action', description: 'Create a new pull request', - displayName: 'Create pull request', + displayName: 'Create Pull Request', requireAuth: true, isWriteAction: true, props: { repository: getRepositoryProperty(), baseBranch: getBranchProperty(), filePath: Property.ShortText({ - displayName: 'File path', - description: 'Path of the file that will be changed.', + displayName: 'File Path', + description: 'Path of the file that will be changed', required: true, }), newFileContent: Property.ShortText({ - displayName: 'New file content', - description: 'New content for the file.', + displayName: 'New File Content', + description: 'New content for the file', required: true, }), title: Property.ShortText({ - displayName: 'Pull request title', - description: 'Message for the pull request title.', + displayName: 'Pull Request Title', + description: 'Message for the pull request title', required: true, }), description: Property.LongText({ - displayName: 'Pull request description', - description: 'Message for the pull request description.', + displayName: 'Pull Request Description', + description: 'Message for the pull request description', required: true, }), reviewers: getReviewersProperty(), diff --git a/packages/blocks/github/src/lib/actions/get-file-action.ts b/packages/blocks/github/src/lib/actions/get-file-action.ts index b376544dc1..0353d2c0c3 100644 --- a/packages/blocks/github/src/lib/actions/get-file-action.ts +++ b/packages/blocks/github/src/lib/actions/get-file-action.ts @@ -7,7 +7,7 @@ import { getRepositoryProperty } from '../common/repository-property'; export const getFileAction = createAction({ auth: auth, name: 'get_file_action', - displayName: 'Get file content', + displayName: 'Get File Content', description: 'Get file content from a repository', requireAuth: true, isWriteAction: false, @@ -15,8 +15,8 @@ export const getFileAction = createAction({ repository: getRepositoryProperty(), branch: getBranchProperty(), filePath: Property.ShortText({ - displayName: 'File path', - description: '', + displayName: 'File Path', + description: 'Path to the file in the repository', required: true, }), }, diff --git a/packages/blocks/github/src/lib/actions/run-workflow-action.ts b/packages/blocks/github/src/lib/actions/run-workflow-action.ts index e5970a3f5a..695b0a0241 100644 --- a/packages/blocks/github/src/lib/actions/run-workflow-action.ts +++ b/packages/blocks/github/src/lib/actions/run-workflow-action.ts @@ -57,7 +57,7 @@ export const runWorkflowAction = createAction({ branch: getBranchProperty(), inputs: Property.DynamicProperties({ displayName: 'Inputs', - description: 'Input keys and values configured in the workflow file.', + description: 'Input keys and values configured in the workflow file', required: true, refreshers: ['workflow'], props: async ({ auth, repository, workflow }) => { diff --git a/packages/blocks/github/src/lib/common/reviewers-property.ts b/packages/blocks/github/src/lib/common/reviewers-property.ts index bb58d42975..33b1443884 100644 --- a/packages/blocks/github/src/lib/common/reviewers-property.ts +++ b/packages/blocks/github/src/lib/common/reviewers-property.ts @@ -12,7 +12,7 @@ export function getReviewersProperty(): MultiSelectDropdownProperty< return Property.MultiSelectDropdown({ displayName: 'Reviewers', description: - 'List of GitHub usernames to be notified to review the pull request.', + 'List of GitHub usernames to be notified to review the pull request', required: false, refreshers: ['repository'], options: async ({ repository, auth }) => { diff --git a/packages/blocks/github/src/lib/common/team-reviewers-property.ts b/packages/blocks/github/src/lib/common/team-reviewers-property.ts index c82c749a1a..28ef21045d 100644 --- a/packages/blocks/github/src/lib/common/team-reviewers-property.ts +++ b/packages/blocks/github/src/lib/common/team-reviewers-property.ts @@ -12,7 +12,7 @@ export function getTeamReviewersProperty(): MultiSelectDropdownProperty< return Property.MultiSelectDropdown({ displayName: 'Team Reviewers', description: - 'List of GitHub teams to be notified to review the pull request.', + 'List of GitHub teams to be notified to review the pull request', required: false, refreshers: ['repository'], options: async ({ repository, auth }) => { diff --git a/packages/blocks/google-cloud/src/lib/actions/custom-google-cloud-api-action.ts b/packages/blocks/google-cloud/src/lib/actions/custom-google-cloud-api-action.ts index 10d5dbd716..ae4bfb952b 100644 --- a/packages/blocks/google-cloud/src/lib/actions/custom-google-cloud-api-action.ts +++ b/packages/blocks/google-cloud/src/lib/actions/custom-google-cloud-api-action.ts @@ -26,7 +26,7 @@ async function getAccessToken( export const customGoogleCloudApiCallAction = createCustomApiCallAction({ auth: googleCloudAuth, name: 'google_custom_api_call', - description: 'Make a custom REST API call to Google Cloud.', + description: 'Make a custom REST API call to Google Cloud', displayName: 'Custom Google Cloud API Call', baseUrl: () => 'https://cloudresourcemanager.googleapis.com/v1', additionalProps: { diff --git a/packages/blocks/google-cloud/src/lib/actions/execute-sql-query-action.ts b/packages/blocks/google-cloud/src/lib/actions/execute-sql-query-action.ts index 1f81e39552..527d497618 100644 --- a/packages/blocks/google-cloud/src/lib/actions/execute-sql-query-action.ts +++ b/packages/blocks/google-cloud/src/lib/actions/execute-sql-query-action.ts @@ -21,8 +21,8 @@ type SqlQueryParams = export const executeSqlQueryAction = createAction({ auth: googleCloudAuth, name: 'google_execute_sql_query', - displayName: 'Run BigQuery SQL Query', - description: 'Run a SQL query on BigQuery and return the results.', + displayName: 'Execute BigQuery SQL Query', + description: 'Run an SQL query on BigQuery and return the results', isWriteAction: true, props: { useHostSession: getUseHostSessionProperty( @@ -31,7 +31,7 @@ export const executeSqlQueryAction = createAction({ ), project: projectCliDropdown, sqlText: Property.LongText({ - displayName: 'SQL query', + displayName: 'SQL Query', required: true, description: 'The SQL statement to execute. You can use named parameters like `:name` or numbered placeholders like `:1`, `:2`, etc.', @@ -42,11 +42,11 @@ export const executeSqlQueryAction = createAction({ required: false, properties: { paramName: Property.ShortText({ - displayName: 'Parameter name', + displayName: 'Parameter Name', required: true, }), columnType: Property.StaticDropdown({ - displayName: 'Column type', + displayName: 'Column Type', required: true, options: { options: Object.keys(BqColumnTypesEnum).map((key) => ({ @@ -56,7 +56,7 @@ export const executeSqlQueryAction = createAction({ }, }), value: Property.ShortText({ - displayName: 'Parameter value', + displayName: 'Parameter Value', required: true, }), }, diff --git a/packages/blocks/google-cloud/src/lib/actions/get-recommendations-cli-action.ts b/packages/blocks/google-cloud/src/lib/actions/get-recommendations-cli-action.ts index 40461156c1..17c723ee22 100644 --- a/packages/blocks/google-cloud/src/lib/actions/get-recommendations-cli-action.ts +++ b/packages/blocks/google-cloud/src/lib/actions/get-recommendations-cli-action.ts @@ -19,9 +19,9 @@ export const getRecommendationsAction = createAction({ 'gcloud auth login', ), filterBySelection: Property.StaticDropdown({ - displayName: 'Choose filter', + displayName: 'Choose Filter', description: - 'Select whether to filter by billing account, folder ID, organization ID, or project ID.', + 'Select whether to filter by billing account, folder ID, organization ID, or project ID', required: true, options: { options: [ @@ -89,7 +89,7 @@ export const getRecommendationsAction = createAction({ recommenders: getRecommendersDropdown(), location: Property.ShortText({ displayName: 'Location', - description: 'Location to list recommendations for.', + description: 'Location to list recommendations for', required: true, }), }, @@ -151,7 +151,7 @@ async function getScopeOptionProperty( folder: Property.ShortText({ displayName: 'Folder ID', description: - 'The Google Cloud Platform folder ID to use for this invocation.', + 'The Google Cloud Platform folder ID to use for this invocation', required: true, }), }; @@ -166,7 +166,7 @@ async function getScopeOptionProperty( }), displayName: 'Billing Account', description: - 'The Google Cloud Platform billing account ID to use for this invocation.', + 'The Google Cloud Platform billing account ID to use for this invocation', }, organization: { command: 'gcloud organizations list', @@ -176,7 +176,7 @@ async function getScopeOptionProperty( }), displayName: 'Organization ID', description: - 'The Google Cloud Platform organization ID to use for this invocation.', + 'The Google Cloud Platform organization ID to use for this invocation', }, project: { command: 'gcloud projects list', @@ -185,7 +185,7 @@ async function getScopeOptionProperty( value: item.projectId, }), displayName: 'Project ID', - description: 'The Google Cloud Platform project ID.', + description: 'The Google Cloud Platform project ID', }, }; @@ -241,7 +241,7 @@ function getRecommendersDropdown() { return Property.MultiSelectDropdown({ displayName: 'Recommender', description: - 'The Google Cloud Platform recommenders to use for this invocation.', + 'The Google Cloud Platform recommenders to use for this invocation', required: true, refreshers: [ 'auth', diff --git a/packages/blocks/http/src/index.ts b/packages/blocks/http/src/index.ts index 6ed1be5dcc..34cc729ef8 100644 --- a/packages/blocks/http/src/index.ts +++ b/packages/blocks/http/src/index.ts @@ -6,7 +6,7 @@ import { httpAuth } from './lib/common/auth'; export const http = createBlock({ displayName: 'HTTP', - description: 'Sends HTTP requests and return responses', + description: 'Send HTTP requests and return responses', logoUrl: 'https://static.openops.com/blocks/http-block.svg', categories: [BlockCategory.CORE], auth: httpAuth, diff --git a/packages/blocks/http/src/lib/actions/return-response.ts b/packages/blocks/http/src/lib/actions/return-response.ts index 547c6d4ff7..abf1dd7a50 100644 --- a/packages/blocks/http/src/lib/actions/return-response.ts +++ b/packages/blocks/http/src/lib/actions/return-response.ts @@ -9,7 +9,7 @@ import { StatusCodes } from 'http-status-codes'; export const httpReturnResponse = createAction({ name: 'return_response', displayName: 'Return Response', - description: 'return a response', + description: 'Return an HTTP response from a webhook trigger', isWriteAction: false, props: { status: Property.Number({ diff --git a/packages/blocks/http/src/lib/actions/send-http-request-action.ts b/packages/blocks/http/src/lib/actions/send-http-request-action.ts index 4dcb28fb6f..ca9e947d67 100644 --- a/packages/blocks/http/src/lib/actions/send-http-request-action.ts +++ b/packages/blocks/http/src/lib/actions/send-http-request-action.ts @@ -23,8 +23,8 @@ const toLowerCaseKeys = (obj: HttpHeaders) => export const httpSendRequestAction = createAction({ name: 'send_request', - displayName: 'Send HTTP request', - description: 'Send HTTP request', + displayName: 'Send HTTP Request', + description: 'Send an HTTP request to a specified URL', isWriteAction: true, auth: httpAuth, props: { @@ -38,7 +38,7 @@ export const httpSendRequestAction = createAction({ required: false, }), queryParams: Property.Object({ - displayName: 'Query params', + displayName: 'Query Params', required: false, }), body_type: Property.StaticDropdown({ @@ -142,7 +142,7 @@ export const httpSendRequestAction = createAction({ }, }), timeout: Property.Number({ - displayName: 'Timeout(in seconds)', + displayName: 'Timeout (in Seconds)', required: false, }), failsafe: Property.Checkbox({ diff --git a/packages/blocks/hyperglance/src/lib/actions/getCollectorRecordStatistics.ts b/packages/blocks/hyperglance/src/lib/actions/getCollectorRecordStatistics.ts index 65969c6f9f..4b4c534ac1 100644 --- a/packages/blocks/hyperglance/src/lib/actions/getCollectorRecordStatistics.ts +++ b/packages/blocks/hyperglance/src/lib/actions/getCollectorRecordStatistics.ts @@ -10,7 +10,7 @@ export const getCollectorRecordStatistics = createAction({ auth: hyperglanceAuth, name: 'getCollectorRecordStatistics', displayName: 'Get Credential Statistics', - description: 'Returns Collection Statistics for the credential', + description: 'Get collection statistics for the specified credential', props: { datasource: getDatasourceProp({ description: 'Get credential of this cloud provider', diff --git a/packages/blocks/hyperglance/src/lib/actions/getCollectorRecordStatus.ts b/packages/blocks/hyperglance/src/lib/actions/getCollectorRecordStatus.ts index eafce509da..d8b82ff0ce 100644 --- a/packages/blocks/hyperglance/src/lib/actions/getCollectorRecordStatus.ts +++ b/packages/blocks/hyperglance/src/lib/actions/getCollectorRecordStatus.ts @@ -10,7 +10,7 @@ export const getCollectorRecordStatus = createAction({ auth: hyperglanceAuth, name: 'getCollectorRecordStatus', displayName: 'Get Credential Status', - description: 'Returns Collector Record Status', + description: 'Get collector record status for the specified credential', props: { datasource: getDatasourceProp({ description: 'Get credential of this cloud provider', diff --git a/packages/blocks/hyperglance/src/lib/actions/getRecommendations.ts b/packages/blocks/hyperglance/src/lib/actions/getRecommendations.ts index b7d0a7acb8..500e966521 100644 --- a/packages/blocks/hyperglance/src/lib/actions/getRecommendations.ts +++ b/packages/blocks/hyperglance/src/lib/actions/getRecommendations.ts @@ -10,7 +10,7 @@ export const getRecommendations = createAction({ auth: hyperglanceAuth, name: 'getRecommendations', displayName: 'Get Recommendations', - description: 'Get Recommendations', + description: 'Get cost optimization recommendations from Hyperglance', props: { datasource: getDatasourceProp({ description: 'Fetch recommendations in regards to this cloud provider', diff --git a/packages/blocks/hyperglance/src/lib/hgapi/collectorRecords.ts b/packages/blocks/hyperglance/src/lib/hgapi/collectorRecords.ts index 6639cd7476..956707f711 100644 --- a/packages/blocks/hyperglance/src/lib/hgapi/collectorRecords.ts +++ b/packages/blocks/hyperglance/src/lib/hgapi/collectorRecords.ts @@ -8,7 +8,7 @@ import { export function getAliasDropdownProp() { return Property.Dropdown({ - displayName: 'Account name', + displayName: 'Account Name', required: true, refreshers: ['auth', 'datasource'], options: async ({ auth, datasource }) => { @@ -31,7 +31,7 @@ export function getAliasDropdownProp() { export function getAliasPlainTextProp() { return Property.ShortText({ - displayName: 'Account name', + displayName: 'Account Name', required: true, }); } diff --git a/packages/blocks/hyperglance/src/lib/hgapi/search.ts b/packages/blocks/hyperglance/src/lib/hgapi/search.ts index 76aba4ac93..a7bcb2c3d9 100644 --- a/packages/blocks/hyperglance/src/lib/hgapi/search.ts +++ b/packages/blocks/hyperglance/src/lib/hgapi/search.ts @@ -3,7 +3,7 @@ import { HGAuth } from '../auth'; import { makeGetRequest } from '../callRestApi'; export function getAccountProp() { return Property.ShortText({ - displayName: 'Filter by Account name', + displayName: 'Filter by Account Name', required: false, }); } diff --git a/packages/blocks/hyperglance/src/lib/hgapi/topology.ts b/packages/blocks/hyperglance/src/lib/hgapi/topology.ts index 7cfe0464a2..cc023e9cfa 100644 --- a/packages/blocks/hyperglance/src/lib/hgapi/topology.ts +++ b/packages/blocks/hyperglance/src/lib/hgapi/topology.ts @@ -18,7 +18,7 @@ export function getExportTypeProp() { export function getAccountProp() { return Property.ShortText({ - displayName: 'Account name', + displayName: 'Account Name', required: false, }); } @@ -40,7 +40,7 @@ export function getShowCostProp() { export function getIncludeDependenciesProp() { return Property.Checkbox({ - displayName: 'Include dependencies', + displayName: 'Include Dependencies', required: true, defaultValue: true, }); diff --git a/packages/blocks/imap/src/lib/triggers/new-email.ts b/packages/blocks/imap/src/lib/triggers/new-email.ts index 9e7e439e62..1e6f36e06f 100644 --- a/packages/blocks/imap/src/lib/triggers/new-email.ts +++ b/packages/blocks/imap/src/lib/triggers/new-email.ts @@ -12,26 +12,26 @@ export const newEmail = createTrigger({ auth: imapAuth, name: 'new_email', displayName: 'New Email', - description: 'Trigger when a new email is received.', + description: 'Trigger when a new email is received', props: { mailbox, senders: Property.Array({ displayName: 'Sender (From)', - description: 'Matches at least one sender.', + description: 'Matches at least one sender', required: false, }), recipients: Property.Array({ displayName: 'Recipients (To)', - description: 'Matches at least one recipient (To).', + description: 'Matches at least one recipient (To)', required: false, }), cc: Property.Array({ displayName: 'CC', - description: 'Matches at least one CC address.', + description: 'Matches at least one CC address', required: false, }), subject: Property.ShortText({ - displayName: 'Subject text contains', + displayName: 'Subject Text Contains', required: false, }), }, diff --git a/packages/blocks/jira-cloud/src/lib/actions/add-attachment-to-issue.ts b/packages/blocks/jira-cloud/src/lib/actions/add-attachment-to-issue.ts index 7ab7815249..2304ec3a35 100644 --- a/packages/blocks/jira-cloud/src/lib/actions/add-attachment-to-issue.ts +++ b/packages/blocks/jira-cloud/src/lib/actions/add-attachment-to-issue.ts @@ -9,7 +9,7 @@ export const addAttachmentToIssueAction = createAction({ auth: jiraCloudAuth, name: 'add_issue_attachment', displayName: 'Add Attachment to Issue', - description: 'Adds an attachment to an issue.', + description: 'Add an attachment to an issue', isWriteAction: true, props: { projectId: getProjectIdDropdown(), diff --git a/packages/blocks/jira-cloud/src/lib/actions/add-comment-to-issue.ts b/packages/blocks/jira-cloud/src/lib/actions/add-comment-to-issue.ts index 6375346a29..30f6898333 100644 --- a/packages/blocks/jira-cloud/src/lib/actions/add-comment-to-issue.ts +++ b/packages/blocks/jira-cloud/src/lib/actions/add-comment-to-issue.ts @@ -8,7 +8,7 @@ export const addCommentToIssueAction = createAction({ auth: jiraCloudAuth, name: 'add_issue_comment', displayName: 'Add Issue Comment', - description: 'Adds a comment to an issue.', + description: 'Add a comment to an issue', isWriteAction: true, props: { projectId: getProjectIdDropdown(), diff --git a/packages/blocks/jira-cloud/src/lib/actions/assign-issue.ts b/packages/blocks/jira-cloud/src/lib/actions/assign-issue.ts index 1cf7530902..72779e27ce 100644 --- a/packages/blocks/jira-cloud/src/lib/actions/assign-issue.ts +++ b/packages/blocks/jira-cloud/src/lib/actions/assign-issue.ts @@ -12,7 +12,7 @@ export const assignIssueAction = createAction({ auth: jiraCloudAuth, name: 'assign_issue', displayName: 'Assign Issue', - description: 'Assigns an issue to a user.', + description: 'Assigns an issue to a user', isWriteAction: true, props: { projectId: getProjectIdDropdown(), diff --git a/packages/blocks/jira-cloud/src/lib/actions/delete-issue-comment.ts b/packages/blocks/jira-cloud/src/lib/actions/delete-issue-comment.ts index 53d30f186b..2c84a52b79 100644 --- a/packages/blocks/jira-cloud/src/lib/actions/delete-issue-comment.ts +++ b/packages/blocks/jira-cloud/src/lib/actions/delete-issue-comment.ts @@ -12,7 +12,7 @@ export const deleteIssueCommentAction = createAction({ auth: jiraCloudAuth, name: 'delete_issue_comment', displayName: 'Delete Issue Comment', - description: 'Deletes a comment on a specific issue.', + description: 'Delete a comment from a specific issue', isWriteAction: true, props: { projectId: getProjectIdDropdown(), diff --git a/packages/blocks/jira-cloud/src/lib/actions/list-issue-comments.ts b/packages/blocks/jira-cloud/src/lib/actions/list-issue-comments.ts index 593aa5b25a..a46c366c4e 100644 --- a/packages/blocks/jira-cloud/src/lib/actions/list-issue-comments.ts +++ b/packages/blocks/jira-cloud/src/lib/actions/list-issue-comments.ts @@ -8,7 +8,7 @@ export const listIssueCommentsAction = createAction({ auth: jiraCloudAuth, name: 'list_issue_comments', displayName: 'List Issue Comments', - description: 'Returns all comments for an issue.', + description: 'Get all comments for an issue', isWriteAction: false, props: { projectId: getProjectIdDropdown(), diff --git a/packages/blocks/jira-cloud/src/lib/actions/update-issue-comment.ts b/packages/blocks/jira-cloud/src/lib/actions/update-issue-comment.ts index 15d4c5d178..22bb1b218d 100644 --- a/packages/blocks/jira-cloud/src/lib/actions/update-issue-comment.ts +++ b/packages/blocks/jira-cloud/src/lib/actions/update-issue-comment.ts @@ -12,7 +12,7 @@ export const updateIssueCommentAction = createAction({ auth: jiraCloudAuth, name: 'update_issue_comment', displayName: 'Update Issue Comment', - description: 'Updates a comment to a specific issue.', + description: 'Update a comment on a specific issue', isWriteAction: true, props: { projectId: getProjectIdDropdown(), diff --git a/packages/blocks/jira-cloud/src/lib/actions/update-issue.ts b/packages/blocks/jira-cloud/src/lib/actions/update-issue.ts index 8db0ea6060..805739a0d6 100644 --- a/packages/blocks/jira-cloud/src/lib/actions/update-issue.ts +++ b/packages/blocks/jira-cloud/src/lib/actions/update-issue.ts @@ -13,7 +13,7 @@ import { export const updateIssueAction = createAction({ name: 'update_issue', displayName: 'Update Issue', - description: 'Updates a existing issue in a project.', + description: 'Update an existing issue in a project', auth: jiraCloudAuth, isWriteAction: true, props: { diff --git a/packages/blocks/jira-cloud/src/lib/triggers/new-issue.ts b/packages/blocks/jira-cloud/src/lib/triggers/new-issue.ts index a469159443..a9f4b84281 100644 --- a/packages/blocks/jira-cloud/src/lib/triggers/new-issue.ts +++ b/packages/blocks/jira-cloud/src/lib/triggers/new-issue.ts @@ -35,7 +35,7 @@ const polling: Polling< export const newIssue = createTrigger({ name: 'new_issue', displayName: 'New Issue', - description: 'Triggers when a new issue is created', + description: 'Trigger when a new issue is created', auth: jiraCloudAuth, type: TriggerStrategy.POLLING, props: { diff --git a/packages/blocks/jira-cloud/src/lib/triggers/updated-issue.ts b/packages/blocks/jira-cloud/src/lib/triggers/updated-issue.ts index 7409c81394..ad04b39b74 100644 --- a/packages/blocks/jira-cloud/src/lib/triggers/updated-issue.ts +++ b/packages/blocks/jira-cloud/src/lib/triggers/updated-issue.ts @@ -35,7 +35,7 @@ const polling: Polling< export const updatedIssue = createTrigger({ name: 'updated_issue', displayName: 'Updated Issue', - description: 'Triggers when an issue is updated', + description: 'Trigger when an issue is updated', auth: jiraCloudAuth, type: TriggerStrategy.POLLING, props: { diff --git a/packages/blocks/linear/src/lib/actions/raw-graphql-query.ts b/packages/blocks/linear/src/lib/actions/raw-graphql-query.ts index 92afc62fbb..3927355661 100644 --- a/packages/blocks/linear/src/lib/actions/raw-graphql-query.ts +++ b/packages/blocks/linear/src/lib/actions/raw-graphql-query.ts @@ -4,7 +4,7 @@ import { makeClient } from '../common/client'; export const linearRawGraphqlQuery = createAction({ name: 'rawGraphqlQuery', - displayName: 'Raw GraphQL query', + displayName: 'Raw GraphQL Query', description: 'Perform a raw GraphQL query', auth: linearAuth, isWriteAction: true, diff --git a/packages/blocks/linear/src/lib/triggers/new-issue.ts b/packages/blocks/linear/src/lib/triggers/new-issue.ts index 31d9ccd682..dc9d8bbd4f 100644 --- a/packages/blocks/linear/src/lib/triggers/new-issue.ts +++ b/packages/blocks/linear/src/lib/triggers/new-issue.ts @@ -7,7 +7,7 @@ export const linearNewIssue = createTrigger({ auth: linearAuth, name: 'new_issue', displayName: 'New Issue', - description: 'Triggers when Linear receives a new issue', + description: 'Trigger when Linear receives a new issue', props: { team_id: props.team_id(), }, @@ -80,9 +80,8 @@ export const linearNewIssue = createTrigger({ }, async onDisable(context) { const client = makeClient(context.auth); - const response = await context.store?.get( - '_new_issue_trigger', - ); + const response = + await context.store?.get('_new_issue_trigger'); if (response?.webhookId) { await client.deleteWebhook(response.webhookId); } diff --git a/packages/blocks/linear/src/lib/triggers/removed-issue.ts b/packages/blocks/linear/src/lib/triggers/removed-issue.ts index c51656039d..ab7bef7604 100644 --- a/packages/blocks/linear/src/lib/triggers/removed-issue.ts +++ b/packages/blocks/linear/src/lib/triggers/removed-issue.ts @@ -7,7 +7,7 @@ export const linearRemovedIssue = createTrigger({ auth: linearAuth, name: 'removed_issue', displayName: 'Removed Issue', - description: 'Triggers when an existing Linear issue is removed', + description: 'Trigger when an existing Linear issue is removed', props: { team_id: props.team_id(), }, diff --git a/packages/blocks/linear/src/lib/triggers/updated-issue.ts b/packages/blocks/linear/src/lib/triggers/updated-issue.ts index 254bb7106c..0a7da96a26 100644 --- a/packages/blocks/linear/src/lib/triggers/updated-issue.ts +++ b/packages/blocks/linear/src/lib/triggers/updated-issue.ts @@ -7,7 +7,7 @@ export const linearUpdatedIssue = createTrigger({ auth: linearAuth, name: 'updated_issue', displayName: 'Updated Issue', - description: 'Triggers when an existing Linear issue is updated', + description: 'Trigger when an existing Linear issue is updated', props: { team_id: props.team_id(false), }, diff --git a/packages/blocks/list-operations/src/lib/actions/extract-from-action.ts b/packages/blocks/list-operations/src/lib/actions/extract-from-action.ts index ba8df784b4..04ab2295f9 100644 --- a/packages/blocks/list-operations/src/lib/actions/extract-from-action.ts +++ b/packages/blocks/list-operations/src/lib/actions/extract-from-action.ts @@ -5,7 +5,7 @@ export const extractFromListAction = createAction({ auth: BlockAuth.None(), name: 'extract_from_list_action', description: 'Extract items from a list with a given key', - displayName: 'Extract From List', + displayName: 'Extract from List', isWriteAction: false, props: { listItems: Property.LongText({ diff --git a/packages/blocks/list-operations/src/lib/actions/group-by-action.ts b/packages/blocks/list-operations/src/lib/actions/group-by-action.ts index 6d4a8729cc..976425824f 100644 --- a/packages/blocks/list-operations/src/lib/actions/group-by-action.ts +++ b/packages/blocks/list-operations/src/lib/actions/group-by-action.ts @@ -29,13 +29,16 @@ export const groupByAction = createAction({ function groupItemsByKey(items: any[], groupKey: string): any[][] { return Object.values( - items.reduce((groupedItems, currentItem) => { - if (groupKey in currentItem) { - const keyValue = currentItem[groupKey]; - groupedItems[keyValue] = groupedItems[keyValue] || []; - groupedItems[keyValue].push(currentItem); - } - return groupedItems; - }, {} as Record), + items.reduce( + (groupedItems, currentItem) => { + if (groupKey in currentItem) { + const keyValue = currentItem[groupKey]; + groupedItems[keyValue] = groupedItems[keyValue] || []; + groupedItems[keyValue].push(currentItem); + } + return groupedItems; + }, + {} as Record, + ), ); } diff --git a/packages/blocks/list-operations/src/lib/actions/to-dictionary-action.ts b/packages/blocks/list-operations/src/lib/actions/to-dictionary-action.ts index fb2028a3f0..e9732cc629 100644 --- a/packages/blocks/list-operations/src/lib/actions/to-dictionary-action.ts +++ b/packages/blocks/list-operations/src/lib/actions/to-dictionary-action.ts @@ -5,7 +5,7 @@ export const toMapAction = createAction({ auth: BlockAuth.None(), name: 'to_map_action', description: 'Map items by a given key', - displayName: 'Map list items', + displayName: 'Map List Items', isWriteAction: false, props: { listItems: Property.LongText({ diff --git a/packages/blocks/math-helper/src/lib/actions/truncate.ts b/packages/blocks/math-helper/src/lib/actions/truncate.ts index 9c119f2ead..6547ccb702 100644 --- a/packages/blocks/math-helper/src/lib/actions/truncate.ts +++ b/packages/blocks/math-helper/src/lib/actions/truncate.ts @@ -16,12 +16,12 @@ export const truncate = createAction({ isWriteAction: false, props: { number: Property.Number({ - displayName: 'Number to truncate', + displayName: 'Number to Truncate', description: undefined, required: true, }), numberOfDecimalPlaces: Property.Number({ - displayName: 'Number of decimal places', + displayName: 'Number of Decimal Places', description: undefined, required: true, }), diff --git a/packages/blocks/microsoft-outlook/src/lib/actions/find-email.ts b/packages/blocks/microsoft-outlook/src/lib/actions/find-email.ts index 2c09fdd497..0a19eb5f54 100644 --- a/packages/blocks/microsoft-outlook/src/lib/actions/find-email.ts +++ b/packages/blocks/microsoft-outlook/src/lib/actions/find-email.ts @@ -10,7 +10,7 @@ export const findEmailAction = createAction({ auth: microsoftOutlookAuth, name: 'findEmail', displayName: 'Find Email', - description: 'Searches for emails using full-text search.', + description: 'Search for emails using full-text search', isWriteAction: false, props: { searchQuery: Property.ShortText({ @@ -27,7 +27,7 @@ export const findEmailAction = createAction({ }), top: Property.Number({ displayName: 'Max Results', - description: 'Maximum number of results to return (1-1000).', + description: 'Maximum number of results to return (1-1000)', required: false, defaultValue: 25, }), diff --git a/packages/blocks/microsoft-outlook/src/lib/actions/forward-email.ts b/packages/blocks/microsoft-outlook/src/lib/actions/forward-email.ts index eb984f4aec..8b0c14fe6d 100644 --- a/packages/blocks/microsoft-outlook/src/lib/actions/forward-email.ts +++ b/packages/blocks/microsoft-outlook/src/lib/actions/forward-email.ts @@ -8,12 +8,12 @@ export const forwardEmailAction = createAction({ auth: microsoftOutlookAuth, name: 'forwardEmail', displayName: 'Forward Email', - description: 'Forwards an email message.', + description: 'Forward an email', isWriteAction: true, props: { messageId: messageIdDropdown({ displayName: 'Email', - description: 'Select the email message to forward.', + description: 'Select the email message to forward', required: true, }), recipients: Property.Array({ @@ -22,7 +22,7 @@ export const forwardEmailAction = createAction({ }), comment: Property.LongText({ displayName: 'Comment', - description: 'Optional comment to include with the forwarded message.', + description: 'Optional comment to include with the forwarded message', required: false, }), }, diff --git a/packages/blocks/microsoft-outlook/src/lib/actions/move-email-to-folder.ts b/packages/blocks/microsoft-outlook/src/lib/actions/move-email-to-folder.ts index 3ba9db289f..40e8b96a16 100644 --- a/packages/blocks/microsoft-outlook/src/lib/actions/move-email-to-folder.ts +++ b/packages/blocks/microsoft-outlook/src/lib/actions/move-email-to-folder.ts @@ -7,17 +7,17 @@ export const moveEmailToFolderAction = createAction({ auth: microsoftOutlookAuth, name: 'moveEmailToFolder', displayName: 'Move Email to Folder', - description: 'Moves an email message to a specific folder.', + description: 'Move an email message to a specific folder', isWriteAction: true, props: { messageId: messageIdDropdown({ displayName: 'Email', - description: 'Select the email message to move.', + description: 'Select the email message to move', required: true, }), destinationFolderId: mailFolderIdDropdown({ displayName: 'Destination Folder', - description: 'The folder to move the email to.', + description: 'The folder to move the email to', required: true, }), }, diff --git a/packages/blocks/microsoft-outlook/src/lib/actions/reply-email.ts b/packages/blocks/microsoft-outlook/src/lib/actions/reply-email.ts index 43f4d3e452..9df3fed639 100644 --- a/packages/blocks/microsoft-outlook/src/lib/actions/reply-email.ts +++ b/packages/blocks/microsoft-outlook/src/lib/actions/reply-email.ts @@ -13,12 +13,12 @@ export const replyEmailAction = createAction({ auth: microsoftOutlookAuth, name: 'reply-email', displayName: 'Reply to Email', - description: 'Reply to an outlook email.', + description: 'Reply to an outlook email', isWriteAction: true, props: { messageId: Property.Dropdown({ displayName: 'Email', - description: 'Select the email message to reply to.', + description: 'Select the email message to reply to', required: true, refreshers: ['auth'], options: async ({ auth }) => { @@ -91,7 +91,7 @@ export const replyEmailAction = createAction({ }), draft: Property.Checkbox({ displayName: 'Create Draft', - description: 'If enabled, creates draft without sending.', + description: 'If enabled, creates draft without sending', required: true, defaultValue: false, }), diff --git a/packages/blocks/microsoft-outlook/src/lib/actions/send-email.ts b/packages/blocks/microsoft-outlook/src/lib/actions/send-email.ts index 3a34d076bd..35b3be8d88 100644 --- a/packages/blocks/microsoft-outlook/src/lib/actions/send-email.ts +++ b/packages/blocks/microsoft-outlook/src/lib/actions/send-email.ts @@ -11,7 +11,7 @@ export const sendEmailAction = createAction({ auth: microsoftOutlookAuth, name: 'send-email', displayName: 'Send Email', - description: 'Sends an email using Microsoft Outlook.', + description: 'Send an email using Microsoft Outlook', isWriteAction: true, props: { recipients: Property.Array({ diff --git a/packages/blocks/microsoft-outlook/src/lib/triggers/new-email.ts b/packages/blocks/microsoft-outlook/src/lib/triggers/new-email.ts index 40808e5a54..c401eca46b 100644 --- a/packages/blocks/microsoft-outlook/src/lib/triggers/new-email.ts +++ b/packages/blocks/microsoft-outlook/src/lib/triggers/new-email.ts @@ -188,30 +188,30 @@ export const newEmailTrigger = createTrigger({ auth: microsoftOutlookAuth, name: 'newEmail', displayName: 'New Email', - description: 'Triggers when a new email is received in the inbox.', + description: 'Trigger when a new email is received in the inbox', props: { mailBox: mailFolderIdDropdown({ displayName: 'Mail Folder', - description: 'The folder to monitor for new emails.', + description: 'The folder to monitor for new emails', required: false, }), senders: Property.Array({ displayName: 'Sender (From)', - description: 'Matches at least one sender.', + description: 'Matches at least one sender', required: false, }), recipients: Property.Array({ displayName: 'Recipients (To)', - description: 'Matches at least one recipient (To).', + description: 'Matches at least one recipient (To)', required: false, }), cc: Property.Array({ displayName: 'CC', - description: 'Matches at least one CC address.', + description: 'Matches at least one CC address', required: false, }), subject: Property.ShortText({ - displayName: 'Subject text contains', + displayName: 'Subject Text Contains', required: false, }), }, diff --git a/packages/blocks/microsoft-teams/src/lib/actions/request-action-message.ts b/packages/blocks/microsoft-teams/src/lib/actions/request-action-message.ts index 64700c0332..cc17879cca 100644 --- a/packages/blocks/microsoft-teams/src/lib/actions/request-action-message.ts +++ b/packages/blocks/microsoft-teams/src/lib/actions/request-action-message.ts @@ -48,11 +48,11 @@ export const requestActionMessageAction = createAction({ ], properties: { buttonText: Property.ShortText({ - displayName: 'Button text', + displayName: 'Button Text', required: true, }), buttonStyle: Property.StaticDropdown({ - displayName: 'Button color', + displayName: 'Button Color', required: true, defaultValue: 'default', options: { @@ -67,7 +67,8 @@ export const requestActionMessageAction = createAction({ }), timeoutInDays: Property.Number({ displayName: 'Wait Timeout in Days', - description: 'Number of days to wait for an action.', + description: + 'Number of days to wait for user to take an action, after which the workflow will resume with no action taken', defaultValue: 3, required: true, validators: [Validators.minValue(1)], diff --git a/packages/blocks/microsoft-teams/src/lib/actions/send-channel-message.ts b/packages/blocks/microsoft-teams/src/lib/actions/send-channel-message.ts index 8bdde5ee7a..5a463de08b 100644 --- a/packages/blocks/microsoft-teams/src/lib/actions/send-channel-message.ts +++ b/packages/blocks/microsoft-teams/src/lib/actions/send-channel-message.ts @@ -8,7 +8,7 @@ export const sendChannelMessageAction = createAction({ auth: microsoftTeamsAuth, name: 'microsoft_teams_send_channel_message', displayName: 'Send Channel Message', - description: "Sends a message to a teams's channel.", + description: 'Send a message to a team channel', isWriteAction: true, props: { teamId: teamId, diff --git a/packages/blocks/microsoft-teams/src/lib/actions/send-chat-message.ts b/packages/blocks/microsoft-teams/src/lib/actions/send-chat-message.ts index 2addabe625..1132115c3f 100644 --- a/packages/blocks/microsoft-teams/src/lib/actions/send-chat-message.ts +++ b/packages/blocks/microsoft-teams/src/lib/actions/send-chat-message.ts @@ -7,7 +7,7 @@ export const sendChatMessageAction = createAction({ auth: microsoftTeamsAuth, name: 'microsoft_teams_send_chat_message', displayName: 'Send Chat Message', - description: 'Sends a message in an existing chat.', + description: 'Send a message in an existing chat', isWriteAction: true, props: { chatId: chatId, diff --git a/packages/blocks/microsoft-teams/src/lib/common/chats-and-channels.ts b/packages/blocks/microsoft-teams/src/lib/common/chats-and-channels.ts index 4858325968..afd7927da3 100644 --- a/packages/blocks/microsoft-teams/src/lib/common/chats-and-channels.ts +++ b/packages/blocks/microsoft-teams/src/lib/common/chats-and-channels.ts @@ -7,7 +7,7 @@ import { microsoftTeamsAuth } from './microsoft-teams-auth'; export const chatsAndChannels = Property.Dropdown({ displayName: 'Channel or Chat', - description: 'Channel or Chat to send message to.', + description: 'Channel or Chat to send message to', refreshers: ['auth'], required: true, options: async ({ auth }) => { diff --git a/packages/blocks/microsoft-teams/src/lib/common/microsoft-teams-auth.ts b/packages/blocks/microsoft-teams/src/lib/common/microsoft-teams-auth.ts index 43fab37826..370b4e26bb 100644 --- a/packages/blocks/microsoft-teams/src/lib/common/microsoft-teams-auth.ts +++ b/packages/blocks/microsoft-teams/src/lib/common/microsoft-teams-auth.ts @@ -5,7 +5,7 @@ export const microsoftTeamsAuth = BlockAuth.OAuth2({ authProviderKey: 'Microsoft_Teams', authProviderDisplayName: 'Microsoft Teams', authProviderLogoUrl: `https://static.openops.com/blocks/microsoft-teams.png`, - description: '⚠️ You can only use school or work accounts.', + description: '⚠️ You can only use school or work accounts', required: true, scope: [ 'User.Read', diff --git a/packages/blocks/monday/src/lib/actions/create-column.ts b/packages/blocks/monday/src/lib/actions/create-column.ts index b5a7b47ad6..9f6de7cf96 100644 --- a/packages/blocks/monday/src/lib/actions/create-column.ts +++ b/packages/blocks/monday/src/lib/actions/create-column.ts @@ -7,7 +7,7 @@ export const createColumnAction = createAction({ auth: mondayAuth, name: 'monday_create_column', displayName: 'Create Column', - description: 'Creates a new column in board.', + description: 'Create a new column in a board', isWriteAction: true, props: { workspace_id: mondayCommon.workspace_id(true), diff --git a/packages/blocks/monday/src/lib/actions/create-group.ts b/packages/blocks/monday/src/lib/actions/create-group.ts index 9eab9aa82e..34462133c6 100644 --- a/packages/blocks/monday/src/lib/actions/create-group.ts +++ b/packages/blocks/monday/src/lib/actions/create-group.ts @@ -6,7 +6,7 @@ export const createGroupAction = createAction({ auth: mondayAuth, name: 'monday_create_group', displayName: 'Create Group', - description: 'Creates a new group in board.', + description: 'Create a new group in a board', isWriteAction: true, props: { workspace_id: mondayCommon.workspace_id(true), diff --git a/packages/blocks/monday/src/lib/actions/create-item.ts b/packages/blocks/monday/src/lib/actions/create-item.ts index 2929bb7b7c..bf06908ff7 100644 --- a/packages/blocks/monday/src/lib/actions/create-item.ts +++ b/packages/blocks/monday/src/lib/actions/create-item.ts @@ -14,7 +14,7 @@ export const createItemAction = createAction({ auth: mondayAuth, name: 'monday_create_item', displayName: 'Create Item', - description: 'Creates a new item inside a board.', + description: 'Create a new item in a board', isWriteAction: true, props: { workspace_id: mondayCommon.workspace_id(true), @@ -22,12 +22,12 @@ export const createItemAction = createAction({ group_id: mondayCommon.group_id(false), item_name: Property.ShortText({ displayName: 'Item Name', - description: 'Item Name', + description: 'Name of the item to create', required: true, }), column_values: mondayCommon.columnValues, create_labels_if_missing: Property.Checkbox({ - displayName: 'Create Labels if Missing', + displayName: 'Create Labels If Missing', description: 'Creates status/dropdown labels if they are missing. This requires permission to change the board structure.', defaultValue: false, diff --git a/packages/blocks/monday/src/lib/actions/create-update.ts b/packages/blocks/monday/src/lib/actions/create-update.ts index da71a3054a..61e30e4d2b 100644 --- a/packages/blocks/monday/src/lib/actions/create-update.ts +++ b/packages/blocks/monday/src/lib/actions/create-update.ts @@ -6,7 +6,7 @@ export const createUpdateAction = createAction({ auth: mondayAuth, name: 'monday_create_update', displayName: 'Create Update', - description: 'Creates a new update.', + description: 'Create a new update for an item', isWriteAction: true, props: { item_id: Property.ShortText({ diff --git a/packages/blocks/monday/src/lib/actions/get-board-values.ts b/packages/blocks/monday/src/lib/actions/get-board-values.ts index 7787f1a180..f685d01907 100644 --- a/packages/blocks/monday/src/lib/actions/get-board-values.ts +++ b/packages/blocks/monday/src/lib/actions/get-board-values.ts @@ -7,7 +7,7 @@ export const getBoardItemValuesAction = createAction({ auth: mondayAuth, name: 'monday_get_board_values', displayName: 'Get Board Values', - description: "Gets a list of board's items.", + description: 'Get a list of items from a board', isWriteAction: false, props: { workspace_id: mondayCommon.workspace_id(true), diff --git a/packages/blocks/monday/src/lib/actions/get-column-values.ts b/packages/blocks/monday/src/lib/actions/get-column-values.ts index 57d0bf88e2..39781e486b 100644 --- a/packages/blocks/monday/src/lib/actions/get-column-values.ts +++ b/packages/blocks/monday/src/lib/actions/get-column-values.ts @@ -7,7 +7,7 @@ export const getItemsColumnValuesAction = createAction({ auth: mondayAuth, name: 'monday_get_item_column_values', displayName: "Get an Item's Column Values", - description: 'Gets column values of an item.', + description: 'Get column values of an item', isWriteAction: false, props: { workspace_id: mondayCommon.workspace_id(true), diff --git a/packages/blocks/monday/src/lib/actions/update-column-values-of-item.ts b/packages/blocks/monday/src/lib/actions/update-column-values-of-item.ts index 95de5cc986..35151179f0 100644 --- a/packages/blocks/monday/src/lib/actions/update-column-values-of-item.ts +++ b/packages/blocks/monday/src/lib/actions/update-column-values-of-item.ts @@ -10,7 +10,7 @@ export const updateColumnValuesOfItemAction = createAction({ auth: mondayAuth, name: 'monday_update_column_values_of_item', displayName: 'Update Column Values of Specific Item', - description: 'Updates multiple columns values of specific item.', + description: 'Update multiple column values of a specific item', isWriteAction: true, props: { workspace_id: mondayCommon.workspace_id(true), diff --git a/packages/blocks/monday/src/lib/actions/update-item-name.ts b/packages/blocks/monday/src/lib/actions/update-item-name.ts index cfa2bd9d17..03a548a96a 100644 --- a/packages/blocks/monday/src/lib/actions/update-item-name.ts +++ b/packages/blocks/monday/src/lib/actions/update-item-name.ts @@ -6,14 +6,14 @@ export const updateItemNameAction = createAction({ auth: mondayAuth, name: 'monday_update_item_name', displayName: 'Update Item Name', - description: 'Updates an item name.', + description: 'Update an item name', isWriteAction: true, props: { workspace_id: mondayCommon.workspace_id(true), board_id: mondayCommon.board_id(true), item_id: mondayCommon.item_id(true), name: Property.ShortText({ - displayName: 'New Item name', + displayName: 'New Item Name', required: true, }), }, diff --git a/packages/blocks/monday/src/lib/actions/upload-file-to-column.ts b/packages/blocks/monday/src/lib/actions/upload-file-to-column.ts index 561aae4810..dfcfa00a38 100644 --- a/packages/blocks/monday/src/lib/actions/upload-file-to-column.ts +++ b/packages/blocks/monday/src/lib/actions/upload-file-to-column.ts @@ -9,7 +9,7 @@ export const uploadFileToColumnAction = createAction({ auth: mondayAuth, name: 'monday_upload_file_to_column', displayName: 'Upload File to Column', - description: 'Upload a file to a column in Monday.', + description: 'Upload a file to a column in Monday', isWriteAction: true, props: { workspace_id: mondayCommon.workspace_id(true), @@ -47,7 +47,7 @@ export const uploadFileToColumnAction = createAction({ }), file: Property.File({ displayName: 'File', - description: 'The file URL or base64 to upload.', + description: 'The file URL or base64 to upload', required: true, }), file_name: Property.ShortText({ diff --git a/packages/blocks/monday/src/lib/common/helper.ts b/packages/blocks/monday/src/lib/common/helper.ts index ac668d9e38..871bf24e68 100644 --- a/packages/blocks/monday/src/lib/common/helper.ts +++ b/packages/blocks/monday/src/lib/common/helper.ts @@ -47,7 +47,7 @@ export const convertMondayColumnToOpenOpsProp = (column: MondayColumn) => { return Property.DateTime({ displayName: column.title, required: false, - description: 'Use YYYY-MM-DD HH:mm:ss format.', + description: 'Use YYYY-MM-DD HH:mm:ss format', }); case MondayColumnType.DEPENDENCY: return Property.ShortText({ @@ -118,7 +118,7 @@ export const convertMondayColumnToOpenOpsProp = (column: MondayColumn) => { return Property.Number({ displayName: column.title, required: false, - description: `A number between 1 and 5.For example, 3.`, + description: `A number between 1 and 5`, validators: [Validators.inRange(1, 5)], }); case MondayColumnType.STATUS: { diff --git a/packages/blocks/monday/src/lib/common/index.ts b/packages/blocks/monday/src/lib/common/index.ts index 42b5c40c97..5c416f2623 100644 --- a/packages/blocks/monday/src/lib/common/index.ts +++ b/packages/blocks/monday/src/lib/common/index.ts @@ -133,7 +133,7 @@ export const mondayCommon = { Property.MultiSelectDropdown({ displayName: 'Column IDs', description: - 'Limit data output by specifying column IDs; leave empty to display all columns.', + 'Limit data output by specifying column IDs; leave empty to display all columns', required, refreshers: ['board_id'], options: async ({ auth, board_id }) => { diff --git a/packages/blocks/nops/src/lib/actions/get-cost-summary-action.ts b/packages/blocks/nops/src/lib/actions/get-cost-summary-action.ts index 4b72c5e75d..bad4afb892 100644 --- a/packages/blocks/nops/src/lib/actions/get-cost-summary-action.ts +++ b/packages/blocks/nops/src/lib/actions/get-cost-summary-action.ts @@ -9,7 +9,7 @@ import { makeGetRequest } from '../common/http-client'; export const getCostSummaryAction = createAction({ name: 'nops_get_cost_summary', displayName: 'Get Cost Summary', - description: 'Retrieve cost summary data with optional filters', + description: 'Get cost summary data with optional filters', auth: nopsAuth, isWriteAction: false, props: { diff --git a/packages/blocks/openops-tables/src/actions/delete-record-action.ts b/packages/blocks/openops-tables/src/actions/delete-record-action.ts index d3cd4f246c..756f71a37d 100644 --- a/packages/blocks/openops-tables/src/actions/delete-record-action.ts +++ b/packages/blocks/openops-tables/src/actions/delete-record-action.ts @@ -16,14 +16,14 @@ import { convertToStringWithValidation, isEmpty } from '@openops/shared'; export const deleteRecordAction = createAction({ auth: BlockAuth.None(), name: 'delete_record', - description: 'Delete a record in an OpenOps table.', + description: 'Delete a record in an OpenOps table', displayName: 'Delete Record', isWriteAction: true, props: { tableName: openopsTablesDropdownProperty(), rowPrimaryKey: Property.LongText({ displayName: 'Record Primary Key Value', - description: '', + description: 'Primary key value of the record to delete', required: true, }), }, diff --git a/packages/blocks/openops-tables/src/actions/get-records-action.ts b/packages/blocks/openops-tables/src/actions/get-records-action.ts index b018da0456..7a4e0ff229 100644 --- a/packages/blocks/openops-tables/src/actions/get-records-action.ts +++ b/packages/blocks/openops-tables/src/actions/get-records-action.ts @@ -15,13 +15,13 @@ import { cacheWrapper } from '@openops/server-shared'; export const getRecordsAction = createAction({ auth: BlockAuth.None(), name: 'get_records', - description: 'Get all records matching the provided filters.', + description: 'Get all records matching the provided filters', displayName: 'Get Records', isWriteAction: false, props: { tableName: openopsTablesDropdownProperty(), filterType: Property.StaticDropdown({ - displayName: 'Filter type', + displayName: 'Filter Type', required: false, options: { options: [ @@ -53,11 +53,11 @@ export const getRecordsAction = createAction({ ); properties['filters'] = Property.Array({ - displayName: 'Fields to filter by', + displayName: 'Fields to Filter by', required: false, properties: { fieldName: Property.StaticDropdown({ - displayName: 'Field name', + displayName: 'Field Name', required: true, options: { options: tableFields.map((f) => ({ @@ -67,7 +67,7 @@ export const getRecordsAction = createAction({ }, }), filterType: Property.StaticDropdown({ - displayName: 'Filter type', + displayName: 'Filter Type', required: true, options: { options: Object.keys(ViewFilterTypesEnum).map((key) => ({ @@ -83,7 +83,7 @@ export const getRecordsAction = createAction({ }, }), value: Property.DynamicProperties({ - displayName: 'Value to search for', + displayName: 'Value to Search for', required: true, refreshers: ['fieldName', 'filterType'], props: async ({ fieldName, filterType }) => { diff --git a/packages/blocks/openops-tables/src/actions/get-table-url-action.ts b/packages/blocks/openops-tables/src/actions/get-table-url-action.ts index d93c1693d8..0b0b0f06a7 100644 --- a/packages/blocks/openops-tables/src/actions/get-table-url-action.ts +++ b/packages/blocks/openops-tables/src/actions/get-table-url-action.ts @@ -10,7 +10,7 @@ const DEFAULT_DATABASE_ID = 1; export const getTableUrlAction = createAction({ auth: BlockAuth.None(), name: 'get_table_url', - description: 'Get a shareable URL for the provided table.', + description: 'Get a shareable URL for the provided table', displayName: 'Get Table URL', isWriteAction: false, props: { diff --git a/packages/blocks/openops-tables/src/actions/update-record-action.ts b/packages/blocks/openops-tables/src/actions/update-record-action.ts index 8976362074..1106027d33 100644 --- a/packages/blocks/openops-tables/src/actions/update-record-action.ts +++ b/packages/blocks/openops-tables/src/actions/update-record-action.ts @@ -19,7 +19,7 @@ const FLOAT_COMPARISON_EPSILON = 1e-9; export const updateRecordAction = createAction({ auth: BlockAuth.None(), name: 'update_record', - description: 'Add or update a record in an OpenOps table.', + description: 'Add or update a record in an OpenOps table', displayName: 'Add or Update Record', isWriteAction: true, props: { @@ -61,8 +61,8 @@ export const updateRecordAction = createAction({ }, }), fieldsProperties: Property.DynamicProperties({ - displayName: '', - description: '', + displayName: 'Fields Properties', + description: 'Fields to update in the table record', required: true, refreshers: ['tableName'], props: async ({ tableName }, context) => { @@ -77,11 +77,11 @@ export const updateRecordAction = createAction({ const properties: { [key: string]: any } = {}; properties['fieldsProperties'] = Property.Array({ - displayName: 'Fields to update', + displayName: 'Fields to Update', required: true, properties: { fieldName: Property.StaticDropdown({ - displayName: 'Field name', + displayName: 'Field Name', required: true, options: { options: tableFields @@ -90,7 +90,7 @@ export const updateRecordAction = createAction({ }, }), newFieldValue: Property.DynamicProperties({ - displayName: 'New field value', + displayName: 'New Field Value', required: true, refreshers: ['fieldName'], props: async ({ fieldName }) => { diff --git a/packages/blocks/schedule/src/lib/triggers/cron-expression.trigger.ts b/packages/blocks/schedule/src/lib/triggers/cron-expression.trigger.ts index 0634d2cb07..7927ebbd40 100644 --- a/packages/blocks/schedule/src/lib/triggers/cron-expression.trigger.ts +++ b/packages/blocks/schedule/src/lib/triggers/cron-expression.trigger.ts @@ -9,11 +9,11 @@ import { timezoneOptions } from '../common'; export const cronExpressionTrigger = createTrigger({ name: 'cron_expression', displayName: 'Cron Expression', - description: 'Trigger based on cron expression', + description: 'Trigger based on a cron expression schedule', props: { cronExpression: Property.ShortText({ displayName: 'Cron Expression', - description: 'Cron expression to trigger', + description: 'The cron schedule pattern (e.g., 0/5 * * * * for every 5 minutes)', required: true, defaultValue: '0/5 * * * *', }), diff --git a/packages/blocks/schedule/src/lib/triggers/every-day.trigger.ts b/packages/blocks/schedule/src/lib/triggers/every-day.trigger.ts index 98a1970292..c5b5a71305 100644 --- a/packages/blocks/schedule/src/lib/triggers/every-day.trigger.ts +++ b/packages/blocks/schedule/src/lib/triggers/every-day.trigger.ts @@ -35,12 +35,12 @@ function getEveryDayData( export const everyDayTrigger = createTrigger({ name: 'every_day', displayName: 'Every Day', - description: 'Triggers the current flow every day', + description: 'Trigger the current flow every day', type: TriggerStrategy.SCHEDULED, sampleData: {}, props: { hour_of_the_day: Property.StaticDropdown({ - displayName: 'Hour of the day', + displayName: 'Hour of the Day', options: { options: DAY_HOURS.map((h, idx) => { return { @@ -61,7 +61,7 @@ export const everyDayTrigger = createTrigger({ defaultValue: 'UTC', }), run_on_weekends: Property.Checkbox({ - displayName: 'Run on weekends (Sat,Sun)', + displayName: 'Run on Weekends (Sat, Sun)', required: true, defaultValue: false, }), diff --git a/packages/blocks/schedule/src/lib/triggers/every-hour.trigger.ts b/packages/blocks/schedule/src/lib/triggers/every-hour.trigger.ts index cfbab942ad..b4a8181027 100644 --- a/packages/blocks/schedule/src/lib/triggers/every-hour.trigger.ts +++ b/packages/blocks/schedule/src/lib/triggers/every-hour.trigger.ts @@ -22,12 +22,12 @@ function getEveryHourData(runOnWeekends: boolean) { export const everyHourTrigger = createTrigger({ name: 'every_hour', displayName: 'Every Hour', - description: 'Triggers the current flow every hour', + description: 'Trigger the current flow every hour', type: TriggerStrategy.SCHEDULED, sampleData: {}, props: { run_on_weekends: Property.Checkbox({ - displayName: 'Run on weekends (Sat,Sun)', + displayName: 'Run on Weekends (Sat, Sun)', required: true, defaultValue: false, }), diff --git a/packages/blocks/schedule/src/lib/triggers/every-month.trigger.ts b/packages/blocks/schedule/src/lib/triggers/every-month.trigger.ts index d815074626..d4f6a5c65f 100644 --- a/packages/blocks/schedule/src/lib/triggers/every-month.trigger.ts +++ b/packages/blocks/schedule/src/lib/triggers/every-month.trigger.ts @@ -39,12 +39,12 @@ function getEveryMonthData( export const everyMonthTrigger = createTrigger({ name: 'every_month', displayName: 'Every Month', - description: 'Triggers the current flow every month', + description: 'Trigger the current flow every month', type: TriggerStrategy.SCHEDULED, sampleData: {}, props: { day_of_the_month: Property.StaticDropdown({ - displayName: 'Day of the month', + displayName: 'Day of the Month', options: { options: MONTH_DAYS.map((d, idx) => { return { @@ -56,7 +56,7 @@ export const everyMonthTrigger = createTrigger({ required: true, }), hour_of_the_day: Property.StaticDropdown({ - displayName: 'Hour of the day', + displayName: 'Hour of the Day', options: { options: DAY_HOURS.map((d, idx) => { return { diff --git a/packages/blocks/schedule/src/lib/triggers/every-week.trigger.ts b/packages/blocks/schedule/src/lib/triggers/every-week.trigger.ts index a251254804..3b80e51c2d 100644 --- a/packages/blocks/schedule/src/lib/triggers/every-week.trigger.ts +++ b/packages/blocks/schedule/src/lib/triggers/every-week.trigger.ts @@ -39,12 +39,12 @@ function getEveryWeekData( export const everyWeekTrigger = createTrigger({ name: 'every_week', displayName: 'Every Week', - description: 'Triggers the current flow every week', + description: 'Trigger the current flow every week', type: TriggerStrategy.SCHEDULED, sampleData: {}, props: { day_of_the_week: Property.StaticDropdown({ - displayName: 'Day of the week', + displayName: 'Day of the Week', options: { options: WEEK_DAYS.map((d, idx) => { return { @@ -56,7 +56,7 @@ export const everyWeekTrigger = createTrigger({ required: true, }), hour_of_the_day: Property.StaticDropdown({ - displayName: 'Hour of the day', + displayName: 'Hour of the Day', options: { options: DAY_HOURS.map((h, idx) => { return { diff --git a/packages/blocks/schedule/src/lib/triggers/every-x-minutes.trigger.ts b/packages/blocks/schedule/src/lib/triggers/every-x-minutes.trigger.ts index f7b6020a6e..15d0ed277b 100644 --- a/packages/blocks/schedule/src/lib/triggers/every-x-minutes.trigger.ts +++ b/packages/blocks/schedule/src/lib/triggers/every-x-minutes.trigger.ts @@ -23,13 +23,13 @@ function getEveryXMinutesData(minutes: number) { export const everyXMinutesTrigger = createTrigger({ name: 'every_x_minutes', displayName: 'Every X Minutes', - description: 'Triggers the current flow every X minutes', + description: 'Trigger the current flow every X minutes', type: TriggerStrategy.SCHEDULED, sampleData: {}, props: { minutes: Property.StaticDropdown({ displayName: 'Minutes', - description: 'Valid value between 1 to 59.', + description: 'Valid value between 1 to 59', required: true, defaultValue: 1, options: { diff --git a/packages/blocks/servicenow/src/actions/create-fields-properties.ts b/packages/blocks/servicenow/src/actions/create-fields-properties.ts index 18d40939a1..3f068bad50 100644 --- a/packages/blocks/servicenow/src/actions/create-fields-properties.ts +++ b/packages/blocks/servicenow/src/actions/create-fields-properties.ts @@ -38,7 +38,7 @@ async function createFieldsProperties( required: true, properties: { fieldName: Property.StaticDropdown({ - displayName: 'Field name', + displayName: 'Field Name', required: true, options: { options: mapFieldsToOptions(writableFields), diff --git a/packages/blocks/servicenow/src/actions/create-filters-properties.ts b/packages/blocks/servicenow/src/actions/create-filters-properties.ts index 5bc3e08b34..bc1f5072c0 100644 --- a/packages/blocks/servicenow/src/actions/create-filters-properties.ts +++ b/packages/blocks/servicenow/src/actions/create-filters-properties.ts @@ -27,11 +27,11 @@ export async function createFiltersProperties( const fieldNameProperty = hasError ? Property.ShortText({ - displayName: 'Field name', + displayName: 'Field Name', required: true, }) : Property.StaticDropdown({ - displayName: 'Field name', + displayName: 'Field Name', required: true, options: { options: tableFields.map((f) => ({ @@ -52,7 +52,7 @@ export async function createFiltersProperties( properties: { fieldName: fieldNameProperty, filterType: Property.StaticDropdown({ - displayName: 'Filter type', + displayName: 'Filter Type', required: true, options: { options: Object.keys(ViewFilterTypesEnum) @@ -66,7 +66,7 @@ export async function createFiltersProperties( }, }), value: Property.DynamicProperties({ - displayName: 'Value to search for', + displayName: 'Value to Search for', required: true, refreshers: hasError ? ['filterType'] : ['fieldName', 'filterType'], props: async ({ fieldName, filterType }) => { diff --git a/packages/blocks/servicenow/src/actions/delete-record-action.ts b/packages/blocks/servicenow/src/actions/delete-record-action.ts index 2eec103f72..3d686804b9 100644 --- a/packages/blocks/servicenow/src/actions/delete-record-action.ts +++ b/packages/blocks/servicenow/src/actions/delete-record-action.ts @@ -6,14 +6,14 @@ import { runDeleteRecordAction } from './action-runners'; export const deleteRecordAction = createAction({ auth: servicenowAuth, name: 'delete_record', - description: 'Delete a record from a ServiceNow table.', + description: 'Delete a record from a ServiceNow table', displayName: 'Delete Record', isWriteAction: true, props: { tableName: servicenowTableDropdownProperty(), sysId: Property.ShortText({ displayName: 'System ID', - description: 'The sys_id of the record to delete.', + description: 'The sys_id of the record to delete', required: true, }), }, diff --git a/packages/blocks/servicenow/src/actions/get-record-action.ts b/packages/blocks/servicenow/src/actions/get-record-action.ts index 5f2cfb6d87..913ff4caab 100644 --- a/packages/blocks/servicenow/src/actions/get-record-action.ts +++ b/packages/blocks/servicenow/src/actions/get-record-action.ts @@ -7,14 +7,14 @@ import { runGetRecordAction } from './action-runners'; export const getRecordAction = createAction({ auth: servicenowAuth, name: 'get_record', - description: 'Get a single record from a ServiceNow table by its sys_id.', + description: 'Get a single record from a ServiceNow table by its sys_id', displayName: 'Get Record', isWriteAction: false, props: { tableName: servicenowTableDropdownProperty(), sysId: Property.ShortText({ displayName: 'System ID', - description: 'The sys_id of the record to retrieve.', + description: 'The sys_id of the record to get', required: true, }), fields: servicenowFieldsDropdownProperty(), diff --git a/packages/blocks/servicenow/src/actions/get-records-action.ts b/packages/blocks/servicenow/src/actions/get-records-action.ts index 41f3afa980..918efdd5b0 100644 --- a/packages/blocks/servicenow/src/actions/get-records-action.ts +++ b/packages/blocks/servicenow/src/actions/get-records-action.ts @@ -13,13 +13,13 @@ import { createFiltersProperties } from './create-filters-properties'; export const getRecordsAction = createAction({ auth: servicenowAuth, name: 'get_records', - description: 'Retrieve records from a specified user table', + description: 'Get records from a specified user table', displayName: 'Get Records', isWriteAction: false, props: { tableName: servicenowTableDropdownProperty(), filterType: Property.StaticDropdown({ - displayName: 'Filter type', + displayName: 'Filter Type', required: false, options: { options: [ diff --git a/packages/blocks/servicenow/src/actions/requests/delete-request-action.ts b/packages/blocks/servicenow/src/actions/requests/delete-request-action.ts index 0110dd92f4..e13a59366a 100644 --- a/packages/blocks/servicenow/src/actions/requests/delete-request-action.ts +++ b/packages/blocks/servicenow/src/actions/requests/delete-request-action.ts @@ -6,13 +6,13 @@ import { TABLE_NAME } from './constants'; export const deleteRequestAction = createAction({ auth: servicenowAuth, name: 'delete_request', - description: 'Delete a request item from ServiceNow.', + description: 'Delete a request item from ServiceNow', displayName: 'Delete Request', isWriteAction: true, props: { sysId: Property.ShortText({ displayName: 'System ID', - description: 'The sys_id of the request to delete.', + description: 'The sys_id of the request to delete', required: true, }), }, diff --git a/packages/blocks/servicenow/src/actions/requests/get-requests-action.ts b/packages/blocks/servicenow/src/actions/requests/get-requests-action.ts index fbf738ebac..7f2c02e4d8 100644 --- a/packages/blocks/servicenow/src/actions/requests/get-requests-action.ts +++ b/packages/blocks/servicenow/src/actions/requests/get-requests-action.ts @@ -13,12 +13,12 @@ import { TABLE_NAME } from './constants'; export const getRequestsAction = createAction({ auth: servicenowAuth, name: 'get_requests', - description: 'Retrieve request items from ServiceNow with optional filters.', + description: 'Get request items from ServiceNow with optional filters', displayName: 'Get Requests', isWriteAction: false, props: { filterType: Property.StaticDropdown({ - displayName: 'Filter type', + displayName: 'Filter Type', required: false, options: { options: [ diff --git a/packages/blocks/servicenow/src/actions/requests/upsert-request-action.ts b/packages/blocks/servicenow/src/actions/requests/upsert-request-action.ts index 6c516986ea..c962ea34d9 100644 --- a/packages/blocks/servicenow/src/actions/requests/upsert-request-action.ts +++ b/packages/blocks/servicenow/src/actions/requests/upsert-request-action.ts @@ -8,7 +8,7 @@ export const upsertRequestAction = createAction({ auth: servicenowAuth, name: 'upsert_request', description: - 'Create a new request item or update an existing request item in ServiceNow.', + 'Create a new request item or update an existing request item in ServiceNow', displayName: 'Add or Update Request', isWriteAction: true, props: { @@ -19,8 +19,8 @@ export const upsertRequestAction = createAction({ required: false, }), fieldsProperties: Property.DynamicProperties({ - displayName: '', - description: '', + displayName: 'Fields Properties', + description: 'Fields to set for the ServiceNow request', required: true, refreshers: ['auth'], props: async ({ auth }) => { diff --git a/packages/blocks/servicenow/src/actions/upsert-record-action.ts b/packages/blocks/servicenow/src/actions/upsert-record-action.ts index f8d6ad8582..a193ce9869 100644 --- a/packages/blocks/servicenow/src/actions/upsert-record-action.ts +++ b/packages/blocks/servicenow/src/actions/upsert-record-action.ts @@ -8,7 +8,7 @@ export const upsertRecordAction = createAction({ auth: servicenowAuth, name: 'upsert_record', description: - 'Create a new record or update an existing record in a ServiceNow table.', + 'Create a new record or update an existing record in a ServiceNow table', displayName: 'Add or Update Record', isWriteAction: true, props: { @@ -20,8 +20,8 @@ export const upsertRecordAction = createAction({ required: false, }), fieldsProperties: Property.DynamicProperties({ - displayName: '', - description: '', + displayName: 'Fields Properties', + description: 'Fields to set for the ServiceNow record', required: true, refreshers: ['auth', 'tableName'], props: async ({ auth, tableName }) => { diff --git a/packages/blocks/servicenow/src/lib/auth.ts b/packages/blocks/servicenow/src/lib/auth.ts index 9216c6d1e2..abf896dc84 100644 --- a/packages/blocks/servicenow/src/lib/auth.ts +++ b/packages/blocks/servicenow/src/lib/auth.ts @@ -25,7 +25,7 @@ export const servicenowAuth = BlockAuth.CustomAuth({ required: true, }), instanceName: Property.ShortText({ - displayName: 'Instance name', + displayName: 'Instance Name', description: 'The name of your ServiceNow instance (for example: https://.service-now.com/)', required: true, diff --git a/packages/blocks/servicenow/src/lib/fields-dropdown-property.ts b/packages/blocks/servicenow/src/lib/fields-dropdown-property.ts index 022009b0bc..60b454b25b 100644 --- a/packages/blocks/servicenow/src/lib/fields-dropdown-property.ts +++ b/packages/blocks/servicenow/src/lib/fields-dropdown-property.ts @@ -36,7 +36,7 @@ export function servicenowFieldsDropdownProperty() { props['selected'] = Property.StaticMultiSelectDropdown({ displayName: 'Fields', - description: 'Select the fields to return.', + description: 'Select the fields to return', required: true, options: { disabled: false, diff --git a/packages/blocks/sftp/src/lib/actions/create-file.ts b/packages/blocks/sftp/src/lib/actions/create-file.ts index bc447f89fd..1aa1482135 100644 --- a/packages/blocks/sftp/src/lib/actions/create-file.ts +++ b/packages/blocks/sftp/src/lib/actions/create-file.ts @@ -14,7 +14,7 @@ export const createFile = createAction({ required: true, }), fileContent: Property.LongText({ - displayName: 'File content', + displayName: 'File Content', required: true, }), }, diff --git a/packages/blocks/sftp/src/lib/triggers/new-modified-file.ts b/packages/blocks/sftp/src/lib/triggers/new-modified-file.ts index cf5be94cd6..c50e9cce6b 100644 --- a/packages/blocks/sftp/src/lib/triggers/new-modified-file.ts +++ b/packages/blocks/sftp/src/lib/triggers/new-modified-file.ts @@ -55,7 +55,7 @@ export const newOrModifiedFile = createTrigger({ auth: sftpAuth, name: 'new_file', displayName: 'New File', - description: 'Trigger when a new file is created or modified.', + description: 'Trigger when a new file is created or modified', props: { path: Property.ShortText({ displayName: 'Path', @@ -64,8 +64,8 @@ export const newOrModifiedFile = createTrigger({ defaultValue: './', }), ignoreHiddenFiles: Property.Checkbox({ - displayName: 'Ignore hidden files', - description: 'Ignore hidden files', + displayName: 'Ignore Hidden Files', + description: 'Skip files that start with a dot', required: false, defaultValue: false, }), diff --git a/packages/blocks/slack/src/lib/actions/search-messages.ts b/packages/blocks/slack/src/lib/actions/search-messages.ts index 5f7ef4d63f..e6e2a6542e 100644 --- a/packages/blocks/slack/src/lib/actions/search-messages.ts +++ b/packages/blocks/slack/src/lib/actions/search-messages.ts @@ -9,13 +9,13 @@ import { slackAuth } from '../common/authentication'; export const searchMessages = createAction({ name: 'searchMessages', - displayName: 'Search messages', - description: 'Searches for messages matching a query', + displayName: 'Search Messages', + description: 'Search for messages matching a query', auth: slackAuth, isWriteAction: false, props: { query: Property.ShortText({ - displayName: 'Search query', + displayName: 'Search Query', required: true, }), }, diff --git a/packages/blocks/slack/src/lib/actions/send-message-action.ts b/packages/blocks/slack/src/lib/actions/send-message-action.ts index 5d7573b162..d7b692aac5 100644 --- a/packages/blocks/slack/src/lib/actions/send-message-action.ts +++ b/packages/blocks/slack/src/lib/actions/send-message-action.ts @@ -22,7 +22,7 @@ export const slackSendMessageAction = createAction({ props: { conversationId: usersAndChannels, threadTs: Property.ShortText({ - displayName: 'Thread ts', + displayName: 'Thread Ts', description: 'Provide the ts (timestamp) value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.', required: false, @@ -33,8 +33,9 @@ export const slackSendMessageAction = createAction({ required: false, }), blockKitEnabled: Property.Checkbox({ - displayName: 'Create your message manually using Block Kit blocks', - description: '', + displayName: 'Create Your Message Manually Using Block Kit Blocks', + description: + 'Enable to manually create message blocks using Slack Block Kit format', defaultValue: false, required: false, }), diff --git a/packages/blocks/slack/src/lib/actions/update-message-action.ts b/packages/blocks/slack/src/lib/actions/update-message-action.ts index 55cc07a788..75819aece0 100644 --- a/packages/blocks/slack/src/lib/actions/update-message-action.ts +++ b/packages/blocks/slack/src/lib/actions/update-message-action.ts @@ -5,7 +5,7 @@ import { slackUpdateMessage } from '../common/utils'; export const updateMessageAction = createAction({ name: 'updateMessage', - displayName: 'Update message', + displayName: 'Update Message', description: 'Update an existing message', auth: slackAuth, isWriteAction: true, @@ -14,7 +14,7 @@ export const updateMessageAction = createAction({ ts: Property.ShortText({ displayName: 'Message Timestamp', description: - 'Please provide the timestamp of the message you wish to update, such as `1710304378.475129`.', + 'Please provide the timestamp of the message you wish to update, such as `1710304378.475129`', required: true, }), text: Property.LongText({ diff --git a/packages/blocks/slack/src/lib/actions/upload-file.ts b/packages/blocks/slack/src/lib/actions/upload-file.ts index fecfd5de5e..4a293d9406 100644 --- a/packages/blocks/slack/src/lib/actions/upload-file.ts +++ b/packages/blocks/slack/src/lib/actions/upload-file.ts @@ -10,7 +10,7 @@ import { slackAuth } from '../common/authentication'; export const uploadFile = createAction({ auth: slackAuth, name: 'uploadFile', - displayName: 'Upload file', + displayName: 'Upload File', description: 'Upload file without sharing it to a channel or user', isWriteAction: true, props: { diff --git a/packages/blocks/slack/src/lib/actions/wait-for-action.ts b/packages/blocks/slack/src/lib/actions/wait-for-action.ts index 84c11733b6..c45a6e4a05 100644 --- a/packages/blocks/slack/src/lib/actions/wait-for-action.ts +++ b/packages/blocks/slack/src/lib/actions/wait-for-action.ts @@ -20,13 +20,13 @@ import { export const waitForAction = createAction({ auth: slackAuth, name: 'wait_for_action', - displayName: 'Wait For User Action', - description: 'Wait for user action on the message.', + displayName: 'Wait for User Action', + description: 'Wait for a user to interact with the message', isWriteAction: false, props: { message: Property.LongText({ displayName: 'Message', - description: 'Slack message sent to the user.', + description: 'Slack message sent to the user', required: true, }), diff --git a/packages/blocks/slack/src/lib/common/authentication.ts b/packages/blocks/slack/src/lib/common/authentication.ts index 1ce32cec8d..27df7b0d58 100644 --- a/packages/blocks/slack/src/lib/common/authentication.ts +++ b/packages/blocks/slack/src/lib/common/authentication.ts @@ -4,7 +4,7 @@ export const slackAuth = BlockAuth.OAuth2({ authProviderKey: 'Slack', authProviderDisplayName: 'Slack', authProviderLogoUrl: `https://static.openops.com/blocks/slack.png`, - description: '', + description: 'OAuth2 authentication for Slack workspace integration', authUrl: 'https://slack.com/oauth/v2/authorize', tokenUrl: 'https://slack.com/api/oauth.v2.access', required: true, diff --git a/packages/blocks/slack/src/lib/common/props.ts b/packages/blocks/slack/src/lib/common/props.ts index 3bd14b09ad..c2d02c52c3 100644 --- a/packages/blocks/slack/src/lib/common/props.ts +++ b/packages/blocks/slack/src/lib/common/props.ts @@ -7,7 +7,7 @@ import { getSlackChannels, getSlackUsers } from './slack-api-request'; export const slackChannel = Property.Dropdown({ displayName: 'Channel', - description: 'Channel, private group, or IM channel to send message to.', + description: 'Channel, private group, or IM channel to send message to', required: true, refreshers: ['auth'], async options({ auth }) { @@ -47,7 +47,7 @@ export const user = Property.Dropdown({ export const usersAndChannels = Property.Dropdown({ displayName: 'Recipient Channel or User', - description: 'Channel or User to send the message to.', + description: 'Channel or User to send the message to', required: true, refreshers: ['auth'], async options({ auth }) { @@ -101,7 +101,7 @@ export const username = Property.ShortText({ }); export const blocks = Property.Json({ - displayName: 'Block Kit blocks', + displayName: 'Block Kit Blocks', description: 'See https://api.slack.com/block-kit for specs', required: false, }); @@ -133,11 +133,11 @@ export const actions = Property.Array({ ], properties: { buttonText: Property.ShortText({ - displayName: 'Button text', + displayName: 'Button Text', required: true, }), buttonStyle: Property.StaticDropdown({ - displayName: 'Button color', + displayName: 'Button Color', required: false, defaultValue: '', options: { @@ -149,13 +149,13 @@ export const actions = Property.Array({ }, }), confirmationPrompt: Property.Checkbox({ - displayName: 'Add confirmation popup', + displayName: 'Add Confirmation Popup', required: false, defaultValue: false, }), confirmationPromptText: Property.LongText({ - displayName: `Confirmation popup text`, - description: '', + displayName: `Confirmation Popup Text`, + description: 'Text to display in the confirmation popup dialog', required: false, }), }, @@ -163,14 +163,14 @@ export const actions = Property.Array({ export const timeoutInDays = Property.Number({ displayName: 'Wait Timeout in Days', - description: 'Number of days to wait for an action.', + description: 'Number of days to wait for an action', defaultValue: 3, required: true, validators: [Validators.minValue(1)], }); export const unfurlLinksAndMedia = Property.Checkbox({ - displayName: 'Unfurl links and media', + displayName: 'Unfurl Links and Media', description: 'When enabled, Slack will automatically expand links and show media previews in the message. Disable to prevent link and media unfurling.', required: false, diff --git a/packages/blocks/slack/src/lib/common/utils.ts b/packages/blocks/slack/src/lib/common/utils.ts index 36ed339f87..e945d7f06e 100644 --- a/packages/blocks/slack/src/lib/common/utils.ts +++ b/packages/blocks/slack/src/lib/common/utils.ts @@ -230,7 +230,7 @@ export function dynamicBlockKitProperties(): any { if (!blockKitEnabled) { return { headerText: Property.LongText({ - displayName: 'Message header', + displayName: 'Message Header', description: 'The header of your message', required: false, }), @@ -268,7 +268,7 @@ export function dynamicBlockKitProperties(): any { } const result: any = { blocks: Property.Json({ - displayName: 'Block Kit blocks', + displayName: 'Block Kit Blocks', description: 'See https://api.slack.com/block-kit for specs', required: true, defaultValue: [ diff --git a/packages/blocks/smtp/src/lib/actions/send-email.ts b/packages/blocks/smtp/src/lib/actions/send-email.ts index 6bec30128e..ca16098cc9 100644 --- a/packages/blocks/smtp/src/lib/actions/send-email.ts +++ b/packages/blocks/smtp/src/lib/actions/send-email.ts @@ -8,7 +8,7 @@ export const sendEmail = createAction({ auth: smtpAuth, name: 'send-email', displayName: 'Send Email', - description: 'Send an email using a custom SMTP server.', + description: 'Send an email using a custom SMTP server', isWriteAction: true, props: { from: Property.ShortText({ diff --git a/packages/blocks/snowflake/src/lib/actions/insert-row.ts b/packages/blocks/snowflake/src/lib/actions/insert-row.ts index 845b991c8f..dc9eeb0171 100644 --- a/packages/blocks/snowflake/src/lib/actions/insert-row.ts +++ b/packages/blocks/snowflake/src/lib/actions/insert-row.ts @@ -16,7 +16,7 @@ const props = { export const insertRow = createAction({ name: 'insertRow', displayName: 'Insert Row', - description: 'Insert a row into a table.', + description: 'Insert a row into a table', auth: customAuth, isWriteAction: true, props, diff --git a/packages/blocks/snowflake/src/lib/actions/run-multiple-queries.ts b/packages/blocks/snowflake/src/lib/actions/run-multiple-queries.ts index d7e39b066c..7b36bc259b 100644 --- a/packages/blocks/snowflake/src/lib/actions/run-multiple-queries.ts +++ b/packages/blocks/snowflake/src/lib/actions/run-multiple-queries.ts @@ -11,7 +11,7 @@ type QueryResults = { query: string; result: QueryResult }[]; const props = { sqlTexts: Property.Array({ - displayName: 'SQL queries', + displayName: 'SQL Queries', description: 'Array of SQL queries to execute in order, in the same transaction. Use :1, :2… placeholders to use binding parameters. ' + 'Avoid using "?" to avoid unexpected behaviors when having multiple queries.', @@ -34,16 +34,16 @@ const props = { defaultValue: false, }), timeout: Property.Number({ - displayName: 'Query timeout (ms)', + displayName: 'Query Timeout (ms)', description: - 'An integer indicating the maximum number of milliseconds to wait for a query to complete before timing out.', + 'An integer indicating the maximum number of milliseconds to wait for a query to complete before timing out', required: false, defaultValue: DEFAULT_QUERY_TIMEOUT, }), application: Property.ShortText({ - displayName: 'Application name', + displayName: 'Application Name', description: - 'A string indicating the name of the client application connecting to the server.', + 'A string indicating the name of the client application connecting to the server', required: false, defaultValue: DEFAULT_APPLICATION_NAME, }), @@ -52,7 +52,7 @@ const props = { export const runMultipleQueries = createAction({ name: 'runMultipleQueries', displayName: 'Run Multiple Queries', - description: 'Run Multiple Queries', + description: 'Execute multiple SQL queries on Snowflake', auth: customAuth, isWriteAction: true, props, diff --git a/packages/blocks/snowflake/src/lib/actions/run-query.ts b/packages/blocks/snowflake/src/lib/actions/run-query.ts index f8e284b36d..4d08ebe31c 100644 --- a/packages/blocks/snowflake/src/lib/actions/run-query.ts +++ b/packages/blocks/snowflake/src/lib/actions/run-query.ts @@ -8,8 +8,8 @@ import { customAuth } from '../common/custom-auth'; const props = { sqlText: Property.LongText({ - displayName: 'SQL query', - description: 'Use :1, :2… or ? placeholders to use binding parameters.', + displayName: 'SQL Query', + description: 'Use :1, :2… or ? placeholders to use binding parameters', required: true, supportsAI: true, }), @@ -20,16 +20,16 @@ const props = { required: false, }), timeout: Property.Number({ - displayName: 'Query timeout (ms)', + displayName: 'Query Timeout (ms)', description: - 'An integer indicating the maximum number of milliseconds to wait for a query to complete before timing out.', + 'An integer indicating the maximum number of milliseconds to wait for a query to complete before timing out', required: false, defaultValue: DEFAULT_QUERY_TIMEOUT, }), application: Property.ShortText({ - displayName: 'Application name', + displayName: 'Application Name', description: - 'A string indicating the name of the client application connecting to the server.', + 'A string indicating the name of the client application connecting to the server', required: false, defaultValue: DEFAULT_APPLICATION_NAME, }), @@ -38,7 +38,7 @@ const props = { export const runQuery = createAction({ name: 'runQuery', displayName: 'Run Query', - description: 'Run Query', + description: 'Execute an SQL query on Snowflake', auth: customAuth, isWriteAction: true, props, diff --git a/packages/blocks/snowflake/src/lib/common/custom-auth.ts b/packages/blocks/snowflake/src/lib/common/custom-auth.ts index b3ae0c1bcb..b1110e3527 100644 --- a/packages/blocks/snowflake/src/lib/common/custom-auth.ts +++ b/packages/blocks/snowflake/src/lib/common/custom-auth.ts @@ -24,16 +24,16 @@ export const customAuth = BlockAuth.CustomAuth({ account: Property.ShortText({ displayName: 'Account', required: true, - description: 'A string indicating the Snowflake account identifier.', + description: 'A string indicating the Snowflake account identifier', }), username: Property.ShortText({ displayName: 'Username', required: true, - description: 'The login name for your Snowflake user.', + description: 'The login name for your Snowflake user', }), password: Property.SecretText({ displayName: 'Password', - description: 'Password for the user.', + description: 'Password for the user', required: true, }), maxLoginRetries: Property.Number({ @@ -50,13 +50,13 @@ export const customAuth = BlockAuth.CustomAuth({ database: Property.ShortText({ displayName: 'Database', description: - 'The default database to use for the session after connecting.', + 'The default database to use for the session after connecting', required: false, }), role: Property.ShortText({ displayName: 'Role', description: - 'The default security role to use for the session after connecting.', + 'The default security role to use for the session after connecting', required: false, }), warehouse: Property.ShortText({ diff --git a/packages/blocks/store/src/index.ts b/packages/blocks/store/src/index.ts index db0f899180..30a2821088 100644 --- a/packages/blocks/store/src/index.ts +++ b/packages/blocks/store/src/index.ts @@ -10,7 +10,7 @@ import { storageRemoveValue } from './lib/actions/store-remove-value'; export const storage = createBlock({ displayName: 'Storage', - description: 'Store or retrieve data from key/value database', + description: 'Store or get data from key/value database', minimumSupportedRelease: '0.5.0', logoUrl: 'https://static.openops.com/blocks/openops-store.svg', categories: [BlockCategory.DATA_SOURCES], diff --git a/packages/blocks/store/src/lib/actions/common.ts b/packages/blocks/store/src/lib/actions/common.ts index 4c098f5d87..8ff0e24b2b 100644 --- a/packages/blocks/store/src/lib/actions/common.ts +++ b/packages/blocks/store/src/lib/actions/common.ts @@ -36,7 +36,7 @@ type Params = { export const common = { store_scope: Property.StaticDropdown({ displayName: 'Store Scope', - description: 'The storage scope of the value.', + description: 'The storage scope of the value', required: true, options: { options: [ diff --git a/packages/blocks/store/src/lib/actions/store-add-to-list.ts b/packages/blocks/store/src/lib/actions/store-add-to-list.ts index 19392c9433..66304b1388 100644 --- a/packages/blocks/store/src/lib/actions/store-add-to-list.ts +++ b/packages/blocks/store/src/lib/actions/store-add-to-list.ts @@ -4,7 +4,7 @@ import { common, getScopeAndKey } from './common'; export const storageAddtoList = createAction({ name: 'add_to_list', - displayName: 'Add To List', + displayName: 'Add to List', description: 'Add Item to a list', isWriteAction: false, errorHandlingOptions: { @@ -26,7 +26,7 @@ export const storageAddtoList = createAction({ required: true, }), ignore_if_exists: Property.Checkbox({ - displayName: 'Ignore if value exists', + displayName: 'Ignore If Value Exists', required: false, }), store_scope: common.store_scope, diff --git a/packages/blocks/store/src/lib/actions/store-list-action.ts b/packages/blocks/store/src/lib/actions/store-list-action.ts index 19bcd63eb6..903c2cd030 100644 --- a/packages/blocks/store/src/lib/actions/store-list-action.ts +++ b/packages/blocks/store/src/lib/actions/store-list-action.ts @@ -5,7 +5,7 @@ export const storageListAction = createAction({ name: 'list', displayName: 'List', description: - 'List all keys and their values in storage with optional filtering.', + 'List all keys and their values in storage with optional filtering', errorHandlingOptions: { continueOnFailure: { hide: true, @@ -17,7 +17,7 @@ export const storageListAction = createAction({ isWriteAction: false, props: { keyFilter: Property.ShortText({ - displayName: 'Key filter', + displayName: 'Key Filter', description: 'Regex pattern to filter keys (optional). Leave empty to return all keys.', required: false, diff --git a/packages/blocks/ternary/src/lib/actions/create-case.ts b/packages/blocks/ternary/src/lib/actions/create-case.ts index 12d51ca52b..cc8eaf595d 100644 --- a/packages/blocks/ternary/src/lib/actions/create-case.ts +++ b/packages/blocks/ternary/src/lib/actions/create-case.ts @@ -10,7 +10,7 @@ import { getUsersIDsDropdownProperty } from '../common/users'; export const createCaseAction = createAction({ name: 'create_case', displayName: 'Create a Case', - description: 'Create a Case', + description: 'Create a new case in Ternary for tracking cloud resources', auth: ternaryCloudAuth, isWriteAction: false, props: { @@ -33,7 +33,7 @@ export const createCaseAction = createAction({ assigneeIDs: getUsersIDsDropdownProperty('Assignee IDs'), followerIDs: getUsersIDsDropdownProperty('Follower IDs'), linkToJira: Property.Checkbox({ - displayName: 'Link case to Jira', + displayName: 'Link Case to Jira', description: 'Indicates whether a Jira ticket should be created for this case', required: false, diff --git a/packages/blocks/ternary/src/lib/actions/get-budgets.ts b/packages/blocks/ternary/src/lib/actions/get-budgets.ts index 3864f91ac0..b1f5801088 100644 --- a/packages/blocks/ternary/src/lib/actions/get-budgets.ts +++ b/packages/blocks/ternary/src/lib/actions/get-budgets.ts @@ -7,7 +7,7 @@ import { sendTernaryRequest } from '../common/send-ternary-request'; export const getBudgets = createAction({ name: 'get_budgets', displayName: 'Get Budgets', - description: 'Get Budgets', + description: 'Get budget information from Ternary', auth: ternaryCloudAuth, isWriteAction: false, props: {}, diff --git a/packages/blocks/ternary/src/lib/actions/get-cases.ts b/packages/blocks/ternary/src/lib/actions/get-cases.ts index 9ebc3cd06a..4eb0c18ae7 100644 --- a/packages/blocks/ternary/src/lib/actions/get-cases.ts +++ b/packages/blocks/ternary/src/lib/actions/get-cases.ts @@ -6,7 +6,7 @@ import { getCases } from '../common/cases-api'; export const getCasesAction = createAction({ name: 'get_cases', displayName: 'Get Cases', - description: 'Get Cases', + description: 'Get all cases from Ternary case management', auth: ternaryCloudAuth, isWriteAction: false, props: {}, diff --git a/packages/blocks/ternary/src/lib/actions/get-cost-alerts.ts b/packages/blocks/ternary/src/lib/actions/get-cost-alerts.ts index d094ecbd75..bce26cc460 100644 --- a/packages/blocks/ternary/src/lib/actions/get-cost-alerts.ts +++ b/packages/blocks/ternary/src/lib/actions/get-cost-alerts.ts @@ -7,7 +7,7 @@ import { CasesFilter, getCases } from '../common/cases-api'; export const getCostAlertsAction = createAction({ name: 'get_cost_alerts', displayName: 'Get Anomalies', - description: 'Get Anomalies', + description: 'Get cost anomalies and alerts from Ternary', auth: ternaryCloudAuth, isWriteAction: false, props: { @@ -26,7 +26,7 @@ export const getCostAlertsAction = createAction({ }, }), casesFilter: Property.StaticDropdown({ - displayName: 'Case status', + displayName: 'Case Status', description: 'Whether to include alerts that have related cases', required: true, options: { diff --git a/packages/blocks/ternary/src/lib/actions/get-data-integrations.ts b/packages/blocks/ternary/src/lib/actions/get-data-integrations.ts index 2e2c2b3af7..f46ed989d3 100644 --- a/packages/blocks/ternary/src/lib/actions/get-data-integrations.ts +++ b/packages/blocks/ternary/src/lib/actions/get-data-integrations.ts @@ -7,7 +7,7 @@ import { sendTernaryRequest } from '../common/send-ternary-request'; export const getDataIntegrations = createAction({ name: 'get_data_integrations', displayName: 'Get Data Integrations', - description: 'Get Data Integrations', + description: 'Get configured data integrations from Ternary', auth: ternaryCloudAuth, isWriteAction: false, props: {}, diff --git a/packages/blocks/ternary/src/lib/actions/get-users.ts b/packages/blocks/ternary/src/lib/actions/get-users.ts index 4633a0f350..5af75c4ad3 100644 --- a/packages/blocks/ternary/src/lib/actions/get-users.ts +++ b/packages/blocks/ternary/src/lib/actions/get-users.ts @@ -6,12 +6,12 @@ import { getUsersList } from '../common/users'; export const getUsers = createAction({ name: 'get_users', displayName: 'Get Users', - description: 'Get Users', + description: 'Get user list from Ternary', auth: ternaryCloudAuth, isWriteAction: false, props: { includeSettings: Property.Checkbox({ - displayName: 'Include settings', + displayName: 'Include Settings', description: 'Include the tenant settings', required: false, }), diff --git a/packages/blocks/ternary/src/lib/actions/usage-recommendations.ts b/packages/blocks/ternary/src/lib/actions/usage-recommendations.ts index 4288abadb3..bce37764fc 100644 --- a/packages/blocks/ternary/src/lib/actions/usage-recommendations.ts +++ b/packages/blocks/ternary/src/lib/actions/usage-recommendations.ts @@ -7,7 +7,7 @@ import { sendTernaryRequest } from '../common/send-ternary-request'; export const getUsageRecommendations = createAction({ name: 'get_usage_recommendations', displayName: 'Get Usage Recommendations', - description: 'Get Usage Recommendations', + description: 'Get resource usage recommendations from Ternary', auth: ternaryCloudAuth, isWriteAction: false, props: {}, diff --git a/packages/blocks/ternary/src/lib/common/auth.ts b/packages/blocks/ternary/src/lib/common/auth.ts index a8358d4131..dab0affc4a 100644 --- a/packages/blocks/ternary/src/lib/common/auth.ts +++ b/packages/blocks/ternary/src/lib/common/auth.ts @@ -12,7 +12,7 @@ https://docs.ternary.app/reference/using-the-api`, required: true, props: { apiKey: Property.SecretText({ - displayName: 'API key', + displayName: 'API Key', defaultValue: '', required: true, }), diff --git a/packages/blocks/ternary/src/lib/common/resource-types-property.ts b/packages/blocks/ternary/src/lib/common/resource-types-property.ts index b4e3ec890d..96b350a82b 100644 --- a/packages/blocks/ternary/src/lib/common/resource-types-property.ts +++ b/packages/blocks/ternary/src/lib/common/resource-types-property.ts @@ -6,7 +6,7 @@ export function getResourceTypesProperty(): StaticDropdownProperty< true > { return Property.StaticDropdown({ - displayName: 'Resource type', + displayName: 'Resource Type', required: true, options: { options: resourceTypes.map((value) => { diff --git a/packages/blocks/terraform/src/lib/modify/delete-resource-from-template.ts b/packages/blocks/terraform/src/lib/modify/delete-resource-from-template.ts index ea59478277..512188aeb7 100644 --- a/packages/blocks/terraform/src/lib/modify/delete-resource-from-template.ts +++ b/packages/blocks/terraform/src/lib/modify/delete-resource-from-template.ts @@ -6,12 +6,12 @@ import { getResourcesDropdown } from './resources-dropdown'; export const deleteResourceFromTemplate = createAction({ auth: BlockAuth.None(), name: 'delete_terraform_resource', - displayName: 'Delete resource', + displayName: 'Delete Resource', description: 'Delete a resource from a given Terraform template', isWriteAction: true, props: { template: Property.LongText({ - displayName: 'Terraform template', + displayName: 'Terraform Template', required: true, }), resourceNameAndType: getResourcesDropdown(), diff --git a/packages/blocks/terraform/src/lib/modify/modify-template.ts b/packages/blocks/terraform/src/lib/modify/modify-template.ts index 399f595059..6b99aef3ea 100644 --- a/packages/blocks/terraform/src/lib/modify/modify-template.ts +++ b/packages/blocks/terraform/src/lib/modify/modify-template.ts @@ -7,12 +7,12 @@ import { getResourcesDropdown } from './resources-dropdown'; export const modifyTemplate = createAction({ auth: BlockAuth.None(), name: 'update_terraform_file', - displayName: 'Update resource properties', + displayName: 'Update Resource Properties', description: 'Update properties of a resource in a given Terraform template', isWriteAction: true, props: { template: Property.LongText({ - displayName: 'Terraform template', + displayName: 'Terraform Template', required: true, }), diff --git a/packages/blocks/terraform/src/lib/modify/modify-variables-file.ts b/packages/blocks/terraform/src/lib/modify/modify-variables-file.ts index f041e129cd..9fd866bd5d 100644 --- a/packages/blocks/terraform/src/lib/modify/modify-variables-file.ts +++ b/packages/blocks/terraform/src/lib/modify/modify-variables-file.ts @@ -6,13 +6,12 @@ import { getVariableUpdatesProperty } from './variable-updates-property'; export const modifyVariablesFile = createAction({ auth: BlockAuth.None(), name: 'update_terraform_variables_file', - displayName: 'Update variables file', - description: - 'Updates variables of a given Terraform variables file (tfvars).', + displayName: 'Update Variables File', + description: 'Update variables in a Terraform variables file (tfvars)', isWriteAction: true, props: { fileContent: Property.LongText({ - displayName: 'Terraform variables file (tfvars)', + displayName: 'Terraform Variables File (tfvars)', required: true, }), diff --git a/packages/blocks/terraform/src/lib/modify/resource-terraform-properties.ts b/packages/blocks/terraform/src/lib/modify/resource-terraform-properties.ts index 1830ebbfb3..bdf098d246 100644 --- a/packages/blocks/terraform/src/lib/modify/resource-terraform-properties.ts +++ b/packages/blocks/terraform/src/lib/modify/resource-terraform-properties.ts @@ -8,8 +8,8 @@ import { Resource } from './resource-type'; export function getTerraformResourceProperties() { return Property.DynamicProperties({ - displayName: '', - description: '', + displayName: 'Resource Properties', + description: 'Terraform resource properties to modify', required: true, refreshers: ['template', 'resourceNameAndType'], props: async ({ template, resourceNameAndType }) => { @@ -40,13 +40,13 @@ export function getTerraformResourceProperties() { return { updates: Property.Array({ - displayName: 'Intended modifications', + displayName: 'Intended Modifications', required: true, properties: { propertyName: propertyNameDropdown, propertyValue: Property.ShortText({ - displayName: 'Property value', - description: 'The new value for the property.', + displayName: 'Property Value', + description: 'The new value for the property', required: true, }), }, diff --git a/packages/blocks/terraform/src/lib/modify/resources-dropdown.ts b/packages/blocks/terraform/src/lib/modify/resources-dropdown.ts index 3cd5e68215..a072377cac 100644 --- a/packages/blocks/terraform/src/lib/modify/resources-dropdown.ts +++ b/packages/blocks/terraform/src/lib/modify/resources-dropdown.ts @@ -10,7 +10,7 @@ const ValidResourceTypes = [ export function getResourcesDropdown() { return Property.Dropdown({ displayName: 'Resource Name', - description: 'Resource name of the resource to be deleted.', + description: 'Resource name of the resource to be deleted', refreshers: ['template'], required: true, options: async ({ template }) => { diff --git a/packages/blocks/terraform/src/lib/modify/variable-updates-property.ts b/packages/blocks/terraform/src/lib/modify/variable-updates-property.ts index be9b35d84e..2ae25f764b 100644 --- a/packages/blocks/terraform/src/lib/modify/variable-updates-property.ts +++ b/packages/blocks/terraform/src/lib/modify/variable-updates-property.ts @@ -7,7 +7,7 @@ import { export function getVariableUpdatesProperty() { return Property.DynamicProperties({ - displayName: 'Variables to update', + displayName: 'Variables to Update', required: true, refreshers: ['fileContent'], props: async ({ fileContent }): Promise<{ [key: string]: any }> => { @@ -37,7 +37,7 @@ export function getVariableUpdatesProperty() { function getErrorMessageProperty(message?: string) { return Property.StaticDropdown({ - displayName: 'Intended modifications', + displayName: 'Intended Modifications', required: true, options: { disabled: true, @@ -52,18 +52,18 @@ function getUpdatesProperty( terraformVariables: Record, ) { return Property.Array({ - displayName: 'Intended modifications', + displayName: 'Intended Modifications', required: true, properties: { variableName: Property.StaticDropdown({ - displayName: 'Variable name', + displayName: 'Variable Name', required: true, options: { options: getVariableNameOptions(terraformVariables), }, }), variableValue: Property.DynamicProperties({ - displayName: 'Variable value', + displayName: 'Variable Value', required: true, refreshers: ['variableName'], props: async ({ variableName }): Promise<{ [key: string]: any }> => { diff --git a/packages/blocks/text-helper/src/lib/actions/find.ts b/packages/blocks/text-helper/src/lib/actions/find.ts index 0212675a32..16cc0c51c2 100644 --- a/packages/blocks/text-helper/src/lib/actions/find.ts +++ b/packages/blocks/text-helper/src/lib/actions/find.ts @@ -1,7 +1,7 @@ import { Property, Validators, createAction } from '@openops/blocks-framework'; export const find = createAction({ - description: 'Find substring (Regex or Text).', + description: 'Find substring (Regex or Text)', displayName: 'Find', name: 'find', errorHandlingOptions: { @@ -15,12 +15,12 @@ export const find = createAction({ isWriteAction: false, props: { text: Property.ShortText({ - displayName: 'text', + displayName: 'Text', required: true, }), expression: Property.ShortText({ displayName: 'Expression', - description: 'Regex or text to search for.', + description: 'Regex or text to search for', required: true, }), }, diff --git a/packages/blocks/text-helper/src/lib/actions/replace.ts b/packages/blocks/text-helper/src/lib/actions/replace.ts index 2c07431aec..2033095ba2 100644 --- a/packages/blocks/text-helper/src/lib/actions/replace.ts +++ b/packages/blocks/text-helper/src/lib/actions/replace.ts @@ -2,7 +2,7 @@ import { Property, Validators, createAction } from '@openops/blocks-framework'; export const replace = createAction({ description: - 'Replaces all instances of any word, character or phrase in text, with another.', + 'Replaces all instances of any word, character or phrase in text, with another', displayName: 'Replace', name: 'replace', errorHandlingOptions: { @@ -21,19 +21,19 @@ export const replace = createAction({ }), searchValue: Property.ShortText({ displayName: 'Search Value', - description: 'Can be plain text or a regex expression.', + description: 'Can be plain text or a regex expression', required: true, validators: [], }), replaceValue: Property.ShortText({ displayName: 'Replace Value', required: false, - description: 'Leave empty to delete found results.', + description: 'Leave empty to delete found results', }), replaceOnlyFirst: Property.Checkbox({ displayName: 'Replace Only First Match', required: false, - description: 'Only replaces the first instance of the search value.', + description: 'Only replaces the first instance of the search value', }), }, run: async (ctx) => { diff --git a/packages/blocks/text-helper/src/lib/actions/strip-html.ts b/packages/blocks/text-helper/src/lib/actions/strip-html.ts index a553ce02c0..eedcf2c71c 100644 --- a/packages/blocks/text-helper/src/lib/actions/strip-html.ts +++ b/packages/blocks/text-helper/src/lib/actions/strip-html.ts @@ -4,11 +4,11 @@ import { stripHtml } from 'string-strip-html'; export const stripHtmlContent = createAction({ name: 'stripHtml', displayName: 'Remove HTML Tags', - description: 'Removes every HTML tag and returns plain text', + description: 'Remove all HTML tags and return plain text', isWriteAction: false, props: { html: Property.LongText({ - displayName: 'HTML content', + displayName: 'HTML Content', required: true, }), }, diff --git a/packages/blocks/vegacloud/src/lib/actions/get-anomalies-action.ts b/packages/blocks/vegacloud/src/lib/actions/get-anomalies-action.ts index d4eead6cd4..95e620451e 100644 --- a/packages/blocks/vegacloud/src/lib/actions/get-anomalies-action.ts +++ b/packages/blocks/vegacloud/src/lib/actions/get-anomalies-action.ts @@ -7,22 +7,22 @@ import { makeRequest } from '../common/make-request'; export const getAnomaliesAction = createAction({ name: `vegacloud_get_anomalies`, displayName: `Get Anomalies`, - description: `Get Anomalies`, + description: `Get cost and usage anomalies from VegaCloud`, auth: vegacloudAuth, isWriteAction: false, props: { fromDate: Property.ShortText({ - displayName: 'From date', + displayName: 'From Date', description: 'The start date for fetching anomalies (format: YYYYMMDD)', required: true, }), toDate: Property.ShortText({ - displayName: 'To date', + displayName: 'To Date', description: 'The end date for fetching anomalies (format: YYYYMMDD)', required: true, }), additionalFilters: Property.DynamicProperties({ - displayName: 'Additional filters', + displayName: 'Additional Filters', description: 'Additional filters to apply to the search. See more at https://docs.vegacloud.io/docs/api/data_api#filtering-data', required: true, @@ -36,11 +36,11 @@ export const getAnomaliesAction = createAction({ const filterFields = await getAnomalyFields(auth as VegaCloudAuth); properties['additionalFilters'] = Property.Array({ - displayName: 'Fields to filter by', + displayName: 'Fields to Filter by', required: false, properties: { fieldName: Property.StaticDropdown({ - displayName: 'Field name', + displayName: 'Field Name', required: true, options: { options: filterFields.map((f) => ({ diff --git a/packages/blocks/webhook/src/index.ts b/packages/blocks/webhook/src/index.ts index 56f7d69fc0..df5202e50e 100644 --- a/packages/blocks/webhook/src/index.ts +++ b/packages/blocks/webhook/src/index.ts @@ -4,7 +4,7 @@ import { catchWebhook } from './lib/triggers/catch-hook'; export const webhook = createBlock({ displayName: 'Webhook', - description: 'Receive HTTP requests and trigger flows using unique URLs.', + description: 'Receive HTTP requests and trigger flows using unique URLs', auth: BlockAuth.None(), categories: [BlockCategory.CORE], minimumSupportedRelease: '0.27.1', diff --git a/packages/blocks/webhook/src/lib/triggers/catch-hook.ts b/packages/blocks/webhook/src/lib/triggers/catch-hook.ts index 7404f64362..2776ff1c3b 100644 --- a/packages/blocks/webhook/src/lib/triggers/catch-hook.ts +++ b/packages/blocks/webhook/src/lib/triggers/catch-hook.ts @@ -30,7 +30,7 @@ export const catchWebhook = createTrigger({ name: CATCH_WEBHOOK, displayName: 'Catch Webhook', description: - 'Receive incoming HTTP/webhooks using any HTTP method such as GET, POST, PUT, DELETE, etc.', + 'Receive incoming HTTP/webhooks using any HTTP method such as GET, POST, PUT, DELETE, etc', props: { markdown: Property.MarkDown({ value: message, @@ -66,12 +66,12 @@ export const catchWebhook = createTrigger({ fields = { username: Property.ShortText({ displayName: 'Username', - description: 'The username to use for authentication.', + description: 'The username to use for authentication', required: true, }), password: Property.ShortText({ displayName: 'Password', - description: 'The password to use for authentication.', + description: 'The password to use for authentication', required: true, }), }; @@ -80,13 +80,12 @@ export const catchWebhook = createTrigger({ fields = { headerName: Property.ShortText({ displayName: 'Header Name', - description: - 'The name of the header to use for authentication.', + description: 'The name of the header to use for authentication', required: true, }), headerValue: Property.ShortText({ displayName: 'Header Value', - description: 'The value to check against the header.', + description: 'The value to check against the header', required: true, }), }; diff --git a/tools/eslint-rules/README.md b/tools/eslint-rules/README.md new file mode 100644 index 0000000000..970b76e6a8 --- /dev/null +++ b/tools/eslint-rules/README.md @@ -0,0 +1,165 @@ +# OpenOps Block Style Guide ESLint Plugin + +Custom ESLint plugin to enforce style guide rules for `displayName` and `description` fields in OpenOps blocks. + +## Rules + +### `block-style-guide` + +Enforces the following style guide rules for block definitions: + +#### 1. displayName - Title Case +- Must be in Title Case (first letter of each word capitalized) +- Exception: small words like "a", "and", "the", "of" can be lowercase (unless first word) +- Acronyms (API, SQL, UUID, HTTP, etc.) should remain uppercase + +**Examples:** +```typescript +// ✓ Good +displayName: 'Get Recommendations' +displayName: 'Execute SQL Statement' +displayName: 'Send HTTP Request' +displayName: 'Order By' + +// ✗ Bad +displayName: 'get recommendations' +displayName: 'Execute sql statement' +displayName: 'send Http request' +``` + +#### 2. description - Sentence Case +- Must start with a capital letter +- Should NOT end with a period (unless multiple sentences) +- Use imperative form for actions (Get, Create, Send) not third-person (Gets, Creates, Sends) + +**Examples:** +```typescript +// ✓ Good +description: 'Get cost recommendations from the provider' +description: 'Send an email using SMTP. Supports attachments and HTML content.' + +// ✗ Bad +description: 'get cost recommendations' +description: 'Get cost recommendations from the provider.' // No period for single sentence +description: 'Gets cost recommendations' // Use imperative, not third-person +``` + +#### 3. displayName and description Must Be Distinct +- displayName and description should not be the same or too similar (>80% similarity) + +**Examples:** +```typescript +// ✓ Good +displayName: 'Get Recommendations' +description: 'Fetch cost optimization suggestions from the provider' + +// ✗ Bad +displayName: 'Get Recommendations' +description: 'Get recommendations' // Too similar +``` + +#### 4. description Must Not Be Empty +- Every description field must have meaningful content + +**Examples:** +```typescript +// ✓ Good +description: 'Create a new item in the database' + +// ✗ Bad +description: '' +description: ' ' +``` + +#### 5. Action displayNames Should Use Verbs +- For actions, displayName should start with an action verb +- Common verbs: Get, Create, Update, Delete, Send, Execute, Run, Add, Remove, etc. + +**Examples:** +```typescript +// ✓ Good (in createAction context) +displayName: 'Get User Profile' +displayName: 'Create Database Entry' +displayName: 'Send Notification' + +// ✗ Bad (in createAction context) +displayName: 'User Profile' // Missing verb +displayName: 'Database Entry Creation' // Not verb-first +``` + +## Installation + +The plugin is already integrated into the OpenOps monorepo. To enable it: + +1. The plugin is located in `tools/eslint-rules/` +2. It's configured in `.eslintrc.json` for the blocks package + +## Usage + +The rule runs automatically when you run ESLint: + +```bash +# Lint all files +npm run lint + +# Lint blocks specifically +npx nx lint blocks + +# Auto-fix issues where possible +npx nx lint blocks --fix +``` + +## Configuration + +The rule is enabled by default for the blocks package. You can configure it in `.eslintrc.json`: + +```json +{ + "rules": { + "@openops/block-style/block-style-guide": "error" + } +} +``` + +## Development + +To test the rule: + +```bash +# From the tools/eslint-rules directory +npm test + +# Or test against actual block files +npx eslint packages/blocks/*/src/**/*.ts +``` + +## Error Messages + +The rule provides specific error messages for each violation: + +- `displayNameNotTitleCase`: displayName should be in Title Case +- `descriptionNotSentenceCase`: description should start with a capital letter +- `descriptionTrailingPeriod`: description should not end with a period (unless multiple sentences) +- `descriptionEmpty`: description must not be empty +- `displayNameDescriptionSimilar`: displayName and description are too similar +- `actionDisplayNameNotVerb`: Action displayName should start with a verb + +## Examples + +### Before (Violations) +```typescript +createAction({ + displayName: 'get recommendations', // Not Title Case + description: 'Gets recommendations.', // Third-person verb + trailing period + // ... +}); +``` + +### After (Compliant) +```typescript +createAction({ + displayName: 'Get Recommendations', // Title Case + description: 'Get cost optimization recommendations from the provider', // Imperative, no period + // ... +}); +``` diff --git a/tools/eslint-rules/examples.ts b/tools/eslint-rules/examples.ts new file mode 100644 index 0000000000..7b8069843c --- /dev/null +++ b/tools/eslint-rules/examples.ts @@ -0,0 +1,108 @@ +/** + * Test examples for the block-style-guide ESLint rule + * + * These examples demonstrate violations and correct usage + */ + +// ❌ VIOLATIONS - These will trigger ESLint errors + +// Violation: displayName not in Title Case +const badAction1 = { + displayName: 'get recommendations', // Should be "Get Recommendations" + description: 'Get cost optimization recommendations', +}; + +// Violation: description with trailing period (single sentence) +const badAction2 = { + displayName: 'Get Recommendations', + description: 'Get cost optimization recommendations.', // Remove period +}; + +// Violation: description not starting with capital +const badAction3 = { + displayName: 'Send Email', + description: 'send an email using SMTP', // Should start with capital +}; + +// Violation: empty description +const badAction4 = { + displayName: 'Create User', + description: '', // Must not be empty +}; + +// Violation: displayName and description too similar +const badAction5 = { + displayName: 'Delete Record', + description: 'Delete record', // Too similar to displayName +}; + +// Violation: Action displayName not starting with verb +const badAction6 = { + displayName: 'User Profile', // Should be "Get User Profile" or similar + description: 'Get the user profile information', +}; + +// Violation: Using third-person verb +const badAction7 = { + displayName: 'Update Settings', + description: 'Updates the application settings', // Should be "Update" not "Updates" +}; + +// ✅ CORRECT USAGE - These pass the linter + +const goodAction1 = { + displayName: 'Get Recommendations', + description: 'Get cost optimization recommendations from the provider', +}; + +const goodAction2 = { + displayName: 'Send HTTP Request', + description: 'Send an HTTP request to a specified URL', +}; + +const goodAction3 = { + displayName: 'Execute SQL Statement', + description: 'Run an SQL query in a Databricks workspace and retrieve results', +}; + +const goodAction4 = { + displayName: 'Create Database Entry', + description: 'Create a new entry in the database with the provided data', +}; + +const goodAction5 = { + displayName: 'Update User Profile', + description: 'Update the user profile with new information. Validates all fields before saving.', // Multiple sentences OK with period +}; + +const goodTrigger1 = { + displayName: 'New Email', + description: 'Trigger when a new email arrives in the inbox', +}; + +const goodProperty1 = { + displayName: 'API Token', + description: 'Authentication token for API access', +}; + +const goodProperty2 = { + displayName: 'Order By', + description: 'Sort the results by the specified field', +}; + +// Edge cases that should pass + +const edgeCaseAcronyms = { + displayName: 'Send HTTP Request via API', // Acronyms OK + description: 'Send an HTTP request using the REST API endpoint', +}; + +const edgeCaseParentheses = { + displayName: 'Get Volume IOPS (GB)', // Parentheses OK + description: 'Get the IOPS value for the volume in gigabytes', +}; + +const edgeCaseSpecialChars = { + displayName: 'Execute SQL Query', + description: 'Execute an SQL query (not a SQL) in the database', // "an SQL" is correct +}; diff --git a/tools/eslint-rules/index.js b/tools/eslint-rules/index.js new file mode 100644 index 0000000000..5f219d26a0 --- /dev/null +++ b/tools/eslint-rules/index.js @@ -0,0 +1,9 @@ +/** + * Custom ESLint plugin for OpenOps block style guide enforcement + */ + +module.exports = { + rules: { + 'block-style-guide': require('./rules/block-style-guide'), + }, +}; diff --git a/tools/eslint-rules/package.json b/tools/eslint-rules/package.json new file mode 100644 index 0000000000..978d5cff22 --- /dev/null +++ b/tools/eslint-rules/package.json @@ -0,0 +1,9 @@ +{ + "name": "@openops/eslint-plugin-block-style", + "version": "1.0.0", + "description": "ESLint plugin to enforce OpenOps block style guide", + "main": "index.js", + "keywords": ["eslint", "eslintplugin", "openops", "blocks"], + "author": "OpenOps", + "license": "MIT" +} diff --git a/tools/eslint-rules/rules/block-style-guide.js b/tools/eslint-rules/rules/block-style-guide.js new file mode 100644 index 0000000000..cc06b76a3f --- /dev/null +++ b/tools/eslint-rules/rules/block-style-guide.js @@ -0,0 +1,287 @@ +/** + * ESLint rule to enforce OpenOps block style guide for displayName and description fields + * + * Rules enforced: + * 1. displayName must be Title Case (first letter of each word capitalized) + * 2. description must use Sentence case (starts with capital letter, no period unless multiple sentences) + * 3. displayName and description must NOT be the same or too similar + * 4. Every description must be filled in (non-empty) + * 5. Action displayNames should use verb forms (e.g., "Get", "Create", "Send") + */ + +module.exports = { + meta: { + type: 'suggestion', + docs: { + description: 'Enforce OpenOps block style guide for displayName and description fields', + category: 'Best Practices', + recommended: true, + }, + fixable: 'code', + schema: [], + messages: { + displayNameNotTitleCase: 'displayName "{{value}}" should be in Title Case', + descriptionNotSentenceCase: 'description "{{value}}" should start with a capital letter (Sentence case)', + descriptionTrailingPeriod: 'description "{{value}}" should not end with a period (unless multiple sentences)', + descriptionEmpty: 'description must not be empty', + displayNameDescriptionSimilar: 'displayName and description are too similar - they should be distinct', + actionDisplayNameNotVerb: 'Action displayName "{{value}}" should start with a verb (e.g., "Get", "Create", "Send")', + }, + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + /** + * Check if a string is in Title Case + */ + function isTitleCase(str) { + if (!str) return false; + + // List of words that should remain lowercase in Title Case (unless first word) + const lowercaseWords = new Set(['a', 'an', 'and', 'as', 'at', 'but', 'by', 'for', 'in', 'of', 'on', 'or', 'the', 'to', 'via', 'with']); + + const words = str.split(/\s+/); + + return words.every((word, index) => { + if (!word) return true; + + // Handle words in parentheses or with special characters + if (word.includes('(') || word.includes('/')) { + return true; // Skip validation for complex words + } + + // Check if word is all caps (acronym) - that's allowed + if (word === word.toUpperCase() && word.length > 1) { + return true; + } + + // First word should always be capitalized + if (index === 0) { + return word[0] === word[0].toUpperCase(); + } + + // Check if it's a lowercase exception word + const cleanWord = word.replace(/[^a-zA-Z]/g, '').toLowerCase(); + if (lowercaseWords.has(cleanWord)) { + return word[0] === word[0].toLowerCase() || word[0] === word[0].toUpperCase(); + } + + // Otherwise, should start with capital + return word[0] === word[0].toUpperCase(); + }); + } + + /** + * Check if a string is in Sentence case + */ + function isSentenceCase(str) { + if (!str) return false; + return str[0] === str[0].toUpperCase(); + } + + /** + * Check if description has trailing period (only for single sentences) + */ + function hasInvalidTrailingPeriod(str) { + if (!str || !str.endsWith('.')) return false; + + // Count periods to detect multiple sentences + const periodCount = (str.match(/\.\s+[A-Z]/g) || []).length; + + // If only one period at the end and no other sentence markers, it's invalid + return periodCount === 0; + } + + /** + * Calculate similarity between two strings (Levenshtein distance ratio) + */ + function calculateSimilarity(str1, str2) { + if (!str1 || !str2) return 0; + + const s1 = str1.toLowerCase().replace(/[^a-z0-9\s]/g, ''); + const s2 = str2.toLowerCase().replace(/[^a-z0-9\s]/g, ''); + + if (s1 === s2) return 1; + + const maxLen = Math.max(s1.length, s2.length); + const distance = levenshteinDistance(s1, s2); + + return 1 - (distance / maxLen); + } + + /** + * Levenshtein distance calculation + */ + function levenshteinDistance(str1, str2) { + const matrix = []; + + for (let i = 0; i <= str2.length; i++) { + matrix[i] = [i]; + } + + for (let j = 0; j <= str1.length; j++) { + matrix[0][j] = j; + } + + for (let i = 1; i <= str2.length; i++) { + for (let j = 1; j <= str1.length; j++) { + if (str2.charAt(i - 1) === str1.charAt(j - 1)) { + matrix[i][j] = matrix[i - 1][j - 1]; + } else { + matrix[i][j] = Math.min( + matrix[i - 1][j - 1] + 1, + matrix[i][j - 1] + 1, + matrix[i - 1][j] + 1 + ); + } + } + } + + return matrix[str2.length][str1.length]; + } + + /** + * Check if displayName starts with an action verb + */ + function startsWithActionVerb(str) { + if (!str) return false; + + const actionVerbs = [ + 'Get', 'Create', 'Update', 'Delete', 'Send', 'Fetch', 'Execute', 'Run', + 'Add', 'Remove', 'List', 'Search', 'Find', 'Move', 'Copy', 'Upload', + 'Download', 'Generate', 'Parse', 'Format', 'Convert', 'Transform', + 'Validate', 'Verify', 'Check', 'Test', 'Deploy', 'Build', 'Install', + 'Trigger', 'Wait', 'Delay', 'Forward', 'Apply', 'Modify', 'Enable', + 'Disable', 'Start', 'Stop', 'Restart', 'Pause', 'Resume', 'Cancel' + ]; + + return actionVerbs.some(verb => str.startsWith(verb + ' ') || str === verb); + } + + /** + * Check if this is likely an action definition + */ + function isActionContext(node) { + // Check if we're in a createAction or Action.create call + let parent = node.parent; + while (parent) { + if (parent.type === 'CallExpression' && parent.callee) { + const callee = sourceCode.getText(parent.callee); + if (callee.includes('createAction') || callee.includes('Action.create')) { + return true; + } + } + parent = parent.parent; + } + return false; + } + + /** + * Main validation function for object properties + */ + function validateBlockFields(node) { + if (node.type !== 'ObjectExpression') return; + + let displayNameProp = null; + let descriptionProp = null; + + // Find displayName and description properties + for (const prop of node.properties) { + if (prop.type === 'Property' && prop.key.type === 'Identifier') { + if (prop.key.name === 'displayName') { + displayNameProp = prop; + } else if (prop.key.name === 'description') { + descriptionProp = prop; + } + } + } + + // Validate displayName + if (displayNameProp && displayNameProp.value.type === 'Literal') { + const displayName = displayNameProp.value.value; + + if (displayName && typeof displayName === 'string') { + // Check Title Case + if (!isTitleCase(displayName)) { + context.report({ + node: displayNameProp.value, + messageId: 'displayNameNotTitleCase', + data: { value: displayName }, + }); + } + + // Check if action context and starts with verb + if (isActionContext(node) && !startsWithActionVerb(displayName)) { + context.report({ + node: displayNameProp.value, + messageId: 'actionDisplayNameNotVerb', + data: { value: displayName }, + }); + } + } + } + + // Validate description + if (descriptionProp && descriptionProp.value.type === 'Literal') { + const description = descriptionProp.value.value; + + if (typeof description === 'string') { + // Check not empty + if (!description || description.trim() === '') { + context.report({ + node: descriptionProp.value, + messageId: 'descriptionEmpty', + }); + } else { + // Check Sentence case + if (!isSentenceCase(description)) { + context.report({ + node: descriptionProp.value, + messageId: 'descriptionNotSentenceCase', + data: { value: description }, + }); + } + + // Check trailing period + if (hasInvalidTrailingPeriod(description)) { + context.report({ + node: descriptionProp.value, + messageId: 'descriptionTrailingPeriod', + data: { value: description }, + }); + } + } + } + } + + // Check similarity between displayName and description + if (displayNameProp && descriptionProp && + displayNameProp.value.type === 'Literal' && + descriptionProp.value.type === 'Literal') { + + const displayName = displayNameProp.value.value; + const description = descriptionProp.value.value; + + if (displayName && description && + typeof displayName === 'string' && + typeof description === 'string') { + + const similarity = calculateSimilarity(displayName, description); + + // If similarity is above 80%, they're too similar + if (similarity > 0.8) { + context.report({ + node: descriptionProp.value, + messageId: 'displayNameDescriptionSimilar', + }); + } + } + } + } + + return { + ObjectExpression: validateBlockFields, + }; + }, +};