@orchesty/connector-raynet-crm 1.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.
Files changed (118) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +190 -0
  3. package/coverage/clover.xml +283 -0
  4. package/coverage/coverage-final.json +13 -0
  5. package/coverage/lcov-report/base.css +224 -0
  6. package/coverage/lcov-report/block-navigation.js +87 -0
  7. package/coverage/lcov-report/favicon.png +0 -0
  8. package/coverage/lcov-report/index.html +161 -0
  9. package/coverage/lcov-report/prettify.css +1 -0
  10. package/coverage/lcov-report/prettify.js +2 -0
  11. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  12. package/coverage/lcov-report/sorter.js +210 -0
  13. package/coverage/lcov-report/src/Batch/RaynetCRMGetActivities.ts.html +385 -0
  14. package/coverage/lcov-report/src/Batch/RaynetCRMGetClients.ts.html +679 -0
  15. package/coverage/lcov-report/src/Batch/RaynetCRMGetContactPersons.ts.html +553 -0
  16. package/coverage/lcov-report/src/Batch/RaynetCRMSubscribeWebhook.ts.html +355 -0
  17. package/coverage/lcov-report/src/Batch/RaynetCRMUnregisterWebhook.ts.html +241 -0
  18. package/coverage/lcov-report/src/Batch/index.html +176 -0
  19. package/coverage/lcov-report/src/Connector/RaynetCRMGetVoipByTel.ts.html +856 -0
  20. package/coverage/lcov-report/src/Connector/RaynetCRMUniversalActivityDetail.ts.html +448 -0
  21. package/coverage/lcov-report/src/Connector/RaynetCRMUniversalCreateActivity.ts.html +223 -0
  22. package/coverage/lcov-report/src/Connector/RaynetCRMUniversalDeleteActivity.ts.html +184 -0
  23. package/coverage/lcov-report/src/Connector/RaynetCRMUniversalUpdateActivity.ts.html +205 -0
  24. package/coverage/lcov-report/src/Connector/index.html +176 -0
  25. package/coverage/lcov-report/src/RaynetCRMApplication.ts.html +331 -0
  26. package/coverage/lcov-report/src/index.html +116 -0
  27. package/coverage/lcov-report/test/dataProvider.ts.html +205 -0
  28. package/coverage/lcov-report/test/index.html +116 -0
  29. package/coverage/lcov.info +465 -0
  30. package/dist/Batch/RaynetCRMGetActivities.d.ts +58 -0
  31. package/dist/Batch/RaynetCRMGetActivities.js +38 -0
  32. package/dist/Batch/RaynetCRMGetClients.d.ts +161 -0
  33. package/dist/Batch/RaynetCRMGetClients.js +33 -0
  34. package/dist/Batch/RaynetCRMGetContactPersons.d.ts +119 -0
  35. package/dist/Batch/RaynetCRMGetContactPersons.js +33 -0
  36. package/dist/Batch/RaynetCRMSubscribeWebhook.d.ts +15 -0
  37. package/dist/Batch/RaynetCRMSubscribeWebhook.js +64 -0
  38. package/dist/Batch/RaynetCRMUnregisterWebhook.d.ts +7 -0
  39. package/dist/Batch/RaynetCRMUnregisterWebhook.js +39 -0
  40. package/dist/Connector/RaynetCRMGetVoipByTel.d.ts +225 -0
  41. package/dist/Connector/RaynetCRMGetVoipByTel.js +27 -0
  42. package/dist/Connector/RaynetCRMUniversalActivityDetail.d.ts +86 -0
  43. package/dist/Connector/RaynetCRMUniversalActivityDetail.js +31 -0
  44. package/dist/Connector/RaynetCRMUniversalCreateActivity.d.ts +18 -0
  45. package/dist/Connector/RaynetCRMUniversalCreateActivity.js +25 -0
  46. package/dist/Connector/RaynetCRMUniversalDeleteActivity.d.ts +12 -0
  47. package/dist/Connector/RaynetCRMUniversalDeleteActivity.js +22 -0
  48. package/dist/Connector/RaynetCRMUniversalUpdateActivity.d.ts +11 -0
  49. package/dist/Connector/RaynetCRMUniversalUpdateActivity.js +27 -0
  50. package/dist/RaynetCRMApplication.d.ts +19 -0
  51. package/dist/RaynetCRMApplication.js +92 -0
  52. package/dist/package.json +23 -0
  53. package/jest.config.js +13 -0
  54. package/package.json +23 -0
  55. package/src/Batch/RaynetCRMGetActivities.ts +100 -0
  56. package/src/Batch/RaynetCRMGetClients.ts +198 -0
  57. package/src/Batch/RaynetCRMGetContactPersons.ts +156 -0
  58. package/src/Batch/RaynetCRMSubscribeWebhook.ts +90 -0
  59. package/src/Batch/RaynetCRMUnregisterWebhook.ts +52 -0
  60. package/src/Batch/__tests__/Data/RaynetCRMGetActivities/from-input.json +8 -0
  61. package/src/Batch/__tests__/Data/RaynetCRMGetActivities/from-mock.json +64 -0
  62. package/src/Batch/__tests__/Data/RaynetCRMGetActivities/from-output.json +11 -0
  63. package/src/Batch/__tests__/Data/RaynetCRMGetActivities/input.json +6 -0
  64. package/src/Batch/__tests__/Data/RaynetCRMGetActivities/mock.json +64 -0
  65. package/src/Batch/__tests__/Data/RaynetCRMGetActivities/output.json +11 -0
  66. package/src/Batch/__tests__/Data/RaynetCRMGetClients/email-input.json +8 -0
  67. package/src/Batch/__tests__/Data/RaynetCRMGetClients/email-mock.json +157 -0
  68. package/src/Batch/__tests__/Data/RaynetCRMGetClients/email-output.json +11 -0
  69. package/src/Batch/__tests__/Data/RaynetCRMGetClients/input.json +6 -0
  70. package/src/Batch/__tests__/Data/RaynetCRMGetClients/mock.json +157 -0
  71. package/src/Batch/__tests__/Data/RaynetCRMGetClients/output.json +11 -0
  72. package/src/Batch/__tests__/Data/RaynetCRMGetContactPersons/email-input.json +8 -0
  73. package/src/Batch/__tests__/Data/RaynetCRMGetContactPersons/email-mock.json +157 -0
  74. package/src/Batch/__tests__/Data/RaynetCRMGetContactPersons/email-output.json +11 -0
  75. package/src/Batch/__tests__/Data/RaynetCRMGetContactPersons/input.json +6 -0
  76. package/src/Batch/__tests__/Data/RaynetCRMGetContactPersons/mock.json +112 -0
  77. package/src/Batch/__tests__/Data/RaynetCRMGetContactPersons/output.json +11 -0
  78. package/src/Batch/__tests__/Data/RaynetCRMSubscribeWebhook/input.json +6 -0
  79. package/src/Batch/__tests__/Data/RaynetCRMSubscribeWebhook/mock.json +10 -0
  80. package/src/Batch/__tests__/Data/RaynetCRMSubscribeWebhook/output.json +6 -0
  81. package/src/Batch/__tests__/Data/RaynetCRMUnregisterWebhook/input.json +6 -0
  82. package/src/Batch/__tests__/Data/RaynetCRMUnregisterWebhook/mock.json +7 -0
  83. package/src/Batch/__tests__/Data/RaynetCRMUnregisterWebhook/output.json +6 -0
  84. package/src/Batch/__tests__/RaynetCRMGetActivities.ts +23 -0
  85. package/src/Batch/__tests__/RaynetCRMGetClients.ts +23 -0
  86. package/src/Batch/__tests__/RaynetCRMGetContactPersons.ts +23 -0
  87. package/src/Batch/__tests__/RaynetCRMSubscribeWebhook.ts +18 -0
  88. package/src/Batch/__tests__/RaynetCRMUnregisterWebhook.ts +42 -0
  89. package/src/Connector/RaynetCRMGetVoipByTel.ts +257 -0
  90. package/src/Connector/RaynetCRMUniversalActivityDetail.ts +121 -0
  91. package/src/Connector/RaynetCRMUniversalCreateActivity.ts +46 -0
  92. package/src/Connector/RaynetCRMUniversalDeleteActivity.ts +33 -0
  93. package/src/Connector/RaynetCRMUniversalUpdateActivity.ts +40 -0
  94. package/src/Connector/__tests__/Data/RaynetCRMGetVoipByTel/input.json +8 -0
  95. package/src/Connector/__tests__/Data/RaynetCRMGetVoipByTel/mock.json +216 -0
  96. package/src/Connector/__tests__/Data/RaynetCRMGetVoipByTel/output.json +217 -0
  97. package/src/Connector/__tests__/Data/RaynetCRMUniversalActivityDetail/input.json +22 -0
  98. package/src/Connector/__tests__/Data/RaynetCRMUniversalActivityDetail/mock.json +84 -0
  99. package/src/Connector/__tests__/Data/RaynetCRMUniversalActivityDetail/output.json +83 -0
  100. package/src/Connector/__tests__/Data/RaynetCRMUniversalCreateActivity/input.json +83 -0
  101. package/src/Connector/__tests__/Data/RaynetCRMUniversalCreateActivity/mock.json +10 -0
  102. package/src/Connector/__tests__/Data/RaynetCRMUniversalCreateActivity/output.json +11 -0
  103. package/src/Connector/__tests__/Data/RaynetCRMUniversalDeleteActivity/input.json +9 -0
  104. package/src/Connector/__tests__/Data/RaynetCRMUniversalDeleteActivity/mock.json +7 -0
  105. package/src/Connector/__tests__/Data/RaynetCRMUniversalDeleteActivity/output.json +8 -0
  106. package/src/Connector/__tests__/Data/RaynetCRMUniversalUpdateActivity/input.json +83 -0
  107. package/src/Connector/__tests__/Data/RaynetCRMUniversalUpdateActivity/mock.json +7 -0
  108. package/src/Connector/__tests__/Data/RaynetCRMUniversalUpdateActivity/output.json +8 -0
  109. package/src/Connector/__tests__/RaynetCRMGetVoipByTel.ts +18 -0
  110. package/src/Connector/__tests__/RaynetCRMUniversalActivityDetail.ts +18 -0
  111. package/src/Connector/__tests__/RaynetCRMUniversalCreateActivity.ts +18 -0
  112. package/src/Connector/__tests__/RaynetCRMUniversalDeleteActivity.ts +18 -0
  113. package/src/Connector/__tests__/RaynetCRMUniversalUpdateActivity.ts +18 -0
  114. package/src/RaynetCRMApplication.ts +82 -0
  115. package/test/dataProvider.ts +40 -0
  116. package/tsconfig.json +8 -0
  117. package/tsconfig.prod.json +13 -0
  118. package/tsconfig.prod.tsbuildinfo +1 -0
