@ikonintegration/ikapi 2.6.2-alpha → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -29,6 +29,8 @@ module.exports = {
29
29
  IKSuccessNoContentResponse: require("./src/API/IKResponse.js").IKSuccessNoContentResponse,
30
30
  IKBadRequestResponseWithRollback: require("./src/API/IKResponse.js").IKBadRequestResponseWithRollback,
31
31
  IKStepFunctionResponse: require("./src/API/IKResponse.js").IKStepFunctionResponse,
32
+ IKSimpleResponse: require("./src/API/IKResponse.js").IKSimpleResponse,
33
+
32
34
  //Helpers
33
35
  Utils: require("./src/API/IKUtils.js").default,
34
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikonintegration/ikapi",
3
- "version": "2.6.2-alpha",
3
+ "version": "2.6.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "module": "main.js",
@@ -27,7 +27,7 @@ export default class IKResponse {
27
27
  if (this._isStream) return this._pipe(context);
28
28
 
29
29
  //append default fields
30
- if (this.request.getRequestID() && this._body) this.appendIntoBody('transactionID', this.request.getRequestID()); //append transaction ID
30
+ if (transaction.request.getRequestID() && this._body) this.appendIntoBody('transactionID', transaction.request.getRequestID()); //append transaction ID
31
31
  //Raw response support
32
32
  if (this._contextRawBody) return this.rawContext(context, transaction);
33
33
 
@@ -112,3 +112,7 @@ export function IKStepFunctionResponse(body, optionalCode) {
112
112
  resp._throwOnErrors = true;
113
113
  return resp;
114
114
  }
115
+ export function IKSimpleResponse(body, optionalCode) {
116
+ const resp = new IKResponse(optionalCode || 200, body);
117
+ return resp;
118
+ }