@nomalism-com/api 0.40.4 → 0.40.7
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 +370 -358
- package/dist/index.js +44 -29
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65,6 +65,7 @@ __export(main_exports, {
|
|
|
65
65
|
PaymentMethods: () => paymentMethods_exports,
|
|
66
66
|
Permissions: () => permission_exports,
|
|
67
67
|
Persona: () => persona_exports,
|
|
68
|
+
PortalClass: () => portal_exports,
|
|
68
69
|
PreSale: () => preSale_exports,
|
|
69
70
|
PreSaleProduct: () => preSaleProduct_exports,
|
|
70
71
|
Printer: () => printer_exports,
|
|
@@ -2278,12 +2279,6 @@ var Repository59 = class {
|
|
|
2278
2279
|
const response = await this.api.get(`${this.route}by_owner`, { params });
|
|
2279
2280
|
return response.data;
|
|
2280
2281
|
}
|
|
2281
|
-
async publicFindByOwnerId(params) {
|
|
2282
|
-
const response = await this.api.get(`${this.route}public_by_owner`, {
|
|
2283
|
-
params
|
|
2284
|
-
});
|
|
2285
|
-
return response.data;
|
|
2286
|
-
}
|
|
2287
2282
|
async find(params) {
|
|
2288
2283
|
const response = await this.api.get(`${this.route}`, { params });
|
|
2289
2284
|
return response.data;
|
|
@@ -2299,14 +2294,6 @@ var Repository59 = class {
|
|
|
2299
2294
|
async sendEmailDocument(body) {
|
|
2300
2295
|
await this.api.post(`${this.route}sendEmail`, body);
|
|
2301
2296
|
}
|
|
2302
|
-
async createPublicDocumentHeaderNote(data) {
|
|
2303
|
-
const response = await this.api.post(`${this.route}public_document_header_note`, data);
|
|
2304
|
-
return response.data;
|
|
2305
|
-
}
|
|
2306
|
-
async updatePublicDocumentHeaderNote({ id }, data) {
|
|
2307
|
-
const response = await this.api.put(`${this.route}public_document_header_note/${id}`, data);
|
|
2308
|
-
return response.data;
|
|
2309
|
-
}
|
|
2310
2297
|
};
|
|
2311
2298
|
|
|
2312
2299
|
// src/modules/supply/vatValidation.ts
|
|
@@ -3839,7 +3826,7 @@ var Repository107 = class {
|
|
|
3839
3826
|
}
|
|
3840
3827
|
};
|
|
3841
3828
|
|
|
3842
|
-
// src/modules/
|
|
3829
|
+
// src/modules/ui/sideMenu.ts
|
|
3843
3830
|
var sideMenu_exports = {};
|
|
3844
3831
|
__export(sideMenu_exports, {
|
|
3845
3832
|
default: () => Repository108
|
|
@@ -4049,20 +4036,6 @@ var Repository116 = class {
|
|
|
4049
4036
|
const response = await this.api.post(`${this.route}providers`, body);
|
|
4050
4037
|
return response.data;
|
|
4051
4038
|
}
|
|
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
4039
|
};
|
|
4067
4040
|
|
|
4068
4041
|
// src/modules/document/NRCL.ts
|
|
@@ -4172,6 +4145,47 @@ var Repository119 = class {
|
|
|
4172
4145
|
const response = await this.api.delete(`${this.route}delete_batch${selector.id}`);
|
|
4173
4146
|
return response.data;
|
|
4174
4147
|
}
|
|
4148
|
+
getBatchPdfUrl(opts) {
|
|
4149
|
+
const qs = new URLSearchParams();
|
|
4150
|
+
qs.set("token", opts.token);
|
|
4151
|
+
if (opts.ids?.length) {
|
|
4152
|
+
qs.set("ids", opts.ids.join(","));
|
|
4153
|
+
return `${this.route}create_batch_pdf?${qs.toString()}`;
|
|
4154
|
+
}
|
|
4155
|
+
if (opts.month && opts.year) {
|
|
4156
|
+
qs.set("month", String(opts.month));
|
|
4157
|
+
qs.set("year", String(opts.year));
|
|
4158
|
+
return `${this.route}create_batch_pdf?${qs.toString()}`;
|
|
4159
|
+
}
|
|
4160
|
+
throw new Error("Precisas de passar ids OU month/year");
|
|
4161
|
+
}
|
|
4162
|
+
};
|
|
4163
|
+
|
|
4164
|
+
// src/modules/ui/portal.ts
|
|
4165
|
+
var portal_exports = {};
|
|
4166
|
+
__export(portal_exports, {
|
|
4167
|
+
default: () => Repository120
|
|
4168
|
+
});
|
|
4169
|
+
var Repository120 = class {
|
|
4170
|
+
constructor({ api, route, publicRoute }) {
|
|
4171
|
+
this.api = api;
|
|
4172
|
+
this.route = route;
|
|
4173
|
+
this.publicRoute = publicRoute;
|
|
4174
|
+
}
|
|
4175
|
+
async publicFindByOwnerId(params) {
|
|
4176
|
+
const response = await this.api.get(`${this.route}public_by_owner`, {
|
|
4177
|
+
params
|
|
4178
|
+
});
|
|
4179
|
+
return response.data;
|
|
4180
|
+
}
|
|
4181
|
+
async createPublicDocumentHeaderNote(data) {
|
|
4182
|
+
const response = await this.api.post(`${this.route}public_document_header_note`, data);
|
|
4183
|
+
return response.data;
|
|
4184
|
+
}
|
|
4185
|
+
async updatePublicDocumentHeaderNote({ id }, data) {
|
|
4186
|
+
const response = await this.api.put(`${this.route}public_document_header_note/${id}`, data);
|
|
4187
|
+
return response.data;
|
|
4188
|
+
}
|
|
4175
4189
|
};
|
|
4176
4190
|
|
|
4177
4191
|
// src/main.ts
|
|
@@ -4371,6 +4385,7 @@ var API = class {
|
|
|
4371
4385
|
this.NRCL = new Repository117(getModuleParams("stock", "nrcl"));
|
|
4372
4386
|
this.PaymentBatch = new Repository119(getModuleParams("stock", "payment_batch"));
|
|
4373
4387
|
this.CurrentAccount = new Repository118(getModuleParams("stock", "current_account"));
|
|
4388
|
+
this.Portal = new Repository120(getModuleParams("stock", "portal"));
|
|
4374
4389
|
}
|
|
4375
4390
|
};
|
|
4376
4391
|
|
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
|
+
"version": "0.40.7",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|