2.1.31-local.0 • Published 1 year ago

cc-erp-services v2.1.31-local.0

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

ERP SERVICES LIB

Contents

  • Installation
  • Modules

Installation

cc-erp-services is hosted in a verdaccio registry (private npm registry) at https://verdaccio.teljoy.io/ to install the library in your project, you should first add the registry and library scope to your project npm config: 1. in the root of your project, create a file called .npmrc 2. in that file add this rule

@maids:registry = https://verdaccio.teljoy.io/

This will inform npm to install all subpackages of @maids/ from the provided registry (our verdaccio server)

Then, to install @maids/cc-erp-services type in your console:

npm install --save @maids/cc-erp-services

This should save the library in your dependencies

Modules

cc-erp-services provides multiple modules related to interacting with maids.cc erp backend, following is a list of these modules and their respective documentation:

  • CCERPIntegrationModule - this module is purposed to integrate a new Angular12+ application into the existing legacy ERP system. view docs

  • CCAuthModule - concerned with managing the authentication state and features with the erp backend. view docs

  • CCLoadingIconModule - concerned with showing a loading icon (spinner or some other), and provides an interceptor to show the loading icon whenever a request is pending. view docs

  • Data type models - this library also exports the basic data types implemented in erp backend:

modeldescriptionmembertypeparam description
BaseEntitysuper-class for all entities in the backend @see 'Magnamedia Developer Guid' pdf bookletidnumberid of the db record
creationDatestringthe entity id column in database
creatorUser['id']Serialized User object to define the object creator
uuidstringunique id assigned to this entity
entityTypestringstring that define the entity name
lastModificationDatestringserialized Java Date object to store the last modification date of the object
lastModifierUser['id']serialized User object to define the last object modifier
creatorModulestringModule object to store the object creator module
EntityWithAttachments (extends BaseEntity)represents a generic entity with a list of attachments.attachmentsCountnumbercound of attachments
attachmentsArray<EntityAttachment>list of attachments of this entity
EntityAttachment (extends EntityWithAttachments)an entity attached to another entity, this usually represents a file resourceversionnumber
namestringname of the attached file
sizenumbersize of the attached file in bytes
extensionstringextension of file name (.png.jpeg...etc)
pathstringwhere the file is stored on the server
tagstring \| string[]the tag associated with the file, in case of singular file upload, can be any string, in case of multiple file uploads, should be timestamp + some checksum
ownerType
ownerId
uniqueTagbooleanwhether this tag is unique to this file (e.g. passport or tag1_12345675437ghjhaksd)
amazonboolean
temporarybooleanwhether this is a temporary file or not
fileTypestringtype of file (e.g. "Image")
PicklistItem (extends EntityWithAttachments)represents an item from a picklistcodestringthe unique code of this item
rootstring
rootIdstring
rootCodestring
liststring
listIdnumber
tagsstring[]
User (extends EntityWithAttachments)represents a user object (without credentials)activatedboolean
adminboolean
aswatCCLoginstring
branch{id: number; label: string}
department{id: number; label: string}
departmentIdBaseEntity['id']
emailstring
erpThemestring
externalboolean
firstNamestring
lastNamestring
logingNamestring
phonestring
positionIdnumber
positionsArray<{id: number; code: string; label: string}>
relatedEntityIdnumber
relatedEntityTypestring
seenNotificationsboolean
shiftstring
superUserboolean
type{id: number; label: string}
typeIdnumber
ziwoAgentIdnumber
freedomUserboolean
guestboolean