@orchesty/connector-zendesk 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 (89) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +190 -0
  3. package/coverage/clover.xml +241 -0
  4. package/coverage/coverage-final.json +11 -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/ZendeskCreateWebhookConnector.ts.html +373 -0
  14. package/coverage/lcov-report/src/Batch/ZendeskDeleteWebhookConnector.ts.html +202 -0
  15. package/coverage/lcov-report/src/Batch/ZendeskListTicketsBatch.ts.html +337 -0
  16. package/coverage/lcov-report/src/Batch/ZendeskListUsersBatch.ts.html +247 -0
  17. package/coverage/lcov-report/src/Batch/index.html +161 -0
  18. package/coverage/lcov-report/src/Connector/ZendeskCreateTicketConnector.ts.html +319 -0
  19. package/coverage/lcov-report/src/Connector/ZendeskCreateTriggerConnector.ts.html +226 -0
  20. package/coverage/lcov-report/src/Connector/ZendeskCreateUserConnector.ts.html +265 -0
  21. package/coverage/lcov-report/src/Connector/ZendeskDeleteTriggerConnector.ts.html +223 -0
  22. package/coverage/lcov-report/src/Connector/index.html +161 -0
  23. package/coverage/lcov-report/src/ZendeskApplication.ts.html +448 -0
  24. package/coverage/lcov-report/src/index.html +116 -0
  25. package/coverage/lcov-report/test/dataProvider.ts.html +307 -0
  26. package/coverage/lcov-report/test/index.html +116 -0
  27. package/coverage/lcov.info +389 -0
  28. package/dist/Batch/ZendeskCreateWebhookConnector.d.ts +16 -0
  29. package/dist/Batch/ZendeskCreateWebhookConnector.js +62 -0
  30. package/dist/Batch/ZendeskDeleteWebhookConnector.d.ts +7 -0
  31. package/dist/Batch/ZendeskDeleteWebhookConnector.js +37 -0
  32. package/dist/Batch/ZendeskListTicketsBatch.d.ts +46 -0
  33. package/dist/Batch/ZendeskListTicketsBatch.js +27 -0
  34. package/dist/Batch/ZendeskListUsersBatch.d.ts +11 -0
  35. package/dist/Batch/ZendeskListUsersBatch.js +27 -0
  36. package/dist/Connector/ZendeskCreateTicketConnector.d.ts +57 -0
  37. package/dist/Connector/ZendeskCreateTicketConnector.js +22 -0
  38. package/dist/Connector/ZendeskCreateTriggerConnector.d.ts +16 -0
  39. package/dist/Connector/ZendeskCreateTriggerConnector.js +27 -0
  40. package/dist/Connector/ZendeskCreateUserConnector.d.ts +36 -0
  41. package/dist/Connector/ZendeskCreateUserConnector.js +23 -0
  42. package/dist/Connector/ZendeskDeleteTriggerConnector.d.ts +13 -0
  43. package/dist/Connector/ZendeskDeleteTriggerConnector.js +29 -0
  44. package/dist/ZendeskApplication.d.ts +27 -0
  45. package/dist/ZendeskApplication.js +124 -0
  46. package/dist/package.json +23 -0
  47. package/dist/types/trigger.types.d.ts +21 -0
  48. package/dist/types/trigger.types.js +2 -0
  49. package/dist/types/webhook.types.d.ts +19 -0
  50. package/dist/types/webhook.types.js +2 -0
  51. package/jest.config.js +13 -0
  52. package/package.json +23 -0
  53. package/src/Batch/ZendeskCreateWebhookConnector.ts +96 -0
  54. package/src/Batch/ZendeskDeleteWebhookConnector.ts +39 -0
  55. package/src/Batch/ZendeskListTicketsBatch.ts +84 -0
  56. package/src/Batch/ZendeskListUsersBatch.ts +54 -0
  57. package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/1-mock.json +57 -0
  58. package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/input.json +6 -0
  59. package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/mock.json +106 -0
  60. package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/output.json +18 -0
  61. package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/output1.json +12 -0
  62. package/src/Batch/__tests__/Data/ZendeskListUsersBatch/input.json +6 -0
  63. package/src/Batch/__tests__/Data/ZendeskListUsersBatch/mock.json +161 -0
  64. package/src/Batch/__tests__/Data/ZendeskListUsersBatch/output.json +19 -0
  65. package/src/Batch/__tests__/ZendeskListTicketsBatch.ts +17 -0
  66. package/src/Batch/__tests__/ZendeskListUsersBatch.ts +17 -0
  67. package/src/Connector/ZendeskCreateTicketConnector.ts +78 -0
  68. package/src/Connector/ZendeskCreateTriggerConnector.ts +47 -0
  69. package/src/Connector/ZendeskCreateUserConnector.ts +60 -0
  70. package/src/Connector/ZendeskDeleteTriggerConnector.ts +46 -0
  71. package/src/Connector/__tests__/Data/ZendeskCreateTicketConnector/input.json +14 -0
  72. package/src/Connector/__tests__/Data/ZendeskCreateTicketConnector/mock.json +194 -0
  73. package/src/Connector/__tests__/Data/ZendeskCreateTicketConnector/output.json +194 -0
  74. package/src/Connector/__tests__/Data/ZendeskCreateTriggerConnector/input.json +11 -0
  75. package/src/Connector/__tests__/Data/ZendeskCreateTriggerConnector/mock.json +31 -0
  76. package/src/Connector/__tests__/Data/ZendeskCreateTriggerConnector/output.json +29 -0
  77. package/src/Connector/__tests__/Data/ZendeskCreateUserConnector/input.json +25 -0
  78. package/src/Connector/__tests__/Data/ZendeskCreateUserConnector/mock.json +45 -0
  79. package/src/Connector/__tests__/Data/ZendeskCreateUserConnector/output.json +44 -0
  80. package/src/Connector/__tests__/ZendeskCreateTicketConnector.ts +17 -0
  81. package/src/Connector/__tests__/ZendeskCreateTriggerConnector.ts +17 -0
  82. package/src/Connector/__tests__/ZendeskCreateUserConnector.ts +17 -0
  83. package/src/ZendeskApplication.ts +121 -0
  84. package/src/types/trigger.types.ts +19 -0
  85. package/src/types/webhook.types.ts +20 -0
  86. package/test/dataProvider.ts +74 -0
  87. package/tsconfig.json +8 -0
  88. package/tsconfig.prod.json +13 -0
  89. package/tsconfig.prod.tsbuildinfo +1 -0
@@ -0,0 +1,60 @@
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 */
@@ -0,0 +1,46 @@
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;
@@ -0,0 +1,14 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": {
6
+ "ticket": {
7
+ "comment": {
8
+ "body": "The smoke is very colorful."
9
+ },
10
+ "priority": "urgent",
11
+ "subject": "My printer is on fire!"
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,194 @@
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
+
@@ -0,0 +1,194 @@
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
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "headers": {
3
+ "user": "TestUser"
4
+ },
5
+ "data": {
6
+ "actions": [],
7
+ "conditions": {},
8
+ "title": "title",
9
+ "category_id": "category_id"
10
+ }
11
+ }
@@ -0,0 +1,31 @@
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
+
@@ -0,0 +1,29 @@
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
+ }
@@ -0,0 +1,25 @@
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
+ }
@@ -0,0 +1,45 @@
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
+ }