Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions model/savedSearchModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ class savedSearchModel {
savedSearchAction.pressSaveReport(payload.sendReport.type, payload.sendReport.selector)
}

createNewSavedSearch(payload){
return savedSearchAPI.createTableAndPolulate(payload);
}

createYamlFile(payload){
return savedSearchAPI.createYamlFile(payload);
}
}

export default new savedSearchModel();
40 changes: 40 additions & 0 deletions pages/savedSearchAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,46 @@ class SavedSearchAPI {
});
});
}
/* payload must be in this format
payload = {
"yaml_file_name": "name_savedSearch.yaml",
"saved_search_ids": ID_SAVED_SEARCH
}
add `SAVED_SEARCH_ADVANCED_CONFIGURATION_ENDPOINT_ENABLED=true` variable in the .env file before use this method
*/
createTableAndPolulate(payload){
return cy.window().then(win => {
return win.ProcessMaker.apiClient.post(
`/saved-searches/advanced-configurations/`,
payload
).then(response => {
return response.data
});
});
}

/* payload must be in this format
payload = {
"saved_search_id": 620,
"yaml_file_name": "qa_ss620.yaml",
"creation_schedule":{
"date":"2026-10-08",
"time":"14:00",
"timezone":"UTC"
}
}
add `SAVED_SEARCH_ADVANCED_CONFIGURATION_ENDPOINT_ENABLED=true` variable in the .env file before use this method
*/
createYamlFile(payload){
return cy.window().then(win => {
return win.ProcessMaker.apiClient.post(
`/saved-searches/advanced-configurations/yaml-files`,
payload
).then(response => {
return response.data
});
});
}
}

export default new SavedSearchAPI();
Loading