@@ -0,0 +1,156 @@
1
+ import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
2
+ import ResponseDto from '@orchesty/nodejs-sdk/dist/lib/Transport/Curl/ResponseDto';
3
+ import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
4
+ import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
5
+
6
+ export const NAME = 'raynet-crm-get-contact-persons';
7
+ export const LIMIT = 1000;
8
+
9
+ export default class RaynetCRMGetContactPersons extends ABatchNode {
10
+
11
+ protected limit = LIMIT;
12
+
13
+ public getName(): string {
14
+ return NAME;
15
+ }
16
+
17
+ public async processAction(dto: BatchProcessDto<IInput>): Promise<BatchProcessDto> {
18
+ const email = this.getData(dto);
19
+ const page = Number(dto.getBatchCursor('0'));
20
+
21
+ const req = await this.getApplication().getRequestDto(
22
+ dto,
23
+ await this.getApplicationInstallFromProcess(dto),
24
+ HttpMethods.GET,
25
+ `person?offset=${page}&limit=${this.limit}${email ? `&contactInfo.email=${email}` : ''}`,
26
+ );
27
+
28
+ return this.processResponse(dto, await this.getSender().send<IResponse>(req, [200]), page);
29
+ }
30
+
31
+ protected getData(dto: BatchProcessDto<IInput>): string {
32
+ return dto.getJsonData().email ?? '';
33
+ }
34
+
35
+ protected processResponse(dto: BatchProcessDto, resp: ResponseDto<IResponse>, page: number): BatchProcessDto {
36
+ const { totalCount } = resp.getJsonBody();
37
+
38
+ if (totalCount && totalCount > this.limit * (page + 1)) {
39
+ dto.setBatchCursor(String(page + 1));
40
+ }
41
+
42
+ return dto.setItemList(resp.getJsonBody().data);
43
+ }
44
+
45
+ }
46
+
47
+ export interface IInput {
48
+ email?: string;
49
+ }
50
+
51
+ /* eslint-disable @typescript-eslint/naming-convention */
52
+ export interface IResponse {
53
+ success: string;
54
+ totalCount: number;
55
+ data: {
56
+ id: number;
57
+ titleBefore: string;
58
+ firstName: string;
59
+ lastName: string;
60
+ titleAfter: string;
61
+ primaryRelationship: {
62
+ id: number;
63
+ type: string;
64
+ company: {
65
+ id: number;
66
+ name: string;
67
+ };
68
+ };
69
+ owner: {
70
+ id: number;
71
+ fullName: string;
72
+ };
73
+ contactInfo: {
74
+ email: string;
75
+ email2: string;
76
+ tel1: string;
77
+ tel1Type: string;
78
+ tel2?: unknown;
79
+ tel2Type?: unknown;
80
+ www?: unknown;
81
+ otherContact?: unknown;
82
+ };
83
+ privateAddress: {
84
+ city: string;
85
+ country: string;
86
+ countryCode: string;
87
+ province?: unknown;
88
+ street: string;
89
+ zipCode: string;
90
+ };
91
+ category: {
92
+ id: number;
93
+ value: string;
94
+ };
95
+ personClassification1: {
96
+ id: number;
97
+ value: string;
98
+ };
99
+ personClassification2: {
100
+ id: number;
101
+ value: string;
102
+ };
103
+ personClassification3: {
104
+ id: number;
105
+ value: string;
106
+ };
107
+ salutation: string;
108
+ birthday: string;
109
+ language: {
110
+ id: number;
111
+ value: string;
112
+ };
113
+ maritalStatus: {
114
+ id: number;
115
+ value: string;
116
+ };
117
+ gender: string;
118
+ companyAddress: {
119
+ address: {
120
+ id: number;
121
+ city: string;
122
+ country: string;
123
+ countryCode: string;
124
+ province?: unknown;
125
+ street: string;
126
+ zipCode: string;
127
+ };
128
+ territory?: unknown;
129
+ };
130
+ customFields?: unknown;
131
+ 'rowInfo.createdAt': string;
132
+ 'rowInfo.createdBy': string;
133
+ 'rowInfo.updatedAt': string;
134
+ 'rowInfo.updatedBy': string;
135
+ 'rowInfo.rowAccess'?: unknown;
136
+ 'rowInfo.rowState'?: unknown;
137
+ securityLevel: {
138
+ id: number;
139
+ name: string;
140
+ };
141
+ notice: string;
142
+ activeUserAccount: boolean;
143
+ keyman: boolean;
144
+ tags: unknown[];
145
+ _version: number;
146
+ inlineGdpr: {
147
+ id: number;
148
+ validFrom: string;
149
+ validTill: string;
150
+ legalTitle: string;
151
+ templateName: string;
152
+ gdprTemplate: number;
153
+ }[];
154
+ }[];
155
+ }
156
+ /* eslint-enable @typescript-eslint/naming-convention */
@@ -0,0 +1,90 @@
1
+ import { ApplicationInstall } from '@orchesty/nodejs-sdk/dist/lib/Application/Database/ApplicationInstall';
2
+ import Webhook from '@orchesty/nodejs-sdk/dist/lib/Application/Database/Webhook';
3
+ import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
4
+ import TopologyRunner from '@orchesty/nodejs-sdk/dist/lib/Topology/TopologyRunner';
5
+ import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
6
+ import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
7
+ import ResultCode from '@orchesty/nodejs-sdk/dist/lib/Utils/ResultCode';
8
+ import crypto from 'crypto';
9
+ import RaynetCRMApplication from '../RaynetCRMApplication';
10
+
11
+ export const NAME = 'raynet-crm-subscribe-webhook';
12
+
13
+ export function getEntities(): string[] {
14
+ return ['Task', 'Email', 'Meeting', 'Letter', 'PhoneCall', 'Event'];
15
+ }
16
+
17
+ export default class RaynetCRMSubscribeWebhook extends ABatchNode {
18
+
19
+ public getName(): string {
20
+ return NAME;
21
+ }
22
+
23
+ public async processAction(dto: BatchProcessDto): Promise<BatchProcessDto> {
24
+ const app = this.getApplication<RaynetCRMApplication>();
25
+
26
+ const webhookIndex = Number(dto.getBatchCursor('0'));
27
+ const webhooks = app.getWebhookSubscriptions();
28
+
29
+ if (webhooks.length > 0) {
30
+ const appInstall = await this.getApplicationInstallFromProcess(dto);
31
+ const repo = this.getDbClient().getRepository(Webhook);
32
+
33
+ const token = this.getRandomToken();
34
+ const requestDto = app.getRequestDto(
35
+ dto,
36
+ appInstall,
37
+ HttpMethods.PUT,
38
+ 'webhook',
39
+ {
40
+ url: TopologyRunner.getWebhookUrl(
41
+ webhooks[webhookIndex].getTopology(),
42
+ webhooks[webhookIndex].getNode(),
43
+ token,
44
+ ),
45
+ events: webhooks[webhookIndex].getName().split(','),
46
+ entityFilter: getEntities(),
47
+ },
48
+ );
49
+
50
+ let res;
51
+ try {
52
+ res = await this.getSender().send<IResponseJson>(requestDto, [201]);
53
+ const respBody = res.getJsonBody();
54
+
55
+ await repo.insert(new Webhook()
56
+ .setWebhookId(respBody.data.uuid)
57
+ .setUser(appInstall.getUser())
58
+ .setNode(webhooks[webhookIndex].getNode())
59
+ .setToken(token)
60
+ .setApplication(app.getName())
61
+ .setTopology(webhooks[webhookIndex].getTopology())
62
+ .setName(webhooks[webhookIndex].getName()));
63
+
64
+ if (webhooks.length - 1 > webhookIndex) {
65
+ dto.setBatchCursor((webhookIndex + 1).toString());
66
+ }
67
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
68
+ } catch (e) {
69
+ appInstall.setEnabled(false);
70
+ await this.getDbClient().getRepository(ApplicationInstall).update(appInstall);
71
+
72
+ dto.setStopProcess(ResultCode.STOP_AND_FAILED, res?.getBody() ?? 'Webhook could not be registered!');
73
+ }
74
+ }
75
+
76
+ return dto;
77
+ }
78
+
79
+ private getRandomToken(): string {
80
+ return crypto.randomBytes(64).toString('hex');
81
+ }
82
+
83
+ }
84
+
85
+ export interface IResponseJson {
86
+ success: boolean;
87
+ data: {
88
+ uuid: string;
89
+ };
90
+ }
@@ -0,0 +1,52 @@
1
+ import Webhook from '@orchesty/nodejs-sdk/dist/lib/Application/Database/Webhook';
2
+ import WebhookRepository from '@orchesty/nodejs-sdk/dist/lib/Application/Database/WebhookRepository';
3
+ import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
4
+ import OnRepeatException from '@orchesty/nodejs-sdk/dist/lib/Exception/OnRepeatException';
5
+ import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
6
+ import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
7
+ import { StatusCodes } from 'http-status-codes';
8
+ import RaynetCRMApplication from '../RaynetCRMApplication';
9
+
10
+ export const NAME = 'raynet-crm-unregister-webhook';
11
+
12
+ export default class RaynetCRMUnregisterWebhook extends ABatchNode {
13
+
14
+ public getName(): string {
15
+ return NAME;
16
+ }
17
+
18
+ public async processAction(dto: BatchProcessDto): Promise<BatchProcessDto> {
19
+ const app = this.getApplication<RaynetCRMApplication>();
20
+
21
+ const appInstall = await this.getApplicationInstallFromProcess(dto, null, true);
22
+
23
+ const repo = this.getDbClient().getRepository(Webhook) as WebhookRepository;
24
+ const webhooks = await repo.findMany({ users: [appInstall.getUser()], apps: [app.getName()] });
25
+
26
+ if (webhooks && webhooks.length > 0) {
27
+ const webhookId = webhooks[0].getWebhookId();
28
+ const requestDto = app.getRequestDto(
29
+ dto,
30
+ appInstall,
31
+ HttpMethods.DELETE,
32
+ `webhook/${webhookId}`,
33
+ );
34
+
35
+ const res = await this.getSender().send(requestDto);
36
+ if (res.getResponseCode() !== StatusCodes.OK && res.getResponseCode() !== StatusCodes.NOT_FOUND) {
37
+ webhooks[0].setUnsubscribeFailed(true);
38
+ await repo.update(webhooks[0]);
39
+ throw new OnRepeatException(60, 10, res.getBody());
40
+ }
41
+
42
+ await repo.remove(webhooks[0]);
43
+
44
+ if (webhooks.length > 1) {
45
+ dto.setBatchCursor('next');
46
+ }
47
+ }
48
+
49
+ return dto;
50
+ }
51
+
52
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": {
6
+ "from": "2017-04-15T03:00:50.7579581Z"
7
+ }
8
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "http": "GET https://app.raynet.cz/api/v2/activity?offset=0&limit=1000&rowInfo.lastModifiedAt[GE]=1970-1-1%200:0&dateFormat=ISO8601&scheduledFrom=2017-04-15T03:00:50.7579581Z",
3
+ "code": 200,
4
+ "body": {
5
+ "success": true,
6
+ "totalCount": 1,
7
+ "data": [
8
+ {
9
+ "_entityName": "Meeting",
10
+ "id": 2,
11
+ "title": "ZRDZ-Meeting-",
12
+ "personal": true,
13
+ "status": "SCHEDULED",
14
+ "priority": "DEFAULT",
15
+ "category": null,
16
+ "activity": null,
17
+ "company": null,
18
+ "person": null,
19
+ "lead": null,
20
+ "project": null,
21
+ "businessCase": null,
22
+ "offer": null,
23
+ "salesOrder": null,
24
+ "scheduledFrom": "2024-02-08T15:00:00.000+01:00",
25
+ "scheduledTill": "2024-02-08T15:30:00.000+01:00",
26
+ "completed": null,
27
+ "description": "<p>ZTSR</p>",
28
+ "solution": null,
29
+ "tags": [],
30
+ "rowInfo.createdAt": "2024-02-05T09:33:13.833+01:00",
31
+ "rowInfo.createdBy": "fila.r@hanaboso.com",
32
+ "rowInfo.updatedAt": "2024-02-07T12:42:24.900+01:00",
33
+ "rowInfo.updatedBy": "fila.r@hanaboso.com",
34
+ "rowInfo.rowAccess": null,
35
+ "rowInfo.rowState": null,
36
+ "securityLevel": {
37
+ "id": 1,
38
+ "name": "Sdílená"
39
+ },
40
+ "_version": 7,
41
+ "customFields": {},
42
+ "participants": [
43
+ {
44
+ "owner": true,
45
+ "role": "FROM",
46
+ "name": "Richard Fíla",
47
+ "person": 2,
48
+ "company": null,
49
+ "lead": null
50
+ }
51
+ ],
52
+ "recurrence": null,
53
+ "meetingPlace": null,
54
+ "companyAddress": {
55
+ "city": null,
56
+ "country": null,
57
+ "province": null,
58
+ "street": null,
59
+ "zipCode": null
60
+ }
61
+ }
62
+ ]
63
+ }
64
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": [
6
+ {
7
+ "body": "{\"_entityName\":\"Meeting\",\"id\":2,\"title\":\"ZRDZ-Meeting-\",\"personal\":true,\"status\":\"SCHEDULED\",\"priority\":\"DEFAULT\",\"category\":null,\"activity\":null,\"company\":null,\"person\":null,\"lead\":null,\"project\":null,\"businessCase\":null,\"offer\":null,\"salesOrder\":null,\"scheduledFrom\":\"2024-02-08T15:00:00.000+01:00\",\"scheduledTill\":\"2024-02-08T15:30:00.000+01:00\",\"completed\":null,\"description\":\"<p>ZTSR</p>\",\"solution\":null,\"tags\":[],\"rowInfo.createdAt\":\"2024-02-05T09:33:13.833+01:00\",\"rowInfo.createdBy\":\"fila.r@hanaboso.com\",\"rowInfo.updatedAt\":\"2024-02-07T12:42:24.900+01:00\",\"rowInfo.updatedBy\":\"fila.r@hanaboso.com\",\"rowInfo.rowAccess\":null,\"rowInfo.rowState\":null,\"securityLevel\":{\"id\":1,\"name\":\"Sdílená\"},\"_version\":7,\"customFields\":{},\"participants\":[{\"owner\":true,\"role\":\"FROM\",\"name\":\"Richard Fíla\",\"person\":2,\"company\":null,\"lead\":null}],\"recurrence\":null,\"meetingPlace\":null,\"companyAddress\":{\"city\":null,\"country\":null,\"province\":null,\"street\":null,\"zipCode\":null}}",
8
+ "headers": {}
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": {}
6
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "http": "GET https://app.raynet.cz/api/v2/activity?offset=0&limit=1000&rowInfo.lastModifiedAt[GE]=1970-1-1%200:0&dateFormat=ISO8601",
3
+ "code": 200,
4
+ "body": {
5
+ "success": true,
6
+ "totalCount": 1,
7
+ "data": [
8
+ {
9
+ "_entityName": "Meeting",
10
+ "id": 2,
11
+ "title": "ZRDZ-Meeting-",
12
+ "personal": true,
13
+ "status": "SCHEDULED",
14
+ "priority": "DEFAULT",
15
+ "category": null,
16
+ "activity": null,
17
+ "company": null,
18
+ "person": null,
19
+ "lead": null,
20
+ "project": null,
21
+ "businessCase": null,
22
+ "offer": null,
23
+ "salesOrder": null,
24
+ "scheduledFrom": "2024-02-08T15:00:00.000+01:00",
25
+ "scheduledTill": "2024-02-08T15:30:00.000+01:00",
26
+ "completed": null,
27
+ "description": "<p>ZTSR</p>",
28
+ "solution": null,
29
+ "tags": [],
30
+ "rowInfo.createdAt": "2024-02-05T09:33:13.833+01:00",
31
+ "rowInfo.createdBy": "fila.r@hanaboso.com",
32
+ "rowInfo.updatedAt": "2024-02-07T12:42:24.900+01:00",
33
+ "rowInfo.updatedBy": "fila.r@hanaboso.com",
34
+ "rowInfo.rowAccess": null,
35
+ "rowInfo.rowState": null,
36
+ "securityLevel": {
37
+ "id": 1,
38
+ "name": "Sdílená"
39
+ },
40
+ "_version": 7,
41
+ "customFields": {},
42
+ "participants": [
43
+ {
44
+ "owner": true,
45
+ "role": "FROM",
46
+ "name": "Richard Fíla",
47
+ "person": 2,
48
+ "company": null,
49
+ "lead": null
50
+ }
51
+ ],
52
+ "recurrence": null,
53
+ "meetingPlace": null,
54
+ "companyAddress": {
55
+ "city": null,
56
+ "country": null,
57
+ "province": null,
58
+ "street": null,
59
+ "zipCode": null
60
+ }
61
+ }
62
+ ]
63
+ }
64
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": [
6
+ {
7
+ "body": "{\"_entityName\":\"Meeting\",\"id\":2,\"title\":\"ZRDZ-Meeting-\",\"personal\":true,\"status\":\"SCHEDULED\",\"priority\":\"DEFAULT\",\"category\":null,\"activity\":null,\"company\":null,\"person\":null,\"lead\":null,\"project\":null,\"businessCase\":null,\"offer\":null,\"salesOrder\":null,\"scheduledFrom\":\"2024-02-08T15:00:00.000+01:00\",\"scheduledTill\":\"2024-02-08T15:30:00.000+01:00\",\"completed\":null,\"description\":\"<p>ZTSR</p>\",\"solution\":null,\"tags\":[],\"rowInfo.createdAt\":\"2024-02-05T09:33:13.833+01:00\",\"rowInfo.createdBy\":\"fila.r@hanaboso.com\",\"rowInfo.updatedAt\":\"2024-02-07T12:42:24.900+01:00\",\"rowInfo.updatedBy\":\"fila.r@hanaboso.com\",\"rowInfo.rowAccess\":null,\"rowInfo.rowState\":null,\"securityLevel\":{\"id\":1,\"name\":\"Sdílená\"},\"_version\":7,\"customFields\":{},\"participants\":[{\"owner\":true,\"role\":\"FROM\",\"name\":\"Richard Fíla\",\"person\":2,\"company\":null,\"lead\":null}],\"recurrence\":null,\"meetingPlace\":null,\"companyAddress\":{\"city\":null,\"country\":null,\"province\":null,\"street\":null,\"zipCode\":null}}",
8
+ "headers": {}
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": {
6
+ "email": "neco@neco.cz"
7
+ }
8
+ }
@@ -0,0 +1,157 @@
1
+ {
2
+ "http": "GET https://app.raynet.cz/api/v2/company?offset=0&limit=1000&primaryAddress-contactInfo.email=neco@neco.cz",
3
+ "code": 200,
4
+ "body": {
5
+ "success": "true",
6
+ "totalCount": 1,
7
+ "data": [
8
+ {
9
+ "id": 2,
10
+ "name": "Test s.r.o.",
11
+ "titleBefore": null,
12
+ "firstName": null,
13
+ "lastName": null,
14
+ "titleAfter": null,
15
+ "person": false,
16
+ "role": "B_PARTNER",
17
+ "state": "B_ACTUAL",
18
+ "rating": "A",
19
+ "owner": {
20
+ "id": 1,
21
+ "fullName": "RAYNET CRM"
22
+ },
23
+ "regNumber": "123456789",
24
+ "taxNumber": "CZ123456789",
25
+ "taxNumber2": null,
26
+ "taxPayer": "YES",
27
+ "bankAccount": null,
28
+ "databox": null,
29
+ "court": null,
30
+ "primaryAddress": {
31
+ "id": 2,
32
+ "primary": true,
33
+ "contactAddress": false,
34
+ "address": {
35
+ "id": 2,
36
+ "city": "Ostrava-Slezská Ostrava",
37
+ "country": "Česká republika",
38
+ "name": "Sídlo klienta",
39
+ "province": "Moravskoslezský kraj",
40
+ "street": "Těšínská",
41
+ "zipCode": "710 00",
42
+ "lat": 49.2499446,
43
+ "lng": 13.703011
44
+ },
45
+ "territory": {
46
+ "id": 91,
47
+ "value": "Morava"
48
+ },
49
+ "contactInfo": {
50
+ "email": "test@test.cz",
51
+ "email2": "test2@test.cz",
52
+ "primary": true,
53
+ "tel1": "123 456 789",
54
+ "tel1Type": "mobil",
55
+ "tel2": "987 654 321",
56
+ "tel2Type": "pevná linka",
57
+ "www": "www.test.cz",
58
+ "otherContact": null
59
+ },
60
+ "extIds": null
61
+ },
62
+ "contactAddress": {
63
+ "id": 3,
64
+ "primary": false,
65
+ "contactAddress": true,
66
+ "address": {
67
+ "id": 3,
68
+ "city": "Ostrava-Moravská Ostrava",
69
+ "country": "Česká republika",
70
+ "name": "Provozovna",
71
+ "province": "Moravskoslezský kraj",
72
+ "street": "Českobratrská 113",
73
+ "zipCode": "702 00",
74
+ "lat": null,
75
+ "lng": null
76
+ },
77
+ "territory": {
78
+ "id": 91,
79
+ "value": "Morava"
80
+ },
81
+ "contactInfo": {
82
+ "email": "provozovna@test.cz",
83
+ "email2": null,
84
+ "primary": true,
85
+ "tel1": "444 444 444",
86
+ "tel1Type": "mobil",
87
+ "tel2": "111 111 111",
88
+ "tel2Type": "pevná linka",
89
+ "www": null,
90
+ "otherContact": null
91
+ },
92
+ "extIds": null
93
+ },
94
+ "category": {
95
+ "id": 15,
96
+ "value": "Zákazník"
97
+ },
98
+ "turnover": {
99
+ "id": 82,
100
+ "value": "do 1 mil. Kč"
101
+ },
102
+ "economyActivity": {
103
+ "id": 92,
104
+ "value": "obor 1"
105
+ },
106
+ "companyClassification1": {
107
+ "id": 93,
108
+ "value": "kla 1"
109
+ },
110
+ "companyClassification2": {
111
+ "id": 94,
112
+ "value": "kla 2"
113
+ },
114
+ "companyClassification3": {
115
+ "id": 95,
116
+ "value": "kla 3"
117
+ },
118
+ "paymentTerm": {
119
+ "id": 64,
120
+ "value": "7 dní"
121
+ },
122
+ "contactSource": {
123
+ "id": 62,
124
+ "value": "e-mail"
125
+ },
126
+ "birthday": null,
127
+ "notice": "poznamka ke klientovi",
128
+ "tags": [
129
+ "stitek1",
130
+ "stitek 2"
131
+ ],
132
+ "customFields": null,
133
+ "rowInfo.createdAt": "2022-06-18 13:19",
134
+ "rowInfo.createdBy": "demo@raynet.cz",
135
+ "rowInfo.updatedAt": "2022-09-22 14:17",
136
+ "rowInfo.updatedBy": "demo@raynet.cz",
137
+ "rowInfo.rowAccess": null,
138
+ "rowInfo.rowState": null,
139
+ "securityLevel": {
140
+ "id": 1,
141
+ "name": "Sdílená"
142
+ },
143
+ "inlineGdpr": [
144
+ {
145
+ "id": 1,
146
+ "validFrom": "2022-01-01",
147
+ "validTill": "2022-01-01",
148
+ "legalTitle": "LEGITIMATE_INTEREST",
149
+ "templateName": "Opravněný zájem",
150
+ "gdprTemplate": 1
151
+ }
152
+ ],
153
+ "_version": 16
154
+ }
155
+ ]
156
+ }
157
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": [
6
+ {
7
+ "body": "{\"id\":2,\"name\":\"Test s.r.o.\",\"titleBefore\":null,\"firstName\":null,\"lastName\":null,\"titleAfter\":null,\"person\":false,\"role\":\"B_PARTNER\",\"state\":\"B_ACTUAL\",\"rating\":\"A\",\"owner\":{\"id\":1,\"fullName\":\"RAYNET CRM\"},\"regNumber\":\"123456789\",\"taxNumber\":\"CZ123456789\",\"taxNumber2\":null,\"taxPayer\":\"YES\",\"bankAccount\":null,\"databox\":null,\"court\":null,\"primaryAddress\":{\"id\":2,\"primary\":true,\"contactAddress\":false,\"address\":{\"id\":2,\"city\":\"Ostrava-Slezská Ostrava\",\"country\":\"Česká republika\",\"name\":\"Sídlo klienta\",\"province\":\"Moravskoslezský kraj\",\"street\":\"Těšínská\",\"zipCode\":\"710 00\",\"lat\":49.2499446,\"lng\":13.703011},\"territory\":{\"id\":91,\"value\":\"Morava\"},\"contactInfo\":{\"email\":\"test@test.cz\",\"email2\":\"test2@test.cz\",\"primary\":true,\"tel1\":\"123 456 789\",\"tel1Type\":\"mobil\",\"tel2\":\"987 654 321\",\"tel2Type\":\"pevná linka\",\"www\":\"www.test.cz\",\"otherContact\":null},\"extIds\":null},\"contactAddress\":{\"id\":3,\"primary\":false,\"contactAddress\":true,\"address\":{\"id\":3,\"city\":\"Ostrava-Moravská Ostrava\",\"country\":\"Česká republika\",\"name\":\"Provozovna\",\"province\":\"Moravskoslezský kraj\",\"street\":\"Českobratrská 113\",\"zipCode\":\"702 00\",\"lat\":null,\"lng\":null},\"territory\":{\"id\":91,\"value\":\"Morava\"},\"contactInfo\":{\"email\":\"provozovna@test.cz\",\"email2\":null,\"primary\":true,\"tel1\":\"444 444 444\",\"tel1Type\":\"mobil\",\"tel2\":\"111 111 111\",\"tel2Type\":\"pevná linka\",\"www\":null,\"otherContact\":null},\"extIds\":null},\"category\":{\"id\":15,\"value\":\"Zákazník\"},\"turnover\":{\"id\":82,\"value\":\"do 1 mil. Kč\"},\"economyActivity\":{\"id\":92,\"value\":\"obor 1\"},\"companyClassification1\":{\"id\":93,\"value\":\"kla 1\"},\"companyClassification2\":{\"id\":94,\"value\":\"kla 2\"},\"companyClassification3\":{\"id\":95,\"value\":\"kla 3\"},\"paymentTerm\":{\"id\":64,\"value\":\"7 dní\"},\"contactSource\":{\"id\":62,\"value\":\"e-mail\"},\"birthday\":null,\"notice\":\"poznamka ke klientovi\",\"tags\":[\"stitek1\",\"stitek 2\"],\"customFields\":null,\"rowInfo.createdAt\":\"2022-06-18 13:19\",\"rowInfo.createdBy\":\"demo@raynet.cz\",\"rowInfo.updatedAt\":\"2022-09-22 14:17\",\"rowInfo.updatedBy\":\"demo@raynet.cz\",\"rowInfo.rowAccess\":null,\"rowInfo.rowState\":null,\"securityLevel\":{\"id\":1,\"name\":\"Sdílená\"},\"inlineGdpr\":[{\"id\":1,\"validFrom\":\"2022-01-01\",\"validTill\":\"2022-01-01\",\"legalTitle\":\"LEGITIMATE_INTEREST\",\"templateName\":\"Opravněný zájem\",\"gdprTemplate\":1}],\"_version\":16}",
8
+ "headers": {}
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": {}
6
+ }