@bodhiapp/bodhi-js-core 0.0.27 → 0.0.28

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.
@@ -1,18 +1,18 @@
1
1
  import { AccessRequestStatusResponse, CreateAccessRequest, FlowType, RequestedResources, UserScope } from '@bodhiapp/ts-client';
2
- import { ApiResponseResult } from './types/api';
2
+ import { ApiResponse } from '@bodhiapp/bodhi-browser-types';
3
3
  export declare const DEFAULT_POLL_INTERVAL_MS = 2000;
4
4
  export declare const DEFAULT_POLL_TIMEOUT_MS = 300000;
5
5
  /**
6
6
  * Shared polling logic for access request status.
7
7
  * Polls until approved, denied, failed, or expired.
8
8
  *
9
- * @param getStatusFn - Function that fetches the current status
9
+ * @param getStatusFn - Function that fetches the current status (throws BodhiError on operational errors)
10
10
  * @param requestId - The access request ID to poll
11
11
  * @param options - Polling interval and timeout configuration
12
12
  * @returns The approved AccessRequestStatusResponse
13
- * @throws OperationError on denial, failure, expiry, timeout, or fetch error
13
+ * @throws BodhiError on denial, failure, expiry, timeout, or fetch error
14
14
  */
15
- export declare function pollAccessRequestUntilResolved(getStatusFn: (requestId: string) => Promise<ApiResponseResult<AccessRequestStatusResponse>>, requestId: string, options?: {
15
+ export declare function pollAccessRequestUntilResolved(getStatusFn: (requestId: string) => Promise<ApiResponse<AccessRequestStatusResponse>>, requestId: string, options?: {
16
16
  intervalMs?: number;
17
17
  timeoutMs?: number;
18
18
  }): Promise<AccessRequestStatusResponse>;