Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/lint/src/reference-integrity-suite.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -191,7 +191,7 @@ describe('reference-integrity suite — every member actually runs', () => {
// the two must not diverge across commands again.
runAs: 'user',
nodes: [
{ id: 'start', type: 'start', config: { objectName: 'crm_lead', triggerType: 'record-created' } },
{ id: 'start', type: 'start', config: { objectName: 'crm_lead', triggerType: 'record-after-create' } },
// validateFlowTemplatePaths: `budget` is not a field on crm_lead. In a
// FILTER position an erased condition widens the query rather than
// narrowing it, so the runtime refuses the node — gating, not advisory
Expand Down
20 changes: 10 additions & 10 deletions packages/lint/src/validate-flow-template-paths.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,7 +32,7 @@ function flowWith(notify: AnyRec, objectName = 'crm_lead'): AnyRec {
name: 'notify_lead',
type: 'record_change',
nodes: [
{ id: 'start', type: 'start', config: { objectName, triggerType: 'record-created' } },
{ id: 'start', type: 'start', config: { objectName, triggerType: 'record-after-create' } },
{ id: 'n1', type: 'notify', notify },
],
},
Expand DownExpand Up@@ -117,7 +117,7 @@ describe('validateFlowTemplatePaths', () => {
name: 'external',
type: 'record_change',
nodes: [
{ id: 'start', type: 'start', config: { objectName: 'sys_user', triggerType: 'record-created' } },
{ id: 'start', type: 'start', config: { objectName: 'sys_user', triggerType: 'record-after-create' } },
{ id: 'n1', type: 'notify', notify: { title: '{record.anything.deep}', body: 'x' } },
],
},
Expand DownExpand Up@@ -158,7 +158,7 @@ describe('validateFlowTemplatePaths', () => {
name: 'typed_start',
type: 'record_change',
nodes: [
{ id: 'start', type: 'start', start: { objectName: 'crm_lead', triggerType: 'record-created' } },
{ id: 'start', type: 'start', start: { objectName: 'crm_lead', triggerType: 'record-after-create' } },
{ id: 'n1', type: 'notify', notify: { title: '{record.crm_account.name}', body: 'x' } },
],
},
Expand All@@ -176,7 +176,7 @@ describe('validateFlowTemplatePaths', () => {
name: 'webhook',
type: 'record_change',
nodes: [
{ id: 'start', type: 'start', config: { objectName: 'crm_lead', triggerType: 'record-created' } },
{ id: 'start', type: 'start', config: { objectName: 'crm_lead', triggerType: 'record-after-create' } },
{ id: 'h1', type: 'http', http: { url: 'https://x.test/{record.full_naem}', method: 'GET' } },
],
},
Expand All@@ -197,7 +197,7 @@ describe('validateFlowTemplatePaths', () => {
{
id: 'start',
type: 'start',
config: { objectName: 'crm_lead', triggerType: 'record-created', expand: ['crm_account'] },
config: { objectName: 'crm_lead', triggerType: 'record-after-create', expand: ['crm_account'] },
},
{ id: 'n1', type: 'notify', notify: { title: 'From {record.crm_account.name}', body: 'x' } },
],
Expand All@@ -218,7 +218,7 @@ describe('validateFlowTemplatePaths', () => {
{
id: 'start',
type: 'start',
config: { objectName: 'crm_lead', triggerType: 'record-created', expand: ['target_channels'] },
config: { objectName: 'crm_lead', triggerType: 'record-after-create', expand: ['target_channels'] },
},
{ id: 'n1', type: 'notify', notify: { title: 'From {record.crm_account.name}', body: 'x' } },
],
Expand DownExpand Up@@ -247,7 +247,7 @@ describe('validateFlowTemplatePaths', () => {
name: 'crud_flow',
type: 'record_change',
nodes: [
{ id: 'start', type: 'start', config: { objectName: 'crm_lead', triggerType: 'record-created' } },
{ id: 'start', type: 'start', config: { objectName: 'crm_lead', triggerType: 'record-after-create' } },
{ id: 'c1', type, config },
],
},
Expand DownExpand Up@@ -330,7 +330,7 @@ describe('validateFlowTemplatePaths', () => {
{
id: 'start',
type: 'start',
config: { objectName: 'crm_lead', triggerType: 'record-created', expand: ['crm_account'] },
config: { objectName: 'crm_lead', triggerType: 'record-after-create', expand: ['crm_account'] },
},
{
id: 'c1',
Expand DownExpand Up@@ -360,7 +360,7 @@ describe('validateFlowTemplatePaths', () => {
name: 'guarded',
type: 'record_change',
nodes: [
{ id: 'start', type: 'start', config: { objectName: 'crm_lead', triggerType: 'record-created' } },
{ id: 'start', type: 'start', config: { objectName: 'crm_lead', triggerType: 'record-after-create' } },
{ id: 'guard', type: 'try_catch', label: 'Guard', config: container },
],
},
Expand DownExpand Up@@ -399,7 +399,7 @@ describe('validateFlowTemplatePaths', () => {
name: 'looped',
type: 'record_change',
nodes: [
{ id: 'start', type: 'start', config: { objectName: 'crm_lead', triggerType: 'record-created' } },
{ id: 'start', type: 'start', config: { objectName: 'crm_lead', triggerType: 'record-after-create' } },
{
id: 'each',
type: 'loop',
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -50,7 +50,7 @@ function expandFlow(name: string, runAs: 'system' | 'user', expand: string[], fi
name, label: name, type: 'record_change', runAs,
variables: [{ name: 'noteId', type: 'text', isInput: true }],
nodes: [
{ id: 'start', type: 'start', label: 'Start', config: { objectName: 'lead', triggerType: 'record-created', expand } },
{ id: 'start', type: 'start', label: 'Start', config: { objectName: 'lead', triggerType: 'record-after-create', expand } },
{ id: 'up', type: 'update_record', label: 'Up', config: { objectName: 'audit', filter: { id: '{noteId}' }, fields } },
{ id: 'end', type: 'end', label: 'End' },
],
Expand Down
Loading