@resolution/atlassian-api-common 0.6.4 → 0.7.4

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/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.7.4](https://bitbucket.org/resolutiongmbh/atlassian-api-clients/compare/v0.7.3...v0.7.4) (2024-09-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * add more information to HTTP Errors ([9d702c0](https://bitbucket.org/resolutiongmbh/atlassian-api-clients/commits/9d702c00f7bce55c6ce285430462fa85e4234abb))
12
+
13
+
14
+
15
+
16
+
17
+ # [0.7.0](https://bitbucket.org/resolutiongmbh/atlassian-api-clients/compare/v0.6.4...v0.7.0) (2024-09-10)
18
+
19
+
20
+ ### Features
21
+
22
+ * support forgeApiWithProvider in jira and confluence ([4de975a](https://bitbucket.org/resolutiongmbh/atlassian-api-clients/commits/4de975aa1a80c59d1cbbddc7d214622797fcb5b3))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [0.6.4](https://bitbucket.org/resolutiongmbh/atlassian-api-clients/compare/v0.6.3...v0.6.4) (2024-09-10)
7
29
 
8
30
 
@@ -1,5 +1,9 @@
1
1
  import type { APIResponse } from "@forge/api";
2
2
  import type { CommonHttpClientFetchResponseBody } from "api-typescript-generator/openapi-client";
3
+ /**
4
+ * The product name of the Atlassian product instance.
5
+ */
6
+ export type AtlassianProductName = "jira" | "confluence";
3
7
  export declare const contentTypeHeaderName = "content-type";
4
8
  /**
5
9
  * Atlassian API Endpoints contradict HTTP specification by returning empty body for JSON responses.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fetch/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGa,QAAA,qBAAqB,GAAG,cAAc,CAAC;AAEpD;;;GAGG;AACU,QAAA,qB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;AACH,SAAsB,gCAAgC,CACpD,QAAgC;;QAEhC,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,6BAAqB,CAAC,CAAC;QAEhE,IAAI,WAAW,IAAI,IAAA,uBAAe,EAAC,WAAW,CAAC,EAAE,CAAC;YAChD,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACvC,OAAO,QAAQ;gBACb,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;gBAC9C,CAAC,CAAC,6BAAqB,CAAC;QAC5B,CAAC;QAED,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,IAAI,IAAI,CAAC,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;SAC/C,CAAC;IACJ,CAAC;CAAA;AAhBD,4EAgBC"}
@@ -0,0 +1,26 @@
1
+ import type { ExternalAuthFetchMethods } from "@forge/api";
2
+ import type { CommonHttpClientFetchRequest, CommonHttpClientFetchResponse } from "api-typescript-generator/openapi-client";
3
+ /**
4
+ * The product name of the Atlassian product instance supported by `createForgeApiWithProviderFetch`.
5
+ */
6
+ type ApiClientForgeApiWithProviderProductName = "jira" | "confluence";
7
+ /**
8
+ * Forge API provider-based client options for JIRA.
9
+ *
10
+ * @category API Client Constructor Options
11
+ */
12
+ export interface ApiClientForgeApiWithProviderOptions {
13
+ /**
14
+ * Result of `forgeApi.asUser().withProvider(...)` call.
15
+ */
16
+ forgeApiWithProvider: ExternalAuthFetchMethods;
17
+ /**
18
+ * The cloud ID of the Atlassian product instance.
19
+ */
20
+ cloudId: string;
21
+ }
22
+ /**
23
+ * Creates a fetch function that uses the provided Forge API with provider to make requests.
24
+ */
25
+ export declare function createForgeApiWithProviderFetch({ forgeApiWithProvider, cloudId }: ApiClientForgeApiWithProviderOptions, productName: ApiClientForgeApiWithProviderProductName): (url: URL, request: CommonHttpClientFetchRequest) => Promise<CommonHttpClientFetchResponse>;
26
+ export {};
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.createForgeApiWithProviderFetch = void 0;
13
+ const index_1 = require("./common/index");
14
+ /**
15
+ * The base URL for the Atlassian API.
16
+ * Is not used in order to perform the request, but is used to construct the URL for the response.
17
+ */
18
+ const apiHostUrl = "https://api.atlassian.com";
19
+ /**
20
+ * Creates a fetch function that uses the provided Forge API with provider to make requests.
21
+ */
22
+ function createForgeApiWithProviderFetch({ forgeApiWithProvider, cloudId }, productName) {
23
+ return function forgeBridgeFetch(url, request) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ const path = `/ex/${productName}/${cloudId}${url.pathname}${url.search}`;
26
+ const response = yield forgeApiWithProvider.fetch(path, Object.assign(Object.assign({}, request), {
27
+ // Forge API package uses BodyInit from `node-fetch` package, which is a bit different to the native one.
28
+ body: request.body }));
29
+ const body = yield (0, index_1.getResponseBodyFromFetchResponse)(response);
30
+ const headers = {};
31
+ response.headers.forEach((value, key) => {
32
+ headers[key] = value;
33
+ });
34
+ if (response.headers.has("set-cookie") === true &&
35
+ "getSetCookie" in response.headers) {
36
+ headers["set-cookie"] = response.headers.getSetCookie();
37
+ }
38
+ return {
39
+ status: response.status,
40
+ statusText: response.statusText,
41
+ body,
42
+ url: `${apiHostUrl}${path}`,
43
+ headers,
44
+ ok: response.ok,
45
+ customRequestProps: request.customRequestProps,
46
+ };
47
+ });
48
+ };
49
+ }
50
+ exports.createForgeApiWithProviderFetch = createForgeApiWithProviderFetch;
51
+ //# sourceMappingURL=createForgeApiWithProviderFetch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createForgeApiWithProviderFetch.js","sourceRoot":"","sources":["../../src/fetch/createForgeApiWithProviderFetch.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA,0CAAkE;AAOlE;;;GAGG;AACH,MAAM,UAAU,GAAG,2BAA2B,CAAC;AAkB/C;;GAEG;AACH,SAAgB,+BAA+B,CAC7C,EAAE,oBAAoB,EAAE,OAAO,EAAwC,EACvE,WAAqD;IAErD,OAAO,SAAe,gBAAgB,CACpC,GAAQ,EACR,OAAqC;;YAErC,MAAM,IAAI,GAAG,OAAO,WAAW,IAAI,OAAO,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;YACzE,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC,KAAK,CAAC,IAAI,kCACjD,OAAO;gBACV,yGAAyG;gBACzG,IAAI,EAAE,OAAO,CAAC,IAAa,IAC3B,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,IAAA,wCAAgC,EAAC,QAAQ,CAAC,CAAC;YAC9D,MAAM,OAAO,GAAoC,EAAE,CAAC;YACpD,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;gBACtC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACvB,CAAC,CAAC,CAAC;YACH,IACE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,IAAI;gBAC3C,cAAc,IAAI,QAAQ,CAAC,OAAO,EAClC,CAAC;gBACD,OAAO,CAAC,YAAY,CAAC,GACnB,QAAQ,CAAC,OAGV,CAAC,YAAY,EAAE,CAAC;YACnB,CAAC;YACD,OAAO;gBACL,MAAM,EAAE,QAAQ,CAAC,MAAM;gBACvB,UAAU,EAAE,QAAQ,CAAC,UAAU;gBAC/B,IAAI;gBACJ,GAAG,EAAE,GAAG,UAAU,GAAG,IAAI,EAAE;gBAC3B,OAAO;gBACP,EAAE,EAAE,QAAQ,CAAC,EAAE;gBACf,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;aAC/C,CAAC;QACJ,CAAC;KAAA,CAAC;AACJ,CAAC;AAvCD,0EAuCC"}
@@ -5,16 +5,16 @@ import type { CommonHttpClientFetchRequest, CommonHttpClientFetchResponse } from
5
5
  *
