@nomalism-com/api 0.48.4 → 0.49.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.
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Private slot for the original error. A Symbol is used (instead of `cause`)
3
+ * specifically because Node's `util.inspect` — i.e. `console.log` — special-cases
4
+ * the `cause` property of an Error and prints it even when non-enumerable. A
5
+ * non-enumerable Symbol property is never surfaced by the logger, so the raw
6
+ * axios object stays available for debugging without bloating logs.
7
+ */
8
+ declare const RAW_ERROR: unique symbol;
1
9
  /**
2
10
  * Where the failure happened in the axios lifecycle.
3
11
  *
@@ -25,6 +33,7 @@ export interface IApiErrorFields {
25
33
  * debugging, but never dumped when the error is logged.
26
34
  */
27
35
  export declare class ApiError extends Error {
36
+ readonly [RAW_ERROR]?: unknown;
28
37
  readonly kind: ApiErrorKind;
29
38
  /** HTTP status code, when the server responded. */
30
39
  readonly status?: number;
@@ -55,3 +64,4 @@ export declare function isApiError(error: unknown): error is ApiError;
55
64
  * themselves.
56
65
  */
57
66
  export declare function parseApiError(error: unknown): ApiError;
67
+ export {};
package/dist/main.d.ts CHANGED
@@ -23,7 +23,6 @@ import EmailLogClass from "./modules/integration/emailLog";
23
23
  import EmailTemplateClass from "./modules/integration/emailTemplate";
24
24
  import EmailTemplateAttachmentClass from "./modules/integration/emailTemplateAttachment";
25
25
  import EmailVerificationClass from "./modules/integration/emailVerification";
26
- import EuPagoClass from "./modules/integration/euPago";
27
26
  import GoogleFilePermissionClass from "./modules/integration/googleFilePermission";
28
27
  import GoogleSheetsClass from "./modules/integration/googleSheets";
29
28
  import ObservationClass from "./modules/integration/observation";
@@ -150,7 +149,6 @@ export * as EmailLog from "./modules/integration/emailLog";
150
149
  export * as EmailTemplate from "./modules/integration/emailTemplate";
151
150
  export * as EmailTemplateAttachment from "./modules/integration/emailTemplateAttachment";
152
151
  export * as EmailVerification from "./modules/integration/emailVerification";
153
- export * as EuPago from "./modules/integration/euPago";
154
152
  export * as GoogleFilePermission from "./modules/integration/googleFilePermission";
155
153
  export * as GoogleSheets from "./modules/integration/googleSheets";
156
154
  export * as Observation from "./modules/integration/observation";
@@ -369,7 +367,6 @@ export declare class API {
369
367
  ReturnToProvider: ReturnToProviderClass;
370
368
  EmailVerification: EmailVerificationClass;
371
369
  EmailLog: EmailLogClass;
372
- EuPago: EuPagoClass;
373
370
  DocumentLineNote: DocumentLineNoteClass;
374
371
  SavedProviderProposal: SavedProviderProposalClass;
375
372
  ProductGoogleSheets: ProductGoogleSheetsClass;
@@ -6,6 +6,6 @@ export default class Repository implements Nomalism.Multimedia.IApi {
6
6
  private api;
7
7
  constructor({ api, route }: IModuleConstructor);
8
8
  getUrl(multimediaId: string, download?: boolean): string;
9
- create(multipartFormData: any, headers?: RawAxiosRequestHeaders): Promise<Nomalism.Multimedia.Entity>;
10
- update(id: string, multipartFormData: any, headers?: RawAxiosRequestHeaders): Promise<void>;
9
+ create(multipartFormData: unknown, headers?: RawAxiosRequestHeaders): Promise<Nomalism.Multimedia.Entity>;
10
+ update(id: string, multipartFormData: unknown, headers?: RawAxiosRequestHeaders): Promise<void>;
11
11
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nomalism-com/api",
3
3
  "description": "A nomalism API package for performing HTTP requests on API endpoints",
4
- "version": "0.48.4",
4
+ "version": "0.49.2",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -9,8 +9,14 @@
9
9
  "types": "./dist/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
- "import": "./dist/index.js",
13
- "types": "./dist/index.d.ts"
12
+ "import": {
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ },
16
+ "require": {
17
+ "types": "./dist/index.d.ts",
18
+ "default": "./dist/index.cjs"
19
+ }
14
20
  }
15
21
  },
16
22
  "files": [
@@ -24,24 +30,24 @@
24
30
  "prepare": "husky"
25
31
  },
26
32
  "dependencies": {
27
- "@nomalism-com/types": "^0.48.4",
28
- "axios": "^1.18.1"
33
+ "@nomalism-com/types": "^0.49.2",
34
+ "axios": "^1.20.0"
29
35
  },
30
36
  "devDependencies": {
31
37
  "@eslint/js": "^10.0.1",
32
- "@swc/core": "^1.15.46",
33
- "@types/node": "^26.1.1",
38
+ "@swc/core": "^1.16.2",
39
+ "@types/node": "^26.5.0",
34
40
  "@typescript-eslint/eslint-plugin": "^8.62.0",
35
41
  "@typescript-eslint/parser": "^8.62.0",
36
- "eslint": "^10.7.0",
42
+ "eslint": "^10.10.0",
37
43
  "eslint-config-prettier": "^10.1.8",
38
44
  "eslint-plugin-simple-import-sort": "^14.0.0",
39
- "globals": "^17.7.0",
45
+ "globals": "^17.12.0",
40
46
  "husky": "^9.1.7",
41
- "lint-staged": "^17.1.0",
47
+ "lint-staged": "^17.5.0",
42
48
  "prettier": "^3.9.6",
43
49
  "tsup": "^8.5.1",
44
- "typescript-eslint": "^8.65.0"
50
+ "typescript-eslint": "^8.70.0"
45
51
  },
46
52
  "repository": {
47
53
  "type": "git",
@@ -60,5 +66,9 @@
60
66
  "*.{json,jsonc,css,scss,md,html,yml,yaml}": [
61
67
  "prettier --write"
62
68
  ]
69
+ },
70
+ "allowScripts": {
71
+ "esbuild@0.27.7": true,
72
+ "@swc/core@1.16.2": true
63
73
  }
64
74
  }
@@ -1,10 +0,0 @@
1
- import Nomalism from "@nomalism-com/types";
2
- import { IModuleConstructor } from "../../main";
3
- export default class Repository implements Nomalism.EuPago.IApi {
4
- route: string;
5
- private api;
6
- constructor({ api, route }: IModuleConstructor);
7
- generate(data: Nomalism.EuPago.ICreatePendingPaymentRequest): Promise<Nomalism.EuPago.Entity>;
8
- chooseMethod({ id, ...body }: Nomalism.EuPago.IChooseMethodRequest): Promise<Nomalism.EuPago.Entity>;
9
- find(): Promise<Nomalism.EuPago.IFindResponse[]>;
10
- }