@nomalism-com/api 0.40.4 → 0.40.5

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.d.ts CHANGED
@@ -1815,12 +1815,6 @@ declare class Repository$3 implements Nomalism$1.NPF.IRepository {
1815
1815
  private api;
1816
1816
  constructor({ api, route, publicRoute }: IModuleConstructor);
1817
1817
  create(body: Nomalism$1.NPF.IProviderPaymentRequest[]): Promise<string[]>;
1818
- getBatchPdfUrl(opts: {
1819
- month?: number;
1820
- year?: number;
1821
- ids?: string[];
1822
- token: string;
1823
- }): string;
1824
1818
  }
1825
1819
 
1826
1820
  declare namespace NPF {
@@ -1866,6 +1860,12 @@ declare class Repository implements Nomalism$1.PaymentBatch.IRepository {
1866
1860
  findCreated(): Promise<Nomalism$1.PaymentBatch.IPaymentsBatchResponse[]>;
1867
1861
  updateDownloadNumber(params: Nomalism$1.shared.IFindByIdRequest): Promise<void>;
1868
1862
  deleteOne(selector: Nomalism$1.shared.IFindByIdRequest): Promise<void>;
1863
+ getBatchPdfUrl(opts: {
1864
+ month?: number;
1865
+ year?: number;
1866
+ ids?: string[];
1867
+ token: string;
1868
+ }): string;
1869
1869
  }
1870
1870
 
1871
1871
  declare namespace paymentBatch {
package/dist/index.js CHANGED
@@ -4049,20 +4049,6 @@ var Repository116 = class {
4049
4049
  const response = await this.api.post(`${this.route}providers`, body);
4050
4050
  return response.data;
4051
4051
  }
4052
- getBatchPdfUrl(opts) {
4053
- const qs = new URLSearchParams();
4054
- qs.set("token", opts.token);
4055
- if (opts.ids?.length) {
4056
- qs.set("ids", opts.ids.join(","));
4057
- return `${this.route}create_batch_pdf?${qs.toString()}`;
4058
- }
4059
- if (opts.month && opts.year) {
4060
- qs.set("month", String(opts.month));
4061
- qs.set("year", String(opts.year));
4062
- return `${this.route}create_batch_pdf?${qs.toString()}`;
4063
- }
4064
- throw new Error("Precisas de passar ids OU month/year");
4065
- }
4066
4052
  };
4067
4053
 
4068
4054
  // src/modules/document/NRCL.ts
@@ -4172,6 +4158,20 @@ var Repository119 = class {
4172
4158
  const response = await this.api.delete(`${this.route}delete_batch${selector.id}`);
4173
4159
  return response.data;
4174
4160
  }
4161
+ getBatchPdfUrl(opts) {
4162
+ const qs = new URLSearchParams();
4163
+ qs.set("token", opts.token);
4164
+ if (opts.ids?.length) {
4165
+ qs.set("ids", opts.ids.join(","));
4166
+ return `${this.route}create_batch_pdf?${qs.toString()}`;
4167
+ }
4168
+ if (opts.month && opts.year) {
4169
+ qs.set("month", String(opts.month));
4170
+ qs.set("year", String(opts.year));
4171
+ return `${this.route}create_batch_pdf?${qs.toString()}`;
4172
+ }
4173
+ throw new Error("Precisas de passar ids OU month/year");
4174
+ }
4175
4175
  };
4176
4176
 
4177
4177
  // src/main.ts
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.40.4",
4
+ "version": "0.40.5",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",