@nomalism-com/api 0.17.27 → 0.18.3
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 +0 -18
- package/dist/index.js +3 -21
- package/dist/index.min.js +1 -0
- package/package.json +9 -7
- package/dist/modules/integration/dynamicData.d.ts +0 -18
- package/dist/modules/integration/dynamicData.js +0 -113
- package/dist/modules/integration/task.d.ts +0 -19
- package/dist/modules/integration/task.js +0 -121
- package/dist/modules/integration/taskAttachment.d.ts +0 -14
- package/dist/modules/integration/taskAttachment.js +0 -76
- package/dist/modules/integration/taskGroup.d.ts +0 -18
- package/dist/modules/integration/taskGroup.js +0 -113
- package/dist/modules/integration/taskNote.d.ts +0 -17
- package/dist/modules/integration/taskNote.js +0 -100
- package/dist/modules/user/entityList.d.ts +0 -17
- package/dist/modules/user/entityList.js +0 -119
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ import DocumentLineClass from './modules/supply/documentLine';
|
|
|
15
15
|
import DocumentLineAssocClass from './modules/supply/documentLineAssoc';
|
|
16
16
|
import DocumentLineFolderClass from './modules/supply/documentLineFolder';
|
|
17
17
|
import DocumentTypeClass from './modules/supply/documentType';
|
|
18
|
-
import EntityListClass from './modules/user/entityList';
|
|
19
18
|
import FavoritesClass from './modules/user/favorites';
|
|
20
19
|
import FieldClass from './modules/integration/field';
|
|
21
20
|
import FieldGroupClass from './modules/integration/fieldGroup';
|
|
@@ -62,10 +61,6 @@ import SimilarProductClass from './modules/stock/similarProduct';
|
|
|
62
61
|
import SocialMediaClass from './modules/user/socialMedia';
|
|
63
62
|
import StoreOperatorClass from './modules/user/storeOperator';
|
|
64
63
|
import SwiftClass from './modules/user/swift';
|
|
65
|
-
import TaskAttachmentClass from './modules/integration/taskAttachment';
|
|
66
|
-
import TaskNoteClass from './modules/integration/taskNote';
|
|
67
|
-
import TasksClass from './modules/integration/task';
|
|
68
|
-
import TasksGroupClass from './modules/integration/taskGroup';
|
|
69
64
|
import TypeOfInventoryClass from './modules/stock/typeOfInventory';
|
|
70
65
|
import TypeOfLocationClass from './modules/stock/typeOfLocation';
|
|
71
66
|
import UnitOfMeasureClass from './modules/stock/unitOfMeasure';
|
|
@@ -75,7 +70,6 @@ import UsersClass from './modules/user/user';
|
|
|
75
70
|
import VatTaxClass from './modules/stock/vatTax';
|
|
76
71
|
import VatTaxZoneClass from './modules/stock/vatTaxZone';
|
|
77
72
|
import WorkflowClass from './modules/supply/workflow';
|
|
78
|
-
import DynamicDataClass from './modules/integration/dynamicData';
|
|
79
73
|
import DeliveryMethodsClass from './modules/user/deliveryMethods';
|
|
80
74
|
import MaturityDatesClass from './modules/user/maturityDates';
|
|
81
75
|
import PaymentMethodsClass from './modules/user/paymentMethods';
|
|
@@ -145,7 +139,6 @@ export * as DocumentLine from './modules/supply/documentLine';
|
|
|
145
139
|
export * as DocumentLineAssoc from './modules/supply/documentLineAssoc';
|
|
146
140
|
export * as DocumentLineFolder from './modules/supply/documentLineFolder';
|
|
147
141
|
export * as DocumentType from './modules/supply/documentType';
|
|
148
|
-
export * as EntityList from './modules/user/entityList';
|
|
149
142
|
export * as Favorites from './modules/user/favorites';
|
|
150
143
|
export * as Field from './modules/integration/field';
|
|
151
144
|
export * as FieldGroup from './modules/integration/fieldGroup';
|
|
@@ -192,10 +185,6 @@ export * as SimilarProduct from './modules/stock/similarProduct';
|
|
|
192
185
|
export * as SocialMedia from './modules/user/socialMedia';
|
|
193
186
|
export * as StoreOperator from './modules/user/storeOperator';
|
|
194
187
|
export * as Swift from './modules/user/swift';
|
|
195
|
-
export * as TaskAttachment from './modules/integration/taskAttachment';
|
|
196
|
-
export * as TaskNote from './modules/integration/taskNote';
|
|
197
|
-
export * as Tasks from './modules/integration/task';
|
|
198
|
-
export * as TasksGroup from './modules/integration/taskGroup';
|
|
199
188
|
export * as TypeOfInventory from './modules/stock/typeOfInventory';
|
|
200
189
|
export * as TypeOfLocation from './modules/stock/typeOfLocation';
|
|
201
190
|
export * as UnitOfMeasure from './modules/stock/unitOfMeasure';
|
|
@@ -205,7 +194,6 @@ export * as Users from './modules/user/user';
|
|
|
205
194
|
export * as VatTax from './modules/stock/vatTax';
|
|
206
195
|
export * as VatTaxZone from './modules/stock/vatTaxZone';
|
|
207
196
|
export * as Workflow from './modules/supply/workflow';
|
|
208
|
-
export * as DynamicData from './modules/integration/dynamicData';
|
|
209
197
|
export * as DeliveryMethods from './modules/user/deliveryMethods';
|
|
210
198
|
export * as MaturityDates from './modules/user/maturityDates';
|
|
211
199
|
export * as PaymentMethods from './modules/user/paymentMethods';
|
|
@@ -300,7 +288,6 @@ export declare class API {
|
|
|
300
288
|
DocumentLineAssoc: DocumentLineAssocClass;
|
|
301
289
|
DocumentLineFolder: DocumentLineFolderClass;
|
|
302
290
|
DocumentType: DocumentTypeClass;
|
|
303
|
-
EntityList: EntityListClass;
|
|
304
291
|
Favorites: FavoritesClass;
|
|
305
292
|
Field: FieldClass;
|
|
306
293
|
FieldGroup: FieldGroupClass;
|
|
@@ -347,10 +334,6 @@ export declare class API {
|
|
|
347
334
|
SocialMedia: SocialMediaClass;
|
|
348
335
|
StoreOperator: StoreOperatorClass;
|
|
349
336
|
Swift: SwiftClass;
|
|
350
|
-
TaskAttachment: TaskAttachmentClass;
|
|
351
|
-
TaskNote: TaskNoteClass;
|
|
352
|
-
Tasks: TasksClass;
|
|
353
|
-
TasksGroup: TasksGroupClass;
|
|
354
337
|
TypeOfInventory: TypeOfInventoryClass;
|
|
355
338
|
TypeOfLocation: TypeOfLocationClass;
|
|
356
339
|
UnitOfMeasure: UnitOfMeasureClass;
|
|
@@ -360,7 +343,6 @@ export declare class API {
|
|
|
360
343
|
VatTax: VatTaxClass;
|
|
361
344
|
VatTaxZone: VatTaxZoneClass;
|
|
362
345
|
Workflow: WorkflowClass;
|
|
363
|
-
DynamicData: DynamicDataClass;
|
|
364
346
|
DeliveryMethods: DeliveryMethodsClass;
|
|
365
347
|
MaturityDates: MaturityDatesClass;
|
|
366
348
|
PaymentMethods: PaymentMethodsClass;
|
package/dist/index.js
CHANGED
|
@@ -26,9 +26,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.PromotionAssoc = exports.Promotion = exports.ProductName = exports.ProductUseAssoc = exports.ProductUse = exports.ProductSubCategory = exports.ProductPart = exports.ProductImage = exports.ProductColor = exports.ProductCategory = exports.ProductAttribute = exports.Product = exports.PrimaryColor = exports.Permissions = exports.Password = exports.PaymentConditions = exports.ObservationType = exports.Observation = exports.Multimedia = exports.MaintenancePresetAssoc = exports.MaintenancePreset = exports.MaintenanceType = exports.MaintenanceAssoc = exports.Maintenance = exports.Logout = exports.Location = exports.Language = exports.History = exports.GroupPermissions = exports.GoogleSheets = exports.File = exports.FieldGroup = exports.Field = exports.Favorites = exports.
|
|
30
|
-
exports.SchedulePrintJob = exports.Printer = exports.Npc = exports.OrderManagement = exports.CabideProduct = exports.Cabide = exports.PreSaleProduct = exports.PreSale = exports.Tenant = exports.ZipCode = exports.StockMovement = exports.ProductNamePreset = exports.VatValidation = exports.MoloniRequest = exports.ProviderCurrentAccount = exports.ClientCurrentAccount = exports.ExternalDocumentHeader = exports.Payment = exports.DocumentSet = exports.ExternalDocumentType = exports.Vehicles = exports.PaymentMethods = exports.MaturityDates = exports.DeliveryMethods = exports.
|
|
31
|
-
exports.API = exports.shared = exports.SavedProviderProposal = exports.DocumentLineNote = exports.EmailLog = exports.ReturnToProvider = exports.Inventario = exports.Quebra = exports.Prison = exports.EmailTemplateAttachment = exports.EmailTemplate = exports.SavedEmPicking = exports.UpfrontReturn = exports.Transformado = exports.MaterialEntrance = exports.Purchase = exports.Order = exports.ProjectInfo = exports.Persona = exports.ErrorHandler = exports.StartDocumentHeaderLastUpdate = exports.Clt = exports.TicketsLanguage = exports.Channel = exports.Tickets = exports.Settings =
|
|
29
|
+
exports.Providers = exports.PromotionAssoc = exports.Promotion = exports.ProductName = exports.ProductUseAssoc = exports.ProductUse = exports.ProductSubCategory = exports.ProductPart = exports.ProductImage = exports.ProductColor = exports.ProductCategory = exports.ProductAttribute = exports.Product = exports.PrimaryColor = exports.Permissions = exports.Password = exports.PaymentConditions = exports.ObservationType = exports.Observation = exports.Multimedia = exports.MaintenancePresetAssoc = exports.MaintenancePreset = exports.MaintenanceType = exports.MaintenanceAssoc = exports.Maintenance = exports.Logout = exports.Location = exports.Language = exports.History = exports.GroupPermissions = exports.GoogleSheets = exports.File = exports.FieldGroup = exports.Field = exports.Favorites = exports.DocumentType = exports.DocumentLineFolder = exports.DocumentLineAssoc = exports.DocumentLine = exports.DocumentHeader = exports.Country = exports.CompositionMaterial = exports.Composition = exports.Commissioner = exports.Color = exports.ClientType = exports.Client = exports.BankData = exports.AttributeValue = exports.Attribute = void 0;
|
|
30
|
+
exports.GoogleFilePermission = exports.Schedule = exports.PropostaSheets = exports.ReturnReason = exports.QueryParameter = exports.QueryList = exports.SchedulePrintJob = exports.Printer = exports.Npc = exports.OrderManagement = exports.CabideProduct = exports.Cabide = exports.PreSaleProduct = exports.PreSale = exports.Tenant = exports.ZipCode = exports.StockMovement = exports.ProductNamePreset = exports.VatValidation = exports.MoloniRequest = exports.ProviderCurrentAccount = exports.ClientCurrentAccount = exports.ExternalDocumentHeader = exports.Payment = exports.DocumentSet = exports.ExternalDocumentType = exports.Vehicles = exports.PaymentMethods = exports.MaturityDates = exports.DeliveryMethods = exports.Workflow = exports.VatTaxZone = exports.VatTax = exports.Users = exports.UserPositions = exports.UserPermissions = exports.UnitOfMeasure = exports.TypeOfLocation = exports.TypeOfInventory = exports.Swift = exports.StoreOperator = exports.SocialMedia = exports.SimilarProduct = exports.Shippings = exports.Sessions = exports.SegmentsArea = exports.RefreshToken = exports.ReasonForExemption = exports.PurchaseConditions = exports.ProviderType = void 0;
|
|
31
|
+
exports.API = exports.shared = exports.SavedProviderProposal = exports.DocumentLineNote = exports.EmailLog = exports.ReturnToProvider = exports.Inventario = exports.Quebra = exports.Prison = exports.EmailTemplateAttachment = exports.EmailTemplate = exports.SavedEmPicking = exports.UpfrontReturn = exports.Transformado = exports.MaterialEntrance = exports.Purchase = exports.Order = exports.ProjectInfo = exports.Persona = exports.ErrorHandler = exports.StartDocumentHeaderLastUpdate = exports.Clt = exports.TicketsLanguage = exports.Channel = exports.Tickets = exports.Settings = void 0;
|
|
32
32
|
var types_1 = require("@nomalism-com/types");
|
|
33
33
|
Object.defineProperty(exports, "shared", { enumerable: true, get: function () { return types_1.shared; } });
|
|
34
34
|
var axios_1 = __importDefault(require("axios"));
|
|
@@ -47,7 +47,6 @@ var documentLine_1 = __importDefault(require("./modules/supply/documentLine"));
|
|
|
47
47
|
var documentLineAssoc_1 = __importDefault(require("./modules/supply/documentLineAssoc"));
|
|
48
48
|
var documentLineFolder_1 = __importDefault(require("./modules/supply/documentLineFolder"));
|
|
49
49
|
var documentType_1 = __importDefault(require("./modules/supply/documentType"));
|
|
50
|
-
var entityList_1 = __importDefault(require("./modules/user/entityList"));
|
|
51
50
|
var favorites_1 = __importDefault(require("./modules/user/favorites"));
|
|
52
51
|
var field_1 = __importDefault(require("./modules/integration/field"));
|
|
53
52
|
var fieldGroup_1 = __importDefault(require("./modules/integration/fieldGroup"));
|
|
@@ -94,10 +93,6 @@ var similarProduct_1 = __importDefault(require("./modules/stock/similarProduct")
|
|
|
94
93
|
var socialMedia_1 = __importDefault(require("./modules/user/socialMedia"));
|
|
95
94
|
var storeOperator_1 = __importDefault(require("./modules/user/storeOperator"));
|
|
96
95
|
var swift_1 = __importDefault(require("./modules/user/swift"));
|
|
97
|
-
var taskAttachment_1 = __importDefault(require("./modules/integration/taskAttachment"));
|
|
98
|
-
var taskNote_1 = __importDefault(require("./modules/integration/taskNote"));
|
|
99
|
-
var task_1 = __importDefault(require("./modules/integration/task"));
|
|
100
|
-
var taskGroup_1 = __importDefault(require("./modules/integration/taskGroup"));
|
|
101
96
|
var typeOfInventory_1 = __importDefault(require("./modules/stock/typeOfInventory"));
|
|
102
97
|
var typeOfLocation_1 = __importDefault(require("./modules/stock/typeOfLocation"));
|
|
103
98
|
var unitOfMeasure_1 = __importDefault(require("./modules/stock/unitOfMeasure"));
|
|
@@ -107,7 +102,6 @@ var user_1 = __importDefault(require("./modules/user/user"));
|
|
|
107
102
|
var vatTax_1 = __importDefault(require("./modules/stock/vatTax"));
|
|
108
103
|
var vatTaxZone_1 = __importDefault(require("./modules/stock/vatTaxZone"));
|
|
109
104
|
var workflow_1 = __importDefault(require("./modules/supply/workflow"));
|
|
110
|
-
var dynamicData_1 = __importDefault(require("./modules/integration/dynamicData"));
|
|
111
105
|
var deliveryMethods_1 = __importDefault(require("./modules/user/deliveryMethods"));
|
|
112
106
|
var maturityDates_1 = __importDefault(require("./modules/user/maturityDates"));
|
|
113
107
|
var paymentMethods_1 = __importDefault(require("./modules/user/paymentMethods"));
|
|
@@ -177,7 +171,6 @@ exports.DocumentLine = __importStar(require("./modules/supply/documentLine"));
|
|
|
177
171
|
exports.DocumentLineAssoc = __importStar(require("./modules/supply/documentLineAssoc"));
|
|
178
172
|
exports.DocumentLineFolder = __importStar(require("./modules/supply/documentLineFolder"));
|
|
179
173
|
exports.DocumentType = __importStar(require("./modules/supply/documentType"));
|
|
180
|
-
exports.EntityList = __importStar(require("./modules/user/entityList"));
|
|
181
174
|
exports.Favorites = __importStar(require("./modules/user/favorites"));
|
|
182
175
|
exports.Field = __importStar(require("./modules/integration/field"));
|
|
183
176
|
exports.FieldGroup = __importStar(require("./modules/integration/fieldGroup"));
|
|
@@ -224,10 +217,6 @@ exports.SimilarProduct = __importStar(require("./modules/stock/similarProduct"))
|
|
|
224
217
|
exports.SocialMedia = __importStar(require("./modules/user/socialMedia"));
|
|
225
218
|
exports.StoreOperator = __importStar(require("./modules/user/storeOperator"));
|
|
226
219
|
exports.Swift = __importStar(require("./modules/user/swift"));
|
|
227
|
-
exports.TaskAttachment = __importStar(require("./modules/integration/taskAttachment"));
|
|
228
|
-
exports.TaskNote = __importStar(require("./modules/integration/taskNote"));
|
|
229
|
-
exports.Tasks = __importStar(require("./modules/integration/task"));
|
|
230
|
-
exports.TasksGroup = __importStar(require("./modules/integration/taskGroup"));
|
|
231
220
|
exports.TypeOfInventory = __importStar(require("./modules/stock/typeOfInventory"));
|
|
232
221
|
exports.TypeOfLocation = __importStar(require("./modules/stock/typeOfLocation"));
|
|
233
222
|
exports.UnitOfMeasure = __importStar(require("./modules/stock/unitOfMeasure"));
|
|
@@ -237,7 +226,6 @@ exports.Users = __importStar(require("./modules/user/user"));
|
|
|
237
226
|
exports.VatTax = __importStar(require("./modules/stock/vatTax"));
|
|
238
227
|
exports.VatTaxZone = __importStar(require("./modules/stock/vatTaxZone"));
|
|
239
228
|
exports.Workflow = __importStar(require("./modules/supply/workflow"));
|
|
240
|
-
exports.DynamicData = __importStar(require("./modules/integration/dynamicData"));
|
|
241
229
|
exports.DeliveryMethods = __importStar(require("./modules/user/deliveryMethods"));
|
|
242
230
|
exports.MaturityDates = __importStar(require("./modules/user/maturityDates"));
|
|
243
231
|
exports.PaymentMethods = __importStar(require("./modules/user/paymentMethods"));
|
|
@@ -357,7 +345,6 @@ var API = (function () {
|
|
|
357
345
|
this.DocumentLineAssoc = new documentLineAssoc_1.default(getModuleParams('stock', 'document_line_assoc'));
|
|
358
346
|
this.DocumentLineFolder = new documentLineFolder_1.default(getModuleParams('stock', 'document_line_folder'));
|
|
359
347
|
this.DocumentType = new documentType_1.default(getModuleParams('stock', 'document_type'));
|
|
360
|
-
this.EntityList = new entityList_1.default(getModuleParams('users', 'entity'));
|
|
361
348
|
this.Favorites = new favorites_1.default(getModuleParams('users', 'favorite'));
|
|
362
349
|
this.Field = new field_1.default(getModuleParams('integration', 'field'));
|
|
363
350
|
this.FieldGroup = new fieldGroup_1.default(getModuleParams('integration', 'field_group'));
|
|
@@ -404,10 +391,6 @@ var API = (function () {
|
|
|
404
391
|
this.SocialMedia = new socialMedia_1.default(getModuleParams('users', 'social_media'));
|
|
405
392
|
this.StoreOperator = new storeOperator_1.default(getModuleParams('users', 'store_operator'));
|
|
406
393
|
this.Swift = new swift_1.default(getModuleParams('users', 'swift'));
|
|
407
|
-
this.TaskAttachment = new taskAttachment_1.default(getModuleParams('integration', 'task_attachment'));
|
|
408
|
-
this.TaskNote = new taskNote_1.default(getModuleParams('integration', 'task_note'));
|
|
409
|
-
this.Tasks = new task_1.default(getModuleParams('integration', 'task'));
|
|
410
|
-
this.TasksGroup = new taskGroup_1.default(getModuleParams('integration', 'task_group'));
|
|
411
394
|
this.TypeOfInventory = new typeOfInventory_1.default(getModuleParams('stock', 'type_of_inventory'));
|
|
412
395
|
this.TypeOfLocation = new typeOfLocation_1.default(getModuleParams('stock', 'type_of_location'));
|
|
413
396
|
this.UnitOfMeasure = new unitOfMeasure_1.default(getModuleParams('stock', 'unit_of_measure'));
|
|
@@ -417,7 +400,6 @@ var API = (function () {
|
|
|
417
400
|
this.VatTax = new vatTax_1.default(getModuleParams('stock', 'vat_tax'));
|
|
418
401
|
this.VatTaxZone = new vatTaxZone_1.default(getModuleParams('stock', 'vat_tax_zone'));
|
|
419
402
|
this.Workflow = new workflow_1.default(getModuleParams('stock', 'workflow'));
|
|
420
|
-
this.DynamicData = new dynamicData_1.default(getModuleParams('integration', 'dynamic_data'));
|
|
421
403
|
this.DeliveryMethods = new deliveryMethods_1.default(getModuleParams('users', 'delivery_methods'));
|
|
422
404
|
this.MaturityDates = new maturityDates_1.default(getModuleParams('users', 'maturity_dates'));
|
|
423
405
|
this.PaymentMethods = new paymentMethods_1.default(getModuleParams('users', 'payment_methods'));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(r,t,o,s){s===void 0&&(s=o);var u=Object.getOwnPropertyDescriptor(t,o);(!u||("get"in u?!t.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(r,s,u)}:function(r,t,o,s){s===void 0&&(s=o),r[s]=t[o]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}:function(r,t){r.default=t}),__importStar=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var o in r)o!=="default"&&Object.prototype.hasOwnProperty.call(r,o)&&__createBinding(t,r,o);return __setModuleDefault(t,r),t},__importDefault=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Providers=exports.PromotionAssoc=exports.Promotion=exports.ProductName=exports.ProductUseAssoc=exports.ProductUse=exports.ProductSubCategory=exports.ProductPart=exports.ProductImage=exports.ProductColor=exports.ProductCategory=exports.ProductAttribute=exports.Product=exports.PrimaryColor=exports.Permissions=exports.Password=exports.PaymentConditions=exports.ObservationType=exports.Observation=exports.Multimedia=exports.MaintenancePresetAssoc=exports.MaintenancePreset=exports.MaintenanceType=exports.MaintenanceAssoc=exports.Maintenance=exports.Logout=exports.Location=exports.Language=exports.History=exports.GroupPermissions=exports.GoogleSheets=exports.File=exports.FieldGroup=exports.Field=exports.Favorites=exports.DocumentType=exports.DocumentLineFolder=exports.DocumentLineAssoc=exports.DocumentLine=exports.DocumentHeader=exports.Country=exports.CompositionMaterial=exports.Composition=exports.Commissioner=exports.Color=exports.ClientType=exports.Client=exports.BankData=exports.AttributeValue=exports.Attribute=void 0,exports.GoogleFilePermission=exports.Schedule=exports.PropostaSheets=exports.ReturnReason=exports.QueryParameter=exports.QueryList=exports.SchedulePrintJob=exports.Printer=exports.Npc=exports.OrderManagement=exports.CabideProduct=exports.Cabide=exports.PreSaleProduct=exports.PreSale=exports.Tenant=exports.ZipCode=exports.StockMovement=exports.ProductNamePreset=exports.VatValidation=exports.MoloniRequest=exports.ProviderCurrentAccount=exports.ClientCurrentAccount=exports.ExternalDocumentHeader=exports.Payment=exports.DocumentSet=exports.ExternalDocumentType=exports.Vehicles=exports.PaymentMethods=exports.MaturityDates=exports.DeliveryMethods=exports.Workflow=exports.VatTaxZone=exports.VatTax=exports.Users=exports.UserPositions=exports.UserPermissions=exports.UnitOfMeasure=exports.TypeOfLocation=exports.TypeOfInventory=exports.Swift=exports.StoreOperator=exports.SocialMedia=exports.SimilarProduct=exports.Shippings=exports.Sessions=exports.SegmentsArea=exports.RefreshToken=exports.ReasonForExemption=exports.PurchaseConditions=exports.ProviderType=void 0,exports.API=exports.shared=exports.SavedProviderProposal=exports.DocumentLineNote=exports.EmailLog=exports.ReturnToProvider=exports.Inventario=exports.Quebra=exports.Prison=exports.EmailTemplateAttachment=exports.EmailTemplate=exports.SavedEmPicking=exports.UpfrontReturn=exports.Transformado=exports.MaterialEntrance=exports.Purchase=exports.Order=exports.ProjectInfo=exports.Persona=exports.ErrorHandler=exports.StartDocumentHeaderLastUpdate=exports.Clt=exports.TicketsLanguage=exports.Channel=exports.Tickets=exports.Settings=void 0;var types_1=require("@nomalism-com/types");Object.defineProperty(exports,"shared",{enumerable:!0,get:function(){return types_1.shared}});var axios_1=__importDefault(require("axios")),attribute_1=__importDefault(require("./modules/stock/attribute")),attributeValue_1=__importDefault(require("./modules/stock/attributeValue")),bankData_1=__importDefault(require("./modules/user/bankData")),clients_1=__importDefault(require("./modules/user/clients")),clientType_1=__importDefault(require("./modules/user/clientType")),color_1=__importDefault(require("./modules/stock/color")),commissioner_1=__importDefault(require("./modules/user/commissioner")),composition_1=__importDefault(require("./modules/stock/composition")),compositionMaterial_1=__importDefault(require("./modules/stock/compositionMaterial")),country_1=__importDefault(require("./modules/user/country")),documentHeader_1=__importDefault(require("./modules/supply/documentHeader")),documentLine_1=__importDefault(require("./modules/supply/documentLine")),documentLineAssoc_1=__importDefault(require("./modules/supply/documentLineAssoc")),documentLineFolder_1=__importDefault(require("./modules/supply/documentLineFolder")),documentType_1=__importDefault(require("./modules/supply/documentType")),favorites_1=__importDefault(require("./modules/user/favorites")),field_1=__importDefault(require("./modules/integration/field")),fieldGroup_1=__importDefault(require("./modules/integration/fieldGroup")),file_1=__importDefault(require("./modules/integration/file")),googleSheets_1=__importDefault(require("./modules/integration/googleSheets")),groupPermission_1=__importDefault(require("./modules/user/groupPermission")),history_1=__importDefault(require("./modules/integration/history")),language_1=__importDefault(require("./modules/user/language")),location_1=__importDefault(require("./modules/stock/location")),logout_1=__importDefault(require("./modules/user/logout")),maintenance_1=__importDefault(require("./modules/stock/maintenance")),maintenanceAssoc_1=__importDefault(require("./modules/stock/maintenanceAssoc")),maintenanceType_1=__importDefault(require("./modules/stock/maintenanceType")),maintenancePreset_1=__importDefault(require("./modules/stock/maintenancePreset")),maintenancePresetAssoc_1=__importDefault(require("./modules/stock/maintenancePresetAssoc")),multimedia_1=__importDefault(require("./modules/documentManagement/multimedia")),observation_1=__importDefault(require("./modules/integration/observation")),observationType_1=__importDefault(require("./modules/integration/observationType")),paymentCondition_1=__importDefault(require("./modules/user/paymentCondition")),password_1=__importDefault(require("./modules/user/password")),permission_1=__importDefault(require("./modules/user/permission")),primaryColor_1=__importDefault(require("./modules/stock/primaryColor")),product_1=__importDefault(require("./modules/stock/product")),productAttribute_1=__importDefault(require("./modules/stock/productAttribute")),productCategory_1=__importDefault(require("./modules/stock/productCategory")),productColor_1=__importDefault(require("./modules/stock/productColor")),productImage_1=__importDefault(require("./modules/stock/productImage")),productPart_1=__importDefault(require("./modules/stock/productPart")),productSubCategory_1=__importDefault(require("./modules/stock/productSubCategory")),productUse_1=__importDefault(require("./modules/stock/productUse")),productUseAssoc_1=__importDefault(require("./modules/stock/productUseAssoc")),productName_1=__importDefault(require("./modules/stock/productName")),promotion_1=__importDefault(require("./modules/stock/promotion")),promotionAssoc_1=__importDefault(require("./modules/stock/promotionAssoc")),provider_1=__importDefault(require("./modules/user/provider")),providerType_1=__importDefault(require("./modules/user/providerType")),purchaseCondition_1=__importDefault(require("./modules/user/purchaseCondition")),reasonForExemption_1=__importDefault(require("./modules/user/reasonForExemption")),refreshToken_1=__importDefault(require("./modules/user/refreshToken")),segmentsArea_1=__importDefault(require("./modules/user/segmentsArea")),sessions_1=__importDefault(require("./modules/user/sessions")),shippings_1=__importDefault(require("./modules/user/shippings")),similarProduct_1=__importDefault(require("./modules/stock/similarProduct")),socialMedia_1=__importDefault(require("./modules/user/socialMedia")),storeOperator_1=__importDefault(require("./modules/user/storeOperator")),swift_1=__importDefault(require("./modules/user/swift")),typeOfInventory_1=__importDefault(require("./modules/stock/typeOfInventory")),typeOfLocation_1=__importDefault(require("./modules/stock/typeOfLocation")),unitOfMeasure_1=__importDefault(require("./modules/stock/unitOfMeasure")),userPermission_1=__importDefault(require("./modules/user/userPermission")),userPositions_1=__importDefault(require("./modules/user/userPositions")),user_1=__importDefault(require("./modules/user/user")),vatTax_1=__importDefault(require("./modules/stock/vatTax")),vatTaxZone_1=__importDefault(require("./modules/stock/vatTaxZone")),workflow_1=__importDefault(require("./modules/supply/workflow")),deliveryMethods_1=__importDefault(require("./modules/user/deliveryMethods")),maturityDates_1=__importDefault(require("./modules/user/maturityDates")),paymentMethods_1=__importDefault(require("./modules/user/paymentMethods")),vehicles_1=__importDefault(require("./modules/user/vehicles")),externalDocumentType_1=__importDefault(require("./modules/supply/externalDocumentType")),documentSet_1=__importDefault(require("./modules/supply/documentSet")),payment_1=__importDefault(require("./modules/supply/payment")),externalDocumentHeader_1=__importDefault(require("./modules/supply/externalDocumentHeader")),clientCurrentAccount_1=__importDefault(require("./modules/supply/clientCurrentAccount")),providerCurrentAccount_1=__importDefault(require("./modules/supply/providerCurrentAccount")),moloniRequest_1=__importDefault(require("./modules/supply/moloniRequest")),vatValidation_1=__importDefault(require("./modules/supply/vatValidation")),productNamePreset_1=__importDefault(require("./modules/stock/productNamePreset")),stockMovement_1=__importDefault(require("./modules/stock/stockMovement")),zipCode_1=__importDefault(require("./modules/user/zipCode")),tenant_1=__importDefault(require("./modules/user/tenant")),preSale_1=__importDefault(require("./modules/supply/preSale")),preSaleProduct_1=__importDefault(require("./modules/supply/preSaleProduct")),cabide_1=__importDefault(require("./modules/supply/cabide")),cabideProduct_1=__importDefault(require("./modules/supply/cabideProduct")),orderManagement_1=__importDefault(require("./modules/supply/orderManagement")),npc_1=__importDefault(require("./modules/print/npc")),printer_1=__importDefault(require("./modules/print/printer")),schedulePrintJob_1=__importDefault(require("./modules/print/schedulePrintJob")),queryList_1=__importDefault(require("./modules/stock/queryList")),queryParameter_1=__importDefault(require("./modules/stock/queryParameter")),returnReason_1=__importDefault(require("./modules/stock/returnReason")),propostaSheets_1=__importDefault(require("./modules/document/propostaSheets")),schedule_1=__importDefault(require("./modules/stock/schedule")),googleFilePermission_1=__importDefault(require("./modules/integration/googleFilePermission")),settings_1=__importDefault(require("./modules/integration/settings")),tickets_1=__importDefault(require("./modules/tickets/tickets")),channel_1=__importDefault(require("./modules/tickets/channel")),language_2=__importDefault(require("./modules/tickets/language")),clt_1=__importDefault(require("./modules/tickets/clt")),startDocumentHeaderLastUpdate_1=__importDefault(require("./modules/supply/startDocumentHeaderLastUpdate")),errorHandler_1=__importDefault(require("./modules/integration/errorHandler")),persona_1=__importDefault(require("./modules/user/persona")),projectInfo_1=__importDefault(require("./modules/integration/projectInfo")),order_1=__importDefault(require("./modules/document/order")),purchase_1=__importDefault(require("./modules/document/purchase")),materialEntrance_1=__importDefault(require("./modules/document/materialEntrance")),transformado_1=__importDefault(require("./modules/document/transformado")),upfrontReturn_1=__importDefault(require("./modules/document/upfrontReturn")),savedEmPicking_1=__importDefault(require("./modules/stock/savedEmPicking")),emailTemplate_1=__importDefault(require("./modules/integration/emailTemplate")),emailTemplateAttachment_1=__importDefault(require("./modules/integration/emailTemplateAttachment")),prison_1=__importDefault(require("./modules/stock/prison")),quebra_1=__importDefault(require("./modules/document/quebra")),inventario_1=__importDefault(require("./modules/document/inventario")),returnToProvider_1=__importDefault(require("./modules/document/returnToProvider")),emailLog_1=__importDefault(require("./modules/integration/emailLog")),documentLineNote_1=__importDefault(require("./modules/supply/documentLineNote")),savedProviderProposal_1=__importDefault(require("./modules/stock/savedProviderProposal"));exports.Attribute=__importStar(require("./modules/stock/attribute")),exports.AttributeValue=__importStar(require("./modules/stock/attributeValue")),exports.BankData=__importStar(require("./modules/user/bankData")),exports.Client=__importStar(require("./modules/user/clients")),exports.ClientType=__importStar(require("./modules/user/clientType")),exports.Color=__importStar(require("./modules/stock/color")),exports.Commissioner=__importStar(require("./modules/user/commissioner")),exports.Composition=__importStar(require("./modules/stock/composition")),exports.CompositionMaterial=__importStar(require("./modules/stock/compositionMaterial")),exports.Country=__importStar(require("./modules/user/country")),exports.DocumentHeader=__importStar(require("./modules/supply/documentHeader")),exports.DocumentLine=__importStar(require("./modules/supply/documentLine")),exports.DocumentLineAssoc=__importStar(require("./modules/supply/documentLineAssoc")),exports.DocumentLineFolder=__importStar(require("./modules/supply/documentLineFolder")),exports.DocumentType=__importStar(require("./modules/supply/documentType")),exports.Favorites=__importStar(require("./modules/user/favorites")),exports.Field=__importStar(require("./modules/integration/field")),exports.FieldGroup=__importStar(require("./modules/integration/fieldGroup")),exports.File=__importStar(require("./modules/integration/file")),exports.GoogleSheets=__importStar(require("./modules/integration/googleSheets")),exports.GroupPermissions=__importStar(require("./modules/user/groupPermission")),exports.History=__importStar(require("./modules/integration/history")),exports.Language=__importStar(require("./modules/user/language")),exports.Location=__importStar(require("./modules/stock/location")),exports.Logout=__importStar(require("./modules/user/logout")),exports.Maintenance=__importStar(require("./modules/stock/maintenance")),exports.MaintenanceAssoc=__importStar(require("./modules/stock/maintenanceAssoc")),exports.MaintenanceType=__importStar(require("./modules/stock/maintenanceType")),exports.MaintenancePreset=__importStar(require("./modules/stock/maintenancePreset")),exports.MaintenancePresetAssoc=__importStar(require("./modules/stock/maintenancePresetAssoc")),exports.Multimedia=__importStar(require("./modules/documentManagement/multimedia")),exports.Observation=__importStar(require("./modules/integration/observation")),exports.ObservationType=__importStar(require("./modules/integration/observationType")),exports.PaymentConditions=__importStar(require("./modules/user/paymentCondition")),exports.Password=__importStar(require("./modules/user/password")),exports.Permissions=__importStar(require("./modules/user/permission")),exports.PrimaryColor=__importStar(require("./modules/stock/primaryColor")),exports.Product=__importStar(require("./modules/stock/product")),exports.ProductAttribute=__importStar(require("./modules/stock/productAttribute")),exports.ProductCategory=__importStar(require("./modules/stock/productCategory")),exports.ProductColor=__importStar(require("./modules/stock/productColor")),exports.ProductImage=__importStar(require("./modules/stock/productImage")),exports.ProductPart=__importStar(require("./modules/stock/productPart")),exports.ProductSubCategory=__importStar(require("./modules/stock/productSubCategory")),exports.ProductUse=__importStar(require("./modules/stock/productUse")),exports.ProductUseAssoc=__importStar(require("./modules/stock/productUseAssoc")),exports.ProductName=__importStar(require("./modules/stock/productName")),exports.Promotion=__importStar(require("./modules/stock/promotion")),exports.PromotionAssoc=__importStar(require("./modules/stock/promotionAssoc")),exports.Providers=__importStar(require("./modules/user/provider")),exports.ProviderType=__importStar(require("./modules/user/providerType")),exports.PurchaseConditions=__importStar(require("./modules/user/purchaseCondition")),exports.ReasonForExemption=__importStar(require("./modules/user/reasonForExemption")),exports.RefreshToken=__importStar(require("./modules/user/refreshToken")),exports.SegmentsArea=__importStar(require("./modules/user/segmentsArea")),exports.Sessions=__importStar(require("./modules/user/sessions")),exports.Shippings=__importStar(require("./modules/user/shippings")),exports.SimilarProduct=__importStar(require("./modules/stock/similarProduct")),exports.SocialMedia=__importStar(require("./modules/user/socialMedia")),exports.StoreOperator=__importStar(require("./modules/user/storeOperator")),exports.Swift=__importStar(require("./modules/user/swift")),exports.TypeOfInventory=__importStar(require("./modules/stock/typeOfInventory")),exports.TypeOfLocation=__importStar(require("./modules/stock/typeOfLocation")),exports.UnitOfMeasure=__importStar(require("./modules/stock/unitOfMeasure")),exports.UserPermissions=__importStar(require("./modules/user/userPermission")),exports.UserPositions=__importStar(require("./modules/user/userPositions")),exports.Users=__importStar(require("./modules/user/user")),exports.VatTax=__importStar(require("./modules/stock/vatTax")),exports.VatTaxZone=__importStar(require("./modules/stock/vatTaxZone")),exports.Workflow=__importStar(require("./modules/supply/workflow")),exports.DeliveryMethods=__importStar(require("./modules/user/deliveryMethods")),exports.MaturityDates=__importStar(require("./modules/user/maturityDates")),exports.PaymentMethods=__importStar(require("./modules/user/paymentMethods")),exports.Vehicles=__importStar(require("./modules/user/vehicles")),exports.ExternalDocumentType=__importStar(require("./modules/supply/externalDocumentType")),exports.DocumentSet=__importStar(require("./modules/supply/documentSet")),exports.Payment=__importStar(require("./modules/supply/payment")),exports.ExternalDocumentHeader=__importStar(require("./modules/supply/externalDocumentHeader")),exports.ClientCurrentAccount=__importStar(require("./modules/supply/clientCurrentAccount")),exports.ProviderCurrentAccount=__importStar(require("./modules/supply/providerCurrentAccount")),exports.MoloniRequest=__importStar(require("./modules/supply/moloniRequest")),exports.VatValidation=__importStar(require("./modules/supply/vatValidation")),exports.ProductNamePreset=__importStar(require("./modules/stock/productNamePreset")),exports.StockMovement=__importStar(require("./modules/stock/stockMovement")),exports.ZipCode=__importStar(require("./modules/user/zipCode")),exports.Tenant=__importStar(require("./modules/user/tenant")),exports.PreSale=__importStar(require("./modules/supply/preSale")),exports.PreSaleProduct=__importStar(require("./modules/supply/preSaleProduct")),exports.Cabide=__importStar(require("./modules/supply/cabide")),exports.CabideProduct=__importStar(require("./modules/supply/cabideProduct")),exports.OrderManagement=__importStar(require("./modules/supply/orderManagement")),exports.Npc=__importStar(require("./modules/print/npc")),exports.Printer=__importStar(require("./modules/print/printer")),exports.SchedulePrintJob=__importStar(require("./modules/print/schedulePrintJob")),exports.QueryList=__importStar(require("./modules/stock/queryList")),exports.QueryParameter=__importStar(require("./modules/stock/queryParameter")),exports.ReturnReason=__importStar(require("./modules/stock/returnReason")),exports.PropostaSheets=__importStar(require("./modules/document/propostaSheets")),exports.Schedule=__importStar(require("./modules/stock/schedule")),exports.GoogleFilePermission=__importStar(require("./modules/integration/googleFilePermission")),exports.Settings=__importStar(require("./modules/integration/settings")),exports.Tickets=__importStar(require("./modules/tickets/tickets")),exports.Channel=__importStar(require("./modules/tickets/channel")),exports.TicketsLanguage=__importStar(require("./modules/tickets/language")),exports.Clt=__importStar(require("./modules/tickets/clt")),exports.StartDocumentHeaderLastUpdate=__importStar(require("./modules/supply/startDocumentHeaderLastUpdate")),exports.ErrorHandler=__importStar(require("./modules/integration/errorHandler")),exports.Persona=__importStar(require("./modules/user/persona")),exports.ProjectInfo=__importStar(require("./modules/integration/projectInfo")),exports.Order=__importStar(require("./modules/document/order")),exports.Purchase=__importStar(require("./modules/document/purchase")),exports.MaterialEntrance=__importStar(require("./modules/document/materialEntrance")),exports.Transformado=__importStar(require("./modules/document/transformado")),exports.UpfrontReturn=__importStar(require("./modules/document/upfrontReturn")),exports.SavedEmPicking=__importStar(require("./modules/stock/savedEmPicking")),exports.EmailTemplate=__importStar(require("./modules/integration/emailTemplate")),exports.EmailTemplateAttachment=__importStar(require("./modules/integration/emailTemplateAttachment")),exports.Prison=__importStar(require("./modules/stock/prison")),exports.Quebra=__importStar(require("./modules/document/quebra")),exports.Inventario=__importStar(require("./modules/document/inventario")),exports.ReturnToProvider=__importStar(require("./modules/document/returnToProvider")),exports.EmailLog=__importStar(require("./modules/integration/emailLog")),exports.DocumentLineNote=__importStar(require("./modules/supply/documentLineNote")),exports.SavedProviderProposal=__importStar(require("./modules/stock/savedProviderProposal"));var serviceEnum=["stock","users","integration","documents","view","print","tickets","stockworker"],API=function(){function r(t){var o=t.processEnvironment,s=t.services,u=t.gatewayUrl,d=t.apikey,l=this;this.processEnvironment=o||"localhost",this.defaultHeaders=d?{apikey:d}:void 0,this.client=axios_1.default.create({baseURL:u,headers:this.defaultHeaders});var i=function(a){var n=s[a],c=o==="localhost"?"/":"".concat(a,"/").concat(d?"apikey/":"auth/"),p=o==="localhost"?"/":"".concat(a,"/public/");return{authPath:"".concat(n).concat(c),publicPath:"".concat(n).concat(p)}};this.services={stock:i("stock"),users:i("users"),integration:i("integration"),documents:i("documents"),view:i("view"),print:i("print"),tickets:i("tickets"),stockworker:i("stockworker")};var e=function(a,n){return{api:l.client,route:"".concat(l.services[a].authPath).concat(n,"/"),publicRoute:"".concat(l.services[a].publicPath).concat(n,"/")}};this.Attribute=new attribute_1.default(e("stock","attribute")),this.AttributeValue=new attributeValue_1.default(e("stock","attribute_value")),this.BankData=new bankData_1.default(e("users","bank_data")),this.Client=new clients_1.default(e("users","client")),this.ClientType=new clientType_1.default(e("users","client_type")),this.Color=new color_1.default(e("stock","color")),this.Commissioner=new commissioner_1.default(e("users","commissioner")),this.Composition=new composition_1.default(e("stock","composition")),this.CompositionMaterial=new compositionMaterial_1.default(e("stock","composition_material")),this.Country=new country_1.default(e("users","country")),this.DocumentHeader=new documentHeader_1.default(e("stock","document_header")),this.DocumentLine=new documentLine_1.default(e("stock","document_line")),this.DocumentLineAssoc=new documentLineAssoc_1.default(e("stock","document_line_assoc")),this.DocumentLineFolder=new documentLineFolder_1.default(e("stock","document_line_folder")),this.DocumentType=new documentType_1.default(e("stock","document_type")),this.Favorites=new favorites_1.default(e("users","favorite")),this.Field=new field_1.default(e("integration","field")),this.FieldGroup=new fieldGroup_1.default(e("integration","field_group")),this.File=new file_1.default(e("integration","file")),this.GoogleSheets=new googleSheets_1.default(e("integration","google")),this.GroupPermissions=new groupPermission_1.default(e("users","group_permission")),this.History=new history_1.default(e("integration","history")),this.Language=new language_1.default(e("users","language")),this.Location=new location_1.default(e("stock","location")),this.Logout=new logout_1.default(e("users","logout")),this.Maintenance=new maintenance_1.default(e("stock","maintenance")),this.MaintenanceAssoc=new maintenanceAssoc_1.default(e("stock","maintenance_assoc")),this.MaintenanceType=new maintenanceType_1.default(e("stock","maintenance_type")),this.MaintenancePreset=new maintenancePreset_1.default(e("stock","maintenance_preset")),this.MaintenancePresetAssoc=new maintenancePresetAssoc_1.default(e("stock","maintenance_preset_assoc")),this.Multimedia=new multimedia_1.default(e("documents","multimedia")),this.Observation=new observation_1.default(e("integration","observation")),this.ObservationType=new observationType_1.default(e("integration","observation_type")),this.PaymentConditions=new paymentCondition_1.default(e("users","payment_condition")),this.Password=new password_1.default(e("users","password")),this.Permissions=new permission_1.default(e("users","permission")),this.PrimaryColor=new primaryColor_1.default(e("stock","primary_color")),this.Product=new product_1.default(e("stock","product")),this.ProductAttribute=new productAttribute_1.default(e("stock","product_attribute")),this.ProductCategory=new productCategory_1.default(e("stock","product_category")),this.ProductColor=new productColor_1.default(e("stock","product_color")),this.ProductImage=new productImage_1.default(e("stock","product_image")),this.ProductPart=new productPart_1.default(e("stock","product_part")),this.ProductSubCategory=new productSubCategory_1.default(e("stock","product_sub_category")),this.ProductUse=new productUse_1.default(e("stock","product_use")),this.ProductUseAssoc=new productUseAssoc_1.default(e("stock","product_use_assoc")),this.ProductName=new productName_1.default(e("stock","product_name")),this.Promotion=new promotion_1.default(e("stock","promotion")),this.PromotionAssoc=new promotionAssoc_1.default(e("stock","promotion_assoc")),this.Providers=new provider_1.default(e("users","provider")),this.ProviderType=new providerType_1.default(e("users","provider_type")),this.PurchaseConditions=new purchaseCondition_1.default(e("users","purchase_condition")),this.ReasonForExemption=new reasonForExemption_1.default(e("users","reason_for_exemption")),this.RefreshToken=new refreshToken_1.default(e("users","refresh-token")),this.SegmentsArea=new segmentsArea_1.default(e("users","segments_area")),this.Sessions=new sessions_1.default(e("users","sessions")),this.Shippings=new shippings_1.default(e("users","shipping")),this.SimilarProduct=new similarProduct_1.default(e("stock","similar_product")),this.SocialMedia=new socialMedia_1.default(e("users","social_media")),this.StoreOperator=new storeOperator_1.default(e("users","store_operator")),this.Swift=new swift_1.default(e("users","swift")),this.TypeOfInventory=new typeOfInventory_1.default(e("stock","type_of_inventory")),this.TypeOfLocation=new typeOfLocation_1.default(e("stock","type_of_location")),this.UnitOfMeasure=new unitOfMeasure_1.default(e("stock","unit_of_measure")),this.UserPermissions=new userPermission_1.default(e("users","user_permission")),this.UserPositions=new userPositions_1.default(e("users","user_position")),this.Users=new user_1.default(e("users","users")),this.VatTax=new vatTax_1.default(e("stock","vat_tax")),this.VatTaxZone=new vatTaxZone_1.default(e("stock","vat_tax_zone")),this.Workflow=new workflow_1.default(e("stock","workflow")),this.DeliveryMethods=new deliveryMethods_1.default(e("users","delivery_methods")),this.MaturityDates=new maturityDates_1.default(e("users","maturity_dates")),this.PaymentMethods=new paymentMethods_1.default(e("users","payment_methods")),this.Vehicles=new vehicles_1.default(e("users","vehicles")),this.ExternalDocumentType=new externalDocumentType_1.default(e("stock","external_document_type")),this.DocumentSet=new documentSet_1.default(e("stock","document_set")),this.Payment=new payment_1.default(e("stock","payment")),this.ExternalDocumentHeader=new externalDocumentHeader_1.default(e("stock","external_document_header")),this.ClientCurrentAccount=new clientCurrentAccount_1.default(e("stock","client_current_account")),this.ProviderCurrentAccount=new providerCurrentAccount_1.default(e("stock","provider_current_account")),this.MoloniRequest=new moloniRequest_1.default(e("stock","moloni_request")),this.VatValidation=new vatValidation_1.default(e("stock","vat_validation")),this.ProductNamePreset=new productNamePreset_1.default(e("stock","product_name_preset")),this.StockMovement=new stockMovement_1.default(e("stock","stock_movement")),this.ZipCode=new zipCode_1.default(e("users","zip_code")),this.Tenant=new tenant_1.default(e("users","tenant")),this.PreSale=new preSale_1.default(e("stock","pre_sale")),this.PreSaleProduct=new preSaleProduct_1.default(e("stock","pre_sale_product")),this.Cabide=new cabide_1.default(e("stock","cabide")),this.CabideProduct=new cabideProduct_1.default(e("stock","cabide_product")),this.OrderManagement=new orderManagement_1.default(e("stock","order_management")),this.Npc=new npc_1.default(e("print","npc")),this.Printer=new printer_1.default(e("print","printer")),this.SchedulePrintJob=new schedulePrintJob_1.default(e("print","schedule_print_job")),this.QueryList=new queryList_1.default(e("stock","query")),this.QueryParameter=new queryParameter_1.default(e("stock","query_parameter")),this.ReturnReason=new returnReason_1.default(e("stock","return_reason")),this.PropostaSheets=new propostaSheets_1.default(e("stock","proposta_sheets")),this.Schedule=new schedule_1.default(e("stock","schedule")),this.GoogleFilePermission=new googleFilePermission_1.default(e("integration","google_file_permission")),this.Settings=new settings_1.default(e("integration","settings")),this.Tickets=new tickets_1.default(e("tickets","tickets")),this.Channel=new channel_1.default(e("tickets","channel")),this.TicketsLanguage=new language_2.default(e("tickets","tickets_language")),this.Clt=new clt_1.default(e("tickets","clt")),this.StartDocumentHeaderLastUpdate=new startDocumentHeaderLastUpdate_1.default(e("stock","start_document_header_last_update")),this.ErrorHandler=new errorHandler_1.default(e("integration","error_handler")),this.Persona=new persona_1.default(e("users","persona")),this.ProjectInfo=new projectInfo_1.default(e("integration","project_info")),this.Order=new order_1.default(e("stock","order")),this.Purchase=new purchase_1.default(e("stock","purchase")),this.MaterialEntrance=new materialEntrance_1.default(e("stock","material_entrance")),this.Transformado=new transformado_1.default(e("stock","transformado")),this.UpfrontReturn=new upfrontReturn_1.default(e("stock","upfront_return")),this.SavedEmPicking=new savedEmPicking_1.default(e("stock","saved_em_picking")),this.EmailTemplate=new emailTemplate_1.default(e("integration","email_template")),this.EmailTemplateAttachment=new emailTemplateAttachment_1.default(e("integration","email_template_attachment")),this.Prison=new prison_1.default(e("stock","prison")),this.Quebra=new quebra_1.default(e("stock","quebra")),this.Inventario=new inventario_1.default(e("stock","inventario")),this.ReturnToProvider=new returnToProvider_1.default(e("stock","return_to_provider")),this.EmailLog=new emailLog_1.default(e("integration","email_log")),this.DocumentLineNote=new documentLineNote_1.default(e("stock","document_line_note")),this.SavedProviderProposal=new savedProviderProposal_1.default(e("stock","saved_provider_proposal"))}return r}();exports.API=API;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"typescript",
|
|
10
10
|
"helper"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.18.3",
|
|
13
13
|
"main": "dist/index.js",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"files": [
|
|
@@ -26,15 +26,17 @@
|
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"lint": "eslint src --ext .ts,.js --ignore-pattern node_modules --ignore-pattern dist --cache",
|
|
29
|
-
"
|
|
29
|
+
"prebuild": "rm -rf dist",
|
|
30
|
+
"build": "tsc --project tsconfig.json",
|
|
31
|
+
"postbuild": "esbuild ./dist/index.js --minify --outfile=./dist/index.min.js",
|
|
30
32
|
"start": "tsx --tsconfig ./tsconfig.json src/index.ts",
|
|
31
33
|
"prepack": "concurrently --success all \"npm run lint\" \"npm run build\" \"npm run start\""
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
36
|
"@types/convert-units": "^2.3.9",
|
|
35
|
-
"@types/node": "^20.11.
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
37
|
-
"@typescript-eslint/parser": "^6.
|
|
37
|
+
"@types/node": "^20.11.16",
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
39
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
38
40
|
"concurrently": "^8.2.2",
|
|
39
41
|
"eslint": "^8.56.0",
|
|
40
42
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
@@ -42,12 +44,12 @@
|
|
|
42
44
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
43
45
|
"eslint-plugin-import": "^2.29.1",
|
|
44
46
|
"eslint-plugin-prettier": "^5.1.3",
|
|
45
|
-
"prettier": "^3.2.
|
|
47
|
+
"prettier": "^3.2.5",
|
|
46
48
|
"tsx": "^4.7.0",
|
|
47
49
|
"typescript": "^5.3.3"
|
|
48
50
|
},
|
|
49
51
|
"dependencies": {
|
|
50
|
-
"@nomalism-com/types": "^0.
|
|
52
|
+
"@nomalism-com/types": "^0.18.6",
|
|
51
53
|
"axios": "^0.27.2"
|
|
52
54
|
}
|
|
53
55
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DynamicData as Entity, shared } from '@nomalism-com/types';
|
|
2
|
-
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import IEntity = Entity.Entity;
|
|
4
|
-
export import IFindRequest = Entity.IFindRequest;
|
|
5
|
-
export import IFindByTypeRequest = Entity.IFindByTypeRequest;
|
|
6
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
7
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
8
|
-
export default class Repository implements Entity.IRepository {
|
|
9
|
-
route: string;
|
|
10
|
-
publicRoute: string;
|
|
11
|
-
private api;
|
|
12
|
-
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
13
|
-
findByType(params?: IFindByTypeRequest): Promise<IEntity[]>;
|
|
14
|
-
find(params?: IFindRequest): Promise<IEntity[]>;
|
|
15
|
-
create(body: ICreateRequest): Promise<IEntity>;
|
|
16
|
-
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IEntity | null>;
|
|
17
|
-
deleteOne(selector: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
18
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var Repository = (function () {
|
|
40
|
-
function Repository(_a) {
|
|
41
|
-
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
42
|
-
this.api = api;
|
|
43
|
-
this.route = route;
|
|
44
|
-
this.publicRoute = publicRoute;
|
|
45
|
-
}
|
|
46
|
-
Repository.prototype.findByType = function (params) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
var response;
|
|
49
|
-
return __generator(this, function (_a) {
|
|
50
|
-
switch (_a.label) {
|
|
51
|
-
case 0: return [4, this.api.get("".concat(this.route), { params: params })];
|
|
52
|
-
case 1:
|
|
53
|
-
response = _a.sent();
|
|
54
|
-
return [2, response.data];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
Repository.prototype.find = function (params) {
|
|
60
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
-
var response;
|
|
62
|
-
return __generator(this, function (_a) {
|
|
63
|
-
switch (_a.label) {
|
|
64
|
-
case 0: return [4, this.api.get("".concat(this.route), { params: params })];
|
|
65
|
-
case 1:
|
|
66
|
-
response = _a.sent();
|
|
67
|
-
return [2, response.data];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
Repository.prototype.create = function (body) {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
var response;
|
|
75
|
-
return __generator(this, function (_a) {
|
|
76
|
-
switch (_a.label) {
|
|
77
|
-
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
78
|
-
case 1:
|
|
79
|
-
response = _a.sent();
|
|
80
|
-
return [2, response.data];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
Repository.prototype.update = function (selector, body) {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
var response;
|
|
88
|
-
return __generator(this, function (_a) {
|
|
89
|
-
switch (_a.label) {
|
|
90
|
-
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
91
|
-
case 1:
|
|
92
|
-
response = _a.sent();
|
|
93
|
-
return [2, response.data];
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
Repository.prototype.deleteOne = function (selector) {
|
|
99
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
-
var response;
|
|
101
|
-
return __generator(this, function (_a) {
|
|
102
|
-
switch (_a.label) {
|
|
103
|
-
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
104
|
-
case 1:
|
|
105
|
-
response = _a.sent();
|
|
106
|
-
return [2, response.data];
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
};
|
|
111
|
-
return Repository;
|
|
112
|
-
}());
|
|
113
|
-
exports.default = Repository;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { shared, Tasks as Entity } from '@nomalism-com/types';
|
|
2
|
-
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import IFindByQueryRequest = Entity.IFindByQueryRequest;
|
|
4
|
-
export import IFindByQueryResponse = Entity.IFindByQueryResponse;
|
|
5
|
-
export import IBasicSearchRequest = Entity.IBasicSearchRequest;
|
|
6
|
-
export import IBasicSearchResponse = Entity.IBasicSearchResponse;
|
|
7
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
8
|
-
export import IEntity = Entity.Entity;
|
|
9
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
10
|
-
export default class Repository implements Entity.IApi {
|
|
11
|
-
route: string;
|
|
12
|
-
publicRoute: string;
|
|
13
|
-
private api;
|
|
14
|
-
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
15
|
-
findByQuery(params: IFindByQueryRequest): Promise<IFindByQueryResponse[]>;
|
|
16
|
-
basicSearch(params: IBasicSearchRequest): Promise<shared.IPaginationResponse<IBasicSearchResponse>>;
|
|
17
|
-
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IFindByQueryResponse | null>;
|
|
18
|
-
create(body: ICreateRequest, reply_to?: string): Promise<IFindByQueryResponse>;
|
|
19
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
var Repository = (function () {
|
|
51
|
-
function Repository(_a) {
|
|
52
|
-
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
53
|
-
this.api = api;
|
|
54
|
-
this.route = route;
|
|
55
|
-
this.publicRoute = publicRoute;
|
|
56
|
-
}
|
|
57
|
-
Repository.prototype.findByQuery = function (params) {
|
|
58
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
59
|
-
var response;
|
|
60
|
-
return __generator(this, function (_a) {
|
|
61
|
-
switch (_a.label) {
|
|
62
|
-
case 0: return [4, this.api.get("".concat(this.route), { params: params })];
|
|
63
|
-
case 1:
|
|
64
|
-
response = _a.sent();
|
|
65
|
-
return [2, response.data.map(function (task) {
|
|
66
|
-
return __assign(__assign({}, task), { children: task.children.map(function (child) {
|
|
67
|
-
return __assign(__assign({}, child), { parent_id: task.id });
|
|
68
|
-
}) });
|
|
69
|
-
})];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
Repository.prototype.basicSearch = function (params) {
|
|
75
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
76
|
-
var response;
|
|
77
|
-
return __generator(this, function (_a) {
|
|
78
|
-
switch (_a.label) {
|
|
79
|
-
case 0: return [4, this.api.get("".concat(this.route, "basic_search"), {
|
|
80
|
-
params: params,
|
|
81
|
-
})];
|
|
82
|
-
case 1:
|
|
83
|
-
response = _a.sent();
|
|
84
|
-
return [2, response.data];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
Repository.prototype.update = function (selector, body) {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
-
var response;
|
|
92
|
-
return __generator(this, function (_a) {
|
|
93
|
-
switch (_a.label) {
|
|
94
|
-
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
95
|
-
case 1:
|
|
96
|
-
response = _a.sent();
|
|
97
|
-
return [2, response.data];
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
Repository.prototype.create = function (body, reply_to) {
|
|
103
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
104
|
-
var response;
|
|
105
|
-
return __generator(this, function (_a) {
|
|
106
|
-
switch (_a.label) {
|
|
107
|
-
case 0: return [4, this.api.post("".concat(this.route), body, {
|
|
108
|
-
params: {
|
|
109
|
-
reply_to: reply_to,
|
|
110
|
-
},
|
|
111
|
-
})];
|
|
112
|
-
case 1:
|
|
113
|
-
response = _a.sent();
|
|
114
|
-
return [2, response.data];
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
return Repository;
|
|
120
|
-
}());
|
|
121
|
-
exports.default = Repository;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TaskAttachment as Entity } from '@nomalism-com/types';
|
|
2
|
-
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import IFindRequest = Entity.IFindRequest;
|
|
4
|
-
export import IFindResponse = Entity.IFindResponse;
|
|
5
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
6
|
-
export import IEntity = Entity.Entity;
|
|
7
|
-
export default class Repository implements Entity.IApi {
|
|
8
|
-
route: string;
|
|
9
|
-
publicRoute: string;
|
|
10
|
-
private api;
|
|
11
|
-
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
12
|
-
findByTaskId(params: IFindRequest): Promise<IFindResponse[]>;
|
|
13
|
-
create(body: ICreateRequest): Promise<IEntity>;
|
|
14
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var Repository = (function () {
|
|
40
|
-
function Repository(_a) {
|
|
41
|
-
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
42
|
-
this.api = api;
|
|
43
|
-
this.route = route;
|
|
44
|
-
this.publicRoute = publicRoute;
|
|
45
|
-
}
|
|
46
|
-
Repository.prototype.findByTaskId = function (params) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
var response;
|
|
49
|
-
return __generator(this, function (_a) {
|
|
50
|
-
switch (_a.label) {
|
|
51
|
-
case 0: return [4, this.api.get("".concat(this.route), {
|
|
52
|
-
params: params,
|
|
53
|
-
})];
|
|
54
|
-
case 1:
|
|
55
|
-
response = _a.sent();
|
|
56
|
-
return [2, response.data];
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
Repository.prototype.create = function (body) {
|
|
62
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
63
|
-
var response;
|
|
64
|
-
return __generator(this, function (_a) {
|
|
65
|
-
switch (_a.label) {
|
|
66
|
-
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
67
|
-
case 1:
|
|
68
|
-
response = _a.sent();
|
|
69
|
-
return [2, response.data];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
return Repository;
|
|
75
|
-
}());
|
|
76
|
-
exports.default = Repository;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TasksGroup as Entity, shared } from '@nomalism-com/types';
|
|
2
|
-
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import IFindDetailedResponse = Entity.IFindDetailedResponse;
|
|
4
|
-
export import IFindAndCountResponse = Entity.IFindAndCountResponse;
|
|
5
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
6
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
7
|
-
export import IEntity = Entity.Entity;
|
|
8
|
-
export default class Repository implements Entity.IApi {
|
|
9
|
-
route: string;
|
|
10
|
-
publicRoute: string;
|
|
11
|
-
private api;
|
|
12
|
-
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
13
|
-
findDetailed(): Promise<IFindDetailedResponse[]>;
|
|
14
|
-
findAndCount(): Promise<IFindAndCountResponse[]>;
|
|
15
|
-
create(body: ICreateRequest): Promise<IFindDetailedResponse>;
|
|
16
|
-
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IEntity | null>;
|
|
17
|
-
deleteOne(selector: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
18
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var Repository = (function () {
|
|
40
|
-
function Repository(_a) {
|
|
41
|
-
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
42
|
-
this.api = api;
|
|
43
|
-
this.route = route;
|
|
44
|
-
this.publicRoute = publicRoute;
|
|
45
|
-
}
|
|
46
|
-
Repository.prototype.findDetailed = function () {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
var response;
|
|
49
|
-
return __generator(this, function (_a) {
|
|
50
|
-
switch (_a.label) {
|
|
51
|
-
case 0: return [4, this.api.get("".concat(this.route))];
|
|
52
|
-
case 1:
|
|
53
|
-
response = _a.sent();
|
|
54
|
-
return [2, response.data];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
Repository.prototype.findAndCount = function () {
|
|
60
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
-
var response;
|
|
62
|
-
return __generator(this, function (_a) {
|
|
63
|
-
switch (_a.label) {
|
|
64
|
-
case 0: return [4, this.api.get("".concat(this.route, "find_and_count"))];
|
|
65
|
-
case 1:
|
|
66
|
-
response = _a.sent();
|
|
67
|
-
return [2, response.data];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
Repository.prototype.create = function (body) {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
var response;
|
|
75
|
-
return __generator(this, function (_a) {
|
|
76
|
-
switch (_a.label) {
|
|
77
|
-
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
78
|
-
case 1:
|
|
79
|
-
response = _a.sent();
|
|
80
|
-
return [2, response.data];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
Repository.prototype.update = function (selector, body) {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
var response;
|
|
88
|
-
return __generator(this, function (_a) {
|
|
89
|
-
switch (_a.label) {
|
|
90
|
-
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
91
|
-
case 1:
|
|
92
|
-
response = _a.sent();
|
|
93
|
-
return [2, response.data];
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
Repository.prototype.deleteOne = function (selector) {
|
|
99
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
-
var response;
|
|
101
|
-
return __generator(this, function (_a) {
|
|
102
|
-
switch (_a.label) {
|
|
103
|
-
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
104
|
-
case 1:
|
|
105
|
-
response = _a.sent();
|
|
106
|
-
return [2, response.data];
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
};
|
|
111
|
-
return Repository;
|
|
112
|
-
}());
|
|
113
|
-
exports.default = Repository;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TaskNote as Entity, shared } from '@nomalism-com/types';
|
|
2
|
-
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import IFindRequest = Entity.IFindRequest;
|
|
4
|
-
export import IFindResponse = Entity.IFindResponse;
|
|
5
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
6
|
-
export import IEntity = Entity.Entity;
|
|
7
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
8
|
-
export default class Repository implements Entity.IApi {
|
|
9
|
-
route: string;
|
|
10
|
-
publicRoute: string;
|
|
11
|
-
private api;
|
|
12
|
-
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
13
|
-
findByTaskId(params: IFindRequest): Promise<IFindResponse[]>;
|
|
14
|
-
create(body: ICreateRequest): Promise<IEntity>;
|
|
15
|
-
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IEntity | null>;
|
|
16
|
-
deleteOne(selector: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
17
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var Repository = (function () {
|
|
40
|
-
function Repository(_a) {
|
|
41
|
-
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
42
|
-
this.api = api;
|
|
43
|
-
this.route = route;
|
|
44
|
-
this.publicRoute = publicRoute;
|
|
45
|
-
}
|
|
46
|
-
Repository.prototype.findByTaskId = function (params) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
var response;
|
|
49
|
-
return __generator(this, function (_a) {
|
|
50
|
-
switch (_a.label) {
|
|
51
|
-
case 0: return [4, this.api.get("".concat(this.route), { params: params })];
|
|
52
|
-
case 1:
|
|
53
|
-
response = _a.sent();
|
|
54
|
-
return [2, response.data];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
Repository.prototype.create = function (body) {
|
|
60
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
-
var response;
|
|
62
|
-
return __generator(this, function (_a) {
|
|
63
|
-
switch (_a.label) {
|
|
64
|
-
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
65
|
-
case 1:
|
|
66
|
-
response = _a.sent();
|
|
67
|
-
return [2, response.data];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
Repository.prototype.update = function (selector, body) {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
var response;
|
|
75
|
-
return __generator(this, function (_a) {
|
|
76
|
-
switch (_a.label) {
|
|
77
|
-
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
78
|
-
case 1:
|
|
79
|
-
response = _a.sent();
|
|
80
|
-
return [2, response.data];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
Repository.prototype.deleteOne = function (selector) {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
var response;
|
|
88
|
-
return __generator(this, function (_a) {
|
|
89
|
-
switch (_a.label) {
|
|
90
|
-
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
91
|
-
case 1:
|
|
92
|
-
response = _a.sent();
|
|
93
|
-
return [2, response.data];
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
return Repository;
|
|
99
|
-
}());
|
|
100
|
-
exports.default = Repository;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { EntityList as Entity, shared } from '@nomalism-com/types';
|
|
2
|
-
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import EValidEntityName = Entity.EValidEntityName;
|
|
4
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
5
|
-
export import IEntity = Entity.Entity;
|
|
6
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
7
|
-
export default class Repository implements Entity.IApi {
|
|
8
|
-
route: string;
|
|
9
|
-
publicRoute: string;
|
|
10
|
-
private api;
|
|
11
|
-
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
12
|
-
findByUserId(): Promise<IEntity[]>;
|
|
13
|
-
findById({ id }: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
14
|
-
create(body: ICreateRequest): Promise<IEntity>;
|
|
15
|
-
update({ id }: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IEntity | null>;
|
|
16
|
-
deleteOne({ id }: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
17
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.EValidEntityName = void 0;
|
|
40
|
-
var types_1 = require("@nomalism-com/types");
|
|
41
|
-
exports.EValidEntityName = types_1.EntityList.EValidEntityName;
|
|
42
|
-
var Repository = (function () {
|
|
43
|
-
function Repository(_a) {
|
|
44
|
-
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
45
|
-
this.api = api;
|
|
46
|
-
this.route = route;
|
|
47
|
-
this.publicRoute = publicRoute;
|
|
48
|
-
}
|
|
49
|
-
Repository.prototype.findByUserId = function () {
|
|
50
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
51
|
-
var response;
|
|
52
|
-
return __generator(this, function (_a) {
|
|
53
|
-
switch (_a.label) {
|
|
54
|
-
case 0: return [4, this.api.get("".concat(this.route))];
|
|
55
|
-
case 1:
|
|
56
|
-
response = _a.sent();
|
|
57
|
-
return [2, response.data];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
Repository.prototype.findById = function (_a) {
|
|
63
|
-
var id = _a.id;
|
|
64
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
-
var response;
|
|
66
|
-
return __generator(this, function (_b) {
|
|
67
|
-
switch (_b.label) {
|
|
68
|
-
case 0: return [4, this.api.get("".concat(this.route).concat(id))];
|
|
69
|
-
case 1:
|
|
70
|
-
response = _b.sent();
|
|
71
|
-
return [2, response.data];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
Repository.prototype.create = function (body) {
|
|
77
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
78
|
-
var response;
|
|
79
|
-
return __generator(this, function (_a) {
|
|
80
|
-
switch (_a.label) {
|
|
81
|
-
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
82
|
-
case 1:
|
|
83
|
-
response = _a.sent();
|
|
84
|
-
return [2, response.data];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
Repository.prototype.update = function (_a, body) {
|
|
90
|
-
var id = _a.id;
|
|
91
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
92
|
-
var response;
|
|
93
|
-
return __generator(this, function (_b) {
|
|
94
|
-
switch (_b.label) {
|
|
95
|
-
case 0: return [4, this.api.put("".concat(this.route).concat(id), body)];
|
|
96
|
-
case 1:
|
|
97
|
-
response = _b.sent();
|
|
98
|
-
return [2, response.data];
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
Repository.prototype.deleteOne = function (_a) {
|
|
104
|
-
var id = _a.id;
|
|
105
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
-
var response;
|
|
107
|
-
return __generator(this, function (_b) {
|
|
108
|
-
switch (_b.label) {
|
|
109
|
-
case 0: return [4, this.api.delete("".concat(this.route).concat(id))];
|
|
110
|
-
case 1:
|
|
111
|
-
response = _b.sent();
|
|
112
|
-
return [2, response.data];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
return Repository;
|
|
118
|
-
}());
|
|
119
|
-
exports.default = Repository;
|