diff --git a/.husky/pre-commit b/.husky/pre-commit index 11e9a358a..38477db2f 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,3 +1,6 @@ -#npm run docs -#git update-index --add docs/dist/documentation.md +echo "[PRE-COMMIT] Re-creating documentation..." +npm run docs +git update-index --add docs/dist/documentation.md + +echo "[PRE-COMMIT] Running lint-staged..." npx --no lint-staged diff --git a/docs/dist/documentation.md b/docs/dist/documentation.md index 656712476..685bc0a4f 100644 --- a/docs/dist/documentation.md +++ b/docs/dist/documentation.md @@ -189,6 +189,15 @@ Provides default functionality that can be overwritten by child metadata type cl
Mcdev.(cred, bu, type, [keyArr])Promise.<Array.<string>>

Updates the key to match the name field

+
Mcdev.(cred, bu, type, [keyArr], methodName)Promise.<Array.<string>>
+

A function to retrieve, update and deploy items

+
+
Mcdev.(type, metadataMap, methodName)Array.<string>
+

helper function to get keys of items to update

+
+
Mcdev.(cred, bu, type, [keyArr])Promise.<Array.<string>>
+

Updates notification email address field

+
Automation.(metadata)boolean

helper for postRetrieveTasks and execute

@@ -207,9 +216,15 @@ Provides default functionality that can be overwritten by child metadata type cl
Automation.(metadataMap, key)Promise.<void>

helper for postDeployTasks

+
Automation.(key, programId, notificationBody)string
+

helper function to send POST request to update notifications

+
Automation.(metadataMap, originalMetadataMap, key, [oldKey])Promise.<{key:string, response:object}>

helper for postDeployTasks

+
Automation.()Promise.<Array.<string>>
+

helper function to retrieve data about all automations in the BU

+
DataExtension.(upsertedMetadata, originalMetadata, createdUpdated)void