6
6
  * @category API Client Constructor Options
7
7
  */
8
- export type ApiClientForgeBridgeJiraOptions = {
8
+ export interface ApiClientForgeBridgeJiraOptions {
9
9
  requestJira: typeof requestJira;
10
- };
10
+ }
11
11
  /**
12
12
  * Forge-based frontend API client options for Confluence.
13
13
  *
14
14
  * @category API Client Constructor Options
15
15
  */
16
- export type ApiClientForgeBridgeConfluenceOptions = {
16
+ export interface ApiClientForgeBridgeConfluenceOptions {
17
17
  requestConfluence: typeof requestConfluence;
18
- };
18
+ }
19
19
  export declare const createJiraForgeBridgeFetch: ({ requestJira, }: ApiClientForgeBridgeJiraOptions) => (url: URL, request: CommonHttpClientFetchRequest) => Promise<CommonHttpClientFetchResponse>;
20
20
  export declare const createConfluenceForgeBridgeFetch: ({ requestConfluence, }: ApiClientForgeBridgeConfluenceOptions) => (url: URL, request: CommonHttpClientFetchRequest) => Promise<CommonHttpClientFetchResponse>;
@@ -1,10 +1,12 @@
1
1
  import type { CommonHttpClientOptions } from "api-typescript-generator/openapi-client";
