@orchesty/connector-pinya
v2.0.0
Published
[](https://www.npmjs.com/package/@orchesty/connector-pinya) [](https://github.com/Orchesty/orchesty-nodejs-connec
Readme
Pinya HR Connector
An Orchesty connector for Pinya HR, a Czech HR management system for employee administration, attendance tracking, and absence management.
Application Type
Basic (cached token with auto-refresh)
This connector authenticates using a Tenant GUID, Secret Key, and Secret Key Identifier. An access token is obtained from the Pinya authentication endpoint and cached automatically using CacheService. The token is refreshed before expiry. The application requires a CacheService instance to be injected via its constructor.
| Field | Description |
|---|---|
| tenantGuid | Your Pinya HR tenant GUID |
| secretKey | Your Pinya HR secret key |
| secretKeyIdentifier | Your Pinya HR secret key identifier |
Components
| Class | Type | Description |
|---|---|---|
| PinyaJobTitlesConnector | Connector | Fetches up to 150 job titles via GET /system/job-titles |
| PinyaAbsencesBatch | Batch | Paginates through all employee absences (50 per page) via GET /absences |
| PinyaEmployeesBatch | Batch | Paginates through all employees (50 per page) via GET /employees |
Setup
Credentials
- Log in to your Pinya HR account.
- Navigate to the API settings and generate your integration credentials: Tenant GUID, Secret Key, and Secret Key Identifier.
- In Orchesty, open the Pinya HR application settings and fill in all three fields.
For more information on API access, see the Pinya HR API module page.
API Documentation
Pinya HR API: https://api.pinya.hr/index.html
Installation & Usage
Install the package:
npm install @orchesty/connector-pinya @orchesty/nodejs-sdk
# or
pnpm add @orchesty/connector-pinya @orchesty/nodejs-sdkRegister the application and nodes in your Orchesty DI container. The PinyaApplication requires a CacheService instance:
import { container } from '@orchesty/nodejs-sdk';
import CacheService from '@orchesty/nodejs-sdk/dist/lib/Cache/CacheService';
import PinyaApplication from '@orchesty/connector-pinya/dist/PinyaApplication';
import PinyaJobTitlesConnector from '@orchesty/connector-pinya/dist/Connector/PinyaJobTitlesConnector';
import PinyaAbsencesBatch from '@orchesty/connector-pinya/dist/Batch/PinyaAbsencesBatch';
import PinyaEmployeesBatch from '@orchesty/connector-pinya/dist/Batch/PinyaEmployeesBatch';
const app = new PinyaApplication(container.get(CacheService));
container.setApplication(app);
container.setNode(new PinyaJobTitlesConnector(), app);
container.setNode(new PinyaAbsencesBatch(), app);
container.setNode(new PinyaEmployeesBatch(), app);License
This connector is released under the Apache License 2.0. See the LICENSE file for the full license text.
Contributing
Contributions are welcome! This connector is part of the open-source Orchesty Node.js Connectors monorepo.
For guidelines on how to create or update connectors — including project setup, coding conventions, and how to write tests — please refer to the Contributing to Connectors guide.
All contributions should include:
- Source code in
src/following the existing connector structure - Tests in
src/**/__tests__/withinput.json,mock.json, andoutput.jsonfixtures - An updated
CHANGELOG.mdentry