takes care of updating attribute groups on child BUs after an update to Shared DataExtensions helper for postDeployTasks @@ -544,6 +559,7 @@ main class * [.execute(businessUnit, [selectedType], [keys])](#Mcdev.execute) ⇒ Promise.<Object.<string, Array.<string>>> * [.pause(businessUnit, [selectedType], [keys])](#Mcdev.pause) ⇒ Promise.<Object.<string, Array.<string>>> * [.fixKeys(businessUnit, selectedType, [keys])](#Mcdev.fixKeys) ⇒ Promise.<Object.<string, Array.<string>>> + * [.updateNotifications(businessUnit, selectedType, [keys])](#Mcdev.updateNotifications) ⇒ Promise.<Object.<string, Array.<string>>> @@ -856,6 +872,20 @@ Updates the key to match the name field | selectedType | TYPE.SupportedMetadataTypes | limit to given metadata types | | [keys] | Array.<string> | customerkey of the metadata | + + +### Mcdev.updateNotifications(businessUnit, selectedType, [keys]) ⇒ Promise.<Object.<string, Array.<string>>> +Updates notification email address field + +**Kind**: static method of [Mcdev](#Mcdev) +**Returns**: Promise.<Object.<string, Array.<string>>> - key: business unit name, value: list of affected item keys + +| Param | Type | Description | +| --- | --- | --- | +| businessUnit | string | name of BU | +| selectedType | TYPE.SupportedMetadataTypes | limit execution to given metadata type | +| [keys] | Array.<string> | customerkey of the metadata | + ## Asset ⇐ [MetadataType](#MetadataType) @@ -1455,6 +1485,8 @@ Automation MetadataType * [.getFilesToCommit(keyArr)](#Automation.getFilesToCommit) ⇒ Array.<string> * [.deleteByKey(customerKey)](#Automation.deleteByKey) ⇒ boolean * [.postDeleteTasks(customerKey)](#Automation.postDeleteTasks) ⇒ void + * [.updateNotifications(keys)](#Automation.updateNotifications) ⇒ Promise.<Array.<string>> + * [.clearNotifications(keys)](#Automation.clearNotifications) ⇒ Promise.<Array.<string>> @@ -1734,6 +1766,30 @@ clean up after deleting a metadata item | --- | --- | --- | | customerKey | string | Identifier of metadata item | + + +### Automation.updateNotifications(keys) ⇒ Promise.<Array.<string>> +A function to update automation email notifications + +**Kind**: static method of [Automation](#Automation) +**Returns**: Promise.<Array.<string>> - keys of the automations where notifications were updated + +| Param | Type | Description | +| --- | --- | --- | +| keys | string | metadata keys | + + + +### Automation.clearNotifications(keys) ⇒ Promise.<Array.<string>> +A function to remove automation email notifications and/or notes + +**Kind**: static method of [Automation](#Automation) +**Returns**: Promise.<Array.<string>> - keys of the automations where notifications were updated + +| Param | Type | Description | +| --- | --- | --- | +| keys | string | metadata keys | + ## Campaign ⇐ [MetadataType](#MetadataType) @@ -3034,6 +3090,7 @@ ImportFile MetadataType * [.update(importFile)](#ImportFile.update) ⇒ Promise * [.deploy(metadataMap, deployDir, retrieveDir)](#ImportFile.deploy) ⇒ Promise.<TYPE.MetadataTypeMap> * [.preDeployTasks(metadata)](#ImportFile.preDeployTasks) ⇒ Promise + * [.getKeysToSetNotifications(metadataMap)](#ImportFile.getKeysToSetNotifications) ⇒ Array.<string> * [.postRetrieveTasks(metadata)](#ImportFile.postRetrieveTasks) ⇒ TYPE.MetadataTypeItem * [.deleteByKey(customerKey)](#ImportFile.deleteByKey) ⇒ Promise.<boolean> @@ -3132,6 +3189,18 @@ prepares a import definition for deployment | --- | --- | --- | | metadata | TYPE.MetadataTypeItem | a single importDef | + + +### ImportFile.getKeysToSetNotifications(metadataMap) ⇒ Array.<string> +helper function to get a list of keys where notification email address should be updated + +**Kind**: static method of [ImportFile](#ImportFile) +**Returns**: Array.<string> - list of keys + +| Param | Type | Description | +| --- | --- | --- | +| metadataMap | TYPE.MetadataTypeMap | metadata mapped by their keyField | + ### ImportFile.postRetrieveTasks(metadata) ⇒ TYPE.MetadataTypeItem @@ -3464,6 +3533,8 @@ Provides default functionality that can be overwritten by child metadata type cl * [.readBUMetadataForType(readDir, [listBadKeys], [buMetadata])](#MetadataType.readBUMetadataForType) ⇒ object * [.getFilesToCommit(keyArr)](#MetadataType.getFilesToCommit) ⇒ Promise.<Array.<string>> * [.getKeysForFixing(metadataMap)](#MetadataType.getKeysForFixing) ⇒ Array.<string> + * [.getKeysToSetNotifications(metadataMap)](#MetadataType.getKeysToSetNotifications) ⇒ Array.<string> + * [.updateNotifications()](#MetadataType.updateNotifications) ⇒ Array.<string> @@ -4317,6 +4388,25 @@ additionally, the documentation for dataExtension and automation should be retur | --- | --- | --- | | metadataMap | TYPE.MetadataTypeMap | metadata mapped by their keyField | + + +### MetadataType.getKeysToSetNotifications(metadataMap) ⇒ Array.<string> +Abstract function to get a list of keys where notification email address should be updated + +**Kind**: static method of [MetadataType](#MetadataType) +**Returns**: Array.<string> - list of keys + +| Param | Type | Description | +| --- | --- | --- | +| metadataMap | TYPE.MetadataTypeMap | metadata mapped by their keyField | + + + +### MetadataType.updateNotifications() ⇒ Array.<string> +Abstract updateNotifications method that needs to be implemented in child metadata type + +**Kind**: static method of [MetadataType](#MetadataType) +**Returns**: Array.<string> - returns keys of items where notification email address was set ## MobileCode ⇐ [MetadataType](#MetadataType) @@ -6344,6 +6434,7 @@ CLI helper class * [Cli](#Cli) * [.initMcdevConfig()](#Cli.initMcdevConfig) ⇒ Promise.<boolean> * [.addExtraCredential(properties)](#Cli.addExtraCredential) ⇒ Promise.<(boolean\|string)> + * [.updateNotificationEmails(noteType)](#Cli.updateNotificationEmails) ⇒ Promise.<Array.<string>> * [.postFixKeysReretrieve(type, dependentTypes)](#Cli.postFixKeysReretrieve) ⇒ Promise.<boolean> * [.logExistingCredentials(properties)](#Cli.logExistingCredentials) ⇒ void * [.updateCredential(properties, credName)](#Cli.updateCredential) ⇒ Promise.<boolean> @@ -6375,6 +6466,18 @@ Extends template file for properties.json | --- | --- | --- | | properties | TYPE.Mcdevrc | config file's json | + + +### Cli.updateNotificationEmails(noteType) ⇒ Promise.<Array.<string>> +interactive helper to set automation run completion/error note + +**Kind**: static method of [Cli](#Cli) +**Returns**: Promise.<Array.<string>> - responses + +| Param | Type | Description | +| --- | --- | --- | +| noteType | TYPE.SupportedMetadataTypes | note type (error/completion) | + ### Cli.postFixKeysReretrieve(type, dependentTypes) ⇒ Promise.<boolean> @@ -7759,6 +7862,7 @@ Util that contains logger and simple util methods * [.isFalse(attrValue)](#Util.isFalse) ⇒ boolean * [._isValidType(selectedType, [handleOutside])](#Util._isValidType) ⇒ boolean * [.getTypeAndSubType(selectedType)](#Util.getTypeAndSubType) ⇒ Array.<string> + * [.isEmailValid(email)](#Util.isEmailValid) ⇒ boolean * [.getRetrieveTypeChoices()](#Util.getRetrieveTypeChoices) ⇒ Array.<TYPE.SupportedMetadataTypes> * [._createNewLoggerTransport([noLogFile])](#Util._createNewLoggerTransport) ⇒ object * [.startLogger([restart], [noLogFile])](#Util.startLogger) ⇒ void @@ -7912,6 +8016,18 @@ helper that deals with extracting type and subtype | --- | --- | --- | | selectedType | string | "type" or "type-subtype" | + + +### Util.isEmailValid(email) ⇒ boolean +helper that validates email address + +**Kind**: static method of [Util](#Util) +**Returns**: boolean - first elem is type, second elem is subType + +| Param | Type | Description | +| --- | --- | --- | +| email | string | email to validate | + ### Util.getRetrieveTypeChoices() ⇒ Array.<TYPE.SupportedMetadataTypes> @@ -8210,7 +8326,7 @@ run a method across BUs | Param | Type | Description | | --- | --- | --- | -| methodName | 'execute' \| 'pause' \| 'fixKeys' | what to run | +| methodName | 'execute' \| 'pause' \| 'fixKeys' \| 'updateNotifications' | what to run | | businessUnit | string | name of BU | | [selectedType] | TYPE.SupportedMetadataTypes | limit to given metadata types | | [keys] | Array.<string> | customerkey of the metadata | @@ -8225,7 +8341,7 @@ helper for [Mcdev.#runMethod](Mcdev.#runMethod) | Param | Type | Description | | --- | --- | --- | -| methodName | 'execute' \| 'pause' \| 'fixKeys' | what to run | +| methodName | 'execute' \| 'pause' \| 'fixKeys' \| 'updateNotifications' | what to run | | cred | string | name of Credential | | bu | string | name of BU | | [type] | TYPE.SupportedMetadataTypes | limit execution to given metadata type | @@ -8259,6 +8375,51 @@ Updates the key to match the name field | type | TYPE.SupportedMetadataTypes | limit execution to given metadata type | | [keyArr] | Array.<string> | customerkey of the metadata | + + +## Mcdev.(cred, bu, type, [keyArr], methodName) ⇒ Promise.<Array.<string>> +A function to retrieve, update and deploy items + +**Kind**: global function +**Returns**: Promise.<Array.<string>> - list of keys that were affected + +| Param | Type | Description | +| --- | --- | --- | +| cred | string | name of Credential | +| bu | string | name of BU | +| type | TYPE.SupportedMetadataTypes | limit execution to given metadata type | +| [keyArr] | Array.<string> | customerkey of the metadata | +| methodName | string | name of the function to execute | + + + +## Mcdev.(type, metadataMap, methodName) ⇒ Array.<string> +helper function to get keys of items to update + +**Kind**: global function +**Returns**: Array.<string> - list of keys + +| Param | Type | Description | +| --- | --- | --- | +| type | TYPE.SupportedMetadataTypes | limit execution to given metadata type | +| metadataMap | TYPE.MetadataTypeMap | metadata mapped by their keyField | +| methodName | string | name of the method to execute | + + + +## Mcdev.(cred, bu, type, [keyArr]) ⇒ Promise.<Array.<string>> +Updates notification email address field + +**Kind**: global function +**Returns**: Promise.<Array.<string>> - list of keys that were affected + +| Param | Type | Description | +| --- | --- | --- | +| cred | string | name of Credential | +| bu | string | name of BU | +| type | TYPE.SupportedMetadataTypes | limit execution to given metadata type | +| [keyArr] | Array.<string> | customerkey of the metadata | + ## Automation.(metadata) ⇒ boolean @@ -8334,6 +8495,20 @@ helper for [postDeployTasks](#Automation.postDeployTasks) +## Automation.(key, programId, notificationBody) ⇒ string +helper function to send POST request to update notifications + +**Kind**: global function +**Returns**: string - returns "OK" or "Error" + +| Param | Type | Description | +| --- | --- | --- | +| key | string | current customer key | +| programId | string | legacy automation id | +| notificationBody | string | notification payload | + + + ## Automation.(metadataMap, originalMetadataMap, key, [oldKey]) ⇒ Promise.<{key:string, response:object}> helper for [postDeployTasks](#Automation.postDeployTasks) @@ -8347,6 +8522,13 @@ helper for [postDeployTasks](#Automation.postDeployTasks) | key | string | current customer key | | [oldKey] | string | old customer key before fixKey / changeKeyValue / changeKeyField | + + +## Automation.() ⇒ Promise.<Array.<string>> +helper function to retrieve data about all automations in the BU + +**Kind**: global function +**Returns**: Promise.<Array.<string>> - returns data about automations with the legacy key ## DataExtension.(upsertedMetadata, originalMetadata, createdUpdated) ⇒ void diff --git a/lib/cli.js b/lib/cli.js index 1e5229744..07257c902 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -560,6 +560,63 @@ yargs(hideBin(process.argv)) Mcdev.fixKeys(argv.BU, argv.TYPE, csvToArray(argv.KEY)); }, }) + .command({ + command: 'updateNotifications [KEY]', + aliases: ['un'], + desc: 'bulk updates notification email addresses', + builder: (yargs) => { + yargs + .positional('BU', { + type: 'string', + describe: 'the business unit where to update notification email address', + }) + .positional('TYPE', { + type: 'string', + describe: 'metadata type', + }) + .positional('KEY', { + type: 'string', + describe: 'key(s) of the metadata component(s)', + }) + .option('errorEmail', { + type: 'string', + group: 'Options for updateNotifications:', + describe: 'email to notify that an error occured during execution', + }) + .option('completionEmail', { + type: 'string', + group: 'Options for updateNotifications:', + describe: 'email to notify about successfull completion', + }) + .option('errorNote', { + type: 'string', + group: 'Options for updateNotifications:', + describe: 'run error note', + }) + .option('completionNote', { + type: 'string', + group: 'Options for updateNotifications:', + describe: 'run completion note', + }) + .option('clear', { + type: 'string', + group: 'Options for updateNotifications:', + describe: + "remove notification email addresses and/or notes. Possible options: 'all', 'errorEmail', 'completionEmail', 'notes' for automation. For the rest of types any value would do (true/all/etc.)", + }) + .option('like', { + type: 'string', + group: 'Options for updateNotifications:', + describe: + 'filter metadata components (can include % as wildcard or _ for a single character)', + }); + }, + handler: (argv) => { + Mcdev.setOptions(argv); + // ! do not allow multiple types to be passed in here via csvToArray + Mcdev.updateNotifications(argv.BU, argv.TYPE, csvToArray(argv.KEY)); + }, + }) .command({ command: 'upgrade', aliases: ['up'], diff --git a/lib/index.js b/lib/index.js index 01e553142..d01296e3c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -73,6 +73,11 @@ class Mcdev { '_runningTest', 'schedule', 'skipInteraction', + 'errorEmail', + 'completionEmail', + 'errorNote', + 'completionNote', + 'clear', ]; for (const option of knownOptions) { if (argv[option] !== undefined) { @@ -798,7 +803,7 @@ class Mcdev { /** * run a method across BUs * - * @param {'execute'|'pause'|'fixKeys'} methodName what to run + * @param {'execute'|'pause'|'fixKeys'|'updateNotifications'} methodName what to run * @param {string} businessUnit name of BU * @param {TYPE.SupportedMetadataTypes} [selectedType] limit to given metadata types * @param {string[]} [keys] customerkey of the metadata @@ -834,6 +839,13 @@ class Mcdev { checkMetadataSupport = false; break; } + case 'updateNotifications': { + lang_past = 'updated notifications for'; + lang_present = 'updating notifications for'; + requireKeyOrLike = true; + checkMetadataSupport = false; + break; + } } Util.logger.info(`mcdev:: ${methodName} ${selectedType}`); @@ -961,7 +973,7 @@ class Mcdev { /** * helper for {@link Mcdev.#runMethod} * - * @param {'execute'|'pause'|'fixKeys'} methodName what to run + * @param {'execute'|'pause'|'fixKeys'|'updateNotifications'} methodName what to run * @param {string} cred name of Credential * @param {string} bu name of BU * @param {TYPE.SupportedMetadataTypes} [type] limit execution to given metadata type @@ -999,6 +1011,21 @@ class Mcdev { break; } } + case 'updateNotifications': { + if (Object.prototype.hasOwnProperty.call(MetadataTypeInfo[type], methodName)) { + resultArr.push(...(await MetadataTypeInfo[type][methodName](keyArr))); + if (resultArr.length > 0) { + Util.logger.info(`Retrieving ${type} to have most recent changes`); + const retriever = new Retriever(properties, buObject); + await retriever.retrieve([type], resultArr, null, false); + } + } else { + resultArr.push( + ...(await this.#updateNotifications(cred, bu, type, keyArr)) + ); + } + break; + } default: { if (Util.OPTIONS.like && Object.keys(Util.OPTIONS.like).length) { keyArr = await this.#retrieveKeysWithLike(type, buObject); @@ -1012,7 +1039,6 @@ class Mcdev { } catch (ex) { Util.logger.errorStack(ex, 'mcdev.' + methodName + ' failed'); } - return resultArr; } @@ -1092,16 +1118,71 @@ class Mcdev { static async #fixKeys(cred, bu, type, keyArr) { const properties = await config.getProperties(); let actuallyFixedKeys = []; - const resultArr = []; - if ( MetadataTypeDefinitions[type].keyIsFixed === true || MetadataTypeDefinitions[type].keyField === MetadataTypeDefinitions[type].idField ) { Util.logger.error(`Key cannot be updated for this type`); - return resultArr; + return actuallyFixedKeys; + } + const buObject = await Cli.getCredentialObject( + properties, + cred === null ? null : cred + '/' + bu, + null, + true + ); + this.setOptions({ + changeKeyField: MetadataTypeDefinitions[type].nameField, + fromRetrieve: true, + }); + actuallyFixedKeys = await this.#updateItems(cred, bu, type, keyArr, 'fixKeys'); + const dependentTypes = await Util.getDependentMetadata(type); + if (actuallyFixedKeys && actuallyFixedKeys.length) { + Util.logger.info( + `Successfully updated ${actuallyFixedKeys.length} key${ + actuallyFixedKeys.length === 1 ? '' : 's' + } of type ${type}` + ); + if (dependentTypes.length) { + Util.logger.warn( + `Please re-retrieve the following types as your local copies might now be outdated: ${Util.getGrayMsg( + dependentTypes.join(', ') + )}` + ); + const reRetrieve = await Cli.postFixKeysReretrieve(type, dependentTypes); + if (reRetrieve) { + Util.logger.info( + `Retrieving latest versions of ${dependentTypes.join(', ')} from server` + ); + const retriever = new Retriever(properties, buObject); + await retriever.retrieve(dependentTypes, null, null, false); + } + } else { + Util.logger.info( + `No dependent types found that need to be re-retrieved after fixing keys of type ${type}.` + ); + } + } else { + Util.logger.warn(`No keys of type ${type} updated.`); } + return actuallyFixedKeys; + } + /** + * A function to retrieve, update and deploy items + * + * @param {string} cred name of Credential + * @param {string} bu name of BU + * @param {TYPE.SupportedMetadataTypes} type limit execution to given metadata type + * @param {string[]} [keyArr] customerkey of the metadata + * @param {string} methodName name of the function to execute + * @returns {Promise.} list of keys that were affected + */ + static async #updateItems(cred, bu, type, keyArr, methodName) { + const properties = await config.getProperties(); + let actuallyUpdatedItems = []; + const resultArr = []; + const buObject = await Cli.getCredentialObject( properties, cred === null ? null : cred + '/' + bu, @@ -1114,55 +1195,108 @@ class Mcdev { const retrieved = await retriever.retrieve([type], keyArr, null, false); const metadataMap = Object.values(retrieved)[0][0]; - const keysForDeploy = MetadataTypeInfo[type].getKeysForFixing(metadataMap); + const keysForDeploy = await this.#getKeys(type, metadataMap, methodName); if (keysForDeploy.length < 1) { Util.logger.warn( `No items found with a key-name mismatch that match your criteria.\n` ); return resultArr; } - this.setOptions({ - changeKeyField: MetadataTypeDefinitions[type].nameField, - fromRetrieve: true, - }); const deployed = await Deployer.deploy(cred + '/' + bu, [type], keysForDeploy); - actuallyFixedKeys = Object.keys(Object.values(Object.values(deployed)[0])[0]); - resultArr.push(...actuallyFixedKeys); - const dependentTypes = await Util.getDependentMetadata(type); - if (actuallyFixedKeys && actuallyFixedKeys.length) { - Util.logger.info( - `Successfully updated ${actuallyFixedKeys.length} key${ - actuallyFixedKeys.length === 1 ? '' : 's' - } of type ${type}` - ); - if (dependentTypes.length) { - Util.logger.warn( - `Please re-retrieve the following types as your local copies might now be outdated: ${Util.getGrayMsg( - dependentTypes.join(', ') - )}` - ); - const reRetrieve = await Cli.postFixKeysReretrieve(type, dependentTypes); - if (reRetrieve) { - Util.logger.info( - `Retrieving latest versions of ${dependentTypes.join(', ')} from server` - ); - const retriever = new Retriever(properties, buObject); - await retriever.retrieve(dependentTypes, null, null, false); - } - } else { - Util.logger.info( - `No dependent types found that need to be re-retrieved after fixing keys of type ${type}.` - ); - } - } else { - Util.logger.warn(`No keys of type ${type} updated.`); - } + actuallyUpdatedItems = Object.keys(Object.values(Object.values(deployed)[0])[0]); + resultArr.push(...actuallyUpdatedItems); } catch (ex) { - Util.logger.errorStack(ex, 'mcdev.fixKeys failed'); + Util.logger.errorStack(ex, `mcdev.${methodName} failed`); } - Util.logger.info(`:: Done\n`); return resultArr; } + /** + * helper function to get keys of items to update + * + * @param {TYPE.SupportedMetadataTypes} type limit execution to given metadata type + * @param {TYPE.MetadataTypeMap} metadataMap metadata mapped by their keyField + * @param {string} methodName name of the method to execute + * @returns {string[]} list of keys + */ + static async #getKeys(type, metadataMap, methodName) { + const keys = []; + switch (methodName) { + case 'fixKeys': { + keys.push(...(await MetadataTypeInfo[type].getKeysForFixing(metadataMap))); + break; + } + case 'updateNotifications': { + keys.push(...(await MetadataTypeInfo[type].getKeysToSetNotifications(metadataMap))); + break; + } + } + return keys; + } + /** + * Updates notification email address field + * + * @param {string} businessUnit name of BU + * @param {TYPE.SupportedMetadataTypes} selectedType limit execution to given metadata type + * @param {string[]} [keys] customerkey of the metadata + * @returns {Promise.>} key: business unit name, value: list of affected item keys + */ + static async updateNotifications(businessUnit, selectedType, keys) { + if ( + !Util.OPTIONS.completionEmail && + !Util.OPTIONS.errorEmail && + !Util.OPTIONS.completionNote && + !Util.OPTIONS.errorNote && + !Util.OPTIONS.clear + ) { + // if no options were provided there is nothing to update + Util.logger.error(`No email addresses, run notes or a clear option was provided`); + return []; + } + + return await this.#runMethod('updateNotifications', businessUnit, selectedType, keys); + } + /** + * Updates notification email address field + * + * @param {string} cred name of Credential + * @param {string} bu name of BU + * @param {TYPE.SupportedMetadataTypes} type limit execution to given metadata type + * @param {string[]} [keyArr] customerkey of the metadata + * @returns {Promise.} list of keys that were affected + */ + static async #updateNotifications(cred, bu, type, keyArr) { + let keysUpdatedNotifications = []; + if (Util.OPTIONS.errorEmail || Util.OPTIONS.errorNote || Util.OPTIONS.completionNote) { + Util.logger.error( + `--errorEmail, --errorNote and --completionNote options are not available for ${type}` + ); + return keysUpdatedNotifications; + } + if (!MetadataTypeDefinitions[type].fields.sendEmailNotification) { + Util.logger.error(`Update notifications is not supported for this type`); + return keysUpdatedNotifications; + } + this.setOptions({ + fromRetrieve: true, + }); + keysUpdatedNotifications = await this.#updateItems( + cred, + bu, + type, + keyArr, + 'updateNotifications' + ); + if (keysUpdatedNotifications && keysUpdatedNotifications.length) { + Util.logger.info( + `Successfully updated notifications. Updated ${ + keysUpdatedNotifications.length + } key${keysUpdatedNotifications.length === 1 ? '' : 's'} of type ${type}` + ); + } else { + Util.logger.warn(`No keys of type ${type} updated.`); + } + return keysUpdatedNotifications; + } } export default Mcdev; diff --git a/lib/metadataTypes/Automation.js b/lib/metadataTypes/Automation.js index 8c33bcee6..7ddbeca78 100644 --- a/lib/metadataTypes/Automation.js +++ b/lib/metadataTypes/Automation.js @@ -7,6 +7,7 @@ import File from '../util/file.js'; import Definitions from '../MetadataTypeDefinitions.js'; import cache from '../util/cache.js'; import pLimit from 'p-limit'; +import Cli from '../util/cli.js'; /** * Automation MetadataType @@ -118,13 +119,7 @@ class Automation extends MetadataType { const foundKeys = Object.keys(metadataMap); // get encodedAutomationID to retrieve notification information - const iteratorBackup = this.definition.bodyIteratorField; - this.definition.bodyIteratorField = 'entry'; - const automationLegacyMapObj = await super.retrieveREST( - undefined, - `/legacy/v1/beta/bulk/automations/automation/definition/` - ); - this.definition.bodyIteratorField = iteratorBackup; + const automationLegacyMapObj = await this.#getEncodedAutomationIDs(); const automationLegacyMap = Object.keys(automationLegacyMapObj.metadata) .filter((key) => foundKeys.includes(key)) // ! using the `id` field to retrieve notifications does not work. instead one needs to use the URL in the `notifications` field @@ -248,17 +243,7 @@ class Automation extends MetadataType { const resultsConverted = {}; if (Array.isArray(results?.Results)) { // get encodedAutomationID to retrieve notification information - const keyBackup = this.definition.keyField; - const iteratorBackup = this.definition.bodyIteratorField; - this.definition.keyField = 'key'; - this.definition.bodyIteratorField = 'entry'; - const automationsLegacy = await super.retrieveREST( - undefined, - `/legacy/v1/beta/bulk/automations/automation/definition/` - ); - this.definition.keyField = keyBackup; - this.definition.bodyIteratorField = iteratorBackup; - + const automationsLegacy = await this.#getEncodedAutomationIDs(); // merge encodedAutomationID into results for (const m of results.Results) { const key = m.CustomerKey || m.key; @@ -964,7 +949,7 @@ class Automation extends MetadataType { await Automation.#scheduleAutomation(metadataMap, originalMetadataMap, key, oldKey); // need to update notifications separately if there are any - await Automation.#updateNotificationInfoREST(metadataMap, key); + await Automation.#updateNotificationInfo(metadataMap, key); // rewrite upsert to retrieve fields if (item.steps) { @@ -986,7 +971,7 @@ class Automation extends MetadataType { * @param {string} key current customer key * @returns {Promise.} - */ - static async #updateNotificationInfoREST(metadataMap, key) { + static async #updateNotificationInfo(metadataMap, key) { if (this.notificationUpdates[key]) { // create & update automation calls return programId as 'legacyId'; retrieve does not return it const programId = metadataMap[key]?.legacyId; @@ -1003,26 +988,38 @@ class Automation extends MetadataType { channelType: 'Account', })), }; - try { - const result = await this.client.rest.post( - '/legacy/v1/beta/automations/notifications/' + programId, - notificationBody - ); - if (result) { - // should be empty if all OK - throw new Error(result); - } - } catch (ex) { - Util.logger.error( - `Error updating notifications for automation '${metadataMap[key].name}': ${ex.message} (${ex.code}))` - ); - } - Util.logger.info( - Util.getGrayMsg( - ` - updated notifications for automation '${metadataMap[key].name}'` - ) - ); + this.#updateNotificationInfoREST(key, programId, notificationBody); + } + } + } + /** + * helper function to send POST request to update notifications + * + * @param {string} key current customer key + * @param {string} programId legacy automation id + * @param {string} notificationBody notification payload + * @returns {string} returns "OK" or "Error" + */ + static async #updateNotificationInfoREST(key, programId, notificationBody) { + try { + const result = await this.client.rest.post( + '/legacy/v1/beta/automations/notifications/' + programId, + notificationBody + ); + if (result) { + // should be empty if all OK + throw new Error(result); + } else { + Util.logger.info(`updated notifications for automation '${key}'`); + return 'OK'; } + } catch (ex) { + Util.logger.error( + ex.code === 'ERR_BAD_REQUEST' + ? `Error updating notifications for automation ${key}: ${ex.message} (${ex.code})). Make sure that the email address is correct.` + : `Error updating notifications for automation '${key}': ${ex.message} (${ex.code})).` + ); + return 'Error'; } } @@ -1607,6 +1604,349 @@ class Automation extends MetadataType { // delete local copy: retrieve/cred/bu/.../...-doc.md await super.postDeleteTasks(customerKey, [`${this.definition.type}-doc.md`]); } + /** + * helper function to retrieve data about all automations in the BU + * + * @returns {Promise.} returns data about automations with the legacy key + */ + static async #getEncodedAutomationIDs() { + const keyBackup = this.definition.keyField; + const iteratorBackup = this.definition.bodyIteratorField; + this.definition.keyField = 'key'; + this.definition.bodyIteratorField = 'entry'; + const automationLegacyKeys = await super.retrieveREST( + undefined, + `/legacy/v1/beta/bulk/automations/automation/definition/` + ); + this.definition.keyField = keyBackup; + this.definition.bodyIteratorField = iteratorBackup; + return automationLegacyKeys; + } + /** + * A function to update automation email notifications + * + * @param {string} keys metadata keys + * @returns {Promise.} keys of the automations where notifications were updated + */ + static async updateNotifications(keys) { + const updatedKeys = []; + if (Util.OPTIONS.clear) { + updatedKeys.push(...(await this.clearNotifications(keys))); + return updatedKeys; + } + let completionEmail = [], + errorEmail = [], + notificationsResult, + oldCompletionEmails, + oldCompletionNote, + oldErrorEmails, + oldErrorNote; + + if (Util.OPTIONS.completionEmail) { + completionEmail = Util.OPTIONS.completionEmail.split(','); + } + if (Util.OPTIONS.errorEmail) { + errorEmail = Util.OPTIONS.errorEmail.split(','); + } + let completionNote = Util.OPTIONS.completionNote; + let errorNote = Util.OPTIONS.errorNote; + + let shouldUpdateCompletion = + (completionNote && completionNote.length > 0) || completionEmail.length > 0 + ? true + : false; + let shouldUpdateError = + (errorNote && errorNote.length > 0) || errorEmail.length > 0 ? true : false; + + const automationLegacyMapObj = await this.#getEncodedAutomationIDs(); // retrieve automation legacy keys to update notifications + for (const key of Object.keys(automationLegacyMapObj.metadata)) { + // create payload + const notificationBody = { + programId: automationLegacyMapObj.metadata[key].id, + workers: [], + }; + + if (Array.isArray(keys) && keys.includes(key)) { + try { + notificationsResult = await this.client.rest.get( + '/legacy/v1/beta/automations/notifications/' + + automationLegacyMapObj.metadata[key].id + ); + } catch (ex) { + Util.logger.error( + `Error retrieving notifications for automation '${key}': ${ex.message} (${ex.code}))` + ); + } + // if a note was provided and email address was not - check if notif email address exists + if ( + completionNote && + completionEmail.length === 0 && + (!notificationsResult.workers || + !notificationsResult.workers.find( + (notification) => notification.notificationType == 'Complete' + )) + ) { + const emails = await Cli.updateNotificationEmails('completionEmail'); + if (emails) { + // merge the string input into completionEmail array + completionEmail = completionEmail.concat(emails.split(',')); + } else { + completionNote = undefined; + shouldUpdateCompletion = false; + Util.logger.info( + ` ☇ skipping --completionNote' - the email address for Run completion was not set` + ); + } + } + // same for errorNote + if ( + errorNote && + errorEmail.length === 0 && + (!notificationsResult.workers || + !notificationsResult.workers.find( + (notification) => notification.notificationType == 'Error' + )) + ) { + const emails = await Cli.updateNotificationEmails('errorEmail'); + if (emails) { + // merge the string input into errorEmail array + errorEmail = errorEmail.concat(emails.split(',')); + } else { + errorNote = undefined; + shouldUpdateError = false; + Util.logger.info( + ` ☇ skipping --errorNote' - the email address for Runtime error was not set` + ); + } + } + + // check if there are any notifications set + if (Array.isArray(notificationsResult?.workers)) { + // if the parameters provided are the same as the email addresses/notes already in the notifications - skip this automation + oldCompletionEmails = notificationsResult.workers + .filter((notification) => notification.notificationType == 'Complete') + .map((notification) => notification.definition); + oldCompletionNote = notificationsResult.workers.find( + (notification) => notification.notificationType == 'Complete' + )?.body; + for (const email of completionEmail) { + if (oldCompletionEmails.includes(email) || !Util.isEmailValid(email)) { + Util.logger.info( + ` ☇ skipping ${email}- this email address is already in the notifications or is not a valid email` + ); + completionEmail.splice(completionEmail.indexOf(email), 1); + } + } + // if old note is the same as the one that the user provided - no need to update + if (oldCompletionNote == completionNote) { + completionNote = null; + } + oldErrorEmails = notificationsResult.workers + .filter((notification) => notification.notificationType == 'Error') + .map((notification) => notification.definition); + oldErrorNote = notificationsResult.workers.find( + (notification) => notification.notificationType == 'Error' + )?.body; + for (const email of errorEmail) { + if (oldErrorEmails.includes(email) || !Util.isEmailValid(email)) { + Util.logger.info( + ` ☇ skipping ${email}- this email address is already in the notifications or is not a valid email` + ); + errorEmail.splice(errorEmail.indexOf(email), 1); + } + } + // if old note is the same as the one that the user provided - no need to update + if (oldErrorNote == errorNote) { + errorNote = null; + } + + // earlier we have removed email addresses that are already in the notifications and verified that the new note is different from the one user provided. + if (completionEmail.length < 1 && !completionNote) { + shouldUpdateCompletion = false; + } + if (errorEmail.length < 1 && !errorNote) { + shouldUpdateError = false; + } + if (!shouldUpdateCompletion && !shouldUpdateError) { + Util.logger.info( + `You have provided email addresses that are already in the automation notification. The notes didn't change either. Exiting..` + ); + return updatedKeys; + } + // copy existing notifications into payload + if (notificationsResult.workers) { + notificationBody.workers = notificationsResult.workers; + } + } + // if new note is null then keep the old one only update emails + if (!completionNote) { + completionNote = oldCompletionNote; + } + // completionEmail is an array even if there is only one email + if (completionEmail.length > 0) { + for (const email of completionEmail) { + if (Util.isEmailValid(email)) { + notificationBody.workers.push({ + programId: automationLegacyMapObj.metadata[key].id, + notificationType: 'Complete', + definition: email, + body: completionNote, + channelType: 'Account', + }); + } else { + Util.logger.info( + ` ☇ skipping ${email}- this email address is not a valid email` + ); + } + } + } else { + // no emails to update, only update the note + + for (const notification of notificationBody.workers) { + if (notification.notificationType == 'Complete') { + notificationBody.workers.map( + (notification) => (notification.body = completionNote) + ); + } + } + } + if (!errorNote) { + errorNote = oldErrorNote; + } + if (errorEmail.length > 0) { + for (const email of errorEmail) { + if (Util.isEmailValid(email)) { + notificationBody.workers.push({ + programId: automationLegacyMapObj.metadata[key].id, + notificationType: 'Error', + definition: email, + body: errorNote, + channelType: 'Account', + }); + } else { + Util.logger.info( + ` ☇ skipping ${email}- this email address is not a valid email` + ); + } + } + } else { + for (const notification of notificationBody.workers) { + if (notification.notificationType == 'Error') { + notificationBody.workers.map( + (notification) => (notification.body = errorNote) + ); + } + } + } + if ( + notificationBody.workers && + notificationBody.workers.length > 0 && + (await this.#updateNotificationInfoREST( + key, + automationLegacyMapObj.metadata[key].id, + notificationBody + )) === 'OK' + ) { + updatedKeys.push(key); + } + } + } + + return updatedKeys; + } + /** + * A function to remove automation email notifications and/or notes + * + * @param {string} keys metadata keys + * @returns {Promise.} keys of the automations where notifications were updated + */ + static async clearNotifications(keys) { + const clear = Util.OPTIONS.clear.toLowerCase(); + const automationLegacyMapObj = await this.#getEncodedAutomationIDs(); // retrieve automation legacy keys to update notifications + const updatedKeys = []; + let notificationsResult; + for (const key of Object.keys(automationLegacyMapObj.metadata)) { + if (Array.isArray(keys) && keys.includes(key)) { + let notificationBody; + notificationBody = { + programId: automationLegacyMapObj.metadata[key].id, + workers: [], + }; + try { + notificationsResult = await this.client.rest.get( + '/legacy/v1/beta/automations/notifications/' + + automationLegacyMapObj.metadata[key].id + ); + } catch (ex) { + Util.logger.error( + `Error retrieving notifications for automation '${key}': ${ex.message} (${ex.code}))` + ); + } + if (!notificationsResult.workers) { + Util.logger.info( + `☇ skipping automation ${key}. No notifications set for this automation.'` + ); + continue; + } + switch (clear) { + case 'all': { + notificationBody = { + programId: automationLegacyMapObj.metadata[key].id, + }; + Util.logger.info( + `--clear=all option was provided. Removing all emails and notes'` + ); + break; + } + case 'erroremail': { + for (const notification of notificationsResult.workers) { + if (notification.notificationType == 'Complete') { + notificationBody.workers.push(notification); + } + } + Util.logger.info( + `--clear=erroremail option was provided. Removing all error emails and notes'` + ); + break; + } + case 'completionemail': { + for (const notification of notificationsResult.workers) { + if (notification.notificationType == 'Error') { + notificationBody.workers.push(notification); + } + } + Util.logger.info( + `--clear=completionemail option was provided. Removing all completion emails and notes'` + ); + break; + } + case 'notes': { + // removes only notes (completion and error) + notificationsResult.workers.map((notification) => (notification.body = '')); + notificationBody.workers = notificationsResult.workers; + Util.logger.info(`--clear=notes option was provided. Removing all notes'`); + break; + } + default: { + Util.logger.error(`Unknown --clear option. Exiting'`); + return updatedKeys; + } + } + // update notifications + if ( + (await this.#updateNotificationInfoREST( + key, + automationLegacyMapObj.metadata[key].id, + notificationBody + )) === 'OK' + ) { + Util.logger.info(`clearNotifications executed for automation '${key}'`); + updatedKeys.push(key); + } + } + } + return updatedKeys; + } } // Assign definition to static attributes diff --git a/lib/metadataTypes/ImportFile.js b/lib/metadataTypes/ImportFile.js index 22225a828..4979da5cb 100644 --- a/lib/metadataTypes/ImportFile.js +++ b/lib/metadataTypes/ImportFile.js @@ -273,7 +273,9 @@ class ImportFile extends MetadataType { metadata.keyword = keywordObj; } else { Util.logger.error( - ` - importFile ${metadata[this.definition.keyField]}: No code or keyword info found. Please re-download this from the source.` + ` - importFile ${ + metadata[this.definition.keyField] + }: No code or keyword info found. Please re-download this from the source.` ); } @@ -315,8 +317,52 @@ class ImportFile extends MetadataType { metadata.subscriberImportTypeId = this.definition.subscriberImportTypeMapping[metadata.c__subscriberImportType]; metadata.updateTypeId = this.definition.updateTypeMapping[metadata.c__dataAction]; + + // logic for mcdev.updateNotifications + if (Util.OPTIONS.clear) { + metadata.sendEmailNotification = false; + metadata.notificationEmailAddress = ''; + } else if (Util.OPTIONS.completionEmail) { + metadata.sendEmailNotification = true; + metadata.notificationEmailAddress = Util.OPTIONS.completionEmail; + } + return metadata; } + /** + * helper function to get a list of keys where notification email address should be updated + * + * @param {TYPE.MetadataTypeMap} metadataMap metadata mapped by their keyField + * @returns {string[]} list of keys + */ + static async getKeysToSetNotifications(metadataMap) { + const keysForDeploy = []; + if (Object.keys(metadataMap).length) { + Util.logger.info( + `Searching for ${this.definition.type}s among downloaded items where notification email address should be updated:` + ); + for (const item of Object.values(metadataMap)) { + if (item['notificationEmailAddress'] === Util.OPTIONS.completionEmail) { + Util.logger.verbose( + ` ☇ skipping ${this.definition.type} ${ + item[this.definition.keyField] + }: email address does not need to be updated` + ); + } else { + keysForDeploy.push(item[this.definition.keyField]); + Util.logger.info( + ` - added ${this.definition.type} to updateNotification queue: ${ + item[this.definition.keyField] + }` + ); + } + } + Util.logger.info( + `Found ${keysForDeploy.length} ${this.definition.type}s to update email notification address` + ); + } + return keysForDeploy; + } /** * manages post retrieve steps diff --git a/lib/metadataTypes/MetadataType.js b/lib/metadataTypes/MetadataType.js index bea4107c7..681e7baf4 100644 --- a/lib/metadataTypes/MetadataType.js +++ b/lib/metadataTypes/MetadataType.js @@ -2170,6 +2170,29 @@ class MetadataType { } return keysForDeploy; } + /** + * Abstract function to get a list of keys where notification email address should be updated + * + * @param {TYPE.MetadataTypeMap} metadataMap metadata mapped by their keyField + * @returns {string[]} list of keys + */ + static async getKeysToSetNotifications(metadataMap) { + Util.logger.error( + ` ☇ skipping ${this.definition.type}: getKeysToSetNotifications is not supported yet for ${this.definition.type}` + ); + return []; + } + /** + * Abstract updateNotifications method that needs to be implemented in child metadata type + * + * @returns {string[]} returns keys of items where notification email address was set + */ + static async updateNotifications() { + Util.logger.error( + ` ☇ skipping ${this.definition.type}: updateNotifications is not supported yet for ${this.definition.type}` + ); + return []; + } } MetadataType.definition = { diff --git a/lib/util/cli.js b/lib/util/cli.js index cceeb4616..b120bf144 100644 --- a/lib/util/cli.js +++ b/lib/util/cli.js @@ -55,7 +55,48 @@ const Cli = { return null; } }, - + /** + * interactive helper to set automation run completion/error note + * + * @param {TYPE.SupportedMetadataTypes} noteType note type (error/completion) + * @returns {Promise.} responses + */ + async updateNotificationEmails(noteType) { + const questions = []; + questions.push( + { + type: 'confirm', + name: 'provideEmail', + message: `To set run ${noteType} note, an email address should be set. Do you want to set it?`, + default: false, + }, + { + type: 'input', + name: 'updateNotificationNotes', + message: `Please enter email addresses separated by a comma:`, + // eslint-disable-next-line jsdoc/require-jsdoc + filter: function (emails) { + return emails + .split(',') + .map((email) => { + if (!Util.isEmailValid(email)) { + Util.logger.info(` ☇ skipping ${email}' - invalid email address`); + } + return email.trim(); + }) + .filter((email) => Util.isEmailValid(email)); + }, + } + ); + try { + if (!(await inquirer.prompt(questions[0])).provideEmail) { + return; + } + return (await inquirer.prompt(questions[1])).updateNotificationNotes; + } catch (ex) { + Util.logger.info(ex); + } + }, /** * * @param {TYPE.SupportedMetadataTypes} type limit execution to given metadata type diff --git a/lib/util/util.js b/lib/util/util.js index 25dfe15c1..29b329680 100644 --- a/lib/util/util.js +++ b/lib/util/util.js @@ -202,6 +202,18 @@ export const Util = { return []; } }, + /** + * helper that validates email address + * + * @param {string} email email to validate + * @returns {boolean} first elem is type, second elem is subType + */ + isEmailValid(email) { + const regex = new RegExp( + "^([!#-'*+/-9=?A-Z^-~-]+(.[!#-'*+/-9=?A-Z^-~-]+)*|\"([]!#-[^-~ \\t]|(\\[\\t -~]))+\")@([!#-'*+/-9=?A-Z^-~-]+(.[!#-'*+/-9=?A-Z^-~-]+)*|[[\\t -Z^-~]*])$" + ); + return regex.test(email); + }, /** * helper for getDefaultProperties() diff --git a/package.json b/package.json index 1ffd52583..fc453b147 100644 --- a/package.json +++ b/package.json @@ -111,9 +111,7 @@ }, "lint-staged": { "*.{js,jsx,ts,tsx}": [ - "eslint --fix", - "npm run docs", - "git update-index --add docs/dist/documentation.md" + "eslint --fix" ] }, "type": "module" diff --git a/test/mockRoot/deploy/testInstance/testBU/importFile/testExisting_importFile_updateNotifications.importFile-meta.json b/test/mockRoot/deploy/testInstance/testBU/importFile/testExisting_importFile_updateNotifications.importFile-meta.json new file mode 100644 index 000000000..1e041b354 --- /dev/null +++ b/test/mockRoot/deploy/testInstance/testBU/importFile/testExisting_importFile_updateNotifications.importFile-meta.json @@ -0,0 +1,30 @@ +{ + "allowErrors": true, + "createdDate": "2022-11-09T05:32:30.533", + "customerKey": "testExisting_importFile_updateNotifications", + "dateFormatLocale": "en-US", + "deleteFile": false, + "description": "updated on deploy", + "fieldMappingType": "InferFromColumnHeadings", + "fieldMappings": [], + "fileNamingPattern": "blabla", + "fileTransferLocationTypeId": 0, + "fileType": "CSV", + "filter": "", + "hasColumnHeader": true, + "isOrderedImport": true, + "isSequential": true, + "maxFileAgeHours": 0, + "maxFileAgeScheduleOffsetHours": 0, + "maxImportFrequencyHours": 0, + "modifiedDate": "2022-11-17T07:13:03.95", + "name": "testExisting_importFile_updateNotifications", + "sendEmailNotification": true, + "notificationEmailAddress": "test@test.com", + "standardQuotedStrings": true, + "r__fileLocation_name": "ExactTarget Enhanced FTP", + "c__destinationType": "DataExtension", + "r__dataExtension_CustomerKey": "testExisting_dataExtension", + "c__subscriberImportType": "DataExtension", + "c__dataAction": "AddUpdate" +} diff --git a/test/resourceFactory.js b/test/resourceFactory.js index e9141d0a9..216da713a 100644 --- a/test/resourceFactory.js +++ b/test/resourceFactory.js @@ -340,7 +340,11 @@ export const handleRESTRequest = async (config) => { } else { /* eslint-disable no-console */ console.log( - `${color.bgRed}${color.fgBlack}TEST-ERROR${color.reset}: Please create file ${testPath}.json/.txt${filterName ? ` or ${testPathFilter}.json/.txt` : ''}` + `${color.bgRed}${color.fgBlack}TEST-ERROR${ + color.reset + }: Please create file ${testPath}.json/.txt${ + filterName ? ` or ${testPathFilter}.json/.txt` : '' + }` ); /* eslint-enable no-console */ process.exitCode = 404; diff --git a/test/resources/9999999/automation/clearNotificationsAll-expected.json b/test/resources/9999999/automation/clearNotificationsAll-expected.json new file mode 100644 index 000000000..7ee326e5c --- /dev/null +++ b/test/resources/9999999/automation/clearNotificationsAll-expected.json @@ -0,0 +1,45 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_clearNotificationsAll", + "name": "testExisting_automation_clearNotificationsAll", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled" +} diff --git a/test/resources/9999999/automation/clearNotificationsCompletionEmail-expected.json b/test/resources/9999999/automation/clearNotificationsCompletionEmail-expected.json new file mode 100644 index 000000000..11f0eaab0 --- /dev/null +++ b/test/resources/9999999/automation/clearNotificationsCompletionEmail-expected.json @@ -0,0 +1,52 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_clearNotificationsCompletionEmail", + "name": "testExisting_automation_clearNotificationsCompletionEmail", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/clearNotificationsErrorEmail-expected.json b/test/resources/9999999/automation/clearNotificationsErrorEmail-expected.json new file mode 100644 index 000000000..11141755c --- /dev/null +++ b/test/resources/9999999/automation/clearNotificationsErrorEmail-expected.json @@ -0,0 +1,52 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_clearNotificationsErrorEmail", + "name": "testExisting_automation_clearNotificationsErrorEmail", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + } + ] +} diff --git a/test/resources/9999999/automation/clearNotificationsNotes-expected.json b/test/resources/9999999/automation/clearNotificationsNotes-expected.json new file mode 100644 index 000000000..52b46bc9a --- /dev/null +++ b/test/resources/9999999/automation/clearNotificationsNotes-expected.json @@ -0,0 +1,57 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_clearNotificationsNotes", + "name": "testExisting_automation_clearNotificationsNotes", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_completionEmailCompletionNote-expected.json b/test/resources/9999999/automation/updateNotifications_completionEmailCompletionNote-expected.json new file mode 100644 index 000000000..235f4e9f3 --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_completionEmailCompletionNote-expected.json @@ -0,0 +1,52 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_completionEmailCompletionNote", + "name": "testExisting_automation_updateNotifications_completionEmailCompletionNote", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_completionEmailCompletionNoteErrorNote-expected.json b/test/resources/9999999/automation/updateNotifications_completionEmailCompletionNoteErrorNote-expected.json new file mode 100644 index 000000000..6c7067aae --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_completionEmailCompletionNoteErrorNote-expected.json @@ -0,0 +1,57 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote", + "name": "testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_completionEmailErrorNote-expected.json b/test/resources/9999999/automation/updateNotifications_completionEmailErrorNote-expected.json new file mode 100644 index 000000000..5ebc17a06 --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_completionEmailErrorNote-expected.json @@ -0,0 +1,57 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_completionEmailErrorNote", + "name": "testExisting_automation_updateNotifications_completionEmailErrorNote", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_completionEmailNoteErrorEmailNote-expected.json b/test/resources/9999999/automation/updateNotifications_completionEmailNoteErrorEmailNote-expected.json new file mode 100644 index 000000000..0a0587f0c --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_completionEmailNoteErrorEmailNote-expected.json @@ -0,0 +1,57 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote", + "name": "testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_completionNote-expected.json b/test/resources/9999999/automation/updateNotifications_completionNote-expected.json new file mode 100644 index 000000000..20a18d58d --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_completionNote-expected.json @@ -0,0 +1,52 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_completionNote", + "name": "testExisting_automation_updateNotifications_completionNote", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_errorEmailCompletionEmail-expected.json b/test/resources/9999999/automation/updateNotifications_errorEmailCompletionEmail-expected.json new file mode 100644 index 000000000..2a901d1f4 --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_errorEmailCompletionEmail-expected.json @@ -0,0 +1,57 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionEmail", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionEmail", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_errorEmailCompletionEmailCompletionNote-expected.json b/test/resources/9999999/automation/updateNotifications_errorEmailCompletionEmailCompletionNote-expected.json new file mode 100644 index 000000000..75224592c --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_errorEmailCompletionEmailCompletionNote-expected.json @@ -0,0 +1,57 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionEmailErrorNote", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionEmailErrorNote", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_errorEmailCompletionEmailErrorNote-expected.json b/test/resources/9999999/automation/updateNotifications_errorEmailCompletionEmailErrorNote-expected.json new file mode 100644 index 000000000..7c469942a --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_errorEmailCompletionEmailErrorNote-expected.json @@ -0,0 +1,57 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionEmailErrorNote", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionEmailErrorNote", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_errorEmailCompletionNote-expected.json b/test/resources/9999999/automation/updateNotifications_errorEmailCompletionNote-expected.json new file mode 100644 index 000000000..25beedde8 --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_errorEmailCompletionNote-expected.json @@ -0,0 +1,57 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionNote", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionNote", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_errorEmailCompletionNoteCompletionEmail-expected.json b/test/resources/9999999/automation/updateNotifications_errorEmailCompletionNoteCompletionEmail-expected.json new file mode 100644 index 000000000..86fd6aed4 --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_errorEmailCompletionNoteCompletionEmail-expected.json @@ -0,0 +1,57 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_errorEmailCompletionNoteErrorNote-expected.json b/test/resources/9999999/automation/updateNotifications_errorEmailCompletionNoteErrorNote-expected.json new file mode 100644 index 000000000..d0ff4f894 --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_errorEmailCompletionNoteErrorNote-expected.json @@ -0,0 +1,57 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_errorEmailErrorNote-expected.json b/test/resources/9999999/automation/updateNotifications_errorEmailErrorNote-expected.json new file mode 100644 index 000000000..666339633 --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_errorEmailErrorNote-expected.json @@ -0,0 +1,52 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailErrorNote", + "name": "testExisting_automation_updateNotifications_errorEmailErrorNote", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/updateNotifications_errorEmailErrorNoteCompletionEmail-expected.json b/test/resources/9999999/automation/updateNotifications_errorEmailErrorNoteCompletionEmail-expected.json new file mode 100644 index 000000000..168d3cc73 --- /dev/null +++ b/test/resources/9999999/automation/updateNotifications_errorEmailErrorNoteCompletionEmail-expected.json @@ -0,0 +1,57 @@ +{ + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail", + "name": "testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail", + "r__folder_Path": "my automations", + "schedule": { + "endDate": "2022-07-30T00:00:00", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "startDate": "2022-07-30T00:00:00", + "timezoneName": "W. Europe Standard Time" + }, + "status": "PausedSchedule", + "steps": [ + { + "activities": [ + { + "name": "testExisting_dataExtract", + "r__type": "dataExtract" + }, + { + "name": "testExisting_emailSend", + "r__type": "emailSend" + }, + { + "name": "testExisting_fileTransfer", + "r__type": "fileTransfer" + }, + { + "name": "testExisting_importFile", + "r__type": "importFile" + }, + { + "name": "testExisting_query", + "r__type": "query" + }, + { + "name": "testExisting_script", + "r__type": "script" + } + ], + "name": "" + } + ], + "type": "scheduled", + "notifications": [ + { + "email": ["test@test.com"], + "message": "", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clear/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clear/get-response.json new file mode 100644 index 000000000..949d7ebbe --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clear/get-response.json @@ -0,0 +1,85 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-clear", + "name": "testExisting_automation_clear", + "description": "bla bla", + "key": "testExisting_automation_clear", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clearNotificationsAll/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clearNotificationsAll/get-response.json new file mode 100644 index 000000000..2bab6cea0 --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clearNotificationsAll/get-response.json @@ -0,0 +1,85 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-clearNotificationsAll", + "name": "testExisting_automation_clearNotificationsAll", + "description": "bla bla", + "key": "testExisting_automation_clearNotificationsAll", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clearNotificationsCompletionEmail/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clearNotificationsCompletionEmail/get-response.json new file mode 100644 index 000000000..71156d9ce --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clearNotificationsCompletionEmail/get-response.json @@ -0,0 +1,92 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-clearNotificationsCompletionEmail", + "name": "testExisting_automation_clearNotificationsCompletionEmail", + "description": "bla bla", + "key": "testExisting_automation_clearNotificationsCompletionEmail", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clearNotificationsErrorEmail/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clearNotificationsErrorEmail/get-response.json new file mode 100644 index 000000000..134103842 --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clearNotificationsErrorEmail/get-response.json @@ -0,0 +1,92 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-clearNotificationsErrorEmail", + "name": "testExisting_automation_clearNotificationsErrorEmail", + "description": "bla bla", + "key": "testExisting_automation_clearNotificationsErrorEmail", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clearNotificationsNotes/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clearNotificationsNotes/get-response.json new file mode 100644 index 000000000..b7fa1f011 --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-clearNotificationsNotes/get-response.json @@ -0,0 +1,97 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-clearNotificationsNotes", + "name": "testExisting_automation_clearNotificationsNotes", + "description": "bla bla", + "key": "testExisting_automation_clearNotificationsNotes", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailCompletionNote/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailCompletionNote/get-response.json new file mode 100644 index 000000000..159e7fa18 --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailCompletionNote/get-response.json @@ -0,0 +1,92 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailCompletionNote", + "name": "testExisting_automation_updateNotifications_completionEmailCompletionNote", + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_completionEmailCompletionNote", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailCompletionNoteErrorNote/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailCompletionNoteErrorNote/get-response.json new file mode 100644 index 000000000..59ad5e09c --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailCompletionNoteErrorNote/get-response.json @@ -0,0 +1,97 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailCompletionNoteErrorNote", + "name": "testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote", + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailErrorNote/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailErrorNote/get-response.json new file mode 100644 index 000000000..a70b87842 --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailErrorNote/get-response.json @@ -0,0 +1,97 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailErrorNote", + "name": "testExisting_automation_updateNotifications_completionEmailErrorNote", + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_completionEmailErrorNote", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailNoteErrorEmailNote/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailNoteErrorEmailNote/get-response.json new file mode 100644 index 000000000..3131eb8e4 --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailNoteErrorEmailNote/get-response.json @@ -0,0 +1,97 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailNoteErrorEmailNote", + "name": "testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote", + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionNote/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionNote/get-response.json new file mode 100644 index 000000000..cb0b7dd5e --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_completionNote/get-response.json @@ -0,0 +1,92 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-updateNotifications_completionNote", + "name": "testExisting_automation_updateNotifications_completionNote", + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_completionNote", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionEmail/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionEmail/get-response.json new file mode 100644 index 000000000..0cf77dc73 --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionEmail/get-response.json @@ -0,0 +1,97 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionEmail", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionEmail", + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionEmail", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNote/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNote/get-response.json new file mode 100644 index 000000000..ccf9a0bf0 --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNote/get-response.json @@ -0,0 +1,97 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNote", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionNote", + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionNote", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNoteCompletionEmail/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNoteCompletionEmail/get-response.json new file mode 100644 index 000000000..eefb00814 --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNoteCompletionEmail/get-response.json @@ -0,0 +1,97 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNoteCompletionEmail", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail", + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNoteErrorNote/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNoteErrorNote/get-response.json new file mode 100644 index 000000000..094907759 --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNoteErrorNote/get-response.json @@ -0,0 +1,97 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNoteErrorNote", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote", + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailErrorNote/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailErrorNote/get-response.json new file mode 100644 index 000000000..f96a9126a --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailErrorNote/get-response.json @@ -0,0 +1,92 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailErrorNote", + "name": "testExisting_automation_updateNotifications_errorEmailErrorNote", + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailErrorNote", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailErrorNoteCompletionEmail/get-response.json b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailErrorNoteCompletionEmail/get-response.json new file mode 100644 index 000000000..3eb6eebe3 --- /dev/null +++ b/test/resources/9999999/automation/v1/automations/08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailErrorNoteCompletionEmail/get-response.json @@ -0,0 +1,97 @@ +{ + "id": "08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailErrorNoteCompletionEmail", + "name": "testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail", + "description": "bla bla", + "key": "testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail", + "typeId": 1, + "type": "scheduled", + "statusId": 4, + "status": "PausedSchedule", + "categoryId": 290937, + "schedule": { + "id": "b393aa6c-a4a8-4c0f-a148-9250258a7339", + "typeId": 3, + "startDate": "2022-07-30T00:00:00", + "endDate": "2022-07-30T00:00:00", + "scheduledTime": "0001-01-01T07:00:00", + "rangeTypeId": 0, + "occurrences": 1, + "pattern": "01", + "icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1", + "timezoneName": "W. Europe Standard Time", + "scheduleStatus": "scheduled", + "timezoneId": 5 + }, + "steps": [ + { + "id": "13fda077-0e82-4936-b936-a36b0997fc44", + "name": "", + "step": 1, + "activities": [ + { + "id": "8081a992-a27d-4a43-984a-d60114ea1025", + "name": "testExisting_dataExtract", + "activityObjectId": "56c5370a-f988-4f36-b0ee-0f876573f6d7", + "objectTypeId": 73, + "displayOrder": 1 + }, + { + "id": "d3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_emailSend", + "activityObjectId": "9b1c7bf9-4964-ed11-b849-48df37d1de8b", + "objectTypeId": 42, + "displayOrder": 2 + }, + { + "id": "2c77fc42-85eb-4611-98f9-223d29d89d72", + "name": "testExisting_fileTransfer", + "activityObjectId": "72c328ac-f5b0-4e37-91d3-a775666f15a6", + "objectTypeId": 53, + "displayOrder": 3 + }, + { + "id": "298b2794-28cb-4c70-b7ad-58b2c8cf48f7", + "name": "testExisting_importFile", + "activityObjectId": "9d16f42c-2260-ed11-b849-48df37d1de8b", + "objectTypeId": 43, + "displayOrder": 4, + "targetDataExtensions": [ + { + "id": "21711373-72c1-ec11-b83b-48df37d1deb7", + "name": "testExisting_dataExtension", + "key": "testExisting_dataExtension", + "description": "bla bla", + "rowCount": 0 + } + ] + }, + { + "id": "e3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_query_WRONG_NAME", + "activityObjectId": "549f0568-607c-4940-afef-437965094dat", + "objectTypeId": 300, + "displayOrder": 5 + }, + { + "id": "g3774dc2-a271-4a44-8cbe-f630a6d6545e", + "name": "testExisting_script", + "activityObjectId": "39f6a488-20eb-4ba0-b0b9-023725b574e4", + "objectTypeId": 423, + "displayOrder": 6 + } + ] + } + ], + "notifications": [ + { + "email": ["test@test.com"], + "message": "", + "type": "Complete" + }, + { + "email": ["test@test.com"], + "message": "test", + "type": "Error" + } + ] +} diff --git a/test/resources/9999999/automation/v1/imports/9d16f42c-2260-ed11-b849-48df37d1de8b_updateNotifications/get-response.json b/test/resources/9999999/automation/v1/imports/9d16f42c-2260-ed11-b849-48df37d1de8b_updateNotifications/get-response.json new file mode 100644 index 000000000..e4df43f79 --- /dev/null +++ b/test/resources/9999999/automation/v1/imports/9d16f42c-2260-ed11-b849-48df37d1de8b_updateNotifications/get-response.json @@ -0,0 +1,31 @@ +{ + "allowErrors": true, + "customerKey": "testExisting_importFile_updateNotifications", + "createdDate": "2022-11-09T05:32:30.533", + "modifiedDate": "2022-11-17T07:13:03.95", + "dateFormatLocale": "en-US", + "deleteFile": false, + "description": "17.11.2022", + "destinationObjectId": "21711373-72c1-ec11-b83b-48df37d1deb7", + "destinationId": 0, + "destinationObjectTypeId": 310, + "fieldMappings": [], + "fieldMappingType": "InferFromColumnHeadings", + "fileNamingPattern": "blabla", + "fileTransferLocationId": "41a5ded7-0d98-4910-a15f-d09e7ab0af24", + "fileType": "CSV", + "filter": "", + "hasColumnHeader": true, + "importDefinitionId": "9d16f42c-2260-ed11-b849-48df37d1de8b_updateNotifications", + "isOrderedImport": true, + "isSequential": true, + "maxFileAgeHours": 0, + "maxImportFrequencyHours": 0, + "maxFileAgeScheduleOffsetHours": 0, + "name": "testExisting_importFile_updateNotifications", + "sendEmailNotification": false, + "standardQuotedStrings": true, + "subscriberImportTypeId": 255, + "updateTypeId": 0, + "fileTransferLocationTypeId": 0 +} diff --git a/test/resources/9999999/automation/v1/imports/9d16f42c-2260-ed11-b849-48df37d1de8b_updateNotifications/patch-response.json b/test/resources/9999999/automation/v1/imports/9d16f42c-2260-ed11-b849-48df37d1de8b_updateNotifications/patch-response.json new file mode 100644 index 000000000..886964e97 --- /dev/null +++ b/test/resources/9999999/automation/v1/imports/9d16f42c-2260-ed11-b849-48df37d1de8b_updateNotifications/patch-response.json @@ -0,0 +1,31 @@ +{ + "allowErrors": true, + "customerKey": "testExisting_importFile_updateNotifications", + "dateFormatLocale": "en-US", + "deleteFile": false, + "description": "updated on deploy", + "fieldMappingType": "InferFromColumnHeadings", + "fieldMappings": [], + "fileNamingPattern": "blabla", + "fileTransferLocationTypeId": 0, + "fileType": "CSV", + "filter": "", + "hasColumnHeader": true, + "isOrderedImport": true, + "isSequential": true, + "maxFileAgeHours": 0, + "maxFileAgeScheduleOffsetHours": 0, + "maxImportFrequencyHours": 0, + "name": "testExisting_importFile_updateNotifications", + "sendEmailNotification": false, + "standardQuotedStrings": true, + "fileTransferLocationId": "41a5ded7-0d98-4910-a15f-d09e7ab0af24", + "destinationObjectId": "21711373-72c1-ec11-b83b-48df37d1deb7", + "destinationObjectTypeId": 310, + "subscriberImportTypeId": 255, + "updateTypeId": 0, + "importDefinitionId": "9d16f42c-2260-ed11-b849-48df37d1de8b_updateNotifications", + "createdDate": "2022-11-09T05:53:03.243", + "destinationId": 0, + "modifiedDate": "2023-07-18T09:11:26.19" +} diff --git a/test/resources/9999999/automation/v1/imports/get-response.json b/test/resources/9999999/automation/v1/imports/get-response.json index 6b60cf36b..2abb578df 100644 --- a/test/resources/9999999/automation/v1/imports/get-response.json +++ b/test/resources/9999999/automation/v1/imports/get-response.json @@ -1,7 +1,7 @@ { "page": 1, "pageSize": 500, - "count": 2, + "count": 3, "items": [ { "allowErrors": true, @@ -110,6 +110,37 @@ "subscriberImportTypeId": 255, "updateTypeId": 0, "fileTransferLocationTypeId": 0 + }, + { + "allowErrors": true, + "customerKey": "testExisting_importFile_updateNotifications", + "createdDate": "2022-11-09T05:32:30.533", + "modifiedDate": "2022-11-17T07:13:03.95", + "dateFormatLocale": "en-US", + "deleteFile": false, + "description": "17.11.2022", + "destinationObjectId": "21711373-72c1-ec11-b83b-48df37d1deb7", + "destinationId": 0, + "destinationObjectTypeId": 310, + "fieldMappings": [], + "fieldMappingType": "InferFromColumnHeadings", + "fileNamingPattern": "blabla", + "fileTransferLocationId": "41a5ded7-0d98-4910-a15f-d09e7ab0af24", + "fileType": "CSV", + "filter": "", + "hasColumnHeader": true, + "importDefinitionId": "9d16f42c-2260-ed11-b849-48df37d1de8b_updateNotifications", + "isOrderedImport": true, + "isSequential": true, + "maxFileAgeHours": 0, + "maxImportFrequencyHours": 0, + "maxFileAgeScheduleOffsetHours": 0, + "name": "testExisting_importFile_updateNotifications", + "sendEmailNotification": false, + "standardQuotedStrings": true, + "subscriberImportTypeId": 255, + "updateTypeId": 0, + "fileTransferLocationTypeId": 0 } ] } diff --git a/test/resources/9999999/importDefinition/retrieve-CustomerKey=testExisting_importFile_updateNotifications-response.xml b/test/resources/9999999/importDefinition/retrieve-CustomerKey=testExisting_importFile_updateNotifications-response.xml new file mode 100644 index 000000000..aeb0b1ec3 --- /dev/null +++ b/test/resources/9999999/importDefinition/retrieve-CustomerKey=testExisting_importFile_updateNotifications-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:58a4181c-9ea7-4d26-835b-f1eb50877b0b + urn:uuid:dab39bb4-2262-453a-9cb1-c591db9222d9 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2024-01-25T21:59:01Z + 2024-01-25T22:04:01Z + + + + + + OK + fdc476c9-46dc-43f5-b8a6-57f2299c65ac + + + 9d16f42c-2260-ed11-b849-48df37d1de8b_updateNotifications + + + + diff --git a/test/resources/9999999/importFile/patch_updateNotifications-expected.json b/test/resources/9999999/importFile/patch_updateNotifications-expected.json new file mode 100644 index 000000000..1e041b354 --- /dev/null +++ b/test/resources/9999999/importFile/patch_updateNotifications-expected.json @@ -0,0 +1,30 @@ +{ + "allowErrors": true, + "createdDate": "2022-11-09T05:32:30.533", + "customerKey": "testExisting_importFile_updateNotifications", + "dateFormatLocale": "en-US", + "deleteFile": false, + "description": "updated on deploy", + "fieldMappingType": "InferFromColumnHeadings", + "fieldMappings": [], + "fileNamingPattern": "blabla", + "fileTransferLocationTypeId": 0, + "fileType": "CSV", + "filter": "", + "hasColumnHeader": true, + "isOrderedImport": true, + "isSequential": true, + "maxFileAgeHours": 0, + "maxFileAgeScheduleOffsetHours": 0, + "maxImportFrequencyHours": 0, + "modifiedDate": "2022-11-17T07:13:03.95", + "name": "testExisting_importFile_updateNotifications", + "sendEmailNotification": true, + "notificationEmailAddress": "test@test.com", + "standardQuotedStrings": true, + "r__fileLocation_name": "ExactTarget Enhanced FTP", + "c__destinationType": "DataExtension", + "r__dataExtension_CustomerKey": "testExisting_dataExtension", + "c__subscriberImportType": "DataExtension", + "c__dataAction": "AddUpdate" +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_NOTupdateNotifications_InvalidEmails/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_NOTupdateNotifications_InvalidEmails/get-response.json new file mode 100644 index 000000000..76a04c245 --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_NOTupdateNotifications_InvalidEmails/get-response.json @@ -0,0 +1,9 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_NOTupdateNotifications_InvalidEmails", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_NOTupdateNotifications_InvalidEmails", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_NOTupdateNotifications_InvalidEmails/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_NOTupdateNotifications_InvalidEmails/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsAll/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsAll/get-response.json new file mode 100644 index 000000000..8306cab4f --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsAll/get-response.json @@ -0,0 +1,13 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_clearNotificationsAll", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_clearNotificationsAll", + "id": "YjA2NmVlODEtODllOS00NTE4LTkwYzYtMTY4Mzg2ZTk3MGE4OjEyOjA" + }, + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_clearNotificationsAll", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsAll/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsAll/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsCompletionEmail/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsCompletionEmail/get-response.json new file mode 100644 index 000000000..4cf622609 --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsCompletionEmail/get-response.json @@ -0,0 +1,17 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_clearNotificationsCompletionEmail", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_clearNotificationsCompletionEmail", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + }, + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_clearNotificationsCompletionEmail", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA", + "notificationType": "Error", + "definition": "test@test.com", + "body": "test", + "channelType": "Account" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsCompletionEmail/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsCompletionEmail/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsErrorEmail/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsErrorEmail/get-response.json new file mode 100644 index 000000000..8198ec9f7 --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsErrorEmail/get-response.json @@ -0,0 +1,17 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_clearNotificationsErrorEmail", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_clearNotificationsErrorEmail", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA", + "notificationType": "Complete", + "definition": "test@test.com", + "body": "test", + "channelType": "Account" + }, + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_clearNotificationsErrorEmail", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsErrorEmail/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsErrorEmail/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsNotes/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsNotes/get-response.json new file mode 100644 index 000000000..b09f2a715 --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsNotes/get-response.json @@ -0,0 +1,21 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_clearNotificationsNotes", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_clearNotificationsNotes", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA", + "notificationType": "Complete", + "definition": "test@test.com", + "body": "", + "channelType": "Account" + }, + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_clearNotificationsNotes", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA", + "notificationType": "Error", + "definition": "test@test.com", + "body": "", + "channelType": "Account" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsNotes/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsNotes/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailCompletionNote/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailCompletionNote/get-response.json new file mode 100644 index 000000000..a9b1aa906 --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailCompletionNote/get-response.json @@ -0,0 +1,9 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionEmailCompletionNote", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionEmailCompletionNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailCompletionNote/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailCompletionNote/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailCompletionNoteErrorNote/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailCompletionNoteErrorNote/get-response.json new file mode 100644 index 000000000..be727bd92 --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailCompletionNoteErrorNote/get-response.json @@ -0,0 +1,17 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionEmailCompletionNoteErrorNote", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionEmailCompletionNoteErrorNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA", + "notificationType": "Complete", + "definition": "test@test.com", + "body": "", + "channelType": "Account" + }, + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionEmailCompletionNoteErrorNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailCompletionNoteErrorNote/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailCompletionNoteErrorNote/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailErrorNote/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailErrorNote/get-response.json new file mode 100644 index 000000000..3c9f0b2f2 --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailErrorNote/get-response.json @@ -0,0 +1,17 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionEmailErrorNote", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionEmailErrorNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA", + "notificationType": "Error", + "definition": "test@test.com", + "body": "", + "channelType": "Account" + }, + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionEmailErrorNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailErrorNote/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailErrorNote/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailNoteErrorEmailNote/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailNoteErrorEmailNote/get-response.json new file mode 100644 index 000000000..9fac824f0 --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailNoteErrorEmailNote/get-response.json @@ -0,0 +1,9 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionEmailNoteErrorEmailNote", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionEmailNoteErrorEmailNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailNoteErrorEmailNote/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailNoteErrorEmailNote/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionNote/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionNote/get-response.json new file mode 100644 index 000000000..cd8f0acae --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionNote/get-response.json @@ -0,0 +1,17 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionNote", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA", + "notificationType": "Complete", + "definition": "test@test.com", + "body": "", + "channelType": "Account" + }, + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_completionNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionNote/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionNote/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionEmail/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionEmail/get-response.json new file mode 100644 index 000000000..953e1d9f4 --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionEmail/get-response.json @@ -0,0 +1,9 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailCompletionEmail", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailCompletionEmail", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionEmail/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionEmail/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNote/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNote/get-response.json new file mode 100644 index 000000000..6639e3ce3 --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNote/get-response.json @@ -0,0 +1,17 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailCompletionNote", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailCompletionNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA", + "notificationType": "Complete", + "definition": "test@test.com", + "body": "", + "channelType": "Account" + }, + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailCompletionNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNote/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNote/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNoteCompletionEmail/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNoteCompletionEmail/get-response.json new file mode 100644 index 000000000..e32ba084e --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNoteCompletionEmail/get-response.json @@ -0,0 +1,9 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailCompletionNoteCompletionEmail", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailCompletionNoteCompletionEmail", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNoteCompletionEmail/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNoteCompletionEmail/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNoteErrorNote/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNoteErrorNote/get-response.json new file mode 100644 index 000000000..a384cd174 --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNoteErrorNote/get-response.json @@ -0,0 +1,17 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailCompletionNoteErrorNote", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailCompletionNoteErrorNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA", + "notificationType": "Complete", + "definition": "test@test.com", + "body": "", + "channelType": "Account" + }, + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailCompletionNoteErrorNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNoteErrorNote/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNoteErrorNote/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailErrorNote/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailErrorNote/get-response.json new file mode 100644 index 000000000..eb840cc6a --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailErrorNote/get-response.json @@ -0,0 +1,9 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailErrorNote", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailErrorNote", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailErrorNote/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailErrorNote/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailErrorNoteCompletionEmail/get-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailErrorNoteCompletionEmail/get-response.json new file mode 100644 index 000000000..3baee9740 --- /dev/null +++ b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailErrorNoteCompletionEmail/get-response.json @@ -0,0 +1,9 @@ +{ + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailErrorNoteCompletionEmail", + "workers": [ + { + "programId": "ZGQ4N2M2ZjEtYjJlZi00MDljLTg3MDctYzYwNWQ0MzdiYWI4OjI1OjA_updateNotifications_errorEmailErrorNoteCompletionEmail", + "id": "NGIzZGQ5N2EtMDI0ZS00MzFiLTg5ZWYtNTdjYTI4ODVjMjQ0OjEyOjA" + } + ] +} diff --git a/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailErrorNoteCompletionEmail/post-response.json b/test/resources/9999999/legacy/v1/beta/automations/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailErrorNoteCompletionEmail/post-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/get-response.json b/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/get-response.json index 124f8fb90..57f78507a 100644 --- a/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/get-response.json +++ b/test/resources/9999999/legacy/v1/beta/bulk/automations/automation/definition/get-response.json @@ -25,6 +25,397 @@ "isPlatformObject": false, "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow", "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionEmail", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionEmail", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionEmail", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_updateNotifications_errorEmailCompletionEmail", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clear", + "key": "testExisting_automation_clear", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_clear", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_clear", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsAll", + "key": "testExisting_automation_clearNotificationsAll", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_clearNotificationsAll", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_clearNotificationsAll", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsCompletionEmail", + "key": "testExisting_automation_clearNotificationsCompletionEmail", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_clearNotificationsCompletionEmail", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_clearNotificationsCompletionEmail", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsErrorEmail", + "key": "testExisting_automation_clearNotificationsErrorEmail", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_clearNotificationsErrorEmail", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_clearNotificationsErrorEmail", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_clearNotificationsNotes", + "key": "testExisting_automation_clearNotificationsNotes", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_clearNotificationsNotes", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_clearNotificationsNotes", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailErrorNote", + "key": "testExisting_automation_updateNotifications_errorEmailErrorNote", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_updateNotifications_errorEmailErrorNote", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_errorEmailErrorNote", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailCompletionNote", + "key": "testExisting_automation_updateNotifications_completionEmailCompletionNote", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_updateNotifications_completionEmailCompletionNote", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_updateNotifications_completionEmailCompletionNote", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailErrorNote", + "key": "testExisting_automation_updateNotifications_completionEmailErrorNote", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_updateNotifications_completionEmailErrorNote", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_updateNotifications_completionEmailErrorNote", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNote", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionNote", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionNote", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_updateNotifications_errorEmailCompletionNote", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNoteCompletionEmail", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_updateNotifications_errorEmailCompletionNoteCompletionEmail", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailErrorNoteCompletionEmail", + "key": "testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_updateNotifications_errorEmailErrorNoteCompletionEmail", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_errorEmailCompletionNoteErrorNote", + "key": "testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_errorEmailCompletionNoteErrorNote", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailCompletionNoteErrorNote", + "key": "testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_updateNotifications_completionEmailCompletionNoteErrorNote", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionNote", + "key": "testExisting_automation_updateNotifications_completionNote", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_updateNotifications_completionNote", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_updateNotifications_completionNote", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_updateNotifications_completionEmailNoteErrorEmailNote", + "key": "testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_updateNotifications_completionEmailNoteErrorEmailNote", + "automationType": "scheduled" + }, + { + "id": "RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoyNTow_NOTupdateNotifications_InvalidEmails", + "key": "testExisting_automation_NOTupdateNotifications_InvalidEmails", + "createdDate": "2022-01-12T08:41:35.773Z", + "name": "testExisting_automation_NOTupdateNotifications_InvalidEmails", + "description": "bla bla", + "clientId": 9999999, + "status": "Building", + "createdBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "modifiedDate": "2022-11-11T16:42:36.513Z", + "modifiedBy": { + "id": "NzE3MzUzNDA1OjQ6MA", + "name": "Tom Tester", + "email": "tom.tester@accenture.com" + }, + "isPlatformObject": false, + "notifications": "https://mcxxxxx.rest.marketingcloudapis.com/legacy/v1/beta/hub/notifications/RkpOcE9qSVh2VUdnYTVJbWFfWW14dzoxMjow_NOTupdateNotifications_InvalidEmails", + "automationType": "scheduled" } ] } diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_NOTupdateNotifications_InvalidEmails-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_NOTupdateNotifications_InvalidEmails-response.xml new file mode 100644 index 000000000..4f85281cf --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_NOTupdateNotifications_InvalidEmails-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-NOTupdateNotifications_InvalidEmails + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_clearNotificationsAll-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_clearNotificationsAll-response.xml new file mode 100644 index 000000000..0292c0933 --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_clearNotificationsAll-response.xml @@ -0,0 +1,32 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + + 08afb0e2-b00a-4c88-ad2e-clearNotificationsAll + + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_clearNotificationsCompletionEmail-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_clearNotificationsCompletionEmail-response.xml new file mode 100644 index 000000000..3b828b574 --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_clearNotificationsCompletionEmail-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-clearNotificationsCompletionEmail + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_clearNotificationsErrorEmail-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_clearNotificationsErrorEmail-response.xml new file mode 100644 index 000000000..76ea00e58 --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_clearNotificationsErrorEmail-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-clearNotificationsErrorEmail + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_clearNotificationsNotes-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_clearNotificationsNotes-response.xml new file mode 100644 index 000000000..0dce66c4b --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_clearNotificationsNotes-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-clearNotificationsNotes + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionEmailCompletionNote-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionEmailCompletionNote-response.xml new file mode 100644 index 000000000..519479641 --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionEmailCompletionNote-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailCompletionNote + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote-response.xml new file mode 100644 index 000000000..07123d01a --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailCompletionNoteErrorNote + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionEmailErrorNote-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionEmailErrorNote-response.xml new file mode 100644 index 000000000..6b480dc28 --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionEmailErrorNote-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailErrorNote + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote-response.xml new file mode 100644 index 000000000..e30411bbe --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailNoteErrorEmailNote + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionNote-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionNote-response.xml new file mode 100644 index 000000000..fa67fa56b --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_completionNote-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_completionNote + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailCompletionEmail-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailCompletionEmail-response.xml new file mode 100644 index 000000000..73ab8c119 --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailCompletionEmail-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionEmail + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailCompletionNote-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailCompletionNote-response.xml new file mode 100644 index 000000000..06ae715bf --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailCompletionNote-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNote + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail-response.xml new file mode 100644 index 000000000..3e1ee8835 --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNoteCompletionEmail + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote-response.xml new file mode 100644 index 000000000..854642a62 --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNoteErrorNote + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailErrorNote-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailErrorNote-response.xml new file mode 100644 index 000000000..0d6e9148e --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailErrorNote-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailErrorNote + + + + diff --git a/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail-response.xml b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail-response.xml new file mode 100644 index 000000000..bb369ebb1 --- /dev/null +++ b/test/resources/9999999/program/retrieve-CustomerKey=testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail-response.xml @@ -0,0 +1,30 @@ + + + + RetrieveResponse + urn:uuid:60a72d4a-847e-4d9b-a4eb-a42951078298 + urn:uuid:0b59ed53-72ec-4481-ae06-4ee78912aef2 + http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous + + + 2023-06-01T12:04:20Z + 2023-06-01T12:09:20Z + + + + + + OK + 3b1c8cee-b270-49cb-b77b-e7b33934d1b6 + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailErrorNoteCompletionEmail + + + + diff --git a/test/resources/9999999/program/retrieve-response.xml b/test/resources/9999999/program/retrieve-response.xml index 6490d5491..92a50d37f 100644 --- a/test/resources/9999999/program/retrieve-response.xml +++ b/test/resources/9999999/program/retrieve-response.xml @@ -45,6 +45,96 @@ testExisting_automation_fixedKey_paused testExisting_automation_fixKey_pause + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionEmail + testExisting_automation_updateNotifications_errorEmailCompletionEmail + testExisting_automation_updateNotifications_errorEmailCompletionEmail + + + + 08afb0e2-b00a-4c88-ad2e-clearNotificationsAll + testExisting_automation_clearNotificationsAll + testExisting_automation_clearNotificationsAll + + + + 08afb0e2-b00a-4c88-ad2e-clearNotificationsCompletionEmail + testExisting_automation_clearNotificationsCompletionEmail + testExisting_automation_clearNotificationsCompletionEmail + + + + 08afb0e2-b00a-4c88-ad2e-clearNotificationsErrorEmail + testExisting_automation_clearNotificationsErrorEmail + testExisting_automation_clearNotificationsErrorEmail + + + + 08afb0e2-b00a-4c88-ad2e-clearNotificationsNotes + testExisting_automation_clearNotificationsNotes + testExisting_automation_clearNotificationsNotes + + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailErrorNote + testExisting_automation_updateNotifications_errorEmailErrorNote + testExisting_automation_updateNotifications_errorEmailErrorNote + + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailCompletionNote + testExisting_automation_updateNotifications_completionEmailCompletionNote + testExisting_automation_updateNotifications_completionEmailCompletionNote + + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailErrorNote + testExisting_automation_updateNotifications_completionEmailErrorNote + testExisting_automation_updateNotifications_completionEmailErrorNote + + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNote + testExisting_automation_updateNotifications_errorEmailCompletionNote + testExisting_automation_updateNotifications_errorEmailCompletionNote + + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNoteCompletionEmail + testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail + testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail + + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailErrorNoteCompletionEmail + testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail + testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail + + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_errorEmailCompletionNoteErrorNote + testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote + testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote + + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailCompletionNoteErrorNote + testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote + testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote + + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_completionNote + testExisting_automation_updateNotifications_completionNote + testExisting_automation_updateNotifications_completionNote + + + + 08afb0e2-b00a-4c88-ad2e-updateNotifications_completionEmailNoteErrorEmailNote + testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote + testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote + diff --git a/test/type.automation.test.js b/test/type.automation.test.js index a2a7c64d6..516b6cf6c 100644 --- a/test/type.automation.test.js +++ b/test/type.automation.test.js @@ -28,8 +28,8 @@ describe('type: automation', () => { const result = cache.getCache(); assert.equal( result.automation ? Object.keys(result.automation).length : 0, - 4, - 'only four automations expected' + 19, + 'only 19 automations expected' ); assert.deepEqual( await testUtils.getActualJson('testExisting_automation', 'automation'), @@ -50,7 +50,7 @@ describe('type: automation', () => { ); assert.equal( testUtils.getAPIHistoryLength(), - 22, + 48, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -85,8 +85,8 @@ describe('type: automation', () => { const cacheResult = cache.getCache(); assert.equal( cacheResult.automation ? Object.keys(cacheResult.automation).length : 0, - 5, - 'three automations expected' + 20, + '20 automations expected' ); // insert assert.deepEqual( @@ -123,10 +123,9 @@ describe('type: automation', () => { ) ) ); - assert.equal( testUtils.getAPIHistoryLength(), - 29, + 40, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -151,8 +150,8 @@ describe('type: automation', () => { const cached = cache.getCache(); assert.equal( cached.automation ? Object.keys(cached.automation).length : 0, - 5, - 'five cached automation expected' + 20, + '20 cached automation expected' ); assert.equal( deployed['testInstance/testBU'].automation @@ -196,7 +195,7 @@ describe('type: automation', () => { assert.equal( testUtils.getAPIHistoryLength(), - 37, + 48, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -221,8 +220,8 @@ describe('type: automation', () => { const cached = cache.getCache(); assert.equal( cached.automation ? Object.keys(cached.automation).length : 0, - 5, - 'five cached automation expected' + 20, + '20 cached automation expected' ); assert.equal( deployed['testInstance/testBU'].automation @@ -265,7 +264,7 @@ describe('type: automation', () => { assert.equal( testUtils.getAPIHistoryLength(), - 33, + 44, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -302,7 +301,7 @@ describe('type: automation', () => { // check number of API calls assert.equal( testUtils.getAPIHistoryLength(), - 22, + 33, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -347,7 +346,7 @@ describe('type: automation', () => { // check number of API calls assert.equal( testUtils.getAPIHistoryLength(), - 48, + 70, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -392,7 +391,7 @@ describe('type: automation', () => { // check number of API calls assert.equal( testUtils.getAPIHistoryLength(), - 50, + 72, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -437,7 +436,7 @@ describe('type: automation', () => { // check number of API calls assert.equal( testUtils.getAPIHistoryLength(), - 51, + 73, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -478,7 +477,7 @@ describe('type: automation', () => { // check number of API calls assert.equal( testUtils.getAPIHistoryLength(), - 43, + 65, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -520,7 +519,7 @@ describe('type: automation', () => { // check number of API calls assert.equal( testUtils.getAPIHistoryLength(), - 49, + 71, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -562,7 +561,7 @@ describe('type: automation', () => { // check number of API calls assert.equal( testUtils.getAPIHistoryLength(), - 51, + 73, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -614,7 +613,7 @@ describe('type: automation', () => { ); assert.equal( testUtils.getAPIHistoryLength(), - 24, + 35, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -622,7 +621,11 @@ describe('type: automation', () => { it('Should create a automation template via buildTemplate and build it', async () => { // download first before we test buildTemplate - await handler.retrieve('testInstance/testBU', ['automation']); + await handler.retrieve( + 'testInstance/testBU', + ['automation'], + ['testExisting_automation'] + ); // GIVEN there is a template const result = await handler.buildTemplate( 'testInstance/testBU', @@ -662,7 +665,7 @@ describe('type: automation', () => { ); assert.equal( testUtils.getAPIHistoryLength(), - 22, + 33, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -917,4 +920,662 @@ describe('type: automation', () => { return; }); }); + + describe('Update notifications ================', () => { + it('Should update ERROR EMAIL address and COMPLETION EMAIL address', async () => { + handler.setOptions({ errorEmail: 'test@test.com', completionEmail: 'test@test.com' }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_updateNotifications_errorEmailCompletionEmail'] + ); + assert.equal( + process.exitCode, + false, + 'update notifications should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_updateNotifications_errorEmailCompletionEmail', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'updateNotifications_errorEmailCompletionEmail' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should update ERROR NOTE and ERROR EMAIL address', async () => { + handler.setOptions({ errorEmail: 'test@test.com', errorNote: 'test' }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_updateNotifications_errorEmailErrorNote'] + ); + assert.equal( + process.exitCode, + false, + 'update notifications should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_updateNotifications_errorEmailErrorNote', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'updateNotifications_errorEmailErrorNote' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should update COMPLETION NOTE and COMPLETION EMAIL address', async () => { + handler.setOptions({ completionEmail: 'test@test.com', completionNote: 'test' }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_updateNotifications_completionEmailCompletionNote'] + ); + assert.equal( + process.exitCode, + false, + 'update notifications should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_updateNotifications_completionEmailCompletionNote', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'updateNotifications_completionEmailCompletionNote' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should update COMPLETION EMAIL and ERROR NOTE', async () => { + handler.setOptions({ completionEmail: 'test@test.com', errorNote: 'test' }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_updateNotifications_completionEmailErrorNote'] + ); + assert.equal( + process.exitCode, + false, + 'update notifications should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_updateNotifications_completionEmailErrorNote', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'updateNotifications_completionEmailErrorNote' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should update ERROR EMAIL and COMPLETION NOTE', async () => { + handler.setOptions({ errorEmail: 'test@test.com', completionNote: 'test' }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_updateNotifications_errorEmailCompletionNote'] + ); + assert.equal( + process.exitCode, + false, + 'update notifications should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_updateNotifications_errorEmailCompletionNote', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'updateNotifications_errorEmailCompletionNote' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should update ERROR EMAIL, COMPLETION EMAIL and COMPLETION NOTE', async () => { + handler.setOptions({ + errorEmail: 'test@test.com', + completionEmail: 'test@test.com', + completionNote: 'test', + }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + [ + 'testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail', + ] + ); + assert.equal( + process.exitCode, + false, + 'update notifications should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_updateNotifications_errorEmailCompletionNoteCompletionEmail', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'updateNotifications_errorEmailCompletionNoteCompletionEmail' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should update ERROR EMAIL, COMPLETION EMAIL and ERROR NOTE', async () => { + handler.setOptions({ + errorEmail: 'test@test.com', + errorNote: 'test', + completionEmail: 'test@test.com', + }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail'] + ); + assert.equal( + process.exitCode, + false, + 'update notifications should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_updateNotifications_errorEmailErrorNoteCompletionEmail', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'updateNotifications_errorEmailErrorNoteCompletionEmail' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should update ERROR EMAIL, COMPLETION NOTE and ERROR NOTE', async () => { + handler.setOptions({ + errorEmail: 'test@test.com', + errorNote: 'test', + completionNote: 'test', + }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote'] + ); + assert.equal( + process.exitCode, + false, + 'update notifications should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_updateNotifications_errorEmailCompletionNoteErrorNote', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'updateNotifications_errorEmailCompletionNoteErrorNote' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should update COMPLETION EMAIL, COMPLETION NOTE and ERROR NOTE', async () => { + handler.setOptions({ + errorEmail: 'test@test.com', + errorNote: 'test', + completionNote: 'test@test.com', + }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + [ + 'testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote', + ] + ); + assert.equal( + process.exitCode, + false, + 'update notifications should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_updateNotifications_completionEmailCompletionNoteErrorNote', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'updateNotifications_completionEmailCompletionNoteErrorNote' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should update COMPLETION NOTE', async () => { + handler.setOptions({ + completionNote: 'test', + }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_updateNotifications_completionNote'] + ); + assert.equal( + process.exitCode, + false, + 'update notifications should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_updateNotifications_completionNote', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'updateNotifications_completionNote' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should update all NOTES and both ERROR EMAIL and COMPLETION EMAIL', async () => { + handler.setOptions({ errorEmail: 'test@test.com', errorNote: 'test' }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote'] + ); + assert.equal( + process.exitCode, + false, + 'update notifications should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_updateNotifications_completionEmailNoteErrorEmailNote', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'updateNotifications_completionEmailNoteErrorEmailNote' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should NOT update an already existing error email address', async () => { + handler.setOptions({ errorEmail: 'error@test.accenture.com' }); + const updatedNotificationsError = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation'] + ); + assert.equal( + process.exitCode, + false, + 'update error notifications should not have thrown an error' + ); + assert.equal( + updatedNotificationsError['testInstance/testBU'].length, + 0, + 'zero automation keys expected' + ); + return; + }); + + it('Should NOT update an already existing completion email address', async () => { + handler.setOptions({ completionEmail: 'complete@test.accenture.com' }); + const updatedNotificationsComplete = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation'] + ); + assert.equal( + process.exitCode, + false, + 'update completion notifications should not have thrown an error' + ); + assert.equal( + updatedNotificationsComplete['testInstance/testBU'].length, + 0, + 'zero automation keys expected' + ); + return; + }); + + it('Should NOT update an already existing error note', async () => { + handler.setOptions({ errorNote: 'test' }); + const updatedNotificationsNote = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation'] + ); + assert.equal( + process.exitCode, + false, + 'update error notifications should not have thrown an error' + ); + assert.equal( + updatedNotificationsNote['testInstance/testBU'].length, + 0, + 'zero automation keys expected' + ); + return; + }); + + it('Should clear all notes and all notification email addresses', async () => { + handler.setOptions({ clear: 'all' }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_clearNotificationsAll'] + ); + assert.equal( + process.exitCode, + false, + 'updateNotifications --clear should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation key expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_clearNotificationsAll', + 'automation' + ), + await testUtils.getExpectedJson('9999999', 'automation', 'clearNotificationsAll'), + 'returned metadata was not equal expected for update' + ); + + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should clear all eror email addresses', async () => { + handler.setOptions({ clear: 'errorEmail' }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_clearNotificationsErrorEmail'] + ); + assert.equal( + process.exitCode, + false, + 'updateNotifications --clear should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation key expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_clearNotificationsErrorEmail', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'clearNotificationsErrorEmail' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should clear all completion emails', async () => { + handler.setOptions({ clear: 'completionEmail' }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_clearNotificationsCompletionEmail'] + ); + assert.equal( + process.exitCode, + false, + 'updateNotifications --clear should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation key expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_clearNotificationsCompletionEmail', + 'automation' + ), + await testUtils.getExpectedJson( + '9999999', + 'automation', + 'clearNotificationsCompletionEmail' + ), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should clear all notes', async () => { + handler.setOptions({ clear: 'notes' }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_clearNotificationsNotes'] + ); + assert.equal( + process.exitCode, + false, + 'updateNotifications --clear should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 1, + 'one automation key expected' + ); + assert.deepEqual( + await testUtils.getActualJson( + 'testExisting_automation_clearNotificationsNotes', + 'automation' + ), + await testUtils.getExpectedJson('9999999', 'automation', 'clearNotificationsNotes'), + 'returned metadata was not equal expected for update' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 36, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should NOT update email addresses. Invalid email address', async () => { + handler.setOptions({ errorEmail: 'test', completionEmail: 'test' }); + const updatedNotifications = await handler.updateNotifications( + 'testInstance/testBU', + 'automation', + ['testExisting_automation_NOTupdateNotifications_InvalidEmails'] + ); + assert.equal( + process.exitCode, + false, + 'update notifications should not have thrown an error' + ); + assert.equal( + updatedNotifications['testInstance/testBU'].length, + 0, + 'zero automations expected' + ); + + assert.equal( + testUtils.getAPIHistoryLength(), + 2, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + }); }); diff --git a/test/type.importFile.test.js b/test/type.importFile.test.js index 7471426dd..5f166a077 100644 --- a/test/type.importFile.test.js +++ b/test/type.importFile.test.js @@ -26,8 +26,8 @@ describe('type: importFile', () => { const result = cache.getCache(); assert.equal( result.importFile ? Object.keys(result.importFile).length : 0, - 2, - 'only 2 importFile expected' + 3, + 'only 3 importFile expected' ); assert.deepEqual( await testUtils.getActualJson('testExisting_importFile', 'importFile'), @@ -41,7 +41,7 @@ describe('type: importFile', () => { ); assert.equal( testUtils.getAPIHistoryLength(), - 14, + 15, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -92,8 +92,8 @@ describe('type: importFile', () => { const result = cache.getCache(); assert.equal( result.importFile ? Object.keys(result.importFile).length : 0, - 3, - '3 importFiles expected' + 4, + '4 importFiles expected' ); // confirm created item assert.deepEqual( @@ -110,7 +110,7 @@ describe('type: importFile', () => { // check number of API calls assert.equal( testUtils.getAPIHistoryLength(), - 16, + 18, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -202,7 +202,7 @@ describe('type: importFile', () => { ); assert.equal( testUtils.getAPIHistoryLength(), - 14, + 15, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -223,4 +223,42 @@ describe('type: importFile', () => { return; }); }); + + describe('Update notifications ================', () => { + beforeEach(() => { + testUtils.mockSetup(true); + }); + + it('Should set email notification address and activate it', async () => { + handler.setOptions({ completionEmail: 'test@test.com' }); + // WHEN + await handler.updateNotifications('testInstance/testBU', 'importFile', [ + 'testExisting_importFile_updateNotifications', + ]); + // THEN + assert.equal( + process.exitCode, + false, + 'updateNotifications should not have thrown an error' + ); + assert.deepEqual( + await testUtils.getActualDeployJson( + 'testExisting_importFile_updateNotifications', + 'importFile' + ), + await testUtils.getExpectedJson( + '9999999', + 'importFile', + 'patch_updateNotifications' + ), + 'returned deployment JSON was not equal expected' + ); + assert.equal( + testUtils.getAPIHistoryLength(), + 29, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + }); }); diff --git a/test/type.query.test.js b/test/type.query.test.js index 0734274bd..471a211ca 100644 --- a/test/type.query.test.js +++ b/test/type.query.test.js @@ -472,7 +472,7 @@ describe('type: query', () => { // check number of API calls assert.equal( testUtils.getAPIHistoryLength(), - 38, + 69, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -513,7 +513,7 @@ describe('type: query', () => { // check number of API calls assert.equal( testUtils.getAPIHistoryLength(), - 40, + 71, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; diff --git a/test/type.verification.test.js b/test/type.verification.test.js index 42890286b..8edda2180 100644 --- a/test/type.verification.test.js +++ b/test/type.verification.test.js @@ -47,7 +47,7 @@ describe('type: verification', () => { ); assert.equal( testUtils.getAPIHistoryLength(), - 9, + 24, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -97,7 +97,7 @@ describe('type: verification', () => { // check number of API calls assert.equal( testUtils.getAPIHistoryLength(), - 11, + 26, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return; @@ -151,7 +151,7 @@ describe('type: verification', () => { ); assert.equal( testUtils.getAPIHistoryLength(), - 9, + 24, 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' ); return;