Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Arhia API client.
Arhia library provides a few classes which embeds their enumerates.
These classes are not usable as it, only theirs enumerates are.
> var Arhia = require('arhia');
> Arhia.Employee.Gender
{ MAN: 1, WOMAN: 2 }
Arhia class has to be instantiated to be used.
The instance will enclose the connexion parameters and provide a set of classes usable which are children of the original ones including all original enumerates.
> var employee = new arhia.Employee()
undefined
> employee instanceof arhia.Employee
true
> employee instanceof Arhia.Employee
true
> arhia.Employee === Arhia.Employee
true
> arhia.Employee.Gender
{ MAN: 1, WOMAN: 2 }
> Arhia.Employee.Gender
{ MAN: 1, WOMAN: 2 }
> Arhia.Employee.Gender === arhia.Employee.Gender
true
All the code samples below deals with instance of arhia.
This client provides a standardized set of property which is different of the official Arhia one.
To help while integration, each class instance provide the fields
function, a helper to retrieve this mapping.
fields([pattern], [invert])
> var em = new arhia.Employee();
undefined
> em.fields()
id => sal_id
fake => sal_simul
firstname => sal_prenom
lastname => sal_nom_famille
...
var Arhia = require('arhia');
var arhia = new Arhia({
uri: 'http://api.url',
dospayId: 0,
versionAPI: 1,
// your credentials: either username/password or token
username: '', password: '',
token: ''
});
arhia
instance provides a few models which consumes Arhia API.
Each Model embeds some static functions which are usable directly from the models and some methods wich are usable from the instances of the models. Both statics and methods handle promises and callback patterns.
Employee bank account
bic
default
- Either or not this bank account is the default to use for the employeedomiciliation
iban
owner
addressCCpl
-addressCountryISOCode
-addressCpl
-address
-banks
- Arhia.BankAccountbirthCountryISOCode
-birthDate
-birthPlace
-city
-externalId
- Employee id in your applicationfake
- Either or not the employee is a simulated onefirstname
-gender
- Arhia.Employee.Gender - Man or Woman (1 / 2)id
- Arhia index set when saved (would not be manually set)lastname
-maidenName
-nationalityISOCode
-nir
-observation
-paymentMode
- Employee.PaymentModepostalCode
-registrationNumber
-MAN
- 1WOMAN
- 1CHEQUE
- 'CHQ'TRANSFER
- 'VIR'CASH
- 'ESP'Static function to retrieve an employee from the Arhia platform.
arhia.Employee
.findById('507e1f77bcf86cd699439011')
.then(function (employee) {
console.log(employee ? employee.name : '!Unknown user');
})
.catch(function (reason) {
console.log(reason);
});
Function to save a new employee on the Arhia platform.
var em = new arhia.Employee();
// ...
em
.create()
.then(function (result) {
console.log(result);
})
.catch(function (reason) {
console.log(reason);
});
Function to update an existing employee on the Arhia platform
FAQs
Arhia object modeling
We found that arhia demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.