Skip to main content

A package to interact with ms graph /users functionality

Project description

This package is used to add data to cosmos db, which is required during onboarding of a client or adding a new vendor to the 8am system.

VendBuilder:

This class is used to build items during onboarding which are required for a vendor in the 8am Web App system. The items provide a starting data framework from which a vendor can begin to use the 8am Web Application. There items that are required for a vendor during onbarding are as follows:

[company, vendorList, vendorProfileState, vendorPaymentState, vendorDocumentsState, vendorRequirementsState, vendorStepperState, vendorAdditionalRequirement, vendorSafetyStats]. The items are built using templates from the database. The templates are used to build the items in a consistent manner. The items are built using the following functions:

The items are built using templates from the database. The templates are used to build the items in a consistent manner. The items are built using the following functions:

VendBuilder.format():

This function is used to add the "type" value to a cosmos db item from an item of type "template" from the database. You can inspect the templates using query "SELECT * FROM c WHERE c.type = 'template'". The function will add the "type" value to the item and return it. In addition this function will remove the "itemType" value from the item.

If the item passed as an argument to this function is not of type "company", "vendorId" and "vendorName" values will be added to the item. These values are used to identify the vendor company that the item belongs to.

VendBuilder.generate_sign_up_code():

This function is used to generate a sign up code for a company. The sign up code is the combination of a random US county with a 4 digit integer, this function will return the sign up code as a sstring. This sign up code can be distributed from a company that exists in our system to a user that wants to sign up to the company. The user will use the sign up code to sign up to the company.

VendBuilder.build_company():

This function is used to build a company item for the database. This function will retrieve the company template from the database and use it to build the company item. The company item will be returned as a dictionary. The company item will have the "type" value set to "company" and the "vendorId" and "vendorName" values set to the company's vendorId and vendorName. The company item will also have the "signUpCode" value set to the sign up code generated by the function "VendBuilder.generate_sign_up_code()". The company item will also have the "companyName" value set to the company's name.

VendBuilder.build_profile_state():

This function is used to build a profile state item for the database. This function will retrieve the profile state template from the database and use it to build the profile state item. The profile state item will be returned as a dictionary. The profile state item will have the "type" value set to "vendorProfileState" and the "vendorId" and "vendorName" values set to the company's vendorId and vendorName. This item is used to manage the state of the profile step (step 1) within the qualifications process of the 8am Web App.

VendBuilder.build_payment_state():

This function is used to build a payment state item for the database. This function will retrieve the payment state template from the database and use it to build the payment state item. The payment state item will be returned as a dictionary. The payment state item will have the "type" value set to "vendorPaymentState" and the "vendorId" and "vendorName" values set to the company's vendorId and vendorName. This item is used to manage the state of the payment step (step 2) within the qualifications process of the 8am Web App.

VendBuilder.build_documents_state():

This function is used to build a documents state item for the database. This function will retrieve the documents state template from the database and use it to build the documents state item. The documents state item will be returned as a dictionary. The documents state item will have the "type" value set to "vendorDocumentsState" and the "vendorId" and "vendorName" values set to the company's vendorId and vendorName. This item is used to manage the state of the documents step (step 3) within the qualifications process of the 8am Web App.

VendBuilder.build_requirements_state():

This function is used to build a requirements state item for the database. This function will retrieve the requirements state template from the database and use it to build the requirements state item. The requirements state item will be returned as a dictionary. The requirements state item will have the "type" value set to "vendorRequirementsState" and the "vendorId" and "vendorName" values set to the company's vendorId and vendorName. This item is used to manage the state of the requirements step (step 4) within the qualifications process of the 8am Web App.

VendBuilder.build_stepper_state():

This function is used to build a stepper state item for the database. This function will retrieve the stepper state template from the database and use it to build the stepper state item. The stepper state item will be returned as a dictionary. The stepper state item will have the "type" value set to "vendorStepperState" and the "vendorId" and "vendorName" values set to the company's vendorId and vendorName. This item is used to manage the state of the stepper within the qualifications process of the 8am Web App. By stepper we mean the state of the steps within the qualifications process (along the top of the design) that govern which steps can be navigated to, which steps are completed, etc.

VenddBuilder.build_additional_requirements():

This function is used to build an additional requirements item for the database. This function will retrieve the additionalRequirement items from the data base and use it to build the vendorAdditionalRequirement items for a given vendor. The defaultDocumentIdList item is set manually to a list containing the document id of the "ABSA Certificate" document. As of this time of writing this document, the ABSA Certificate is the only additional requirement that is required for all vendors during onboarding. The vendorAdditionalRequirement item will be returned as a dictionary. The vendorAdditionalRequirement item will have the "type" value set to "vendorAdditionalRequirement" and the "vendorId" and "vendorName" values set to the company's vendorId and vendorName.

