@nomalism-com/api 0.51.7 → 0.51.9

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/dist/index.cjs CHANGED
@@ -2765,6 +2765,20 @@ var Repository70 = class {
2765
2765
  });
2766
2766
  return response.data;
2767
2767
  }
2768
+ async findAccountAdjustment(params) {
2769
+ const response = await this.api.get(
2770
+ `${this.route}adjustment`,
2771
+ { params }
2772
+ );
2773
+ return response.data;
2774
+ }
2775
+ async createAccountAdjustment(data) {
2776
+ const response = await this.api.post(
2777
+ `${this.route}adjustment`,
2778
+ data
2779
+ );
2780
+ return response.data;
2781
+ }
2768
2782
  getExportCurrentAccountUrl({
2769
2783
  owner_id,
2770
2784
  start_date,
@@ -2871,12 +2885,8 @@ var Repository71 = class {
2871
2885
  }
2872
2886
  return `${this.route}document_pdf/${id}?${qs.toString()}`;
2873
2887
  }
2874
- async documentThermalPrint({
2875
- id
2876
- }) {
2877
- const result = await this.api.get(
2878
- `${this.route}document_thermal_print/${id}`
2879
- );
2888
+ async documentThermalPrint({ id }, query) {
2889
+ const result = await this.api.get(`${this.route}document_thermal_print/${id}`, { params: query });
2880
2890
  return result.data;
2881
2891
  }
2882
2892
  async documentList({
@@ -3227,6 +3237,13 @@ var Repository82 = class {
3227
3237
  async retry(body) {
3228
3238
  await this.api.post(`${this.route}retry`, body);
3229
3239
  }
3240
+ async viewPdf(selector) {
3241
+ const response = await this.api.get(
3242
+ `${this.route}view_pdf/${selector.id}`,
3243
+ { responseType: "arraybuffer" }
3244
+ );
3245
+ return response.status === 204 ? null : new Uint8Array(response.data);
3246
+ }
3230
3247
  async create(body) {
3231
3248
  const response = await this.api.post(
3232
3249
  `${this.route}`,
package/dist/index.js CHANGED
@@ -2732,6 +2732,20 @@ var Repository70 = class {
2732
2732
  });
2733
2733
  return response.data;
2734
2734
  }
2735
+ async findAccountAdjustment(params) {
2736
+ const response = await this.api.get(
2737
+ `${this.route}adjustment`,
2738
+ { params }
2739
+ );
2740
+ return response.data;
2741
+ }
2742
+ async createAccountAdjustment(data) {
2743
+ const response = await this.api.post(
2744
+ `${this.route}adjustment`,
2745
+ data
2746
+ );
2747
+ return response.data;
2748
+ }
2735
2749
  getExportCurrentAccountUrl({
2736
2750
  owner_id,
2737
2751
  start_date,
@@ -2838,12 +2852,8 @@ var Repository71 = class {
2838
2852
  }
2839
2853
  return `${this.route}document_pdf/${id}?${qs.toString()}`;
2840
2854
  }
2841
- async documentThermalPrint({
2842
- id
2843
- }) {
2844
- const result = await this.api.get(
2845
- `${this.route}document_thermal_print/${id}`
2846
- );
2855
+ async documentThermalPrint({ id }, query) {
2856
+ const result = await this.api.get(`${this.route}document_thermal_print/${id}`, { params: query });
2847
2857
  return result.data;
2848
2858
  }
2849
2859
  async documentList({
@@ -3194,6 +3204,13 @@ var Repository82 = class {
3194
3204
  async retry(body) {
3195
3205
  await this.api.post(`${this.route}retry`, body);
3196
3206
  }
3207
+ async viewPdf(selector) {
3208
+ const response = await this.api.get(
3209
+ `${this.route}view_pdf/${selector.id}`,
3210
+ { responseType: "arraybuffer" }
3211
+ );
3212
+ return response.status === 204 ? null : new Uint8Array(response.data);
3213
+ }
3197
3214
  async create(body) {
3198
3215
  const response = await this.api.post(
3199
3216
  `${this.route}`,
@@ -10,5 +10,7 @@ export default class Repository implements Nomalism.CurrentAccount.IRepository {
10
10
  findClientUnpaidCredit(params: Nomalism.shared.IFindByOwnerIdRequest): Promise<Nomalism.CurrentAccount.IDocumentResponse[]>;
11
11
  findClientOverpaidCredit(params: Nomalism.shared.IFindByOwnerIdRequest): Promise<Nomalism.CurrentAccount.IDocumentResponse[]>;
12
12
  findClientUnpaidDebit(params: Nomalism.shared.IFindByOwnerIdRequest): Promise<Nomalism.CurrentAccount.IDocumentResponse[]>;
13
+ findAccountAdjustment(params: Nomalism.CurrentAccount.IAccountAdjustmentRequest): Promise<Nomalism.CurrentAccount.IAccountAdjustmentPreview>;
14
+ createAccountAdjustment(data: Nomalism.CurrentAccount.ICreateAccountAdjustmentRequest): Promise<Nomalism.CurrentAccount.ICreateAccountAdjustmentResponse>;
13
15
  getExportCurrentAccountUrl({ owner_id, start_date, end_date, output, token, }: Nomalism.CurrentAccount.IExportCurrentAccountRequest): string;
14
16
  }
@@ -20,7 +20,7 @@ export default class Repository implements Nomalism.DocumentHeader.IRepository {
20
20
  markUnsentClientNotification({ id, }: Nomalism.shared.IFindByIdRequest): Promise<void>;
21
21
  documentPdf({ id }: Nomalism.shared.IFindByIdRequest): Promise<string>;
22
22
  getDocumentPdfUrl({ id }: Nomalism.shared.IFindByIdRequest, data?: Nomalism.DocumentHeader.IDocumentPdfRequest): string;
23
- documentThermalPrint({ id, }: Nomalism.shared.IFindByIdRequest): Promise<string>;
23
+ documentThermalPrint({ id }: Nomalism.shared.IFindByIdRequest, query?: Nomalism.DocumentHeader.IThermalPrintRequest): Promise<Nomalism.DocumentHeader.IThermalPrintOperation[]>;
24
24
  documentList({ id, }: Nomalism.shared.IFindByIdRequest): Promise<Nomalism.DocumentHeader.IDocumentListResponse[]>;
25
25
  findStartDocumentHeaderSiblings({ id, }: Nomalism.shared.IFindByIdRequest): Promise<Nomalism.DocumentHeader.IFindStartDocumentHeaderSiblingsResponse>;
26
26
  createSiteProposal(data: Nomalism.shared.IBrokerTopicPayload[Nomalism.shared.IBrokerTopic.create_site_proposal]): Promise<Nomalism.ProjectInfo.ICreateResponse>;
@@ -9,5 +9,6 @@ export default class Repository implements Nomalism.ExternalDocumentHeader.IRepo
9
9
  deleteOne(params?: Nomalism.shared.IFindByIdRequest): Promise<Nomalism.ExternalDocumentHeader.Entity | null>;
10
10
  sendEmailDocument(body: Nomalism.ExternalDocumentHeader.ISendEmailDocumentRequest): Promise<void>;
11
11
  retry(body: Nomalism.shared.IFindByIdRequest): Promise<void>;
12
+ viewPdf(selector: Nomalism.shared.IFindByIdRequest): Promise<Uint8Array | null>;
12
13
  create(body: Nomalism.ExternalDocumentHeader.ICreateRequest): Promise<Nomalism.ExternalDocumentHeader.Entity>;
13
14
  }
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.51.7",
4
+ "version": "0.51.9",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -30,12 +30,12 @@
30
30
  "prepare": "husky"
31
31
  },
32
32
  "dependencies": {
33
- "@nomalism-com/types": "^0.51.7",
33
+ "@nomalism-com/types": "^0.51.9",
34
34
  "axios": "^1.20.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@eslint/js": "^10.0.1",
38
- "@swc/core": "^1.16.18",
38
+ "@swc/core": "^1.16.20",
39
39
  "@types/node": "^26.6.5",
40
40
  "@typescript-eslint/eslint-plugin": "^8.62.0",
41
41
  "@typescript-eslint/parser": "^8.62.0",