diff --git a/@types/lib/index.d.ts b/@types/lib/index.d.ts index 40b22d751..77f683895 100644 --- a/@types/lib/index.d.ts +++ b/@types/lib/index.d.ts @@ -320,6 +320,19 @@ declare class Mcdev { [x: string]: string[]; }; }>; + /** + * Publish an item + * + * @param {string} businessUnit name of BU + * @param {string[] | TypeKeyCombo} selectedTypes limit to given metadata types + * @param {string[]} [keys] customerkey of the metadata + * @returns {Promise.>>} key: business unit name, key2: type, value: list of affected item keys + */ + static validate(businessUnit: string, selectedTypes: string[] | TypeKeyCombo, keys?: string[]): Promise<{ + [x: string]: { + [x: string]: string[]; + }; + }>; /** * Start/execute an item * @@ -385,13 +398,13 @@ declare class Mcdev { /** * run a method across BUs * - * @param {'execute'|'pause'|'stop'|'publish'|'fixKeys'|'replaceCbReference'} methodName what to run + * @param {'execute'|'pause'|'stop'|'publish'|'validate'|'fixKeys'|'replaceCbReference'} methodName what to run * @param {string} businessUnit name of BU * @param {string[] | TypeKeyCombo} [selectedTypes] limit to given metadata types * @param {string[]} [keys] customerkey of the metadata * @returns {Promise.>>} key: business unit name, key2: type, value: list of affected item keys */ - static "__#8@#runMethod"(methodName: "execute" | "pause" | "stop" | "publish" | "fixKeys" | "replaceCbReference", businessUnit: string, selectedTypes?: string[] | TypeKeyCombo, keys?: string[]): Promise<{ + static "__#8@#runMethod"(methodName: "execute" | "pause" | "stop" | "publish" | "validate" | "fixKeys" | "replaceCbReference", businessUnit: string, selectedTypes?: string[] | TypeKeyCombo, keys?: string[]): Promise<{ [x: string]: { [x: string]: string[]; }; @@ -399,14 +412,14 @@ declare class Mcdev { /** * helper for Mcdev.#runMethod * - * @param {'execute'|'pause'|'stop'|'publish'|'fixKeys'|'replaceCbReference'} methodName what to run + * @param {'execute'|'pause'|'stop'|'publish'|'validate'|'fixKeys'|'replaceCbReference'} methodName what to run * @param {string} cred name of Credential * @param {string} bu name of BU * @param {string} [type] limit execution to given metadata type * @param {string[]} [keyArr] customerkey of the metadata * @returns {Promise.} list of keys that were affected */ - static "__#8@#runOnBU"(methodName: "execute" | "pause" | "stop" | "publish" | "fixKeys" | "replaceCbReference", cred: string, bu: string, type?: string, keyArr?: string[]): Promise; + static "__#8@#runOnBU"(methodName: "execute" | "pause" | "stop" | "publish" | "validate" | "fixKeys" | "replaceCbReference", cred: string, bu: string, type?: string, keyArr?: string[]): Promise; /** * helper for Mcdev.#runOnBU * diff --git a/@types/lib/index.d.ts.map b/@types/lib/index.d.ts.map index 4fa25107b..c4a1c40cc 100644 --- a/@types/lib/index.d.ts.map +++ b/@types/lib/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.js"],"names":[],"mappings":";uBAwBa,OAAO,qBAAqB,EAAE,QAAQ;0BACtC,OAAO,qBAAqB,EAAE,WAAW;8BACzC,OAAO,qBAAqB,EAAE,eAAe;2BAC7C,OAAO,qBAAqB,EAAE,YAAY;sBAC1C,OAAO,qBAAqB,EAAE,OAAO;+BACrC,OAAO,qBAAqB,EAAE,gBAAgB;mCAC9C,OAAO,qBAAqB,EAAE,oBAAoB;kCAClD,OAAO,qBAAqB,EAAE,mBAAmB;8BACjD,OAAO,qBAAqB,EAAE,eAAe;iCAC7C,OAAO,qBAAqB,EAAE,kBAAkB;oCAChD,OAAO,qBAAqB,EAAE,qBAAqB;mCACnD,OAAO,qBAAqB,EAAE,oBAAoB;8BAClD,OAAO,qBAAqB,EAAE,eAAe;gCAC7C,OAAO,qBAAqB,EAAE,iBAAiB;0BAC/C,OAAO,qBAAqB,EAAE,WAAW;2BACzC,OAAO,qBAAqB,EAAE,YAAY;0BAC1C,OAAO,qBAAqB,EAAE,WAAW;0CACzC,OAAO,qBAAqB,EAAE,2BAA2B;AAlBtE;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;GAEG;AACH;IACI;;OAEG;IACH,kBAFa,MAAM,CAKlB;IAED;;;;;OAKG;IACH,4CAHW,eAAe,GACb,IAAI,CAIhB;IAED;;;;;;;;OAQG;IACH,6B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;IAED;;;;;;;OAOG;IACH,6BALW,MAAM,iBACN,MAAM,EAAE,GAAG,YAAY,SACvB,MAAM,EAAE,GACN,OAAO,CAAE;YAAQ,MAAM,GAAE,MAAM;KAAC,CAAC,CA4E7C;IAED;;;;;;;;OAQG;IACH,qCANW,SAAS,GAAC,OAAO,GAAC,MAAM,GAAC,SAAS,GAAC,UAAU,GAAC,SAAS,GAAC,oBAAoB,gBAC5E,MAAM,kBACN,MAAM,EAAE,GAAG,YAAY,SACvB,MAAM,EAAE,GACN,OAAO,CAAE;YAAQ,MAAM,GAAE;gBAAQ,MAAM,GAAE,MAAM,EAAE;SAAC;KAAC,CAAC,CAiNhE;IAED;;;;;;;;;OASG;IACH,mCAPW,SAAS,GAAC,OAAO,GAAC,MAAM,GAAC,SAAS,GAAC,UAAU,GAAC,SAAS,GAAC,oBAAoB,QAC5E,MAAM,MACN,MAAM,SACN,MAAM,WACN,MAAM,EAAE,GACN,OAAO,CAAE,MAAM,EAAE,CAAC,CAuD9B;IAED;;;;;;OAMG;IACH,kDAJW,MAAM,YACN,QAAQ,GACN,OAAO,CAAE,MAAM,EAAE,CAAC,CA0D9B;IAED;;;;;;;;OAQG;IACH,6BANW,MAAM,MACN,MAAM,QACN,MAAM,WACN,MAAM,EAAE,GACN,OAAO,CAAE,MAAM,EAAE,CAAC,CA0E9B;IAED;;;;;;;;OAQG;IACH,wCANW,MAAM,MACN,MAAM,QACN,MAAM,WACN,MAAM,EAAE,GACN,OAAO,CAAE,MAAM,EAAE,CAAC,CAyE9B;IAED;;;;;;;OAOG;IACH,yCALW,MAAM,GAAC,MAAM,EAAE,GAAC,SAAS,uBACzB,MAAM,EAAE,cACR,OAAO,GACL,YAAY,CA2ExB;CACJ"} \ No newline at end of file diff --git a/@types/lib/metadataTypes/Event.d.ts.map b/@types/lib/metadataTypes/Event.d.ts.map index d454de0c2..df6251194 100644 --- a/@types/lib/metadataTypes/Event.d.ts.map +++ b/@types/lib/metadataTypes/Event.d.ts.map @@ -1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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAzqCwB,mBAAmB"} \ No newline at end of file diff --git a/@types/lib/metadataTypes/Journey.d.ts b/@types/lib/metadataTypes/Journey.d.ts index 14dbf5a2c..0d8e108d3 100644 --- a/@types/lib/metadataTypes/Journey.d.ts +++ b/@types/lib/metadataTypes/Journey.d.ts @@ -104,7 +104,7 @@ declare class Journey extends MetadataType { */ static publish(keyArr: string[]): Promise; /** - * helper for {@link Journey.publish} + * helper for {@link Journey.publish} and {@link Journey.validate} * * @param {string} statusUrl URL to check the status of the publish request * @param {string} key journey-key or id for log messages @@ -124,6 +124,13 @@ declare class Journey extends MetadataType { errors: any[]; warnings: any[]; }): void; + /** + * a function to validate the journey via API + * + * @param {string[]} keyArr keys or ids of the metadata + * @returns {Promise.} Returns list of updated keys/ids that were published. Success could only be seen with a delay in the UI because the publish-endpoint is async + */ + static validate(keyArr: string[]): Promise; } declare namespace Journey { let definition: { diff --git a/@types/lib/metadataTypes/Journey.d.ts.map b/@types/lib/metadataTypes/Journey.d.ts.map index 2cac0c3fe..d0a1fc261 100644 --- a/@types/lib/metadataTypes/Journey.d.ts.map +++ b/@types/lib/metadataTypes/Journey.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Journey.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/Journey.js"],"names":[],"mappings":";uBAca,OAAO,wBAAwB,EAAE,QAAQ;0BACzC,OAAO,wBAAwB,EAAE,WAAW;8BAC5C,OAAO,wBAAwB,EAAE,eAAe;+BAChD,OAAO,wBAAwB,EAAE,gBAAgB;mCACjD,OAAO,wBAAwB,EAAE,oBAAoB;kCACrD,OAAO,wBAAwB,EAAE,mBAAmB;8BACpD,OAAO,wBAAwB,EAAE,eAAe;iCAChD,OAAO,wBAAwB,EAAE,kBAAkB;gCACnD,OAAO,wBAAwB,EAAE,iBAAiB;0BAClD,OAAO,wBAAwB,EAAE,WAAW;AAVzD;;;;;;;;;;;GAWG;AAEH;;;;;;;;GAQG;AACH;IACI;;;;;;;;OAQG;IACH,6BANW,MAAM,MACN,IAAI,GAAG,MAAM,EAAE,OACf,IAAI,GAAG,MAAM,EAAE,QACf,MAAM,GACJ,OAAO,CAAE,kBAAkB,CAAC,CA8JxC;IAoGD;;;;;OAKG;IACH,wBAHW,gBAAgB,gBAS1B;IAED;;;;;OAKG;IACH,wBAHW,gBAAgB,gBAK1B;IAmBD;;;;OAIG;IACH,2CAFW,eAAe,iBAmBzB;IAED;;;;;OAKG;IACH,mCAHW,gBAAgB,GACd,OAAO,CAAE,gBAAgB,CAAC,CAwMtC;IAED;;;;;OAKG;IACH,6CAmlBC;IAED;;;;;;OAMG;IACH,gCAHW,gBAAgB,GACd,O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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAluEwB,mBAAmB"} \ No newline at end of file +{"version":3,"file":"Journey.d.ts","sourceRoot":"","sources":["../../../lib/metadataTypes/Journey.js"],"names":[],"mappings":";uBAca,OAAO,wBAAwB,EAAE,QAAQ;0BACzC,OAAO,wBAAwB,EAAE,WAAW;8BAC5C,OAAO,wBAAwB,EAAE,eAAe;+BAChD,OAAO,wBAAwB,EAAE,gBAAgB;mCACjD,OAAO,wBAAwB,EAAE,oBAAoB;kCACrD,OAAO,wBAAwB,EAAE,mBAAmB;8BACpD,OAAO,wBAAwB,EAAE,eAAe;iCAChD,OAAO,wBAAwB,EAAE,kBAAkB;gCACnD,OAAO,wBAAwB,EAAE,iBAAiB;0BAClD,OAAO,wBAAwB,EAAE,WAAW;AAVzD;;;;;;;;;;;GAWG;AAEH;;;;;;;;GAQG;AACH;IACI;;;;;;;;OAQG;IACH,6BANW,MAAM,MACN,IAAI,GAAG,MAAM,EAAE,OACf,IAAI,GAAG,MAAM,EAAE,QACf,MAAM,GACJ,OAAO,CAAE,kBAAkB,CAAC,CA8JxC;IAoGD;;;;;OAKG;IACH,wBAHW,gBAAgB,gBAS1B;IAED;;;;;OAKG;IACH,wBAHW,gBAAgB,gBAK1B;IAmBD;;;;OAIG;IACH,2CAFW,eAAe,iBAmBzB;IAED;;;;;OAKG;IACH,mCAHW,gBAAgB,GACd,OAAO,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA94EwB,mBAAmB"} \ No newline at end of file diff --git a/lib/cli.js b/lib/cli.js index 0ee1be121..bd1d514ce 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -167,6 +167,10 @@ yargs(hideBin(process.argv)) group: 'Options for deploy:', describe: 'publishes the entity after deploy (only works on journeys)', }) + .option('validate', { + group: 'Options for deploy:', + describe: 'validate the entity after deploy (only works on journeys)', + }) .option('skipStatusCheck', { group: 'Options for deploy:', describe: @@ -823,6 +827,47 @@ yargs(hideBin(process.argv)) } } ) + .command( + ['validate [TYPE] [KEY]'], + 'validates the entity', + (yargs) => + yargs + .positional('BU', { + type: 'string', + describe: 'the business unit where to start an item', + }) + .positional('TYPE', { + type: 'string', + describe: 'metadata type', + }) + .positional('KEY', { + type: 'string', + describe: 'key(s) of the metadata component(s)', + }) + .option('metadata', { + type: 'string', + array: true, + alias: 'm', + group: 'Options for validate:', + describe: 'type or type:key or type:i:id or type:n:name to fix', + }) + .option('like', { + type: 'string', + group: 'Options for validate:', + describe: + 'filter metadata components (can include % as wildcard or _ for a single character)', + }), + + (argv) => { + Mcdev.setOptions(argv); + const typeKeyCombo = Mcdev.metadataToTypeKey(argv.metadata); + if ('undefined' === typeof typeKeyCombo) { + Mcdev.validate(argv.BU, csvToArray(argv.TYPE), csvToArray(argv.KEY)); + } else { + Mcdev.validate(argv.BU, typeKeyCombo); + } + } + ) .command( ['schedule [TYPE] [KEY]', 'sched'], 'starts the predefined schedule of the item (shortcut for running execute --schedule)', diff --git a/lib/index.js b/lib/index.js index 0e82a30af..f5bbb30c4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -115,6 +115,7 @@ class Mcdev { 'skipRetrieve', 'skipStatusCheck', 'skipValidation', + 'validate', '_runningTest', '_welcomeMessageShown', ]; @@ -1453,6 +1454,17 @@ class Mcdev { static async publish(businessUnit, selectedTypes, keys) { return this.#runMethod('publish', businessUnit, selectedTypes, keys); } + /** + * Publish an item + * + * @param {string} businessUnit name of BU + * @param {string[] | TypeKeyCombo} selectedTypes limit to given metadata types + * @param {string[]} [keys] customerkey of the metadata + * @returns {Promise.>>} key: business unit name, key2: type, value: list of affected item keys + */ + static async validate(businessUnit, selectedTypes, keys) { + return this.#runMethod('validate', businessUnit, selectedTypes, keys); + } /** * Start/execute an item @@ -1667,7 +1679,7 @@ class Mcdev { /** * run a method across BUs * - * @param {'execute'|'pause'|'stop'|'publish'|'fixKeys'|'replaceCbReference'} methodName what to run + * @param {'execute'|'pause'|'stop'|'publish'|'validate'|'fixKeys'|'replaceCbReference'} methodName what to run * @param {string} businessUnit name of BU * @param {string[] | TypeKeyCombo} [selectedTypes] limit to given metadata types * @param {string[]} [keys] customerkey of the metadata @@ -1711,6 +1723,13 @@ class Mcdev { checkMetadataSupport = true; break; } + case 'validate': { + lang_past = 'validated'; + lang_present = 'validating'; + requireKeyOrLike = true; + checkMetadataSupport = true; + break; + } case 'fixKeys': { lang_past = 'fixed keys'; lang_present = 'fixing keys'; @@ -1878,7 +1897,7 @@ class Mcdev { /** * helper for Mcdev.#runMethod * - * @param {'execute'|'pause'|'stop'|'publish'|'fixKeys'|'replaceCbReference'} methodName what to run + * @param {'execute'|'pause'|'stop'|'publish'|'validate'|'fixKeys'|'replaceCbReference'} methodName what to run * @param {string} cred name of Credential * @param {string} bu name of BU * @param {string} [type] limit execution to given metadata type diff --git a/lib/metadataTypes/Event.js b/lib/metadataTypes/Event.js index 27fa18d17..6f4bbc3aa 100644 --- a/lib/metadataTypes/Event.js +++ b/lib/metadataTypes/Event.js @@ -1099,11 +1099,17 @@ class Event extends MetadataType { return; } + eventDataSummary = + 'string' === typeof eventDataSummary + ? // @ts-expect-error transforming this from API-string-format to from mcdev-format + eventDataSummary.split('; ').filter(Boolean).sort() + : eventDataSummary; + const errors = []; for (const fieldName of eventDataSummary) { if (!deItem.Fields.find((field) => field.Name === fieldName)) { errors.push( - `Field ${fieldName} is was not found in associated dataExtension ${deKey}` + `Field ${fieldName} was not found in associated dataExtension ${deKey}` ); } } diff --git a/lib/metadataTypes/Journey.js b/lib/metadataTypes/Journey.js index 0d937b363..45cf9b3b4 100644 --- a/lib/metadataTypes/Journey.js +++ b/lib/metadataTypes/Journey.js @@ -1778,6 +1778,14 @@ class Journey extends MetadataType { ); await this.publish(idArr); } + if (Util.OPTIONS.validate) { + Util.logger.info(`Validating: ${this.definition.type}`); + // pubslih + const idArr = Object.values(upsertResults).map( + (item) => 'id:' + item.id + '/' + item.version + ); + await this.validate(idArr); + } } /** @@ -2053,7 +2061,7 @@ class Journey extends MetadataType { } /** - * helper for {@link Journey.publish} + * helper for {@link Journey.publish} and {@link Journey.validate} * * @param {string} statusUrl URL to check the status of the publish request * @param {string} key journey-key or id for log messages @@ -2063,18 +2071,25 @@ class Journey extends MetadataType { * @returns {Promise.} key of the item that was published successfully */ static async _checkPublishStatus(statusUrl, key, name, spinner, tries = 1) { + const action = statusUrl.includes('/validateStatus') ? 'validating' : 'publishing'; try { const response = await this.client.rest.get(statusUrl); switch (response.status) { + case 'ValidateCompleted': case 'PublishCompleted': { spinner.stop(); - Util.logger.info(` - published ${this.definition.type}: ${key} / ${name}`); + const action = statusUrl.includes('/validateStatus') + ? 'validation successful -' + : 'published'; + + Util.logger.info(` - ${action} ${this.definition.type}: ${key} / ${name}`); this._showPublishStatusDetails(response); return key; } + case 'ValidateInProcess': case 'PublishInProcess': { Util.logger.debug( - ` - publishing ${this.definition.type} still in progress: ${key} / ${name}` + ` - ${action} ${this.definition.type} still in progress: ${key} / ${name}` ); if (tries < 50) { await (tries < 10 ? Util.sleep(2000) : Util.sleep(5000)); @@ -2092,7 +2107,7 @@ class Journey extends MetadataType { case 'Error': { spinner.stop(); Util.logger.error( - ` - publishing ${this.definition.type} failed: ${key} / ${name}` + ` - ${action} ${this.definition.type} failed: ${key} / ${name}` ); this._showPublishStatusDetails(response); return; @@ -2140,6 +2155,163 @@ class Journey extends MetadataType { Util.logger.warn(' ' + msg); } } + + /** + * a function to validate the journey via API + * + * @param {string[]} keyArr keys or ids of the metadata + * @returns {Promise.} Returns list of updated keys/ids that were published. Success could only be seen with a delay in the UI because the publish-endpoint is async + */ + static async validate(keyArr) { + // works only with objectId + const executedKeyArr = []; + const metadataMap = await this.retrieveForCache(); + + for (let key of keyArr) { + let objectId; + let version; + let journey; + if (!key) { + continue; + } + if (key.startsWith('%23')) { + // if the key started with %23 assume an ID was copied from the URL but the user forgot to prefix it with id: + // correct the format + key = 'id:' + key.slice(3); + } + if (key.startsWith('id:')) { + // ! allow selecting journeys by ID because that's what users see in the URL + // remove id + objectId = key.slice(3); + if (objectId.startsWith('%23')) { + // in the journey URL the Id is prefixed with an HTML-encoded "#" which could accidentally be copied by users + // despite the slicing above, this still needs testing here because users might have prefixed the ID with id: but did not know to remove the #23 + objectId = objectId.slice(3); + // correct the format to ensure we show sth readable in the "Downloaded" log + // objectId = objectId; + // update this here to show it in the log + key = 'id:' + objectId; + } + if (objectId.includes('/')) { + version = objectId.split('/')[1]; + // in the journey URL the version is appended after the ID, separated by a forward-slash. Needs to be removed from the ID for caching as we always aim to retrieve the latest version only + objectId = objectId.split('/')[0]; + } else { + // if we didn't find a version we need to cache this from the API after all + if (key.includes('/')) { + // in the journey URL the version is appended after the ID, separated by a forward-slash. Needs to be removed from the key for caching as we always aim to retrieve the latest version only + key = key.split('/')[0]; + } + } + journey = Object.values(metadataMap.metadata).find((el) => el.id === objectId); + if (!journey) { + Util.logger.info( + ` ☇ skipping ${this.definition.type} ${key}: not found on server (1)` + ); + continue; + } + } else { + // key assumed + journey = metadataMap.metadata[key]; + } + + if (!journey) { + Util.logger.info( + ` ☇ skipping ${this.definition.type} ${key}: not found on server (2)` + ); + continue; + } + if (!version) { + version = journey.version; + } + if (journey.status === 'Published') { + // api would return error code 30000 and ask to open a support case when in fact we simply already have a transactionalEmail created based on this status + Util.logger.error( + ` ☇ skipping ${this.definition.type} ${ + journey[this.definition.nameField] + } (${journey[this.definition.keyField]}): already published` + ); + continue; + } + + switch (journey.definitionType) { + case 'Multistep': { + // SF Event, Api Event Journeys + // ! for SF-triggered journeys this cannot be asynchronous or it will cause a race-condition (see #1627 for details); the requests are accepted but then processed sequentually anyways, eliminating potential speed gains. + // It is unknown if the same would happen for API-event journeys but given that it's the same endpoint, lets not risk it and run this sequentially + let statusUrl; + try { + const response = await this.client.rest.post( + `/interaction/v1/interactions/validateAsync/${journey.id}?versionNumber=${version}`, + {} + ); // payload is empty for this request + if (response.statusUrl && response.statusId) { + Util.logger.info( + ` - ${this.definition.type} queued for validating: ${journey[this.definition.keyField]}/${version} / ${journey[this.definition.nameField]}` + ); + statusUrl = response.statusUrl; + } else { + throw new Error(response); + } + const spinner = yoctoSpinner({ + text: `Validating journey…`, + }).start(); + + await Util.sleep(1000); + executedKeyArr.push( + await this._checkPublishStatus( + statusUrl, + journey[this.definition.keyField], + journey[this.definition.nameField], + spinner + ) + ); + } catch (ex) { + switch (ex.message) { + case 'Cannot validate interaction in Published status.': { + Util.logger.info( + ` - ${this.definition.type} ${key}/${version} is already published. Can only validate Draft Journeys` + ); + + break; + } + case 'Cannot validate interaction in Stopped status.': { + Util.logger.warn( + ` - ${this.definition.type} ${key}/${version} is stopped. Can only validate Draft Journeys.` + ); + + break; + } + case 'Cannot validate interaction in Paused status.': { + Util.logger.warn( + ` - ${this.definition.type} ${key}/${version} is already published but currently paused. Can only validate Draft Journeys.` + ); + + break; + } + default: { + Util.logger.error( + `Failed to validate ${this.definition.type} ${key}: ${ex.message}` + ); + } + } + } + break; + } + default: { + throw new Error( + `${this.definition.type} type ${journey.definitionType} not supported yet by validate method` + ); + } + } + } // for loop + + Util.logger.info( + `Validated ${executedKeyArr.filter(Boolean).length} of ${keyArr.length} items without errors` + ); + return executedKeyArr.filter(Boolean); + } + /** * stops latest journey version * diff --git a/test/resources/9999999/interaction/v1/interactions/validateAsync/0175b971-71a3-4d8e-98ac-48121f3fbf4f/post-response.json b/test/resources/9999999/interaction/v1/interactions/validateAsync/0175b971-71a3-4d8e-98ac-48121f3fbf4f/post-response.json new file mode 100644 index 000000000..2eacf991e --- /dev/null +++ b/test/resources/9999999/interaction/v1/interactions/validateAsync/0175b971-71a3-4d8e-98ac-48121f3fbf4f/post-response.json @@ -0,0 +1,4 @@ +{ + "statusUrl": "/interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c", + "statusId": "45f06c0a-3ed2-48b2-a6a8-b5119253f01c" +} diff --git a/test/resources/9999999/interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response-failed.json b/test/resources/9999999/interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response-failed.json new file mode 100644 index 000000000..c157b4968 --- /dev/null +++ b/test/resources/9999999/interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response-failed.json @@ -0,0 +1,34 @@ +{ + "status": "Error", + "errors": [ + { + "errorDetail": "The default email or mobile address in Journey Settings is invalid. Select a different one.", + "errorCode": "121226", + "errorType": "Error", + "additionalInfo": {} + }, + { + "errorDetail": "Email Activity: CCE OpsIssue Satisfaction Email -- The email specified for the job did not pass validation. EmailID: 72604 An unverified from email address was detected. ", + "errorCode": "121008", + "errorType": "Error", + "additionalInfo": { + "activityKey": "EMAILV2-1", + "activityId": "620dbe27-665a-49a3-ad61-ceea5aab720f", + "activityType": "EMAILV2", + "definitionId": "2d5f37b8-7acf-4ac4-b76a-74690255600c" + } + } + ], + "warnings": [ + { + "errorDetail": "Last modified date for email activity is more then 6 months ago. Please review the content or use path optimizer to test it.", + "errorCode": "121546", + "errorType": "Warning", + "additionalInfo": { + "activityKey": "EMAILV2-1", + "activityId": "620dbe27-665a-49a3-ad61-ceea5aab720f", + "activityType": "EMAILV2" + } + } + ] +} diff --git a/test/resources/9999999/interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response-success.json b/test/resources/9999999/interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response-success.json new file mode 100644 index 000000000..ca2c94aa3 --- /dev/null +++ b/test/resources/9999999/interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response-success.json @@ -0,0 +1,5 @@ +{ + "status": "ValidateCompleted", + "errors": [], + "warnings": [] +} diff --git a/test/resources/9999999/interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response-successWarnings.json b/test/resources/9999999/interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response-successWarnings.json new file mode 100644 index 000000000..4b135ee6f --- /dev/null +++ b/test/resources/9999999/interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response-successWarnings.json @@ -0,0 +1,36 @@ +{ + "status": "ValidateCompleted", + "errors": [], + "warnings": [ + { + "errorDetail": "The journey has a long wait (1 days), please consider reducing wait to under 4 minutes.", + "errorCode": "121547", + "errorType": "Warning", + "additionalInfo": { + "activityKey": "WAITBYDURATION-5", + "activityId": "2d0b5dbf-14cc-4635-acee-64071c8e1022", + "activityType": "WAIT" + } + }, + { + "errorDetail": "The journey has a long wait (1 days), please consider reducing wait to under 4 minutes.", + "errorCode": "121547", + "errorType": "Warning", + "additionalInfo": { + "activityKey": "WAITBYDURATION-4", + "activityId": "26298616-e89b-4166-8e7e-8417031f276b", + "activityType": "WAIT" + } + }, + { + "errorDetail": "Last modified date for email activity is more then 6 months ago. Please review the content or use path optimizer to test it.", + "errorCode": "121546", + "errorType": "Warning", + "additionalInfo": { + "activityKey": "EMAILV2-1", + "activityId": "966651f8-e1b6-4261-849c-e95589001c75", + "activityType": "EMAILV2" + } + } + ] +} diff --git a/test/resources/9999999/interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response.json b/test/resources/9999999/interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response.json new file mode 100644 index 000000000..e69de29bb diff --git a/test/resources/9999999/journey/validate-callout-expected.json b/test/resources/9999999/journey/validate-callout-expected.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/test/resources/9999999/journey/validate-callout-expected.json @@ -0,0 +1 @@ +{} diff --git a/test/type.journey.test.js b/test/type.journey.test.js index cabad4c20..cb469749f 100644 --- a/test/type.journey.test.js +++ b/test/type.journey.test.js @@ -823,4 +823,107 @@ describe('type: journey', () => { return; }); }); + + describe('Validate ================', () => { + it('Should not validate a transactional journey by key', async () => { + handler.setOptions({ skipStatusCheck: true }); + // WHEN + await handler.validate( + 'testInstance/testBU', + ['journey'], + ['testExisting_temail_notPublished'] + ); + // THEN + assert.equal(process.exitCode, 1, 'validate should not have thrown an error'); + + assert.equal( + testUtils.getAPIHistoryLength(), + 1, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should validate a journey by id but w/o version (auto-picks latest version)', async () => { + await testUtils.copyFile( + 'interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response-success.json', + 'interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response.json' + ); + // WHEN + const validate = await handler.validate( + 'testInstance/testBU', + ['journey'], + ['id:0175b971-71a3-4d8e-98ac-48121f3fbf4f'] + ); + // THEN + assert.equal(process.exitCode, 0, 'validate should not have thrown an error'); + // retrieve result + assert.deepEqual( + validate['testInstance/testBU']?.journey, + ['testExisting_journey_Multistep'], + 'should have validateed the right journey' + ); + + // get callouts + const validateCallout = testUtils.getRestCallout( + 'post', + '/interaction/v1/interactions/validateAsync/%' + ); + // confirm created item + assert.deepEqual( + validateCallout, + await testUtils.getExpectedJson('9999999', 'journey', 'validate-callout'), + 'validate-payload JSON was not equal expected' + ); + + assert.equal( + testUtils.getAPIHistoryLength(), + 3, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + + it('Should validate a journey by id w/ version with failing status check', async () => { + await testUtils.copyFile( + 'interaction/v1/interactions/publishStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response-failed.json', + 'interaction/v1/interactions/validateStatus/45f06c0a-3ed2-48b2-a6a8-b5119253f01c/get-response.json' + ); + + handler.setOptions({ _runningTest: true }); + // WHEN + const validate = await handler.validate( + 'testInstance/testBU', + ['journey'], + ['id:0175b971-71a3-4d8e-98ac-48121f3fbf4f/1'] + ); + // THEN + assert.equal(process.exitCode, 1, 'validate should have thrown an error'); + // retrieve result + assert.equal( + validate['testInstance/testBU']?.journey.length, + 0, + 'should have not validated the journey' + ); + + // get callouts + const validateCallout = testUtils.getRestCallout( + 'post', + '/interaction/v1/interactions/validateAsync/%' + ); + // confirm created item + assert.deepEqual( + validateCallout, + await testUtils.getExpectedJson('9999999', 'journey', 'validate-callout'), + 'validate-payload JSON was not equal expected' + ); + + assert.equal( + testUtils.getAPIHistoryLength(), + 3, + 'Unexpected number of requests made. Run testUtils.logAPIHistoryDebug() to see the requests' + ); + return; + }); + }); });