@lucidtech/las-sdk-core
Advanced tools
Comparing version 1.2.5 to 1.2.6
@@ -15,2 +15,5 @@ import { Credentials } from './credentials'; | ||
postTasks(activityArn: string): Promise<any>; | ||
/** | ||
* Either taskResult or taskError shoud be provided, but not both. | ||
*/ | ||
patchTasks(taskId: string, taskResult?: any, taskError?: any): Promise<any>; | ||
@@ -17,0 +20,0 @@ makeGetRequest(path: string): Promise<any>; |
@@ -51,9 +51,7 @@ "use strict"; | ||
}; | ||
/** | ||
* Either taskResult or taskError shoud be provided, but not both. | ||
*/ | ||
Client.prototype.patchTasks = function (taskId, taskResult, taskError) { | ||
if (taskResult === void 0) { taskResult = {}; } | ||
if (taskError === void 0) { taskError = {}; } | ||
var body = { | ||
taskResult: taskResult, | ||
taskError: taskError, | ||
}; | ||
var body = taskResult ? { taskResult: taskResult } : { taskError: taskError }; | ||
return this.makePatchRequest("/tasks/" + taskId, body); | ||
@@ -60,0 +58,0 @@ }; |
{ | ||
"name": "@lucidtech/las-sdk-core", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"author": "Lucidtech AS <hello@lucidtech.ai>", | ||
@@ -23,3 +23,3 @@ "maintainers": [ | ||
}, | ||
"gitHead": "5cd945327ef7ec223815c9a0a6ddc925a15e3be5" | ||
"gitHead": "751ecd69cfda57b64c2b7b8920b8ab8cb7c7cc77" | ||
} |
@@ -64,8 +64,7 @@ import axios, { AxiosRequestConfig } from 'axios'; | ||
patchTasks(taskId: string, taskResult: any = {}, taskError: any = {}) { | ||
const body = { | ||
taskResult, | ||
taskError, | ||
}; | ||
/** | ||
* Either taskResult or taskError shoud be provided, but not both. | ||
*/ | ||
patchTasks(taskId: string, taskResult?: any, taskError?: any) { | ||
const body = taskResult ? { taskResult } : { taskError }; | ||
return this.makePatchRequest(`/tasks/${taskId}`, body); | ||
@@ -72,0 +71,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34554
582