diff --git a/src/tools/auth0/handlers/flowVaultConnections.ts b/src/tools/auth0/handlers/flowVaultConnections.ts index 0cd18bc6..b659528a 100644 --- a/src/tools/auth0/handlers/flowVaultConnections.ts +++ b/src/tools/auth0/handlers/flowVaultConnections.ts @@ -3,7 +3,7 @@ import { PatchFlowsVaultConnectionsByIdRequest, } from 'auth0'; import { isArray, isEmpty } from 'lodash'; -import DefaultHandler from './default'; +import DefaultHandler, { order } from './default'; import { Asset, Assets, CalculatedChanges } from '../../../types'; import constants from '../../constants'; import log from '../../../logger'; @@ -57,6 +57,7 @@ export default class FlowVaultHandler extends DefaultHandler { return this.existing; } + @order('50') async processChanges(assets: Assets): Promise { const { flowVaultConnections } = assets; @@ -124,6 +125,9 @@ export default class FlowVaultHandler extends DefaultHandler { if ('ready' in conn) { delete conn.ready; } + if ('account_name' in conn) { + delete conn.account_name; + } const { data: created } = await this.client.flows.createConnection(conn); return created; } diff --git a/src/tools/auth0/handlers/flows.ts b/src/tools/auth0/handlers/flows.ts index 1d0a9446..fbd257a9 100644 --- a/src/tools/auth0/handlers/flows.ts +++ b/src/tools/auth0/handlers/flows.ts @@ -36,6 +36,8 @@ export default class FlowHandler extends DefaultHandler { ...options, type: 'flows', id: 'id', + stripCreateFields: ['created_at', 'updated_at', 'executed_at'], + stripUpdateFields: ['created_at', 'updated_at', 'executed_at'], }); } @@ -69,6 +71,7 @@ export default class FlowHandler extends DefaultHandler { return this.existing; } + @order('60') async processChanges(assets: Assets): Promise { const { flows } = assets; diff --git a/src/tools/auth0/handlers/forms.ts b/src/tools/auth0/handlers/forms.ts index 7f98fb07..6734a9ff 100644 --- a/src/tools/auth0/handlers/forms.ts +++ b/src/tools/auth0/handlers/forms.ts @@ -4,7 +4,7 @@ import { PostForms201Response, } from 'auth0'; import dotProp from 'dot-prop'; -import DefaultHandler from './default'; +import DefaultHandler, { order } from './default'; import log from '../../../logger'; import { Asset, Assets, CalculatedChanges } from '../../../types'; import { paginate } from '../client'; @@ -128,6 +128,7 @@ export default class FormsHandler extends DefaultHandler { return forms; } + @order('70') async processChanges(assets: Assets): Promise { const { forms } = assets; diff --git a/test/tools/auth0/handlers/flowVaultConnections.tests.js b/test/tools/auth0/handlers/flowVaultConnections.tests.js index db2ae478..62be3702 100644 --- a/test/tools/auth0/handlers/flowVaultConnections.tests.js +++ b/test/tools/auth0/handlers/flowVaultConnections.tests.js @@ -15,6 +15,7 @@ const sampleFlowVaultConnections = { id: 'ac_9AXxPP59pJx5ZtA471cSAy', name: 'Sample Connection', app_id: 'HTTP', + account_name: 'Sample Account name', ready: false, };