@orchesty/connector-pinya 1.0.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Pinya HR Connector
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@orchesty/connector-pinya)
|
|
4
|
+
[](https://github.com/Orchesty/orchesty-nodejs-connectors/blob/master/LICENSE)
|
|
5
|
+
|
|
6
|
+
An [Orchesty](https://orchesty.io) connector for Pinya HR, a Czech HR management system for employee administration, attendance tracking, and absence management.
|
|
7
|
+
|
|
8
|
+
## Application Type
|
|
9
|
+
|
|
10
|
+
**Basic (cached token with auto-refresh)**
|
|
11
|
+
|
|
12
|
+
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.
|
|
13
|
+
|
|
14
|
+
| Field | Description |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `tenantGuid` | Your Pinya HR tenant GUID |
|
|
17
|
+
| `secretKey` | Your Pinya HR secret key |
|
|
18
|
+
| `secretKeyIdentifier` | Your Pinya HR secret key identifier |
|
|
19
|
+
|
|
20
|
+
## Components
|
|
21
|
+
|
|
22
|
+
| Class | Type | Description |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `PinyaJobTitlesConnector` | Connector | Fetches up to 150 job titles via `GET /system/job-titles` |
|
|
25
|
+
| `PinyaAbsencesBatch` | Batch | Paginates through all employee absences (50 per page) via `GET /absences` |
|
|
26
|
+
| `PinyaEmployeesBatch` | Batch | Paginates through all employees (50 per page) via `GET /employees` |
|
|
27
|
+
|
|
28
|
+
## Setup
|
|
29
|
+
|
|
30
|
+
### Credentials
|
|
31
|
+
|
|
32
|
+
1. Log in to your [Pinya HR](https://cloud.pinya.hr/) account.
|
|
33
|
+
2. Navigate to the API settings and generate your integration credentials: **Tenant GUID**, **Secret Key**, and **Secret Key Identifier**.
|
|
34
|
+
3. In Orchesty, open the Pinya HR application settings and fill in all three fields.
|
|
35
|
+
|
|
36
|
+
For more information on API access, see the [Pinya HR API module page](https://www.pinya.hr/funkce-a-moduly/api).
|
|
37
|
+
|
|
38
|
+
### API Documentation
|
|
39
|
+
|
|
40
|
+
Pinya HR API: [https://api.pinya.hr/index.html](https://api.pinya.hr/index.html)
|
|
41
|
+
|
|
42
|
+
## Installation & Usage
|
|
43
|
+
|
|
44
|
+
Install the package:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install @orchesty/connector-pinya @orchesty/nodejs-sdk
|
|
48
|
+
# or
|
|
49
|
+
pnpm add @orchesty/connector-pinya @orchesty/nodejs-sdk
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Register the application and nodes in your Orchesty DI container. The `PinyaApplication` requires a `CacheService` instance:
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { container } from '@orchesty/nodejs-sdk';
|
|
56
|
+
import CacheService from '@orchesty/nodejs-sdk/dist/lib/Cache/CacheService';
|
|
57
|
+
import PinyaApplication from '@orchesty/connector-pinya/dist/PinyaApplication';
|
|
58
|
+
import PinyaJobTitlesConnector from '@orchesty/connector-pinya/dist/Connector/PinyaJobTitlesConnector';
|
|
59
|
+
import PinyaAbsencesBatch from '@orchesty/connector-pinya/dist/Batch/PinyaAbsencesBatch';
|
|
60
|
+
import PinyaEmployeesBatch from '@orchesty/connector-pinya/dist/Batch/PinyaEmployeesBatch';
|
|
61
|
+
|
|
62
|
+
const app = new PinyaApplication(container.get(CacheService));
|
|
63
|
+
container.setApplication(app);
|
|
64
|
+
container.setNode(new PinyaJobTitlesConnector(), app);
|
|
65
|
+
container.setNode(new PinyaAbsencesBatch(), app);
|
|
66
|
+
container.setNode(new PinyaEmployeesBatch(), app);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
This connector is released under the **Apache License 2.0**. See the [LICENSE](https://github.com/Orchesty/orchesty-nodejs-connectors/blob/master/LICENSE) file for the full license text.
|
|
72
|
+
|
|
73
|
+
## Contributing
|
|
74
|
+
|
|
75
|
+
Contributions are welcome! This connector is part of the open-source [Orchesty Node.js Connectors](https://github.com/Orchesty/orchesty-nodejs-connectors) monorepo.
|
|
76
|
+
|
|
77
|
+
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](https://orchesty.io/community/contributing-to-connectors)** guide.
|
|
78
|
+
|
|
79
|
+
All contributions should include:
|
|
80
|
+
- Source code in `src/` following the existing connector structure
|
|
81
|
+
- Tests in `src/**/__tests__/` with `input.json`, `mock.json`, and `output.json` fixtures
|
|
82
|
+
- An updated `CHANGELOG.md` entry
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchesty/connector-pinya",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
7
7
|
"repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"keywords": [],
|
|
18
18
|
"author": "info@hanaboso.com",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@orchesty/nodejs-sdk": "^
|
|
20
|
+
"@orchesty/nodejs-sdk": "^5.0.13"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=24"
|
package/package.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchesty/connector-pinya",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
7
|
-
"repository":
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/Orchesty/orchesty-nodejs-connectors"
|
|
10
|
+
},
|
|
8
11
|
"files": [
|
|
9
12
|
"dist"
|
|
10
13
|
],
|
|
11
14
|
"keywords": [],
|
|
12
15
|
"author": "info@hanaboso.com",
|
|
13
16
|
"dependencies": {
|
|
14
|
-
"@orchesty/nodejs-sdk": "^
|
|
17
|
+
"@orchesty/nodejs-sdk": "^5.0.13"
|
|
15
18
|
},
|
|
16
19
|
"engines": {
|
|
17
20
|
"node": ">=24"
|