Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/1270 add method replaceReference to find & replace contentBlockByX with one of the other options #1353

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
63e7235
#1270: baseline contentBlockByX replacement code
JoernBerkefeld Apr 18, 2024
4c6be6d
#1270: refactoring
JoernBerkefeld Apr 18, 2024
c902c46
#1270: solidifying input/output types
JoernBerkefeld Apr 19, 2024
3830399
#1270: improve typing
JoernBerkefeld Apr 19, 2024
10c030e
#1270: refactored to class
JoernBerkefeld Apr 19, 2024
5fade72
Merge branch 'develop' into feature/1270-add-method-replacereference-…
JoernBerkefeld May 23, 2024
1987f5a
#1270: extract preheader code into html file to make parsing easier
JoernBerkefeld May 23, 2024
d1e4aa7
Merge branch 'develop' into feature/1270-add-method-replacereference-…
JoernBerkefeld May 27, 2024
1c7d051
Merge branch 'develop' into feature/1270-add-method-replacereference-…
JoernBerkefeld May 31, 2024
8d20e89
#1270: refactoring to allow saving without additional processing
JoernBerkefeld Jun 2, 2024
5699437
#1270: baseline solution code for replacing content block references
JoernBerkefeld Jun 2, 2024
b06cb02
#1270: rcb for script
JoernBerkefeld Jun 2, 2024
29a6be3
#1270: save-guard development version of rcb base code
JoernBerkefeld Jun 2, 2024
da71779
#1270: refactoring to have less code in type specific method
JoernBerkefeld Jun 2, 2024
07bf392
#1270: rcb for triggeredSend
JoernBerkefeld Jun 2, 2024
b3cd1ca
#1270: find/replace contentBlockById(...) with id passed in without q…
JoernBerkefeld Jun 2, 2024
733eaa2
#1270: refactoring & improved error handling
JoernBerkefeld Jun 2, 2024
7986062
#1270: rcb for senderProfile
JoernBerkefeld Jun 2, 2024
fe12c3d
#1270: improve error handling
JoernBerkefeld Jun 2, 2024
fab55ec
#0: chores
JoernBerkefeld Jun 2, 2024
25fcca2
#1270: rcb support for journey
JoernBerkefeld Jun 2, 2024
473c970
#1270: improve error handling
JoernBerkefeld Jun 2, 2024
88660ea
#1270: async fix
JoernBerkefeld Jun 2, 2024
2ce42c9
#1270: rcb support for asset
JoernBerkefeld Jun 2, 2024
2488fd6
#1270: tests fixed for preheader extraction / 1987f5a2f8547ca6efe20dd…
JoernBerkefeld Jun 2, 2024
744b0fc
#1270: ensure Asset.retrieve() returns the extended json and not just…
JoernBerkefeld Jun 2, 2024
e67fb49
#1270: prevent saving in loop for type asset as thats done in Asset.r…
JoernBerkefeld Jun 2, 2024
7e73522
#1270: include shared assets in assetCacheMap for reference replacements
JoernBerkefeld Jun 2, 2024
0f86f2f
#1270: handle folder-not-found situation
JoernBerkefeld Jun 2, 2024
56f9252
#1238: improve readability of resolveId reponse; include ContentBlock…
JoernBerkefeld Jun 2, 2024
db51b07
#1270: fix end-of-file line break regression
JoernBerkefeld Jun 2, 2024
50f7dff
#0: disable error code debugging message
JoernBerkefeld Jun 2, 2024
b2f3685
#1270: add skipRetrieve, skipDeploy and refresh options to replaceCon…
JoernBerkefeld Jun 2, 2024
c2a4efb
#1270: improve log output
JoernBerkefeld Jun 2, 2024
40899c7
#1270: extract text-version of html email into external file and chan…
JoernBerkefeld Jun 5, 2024
d02f08e
#1270: fox Prototype-polluting assignment warning
JoernBerkefeld Jun 6, 2024
2cebec1
#1270: fix ts warning
JoernBerkefeld Jun 6, 2024
cc1d882
#1270: improve typing
JoernBerkefeld Jun 6, 2024
0120428
#1270: add test case for rcb script
JoernBerkefeld Jun 6, 2024
e84be64
#1270: fix existing script tests for changes introduced by rcb
JoernBerkefeld Jun 6, 2024
5aa5cfe
Merge branch 'develop' into feature/1270-add-method-replacereference-…
JoernBerkefeld Jun 6, 2024
998c4fc
#1270: add tests for rcb asset
JoernBerkefeld Jun 6, 2024
671ab19
#1270: add tests for rcb senderProfile
JoernBerkefeld Jun 6, 2024
031cdc5
#0: fix bad folder id for dataExtension test data
JoernBerkefeld Jun 6, 2024
d008674
#1270: clarify that buildTemplate and buildDefinition can be used wit…
JoernBerkefeld Jun 6, 2024
8cd93ed
#1270: add tests for rcb triggeredSend
JoernBerkefeld Jun 6, 2024
448865a
#1270: add tests for rcb journey
JoernBerkefeld Jun 6, 2024
229e1db
#1270: add test for multi-type rcb run
JoernBerkefeld Jun 7, 2024
6d137df
#1270: allow running rcb without --metadata option
JoernBerkefeld Jun 7, 2024
8b38051
#1270: add no-type-specified test for rcb
JoernBerkefeld Jun 7, 2024
9b49442
#1270 code comments
JoernBerkefeld Jun 7, 2024
dd97295
#1270: fix rcb tests for assets
JoernBerkefeld Jun 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 38 additions & 14 deletions @types/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type SoapRequestParams = import('../types/mcdev.d.js').SoapRequestParams;
export type TemplateMap = import('../types/mcdev.d.js').TemplateMap;
export type TypeKeyCombo = import('../types/mcdev.d.js').TypeKeyCombo;
export type ExplainType = import('../types/mcdev.d.js').ExplainType;
export type ContentBlockConversionTypes = import('../types/mcdev.d.js').ContentBlockConversionTypes;
/**
* @typedef {import('../types/mcdev.d.js').BuObject} BuObject
* @typedef {import('../types/mcdev.d.js').CodeExtract} CodeExtract
Expand All @@ -34,6 +35,7 @@ export type ExplainType = import('../types/mcdev.d.js').ExplainType;
* @typedef {import('../types/mcdev.d.js').TemplateMap} TemplateMap
* @typedef {import('../types/mcdev.d.js').TypeKeyCombo} TypeKeyCombo
* @typedef {import('../types/mcdev.d.js').ExplainType} ExplainType
* @typedef {import('../types/mcdev.d.js').ContentBlockConversionTypes} ContentBlockConversionTypes
*/
/**
* main class
Expand Down Expand Up @@ -103,7 +105,7 @@ declare class Mcdev {
/**
* helper to show an off-the-logs message to users
*/
static "__#6@#welcomeMessage"(): void;
static "__#7@#welcomeMessage"(): void;
/**
* Retrieve all metadata from the specified business unit into the local file system.
*
Expand All @@ -124,7 +126,7 @@ declare class Mcdev {
* @param {boolean} [changelogOnly] skip saving, only create json in memory
* @returns {Promise.<object>} ensure that BUs are worked on sequentially
*/
static "__#6@#retrieveBU"(cred: string, bu: string, selectedTypesArr?: string[] | TypeKeyCombo, keys?: string[], changelogOnly?: boolean): Promise<object>;
static "__#7@#retrieveBU"(cred: string, bu: string, selectedTypesArr?: string[] | TypeKeyCombo, keys?: string[], changelogOnly?: boolean): Promise<object>;
/**
* Deploys all metadata located in the 'deploy' directory to the specified business unit
*
Expand Down Expand Up @@ -229,21 +231,21 @@ declare class Mcdev {
*
* @param {string} businessUnit references credentials from properties.json
* @param {string | TypeKeyCombo} selectedTypes limit retrieval to given metadata type
* @param {string[]} keyArr customerkey of the metadata
* @param {string[] | undefined} keyArr customerkey of the metadata
* @param {string} market market localizations
* @returns {Promise.<MultiMetadataTypeList>} -
*/
static buildTemplate(businessUnit: string, selectedTypes: string | TypeKeyCombo, keyArr: string[], market: string): Promise<MultiMetadataTypeList>;
static buildTemplate(businessUnit: string, selectedTypes: string | TypeKeyCombo, keyArr: string[] | undefined, market: string): Promise<MultiMetadataTypeList>;
/**
* Build a specific metadata file based on a template.
*
* @param {string} businessUnit references credentials from properties.json
* @param {string | TypeKeyCombo} selectedTypes limit retrieval to given metadata type
* @param {string[]} nameArr name of the metadata
* @param {string[] | undefined} nameArr name of the metadata
* @param {string} market market localizations
* @returns {Promise.<MultiMetadataTypeList>} -
*/
static buildDefinition(businessUnit: string, selectedTypes: string | TypeKeyCombo, nameArr: string[], market: string): Promise<MultiMetadataTypeList>;
static buildDefinition(businessUnit: string, selectedTypes: string | TypeKeyCombo, nameArr: string[] | undefined, market: string): Promise<MultiMetadataTypeList>;
/**
* Build a specific metadata file based on a template using a list of bu-market combos
*
Expand Down Expand Up @@ -294,6 +296,18 @@ declare class Mcdev {
static pause(businessUnit: string, selectedType?: string, keys?: string[]): Promise<{
[x: string]: string[];
}>;
/**
* Updates the key to match the name field
*
* @param {string} businessUnit name of BU
* @param {TypeKeyCombo|undefined} selectedTypesArr limit retrieval to given metadata type
* @param {ContentBlockConversionTypes} to what to replace with
* @param {ContentBlockConversionTypes[]} [fromList] what to replace
* @returns {Promise.<Object.<string, object>>} key1: business unit name, key2:type value: list of fixed item keys
*/
static replaceCbReference(businessUnit: string, selectedTypesArr: TypeKeyCombo | undefined, to: ContentBlockConversionTypes, fromList?: ContentBlockConversionTypes[]): Promise<{
[x: string]: object;
}>;
/**
* Updates the key to match the name field
*
Expand All @@ -308,34 +322,44 @@ declare class Mcdev {
/**
* run a method across BUs
*
* @param {'execute'|'pause'|'fixKeys'} methodName what to run
* @param {'execute'|'pause'|'fixKeys'|'replaceCbReference'} methodName what to run
* @param {string} businessUnit name of BU
* @param {string} [selectedType] limit to given metadata types
* @param {string[]} [keys] customerkey of the metadata
* @returns {Promise.<Object.<string, string[]>>} key: business unit name, value: list of affected item keys
*/
static "__#6@#runMethod"(methodName: 'execute' | 'pause' | 'fixKeys', businessUnit: string, selectedType?: string, keys?: string[]): Promise<{
static "__#7@#runMethod"(methodName: 'execute' | 'pause' | 'fixKeys' | 'replaceCbReference', businessUnit: string, selectedType?: string, keys?: string[]): Promise<{
[x: string]: string[];
}>;
/**
* helper for Mcdev.#runMethod
*
* @param {'execute'|'pause'|'fixKeys'} methodName what to run
* @param {'execute'|'pause'|'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.<string[]>} list of keys that were affected
*/
static "__#6@#runOnBU"(methodName: 'execute' | 'pause' | 'fixKeys', cred: string, bu: string, type?: string, keyArr?: string[]): Promise<string[]>;
static "__#7@#runOnBU"(methodName: 'execute' | 'pause' | 'fixKeys' | 'replaceCbReference', cred: string, bu: string, type?: string, keyArr?: string[]): Promise<string[]>;
/**
* helper for Mcdev.#runOnBU
*
* @param {string} selectedType limit execution to given metadata type
* @param {BuObject} buObject properties for auth
* @returns {Promise.<string[]>} keyArr
*/
static "__#6@#retrieveKeysWithLike"(selectedType: string, buObject: BuObject): Promise<string[]>;
static "__#7@#retrieveKeysWithLike"(selectedType: string, buObject: BuObject): Promise<string[]>;
/**
* Updates the key to match the name field
*
* @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.<string[]>} list of keys that were affected
*/
static "__#7@#fixKeys"(cred: string, bu: string, type: string, keyArr?: string[]): Promise<string[]>;
/**
* Updates the key to match the name field
*
Expand All @@ -345,15 +369,15 @@ declare class Mcdev {
* @param {string[]} [keyArr] customerkey of the metadata
* @returns {Promise.<string[]>} list of keys that were affected
*/
static "__#6@#fixKeys"(cred: string, bu: string, type: string, keyArr?: string[]): Promise<string[]>;
static "__#7@#replaceCbReference"(cred: string, bu: string, type: string, keyArr?: string[]): Promise<string[]>;
/**
* helper to convert CSVs into an array. if only one value was given, it's also returned as an array
*
* @param {string|string[]} metadataOption potentially comma-separated value or null
* @param {string|string[]|undefined} metadataOption potentially comma-separated value or null
* @param {string[]} [allowedIdentifiers] 'key', 'id', 'name'
* @param {boolean} [firstOnly] removes all but the first entry if enabled
* @returns {TypeKeyCombo} values split into an array.
*/
static metadataToTypeKey(metadataOption: string | string[], allowedIdentifiers?: string[], firstOnly?: boolean): TypeKeyCombo;
static metadataToTypeKey(metadataOption: string | string[] | undefined, allowedIdentifiers?: string[], firstOnly?: boolean): TypeKeyCombo;
}
//# sourceMappingURL=index.d.ts.map
2 changes: 1 addition & 1 deletion @types/lib/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading