
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@icapps/wcf-astrum
Advanced tools
API for WFM using WCF protocol
Install via npm
npm install @icapps/wcf-astrum
or via yarn
yarn add @icapps/wcf-astrum
const wcf = require('@icapps/wcf-astrum');
import * as wcf from '@icapps/wcf-astrum';
This module is Astrum specific and is used to communicate with their API (with WCF). The module is split into seperate modules and modules (objects) are going to be added incrementally. Below each api method with abstract explanation of what they do.
Configuration needs to be set globally before trying to call any API functions. It is required to define contracts and schemas. Every api method will throw an error if the correct namespace or contract key was not found.
Sets the global configuration.
setConfig({
contracts: {
v1: 'v1 contract',
},
schemas: {
defaultSchema: 'default schema',
},
});
Returns the globally set configuration.
All available api methods are nested under an object. For example if you wish to get a session you need to call it under the auth
object.
Example:
import { auth } from '@icapps/wcf-astrum';
auth.getSession(...);
returns a session with WCF, this session is used to retrieve resources
kills the given session
Get the id using a name
returns all employees
returns the schedule for given employee and date range
Returns the departmentSchedule for given employeeIds
Returns the availabilities for given employee
Write an availability
Write an absence for a full day
Write an absence for an interval
Check if the vacation request has a rule violation
Check if there is a rule violation on write schedule
Write a shift offer
Get time registrations for an employee id
Save a time registrations for an employee
Return all balance valuse for a given employee id and date range
Returns an spx object with more info
Returns all the employee ids for given departmentId and date range
npm run test
to run all testsnpm run test:coverage
to run all tests with coverage reportnpm run test:external
to run all test + the external contract testsThese tests will test the actual responses coming back from the WCF application. It will perform real API calls and expect that the response object properties match.
You need to provide all proper environment variables defined in
.env.test.example
. This has been done for security purposes.
FAQs
API for WFM using WCF protocol
The npm package @icapps/wcf-astrum receives a total of 10 weekly downloads. As such, @icapps/wcf-astrum popularity was classified as not popular.
We found that @icapps/wcf-astrum demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.