VendBuilder.build_safety_stats():

This function is used to build a safety stats item for the database. This function will retrieve the safety stats template from the database and use it to build the safety stats item. The safety stats item will be returned as a dictionary. The safety stats item will have the "type" value set to "vendorSafetyStats" and the "vendorId" and "vendorName" values set to the company's vendorId and vendorName. This item is used to manage the safety statistics of the vendor company.

EmpBuilder:

This class is used to build items during onboarding which are required for an employer in the 8am Web App system. The items provide a starting data framework from which an employer can begin to use the 8am Web Application. There items that are required for an employee during onbarding are as follows:

[company, tags, employerDocConfig]. The items are built using templates from the database. The templates are used to build the items in a consistent manner. The items are built using the following functions:

EmpBuilder.format():

This function is used to add the "type" value to a cosmos db item from an item of type "template" from the database. You can inspect the templates using query "SELECT * FROM c WHERE c.type = 'template'". The function will add the "type" value to the item and return it. In addition this function will remove the "itemType" value from the item.

EmpBuilder.generate_sign_up_code():

This function is used to generate a sign up code for a company. The sign up code is the combination of a random US county with a 4 digit integer, this function will return the sign up code as a sstring. This sign up code can be distributed from a company that exists in our system to a user that wants to sign up to the company. The user will use the sign up code to sign up to the company.

EmpBuilder.build_company():

This function is used to build a company item for the database. This function will retrieve the company template from the database and use it to build the company item. The company item will be returned as a dictionary. The company item will have the "type" value set to "company". The company item will also have the "signUpCode" value set to the sign up code generated by the function "EmpBuilder.generate_sign_up_code()". The company item will also have the "companyName" value set to the company's name.

EmpBuilder.build_tags():

This function is used to build a tags item for the database. This function will retrieve the tags template from the database and use it to build the tags item. The tags item will be returned as a dictionary. The tags item will have the "type" value set to "tags". This item is used to manage the tags of the company. The tags are used to categorize the company in the 8am Web App system.

EmpBuilder.build_employer_doc_config():

This function is used to build an employer document configuration item for the database. This function will retrieve the employer document configuration template from the database and use it to build the employer document configuration item. The employer document configuration item will be returned as a dictionary. The employer document configuration item will have the "type" value set to "employerDocConfig". This item is used to manage the document configuration of the employer in the 8am Web App system. More specifically, this item is used to manage the documents that are required for the employer during onboarding, which are set from the profile step of qualifications.

CommonBuilder:

This class is used to build items during onboarding which are required for both vendors and employers in the 8am Web App system. The items provide a starting data framework from which a vendor or employer can begin to use the 8am Web Application. The items that are required for both vendors and employers during onbarding are as follows:

[vendorList]. The items are built using templates from the database. The templates are used to build the items in a consistent manner. The items are built using the following functions:

CommonBuilder.build_vendor_list():

This function is used to build a vendorList item for the database. This function will retrieve the vendor list template from the database and use it to build the vendor list item. The vendor list item will be returned as a dictionary. The vendor list item will have the "type" value set to "vendorList". This item is used to manage the list of vendors in the 8am Web App system. This list will be used to store the vendor ids of the vendors in the 8am Web App system, as well as the employer ids and employer names for which a vendor works for. The vendorList items exists as a connection between company items, specifically accountType employer -> accountType vendor.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eam_onb_helper-0.0.9.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eam_onb_helper-0.0.9-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file eam_onb_helper-0.0.9.tar.gz.

File metadata

  • Download URL: eam_onb_helper-0.0.9.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.0

File hashes

Hashes for eam_onb_helper-0.0.9.tar.gz
Algorithm Hash digest
SHA256 49dc382f4d5893333c22978d8cca34e9a398a7fa67bd731a137ecb2625fc4a1d
MD5 939edaad1d4452306856927bc7ff431c
BLAKE2b-256 9c1d3fd67c7045928bd26e041fe8726fa19f85779d5a8be46aec01115628e39d

See more details on using hashes here.

File details

Details for the file eam_onb_helper-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: eam_onb_helper-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.0

File hashes

Hashes for eam_onb_helper-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e55b3ccb75cf9d6593a9ab2bddc6b045e0a49aafac02d47f26ef67a153af18b7
MD5 d51e7dfcb9e40dad70643fe4e03f6c64
BLAKE2b-256 5d2e2666e2043c7fbd5a0ba3e9b1d31772c490da50e7f7838e3c8651d98ac0e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page