node-saucelabs
node-saucelabs copied to clipboard
Type mismatch for api
Expected Behavior
I expect to be able to do REST calls using the api with the docs provided.
Actual Behavior
I am getting responses with "Your request entity could not be processed".
I did look at the types and I found this:
/**
* Get List of Builds (build_source can be vdc or rdc)
* @method
* @name SauceLabs#getBuildsV2
* @param {string} buildSource - build_source
* @param {string} userId - user_idOption
* @param {string} orgId - org_idOption
* @param {string} groupId - group_idOption
* @param {string} teamId - team_idOption
* @param {string} status - statusOption
* @param {string} name - startOption
* @param {string} end - endOption
* @param {number} limit - Number of results to returnOption
* @param {number} offset - Starting numberOption
* @param {string} sort - sortOption
*/
/**
* Get List of Builds (build_source can be vdc or rdc)
* @method
* @name SauceLabs#getBuildsV2
* @param {string} buildSource - build_source
* @param {string} userId - user_idOption
* @param {string} orgId - org_idOption
* @param {string} groupId - group_idOption
* @param {string} teamId - team_idOption
* @param {string} status - statusOption
* @param {string} name - startOption
* @param {string} end - endOption
* @param {number} limit - Number of results to returnOption
* @param {number} offset - Starting numberOption
* @param {string} sort - sortOption
*/
getBuildsV2(
buildSource: "vdc" | "rdc",
options?: {
userId?: string;
orgId?: string;
groupId?: string;
teamId?: string;
status?: "running" | "error" | "failed" | "complete" | "success";
name?: string;
end?: string;
limit?: number;
offset?: number;
sort?: "asc" | "desc";
}
): Promise<Response_get_builds_v2_200>;
Here I see that there is no start
or start_time
option, and the name option is marked in the comment as a startOption
type.
I also get an error about end
not being valid, but it works if I change it to end_time
.
There might be more mismatched types.
Steps to Reproduce the Problem
try to call getBuildsV2
using the library with typescript
Specifications
- Version: 7.5.0
- Platform: npm library