Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type mismatch for api #239

Closed
dan323 opened this issue Mar 25, 2024 · 0 comments · Fixed by #254
Closed

Type mismatch for api #239

dan323 opened this issue Mar 25, 2024 · 0 comments · Fixed by #254
Assignees
Labels

Comments

@dan323
Copy link

dan323 commented Mar 25, 2024

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
@waggledans waggledans self-assigned this Aug 8, 2024
@waggledans waggledans added the bug label Aug 8, 2024
@diemol diemol linked a pull request Aug 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants