Skip to content

Commit

Permalink
Merge pull request #1435 from Accenture/feature/1148-activatestart-jo…
Browse files Browse the repository at this point in the history
…urney-version

Feature/1148 publish journey version
  • Loading branch information
JoernBerkefeld committed Jul 9, 2024
2 parents 8a85d62 + c4a9161 commit 3ac2640
Show file tree
Hide file tree
Showing 28 changed files with 720 additions and 53 deletions.
19 changes: 15 additions & 4 deletions @types/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,17 @@ declare class Mcdev {
static schedule(businessUnit: string, selectedType?: string, keys?: string[]): Promise<{
[x: string]: string[];
}>;
/**
* Publish an item
*
* @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 executed item keys
*/
static publish(businessUnit: string, selectedType: string, keys?: string[]): Promise<{
[x: string]: string[];
}>;
/**
* Start/execute an item
*
Expand Down Expand Up @@ -322,26 +333,26 @@ declare class Mcdev {
/**
* run a method across BUs
*
* @param {'execute'|'pause'|'fixKeys'|'replaceCbReference'} methodName what to run
* @param {'execute'|'pause'|'publish'|'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 "__#8@#runMethod"(methodName: "execute" | "pause" | "fixKeys" | "replaceCbReference", businessUnit: string, selectedType?: string, keys?: string[]): Promise<{
static "__#8@#runMethod"(methodName: "execute" | "pause" | "publish" | "fixKeys" | "replaceCbReference", businessUnit: string, selectedType?: string, keys?: string[]): Promise<{
[x: string]: string[];
}>;
/**
* helper for Mcdev.#runMethod
*
* @param {'execute'|'pause'|'fixKeys'|'replaceCbReference'} methodName what to run
* @param {'execute'|'pause'|'publish'|'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 "__#8@#runOnBU"(methodName: "execute" | "pause" | "fixKeys" | "replaceCbReference", cred: string, bu: string, type?: string, keyArr?: string[]): Promise<string[]>;
static "__#8@#runOnBU"(methodName: "execute" | "pause" | "publish" | "fixKeys" | "replaceCbReference", cred: string, bu: string, type?: string, keyArr?: string[]): Promise<string[]>;
/**
* helper for Mcdev.#runOnBU
*
Expand Down
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.

2 changes: 1 addition & 1 deletion @types/lib/metadataTypes/Event.d.ts.map

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

32 changes: 32 additions & 0 deletions @types/lib/metadataTypes/Journey.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,38 @@ declare class Journey extends MetadataType {
* @returns {Promise.<MetadataTypeItem>} key of the item that was updated
*/
static replaceCbReference(item: MetadataTypeItem): Promise<MetadataTypeItem>;
/**
* Gets executed after deployment of metadata type
*
* @param {MetadataTypeMap} upsertResults metadata mapped by their keyField as returned by update/create
*/
static postDeployTasks(upsertResults: MetadataTypeMap): Promise<void>;
/**
* a function to publish the journey via API
*
* @param {string[]} keyArr keys or ids of the metadata
* @returns {Promise.<string[]>} 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 publish(keyArr: string[]): Promise<string[]>;
/**
* helper for {@link Journey.publish}
*
* @param {string} statusUrl URL to check the status of the publish request
* @param {string} key key or id for log messages
* @param {number} [tries] number of tries used to check the status
* @returns {Promise.<string>} key of the item that was published successfully
*/
static _checkPublishStatus(statusUrl: string, key: string, tries?: number): Promise<string>;
/**
* helper for {@link Journey._checkPublishStatus}
*
* @param {{status:string, errors:Array, warnings:Array}} response publishStatus response
*/
static _showPublishStatusDetails(response: {
status: string;
errors: any[];
warnings: any[];
}): void;
}
declare namespace Journey {
let definition: {
Expand Down
2 changes: 1 addition & 1 deletion @types/lib/metadataTypes/Journey.d.ts.map

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

Loading

0 comments on commit 3ac2640

Please sign in to comment.