@adsk-platform/httpclient 0.1.2 → 0.1.3

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/README.md CHANGED
@@ -6,8 +6,7 @@ A TypeScript HTTP client library for Autodesk APS SDK, providing common utilitie
6
6
 
7
7
  - Simplified HTTP request handling
8
8
  - Typed request and response interfaces
9
- - Error handling utilities
10
- - Easily extendable for custom needs
9
+ - Resilient (Retry, rate limit handling)
11
10
 
12
11
  ## Installation
13
12
 
@@ -1,7 +1,6 @@
1
1
  import { HttpClient, FetchRequestAdapter } from '@microsoft/kiota-http-fetchlibrary';
2
2
  export declare class HttpClientFactory {
3
3
  static create(customFetch?: (request: string, init: RequestInit) => Promise<Response>): HttpClient;
4
- static createFetchRequestAdapter(getAccessToken: () => Promise<string>, httpClient: HttpClient): FetchRequestAdapter;
5
- private test;
4
+ static createFetchRequestAdapter(getAccessToken: () => Promise<string>, httpClient?: HttpClient): FetchRequestAdapter;
6
5
  }
7
6
  //# sourceMappingURL=httpClientFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"httpClientFactory.d.ts","sourceRoot":"","sources":["../src/httpClientFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAIxG,qBAAa,iBAAiB;IAC1B,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,UAAU;IAOlG,MAAM,CAAC,yBAAyB,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,UAAU,GAAG,mBAAmB;IASpH,OAAO,CAAC,IAAI;CAGf"}
1
+ {"version":3,"file":"httpClientFactory.d.ts","sourceRoot":"","sources":["../src/httpClientFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAIxG,qBAAa,iBAAiB;IAC1B,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,UAAU;IAOlG,MAAM,CAAC,yBAAyB,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,mBAAmB;CAWxH"}
@@ -9,10 +9,8 @@ export class HttpClientFactory {
9
9
  }
10
10
  static createFetchRequestAdapter(getAccessToken, httpClient) {
11
11
  const auth = new BaseBearerTokenAuthenticationProvider(new AccessTokenProvider(getAccessToken));
12
+ httpClient = httpClient ?? this.create();
12
13
  return new FetchRequestAdapter(auth, undefined, undefined, httpClient);
13
14
  }
14
- test() {
15
- console.log('test');
16
- }
17
15
  }
18
16
  //# sourceMappingURL=httpClientFactory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"httpClientFactory.js","sourceRoot":"","sources":["../src/httpClientFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACxG,OAAO,EAAE,qCAAqC,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,MAAM,OAAO,iBAAiB;IAC1B,MAAM,CAAC,MAAM,CAAC,WAAuE;QAEjF,MAAM,WAAW,GAAG,CAAC,IAAI,YAAY,EAAE,EAAE,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC;QAElG,OAAO,IAAI,UAAU,CAAC,WAAW,EAAE,GAAG,WAAW,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,yBAAyB,CAAC,cAAqC,EAAE,UAAsB;QAC1F,MAAM,IAAI,GAAG,IAAI,qCAAqC,CAAC,IAAI,mBAAmB,CAAC,cAAc,CAAC,CAAC,CAAC;QAEhG,OAAO,IAAI,mBAAmB,CAC1B,IAAI,EACJ,SAAS,EACT,SAAS,EACT,UAAU,CAAC,CAAC;IACpB,CAAC;IACO,IAAI;QACR,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;CACJ"}
1
+ {"version":3,"file":"httpClientFactory.js","sourceRoot":"","sources":["../src/httpClientFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACxG,OAAO,EAAE,qCAAqC,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,MAAM,OAAO,iBAAiB;IAC1B,MAAM,CAAC,MAAM,CAAC,WAAuE;QAEjF,MAAM,WAAW,GAAG,CAAC,IAAI,YAAY,EAAE,EAAE,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC;QAElG,OAAO,IAAI,UAAU,CAAC,WAAW,EAAE,GAAG,WAAW,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,yBAAyB,CAAC,cAAqC,EAAE,UAAuB;QAC3F,MAAM,IAAI,GAAG,IAAI,qCAAqC,CAAC,IAAI,mBAAmB,CAAC,cAAc,CAAC,CAAC,CAAC;QAEhG,UAAU,GAAG,UAAU,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAEzC,OAAO,IAAI,mBAAmB,CAC1B,IAAI,EACJ,SAAS,EACT,SAAS,EACT,UAAU,CAAC,CAAC;IACpB,CAAC;CACJ"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adsk-platform/httpclient",
3
3
  "private": false,
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "author": "duszykf",
6
6
  "description": "Resilient HttpClient serving the Adsk Toolkit SDKs",
7
7
  "engines": {
@@ -21,6 +21,28 @@
21
21
  "files": [
22
22
  "_dist"
23
23
  ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/adsk-duszykf/Adsk.Platform.Toolkit.Typescript",
30
+ "directory": "packages/Autodesk.Common.HttpClient"
31
+ },
32
+ "homepage": "https://github.com/adsk-duszykf/Adsk.Platform.Toolkit.Typescript/tree/main/packages/Autodesk.Common.HttpClient",
33
+ "bugs": {
34
+ "url": "https://github.com/adsk-duszykf/Adsk.Platform.Toolkit.Typescript/issues"
35
+ },
36
+ "keywords": [
37
+ "autodesk",
38
+ "aps",
39
+ "httpclient",
40
+ "resilient",
41
+ "sdk",
42
+ "typescript",
43
+ "http",
44
+ "kiota"
45
+ ],
24
46
  "dependencies": {
25
47
  "@microsoft/kiota-bundle": "^1.0.0-preview.98"
26
48
  },