otomato-sdk 2.0.6 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -79,18 +79,26 @@ class ApiServices {
|
|
|
79
79
|
return response.data;
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
getWorkflowsOfUser(offset, limit) {
|
|
82
|
+
getWorkflowsOfUser(offset, limit, isActive, query) {
|
|
83
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
84
|
if (!this.auth) {
|
|
85
85
|
throw new Error('Authorization token is required');
|
|
86
86
|
}
|
|
87
87
|
const headers = { 'Authorization': this.auth };
|
|
88
|
-
// Set defaults
|
|
88
|
+
// Set defaults for offset and limit if not provided
|
|
89
89
|
const finalOffset = offset !== null && offset !== void 0 ? offset : 0;
|
|
90
90
|
const finalLimit = limit !== null && limit !== void 0 ? limit : 8;
|
|
91
91
|
const params = new URLSearchParams();
|
|
92
92
|
params.append('offset', finalOffset.toString());
|
|
93
93
|
params.append('limit', finalLimit.toString());
|
|
94
|
+
// Add isActive filter if provided
|
|
95
|
+
if (isActive !== undefined) {
|
|
96
|
+
params.append('isActive', isActive.toString());
|
|
97
|
+
}
|
|
98
|
+
// add a query to filter by name
|
|
99
|
+
if (query) {
|
|
100
|
+
params.append('q', query);
|
|
101
|
+
}
|
|
94
102
|
const url = `/workflows?${params.toString()}`;
|
|
95
103
|
const response = yield axiosInstance.get(url, { headers });
|
|
96
104
|
return response.data;
|
|
@@ -11,7 +11,7 @@ declare class ApiServices {
|
|
|
11
11
|
token: any;
|
|
12
12
|
}>;
|
|
13
13
|
verifyToken(token: string): Promise<any>;
|
|
14
|
-
getWorkflowsOfUser(offset?: number, limit?: number): Promise<any>;
|
|
14
|
+
getWorkflowsOfUser(offset?: number, limit?: number, isActive?: boolean, query?: string): Promise<any>;
|
|
15
15
|
getSessionKeyPermissions(workflowId: string): Promise<any>;
|
|
16
16
|
}
|
|
17
17
|
export declare const apiServices: ApiServices;
|