@orchesty/connector-authentica 1.0.1 → 2.0.0

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,94 @@
1
+ # Authentica Connector
2
+
3
+ [![npm](https://img.shields.io/npm/v/@orchesty/connector-authentica?color=15ba68)](https://www.npmjs.com/package/@orchesty/connector-authentica)
4
+ [![License](https://img.shields.io/badge/license-Apache--2.0-15ba68)](https://github.com/Orchesty/orchesty-nodejs-connectors/blob/master/LICENSE)
5
+
6
+ An [Orchesty](https://orchesty.io) connector for Authentica Fulfillment, a simple solution for outsourcing logistics that connects your e-commerce or accounting solution for automated order processing.
7
+
8
+ ## Application Type
9
+
10
+ **Basic (client credentials)**
11
+
12
+ This connector authenticates using a Client ID and Client Secret. An access token is fetched automatically via the `POST /token` endpoint using the OAuth 2.0 client credentials flow and cached for its lifetime.
13
+
14
+ | Field | Description |
15
+ |---|---|
16
+ | `client_id` | Your Authentica API client ID |
17
+ | `client_secret` | Your Authentica API client secret |
18
+ | `Shop ID` | Optional shop identifier (used as URL prefix for shop-scoped endpoints) |
19
+
20
+ ## Components
21
+
22
+ | Class | Type | Description |
23
+ |---|---|---|
24
+ | `AuthenticaCreateOrder` | Connector | Creates a new fulfillment order via `POST /shop/{shopId}/order` |
25
+ | `AuthenticaCreateProduct` | Connector | Creates a new product via `POST /shop/{shopId}/product` |
26
+ | `AuthenticaCreateReceipt` | Connector | Creates a new inbound stock receipt via `POST /shop/{shopId}/receipt` |
27
+ | `AuthenticaGetCarriersConnector` | Connector | Retrieves available carriers via `GET /shop/{shopId}/carrier` |
28
+ | `AuthenticaGetOrder` | Connector | Fetches a single order by ID via `GET /shop/{shopId}/order/{id}` |
29
+ | `AuthenticaGetOrderStatus` | Connector | Fetches available order statuses via `GET /applinth/order-statuses` |
30
+ | `AuthenticaGetReceipt` | Connector | Fetches a single receipt by ID via `GET /shop/{shopId}/receipt/{id}` |
31
+ | `AuthenticaGetShippingMethods` | Connector | Fetches available delivery methods via `GET /applinth/delivery-methods` |
32
+ | `AuthenticaPostLabel` | Connector | Posts a shipping label (print code + base64 data) via `POST /applinth/label` |
33
+ | `AuthenticaPutOrders` | Connector | Bulk upserts orders via `PUT /applinth/orders` |
34
+ | `AuthenticaPutProducts` | Connector | Bulk upserts products via `PUT /applinth/products` |
35
+ | `AuthenticaUpdateOrder` | Connector | Updates an existing order via `PUT /shop/{shopId}/order/{id}` |
36
+ | `AuthenticaUpdateProduct` | Connector | Updates an existing product via `PUT /shop/{shopId}/product/{id}` |
37
+ | `AuthenticaUpdateReceipt` | Connector | Updates an existing receipt via `PUT /shop/{shopId}/receipt/{id}` |
38
+ | `AuthenticaGetStock` | Batch | Paginates through stock movement events via `GET /applinth/stock` (50 per page) |
39
+ | `AuthenticaGetStockAvailable` | Batch | Paginates through available stock per SKU via `GET /applinth/stock/available` (100 per page) |
40
+
41
+ ## Setup
42
+
43
+ ### Credentials
44
+
45
+ Contact Authentica support or your account manager to obtain your API **Client ID** and **Client Secret**. API access is available to Authentica customers — documentation and credentials are provided directly by Authentica.
46
+
47
+ ## Installation & Usage
48
+
49
+ Install the package:
50
+
51
+ ```bash
52
+ npm install @orchesty/connector-authentica @orchesty/nodejs-sdk
53
+ # or
54
+ pnpm add @orchesty/connector-authentica @orchesty/nodejs-sdk
55
+ ```
56
+
57
+ Register the application and nodes in your Orchesty DI container:
58
+
59
+ ```typescript
60
+ import { container } from '@orchesty/nodejs-sdk';
61
+ import CacheService from '@orchesty/nodejs-sdk/dist/lib/Cache/CacheService';
62
+ import AuthenticaApplication from '@orchesty/connector-authentica/dist/AuthenticaApplication';
63
+ import AuthenticaCreateOrder from '@orchesty/connector-authentica/dist/Connector/AuthenticaCreateOrder';
64
+ import AuthenticaCreateProduct from '@orchesty/connector-authentica/dist/Connector/AuthenticaCreateProduct';
65
+ import AuthenticaGetOrder from '@orchesty/connector-authentica/dist/Connector/AuthenticaGetOrder';
66
+ import AuthenticaGetStock from '@orchesty/connector-authentica/dist/Batch/AuthenticaGetStock';
67
+ import AuthenticaGetStockAvailable from '@orchesty/connector-authentica/dist/Batch/AuthenticaGetStockAvailable';
68
+ // ... import remaining nodes as needed
69
+
70
+ const app = new AuthenticaApplication(container.get(CacheService));
71
+ container.setApplication(app);
72
+ container.setNode(new AuthenticaCreateOrder(), app);
73
+ container.setNode(new AuthenticaCreateProduct(), app);
74
+ container.setNode(new AuthenticaGetOrder(), app);
75
+ container.setNode(new AuthenticaGetStock(), app);
76
+ container.setNode(new AuthenticaGetStockAvailable(), app);
77
+ ```
78
+
79
+ > **Note:** `AuthenticaApplication` requires a `CacheService` instance. This is provided automatically by the Orchesty SDK DI container.
80
+
81
+ ## License
82
+
83
+ 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.
84
+
85
+ ## Contributing
86
+
87
+ Contributions are welcome! This connector is part of the open-source [Orchesty Node.js Connectors](https://github.com/Orchesty/orchesty-nodejs-connectors) monorepo.
88
+
89
+ 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.
90
+
91
+ All contributions should include:
92
+ - Source code in `src/` following the existing connector structure
93
+ - Tests in `src/**/__tests__/` with `input.json`, `mock.json`, and `output.json` fixtures
94
+ - An updated `CHANGELOG.md` entry
@@ -37,6 +37,7 @@ export interface IOrder {
37
37
  sku: string;
38
38
  quantity: number;
39
39
  unitPrice: number | null;
40
+ lot?: string | null;
40
41
  }[];
41
42
  variableSymbol: string | null;
42
43
  application: string;
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchesty/connector-authentica",
3
3
  "description": "",
4
- "version": "1.0.0",
4
+ "version": "1.0.2",
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,8 +17,7 @@
17
17
  "keywords": [],
18
18
  "author": "info@hanaboso.com",
19
19
  "dependencies": {
20
- "@orchesty/connector-git-hub": "workspace:*",
21
- "@orchesty/nodejs-sdk": "^4.3.6",
20
+ "@orchesty/nodejs-sdk": "^5.0.8",
22
21
  "http-status-codes": "^2.3.0"
23
22
  },
24
23
  "engines": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchesty/connector-authentica",
3
3
  "description": "",
4
- "version": "1.0.1",
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",
@@ -11,9 +11,8 @@
11
11
  "keywords": [],
12
12
  "author": "info@hanaboso.com",
13
13
  "dependencies": {
14
- "@orchesty/nodejs-sdk": "^4.3.6",
15
- "http-status-codes": "^2.3.0",
16
- "@orchesty/connector-git-hub": "1.0.1"
14
+ "@orchesty/nodejs-sdk": "^5.0.8",
15
+ "http-status-codes": "^2.3.0"
17
16
  },
18
17
  "engines": {
19
18
  "node": ">=24"