Skip to content

Commit f8096aa

Browse files
committed
Correction of default parameters in methods
1 parent c6d366c commit f8096aa

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/platformApi/PlatformApiLogicClient.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class PlatformApiLogicClient extends PlatformApiRestClient {
2626
* @param {string} options.workspaceId Id of the workspace to search
2727
* @returns {Promise<[]>} An array of flows
2828
*/
29-
async fetchAllFlowsForWorkspace(options: AllFlowsForWorkspaceOptions): Promise<any[]> {
29+
async fetchAllFlowsForWorkspace(options: AllFlowsForWorkspaceOptions = {}): Promise<any[]> {
3030
const {
3131
objectsPerPage = DEFAULT_OBJECTS_PER_PAGE,
3232
parallelCalls = DEFAULT_PARALLEL_PLATFORM_API_CALLS,
@@ -64,7 +64,7 @@ export class PlatformApiLogicClient extends PlatformApiRestClient {
6464
* componentId: string,
6565
* }}]>}
6666
*/
67-
async fetchAllCredentialsForWorkspace(options) {
67+
async fetchAllCredentialsForWorkspace(options: any = {}) {
6868
const {
6969
workspaceId,
7070
} = options;
@@ -89,7 +89,7 @@ export class PlatformApiLogicClient extends PlatformApiRestClient {
8989
* componentDevTeam: string
9090
* }}]>}
9191
*/
92-
async fetchComponentsAccessibleFromContract(options) {
92+
async fetchComponentsAccessibleFromContract(options: any = {}) {
9393
const {
9494
contractId,
9595
} = options;
@@ -132,7 +132,7 @@ export class PlatformApiLogicClient extends PlatformApiRestClient {
132132
* workspaceDetails: object
133133
* }}]>}
134134
*/
135-
async fetchFlowList(options: any) {
135+
async fetchFlowList(options: any = {}) {
136136
const {
137137
parallelCalls = DEFAULT_PARALLEL_PLATFORM_API_CALLS,
138138
workspaceId,
@@ -147,10 +147,10 @@ export class PlatformApiLogicClient extends PlatformApiRestClient {
147147
const workspaces = await this.fetchWorkspaceList({});
148148
if (!workspaceId) {
149149
const nonFlatFlows = await mapLimit(workspaces, realSplitFactor,
150-
async workspace => this.fetchAllFlowsForWorkspace({
151-
parallelCalls: parallelizationPerTask,
152-
workspaceId: workspace.workspaceId,
153-
}));
150+
async workspace => this.fetchAllFlowsForWorkspace({
151+
parallelCalls: parallelizationPerTask,
152+
workspaceId: workspace.workspaceId,
153+
}));
154154
flows = nonFlatFlows.flat();
155155
} else {
156156
flows = await this.fetchAllFlowsForWorkspace({
@@ -187,7 +187,7 @@ export class PlatformApiLogicClient extends PlatformApiRestClient {
187187
* workspaceDetails: object
188188
* }}]>}
189189
*/
190-
async fetchWorkspaceList(options: WorkspaceListOptions) {
190+
async fetchWorkspaceList(options: WorkspaceListOptions = {}) {
191191
if (!this.workspaceList) {
192192
const {
193193
objectsPerPage = DEFAULT_OBJECTS_PER_PAGE,
@@ -420,7 +420,7 @@ export class PlatformApiLogicClient extends PlatformApiRestClient {
420420
* @returns {Promise<>}
421421
*/
422422
/* eslint-disable no-await-in-loop */
423-
async changeFlowState(options) {
423+
async changeFlowState(options: any = {}) {
424424
const {
425425
timeout = 90000,
426426
pollInterval = 1000,
@@ -487,7 +487,7 @@ export class PlatformApiLogicClient extends PlatformApiRestClient {
487487
});
488488
}
489489

490-
async hydrateFlow(options) {
490+
async hydrateFlow(options: any = {}) {
491491
const {
492492
flow,
493493
includeDataSamples,
@@ -521,7 +521,7 @@ export class PlatformApiLogicClient extends PlatformApiRestClient {
521521
/* eslint-disable-next-line no-param-reassign */
522522
soFar[sample.sampleId] = sample.sample;
523523
return soFar;
524-
}, {});
524+
}, {});
525525
flow.attributes.graph.nodes
526526
.filter(node => node.selected_data_samples)
527527
.forEach((node) => {

0 commit comments

Comments
 (0)