added copy job list refresh and reset functionality

This commit is contained in:
Bikram Choudhury
2025-10-23 18:37:23 +05:30
parent 7b437b62ce
commit 6483bd146d
8 changed files with 80 additions and 27 deletions

View File

@@ -48,6 +48,7 @@ interface Options {
queryParams?: ARMQueryParams;
contentType?: string;
customHeaders?: Record<string, string>;
signal?: AbortSignal;
}
export async function armRequestWithoutPolling<T>({
@@ -59,6 +60,7 @@ export async function armRequestWithoutPolling<T>({
queryParams,
contentType,
customHeaders,
signal,
}: Options): Promise<{ result: T; operationStatusUrl: string }> {
const url = new URL(path, host);
url.searchParams.append("api-version", configContext.armAPIVersion || apiVersion);
@@ -81,6 +83,7 @@ export async function armRequestWithoutPolling<T>({
method,
headers,
body: requestBody ? JSON.stringify(requestBody) : undefined,
signal
});
if (!response.ok) {
@@ -116,6 +119,7 @@ export async function armRequest<T>({
queryParams,
contentType,
customHeaders,
signal
}: Options): Promise<T> {
const armRequestResult = await armRequestWithoutPolling<T>({
host,
@@ -126,6 +130,7 @@ export async function armRequest<T>({
queryParams,
contentType,
customHeaders,
signal
});
const operationStatusUrl = armRequestResult.operationStatusUrl;
if (operationStatusUrl) {