@resolution/atlassian-api-common 0.16.7 → 0.16.8

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.
@@ -2,21 +2,27 @@ import type { CommonHttpClientFetchRequest, CommonHttpClientFetchResponse } from
2
2
  import type { AnyResponse } from "./common";
3
3
  /**
4
4
  * A product request function compatible with `@forge/api`'s `requestJira`/`requestConfluence`.
5
+ *
6
+ * The url parameter uses `any` because `@forge/api` defines an opaque `Route` type that cannot
7
+ * be represented without importing it. Using `unknown` would fail due to function parameter
8
+ * contravariance: TypeScript would reject assigning a function that accepts only `Route` to one
9
+ * that accepts `unknown`, since `unknown` is wider than `Route`.
5
10
  */
6
- type ForgeApiProductRequestFunction = (url: string, init?: Record<string, unknown>) => Promise<AnyResponse>;
11
+ type ForgeApiProductRequestFunction = (url: any, init?: Record<string, unknown>) => Promise<AnyResponse>;
12
+ interface ForgeApiProductRequestMethods {
13
+ requestJira: ForgeApiProductRequestFunction;
14
+ requestConfluence: ForgeApiProductRequestFunction;
15
+ }
7
16
  /**
8
17
  * Minimal type stub for the `@forge/api` namespace.
18
+ *
19
+ * `assumeTrustedRoute` returns `any` for the same reason as above: the actual return type is the
20
+ * opaque `Route` type, and the return value is passed directly to `requestJira`/`requestConfluence`.
9
21
  */
10
22
  interface ForgeApiNamespace {
11
- asApp(): {
12
- requestJira: ForgeApiProductRequestFunction;
13
- requestConfluence: ForgeApiProductRequestFunction;
14
- };
15
- asUser(): {
16
- requestJira: ForgeApiProductRequestFunction;
17
- requestConfluence: ForgeApiProductRequestFunction;
18
- };
19
- assumeTrustedRoute(route: string): string;
23
+ asApp(): ForgeApiProductRequestMethods;
24
+ asUser(): ForgeApiProductRequestMethods;
25
+ assumeTrustedRoute(route: string): any;
20
26
  }
21
27
  /**
22
28
  * The product name of the Atlassian product instance supported by `createForgeApiWithProviderFetch`.
@@ -1 +1 @@
1
- {"version":3,"file":"createForgeApiFetch.js","sourceRoot":"","sources":["../../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AAC;YACD,OAAO;gBACL,MAAM,EAAE,QAAQ,CAAC,MAAM;gBACvB,UAAU,EAAE,QAAQ,CAAC,UAAU;gBAC/B,IAAI;gBACJ,GAAG,EAAE,GAAG,CAAC,QAAQ,EAAE;gBACnB,OAAO;gBACP,EAAE,EAAE,QAAQ,CAAC,EAAE;gBACf,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;aAC/C,CAAC;QACJ,CAAC;KAAA,CAAC;AACJ,CAAC;AAxCD,kDAwCC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolution/atlassian-api-common",
3
- "version": "0.16.7",
3
+ "version": "0.16.8",
4
4
  "description": "Shared code across different implementations of Atlassian API Clients.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -41,5 +41,5 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "4d08643b5b800fc1fe767aff3494e2a07dba57bd"
44
+ "gitHead": "476456fe56629d80d10f544413b8b95537c55423"
45
45
  }