@resolution/organizations-api-client 0.15.0 → 0.15.2

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/lib/index.d.ts CHANGED
@@ -33,7 +33,11 @@ export interface OrganizationsApiClientOptions {
33
33
  * Determine whether to retry the request on error.
34
34
  */
35
35
  shouldRetryOnError?: (error: ApiError, attemptNumber: number) => Promise<boolean> | boolean;
36
+ /**
37
+ * Process error before throwing it.
38
+ */
39
+ processError?: (error: ApiError) => Error;
36
40
  }
37
41
  export declare class OrganizationsApiClient extends BaseOrganizationsApiClient {
38
- constructor({ apiKey, shouldRetryOnError, ...otherProps }: OrganizationsApiClientOptions);
42
+ constructor({ apiKey, shouldRetryOnError, processError, ...otherProps }: OrganizationsApiClientOptions);
39
43
  }
package/lib/index.js CHANGED
@@ -36,10 +36,10 @@ validationSchemaStorage_1.validationSchemaStorage.setErrorClass(atlassian_api_co
36
36
  const BASE_PATH = "/admin";
37
37
  class OrganizationsApiClient extends BaseOrganizationsApiClient_1.BaseOrganizationsApiClient {
38
38
  constructor(_a) {
39
- var { apiKey, shouldRetryOnError } = _a, otherProps = __rest(_a, ["apiKey", "shouldRetryOnError"]);
39
+ var { apiKey, shouldRetryOnError, processError } = _a, otherProps = __rest(_a, ["apiKey", "shouldRetryOnError", "processError"]);
40
40
  super(Object.assign({ baseUrl: "https://api.atlassian.com", headers: {
41
41
  Authorization: `Bearer ${apiKey}`,
42
- }, formatHttpErrorMessage: atlassian_api_common_1.formatHttpErrorMessage, errorClass: atlassian_api_common_1.ApiError, preprocessRequest: (request) => Promise.resolve(Object.assign(Object.assign({}, request), { path: BASE_PATH + request.path })), shouldRetryOnError: shouldRetryOnError }, otherProps));
42
+ }, formatHttpErrorMessage: atlassian_api_common_1.formatHttpErrorMessage, errorClass: atlassian_api_common_1.ApiError, preprocessRequest: (request) => Promise.resolve(Object.assign(Object.assign({}, request), { path: BASE_PATH + request.path })), shouldRetryOnError: shouldRetryOnError, processError: processError }, otherProps));
43
43
  }
44
44
  }
45
45
  exports.OrganizationsApiClient = OrganizationsApiClient;
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2EAI0C;AASjC,yFAZP,+BAAQ,OAYO;AAAE,gHAVjB,sDAA+B,OAUiB;AALlD,mGAAgG;AAChG,6FAA0F;AAE1F,qFAAmE;AAInE,iDAAuB,CAAC,aAAa,CAAC,+BAAQ,CAAC,CAAC;AAqChD,MAAM,SAAS,GAAG,QAAQ,CAAC;AAE3B,MAAa,sBAAuB,SAAQ,uDAA0B;IACpE,YAAY,EAIoB;YAJpB,EACV,MAAM,EACN,kBAAkB,OAEY,EAD3B,UAAU,cAHH,gCAIX,CADc;QAEb,KAAK,iBACH,OAAO,EAAE,2BAA2B,EACpC,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,MAAM,EAAE;aAClC,EACD,sBAAsB,EAAtB,6CAAsB,EACtB,UAAU,EAAE,+BAAQ,EACpB,iBAAiB,EAAE,CAAC,OAAO,EAAE,EAAE,CAC7B,OAAO,CAAC,OAAO,iCACV,OAAO,KACV,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,IAC9B,EACJ,kBAAkB,EAChB,kBAAmE,IAClE,UAAU,EACb,CAAC;IACL,CAAC;CACF;AAvBD,wDAuBC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2EAI0C;AASjC,yFAZP,+BAAQ,OAYO;AAAE,gHAVjB,sDAA+B,OAUiB;AALlD,mGAAgG;AAChG,6FAA0F;AAE1F,qFAAmE;AAInE,iDAAuB,CAAC,aAAa,CAAC,+BAAQ,CAAC,CAAC;AAyChD,MAAM,SAAS,GAAG,QAAQ,CAAC;AAE3B,MAAa,sBAAuB,SAAQ,uDAA0B;IACpE,YAAY,EAKoB;YALpB,EACV,MAAM,EACN,kBAAkB,EAClB,YAAY,OAEkB,EAD3B,UAAU,cAJH,gDAKX,CADc;QAEb,KAAK,iBACH,OAAO,EAAE,2BAA2B,EACpC,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,MAAM,EAAE;aAClC,EACD,sBAAsB,EAAtB,6CAAsB,EACtB,UAAU,EAAE,+BAAQ,EACpB,iBAAiB,EAAE,CAAC,OAAO,EAAE,EAAE,CAC7B,OAAO,CAAC,OAAO,iCACV,OAAO,KACV,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,IAC9B,EACJ,kBAAkB,EAChB,kBAAmE,EACrE,YAAY,EAAE,YAAuD,IAClE,UAAU,EACb,CAAC;IACL,CAAC;CACF;AAzBD,wDAyBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolution/organizations-api-client",
3
- "version": "0.15.0",
3
+ "version": "0.15.2",
4
4
  "description": "Atlassian Organizations API Client based on OpenAPI Schema from Atlassian.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -38,10 +38,10 @@
38
38
  },
39
39
  "homepage": "https://bitbucket.org/resolutiongmbh/atlassian-api-clients#readme",
40
40
  "dependencies": {
41
- "@resolution/atlassian-api-common": "^0.15.0"
41
+ "@resolution/atlassian-api-common": "^0.15.2"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "be95a977ba9947d53fef32b0c71bce839d86a61d"
46
+ "gitHead": "7bfa8846b42dcb6a0c6a42d8611735c7c6cd23c4"
47
47
  }