2
+ import type { AtlassianProductName } from "./common";
2
3
  import { type ApiClientAceOptions } from "./createAceFetch";
3
4
  import { type ApiClientApOptions } from "./createApFetch";
4
5
  import { type ApiClientForgeApiExternalOptions } from "./createForgeApiExternalFetch";
5
6
  import { type ApiClientForgeApiOptions } from "./createForgeApiFetch";
7
+ import { type ApiClientForgeApiWithProviderOptions } from "./createForgeApiWithProviderFetch";
6
8
  import { type ApiClientForgeBridgeConfluenceOptions, type ApiClientForgeBridgeJiraOptions } from "./createForgeBridgeFetch";
7
- export type AllOpenApiClientOptions = ApiClientAceOptions | ApiClientApOptions | ApiClientForgeApiOptions | ApiClientForgeBridgeJiraOptions | ApiClientForgeBridgeConfluenceOptions | ApiClientForgeApiExternalOptions;
9
+ export type AllOpenApiClientOptions = ApiClientAceOptions | ApiClientApOptions | ApiClientForgeApiOptions | ApiClientForgeBridgeJiraOptions | ApiClientForgeBridgeConfluenceOptions | ApiClientForgeApiExternalOptions | ApiClientForgeApiWithProviderOptions;
8
10
  export type ApiClientOptions<T extends AllOpenApiClientOptions> = T & {
9
11
  /**
10
12
  * Custom validation error handler.
@@ -13,8 +15,8 @@ export type ApiClientOptions<T extends AllOpenApiClientOptions> = T & {
13
15
  };
14
16
  export declare function getCommonApiClientOptions<TOptions extends AllOpenApiClientOptions>(options: ApiClientOptions<TOptions> & {
15
17
  basePath?: string;
16
- }): Partial<CommonHttpClientOptions>;
17
- type CommonApiClientOptions = ApiClientAceOptions | ApiClientApOptions | ApiClientForgeApiOptions | ApiClientForgeApiExternalOptions;
18
+ }, productName: AtlassianProductName): Partial<CommonHttpClientOptions>;
19
+ type CommonApiClientOptions = ApiClientAceOptions | ApiClientApOptions | ApiClientForgeApiOptions | ApiClientForgeApiExternalOptions | ApiClientForgeApiWithProviderOptions;
18
20
  export declare function createAsAppMethod<TClass extends new (options: CommonApiClientOptions) => unknown>(): () => InstanceType<TClass>;
19
21
  export declare function createAsUserMethod<TClass extends new (options: CommonApiClientOptions) => unknown>(): (userAccountId: string) => InstanceType<TClass>;
20
22
  export {};
@@ -6,12 +6,13 @@ const createAceFetch_1 = require("./createAceFetch");
6
6
  const createApFetch_1 = require("./createApFetch");
7
7
  const createForgeApiExternalFetch_1 = require("./createForgeApiExternalFetch");
8
8
  const createForgeApiFetch_1 = require("./createForgeApiFetch");
9
+ const createForgeApiWithProviderFetch_1 = require("./createForgeApiWithProviderFetch");
9
10
  const createForgeBridgeFetch_1 = require("./createForgeBridgeFetch");
10
11
  /**
11
12
  * Get fetch function by API client options.
12
13
  * We have a huge number of fetch-functions here!
13
14
  */
14
- function getFetchByOptions(options) {
15
+ function getFetchByOptions(options, productName) {
15
16
  if ("forgeApi" in options) {
16
17
  return (0, createForgeApiFetch_1.createForgeApiFetch)(options);
17
18
  }
@@ -30,12 +31,15 @@ function getFetchByOptions(options) {
30
31
  else if ("fetch" in options) {
31
32
  return (0, createForgeApiExternalFetch_1.createForgeApiExternalFetch)(options);
32
33
  }
34
+ else if ("forgeApiWithProvider" in options) {
35
+ return (0, createForgeApiWithProviderFetch_1.createForgeApiWithProviderFetch)(options, productName);
36
+ }
33
37
  throw new Error("Unknown API Client options.");
34
38
  }
35
39
  /**
36
40
  * Error format description: https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#status-codes
37
41
  */
38
- function formatHttpErrorMessage(response) {
42
+ function formatHttpErrorMessage(response, request) {
39
43
  let additionalDetails = "";
40
44
  if (response.body.type === "json" &&
41
45
  typeof response.body.data === "object" &&
@@ -54,11 +58,12 @@ function formatHttpErrorMessage(response) {
54
58
  .join(",");
55
59
  }
56
60
  }
57
- return `HTTP Error ${response.status} (${response.statusText})${additionalDetails}`;
61
+ const url = new URL(response.url);
62
+ return `HTTP Error ${request.method} ${url.pathname} ${response.status} (${response.statusText})${additionalDetails}`;
58
63
  }
59
- function getCommonApiClientOptions(options) {
64
+ function getCommonApiClientOptions(options, productName) {
60
65
  const result = {
61
- fetch: getFetchByOptions(options),
66
+ fetch: getFetchByOptions(options, productName),
62
67
  formatHttpErrorMessage,
63
68
  errorClass: ApiError_1.ApiError,
64
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fetch/index.ts"],"names":[],"mappings":";;;AAKA,0CAAuC;AACvC,qDAA4E;AAC5E,mDAAyE;AACzE,+EAGuC;AACvC,+DAG+B;AAC/B,qEAKkC;AAiBlC;;;GA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AI,CAAC,OAAO,KACf,aAAa,EACb,KAAK,EAAE,KAAK,IACH,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AArBD,gDAqBC"}
package/lib/index.d.ts CHANGED
@@ -4,4 +4,5 @@ export { ApiClientAceOptions } from "./fetch/createAceFetch";
4
4
  export { ApiClientApOptions } from "./fetch/createApFetch";
5
5
  export { ApiClientForgeApiOptions } from "./fetch/createForgeApiFetch";
6
6
  export { ApiClientForgeApiExternalOptions } from "./fetch/createForgeApiExternalFetch";
7
+ export { ApiClientForgeApiWithProviderOptions } from "./fetch/createForgeApiWithProviderFetch";
7
8
  export { ApiClientForgeBridgeJiraOptions, ApiClientForgeBridgeConfluenceOptions, } from "./fetch/createForgeBridgeFetch";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolution/atlassian-api-common",
3
- "version": "0.6.4",
3
+ "version": "0.7.4",
4
4
  "description": "Shared code across different implementations of Atlassian API Clients.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "9429cb176f9968f75782a92eac6cc40a2940aba6"
46
+ "gitHead": "ea5d7ead90cf6ba1961b31463a169fe2000eb6d5"
47
47
  }