@laserfiche/types-lf-ui-components 14.1.3 → 14.1.4--preview-5351068391

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.
Files changed (2) hide show
  1. package/index.d.ts +42 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -141,6 +141,14 @@ declare interface FieldValues {
141
141
  [fieldId: number]: FieldValue;
142
142
  }
143
143
 
144
+ /**
145
+ * interface defined by Laserfiche API providing
146
+ * return type of beforeFetchRequestAsync
147
+ */
148
+ export declare interface LfBeforeFetchResult {
149
+ regionalDomain: string;
150
+ }
151
+
144
152
  export declare interface LfBreadcrumb {
145
153
  name: string;
146
154
  id: string;
@@ -501,6 +509,27 @@ export declare interface LfFieldTemplateProviders {
501
509
 
502
510
  declare type LfFieldValue = string;
503
511
 
512
+ /**
513
+ * This object handles obtaining the accessToken and
514
+ * setting the authorization header
515
+ */
516
+ export declare interface LfHttpRequestHandler {
517
+ /**
518
+ * Called to prepare the request to the API service.
519
+ * @param url The HTTP url
520
+ * @param request The HTTP request
521
+ */
522
+ beforeFetchRequestAsync: (url: string, request: RequestInit) => Promise<LfBeforeFetchResult>;
523
+ /**
524
+ * Called to handle the response from the API service.
525
+ * @param url The HTTP url
526
+ * @param response The HTTP response
527
+ * @param request The HTTP request
528
+ * @returns true if the request should be retried.
529
+ */
530
+ afterFetchResponseAsync: (url: string, response: Response, request: RequestInit) => Promise<boolean>;
531
+ }
532
+
504
533
  export declare class LfLoginComponent {
505
534
 
506
535
 
@@ -508,6 +537,12 @@ export declare class LfLoginComponent {
508
537
 
509
538
 
510
539
  mode: LoginMode;
540
+ /**
541
+ * @return {HttpRequestHandler}
542
+ * Returns the HttpRequestHandler that can be used
543
+ * to instantiate a repository API client.
544
+ */
545
+ get authorizationRequestHandler(): LfHttpRequestHandler;
511
546
 
512
547
 
513
548
 
@@ -538,6 +573,11 @@ export declare class LfLoginComponent {
538
573
  logoutInitiated: CustomEvent<string>;
539
574
  loginCompleted: CustomEvent<void>;
540
575
  logoutCompleted: CustomEvent<void | AbortedLoginError>;
576
+ /**
577
+ * Refreshes and returns the access token
578
+ * @param initiateLoginFlowOnRefreshFailure
579
+ * @returns {Promise<string | undefined>}
580
+ */
541
581
  refreshTokenAsync: (initiateLoginFlowOnRefreshFailure: boolean) => Promise<string | undefined>;
542
582
  initLoginFlowAsync: () => Promise<string | undefined>;
543
583
  handleRedirectURICallbackAsync: (url: string) => Promise<void>;
@@ -567,6 +607,8 @@ export declare class LfLoginComponent {
567
607
 
568
608
 
569
609
 
610
+
611
+
570
612
 
571
613
 
572
614
 
@@ -745,7 +787,6 @@ export declare class LfRepositoryBrowserComponent {
745
787
 
746
788
 
747
789
 
748
-
749
790
 
750
791
 
751
792
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laserfiche/types-lf-ui-components",
3
- "version": "14.1.3",
3
+ "version": "14.1.4--preview-5351068391",
4
4
  "scripts": {},
5
5
  "dependencies": {},
6
6
  "devDependencies": {},