Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dlenroc/testrail

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dlenroc/testrail - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

dist/payload/request/AddSharedStep.d.ts

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [1.3.0](https://www.github.com/dlenroc/node-testrail-api/compare/v1.2.0...v1.3.0) (2021-03-01)
### Features
* TestRail 7.0 support ([bdfbdf6](https://www.github.com/dlenroc/node-testrail-api/commit/bdfbdf6c0e30b6fee1b8749e7053f7a583025b6d))
## [1.2.0](https://www.github.com/dlenroc/node-testrail-api/compare/v1.1.0...v1.2.0) (2020-12-13)

@@ -7,0 +14,0 @@

4

dist/payload/request/index.d.ts

@@ -18,2 +18,3 @@ export * from './AddAttachment';

export * from './AddSection';
export * from './AddSharedStep';
export * from './AddSuite';

@@ -23,2 +24,3 @@ export * from './CaseFilters';

export * from './DeleteCases';
export * from './DeleteSharedStep';
export * from './MilestoneFilters';

@@ -34,2 +36,3 @@ export * from './MoveCasesToSection';

export * from './SectionFilters';
export * from './SharedStepFilters';
export * from './TestFilters';

@@ -47,4 +50,5 @@ export * from './UpdateCase';

export * from './UpdateSection';
export * from './UpdateSharedStep';
export * from './UpdateSuite';
export * from './UserFilters';
//# sourceMappingURL=index.d.ts.map

3

dist/payload/response/Case.d.ts

@@ -5,5 +5,6 @@ export interface Case extends Record<string, unknown> {

display_order: number;
estimate_forecast?: string;
estimate?: string;
estimate_forecast?: string;
id: number;
is_deleted: number;
milestone_id?: number;

@@ -10,0 +11,0 @@ priority_id: number;

@@ -30,2 +30,3 @@ export * from './Attachment';

export * from './Section';
export * from './SharedStep';
export * from './Status';

@@ -32,0 +33,0 @@ export * from './Suite';

@@ -92,2 +92,7 @@ import { Request, Response } from './payload';

deleteSection(sectionId: number): Promise<void>;
getSharedStep(stepId: number): Promise<Response.SharedStep>;
getSharedSteps(projectId: number, filters?: Request.SharedStepFilters): Promise<Response.SharedStep[]>;
addSharedStep(projectId: number, payload: Request.AddSharedStep): Promise<Response.SharedStep>;
updateSharedStep(stepId: number, payload: Request.UpdateSharedStep): Promise<Response.SharedStep>;
deleteSharedStep(stepId: number, payload?: Request.DeleteSharedStep): Promise<void>;
getStatuses(): Promise<Response.Status[]>;

@@ -94,0 +99,0 @@ getSuite(suiteId: number): Promise<Response.Suite>;

@@ -1,2 +0,2 @@

"use strict";const t=require("http"),e=require("https"),r=require("node-fetch"),s=require("form-data"),n={keepAlive:!0},a=new t.Agent(n),i=new e.Agent(n),u=t=>"http:"===t.protocol?a:i,o=(t,e)=>r(t,{agent:u,...e});class _ extends Error{constructor(t){super(t),this.name="TestRailException"}}class p{constructor(t){this.username=(null==t?void 0:t.username)||(null==t?void 0:t.user),this.password=null==t?void 0:t.password,this.baseURL=((null==t?void 0:t.host)||"")+"/index.php?/api/v2/"}addAttachmentToCase(t,e){return this._api("POST",`add_attachment_to_case/${t}`,{form:{attachment:e}})}addAttachmentToPlan(t,e){return this._api("POST",`add_attachment_to_plan/${t}`,{form:{attachment:e}})}addAttachmentToPlanEntry(t,e,r){return this._api("POST",`add_attachment_to_plan_entry/${t}/${e}`,{form:{attachment:r}})}addAttachmentToResult(t,e){return this._api("POST",`add_attachment_to_result/${t}`,{form:{attachment:e}})}addAttachmentToRun(t,e){return this._api("POST",`add_attachment_to_run/${t}`,{form:{attachment:e}})}getAttachmentsForCase(t,e){return d("attachments",e,(e=>this._api("GET",`get_attachments_for_case/${t}`,{query:e})))}getAttachmentsForPlan(t,e){return d("attachments",e,(e=>this._api("GET",`get_attachments_for_plan/${t}`,{query:e})))}getAttachmentsForPlanEntry(t,e){return this._api("GET",`get_attachments_for_plan_entry/${t}/${e}`)}getAttachmentsForRun(t,e){return d("attachments",e,(e=>this._api("GET",`get_attachments_for_run/${t}`,{query:e})))}getAttachmentsForTest(t){return this._api("GET",`get_attachments_for_test/${t}`)}getAttachment(t){return this._api("GET",`get_attachment/${t}`)}deleteAttachment(t){return this._api("POST",`delete_attachment/${t}`)}getCase(t){return this._api("GET",`get_case/${t}`)}getCases(t,e){return d("cases",e,(e=>this._api("GET",`get_cases/${t}`,{query:e})))}getHistoryForCase(t,e){return d("history",e,(e=>this._api("GET",`get_history_for_case/${t}`,{query:e})))}addCase(t,e){return this._api("POST",`add_case/${t}`,{json:e})}copyCasesToSection(t,e){return this._api("POST",`copy_cases_to_section/${t}`,{json:e})}updateCase(t,e){return this._api("POST",`update_case/${t}`,{json:e})}updateCases(t,e){return this._api("POST",`update_cases/${t}`,{json:e})}moveCasesToSection(t,e){return this._api("POST",`move_cases_to_section/${t}`,{json:e})}deleteCase(t){return this._api("POST",`delete_case/${t}`)}deleteCases(t,e){return this._api("POST",`delete_cases/${t}`,{json:e})}getCaseFields(){return this._api("GET","get_case_fields")}addCaseField(t){return this._api("POST","add_case_field",{json:t})}getCaseTypes(){return this._api("GET","get_case_types")}getConfigs(t){return this._api("GET",`get_configs/${t}`)}addConfigGroup(t,e){return this._api("POST",`add_config_group/${t}`,{json:e})}addConfig(t,e){return this._api("POST",`add_config/${t}`,{json:e})}updateConfigGroup(t,e){return this._api("POST",`update_config_group/${t}`,{json:e})}updateConfig(t,e){return this._api("POST",`update_config/${t}`,{json:e})}deleteConfigGroup(t){return this._api("POST",`delete_config_group/${t}`)}deleteConfig(t){return this._api("POST",`delete_config/${t}`)}getMilestone(t){return this._api("GET",`get_milestone/${t}`)}getMilestones(t,e){return d("milestones",e,(e=>this._api("GET",`get_milestones/${t}`,{query:e})))}addMilestone(t,e){return this._api("POST",`add_milestone/${t}`,{json:e})}updateMilestone(t,e){return this._api("POST",`update_milestone/${t}`,{json:e})}deleteMilestone(t){return this._api("POST",`delete_milestone/${t}`)}getPlan(t){return this._api("GET",`get_plan/${t}`)}getPlans(t,e){return d("plans",e,(e=>this._api("GET",`get_plans/${t}`,{query:e})))}addPlan(t,e){return this._api("POST",`add_plan/${t}`,{json:e})}addPlanEntry(t,e){return this._api("POST",`add_plan_entry/${t}`,{json:e})}addRunToPlanEntry(t,e,r){return this._api("POST",`add_run_to_plan_entry/${t}/${e}`,{json:r})}updatePlan(t,e){return this._api("POST",`update_plan/${t}`,{json:e})}updatePlanEntry(t,e,r){return this._api("POST",`update_plan_entry/${t}/${e}`,{json:r})}updateRunInPlanEntry(t,e,r){return this._api("POST",`update_run_in_plan_entry/${t}/${e}`,{json:r})}closePlan(t){return this._api("POST",`close_plan/${t}`)}deletePlan(t){return this._api("POST",`delete_plan/${t}`)}deletePlanEntry(t,e){return this._api("POST",`delete_plan_entry/${t}/${e}`)}deleteRunFromPlanEntry(t){return this._api("POST",`delete_run_from_plan_entry/${t}`)}getPriorities(){return this._api("GET","get_priorities")}getProject(t){return this._api("GET",`get_project/${t}`)}getProjects(t){return d("projects",t,(t=>this._api("GET","get_projects",{query:t})))}addProject(t){return this._api("POST","add_project",{json:t})}updateProject(t,e){return this._api("POST",`update_project/${t}`,{json:e})}deleteProject(t){return this._api("POST",`delete_project/${t}`)}getReports(t){return this._api("GET",`get_reports/${t}`)}runReport(t){return this._api("POST",`run_report/${t}`)}getResults(t,e){return d("results",e,(e=>this._api("GET",`get_results/${t}`,{query:e})))}getResultsForCase(t,e,r){return d("results",r,(r=>this._api("GET",`get_results_for_case/${t}/${e}`,{query:r})))}getResultsForRun(t,e){return d("results",e,(e=>this._api("GET",`get_results_for_run/${t}`,{query:e})))}addResult(t,e){return this._api("POST",`add_result/${t}`,{json:e})}addResultForCase(t,e,r){return this._api("POST",`add_result_for_case/${t}/${e}`,{json:r})}addResults(t,e){return this._api("POST",`add_results/${t}`,{json:e})}addResultsForCases(t,e){return this._api("POST",`add_results_for_cases/${t}`,{json:e})}getResultFields(){return this._api("GET","get_result_fields")}getRun(t){return this._api("GET",`get_run/${t}`)}getRuns(t,e){return d("runs",e,(e=>this._api("GET",`get_runs/${t}`,{query:e})))}addRun(t,e){return this._api("POST",`add_run/${t}`,{json:e})}updateRun(t,e){return this._api("POST",`update_run/${t}`,{json:e})}closeRun(t){return this._api("POST",`close_run/${t}`)}deleteRun(t){return this._api("POST",`delete_run/${t}`)}getSection(t){return this._api("GET",`get_section/${t}`)}getSections(t,e){return d("sections",e,(e=>this._api("GET",`get_sections/${t}`,{query:e})))}addSection(t,e){return this._api("POST",`add_section/${t}`,{json:e})}moveSection(t,e){return this._api("POST",`move_section/${t}`,{json:e})}updateSection(t,e){return this._api("POST",`update_section/${t}`,{json:e})}deleteSection(t){return this._api("POST",`delete_section/${t}`)}getStatuses(){return this._api("GET","get_statuses")}getSuite(t){return this._api("GET",`get_suite/${t}`)}getSuites(t){return this._api("GET",`get_suites/${t}`)}addSuite(t,e){return this._api("POST",`add_suite/${t}`,{json:e})}updateSuite(t,e){return this._api("POST",`update_suite/${t}`,{json:e})}deleteSuite(t){return this._api("POST",`delete_suite/${t}`)}getTemplates(t){return this._api("GET",`get_templates/${t}`)}getTest(t){return this._api("GET",`get_test/${t}`)}getTests(t,e){return d("tests",e,(e=>this._api("GET",`get_tests/${t}`,{query:e})))}getUser(t){return this._api("GET",`get_user/${t}`)}getCurrentUser(){return this._api("GET","get_current_user")}getUserByEmail(t){return this._api("GET","get_user_by_email",{query:{email:t}})}getUsers(t){return this._api("GET","get_users",{query:t})}async _api(t,e,{query:r,json:n,form:a}={}){var i;const u={},_=this.baseURL+e+function(t){if(!t)return"";let e="";for(const[r,s]of Object.entries(t)){let t=s;"boolean"==typeof s?t=+s:Array.isArray(s)&&(t=s.join(",")),e+=`&${r}=${encodeURIComponent(t)}`}return e}(r);var d;let c;if(this.username&&this.password&&(u.Authorization=`Basic ${d=`${this.username}:${this.password}`,"undefined"!=typeof btoa?btoa(d):Buffer.from(d).toString("base64")}`),a||(u["Content-Type"]="application/json"),n)c=JSON.stringify(n);else if(a){c=new s;for(const[t,e]of Object.entries(a))e.name&&e.value?h(c,t,e.value,e.name):h(c,t,e)}for(;;){const e=await o(_,{method:t,body:c,headers:u});if(429===e.status){const t=1e3*parseInt(e.headers.get("Retry-After")||"1");await l(t);continue}if(409===e.status){await l(1e4);continue}const r=(null===(i=e.headers.get("Content-Type"))||void 0===i?void 0:i.includes("json"))?await e.json().catch((()=>({}))):await e.blob();if(e.ok)return r;throw new p.Exception(r.error||"No additional error message received")}}}async function d(t,e,r){if(e&&(e.hasOwnProperty("limit")||e.hasOwnProperty("offset"))){const s=await r(e);return Array.isArray(s)?s:s[t]||[]}let s=0,n=0;const a=[],i=new Set;for(;;){n=250*s++;let u=await d(t,{...e,limit:250,offset:n},r);if(u=u.filter((t=>!i.has(t.id)&&i.add(t.id))),a.push(...u),250!=u.length)break}return a}function h(t,e,r,s){if(s&&"undefined"!=typeof Blob){const n=r instanceof Blob?r:new Blob([r]);t.append(e,n,s)}else t.append(e,r,s)}function l(t){return new Promise((e=>setTimeout(e,t)))}p.Exception=_,module.exports=p;
"use strict";const t=require("http"),e=require("https"),r=require("node-fetch"),s=require("form-data"),n={keepAlive:!0},a=new t.Agent(n),i=new e.Agent(n),_=t=>"http:"===t.protocol?a:i,u=(t,e)=>r(t,{agent:_,...e});class o extends Error{constructor(t){super(t),this.name="TestRailException"}}class p{constructor(t){this.username=(null==t?void 0:t.username)||(null==t?void 0:t.user),this.password=null==t?void 0:t.password,this.baseURL=((null==t?void 0:t.host)||"")+"/index.php?/api/v2/"}addAttachmentToCase(t,e){return this._api("POST",`add_attachment_to_case/${t}`,{form:{attachment:e}})}addAttachmentToPlan(t,e){return this._api("POST",`add_attachment_to_plan/${t}`,{form:{attachment:e}})}addAttachmentToPlanEntry(t,e,r){return this._api("POST",`add_attachment_to_plan_entry/${t}/${e}`,{form:{attachment:r}})}addAttachmentToResult(t,e){return this._api("POST",`add_attachment_to_result/${t}`,{form:{attachment:e}})}addAttachmentToRun(t,e){return this._api("POST",`add_attachment_to_run/${t}`,{form:{attachment:e}})}getAttachmentsForCase(t,e){return d("attachments",e,(e=>this._api("GET",`get_attachments_for_case/${t}`,{query:e})))}getAttachmentsForPlan(t,e){return d("attachments",e,(e=>this._api("GET",`get_attachments_for_plan/${t}`,{query:e})))}getAttachmentsForPlanEntry(t,e){return this._api("GET",`get_attachments_for_plan_entry/${t}/${e}`)}getAttachmentsForRun(t,e){return d("attachments",e,(e=>this._api("GET",`get_attachments_for_run/${t}`,{query:e})))}getAttachmentsForTest(t){return this._api("GET",`get_attachments_for_test/${t}`)}getAttachment(t){return this._api("GET",`get_attachment/${t}`)}deleteAttachment(t){return this._api("POST",`delete_attachment/${t}`)}getCase(t){return this._api("GET",`get_case/${t}`)}getCases(t,e){return d("cases",e,(e=>this._api("GET",`get_cases/${t}`,{query:e})))}getHistoryForCase(t,e){return d("history",e,(e=>this._api("GET",`get_history_for_case/${t}`,{query:e})))}addCase(t,e){return this._api("POST",`add_case/${t}`,{json:e})}copyCasesToSection(t,e){return this._api("POST",`copy_cases_to_section/${t}`,{json:e})}updateCase(t,e){return this._api("POST",`update_case/${t}`,{json:e})}updateCases(t,e){return this._api("POST",`update_cases/${t}`,{json:e})}moveCasesToSection(t,e){return this._api("POST",`move_cases_to_section/${t}`,{json:e})}deleteCase(t){return this._api("POST",`delete_case/${t}`)}deleteCases(t,e){return this._api("POST",`delete_cases/${t}`,{json:e})}getCaseFields(){return this._api("GET","get_case_fields")}addCaseField(t){return this._api("POST","add_case_field",{json:t})}getCaseTypes(){return this._api("GET","get_case_types")}getConfigs(t){return this._api("GET",`get_configs/${t}`)}addConfigGroup(t,e){return this._api("POST",`add_config_group/${t}`,{json:e})}addConfig(t,e){return this._api("POST",`add_config/${t}`,{json:e})}updateConfigGroup(t,e){return this._api("POST",`update_config_group/${t}`,{json:e})}updateConfig(t,e){return this._api("POST",`update_config/${t}`,{json:e})}deleteConfigGroup(t){return this._api("POST",`delete_config_group/${t}`)}deleteConfig(t){return this._api("POST",`delete_config/${t}`)}getMilestone(t){return this._api("GET",`get_milestone/${t}`)}getMilestones(t,e){return d("milestones",e,(e=>this._api("GET",`get_milestones/${t}`,{query:e})))}addMilestone(t,e){return this._api("POST",`add_milestone/${t}`,{json:e})}updateMilestone(t,e){return this._api("POST",`update_milestone/${t}`,{json:e})}deleteMilestone(t){return this._api("POST",`delete_milestone/${t}`)}getPlan(t){return this._api("GET",`get_plan/${t}`)}getPlans(t,e){return d("plans",e,(e=>this._api("GET",`get_plans/${t}`,{query:e})))}addPlan(t,e){return this._api("POST",`add_plan/${t}`,{json:e})}addPlanEntry(t,e){return this._api("POST",`add_plan_entry/${t}`,{json:e})}addRunToPlanEntry(t,e,r){return this._api("POST",`add_run_to_plan_entry/${t}/${e}`,{json:r})}updatePlan(t,e){return this._api("POST",`update_plan/${t}`,{json:e})}updatePlanEntry(t,e,r){return this._api("POST",`update_plan_entry/${t}/${e}`,{json:r})}updateRunInPlanEntry(t,e,r){return this._api("POST",`update_run_in_plan_entry/${t}/${e}`,{json:r})}closePlan(t){return this._api("POST",`close_plan/${t}`)}deletePlan(t){return this._api("POST",`delete_plan/${t}`)}deletePlanEntry(t,e){return this._api("POST",`delete_plan_entry/${t}/${e}`)}deleteRunFromPlanEntry(t){return this._api("POST",`delete_run_from_plan_entry/${t}`)}getPriorities(){return this._api("GET","get_priorities")}getProject(t){return this._api("GET",`get_project/${t}`)}getProjects(t){return d("projects",t,(t=>this._api("GET","get_projects",{query:t})))}addProject(t){return this._api("POST","add_project",{json:t})}updateProject(t,e){return this._api("POST",`update_project/${t}`,{json:e})}deleteProject(t){return this._api("POST",`delete_project/${t}`)}getReports(t){return this._api("GET",`get_reports/${t}`)}runReport(t){return this._api("POST",`run_report/${t}`)}getResults(t,e){return d("results",e,(e=>this._api("GET",`get_results/${t}`,{query:e})))}getResultsForCase(t,e,r){return d("results",r,(r=>this._api("GET",`get_results_for_case/${t}/${e}`,{query:r})))}getResultsForRun(t,e){return d("results",e,(e=>this._api("GET",`get_results_for_run/${t}`,{query:e})))}addResult(t,e){return this._api("POST",`add_result/${t}`,{json:e})}addResultForCase(t,e,r){return this._api("POST",`add_result_for_case/${t}/${e}`,{json:r})}addResults(t,e){return this._api("POST",`add_results/${t}`,{json:e})}addResultsForCases(t,e){return this._api("POST",`add_results_for_cases/${t}`,{json:e})}getResultFields(){return this._api("GET","get_result_fields")}getRun(t){return this._api("GET",`get_run/${t}`)}getRuns(t,e){return d("runs",e,(e=>this._api("GET",`get_runs/${t}`,{query:e})))}addRun(t,e){return this._api("POST",`add_run/${t}`,{json:e})}updateRun(t,e){return this._api("POST",`update_run/${t}`,{json:e})}closeRun(t){return this._api("POST",`close_run/${t}`)}deleteRun(t){return this._api("POST",`delete_run/${t}`)}getSection(t){return this._api("GET",`get_section/${t}`)}getSections(t,e){return d("sections",e,(e=>this._api("GET",`get_sections/${t}`,{query:e})))}addSection(t,e){return this._api("POST",`add_section/${t}`,{json:e})}moveSection(t,e){return this._api("POST",`move_section/${t}`,{json:e})}updateSection(t,e){return this._api("POST",`update_section/${t}`,{json:e})}deleteSection(t){return this._api("POST",`delete_section/${t}`)}getSharedStep(t){return this._api("GET",`get_shared_step/${t}`)}getSharedSteps(t,e){return d("shared_steps",e,(e=>this._api("GET",`get_shared_steps/${t}`,{query:e})))}addSharedStep(t,e){return this._api("POST",`add_shared_step/${t}`,{json:e})}updateSharedStep(t,e){return this._api("POST",`update_shared_step/${t}`,{json:e})}deleteSharedStep(t,e){return this._api("POST",`delete_shared_step/${t}`,{json:e})}getStatuses(){return this._api("GET","get_statuses")}getSuite(t){return this._api("GET",`get_suite/${t}`)}getSuites(t){return this._api("GET",`get_suites/${t}`)}addSuite(t,e){return this._api("POST",`add_suite/${t}`,{json:e})}updateSuite(t,e){return this._api("POST",`update_suite/${t}`,{json:e})}deleteSuite(t){return this._api("POST",`delete_suite/${t}`)}getTemplates(t){return this._api("GET",`get_templates/${t}`)}getTest(t){return this._api("GET",`get_test/${t}`)}getTests(t,e){return d("tests",e,(e=>this._api("GET",`get_tests/${t}`,{query:e})))}getUser(t){return this._api("GET",`get_user/${t}`)}getCurrentUser(){return this._api("GET","get_current_user")}getUserByEmail(t){return this._api("GET","get_user_by_email",{query:{email:t}})}getUsers(t){return this._api("GET","get_users",{query:t})}async _api(t,e,{query:r,json:n,form:a}={}){var i;const _={},o=this.baseURL+e+function(t){if(!t)return"";let e="";for(const[r,s]of Object.entries(t)){let t=s;"boolean"==typeof s?t=+s:Array.isArray(s)&&(t=s.join(",")),e+=`&${r}=${encodeURIComponent(t)}`}return e}(r);var d;let c;if(this.username&&this.password&&(_.Authorization=`Basic ${d=`${this.username}:${this.password}`,"undefined"!=typeof btoa?btoa(d):Buffer.from(d).toString("base64")}`),a||(_["Content-Type"]="application/json"),n)c=JSON.stringify(n);else if(a){c=new s;for(const[t,e]of Object.entries(a))e.name&&e.value?h(c,t,e.value,e.name):h(c,t,e)}for(;;){const e=await u(o,{method:t,body:c,headers:_});if(429===e.status){const t=1e3*parseInt(e.headers.get("Retry-After")||"1");await l(t);continue}if(409===e.status){await l(1e4);continue}const r=(null===(i=e.headers.get("Content-Type"))||void 0===i?void 0:i.includes("json"))?await e.json().catch((()=>({}))):await e.blob();if(e.ok)return r;throw new p.Exception(r.error||"No additional error message received")}}}async function d(t,e,r){if(e&&(e.hasOwnProperty("limit")||e.hasOwnProperty("offset"))){const s=await r(e);return Array.isArray(s)?s:s[t]||[]}let s=0,n=0;const a=[],i=new Set;for(;;){n=250*s++;let _=await d(t,{...e,limit:250,offset:n},r);if(_=_.filter((t=>!i.has(t.id)&&i.add(t.id))),a.push(..._),250!=_.length)break}return a}function h(t,e,r,s){if(s&&"undefined"!=typeof Blob){const n=r instanceof Blob?r:new Blob([r]);t.append(e,n,s)}else t.append(e,r,s)}function l(t){return new Promise((e=>setTimeout(e,t)))}p.Exception=o,module.exports=p;
//# sourceMappingURL=TestRail.node.js.map

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).TestRail=e()}(this,(function(){"use strict";class t extends Error{constructor(t){super(t),this.name="TestRailException"}}class e{constructor(t){this.username=(null==t?void 0:t.username)||(null==t?void 0:t.user),this.password=null==t?void 0:t.password,this.baseURL=((null==t?void 0:t.host)||"")+"/index.php?/api/v2/"}addAttachmentToCase(t,e){return this._api("POST",`add_attachment_to_case/${t}`,{form:{attachment:e}})}addAttachmentToPlan(t,e){return this._api("POST",`add_attachment_to_plan/${t}`,{form:{attachment:e}})}addAttachmentToPlanEntry(t,e,s){return this._api("POST",`add_attachment_to_plan_entry/${t}/${e}`,{form:{attachment:s}})}addAttachmentToResult(t,e){return this._api("POST",`add_attachment_to_result/${t}`,{form:{attachment:e}})}addAttachmentToRun(t,e){return this._api("POST",`add_attachment_to_run/${t}`,{form:{attachment:e}})}getAttachmentsForCase(t,e){return s("attachments",e,(e=>this._api("GET",`get_attachments_for_case/${t}`,{query:e})))}getAttachmentsForPlan(t,e){return s("attachments",e,(e=>this._api("GET",`get_attachments_for_plan/${t}`,{query:e})))}getAttachmentsForPlanEntry(t,e){return this._api("GET",`get_attachments_for_plan_entry/${t}/${e}`)}getAttachmentsForRun(t,e){return s("attachments",e,(e=>this._api("GET",`get_attachments_for_run/${t}`,{query:e})))}getAttachmentsForTest(t){return this._api("GET",`get_attachments_for_test/${t}`)}getAttachment(t){return this._api("GET",`get_attachment/${t}`)}deleteAttachment(t){return this._api("POST",`delete_attachment/${t}`)}getCase(t){return this._api("GET",`get_case/${t}`)}getCases(t,e){return s("cases",e,(e=>this._api("GET",`get_cases/${t}`,{query:e})))}getHistoryForCase(t,e){return s("history",e,(e=>this._api("GET",`get_history_for_case/${t}`,{query:e})))}addCase(t,e){return this._api("POST",`add_case/${t}`,{json:e})}copyCasesToSection(t,e){return this._api("POST",`copy_cases_to_section/${t}`,{json:e})}updateCase(t,e){return this._api("POST",`update_case/${t}`,{json:e})}updateCases(t,e){return this._api("POST",`update_cases/${t}`,{json:e})}moveCasesToSection(t,e){return this._api("POST",`move_cases_to_section/${t}`,{json:e})}deleteCase(t){return this._api("POST",`delete_case/${t}`)}deleteCases(t,e){return this._api("POST",`delete_cases/${t}`,{json:e})}getCaseFields(){return this._api("GET","get_case_fields")}addCaseField(t){return this._api("POST","add_case_field",{json:t})}getCaseTypes(){return this._api("GET","get_case_types")}getConfigs(t){return this._api("GET",`get_configs/${t}`)}addConfigGroup(t,e){return this._api("POST",`add_config_group/${t}`,{json:e})}addConfig(t,e){return this._api("POST",`add_config/${t}`,{json:e})}updateConfigGroup(t,e){return this._api("POST",`update_config_group/${t}`,{json:e})}updateConfig(t,e){return this._api("POST",`update_config/${t}`,{json:e})}deleteConfigGroup(t){return this._api("POST",`delete_config_group/${t}`)}deleteConfig(t){return this._api("POST",`delete_config/${t}`)}getMilestone(t){return this._api("GET",`get_milestone/${t}`)}getMilestones(t,e){return s("milestones",e,(e=>this._api("GET",`get_milestones/${t}`,{query:e})))}addMilestone(t,e){return this._api("POST",`add_milestone/${t}`,{json:e})}updateMilestone(t,e){return this._api("POST",`update_milestone/${t}`,{json:e})}deleteMilestone(t){return this._api("POST",`delete_milestone/${t}`)}getPlan(t){return this._api("GET",`get_plan/${t}`)}getPlans(t,e){return s("plans",e,(e=>this._api("GET",`get_plans/${t}`,{query:e})))}addPlan(t,e){return this._api("POST",`add_plan/${t}`,{json:e})}addPlanEntry(t,e){return this._api("POST",`add_plan_entry/${t}`,{json:e})}addRunToPlanEntry(t,e,s){return this._api("POST",`add_run_to_plan_entry/${t}/${e}`,{json:s})}updatePlan(t,e){return this._api("POST",`update_plan/${t}`,{json:e})}updatePlanEntry(t,e,s){return this._api("POST",`update_plan_entry/${t}/${e}`,{json:s})}updateRunInPlanEntry(t,e,s){return this._api("POST",`update_run_in_plan_entry/${t}/${e}`,{json:s})}closePlan(t){return this._api("POST",`close_plan/${t}`)}deletePlan(t){return this._api("POST",`delete_plan/${t}`)}deletePlanEntry(t,e){return this._api("POST",`delete_plan_entry/${t}/${e}`)}deleteRunFromPlanEntry(t){return this._api("POST",`delete_run_from_plan_entry/${t}`)}getPriorities(){return this._api("GET","get_priorities")}getProject(t){return this._api("GET",`get_project/${t}`)}getProjects(t){return s("projects",t,(t=>this._api("GET","get_projects",{query:t})))}addProject(t){return this._api("POST","add_project",{json:t})}updateProject(t,e){return this._api("POST",`update_project/${t}`,{json:e})}deleteProject(t){return this._api("POST",`delete_project/${t}`)}getReports(t){return this._api("GET",`get_reports/${t}`)}runReport(t){return this._api("POST",`run_report/${t}`)}getResults(t,e){return s("results",e,(e=>this._api("GET",`get_results/${t}`,{query:e})))}getResultsForCase(t,e,r){return s("results",r,(s=>this._api("GET",`get_results_for_case/${t}/${e}`,{query:s})))}getResultsForRun(t,e){return s("results",e,(e=>this._api("GET",`get_results_for_run/${t}`,{query:e})))}addResult(t,e){return this._api("POST",`add_result/${t}`,{json:e})}addResultForCase(t,e,s){return this._api("POST",`add_result_for_case/${t}/${e}`,{json:s})}addResults(t,e){return this._api("POST",`add_results/${t}`,{json:e})}addResultsForCases(t,e){return this._api("POST",`add_results_for_cases/${t}`,{json:e})}getResultFields(){return this._api("GET","get_result_fields")}getRun(t){return this._api("GET",`get_run/${t}`)}getRuns(t,e){return s("runs",e,(e=>this._api("GET",`get_runs/${t}`,{query:e})))}addRun(t,e){return this._api("POST",`add_run/${t}`,{json:e})}updateRun(t,e){return this._api("POST",`update_run/${t}`,{json:e})}closeRun(t){return this._api("POST",`close_run/${t}`)}deleteRun(t){return this._api("POST",`delete_run/${t}`)}getSection(t){return this._api("GET",`get_section/${t}`)}getSections(t,e){return s("sections",e,(e=>this._api("GET",`get_sections/${t}`,{query:e})))}addSection(t,e){return this._api("POST",`add_section/${t}`,{json:e})}moveSection(t,e){return this._api("POST",`move_section/${t}`,{json:e})}updateSection(t,e){return this._api("POST",`update_section/${t}`,{json:e})}deleteSection(t){return this._api("POST",`delete_section/${t}`)}getStatuses(){return this._api("GET","get_statuses")}getSuite(t){return this._api("GET",`get_suite/${t}`)}getSuites(t){return this._api("GET",`get_suites/${t}`)}addSuite(t,e){return this._api("POST",`add_suite/${t}`,{json:e})}updateSuite(t,e){return this._api("POST",`update_suite/${t}`,{json:e})}deleteSuite(t){return this._api("POST",`delete_suite/${t}`)}getTemplates(t){return this._api("GET",`get_templates/${t}`)}getTest(t){return this._api("GET",`get_test/${t}`)}getTests(t,e){return s("tests",e,(e=>this._api("GET",`get_tests/${t}`,{query:e})))}getUser(t){return this._api("GET",`get_user/${t}`)}getCurrentUser(){return this._api("GET","get_current_user")}getUserByEmail(t){return this._api("GET","get_user_by_email",{query:{email:t}})}getUsers(t){return this._api("GET","get_users",{query:t})}async _api(t,s,{query:a,json:i,form:o}={}){var u;const _={},p=this.baseURL+s+function(t){if(!t)return"";let e="";for(const[s,r]of Object.entries(t)){let t=r;"boolean"==typeof r?t=+r:Array.isArray(r)&&(t=r.join(",")),e+=`&${s}=${encodeURIComponent(t)}`}return e}(a);var d;let h;if(this.username&&this.password&&(_.Authorization=`Basic ${d=`${this.username}:${this.password}`,"undefined"!=typeof btoa?btoa(d):Buffer.from(d).toString("base64")}`),o||(_["Content-Type"]="application/json"),i)h=JSON.stringify(i);else if(o){h=new FormData;for(const[t,e]of Object.entries(o))e.name&&e.value?r(h,t,e.value,e.name):r(h,t,e)}for(;;){const s=await fetch(p,{method:t,body:h,headers:_});if(429===s.status){const t=1e3*parseInt(s.headers.get("Retry-After")||"1");await n(t);continue}if(409===s.status){await n(1e4);continue}const r=(null===(u=s.headers.get("Content-Type"))||void 0===u?void 0:u.includes("json"))?await s.json().catch((()=>({}))):await s.blob();if(s.ok)return r;throw new e.Exception(r.error||"No additional error message received")}}}async function s(t,e,r){if(e&&(e.hasOwnProperty("limit")||e.hasOwnProperty("offset"))){const s=await r(e);return Array.isArray(s)?s:s[t]||[]}let n=0,a=0;const i=[],o=new Set;for(;;){a=250*n++;let u=await s(t,{...e,limit:250,offset:a},r);if(u=u.filter((t=>!o.has(t.id)&&o.add(t.id))),i.push(...u),250!=u.length)break}return i}function r(t,e,s,r){if(r&&"undefined"!=typeof Blob){const n=s instanceof Blob?s:new Blob([s]);t.append(e,n,r)}else t.append(e,s,r)}function n(t){return new Promise((e=>setTimeout(e,t)))}return e.Exception=t,e}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).TestRail=e()}(this,(function(){"use strict";class t extends Error{constructor(t){super(t),this.name="TestRailException"}}class e{constructor(t){this.username=(null==t?void 0:t.username)||(null==t?void 0:t.user),this.password=null==t?void 0:t.password,this.baseURL=((null==t?void 0:t.host)||"")+"/index.php?/api/v2/"}addAttachmentToCase(t,e){return this._api("POST",`add_attachment_to_case/${t}`,{form:{attachment:e}})}addAttachmentToPlan(t,e){return this._api("POST",`add_attachment_to_plan/${t}`,{form:{attachment:e}})}addAttachmentToPlanEntry(t,e,s){return this._api("POST",`add_attachment_to_plan_entry/${t}/${e}`,{form:{attachment:s}})}addAttachmentToResult(t,e){return this._api("POST",`add_attachment_to_result/${t}`,{form:{attachment:e}})}addAttachmentToRun(t,e){return this._api("POST",`add_attachment_to_run/${t}`,{form:{attachment:e}})}getAttachmentsForCase(t,e){return s("attachments",e,(e=>this._api("GET",`get_attachments_for_case/${t}`,{query:e})))}getAttachmentsForPlan(t,e){return s("attachments",e,(e=>this._api("GET",`get_attachments_for_plan/${t}`,{query:e})))}getAttachmentsForPlanEntry(t,e){return this._api("GET",`get_attachments_for_plan_entry/${t}/${e}`)}getAttachmentsForRun(t,e){return s("attachments",e,(e=>this._api("GET",`get_attachments_for_run/${t}`,{query:e})))}getAttachmentsForTest(t){return this._api("GET",`get_attachments_for_test/${t}`)}getAttachment(t){return this._api("GET",`get_attachment/${t}`)}deleteAttachment(t){return this._api("POST",`delete_attachment/${t}`)}getCase(t){return this._api("GET",`get_case/${t}`)}getCases(t,e){return s("cases",e,(e=>this._api("GET",`get_cases/${t}`,{query:e})))}getHistoryForCase(t,e){return s("history",e,(e=>this._api("GET",`get_history_for_case/${t}`,{query:e})))}addCase(t,e){return this._api("POST",`add_case/${t}`,{json:e})}copyCasesToSection(t,e){return this._api("POST",`copy_cases_to_section/${t}`,{json:e})}updateCase(t,e){return this._api("POST",`update_case/${t}`,{json:e})}updateCases(t,e){return this._api("POST",`update_cases/${t}`,{json:e})}moveCasesToSection(t,e){return this._api("POST",`move_cases_to_section/${t}`,{json:e})}deleteCase(t){return this._api("POST",`delete_case/${t}`)}deleteCases(t,e){return this._api("POST",`delete_cases/${t}`,{json:e})}getCaseFields(){return this._api("GET","get_case_fields")}addCaseField(t){return this._api("POST","add_case_field",{json:t})}getCaseTypes(){return this._api("GET","get_case_types")}getConfigs(t){return this._api("GET",`get_configs/${t}`)}addConfigGroup(t,e){return this._api("POST",`add_config_group/${t}`,{json:e})}addConfig(t,e){return this._api("POST",`add_config/${t}`,{json:e})}updateConfigGroup(t,e){return this._api("POST",`update_config_group/${t}`,{json:e})}updateConfig(t,e){return this._api("POST",`update_config/${t}`,{json:e})}deleteConfigGroup(t){return this._api("POST",`delete_config_group/${t}`)}deleteConfig(t){return this._api("POST",`delete_config/${t}`)}getMilestone(t){return this._api("GET",`get_milestone/${t}`)}getMilestones(t,e){return s("milestones",e,(e=>this._api("GET",`get_milestones/${t}`,{query:e})))}addMilestone(t,e){return this._api("POST",`add_milestone/${t}`,{json:e})}updateMilestone(t,e){return this._api("POST",`update_milestone/${t}`,{json:e})}deleteMilestone(t){return this._api("POST",`delete_milestone/${t}`)}getPlan(t){return this._api("GET",`get_plan/${t}`)}getPlans(t,e){return s("plans",e,(e=>this._api("GET",`get_plans/${t}`,{query:e})))}addPlan(t,e){return this._api("POST",`add_plan/${t}`,{json:e})}addPlanEntry(t,e){return this._api("POST",`add_plan_entry/${t}`,{json:e})}addRunToPlanEntry(t,e,s){return this._api("POST",`add_run_to_plan_entry/${t}/${e}`,{json:s})}updatePlan(t,e){return this._api("POST",`update_plan/${t}`,{json:e})}updatePlanEntry(t,e,s){return this._api("POST",`update_plan_entry/${t}/${e}`,{json:s})}updateRunInPlanEntry(t,e,s){return this._api("POST",`update_run_in_plan_entry/${t}/${e}`,{json:s})}closePlan(t){return this._api("POST",`close_plan/${t}`)}deletePlan(t){return this._api("POST",`delete_plan/${t}`)}deletePlanEntry(t,e){return this._api("POST",`delete_plan_entry/${t}/${e}`)}deleteRunFromPlanEntry(t){return this._api("POST",`delete_run_from_plan_entry/${t}`)}getPriorities(){return this._api("GET","get_priorities")}getProject(t){return this._api("GET",`get_project/${t}`)}getProjects(t){return s("projects",t,(t=>this._api("GET","get_projects",{query:t})))}addProject(t){return this._api("POST","add_project",{json:t})}updateProject(t,e){return this._api("POST",`update_project/${t}`,{json:e})}deleteProject(t){return this._api("POST",`delete_project/${t}`)}getReports(t){return this._api("GET",`get_reports/${t}`)}runReport(t){return this._api("POST",`run_report/${t}`)}getResults(t,e){return s("results",e,(e=>this._api("GET",`get_results/${t}`,{query:e})))}getResultsForCase(t,e,r){return s("results",r,(s=>this._api("GET",`get_results_for_case/${t}/${e}`,{query:s})))}getResultsForRun(t,e){return s("results",e,(e=>this._api("GET",`get_results_for_run/${t}`,{query:e})))}addResult(t,e){return this._api("POST",`add_result/${t}`,{json:e})}addResultForCase(t,e,s){return this._api("POST",`add_result_for_case/${t}/${e}`,{json:s})}addResults(t,e){return this._api("POST",`add_results/${t}`,{json:e})}addResultsForCases(t,e){return this._api("POST",`add_results_for_cases/${t}`,{json:e})}getResultFields(){return this._api("GET","get_result_fields")}getRun(t){return this._api("GET",`get_run/${t}`)}getRuns(t,e){return s("runs",e,(e=>this._api("GET",`get_runs/${t}`,{query:e})))}addRun(t,e){return this._api("POST",`add_run/${t}`,{json:e})}updateRun(t,e){return this._api("POST",`update_run/${t}`,{json:e})}closeRun(t){return this._api("POST",`close_run/${t}`)}deleteRun(t){return this._api("POST",`delete_run/${t}`)}getSection(t){return this._api("GET",`get_section/${t}`)}getSections(t,e){return s("sections",e,(e=>this._api("GET",`get_sections/${t}`,{query:e})))}addSection(t,e){return this._api("POST",`add_section/${t}`,{json:e})}moveSection(t,e){return this._api("POST",`move_section/${t}`,{json:e})}updateSection(t,e){return this._api("POST",`update_section/${t}`,{json:e})}deleteSection(t){return this._api("POST",`delete_section/${t}`)}getSharedStep(t){return this._api("GET",`get_shared_step/${t}`)}getSharedSteps(t,e){return s("shared_steps",e,(e=>this._api("GET",`get_shared_steps/${t}`,{query:e})))}addSharedStep(t,e){return this._api("POST",`add_shared_step/${t}`,{json:e})}updateSharedStep(t,e){return this._api("POST",`update_shared_step/${t}`,{json:e})}deleteSharedStep(t,e){return this._api("POST",`delete_shared_step/${t}`,{json:e})}getStatuses(){return this._api("GET","get_statuses")}getSuite(t){return this._api("GET",`get_suite/${t}`)}getSuites(t){return this._api("GET",`get_suites/${t}`)}addSuite(t,e){return this._api("POST",`add_suite/${t}`,{json:e})}updateSuite(t,e){return this._api("POST",`update_suite/${t}`,{json:e})}deleteSuite(t){return this._api("POST",`delete_suite/${t}`)}getTemplates(t){return this._api("GET",`get_templates/${t}`)}getTest(t){return this._api("GET",`get_test/${t}`)}getTests(t,e){return s("tests",e,(e=>this._api("GET",`get_tests/${t}`,{query:e})))}getUser(t){return this._api("GET",`get_user/${t}`)}getCurrentUser(){return this._api("GET","get_current_user")}getUserByEmail(t){return this._api("GET","get_user_by_email",{query:{email:t}})}getUsers(t){return this._api("GET","get_users",{query:t})}async _api(t,s,{query:a,json:i,form:u}={}){var _;const o={},p=this.baseURL+s+function(t){if(!t)return"";let e="";for(const[s,r]of Object.entries(t)){let t=r;"boolean"==typeof r?t=+r:Array.isArray(r)&&(t=r.join(",")),e+=`&${s}=${encodeURIComponent(t)}`}return e}(a);var d;let h;if(this.username&&this.password&&(o.Authorization=`Basic ${d=`${this.username}:${this.password}`,"undefined"!=typeof btoa?btoa(d):Buffer.from(d).toString("base64")}`),u||(o["Content-Type"]="application/json"),i)h=JSON.stringify(i);else if(u){h=new FormData;for(const[t,e]of Object.entries(u))e.name&&e.value?r(h,t,e.value,e.name):r(h,t,e)}for(;;){const s=await fetch(p,{method:t,body:h,headers:o});if(429===s.status){const t=1e3*parseInt(s.headers.get("Retry-After")||"1");await n(t);continue}if(409===s.status){await n(1e4);continue}const r=(null===(_=s.headers.get("Content-Type"))||void 0===_?void 0:_.includes("json"))?await s.json().catch((()=>({}))):await s.blob();if(s.ok)return r;throw new e.Exception(r.error||"No additional error message received")}}}async function s(t,e,r){if(e&&(e.hasOwnProperty("limit")||e.hasOwnProperty("offset"))){const s=await r(e);return Array.isArray(s)?s:s[t]||[]}let n=0,a=0;const i=[],u=new Set;for(;;){a=250*n++;let _=await s(t,{...e,limit:250,offset:a},r);if(_=_.filter((t=>!u.has(t.id)&&u.add(t.id))),i.push(..._),250!=_.length)break}return i}function r(t,e,s,r){if(r&&"undefined"!=typeof Blob){const n=s instanceof Blob?s:new Blob([s]);t.append(e,n,r)}else t.append(e,s,r)}function n(t){return new Promise((e=>setTimeout(e,t)))}return e.Exception=t,e}));
//# sourceMappingURL=TestRail.umd.js.map
{
"name": "@dlenroc/testrail",
"description": "TestRail API client with error handling and typing",
"version": "1.2.0",
"version": "1.3.0",
"author": "Corneliu Duplachi",

@@ -6,0 +6,0 @@ "license": "MIT",

[![Node.js CI](https://github.com/dlenroc/node-testrail-api/workflows/Node.js%20CI/badge.svg)](https://github.com/dlenroc/node-testrail-api/actions?query=workflow%3A"Node.js+CI")
[![Supported Node.js version](https://img.shields.io/node/v/@dlenroc/testrail)](https://github.com/dlenroc/node-testrail-api/actions?query=workflow%3A"Node.js+CI")
[![Dependencies status](https://img.shields.io/david/dlenroc/node-testrail-api)](package.json)
[![NPM Version](https://img.shields.io/npm/v/@dlenroc/testrail?cacheSeconds=86400)](https://www.npmjs.com/package/@dlenroc/testrail)

@@ -34,2 +33,6 @@

```typescript
addAttachmentToCase(caseId: number, payload: AddAttachment): Promise<CreatedAttachment>;
```
```typescript
addAttachmentToPlan(planId: number, payload: AddAttachment): Promise<CreatedAttachment>;

@@ -51,7 +54,7 @@ ```

```typescript
getAttachmentsForCase(caseId: number): Promise<AttachmentForCase[]>;
getAttachmentsForCase(caseId: number, filters?: Pagination): Promise<AttachmentForCase[]>;
```
```typescript
getAttachmentsForPlan(planId: number): Promise<AttachmentForPlan[]>;
getAttachmentsForPlan(planId: number, filters?: Pagination): Promise<AttachmentForPlan[]>;
```

@@ -64,3 +67,3 @@

```typescript
getAttachmentsForRun(runId: number): Promise<AttachmentForRun[]>;
getAttachmentsForRun(runId: number, filters?: Pagination): Promise<AttachmentForRun[]>;
```

@@ -91,3 +94,3 @@

```typescript
getHistoryForCase(caseId: number): Promise<TestRail.Model.CaseHistory[]>;
getHistoryForCase(caseId: number, filters?: Pagination): Promise<CaseHistory[]>;
```

@@ -100,3 +103,3 @@

```typescript
updateCases(suiteId: number, payload: UpdateCases): Promise<void>;
copyCasesToSection(sectionId: number, payload: CopyCasesToSection): Promise<void>;
```

@@ -109,2 +112,10 @@

```typescript
updateCases(suiteId: number, payload: UpdateCases): Promise<void>;
```
```typescript
moveCasesToSection(sectionId: number, payload: MoveCasesToSection): Promise<void>;
```
```typescript
deleteCase(caseId: number): Promise<void>;

@@ -292,3 +303,3 @@ ```

```typescript
addResultForCase(runId: number, caseId: number, payload: AddResultForCase): Promise<Result>;
addResultForCase(runId: number, caseId: number, payload: AddResult): Promise<Result>;
```

@@ -351,2 +362,6 @@

```typescript
moveSection(sectionId: number, payload: MoveSection): Promise<Section>;
```
```typescript
updateSection(sectionId: number, payload: UpdateSection): Promise<Section>;

@@ -359,2 +374,24 @@ ```

#### Shared Steps
```typescript
getSharedStep(stepId: number): Promise<Response.SharedStep>;
```
```typescript
getSharedSteps(projectId: number, filters?: Request.SharedStepFilters): Promise<Response.SharedStep[]>;
```
```typescript
addSharedStep(projectId: number, payload: Request.AddSharedStep): Promise<Response.SharedStep>;
```
```typescript
updateSharedStep(stepId: number, payload: Request.UpdateSharedStep): Promise<Response.SharedStep>;
```
```typescript
deleteSharedStep(stepId: number, payload?: Request.DeleteSharedStep): Promise<void>;
```
#### Statuses

@@ -361,0 +398,0 @@

@@ -18,2 +18,3 @@ export * from './AddAttachment';

export * from './AddSection';
export * from './AddSharedStep';
export * from './AddSuite';

@@ -23,2 +24,3 @@ export * from './CaseFilters';

export * from './DeleteCases';
export * from './DeleteSharedStep';
export * from './MilestoneFilters';

@@ -34,2 +36,3 @@ export * from './MoveCasesToSection';

export * from './SectionFilters';
export * from './SharedStepFilters';
export * from './TestFilters';

@@ -47,3 +50,4 @@ export * from './UpdateCase';

export * from './UpdateSection';
export * from './UpdateSharedStep';
export * from './UpdateSuite';
export * from './UserFilters';

@@ -5,5 +5,6 @@ export interface Case extends Record<string, unknown> {

display_order: number;
estimate_forecast?: string;
estimate?: string;
estimate_forecast?: string;
id: number;
is_deleted: number;
milestone_id?: number;

@@ -10,0 +11,0 @@ priority_id: number;

@@ -30,2 +30,3 @@ export * from './Attachment';

export * from './Section';
export * from './SharedStep';
export * from './Status';

@@ -32,0 +33,0 @@ export * from './Suite';

@@ -383,2 +383,26 @@ import { Request, Response } from './payload';

// Shared steps
getSharedStep(stepId: number): Promise<Response.SharedStep> {
return this._api('GET', `get_shared_step/${stepId}`);
}
getSharedSteps(projectId: number, filters?: Request.SharedStepFilters): Promise<Response.SharedStep[]> {
return pagination('shared_steps', filters, (filters) => {
return this._api('GET', `get_shared_steps/${projectId}`, { query: filters });
});
}
addSharedStep(projectId: number, payload: Request.AddSharedStep): Promise<Response.SharedStep> {
return this._api('POST', `add_shared_step/${projectId}`, { json: payload });
}
updateSharedStep(stepId: number, payload: Request.UpdateSharedStep): Promise<Response.SharedStep> {
return this._api('POST', `update_shared_step/${stepId}`, { json: payload });
}
deleteSharedStep(stepId: number, payload?: Request.DeleteSharedStep): Promise<void> {
return this._api('POST', `delete_shared_step/${stepId}`, { json: payload });
}
// Statuses

@@ -385,0 +409,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc