@laserfiche/lf-repository-api-client-v2 1.0.3 → 1.0.4--preview-11280606699

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.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { HttpRequestHandler, AccessKey, ApiException as ApiExceptionCore } from '@laserfiche/lf-api-client-core';
1
+ import { HttpRequestHandler, AccessKey, ApiException as ApiExceptionCore, GetAccessTokenResponse } from '@laserfiche/lf-api-client-core';
2
2
  export interface IAttributesClient {
3
3
  /**
4
4
  * - Returns the attribute key value pairs associated with the authenticated user. Alternatively, return only the attribute key value pairs that are associated with the "Everyone" group.
@@ -4511,6 +4511,12 @@ export declare class RepositoryApiClient implements IRepositoryApiClient {
4511
4511
  * @param baseUrlDebug (optional) override for the Laserfiche repository API base url.
4512
4512
  */
4513
4513
  static createFromHttpRequestHandler(httpRequestHandler: HttpRequestHandler, baseUrlDebug?: string): RepositoryApiClient;
4514
+ /**
4515
+ * Create a Laserfiche repository client.
4516
+ * @param httpRequestHandler The http request handler for the Laserfiche repository client.
4517
+ * @param baseUrlDebug (optional) override for the Laserfiche repository API base url.
4518
+ */
4519
+ static createFromGetAccessTokenFunc(accessTokenFunc: () => Promise<GetAccessTokenResponse>, baseUrlDebug?: string): RepositoryApiClient;
4514
4520
  /**
4515
4521
  * Create a Laserfiche repository client that will use Laserfiche Cloud OAuth client credentials to get access tokens.
4516
4522
  * @param servicePrincipalKey The service principal key created for the service principal from the Laserfiche Account Administration.
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
16
16
  /* eslint-disable */
17
17
  // ReSharper disable InconsistentNaming
18
18
  import { UrlUtils, StringUtils } from '@laserfiche/lf-js-utils';
19
- import { UsernamePasswordHandler, OAuthClientCredentialsHandler, DomainUtils, ApiException as ApiExceptionCore, } from '@laserfiche/lf-api-client-core';
19
+ import { UsernamePasswordHandler, OAuthClientCredentialsHandler, OAuthClientCustomTokenCredentialsHandler, DomainUtils, ApiException as ApiExceptionCore } from '@laserfiche/lf-api-client-core';
20
20
  export class AttributesClient {
21
21
  constructor(baseUrl, http) {
22
22
  this.jsonParseReviver = undefined;
@@ -9358,6 +9358,15 @@ export class RepositoryApiClient {
9358
9358
  const repoClient = new RepositoryApiClient(httpRequestHandler, baseUrlDebug);
9359
9359
  return repoClient;
9360
9360
  }
9361
+ /**
9362
+ * Create a Laserfiche repository client.
9363
+ * @param httpRequestHandler The http request handler for the Laserfiche repository client.
9364
+ * @param baseUrlDebug (optional) override for the Laserfiche repository API base url.
9365
+ */
9366
+ static createFromGetAccessTokenFunc(accessTokenFunc, baseUrlDebug) {
9367
+ const handler = new OAuthClientCustomTokenCredentialsHandler(accessTokenFunc);
9368
+ return RepositoryApiClient.createFromHttpRequestHandler(handler, baseUrlDebug);
9369
+ }
9361
9370
  /**
9362
9371
  * Create a Laserfiche repository client that will use Laserfiche Cloud OAuth client credentials to get access tokens.
9363
9372
  * @param servicePrincipalKey The service principal key created for the service principal from the Laserfiche Account Administration.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@laserfiche/lf-repository-api-client-v2",
3
3
  "type": "module",
4
- "version": "1.0.3",
4
+ "version": "1.0.4--preview-11280606699",
5
5
  "description": "The TypeScript Laserfiche Repository API Client library for accessing the v2 Laserfiche Repository APIs.",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  "@types/isomorphic-fetch": "^0.0.35",
28
28
  "@types/jest": "^27.4.0",
29
29
  "@types/mocha": "^9.1.0",
30
- "@types/node": "^17.0.12",
30
+ "@types/node": "^20.16.6",
31
31
  "babel-jest": "^27.5.1",
32
32
  "dotenv": "^16.0.1",
33
33
  "isomorphic-fetch": "^3.0.0",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@laserfiche/lf-js-utils": "^4.0.5",
44
- "@laserfiche/lf-api-client-core": "1.0.0"
44
+ "@laserfiche/lf-api-client-core": "^1.1.14--preview-11280606699"
45
45
  },
46
46
  "scripts": {
47
47
  "test": "npm run test:node",