Skip to content

Commit

Permalink
Revert "#1020: pause journey"
Browse files Browse the repository at this point in the history
This reverts commit d869912.
  • Loading branch information
phjulia committed Oct 11, 2023
1 parent 1cca284 commit 7836aa3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
14 changes: 0 additions & 14 deletions docs/dist/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3425,7 +3425,6 @@ Provides default functionality that can be overwritten by child metadata type cl
* [.retrieveRESTcollection(urlArray, [concurrentRequests], [logAmountOfUrls])](#MetadataType.retrieveRESTcollection) ⇒ <code>Promise.&lt;{metadata: (TYPE.MetadataTypeMap\|TYPE.MetadataTypeItem), type: string}&gt;</code>
* [.handleRESTErrors(ex, id)](#MetadataType.handleRESTErrors) ⇒ <code>null</code>
* [.executeREST(uri, key)](#MetadataType.executeREST) ⇒ <code>Promise.&lt;{key:string, response:string}&gt;</code>
* [.pauseREST(uri, id)](#MetadataType.pauseREST) ⇒ <code>Promise.&lt;{key:string, response:string}&gt;</code>
* [.executeSOAP([metadataEntry])](#MetadataType.executeSOAP) ⇒ <code>Promise.&lt;{key:string, response:object}&gt;</code>
* [.runDocumentOnRetrieve([singleRetrieve], metadataMap)](#MetadataType.runDocumentOnRetrieve) ⇒ <code>Promise.&lt;void&gt;</code>
* [.parseResponseBody(body, [singleRetrieve])](#MetadataType.parseResponseBody) ⇒ <code>TYPE.MetadataTypeMap</code>
Expand Down Expand Up @@ -3941,19 +3940,6 @@ Used to execute a query/automation etc.
| uri | <code>string</code> | REST endpoint where the POST request should be sent |
| key | <code>string</code> | item key |

<a name="MetadataType.pauseREST"></a>

### MetadataType.pauseREST(uri, id) ⇒ <code>Promise.&lt;{key:string, response:string}&gt;</code>
Used to pause a journey etc.

**Kind**: static method of [<code>MetadataType</code>](#MetadataType)
**Returns**: <code>Promise.&lt;{key:string, response:string}&gt;</code> - metadata id and API response (OK or error)

| Param | Type | Description |
| --- | --- | --- |
| uri | <code>string</code> | REST endpoint where the POST request should be sent |
| id | <code>string</code> | item id |

<a name="MetadataType.executeSOAP"></a>

### MetadataType.executeSOAP([metadataEntry]) ⇒ <code>Promise.&lt;{key:string, response:object}&gt;</code>
Expand Down
19 changes: 0 additions & 19 deletions lib/metadataTypes/MetadataType.js
Original file line number Diff line number Diff line change
Expand Up @@ -1166,25 +1166,6 @@ class MetadataType {
Util.logger.error(`Failed to execute ${this.definition.type} ${key}: ${ex.message}`);
}
}
/**
* Used to pause a journey etc.
*
* @param {string} uri REST endpoint where the POST request should be sent
* @param {string} id item id
* @returns {Promise.<{key:string, response:string}>} metadata id and API response (OK or error)
*/
static async pauseREST(uri, id) {
let response;
try {
await this.client.rest.post(uri, {}); // payload is empty for this request
response = 'OK';
Util.logger.info(` - paused ${this.definition.type}: ${id}`);
} catch (ex) {
response = ex.message;
Util.logger.error(`Failed to pause ${this.definition.type} ${id}: ${ex.message}`);
}
return { id, response };
}

/**
* Used to execute a query/automation etc.
Expand Down

0 comments on commit 7836aa3

Please sign in to comment.