@fhss-web-team/frontend-utils 21.3.1 → 21.4.1
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,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Provider,
|
|
2
|
+
import { InjectionToken, Provider, OnInit, OnDestroy, WritableSignal, Injector, ValueEqualityFn, Signal } from '@angular/core';
|
|
3
3
|
import { UrlTree, CanActivateFn } from '@angular/router';
|
|
4
4
|
import * as _angular_material_dialog from '@angular/material/dialog';
|
|
5
5
|
import { Resolver } from '@trpc/client';
|
|
@@ -10,13 +10,6 @@ declare class ByuFooterComponent {
|
|
|
10
10
|
static ɵcmp: i0.ɵɵComponentDeclaration<ByuFooterComponent, "byu-footer", never, {}, {}, never, never, true, never>;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
type AuthUser = {
|
|
14
|
-
id: string;
|
|
15
|
-
preferredFirstName: string;
|
|
16
|
-
preferredLastName: string;
|
|
17
|
-
roles: string[];
|
|
18
|
-
permissions: string[];
|
|
19
|
-
};
|
|
20
13
|
declare class AuthService {
|
|
21
14
|
private readonly FhssConfig;
|
|
22
15
|
private readonly readyPromise;
|
|
@@ -24,13 +17,25 @@ declare class AuthService {
|
|
|
24
17
|
/**
|
|
25
18
|
* Returns a promise that resolves when the authentication service is ready.
|
|
26
19
|
*/
|
|
27
|
-
ready(): Promise<
|
|
20
|
+
ready(): Promise<{
|
|
21
|
+
id: string;
|
|
22
|
+
preferredFirstName: string;
|
|
23
|
+
preferredLastName: string;
|
|
24
|
+
roles: string[];
|
|
25
|
+
permissions: string[];
|
|
26
|
+
} | null>;
|
|
28
27
|
/**
|
|
29
28
|
* Updates the authentication state by retrieving the current user's information.
|
|
30
29
|
*
|
|
31
30
|
* @returns A promise containing the current user's authentication details.
|
|
32
31
|
*/
|
|
33
|
-
update(): Promise<
|
|
32
|
+
update(): Promise<{
|
|
33
|
+
id: string;
|
|
34
|
+
preferredFirstName: string;
|
|
35
|
+
preferredLastName: string;
|
|
36
|
+
roles: string[];
|
|
37
|
+
permissions: string[];
|
|
38
|
+
} | null>;
|
|
34
39
|
readonly authenticated: i0.WritableSignal<boolean>;
|
|
35
40
|
readonly userId: i0.WritableSignal<string | undefined>;
|
|
36
41
|
readonly preferredFirstName: i0.WritableSignal<string | undefined>;
|
|
@@ -189,18 +194,17 @@ declare class ComboBoxComponent {
|
|
|
189
194
|
}
|
|
190
195
|
|
|
191
196
|
declare const FHSS_CONFIG: InjectionToken<FhssConfig>;
|
|
192
|
-
|
|
197
|
+
type FhssConfig = {
|
|
193
198
|
rolePermissionMap: Record<string, string[]>;
|
|
194
|
-
defaultHomePages: Record<string, string
|
|
195
|
-
}
|
|
199
|
+
defaultHomePages: Partial<Record<string, string>>;
|
|
200
|
+
};
|
|
196
201
|
|
|
197
202
|
declare const provideFhss: (config: FhssConfig) => Provider;
|
|
198
203
|
|
|
199
|
-
declare class ScrollAnchorDirective {
|
|
204
|
+
declare class ScrollAnchorDirective implements OnInit, OnDestroy {
|
|
200
205
|
private element;
|
|
201
206
|
private readonly registery;
|
|
202
207
|
scrollAnchor: i0.InputSignal<string>;
|
|
203
|
-
constructor(element: ElementRef<HTMLElement>);
|
|
204
208
|
ngOnInit(): void;
|
|
205
209
|
ngOnDestroy(): void;
|
|
206
210
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollAnchorDirective, never>;
|
|
@@ -276,6 +280,48 @@ declare class ServerErrorPage {
|
|
|
276
280
|
static ɵcmp: i0.ɵɵComponentDeclaration<ServerErrorPage, "fhss-server-error", never, {}, {}, never, never, true, never>;
|
|
277
281
|
}
|
|
278
282
|
|
|
283
|
+
type Ok<T> = {
|
|
284
|
+
ok: true;
|
|
285
|
+
value: T;
|
|
286
|
+
};
|
|
287
|
+
type Err<E = unknown> = {
|
|
288
|
+
ok: false;
|
|
289
|
+
error: E;
|
|
290
|
+
};
|
|
291
|
+
type Result<T, E> = Ok<T> | Err<E>;
|
|
292
|
+
|
|
293
|
+
type FileLabel = 'image' | 'document' | 'spreadsheet' | 'presentation' | 'audio' | 'video' | 'archive' | 'data' | 'gif' | 'avif' | 'jpeg' | 'png' | 'svg' | 'webp' | 'pdf' | 'word' | 'markdown' | 'text' | 'csv' | 'excel' | 'powerpoint' | 'mp3' | 'mpeg' | 'mp4' | 'zip' | 'xml' | 'json';
|
|
294
|
+
|
|
295
|
+
type DownloadError = 'Not Found' | 'Unknown';
|
|
296
|
+
/**
|
|
297
|
+
* Downloads a file from the specified URL.
|
|
298
|
+
*
|
|
299
|
+
* This function performs a HEAD request to check if the file is available
|
|
300
|
+
* before initiating the download. If the file is available, it uses a
|
|
301
|
+
* temporary <a> to initiate a browser download.
|
|
302
|
+
*
|
|
303
|
+
* @param url - The URL of the file to download.
|
|
304
|
+
* @returns A promise that resolves to a Result.
|
|
305
|
+
*/
|
|
306
|
+
declare function downloadFileFrom(url: string): Promise<Result<void, DownloadError>>;
|
|
307
|
+
/**
|
|
308
|
+
* Generates a comma-separated string of unique file types from the given file label groups.
|
|
309
|
+
* This allows the developer to easily define the `<input type="file" />`'s `accept` property.
|
|
310
|
+
* @param groups - An array of file labels to retrieve file types for.
|
|
311
|
+
* @returns A comma-separated string of unique file types.
|
|
312
|
+
*/
|
|
313
|
+
declare function getFileTypes(groups: FileLabel[]): string;
|
|
314
|
+
type UploadError = 'Network error during upload' | 'Upload failed';
|
|
315
|
+
/**
|
|
316
|
+
* Uploads a file to the specified URL using XMLHttpRequest.
|
|
317
|
+
*
|
|
318
|
+
* @param file - The file to upload
|
|
319
|
+
* @param url - The URL endpoint where the file will be uploaded (PUT request)
|
|
320
|
+
* @param setProgress - Optional callback function to track upload progress as a percentage (0-100)
|
|
321
|
+
* @returns A promise that resolves to a Result object containing either void on success or an UploadError on failure
|
|
322
|
+
*/
|
|
323
|
+
declare function uploadFile(file: File, url: string, setProgress?: (percent: number) => void): Promise<Result<void, UploadError>>;
|
|
324
|
+
|
|
279
325
|
declare class ScrollRegistryService {
|
|
280
326
|
private anchors;
|
|
281
327
|
private pending;
|
|
@@ -289,10 +335,10 @@ declare class ScrollRegistryService {
|
|
|
289
335
|
}
|
|
290
336
|
|
|
291
337
|
type ResolverDef = {
|
|
292
|
-
input:
|
|
293
|
-
output:
|
|
338
|
+
input: unknown;
|
|
339
|
+
output: unknown;
|
|
294
340
|
transformer: boolean;
|
|
295
|
-
errorShape:
|
|
341
|
+
errorShape: unknown;
|
|
296
342
|
};
|
|
297
343
|
type TrpcResourceOptions<TOutput> = {
|
|
298
344
|
/**
|
|
@@ -336,7 +382,7 @@ type _TrpcResource<TDef extends ResolverDef> = {
|
|
|
336
382
|
* Signal of the tRPC procedure output, when available.
|
|
337
383
|
* This value will persist while the `trpcResource` is loading.
|
|
338
384
|
*/
|
|
339
|
-
value: WritableSignal<TDef[
|
|
385
|
+
value: WritableSignal<TDef['output'] | undefined>;
|
|
340
386
|
/**
|
|
341
387
|
* Signal of the tRPC procedure error, when available.
|
|
342
388
|
*/
|
|
@@ -366,442 +412,7 @@ declare function debugTrpcResource<TDef extends ResolverDef>(_trpcResource: Trpc
|
|
|
366
412
|
isLoading: boolean;
|
|
367
413
|
};
|
|
368
414
|
|
|
369
|
-
type JsonValue = string | number | boolean | null | JsonArray | JsonObject;
|
|
370
|
-
type JsonObject = {
|
|
371
|
-
[key: string]: JsonValue;
|
|
372
|
-
};
|
|
373
|
-
type JsonArray = JsonValue[];
|
|
374
|
-
type Json = JsonObject | JsonArray;
|
|
375
|
-
type DefaultError = {
|
|
376
|
-
code?: string;
|
|
377
|
-
message?: string;
|
|
378
|
-
details?: Json;
|
|
379
|
-
};
|
|
380
|
-
type KnownHeaderKeys = 'Accept' | 'Accept-Encoding' | 'Accept-Language' | 'Access-Control-Request-Headers' | 'Access-Control-Request-Method' | 'Authorization' | 'Cache-Control' | 'Connection' | 'Content-Encoding' | 'Content-Length' | 'Content-Type' | 'Cookie' | 'Date' | 'Expect' | 'Forwarded' | 'From' | 'Host' | 'If-Match' | 'If-Modified-Since' | 'If-None-Match' | 'If-Range' | 'If-Unmodified-Since' | 'Keep-Alive' | 'Max-Forwards' | 'Origin' | 'Prefer' | 'Priority' | 'Proxy-Authorization' | 'Range' | 'Referer' | 'TE' | 'Transfer-Encoding' | 'Upgrade' | 'User-Agent' | 'Via';
|
|
381
|
-
/**
|
|
382
|
-
* The structure of an `fetchSignal` request which will be sent to the backend via the Fetch API.
|
|
383
|
-
*/
|
|
384
|
-
type FetchSignalRequest = {
|
|
385
|
-
/**
|
|
386
|
-
* URL of the request.
|
|
387
|
-
*
|
|
388
|
-
* This URL should not include query parameters. Instead, specify query parameters through the
|
|
389
|
-
* `params` field.
|
|
390
|
-
*/
|
|
391
|
-
url: string;
|
|
392
|
-
/**
|
|
393
|
-
* Body to send with the request, if there is one.
|
|
394
|
-
*
|
|
395
|
-
* If no Content-Type header is specified by the user, the Fetch API will attempt to set one based on
|
|
396
|
-
* the type of `body`.
|
|
397
|
-
*/
|
|
398
|
-
body?: BodyInit;
|
|
399
|
-
/**
|
|
400
|
-
* Dictionary of query parameters which will be appeneded to the request URL.
|
|
401
|
-
*/
|
|
402
|
-
params?: Record<string, string | number | boolean | undefined> | undefined;
|
|
403
|
-
/**
|
|
404
|
-
* Dictionary of headers to include with the outgoing request.
|
|
405
|
-
*/
|
|
406
|
-
headers?: (Partial<Record<KnownHeaderKeys, string | undefined>> & Record<string, string | undefined>) | undefined;
|
|
407
|
-
};
|
|
408
|
-
/**
|
|
409
|
-
* String value capturing the status of a `FetchSignal`.
|
|
410
|
-
*
|
|
411
|
-
* Possible statuses are:
|
|
412
|
-
*
|
|
413
|
-
* `idle` - The fetch signal has no valid request and will not perform any loading. `value()` will be
|
|
414
|
-
* `undefined`.
|
|
415
|
-
*
|
|
416
|
-
* `loading` - The fetch signal is currently loading a new value as a result of a change in its reactive
|
|
417
|
-
* dependencies. `value()` will be `undefined`.
|
|
418
|
-
*
|
|
419
|
-
* `error` - Loading failed with an error. `value()` will be `undefined`.
|
|
420
|
-
*
|
|
421
|
-
* `resolved` - Loading has completed and the fetch signal has the value returned from the loader.
|
|
422
|
-
*
|
|
423
|
-
*/
|
|
424
|
-
type FetchSignalStatus = 'idle' | 'error' | 'loading' | 'resolved' | 'destroyed';
|
|
425
|
-
type FetchSignalOptions<TResult, TRaw> = {
|
|
426
|
-
/**
|
|
427
|
-
* Whether or not the request should be fetched reactively when the request updates.
|
|
428
|
-
*/
|
|
429
|
-
autoRefresh?: boolean;
|
|
430
|
-
/**
|
|
431
|
-
* NEEDS TO BE IMPLEMENTED. WILL NOT WORK
|
|
432
|
-
*
|
|
433
|
-
* Transform the response of the HTTP request before it's delivered to the fetch signal.
|
|
434
|
-
*
|
|
435
|
-
* `parse` receives the value from the HTTP layer as its raw type (e.g. as `unknown` for JSON data).
|
|
436
|
-
* It can be used to validate or transform the type of the fetch signal, and return a more specific
|
|
437
|
-
* type. This is also useful for validating backend responses using a runtime schema validation
|
|
438
|
-
* library such as Zod.
|
|
439
|
-
*/
|
|
440
|
-
parse?: ((value: TRaw) => TResult) | undefined;
|
|
441
|
-
/**
|
|
442
|
-
* Value that the fetch signal will take when in Idle or Loading states.
|
|
443
|
-
*
|
|
444
|
-
* If not set, the fetch signal will use `undefined` as its default value.
|
|
445
|
-
*/
|
|
446
|
-
defaultValue?: NoInfer<TResult> | undefined;
|
|
447
|
-
/**
|
|
448
|
-
* The `Injector` in which to create the `FetchSignal`.
|
|
449
|
-
*
|
|
450
|
-
* If this is not provided, the current [injection context](https://angular.dev/guide/di/dependency-injection-context)
|
|
451
|
-
* will be used instead (via `inject`).
|
|
452
|
-
*/
|
|
453
|
-
injector?: Injector | undefined;
|
|
454
|
-
/**
|
|
455
|
-
* A comparison function which defines equality for the response value.
|
|
456
|
-
*/
|
|
457
|
-
equal?: ValueEqualityFn<NoInfer<TResult | undefined>> | undefined;
|
|
458
|
-
};
|
|
459
|
-
/**
|
|
460
|
-
* Represents the reactive result of an HTTP fetch request.
|
|
461
|
-
*/
|
|
462
|
-
type FetchSignal<Response, ErrorResponse = DefaultError> = {
|
|
463
|
-
/**
|
|
464
|
-
* Signal of the HTTP response body when the response is `ok`, when available.
|
|
465
|
-
* This value will persist while the fetchSignal is loading.
|
|
466
|
-
*/
|
|
467
|
-
value: Signal<Response | undefined>;
|
|
468
|
-
/**
|
|
469
|
-
* Signal of the HTTP response body when the response is not `ok`, when available.
|
|
470
|
-
* This response must be in the shape of JSON.
|
|
471
|
-
*/
|
|
472
|
-
errorResponse: Signal<ErrorResponse | undefined>;
|
|
473
|
-
/**
|
|
474
|
-
* Whether this fetch signal is loading a new value (or reloading the existing one).
|
|
475
|
-
*/
|
|
476
|
-
isLoading: Signal<boolean>;
|
|
477
|
-
/**
|
|
478
|
-
* Signal of the response status code, when available.
|
|
479
|
-
*/
|
|
480
|
-
statusCode: Signal<number | undefined>;
|
|
481
|
-
/**
|
|
482
|
-
* Signal of the response headers, when available.
|
|
483
|
-
*/
|
|
484
|
-
headers: Signal<Record<string, string> | undefined>;
|
|
485
|
-
/**
|
|
486
|
-
* The current status of the `FetchSignal`, which describes what the fetch signal is currently doing and
|
|
487
|
-
* what can be expected of its `value`.
|
|
488
|
-
*/
|
|
489
|
-
status: Signal<FetchSignalStatus>;
|
|
490
|
-
/**
|
|
491
|
-
* When in the `error` state, this returns the last known error from the `FetchSignal`.
|
|
492
|
-
*/
|
|
493
|
-
error: Signal<Error | undefined>;
|
|
494
|
-
/**
|
|
495
|
-
* Instructs the fetchSignal to refetch the request with the current reactive dependencies
|
|
496
|
-
* @param abortSignal Optional abort signal to abort the fetch request
|
|
497
|
-
* @returns void
|
|
498
|
-
*/
|
|
499
|
-
refresh: (abortSignal?: AbortSignal) => void;
|
|
500
|
-
/**
|
|
501
|
-
* Will clean up any effects and disable the fetchSignal.
|
|
502
|
-
* All values will be undefined and the fetchSiganl will have no operations.
|
|
503
|
-
* @returns void
|
|
504
|
-
*/
|
|
505
|
-
destroy: () => void;
|
|
506
|
-
};
|
|
507
|
-
type FetchSignalFactory = {
|
|
508
|
-
/**
|
|
509
|
-
* Initiates a reactive HTTP GET request using the provided request configuration.
|
|
510
|
-
*
|
|
511
|
-
* @template Response - The expected response type.
|
|
512
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
513
|
-
* @param request - The configuration object for the HTTP GET request.
|
|
514
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
515
|
-
* @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.
|
|
516
|
-
*/
|
|
517
|
-
<Response extends Json, ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Response, any>): FetchSignal<Response, ErrorResponse>;
|
|
518
|
-
/**
|
|
519
|
-
* Initiates a reactive HTTP GET request using the provided request configuration and parses the response as JSON.
|
|
520
|
-
*
|
|
521
|
-
* @template Response - The expected response type.
|
|
522
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
523
|
-
* @param request - The configuration object for the HTTP GET request.
|
|
524
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
525
|
-
* @returns A `FetchSignal` object with the JSON-parsed response.
|
|
526
|
-
*/
|
|
527
|
-
json: <Response extends Json, ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Response, any>) => FetchSignal<Response, ErrorResponse>;
|
|
528
|
-
/**
|
|
529
|
-
* Initiates a reactive HTTP GET request using the provided request configuration and parses the response as plain text.
|
|
530
|
-
*
|
|
531
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
532
|
-
* @param request - The configuration object for the HTTP GET request.
|
|
533
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
534
|
-
* @returns A `FetchSignal` object with the text response.
|
|
535
|
-
*/
|
|
536
|
-
text: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<string, string>) => FetchSignal<string, ErrorResponse>;
|
|
537
|
-
/**
|
|
538
|
-
* Initiates a reactive HTTP GET request using the provided request configuration and parses the response as a Blob.
|
|
539
|
-
*
|
|
540
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
541
|
-
* @param request - The configuration object for the HTTP GET request.
|
|
542
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
543
|
-
* @returns A `FetchSignal` object with the Blob response.
|
|
544
|
-
*/
|
|
545
|
-
blob: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Blob, Blob>) => FetchSignal<Blob, ErrorResponse>;
|
|
546
|
-
/**
|
|
547
|
-
* Initiates a reactive HTTP GET request using the provided request configuration and parses the response as an ArrayBuffer.
|
|
548
|
-
*
|
|
549
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
550
|
-
* @param request - The configuration object for the HTTP GET request.
|
|
551
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
552
|
-
* @returns A `FetchSignal` object with the ArrayBuffer response.
|
|
553
|
-
*/
|
|
554
|
-
arrayBuffer: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<ArrayBuffer, ArrayBuffer>) => FetchSignal<ArrayBuffer, ErrorResponse>;
|
|
555
|
-
get: {
|
|
556
|
-
/**
|
|
557
|
-
* Initiates a reactive HTTP GET request using the provided request configuration.
|
|
558
|
-
*
|
|
559
|
-
* @template Response - The expected response type.
|
|
560
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
561
|
-
* @param request - The configuration object for the HTTP GET request.
|
|
562
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
563
|
-
* @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.
|
|
564
|
-
*/
|
|
565
|
-
<Response extends Json, ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Response, any>): FetchSignal<Response, ErrorResponse>;
|
|
566
|
-
/**
|
|
567
|
-
* Initiates a reactive HTTP GET request using the provided request configuration and parses the response as JSON.
|
|
568
|
-
*
|
|
569
|
-
* @template Response - The expected response type.
|
|
570
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
571
|
-
* @param request - The configuration object for the HTTP GET request.
|
|
572
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
573
|
-
* @returns A `FetchSignal` object with the JSON-parsed response.
|
|
574
|
-
*/
|
|
575
|
-
json: <Response extends Json, ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Response, any>) => FetchSignal<Response, ErrorResponse>;
|
|
576
|
-
/**
|
|
577
|
-
* Initiates a reactive HTTP GET request using the provided request configuration and parses the response as plain text.
|
|
578
|
-
*
|
|
579
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
580
|
-
* @param request - The configuration object for the HTTP GET request.
|
|
581
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
582
|
-
* @returns A `FetchSignal` object with the text response.
|
|
583
|
-
*/
|
|
584
|
-
text: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<string, string>) => FetchSignal<string, ErrorResponse>;
|
|
585
|
-
/**
|
|
586
|
-
* Initiates a reactive HTTP GET request using the provided request configuration and parses the response as a Blob.
|
|
587
|
-
*
|
|
588
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
589
|
-
* @param request - The configuration object for the HTTP GET request.
|
|
590
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
591
|
-
* @returns A `FetchSignal` object with the Blob response.
|
|
592
|
-
*/
|
|
593
|
-
blob: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Blob, Blob>) => FetchSignal<Blob, ErrorResponse>;
|
|
594
|
-
/**
|
|
595
|
-
* Initiates a reactive HTTP GET request using the provided request configuration and parses the response as an ArrayBuffer.
|
|
596
|
-
*
|
|
597
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
598
|
-
* @param request - The configuration object for the HTTP GET request.
|
|
599
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
600
|
-
* @returns A `FetchSignal` object with the ArrayBuffer response.
|
|
601
|
-
*/
|
|
602
|
-
arrayBuffer: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<ArrayBuffer, ArrayBuffer>) => FetchSignal<ArrayBuffer, ErrorResponse>;
|
|
603
|
-
};
|
|
604
|
-
post: {
|
|
605
|
-
/**
|
|
606
|
-
* Initiates a reactive HTTP POST request using the provided request configuration.
|
|
607
|
-
*
|
|
608
|
-
* @template Response - The expected response type.
|
|
609
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
610
|
-
* @param request - The configuration object for the HTTP POST request, which must include a body.
|
|
611
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
612
|
-
* @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.
|
|
613
|
-
*/
|
|
614
|
-
<Response extends Json, ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Response, any>): FetchSignal<Response, ErrorResponse>;
|
|
615
|
-
/**
|
|
616
|
-
* Initiates a reactive HTTP POST request using the provided request configuration and parses the response as JSON.
|
|
617
|
-
*
|
|
618
|
-
* @template Response - The expected response type.
|
|
619
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
620
|
-
* @param request - The configuration object for the HTTP POST request, which must include a body.
|
|
621
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
622
|
-
* @returns A `FetchSignal` object with the JSON-parsed response.
|
|
623
|
-
*/
|
|
624
|
-
json: <Response extends Json, ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Response, any>) => FetchSignal<Response, ErrorResponse>;
|
|
625
|
-
/**
|
|
626
|
-
* Initiates a reactive HTTP POST request using the provided request configuration and parses the response as plain text.
|
|
627
|
-
*
|
|
628
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
629
|
-
* @param request - The configuration object for the HTTP POST request, which must include a body.
|
|
630
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
631
|
-
* @returns A `FetchSignal` object with the text response.
|
|
632
|
-
*/
|
|
633
|
-
text: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<string, string>) => FetchSignal<string, ErrorResponse>;
|
|
634
|
-
/**
|
|
635
|
-
* Initiates a reactive HTTP POST request using the provided request configuration and parses the response as a Blob.
|
|
636
|
-
*
|
|
637
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
638
|
-
* @param request - The configuration object for the HTTP POST request, which must include a body.
|
|
639
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
640
|
-
* @returns A `FetchSignal` object with the Blob response.
|
|
641
|
-
*/
|
|
642
|
-
blob: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Blob, Blob>) => FetchSignal<Blob, ErrorResponse>;
|
|
643
|
-
/**
|
|
644
|
-
* Initiates a reactive HTTP POST request using the provided request configuration and parses the response as an ArrayBuffer.
|
|
645
|
-
*
|
|
646
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
647
|
-
* @param request - The configuration object for the HTTP POST request, which must include a body.
|
|
648
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
649
|
-
* @returns A `FetchSignal` object with the ArrayBuffer response.
|
|
650
|
-
*/
|
|
651
|
-
arrayBuffer: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<ArrayBuffer, ArrayBuffer>) => FetchSignal<ArrayBuffer, ErrorResponse>;
|
|
652
|
-
};
|
|
653
|
-
put: {
|
|
654
|
-
/**
|
|
655
|
-
* Initiates a reactive HTTP PUT request using the provided request configuration.
|
|
656
|
-
*
|
|
657
|
-
* @template Response - The expected response type.
|
|
658
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
659
|
-
* @param request - The configuration object for the HTTP PUT request, which must include a body.
|
|
660
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
661
|
-
* @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.
|
|
662
|
-
*/
|
|
663
|
-
<Response extends Json, ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Response, any>): FetchSignal<Response, ErrorResponse>;
|
|
664
|
-
/**
|
|
665
|
-
* Initiates a reactive HTTP PUT request using the provided request configuration and parses the response as JSON.
|
|
666
|
-
*
|
|
667
|
-
* @template Response - The expected response type.
|
|
668
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
669
|
-
* @param request - The configuration object for the HTTP PUT request, which must include a body.
|
|
670
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
671
|
-
* @returns A `FetchSignal` object with the JSON-parsed response.
|
|
672
|
-
*/
|
|
673
|
-
json: <Response extends Json, ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Response, any>) => FetchSignal<Response, ErrorResponse>;
|
|
674
|
-
/**
|
|
675
|
-
* Initiates a reactive HTTP PUT request using the provided request configuration and parses the response as plain text.
|
|
676
|
-
*
|
|
677
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
678
|
-
* @param request - The configuration object for the HTTP PUT request, which must include a body.
|
|
679
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
680
|
-
* @returns A `FetchSignal` object with the text response.
|
|
681
|
-
*/
|
|
682
|
-
text: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<string, string>) => FetchSignal<string, ErrorResponse>;
|
|
683
|
-
/**
|
|
684
|
-
* Initiates a reactive HTTP PUT request using the provided request configuration and parses the response as a Blob.
|
|
685
|
-
*
|
|
686
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
687
|
-
* @param request - The configuration object for the HTTP PUT request, which must include a body.
|
|
688
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
689
|
-
* @returns A `FetchSignal` object with the Blob response.
|
|
690
|
-
*/
|
|
691
|
-
blob: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Blob, Blob>) => FetchSignal<Blob, ErrorResponse>;
|
|
692
|
-
/**
|
|
693
|
-
* Initiates a reactive HTTP PUT request using the provided request configuration and parses the response as an ArrayBuffer.
|
|
694
|
-
*
|
|
695
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
696
|
-
* @param request - The configuration object for the HTTP PUT request, which must include a body.
|
|
697
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
698
|
-
* @returns A `FetchSignal` object with the ArrayBuffer response.
|
|
699
|
-
*/
|
|
700
|
-
arrayBuffer: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<ArrayBuffer, ArrayBuffer>) => FetchSignal<ArrayBuffer, ErrorResponse>;
|
|
701
|
-
};
|
|
702
|
-
patch: {
|
|
703
|
-
/**
|
|
704
|
-
* Initiates a reactive HTTP PATCH request using the provided request configuration.
|
|
705
|
-
*
|
|
706
|
-
* @template Response - The expected response type.
|
|
707
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
708
|
-
* @param request - The configuration object for the HTTP PATCH request, which must include a body.
|
|
709
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
710
|
-
* @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.
|
|
711
|
-
*/
|
|
712
|
-
<Response extends Json, ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Response, any>): FetchSignal<Response, ErrorResponse>;
|
|
713
|
-
/**
|
|
714
|
-
* Initiates a reactive HTTP PATCH request using the provided request configuration and parses the response as JSON.
|
|
715
|
-
*
|
|
716
|
-
* @template Response - The expected response type.
|
|
717
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
718
|
-
* @param request - The configuration object for the HTTP PATCH request, which must include a body.
|
|
719
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
720
|
-
* @returns A `FetchSignal` object with the JSON-parsed response.
|
|
721
|
-
*/
|
|
722
|
-
json: <Response extends Json, ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Response, any>) => FetchSignal<Response, ErrorResponse>;
|
|
723
|
-
/**
|
|
724
|
-
* Initiates a reactive HTTP PATCH request using the provided request configuration and parses the response as plain text.
|
|
725
|
-
*
|
|
726
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
727
|
-
* @param request - The configuration object for the HTTP PATCH request, which must include a body.
|
|
728
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
729
|
-
* @returns A `FetchSignal` object with the text response.
|
|
730
|
-
*/
|
|
731
|
-
text: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<string, string>) => FetchSignal<string, ErrorResponse>;
|
|
732
|
-
/**
|
|
733
|
-
* Initiates a reactive HTTP PATCH request using the provided request configuration and parses the response as a Blob.
|
|
734
|
-
*
|
|
735
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
736
|
-
* @param request - The configuration object for the HTTP PATCH request, which must include a body.
|
|
737
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
738
|
-
* @returns A `FetchSignal` object with the Blob response.
|
|
739
|
-
*/
|
|
740
|
-
blob: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Blob, Blob>) => FetchSignal<Blob, ErrorResponse>;
|
|
741
|
-
/**
|
|
742
|
-
* Initiates a reactive HTTP PATCH request using the provided request configuration and parses the response as an ArrayBuffer.
|
|
743
|
-
*
|
|
744
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
745
|
-
* @param request - The configuration object for the HTTP PATCH request, which must include a body.
|
|
746
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
747
|
-
* @returns A `FetchSignal` object with the ArrayBuffer response.
|
|
748
|
-
*/
|
|
749
|
-
arrayBuffer: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<ArrayBuffer, ArrayBuffer>) => FetchSignal<ArrayBuffer, ErrorResponse>;
|
|
750
|
-
};
|
|
751
|
-
delete: {
|
|
752
|
-
/**
|
|
753
|
-
* Initiates a reactive HTTP DELETE request using the provided request configuration.
|
|
754
|
-
*
|
|
755
|
-
* @template Response - The expected response type.
|
|
756
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
757
|
-
* @param request - The configuration object for the HTTP DELETE request.
|
|
758
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
759
|
-
* @returns A `FetchSignal` object containing reactive signals for the response data, loading state, status code, error, headers, and a refresh method.
|
|
760
|
-
*/
|
|
761
|
-
<Response extends Json, ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Response, any>): FetchSignal<Response, ErrorResponse>;
|
|
762
|
-
/**
|
|
763
|
-
* Initiates a reactive HTTP DELETE request using the provided request configuration and parses the response as JSON.
|
|
764
|
-
*
|
|
765
|
-
* @template Response - The expected response type.
|
|
766
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
767
|
-
* @param request - The configuration object for the HTTP DELETE request.
|
|
768
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
769
|
-
* @returns A `FetchSignal` object with the JSON-parsed response.
|
|
770
|
-
*/
|
|
771
|
-
json: <Response extends Json, ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Response, any>) => FetchSignal<Response, ErrorResponse>;
|
|
772
|
-
/**
|
|
773
|
-
* Initiates a reactive HTTP DELETE request using the provided request configuration and parses the response as plain text.
|
|
774
|
-
*
|
|
775
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
776
|
-
* @param request - The configuration object for the HTTP DELETE request.
|
|
777
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
778
|
-
* @returns A `FetchSignal` object with the text response.
|
|
779
|
-
*/
|
|
780
|
-
text: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<string, string>) => FetchSignal<string, ErrorResponse>;
|
|
781
|
-
/**
|
|
782
|
-
* Initiates a reactive HTTP DELETE request using the provided request configuration and parses the response as a Blob.
|
|
783
|
-
*
|
|
784
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
785
|
-
* @param request - The configuration object for the HTTP DELETE request.
|
|
786
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
787
|
-
* @returns A `FetchSignal` object with the Blob response.
|
|
788
|
-
*/
|
|
789
|
-
blob: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<Blob, Blob>) => FetchSignal<Blob, ErrorResponse>;
|
|
790
|
-
/**
|
|
791
|
-
* Initiates a reactive HTTP DELETE request using the provided request configuration and parses the response as an ArrayBuffer.
|
|
792
|
-
*
|
|
793
|
-
* @template ErrorResponse - The expected error shape (defaults to `DefaultError`).
|
|
794
|
-
* @param request - The configuration object for the HTTP DELETE request.
|
|
795
|
-
* @param options - Additional options to provide to the fetchSignal.
|
|
796
|
-
* @returns A `FetchSignal` object with the ArrayBuffer response.
|
|
797
|
-
*/
|
|
798
|
-
arrayBuffer: <ErrorResponse extends Json = DefaultError>(request: () => FetchSignalRequest, options?: FetchSignalOptions<ArrayBuffer, ArrayBuffer>) => FetchSignal<ArrayBuffer, ErrorResponse>;
|
|
799
|
-
};
|
|
800
|
-
};
|
|
801
|
-
|
|
802
|
-
declare const fetchSignal: FetchSignalFactory;
|
|
803
|
-
|
|
804
415
|
declare const debounced: <T>(inputSignal: Signal<T>, wait?: number) => i0.WritableSignal<T>;
|
|
805
416
|
|
|
806
|
-
export { AuthErrorPage, AuthService, ByuFooterComponent, ByuHeaderComponent, ComboBoxComponent, ConfirmationDialog, FHSS_CONFIG, ForbiddenPage, NotFoundPage, ScrollAnchorDirective, ScrollRegistryService, ServerErrorPage, authGuard, debounced, debugTrpcResource,
|
|
807
|
-
export type { FhssConfig, HeaderConfig,
|
|
417
|
+
export { AuthErrorPage, AuthService, ByuFooterComponent, ByuHeaderComponent, ComboBoxComponent, ConfirmationDialog, FHSS_CONFIG, ForbiddenPage, NotFoundPage, ScrollAnchorDirective, ScrollRegistryService, ServerErrorPage, authGuard, debounced, debugTrpcResource, downloadFileFrom, getFileTypes, homeRedirectGuard, permissionGuard, provideFhss, trpcResource, uploadFile };
|
|
418
|
+
export type { FhssConfig, HeaderConfig, Option, UploadError };
|