@orchesty/connector-zendesk 1.0.0 → 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 +97 -0
- package/dist/Batch/ZendeskCreateWebhookConnector.js +6 -1
- package/dist/Batch/ZendeskDeleteWebhookConnector.js +5 -1
- package/dist/ZendeskApplication.js +1 -1
- package/dist/package.json +5 -2
- package/package.json +5 -2
- package/CHANGELOG.md +0 -7
- package/coverage/clover.xml +0 -241
- package/coverage/coverage-final.json +0 -11
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -161
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/src/Batch/ZendeskCreateWebhookConnector.ts.html +0 -373
- package/coverage/lcov-report/src/Batch/ZendeskDeleteWebhookConnector.ts.html +0 -202
- package/coverage/lcov-report/src/Batch/ZendeskListTicketsBatch.ts.html +0 -337
- package/coverage/lcov-report/src/Batch/ZendeskListUsersBatch.ts.html +0 -247
- package/coverage/lcov-report/src/Batch/index.html +0 -161
- package/coverage/lcov-report/src/Connector/ZendeskCreateTicketConnector.ts.html +0 -319
- package/coverage/lcov-report/src/Connector/ZendeskCreateTriggerConnector.ts.html +0 -226
- package/coverage/lcov-report/src/Connector/ZendeskCreateUserConnector.ts.html +0 -265
- package/coverage/lcov-report/src/Connector/ZendeskDeleteTriggerConnector.ts.html +0 -223
- package/coverage/lcov-report/src/Connector/index.html +0 -161
- package/coverage/lcov-report/src/ZendeskApplication.ts.html +0 -448
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/test/dataProvider.ts.html +0 -307
- package/coverage/lcov-report/test/index.html +0 -116
- package/coverage/lcov.info +0 -389
- package/jest.config.js +0 -13
- package/src/Batch/ZendeskCreateWebhookConnector.ts +0 -96
- package/src/Batch/ZendeskDeleteWebhookConnector.ts +0 -39
- package/src/Batch/ZendeskListTicketsBatch.ts +0 -84
- package/src/Batch/ZendeskListUsersBatch.ts +0 -54
- package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/1-mock.json +0 -57
- package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/input.json +0 -6
- package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/mock.json +0 -106
- package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/output.json +0 -18
- package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/output1.json +0 -12
- package/src/Batch/__tests__/Data/ZendeskListUsersBatch/input.json +0 -6
- package/src/Batch/__tests__/Data/ZendeskListUsersBatch/mock.json +0 -161
- package/src/Batch/__tests__/Data/ZendeskListUsersBatch/output.json +0 -19
- package/src/Batch/__tests__/ZendeskListTicketsBatch.ts +0 -17
- package/src/Batch/__tests__/ZendeskListUsersBatch.ts +0 -17
- package/src/Connector/ZendeskCreateTicketConnector.ts +0 -78
- package/src/Connector/ZendeskCreateTriggerConnector.ts +0 -47
- package/src/Connector/ZendeskCreateUserConnector.ts +0 -60
- package/src/Connector/ZendeskDeleteTriggerConnector.ts +0 -46
- package/src/Connector/__tests__/Data/ZendeskCreateTicketConnector/input.json +0 -14
- package/src/Connector/__tests__/Data/ZendeskCreateTicketConnector/mock.json +0 -194
- package/src/Connector/__tests__/Data/ZendeskCreateTicketConnector/output.json +0 -194
- package/src/Connector/__tests__/Data/ZendeskCreateTriggerConnector/input.json +0 -11
- package/src/Connector/__tests__/Data/ZendeskCreateTriggerConnector/mock.json +0 -31
- package/src/Connector/__tests__/Data/ZendeskCreateTriggerConnector/output.json +0 -29
- package/src/Connector/__tests__/Data/ZendeskCreateUserConnector/input.json +0 -25
- package/src/Connector/__tests__/Data/ZendeskCreateUserConnector/mock.json +0 -45
- package/src/Connector/__tests__/Data/ZendeskCreateUserConnector/output.json +0 -44
- package/src/Connector/__tests__/ZendeskCreateTicketConnector.ts +0 -17
- package/src/Connector/__tests__/ZendeskCreateTriggerConnector.ts +0 -17
- package/src/Connector/__tests__/ZendeskCreateUserConnector.ts +0 -17
- package/src/ZendeskApplication.ts +0 -121
- package/src/types/trigger.types.ts +0 -19
- package/src/types/webhook.types.ts +0 -20
- package/test/dataProvider.ts +0 -74
- package/tsconfig.json +0 -8
- package/tsconfig.prod.json +0 -13
- package/tsconfig.prod.tsbuildinfo +0 -1
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"http": "GET https://hbtest8393.zendesk.com/api/v2/tickets.json?per_page=100&page=2",
|
|
3
|
-
"code": 200,
|
|
4
|
-
"body": {
|
|
5
|
-
"tickets": [
|
|
6
|
-
{
|
|
7
|
-
"url": "https://hbtest8393.zendesk.com/api/v2/tickets/3.json",
|
|
8
|
-
"id": 3,
|
|
9
|
-
"external_id": null,
|
|
10
|
-
"via": {
|
|
11
|
-
"channel": "api",
|
|
12
|
-
"source": {
|
|
13
|
-
"from": {},
|
|
14
|
-
"to": {},
|
|
15
|
-
"rel": null
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"created_at": "2022-08-16T11:16:20Z",
|
|
19
|
-
"updated_at": "2022-08-16T11:16:20Z",
|
|
20
|
-
"type": null,
|
|
21
|
-
"subject": "My printer is on fire!",
|
|
22
|
-
"raw_subject": "My printer is on fire!",
|
|
23
|
-
"description": "The smoke is very colorful.",
|
|
24
|
-
"priority": "urgent",
|
|
25
|
-
"status": "open",
|
|
26
|
-
"recipient": null,
|
|
27
|
-
"requester_id": 6279089898141,
|
|
28
|
-
"submitter_id": 6279089898141,
|
|
29
|
-
"assignee_id": 6279089898141,
|
|
30
|
-
"organization_id": 6279167768093,
|
|
31
|
-
"group_id": 6279167766941,
|
|
32
|
-
"collaborator_ids": [],
|
|
33
|
-
"follower_ids": [],
|
|
34
|
-
"email_cc_ids": [],
|
|
35
|
-
"forum_topic_id": null,
|
|
36
|
-
"problem_id": null,
|
|
37
|
-
"has_incidents": false,
|
|
38
|
-
"is_public": true,
|
|
39
|
-
"due_at": null,
|
|
40
|
-
"tags": [],
|
|
41
|
-
"custom_fields": [],
|
|
42
|
-
"satisfaction_rating": null,
|
|
43
|
-
"sharing_agreement_ids": [],
|
|
44
|
-
"fields": [],
|
|
45
|
-
"followup_ids": [],
|
|
46
|
-
"ticket_form_id": 6279120591901,
|
|
47
|
-
"brand_id": 6279120605853,
|
|
48
|
-
"allow_channelback": false,
|
|
49
|
-
"allow_attachments": true
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
"next_page": null,
|
|
53
|
-
"links": {
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"http": "GET https://hbtest8393.zendesk.com/api/v2/tickets.json?per_page=100&page=1",
|
|
3
|
-
"code": 200,
|
|
4
|
-
"body": {
|
|
5
|
-
"tickets": [
|
|
6
|
-
{
|
|
7
|
-
"url": "https://hbtest8393.zendesk.com/api/v2/tickets/1.json",
|
|
8
|
-
"id": 1,
|
|
9
|
-
"external_id": null,
|
|
10
|
-
"via": {
|
|
11
|
-
"channel": "sample_ticket",
|
|
12
|
-
"source": {
|
|
13
|
-
"from": {},
|
|
14
|
-
"to": {},
|
|
15
|
-
"rel": null
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"created_at": "2022-08-11T11:35:32Z",
|
|
19
|
-
"updated_at": "2022-08-11T11:35:32Z",
|
|
20
|
-
"type": "incident",
|
|
21
|
-
"subject": "Sample ticket: Meet the ticket",
|
|
22
|
-
"raw_subject": "Sample ticket: Meet the ticket",
|
|
23
|
-
"description": "Hi there,\n\nI’m sending an email because I’m having a problem setting up your new product. Can you help me troubleshoot?\n\nThanks,\n The Customer\n\n",
|
|
24
|
-
"priority": "normal",
|
|
25
|
-
"status": "open",
|
|
26
|
-
"recipient": null,
|
|
27
|
-
"requester_id": 6279106989085,
|
|
28
|
-
"submitter_id": 6279089898141,
|
|
29
|
-
"assignee_id": 6279089898141,
|
|
30
|
-
"organization_id": null,
|
|
31
|
-
"group_id": 6279167766941,
|
|
32
|
-
"collaborator_ids": [],
|
|
33
|
-
"follower_ids": [],
|
|
34
|
-
"email_cc_ids": [],
|
|
35
|
-
"forum_topic_id": null,
|
|
36
|
-
"problem_id": null,
|
|
37
|
-
"has_incidents": false,
|
|
38
|
-
"is_public": true,
|
|
39
|
-
"due_at": null,
|
|
40
|
-
"tags": [
|
|
41
|
-
"sample",
|
|
42
|
-
"support",
|
|
43
|
-
"zendesk"
|
|
44
|
-
],
|
|
45
|
-
"custom_fields": [],
|
|
46
|
-
"satisfaction_rating": null,
|
|
47
|
-
"sharing_agreement_ids": [],
|
|
48
|
-
"fields": [],
|
|
49
|
-
"followup_ids": [],
|
|
50
|
-
"ticket_form_id": 6279120591901,
|
|
51
|
-
"brand_id": 6279120605853,
|
|
52
|
-
"allow_channelback": false,
|
|
53
|
-
"allow_attachments": true
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"url": "https://hbtest8393.zendesk.com/api/v2/tickets/2.json",
|
|
57
|
-
"id": 2,
|
|
58
|
-
"external_id": null,
|
|
59
|
-
"via": {
|
|
60
|
-
"channel": "api",
|
|
61
|
-
"source": {
|
|
62
|
-
"from": {},
|
|
63
|
-
"to": {},
|
|
64
|
-
"rel": null
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"created_at": "2022-08-16T11:14:59Z",
|
|
68
|
-
"updated_at": "2022-08-16T11:14:59Z",
|
|
69
|
-
"type": null,
|
|
70
|
-
"subject": "My printer is on fire!",
|
|
71
|
-
"raw_subject": "My printer is on fire!",
|
|
72
|
-
"description": "The smoke is very colorful.",
|
|
73
|
-
"priority": "urgent",
|
|
74
|
-
"status": "open",
|
|
75
|
-
"recipient": null,
|
|
76
|
-
"requester_id": 6279089898141,
|
|
77
|
-
"submitter_id": 6279089898141,
|
|
78
|
-
"assignee_id": 6279089898141,
|
|
79
|
-
"organization_id": 6279167768093,
|
|
80
|
-
"group_id": 6279167766941,
|
|
81
|
-
"collaborator_ids": [],
|
|
82
|
-
"follower_ids": [],
|
|
83
|
-
"email_cc_ids": [],
|
|
84
|
-
"forum_topic_id": null,
|
|
85
|
-
"problem_id": null,
|
|
86
|
-
"has_incidents": false,
|
|
87
|
-
"is_public": true,
|
|
88
|
-
"due_at": null,
|
|
89
|
-
"tags": [],
|
|
90
|
-
"custom_fields": [],
|
|
91
|
-
"satisfaction_rating": null,
|
|
92
|
-
"sharing_agreement_ids": [],
|
|
93
|
-
"fields": [],
|
|
94
|
-
"followup_ids": [],
|
|
95
|
-
"ticket_form_id": 6279120591901,
|
|
96
|
-
"brand_id": 6279120605853,
|
|
97
|
-
"allow_channelback": false,
|
|
98
|
-
"allow_attachments": true
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
"next_page": "1",
|
|
102
|
-
"links": {
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"headers": {
|
|
3
|
-
"user": "TestUser",
|
|
4
|
-
"cursor": "2",
|
|
5
|
-
"result-code": "1010",
|
|
6
|
-
"result-message": "Message will be used as a iterator with cursor [2]. Data will be send to follower(s)."
|
|
7
|
-
},
|
|
8
|
-
"data": [
|
|
9
|
-
{
|
|
10
|
-
"body": "{\"url\":\"https://hbtest8393.zendesk.com/api/v2/tickets/1.json\",\"id\":1,\"external_id\":null,\"via\":{\"channel\":\"sample_ticket\",\"source\":{\"from\":{},\"to\":{},\"rel\":null}},\"created_at\":\"2022-08-11T11:35:32Z\",\"updated_at\":\"2022-08-11T11:35:32Z\",\"type\":\"incident\",\"subject\":\"Sample ticket: Meet the ticket\",\"raw_subject\":\"Sample ticket: Meet the ticket\",\"description\":\"Hi there,\\n\\nI’m sending an email because I’m having a problem setting up your new product. Can you help me troubleshoot?\\n\\nThanks,\\n The Customer\\n\\n\",\"priority\":\"normal\",\"status\":\"open\",\"recipient\":null,\"requester_id\":6279106989085,\"submitter_id\":6279089898141,\"assignee_id\":6279089898141,\"organization_id\":null,\"group_id\":6279167766941,\"collaborator_ids\":[],\"follower_ids\":[],\"email_cc_ids\":[],\"forum_topic_id\":null,\"problem_id\":null,\"has_incidents\":false,\"is_public\":true,\"due_at\":null,\"tags\":[\"sample\",\"support\",\"zendesk\"],\"custom_fields\":[],\"satisfaction_rating\":null,\"sharing_agreement_ids\":[],\"fields\":[],\"followup_ids\":[],\"ticket_form_id\":6279120591901,\"brand_id\":6279120605853,\"allow_channelback\":false,\"allow_attachments\":true}",
|
|
11
|
-
"headers": {}
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"body": "{\"url\":\"https://hbtest8393.zendesk.com/api/v2/tickets/2.json\",\"id\":2,\"external_id\":null,\"via\":{\"channel\":\"api\",\"source\":{\"from\":{},\"to\":{},\"rel\":null}},\"created_at\":\"2022-08-16T11:14:59Z\",\"updated_at\":\"2022-08-16T11:14:59Z\",\"type\":null,\"subject\":\"My printer is on fire!\",\"raw_subject\":\"My printer is on fire!\",\"description\":\"The smoke is very colorful.\",\"priority\":\"urgent\",\"status\":\"open\",\"recipient\":null,\"requester_id\":6279089898141,\"submitter_id\":6279089898141,\"assignee_id\":6279089898141,\"organization_id\":6279167768093,\"group_id\":6279167766941,\"collaborator_ids\":[],\"follower_ids\":[],\"email_cc_ids\":[],\"forum_topic_id\":null,\"problem_id\":null,\"has_incidents\":false,\"is_public\":true,\"due_at\":null,\"tags\":[],\"custom_fields\":[],\"satisfaction_rating\":null,\"sharing_agreement_ids\":[],\"fields\":[],\"followup_ids\":[],\"ticket_form_id\":6279120591901,\"brand_id\":6279120605853,\"allow_channelback\":false,\"allow_attachments\":true}",
|
|
15
|
-
"headers": {}
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"headers": {
|
|
3
|
-
"user": "TestUser",
|
|
4
|
-
"cursor": "2"
|
|
5
|
-
},
|
|
6
|
-
"data": [
|
|
7
|
-
{
|
|
8
|
-
"body": "{\"url\":\"https://hbtest8393.zendesk.com/api/v2/tickets/3.json\",\"id\":3,\"external_id\":null,\"via\":{\"channel\":\"api\",\"source\":{\"from\":{},\"to\":{},\"rel\":null}},\"created_at\":\"2022-08-16T11:16:20Z\",\"updated_at\":\"2022-08-16T11:16:20Z\",\"type\":null,\"subject\":\"My printer is on fire!\",\"raw_subject\":\"My printer is on fire!\",\"description\":\"The smoke is very colorful.\",\"priority\":\"urgent\",\"status\":\"open\",\"recipient\":null,\"requester_id\":6279089898141,\"submitter_id\":6279089898141,\"assignee_id\":6279089898141,\"organization_id\":6279167768093,\"group_id\":6279167766941,\"collaborator_ids\":[],\"follower_ids\":[],\"email_cc_ids\":[],\"forum_topic_id\":null,\"problem_id\":null,\"has_incidents\":false,\"is_public\":true,\"due_at\":null,\"tags\":[],\"custom_fields\":[],\"satisfaction_rating\":null,\"sharing_agreement_ids\":[],\"fields\":[],\"followup_ids\":[],\"ticket_form_id\":6279120591901,\"brand_id\":6279120605853,\"allow_channelback\":false,\"allow_attachments\":true}",
|
|
9
|
-
"headers": {}
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"http": "GET https://hbtest8393.zendesk.com/api/v2/users.json?per_page=100&page=1",
|
|
3
|
-
"code": 200,
|
|
4
|
-
"body": {
|
|
5
|
-
"users": [
|
|
6
|
-
{
|
|
7
|
-
"id": 6279106989085,
|
|
8
|
-
"url": "https://hbtest8393.zendesk.com/api/v2/users/6279106989085.json",
|
|
9
|
-
"name": "The Customer",
|
|
10
|
-
"email": "customer@example.com",
|
|
11
|
-
"created_at": "2022-08-11T11:35:31Z",
|
|
12
|
-
"updated_at": "2022-08-11T11:35:33Z",
|
|
13
|
-
"time_zone": "Europe/Prague",
|
|
14
|
-
"iana_time_zone": "Europe/Prague",
|
|
15
|
-
"phone": null,
|
|
16
|
-
"shared_phone_number": null,
|
|
17
|
-
"photo": {
|
|
18
|
-
"url": "https://hbtest8393.zendesk.com/api/v2/attachments/6279107039645.json",
|
|
19
|
-
"id": 6279107039645,
|
|
20
|
-
"file_name": "profile_image_6279106989085_14593940.png",
|
|
21
|
-
"content_url": "https://hbtest8393.zendesk.com/system/photos/6279107039645/profile_image_6279106989085_14593940.png",
|
|
22
|
-
"mapped_content_url": "https://hbtest8393.zendesk.com/system/photos/6279107039645/profile_image_6279106989085_14593940.png",
|
|
23
|
-
"content_type": "image/png",
|
|
24
|
-
"size": 10183,
|
|
25
|
-
"width": 80,
|
|
26
|
-
"height": 80,
|
|
27
|
-
"inline": false,
|
|
28
|
-
"deleted": false,
|
|
29
|
-
"thumbnails": [
|
|
30
|
-
{
|
|
31
|
-
"url": "https://hbtest8393.zendesk.com/api/v2/attachments/6279153134365.json",
|
|
32
|
-
"id": 6279153134365,
|
|
33
|
-
"file_name": "profile_image_6279106989085_14593940_thumb.png",
|
|
34
|
-
"content_url": "https://hbtest8393.zendesk.com/system/photos/6279107039645/profile_image_6279106989085_14593940_thumb.png",
|
|
35
|
-
"mapped_content_url": "https://hbtest8393.zendesk.com/system/photos/6279107039645/profile_image_6279106989085_14593940_thumb.png",
|
|
36
|
-
"content_type": "image/png",
|
|
37
|
-
"size": 2331,
|
|
38
|
-
"width": 32,
|
|
39
|
-
"height": 32,
|
|
40
|
-
"inline": false,
|
|
41
|
-
"deleted": false
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
"locale_id": 1,
|
|
46
|
-
"locale": "en-US",
|
|
47
|
-
"organization_id": null,
|
|
48
|
-
"role": "end-user",
|
|
49
|
-
"verified": false,
|
|
50
|
-
"external_id": null,
|
|
51
|
-
"tags": [],
|
|
52
|
-
"alias": null,
|
|
53
|
-
"active": true,
|
|
54
|
-
"shared": false,
|
|
55
|
-
"shared_agent": false,
|
|
56
|
-
"last_login_at": null,
|
|
57
|
-
"two_factor_auth_enabled": false,
|
|
58
|
-
"signature": null,
|
|
59
|
-
"details": null,
|
|
60
|
-
"notes": null,
|
|
61
|
-
"role_type": null,
|
|
62
|
-
"custom_role_id": null,
|
|
63
|
-
"moderator": false,
|
|
64
|
-
"ticket_restriction": "requested",
|
|
65
|
-
"only_private_comments": false,
|
|
66
|
-
"restricted_agent": true,
|
|
67
|
-
"suspended": false,
|
|
68
|
-
"default_group_id": null,
|
|
69
|
-
"report_csv": false,
|
|
70
|
-
"user_fields": {}
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"id": 6279089898141,
|
|
74
|
-
"url": "https://hbtest8393.zendesk.com/api/v2/users/6279089898141.json",
|
|
75
|
-
"name": "Test Test",
|
|
76
|
-
"email": "test.hanaboso@gmail.com",
|
|
77
|
-
"created_at": "2022-08-11T11:35:23Z",
|
|
78
|
-
"updated_at": "2022-08-16T12:19:02Z",
|
|
79
|
-
"time_zone": "Europe/Prague",
|
|
80
|
-
"iana_time_zone": "Europe/Prague",
|
|
81
|
-
"phone": null,
|
|
82
|
-
"shared_phone_number": null,
|
|
83
|
-
"photo": null,
|
|
84
|
-
"locale_id": 1,
|
|
85
|
-
"locale": "en-US",
|
|
86
|
-
"organization_id": 6279167768093,
|
|
87
|
-
"role": "admin",
|
|
88
|
-
"verified": true,
|
|
89
|
-
"external_id": null,
|
|
90
|
-
"tags": [],
|
|
91
|
-
"alias": null,
|
|
92
|
-
"active": true,
|
|
93
|
-
"shared": false,
|
|
94
|
-
"shared_agent": false,
|
|
95
|
-
"last_login_at": "2022-08-16T12:19:02Z",
|
|
96
|
-
"two_factor_auth_enabled": null,
|
|
97
|
-
"signature": null,
|
|
98
|
-
"details": null,
|
|
99
|
-
"notes": null,
|
|
100
|
-
"role_type": 4,
|
|
101
|
-
"custom_role_id": 6279152989725,
|
|
102
|
-
"moderator": true,
|
|
103
|
-
"ticket_restriction": null,
|
|
104
|
-
"only_private_comments": false,
|
|
105
|
-
"restricted_agent": false,
|
|
106
|
-
"suspended": false,
|
|
107
|
-
"default_group_id": 6279167766941,
|
|
108
|
-
"report_csv": true,
|
|
109
|
-
"user_fields": {}
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"id": 6340897501085,
|
|
113
|
-
"url": "https://hbtest8393.zendesk.com/api/v2/users/6340897501085.json",
|
|
114
|
-
"name": "g",
|
|
115
|
-
"email": "garel.g@exanple.com",
|
|
116
|
-
"created_at": "2022-08-16T11:33:02Z",
|
|
117
|
-
"updated_at": "2022-08-16T11:33:02Z",
|
|
118
|
-
"time_zone": "Europe/Prague",
|
|
119
|
-
"iana_time_zone": "Europe/Prague",
|
|
120
|
-
"phone": null,
|
|
121
|
-
"shared_phone_number": null,
|
|
122
|
-
"photo": null,
|
|
123
|
-
"locale_id": 1,
|
|
124
|
-
"locale": "en-US",
|
|
125
|
-
"organization_id": null,
|
|
126
|
-
"role": "end-user",
|
|
127
|
-
"verified": false,
|
|
128
|
-
"external_id": null,
|
|
129
|
-
"tags": [],
|
|
130
|
-
"alias": null,
|
|
131
|
-
"active": true,
|
|
132
|
-
"shared": false,
|
|
133
|
-
"shared_agent": false,
|
|
134
|
-
"last_login_at": null,
|
|
135
|
-
"two_factor_auth_enabled": false,
|
|
136
|
-
"signature": null,
|
|
137
|
-
"details": null,
|
|
138
|
-
"notes": null,
|
|
139
|
-
"role_type": null,
|
|
140
|
-
"custom_role_id": null,
|
|
141
|
-
"moderator": false,
|
|
142
|
-
"ticket_restriction": "requested",
|
|
143
|
-
"only_private_comments": false,
|
|
144
|
-
"restricted_agent": true,
|
|
145
|
-
"suspended": false,
|
|
146
|
-
"default_group_id": null,
|
|
147
|
-
"report_csv": false,
|
|
148
|
-
"user_fields": {}
|
|
149
|
-
}
|
|
150
|
-
],
|
|
151
|
-
"meta": {
|
|
152
|
-
"has_more": false,
|
|
153
|
-
"before_cursor": "0"
|
|
154
|
-
},
|
|
155
|
-
"links": {
|
|
156
|
-
"next": "https://test_subdomain.zendesk.com/api/v2/users.json?page[size]=100&page[after]=100",
|
|
157
|
-
"prev": "https://test_subdomain.zendesk.com/api/v2/users.json?page[size]=100&page[after]=0"
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"headers": {
|
|
3
|
-
"user": "TestUser"
|
|
4
|
-
},
|
|
5
|
-
"data": [
|
|
6
|
-
{
|
|
7
|
-
"body": "{\"id\":6279106989085,\"url\":\"https://hbtest8393.zendesk.com/api/v2/users/6279106989085.json\",\"name\":\"The Customer\",\"email\":\"customer@example.com\",\"created_at\":\"2022-08-11T11:35:31Z\",\"updated_at\":\"2022-08-11T11:35:33Z\",\"time_zone\":\"Europe/Prague\",\"iana_time_zone\":\"Europe/Prague\",\"phone\":null,\"shared_phone_number\":null,\"photo\":{\"url\":\"https://hbtest8393.zendesk.com/api/v2/attachments/6279107039645.json\",\"id\":6279107039645,\"file_name\":\"profile_image_6279106989085_14593940.png\",\"content_url\":\"https://hbtest8393.zendesk.com/system/photos/6279107039645/profile_image_6279106989085_14593940.png\",\"mapped_content_url\":\"https://hbtest8393.zendesk.com/system/photos/6279107039645/profile_image_6279106989085_14593940.png\",\"content_type\":\"image/png\",\"size\":10183,\"width\":80,\"height\":80,\"inline\":false,\"deleted\":false,\"thumbnails\":[{\"url\":\"https://hbtest8393.zendesk.com/api/v2/attachments/6279153134365.json\",\"id\":6279153134365,\"file_name\":\"profile_image_6279106989085_14593940_thumb.png\",\"content_url\":\"https://hbtest8393.zendesk.com/system/photos/6279107039645/profile_image_6279106989085_14593940_thumb.png\",\"mapped_content_url\":\"https://hbtest8393.zendesk.com/system/photos/6279107039645/profile_image_6279106989085_14593940_thumb.png\",\"content_type\":\"image/png\",\"size\":2331,\"width\":32,\"height\":32,\"inline\":false,\"deleted\":false}]},\"locale_id\":1,\"locale\":\"en-US\",\"organization_id\":null,\"role\":\"end-user\",\"verified\":false,\"external_id\":null,\"tags\":[],\"alias\":null,\"active\":true,\"shared\":false,\"shared_agent\":false,\"last_login_at\":null,\"two_factor_auth_enabled\":false,\"signature\":null,\"details\":null,\"notes\":null,\"role_type\":null,\"custom_role_id\":null,\"moderator\":false,\"ticket_restriction\":\"requested\",\"only_private_comments\":false,\"restricted_agent\":true,\"suspended\":false,\"default_group_id\":null,\"report_csv\":false,\"user_fields\":{}}",
|
|
8
|
-
"headers": {}
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"body": "{\"id\":6279089898141,\"url\":\"https://hbtest8393.zendesk.com/api/v2/users/6279089898141.json\",\"name\":\"Test Test\",\"email\":\"test.hanaboso@gmail.com\",\"created_at\":\"2022-08-11T11:35:23Z\",\"updated_at\":\"2022-08-16T12:19:02Z\",\"time_zone\":\"Europe/Prague\",\"iana_time_zone\":\"Europe/Prague\",\"phone\":null,\"shared_phone_number\":null,\"photo\":null,\"locale_id\":1,\"locale\":\"en-US\",\"organization_id\":6279167768093,\"role\":\"admin\",\"verified\":true,\"external_id\":null,\"tags\":[],\"alias\":null,\"active\":true,\"shared\":false,\"shared_agent\":false,\"last_login_at\":\"2022-08-16T12:19:02Z\",\"two_factor_auth_enabled\":null,\"signature\":null,\"details\":null,\"notes\":null,\"role_type\":4,\"custom_role_id\":6279152989725,\"moderator\":true,\"ticket_restriction\":null,\"only_private_comments\":false,\"restricted_agent\":false,\"suspended\":false,\"default_group_id\":6279167766941,\"report_csv\":true,\"user_fields\":{}}",
|
|
12
|
-
"headers": {}
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"body": "{\"id\":6340897501085,\"url\":\"https://hbtest8393.zendesk.com/api/v2/users/6340897501085.json\",\"name\":\"g\",\"email\":\"garel.g@exanple.com\",\"created_at\":\"2022-08-16T11:33:02Z\",\"updated_at\":\"2022-08-16T11:33:02Z\",\"time_zone\":\"Europe/Prague\",\"iana_time_zone\":\"Europe/Prague\",\"phone\":null,\"shared_phone_number\":null,\"photo\":null,\"locale_id\":1,\"locale\":\"en-US\",\"organization_id\":null,\"role\":\"end-user\",\"verified\":false,\"external_id\":null,\"tags\":[],\"alias\":null,\"active\":true,\"shared\":false,\"shared_agent\":false,\"last_login_at\":null,\"two_factor_auth_enabled\":false,\"signature\":null,\"details\":null,\"notes\":null,\"role_type\":null,\"custom_role_id\":null,\"moderator\":false,\"ticket_restriction\":\"requested\",\"only_private_comments\":false,\"restricted_agent\":true,\"suspended\":false,\"default_group_id\":null,\"report_csv\":false,\"user_fields\":{}}",
|
|
16
|
-
"headers": {}
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
-
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
-
import init from '../../../test/dataProvider';
|
|
4
|
-
import { NAME as ZENDESK_LIST_TICKETS_BATCH } from '../ZendeskListTicketsBatch';
|
|
5
|
-
|
|
6
|
-
let tester: NodeTester;
|
|
7
|
-
|
|
8
|
-
describe('Tests for ZendeskListTicketsBatch', () => {
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
tester = new NodeTester(container, __filename);
|
|
11
|
-
init();
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it('process - ok', async () => {
|
|
15
|
-
await tester.testBatch(ZENDESK_LIST_TICKETS_BATCH);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
-
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
-
import init from '../../../test/dataProvider';
|
|
4
|
-
import { NAME as ZENDESK_LIST_USERS_BATCH } from '../ZendeskListUsersBatch';
|
|
5
|
-
|
|
6
|
-
let tester: NodeTester;
|
|
7
|
-
|
|
8
|
-
describe('Tests for ZendeskListUsersBatch', () => {
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
tester = new NodeTester(container, __filename);
|
|
11
|
-
init();
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it('process - ok', async () => {
|
|
15
|
-
await tester.testBatch(ZENDESK_LIST_USERS_BATCH);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
3
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
4
|
-
|
|
5
|
-
export const NAME = 'zendesk-create-ticket-connector';
|
|
6
|
-
|
|
7
|
-
export default class ZendeskCreateTicketConnector extends AConnector {
|
|
8
|
-
|
|
9
|
-
public getName(): string {
|
|
10
|
-
return NAME;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public async processAction(dto: ProcessDto<IInput>): Promise<ProcessDto<IOutput>> {
|
|
14
|
-
const body = dto.getJsonData();
|
|
15
|
-
|
|
16
|
-
const appInstall = await this.getApplicationInstallFromProcess(dto);
|
|
17
|
-
const req = await this.getApplication().getRequestDto(dto, appInstall, HttpMethods.POST, '/tickets.json', body);
|
|
18
|
-
const resp = await this.getSender().send<IOutput>(req, [201]);
|
|
19
|
-
|
|
20
|
-
return dto.setNewJsonData(resp.getJsonBody());
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
26
|
-
export interface IInput {
|
|
27
|
-
ticket: {
|
|
28
|
-
comment: {
|
|
29
|
-
body: string;
|
|
30
|
-
};
|
|
31
|
-
priority: string;
|
|
32
|
-
subject: string;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface IOutput {
|
|
37
|
-
ticket: {
|
|
38
|
-
assignee_id: number;
|
|
39
|
-
collaborator_ids: number[];
|
|
40
|
-
created_at: string;
|
|
41
|
-
custom_fields: [
|
|
42
|
-
{
|
|
43
|
-
id: number;
|
|
44
|
-
value: string;
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
];
|
|
48
|
-
description: string;
|
|
49
|
-
external_id: string;
|
|
50
|
-
follower_ids: number[];
|
|
51
|
-
group_id: number;
|
|
52
|
-
has_incidents: boolean;
|
|
53
|
-
id: number;
|
|
54
|
-
organization_id: number;
|
|
55
|
-
priority: string;
|
|
56
|
-
problem_id: number;
|
|
57
|
-
raw_subject: string;
|
|
58
|
-
recipient: string;
|
|
59
|
-
requester_id: number;
|
|
60
|
-
satisfaction_rating: {
|
|
61
|
-
comment: string;
|
|
62
|
-
id: number;
|
|
63
|
-
score: string;
|
|
64
|
-
};
|
|
65
|
-
sharing_agreement_ids: number[];
|
|
66
|
-
status: string;
|
|
67
|
-
subject: string;
|
|
68
|
-
submitter_id: number;
|
|
69
|
-
tags: string[];
|
|
70
|
-
type: string;
|
|
71
|
-
updated_at: string;
|
|
72
|
-
url: string;
|
|
73
|
-
via: {
|
|
74
|
-
channel: string;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
78
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
3
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
4
|
-
import { ZendeskTrigger } from '../types/trigger.types';
|
|
5
|
-
|
|
6
|
-
export const ZENDESK_CREATE_TRIGGER = 'zendesk-create-trigger-connector';
|
|
7
|
-
|
|
8
|
-
export default class ZendeskCreateTriggerConnector extends AConnector {
|
|
9
|
-
|
|
10
|
-
public getName(): string {
|
|
11
|
-
return ZENDESK_CREATE_TRIGGER;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public async processAction(
|
|
15
|
-
dto: ProcessDto<ZendeskCreateTriggerInput>,
|
|
16
|
-
): Promise<ProcessDto<ZendeskCreateTriggerOutput>> {
|
|
17
|
-
const data = this.getData(dto);
|
|
18
|
-
|
|
19
|
-
const req = await this.getApplication().getRequestDto(
|
|
20
|
-
dto,
|
|
21
|
-
await this.getApplicationInstallFromProcess(dto),
|
|
22
|
-
HttpMethods.POST,
|
|
23
|
-
'/triggers',
|
|
24
|
-
data,
|
|
25
|
-
);
|
|
26
|
-
const resp = await this.getSender().send<Response>(req);
|
|
27
|
-
|
|
28
|
-
return this.setResponse(dto, resp.getJsonBody());
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
protected getData(dto: ProcessDto<ZendeskCreateTriggerInput>): ZendeskCreateTriggerInput {
|
|
32
|
-
return dto.getJsonData();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
protected setResponse(dto: ProcessDto, data: Response): ProcessDto<ZendeskCreateTriggerOutput> {
|
|
36
|
-
return dto.setNewJsonData(data.trigger);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
interface Response {
|
|
42
|
-
trigger: ZendeskTrigger;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export type ZendeskCreateTriggerInput = Pick<ZendeskTrigger, 'actions' | 'category_id' | 'conditions' | 'title'>
|
|
46
|
-
|
|
47
|
-
export type ZendeskCreateTriggerOutput = ZendeskTrigger;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
3
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
4
|
-
|
|
5
|
-
export const NAME = 'zendesk-create-user-connector';
|
|
6
|
-
|
|
7
|
-
export default class ZendeskCreateUserConnector extends AConnector {
|
|
8
|
-
|
|
9
|
-
public getName(): string {
|
|
10
|
-
return NAME;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public async processAction(dto: ProcessDto<IInput>): Promise<ProcessDto<IOutput>> {
|
|
14
|
-
const body = dto.getJsonData();
|
|
15
|
-
|
|
16
|
-
const appInstall = await this.getApplicationInstallFromProcess(dto);
|
|
17
|
-
const req = await this.getApplication().getRequestDto(dto, appInstall, HttpMethods.POST, '/users.json', body);
|
|
18
|
-
const resp = await this.getSender().send<IResponse>(req, [201]);
|
|
19
|
-
|
|
20
|
-
const data = resp.getJsonBody();
|
|
21
|
-
|
|
22
|
-
return dto.setNewJsonData(data.user);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
28
|
-
export interface IResponse {
|
|
29
|
-
user: IOutput;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface IOutput {
|
|
33
|
-
custom_role_id: number;
|
|
34
|
-
email: string;
|
|
35
|
-
id: number;
|
|
36
|
-
name: string;
|
|
37
|
-
organization_id: number;
|
|
38
|
-
role: string;
|
|
39
|
-
role_type: number;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface IInput {
|
|
43
|
-
user: {
|
|
44
|
-
custom_role_id?: number;
|
|
45
|
-
identities?: [
|
|
46
|
-
{
|
|
47
|
-
type: string;
|
|
48
|
-
value: string;
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
organization?: {
|
|
52
|
-
name: string;
|
|
53
|
-
};
|
|
54
|
-
role?: string;
|
|
55
|
-
};
|
|
56
|
-
name: string;
|
|
57
|
-
email: string;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|