@nomalism-com/api 0.13.14 → 0.13.16
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 +3 -2
- package/dist/index.js +50 -49
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -256,7 +256,7 @@ export * as EmailTemplate from './modules/integration/emailTemplate';
|
|
|
256
256
|
export * as EmailTemplateAttachment from './modules/integration/emailTemplateAttachment';
|
|
257
257
|
export { shared };
|
|
258
258
|
export type IEnvironment = 'production' | 'uat' | 'development' | 'localhost';
|
|
259
|
-
declare const serviceEnum: readonly ["stock", "
|
|
259
|
+
declare const serviceEnum: readonly ["stock", "users", "integration", "documents", "view", "print", "tickets", "stockworker"];
|
|
260
260
|
type IService = (typeof serviceEnum)[number];
|
|
261
261
|
interface IServiceExternalPath {
|
|
262
262
|
authPath: string;
|
|
@@ -265,6 +265,7 @@ interface IServiceExternalPath {
|
|
|
265
265
|
interface IOptions {
|
|
266
266
|
processEnvironment: IEnvironment;
|
|
267
267
|
services: Record<IService, string>;
|
|
268
|
+
gatewayUrl?: string;
|
|
268
269
|
apikey?: string;
|
|
269
270
|
}
|
|
270
271
|
export interface IModuleConstructor {
|
|
@@ -405,5 +406,5 @@ export declare class API {
|
|
|
405
406
|
SavedEmPicking: SavedEmPickingClass;
|
|
406
407
|
EmailTemplate: EmailTemplateClass;
|
|
407
408
|
EmailTemplateAttachment: EmailTemplateAttachmentClass;
|
|
408
|
-
constructor({ processEnvironment, services, apikey }: IOptions);
|
|
409
|
+
constructor({ processEnvironment, services, gatewayUrl, apikey }: IOptions);
|
|
409
410
|
}
|
package/dist/index.js
CHANGED
|
@@ -288,17 +288,17 @@ exports.EmailTemplate = __importStar(require("./modules/integration/emailTemplat
|
|
|
288
288
|
exports.EmailTemplateAttachment = __importStar(require("./modules/integration/emailTemplateAttachment"));
|
|
289
289
|
var serviceEnum = [
|
|
290
290
|
'stock',
|
|
291
|
-
'
|
|
291
|
+
'users',
|
|
292
292
|
'integration',
|
|
293
|
-
'
|
|
293
|
+
'documents',
|
|
294
294
|
'view',
|
|
295
295
|
'print',
|
|
296
|
-
'
|
|
296
|
+
'tickets',
|
|
297
297
|
'stockworker',
|
|
298
298
|
];
|
|
299
299
|
var API = (function () {
|
|
300
300
|
function API(_a) {
|
|
301
|
-
var processEnvironment = _a.processEnvironment, services = _a.services, apikey = _a.apikey;
|
|
301
|
+
var processEnvironment = _a.processEnvironment, services = _a.services, gatewayUrl = _a.gatewayUrl, apikey = _a.apikey;
|
|
302
302
|
var _this = this;
|
|
303
303
|
this.processEnvironment = processEnvironment || 'localhost';
|
|
304
304
|
this.defaultHeaders = apikey
|
|
@@ -307,6 +307,7 @@ var API = (function () {
|
|
|
307
307
|
}
|
|
308
308
|
: undefined;
|
|
309
309
|
this.client = axios_1.default.create({
|
|
310
|
+
baseURL: gatewayUrl,
|
|
310
311
|
headers: this.defaultHeaders,
|
|
311
312
|
});
|
|
312
313
|
var getServicePaths = function (service) {
|
|
@@ -322,12 +323,12 @@ var API = (function () {
|
|
|
322
323
|
};
|
|
323
324
|
this.services = {
|
|
324
325
|
stock: getServicePaths('stock'),
|
|
325
|
-
|
|
326
|
+
users: getServicePaths('users'),
|
|
326
327
|
integration: getServicePaths('integration'),
|
|
327
|
-
|
|
328
|
+
documents: getServicePaths('documents'),
|
|
328
329
|
view: getServicePaths('view'),
|
|
329
330
|
print: getServicePaths('print'),
|
|
330
|
-
|
|
331
|
+
tickets: getServicePaths('tickets'),
|
|
331
332
|
stockworker: getServicePaths('stockworker'),
|
|
332
333
|
};
|
|
333
334
|
var getModuleParams = function (service, module) { return ({
|
|
@@ -335,46 +336,46 @@ var API = (function () {
|
|
|
335
336
|
route: "".concat(_this.services[service].authPath).concat(module, "/"),
|
|
336
337
|
publicRoute: "".concat(_this.services[service].publicPath).concat(module, "/"),
|
|
337
338
|
}); };
|
|
338
|
-
this.Address = new address_1.default(getModuleParams('
|
|
339
|
+
this.Address = new address_1.default(getModuleParams('users', 'address'));
|
|
339
340
|
this.Attribute = new attribute_1.default(getModuleParams('stock', 'attribute'));
|
|
340
341
|
this.AttributeValue = new attributeValue_1.default(getModuleParams('stock', 'attribute_value'));
|
|
341
|
-
this.BankData = new bankData_1.default(getModuleParams('
|
|
342
|
-
this.Client = new clients_1.default(getModuleParams('
|
|
343
|
-
this.ClientType = new clientType_1.default(getModuleParams('
|
|
342
|
+
this.BankData = new bankData_1.default(getModuleParams('users', 'bank_data'));
|
|
343
|
+
this.Client = new clients_1.default(getModuleParams('users', 'client'));
|
|
344
|
+
this.ClientType = new clientType_1.default(getModuleParams('users', 'client_type'));
|
|
344
345
|
this.Color = new color_1.default(getModuleParams('stock', 'color'));
|
|
345
|
-
this.Commissioner = new commissioner_1.default(getModuleParams('
|
|
346
|
+
this.Commissioner = new commissioner_1.default(getModuleParams('users', 'commissioner'));
|
|
346
347
|
this.Composition = new composition_1.default(getModuleParams('stock', 'composition'));
|
|
347
348
|
this.CompositionMaterial = new compositionMaterial_1.default(getModuleParams('stock', 'composition_material'));
|
|
348
|
-
this.Contacts = new contacts_1.default(getModuleParams('
|
|
349
|
-
this.ContactType = new contactTypes_1.default(getModuleParams('
|
|
350
|
-
this.Country = new country_1.default(getModuleParams('
|
|
349
|
+
this.Contacts = new contacts_1.default(getModuleParams('users', 'contact'));
|
|
350
|
+
this.ContactType = new contactTypes_1.default(getModuleParams('users', 'contact_type'));
|
|
351
|
+
this.Country = new country_1.default(getModuleParams('users', 'country'));
|
|
351
352
|
this.DocumentHeader = new documentHeader_1.default(getModuleParams('stock', 'document_header'));
|
|
352
353
|
this.DocumentLine = new documentLine_1.default(getModuleParams('stock', 'document_line'));
|
|
353
354
|
this.DocumentLineAssoc = new documentLineAssoc_1.default(getModuleParams('stock', 'document_line_assoc'));
|
|
354
355
|
this.DocumentLineFolder = new documentLineFolder_1.default(getModuleParams('stock', 'document_line_folder'));
|
|
355
356
|
this.DocumentType = new documentType_1.default(getModuleParams('stock', 'document_type'));
|
|
356
|
-
this.EntityList = new entityList_1.default(getModuleParams('
|
|
357
|
-
this.Favorites = new favorites_1.default(getModuleParams('
|
|
357
|
+
this.EntityList = new entityList_1.default(getModuleParams('users', 'entity'));
|
|
358
|
+
this.Favorites = new favorites_1.default(getModuleParams('users', 'favorite'));
|
|
358
359
|
this.Field = new field_1.default(getModuleParams('integration', 'field'));
|
|
359
360
|
this.FieldGroup = new fieldGroup_1.default(getModuleParams('integration', 'field_group'));
|
|
360
361
|
this.File = new file_1.default(getModuleParams('integration', 'file'));
|
|
361
362
|
this.GoogleSheets = new googleSheets_1.default(getModuleParams('integration', 'google'));
|
|
362
|
-
this.GroupPermissions = new groupPermission_1.default(getModuleParams('
|
|
363
|
+
this.GroupPermissions = new groupPermission_1.default(getModuleParams('users', 'group_permission'));
|
|
363
364
|
this.History = new history_1.default(getModuleParams('integration', 'history'));
|
|
364
|
-
this.Language = new language_1.default(getModuleParams('
|
|
365
|
+
this.Language = new language_1.default(getModuleParams('users', 'language'));
|
|
365
366
|
this.Location = new location_1.default(getModuleParams('stock', 'location'));
|
|
366
|
-
this.Logout = new logout_1.default(getModuleParams('
|
|
367
|
+
this.Logout = new logout_1.default(getModuleParams('users', 'logout'));
|
|
367
368
|
this.Maintenance = new maintenance_1.default(getModuleParams('stock', 'maintenance'));
|
|
368
369
|
this.MaintenanceAssoc = new maintenanceAssoc_1.default(getModuleParams('stock', 'maintenance_assoc'));
|
|
369
370
|
this.MaintenanceType = new maintenanceType_1.default(getModuleParams('stock', 'maintenance_type'));
|
|
370
371
|
this.MaintenancePreset = new maintenancePreset_1.default(getModuleParams('stock', 'maintenance_preset'));
|
|
371
372
|
this.MaintenancePresetAssoc = new maintenancePresetAssoc_1.default(getModuleParams('stock', 'maintenance_preset_assoc'));
|
|
372
|
-
this.Multimedia = new multimedia_1.default(getModuleParams('
|
|
373
|
+
this.Multimedia = new multimedia_1.default(getModuleParams('documents', 'multimedia'));
|
|
373
374
|
this.Observation = new observation_1.default(getModuleParams('integration', 'observation'));
|
|
374
375
|
this.ObservationType = new observationType_1.default(getModuleParams('integration', 'observation_type'));
|
|
375
|
-
this.PaymentConditions = new paymentCondition_1.default(getModuleParams('
|
|
376
|
-
this.Password = new password_1.default(getModuleParams('
|
|
377
|
-
this.Permissions = new permission_1.default(getModuleParams('
|
|
376
|
+
this.PaymentConditions = new paymentCondition_1.default(getModuleParams('users', 'payment_condition'));
|
|
377
|
+
this.Password = new password_1.default(getModuleParams('users', 'password'));
|
|
378
|
+
this.Permissions = new permission_1.default(getModuleParams('users', 'permission'));
|
|
378
379
|
this.Plot = new plot_1.default(getModuleParams('stock', 'plot'));
|
|
379
380
|
this.PrimaryColor = new primaryColor_1.default(getModuleParams('stock', 'primary_color'));
|
|
380
381
|
this.Product = new product_1.default(getModuleParams('stock', 'product'));
|
|
@@ -389,18 +390,18 @@ var API = (function () {
|
|
|
389
390
|
this.ProductName = new productName_1.default(getModuleParams('stock', 'product_name'));
|
|
390
391
|
this.Promotion = new promotion_1.default(getModuleParams('stock', 'promotion'));
|
|
391
392
|
this.PromotionAssoc = new promotionAssoc_1.default(getModuleParams('stock', 'promotion_assoc'));
|
|
392
|
-
this.Providers = new provider_1.default(getModuleParams('
|
|
393
|
-
this.ProviderType = new providerType_1.default(getModuleParams('
|
|
394
|
-
this.PurchaseConditions = new purchaseCondition_1.default(getModuleParams('
|
|
395
|
-
this.ReasonForExemption = new reasonForExemption_1.default(getModuleParams('
|
|
396
|
-
this.RefreshToken = new refreshToken_1.default(getModuleParams('
|
|
397
|
-
this.SegmentsArea = new segmentsArea_1.default(getModuleParams('
|
|
398
|
-
this.Sessions = new sessions_1.default(getModuleParams('
|
|
399
|
-
this.Shippings = new shippings_1.default(getModuleParams('
|
|
393
|
+
this.Providers = new provider_1.default(getModuleParams('users', 'provider'));
|
|
394
|
+
this.ProviderType = new providerType_1.default(getModuleParams('users', 'provider_type'));
|
|
395
|
+
this.PurchaseConditions = new purchaseCondition_1.default(getModuleParams('users', 'purchase_condition'));
|
|
396
|
+
this.ReasonForExemption = new reasonForExemption_1.default(getModuleParams('users', 'reason_for_exemption'));
|
|
397
|
+
this.RefreshToken = new refreshToken_1.default(getModuleParams('users', 'refresh-token'));
|
|
398
|
+
this.SegmentsArea = new segmentsArea_1.default(getModuleParams('users', 'segments_area'));
|
|
399
|
+
this.Sessions = new sessions_1.default(getModuleParams('users', 'sessions'));
|
|
400
|
+
this.Shippings = new shippings_1.default(getModuleParams('users', 'shipping'));
|
|
400
401
|
this.SimilarProduct = new similarProduct_1.default(getModuleParams('stock', 'similar_product'));
|
|
401
|
-
this.SocialMedia = new socialMedia_1.default(getModuleParams('
|
|
402
|
-
this.StoreOperator = new storeOperator_1.default(getModuleParams('
|
|
403
|
-
this.Swift = new swift_1.default(getModuleParams('
|
|
402
|
+
this.SocialMedia = new socialMedia_1.default(getModuleParams('users', 'social_media'));
|
|
403
|
+
this.StoreOperator = new storeOperator_1.default(getModuleParams('users', 'store_operator'));
|
|
404
|
+
this.Swift = new swift_1.default(getModuleParams('users', 'swift'));
|
|
404
405
|
this.TaskAttachment = new taskAttachment_1.default(getModuleParams('integration', 'task_attachment'));
|
|
405
406
|
this.TaskNote = new taskNote_1.default(getModuleParams('integration', 'task_note'));
|
|
406
407
|
this.Tasks = new task_1.default(getModuleParams('integration', 'task'));
|
|
@@ -408,17 +409,17 @@ var API = (function () {
|
|
|
408
409
|
this.TypeOfInventory = new typeOfInventory_1.default(getModuleParams('stock', 'type_of_inventory'));
|
|
409
410
|
this.TypeOfLocation = new typeOfLocation_1.default(getModuleParams('stock', 'type_of_location'));
|
|
410
411
|
this.UnitOfMeasure = new unitOfMeasure_1.default(getModuleParams('stock', 'unit_of_measure'));
|
|
411
|
-
this.UserPermissions = new userPermission_1.default(getModuleParams('
|
|
412
|
-
this.UserPositions = new userPositions_1.default(getModuleParams('
|
|
413
|
-
this.Users = new user_1.default(getModuleParams('
|
|
412
|
+
this.UserPermissions = new userPermission_1.default(getModuleParams('users', 'user_permission'));
|
|
413
|
+
this.UserPositions = new userPositions_1.default(getModuleParams('users', 'user_position'));
|
|
414
|
+
this.Users = new user_1.default(getModuleParams('users', 'users'));
|
|
414
415
|
this.VatTax = new vatTax_1.default(getModuleParams('stock', 'vat_tax'));
|
|
415
416
|
this.VatTaxZone = new vatTaxZone_1.default(getModuleParams('stock', 'vat_tax_zone'));
|
|
416
417
|
this.Workflow = new workflow_1.default(getModuleParams('stock', 'workflow'));
|
|
417
418
|
this.DynamicData = new dynamicData_1.default(getModuleParams('integration', 'dynamic_data'));
|
|
418
|
-
this.DeliveryMethods = new deliveryMethods_1.default(getModuleParams('
|
|
419
|
-
this.MaturityDates = new maturityDates_1.default(getModuleParams('
|
|
420
|
-
this.PaymentMethods = new paymentMethods_1.default(getModuleParams('
|
|
421
|
-
this.Vehicles = new vehicles_1.default(getModuleParams('
|
|
419
|
+
this.DeliveryMethods = new deliveryMethods_1.default(getModuleParams('users', 'delivery_methods'));
|
|
420
|
+
this.MaturityDates = new maturityDates_1.default(getModuleParams('users', 'maturity_dates'));
|
|
421
|
+
this.PaymentMethods = new paymentMethods_1.default(getModuleParams('users', 'payment_methods'));
|
|
422
|
+
this.Vehicles = new vehicles_1.default(getModuleParams('users', 'vehicles'));
|
|
422
423
|
this.ExternalDocumentType = new externalDocumentType_1.default(getModuleParams('stock', 'external_document_type'));
|
|
423
424
|
this.DocumentSet = new documentSet_1.default(getModuleParams('stock', 'document_set'));
|
|
424
425
|
this.Payment = new payment_1.default(getModuleParams('stock', 'payment'));
|
|
@@ -429,8 +430,8 @@ var API = (function () {
|
|
|
429
430
|
this.VatValidation = new vatValidation_1.default(getModuleParams('stock', 'vat_validation'));
|
|
430
431
|
this.ProductNamePreset = new productNamePreset_1.default(getModuleParams('stock', 'product_name_preset'));
|
|
431
432
|
this.StockMovement = new stockMovement_1.default(getModuleParams('stock', 'stock_movement'));
|
|
432
|
-
this.ZipCode = new zipCode_1.default(getModuleParams('
|
|
433
|
-
this.Tenant = new tenant_1.default(getModuleParams('
|
|
433
|
+
this.ZipCode = new zipCode_1.default(getModuleParams('users', 'zip_code'));
|
|
434
|
+
this.Tenant = new tenant_1.default(getModuleParams('users', 'tenant'));
|
|
434
435
|
this.PreSale = new preSale_1.default(getModuleParams('stock', 'pre_sale'));
|
|
435
436
|
this.PreSaleProduct = new preSaleProduct_1.default(getModuleParams('stock', 'pre_sale_product'));
|
|
436
437
|
this.Cabide = new cabide_1.default(getModuleParams('stock', 'cabide'));
|
|
@@ -446,13 +447,13 @@ var API = (function () {
|
|
|
446
447
|
this.Schedule = new schedule_1.default(getModuleParams('stock', 'schedule'));
|
|
447
448
|
this.GoogleFilePermission = new googleFilePermission_1.default(getModuleParams('integration', 'google_file_permission'));
|
|
448
449
|
this.Settings = new settings_1.default(getModuleParams('integration', 'settings'));
|
|
449
|
-
this.Tickets = new tickets_1.default(getModuleParams('
|
|
450
|
-
this.Channel = new channel_1.default(getModuleParams('
|
|
451
|
-
this.TicketsLanguage = new language_2.default(getModuleParams('
|
|
452
|
-
this.Clt = new clt_1.default(getModuleParams('
|
|
450
|
+
this.Tickets = new tickets_1.default(getModuleParams('tickets', 'tickets'));
|
|
451
|
+
this.Channel = new channel_1.default(getModuleParams('tickets', 'channel'));
|
|
452
|
+
this.TicketsLanguage = new language_2.default(getModuleParams('tickets', 'tickets_language'));
|
|
453
|
+
this.Clt = new clt_1.default(getModuleParams('tickets', 'clt'));
|
|
453
454
|
this.StartDocumentHeaderLastUpdate = new startDocumentHeaderLastUpdate_1.default(getModuleParams('stock', 'start_document_header_last_update'));
|
|
454
455
|
this.ErrorHandler = new errorHandler_1.default(getModuleParams('integration', 'error_handler'));
|
|
455
|
-
this.Persona = new persona_1.default(getModuleParams('
|
|
456
|
+
this.Persona = new persona_1.default(getModuleParams('users', 'persona'));
|
|
456
457
|
this.ProjectInfo = new projectInfo_1.default(getModuleParams('integration', 'project_info'));
|
|
457
458
|
this.Order = new order_1.default(getModuleParams('stock', 'order'));
|
|
458
459
|
this.Purchase = new purchase_1.default(getModuleParams('stock', 'purchase'));
|