@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,157 @@
1
+ {
2
+ "http": "GET https://app.raynet.cz/api/v2/company?offset=0&limit=1000",
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,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/person?offset=0&limit=1000&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
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "http": "GET https://app.raynet.cz/api/v2/person?offset=0&limit=1000",
3
+ "code": 200,
4
+ "body": {
5
+ "success": "true",
6
+ "totalCount": 2,
7
+ "data": [
8
+ {
9
+ "id": 3,
10
+ "titleBefore": "Ing.",
11
+ "firstName": "Petr",
12
+ "lastName": "Chytrý",
13
+ "titleAfter": "CSc.",
14
+ "primaryRelationship": {
15
+ "id": 1,
16
+ "type": "konzultant",
17
+ "company": {
18
+ "id": 1,
19
+ "name": "RAYNET s.r.o."
20
+ }
21
+ },
22
+ "owner": {
23
+ "id": 2,
24
+ "fullName": "test test"
25
+ },
26
+ "contactInfo": {
27
+ "email": "podpora@raynet.cz",
28
+ "email2": "test@raynet.cz",
29
+ "tel1": "+420 553 401 547",
30
+ "tel1Type": "mobil",
31
+ "tel2": null,
32
+ "tel2Type": null,
33
+ "www": null,
34
+ "otherContact": null
35
+ },
36
+ "privateAddress": {
37
+ "city": "Ostrava",
38
+ "country": "Česká republika",
39
+ "countryCode": "CZ",
40
+ "province": null,
41
+ "street": "Ocelářská 177",
42
+ "zipCode": "703 00"
43
+ },
44
+ "category": {
45
+ "id": 96,
46
+ "value": "kat 1"
47
+ },
48
+ "personClassification1": {
49
+ "id": 97,
50
+ "value": "kla 1"
51
+ },
52
+ "personClassification2": {
53
+ "id": 98,
54
+ "value": "kla 2"
55
+ },
56
+ "personClassification3": {
57
+ "id": 99,
58
+ "value": "kla 3"
59
+ },
60
+ "salutation": "pan",
61
+ "birthday": "2022-06-10",
62
+ "language": {
63
+ "id": 70,
64
+ "value": "Český"
65
+ },
66
+ "maritalStatus": {
67
+ "id": 78,
68
+ "value": "Svobodný/Svobodná"
69
+ },
70
+ "gender": "FEMALE",
71
+ "companyAddress": {
72
+ "address": {
73
+ "id": 1,
74
+ "city": "Ostrava-Poruba",
75
+ "country": "Česká republika",
76
+ "countryCode": "CZ",
77
+ "province": null,
78
+ "street": "Francouzská 6167/5",
79
+ "zipCode": "708 00"
80
+ },
81
+ "territory": null
82
+ },
83
+ "customFields": null,
84
+ "rowInfo.createdAt": "2022-06-18 13:19",
85
+ "rowInfo.createdBy": "demo@raynet.cz",
86
+ "rowInfo.updatedAt": "2022-09-06 09:43",
87
+ "rowInfo.updatedBy": "demo@raynet.cz",
88
+ "rowInfo.rowAccess": null,
89
+ "rowInfo.rowState": null,
90
+ "securityLevel": {
91
+ "id": 1,
92
+ "name": "Sdílená"
93
+ },
94
+ "notice": "poznámka",
95
+ "activeUserAccount": true,
96
+ "keyman": false,
97
+ "tags": [ ],
98
+ "_version": 19,
99
+ "inlineGdpr": [
100
+ {
101
+ "id": 1,
102
+ "validFrom": "2022-01-01",
103
+ "validTill": "2022-01-01",
104
+ "legalTitle": "LEGITIMATE_INTEREST",
105
+ "templateName": "Opravněný zájem",
106
+ "gdprTemplate": 1
107
+ }
108
+ ]
109
+ }
110
+ ]
111
+ }
112
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": [
6
+ {
7
+ "body": "{\"id\":3,\"titleBefore\":\"Ing.\",\"firstName\":\"Petr\",\"lastName\":\"Chytrý\",\"titleAfter\":\"CSc.\",\"primaryRelationship\":{\"id\":1,\"type\":\"konzultant\",\"company\":{\"id\":1,\"name\":\"RAYNET s.r.o.\"}},\"owner\":{\"id\":2,\"fullName\":\"test test\"},\"contactInfo\":{\"email\":\"podpora@raynet.cz\",\"email2\":\"test@raynet.cz\",\"tel1\":\"+420 553 401 547\",\"tel1Type\":\"mobil\",\"tel2\":null,\"tel2Type\":null,\"www\":null,\"otherContact\":null},\"privateAddress\":{\"city\":\"Ostrava\",\"country\":\"Česká republika\",\"countryCode\":\"CZ\",\"province\":null,\"street\":\"Ocelářská 177\",\"zipCode\":\"703 00\"},\"category\":{\"id\":96,\"value\":\"kat 1\"},\"personClassification1\":{\"id\":97,\"value\":\"kla 1\"},\"personClassification2\":{\"id\":98,\"value\":\"kla 2\"},\"personClassification3\":{\"id\":99,\"value\":\"kla 3\"},\"salutation\":\"pan\",\"birthday\":\"2022-06-10\",\"language\":{\"id\":70,\"value\":\"Český\"},\"maritalStatus\":{\"id\":78,\"value\":\"Svobodný/Svobodná\"},\"gender\":\"FEMALE\",\"companyAddress\":{\"address\":{\"id\":1,\"city\":\"Ostrava-Poruba\",\"country\":\"Česká republika\",\"countryCode\":\"CZ\",\"province\":null,\"street\":\"Francouzská 6167/5\",\"zipCode\":\"708 00\"},\"territory\":null},\"customFields\":null,\"rowInfo.createdAt\":\"2022-06-18 13:19\",\"rowInfo.createdBy\":\"demo@raynet.cz\",\"rowInfo.updatedAt\":\"2022-09-06 09:43\",\"rowInfo.updatedBy\":\"demo@raynet.cz\",\"rowInfo.rowAccess\":null,\"rowInfo.rowState\":null,\"securityLevel\":{\"id\":1,\"name\":\"Sdílená\"},\"notice\":\"poznámka\",\"activeUserAccount\":true,\"keyman\":false,\"tags\":[],\"_version\":19,\"inlineGdpr\":[{\"id\":1,\"validFrom\":\"2022-01-01\",\"validTill\":\"2022-01-01\",\"legalTitle\":\"LEGITIMATE_INTEREST\",\"templateName\":\"Opravněný zájem\",\"gdprTemplate\":1}]}",
8
+ "headers": {}
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": {}
6
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "http": "PUT https://app.raynet.cz/api/v2/webhook",
3
+ "code": 201,
4
+ "body": {
5
+ "success": true,
6
+ "data": {
7
+ "uuid": "532d339c0a874f68ae8f2cc108c7f7b2"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": []
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": {}
6
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "http": "DELETE https://app.raynet.cz/api/v2/webhook/1",
3
+ "code": 200,
4
+ "body": {
5
+ "success": true
6
+ }
7
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": []
6
+ }
@@ -0,0 +1,23 @@
1
+ import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
2
+ import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
3
+ import { init, mock } from '../../../test/dataProvider';
4
+ import { NAME as RAYNET_CRM_GET_ACTIVITIES } from '../RaynetCRMGetActivities';
5
+
6
+ let tester: NodeTester;
7
+
8
+ describe('Tests for RaynetCRMGetActivities', () => {
9
+ beforeAll(() => {
10
+ init();
11
+ tester = new NodeTester(container, __filename);
12
+ });
13
+
14
+ it('process - ok', async () => {
15
+ mock();
16
+ await tester.testBatch(RAYNET_CRM_GET_ACTIVITIES);
17
+ });
18
+
19
+ it('process - with from', async () => {
20
+ mock();
21
+ await tester.testBatch(RAYNET_CRM_GET_ACTIVITIES, 'from');
22
+ });
23
+ });
@@ -0,0 +1,23 @@
1
+ import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
2
+ import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
3
+ import { init, mock } from '../../../test/dataProvider';
4
+ import { NAME as RAYNET_CRM_GET_CLIENTS } from '../RaynetCRMGetClients';
5
+
6
+ let tester: NodeTester;
7
+
8
+ describe('Tests for RaynetCRMGetClients', () => {
9
+ beforeAll(() => {
10
+ init();
11
+ tester = new NodeTester(container, __filename);
12
+ });
13
+
14
+ it('process - ok', async () => {
15
+ mock();
16
+ await tester.testBatch(RAYNET_CRM_GET_CLIENTS);
17
+ });
18
+
19
+ it('process - with email', async () => {
20
+ mock();
21
+ await tester.testBatch(RAYNET_CRM_GET_CLIENTS, 'email');
22
+ });
23
+ });
@@ -0,0 +1,23 @@
1
+ import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
2
+ import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
3
+ import { init, mock } from '../../../test/dataProvider';
4
+ import { NAME as RAYNET_CRM_GET_CONTACT_PERSONS } from '../RaynetCRMGetContactPersons';
5
+
6
+ let tester: NodeTester;
7
+
8
+ describe('Tests for RaynetCRMGetContactPersons', () => {
9
+ beforeAll(() => {
10
+ init();
11
+ tester = new NodeTester(container, __filename);
12
+ });
13
+
14
+ it('process - ok', async () => {
15
+ mock();
16
+ await tester.testBatch(RAYNET_CRM_GET_CONTACT_PERSONS);
17
+ });
18
+
19
+ it('process - with email', async () => {
20
+ mock();
21
+ await tester.testBatch(RAYNET_CRM_GET_CONTACT_PERSONS, 'email');
22
+ });
23
+ });
@@ -0,0 +1,18 @@
1
+ import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
2
+ import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
3
+ import { init, mock } from '../../../test/dataProvider';
4
+ import { NAME as RAYNET_CRM_SUBSCRIBE_WEBHOOK } from '../RaynetCRMSubscribeWebhook';
5
+
6
+ let tester: NodeTester;
7
+
8
+ describe('Tests for RaynetCRMSubscribeWebhook', () => {
9
+ beforeAll(() => {
10
+ tester = new NodeTester(container, __filename);
11
+ });
12
+
13
+ it('process - ok', async () => {
14
+ init();
15
+ mock();
16
+ await tester.testBatch(RAYNET_CRM_SUBSCRIBE_WEBHOOK);
17
+ });
18
+ });