@nomalism-com/api 1.2.4 → 1.3.1
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 +460 -369
- package/dist/index.js +274 -148
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __export(main_exports, {
|
|
|
20
20
|
Clt: () => clt_exports,
|
|
21
21
|
Commissioner: () => commissioner_exports,
|
|
22
22
|
Country: () => country_exports,
|
|
23
|
+
CurrentAccountClass: () => currentAccount_exports,
|
|
23
24
|
DashboardClass: () => dashboard_exports,
|
|
24
25
|
DeliveryMethods: () => deliveryMethods_exports,
|
|
25
26
|
DocumentHeader: () => documentHeader_exports,
|
|
@@ -40,7 +41,9 @@ __export(main_exports, {
|
|
|
40
41
|
ExternalDocumentType: () => externalDocumentType_exports,
|
|
41
42
|
Favorites: () => favorites_exports,
|
|
42
43
|
File: () => file_exports,
|
|
44
|
+
GmailsClass: () => gmails_exports,
|
|
43
45
|
GoogleFilePermission: () => googleFilePermission_exports,
|
|
46
|
+
GoogleSheetPoolClass: () => googleSheetPool_exports,
|
|
44
47
|
GoogleSheets: () => googleSheets_exports,
|
|
45
48
|
GroupPermissions: () => groupPermission_exports,
|
|
46
49
|
Inventario: () => inventario_exports,
|
|
@@ -50,6 +53,8 @@ __export(main_exports, {
|
|
|
50
53
|
MaterialEntrance: () => materialEntrance_exports,
|
|
51
54
|
MaturityDates: () => maturityDates_exports,
|
|
52
55
|
Multimedia: () => multimedia_exports,
|
|
56
|
+
NPFClass: () => NPF_exports,
|
|
57
|
+
NRCLClass: () => NRCL_exports,
|
|
53
58
|
Npc: () => npc_exports,
|
|
54
59
|
Observation: () => observation_exports,
|
|
55
60
|
ObservationType: () => observationType_exports,
|
|
@@ -57,9 +62,11 @@ __export(main_exports, {
|
|
|
57
62
|
OrderManagement: () => orderManagement_exports,
|
|
58
63
|
Password: () => password_exports,
|
|
59
64
|
Payment: () => payment_exports,
|
|
65
|
+
PaymentBatchClass: () => paymentBatch_exports,
|
|
60
66
|
PaymentMethods: () => paymentMethods_exports,
|
|
61
67
|
Permissions: () => permission_exports,
|
|
62
68
|
Persona: () => persona_exports,
|
|
69
|
+
PortalClass: () => portal_exports,
|
|
63
70
|
PreSale: () => preSale_exports,
|
|
64
71
|
PreSaleProduct: () => preSaleProduct_exports,
|
|
65
72
|
Printer: () => printer_exports,
|
|
@@ -408,10 +415,6 @@ var Repository7 = class {
|
|
|
408
415
|
const response = await this.api.get(`${this.route}${selector.id}`);
|
|
409
416
|
return response.data;
|
|
410
417
|
}
|
|
411
|
-
async findStart(selector) {
|
|
412
|
-
const response = await this.api.get(`${this.route}start/${selector.id}`);
|
|
413
|
-
return response.data;
|
|
414
|
-
}
|
|
415
418
|
async findStartVirtual(selector) {
|
|
416
419
|
const response = await this.api.get(`${this.route}start_virtual/${selector.id}`);
|
|
417
420
|
return response.data;
|
|
@@ -430,24 +433,6 @@ var Repository7 = class {
|
|
|
430
433
|
const response = await this.api.get(`${this.route}`, { params });
|
|
431
434
|
return response.data;
|
|
432
435
|
}
|
|
433
|
-
async findClientUnpaidCredit(params) {
|
|
434
|
-
const response = await this.api.get(`${this.route}unpaid_credit`, {
|
|
435
|
-
params
|
|
436
|
-
});
|
|
437
|
-
return response.data;
|
|
438
|
-
}
|
|
439
|
-
async findClientUnpaidDebit(params) {
|
|
440
|
-
const response = await this.api.get(`${this.route}unpaid_debit`, {
|
|
441
|
-
params
|
|
442
|
-
});
|
|
443
|
-
return response.data;
|
|
444
|
-
}
|
|
445
|
-
async findUnpaidCommissions(params) {
|
|
446
|
-
const response = await this.api.get(`${this.route}unpaid_commissions`, {
|
|
447
|
-
params
|
|
448
|
-
});
|
|
449
|
-
return response.data;
|
|
450
|
-
}
|
|
451
436
|
async create(body) {
|
|
452
437
|
const response = await this.api.post(`${this.route}`, body);
|
|
453
438
|
return response.data;
|
|
@@ -506,15 +491,6 @@ var Repository7 = class {
|
|
|
506
491
|
const result = await this.api.get(`${this.route}siblings/${id}`);
|
|
507
492
|
return result.data;
|
|
508
493
|
}
|
|
509
|
-
async findRmOpenDocuments() {
|
|
510
|
-
const response = await this.api.get(`${this.route}rm_open_documents`);
|
|
511
|
-
return response.data;
|
|
512
|
-
}
|
|
513
|
-
async regularizarMultiplosDocumentos(data) {
|
|
514
|
-
await this.api.post(`${this.route}multiple_documents`, {
|
|
515
|
-
data
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
494
|
};
|
|
519
495
|
|
|
520
496
|
// src/modules/supply/documentHeaderHistory.ts
|
|
@@ -570,6 +546,10 @@ var Repository11 = class {
|
|
|
570
546
|
const result = await this.api.post(`${this.route}pro_forma`, data);
|
|
571
547
|
return result.data;
|
|
572
548
|
}
|
|
549
|
+
async createFromLines(data) {
|
|
550
|
+
const result = await this.api.post(`${this.route}pro_forma_from_lines`, data);
|
|
551
|
+
return result.data;
|
|
552
|
+
}
|
|
573
553
|
};
|
|
574
554
|
|
|
575
555
|
// src/modules/document/propostaFornecedor.ts
|
|
@@ -1335,6 +1315,10 @@ var Repository34 = class {
|
|
|
1335
1315
|
const response = await this.api.delete(`${this.route}${selector.id}`);
|
|
1336
1316
|
return response.data;
|
|
1337
1317
|
}
|
|
1318
|
+
async findByNumber(selector) {
|
|
1319
|
+
const response = await this.api.get(`${this.route}by_number/${selector.number}`);
|
|
1320
|
+
return response.data;
|
|
1321
|
+
}
|
|
1338
1322
|
};
|
|
1339
1323
|
|
|
1340
1324
|
// src/modules/user/providerType.ts
|
|
@@ -1619,6 +1603,10 @@ var Repository42 = class {
|
|
|
1619
1603
|
const response = await this.api.put(`${this.route}${selector.id}`, body);
|
|
1620
1604
|
return response.data;
|
|
1621
1605
|
}
|
|
1606
|
+
async updatePassword(selector, body) {
|
|
1607
|
+
const response = await this.api.put(`${this.route}password/${selector.id}`, body);
|
|
1608
|
+
return response.data;
|
|
1609
|
+
}
|
|
1622
1610
|
async deleteOne(selector) {
|
|
1623
1611
|
const response = await this.api.delete(`${this.route}${selector.id}`);
|
|
1624
1612
|
return response.data;
|
|
@@ -2233,12 +2221,8 @@ var Repository58 = class {
|
|
|
2233
2221
|
this.route = route;
|
|
2234
2222
|
this.publicRoute = publicRoute;
|
|
2235
2223
|
}
|
|
2236
|
-
async
|
|
2237
|
-
const response = await this.api.get(`${this.route}
|
|
2238
|
-
return response.data;
|
|
2239
|
-
}
|
|
2240
|
-
async findPaginated(params) {
|
|
2241
|
-
const response = await this.api.get(`${this.route}paginated`, { params });
|
|
2224
|
+
async findById(selector) {
|
|
2225
|
+
const response = await this.api.get(`${this.route}${selector.id}`);
|
|
2242
2226
|
return response.data;
|
|
2243
2227
|
}
|
|
2244
2228
|
async findByOwnerId(params) {
|
|
@@ -2247,24 +2231,12 @@ var Repository58 = class {
|
|
|
2247
2231
|
});
|
|
2248
2232
|
return response.data;
|
|
2249
2233
|
}
|
|
2250
|
-
async
|
|
2251
|
-
const response = await this.api.get(`${this.route}
|
|
2252
|
-
return response.data;
|
|
2253
|
-
}
|
|
2254
|
-
async deleteBatch(selector) {
|
|
2255
|
-
const response = await this.api.delete(`${this.route}delete_batch${selector.id}`);
|
|
2256
|
-
return response.data;
|
|
2257
|
-
}
|
|
2258
|
-
async findCurrentAccountByOwnerId(params) {
|
|
2259
|
-
const response = await this.api.get(`${this.route}current_account`, {
|
|
2260
|
-
params
|
|
2261
|
-
});
|
|
2234
|
+
async find(params) {
|
|
2235
|
+
const response = await this.api.get(`${this.route}`, { params });
|
|
2262
2236
|
return response.data;
|
|
2263
2237
|
}
|
|
2264
|
-
async
|
|
2265
|
-
const response = await this.api.get(`${this.route}
|
|
2266
|
-
params
|
|
2267
|
-
});
|
|
2238
|
+
async findPaginated(params) {
|
|
2239
|
+
const response = await this.api.get(`${this.route}paginated`, { params });
|
|
2268
2240
|
return response.data;
|
|
2269
2241
|
}
|
|
2270
2242
|
async findSettledMaterialEntrance(params) {
|
|
@@ -2273,61 +2245,14 @@ var Repository58 = class {
|
|
|
2273
2245
|
});
|
|
2274
2246
|
return response.data;
|
|
2275
2247
|
}
|
|
2276
|
-
async findSettledMaterialEntranceProviders() {
|
|
2277
|
-
const response = await this.api.get(`${this.route}settled_material_entrance_providers`);
|
|
2278
|
-
return response.data;
|
|
2279
|
-
}
|
|
2280
|
-
async createProvidersPayments(body) {
|
|
2281
|
-
const response = await this.api.post(`${this.route}provider`, body);
|
|
2282
|
-
return response.data;
|
|
2283
|
-
}
|
|
2284
|
-
async findPaymentsNotExported(params) {
|
|
2285
|
-
const response = await this.api.get(`${this.route}not_exported`, {
|
|
2286
|
-
params
|
|
2287
|
-
});
|
|
2288
|
-
return response.data;
|
|
2289
|
-
}
|
|
2290
|
-
async findPaymentBatches() {
|
|
2291
|
-
const response = await this.api.get(`${this.route}batches`);
|
|
2292
|
-
return response.data;
|
|
2293
|
-
}
|
|
2294
|
-
async updateDownloadedBatchNumber(params) {
|
|
2295
|
-
await this.api.put(`${this.route}downloaded_batch_number/${params}`);
|
|
2296
|
-
}
|
|
2297
|
-
async exportCurrentAccount(params) {
|
|
2298
|
-
const response = await this.api.get(`${this.publicRoute}export_current_account`, {
|
|
2299
|
-
params
|
|
2300
|
-
});
|
|
2301
|
-
return response.data;
|
|
2302
|
-
}
|
|
2303
2248
|
async findSettledMaterialEntranceByDate(params) {
|
|
2304
2249
|
const response = await this.api.get(`${this.route}settled_material_entrance_by_date`, {
|
|
2305
2250
|
params
|
|
2306
2251
|
});
|
|
2307
2252
|
return response.data;
|
|
2308
2253
|
}
|
|
2309
|
-
async
|
|
2310
|
-
await this.api.
|
|
2311
|
-
}
|
|
2312
|
-
getExportCurrentAccountUrl({
|
|
2313
|
-
owner_id,
|
|
2314
|
-
start_date,
|
|
2315
|
-
end_date,
|
|
2316
|
-
output,
|
|
2317
|
-
token
|
|
2318
|
-
}) {
|
|
2319
|
-
const qs = new URLSearchParams();
|
|
2320
|
-
qs.set("owner_id", owner_id);
|
|
2321
|
-
qs.set("output", output);
|
|
2322
|
-
if (start_date) qs.set("start_date", start_date.toISOString());
|
|
2323
|
-
if (end_date) qs.set("end_date", end_date.toISOString());
|
|
2324
|
-
qs.set("token", token);
|
|
2325
|
-
return `${this.publicRoute}export_current_account?${qs.toString()}`;
|
|
2326
|
-
}
|
|
2327
|
-
async findCurrentAccountPaginated(params) {
|
|
2328
|
-
const response = await this.api.get(`${this.route}current_account_paginated`, {
|
|
2329
|
-
params
|
|
2330
|
-
});
|
|
2254
|
+
async findSettledMaterialEntranceProviders() {
|
|
2255
|
+
const response = await this.api.get(`${this.route}settled_material_entrance_providers`);
|
|
2331
2256
|
return response.data;
|
|
2332
2257
|
}
|
|
2333
2258
|
};
|
|
@@ -2359,12 +2284,6 @@ var Repository59 = class {
|
|
|
2359
2284
|
const response = await this.api.get(`${this.route}by_owner`, { params });
|
|
2360
2285
|
return response.data;
|
|
2361
2286
|
}
|
|
2362
|
-
async publicFindByOwnerId(params) {
|
|
2363
|
-
const response = await this.api.get(`${this.route}public_by_owner`, {
|
|
2364
|
-
params
|
|
2365
|
-
});
|
|
2366
|
-
return response.data;
|
|
2367
|
-
}
|
|
2368
2287
|
async find(params) {
|
|
2369
2288
|
const response = await this.api.get(`${this.route}`, { params });
|
|
2370
2289
|
return response.data;
|
|
@@ -2380,14 +2299,6 @@ var Repository59 = class {
|
|
|
2380
2299
|
async sendEmailDocument(body) {
|
|
2381
2300
|
await this.api.post(`${this.route}sendEmail`, body);
|
|
2382
2301
|
}
|
|
2383
|
-
async createPublicDocumentHeaderNote(data) {
|
|
2384
|
-
const response = await this.api.post(`${this.route}public_document_header_note`, data);
|
|
2385
|
-
return response.data;
|
|
2386
|
-
}
|
|
2387
|
-
async updatePublicDocumentHeaderNote({ id }, data) {
|
|
2388
|
-
const response = await this.api.put(`${this.route}public_document_header_note/${id}`, data);
|
|
2389
|
-
return response.data;
|
|
2390
|
-
}
|
|
2391
2302
|
};
|
|
2392
2303
|
|
|
2393
2304
|
// src/modules/supply/vatValidation.ts
|
|
@@ -2821,7 +2732,7 @@ var Repository73 = class {
|
|
|
2821
2732
|
const response = await this.api.post(`${this.route}create_sheet_from_document`, params);
|
|
2822
2733
|
return response.data;
|
|
2823
2734
|
}
|
|
2824
|
-
async
|
|
2735
|
+
async cloneSheetToNewDocument(params) {
|
|
2825
2736
|
const response = await this.api.post(`${this.route}clone_sheet_to_new_document`, params);
|
|
2826
2737
|
return response.data;
|
|
2827
2738
|
}
|
|
@@ -2846,6 +2757,10 @@ var Repository73 = class {
|
|
|
2846
2757
|
async rmUpdateDataBySheetId(params, body) {
|
|
2847
2758
|
await this.api.post(`${this.route}rm_data_by_sheet_id/${params.id}`, body);
|
|
2848
2759
|
}
|
|
2760
|
+
async findRmOpenDocuments() {
|
|
2761
|
+
const response = await this.api.get(`${this.route}rm_open_documents`);
|
|
2762
|
+
return response.data;
|
|
2763
|
+
}
|
|
2849
2764
|
};
|
|
2850
2765
|
|
|
2851
2766
|
// src/modules/stock/schedule.ts
|
|
@@ -3144,6 +3059,10 @@ var Repository82 = class {
|
|
|
3144
3059
|
const response = await this.api.get(`${this.route}find_client_or_provider`, { params });
|
|
3145
3060
|
return response.data;
|
|
3146
3061
|
}
|
|
3062
|
+
async findForGmail(params) {
|
|
3063
|
+
const response = await this.api.get(`${this.route}for_gmail`, { params });
|
|
3064
|
+
return response.data;
|
|
3065
|
+
}
|
|
3147
3066
|
};
|
|
3148
3067
|
|
|
3149
3068
|
// src/modules/integration/projectInfo.ts
|
|
@@ -3264,7 +3183,8 @@ var Repository86 = class {
|
|
|
3264
3183
|
ef_name,
|
|
3265
3184
|
pc_document_number,
|
|
3266
3185
|
prison,
|
|
3267
|
-
note
|
|
3186
|
+
note,
|
|
3187
|
+
availableStock
|
|
3268
3188
|
}, token) {
|
|
3269
3189
|
const qs = new URLSearchParams();
|
|
3270
3190
|
qs.set("ef_name", ef_name);
|
|
@@ -3276,6 +3196,7 @@ var Repository86 = class {
|
|
|
3276
3196
|
qs.set("note", note.toString());
|
|
3277
3197
|
}
|
|
3278
3198
|
qs.set("prison", prison.toString());
|
|
3199
|
+
qs.set("availableStock", availableStock.toString());
|
|
3279
3200
|
qs.set("token", token);
|
|
3280
3201
|
return `${this.publicRoute}print_label_pdf/${product_id}?${qs.toString()}`;
|
|
3281
3202
|
}
|
|
@@ -3437,7 +3358,8 @@ var Repository92 = class {
|
|
|
3437
3358
|
return response.data;
|
|
3438
3359
|
}
|
|
3439
3360
|
async checkLinesInPrison(data) {
|
|
3440
|
-
await this.api.post(`${this.route}check_in_prison`, data);
|
|
3361
|
+
const response = await this.api.post(`${this.route}check_in_prison`, data);
|
|
3362
|
+
return response.data;
|
|
3441
3363
|
}
|
|
3442
3364
|
async createLinesInPrison(data) {
|
|
3443
3365
|
const response = await this.api.post(`${this.route}create_lines`, data);
|
|
@@ -3491,6 +3413,9 @@ var Repository94 = class {
|
|
|
3491
3413
|
async createInventory(data) {
|
|
3492
3414
|
await this.api.post(`${this.route}`, data);
|
|
3493
3415
|
}
|
|
3416
|
+
async createManyInventory(data) {
|
|
3417
|
+
await this.api.post(`${this.route}/create_many`, data);
|
|
3418
|
+
}
|
|
3494
3419
|
};
|
|
3495
3420
|
|
|
3496
3421
|
// src/modules/document/returnToProvider.ts
|
|
@@ -3588,18 +3513,10 @@ var Repository98 = class {
|
|
|
3588
3513
|
this.route = route;
|
|
3589
3514
|
this.publicRoute = publicRoute;
|
|
3590
3515
|
}
|
|
3591
|
-
async
|
|
3516
|
+
async upsertOrDelete(body) {
|
|
3592
3517
|
const response = await this.api.post(`${this.route}`, body);
|
|
3593
3518
|
return response.data;
|
|
3594
3519
|
}
|
|
3595
|
-
async update(selector, body) {
|
|
3596
|
-
const response = await this.api.put(`${this.route}${selector.id}`, body);
|
|
3597
|
-
return response.data;
|
|
3598
|
-
}
|
|
3599
|
-
async deleteOne(selector) {
|
|
3600
|
-
const response = await this.api.delete(`${this.route}${selector.id}`);
|
|
3601
|
-
return response.data;
|
|
3602
|
-
}
|
|
3603
3520
|
};
|
|
3604
3521
|
|
|
3605
3522
|
// src/modules/stock/savedProviderProposal.ts
|
|
@@ -3617,18 +3534,10 @@ var Repository99 = class {
|
|
|
3617
3534
|
const response = await this.api.get(`${this.route}${selector.id}`);
|
|
3618
3535
|
return response.data;
|
|
3619
3536
|
}
|
|
3620
|
-
async
|
|
3537
|
+
async set(body) {
|
|
3621
3538
|
const response = await this.api.post(`${this.route}`, body);
|
|
3622
3539
|
return response.data;
|
|
3623
3540
|
}
|
|
3624
|
-
async update(selector, body) {
|
|
3625
|
-
const response = await this.api.put(`${this.route}${selector.id}`, body);
|
|
3626
|
-
return response.data;
|
|
3627
|
-
}
|
|
3628
|
-
async deleteOne(selector) {
|
|
3629
|
-
const response = await this.api.delete(`${this.route}${selector.id}`);
|
|
3630
|
-
return response.data;
|
|
3631
|
-
}
|
|
3632
3541
|
};
|
|
3633
3542
|
|
|
3634
3543
|
// src/modules/stock/productGoogleSheets.ts
|
|
@@ -3916,7 +3825,7 @@ var Repository107 = class {
|
|
|
3916
3825
|
}
|
|
3917
3826
|
};
|
|
3918
3827
|
|
|
3919
|
-
// src/modules/
|
|
3828
|
+
// src/modules/ui/sideMenu.ts
|
|
3920
3829
|
var sideMenu_exports = {};
|
|
3921
3830
|
__export(sideMenu_exports, {
|
|
3922
3831
|
default: () => Repository108
|
|
@@ -4041,16 +3950,8 @@ var Repository113 = class {
|
|
|
4041
3950
|
const response = await this.api.post(`${this.route}`, data);
|
|
4042
3951
|
return response.data;
|
|
4043
3952
|
}
|
|
4044
|
-
async
|
|
4045
|
-
const response = await this.api.get(`${this.route}
|
|
4046
|
-
return response.data;
|
|
4047
|
-
}
|
|
4048
|
-
async findByDocumentHeaderId(selector) {
|
|
4049
|
-
const response = await this.api.get(`${this.route}by_document_header_id/${selector.id}`);
|
|
4050
|
-
return response.data;
|
|
4051
|
-
}
|
|
4052
|
-
async findByPersonaId(selector) {
|
|
4053
|
-
const response = await this.api.get(`${this.route}by_persona_id/${selector.id}`);
|
|
3953
|
+
async find(data) {
|
|
3954
|
+
const response = await this.api.get(`${this.route}`, { params: data });
|
|
4054
3955
|
return response.data;
|
|
4055
3956
|
}
|
|
4056
3957
|
async deleteOne(selector) {
|
|
@@ -4085,6 +3986,224 @@ var Repository114 = class {
|
|
|
4085
3986
|
}
|
|
4086
3987
|
};
|
|
4087
3988
|
|
|
3989
|
+
// src/modules/stock/gmails.ts
|
|
3990
|
+
var gmails_exports = {};
|
|
3991
|
+
__export(gmails_exports, {
|
|
3992
|
+
default: () => Repository115
|
|
3993
|
+
});
|
|
3994
|
+
var Repository115 = class {
|
|
3995
|
+
constructor({ api, route, publicRoute }) {
|
|
3996
|
+
this.api = api;
|
|
3997
|
+
this.route = route;
|
|
3998
|
+
this.publicRoute = publicRoute;
|
|
3999
|
+
}
|
|
4000
|
+
async auth() {
|
|
4001
|
+
const response = await this.api.get(`${this.route}auth`);
|
|
4002
|
+
return response.data;
|
|
4003
|
+
}
|
|
4004
|
+
async emails() {
|
|
4005
|
+
const response = await this.api.get(`${this.route}emails`);
|
|
4006
|
+
return response.data;
|
|
4007
|
+
}
|
|
4008
|
+
async executeGmailCommand(selector) {
|
|
4009
|
+
const response = await this.api.post(
|
|
4010
|
+
`${this.route}execute_gmail_command/${selector.id}`
|
|
4011
|
+
);
|
|
4012
|
+
return response.data;
|
|
4013
|
+
}
|
|
4014
|
+
async editPreviewChatMessage(selector, data) {
|
|
4015
|
+
const response = await this.api.post(
|
|
4016
|
+
`${this.route}edit_preview_chat_message/${selector.id}`,
|
|
4017
|
+
data
|
|
4018
|
+
);
|
|
4019
|
+
return response.data;
|
|
4020
|
+
}
|
|
4021
|
+
};
|
|
4022
|
+
|
|
4023
|
+
// src/modules/document/NPF.ts
|
|
4024
|
+
var NPF_exports = {};
|
|
4025
|
+
__export(NPF_exports, {
|
|
4026
|
+
default: () => Repository116
|
|
4027
|
+
});
|
|
4028
|
+
var Repository116 = class {
|
|
4029
|
+
constructor({ api, route, publicRoute }) {
|
|
4030
|
+
this.api = api;
|
|
4031
|
+
this.route = route;
|
|
4032
|
+
this.publicRoute = publicRoute;
|
|
4033
|
+
}
|
|
4034
|
+
async create(body) {
|
|
4035
|
+
const response = await this.api.post(`${this.route}providers`, body);
|
|
4036
|
+
return response.data;
|
|
4037
|
+
}
|
|
4038
|
+
};
|
|
4039
|
+
|
|
4040
|
+
// src/modules/document/NRCL.ts
|
|
4041
|
+
var NRCL_exports = {};
|
|
4042
|
+
__export(NRCL_exports, {
|
|
4043
|
+
default: () => Repository117
|
|
4044
|
+
});
|
|
4045
|
+
var Repository117 = class {
|
|
4046
|
+
constructor({ api, route, publicRoute }) {
|
|
4047
|
+
this.api = api;
|
|
4048
|
+
this.route = route;
|
|
4049
|
+
this.publicRoute = publicRoute;
|
|
4050
|
+
}
|
|
4051
|
+
async create(data) {
|
|
4052
|
+
await this.api.post(`${this.route}multiple_documents`, {
|
|
4053
|
+
data
|
|
4054
|
+
});
|
|
4055
|
+
}
|
|
4056
|
+
};
|
|
4057
|
+
|
|
4058
|
+
// src/modules/supply/currentAccount.ts
|
|
4059
|
+
var currentAccount_exports = {};
|
|
4060
|
+
__export(currentAccount_exports, {
|
|
4061
|
+
default: () => Repository118
|
|
4062
|
+
});
|
|
4063
|
+
var Repository118 = class {
|
|
4064
|
+
constructor({ api, route, publicRoute }) {
|
|
4065
|
+
this.api = api;
|
|
4066
|
+
this.route = route;
|
|
4067
|
+
this.publicRoute = publicRoute;
|
|
4068
|
+
}
|
|
4069
|
+
async findCurrentAccountByOwnerId(params) {
|
|
4070
|
+
const response = await this.api.get(`${this.route}current_account`, {
|
|
4071
|
+
params
|
|
4072
|
+
});
|
|
4073
|
+
return response.data;
|
|
4074
|
+
}
|
|
4075
|
+
async findBalanceByOwnerId(params) {
|
|
4076
|
+
const response = await this.api.get(`${this.route}balance`, {
|
|
4077
|
+
params
|
|
4078
|
+
});
|
|
4079
|
+
return response.data;
|
|
4080
|
+
}
|
|
4081
|
+
async exportCurrentAccount(params) {
|
|
4082
|
+
const response = await this.api.get(`${this.publicRoute}export_current_account`, {
|
|
4083
|
+
params
|
|
4084
|
+
});
|
|
4085
|
+
return response.data;
|
|
4086
|
+
}
|
|
4087
|
+
async findClientUnpaidCredit(params) {
|
|
4088
|
+
const response = await this.api.get(`${this.route}unpaid_credit`, {
|
|
4089
|
+
params
|
|
4090
|
+
});
|
|
4091
|
+
return response.data;
|
|
4092
|
+
}
|
|
4093
|
+
async findClientUnpaidDebit(params) {
|
|
4094
|
+
const response = await this.api.get(`${this.route}unpaid_debit`, {
|
|
4095
|
+
params
|
|
4096
|
+
});
|
|
4097
|
+
return response.data;
|
|
4098
|
+
}
|
|
4099
|
+
getExportCurrentAccountUrl({
|
|
4100
|
+
owner_id,
|
|
4101
|
+
start_date,
|
|
4102
|
+
end_date,
|
|
4103
|
+
output,
|
|
4104
|
+
token
|
|
4105
|
+
}) {
|
|
4106
|
+
const qs = new URLSearchParams();
|
|
4107
|
+
qs.set("owner_id", owner_id);
|
|
4108
|
+
qs.set("output", output);
|
|
4109
|
+
if (start_date) qs.set("start_date", start_date.toISOString());
|
|
4110
|
+
if (end_date) qs.set("end_date", end_date.toISOString());
|
|
4111
|
+
qs.set("token", token);
|
|
4112
|
+
return `${this.publicRoute}export_current_account?${qs.toString()}`;
|
|
4113
|
+
}
|
|
4114
|
+
};
|
|
4115
|
+
|
|
4116
|
+
// src/modules/supply/paymentBatch.ts
|
|
4117
|
+
var paymentBatch_exports = {};
|
|
4118
|
+
__export(paymentBatch_exports, {
|
|
4119
|
+
default: () => Repository119
|
|
4120
|
+
});
|
|
4121
|
+
var Repository119 = class {
|
|
4122
|
+
constructor({ api, route, publicRoute }) {
|
|
4123
|
+
this.api = api;
|
|
4124
|
+
this.route = route;
|
|
4125
|
+
this.publicRoute = publicRoute;
|
|
4126
|
+
}
|
|
4127
|
+
async findPending(params) {
|
|
4128
|
+
const response = await this.api.get(`${this.route}not_exported`, {
|
|
4129
|
+
params
|
|
4130
|
+
});
|
|
4131
|
+
return response.data;
|
|
4132
|
+
}
|
|
4133
|
+
async create(body) {
|
|
4134
|
+
await this.api.post(`${this.route}export_payments`, body);
|
|
4135
|
+
}
|
|
4136
|
+
async findCreated() {
|
|
4137
|
+
const response = await this.api.get(`${this.route}batches`);
|
|
4138
|
+
return response.data;
|
|
4139
|
+
}
|
|
4140
|
+
async updateDownloadNumber(params) {
|
|
4141
|
+
await this.api.put(`${this.route}downloaded_batch_number/${params}`);
|
|
4142
|
+
}
|
|
4143
|
+
async deleteOne(selector) {
|
|
4144
|
+
const response = await this.api.delete(`${this.route}delete_batch${selector.id}`);
|
|
4145
|
+
return response.data;
|
|
4146
|
+
}
|
|
4147
|
+
getBatchPdfUrl(opts) {
|
|
4148
|
+
const qs = new URLSearchParams();
|
|
4149
|
+
qs.set("token", opts.token);
|
|
4150
|
+
if (opts.ids?.length) {
|
|
4151
|
+
qs.set("ids", opts.ids.join(","));
|
|
4152
|
+
return `${this.route}create_batch_pdf?${qs.toString()}`;
|
|
4153
|
+
}
|
|
4154
|
+
if (opts.month && opts.year) {
|
|
4155
|
+
qs.set("month", String(opts.month));
|
|
4156
|
+
qs.set("year", String(opts.year));
|
|
4157
|
+
return `${this.route}create_batch_pdf?${qs.toString()}`;
|
|
4158
|
+
}
|
|
4159
|
+
throw new Error("Precisas de passar ids OU month/year");
|
|
4160
|
+
}
|
|
4161
|
+
};
|
|
4162
|
+
|
|
4163
|
+
// src/modules/ui/portal.ts
|
|
4164
|
+
var portal_exports = {};
|
|
4165
|
+
__export(portal_exports, {
|
|
4166
|
+
default: () => Repository120
|
|
4167
|
+
});
|
|
4168
|
+
var Repository120 = class {
|
|
4169
|
+
constructor({ api, route, publicRoute }) {
|
|
4170
|
+
this.api = api;
|
|
4171
|
+
this.route = route;
|
|
4172
|
+
this.publicRoute = publicRoute;
|
|
4173
|
+
}
|
|
4174
|
+
async publicFindByOwnerId(params) {
|
|
4175
|
+
const response = await this.api.get(`${this.route}public_by_owner`, {
|
|
4176
|
+
params
|
|
4177
|
+
});
|
|
4178
|
+
return response.data;
|
|
4179
|
+
}
|
|
4180
|
+
async createPublicDocumentHeaderNote(data) {
|
|
4181
|
+
const response = await this.api.post(`${this.route}public_document_header_note`, data);
|
|
4182
|
+
return response.data;
|
|
4183
|
+
}
|
|
4184
|
+
async updatePublicDocumentHeaderNote({ id }, data) {
|
|
4185
|
+
const response = await this.api.put(`${this.route}public_document_header_note/${id}`, data);
|
|
4186
|
+
return response.data;
|
|
4187
|
+
}
|
|
4188
|
+
};
|
|
4189
|
+
|
|
4190
|
+
// src/modules/supply/googleSheetPool.ts
|
|
4191
|
+
var googleSheetPool_exports = {};
|
|
4192
|
+
__export(googleSheetPool_exports, {
|
|
4193
|
+
default: () => Repository121
|
|
4194
|
+
});
|
|
4195
|
+
var Repository121 = class {
|
|
4196
|
+
constructor({ api, route, publicRoute }) {
|
|
4197
|
+
this.api = api;
|
|
4198
|
+
this.route = route;
|
|
4199
|
+
this.publicRoute = publicRoute;
|
|
4200
|
+
}
|
|
4201
|
+
async clearAndFill() {
|
|
4202
|
+
const response = await this.api.post(`${this.route}clear_and_fill`);
|
|
4203
|
+
return response.data;
|
|
4204
|
+
}
|
|
4205
|
+
};
|
|
4206
|
+
|
|
4088
4207
|
// src/main.ts
|
|
4089
4208
|
var API = class {
|
|
4090
4209
|
constructor({ processEnvironment, services, gatewayUrl, apikey, tokenBearer }) {
|
|
@@ -4277,6 +4396,13 @@ var API = class {
|
|
|
4277
4396
|
this.DocumentLineMt = new Repository112(getModuleParams("stock", "document_line_mt"));
|
|
4278
4397
|
this.ChatSubscriber = new Repository113(getModuleParams("users", "chat_subscriber"));
|
|
4279
4398
|
this.Tag = new Repository114(getModuleParams("stock", "tag"));
|
|
4399
|
+
this.Gmails = new Repository115(getModuleParams("stock", "gmail"));
|
|
4400
|
+
this.NPF = new Repository116(getModuleParams("stock", "npf"));
|
|
4401
|
+
this.NRCL = new Repository117(getModuleParams("stock", "nrcl"));
|
|
4402
|
+
this.PaymentBatch = new Repository119(getModuleParams("stock", "payment_batch"));
|
|
4403
|
+
this.CurrentAccount = new Repository118(getModuleParams("stock", "current_account"));
|
|
4404
|
+
this.Portal = new Repository120(getModuleParams("stock", "portal"));
|
|
4405
|
+
this.GoogleSheetPool = new Repository121(getModuleParams("stock", "google_sheet_pool"));
|
|
4280
4406
|
}
|
|
4281
4407
|
};
|
|
4282
4408
|
|
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": "1.
|
|
4
|
+
"version": "1.3.1",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"prepack": "npm run lint && npm run build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@nomalism-com/types": "^1.
|
|
26
|
+
"@nomalism-com/types": "^1.3.1",
|
|
27
27
|
"axios": "^1.9.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@swc/core": "^1.11.29",
|
|
31
|
-
"@types/node": "^
|
|
31
|
+
"@types/node": "^24.9.1",
|
|
32
32
|
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
33
33
|
"@typescript-eslint/parser": "^8.32.1",
|
|
34
34
|
"eslint": "^9.27.0",
|