@orchesty/connector-raynet-crm 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,101 @@
|
|
|
1
|
+
# Raynet CRM Connector
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@orchesty/connector-raynet-crm)
|
|
4
|
+
[](https://github.com/Orchesty/orchesty-nodejs-connectors/blob/master/LICENSE)
|
|
5
|
+
|
|
6
|
+
An [Orchesty](https://orchesty.io) connector for RAYNET CRM, an online CRM software that helps salespeople and managers keep track of business easily.
|
|
7
|
+
|
|
8
|
+
## Application Type
|
|
9
|
+
|
|
10
|
+
**Basic**
|
|
11
|
+
|
|
12
|
+
This connector authenticates using a username and API key encoded as HTTP Basic auth. Every request also includes the `X-Instance-Name` header to identify the specific RAYNET CRM instance.
|
|
13
|
+
|
|
14
|
+
| Field | Description |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `user` | Your RAYNET CRM username |
|
|
17
|
+
| `password` | Your RAYNET CRM API key |
|
|
18
|
+
| `instanceName` | Your RAYNET CRM instance name (e.g. `my-company`) |
|
|
19
|
+
|
|
20
|
+
## Components
|
|
21
|
+
|
|
22
|
+
| Class | Type | Description |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `RaynetCRMGetVoipByTel` | Connector | Searches persons/companies/leads by phone number via `GET /voip/searchByTel` |
|
|
25
|
+
| `RaynetCRMUniversalActivityDetail` | Connector | Fetches details of a CRM activity by entity type and ID via `GET /{entityType}/{id}` |
|
|
26
|
+
| `RaynetCRMUniversalCreateActivity` | Connector | Creates a new CRM activity of any entity type via `PUT /{entityType}` |
|
|
27
|
+
| `RaynetCRMUniversalUpdateActivity` | Connector | Updates an existing CRM activity by ID via `POST /{entityType}/{id}` |
|
|
28
|
+
| `RaynetCRMUniversalDeleteActivity` | Connector | Deletes a CRM activity by entity type and ID via `DELETE /{entityType}/{id}` |
|
|
29
|
+
| `RaynetCRMGetClients` | Batch | Paginates through all client companies (1000 per page) via `GET /company` |
|
|
30
|
+
| `RaynetCRMGetContactPersons` | Batch | Paginates through all contact persons (1000 per page) via `GET /person` |
|
|
31
|
+
| `RaynetCRMGetActivities` | Batch | Paginates through activities modified since last run via `GET /activity` |
|
|
32
|
+
| `RaynetCRMSubscribeWebhook` | Batch | Registers webhook subscriptions for CRM entity events via `PUT /webhook` |
|
|
33
|
+
| `RaynetCRMUnregisterWebhook` | Batch | Removes a registered webhook subscription via `DELETE /webhook/{id}` |
|
|
34
|
+
|
|
35
|
+
## Setup
|
|
36
|
+
|
|
37
|
+
### Credentials
|
|
38
|
+
|
|
39
|
+
1. Log in to your [RAYNET CRM](https://app.raynet.cz/) account.
|
|
40
|
+
2. Navigate to **Settings → API** and note your **API key**.
|
|
41
|
+
3. Your **instance name** is the subdomain visible in your RAYNET CRM URL (e.g. `my-company` from `my-company.raynet.cz`).
|
|
42
|
+
4. In Orchesty, open the Raynet CRM application settings and fill in the **User**, **ApiKey**, and **Instance name** fields.
|
|
43
|
+
|
|
44
|
+
### API Documentation
|
|
45
|
+
|
|
46
|
+
RAYNET CRM API: [https://app.raynet.cz/api/doc/](https://app.raynet.cz/api/doc/)
|
|
47
|
+
|
|
48
|
+
## Installation & Usage
|
|
49
|
+
|
|
50
|
+
Install the package:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm install @orchesty/connector-raynet-crm @orchesty/nodejs-sdk
|
|
54
|
+
# or
|
|
55
|
+
pnpm add @orchesty/connector-raynet-crm @orchesty/nodejs-sdk
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Register the application and nodes in your Orchesty DI container:
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
import { container } from '@orchesty/nodejs-sdk';
|
|
62
|
+
import RaynetCRMApplication from '@orchesty/connector-raynet-crm/dist/RaynetCRMApplication';
|
|
63
|
+
import RaynetCRMGetVoipByTel from '@orchesty/connector-raynet-crm/dist/Connector/RaynetCRMGetVoipByTel';
|
|
64
|
+
import RaynetCRMUniversalCreateActivity from '@orchesty/connector-raynet-crm/dist/Connector/RaynetCRMUniversalCreateActivity';
|
|
65
|
+
import RaynetCRMUniversalUpdateActivity from '@orchesty/connector-raynet-crm/dist/Connector/RaynetCRMUniversalUpdateActivity';
|
|
66
|
+
import RaynetCRMUniversalActivityDetail from '@orchesty/connector-raynet-crm/dist/Connector/RaynetCRMUniversalActivityDetail';
|
|
67
|
+
import RaynetCRMUniversalDeleteActivity from '@orchesty/connector-raynet-crm/dist/Connector/RaynetCRMUniversalDeleteActivity';
|
|
68
|
+
import RaynetCRMGetClients from '@orchesty/connector-raynet-crm/dist/Batch/RaynetCRMGetClients';
|
|
69
|
+
import RaynetCRMGetContactPersons from '@orchesty/connector-raynet-crm/dist/Batch/RaynetCRMGetContactPersons';
|
|
70
|
+
import RaynetCRMGetActivities from '@orchesty/connector-raynet-crm/dist/Batch/RaynetCRMGetActivities';
|
|
71
|
+
import RaynetCRMSubscribeWebhook from '@orchesty/connector-raynet-crm/dist/Batch/RaynetCRMSubscribeWebhook';
|
|
72
|
+
import RaynetCRMUnregisterWebhook from '@orchesty/connector-raynet-crm/dist/Batch/RaynetCRMUnregisterWebhook';
|
|
73
|
+
|
|
74
|
+
const app = new RaynetCRMApplication();
|
|
75
|
+
container.setApplication(app);
|
|
76
|
+
container.setNode(new RaynetCRMGetVoipByTel(), app);
|
|
77
|
+
container.setNode(new RaynetCRMUniversalCreateActivity(), app);
|
|
78
|
+
container.setNode(new RaynetCRMUniversalUpdateActivity(), app);
|
|
79
|
+
container.setNode(new RaynetCRMUniversalActivityDetail(), app);
|
|
80
|
+
container.setNode(new RaynetCRMUniversalDeleteActivity(), app);
|
|
81
|
+
container.setNode(new RaynetCRMGetClients(), app);
|
|
82
|
+
container.setNode(new RaynetCRMGetContactPersons(), app);
|
|
83
|
+
container.setNode(new RaynetCRMGetActivities(), app);
|
|
84
|
+
container.setNode(new RaynetCRMSubscribeWebhook(), app);
|
|
85
|
+
container.setNode(new RaynetCRMUnregisterWebhook(), app);
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
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.
|
|
91
|
+
|
|
92
|
+
## Contributing
|
|
93
|
+
|
|
94
|
+
Contributions are welcome! This connector is part of the open-source [Orchesty Node.js Connectors](https://github.com/Orchesty/orchesty-nodejs-connectors) monorepo.
|
|
95
|
+
|
|
96
|
+
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.
|
|
97
|
+
|
|
98
|
+
All contributions should include:
|
|
99
|
+
- Source code in `src/` following the existing connector structure
|
|
100
|
+
- Tests in `src/**/__tests__/` with `input.json`, `mock.json`, and `output.json` fixtures
|
|
101
|
+
- An updated `CHANGELOG.md` entry
|
|
@@ -40,6 +40,7 @@ class RaynetCRMSubscribeWebhook extends ABatchNode_1.default {
|
|
|
40
40
|
await repo.insert(new Webhook_1.default()
|
|
41
41
|
.setWebhookId(respBody.data.uuid)
|
|
42
42
|
.setUser(appInstall.getUser())
|
|
43
|
+
.setSdk(appInstall.getSdk())
|
|
43
44
|
.setNode(webhooks[webhookIndex].getNode())
|
|
44
45
|
.setToken(token)
|
|
45
46
|
.setApplication(app.getName())
|
|
@@ -18,7 +18,11 @@ class RaynetCRMUnregisterWebhook extends ABatchNode_1.default {
|
|
|
18
18
|
const app = this.getApplication();
|
|
19
19
|
const appInstall = await this.getApplicationInstallFromProcess(dto, null, true);
|
|
20
20
|
const repo = this.getDbClient().getRepository(Webhook_1.default);
|
|
21
|
-
const webhooks = await repo.findMany({
|
|
21
|
+
const webhooks = await repo.findMany({
|
|
22
|
+
users: [appInstall.getUser()],
|
|
23
|
+
apps: [app.getName()],
|
|
24
|
+
sdks: [appInstall.getSdk()],
|
|
25
|
+
});
|
|
22
26
|
if (webhooks && webhooks.length > 0) {
|
|
23
27
|
const webhookId = webhooks[0].getWebhookId();
|
|
24
28
|
const requestDto = app.getRequestDto(dto, appInstall, HttpMethods_1.HttpMethods.DELETE, `webhook/${webhookId}`);
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchesty/connector-raynet-crm",
|
|
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
|
"http-status-codes": "^2.3.0"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchesty/connector-raynet-crm",
|
|
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
|
"http-status-codes": "^2.3.0"
|
|
16
19
|
},
|
|
17
20
|
"engines": {
|