Skip to content

Commit

Permalink
Merge pull request #41 from citrix-workspace/update-wait-for-sync
Browse files Browse the repository at this point in the history
Add description and set param maxMinutesToWait as optional
  • Loading branch information
janpfajfr committed Jul 16, 2021
2 parents 3b2a004 + 1f2c975 commit a587580
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dist/microappsAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ class MicroappsAdmin extends api_1.API {
* Wait for syncronization and check the result of sync
* @param {Function} getIntegration - Fetch status of integration
* @param {string} synchronizationType - Set type of syncronization full/incremental
* @param {string} skipCheck - If running on newly created integration set this as true
* @param {number} maxMinutesToWait - Maxim time to wait in minutes
*/
async waitForSync({ getIntegration, synchronizationType, integrationName = '', skipCheck = false, maxMinutesToWait = 9, }) {
let jobRun;
Expand Down
2 changes: 2 additions & 0 deletions src/microappsAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ export class MicroappsAdmin extends API {
* Wait for syncronization and check the result of sync
* @param {Function} getIntegration - Fetch status of integration
* @param {string} synchronizationType - Set type of syncronization full/incremental
* @param {string} skipCheck - If running on newly created integration set this as true
* @param {number} maxMinutesToWait - Maxim time to wait in minutes
*/

async waitForSync({
Expand Down
2 changes: 1 addition & 1 deletion src/types/microappsAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type WaitForSync = {
synchronizationType: string;
integrationName?: string;
skipCheck?: boolean,
maxMinutesToWait: number,
maxMinutesToWait?: number,
};

export type RunSynchronization = {
Expand Down
2 changes: 2 additions & 0 deletions types/microappsAdmin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export declare class MicroappsAdmin extends API {
* Wait for syncronization and check the result of sync
* @param {Function} getIntegration - Fetch status of integration
* @param {string} synchronizationType - Set type of syncronization full/incremental
* @param {string} skipCheck - If running on newly created integration set this as true
* @param {number} maxMinutesToWait - Maxim time to wait in minutes
*/
waitForSync({ getIntegration, synchronizationType, integrationName, skipCheck, maxMinutesToWait, }: WaitForSync): Promise<{
jobState: string;
Expand Down
2 changes: 1 addition & 1 deletion types/types/microappsAdmin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export declare type WaitForSync = {
synchronizationType: string;
integrationName?: string;
skipCheck?: boolean;
maxMinutesToWait: number;
maxMinutesToWait?: number;
};
export declare type RunSynchronization = {
authInstance: AxiosInstance;
Expand Down

0 comments on commit a587580

Please sign in to comment.