@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,46 +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 ZENDESK_DELETE_TRIGGER = 'zendesk-delete-trigger-connector';
|
|
6
|
-
|
|
7
|
-
export default class ZendeskDeleteTriggerConnector extends AConnector {
|
|
8
|
-
|
|
9
|
-
public getName(): string {
|
|
10
|
-
return ZENDESK_DELETE_TRIGGER;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public async processAction(
|
|
14
|
-
dto: ProcessDto<ZendeskDeleteTriggerInput>,
|
|
15
|
-
): Promise<ProcessDto<ZendeskDeleteTriggerOutput>> {
|
|
16
|
-
const data = this.getData(dto);
|
|
17
|
-
|
|
18
|
-
const req = await this.getApplication().getRequestDto(
|
|
19
|
-
dto,
|
|
20
|
-
await this.getApplicationInstallFromProcess(dto),
|
|
21
|
-
HttpMethods.DELETE,
|
|
22
|
-
`triggers/${data.id}`,
|
|
23
|
-
{
|
|
24
|
-
trigger: data,
|
|
25
|
-
},
|
|
26
|
-
);
|
|
27
|
-
await this.getSender().send(req);
|
|
28
|
-
|
|
29
|
-
return this.setResponse(dto);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
protected getData(dto: ProcessDto<ZendeskDeleteTriggerInput>): ZendeskDeleteTriggerInput {
|
|
33
|
-
return dto.getJsonData();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
protected setResponse(dto: ProcessDto<ZendeskDeleteTriggerInput>): ProcessDto<ZendeskDeleteTriggerOutput> {
|
|
37
|
-
return dto;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface ZendeskDeleteTriggerInput {
|
|
43
|
-
id: string | number;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export type ZendeskDeleteTriggerOutput = ZendeskDeleteTriggerInput;
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"http": "POST https://hbtest8393.zendesk.com/api/v2/tickets.json",
|
|
3
|
-
"code": 201,
|
|
4
|
-
"body": {
|
|
5
|
-
"ticket": {
|
|
6
|
-
"audit": {
|
|
7
|
-
"author_id": 6279089898141,
|
|
8
|
-
"created_at": "2022-08-16T11:14:59Z",
|
|
9
|
-
"events": [
|
|
10
|
-
{
|
|
11
|
-
"attachments": [],
|
|
12
|
-
"audit_id": 6340579809949,
|
|
13
|
-
"author_id": 6279089898141,
|
|
14
|
-
"body": "The smoke is very colorful.",
|
|
15
|
-
"html_body": "<div class=\"zd-comment\" dir=\"auto\"><p dir=\"auto\">The smoke is very colorful.</p></div>",
|
|
16
|
-
"id": 6340579810077,
|
|
17
|
-
"plain_body": "The smoke is very colorful.",
|
|
18
|
-
"public": true,
|
|
19
|
-
"type": "Comment"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"field_name": "priority",
|
|
23
|
-
"id": 6340579810205,
|
|
24
|
-
"type": "Create",
|
|
25
|
-
"value": "urgent"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"field_name": "subject",
|
|
29
|
-
"id": 6340579810333,
|
|
30
|
-
"type": "Create",
|
|
31
|
-
"value": "My printer is on fire!"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"field_name": "requester_id",
|
|
35
|
-
"id": 6340579810461,
|
|
36
|
-
"type": "Create",
|
|
37
|
-
"value": "6279089898141"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"field_name": "type",
|
|
41
|
-
"id": 6340579810589,
|
|
42
|
-
"type": "Create",
|
|
43
|
-
"value": null
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"field_name": "status",
|
|
47
|
-
"id": 6340579810717,
|
|
48
|
-
"type": "Create",
|
|
49
|
-
"value": "open"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"field_name": "assignee_id",
|
|
53
|
-
"id": 6340579810845,
|
|
54
|
-
"type": "Create",
|
|
55
|
-
"value": "6279089898141"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"field_name": "group_id",
|
|
59
|
-
"id": 6340579810973,
|
|
60
|
-
"type": "Create",
|
|
61
|
-
"value": "6279167766941"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"field_name": "organization_id",
|
|
65
|
-
"id": 6340579811101,
|
|
66
|
-
"type": "Create",
|
|
67
|
-
"value": "6279167768093"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"field_name": "brand_id",
|
|
71
|
-
"id": 6340579811229,
|
|
72
|
-
"type": "Create",
|
|
73
|
-
"value": "6279120605853"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"field_name": "ticket_form_id",
|
|
77
|
-
"id": 6340579811357,
|
|
78
|
-
"type": "Create",
|
|
79
|
-
"value": "6279120591901"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"body": "A ticket (#{{ticket.id}}) by {{ticket.requester.name}} has been received. It is unassigned.\n\n{{ticket.latest_comment_html}}",
|
|
83
|
-
"id": 6340579811485,
|
|
84
|
-
"recipients": [
|
|
85
|
-
6279089898141
|
|
86
|
-
],
|
|
87
|
-
"subject": "[{{ticket.account}}] {{ticket.title}}",
|
|
88
|
-
"type": "Notification",
|
|
89
|
-
"via": {
|
|
90
|
-
"channel": "rule",
|
|
91
|
-
"source": {
|
|
92
|
-
"from": {
|
|
93
|
-
"deleted": false,
|
|
94
|
-
"id": 6279167804573,
|
|
95
|
-
"title": "Notify all agents of received request"
|
|
96
|
-
},
|
|
97
|
-
"rel": "trigger"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"body": "This ticket was created on your behalf.\n\nTo add additional comments, reply to this email.\n\n{{ticket.latest_public_comment_html}}",
|
|
103
|
-
"id": 6340579811613,
|
|
104
|
-
"recipients": [
|
|
105
|
-
6279089898141
|
|
106
|
-
],
|
|
107
|
-
"subject": "{{ticket.title}}",
|
|
108
|
-
"type": "Notification",
|
|
109
|
-
"via": {
|
|
110
|
-
"channel": "rule",
|
|
111
|
-
"source": {
|
|
112
|
-
"from": {
|
|
113
|
-
"deleted": false,
|
|
114
|
-
"id": 6279167793181,
|
|
115
|
-
"title": "Notify requester of new proactive ticket"
|
|
116
|
-
},
|
|
117
|
-
"rel": "trigger"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
],
|
|
122
|
-
"id": 6340579809949,
|
|
123
|
-
"metadata": {
|
|
124
|
-
"custom": {},
|
|
125
|
-
"system": {
|
|
126
|
-
"client": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)",
|
|
127
|
-
"ip_address": "188.122.212.69",
|
|
128
|
-
"latitude": 50.1982,
|
|
129
|
-
"location": "Hradec Králové, 52, Czechia",
|
|
130
|
-
"longitude": 15.8825
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
"ticket_id": 2,
|
|
134
|
-
"via": {
|
|
135
|
-
"channel": "api",
|
|
136
|
-
"source": {
|
|
137
|
-
"from": {},
|
|
138
|
-
"rel": null,
|
|
139
|
-
"to": {
|
|
140
|
-
"address": "test.hanaboso@gmail.com",
|
|
141
|
-
"name": "Test Test"
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
"ticket": {
|
|
147
|
-
"allow_attachments": true,
|
|
148
|
-
"allow_channelback": false,
|
|
149
|
-
"assignee_id": 6279089898141,
|
|
150
|
-
"brand_id": 6279120605853,
|
|
151
|
-
"collaborator_ids": [],
|
|
152
|
-
"created_at": "2022-08-16T11:14:59Z",
|
|
153
|
-
"custom_fields": [],
|
|
154
|
-
"description": "The smoke is very colorful.",
|
|
155
|
-
"due_at": null,
|
|
156
|
-
"email_cc_ids": [],
|
|
157
|
-
"external_id": null,
|
|
158
|
-
"fields": [],
|
|
159
|
-
"follower_ids": [],
|
|
160
|
-
"followup_ids": [],
|
|
161
|
-
"forum_topic_id": null,
|
|
162
|
-
"group_id": 6279167766941,
|
|
163
|
-
"has_incidents": false,
|
|
164
|
-
"id": 2,
|
|
165
|
-
"is_public": true,
|
|
166
|
-
"organization_id": 6279167768093,
|
|
167
|
-
"priority": "urgent",
|
|
168
|
-
"problem_id": null,
|
|
169
|
-
"raw_subject": "My printer is on fire!",
|
|
170
|
-
"recipient": null,
|
|
171
|
-
"requester_id": 6279089898141,
|
|
172
|
-
"satisfaction_rating": null,
|
|
173
|
-
"sharing_agreement_ids": [],
|
|
174
|
-
"status": "open",
|
|
175
|
-
"subject": "My printer is on fire!",
|
|
176
|
-
"submitter_id": 6279089898141,
|
|
177
|
-
"tags": [],
|
|
178
|
-
"ticket_form_id": 6279120591901,
|
|
179
|
-
"type": null,
|
|
180
|
-
"updated_at": "2022-08-16T11:14:59Z",
|
|
181
|
-
"url": "https://hbtest8393.zendesk.com/api/v2/tickets/2.json",
|
|
182
|
-
"via": {
|
|
183
|
-
"channel": "api",
|
|
184
|
-
"source": {
|
|
185
|
-
"from": {},
|
|
186
|
-
"rel": null,
|
|
187
|
-
"to": {}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"headers": {
|
|
3
|
-
"user": "TestUser"
|
|
4
|
-
},
|
|
5
|
-
"data": {
|
|
6
|
-
"ticket": {
|
|
7
|
-
"audit": {
|
|
8
|
-
"author_id": 6279089898141,
|
|
9
|
-
"created_at": "2022-08-16T11:14:59Z",
|
|
10
|
-
"events": [
|
|
11
|
-
{
|
|
12
|
-
"attachments": [],
|
|
13
|
-
"audit_id": 6340579809949,
|
|
14
|
-
"author_id": 6279089898141,
|
|
15
|
-
"body": "The smoke is very colorful.",
|
|
16
|
-
"html_body": "<div class=\"zd-comment\" dir=\"auto\"><p dir=\"auto\">The smoke is very colorful.</p></div>",
|
|
17
|
-
"id": 6340579810077,
|
|
18
|
-
"plain_body": "The smoke is very colorful.",
|
|
19
|
-
"public": true,
|
|
20
|
-
"type": "Comment"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"field_name": "priority",
|
|
24
|
-
"id": 6340579810205,
|
|
25
|
-
"type": "Create",
|
|
26
|
-
"value": "urgent"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"field_name": "subject",
|
|
30
|
-
"id": 6340579810333,
|
|
31
|
-
"type": "Create",
|
|
32
|
-
"value": "My printer is on fire!"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"field_name": "requester_id",
|
|
36
|
-
"id": 6340579810461,
|
|
37
|
-
"type": "Create",
|
|
38
|
-
"value": "6279089898141"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"field_name": "type",
|
|
42
|
-
"id": 6340579810589,
|
|
43
|
-
"type": "Create",
|
|
44
|
-
"value": null
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"field_name": "status",
|
|
48
|
-
"id": 6340579810717,
|
|
49
|
-
"type": "Create",
|
|
50
|
-
"value": "open"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"field_name": "assignee_id",
|
|
54
|
-
"id": 6340579810845,
|
|
55
|
-
"type": "Create",
|
|
56
|
-
"value": "6279089898141"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"field_name": "group_id",
|
|
60
|
-
"id": 6340579810973,
|
|
61
|
-
"type": "Create",
|
|
62
|
-
"value": "6279167766941"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"field_name": "organization_id",
|
|
66
|
-
"id": 6340579811101,
|
|
67
|
-
"type": "Create",
|
|
68
|
-
"value": "6279167768093"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"field_name": "brand_id",
|
|
72
|
-
"id": 6340579811229,
|
|
73
|
-
"type": "Create",
|
|
74
|
-
"value": "6279120605853"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"field_name": "ticket_form_id",
|
|
78
|
-
"id": 6340579811357,
|
|
79
|
-
"type": "Create",
|
|
80
|
-
"value": "6279120591901"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"body": "A ticket (#{{ticket.id}}) by {{ticket.requester.name}} has been received. It is unassigned.\n\n{{ticket.latest_comment_html}}",
|
|
84
|
-
"id": 6340579811485,
|
|
85
|
-
"recipients": [
|
|
86
|
-
6279089898141
|
|
87
|
-
],
|
|
88
|
-
"subject": "[{{ticket.account}}] {{ticket.title}}",
|
|
89
|
-
"type": "Notification",
|
|
90
|
-
"via": {
|
|
91
|
-
"channel": "rule",
|
|
92
|
-
"source": {
|
|
93
|
-
"from": {
|
|
94
|
-
"deleted": false,
|
|
95
|
-
"id": 6279167804573,
|
|
96
|
-
"title": "Notify all agents of received request"
|
|
97
|
-
},
|
|
98
|
-
"rel": "trigger"
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"body": "This ticket was created on your behalf.\n\nTo add additional comments, reply to this email.\n\n{{ticket.latest_public_comment_html}}",
|
|
104
|
-
"id": 6340579811613,
|
|
105
|
-
"recipients": [
|
|
106
|
-
6279089898141
|
|
107
|
-
],
|
|
108
|
-
"subject": "{{ticket.title}}",
|
|
109
|
-
"type": "Notification",
|
|
110
|
-
"via": {
|
|
111
|
-
"channel": "rule",
|
|
112
|
-
"source": {
|
|
113
|
-
"from": {
|
|
114
|
-
"deleted": false,
|
|
115
|
-
"id": 6279167793181,
|
|
116
|
-
"title": "Notify requester of new proactive ticket"
|
|
117
|
-
},
|
|
118
|
-
"rel": "trigger"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
],
|
|
123
|
-
"id": 6340579809949,
|
|
124
|
-
"metadata": {
|
|
125
|
-
"custom": {},
|
|
126
|
-
"system": {
|
|
127
|
-
"client": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)",
|
|
128
|
-
"ip_address": "188.122.212.69",
|
|
129
|
-
"latitude": 50.1982,
|
|
130
|
-
"location": "Hradec Králové, 52, Czechia",
|
|
131
|
-
"longitude": 15.8825
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
"ticket_id": 2,
|
|
135
|
-
"via": {
|
|
136
|
-
"channel": "api",
|
|
137
|
-
"source": {
|
|
138
|
-
"from": {},
|
|
139
|
-
"rel": null,
|
|
140
|
-
"to": {
|
|
141
|
-
"address": "test.hanaboso@gmail.com",
|
|
142
|
-
"name": "Test Test"
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
"ticket": {
|
|
148
|
-
"allow_attachments": true,
|
|
149
|
-
"allow_channelback": false,
|
|
150
|
-
"assignee_id": 6279089898141,
|
|
151
|
-
"brand_id": 6279120605853,
|
|
152
|
-
"collaborator_ids": [],
|
|
153
|
-
"created_at": "2022-08-16T11:14:59Z",
|
|
154
|
-
"custom_fields": [],
|
|
155
|
-
"description": "The smoke is very colorful.",
|
|
156
|
-
"due_at": null,
|
|
157
|
-
"email_cc_ids": [],
|
|
158
|
-
"external_id": null,
|
|
159
|
-
"fields": [],
|
|
160
|
-
"follower_ids": [],
|
|
161
|
-
"followup_ids": [],
|
|
162
|
-
"forum_topic_id": null,
|
|
163
|
-
"group_id": 6279167766941,
|
|
164
|
-
"has_incidents": false,
|
|
165
|
-
"id": 2,
|
|
166
|
-
"is_public": true,
|
|
167
|
-
"organization_id": 6279167768093,
|
|
168
|
-
"priority": "urgent",
|
|
169
|
-
"problem_id": null,
|
|
170
|
-
"raw_subject": "My printer is on fire!",
|
|
171
|
-
"recipient": null,
|
|
172
|
-
"requester_id": 6279089898141,
|
|
173
|
-
"satisfaction_rating": null,
|
|
174
|
-
"sharing_agreement_ids": [],
|
|
175
|
-
"status": "open",
|
|
176
|
-
"subject": "My printer is on fire!",
|
|
177
|
-
"submitter_id": 6279089898141,
|
|
178
|
-
"tags": [],
|
|
179
|
-
"ticket_form_id": 6279120591901,
|
|
180
|
-
"type": null,
|
|
181
|
-
"updated_at": "2022-08-16T11:14:59Z",
|
|
182
|
-
"url": "https://hbtest8393.zendesk.com/api/v2/tickets/2.json",
|
|
183
|
-
"via": {
|
|
184
|
-
"channel": "api",
|
|
185
|
-
"source": {
|
|
186
|
-
"from": {},
|
|
187
|
-
"rel": null,
|
|
188
|
-
"to": {}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"http": "POST https://hbtest8393.zendesk.com/api/v2/triggers",
|
|
3
|
-
"code": 201,
|
|
4
|
-
"body": {
|
|
5
|
-
"trigger": {
|
|
6
|
-
"actions": [
|
|
7
|
-
{
|
|
8
|
-
"field": "group_id",
|
|
9
|
-
"value": "20455932"
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"category_id": "10026",
|
|
13
|
-
"conditions": {
|
|
14
|
-
"all": [
|
|
15
|
-
{
|
|
16
|
-
"field": "status",
|
|
17
|
-
"operator": "is",
|
|
18
|
-
"value": "open"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"field": "priority",
|
|
22
|
-
"operator": "less_than",
|
|
23
|
-
"value": "high"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
"title": "Roger Wilco"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"headers": {
|
|
3
|
-
"user": "TestUser"
|
|
4
|
-
},
|
|
5
|
-
"data": {
|
|
6
|
-
"actions": [
|
|
7
|
-
{
|
|
8
|
-
"field": "group_id",
|
|
9
|
-
"value": "20455932"
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"category_id": "10026",
|
|
13
|
-
"conditions": {
|
|
14
|
-
"all": [
|
|
15
|
-
{
|
|
16
|
-
"field": "status",
|
|
17
|
-
"operator": "is",
|
|
18
|
-
"value": "open"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"field": "priority",
|
|
22
|
-
"operator": "less_than",
|
|
23
|
-
"value": "high"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
"title": "Roger Wilco"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"headers": {
|
|
3
|
-
"user": "TestUser"
|
|
4
|
-
},
|
|
5
|
-
"data": {
|
|
6
|
-
"user": {
|
|
7
|
-
"email": "robert@example.org",
|
|
8
|
-
"identities": [
|
|
9
|
-
{
|
|
10
|
-
"type": "email",
|
|
11
|
-
"value": "test1@user.com"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"type": "twitter",
|
|
15
|
-
"value": "tester841"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"name": "robert Wilco",
|
|
19
|
-
"organization": {
|
|
20
|
-
"name": "VIP Customers"
|
|
21
|
-
},
|
|
22
|
-
"role": "admin"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"http": "POST https://hbtest8393.zendesk.com/api/v2/users.json",
|
|
3
|
-
"code": 201,
|
|
4
|
-
"body": {
|
|
5
|
-
"user": {
|
|
6
|
-
"active": true,
|
|
7
|
-
"alias": null,
|
|
8
|
-
"created_at": "2022-08-16T12:42:32Z",
|
|
9
|
-
"custom_role_id": 6279152989725,
|
|
10
|
-
"default_group_id": 6279167766941,
|
|
11
|
-
"details": null,
|
|
12
|
-
"email": "test1@user.com",
|
|
13
|
-
"external_id": null,
|
|
14
|
-
"iana_time_zone": "Europe/Prague",
|
|
15
|
-
"id": 6342061201949,
|
|
16
|
-
"last_login_at": null,
|
|
17
|
-
"locale": "en-US",
|
|
18
|
-
"locale_id": 1,
|
|
19
|
-
"moderator": true,
|
|
20
|
-
"name": "robert Wilco",
|
|
21
|
-
"notes": null,
|
|
22
|
-
"only_private_comments": false,
|
|
23
|
-
"organization_id": null,
|
|
24
|
-
"phone": null,
|
|
25
|
-
"photo": null,
|
|
26
|
-
"report_csv": false,
|
|
27
|
-
"restricted_agent": false,
|
|
28
|
-
"role": "admin",
|
|
29
|
-
"role_type": 4,
|
|
30
|
-
"shared": false,
|
|
31
|
-
"shared_agent": false,
|
|
32
|
-
"shared_phone_number": null,
|
|
33
|
-
"signature": null,
|
|
34
|
-
"suspended": false,
|
|
35
|
-
"tags": [],
|
|
36
|
-
"ticket_restriction": null,
|
|
37
|
-
"time_zone": "Europe/Prague",
|
|
38
|
-
"two_factor_auth_enabled": null,
|
|
39
|
-
"updated_at": "2022-08-16T12:42:32Z",
|
|
40
|
-
"url": "https://hbtest8393.zendesk.com/api/v2/users/6342061201949.json",
|
|
41
|
-
"user_fields": {},
|
|
42
|
-
"verified": false
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"headers": {
|
|
3
|
-
"user": "TestUser"
|
|
4
|
-
},
|
|
5
|
-
"data": {
|
|
6
|
-
"active": true,
|
|
7
|
-
"alias": null,
|
|
8
|
-
"created_at": "2022-08-16T12:42:32Z",
|
|
9
|
-
"custom_role_id": 6279152989725,
|
|
10
|
-
"default_group_id": 6279167766941,
|
|
11
|
-
"details": null,
|
|
12
|
-
"email": "test1@user.com",
|
|
13
|
-
"external_id": null,
|
|
14
|
-
"iana_time_zone": "Europe/Prague",
|
|
15
|
-
"id": 6342061201949,
|
|
16
|
-
"last_login_at": null,
|
|
17
|
-
"locale": "en-US",
|
|
18
|
-
"locale_id": 1,
|
|
19
|
-
"moderator": true,
|
|
20
|
-
"name": "robert Wilco",
|
|
21
|
-
"notes": null,
|
|
22
|
-
"only_private_comments": false,
|
|
23
|
-
"organization_id": null,
|
|
24
|
-
"phone": null,
|
|
25
|
-
"photo": null,
|
|
26
|
-
"report_csv": false,
|
|
27
|
-
"restricted_agent": false,
|
|
28
|
-
"role": "admin",
|
|
29
|
-
"role_type": 4,
|
|
30
|
-
"shared": false,
|
|
31
|
-
"shared_agent": false,
|
|
32
|
-
"shared_phone_number": null,
|
|
33
|
-
"signature": null,
|
|
34
|
-
"suspended": false,
|
|
35
|
-
"tags": [],
|
|
36
|
-
"ticket_restriction": null,
|
|
37
|
-
"time_zone": "Europe/Prague",
|
|
38
|
-
"two_factor_auth_enabled": null,
|
|
39
|
-
"updated_at": "2022-08-16T12:42:32Z",
|
|
40
|
-
"url": "https://hbtest8393.zendesk.com/api/v2/users/6342061201949.json",
|
|
41
|
-
"user_fields": {},
|
|
42
|
-
"verified": false
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -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_CREATE_TICKET_CONNECTOR } from '../ZendeskCreateTicketConnector';
|
|
5
|
-
|
|
6
|
-
let tester: NodeTester;
|
|
7
|
-
|
|
8
|
-
describe('Tests for ZendeskCreateTicketConnector', () => {
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
tester = new NodeTester(container, __filename);
|
|
11
|
-
init();
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it('process - ok', async () => {
|
|
15
|
-
await tester.testConnector(ZENDESK_CREATE_TICKET_CONNECTOR);
|
|
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 { ZENDESK_CREATE_TRIGGER } from '../ZendeskCreateTriggerConnector';
|
|
5
|
-
|
|
6
|
-
let tester: NodeTester;
|
|
7
|
-
|
|
8
|
-
describe('Tests for ZendeskCreateTriggerConnector', () => {
|
|
9
|
-
beforeAll(() => {
|
|
10
|
-
tester = new NodeTester(container, __filename);
|
|
11
|
-
init();
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it('process - ok', async () => {
|
|
15
|
-
await tester.testConnector(ZENDESK_CREATE_TRIGGER);
|
|
16
|
-
});
|
|
17
|
-
});
|