1
0
Fork 0
mirror of synced 2024-08-28 08:21:41 +12:00

Rename records to rows in automation definitions

This commit is contained in:
Andrew Kingston 2020-09-25 15:01:48 +01:00
parent d0806b2924
commit 9bd1743ea0
5 changed files with 34 additions and 28 deletions

View file

@ -28,9 +28,9 @@
</div> </div>
{#if schemaFields.length} {#if schemaFields.length}
<div class="bb-margin-xl block-field"> <div class="schema-fields">
{#each schemaFields as [field, schema]} {#each schemaFields as [field, schema]}
<div class="bb-margin-xl capitalise"> <div class="capitalise">
{#if schemaHasOptions(schema)} {#if schemaHasOptions(schema)}
<div class="field-label">{field}</div> <div class="field-label">{field}</div>
<Select thin secondary bind:value={value[field]}> <Select thin secondary bind:value={value[field]}>
@ -66,4 +66,10 @@
.field-label { .field-label {
text-transform: capitalize; text-transform: capitalize;
} }
.schema-fields {
display: grid;
grid-gap: var(--spacing-xl);
margin-top: var(--spacing-xl);
}
</style> </style>

View file

@ -1,10 +1,10 @@
const recordController = require("../../api/controllers/record") const recordController = require("../../api/controllers/record")
module.exports.definition = { module.exports.definition = {
description: "Delete a record from your database", description: "Delete a row from your database",
icon: "ri-delete-bin-line", icon: "ri-delete-bin-line",
name: "Delete Record", name: "Delete Row",
tagline: "Delete a {{inputs.enriched.model.name}} record", tagline: "Delete a {{inputs.enriched.model.name}} row",
type: "ACTION", type: "ACTION",
stepId: "DELETE_RECORD", stepId: "DELETE_RECORD",
inputs: {}, inputs: {},
@ -18,11 +18,11 @@ module.exports.definition = {
}, },
id: { id: {
type: "string", type: "string",
title: "Record ID", title: "Row ID",
}, },
revision: { revision: {
type: "string", type: "string",
title: "Record Revision", title: "Row Revision",
}, },
}, },
required: ["modelId", "id", "revision"], required: ["modelId", "id", "revision"],
@ -32,7 +32,7 @@ module.exports.definition = {
record: { record: {
type: "object", type: "object",
customType: "record", customType: "record",
description: "The deleted record", description: "The deleted row",
}, },
response: { response: {
type: "object", type: "object",

View file

@ -2,10 +2,10 @@ const recordController = require("../../api/controllers/record")
const automationUtils = require("../automationUtils") const automationUtils = require("../automationUtils")
module.exports.definition = { module.exports.definition = {
name: "Save Record", name: "Create Row",
tagline: "Save a {{inputs.enriched.model.name}} record", tagline: "Create a {{inputs.enriched.model.name}} row",
icon: "ri-save-3-fill", icon: "ri-save-3-fill",
description: "Save a record to your database", description: "Add a row to your database",
type: "ACTION", type: "ACTION",
stepId: "SAVE_RECORD", stepId: "SAVE_RECORD",
inputs: {}, inputs: {},
@ -32,7 +32,7 @@ module.exports.definition = {
record: { record: {
type: "object", type: "object",
customType: "record", customType: "record",
description: "The new record", description: "The new row",
}, },
response: { response: {
type: "object", type: "object",
@ -44,11 +44,11 @@ module.exports.definition = {
}, },
id: { id: {
type: "string", type: "string",
description: "The identifier of the new record", description: "The identifier of the new row",
}, },
revision: { revision: {
type: "string", type: "string",
description: "The revision of the new record", description: "The revision of the new row",
}, },
}, },
required: ["success", "id", "revision"], required: ["success", "id", "revision"],

View file

@ -2,10 +2,10 @@ const recordController = require("../../api/controllers/record")
const automationUtils = require("../automationUtils") const automationUtils = require("../automationUtils")
module.exports.definition = { module.exports.definition = {
name: "Update Record", name: "Update Row",
tagline: "Update a {{inputs.enriched.model.name}} record", tagline: "Update a {{inputs.enriched.model.name}} record",
icon: "ri-refresh-fill", icon: "ri-refresh-fill",
description: "Update a record to your database", description: "Update a row in your database",
type: "ACTION", type: "ACTION",
stepId: "UPDATE_RECORD", stepId: "UPDATE_RECORD",
inputs: {}, inputs: {},
@ -15,11 +15,11 @@ module.exports.definition = {
record: { record: {
type: "object", type: "object",
customType: "record", customType: "record",
title: "Record", title: "Table",
}, },
recordId: { recordId: {
type: "string", type: "string",
title: "Record ID", title: "Row ID",
}, },
}, },
required: ["record", "recordId"], required: ["record", "recordId"],

View file

@ -11,11 +11,11 @@ const FAKE_DATETIME = "1970-01-01T00:00:00.000Z"
const BUILTIN_DEFINITIONS = { const BUILTIN_DEFINITIONS = {
RECORD_SAVED: { RECORD_SAVED: {
name: "Record Saved", name: "Row Saved",
event: "record:save", event: "record:save",
icon: "ri-save-line", icon: "ri-save-line",
tagline: "Record is added to {{inputs.enriched.model.name}}", tagline: "Row is added to {{inputs.enriched.model.name}}",
description: "Fired when a record is saved to your database", description: "Fired when a row is saved to your database",
stepId: "RECORD_SAVED", stepId: "RECORD_SAVED",
inputs: {}, inputs: {},
schema: { schema: {
@ -34,15 +34,15 @@ const BUILTIN_DEFINITIONS = {
record: { record: {
type: "object", type: "object",
customType: "record", customType: "record",
description: "The new record that was saved", description: "The new row that was saved",
}, },
id: { id: {
type: "string", type: "string",
description: "Record ID - can be used for updating", description: "Row ID - can be used for updating",
}, },
revision: { revision: {
type: "string", type: "string",
description: "Revision of record", description: "Revision of row",
}, },
}, },
required: ["record", "id"], required: ["record", "id"],
@ -51,11 +51,11 @@ const BUILTIN_DEFINITIONS = {
type: "TRIGGER", type: "TRIGGER",
}, },
RECORD_DELETED: { RECORD_DELETED: {
name: "Record Deleted", name: "Row Deleted",
event: "record:delete", event: "record:delete",
icon: "ri-delete-bin-line", icon: "ri-delete-bin-line",
tagline: "Record is deleted from {{inputs.enriched.model.name}}", tagline: "Row is deleted from {{inputs.enriched.model.name}}",
description: "Fired when a record is deleted from your database", description: "Fired when a row is deleted from your database",
stepId: "RECORD_DELETED", stepId: "RECORD_DELETED",
inputs: {}, inputs: {},
schema: { schema: {
@ -74,7 +74,7 @@ const BUILTIN_DEFINITIONS = {
record: { record: {
type: "object", type: "object",
customType: "record", customType: "record",
description: "The record that was deleted", description: "The row that was deleted",
}, },
}, },
required: ["record", "id"], required: ["record", "id"],